@orangelogic/design-system 2.111.0 → 2.112.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 (157) hide show
  1. package/library/chunks/asset.Ci6rP56l.js +458 -0
  2. package/library/chunks/{button.i88sSbTZ.js → button.BvBgxmvw.js} +3 -3
  3. package/library/chunks/calendar-grid.CXYoS6VA.js +108 -0
  4. package/library/chunks/{color-swatch-group.mIHaCJsh.js → color-swatch-group.D8KPblw2.js} +3 -3
  5. package/library/chunks/{color-swatch.D9vkPoV2.js → color-swatch.DQxReKYX.js} +2 -2
  6. package/library/chunks/{color.vLD2sNTs.js → color.LzSGBy7o.js} +2 -2
  7. package/library/chunks/{confirm-popover.UuBhn8GA.js → confirm-popover.dyPIFLWa.js} +3 -3
  8. package/library/chunks/date-picker.D0SJADN6.js +77 -0
  9. package/library/chunks/{dialog.Bso6gK-8.js → dialog.BoCFGpPO.js} +2 -2
  10. package/library/chunks/{document-viewer.C6eclRvd.js → document-viewer.B90s20gM.js} +8 -7
  11. package/library/chunks/{dot-pagination.CNnUuI-Z.js → dot-pagination.uz9GFrMP.js} +1 -1
  12. package/library/chunks/{file-on-demand.Cf2ujTeF.js → file-on-demand.DLVH0DID.js} +10 -10
  13. package/library/chunks/{folder-select.ByNUfTia.js → folder-select.C2ruplAB.js} +5 -5
  14. package/library/chunks/{form.Ch1cwYzO.js → form.B-5nQJva.js} +46 -34
  15. package/library/chunks/{header.hj2Kw-N7.js → header.By_Mfx47.js} +1 -1
  16. package/library/chunks/{i18n.D6AYDPK-.js → i18n.BcD4Ohsq.js} +46 -13
  17. package/library/chunks/{icon-button.ztYU-DHy.js → icon-button.DO6DHXwo.js} +2 -2
  18. package/library/chunks/icon.DnBh6-56.js +111 -0
  19. package/library/chunks/{iframe.uLxZ6LsL.js → iframe.C4jZSmOr.js} +1 -1
  20. package/library/chunks/{image.DKB6yEQO.js → image.Cx4hbc4L.js} +2 -2
  21. package/library/chunks/input.B7SaYNrr.js +2855 -0
  22. package/library/chunks/{list-editor.GT2kQsmR.js → list-editor.Hag-nXN-.js} +86 -86
  23. package/library/chunks/{option.BAYtHIvG.js → option.CA-HtVdP.js} +2 -2
  24. package/library/chunks/{pagination.CCJD61IB.js → pagination.jgAGwDyt.js} +5 -5
  25. package/library/chunks/{tab-group.BsR8tdVY.js → tab-group.DyxpVNOn.js} +3 -3
  26. package/library/chunks/{table.DL_CEeYh.js → table.Crb35At8.js} +2905 -2306
  27. package/library/chunks/{tree.KmZRWZ0F.js → tree.jg0MjIB8.js} +2 -2
  28. package/library/components/alert.js +2 -2
  29. package/library/components/animated-image.js +15 -15
  30. package/library/components/asset-link-format.js +7 -7
  31. package/library/components/atoms.js +194 -180
  32. package/library/components/audio.js +2 -2
  33. package/library/components/avatar.js +1 -1
  34. package/library/components/border-input-group.js +2 -2
  35. package/library/components/breadcrumb.js +4 -4
  36. package/library/components/button.js +4 -4
  37. package/library/components/checkbox.js +2 -2
  38. package/library/components/color-picker.js +5 -5
  39. package/library/components/color-swatch-group.js +4 -4
  40. package/library/components/color-swatch.js +3 -3
  41. package/library/components/confirm-popover.js +4 -4
  42. package/library/components/copy-button.js +2 -2
  43. package/library/components/corner-position-input-group.js +3 -3
  44. package/library/components/date-calendar.d.ts +3 -0
  45. package/library/components/date-calendar.js +107 -0
  46. package/library/components/details.js +12 -12
  47. package/library/components/dialog.js +3 -3
  48. package/library/components/document-viewer.js +4 -4
  49. package/library/components/dot-pagination.js +2 -2
  50. package/library/components/drawer.js +2 -2
  51. package/library/components/dropdown.js +2 -2
  52. package/library/components/dynamic-select.js +4 -4
  53. package/library/components/e-chart.js +1 -1
  54. package/library/components/element-clamp.js +2 -2
  55. package/library/components/faceted-filter.d.ts +3 -0
  56. package/library/components/faceted-filter.js +295 -0
  57. package/library/components/file-on-demand.js +11 -11
  58. package/library/components/folder-select.js +5 -5
  59. package/library/components/format-bytes.js +1 -1
  60. package/library/components/format-date.js +1 -1
  61. package/library/components/format-number.js +1 -1
  62. package/library/components/format-time.js +1 -1
  63. package/library/components/header.js +2 -2
  64. package/library/components/icon-button.js +3 -3
  65. package/library/components/icon.js +10 -109
  66. package/library/components/iframe.js +2 -2
  67. package/library/components/image-comparer.js +2 -2
  68. package/library/components/image.js +3 -3
  69. package/library/components/input.js +19 -2852
  70. package/library/components/line-clamp.js +1 -1
  71. package/library/components/list-editor.js +7 -7
  72. package/library/components/masonry.js +2 -2
  73. package/library/components/menu-item.js +2 -2
  74. package/library/components/menu.js +2 -2
  75. package/library/components/molecules.js +4 -4
  76. package/library/components/option.js +3 -3
  77. package/library/components/organisms.js +2 -2
  78. package/library/components/padding-input-group.js +9 -9
  79. package/library/components/pagination.js +6 -6
  80. package/library/components/popup.js +1 -1
  81. package/library/components/position-picker.js +1 -1
  82. package/library/components/progress-bar.js +1 -1
  83. package/library/components/progress-ring.js +1 -1
  84. package/library/components/radio-group.js +1 -1
  85. package/library/components/radio.js +1 -1
  86. package/library/components/range.js +2 -2
  87. package/library/components/rating.js +6 -6
  88. package/library/components/relative-time.js +1 -1
  89. package/library/components/select.js +5 -5
  90. package/library/components/shadow-input-group.js +5 -5
  91. package/library/components/share-option-list.js +2 -2
  92. package/library/components/sidebar.js +2 -2
  93. package/library/components/size-input-group.js +3 -3
  94. package/library/components/spinner.js +1 -1
  95. package/library/components/split-panel.js +1 -1
  96. package/library/components/step.js +1 -1
  97. package/library/components/stepper-wizard.js +16 -16
  98. package/library/components/switch.js +1 -1
  99. package/library/components/tab-group.js +4 -4
  100. package/library/components/tab.js +2 -2
  101. package/library/components/table.js +5 -5
  102. package/library/components/tag.js +2 -2
  103. package/library/components/textarea.js +1 -1
  104. package/library/components/tooltip.js +1 -1
  105. package/library/components/tree-item.js +3 -3
  106. package/library/components/tree.js +2 -2
  107. package/library/components/typeface.js +2 -2
  108. package/library/components/types.js +25164 -24599
  109. package/library/components/video.js +2 -2
  110. package/library/package.json +1 -1
  111. package/library/packages/atoms/src/components/date-calendar/date-calendar.d.ts +61 -0
  112. package/library/packages/atoms/src/components/date-calendar/date-calendar.styles.d.ts +2 -0
  113. package/library/packages/atoms/src/components/details/details.d.ts +1 -0
  114. package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.d.ts +58 -0
  115. package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.styles.d.ts +2 -0
  116. package/library/packages/atoms/src/components/faceted-filter/faceted-filter.d.ts +71 -0
  117. package/library/packages/atoms/src/components/faceted-filter/faceted-filter.styles.d.ts +2 -0
  118. package/library/packages/atoms/src/components/icon/font-awesome-icons.d.ts +1 -0
  119. package/library/packages/atoms/src/components/icon/icon.d.ts +1 -0
  120. package/library/packages/atoms/src/components/image/image.d.ts +1 -1
  121. package/library/packages/atoms/src/components/table/table-data-loader.d.ts +13 -0
  122. package/library/packages/atoms/src/components/table/table.d.ts +13 -1
  123. package/library/packages/atoms/src/index.d.ts +3 -0
  124. package/library/packages/events/src/cx-date-select.d.ts +9 -0
  125. package/library/packages/events/src/cx-faceted-filter-change.d.ts +8 -0
  126. package/library/packages/events/src/cx-table-data-load.d.ts +17 -0
  127. package/library/packages/events/src/events.d.ts +3 -0
  128. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ClickableCell/ClickableCell.d.ts +5 -0
  129. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -1
  130. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  131. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +73 -13
  132. package/library/packages/molecules/src/index.d.ts +2 -0
  133. package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +127 -0
  134. package/library/packages/molecules/src/input-date-picker/input-date-picker.styles.d.ts +2 -0
  135. package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.d.ts +90 -0
  136. package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.styles.d.ts +2 -0
  137. package/library/packages/molecules/src/timeline/timeline.d.ts +1 -1
  138. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +0 -1
  139. package/library/packages/services/src/api/asset/asset.d.ts +3 -3
  140. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -2
  141. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +4 -4
  142. package/library/packages/types/src/date-picker.d.ts +45 -0
  143. package/library/packages/types/src/faceted-filter.d.ts +23 -0
  144. package/library/packages/types/src/icon-picker.d.ts +8 -0
  145. package/library/packages/types/src/index.d.ts +1 -1
  146. package/library/packages/types/src/table.d.ts +12 -0
  147. package/library/packages/utils/src/custom-element/form.d.ts +5 -0
  148. package/library/packages/utils/src/custom-element/i18n.d.ts +33 -0
  149. package/library/packages/utils/src/date/calendar-grid.d.ts +40 -0
  150. package/library/packages/utils/src/date/date-range-preset.d.ts +12 -0
  151. package/library/packages/utils/src/date/date.d.ts +42 -0
  152. package/library/packages/utils/src/date/index.d.ts +3 -0
  153. package/library/packages/utils/src/index.d.ts +1 -0
  154. package/library/react-web-component.d.ts +491 -195
  155. package/library/utils.js +539 -332
  156. package/package.json +1 -1
  157. package/library/chunks/asset.NgymQ3Zx.js +0 -454
@@ -0,0 +1,458 @@
1
+ import { h as l, S as q, A as x, a as V, b as Z } from "./endpoints.DBlquU2-.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.BcD4Ohsq.js";
7
+ import { a as z } 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 X } from "./_baseUniq.HFKneygy.js";
12
+ function Y(e) {
13
+ return e && e.length ? X(e) : [];
14
+ }
15
+ function Q(e) {
16
+ return typeof e == "object" && e !== null && "URI" in e;
17
+ }
18
+ const J = {
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
+ }, ee = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
41
+ function g(e) {
42
+ return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(e) && !/^(?:OR|AND|NOT)$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
43
+ }
44
+ function G(e, t) {
45
+ const o = (Array.isArray(t) ? t : [t]).map((s) => `${e}:${g(s)}`);
46
+ return o.length > 1 ? `(${o.join(" OR ")})` : o[0] ?? "";
47
+ }
48
+ function te(e, t) {
49
+ return (Array.isArray(t) ? t : [t]).map((o) => `${e}${o.operator}${o.value}`).join(" AND ");
50
+ }
51
+ function re(e) {
52
+ const t = [];
53
+ for (const r of Object.keys(e)) {
54
+ const o = r, s = e[o];
55
+ if (s == null)
56
+ continue;
57
+ if (o === "custom") {
58
+ for (const [n, f] of Object.entries(
59
+ s
60
+ ))
61
+ t.push(G(n, f));
62
+ continue;
63
+ }
64
+ const u = J[o];
65
+ if (u) {
66
+ if (ee.has(o)) {
67
+ t.push(
68
+ te(u, s)
69
+ );
70
+ continue;
71
+ }
72
+ if (o === "color") {
73
+ t.push(`${u}:${s}`);
74
+ continue;
75
+ }
76
+ if (o === "parentFolderIdentifier") {
77
+ const n = Array.isArray(s) ? s : [s];
78
+ if (n.length === 0)
79
+ continue;
80
+ const f = [
81
+ ...n.map((p) => `ParentFolderIdentifier:${g(String(p))}`),
82
+ ...n.map((p) => `ParentAlbumIdentifier:${g(String(p))}`)
83
+ ];
84
+ t.push(`(${f.join(" OR ")})`);
85
+ continue;
86
+ }
87
+ t.push(G(u, s));
88
+ }
89
+ }
90
+ return t.join(" AND ");
91
+ }
92
+ function y(e) {
93
+ if ("and" in e)
94
+ return e.and.map(y).filter(Boolean).join(" AND ");
95
+ if ("or" in e) {
96
+ const t = e.or.map(y).filter(Boolean);
97
+ return t.length > 1 ? `(${t.join(" OR ")})` : t[0] ?? "";
98
+ }
99
+ if ("not" in e) {
100
+ const t = y(e.not);
101
+ return t ? `NOT (${t})` : "";
102
+ }
103
+ return re(e);
104
+ }
105
+ const C = "CoreField.LargeSizePreview", M = "CoreField.DocType", oe = "Document.Title", ne = "Document.CaptionLong", U = "Document.FileExtension", v = "CoreField.FileSize", j = "CoreField.Identifier", W = "CoreField.Keywords", w = "CoreField.MaxHeight", H = "CoreField.MaxWidth", T = "Document.RecordID", $ = "CoreField.DocSubType", k = "CoreField.TitleWithFallback", h = "CoreField.OriginalFileName", F = "CoreField.UpdatedFileName", I = "CoreField.OriginalPreview", S = {
106
+ DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
107
+ FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
108
+ ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
109
+ }, B = {
110
+ [C]: S.DEFAULT_VIEW_SIZE,
111
+ [k]: S.FIELD_TITLE_WITH_FALLBACK,
112
+ [I]: S.ORIGINAL_VIEW_SIZE
113
+ }, se = Object.fromEntries(
114
+ Object.entries(B).map(([e, t]) => [
115
+ t,
116
+ e
117
+ ])
118
+ );
119
+ function ae(e) {
120
+ return B[e] ?? e;
121
+ }
122
+ function ie(e) {
123
+ const t = {};
124
+ for (const [r, o] of Object.entries(e)) {
125
+ const s = se[r] ?? r;
126
+ t[s] = o;
127
+ }
128
+ return t;
129
+ }
130
+ async function K({
131
+ countPerPage: e,
132
+ fields: t,
133
+ getPermanentAssetsPaths: r,
134
+ pageNumber: o,
135
+ query: s,
136
+ securityByPassToken: u,
137
+ siteUrl: n,
138
+ sort: f,
139
+ token: p,
140
+ useSession: E
141
+ }) {
142
+ const A = t?.map(ae);
143
+ try {
144
+ return (await l.request({
145
+ baseURL: n,
146
+ headers: p ? { Authorization: `Bearer ${p}` } : void 0,
147
+ method: "GET",
148
+ params: {
149
+ CountPerPage: e,
150
+ Fields: Y(A),
151
+ Format: "json",
152
+ GetPermanentAssetsPaths: r || void 0,
153
+ PageNumber: o,
154
+ Query: y(s),
155
+ SecurityByPassToken: u || void 0,
156
+ Sort: f || void 0,
157
+ UseSession: E || void 0
158
+ },
159
+ paramsSerializer: { indexes: null },
160
+ responseType: "json",
161
+ transformResponse: [
162
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
163
+ (a) => ({
164
+ items: (a.APIResponse?.Items ?? []).map(ie),
165
+ sort: a.APIResponse?.GlobalInfo?.Sort ?? "",
166
+ totalCount: a.APIResponse?.GlobalInfo?.TotalCount ?? 0
167
+ })
168
+ ],
169
+ url: q["4.0"]
170
+ })).data;
171
+ } catch {
172
+ return { items: [], sort: "", totalCount: 0 };
173
+ }
174
+ }
175
+ async function Te({
176
+ assetId: e,
177
+ extension: t,
178
+ format: r,
179
+ siteUrl: o,
180
+ token: s,
181
+ transformations: u,
182
+ useSession: n
183
+ }) {
184
+ try {
185
+ return (await l.request({
186
+ baseURL: o,
187
+ method: "GET",
188
+ params: {
189
+ SourceAssetFormat: r,
190
+ SourceAssetRecordID: e,
191
+ TargetExtension: z(t),
192
+ Token: s || void 0,
193
+ Transformations: u,
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 ue(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 he({
215
+ extraFields: e,
216
+ getPermanentAssetsPaths: t,
217
+ recordIds: r,
218
+ securityByPassToken: o,
219
+ token: s
220
+ }) {
221
+ if (!Array.isArray(r) || r.length === 0)
222
+ return { facets: [], items: [], totalCount: 0 };
223
+ const u = e?.filter((a) => a && typeof a == "string") ?? [], n = [
224
+ ...u,
225
+ I,
226
+ F,
227
+ h,
228
+ oe,
229
+ ne,
230
+ T
231
+ ], f = ue(r, ce), p = await Promise.all(
232
+ f.map(
233
+ (a) => K({
234
+ countPerPage: a.length,
235
+ fields: n,
236
+ getPermanentAssetsPaths: t,
237
+ pageNumber: 1,
238
+ query: { recordId: a },
239
+ securityByPassToken: o,
240
+ token: s
241
+ })
242
+ )
243
+ ), E = new Map(r.map((a, d) => [a, d])), A = p.flatMap((a) => a.items).map((a) => {
244
+ let d = c(a, F);
245
+ return d === "" && (d = c(a, h)), {
246
+ name: d,
247
+ originalUrl: c(a, I),
248
+ recordId: c(a, T),
249
+ ...u.reduce(
250
+ (_, i) => (_[i] = c(a, i), _),
251
+ {}
252
+ )
253
+ };
254
+ }).sort(
255
+ (a, d) => (E.get(a.recordId) ?? 1 / 0) - (E.get(d.recordId) ?? 1 / 0)
256
+ ), D = p.reduce(
257
+ (a, d) => a + d.totalCount,
258
+ 0
259
+ );
260
+ return { facets: [], items: A, totalCount: D };
261
+ }
262
+ function c(e, t) {
263
+ const r = e[t];
264
+ return r == null ? "" : typeof r == "string" ? r : typeof r == "number" || typeof r == "boolean" ? String(r) : Q(r) ? r.URI : "";
265
+ }
266
+ async function Fe({
267
+ countPerPage: e,
268
+ directParentFolderIdentifier: t,
269
+ extraFields: r,
270
+ getPermanentAssetsPaths: o,
271
+ limitedDocTypes: s,
272
+ pageNumber: u,
273
+ parentFolderIdentifier: n,
274
+ searchTerm: f,
275
+ securityByPassToken: p,
276
+ sortOrder: E,
277
+ token: A
278
+ }) {
279
+ if (!t && !n)
280
+ return { facets: [], items: [], totalCount: 0 };
281
+ const D = (r?.filter((i) => i && typeof i == "string") ?? []).map((i) => i.replace("%20", " ")), a = {
282
+ directParentFolderIdentifier: t,
283
+ parentFolderIdentifier: n,
284
+ ...s.length > 0 ? { docType: [b.Image, b.Audio] } : {}
285
+ }, d = await K({
286
+ countPerPage: e,
287
+ fields: [
288
+ ...D,
289
+ k,
290
+ C,
291
+ I,
292
+ W,
293
+ H,
294
+ w,
295
+ v,
296
+ M,
297
+ $,
298
+ j,
299
+ U,
300
+ T,
301
+ h,
302
+ F
303
+ ],
304
+ getPermanentAssetsPaths: o,
305
+ pageNumber: u,
306
+ query: a,
307
+ securityByPassToken: p,
308
+ sort: void 0,
309
+ token: A
310
+ }), _ = d.items.map((i) => {
311
+ let m = c(i, U), L = c(i, F), R = c(i, C);
312
+ m && !m.startsWith(".") && (m = "." + m), L === "" && (L = c(i, h)), m.toLowerCase() === ".gif" && (R = c(i, I));
313
+ const N = c(i, T);
314
+ return {
315
+ docSubType: c(i, $),
316
+ docType: c(i, M) || "",
317
+ extension: m,
318
+ height: c(i, w) || "0",
319
+ id: N,
320
+ identifier: c(i, j),
321
+ imageUrl: R,
322
+ name: L,
323
+ originalUrl: c(i, I),
324
+ recordId: N,
325
+ size: c(i, v) || "0 MB",
326
+ tags: c(i, W),
327
+ width: c(i, H) || "0",
328
+ ...D.reduce(
329
+ (P, O) => (P[O] = c(i, O), P),
330
+ {}
331
+ )
332
+ };
333
+ });
334
+ return {
335
+ facets: [],
336
+ items: _,
337
+ totalCount: d.totalCount
338
+ };
339
+ }
340
+ async function Le({
341
+ autoCropMode: e,
342
+ cropHeight: t,
343
+ cropWidth: r,
344
+ imageUrl: o,
345
+ useSession: s
346
+ }) {
347
+ try {
348
+ return (await l.request({
349
+ method: "GET",
350
+ params: {
351
+ AutoCropMode: e,
352
+ CropHeight: t,
353
+ CropWidth: r,
354
+ ImageUrl: o && new URL(o, window.location.origin).href,
355
+ UseSession: s || void 0
356
+ },
357
+ responseType: "json",
358
+ timeout: 3e5,
359
+ // 5 minutes
360
+ transformResponse: [
361
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
362
+ (n) => ({
363
+ height: n.cropHeight,
364
+ width: n.cropWidth,
365
+ x: n.cropX,
366
+ y: n.cropY
367
+ })
368
+ ],
369
+ url: x.GET_CROP_ZONE_SUGGESTION
370
+ })).data;
371
+ } catch {
372
+ return null;
373
+ }
374
+ }
375
+ async function Se({
376
+ assetRecordId: e,
377
+ siteUrl: t,
378
+ token: r,
379
+ useSession: o
380
+ }) {
381
+ try {
382
+ return (await l.request({
383
+ baseURL: t,
384
+ method: "GET",
385
+ params: {
386
+ RecordId: e,
387
+ Token: r,
388
+ UseSession: o || void 0
389
+ },
390
+ responseType: "json",
391
+ transformResponse: [
392
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
393
+ (u) => !u || typeof u != "object" ? [] : u.proxies?.map((n) => ({
394
+ cdnName: n.cdnName,
395
+ extension: n.extension,
396
+ formatHeight: n.formatHeight,
397
+ formatWidth: n.formatWidth,
398
+ height: n.height,
399
+ permanentLink: n.permanentLink,
400
+ proxyLabel: n.proxyLabel,
401
+ proxyName: n.proxyName,
402
+ width: n.width
403
+ })) ?? []
404
+ ],
405
+ url: Z
406
+ })).data;
407
+ } catch {
408
+ return [];
409
+ }
410
+ }
411
+ async function ge({
412
+ siteUrl: e
413
+ } = {}) {
414
+ try {
415
+ return (await l.request({
416
+ baseURL: e,
417
+ method: "GET",
418
+ responseType: "json",
419
+ transformResponse: [
420
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
421
+ (r) => !r || typeof r != "object" ? {
422
+ formatsByDocType: {
423
+ Audio: {},
424
+ Image: {},
425
+ Multimedia: {},
426
+ Video: {}
427
+ }
428
+ } : {
429
+ formatsByDocType: r.formatsByDocType ?? {}
430
+ }
431
+ ],
432
+ url: V
433
+ })).data;
434
+ } catch {
435
+ return { formatsByDocType: {} };
436
+ }
437
+ }
438
+ export {
439
+ C as D,
440
+ T as F,
441
+ I as O,
442
+ he as a,
443
+ Te as b,
444
+ Le as c,
445
+ ge as d,
446
+ K as e,
447
+ Fe as f,
448
+ w as g,
449
+ H as h,
450
+ Q as i,
451
+ M as j,
452
+ U as k,
453
+ Se as l,
454
+ v as m,
455
+ j as n,
456
+ $ as o,
457
+ Y as u
458
+ };
@@ -1,8 +1,8 @@
1
1
  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
- import { F as x, v as w } from "./form.Ch1cwYzO.js";
5
- import { L as $ } from "./i18n.D6AYDPK-.js";
4
+ import { F as x, v as w } from "./form.B-5nQJva.js";
5
+ import { L as $ } from "./i18n.BcD4Ohsq.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";
@@ -11,7 +11,7 @@ import { e as D } from "./class-map.BiVq-cVR.js";
11
11
  import { o } from "./if-defined.BRoBj_Rp.js";
12
12
  import { n as f } from "./when.Dr1es41R.js";
13
13
  import { u as h, i as b } from "./static.UA3G1Deq.js";
14
- import B from "../components/icon.js";
14
+ import { C as B } from "./icon.DnBh6-56.js";
15
15
  import F from "../components/spinner.js";
16
16
  import { b as _ } from "./button.styles.Cz4EELcL.js";
17
17
  var y = /* @__PURE__ */ ((t) => (t.Adaptive = "adaptive", t.Fill = "fill", t.Hug = "hug", t))(y || {}), l = /* @__PURE__ */ ((t) => (t.Custom = "custom", t.Large = "large", t.Medium = "medium", t.Small = "small", t.XLarge = "x-large", t))(l || {}), k = Object.defineProperty, V = Object.getOwnPropertyDescriptor, r = (t, s, p, n) => {
@@ -0,0 +1,108 @@
1
+ const M = /^\d{4}-\d{2}-\d{2}$/;
2
+ function s(t) {
3
+ if (!M.test(t))
4
+ return !1;
5
+ const [e, n, a] = t.split("-").map(Number), o = new Date(e, n - 1, a);
6
+ return o.getFullYear() === e && o.getMonth() === n - 1 && o.getDate() === a;
7
+ }
8
+ function D(t, e, n) {
9
+ return [
10
+ String(t).padStart(4, "0"),
11
+ String(e).padStart(2, "0"),
12
+ String(n).padStart(2, "0")
13
+ ].join("-");
14
+ }
15
+ function S(t) {
16
+ const [e, n, a] = t.split("-").map(Number);
17
+ return { day: a, month: n, year: e };
18
+ }
19
+ function C(t) {
20
+ if (!s(t))
21
+ return;
22
+ const { day: e, month: n, year: a } = S(t);
23
+ return new Date(a, n - 1, e);
24
+ }
25
+ function F(t) {
26
+ if (!t)
27
+ return "";
28
+ const [e, n, a] = t.split("-");
29
+ return `${a}-${n}-${e}`;
30
+ }
31
+ function L(t) {
32
+ const e = t.split("-");
33
+ if (e.length !== 3 || e[2].length < 4)
34
+ return "";
35
+ const [n, a, o] = e;
36
+ return `${o}-${a}-${n}`;
37
+ }
38
+ function N() {
39
+ const t = /* @__PURE__ */ new Date();
40
+ return D(t.getFullYear(), t.getMonth() + 1, t.getDate());
41
+ }
42
+ function O(t, e, n) {
43
+ const a = new Date(t, e - 1 + n, 1);
44
+ return { month: a.getMonth() + 1, year: a.getFullYear() };
45
+ }
46
+ function U(t, e) {
47
+ return new Date(t, e - 1, 1).toLocaleDateString("en-US", {
48
+ month: "long",
49
+ year: "numeric"
50
+ });
51
+ }
52
+ function Y(t, e) {
53
+ return new Date(t, e - 1, 1).getDay();
54
+ }
55
+ const E = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
56
+ function I(t) {
57
+ const e = new Date(t);
58
+ return isNaN(e.getTime()) ? null : D(e.getFullYear(), e.getMonth() + 1, e.getDate());
59
+ }
60
+ function _(t) {
61
+ return t ? s(t) ? t : E.test(t) ? I(t) : (console.warn(
62
+ `[normalizeToIsoDate] Unsupported date format: "${t}". Expected YYYY-MM-DD or ISO UTC datetime (e.g. 2026-06-05T00:00:00.000Z).`
63
+ ), null) : null;
64
+ }
65
+ const $ = 35;
66
+ class b {
67
+ /**
68
+ * Generates a fixed 35-cell (5 weeks × 7 days) grid for the given month.
69
+ * The grid always starts on Sunday. Days before the 1st and after the last
70
+ * day of viewMonth are marked isOutside = true but remain selectable.
71
+ *
72
+ * Note: months that span more than 5 weeks (start on Fri/Sat with 30/31 days)
73
+ * will have their last 1-2 days truncated. This matches the fixed-height design.
74
+ */
75
+ static generate(e) {
76
+ const { maxDate: n, minDate: a, selectedDate: o, todayDate: h, viewMonth: c, viewYear: l } = e, p = Y(l, c), f = new Date(l, c - 1, 1 - p), g = [];
77
+ for (let d = 0; d < $; d++) {
78
+ const i = new Date(f);
79
+ i.setDate(f.getDate() + d);
80
+ const y = i.getFullYear(), u = i.getMonth() + 1, m = i.getDate(), r = D(y, u, m), T = s(a) && r < a, w = s(n) && r > n;
81
+ g.push({
82
+ date: r,
83
+ day: m,
84
+ isDisabled: T || w,
85
+ isOutside: u !== c,
86
+ isSelected: s(o) && r === o,
87
+ isToday: r === h,
88
+ month: u,
89
+ year: y
90
+ });
91
+ }
92
+ return g;
93
+ }
94
+ }
95
+ export {
96
+ b as C,
97
+ O as a,
98
+ F as b,
99
+ s as c,
100
+ L as d,
101
+ Y as e,
102
+ U as f,
103
+ N as g,
104
+ C as i,
105
+ _ as n,
106
+ S as p,
107
+ D as t
108
+ };
@@ -1,13 +1,13 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.DL_CEeYh.js";
2
+ import { C as $ } from "./table.Crb35At8.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.D9vkPoV2.js";
5
+ import { C, a as g } from "./color-swatch.DQxReKYX.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.D6AYDPK-.js";
10
+ import { L as E } from "./i18n.BcD4Ohsq.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";
@@ -5,10 +5,10 @@ import b from "../components/space.js";
5
5
  import { C as _ } from "./typography.DJC_UXgs.js";
6
6
  import { n as a, C as k } from "./lib-cortex-element.CVMmyPMC.js";
7
7
  import { c as F } from "./component.styles.CRO4Odto.js";
8
- import { c as n, C as h, H as $, l as z } from "./color.vLD2sNTs.js";
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.D6AYDPK-.js";
11
+ import { L as A } from "./i18n.BcD4Ohsq.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";
@@ -151,7 +151,7 @@ export {
151
151
  k as C,
152
152
  p as H,
153
153
  $ as R,
154
- A as a,
154
+ _ as a,
155
155
  L as b,
156
156
  C as c,
157
157
  x as d,
@@ -160,5 +160,5 @@ export {
160
160
  M as g,
161
161
  I as h,
162
162
  E as l,
163
- _ as p
163
+ A as p
164
164
  };
@@ -1,11 +1,11 @@
1
- import { C as _ } from "./button.i88sSbTZ.js";
2
- import { C as u, D as h } from "./dialog.Bso6gK-8.js";
1
+ import { C as _ } from "./button.BvBgxmvw.js";
2
+ import { C as u, D as h } from "./dialog.BoCFGpPO.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.D6AYDPK-.js";
8
+ import { L as $ } from "./i18n.BcD4Ohsq.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";