@orangelogic/design-system 2.95.0 → 2.97.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.B3vySOI-.js +431 -0
- package/library/chunks/{asset.types.6DCzTOQm.js → asset.types.KXRZEtBr.js} +127 -126
- package/library/chunks/{button.BZjbVq8t.js → button.CAa1kvwe.js} +2 -2
- package/library/chunks/{color-swatch-group.Q8ybVS0A.js → color-swatch-group.ChcPlkPU.js} +5 -5
- package/library/chunks/{color-swatch.CbL_TpRZ.js → color-swatch.DJ1kUnBQ.js} +1 -1
- package/library/chunks/{confirm-popover.bBo9aPlX.js → confirm-popover.D4x0nO5g.js} +3 -3
- package/library/chunks/content-builder.CcgZciZN.js +58 -0
- package/library/chunks/{cropper.uKGcvnPk.js → cropper.Bib8Abm3.js} +4937 -4932
- package/library/chunks/{dialog.DRW8iwh-.js → dialog.BLaxLMSc.js} +2 -2
- package/library/chunks/{dom.DURaLV1d.js → dom.0RpWet6y.js} +1 -1
- package/library/chunks/{dot-pagination.CvUr6R4S.js → dot-pagination.-nDdQxJN.js} +1 -1
- package/library/chunks/{file-on-demand.KQlA1JFF.js → file-on-demand.AzwoUvwB.js} +10 -10
- package/library/chunks/{folder-select.DxBOSyvo.js → folder-select.XpkOFzAW.js} +5 -5
- package/library/chunks/{form.nRqYei4e.js → form.Ch1cwYzO.js} +1 -1
- package/library/chunks/{header.ClxEkQPZ.js → header.BZxyeLPK.js} +1 -1
- package/library/chunks/{i18n.W6czbRms.js → i18n.BABe9hN4.js} +6 -0
- package/library/chunks/{icon-button.MqA-pNw8.js → icon-button.C2s3pHG4.js} +1 -1
- package/library/chunks/{iframe.PcSPtm_O.js → iframe.DPccxsnE.js} +1 -1
- package/library/chunks/{image.Dtdklw5q.js → image.9qwbjGNb.js} +1 -1
- package/library/chunks/{image.C-Covc0H.js → image.Cc4V85ID.js} +354 -311
- package/library/chunks/{list-editor.BnHKqD0O.js → list-editor.pVYc_70c.js} +183 -153
- package/library/chunks/{number.CCF6IxpN.js → number.B4PQLJIg.js} +32 -32
- package/library/chunks/{option.Cx54zrJq.js → option.DGXQzdtb.js} +1 -1
- package/library/chunks/{pagination.CG5odPWi.js → pagination.DZqKSA86.js} +4 -4
- package/library/chunks/{responsive.D9TUCX5p.js → responsive.Oz9HWjyQ.js} +1 -1
- package/library/chunks/{string.DfV21HEI.js → string.DUgD4c9f.js} +41 -34
- package/library/chunks/{tab-group.BLZ-qEpp.js → tab-group.BhCf9Smq.js} +4 -4
- package/library/chunks/{table.CYxWpvAC.js → table.V5PGGTfO.js} +13 -11
- package/library/chunks/{time.BNrE47-8.js → time.BiQnh9wt.js} +1 -1
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Cqz3hPaQ.js +144 -0
- package/library/chunks/{tree.CKi63r95.js → tree.DZa7k-4E.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +767 -862
- package/library/components/atoms.js +12 -12
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +6 -6
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +1 -1
- package/library/components/details.js +4 -4
- package/library/components/dialog.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- 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/file-on-demand.js +11 -11
- package/library/components/folder-select.js +4 -4
- 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 +2 -2
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +4 -7
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +5 -5
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- 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/range.js +2 -2
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +3 -3
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +5 -5
- 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 +2 -2
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +31066 -29848
- package/library/components/video.js +554 -545
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +15 -1
- package/library/packages/atoms/src/components/input/input.d.ts +1 -2
- package/library/packages/atoms/src/components/video/video.d.ts +3 -1
- package/library/packages/events/src/cx-asset-format-picker-delete.d.ts +6 -0
- package/library/packages/events/src/cx-asset-format-picker-select.d.ts +8 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
- package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
- package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
- package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
- package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
- package/library/packages/events/src/cx-timeline-data-resolved.d.ts +10 -0
- package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +12 -1
- package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -0
- package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +56 -0
- package/library/packages/molecules/src/asset-format-picker/asset-format-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +7 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +5 -1
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/timeline/timeline.d.ts +18 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +12 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +102 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
- package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +3 -1
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +2 -2
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
- package/library/packages/organisms/src/content-builder/styleController.d.ts +26 -1
- package/library/packages/organisms/src/index.d.ts +2 -0
- package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
- package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +2 -2
- package/library/packages/services/src/api/asset/asset.types.d.ts +4 -0
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +19 -5
- package/library/packages/types/src/asset-click-action.d.ts +3 -1
- package/library/packages/types/src/asset-format-picker.d.ts +11 -0
- package/library/packages/types/src/bento-grid.d.ts +37 -0
- package/library/packages/types/src/content-builder.d.ts +37 -1
- package/library/packages/types/src/gallery.d.ts +0 -6
- package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +6 -0
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/packages/utils/src/string/string.d.ts +1 -0
- package/library/packages/utils/src/transformation/index.d.ts +1 -0
- package/library/react-web-component.d.ts +236 -8
- package/library/utils.js +517 -192
- package/package.json +1 -1
- package/library/chunks/asset.Duzr3O3z.js +0 -370
- package/library/chunks/index.BgXEXk4m.js +0 -398
- package/library/chunks/toast.Bc4wpYJ1.js +0 -150
- /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { h as p, S as H, A as w, a as x, M as K } from "./asset.types.6DCzTOQm.js";
|
|
2
|
-
function $(e) {
|
|
3
|
-
return typeof e == "object" && e !== null && "URI" in e;
|
|
4
|
-
}
|
|
5
|
-
const k = {
|
|
6
|
-
artist: "Artist",
|
|
7
|
-
color: "Color",
|
|
8
|
-
createDate: "CreateDate",
|
|
9
|
-
docSubType: "DocSubType",
|
|
10
|
-
docType: "DocType",
|
|
11
|
-
editDate: "EditDate",
|
|
12
|
-
fileExtension: "Fileextension",
|
|
13
|
-
keyword: "Keyword",
|
|
14
|
-
mediaDate: "MediaDate",
|
|
15
|
-
mediaNumber: "MediaNumber",
|
|
16
|
-
nativeKeyword: "NativeKeyword",
|
|
17
|
-
orientation: "Orientation",
|
|
18
|
-
parentFolderIdentifier: "ParentFolderIdentifier",
|
|
19
|
-
path: "Path",
|
|
20
|
-
photographer: "Photographer",
|
|
21
|
-
purpose: "Purpose",
|
|
22
|
-
recordId: "RecordID",
|
|
23
|
-
systemIdentifier: "SystemIdentifier",
|
|
24
|
-
text: "Text",
|
|
25
|
-
title: "Title"
|
|
26
|
-
}, B = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
|
|
27
|
-
function V(e) {
|
|
28
|
-
return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(e) && !/^(?:OR|AND|NOT)$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
29
|
-
}
|
|
30
|
-
function g(e, t) {
|
|
31
|
-
const o = (Array.isArray(t) ? t : [t]).map((a) => `${e}:${V(a)}`);
|
|
32
|
-
return o.length > 1 ? `(${o.join(" OR ")})` : o[0] ?? "";
|
|
33
|
-
}
|
|
34
|
-
function Z(e, t) {
|
|
35
|
-
return (Array.isArray(t) ? t : [t]).map((o) => `${e}${o.operator}${o.value}`).join(" AND ");
|
|
36
|
-
}
|
|
37
|
-
function q(e) {
|
|
38
|
-
const t = [];
|
|
39
|
-
for (const r of Object.keys(e)) {
|
|
40
|
-
const o = r, a = e[o];
|
|
41
|
-
if (a == null)
|
|
42
|
-
continue;
|
|
43
|
-
if (o === "custom") {
|
|
44
|
-
for (const [u, d] of Object.entries(
|
|
45
|
-
a
|
|
46
|
-
))
|
|
47
|
-
t.push(g(u, d));
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
const c = k[o];
|
|
51
|
-
if (c) {
|
|
52
|
-
if (B.has(o)) {
|
|
53
|
-
t.push(
|
|
54
|
-
Z(c, a)
|
|
55
|
-
);
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
if (o === "color") {
|
|
59
|
-
t.push(`${c}:${a}`);
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
t.push(g(c, a));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return t.join(" AND ");
|
|
66
|
-
}
|
|
67
|
-
function m(e) {
|
|
68
|
-
if ("and" in e)
|
|
69
|
-
return e.and.map(m).filter(Boolean).join(" AND ");
|
|
70
|
-
if ("or" in e) {
|
|
71
|
-
const t = e.or.map(m).filter(Boolean);
|
|
72
|
-
return t.length > 1 ? `(${t.join(" OR ")})` : t[0] ?? "";
|
|
73
|
-
}
|
|
74
|
-
if ("not" in e) {
|
|
75
|
-
const t = m(e.not);
|
|
76
|
-
return t ? `NOT (${t})` : "";
|
|
77
|
-
}
|
|
78
|
-
return q(e);
|
|
79
|
-
}
|
|
80
|
-
const F = "CoreField.LargeSizePreview", R = "CoreField.DocType", z = "Document.Title", X = "Document.CaptionLong", N = "Document.FileExtension", O = "CoreField.FileSize", P = "CoreField.Identifier", b = "CoreField.Keywords", M = "CoreField.MaxHeight", G = "CoreField.MaxWidth", D = "Document.RecordID", U = "CoreField.DocSubType", W = "CoreField.TitleWithFallback", A = "CoreField.OriginalFileName", _ = "CoreField.UpdatedFileName", f = "CoreField.OriginalPreview", T = {
|
|
81
|
-
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
82
|
-
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
83
|
-
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
84
|
-
}, j = {
|
|
85
|
-
[F]: T.DEFAULT_VIEW_SIZE,
|
|
86
|
-
[W]: T.FIELD_TITLE_WITH_FALLBACK,
|
|
87
|
-
[f]: T.ORIGINAL_VIEW_SIZE
|
|
88
|
-
}, Y = Object.fromEntries(
|
|
89
|
-
Object.entries(j).map(([e, t]) => [
|
|
90
|
-
t,
|
|
91
|
-
e
|
|
92
|
-
])
|
|
93
|
-
);
|
|
94
|
-
function Q(e) {
|
|
95
|
-
return j[e] ?? e;
|
|
96
|
-
}
|
|
97
|
-
function J(e) {
|
|
98
|
-
const t = {};
|
|
99
|
-
for (const [r, o] of Object.entries(e)) {
|
|
100
|
-
const a = Y[r] ?? r;
|
|
101
|
-
t[a] = o;
|
|
102
|
-
}
|
|
103
|
-
return t;
|
|
104
|
-
}
|
|
105
|
-
async function v({
|
|
106
|
-
countPerPage: e,
|
|
107
|
-
fields: t,
|
|
108
|
-
getPermanentAssetsPaths: r,
|
|
109
|
-
pageNumber: o,
|
|
110
|
-
query: a,
|
|
111
|
-
siteUrl: c,
|
|
112
|
-
sort: u,
|
|
113
|
-
token: d,
|
|
114
|
-
useSession: E
|
|
115
|
-
}) {
|
|
116
|
-
const s = t?.map(Q);
|
|
117
|
-
try {
|
|
118
|
-
return (await p.request({
|
|
119
|
-
baseURL: c,
|
|
120
|
-
method: "GET",
|
|
121
|
-
params: {
|
|
122
|
-
CountPerPage: e,
|
|
123
|
-
Fields: s,
|
|
124
|
-
Format: "json",
|
|
125
|
-
GetPermanentAssetsPaths: r || void 0,
|
|
126
|
-
PageNumber: o,
|
|
127
|
-
Query: m(a),
|
|
128
|
-
Sort: u || void 0,
|
|
129
|
-
Token: d || void 0,
|
|
130
|
-
UseSession: E || void 0
|
|
131
|
-
},
|
|
132
|
-
paramsSerializer: { indexes: null },
|
|
133
|
-
responseType: "json",
|
|
134
|
-
transformResponse: [
|
|
135
|
-
...Array.isArray(p.defaults.transformResponse) ? p.defaults.transformResponse : [],
|
|
136
|
-
(n) => ({
|
|
137
|
-
items: (n.APIResponse?.Items ?? []).map(J),
|
|
138
|
-
sort: n.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
139
|
-
totalCount: n.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
140
|
-
})
|
|
141
|
-
],
|
|
142
|
-
url: H["4.0"]
|
|
143
|
-
})).data;
|
|
144
|
-
} catch {
|
|
145
|
-
return { items: [], sort: "", totalCount: 0 };
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
async function oe({
|
|
149
|
-
assetId: e,
|
|
150
|
-
extension: t,
|
|
151
|
-
format: r,
|
|
152
|
-
siteUrl: o,
|
|
153
|
-
token: a,
|
|
154
|
-
transformations: c,
|
|
155
|
-
useSession: u
|
|
156
|
-
}) {
|
|
157
|
-
try {
|
|
158
|
-
return (await p.request({
|
|
159
|
-
baseURL: o,
|
|
160
|
-
method: "GET",
|
|
161
|
-
params: {
|
|
162
|
-
SourceAssetFormat: r,
|
|
163
|
-
SourceAssetRecordID: e,
|
|
164
|
-
TargetExtension: t,
|
|
165
|
-
Token: a,
|
|
166
|
-
Transformations: c,
|
|
167
|
-
UseSession: u || void 0
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* https://link.orangelogic.com/Tasks/41S1XH
|
|
171
|
-
*/
|
|
172
|
-
timeout: 3e5,
|
|
173
|
-
// 5 minutes
|
|
174
|
-
url: w.GET_TRANSFORM_ASSET_LINK
|
|
175
|
-
})).data;
|
|
176
|
-
} catch {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
const ee = 50;
|
|
181
|
-
function te(e, t) {
|
|
182
|
-
const r = [];
|
|
183
|
-
for (let o = 0; o < e.length; o += t)
|
|
184
|
-
r.push(e.slice(o, o + t));
|
|
185
|
-
return r;
|
|
186
|
-
}
|
|
187
|
-
async function ne({
|
|
188
|
-
extraFields: e,
|
|
189
|
-
recordIds: t
|
|
190
|
-
}) {
|
|
191
|
-
if (!Array.isArray(t) || t.length === 0)
|
|
192
|
-
return { facets: [], items: [], totalCount: 0 };
|
|
193
|
-
const r = e?.filter((s) => s && typeof s == "string") ?? [], o = [
|
|
194
|
-
...r,
|
|
195
|
-
f,
|
|
196
|
-
_,
|
|
197
|
-
A,
|
|
198
|
-
z,
|
|
199
|
-
X,
|
|
200
|
-
D
|
|
201
|
-
], a = te(t, ee), c = await Promise.all(
|
|
202
|
-
a.map(
|
|
203
|
-
(s) => v({
|
|
204
|
-
countPerPage: s.length,
|
|
205
|
-
fields: o,
|
|
206
|
-
pageNumber: 1,
|
|
207
|
-
query: { recordId: s }
|
|
208
|
-
})
|
|
209
|
-
)
|
|
210
|
-
), u = new Map(t.map((s, l) => [s, l])), d = c.flatMap((s) => s.items).map((s) => {
|
|
211
|
-
let l = i(s, _);
|
|
212
|
-
return l === "" && (l = i(s, A)), {
|
|
213
|
-
name: l,
|
|
214
|
-
originalUrl: i(s, f),
|
|
215
|
-
recordId: i(s, D),
|
|
216
|
-
...r.reduce(
|
|
217
|
-
(n, I) => (n[I] = i(s, I), n),
|
|
218
|
-
{}
|
|
219
|
-
)
|
|
220
|
-
};
|
|
221
|
-
}).sort(
|
|
222
|
-
(s, l) => (u.get(s.recordId) ?? 1 / 0) - (u.get(l.recordId) ?? 1 / 0)
|
|
223
|
-
), E = c.reduce(
|
|
224
|
-
(s, l) => s + l.totalCount,
|
|
225
|
-
0
|
|
226
|
-
);
|
|
227
|
-
return { facets: [], items: d, totalCount: E };
|
|
228
|
-
}
|
|
229
|
-
function i(e, t) {
|
|
230
|
-
const r = e[t];
|
|
231
|
-
return r == null ? "" : typeof r == "string" ? r : typeof r == "number" || typeof r == "boolean" ? String(r) : $(r) ? r.URI : "";
|
|
232
|
-
}
|
|
233
|
-
async function se({
|
|
234
|
-
countPerPage: e,
|
|
235
|
-
extraFields: t,
|
|
236
|
-
limitedDocTypes: r,
|
|
237
|
-
pageNumber: o,
|
|
238
|
-
parentFolderIdentifier: a,
|
|
239
|
-
searchTerm: c,
|
|
240
|
-
sortOrder: u
|
|
241
|
-
}) {
|
|
242
|
-
if (!a)
|
|
243
|
-
return { facets: [], items: [], totalCount: 0 };
|
|
244
|
-
const d = (t?.filter((n) => n && typeof n == "string") ?? []).map((n) => n.replace("%20", " ")), E = {
|
|
245
|
-
parentFolderIdentifier: a,
|
|
246
|
-
...r.length > 0 ? { docType: K.Image } : {}
|
|
247
|
-
}, s = await v({
|
|
248
|
-
countPerPage: e,
|
|
249
|
-
fields: [
|
|
250
|
-
...d,
|
|
251
|
-
W,
|
|
252
|
-
F,
|
|
253
|
-
f,
|
|
254
|
-
b,
|
|
255
|
-
G,
|
|
256
|
-
M,
|
|
257
|
-
O,
|
|
258
|
-
R,
|
|
259
|
-
U,
|
|
260
|
-
P,
|
|
261
|
-
N,
|
|
262
|
-
D,
|
|
263
|
-
A,
|
|
264
|
-
_
|
|
265
|
-
],
|
|
266
|
-
pageNumber: o,
|
|
267
|
-
query: E,
|
|
268
|
-
sort: void 0
|
|
269
|
-
}), l = s.items.map((n) => {
|
|
270
|
-
let I = i(n, N), y = i(n, _), h = i(n, F);
|
|
271
|
-
I && !I.startsWith(".") && (I = "." + I), y === "" && (y = i(n, A)), I.toLowerCase() === ".gif" && (h = i(n, f));
|
|
272
|
-
const L = i(n, D);
|
|
273
|
-
return {
|
|
274
|
-
docSubType: i(n, U),
|
|
275
|
-
docType: i(n, R) || "",
|
|
276
|
-
extension: I,
|
|
277
|
-
height: i(n, M) || "0",
|
|
278
|
-
id: L,
|
|
279
|
-
identifier: i(n, P),
|
|
280
|
-
imageUrl: h,
|
|
281
|
-
name: y,
|
|
282
|
-
originalUrl: i(n, f),
|
|
283
|
-
recordId: L,
|
|
284
|
-
size: i(n, O) || "0 MB",
|
|
285
|
-
tags: i(n, b),
|
|
286
|
-
width: i(n, G) || "0",
|
|
287
|
-
...d.reduce(
|
|
288
|
-
(S, C) => (S[C] = i(n, C), S),
|
|
289
|
-
{}
|
|
290
|
-
)
|
|
291
|
-
};
|
|
292
|
-
});
|
|
293
|
-
return {
|
|
294
|
-
facets: [],
|
|
295
|
-
items: l,
|
|
296
|
-
totalCount: s.totalCount
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
async function ae({
|
|
300
|
-
autoCropMode: e,
|
|
301
|
-
cropHeight: t,
|
|
302
|
-
cropWidth: r,
|
|
303
|
-
imageUrl: o,
|
|
304
|
-
useSession: a
|
|
305
|
-
}) {
|
|
306
|
-
try {
|
|
307
|
-
return (await p.request({
|
|
308
|
-
method: "GET",
|
|
309
|
-
params: {
|
|
310
|
-
AutoCropMode: e,
|
|
311
|
-
CropHeight: t,
|
|
312
|
-
CropWidth: r,
|
|
313
|
-
ImageUrl: o && new URL(o, window.location.origin).href,
|
|
314
|
-
UseSession: a || void 0
|
|
315
|
-
},
|
|
316
|
-
responseType: "json",
|
|
317
|
-
timeout: 3e5,
|
|
318
|
-
// 5 minutes
|
|
319
|
-
transformResponse: [
|
|
320
|
-
...Array.isArray(p.defaults.transformResponse) ? p.defaults.transformResponse : [],
|
|
321
|
-
(u) => ({
|
|
322
|
-
height: u.cropHeight,
|
|
323
|
-
width: u.cropWidth,
|
|
324
|
-
x: u.cropX,
|
|
325
|
-
y: u.cropY
|
|
326
|
-
})
|
|
327
|
-
],
|
|
328
|
-
url: w.GET_CROP_ZONE_SUGGESTION
|
|
329
|
-
})).data;
|
|
330
|
-
} catch {
|
|
331
|
-
return null;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
async function ie({
|
|
335
|
-
siteUrl: e
|
|
336
|
-
} = {}) {
|
|
337
|
-
try {
|
|
338
|
-
return (await p.request({
|
|
339
|
-
baseURL: e,
|
|
340
|
-
method: "GET",
|
|
341
|
-
responseType: "json",
|
|
342
|
-
transformResponse: [
|
|
343
|
-
...Array.isArray(p.defaults.transformResponse) ? p.defaults.transformResponse : [],
|
|
344
|
-
(r) => !r || typeof r != "object" ? {
|
|
345
|
-
formatsByDocType: {
|
|
346
|
-
Audio: {},
|
|
347
|
-
Image: {},
|
|
348
|
-
Multimedia: {},
|
|
349
|
-
Video: {}
|
|
350
|
-
}
|
|
351
|
-
} : {
|
|
352
|
-
formatsByDocType: r.formatsByDocType ?? {}
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
url: x
|
|
356
|
-
})).data;
|
|
357
|
-
} catch {
|
|
358
|
-
return { formatsByDocType: {} };
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
export {
|
|
362
|
-
F as D,
|
|
363
|
-
P as F,
|
|
364
|
-
ne as a,
|
|
365
|
-
oe as b,
|
|
366
|
-
ae as c,
|
|
367
|
-
ie as d,
|
|
368
|
-
se as e,
|
|
369
|
-
v as f
|
|
370
|
-
};
|