@orangelogic/design-system 2.183.0 → 2.185.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.H5j0gJtQ.js → asset-link-format.D--xQVgR.js} +505 -493
- package/library/chunks/{button.Dc8L4hcg.js → button.BnkkUqiI.js} +1 -1
- package/library/chunks/{color-swatch-group.DqP6pp2u.js → color-swatch-group.BmtcN7Kp.js} +31 -21
- package/library/chunks/{confirm-popover.DlIPMgF1.js → confirm-popover.CrQKEChc.js} +2 -2
- package/library/chunks/{dialog.BD012ZUN.js → dialog.CWGtufDA.js} +1 -1
- package/library/chunks/{document-viewer.DbA73wGD.js → document-viewer.C90j1Xrr.js} +5 -5
- package/library/chunks/file_on_demand.BVnxByUA.js +80 -0
- package/library/chunks/{folder-select.C4JVju2L.js → folder-select.CIqVGGFl.js} +4 -4
- package/library/chunks/{icon-button.CBZkhhs8.js → icon-button.CVrxJcZq.js} +1 -1
- package/library/chunks/{icon.BTuMIrIm.js → icon.CpHbi8tH.js} +2 -1
- package/library/chunks/{image.CCDdKXjt.js → image.CTMzUqCC.js} +2 -2
- package/library/chunks/{input.B5AHlTl-.js → input.33UmFGqR.js} +1 -1
- package/library/chunks/{markdown.rDppL64E.js → markdown.DOHru2Rz.js} +1 -1
- package/library/chunks/{option.zUMZKPFe.js → option.B6odSlS2.js} +1 -1
- package/library/chunks/{pagination.CqJwMe9w.js → pagination.mzolTIpF.js} +4 -4
- package/library/chunks/{tab-group.BUj0CO1c.js → tab-group.CjISeeMB.js} +2 -2
- package/library/chunks/{tree.CgBxt5my.js → tree.CmEdKtzK.js} +1 -1
- package/library/chunks/{url.B17OsCqV.js → url.CGdWC06g.js} +2 -2
- package/library/components/alert.js +1 -1
- package/library/components/animated-image.js +1 -1
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +13 -13
- package/library/components/audio.js +1 -1
- package/library/components/avatar.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/confirm-popover.js +3 -3
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +2 -2
- package/library/components/document-viewer.js +3 -3
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +3 -3
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +10 -10
- package/library/components/folder-select.js +4 -4
- package/library/components/icon-button.js +2 -2
- package/library/components/icon.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -3
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +2 -2
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +87 -78
- package/library/components/molecules.js +2 -2
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +5 -5
- package/library/components/radio.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +2 -2
- package/library/components/size-input-group.js +2 -2
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/tab-group.js +3 -3
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +33193 -32123
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/icon/custom-icons/file_on_demand.d.ts +4 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +4 -0
- package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +20 -3
- package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +54 -0
- package/library/packages/organisms/src/content-builder/blocks/audio/audio.styles.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +255 -0
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +223 -0
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +34 -10
- package/library/packages/services/src/api/asset/asset.d.ts +1 -1
- package/library/packages/types/src/menu-item.d.ts +8 -0
- package/library/react-web-component.d.ts +9 -1
- package/library/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as Z } from "./button.
|
|
2
|
+
import { C as Z } from "./button.BnkkUqiI.js";
|
|
3
3
|
import L from "../components/space.js";
|
|
4
4
|
import { C as U } from "./typography.IqHbnd3C.js";
|
|
5
5
|
import { n as l, C as B } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
6
|
import { h as I, a as Nt, C as Ot, S as jt, b as Vt, c as Gt, d as Qt } from "./endpoints.mJ5S-tIs.js";
|
|
7
|
-
import { M as $t, U as o, T as
|
|
7
|
+
import { M as $t, U as o, T as m } from "./asset-link-format.ClaYu_v8.js";
|
|
8
8
|
import "./browser.BHOCIF_A.js";
|
|
9
9
|
import { i as q, x as A, E as Xt } from "./lit-element.jLBm65_O.js";
|
|
10
10
|
import "./form.DSsy3Fcy.js";
|
|
@@ -18,16 +18,16 @@ import { c as V } from "./component.styles.CRO4Odto.js";
|
|
|
18
18
|
import { v as Yt } from "./v4.CKZ6klMF.js";
|
|
19
19
|
import { P as W } from "./position-picker.DjnhxIKF.js";
|
|
20
20
|
import { c as G } from "./custom-element.L4WJXn1j.js";
|
|
21
|
-
import { w as
|
|
22
|
-
import { s as
|
|
21
|
+
import { w as _ } from "./watch.DJF5K-8U.js";
|
|
22
|
+
import { s as _t, a as nt } from "./number.Cx2ncfJJ.js";
|
|
23
23
|
import { r as R } from "./state.CSDxrqLd.js";
|
|
24
|
-
import { n as
|
|
24
|
+
import { n as M } from "./when.Dr1es41R.js";
|
|
25
25
|
import et from "../components/details.js";
|
|
26
26
|
import Jt from "../components/divider.js";
|
|
27
|
-
import { C as it } from "./icon.
|
|
28
|
-
import { C as vt } from "./icon-button.
|
|
29
|
-
import { C as bt } from "./input.
|
|
30
|
-
import { C as gt } from "./option.
|
|
27
|
+
import { C as it } from "./icon.CpHbi8tH.js";
|
|
28
|
+
import { C as vt } from "./icon-button.CVrxJcZq.js";
|
|
29
|
+
import { C as bt } from "./input.33UmFGqR.js";
|
|
30
|
+
import { C as gt } from "./option.B6odSlS2.js";
|
|
31
31
|
import xt from "../components/select.js";
|
|
32
32
|
import te from "../components/position-picker.js";
|
|
33
33
|
import { c as ee } from "./image.Y5c_hFx8.js";
|
|
@@ -106,8 +106,8 @@ function le(t) {
|
|
|
106
106
|
if (n.length === 0)
|
|
107
107
|
continue;
|
|
108
108
|
const h = [
|
|
109
|
-
...n.map((
|
|
110
|
-
...n.map((
|
|
109
|
+
...n.map((p) => `ParentFolderIdentifier:${zt(String(p))}`),
|
|
110
|
+
...n.map((p) => `ParentAlbumIdentifier:${zt(String(p))}`)
|
|
111
111
|
];
|
|
112
112
|
e.push(`(${h.join(" OR ")})`);
|
|
113
113
|
continue;
|
|
@@ -130,7 +130,7 @@ function ht(t) {
|
|
|
130
130
|
}
|
|
131
131
|
return le(t);
|
|
132
132
|
}
|
|
133
|
-
const wt = "CoreField.LargeSizePreview", lt = "CoreField.DocType", ce = "Document.Title", pe = "Document.CaptionLong", ct = "Document.FileExtension",
|
|
133
|
+
const wt = "CoreField.LargeSizePreview", lt = "CoreField.DocType", ce = "Document.Title", pe = "Document.CaptionLong", ct = "Document.FileExtension", Mt = "CoreField.FileSize", It = "CoreField.Identifier", Et = "CoreField.Keywords", pt = "CoreField.MaxHeight", dt = "CoreField.MaxWidth", ut = "Document.RecordID", Tt = "CoreField.DocSubType", Ut = "CoreField.TitleWithFallback", mt = "CoreField.OriginalFileName", ft = "CoreField.UpdatedFileName", tt = "CoreField.OriginalPreview", Fi = "Document.DocSubType", Mi = "Document.InPoint", Ii = "Document.OutPoint", Ct = {
|
|
134
134
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
135
135
|
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
136
136
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
@@ -147,7 +147,7 @@ const wt = "CoreField.LargeSizePreview", lt = "CoreField.DocType", ce = "Documen
|
|
|
147
147
|
function ue(t) {
|
|
148
148
|
return Bt[t] ?? t;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ht(t) {
|
|
151
151
|
const e = {};
|
|
152
152
|
for (const [i, s] of Object.entries(t)) {
|
|
153
153
|
const a = de[i] ?? i;
|
|
@@ -155,57 +155,65 @@ function Tt(t) {
|
|
|
155
155
|
}
|
|
156
156
|
return e;
|
|
157
157
|
}
|
|
158
|
+
function me(t) {
|
|
159
|
+
const e = new URLSearchParams();
|
|
160
|
+
for (const [i, s] of Object.entries(t))
|
|
161
|
+
s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
|
|
162
|
+
return e;
|
|
163
|
+
}
|
|
158
164
|
async function qt({
|
|
159
165
|
countPerPage: t,
|
|
160
166
|
fields: e,
|
|
161
167
|
getPermanentAssetsPaths: i,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
httpMethod: s = "GET",
|
|
169
|
+
isSiteBuilder: a,
|
|
170
|
+
pageNumber: r,
|
|
171
|
+
query: n,
|
|
172
|
+
securityByPassToken: h,
|
|
173
|
+
siteUrl: p,
|
|
174
|
+
sort: f,
|
|
175
|
+
token: c,
|
|
176
|
+
useSession: g
|
|
170
177
|
}) {
|
|
171
|
-
const
|
|
178
|
+
const y = e?.map(ue), d = {
|
|
179
|
+
CountPerPage: t,
|
|
180
|
+
Fields: ae(y),
|
|
181
|
+
Format: "json",
|
|
182
|
+
GetPermanentAssetsPaths: i || void 0,
|
|
183
|
+
PageNumber: r,
|
|
184
|
+
Query: ht(n),
|
|
185
|
+
SecurityByPassToken: h || void 0,
|
|
186
|
+
Sort: f || void 0,
|
|
187
|
+
UseSession: g || void 0
|
|
188
|
+
}, z = s === "POST";
|
|
172
189
|
try {
|
|
173
190
|
return (await I.request({
|
|
174
|
-
baseURL:
|
|
175
|
-
headers:
|
|
176
|
-
method:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
Format: "json",
|
|
181
|
-
GetPermanentAssetsPaths: i || void 0,
|
|
182
|
-
PageNumber: a,
|
|
183
|
-
Query: ht(r),
|
|
184
|
-
SecurityByPassToken: n || void 0,
|
|
185
|
-
Sort: d || void 0,
|
|
186
|
-
UseSession: c || void 0
|
|
187
|
-
},
|
|
188
|
-
paramsSerializer: { indexes: null },
|
|
191
|
+
baseURL: p,
|
|
192
|
+
headers: c ? { Authorization: `Bearer ${c}` } : void 0,
|
|
193
|
+
method: s,
|
|
194
|
+
// POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
|
|
195
|
+
// GET keeps the same fields on the query string.
|
|
196
|
+
...z ? { data: me(d) } : { params: d, paramsSerializer: { indexes: null } },
|
|
189
197
|
responseType: "json",
|
|
190
198
|
transformResponse: [
|
|
191
199
|
...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
|
|
192
|
-
|
|
193
|
-
items: (
|
|
194
|
-
sort:
|
|
195
|
-
totalCount:
|
|
196
|
-
}) : (
|
|
197
|
-
items: (
|
|
198
|
-
sort:
|
|
199
|
-
totalCount:
|
|
200
|
+
a ? (u) => ({
|
|
201
|
+
items: (u.results?.Items ?? []).map(Ht),
|
|
202
|
+
sort: u.results?.GlobalInfo?.Sort ?? "",
|
|
203
|
+
totalCount: u.results?.GlobalInfo?.TotalCount ?? 0
|
|
204
|
+
}) : (u) => ({
|
|
205
|
+
items: (u.APIResponse?.Items ?? []).map(Ht),
|
|
206
|
+
sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
207
|
+
totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
200
208
|
})
|
|
201
209
|
],
|
|
202
|
-
url:
|
|
210
|
+
url: a ? Ot.SEARCH_ASSETS : jt["4.0"]
|
|
203
211
|
})).data;
|
|
204
212
|
} catch {
|
|
205
213
|
return { items: [], sort: "", totalCount: 0 };
|
|
206
214
|
}
|
|
207
215
|
}
|
|
208
|
-
async function
|
|
216
|
+
async function fe({
|
|
209
217
|
assetId: t,
|
|
210
218
|
extension: e,
|
|
211
219
|
format: i,
|
|
@@ -237,14 +245,14 @@ async function me({
|
|
|
237
245
|
return null;
|
|
238
246
|
}
|
|
239
247
|
}
|
|
240
|
-
const
|
|
241
|
-
function
|
|
248
|
+
const ge = 50;
|
|
249
|
+
function xe(t, e) {
|
|
242
250
|
const i = [];
|
|
243
251
|
for (let s = 0; s < t.length; s += e)
|
|
244
252
|
i.push(t.slice(s, s + e));
|
|
245
253
|
return i;
|
|
246
254
|
}
|
|
247
|
-
async function
|
|
255
|
+
async function ye({
|
|
248
256
|
extraFields: t,
|
|
249
257
|
getPermanentAssetsPaths: e,
|
|
250
258
|
isSiteBuilder: i,
|
|
@@ -254,7 +262,7 @@ async function xe({
|
|
|
254
262
|
}) {
|
|
255
263
|
if (!Array.isArray(s) || s.length === 0)
|
|
256
264
|
return { facets: [], items: [], totalCount: 0 };
|
|
257
|
-
const n = t?.filter((
|
|
265
|
+
const n = t?.filter((d) => d && typeof d == "string") ?? [], h = [
|
|
258
266
|
...n,
|
|
259
267
|
tt,
|
|
260
268
|
ft,
|
|
@@ -262,43 +270,44 @@ async function xe({
|
|
|
262
270
|
ce,
|
|
263
271
|
pe,
|
|
264
272
|
ut
|
|
265
|
-
],
|
|
266
|
-
|
|
267
|
-
(
|
|
268
|
-
countPerPage:
|
|
273
|
+
], p = xe(s, ge), f = await Promise.all(
|
|
274
|
+
p.map(
|
|
275
|
+
(d) => qt({
|
|
276
|
+
countPerPage: d.length,
|
|
269
277
|
fields: h,
|
|
270
278
|
getPermanentAssetsPaths: e,
|
|
279
|
+
httpMethod: i ? "GET" : "POST",
|
|
271
280
|
isSiteBuilder: i,
|
|
272
281
|
pageNumber: 1,
|
|
273
|
-
query: { recordId:
|
|
282
|
+
query: { recordId: d },
|
|
274
283
|
securityByPassToken: a,
|
|
275
284
|
token: r
|
|
276
285
|
})
|
|
277
286
|
)
|
|
278
|
-
), c = new Map(s.map((
|
|
279
|
-
let
|
|
280
|
-
return
|
|
281
|
-
name:
|
|
282
|
-
originalUrl: k(
|
|
283
|
-
recordId: k(
|
|
287
|
+
), c = new Map(s.map((d, z) => [d, z])), g = f.flatMap((d) => d.items).map((d) => {
|
|
288
|
+
let z = k(d, ft);
|
|
289
|
+
return z === "" && (z = k(d, mt)), {
|
|
290
|
+
name: z,
|
|
291
|
+
originalUrl: k(d, tt),
|
|
292
|
+
recordId: k(d, ut),
|
|
284
293
|
...n.reduce(
|
|
285
|
-
(b,
|
|
294
|
+
(b, u) => (b[u] = k(d, u), b),
|
|
286
295
|
{}
|
|
287
296
|
)
|
|
288
297
|
};
|
|
289
298
|
}).sort(
|
|
290
|
-
(
|
|
291
|
-
),
|
|
292
|
-
(
|
|
299
|
+
(d, z) => (c.get(d.recordId) ?? 1 / 0) - (c.get(z.recordId) ?? 1 / 0)
|
|
300
|
+
), y = f.reduce(
|
|
301
|
+
(d, z) => d + z.totalCount,
|
|
293
302
|
0
|
|
294
303
|
);
|
|
295
|
-
return { facets: [], items:
|
|
304
|
+
return { facets: [], items: g, totalCount: y };
|
|
296
305
|
}
|
|
297
306
|
function k(t, e) {
|
|
298
307
|
const i = t[e];
|
|
299
308
|
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : oe(i) ? i.URI : "";
|
|
300
309
|
}
|
|
301
|
-
async function
|
|
310
|
+
async function Se({
|
|
302
311
|
countPerPage: t,
|
|
303
312
|
directParentFolderIdentifier: e,
|
|
304
313
|
extraFields: i,
|
|
@@ -307,30 +316,30 @@ async function ye({
|
|
|
307
316
|
limitedDocTypes: r,
|
|
308
317
|
pageNumber: n,
|
|
309
318
|
parentFolderIdentifier: h,
|
|
310
|
-
searchTerm:
|
|
311
|
-
securityByPassToken:
|
|
319
|
+
searchTerm: p,
|
|
320
|
+
securityByPassToken: f,
|
|
312
321
|
sortOrder: c,
|
|
313
|
-
token:
|
|
322
|
+
token: g
|
|
314
323
|
}) {
|
|
315
324
|
if (!e && !h)
|
|
316
325
|
return { facets: [], items: [], totalCount: 0 };
|
|
317
|
-
const
|
|
326
|
+
const y = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), d = {
|
|
318
327
|
directParentFolderIdentifier: e,
|
|
319
328
|
parentFolderIdentifier: h,
|
|
320
329
|
...r.length > 0 ? { docType: [$t.Image, $t.Audio] } : {}
|
|
321
|
-
},
|
|
330
|
+
}, z = await qt({
|
|
322
331
|
countPerPage: t,
|
|
323
332
|
fields: [
|
|
324
|
-
...
|
|
333
|
+
...y,
|
|
325
334
|
Ut,
|
|
326
335
|
wt,
|
|
327
336
|
tt,
|
|
328
337
|
Et,
|
|
329
338
|
dt,
|
|
330
339
|
pt,
|
|
331
|
-
|
|
340
|
+
Mt,
|
|
332
341
|
lt,
|
|
333
|
-
|
|
342
|
+
Tt,
|
|
334
343
|
It,
|
|
335
344
|
ct,
|
|
336
345
|
ut,
|
|
@@ -340,30 +349,30 @@ async function ye({
|
|
|
340
349
|
getPermanentAssetsPaths: s,
|
|
341
350
|
isSiteBuilder: a,
|
|
342
351
|
pageNumber: n,
|
|
343
|
-
query:
|
|
344
|
-
securityByPassToken:
|
|
352
|
+
query: d,
|
|
353
|
+
securityByPassToken: f,
|
|
345
354
|
sort: void 0,
|
|
346
|
-
token:
|
|
347
|
-
}), b =
|
|
348
|
-
let F = k(
|
|
349
|
-
F && !F.startsWith(".") && (F = "." + F), P === "" && (P = k(
|
|
350
|
-
const St = k(
|
|
355
|
+
token: g
|
|
356
|
+
}), b = z.items.map((u) => {
|
|
357
|
+
let F = k(u, ct), P = k(u, ft), st = k(u, wt);
|
|
358
|
+
F && !F.startsWith(".") && (F = "." + F), P === "" && (P = k(u, mt)), F.toLowerCase() === ".gif" && (st = k(u, tt));
|
|
359
|
+
const St = k(u, ut);
|
|
351
360
|
return {
|
|
352
|
-
docSubType: k(
|
|
353
|
-
docType: k(
|
|
361
|
+
docSubType: k(u, Tt),
|
|
362
|
+
docType: k(u, lt) || "",
|
|
354
363
|
extension: F,
|
|
355
|
-
height: k(
|
|
364
|
+
height: k(u, pt) || "0",
|
|
356
365
|
id: St,
|
|
357
|
-
identifier: k(
|
|
366
|
+
identifier: k(u, It),
|
|
358
367
|
imageUrl: st,
|
|
359
368
|
name: P,
|
|
360
|
-
originalUrl: k(
|
|
369
|
+
originalUrl: k(u, tt),
|
|
361
370
|
recordId: St,
|
|
362
|
-
size: k(
|
|
363
|
-
tags: k(
|
|
364
|
-
width: k(
|
|
365
|
-
...
|
|
366
|
-
(X, at) => (X[at] = k(
|
|
371
|
+
size: k(u, Mt) || "0 MB",
|
|
372
|
+
tags: k(u, Et),
|
|
373
|
+
width: k(u, dt) || "0",
|
|
374
|
+
...y.reduce(
|
|
375
|
+
(X, at) => (X[at] = k(u, at), X),
|
|
367
376
|
{}
|
|
368
377
|
)
|
|
369
378
|
};
|
|
@@ -371,10 +380,10 @@ async function ye({
|
|
|
371
380
|
return {
|
|
372
381
|
facets: [],
|
|
373
382
|
items: b,
|
|
374
|
-
totalCount:
|
|
383
|
+
totalCount: z.totalCount
|
|
375
384
|
};
|
|
376
385
|
}
|
|
377
|
-
async function
|
|
386
|
+
async function Ce({
|
|
378
387
|
autoCropMode: t,
|
|
379
388
|
cropHeight: e,
|
|
380
389
|
cropWidth: i,
|
|
@@ -409,7 +418,7 @@ async function Se({
|
|
|
409
418
|
return null;
|
|
410
419
|
}
|
|
411
420
|
}
|
|
412
|
-
async function
|
|
421
|
+
async function Ei({
|
|
413
422
|
assetRecordId: t,
|
|
414
423
|
isSiteBuilder: e,
|
|
415
424
|
siteUrl: i,
|
|
@@ -446,7 +455,7 @@ async function Mi({
|
|
|
446
455
|
return [];
|
|
447
456
|
}
|
|
448
457
|
}
|
|
449
|
-
async function
|
|
458
|
+
async function Ti({
|
|
450
459
|
siteUrl: t
|
|
451
460
|
} = {}) {
|
|
452
461
|
try {
|
|
@@ -473,7 +482,7 @@ async function Fi({
|
|
|
473
482
|
return { formatsByDocType: {} };
|
|
474
483
|
}
|
|
475
484
|
}
|
|
476
|
-
async function
|
|
485
|
+
async function Hi({
|
|
477
486
|
recordIds: t,
|
|
478
487
|
rightsToCheck: e
|
|
479
488
|
}) {
|
|
@@ -496,7 +505,7 @@ async function _i({
|
|
|
496
505
|
return i;
|
|
497
506
|
}
|
|
498
507
|
}
|
|
499
|
-
const Wt = 20, Dt = "TR1",
|
|
508
|
+
const Wt = 20, Dt = "TR1", ze = /* @__PURE__ */ new Set([
|
|
500
509
|
".avif",
|
|
501
510
|
".bmp",
|
|
502
511
|
".gif",
|
|
@@ -509,9 +518,9 @@ const Wt = 20, Dt = "TR1", Ce = /* @__PURE__ */ new Set([
|
|
|
509
518
|
]);
|
|
510
519
|
function At(t) {
|
|
511
520
|
const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
|
|
512
|
-
return
|
|
521
|
+
return ze.has(i);
|
|
513
522
|
}
|
|
514
|
-
class
|
|
523
|
+
class Wi {
|
|
515
524
|
constructor(e, i) {
|
|
516
525
|
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = Wt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
|
|
517
526
|
const s = i?.maxEnd;
|
|
@@ -539,18 +548,18 @@ class Ii {
|
|
|
539
548
|
const n = this.requestEpoch;
|
|
540
549
|
if (!this.folderId || n !== this.requestEpoch)
|
|
541
550
|
return this.data;
|
|
542
|
-
const h = s ? `path_${s}` : void 0,
|
|
543
|
-
for (let
|
|
544
|
-
if (this.fetchedPages.has(
|
|
551
|
+
const h = s ? `path_${s}` : void 0, p = s === "TRX", f = `path_${Dt}`, c = h ? p && h !== f ? [h, f] : [h] : [], g = Math.floor(a / this.pageSize) + 1, y = Math.floor(e / this.pageSize) + 1;
|
|
552
|
+
for (let d = g; d <= y; d++) {
|
|
553
|
+
if (this.fetchedPages.has(d))
|
|
545
554
|
continue;
|
|
546
|
-
const
|
|
555
|
+
const z = await Se({
|
|
547
556
|
countPerPage: this.pageSize,
|
|
548
557
|
directParentFolderIdentifier: this.folderId,
|
|
549
558
|
extraFields: [...i, ...c],
|
|
550
559
|
getPermanentAssetsPaths: c.length > 0 || void 0,
|
|
551
560
|
isSiteBuilder: this.isSiteBuilder,
|
|
552
561
|
limitedDocTypes: ["DO_DOCUMENTS.Image_DbBO.*"],
|
|
553
|
-
pageNumber:
|
|
562
|
+
pageNumber: d,
|
|
554
563
|
searchTerm: "",
|
|
555
564
|
securityByPassToken: this.securityByPassToken,
|
|
556
565
|
sortOrder: "",
|
|
@@ -558,21 +567,21 @@ class Ii {
|
|
|
558
567
|
});
|
|
559
568
|
if (n !== this.requestEpoch)
|
|
560
569
|
return this.data;
|
|
561
|
-
if (this.fetchedPages.add(
|
|
562
|
-
const
|
|
563
|
-
this.totalCount =
|
|
570
|
+
if (this.fetchedPages.add(d), !this.totalCount && z.totalCount) {
|
|
571
|
+
const u = Math.min(this.maxEnd, z.totalCount);
|
|
572
|
+
this.totalCount = u, this.data = Array.from({ length: u }, () => ({
|
|
564
573
|
alt: "",
|
|
565
574
|
id: `temp-${Yt()}`,
|
|
566
575
|
name: "",
|
|
567
576
|
src: ""
|
|
568
577
|
}));
|
|
569
578
|
}
|
|
570
|
-
const b = (
|
|
571
|
-
for (let
|
|
572
|
-
const F = b +
|
|
579
|
+
const b = (d - 1) * this.pageSize;
|
|
580
|
+
for (let u = 0; u < z.items.length; u++) {
|
|
581
|
+
const F = b + u;
|
|
573
582
|
if (F < this.data.length) {
|
|
574
|
-
const P =
|
|
575
|
-
let X = h && (!
|
|
583
|
+
const P = z.items[u], st = !P.extension || At(P.extension);
|
|
584
|
+
let X = h && (!p || st) && P[h] || p && !st && P[f] || P.imageUrl;
|
|
576
585
|
X && r && r.length > 0 && (X = Pt(X, r)), this.data[F] = {
|
|
577
586
|
alt: P.name,
|
|
578
587
|
docType: P.docType,
|
|
@@ -596,30 +605,30 @@ class Ii {
|
|
|
596
605
|
format: r,
|
|
597
606
|
minLimit: n = 5,
|
|
598
607
|
noPlaceholders: h = !1,
|
|
599
|
-
transformations:
|
|
608
|
+
transformations: p
|
|
600
609
|
}) {
|
|
601
610
|
(!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
|
|
602
|
-
const
|
|
611
|
+
const f = Math.max(5, n), c = e, g = e + f, y = [
|
|
603
612
|
...i,
|
|
604
613
|
pt,
|
|
605
614
|
dt
|
|
606
615
|
];
|
|
607
616
|
await this.fetchImages({
|
|
608
|
-
end:
|
|
609
|
-
extraFields:
|
|
617
|
+
end: g,
|
|
618
|
+
extraFields: y.filter((b) => b !== ""),
|
|
610
619
|
format: r,
|
|
611
620
|
start: c,
|
|
612
|
-
transformations:
|
|
621
|
+
transformations: p
|
|
613
622
|
});
|
|
614
|
-
let
|
|
615
|
-
|
|
616
|
-
const
|
|
623
|
+
let d = e - f;
|
|
624
|
+
d < 0 && (this.totalCount === 0 ? d = 0 : d = Math.max(0, this.totalCount + d));
|
|
625
|
+
const z = d + f;
|
|
617
626
|
return await this.fetchImages({
|
|
618
|
-
end:
|
|
619
|
-
extraFields:
|
|
627
|
+
end: z,
|
|
628
|
+
extraFields: y.filter((b) => b !== ""),
|
|
620
629
|
format: r,
|
|
621
|
-
start:
|
|
622
|
-
transformations:
|
|
630
|
+
start: d,
|
|
631
|
+
transformations: p
|
|
623
632
|
}), h ? this.data.filter((b) => b.id && !b.id.startsWith("temp-")) : this.data;
|
|
624
633
|
}
|
|
625
634
|
async fetchImagesByIDs({
|
|
@@ -630,30 +639,30 @@ class Ii {
|
|
|
630
639
|
}) {
|
|
631
640
|
if (s.length === 0)
|
|
632
641
|
return [];
|
|
633
|
-
const r = i ? `path_${i}` : void 0, n = i === "TRX", h = `path_${Dt}`,
|
|
642
|
+
const r = i ? `path_${i}` : void 0, n = i === "TRX", h = `path_${Dt}`, p = r ? n && r !== h ? [r, h] : [r] : [], f = n ? [ct] : [], c = [
|
|
634
643
|
...e,
|
|
635
644
|
lt,
|
|
636
645
|
pt,
|
|
637
646
|
dt
|
|
638
647
|
];
|
|
639
|
-
return (await
|
|
640
|
-
extraFields: [...c, ...
|
|
641
|
-
getPermanentAssetsPaths:
|
|
648
|
+
return (await ye({
|
|
649
|
+
extraFields: [...c, ...p, ...f].filter((y) => y !== ""),
|
|
650
|
+
getPermanentAssetsPaths: p.length > 0 || void 0,
|
|
642
651
|
isSiteBuilder: this.isSiteBuilder,
|
|
643
652
|
recordIds: s,
|
|
644
653
|
securityByPassToken: this.securityByPassToken,
|
|
645
654
|
token: this.authToken
|
|
646
|
-
})).items.map((
|
|
647
|
-
const
|
|
648
|
-
let
|
|
649
|
-
return
|
|
650
|
-
alt:
|
|
651
|
-
docType:
|
|
652
|
-
id:
|
|
653
|
-
name:
|
|
654
|
-
src:
|
|
655
|
+
})).items.map((y) => {
|
|
656
|
+
const d = n && y[ct] || "", z = !d || At(d);
|
|
657
|
+
let u = r && (!n || z) && y[r] || n && !z && y[h] || y.originalUrl;
|
|
658
|
+
return u && a && a.length > 0 && (u = Pt(u, a)), {
|
|
659
|
+
alt: y.name,
|
|
660
|
+
docType: y[lt],
|
|
661
|
+
id: y.recordId,
|
|
662
|
+
name: y.name,
|
|
663
|
+
src: u,
|
|
655
664
|
...c.reduce(
|
|
656
|
-
(F, P) => (F[P] =
|
|
665
|
+
(F, P) => (F[P] = y[P] ?? "", F),
|
|
657
666
|
{}
|
|
658
667
|
)
|
|
659
668
|
};
|
|
@@ -667,17 +676,17 @@ class Ii {
|
|
|
667
676
|
noPlaceholders: r = !1,
|
|
668
677
|
page: n,
|
|
669
678
|
pageSize: h = 10,
|
|
670
|
-
transformations:
|
|
679
|
+
transformations: p
|
|
671
680
|
}) {
|
|
672
681
|
(!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
|
|
673
|
-
const
|
|
682
|
+
const f = n * h, c = f + h - 1;
|
|
674
683
|
return await this.fetchImages({
|
|
675
684
|
end: c,
|
|
676
685
|
extraFields: e,
|
|
677
686
|
format: a,
|
|
678
|
-
start:
|
|
679
|
-
transformations:
|
|
680
|
-
}), r ? this.data.filter((
|
|
687
|
+
start: f,
|
|
688
|
+
transformations: p
|
|
689
|
+
}), r ? this.data.filter((g) => g.id && !g.id.startsWith("temp-")) : this.data;
|
|
681
690
|
}
|
|
682
691
|
async *fetchImagesInFolderByChunk({
|
|
683
692
|
chunkSize: e = 10,
|
|
@@ -687,34 +696,34 @@ class Ii {
|
|
|
687
696
|
forceRefetch: r = !1,
|
|
688
697
|
format: n,
|
|
689
698
|
start: h = 0,
|
|
690
|
-
transformations:
|
|
699
|
+
transformations: p
|
|
691
700
|
}) {
|
|
692
|
-
const
|
|
701
|
+
const f = Math.max(1, e);
|
|
693
702
|
if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
|
|
694
703
|
await this.fetchImages({
|
|
695
704
|
end: i,
|
|
696
705
|
extraFields: s,
|
|
697
706
|
format: n,
|
|
698
707
|
start: h,
|
|
699
|
-
transformations:
|
|
708
|
+
transformations: p
|
|
700
709
|
}), yield this.data;
|
|
701
710
|
return;
|
|
702
711
|
}
|
|
703
|
-
let c = h,
|
|
712
|
+
let c = h, g = h + f;
|
|
704
713
|
if (await this.fetchImages({
|
|
705
|
-
end:
|
|
714
|
+
end: g,
|
|
706
715
|
extraFields: s,
|
|
707
716
|
format: n,
|
|
708
717
|
start: c,
|
|
709
|
-
transformations:
|
|
710
|
-
}), yield this.data, !(!this.totalCount || this.totalCount <=
|
|
711
|
-
for (;
|
|
712
|
-
c =
|
|
713
|
-
end:
|
|
718
|
+
transformations: p
|
|
719
|
+
}), yield this.data, !(!this.totalCount || this.totalCount <= g))
|
|
720
|
+
for (; g < this.totalCount; )
|
|
721
|
+
c = g, g = Math.min(g + f, this.totalCount), await this.fetchImages({
|
|
722
|
+
end: g,
|
|
714
723
|
extraFields: s,
|
|
715
724
|
format: n,
|
|
716
725
|
start: c,
|
|
717
|
-
transformations:
|
|
726
|
+
transformations: p
|
|
718
727
|
}), yield this.data;
|
|
719
728
|
}
|
|
720
729
|
hostConnected() {
|
|
@@ -729,11 +738,11 @@ class Ii {
|
|
|
729
738
|
this.resetPageCache();
|
|
730
739
|
}
|
|
731
740
|
}
|
|
732
|
-
const
|
|
733
|
-
var
|
|
734
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
741
|
+
const we = q`.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}`, Ae = q`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}`;
|
|
742
|
+
var ve = Object.defineProperty, be = Object.getOwnPropertyDescriptor, w = (t, e, i, s) => {
|
|
743
|
+
for (var a = s > 1 ? void 0 : s ? be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
735
744
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
736
|
-
return s && a &&
|
|
745
|
+
return s && a && ve(e, i, a), a;
|
|
737
746
|
};
|
|
738
747
|
let C = class extends B {
|
|
739
748
|
constructor() {
|
|
@@ -967,7 +976,7 @@ let C = class extends B {
|
|
|
967
976
|
}
|
|
968
977
|
render() {
|
|
969
978
|
const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
|
|
970
|
-
return A`<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="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${
|
|
979
|
+
return A`<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="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${M(
|
|
971
980
|
!this.noRatioModes,
|
|
972
981
|
() => A`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${D({
|
|
973
982
|
width: "100%"
|
|
@@ -976,7 +985,7 @@ let C = class extends B {
|
|
|
976
985
|
(i) => i.value,
|
|
977
986
|
({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
|
|
978
987
|
)}
|
|
979
|
-
${
|
|
988
|
+
${M(
|
|
980
989
|
e.length > 0,
|
|
981
990
|
() => A`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
982
991
|
)}
|
|
@@ -991,10 +1000,10 @@ let C = class extends B {
|
|
|
991
1000
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
992
1001
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
993
1002
|
H
|
|
994
|
-
</cx-typography></cx-input></div>${
|
|
1003
|
+
</cx-typography></cx-input></div>${M(
|
|
995
1004
|
!this.noRatioModes,
|
|
996
1005
|
() => A`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
997
|
-
)}</cx-space>${
|
|
1006
|
+
)}</cx-space>${M(
|
|
998
1007
|
this.focusModes.length > 0,
|
|
999
1008
|
() => A`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${D({
|
|
1000
1009
|
width: "100%"
|
|
@@ -1004,7 +1013,7 @@ let C = class extends B {
|
|
|
1004
1013
|
({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
|
|
1005
1014
|
)}</cx-select>`
|
|
1006
1015
|
)}
|
|
1007
|
-
${
|
|
1016
|
+
${M(
|
|
1008
1017
|
this.showPositionPicker && this.focusMode === "manual",
|
|
1009
1018
|
() => A`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
|
|
1010
1019
|
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${D({
|
|
@@ -1012,7 +1021,7 @@ let C = class extends B {
|
|
|
1012
1021
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1013
1022
|
}
|
|
1014
1023
|
};
|
|
1015
|
-
C.styles = [V,
|
|
1024
|
+
C.styles = [V, Ae];
|
|
1016
1025
|
C.dependencies = {
|
|
1017
1026
|
"cx-button": Z,
|
|
1018
1027
|
"cx-details": et,
|
|
@@ -1026,101 +1035,101 @@ C.dependencies = {
|
|
|
1026
1035
|
"cx-space": L,
|
|
1027
1036
|
"cx-typography": U
|
|
1028
1037
|
};
|
|
1029
|
-
|
|
1038
|
+
w([
|
|
1030
1039
|
Y(".details")
|
|
1031
1040
|
], C.prototype, "base", 2);
|
|
1032
|
-
|
|
1041
|
+
w([
|
|
1033
1042
|
Y("cx-position-picker")
|
|
1034
1043
|
], C.prototype, "positionPicker", 2);
|
|
1035
|
-
|
|
1044
|
+
w([
|
|
1036
1045
|
l({ reflect: !0, type: Boolean })
|
|
1037
1046
|
], C.prototype, "open", 2);
|
|
1038
|
-
|
|
1047
|
+
w([
|
|
1039
1048
|
l({ reflect: !0, type: Number })
|
|
1040
1049
|
], C.prototype, "width", 2);
|
|
1041
|
-
|
|
1050
|
+
w([
|
|
1042
1051
|
l({ reflect: !0, type: Number })
|
|
1043
1052
|
], C.prototype, "height", 2);
|
|
1044
|
-
|
|
1053
|
+
w([
|
|
1045
1054
|
l({ attribute: "max-width", reflect: !0, type: Number })
|
|
1046
1055
|
], C.prototype, "maxWidth", 2);
|
|
1047
|
-
|
|
1056
|
+
w([
|
|
1048
1057
|
l({ attribute: "max-height", reflect: !0, type: Number })
|
|
1049
1058
|
], C.prototype, "maxHeight", 2);
|
|
1050
|
-
|
|
1059
|
+
w([
|
|
1051
1060
|
l({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1052
1061
|
], C.prototype, "ratioWidth", 2);
|
|
1053
|
-
|
|
1062
|
+
w([
|
|
1054
1063
|
l({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1055
1064
|
], C.prototype, "ratioHeight", 2);
|
|
1056
|
-
|
|
1065
|
+
w([
|
|
1057
1066
|
l({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
1058
1067
|
], C.prototype, "percentageWidth", 2);
|
|
1059
|
-
|
|
1068
|
+
w([
|
|
1060
1069
|
l({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
1061
1070
|
], C.prototype, "percentageHeight", 2);
|
|
1062
|
-
|
|
1071
|
+
w([
|
|
1063
1072
|
l({ reflect: !0, type: String })
|
|
1064
1073
|
], C.prototype, "unit", 2);
|
|
1065
|
-
|
|
1074
|
+
w([
|
|
1066
1075
|
l({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
1067
1076
|
], C.prototype, "disabledApply", 2);
|
|
1068
|
-
|
|
1077
|
+
w([
|
|
1069
1078
|
l({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1070
1079
|
], C.prototype, "noRatioModes", 2);
|
|
1071
|
-
|
|
1080
|
+
w([
|
|
1072
1081
|
l({ attribute: "show-position-picker", reflect: !0, type: Boolean })
|
|
1073
1082
|
], C.prototype, "showPositionPicker", 2);
|
|
1074
|
-
|
|
1083
|
+
w([
|
|
1075
1084
|
l({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1076
1085
|
], C.prototype, "lastAppliedSetting", 2);
|
|
1077
|
-
|
|
1086
|
+
w([
|
|
1078
1087
|
l({ reflect: !0, type: Boolean })
|
|
1079
1088
|
], C.prototype, "loading", 2);
|
|
1080
|
-
|
|
1089
|
+
w([
|
|
1081
1090
|
l({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
1082
1091
|
], C.prototype, "cropModes", 2);
|
|
1083
|
-
|
|
1092
|
+
w([
|
|
1084
1093
|
l({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
1085
1094
|
], C.prototype, "focusModes", 2);
|
|
1086
|
-
|
|
1095
|
+
w([
|
|
1087
1096
|
l({ attribute: "focus-mode", reflect: !0, type: String })
|
|
1088
1097
|
], C.prototype, "focusMode", 2);
|
|
1089
|
-
|
|
1098
|
+
w([
|
|
1090
1099
|
l({ attribute: "crop-mode", reflect: !0, type: String })
|
|
1091
1100
|
], C.prototype, "cropMode", 2);
|
|
1092
|
-
|
|
1101
|
+
w([
|
|
1093
1102
|
l({ reflect: !0, type: String })
|
|
1094
1103
|
], C.prototype, "position", 2);
|
|
1095
|
-
|
|
1104
|
+
w([
|
|
1096
1105
|
l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1097
1106
|
], C.prototype, "keepAspectRatio", 2);
|
|
1098
|
-
|
|
1107
|
+
w([
|
|
1099
1108
|
R()
|
|
1100
1109
|
], C.prototype, "invalidWidth", 2);
|
|
1101
|
-
|
|
1110
|
+
w([
|
|
1102
1111
|
R()
|
|
1103
1112
|
], C.prototype, "invalidHeight", 2);
|
|
1104
|
-
|
|
1113
|
+
w([
|
|
1105
1114
|
R()
|
|
1106
1115
|
], C.prototype, "aspectRatio", 2);
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1116
|
+
w([
|
|
1117
|
+
_("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1118
|
+
_("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1119
|
+
_("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1120
|
+
_("keepAspectRatio")
|
|
1112
1121
|
], C.prototype, "handleCropModeChange", 1);
|
|
1113
|
-
|
|
1114
|
-
|
|
1122
|
+
w([
|
|
1123
|
+
_("open", { waitUntilFirstUpdate: !0 })
|
|
1115
1124
|
], C.prototype, "handleOpenChange", 1);
|
|
1116
|
-
C =
|
|
1125
|
+
C = w([
|
|
1117
1126
|
G("cx-asset-link-format-crop")
|
|
1118
1127
|
], C);
|
|
1119
|
-
const
|
|
1120
|
-
var
|
|
1121
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1128
|
+
const ke = q`.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%}}`;
|
|
1129
|
+
var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, kt = (t, e, i, s) => {
|
|
1130
|
+
for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1122
1131
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1123
|
-
return s && a &&
|
|
1132
|
+
return s && a && Re(e, i, a), a;
|
|
1124
1133
|
};
|
|
1125
1134
|
let K = class extends B {
|
|
1126
1135
|
constructor() {
|
|
@@ -1140,7 +1149,7 @@ let K = class extends B {
|
|
|
1140
1149
|
)}</cx-select></cx-space>`;
|
|
1141
1150
|
}
|
|
1142
1151
|
};
|
|
1143
|
-
K.styles = [V,
|
|
1152
|
+
K.styles = [V, ke];
|
|
1144
1153
|
K.dependencies = {
|
|
1145
1154
|
"cx-option": gt,
|
|
1146
1155
|
"cx-select": xt,
|
|
@@ -1156,11 +1165,11 @@ kt([
|
|
|
1156
1165
|
K = kt([
|
|
1157
1166
|
G("cx-asset-link-format-extension")
|
|
1158
1167
|
], K);
|
|
1159
|
-
const
|
|
1160
|
-
var
|
|
1161
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1168
|
+
const Pe = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1169
|
+
var _e = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, N = (t, e, i, s) => {
|
|
1170
|
+
for (var a = s > 1 ? void 0 : s ? Fe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1162
1171
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1163
|
-
return s && a &&
|
|
1172
|
+
return s && a && _e(e, i, a), a;
|
|
1164
1173
|
};
|
|
1165
1174
|
let E = class extends B {
|
|
1166
1175
|
constructor() {
|
|
@@ -1217,7 +1226,7 @@ let E = class extends B {
|
|
|
1217
1226
|
})} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1218
1227
|
}
|
|
1219
1228
|
};
|
|
1220
|
-
E.styles = [V,
|
|
1229
|
+
E.styles = [V, Pe];
|
|
1221
1230
|
E.dependencies = {
|
|
1222
1231
|
"cx-button": Z,
|
|
1223
1232
|
"cx-details": et,
|
|
@@ -1246,21 +1255,21 @@ N([
|
|
|
1246
1255
|
R()
|
|
1247
1256
|
], E.prototype, "scopedValue", 2);
|
|
1248
1257
|
N([
|
|
1249
|
-
|
|
1258
|
+
_("value")
|
|
1250
1259
|
], E.prototype, "handleValueChange", 1);
|
|
1251
1260
|
N([
|
|
1252
|
-
|
|
1261
|
+
_("open", { waitUntilFirstUpdate: !0 })
|
|
1253
1262
|
], E.prototype, "handleOpenChange", 1);
|
|
1254
1263
|
E = N([
|
|
1255
1264
|
G("cx-asset-link-format-proxy")
|
|
1256
1265
|
], E);
|
|
1257
|
-
const
|
|
1258
|
-
var
|
|
1259
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1266
|
+
const Me = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1267
|
+
var Ie = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, J = (t, e, i, s) => {
|
|
1268
|
+
for (var a = s > 1 ? void 0 : s ? Ee(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1260
1269
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1261
|
-
return s && a &&
|
|
1270
|
+
return s && a && Ie(e, i, a), a;
|
|
1262
1271
|
};
|
|
1263
|
-
let
|
|
1272
|
+
let H = class extends B {
|
|
1264
1273
|
constructor() {
|
|
1265
1274
|
super(...arguments), this.localize = new j(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
|
|
1266
1275
|
}
|
|
@@ -1311,8 +1320,8 @@ let T = class extends B {
|
|
|
1311
1320
|
})} @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>`;
|
|
1312
1321
|
}
|
|
1313
1322
|
};
|
|
1314
|
-
|
|
1315
|
-
|
|
1323
|
+
H.styles = [V, Me];
|
|
1324
|
+
H.dependencies = {
|
|
1316
1325
|
"cx-button": Z,
|
|
1317
1326
|
"cx-details": et,
|
|
1318
1327
|
"cx-icon": it,
|
|
@@ -1323,28 +1332,28 @@ T.dependencies = {
|
|
|
1323
1332
|
};
|
|
1324
1333
|
J([
|
|
1325
1334
|
Y(".details")
|
|
1326
|
-
],
|
|
1335
|
+
], H.prototype, "base", 2);
|
|
1327
1336
|
J([
|
|
1328
1337
|
l({ reflect: !0, type: Boolean })
|
|
1329
|
-
],
|
|
1338
|
+
], H.prototype, "open", 2);
|
|
1330
1339
|
J([
|
|
1331
1340
|
l({ reflect: !0, type: Number })
|
|
1332
|
-
],
|
|
1341
|
+
], H.prototype, "value", 2);
|
|
1333
1342
|
J([
|
|
1334
1343
|
l({ reflect: !0, type: Boolean })
|
|
1335
|
-
],
|
|
1344
|
+
], H.prototype, "loading", 2);
|
|
1336
1345
|
J([
|
|
1337
1346
|
R()
|
|
1338
|
-
],
|
|
1347
|
+
], H.prototype, "scopedValue", 2);
|
|
1339
1348
|
J([
|
|
1340
|
-
|
|
1341
|
-
],
|
|
1342
|
-
|
|
1349
|
+
_("value")
|
|
1350
|
+
], H.prototype, "handleValueChange", 1);
|
|
1351
|
+
H = J([
|
|
1343
1352
|
G("cx-asset-link-format-quality")
|
|
1344
|
-
],
|
|
1345
|
-
const
|
|
1346
|
-
var He = Object.defineProperty,
|
|
1347
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1353
|
+
], H);
|
|
1354
|
+
const Te = q`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}`;
|
|
1355
|
+
var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
|
|
1356
|
+
for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1348
1357
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1349
1358
|
return s && a && He(e, i, a), a;
|
|
1350
1359
|
};
|
|
@@ -1495,7 +1504,7 @@ let v = class extends B {
|
|
|
1495
1504
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
1496
1505
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1497
1506
|
H
|
|
1498
|
-
</cx-typography></cx-input></div>${
|
|
1507
|
+
</cx-typography></cx-input></div>${M(
|
|
1499
1508
|
!this.noRatioModes,
|
|
1500
1509
|
() => A`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
1501
1510
|
)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${D({
|
|
@@ -1503,7 +1512,7 @@ let v = class extends B {
|
|
|
1503
1512
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1504
1513
|
}
|
|
1505
1514
|
};
|
|
1506
|
-
v.styles = [V,
|
|
1515
|
+
v.styles = [V, Te];
|
|
1507
1516
|
v.dependencies = {
|
|
1508
1517
|
"cx-button": Z,
|
|
1509
1518
|
"cx-details": et,
|
|
@@ -1564,24 +1573,24 @@ $([
|
|
|
1564
1573
|
R()
|
|
1565
1574
|
], v.prototype, "aspectRatio", 2);
|
|
1566
1575
|
$([
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1576
|
+
_("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1577
|
+
_("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1578
|
+
_("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1579
|
+
_("keepAspectRatio")
|
|
1571
1580
|
], v.prototype, "handleCropModeChange", 1);
|
|
1572
1581
|
$([
|
|
1573
|
-
|
|
1582
|
+
_("open", { waitUntilFirstUpdate: !0 })
|
|
1574
1583
|
], v.prototype, "handleOpenChange", 1);
|
|
1575
1584
|
v = $([
|
|
1576
1585
|
G("cx-asset-link-format-resize")
|
|
1577
1586
|
], v);
|
|
1578
|
-
const
|
|
1579
|
-
var
|
|
1580
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1587
|
+
const De = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1588
|
+
var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
|
|
1589
|
+
for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1581
1590
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1582
|
-
return s && a &&
|
|
1591
|
+
return s && a && Ne(e, i, a), a;
|
|
1583
1592
|
};
|
|
1584
|
-
let
|
|
1593
|
+
let T = class extends B {
|
|
1585
1594
|
constructor() {
|
|
1586
1595
|
super(...arguments), this.localize = new j(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1587
1596
|
}
|
|
@@ -1594,14 +1603,14 @@ let H = class extends B {
|
|
|
1594
1603
|
const e = t.target.value, i = Number(e);
|
|
1595
1604
|
if (Number.isNaN(i))
|
|
1596
1605
|
return;
|
|
1597
|
-
const s =
|
|
1606
|
+
const s = _t(i);
|
|
1598
1607
|
(i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
|
|
1599
1608
|
detail: s
|
|
1600
1609
|
});
|
|
1601
1610
|
}
|
|
1602
1611
|
handleButtonClick(t) {
|
|
1603
1612
|
this.emit("cx-asset-link-format-rotation-change", {
|
|
1604
|
-
detail:
|
|
1613
|
+
detail: _t(t)
|
|
1605
1614
|
});
|
|
1606
1615
|
}
|
|
1607
1616
|
handleClockwiseClick() {
|
|
@@ -1627,8 +1636,8 @@ let H = class extends B {
|
|
|
1627
1636
|
})} @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>`;
|
|
1628
1637
|
}
|
|
1629
1638
|
};
|
|
1630
|
-
|
|
1631
|
-
|
|
1639
|
+
T.styles = [V, De];
|
|
1640
|
+
T.dependencies = {
|
|
1632
1641
|
"cx-button": Z,
|
|
1633
1642
|
"cx-button-group": ie,
|
|
1634
1643
|
"cx-details": et,
|
|
@@ -1639,33 +1648,33 @@ H.dependencies = {
|
|
|
1639
1648
|
};
|
|
1640
1649
|
Q([
|
|
1641
1650
|
Y(".details")
|
|
1642
|
-
],
|
|
1651
|
+
], T.prototype, "base", 2);
|
|
1643
1652
|
Q([
|
|
1644
1653
|
l({ reflect: !0, type: Boolean })
|
|
1645
|
-
],
|
|
1654
|
+
], T.prototype, "open", 2);
|
|
1646
1655
|
Q([
|
|
1647
1656
|
l({ reflect: !0, type: Number })
|
|
1648
|
-
],
|
|
1657
|
+
], T.prototype, "value", 2);
|
|
1649
1658
|
Q([
|
|
1650
1659
|
l({ attribute: "default-value", reflect: !0, type: Number })
|
|
1651
|
-
],
|
|
1660
|
+
], T.prototype, "defaultValue", 2);
|
|
1652
1661
|
Q([
|
|
1653
1662
|
l({ reflect: !0, type: Boolean })
|
|
1654
|
-
],
|
|
1663
|
+
], T.prototype, "loading", 2);
|
|
1655
1664
|
Q([
|
|
1656
1665
|
l({ attribute: "last-applied-value", reflect: !0, type: Number })
|
|
1657
|
-
],
|
|
1666
|
+
], T.prototype, "lastAppliedValue", 2);
|
|
1658
1667
|
Q([
|
|
1659
|
-
|
|
1660
|
-
],
|
|
1661
|
-
|
|
1668
|
+
_("open", { waitUntilFirstUpdate: !0 })
|
|
1669
|
+
], T.prototype, "handleOpenChange", 1);
|
|
1670
|
+
T = Q([
|
|
1662
1671
|
G("cx-asset-link-format-rotation")
|
|
1663
|
-
],
|
|
1664
|
-
const
|
|
1665
|
-
var
|
|
1666
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1672
|
+
], T);
|
|
1673
|
+
const Le = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1674
|
+
var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, yt = (t, e, i, s) => {
|
|
1675
|
+
for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1667
1676
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1668
|
-
return s && a &&
|
|
1677
|
+
return s && a && Ue(e, i, a), a;
|
|
1669
1678
|
};
|
|
1670
1679
|
let O = class extends B {
|
|
1671
1680
|
constructor() {
|
|
@@ -1696,7 +1705,7 @@ let O = class extends B {
|
|
|
1696
1705
|
return A`<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>`;
|
|
1697
1706
|
}
|
|
1698
1707
|
};
|
|
1699
|
-
O.styles = [V,
|
|
1708
|
+
O.styles = [V, Le];
|
|
1700
1709
|
O.dependencies = {
|
|
1701
1710
|
"cx-button": Z,
|
|
1702
1711
|
"cx-checkbox": se,
|
|
@@ -1718,12 +1727,12 @@ yt([
|
|
|
1718
1727
|
O = yt([
|
|
1719
1728
|
G("cx-asset-link-format-metadata")
|
|
1720
1729
|
], O);
|
|
1721
|
-
var
|
|
1722
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1730
|
+
var qe = Object.defineProperty, je = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
|
|
1731
|
+
for (var a = s > 1 ? void 0 : s ? je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1723
1732
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1724
|
-
return s && a &&
|
|
1733
|
+
return s && a && qe(e, i, a), a;
|
|
1725
1734
|
};
|
|
1726
|
-
let
|
|
1735
|
+
let x = class extends B {
|
|
1727
1736
|
constructor() {
|
|
1728
1737
|
super(), this.localize = new j(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1729
1738
|
{
|
|
@@ -1821,7 +1830,7 @@ let g = class extends B {
|
|
|
1821
1830
|
}, this.rotation = 0, this.defaultSize = {
|
|
1822
1831
|
height: 0,
|
|
1823
1832
|
width: 0
|
|
1824
|
-
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink =
|
|
1833
|
+
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = fe, this.apiGetCropFocusMode = Ce, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1825
1834
|
}
|
|
1826
1835
|
/**
|
|
1827
1836
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -1843,7 +1852,7 @@ let g = class extends B {
|
|
|
1843
1852
|
*/
|
|
1844
1853
|
get lastAppliedCropUnit() {
|
|
1845
1854
|
return this.transformations.findLast(
|
|
1846
|
-
(e) => e.key ===
|
|
1855
|
+
(e) => e.key === m.Crop
|
|
1847
1856
|
)?.value.unit ?? o.Pixel;
|
|
1848
1857
|
}
|
|
1849
1858
|
/**
|
|
@@ -1853,7 +1862,7 @@ let g = class extends B {
|
|
|
1853
1862
|
*/
|
|
1854
1863
|
get lastAppliedCropFocusMode() {
|
|
1855
1864
|
return this.transformations.findLast(
|
|
1856
|
-
(e) => e.key ===
|
|
1865
|
+
(e) => e.key === m.Crop
|
|
1857
1866
|
)?.value.focusMode ?? "manual";
|
|
1858
1867
|
}
|
|
1859
1868
|
/**
|
|
@@ -1863,7 +1872,7 @@ let g = class extends B {
|
|
|
1863
1872
|
*/
|
|
1864
1873
|
get lastAppliedCropPosition() {
|
|
1865
1874
|
return this.transformations.findLast(
|
|
1866
|
-
(e) => e.key ===
|
|
1875
|
+
(e) => e.key === m.Crop
|
|
1867
1876
|
)?.value.position ?? W.CenterCenter;
|
|
1868
1877
|
}
|
|
1869
1878
|
/**
|
|
@@ -1915,7 +1924,7 @@ let g = class extends B {
|
|
|
1915
1924
|
get lastCropSize() {
|
|
1916
1925
|
if (!this.asset) {
|
|
1917
1926
|
const e = this.transformations.findLast(
|
|
1918
|
-
(i) => i.key ===
|
|
1927
|
+
(i) => i.key === m.Crop
|
|
1919
1928
|
);
|
|
1920
1929
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
1921
1930
|
return {
|
|
@@ -1998,7 +2007,7 @@ let g = class extends B {
|
|
|
1998
2007
|
get lastResizeSize() {
|
|
1999
2008
|
if (!this.asset) {
|
|
2000
2009
|
const e = this.transformations.findLast(
|
|
2001
|
-
(i) => i.key ===
|
|
2010
|
+
(i) => i.key === m.Resize
|
|
2002
2011
|
);
|
|
2003
2012
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
2004
2013
|
return {
|
|
@@ -2054,7 +2063,7 @@ let g = class extends B {
|
|
|
2054
2063
|
*/
|
|
2055
2064
|
get lastRotation() {
|
|
2056
2065
|
return this.asset ? 0 : this.transformations.findLast(
|
|
2057
|
-
(e) => e.key ===
|
|
2066
|
+
(e) => e.key === m.Rotate
|
|
2058
2067
|
)?.value.rotation ?? 0;
|
|
2059
2068
|
}
|
|
2060
2069
|
/**
|
|
@@ -2096,13 +2105,13 @@ let g = class extends B {
|
|
|
2096
2105
|
);
|
|
2097
2106
|
this.loading = !0, this.apiGetTransformAssetLink({
|
|
2098
2107
|
assetId: this.asset.id,
|
|
2099
|
-
extension:
|
|
2108
|
+
extension: x.getTransformExtension(this.asset.extension),
|
|
2100
2109
|
format: e?.proxyName ?? "",
|
|
2101
2110
|
siteUrl: this.baseUrl,
|
|
2102
2111
|
token: this.token,
|
|
2103
2112
|
transformations: this.transformationString
|
|
2104
2113
|
}).then((s) => {
|
|
2105
|
-
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction ===
|
|
2114
|
+
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === m.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
2106
2115
|
height: s.height,
|
|
2107
2116
|
width: s.width
|
|
2108
2117
|
}, this.selectedFormat = {
|
|
@@ -2161,35 +2170,35 @@ let g = class extends B {
|
|
|
2161
2170
|
}).replace(/\/t\//g, "")
|
|
2162
2171
|
});
|
|
2163
2172
|
const r = this.transformations.findLast(
|
|
2164
|
-
(c) => c.key ===
|
|
2173
|
+
(c) => c.key === m.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
2165
2174
|
);
|
|
2166
2175
|
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
2167
|
-
const { focusMode: c, position:
|
|
2176
|
+
const { focusMode: c, position: g, ratioHeight: y, ratioWidth: d } = r.value;
|
|
2168
2177
|
this.cropSize = {
|
|
2169
2178
|
...this.cropSize,
|
|
2170
2179
|
cropMode: "free",
|
|
2171
2180
|
focusMode: c ?? "manual",
|
|
2172
2181
|
percentageHeight: 100,
|
|
2173
2182
|
percentageWidth: 100,
|
|
2174
|
-
position:
|
|
2175
|
-
ratioHeight:
|
|
2176
|
-
ratioWidth:
|
|
2183
|
+
position: g ?? W.CenterCenter,
|
|
2184
|
+
ratioHeight: y,
|
|
2185
|
+
ratioWidth: d,
|
|
2177
2186
|
unit: o.AspectRatio
|
|
2178
2187
|
};
|
|
2179
2188
|
} else if (r) {
|
|
2180
|
-
const { focusMode: c, height:
|
|
2189
|
+
const { focusMode: c, height: g, position: y, unit: d, width: z, x: b = 0, y: u = 0 } = r.value;
|
|
2181
2190
|
this.cropSize = {
|
|
2182
2191
|
...this.cropSize,
|
|
2183
2192
|
cropMode: "free",
|
|
2184
2193
|
focusMode: c ?? "manual",
|
|
2185
|
-
height:
|
|
2194
|
+
height: g,
|
|
2186
2195
|
percentageHeight: 100,
|
|
2187
2196
|
percentageWidth: 100,
|
|
2188
|
-
position:
|
|
2189
|
-
unit:
|
|
2190
|
-
width:
|
|
2197
|
+
position: y ?? W.CenterCenter,
|
|
2198
|
+
unit: d ?? o.Pixel,
|
|
2199
|
+
width: z,
|
|
2191
2200
|
x: b,
|
|
2192
|
-
y:
|
|
2201
|
+
y: u
|
|
2193
2202
|
};
|
|
2194
2203
|
} else
|
|
2195
2204
|
this.cropSize = {
|
|
@@ -2212,23 +2221,23 @@ let g = class extends B {
|
|
|
2212
2221
|
y: 0
|
|
2213
2222
|
};
|
|
2214
2223
|
const n = this.transformations.findLast(
|
|
2215
|
-
(c) => c.key ===
|
|
2224
|
+
(c) => c.key === m.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
2216
2225
|
);
|
|
2217
2226
|
if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
|
|
2218
|
-
const { ratioHeight: c, ratioWidth:
|
|
2227
|
+
const { ratioHeight: c, ratioWidth: g } = n.value;
|
|
2219
2228
|
this.resizeSize = {
|
|
2220
2229
|
...this.resizeSize,
|
|
2221
2230
|
ratioHeight: c,
|
|
2222
|
-
ratioWidth:
|
|
2231
|
+
ratioWidth: g,
|
|
2223
2232
|
unit: o.AspectRatio
|
|
2224
2233
|
};
|
|
2225
2234
|
} else if (n) {
|
|
2226
|
-
const { height: c = 0, unit:
|
|
2235
|
+
const { height: c = 0, unit: g, width: y = 0 } = n.value;
|
|
2227
2236
|
this.resizeSize = {
|
|
2228
2237
|
...this.resizeSize,
|
|
2229
2238
|
height: c,
|
|
2230
|
-
unit:
|
|
2231
|
-
width:
|
|
2239
|
+
unit: g ?? o.Pixel,
|
|
2240
|
+
width: y
|
|
2232
2241
|
};
|
|
2233
2242
|
} else
|
|
2234
2243
|
this.resizeSize = {
|
|
@@ -2243,18 +2252,18 @@ let g = class extends B {
|
|
|
2243
2252
|
width: 1
|
|
2244
2253
|
};
|
|
2245
2254
|
const h = this.transformations.findLast(
|
|
2246
|
-
(c) => c.key ===
|
|
2255
|
+
(c) => c.key === m.Rotate
|
|
2247
2256
|
);
|
|
2248
2257
|
this.rotation = h?.value.rotation ?? 0;
|
|
2249
|
-
const
|
|
2250
|
-
(c) => c.key ===
|
|
2258
|
+
const p = this.transformations.findLast((c) => c.key === m.Quality)?.value.quality ?? 100, f = this.transformations.some(
|
|
2259
|
+
(c) => c.key === m.Metadata
|
|
2251
2260
|
);
|
|
2252
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
2261
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: f, quality: p } : this.selectedFormat = {
|
|
2253
2262
|
extension: "",
|
|
2254
2263
|
height: 0,
|
|
2255
|
-
keepMetadata:
|
|
2264
|
+
keepMetadata: f,
|
|
2256
2265
|
originalUrl: "",
|
|
2257
|
-
quality:
|
|
2266
|
+
quality: p,
|
|
2258
2267
|
rotation: 0,
|
|
2259
2268
|
url: "",
|
|
2260
2269
|
width: 0,
|
|
@@ -2271,7 +2280,7 @@ let g = class extends B {
|
|
|
2271
2280
|
this.loading = !0;
|
|
2272
2281
|
const e = await this.apiGetTransformAssetLink({
|
|
2273
2282
|
assetId: this.asset.id,
|
|
2274
|
-
extension:
|
|
2283
|
+
extension: x.getTransformExtension(this.selectedFormat.extension),
|
|
2275
2284
|
format: t?.proxyName ?? "",
|
|
2276
2285
|
siteUrl: this.baseUrl,
|
|
2277
2286
|
token: this.token,
|
|
@@ -2303,11 +2312,11 @@ let g = class extends B {
|
|
|
2303
2312
|
width: e.width,
|
|
2304
2313
|
x: 0,
|
|
2305
2314
|
y: 0
|
|
2306
|
-
}, this.lastAction ===
|
|
2315
|
+
}, this.lastAction === m.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
2307
2316
|
const i = this.transformations.some(
|
|
2308
|
-
(r) => r.key ===
|
|
2317
|
+
(r) => r.key === m.Metadata
|
|
2309
2318
|
), s = this.transformations.findLast(
|
|
2310
|
-
(r) => r.key ===
|
|
2319
|
+
(r) => r.key === m.Quality
|
|
2311
2320
|
);
|
|
2312
2321
|
this.selectedFormat = {
|
|
2313
2322
|
...this.selectedFormat,
|
|
@@ -2353,7 +2362,7 @@ let g = class extends B {
|
|
|
2353
2362
|
width: Number.parseInt(this.asset.width, 10)
|
|
2354
2363
|
});
|
|
2355
2364
|
const t = this.transformations.findLast(
|
|
2356
|
-
(e) => e.key ===
|
|
2365
|
+
(e) => e.key === m.Quality
|
|
2357
2366
|
);
|
|
2358
2367
|
this.selectedFormat = {
|
|
2359
2368
|
extension: this.asset.extension,
|
|
@@ -2400,8 +2409,8 @@ let g = class extends B {
|
|
|
2400
2409
|
e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
|
|
2401
2410
|
const i = this.proxies?.find((s) => s.id === t);
|
|
2402
2411
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
2403
|
-
if (s.key ===
|
|
2404
|
-
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, h = a.x / i.formatWidth * e.formatWidth,
|
|
2412
|
+
if (s.key === m.Crop) {
|
|
2413
|
+
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, h = a.x / i.formatWidth * e.formatWidth, p = a.y / i.formatHeight * e.formatHeight;
|
|
2405
2414
|
return {
|
|
2406
2415
|
...s,
|
|
2407
2416
|
value: {
|
|
@@ -2409,11 +2418,11 @@ let g = class extends B {
|
|
|
2409
2418
|
height: n,
|
|
2410
2419
|
width: r,
|
|
2411
2420
|
x: h,
|
|
2412
|
-
y:
|
|
2421
|
+
y: p
|
|
2413
2422
|
}
|
|
2414
2423
|
};
|
|
2415
2424
|
}
|
|
2416
|
-
if (s.key ===
|
|
2425
|
+
if (s.key === m.Resize) {
|
|
2417
2426
|
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
|
|
2418
2427
|
return {
|
|
2419
2428
|
...s,
|
|
@@ -2488,30 +2497,30 @@ let g = class extends B {
|
|
|
2488
2497
|
percentageWidth: r,
|
|
2489
2498
|
ratioHeight: n,
|
|
2490
2499
|
ratioWidth: h,
|
|
2491
|
-
unit:
|
|
2492
|
-
useCropMode:
|
|
2500
|
+
unit: p,
|
|
2501
|
+
useCropMode: f,
|
|
2493
2502
|
width: c
|
|
2494
2503
|
}) {
|
|
2495
2504
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2496
2505
|
return;
|
|
2497
|
-
this.loading = !0, this.lastAction =
|
|
2498
|
-
const
|
|
2506
|
+
this.loading = !0, this.lastAction = m.Crop;
|
|
2507
|
+
const g = await this.apiGetCropFocusMode({
|
|
2499
2508
|
autoCropMode: e,
|
|
2500
2509
|
cropHeight: i,
|
|
2501
2510
|
cropWidth: c,
|
|
2502
2511
|
imageUrl: this.selectedFormat.url
|
|
2503
2512
|
});
|
|
2504
|
-
if (
|
|
2505
|
-
let
|
|
2506
|
-
i || (
|
|
2513
|
+
if (g) {
|
|
2514
|
+
let y = a, d = r;
|
|
2515
|
+
i || (y = g.height * 100 / this.selectedFormat.height), c || (d = g.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2507
2516
|
...this.cropSize,
|
|
2508
|
-
height:
|
|
2509
|
-
percentageHeight:
|
|
2510
|
-
percentageWidth:
|
|
2511
|
-
width:
|
|
2512
|
-
x:
|
|
2513
|
-
y:
|
|
2514
|
-
...
|
|
2517
|
+
height: g.height,
|
|
2518
|
+
percentageHeight: y ?? this.cropSize.percentageHeight,
|
|
2519
|
+
percentageWidth: d ?? this.cropSize.percentageWidth,
|
|
2520
|
+
width: g.width,
|
|
2521
|
+
x: g.x * 100 / this.selectedFormat.width,
|
|
2522
|
+
y: g.y * 100 / this.selectedFormat.height,
|
|
2523
|
+
...f ? {
|
|
2515
2524
|
cropMode: e,
|
|
2516
2525
|
focusMode: "manual",
|
|
2517
2526
|
keepAspectRatio: !1
|
|
@@ -2522,7 +2531,7 @@ let g = class extends B {
|
|
|
2522
2531
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
2523
2532
|
ratioHeight: n ?? this.cropSize.ratioHeight,
|
|
2524
2533
|
ratioWidth: h ?? this.cropSize.ratioWidth,
|
|
2525
|
-
unit:
|
|
2534
|
+
unit: p ?? this.cropSize.unit
|
|
2526
2535
|
};
|
|
2527
2536
|
}
|
|
2528
2537
|
this.loading = !1, this.lastAction = void 0;
|
|
@@ -2537,25 +2546,25 @@ let g = class extends B {
|
|
|
2537
2546
|
if (s === 0 || i === 0)
|
|
2538
2547
|
return;
|
|
2539
2548
|
const n = this.cropSize.percentageWidth !== s, h = this.cropSize.percentageHeight !== i;
|
|
2540
|
-
let
|
|
2541
|
-
n && (
|
|
2549
|
+
let p = this.cropSize.height, f = this.cropSize.width;
|
|
2550
|
+
n && (f = Math.round(s * this.selectedFormat.width / 100)), h && (p = Math.round(
|
|
2542
2551
|
i * this.selectedFormat.height / 100
|
|
2543
2552
|
));
|
|
2544
2553
|
const c = this.cropSize.focusMode;
|
|
2545
2554
|
this.focusModes.find(
|
|
2546
|
-
(
|
|
2555
|
+
(y) => y.value === c
|
|
2547
2556
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2548
2557
|
focusMode: c,
|
|
2549
|
-
height:
|
|
2558
|
+
height: p,
|
|
2550
2559
|
percentageHeight: i,
|
|
2551
2560
|
percentageWidth: s,
|
|
2552
|
-
width:
|
|
2561
|
+
width: f
|
|
2553
2562
|
}) : this.cropSize = {
|
|
2554
2563
|
...this.cropSize,
|
|
2555
|
-
height:
|
|
2564
|
+
height: p,
|
|
2556
2565
|
percentageHeight: i,
|
|
2557
2566
|
percentageWidth: s,
|
|
2558
|
-
width:
|
|
2567
|
+
width: f,
|
|
2559
2568
|
x: a,
|
|
2560
2569
|
y: r
|
|
2561
2570
|
};
|
|
@@ -2580,7 +2589,7 @@ let g = class extends B {
|
|
|
2580
2589
|
}
|
|
2581
2590
|
onProxyChange(t) {
|
|
2582
2591
|
const e = t.detail;
|
|
2583
|
-
this.lastAction =
|
|
2592
|
+
this.lastAction = m.Proxy, this.selectedProxy = e.id;
|
|
2584
2593
|
}
|
|
2585
2594
|
async onCropModeChange(t) {
|
|
2586
2595
|
const { mode: e } = t.detail;
|
|
@@ -2591,7 +2600,7 @@ let g = class extends B {
|
|
|
2591
2600
|
});
|
|
2592
2601
|
else {
|
|
2593
2602
|
const s = this.focusModes.find(
|
|
2594
|
-
(
|
|
2603
|
+
(p) => p.value === this.cropSize.focusMode
|
|
2595
2604
|
)?.auto;
|
|
2596
2605
|
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, h = this.cropSize.y;
|
|
2597
2606
|
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, h = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
@@ -2637,14 +2646,14 @@ let g = class extends B {
|
|
|
2637
2646
|
Math.max(Math.round(s / i), 0),
|
|
2638
2647
|
this.resizeSize.height
|
|
2639
2648
|
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2640
|
-
let h = this.cropSize.x,
|
|
2641
|
-
h + n > 100 && (h = 100 - n),
|
|
2642
|
-
let
|
|
2649
|
+
let h = this.cropSize.x, p = this.cropSize.y;
|
|
2650
|
+
h + n > 100 && (h = 100 - n), p + r > 100 && (p = 100 - r);
|
|
2651
|
+
let f = this.cropSize.cropMode;
|
|
2643
2652
|
this.cropModes.find(
|
|
2644
|
-
(
|
|
2645
|
-
)?.auto && (
|
|
2653
|
+
(g) => g.value === f
|
|
2654
|
+
)?.auto && (f = "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 = {
|
|
2646
2655
|
...this.cropSize,
|
|
2647
|
-
cropMode:
|
|
2656
|
+
cropMode: f,
|
|
2648
2657
|
height: a,
|
|
2649
2658
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2650
2659
|
percentageHeight: r,
|
|
@@ -2654,7 +2663,7 @@ let g = class extends B {
|
|
|
2654
2663
|
unit: o.AspectRatio,
|
|
2655
2664
|
width: s,
|
|
2656
2665
|
x: h,
|
|
2657
|
-
y:
|
|
2666
|
+
y: p
|
|
2658
2667
|
};
|
|
2659
2668
|
} else {
|
|
2660
2669
|
const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
|
|
@@ -2662,7 +2671,7 @@ let g = class extends B {
|
|
|
2662
2671
|
a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
|
|
2663
2672
|
let n = this.cropSize.cropMode;
|
|
2664
2673
|
const h = this.cropModes.find(
|
|
2665
|
-
(
|
|
2674
|
+
(p) => p.value === n
|
|
2666
2675
|
)?.auto;
|
|
2667
2676
|
(t.detail.breakAspectRatio || h) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
|
|
2668
2677
|
...this.cropSize,
|
|
@@ -2692,43 +2701,43 @@ let g = class extends B {
|
|
|
2692
2701
|
});
|
|
2693
2702
|
}
|
|
2694
2703
|
onCropApply(t) {
|
|
2695
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2704
|
+
if (this.preResetTransformations = void 0, this.lastAction = m.Crop, !this.asset) {
|
|
2696
2705
|
const {
|
|
2697
2706
|
focusMode: h,
|
|
2698
|
-
height:
|
|
2699
|
-
position:
|
|
2707
|
+
height: p,
|
|
2708
|
+
position: f,
|
|
2700
2709
|
ratioHeight: c,
|
|
2701
|
-
ratioWidth:
|
|
2702
|
-
unit:
|
|
2703
|
-
width:
|
|
2704
|
-
x:
|
|
2710
|
+
ratioWidth: g,
|
|
2711
|
+
unit: y,
|
|
2712
|
+
width: d,
|
|
2713
|
+
x: z,
|
|
2705
2714
|
y: b
|
|
2706
|
-
} = this.cropSize,
|
|
2715
|
+
} = this.cropSize, u = this.focusModes.find(
|
|
2707
2716
|
(F) => F.value === h
|
|
2708
2717
|
)?.auto ?? !1;
|
|
2709
|
-
if (
|
|
2710
|
-
|
|
2711
|
-
key:
|
|
2718
|
+
if (y === o.AspectRatio) {
|
|
2719
|
+
g && c && this.upsertTransformation({
|
|
2720
|
+
key: m.Crop,
|
|
2712
2721
|
value: {
|
|
2713
2722
|
focusMode: h,
|
|
2714
|
-
isFocusModeAuto:
|
|
2715
|
-
position:
|
|
2723
|
+
isFocusModeAuto: u,
|
|
2724
|
+
position: f,
|
|
2716
2725
|
ratioHeight: c,
|
|
2717
|
-
ratioWidth:
|
|
2718
|
-
unit:
|
|
2726
|
+
ratioWidth: g,
|
|
2727
|
+
unit: y
|
|
2719
2728
|
}
|
|
2720
2729
|
});
|
|
2721
2730
|
return;
|
|
2722
2731
|
}
|
|
2723
|
-
(
|
|
2724
|
-
key:
|
|
2732
|
+
(p || d) && this.upsertTransformation({
|
|
2733
|
+
key: m.Crop,
|
|
2725
2734
|
value: {
|
|
2726
2735
|
focusMode: h,
|
|
2727
|
-
height:
|
|
2728
|
-
isFocusModeAuto:
|
|
2729
|
-
position:
|
|
2730
|
-
unit:
|
|
2731
|
-
width:
|
|
2736
|
+
height: p,
|
|
2737
|
+
isFocusModeAuto: u,
|
|
2738
|
+
position: f,
|
|
2739
|
+
unit: y,
|
|
2740
|
+
width: d,
|
|
2732
2741
|
/**
|
|
2733
2742
|
* Without an asset there is no cropper to drag, so x/y are always the 0
|
|
2734
2743
|
* placeholder from cropSize's default — never a real manual offset. Omit
|
|
@@ -2736,7 +2745,7 @@ let g = class extends B {
|
|
|
2736
2745
|
* string) so `hasManualXY` in buildTransformationString doesn't spuriously
|
|
2737
2746
|
* suppress the focus mode / position `c_g_` gravity value.
|
|
2738
2747
|
*/
|
|
2739
|
-
x: Number.isFinite(
|
|
2748
|
+
x: Number.isFinite(z) && z !== 0 ? z : void 0,
|
|
2740
2749
|
y: Number.isFinite(b) && b !== 0 ? b : void 0
|
|
2741
2750
|
}
|
|
2742
2751
|
});
|
|
@@ -2749,15 +2758,15 @@ let g = class extends B {
|
|
|
2749
2758
|
(h) => h.value === r
|
|
2750
2759
|
)?.auto ?? !1;
|
|
2751
2760
|
if (e && a && s) {
|
|
2752
|
-
let h = a,
|
|
2753
|
-
if (s === o.AspectRatio && (h = this.cropSize.percentageWidth * this.selectedFormat.width / 100,
|
|
2761
|
+
let h = a, p = e;
|
|
2762
|
+
if (s === o.AspectRatio && (h = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
|
|
2754
2763
|
this.transformations = [
|
|
2755
2764
|
...this.transformations,
|
|
2756
2765
|
{
|
|
2757
|
-
key:
|
|
2766
|
+
key: m.Crop,
|
|
2758
2767
|
value: {
|
|
2759
2768
|
focusMode: r,
|
|
2760
|
-
height:
|
|
2769
|
+
height: p,
|
|
2761
2770
|
isFocusModeAuto: n,
|
|
2762
2771
|
mode: i,
|
|
2763
2772
|
width: h
|
|
@@ -2765,18 +2774,18 @@ let g = class extends B {
|
|
|
2765
2774
|
}
|
|
2766
2775
|
];
|
|
2767
2776
|
else {
|
|
2768
|
-
const
|
|
2777
|
+
const f = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2769
2778
|
this.transformations = [
|
|
2770
2779
|
...this.transformations,
|
|
2771
2780
|
{
|
|
2772
|
-
key:
|
|
2781
|
+
key: m.Crop,
|
|
2773
2782
|
value: {
|
|
2774
2783
|
focusMode: r,
|
|
2775
|
-
height:
|
|
2784
|
+
height: p,
|
|
2776
2785
|
isFocusModeAuto: n,
|
|
2777
2786
|
unit: s,
|
|
2778
2787
|
width: h,
|
|
2779
|
-
x:
|
|
2788
|
+
x: f,
|
|
2780
2789
|
y: c
|
|
2781
2790
|
}
|
|
2782
2791
|
}
|
|
@@ -2785,7 +2794,7 @@ let g = class extends B {
|
|
|
2785
2794
|
} else i && (this.transformations = [
|
|
2786
2795
|
...this.transformations,
|
|
2787
2796
|
{
|
|
2788
|
-
key:
|
|
2797
|
+
key: m.Crop,
|
|
2789
2798
|
value: {
|
|
2790
2799
|
focusMode: r,
|
|
2791
2800
|
isFocusModeAuto: n,
|
|
@@ -2820,21 +2829,21 @@ let g = class extends B {
|
|
|
2820
2829
|
}
|
|
2821
2830
|
onResizeApply(t) {
|
|
2822
2831
|
const { height: e, unit: i, width: s } = t.detail;
|
|
2823
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2832
|
+
if (this.preResetTransformations = void 0, this.lastAction = m.Resize, !this.asset) {
|
|
2824
2833
|
if (i === o.AspectRatio) {
|
|
2825
|
-
const { ratioHeight:
|
|
2826
|
-
|
|
2827
|
-
key:
|
|
2834
|
+
const { ratioHeight: p, ratioWidth: f } = this.resizeSize;
|
|
2835
|
+
f && p && this.upsertTransformation({
|
|
2836
|
+
key: m.Resize,
|
|
2828
2837
|
value: {
|
|
2829
|
-
ratioHeight:
|
|
2830
|
-
ratioWidth:
|
|
2838
|
+
ratioHeight: p,
|
|
2839
|
+
ratioWidth: f,
|
|
2831
2840
|
unit: i
|
|
2832
2841
|
}
|
|
2833
2842
|
});
|
|
2834
2843
|
return;
|
|
2835
2844
|
}
|
|
2836
2845
|
(e || s) && this.upsertTransformation({
|
|
2837
|
-
key:
|
|
2846
|
+
key: m.Resize,
|
|
2838
2847
|
value: {
|
|
2839
2848
|
height: e,
|
|
2840
2849
|
unit: i,
|
|
@@ -2850,7 +2859,7 @@ let g = class extends B {
|
|
|
2850
2859
|
this.resizeSize.unit !== i ? (n = a, h = r) : i === o.AspectRatio && (n = Math.round(s / e * r), h = r), this.transformations = [
|
|
2851
2860
|
...this.transformations,
|
|
2852
2861
|
{
|
|
2853
|
-
key:
|
|
2862
|
+
key: m.Resize,
|
|
2854
2863
|
value: {
|
|
2855
2864
|
height: h,
|
|
2856
2865
|
unit: i,
|
|
@@ -2864,21 +2873,21 @@ let g = class extends B {
|
|
|
2864
2873
|
}
|
|
2865
2874
|
onRotationApply(t) {
|
|
2866
2875
|
const e = t.detail;
|
|
2867
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2876
|
+
if (this.preResetTransformations = void 0, this.lastAction = m.Rotate, !this.asset) {
|
|
2868
2877
|
e ? this.upsertTransformation({
|
|
2869
|
-
key:
|
|
2878
|
+
key: m.Rotate,
|
|
2870
2879
|
value: {
|
|
2871
2880
|
rotation: e
|
|
2872
2881
|
}
|
|
2873
2882
|
}) : this.transformations = this.transformations.filter(
|
|
2874
|
-
(i) => i.key !==
|
|
2883
|
+
(i) => i.key !== m.Rotate
|
|
2875
2884
|
);
|
|
2876
2885
|
return;
|
|
2877
2886
|
}
|
|
2878
2887
|
this.selectedFormat && (this.transformations = [
|
|
2879
2888
|
...this.transformations,
|
|
2880
2889
|
{
|
|
2881
|
-
key:
|
|
2890
|
+
key: m.Rotate,
|
|
2882
2891
|
value: {
|
|
2883
2892
|
rotation: e
|
|
2884
2893
|
}
|
|
@@ -2887,9 +2896,9 @@ let g = class extends B {
|
|
|
2887
2896
|
}
|
|
2888
2897
|
onQualityChange(t) {
|
|
2889
2898
|
const e = t.detail;
|
|
2890
|
-
this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction =
|
|
2899
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = m.Quality;
|
|
2891
2900
|
const i = {
|
|
2892
|
-
key:
|
|
2901
|
+
key: m.Quality,
|
|
2893
2902
|
value: {
|
|
2894
2903
|
quality: e
|
|
2895
2904
|
}
|
|
@@ -2903,22 +2912,22 @@ let g = class extends B {
|
|
|
2903
2912
|
keepMetadata: e
|
|
2904
2913
|
}), !this.asset) {
|
|
2905
2914
|
e ? this.upsertTransformation({
|
|
2906
|
-
key:
|
|
2915
|
+
key: m.Metadata,
|
|
2907
2916
|
value: {
|
|
2908
2917
|
keepMetadata: e
|
|
2909
2918
|
}
|
|
2910
2919
|
}) : this.transformations = this.transformations.filter(
|
|
2911
|
-
(i) => i.key !==
|
|
2920
|
+
(i) => i.key !== m.Metadata
|
|
2912
2921
|
);
|
|
2913
2922
|
return;
|
|
2914
2923
|
}
|
|
2915
2924
|
e ? this.upsertTransformation({
|
|
2916
|
-
key:
|
|
2925
|
+
key: m.Metadata,
|
|
2917
2926
|
value: {
|
|
2918
2927
|
keepMetadata: e
|
|
2919
2928
|
}
|
|
2920
2929
|
}) : this.transformations = this.transformations.filter(
|
|
2921
|
-
(i) => i.key !==
|
|
2930
|
+
(i) => i.key !== m.Metadata
|
|
2922
2931
|
);
|
|
2923
2932
|
}
|
|
2924
2933
|
onExtensionChange(t) {
|
|
@@ -2930,7 +2939,7 @@ let g = class extends B {
|
|
|
2930
2939
|
}
|
|
2931
2940
|
syncQuality() {
|
|
2932
2941
|
const t = this.transformations.findLast(
|
|
2933
|
-
(e) => e.key ===
|
|
2942
|
+
(e) => e.key === m.Quality
|
|
2934
2943
|
)?.value?.quality;
|
|
2935
2944
|
this.selectedFormat && (this.selectedFormat = {
|
|
2936
2945
|
...this.selectedFormat,
|
|
@@ -2946,184 +2955,187 @@ let g = class extends B {
|
|
|
2946
2955
|
this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "", this.transformations = [], this.frozenIndex = -1, this.syncQuality();
|
|
2947
2956
|
}
|
|
2948
2957
|
render() {
|
|
2949
|
-
return A`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${
|
|
2958
|
+
return A`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
|
|
2950
2959
|
!this.hideHeader,
|
|
2951
|
-
() => A`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${
|
|
2960
|
+
() => A`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${M(this.canReset, () => A`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
|
|
2952
2961
|
() => Xt
|
|
2953
2962
|
)}
|
|
2954
|
-
${
|
|
2963
|
+
${M(
|
|
2955
2964
|
!this.noFormat,
|
|
2956
|
-
() => A`<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"} .items=${this.formats} ?loading=${this.loading && this.lastAction ===
|
|
2965
|
+
() => A`<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"} .items=${this.formats} ?loading=${this.loading && this.lastAction === m.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
2957
2966
|
)}
|
|
2958
|
-
${
|
|
2967
|
+
${M(
|
|
2959
2968
|
!this.noCrop,
|
|
2960
|
-
() => A`<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 ===
|
|
2969
|
+
() => A`<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 === m.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>`
|
|
2961
2970
|
)}
|
|
2962
|
-
${
|
|
2971
|
+
${M(
|
|
2963
2972
|
!this.noResize,
|
|
2964
|
-
() => A`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction ===
|
|
2973
|
+
() => A`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === m.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>`
|
|
2965
2974
|
)}
|
|
2966
|
-
${
|
|
2975
|
+
${M(
|
|
2967
2976
|
!this.noRotate,
|
|
2968
|
-
() => A`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
2969
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
2977
|
+
() => A`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.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>`
|
|
2978
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.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(
|
|
2970
2979
|
!this.noMetadata,
|
|
2971
2980
|
() => A`<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>`
|
|
2972
2981
|
)}
|
|
2973
|
-
${
|
|
2982
|
+
${M(
|
|
2974
2983
|
this.useCustomExtension,
|
|
2975
2984
|
() => A`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
|
|
2976
2985
|
)}</div>`;
|
|
2977
2986
|
}
|
|
2978
2987
|
};
|
|
2979
|
-
|
|
2980
|
-
|
|
2988
|
+
x.styles = [V, we];
|
|
2989
|
+
x.dependencies = {
|
|
2981
2990
|
"cx-asset-link-format-crop": C,
|
|
2982
2991
|
"cx-asset-link-format-extension": K,
|
|
2983
2992
|
"cx-asset-link-format-metadata": O,
|
|
2984
2993
|
"cx-asset-link-format-proxy": E,
|
|
2985
|
-
"cx-asset-link-format-quality":
|
|
2994
|
+
"cx-asset-link-format-quality": H,
|
|
2986
2995
|
"cx-asset-link-format-resize": v,
|
|
2987
|
-
"cx-asset-link-format-rotation":
|
|
2996
|
+
"cx-asset-link-format-rotation": T,
|
|
2988
2997
|
"cx-button": Z,
|
|
2989
2998
|
"cx-space": L,
|
|
2990
2999
|
"cx-typography": U
|
|
2991
3000
|
};
|
|
2992
|
-
|
|
3001
|
+
S([
|
|
2993
3002
|
l({ attribute: "base-url", type: String })
|
|
2994
|
-
],
|
|
2995
|
-
|
|
3003
|
+
], x.prototype, "baseUrl", 2);
|
|
3004
|
+
S([
|
|
2996
3005
|
l({ attribute: "token", type: String })
|
|
2997
|
-
],
|
|
2998
|
-
|
|
3006
|
+
], x.prototype, "token", 2);
|
|
3007
|
+
S([
|
|
2999
3008
|
l({ reflect: !1, type: Object })
|
|
3000
|
-
],
|
|
3001
|
-
|
|
3009
|
+
], x.prototype, "asset", 2);
|
|
3010
|
+
S([
|
|
3002
3011
|
l({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
3003
|
-
],
|
|
3004
|
-
|
|
3012
|
+
], x.prototype, "cropModes", 2);
|
|
3013
|
+
S([
|
|
3005
3014
|
l({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
3006
|
-
],
|
|
3007
|
-
|
|
3015
|
+
], x.prototype, "focusModes", 2);
|
|
3016
|
+
S([
|
|
3008
3017
|
l({ reflect: !1, type: Array })
|
|
3009
|
-
],
|
|
3010
|
-
|
|
3018
|
+
], x.prototype, "extensions", 2);
|
|
3019
|
+
S([
|
|
3011
3020
|
l({ reflect: !1, type: Array })
|
|
3012
|
-
],
|
|
3013
|
-
|
|
3021
|
+
], x.prototype, "proxies", 2);
|
|
3022
|
+
S([
|
|
3014
3023
|
l({ attribute: "for-cropper", reflect: !0, type: String })
|
|
3015
|
-
],
|
|
3016
|
-
|
|
3024
|
+
], x.prototype, "forCropper", 2);
|
|
3025
|
+
S([
|
|
3017
3026
|
l({ attribute: "use-session", reflect: !0, type: String })
|
|
3018
|
-
],
|
|
3019
|
-
|
|
3027
|
+
], x.prototype, "useSession", 2);
|
|
3028
|
+
S([
|
|
3020
3029
|
l({ reflect: !1, type: Array })
|
|
3021
|
-
],
|
|
3022
|
-
|
|
3030
|
+
], x.prototype, "transformations", 2);
|
|
3031
|
+
S([
|
|
3023
3032
|
l({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
3024
|
-
],
|
|
3025
|
-
|
|
3033
|
+
], x.prototype, "selectedProxy", 2);
|
|
3034
|
+
S([
|
|
3026
3035
|
l({ attribute: "default-proxy", reflect: !0, type: String })
|
|
3027
|
-
],
|
|
3028
|
-
|
|
3036
|
+
], x.prototype, "defaultProxy", 2);
|
|
3037
|
+
S([
|
|
3029
3038
|
l({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
3030
|
-
],
|
|
3031
|
-
|
|
3039
|
+
], x.prototype, "useCustomExtension", 2);
|
|
3040
|
+
S([
|
|
3032
3041
|
l({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
3033
|
-
],
|
|
3034
|
-
|
|
3042
|
+
], x.prototype, "noMetadata", 2);
|
|
3043
|
+
S([
|
|
3035
3044
|
l({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
3036
|
-
],
|
|
3037
|
-
|
|
3045
|
+
], x.prototype, "noFormat", 2);
|
|
3046
|
+
S([
|
|
3038
3047
|
l({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
3039
|
-
],
|
|
3040
|
-
|
|
3048
|
+
], x.prototype, "noCrop", 2);
|
|
3049
|
+
S([
|
|
3041
3050
|
l({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
3042
|
-
],
|
|
3043
|
-
|
|
3051
|
+
], x.prototype, "noResize", 2);
|
|
3052
|
+
S([
|
|
3044
3053
|
l({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
3045
|
-
],
|
|
3046
|
-
|
|
3054
|
+
], x.prototype, "noRotate", 2);
|
|
3055
|
+
S([
|
|
3047
3056
|
l({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
3048
|
-
],
|
|
3049
|
-
|
|
3057
|
+
], x.prototype, "lastImageSize", 2);
|
|
3058
|
+
S([
|
|
3050
3059
|
l({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
3051
|
-
],
|
|
3052
|
-
|
|
3060
|
+
], x.prototype, "hideHeader", 2);
|
|
3061
|
+
S([
|
|
3053
3062
|
l({ attribute: "can-reset", type: Boolean })
|
|
3054
|
-
],
|
|
3055
|
-
|
|
3063
|
+
], x.prototype, "canReset", 2);
|
|
3064
|
+
S([
|
|
3056
3065
|
l({ attribute: !1, reflect: !1, type: Object })
|
|
3057
|
-
],
|
|
3058
|
-
|
|
3066
|
+
], x.prototype, "queryElement", 2);
|
|
3067
|
+
S([
|
|
3059
3068
|
R()
|
|
3060
|
-
],
|
|
3061
|
-
|
|
3069
|
+
], x.prototype, "activeSetting", 2);
|
|
3070
|
+
S([
|
|
3062
3071
|
R()
|
|
3063
|
-
],
|
|
3064
|
-
|
|
3072
|
+
], x.prototype, "selectedFormat", 2);
|
|
3073
|
+
S([
|
|
3065
3074
|
R()
|
|
3066
|
-
],
|
|
3067
|
-
|
|
3075
|
+
], x.prototype, "resizeSize", 2);
|
|
3076
|
+
S([
|
|
3068
3077
|
R()
|
|
3069
|
-
],
|
|
3070
|
-
|
|
3078
|
+
], x.prototype, "cropSize", 2);
|
|
3079
|
+
S([
|
|
3071
3080
|
R()
|
|
3072
|
-
],
|
|
3073
|
-
|
|
3081
|
+
], x.prototype, "rotation", 2);
|
|
3082
|
+
S([
|
|
3074
3083
|
R()
|
|
3075
|
-
],
|
|
3076
|
-
|
|
3084
|
+
], x.prototype, "defaultSize", 2);
|
|
3085
|
+
S([
|
|
3077
3086
|
R()
|
|
3078
|
-
],
|
|
3079
|
-
|
|
3087
|
+
], x.prototype, "cropperElement", 2);
|
|
3088
|
+
S([
|
|
3080
3089
|
R()
|
|
3081
|
-
],
|
|
3082
|
-
|
|
3090
|
+
], x.prototype, "parameters", 2);
|
|
3091
|
+
S([
|
|
3083
3092
|
R()
|
|
3084
|
-
],
|
|
3085
|
-
|
|
3093
|
+
], x.prototype, "loading", 2);
|
|
3094
|
+
S([
|
|
3086
3095
|
R()
|
|
3087
|
-
],
|
|
3088
|
-
|
|
3096
|
+
], x.prototype, "lastAction", 2);
|
|
3097
|
+
S([
|
|
3089
3098
|
R()
|
|
3090
|
-
],
|
|
3091
|
-
|
|
3099
|
+
], x.prototype, "frozenIndex", 2);
|
|
3100
|
+
S([
|
|
3092
3101
|
R()
|
|
3093
|
-
],
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
],
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
],
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
],
|
|
3103
|
-
|
|
3102
|
+
], x.prototype, "preResetTransformations", 2);
|
|
3103
|
+
S([
|
|
3104
|
+
_("transformations")
|
|
3105
|
+
], x.prototype, "handleTransformationsChange", 1);
|
|
3106
|
+
S([
|
|
3107
|
+
_("selectedProxy")
|
|
3108
|
+
], x.prototype, "handleSelectedProxyChange", 1);
|
|
3109
|
+
S([
|
|
3110
|
+
_("loading")
|
|
3111
|
+
], x.prototype, "handleLoadingChange", 1);
|
|
3112
|
+
x = S([
|
|
3104
3113
|
G("cx-asset-link-format")
|
|
3105
|
-
],
|
|
3114
|
+
], x);
|
|
3106
3115
|
export {
|
|
3107
|
-
|
|
3116
|
+
x as C,
|
|
3108
3117
|
wt as D,
|
|
3109
3118
|
ct as F,
|
|
3110
3119
|
tt as O,
|
|
3111
|
-
|
|
3120
|
+
ye as a,
|
|
3112
3121
|
ce as b,
|
|
3113
3122
|
Ut as c,
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3123
|
+
Ti as d,
|
|
3124
|
+
Hi as e,
|
|
3125
|
+
Ei as f,
|
|
3117
3126
|
qt as g,
|
|
3118
3127
|
ut as h,
|
|
3119
3128
|
At as i,
|
|
3120
3129
|
lt as j,
|
|
3121
|
-
|
|
3130
|
+
Mt as k,
|
|
3122
3131
|
It as l,
|
|
3123
3132
|
pt as m,
|
|
3124
3133
|
dt as n,
|
|
3125
|
-
|
|
3126
|
-
|
|
3134
|
+
Tt as o,
|
|
3135
|
+
Wi as p,
|
|
3127
3136
|
oe as q,
|
|
3137
|
+
Fi as r,
|
|
3138
|
+
Mi as s,
|
|
3139
|
+
Ii as t,
|
|
3128
3140
|
ae as u
|
|
3129
3141
|
};
|