@orangelogic/design-system 2.113.0 → 2.115.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 (146) hide show
  1. package/library/chunks/asset.CtPQLZOf.js +607 -0
  2. package/library/chunks/{button.DIvU_uFU.js → button.DwJEeW2t.js} +1 -1
  3. package/library/chunks/{color-swatch-group.DV5uB8OC.js → color-swatch-group.DjjSIHSV.js} +7 -7
  4. package/library/chunks/{color-swatch.BoUZGGs4.js → color-swatch.DVzEaNeL.js} +1 -1
  5. package/library/chunks/{confirm-popover.DS9HIy3c.js → confirm-popover.BifwpSuf.js} +3 -3
  6. package/library/chunks/{dialog.DyT-Nai2.js → dialog.BYCWepBc.js} +2 -2
  7. package/library/chunks/{document-viewer.AiKX3RO6.js → document-viewer.BIC9iYpZ.js} +1237 -1233
  8. package/library/chunks/{dot-pagination.CKbL6eN_.js → dot-pagination.C4l5vKor.js} +1 -1
  9. package/library/chunks/{endpoints.DBlquU2-.js → endpoints.CDX5PgQz.js} +251 -251
  10. package/library/chunks/{file-on-demand.h8tCgq51.js → file-on-demand.AwMj4AfO.js} +246 -227
  11. package/library/chunks/{folder-select.eoufobYO.js → folder-select.8xNjeJfp.js} +5 -5
  12. package/library/chunks/{header.BUp3_oeJ.js → header.Cf9ujCpg.js} +3 -3
  13. package/library/chunks/{i18n.C21qyGi6.js → i18n.CH-wak_P.js} +3 -1
  14. package/library/chunks/{icon-button.DxkJ-cp-.js → icon-button.CQiBjznj.js} +1 -1
  15. package/library/chunks/{iframe.CwxozWMt.js → iframe.BQPVygBJ.js} +1 -1
  16. package/library/chunks/{image.B-YcKRop.js → image.cT-FziNS.js} +1 -1
  17. package/library/chunks/{input.DdeXWD_F.js → input.CH4lKxPM.js} +1 -1
  18. package/library/chunks/{list-editor.Qx2ecTcL.js → list-editor.7zNWfBuW.js} +13 -13
  19. package/library/chunks/{option.CcGRV3jj.js → option.Bvh35v8S.js} +10 -10
  20. package/library/chunks/{pagination.CgAt4Keg.js → pagination.zQ2FFtxB.js} +5 -5
  21. package/library/chunks/{tab-group.hfUY7YE7.js → tab-group.DvMX02hY.js} +3 -3
  22. package/library/chunks/{table.CP3oGDY1.js → table.BvbReIZh.js} +46 -45
  23. package/library/chunks/{time.BiQnh9wt.js → time.BSmpFe2G.js} +2 -2
  24. package/library/chunks/{tree.YxFs3Tke.js → tree.Btf2Q4YZ.js} +10 -7
  25. package/library/chunks/waveform.1U9U_0rd.js +60 -0
  26. package/library/components/alert.js +2 -2
  27. package/library/components/asset-link-format.js +6 -6
  28. package/library/components/atoms.js +129 -131
  29. package/library/components/audio.js +132 -183
  30. package/library/components/border-input-group.js +2 -2
  31. package/library/components/breadcrumb.js +1 -1
  32. package/library/components/button.js +2 -2
  33. package/library/components/color-picker.js +3 -3
  34. package/library/components/color-swatch-group.js +4 -4
  35. package/library/components/color-swatch.js +2 -2
  36. package/library/components/confirm-popover.js +4 -4
  37. package/library/components/copy-button.js +1 -1
  38. package/library/components/corner-position-input-group.js +3 -3
  39. package/library/components/date-calendar.js +1 -1
  40. package/library/components/details.js +1 -1
  41. package/library/components/dialog.js +3 -3
  42. package/library/components/divider.js +15 -15
  43. package/library/components/document-viewer.js +3 -3
  44. package/library/components/dot-pagination.js +2 -2
  45. package/library/components/drawer.js +2 -2
  46. package/library/components/dropdown.js +2 -2
  47. package/library/components/dynamic-select.js +4 -4
  48. package/library/components/e-chart.js +1 -1
  49. package/library/components/element-clamp.js +2 -2
  50. package/library/components/file-on-demand.js +10 -10
  51. package/library/components/folder-select.js +5 -5
  52. package/library/components/format-bytes.js +1 -1
  53. package/library/components/format-date.js +1 -1
  54. package/library/components/format-number.js +1 -1
  55. package/library/components/format-time.js +2 -2
  56. package/library/components/header.js +2 -2
  57. package/library/components/icon-button.js +2 -2
  58. package/library/components/iframe.js +2 -2
  59. package/library/components/image-comparer.js +1 -1
  60. package/library/components/image.js +2 -2
  61. package/library/components/input.js +2 -2
  62. package/library/components/line-clamp.js +1 -1
  63. package/library/components/list-editor.js +7 -7
  64. package/library/components/masonry.js +2 -2
  65. package/library/components/menu-item.js +1 -1
  66. package/library/components/menu.js +3 -3
  67. package/library/components/molecules.js +4 -4
  68. package/library/components/option.js +2 -2
  69. package/library/components/organisms.js +2 -2
  70. package/library/components/padding-input-group.js +1 -1
  71. package/library/components/pagination.js +6 -6
  72. package/library/components/popup.js +1 -1
  73. package/library/components/position-picker.js +1 -1
  74. package/library/components/progress-bar.js +1 -1
  75. package/library/components/progress-ring.js +1 -1
  76. package/library/components/radio-button.js +10 -10
  77. package/library/components/radio-card.js +6 -6
  78. package/library/components/radio.js +2 -2
  79. package/library/components/range.js +1 -1
  80. package/library/components/rating.js +1 -1
  81. package/library/components/relative-time.js +1 -1
  82. package/library/components/resize-observer.js +3 -3
  83. package/library/components/select.js +7 -7
  84. package/library/components/shadow-input-group.js +1 -1
  85. package/library/components/share-option-list.js +10 -10
  86. package/library/components/sidebar.js +1 -1
  87. package/library/components/size-input-group.js +3 -3
  88. package/library/components/spinner.js +1 -1
  89. package/library/components/split-panel.js +1 -1
  90. package/library/components/tab-group.js +4 -4
  91. package/library/components/tab.js +2 -2
  92. package/library/components/table.js +10 -10
  93. package/library/components/tag.js +2 -2
  94. package/library/components/tooltip.js +1 -1
  95. package/library/components/tree-item.js +2 -2
  96. package/library/components/tree.js +2 -2
  97. package/library/components/typeface.js +2 -2
  98. package/library/components/types.js +33324 -32768
  99. package/library/components/video.js +2 -2
  100. package/library/package.json +1 -1
  101. package/library/packages/atoms/src/components/audio/audio.d.ts +36 -28
  102. package/library/packages/atoms/src/components/divider/divider.d.ts +1 -1
  103. package/library/packages/atoms/src/components/option/option.d.ts +1 -1
  104. package/library/packages/atoms/src/components/radio/radio.d.ts +1 -1
  105. package/library/packages/atoms/src/components/radio-button/radio-button.d.ts +1 -1
  106. package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -1
  107. package/library/packages/atoms/src/components/tree/tree.d.ts +1 -0
  108. package/library/packages/atoms/src/index.d.ts +0 -1
  109. package/library/packages/events/src/cx-facet-change.d.ts +16 -0
  110. package/library/packages/events/src/cx-faceted-filter-change.d.ts +6 -1
  111. package/library/packages/events/src/events.d.ts +1 -0
  112. package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/components/facet/facet.d.ts +9 -9
  113. package/library/packages/molecules/src/faceted-filter/components/facet/facet.styles.d.ts +2 -0
  114. package/library/packages/molecules/src/faceted-filter/components/facet-date-picker/facet-date-picker.d.ts +43 -0
  115. package/library/packages/molecules/src/faceted-filter/components/facet-date-range/facet-date-range.d.ts +51 -0
  116. package/library/packages/molecules/src/faceted-filter/facet-adapters.d.ts +12 -0
  117. package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/faceted-filter.d.ts +25 -14
  118. package/library/packages/molecules/src/faceted-filter/faceted-filter.styles.d.ts +2 -0
  119. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -1
  120. package/library/packages/molecules/src/index.d.ts +4 -0
  121. package/library/packages/molecules/src/share-option-list/share-option-list.d.ts +1 -1
  122. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +1 -1
  123. package/library/packages/organisms/src/carousel/carousel.d.ts +1 -0
  124. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +1 -0
  125. package/library/packages/organisms/src/content-builder/components/page-picker/page-picker.d.ts +1 -0
  126. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -1
  127. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -2
  128. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +2 -0
  129. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +1 -0
  130. package/library/packages/services/src/api/asset/asset.d.ts +3 -1
  131. package/library/packages/services/src/api/endpoints.d.ts +2 -0
  132. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +6 -0
  133. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +11 -4
  134. package/library/packages/types/src/faceted-filter.d.ts +71 -2
  135. package/library/packages/utils/src/custom-element/i18n.d.ts +3 -1
  136. package/library/packages/utils/src/image/index.d.ts +1 -0
  137. package/library/packages/utils/src/image/waveform.d.ts +29 -0
  138. package/library/react-web-component.d.ts +440 -317
  139. package/library/utils.js +174 -171
  140. package/package.json +1 -1
  141. package/library/chunks/asset.HL1qMnhg.js +0 -458
  142. package/library/chunks/wavesurfer.esm.Cwi1pz64.js +0 -1276
  143. package/library/components/faceted-filter.d.ts +0 -3
  144. package/library/components/faceted-filter.js +0 -295
  145. /package/library/packages/{atoms/src/components/faceted-filter/components/facet/facet.styles.d.ts → molecules/src/faceted-filter/components/facet-date-picker/facet-date-picker.styles.d.ts} +0 -0
  146. /package/library/packages/{atoms/src/components/faceted-filter/faceted-filter.styles.d.ts → molecules/src/faceted-filter/components/facet-date-range/facet-date-range.styles.d.ts} +0 -0
@@ -0,0 +1,607 @@
1
+ import { h as f, A as x, S as Z, a as z, b as X } from "./endpoints.CDX5PgQz.js";
2
+ import { M as B } from "./asset-link-format.B0c92pSs.js";
3
+ import "./debounce.CIEhztrj.js";
4
+ import "./lit-element.jLBm65_O.js";
5
+ import "./form.B-5nQJva.js";
6
+ import "./i18n.CH-wak_P.js";
7
+ import { a as Y } from "./string.DUgD4c9f.js";
8
+ import "./date-picker.D0SJADN6.js";
9
+ import "./content-builder.OsUmm8Wu.js";
10
+ import "./unsafe-html.Dff7-rCx.js";
11
+ import { b as Q } from "./_baseUniq.HFKneygy.js";
12
+ function J(e) {
13
+ return e && e.length ? Q(e) : [];
14
+ }
15
+ function ee(e) {
16
+ return typeof e == "object" && e !== null && "URI" in e;
17
+ }
18
+ const te = {
19
+ artist: "Artist",
20
+ color: "Color",
21
+ createDate: "CreateDate",
22
+ directParentFolderIdentifier: "DirectParentFolderIdentifier",
23
+ docSubType: "DocSubType",
24
+ docType: "DocType",
25
+ editDate: "EditDate",
26
+ fileExtension: "Fileextension",
27
+ keyword: "Keyword",
28
+ mediaDate: "MediaDate",
29
+ mediaNumber: "MediaNumber",
30
+ nativeKeyword: "NativeKeyword",
31
+ orientation: "Orientation",
32
+ parentFolderIdentifier: "ParentFolderIdentifier",
33
+ path: "Path",
34
+ photographer: "Photographer",
35
+ purpose: "Purpose",
36
+ recordId: "RecordID",
37
+ systemIdentifier: "SystemIdentifier",
38
+ text: "Text",
39
+ title: "Title"
40
+ }, re = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
41
+ function U(e) {
42
+ return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(e) && !/^(?:OR|AND|NOT)$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
43
+ }
44
+ function H(e, t) {
45
+ const o = (Array.isArray(t) ? t : [t]).map((a) => `${e}:${U(a)}`);
46
+ return o.length > 1 ? `(${o.join(" OR ")})` : o[0] ?? "";
47
+ }
48
+ function oe(e, t) {
49
+ return (Array.isArray(t) ? t : [t]).map((o) => `${e}${o.operator}${o.value}`).join(" AND ");
50
+ }
51
+ function ne(e) {
52
+ const t = [];
53
+ for (const r of Object.keys(e)) {
54
+ const o = r, a = e[o];
55
+ if (a == null)
56
+ continue;
57
+ if (o === "custom") {
58
+ for (const [n, u] of Object.entries(
59
+ a
60
+ ))
61
+ t.push(H(n, u));
62
+ continue;
63
+ }
64
+ const c = te[o];
65
+ if (c) {
66
+ if (re.has(o)) {
67
+ t.push(
68
+ oe(c, a)
69
+ );
70
+ continue;
71
+ }
72
+ if (o === "color") {
73
+ t.push(`${c}:${a}`);
74
+ continue;
75
+ }
76
+ if (o === "parentFolderIdentifier") {
77
+ const n = Array.isArray(a) ? a : [a];
78
+ if (n.length === 0)
79
+ continue;
80
+ const u = [
81
+ ...n.map((p) => `ParentFolderIdentifier:${U(String(p))}`),
82
+ ...n.map((p) => `ParentAlbumIdentifier:${U(String(p))}`)
83
+ ];
84
+ t.push(`(${u.join(" OR ")})`);
85
+ continue;
86
+ }
87
+ t.push(H(c, a));
88
+ }
89
+ }
90
+ return t.join(" AND ");
91
+ }
92
+ function L(e) {
93
+ if ("and" in e)
94
+ return e.and.map(L).filter(Boolean).join(" AND ");
95
+ if ("or" in e) {
96
+ const t = e.or.map(L).filter(Boolean);
97
+ return t.length > 1 ? `(${t.join(" OR ")})` : t[0] ?? "";
98
+ }
99
+ if ("not" in e) {
100
+ const t = L(e.not);
101
+ return t ? `NOT (${t})` : "";
102
+ }
103
+ return ne(e);
104
+ }
105
+ const C = "CoreField.LargeSizePreview", R = "CoreField.DocType", $ = "Document.Title", V = "Document.CaptionLong", O = "Document.FileExtension", N = "CoreField.FileSize", b = "CoreField.Identifier", P = "CoreField.Keywords", G = "CoreField.MaxHeight", v = "CoreField.MaxWidth", F = "Document.RecordID", j = "CoreField.DocSubType", W = "CoreField.TitleWithFallback", h = "CoreField.OriginalFileName", D = "CoreField.UpdatedFileName", E = "CoreField.OriginalPreview", M = {
106
+ DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
107
+ FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
108
+ ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
109
+ }, q = {
110
+ [C]: M.DEFAULT_VIEW_SIZE,
111
+ [W]: M.FIELD_TITLE_WITH_FALLBACK,
112
+ [E]: M.ORIGINAL_VIEW_SIZE
113
+ }, se = Object.fromEntries(
114
+ Object.entries(q).map(([e, t]) => [
115
+ t,
116
+ e
117
+ ])
118
+ );
119
+ function ae(e) {
120
+ return q[e] ?? e;
121
+ }
122
+ function ie(e) {
123
+ const t = {};
124
+ for (const [r, o] of Object.entries(e)) {
125
+ const a = se[r] ?? r;
126
+ t[a] = o;
127
+ }
128
+ return t;
129
+ }
130
+ async function K({
131
+ countPerPage: e,
132
+ fields: t,
133
+ getPermanentAssetsPaths: r,
134
+ pageNumber: o,
135
+ query: a,
136
+ securityByPassToken: c,
137
+ siteUrl: n,
138
+ sort: u,
139
+ token: p,
140
+ useSession: I
141
+ }) {
142
+ const A = t?.map(ae);
143
+ try {
144
+ return (await f.request({
145
+ baseURL: n,
146
+ headers: p ? { Authorization: `Bearer ${p}` } : void 0,
147
+ method: "GET",
148
+ params: {
149
+ CountPerPage: e,
150
+ Fields: J(A),
151
+ Format: "json",
152
+ GetPermanentAssetsPaths: r || void 0,
153
+ PageNumber: o,
154
+ Query: L(a),
155
+ SecurityByPassToken: c || void 0,
156
+ Sort: u || void 0,
157
+ UseSession: I || void 0
158
+ },
159
+ paramsSerializer: { indexes: null },
160
+ responseType: "json",
161
+ transformResponse: [
162
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
163
+ (s) => ({
164
+ items: (s.APIResponse?.Items ?? []).map(ie),
165
+ sort: s.APIResponse?.GlobalInfo?.Sort ?? "",
166
+ totalCount: s.APIResponse?.GlobalInfo?.TotalCount ?? 0
167
+ })
168
+ ],
169
+ url: Z["4.0"]
170
+ })).data;
171
+ } catch {
172
+ return { items: [], sort: "", totalCount: 0 };
173
+ }
174
+ }
175
+ async function De({
176
+ assetId: e,
177
+ extension: t,
178
+ format: r,
179
+ siteUrl: o,
180
+ token: a,
181
+ transformations: c,
182
+ useSession: n
183
+ }) {
184
+ try {
185
+ return (await f.request({
186
+ baseURL: o,
187
+ method: "GET",
188
+ params: {
189
+ SourceAssetFormat: r,
190
+ SourceAssetRecordID: e,
191
+ TargetExtension: Y(t),
192
+ Token: a || void 0,
193
+ Transformations: c,
194
+ UseSession: n || void 0
195
+ },
196
+ /**
197
+ * https://link.orangelogic.com/Tasks/41S1XH
198
+ */
199
+ timeout: 3e5,
200
+ // 5 minutes
201
+ url: x.GET_TRANSFORM_ASSET_LINK
202
+ })).data;
203
+ } catch {
204
+ return null;
205
+ }
206
+ }
207
+ const ce = 50;
208
+ function le(e, t) {
209
+ const r = [];
210
+ for (let o = 0; o < e.length; o += t)
211
+ r.push(e.slice(o, o + t));
212
+ return r;
213
+ }
214
+ async function _e({
215
+ extraFields: e,
216
+ getPermanentAssetsPaths: t,
217
+ recordIds: r,
218
+ securityByPassToken: o,
219
+ token: a
220
+ }) {
221
+ if (!Array.isArray(r) || r.length === 0)
222
+ return { facets: [], items: [], totalCount: 0 };
223
+ const c = e?.filter((s) => s && typeof s == "string") ?? [], n = [
224
+ ...c,
225
+ E,
226
+ D,
227
+ h,
228
+ $,
229
+ V,
230
+ F
231
+ ], u = le(r, ce), p = await Promise.all(
232
+ u.map(
233
+ (s) => K({
234
+ countPerPage: s.length,
235
+ fields: n,
236
+ getPermanentAssetsPaths: t,
237
+ pageNumber: 1,
238
+ query: { recordId: s },
239
+ securityByPassToken: o,
240
+ token: a
241
+ })
242
+ )
243
+ ), I = new Map(r.map((s, m) => [s, m])), A = p.flatMap((s) => s.items).map((s) => {
244
+ let m = d(s, D);
245
+ return m === "" && (m = d(s, h)), {
246
+ name: m,
247
+ originalUrl: d(s, E),
248
+ recordId: d(s, F),
249
+ ...c.reduce(
250
+ (l, i) => (l[i] = d(s, i), l),
251
+ {}
252
+ )
253
+ };
254
+ }).sort(
255
+ (s, m) => (I.get(s.recordId) ?? 1 / 0) - (I.get(m.recordId) ?? 1 / 0)
256
+ ), T = p.reduce(
257
+ (s, m) => s + m.totalCount,
258
+ 0
259
+ );
260
+ return { facets: [], items: A, totalCount: T };
261
+ }
262
+ async function Fe({
263
+ extraFields: e,
264
+ recordIds: t
265
+ }) {
266
+ if (!Array.isArray(t) || t.length === 0)
267
+ return { facets: [], items: [], totalCount: 0 };
268
+ const r = e?.filter((o) => o && typeof o == "string") ?? [];
269
+ try {
270
+ return (await f.request({
271
+ method: "GET",
272
+ params: {
273
+ ExtraFilters: `RecordID:${t.join(" OR ")}`,
274
+ Fields: [
275
+ ...r,
276
+ E,
277
+ D,
278
+ h,
279
+ $,
280
+ V
281
+ ],
282
+ SeeThru: !0
283
+ },
284
+ paramsSerializer: {
285
+ indexes: null
286
+ },
287
+ responseType: "json",
288
+ transformResponse: [
289
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
290
+ (a) => {
291
+ const c = a.contentItems?.map((n) => {
292
+ let u = n.fields[D] ?? "";
293
+ return u === "" && (u = n.fields[h] ?? ""), {
294
+ name: u,
295
+ originalUrl: n.fields[E] ?? "",
296
+ recordId: n.recordID,
297
+ ...r.reduce(
298
+ (p, I) => (p[I] = n.fields[I] ?? "", p),
299
+ {}
300
+ )
301
+ };
302
+ }) ?? [];
303
+ return c.sort((n, u) => {
304
+ const p = t.indexOf(n.recordId), I = t.indexOf(u.recordId);
305
+ return p - I;
306
+ }), {
307
+ facets: a.facets,
308
+ items: c,
309
+ totalCount: a.totalCount
310
+ };
311
+ }
312
+ ],
313
+ url: x.GET_CONTENT_V1
314
+ })).data;
315
+ } catch {
316
+ return {
317
+ facets: [],
318
+ items: [],
319
+ totalCount: 0
320
+ };
321
+ }
322
+ }
323
+ function d(e, t) {
324
+ const r = e[t];
325
+ return r == null ? "" : typeof r == "string" ? r : typeof r == "number" || typeof r == "boolean" ? String(r) : ee(r) ? r.URI : "";
326
+ }
327
+ async function Se({
328
+ countPerPage: e,
329
+ directParentFolderIdentifier: t,
330
+ extraFields: r,
331
+ getPermanentAssetsPaths: o,
332
+ limitedDocTypes: a,
333
+ pageNumber: c,
334
+ parentFolderIdentifier: n,
335
+ searchTerm: u,
336
+ securityByPassToken: p,
337
+ sortOrder: I,
338
+ token: A
339
+ }) {
340
+ if (!t && !n)
341
+ return { facets: [], items: [], totalCount: 0 };
342
+ const T = (r?.filter((i) => i && typeof i == "string") ?? []).map((i) => i.replace("%20", " ")), s = {
343
+ directParentFolderIdentifier: t,
344
+ parentFolderIdentifier: n,
345
+ ...u ? { text: u } : {},
346
+ ...a.length > 0 ? { docType: [B.Image, B.Audio] } : {}
347
+ }, m = await K({
348
+ countPerPage: e,
349
+ fields: [
350
+ ...T,
351
+ W,
352
+ C,
353
+ E,
354
+ P,
355
+ v,
356
+ G,
357
+ N,
358
+ R,
359
+ j,
360
+ b,
361
+ O,
362
+ F,
363
+ h,
364
+ D
365
+ ],
366
+ getPermanentAssetsPaths: o,
367
+ pageNumber: c,
368
+ query: s,
369
+ securityByPassToken: p,
370
+ sort: I || void 0,
371
+ token: A
372
+ }), l = m.items.map((i) => {
373
+ let y = d(i, O), _ = d(i, D), S = d(i, C);
374
+ y && !y.startsWith(".") && (y = "." + y), _ === "" && (_ = d(i, h)), y.toLowerCase() === ".gif" && (S = d(i, E));
375
+ const g = d(i, F);
376
+ return {
377
+ docSubType: d(i, j),
378
+ docType: d(i, R) || "",
379
+ extension: y,
380
+ height: d(i, G) || "0",
381
+ id: g,
382
+ identifier: d(i, b),
383
+ imageUrl: S,
384
+ name: _,
385
+ originalUrl: d(i, E),
386
+ recordId: g,
387
+ size: d(i, N) || "0 MB",
388
+ tags: d(i, P),
389
+ width: d(i, v) || "0",
390
+ ...T.reduce(
391
+ (w, k) => (w[k] = d(i, k), w),
392
+ {}
393
+ )
394
+ };
395
+ });
396
+ return {
397
+ facets: [],
398
+ items: l,
399
+ totalCount: m.totalCount
400
+ };
401
+ }
402
+ async function ge({
403
+ extraFields: e,
404
+ folderId: t,
405
+ limit: r,
406
+ limitedDocTypes: o,
407
+ searchTerm: a,
408
+ seeThrough: c,
409
+ selectedFacets: n,
410
+ sortOrder: u,
411
+ start: p
412
+ }) {
413
+ const I = (e?.filter((s) => s && typeof s == "string") ?? []).map((s) => s.replace("%20", " ")), A = n.Types, T = Object.fromEntries(
414
+ Object.entries(n).filter(([s]) => s !== "Types")
415
+ );
416
+ try {
417
+ return (await f.request({
418
+ data: {
419
+ facetFilters: Object.keys(T).length > 0 ? T : void 0,
420
+ fields: [
421
+ ...I,
422
+ W,
423
+ C,
424
+ E,
425
+ P,
426
+ v,
427
+ G,
428
+ N,
429
+ R,
430
+ j,
431
+ b,
432
+ O,
433
+ F,
434
+ h,
435
+ D
436
+ ],
437
+ limit: r,
438
+ limitedToDocTypes: o.length > 0 ? o : void 0,
439
+ objectRecordID: t,
440
+ orderBy: u || void 0,
441
+ seeThru: c,
442
+ start: p,
443
+ subtypeCriteria: A?.length > 0 ? A : void 0,
444
+ text: a || void 0
445
+ },
446
+ method: "POST",
447
+ responseType: "json",
448
+ transformResponse: [
449
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
450
+ (m) => ({
451
+ facets: m.facets,
452
+ items: m.contentItems?.map((l) => {
453
+ let i = l.fields[O] ?? "", y = l.fields[D] ?? "", _ = l.fields[C] ?? "";
454
+ return i && !i.startsWith(".") && (i = "." + i), y === "" && (y = l.fields[h] ?? ""), i.toLowerCase() === ".gif" && (_ = l.fields[E] ?? ""), {
455
+ docSubType: l.fields[j] ?? "",
456
+ docType: l.fields[R] ?? "",
457
+ extension: i,
458
+ height: l.fields[G] ?? "0",
459
+ id: l.recordID,
460
+ identifier: l.fields[b] ?? "",
461
+ imageUrl: _,
462
+ name: y ?? "",
463
+ originalUrl: l.fields[E] ?? "",
464
+ recordId: l.fields[F] ?? "",
465
+ size: l.fields[N] ?? "0 MB",
466
+ tags: l.fields[P] ?? "",
467
+ width: l.fields[v] ?? "0",
468
+ ...I.reduce(
469
+ (S, g) => (S[g] = l.fields[g] ?? "", S),
470
+ {}
471
+ )
472
+ };
473
+ }) ?? [],
474
+ totalCount: m.totalCount
475
+ })
476
+ ],
477
+ url: x.GET_CONTENT_V3
478
+ })).data;
479
+ } catch {
480
+ return {
481
+ facets: [],
482
+ items: [],
483
+ totalCount: 0
484
+ };
485
+ }
486
+ }
487
+ async function Ce({
488
+ autoCropMode: e,
489
+ cropHeight: t,
490
+ cropWidth: r,
491
+ imageUrl: o,
492
+ useSession: a
493
+ }) {
494
+ try {
495
+ return (await f.request({
496
+ method: "GET",
497
+ params: {
498
+ AutoCropMode: e,
499
+ CropHeight: t,
500
+ CropWidth: r,
501
+ ImageUrl: o && new URL(o, window.location.origin).href,
502
+ UseSession: a || void 0
503
+ },
504
+ responseType: "json",
505
+ timeout: 3e5,
506
+ // 5 minutes
507
+ transformResponse: [
508
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
509
+ (n) => ({
510
+ height: n.cropHeight,
511
+ width: n.cropWidth,
512
+ x: n.cropX,
513
+ y: n.cropY
514
+ })
515
+ ],
516
+ url: x.GET_CROP_ZONE_SUGGESTION
517
+ })).data;
518
+ } catch {
519
+ return null;
520
+ }
521
+ }
522
+ async function Le({
523
+ assetRecordId: e,
524
+ siteUrl: t,
525
+ token: r,
526
+ useSession: o
527
+ }) {
528
+ try {
529
+ return (await f.request({
530
+ baseURL: t,
531
+ method: "GET",
532
+ params: {
533
+ RecordId: e,
534
+ Token: r,
535
+ UseSession: o || void 0
536
+ },
537
+ responseType: "json",
538
+ transformResponse: [
539
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
540
+ (c) => !c || typeof c != "object" ? [] : c.proxies?.map((n) => ({
541
+ cdnName: n.cdnName,
542
+ extension: n.extension,
543
+ formatHeight: n.formatHeight,
544
+ formatWidth: n.formatWidth,
545
+ height: n.height,
546
+ permanentLink: n.permanentLink,
547
+ proxyLabel: n.proxyLabel,
548
+ proxyName: n.proxyName,
549
+ width: n.width
550
+ })) ?? []
551
+ ],
552
+ url: X
553
+ })).data;
554
+ } catch {
555
+ return [];
556
+ }
557
+ }
558
+ async function Re({
559
+ siteUrl: e
560
+ } = {}) {
561
+ try {
562
+ return (await f.request({
563
+ baseURL: e,
564
+ method: "GET",
565
+ responseType: "json",
566
+ transformResponse: [
567
+ ...Array.isArray(f.defaults.transformResponse) ? f.defaults.transformResponse : [],
568
+ (r) => !r || typeof r != "object" ? {
569
+ formatsByDocType: {
570
+ Audio: {},
571
+ Image: {},
572
+ Multimedia: {},
573
+ Video: {}
574
+ }
575
+ } : {
576
+ formatsByDocType: r.formatsByDocType ?? {}
577
+ }
578
+ ],
579
+ url: z
580
+ })).data;
581
+ } catch {
582
+ return { formatsByDocType: {} };
583
+ }
584
+ }
585
+ export {
586
+ C as D,
587
+ F,
588
+ E as O,
589
+ Fe as a,
590
+ De as b,
591
+ Ce as c,
592
+ _e as d,
593
+ Re as e,
594
+ K as f,
595
+ Se as g,
596
+ ge as h,
597
+ ee as i,
598
+ G as j,
599
+ v as k,
600
+ R as l,
601
+ O as m,
602
+ Le as n,
603
+ N as o,
604
+ b as p,
605
+ j as q,
606
+ J as u
607
+ };
@@ -2,7 +2,7 @@ import { n as i, C as v } from "./lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as g } from "./component.styles.CRO4Odto.js";
3
3
  import { c as C } from "./custom-element.L4WJXn1j.js";
4
4
  import { F as x, v as w } from "./form.B-5nQJva.js";
5
- import { L as $ } from "./i18n.C21qyGi6.js";
5
+ import { L as $ } from "./i18n.CH-wak_P.js";
6
6
  import { H as S, g as O } from "./slot.j5oheLJC.js";
7
7
  import { w as m } from "./watch.CThbualB.js";
8
8
  import { r as u } from "./state.CSDxrqLd.js";
@@ -1,13 +1,13 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.CP3oGDY1.js";
2
+ import { C as $ } from "./table.BvbReIZh.js";
3
3
  import { C as k } from "./typography.DJC_UXgs.js";
4
4
  import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
5
- import { C, a as g } from "./color-swatch.BoUZGGs4.js";
5
+ import { C, a as g } from "./color-swatch.DVzEaNeL.js";
6
6
  import { c as A } from "./component.styles.CRO4Odto.js";
7
7
  import { D as p } from "./content-builder.OsUmm8Wu.js";
8
8
  import { c as S } from "./custom-element.L4WJXn1j.js";
9
9
  import { d as T } from "./debounce.CIEhztrj.js";
10
- import { L as E } from "./i18n.C21qyGi6.js";
10
+ import { L as E } from "./i18n.CH-wak_P.js";
11
11
  import { w as x } from "./watch.CThbualB.js";
12
12
  import { g as D, a as R } from "./responsive.C8NCkfCG.js";
13
13
  import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
@@ -148,13 +148,13 @@ let o = class extends F {
148
148
  super(), this.localize = new E(this), this.variant = c.Table, this.data = [], this.maxCol = 4, this.canCopy = !1, this.showCodes = ["HEX", "RGB", "CMYK", "PMS"], this.multiLanguage = !1, this.breakpoints = [350, 696, 1024], this.deviceType = p.Desktop, this.currentCol = 0, this.isFocused = !1, this.canFocusContainer = !0, this.isContainerFocused = !1, this.handleWindowResize = this.handleWindowResize.bind(this);
149
149
  }
150
150
  runFirstUpdated() {
151
- this.breakpoints = D(this, this.breakpoints), this.handleResize();
152
- }
153
- runConnectedCallback() {
154
151
  this.setAttribute("role", "region"), this.setAttribute("aria-label", this.localize.term("colorSwatches")), this.setAttribute(
155
152
  "aria-roledescription",
156
153
  this.localize.term("colorSwatches")
157
- ), window.addEventListener("resize", this.handleWindowResize);
154
+ ), this.breakpoints = D(this, this.breakpoints), this.handleResize();
155
+ }
156
+ runConnectedCallback() {
157
+ window.addEventListener("resize", this.handleWindowResize);
158
158
  }
159
159
  disconnectedCallback() {
160
160
  super.disconnectedCallback(), window.removeEventListener("resize", this.handleWindowResize);
@@ -8,7 +8,7 @@ import { c as F } from "./component.styles.CRO4Odto.js";
8
8
  import { c as n, C as h, H as $, l as z } from "./color.LzSGBy7o.js";
9
9
  import { c as O } from "./custom-element.L4WJXn1j.js";
10
10
  import { d as W } from "./debounce.CIEhztrj.js";
11
- import { L as A } from "./i18n.C21qyGi6.js";
11
+ import { L as A } from "./i18n.CH-wak_P.js";
12
12
  import { w as i } from "./watch.CThbualB.js";
13
13
  import { i as G, x as u } from "./lit-element.jLBm65_O.js";
14
14
  import { r as c } from "./state.CSDxrqLd.js";
@@ -1,11 +1,11 @@
1
- import { C as _ } from "./button.DIvU_uFU.js";
2
- import { C as u, D as h } from "./dialog.DyT-Nai2.js";
1
+ import { C as _ } from "./button.DwJEeW2t.js";
2
+ import { C as u, D as h } from "./dialog.BYCWepBc.js";
3
3
  import g from "../components/dropdown.js";
4
4
  import { C as x } from "./typography.DJC_UXgs.js";
5
5
  import { n as e, C as b } from "./lib-cortex-element.CVMmyPMC.js";
6
6
  import { c as y } from "./component.styles.CRO4Odto.js";
7
7
  import { c as w } from "./custom-element.L4WJXn1j.js";
8
- import { L as $ } from "./i18n.C21qyGi6.js";
8
+ import { L as $ } from "./i18n.CH-wak_P.js";
9
9
  import { i as z, x as d } from "./lit-element.jLBm65_O.js";
10
10
  import { e as m } from "./query.BBf1UFkC.js";
11
11
  import { e as a } from "./class-map.BiVq-cVR.js";
@@ -3,7 +3,7 @@ import { c as S } from "./component.styles.CRO4Odto.js";
3
3
  import { O, C as D, H, z as A, o as B } from "./overlayscrollbars.BMav4RQ4.js";
4
4
  import { a as c, s as p, w as x } from "./event.BeKOsirN.js";
5
5
  import { c as $ } from "./custom-element.L4WJXn1j.js";
6
- import { L } from "./i18n.C21qyGi6.js";
6
+ import { L } from "./i18n.CH-wak_P.js";
7
7
  import { M as P } from "./modal.U1QltQKe.js";
8
8
  import { l as w, u as _ } from "./scroll.xtO5yojm.js";
9
9
  import { H as E } from "./slot.j5oheLJC.js";
@@ -17,7 +17,7 @@ import { o as q } from "./style-map.llVFPd__.js";
17
17
  import { n as b } from "./when.Dr1es41R.js";
18
18
  import { s as u, g as h } from "./animation-registry.HmpwNuGH.js";
19
19
  import F from "../components/divider.js";
20
- import { C as I } from "./icon-button.DxkJ-cp-.js";
20
+ import { C as I } from "./icon-button.CQiBjznj.js";
21
21
  import U from "../components/popup.js";
22
22
  var l = /* @__PURE__ */ ((e) => (e.Both = "both", e.Footer = "footer", e.Header = "header", e.None = "none", e))(l || {});
23
23
  const j = R`:host{--width:31rem;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large);--body-spacing:var(--cx-spacing-medium) var(--cx-spacing-large);--divider-spacing:0;--footer-spacing:var(--cx-spacing-medium);--max-width:100%;--max-height:100%;--overlay-background-color:var(--cx-overlay-background-color);display:contents}.dialog{justify-content:center;align-items:center;display:flex}.dialog--absolute{position:absolute}.dialog__panel{width:var(--width);height:var(--dialog-height,auto);background-color:var(--cx-panel-background-color);border-radius:var(--cx-border-radius-medium);box-shadow:var(--cx-shadow-x-large);max-width:calc(var(--max-width) - var(--cx-spacing-2x-large));max-height:calc(var(--max-height) - var(--cx-spacing-2x-large));flex-direction:column;display:flex;overflow:hidden}.dialog__panel:focus{outline:none}@media screen and (width<=420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{opacity:1;display:flex}.dialog__header{padding:var(--header-spacing);flex:none;display:flex}.dialog__header-divider,.dialog__footer-divider{--spacing:0;padding:var(--divider-spacing)}.dialog__title{font:inherit;font-family:var(--cx-font-sans);font-size:var(--cx-font-size-large);font-weight:var(--cx-font-weight-regular);line-height:var(--cx-line-height-large);flex:auto;align-items:center;margin:0;display:flex}.dialog__header-actions{justify-content:end;gap:var(--cx-spacing-2x-small);flex-wrap:wrap;flex-shrink:0;display:flex}.dialog__header-actions cx-icon-button,.dialog__header-actions ::slotted(cx-icon-button){font-size:var(--cx-font-size-3x-large);flex:none;align-items:center;display:flex}.dialog__body{padding:var(--body-spacing);-webkit-overflow-scrolling:touch;font-size:var(--cx-font-size-medium);font-weight:var(--cx-font-weight-regular);line-height:var(--cx-line-height-small);z-index:2;flex:auto;display:block;position:relative;overflow:auto}.dialog--overlay-scrollbar .dialog__body{flex-direction:column;display:flex}.dialog__footer{text-align:right;padding:var(--footer-spacing);z-index:1;flex:none;position:relative}.dialog__footer ::slotted(cx-button:not(:first-of-type)){margin-inline-start:var(--cx-spacing-x-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}@media (forced-colors:active){.dialog__panel{border:solid 1px var(--cx-color-neutral-0)}}.dialog__overlay{background-color:var(--overlay-background-color);opacity:0;pointer-events:none;z-index:1;justify-content:center;align-items:center;display:flex}.dialog--open .dialog__overlay{opacity:1;pointer-events:auto}`;