@orangelogic/design-system 3.73.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.Ca7ImdeI.js → block-width.CKhcYAsL.js} +2 -2
- package/library/chunks/{config-manager.C1YTm4Kg.js → config-manager.CwTukKbk.js} +65 -35
- package/library/chunks/{configs-controller.BkBWWSds.js → configs-controller.DIDTvuY-.js} +1 -1
- package/library/chunks/{document-viewer.PpoBWYf2.js → document-viewer.CJCPy_Jg.js} +2 -0
- package/library/chunks/{src.B8MUOicZ.js → src.Cw6UwwtK.js} +1 -1
- package/library/components/atoms.js +2 -2
- package/library/components/document-viewer.js +1 -1
- package/library/components/types.js +11396 -11390
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-content-builder-translatable-value-change.d.ts +2 -1
- package/library/packages/hybrid/book-reader/src/book-reader/book-reader.d.ts +2 -0
- 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
|
@@ -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";
|
|
@@ -80,7 +80,7 @@ import { t as Dt } from "./shadow-input-group.kaLCMX3c.js";
|
|
|
80
80
|
import { t as Ot } from "./size-input-group.CFgOvLnO.js";
|
|
81
81
|
import { C as kt, S as At, T as jt, _ as Mt, b as Nt, c as Pt, f as Ft, g as It, h as Lt, i as Rt, l as zt, n as Bt, o as Vt, p as Ht, r as Ut, s as Wt, t as Gt, u as Kt, v as qt, w as Jt, x as Yt, y as Xt } from "./asset-link-format.H-8Ub7b2.js";
|
|
82
82
|
import { c as Zt, d as Qt, f as $t, n as en, u as tn } from "./color-swatch-group.CefCwg8T.js";
|
|
83
|
-
import { C as nn, E as rn, H as an, J as on, K as sn, L as P, M as cn, S as ln, X as un, Y as dn, Z as fn, _ as pn, at as F, b as mn, g as hn, it as gn, nt as _n, ot as vn, q as yn, rt as I } from "./configs-controller.
|
|
83
|
+
import { C as nn, E as rn, H as an, J as on, K as sn, L as P, M as cn, S as ln, X as un, Y as dn, Z as fn, _ as pn, at as F, b as mn, g as hn, it as gn, nt as _n, ot as vn, q as yn, rt as I } from "./configs-controller.DIDTvuY-.js";
|
|
84
84
|
import { a as bn } from "./cloneDeep.C6x5LNv3.js";
|
|
85
85
|
//#region ../../packages/types/src/icon-picker.ts
|
|
86
86
|
var xn = /* @__PURE__ */ function(e) {
|
|
@@ -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";
|
|
@@ -63,7 +63,7 @@ import { T as K } from "./asset-link-format.H-8Ub7b2.js";
|
|
|
63
63
|
import { n as Qe } from "./_baseXor.Ca5K0ORC.js";
|
|
64
64
|
import { n as $e, s as et, t as q } from "./isArrayLikeObject.Da3IzQeH.js";
|
|
65
65
|
import { i as tt } from "./_baseClone.CnI5Vpqn.js";
|
|
66
|
-
import { M as nt, l as J, s as rt, t as it } from "./configs-controller.
|
|
66
|
+
import { M as nt, l as J, s as rt, t as it } from "./configs-controller.DIDTvuY-.js";
|
|
67
67
|
import { t as at } from "./isEmpty.D3QQduJ5.js";
|
|
68
68
|
import { i as ot } from "./cloneDeep.C6x5LNv3.js";
|
|
69
69
|
//#region ../../node_modules/lodash-es/difference.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
|
} });
|
|
@@ -9,7 +9,7 @@ import { a as te, i as ne, r as re } from "./tab-group.DRQ_5LSk.js";
|
|
|
9
9
|
import { t as ie } from "./parse.CDrJ-NY7.js";
|
|
10
10
|
import { t as ae } from "./toString.r2ImdBrm.js";
|
|
11
11
|
import { t as oe } from "./capitalize.BT_EavGy.js";
|
|
12
|
-
import { a as se, i as ce, n as le, r as ue } from "./document-viewer.
|
|
12
|
+
import { a as se, i as ce, n as le, r as ue } from "./document-viewer.CJCPy_Jg.js";
|
|
13
13
|
import { f as de, l as fe } from "./url.CZO_DV8Y.js";
|
|
14
14
|
import { _ as pe, g as me, p as he, v as ge } from "./color.CIOzHtLK.js";
|
|
15
15
|
import { _ as _e, g as ve, h as ye, m as be, p as xe, s as b } from "./responsive.L9Csz2w2.js";
|
|
@@ -22,6 +22,7 @@ import { t as focusWhenVisible } from "./focus-when-visible.DKscgyKo.js";
|
|
|
22
22
|
import { t as input_default } from "./input.w9KQVNnx.js";
|
|
23
23
|
import { t as menu_default } from "./menu.Al_SBJNI.js";
|
|
24
24
|
import { t as menu_item_default } from "./menu-item.CX4NV4BU.js";
|
|
25
|
+
import { t as space_default } from "./space.Dd8jezXK.js";
|
|
25
26
|
import { t as drawer_default } from "./drawer.DdZl0Tae.js";
|
|
26
27
|
import { t as progress_bar_default } from "./progress-bar.BJfkoZ6G.js";
|
|
27
28
|
import { fetchCortexApi } from "../utils.js";
|
|
@@ -22183,6 +22184,7 @@ var CxBookReader = class extends CortexElement {
|
|
|
22183
22184
|
"cx-popup": popup_default,
|
|
22184
22185
|
"cx-progress-bar": progress_bar_default,
|
|
22185
22186
|
"cx-resize-observer": resize_observer_default,
|
|
22187
|
+
"cx-space": space_default,
|
|
22186
22188
|
"cx-spinner": spinner_default,
|
|
22187
22189
|
"cx-tooltip": tooltip_default,
|
|
22188
22190
|
"cx-typography": typography_default
|
|
@@ -44,7 +44,7 @@ import "./divider.CqSNZCU8.js";
|
|
|
44
44
|
import "./diff.DAFtnzhM.js";
|
|
45
45
|
import "./drawer.DdZl0Tae.js";
|
|
46
46
|
import "./progress-bar.BJfkoZ6G.js";
|
|
47
|
-
import "./document-viewer.
|
|
47
|
+
import "./document-viewer.CJCPy_Jg.js";
|
|
48
48
|
import "./image.WBQUoc3j.js";
|
|
49
49
|
import "./skeleton.BtwugOTG.js";
|
|
50
50
|
import "./dot-pagination.CH4nRyA8.js";
|
|
@@ -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";
|
|
@@ -46,7 +46,7 @@ import { t as J } from "../chunks/divider.CqSNZCU8.js";
|
|
|
46
46
|
import { t as Y } from "../chunks/diff.DAFtnzhM.js";
|
|
47
47
|
import { t as X } from "../chunks/drawer.DdZl0Tae.js";
|
|
48
48
|
import { t as Z } from "../chunks/progress-bar.BJfkoZ6G.js";
|
|
49
|
-
import { t as Q } from "../chunks/document-viewer.
|
|
49
|
+
import { t as Q } from "../chunks/document-viewer.CJCPy_Jg.js";
|
|
50
50
|
import { t as $ } from "../chunks/image.WBQUoc3j.js";
|
|
51
51
|
import { t as ee } from "../chunks/skeleton.BtwugOTG.js";
|
|
52
52
|
import { t as te } from "../chunks/dot-pagination.CH4nRyA8.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/document-viewer.
|
|
1
|
+
import { t as e } from "../chunks/document-viewer.CJCPy_Jg.js";
|
|
2
2
|
export { e as default };
|