@orangelogic/design-system 2.0.0-41YQXP-beta-4 → 2.0.0-41YQXP-beta-6

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 (125) hide show
  1. package/library/chunks/{asset.CwLi2VK5.js → asset.DkXWJm8N.js} +282 -276
  2. package/library/chunks/{button.BlrwRfoe.js → button.BwiN1adk.js} +1 -1
  3. package/library/chunks/{color-swatch-group.BWonzcak.js → color-swatch-group.CGGlM9xb.js} +4 -4
  4. package/library/chunks/{color-swatch.qN3f-eUE.js → color-swatch.C3f5gtrh.js} +2 -2
  5. package/library/chunks/{confirm-popover.Dlq0y4mo.js → confirm-popover.NtuGhpSI.js} +3 -3
  6. package/library/chunks/{cropper.DkAY9rRa.js → cropper.CoAIqBtu.js} +1 -1
  7. package/library/chunks/{dam-view.C_6NxisN.js → dam-view.BNkaYDSl.js} +1975 -1577
  8. package/library/chunks/{dialog.DckpRn2u.js → dialog.CUsLuv9g.js} +2 -2
  9. package/library/chunks/{dot-pagination.DJ7_eyVK.js → dot-pagination.DvkAdnET.js} +1 -1
  10. package/library/chunks/{file-on-demand.DuAumwPi.js → file-on-demand.CeoeNjnL.js} +92 -70
  11. package/library/chunks/{flow.NfsQcLjS.js → flow.4noVh_a2.js} +1 -1
  12. package/library/chunks/{folder-select.BXyT0djA.js → folder-select.BOpbC--Y.js} +65 -58
  13. package/library/chunks/format-time.CrsUl9KV.js +226 -0
  14. package/library/chunks/{header.g89doin5.js → header.C2_Odo1D.js} +1 -1
  15. package/library/chunks/{i18n.DogXZvuQ.js → i18n.8k6MtL9U.js} +15 -10
  16. package/library/chunks/{iframe.BFXe21hH.js → iframe.QyPiA8Bz.js} +1 -1
  17. package/library/chunks/{image.BKCubyu4.js → image.4Vv6Vs6G.js} +2 -2
  18. package/library/chunks/{list-editor.CH-ZztC0.js → list-editor.DX4bV5jO.js} +7 -7
  19. package/library/chunks/{number.CjNxU7Xs.js → number.DlRdV-Xp.js} +14 -10
  20. package/library/chunks/{option.CvNBtF7x.js → option.BGfkVjPf.js} +1 -1
  21. package/library/chunks/{popup.DlHu7URi.js → popup.CGRTS4na.js} +1 -1
  22. package/library/chunks/{select.BPb4taq3.js → select.DFh8LwUb.js} +3 -3
  23. package/library/chunks/{tab-group.BaxkAA_N.js → tab-group.DKdcptXU.js} +2 -3
  24. package/library/chunks/{table.WhTbERib.js → table.CexJn-hk.js} +5 -4
  25. package/library/chunks/{timecode.JXq1Wa4q.js → timecode.xUG0Gk6T.js} +31 -26
  26. package/library/chunks/{tree.BlfqDDc8.js → tree.BHYbwoX9.js} +1 -1
  27. package/library/components/alert.js +1 -1
  28. package/library/components/asset-link-format.js +65 -65
  29. package/library/components/atoms.js +32 -32
  30. package/library/components/border-input-group.js +1 -1
  31. package/library/components/breadcrumb.js +1 -1
  32. package/library/components/button.js +2 -2
  33. package/library/components/checkbox.js +1 -4
  34. package/library/components/color-picker.js +3 -3
  35. package/library/components/color-swatch-group.js +5 -5
  36. package/library/components/color-swatch.js +3 -3
  37. package/library/components/confirm-popover.js +4 -4
  38. package/library/components/copy-button.js +1 -1
  39. package/library/components/corner-position-input-group.js +3 -3
  40. package/library/components/cropper.js +1 -1
  41. package/library/components/dam-view.js +7 -4
  42. package/library/components/details.js +1 -1
  43. package/library/components/dialog.js +3 -3
  44. package/library/components/dot-pagination.js +2 -2
  45. package/library/components/drawer.js +1 -1
  46. package/library/components/dropdown.js +2 -2
  47. package/library/components/dynamic-select.js +5 -5
  48. package/library/components/element-clamp.js +2 -2
  49. package/library/components/file-on-demand.js +11 -11
  50. package/library/components/folder-select.js +4 -4
  51. package/library/components/format-bytes.js +1 -1
  52. package/library/components/format-date.js +1 -1
  53. package/library/components/format-number.js +1 -1
  54. package/library/components/format-time.js +9 -221
  55. package/library/components/header.js +2 -2
  56. package/library/components/icon-button.js +1 -1
  57. package/library/components/iframe.js +2 -2
  58. package/library/components/image-comparer.js +1 -1
  59. package/library/components/image.js +3 -3
  60. package/library/components/input.js +1 -1
  61. package/library/components/line-clamp.js +2 -2
  62. package/library/components/list-editor.js +6 -6
  63. package/library/components/masonry.js +1 -1
  64. package/library/components/menu-item.js +2 -2
  65. package/library/components/menu.js +1 -1
  66. package/library/components/molecules.js +5 -5
  67. package/library/components/option.js +2 -2
  68. package/library/components/organisms.js +3 -3
  69. package/library/components/pagination.js +4 -4
  70. package/library/components/popup.js +2 -2
  71. package/library/components/position-picker.js +1 -1
  72. package/library/components/progress-bar.js +1 -1
  73. package/library/components/progress-ring.js +1 -1
  74. package/library/components/range.js +2 -2
  75. package/library/components/rating.js +1 -1
  76. package/library/components/relative-time.js +1 -1
  77. package/library/components/select.js +4 -4
  78. package/library/components/share-option-list.js +1 -1
  79. package/library/components/size-input-group.js +2 -2
  80. package/library/components/spinner.js +1 -1
  81. package/library/components/split-panel.js +1 -1
  82. package/library/components/tab-group.js +3 -3
  83. package/library/components/tab.js +13 -14
  84. package/library/components/table.js +2 -2
  85. package/library/components/tag.js +1 -1
  86. package/library/components/timecode.js +1 -1
  87. package/library/components/tooltip.js +2 -2
  88. package/library/components/tree-item.js +2 -2
  89. package/library/components/tree.js +2 -2
  90. package/library/components/typeface.js +1 -1
  91. package/library/components/types.js +16389 -16315
  92. package/library/components/video.js +2 -2
  93. package/library/package.json +3 -3
  94. package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +1 -2
  95. package/library/packages/atoms/src/components/timecode/timecode.d.ts +4 -0
  96. package/library/packages/events/src/cx-clear-upload.d.ts +6 -0
  97. package/library/packages/events/src/cx-dam-view-asset-tracking-parameters-change.d.ts +10 -0
  98. package/library/packages/events/src/cx-dam-view-control-sort-order-change.d.ts +2 -5
  99. package/library/packages/events/src/cx-dam-view-control-view-change.d.ts +3 -1
  100. package/library/packages/events/src/cx-dam-view-favorite-change.d.ts +13 -0
  101. package/library/packages/events/src/cx-dam-view-request-change.d.ts +12 -0
  102. package/library/packages/events/src/events.d.ts +4 -0
  103. package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +49 -0
  104. package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.styles.d.ts +2 -0
  105. package/library/packages/molecules/src/index.d.ts +1 -0
  106. package/library/packages/organisms/src/dam-view/components/dam-view-asset-proxy-selector/dam-view-asset-proxy-selector.d.ts +10 -1
  107. package/library/packages/organisms/src/dam-view/components/dam-view-asset-tracking-parameters/dam-view-asset-tracking-parameters.d.ts +40 -0
  108. package/library/packages/organisms/src/dam-view/components/dam-view-asset-tracking-parameters/dam-view-asset-tracking-parameters.styles.d.ts +2 -0
  109. package/library/packages/organisms/src/dam-view/components/dam-view-browser/dam-view-browser.d.ts +1 -0
  110. package/library/packages/organisms/src/dam-view/components/dam-view-control-bar/dam-view-control-bar.d.ts +3 -2
  111. package/library/packages/organisms/src/dam-view/components/dam-view-control-sort/dam-view-control-sort.d.ts +2 -3
  112. package/library/packages/organisms/src/dam-view/components/dam-view-format-dialog/dam-view-format-dialog.d.ts +47 -1
  113. package/library/packages/organisms/src/dam-view/components/dam-view-grid/dam-view-grid.d.ts +5 -0
  114. package/library/packages/organisms/src/dam-view/dam-view.d.ts +37 -3
  115. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +1 -0
  116. package/library/packages/services/src/api/asset/asset.d.ts +3 -2
  117. package/library/packages/services/src/api/folder/folder.d.ts +4 -1
  118. package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
  119. package/library/packages/tools/src/fetch-and-merge-assets/fetch-and-merge-assets.d.ts +23 -4
  120. package/library/packages/types/src/asset.d.ts +14 -1
  121. package/library/packages/types/src/folder-select.d.ts +2 -0
  122. package/library/packages/utils/src/custom-element/i18n.d.ts +5 -0
  123. package/library/packages/utils/src/number/number.d.ts +1 -0
  124. package/library/react-web-component.d.ts +94 -4
  125. package/package.json +3 -3
@@ -1,86 +1,86 @@
1
- import { h as n, A as T, a as M } from "./endpoints.GjTwS_Dr.js";
2
- import { T as S } from "./asset-link-format.DovuGPoa.js";
3
- const j = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
4
- function B(t, r, s, e = j) {
5
- const i = new URL(e + "/" + t);
6
- return Array.isArray(s) ? s.forEach((d) => {
7
- d[1] && i.searchParams.append(d[0], d[1]);
8
- }) : s && Object.keys(s).forEach((d) => {
9
- s[d] && i.searchParams.append(d, s[d]);
10
- }), fetch(i, r);
1
+ import { h as n, A as E, a as j } from "./endpoints.GjTwS_Dr.js";
2
+ import { T as R } from "./asset-link-format.DovuGPoa.js";
3
+ const $ = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
4
+ function B(s, t, o, e = $) {
5
+ const i = new URL(e + "/" + s);
6
+ return Array.isArray(o) ? o.forEach((l) => {
7
+ l[1] && i.searchParams.append(l[0], l[1]);
8
+ }) : o && Object.keys(o).forEach((l) => {
9
+ o[l] && i.searchParams.append(l, o[l]);
10
+ }), fetch(i, t);
11
11
  }
12
- const k = (t, r) => {
12
+ const x = (s, t) => {
13
13
  try {
14
14
  window.Matrix3?.ShowNotification && window.Matrix3.ShowNotification(
15
- t,
16
- r ? {
17
- notificationType: r.notificationType
15
+ s,
16
+ t ? {
17
+ notificationType: t.notificationType
18
18
  } : void 0
19
19
  );
20
20
  } catch {
21
21
  return;
22
22
  }
23
- }, R = "CoreField.LargeSizePreview", V = "AllowATSLink", $ = "Document.CaptionLong", q = "Document.Title", L = "CoreField.DocType", g = "Document.FileExtension", C = "CoreField.FileSize", O = "CoreField.Identifier", v = "CoreField.Keywords", N = "CoreField.MaxHeight", G = "CoreField.MaxWidth", F = "CoreField.OriginalFileName", b = "Document.RecordID", W = "ScrubURL", x = "CoreField.S6_StorageGroup", U = "CoreField.DocSubType", w = "CoreField.TitleWithFallback", D = "CoreField.UpdatedFileName", I = "CoreField.OriginalPreview";
24
- function P(t) {
25
- return !t || Object.keys(t).length === 0 ? {} : Object.entries(t).reduce(
26
- (r, [s, e]) => !e || e.length === 0 ? r : s === "Types" ? {
27
- ...r,
23
+ }, L = "CoreField.LargeSizePreview", V = "AllowATSLink", q = "Document.CaptionLong", W = "Document.Title", g = "CoreField.DocType", C = "Document.FileExtension", O = "CoreField.FileSize", v = "CoreField.Identifier", N = "CoreField.Keywords", G = "CoreField.MaxHeight", U = "CoreField.MaxWidth", S = "CoreField.OriginalFileName", b = "Document.RecordID", H = "ScrubURL", P = "CoreField.S6_StorageGroup", k = "CoreField.DocSubType", w = "CoreField.TitleWithFallback", D = "CoreField.UpdatedFileName", F = "CoreField.OriginalPreview";
24
+ function M(s) {
25
+ return !s || Object.keys(s).length === 0 ? {} : Object.entries(s).reduce(
26
+ (t, [o, e]) => !e || e.length === 0 ? t : o === "Types" ? {
27
+ ...t,
28
28
  SubtypeCriteria: e
29
29
  } : {
30
- ...r,
30
+ ...t,
31
31
  FacetFilters: {
32
- ...r.FacetFilters,
33
- [s]: e
32
+ ...t.FacetFilters,
33
+ [o]: e
34
34
  }
35
35
  },
36
36
  {}
37
37
  );
38
38
  }
39
- function H(t) {
40
- return t && typeof t == "object" && "ErrorCode" in t;
39
+ function z(s) {
40
+ return s && typeof s == "object" && "ErrorCode" in s;
41
41
  }
42
- async function X({
43
- assets: t,
44
- extension: r,
45
- extraFields: s,
42
+ async function Y({
43
+ assets: s,
44
+ extension: t,
45
+ extraFields: o,
46
46
  parameters: e,
47
47
  permanentLink: i,
48
- proxyPreference: d,
48
+ proxyPreference: l,
49
49
  transformations: u
50
50
  }) {
51
- const y = {}, _ = t.length === 1;
51
+ const y = {}, _ = s.length === 1;
52
52
  try {
53
- return (await Promise.all(t.map((c) => n.request({
53
+ return (await Promise.all(s.map((d) => n.request({
54
54
  method: "GET",
55
55
  params: {
56
- ExtraFields: s,
56
+ ExtraFields: o,
57
57
  GenerateAssetUrl: !i,
58
58
  Parameters: e,
59
- Proxy: d,
60
- RecordId: c.recordId
59
+ Proxy: l,
60
+ RecordId: d.recordId
61
61
  },
62
62
  paramsSerializer: {
63
63
  indexes: null
64
64
  },
65
65
  transformResponse: [
66
66
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
67
- (l) => {
68
- if (H(l))
69
- return _ && (y[l.ErrorCode] ? y[l.ErrorCode].push(c) : y[l.ErrorCode] = [c]), {
70
- imageUrl: c.imageUrl
67
+ (T) => {
68
+ if (z(T))
69
+ return _ && (y[T.ErrorCode] ? y[T.ErrorCode].push(d) : y[T.ErrorCode] = [d]), {
70
+ imageUrl: d.imageUrl
71
71
  };
72
- let o = i || l.imageUrl;
73
- return u && u.length > 0 && (o += "/t/"), u?.forEach(({ key: p, value: E }) => {
74
- if (p === S.Resize) {
75
- const f = [
72
+ let r = i || T.imageUrl;
73
+ u && u.length > 0 && (r += "/t/"), u?.forEach(({ key: m, value: p }) => {
74
+ if (m === R.Resize) {
75
+ const c = [
76
76
  ...[
77
77
  {
78
78
  key: "re_w_",
79
- value: E.width
79
+ value: p.width
80
80
  },
81
81
  {
82
82
  key: "re_h_",
83
- value: E.height
83
+ value: p.height
84
84
  }
85
85
  ].filter((a) => a.value !== void 0).map((a) => ({
86
86
  key: a.key,
@@ -91,28 +91,28 @@ async function X({
91
91
  value: "stretch"
92
92
  }
93
93
  ];
94
- f.forEach(({ key: a, value: h }, A) => {
95
- o += `${a}${h}${A < f.length - 1 ? "," : ""}`;
96
- }), o += "/";
94
+ c.forEach(({ key: a, value: I }, A) => {
95
+ r += `${a}${I}${A < c.length - 1 ? "," : ""}`;
96
+ }), r += "/";
97
97
  }
98
- if (p === S.Crop) {
99
- const f = [
98
+ if (m === R.Crop) {
99
+ const c = [
100
100
  ...[
101
101
  {
102
102
  key: "c_w_",
103
- value: E.width
103
+ value: p.width
104
104
  },
105
105
  {
106
106
  key: "c_h_",
107
- value: E.height
107
+ value: p.height
108
108
  },
109
109
  {
110
110
  key: "c_x_",
111
- value: E.x
111
+ value: p.x
112
112
  },
113
113
  {
114
114
  key: "c_y_",
115
- value: E.y
115
+ value: p.y
116
116
  }
117
117
  ].filter((a) => a.value !== void 0).map((a) => ({
118
118
  key: a.key,
@@ -123,53 +123,57 @@ async function X({
123
123
  value: "pixel"
124
124
  }
125
125
  ];
126
- f.forEach(({ key: a, value: h }, A) => {
127
- o += `${a}${h}${A < f.length - 1 ? "," : ""}`;
128
- }), o += "/";
126
+ c.forEach(({ key: a, value: I }, A) => {
127
+ r += `${a}${I}${A < c.length - 1 ? "," : ""}`;
128
+ }), r += "/";
129
129
  }
130
- if (p === S.Rotate) {
131
- const f = [{
130
+ if (m === R.Rotate) {
131
+ const c = [{
132
132
  key: "r_a_",
133
- value: E.rotation
133
+ value: p.rotation
134
134
  }].filter((a) => a.value !== void 0).map((a) => ({ key: a.key, value: Math.round(Number(a.value)) }));
135
- f.forEach(({ key: a, value: h }, A) => {
136
- o += `${a}${h}${A < f.length - 1 ? "," : ""}`;
137
- }), o += "/";
135
+ c.forEach(({ key: a, value: I }, A) => {
136
+ r += `${a}${I}${A < c.length - 1 ? "," : ""}`;
137
+ }), r += "/";
138
138
  }
139
- if (p === S.Quality) {
140
- const f = [{
139
+ if (m === R.Quality) {
140
+ const c = [{
141
141
  key: "q_level_",
142
- value: E.quality
142
+ value: p.quality
143
143
  }].filter((a) => a.value !== void 0).map((a) => ({ key: a.key, value: Math.round(Number(a.value)) }));
144
- f.forEach(({ key: a, value: h }, A) => {
145
- o += `${a}${h}${A < f.length - 1 ? "," : ""}`;
146
- }), o += "/";
144
+ c.forEach(({ key: a, value: I }, A) => {
145
+ r += `${a}${I}${A < c.length - 1 ? "," : ""}`;
146
+ }), r += "/";
147
147
  }
148
- if (p === S.Metadata) {
149
- const f = [{
148
+ if (m === R.Metadata) {
149
+ const c = [{
150
150
  key: "fl_keep_metadata",
151
- value: E.keepMetadata
151
+ value: p.keepMetadata
152
152
  }].filter((a) => a.value !== void 0).map((a) => ({ key: a.key, value: a.value }));
153
- f.forEach(({ key: a }, h) => {
154
- o += `${a}${h < f.length - 1 ? "," : ""}`;
155
- }), o += "/";
153
+ c.forEach(({ key: a }, I) => {
154
+ r += `${a}${I < c.length - 1 ? "," : ""}`;
155
+ }), r += "/";
156
156
  }
157
- }), u && u.length > 0 && (o += `${c.identifier}`), i || (o += `${r ?? c.extension}`), {
158
- ...l,
159
- imageUrl: o
157
+ }), u && u.length > 0 && (r += `${d.identifier}`), i || (r += `${t ?? d.extension}`);
158
+ const f = [];
159
+ return e && e.length > 0 && e.forEach(({ key: m, value: p }) => {
160
+ f.push(`${encodeURIComponent(m.trim())}=${encodeURIComponent(p.trim())}`);
161
+ }), f.length > 0 && (r += `?${f.join("&")}`), {
162
+ ...T,
163
+ imageUrl: r
160
164
  };
161
165
  }
162
166
  ],
163
- url: T.GET_ASSET_LINK
164
- })))).map((c) => c.data);
167
+ url: E.GET_ASSET_LINK
168
+ })))).map((d) => d.data);
165
169
  } catch {
166
170
  return [];
167
171
  }
168
172
  }
169
- async function Y({
170
- assetId: t,
171
- extension: r,
172
- format: s,
173
+ async function Z({
174
+ assetId: s,
175
+ extension: t,
176
+ format: o,
173
177
  siteUrl: e,
174
178
  transformations: i
175
179
  }) {
@@ -178,9 +182,9 @@ async function Y({
178
182
  baseURL: e,
179
183
  method: "GET",
180
184
  params: {
181
- SourceAssetFormat: s,
182
- SourceAssetRecordID: t,
183
- TargetExtension: r,
185
+ SourceAssetFormat: o,
186
+ SourceAssetRecordID: s,
187
+ TargetExtension: t,
184
188
  Transformations: i && i.length > 0 ? i : void 0
185
189
  },
186
190
  /**
@@ -188,31 +192,31 @@ async function Y({
188
192
  */
189
193
  timeout: 3e5,
190
194
  // 5 minutes
191
- url: T.GET_TRANSFORM_ASSET_LINK
195
+ url: E.GET_TRANSFORM_ASSET_LINK
192
196
  })).data;
193
197
  } catch {
194
198
  return null;
195
199
  }
196
200
  }
197
- async function Z({
198
- extraFields: t,
199
- recordIds: r
201
+ async function Q({
202
+ extraFields: s,
203
+ recordIds: t
200
204
  }) {
201
- if (!Array.isArray(r) || r.length === 0)
205
+ if (!Array.isArray(t) || t.length === 0)
202
206
  return { facets: [], items: [], totalCount: 0 };
203
- const s = t?.filter((e) => e && typeof e == "string") ?? [];
207
+ const o = s?.filter((e) => e && typeof e == "string") ?? [];
204
208
  try {
205
209
  return (await n.request({
206
210
  method: "GET",
207
211
  params: {
208
- ExtraFilters: `RecordID:${r.join(" OR ")}`,
212
+ ExtraFilters: `RecordID:${t.join(" OR ")}`,
209
213
  Fields: [
210
- ...s,
211
- I,
212
- D,
214
+ ...o,
213
215
  F,
214
- q,
215
- $
216
+ D,
217
+ S,
218
+ W,
219
+ q
216
220
  ],
217
221
  SeeThru: !0
218
222
  },
@@ -223,29 +227,29 @@ async function Z({
223
227
  transformResponse: [
224
228
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
225
229
  (i) => {
226
- const d = i.contentItems?.map((u) => {
230
+ const l = i.contentItems?.map((u) => {
227
231
  let y = u.fields[D] ?? "";
228
- return y === "" && (y = u.fields[F] ?? ""), {
232
+ return y === "" && (y = u.fields[S] ?? ""), {
229
233
  name: y,
230
- originalUrl: u.fields[I] ?? "",
234
+ originalUrl: u.fields[F] ?? "",
231
235
  recordId: u.recordID,
232
- ...s.reduce(
233
- (_, m) => (_[m] = u.fields[m] ?? "", _),
236
+ ...o.reduce(
237
+ (_, h) => (_[h] = u.fields[h] ?? "", _),
234
238
  {}
235
239
  )
236
240
  };
237
241
  }) ?? [];
238
- return d.sort((u, y) => {
239
- const _ = r.indexOf(u.recordId), m = r.indexOf(y.recordId);
240
- return _ - m;
242
+ return l.sort((u, y) => {
243
+ const _ = t.indexOf(u.recordId), h = t.indexOf(y.recordId);
244
+ return _ - h;
241
245
  }), {
242
246
  facets: i.facets,
243
- items: d,
247
+ items: l,
244
248
  totalCount: i.totalCount
245
249
  };
246
250
  }
247
251
  ],
248
- url: T.GET_CONTENT_V1
252
+ url: E.GET_CONTENT_V1
249
253
  })).data;
250
254
  } catch {
251
255
  return {
@@ -255,47 +259,47 @@ async function Z({
255
259
  };
256
260
  }
257
261
  }
258
- async function Q({
259
- extraFields: t,
260
- folderId: r,
261
- limit: s,
262
+ async function J({
263
+ extraFields: s,
264
+ folderId: t,
265
+ limit: o,
262
266
  limitedDocTypes: e,
263
267
  searchTerm: i,
264
- seeThrough: d,
268
+ seeThrough: l,
265
269
  selectedFacets: u,
266
270
  sortOrder: y,
267
271
  start: _
268
272
  }) {
269
- const m = (t?.filter((c) => c && typeof c == "string") ?? []).map((c) => c.replace("%20", " "));
273
+ const h = (s?.filter((d) => d && typeof d == "string") ?? []).map((d) => d.replace("%20", " "));
270
274
  try {
271
275
  return (await n.request({
272
276
  method: "GET",
273
277
  params: {
274
278
  Fields: [
275
- ...m,
279
+ ...h,
276
280
  w,
277
- R,
278
- I,
279
- v,
280
- G,
281
- N,
282
- C,
283
281
  L,
282
+ F,
283
+ N,
284
284
  U,
285
+ G,
285
286
  O,
286
287
  g,
288
+ k,
289
+ v,
290
+ C,
287
291
  b,
288
- F,
292
+ S,
289
293
  D
290
294
  ],
291
- Limit: s,
295
+ Limit: o,
292
296
  LimitedToDocTypes: e.length > 0 ? e : void 0,
293
- ObjectRecordID: r,
297
+ ObjectRecordID: t,
294
298
  OrderBy: y || void 0,
295
299
  SearchTerm: i || void 0,
296
- SeeThru: d,
300
+ SeeThru: l,
297
301
  Start: _,
298
- ...P(u)
302
+ ...M(u)
299
303
  },
300
304
  paramsSerializer: {
301
305
  indexes: null
@@ -303,34 +307,34 @@ async function Q({
303
307
  responseType: "json",
304
308
  transformResponse: [
305
309
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
306
- (l) => ({
307
- facets: l.facets,
308
- items: l.contentItems?.map((o) => {
309
- let p = o.fields[g] ?? "", E = o.fields[D] ?? "", f = o.fields[R] ?? "";
310
- return p && !p.startsWith(".") && (p = "." + p), E === "" && (E = o.fields[F] ?? ""), p.toLowerCase() === ".gif" && (f = o.fields[I] ?? ""), {
311
- docSubType: o.fields[U] ?? "",
312
- docType: o.fields[L] ?? "",
313
- extension: p,
314
- height: o.fields[N] ?? "0",
315
- id: o.recordID,
316
- identifier: o.fields[O] ?? "",
317
- imageUrl: f,
318
- name: E ?? "",
319
- originalUrl: o.fields[I] ?? "",
320
- recordId: o.fields[b] ?? "",
321
- size: o.fields[C] ?? "0 MB",
322
- tags: o.fields[v] ?? "",
323
- width: o.fields[G] ?? "0",
324
- ...m.reduce(
325
- (a, h) => (a[h] = o.fields[h] ?? "", a),
310
+ (T) => ({
311
+ facets: T.facets,
312
+ items: T.contentItems?.map((r) => {
313
+ let f = r.fields[C] ?? "", m = r.fields[D] ?? "", p = r.fields[L] ?? "";
314
+ return f && !f.startsWith(".") && (f = "." + f), m === "" && (m = r.fields[S] ?? ""), f.toLowerCase() === ".gif" && (p = r.fields[F] ?? ""), {
315
+ docSubType: r.fields[k] ?? "",
316
+ docType: r.fields[g] ?? "",
317
+ extension: f,
318
+ height: r.fields[G] ?? "0",
319
+ id: r.recordID,
320
+ identifier: r.fields[v] ?? "",
321
+ imageUrl: p,
322
+ name: m ?? "",
323
+ originalUrl: r.fields[F] ?? "",
324
+ recordId: r.fields[b] ?? "",
325
+ size: r.fields[O] ?? "0 MB",
326
+ tags: r.fields[N] ?? "",
327
+ width: r.fields[U] ?? "0",
328
+ ...h.reduce(
329
+ (c, a) => (c[a] = r.fields[a] ?? "", c),
326
330
  {}
327
331
  )
328
332
  };
329
333
  }) ?? [],
330
- totalCount: l.totalCount
334
+ totalCount: T.totalCount
331
335
  })
332
336
  ],
333
- url: T.GET_CONTENT_V2
337
+ url: E.GET_CONTENT_V2
334
338
  })).data;
335
339
  } catch {
336
340
  return {
@@ -340,21 +344,21 @@ async function Q({
340
344
  };
341
345
  }
342
346
  }
343
- async function J({
344
- folderId: t,
345
- isSeeThrough: r,
346
- limitedToDocTypes: s = [],
347
+ async function ee({
348
+ folderId: s,
349
+ isSeeThrough: t,
350
+ limitedToDocTypes: o = [],
347
351
  pageSize: e,
348
352
  searchText: i,
349
- selectedFacets: d,
353
+ selectedFacets: l,
350
354
  sortOrder: u,
351
- start: y
355
+ start: y,
356
+ useSession: _
352
357
  }) {
353
358
  try {
354
359
  return (await n.request({
355
360
  data: {
356
361
  Fields: [
357
- R,
358
362
  L,
359
363
  g,
360
364
  C,
@@ -362,58 +366,60 @@ async function J({
362
366
  v,
363
367
  N,
364
368
  G,
365
- F,
366
- b,
367
369
  U,
370
+ S,
371
+ b,
372
+ k,
368
373
  w,
369
374
  D,
370
- x,
371
- I
375
+ P,
376
+ F
372
377
  ],
373
378
  Limit: e || void 0,
374
- LimitedToDocTypes: s,
375
- ObjectRecordID: t || void 0,
379
+ LimitedToDocTypes: o,
380
+ ObjectRecordID: s || void 0,
376
381
  OrderBy: u,
377
- SeeThru: r || void 0,
378
- SelectedFacets: d,
382
+ SeeThru: t || void 0,
383
+ SelectedFacets: l,
379
384
  Start: y,
380
385
  Text: i,
381
- ...P(d)
386
+ UseSession: _ || void 0,
387
+ ...M(l)
382
388
  },
383
389
  method: "POST",
384
390
  transformResponse: [
385
391
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
386
- (m) => {
387
- const c = m.contentItems?.map((l) => {
388
- let o = l.fields[g] ?? "";
389
- const p = l.fields[F];
390
- return o && !o.startsWith(".") && (o = "." + o), {
391
- allowATSLink: l.fields[V] === "True",
392
- docSubType: l.fields[U] ?? "",
393
- docType: l.fields[L] ?? "",
394
- extension: o,
395
- height: l.fields[N] ?? "0",
396
- id: l.recordID,
397
- identifier: l.fields[O] ?? "",
398
- imageUrl: l.fields[R] ?? "",
399
- inColdStorage: l.fields[x] === "Cold Storage",
400
- name: p ?? "",
401
- originalUrl: l.fields[I] ?? "",
402
- recordId: l.fields[b] ?? "",
403
- scrubUrl: l.fields[W] ?? "",
404
- size: l.fields[C] ?? "0 MB",
405
- tags: l.fields[v] ?? "",
406
- width: l.fields[G] ?? "0"
392
+ (d) => {
393
+ const T = d.contentItems?.map((r) => {
394
+ let f = r.fields[C] ?? "";
395
+ const m = r.fields[S];
396
+ return f && !f.startsWith(".") && (f = "." + f), {
397
+ allowATSLink: r.fields[V] === "True",
398
+ docSubType: r.fields[k] ?? "",
399
+ docType: r.fields[g] ?? "",
400
+ extension: f,
401
+ height: r.fields[G] ?? "0",
402
+ id: r.recordID,
403
+ identifier: r.fields[v] ?? "",
404
+ imageUrl: r.fields[L] ?? "",
405
+ inColdStorage: r.fields[P] === "Cold Storage",
406
+ name: m ?? "",
407
+ originalUrl: r.fields[F] ?? "",
408
+ recordId: r.fields[b] ?? "",
409
+ scrubUrl: r.fields[H] ?? "",
410
+ size: r.fields[O] ?? "0 MB",
411
+ tags: r.fields[N] ?? "",
412
+ width: r.fields[U] ?? "0"
407
413
  };
408
414
  }) ?? [];
409
415
  return {
410
- facets: m.facets,
411
- items: c,
412
- totalCount: m.totalCount
416
+ facets: d.facets,
417
+ items: T,
418
+ totalCount: d.totalCount
413
419
  };
414
420
  }
415
421
  ],
416
- url: T.GET_CONTENT_V3
422
+ url: E.GET_CONTENT_V3
417
423
  })).data;
418
424
  } catch {
419
425
  return {
@@ -423,19 +429,19 @@ async function J({
423
429
  };
424
430
  }
425
431
  }
426
- async function ee({
427
- autoCropMode: t,
428
- cropHeight: r,
429
- cropWidth: s,
432
+ async function re({
433
+ autoCropMode: s,
434
+ cropHeight: t,
435
+ cropWidth: o,
430
436
  imageUrl: e
431
437
  }) {
432
438
  try {
433
439
  return (await n.request({
434
440
  method: "GET",
435
441
  params: {
436
- AutoCropMode: t,
437
- CropHeight: r,
438
- CropWidth: s,
442
+ AutoCropMode: s,
443
+ CropHeight: t,
444
+ CropWidth: o,
439
445
  ImageUrl: e && new URL(e, window.location.origin).href
440
446
  },
441
447
  responseType: "json",
@@ -443,29 +449,29 @@ async function ee({
443
449
  // 5 minutes
444
450
  transformResponse: [
445
451
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
446
- (d) => ({
447
- height: d.cropHeight,
448
- width: d.cropWidth,
449
- x: d.cropX,
450
- y: d.cropY
452
+ (l) => ({
453
+ height: l.cropHeight,
454
+ width: l.cropWidth,
455
+ x: l.cropX,
456
+ y: l.cropY
451
457
  })
452
458
  ],
453
- url: T.GET_CROP_ZONE_SUGGESTION
459
+ url: E.GET_CROP_ZONE_SUGGESTION
454
460
  })).data;
455
461
  } catch {
456
462
  return null;
457
463
  }
458
464
  }
459
- async function re({
460
- assetRecordId: t,
461
- siteUrl: r
465
+ async function te({
466
+ assetRecordId: s,
467
+ siteUrl: t
462
468
  }) {
463
469
  try {
464
470
  return (await n.request({
465
- baseURL: r,
471
+ baseURL: t,
466
472
  method: "GET",
467
473
  params: {
468
- RecordId: t
474
+ RecordId: s
469
475
  },
470
476
  responseType: "json",
471
477
  transformResponse: [
@@ -483,58 +489,58 @@ async function re({
483
489
  width: i.width
484
490
  })) ?? []
485
491
  ],
486
- url: T.GET_AVAILABLE_PROXIES
492
+ url: E.GET_AVAILABLE_PROXIES
487
493
  })).data;
488
494
  } catch {
489
495
  return [];
490
496
  }
491
497
  }
492
- async function te() {
498
+ async function se() {
493
499
  try {
494
500
  return (await n.request({
495
501
  method: "GET",
496
502
  responseType: "json",
497
503
  transformResponse: [
498
504
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
499
- (r) => r.extensions
505
+ (t) => t.extensions
500
506
  ],
501
- url: T.GET_AVAILABLE_EXTENSIONS
507
+ url: E.GET_AVAILABLE_EXTENSIONS
502
508
  })).data;
503
509
  } catch {
504
510
  return {};
505
511
  }
506
512
  }
507
- async function se({
508
- assetRecordId: t
513
+ async function oe({
514
+ assetRecordId: s
509
515
  }) {
510
516
  try {
511
517
  return (await n.request({
512
518
  method: "GET",
513
519
  params: {
514
- RecordId: t
520
+ RecordId: s
515
521
  },
516
522
  responseType: "json",
517
523
  transformResponse: [
518
524
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
519
- (s) => s.favoriteRecordIds ? s.favoriteRecordIds.includes(t) : !1
525
+ (o) => o.favoriteRecordIds ? o.favoriteRecordIds.includes(s) : !1
520
526
  ],
521
- url: T.GET_FAVORITE_ASSETS
527
+ url: E.GET_FAVORITE_ASSETS
522
528
  })).data;
523
529
  } catch {
524
530
  return !1;
525
531
  }
526
532
  }
527
- async function oe({
528
- siteUrl: t
533
+ async function ae({
534
+ siteUrl: s
529
535
  } = {}) {
530
536
  try {
531
537
  return (await n.request({
532
- baseURL: t,
538
+ baseURL: s,
533
539
  method: "GET",
534
540
  responseType: "json",
535
541
  transformResponse: [
536
542
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
537
- (s) => !s || typeof s != "object" ? {
543
+ (o) => !o || typeof o != "object" ? {
538
544
  formatsByDocType: {
539
545
  Audio: {},
540
546
  Image: {},
@@ -542,30 +548,30 @@ async function oe({
542
548
  Video: {}
543
549
  }
544
550
  } : {
545
- formatsByDocType: s.formatsByDocType ?? {}
551
+ formatsByDocType: o.formatsByDocType ?? {}
546
552
  }
547
553
  ],
548
- url: M
554
+ url: j
549
555
  })).data;
550
556
  } catch {
551
557
  return { formatsByDocType: {} };
552
558
  }
553
559
  }
554
- async function ae({
555
- assetRecordId: t
560
+ async function ne({
561
+ assetRecordId: s
556
562
  }) {
557
563
  try {
558
564
  return (await n.request({
559
565
  method: "GET",
560
566
  params: {
561
- RecordId: t
567
+ RecordId: s
562
568
  },
563
569
  responseType: "json",
564
570
  transformResponse: [
565
571
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
566
- (s) => ({
567
- count: s.count,
568
- versions: s.versions.map((e) => ({
572
+ (o) => ({
573
+ count: o.count,
574
+ versions: o.versions.map((e) => ({
569
575
  createByEmail: e.CreateByEmail,
570
576
  fileImportDate: e.FileImportDate,
571
577
  scrubUrl: e.ScrubUrl,
@@ -578,7 +584,7 @@ async function ae({
578
584
  }))
579
585
  })
580
586
  ],
581
- url: T.GET_ASSET_VERSION_HISTORY
587
+ url: E.GET_ASSET_VERSION_HISTORY
582
588
  })).data;
583
589
  } catch {
584
590
  return {
@@ -587,15 +593,15 @@ async function ae({
587
593
  };
588
594
  }
589
595
  }
590
- async function ne({
591
- assetRecordId: t,
592
- siteUrl: r
596
+ async function ie({
597
+ assetRecordId: s,
598
+ siteUrl: t
593
599
  }) {
594
600
  try {
595
601
  return (await n.request({
596
- baseURL: r,
602
+ baseURL: t,
597
603
  data: {
598
- RecordId: t
604
+ RecordId: s
599
605
  },
600
606
  method: "POST",
601
607
  responseType: "json",
@@ -603,21 +609,21 @@ async function ne({
603
609
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
604
610
  (e) => !!e.success
605
611
  ],
606
- url: T.ADD_ASSET_TO_FAVORITE
612
+ url: E.ADD_ASSET_TO_FAVORITE
607
613
  })).data;
608
614
  } catch {
609
615
  return !1;
610
616
  }
611
617
  }
612
- async function ie({
613
- assetRecordId: t,
614
- siteUrl: r
618
+ async function le({
619
+ assetRecordId: s,
620
+ siteUrl: t
615
621
  }) {
616
622
  try {
617
623
  return (await n.request({
618
- baseURL: r,
624
+ baseURL: t,
619
625
  data: {
620
- RecordId: t
626
+ RecordId: s
621
627
  },
622
628
  method: "POST",
623
629
  responseType: "json",
@@ -625,62 +631,62 @@ async function ie({
625
631
  ...Array.isArray(n.defaults.transformResponse) ? n.defaults.transformResponse : [],
626
632
  (e) => !!e.success
627
633
  ],
628
- url: T.REMOVE_ASSET_FROM_FAVORITE
634
+ url: E.REMOVE_ASSET_FROM_FAVORITE
629
635
  })).data;
630
636
  } catch {
631
637
  return !1;
632
638
  }
633
639
  }
634
- async function le(t, r) {
635
- const s = new FormData();
636
- s.append("InputStream", t);
640
+ async function de(s, t) {
641
+ const o = new FormData();
642
+ o.append("InputStream", s);
637
643
  const e = await B(
638
- T.UPLOAD_AND_GET_RESPONSE,
644
+ E.UPLOAD_AND_GET_RESPONSE,
639
645
  {
640
- body: s,
646
+ body: o,
641
647
  method: "POST"
642
648
  },
643
649
  {
644
650
  ByPassPermissionCheck: "true",
645
- ClientFileName: t.name,
646
- FolderRecordID: r?.imageUploadFolderID || ""
651
+ ClientFileName: s.name,
652
+ FolderRecordID: t?.imageUploadFolderID || ""
647
653
  }
648
654
  ), i = e ? await e.json() : null;
649
- return i ? i.downloadLink === "" ? (k(r?.errorUploadMessage || "", {
655
+ return i ? i.downloadLink === "" ? (x(t?.errorUploadMessage || "", {
650
656
  notificationType: "error"
651
- }), "") : i.downloadLink : (k(r?.errorUploadMessage || "", {
657
+ }), "") : i.downloadLink : (x(t?.errorUploadMessage || "", {
652
658
  notificationType: "error"
653
659
  }), "");
654
660
  }
655
661
  export {
656
662
  B as A,
657
- R as D,
658
- g as F,
659
- I as O,
660
- Z as a,
661
- Y as b,
662
- ee as c,
663
- J as d,
664
- se as e,
665
- re as f,
666
- C as g,
667
- O as h,
668
- v as i,
669
- N as j,
670
- G as k,
663
+ L as D,
664
+ C as F,
665
+ F as O,
666
+ Q as a,
667
+ Z as b,
668
+ re as c,
669
+ ee as d,
670
+ oe as e,
671
+ te as f,
672
+ O as g,
673
+ v as h,
674
+ N as i,
675
+ G as j,
676
+ U as k,
671
677
  b as l,
672
- U as m,
678
+ k as m,
673
679
  w as n,
674
- L as o,
675
- W as p,
680
+ g as o,
681
+ H as p,
676
682
  V as q,
677
- ae as r,
678
- ne as s,
679
- k as t,
680
- ie as u,
681
- X as v,
682
- te as w,
683
- oe as x,
684
- Q as y,
685
- le as z
683
+ ne as r,
684
+ ie as s,
685
+ x as t,
686
+ le as u,
687
+ Y as v,
688
+ se as w,
689
+ ae as x,
690
+ J as y,
691
+ de as z
686
692
  };