@orangelogic/design-system 2.111.0 → 2.112.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.Ci6rP56l.js +458 -0
- package/library/chunks/{button.i88sSbTZ.js → button.BvBgxmvw.js} +3 -3
- package/library/chunks/calendar-grid.CXYoS6VA.js +108 -0
- package/library/chunks/{color-swatch-group.mIHaCJsh.js → color-swatch-group.D8KPblw2.js} +3 -3
- package/library/chunks/{color-swatch.D9vkPoV2.js → color-swatch.DQxReKYX.js} +2 -2
- package/library/chunks/{color.vLD2sNTs.js → color.LzSGBy7o.js} +2 -2
- package/library/chunks/{confirm-popover.UuBhn8GA.js → confirm-popover.dyPIFLWa.js} +3 -3
- package/library/chunks/date-picker.D0SJADN6.js +77 -0
- package/library/chunks/{dialog.Bso6gK-8.js → dialog.BoCFGpPO.js} +2 -2
- package/library/chunks/{document-viewer.C6eclRvd.js → document-viewer.B90s20gM.js} +8 -7
- package/library/chunks/{dot-pagination.CNnUuI-Z.js → dot-pagination.uz9GFrMP.js} +1 -1
- package/library/chunks/{file-on-demand.Cf2ujTeF.js → file-on-demand.DLVH0DID.js} +10 -10
- package/library/chunks/{folder-select.ByNUfTia.js → folder-select.C2ruplAB.js} +5 -5
- package/library/chunks/{form.Ch1cwYzO.js → form.B-5nQJva.js} +46 -34
- package/library/chunks/{header.hj2Kw-N7.js → header.By_Mfx47.js} +1 -1
- package/library/chunks/{i18n.D6AYDPK-.js → i18n.BcD4Ohsq.js} +46 -13
- package/library/chunks/{icon-button.ztYU-DHy.js → icon-button.DO6DHXwo.js} +2 -2
- package/library/chunks/icon.DnBh6-56.js +111 -0
- package/library/chunks/{iframe.uLxZ6LsL.js → iframe.C4jZSmOr.js} +1 -1
- package/library/chunks/{image.DKB6yEQO.js → image.Cx4hbc4L.js} +2 -2
- package/library/chunks/input.B7SaYNrr.js +2855 -0
- package/library/chunks/{list-editor.GT2kQsmR.js → list-editor.Hag-nXN-.js} +86 -86
- package/library/chunks/{option.BAYtHIvG.js → option.CA-HtVdP.js} +2 -2
- package/library/chunks/{pagination.CCJD61IB.js → pagination.jgAGwDyt.js} +5 -5
- package/library/chunks/{tab-group.BsR8tdVY.js → tab-group.DyxpVNOn.js} +3 -3
- package/library/chunks/{table.DL_CEeYh.js → table.Crb35At8.js} +2905 -2306
- package/library/chunks/{tree.KmZRWZ0F.js → tree.jg0MjIB8.js} +2 -2
- package/library/components/alert.js +2 -2
- package/library/components/animated-image.js +15 -15
- package/library/components/asset-link-format.js +7 -7
- package/library/components/atoms.js +194 -180
- package/library/components/audio.js +2 -2
- package/library/components/avatar.js +1 -1
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +4 -4
- package/library/components/button.js +4 -4
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +5 -5
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.d.ts +3 -0
- package/library/components/date-calendar.js +107 -0
- package/library/components/details.js +12 -12
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/faceted-filter.d.ts +3 -0
- package/library/components/faceted-filter.js +295 -0
- package/library/components/file-on-demand.js +11 -11
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +3 -3
- package/library/components/icon.js +10 -109
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/input.js +19 -2852
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +7 -7
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +9 -9
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/radio.js +1 -1
- package/library/components/range.js +2 -2
- package/library/components/rating.js +6 -6
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +5 -5
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +2 -2
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +16 -16
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +3 -3
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +25164 -24599
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/date-calendar/date-calendar.d.ts +61 -0
- package/library/packages/atoms/src/components/date-calendar/date-calendar.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/details/details.d.ts +1 -0
- package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.d.ts +58 -0
- package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/faceted-filter/faceted-filter.d.ts +71 -0
- package/library/packages/atoms/src/components/faceted-filter/faceted-filter.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/icon/font-awesome-icons.d.ts +1 -0
- package/library/packages/atoms/src/components/icon/icon.d.ts +1 -0
- package/library/packages/atoms/src/components/image/image.d.ts +1 -1
- package/library/packages/atoms/src/components/table/table-data-loader.d.ts +13 -0
- package/library/packages/atoms/src/components/table/table.d.ts +13 -1
- package/library/packages/atoms/src/index.d.ts +3 -0
- package/library/packages/events/src/cx-date-select.d.ts +9 -0
- package/library/packages/events/src/cx-faceted-filter-change.d.ts +8 -0
- package/library/packages/events/src/cx-table-data-load.d.ts +17 -0
- package/library/packages/events/src/events.d.ts +3 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ClickableCell/ClickableCell.d.ts +5 -0
- package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -1
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +73 -13
- package/library/packages/molecules/src/index.d.ts +2 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +127 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.d.ts +90 -0
- package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/timeline/timeline.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +0 -1
- package/library/packages/services/src/api/asset/asset.d.ts +3 -3
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -2
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +4 -4
- package/library/packages/types/src/date-picker.d.ts +45 -0
- package/library/packages/types/src/faceted-filter.d.ts +23 -0
- package/library/packages/types/src/icon-picker.d.ts +8 -0
- package/library/packages/types/src/index.d.ts +1 -1
- package/library/packages/types/src/table.d.ts +12 -0
- package/library/packages/utils/src/custom-element/form.d.ts +5 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +33 -0
- package/library/packages/utils/src/date/calendar-grid.d.ts +40 -0
- package/library/packages/utils/src/date/date-range-preset.d.ts +12 -0
- package/library/packages/utils/src/date/date.d.ts +42 -0
- package/library/packages/utils/src/date/index.d.ts +3 -0
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/react-web-component.d.ts +491 -195
- package/library/utils.js +539 -332
- package/package.json +1 -1
- package/library/chunks/asset.NgymQ3Zx.js +0 -454
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { C as O, D as q } from "./dialog.
|
|
1
|
+
import { C as _ } from "./button.BvBgxmvw.js";
|
|
2
|
+
import { C as O, D as q } from "./dialog.BoCFGpPO.js";
|
|
3
3
|
import G from "../components/grid.js";
|
|
4
4
|
import R from "../components/grid-item.js";
|
|
5
|
-
import
|
|
5
|
+
import { C as k } from "./input.B7SaYNrr.js";
|
|
6
6
|
import j from "../components/line-clamp.js";
|
|
7
|
-
import { C as P } from "./option.
|
|
7
|
+
import { C as P } from "./option.CA-HtVdP.js";
|
|
8
8
|
import F from "../components/radio.js";
|
|
9
9
|
import B from "../components/radio-group.js";
|
|
10
10
|
import K from "../components/select.js";
|
|
11
|
-
import
|
|
12
|
-
import { C as U, H } from "./table.
|
|
11
|
+
import S from "../components/space.js";
|
|
12
|
+
import { C as U, H } from "./table.Crb35At8.js";
|
|
13
13
|
import { C as E } from "./typography.DJC_UXgs.js";
|
|
14
14
|
import { n as o, C as T } from "./lib-cortex-element.CVMmyPMC.js";
|
|
15
15
|
import V from "../components/dynamic-select.js";
|
|
16
16
|
import { c as L } from "./component.styles.CRO4Odto.js";
|
|
17
17
|
import { c as M } from "./custom-element.L4WJXn1j.js";
|
|
18
18
|
import { d as W } from "./debounce.CIEhztrj.js";
|
|
19
|
-
import { L as D } from "./i18n.
|
|
19
|
+
import { L as D } from "./i18n.BcD4Ohsq.js";
|
|
20
20
|
import { w as v } from "./watch.CThbualB.js";
|
|
21
21
|
import { a as J } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
22
22
|
import { i as z, x as l } from "./lit-element.jLBm65_O.js";
|
|
@@ -28,16 +28,16 @@ import { o as Z } from "./map.D8heArFD.js";
|
|
|
28
28
|
import { c as x } from "./repeat.DbF2p5ae.js";
|
|
29
29
|
import { n as N } from "./when.Dr1es41R.js";
|
|
30
30
|
import { t as Q } from "./toString.CAY8lys2.js";
|
|
31
|
-
import { C as ee } from "./icon-button.
|
|
32
|
-
import { C as
|
|
33
|
-
import { a as
|
|
31
|
+
import { C as ee } from "./icon-button.DO6DHXwo.js";
|
|
32
|
+
import { C as ae } from "./image.Cx4hbc4L.js";
|
|
33
|
+
import { a as te } from "./asset.Ci6rP56l.js";
|
|
34
34
|
import { a as ie } from "./index.Cpamj0jB.js";
|
|
35
35
|
import { A as g } from "./content-builder.OsUmm8Wu.js";
|
|
36
|
-
import { b as ne, t as
|
|
36
|
+
import { b as ne, t as w } from "./string.DUgD4c9f.js";
|
|
37
37
|
import { t as se } from "./toast.D3AW3RWv.js";
|
|
38
|
-
var C,
|
|
38
|
+
var C, I;
|
|
39
39
|
function re() {
|
|
40
|
-
return
|
|
40
|
+
return I || (I = 1, C = {
|
|
41
41
|
aa: {
|
|
42
42
|
name: "Afar",
|
|
43
43
|
nativeName: "Afaraf"
|
|
@@ -776,15 +776,15 @@ var A, $;
|
|
|
776
776
|
function oe() {
|
|
777
777
|
if ($) return A;
|
|
778
778
|
$ = 1;
|
|
779
|
-
const e = re(),
|
|
779
|
+
const e = re(), a = {}, t = {}, i = [], s = [], p = [];
|
|
780
780
|
for (const d in e) {
|
|
781
781
|
const { name: m, nativeName: h } = e[d];
|
|
782
|
-
|
|
782
|
+
a[d] = t[m.toLowerCase()] = t[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({},
|
|
787
|
+
(h) => f.validate(h) ? Object.assign({}, a[h]) : { code: h, name: "", nativeName: "" }
|
|
788
788
|
);
|
|
789
789
|
}
|
|
790
790
|
static getName(m) {
|
|
@@ -800,7 +800,7 @@ function oe() {
|
|
|
800
800
|
return p.slice();
|
|
801
801
|
}
|
|
802
802
|
static getCode(m) {
|
|
803
|
-
return m = m.toLowerCase(),
|
|
803
|
+
return m = m.toLowerCase(), t.hasOwnProperty(m) ? t[m].code : "";
|
|
804
804
|
}
|
|
805
805
|
static getAllCodes() {
|
|
806
806
|
return i.slice();
|
|
@@ -814,18 +814,18 @@ var le = oe();
|
|
|
814
814
|
const me = /* @__PURE__ */ J(le);
|
|
815
815
|
var ce = 0;
|
|
816
816
|
function de(e) {
|
|
817
|
-
var
|
|
818
|
-
return Q(e) +
|
|
817
|
+
var a = ++ce;
|
|
818
|
+
return Q(e) + a;
|
|
819
819
|
}
|
|
820
|
-
const pe = z`:host{isolation:isolate}.asset-picker__input[data-user-invalid]~.asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color)}.asset-picker__input[data-user-invalid]:focus-within~.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-
|
|
821
|
-
var ue = Object.defineProperty, he = Object.getOwnPropertyDescriptor, u = (e,
|
|
822
|
-
for (var s = i > 1 ? void 0 : i ? he(
|
|
823
|
-
(d = e[p]) && (s = (i ? d(
|
|
824
|
-
return i && s && ue(
|
|
820
|
+
const pe = z`: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{flex:1;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 ue = Object.defineProperty, he = Object.getOwnPropertyDescriptor, u = (e, a, t, i) => {
|
|
822
|
+
for (var s = i > 1 ? void 0 : i ? he(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 && ue(a, t, s), s;
|
|
825
825
|
};
|
|
826
826
|
let c = class extends T {
|
|
827
827
|
constructor() {
|
|
828
|
-
super(...arguments), this.localize = new D(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 =
|
|
828
|
+
super(...arguments), this.localize = new D(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 = te;
|
|
829
829
|
}
|
|
830
830
|
async handleRequestAssetClick() {
|
|
831
831
|
if (this.onRequestAsset)
|
|
@@ -841,21 +841,21 @@ let c = class extends T {
|
|
|
841
841
|
this.accepts
|
|
842
842
|
);
|
|
843
843
|
if (this.accepts.length > 0 && Object.values(e).some(
|
|
844
|
-
(
|
|
844
|
+
(t) => !this.accepts.includes(ne(t.src) ?? "")
|
|
845
845
|
))
|
|
846
846
|
se(this.localize.term("nonAcceptedExtension", this.accepts), {
|
|
847
847
|
notificationType: "warning"
|
|
848
848
|
});
|
|
849
849
|
else if (this.multiple) {
|
|
850
|
-
const
|
|
850
|
+
const t = Object.values(e);
|
|
851
851
|
this.emit("cx-content-builder-asset-select", {
|
|
852
|
-
detail:
|
|
852
|
+
detail: t
|
|
853
853
|
});
|
|
854
854
|
} else {
|
|
855
|
-
const { extension:
|
|
855
|
+
const { extension: t, id: i, identifier: s, name: p, representative: d, src: m, type: h } = e;
|
|
856
856
|
this.emit("cx-content-builder-asset-select", {
|
|
857
857
|
detail: {
|
|
858
|
-
extension:
|
|
858
|
+
extension: t,
|
|
859
859
|
id: i,
|
|
860
860
|
identifier: s,
|
|
861
861
|
name: p,
|
|
@@ -885,12 +885,12 @@ let c = class extends T {
|
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
887
887
|
try {
|
|
888
|
-
const
|
|
888
|
+
const a = (await this.apiGetAssets({
|
|
889
889
|
extraFields: ["path_TR1"],
|
|
890
890
|
getPermanentAssetsPaths: !0,
|
|
891
891
|
recordIds: [this.recordId]
|
|
892
892
|
})).items[0];
|
|
893
|
-
this.previewSrc =
|
|
893
|
+
this.previewSrc = a?.path_TR1 || a?.originalUrl || "";
|
|
894
894
|
} catch {
|
|
895
895
|
this.previewSrc = "";
|
|
896
896
|
}
|
|
@@ -906,10 +906,10 @@ let c = class extends T {
|
|
|
906
906
|
if ((this.previewSrc || this.value) && this.acceptsType(g.Image))
|
|
907
907
|
return l`<cx-image part="image" class="asset-picker__image" src=${this.previewSrc || this.value} alt=${this.name} width="200px" object-fit=${ie.Cover}></cx-image>`;
|
|
908
908
|
if (this.name && this.acceptsType(g.Audio) || this.acceptsType(g.Video))
|
|
909
|
-
return l`<cx-typography variant="body-2">${
|
|
909
|
+
return l`<cx-typography variant="body-2">${w(this.name, 30, 11, 11)}</cx-typography>`;
|
|
910
910
|
if (this.name && (this.acceptsType(g.Other) || this.acceptsType(g.All))) {
|
|
911
911
|
const e = this.name.split(",");
|
|
912
|
-
return l`<cx-typography variant="body-2">${
|
|
912
|
+
return l`<cx-typography variant="body-2">${w(e[0], 30, 11, 11)}
|
|
913
913
|
${N(
|
|
914
914
|
e.length > 1,
|
|
915
915
|
() => l` ${this.localize.term("andOthers", e.length - 1)}`
|
|
@@ -921,7 +921,7 @@ let c = class extends T {
|
|
|
921
921
|
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()}
|
|
922
922
|
${N(
|
|
923
923
|
!this.disabled,
|
|
924
|
-
() => l`<div 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><cx-button part="button" class="asset-picker__button"
|
|
924
|
+
() => l`<div 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(
|
|
925
925
|
this.value,
|
|
926
926
|
() => l`<cx-icon-button label=${this.localize.term("delete")} name="delete" @click=${this.handleDeleteClick}></cx-icon-button>`
|
|
927
927
|
)}
|
|
@@ -931,11 +931,11 @@ let c = class extends T {
|
|
|
931
931
|
};
|
|
932
932
|
c.styles = [L, pe];
|
|
933
933
|
c.dependencies = {
|
|
934
|
-
"cx-button":
|
|
934
|
+
"cx-button": _,
|
|
935
935
|
"cx-icon-button": ee,
|
|
936
|
-
"cx-image":
|
|
937
|
-
"cx-input":
|
|
938
|
-
"cx-space":
|
|
936
|
+
"cx-image": ae,
|
|
937
|
+
"cx-input": k,
|
|
938
|
+
"cx-space": S,
|
|
939
939
|
"cx-typography": E
|
|
940
940
|
};
|
|
941
941
|
u([
|
|
@@ -953,7 +953,7 @@ u([
|
|
|
953
953
|
u([
|
|
954
954
|
o({
|
|
955
955
|
converter: {
|
|
956
|
-
fromAttribute: (e) => (e ?? "").split(" ").filter((
|
|
956
|
+
fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
|
|
957
957
|
toAttribute: (e) => e.join(" ")
|
|
958
958
|
},
|
|
959
959
|
reflect: !0
|
|
@@ -965,7 +965,7 @@ u([
|
|
|
965
965
|
u([
|
|
966
966
|
o({
|
|
967
967
|
converter: {
|
|
968
|
-
fromAttribute: (e) => (e ?? "").split(" ").filter((
|
|
968
|
+
fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
|
|
969
969
|
toAttribute: (e) => e.join(" ")
|
|
970
970
|
},
|
|
971
971
|
reflect: !0
|
|
@@ -996,10 +996,10 @@ c = u([
|
|
|
996
996
|
M("cx-asset-picker")
|
|
997
997
|
], c);
|
|
998
998
|
const ve = z`: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 ge = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, r = (e,
|
|
1000
|
-
for (var s = i > 1 ? void 0 : i ? Ne(
|
|
1001
|
-
(d = e[p]) && (s = (i ? d(
|
|
1002
|
-
return i && s && ge(
|
|
999
|
+
var ge = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, r = (e, a, t, i) => {
|
|
1000
|
+
for (var s = i > 1 ? void 0 : i ? Ne(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 && ge(a, t, s), s;
|
|
1003
1003
|
};
|
|
1004
1004
|
const be = {
|
|
1005
1005
|
resizable: !1
|
|
@@ -1054,15 +1054,15 @@ let n = class extends T {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
handleEditedItemChange() {
|
|
1056
1056
|
const e = {};
|
|
1057
|
-
for (const
|
|
1058
|
-
e[
|
|
1059
|
-
this.sortedEntries = Object.entries(this.editedItem || {}).filter(([
|
|
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));
|
|
1060
1060
|
}
|
|
1061
1061
|
handleTableActions(e) {
|
|
1062
|
-
const { name:
|
|
1062
|
+
const { name: a, row: t } = e.detail, i = "component" in t ? t.component : t;
|
|
1063
1063
|
if (i) {
|
|
1064
1064
|
if (this.useEvents) {
|
|
1065
|
-
this.emit(`cx-list-editor-${
|
|
1065
|
+
this.emit(`cx-list-editor-${a}`, {
|
|
1066
1066
|
detail: {
|
|
1067
1067
|
index: i.getIndex(),
|
|
1068
1068
|
item: i.getData()
|
|
@@ -1070,7 +1070,7 @@ let n = class extends T {
|
|
|
1070
1070
|
});
|
|
1071
1071
|
return;
|
|
1072
1072
|
}
|
|
1073
|
-
|
|
1073
|
+
a === "edit" ? this.editedItem = i.getData() : a === "delete" && this.emit("cx-list-editor-change", {
|
|
1074
1074
|
detail: {
|
|
1075
1075
|
data: this.data.filter((s) => s.id !== i.getData().id)
|
|
1076
1076
|
}
|
|
@@ -1096,16 +1096,16 @@ let n = class extends T {
|
|
|
1096
1096
|
handleSaveClick() {
|
|
1097
1097
|
if (this.editedItem) {
|
|
1098
1098
|
const e = this.data.findIndex(
|
|
1099
|
-
(
|
|
1099
|
+
(t) => t.id === this.editedItem.id
|
|
1100
1100
|
);
|
|
1101
1101
|
if (!this.isAdding && e === -1) {
|
|
1102
1102
|
this.editedItem = null;
|
|
1103
1103
|
return;
|
|
1104
1104
|
}
|
|
1105
|
-
let
|
|
1106
|
-
this.isAdding ?
|
|
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", {
|
|
1107
1107
|
detail: {
|
|
1108
|
-
data:
|
|
1108
|
+
data: a
|
|
1109
1109
|
}
|
|
1110
1110
|
}), this.editedItem = null, this.isAdding = !1;
|
|
1111
1111
|
}
|
|
@@ -1124,55 +1124,55 @@ let n = class extends T {
|
|
|
1124
1124
|
if (await this.updateComplete, !this.table)
|
|
1125
1125
|
return;
|
|
1126
1126
|
if (!this.loadingItemIndex) {
|
|
1127
|
-
this.table.tabulatorInstance?.getRows().forEach((
|
|
1128
|
-
const i =
|
|
1129
|
-
|
|
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));
|
|
1130
1130
|
});
|
|
1131
1131
|
return;
|
|
1132
1132
|
}
|
|
1133
1133
|
const e = this.table.tabulatorInstance?.getRow(this.loadingItemIndex);
|
|
1134
1134
|
if (!e || !e?._row?.hoverMenuElement)
|
|
1135
1135
|
return;
|
|
1136
|
-
const
|
|
1137
|
-
|
|
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));
|
|
1138
1138
|
}
|
|
1139
1139
|
handleChange(e) {
|
|
1140
1140
|
if (!e.target)
|
|
1141
1141
|
return;
|
|
1142
|
-
const
|
|
1143
|
-
if (!
|
|
1142
|
+
const a = e.target, t = a.dataset.id;
|
|
1143
|
+
if (!t)
|
|
1144
1144
|
return;
|
|
1145
|
-
let i =
|
|
1145
|
+
let i = a.value;
|
|
1146
1146
|
Array.isArray(i) ? i = i.join(" ") : i = String(i), this.editedItem = {
|
|
1147
1147
|
...this.editedItem,
|
|
1148
|
-
[
|
|
1148
|
+
[t]: i
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
1151
|
renderControls(e) {
|
|
1152
1152
|
if (e === "translation") {
|
|
1153
|
-
const
|
|
1153
|
+
const a = l`
|
|
1154
1154
|
${x(
|
|
1155
1155
|
this.translatableControls,
|
|
1156
|
-
(
|
|
1157
|
-
(
|
|
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">${Z(this.supportedLanguages, (i) => {
|
|
1158
1158
|
const s = this.localize.languageName(i) || me.getName(i) || i, p = (d) => {
|
|
1159
1159
|
const m = d.target.value;
|
|
1160
1160
|
this.editedItem = {
|
|
1161
1161
|
...this.editedItem,
|
|
1162
|
-
[`${
|
|
1162
|
+
[`${t.field}-${i}`]: m
|
|
1163
1163
|
};
|
|
1164
1164
|
};
|
|
1165
|
-
return l`<cx-input ?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()} label=${s} value=${this.editedItem?.[`${
|
|
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>`;
|
|
1166
1166
|
})}</cx-space></cx-grid-item></cx-grid>`
|
|
1167
1167
|
)}
|
|
1168
1168
|
`;
|
|
1169
|
-
return l`<cx-space direction="vertical" wrap="nowrap">${
|
|
1169
|
+
return l`<cx-space direction="vertical" wrap="nowrap">${a}</cx-space>`;
|
|
1170
1170
|
}
|
|
1171
1171
|
return l`<cx-grid columns="3" spacing="var(--cx-spacing-small)" wrap="wrap">${x(
|
|
1172
1172
|
this.sortedEntries,
|
|
1173
|
-
([
|
|
1174
|
-
([
|
|
1175
|
-
this.columnsMap[
|
|
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">${X(
|
|
1175
|
+
this.columnsMap[a].controlType,
|
|
1176
1176
|
[
|
|
1177
1177
|
[
|
|
1178
1178
|
"image-picker",
|
|
@@ -1183,37 +1183,37 @@ let n = class extends T {
|
|
|
1183
1183
|
const { id: d, src: m } = p.detail;
|
|
1184
1184
|
this.editedItem = {
|
|
1185
1185
|
...this.editedItem,
|
|
1186
|
-
[
|
|
1186
|
+
[a]: m,
|
|
1187
1187
|
recordId: d
|
|
1188
1188
|
};
|
|
1189
1189
|
}, s = async () => {
|
|
1190
1190
|
this.editedItem = {
|
|
1191
1191
|
...this.editedItem,
|
|
1192
|
-
[
|
|
1192
|
+
[a]: "",
|
|
1193
1193
|
recordId: ""
|
|
1194
1194
|
};
|
|
1195
1195
|
};
|
|
1196
|
-
return l`<cx-asset-picker value=${
|
|
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>`;
|
|
1197
1197
|
}
|
|
1198
1198
|
],
|
|
1199
1199
|
[
|
|
1200
1200
|
"radio-group",
|
|
1201
|
-
() => l`<cx-radio-group data-id=${
|
|
1202
|
-
this.columnsMap[
|
|
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 ?? [],
|
|
1203
1203
|
(i) => i.value,
|
|
1204
1204
|
(i) => l`<cx-radio value=${i.value}>${i.name}</cx-radio>`
|
|
1205
1205
|
)}</cx-radio-group>`
|
|
1206
1206
|
],
|
|
1207
1207
|
[
|
|
1208
1208
|
"select",
|
|
1209
|
-
() => this.columnsMap[
|
|
1210
|
-
this.columnsMap[
|
|
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 ?? [],
|
|
1211
1211
|
(i) => i.value,
|
|
1212
1212
|
(i) => l`<cx-option value=${i.value}>${i.name}</cx-option>`
|
|
1213
1213
|
)}</cx-select>`
|
|
1214
1214
|
]
|
|
1215
1215
|
],
|
|
1216
|
-
() => l`<cx-input data-id=${
|
|
1216
|
+
() => l`<cx-input data-id=${a} value=${t} @cx-change=${this.handleChange}></cx-input>`
|
|
1217
1217
|
)}</cx-grid-item>`
|
|
1218
1218
|
)}</cx-grid>`;
|
|
1219
1219
|
}
|
|
@@ -1241,18 +1241,18 @@ let n = class extends T {
|
|
|
1241
1241
|
n.styles = [L, ve];
|
|
1242
1242
|
n.dependencies = {
|
|
1243
1243
|
"cx-asset-picker": c,
|
|
1244
|
-
"cx-button":
|
|
1244
|
+
"cx-button": _,
|
|
1245
1245
|
"cx-dialog": O,
|
|
1246
1246
|
"cx-dynamic-select": V,
|
|
1247
1247
|
"cx-grid": G,
|
|
1248
1248
|
"cx-grid-item": R,
|
|
1249
|
-
"cx-input":
|
|
1249
|
+
"cx-input": k,
|
|
1250
1250
|
"cx-line-clamp": j,
|
|
1251
1251
|
"cx-option": P,
|
|
1252
1252
|
"cx-radio": F,
|
|
1253
1253
|
"cx-radio-group": B,
|
|
1254
1254
|
"cx-select": K,
|
|
1255
|
-
"cx-space":
|
|
1255
|
+
"cx-space": S,
|
|
1256
1256
|
"cx-table": U,
|
|
1257
1257
|
"cx-typography": E
|
|
1258
1258
|
};
|
|
@@ -1267,8 +1267,8 @@ r([
|
|
|
1267
1267
|
converter: {
|
|
1268
1268
|
fromAttribute: (e) => {
|
|
1269
1269
|
try {
|
|
1270
|
-
const
|
|
1271
|
-
return Array.isArray(
|
|
1270
|
+
const a = JSON.parse(e);
|
|
1271
|
+
return Array.isArray(a) ? a : [];
|
|
1272
1272
|
} catch {
|
|
1273
1273
|
return [];
|
|
1274
1274
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as s, C as x } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as m } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as v } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as g } from "./i18n.
|
|
4
|
+
import { L as g } from "./i18n.BcD4Ohsq.js";
|
|
5
5
|
import { w as d } from "./watch.CThbualB.js";
|
|
6
6
|
import { i as b, x as h } from "./lit-element.jLBm65_O.js";
|
|
7
7
|
import { r as f } from "./state.CSDxrqLd.js";
|
|
8
8
|
import { e as _ } from "./query.BBf1UFkC.js";
|
|
9
9
|
import { e as y } from "./class-map.BiVq-cVR.js";
|
|
10
10
|
import { n as u } from "./when.Dr1es41R.js";
|
|
11
|
-
import k from "
|
|
11
|
+
import { C as k } from "./icon.DnBh6-56.js";
|
|
12
12
|
import w from "../components/space.js";
|
|
13
13
|
var r = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t))(r || {});
|
|
14
14
|
const C = b`:host{-webkit-user-select:none;user-select:none;display:block}:host(:focus){outline:none}.option{font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--option-font-weight,var(--cx-font-weight-regular));line-height:var(--cx-line-height-large);letter-spacing:var(--cx-letter-spacing-normal);color:var(--option-color,var(--cx-color-neutral-700));padding:var(--cx-spacing-x-small) var(--cx-spacing-medium) var(--cx-spacing-x-small) var(--cx-spacing-x-small);transition:var(--cx-transition-fast) fill;cursor:pointer;align-items:center;display:flex;position:relative}.option:not(.option--show-check){padding-inline:var(--cx-spacing-small)}.option--hover:not(.option--current):not(.option--disabled){background-color:var(--cx-menu-item-background-color-hover)}.option--current,.option--current.option--disabled{background-color:var(--cx-menu-item-background-color-hover);opacity:1}.option--selected{color:var(--option-selected-color,var(--cx-color-primary));font-weight:var(--option-selected-font-weight,var(--cx-font-weight-regular))}.option--disabled{opacity:.5;cursor:default;outline:none}.option__content{flex:1}.option__label{line-height:var(--cx-line-height-medium);flex:auto;display:inline-block}.option .option__check{visibility:hidden;flex:none;justify-content:center;align-items:center;padding-inline-end:var(--cx-spacing-2x-small);display:none}.option--show-check .option__check{display:block}.option--show-check.option--selected .option__check{visibility:visible}.option__help-text{color:var(--option-help-text-color,var(--cx-color-neutral-600));font-weight:var(--option-help-text-font-weight,var(--cx-font-weight-regular))}.option--selected .option__content .option__help-text{color:var(--option-selected-help-text-color,var(--cx-color-primary));font-weight:var(--option-selected-help-text-font-weight,var(--cx-font-weight-regular))}.option__prefix,.option__suffix{flex:none;align-items:center;display:flex}.option__prefix::slotted(*){margin-inline-end:var(--cx-spacing-x-small)}.option__suffix::slotted(*){margin-inline-start:var(--cx-spacing-x-small)}.option__prefix{align-self:var(--prefix-alignment,center)}.option__suffix{align-self:var(--suffix-alignment,center)}.option__check{align-self:var(--check-alignment,center)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline-offset:-1px;outline:1px dashed selecteditem}}`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import b from "../components/space.js";
|
|
2
2
|
import { n as o, C as _ } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
|
-
import { C as P, I as y } from "./icon-button.
|
|
3
|
+
import { C as P, I as y } from "./icon-button.DO6DHXwo.js";
|
|
4
4
|
import { c as f } from "./custom-element.L4WJXn1j.js";
|
|
5
|
-
import { L as z } from "./i18n.
|
|
5
|
+
import { L as z } from "./i18n.BcD4Ohsq.js";
|
|
6
6
|
import { c as m } from "./math.DqTA6ya4.js";
|
|
7
7
|
import { w as d } from "./watch.CThbualB.js";
|
|
8
8
|
import { i as C, x as s } from "./lit-element.jLBm65_O.js";
|
|
@@ -10,9 +10,9 @@ import { r as S } from "./state.CSDxrqLd.js";
|
|
|
10
10
|
import { e as $ } from "./class-map.BiVq-cVR.js";
|
|
11
11
|
import { c as x } from "./repeat.DbF2p5ae.js";
|
|
12
12
|
import { n as g } from "./when.Dr1es41R.js";
|
|
13
|
-
import { C as w } from "./button.
|
|
14
|
-
import v from "
|
|
15
|
-
import { C as I } from "./option.
|
|
13
|
+
import { C as w } from "./button.BvBgxmvw.js";
|
|
14
|
+
import { C as v } from "./input.B7SaYNrr.js";
|
|
15
|
+
import { C as I } from "./option.CA-HtVdP.js";
|
|
16
16
|
import B from "../components/select.js";
|
|
17
17
|
import N from "../components/tooltip.js";
|
|
18
18
|
import { C as k } from "./typography.DJC_UXgs.js";
|
|
@@ -2,7 +2,7 @@ import In from "../components/resize-observer.js";
|
|
|
2
2
|
import { n as wt, C as Fn } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import { c as Ln } from "./component.styles.CRO4Odto.js";
|
|
4
4
|
import { c as $n } from "./custom-element.L4WJXn1j.js";
|
|
5
|
-
import { L as Nn } from "./i18n.
|
|
5
|
+
import { L as Nn } from "./i18n.BcD4Ohsq.js";
|
|
6
6
|
import { s as Zi } from "./scroll.xtO5yojm.js";
|
|
7
7
|
import { w as ft } from "./watch.CThbualB.js";
|
|
8
8
|
import { i as Bn } from "./dom.0RpWet6y.js";
|
|
@@ -17,9 +17,9 @@ import { i as Ji } from "./guard.D4axKaMo.js";
|
|
|
17
17
|
import { o as tr } from "./map.D8heArFD.js";
|
|
18
18
|
import { o as Ue } from "./style-map.llVFPd__.js";
|
|
19
19
|
import { n as Pe } from "./when.Dr1es41R.js";
|
|
20
|
-
import { C as Yn } from "./button.
|
|
20
|
+
import { C as Yn } from "./button.BvBgxmvw.js";
|
|
21
21
|
import Xn from "../components/dropdown.js";
|
|
22
|
-
import { C as qn } from "./icon-button.
|
|
22
|
+
import { C as qn } from "./icon-button.DO6DHXwo.js";
|
|
23
23
|
import Gn from "../components/menu.js";
|
|
24
24
|
import Kn from "../components/menu-item.js";
|
|
25
25
|
import jn from "../components/tab.js";
|