@orangelogic/design-system 4.0.0 → 4.1.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-link-format.ttcRQgDc.js → asset-link-format.CVwjA_yf.js} +606 -599
- package/library/chunks/{color-swatch-group.Bumfw-G2.js → color-swatch-group.BPXiMxjh.js} +611 -558
- package/library/chunks/{document-viewer.C9tM2Gc7.js → document-viewer.DtBW-p7z.js} +2 -2
- package/library/chunks/{index.Coy2OPB4.js → index.BO_sT6SH.js} +218 -217
- package/library/chunks/{menu-item.0TbnDEDp.js → menu-item.CbqZ66to.js} +5 -5
- package/library/chunks/{option.CyorNG0S.js → option.CkhHTlpl.js} +1 -1
- package/library/chunks/{pagination.D0BeaEIi.js → pagination.BlQRt932.js} +33 -29
- package/library/chunks/{tab-group.C98CWzEH.js → tab-group.CQfcMVEw.js} +1 -1
- package/library/chunks/{toast.BxiewnAG.js → toast.BOkYwUIj.js} +1 -1
- package/library/chunks/{transformation.CjWnFhab.js → transformation.B8m0Nbao.js} +23 -25
- package/library/chunks/{types.DVZ_cbKn.js → types.MwUT4xFk.js} +9410 -9400
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +5 -5
- package/library/components/color-picker.js +2 -2
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/file-on-demand.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +2 -2
- package/library/components/select.js +1 -1
- package/library/components/tab-group.js +2 -2
- package/library/components/types.js +10 -10
- package/library/package.json +1 -1
- package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-dropdown-filter.d.ts +2 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +35 -4
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +12 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +2 -2
- package/library/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as Y } from "./button.D1YIxtv-.js";
|
|
3
3
|
import U from "../components/space.js";
|
|
4
4
|
import { C as B } from "./typography.T72DuoCa.js";
|
|
5
5
|
import { n as h, C as q } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
|
-
import { h as E, a as Dt, C as Nt, S as
|
|
6
|
+
import { h as E, a as Dt, C as Nt, S as Jt, b as te, c as ee, d as ie } from "./endpoints.mJ5S-tIs.js";
|
|
7
7
|
import "./browser.BHOCIF_A.js";
|
|
8
8
|
import { i as j, x as C, E as Ot } from "./lit-element.jLBm65_O.js";
|
|
9
9
|
import "./form.DN2v7-DH.js";
|
|
10
10
|
import { L as V } from "./i18n.rtxrs1c1.js";
|
|
11
|
-
import { a as
|
|
11
|
+
import { a as se } from "./string.Demn8Xmk.js";
|
|
12
12
|
import "./date-picker.BGHn6qg8.js";
|
|
13
|
-
import { a as bt, r as Lt, b as
|
|
13
|
+
import { a as bt, r as Lt, b as ae, c as oe, d as dt } from "./transformation.B8m0Nbao.js";
|
|
14
14
|
import "./unsafe-html.Dff7-rCx.js";
|
|
15
|
-
import { b as
|
|
15
|
+
import { b as re } from "./_baseUniq.lwMgmtt2.js";
|
|
16
16
|
import { c as G } from "./component.styles.CAS3c9pM.js";
|
|
17
|
-
import { M as
|
|
18
|
-
import { v as
|
|
17
|
+
import { M as rt, U as o, T as f } from "./asset-link-format.ClaYu_v8.js";
|
|
18
|
+
import { v as ne } from "./v4.CKZ6klMF.js";
|
|
19
19
|
import { P as N } from "./position-picker.DjnhxIKF.js";
|
|
20
20
|
import { c as Q } from "./custom-element.L4WJXn1j.js";
|
|
21
21
|
import { w as _ } from "./watch.DJF5K-8U.js";
|
|
22
|
-
import { s as Mt, a as
|
|
22
|
+
import { s as Mt, a as ut } from "./number.Cx2ncfJJ.js";
|
|
23
23
|
import { r as $ } from "./state.CSDxrqLd.js";
|
|
24
24
|
import { n as M } from "./when.Dr1es41R.js";
|
|
25
25
|
import at from "../components/details.js";
|
|
@@ -27,23 +27,23 @@ import Ut from "../components/divider.js";
|
|
|
27
27
|
import { C as ot } from "./icon.BLXWp6CU.js";
|
|
28
28
|
import { C as Ct } from "./icon-button.CbUddcgI.js";
|
|
29
29
|
import { C as kt } from "./input.D1FFprPl.js";
|
|
30
|
-
import { C as yt } from "./option.
|
|
30
|
+
import { C as yt } from "./option.CkhHTlpl.js";
|
|
31
31
|
import St from "../components/select.js";
|
|
32
|
-
import
|
|
33
|
-
import { c as
|
|
34
|
-
import { e as
|
|
35
|
-
import { c as
|
|
32
|
+
import he from "../components/position-picker.js";
|
|
33
|
+
import { c as le } from "./image.Y5c_hFx8.js";
|
|
34
|
+
import { e as J } from "./query.BBf1UFkC.js";
|
|
35
|
+
import { c as nt } from "./repeat.CFjcER6_.js";
|
|
36
36
|
import { o as O } from "./style-map.llVFPd__.js";
|
|
37
37
|
import Bt from "../components/tooltip.js";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function
|
|
41
|
-
return t && t.length ?
|
|
38
|
+
import ce from "../components/button-group.js";
|
|
39
|
+
import pe from "../components/checkbox.js";
|
|
40
|
+
function de(t) {
|
|
41
|
+
return t && t.length ? re(t) : [];
|
|
42
42
|
}
|
|
43
43
|
function qt(t) {
|
|
44
44
|
return typeof t == "object" && t !== null && "URI" in t;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const ue = {
|
|
47
47
|
artist: "Artist",
|
|
48
48
|
color: "Color",
|
|
49
49
|
createDate: "CreateDate",
|
|
@@ -65,7 +65,7 @@ const de = {
|
|
|
65
65
|
systemIdentifier: "SystemIdentifier",
|
|
66
66
|
text: "Text",
|
|
67
67
|
title: "Title"
|
|
68
|
-
},
|
|
68
|
+
}, me = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
|
|
69
69
|
function wt(t) {
|
|
70
70
|
return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
71
71
|
}
|
|
@@ -73,10 +73,10 @@ function It(t, e) {
|
|
|
73
73
|
const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${wt(a)}`);
|
|
74
74
|
return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function fe(t, e) {
|
|
77
77
|
return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function ge(t) {
|
|
80
80
|
const e = [];
|
|
81
81
|
for (const i of Object.keys(t)) {
|
|
82
82
|
const s = i, a = t[s];
|
|
@@ -89,11 +89,11 @@ function fe(t) {
|
|
|
89
89
|
e.push(It(n, l));
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
const r =
|
|
92
|
+
const r = ue[s];
|
|
93
93
|
if (r) {
|
|
94
|
-
if (
|
|
94
|
+
if (me.has(s)) {
|
|
95
95
|
e.push(
|
|
96
|
-
|
|
96
|
+
fe(r, a)
|
|
97
97
|
);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
@@ -117,41 +117,41 @@ function fe(t) {
|
|
|
117
117
|
}
|
|
118
118
|
return e.join(" AND ");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function mt(t) {
|
|
121
121
|
if ("and" in t)
|
|
122
|
-
return t.and.map(
|
|
122
|
+
return t.and.map(mt).filter(Boolean).join(" AND ");
|
|
123
123
|
if ("or" in t) {
|
|
124
|
-
const e = t.or.map(
|
|
124
|
+
const e = t.or.map(mt).filter(Boolean);
|
|
125
125
|
return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
|
|
126
126
|
}
|
|
127
127
|
if ("not" in t) {
|
|
128
|
-
const e =
|
|
128
|
+
const e = mt(t.not);
|
|
129
129
|
return e ? `NOT (${e})` : "";
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return ge(t);
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const xe = "CoreField.LargeSizePreview", ht = "CoreField.DocType", Rt = "Document.Title", ye = "Document.CaptionLong", lt = "Document.FileExtension", ft = "CoreField.FileSize", Et = "CoreField.Identifier", Bi = "CoreField.MaxHeight", qi = "CoreField.MaxWidth", gt = "Document.RecordID", Ht = "CoreField.DocSubType", xt = "CoreField.TitleWithFallback", st = "CoreField.OriginalFileName", jt = "__width", Vt = "__height", Se = "CoreField.OriginalPreview", ji = "Document.DocSubType", Vi = "Document.InPoint", Gi = "Document.OutPoint", Tt = {
|
|
134
134
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
135
135
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
136
136
|
}, Gt = {
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
},
|
|
137
|
+
[xe]: Tt.DEFAULT_VIEW_SIZE,
|
|
138
|
+
[Se]: Tt.ORIGINAL_VIEW_SIZE
|
|
139
|
+
}, Ae = Object.fromEntries(
|
|
140
140
|
Object.entries(Gt).map(([t, e]) => [
|
|
141
141
|
e,
|
|
142
142
|
t
|
|
143
143
|
])
|
|
144
144
|
);
|
|
145
|
-
function Ae(t) {
|
|
146
|
-
return Gt[t] ?? t;
|
|
147
|
-
}
|
|
148
145
|
function ve(t) {
|
|
149
|
-
return t
|
|
146
|
+
return Gt[t] ?? t;
|
|
150
147
|
}
|
|
151
148
|
function ze(t) {
|
|
149
|
+
return t === xt ? [Rt, st] : [ve(t)];
|
|
150
|
+
}
|
|
151
|
+
function be(t) {
|
|
152
152
|
const e = {};
|
|
153
153
|
for (const [i, s] of Object.entries(t)) {
|
|
154
|
-
const a =
|
|
154
|
+
const a = Ae[i] ?? i;
|
|
155
155
|
e[a] = s;
|
|
156
156
|
}
|
|
157
157
|
return e;
|
|
@@ -161,7 +161,7 @@ function Qt(t, e, i) {
|
|
|
161
161
|
const s = e[i];
|
|
162
162
|
return s != null && qt(s) && (typeof s.Width == "number" && s.Width > 0 && (t[`${i}${jt}`] = String(s.Width)), typeof s.Height == "number" && s.Height > 0 && (t[`${i}${Vt}`] = String(s.Height))), t;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function we(t) {
|
|
165
165
|
const e = new URLSearchParams();
|
|
166
166
|
for (const [i, s] of Object.entries(t))
|
|
167
167
|
s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
|
|
@@ -177,14 +177,14 @@ async function Xt({
|
|
|
177
177
|
pageNumber: n,
|
|
178
178
|
query: l,
|
|
179
179
|
securityByPassToken: p,
|
|
180
|
-
siteUrl:
|
|
180
|
+
siteUrl: x,
|
|
181
181
|
sort: c,
|
|
182
|
-
token:
|
|
183
|
-
useSession:
|
|
182
|
+
token: u,
|
|
183
|
+
useSession: y
|
|
184
184
|
}) {
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
return d && (
|
|
185
|
+
const S = i?.flatMap(ze), d = i?.includes(xt) ?? !1, A = (F) => {
|
|
186
|
+
const z = be(F);
|
|
187
|
+
return d && (z[xt] = H(z, Rt) || H(z, st)), z;
|
|
188
188
|
}, k = {
|
|
189
189
|
/*
|
|
190
190
|
* Opt-in only, never inferred from `isSiteBuilder`: that flag picks the endpoint, and callers set
|
|
@@ -194,43 +194,43 @@ async function Xt({
|
|
|
194
194
|
*/
|
|
195
195
|
Consistency: t || void 0,
|
|
196
196
|
CountPerPage: e,
|
|
197
|
-
Fields:
|
|
197
|
+
Fields: de(S),
|
|
198
198
|
Format: "json",
|
|
199
199
|
GetPermanentAssetsPaths: s || void 0,
|
|
200
200
|
PageNumber: n,
|
|
201
|
-
Query:
|
|
201
|
+
Query: mt(l),
|
|
202
202
|
SecurityByPassToken: p || void 0,
|
|
203
203
|
Sort: c || void 0,
|
|
204
|
-
UseSession:
|
|
205
|
-
},
|
|
204
|
+
UseSession: y || void 0
|
|
205
|
+
}, b = a === "POST";
|
|
206
206
|
try {
|
|
207
207
|
return (await E.request({
|
|
208
|
-
baseURL:
|
|
209
|
-
headers:
|
|
208
|
+
baseURL: x,
|
|
209
|
+
headers: u ? { Authorization: `Bearer ${u}` } : void 0,
|
|
210
210
|
method: a,
|
|
211
211
|
// POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
|
|
212
212
|
// GET keeps the same fields on the query string.
|
|
213
|
-
...
|
|
213
|
+
...b ? { data: we(k) } : { params: k, paramsSerializer: { indexes: null } },
|
|
214
214
|
responseType: "json",
|
|
215
215
|
transformResponse: [
|
|
216
216
|
...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
|
|
217
|
-
r ? (
|
|
218
|
-
items: (
|
|
219
|
-
sort:
|
|
220
|
-
totalCount:
|
|
221
|
-
}) : (
|
|
222
|
-
items: (
|
|
223
|
-
sort:
|
|
224
|
-
totalCount:
|
|
217
|
+
r ? (z) => ({
|
|
218
|
+
items: (z.results?.Items ?? []).map(A),
|
|
219
|
+
sort: z.results?.GlobalInfo?.Sort ?? "",
|
|
220
|
+
totalCount: z.results?.GlobalInfo?.TotalCount ?? 0
|
|
221
|
+
}) : (z) => ({
|
|
222
|
+
items: (z.APIResponse?.Items ?? []).map(A),
|
|
223
|
+
sort: z.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
224
|
+
totalCount: z.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
225
225
|
})
|
|
226
226
|
],
|
|
227
|
-
url: r ? Nt.SEARCH_ASSETS :
|
|
227
|
+
url: r ? Nt.SEARCH_ASSETS : Jt["4.0"]
|
|
228
228
|
})).data;
|
|
229
229
|
} catch {
|
|
230
230
|
return { items: [], sort: "", totalCount: 0 };
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
async function
|
|
233
|
+
async function Ce({
|
|
234
234
|
assetId: t,
|
|
235
235
|
extension: e,
|
|
236
236
|
format: i,
|
|
@@ -246,7 +246,7 @@ async function we({
|
|
|
246
246
|
params: {
|
|
247
247
|
SourceAssetFormat: i,
|
|
248
248
|
SourceAssetRecordID: t,
|
|
249
|
-
TargetExtension:
|
|
249
|
+
TargetExtension: se(e),
|
|
250
250
|
Token: a || void 0,
|
|
251
251
|
Transformations: r,
|
|
252
252
|
UseSession: n || void 0
|
|
@@ -262,14 +262,14 @@ async function we({
|
|
|
262
262
|
return null;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
const
|
|
266
|
-
function
|
|
265
|
+
const ke = 50;
|
|
266
|
+
function Re(t, e) {
|
|
267
267
|
const i = [];
|
|
268
268
|
for (let s = 0; s < t.length; s += e)
|
|
269
269
|
i.push(t.slice(s, s + e));
|
|
270
270
|
return i;
|
|
271
271
|
}
|
|
272
|
-
async function
|
|
272
|
+
async function $e({
|
|
273
273
|
consistency: t,
|
|
274
274
|
extraFields: e,
|
|
275
275
|
getPermanentAssetsPaths: i,
|
|
@@ -284,10 +284,10 @@ async function Re({
|
|
|
284
284
|
...l,
|
|
285
285
|
st,
|
|
286
286
|
Rt,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
],
|
|
290
|
-
|
|
287
|
+
ye,
|
|
288
|
+
gt
|
|
289
|
+
], x = Re(a, ke), c = await Promise.all(
|
|
290
|
+
x.map(
|
|
291
291
|
(d) => Xt({
|
|
292
292
|
consistency: t,
|
|
293
293
|
countPerPage: d.length,
|
|
@@ -301,26 +301,26 @@ async function Re({
|
|
|
301
301
|
token: n
|
|
302
302
|
})
|
|
303
303
|
)
|
|
304
|
-
),
|
|
304
|
+
), u = new Map(a.map((d, A) => [d, A])), y = c.flatMap((d) => d.items).map((d) => ({
|
|
305
305
|
name: H(d, st),
|
|
306
|
-
recordId: H(d,
|
|
306
|
+
recordId: H(d, gt),
|
|
307
307
|
...l.reduce(
|
|
308
|
-
(
|
|
308
|
+
(A, k) => Qt(A, d, k),
|
|
309
309
|
{}
|
|
310
310
|
)
|
|
311
311
|
})).sort(
|
|
312
|
-
(d,
|
|
313
|
-
),
|
|
314
|
-
(d,
|
|
312
|
+
(d, A) => (u.get(d.recordId) ?? 1 / 0) - (u.get(A.recordId) ?? 1 / 0)
|
|
313
|
+
), S = c.reduce(
|
|
314
|
+
(d, A) => d + A.totalCount,
|
|
315
315
|
0
|
|
316
316
|
);
|
|
317
|
-
return { facets: [], items:
|
|
317
|
+
return { facets: [], items: y, totalCount: S };
|
|
318
318
|
}
|
|
319
319
|
function H(t, e) {
|
|
320
320
|
const i = t[e];
|
|
321
321
|
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : qt(i) ? i.URI : "";
|
|
322
322
|
}
|
|
323
|
-
async function
|
|
323
|
+
async function Pe({
|
|
324
324
|
consistency: t,
|
|
325
325
|
countPerPage: e,
|
|
326
326
|
directParentFolderIdentifier: i,
|
|
@@ -330,29 +330,29 @@ async function $e({
|
|
|
330
330
|
limitedDocTypes: n,
|
|
331
331
|
pageNumber: l,
|
|
332
332
|
parentFolderIdentifier: p,
|
|
333
|
-
searchTerm:
|
|
333
|
+
searchTerm: x,
|
|
334
334
|
securityByPassToken: c,
|
|
335
|
-
sortOrder:
|
|
336
|
-
token:
|
|
335
|
+
sortOrder: u,
|
|
336
|
+
token: y
|
|
337
337
|
}) {
|
|
338
338
|
if (!i && !p)
|
|
339
339
|
return { facets: [], items: [], totalCount: 0 };
|
|
340
|
-
const
|
|
340
|
+
const S = (s?.filter((b) => b && typeof b == "string") ?? []).map((b) => b.replace("%20", " ")), d = {
|
|
341
341
|
directParentFolderIdentifier: i,
|
|
342
342
|
parentFolderIdentifier: p,
|
|
343
343
|
...n && n.length > 0 ? { docType: n } : {}
|
|
344
|
-
},
|
|
344
|
+
}, A = await Xt({
|
|
345
345
|
consistency: t,
|
|
346
346
|
countPerPage: e,
|
|
347
347
|
fields: [
|
|
348
|
-
...
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
348
|
+
...S,
|
|
349
|
+
xt,
|
|
350
|
+
ft,
|
|
351
|
+
ht,
|
|
352
352
|
Ht,
|
|
353
353
|
Et,
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
lt,
|
|
355
|
+
gt,
|
|
356
356
|
st
|
|
357
357
|
],
|
|
358
358
|
getPermanentAssetsPaths: a,
|
|
@@ -361,22 +361,22 @@ async function $e({
|
|
|
361
361
|
query: d,
|
|
362
362
|
securityByPassToken: c,
|
|
363
363
|
sort: void 0,
|
|
364
|
-
token:
|
|
365
|
-
}), k =
|
|
366
|
-
let
|
|
367
|
-
|
|
368
|
-
const
|
|
364
|
+
token: y
|
|
365
|
+
}), k = A.items.map((b) => {
|
|
366
|
+
let F = H(b, lt);
|
|
367
|
+
F && !F.startsWith(".") && (F = "." + F);
|
|
368
|
+
const z = H(b, gt);
|
|
369
369
|
return {
|
|
370
|
-
docSubType: H(
|
|
371
|
-
docType: H(
|
|
372
|
-
extension:
|
|
373
|
-
id:
|
|
374
|
-
identifier: H(
|
|
375
|
-
name: H(
|
|
376
|
-
recordId:
|
|
377
|
-
size: H(
|
|
378
|
-
...
|
|
379
|
-
(
|
|
370
|
+
docSubType: H(b, Ht),
|
|
371
|
+
docType: H(b, ht) || "",
|
|
372
|
+
extension: F,
|
|
373
|
+
id: z,
|
|
374
|
+
identifier: H(b, Et),
|
|
375
|
+
name: H(b, st),
|
|
376
|
+
recordId: z,
|
|
377
|
+
size: H(b, ft) || "0 MB",
|
|
378
|
+
...S.reduce(
|
|
379
|
+
(et, it) => Qt(et, b, it),
|
|
380
380
|
{}
|
|
381
381
|
)
|
|
382
382
|
};
|
|
@@ -384,10 +384,10 @@ async function $e({
|
|
|
384
384
|
return {
|
|
385
385
|
facets: [],
|
|
386
386
|
items: k,
|
|
387
|
-
totalCount:
|
|
387
|
+
totalCount: A.totalCount
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
async function
|
|
390
|
+
async function Fe({
|
|
391
391
|
autoCropMode: t,
|
|
392
392
|
cropHeight: e,
|
|
393
393
|
cropWidth: i,
|
|
@@ -422,7 +422,7 @@ async function Pe({
|
|
|
422
422
|
return null;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
async function
|
|
425
|
+
async function Qi({
|
|
426
426
|
assetRecordId: t,
|
|
427
427
|
isSiteBuilder: e,
|
|
428
428
|
siteUrl: i,
|
|
@@ -453,13 +453,13 @@ async function Gi({
|
|
|
453
453
|
width: l.width
|
|
454
454
|
})) ?? []
|
|
455
455
|
],
|
|
456
|
-
url: e ? Nt.GET_AVAILABLE_PROXIES :
|
|
456
|
+
url: e ? Nt.GET_AVAILABLE_PROXIES : ie
|
|
457
457
|
})).data;
|
|
458
458
|
} catch {
|
|
459
459
|
return [];
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
async function
|
|
462
|
+
async function Xi({
|
|
463
463
|
siteUrl: t
|
|
464
464
|
} = {}) {
|
|
465
465
|
try {
|
|
@@ -480,13 +480,13 @@ async function Qi({
|
|
|
480
480
|
formatsByDocType: i.formatsByDocType ?? {}
|
|
481
481
|
}
|
|
482
482
|
],
|
|
483
|
-
url:
|
|
483
|
+
url: te
|
|
484
484
|
})).data;
|
|
485
485
|
} catch {
|
|
486
486
|
return { formatsByDocType: {} };
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
async function
|
|
489
|
+
async function Zi({
|
|
490
490
|
recordIds: t,
|
|
491
491
|
rightsToCheck: e
|
|
492
492
|
}) {
|
|
@@ -502,14 +502,14 @@ async function Xi({
|
|
|
502
502
|
params: { RecordIDs: t, RightsToCheck: e },
|
|
503
503
|
paramsSerializer: { indexes: null },
|
|
504
504
|
responseType: "json",
|
|
505
|
-
url:
|
|
505
|
+
url: ee.GET_AUTHORIZED_OBJECTS
|
|
506
506
|
});
|
|
507
507
|
return s;
|
|
508
508
|
} catch {
|
|
509
509
|
return i;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
const vt = 20,
|
|
512
|
+
const vt = 20, Z = "TR1", ct = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me = /* @__PURE__ */ new Set([
|
|
513
513
|
".avif",
|
|
514
514
|
".bmp",
|
|
515
515
|
".gif",
|
|
@@ -520,47 +520,51 @@ const vt = 20, it = "TR1", xt = "TRX", Fe = /* @__PURE__ */ new Set([".gif"]), _
|
|
|
520
520
|
".svg",
|
|
521
521
|
".webp"
|
|
522
522
|
]);
|
|
523
|
-
function
|
|
523
|
+
function Zt(t) {
|
|
524
524
|
const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
|
|
525
|
-
return
|
|
525
|
+
return Me.has(i);
|
|
526
|
+
}
|
|
527
|
+
function Ie(t, e) {
|
|
528
|
+
return t !== void 0 && t !== "" && t !== rt.Image ? !1 : !e || Zt(e);
|
|
526
529
|
}
|
|
527
530
|
function Wt({
|
|
528
531
|
autoFormat: t,
|
|
529
532
|
buildSrcset: e,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
docType: i,
|
|
534
|
+
extension: s,
|
|
535
|
+
format: a,
|
|
536
|
+
item: r,
|
|
537
|
+
manualFormat: n,
|
|
538
|
+
size: l
|
|
535
539
|
}) {
|
|
536
|
-
const
|
|
537
|
-
const
|
|
538
|
-
if (!
|
|
540
|
+
const p = s?.toLowerCase() ?? "", x = p.startsWith(".") ? p : `.${p}`, c = `path_${Z}`, u = (d, A) => {
|
|
541
|
+
const k = r[d];
|
|
542
|
+
if (!k)
|
|
539
543
|
return;
|
|
540
|
-
const
|
|
541
|
-
autoFormat: !
|
|
542
|
-
extension:
|
|
543
|
-
format:
|
|
544
|
-
}) :
|
|
544
|
+
const b = r[`${d}${jt}`], F = r[`${d}${Vt}`], z = t ? bt(k, [], {
|
|
545
|
+
autoFormat: !n,
|
|
546
|
+
extension: p,
|
|
547
|
+
format: A
|
|
548
|
+
}) : k;
|
|
545
549
|
return {
|
|
546
|
-
maxHeight:
|
|
547
|
-
maxWidth:
|
|
548
|
-
src:
|
|
549
|
-
srcset: e ?
|
|
550
|
-
extension:
|
|
551
|
-
format:
|
|
552
|
-
maxWidth:
|
|
550
|
+
maxHeight: F,
|
|
551
|
+
maxWidth: b,
|
|
552
|
+
src: z,
|
|
553
|
+
srcset: e ? ae(z, {
|
|
554
|
+
extension: p,
|
|
555
|
+
format: A,
|
|
556
|
+
maxWidth: oe(n, b)
|
|
553
557
|
}) : ""
|
|
554
558
|
};
|
|
555
559
|
};
|
|
556
|
-
if (!
|
|
557
|
-
const
|
|
558
|
-
return
|
|
560
|
+
if (!n) {
|
|
561
|
+
const d = Lt(p, l), A = `path_${d}`;
|
|
562
|
+
return u(A, d) ?? u(c, Z) ?? {};
|
|
559
563
|
}
|
|
560
|
-
const
|
|
561
|
-
return
|
|
564
|
+
const y = a ? `path_${a}` : void 0;
|
|
565
|
+
return y && r[y] ? a !== ct || Ie(i, p) ? u(y, a) ?? {} : u(c, Z) ?? {} : !!p && _e.has(x) ? u(`path_${ct}`, ct) ?? u(c, Z) ?? {} : u(c, Z) ?? {};
|
|
562
566
|
}
|
|
563
|
-
class
|
|
567
|
+
class Ki {
|
|
564
568
|
constructor(e, i) {
|
|
565
569
|
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = vt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
|
|
566
570
|
const s = i?.maxEnd;
|
|
@@ -605,24 +609,24 @@ class Zi {
|
|
|
605
609
|
const l = this.requestEpoch;
|
|
606
610
|
if (!this.folderId || l !== this.requestEpoch)
|
|
607
611
|
return this.data;
|
|
608
|
-
const p = s ? `path_${s}` : void 0,
|
|
612
|
+
const p = s ? `path_${s}` : void 0, x = `path_${Z}`, c = `path_${ct}`, u = [
|
|
609
613
|
...new Set(
|
|
610
|
-
[p,
|
|
614
|
+
[p, x, c].filter(
|
|
611
615
|
(d) => !!d
|
|
612
616
|
)
|
|
613
617
|
)
|
|
614
|
-
],
|
|
615
|
-
for (let d =
|
|
618
|
+
], y = Math.floor(r / this.pageSize) + 1, S = Math.floor(e / this.pageSize) + 1;
|
|
619
|
+
for (let d = y; d <= S; d++) {
|
|
616
620
|
if (this.fetchedPages.has(d))
|
|
617
621
|
continue;
|
|
618
|
-
const
|
|
622
|
+
const A = await Pe({
|
|
619
623
|
consistency: this.consistency,
|
|
620
624
|
countPerPage: this.pageSize,
|
|
621
625
|
directParentFolderIdentifier: this.folderId,
|
|
622
|
-
extraFields: [...i, ...
|
|
626
|
+
extraFields: [...i, ...u],
|
|
623
627
|
getPermanentAssetsPaths: !0,
|
|
624
628
|
isSiteBuilder: this.isSiteBuilder,
|
|
625
|
-
limitedDocTypes: [
|
|
629
|
+
limitedDocTypes: [rt.Image, rt.Audio, rt.Video, rt.Multimedia],
|
|
626
630
|
pageNumber: d,
|
|
627
631
|
searchTerm: "",
|
|
628
632
|
securityByPassToken: this.securityByPassToken,
|
|
@@ -631,46 +635,47 @@ class Zi {
|
|
|
631
635
|
});
|
|
632
636
|
if (l !== this.requestEpoch)
|
|
633
637
|
return this.data;
|
|
634
|
-
if (this.fetchedPages.add(d), !this.totalCount &&
|
|
635
|
-
const
|
|
636
|
-
this.totalCount =
|
|
638
|
+
if (this.fetchedPages.add(d), !this.totalCount && A.totalCount) {
|
|
639
|
+
const b = Math.min(this.maxEnd, A.totalCount);
|
|
640
|
+
this.totalCount = b, this.data = Array.from({ length: b }, () => ({
|
|
637
641
|
alt: "",
|
|
638
|
-
id: `temp-${
|
|
642
|
+
id: `temp-${ne()}`,
|
|
639
643
|
name: "",
|
|
640
644
|
src: ""
|
|
641
645
|
}));
|
|
642
646
|
}
|
|
643
647
|
const k = (d - 1) * this.pageSize;
|
|
644
|
-
for (let
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
const
|
|
648
|
-
maxHeight:
|
|
649
|
-
maxWidth:
|
|
650
|
-
src:
|
|
651
|
-
srcset:
|
|
648
|
+
for (let b = 0; b < A.items.length; b++) {
|
|
649
|
+
const F = k + b;
|
|
650
|
+
if (F < this.data.length) {
|
|
651
|
+
const z = A.items[b], {
|
|
652
|
+
maxHeight: et,
|
|
653
|
+
maxWidth: it,
|
|
654
|
+
src: Kt,
|
|
655
|
+
srcset: Yt
|
|
652
656
|
} = Wt({
|
|
653
657
|
autoFormat: this.autoFormat,
|
|
654
658
|
buildSrcset: this.buildSrcset,
|
|
655
|
-
|
|
659
|
+
docType: z.docType,
|
|
660
|
+
extension: z.extension,
|
|
656
661
|
format: s,
|
|
657
|
-
item:
|
|
662
|
+
item: z,
|
|
658
663
|
manualFormat: a,
|
|
659
|
-
size:
|
|
664
|
+
size: z.size
|
|
660
665
|
});
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
alt:
|
|
664
|
-
docType:
|
|
665
|
-
extension:
|
|
666
|
-
id:
|
|
667
|
-
maxHeight:
|
|
668
|
-
maxWidth:
|
|
669
|
-
name:
|
|
670
|
-
src:
|
|
666
|
+
let pt = Kt, Pt = Yt;
|
|
667
|
+
pt && n && n.length > 0 && (pt = bt(pt, n), Pt = ""), this.data[F] = {
|
|
668
|
+
alt: z.name,
|
|
669
|
+
docType: z.docType,
|
|
670
|
+
extension: z.extension,
|
|
671
|
+
id: z.id,
|
|
672
|
+
maxHeight: et,
|
|
673
|
+
maxWidth: it,
|
|
674
|
+
name: z.name,
|
|
675
|
+
src: pt,
|
|
671
676
|
srcset: Pt,
|
|
672
677
|
...i.reduce(
|
|
673
|
-
(Ft, _t) => (Ft[_t] =
|
|
678
|
+
(Ft, _t) => (Ft[_t] = z[_t] ?? "", Ft),
|
|
674
679
|
{}
|
|
675
680
|
)
|
|
676
681
|
};
|
|
@@ -687,28 +692,28 @@ class Zi {
|
|
|
687
692
|
manualFormat: n = !0,
|
|
688
693
|
minLimit: l = 5,
|
|
689
694
|
noPlaceholders: p = !1,
|
|
690
|
-
transformations:
|
|
695
|
+
transformations: x
|
|
691
696
|
}) {
|
|
692
697
|
(!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
|
|
693
|
-
const c = Math.max(5, l),
|
|
698
|
+
const c = Math.max(5, l), u = e, y = e + c, S = [...i];
|
|
694
699
|
await this.fetchImages({
|
|
695
|
-
end:
|
|
696
|
-
extraFields:
|
|
700
|
+
end: y,
|
|
701
|
+
extraFields: S.filter((k) => k !== ""),
|
|
697
702
|
format: r,
|
|
698
703
|
manualFormat: n,
|
|
699
|
-
start:
|
|
700
|
-
transformations:
|
|
704
|
+
start: u,
|
|
705
|
+
transformations: x
|
|
701
706
|
});
|
|
702
707
|
let d = e - c;
|
|
703
708
|
d < 0 && (this.totalCount === 0 ? d = 0 : d = Math.max(0, this.totalCount + d));
|
|
704
|
-
const
|
|
709
|
+
const A = d + c;
|
|
705
710
|
return await this.fetchImages({
|
|
706
|
-
end:
|
|
707
|
-
extraFields:
|
|
711
|
+
end: A,
|
|
712
|
+
extraFields: S.filter((k) => k !== ""),
|
|
708
713
|
format: r,
|
|
709
714
|
manualFormat: n,
|
|
710
715
|
start: d,
|
|
711
|
-
transformations:
|
|
716
|
+
transformations: x
|
|
712
717
|
}), p ? this.data.filter((k) => k.id && !k.id.startsWith("temp-")) : this.data;
|
|
713
718
|
}
|
|
714
719
|
async fetchImagesByIDs({
|
|
@@ -720,49 +725,50 @@ class Zi {
|
|
|
720
725
|
}) {
|
|
721
726
|
if (a.length === 0)
|
|
722
727
|
return [];
|
|
723
|
-
const n = i ? `path_${i}` : void 0, l = `path_${
|
|
728
|
+
const n = i ? `path_${i}` : void 0, l = `path_${Z}`, p = `path_${ct}`, x = [
|
|
724
729
|
...new Set(
|
|
725
730
|
[n, l, p].filter(
|
|
726
|
-
(
|
|
731
|
+
(S) => !!S
|
|
727
732
|
)
|
|
728
733
|
)
|
|
729
|
-
], c = [
|
|
730
|
-
return (await
|
|
734
|
+
], c = [lt, ft], u = [...e, ht];
|
|
735
|
+
return (await $e({
|
|
731
736
|
consistency: this.consistency,
|
|
732
|
-
extraFields: [...
|
|
737
|
+
extraFields: [...u, ...x, ...c].filter((S) => S !== ""),
|
|
733
738
|
getPermanentAssetsPaths: !0,
|
|
734
739
|
isSiteBuilder: this.isSiteBuilder,
|
|
735
740
|
recordIds: a,
|
|
736
741
|
securityByPassToken: this.securityByPassToken,
|
|
737
742
|
token: this.authToken
|
|
738
|
-
})).items.map((
|
|
743
|
+
})).items.map((S) => {
|
|
739
744
|
const {
|
|
740
745
|
maxHeight: d,
|
|
741
|
-
maxWidth:
|
|
746
|
+
maxWidth: A,
|
|
742
747
|
src: k,
|
|
743
|
-
srcset:
|
|
748
|
+
srcset: b
|
|
744
749
|
} = Wt({
|
|
745
750
|
autoFormat: this.autoFormat,
|
|
746
751
|
buildSrcset: this.buildSrcset,
|
|
747
|
-
|
|
752
|
+
docType: S[ht],
|
|
753
|
+
extension: S[lt],
|
|
748
754
|
format: i,
|
|
749
|
-
item:
|
|
755
|
+
item: S,
|
|
750
756
|
manualFormat: s,
|
|
751
|
-
size:
|
|
757
|
+
size: S[ft]
|
|
752
758
|
});
|
|
753
|
-
let
|
|
754
|
-
return
|
|
755
|
-
alt:
|
|
756
|
-
docType:
|
|
757
|
-
extension:
|
|
758
|
-
id:
|
|
759
|
+
let F = k, z = b;
|
|
760
|
+
return F && r && r.length > 0 && (F = bt(F, r), z = ""), {
|
|
761
|
+
alt: S.name,
|
|
762
|
+
docType: S[ht],
|
|
763
|
+
extension: S[lt] || "",
|
|
764
|
+
id: S.recordId,
|
|
759
765
|
maxHeight: d,
|
|
760
|
-
maxWidth:
|
|
761
|
-
name:
|
|
762
|
-
src:
|
|
763
|
-
srcset:
|
|
764
|
-
...
|
|
765
|
-
(
|
|
766
|
+
maxWidth: A,
|
|
767
|
+
name: S.name,
|
|
768
|
+
src: F,
|
|
769
|
+
srcset: z,
|
|
770
|
+
...u.reduce(
|
|
771
|
+
(et, it) => (et[it] = S[it] ?? "", et),
|
|
766
772
|
{}
|
|
767
773
|
)
|
|
768
774
|
};
|
|
@@ -777,18 +783,18 @@ class Zi {
|
|
|
777
783
|
noPlaceholders: n = !1,
|
|
778
784
|
page: l,
|
|
779
785
|
pageSize: p = 10,
|
|
780
|
-
transformations:
|
|
786
|
+
transformations: x
|
|
781
787
|
}) {
|
|
782
788
|
(!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
|
|
783
|
-
const c = l * p,
|
|
789
|
+
const c = l * p, u = c + p - 1;
|
|
784
790
|
return await this.fetchImages({
|
|
785
|
-
end:
|
|
791
|
+
end: u,
|
|
786
792
|
extraFields: e,
|
|
787
793
|
format: a,
|
|
788
794
|
manualFormat: r,
|
|
789
795
|
start: c,
|
|
790
|
-
transformations:
|
|
791
|
-
}), n ? this.data.filter((
|
|
796
|
+
transformations: x
|
|
797
|
+
}), n ? this.data.filter((y) => y.id && !y.id.startsWith("temp-")) : this.data;
|
|
792
798
|
}
|
|
793
799
|
async *fetchImagesInFolderByChunk({
|
|
794
800
|
chunkSize: e = 10,
|
|
@@ -799,7 +805,7 @@ class Zi {
|
|
|
799
805
|
format: n,
|
|
800
806
|
manualFormat: l = !0,
|
|
801
807
|
start: p = 0,
|
|
802
|
-
transformations:
|
|
808
|
+
transformations: x
|
|
803
809
|
}) {
|
|
804
810
|
const c = Math.max(1, e);
|
|
805
811
|
if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
|
|
@@ -809,27 +815,27 @@ class Zi {
|
|
|
809
815
|
format: n,
|
|
810
816
|
manualFormat: l,
|
|
811
817
|
start: p,
|
|
812
|
-
transformations:
|
|
818
|
+
transformations: x
|
|
813
819
|
}), yield this.data;
|
|
814
820
|
return;
|
|
815
821
|
}
|
|
816
|
-
let
|
|
822
|
+
let u = p, y = p + c;
|
|
817
823
|
if (await this.fetchImages({
|
|
818
|
-
end:
|
|
824
|
+
end: y,
|
|
819
825
|
extraFields: s,
|
|
820
826
|
format: n,
|
|
821
827
|
manualFormat: l,
|
|
822
|
-
start:
|
|
823
|
-
transformations:
|
|
824
|
-
}), yield this.data, !(!this.totalCount || this.totalCount <=
|
|
825
|
-
for (;
|
|
826
|
-
|
|
827
|
-
end:
|
|
828
|
+
start: u,
|
|
829
|
+
transformations: x
|
|
830
|
+
}), yield this.data, !(!this.totalCount || this.totalCount <= y))
|
|
831
|
+
for (; y < this.totalCount; )
|
|
832
|
+
u = y, y = Math.min(y + c, this.totalCount), await this.fetchImages({
|
|
833
|
+
end: y,
|
|
828
834
|
extraFields: s,
|
|
829
835
|
format: n,
|
|
830
836
|
manualFormat: l,
|
|
831
|
-
start:
|
|
832
|
-
transformations:
|
|
837
|
+
start: u,
|
|
838
|
+
transformations: x
|
|
833
839
|
}), yield this.data;
|
|
834
840
|
}
|
|
835
841
|
hostConnected() {
|
|
@@ -844,13 +850,13 @@ class Zi {
|
|
|
844
850
|
this.resetPageCache();
|
|
845
851
|
}
|
|
846
852
|
}
|
|
847
|
-
const
|
|
848
|
-
var
|
|
849
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
853
|
+
const Ee = j`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, He = j`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
|
|
854
|
+
var Te = Object.defineProperty, We = Object.getOwnPropertyDescriptor, w = (t, e, i, s) => {
|
|
855
|
+
for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
850
856
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
851
|
-
return s && a &&
|
|
857
|
+
return s && a && Te(e, i, a), a;
|
|
852
858
|
};
|
|
853
|
-
let
|
|
859
|
+
let v = class extends q {
|
|
854
860
|
constructor() {
|
|
855
861
|
super(...arguments), this.localize = new V(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
|
|
856
862
|
[o.Pixel]: {
|
|
@@ -964,7 +970,7 @@ let A = class extends q {
|
|
|
964
970
|
const [s, a] = e.split(":").map(Number);
|
|
965
971
|
if (this.unit === o.Pixel) {
|
|
966
972
|
let r = s, n = a;
|
|
967
|
-
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } =
|
|
973
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = le(
|
|
968
974
|
this.maxWidth,
|
|
969
975
|
this.maxHeight,
|
|
970
976
|
s,
|
|
@@ -1086,7 +1092,7 @@ let A = class extends q {
|
|
|
1086
1092
|
!this.noRatioModes,
|
|
1087
1093
|
() => C`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
|
|
1088
1094
|
width: "100%"
|
|
1089
|
-
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${
|
|
1095
|
+
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${nt(
|
|
1090
1096
|
t,
|
|
1091
1097
|
(i) => i.value,
|
|
1092
1098
|
({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1095,7 +1101,7 @@ let A = class extends q {
|
|
|
1095
1101
|
e.length > 0,
|
|
1096
1102
|
() => C`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
1097
1103
|
)}
|
|
1098
|
-
${
|
|
1104
|
+
${nt(
|
|
1099
1105
|
e,
|
|
1100
1106
|
(i) => i.value,
|
|
1101
1107
|
({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1113,7 +1119,7 @@ let A = class extends q {
|
|
|
1113
1119
|
this.focusModes.length > 0,
|
|
1114
1120
|
() => C`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
|
|
1115
1121
|
width: "100%"
|
|
1116
|
-
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${
|
|
1122
|
+
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${nt(
|
|
1117
1123
|
this.focusModes,
|
|
1118
1124
|
(i) => i.value,
|
|
1119
1125
|
({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1127,117 +1133,117 @@ let A = class extends q {
|
|
|
1127
1133
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1128
1134
|
}
|
|
1129
1135
|
};
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
"cx-button":
|
|
1136
|
+
v.styles = [G, He];
|
|
1137
|
+
v.dependencies = {
|
|
1138
|
+
"cx-button": Y,
|
|
1133
1139
|
"cx-details": at,
|
|
1134
1140
|
"cx-divider": Ut,
|
|
1135
1141
|
"cx-icon": ot,
|
|
1136
1142
|
"cx-icon-button": Ct,
|
|
1137
1143
|
"cx-input": kt,
|
|
1138
1144
|
"cx-option": yt,
|
|
1139
|
-
"cx-position-picker":
|
|
1145
|
+
"cx-position-picker": he,
|
|
1140
1146
|
"cx-select": St,
|
|
1141
1147
|
"cx-space": U,
|
|
1142
1148
|
"cx-typography": B
|
|
1143
1149
|
};
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
],
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
],
|
|
1150
|
-
|
|
1150
|
+
w([
|
|
1151
|
+
J(".details")
|
|
1152
|
+
], v.prototype, "base", 2);
|
|
1153
|
+
w([
|
|
1154
|
+
J("cx-position-picker")
|
|
1155
|
+
], v.prototype, "positionPicker", 2);
|
|
1156
|
+
w([
|
|
1151
1157
|
h({ reflect: !0, type: Boolean })
|
|
1152
|
-
],
|
|
1153
|
-
|
|
1158
|
+
], v.prototype, "open", 2);
|
|
1159
|
+
w([
|
|
1154
1160
|
h({ reflect: !0, type: Number })
|
|
1155
|
-
],
|
|
1156
|
-
|
|
1161
|
+
], v.prototype, "width", 2);
|
|
1162
|
+
w([
|
|
1157
1163
|
h({ reflect: !0, type: Number })
|
|
1158
|
-
],
|
|
1159
|
-
|
|
1164
|
+
], v.prototype, "height", 2);
|
|
1165
|
+
w([
|
|
1160
1166
|
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1161
|
-
],
|
|
1162
|
-
|
|
1167
|
+
], v.prototype, "maxWidth", 2);
|
|
1168
|
+
w([
|
|
1163
1169
|
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1164
|
-
],
|
|
1165
|
-
|
|
1170
|
+
], v.prototype, "maxHeight", 2);
|
|
1171
|
+
w([
|
|
1166
1172
|
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1167
|
-
],
|
|
1168
|
-
|
|
1173
|
+
], v.prototype, "ratioWidth", 2);
|
|
1174
|
+
w([
|
|
1169
1175
|
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1170
|
-
],
|
|
1171
|
-
|
|
1176
|
+
], v.prototype, "ratioHeight", 2);
|
|
1177
|
+
w([
|
|
1172
1178
|
h({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
1173
|
-
],
|
|
1174
|
-
|
|
1179
|
+
], v.prototype, "percentageWidth", 2);
|
|
1180
|
+
w([
|
|
1175
1181
|
h({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
1176
|
-
],
|
|
1177
|
-
|
|
1182
|
+
], v.prototype, "percentageHeight", 2);
|
|
1183
|
+
w([
|
|
1178
1184
|
h({ reflect: !0, type: String })
|
|
1179
|
-
],
|
|
1180
|
-
|
|
1185
|
+
], v.prototype, "unit", 2);
|
|
1186
|
+
w([
|
|
1181
1187
|
h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
1182
|
-
],
|
|
1183
|
-
|
|
1188
|
+
], v.prototype, "disabledApply", 2);
|
|
1189
|
+
w([
|
|
1184
1190
|
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1185
|
-
],
|
|
1186
|
-
|
|
1191
|
+
], v.prototype, "noRatioModes", 2);
|
|
1192
|
+
w([
|
|
1187
1193
|
h({ attribute: "show-position-picker", reflect: !0, type: Boolean })
|
|
1188
|
-
],
|
|
1189
|
-
|
|
1194
|
+
], v.prototype, "showPositionPicker", 2);
|
|
1195
|
+
w([
|
|
1190
1196
|
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1191
|
-
],
|
|
1192
|
-
|
|
1197
|
+
], v.prototype, "lastAppliedSetting", 2);
|
|
1198
|
+
w([
|
|
1193
1199
|
h({ reflect: !0, type: Boolean })
|
|
1194
|
-
],
|
|
1195
|
-
|
|
1200
|
+
], v.prototype, "loading", 2);
|
|
1201
|
+
w([
|
|
1196
1202
|
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
1197
|
-
],
|
|
1198
|
-
|
|
1203
|
+
], v.prototype, "cropModes", 2);
|
|
1204
|
+
w([
|
|
1199
1205
|
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
1200
|
-
],
|
|
1201
|
-
|
|
1206
|
+
], v.prototype, "focusModes", 2);
|
|
1207
|
+
w([
|
|
1202
1208
|
h({ attribute: "focus-mode", reflect: !0, type: String })
|
|
1203
|
-
],
|
|
1204
|
-
|
|
1209
|
+
], v.prototype, "focusMode", 2);
|
|
1210
|
+
w([
|
|
1205
1211
|
h({ attribute: "crop-mode", reflect: !0, type: String })
|
|
1206
|
-
],
|
|
1207
|
-
|
|
1212
|
+
], v.prototype, "cropMode", 2);
|
|
1213
|
+
w([
|
|
1208
1214
|
h({ reflect: !0, type: String })
|
|
1209
|
-
],
|
|
1210
|
-
|
|
1215
|
+
], v.prototype, "position", 2);
|
|
1216
|
+
w([
|
|
1211
1217
|
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1212
|
-
],
|
|
1213
|
-
|
|
1218
|
+
], v.prototype, "keepAspectRatio", 2);
|
|
1219
|
+
w([
|
|
1214
1220
|
$()
|
|
1215
|
-
],
|
|
1216
|
-
|
|
1221
|
+
], v.prototype, "invalidWidth", 2);
|
|
1222
|
+
w([
|
|
1217
1223
|
$()
|
|
1218
|
-
],
|
|
1219
|
-
|
|
1224
|
+
], v.prototype, "invalidHeight", 2);
|
|
1225
|
+
w([
|
|
1220
1226
|
$()
|
|
1221
|
-
],
|
|
1222
|
-
|
|
1227
|
+
], v.prototype, "aspectRatio", 2);
|
|
1228
|
+
w([
|
|
1223
1229
|
_("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1224
1230
|
_("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1225
1231
|
_("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1226
1232
|
_("keepAspectRatio")
|
|
1227
|
-
],
|
|
1228
|
-
|
|
1233
|
+
], v.prototype, "handleCropModeChange", 1);
|
|
1234
|
+
w([
|
|
1229
1235
|
_("open", { waitUntilFirstUpdate: !0 })
|
|
1230
|
-
],
|
|
1231
|
-
|
|
1236
|
+
], v.prototype, "handleOpenChange", 1);
|
|
1237
|
+
v = w([
|
|
1232
1238
|
Q("cx-asset-link-format-crop")
|
|
1233
|
-
],
|
|
1234
|
-
const
|
|
1235
|
-
var
|
|
1236
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1239
|
+
], v);
|
|
1240
|
+
const De = j`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
|
|
1241
|
+
var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, $t = (t, e, i, s) => {
|
|
1242
|
+
for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1237
1243
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1238
|
-
return s && a &&
|
|
1244
|
+
return s && a && Ne(e, i, a), a;
|
|
1239
1245
|
};
|
|
1240
|
-
let
|
|
1246
|
+
let K = class extends q {
|
|
1241
1247
|
constructor() {
|
|
1242
1248
|
super(...arguments), this.localize = new V(this), this.value = "", this.items = [];
|
|
1243
1249
|
}
|
|
@@ -1248,15 +1254,15 @@ let Z = class extends q {
|
|
|
1248
1254
|
});
|
|
1249
1255
|
}
|
|
1250
1256
|
render() {
|
|
1251
|
-
return C`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${
|
|
1257
|
+
return C`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${nt(
|
|
1252
1258
|
this.items,
|
|
1253
1259
|
(t) => t.value,
|
|
1254
1260
|
(t) => C`<cx-option value=${t.value}>${t.displayName}</cx-option>`
|
|
1255
1261
|
)}</cx-select></cx-space>`;
|
|
1256
1262
|
}
|
|
1257
1263
|
};
|
|
1258
|
-
|
|
1259
|
-
|
|
1264
|
+
K.styles = [G, De];
|
|
1265
|
+
K.dependencies = {
|
|
1260
1266
|
"cx-option": yt,
|
|
1261
1267
|
"cx-select": St,
|
|
1262
1268
|
"cx-space": U,
|
|
@@ -1264,18 +1270,18 @@ Z.dependencies = {
|
|
|
1264
1270
|
};
|
|
1265
1271
|
$t([
|
|
1266
1272
|
h({ reflect: !0, type: String })
|
|
1267
|
-
],
|
|
1273
|
+
], K.prototype, "value", 2);
|
|
1268
1274
|
$t([
|
|
1269
1275
|
h({ reflect: !1, type: Array })
|
|
1270
|
-
],
|
|
1271
|
-
|
|
1276
|
+
], K.prototype, "items", 2);
|
|
1277
|
+
K = $t([
|
|
1272
1278
|
Q("cx-asset-link-format-extension")
|
|
1273
|
-
],
|
|
1274
|
-
const
|
|
1275
|
-
var
|
|
1276
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1279
|
+
], K);
|
|
1280
|
+
const Le = j`cx-details::part(base){border-bottom-width:0}`;
|
|
1281
|
+
var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
|
|
1282
|
+
for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1277
1283
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1278
|
-
return s && a &&
|
|
1284
|
+
return s && a && Ue(e, i, a), a;
|
|
1279
1285
|
};
|
|
1280
1286
|
const zt = "auto";
|
|
1281
1287
|
let I = class extends q {
|
|
@@ -1337,7 +1343,7 @@ let I = class extends q {
|
|
|
1337
1343
|
t.target !== this.base && t.stopPropagation();
|
|
1338
1344
|
}
|
|
1339
1345
|
render() {
|
|
1340
|
-
return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${
|
|
1346
|
+
return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${nt(
|
|
1341
1347
|
this.items,
|
|
1342
1348
|
(t) => t.id,
|
|
1343
1349
|
(t) => C`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
@@ -1351,9 +1357,9 @@ let I = class extends q {
|
|
|
1351
1357
|
})} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1352
1358
|
}
|
|
1353
1359
|
};
|
|
1354
|
-
I.styles = [G,
|
|
1360
|
+
I.styles = [G, Le];
|
|
1355
1361
|
I.dependencies = {
|
|
1356
|
-
"cx-button":
|
|
1362
|
+
"cx-button": Y,
|
|
1357
1363
|
"cx-details": at,
|
|
1358
1364
|
"cx-divider": Ut,
|
|
1359
1365
|
"cx-icon": ot,
|
|
@@ -1363,7 +1369,7 @@ I.dependencies = {
|
|
|
1363
1369
|
"cx-typography": B
|
|
1364
1370
|
};
|
|
1365
1371
|
D([
|
|
1366
|
-
|
|
1372
|
+
J(".details")
|
|
1367
1373
|
], I.prototype, "base", 2);
|
|
1368
1374
|
D([
|
|
1369
1375
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1396,11 +1402,11 @@ D([
|
|
|
1396
1402
|
I = D([
|
|
1397
1403
|
Q("cx-asset-link-format-proxy")
|
|
1398
1404
|
], I);
|
|
1399
|
-
const
|
|
1400
|
-
var
|
|
1401
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1405
|
+
const qe = j`cx-details::part(base){border-bottom-width:0}`;
|
|
1406
|
+
var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
|
|
1407
|
+
for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1402
1408
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1403
|
-
return s && a &&
|
|
1409
|
+
return s && a && je(e, i, a), a;
|
|
1404
1410
|
};
|
|
1405
1411
|
let W = class extends q {
|
|
1406
1412
|
constructor() {
|
|
@@ -1453,9 +1459,9 @@ let W = class extends q {
|
|
|
1453
1459
|
})} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip><cx-button data-testid="cx-asset-link-format-quality-apply" variant="primary" ?disabled=${this.invalidValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1454
1460
|
}
|
|
1455
1461
|
};
|
|
1456
|
-
W.styles = [G,
|
|
1462
|
+
W.styles = [G, qe];
|
|
1457
1463
|
W.dependencies = {
|
|
1458
|
-
"cx-button":
|
|
1464
|
+
"cx-button": Y,
|
|
1459
1465
|
"cx-details": at,
|
|
1460
1466
|
"cx-icon": ot,
|
|
1461
1467
|
"cx-input": kt,
|
|
@@ -1463,32 +1469,32 @@ W.dependencies = {
|
|
|
1463
1469
|
"cx-tooltip": Bt,
|
|
1464
1470
|
"cx-typography": B
|
|
1465
1471
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1472
|
+
tt([
|
|
1473
|
+
J(".details")
|
|
1468
1474
|
], W.prototype, "base", 2);
|
|
1469
|
-
|
|
1475
|
+
tt([
|
|
1470
1476
|
h({ reflect: !0, type: Boolean })
|
|
1471
1477
|
], W.prototype, "open", 2);
|
|
1472
|
-
|
|
1478
|
+
tt([
|
|
1473
1479
|
h({ reflect: !0, type: Number })
|
|
1474
1480
|
], W.prototype, "value", 2);
|
|
1475
|
-
|
|
1481
|
+
tt([
|
|
1476
1482
|
h({ reflect: !0, type: Boolean })
|
|
1477
1483
|
], W.prototype, "loading", 2);
|
|
1478
|
-
|
|
1484
|
+
tt([
|
|
1479
1485
|
$()
|
|
1480
1486
|
], W.prototype, "scopedValue", 2);
|
|
1481
|
-
|
|
1487
|
+
tt([
|
|
1482
1488
|
_("value")
|
|
1483
1489
|
], W.prototype, "handleValueChange", 1);
|
|
1484
|
-
W =
|
|
1490
|
+
W = tt([
|
|
1485
1491
|
Q("cx-asset-link-format-quality")
|
|
1486
1492
|
], W);
|
|
1487
|
-
const
|
|
1488
|
-
var
|
|
1489
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1493
|
+
const Ge = j`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
|
|
1494
|
+
var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, P = (t, e, i, s) => {
|
|
1495
|
+
for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1490
1496
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1491
|
-
return s && a &&
|
|
1497
|
+
return s && a && Qe(e, i, a), a;
|
|
1492
1498
|
};
|
|
1493
1499
|
let R = class extends q {
|
|
1494
1500
|
constructor() {
|
|
@@ -1645,9 +1651,9 @@ let R = class extends q {
|
|
|
1645
1651
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1646
1652
|
}
|
|
1647
1653
|
};
|
|
1648
|
-
R.styles = [G,
|
|
1654
|
+
R.styles = [G, Ge];
|
|
1649
1655
|
R.dependencies = {
|
|
1650
|
-
"cx-button":
|
|
1656
|
+
"cx-button": Y,
|
|
1651
1657
|
"cx-details": at,
|
|
1652
1658
|
"cx-icon": ot,
|
|
1653
1659
|
"cx-icon-button": Ct,
|
|
@@ -1657,71 +1663,71 @@ R.dependencies = {
|
|
|
1657
1663
|
"cx-space": U,
|
|
1658
1664
|
"cx-typography": B
|
|
1659
1665
|
};
|
|
1660
|
-
|
|
1661
|
-
|
|
1666
|
+
P([
|
|
1667
|
+
J(".details")
|
|
1662
1668
|
], R.prototype, "base", 2);
|
|
1663
|
-
|
|
1669
|
+
P([
|
|
1664
1670
|
h({ reflect: !0, type: Boolean })
|
|
1665
1671
|
], R.prototype, "open", 2);
|
|
1666
|
-
|
|
1672
|
+
P([
|
|
1667
1673
|
h({ reflect: !0, type: Number })
|
|
1668
1674
|
], R.prototype, "width", 2);
|
|
1669
|
-
|
|
1675
|
+
P([
|
|
1670
1676
|
h({ reflect: !0, type: Number })
|
|
1671
1677
|
], R.prototype, "height", 2);
|
|
1672
|
-
|
|
1678
|
+
P([
|
|
1673
1679
|
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1674
1680
|
], R.prototype, "maxWidth", 2);
|
|
1675
|
-
|
|
1681
|
+
P([
|
|
1676
1682
|
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1677
1683
|
], R.prototype, "maxHeight", 2);
|
|
1678
|
-
|
|
1684
|
+
P([
|
|
1679
1685
|
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1680
1686
|
], R.prototype, "ratioWidth", 2);
|
|
1681
|
-
|
|
1687
|
+
P([
|
|
1682
1688
|
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1683
1689
|
], R.prototype, "ratioHeight", 2);
|
|
1684
|
-
|
|
1690
|
+
P([
|
|
1685
1691
|
h({ reflect: !0, type: String })
|
|
1686
1692
|
], R.prototype, "unit", 2);
|
|
1687
|
-
|
|
1693
|
+
P([
|
|
1688
1694
|
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1689
1695
|
], R.prototype, "lastAppliedSetting", 2);
|
|
1690
|
-
|
|
1696
|
+
P([
|
|
1691
1697
|
h({ reflect: !0, type: Boolean })
|
|
1692
1698
|
], R.prototype, "loading", 2);
|
|
1693
|
-
|
|
1699
|
+
P([
|
|
1694
1700
|
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1695
1701
|
], R.prototype, "noRatioModes", 2);
|
|
1696
|
-
|
|
1702
|
+
P([
|
|
1697
1703
|
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1698
1704
|
], R.prototype, "keepAspectRatio", 2);
|
|
1699
|
-
|
|
1705
|
+
P([
|
|
1700
1706
|
$()
|
|
1701
1707
|
], R.prototype, "invalidWidth", 2);
|
|
1702
|
-
|
|
1708
|
+
P([
|
|
1703
1709
|
$()
|
|
1704
1710
|
], R.prototype, "invalidHeight", 2);
|
|
1705
|
-
|
|
1711
|
+
P([
|
|
1706
1712
|
$()
|
|
1707
1713
|
], R.prototype, "aspectRatio", 2);
|
|
1708
|
-
|
|
1714
|
+
P([
|
|
1709
1715
|
_("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1710
1716
|
_("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1711
1717
|
_("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1712
1718
|
_("keepAspectRatio")
|
|
1713
1719
|
], R.prototype, "handleCropModeChange", 1);
|
|
1714
|
-
|
|
1720
|
+
P([
|
|
1715
1721
|
_("open", { waitUntilFirstUpdate: !0 })
|
|
1716
1722
|
], R.prototype, "handleOpenChange", 1);
|
|
1717
|
-
R =
|
|
1723
|
+
R = P([
|
|
1718
1724
|
Q("cx-asset-link-format-resize")
|
|
1719
1725
|
], R);
|
|
1720
|
-
const
|
|
1721
|
-
var
|
|
1722
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1726
|
+
const Ze = j`cx-details::part(base){border-bottom-width:0}`;
|
|
1727
|
+
var Ke = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, X = (t, e, i, s) => {
|
|
1728
|
+
for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1723
1729
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1724
|
-
return s && a &&
|
|
1730
|
+
return s && a && Ke(e, i, a), a;
|
|
1725
1731
|
};
|
|
1726
1732
|
let T = class extends q {
|
|
1727
1733
|
constructor() {
|
|
@@ -1769,10 +1775,10 @@ let T = class extends q {
|
|
|
1769
1775
|
})} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === this.lastAppliedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1770
1776
|
}
|
|
1771
1777
|
};
|
|
1772
|
-
T.styles = [G,
|
|
1778
|
+
T.styles = [G, Ze];
|
|
1773
1779
|
T.dependencies = {
|
|
1774
|
-
"cx-button":
|
|
1775
|
-
"cx-button-group":
|
|
1780
|
+
"cx-button": Y,
|
|
1781
|
+
"cx-button-group": ce,
|
|
1776
1782
|
"cx-details": at,
|
|
1777
1783
|
"cx-icon": ot,
|
|
1778
1784
|
"cx-icon-button": Ct,
|
|
@@ -1780,7 +1786,7 @@ T.dependencies = {
|
|
|
1780
1786
|
"cx-typography": B
|
|
1781
1787
|
};
|
|
1782
1788
|
X([
|
|
1783
|
-
|
|
1789
|
+
J(".details")
|
|
1784
1790
|
], T.prototype, "base", 2);
|
|
1785
1791
|
X([
|
|
1786
1792
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1803,11 +1809,11 @@ X([
|
|
|
1803
1809
|
T = X([
|
|
1804
1810
|
Q("cx-asset-link-format-rotation")
|
|
1805
1811
|
], T);
|
|
1806
|
-
const
|
|
1807
|
-
var
|
|
1808
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1812
|
+
const Je = j`cx-details::part(base){border-bottom-width:0}`;
|
|
1813
|
+
var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, At = (t, e, i, s) => {
|
|
1814
|
+
for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1809
1815
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1810
|
-
return s && a &&
|
|
1816
|
+
return s && a && ti(e, i, a), a;
|
|
1811
1817
|
};
|
|
1812
1818
|
let L = class extends q {
|
|
1813
1819
|
constructor() {
|
|
@@ -1838,10 +1844,10 @@ let L = class extends q {
|
|
|
1838
1844
|
return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
|
|
1839
1845
|
}
|
|
1840
1846
|
};
|
|
1841
|
-
L.styles = [G,
|
|
1847
|
+
L.styles = [G, Je];
|
|
1842
1848
|
L.dependencies = {
|
|
1843
|
-
"cx-button":
|
|
1844
|
-
"cx-checkbox":
|
|
1849
|
+
"cx-button": Y,
|
|
1850
|
+
"cx-checkbox": pe,
|
|
1845
1851
|
"cx-details": at,
|
|
1846
1852
|
"cx-icon": ot,
|
|
1847
1853
|
"cx-space": U,
|
|
@@ -1849,7 +1855,7 @@ L.dependencies = {
|
|
|
1849
1855
|
"cx-typography": B
|
|
1850
1856
|
};
|
|
1851
1857
|
At([
|
|
1852
|
-
|
|
1858
|
+
J(".details")
|
|
1853
1859
|
], L.prototype, "base", 2);
|
|
1854
1860
|
At([
|
|
1855
1861
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1860,12 +1866,12 @@ At([
|
|
|
1860
1866
|
L = At([
|
|
1861
1867
|
Q("cx-asset-link-format-metadata")
|
|
1862
1868
|
], L);
|
|
1863
|
-
var
|
|
1864
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1869
|
+
var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, g = (t, e, i, s) => {
|
|
1870
|
+
for (var a = s > 1 ? void 0 : s ? si(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1865
1871
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1866
|
-
return s && a &&
|
|
1872
|
+
return s && a && ii(e, i, a), a;
|
|
1867
1873
|
};
|
|
1868
|
-
let
|
|
1874
|
+
let m = class extends q {
|
|
1869
1875
|
constructor() {
|
|
1870
1876
|
super(), this.localize = new V(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1871
1877
|
{
|
|
@@ -1963,7 +1969,7 @@ let u = class extends q {
|
|
|
1963
1969
|
}, this.rotation = 0, this.defaultSize = {
|
|
1964
1970
|
height: 0,
|
|
1965
1971
|
width: 0
|
|
1966
|
-
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink =
|
|
1972
|
+
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = Ce, this.apiGetCropFocusMode = Fe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1967
1973
|
}
|
|
1968
1974
|
/**
|
|
1969
1975
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -1972,7 +1978,7 @@ let u = class extends q {
|
|
|
1972
1978
|
* extension fallback in asset-transformation-dialog.
|
|
1973
1979
|
*/
|
|
1974
1980
|
static getTransformExtension(t) {
|
|
1975
|
-
return !t ||
|
|
1981
|
+
return !t || Zt(t) ? t : "jpg";
|
|
1976
1982
|
}
|
|
1977
1983
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
1978
1984
|
get hasUnfrozenTransformations() {
|
|
@@ -1985,7 +1991,7 @@ let u = class extends q {
|
|
|
1985
1991
|
*/
|
|
1986
1992
|
get lastAppliedCropUnit() {
|
|
1987
1993
|
return this.transformations.findLast(
|
|
1988
|
-
(e) => e.key ===
|
|
1994
|
+
(e) => e.key === f.Crop
|
|
1989
1995
|
)?.value.unit ?? o.Pixel;
|
|
1990
1996
|
}
|
|
1991
1997
|
/**
|
|
@@ -1995,7 +2001,7 @@ let u = class extends q {
|
|
|
1995
2001
|
*/
|
|
1996
2002
|
get lastAppliedCropFocusMode() {
|
|
1997
2003
|
return this.transformations.findLast(
|
|
1998
|
-
(e) => e.key ===
|
|
2004
|
+
(e) => e.key === f.Crop
|
|
1999
2005
|
)?.value.focusMode ?? "manual";
|
|
2000
2006
|
}
|
|
2001
2007
|
/**
|
|
@@ -2005,7 +2011,7 @@ let u = class extends q {
|
|
|
2005
2011
|
*/
|
|
2006
2012
|
get lastAppliedCropPosition() {
|
|
2007
2013
|
return this.transformations.findLast(
|
|
2008
|
-
(e) => e.key ===
|
|
2014
|
+
(e) => e.key === f.Crop
|
|
2009
2015
|
)?.value.position ?? N.CenterCenter;
|
|
2010
2016
|
}
|
|
2011
2017
|
/**
|
|
@@ -2057,7 +2063,7 @@ let u = class extends q {
|
|
|
2057
2063
|
get lastCropSize() {
|
|
2058
2064
|
if (!this.asset) {
|
|
2059
2065
|
const e = this.transformations.findLast(
|
|
2060
|
-
(i) => i.key ===
|
|
2066
|
+
(i) => i.key === f.Crop
|
|
2061
2067
|
);
|
|
2062
2068
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
2063
2069
|
return {
|
|
@@ -2087,7 +2093,7 @@ let u = class extends q {
|
|
|
2087
2093
|
}
|
|
2088
2094
|
};
|
|
2089
2095
|
if (e?.value.width && e?.value.height) {
|
|
2090
|
-
const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n =
|
|
2096
|
+
const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = ut(s, i);
|
|
2091
2097
|
return {
|
|
2092
2098
|
[o.AspectRatio]: {
|
|
2093
2099
|
height: n.height,
|
|
@@ -2110,7 +2116,7 @@ let u = class extends q {
|
|
|
2110
2116
|
};
|
|
2111
2117
|
}
|
|
2112
2118
|
}
|
|
2113
|
-
const t = this.lastImageSize.width && this.lastImageSize.height ?
|
|
2119
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
2114
2120
|
return {
|
|
2115
2121
|
[o.AspectRatio]: {
|
|
2116
2122
|
height: t.height,
|
|
@@ -2140,7 +2146,7 @@ let u = class extends q {
|
|
|
2140
2146
|
get lastResizeSize() {
|
|
2141
2147
|
if (!this.asset) {
|
|
2142
2148
|
const e = this.transformations.findLast(
|
|
2143
|
-
(i) => i.key ===
|
|
2149
|
+
(i) => i.key === f.Resize
|
|
2144
2150
|
);
|
|
2145
2151
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
2146
2152
|
return {
|
|
@@ -2157,7 +2163,7 @@ let u = class extends q {
|
|
|
2157
2163
|
}
|
|
2158
2164
|
};
|
|
2159
2165
|
if (e?.value.width && e?.value.height) {
|
|
2160
|
-
const { height: i, width: s } = e.value, a =
|
|
2166
|
+
const { height: i, width: s } = e.value, a = ut(s, i);
|
|
2161
2167
|
return {
|
|
2162
2168
|
[o.AspectRatio]: {
|
|
2163
2169
|
height: a.height,
|
|
@@ -2172,7 +2178,7 @@ let u = class extends q {
|
|
|
2172
2178
|
};
|
|
2173
2179
|
}
|
|
2174
2180
|
}
|
|
2175
|
-
const t = this.lastImageSize.width && this.lastImageSize.height ?
|
|
2181
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
2176
2182
|
return {
|
|
2177
2183
|
[o.AspectRatio]: {
|
|
2178
2184
|
height: t.height,
|
|
@@ -2196,14 +2202,14 @@ let u = class extends q {
|
|
|
2196
2202
|
*/
|
|
2197
2203
|
get lastRotation() {
|
|
2198
2204
|
return this.asset ? 0 : this.transformations.findLast(
|
|
2199
|
-
(e) => e.key ===
|
|
2205
|
+
(e) => e.key === f.Rotate
|
|
2200
2206
|
)?.value.rotation ?? 0;
|
|
2201
2207
|
}
|
|
2202
2208
|
/**
|
|
2203
2209
|
* Returns the transformation string for the asset link.
|
|
2204
2210
|
*/
|
|
2205
2211
|
get transformationString() {
|
|
2206
|
-
return
|
|
2212
|
+
return dt({
|
|
2207
2213
|
asset: this.asset,
|
|
2208
2214
|
baseUrl: "",
|
|
2209
2215
|
parameters: this.parameters,
|
|
@@ -2242,13 +2248,13 @@ let u = class extends q {
|
|
|
2242
2248
|
);
|
|
2243
2249
|
this.loading = !0, this.apiGetTransformAssetLink({
|
|
2244
2250
|
assetId: this.asset.id,
|
|
2245
|
-
extension:
|
|
2251
|
+
extension: m.getTransformExtension(this.asset.extension),
|
|
2246
2252
|
format: e?.proxyName ?? "",
|
|
2247
2253
|
siteUrl: this.baseUrl,
|
|
2248
2254
|
token: this.token,
|
|
2249
2255
|
transformations: this.transformationString
|
|
2250
2256
|
}).then((s) => {
|
|
2251
|
-
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction ===
|
|
2257
|
+
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
2252
2258
|
height: s.height,
|
|
2253
2259
|
width: s.width
|
|
2254
2260
|
}, this.selectedFormat = {
|
|
@@ -2262,7 +2268,7 @@ let u = class extends q {
|
|
|
2262
2268
|
*/
|
|
2263
2269
|
});
|
|
2264
2270
|
});
|
|
2265
|
-
const i =
|
|
2271
|
+
const i = dt({
|
|
2266
2272
|
asset: this.asset,
|
|
2267
2273
|
baseUrl: "",
|
|
2268
2274
|
extension: this.selectedFormat.extension,
|
|
@@ -2295,7 +2301,7 @@ let u = class extends q {
|
|
|
2295
2301
|
async handleTransformationsChange() {
|
|
2296
2302
|
if (await this.updateComplete, !this.asset) {
|
|
2297
2303
|
this.emit("cx-asset-link-format-change", {
|
|
2298
|
-
detail:
|
|
2304
|
+
detail: dt({
|
|
2299
2305
|
asset: this.asset,
|
|
2300
2306
|
baseUrl: "",
|
|
2301
2307
|
options: {
|
|
@@ -2307,34 +2313,34 @@ let u = class extends q {
|
|
|
2307
2313
|
}).replace(/\/t\//g, "")
|
|
2308
2314
|
});
|
|
2309
2315
|
const r = this.transformations.findLast(
|
|
2310
|
-
(c) => c.key ===
|
|
2316
|
+
(c) => c.key === f.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
2311
2317
|
);
|
|
2312
2318
|
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
2313
|
-
const { focusMode: c, position:
|
|
2319
|
+
const { focusMode: c, position: u, ratioHeight: y, ratioWidth: S } = r.value;
|
|
2314
2320
|
this.cropSize = {
|
|
2315
2321
|
...this.cropSize,
|
|
2316
2322
|
cropMode: "free",
|
|
2317
2323
|
focusMode: c ?? "manual",
|
|
2318
2324
|
percentageHeight: 100,
|
|
2319
2325
|
percentageWidth: 100,
|
|
2320
|
-
position:
|
|
2321
|
-
ratioHeight:
|
|
2322
|
-
ratioWidth:
|
|
2326
|
+
position: u ?? N.CenterCenter,
|
|
2327
|
+
ratioHeight: y,
|
|
2328
|
+
ratioWidth: S,
|
|
2323
2329
|
unit: o.AspectRatio
|
|
2324
2330
|
};
|
|
2325
2331
|
} else if (r) {
|
|
2326
|
-
const { focusMode: c, height:
|
|
2332
|
+
const { focusMode: c, height: u, position: y, unit: S, width: d, x: A = 0, y: k = 0 } = r.value;
|
|
2327
2333
|
this.cropSize = {
|
|
2328
2334
|
...this.cropSize,
|
|
2329
2335
|
cropMode: "free",
|
|
2330
2336
|
focusMode: c ?? "manual",
|
|
2331
|
-
height:
|
|
2337
|
+
height: u,
|
|
2332
2338
|
percentageHeight: 100,
|
|
2333
2339
|
percentageWidth: 100,
|
|
2334
|
-
position:
|
|
2335
|
-
unit:
|
|
2340
|
+
position: y ?? N.CenterCenter,
|
|
2341
|
+
unit: S ?? o.Pixel,
|
|
2336
2342
|
width: d,
|
|
2337
|
-
x:
|
|
2343
|
+
x: A,
|
|
2338
2344
|
y: k
|
|
2339
2345
|
};
|
|
2340
2346
|
} else
|
|
@@ -2358,23 +2364,23 @@ let u = class extends q {
|
|
|
2358
2364
|
y: 0
|
|
2359
2365
|
};
|
|
2360
2366
|
const n = this.transformations.findLast(
|
|
2361
|
-
(c) => c.key ===
|
|
2367
|
+
(c) => c.key === f.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
2362
2368
|
);
|
|
2363
2369
|
if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
|
|
2364
|
-
const { ratioHeight: c, ratioWidth:
|
|
2370
|
+
const { ratioHeight: c, ratioWidth: u } = n.value;
|
|
2365
2371
|
this.resizeSize = {
|
|
2366
2372
|
...this.resizeSize,
|
|
2367
2373
|
ratioHeight: c,
|
|
2368
|
-
ratioWidth:
|
|
2374
|
+
ratioWidth: u,
|
|
2369
2375
|
unit: o.AspectRatio
|
|
2370
2376
|
};
|
|
2371
2377
|
} else if (n) {
|
|
2372
|
-
const { height: c = 0, unit:
|
|
2378
|
+
const { height: c = 0, unit: u, width: y = 0 } = n.value;
|
|
2373
2379
|
this.resizeSize = {
|
|
2374
2380
|
...this.resizeSize,
|
|
2375
2381
|
height: c,
|
|
2376
|
-
unit:
|
|
2377
|
-
width:
|
|
2382
|
+
unit: u ?? o.Pixel,
|
|
2383
|
+
width: y
|
|
2378
2384
|
};
|
|
2379
2385
|
} else
|
|
2380
2386
|
this.resizeSize = {
|
|
@@ -2389,16 +2395,16 @@ let u = class extends q {
|
|
|
2389
2395
|
width: 1
|
|
2390
2396
|
};
|
|
2391
2397
|
const l = this.transformations.findLast(
|
|
2392
|
-
(c) => c.key ===
|
|
2398
|
+
(c) => c.key === f.Rotate
|
|
2393
2399
|
);
|
|
2394
2400
|
this.rotation = l?.value.rotation ?? 0;
|
|
2395
|
-
const p = this.transformations.findLast((c) => c.key ===
|
|
2396
|
-
(c) => c.key ===
|
|
2401
|
+
const p = this.transformations.findLast((c) => c.key === f.Quality)?.value.quality ?? 100, x = this.transformations.some(
|
|
2402
|
+
(c) => c.key === f.Metadata
|
|
2397
2403
|
);
|
|
2398
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
2404
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: x, quality: p } : this.selectedFormat = {
|
|
2399
2405
|
extension: "",
|
|
2400
2406
|
height: 0,
|
|
2401
|
-
keepMetadata:
|
|
2407
|
+
keepMetadata: x,
|
|
2402
2408
|
quality: p,
|
|
2403
2409
|
rotation: 0,
|
|
2404
2410
|
url: "",
|
|
@@ -2416,7 +2422,7 @@ let u = class extends q {
|
|
|
2416
2422
|
this.loading = !0;
|
|
2417
2423
|
const e = await this.apiGetTransformAssetLink({
|
|
2418
2424
|
assetId: this.asset.id,
|
|
2419
|
-
extension:
|
|
2425
|
+
extension: m.getTransformExtension(this.selectedFormat.extension),
|
|
2420
2426
|
format: t?.proxyName ?? "",
|
|
2421
2427
|
siteUrl: this.baseUrl,
|
|
2422
2428
|
token: this.token,
|
|
@@ -2448,11 +2454,11 @@ let u = class extends q {
|
|
|
2448
2454
|
width: e.width,
|
|
2449
2455
|
x: 0,
|
|
2450
2456
|
y: 0
|
|
2451
|
-
}, this.lastAction ===
|
|
2457
|
+
}, this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
2452
2458
|
const i = this.transformations.some(
|
|
2453
|
-
(r) => r.key ===
|
|
2459
|
+
(r) => r.key === f.Metadata
|
|
2454
2460
|
), s = this.transformations.findLast(
|
|
2455
|
-
(r) => r.key ===
|
|
2461
|
+
(r) => r.key === f.Quality
|
|
2456
2462
|
);
|
|
2457
2463
|
this.selectedFormat = {
|
|
2458
2464
|
...this.selectedFormat,
|
|
@@ -2466,7 +2472,7 @@ let u = class extends q {
|
|
|
2466
2472
|
* url: `${this.baseUrl}/${response.relativePath}`,
|
|
2467
2473
|
*/
|
|
2468
2474
|
};
|
|
2469
|
-
const a =
|
|
2475
|
+
const a = dt({
|
|
2470
2476
|
asset: this.asset,
|
|
2471
2477
|
baseUrl: "",
|
|
2472
2478
|
extension: this.selectedFormat.extension,
|
|
@@ -2498,7 +2504,7 @@ let u = class extends q {
|
|
|
2498
2504
|
width: Number.parseInt(this.asset.width, 10)
|
|
2499
2505
|
});
|
|
2500
2506
|
const t = this.transformations.findLast(
|
|
2501
|
-
(e) => e.key ===
|
|
2507
|
+
(e) => e.key === f.Quality
|
|
2502
2508
|
);
|
|
2503
2509
|
this.selectedFormat = {
|
|
2504
2510
|
extension: this.asset.extension,
|
|
@@ -2553,7 +2559,7 @@ let u = class extends q {
|
|
|
2553
2559
|
e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
|
|
2554
2560
|
const i = this.proxies?.find((s) => s.id === t);
|
|
2555
2561
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
2556
|
-
if (s.key ===
|
|
2562
|
+
if (s.key === f.Crop) {
|
|
2557
2563
|
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, p = a.y / i.formatHeight * e.formatHeight;
|
|
2558
2564
|
return {
|
|
2559
2565
|
...s,
|
|
@@ -2566,7 +2572,7 @@ let u = class extends q {
|
|
|
2566
2572
|
}
|
|
2567
2573
|
};
|
|
2568
2574
|
}
|
|
2569
|
-
if (s.key ===
|
|
2575
|
+
if (s.key === f.Resize) {
|
|
2570
2576
|
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
|
|
2571
2577
|
return {
|
|
2572
2578
|
...s,
|
|
@@ -2642,29 +2648,29 @@ let u = class extends q {
|
|
|
2642
2648
|
ratioHeight: n,
|
|
2643
2649
|
ratioWidth: l,
|
|
2644
2650
|
unit: p,
|
|
2645
|
-
useCropMode:
|
|
2651
|
+
useCropMode: x,
|
|
2646
2652
|
width: c
|
|
2647
2653
|
}) {
|
|
2648
2654
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2649
2655
|
return;
|
|
2650
|
-
this.loading = !0, this.lastAction =
|
|
2651
|
-
const
|
|
2656
|
+
this.loading = !0, this.lastAction = f.Crop;
|
|
2657
|
+
const u = await this.apiGetCropFocusMode({
|
|
2652
2658
|
autoCropMode: e,
|
|
2653
2659
|
cropHeight: i,
|
|
2654
2660
|
cropWidth: c,
|
|
2655
2661
|
imageUrl: this.selectedFormat.url
|
|
2656
2662
|
});
|
|
2657
|
-
if (
|
|
2658
|
-
let
|
|
2659
|
-
i || (
|
|
2663
|
+
if (u) {
|
|
2664
|
+
let y = a, S = r;
|
|
2665
|
+
i || (y = u.height * 100 / this.selectedFormat.height), c || (S = u.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2660
2666
|
...this.cropSize,
|
|
2661
|
-
height:
|
|
2662
|
-
percentageHeight:
|
|
2663
|
-
percentageWidth:
|
|
2664
|
-
width:
|
|
2665
|
-
x:
|
|
2666
|
-
y:
|
|
2667
|
-
...
|
|
2667
|
+
height: u.height,
|
|
2668
|
+
percentageHeight: y ?? this.cropSize.percentageHeight,
|
|
2669
|
+
percentageWidth: S ?? this.cropSize.percentageWidth,
|
|
2670
|
+
width: u.width,
|
|
2671
|
+
x: u.x * 100 / this.selectedFormat.width,
|
|
2672
|
+
y: u.y * 100 / this.selectedFormat.height,
|
|
2673
|
+
...x ? {
|
|
2668
2674
|
cropMode: e,
|
|
2669
2675
|
focusMode: "manual",
|
|
2670
2676
|
keepAspectRatio: !1
|
|
@@ -2690,25 +2696,25 @@ let u = class extends q {
|
|
|
2690
2696
|
if (s === 0 || i === 0)
|
|
2691
2697
|
return;
|
|
2692
2698
|
const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
|
|
2693
|
-
let p = this.cropSize.height,
|
|
2694
|
-
n && (
|
|
2699
|
+
let p = this.cropSize.height, x = this.cropSize.width;
|
|
2700
|
+
n && (x = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
|
|
2695
2701
|
i * this.selectedFormat.height / 100
|
|
2696
2702
|
));
|
|
2697
2703
|
const c = this.cropSize.focusMode;
|
|
2698
2704
|
this.focusModes.find(
|
|
2699
|
-
(
|
|
2705
|
+
(y) => y.value === c
|
|
2700
2706
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2701
2707
|
focusMode: c,
|
|
2702
2708
|
height: p,
|
|
2703
2709
|
percentageHeight: i,
|
|
2704
2710
|
percentageWidth: s,
|
|
2705
|
-
width:
|
|
2711
|
+
width: x
|
|
2706
2712
|
}) : this.cropSize = {
|
|
2707
2713
|
...this.cropSize,
|
|
2708
2714
|
height: p,
|
|
2709
2715
|
percentageHeight: i,
|
|
2710
2716
|
percentageWidth: s,
|
|
2711
|
-
width:
|
|
2717
|
+
width: x,
|
|
2712
2718
|
x: a,
|
|
2713
2719
|
y: r
|
|
2714
2720
|
};
|
|
@@ -2744,7 +2750,7 @@ let u = class extends q {
|
|
|
2744
2750
|
}
|
|
2745
2751
|
onProxyChange(t) {
|
|
2746
2752
|
const e = t.detail;
|
|
2747
|
-
if (this.lastAction =
|
|
2753
|
+
if (this.lastAction = f.Proxy, e.autoFormat) {
|
|
2748
2754
|
this.autoFormat = !0;
|
|
2749
2755
|
const i = this.autoResolvedProxyId;
|
|
2750
2756
|
i && (this.selectedProxy = i);
|
|
@@ -2809,12 +2815,12 @@ let u = class extends q {
|
|
|
2809
2815
|
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2810
2816
|
let l = this.cropSize.x, p = this.cropSize.y;
|
|
2811
2817
|
l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
|
|
2812
|
-
let
|
|
2818
|
+
let x = this.cropSize.cropMode;
|
|
2813
2819
|
this.cropModes.find(
|
|
2814
|
-
(
|
|
2815
|
-
)?.auto && (
|
|
2820
|
+
(u) => u.value === x
|
|
2821
|
+
)?.auto && (x = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
2816
2822
|
...this.cropSize,
|
|
2817
|
-
cropMode:
|
|
2823
|
+
cropMode: x,
|
|
2818
2824
|
height: a,
|
|
2819
2825
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2820
2826
|
percentageHeight: r,
|
|
@@ -2862,43 +2868,43 @@ let u = class extends q {
|
|
|
2862
2868
|
});
|
|
2863
2869
|
}
|
|
2864
2870
|
onCropApply(t) {
|
|
2865
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2871
|
+
if (this.clearResetSnapshot(), this.lastAction = f.Crop, !this.asset) {
|
|
2866
2872
|
const {
|
|
2867
2873
|
focusMode: l,
|
|
2868
2874
|
height: p,
|
|
2869
|
-
position:
|
|
2875
|
+
position: x,
|
|
2870
2876
|
ratioHeight: c,
|
|
2871
|
-
ratioWidth:
|
|
2872
|
-
unit:
|
|
2873
|
-
width:
|
|
2877
|
+
ratioWidth: u,
|
|
2878
|
+
unit: y,
|
|
2879
|
+
width: S,
|
|
2874
2880
|
x: d,
|
|
2875
|
-
y:
|
|
2881
|
+
y: A
|
|
2876
2882
|
} = this.cropSize, k = this.focusModes.find(
|
|
2877
|
-
(
|
|
2883
|
+
(b) => b.value === l
|
|
2878
2884
|
)?.auto ?? !1;
|
|
2879
|
-
if (
|
|
2880
|
-
|
|
2881
|
-
key:
|
|
2885
|
+
if (y === o.AspectRatio) {
|
|
2886
|
+
u && c && this.upsertTransformation({
|
|
2887
|
+
key: f.Crop,
|
|
2882
2888
|
value: {
|
|
2883
2889
|
focusMode: l,
|
|
2884
2890
|
isFocusModeAuto: k,
|
|
2885
|
-
position:
|
|
2891
|
+
position: x,
|
|
2886
2892
|
ratioHeight: c,
|
|
2887
|
-
ratioWidth:
|
|
2888
|
-
unit:
|
|
2893
|
+
ratioWidth: u,
|
|
2894
|
+
unit: y
|
|
2889
2895
|
}
|
|
2890
2896
|
});
|
|
2891
2897
|
return;
|
|
2892
2898
|
}
|
|
2893
|
-
(p ||
|
|
2894
|
-
key:
|
|
2899
|
+
(p || S) && this.upsertTransformation({
|
|
2900
|
+
key: f.Crop,
|
|
2895
2901
|
value: {
|
|
2896
2902
|
focusMode: l,
|
|
2897
2903
|
height: p,
|
|
2898
2904
|
isFocusModeAuto: k,
|
|
2899
|
-
position:
|
|
2900
|
-
unit:
|
|
2901
|
-
width:
|
|
2905
|
+
position: x,
|
|
2906
|
+
unit: y,
|
|
2907
|
+
width: S,
|
|
2902
2908
|
/**
|
|
2903
2909
|
* Without an asset there is no cropper to drag, so x/y are always the 0
|
|
2904
2910
|
* placeholder from cropSize's default — never a real manual offset. Omit
|
|
@@ -2907,7 +2913,7 @@ let u = class extends q {
|
|
|
2907
2913
|
* suppress the focus mode / position `c_g_` gravity value.
|
|
2908
2914
|
*/
|
|
2909
2915
|
x: Number.isFinite(d) && d !== 0 ? d : void 0,
|
|
2910
|
-
y: Number.isFinite(
|
|
2916
|
+
y: Number.isFinite(A) && A !== 0 ? A : void 0
|
|
2911
2917
|
}
|
|
2912
2918
|
});
|
|
2913
2919
|
return;
|
|
@@ -2924,7 +2930,7 @@ let u = class extends q {
|
|
|
2924
2930
|
this.transformations = [
|
|
2925
2931
|
...this.transformations,
|
|
2926
2932
|
{
|
|
2927
|
-
key:
|
|
2933
|
+
key: f.Crop,
|
|
2928
2934
|
value: {
|
|
2929
2935
|
focusMode: r,
|
|
2930
2936
|
height: p,
|
|
@@ -2935,18 +2941,18 @@ let u = class extends q {
|
|
|
2935
2941
|
}
|
|
2936
2942
|
];
|
|
2937
2943
|
else {
|
|
2938
|
-
const
|
|
2944
|
+
const x = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2939
2945
|
this.transformations = [
|
|
2940
2946
|
...this.transformations,
|
|
2941
2947
|
{
|
|
2942
|
-
key:
|
|
2948
|
+
key: f.Crop,
|
|
2943
2949
|
value: {
|
|
2944
2950
|
focusMode: r,
|
|
2945
2951
|
height: p,
|
|
2946
2952
|
isFocusModeAuto: n,
|
|
2947
2953
|
unit: s,
|
|
2948
2954
|
width: l,
|
|
2949
|
-
x
|
|
2955
|
+
x,
|
|
2950
2956
|
y: c
|
|
2951
2957
|
}
|
|
2952
2958
|
}
|
|
@@ -2955,7 +2961,7 @@ let u = class extends q {
|
|
|
2955
2961
|
} else i && (this.transformations = [
|
|
2956
2962
|
...this.transformations,
|
|
2957
2963
|
{
|
|
2958
|
-
key:
|
|
2964
|
+
key: f.Crop,
|
|
2959
2965
|
value: {
|
|
2960
2966
|
focusMode: r,
|
|
2961
2967
|
isFocusModeAuto: n,
|
|
@@ -2990,21 +2996,21 @@ let u = class extends q {
|
|
|
2990
2996
|
}
|
|
2991
2997
|
onResizeApply(t) {
|
|
2992
2998
|
const { height: e, unit: i, width: s } = t.detail;
|
|
2993
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2999
|
+
if (this.clearResetSnapshot(), this.lastAction = f.Resize, !this.asset) {
|
|
2994
3000
|
if (i === o.AspectRatio) {
|
|
2995
|
-
const { ratioHeight: p, ratioWidth:
|
|
2996
|
-
|
|
2997
|
-
key:
|
|
3001
|
+
const { ratioHeight: p, ratioWidth: x } = this.resizeSize;
|
|
3002
|
+
x && p && this.upsertTransformation({
|
|
3003
|
+
key: f.Resize,
|
|
2998
3004
|
value: {
|
|
2999
3005
|
ratioHeight: p,
|
|
3000
|
-
ratioWidth:
|
|
3006
|
+
ratioWidth: x,
|
|
3001
3007
|
unit: i
|
|
3002
3008
|
}
|
|
3003
3009
|
});
|
|
3004
3010
|
return;
|
|
3005
3011
|
}
|
|
3006
3012
|
(e || s) && this.upsertTransformation({
|
|
3007
|
-
key:
|
|
3013
|
+
key: f.Resize,
|
|
3008
3014
|
value: {
|
|
3009
3015
|
height: e,
|
|
3010
3016
|
unit: i,
|
|
@@ -3020,7 +3026,7 @@ let u = class extends q {
|
|
|
3020
3026
|
this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
|
|
3021
3027
|
...this.transformations,
|
|
3022
3028
|
{
|
|
3023
|
-
key:
|
|
3029
|
+
key: f.Resize,
|
|
3024
3030
|
value: {
|
|
3025
3031
|
height: l,
|
|
3026
3032
|
unit: i,
|
|
@@ -3034,21 +3040,21 @@ let u = class extends q {
|
|
|
3034
3040
|
}
|
|
3035
3041
|
onRotationApply(t) {
|
|
3036
3042
|
const e = t.detail;
|
|
3037
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
3043
|
+
if (this.clearResetSnapshot(), this.lastAction = f.Rotate, !this.asset) {
|
|
3038
3044
|
e ? this.upsertTransformation({
|
|
3039
|
-
key:
|
|
3045
|
+
key: f.Rotate,
|
|
3040
3046
|
value: {
|
|
3041
3047
|
rotation: e
|
|
3042
3048
|
}
|
|
3043
3049
|
}) : this.transformations = this.transformations.filter(
|
|
3044
|
-
(i) => i.key !==
|
|
3050
|
+
(i) => i.key !== f.Rotate
|
|
3045
3051
|
);
|
|
3046
3052
|
return;
|
|
3047
3053
|
}
|
|
3048
3054
|
this.selectedFormat && (this.transformations = [
|
|
3049
3055
|
...this.transformations,
|
|
3050
3056
|
{
|
|
3051
|
-
key:
|
|
3057
|
+
key: f.Rotate,
|
|
3052
3058
|
value: {
|
|
3053
3059
|
rotation: e
|
|
3054
3060
|
}
|
|
@@ -3057,9 +3063,9 @@ let u = class extends q {
|
|
|
3057
3063
|
}
|
|
3058
3064
|
onQualityChange(t) {
|
|
3059
3065
|
const e = t.detail;
|
|
3060
|
-
this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction =
|
|
3066
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = f.Quality;
|
|
3061
3067
|
const i = {
|
|
3062
|
-
key:
|
|
3068
|
+
key: f.Quality,
|
|
3063
3069
|
value: {
|
|
3064
3070
|
quality: e
|
|
3065
3071
|
}
|
|
@@ -3073,22 +3079,22 @@ let u = class extends q {
|
|
|
3073
3079
|
keepMetadata: e
|
|
3074
3080
|
}), !this.asset) {
|
|
3075
3081
|
e ? this.upsertTransformation({
|
|
3076
|
-
key:
|
|
3082
|
+
key: f.Metadata,
|
|
3077
3083
|
value: {
|
|
3078
3084
|
keepMetadata: e
|
|
3079
3085
|
}
|
|
3080
3086
|
}) : this.transformations = this.transformations.filter(
|
|
3081
|
-
(i) => i.key !==
|
|
3087
|
+
(i) => i.key !== f.Metadata
|
|
3082
3088
|
);
|
|
3083
3089
|
return;
|
|
3084
3090
|
}
|
|
3085
3091
|
e ? this.upsertTransformation({
|
|
3086
|
-
key:
|
|
3092
|
+
key: f.Metadata,
|
|
3087
3093
|
value: {
|
|
3088
3094
|
keepMetadata: e
|
|
3089
3095
|
}
|
|
3090
3096
|
}) : this.transformations = this.transformations.filter(
|
|
3091
|
-
(i) => i.key !==
|
|
3097
|
+
(i) => i.key !== f.Metadata
|
|
3092
3098
|
);
|
|
3093
3099
|
}
|
|
3094
3100
|
onExtensionChange(t) {
|
|
@@ -3100,7 +3106,7 @@ let u = class extends q {
|
|
|
3100
3106
|
}
|
|
3101
3107
|
syncQuality() {
|
|
3102
3108
|
const t = this.transformations.findLast(
|
|
3103
|
-
(e) => e.key ===
|
|
3109
|
+
(e) => e.key === f.Quality
|
|
3104
3110
|
)?.value?.quality;
|
|
3105
3111
|
this.selectedFormat && (this.selectedFormat = {
|
|
3106
3112
|
...this.selectedFormat,
|
|
@@ -3145,20 +3151,20 @@ let u = class extends q {
|
|
|
3145
3151
|
)}
|
|
3146
3152
|
${M(
|
|
3147
3153
|
!this.noFormat,
|
|
3148
|
-
() => C`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction ===
|
|
3154
|
+
() => C`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === f.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
3149
3155
|
)}
|
|
3150
3156
|
${M(
|
|
3151
3157
|
!this.noCrop,
|
|
3152
|
-
() => C`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction ===
|
|
3158
|
+
() => C`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === f.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
|
|
3153
3159
|
)}
|
|
3154
3160
|
${M(
|
|
3155
3161
|
!this.noResize,
|
|
3156
|
-
() => C`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction ===
|
|
3162
|
+
() => C`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === f.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
|
|
3157
3163
|
)}
|
|
3158
3164
|
${M(
|
|
3159
3165
|
!this.noRotate,
|
|
3160
|
-
() => C`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
3161
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
3166
|
+
() => C`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
|
|
3167
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${M(
|
|
3162
3168
|
!this.noMetadata,
|
|
3163
3169
|
() => C`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
|
|
3164
3170
|
)}
|
|
@@ -3168,168 +3174,169 @@ let u = class extends q {
|
|
|
3168
3174
|
)}</div>`;
|
|
3169
3175
|
}
|
|
3170
3176
|
};
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
"cx-asset-link-format-crop":
|
|
3174
|
-
"cx-asset-link-format-extension":
|
|
3177
|
+
m.styles = [G, Ee];
|
|
3178
|
+
m.dependencies = {
|
|
3179
|
+
"cx-asset-link-format-crop": v,
|
|
3180
|
+
"cx-asset-link-format-extension": K,
|
|
3175
3181
|
"cx-asset-link-format-metadata": L,
|
|
3176
3182
|
"cx-asset-link-format-proxy": I,
|
|
3177
3183
|
"cx-asset-link-format-quality": W,
|
|
3178
3184
|
"cx-asset-link-format-resize": R,
|
|
3179
3185
|
"cx-asset-link-format-rotation": T,
|
|
3180
|
-
"cx-button":
|
|
3186
|
+
"cx-button": Y,
|
|
3181
3187
|
"cx-space": U,
|
|
3182
3188
|
"cx-typography": B
|
|
3183
3189
|
};
|
|
3184
|
-
|
|
3190
|
+
g([
|
|
3185
3191
|
h({ attribute: "base-url", type: String })
|
|
3186
|
-
],
|
|
3187
|
-
|
|
3192
|
+
], m.prototype, "baseUrl", 2);
|
|
3193
|
+
g([
|
|
3188
3194
|
h({ attribute: "token", type: String })
|
|
3189
|
-
],
|
|
3190
|
-
|
|
3195
|
+
], m.prototype, "token", 2);
|
|
3196
|
+
g([
|
|
3191
3197
|
h({ reflect: !1, type: Object })
|
|
3192
|
-
],
|
|
3193
|
-
|
|
3198
|
+
], m.prototype, "asset", 2);
|
|
3199
|
+
g([
|
|
3194
3200
|
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
3195
|
-
],
|
|
3196
|
-
|
|
3201
|
+
], m.prototype, "cropModes", 2);
|
|
3202
|
+
g([
|
|
3197
3203
|
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
3198
|
-
],
|
|
3199
|
-
|
|
3204
|
+
], m.prototype, "focusModes", 2);
|
|
3205
|
+
g([
|
|
3200
3206
|
h({ reflect: !1, type: Array })
|
|
3201
|
-
],
|
|
3202
|
-
|
|
3207
|
+
], m.prototype, "extensions", 2);
|
|
3208
|
+
g([
|
|
3203
3209
|
h({ reflect: !1, type: Array })
|
|
3204
|
-
],
|
|
3205
|
-
|
|
3210
|
+
], m.prototype, "proxies", 2);
|
|
3211
|
+
g([
|
|
3206
3212
|
h({ attribute: "for-cropper", reflect: !0, type: String })
|
|
3207
|
-
],
|
|
3208
|
-
|
|
3213
|
+
], m.prototype, "forCropper", 2);
|
|
3214
|
+
g([
|
|
3209
3215
|
h({ attribute: "use-session", reflect: !0, type: String })
|
|
3210
|
-
],
|
|
3211
|
-
|
|
3216
|
+
], m.prototype, "useSession", 2);
|
|
3217
|
+
g([
|
|
3212
3218
|
h({ reflect: !1, type: Array })
|
|
3213
|
-
],
|
|
3214
|
-
|
|
3219
|
+
], m.prototype, "transformations", 2);
|
|
3220
|
+
g([
|
|
3215
3221
|
h({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
3216
|
-
],
|
|
3217
|
-
|
|
3222
|
+
], m.prototype, "selectedProxy", 2);
|
|
3223
|
+
g([
|
|
3218
3224
|
h({ attribute: "default-proxy", reflect: !0, type: String })
|
|
3219
|
-
],
|
|
3220
|
-
|
|
3225
|
+
], m.prototype, "defaultProxy", 2);
|
|
3226
|
+
g([
|
|
3221
3227
|
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
3222
|
-
],
|
|
3223
|
-
|
|
3228
|
+
], m.prototype, "canAutoFormat", 2);
|
|
3229
|
+
g([
|
|
3224
3230
|
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
3225
|
-
],
|
|
3226
|
-
|
|
3231
|
+
], m.prototype, "autoFormat", 2);
|
|
3232
|
+
g([
|
|
3227
3233
|
h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
3228
|
-
],
|
|
3229
|
-
|
|
3234
|
+
], m.prototype, "useCustomExtension", 2);
|
|
3235
|
+
g([
|
|
3230
3236
|
h({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
3231
|
-
],
|
|
3232
|
-
|
|
3237
|
+
], m.prototype, "noMetadata", 2);
|
|
3238
|
+
g([
|
|
3233
3239
|
h({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
3234
|
-
],
|
|
3235
|
-
|
|
3240
|
+
], m.prototype, "noFormat", 2);
|
|
3241
|
+
g([
|
|
3236
3242
|
h({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
3237
|
-
],
|
|
3238
|
-
|
|
3243
|
+
], m.prototype, "noCrop", 2);
|
|
3244
|
+
g([
|
|
3239
3245
|
h({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
3240
|
-
],
|
|
3241
|
-
|
|
3246
|
+
], m.prototype, "noResize", 2);
|
|
3247
|
+
g([
|
|
3242
3248
|
h({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
3243
|
-
],
|
|
3244
|
-
|
|
3249
|
+
], m.prototype, "noRotate", 2);
|
|
3250
|
+
g([
|
|
3245
3251
|
h({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
3246
|
-
],
|
|
3247
|
-
|
|
3252
|
+
], m.prototype, "lastImageSize", 2);
|
|
3253
|
+
g([
|
|
3248
3254
|
h({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
3249
|
-
],
|
|
3250
|
-
|
|
3255
|
+
], m.prototype, "hideHeader", 2);
|
|
3256
|
+
g([
|
|
3251
3257
|
h({ attribute: "can-reset", type: Boolean })
|
|
3252
|
-
],
|
|
3253
|
-
|
|
3258
|
+
], m.prototype, "canReset", 2);
|
|
3259
|
+
g([
|
|
3254
3260
|
h({ attribute: !1, reflect: !1, type: Object })
|
|
3255
|
-
],
|
|
3256
|
-
|
|
3261
|
+
], m.prototype, "queryElement", 2);
|
|
3262
|
+
g([
|
|
3257
3263
|
$()
|
|
3258
|
-
],
|
|
3259
|
-
|
|
3264
|
+
], m.prototype, "activeSetting", 2);
|
|
3265
|
+
g([
|
|
3260
3266
|
$()
|
|
3261
|
-
],
|
|
3262
|
-
|
|
3267
|
+
], m.prototype, "selectedFormat", 2);
|
|
3268
|
+
g([
|
|
3263
3269
|
$()
|
|
3264
|
-
],
|
|
3265
|
-
|
|
3270
|
+
], m.prototype, "resizeSize", 2);
|
|
3271
|
+
g([
|
|
3266
3272
|
$()
|
|
3267
|
-
],
|
|
3268
|
-
|
|
3273
|
+
], m.prototype, "cropSize", 2);
|
|
3274
|
+
g([
|
|
3269
3275
|
$()
|
|
3270
|
-
],
|
|
3271
|
-
|
|
3276
|
+
], m.prototype, "rotation", 2);
|
|
3277
|
+
g([
|
|
3272
3278
|
$()
|
|
3273
|
-
],
|
|
3274
|
-
|
|
3279
|
+
], m.prototype, "defaultSize", 2);
|
|
3280
|
+
g([
|
|
3275
3281
|
$()
|
|
3276
|
-
],
|
|
3277
|
-
|
|
3282
|
+
], m.prototype, "cropperElement", 2);
|
|
3283
|
+
g([
|
|
3278
3284
|
$()
|
|
3279
|
-
],
|
|
3280
|
-
|
|
3285
|
+
], m.prototype, "parameters", 2);
|
|
3286
|
+
g([
|
|
3281
3287
|
$()
|
|
3282
|
-
],
|
|
3283
|
-
|
|
3288
|
+
], m.prototype, "loading", 2);
|
|
3289
|
+
g([
|
|
3284
3290
|
$()
|
|
3285
|
-
],
|
|
3286
|
-
|
|
3291
|
+
], m.prototype, "lastAction", 2);
|
|
3292
|
+
g([
|
|
3287
3293
|
$()
|
|
3288
|
-
],
|
|
3289
|
-
|
|
3294
|
+
], m.prototype, "frozenIndex", 2);
|
|
3295
|
+
g([
|
|
3290
3296
|
$()
|
|
3291
|
-
],
|
|
3292
|
-
|
|
3297
|
+
], m.prototype, "preResetTransformations", 2);
|
|
3298
|
+
g([
|
|
3293
3299
|
$()
|
|
3294
|
-
],
|
|
3295
|
-
|
|
3300
|
+
], m.prototype, "preResetAutoFormat", 2);
|
|
3301
|
+
g([
|
|
3296
3302
|
$()
|
|
3297
|
-
],
|
|
3298
|
-
|
|
3303
|
+
], m.prototype, "preResetSelectedProxy", 2);
|
|
3304
|
+
g([
|
|
3299
3305
|
_("transformations")
|
|
3300
|
-
],
|
|
3301
|
-
|
|
3306
|
+
], m.prototype, "handleTransformationsChange", 1);
|
|
3307
|
+
g([
|
|
3302
3308
|
_("selectedProxy")
|
|
3303
|
-
],
|
|
3304
|
-
|
|
3309
|
+
], m.prototype, "handleSelectedProxyChange", 1);
|
|
3310
|
+
g([
|
|
3305
3311
|
_("loading")
|
|
3306
|
-
],
|
|
3307
|
-
|
|
3312
|
+
], m.prototype, "handleLoadingChange", 1);
|
|
3313
|
+
m = g([
|
|
3308
3314
|
Q("cx-asset-link-format")
|
|
3309
|
-
],
|
|
3315
|
+
], m);
|
|
3310
3316
|
export {
|
|
3311
|
-
|
|
3312
|
-
|
|
3317
|
+
m as C,
|
|
3318
|
+
Ki as F,
|
|
3313
3319
|
jt as M,
|
|
3314
|
-
|
|
3320
|
+
$e as a,
|
|
3315
3321
|
Xt as b,
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3322
|
+
lt as c,
|
|
3323
|
+
ft as d,
|
|
3324
|
+
ht as e,
|
|
3325
|
+
gt as f,
|
|
3326
|
+
Ie as g,
|
|
3327
|
+
Rt as h,
|
|
3328
|
+
qt as i,
|
|
3329
|
+
xt as j,
|
|
3324
3330
|
Xi as k,
|
|
3325
|
-
|
|
3326
|
-
|
|
3331
|
+
Zi as l,
|
|
3332
|
+
Qi as m,
|
|
3327
3333
|
Et as n,
|
|
3328
|
-
|
|
3329
|
-
|
|
3334
|
+
Bi as o,
|
|
3335
|
+
qi as p,
|
|
3330
3336
|
Ht as q,
|
|
3331
|
-
|
|
3337
|
+
Zt as r,
|
|
3332
3338
|
ji as s,
|
|
3333
3339
|
Vi as t,
|
|
3334
|
-
|
|
3340
|
+
de as u,
|
|
3341
|
+
Gi as v
|
|
3335
3342
|
};
|