@orangelogic/design-system 3.10.0 → 3.11.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-link-format.BLKOUD2l.js → asset-link-format.CxDu37Om.js} +591 -588
- package/library/chunks/{button.w0zH5Ivx.js → button.-Jl_NdgM.js} +1 -1
- package/library/chunks/{color-swatch-group.Bvq6xkM-.js → color-swatch-group.DGPlxYsp.js} +8 -8
- package/library/chunks/{color-swatch.Caved2kL.js → color-swatch.Dc-IqxsX.js} +1 -1
- package/library/chunks/{confirm-popover.BpYjy5nJ.js → confirm-popover.mgYIjZdo.js} +3 -3
- package/library/chunks/{dialog.ICoCAj6Z.js → dialog.YFc-HBc5.js} +2 -2
- package/library/chunks/{document-viewer.CRMRT7Ou.js → document-viewer.DhJ4jBNe.js} +6 -6
- package/library/chunks/{dot-pagination.CzVpiv00.js → dot-pagination.BgETAL2j.js} +1 -1
- package/library/chunks/{folder-select.CP0NPc0S.js → folder-select.Hl51n0ge.js} +4 -4
- package/library/chunks/{header.BQg_JjHw.js → header.BeZml2NV.js} +2 -2
- package/library/chunks/{i18n.BA19xtyU.js → i18n.CNnI4-0K.js} +4 -0
- package/library/chunks/{icon-button.BWJ1Vqn5.js → icon-button.ENVA7x3u.js} +1 -1
- package/library/chunks/{iframe.Dm-nXSBv.js → iframe.Cgy_DE7W.js} +1 -1
- package/library/chunks/{image.BsLsWySo.js → image.1ufrCtW1.js} +1 -1
- package/library/chunks/{index.CExDr5Lh.js → index.BAJfz5QI.js} +584 -619
- package/library/chunks/{input.D1TGTsxj.js → input.BJ5LN8of.js} +1 -1
- package/library/chunks/{markdown.CnX2rNeb.js → markdown.CrIkpd0h.js} +2 -2
- package/library/chunks/{menu-item.uFqeX_J6.js → menu-item.DfsfX25P.js} +1 -1
- package/library/chunks/{option.jeaj7_Lr.js → option.B34is9Z5.js} +1 -1
- package/library/chunks/{pagination.DDW-Lw16.js → pagination.DMAcWRyI.js} +5 -5
- package/library/chunks/{tab-group.Dpj7Lx8_.js → tab-group.D14m1Kel.js} +4 -4
- package/library/chunks/{tree.DYFFjW1-.js → tree.BEFWro0D.js} +1 -1
- package/library/chunks/{types.CQDQXXnW.js → types.D0NvE1EB.js} +21492 -21290
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +15 -15
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- 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/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- 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 +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- 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 +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- 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/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- 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/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +328 -327
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-publish-page-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-publish-page-submit.d.ts +9 -0
- package/library/packages/events/src/cx-view-and-sort-action-click.d.ts +11 -0
- package/library/packages/events/src/events.d.ts +3 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/publish-page/publish-page.d.ts +169 -0
- package/library/packages/molecules/src/publish-page/publish-page.styles.d.ts +2 -0
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +11 -1
- package/library/packages/organisms/src/template-switcher/template-switcher-example.data.d.ts +1 -0
- package/library/packages/organisms/src/template-switcher/template-switcher.d.ts +3 -0
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/content-builder.d.ts +0 -5
- package/library/react-web-component.d.ts +116 -13
- package/library/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { C as Z } from "./typography.IqHbnd3C.js";
|
|
2
2
|
import { n as y, C as ee } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import { c as ae } from "./component.styles.CRO4Odto.js";
|
|
4
|
-
import { C as Ee, s as ve, F as Q, a as Ce } from "./folder-select.
|
|
5
|
-
import { f as U, S as n1, E as
|
|
4
|
+
import { C as Ee, s as ve, F as Q, a as Ce } from "./folder-select.Hl51n0ge.js";
|
|
5
|
+
import { f as U, S as n1, E as le } from "./transformation.D27sTUdZ.js";
|
|
6
6
|
import { c as ie } from "./custom-element.L4WJXn1j.js";
|
|
7
|
-
import { L as W } from "./i18n.
|
|
7
|
+
import { L as W } from "./i18n.CNnI4-0K.js";
|
|
8
8
|
import { w as O } from "./watch.DJF5K-8U.js";
|
|
9
9
|
import { B as m1, E as ue, i as te, x as h } from "./lit-element.jLBm65_O.js";
|
|
10
10
|
import { r as u } from "./state.CSDxrqLd.js";
|
|
11
|
-
import { e as
|
|
11
|
+
import { e as M } from "./query.BBf1UFkC.js";
|
|
12
12
|
import { b as Ke } from "./_baseIteratee.sC2wLi2m.js";
|
|
13
13
|
import { a as c1 } from "./toString.B1zKIiZc.js";
|
|
14
14
|
import { b as d1 } from "./cloneDeep.tKGbEwzn.js";
|
|
15
15
|
import { c as s1 } from "./_baseClone.ipmFlCAx.js";
|
|
16
|
-
import { I as je, C as Ve, a as o1, b as He, S as z, D as h1, c as
|
|
17
|
-
import { C as ce } from "./button.
|
|
18
|
-
import
|
|
19
|
-
import
|
|
16
|
+
import { I as je, C as Ve, a as o1, b as He, S as z, D as h1, c as g1, A as Ie, g as l1, i as C1, F as y1, d as x1, t as b1, e as k1, f as p1, h as u1, j as f1, k as A1, l as B1, m as D1, n as F1, o as E1, p as v1, q as $1, r as w1, O as S1 } from "./types.D0NvE1EB.js";
|
|
17
|
+
import { C as ce } from "./button.-Jl_NdgM.js";
|
|
18
|
+
import _1 from "../components/button-group.js";
|
|
19
|
+
import I1 from "../components/card.js";
|
|
20
20
|
import Ue from "../components/checkbox.js";
|
|
21
|
-
import { C as se, D as fe, O as We, a as P1, H as T1, z as R1, o as z1 } from "./dialog.
|
|
21
|
+
import { C as se, D as fe, O as We, a as P1, H as T1, z as R1, o as z1 } from "./dialog.YFc-HBc5.js";
|
|
22
22
|
import Je from "../components/divider.js";
|
|
23
|
-
import
|
|
23
|
+
import L1 from "../components/dropdown.js";
|
|
24
24
|
import $e from "../components/grid.js";
|
|
25
25
|
import we from "../components/grid-item.js";
|
|
26
|
-
import { C as
|
|
27
|
-
import { C as oe } from "./input.
|
|
26
|
+
import { C as q1 } from "./icon.CpHbi8tH.js";
|
|
27
|
+
import { C as oe } from "./input.BJ5LN8of.js";
|
|
28
28
|
import O1 from "../components/line-clamp.js";
|
|
29
|
-
import
|
|
30
|
-
import { C as
|
|
31
|
-
import { C as
|
|
32
|
-
import
|
|
29
|
+
import M1 from "../components/menu.js";
|
|
30
|
+
import { C as N1 } from "./menu-item.DfsfX25P.js";
|
|
31
|
+
import { C as Ye, a as G1 } from "./option.B34is9Z5.js";
|
|
32
|
+
import Xe from "../components/radio.js";
|
|
33
33
|
import K1 from "../components/radio-card.js";
|
|
34
34
|
import Qe from "../components/radio-group.js";
|
|
35
35
|
import Se from "../components/select.js";
|
|
36
36
|
import de from "../components/space.js";
|
|
37
37
|
import j1 from "../components/switch.js";
|
|
38
38
|
import V1 from "../components/tab.js";
|
|
39
|
-
import { C as H1 } from "./tab-group.
|
|
39
|
+
import { C as H1 } from "./tab-group.D14m1Kel.js";
|
|
40
40
|
import U1 from "../components/tab-panel.js";
|
|
41
41
|
import W1 from "../components/textarea.js";
|
|
42
42
|
import J1 from "../components/tooltip.js";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
43
|
+
import Y1 from "../components/visually-hidden.js";
|
|
44
|
+
import X1 from "../components/bicolor-picker.js";
|
|
45
45
|
import Q1 from "../components/border-input-group.js";
|
|
46
|
-
import { C as Z1, a as e0 } from "./confirm-popover.
|
|
46
|
+
import { C as Z1, a as e0 } from "./confirm-popover.mgYIjZdo.js";
|
|
47
47
|
import a0 from "../components/corner-position-input-group.js";
|
|
48
48
|
import Ze from "../components/dynamic-select.js";
|
|
49
49
|
import i0 from "../components/padding-input-group.js";
|
|
@@ -54,23 +54,23 @@ import { isFormInteracted as m0 } from "../utils.js";
|
|
|
54
54
|
import { e as c0, i as d0 } from "./directive.oAbCiebi.js";
|
|
55
55
|
import { e as Pe, p as Te, m as Re, s as ze, h as s0, l as o0 } from "./directive-helpers.DEDMV45_.js";
|
|
56
56
|
import { i as h0 } from "./keyed.DdOUTIg-.js";
|
|
57
|
-
import { c as
|
|
58
|
-
import { n as
|
|
59
|
-
import { a as
|
|
60
|
-
import { a as
|
|
57
|
+
import { c as N } from "./repeat.CFjcER6_.js";
|
|
58
|
+
import { n as v } from "./when.Dr1es41R.js";
|
|
59
|
+
import { a as g0 } from "./_baseXor.DixEm6JQ.js";
|
|
60
|
+
import { a as l0, i as Le, b as C0 } from "./isArrayLikeObject.D7afXo-f.js";
|
|
61
61
|
import { i as y0 } from "./isEmpty.DtTJTUcf.js";
|
|
62
|
-
import { a as Ae, F as x0, b as b0, c as
|
|
62
|
+
import { a as Ae, F as x0, b as b0, c as qe, d as Oe, i as k0, e as Me, u as Be } from "./asset-link-format.CxDu37Om.js";
|
|
63
63
|
import p0 from "../components/color-picker.js";
|
|
64
|
-
import { C as
|
|
64
|
+
import { C as _e } from "./icon-button.ENVA7x3u.js";
|
|
65
65
|
import u0 from "../components/spinner.js";
|
|
66
|
-
import { a as f0, d as A0 } from "./color-swatch-group.
|
|
66
|
+
import { a as f0, d as A0 } from "./color-swatch-group.DGPlxYsp.js";
|
|
67
67
|
import { c as ne, C as me, p as B0, a as D0, b as F0, g as ye } from "./color.LzSGBy7o.js";
|
|
68
68
|
import { o as e1 } from "./map.D8heArFD.js";
|
|
69
69
|
import { v as a1 } from "./v4.CKZ6klMF.js";
|
|
70
70
|
import { M as i1 } from "./asset-link-format.ClaYu_v8.js";
|
|
71
71
|
import E0 from "../components/masonry.js";
|
|
72
|
-
import { a as
|
|
73
|
-
import { G as
|
|
72
|
+
import { a as ge } from "./index.Cpamj0jB.js";
|
|
73
|
+
import { G as L } from "./string.Demn8Xmk.js";
|
|
74
74
|
import { d as v0 } from "./default-value.COZopaet.js";
|
|
75
75
|
import { F as $0 } from "./form.C8LMdQB4.js";
|
|
76
76
|
import { o as De } from "./style-map.llVFPd__.js";
|
|
@@ -78,12 +78,12 @@ import { r as Fe } from "./choose.BTbF6BAn.js";
|
|
|
78
78
|
import { o as P } from "./if-defined.BRoBj_Rp.js";
|
|
79
79
|
import { t as w0 } from "./url.CGdWC06g.js";
|
|
80
80
|
import { e as S0 } from "./number.Cx2ncfJJ.js";
|
|
81
|
-
import { e as
|
|
81
|
+
import { e as _0 } from "./class-map.BiVq-cVR.js";
|
|
82
82
|
import { n as xe, e as be } from "./ref.DktKp7fP.js";
|
|
83
|
-
var
|
|
83
|
+
var I0 = "Expected a function";
|
|
84
84
|
function P0(e) {
|
|
85
85
|
if (typeof e != "function")
|
|
86
|
-
throw new TypeError(
|
|
86
|
+
throw new TypeError(I0);
|
|
87
87
|
return function() {
|
|
88
88
|
var a = arguments;
|
|
89
89
|
switch (a.length) {
|
|
@@ -117,7 +117,7 @@ function R0(e, a) {
|
|
|
117
117
|
* Copyright 2017 Google LLC
|
|
118
118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
119
|
*/
|
|
120
|
-
const
|
|
120
|
+
const Ne = (e) => o0(e) ? e._$litType$.h : e.strings, z0 = c0(class extends d0 {
|
|
121
121
|
constructor(e) {
|
|
122
122
|
super(e), this.et = /* @__PURE__ */ new WeakMap();
|
|
123
123
|
}
|
|
@@ -125,7 +125,7 @@ const Me = (e) => o0(e) ? e._$litType$.h : e.strings, z0 = c0(class extends d0 {
|
|
|
125
125
|
return [e];
|
|
126
126
|
}
|
|
127
127
|
update(e, [a]) {
|
|
128
|
-
const n = Pe(this.it) ?
|
|
128
|
+
const n = Pe(this.it) ? Ne(this.it) : null, t = Pe(a) ? Ne(a) : null;
|
|
129
129
|
if (n !== null && (t === null || n !== t)) {
|
|
130
130
|
const r = Te(e).pop();
|
|
131
131
|
let i = this.et.get(n);
|
|
@@ -148,10 +148,10 @@ const Me = (e) => o0(e) ? e._$litType$.h : e.strings, z0 = c0(class extends d0 {
|
|
|
148
148
|
return this.render(a);
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
var
|
|
152
|
-
return
|
|
151
|
+
var L0 = l0(function(e, a) {
|
|
152
|
+
return Le(e) ? g0(e, C0(a, 1, Le, !0)) : [];
|
|
153
153
|
});
|
|
154
|
-
const
|
|
154
|
+
const q0 = {
|
|
155
155
|
resizable: !1
|
|
156
156
|
}, O0 = (e) => [
|
|
157
157
|
{
|
|
@@ -216,7 +216,7 @@ const L0 = {
|
|
|
216
216
|
title: "PMS",
|
|
217
217
|
width: 75
|
|
218
218
|
}
|
|
219
|
-
],
|
|
219
|
+
], M0 = (e) => ({
|
|
220
220
|
data: [
|
|
221
221
|
{
|
|
222
222
|
icon: "create",
|
|
@@ -16833,15 +16833,15 @@ const L0 = {
|
|
|
16833
16833
|
name: "Mocha Mousse 17-1230 TCX",
|
|
16834
16834
|
rgb: [164, 120, 100]
|
|
16835
16835
|
}
|
|
16836
|
-
},
|
|
16837
|
-
var
|
|
16836
|
+
}, N0 = te`.color-swatch-picker__space{width:100%}.color-swatch-picker__dialog{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:640px}.color-swatch-picker__table{--group-row-background-color:transparent;--row-background-color:transparent;--row-even-background-color:transparent;--row-hover-background-color:var(--cx-color-neutral-50);--row-even-hover-background-color:var(--cx-color-neutral-50);--header-height:48px;--cell-line-height:35px;--cell-border-color:transparent;--cell-bottom-border-color:transparent;--cell-hover-background-color:transparent;--row-header-border-color:transparent;--cell-horizontal-padding:var(--cx-spacing-2x-small);--header-horizontal-padding:var(--cx-spacing-2x-small);--header-border-bottom:1px solid var(--cx-color-neutral-200);--hover-menu-background-color:var(--row-hover-background-color)}.color-swatch-picker__table::part(table){background-color:#0000}.color-swatch-group__table__copy-button::part(button){background:0 0;border-width:0;height:fit-content;min-height:fit-content;padding:0}.color-swatch-picker__loading-spinner{--track-width:4px;font-size:var(--cx-font-size-3x-large)}.color-swatch-picker__add-color-button{width:100px}`;
|
|
16837
|
+
var G0 = Object.defineProperty, K0 = Object.getOwnPropertyDescriptor, R = (e, a, n, t) => {
|
|
16838
16838
|
for (var r = t > 1 ? void 0 : t ? K0(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
16839
16839
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
16840
|
-
return t && r &&
|
|
16840
|
+
return t && r && G0(a, n, r), r;
|
|
16841
16841
|
};
|
|
16842
|
-
let
|
|
16842
|
+
let I = class extends ee {
|
|
16843
16843
|
constructor() {
|
|
16844
|
-
super(...arguments), this.localize = new W(this), this.translatedColumns = O0(this.localize), this.translatedHoverMenu =
|
|
16844
|
+
super(...arguments), this.localize = new W(this), this.translatedColumns = O0(this.localize), this.translatedHoverMenu = M0(this.localize), this.boundary = document.body, this.data = [], this.disableTableLoad = !1, this.supportedLanguages = ["en"], this.defaultLanguage = "en", this.dialogType = "add", this.dialogId = "", this.dialogName = "", this.dialogNameTranslations = {}, this.dialogPalette = "", this.dialogHex = "", this.dialogRgb = "", this.dialogCmyk = "", this.dialogPmsId = "", this.dialogColor = "", this.palettes = [];
|
|
16845
16845
|
}
|
|
16846
16846
|
get tabs() {
|
|
16847
16847
|
return this.supportedLanguages.length > 1 ? [
|
|
@@ -16974,7 +16974,7 @@ let _ = class extends ee {
|
|
|
16974
16974
|
renderControls(e) {
|
|
16975
16975
|
if (e === "translation") {
|
|
16976
16976
|
const a = h`
|
|
16977
|
-
${
|
|
16977
|
+
${N(
|
|
16978
16978
|
["name"],
|
|
16979
16979
|
(n) => n,
|
|
16980
16980
|
(n) => h`<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">${this.localize.term(n)}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${e1(this.supportedLanguages, (t) => {
|
|
@@ -16989,7 +16989,7 @@ let _ = class extends ee {
|
|
|
16989
16989
|
"colorNameWillAppearInSwatch"
|
|
16990
16990
|
)} @cx-change=${this.handleChangeName}></cx-input></cx-space></cx-grid-item></cx-grid><cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" row-spacing="0" wrap="wrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2" class="config-manager__label">${this.localize.term("palette")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-space direction="vertical" spacing="x-small" class="config-manager__row"><cx-select data-testid="palette-select" value=${this.dialogPalette} placeholder=${this.localize.term(
|
|
16991
16991
|
"chooseExistingPaletteOrCreateNew"
|
|
16992
|
-
)} no-option-text=${this.localize.term("createANewPalette")} @cx-change=${this.handleChangePalette} @cx-enter=${this.handleCreatePalette} @cx-blur=${this.handleCreatePalette}>${
|
|
16992
|
+
)} no-option-text=${this.localize.term("createANewPalette")} @cx-change=${this.handleChangePalette} @cx-enter=${this.handleCreatePalette} @cx-blur=${this.handleCreatePalette}>${N(
|
|
16993
16993
|
this.palettes,
|
|
16994
16994
|
(a) => a,
|
|
16995
16995
|
(a) => h`<cx-option value=${a.replaceAll(" ", "_")}>${a}</cx-option>`
|
|
@@ -17001,20 +17001,20 @@ let _ = class extends ee {
|
|
|
17001
17001
|
CMYK
|
|
17002
17002
|
</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-space direction="vertical" spacing="x-small" class="config-manager__row"><cx-input data-testid="cmyk-input" value=${this.dialogCmyk} placeholder=${this.localize.term("example", "75, 0, 80, 0")} @cx-change=${this.handleChangeCmyk}></cx-input></cx-space></cx-grid-item></cx-grid><cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" row-spacing="0" wrap="wrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2" class="config-manager__label">
|
|
17003
17003
|
PMS
|
|
17004
|
-
</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-space direction="vertical" spacing="x-small" class="config-manager__row"><cx-select data-testid="pms-select" value=${this.dialogPmsId} placeholder=${this.localize.term("pantoneMatchingSystemName")} @cx-change=${this.handleChangePms}>${
|
|
17004
|
+
</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-space direction="vertical" spacing="x-small" class="config-manager__row"><cx-select data-testid="pms-select" value=${this.dialogPmsId} placeholder=${this.localize.term("pantoneMatchingSystemName")} @cx-change=${this.handleChangePms}>${N(
|
|
17005
17005
|
Object.values(ke),
|
|
17006
17006
|
(a) => a.id,
|
|
17007
17007
|
(a) => h`<cx-option value=${a.id}>${a.name}</cx-option>`
|
|
17008
17008
|
)}</cx-select></cx-space></cx-grid-item></cx-grid></cx-space>`;
|
|
17009
17009
|
}
|
|
17010
17010
|
render() {
|
|
17011
|
-
return h`<cx-space part="base" spacing="medium" direction="vertical" class="color-swatch-picker">${
|
|
17011
|
+
return h`<cx-space part="base" spacing="medium" direction="vertical" class="color-swatch-picker">${v(
|
|
17012
17012
|
!this.disableTableLoad,
|
|
17013
|
-
() => h`<cx-table part="table" movable-rows class="color-swatch-picker__table" layout="fitColumns" .columns=${this.translatedColumns} .columnDefaults=${
|
|
17013
|
+
() => h`<cx-table part="table" movable-rows class="color-swatch-picker__table" layout="fitColumns" .columns=${this.translatedColumns} .columnDefaults=${q0} .hoverMenu=${this.translatedHoverMenu} .rowHeight=${40} .data=${this.data ?? []} no-selectable @cx-table.rowMoved=${this.handleTableRowMoved} @cx-table.rowDeleted=${this.handleTableRowDeleted} @cx-table.rowSelected=${this.handleOpenEditColorDialog} @cx-table-row-action-click=${this.handleTableActions}></cx-table>`,
|
|
17014
17014
|
() => h`<cx-spinner part="loading-spinner" class="color-swatch-picker__loading-spinner"></cx-spinner>`
|
|
17015
|
-
)}<cx-button @click=${this.handleOpenAddColorDialog} class="color-swatch-picker__add-color-button">${this.localize.term("addColor")}</cx-button></cx-space><cx-dialog part="dialog" class="color-swatch-picker__dialog" divider-position=${fe.Footer} use-overlay-scrollbar strategy="overlay" .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${this.localize.term(`${this.dialogType}Color`)}</cx-typography></cx-space>${
|
|
17015
|
+
)}<cx-button @click=${this.handleOpenAddColorDialog} class="color-swatch-picker__add-color-button">${this.localize.term("addColor")}</cx-button></cx-space><cx-dialog part="dialog" class="color-swatch-picker__dialog" divider-position=${fe.Footer} use-overlay-scrollbar strategy="overlay" .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${this.localize.term(`${this.dialogType}Color`)}</cx-typography></cx-space>${v(
|
|
17016
17016
|
this.tabs.length >= 1,
|
|
17017
|
-
() => h`<cx-tab-group class="list-editor__tab-group" placement="top">${
|
|
17017
|
+
() => h`<cx-tab-group class="list-editor__tab-group" placement="top">${N(
|
|
17018
17018
|
this.tabs,
|
|
17019
17019
|
(e) => e,
|
|
17020
17020
|
(e) => h`<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>`
|
|
@@ -17023,16 +17023,16 @@ let _ = class extends ee {
|
|
|
17023
17023
|
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleRequestClose}>${this.localize.term("cancel")}</cx-button><cx-button data-testid="save-button" variant="primary" size="medium" @click=${this.handleFinishDialog}>${this.localize.term(this.dialogType === "add" ? "add" : "save")}</cx-button></cx-space></cx-dialog>`;
|
|
17024
17024
|
}
|
|
17025
17025
|
};
|
|
17026
|
-
|
|
17027
|
-
|
|
17026
|
+
I.styles = [ae, N0];
|
|
17027
|
+
I.dependencies = {
|
|
17028
17028
|
"cx-button": ce,
|
|
17029
17029
|
"cx-color-picker": p0,
|
|
17030
17030
|
"cx-dialog": se,
|
|
17031
17031
|
"cx-grid": $e,
|
|
17032
17032
|
"cx-grid-item": we,
|
|
17033
|
-
"cx-icon-button":
|
|
17033
|
+
"cx-icon-button": _e,
|
|
17034
17034
|
"cx-input": oe,
|
|
17035
|
-
"cx-option":
|
|
17035
|
+
"cx-option": Ye,
|
|
17036
17036
|
"cx-select": Se,
|
|
17037
17037
|
"cx-space": de,
|
|
17038
17038
|
"cx-spinner": u0,
|
|
@@ -17040,11 +17040,11 @@ _.dependencies = {
|
|
|
17040
17040
|
"cx-typography": Z
|
|
17041
17041
|
};
|
|
17042
17042
|
R([
|
|
17043
|
-
|
|
17044
|
-
],
|
|
17043
|
+
M("cx-dialog")
|
|
17044
|
+
], I.prototype, "dialog", 2);
|
|
17045
17045
|
R([
|
|
17046
17046
|
y({ type: Object })
|
|
17047
|
-
],
|
|
17047
|
+
], I.prototype, "boundary", 2);
|
|
17048
17048
|
R([
|
|
17049
17049
|
y({
|
|
17050
17050
|
converter: {
|
|
@@ -17060,10 +17060,10 @@ R([
|
|
|
17060
17060
|
reflect: !0,
|
|
17061
17061
|
type: String
|
|
17062
17062
|
})
|
|
17063
|
-
],
|
|
17063
|
+
], I.prototype, "data", 2);
|
|
17064
17064
|
R([
|
|
17065
17065
|
y({ attribute: "disable-table-load", reflect: !0, type: Boolean })
|
|
17066
|
-
],
|
|
17066
|
+
], I.prototype, "disableTableLoad", 2);
|
|
17067
17067
|
R([
|
|
17068
17068
|
y({
|
|
17069
17069
|
attribute: "supported-languages",
|
|
@@ -17074,51 +17074,51 @@ R([
|
|
|
17074
17074
|
reflect: !0,
|
|
17075
17075
|
type: Array
|
|
17076
17076
|
})
|
|
17077
|
-
],
|
|
17077
|
+
], I.prototype, "supportedLanguages", 2);
|
|
17078
17078
|
R([
|
|
17079
17079
|
y({ attribute: "default-language", reflect: !0, type: String })
|
|
17080
|
-
],
|
|
17080
|
+
], I.prototype, "defaultLanguage", 2);
|
|
17081
17081
|
R([
|
|
17082
17082
|
u()
|
|
17083
|
-
],
|
|
17083
|
+
], I.prototype, "dialogType", 2);
|
|
17084
17084
|
R([
|
|
17085
17085
|
u()
|
|
17086
|
-
],
|
|
17086
|
+
], I.prototype, "dialogId", 2);
|
|
17087
17087
|
R([
|
|
17088
17088
|
u()
|
|
17089
|
-
],
|
|
17089
|
+
], I.prototype, "dialogName", 2);
|
|
17090
17090
|
R([
|
|
17091
17091
|
u()
|
|
17092
|
-
],
|
|
17092
|
+
], I.prototype, "dialogNameTranslations", 2);
|
|
17093
17093
|
R([
|
|
17094
17094
|
u()
|
|
17095
|
-
],
|
|
17095
|
+
], I.prototype, "dialogPalette", 2);
|
|
17096
17096
|
R([
|
|
17097
17097
|
u()
|
|
17098
|
-
],
|
|
17098
|
+
], I.prototype, "dialogHex", 2);
|
|
17099
17099
|
R([
|
|
17100
17100
|
u()
|
|
17101
|
-
],
|
|
17101
|
+
], I.prototype, "dialogRgb", 2);
|
|
17102
17102
|
R([
|
|
17103
17103
|
u()
|
|
17104
|
-
],
|
|
17104
|
+
], I.prototype, "dialogCmyk", 2);
|
|
17105
17105
|
R([
|
|
17106
17106
|
u()
|
|
17107
|
-
],
|
|
17107
|
+
], I.prototype, "dialogPmsId", 2);
|
|
17108
17108
|
R([
|
|
17109
17109
|
u()
|
|
17110
|
-
],
|
|
17110
|
+
], I.prototype, "dialogColor", 2);
|
|
17111
17111
|
R([
|
|
17112
17112
|
u()
|
|
17113
|
-
],
|
|
17113
|
+
], I.prototype, "palettes", 2);
|
|
17114
17114
|
R([
|
|
17115
17115
|
O("data")
|
|
17116
|
-
],
|
|
17117
|
-
|
|
17116
|
+
], I.prototype, "handleDataChange", 1);
|
|
17117
|
+
I = R([
|
|
17118
17118
|
ie("cx-color-swatch-picker")
|
|
17119
|
-
],
|
|
17119
|
+
], I);
|
|
17120
17120
|
const j0 = te`.folder-picker__name{--color:var(--cx-color-primary-500)}.folder-picker__request-folder-button:not(:first-child){margin-left:var(--cx-spacing-small)}`;
|
|
17121
|
-
var V0 = Object.defineProperty, H0 = Object.getOwnPropertyDescriptor,
|
|
17121
|
+
var V0 = Object.defineProperty, H0 = Object.getOwnPropertyDescriptor, G = (e, a, n, t) => {
|
|
17122
17122
|
for (var r = t > 1 ? void 0 : t ? H0(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
17123
17123
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
17124
17124
|
return t && r && V0(a, n, r), r;
|
|
@@ -17180,14 +17180,14 @@ let T = class extends ee {
|
|
|
17180
17180
|
e ? this.useFullPath ? (this.selectedLabel = `/${(e.fullPath ?? "").replace(/^\/+/, "")}`, e.docType === i1.Album && (this.selectedLabel += `/${e.title}`)) : this.selectedLabel = e.title : this.selectedLabel = "";
|
|
17181
17181
|
}
|
|
17182
17182
|
render() {
|
|
17183
|
-
return h`<cx-space part="base" class="folder-picker" spacing="2x-small" direction="horizontal" align-items="center">${
|
|
17183
|
+
return h`<cx-space part="base" class="folder-picker" spacing="2x-small" direction="horizontal" align-items="center">${v(
|
|
17184
17184
|
this.variant === Q.Select,
|
|
17185
17185
|
() => h`<cx-folder-select name=${this.name} selected-label=${this.selectedLabel} selection=${this.multiple ? "multiple" : "single"} value=${this._selectedFolder || this.value} variant="select" .form=${this.closest("form")} ?open=${this.open} ?required=${this.required} @cx-clear=${this.handleClear} @cx-selection-change=${this.handleSelectionChange} .allowedFolders=${this.allowedFolders} .api=${Ce}></cx-folder-select>`,
|
|
17186
17186
|
() => h`
|
|
17187
|
-
${
|
|
17187
|
+
${v(
|
|
17188
17188
|
this.selectedLabel,
|
|
17189
17189
|
() => h`<cx-typography data-testid="folder-name" variant="body3" class="folder-picker__name">${this.selectedLabel}</cx-typography>`
|
|
17190
|
-
)}<cx-button data-testid="request-folder-button" class="folder-picker__request-folder-button" @click=${this.handleRequestFolderClick}>${this.localize.term("choose")}</cx-button>${
|
|
17190
|
+
)}<cx-button data-testid="request-folder-button" class="folder-picker__request-folder-button" @click=${this.handleRequestFolderClick}>${this.localize.term("choose")}</cx-button>${v(
|
|
17191
17191
|
this.value,
|
|
17192
17192
|
() => h`<cx-icon-button data-testid="delete-folder-button" label=${this.localize.term("delete")} name="delete" @click=${this.handleClear}></cx-icon-button>`
|
|
17193
17193
|
)}<cx-dialog part="dialog" class="folder-picker__dialog" use-overlay-scrollbar strategy="overlay" ?open=${this.open} .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-typography slot="label" variant="h4">${this.localize.term("selectFolder")}</cx-typography><cx-folder-select name=${this.name} value=${this._selectedFolder || this.value} selected-label=${this.selectedLabel} variant=${this.variant} .form=${this.closest("form")} ?open=${this.open} ?required=${this.required} @cx-selection-change=${this.handleSelectionChange} .allowedFolders=${this.allowedFolders} .api=${Ce}></cx-folder-select><cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleRequestClose}>${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>`
|
|
@@ -17199,57 +17199,57 @@ T.dependencies = {
|
|
|
17199
17199
|
"cx-button": ce,
|
|
17200
17200
|
"cx-dialog": se,
|
|
17201
17201
|
"cx-folder-select": Ee,
|
|
17202
|
-
"cx-icon-button":
|
|
17202
|
+
"cx-icon-button": _e,
|
|
17203
17203
|
"cx-space": de,
|
|
17204
17204
|
"cx-typography": Z
|
|
17205
17205
|
};
|
|
17206
|
-
|
|
17207
|
-
|
|
17206
|
+
G([
|
|
17207
|
+
M(".folder-picker__dialog")
|
|
17208
17208
|
], T.prototype, "dialog", 2);
|
|
17209
|
-
|
|
17210
|
-
|
|
17209
|
+
G([
|
|
17210
|
+
M("cx-folder-select")
|
|
17211
17211
|
], T.prototype, "selectEl", 2);
|
|
17212
|
-
|
|
17212
|
+
G([
|
|
17213
17213
|
y({ type: Object })
|
|
17214
17214
|
], T.prototype, "boundary", 2);
|
|
17215
|
-
|
|
17215
|
+
G([
|
|
17216
17216
|
y({ reflect: !0, type: String })
|
|
17217
17217
|
], T.prototype, "name", 2);
|
|
17218
|
-
|
|
17218
|
+
G([
|
|
17219
17219
|
y({ reflect: !0, type: String })
|
|
17220
17220
|
], T.prototype, "value", 2);
|
|
17221
|
-
|
|
17221
|
+
G([
|
|
17222
17222
|
y({ attribute: "variant", reflect: !0, type: String })
|
|
17223
17223
|
], T.prototype, "variant", 2);
|
|
17224
|
-
|
|
17224
|
+
G([
|
|
17225
17225
|
y({ attribute: "use-fullpath", reflect: !0, type: Boolean })
|
|
17226
17226
|
], T.prototype, "useFullPath", 2);
|
|
17227
|
-
|
|
17227
|
+
G([
|
|
17228
17228
|
y({ reflect: !0, type: Boolean })
|
|
17229
17229
|
], T.prototype, "multiple", 2);
|
|
17230
|
-
|
|
17230
|
+
G([
|
|
17231
17231
|
y({
|
|
17232
17232
|
attribute: "allowed-folders",
|
|
17233
17233
|
converter: ve,
|
|
17234
17234
|
type: Array
|
|
17235
17235
|
})
|
|
17236
17236
|
], T.prototype, "allowedFolders", 2);
|
|
17237
|
-
|
|
17237
|
+
G([
|
|
17238
17238
|
y({ reflect: !0, type: Boolean })
|
|
17239
17239
|
], T.prototype, "required", 2);
|
|
17240
|
-
|
|
17240
|
+
G([
|
|
17241
17241
|
u()
|
|
17242
17242
|
], T.prototype, "selectedLabel", 2);
|
|
17243
|
-
|
|
17243
|
+
G([
|
|
17244
17244
|
u()
|
|
17245
17245
|
], T.prototype, "open", 2);
|
|
17246
|
-
|
|
17246
|
+
G([
|
|
17247
17247
|
u()
|
|
17248
17248
|
], T.prototype, "_selectedFolder", 2);
|
|
17249
|
-
|
|
17249
|
+
G([
|
|
17250
17250
|
O("value")
|
|
17251
17251
|
], T.prototype, "handleValueChange", 1);
|
|
17252
|
-
T =
|
|
17252
|
+
T = G([
|
|
17253
17253
|
ie("cx-folder-picker")
|
|
17254
17254
|
], T);
|
|
17255
17255
|
const U0 = te`:host{width:100%;display:block}.gallery-config-dialog{--width:600px}.gallery-config-dialog::part(body){padding-bottom:0}.gallery-config-dialog::part(footer){padding-top:0}`;
|
|
@@ -17259,23 +17259,23 @@ var W0 = Object.defineProperty, J0 = Object.getOwnPropertyDescriptor, j = (e, a,
|
|
|
17259
17259
|
return t && r && W0(a, n, r), r;
|
|
17260
17260
|
};
|
|
17261
17261
|
const pe = "path_TR1";
|
|
17262
|
-
let
|
|
17262
|
+
let q = class extends ee {
|
|
17263
17263
|
constructor() {
|
|
17264
|
-
super(), this.localize = new W(this), this.variant =
|
|
17264
|
+
super(), this.localize = new W(this), this.variant = L.Asset, this.dialogVariant = U.Gallery, this.boundary = document.body, this.onRequestAsset = void 0, this.image = null, this.selectedPosition = -1, this.disabledAssetPicker = !1, this.editedImage = { id: "" }, this.assetRequestingStatus = !1, this.selectedPageLabel = "", this.isThumbnailManuallySet = !1, this.apiGetTeamSpaceSpaceList = o1, this.apiGetPagesAndLinks = this.apiGetPagesAndLinks.bind(this);
|
|
17265
17265
|
}
|
|
17266
17266
|
get showOpenInNewTab() {
|
|
17267
|
-
return this.variant ===
|
|
17267
|
+
return this.variant === L.Link || this.variant === L.Page || this.variant === L.Space;
|
|
17268
17268
|
}
|
|
17269
17269
|
get galleryPickerDialogTitle() {
|
|
17270
17270
|
const e = this.selectedPosition >= 0 ? "edit" : "add";
|
|
17271
17271
|
switch (this.dialogVariant === U.Gallery ? this.variant : U.Carousel) {
|
|
17272
|
-
case
|
|
17272
|
+
case L.Asset:
|
|
17273
17273
|
return this.localize.term(`${e}AssetCard`);
|
|
17274
|
-
case
|
|
17274
|
+
case L.Folder:
|
|
17275
17275
|
return this.localize.term(`${e}FolderCard`);
|
|
17276
|
-
case
|
|
17276
|
+
case L.Page:
|
|
17277
17277
|
return this.localize.term(`${e}PageCard`);
|
|
17278
|
-
case
|
|
17278
|
+
case L.Space:
|
|
17279
17279
|
return this.localize.term(`${e}SpaceCard`);
|
|
17280
17280
|
default:
|
|
17281
17281
|
return this.localize.term(`${e}Slide`);
|
|
@@ -17333,12 +17333,12 @@ let L = class extends ee {
|
|
|
17333
17333
|
this.image = e, this.selectedPosition = a, this.isThumbnailManuallySet = !0, e ? this.editedImage = { ...e } : this.editedImage = {
|
|
17334
17334
|
id: "",
|
|
17335
17335
|
name: "",
|
|
17336
|
-
objectFit:
|
|
17336
|
+
objectFit: ge.Cover,
|
|
17337
17337
|
openInNewTab: !0,
|
|
17338
17338
|
rawId: "",
|
|
17339
17339
|
src: "",
|
|
17340
17340
|
url: ""
|
|
17341
|
-
}, this.variant ===
|
|
17341
|
+
}, this.variant === L.Page && this.fetchSelectedPage(), this.dialog.show();
|
|
17342
17342
|
}
|
|
17343
17343
|
hide() {
|
|
17344
17344
|
this.dialog.hide();
|
|
@@ -17459,36 +17459,36 @@ let L = class extends ee {
|
|
|
17459
17459
|
this.variant,
|
|
17460
17460
|
[
|
|
17461
17461
|
[
|
|
17462
|
-
|
|
17462
|
+
L.Folder,
|
|
17463
17463
|
() => h`<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("folder")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-folder-picker name="url" value=${P(this.editedImage.url)} variant="select" required .boundary=${this.boundary} @cx-content-builder-folder-change=${this.handleFolderChange} @cx-content-builder-folder-delete=${this.handleFolderDelete}></cx-folder-picker></cx-grid-item></cx-grid>`
|
|
17464
17464
|
],
|
|
17465
17465
|
[
|
|
17466
|
-
|
|
17466
|
+
L.Link,
|
|
17467
17467
|
() => h`<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">Link</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-input data-testid="link-input" name="url" placeholder="Enter link" required type="text" value=${P(this.editedImage.url)} @cx-change=${this.handleInputChange}></cx-input></cx-grid-item></cx-grid>`
|
|
17468
17468
|
],
|
|
17469
17469
|
[
|
|
17470
|
-
|
|
17470
|
+
L.Page,
|
|
17471
17471
|
() => h`<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("page")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-folder-select .api=${this.apiGetPagesAndLinks} custom-change-event="cx-gallery-config-select-change" required name="url" variant="select" value=${P(this.editedImage.pageId)} selected-label=${this.selectedPageLabel} @cx-selection-change=${this.handleSelectionChange}></cx-folder-select></cx-grid-item></cx-grid>`
|
|
17472
17472
|
],
|
|
17473
17473
|
[
|
|
17474
|
-
|
|
17474
|
+
L.Space,
|
|
17475
17475
|
() => h`<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("space")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-dynamic-select .api=${this.apiGetTeamSpaceSpaceList} required name="url" use-search-term value=${P(this.editedImage.url)} @cx-change=${this.handleInputChange}></cx-dynamic-select></cx-grid-item></cx-grid>`
|
|
17476
17476
|
]
|
|
17477
17477
|
],
|
|
17478
17478
|
() => null
|
|
17479
17479
|
)}
|
|
17480
|
-
${
|
|
17480
|
+
${v(
|
|
17481
17481
|
this.showOpenInNewTab,
|
|
17482
17482
|
() => h`<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-checkbox .defaultChecked=${this.editedImage.openInNewTab ?? !0} ?checked=${this.editedImage.openInNewTab ?? !0} @cx-change=${this.handleOpenInNewTabChange}><cx-typography variant="body2">${this.localize.term("openInNewTab")}</cx-typography></cx-checkbox></cx-grid-item></cx-grid>`
|
|
17483
|
-
)}<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("thumbnail")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-asset-picker id=${this.editedImage.id} name="src" required is-site-builder type="all" value=${P(this.editedImage.src)} record-id=${this.editedImage.id || ""} ?disabled=${this.disabledAssetPicker} .onRequestAsset=${this.onRequestAsset} @cx-asset-request-status=${this.handleAssetRequestStatus} @cx-content-builder-asset-select=${this.handleAssetSelect} @cx-content-builder-asset-delete=${this.handleAssetDelete}></cx-asset-picker></cx-grid-item></cx-grid><cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-radio-group data-testid="object-fit-control" horizontal value=${P(this.editedImage.objectFit)} size="medium" @cx-change=${this.handleObjectFitChange}>${
|
|
17483
|
+
)}<cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("thumbnail")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-asset-picker id=${this.editedImage.id} name="src" required is-site-builder type="all" value=${P(this.editedImage.src)} record-id=${this.editedImage.id || ""} ?disabled=${this.disabledAssetPicker} .onRequestAsset=${this.onRequestAsset} @cx-asset-request-status=${this.handleAssetRequestStatus} @cx-content-builder-asset-select=${this.handleAssetSelect} @cx-content-builder-asset-delete=${this.handleAssetDelete}></cx-asset-picker></cx-grid-item></cx-grid><cx-grid columns="3" spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-radio-group data-testid="object-fit-control" horizontal value=${P(this.editedImage.objectFit)} size="medium" @cx-change=${this.handleObjectFitChange}>${N(
|
|
17484
17484
|
[
|
|
17485
17485
|
{
|
|
17486
17486
|
name: "Fit",
|
|
17487
|
-
value:
|
|
17487
|
+
value: ge.Contain
|
|
17488
17488
|
},
|
|
17489
17489
|
{
|
|
17490
17490
|
name: "Fill",
|
|
17491
|
-
value:
|
|
17491
|
+
value: ge.Cover
|
|
17492
17492
|
}
|
|
17493
17493
|
],
|
|
17494
17494
|
(e) => e.value,
|
|
@@ -17496,8 +17496,8 @@ let L = class extends ee {
|
|
|
17496
17496
|
)}</cx-radio-group></cx-grid-item></cx-grid></form><cx-divider></cx-divider><cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button variant="default" size="medium" @click=${this.hide}>${this.localize.term("cancel")}</cx-button><cx-button data-testid="save-button" variant="primary" size="medium" type="submit" @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button></cx-space></cx-dialog>`;
|
|
17497
17497
|
}
|
|
17498
17498
|
};
|
|
17499
|
-
|
|
17500
|
-
|
|
17499
|
+
q.styles = [ae, U0];
|
|
17500
|
+
q.dependencies = {
|
|
17501
17501
|
"cx-asset-picker": Ve,
|
|
17502
17502
|
"cx-button": ce,
|
|
17503
17503
|
"cx-checkbox": Ue,
|
|
@@ -17509,73 +17509,73 @@ L.dependencies = {
|
|
|
17509
17509
|
"cx-grid": $e,
|
|
17510
17510
|
"cx-grid-item": we,
|
|
17511
17511
|
"cx-input": oe,
|
|
17512
|
-
"cx-radio":
|
|
17512
|
+
"cx-radio": Xe,
|
|
17513
17513
|
"cx-radio-group": Qe,
|
|
17514
17514
|
"cx-space": de,
|
|
17515
17515
|
"cx-typography": Z
|
|
17516
17516
|
};
|
|
17517
17517
|
j([
|
|
17518
|
-
|
|
17519
|
-
],
|
|
17518
|
+
M("cx-dialog")
|
|
17519
|
+
], q.prototype, "dialog", 2);
|
|
17520
17520
|
j([
|
|
17521
|
-
|
|
17522
|
-
],
|
|
17521
|
+
M("cx-asset-picker")
|
|
17522
|
+
], q.prototype, "assetPicker", 2);
|
|
17523
17523
|
j([
|
|
17524
|
-
|
|
17525
|
-
],
|
|
17524
|
+
M("#gallery-config-form")
|
|
17525
|
+
], q.prototype, "form", 2);
|
|
17526
17526
|
j([
|
|
17527
17527
|
y({ reflect: !0, type: String })
|
|
17528
|
-
],
|
|
17528
|
+
], q.prototype, "variant", 2);
|
|
17529
17529
|
j([
|
|
17530
17530
|
y({ attribute: "dialog-variant", reflect: !0, type: String })
|
|
17531
|
-
],
|
|
17531
|
+
], q.prototype, "dialogVariant", 2);
|
|
17532
17532
|
j([
|
|
17533
17533
|
y({ type: Object })
|
|
17534
|
-
],
|
|
17534
|
+
], q.prototype, "boundary", 2);
|
|
17535
17535
|
j([
|
|
17536
17536
|
y({ attribute: "on-request-asset", type: Function })
|
|
17537
|
-
],
|
|
17537
|
+
], q.prototype, "onRequestAsset", 2);
|
|
17538
17538
|
j([
|
|
17539
17539
|
y({ type: Object })
|
|
17540
|
-
],
|
|
17540
|
+
], q.prototype, "image", 2);
|
|
17541
17541
|
j([
|
|
17542
17542
|
y({ attribute: "selected-position", type: Number })
|
|
17543
|
-
],
|
|
17543
|
+
], q.prototype, "selectedPosition", 2);
|
|
17544
17544
|
j([
|
|
17545
17545
|
y({
|
|
17546
17546
|
attribute: "disabled-asset-picker",
|
|
17547
17547
|
reflect: !0,
|
|
17548
17548
|
type: Boolean
|
|
17549
17549
|
})
|
|
17550
|
-
],
|
|
17550
|
+
], q.prototype, "disabledAssetPicker", 2);
|
|
17551
17551
|
j([
|
|
17552
17552
|
u()
|
|
17553
|
-
],
|
|
17553
|
+
], q.prototype, "editedImage", 2);
|
|
17554
17554
|
j([
|
|
17555
17555
|
u()
|
|
17556
|
-
],
|
|
17556
|
+
], q.prototype, "assetRequestingStatus", 2);
|
|
17557
17557
|
j([
|
|
17558
17558
|
u()
|
|
17559
|
-
],
|
|
17560
|
-
|
|
17559
|
+
], q.prototype, "selectedPageLabel", 2);
|
|
17560
|
+
q = j([
|
|
17561
17561
|
ie("cx-gallery-config")
|
|
17562
|
-
],
|
|
17563
|
-
const
|
|
17564
|
-
var
|
|
17562
|
+
], q);
|
|
17563
|
+
const Y0 = te`:host{width:100%;display:block;position:relative}.gallery-picker-dialog{--width:600px}.gallery-picker-dialog::part(body){padding-bottom:0}.gallery-picker-dialog::part(footer){padding-top:0}.gallery-picker__no-slides-added{margin-bottom:var(--cx-spacing-medium);display:block}.gallery-picker__overlay{margin-bottom:var(--cx-spacing-small)}.gallery-picker__masonry-wrapper{padding-right:var(--cx-spacing-medium)}.gallery-picker__input{opacity:0;pointer-events:none;z-index:-1;width:33.3333%;position:absolute;top:0;left:0;transform:translateY(-90%)}`;
|
|
17564
|
+
var X0 = Object.defineProperty, Q0 = Object.getOwnPropertyDescriptor, w = (e, a, n, t) => {
|
|
17565
17565
|
for (var r = t > 1 ? void 0 : t ? Q0(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
17566
17566
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
17567
|
-
return t && r &&
|
|
17567
|
+
return t && r && X0(a, n, r), r;
|
|
17568
17568
|
};
|
|
17569
17569
|
We.plugin({
|
|
17570
17570
|
ClickScroll: R1,
|
|
17571
17571
|
ScrollbarsHiding: T1,
|
|
17572
17572
|
SizeObserver: P1
|
|
17573
17573
|
});
|
|
17574
|
-
let
|
|
17574
|
+
let D = class extends ee {
|
|
17575
17575
|
constructor() {
|
|
17576
17576
|
super(...arguments), this.formControlController = new $0(this, {
|
|
17577
17577
|
assumeInteractionOn: ["cx-gallery-picker-action"]
|
|
17578
|
-
}), this.localize = new W(this), this.variant =
|
|
17578
|
+
}), this.localize = new W(this), this.variant = L.Asset, this.sourceVariant = z.Manual, this.dialogVariant = U.Gallery, this.name = "", this.value = void 0, this.defaultValue = void 0, this.src = "", this.format = h1, this.manualFormat = !1, this.boundary = document.body, this.form = void 0, this.onRequestAsset = void 0, this.loading = !1, this.masonryData = [], this.dataCount = 0, this.currentPage = 0, this.selectedPosition = -1, this.hasFinishedFetchingData = !1, this.errorDataMap = /* @__PURE__ */ new Map(), this.osInstance = null, this.itemsPerPage = 9, this.maxRows = 3, this.maxColumns = 3, this.rowHeight = "150px", this.spacing = "medium", this.autofetchController = new x0(this, {
|
|
17579
17579
|
isSiteBuilder: !0,
|
|
17580
17580
|
maxEnd: 100
|
|
17581
17581
|
});
|
|
@@ -17598,7 +17598,7 @@ let E = class extends ee {
|
|
|
17598
17598
|
}
|
|
17599
17599
|
/** Gets the validation message */
|
|
17600
17600
|
get validationMessage() {
|
|
17601
|
-
return this.variant ===
|
|
17601
|
+
return this.variant === L.Asset ? "" : this.localize.term(
|
|
17602
17602
|
"galleryPickerMissingSourceValidationMessage",
|
|
17603
17603
|
this.variant
|
|
17604
17604
|
);
|
|
@@ -17606,7 +17606,7 @@ let E = class extends ee {
|
|
|
17606
17606
|
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
17607
17607
|
checkValidity() {
|
|
17608
17608
|
const e = this.getValidityValue();
|
|
17609
|
-
return this.variant ===
|
|
17609
|
+
return this.variant === L.Asset ? !0 : this.inputEl.checkValidity() && e;
|
|
17610
17610
|
}
|
|
17611
17611
|
/** Gets the associated form, if one exists. */
|
|
17612
17612
|
getForm() {
|
|
@@ -17615,7 +17615,7 @@ let E = class extends ee {
|
|
|
17615
17615
|
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
17616
17616
|
reportValidity() {
|
|
17617
17617
|
const e = this.getValidityValue();
|
|
17618
|
-
return this.variant ===
|
|
17618
|
+
return this.variant === L.Asset ? !0 : this.inputEl.reportValidity() && e;
|
|
17619
17619
|
}
|
|
17620
17620
|
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
17621
17621
|
setCustomValidity(e) {
|
|
@@ -17628,7 +17628,7 @@ let E = class extends ee {
|
|
|
17628
17628
|
this.galleryConfig?.hide();
|
|
17629
17629
|
}
|
|
17630
17630
|
getValidityValue() {
|
|
17631
|
-
if (this.errorDataMap.clear(), this.variant !==
|
|
17631
|
+
if (this.errorDataMap.clear(), this.variant !== L.Asset)
|
|
17632
17632
|
for (const a of this.value ?? [])
|
|
17633
17633
|
(!a.url || a.url === "") && this.errorDataMap.set(a.id, !0);
|
|
17634
17634
|
const e = this.errorDataMap.size === 0;
|
|
@@ -17643,8 +17643,8 @@ let E = class extends ee {
|
|
|
17643
17643
|
try {
|
|
17644
17644
|
const e = await this.autofetchController.fetchImagesInFolderByPage({
|
|
17645
17645
|
folderId: this.src,
|
|
17646
|
-
format:
|
|
17647
|
-
manualFormat:
|
|
17646
|
+
format: D.THUMBNAIL_FORMAT,
|
|
17647
|
+
manualFormat: !0,
|
|
17648
17648
|
page: this.currentPage,
|
|
17649
17649
|
pageSize: this.itemsPerPage
|
|
17650
17650
|
});
|
|
@@ -17688,8 +17688,8 @@ let E = class extends ee {
|
|
|
17688
17688
|
async doFetchByIds(e) {
|
|
17689
17689
|
this.loading = !0;
|
|
17690
17690
|
const a = await this.autofetchController.fetchImagesByIDs({
|
|
17691
|
-
format:
|
|
17692
|
-
manualFormat:
|
|
17691
|
+
format: D.THUMBNAIL_FORMAT,
|
|
17692
|
+
manualFormat: !0,
|
|
17693
17693
|
recordIds: e
|
|
17694
17694
|
}), n = new Map(
|
|
17695
17695
|
a.map((t) => [t.rawId ?? t.id, t])
|
|
@@ -17744,7 +17744,7 @@ let E = class extends ee {
|
|
|
17744
17744
|
this.galleryConfig?.show(
|
|
17745
17745
|
{
|
|
17746
17746
|
...a,
|
|
17747
|
-
objectFit: n?.objectFit ??
|
|
17747
|
+
objectFit: n?.objectFit ?? ge.Cover,
|
|
17748
17748
|
openInNewTab: n?.openInNewTab
|
|
17749
17749
|
},
|
|
17750
17750
|
this.selectedPosition
|
|
@@ -17864,60 +17864,61 @@ let E = class extends ee {
|
|
|
17864
17864
|
hasError: this.errorDataMap.has(n.id),
|
|
17865
17865
|
loading: !n.src
|
|
17866
17866
|
}));
|
|
17867
|
-
return h`<cx-input class="gallery-picker__input" label=${this.localize.term("choose")} name=${this.name} value=${JSON.stringify(this.value ?? [])}></cx-input><div part="overlay" class="gallery-picker__overlay" tabindex="-1"><div part="masonry-wrapper" style=${De({ maxHeight: this.maxMasonryHeight })} class="gallery-picker__masonry-wrapper" tabindex="-1"><cx-masonry class="gallery-picker__masonry" cols=${this.maxColumns} id-key=${this.sourceVariant === z.Manual ? "rawId" : "id"} row-height=${this.rowHeight} format=${this.format} ?manual-format=${this.manualFormat} spacing="medium" no-crossorigin ?sortable=${this.sourceVariant === z.Manual} .data=${a} .actions=${e} @cx-edit-item=${this.handleEditItem} @cx-delete-item=${this.handleDeleteItem} @cx-reorder=${this.handleReorder}></cx-masonry></div>${
|
|
17867
|
+
return h`<cx-input class="gallery-picker__input" label=${this.localize.term("choose")} name=${this.name} value=${JSON.stringify(this.value ?? [])}></cx-input><div part="overlay" class="gallery-picker__overlay" tabindex="-1"><div part="masonry-wrapper" style=${De({ maxHeight: this.maxMasonryHeight })} class="gallery-picker__masonry-wrapper" tabindex="-1"><cx-masonry class="gallery-picker__masonry" cols=${this.maxColumns} id-key=${this.sourceVariant === z.Manual ? "rawId" : "id"} row-height=${this.rowHeight} format=${this.format} ?manual-format=${this.manualFormat} spacing="medium" no-crossorigin ?sortable=${this.sourceVariant === z.Manual} .data=${a} .actions=${e} @cx-edit-item=${this.handleEditItem} @cx-delete-item=${this.handleDeleteItem} @cx-reorder=${this.handleReorder}></cx-masonry></div>${v(
|
|
17868
17868
|
this.src ? this.hasFinishedFetchingData && this.masonryData.length === 0 : this.masonryData.length === 0,
|
|
17869
|
-
() =>
|
|
17869
|
+
() => v(
|
|
17870
17870
|
this.sourceVariant === z.Api,
|
|
17871
|
-
() => h`<cx-typography variant="body2" class="gallery-picker__no-slides-added">${
|
|
17871
|
+
() => h`<cx-typography variant="body2" class="gallery-picker__no-slides-added">${v(
|
|
17872
17872
|
this.dialogVariant === U.Gallery,
|
|
17873
17873
|
() => this.localize.term("cardsWillBeAddedAutomaticallyFromTheSelectedFolder"),
|
|
17874
17874
|
() => this.localize.term("slidesWillBeAddedAutomaticallyFromTheSelectedFolder")
|
|
17875
17875
|
)}</cx-typography>`,
|
|
17876
17876
|
() => h`<cx-typography variant="body2" class="gallery-picker__no-slides-added">${this.localize.term(`no${this.dialogVariant === U.Gallery ? "Cards" : "Slides"}AddedYet`)}</cx-typography>`
|
|
17877
17877
|
)
|
|
17878
|
-
)}</div>${
|
|
17878
|
+
)}</div>${v(
|
|
17879
17879
|
this.sourceVariant === z.Manual,
|
|
17880
17880
|
() => h`<cx-button class="gallery-picker-trigger" variant="default" @click=${this.handleAddItem}>${this.localize.term(`add${this.dialogVariant === U.Gallery ? "Card" : "Slide"}`)}</cx-button>`
|
|
17881
17881
|
)}<cx-gallery-config variant=${this.variant} dialog-variant=${this.dialogVariant} ?disabled-asset-picker=${this.sourceVariant === z.Api} .boundary=${this.boundary} .onRequestAsset=${this.onRequestAsset} @cx-gallery-config-save=${this.handleSave}></cx-gallery-config>`;
|
|
17882
17882
|
}
|
|
17883
17883
|
};
|
|
17884
|
-
|
|
17884
|
+
D.styles = [
|
|
17885
17885
|
ae,
|
|
17886
17886
|
z1,
|
|
17887
|
-
|
|
17887
|
+
Y0
|
|
17888
17888
|
];
|
|
17889
|
-
|
|
17889
|
+
D.dependencies = {
|
|
17890
17890
|
"cx-button": ce,
|
|
17891
|
-
"cx-gallery-config":
|
|
17891
|
+
"cx-gallery-config": q,
|
|
17892
17892
|
"cx-input": oe,
|
|
17893
17893
|
"cx-masonry": E0,
|
|
17894
17894
|
"cx-space": de,
|
|
17895
17895
|
"cx-typography": Z
|
|
17896
17896
|
};
|
|
17897
|
+
D.THUMBNAIL_FORMAT = "TR4";
|
|
17897
17898
|
w([
|
|
17898
|
-
|
|
17899
|
-
],
|
|
17899
|
+
M("cx-gallery-config")
|
|
17900
|
+
], D.prototype, "galleryConfig", 2);
|
|
17900
17901
|
w([
|
|
17901
|
-
|
|
17902
|
-
],
|
|
17902
|
+
M("cx-masonry")
|
|
17903
|
+
], D.prototype, "masonry", 2);
|
|
17903
17904
|
w([
|
|
17904
|
-
|
|
17905
|
-
],
|
|
17905
|
+
M(".gallery-picker__masonry-wrapper")
|
|
17906
|
+
], D.prototype, "scrollWrapper", 2);
|
|
17906
17907
|
w([
|
|
17907
|
-
|
|
17908
|
-
],
|
|
17908
|
+
M(".gallery-picker__input")
|
|
17909
|
+
], D.prototype, "inputEl", 2);
|
|
17909
17910
|
w([
|
|
17910
17911
|
y({ reflect: !0, type: String })
|
|
17911
|
-
],
|
|
17912
|
+
], D.prototype, "variant", 2);
|
|
17912
17913
|
w([
|
|
17913
17914
|
y({ attribute: "source-variant", reflect: !0, type: String })
|
|
17914
|
-
],
|
|
17915
|
+
], D.prototype, "sourceVariant", 2);
|
|
17915
17916
|
w([
|
|
17916
17917
|
y({ attribute: "dialog-variant", reflect: !0, type: String })
|
|
17917
|
-
],
|
|
17918
|
+
], D.prototype, "dialogVariant", 2);
|
|
17918
17919
|
w([
|
|
17919
17920
|
y({ reflect: !0, type: String })
|
|
17920
|
-
],
|
|
17921
|
+
], D.prototype, "name", 2);
|
|
17921
17922
|
w([
|
|
17922
17923
|
y({
|
|
17923
17924
|
converter: {
|
|
@@ -17934,75 +17935,75 @@ w([
|
|
|
17934
17935
|
reflect: !0,
|
|
17935
17936
|
type: String
|
|
17936
17937
|
})
|
|
17937
|
-
],
|
|
17938
|
+
], D.prototype, "value", 2);
|
|
17938
17939
|
w([
|
|
17939
17940
|
v0()
|
|
17940
|
-
],
|
|
17941
|
+
], D.prototype, "defaultValue", 2);
|
|
17941
17942
|
w([
|
|
17942
17943
|
y({ reflect: !0, type: String })
|
|
17943
|
-
],
|
|
17944
|
+
], D.prototype, "src", 2);
|
|
17944
17945
|
w([
|
|
17945
17946
|
y({ attribute: "format", type: String })
|
|
17946
|
-
],
|
|
17947
|
+
], D.prototype, "format", 2);
|
|
17947
17948
|
w([
|
|
17948
17949
|
y({ attribute: "manual-format", type: Boolean })
|
|
17949
|
-
],
|
|
17950
|
+
], D.prototype, "manualFormat", 2);
|
|
17950
17951
|
w([
|
|
17951
17952
|
y({ type: Object })
|
|
17952
|
-
],
|
|
17953
|
+
], D.prototype, "boundary", 2);
|
|
17953
17954
|
w([
|
|
17954
17955
|
y({ reflect: !1 })
|
|
17955
|
-
],
|
|
17956
|
+
], D.prototype, "form", 2);
|
|
17956
17957
|
w([
|
|
17957
17958
|
y({ attribute: "on-request-asset", type: Function })
|
|
17958
|
-
],
|
|
17959
|
+
], D.prototype, "onRequestAsset", 2);
|
|
17959
17960
|
w([
|
|
17960
17961
|
u()
|
|
17961
|
-
],
|
|
17962
|
+
], D.prototype, "loading", 2);
|
|
17962
17963
|
w([
|
|
17963
17964
|
u()
|
|
17964
|
-
],
|
|
17965
|
+
], D.prototype, "masonryData", 2);
|
|
17965
17966
|
w([
|
|
17966
17967
|
u()
|
|
17967
|
-
],
|
|
17968
|
+
], D.prototype, "dataCount", 2);
|
|
17968
17969
|
w([
|
|
17969
17970
|
u()
|
|
17970
|
-
],
|
|
17971
|
+
], D.prototype, "currentPage", 2);
|
|
17971
17972
|
w([
|
|
17972
17973
|
u()
|
|
17973
|
-
],
|
|
17974
|
+
], D.prototype, "selectedPosition", 2);
|
|
17974
17975
|
w([
|
|
17975
17976
|
u()
|
|
17976
|
-
],
|
|
17977
|
+
], D.prototype, "hasFinishedFetchingData", 2);
|
|
17977
17978
|
w([
|
|
17978
17979
|
u()
|
|
17979
|
-
],
|
|
17980
|
+
], D.prototype, "errorDataMap", 2);
|
|
17980
17981
|
w([
|
|
17981
17982
|
u()
|
|
17982
|
-
],
|
|
17983
|
+
], D.prototype, "osInstance", 2);
|
|
17983
17984
|
w([
|
|
17984
17985
|
O("variant")
|
|
17985
|
-
],
|
|
17986
|
+
], D.prototype, "handleVariantChange", 1);
|
|
17986
17987
|
w([
|
|
17987
17988
|
O("src"),
|
|
17988
17989
|
O("currentPage", { waitUntilFirstUpdate: !0 }),
|
|
17989
17990
|
O("sourceVariant", { waitUntilFirstUpdate: !0 }),
|
|
17990
17991
|
O("format", { waitUntilFirstUpdate: !0 })
|
|
17991
|
-
],
|
|
17992
|
+
], D.prototype, "fetchImagesInFolderBySlide", 1);
|
|
17992
17993
|
w([
|
|
17993
17994
|
O("src"),
|
|
17994
17995
|
O("sourceVariant", { waitUntilFirstUpdate: !0 })
|
|
17995
|
-
],
|
|
17996
|
+
], D.prototype, "handleSourceVariantChange", 1);
|
|
17996
17997
|
w([
|
|
17997
17998
|
O("value"),
|
|
17998
17999
|
O("sourceVariant", { waitUntilFirstUpdate: !0 })
|
|
17999
|
-
],
|
|
18000
|
+
], D.prototype, "fetchImagesByIDs", 1);
|
|
18000
18001
|
w([
|
|
18001
18002
|
O("format", { waitUntilFirstUpdate: !0 })
|
|
18002
|
-
],
|
|
18003
|
-
|
|
18003
|
+
], D.prototype, "handleFormatChange", 1);
|
|
18004
|
+
D = w([
|
|
18004
18005
|
ie("cx-gallery-picker")
|
|
18005
|
-
],
|
|
18006
|
+
], D);
|
|
18006
18007
|
const Z0 = te`.page-picker__name{--color:var(--cx-color-primary-500)}.page-picker__request-page-button:not(:first-child){margin-left:var(--cx-spacing-small)}`;
|
|
18007
18008
|
var e2 = Object.defineProperty, a2 = Object.getOwnPropertyDescriptor, t1 = (e) => {
|
|
18008
18009
|
throw TypeError(e);
|
|
@@ -18010,7 +18011,7 @@ var e2 = Object.defineProperty, a2 = Object.getOwnPropertyDescriptor, t1 = (e) =
|
|
|
18010
18011
|
for (var r = t > 1 ? void 0 : t ? a2(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
18011
18012
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
18012
18013
|
return t && r && e2(a, n, r), r;
|
|
18013
|
-
}, r1 = (e, a, n) => a.has(e) || t1("Cannot " + n), he = (e, a, n) => (r1(e, a, "read from private field"), n ? n.call(e) : a.get(e)), i2 = (e, a, n) => a.has(e) ? t1("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, n),
|
|
18014
|
+
}, r1 = (e, a, n) => a.has(e) || t1("Cannot " + n), he = (e, a, n) => (r1(e, a, "read from private field"), n ? n.call(e) : a.get(e)), i2 = (e, a, n) => a.has(e) ? t1("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, n), Ge = (e, a, n, t) => (r1(e, a, "write to private field"), a.set(e, n), n), H;
|
|
18014
18015
|
let K = class extends ee {
|
|
18015
18016
|
constructor() {
|
|
18016
18017
|
super(), this.localize = new W(this), this.boundary = document.body, this.name = "", this.value = "", this.variant = Q.Select, this.required = !1, this.selectedLabel = "", this.open = !1, i2(this, H), this.apiGetPagesAndLinks = this.apiGetPagesAndLinks.bind(this);
|
|
@@ -18082,13 +18083,13 @@ let K = class extends ee {
|
|
|
18082
18083
|
const { id: n, url: t } = a.dataset;
|
|
18083
18084
|
this.variant === Q.Select ? this.emit("cx-content-builder-page-change", {
|
|
18084
18085
|
detail: { id: n, url: t }
|
|
18085
|
-
}) :
|
|
18086
|
+
}) : Ge(this, H, { id: n, url: t });
|
|
18086
18087
|
}
|
|
18087
18088
|
handleRequestPageClick() {
|
|
18088
18089
|
this.open = !0;
|
|
18089
18090
|
}
|
|
18090
18091
|
handleClear() {
|
|
18091
|
-
this.value = "", this.selectedLabel = "",
|
|
18092
|
+
this.value = "", this.selectedLabel = "", Ge(this, H, void 0), this.emit("cx-content-builder-page-delete");
|
|
18092
18093
|
}
|
|
18093
18094
|
handleRequestClose(e) {
|
|
18094
18095
|
e.stopPropagation(), this.open = !1;
|
|
@@ -18099,14 +18100,14 @@ let K = class extends ee {
|
|
|
18099
18100
|
}), this.dialog.hide(), this.open = !1;
|
|
18100
18101
|
}
|
|
18101
18102
|
render() {
|
|
18102
|
-
return h`<cx-space part="base" class="page-picker" spacing="2x-small" direction="horizontal" align-items="center">${
|
|
18103
|
+
return h`<cx-space part="base" class="page-picker" spacing="2x-small" direction="horizontal" align-items="center">${v(
|
|
18103
18104
|
this.variant === Q.Select,
|
|
18104
18105
|
() => h`<cx-folder-select name=${this.name} selected-label=${this.selectedLabel} value=${he(this, H)?.id || this.value} variant="select" .form=${this.closest("form")} ?open=${this.open} ?required=${this.required} @cx-clear=${this.handleClear} @cx-selection-change=${this.handleSelectionChange} .api=${this.apiGetPagesAndLinks}></cx-folder-select>`,
|
|
18105
18106
|
() => h`
|
|
18106
|
-
${
|
|
18107
|
+
${v(
|
|
18107
18108
|
this.selectedLabel,
|
|
18108
18109
|
() => h`<cx-typography data-testid="page-name" variant="body3" class="page-picker__name">${this.selectedLabel}</cx-typography>`
|
|
18109
|
-
)}<cx-button data-testid="request-page-button" class="page-picker__request-page-button" @click=${this.handleRequestPageClick}>${this.localize.term("choose")}</cx-button>${
|
|
18110
|
+
)}<cx-button data-testid="request-page-button" class="page-picker__request-page-button" @click=${this.handleRequestPageClick}>${this.localize.term("choose")}</cx-button>${v(
|
|
18110
18111
|
this.value,
|
|
18111
18112
|
() => h`<cx-icon-button data-testid="delete-page-button" label=${this.localize.term("delete")} name="delete" @click=${this.handleClear}></cx-icon-button>`
|
|
18112
18113
|
)}<cx-dialog part="dialog" class="page-picker__dialog" use-overlay-scrollbar strategy="overlay" ?open=${this.open} .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-typography slot="label" variant="h4">${this.localize.term("selectFolder")}</cx-typography><cx-folder-select name=${this.name} value=${he(this, H)?.id || this.value} selected-label=${this.selectedLabel} variant=${this.variant} .form=${this.closest("form")} ?open=${this.open} ?required=${this.required} @cx-selection-change=${this.handleSelectionChange} .api=${this.apiGetPagesAndLinks}></cx-folder-select><cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleRequestClose}>${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>`
|
|
@@ -18119,15 +18120,15 @@ K.dependencies = {
|
|
|
18119
18120
|
"cx-button": ce,
|
|
18120
18121
|
"cx-dialog": se,
|
|
18121
18122
|
"cx-folder-select": Ee,
|
|
18122
|
-
"cx-icon-button":
|
|
18123
|
+
"cx-icon-button": _e,
|
|
18123
18124
|
"cx-space": de,
|
|
18124
18125
|
"cx-typography": Z
|
|
18125
18126
|
};
|
|
18126
18127
|
V([
|
|
18127
|
-
|
|
18128
|
+
M(".page-picker__dialog")
|
|
18128
18129
|
], K.prototype, "dialog", 2);
|
|
18129
18130
|
V([
|
|
18130
|
-
|
|
18131
|
+
M("cx-folder-select")
|
|
18131
18132
|
], K.prototype, "selectEl", 2);
|
|
18132
18133
|
V([
|
|
18133
18134
|
y({ type: Object })
|
|
@@ -18156,7 +18157,7 @@ K = V([
|
|
|
18156
18157
|
const t2 = te`:host{display:block}.config-form{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:680px;color:var(--cx-color-neutral)}.config-form__button-group{width:100%;& cx-button{flex:1}}.config-form__dropdown{text-align:left}.config-form__button-group--active::part(base){background-color:var(--cx-color-neutral-200)}.config-form__help-text{display:block}.config-form__radio-card-image *{max-width:100%}.config-form__checkbox-group{--children-gap:var(--cx-spacing-x-small)}.config-form__checkbox-group-item{--item-padding:0;--selected-background-color:transparent}.config-form__label{--color:var(--cx-color-neutral-800)}.config-form__help-text{--color:var(--cx-color-neutral-600)}.config-form__dropdown-menu{--checked-icon-display:none}.config-form__select{--option-color:var(--cx-color-neutral-900);--option-font-weight:var(--cx-font-weight-medium);--option-selected-font-weight:var(--cx-font-weight-medium);--option-help-text-color:var(--cx-color-neutral-600);--option-selected-help-text-color:var(--cx-color-neutral-600)}.config-form__confirm-popover{--confirm-popover-dialog-width:fit-content;--confirm-button-background-color:var(--cx-color-danger-500);--cancel-button-background-color:var(--cx-color-neutral-100);--cancel-button-color:var(--cx-color-neutral-700)}.config-form__input__select-suffix{--cx-input-border-width:0;margin-inline-end:0}.config-form__input__select-suffix::part(combobox){width:10ch}.config-form__input__select-suffix::part(expand-icon){margin-inline-start:0}.config-form__input__divider-suffix{--spacing:0;margin-inline-end:0}.config-form__tab-group{--padding:0;--tab-group-nav-padding:0 var(--cx-spacing-large);--tab-group-top-gap:0}.config-form__tab-group::part(nav){background-color:var(--cx-color-neutral-0);z-index:1;position:sticky;top:0}cx-radio-group cx-radio{line-height:var(--cx-line-height-x-large)}`;
|
|
18157
18158
|
class r2 {
|
|
18158
18159
|
constructor(a) {
|
|
18159
|
-
this.apiSearchAssets = b0, this.apiGetTeamSpaceFontFamily =
|
|
18160
|
+
this.apiSearchAssets = b0, this.apiGetTeamSpaceFontFamily = g1, this.pendingGalleryPickerSaves = /* @__PURE__ */ new Set(), this.fontFamiliesCache = /* @__PURE__ */ new Map(), this.pendingFontFamilyFetches = /* @__PURE__ */ new Set(), this.typeSubtypeOptionsCache = /* @__PURE__ */ new Map(), this.pendingTypeSubtypeOptionsFetches = /* @__PURE__ */ new Set(), this.host = a, this.localize = new W(this.host);
|
|
18160
18161
|
}
|
|
18161
18162
|
hostConnected() {
|
|
18162
18163
|
this.host.addController(this);
|
|
@@ -18169,21 +18170,21 @@ class r2 {
|
|
|
18169
18170
|
*/
|
|
18170
18171
|
async resolveAssetFormatSrc(a, n) {
|
|
18171
18172
|
const t = `path_${n}`, r = n === "TRX", i = "path_TR1", c = await this.apiSearchAssets({
|
|
18172
|
-
fields: r ? [t, i,
|
|
18173
|
+
fields: r ? [t, i, qe, Oe] : [t, Oe],
|
|
18173
18174
|
getPermanentAssetsPaths: !0,
|
|
18174
18175
|
isSiteBuilder: !0,
|
|
18175
18176
|
query: { recordId: [a] }
|
|
18176
18177
|
});
|
|
18177
18178
|
for (const A of c.items) {
|
|
18178
|
-
const d = r ? A[
|
|
18179
|
-
if (!r ||
|
|
18179
|
+
const d = r ? A[qe] : "", l = !d || k0(String(d));
|
|
18180
|
+
if (!r || l) {
|
|
18180
18181
|
const m = A[t];
|
|
18181
|
-
if (
|
|
18182
|
+
if (Me(m))
|
|
18182
18183
|
return m.URI;
|
|
18183
18184
|
}
|
|
18184
18185
|
if (r) {
|
|
18185
18186
|
const m = A[i];
|
|
18186
|
-
if (
|
|
18187
|
+
if (Me(m))
|
|
18187
18188
|
return m.URI;
|
|
18188
18189
|
}
|
|
18189
18190
|
}
|
|
@@ -18244,11 +18245,11 @@ class r2 {
|
|
|
18244
18245
|
let n = "";
|
|
18245
18246
|
typeof a.helpText == "function" ? n = a.helpText(this.host.blockAttributes) : a.helpText && (n = a.helpText);
|
|
18246
18247
|
const t = a.infoTextConfigs?.color, r = De(t ? { "--color": t } : {});
|
|
18247
|
-
return h`<cx-space class="config-form__info-text" direction="vertical" spacing="x-small" wrap="nowrap">${
|
|
18248
|
+
return h`<cx-space class="config-form__info-text" direction="vertical" spacing="x-small" wrap="nowrap">${v(
|
|
18248
18249
|
a.label,
|
|
18249
18250
|
() => h`<cx-typography variant="body3" style=${r}>${a.label}</cx-typography>`
|
|
18250
18251
|
)}
|
|
18251
|
-
${
|
|
18252
|
+
${v(
|
|
18252
18253
|
n,
|
|
18253
18254
|
() => h`<cx-typography variant="body3" class="config-form__help-text" style=${r}>${n}</cx-typography>`
|
|
18254
18255
|
)}</cx-space>`;
|
|
@@ -18270,7 +18271,7 @@ class r2 {
|
|
|
18270
18271
|
[
|
|
18271
18272
|
"asset-transformation",
|
|
18272
18273
|
() => {
|
|
18273
|
-
const
|
|
18274
|
+
const l = async (k) => {
|
|
18274
18275
|
await i({
|
|
18275
18276
|
format: k.detail.format,
|
|
18276
18277
|
manualFormat: k.detail.manualFormat,
|
|
@@ -18289,48 +18290,48 @@ class r2 {
|
|
|
18289
18290
|
} catch {
|
|
18290
18291
|
s = [];
|
|
18291
18292
|
}
|
|
18292
|
-
const o = a[d.assetTransformationConfigs?.formatKey ?? ""]?.toString() ?? "",
|
|
18293
|
-
return h`<cx-asset-transformation-dialog asset-id=${b} base-url=${this.host.baseUrl} can-reset default-format=${d.assetTransformationConfigs?.defaultFormat ?? ""} dialog-label=${d.assetTransformationConfigs?.dialogLabel ?? ""} is-site-builder token=${this.host.token} ?manual-format=${x} ?multiple=${d.assetTransformationConfigs?.multiple ?? !1} ?no-crop=${d.assetTransformationConfigs?.noCrop ?? !1} ?no-resize=${d.assetTransformationConfigs?.noResize ?? !1} ?no-rotate=${d.assetTransformationConfigs?.noRotate ?? !1} .boundary=${this.host.boundary} .format=${o} .transformations=${s} @cx-asset-transformation-dialog-confirm=${
|
|
18293
|
+
const o = a[d.assetTransformationConfigs?.formatKey ?? ""]?.toString() ?? "", g = d.assetTransformationConfigs?.manualFormatKey ?? "", C = a[g], x = C === !0 || C === "true", b = a[d.assetTransformationConfigs?.assetIdKey ?? ""]?.toString() ?? "";
|
|
18294
|
+
return h`<cx-asset-transformation-dialog asset-id=${b} base-url=${this.host.baseUrl} can-reset default-format=${d.assetTransformationConfigs?.defaultFormat ?? ""} dialog-label=${d.assetTransformationConfigs?.dialogLabel ?? ""} is-site-builder token=${this.host.token} ?manual-format=${x} ?multiple=${d.assetTransformationConfigs?.multiple ?? !1} ?no-crop=${d.assetTransformationConfigs?.noCrop ?? !1} ?no-resize=${d.assetTransformationConfigs?.noResize ?? !1} ?no-rotate=${d.assetTransformationConfigs?.noRotate ?? !1} .boundary=${this.host.boundary} .format=${o} .transformations=${s} @cx-asset-transformation-dialog-confirm=${l} @cx-asset-transformation-dialog-delete=${m}><cx-button slot="trigger">${this.localize.term("configure")}</cx-button></cx-asset-transformation-dialog>`;
|
|
18294
18295
|
}
|
|
18295
18296
|
],
|
|
18296
18297
|
[
|
|
18297
18298
|
"bicolor-picker",
|
|
18298
18299
|
() => {
|
|
18299
|
-
const
|
|
18300
|
-
return h`<cx-bicolor-picker value=${
|
|
18301
|
-
const o = s.detail.value,
|
|
18300
|
+
const l = B0(String(t));
|
|
18301
|
+
return h`<cx-bicolor-picker value=${l} @cx-bicolor-picker-change=${async (s) => {
|
|
18302
|
+
const o = s.detail.value, g = ye(
|
|
18302
18303
|
o[0],
|
|
18303
18304
|
o[1]
|
|
18304
18305
|
);
|
|
18305
|
-
await i(
|
|
18306
|
+
await i(g);
|
|
18306
18307
|
}}></cx-bicolor-picker>`;
|
|
18307
18308
|
}
|
|
18308
18309
|
],
|
|
18309
18310
|
[
|
|
18310
18311
|
"border-input-group",
|
|
18311
18312
|
() => {
|
|
18312
|
-
const
|
|
18313
|
-
const [s, o,
|
|
18313
|
+
const l = async (m) => {
|
|
18314
|
+
const [s, o, g] = m.detail.value, C = `${ye(s, o)} ${g}`;
|
|
18314
18315
|
await i(C);
|
|
18315
18316
|
};
|
|
18316
|
-
return h`<cx-border-input-group value=${typeof t == "string" ? D0(t) : t} @cx-border-input-group-change=${
|
|
18317
|
+
return h`<cx-border-input-group value=${typeof t == "string" ? D0(t) : t} @cx-border-input-group-change=${l}></cx-border-input-group>`;
|
|
18317
18318
|
}
|
|
18318
18319
|
],
|
|
18319
18320
|
[
|
|
18320
18321
|
"button-group",
|
|
18321
|
-
() => h`<cx-button-group class="config-form__button-group" value=${t ?? ""}>${
|
|
18322
|
+
() => h`<cx-button-group class="config-form__button-group" value=${t ?? ""}>${N(
|
|
18322
18323
|
d.options ?? [],
|
|
18323
|
-
(
|
|
18324
|
-
(
|
|
18324
|
+
(l) => l.value,
|
|
18325
|
+
(l) => {
|
|
18325
18326
|
const m = async () => {
|
|
18326
|
-
await i(String(
|
|
18327
|
+
await i(String(l.value));
|
|
18327
18328
|
};
|
|
18328
|
-
return h`<cx-button class=${
|
|
18329
|
-
"config-form__button-group--active": t ===
|
|
18330
|
-
})} variant="default" outline value=${
|
|
18331
|
-
${
|
|
18332
|
-
|
|
18333
|
-
() => h`<cx-icon name=${
|
|
18329
|
+
return h`<cx-button class=${_0({
|
|
18330
|
+
"config-form__button-group--active": t === l.value
|
|
18331
|
+
})} variant="default" outline value=${l.value} @click=${m}>${l.name}
|
|
18332
|
+
${v(
|
|
18333
|
+
l.icon,
|
|
18334
|
+
() => h`<cx-icon name=${l.icon} size="small" variant="outlined"></cx-icon>`
|
|
18334
18335
|
)}</cx-button>`;
|
|
18335
18336
|
}
|
|
18336
18337
|
)}</cx-button-group>`
|
|
@@ -18338,51 +18339,51 @@ class r2 {
|
|
|
18338
18339
|
[
|
|
18339
18340
|
"checkbox",
|
|
18340
18341
|
() => {
|
|
18341
|
-
const
|
|
18342
|
+
const l = async (s) => {
|
|
18342
18343
|
let o = s.target.checked;
|
|
18343
18344
|
s.target.checked && d.checkedValue !== void 0 ? o = d.checkedValue : d.uncheckedValue !== void 0 && !s.target.checked && (o = d.uncheckedValue), await i(o);
|
|
18344
18345
|
}, m = d.checkedValue === void 0 ? t : t === d.checkedValue;
|
|
18345
|
-
return h`<cx-checkbox ?checked=${m} ?disabled=${r ?? !1} @cx-change=${
|
|
18346
|
+
return h`<cx-checkbox ?checked=${m} ?disabled=${r ?? !1} @cx-change=${l}><cx-typography variant="body2" class="config-form__label">${d.label ?? ""}</cx-typography></cx-checkbox>`;
|
|
18346
18347
|
}
|
|
18347
18348
|
],
|
|
18348
18349
|
[
|
|
18349
18350
|
"checkbox-group",
|
|
18350
18351
|
() => {
|
|
18351
|
-
const
|
|
18352
|
-
const s = m.target, o = s.value,
|
|
18352
|
+
const l = async (m) => {
|
|
18353
|
+
const s = m.target, o = s.value, g = s.checked, C = t.split(" ").filter(Boolean);
|
|
18353
18354
|
let x;
|
|
18354
|
-
|
|
18355
|
+
g ? x = Be([...C, o]) : x = C.filter((b) => b !== o), await i(x.join(" "));
|
|
18355
18356
|
};
|
|
18356
|
-
return h`<cx-space class="config-form__checkbox-group" direction="vertical">${
|
|
18357
|
+
return h`<cx-space class="config-form__checkbox-group" direction="vertical">${N(
|
|
18357
18358
|
d.options ?? [],
|
|
18358
18359
|
(m) => m.value,
|
|
18359
18360
|
(m) => h`<cx-checkbox value=${m.value} ?checked=${t.includes(
|
|
18360
18361
|
m.value
|
|
18361
|
-
)} ?disabled=${r ?? !1} @cx-change=${
|
|
18362
|
+
)} ?disabled=${r ?? !1} @cx-change=${l}>${m.name}</cx-checkbox>`
|
|
18362
18363
|
)}</cx-space>`;
|
|
18363
18364
|
}
|
|
18364
18365
|
],
|
|
18365
18366
|
[
|
|
18366
18367
|
"corner-position-input-group",
|
|
18367
18368
|
() => {
|
|
18368
|
-
const { offsetX:
|
|
18369
|
+
const { offsetX: l, offsetY: m } = d.cornerStyleKey || {
|
|
18369
18370
|
offsetX: "--offset-x",
|
|
18370
18371
|
offsetY: "--offset-y"
|
|
18371
18372
|
}, s = async (o) => {
|
|
18372
|
-
const { offsetX:
|
|
18373
|
+
const { offsetX: g, offsetY: C, position: x } = o.detail;
|
|
18373
18374
|
await i({
|
|
18374
|
-
offsetX:
|
|
18375
|
+
offsetX: g,
|
|
18375
18376
|
offsetY: C,
|
|
18376
18377
|
position: x
|
|
18377
18378
|
});
|
|
18378
18379
|
};
|
|
18379
|
-
return h`<cx-corner-position-input-group position=${t ?? ""} offset-x=${this.host.blockStyles[
|
|
18380
|
+
return h`<cx-corner-position-input-group position=${t ?? ""} offset-x=${this.host.blockStyles[l] ?? "0px"} offset-y=${this.host.blockStyles[m] ?? "0px"} @cx-corner-position-input-group-change=${s}></cx-corner-position-input-group>`;
|
|
18380
18381
|
}
|
|
18381
18382
|
],
|
|
18382
18383
|
[
|
|
18383
18384
|
"download-format-picker",
|
|
18384
18385
|
() => {
|
|
18385
|
-
const
|
|
18386
|
+
const l = async (C) => {
|
|
18386
18387
|
await i(JSON.stringify(C.detail));
|
|
18387
18388
|
}, m = async () => {
|
|
18388
18389
|
await i(JSON.stringify({}));
|
|
@@ -18409,67 +18410,67 @@ class r2 {
|
|
|
18409
18410
|
}
|
|
18410
18411
|
else
|
|
18411
18412
|
o = a[d.downloadFormatPickerConfigs?.assetIdsKey ?? ""]?.toString().split(" ") ?? [];
|
|
18412
|
-
const
|
|
18413
|
-
return h`<cx-download-format-picker name=${a[
|
|
18413
|
+
const g = d.pickerConfigs?.nameKey ?? "name";
|
|
18414
|
+
return h`<cx-download-format-picker name=${a[g] ?? ""} .value=${s} .assetIds=${o} .prescribedDocTypes=${d.downloadFormatPickerConfigs?.prescribedDocTypes ?? []} ?required=${d.required ?? !1} ?disabled=${o.length === 0} @cx-download-format-select=${l} @cx-download-format-delete=${m} .onRequestDownloadFormat=${this.host.onRequestDownloadFormat}>${A}</cx-download-format-picker>`;
|
|
18414
18415
|
}
|
|
18415
18416
|
],
|
|
18416
18417
|
[
|
|
18417
18418
|
"asset-format-picker",
|
|
18418
18419
|
() => {
|
|
18419
|
-
const
|
|
18420
|
+
const l = async (b) => {
|
|
18420
18421
|
await i(b.detail.format, b.detail.assetVersion, b.detail.assetSrc, b.detail.versionLabel);
|
|
18421
|
-
}, m = t, s = a[d.assetFormatPickerConfigs?.assetVersionKey ?? ""] ??
|
|
18422
|
-
return h`<cx-asset-format-picker name=${a[x] ?? ""} .value=${
|
|
18422
|
+
}, m = t, s = a[d.assetFormatPickerConfigs?.assetVersionKey ?? ""] ?? Ie.Latest, o = a[d.assetFormatPickerConfigs?.versionLabelKey ?? ""] || void 0, g = m ? { assetVersion: s, format: m, versionLabel: o } : void 0, C = a[d.assetFormatPickerConfigs?.assetIdKey ?? ""]?.toString() ?? "", x = d.pickerConfigs?.nameKey ?? "name";
|
|
18423
|
+
return h`<cx-asset-format-picker name=${a[x] ?? ""} .value=${g} asset-id=${C} default-format=${d.assetFormatPickerConfigs?.defaultFormat ?? ""} ?required=${d.required ?? !1} @cx-asset-format-select=${l} .onRequestAssetFormat=${this.host.onRequestAssetFormat}>${A}</cx-asset-format-picker>`;
|
|
18423
18424
|
}
|
|
18424
18425
|
],
|
|
18425
18426
|
[
|
|
18426
18427
|
"file",
|
|
18427
18428
|
() => {
|
|
18428
|
-
const
|
|
18429
|
+
const l = d.accept, m = async (s) => {
|
|
18429
18430
|
const o = s.target.value;
|
|
18430
18431
|
await i(o);
|
|
18431
18432
|
};
|
|
18432
|
-
return h`<cx-input type="file" accept=${
|
|
18433
|
+
return h`<cx-input type="file" accept=${l} button-only file-button-label=${this.localize.term("choose")} @cx-change=${m}></cx-input>`;
|
|
18433
18434
|
}
|
|
18434
18435
|
],
|
|
18435
18436
|
[
|
|
18436
18437
|
"folder-picker",
|
|
18437
18438
|
() => {
|
|
18438
|
-
const
|
|
18439
|
+
const l = async (C) => {
|
|
18439
18440
|
C.detail && await i(C.detail.id);
|
|
18440
18441
|
}, m = async () => {
|
|
18441
18442
|
await i("");
|
|
18442
|
-
}, { useAllowedFolders: s, useFullPath: o, variant:
|
|
18443
|
-
return h`<cx-folder-picker value=${t} variant=${P(
|
|
18443
|
+
}, { useAllowedFolders: s, useFullPath: o, variant: g } = d.folderPickerConfigs ?? {};
|
|
18444
|
+
return h`<cx-folder-picker value=${t} variant=${P(g)} .boundary=${this.host.boundary} .allowedFolders=${s ? this.host.allowedFolders : []} ?use-fullpath=${o} ?multiple=${d.multiple} @cx-content-builder-folder-change=${l} @cx-content-builder-folder-delete=${m}></cx-folder-picker>`;
|
|
18444
18445
|
}
|
|
18445
18446
|
],
|
|
18446
18447
|
[
|
|
18447
18448
|
"gallery-picker",
|
|
18448
18449
|
() => {
|
|
18449
|
-
const
|
|
18450
|
+
const l = async (o) => {
|
|
18450
18451
|
await i(o.detail.data);
|
|
18451
18452
|
}, m = async (o) => {
|
|
18452
18453
|
await i(o.detail.data, !0);
|
|
18453
18454
|
}, s = a[d.galleryPickerConfigs?.manualFormatKey ?? ""] === !0 || a[d.galleryPickerConfigs?.manualFormatKey ?? ""] === "true";
|
|
18454
|
-
return h`<cx-gallery-picker src=${a.src ?? ""} format=${a[d.galleryPickerConfigs?.formatKey ?? ""] ?? ""} ?manual-format=${s} source-variant=${a["source-variant"] ?? ""} dialog-variant=${d.galleryPickerConfigs?.dialog ?? U.Gallery} name=${c} value=${t ?? "[]"} variant=${a["card-type"] ?? "asset"} .boundary=${this.host.boundary} .onRequestAsset=${this.host.onRequestAsset} @cx-content-builder-gallery-change=${
|
|
18455
|
+
return h`<cx-gallery-picker src=${a.src ?? ""} format=${a[d.galleryPickerConfigs?.formatKey ?? ""] ?? ""} ?manual-format=${s} source-variant=${a["source-variant"] ?? ""} dialog-variant=${d.galleryPickerConfigs?.dialog ?? U.Gallery} name=${c} value=${t ?? "[]"} variant=${a["card-type"] ?? "asset"} .boundary=${this.host.boundary} .onRequestAsset=${this.host.onRequestAsset} @cx-content-builder-gallery-change=${l} @cx-content-builder-gallery-fetched=${m}></cx-gallery-picker>`;
|
|
18455
18456
|
}
|
|
18456
18457
|
],
|
|
18457
18458
|
[
|
|
18458
18459
|
"group",
|
|
18459
18460
|
() => {
|
|
18460
|
-
const
|
|
18461
|
-
return h`<cx-space direction="vertical" spacing="small" wrap=${P(
|
|
18461
|
+
const l = d.groupConfigs?.direction === "horizontal";
|
|
18462
|
+
return h`<cx-space direction="vertical" spacing="small" wrap=${P(l ? "nowrap" : void 0)}>${this.renderBasicControls(d.children ?? [], d)}</cx-space>`;
|
|
18462
18463
|
}
|
|
18463
18464
|
],
|
|
18464
18465
|
[
|
|
18465
18466
|
"image-picker",
|
|
18466
18467
|
() => {
|
|
18467
|
-
const
|
|
18468
|
+
const l = async (o) => {
|
|
18468
18469
|
if (Array.isArray(o.detail))
|
|
18469
18470
|
return;
|
|
18470
|
-
const { id:
|
|
18471
|
+
const { id: g, src: C } = o.detail;
|
|
18471
18472
|
await i({
|
|
18472
|
-
id:
|
|
18473
|
+
id: g,
|
|
18473
18474
|
src: C
|
|
18474
18475
|
});
|
|
18475
18476
|
}, m = async () => {
|
|
@@ -18478,54 +18479,54 @@ class r2 {
|
|
|
18478
18479
|
src: ""
|
|
18479
18480
|
});
|
|
18480
18481
|
}, s = d.pickerConfigs?.recordIdKey ?? "record-id";
|
|
18481
|
-
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="image" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${
|
|
18482
|
+
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="image" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${l} @cx-content-builder-asset-delete=${m} .onRequestAsset=${this.host.onRequestAsset}>${A}</cx-asset-picker>`;
|
|
18482
18483
|
}
|
|
18483
18484
|
],
|
|
18484
18485
|
[
|
|
18485
18486
|
"list-editor",
|
|
18486
18487
|
() => {
|
|
18487
|
-
const
|
|
18488
|
+
const l = async (k) => {
|
|
18488
18489
|
await i(k.detail.data);
|
|
18489
18490
|
}, {
|
|
18490
18491
|
addDialogLabel: m,
|
|
18491
18492
|
addItemText: s,
|
|
18492
18493
|
columns: o,
|
|
18493
|
-
displayField:
|
|
18494
|
+
displayField: g,
|
|
18494
18495
|
editDialogLabel: C,
|
|
18495
18496
|
noHeader: x,
|
|
18496
18497
|
sampleItem: b
|
|
18497
18498
|
} = d.listEditorConfigs ?? {};
|
|
18498
|
-
return h`<cx-list-editor data=${t} default-language=${this.host.defaultLanguage} add-dialog-label=${m} add-item-text=${s} edit-dialog-label=${C} display-field=${
|
|
18499
|
+
return h`<cx-list-editor data=${t} default-language=${this.host.defaultLanguage} add-dialog-label=${m} add-item-text=${s} edit-dialog-label=${C} display-field=${g} can-add sortable ?no-header=${x} .boundary=${this.host.boundary} .columns=${o} .sampleItem=${b} .supportedLanguages=${this.host.sortedLanguages} .onRequestAsset=${this.host.onRequestAsset} @cx-list-editor-change=${l}></cx-list-editor>`;
|
|
18499
18500
|
}
|
|
18500
18501
|
],
|
|
18501
18502
|
[
|
|
18502
18503
|
"dam-custom-toolbar-buttons",
|
|
18503
18504
|
() => {
|
|
18504
|
-
const
|
|
18505
|
+
const l = async (s) => {
|
|
18505
18506
|
await i(s.detail.data);
|
|
18506
18507
|
}, { columns: m } = d.listEditorConfigs ?? {};
|
|
18507
|
-
return h`<cx-dam-custom-toolbar-buttons-editor data=${t} .columns=${m ?? []} .boundary=${this.host.boundary} .onConfigureWorkflow=${this.host.onConfigureWorkflow} @cx-list-editor-change=${
|
|
18508
|
+
return h`<cx-dam-custom-toolbar-buttons-editor data=${t} .columns=${m ?? []} .boundary=${this.host.boundary} .onConfigureWorkflow=${this.host.onConfigureWorkflow} @cx-list-editor-change=${l}></cx-dam-custom-toolbar-buttons-editor>`;
|
|
18508
18509
|
}
|
|
18509
18510
|
],
|
|
18510
18511
|
[
|
|
18511
18512
|
"type-subtype-select",
|
|
18512
18513
|
() => {
|
|
18513
|
-
const { api:
|
|
18514
|
-
return !s && !this.pendingTypeSubtypeOptionsFetches.has(d.id) && (this.pendingTypeSubtypeOptionsFetches.add(d.id),
|
|
18515
|
-
this.typeSubtypeOptionsCache.set(d.id,
|
|
18514
|
+
const { api: l, multiple: m } = d.typeSubtypeSelectConfigs, s = this.typeSubtypeOptionsCache.get(d.id);
|
|
18515
|
+
return !s && !this.pendingTypeSubtypeOptionsFetches.has(d.id) && (this.pendingTypeSubtypeOptionsFetches.add(d.id), l().then((g) => {
|
|
18516
|
+
this.typeSubtypeOptionsCache.set(d.id, g), this.host.requestUpdate();
|
|
18516
18517
|
}).catch(() => {
|
|
18517
18518
|
}).finally(() => {
|
|
18518
18519
|
this.pendingTypeSubtypeOptionsFetches.delete(d.id);
|
|
18519
|
-
})), h`<cx-type-subtype-select value=${t ?? ""} .options=${s ?? []} ?multiple=${m ?? !1} @cx-change=${async (
|
|
18520
|
-
await i(
|
|
18520
|
+
})), h`<cx-type-subtype-select value=${t ?? ""} .options=${s ?? []} ?multiple=${m ?? !1} @cx-change=${async (g) => {
|
|
18521
|
+
await i(g.target.value);
|
|
18521
18522
|
}}></cx-type-subtype-select>`;
|
|
18522
18523
|
}
|
|
18523
18524
|
],
|
|
18524
18525
|
[
|
|
18525
18526
|
"other-picker",
|
|
18526
18527
|
() => {
|
|
18527
|
-
const
|
|
18528
|
-
const
|
|
18528
|
+
const l = async (o) => {
|
|
18529
|
+
const g = Array.isArray(o.detail) ? o.detail : [o.detail], C = g.map((_) => _.id).join(" "), x = g.map((_) => _.src).join(" "), b = g.map((_) => _.representative ?? "").join(" "), k = g.map((_) => _.name).join(", "), E = g.map((_) => _.type).join(" "), S = g.map((_) => _.extension ?? "").join(" "), p = g.map((_) => _.identifier ?? "").join(" ");
|
|
18529
18530
|
await i({
|
|
18530
18531
|
extension: S,
|
|
18531
18532
|
id: C,
|
|
@@ -18533,7 +18534,7 @@ class r2 {
|
|
|
18533
18534
|
name: k,
|
|
18534
18535
|
representative: b,
|
|
18535
18536
|
src: x,
|
|
18536
|
-
type:
|
|
18537
|
+
type: E
|
|
18537
18538
|
});
|
|
18538
18539
|
}, m = async () => {
|
|
18539
18540
|
await i({
|
|
@@ -18546,21 +18547,21 @@ class r2 {
|
|
|
18546
18547
|
type: ""
|
|
18547
18548
|
});
|
|
18548
18549
|
}, s = d.pickerConfigs?.recordIdKey ?? "record-id";
|
|
18549
|
-
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="other" name=${a[d.pickerConfigs?.nameKey ?? "name"] ?? ""} ?multiple=${d.pickerConfigs?.multiple ?? !1} ?required=${d.required ?? !1} .accepts=${d.pickerConfigs?.accepts ?? []} @cx-content-builder-asset-select=${
|
|
18550
|
+
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="other" name=${a[d.pickerConfigs?.nameKey ?? "name"] ?? ""} ?multiple=${d.pickerConfigs?.multiple ?? !1} ?required=${d.required ?? !1} .accepts=${d.pickerConfigs?.accepts ?? []} @cx-content-builder-asset-select=${l} @cx-content-builder-asset-delete=${m} .onRequestAsset=${this.host.onRequestAsset}>${A}</cx-asset-picker>`;
|
|
18550
18551
|
}
|
|
18551
18552
|
],
|
|
18552
18553
|
[
|
|
18553
18554
|
"all-picker",
|
|
18554
18555
|
() => {
|
|
18555
|
-
const
|
|
18556
|
-
const
|
|
18556
|
+
const l = async (o) => {
|
|
18557
|
+
const g = Array.isArray(o.detail) ? o.detail : [o.detail], C = g.map((p) => p.id).join(" "), x = g.map((p) => p.src).join(" "), b = g.map((p) => p.representative ?? "").join(" "), k = g.map((p) => p.name).join(", "), E = g.map((p) => p.type).join(" "), S = g.map((p) => p.extension ?? "").join(" ");
|
|
18557
18558
|
await i({
|
|
18558
18559
|
extension: S,
|
|
18559
18560
|
id: C,
|
|
18560
18561
|
name: k,
|
|
18561
18562
|
representative: b,
|
|
18562
18563
|
src: x,
|
|
18563
|
-
type:
|
|
18564
|
+
type: E
|
|
18564
18565
|
});
|
|
18565
18566
|
}, m = async () => {
|
|
18566
18567
|
await i({
|
|
@@ -18572,7 +18573,7 @@ class r2 {
|
|
|
18572
18573
|
type: ""
|
|
18573
18574
|
});
|
|
18574
18575
|
}, s = d.pickerConfigs?.recordIdKey ?? "record-id";
|
|
18575
|
-
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="all" name=${a[d.pickerConfigs?.nameKey ?? "name"] ?? ""} ?multiple=${d.pickerConfigs?.multiple ?? !1} ?required=${d.required ?? !1} .accepts=${d.pickerConfigs?.accepts ?? []} @cx-content-builder-asset-select=${
|
|
18576
|
+
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} value=${t} type="all" name=${a[d.pickerConfigs?.nameKey ?? "name"] ?? ""} ?multiple=${d.pickerConfigs?.multiple ?? !1} ?required=${d.required ?? !1} .accepts=${d.pickerConfigs?.accepts ?? []} @cx-content-builder-asset-select=${l} @cx-content-builder-asset-delete=${m} .onRequestAsset=${this.host.onRequestAsset}>${A}</cx-asset-picker>`;
|
|
18576
18577
|
}
|
|
18577
18578
|
],
|
|
18578
18579
|
[
|
|
@@ -18585,7 +18586,7 @@ class r2 {
|
|
|
18585
18586
|
[
|
|
18586
18587
|
"page-picker",
|
|
18587
18588
|
() => {
|
|
18588
|
-
const
|
|
18589
|
+
const l = async (s) => {
|
|
18589
18590
|
s.detail && await i({
|
|
18590
18591
|
id: s.detail.id,
|
|
18591
18592
|
url: s.detail.url
|
|
@@ -18596,7 +18597,7 @@ class r2 {
|
|
|
18596
18597
|
url: ""
|
|
18597
18598
|
});
|
|
18598
18599
|
};
|
|
18599
|
-
return h`<cx-page-picker value=${t} .boundary=${this.host.boundary} ?required=${d.required ?? !1} @cx-content-builder-page-change=${
|
|
18600
|
+
return h`<cx-page-picker value=${t} .boundary=${this.host.boundary} ?required=${d.required ?? !1} @cx-content-builder-page-change=${l} @cx-content-builder-page-delete=${m}></cx-page-picker>`;
|
|
18600
18601
|
}
|
|
18601
18602
|
],
|
|
18602
18603
|
[
|
|
@@ -18610,15 +18611,15 @@ class r2 {
|
|
|
18610
18611
|
"radio-card-group",
|
|
18611
18612
|
() => h`<cx-radio-group name=${c} value=${t ?? ""} size="medium" items-per-row="3" horizontal @cx-change=${async (m) => {
|
|
18612
18613
|
await i(m.target.value);
|
|
18613
|
-
}}>${
|
|
18614
|
+
}}>${N(
|
|
18614
18615
|
d.options ?? [],
|
|
18615
18616
|
(m) => m.value,
|
|
18616
18617
|
(m) => h`<cx-radio-card value=${m.value} ?disabled=${m.disabled}>${m.name}
|
|
18617
|
-
${
|
|
18618
|
+
${v(
|
|
18618
18619
|
m.children,
|
|
18619
18620
|
() => h`<div slot="image" class="config-form__radio-card-image">${m.children}</div>`
|
|
18620
18621
|
)}
|
|
18621
|
-
${
|
|
18622
|
+
${v(
|
|
18622
18623
|
m.helpText,
|
|
18623
18624
|
() => h`<cx-typography variant="small" class="config-form__help-text">${m.helpText}</cx-typography>`
|
|
18624
18625
|
)}</cx-radio-card>`
|
|
@@ -18627,31 +18628,31 @@ class r2 {
|
|
|
18627
18628
|
[
|
|
18628
18629
|
"radio-group",
|
|
18629
18630
|
() => {
|
|
18630
|
-
const
|
|
18631
|
+
const l = async (s) => {
|
|
18631
18632
|
await i(s.target.value);
|
|
18632
18633
|
};
|
|
18633
18634
|
let m = d.radioGroupConfigs?.gap;
|
|
18634
18635
|
return m || (m = d.radioGroupConfigs?.horizontal ? "var(--cx-spacing-medium)" : "var(--cx-spacing-x-small)"), h`<cx-radio-group name=${c} value=${t ?? ""} size="medium" ?horizontal=${d.radioGroupConfigs?.horizontal ?? !1} style=${De({
|
|
18635
18636
|
"--radio-group-gap": m
|
|
18636
|
-
})} @cx-change=${
|
|
18637
|
+
})} @cx-change=${l}>${N(
|
|
18637
18638
|
d.options ?? [],
|
|
18638
18639
|
(s) => s.value,
|
|
18639
|
-
(s) => h`<cx-radio value=${s.value} ?disabled=${s.disabled}><cx-typography variant="body2" class="config-form__label">${s.name}</cx-typography>${
|
|
18640
|
+
(s) => h`<cx-radio value=${s.value} ?disabled=${s.disabled}><cx-typography variant="body2" class="config-form__label">${s.name}</cx-typography>${v(s.helpText, () => h`<cx-typography variant="small" class="config-form__help-text">${s.helpText}</cx-typography>`)}</cx-radio>`
|
|
18640
18641
|
)}</cx-radio-group>`;
|
|
18641
18642
|
}
|
|
18642
18643
|
],
|
|
18643
18644
|
[
|
|
18644
18645
|
"select",
|
|
18645
18646
|
() => {
|
|
18646
|
-
const
|
|
18647
|
-
let
|
|
18648
|
-
Array.isArray(
|
|
18647
|
+
const l = async (o) => {
|
|
18648
|
+
let g = o.target.value;
|
|
18649
|
+
Array.isArray(g) ? g = g.join(" ") : g = String(g), await i(g);
|
|
18649
18650
|
}, m = d.selectConfigs?.fullWidthPopup ? n?.value : void 0, s = d.tableSelectConfigs?.columns ?? [];
|
|
18650
|
-
return d.api ? h`<cx-dynamic-select auto-size-padding=${s.length > 0 ? 100 : 10} class="config-form__select" data-label=${d.label ?? ""} hoist label=${d.inputConfigs?.label ?? ""} max-options-visible="0" placement=${P(d.selectConfigs?.placement)} value=${t ?? ""} .api=${d.api} .columns=${s} .syncElement=${P(m)} ?auto-fallback-first-option=${d.selectConfigs?.autoFallbackFirstOption ?? !1} ?clearable=${d.clearable ?? !0} ?disabled=${r} ?free-width=${s.length > 0} ?multiple=${d.multiple ?? !1} ?required=${d.required ?? !1} ?use-search-term=${d.useSearchTerm ?? !1} @cx-change=${
|
|
18651
|
+
return d.api ? h`<cx-dynamic-select auto-size-padding=${s.length > 0 ? 100 : 10} class="config-form__select" data-label=${d.label ?? ""} hoist label=${d.inputConfigs?.label ?? ""} max-options-visible="0" placement=${P(d.selectConfigs?.placement)} value=${t ?? ""} .api=${d.api} .columns=${s} .syncElement=${P(m)} ?auto-fallback-first-option=${d.selectConfigs?.autoFallbackFirstOption ?? !1} ?clearable=${d.clearable ?? !0} ?disabled=${r} ?free-width=${s.length > 0} ?multiple=${d.multiple ?? !1} ?required=${d.required ?? !1} ?use-search-term=${d.useSearchTerm ?? !1} @cx-change=${l}></cx-dynamic-select>` : h`<cx-select class="config-form__select" value=${t ?? ""} hoist label=${d.inputConfigs?.label ?? ""} ?clearable=${d.clearable ?? !0} ?disabled=${r} placement=${P(d.selectConfigs?.placement)} .syncElement=${P(m)} @cx-change=${l}>${N(
|
|
18651
18652
|
d.options ?? [],
|
|
18652
18653
|
(o) => o.value,
|
|
18653
|
-
(o) => h`<cx-option value=${o.value} show-check check-placement=${
|
|
18654
|
-
${
|
|
18654
|
+
(o) => h`<cx-option value=${o.value} show-check check-placement=${G1.Right}>${o.name}
|
|
18655
|
+
${v(
|
|
18655
18656
|
o.helpText,
|
|
18656
18657
|
() => h`<cx-typography slot="help-text" variant="small">${o.helpText}</cx-typography>`
|
|
18657
18658
|
)}</cx-option>`
|
|
@@ -18661,17 +18662,17 @@ class r2 {
|
|
|
18661
18662
|
[
|
|
18662
18663
|
"shadow-input-group",
|
|
18663
18664
|
() => {
|
|
18664
|
-
const
|
|
18665
|
-
const [s, o,
|
|
18665
|
+
const l = async (m) => {
|
|
18666
|
+
const [s, o, g, C, x, b] = m.detail.value, k = x || b, E = b || x, S = `${[s, o, g, C].join(" ")} ${ye(k, E)}`;
|
|
18666
18667
|
await i(S);
|
|
18667
18668
|
};
|
|
18668
|
-
return h`<cx-shadow-input-group value=${typeof t == "string" ? F0(t) : t} @cx-shadow-input-group-change=${
|
|
18669
|
+
return h`<cx-shadow-input-group value=${typeof t == "string" ? F0(t) : t} @cx-shadow-input-group-change=${l}></cx-shadow-input-group>`;
|
|
18669
18670
|
}
|
|
18670
18671
|
],
|
|
18671
18672
|
[
|
|
18672
18673
|
"size-input-group",
|
|
18673
18674
|
() => {
|
|
18674
|
-
const
|
|
18675
|
+
const l = async (m) => {
|
|
18675
18676
|
const { keepRatio: s, value: o } = m.target;
|
|
18676
18677
|
await i({
|
|
18677
18678
|
height: o[1],
|
|
@@ -18679,18 +18680,18 @@ class r2 {
|
|
|
18679
18680
|
width: o[0]
|
|
18680
18681
|
});
|
|
18681
18682
|
};
|
|
18682
|
-
return h`<cx-size-input-group value=${t} ?use-mask=${d.sizeInputGroupConfigs?.useMask ?? !1} ?keep-ratio=${a["keep-ratio"] ?? !1} @cx-change=${
|
|
18683
|
+
return h`<cx-size-input-group value=${t} ?use-mask=${d.sizeInputGroupConfigs?.useMask ?? !1} ?keep-ratio=${a["keep-ratio"] ?? !1} @cx-change=${l}></cx-size-input-group>`;
|
|
18683
18684
|
}
|
|
18684
18685
|
],
|
|
18685
18686
|
[
|
|
18686
18687
|
"switch",
|
|
18687
18688
|
() => {
|
|
18688
|
-
const
|
|
18689
|
+
const l = async (o) => {
|
|
18689
18690
|
await i({
|
|
18690
18691
|
checked: o.target.checked,
|
|
18691
18692
|
value: o.target.value
|
|
18692
18693
|
});
|
|
18693
|
-
}, m = d.checkedValue === void 0 ? t : t === d.checkedValue, s = h`<cx-switch ?checked=${m} ?disabled=${r} value=${t ?? ""} @cx-change=${
|
|
18694
|
+
}, m = d.checkedValue === void 0 ? t : t === d.checkedValue, s = h`<cx-switch ?checked=${m} ?disabled=${r} value=${t ?? ""} @cx-change=${l}>${v(
|
|
18694
18695
|
d.inputConfigs?.label,
|
|
18695
18696
|
() => d.inputConfigs?.label
|
|
18696
18697
|
)}</cx-switch>`;
|
|
@@ -18700,16 +18701,16 @@ class r2 {
|
|
|
18700
18701
|
[
|
|
18701
18702
|
"audio-picker",
|
|
18702
18703
|
() => {
|
|
18703
|
-
const
|
|
18704
|
-
if (Array.isArray(
|
|
18704
|
+
const l = async (g) => {
|
|
18705
|
+
if (Array.isArray(g.detail))
|
|
18705
18706
|
return;
|
|
18706
|
-
const { id: C, name: x, parentAssetID: b, representative: k, src:
|
|
18707
|
+
const { id: C, name: x, parentAssetID: b, representative: k, src: E } = g.detail;
|
|
18707
18708
|
await i({
|
|
18708
18709
|
id: C,
|
|
18709
18710
|
name: x,
|
|
18710
18711
|
parentAssetID: b,
|
|
18711
18712
|
representative: k,
|
|
18712
|
-
src:
|
|
18713
|
+
src: E
|
|
18713
18714
|
});
|
|
18714
18715
|
}, m = async () => {
|
|
18715
18716
|
await i({
|
|
@@ -18720,16 +18721,16 @@ class r2 {
|
|
|
18720
18721
|
src: ""
|
|
18721
18722
|
});
|
|
18722
18723
|
}, s = d.pickerConfigs?.recordIdKey ?? "record-id", o = d.pickerConfigs?.nameKey ?? "name";
|
|
18723
|
-
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} name=${a[o] ?? ""} value=${t} type="audio" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${
|
|
18724
|
+
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} name=${a[o] ?? ""} value=${t} type="audio" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${l} @cx-content-builder-asset-delete=${m} .onRequestAsset=${this.host.onRequestAsset}>${A}</cx-asset-picker>`;
|
|
18724
18725
|
}
|
|
18725
18726
|
],
|
|
18726
18727
|
[
|
|
18727
18728
|
"video-picker",
|
|
18728
18729
|
() => {
|
|
18729
|
-
const
|
|
18730
|
-
if (Array.isArray(
|
|
18730
|
+
const l = async (g) => {
|
|
18731
|
+
if (Array.isArray(g.detail))
|
|
18731
18732
|
return;
|
|
18732
|
-
const { id: C, name: x, src: b } =
|
|
18733
|
+
const { id: C, name: x, src: b } = g.detail;
|
|
18733
18734
|
await i({
|
|
18734
18735
|
id: C,
|
|
18735
18736
|
name: x,
|
|
@@ -18741,38 +18742,38 @@ class r2 {
|
|
|
18741
18742
|
src: ""
|
|
18742
18743
|
});
|
|
18743
18744
|
}, s = d.pickerConfigs?.recordIdKey ?? "record-id", o = d.pickerConfigs?.nameKey ?? "name";
|
|
18744
|
-
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} name=${a[o] ?? ""} value=${t} type="video" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${
|
|
18745
|
+
return h`<cx-asset-picker is-site-builder record-id=${P(t ? a[s] : void 0)} name=${a[o] ?? ""} value=${t} type="video" restrict ?disabled=${r ?? !1} @cx-content-builder-asset-select=${l} @cx-content-builder-asset-delete=${m} .onRequestAsset=${this.host.onRequestAsset}>${A}</cx-asset-picker>`;
|
|
18745
18746
|
}
|
|
18746
18747
|
],
|
|
18747
18748
|
[
|
|
18748
18749
|
"color-swatch-picker",
|
|
18749
18750
|
() => {
|
|
18750
|
-
const
|
|
18751
|
-
const { args: C } =
|
|
18752
|
-
let
|
|
18751
|
+
const l = async (g) => {
|
|
18752
|
+
const { args: C } = g.detail, x = C[0], b = x.getData(), k = x.getPosition();
|
|
18753
|
+
let E = [];
|
|
18753
18754
|
try {
|
|
18754
|
-
|
|
18755
|
+
E = JSON.parse(t) || [];
|
|
18755
18756
|
} catch {
|
|
18756
|
-
|
|
18757
|
+
E = [];
|
|
18757
18758
|
}
|
|
18758
|
-
const S =
|
|
18759
|
+
const S = E.filter(
|
|
18759
18760
|
(p) => p.id !== b.id
|
|
18760
18761
|
);
|
|
18761
18762
|
k && (S.splice(k - 1, 0, b), await i(JSON.stringify(S)));
|
|
18762
|
-
}, m = async (
|
|
18763
|
-
const { args: C } =
|
|
18763
|
+
}, m = async (g) => {
|
|
18764
|
+
const { args: C } = g.detail, b = C[0].getData();
|
|
18764
18765
|
let k = [];
|
|
18765
18766
|
try {
|
|
18766
18767
|
k = JSON.parse(t) || [];
|
|
18767
18768
|
} catch {
|
|
18768
18769
|
k = [];
|
|
18769
18770
|
}
|
|
18770
|
-
const
|
|
18771
|
+
const E = k.filter(
|
|
18771
18772
|
(S) => S.id !== b.id
|
|
18772
18773
|
);
|
|
18773
|
-
await i(JSON.stringify(
|
|
18774
|
-
}, s = async (
|
|
18775
|
-
const { detail: C } =
|
|
18774
|
+
await i(JSON.stringify(E));
|
|
18775
|
+
}, s = async (g) => {
|
|
18776
|
+
const { detail: C } = g;
|
|
18776
18777
|
if (!C)
|
|
18777
18778
|
return;
|
|
18778
18779
|
let x = [];
|
|
@@ -18783,8 +18784,8 @@ class r2 {
|
|
|
18783
18784
|
}
|
|
18784
18785
|
const b = [...x, C];
|
|
18785
18786
|
await i(JSON.stringify(b));
|
|
18786
|
-
}, o = async (
|
|
18787
|
-
const { detail: C } =
|
|
18787
|
+
}, o = async (g) => {
|
|
18788
|
+
const { detail: C } = g;
|
|
18788
18789
|
if (!C)
|
|
18789
18790
|
return;
|
|
18790
18791
|
let x = [];
|
|
@@ -18798,47 +18799,47 @@ class r2 {
|
|
|
18798
18799
|
);
|
|
18799
18800
|
await i(JSON.stringify(b));
|
|
18800
18801
|
};
|
|
18801
|
-
return h`<cx-color-swatch-picker data=${t} default-language=${this.host.defaultLanguage} .boundary=${this.host.boundary} .supportedLanguages=${this.host.sortedLanguages} ?disable-table-load=${!this.host.isAfterShow} @cx-color-swatch-picker-add=${s} @cx-color-swatch-picker-edit=${o} @cx-table.rowMoved=${
|
|
18802
|
+
return h`<cx-color-swatch-picker data=${t} default-language=${this.host.defaultLanguage} .boundary=${this.host.boundary} .supportedLanguages=${this.host.sortedLanguages} ?disable-table-load=${!this.host.isAfterShow} @cx-color-swatch-picker-add=${s} @cx-color-swatch-picker-edit=${o} @cx-table.rowMoved=${l} @cx-table.rowDeleted=${m}></cx-color-swatch-picker>`;
|
|
18802
18803
|
}
|
|
18803
18804
|
],
|
|
18804
18805
|
[
|
|
18805
18806
|
"icon-picker",
|
|
18806
18807
|
() => {
|
|
18807
|
-
const
|
|
18808
|
+
const l = async (m) => {
|
|
18808
18809
|
const o = m.target.value;
|
|
18809
18810
|
await i(o);
|
|
18810
18811
|
};
|
|
18811
|
-
return h`<cx-icon-picker value=${t} ?clearable=${d.clearable ?? !0} @cx-change=${
|
|
18812
|
+
return h`<cx-icon-picker value=${t} ?clearable=${d.clearable ?? !0} @cx-change=${l} .onRequestAsset=${this.host.onRequestAsset}></cx-icon-picker>`;
|
|
18812
18813
|
}
|
|
18813
18814
|
],
|
|
18814
18815
|
[
|
|
18815
18816
|
"font-picker",
|
|
18816
18817
|
() => {
|
|
18817
18818
|
const {
|
|
18818
|
-
api:
|
|
18819
|
+
api: l,
|
|
18819
18820
|
familyKey: m,
|
|
18820
18821
|
styleKey: s,
|
|
18821
18822
|
weightKey: o
|
|
18822
|
-
} = d.fontPickerConfigs,
|
|
18823
|
+
} = d.fontPickerConfigs, g = this.fontFamiliesCache.get(d.id), { familyValue: C, styleValue: x } = g ? l1({
|
|
18823
18824
|
blockAttributes: this.host.blockStyles,
|
|
18824
18825
|
keys: {
|
|
18825
18826
|
familyKey: m,
|
|
18826
18827
|
styleKey: s,
|
|
18827
18828
|
weightKey: o
|
|
18828
18829
|
},
|
|
18829
|
-
typefaces:
|
|
18830
|
+
typefaces: g
|
|
18830
18831
|
}) : {
|
|
18831
18832
|
familyValue: String(
|
|
18832
18833
|
this.host.blockStyles[m] ?? n1
|
|
18833
18834
|
),
|
|
18834
18835
|
styleValue: ""
|
|
18835
18836
|
};
|
|
18836
|
-
!
|
|
18837
|
+
!g && !this.pendingFontFamilyFetches.has(d.id) && (this.pendingFontFamilyFetches.add(d.id), Promise.all([l(), this.apiGetTeamSpaceFontFamily()]).then(([k, E]) => {
|
|
18837
18838
|
this.fontFamiliesCache.set(
|
|
18838
18839
|
d.id,
|
|
18839
18840
|
C1(
|
|
18840
18841
|
k,
|
|
18841
|
-
|
|
18842
|
+
E?.fontFamily ?? ""
|
|
18842
18843
|
)
|
|
18843
18844
|
), this.host.requestUpdate();
|
|
18844
18845
|
}).catch(() => {
|
|
@@ -18846,10 +18847,10 @@ class r2 {
|
|
|
18846
18847
|
this.pendingFontFamilyFetches.delete(d.id);
|
|
18847
18848
|
}));
|
|
18848
18849
|
const b = async (k) => {
|
|
18849
|
-
const
|
|
18850
|
+
const E = k.target, S = this.fontFamiliesCache.get(d.id) ?? [], p = x1({
|
|
18850
18851
|
clearDefaultFamily: !0,
|
|
18851
|
-
familyValue:
|
|
18852
|
-
styleValue:
|
|
18852
|
+
familyValue: E.familyValue,
|
|
18853
|
+
styleValue: E.styleValue,
|
|
18853
18854
|
typefaces: S
|
|
18854
18855
|
});
|
|
18855
18856
|
await i({
|
|
@@ -18858,59 +18859,59 @@ class r2 {
|
|
|
18858
18859
|
weight: p.weight
|
|
18859
18860
|
});
|
|
18860
18861
|
};
|
|
18861
|
-
return h`<cx-font-picker family-value=${C} style-value=${x} layout=${y1.Labeled} ?required=${d.required ?? !1} .fontTypefaces=${
|
|
18862
|
+
return h`<cx-font-picker family-value=${C} style-value=${x} layout=${y1.Labeled} ?required=${d.required ?? !1} .fontTypefaces=${g ?? []} @cx-font-picker-change=${b}></cx-font-picker>`;
|
|
18862
18863
|
}
|
|
18863
18864
|
]
|
|
18864
18865
|
],
|
|
18865
18866
|
() => {
|
|
18866
|
-
const
|
|
18867
|
+
const l = be(), m = be(), s = { unit: "%", value: "100" }, { unit: o, value: g } = typeof t == "string" ? S0(t) ?? s : s;
|
|
18867
18868
|
let C = t, x, b = d.maskBlocks, k = o;
|
|
18868
|
-
const
|
|
18869
|
+
const E = () => {
|
|
18869
18870
|
if (d.inputConfigs?.validation) {
|
|
18870
18871
|
const p = d.inputConfigs?.validation(
|
|
18871
18872
|
this.host.blockAttributes
|
|
18872
18873
|
);
|
|
18873
|
-
|
|
18874
|
+
l.value?.setCustomValidity(p ?? "");
|
|
18874
18875
|
}
|
|
18875
18876
|
}, S = async (p) => {
|
|
18876
|
-
let
|
|
18877
|
+
let _ = t;
|
|
18877
18878
|
if (p.target instanceof oe)
|
|
18878
|
-
m.value ?
|
|
18879
|
+
m.value ? _ = `${p.target.value}${k}` : _ = p.target.value;
|
|
18879
18880
|
else if (p.target instanceof Se) {
|
|
18880
|
-
let
|
|
18881
|
-
k =
|
|
18881
|
+
let Y = p.currentTarget.value ?? "", X = p.target.value;
|
|
18882
|
+
k = X;
|
|
18882
18883
|
for (const re of d.inputConfigs?.suffix?.options ?? [])
|
|
18883
18884
|
if (re.value === k && re.dataId) {
|
|
18884
|
-
|
|
18885
|
+
Y = a[re.dataId] ?? C, X = "";
|
|
18885
18886
|
break;
|
|
18886
18887
|
}
|
|
18887
|
-
|
|
18888
|
+
_ = Y ? `${Y}${X}` : "";
|
|
18888
18889
|
}
|
|
18889
|
-
await i(
|
|
18890
|
+
await i(_);
|
|
18890
18891
|
for (const J of d.inputConfigs?.suffix?.options ?? [])
|
|
18891
18892
|
if (J.value === k && J.dataId) {
|
|
18892
18893
|
await i({
|
|
18893
18894
|
dataId: J.dataId,
|
|
18894
|
-
value:
|
|
18895
|
+
value: _
|
|
18895
18896
|
});
|
|
18896
18897
|
break;
|
|
18897
18898
|
}
|
|
18898
|
-
|
|
18899
|
+
E();
|
|
18899
18900
|
};
|
|
18900
18901
|
if (d.inputConfigs?.suffix?.type === "unit" && typeof t == "string") {
|
|
18901
|
-
C =
|
|
18902
|
+
C = g ?? "";
|
|
18902
18903
|
for (const p of d.inputConfigs?.suffix?.options ?? [])
|
|
18903
18904
|
if (p.value === k && p.maskBlocks) {
|
|
18904
18905
|
b = p.maskBlocks;
|
|
18905
18906
|
break;
|
|
18906
18907
|
}
|
|
18907
|
-
x = h`<cx-divider slot="suffix" class="config-form__input__divider-suffix" vertical></cx-divider><cx-select ${xe(m)} value=${k || d.inputConfigs?.suffix?.options[0].value} class="config-form__input__select-suffix" slot="suffix" placement="bottom-start" input-behavior="none" hoist>${
|
|
18908
|
+
x = h`<cx-divider slot="suffix" class="config-form__input__divider-suffix" vertical></cx-divider><cx-select ${xe(m)} value=${k || d.inputConfigs?.suffix?.options[0].value} class="config-form__input__select-suffix" slot="suffix" placement="bottom-start" input-behavior="none" hoist>${N(
|
|
18908
18909
|
d.inputConfigs?.suffix?.options ?? [],
|
|
18909
18910
|
(p) => p.value,
|
|
18910
18911
|
(p) => h`<cx-option value=${p.value}>${p.name}</cx-option>`
|
|
18911
18912
|
)}</cx-select>`;
|
|
18912
18913
|
}
|
|
18913
|
-
return this.host.updateComplete.then(() =>
|
|
18914
|
+
return this.host.updateComplete.then(() => E()), h`<cx-input ${xe(l)} ?disabled=${r} ?required=${d.required ?? !1} label=${d.inputConfigs?.label ?? ""} value=${C} placeholder=${d.placeholder ?? ""} mask=${d.mask} .maskBlocks=${b} @cx-change=${S} type=${d.controlType}>${x}</cx-input>`;
|
|
18914
18915
|
}
|
|
18915
18916
|
)}
|
|
18916
18917
|
`;
|
|
@@ -18926,13 +18927,13 @@ class r2 {
|
|
|
18926
18927
|
const A = i.label;
|
|
18927
18928
|
let d = "";
|
|
18928
18929
|
typeof i.helpText == "function" ? d = i.helpText(this.host.blockAttributes) : i.helpText && (d = i.helpText);
|
|
18929
|
-
let
|
|
18930
|
+
let l;
|
|
18930
18931
|
switch (i.controlType) {
|
|
18931
18932
|
case "asset-transformation": {
|
|
18932
|
-
|
|
18933
|
+
l = async (m) => {
|
|
18933
18934
|
if (typeof m == "object" && m !== null) {
|
|
18934
|
-
const { format: s, manualFormat: o, transformations:
|
|
18935
|
-
await this.handleConfigChange(r, JSON.stringify(
|
|
18935
|
+
const { format: s, manualFormat: o, transformations: g } = m;
|
|
18936
|
+
await this.handleConfigChange(r, JSON.stringify(g), c, i.callback);
|
|
18936
18937
|
const C = i.assetTransformationConfigs?.formatKey;
|
|
18937
18938
|
C && await this.handleConfigChange(C, s, "attribute");
|
|
18938
18939
|
const x = i.assetTransformationConfigs?.manualFormatKey;
|
|
@@ -18941,9 +18942,9 @@ class r2 {
|
|
|
18941
18942
|
o,
|
|
18942
18943
|
"attribute"
|
|
18943
18944
|
);
|
|
18944
|
-
const b = i.assetTransformationConfigs?.srcKey, k = i.assetTransformationConfigs?.assetIdKey ?? "",
|
|
18945
|
-
if (b &&
|
|
18946
|
-
const p = await this.resolveAssetFormatSrc(
|
|
18945
|
+
const b = i.assetTransformationConfigs?.srcKey, k = i.assetTransformationConfigs?.assetIdKey ?? "", E = String(this.host.blockAttributes[k] ?? "");
|
|
18946
|
+
if (b && E && s) {
|
|
18947
|
+
const p = await this.resolveAssetFormatSrc(E, s);
|
|
18947
18948
|
p && await this.handleConfigChange(b, p, "attribute");
|
|
18948
18949
|
}
|
|
18949
18950
|
const S = i.assetTransformationConfigs?.recordsKey;
|
|
@@ -18956,7 +18957,7 @@ class r2 {
|
|
|
18956
18957
|
}
|
|
18957
18958
|
p.length > 0 && await this.handleConfigChange(
|
|
18958
18959
|
S,
|
|
18959
|
-
p.map((
|
|
18960
|
+
p.map((_) => ({ ..._, src: void 0 })),
|
|
18960
18961
|
"attribute"
|
|
18961
18962
|
);
|
|
18962
18963
|
}
|
|
@@ -18969,9 +18970,9 @@ class r2 {
|
|
|
18969
18970
|
offsetX: "--offset-x",
|
|
18970
18971
|
offsetY: "--offset-y"
|
|
18971
18972
|
};
|
|
18972
|
-
|
|
18973
|
+
l = async (o) => {
|
|
18973
18974
|
if (typeof o == "object" && o !== null) {
|
|
18974
|
-
const { offsetX:
|
|
18975
|
+
const { offsetX: g, offsetY: C, position: x } = o;
|
|
18975
18976
|
await Promise.all([
|
|
18976
18977
|
this.handleConfigChange(
|
|
18977
18978
|
r,
|
|
@@ -18981,7 +18982,7 @@ class r2 {
|
|
|
18981
18982
|
),
|
|
18982
18983
|
this.handleConfigChange(
|
|
18983
18984
|
m,
|
|
18984
|
-
|
|
18985
|
+
g,
|
|
18985
18986
|
"style",
|
|
18986
18987
|
i.callback
|
|
18987
18988
|
),
|
|
@@ -18997,27 +18998,27 @@ class r2 {
|
|
|
18997
18998
|
break;
|
|
18998
18999
|
}
|
|
18999
19000
|
case "gallery-picker": {
|
|
19000
|
-
|
|
19001
|
+
l = async (m, ...s) => {
|
|
19001
19002
|
if (!Array.isArray(m))
|
|
19002
19003
|
return;
|
|
19003
19004
|
const o = typeof s[0] == "boolean" ? s[0] : !1;
|
|
19004
19005
|
if (o)
|
|
19005
19006
|
this.pendingGalleryPickerSaves.has(r) && (this.pendingGalleryPickerSaves.delete(r), await this.handleConfigChange(
|
|
19006
19007
|
r,
|
|
19007
|
-
m.map((
|
|
19008
|
+
m.map((g) => ({ ...g, src: void 0 })),
|
|
19008
19009
|
c,
|
|
19009
19010
|
i.callback
|
|
19010
19011
|
));
|
|
19011
19012
|
else if (m.length === 0)
|
|
19012
19013
|
await this.handleConfigChange(r, m, c, i.callback);
|
|
19013
19014
|
else {
|
|
19014
|
-
let
|
|
19015
|
+
let g = [];
|
|
19015
19016
|
try {
|
|
19016
|
-
|
|
19017
|
+
g = JSON.parse(String(this.host.blockAttributes[r] ?? "[]"));
|
|
19017
19018
|
} catch {
|
|
19018
|
-
|
|
19019
|
+
g = [];
|
|
19019
19020
|
}
|
|
19020
|
-
const C = new Set(
|
|
19021
|
+
const C = new Set(g.map((k) => k.id));
|
|
19021
19022
|
m.map((k) => k.id).some((k) => !C.has(k)) ? this.pendingGalleryPickerSaves.add(r) : await this.handleConfigChange(r, m, c, i.callback);
|
|
19022
19023
|
}
|
|
19023
19024
|
if (i.galleryPickerConfigs?.transformationRecordIdKey && (!o || m.length > 0)) {
|
|
@@ -19039,19 +19040,19 @@ class r2 {
|
|
|
19039
19040
|
break;
|
|
19040
19041
|
}
|
|
19041
19042
|
case "group": {
|
|
19042
|
-
|
|
19043
|
+
l = async () => {
|
|
19043
19044
|
};
|
|
19044
19045
|
break;
|
|
19045
19046
|
}
|
|
19046
19047
|
case "image-picker": {
|
|
19047
|
-
|
|
19048
|
+
l = async (m) => {
|
|
19048
19049
|
if (typeof m == "object" && m !== null) {
|
|
19049
|
-
const { id: s, src: o } = m,
|
|
19050
|
+
const { id: s, src: o } = m, g = i.pickerConfigs?.recordIdKey ?? "record-id";
|
|
19050
19051
|
let C = i.callback;
|
|
19051
19052
|
C && (C = (b) => i.callback({
|
|
19052
19053
|
...b,
|
|
19053
19054
|
extraValue: {
|
|
19054
|
-
[
|
|
19055
|
+
[g]: s
|
|
19055
19056
|
}
|
|
19056
19057
|
}));
|
|
19057
19058
|
const x = (b) => c === "style" && b ? `url("${b}")` : b;
|
|
@@ -19066,7 +19067,7 @@ class r2 {
|
|
|
19066
19067
|
}
|
|
19067
19068
|
case "list-editor":
|
|
19068
19069
|
case "dam-custom-toolbar-buttons": {
|
|
19069
|
-
|
|
19070
|
+
l = async (m) => {
|
|
19070
19071
|
Array.isArray(m) && await this.handleConfigChange(
|
|
19071
19072
|
r,
|
|
19072
19073
|
m,
|
|
@@ -19077,9 +19078,9 @@ class r2 {
|
|
|
19077
19078
|
break;
|
|
19078
19079
|
}
|
|
19079
19080
|
case "other-picker": {
|
|
19080
|
-
|
|
19081
|
+
l = async (m) => {
|
|
19081
19082
|
if (typeof m == "object" && m !== null) {
|
|
19082
|
-
const { extension: s, id: o, identifier:
|
|
19083
|
+
const { extension: s, id: o, identifier: g, name: C, representative: x, src: b, type: k } = m;
|
|
19083
19084
|
if (o === "" && C === "" && b === "") {
|
|
19084
19085
|
const S = i.callback ? (p) => i.callback({
|
|
19085
19086
|
...p,
|
|
@@ -19088,30 +19089,30 @@ class r2 {
|
|
|
19088
19089
|
await this.handleConfigChange(r, "", c, S);
|
|
19089
19090
|
return;
|
|
19090
19091
|
}
|
|
19091
|
-
const
|
|
19092
|
+
const E = i.callback ? (S) => i.callback({
|
|
19092
19093
|
...S,
|
|
19093
|
-
extraValue: { extension: s, id: o, identifier:
|
|
19094
|
+
extraValue: { extension: s, id: o, identifier: g, name: C, representative: x, type: k }
|
|
19094
19095
|
}) : void 0;
|
|
19095
|
-
await this.handleConfigChange(r, b, c,
|
|
19096
|
+
await this.handleConfigChange(r, b, c, E);
|
|
19096
19097
|
}
|
|
19097
19098
|
};
|
|
19098
19099
|
break;
|
|
19099
19100
|
}
|
|
19100
19101
|
case "all-picker": {
|
|
19101
|
-
|
|
19102
|
+
l = async (m) => {
|
|
19102
19103
|
if (typeof m == "object" && m !== null) {
|
|
19103
|
-
const { extension: s, id: o, name:
|
|
19104
|
-
if (o === "" &&
|
|
19105
|
-
const
|
|
19104
|
+
const { extension: s, id: o, name: g, representative: C, src: x, type: b } = m;
|
|
19105
|
+
if (o === "" && g === "" && x === "" && b === "") {
|
|
19106
|
+
const E = i.callback ? (S) => i.callback({
|
|
19106
19107
|
...S,
|
|
19107
|
-
extraValue: { extension: s, id: o, name:
|
|
19108
|
+
extraValue: { extension: s, id: o, name: g, representative: "", type: "" }
|
|
19108
19109
|
}) : void 0;
|
|
19109
|
-
await this.handleConfigChange(r, "", c,
|
|
19110
|
+
await this.handleConfigChange(r, "", c, E);
|
|
19110
19111
|
return;
|
|
19111
19112
|
}
|
|
19112
|
-
const k = i.callback ? (
|
|
19113
|
-
...
|
|
19114
|
-
extraValue: { extension: s, id: o, name:
|
|
19113
|
+
const k = i.callback ? (E) => i.callback({
|
|
19114
|
+
...E,
|
|
19115
|
+
extraValue: { extension: s, id: o, name: g, representative: C, type: b }
|
|
19115
19116
|
}) : void 0;
|
|
19116
19117
|
await this.handleConfigChange(r, x, c, k);
|
|
19117
19118
|
}
|
|
@@ -19119,9 +19120,9 @@ class r2 {
|
|
|
19119
19120
|
break;
|
|
19120
19121
|
}
|
|
19121
19122
|
case "page-picker": {
|
|
19122
|
-
|
|
19123
|
+
l = async (m) => {
|
|
19123
19124
|
if (typeof m == "object" && m !== null) {
|
|
19124
|
-
const { id: s, url: o } = m,
|
|
19125
|
+
const { id: s, url: o } = m, g = i.callback ? (C) => i.callback({
|
|
19125
19126
|
...C,
|
|
19126
19127
|
extraValue: {
|
|
19127
19128
|
"page-url": o
|
|
@@ -19131,19 +19132,19 @@ class r2 {
|
|
|
19131
19132
|
r,
|
|
19132
19133
|
s,
|
|
19133
19134
|
c,
|
|
19134
|
-
|
|
19135
|
+
g
|
|
19135
19136
|
);
|
|
19136
19137
|
}
|
|
19137
19138
|
};
|
|
19138
19139
|
break;
|
|
19139
19140
|
}
|
|
19140
19141
|
case "size-input-group": {
|
|
19141
|
-
|
|
19142
|
+
l = async (m) => {
|
|
19142
19143
|
if (typeof m == "object" && m !== null) {
|
|
19143
|
-
const { height: s, keepRatio: o, width:
|
|
19144
|
+
const { height: s, keepRatio: o, width: g } = m;
|
|
19144
19145
|
await this.handleConfigChange(
|
|
19145
19146
|
"width",
|
|
19146
|
-
|
|
19147
|
+
g,
|
|
19147
19148
|
c,
|
|
19148
19149
|
i.callback
|
|
19149
19150
|
), await this.handleConfigChange(
|
|
@@ -19163,27 +19164,27 @@ class r2 {
|
|
|
19163
19164
|
}
|
|
19164
19165
|
case "audio-picker":
|
|
19165
19166
|
case "video-picker": {
|
|
19166
|
-
|
|
19167
|
+
l = async (m) => {
|
|
19167
19168
|
if (typeof m == "object" && m !== null) {
|
|
19168
|
-
const { id: s, name: o, parentAssetID:
|
|
19169
|
+
const { id: s, name: o, parentAssetID: g, representative: C, src: x } = m, b = i.pickerConfigs?.recordIdKey ?? "record-id", k = i.pickerConfigs?.nameKey ?? "name", E = i.pickerConfigs?.representativeKey, S = i.pickerConfigs?.parentAssetIdKey;
|
|
19169
19170
|
let p = i.callback;
|
|
19170
|
-
if (p && (p = (
|
|
19171
|
-
...
|
|
19171
|
+
if (p && (p = (_) => i.callback({
|
|
19172
|
+
..._,
|
|
19172
19173
|
extraValue: {
|
|
19173
19174
|
[k]: o,
|
|
19174
19175
|
[b]: s,
|
|
19175
|
-
...
|
|
19176
|
-
[
|
|
19176
|
+
...E ? {
|
|
19177
|
+
[E]: C ?? ""
|
|
19177
19178
|
} : {},
|
|
19178
19179
|
...S ? {
|
|
19179
|
-
[S]:
|
|
19180
|
+
[S]: g ?? ""
|
|
19180
19181
|
} : {}
|
|
19181
19182
|
}
|
|
19182
19183
|
})), await this.handleConfigChange(r, x, c, p), s) {
|
|
19183
|
-
const
|
|
19184
|
-
let
|
|
19185
|
-
if (i.controlType === "audio-picker" ?
|
|
19186
|
-
const
|
|
19184
|
+
const _ = this.host.traits.find((X) => X.controlType === "asset-format-picker"), J = _?.assetFormatPickerConfigs?.formatSrcKey;
|
|
19185
|
+
let Y = "";
|
|
19186
|
+
if (i.controlType === "audio-picker" ? Y = "Web" : i.controlType === "video-picker" && (Y = "WebHigh"), _ && J) {
|
|
19187
|
+
const X = String(this.host.blockAttributes[_.id] ?? Y), re = await this.resolveAssetFormatSrc(g || s, X);
|
|
19187
19188
|
re && await this.handleConfigChange(J, re, "attribute");
|
|
19188
19189
|
}
|
|
19189
19190
|
}
|
|
@@ -19192,7 +19193,7 @@ class r2 {
|
|
|
19192
19193
|
break;
|
|
19193
19194
|
}
|
|
19194
19195
|
case "icon-picker": {
|
|
19195
|
-
|
|
19196
|
+
l = async (m) => {
|
|
19196
19197
|
if (typeof m == "object" && m !== null) {
|
|
19197
19198
|
const { name: s, src: o } = m;
|
|
19198
19199
|
await this.handleConfigChange(
|
|
@@ -19206,16 +19207,16 @@ class r2 {
|
|
|
19206
19207
|
break;
|
|
19207
19208
|
}
|
|
19208
19209
|
case "font-picker": {
|
|
19209
|
-
|
|
19210
|
+
l = async (m) => {
|
|
19210
19211
|
if (typeof m == "object" && m !== null) {
|
|
19211
|
-
const { family: s, style: o, weight:
|
|
19212
|
+
const { family: s, style: o, weight: g } = m, C = i.fontPickerConfigs?.styleKey ?? "font-style", x = i.fontPickerConfigs?.weightKey;
|
|
19212
19213
|
let b = i.callback;
|
|
19213
19214
|
b && (b = (k) => i.callback({
|
|
19214
19215
|
...k,
|
|
19215
19216
|
extraValue: {
|
|
19216
19217
|
[C]: o,
|
|
19217
19218
|
...x ? {
|
|
19218
|
-
[x]:
|
|
19219
|
+
[x]: g ?? ""
|
|
19219
19220
|
} : {}
|
|
19220
19221
|
}
|
|
19221
19222
|
})), await this.handleConfigChange(r, s, c, b);
|
|
@@ -19224,24 +19225,24 @@ class r2 {
|
|
|
19224
19225
|
break;
|
|
19225
19226
|
}
|
|
19226
19227
|
case "asset-format-picker": {
|
|
19227
|
-
|
|
19228
|
+
l = async (m, ...s) => {
|
|
19228
19229
|
if (typeof m == "string") {
|
|
19229
|
-
const o = typeof s[0] == "string" ? s[0] :
|
|
19230
|
+
const o = typeof s[0] == "string" ? s[0] : Ie.Latest, g = typeof s[1] == "string" ? s[1] : "", C = typeof s[2] == "string" ? s[2] : "";
|
|
19230
19231
|
await this.handleConfigChange(r, m, c, i.callback);
|
|
19231
19232
|
const x = i.assetFormatPickerConfigs?.assetVersionKey, b = i.assetFormatPickerConfigs?.formatSrcKey, k = i.assetFormatPickerConfigs?.versionLabelKey;
|
|
19232
|
-
x && await this.handleConfigChange(x, o, "attribute"), b && await this.handleConfigChange(b,
|
|
19233
|
+
x && await this.handleConfigChange(x, o, "attribute"), b && await this.handleConfigChange(b, g, "attribute"), k && await this.handleConfigChange(k, C, "attribute");
|
|
19233
19234
|
}
|
|
19234
19235
|
};
|
|
19235
19236
|
break;
|
|
19236
19237
|
}
|
|
19237
19238
|
case "switch": {
|
|
19238
|
-
|
|
19239
|
+
l = async (m) => {
|
|
19239
19240
|
if (typeof m == "object" && m !== null) {
|
|
19240
19241
|
const { checked: s, value: o } = m;
|
|
19241
|
-
let
|
|
19242
|
-
c === "attribute" ?
|
|
19242
|
+
let g;
|
|
19243
|
+
c === "attribute" ? g = !!s : g = o, g && i.checkedValue !== void 0 ? g = i.checkedValue : !g && i.uncheckedValue !== void 0 && (g = i.uncheckedValue), c === "attribute" ? this.handleAttributeChange(r, g, i.callback) : await this.handleConfigChange(
|
|
19243
19244
|
r,
|
|
19244
|
-
|
|
19245
|
+
g,
|
|
19245
19246
|
c,
|
|
19246
19247
|
i.callback
|
|
19247
19248
|
);
|
|
@@ -19250,7 +19251,7 @@ class r2 {
|
|
|
19250
19251
|
break;
|
|
19251
19252
|
}
|
|
19252
19253
|
case "input": {
|
|
19253
|
-
|
|
19254
|
+
l = async (m) => {
|
|
19254
19255
|
if (typeof m == "string")
|
|
19255
19256
|
await this.handleConfigChange(
|
|
19256
19257
|
r,
|
|
@@ -19271,7 +19272,7 @@ class r2 {
|
|
|
19271
19272
|
break;
|
|
19272
19273
|
}
|
|
19273
19274
|
default:
|
|
19274
|
-
|
|
19275
|
+
l = async (m) => {
|
|
19275
19276
|
(typeof m == "string" || typeof m == "boolean") && await this.handleConfigChange(
|
|
19276
19277
|
r,
|
|
19277
19278
|
m,
|
|
@@ -19285,7 +19286,7 @@ class r2 {
|
|
|
19285
19286
|
container: a,
|
|
19286
19287
|
currentValue: n,
|
|
19287
19288
|
disabled: t,
|
|
19288
|
-
handleChange:
|
|
19289
|
+
handleChange: l,
|
|
19289
19290
|
key: r,
|
|
19290
19291
|
label: A,
|
|
19291
19292
|
trait: {
|
|
@@ -19293,11 +19294,11 @@ class r2 {
|
|
|
19293
19294
|
controlType: i.controlType ? i.controlType : "input"
|
|
19294
19295
|
}
|
|
19295
19296
|
})}
|
|
19296
|
-
${
|
|
19297
|
+
${v(d, () => h`<cx-typography variant="body3" class="config-form__help-text">${d}</cx-typography>`)}</cx-space>`;
|
|
19297
19298
|
}
|
|
19298
19299
|
renderBasicControls(a, n, t) {
|
|
19299
19300
|
const r = be(), i = h`
|
|
19300
|
-
${
|
|
19301
|
+
${N(
|
|
19301
19302
|
a.filter((c) => {
|
|
19302
19303
|
const A = !t || c.name && this.host.tabMap[c.name] === t || n?.name && this.host.tabMap[n.name] === t;
|
|
19303
19304
|
let d = !1;
|
|
@@ -19307,11 +19308,11 @@ class r2 {
|
|
|
19307
19308
|
(c) => {
|
|
19308
19309
|
const A = c.id;
|
|
19309
19310
|
let d = c.label;
|
|
19310
|
-
const
|
|
19311
|
+
const l = c.type ?? "attribute";
|
|
19311
19312
|
let m = !1;
|
|
19312
19313
|
typeof c.disabled == "boolean" ? m = c.disabled : typeof c.disabled == "function" && (m = c.disabled(this.host.blockAttributes)), c.controlType === "checkbox" && (d = "");
|
|
19313
19314
|
let s = "";
|
|
19314
|
-
switch (
|
|
19315
|
+
switch (l) {
|
|
19315
19316
|
case "style":
|
|
19316
19317
|
this.host.blockStyles[A] !== void 0 && (typeof this.host.blockStyles[A] == "string" && this.host.blockStyles[A].includes("url(") ? s = this.host.blockStyles[A].replace(
|
|
19317
19318
|
/url\(["']?(.*?)["']?\)/,
|
|
@@ -19325,7 +19326,7 @@ class r2 {
|
|
|
19325
19326
|
this.host.blockProperties[A] !== void 0 && (s = this.host.blockProperties[A]);
|
|
19326
19327
|
break;
|
|
19327
19328
|
}
|
|
19328
|
-
if (
|
|
19329
|
+
if (l === "decorative")
|
|
19329
19330
|
return Fe(
|
|
19330
19331
|
c.controlType,
|
|
19331
19332
|
[
|
|
@@ -19341,23 +19342,23 @@ class r2 {
|
|
|
19341
19342
|
() => h`<cx-typography variant="h5">${d}</cx-typography>`
|
|
19342
19343
|
);
|
|
19343
19344
|
if (n) {
|
|
19344
|
-
const
|
|
19345
|
+
const g = this.renderBasicControl({
|
|
19345
19346
|
container: r,
|
|
19346
19347
|
currentValue: s,
|
|
19347
19348
|
disabled: m,
|
|
19348
19349
|
key: A,
|
|
19349
19350
|
trait: c,
|
|
19350
|
-
type:
|
|
19351
|
+
type: l
|
|
19351
19352
|
});
|
|
19352
19353
|
if (n.controlType === "group" && n.groupConfigs?.direction === "horizontal") {
|
|
19353
19354
|
let C = c.width;
|
|
19354
19355
|
if (typeof c.width == "function" && (C = c.width(this.host.blockAttributes)), typeof C == "string" && (C = Number.parseInt(C)), C)
|
|
19355
|
-
return h`<cx-grid-item xs=${C}>${
|
|
19356
|
+
return h`<cx-grid-item xs=${C}>${g}</cx-grid-item>`;
|
|
19356
19357
|
}
|
|
19357
|
-
return
|
|
19358
|
+
return g;
|
|
19358
19359
|
}
|
|
19359
19360
|
const o = c.direction === "vertical" || c.groupConfigs?.direction === "horizontal" && d === void 0;
|
|
19360
|
-
return h`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing=${c.direction === "vertical" ? "var(--cx-spacing-small)" : "0"} wrap="wrap">${
|
|
19361
|
+
return h`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing=${c.direction === "vertical" ? "var(--cx-spacing-small)" : "0"} wrap="wrap">${v(
|
|
19361
19362
|
c.direction === "horizontal" || d !== void 0,
|
|
19362
19363
|
() => h`<cx-grid-item xs="4" sm=${c.direction === "vertical" ? "4" : "1"}><cx-typography variant="body2">${d}</cx-typography></cx-grid-item>`
|
|
19363
19364
|
)}<cx-grid-item xs="4" sm=${o ? "4" : "3"}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderBasicControl({
|
|
@@ -19365,7 +19366,7 @@ class r2 {
|
|
|
19365
19366
|
disabled: m,
|
|
19366
19367
|
key: A,
|
|
19367
19368
|
trait: c,
|
|
19368
|
-
type:
|
|
19369
|
+
type: l
|
|
19369
19370
|
})}</cx-space></cx-grid-item></cx-grid>`;
|
|
19370
19371
|
}
|
|
19371
19372
|
)}
|
|
@@ -19373,8 +19374,8 @@ class r2 {
|
|
|
19373
19374
|
if (n) {
|
|
19374
19375
|
const { controlType: c, groupConfigs: A } = n;
|
|
19375
19376
|
if (c === "group" && A?.direction === "horizontal") {
|
|
19376
|
-
const { columnGap: d, gap:
|
|
19377
|
-
return h`<cx-grid columns="100" use-flex-gap spacing=${P(
|
|
19377
|
+
const { columnGap: d, gap: l, rowGap: m, wrap: s } = A;
|
|
19378
|
+
return h`<cx-grid columns="100" use-flex-gap spacing=${P(l)} column-spacing=${P(d)} row-spacing=${P(m)} wrap=${P(s)} ${xe(r)}>${i}</cx-grid>`;
|
|
19378
19379
|
}
|
|
19379
19380
|
}
|
|
19380
19381
|
return h`<cx-space direction="vertical" wrap="nowrap">${i}</cx-space>`;
|
|
@@ -19382,24 +19383,24 @@ class r2 {
|
|
|
19382
19383
|
renderTranslationControls() {
|
|
19383
19384
|
const a = Be(
|
|
19384
19385
|
this.host.translatableControls.map((t) => t.translateGroup)
|
|
19385
|
-
), n = h`${
|
|
19386
|
+
), n = h`${N(a, (t) => {
|
|
19386
19387
|
const r = this.host.translatableControls.filter((i) => {
|
|
19387
19388
|
let c = !1;
|
|
19388
19389
|
return (!this.host.skipShowCheck || !i.skipShowCheck) && (typeof i.show == "boolean" ? c = !i.show : typeof i.show == "function" && (c = !i.show(this.host.blockAttributes))), i.translateGroup === t && !c;
|
|
19389
19390
|
});
|
|
19390
|
-
return r.length === 0 ? ue : h`<cx-typography variant="h5">${t}</cx-typography>${
|
|
19391
|
+
return r.length === 0 ? ue : h`<cx-typography variant="h5">${t}</cx-typography>${N(
|
|
19391
19392
|
r,
|
|
19392
19393
|
(i) => i.id,
|
|
19393
19394
|
(i) => i.controlType === "info-text" ? this.renderInfoText(i) : h`<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">${i.label}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${e1(this.host.sortedLanguages, (c) => {
|
|
19394
19395
|
const A = this.localize.languageName(c) || je.getName(c) || c;
|
|
19395
19396
|
let d = "";
|
|
19396
19397
|
i.id && (c === this.host.defaultLanguage ? d = this.host.blockAttributes[i.id] ?? "" : d = this.host.translatableControlValues[c]?.[i.id] ?? this.host.translatableControlValues[this.host.defaultLanguage]?.[i.id] ?? this.host.blockAttributes[i.id]);
|
|
19397
|
-
let
|
|
19398
|
+
let l;
|
|
19398
19399
|
switch (i.controlType) {
|
|
19399
19400
|
case "image-picker": {
|
|
19400
|
-
|
|
19401
|
+
l = async (m) => {
|
|
19401
19402
|
if (typeof m == "object" && m !== null) {
|
|
19402
|
-
const { id: s, src: o } = m,
|
|
19403
|
+
const { id: s, src: o } = m, g = i.pickerConfigs?.recordIdKey ?? "record-id";
|
|
19403
19404
|
this.host.emit("cx-content-builder-translatable-value-change", {
|
|
19404
19405
|
detail: {
|
|
19405
19406
|
language: c,
|
|
@@ -19408,7 +19409,7 @@ class r2 {
|
|
|
19408
19409
|
type: "attribute",
|
|
19409
19410
|
value: o
|
|
19410
19411
|
}, {
|
|
19411
|
-
attribute:
|
|
19412
|
+
attribute: g,
|
|
19412
19413
|
type: "attribute",
|
|
19413
19414
|
value: s
|
|
19414
19415
|
}]
|
|
@@ -19420,16 +19421,16 @@ class r2 {
|
|
|
19420
19421
|
}
|
|
19421
19422
|
case "audio-picker":
|
|
19422
19423
|
case "video-picker": {
|
|
19423
|
-
|
|
19424
|
+
l = async (m) => {
|
|
19424
19425
|
if (typeof m == "object" && m !== null) {
|
|
19425
|
-
const { id: s, name: o, src:
|
|
19426
|
+
const { id: s, name: o, src: g } = m, C = i.pickerConfigs?.recordIdKey ?? "record-id", x = i.pickerConfigs?.nameKey ?? "name";
|
|
19426
19427
|
this.host.emit("cx-content-builder-translatable-value-change", {
|
|
19427
19428
|
detail: {
|
|
19428
19429
|
language: c,
|
|
19429
19430
|
values: [{
|
|
19430
19431
|
attribute: i.id,
|
|
19431
19432
|
type: "attribute",
|
|
19432
|
-
value:
|
|
19433
|
+
value: g
|
|
19433
19434
|
}, {
|
|
19434
19435
|
attribute: C,
|
|
19435
19436
|
type: "attribute",
|
|
@@ -19446,7 +19447,7 @@ class r2 {
|
|
|
19446
19447
|
break;
|
|
19447
19448
|
}
|
|
19448
19449
|
default:
|
|
19449
|
-
|
|
19450
|
+
l = async (m) => {
|
|
19450
19451
|
typeof m == "string" && this.host.emit("cx-content-builder-translatable-value-change", {
|
|
19451
19452
|
detail: {
|
|
19452
19453
|
language: c,
|
|
@@ -19460,7 +19461,7 @@ class r2 {
|
|
|
19460
19461
|
};
|
|
19461
19462
|
}
|
|
19462
19463
|
return h`
|
|
19463
|
-
${
|
|
19464
|
+
${v(
|
|
19464
19465
|
i.controlType && i.controlType !== "input",
|
|
19465
19466
|
() => h`<cx-typography variant="body3">${A}</cx-typography>`,
|
|
19466
19467
|
() => ue
|
|
@@ -19473,7 +19474,7 @@ class r2 {
|
|
|
19473
19474
|
container: void 0,
|
|
19474
19475
|
currentValue: d,
|
|
19475
19476
|
disabled: c.toLowerCase() === this.host.defaultLanguage.toLowerCase(),
|
|
19476
|
-
handleChange:
|
|
19477
|
+
handleChange: l,
|
|
19477
19478
|
key: i.id,
|
|
19478
19479
|
label: A,
|
|
19479
19480
|
trait: {
|
|
@@ -19491,14 +19492,14 @@ class r2 {
|
|
|
19491
19492
|
return h`<cx-space direction="vertical" wrap="nowrap">${n}</cx-space>`;
|
|
19492
19493
|
}
|
|
19493
19494
|
}
|
|
19494
|
-
var n2 = Object.defineProperty, m2 = Object.getOwnPropertyDescriptor,
|
|
19495
|
+
var n2 = Object.defineProperty, m2 = Object.getOwnPropertyDescriptor, B = (e, a, n, t) => {
|
|
19495
19496
|
for (var r = t > 1 ? void 0 : t ? m2(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
19496
19497
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
19497
19498
|
return t && r && n2(a, n, r), r;
|
|
19498
19499
|
};
|
|
19499
19500
|
let f = class extends ee {
|
|
19500
19501
|
constructor() {
|
|
19501
|
-
super(...arguments), this.localize = new W(this), this.configFormController = new r2(this), this.loading = !1, this.mode =
|
|
19502
|
+
super(...arguments), this.localize = new W(this), this.configFormController = new r2(this), this.loading = !1, this.mode = le.Template, this.adhocProperties = [], this.templateName = "", this.templateId = "", this.supportedLanguages = ["en"], this.translatableControlValues = {}, this.defaultLanguage = "en", this.boundary = document.body, this.baseUrl = "", this.token = "", this.onRequestAsset = void 0, this.onRequestDownloadFormat = void 0, this.onRequestAssetFormat = void 0, this.onConfigureWorkflow = void 0, this.blockAttributes = {}, this.blockProperties = {}, this.blockStyles = {}, this.traits = [], this.translatableControls = [], this.blockName = "", this.name = "", this.description = "", this.showTemplateTab = !1, this.dialogTitle = "", this.skipShowCheck = !1, this.enableAssetFormatControls = !1, this.allowedFolders = [], this.isEditingTemplateSettings = !1, this.disableCloseConfigDialog = !1, this.isAfterShow = !1, this.sortedLanguages = [], this.formKey = 0;
|
|
19502
19503
|
}
|
|
19503
19504
|
/**
|
|
19504
19505
|
* Whether the template is editable.
|
|
@@ -19508,7 +19509,7 @@ let f = class extends ee {
|
|
|
19508
19509
|
* @default true
|
|
19509
19510
|
*/
|
|
19510
19511
|
get isTemplateEditable() {
|
|
19511
|
-
return this.mode ===
|
|
19512
|
+
return this.mode === le.Template;
|
|
19512
19513
|
}
|
|
19513
19514
|
/**
|
|
19514
19515
|
* Returns the list of tabs available in the configuration manager.
|
|
@@ -19539,7 +19540,7 @@ let f = class extends ee {
|
|
|
19539
19540
|
* @return {Record<string, string>} A record mapping trait IDs to tab names.
|
|
19540
19541
|
*/
|
|
19541
19542
|
get tabMap() {
|
|
19542
|
-
const e = this.traits.map((c) => c.name).filter(Boolean), a =
|
|
19543
|
+
const e = this.traits.map((c) => c.name).filter(Boolean), a = L0(e, this.adhocProperties), n = this.traits.filter(
|
|
19543
19544
|
(c) => c.tab === "sidePanels"
|
|
19544
19545
|
/* SidePanels */
|
|
19545
19546
|
).map((c) => c.name).filter(Boolean), t = this.traits.filter(
|
|
@@ -19632,31 +19633,31 @@ let f = class extends ee {
|
|
|
19632
19633
|
return h`<cx-space direction="vertical" spacing="medium" wrap="nowrap"><cx-typography variant="body2">${this.localize.term("contentBuilderBlockSettingsHelpText")}</cx-typography><cx-grid columns="3" use-flex-gap spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("templateName")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-input name="name" value=${this.name ?? ""} can-show-length maxlength="200" required @cx-change=${this.handleNameInputChange} type="text"></cx-input></cx-grid-item></cx-grid><cx-grid columns="3" use-flex-gap spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("description")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-textarea name="description" value=${this.description ?? ""} can-show-length maxlength="200" resize="none" @cx-change=${this.handleDescriptionInputChange} type="text"></cx-textarea></cx-grid-item></cx-grid></cx-space>`;
|
|
19633
19634
|
}
|
|
19634
19635
|
render() {
|
|
19635
|
-
return h`<cx-dialog class="config-form" use-overlay-scrollbar divider-position=${fe.Footer} .boundary=${this.boundary} @cx-after-show=${this.handleAfterShow} @cx-after-hide=${this.handleAfterHide} @cx-request-close=${this.handleRequestClose} @cx-asset-request-status=${this.handleAssetRequestStatus}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${
|
|
19636
|
+
return h`<cx-dialog class="config-form" use-overlay-scrollbar divider-position=${fe.Footer} .boundary=${this.boundary} @cx-after-show=${this.handleAfterShow} @cx-after-hide=${this.handleAfterHide} @cx-request-close=${this.handleRequestClose} @cx-asset-request-status=${this.handleAssetRequestStatus}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${v(
|
|
19636
19637
|
this.dialogTitle,
|
|
19637
19638
|
() => h`<cx-line-clamp lines="1">${this.dialogTitle}</cx-line-clamp>`,
|
|
19638
19639
|
() => h`${this.localize.term(
|
|
19639
19640
|
"settingsTitle",
|
|
19640
19641
|
this.blockName
|
|
19641
19642
|
)}`
|
|
19642
|
-
)}</cx-typography>${
|
|
19643
|
+
)}</cx-typography>${v(
|
|
19643
19644
|
this.templateName,
|
|
19644
19645
|
() => h`<cx-typography variant="body3"><cx-line-clamp lines="1">${this.templateName}</cx-line-clamp></cx-typography>`
|
|
19645
19646
|
)}</cx-space>${h0(
|
|
19646
19647
|
this.formKey,
|
|
19647
|
-
h`<form id="config-form" @submit=${this.handleFormSubmit}>${z0(
|
|
19648
|
+
h`<form id="config-form" @submit=${this.handleFormSubmit}>${z0(v(
|
|
19648
19649
|
this.isEditingTemplateSettings,
|
|
19649
|
-
() =>
|
|
19650
|
+
() => v(
|
|
19650
19651
|
this.isTemplateEditable,
|
|
19651
19652
|
() => h`<cx-tab-group class="config-form__tab-group" placement="top"><cx-tab slot="nav" panel="template" active>${this.localize.term("template")}</cx-tab><cx-tab-panel name="template" active><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderTemplateForm()}</cx-space></cx-tab-panel></cx-tab-group>`
|
|
19652
19653
|
),
|
|
19653
|
-
() =>
|
|
19654
|
+
() => v(
|
|
19654
19655
|
!y0(this.traits) && this.tabs.length >= 1,
|
|
19655
|
-
() => h`<cx-tab-group class="config-form__tab-group" placement="top">${
|
|
19656
|
+
() => h`<cx-tab-group class="config-form__tab-group" placement="top">${v(
|
|
19656
19657
|
this.showTemplateTab,
|
|
19657
19658
|
() => h`<cx-tab slot="nav" panel="template" active>${this.localize.term("template")}</cx-tab><cx-tab-panel name="template" active><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderTemplateForm()}</cx-space></cx-tab-panel>`
|
|
19658
19659
|
)}
|
|
19659
|
-
${
|
|
19660
|
+
${N(
|
|
19660
19661
|
this.tabs.filter(
|
|
19661
19662
|
(e) => !this.showTemplateTab || e === "appearance" || e === "effects" || e === "sidePanels" || e === "styling"
|
|
19662
19663
|
/* Styling */
|
|
@@ -19664,16 +19665,16 @@ let f = class extends ee {
|
|
|
19664
19665
|
(e) => e,
|
|
19665
19666
|
(e, a) => h`<cx-tab slot="nav" panel=${e} ?active=${!this.showTemplateTab && a === 0}>${this.localize.term(e)}</cx-tab><cx-tab-panel name=${e} ?active=${!this.showTemplateTab && a === 0}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderBasicControls(this.traits, void 0, e)}</cx-space></cx-tab-panel>`
|
|
19666
19667
|
)}
|
|
19667
|
-
${
|
|
19668
|
+
${v(
|
|
19668
19669
|
this.translatableControls.length > 0,
|
|
19669
19670
|
() => h`<cx-tab slot="nav" panel="Translation">${this.localize.term("translation")}</cx-tab><cx-tab-panel name="Translation"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderTranslationControls()}</cx-space></cx-tab-panel>`
|
|
19670
19671
|
)}</cx-tab-group>`,
|
|
19671
19672
|
() => h`<cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderBasicControls(this.traits, void 0, this.tabs[0])}</cx-space>`
|
|
19672
19673
|
)
|
|
19673
19674
|
))}</form>`
|
|
19674
|
-
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button-group><cx-button type="submit" variant="primary" size="medium" ?loading=${this.loading} @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button>${
|
|
19675
|
+
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button-group><cx-button type="submit" variant="primary" size="medium" ?loading=${this.loading} @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button>${v(
|
|
19675
19676
|
this.isTemplateEditable && !this.isEditingTemplateSettings && !this.showTemplateTab,
|
|
19676
|
-
() => h`<cx-dropdown class="config-form__dropdown" placement="bottom-end" hoist @cx-select=${this.handleDropdownSelect}><cx-button slot="trigger" type="submit" variant="primary" caret><cx-visually-hidden>${this.localize.term("moreOptions")}</cx-visually-hidden></cx-button><cx-menu class="config-form__dropdown-menu"><cx-menu-item value="save-as-new-template"><cx-button type="submit" variant="text">${this.localize.term("saveAsNewTemplate")}</cx-button></cx-menu-item>${
|
|
19677
|
+
() => h`<cx-dropdown class="config-form__dropdown" placement="bottom-end" hoist @cx-select=${this.handleDropdownSelect}><cx-button slot="trigger" type="submit" variant="primary" caret><cx-visually-hidden>${this.localize.term("moreOptions")}</cx-visually-hidden></cx-button><cx-menu class="config-form__dropdown-menu"><cx-menu-item value="save-as-new-template"><cx-button type="submit" variant="text">${this.localize.term("saveAsNewTemplate")}</cx-button></cx-menu-item>${v(
|
|
19677
19678
|
this.templateId,
|
|
19678
19679
|
() => h`<cx-menu-item value="detach-template"><cx-button type="submit" variant="text">${this.localize.term("detachTemplate")}</cx-button></cx-menu-item>`
|
|
19679
19680
|
)}</cx-menu></cx-dropdown>`
|
|
@@ -19687,38 +19688,38 @@ f.dependencies = {
|
|
|
19687
19688
|
"cx-asset-format-picker": F1,
|
|
19688
19689
|
"cx-asset-picker": Ve,
|
|
19689
19690
|
"cx-asset-transformation-dialog": D1,
|
|
19690
|
-
"cx-bicolor-picker":
|
|
19691
|
+
"cx-bicolor-picker": X1,
|
|
19691
19692
|
"cx-border-input-group": Q1,
|
|
19692
19693
|
"cx-button": ce,
|
|
19693
|
-
"cx-button-group":
|
|
19694
|
-
"cx-card":
|
|
19694
|
+
"cx-button-group": _1,
|
|
19695
|
+
"cx-card": I1,
|
|
19695
19696
|
"cx-checkbox": Ue,
|
|
19696
|
-
"cx-color-swatch-picker":
|
|
19697
|
+
"cx-color-swatch-picker": I,
|
|
19697
19698
|
"cx-confirm-popover": Z1,
|
|
19698
19699
|
"cx-corner-position-input-group": a0,
|
|
19699
19700
|
"cx-dam-custom-toolbar-buttons-editor": B1,
|
|
19700
19701
|
"cx-dialog": se,
|
|
19701
19702
|
"cx-divider": Je,
|
|
19702
19703
|
"cx-download-format-picker": A1,
|
|
19703
|
-
"cx-dropdown":
|
|
19704
|
+
"cx-dropdown": L1,
|
|
19704
19705
|
"cx-dynamic-select": Ze,
|
|
19705
19706
|
"cx-folder-picker": T,
|
|
19706
19707
|
"cx-font-picker": f1,
|
|
19707
|
-
"cx-gallery-picker":
|
|
19708
|
+
"cx-gallery-picker": D,
|
|
19708
19709
|
"cx-grid": $e,
|
|
19709
19710
|
"cx-grid-item": we,
|
|
19710
|
-
"cx-icon":
|
|
19711
|
+
"cx-icon": q1,
|
|
19711
19712
|
"cx-icon-picker": u1,
|
|
19712
19713
|
"cx-input": oe,
|
|
19713
19714
|
"cx-line-clamp": O1,
|
|
19714
19715
|
"cx-list-editor": p1,
|
|
19715
|
-
"cx-menu":
|
|
19716
|
-
"cx-menu-item":
|
|
19717
|
-
"cx-option":
|
|
19716
|
+
"cx-menu": M1,
|
|
19717
|
+
"cx-menu-item": N1,
|
|
19718
|
+
"cx-option": Ye,
|
|
19718
19719
|
"cx-padding-input-group": i0,
|
|
19719
19720
|
"cx-page-picker": K,
|
|
19720
19721
|
"cx-position-picker": t0,
|
|
19721
|
-
"cx-radio":
|
|
19722
|
+
"cx-radio": Xe,
|
|
19722
19723
|
"cx-radio-card": K1,
|
|
19723
19724
|
"cx-radio-group": Qe,
|
|
19724
19725
|
"cx-select": Se,
|
|
@@ -19733,36 +19734,36 @@ f.dependencies = {
|
|
|
19733
19734
|
"cx-tooltip": J1,
|
|
19734
19735
|
"cx-type-subtype-select": k1,
|
|
19735
19736
|
"cx-typography": Z,
|
|
19736
|
-
"cx-visually-hidden":
|
|
19737
|
+
"cx-visually-hidden": Y1
|
|
19737
19738
|
};
|
|
19738
|
-
|
|
19739
|
-
|
|
19739
|
+
B([
|
|
19740
|
+
M(".config-form")
|
|
19740
19741
|
], f.prototype, "dialog", 2);
|
|
19741
|
-
|
|
19742
|
-
|
|
19742
|
+
B([
|
|
19743
|
+
M("#config-form")
|
|
19743
19744
|
], f.prototype, "form", 2);
|
|
19744
|
-
|
|
19745
|
-
|
|
19745
|
+
B([
|
|
19746
|
+
M("cx-confirm-popover")
|
|
19746
19747
|
], f.prototype, "confirmPopover", 2);
|
|
19747
|
-
|
|
19748
|
-
|
|
19748
|
+
B([
|
|
19749
|
+
M(".config-form__tab-group")
|
|
19749
19750
|
], f.prototype, "tabGroup", 2);
|
|
19750
|
-
|
|
19751
|
+
B([
|
|
19751
19752
|
y({ reflect: !0, type: Boolean })
|
|
19752
19753
|
], f.prototype, "loading", 2);
|
|
19753
|
-
|
|
19754
|
+
B([
|
|
19754
19755
|
y({ reflect: !0, type: String })
|
|
19755
19756
|
], f.prototype, "mode", 2);
|
|
19756
|
-
|
|
19757
|
+
B([
|
|
19757
19758
|
y({ attribute: "adhoc-properties", type: Array })
|
|
19758
19759
|
], f.prototype, "adhocProperties", 2);
|
|
19759
|
-
|
|
19760
|
+
B([
|
|
19760
19761
|
y({ attribute: "template-name", reflect: !1, type: String })
|
|
19761
19762
|
], f.prototype, "templateName", 2);
|
|
19762
|
-
|
|
19763
|
+
B([
|
|
19763
19764
|
y({ attribute: "template-id", reflect: !1, type: String })
|
|
19764
19765
|
], f.prototype, "templateId", 2);
|
|
19765
|
-
|
|
19766
|
+
B([
|
|
19766
19767
|
y({
|
|
19767
19768
|
attribute: "supported-languages",
|
|
19768
19769
|
converter: {
|
|
@@ -19773,106 +19774,106 @@ D([
|
|
|
19773
19774
|
type: Array
|
|
19774
19775
|
})
|
|
19775
19776
|
], f.prototype, "supportedLanguages", 2);
|
|
19776
|
-
|
|
19777
|
+
B([
|
|
19777
19778
|
y({ attribute: "translatable-control-values", type: Object })
|
|
19778
19779
|
], f.prototype, "translatableControlValues", 2);
|
|
19779
|
-
|
|
19780
|
+
B([
|
|
19780
19781
|
y({ attribute: "default-language", reflect: !0, type: String })
|
|
19781
19782
|
], f.prototype, "defaultLanguage", 2);
|
|
19782
|
-
|
|
19783
|
+
B([
|
|
19783
19784
|
y({ type: Object })
|
|
19784
19785
|
], f.prototype, "boundary", 2);
|
|
19785
|
-
|
|
19786
|
+
B([
|
|
19786
19787
|
y({ attribute: "base-url", type: String })
|
|
19787
19788
|
], f.prototype, "baseUrl", 2);
|
|
19788
|
-
|
|
19789
|
+
B([
|
|
19789
19790
|
y({ attribute: "token", type: String })
|
|
19790
19791
|
], f.prototype, "token", 2);
|
|
19791
|
-
|
|
19792
|
+
B([
|
|
19792
19793
|
y({ attribute: "on-request-asset", type: Function })
|
|
19793
19794
|
], f.prototype, "onRequestAsset", 2);
|
|
19794
|
-
|
|
19795
|
+
B([
|
|
19795
19796
|
y({ attribute: "on-request-download-format", type: Function })
|
|
19796
19797
|
], f.prototype, "onRequestDownloadFormat", 2);
|
|
19797
|
-
|
|
19798
|
+
B([
|
|
19798
19799
|
y({ attribute: "on-request-asset-format", type: Function })
|
|
19799
19800
|
], f.prototype, "onRequestAssetFormat", 2);
|
|
19800
|
-
|
|
19801
|
+
B([
|
|
19801
19802
|
y({ attribute: "on-configure-workflow", type: Function })
|
|
19802
19803
|
], f.prototype, "onConfigureWorkflow", 2);
|
|
19803
|
-
|
|
19804
|
+
B([
|
|
19804
19805
|
y({ attribute: "block-attributes", reflect: !1, type: Object })
|
|
19805
19806
|
], f.prototype, "blockAttributes", 2);
|
|
19806
|
-
|
|
19807
|
+
B([
|
|
19807
19808
|
y({ attribute: "block-properties", reflect: !1, type: Object })
|
|
19808
19809
|
], f.prototype, "blockProperties", 2);
|
|
19809
|
-
|
|
19810
|
+
B([
|
|
19810
19811
|
y({ attribute: "block-styles", reflect: !1, type: Object })
|
|
19811
19812
|
], f.prototype, "blockStyles", 2);
|
|
19812
|
-
|
|
19813
|
+
B([
|
|
19813
19814
|
y({ attribute: "traits", reflect: !1, type: Object })
|
|
19814
19815
|
], f.prototype, "traits", 2);
|
|
19815
|
-
|
|
19816
|
+
B([
|
|
19816
19817
|
y({ attribute: "translatable-controls", reflect: !1, type: Array })
|
|
19817
19818
|
], f.prototype, "translatableControls", 2);
|
|
19818
|
-
|
|
19819
|
+
B([
|
|
19819
19820
|
y({ attribute: "block-name", reflect: !0, type: String })
|
|
19820
19821
|
], f.prototype, "blockName", 2);
|
|
19821
|
-
|
|
19822
|
+
B([
|
|
19822
19823
|
y({ reflect: !1, type: String })
|
|
19823
19824
|
], f.prototype, "name", 2);
|
|
19824
|
-
|
|
19825
|
+
B([
|
|
19825
19826
|
y({ reflect: !1, type: String })
|
|
19826
19827
|
], f.prototype, "description", 2);
|
|
19827
|
-
|
|
19828
|
+
B([
|
|
19828
19829
|
y({ attribute: "show-template-tab", reflect: !0, type: Boolean })
|
|
19829
19830
|
], f.prototype, "showTemplateTab", 2);
|
|
19830
|
-
|
|
19831
|
+
B([
|
|
19831
19832
|
y({ attribute: "dialog-title", reflect: !0, type: String })
|
|
19832
19833
|
], f.prototype, "dialogTitle", 2);
|
|
19833
|
-
|
|
19834
|
+
B([
|
|
19834
19835
|
y({ attribute: "skip-show-check", reflect: !0, type: Boolean })
|
|
19835
19836
|
], f.prototype, "skipShowCheck", 2);
|
|
19836
|
-
|
|
19837
|
+
B([
|
|
19837
19838
|
y({ attribute: "enable-asset-format-controls", reflect: !0, type: Boolean })
|
|
19838
19839
|
], f.prototype, "enableAssetFormatControls", 2);
|
|
19839
|
-
|
|
19840
|
+
B([
|
|
19840
19841
|
y({
|
|
19841
19842
|
attribute: "allowed-folders",
|
|
19842
19843
|
converter: ve,
|
|
19843
19844
|
type: Array
|
|
19844
19845
|
})
|
|
19845
19846
|
], f.prototype, "allowedFolders", 2);
|
|
19846
|
-
|
|
19847
|
+
B([
|
|
19847
19848
|
u()
|
|
19848
19849
|
], f.prototype, "isEditingTemplateSettings", 2);
|
|
19849
|
-
|
|
19850
|
+
B([
|
|
19850
19851
|
u()
|
|
19851
19852
|
], f.prototype, "disableCloseConfigDialog", 2);
|
|
19852
|
-
|
|
19853
|
+
B([
|
|
19853
19854
|
u()
|
|
19854
19855
|
], f.prototype, "isAfterShow", 2);
|
|
19855
|
-
|
|
19856
|
+
B([
|
|
19856
19857
|
u()
|
|
19857
19858
|
], f.prototype, "sortedLanguages", 2);
|
|
19858
|
-
|
|
19859
|
+
B([
|
|
19859
19860
|
u()
|
|
19860
19861
|
], f.prototype, "formKey", 2);
|
|
19861
|
-
|
|
19862
|
+
B([
|
|
19862
19863
|
O("supportedLanguages")
|
|
19863
19864
|
], f.prototype, "handleSupportedLanguagesChange", 1);
|
|
19864
|
-
f =
|
|
19865
|
+
f = B([
|
|
19865
19866
|
ie("cx-config-form")
|
|
19866
19867
|
], f);
|
|
19867
19868
|
const c2 = te`:host{display:block}.confirm-popover__footer{--color:var(--cx-color-danger)}.confirm-popover__footer::part(base){margin-top:var(--cx-spacing-small);display:block}`;
|
|
19868
|
-
var d2 = Object.defineProperty, s2 = Object.getOwnPropertyDescriptor,
|
|
19869
|
+
var d2 = Object.defineProperty, s2 = Object.getOwnPropertyDescriptor, $ = (e, a, n, t) => {
|
|
19869
19870
|
for (var r = t > 1 ? void 0 : t ? s2(a, n) : a, i = e.length - 1, c; i >= 0; i--)
|
|
19870
19871
|
(c = e[i]) && (r = (t ? c(a, n, r) : c(r)) || r);
|
|
19871
19872
|
return t && r && d2(a, n, r), r;
|
|
19872
19873
|
};
|
|
19873
|
-
let
|
|
19874
|
+
let F = class extends ee {
|
|
19874
19875
|
constructor() {
|
|
19875
|
-
super(), this.localize = new W(this), this.configsController = new E1(this.localize), this.component = null, this.loading = !1, this.mode =
|
|
19876
|
+
super(), this.localize = new W(this), this.configsController = new E1(this.localize), this.component = null, this.loading = !1, this.mode = le.Template, this.enableAssetFormatControls = !1, this.enableFontFamilyControls = !1, this.allowedFolders = [], this.adhocProperties = [], this.templateName = "", this.templateId = "", this.supportedLanguages = ["en-us"], this.defaultLanguage = "en-us", this.translatableControlValues = [], this.boundary = document.body, this.onRequestAsset = void 0, this.onRequestDownloadFormat = void 0, this.onRequestAssetFormat = void 0, this.onConfigureWorkflow = void 0, this.blockAttributes = {}, this.blockProperties = {}, this.blockStyles = {}, this.traits = [], this.blockType = "", this.blockName = "", this.name = "", this.description = "", this.tab = "", this.isEditingTemplateSettings = !1, this.translatableControlValuesMap = {}, this.translatableControls = [], this.handleSave = this.handleSave.bind(this);
|
|
19876
19877
|
}
|
|
19877
19878
|
/**
|
|
19878
19879
|
* Whether the template is editable.
|
|
@@ -19882,7 +19883,7 @@ let B = class extends ee {
|
|
|
19882
19883
|
* @default true
|
|
19883
19884
|
*/
|
|
19884
19885
|
get isTemplateEditable() {
|
|
19885
|
-
return this.mode ===
|
|
19886
|
+
return this.mode === le.Template;
|
|
19886
19887
|
}
|
|
19887
19888
|
getFlattenTraits(e, a, n = !1) {
|
|
19888
19889
|
return e.reduce(
|
|
@@ -19916,11 +19917,6 @@ let B = class extends ee {
|
|
|
19916
19917
|
return;
|
|
19917
19918
|
this.translatableControlValuesMap = {}, await this.updateComplete;
|
|
19918
19919
|
const e = this.component.get("type"), a = this.configsController.getConfigs(e, {
|
|
19919
|
-
defaultCarouselFormat: this.defaultCarouselFormat,
|
|
19920
|
-
defaultGalleryFormat: this.defaultGalleryFormat,
|
|
19921
|
-
defaultImageFormat: this.defaultImageFormat,
|
|
19922
|
-
defaultTimelineFormat: this.defaultTimelineFormat,
|
|
19923
|
-
defaultVideoPosterFormat: this.defaultVideoPosterFormat,
|
|
19924
19920
|
enableAssetFormatControls: this.enableAssetFormatControls,
|
|
19925
19921
|
enableFontFamilyControls: this.enableFontFamilyControls
|
|
19926
19922
|
});
|
|
@@ -19984,85 +19980,54 @@ let B = class extends ee {
|
|
|
19984
19980
|
return h`<cx-config-form block-name=${this.blockName} default-language=${this.defaultLanguage} description=${this.description} name=${this.name} mode=${this.mode} template-name=${this.templateName} template-id=${this.templateId} ?enable-asset-format-controls=${this.enableAssetFormatControls} ?enable-font-family-controls=${this.enableFontFamilyControls} ?loading=${this.loading} .allowedFolders=${this.allowedFolders} .adhocProperties=${this.adhocProperties} .blockAttributes=${this.blockAttributes} .blockProperties=${this.blockProperties} .blockStyles=${this.blockStyles} .boundary=${this.boundary} .supportedLanguages=${this.supportedLanguages} .translatableControls=${this.translatableControls} .translatableControlValues=${this.translatableControlValuesMap} .traits=${this.traits} .onRequestAsset=${this.onRequestAsset} .onRequestDownloadFormat=${this.onRequestDownloadFormat} .onConfigureWorkflow=${this.onConfigureWorkflow} .onRequestAssetFormat=${this.onRequestAssetFormat} @cx-content-builder-translatable-value-change=${this.handleTranslatableValueChange} @cx-content-builder-form-change=${this.handleChange} @cx-content-builder-form-field-change=${this.handleFieldChange} @cx-content-builder-form-save=${this.handleSave}></cx-config-form>`;
|
|
19985
19981
|
}
|
|
19986
19982
|
};
|
|
19987
|
-
|
|
19988
|
-
|
|
19983
|
+
F.styles = [ae, c2];
|
|
19984
|
+
F.dependencies = {
|
|
19989
19985
|
"cx-config-form": f,
|
|
19990
19986
|
"cx-typography": Z
|
|
19991
19987
|
};
|
|
19992
|
-
|
|
19993
|
-
|
|
19994
|
-
],
|
|
19995
|
-
|
|
19988
|
+
$([
|
|
19989
|
+
M("cx-config-form")
|
|
19990
|
+
], F.prototype, "dialog", 2);
|
|
19991
|
+
$([
|
|
19996
19992
|
y({ reflect: !1, type: Object })
|
|
19997
|
-
],
|
|
19998
|
-
|
|
19993
|
+
], F.prototype, "component", 2);
|
|
19994
|
+
$([
|
|
19999
19995
|
y({ reflect: !0, type: Boolean })
|
|
20000
|
-
],
|
|
20001
|
-
|
|
19996
|
+
], F.prototype, "loading", 2);
|
|
19997
|
+
$([
|
|
20002
19998
|
y({ reflect: !0, type: String })
|
|
20003
|
-
],
|
|
20004
|
-
|
|
19999
|
+
], F.prototype, "mode", 2);
|
|
20000
|
+
$([
|
|
20005
20001
|
y({
|
|
20006
20002
|
attribute: "enable-asset-format-controls",
|
|
20007
20003
|
reflect: !0,
|
|
20008
20004
|
type: Boolean
|
|
20009
20005
|
})
|
|
20010
|
-
],
|
|
20011
|
-
|
|
20006
|
+
], F.prototype, "enableAssetFormatControls", 2);
|
|
20007
|
+
$([
|
|
20012
20008
|
y({
|
|
20013
20009
|
attribute: "enable-font-family-controls",
|
|
20014
20010
|
reflect: !0,
|
|
20015
20011
|
type: Boolean
|
|
20016
20012
|
})
|
|
20017
|
-
],
|
|
20018
|
-
|
|
20019
|
-
y({ attribute: "default-image-format", reflect: !0, type: String })
|
|
20020
|
-
], B.prototype, "defaultImageFormat", 2);
|
|
20021
|
-
F([
|
|
20022
|
-
y({
|
|
20023
|
-
attribute: "default-video-poster-format",
|
|
20024
|
-
reflect: !0,
|
|
20025
|
-
type: String
|
|
20026
|
-
})
|
|
20027
|
-
], B.prototype, "defaultVideoPosterFormat", 2);
|
|
20028
|
-
F([
|
|
20029
|
-
y({
|
|
20030
|
-
attribute: "default-gallery-format",
|
|
20031
|
-
reflect: !0,
|
|
20032
|
-
type: String
|
|
20033
|
-
})
|
|
20034
|
-
], B.prototype, "defaultGalleryFormat", 2);
|
|
20035
|
-
F([
|
|
20036
|
-
y({
|
|
20037
|
-
attribute: "default-carousel-format",
|
|
20038
|
-
reflect: !0,
|
|
20039
|
-
type: String
|
|
20040
|
-
})
|
|
20041
|
-
], B.prototype, "defaultCarouselFormat", 2);
|
|
20042
|
-
F([
|
|
20043
|
-
y({
|
|
20044
|
-
attribute: "default-timeline-format",
|
|
20045
|
-
reflect: !0,
|
|
20046
|
-
type: String
|
|
20047
|
-
})
|
|
20048
|
-
], B.prototype, "defaultTimelineFormat", 2);
|
|
20049
|
-
F([
|
|
20013
|
+
], F.prototype, "enableFontFamilyControls", 2);
|
|
20014
|
+
$([
|
|
20050
20015
|
y({
|
|
20051
20016
|
attribute: "allowed-folders",
|
|
20052
20017
|
converter: ve,
|
|
20053
20018
|
type: Array
|
|
20054
20019
|
})
|
|
20055
|
-
],
|
|
20056
|
-
|
|
20020
|
+
], F.prototype, "allowedFolders", 2);
|
|
20021
|
+
$([
|
|
20057
20022
|
y({ attribute: "adhoc-properties", type: Array })
|
|
20058
|
-
],
|
|
20059
|
-
|
|
20023
|
+
], F.prototype, "adhocProperties", 2);
|
|
20024
|
+
$([
|
|
20060
20025
|
y({ attribute: "template-name", reflect: !1, type: String })
|
|
20061
|
-
],
|
|
20062
|
-
|
|
20026
|
+
], F.prototype, "templateName", 2);
|
|
20027
|
+
$([
|
|
20063
20028
|
y({ attribute: "template-id", reflect: !1, type: String })
|
|
20064
|
-
],
|
|
20065
|
-
|
|
20029
|
+
], F.prototype, "templateId", 2);
|
|
20030
|
+
$([
|
|
20066
20031
|
y({
|
|
20067
20032
|
attribute: "supported-languages",
|
|
20068
20033
|
converter: {
|
|
@@ -20072,75 +20037,75 @@ F([
|
|
|
20072
20037
|
reflect: !0,
|
|
20073
20038
|
type: Array
|
|
20074
20039
|
})
|
|
20075
|
-
],
|
|
20076
|
-
|
|
20040
|
+
], F.prototype, "supportedLanguages", 2);
|
|
20041
|
+
$([
|
|
20077
20042
|
y({ attribute: "default-language", reflect: !0, type: String })
|
|
20078
|
-
],
|
|
20079
|
-
|
|
20043
|
+
], F.prototype, "defaultLanguage", 2);
|
|
20044
|
+
$([
|
|
20080
20045
|
y({ attribute: "translatable-control-values", type: Array })
|
|
20081
|
-
],
|
|
20082
|
-
|
|
20046
|
+
], F.prototype, "translatableControlValues", 2);
|
|
20047
|
+
$([
|
|
20083
20048
|
y({ type: Object })
|
|
20084
|
-
],
|
|
20085
|
-
|
|
20049
|
+
], F.prototype, "boundary", 2);
|
|
20050
|
+
$([
|
|
20086
20051
|
y({ attribute: "on-request-asset", type: Function })
|
|
20087
|
-
],
|
|
20088
|
-
|
|
20052
|
+
], F.prototype, "onRequestAsset", 2);
|
|
20053
|
+
$([
|
|
20089
20054
|
y({ attribute: "on-request-download-format", type: Function })
|
|
20090
|
-
],
|
|
20091
|
-
|
|
20055
|
+
], F.prototype, "onRequestDownloadFormat", 2);
|
|
20056
|
+
$([
|
|
20092
20057
|
y({ attribute: "on-request-asset-format", type: Function })
|
|
20093
|
-
],
|
|
20094
|
-
|
|
20058
|
+
], F.prototype, "onRequestAssetFormat", 2);
|
|
20059
|
+
$([
|
|
20095
20060
|
y({ attribute: "on-configure-workflow", type: Function })
|
|
20096
|
-
],
|
|
20097
|
-
|
|
20061
|
+
], F.prototype, "onConfigureWorkflow", 2);
|
|
20062
|
+
$([
|
|
20098
20063
|
u()
|
|
20099
|
-
],
|
|
20100
|
-
|
|
20064
|
+
], F.prototype, "blockAttributes", 2);
|
|
20065
|
+
$([
|
|
20101
20066
|
u()
|
|
20102
|
-
],
|
|
20103
|
-
|
|
20067
|
+
], F.prototype, "blockProperties", 2);
|
|
20068
|
+
$([
|
|
20104
20069
|
u()
|
|
20105
|
-
],
|
|
20106
|
-
|
|
20070
|
+
], F.prototype, "blockStyles", 2);
|
|
20071
|
+
$([
|
|
20107
20072
|
u()
|
|
20108
|
-
],
|
|
20109
|
-
|
|
20073
|
+
], F.prototype, "traits", 2);
|
|
20074
|
+
$([
|
|
20110
20075
|
u()
|
|
20111
|
-
],
|
|
20112
|
-
|
|
20076
|
+
], F.prototype, "blockType", 2);
|
|
20077
|
+
$([
|
|
20113
20078
|
u()
|
|
20114
|
-
],
|
|
20115
|
-
|
|
20079
|
+
], F.prototype, "blockName", 2);
|
|
20080
|
+
$([
|
|
20116
20081
|
u()
|
|
20117
|
-
],
|
|
20118
|
-
|
|
20082
|
+
], F.prototype, "name", 2);
|
|
20083
|
+
$([
|
|
20119
20084
|
u()
|
|
20120
|
-
],
|
|
20121
|
-
|
|
20085
|
+
], F.prototype, "description", 2);
|
|
20086
|
+
$([
|
|
20122
20087
|
u()
|
|
20123
|
-
],
|
|
20124
|
-
|
|
20088
|
+
], F.prototype, "tab", 2);
|
|
20089
|
+
$([
|
|
20125
20090
|
u()
|
|
20126
|
-
],
|
|
20127
|
-
|
|
20091
|
+
], F.prototype, "isEditingTemplateSettings", 2);
|
|
20092
|
+
$([
|
|
20128
20093
|
u()
|
|
20129
|
-
],
|
|
20130
|
-
|
|
20094
|
+
], F.prototype, "translatableControlValuesMap", 2);
|
|
20095
|
+
$([
|
|
20131
20096
|
u()
|
|
20132
|
-
],
|
|
20133
|
-
|
|
20097
|
+
], F.prototype, "translatableControls", 2);
|
|
20098
|
+
$([
|
|
20134
20099
|
O("traits"),
|
|
20135
20100
|
O("supportedLanguages", { waitUntilFirstUpdate: !0 }),
|
|
20136
20101
|
O("blockAttributes", { waitUntilFirstUpdate: !0 })
|
|
20137
|
-
],
|
|
20138
|
-
|
|
20102
|
+
], F.prototype, "handleTraitsChange", 1);
|
|
20103
|
+
$([
|
|
20139
20104
|
O("component")
|
|
20140
|
-
],
|
|
20141
|
-
|
|
20105
|
+
], F.prototype, "handleComponentChange", 1);
|
|
20106
|
+
F = $([
|
|
20142
20107
|
ie("cx-config-manager")
|
|
20143
|
-
],
|
|
20108
|
+
], F);
|
|
20144
20109
|
export {
|
|
20145
|
-
|
|
20110
|
+
F as CxConfigManager
|
|
20146
20111
|
};
|