@orangelogic/design-system 2.23.0 → 2.24.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 (121) hide show
  1. package/library/chunks/asset.CbekdGAb.js +309 -0
  2. package/library/chunks/{button.G_W-dK6b.js → button.B0O7Bew9.js} +1 -1
  3. package/library/chunks/{color-swatch-group.CLgR1RVY.js → color-swatch-group.BYDizTKy.js} +93 -130
  4. package/library/chunks/{color-swatch.k8v423rv.js → color-swatch.rzLyn4cY.js} +2 -2
  5. package/library/chunks/{confirm-popover.B5zE9qkC.js → confirm-popover.B5Tyd6CV.js} +3 -3
  6. package/library/chunks/content-builder.UlVFSATk.js +41 -0
  7. package/library/chunks/dialog.BoWqLaXI.js +558 -0
  8. package/library/chunks/{dot-pagination.EWl_NO9m.js → dot-pagination.DTcyQ7ic.js} +1 -1
  9. package/library/chunks/{endpoints.3oM4-c57.js → endpoints.B7lcoc1N.js} +3 -3
  10. package/library/chunks/{file-on-demand.Dbju7eFg.js → file-on-demand.DCaPIgOl.js} +9 -9
  11. package/library/chunks/{folder-select.hyld2fgc.js → folder-select.DRvaY5Ys.js} +11 -11
  12. package/library/chunks/{header.CzGjJnha.js → header.BcthFCeE.js} +1 -1
  13. package/library/chunks/{i18n.C6c6_pqI.js → i18n.1z3F6PhD.js} +8 -0
  14. package/library/chunks/{iframe.CVP0aR9K.js → iframe.DDcLZGpg.js} +1 -1
  15. package/library/chunks/{image.9eUBQRQ0.js → image.DIq3DyTF.js} +2 -2
  16. package/library/chunks/list-editor.C1gN3V3p.js +728 -0
  17. package/library/chunks/{menu-item.Dep30IBS.js → menu-item.BT0QEXjg.js} +2 -2
  18. package/library/chunks/{option.pgg_ZoHY.js → option.D5K8gQab.js} +1 -1
  19. package/library/chunks/overlayscrollbars.BhATcEys.js +2151 -0
  20. package/library/chunks/{popup.CiIgTjOV.js → popup.Cl0gd-FJ.js} +1 -1
  21. package/library/chunks/{select.CWOW4pAr.js → select.C7elCOlQ.js} +3 -3
  22. package/library/chunks/{tab-group.C0I_UeKY.js → tab-group.BKhojmuJ.js} +320 -175
  23. package/library/chunks/{table.Oco9h8cd.js → table.DQ1luMpt.js} +1789 -1704
  24. package/library/chunks/{tree.5Cb85J9q.js → tree.CVtMBkgQ.js} +1 -1
  25. package/library/components/alert.js +1 -1
  26. package/library/components/asset-link-format.js +2594 -14
  27. package/library/components/atoms.js +13 -13
  28. package/library/components/bicolor-picker.js +13 -13
  29. package/library/components/border-input-group.js +1 -1
  30. package/library/components/breadcrumb.js +1 -1
  31. package/library/components/button.js +2 -2
  32. package/library/components/color-picker.js +3 -3
  33. package/library/components/color-swatch-group.js +7 -6
  34. package/library/components/color-swatch.js +3 -3
  35. package/library/components/confirm-popover.js +4 -4
  36. package/library/components/copy-button.js +1 -1
  37. package/library/components/corner-position-input-group.js +3 -3
  38. package/library/components/details.js +1 -1
  39. package/library/components/dialog.js +4 -4
  40. package/library/components/dot-pagination.js +2 -2
  41. package/library/components/drawer.js +1 -1
  42. package/library/components/dropdown.js +2 -2
  43. package/library/components/dynamic-select.js +5 -5
  44. package/library/components/element-clamp.js +2 -2
  45. package/library/components/file-on-demand.js +10 -10
  46. package/library/components/folder-select.js +5 -5
  47. package/library/components/format-bytes.js +1 -1
  48. package/library/components/format-date.js +1 -1
  49. package/library/components/format-number.js +1 -1
  50. package/library/components/header.js +2 -2
  51. package/library/components/icon-button.js +1 -1
  52. package/library/components/iframe.js +2 -2
  53. package/library/components/image-comparer.js +1 -1
  54. package/library/components/image.js +3 -3
  55. package/library/components/input.js +1 -1
  56. package/library/components/line-clamp.js +2 -2
  57. package/library/components/list-editor.js +14 -11
  58. package/library/components/masonry.js +1 -1
  59. package/library/components/menu-item.js +3 -3
  60. package/library/components/menu.js +2 -2
  61. package/library/components/molecules.js +4 -4
  62. package/library/components/option.js +2 -2
  63. package/library/components/organisms.js +6 -6
  64. package/library/components/pagination.js +4 -4
  65. package/library/components/popup.js +2 -2
  66. package/library/components/position-picker.js +1 -1
  67. package/library/components/progress-bar.js +1 -1
  68. package/library/components/progress-ring.js +1 -1
  69. package/library/components/range.js +2 -2
  70. package/library/components/rating.js +1 -1
  71. package/library/components/relative-time.js +1 -1
  72. package/library/components/select.js +4 -4
  73. package/library/components/shadow-input-group.js +29 -27
  74. package/library/components/share-option-list.js +1 -1
  75. package/library/components/size-input-group.js +2 -2
  76. package/library/components/spinner.js +1 -1
  77. package/library/components/split-panel.js +1 -1
  78. package/library/components/tab-group.js +6 -5
  79. package/library/components/tab.js +251 -59
  80. package/library/components/table.js +53 -50
  81. package/library/components/tag.js +1 -1
  82. package/library/components/tooltip.js +2 -2
  83. package/library/components/tree-item.js +2 -2
  84. package/library/components/tree.js +2 -2
  85. package/library/components/typeface.js +1 -1
  86. package/library/components/types.js +23992 -23736
  87. package/library/components/video.js +2 -2
  88. package/library/package.json +1 -1
  89. package/library/packages/atoms/src/components/tab/tab.d.ts +7 -0
  90. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +22 -0
  91. package/library/packages/atoms/src/components/table/modules/HoverMenu.d.ts +4 -4
  92. package/library/packages/atoms/src/components/table/table.d.ts +17 -0
  93. package/library/packages/atoms/src/components/table/tabulator-tables/core/RowManager.d.ts +3 -3
  94. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +6 -2
  95. package/library/packages/atoms/src/components/table/tabulator-tables/core/row/Row.d.ts +1 -0
  96. package/library/packages/atoms/src/components/table/tabulator-tables/core/row/RowComponent.d.ts +0 -1
  97. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/ModuleBinder.d.ts +2 -0
  98. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Format/defaults/formatters/image.d.ts +1 -1
  99. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Layout/defaults/modes/fitColumns.d.ts +1 -1
  100. package/library/packages/molecules/src/index.d.ts +1 -0
  101. package/library/packages/molecules/src/list-editor/list-editor.d.ts +38 -12
  102. package/library/packages/molecules/src/timeline/timeline.d.ts +45 -0
  103. package/library/packages/molecules/src/timeline/timeline.styles.d.ts +2 -0
  104. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -12
  105. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  106. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +14 -0
  107. package/library/packages/organisms/src/content-builder/configsController.d.ts +10 -0
  108. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +3 -0
  109. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +1 -0
  110. package/library/packages/organisms/src/content-builder/plugins/timeline.d.ts +14 -0
  111. package/library/packages/organisms/src/content-builder/styleController.d.ts +3 -1
  112. package/library/packages/types/src/content-builder.d.ts +5 -2
  113. package/library/packages/types/src/tab-group.d.ts +1 -0
  114. package/library/packages/types/src/table.d.ts +10 -8
  115. package/library/packages/utils/src/custom-element/i18n.d.ts +8 -0
  116. package/library/react-web-component.d.ts +82 -7
  117. package/package.json +1 -1
  118. package/library/chunks/asset-link-format.C0CS4yT2.js +0 -2900
  119. package/library/chunks/dialog.BTGwgvZG.js +0 -1998
  120. package/library/chunks/list-editor.CrErjQdh.js +0 -356
  121. package/library/chunks/overlay-scrollbar.styles.B1VCLkfA.js +0 -711
@@ -0,0 +1,309 @@
1
+ import { h as d, A as E, a as w } from "./endpoints.B7lcoc1N.js";
2
+ const P = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
3
+ function U(o, e, r, t = P) {
4
+ const s = new URL(t + "/" + o);
5
+ return Array.isArray(r) ? r.forEach((n) => {
6
+ n[1] && s.searchParams.append(n[0], n[1]);
7
+ }) : r && Object.keys(r).forEach((n) => {
8
+ r[n] && s.searchParams.append(n, r[n]);
9
+ }), fetch(s, e);
10
+ }
11
+ const h = (o, e) => {
12
+ try {
13
+ window.Matrix3?.ShowNotification && window.Matrix3.ShowNotification(
14
+ o,
15
+ e ? {
16
+ notificationType: e.notificationType
17
+ } : void 0
18
+ );
19
+ } catch {
20
+ return;
21
+ }
22
+ }, A = "CoreField.LargeSizePreview", L = "CoreField.DocType", M = "Document.Title", b = "Document.CaptionLong", C = "Document.FileExtension", S = "CoreField.FileSize", O = "CoreField.Identifier", N = "CoreField.Keywords", g = "CoreField.MaxHeight", R = "CoreField.MaxWidth", G = "Document.RecordID", x = "CoreField.DocSubType", j = "CoreField.TitleWithFallback", T = "CoreField.OriginalFileName", I = "CoreField.UpdatedFileName", F = "CoreField.OriginalPreview";
23
+ function B(o) {
24
+ return !o || Object.keys(o).length === 0 ? {} : Object.entries(o).reduce(
25
+ (e, [r, t]) => !t || t.length === 0 ? e : r === "Types" ? {
26
+ ...e,
27
+ SubtypeCriteria: t
28
+ } : {
29
+ ...e,
30
+ FacetFilters: {
31
+ ...e.FacetFilters,
32
+ [r]: t
33
+ }
34
+ },
35
+ {}
36
+ );
37
+ }
38
+ async function v({
39
+ assetId: o,
40
+ extension: e,
41
+ format: r,
42
+ siteUrl: t,
43
+ token: s,
44
+ transformations: n,
45
+ useSession: i
46
+ }) {
47
+ try {
48
+ return (await d.request({
49
+ baseURL: t,
50
+ method: "GET",
51
+ params: {
52
+ SourceAssetFormat: r,
53
+ SourceAssetRecordID: o,
54
+ TargetExtension: e,
55
+ Token: s,
56
+ Transformations: n,
57
+ UseSession: i || void 0
58
+ },
59
+ /**
60
+ * https://link.orangelogic.com/Tasks/41S1XH
61
+ */
62
+ timeout: 3e5,
63
+ // 5 minutes
64
+ url: E.GET_TRANSFORM_ASSET_LINK
65
+ })).data;
66
+ } catch {
67
+ return null;
68
+ }
69
+ }
70
+ async function H({
71
+ extraFields: o,
72
+ recordIds: e
73
+ }) {
74
+ if (!Array.isArray(e) || e.length === 0)
75
+ return { facets: [], items: [], totalCount: 0 };
76
+ const r = o?.filter((t) => t && typeof t == "string") ?? [];
77
+ try {
78
+ return (await d.request({
79
+ method: "GET",
80
+ params: {
81
+ ExtraFilters: `RecordID:${e.join(" OR ")}`,
82
+ Fields: [
83
+ ...r,
84
+ F,
85
+ I,
86
+ T,
87
+ M,
88
+ b
89
+ ],
90
+ SeeThru: !0
91
+ },
92
+ paramsSerializer: {
93
+ indexes: null
94
+ },
95
+ responseType: "json",
96
+ transformResponse: [
97
+ ...Array.isArray(d.defaults.transformResponse) ? d.defaults.transformResponse : [],
98
+ (s) => {
99
+ const n = s.contentItems?.map((i) => {
100
+ let c = i.fields[I] ?? "";
101
+ return c === "" && (c = i.fields[T] ?? ""), {
102
+ name: c,
103
+ originalUrl: i.fields[F] ?? "",
104
+ recordId: i.recordID,
105
+ ...r.reduce(
106
+ (u, l) => (u[l] = i.fields[l] ?? "", u),
107
+ {}
108
+ )
109
+ };
110
+ }) ?? [];
111
+ return n.sort((i, c) => {
112
+ const u = e.indexOf(i.recordId), l = e.indexOf(c.recordId);
113
+ return u - l;
114
+ }), {
115
+ facets: s.facets,
116
+ items: n,
117
+ totalCount: s.totalCount
118
+ };
119
+ }
120
+ ],
121
+ url: E.GET_CONTENT_V1
122
+ })).data;
123
+ } catch {
124
+ return {
125
+ facets: [],
126
+ items: [],
127
+ totalCount: 0
128
+ };
129
+ }
130
+ }
131
+ async function k({
132
+ extraFields: o,
133
+ folderId: e,
134
+ limit: r,
135
+ limitedDocTypes: t,
136
+ searchTerm: s,
137
+ seeThrough: n,
138
+ selectedFacets: i,
139
+ sortOrder: c,
140
+ start: u
141
+ }) {
142
+ const l = (o?.filter((f) => f && typeof f == "string") ?? []).map((f) => f.replace("%20", " "));
143
+ try {
144
+ return (await d.request({
145
+ method: "GET",
146
+ params: {
147
+ Fields: [
148
+ ...l,
149
+ j,
150
+ A,
151
+ F,
152
+ N,
153
+ R,
154
+ g,
155
+ S,
156
+ L,
157
+ x,
158
+ O,
159
+ C,
160
+ G,
161
+ T,
162
+ I
163
+ ],
164
+ Limit: r,
165
+ LimitedToDocTypes: t.length > 0 ? t : void 0,
166
+ ObjectRecordID: e,
167
+ OrderBy: c || void 0,
168
+ SearchTerm: s || void 0,
169
+ SeeThru: n,
170
+ Start: u,
171
+ ...B(i)
172
+ },
173
+ paramsSerializer: {
174
+ indexes: null
175
+ },
176
+ responseType: "json",
177
+ transformResponse: [
178
+ ...Array.isArray(d.defaults.transformResponse) ? d.defaults.transformResponse : [],
179
+ (y) => ({
180
+ facets: y.facets,
181
+ items: y.contentItems?.map((a) => {
182
+ let p = a.fields[C] ?? "", D = a.fields[I] ?? "";
183
+ return p && !p.startsWith(".") && (p = "." + p), D === "" && (D = a.fields[T] ?? ""), {
184
+ docSubType: a.fields[x] ?? "",
185
+ docType: a.fields[L] ?? "",
186
+ extension: p,
187
+ height: a.fields[g] ?? "0",
188
+ id: a.recordID,
189
+ identifier: a.fields[O] ?? "",
190
+ imageUrl: a.fields[A] ?? "",
191
+ name: D ?? "",
192
+ originalUrl: a.fields[F] ?? "",
193
+ recordId: a.fields[G] ?? "",
194
+ size: a.fields[S] ?? "0 MB",
195
+ tags: a.fields[N] ?? "",
196
+ width: a.fields[R] ?? "0",
197
+ ...l.reduce(
198
+ (_, m) => (_[m] = a.fields[m] ?? "", _),
199
+ {}
200
+ )
201
+ };
202
+ }) ?? [],
203
+ totalCount: y.totalCount
204
+ })
205
+ ],
206
+ url: E.GET_CONTENT_V2
207
+ })).data;
208
+ } catch {
209
+ return {
210
+ facets: [],
211
+ items: [],
212
+ totalCount: 0
213
+ };
214
+ }
215
+ }
216
+ async function q({
217
+ autoCropMode: o,
218
+ cropHeight: e,
219
+ cropWidth: r,
220
+ imageUrl: t,
221
+ useSession: s
222
+ }) {
223
+ try {
224
+ return (await d.request({
225
+ method: "GET",
226
+ params: {
227
+ AutoCropMode: o,
228
+ CropHeight: e,
229
+ CropWidth: r,
230
+ ImageUrl: t && new URL(t, window.location.origin).href,
231
+ UseSession: s || void 0
232
+ },
233
+ responseType: "json",
234
+ timeout: 3e5,
235
+ // 5 minutes
236
+ transformResponse: [
237
+ ...Array.isArray(d.defaults.transformResponse) ? d.defaults.transformResponse : [],
238
+ (i) => ({
239
+ height: i.cropHeight,
240
+ width: i.cropWidth,
241
+ x: i.cropX,
242
+ y: i.cropY
243
+ })
244
+ ],
245
+ url: E.GET_CROP_ZONE_SUGGESTION
246
+ })).data;
247
+ } catch {
248
+ return null;
249
+ }
250
+ }
251
+ async function z({
252
+ siteUrl: o
253
+ } = {}) {
254
+ try {
255
+ return (await d.request({
256
+ baseURL: o,
257
+ method: "GET",
258
+ responseType: "json",
259
+ transformResponse: [
260
+ ...Array.isArray(d.defaults.transformResponse) ? d.defaults.transformResponse : [],
261
+ (r) => !r || typeof r != "object" ? {
262
+ formatsByDocType: {
263
+ Audio: {},
264
+ Image: {},
265
+ Multimedia: {},
266
+ Video: {}
267
+ }
268
+ } : {
269
+ formatsByDocType: r.formatsByDocType ?? {}
270
+ }
271
+ ],
272
+ url: w
273
+ })).data;
274
+ } catch {
275
+ return { formatsByDocType: {} };
276
+ }
277
+ }
278
+ async function V(o, e) {
279
+ const r = new FormData();
280
+ r.append("InputStream", o);
281
+ const t = await U(
282
+ E.UPLOAD_AND_GET_RESPONSE,
283
+ {
284
+ body: r,
285
+ method: "POST"
286
+ },
287
+ {
288
+ ByPassPermissionCheck: "true",
289
+ ClientFileName: o.name,
290
+ FolderRecordID: e?.imageUploadFolderID || ""
291
+ }
292
+ ), s = t ? await t.json() : null;
293
+ return s ? s.downloadLink === "" ? (h(e?.errorUploadMessage || "", {
294
+ notificationType: "error"
295
+ }), "") : s.downloadLink : (h(e?.errorUploadMessage || "", {
296
+ notificationType: "error"
297
+ }), "");
298
+ }
299
+ export {
300
+ A as D,
301
+ H as a,
302
+ v as b,
303
+ q as c,
304
+ z as d,
305
+ k as e,
306
+ U as f,
307
+ h as t,
308
+ V as u
309
+ };
@@ -1,7 +1,7 @@
1
1
  import { n as o, C as v, c as g } from "./custom-element.fmLrnDZr.js";
2
2
  import { c as C } from "./component.styles.DtouHn2g.js";
3
3
  import { F as x, v as w } from "./form.BFLbw9Rz.js";
4
- import { L as $ } from "./i18n.C6c6_pqI.js";
4
+ import { L as $ } from "./i18n.1z3F6PhD.js";
5
5
  import { H as S, g as B } from "./slot.DJLm4Dig.js";
6
6
  import { w as m } from "./watch.BCJD77bD.js";
7
7
  import { r as h } from "./state.Dt9F_SuS.js";