@orangelogic/design-system 2.45.0-ci.1 → 2.45.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.
@@ -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 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.D6Abk0xC.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";
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 j } from "./choose.BTbF6BAn.js";
20
- import { e as L } from "./class-map.DqNfBvJI.js";
19
+ import { r as L } from "./choose.BTbF6BAn.js";
20
+ import { e as j } from "./class-map.DqNfBvJI.js";
21
21
  import { c as y } from "./repeat.B1pVpmRx.js";
22
- import { n as m } from "./when.Dr1es41R.js";
22
+ import { n as u } 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 u } from "./content-builder.UlVFSATk.js";
28
+ import { A as m } 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 = [u.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 = m.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.join(" "),
92
+ this.type,
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 === u.Audio && (h = (await G({
110
+ c === m.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,45 +136,6 @@ 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
- }
178
139
  render() {
179
140
  return l`
180
141
  <cx-space
@@ -182,10 +143,46 @@ let d = class extends w {
182
143
  class="asset-picker"
183
144
  spacing="2x-small"
184
145
  direction="horizontal"
185
- align-items=${this.acceptsType(u.Image) ? "flex-start" : "center"}
146
+ align-items=${this.type === m.Image ? "flex-start" : "center"}
186
147
  >
187
- ${this.renderAssetPreview()}
188
- ${m(
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(
189
186
  !this.disabled,
190
187
  () => l`
191
188
  <div class="asset-picker__button-container">
@@ -205,7 +202,7 @@ let d = class extends w {
205
202
  ${this.localize.term("choose")}
206
203
  </cx-button>
207
204
  </div>
208
- ${m(
205
+ ${u(
209
206
  this.value,
210
207
  () => l`<cx-icon-button
211
208
  label=${this.localize.term("delete")}
@@ -225,8 +222,8 @@ d.dependencies = {
225
222
  "cx-button": _,
226
223
  "cx-icon-button": H,
227
224
  "cx-image": N,
228
- "cx-input": C,
229
- "cx-space": $,
225
+ "cx-input": $,
226
+ "cx-space": C,
230
227
  "cx-typography": I
231
228
  };
232
229
  p([
@@ -242,13 +239,7 @@ p([
242
239
  n({ reflect: !0, type: String })
243
240
  ], d.prototype, "name", 2);
244
241
  p([
245
- n({
246
- converter: {
247
- fromAttribute: (t) => (t ?? "").split(" ").filter((e) => e !== ""),
248
- toAttribute: (t) => t.join(" ")
249
- },
250
- reflect: !0
251
- })
242
+ n({ reflect: !0, type: String })
252
243
  ], d.prototype, "type", 2);
253
244
  p([
254
245
  n({ reflect: !0, type: Boolean })
@@ -355,7 +346,7 @@ let a = class extends w {
355
346
  }
356
347
  ],
357
348
  options: {
358
- placement: k.Right
349
+ placement: P.Right
359
350
  }
360
351
  }, this.OMITTED_FIELDS = ["id"];
361
352
  }
@@ -454,7 +445,7 @@ let a = class extends w {
454
445
  <div class="list-editor">
455
446
  <cx-table
456
447
  part="table"
457
- class=${L({
448
+ class=${j({
458
449
  "list-editor__table": !0,
459
450
  "list-editor__table--no-header": this.noHeader
460
451
  })}
@@ -483,7 +474,7 @@ let a = class extends w {
483
474
  <cx-typography variant="h4">
484
475
  ${this.isAdding ? this.addDialogLabel : this.editDialogLabel}
485
476
  </cx-typography>
486
- ${m(
477
+ ${u(
487
478
  !this.isAdding && this.editedItem?.[this.displayField],
488
479
  () => l`<cx-typography variant="body3">
489
480
  <cx-line-clamp lines="1">
@@ -502,7 +493,7 @@ let a = class extends w {
502
493
  </cx-typography>
503
494
  </cx-grid-item>
504
495
  <cx-grid-item xs="3" sm="2">
505
- ${j(
496
+ ${L(
506
497
  this.columnsMap[t].controlType,
507
498
  [
508
499
  [
@@ -599,7 +590,7 @@ let a = class extends w {
599
590
  </cx-space>
600
591
  </cx-dialog>
601
592
  </div>
602
- ${m(
593
+ ${u(
603
594
  this.canAdd,
604
595
  () => l`
605
596
  <cx-button
@@ -623,12 +614,12 @@ a.dependencies = {
623
614
  "cx-dialog": z,
624
615
  "cx-grid": M,
625
616
  "cx-grid-item": q,
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,
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,
632
623
  "cx-typography": I
633
624
  };
634
625
  o([
@@ -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.RKB6H77Y.js";
23
+ import { c as v, C as w } from "../chunks/list-editor.BZMql0Tj.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.RKB6H77Y.js";
9
+ import { C as P } from "../chunks/list-editor.BZMql0Tj.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";
@@ -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.RKB6H77Y.js";
98
+ import { a as k9, u as Gu, C as RY } from "../chunks/list-editor.BZMql0Tj.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";
@@ -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 audio"
111331
+ type="image"
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-ci.1",
4
+ "version": "2.45.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, AssetTypeString } from '../../../types/src/content-builder';
8
+ import { Asset, AssetType } 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,13 +54,10 @@ 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
57
+ onRequestAsset: ((type: AssetType, 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;
64
61
  render(): import('lit').TemplateResult<1>;
65
62
  }
66
63
  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, AssetTypeString } from '../../../types/src/content-builder';
9
+ import { Asset, AssetType } 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: AssetTypeString, multiple?: boolean) => Promise<Asset | Record<string, Asset>>) | undefined;
49
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString } from '../../../types/src/content-builder';
13
+ import { Asset, AssetType } 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
69
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
43
+ import { Asset, AssetType, 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
177
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
3
+ import { Asset, AssetType, 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
79
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString, DialogType } from '../../../../../types/src/content-builder';
16
+ import { Asset, AssetType, 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: AssetTypeString) => Promise<Asset>) | undefined;
62
+ onRequestAsset: ((type: AssetType) => 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, AssetTypeString, DialogType } from '../../../../../types/src/content-builder';
7
+ import { Asset, AssetType, 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
64
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString, Device, EditorMode, TeamSpaceRole } from '../../../types/src/content-builder';
6
+ import { Asset, AssetType, 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: AssetTypeString): Promise<Asset>;
232
+ onRequestAsset(type: AssetType): 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, AssetTypeString, RTE_IMAGE } from '../../../../../../../types/src/content-builder';
17
+ import { Asset, AssetType, 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: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset>) | undefined;
61
+ onRequestAsset: ((type: AssetType, 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, AssetTypeString } from '../../../../../../../types/src/content-builder';
19
+ import { Asset, AssetType } 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: AssetTypeString) => Promise<Asset>) | undefined;
142
+ onRequestAsset: ((type: AssetType) => Promise<Asset>) | undefined;
143
143
  singleRow: boolean;
144
144
  private isBulletListOpen;
145
145
  private isOrderedListOpen;
@@ -153,7 +153,6 @@ export declare enum AssetType {
153
153
  Other = "other",
154
154
  Video = "video"
155
155
  }
156
- export type AssetTypeString = AssetType | `${AssetType} ${AssetTypeString}`;
157
156
  export type Asset = {
158
157
  id: string;
159
158
  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-ci.1",
4
+ "version": "2.45.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {