@orangelogic/design-system 3.74.0 → 3.75.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/{block-width.C-oaiP0S.js → block-width.CKhcYAsL.js} +1 -1
- package/library/chunks/{config-manager.BnX64fGI.js → config-manager.CwTukKbk.js} +64 -34
- package/library/components/atoms.js +4 -4
- package/library/components/molecules.js +3 -3
- package/library/components/types.js +11399 -11393
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-content-builder-translatable-value-change.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +8 -2
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +2 -2
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +1 -1
- package/package.json +1 -1
- package/library/chunks/{src.B1UeMiG_.js → src.Cw6UwwtK.js} +1 -1
|
@@ -15,7 +15,7 @@ import { t as y } from "./when.BUskJLtZ.js";
|
|
|
15
15
|
import { t as ie } from "./icon.CeQpEaQz.js";
|
|
16
16
|
import { t as ae } from "./spinner.o3Rjsff7.js";
|
|
17
17
|
import { n as oe } from "./tslib.es6.DJNsMHqv.js";
|
|
18
|
-
import { t as se } from "./src.
|
|
18
|
+
import { t as se } from "./src.Cw6UwwtK.js";
|
|
19
19
|
import { t as ce } from "./style-map.DPGQIxip.js";
|
|
20
20
|
import { t as b } from "./button.DeRJNqpr.js";
|
|
21
21
|
import { E as x, S as le, r as ue } from "./string.DAuTpyw8.js";
|
|
@@ -14,7 +14,7 @@ import { t as b } from "./style-map.DPGQIxip.js";
|
|
|
14
14
|
import { t as x } from "./button.DeRJNqpr.js";
|
|
15
15
|
import { t as ee } from "./tooltip.fZNjia6Z.js";
|
|
16
16
|
import { t as te } from "./line-clamp.DAhcB8_D.js";
|
|
17
|
-
import { S as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, l as fe, m as pe, n as me, o as he, p as ge, s as S, t as C, u as w, v as T, x as E, y as D } from "./block-width.
|
|
17
|
+
import { S as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, l as fe, m as pe, n as me, o as he, p as ge, s as S, t as C, u as w, v as T, x as E, y as D } from "./block-width.CKhcYAsL.js";
|
|
18
18
|
import { t as O } from "./typography.B0mkhqTB.js";
|
|
19
19
|
import { t as k } from "./button-group.CPfXrqyq.js";
|
|
20
20
|
import { t as A } from "./card.3c-X4hqR.js";
|
|
@@ -322,26 +322,34 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
322
322
|
}
|
|
323
323
|
return t`<cx-space direction="vertical" wrap="nowrap">${a}</cx-space>`;
|
|
324
324
|
}
|
|
325
|
+
getTranslationAttributes(e) {
|
|
326
|
+
return e === this.host.defaultLanguage ? this.host.blockAttributes : {
|
|
327
|
+
...this.host.blockAttributes,
|
|
328
|
+
...this.host.translatableControlValues[this.host.defaultLanguage],
|
|
329
|
+
...this.host.translatableControlValues[e]
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
isTranslationControlVisible(e, t) {
|
|
333
|
+
return this.host.skipShowCheck && e.skipShowCheck ? !0 : typeof e.show == "boolean" ? e.show : typeof e.show != "function" || e.show(t);
|
|
334
|
+
}
|
|
325
335
|
renderTranslationControls() {
|
|
326
|
-
let e = K(this.host.translatableControls.map((e) => e.translateGroup)), n = t`${R(e, (e) => {
|
|
327
|
-
let
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
let
|
|
333
|
-
e.id && (a = n === this.host.defaultLanguage ? this.host.blockAttributes[e.id] ?? "" : this.host.translatableControlValues[n]?.[e.id] ?? this.host.translatableControlValues[this.host.defaultLanguage]?.[e.id] ?? this.host.blockAttributes[e.id]);
|
|
334
|
-
let o;
|
|
336
|
+
let e = K(this.host.translatableControls.map((e) => e.translateGroup)), n = new Map(this.host.sortedLanguages.map((e) => [e, this.getTranslationAttributes(e)])), r = t`${R(e, (e) => {
|
|
337
|
+
let r = this.host.translatableControls.filter((t) => t.translateGroup === e && this.host.sortedLanguages.some((e) => this.isTranslationControlVisible(t, n.get(e) ?? {})));
|
|
338
|
+
return r.length === 0 ? i : t`<cx-typography variant="h5">${e}</cx-typography>${R(r, (e) => e.id, (e) => e.controlType === "info-text" ? this.renderInfoText(e) : t`<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">${e.label}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${Oe(this.host.sortedLanguages, (r) => {
|
|
339
|
+
if (!this.isTranslationControlVisible(e, n.get(r) ?? {})) return i;
|
|
340
|
+
let a = this.localize.languageName(r) || _t.default.getName(r) || r, o = "";
|
|
341
|
+
e.id && (o = r === this.host.defaultLanguage ? this.host.blockAttributes[e.id] ?? "" : this.host.translatableControlValues[r]?.[e.id] ?? this.host.translatableControlValues[this.host.defaultLanguage]?.[e.id] ?? this.host.blockAttributes[e.id]);
|
|
342
|
+
let s;
|
|
335
343
|
switch (e.controlType) {
|
|
336
344
|
case "image-picker":
|
|
337
|
-
|
|
345
|
+
s = async (t) => {
|
|
338
346
|
if (typeof t == "object" && t) {
|
|
339
|
-
let { id:
|
|
347
|
+
let { id: n, src: i } = t, a = e.pickerConfigs?.recordIdKey ?? "record-id", o = e.pickerConfigs?.aspectRatioKey, s = n ? await this.controlRenderer.resolveAssetFormat(n, e.pickerConfigs?.defaultFormat ?? "") : {
|
|
340
348
|
aspectRatio: 0,
|
|
341
349
|
src: ""
|
|
342
350
|
};
|
|
343
351
|
this.host.emit("cx-content-builder-translatable-value-change", { detail: {
|
|
344
|
-
language:
|
|
352
|
+
language: r,
|
|
345
353
|
values: [
|
|
346
354
|
{
|
|
347
355
|
attribute: e.id,
|
|
@@ -351,7 +359,7 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
351
359
|
{
|
|
352
360
|
attribute: a,
|
|
353
361
|
type: "attribute",
|
|
354
|
-
value:
|
|
362
|
+
value: n
|
|
355
363
|
},
|
|
356
364
|
...o ? [{
|
|
357
365
|
attribute: o,
|
|
@@ -365,11 +373,11 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
365
373
|
break;
|
|
366
374
|
case "audio-picker":
|
|
367
375
|
case "video-picker":
|
|
368
|
-
|
|
376
|
+
s = async (t) => {
|
|
369
377
|
if (typeof t == "object" && t) {
|
|
370
|
-
let { id:
|
|
378
|
+
let { id: n, name: i, src: a } = t, o = e.pickerConfigs?.recordIdKey ?? "record-id", s = e.pickerConfigs?.nameKey ?? "name";
|
|
371
379
|
this.host.emit("cx-content-builder-translatable-value-change", { detail: {
|
|
372
|
-
language:
|
|
380
|
+
language: r,
|
|
373
381
|
values: [
|
|
374
382
|
{
|
|
375
383
|
attribute: e.id,
|
|
@@ -379,7 +387,7 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
379
387
|
{
|
|
380
388
|
attribute: o,
|
|
381
389
|
type: "attribute",
|
|
382
|
-
value:
|
|
390
|
+
value: n
|
|
383
391
|
},
|
|
384
392
|
{
|
|
385
393
|
attribute: s,
|
|
@@ -391,9 +399,24 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
391
399
|
}
|
|
392
400
|
};
|
|
393
401
|
break;
|
|
394
|
-
|
|
402
|
+
case "switch":
|
|
403
|
+
s = async (t) => {
|
|
404
|
+
if (typeof t == "object" && t) {
|
|
405
|
+
let { checked: n } = t, i = !!n;
|
|
406
|
+
i && e.checkedValue !== void 0 ? i = e.checkedValue : !i && e.uncheckedValue !== void 0 && (i = e.uncheckedValue), this.host.emit("cx-content-builder-translatable-value-change", { detail: {
|
|
407
|
+
language: r,
|
|
408
|
+
values: [{
|
|
409
|
+
attribute: e.id,
|
|
410
|
+
type: "attribute",
|
|
411
|
+
value: i
|
|
412
|
+
}]
|
|
413
|
+
} });
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
break;
|
|
417
|
+
default: s = async (t) => {
|
|
395
418
|
typeof t == "string" && this.host.emit("cx-content-builder-translatable-value-change", { detail: {
|
|
396
|
-
language:
|
|
419
|
+
language: r,
|
|
397
420
|
values: [{
|
|
398
421
|
attribute: e.id,
|
|
399
422
|
type: "attribute",
|
|
@@ -403,30 +426,30 @@ var Y = (e) => M(e) ? e._$litType$.h : e.strings, X = g(class extends h {
|
|
|
403
426
|
};
|
|
404
427
|
}
|
|
405
428
|
return t`
|
|
406
|
-
${v(e.controlType && e.controlType !== "input", () => t`<cx-typography variant="body3">${
|
|
429
|
+
${v(e.controlType && e.controlType !== "input", () => t`<cx-typography variant="body3">${a}</cx-typography>`, () => i)}
|
|
407
430
|
${this.controlRenderer.renderControl({
|
|
408
431
|
blockAttributes: {
|
|
409
432
|
...this.host.blockAttributes,
|
|
410
|
-
...this.host.translatableControlValues[
|
|
433
|
+
...this.host.translatableControlValues[r]
|
|
411
434
|
},
|
|
412
435
|
container: void 0,
|
|
413
|
-
currentValue:
|
|
414
|
-
disabled:
|
|
415
|
-
handleChange:
|
|
436
|
+
currentValue: o,
|
|
437
|
+
disabled: r.toLowerCase() === this.host.defaultLanguage.toLowerCase(),
|
|
438
|
+
handleChange: s,
|
|
416
439
|
key: e.id,
|
|
417
|
-
label:
|
|
440
|
+
label: a,
|
|
418
441
|
trait: {
|
|
419
442
|
...e,
|
|
420
443
|
inputConfigs: {
|
|
421
444
|
...e.inputConfigs,
|
|
422
|
-
label:
|
|
445
|
+
label: a
|
|
423
446
|
}
|
|
424
447
|
}
|
|
425
448
|
})}
|
|
426
449
|
`;
|
|
427
450
|
})}</cx-space></cx-grid-item></cx-grid>`)}`;
|
|
428
451
|
})}`;
|
|
429
|
-
return t`<cx-space direction="vertical" wrap="nowrap">${
|
|
452
|
+
return t`<cx-space direction="vertical" wrap="nowrap">${r}</cx-space>`;
|
|
430
453
|
}
|
|
431
454
|
}, Z = class extends l {
|
|
432
455
|
constructor(...e) {
|
|
@@ -740,19 +763,26 @@ var Q = Z, yt = n`:host{display:block}.confirm-popover__footer{--color:var(--cx-
|
|
|
740
763
|
}
|
|
741
764
|
}
|
|
742
765
|
handleSave(e) {
|
|
743
|
-
let t = this.getFlattenTraits(this.traits).reduce((e, t) => (e[t.id] = t, e), {}),
|
|
744
|
-
let i = t
|
|
745
|
-
return nt.includes(
|
|
746
|
-
}, {});
|
|
766
|
+
let t = this.getFlattenTraits(this.traits), n = t.reduce((e, t) => (e[t.id] = t, e), {}), r = Object.entries(this.blockAttributes).reduce((e, [t, r]) => {
|
|
767
|
+
let i = n[t];
|
|
768
|
+
return nt.includes(t) || (i ? e[t] = r : typeof r == "boolean" && (e[t] = !1)), e;
|
|
769
|
+
}, {}), i = { ...this.translatableControlValuesMap }, a = i[this.defaultLanguage];
|
|
770
|
+
if (a) {
|
|
771
|
+
i[this.defaultLanguage] = { ...a };
|
|
772
|
+
for (let e of t) {
|
|
773
|
+
let t = r[e.id];
|
|
774
|
+
e.type === "attribute" && e.translatable && e.controlType === "switch" && (typeof t == "string" || typeof t == "boolean") && (i[this.defaultLanguage][e.id] = t);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
747
777
|
this.emit("cx-content-builder-configure", { detail: {
|
|
748
778
|
description: this.description,
|
|
749
779
|
isDetachTemplate: e.detail.isDetachTemplate ?? !1,
|
|
750
780
|
name: this.name,
|
|
751
781
|
settings: {
|
|
752
|
-
attributes:
|
|
782
|
+
attributes: r,
|
|
753
783
|
properties: this.blockProperties,
|
|
754
784
|
styleProps: this.blockStyles,
|
|
755
|
-
translations:
|
|
785
|
+
translations: i
|
|
756
786
|
},
|
|
757
787
|
templateId: e.detail.isNewTemplate ? "" : this.templateId
|
|
758
788
|
} });
|
|
@@ -8,7 +8,7 @@ import { t as c } from "../chunks/alert.D8Gwfkvy.js";
|
|
|
8
8
|
import { t as l } from "../chunks/am-chart.COOKOvT1.js";
|
|
9
9
|
import { t as u } from "../chunks/animated-image.w6VdagCh.js";
|
|
10
10
|
import { t as d } from "../chunks/animation.CRLxJUWm.js";
|
|
11
|
-
import { n as f, r as p, t as m } from "../chunks/src.
|
|
11
|
+
import { n as f, r as p, t as m } from "../chunks/src.Cw6UwwtK.js";
|
|
12
12
|
import { t as h } from "../chunks/button.DeRJNqpr.js";
|
|
13
13
|
import { t as g } from "../chunks/tooltip.fZNjia6Z.js";
|
|
14
14
|
import { t as _ } from "../chunks/resize-observer.D9EHlnZI.js";
|
|
@@ -52,8 +52,8 @@ import { t as ee } from "../chunks/skeleton.BtwugOTG.js";
|
|
|
52
52
|
import { t as te } from "../chunks/dot-pagination.CH4nRyA8.js";
|
|
53
53
|
import { t as ne } from "../chunks/dot-status.BATg_Fn-.js";
|
|
54
54
|
import { t as re } from "../chunks/e-chart.fGTLKIDX.js";
|
|
55
|
-
import ie from "
|
|
56
|
-
import
|
|
55
|
+
import { t as ie } from "../chunks/element-clamp.BXz2Lc5M.js";
|
|
56
|
+
import ae from "./format-bytes.js";
|
|
57
57
|
import oe from "./format-date.js";
|
|
58
58
|
import se from "./format-number.js";
|
|
59
59
|
import { t as ce } from "../chunks/format-time.DZCXUWmw.js";
|
|
@@ -86,4 +86,4 @@ import { t as Pe } from "../chunks/switch.CBho2RVW.js";
|
|
|
86
86
|
import { t as Fe } from "../chunks/timecode.DME2imtx.js";
|
|
87
87
|
import { a as Ie, i as Le } from "../chunks/tree.B9-viK2b.js";
|
|
88
88
|
import { n as Re } from "../chunks/video.Ba6tAEvb.js";
|
|
89
|
-
export { c as CxAlert, l as CxAmChart, u as CxAnimatedImage, d as CxAnimation, b as CxArrayLineClamp, S as CxAudio, C as CxAvatar, w as CxBadge, T as CxBox, E as CxBreadcrumb, D as CxBreadcrumbItem, h as CxButton, O as CxButtonGroup, k as CxCard, A as CxCheckbox, U as CxColorPicker, W as CxCopyButton, G as CxDateCalendar, K as CxDetails, q as CxDialog, Y as CxDiff, J as CxDivider, Q as CxDocumentViewer, te as CxDotPagination, ne as CxDotStatus, X as CxDrawer, j as CxDropdown, re as CxEChart,
|
|
89
|
+
export { c as CxAlert, l as CxAmChart, u as CxAnimatedImage, d as CxAnimation, b as CxArrayLineClamp, S as CxAudio, C as CxAvatar, w as CxBadge, T as CxBox, E as CxBreadcrumb, D as CxBreadcrumbItem, h as CxButton, O as CxButtonGroup, k as CxCard, A as CxCheckbox, U as CxColorPicker, W as CxCopyButton, G as CxDateCalendar, K as CxDetails, q as CxDialog, Y as CxDiff, J as CxDivider, Q as CxDocumentViewer, te as CxDotPagination, ne as CxDotStatus, X as CxDrawer, j as CxDropdown, re as CxEChart, ie as CxElementClamp, ae as CxFormatBytes, oe as CxFormatDate, se as CxFormatNumber, ce as CxFormatTime, le as CxGrid, ue as CxGridItem, de as CxHeader, fe as CxHubConnection, o as CxIcon, a as CxIconButton, pe as CxIframe, $ as CxImage, me as CxImageComparer, he as CxInclude, M as CxInput, ge as CxInputGroup, v as CxLineClamp, _e as CxMarkdown, N as CxMenu, P as CxMenuItem, ve as CxMenuLabel, ye as CxMenuSection, be as CxMutationObserver, I as CxOption, xe as CxPagination, e as CxPopup, Z as CxProgressBar, Se as CxProgressRing, Ce as CxQrCode, we as CxRadio, Te as CxRadioButton, Ee as CxRadioCard, De as CxRadioGroup, Oe as CxRange, ke as CxRating, Ae as CxRelativeTime, _ as CxResizeObserver, R as CxSelect, ee as CxSkeleton, L as CxSpace, s as CxSpinner, je as CxSplitPanel, Me as CxStep, Ne as CxStepper, Pe as CxSwitch, z as CxTab, B as CxTabGroup, V as CxTabPanel, y as CxTag, F as CxTextarea, Fe as CxTimecode, g as CxTooltip, Le as CxTree, Ie as CxTreeItem, x as CxTypography, Re as CxVideo, H as CxVisuallyHidden, t as componentStyles, m as fontAwesomeIconNames, i as getAnimation, f as getAnimationNames, p as getEasingNames, n as setAnimation, r as setDefaultAnimation };
|
|
@@ -11,8 +11,8 @@ import { t as l } from "../chunks/padding-input-group.BTjH4scb.js";
|
|
|
11
11
|
import { t as u } from "../chunks/position-picker.DwDC9gDl.js";
|
|
12
12
|
import { t as d } from "../chunks/shadow-input-group.kaLCMX3c.js";
|
|
13
13
|
import { t as f } from "../chunks/share-option-list.C28_ddOP.js";
|
|
14
|
-
import { t as p } from "../chunks/
|
|
15
|
-
import { t as m } from "../chunks/
|
|
14
|
+
import { t as p } from "../chunks/sidebar.B1MjUxBY.js";
|
|
15
|
+
import { t as m } from "../chunks/size-input-group.CFgOvLnO.js";
|
|
16
16
|
import { t as h } from "../chunks/stepper-wizard.BCmR5WiA.js";
|
|
17
17
|
import { t as g } from "../chunks/typeface.BHErcYfd.js";
|
|
18
|
-
export { e as CxBicolorPicker, t as CxBorderInputGroup, n as CxColorSwatch, r as CxConfirmPopover, i as CxCornerPositionInputGroup, a as CxCropper, o as CxDynamicSelect, s as CxFolderSelect, c as CxMasonry, l as CxPaddingInputGroup, u as CxPositionPicker, d as CxShadowInputGroup, f as CxShareOptionList,
|
|
18
|
+
export { e as CxBicolorPicker, t as CxBorderInputGroup, n as CxColorSwatch, r as CxConfirmPopover, i as CxCornerPositionInputGroup, a as CxCropper, o as CxDynamicSelect, s as CxFolderSelect, c as CxMasonry, l as CxPaddingInputGroup, u as CxPositionPicker, d as CxShadowInputGroup, f as CxShareOptionList, p as CxSidebar, m as CxSizeInputGroup, h as CxStepperWizard, g as CxTypeface };
|