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