@orangelogic/design-system 2.45.0 → 2.46.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.
Files changed (28) hide show
  1. package/library/chunks/{color-swatch-group.CMz7zQdk.js → color-swatch-group.Dp0a3l-3.js} +1 -1
  2. package/library/chunks/{file-on-demand.CODE3g50.js → file-on-demand.BEr9s0HP.js} +1 -1
  3. package/library/chunks/{list-editor.BZMql0Tj.js → list-editor.BZuFeqNq.js} +76 -67
  4. package/library/chunks/{tab-group.uF5JbAGa.js → tab-group.BBZDkdIX.js} +4 -0
  5. package/library/chunks/{table.D6Abk0xC.js → table.Bz0thu3_.js} +4 -2
  6. package/library/components/atoms.js +2 -2
  7. package/library/components/color-swatch-group.js +2 -2
  8. package/library/components/file-on-demand.js +2 -2
  9. package/library/components/list-editor.js +2 -2
  10. package/library/components/molecules.js +1 -1
  11. package/library/components/organisms.js +2 -2
  12. package/library/components/tab-group.js +1 -1
  13. package/library/components/table.js +1 -1
  14. package/library/components/types.js +8 -8
  15. package/library/package.json +1 -1
  16. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +6 -3
  17. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +2 -2
  18. package/library/packages/molecules/src/list-editor/list-editor.d.ts +2 -2
  19. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -2
  20. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +2 -2
  21. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +2 -2
  22. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +2 -2
  23. package/library/packages/organisms/src/content-builder/content-builder.d.ts +2 -2
  24. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/image-dialog.d.ts +2 -2
  25. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +2 -2
  26. package/library/packages/types/src/content-builder.d.ts +1 -0
  27. package/library/react-web-component.d.ts +1 -1
  28. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import _ from "../components/space.js";
2
- import { C as z } from "./table.D6Abk0xC.js";
2
+ import { C as z } from "./table.Bz0thu3_.js";
3
3
  import { C as $ } from "./typography.trna8y2b.js";
4
4
  import { x as h, B as F, i as k, n as p, C as A, c as S } from "./custom-element.fmLrnDZr.js";
5
5
  import { C as v, a as m } from "./color-swatch.DkZKPbUq.js";
@@ -25,7 +25,7 @@ import Mt from "../components/relative-time.js";
25
25
  import { C as Bt } from "./select.Bo8mWJ1g.js";
26
26
  import Vt from "../components/space.js";
27
27
  import Ht from "../components/tab.js";
28
- import { C as Wt } from "./tab-group.uF5JbAGa.js";
28
+ import { C as Wt } from "./tab-group.BBZDkdIX.js";
29
29
  import Gt from "../components/tab-panel.js";
30
30
  import qt from "../components/tooltip.js";
31
31
  import { C as Yt } from "./typography.trna8y2b.js";
@@ -2,12 +2,12 @@ import { C as _ } from "./button.DrU92LJQ.js";
2
2
  import { C as z } from "./dialog.rme_OwWe.js";
3
3
  import M from "../components/grid.js";
4
4
  import q from "../components/grid-item.js";
5
- import $ from "../components/input.js";
6
- import R from "../components/line-clamp.js";
7
- import O from "../components/radio.js";
8
- import k from "../components/radio-group.js";
9
- import C from "../components/space.js";
10
- import { C as T, H as P } from "./table.D6Abk0xC.js";
5
+ import C from "../components/input.js";
6
+ import T from "../components/line-clamp.js";
7
+ import R from "../components/radio.js";
8
+ import O from "../components/radio-group.js";
9
+ import $ from "../components/space.js";
10
+ import { C as P, H as k } from "./table.Bz0thu3_.js";
11
11
  import { C as I } from "./typography.trna8y2b.js";
12
12
  import { i as A, n, C as w, x as l, c as E } from "./custom-element.fmLrnDZr.js";
13
13
  import { c as D } from "./component.styles.DtouHn2g.js";
@@ -16,16 +16,16 @@ import { L as S } from "./i18n.D33BKrRs.js";
16
16
  import { w as g } from "./watch.BCJD77bD.js";
17
17
  import { r as x } from "./state.Dt9F_SuS.js";
18
18
  import { e as b } from "./query.BBf1UFkC.js";
19
- import { r as L } from "./choose.BTbF6BAn.js";
20
- import { e as j } from "./class-map.DqNfBvJI.js";
19
+ import { r as j } from "./choose.BTbF6BAn.js";
20
+ import { e as L } from "./class-map.DqNfBvJI.js";
21
21
  import { c as y } from "./repeat.B1pVpmRx.js";
22
- import { n as u } from "./when.Dr1es41R.js";
22
+ import { n as m } from "./when.Dr1es41R.js";
23
23
  import { t as B } from "./toString.CL_lYXbK.js";
24
24
  import H from "../components/icon-button.js";
25
25
  import { C as N } from "./image.C9hVXtqX.js";
26
26
  import { t as U, a as G, D as v } from "./asset.Ba-CxnNM.js";
27
27
  import { a as V } from "./index.Cpamj0jB.js";
28
- import { A as m } from "./content-builder.UlVFSATk.js";
28
+ import { A as u } from "./content-builder.UlVFSATk.js";
29
29
  import { e as J, t as f } from "./string.D6poLUEC.js";
30
30
  var X = 0;
31
31
  function W(t) {
@@ -78,7 +78,7 @@ var K = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, p = (t, e, i
78
78
  };
79
79
  let d = class extends w {
80
80
  constructor() {
81
- super(...arguments), this.localize = new S(this), this.value = "", this.name = "", this.type = m.Image, this.multiple = !1, this.accepts = [], this.required = !1, this.disabled = !1, this.onRequestAsset = void 0;
81
+ super(...arguments), this.localize = new S(this), this.value = "", this.name = "", this.type = [u.Image], this.multiple = !1, this.accepts = [], this.required = !1, this.disabled = !1, this.onRequestAsset = void 0;
82
82
  }
83
83
  async handleRequestAssetClick() {
84
84
  if (this.onRequestAsset)
@@ -89,7 +89,7 @@ let d = class extends w {
89
89
  }
90
90
  });
91
91
  const t = await this.onRequestAsset(
92
- this.type,
92
+ this.type.join(" "),
93
93
  this.multiple,
94
94
  this.accepts
95
95
  );
@@ -107,7 +107,7 @@ let d = class extends w {
107
107
  } else {
108
108
  const { id: i, name: r, src: s, type: c } = t;
109
109
  let h = s;
110
- c === m.Audio && (h = (await G({
110
+ c === u.Audio && (h = (await G({
111
111
  extraFields: [v],
112
112
  recordIds: [i]
113
113
  })).items[0]?.[v]), h && this.emit("cx-content-builder-asset-select", {
@@ -136,6 +136,45 @@ let d = class extends w {
136
136
  handleDeleteClick() {
137
137
  this.emit("cx-content-builder-asset-delete");
138
138
  }
139
+ /** True when the picker accepts this asset type. */
140
+ acceptsType(t) {
141
+ return this.type.includes(t);
142
+ }
143
+ renderAssetPreview() {
144
+ if (this.value && this.acceptsType(u.Image))
145
+ return l`<cx-image
146
+ part="image"
147
+ class="asset-picker__image"
148
+ src=${this.value}
149
+ alt=${this.name}
150
+ width="200px"
151
+ object-fit=${V.Cover}
152
+ ></cx-image>`;
153
+ if (this.name && this.acceptsType(u.Video))
154
+ return l`
155
+ <cx-typography variant="body-2">
156
+ ${f(this.name, 30, 11, 11)}
157
+ </cx-typography>`;
158
+ if (this.name && this.acceptsType(u.Other)) {
159
+ const t = this.name.split(",");
160
+ return l`<cx-typography variant="body-2">
161
+ ${f(t[0], 30, 11, 11)}
162
+
163
+ ${m(
164
+ t.length > 1,
165
+ () => l` ${this.localize.term("andOthers", t.length - 1)}`
166
+ )}
167
+ </cx-typography>`;
168
+ }
169
+ if (this.name && this.acceptsType(u.All)) {
170
+ const t = this.name.split(",");
171
+ return l`<cx-typography variant="body-2">
172
+ ${f(t[0], 30, 11, 11)}
173
+ ${m(t.length > 1, () => l` ${this.localize.term("andOthers", t.length - 1)}`)}
174
+ </cx-typography>`;
175
+ }
176
+ return null;
177
+ }
139
178
  render() {
140
179
  return l`
141
180
  <cx-space
@@ -143,46 +182,10 @@ let d = class extends w {
143
182
  class="asset-picker"
144
183
  spacing="2x-small"
145
184
  direction="horizontal"
146
- align-items=${this.type === m.Image ? "flex-start" : "center"}
185
+ align-items=${this.acceptsType(u.Image) ? "flex-start" : "center"}
147
186
  >
148
- ${u(
149
- this.value && this.type === m.Image,
150
- () => l`<cx-image
151
- part="image"
152
- class="asset-picker__image"
153
- src=${this.value}
154
- alt=${this.name}
155
- width="200px"
156
- object-fit=${V.Cover}
157
- ></cx-image>`
158
- )}
159
- ${u(
160
- this.type === m.Video && this.name,
161
- () => l`<cx-typography variant="body-2">
162
- ${f(this.name, 30, 11, 11)}
163
- </cx-typography>`
164
- )}
165
- ${u(this.type === m.Other && this.name, () => {
166
- const t = this.name.split(",");
167
- return l`<cx-typography variant="body-2">
168
- ${f(t[0], 30, 11, 11)}
169
- ${u(
170
- t.length > 1,
171
- () => l` ${this.localize.term("andOthers", t.length - 1)}`
172
- )}
173
- </cx-typography>`;
174
- })}
175
- ${u(this.type === m.All && this.name, () => {
176
- const t = this.name.split(",");
177
- return l`<cx-typography variant="body-2">
178
- ${f(t[0], 30, 11, 11)}
179
- ${u(
180
- t.length > 1,
181
- () => l` ${this.localize.term("andOthers", t.length - 1)}`
182
- )}
183
- </cx-typography>`;
184
- })}
185
- ${u(
187
+ ${this.renderAssetPreview()}
188
+ ${m(
186
189
  !this.disabled,
187
190
  () => l`
188
191
  <div class="asset-picker__button-container">
@@ -202,7 +205,7 @@ let d = class extends w {
202
205
  ${this.localize.term("choose")}
203
206
  </cx-button>
204
207
  </div>
205
- ${u(
208
+ ${m(
206
209
  this.value,
207
210
  () => l`<cx-icon-button
208
211
  label=${this.localize.term("delete")}
@@ -222,8 +225,8 @@ d.dependencies = {
222
225
  "cx-button": _,
223
226
  "cx-icon-button": H,
224
227
  "cx-image": N,
225
- "cx-input": $,
226
- "cx-space": C,
228
+ "cx-input": C,
229
+ "cx-space": $,
227
230
  "cx-typography": I
228
231
  };
229
232
  p([
@@ -239,7 +242,13 @@ p([
239
242
  n({ reflect: !0, type: String })
240
243
  ], d.prototype, "name", 2);
241
244
  p([
242
- n({ reflect: !0, type: String })
245
+ n({
246
+ converter: {
247
+ fromAttribute: (t) => (t ?? "").split(" ").filter((e) => e !== ""),
248
+ toAttribute: (t) => t.join(" ")
249
+ },
250
+ reflect: !0
251
+ })
243
252
  ], d.prototype, "type", 2);
244
253
  p([
245
254
  n({ reflect: !0, type: Boolean })
@@ -346,7 +355,7 @@ let a = class extends w {
346
355
  }
347
356
  ],
348
357
  options: {
349
- placement: P.Right
358
+ placement: k.Right
350
359
  }
351
360
  }, this.OMITTED_FIELDS = ["id"];
352
361
  }
@@ -445,7 +454,7 @@ let a = class extends w {
445
454
  <div class="list-editor">
446
455
  <cx-table
447
456
  part="table"
448
- class=${j({
457
+ class=${L({
449
458
  "list-editor__table": !0,
450
459
  "list-editor__table--no-header": this.noHeader
451
460
  })}
@@ -474,7 +483,7 @@ let a = class extends w {
474
483
  <cx-typography variant="h4">
475
484
  ${this.isAdding ? this.addDialogLabel : this.editDialogLabel}
476
485
  </cx-typography>
477
- ${u(
486
+ ${m(
478
487
  !this.isAdding && this.editedItem?.[this.displayField],
479
488
  () => l`<cx-typography variant="body3">
480
489
  <cx-line-clamp lines="1">
@@ -493,7 +502,7 @@ let a = class extends w {
493
502
  </cx-typography>
494
503
  </cx-grid-item>
495
504
  <cx-grid-item xs="3" sm="2">
496
- ${L(
505
+ ${j(
497
506
  this.columnsMap[t].controlType,
498
507
  [
499
508
  [
@@ -590,7 +599,7 @@ let a = class extends w {
590
599
  </cx-space>
591
600
  </cx-dialog>
592
601
  </div>
593
- ${u(
602
+ ${m(
594
603
  this.canAdd,
595
604
  () => l`
596
605
  <cx-button
@@ -614,12 +623,12 @@ a.dependencies = {
614
623
  "cx-dialog": z,
615
624
  "cx-grid": M,
616
625
  "cx-grid-item": q,
617
- "cx-input": $,
618
- "cx-line-clamp": R,
619
- "cx-radio": O,
620
- "cx-radio-group": k,
621
- "cx-space": C,
622
- "cx-table": T,
626
+ "cx-input": C,
627
+ "cx-line-clamp": T,
628
+ "cx-radio": R,
629
+ "cx-radio-group": O,
630
+ "cx-space": $,
631
+ "cx-table": P,
623
632
  "cx-typography": I
624
633
  };
625
634
  o([
@@ -2358,6 +2358,10 @@ const Ao = Fn`
2358
2358
  var(--cx-transition-fast) width ease;
2359
2359
  }
2360
2360
 
2361
+ .tab-group--timeline .tab-group__indicator {
2362
+ display: none !important;
2363
+ }
2364
+
2361
2365
  .tab-group__dropdown {
2362
2366
  position: absolute;
2363
2367
  z-index: 1;
@@ -1489,10 +1489,12 @@ const Bs = Yt`
1489
1489
  }
1490
1490
 
1491
1491
  .tabulator
1492
- .tabulator-tableholder
1493
1492
  .tabulator-placeholder
1494
1493
  .tabulator-placeholder-contents {
1495
- display: inline-block;
1494
+ display: flex;
1495
+ height: 100%;
1496
+ align-items: center;
1497
+ justify-content: center;
1496
1498
  text-align: center;
1497
1499
  padding: var(--cx-spacing-small);
1498
1500
  color: var(--placeholder-color);
@@ -64,8 +64,8 @@ import { default as Ro } from "./step.js";
64
64
  import { default as Do } from "./stepper.js";
65
65
  import { default as yo } from "./switch.js";
66
66
  import { default as Mo } from "./tab.js";
67
- import { C as Oo } from "../chunks/tab-group.uF5JbAGa.js";
68
- import { C as wo } from "../chunks/table.D6Abk0xC.js";
67
+ import { C as Oo } from "../chunks/tab-group.BBZDkdIX.js";
68
+ import { C as wo } from "../chunks/table.Bz0thu3_.js";
69
69
  import { default as Fo } from "./tab-panel.js";
70
70
  import { default as No } from "./tag.js";
71
71
  import { default as Eo } from "./textarea.js";
@@ -1,10 +1,10 @@
1
1
  import "./space.js";
2
- import "../chunks/table.D6Abk0xC.js";
2
+ import "../chunks/table.Bz0thu3_.js";
3
3
  import "../chunks/typography.trna8y2b.js";
4
4
  import "../chunks/custom-element.fmLrnDZr.js";
5
5
  import "../chunks/color-swatch.DkZKPbUq.js";
6
6
  import "../chunks/component.styles.DtouHn2g.js";
7
- import { C as n } from "../chunks/color-swatch-group.CMz7zQdk.js";
7
+ import { C as n } from "../chunks/color-swatch-group.Dp0a3l-3.js";
8
8
  import "../chunks/content-builder.UlVFSATk.js";
9
9
  import "../chunks/popup.CJrePm7n.js";
10
10
  import "../chunks/i18n.D33BKrRs.js";
@@ -1,4 +1,4 @@
1
- import { C as J } from "../chunks/file-on-demand.CODE3g50.js";
1
+ import { C as J } from "../chunks/file-on-demand.BEr9s0HP.js";
2
2
  import "./avatar.js";
3
3
  import "../chunks/button.DrU92LJQ.js";
4
4
  import "../chunks/dialog.rme_OwWe.js";
@@ -14,7 +14,7 @@ import "./relative-time.js";
14
14
  import "../chunks/select.Bo8mWJ1g.js";
15
15
  import "./space.js";
16
16
  import "./tab.js";
17
- import "../chunks/tab-group.uF5JbAGa.js";
17
+ import "../chunks/tab-group.BBZDkdIX.js";
18
18
  import "./tab-panel.js";
19
19
  import "./tooltip.js";
20
20
  import "../chunks/tree.DynOxJWg.js";
@@ -7,7 +7,7 @@ import "./line-clamp.js";
7
7
  import "./radio.js";
8
8
  import "./radio-group.js";
9
9
  import "./space.js";
10
- import "../chunks/table.D6Abk0xC.js";
10
+ import "../chunks/table.Bz0thu3_.js";
11
11
  import "../chunks/typography.trna8y2b.js";
12
12
  import "../chunks/custom-element.fmLrnDZr.js";
13
13
  import "../chunks/component.styles.DtouHn2g.js";
@@ -20,7 +20,7 @@ import "../chunks/choose.BTbF6BAn.js";
20
20
  import "../chunks/class-map.DqNfBvJI.js";
21
21
  import "../chunks/repeat.B1pVpmRx.js";
22
22
  import "../chunks/when.Dr1es41R.js";
23
- import { c as v, C as w } from "../chunks/list-editor.BZMql0Tj.js";
23
+ import { c as v, C as w } from "../chunks/list-editor.BZuFeqNq.js";
24
24
  export {
25
25
  v as columnDefaults,
26
26
  w as default
@@ -6,7 +6,7 @@ import { default as u } from "./corner-position-input-group.js";
6
6
  import { C as m } from "../chunks/cropper.3qRm5dEe.js";
7
7
  import { default as i } from "./dynamic-select.js";
8
8
  import { C as c } from "../chunks/folder-select.ChFCJ-w0.js";
9
- import { C as P } from "../chunks/list-editor.BZMql0Tj.js";
9
+ import { C as P } from "../chunks/list-editor.BZuFeqNq.js";
10
10
  import { default as I } from "./masonry.js";
11
11
  import { default as y } from "./padding-input-group.js";
12
12
  import { default as w } from "./position-picker.js";
@@ -1,6 +1,6 @@
1
1
  import { default as a } from "./asset-link-format.js";
2
- import { C as t } from "../chunks/color-swatch-group.CMz7zQdk.js";
3
- import { C } from "../chunks/file-on-demand.CODE3g50.js";
2
+ import { C as t } from "../chunks/color-swatch-group.Dp0a3l-3.js";
3
+ import { C } from "../chunks/file-on-demand.BEr9s0HP.js";
4
4
  export {
5
5
  a as CxAssetLinkFormat,
6
6
  t as CxColorSwatchGroup,
@@ -1,7 +1,7 @@
1
1
  import "./resize-observer.js";
2
2
  import "../chunks/custom-element.fmLrnDZr.js";
3
3
  import "../chunks/component.styles.DtouHn2g.js";
4
- import { C as w } from "../chunks/tab-group.uF5JbAGa.js";
4
+ import { C as w } from "../chunks/tab-group.BBZDkdIX.js";
5
5
  import "../chunks/i18n.D33BKrRs.js";
6
6
  import "../chunks/scroll.DwPiX2Ox.js";
7
7
  import "../chunks/watch.BCJD77bD.js";
@@ -7,7 +7,7 @@ import "../chunks/custom-element.fmLrnDZr.js";
7
7
  import "../chunks/component.styles.DtouHn2g.js";
8
8
  import "../chunks/overlayscrollbars.BhATcEys.js";
9
9
  import "../chunks/pagination.y5oqoPVr.js";
10
- import { A as b, l as w, n as T, e as x, c as z, o as F, p as P, d as S, a5 as v, a6 as y, D as A, q as g, E as D, s as I, F as h, t as E, u as G, v as f, G as j, w as H, x as K, y as L, I as V, z as k, K as q, B, M as J, J as N, L as O, N as Q, O as U, Q as W, U as X, V as Y, P as Z, h as _, W as $, k as oo, X as eo, Y as ao, Z as so, _ as lo, j as uo, R as to, a0 as Mo, $ as ro, S as io, a1 as no, a2 as po, T as mo, b as Co, a3 as Ro, a4 as co, C as bo } from "../chunks/table.D6Abk0xC.js";
10
+ import { A as b, l as w, n as T, e as x, c as z, o as F, p as P, d as S, a5 as v, a6 as y, D as A, q as g, E as D, s as I, F as h, t as E, u as G, v as f, G as j, w as H, x as K, y as L, I as V, z as k, K as q, B, M as J, J as N, L as O, N as Q, O as U, Q as W, U as X, V as Y, P as Z, h as _, W as $, k as oo, X as eo, Y as ao, Z as so, _ as lo, j as uo, R as to, a0 as Mo, $ as ro, S as io, a1 as no, a2 as po, T as mo, b as Co, a3 as Ro, a4 as co, C as bo } from "../chunks/table.Bz0thu3_.js";
11
11
  import "../chunks/i18n.D33BKrRs.js";
12
12
  import "../chunks/watch.BCJD77bD.js";
13
13
  import "../chunks/state.Dt9F_SuS.js";
@@ -64,8 +64,8 @@ import { default as oGt } from "./step.js";
64
64
  import { default as sGt } from "./stepper.js";
65
65
  import ek from "./switch.js";
66
66
  import tk from "./tab.js";
67
- import { C as nk, T as m9, a as f9, b as v9, g as q7 } from "../chunks/tab-group.uF5JbAGa.js";
68
- import { C as OR, f as jh, i as IR, r as oY, m as aY, a as V7, g as W7 } from "../chunks/table.D6Abk0xC.js";
67
+ import { C as nk, T as m9, a as f9, b as v9, g as q7 } from "../chunks/tab-group.BBZDkdIX.js";
68
+ import { C as OR, f as jh, i as IR, r as oY, m as aY, a as V7, g as W7 } from "../chunks/table.Bz0thu3_.js";
69
69
  import y9 from "./tab-panel.js";
70
70
  import { default as lGt } from "./tag.js";
71
71
  import sY from "./textarea.js";
@@ -95,7 +95,7 @@ import { c as ib, b as DY } from "../chunks/capitalize.CNStXZBq.js";
95
95
  import { o as nr } from "../chunks/style-map.lEJHEwk3.js";
96
96
  import { a as ob, d as MY, e as PY, D as q_, u as NY, t as fc, f as BR } from "../chunks/asset.Ba-CxnNM.js";
97
97
  import { H as LY } from "../chunks/slot.DJLm4Dig.js";
98
- import { a as k9, u as Gu, C as RY } from "../chunks/list-editor.BZMql0Tj.js";
98
+ import { a as k9, u as Gu, C as RY } from "../chunks/list-editor.BZuFeqNq.js";
99
99
  import BY from "./bicolor-picker.js";
100
100
  import zR from "./border-input-group.js";
101
101
  import { p as FR, c as xm, b as km, d as zY, e as FY, g as V_ } from "../chunks/color-swatch.DkZKPbUq.js";
@@ -112,16 +112,16 @@ import { F as Ku, C as E9, a as W_ } from "../chunks/folder-select.ChFCJ-w0.js";
112
112
  import { a as Io, E as Fn, b as Um, O as Ld, T as Fu, G as nO } from "../chunks/index.Cpamj0jB.js";
113
113
  import { C as EGt } from "../chunks/index.Cpamj0jB.js";
114
114
  import { g as T9, c as ry } from "../chunks/_commonjsHelpers.ByX85dGu.js";
115
- import { b as Qf, a as UR, d as rO, c as ok, s as GY, o as KY, U as A9, e as qR, i as Kd, f as YY } from "../chunks/file-on-demand.CODE3g50.js";
116
- import { C as AGt } from "../chunks/file-on-demand.CODE3g50.js";
115
+ import { b as Qf, a as UR, d as rO, c as ok, s as GY, o as KY, U as A9, e as qR, i as Kd, f as YY } from "../chunks/file-on-demand.BEr9s0HP.js";
116
+ import { C as AGt } from "../chunks/file-on-demand.BEr9s0HP.js";
117
117
  import { e as XY, t as JY } from "../chunks/directive.oAbCiebi.js";
118
118
  import { f as ZY, n as kl, e as _l } from "../chunks/ref.BDmlFGTP.js";
119
119
  import QY from "./masonry.js";
120
120
  import eX from "./padding-input-group.js";
121
121
  import tX from "./position-picker.js";
122
122
  import { D as Uw, P as G_, E as dd, B as ft, a as Af, A as ig, b as nX, T as iO } from "../chunks/content-builder.UlVFSATk.js";
123
- import { g as rX, a as oO, b as qw } from "../chunks/color-swatch-group.CMz7zQdk.js";
124
- import { C as IGt } from "../chunks/color-swatch-group.CMz7zQdk.js";
123
+ import { g as rX, a as oO, b as qw } from "../chunks/color-swatch-group.Dp0a3l-3.js";
124
+ import { C as IGt } from "../chunks/color-swatch-group.Dp0a3l-3.js";
125
125
  import iX from "./shadow-input-group.js";
126
126
  import { default as MGt } from "./share-option-list.js";
127
127
  import { default as NGt } from "./sidebar.js";
@@ -111328,7 +111328,7 @@ let Na = class extends zn {
111328
111328
  id=${this.editedImage.id}
111329
111329
  name="src"
111330
111330
  required
111331
- type="image"
111331
+ type="image audio"
111332
111332
  value=${Cr(this.editedImage.src)}
111333
111333
  ?disabled=${this.disabledAssetPicker}
111334
111334
  .onRequestAsset=${this.onRequestAsset}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.45.0",
4
+ "version": "2.46.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -5,7 +5,7 @@ import { default as CxInput } from '../../../atoms/src/components/input/input.ts
5
5
  import { default as CxSpace } from '../../../atoms/src/components/space/space.ts';
6
6
  import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
7
7
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
8
- import { Asset, AssetType } from '../../../types/src/content-builder';
8
+ import { Asset, AssetType, AssetTypeString } from '../../../types/src/content-builder';
9
9
 
10
10
  /**
11
11
  * @summary The `cx-asset-picker` component lets users choose and clear assets for a trait/control.
@@ -36,7 +36,7 @@ export default class CxAssetPicker extends CortexElement {
36
36
  * The type of the asset being picked.
37
37
  * It can be either an image or a video.
38
38
  */
39
- type: AssetType;
39
+ type: AssetType[];
40
40
  /**
41
41
  * Whether the asset picker should allow multiple assets to be selected.
42
42
  */
@@ -54,10 +54,13 @@ export default class CxAssetPicker extends CortexElement {
54
54
  * A callback function that is called when the user requests to select an asset.
55
55
  * It should return a promise that resolves to an Asset object.
56
56
  */
57
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
57
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
58
58
  private handleRequestAssetClick;
59
59
  handleValueChange(): Promise<void>;
60
60
  private handleDeleteClick;
61
+ /** True when the picker accepts this asset type. */
62
+ private acceptsType;
63
+ private renderAssetPreview;
61
64
  render(): import('lit').TemplateResult<1>;
62
65
  }
63
66
  declare global {
@@ -6,7 +6,7 @@ import { default as CxSpace } from '../../../atoms/src/components/space/space.ts
6
6
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
7
7
  import { CxAssetPickerSelectEvent } from '../../../events/src/events.ts';
8
8
  import { default as CxAssetPicker } from '../asset-picker/asset-picker.ts';
9
- import { Asset, AssetType } from '../../../types/src/content-builder';
9
+ import { Asset, AssetTypeString } from '../../../types/src/content-builder';
10
10
  import { CSSResultGroup, nothing } from 'lit';
11
11
 
12
12
  type IconData = {
@@ -46,7 +46,7 @@ export default class CxIconPicker extends CortexElement {
46
46
  * @returns A promise that resolves to an Asset object.
47
47
  * @default undefined
48
48
  */
49
- onRequestAsset: ((type: AssetType, multiple?: boolean) => Promise<Asset | Record<string, Asset>>) | undefined;
49
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean) => Promise<Asset | Record<string, Asset>>) | undefined;
50
50
  searchTerm: string;
51
51
  /**
52
52
  * Need to mount or unmount virtualizer when select is shown or hidden
@@ -10,7 +10,7 @@ import { default as CxSpace } from '../../../atoms/src/components/space/space.ts
10
10
  import { default as CxTable } from '../../../atoms/src/components/table/table.ts';
11
11
  import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
12
12
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
13
- import { Asset, AssetType } from '../../../types/src/content-builder';
13
+ import { Asset, AssetTypeString } from '../../../types/src/content-builder';
14
14
  import { CSSResultGroup } from 'lit';
15
15
  import { default as CxAssetPicker } from '../asset-picker/asset-picker';
16
16
 
@@ -66,7 +66,7 @@ export default class CxListEditor extends CortexElement {
66
66
  * @returns A promise that resolves to an Asset object.
67
67
  * @default undefined
68
68
  */
69
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
69
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
70
70
  editedItem: Record<string, string> | null;
71
71
  isAdding: boolean;
72
72
  private columnsMap;
@@ -40,7 +40,7 @@ import { default as CxPaddingInputGroup } from '../../../../../molecules/src/pad
40
40
  import { default as CxPositionPicker } from '../../../../../molecules/src/position-picker/position-picker.ts';
41
41
  import { default as CxShadowInputGroup } from '../../../../../molecules/src/shadow-input-group/shadow-input-group.ts';
42
42
  import { default as CxSizeInputGroup } from '../../../../../molecules/src/size-input-group/size-input-group.ts';
43
- import { Asset, AssetType, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
43
+ import { Asset, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
44
44
  import { StyleProps } from 'grapesjs';
45
45
  import { CxColorSwatchPicker } from '../color-swatch-picker';
46
46
  import { CxFolderPicker } from '../folder-picker';
@@ -174,7 +174,7 @@ export default class CxConfigForm extends CortexElement {
174
174
  * @returns A promise that resolves to an Asset object.
175
175
  * @default undefined
176
176
  */
177
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
177
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
178
178
  /**
179
179
  * Function to request a download format.
180
180
  * This is used to download an asset in a different format.
@@ -1,6 +1,6 @@
1
1
  import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
2
2
  import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
3
- import { Asset, AssetType, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
3
+ import { Asset, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
4
4
  import { Component, StyleProps } from 'grapesjs';
5
5
  import { CxConfigForm } from '../config-form';
6
6
 
@@ -76,7 +76,7 @@ export default class CxConfigManager extends CortexElement {
76
76
  * @returns A promise that resolves to an Asset object.
77
77
  * @default undefined
78
78
  */
79
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
79
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
80
80
  /**
81
81
  * Function to request a download format.
82
82
  * This is used to download an asset in a different format.
@@ -13,7 +13,7 @@ import { default as CortexElement } from '../../../../../base/src/cortex-element
13
13
  import { default as CxAssetPicker } from '../../../../../molecules/src/asset-picker/asset-picker.ts';
14
14
  import { default as CxDynamicSelect } from '../../../../../molecules/src/dynamic-select/dynamic-select.ts';
15
15
  import { default as CxFolderSelect } from '../../../../../molecules/src/folder-select/folder-select.ts';
16
- import { Asset, AssetType, DialogType } from '../../../../../types/src/content-builder';
16
+ import { Asset, AssetTypeString, DialogType } from '../../../../../types/src/content-builder';
17
17
  import { Image } from '../../../../../types/src/gallery-config';
18
18
  import { GalleryItemCardType } from '../../../../../types/src/gallery-item';
19
19
  import { default as CxFolderPicker } from '../folder-picker/folder-picker';
@@ -59,7 +59,7 @@ export default class CxGalleryConfig extends CortexElement {
59
59
  /**
60
60
  * A callback function that is called when the user requests to select an asset.
61
61
  */
62
- onRequestAsset: ((type: AssetType) => Promise<Asset>) | undefined;
62
+ onRequestAsset: ((type: AssetTypeString) => Promise<Asset>) | undefined;
63
63
  /**
64
64
  * The image being edited. If not provided, a new image will be created.
65
65
  */
@@ -4,7 +4,7 @@ import { default as CxSpace } from '../../../../../atoms/src/components/space/sp
4
4
  import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
5
5
  import { default as CortexElement, CortexFormControl } from '../../../../../base/src/cortex-element.ts';
6
6
  import { default as CxMasonry } from '../../../../../molecules/src/masonry/masonry.ts';
7
- import { Asset, AssetType, DialogType } from '../../../../../types/src/content-builder';
7
+ import { Asset, AssetTypeString, DialogType } from '../../../../../types/src/content-builder';
8
8
  import { SourceVariant } from '../../../../../types/src/gallery';
9
9
  import { Image } from '../../../../../types/src/gallery-config';
10
10
  import { GalleryItemCardType } from '../../../../../types/src/gallery-item';
@@ -61,7 +61,7 @@ export default class CxGalleryPicker extends CortexElement implements CortexForm
61
61
  * the same document or shadow root for this to work.
62
62
  */
63
63
  form: string | HTMLElement | undefined;
64
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
64
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
65
65
  loading: boolean;
66
66
  masonryData: Array<{
67
67
  alt?: string;
@@ -3,7 +3,7 @@ import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
3
3
  import { default as CxPopup } from '../../../atoms/src/components/popup/popup.ts';
4
4
  import { default as CxSpinner } from '../../../atoms/src/components/spinner/spinner.ts';
5
5
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
6
- import { Asset, AssetType, Device, EditorMode, TeamSpaceRole } from '../../../types/src/content-builder';
6
+ import { Asset, AssetTypeString, Device, EditorMode, TeamSpaceRole } from '../../../types/src/content-builder';
7
7
  import { Component, Editor, StyleProps } from 'grapesjs';
8
8
  import { TemplateResult } from 'lit';
9
9
  import { CxBlockPicker } from './components/block-picker';
@@ -229,7 +229,7 @@ export default class CxContentBuilder extends CortexElement {
229
229
  runFirstUpdated(): void;
230
230
  disconnectedCallback(): void;
231
231
  handleBuilderPropsChange(): void;
232
- onRequestAsset(type: AssetType): Promise<Asset>;
232
+ onRequestAsset(type: AssetTypeString): Promise<Asset>;
233
233
  onRequestDownloadFormat(assetIds: string[], formats?: Record<string, string[]>): Promise<{}>;
234
234
  /**
235
235
  * This method retrieves all the components of the specified component.
@@ -14,7 +14,7 @@ import { default as CxSpinner } from '../../../../../../../atoms/src/components/
14
14
  import { default as CxTypography } from '../../../../../../../atoms/src/components/typography/typography.ts';
15
15
  import { default as CortexElement } from '../../../../../../../base/src/cortex-element.ts';
16
16
  import { default as CxBorderInputGroup } from '../../../../../../../molecules/src/border-input-group/border-input-group.ts';
17
- import { Asset, AssetType, RTE_IMAGE } from '../../../../../../../types/src/content-builder';
17
+ import { Asset, AssetTypeString, RTE_IMAGE } from '../../../../../../../types/src/content-builder';
18
18
  import { PropertyValues } from 'lit';
19
19
 
20
20
  /**
@@ -58,7 +58,7 @@ export default class CxImageDialog extends CortexElement {
58
58
  * A callback function that is called when the user requests to select an asset.
59
59
  * It should return a promise that resolves to an Asset object.
60
60
  */
61
- onRequestAsset: ((type: AssetType, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
61
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
62
62
  isValidSrc: boolean | undefined;
63
63
  originalSize: {
64
64
  height: number;
@@ -16,7 +16,7 @@ import { default as CxSelect } from '../../../../../../../atoms/src/components/s
16
16
  import { default as CxSpace } from '../../../../../../../atoms/src/components/space/space.ts';
17
17
  import { default as CxTypography } from '../../../../../../../atoms/src/components/typography/typography.ts';
18
18
  import { default as CortexElement } from '../../../../../../../base/src/cortex-element.ts';
19
- import { Asset, AssetType } from '../../../../../../../types/src/content-builder';
19
+ import { Asset, AssetTypeString } from '../../../../../../../types/src/content-builder';
20
20
  import { Component } from 'grapesjs';
21
21
  import { TemplateResult } from 'lit';
22
22
  import { default as CxAnchorDialog } from './anchor-dialog';
@@ -139,7 +139,7 @@ export default class CxRTEBubbleMenu extends CortexElement {
139
139
  * @returns A promise that resolves to an Asset object.
140
140
  * @default undefined
141
141
  */
142
- onRequestAsset: ((type: AssetType) => Promise<Asset>) | undefined;
142
+ onRequestAsset: ((type: AssetTypeString) => Promise<Asset>) | undefined;
143
143
  singleRow: boolean;
144
144
  private isBulletListOpen;
145
145
  private isOrderedListOpen;
@@ -153,6 +153,7 @@ export declare enum AssetType {
153
153
  Other = "other",
154
154
  Video = "video"
155
155
  }
156
+ export type AssetTypeString = AssetType | `${AssetType} ${AssetTypeString}`;
156
157
  export type Asset = {
157
158
  id: string;
158
159
  name: string;
@@ -5051,7 +5051,7 @@
5051
5051
  /**
5052
5052
  * The type of the asset being picked. It can be either an image or a video.
5053
5053
  */
5054
- type?: 'all' | 'audio' | 'image' | 'other' | 'video';
5054
+ type?: 'all' | 'audio' | 'image' | 'other' | 'video'[];
5055
5055
  /**
5056
5056
  * Whether the asset picker should allow multiple assets to be selected.
5057
5057
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.45.0",
4
+ "version": "2.46.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {