@orangelogic/design-system 2.163.0 → 2.165.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 (62) hide show
  1. package/library/chunks/asset-link-format.ClaYu_v8.js +7 -0
  2. package/library/chunks/{asset-link-format.BdB6fQA_.js → asset-link-format.b3g80XdM.js} +689 -633
  3. package/library/chunks/{button.DGyqdBou.js → button.U0OBAsln.js} +1 -1
  4. package/library/chunks/button.styles.B81R4myI.js +5 -0
  5. package/library/chunks/{color-swatch-group.w5DMzNco.js → color-swatch-group.exfnb_Rr.js} +4574 -4175
  6. package/library/chunks/{confirm-popover.D8mdy6KG.js → confirm-popover.Dpoah4lQ.js} +1 -1
  7. package/library/chunks/{document-viewer.gyH0NGM5.js → document-viewer.CMZNXDup.js} +2 -2
  8. package/library/chunks/{folder-select.Dh4SX0eU.js → folder-select.Di32cpBd.js} +157 -137
  9. package/library/chunks/{pagination.qFmncShC.js → pagination.qpK3q6zm.js} +1 -1
  10. package/library/chunks/position-picker.DjnhxIKF.js +4 -0
  11. package/library/chunks/{tab-group.1Y71_aN8.js → tab-group.BUdxhjXK.js} +1 -1
  12. package/library/chunks/{toast.C5Ir5yKA.js → toast.CXEAfCvN.js} +1 -1
  13. package/library/chunks/transformation.8uLv6uwG.js +264 -0
  14. package/library/chunks/{tree.Dvnw_4vz.js → tree.vn5sHbdt.js} +120 -114
  15. package/library/components/asset-link-format.js +6 -5
  16. package/library/components/atoms.js +5 -5
  17. package/library/components/button.js +2 -2
  18. package/library/components/color-picker.js +1 -1
  19. package/library/components/color-swatch-group.js +3 -3
  20. package/library/components/confirm-popover.js +2 -2
  21. package/library/components/cropper.js +1 -1
  22. package/library/components/document-viewer.js +1 -1
  23. package/library/components/dynamic-select.js +1 -1
  24. package/library/components/element-clamp.js +1 -1
  25. package/library/components/file-on-demand.js +5 -5
  26. package/library/components/folder-select.js +2 -2
  27. package/library/components/line-clamp.js +1 -1
  28. package/library/components/masonry.js +74 -71
  29. package/library/components/molecules.js +2 -2
  30. package/library/components/organisms.js +2 -2
  31. package/library/components/pagination.js +2 -2
  32. package/library/components/position-picker.js +25 -25
  33. package/library/components/radio-button.js +1 -1
  34. package/library/components/tab-group.js +2 -2
  35. package/library/components/tree-item.js +1 -1
  36. package/library/components/tree.js +1 -1
  37. package/library/components/types.js +10516 -10514
  38. package/library/package.json +1 -1
  39. package/library/packages/atoms/src/components/button/button.d.ts +1 -0
  40. package/library/packages/atoms/src/components/tree/tree.d.ts +7 -1
  41. package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +11 -1
  42. package/library/packages/events/src/cx-folder-select-loading-change.d.ts +8 -0
  43. package/library/packages/events/src/events.d.ts +1 -0
  44. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +8 -0
  45. package/library/packages/hybrid/table-core/src/table/table.d.ts +155 -1
  46. package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +14 -0
  47. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/FrozenColumns/FrozenColumns.d.ts +14 -1
  48. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +18 -1
  49. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +7 -0
  50. package/library/packages/molecules/src/folder-select/folder-select.d.ts +7 -0
  51. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  52. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
  53. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +30 -0
  54. package/library/packages/types/src/asset-link-format.d.ts +19 -0
  55. package/library/packages/types/src/tree-item.d.ts +12 -0
  56. package/library/react-web-component.d.ts +15 -3
  57. package/library/utils.js +63 -64
  58. package/package.json +1 -1
  59. package/library/chunks/asset-link-format.QzzboHHE.js +0 -6
  60. package/library/chunks/button.styles.svc2lIwC.js +0 -5
  61. package/library/chunks/content-builder.BX4pHujE.js +0 -60
  62. package/library/chunks/transformation.D1alV_s4.js +0 -189
@@ -10,7 +10,7 @@ import { r as S } from "./state.CSDxrqLd.js";
10
10
  import { e as $ } from "./class-map.BiVq-cVR.js";
11
11
  import { c as x } from "./repeat.CFjcER6_.js";
12
12
  import { n as g } from "./when.Dr1es41R.js";
13
- import { C as w } from "./button.DGyqdBou.js";
13
+ import { C as w } from "./button.U0OBAsln.js";
14
14
  import { C as v } from "./input.DOorVTYZ.js";
15
15
  import { C as I } from "./option.DyNR1vzy.js";
16
16
  import B from "../components/select.js";
@@ -0,0 +1,4 @@
1
+ var e = /* @__PURE__ */ ((t) => (t.BottomCenter = "bottom-center", t.BottomLeft = "bottom-left", t.BottomRight = "bottom-right", t.CenterCenter = "center-center", t.CenterLeft = "center-left", t.CenterRight = "center-right", t.TopCenter = "top-center", t.TopLeft = "top-left", t.TopRight = "top-right", t))(e || {});
2
+ export {
3
+ e as P
4
+ };
@@ -17,7 +17,7 @@ import { i as Ji } from "./guard.D4axKaMo.js";
17
17
  import { o as tr } from "./map.D8heArFD.js";
18
18
  import { o as Ue } from "./style-map.llVFPd__.js";
19
19
  import { n as Pe } from "./when.Dr1es41R.js";
20
- import { C as Yn } from "./button.DGyqdBou.js";
20
+ import { C as Yn } from "./button.U0OBAsln.js";
21
21
  import Xn from "../components/dropdown.js";
22
22
  import { C as qn } from "./icon-button.BwmMJ0bI.js";
23
23
  import Gn from "../components/menu.js";
@@ -1,4 +1,4 @@
1
- import { D as f } from "./content-builder.BX4pHujE.js";
1
+ import { D as f } from "./transformation.8uLv6uwG.js";
2
2
  function h(n, e) {
3
3
  return n.filter((r, t) => t !== e);
4
4
  }
@@ -0,0 +1,264 @@
1
+ import { c as R } from "./capitalize.CIBKBL10.js";
2
+ import { C as s, T as h, U as M } from "./asset-link-format.ClaYu_v8.js";
3
+ import { P as u } from "./position-picker.DjnhxIKF.js";
4
+ const E = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
5
+ function K(t, f, r, C = E) {
6
+ const c = new URL(C + "/" + t);
7
+ return Array.isArray(r) ? r.forEach((o) => {
8
+ o[1] && c.searchParams.append(o[0], o[1]);
9
+ }) : r && Object.keys(r).forEach((o) => {
10
+ r[o] && c.searchParams.append(o, r[o]);
11
+ }), fetch(c, f);
12
+ }
13
+ const H = "space-default";
14
+ var L = /* @__PURE__ */ ((t) => (t.Desktop = "desktop", t.Mobile = "mobile", t.Tablet = "tablet", t))(L || {});
15
+ const p = {
16
+ canvasWidth: "",
17
+ height: "",
18
+ id: "desktop",
19
+ maxWidth: "",
20
+ name: R(
21
+ "desktop"
22
+ /* Desktop */
23
+ )
24
+ }, w = {
25
+ canvasWidth: "770px",
26
+ height: "",
27
+ id: "tablet",
28
+ maxWidth: "1280px",
29
+ name: R(
30
+ "tablet"
31
+ /* Tablet */
32
+ )
33
+ }, T = {
34
+ canvasWidth: "320px",
35
+ height: "",
36
+ id: "mobile",
37
+ maxWidth: "480px",
38
+ name: R(
39
+ "mobile"
40
+ /* Mobile */
41
+ )
42
+ }, Y = [p, w, T];
43
+ var S = /* @__PURE__ */ ((t) => (t.All = "ALL", t.CanDelete = "CanDelete", t.CanDownload = "CanDownload", t.CanFind = "CanFind", t.CanManageRights = "CanManageRights", t.CanMove = "CanMove", t.CanRead = "CanRead", t.CanReadAll = "CanReadAll", t.CanReadAndWrite = "CanReadAndWrite", t.CanReadLarge = "CanReadLarge", t.CanReadMedium = "CanReadMedium", t.CanReadOriginal = "CanReadOriginal", t.CanShare = "CanShare", t.CanUpload = "CanUpload", t.CanWrite = "CanWrite", t.None = "NONE", t))(S || {}), O = /* @__PURE__ */ ((t) => (t.All = "all", t.Audio = "audio", t.Image = "image", t.Other = "other", t.Video = "video", t))(O || {}), N = /* @__PURE__ */ ((t) => (t.Content = "content", t.Template = "template", t))(N || {}), B = /* @__PURE__ */ ((t) => (t.Administrator = "Administrator", t.Designer = "Designer", t.Editor = "Editor", t))(B || {}), x = /* @__PURE__ */ ((t) => (t.Accordion = "BlockAccordion", t.Analytics = "BlockAnalytics", t.Audio = "BlockAudio", t.Button = "BlockButton", t.Carousel = "BlockCarousel", t.ColorSwatches = "BlockColorSwatches", t.Column = "BlockCell", t.ColumnGroup = "BlockColumns", t.DamView = "BlockDamView", t.Divider = "BlockDivider", t.DocumentViewer = "BlockDocumentViewer", t.FontKit = "BlockFontKit", t.Gallery = "BlockGallery", t.Header = "BlockHeader", t.Image = "BlockImage", t.RichText = "BlockRichText", t.SearchBox = "BlockSearchBox", t.TabGroup = "BlockTabs", t.Text = "BlockText", t.Timeline = "BlockTimeline", t.Video = "BlockVideo", t))(x || {});
44
+ const z = Object.values(x).filter(
45
+ (t) => t !== "BlockCell"
46
+ /* Column */
47
+ );
48
+ var I = /* @__PURE__ */ ((t) => (t.Carousel = "carousel", t.Gallery = "gallery", t))(I || {}), W = /* @__PURE__ */ ((t) => (t.Templates = "TEMPLATES", t.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", t.TranslatableTexts = "TRANSLATABLE_TEXTS", t))(W || {});
49
+ const A = "/AssetLink/", D = {
50
+ [u.BottomCenter]: s.South,
51
+ [u.BottomLeft]: s.Southwest,
52
+ [u.BottomRight]: s.Southeast,
53
+ [u.CenterCenter]: s.Center,
54
+ [u.CenterLeft]: s.West,
55
+ [u.CenterRight]: s.East,
56
+ [u.TopCenter]: s.North,
57
+ [u.TopLeft]: s.Northwest,
58
+ [u.TopRight]: s.Northeast
59
+ };
60
+ function U({
61
+ asset: t,
62
+ baseUrl: f,
63
+ extension: r,
64
+ options: C,
65
+ parameters: c,
66
+ transformations: o,
67
+ useSession: v = ""
68
+ }) {
69
+ if (f == null)
70
+ return "";
71
+ let n = f;
72
+ const g = o?.findLast(
73
+ (l) => l.key === h.Quality
74
+ );
75
+ if (g && (o = [
76
+ ...o?.filter(
77
+ (l) => l.key !== h.Quality
78
+ ) || [],
79
+ g
80
+ ]), o) {
81
+ const l = [];
82
+ for (let e = 0; e < o.length; e++) {
83
+ const i = o[e];
84
+ if (i.key === h.Rotate) {
85
+ let a = i.value.rotation ?? 0;
86
+ for (; o[e + 1]?.key === h.Rotate; )
87
+ e++, a += o[e].value.rotation ?? 0;
88
+ a !== 0 && l.push({ key: h.Rotate, value: { rotation: a } });
89
+ } else
90
+ l.push(i);
91
+ }
92
+ o = l;
93
+ }
94
+ o && o.length > 0 && (n += "/t/"), o?.forEach(({ key: l, value: e }) => {
95
+ if (l === h.Resize) {
96
+ if (e.unit === M.AspectRatio && e.ratioWidth && e.ratioHeight) {
97
+ n += `re_ar_${e.ratioWidth}:${e.ratioHeight}/`;
98
+ return;
99
+ }
100
+ const i = [
101
+ ...[
102
+ {
103
+ key: "re_w_",
104
+ value: Math.round(e.width ?? 0)
105
+ },
106
+ {
107
+ key: "re_h_",
108
+ value: Math.round(e.height ?? 0)
109
+ }
110
+ ].filter((a) => a.value !== void 0).map((a) => ({
111
+ key: a.key,
112
+ value: Math.round(Number(a.value))
113
+ })),
114
+ {
115
+ key: "re_rm_",
116
+ value: "stretch"
117
+ }
118
+ ];
119
+ i.forEach(({ key: a, value: d }, m) => {
120
+ n += `${a}${d}${m < i.length - 1 ? "," : ""}`;
121
+ }), n += "/";
122
+ }
123
+ if (l === h.Crop) {
124
+ const i = e.unit === M.AspectRatio && !!e.ratioWidth && !!e.ratioHeight, a = !e.disabledSize && !i, d = a && (e.x !== void 0 || e.y !== void 0), m = [
125
+ ...[
126
+ {
127
+ key: "c_",
128
+ value: e.mode
129
+ },
130
+ ...i ? [
131
+ {
132
+ key: "ar_",
133
+ value: `${e.ratioWidth}:${e.ratioHeight}`
134
+ }
135
+ ] : [],
136
+ ...a ? [
137
+ {
138
+ key: "c_w_",
139
+ value: Math.round(e.width ?? 0)
140
+ },
141
+ {
142
+ key: "c_h_",
143
+ value: Math.round(e.height ?? 0)
144
+ },
145
+ {
146
+ key: "c_x_",
147
+ value: Math.round(e.x ?? 0) === 0 && C?.omitZeroXY ? void 0 : Math.round(e.x ?? 0)
148
+ },
149
+ {
150
+ key: "c_y_",
151
+ value: Math.round(e.y ?? 0) === 0 && C?.omitZeroXY ? void 0 : Math.round(e.y ?? 0)
152
+ }
153
+ ] : [],
154
+ ...!d && e.focusMode && e.focusMode !== "manual" ? [
155
+ {
156
+ key: e.isFocusModeAuto ? "acm_" : "c_g_",
157
+ value: e.focusMode
158
+ }
159
+ ] : [],
160
+ ...!d && e.focusMode === "manual" && e.position ? [
161
+ {
162
+ key: "c_g_",
163
+ value: D[e.position]
164
+ }
165
+ ] : []
166
+ ].filter((_) => _.value !== void 0 && _.value !== null).map((_) => ({
167
+ key: _.key,
168
+ value: _.value
169
+ })),
170
+ ...i ? [] : [
171
+ {
172
+ key: "c_whu_",
173
+ value: "pixel"
174
+ }
175
+ ]
176
+ ];
177
+ m.forEach(({ key: _, value: $ }, y) => {
178
+ const b = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(_);
179
+ n += `${_}${b ? Math.round(Number($)) : $}${y < m.length - 1 ? "," : ""}`;
180
+ }), n += "/";
181
+ }
182
+ if (l === h.Rotate && ([
183
+ {
184
+ key: "r_a_",
185
+ value: e.rotation
186
+ }
187
+ ].filter((a) => a.value !== void 0).map((a) => ({
188
+ key: a.key,
189
+ value: Math.round(Number(a.value))
190
+ })).forEach(({ key: a, value: d }) => {
191
+ n += `${a}${d}`;
192
+ }), n += "/"), l === h.Quality) {
193
+ const i = [
194
+ {
195
+ key: "q_level_",
196
+ value: e.quality
197
+ }
198
+ ].filter((a) => a.value !== void 0).map((a) => ({
199
+ key: a.key,
200
+ value: Math.round(Number(a.value))
201
+ }));
202
+ i.forEach(({ key: a, value: d }, m) => {
203
+ n += `${a}${d}${m < i.length - 1 ? "," : ""}`;
204
+ }), n += "/";
205
+ }
206
+ if (l === h.Metadata) {
207
+ const i = [
208
+ {
209
+ key: "fl_keep_metadata",
210
+ value: e.keepMetadata
211
+ }
212
+ ].filter((a) => a.value !== void 0).map((a) => ({ key: a.key, value: a.value }));
213
+ i.forEach(({ key: a }, d) => {
214
+ n += `${a}${d < i.length - 1 ? "," : ""}`;
215
+ }), n += "/";
216
+ }
217
+ }), r && (n += `${t?.identifier ?? crypto.randomUUID()}${r}`);
218
+ const k = [];
219
+ return c && c.length > 0 && c.forEach(({ key: l, value: e }) => {
220
+ k.push(
221
+ `${encodeURIComponent(l.trim())}=${encodeURIComponent(e.trim())}`
222
+ );
223
+ }), f && v && k.push(`UseSession=${encodeURIComponent(v)}`), k.length > 0 && (n += `?${k.join("&")}`), n.endsWith("/") && (n = n.slice(0, -1)), n;
224
+ }
225
+ function Q(t, f) {
226
+ if (!t || !f?.length)
227
+ return t;
228
+ const r = U({ baseUrl: "", transformations: f }).replace(
229
+ /\/t\//g,
230
+ ""
231
+ );
232
+ if (!r)
233
+ return t;
234
+ const C = t.indexOf(A);
235
+ if (C < 0)
236
+ return `${t}/t/${r}`;
237
+ const c = t.slice(0, C + A.length), o = t.slice(C + A.length), v = o.indexOf("/t/");
238
+ if (v >= 0) {
239
+ const g = o.slice(0, v);
240
+ return `${c}${g}/t/${r}`;
241
+ }
242
+ const n = o.indexOf("/");
243
+ if (n >= 0) {
244
+ const g = o.slice(0, n), k = o.slice(n);
245
+ return `${c}${g}/t/${r}${k}`;
246
+ }
247
+ return `${t}/t/${r}`;
248
+ }
249
+ export {
250
+ O as A,
251
+ x as B,
252
+ L as D,
253
+ N as E,
254
+ S as P,
255
+ H as S,
256
+ B as T,
257
+ Q as a,
258
+ U as b,
259
+ I as c,
260
+ W as d,
261
+ z as e,
262
+ K as f,
263
+ Y as g
264
+ };