@orangelogic/design-system 2.146.0 → 2.147.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.CU3qvBEO.js → asset-link-format.DyUDG8er.js} +864 -771
- package/library/chunks/{button.Bx7AnUu4.js → button.W0tW1LJ-.js} +1 -1
- package/library/chunks/{color-swatch-group.DORzYTrn.js → color-swatch-group.BQYOjoiA.js} +1571 -1529
- package/library/chunks/{color-swatch.Pczcitrc.js → color-swatch.B7X9wSl2.js} +1 -1
- package/library/chunks/{confirm-popover.DLb5agj9.js → confirm-popover.DWLFTk2n.js} +3 -3
- package/library/chunks/{dialog.B1uHEUsi.js → dialog.yZCtJRtl.js} +2 -2
- package/library/chunks/{document-viewer.CMHuC2Di.js → document-viewer.Cr-tkwYo.js} +5 -5
- package/library/chunks/{dot-pagination.171qk-p2.js → dot-pagination.C8dxu87e.js} +1 -1
- package/library/chunks/{folder-select.COFTAu2f.js → folder-select.CLDy4FKy.js} +4 -4
- package/library/chunks/{header.DP4ZGEwN.js → header.BJnsijee.js} +1 -1
- package/library/chunks/{i18n.DYXys45m.js → i18n.D07sG_CU.js} +2 -1
- package/library/chunks/{icon-button.B0L-_zT9.js → icon-button.CaUkGny9.js} +1 -1
- package/library/chunks/{iframe._3_Z5IJc.js → iframe.Bj3JzA9b.js} +1 -1
- package/library/chunks/{image.DVbY2O89.js → image.DaYfKRf4.js} +1 -1
- package/library/chunks/{input.CSI9KLz7.js → input.CtpPKmen.js} +1 -1
- package/library/chunks/{option.BweUpygr.js → option.DoCfNbP9.js} +1 -1
- package/library/chunks/{pagination.CyY982g0.js → pagination.B0VIa8Pm.js} +5 -5
- package/library/chunks/{tab-group.BJImZf-n.js → tab-group.CRIY9Wby.js} +3 -3
- package/library/chunks/transformation.DGzjBg6V.js +163 -0
- package/library/chunks/{tree.CvxvKWUm.js → tree.uSEgW--4.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +13 -13
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +3 -3
- 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 +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.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 +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +3452 -3410
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-faceted-filter-remove.d.ts +9 -0
- package/library/packages/events/src/cx-table-applied-filter-remove.d.ts +9 -0
- package/library/packages/events/src/events.d.ts +2 -0
- package/library/packages/hybrid/table-core/src/table/styles/table-clickable-cell.styles.d.ts +3 -1
- package/library/packages/hybrid/table-core/src/table/table.d.ts +13 -0
- package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +13 -1
- package/library/packages/molecules/src/search-box/search-box.d.ts +7 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +12 -0
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +2 -2
- package/library/packages/types/src/asset-link-format.d.ts +2 -0
- package/library/packages/types/src/faceted-filter.d.ts +4 -0
- package/library/packages/types/src/search-box.d.ts +1 -0
- package/library/packages/types/src/table.d.ts +3 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/react-web-component.d.ts +4 -4
- package/library/utils.js +2 -2
- package/package.json +1 -1
- package/library/chunks/transformation.c-RS37zA.js +0 -151
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as G } from "./button.W0tW1LJ-.js";
|
|
3
3
|
import D from "../components/space.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import { n
|
|
6
|
-
import { h as
|
|
7
|
-
import { M as
|
|
4
|
+
import { C as N } from "./typography.IqHbnd3C.js";
|
|
5
|
+
import { n, C as O } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
|
+
import { h as _, a as Ht, C as Et, S as Nt, b as Ot, c as Lt, d as Ut } from "./endpoints.Bn_YviaU.js";
|
|
7
|
+
import { M as vt, U as o, T as p } from "./asset-link-format.QzzboHHE.js";
|
|
8
8
|
import "./browser.BHOCIF_A.js";
|
|
9
|
-
import { i as
|
|
9
|
+
import { i as L, x as v, E as qt } from "./lit-element.jLBm65_O.js";
|
|
10
10
|
import "./form.BSqXLytJ.js";
|
|
11
|
-
import { L } from "./i18n.
|
|
11
|
+
import { L as U } from "./i18n.D07sG_CU.js";
|
|
12
12
|
import { a as Bt } from "./string.BmBJ_BLT.js";
|
|
13
13
|
import "./date-picker.DTUICGb9.js";
|
|
14
14
|
import "./content-builder.DZRw6hpX.js";
|
|
15
15
|
import "./unsafe-html.Dff7-rCx.js";
|
|
16
16
|
import { b as jt } from "./_baseUniq.CoXu-orP.js";
|
|
17
|
-
import { c as
|
|
18
|
-
import { c as
|
|
19
|
-
import { w as
|
|
20
|
-
import { s as
|
|
21
|
-
import { b as it } from "./transformation.
|
|
22
|
-
import { r as
|
|
17
|
+
import { c as q } from "./component.styles.CRO4Odto.js";
|
|
18
|
+
import { c as B } from "./custom-element.L4WJXn1j.js";
|
|
19
|
+
import { w as $ } from "./watch.K-dbDP6P.js";
|
|
20
|
+
import { s as At, c as et } from "./number.CtCaI0T_.js";
|
|
21
|
+
import { b as it } from "./transformation.DGzjBg6V.js";
|
|
22
|
+
import { r as b } from "./state.CSDxrqLd.js";
|
|
23
23
|
import { n as F } from "./when.Dr1es41R.js";
|
|
24
24
|
import Z from "../components/details.js";
|
|
25
25
|
import Vt from "../components/divider.js";
|
|
26
26
|
import { C as Y } from "./icon.CsF1BoUl.js";
|
|
27
|
-
import { C as mt } from "./icon-button.
|
|
28
|
-
import { C as ft } from "./input.
|
|
29
|
-
import { C as
|
|
30
|
-
import
|
|
27
|
+
import { C as mt } from "./icon-button.CaUkGny9.js";
|
|
28
|
+
import { C as ft } from "./input.CtpPKmen.js";
|
|
29
|
+
import { C as ht } from "./option.DoCfNbP9.js";
|
|
30
|
+
import nt from "../components/select.js";
|
|
31
31
|
import { c as Gt } from "./image.QVlPFadX.js";
|
|
32
32
|
import { e as J } from "./query.BBf1UFkC.js";
|
|
33
33
|
import { c as tt } from "./repeat.CFjcER6_.js";
|
|
34
34
|
import { o as I } from "./style-map.llVFPd__.js";
|
|
35
|
-
import
|
|
35
|
+
import It from "../components/tooltip.js";
|
|
36
36
|
import Qt from "../components/button-group.js";
|
|
37
37
|
import { C as Kt } from "./checkbox.aQnF4Zc3.js";
|
|
38
38
|
function Xt(t) {
|
|
@@ -81,10 +81,10 @@ function ee(t) {
|
|
|
81
81
|
if (a == null)
|
|
82
82
|
continue;
|
|
83
83
|
if (s === "custom") {
|
|
84
|
-
for (const [
|
|
84
|
+
for (const [h, l] of Object.entries(
|
|
85
85
|
a
|
|
86
86
|
))
|
|
87
|
-
e.push(wt(
|
|
87
|
+
e.push(wt(h, l));
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
90
90
|
const r = Yt[s];
|
|
@@ -100,12 +100,12 @@ function ee(t) {
|
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
102
102
|
if (s === "parentFolderIdentifier") {
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
103
|
+
const h = Array.isArray(a) ? a : [a];
|
|
104
|
+
if (h.length === 0)
|
|
105
105
|
continue;
|
|
106
106
|
const l = [
|
|
107
|
-
...
|
|
108
|
-
...
|
|
107
|
+
...h.map((m) => `ParentFolderIdentifier:${dt(String(m))}`),
|
|
108
|
+
...h.map((m) => `ParentAlbumIdentifier:${dt(String(m))}`)
|
|
109
109
|
];
|
|
110
110
|
e.push(`(${l.join(" OR ")})`);
|
|
111
111
|
continue;
|
|
@@ -128,22 +128,22 @@ function st(t) {
|
|
|
128
128
|
}
|
|
129
129
|
return ee(t);
|
|
130
130
|
}
|
|
131
|
-
const ut = "CoreField.LargeSizePreview",
|
|
131
|
+
const ut = "CoreField.LargeSizePreview", bt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", _t = "CoreField.MaxHeight", Pt = "CoreField.MaxWidth", at = "Document.RecordID", Mt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
|
|
132
132
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
133
133
|
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
134
134
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
135
|
-
},
|
|
135
|
+
}, Tt = {
|
|
136
136
|
[ut]: pt.DEFAULT_VIEW_SIZE,
|
|
137
137
|
[Wt]: pt.FIELD_TITLE_WITH_FALLBACK,
|
|
138
138
|
[X]: pt.ORIGINAL_VIEW_SIZE
|
|
139
139
|
}, ae = Object.fromEntries(
|
|
140
|
-
Object.entries(
|
|
140
|
+
Object.entries(Tt).map(([t, e]) => [
|
|
141
141
|
e,
|
|
142
142
|
t
|
|
143
143
|
])
|
|
144
144
|
);
|
|
145
145
|
function oe(t) {
|
|
146
|
-
return
|
|
146
|
+
return Tt[t] ?? t;
|
|
147
147
|
}
|
|
148
148
|
function Ft(t) {
|
|
149
149
|
const e = {};
|
|
@@ -153,51 +153,51 @@ function Ft(t) {
|
|
|
153
153
|
}
|
|
154
154
|
return e;
|
|
155
155
|
}
|
|
156
|
-
async function
|
|
156
|
+
async function Dt({
|
|
157
157
|
countPerPage: t,
|
|
158
158
|
fields: e,
|
|
159
159
|
getPermanentAssetsPaths: i,
|
|
160
160
|
isSiteBuilder: s,
|
|
161
161
|
pageNumber: a,
|
|
162
162
|
query: r,
|
|
163
|
-
securityByPassToken:
|
|
163
|
+
securityByPassToken: h,
|
|
164
164
|
siteUrl: l,
|
|
165
|
-
sort:
|
|
166
|
-
token:
|
|
167
|
-
useSession:
|
|
165
|
+
sort: m,
|
|
166
|
+
token: x,
|
|
167
|
+
useSession: c
|
|
168
168
|
}) {
|
|
169
|
-
const
|
|
169
|
+
const y = e?.map(oe);
|
|
170
170
|
try {
|
|
171
|
-
return (await
|
|
171
|
+
return (await _.request({
|
|
172
172
|
baseURL: l,
|
|
173
|
-
headers:
|
|
173
|
+
headers: x ? { Authorization: `Bearer ${x}` } : void 0,
|
|
174
174
|
method: "GET",
|
|
175
175
|
params: {
|
|
176
176
|
CountPerPage: t,
|
|
177
|
-
Fields: Xt(
|
|
177
|
+
Fields: Xt(y),
|
|
178
178
|
Format: "json",
|
|
179
179
|
GetPermanentAssetsPaths: i || void 0,
|
|
180
180
|
PageNumber: a,
|
|
181
181
|
Query: st(r),
|
|
182
|
-
SecurityByPassToken:
|
|
183
|
-
Sort:
|
|
184
|
-
UseSession:
|
|
182
|
+
SecurityByPassToken: h || void 0,
|
|
183
|
+
Sort: m || void 0,
|
|
184
|
+
UseSession: c || void 0
|
|
185
185
|
},
|
|
186
186
|
paramsSerializer: { indexes: null },
|
|
187
187
|
responseType: "json",
|
|
188
188
|
transformResponse: [
|
|
189
|
-
...Array.isArray(
|
|
190
|
-
s ? (
|
|
191
|
-
items: (
|
|
192
|
-
sort:
|
|
193
|
-
totalCount:
|
|
194
|
-
}) : (
|
|
195
|
-
items: (
|
|
196
|
-
sort:
|
|
197
|
-
totalCount:
|
|
189
|
+
...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
|
|
190
|
+
s ? (f) => ({
|
|
191
|
+
items: (f.results?.Items ?? []).map(Ft),
|
|
192
|
+
sort: f.results?.GlobalInfo?.Sort ?? "",
|
|
193
|
+
totalCount: f.results?.GlobalInfo?.TotalCount ?? 0
|
|
194
|
+
}) : (f) => ({
|
|
195
|
+
items: (f.APIResponse?.Items ?? []).map(Ft),
|
|
196
|
+
sort: f.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
197
|
+
totalCount: f.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
198
198
|
})
|
|
199
199
|
],
|
|
200
|
-
url: s ?
|
|
200
|
+
url: s ? Et.SEARCH_ASSETS : Nt["4.0"]
|
|
201
201
|
})).data;
|
|
202
202
|
} catch {
|
|
203
203
|
return { items: [], sort: "", totalCount: 0 };
|
|
@@ -210,10 +210,10 @@ async function re({
|
|
|
210
210
|
siteUrl: s,
|
|
211
211
|
token: a,
|
|
212
212
|
transformations: r,
|
|
213
|
-
useSession:
|
|
213
|
+
useSession: h
|
|
214
214
|
}) {
|
|
215
215
|
try {
|
|
216
|
-
return (await
|
|
216
|
+
return (await _.request({
|
|
217
217
|
baseURL: s,
|
|
218
218
|
method: "GET",
|
|
219
219
|
params: {
|
|
@@ -222,21 +222,21 @@ async function re({
|
|
|
222
222
|
TargetExtension: Bt(e),
|
|
223
223
|
Token: a || void 0,
|
|
224
224
|
Transformations: r,
|
|
225
|
-
UseSession:
|
|
225
|
+
UseSession: h || void 0
|
|
226
226
|
},
|
|
227
227
|
/**
|
|
228
228
|
* https://link.orangelogic.com/Tasks/41S1XH
|
|
229
229
|
*/
|
|
230
230
|
timeout: 3e5,
|
|
231
231
|
// 5 minutes
|
|
232
|
-
url:
|
|
232
|
+
url: Ht.GET_TRANSFORM_ASSET_LINK
|
|
233
233
|
})).data;
|
|
234
234
|
} catch {
|
|
235
235
|
return null;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
238
|
+
const he = 50;
|
|
239
|
+
function ne(t, e) {
|
|
240
240
|
const i = [];
|
|
241
241
|
for (let s = 0; s < t.length; s += e)
|
|
242
242
|
i.push(t.slice(s, s + e));
|
|
@@ -252,45 +252,45 @@ async function xi({
|
|
|
252
252
|
}) {
|
|
253
253
|
if (!Array.isArray(s) || s.length === 0)
|
|
254
254
|
return { facets: [], items: [], totalCount: 0 };
|
|
255
|
-
const
|
|
256
|
-
...
|
|
255
|
+
const h = t?.filter((f) => f && typeof f == "string") ?? [], l = [
|
|
256
|
+
...h,
|
|
257
257
|
X,
|
|
258
258
|
rt,
|
|
259
259
|
ot,
|
|
260
260
|
ie,
|
|
261
261
|
se,
|
|
262
262
|
at
|
|
263
|
-
],
|
|
264
|
-
|
|
265
|
-
(
|
|
266
|
-
countPerPage:
|
|
263
|
+
], m = ne(s, he), x = await Promise.all(
|
|
264
|
+
m.map(
|
|
265
|
+
(f) => Dt({
|
|
266
|
+
countPerPage: f.length,
|
|
267
267
|
fields: l,
|
|
268
268
|
getPermanentAssetsPaths: e,
|
|
269
269
|
isSiteBuilder: i,
|
|
270
270
|
pageNumber: 1,
|
|
271
|
-
query: { recordId:
|
|
271
|
+
query: { recordId: f },
|
|
272
272
|
securityByPassToken: a,
|
|
273
273
|
token: r
|
|
274
274
|
})
|
|
275
275
|
)
|
|
276
|
-
),
|
|
277
|
-
let
|
|
278
|
-
return
|
|
279
|
-
name:
|
|
280
|
-
originalUrl: w(
|
|
281
|
-
recordId: w(
|
|
282
|
-
...
|
|
283
|
-
(
|
|
276
|
+
), c = new Map(s.map((f, R) => [f, R])), y = x.flatMap((f) => f.items).map((f) => {
|
|
277
|
+
let R = w(f, rt);
|
|
278
|
+
return R === "" && (R = w(f, ot)), {
|
|
279
|
+
name: R,
|
|
280
|
+
originalUrl: w(f, X),
|
|
281
|
+
recordId: w(f, at),
|
|
282
|
+
...h.reduce(
|
|
283
|
+
(E, z) => (E[z] = w(f, z), E),
|
|
284
284
|
{}
|
|
285
285
|
)
|
|
286
286
|
};
|
|
287
287
|
}).sort(
|
|
288
|
-
(
|
|
289
|
-
),
|
|
290
|
-
(
|
|
288
|
+
(f, R) => (c.get(f.recordId) ?? 1 / 0) - (c.get(R.recordId) ?? 1 / 0)
|
|
289
|
+
), k = x.reduce(
|
|
290
|
+
(f, R) => f + R.totalCount,
|
|
291
291
|
0
|
|
292
292
|
);
|
|
293
|
-
return { facets: [], items:
|
|
293
|
+
return { facets: [], items: y, totalCount: k };
|
|
294
294
|
}
|
|
295
295
|
function w(t, e) {
|
|
296
296
|
const i = t[e];
|
|
@@ -303,31 +303,31 @@ async function yi({
|
|
|
303
303
|
getPermanentAssetsPaths: s,
|
|
304
304
|
isSiteBuilder: a,
|
|
305
305
|
limitedDocTypes: r,
|
|
306
|
-
pageNumber:
|
|
306
|
+
pageNumber: h,
|
|
307
307
|
parentFolderIdentifier: l,
|
|
308
|
-
searchTerm:
|
|
309
|
-
securityByPassToken:
|
|
310
|
-
sortOrder:
|
|
311
|
-
token:
|
|
308
|
+
searchTerm: m,
|
|
309
|
+
securityByPassToken: x,
|
|
310
|
+
sortOrder: c,
|
|
311
|
+
token: y
|
|
312
312
|
}) {
|
|
313
313
|
if (!e && !l)
|
|
314
314
|
return { facets: [], items: [], totalCount: 0 };
|
|
315
|
-
const
|
|
315
|
+
const k = (i?.filter((z) => z && typeof z == "string") ?? []).map((z) => z.replace("%20", " ")), f = {
|
|
316
316
|
directParentFolderIdentifier: e,
|
|
317
317
|
parentFolderIdentifier: l,
|
|
318
|
-
...r.length > 0 ? { docType: [
|
|
319
|
-
},
|
|
318
|
+
...r.length > 0 ? { docType: [vt.Image, vt.Audio] } : {}
|
|
319
|
+
}, R = await Dt({
|
|
320
320
|
countPerPage: t,
|
|
321
321
|
fields: [
|
|
322
|
-
...
|
|
322
|
+
...k,
|
|
323
323
|
Wt,
|
|
324
324
|
ut,
|
|
325
325
|
X,
|
|
326
326
|
$t,
|
|
327
|
-
_t,
|
|
328
327
|
Pt,
|
|
328
|
+
_t,
|
|
329
329
|
Ct,
|
|
330
|
-
|
|
330
|
+
bt,
|
|
331
331
|
Mt,
|
|
332
332
|
Rt,
|
|
333
333
|
kt,
|
|
@@ -337,39 +337,39 @@ async function yi({
|
|
|
337
337
|
],
|
|
338
338
|
getPermanentAssetsPaths: s,
|
|
339
339
|
isSiteBuilder: a,
|
|
340
|
-
pageNumber:
|
|
341
|
-
query:
|
|
342
|
-
securityByPassToken:
|
|
340
|
+
pageNumber: h,
|
|
341
|
+
query: f,
|
|
342
|
+
securityByPassToken: x,
|
|
343
343
|
sort: void 0,
|
|
344
|
-
token:
|
|
345
|
-
}),
|
|
346
|
-
let K = w(
|
|
347
|
-
K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(
|
|
348
|
-
const yt = w(
|
|
344
|
+
token: y
|
|
345
|
+
}), E = R.items.map((z) => {
|
|
346
|
+
let K = w(z, kt), ct = w(z, rt), xt = w(z, ut);
|
|
347
|
+
K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(z, ot)), K.toLowerCase() === ".gif" && (xt = w(z, X));
|
|
348
|
+
const yt = w(z, at);
|
|
349
349
|
return {
|
|
350
|
-
docSubType: w(
|
|
351
|
-
docType: w(
|
|
350
|
+
docSubType: w(z, Mt),
|
|
351
|
+
docType: w(z, bt) || "",
|
|
352
352
|
extension: K,
|
|
353
|
-
height: w(
|
|
353
|
+
height: w(z, _t) || "0",
|
|
354
354
|
id: yt,
|
|
355
|
-
identifier: w(
|
|
355
|
+
identifier: w(z, Rt),
|
|
356
356
|
imageUrl: xt,
|
|
357
357
|
name: ct,
|
|
358
|
-
originalUrl: w(
|
|
358
|
+
originalUrl: w(z, X),
|
|
359
359
|
recordId: yt,
|
|
360
|
-
size: w(
|
|
361
|
-
tags: w(
|
|
362
|
-
width: w(
|
|
363
|
-
...
|
|
364
|
-
(St,
|
|
360
|
+
size: w(z, Ct) || "0 MB",
|
|
361
|
+
tags: w(z, $t),
|
|
362
|
+
width: w(z, Pt) || "0",
|
|
363
|
+
...k.reduce(
|
|
364
|
+
(St, zt) => (St[zt] = w(z, zt), St),
|
|
365
365
|
{}
|
|
366
366
|
)
|
|
367
367
|
};
|
|
368
368
|
});
|
|
369
369
|
return {
|
|
370
370
|
facets: [],
|
|
371
|
-
items:
|
|
372
|
-
totalCount:
|
|
371
|
+
items: E,
|
|
372
|
+
totalCount: R.totalCount
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
async function le({
|
|
@@ -380,7 +380,7 @@ async function le({
|
|
|
380
380
|
useSession: a
|
|
381
381
|
}) {
|
|
382
382
|
try {
|
|
383
|
-
return (await
|
|
383
|
+
return (await _.request({
|
|
384
384
|
method: "GET",
|
|
385
385
|
params: {
|
|
386
386
|
AutoCropMode: t,
|
|
@@ -393,15 +393,15 @@ async function le({
|
|
|
393
393
|
timeout: 3e5,
|
|
394
394
|
// 5 minutes
|
|
395
395
|
transformResponse: [
|
|
396
|
-
...Array.isArray(
|
|
397
|
-
(
|
|
398
|
-
height:
|
|
399
|
-
width:
|
|
400
|
-
x:
|
|
401
|
-
y:
|
|
396
|
+
...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
|
|
397
|
+
(h) => ({
|
|
398
|
+
height: h.cropHeight,
|
|
399
|
+
width: h.cropWidth,
|
|
400
|
+
x: h.cropX,
|
|
401
|
+
y: h.cropY
|
|
402
402
|
})
|
|
403
403
|
],
|
|
404
|
-
url:
|
|
404
|
+
url: Ht.GET_CROP_ZONE_SUGGESTION
|
|
405
405
|
})).data;
|
|
406
406
|
} catch {
|
|
407
407
|
return null;
|
|
@@ -415,7 +415,7 @@ async function Si({
|
|
|
415
415
|
useSession: a
|
|
416
416
|
}) {
|
|
417
417
|
try {
|
|
418
|
-
return (await
|
|
418
|
+
return (await _.request({
|
|
419
419
|
baseURL: i,
|
|
420
420
|
method: "GET",
|
|
421
421
|
params: {
|
|
@@ -425,8 +425,8 @@ async function Si({
|
|
|
425
425
|
},
|
|
426
426
|
responseType: "json",
|
|
427
427
|
transformResponse: [
|
|
428
|
-
...Array.isArray(
|
|
429
|
-
(
|
|
428
|
+
...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
|
|
429
|
+
(h) => !h || typeof h != "object" ? [] : h.proxies?.map((l) => ({
|
|
430
430
|
cdnName: l.cdnName,
|
|
431
431
|
extension: l.extension,
|
|
432
432
|
formatHeight: l.formatHeight,
|
|
@@ -438,22 +438,22 @@ async function Si({
|
|
|
438
438
|
width: l.width
|
|
439
439
|
})) ?? []
|
|
440
440
|
],
|
|
441
|
-
url: e ?
|
|
441
|
+
url: e ? Et.GET_AVAILABLE_PROXIES : Ut
|
|
442
442
|
})).data;
|
|
443
443
|
} catch {
|
|
444
444
|
return [];
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
async function
|
|
447
|
+
async function zi({
|
|
448
448
|
siteUrl: t
|
|
449
449
|
} = {}) {
|
|
450
450
|
try {
|
|
451
|
-
return (await
|
|
451
|
+
return (await _.request({
|
|
452
452
|
baseURL: t,
|
|
453
453
|
method: "GET",
|
|
454
454
|
responseType: "json",
|
|
455
455
|
transformResponse: [
|
|
456
|
-
...Array.isArray(
|
|
456
|
+
...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
|
|
457
457
|
(i) => !i || typeof i != "object" ? {
|
|
458
458
|
formatsByDocType: {
|
|
459
459
|
Audio: {},
|
|
@@ -471,7 +471,7 @@ async function bi({
|
|
|
471
471
|
return { formatsByDocType: {} };
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
async function
|
|
474
|
+
async function vi({
|
|
475
475
|
recordIds: t,
|
|
476
476
|
rightsToCheck: e
|
|
477
477
|
}) {
|
|
@@ -482,7 +482,7 @@ async function Ai({
|
|
|
482
482
|
invalidObjects: []
|
|
483
483
|
};
|
|
484
484
|
try {
|
|
485
|
-
const { data: s } = await
|
|
485
|
+
const { data: s } = await _.request({
|
|
486
486
|
method: "GET",
|
|
487
487
|
params: { RecordIDs: t, RightsToCheck: e },
|
|
488
488
|
paramsSerializer: { indexes: null },
|
|
@@ -494,15 +494,15 @@ async function Ai({
|
|
|
494
494
|
return i;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
const ce =
|
|
498
|
-
var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor,
|
|
499
|
-
for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1,
|
|
500
|
-
(
|
|
497
|
+
const ce = L`.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}`, pe = L`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}`;
|
|
498
|
+
var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
|
|
499
|
+
for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
500
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
501
501
|
return s && a && de(e, i, a), a;
|
|
502
502
|
};
|
|
503
|
-
let g = class extends
|
|
503
|
+
let g = class extends O {
|
|
504
504
|
constructor() {
|
|
505
|
-
super(...arguments), this.localize = new
|
|
505
|
+
super(...arguments), this.localize = new U(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.lastAppliedSetting = {
|
|
506
506
|
[o.Pixel]: {
|
|
507
507
|
height: 0,
|
|
508
508
|
percentageHeight: 100,
|
|
@@ -548,14 +548,17 @@ let g = class extends N {
|
|
|
548
548
|
this.aspectRatio = 1;
|
|
549
549
|
}
|
|
550
550
|
async handleOpenChange() {
|
|
551
|
-
this.cropMode = "free", await this.updateComplete, this.open
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
551
|
+
if (this.cropMode = "free", await this.updateComplete, !this.open) {
|
|
552
|
+
const t = this.lastAppliedSetting[this.unit];
|
|
553
|
+
(t.width || t.height) && (this.width = t.width, this.height = t.height, this.emit("cx-asset-link-format-crop-change", {
|
|
554
|
+
detail: {
|
|
555
|
+
height: t.height,
|
|
556
|
+
keepAspectRatio: this.keepAspectRatio,
|
|
557
|
+
unit: this.unit,
|
|
558
|
+
width: t.width
|
|
559
|
+
}
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
559
562
|
}
|
|
560
563
|
handleWidthChange(t) {
|
|
561
564
|
if (!t.target.value) {
|
|
@@ -610,15 +613,15 @@ let g = class extends N {
|
|
|
610
613
|
else if (!i) {
|
|
611
614
|
const [s, a] = e.split(":").map(Number);
|
|
612
615
|
if (this.unit === o.Pixel) {
|
|
613
|
-
let r = s,
|
|
614
|
-
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height:
|
|
616
|
+
let r = s, h = a;
|
|
617
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = Gt(
|
|
615
618
|
this.maxWidth,
|
|
616
619
|
this.maxHeight,
|
|
617
620
|
s,
|
|
618
621
|
a
|
|
619
622
|
)), this.emit("cx-asset-link-format-crop-change", {
|
|
620
623
|
detail: {
|
|
621
|
-
height:
|
|
624
|
+
height: h,
|
|
622
625
|
keepAspectRatio: !0,
|
|
623
626
|
silent: !0,
|
|
624
627
|
unit: o.Pixel,
|
|
@@ -721,23 +724,23 @@ let g = class extends N {
|
|
|
721
724
|
}
|
|
722
725
|
render() {
|
|
723
726
|
const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
|
|
724
|
-
return
|
|
727
|
+
return v`<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">${F(
|
|
725
728
|
!this.noRatioModes,
|
|
726
|
-
() =>
|
|
729
|
+
() => v`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
|
|
727
730
|
width: "100%"
|
|
728
731
|
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${tt(
|
|
729
732
|
t,
|
|
730
733
|
(i) => i.value,
|
|
731
|
-
({ label: i, value: s }) =>
|
|
734
|
+
({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
|
|
732
735
|
)}
|
|
733
736
|
${F(
|
|
734
737
|
e.length > 0,
|
|
735
|
-
() =>
|
|
738
|
+
() => v`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
736
739
|
)}
|
|
737
740
|
${tt(
|
|
738
741
|
e,
|
|
739
742
|
(i) => i.value,
|
|
740
|
-
({ label: i, value: s }) =>
|
|
743
|
+
({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
|
|
741
744
|
)}</cx-select>`
|
|
742
745
|
)}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
743
746
|
W
|
|
@@ -747,121 +750,121 @@ let g = class extends N {
|
|
|
747
750
|
H
|
|
748
751
|
</cx-typography></cx-input></div><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></cx-space>${F(
|
|
749
752
|
this.focusModes.length > 0,
|
|
750
|
-
() =>
|
|
753
|
+
() => v`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
|
|
751
754
|
width: "100%"
|
|
752
755
|
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${tt(
|
|
753
756
|
this.focusModes,
|
|
754
757
|
(i) => i.value,
|
|
755
|
-
({ label: i, value: s }) =>
|
|
758
|
+
({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
|
|
756
759
|
)}</cx-select>`
|
|
757
760
|
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${I({
|
|
758
761
|
marginLeft: "auto"
|
|
759
762
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
760
763
|
}
|
|
761
764
|
};
|
|
762
|
-
g.styles = [
|
|
765
|
+
g.styles = [q, pe];
|
|
763
766
|
g.dependencies = {
|
|
764
|
-
"cx-button":
|
|
767
|
+
"cx-button": G,
|
|
765
768
|
"cx-details": Z,
|
|
766
769
|
"cx-divider": Vt,
|
|
767
770
|
"cx-icon": Y,
|
|
768
771
|
"cx-icon-button": mt,
|
|
769
772
|
"cx-input": ft,
|
|
770
|
-
"cx-option":
|
|
771
|
-
"cx-select":
|
|
773
|
+
"cx-option": ht,
|
|
774
|
+
"cx-select": nt,
|
|
772
775
|
"cx-space": D,
|
|
773
|
-
"cx-typography":
|
|
776
|
+
"cx-typography": N
|
|
774
777
|
};
|
|
775
|
-
|
|
778
|
+
S([
|
|
776
779
|
J(".details")
|
|
777
780
|
], g.prototype, "base", 2);
|
|
778
|
-
|
|
779
|
-
|
|
781
|
+
S([
|
|
782
|
+
n({ reflect: !0, type: Boolean })
|
|
780
783
|
], g.prototype, "open", 2);
|
|
781
|
-
|
|
782
|
-
|
|
784
|
+
S([
|
|
785
|
+
n({ reflect: !0, type: Number })
|
|
783
786
|
], g.prototype, "width", 2);
|
|
784
|
-
|
|
785
|
-
|
|
787
|
+
S([
|
|
788
|
+
n({ reflect: !0, type: Number })
|
|
786
789
|
], g.prototype, "height", 2);
|
|
787
|
-
|
|
788
|
-
|
|
790
|
+
S([
|
|
791
|
+
n({ attribute: "max-width", reflect: !0, type: Number })
|
|
789
792
|
], g.prototype, "maxWidth", 2);
|
|
790
|
-
|
|
791
|
-
|
|
793
|
+
S([
|
|
794
|
+
n({ attribute: "max-height", reflect: !0, type: Number })
|
|
792
795
|
], g.prototype, "maxHeight", 2);
|
|
793
|
-
|
|
794
|
-
|
|
796
|
+
S([
|
|
797
|
+
n({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
795
798
|
], g.prototype, "ratioWidth", 2);
|
|
796
|
-
|
|
797
|
-
|
|
799
|
+
S([
|
|
800
|
+
n({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
798
801
|
], g.prototype, "ratioHeight", 2);
|
|
799
|
-
|
|
800
|
-
|
|
802
|
+
S([
|
|
803
|
+
n({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
801
804
|
], g.prototype, "percentageWidth", 2);
|
|
802
|
-
|
|
803
|
-
|
|
805
|
+
S([
|
|
806
|
+
n({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
804
807
|
], g.prototype, "percentageHeight", 2);
|
|
805
|
-
|
|
806
|
-
|
|
808
|
+
S([
|
|
809
|
+
n({ reflect: !0, type: String })
|
|
807
810
|
], g.prototype, "unit", 2);
|
|
808
|
-
|
|
809
|
-
|
|
811
|
+
S([
|
|
812
|
+
n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
810
813
|
], g.prototype, "disabledApply", 2);
|
|
811
|
-
|
|
812
|
-
|
|
814
|
+
S([
|
|
815
|
+
n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
813
816
|
], g.prototype, "noRatioModes", 2);
|
|
814
|
-
|
|
815
|
-
|
|
817
|
+
S([
|
|
818
|
+
n({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
816
819
|
], g.prototype, "lastAppliedSetting", 2);
|
|
817
|
-
|
|
818
|
-
|
|
820
|
+
S([
|
|
821
|
+
n({ reflect: !0, type: Boolean })
|
|
819
822
|
], g.prototype, "loading", 2);
|
|
820
|
-
|
|
821
|
-
|
|
823
|
+
S([
|
|
824
|
+
n({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
822
825
|
], g.prototype, "cropModes", 2);
|
|
823
|
-
|
|
824
|
-
|
|
826
|
+
S([
|
|
827
|
+
n({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
825
828
|
], g.prototype, "focusModes", 2);
|
|
826
|
-
|
|
827
|
-
|
|
829
|
+
S([
|
|
830
|
+
n({ attribute: "focus-mode", reflect: !0, type: String })
|
|
828
831
|
], g.prototype, "focusMode", 2);
|
|
829
|
-
|
|
830
|
-
|
|
832
|
+
S([
|
|
833
|
+
n({ attribute: "crop-mode", reflect: !0, type: String })
|
|
831
834
|
], g.prototype, "cropMode", 2);
|
|
832
|
-
|
|
833
|
-
|
|
835
|
+
S([
|
|
836
|
+
n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
834
837
|
], g.prototype, "keepAspectRatio", 2);
|
|
835
|
-
|
|
836
|
-
|
|
838
|
+
S([
|
|
839
|
+
b()
|
|
837
840
|
], g.prototype, "invalidWidth", 2);
|
|
838
|
-
|
|
839
|
-
|
|
841
|
+
S([
|
|
842
|
+
b()
|
|
840
843
|
], g.prototype, "invalidHeight", 2);
|
|
841
|
-
|
|
842
|
-
|
|
844
|
+
S([
|
|
845
|
+
b()
|
|
843
846
|
], g.prototype, "aspectRatio", 2);
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
847
|
+
S([
|
|
848
|
+
$("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
849
|
+
$("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
850
|
+
$("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
851
|
+
$("keepAspectRatio")
|
|
849
852
|
], g.prototype, "handleCropModeChange", 1);
|
|
850
|
-
|
|
851
|
-
|
|
853
|
+
S([
|
|
854
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
852
855
|
], g.prototype, "handleOpenChange", 1);
|
|
853
|
-
g =
|
|
854
|
-
|
|
856
|
+
g = S([
|
|
857
|
+
B("cx-asset-link-format-crop")
|
|
855
858
|
], g);
|
|
856
|
-
const me =
|
|
859
|
+
const me = L`.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%}}`;
|
|
857
860
|
var fe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, gt = (t, e, i, s) => {
|
|
858
|
-
for (var a = s > 1 ? void 0 : s ? ge(e, i) : e, r = t.length - 1,
|
|
859
|
-
(
|
|
861
|
+
for (var a = s > 1 ? void 0 : s ? ge(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
862
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
860
863
|
return s && a && fe(e, i, a), a;
|
|
861
864
|
};
|
|
862
|
-
let
|
|
865
|
+
let V = class extends O {
|
|
863
866
|
constructor() {
|
|
864
|
-
super(...arguments), this.localize = new
|
|
867
|
+
super(...arguments), this.localize = new U(this), this.value = "", this.items = [];
|
|
865
868
|
}
|
|
866
869
|
handleExtensionChange(t) {
|
|
867
870
|
const e = t.target.value;
|
|
@@ -870,38 +873,38 @@ let j = class extends N {
|
|
|
870
873
|
});
|
|
871
874
|
}
|
|
872
875
|
render() {
|
|
873
|
-
return
|
|
876
|
+
return v`<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}>${tt(
|
|
874
877
|
this.items,
|
|
875
878
|
(t) => t.value,
|
|
876
|
-
(t) =>
|
|
879
|
+
(t) => v`<cx-option value=${t.value}>${t.displayName}</cx-option>`
|
|
877
880
|
)}</cx-select></cx-space>`;
|
|
878
881
|
}
|
|
879
882
|
};
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
"cx-option":
|
|
883
|
-
"cx-select":
|
|
883
|
+
V.styles = [q, me];
|
|
884
|
+
V.dependencies = {
|
|
885
|
+
"cx-option": ht,
|
|
886
|
+
"cx-select": nt,
|
|
884
887
|
"cx-space": D,
|
|
885
|
-
"cx-typography":
|
|
888
|
+
"cx-typography": N
|
|
886
889
|
};
|
|
887
890
|
gt([
|
|
888
|
-
|
|
889
|
-
],
|
|
891
|
+
n({ reflect: !0, type: String })
|
|
892
|
+
], V.prototype, "value", 2);
|
|
890
893
|
gt([
|
|
891
|
-
|
|
892
|
-
],
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
],
|
|
896
|
-
const xe =
|
|
897
|
-
var ye = Object.defineProperty, Se = Object.getOwnPropertyDescriptor,
|
|
898
|
-
for (var a = s > 1 ? void 0 : s ? Se(e, i) : e, r = t.length - 1,
|
|
899
|
-
(
|
|
894
|
+
n({ reflect: !1, type: Array })
|
|
895
|
+
], V.prototype, "items", 2);
|
|
896
|
+
V = gt([
|
|
897
|
+
B("cx-asset-link-format-extension")
|
|
898
|
+
], V);
|
|
899
|
+
const xe = L`cx-details::part(base){border-bottom-width:0}`;
|
|
900
|
+
var ye = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
|
|
901
|
+
for (var a = s > 1 ? void 0 : s ? Se(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
902
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
900
903
|
return s && a && ye(e, i, a), a;
|
|
901
904
|
};
|
|
902
|
-
let
|
|
905
|
+
let P = class extends O {
|
|
903
906
|
constructor() {
|
|
904
|
-
super(...arguments), this.localize = new
|
|
907
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
|
|
905
908
|
}
|
|
906
909
|
handleValueChange() {
|
|
907
910
|
this.scopedValue = this.value;
|
|
@@ -945,61 +948,61 @@ let _ = class extends N {
|
|
|
945
948
|
t.target !== this.base && t.stopPropagation();
|
|
946
949
|
}
|
|
947
950
|
render() {
|
|
948
|
-
return
|
|
951
|
+
return v`<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}>${tt(
|
|
949
952
|
this.items,
|
|
950
953
|
(t) => t.id,
|
|
951
|
-
(t) =>
|
|
954
|
+
(t) => v`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
952
955
|
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${I({
|
|
953
956
|
"margin-left": "auto"
|
|
954
957
|
})} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
955
958
|
}
|
|
956
959
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
"cx-button":
|
|
960
|
+
P.styles = [q, xe];
|
|
961
|
+
P.dependencies = {
|
|
962
|
+
"cx-button": G,
|
|
960
963
|
"cx-details": Z,
|
|
961
964
|
"cx-icon": Y,
|
|
962
|
-
"cx-option":
|
|
963
|
-
"cx-select":
|
|
965
|
+
"cx-option": ht,
|
|
966
|
+
"cx-select": nt,
|
|
964
967
|
"cx-space": D,
|
|
965
|
-
"cx-typography":
|
|
968
|
+
"cx-typography": N
|
|
966
969
|
};
|
|
967
|
-
|
|
970
|
+
W([
|
|
968
971
|
J(".details")
|
|
969
|
-
],
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
],
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
],
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
],
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
],
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
],
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
],
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
],
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
],
|
|
994
|
-
const
|
|
995
|
-
var
|
|
996
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
997
|
-
(
|
|
998
|
-
return s && a &&
|
|
972
|
+
], P.prototype, "base", 2);
|
|
973
|
+
W([
|
|
974
|
+
n({ reflect: !0, type: Boolean })
|
|
975
|
+
], P.prototype, "open", 2);
|
|
976
|
+
W([
|
|
977
|
+
n({ reflect: !0, type: String })
|
|
978
|
+
], P.prototype, "value", 2);
|
|
979
|
+
W([
|
|
980
|
+
n({ reflect: !1, type: Array })
|
|
981
|
+
], P.prototype, "items", 2);
|
|
982
|
+
W([
|
|
983
|
+
n({ reflect: !0, type: Boolean })
|
|
984
|
+
], P.prototype, "loading", 2);
|
|
985
|
+
W([
|
|
986
|
+
b()
|
|
987
|
+
], P.prototype, "scopedValue", 2);
|
|
988
|
+
W([
|
|
989
|
+
$("value")
|
|
990
|
+
], P.prototype, "handleValueChange", 1);
|
|
991
|
+
W([
|
|
992
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
993
|
+
], P.prototype, "handleOpenChange", 1);
|
|
994
|
+
P = W([
|
|
995
|
+
B("cx-asset-link-format-proxy")
|
|
996
|
+
], P);
|
|
997
|
+
const ze = L`cx-details::part(base){border-bottom-width:0}`;
|
|
998
|
+
var ve = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
|
|
999
|
+
for (var a = s > 1 ? void 0 : s ? Ae(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
1000
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
1001
|
+
return s && a && ve(e, i, a), a;
|
|
999
1002
|
};
|
|
1000
|
-
let
|
|
1003
|
+
let H = class extends O {
|
|
1001
1004
|
constructor() {
|
|
1002
|
-
super(...arguments), this.localize = new
|
|
1005
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
|
|
1003
1006
|
}
|
|
1004
1007
|
/**
|
|
1005
1008
|
* A computed property that checks if the current quality value is invalid.
|
|
@@ -1043,51 +1046,51 @@ let E = class extends N {
|
|
|
1043
1046
|
t.target !== this.base && t.stopPropagation();
|
|
1044
1047
|
}
|
|
1045
1048
|
render() {
|
|
1046
|
-
return
|
|
1049
|
+
return v`<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="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${I({
|
|
1047
1050
|
flex: "1"
|
|
1048
1051
|
})} @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>`;
|
|
1049
1052
|
}
|
|
1050
1053
|
};
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
"cx-button":
|
|
1054
|
+
H.styles = [q, ze];
|
|
1055
|
+
H.dependencies = {
|
|
1056
|
+
"cx-button": G,
|
|
1054
1057
|
"cx-details": Z,
|
|
1055
1058
|
"cx-icon": Y,
|
|
1056
1059
|
"cx-input": ft,
|
|
1057
1060
|
"cx-space": D,
|
|
1058
|
-
"cx-tooltip":
|
|
1059
|
-
"cx-typography":
|
|
1061
|
+
"cx-tooltip": It,
|
|
1062
|
+
"cx-typography": N
|
|
1060
1063
|
};
|
|
1061
|
-
|
|
1064
|
+
Q([
|
|
1062
1065
|
J(".details")
|
|
1063
|
-
],
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
],
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
],
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
],
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
],
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
],
|
|
1082
|
-
const we =
|
|
1083
|
-
var
|
|
1084
|
-
for (var a = s > 1 ? void 0 : s ? ke(e, i) : e, r = t.length - 1,
|
|
1085
|
-
(
|
|
1086
|
-
return s && a &&
|
|
1066
|
+
], H.prototype, "base", 2);
|
|
1067
|
+
Q([
|
|
1068
|
+
n({ reflect: !0, type: Boolean })
|
|
1069
|
+
], H.prototype, "open", 2);
|
|
1070
|
+
Q([
|
|
1071
|
+
n({ reflect: !0, type: Number })
|
|
1072
|
+
], H.prototype, "value", 2);
|
|
1073
|
+
Q([
|
|
1074
|
+
n({ reflect: !0, type: Boolean })
|
|
1075
|
+
], H.prototype, "loading", 2);
|
|
1076
|
+
Q([
|
|
1077
|
+
b()
|
|
1078
|
+
], H.prototype, "scopedValue", 2);
|
|
1079
|
+
Q([
|
|
1080
|
+
$("value")
|
|
1081
|
+
], H.prototype, "handleValueChange", 1);
|
|
1082
|
+
H = Q([
|
|
1083
|
+
B("cx-asset-link-format-quality")
|
|
1084
|
+
], H);
|
|
1085
|
+
const we = L`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}`;
|
|
1086
|
+
var be = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, C = (t, e, i, s) => {
|
|
1087
|
+
for (var a = s > 1 ? void 0 : s ? ke(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
1088
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
1089
|
+
return s && a && be(e, i, a), a;
|
|
1087
1090
|
};
|
|
1088
|
-
let
|
|
1091
|
+
let A = class extends O {
|
|
1089
1092
|
constructor() {
|
|
1090
|
-
super(...arguments), this.localize = new
|
|
1093
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
|
|
1091
1094
|
[o.Pixel]: { height: 0, width: 0 },
|
|
1092
1095
|
[o.AspectRatio]: { height: 1, width: 1 }
|
|
1093
1096
|
}, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
@@ -1117,14 +1120,17 @@ let z = class extends N {
|
|
|
1117
1120
|
this.aspectRatio = 1;
|
|
1118
1121
|
}
|
|
1119
1122
|
async handleOpenChange() {
|
|
1120
|
-
await this.updateComplete, this.open
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1123
|
+
if (await this.updateComplete, !this.open) {
|
|
1124
|
+
const t = this.lastAppliedSetting[this.unit];
|
|
1125
|
+
(t.width || t.height) && (this.width = t.width, this.height = t.height, this.emit("cx-asset-link-format-resize-change", {
|
|
1126
|
+
detail: {
|
|
1127
|
+
height: t.height,
|
|
1128
|
+
keepAspectRatio: this.keepAspectRatio,
|
|
1129
|
+
unit: this.unit,
|
|
1130
|
+
width: t.width
|
|
1131
|
+
}
|
|
1132
|
+
}));
|
|
1133
|
+
}
|
|
1128
1134
|
}
|
|
1129
1135
|
handleWidthChange(t) {
|
|
1130
1136
|
if (!t.target.value) {
|
|
@@ -1221,7 +1227,7 @@ let z = class extends N {
|
|
|
1221
1227
|
});
|
|
1222
1228
|
}
|
|
1223
1229
|
render() {
|
|
1224
|
-
return
|
|
1230
|
+
return v`<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="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1225
1231
|
W
|
|
1226
1232
|
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${I({
|
|
1227
1233
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
@@ -1232,84 +1238,84 @@ let z = class extends N {
|
|
|
1232
1238
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1233
1239
|
}
|
|
1234
1240
|
};
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
"cx-button":
|
|
1241
|
+
A.styles = [q, we];
|
|
1242
|
+
A.dependencies = {
|
|
1243
|
+
"cx-button": G,
|
|
1238
1244
|
"cx-details": Z,
|
|
1239
1245
|
"cx-icon": Y,
|
|
1240
1246
|
"cx-icon-button": mt,
|
|
1241
1247
|
"cx-input": ft,
|
|
1242
|
-
"cx-option":
|
|
1243
|
-
"cx-select":
|
|
1248
|
+
"cx-option": ht,
|
|
1249
|
+
"cx-select": nt,
|
|
1244
1250
|
"cx-space": D,
|
|
1245
|
-
"cx-typography":
|
|
1251
|
+
"cx-typography": N
|
|
1246
1252
|
};
|
|
1247
|
-
|
|
1253
|
+
C([
|
|
1248
1254
|
J(".details")
|
|
1249
|
-
],
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
],
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
],
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
],
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
],
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
],
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
],
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
],
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
],
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
],
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
],
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
],
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
],
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
],
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
],
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
],
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
],
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
],
|
|
1304
|
-
const Ce =
|
|
1305
|
-
var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor,
|
|
1306
|
-
for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1,
|
|
1307
|
-
(
|
|
1255
|
+
], A.prototype, "base", 2);
|
|
1256
|
+
C([
|
|
1257
|
+
n({ reflect: !0, type: Boolean })
|
|
1258
|
+
], A.prototype, "open", 2);
|
|
1259
|
+
C([
|
|
1260
|
+
n({ reflect: !0, type: Number })
|
|
1261
|
+
], A.prototype, "width", 2);
|
|
1262
|
+
C([
|
|
1263
|
+
n({ reflect: !0, type: Number })
|
|
1264
|
+
], A.prototype, "height", 2);
|
|
1265
|
+
C([
|
|
1266
|
+
n({ attribute: "max-width", reflect: !0, type: Number })
|
|
1267
|
+
], A.prototype, "maxWidth", 2);
|
|
1268
|
+
C([
|
|
1269
|
+
n({ attribute: "max-height", reflect: !0, type: Number })
|
|
1270
|
+
], A.prototype, "maxHeight", 2);
|
|
1271
|
+
C([
|
|
1272
|
+
n({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1273
|
+
], A.prototype, "ratioWidth", 2);
|
|
1274
|
+
C([
|
|
1275
|
+
n({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1276
|
+
], A.prototype, "ratioHeight", 2);
|
|
1277
|
+
C([
|
|
1278
|
+
n({ reflect: !0, type: String })
|
|
1279
|
+
], A.prototype, "unit", 2);
|
|
1280
|
+
C([
|
|
1281
|
+
n({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1282
|
+
], A.prototype, "lastAppliedSetting", 2);
|
|
1283
|
+
C([
|
|
1284
|
+
n({ reflect: !0, type: Boolean })
|
|
1285
|
+
], A.prototype, "loading", 2);
|
|
1286
|
+
C([
|
|
1287
|
+
n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1288
|
+
], A.prototype, "keepAspectRatio", 2);
|
|
1289
|
+
C([
|
|
1290
|
+
b()
|
|
1291
|
+
], A.prototype, "invalidWidth", 2);
|
|
1292
|
+
C([
|
|
1293
|
+
b()
|
|
1294
|
+
], A.prototype, "invalidHeight", 2);
|
|
1295
|
+
C([
|
|
1296
|
+
b()
|
|
1297
|
+
], A.prototype, "aspectRatio", 2);
|
|
1298
|
+
C([
|
|
1299
|
+
$("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1300
|
+
$("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1301
|
+
$("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1302
|
+
$("keepAspectRatio")
|
|
1303
|
+
], A.prototype, "handleCropModeChange", 1);
|
|
1304
|
+
C([
|
|
1305
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1306
|
+
], A.prototype, "handleOpenChange", 1);
|
|
1307
|
+
A = C([
|
|
1308
|
+
B("cx-asset-link-format-resize")
|
|
1309
|
+
], A);
|
|
1310
|
+
const Ce = L`cx-details::part(base){border-bottom-width:0}`;
|
|
1311
|
+
var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, j = (t, e, i, s) => {
|
|
1312
|
+
for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
1313
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
1308
1314
|
return s && a && Re(e, i, a), a;
|
|
1309
1315
|
};
|
|
1310
|
-
let M = class extends
|
|
1316
|
+
let M = class extends O {
|
|
1311
1317
|
constructor() {
|
|
1312
|
-
super(...arguments), this.localize = new
|
|
1318
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1313
1319
|
}
|
|
1314
1320
|
handleOpenChange() {
|
|
1315
1321
|
this.open || this.emit("cx-asset-link-format-rotation-change", {
|
|
@@ -1317,14 +1323,17 @@ let M = class extends N {
|
|
|
1317
1323
|
});
|
|
1318
1324
|
}
|
|
1319
1325
|
handleRotationChange(t) {
|
|
1320
|
-
const e = t.target.value, i =
|
|
1321
|
-
(Number(
|
|
1322
|
-
|
|
1326
|
+
const e = t.target.value, i = Number(e);
|
|
1327
|
+
if (Number.isNaN(i))
|
|
1328
|
+
return;
|
|
1329
|
+
const s = At(i);
|
|
1330
|
+
(i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
|
|
1331
|
+
detail: s
|
|
1323
1332
|
});
|
|
1324
1333
|
}
|
|
1325
1334
|
handleButtonClick(t) {
|
|
1326
1335
|
this.emit("cx-asset-link-format-rotation-change", {
|
|
1327
|
-
detail:
|
|
1336
|
+
detail: At(t)
|
|
1328
1337
|
});
|
|
1329
1338
|
}
|
|
1330
1339
|
handleClockwiseClick() {
|
|
@@ -1344,55 +1353,55 @@ let M = class extends N {
|
|
|
1344
1353
|
});
|
|
1345
1354
|
}
|
|
1346
1355
|
render() {
|
|
1347
|
-
return
|
|
1356
|
+
return v`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${I({
|
|
1348
1357
|
flex: "none",
|
|
1349
1358
|
width: "80px"
|
|
1350
1359
|
})} @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>`;
|
|
1351
1360
|
}
|
|
1352
1361
|
};
|
|
1353
|
-
M.styles = [
|
|
1362
|
+
M.styles = [q, Ce];
|
|
1354
1363
|
M.dependencies = {
|
|
1355
|
-
"cx-button":
|
|
1364
|
+
"cx-button": G,
|
|
1356
1365
|
"cx-button-group": Qt,
|
|
1357
1366
|
"cx-details": Z,
|
|
1358
1367
|
"cx-icon": Y,
|
|
1359
1368
|
"cx-icon-button": mt,
|
|
1360
1369
|
"cx-space": D,
|
|
1361
|
-
"cx-typography":
|
|
1370
|
+
"cx-typography": N
|
|
1362
1371
|
};
|
|
1363
|
-
|
|
1372
|
+
j([
|
|
1364
1373
|
J(".details")
|
|
1365
1374
|
], M.prototype, "base", 2);
|
|
1366
|
-
|
|
1367
|
-
|
|
1375
|
+
j([
|
|
1376
|
+
n({ reflect: !0, type: Boolean })
|
|
1368
1377
|
], M.prototype, "open", 2);
|
|
1369
|
-
|
|
1370
|
-
|
|
1378
|
+
j([
|
|
1379
|
+
n({ reflect: !0, type: Number })
|
|
1371
1380
|
], M.prototype, "value", 2);
|
|
1372
|
-
|
|
1373
|
-
|
|
1381
|
+
j([
|
|
1382
|
+
n({ attribute: "default-value", reflect: !0, type: Number })
|
|
1374
1383
|
], M.prototype, "defaultValue", 2);
|
|
1375
|
-
|
|
1376
|
-
|
|
1384
|
+
j([
|
|
1385
|
+
n({ reflect: !0, type: Boolean })
|
|
1377
1386
|
], M.prototype, "loading", 2);
|
|
1378
|
-
|
|
1379
|
-
|
|
1387
|
+
j([
|
|
1388
|
+
n({ attribute: "last-applied-value", reflect: !0, type: Number })
|
|
1380
1389
|
], M.prototype, "lastAppliedValue", 2);
|
|
1381
|
-
|
|
1382
|
-
|
|
1390
|
+
j([
|
|
1391
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1383
1392
|
], M.prototype, "handleOpenChange", 1);
|
|
1384
|
-
M =
|
|
1385
|
-
|
|
1393
|
+
M = j([
|
|
1394
|
+
B("cx-asset-link-format-rotation")
|
|
1386
1395
|
], M);
|
|
1387
|
-
const
|
|
1388
|
-
var
|
|
1389
|
-
for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, r = t.length - 1,
|
|
1390
|
-
(
|
|
1391
|
-
return s && a &&
|
|
1396
|
+
const _e = L`cx-details::part(base){border-bottom-width:0}`;
|
|
1397
|
+
var Pe = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
|
|
1398
|
+
for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
1399
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
1400
|
+
return s && a && Pe(e, i, a), a;
|
|
1392
1401
|
};
|
|
1393
|
-
let
|
|
1402
|
+
let T = class extends O {
|
|
1394
1403
|
constructor() {
|
|
1395
|
-
super(...arguments), this.localize = new
|
|
1404
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = !1;
|
|
1396
1405
|
}
|
|
1397
1406
|
handleApply(t) {
|
|
1398
1407
|
this.emit("cx-asset-link-format-metadata-change", {
|
|
@@ -1416,39 +1425,39 @@ let W = class extends N {
|
|
|
1416
1425
|
t.target !== this.base && t.stopPropagation();
|
|
1417
1426
|
}
|
|
1418
1427
|
render() {
|
|
1419
|
-
return
|
|
1428
|
+
return v`<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>`;
|
|
1420
1429
|
}
|
|
1421
1430
|
};
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
"cx-button":
|
|
1431
|
+
T.styles = [q, _e];
|
|
1432
|
+
T.dependencies = {
|
|
1433
|
+
"cx-button": G,
|
|
1425
1434
|
"cx-checkbox": Kt,
|
|
1426
1435
|
"cx-details": Z,
|
|
1427
1436
|
"cx-icon": Y,
|
|
1428
1437
|
"cx-space": D,
|
|
1429
|
-
"cx-tooltip":
|
|
1430
|
-
"cx-typography":
|
|
1438
|
+
"cx-tooltip": It,
|
|
1439
|
+
"cx-typography": N
|
|
1431
1440
|
};
|
|
1432
1441
|
lt([
|
|
1433
1442
|
J(".details")
|
|
1434
|
-
],
|
|
1443
|
+
], T.prototype, "base", 2);
|
|
1435
1444
|
lt([
|
|
1436
|
-
|
|
1437
|
-
],
|
|
1445
|
+
n({ reflect: !0, type: Boolean })
|
|
1446
|
+
], T.prototype, "open", 2);
|
|
1438
1447
|
lt([
|
|
1439
|
-
|
|
1440
|
-
],
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
],
|
|
1444
|
-
var Fe = Object.defineProperty,
|
|
1445
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1446
|
-
(
|
|
1448
|
+
n({ reflect: !0, type: Boolean })
|
|
1449
|
+
], T.prototype, "value", 2);
|
|
1450
|
+
T = lt([
|
|
1451
|
+
B("cx-asset-link-format-metadata")
|
|
1452
|
+
], T);
|
|
1453
|
+
var Fe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
|
|
1454
|
+
for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
1455
|
+
(h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
|
|
1447
1456
|
return s && a && Fe(e, i, a), a;
|
|
1448
1457
|
};
|
|
1449
|
-
let
|
|
1458
|
+
let d = class extends O {
|
|
1450
1459
|
constructor() {
|
|
1451
|
-
super(), this.localize = new
|
|
1460
|
+
super(), this.localize = new U(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1452
1461
|
{
|
|
1453
1462
|
label: "Free",
|
|
1454
1463
|
value: "free"
|
|
@@ -1511,23 +1520,33 @@ let p = class extends N {
|
|
|
1511
1520
|
height: 0,
|
|
1512
1521
|
width: 0
|
|
1513
1522
|
}, this.hideHeader = !1, this.canReset = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
|
|
1514
|
-
|
|
1523
|
+
/**
|
|
1524
|
+
* Matches the width/height input mask's `min: 1` in cx-asset-link-format-resize, so
|
|
1525
|
+
* Apply still commits a meaningful 1x1 resize instead of a silent no-op when the user
|
|
1526
|
+
* opens the panel and clicks Apply before typing into either input.
|
|
1527
|
+
*/
|
|
1528
|
+
height: 1,
|
|
1515
1529
|
keepAspectRatio: !0,
|
|
1516
1530
|
ratioHeight: 1,
|
|
1517
1531
|
ratioWidth: 1,
|
|
1518
1532
|
unit: o.Pixel,
|
|
1519
|
-
width:
|
|
1533
|
+
width: 1
|
|
1520
1534
|
}, this.cropSize = {
|
|
1521
1535
|
cropMode: "free",
|
|
1522
1536
|
focusMode: "manual",
|
|
1523
|
-
|
|
1537
|
+
/**
|
|
1538
|
+
* Matches the width/height input mask's `min: 1` in cx-asset-link-format-crop, so
|
|
1539
|
+
* Apply still commits a meaningful 1x1 crop instead of a silent no-op when the user
|
|
1540
|
+
* opens the panel and clicks Apply before typing into either input.
|
|
1541
|
+
*/
|
|
1542
|
+
height: 1,
|
|
1524
1543
|
keepAspectRatio: !0,
|
|
1525
1544
|
percentageHeight: 0,
|
|
1526
1545
|
percentageWidth: 0,
|
|
1527
1546
|
ratioHeight: 1,
|
|
1528
1547
|
ratioWidth: 1,
|
|
1529
1548
|
unit: o.Pixel,
|
|
1530
|
-
width:
|
|
1549
|
+
width: 1,
|
|
1531
1550
|
x: 0,
|
|
1532
1551
|
y: 0
|
|
1533
1552
|
}, this.rotation = 0, this.defaultSize = {
|
|
@@ -1539,6 +1558,16 @@ let p = class extends N {
|
|
|
1539
1558
|
get hasUnfrozenTransformations() {
|
|
1540
1559
|
return !(this.transformations.length === 0 || this.frozenIndex !== void 0 && this.frozenIndex >= this.transformations.length - 1);
|
|
1541
1560
|
}
|
|
1561
|
+
/**
|
|
1562
|
+
* The unit of the last applied crop transformation, for the no-asset case only. Reflects
|
|
1563
|
+
* whatever unit the last committed Crop transformation used, or Pixel when nothing has
|
|
1564
|
+
* been applied yet.
|
|
1565
|
+
*/
|
|
1566
|
+
get lastAppliedCropUnit() {
|
|
1567
|
+
return this.transformations.findLast(
|
|
1568
|
+
(e) => e.key === p.Crop
|
|
1569
|
+
)?.value.unit ?? o.Pixel;
|
|
1570
|
+
}
|
|
1542
1571
|
/**
|
|
1543
1572
|
* Checks if the crop apply button should be disabled.
|
|
1544
1573
|
* This is determined by comparing the current crop size with the last crop size.
|
|
@@ -1546,17 +1575,22 @@ let p = class extends N {
|
|
|
1546
1575
|
* @return {boolean} - Returns true if the crop apply button should be disabled, false otherwise.
|
|
1547
1576
|
*/
|
|
1548
1577
|
get disabledCropApply() {
|
|
1578
|
+
if (!this.asset && this.cropSize.unit !== this.lastAppliedCropUnit)
|
|
1579
|
+
return !1;
|
|
1580
|
+
if (this.cropSize.unit === o.AspectRatio && !this.asset) {
|
|
1581
|
+
const e = this.lastCropSize[o.AspectRatio];
|
|
1582
|
+
return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height;
|
|
1583
|
+
}
|
|
1549
1584
|
const t = [
|
|
1550
1585
|
"height",
|
|
1551
1586
|
"percentageHeight",
|
|
1552
1587
|
"percentageWidth",
|
|
1553
|
-
"unit",
|
|
1554
1588
|
"width",
|
|
1555
1589
|
"x",
|
|
1556
1590
|
"y"
|
|
1557
1591
|
];
|
|
1558
1592
|
for (const e of t)
|
|
1559
|
-
if (this.cropSize[e] !== this.lastCropSize[
|
|
1593
|
+
if (this.cropSize[e] !== this.lastCropSize[o.Pixel][e])
|
|
1560
1594
|
return !1;
|
|
1561
1595
|
return !0;
|
|
1562
1596
|
}
|
|
@@ -1581,39 +1615,44 @@ let p = class extends N {
|
|
|
1581
1615
|
get lastCropSize() {
|
|
1582
1616
|
if (!this.asset) {
|
|
1583
1617
|
const e = this.transformations.findLast(
|
|
1584
|
-
(i) => i.key ===
|
|
1618
|
+
(i) => i.key === p.Crop
|
|
1585
1619
|
);
|
|
1620
|
+
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
1621
|
+
return {
|
|
1622
|
+
[o.AspectRatio]: {
|
|
1623
|
+
height: e.value.ratioHeight,
|
|
1624
|
+
percentageHeight: 100,
|
|
1625
|
+
percentageWidth: 100,
|
|
1626
|
+
unit: o.AspectRatio,
|
|
1627
|
+
width: e.value.ratioWidth,
|
|
1628
|
+
x: 0,
|
|
1629
|
+
y: 0
|
|
1630
|
+
},
|
|
1631
|
+
/**
|
|
1632
|
+
* The last applied crop has no pixel size (only a ratio was ever committed, since
|
|
1633
|
+
* there is no asset). Fall back to 1x1 (matching the width/height input mask's
|
|
1634
|
+
* `min: 1`) instead of 0x0, so switching the unit selector back to Pixel and
|
|
1635
|
+
* clicking Apply immediately still commits a meaningful crop instead of a no-op.
|
|
1636
|
+
*/
|
|
1637
|
+
[o.Pixel]: {
|
|
1638
|
+
height: 1,
|
|
1639
|
+
percentageHeight: 100,
|
|
1640
|
+
percentageWidth: 100,
|
|
1641
|
+
unit: o.Pixel,
|
|
1642
|
+
width: 1,
|
|
1643
|
+
x: 0,
|
|
1644
|
+
y: 0
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1586
1647
|
if (e?.value.width && e?.value.height) {
|
|
1587
|
-
const { height: i,
|
|
1588
|
-
if (s === o.AspectRatio)
|
|
1589
|
-
return {
|
|
1590
|
-
[o.AspectRatio]: {
|
|
1591
|
-
height: i,
|
|
1592
|
-
percentageHeight: 100,
|
|
1593
|
-
percentageWidth: 100,
|
|
1594
|
-
unit: o.AspectRatio,
|
|
1595
|
-
width: a,
|
|
1596
|
-
x: 0,
|
|
1597
|
-
y: 0
|
|
1598
|
-
},
|
|
1599
|
-
[o.Pixel]: {
|
|
1600
|
-
height: 0,
|
|
1601
|
-
percentageHeight: 100,
|
|
1602
|
-
percentageWidth: 100,
|
|
1603
|
-
unit: o.Pixel,
|
|
1604
|
-
width: 0,
|
|
1605
|
-
x: 0,
|
|
1606
|
-
y: 0
|
|
1607
|
-
}
|
|
1608
|
-
};
|
|
1609
|
-
const l = et(a, i);
|
|
1648
|
+
const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, h = et(s, i);
|
|
1610
1649
|
return {
|
|
1611
1650
|
[o.AspectRatio]: {
|
|
1612
|
-
height:
|
|
1651
|
+
height: h.height,
|
|
1613
1652
|
percentageHeight: 100,
|
|
1614
1653
|
percentageWidth: 100,
|
|
1615
1654
|
unit: o.AspectRatio,
|
|
1616
|
-
width:
|
|
1655
|
+
width: h.width,
|
|
1617
1656
|
x: 0,
|
|
1618
1657
|
y: 0
|
|
1619
1658
|
},
|
|
@@ -1622,17 +1661,14 @@ let p = class extends N {
|
|
|
1622
1661
|
percentageHeight: 100,
|
|
1623
1662
|
percentageWidth: 100,
|
|
1624
1663
|
unit: o.Pixel,
|
|
1625
|
-
width:
|
|
1626
|
-
x:
|
|
1627
|
-
y:
|
|
1664
|
+
width: s,
|
|
1665
|
+
x: a,
|
|
1666
|
+
y: r
|
|
1628
1667
|
}
|
|
1629
1668
|
};
|
|
1630
1669
|
}
|
|
1631
1670
|
}
|
|
1632
|
-
const t = et(
|
|
1633
|
-
this.lastImageSize.width,
|
|
1634
|
-
this.lastImageSize.height
|
|
1635
|
-
);
|
|
1671
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
1636
1672
|
return {
|
|
1637
1673
|
[o.AspectRatio]: {
|
|
1638
1674
|
height: t.height,
|
|
@@ -1662,42 +1698,39 @@ let p = class extends N {
|
|
|
1662
1698
|
get lastResizeSize() {
|
|
1663
1699
|
if (!this.asset) {
|
|
1664
1700
|
const e = this.transformations.findLast(
|
|
1665
|
-
(i) => i.key ===
|
|
1701
|
+
(i) => i.key === p.Resize
|
|
1666
1702
|
);
|
|
1703
|
+
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
1704
|
+
return {
|
|
1705
|
+
[o.AspectRatio]: {
|
|
1706
|
+
height: e.value.ratioHeight,
|
|
1707
|
+
unit: o.AspectRatio,
|
|
1708
|
+
width: e.value.ratioWidth
|
|
1709
|
+
},
|
|
1710
|
+
// See lastCropSize's equivalent branch for why this falls back to 1x1, not 0x0.
|
|
1711
|
+
[o.Pixel]: {
|
|
1712
|
+
height: 1,
|
|
1713
|
+
unit: o.Pixel,
|
|
1714
|
+
width: 1
|
|
1715
|
+
}
|
|
1716
|
+
};
|
|
1667
1717
|
if (e?.value.width && e?.value.height) {
|
|
1668
|
-
const { height: i,
|
|
1669
|
-
if (s === o.AspectRatio)
|
|
1670
|
-
return {
|
|
1671
|
-
[o.AspectRatio]: {
|
|
1672
|
-
height: i,
|
|
1673
|
-
unit: o.AspectRatio,
|
|
1674
|
-
width: a
|
|
1675
|
-
},
|
|
1676
|
-
[o.Pixel]: {
|
|
1677
|
-
height: 0,
|
|
1678
|
-
unit: o.Pixel,
|
|
1679
|
-
width: 0
|
|
1680
|
-
}
|
|
1681
|
-
};
|
|
1682
|
-
const r = et(a, i);
|
|
1718
|
+
const { height: i, width: s } = e.value, a = et(s, i);
|
|
1683
1719
|
return {
|
|
1684
1720
|
[o.AspectRatio]: {
|
|
1685
|
-
height:
|
|
1721
|
+
height: a.height,
|
|
1686
1722
|
unit: o.AspectRatio,
|
|
1687
|
-
width:
|
|
1723
|
+
width: a.width
|
|
1688
1724
|
},
|
|
1689
1725
|
[o.Pixel]: {
|
|
1690
1726
|
height: i,
|
|
1691
1727
|
unit: o.Pixel,
|
|
1692
|
-
width:
|
|
1728
|
+
width: s
|
|
1693
1729
|
}
|
|
1694
1730
|
};
|
|
1695
1731
|
}
|
|
1696
1732
|
}
|
|
1697
|
-
const t = et(
|
|
1698
|
-
this.lastImageSize.width,
|
|
1699
|
-
this.lastImageSize.height
|
|
1700
|
-
);
|
|
1733
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
1701
1734
|
return {
|
|
1702
1735
|
[o.AspectRatio]: {
|
|
1703
1736
|
height: t.height,
|
|
@@ -1721,7 +1754,7 @@ let p = class extends N {
|
|
|
1721
1754
|
*/
|
|
1722
1755
|
get lastRotation() {
|
|
1723
1756
|
return this.asset ? 0 : this.transformations.findLast(
|
|
1724
|
-
(e) => e.key ===
|
|
1757
|
+
(e) => e.key === p.Rotate
|
|
1725
1758
|
)?.value.rotation ?? 0;
|
|
1726
1759
|
}
|
|
1727
1760
|
/**
|
|
@@ -1769,7 +1802,7 @@ let p = class extends N {
|
|
|
1769
1802
|
token: this.token,
|
|
1770
1803
|
transformations: this.transformationString
|
|
1771
1804
|
}).then((s) => {
|
|
1772
|
-
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction ===
|
|
1805
|
+
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
1773
1806
|
height: s.height,
|
|
1774
1807
|
width: s.width
|
|
1775
1808
|
}, this.selectedFormat = {
|
|
@@ -1828,66 +1861,97 @@ let p = class extends N {
|
|
|
1828
1861
|
}).replace(/\/t\//g, "")
|
|
1829
1862
|
});
|
|
1830
1863
|
const r = this.transformations.findLast(
|
|
1831
|
-
(
|
|
1864
|
+
(c) => c.key === p.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
1832
1865
|
);
|
|
1833
|
-
if (r) {
|
|
1834
|
-
const { focusMode:
|
|
1866
|
+
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
1867
|
+
const { focusMode: c, ratioHeight: y, ratioWidth: k } = r.value;
|
|
1868
|
+
this.cropSize = {
|
|
1869
|
+
...this.cropSize,
|
|
1870
|
+
cropMode: "free",
|
|
1871
|
+
focusMode: c ?? "manual",
|
|
1872
|
+
percentageHeight: 100,
|
|
1873
|
+
percentageWidth: 100,
|
|
1874
|
+
ratioHeight: y,
|
|
1875
|
+
ratioWidth: k,
|
|
1876
|
+
unit: o.AspectRatio
|
|
1877
|
+
};
|
|
1878
|
+
} else if (r) {
|
|
1879
|
+
const { focusMode: c, height: y, unit: k, width: f, x: R = 0, y: E = 0 } = r.value;
|
|
1835
1880
|
this.cropSize = {
|
|
1836
1881
|
...this.cropSize,
|
|
1837
1882
|
cropMode: "free",
|
|
1838
|
-
focusMode:
|
|
1839
|
-
height:
|
|
1883
|
+
focusMode: c ?? "manual",
|
|
1884
|
+
height: y,
|
|
1840
1885
|
percentageHeight: 100,
|
|
1841
1886
|
percentageWidth: 100,
|
|
1842
|
-
unit:
|
|
1843
|
-
width:
|
|
1844
|
-
x:
|
|
1845
|
-
y:
|
|
1887
|
+
unit: k ?? o.Pixel,
|
|
1888
|
+
width: f,
|
|
1889
|
+
x: R,
|
|
1890
|
+
y: E
|
|
1846
1891
|
};
|
|
1847
1892
|
} else
|
|
1848
1893
|
this.cropSize = {
|
|
1849
1894
|
...this.cropSize,
|
|
1850
1895
|
cropMode: "free",
|
|
1851
1896
|
focusMode: "manual",
|
|
1852
|
-
|
|
1897
|
+
/**
|
|
1898
|
+
* Matches the width/height input mask's `min: 1` in cx-asset-link-format-crop —
|
|
1899
|
+
* resetting to 0 here (no crop transformation committed yet) would make an
|
|
1900
|
+
* immediate Apply (before typing into either input) a silent no-op, since
|
|
1901
|
+
* onCropApply guards on `height || width`.
|
|
1902
|
+
*/
|
|
1903
|
+
height: 1,
|
|
1853
1904
|
percentageHeight: 0,
|
|
1854
1905
|
percentageWidth: 0,
|
|
1855
1906
|
unit: o.Pixel,
|
|
1856
|
-
width:
|
|
1907
|
+
width: 1,
|
|
1857
1908
|
x: 0,
|
|
1858
1909
|
y: 0
|
|
1859
1910
|
};
|
|
1860
|
-
const
|
|
1861
|
-
(
|
|
1911
|
+
const h = this.transformations.findLast(
|
|
1912
|
+
(c) => c.key === p.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
1862
1913
|
);
|
|
1863
|
-
if (
|
|
1864
|
-
const {
|
|
1914
|
+
if (h?.value.unit === o.AspectRatio && h.value.ratioWidth && h.value.ratioHeight) {
|
|
1915
|
+
const { ratioHeight: c, ratioWidth: y } = h.value;
|
|
1865
1916
|
this.resizeSize = {
|
|
1866
1917
|
...this.resizeSize,
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1918
|
+
ratioHeight: c,
|
|
1919
|
+
ratioWidth: y,
|
|
1920
|
+
unit: o.AspectRatio
|
|
1921
|
+
};
|
|
1922
|
+
} else if (h) {
|
|
1923
|
+
const { height: c = 0, unit: y, width: k = 0 } = h.value;
|
|
1924
|
+
this.resizeSize = {
|
|
1925
|
+
...this.resizeSize,
|
|
1926
|
+
height: c,
|
|
1927
|
+
unit: y ?? o.Pixel,
|
|
1928
|
+
width: k
|
|
1870
1929
|
};
|
|
1871
1930
|
} else
|
|
1872
1931
|
this.resizeSize = {
|
|
1873
1932
|
...this.resizeSize,
|
|
1874
|
-
|
|
1933
|
+
/**
|
|
1934
|
+
* Matches the width/height input mask's `min: 1` in cx-asset-link-format-resize
|
|
1935
|
+
* — see the equivalent cropSize reset above for why 0 would make an immediate
|
|
1936
|
+
* Apply silently no-op.
|
|
1937
|
+
*/
|
|
1938
|
+
height: 1,
|
|
1875
1939
|
unit: o.Pixel,
|
|
1876
|
-
width:
|
|
1940
|
+
width: 1
|
|
1877
1941
|
};
|
|
1878
1942
|
const l = this.transformations.findLast(
|
|
1879
|
-
(
|
|
1943
|
+
(c) => c.key === p.Rotate
|
|
1880
1944
|
);
|
|
1881
1945
|
this.rotation = l?.value.rotation ?? 0;
|
|
1882
|
-
const
|
|
1883
|
-
(
|
|
1946
|
+
const m = this.transformations.findLast((c) => c.key === p.Quality)?.value.quality ?? 100, x = this.transformations.some(
|
|
1947
|
+
(c) => c.key === p.Metadata
|
|
1884
1948
|
);
|
|
1885
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
1949
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: x, quality: m } : this.selectedFormat = {
|
|
1886
1950
|
extension: "",
|
|
1887
1951
|
height: 0,
|
|
1888
|
-
keepMetadata:
|
|
1952
|
+
keepMetadata: x,
|
|
1889
1953
|
originalUrl: "",
|
|
1890
|
-
quality:
|
|
1954
|
+
quality: m,
|
|
1891
1955
|
rotation: 0,
|
|
1892
1956
|
url: "",
|
|
1893
1957
|
width: 0,
|
|
@@ -1935,11 +1999,11 @@ let p = class extends N {
|
|
|
1935
1999
|
width: e.width,
|
|
1936
2000
|
x: 0,
|
|
1937
2001
|
y: 0
|
|
1938
|
-
}, this.lastAction ===
|
|
2002
|
+
}, this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
1939
2003
|
const i = this.transformations.some(
|
|
1940
|
-
(r) => r.key ===
|
|
2004
|
+
(r) => r.key === p.Metadata
|
|
1941
2005
|
), s = this.transformations.findLast(
|
|
1942
|
-
(r) => r.key ===
|
|
2006
|
+
(r) => r.key === p.Quality
|
|
1943
2007
|
);
|
|
1944
2008
|
this.selectedFormat = {
|
|
1945
2009
|
...this.selectedFormat,
|
|
@@ -1985,7 +2049,7 @@ let p = class extends N {
|
|
|
1985
2049
|
width: Number.parseInt(this.asset.width, 10)
|
|
1986
2050
|
});
|
|
1987
2051
|
const t = this.transformations.findLast(
|
|
1988
|
-
(e) => e.key ===
|
|
2052
|
+
(e) => e.key === p.Quality
|
|
1989
2053
|
);
|
|
1990
2054
|
this.selectedFormat = {
|
|
1991
2055
|
extension: this.asset.extension,
|
|
@@ -2031,25 +2095,25 @@ let p = class extends N {
|
|
|
2031
2095
|
e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
|
|
2032
2096
|
const i = this.proxies?.find((s) => s.id === t);
|
|
2033
2097
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
2034
|
-
if (s.key ===
|
|
2035
|
-
const a = s.value, r = a.width / i.formatWidth * e.formatWidth,
|
|
2098
|
+
if (s.key === p.Crop) {
|
|
2099
|
+
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, m = a.y / i.formatHeight * e.formatHeight;
|
|
2036
2100
|
return {
|
|
2037
2101
|
...s,
|
|
2038
2102
|
value: {
|
|
2039
2103
|
...s.value,
|
|
2040
|
-
height:
|
|
2104
|
+
height: h,
|
|
2041
2105
|
width: r,
|
|
2042
2106
|
x: l,
|
|
2043
|
-
y:
|
|
2107
|
+
y: m
|
|
2044
2108
|
}
|
|
2045
2109
|
};
|
|
2046
2110
|
}
|
|
2047
|
-
if (s.key ===
|
|
2048
|
-
const a = s.value, r = a.width / i.formatWidth * e.formatWidth,
|
|
2111
|
+
if (s.key === p.Resize) {
|
|
2112
|
+
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight;
|
|
2049
2113
|
return {
|
|
2050
2114
|
...s,
|
|
2051
2115
|
value: {
|
|
2052
|
-
height:
|
|
2116
|
+
height: h,
|
|
2053
2117
|
width: r
|
|
2054
2118
|
}
|
|
2055
2119
|
};
|
|
@@ -2116,32 +2180,32 @@ let p = class extends N {
|
|
|
2116
2180
|
keepAspectRatio: s,
|
|
2117
2181
|
percentageHeight: a,
|
|
2118
2182
|
percentageWidth: r,
|
|
2119
|
-
ratioHeight:
|
|
2183
|
+
ratioHeight: h,
|
|
2120
2184
|
ratioWidth: l,
|
|
2121
|
-
unit:
|
|
2122
|
-
useCropMode:
|
|
2123
|
-
width:
|
|
2185
|
+
unit: m,
|
|
2186
|
+
useCropMode: x,
|
|
2187
|
+
width: c
|
|
2124
2188
|
}) {
|
|
2125
2189
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2126
2190
|
return;
|
|
2127
|
-
this.loading = !0, this.lastAction =
|
|
2128
|
-
const
|
|
2191
|
+
this.loading = !0, this.lastAction = p.Crop;
|
|
2192
|
+
const y = await this.apiGetCropFocusMode({
|
|
2129
2193
|
autoCropMode: e,
|
|
2130
2194
|
cropHeight: i,
|
|
2131
|
-
cropWidth:
|
|
2195
|
+
cropWidth: c,
|
|
2132
2196
|
imageUrl: this.selectedFormat.url
|
|
2133
2197
|
});
|
|
2134
|
-
if (
|
|
2135
|
-
let
|
|
2136
|
-
i || (
|
|
2198
|
+
if (y) {
|
|
2199
|
+
let k = a, f = r;
|
|
2200
|
+
i || (k = y.height * 100 / this.selectedFormat.height), c || (f = y.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2137
2201
|
...this.cropSize,
|
|
2138
|
-
height:
|
|
2139
|
-
percentageHeight:
|
|
2140
|
-
percentageWidth:
|
|
2141
|
-
width:
|
|
2142
|
-
x:
|
|
2143
|
-
y:
|
|
2144
|
-
...
|
|
2202
|
+
height: y.height,
|
|
2203
|
+
percentageHeight: k ?? this.cropSize.percentageHeight,
|
|
2204
|
+
percentageWidth: f ?? this.cropSize.percentageWidth,
|
|
2205
|
+
width: y.width,
|
|
2206
|
+
x: y.x * 100 / this.selectedFormat.width,
|
|
2207
|
+
y: y.y * 100 / this.selectedFormat.height,
|
|
2208
|
+
...x ? {
|
|
2145
2209
|
cropMode: e,
|
|
2146
2210
|
focusMode: "manual",
|
|
2147
2211
|
keepAspectRatio: !1
|
|
@@ -2150,9 +2214,9 @@ let p = class extends N {
|
|
|
2150
2214
|
focusMode: e
|
|
2151
2215
|
},
|
|
2152
2216
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
2153
|
-
ratioHeight:
|
|
2217
|
+
ratioHeight: h ?? this.cropSize.ratioHeight,
|
|
2154
2218
|
ratioWidth: l ?? this.cropSize.ratioWidth,
|
|
2155
|
-
unit:
|
|
2219
|
+
unit: m ?? this.cropSize.unit
|
|
2156
2220
|
};
|
|
2157
2221
|
}
|
|
2158
2222
|
this.loading = !1, this.lastAction = void 0;
|
|
@@ -2166,26 +2230,26 @@ let p = class extends N {
|
|
|
2166
2230
|
} = e;
|
|
2167
2231
|
if (s === 0 || i === 0)
|
|
2168
2232
|
return;
|
|
2169
|
-
const
|
|
2170
|
-
let
|
|
2171
|
-
|
|
2233
|
+
const h = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
|
|
2234
|
+
let m = this.cropSize.height, x = this.cropSize.width;
|
|
2235
|
+
h && (x = Math.round(s * this.selectedFormat.width / 100)), l && (m = Math.round(
|
|
2172
2236
|
i * this.selectedFormat.height / 100
|
|
2173
2237
|
));
|
|
2174
|
-
const
|
|
2238
|
+
const c = this.cropSize.focusMode;
|
|
2175
2239
|
this.focusModes.find(
|
|
2176
|
-
(
|
|
2240
|
+
(k) => k.value === c
|
|
2177
2241
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2178
|
-
focusMode:
|
|
2179
|
-
height:
|
|
2242
|
+
focusMode: c,
|
|
2243
|
+
height: m,
|
|
2180
2244
|
percentageHeight: i,
|
|
2181
2245
|
percentageWidth: s,
|
|
2182
|
-
width:
|
|
2246
|
+
width: x
|
|
2183
2247
|
}) : this.cropSize = {
|
|
2184
2248
|
...this.cropSize,
|
|
2185
|
-
height:
|
|
2249
|
+
height: m,
|
|
2186
2250
|
percentageHeight: i,
|
|
2187
2251
|
percentageWidth: s,
|
|
2188
|
-
width:
|
|
2252
|
+
width: x,
|
|
2189
2253
|
x: a,
|
|
2190
2254
|
y: r
|
|
2191
2255
|
};
|
|
@@ -2210,7 +2274,7 @@ let p = class extends N {
|
|
|
2210
2274
|
}
|
|
2211
2275
|
onProxyChange(t) {
|
|
2212
2276
|
const e = t.detail;
|
|
2213
|
-
this.lastAction =
|
|
2277
|
+
this.lastAction = p.Proxy, this.selectedProxy = e.id;
|
|
2214
2278
|
}
|
|
2215
2279
|
async onCropModeChange(t) {
|
|
2216
2280
|
const { mode: e } = t.detail;
|
|
@@ -2221,10 +2285,10 @@ let p = class extends N {
|
|
|
2221
2285
|
});
|
|
2222
2286
|
else {
|
|
2223
2287
|
const s = this.focusModes.find(
|
|
2224
|
-
(
|
|
2288
|
+
(m) => m.value === this.cropSize.focusMode
|
|
2225
2289
|
)?.auto;
|
|
2226
|
-
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode,
|
|
2227
|
-
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (
|
|
2290
|
+
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, l = this.cropSize.y;
|
|
2291
|
+
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (h = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
2228
2292
|
cropMode: e,
|
|
2229
2293
|
focusMode: r,
|
|
2230
2294
|
height: this.cropSize.height,
|
|
@@ -2235,7 +2299,7 @@ let p = class extends N {
|
|
|
2235
2299
|
cropMode: e,
|
|
2236
2300
|
focusMode: r,
|
|
2237
2301
|
keepAspectRatio: a,
|
|
2238
|
-
x:
|
|
2302
|
+
x: h,
|
|
2239
2303
|
y: l
|
|
2240
2304
|
};
|
|
2241
2305
|
}
|
|
@@ -2254,43 +2318,43 @@ let p = class extends N {
|
|
|
2254
2318
|
async onCropChange(t) {
|
|
2255
2319
|
const e = this.cropSize.unit;
|
|
2256
2320
|
if (t.detail.unit === o.AspectRatio) {
|
|
2257
|
-
const i = t.detail.width / t.detail.height, s = Math.min(
|
|
2321
|
+
const i = t.detail.width / t.detail.height, s = this.asset ? Math.min(
|
|
2258
2322
|
Math.max(Math.round(this.cropSize.height * i), 0),
|
|
2259
2323
|
this.resizeSize.width
|
|
2260
|
-
), a = Math.min(
|
|
2324
|
+
) : 0, a = this.asset ? Math.min(
|
|
2261
2325
|
Math.max(Math.round(s / i), 0),
|
|
2262
2326
|
this.resizeSize.height
|
|
2263
|
-
), r = a * 100 / this.selectedFormat.height,
|
|
2264
|
-
let l = this.cropSize.x,
|
|
2265
|
-
l +
|
|
2266
|
-
let
|
|
2327
|
+
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, h = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2328
|
+
let l = this.cropSize.x, m = this.cropSize.y;
|
|
2329
|
+
l + h > 100 && (l = 100 - h), m + r > 100 && (m = 100 - r);
|
|
2330
|
+
let x = this.cropSize.cropMode;
|
|
2267
2331
|
this.cropModes.find(
|
|
2268
|
-
(
|
|
2269
|
-
)?.auto && (
|
|
2332
|
+
(y) => y.value === x
|
|
2333
|
+
)?.auto && (x = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = h, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
2270
2334
|
...this.cropSize,
|
|
2271
|
-
cropMode:
|
|
2335
|
+
cropMode: x,
|
|
2272
2336
|
height: a,
|
|
2273
2337
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2274
2338
|
percentageHeight: r,
|
|
2275
|
-
percentageWidth:
|
|
2339
|
+
percentageWidth: h,
|
|
2276
2340
|
ratioHeight: t.detail.height,
|
|
2277
2341
|
ratioWidth: t.detail.width,
|
|
2278
2342
|
unit: o.AspectRatio,
|
|
2279
2343
|
width: s,
|
|
2280
2344
|
x: l,
|
|
2281
|
-
y:
|
|
2345
|
+
y: m
|
|
2282
2346
|
};
|
|
2283
2347
|
} else {
|
|
2284
|
-
const i = this.
|
|
2348
|
+
const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
|
|
2285
2349
|
let a = this.cropSize.x, r = this.cropSize.y;
|
|
2286
2350
|
a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
|
|
2287
|
-
let
|
|
2351
|
+
let h = this.cropSize.cropMode;
|
|
2288
2352
|
const l = this.cropModes.find(
|
|
2289
|
-
(
|
|
2353
|
+
(m) => m.value === h
|
|
2290
2354
|
)?.auto;
|
|
2291
|
-
(t.detail.breakAspectRatio || l) && (
|
|
2355
|
+
(t.detail.breakAspectRatio || l) && (h = "free"), t.detail.silent ? (this.cropSize.cropMode = h, 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 = {
|
|
2292
2356
|
...this.cropSize,
|
|
2293
|
-
cropMode:
|
|
2357
|
+
cropMode: h,
|
|
2294
2358
|
height: t.detail.height,
|
|
2295
2359
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2296
2360
|
percentageHeight: i,
|
|
@@ -2316,20 +2380,42 @@ let p = class extends N {
|
|
|
2316
2380
|
});
|
|
2317
2381
|
}
|
|
2318
2382
|
onCropApply(t) {
|
|
2319
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2320
|
-
const {
|
|
2321
|
-
|
|
2383
|
+
if (this.preResetTransformations = void 0, this.lastAction = p.Crop, !this.asset) {
|
|
2384
|
+
const {
|
|
2385
|
+
focusMode: l,
|
|
2386
|
+
height: m,
|
|
2387
|
+
ratioHeight: x,
|
|
2388
|
+
ratioWidth: c,
|
|
2389
|
+
unit: y,
|
|
2390
|
+
width: k,
|
|
2391
|
+
x: f,
|
|
2392
|
+
y: R
|
|
2393
|
+
} = this.cropSize, E = this.focusModes.find(
|
|
2394
|
+
(z) => z.value === l
|
|
2322
2395
|
)?.auto ?? !1;
|
|
2323
|
-
(
|
|
2324
|
-
|
|
2396
|
+
if (y === o.AspectRatio) {
|
|
2397
|
+
c && x && this.upsertTransformation({
|
|
2398
|
+
key: p.Crop,
|
|
2399
|
+
value: {
|
|
2400
|
+
focusMode: l,
|
|
2401
|
+
isFocusModeAuto: E,
|
|
2402
|
+
ratioHeight: x,
|
|
2403
|
+
ratioWidth: c,
|
|
2404
|
+
unit: y
|
|
2405
|
+
}
|
|
2406
|
+
});
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
(m || k) && this.upsertTransformation({
|
|
2410
|
+
key: p.Crop,
|
|
2325
2411
|
value: {
|
|
2326
2412
|
focusMode: l,
|
|
2327
|
-
height:
|
|
2328
|
-
isFocusModeAuto:
|
|
2413
|
+
height: m,
|
|
2414
|
+
isFocusModeAuto: E,
|
|
2329
2415
|
unit: y,
|
|
2330
|
-
width:
|
|
2331
|
-
x: Number.isFinite(
|
|
2332
|
-
y: Number.isFinite(
|
|
2416
|
+
width: k,
|
|
2417
|
+
x: Number.isFinite(f) ? f : void 0,
|
|
2418
|
+
y: Number.isFinite(R) ? R : void 0
|
|
2333
2419
|
}
|
|
2334
2420
|
});
|
|
2335
2421
|
return;
|
|
@@ -2337,39 +2423,39 @@ let p = class extends N {
|
|
|
2337
2423
|
const { height: e, mode: i, unit: s, width: a } = t.detail;
|
|
2338
2424
|
if (!this.cropperElement || !this.selectedFormat)
|
|
2339
2425
|
return;
|
|
2340
|
-
const r = this.cropSize.focusMode,
|
|
2426
|
+
const r = this.cropSize.focusMode, h = this.focusModes.find(
|
|
2341
2427
|
(l) => l.value === r
|
|
2342
2428
|
)?.auto ?? !1;
|
|
2343
2429
|
if (e && a && s) {
|
|
2344
|
-
let l = a,
|
|
2345
|
-
if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100,
|
|
2430
|
+
let l = a, m = e;
|
|
2431
|
+
if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, m = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
|
|
2346
2432
|
this.transformations = [
|
|
2347
2433
|
...this.transformations,
|
|
2348
2434
|
{
|
|
2349
|
-
key:
|
|
2435
|
+
key: p.Crop,
|
|
2350
2436
|
value: {
|
|
2351
2437
|
focusMode: r,
|
|
2352
|
-
height:
|
|
2353
|
-
isFocusModeAuto:
|
|
2438
|
+
height: m,
|
|
2439
|
+
isFocusModeAuto: h,
|
|
2354
2440
|
mode: i,
|
|
2355
2441
|
width: l
|
|
2356
2442
|
}
|
|
2357
2443
|
}
|
|
2358
2444
|
];
|
|
2359
2445
|
else {
|
|
2360
|
-
const
|
|
2446
|
+
const x = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2361
2447
|
this.transformations = [
|
|
2362
2448
|
...this.transformations,
|
|
2363
2449
|
{
|
|
2364
|
-
key:
|
|
2450
|
+
key: p.Crop,
|
|
2365
2451
|
value: {
|
|
2366
2452
|
focusMode: r,
|
|
2367
|
-
height:
|
|
2368
|
-
isFocusModeAuto:
|
|
2453
|
+
height: m,
|
|
2454
|
+
isFocusModeAuto: h,
|
|
2369
2455
|
unit: s,
|
|
2370
2456
|
width: l,
|
|
2371
|
-
x
|
|
2372
|
-
y:
|
|
2457
|
+
x,
|
|
2458
|
+
y: c
|
|
2373
2459
|
}
|
|
2374
2460
|
}
|
|
2375
2461
|
];
|
|
@@ -2377,10 +2463,10 @@ let p = class extends N {
|
|
|
2377
2463
|
} else i && (this.transformations = [
|
|
2378
2464
|
...this.transformations,
|
|
2379
2465
|
{
|
|
2380
|
-
key:
|
|
2466
|
+
key: p.Crop,
|
|
2381
2467
|
value: {
|
|
2382
2468
|
focusMode: r,
|
|
2383
|
-
isFocusModeAuto:
|
|
2469
|
+
isFocusModeAuto: h,
|
|
2384
2470
|
mode: i
|
|
2385
2471
|
}
|
|
2386
2472
|
}
|
|
@@ -2412,9 +2498,21 @@ let p = class extends N {
|
|
|
2412
2498
|
}
|
|
2413
2499
|
onResizeApply(t) {
|
|
2414
2500
|
const { height: e, unit: i, width: s } = t.detail;
|
|
2415
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2501
|
+
if (this.preResetTransformations = void 0, this.lastAction = p.Resize, !this.asset) {
|
|
2502
|
+
if (i === o.AspectRatio) {
|
|
2503
|
+
const { ratioHeight: m, ratioWidth: x } = this.resizeSize;
|
|
2504
|
+
x && m && this.upsertTransformation({
|
|
2505
|
+
key: p.Resize,
|
|
2506
|
+
value: {
|
|
2507
|
+
ratioHeight: m,
|
|
2508
|
+
ratioWidth: x,
|
|
2509
|
+
unit: i
|
|
2510
|
+
}
|
|
2511
|
+
});
|
|
2512
|
+
return;
|
|
2513
|
+
}
|
|
2416
2514
|
(e || s) && this.upsertTransformation({
|
|
2417
|
-
key:
|
|
2515
|
+
key: p.Resize,
|
|
2418
2516
|
value: {
|
|
2419
2517
|
height: e,
|
|
2420
2518
|
unit: i,
|
|
@@ -2426,15 +2524,15 @@ let p = class extends N {
|
|
|
2426
2524
|
if (!this.selectedFormat)
|
|
2427
2525
|
return;
|
|
2428
2526
|
const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
|
|
2429
|
-
let
|
|
2430
|
-
this.resizeSize.unit !== i ? (
|
|
2527
|
+
let h = s, l = e;
|
|
2528
|
+
this.resizeSize.unit !== i ? (h = a, l = r) : i === o.AspectRatio && (h = Math.round(s / e * r), l = r), this.transformations = [
|
|
2431
2529
|
...this.transformations,
|
|
2432
2530
|
{
|
|
2433
|
-
key:
|
|
2531
|
+
key: p.Resize,
|
|
2434
2532
|
value: {
|
|
2435
2533
|
height: l,
|
|
2436
2534
|
unit: i,
|
|
2437
|
-
width:
|
|
2535
|
+
width: h
|
|
2438
2536
|
}
|
|
2439
2537
|
}
|
|
2440
2538
|
];
|
|
@@ -2444,21 +2542,21 @@ let p = class extends N {
|
|
|
2444
2542
|
}
|
|
2445
2543
|
onRotationApply(t) {
|
|
2446
2544
|
const e = t.detail;
|
|
2447
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
2545
|
+
if (this.preResetTransformations = void 0, this.lastAction = p.Rotate, !this.asset) {
|
|
2448
2546
|
e ? this.upsertTransformation({
|
|
2449
|
-
key:
|
|
2547
|
+
key: p.Rotate,
|
|
2450
2548
|
value: {
|
|
2451
2549
|
rotation: e
|
|
2452
2550
|
}
|
|
2453
2551
|
}) : this.transformations = this.transformations.filter(
|
|
2454
|
-
(i) => i.key !==
|
|
2552
|
+
(i) => i.key !== p.Rotate
|
|
2455
2553
|
);
|
|
2456
2554
|
return;
|
|
2457
2555
|
}
|
|
2458
2556
|
this.selectedFormat && (this.transformations = [
|
|
2459
2557
|
...this.transformations,
|
|
2460
2558
|
{
|
|
2461
|
-
key:
|
|
2559
|
+
key: p.Rotate,
|
|
2462
2560
|
value: {
|
|
2463
2561
|
rotation: e
|
|
2464
2562
|
}
|
|
@@ -2467,9 +2565,9 @@ let p = class extends N {
|
|
|
2467
2565
|
}
|
|
2468
2566
|
onQualityChange(t) {
|
|
2469
2567
|
const e = t.detail;
|
|
2470
|
-
this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction =
|
|
2568
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = p.Quality;
|
|
2471
2569
|
const i = {
|
|
2472
|
-
key:
|
|
2570
|
+
key: p.Quality,
|
|
2473
2571
|
value: {
|
|
2474
2572
|
quality: e
|
|
2475
2573
|
}
|
|
@@ -2483,27 +2581,22 @@ let p = class extends N {
|
|
|
2483
2581
|
keepMetadata: e
|
|
2484
2582
|
}), !this.asset) {
|
|
2485
2583
|
e ? this.upsertTransformation({
|
|
2486
|
-
key:
|
|
2584
|
+
key: p.Metadata,
|
|
2487
2585
|
value: {
|
|
2488
2586
|
keepMetadata: e
|
|
2489
2587
|
}
|
|
2490
2588
|
}) : this.transformations = this.transformations.filter(
|
|
2491
|
-
(i) => i.key !==
|
|
2589
|
+
(i) => i.key !== p.Metadata
|
|
2492
2590
|
);
|
|
2493
2591
|
return;
|
|
2494
2592
|
}
|
|
2495
|
-
e ? this.
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
{
|
|
2500
|
-
key: c.Metadata,
|
|
2501
|
-
value: {
|
|
2502
|
-
keepMetadata: e
|
|
2503
|
-
}
|
|
2593
|
+
e ? this.upsertTransformation({
|
|
2594
|
+
key: p.Metadata,
|
|
2595
|
+
value: {
|
|
2596
|
+
keepMetadata: e
|
|
2504
2597
|
}
|
|
2505
|
-
|
|
2506
|
-
(i) => i.key !==
|
|
2598
|
+
}) : this.transformations = this.transformations.filter(
|
|
2599
|
+
(i) => i.key !== p.Metadata
|
|
2507
2600
|
);
|
|
2508
2601
|
}
|
|
2509
2602
|
onExtensionChange(t) {
|
|
@@ -2515,7 +2608,7 @@ let p = class extends N {
|
|
|
2515
2608
|
}
|
|
2516
2609
|
syncQuality() {
|
|
2517
2610
|
const t = this.transformations.findLast(
|
|
2518
|
-
(e) => e.key ===
|
|
2611
|
+
(e) => e.key === p.Quality
|
|
2519
2612
|
)?.value?.quality;
|
|
2520
2613
|
this.selectedFormat && (this.selectedFormat = {
|
|
2521
2614
|
...this.selectedFormat,
|
|
@@ -2531,179 +2624,179 @@ let p = class extends N {
|
|
|
2531
2624
|
this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "", this.transformations = [], this.frozenIndex = -1, this.syncQuality();
|
|
2532
2625
|
}
|
|
2533
2626
|
render() {
|
|
2534
|
-
return
|
|
2627
|
+
return v`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${F(
|
|
2535
2628
|
!this.hideHeader,
|
|
2536
|
-
() =>
|
|
2629
|
+
() => v`<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>${F(this.canReset, () => v`<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>`,
|
|
2537
2630
|
() => qt
|
|
2538
2631
|
)}
|
|
2539
2632
|
${F(
|
|
2540
2633
|
!this.noFormat,
|
|
2541
|
-
() =>
|
|
2634
|
+
() => v`<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 === p.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
2542
2635
|
)}
|
|
2543
2636
|
${F(
|
|
2544
2637
|
!this.noCrop,
|
|
2545
|
-
() =>
|
|
2638
|
+
() => v`<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 === p.Crop} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} 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} 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-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
|
|
2546
2639
|
)}
|
|
2547
2640
|
${F(
|
|
2548
2641
|
!this.noResize,
|
|
2549
|
-
() =>
|
|
2642
|
+
() => v`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === p.Resize} ?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>`
|
|
2550
2643
|
)}
|
|
2551
2644
|
${F(
|
|
2552
2645
|
!this.noRotate,
|
|
2553
|
-
() =>
|
|
2554
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
2646
|
+
() => v`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.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>`
|
|
2647
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.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>${F(
|
|
2555
2648
|
!this.noMetadata,
|
|
2556
|
-
() =>
|
|
2649
|
+
() => v`<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>`
|
|
2557
2650
|
)}
|
|
2558
2651
|
${F(
|
|
2559
2652
|
this.useCustomExtension,
|
|
2560
|
-
() =>
|
|
2653
|
+
() => v`<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>`
|
|
2561
2654
|
)}</div>`;
|
|
2562
2655
|
}
|
|
2563
2656
|
};
|
|
2564
|
-
|
|
2565
|
-
|
|
2657
|
+
d.styles = [q, ce];
|
|
2658
|
+
d.dependencies = {
|
|
2566
2659
|
"cx-asset-link-format-crop": g,
|
|
2567
|
-
"cx-asset-link-format-extension":
|
|
2568
|
-
"cx-asset-link-format-metadata":
|
|
2569
|
-
"cx-asset-link-format-proxy":
|
|
2570
|
-
"cx-asset-link-format-quality":
|
|
2571
|
-
"cx-asset-link-format-resize":
|
|
2660
|
+
"cx-asset-link-format-extension": V,
|
|
2661
|
+
"cx-asset-link-format-metadata": T,
|
|
2662
|
+
"cx-asset-link-format-proxy": P,
|
|
2663
|
+
"cx-asset-link-format-quality": H,
|
|
2664
|
+
"cx-asset-link-format-resize": A,
|
|
2572
2665
|
"cx-asset-link-format-rotation": M,
|
|
2573
|
-
"cx-button":
|
|
2666
|
+
"cx-button": G,
|
|
2574
2667
|
"cx-space": D,
|
|
2575
|
-
"cx-typography":
|
|
2668
|
+
"cx-typography": N
|
|
2576
2669
|
};
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
],
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
],
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
],
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
],
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
],
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
],
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
],
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
],
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
],
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
],
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
],
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
],
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
],
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
],
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
],
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
],
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
],
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
],
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
],
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
],
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
],
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
],
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
],
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
],
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
],
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
],
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
],
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
],
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
],
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
],
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
],
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
],
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
],
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
],
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
],
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
],
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
],
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
],
|
|
2670
|
+
u([
|
|
2671
|
+
n({ attribute: "base-url", type: String })
|
|
2672
|
+
], d.prototype, "baseUrl", 2);
|
|
2673
|
+
u([
|
|
2674
|
+
n({ attribute: "token", type: String })
|
|
2675
|
+
], d.prototype, "token", 2);
|
|
2676
|
+
u([
|
|
2677
|
+
n({ reflect: !1, type: Object })
|
|
2678
|
+
], d.prototype, "asset", 2);
|
|
2679
|
+
u([
|
|
2680
|
+
n({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
2681
|
+
], d.prototype, "cropModes", 2);
|
|
2682
|
+
u([
|
|
2683
|
+
n({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
2684
|
+
], d.prototype, "focusModes", 2);
|
|
2685
|
+
u([
|
|
2686
|
+
n({ reflect: !1, type: Array })
|
|
2687
|
+
], d.prototype, "extensions", 2);
|
|
2688
|
+
u([
|
|
2689
|
+
n({ reflect: !1, type: Array })
|
|
2690
|
+
], d.prototype, "proxies", 2);
|
|
2691
|
+
u([
|
|
2692
|
+
n({ attribute: "for-cropper", reflect: !0, type: String })
|
|
2693
|
+
], d.prototype, "forCropper", 2);
|
|
2694
|
+
u([
|
|
2695
|
+
n({ attribute: "use-session", reflect: !0, type: String })
|
|
2696
|
+
], d.prototype, "useSession", 2);
|
|
2697
|
+
u([
|
|
2698
|
+
n({ reflect: !1, type: Array })
|
|
2699
|
+
], d.prototype, "transformations", 2);
|
|
2700
|
+
u([
|
|
2701
|
+
n({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
2702
|
+
], d.prototype, "selectedProxy", 2);
|
|
2703
|
+
u([
|
|
2704
|
+
n({ attribute: "default-proxy", reflect: !0, type: String })
|
|
2705
|
+
], d.prototype, "defaultProxy", 2);
|
|
2706
|
+
u([
|
|
2707
|
+
n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
2708
|
+
], d.prototype, "useCustomExtension", 2);
|
|
2709
|
+
u([
|
|
2710
|
+
n({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
2711
|
+
], d.prototype, "noMetadata", 2);
|
|
2712
|
+
u([
|
|
2713
|
+
n({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
2714
|
+
], d.prototype, "noFormat", 2);
|
|
2715
|
+
u([
|
|
2716
|
+
n({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
2717
|
+
], d.prototype, "noCrop", 2);
|
|
2718
|
+
u([
|
|
2719
|
+
n({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
2720
|
+
], d.prototype, "noResize", 2);
|
|
2721
|
+
u([
|
|
2722
|
+
n({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
2723
|
+
], d.prototype, "noRotate", 2);
|
|
2724
|
+
u([
|
|
2725
|
+
n({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
2726
|
+
], d.prototype, "lastImageSize", 2);
|
|
2727
|
+
u([
|
|
2728
|
+
n({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
2729
|
+
], d.prototype, "hideHeader", 2);
|
|
2730
|
+
u([
|
|
2731
|
+
n({ attribute: "can-reset", type: Boolean })
|
|
2732
|
+
], d.prototype, "canReset", 2);
|
|
2733
|
+
u([
|
|
2734
|
+
n({ attribute: !1, reflect: !1, type: Object })
|
|
2735
|
+
], d.prototype, "queryElement", 2);
|
|
2736
|
+
u([
|
|
2737
|
+
b()
|
|
2738
|
+
], d.prototype, "activeSetting", 2);
|
|
2739
|
+
u([
|
|
2740
|
+
b()
|
|
2741
|
+
], d.prototype, "selectedFormat", 2);
|
|
2742
|
+
u([
|
|
2743
|
+
b()
|
|
2744
|
+
], d.prototype, "resizeSize", 2);
|
|
2745
|
+
u([
|
|
2746
|
+
b()
|
|
2747
|
+
], d.prototype, "cropSize", 2);
|
|
2748
|
+
u([
|
|
2749
|
+
b()
|
|
2750
|
+
], d.prototype, "rotation", 2);
|
|
2751
|
+
u([
|
|
2752
|
+
b()
|
|
2753
|
+
], d.prototype, "defaultSize", 2);
|
|
2754
|
+
u([
|
|
2755
|
+
b()
|
|
2756
|
+
], d.prototype, "cropperElement", 2);
|
|
2757
|
+
u([
|
|
2758
|
+
b()
|
|
2759
|
+
], d.prototype, "parameters", 2);
|
|
2760
|
+
u([
|
|
2761
|
+
b()
|
|
2762
|
+
], d.prototype, "loading", 2);
|
|
2763
|
+
u([
|
|
2764
|
+
b()
|
|
2765
|
+
], d.prototype, "lastAction", 2);
|
|
2766
|
+
u([
|
|
2767
|
+
b()
|
|
2768
|
+
], d.prototype, "frozenIndex", 2);
|
|
2769
|
+
u([
|
|
2770
|
+
b()
|
|
2771
|
+
], d.prototype, "preResetTransformations", 2);
|
|
2772
|
+
u([
|
|
2773
|
+
$("transformations")
|
|
2774
|
+
], d.prototype, "handleTransformationsChange", 1);
|
|
2775
|
+
u([
|
|
2776
|
+
$("selectedProxy")
|
|
2777
|
+
], d.prototype, "handleSelectedProxyChange", 1);
|
|
2778
|
+
u([
|
|
2779
|
+
$("loading")
|
|
2780
|
+
], d.prototype, "handleLoadingChange", 1);
|
|
2781
|
+
d = u([
|
|
2782
|
+
B("cx-asset-link-format")
|
|
2783
|
+
], d);
|
|
2691
2784
|
export {
|
|
2692
|
-
|
|
2785
|
+
d as C,
|
|
2693
2786
|
ut as D,
|
|
2694
|
-
|
|
2787
|
+
_t as F,
|
|
2695
2788
|
X as O,
|
|
2696
2789
|
yi as a,
|
|
2697
|
-
|
|
2698
|
-
|
|
2790
|
+
Pt as b,
|
|
2791
|
+
bt as c,
|
|
2699
2792
|
xi as d,
|
|
2700
2793
|
kt as e,
|
|
2701
2794
|
ie as f,
|
|
2702
2795
|
Wt as g,
|
|
2703
|
-
|
|
2704
|
-
|
|
2796
|
+
zi as h,
|
|
2797
|
+
vi as i,
|
|
2705
2798
|
Si as j,
|
|
2706
|
-
|
|
2799
|
+
Dt as k,
|
|
2707
2800
|
at as l,
|
|
2708
2801
|
Ct as m,
|
|
2709
2802
|
Rt as n,
|