@orangelogic/design-system 2.100.0 → 2.102.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.CKtT9q4k.js → asset.CtL7ACp7.js} +1 -1
- package/library/chunks/{color-swatch-group.Cfn8EGfK.js → color-swatch-group.C6c53two.js} +3 -3
- package/library/chunks/{color-swatch.BUwHT5Cx.js → color-swatch.GsiCvj1n.js} +1 -1
- package/library/chunks/{confirm-popover.BMGnWZnC.js → confirm-popover.PiSCZY6-.js} +1 -1
- package/library/chunks/debounce.CIEhztrj.js +97 -0
- package/library/chunks/{dialog._xvAZqaE.js → dialog.BTU6B2_4.js} +9 -10
- package/library/chunks/event.BeKOsirN.js +46 -0
- package/library/chunks/{file-on-demand.CIjtKP0H.js → file-on-demand.DCxabV6T.js} +4 -4
- package/library/chunks/{folder-select.D4Ft0qRc.js → folder-select.BM7yeAsU.js} +2 -2
- package/library/chunks/{image.BnB-fJ8g.js → image.D207g003.js} +1 -1
- package/library/chunks/{list-editor.B_mnvgtZ.js → list-editor.CMakbQyU.js} +182 -184
- package/library/chunks/{table.D4HIzy47.js → table.Cm-ynClk.js} +977 -962
- package/library/chunks/transformation.Dir8s_wm.js +151 -0
- package/library/chunks/{tree.Hh8WCK7l.js → tree.DAiWVFiY.js} +91 -80
- package/library/components/alert.js +7 -8
- package/library/components/asset-link-format.js +867 -672
- package/library/components/atoms.js +4 -4
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +2 -2
- package/library/components/details.js +1 -2
- package/library/components/dialog.js +3 -4
- package/library/components/drawer.js +83 -73
- package/library/components/dropdown.js +7 -8
- package/library/components/dynamic-select.js +1 -1
- package/library/components/element-clamp.js +1 -2
- package/library/components/file-on-demand.js +5 -5
- package/library/components/folder-select.js +2 -2
- package/library/components/image.js +2 -2
- package/library/components/line-clamp.js +4 -5
- package/library/components/list-editor.js +4 -4
- package/library/components/masonry.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/popup.js +73 -74
- package/library/components/range.js +1 -1
- package/library/components/select.js +1 -2
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +6 -6
- package/library/components/table.js +1 -1
- package/library/components/tag.js +44 -31
- package/library/components/tooltip.js +1 -2
- package/library/components/tree-item.js +4 -3
- package/library/components/tree.js +1 -1
- package/library/components/types.js +760 -765
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +8 -0
- package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +11 -1
- package/library/packages/atoms/src/components/tag/tag.d.ts +11 -1
- package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +10 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +8 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +4 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +4 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +4 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -1
- package/library/packages/types/src/asset-link-format.d.ts +2 -0
- package/library/packages/types/src/content-builder.d.ts +5 -1
- package/library/packages/types/src/tag.d.ts +1 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +4 -1
- package/library/react-web-component.d.ts +19 -3
- package/library/utils.js +138 -140
- package/package.json +1 -1
- package/library/chunks/animate.El-MpOws.js +0 -37
- package/library/chunks/browser.BHOCIF_A.js +0 -84
- package/library/chunks/debounce.DaHuiSGU.js +0 -15
- package/library/chunks/event.mFzZi4sr.js +0 -11
- package/library/chunks/transformation.Cqz3hPaQ.js +0 -144
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import "../chunks/cropper.Bib8Abm3.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import
|
|
4
|
-
import { C as
|
|
5
|
-
import { n
|
|
6
|
-
import { b as
|
|
7
|
-
import { c as
|
|
8
|
-
import { U as a, T as
|
|
9
|
-
import { c as
|
|
10
|
-
import { L as
|
|
11
|
-
import { w
|
|
2
|
+
import { C as B } from "../chunks/button.DfRnA70F.js";
|
|
3
|
+
import _ from "./space.js";
|
|
4
|
+
import { C as F } from "../chunks/typography.DJC_UXgs.js";
|
|
5
|
+
import { n, C as W } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
6
|
+
import { b as rt, c as ht } from "../chunks/asset.CtL7ACp7.js";
|
|
7
|
+
import { c as E } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
|
+
import { U as a, T as l } from "../chunks/asset-link-format.BSRDqHg7.js";
|
|
9
|
+
import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
|
|
10
|
+
import { L as U } from "../chunks/i18n.DK1uYlJT.js";
|
|
11
|
+
import { w } from "../chunks/watch.BCJD77bD.js";
|
|
12
12
|
import { s as et, c as it } from "../chunks/number.B4PQLJIg.js";
|
|
13
|
-
import { b as
|
|
14
|
-
import { i as
|
|
15
|
-
import { r as
|
|
16
|
-
import { n as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
13
|
+
import { b as G } from "../chunks/transformation.Dir8s_wm.js";
|
|
14
|
+
import { i as O, x as m, E as nt } from "../chunks/lit-element.jLBm65_O.js";
|
|
15
|
+
import { r as z } from "../chunks/state.CSDxrqLd.js";
|
|
16
|
+
import { n as k } from "../chunks/when.Dr1es41R.js";
|
|
17
|
+
import I from "./details.js";
|
|
18
|
+
import lt from "./divider.js";
|
|
19
|
+
import L from "./icon.js";
|
|
20
20
|
import { C as K } from "../chunks/icon-button.CN0NGNQx.js";
|
|
21
|
-
import
|
|
22
|
-
import { C as
|
|
23
|
-
import
|
|
24
|
-
import { c as
|
|
21
|
+
import J from "./input.js";
|
|
22
|
+
import { C as X } from "../chunks/option.B7SoEb_q.js";
|
|
23
|
+
import Y from "./select.js";
|
|
24
|
+
import { c as ct } from "../chunks/image.9qwbjGNb.js";
|
|
25
25
|
import { e as V } from "../chunks/query.BBf1UFkC.js";
|
|
26
|
-
import { c as
|
|
27
|
-
import { o as
|
|
26
|
+
import { c as j } from "../chunks/repeat.DbF2p5ae.js";
|
|
27
|
+
import { o as R } from "../chunks/style-map.llVFPd__.js";
|
|
28
28
|
import st from "./tooltip.js";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
34
|
-
(
|
|
35
|
-
return s && o &&
|
|
29
|
+
import pt from "./button-group.js";
|
|
30
|
+
import dt from "./checkbox.js";
|
|
31
|
+
const ut = O`.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}`, mt = O`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}`;
|
|
32
|
+
var gt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
|
|
33
|
+
for (var o = s > 1 ? void 0 : s ? ft(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
34
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
35
|
+
return s && o && gt(e, i, o), o;
|
|
36
36
|
};
|
|
37
|
-
let
|
|
37
|
+
let u = class extends W {
|
|
38
38
|
constructor() {
|
|
39
|
-
super(...arguments), this.localize = new
|
|
39
|
+
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 = a.Pixel, this.disabledApply = !1, this.canApply = !1, this.lastAppliedSetting = {
|
|
40
40
|
[a.Pixel]: {
|
|
41
41
|
height: 0,
|
|
42
42
|
percentageHeight: 100,
|
|
@@ -75,21 +75,25 @@ let p = class extends H {
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
if (this.maxWidth && this.maxHeight) {
|
|
78
|
+
if (this.maxWidth && this.maxHeight && Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight)) {
|
|
79
79
|
this.aspectRatio = this.maxWidth / this.maxHeight;
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
this.aspectRatio = 1;
|
|
83
83
|
}
|
|
84
84
|
async handleOpenChange() {
|
|
85
|
-
this.cropMode = "free", await this.updateComplete, this.open
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
if (this.cropMode = "free", await this.updateComplete, !this.open) {
|
|
86
|
+
if (!this.canApply)
|
|
87
|
+
return;
|
|
88
|
+
this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-crop-change", {
|
|
89
|
+
detail: {
|
|
90
|
+
height: this.lastAppliedSetting[a.Pixel].height,
|
|
91
|
+
keepAspectRatio: this.keepAspectRatio,
|
|
92
|
+
unit: a.Pixel,
|
|
93
|
+
width: this.lastAppliedSetting[a.Pixel].width
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
handleWidthChange(t) {
|
|
95
99
|
if (!t.target.value) {
|
|
@@ -144,19 +148,19 @@ let p = class extends H {
|
|
|
144
148
|
else if (!i) {
|
|
145
149
|
const [s, o] = e.split(":").map(Number);
|
|
146
150
|
if (this.unit === a.Pixel) {
|
|
147
|
-
|
|
151
|
+
let r = s, h = o;
|
|
152
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = ct(
|
|
148
153
|
this.maxWidth,
|
|
149
154
|
this.maxHeight,
|
|
150
155
|
s,
|
|
151
156
|
o
|
|
152
|
-
)
|
|
153
|
-
this.emit("cx-asset-link-format-crop-change", {
|
|
157
|
+
)), this.emit("cx-asset-link-format-crop-change", {
|
|
154
158
|
detail: {
|
|
155
|
-
height:
|
|
159
|
+
height: h,
|
|
156
160
|
keepAspectRatio: !0,
|
|
157
161
|
silent: !0,
|
|
158
162
|
unit: a.Pixel,
|
|
159
|
-
width:
|
|
163
|
+
width: r
|
|
160
164
|
}
|
|
161
165
|
});
|
|
162
166
|
} else
|
|
@@ -255,141 +259,145 @@ let p = class extends H {
|
|
|
255
259
|
}
|
|
256
260
|
render() {
|
|
257
261
|
const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
|
|
258
|
-
return m`<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"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${
|
|
262
|
+
return m`<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"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${R({
|
|
259
263
|
width: "100%"
|
|
260
|
-
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${
|
|
264
|
+
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${j(
|
|
261
265
|
t,
|
|
262
266
|
(i) => i.value,
|
|
263
267
|
({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
|
|
264
268
|
)}
|
|
265
|
-
${
|
|
269
|
+
${k(
|
|
266
270
|
e.length > 0,
|
|
267
271
|
() => m`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
268
272
|
)}
|
|
269
|
-
${
|
|
273
|
+
${j(
|
|
270
274
|
e,
|
|
271
275
|
(i) => i.value,
|
|
272
276
|
({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
|
|
273
277
|
)}</cx-select><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 === a.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">
|
|
274
278
|
W
|
|
275
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${
|
|
279
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${R({
|
|
276
280
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
277
281
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
278
282
|
H
|
|
279
|
-
</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=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${
|
|
283
|
+
</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=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${k(
|
|
280
284
|
this.focusModes.length > 0,
|
|
281
|
-
() => m`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${
|
|
285
|
+
() => m`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${R({
|
|
282
286
|
width: "100%"
|
|
283
|
-
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${
|
|
287
|
+
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${j(
|
|
284
288
|
this.focusModes,
|
|
285
289
|
(i) => i.value,
|
|
286
290
|
({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
|
|
287
291
|
)}</cx-select>`
|
|
288
|
-
)}
|
|
292
|
+
)}
|
|
293
|
+
${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${R({
|
|
289
294
|
marginLeft: "auto"
|
|
290
|
-
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button
|
|
295
|
+
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
|
|
291
296
|
}
|
|
292
297
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
"cx-button":
|
|
296
|
-
"cx-details":
|
|
297
|
-
"cx-divider":
|
|
298
|
-
"cx-icon":
|
|
298
|
+
u.styles = [E, mt];
|
|
299
|
+
u.dependencies = {
|
|
300
|
+
"cx-button": B,
|
|
301
|
+
"cx-details": I,
|
|
302
|
+
"cx-divider": lt,
|
|
303
|
+
"cx-icon": L,
|
|
299
304
|
"cx-icon-button": K,
|
|
300
|
-
"cx-input":
|
|
301
|
-
"cx-option":
|
|
302
|
-
"cx-select":
|
|
303
|
-
"cx-space":
|
|
304
|
-
"cx-typography":
|
|
305
|
+
"cx-input": J,
|
|
306
|
+
"cx-option": X,
|
|
307
|
+
"cx-select": Y,
|
|
308
|
+
"cx-space": _,
|
|
309
|
+
"cx-typography": F
|
|
305
310
|
};
|
|
306
|
-
|
|
311
|
+
x([
|
|
307
312
|
V(".details")
|
|
308
|
-
],
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
],
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
],
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
],
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
],
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
],
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
],
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
],
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
],
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
],
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
],
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
],
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
],
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
],
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
],
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
],
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
],
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
],
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
],
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
],
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
],
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
],
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
],
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
],
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
313
|
+
], u.prototype, "base", 2);
|
|
314
|
+
x([
|
|
315
|
+
n({ reflect: !0, type: Boolean })
|
|
316
|
+
], u.prototype, "open", 2);
|
|
317
|
+
x([
|
|
318
|
+
n({ reflect: !0, type: Number })
|
|
319
|
+
], u.prototype, "width", 2);
|
|
320
|
+
x([
|
|
321
|
+
n({ reflect: !0, type: Number })
|
|
322
|
+
], u.prototype, "height", 2);
|
|
323
|
+
x([
|
|
324
|
+
n({ attribute: "max-width", reflect: !0, type: Number })
|
|
325
|
+
], u.prototype, "maxWidth", 2);
|
|
326
|
+
x([
|
|
327
|
+
n({ attribute: "max-height", reflect: !0, type: Number })
|
|
328
|
+
], u.prototype, "maxHeight", 2);
|
|
329
|
+
x([
|
|
330
|
+
n({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
331
|
+
], u.prototype, "ratioWidth", 2);
|
|
332
|
+
x([
|
|
333
|
+
n({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
334
|
+
], u.prototype, "ratioHeight", 2);
|
|
335
|
+
x([
|
|
336
|
+
n({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
337
|
+
], u.prototype, "percentageWidth", 2);
|
|
338
|
+
x([
|
|
339
|
+
n({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
340
|
+
], u.prototype, "percentageHeight", 2);
|
|
341
|
+
x([
|
|
342
|
+
n({ reflect: !0, type: String })
|
|
343
|
+
], u.prototype, "unit", 2);
|
|
344
|
+
x([
|
|
345
|
+
n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
346
|
+
], u.prototype, "disabledApply", 2);
|
|
347
|
+
x([
|
|
348
|
+
n({ attribute: "can-apply", reflect: !0, type: Boolean })
|
|
349
|
+
], u.prototype, "canApply", 2);
|
|
350
|
+
x([
|
|
351
|
+
n({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
352
|
+
], u.prototype, "lastAppliedSetting", 2);
|
|
353
|
+
x([
|
|
354
|
+
n({ reflect: !0, type: Boolean })
|
|
355
|
+
], u.prototype, "loading", 2);
|
|
356
|
+
x([
|
|
357
|
+
n({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
358
|
+
], u.prototype, "cropModes", 2);
|
|
359
|
+
x([
|
|
360
|
+
n({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
361
|
+
], u.prototype, "focusModes", 2);
|
|
362
|
+
x([
|
|
363
|
+
n({ attribute: "focus-mode", reflect: !0, type: String })
|
|
364
|
+
], u.prototype, "focusMode", 2);
|
|
365
|
+
x([
|
|
366
|
+
n({ attribute: "crop-mode", reflect: !0, type: String })
|
|
367
|
+
], u.prototype, "cropMode", 2);
|
|
368
|
+
x([
|
|
369
|
+
n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
370
|
+
], u.prototype, "keepAspectRatio", 2);
|
|
371
|
+
x([
|
|
372
|
+
z()
|
|
373
|
+
], u.prototype, "invalidWidth", 2);
|
|
374
|
+
x([
|
|
375
|
+
z()
|
|
376
|
+
], u.prototype, "invalidHeight", 2);
|
|
377
|
+
x([
|
|
378
|
+
z()
|
|
379
|
+
], u.prototype, "aspectRatio", 2);
|
|
380
|
+
x([
|
|
381
|
+
w("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
382
|
+
w("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
383
|
+
w("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
384
|
+
w("keepAspectRatio")
|
|
385
|
+
], u.prototype, "handleCropModeChange", 1);
|
|
386
|
+
x([
|
|
387
|
+
w("open")
|
|
388
|
+
], u.prototype, "handleOpenChange", 1);
|
|
389
|
+
u = x([
|
|
390
|
+
N("cx-asset-link-format-crop")
|
|
391
|
+
], u);
|
|
392
|
+
const xt = O`.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%}}`;
|
|
393
|
+
var yt = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
|
|
394
|
+
for (var o = s > 1 ? void 0 : s ? zt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
395
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
396
|
+
return s && o && yt(e, i, o), o;
|
|
389
397
|
};
|
|
390
|
-
let
|
|
398
|
+
let T = class extends W {
|
|
391
399
|
constructor() {
|
|
392
|
-
super(...arguments), this.localize = new
|
|
400
|
+
super(...arguments), this.localize = new U(this), this.value = "", this.items = [];
|
|
393
401
|
}
|
|
394
402
|
handleExtensionChange(t) {
|
|
395
403
|
const e = t.target.value;
|
|
@@ -398,38 +406,38 @@ let O = class extends H {
|
|
|
398
406
|
});
|
|
399
407
|
}
|
|
400
408
|
render() {
|
|
401
|
-
return m`<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}>${
|
|
409
|
+
return m`<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}>${j(
|
|
402
410
|
this.items,
|
|
403
411
|
(t) => t.value,
|
|
404
412
|
(t) => m`<cx-option value=${t.value}>${t.displayName}</cx-option>`
|
|
405
413
|
)}</cx-select></cx-space>`;
|
|
406
414
|
}
|
|
407
415
|
};
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"cx-option":
|
|
411
|
-
"cx-select":
|
|
412
|
-
"cx-space":
|
|
413
|
-
"cx-typography":
|
|
416
|
+
T.styles = [E, xt];
|
|
417
|
+
T.dependencies = {
|
|
418
|
+
"cx-option": X,
|
|
419
|
+
"cx-select": Y,
|
|
420
|
+
"cx-space": _,
|
|
421
|
+
"cx-typography": F
|
|
414
422
|
};
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
],
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
],
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
],
|
|
424
|
-
const
|
|
425
|
-
var
|
|
426
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
427
|
-
(
|
|
428
|
-
return s && o &&
|
|
423
|
+
tt([
|
|
424
|
+
n({ reflect: !0, type: String })
|
|
425
|
+
], T.prototype, "value", 2);
|
|
426
|
+
tt([
|
|
427
|
+
n({ reflect: !1, type: Array })
|
|
428
|
+
], T.prototype, "items", 2);
|
|
429
|
+
T = tt([
|
|
430
|
+
N("cx-asset-link-format-extension")
|
|
431
|
+
], T);
|
|
432
|
+
const St = O`cx-details::part(base){border-bottom-width:0}`;
|
|
433
|
+
var wt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, M = (t, e, i, s) => {
|
|
434
|
+
for (var o = s > 1 ? void 0 : s ? bt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
435
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
436
|
+
return s && o && wt(e, i, o), o;
|
|
429
437
|
};
|
|
430
|
-
let
|
|
438
|
+
let $ = class extends W {
|
|
431
439
|
constructor() {
|
|
432
|
-
super(...arguments), this.localize = new
|
|
440
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
|
|
433
441
|
}
|
|
434
442
|
handleValueChange() {
|
|
435
443
|
this.scopedValue = this.value;
|
|
@@ -473,61 +481,61 @@ let w = class extends H {
|
|
|
473
481
|
t.target !== this.base && t.stopPropagation();
|
|
474
482
|
}
|
|
475
483
|
render() {
|
|
476
|
-
return m`<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}>${
|
|
484
|
+
return m`<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}>${j(
|
|
477
485
|
this.items,
|
|
478
486
|
(t) => t.id,
|
|
479
487
|
(t) => m`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
480
|
-
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${
|
|
488
|
+
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${R({
|
|
481
489
|
"margin-left": "auto"
|
|
482
490
|
})} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
483
491
|
}
|
|
484
492
|
};
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
"cx-button":
|
|
488
|
-
"cx-details":
|
|
489
|
-
"cx-icon":
|
|
490
|
-
"cx-option":
|
|
491
|
-
"cx-select":
|
|
492
|
-
"cx-space":
|
|
493
|
-
"cx-typography":
|
|
493
|
+
$.styles = [E, St];
|
|
494
|
+
$.dependencies = {
|
|
495
|
+
"cx-button": B,
|
|
496
|
+
"cx-details": I,
|
|
497
|
+
"cx-icon": L,
|
|
498
|
+
"cx-option": X,
|
|
499
|
+
"cx-select": Y,
|
|
500
|
+
"cx-space": _,
|
|
501
|
+
"cx-typography": F
|
|
494
502
|
};
|
|
495
|
-
|
|
503
|
+
M([
|
|
496
504
|
V(".details")
|
|
497
|
-
],
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
],
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
],
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
],
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
],
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
],
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
],
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
],
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
],
|
|
522
|
-
const
|
|
523
|
-
var
|
|
524
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
525
|
-
(
|
|
526
|
-
return s && o &&
|
|
505
|
+
], $.prototype, "base", 2);
|
|
506
|
+
M([
|
|
507
|
+
n({ reflect: !0, type: Boolean })
|
|
508
|
+
], $.prototype, "open", 2);
|
|
509
|
+
M([
|
|
510
|
+
n({ reflect: !0, type: String })
|
|
511
|
+
], $.prototype, "value", 2);
|
|
512
|
+
M([
|
|
513
|
+
n({ reflect: !1, type: Array })
|
|
514
|
+
], $.prototype, "items", 2);
|
|
515
|
+
M([
|
|
516
|
+
n({ reflect: !0, type: Boolean })
|
|
517
|
+
], $.prototype, "loading", 2);
|
|
518
|
+
M([
|
|
519
|
+
z()
|
|
520
|
+
], $.prototype, "scopedValue", 2);
|
|
521
|
+
M([
|
|
522
|
+
w("value")
|
|
523
|
+
], $.prototype, "handleValueChange", 1);
|
|
524
|
+
M([
|
|
525
|
+
w("open", { waitUntilFirstUpdate: !0 })
|
|
526
|
+
], $.prototype, "handleOpenChange", 1);
|
|
527
|
+
$ = M([
|
|
528
|
+
N("cx-asset-link-format-proxy")
|
|
529
|
+
], $);
|
|
530
|
+
const vt = O`cx-details::part(base){border-bottom-width:0}`;
|
|
531
|
+
var kt = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
|
|
532
|
+
for (var o = s > 1 ? void 0 : s ? $t(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
533
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
534
|
+
return s && o && kt(e, i, o), o;
|
|
527
535
|
};
|
|
528
|
-
let
|
|
536
|
+
let A = class extends W {
|
|
529
537
|
constructor() {
|
|
530
|
-
super(...arguments), this.localize = new
|
|
538
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = 100, this.loading = !1, this.canApply = !1, this.scopedValue = 100;
|
|
531
539
|
}
|
|
532
540
|
/**
|
|
533
541
|
* A computed property that checks if the current quality value is invalid.
|
|
@@ -542,7 +550,9 @@ let b = class extends H {
|
|
|
542
550
|
}
|
|
543
551
|
handleQualityChange(t) {
|
|
544
552
|
const e = t.target.value;
|
|
545
|
-
this.scopedValue = Number(e)
|
|
553
|
+
this.scopedValue = Number(e), !this.canApply && !this.invalidValue && this.emit("cx-asset-link-format-quality-change", {
|
|
554
|
+
detail: this.scopedValue
|
|
555
|
+
});
|
|
546
556
|
}
|
|
547
557
|
/**
|
|
548
558
|
* Handles the application of the input quality.
|
|
@@ -571,54 +581,57 @@ let b = class extends H {
|
|
|
571
581
|
t.target !== this.base && t.stopPropagation();
|
|
572
582
|
}
|
|
573
583
|
render() {
|
|
574
|
-
return m`<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=${
|
|
584
|
+
return m`<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=${R({
|
|
575
585
|
flex: "1"
|
|
576
|
-
})} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip
|
|
586
|
+
})} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip>${k(this.canApply, () => m`<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>`;
|
|
577
587
|
}
|
|
578
588
|
};
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
"cx-button":
|
|
582
|
-
"cx-details":
|
|
583
|
-
"cx-icon":
|
|
584
|
-
"cx-input":
|
|
585
|
-
"cx-space":
|
|
589
|
+
A.styles = [E, vt];
|
|
590
|
+
A.dependencies = {
|
|
591
|
+
"cx-button": B,
|
|
592
|
+
"cx-details": I,
|
|
593
|
+
"cx-icon": L,
|
|
594
|
+
"cx-input": J,
|
|
595
|
+
"cx-space": _,
|
|
586
596
|
"cx-tooltip": st,
|
|
587
|
-
"cx-typography":
|
|
597
|
+
"cx-typography": F
|
|
588
598
|
};
|
|
589
599
|
D([
|
|
590
600
|
V(".details")
|
|
591
|
-
],
|
|
601
|
+
], A.prototype, "base", 2);
|
|
602
|
+
D([
|
|
603
|
+
n({ reflect: !0, type: Boolean })
|
|
604
|
+
], A.prototype, "open", 2);
|
|
592
605
|
D([
|
|
593
|
-
|
|
594
|
-
],
|
|
606
|
+
n({ reflect: !0, type: Number })
|
|
607
|
+
], A.prototype, "value", 2);
|
|
595
608
|
D([
|
|
596
|
-
|
|
597
|
-
],
|
|
609
|
+
n({ reflect: !0, type: Boolean })
|
|
610
|
+
], A.prototype, "loading", 2);
|
|
598
611
|
D([
|
|
599
|
-
|
|
600
|
-
],
|
|
612
|
+
n({ attribute: "can-apply", reflect: !0, type: Boolean })
|
|
613
|
+
], A.prototype, "canApply", 2);
|
|
601
614
|
D([
|
|
602
|
-
|
|
603
|
-
],
|
|
615
|
+
z()
|
|
616
|
+
], A.prototype, "scopedValue", 2);
|
|
604
617
|
D([
|
|
605
|
-
|
|
606
|
-
],
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
],
|
|
610
|
-
const
|
|
611
|
-
var
|
|
612
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
613
|
-
(
|
|
614
|
-
return s && o &&
|
|
618
|
+
w("value")
|
|
619
|
+
], A.prototype, "handleValueChange", 1);
|
|
620
|
+
A = D([
|
|
621
|
+
N("cx-asset-link-format-quality")
|
|
622
|
+
], A);
|
|
623
|
+
const At = O`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}`;
|
|
624
|
+
var Ct = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
|
|
625
|
+
for (var o = s > 1 ? void 0 : s ? Rt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
626
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
627
|
+
return s && o && Ct(e, i, o), o;
|
|
615
628
|
};
|
|
616
|
-
let
|
|
629
|
+
let y = class extends W {
|
|
617
630
|
constructor() {
|
|
618
|
-
super(...arguments), this.localize = new
|
|
631
|
+
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 = a.Pixel, this.lastAppliedSetting = {
|
|
619
632
|
[a.Pixel]: { height: 0, width: 0 },
|
|
620
633
|
[a.AspectRatio]: { height: 1, width: 1 }
|
|
621
|
-
}, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
634
|
+
}, this.loading = !1, this.canApply = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
622
635
|
}
|
|
623
636
|
/**
|
|
624
637
|
* A computed property that checks if the current resize settings match the last applied settings.
|
|
@@ -638,21 +651,25 @@ let g = class extends H {
|
|
|
638
651
|
return;
|
|
639
652
|
}
|
|
640
653
|
}
|
|
641
|
-
if (this.maxWidth && this.maxHeight) {
|
|
654
|
+
if (this.maxWidth && this.maxHeight && Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight)) {
|
|
642
655
|
this.aspectRatio = this.maxWidth / this.maxHeight;
|
|
643
656
|
return;
|
|
644
657
|
}
|
|
645
658
|
this.aspectRatio = 1;
|
|
646
659
|
}
|
|
647
660
|
async handleOpenChange() {
|
|
648
|
-
await this.updateComplete, this.open
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
661
|
+
if (await this.updateComplete, !this.open) {
|
|
662
|
+
if (!this.canApply)
|
|
663
|
+
return;
|
|
664
|
+
this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-resize-change", {
|
|
665
|
+
detail: {
|
|
666
|
+
height: this.lastAppliedSetting[a.Pixel].height,
|
|
667
|
+
keepAspectRatio: this.keepAspectRatio,
|
|
668
|
+
unit: a.Pixel,
|
|
669
|
+
width: this.lastAppliedSetting[a.Pixel].width
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}
|
|
656
673
|
}
|
|
657
674
|
handleWidthChange(t) {
|
|
658
675
|
if (!t.target.value) {
|
|
@@ -751,98 +768,105 @@ let g = class extends H {
|
|
|
751
768
|
render() {
|
|
752
769
|
return m`<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 === a.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
753
770
|
W
|
|
754
|
-
</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=${
|
|
771
|
+
</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=${R({
|
|
755
772
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
756
773
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
757
774
|
H
|
|
758
|
-
</cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space
|
|
775
|
+
</cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${R({
|
|
759
776
|
marginLeft: "auto"
|
|
760
|
-
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button
|
|
777
|
+
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
|
|
761
778
|
}
|
|
762
779
|
};
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
"cx-button":
|
|
766
|
-
"cx-details":
|
|
767
|
-
"cx-icon":
|
|
780
|
+
y.styles = [E, At];
|
|
781
|
+
y.dependencies = {
|
|
782
|
+
"cx-button": B,
|
|
783
|
+
"cx-details": I,
|
|
784
|
+
"cx-icon": L,
|
|
768
785
|
"cx-icon-button": K,
|
|
769
|
-
"cx-input":
|
|
770
|
-
"cx-option":
|
|
771
|
-
"cx-select":
|
|
772
|
-
"cx-space":
|
|
773
|
-
"cx-typography":
|
|
786
|
+
"cx-input": J,
|
|
787
|
+
"cx-option": X,
|
|
788
|
+
"cx-select": Y,
|
|
789
|
+
"cx-space": _,
|
|
790
|
+
"cx-typography": F
|
|
774
791
|
};
|
|
775
|
-
|
|
792
|
+
S([
|
|
776
793
|
V(".details")
|
|
777
|
-
],
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
],
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
],
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
],
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
],
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
],
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
],
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
],
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
],
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
],
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
],
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
],
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
],
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
],
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
],
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
],
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
],
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
794
|
+
], y.prototype, "base", 2);
|
|
795
|
+
S([
|
|
796
|
+
n({ reflect: !0, type: Boolean })
|
|
797
|
+
], y.prototype, "open", 2);
|
|
798
|
+
S([
|
|
799
|
+
n({ reflect: !0, type: Number })
|
|
800
|
+
], y.prototype, "width", 2);
|
|
801
|
+
S([
|
|
802
|
+
n({ reflect: !0, type: Number })
|
|
803
|
+
], y.prototype, "height", 2);
|
|
804
|
+
S([
|
|
805
|
+
n({ attribute: "max-width", reflect: !0, type: Number })
|
|
806
|
+
], y.prototype, "maxWidth", 2);
|
|
807
|
+
S([
|
|
808
|
+
n({ attribute: "max-height", reflect: !0, type: Number })
|
|
809
|
+
], y.prototype, "maxHeight", 2);
|
|
810
|
+
S([
|
|
811
|
+
n({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
812
|
+
], y.prototype, "ratioWidth", 2);
|
|
813
|
+
S([
|
|
814
|
+
n({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
815
|
+
], y.prototype, "ratioHeight", 2);
|
|
816
|
+
S([
|
|
817
|
+
n({ reflect: !0, type: String })
|
|
818
|
+
], y.prototype, "unit", 2);
|
|
819
|
+
S([
|
|
820
|
+
n({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
821
|
+
], y.prototype, "lastAppliedSetting", 2);
|
|
822
|
+
S([
|
|
823
|
+
n({ reflect: !0, type: Boolean })
|
|
824
|
+
], y.prototype, "loading", 2);
|
|
825
|
+
S([
|
|
826
|
+
n({ attribute: "can-apply", reflect: !0, type: Boolean })
|
|
827
|
+
], y.prototype, "canApply", 2);
|
|
828
|
+
S([
|
|
829
|
+
n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
830
|
+
], y.prototype, "keepAspectRatio", 2);
|
|
831
|
+
S([
|
|
832
|
+
z()
|
|
833
|
+
], y.prototype, "invalidWidth", 2);
|
|
834
|
+
S([
|
|
835
|
+
z()
|
|
836
|
+
], y.prototype, "invalidHeight", 2);
|
|
837
|
+
S([
|
|
838
|
+
z()
|
|
839
|
+
], y.prototype, "aspectRatio", 2);
|
|
840
|
+
S([
|
|
841
|
+
w("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
842
|
+
w("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
843
|
+
w("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
844
|
+
w("keepAspectRatio")
|
|
845
|
+
], y.prototype, "handleCropModeChange", 1);
|
|
846
|
+
S([
|
|
847
|
+
w("open")
|
|
848
|
+
], y.prototype, "handleOpenChange", 1);
|
|
849
|
+
y = S([
|
|
850
|
+
N("cx-asset-link-format-resize")
|
|
851
|
+
], y);
|
|
852
|
+
const Mt = O`cx-details::part(base){border-bottom-width:0}`;
|
|
853
|
+
var Pt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, q = (t, e, i, s) => {
|
|
854
|
+
for (var o = s > 1 ? void 0 : s ? Ht(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
855
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
856
|
+
return s && o && Pt(e, i, o), o;
|
|
837
857
|
};
|
|
838
|
-
let
|
|
858
|
+
let C = class extends W {
|
|
839
859
|
constructor() {
|
|
840
|
-
super(...arguments), this.localize = new
|
|
860
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.canApply = !1;
|
|
841
861
|
}
|
|
842
862
|
handleOpenChange() {
|
|
843
|
-
this.open
|
|
844
|
-
|
|
845
|
-
|
|
863
|
+
if (!this.open) {
|
|
864
|
+
if (!this.canApply)
|
|
865
|
+
return;
|
|
866
|
+
this.emit("cx-asset-link-format-rotation-change", {
|
|
867
|
+
detail: 0
|
|
868
|
+
});
|
|
869
|
+
}
|
|
846
870
|
}
|
|
847
871
|
handleRotationChange(t) {
|
|
848
872
|
const e = t.target.value, i = et(Number(e));
|
|
@@ -872,52 +896,55 @@ let v = class extends H {
|
|
|
872
896
|
});
|
|
873
897
|
}
|
|
874
898
|
render() {
|
|
875
|
-
return m`<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=${
|
|
899
|
+
return m`<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=${R({
|
|
876
900
|
flex: "none",
|
|
877
901
|
width: "80px"
|
|
878
|
-
})} @cx-input=${this.handleRotationChange}></cx-input
|
|
902
|
+
})} @cx-input=${this.handleRotationChange}></cx-input>${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === 0} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
|
|
879
903
|
}
|
|
880
904
|
};
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
"cx-button":
|
|
884
|
-
"cx-button-group":
|
|
885
|
-
"cx-details":
|
|
886
|
-
"cx-icon":
|
|
905
|
+
C.styles = [E, Mt];
|
|
906
|
+
C.dependencies = {
|
|
907
|
+
"cx-button": B,
|
|
908
|
+
"cx-button-group": pt,
|
|
909
|
+
"cx-details": I,
|
|
910
|
+
"cx-icon": L,
|
|
887
911
|
"cx-icon-button": K,
|
|
888
|
-
"cx-space":
|
|
889
|
-
"cx-typography":
|
|
912
|
+
"cx-space": _,
|
|
913
|
+
"cx-typography": F
|
|
890
914
|
};
|
|
891
915
|
q([
|
|
892
916
|
V(".details")
|
|
893
|
-
],
|
|
917
|
+
], C.prototype, "base", 2);
|
|
894
918
|
q([
|
|
895
|
-
|
|
896
|
-
],
|
|
919
|
+
n({ reflect: !0, type: Boolean })
|
|
920
|
+
], C.prototype, "open", 2);
|
|
897
921
|
q([
|
|
898
|
-
|
|
899
|
-
],
|
|
922
|
+
n({ reflect: !0, type: Number })
|
|
923
|
+
], C.prototype, "value", 2);
|
|
900
924
|
q([
|
|
901
|
-
|
|
902
|
-
],
|
|
925
|
+
n({ attribute: "default-value", reflect: !0, type: Number })
|
|
926
|
+
], C.prototype, "defaultValue", 2);
|
|
903
927
|
q([
|
|
904
|
-
|
|
905
|
-
],
|
|
928
|
+
n({ reflect: !0, type: Boolean })
|
|
929
|
+
], C.prototype, "loading", 2);
|
|
906
930
|
q([
|
|
907
|
-
|
|
908
|
-
],
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
],
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
931
|
+
n({ attribute: "can-apply", reflect: !0, type: Boolean })
|
|
932
|
+
], C.prototype, "canApply", 2);
|
|
933
|
+
q([
|
|
934
|
+
w("open", { waitUntilFirstUpdate: !0 })
|
|
935
|
+
], C.prototype, "handleOpenChange", 1);
|
|
936
|
+
C = q([
|
|
937
|
+
N("cx-asset-link-format-rotation")
|
|
938
|
+
], C);
|
|
939
|
+
const _t = O`cx-details::part(base){border-bottom-width:0}`;
|
|
940
|
+
var Ft = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
|
|
941
|
+
for (var o = s > 1 ? void 0 : s ? Wt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
942
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
943
|
+
return s && o && Ft(e, i, o), o;
|
|
917
944
|
};
|
|
918
|
-
let
|
|
945
|
+
let H = class extends W {
|
|
919
946
|
constructor() {
|
|
920
|
-
super(...arguments), this.localize = new
|
|
947
|
+
super(...arguments), this.localize = new U(this), this.open = !1, this.value = !1;
|
|
921
948
|
}
|
|
922
949
|
handleApply(t) {
|
|
923
950
|
this.emit("cx-asset-link-format-metadata-change", {
|
|
@@ -944,36 +971,36 @@ let M = class extends H {
|
|
|
944
971
|
return m`<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>`;
|
|
945
972
|
}
|
|
946
973
|
};
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
"cx-button":
|
|
950
|
-
"cx-checkbox":
|
|
951
|
-
"cx-details":
|
|
952
|
-
"cx-icon":
|
|
953
|
-
"cx-space":
|
|
974
|
+
H.styles = [E, _t];
|
|
975
|
+
H.dependencies = {
|
|
976
|
+
"cx-button": B,
|
|
977
|
+
"cx-checkbox": dt,
|
|
978
|
+
"cx-details": I,
|
|
979
|
+
"cx-icon": L,
|
|
980
|
+
"cx-space": _,
|
|
954
981
|
"cx-tooltip": st,
|
|
955
|
-
"cx-typography":
|
|
982
|
+
"cx-typography": F
|
|
956
983
|
};
|
|
957
|
-
|
|
984
|
+
Z([
|
|
958
985
|
V(".details")
|
|
959
|
-
],
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
],
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
],
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
],
|
|
969
|
-
var
|
|
970
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
971
|
-
(
|
|
972
|
-
return s && o &&
|
|
986
|
+
], H.prototype, "base", 2);
|
|
987
|
+
Z([
|
|
988
|
+
n({ reflect: !0, type: Boolean })
|
|
989
|
+
], H.prototype, "open", 2);
|
|
990
|
+
Z([
|
|
991
|
+
n({ reflect: !0, type: Boolean })
|
|
992
|
+
], H.prototype, "value", 2);
|
|
993
|
+
H = Z([
|
|
994
|
+
N("cx-asset-link-format-metadata")
|
|
995
|
+
], H);
|
|
996
|
+
var Et = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, p = (t, e, i, s) => {
|
|
997
|
+
for (var o = s > 1 ? void 0 : s ? Nt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
|
|
998
|
+
(h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
|
|
999
|
+
return s && o && Et(e, i, o), o;
|
|
973
1000
|
};
|
|
974
|
-
let
|
|
1001
|
+
let c = class extends W {
|
|
975
1002
|
constructor() {
|
|
976
|
-
super(), this.localize = new
|
|
1003
|
+
super(), this.localize = new U(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
977
1004
|
{
|
|
978
1005
|
label: "Free",
|
|
979
1006
|
value: "free"
|
|
@@ -1032,7 +1059,7 @@ let l = class extends H {
|
|
|
1032
1059
|
label: "Smart Swatch",
|
|
1033
1060
|
value: "SmartSwatch"
|
|
1034
1061
|
}
|
|
1035
|
-
], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
|
|
1062
|
+
], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noFormat = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
|
|
1036
1063
|
height: 0,
|
|
1037
1064
|
width: 0
|
|
1038
1065
|
}, this.hideHeader = !1, this.canReset = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
|
|
@@ -1058,7 +1085,7 @@ let l = class extends H {
|
|
|
1058
1085
|
}, this.rotation = 0, this.defaultSize = {
|
|
1059
1086
|
height: 0,
|
|
1060
1087
|
width: 0
|
|
1061
|
-
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink =
|
|
1088
|
+
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = rt, this.apiGetCropFocusMode = ht, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1062
1089
|
}
|
|
1063
1090
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
1064
1091
|
get hasUnfrozenTransformations() {
|
|
@@ -1156,7 +1183,7 @@ let l = class extends H {
|
|
|
1156
1183
|
* Returns the transformation string for the asset link.
|
|
1157
1184
|
*/
|
|
1158
1185
|
get transformationString() {
|
|
1159
|
-
return
|
|
1186
|
+
return G({
|
|
1160
1187
|
asset: this.asset,
|
|
1161
1188
|
baseUrl: "",
|
|
1162
1189
|
parameters: this.parameters,
|
|
@@ -1197,7 +1224,7 @@ let l = class extends H {
|
|
|
1197
1224
|
token: this.token,
|
|
1198
1225
|
transformations: this.transformationString
|
|
1199
1226
|
}).then((s) => {
|
|
1200
|
-
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction ===
|
|
1227
|
+
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === l.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
1201
1228
|
height: s.height,
|
|
1202
1229
|
width: s.width
|
|
1203
1230
|
}, this.selectedFormat = {
|
|
@@ -1211,7 +1238,7 @@ let l = class extends H {
|
|
|
1211
1238
|
*/
|
|
1212
1239
|
});
|
|
1213
1240
|
});
|
|
1214
|
-
const i =
|
|
1241
|
+
const i = G({
|
|
1215
1242
|
asset: this.asset,
|
|
1216
1243
|
baseUrl: "",
|
|
1217
1244
|
extension: this.selectedFormat.extension,
|
|
@@ -1233,8 +1260,98 @@ let l = class extends H {
|
|
|
1233
1260
|
freezeTransformations() {
|
|
1234
1261
|
this.frozenIndex = this.transformations.length - 1;
|
|
1235
1262
|
}
|
|
1263
|
+
upsertTransformation(t) {
|
|
1264
|
+
const e = this.transformations.findIndex((i) => i.key === t.key);
|
|
1265
|
+
if (e >= 0) {
|
|
1266
|
+
const i = [...this.transformations];
|
|
1267
|
+
i[e] = t, this.transformations = i;
|
|
1268
|
+
} else
|
|
1269
|
+
this.transformations = [...this.transformations, t];
|
|
1270
|
+
}
|
|
1236
1271
|
async handleTransformationsChange() {
|
|
1237
|
-
if (await this.updateComplete, !this.asset
|
|
1272
|
+
if (await this.updateComplete, !this.asset) {
|
|
1273
|
+
this.emit("cx-asset-link-format-change", {
|
|
1274
|
+
detail: G({
|
|
1275
|
+
asset: this.asset,
|
|
1276
|
+
baseUrl: "",
|
|
1277
|
+
options: {
|
|
1278
|
+
omitZeroXY: !0
|
|
1279
|
+
},
|
|
1280
|
+
parameters: this.parameters,
|
|
1281
|
+
transformations: this.transformations,
|
|
1282
|
+
useSession: this.useSession
|
|
1283
|
+
}).replace(/\/t\//g, "")
|
|
1284
|
+
});
|
|
1285
|
+
const r = this.transformations.findLast(
|
|
1286
|
+
(f) => f.key === l.Crop && f.value.width && f.value.height
|
|
1287
|
+
);
|
|
1288
|
+
if (r) {
|
|
1289
|
+
const { focusMode: f, height: v, unit: P, width: Q, x: at = 0, y: ot = 0 } = r.value;
|
|
1290
|
+
this.cropSize = {
|
|
1291
|
+
...this.cropSize,
|
|
1292
|
+
cropMode: "free",
|
|
1293
|
+
focusMode: f ?? "manual",
|
|
1294
|
+
height: v,
|
|
1295
|
+
percentageHeight: 100,
|
|
1296
|
+
percentageWidth: 100,
|
|
1297
|
+
unit: P ?? a.Pixel,
|
|
1298
|
+
width: Q,
|
|
1299
|
+
x: at,
|
|
1300
|
+
y: ot
|
|
1301
|
+
};
|
|
1302
|
+
} else
|
|
1303
|
+
this.cropSize = {
|
|
1304
|
+
...this.cropSize,
|
|
1305
|
+
cropMode: "free",
|
|
1306
|
+
focusMode: "manual",
|
|
1307
|
+
height: 0,
|
|
1308
|
+
percentageHeight: 0,
|
|
1309
|
+
percentageWidth: 0,
|
|
1310
|
+
unit: a.Pixel,
|
|
1311
|
+
width: 0,
|
|
1312
|
+
x: 0,
|
|
1313
|
+
y: 0
|
|
1314
|
+
};
|
|
1315
|
+
const h = this.transformations.findLast(
|
|
1316
|
+
(f) => f.key === l.Resize && (f.value.width || f.value.height)
|
|
1317
|
+
);
|
|
1318
|
+
if (h) {
|
|
1319
|
+
const { height: f = 0, unit: v, width: P = 0 } = h.value;
|
|
1320
|
+
this.resizeSize = {
|
|
1321
|
+
...this.resizeSize,
|
|
1322
|
+
height: f,
|
|
1323
|
+
unit: v ?? a.Pixel,
|
|
1324
|
+
width: P
|
|
1325
|
+
};
|
|
1326
|
+
} else
|
|
1327
|
+
this.resizeSize = {
|
|
1328
|
+
...this.resizeSize,
|
|
1329
|
+
height: 0,
|
|
1330
|
+
unit: a.Pixel,
|
|
1331
|
+
width: 0
|
|
1332
|
+
};
|
|
1333
|
+
const d = this.transformations.findLast(
|
|
1334
|
+
(f) => f.key === l.Rotate
|
|
1335
|
+
);
|
|
1336
|
+
this.rotation = d?.value.rotation ?? 0;
|
|
1337
|
+
const g = this.transformations.findLast((f) => f.key === l.Quality)?.value.quality ?? 100, b = this.transformations.some(
|
|
1338
|
+
(f) => f.key === l.Metadata
|
|
1339
|
+
);
|
|
1340
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: b, quality: g } : this.selectedFormat = {
|
|
1341
|
+
extension: "",
|
|
1342
|
+
height: 0,
|
|
1343
|
+
keepMetadata: b,
|
|
1344
|
+
originalUrl: "",
|
|
1345
|
+
quality: g,
|
|
1346
|
+
rotation: 0,
|
|
1347
|
+
url: "",
|
|
1348
|
+
width: 0,
|
|
1349
|
+
x: 0,
|
|
1350
|
+
y: 0
|
|
1351
|
+
};
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
if (!this.selectedFormat)
|
|
1238
1355
|
return;
|
|
1239
1356
|
const t = this.proxies?.find(
|
|
1240
1357
|
(r) => r.id === this.selectedProxy
|
|
@@ -1273,11 +1390,11 @@ let l = class extends H {
|
|
|
1273
1390
|
width: e.width,
|
|
1274
1391
|
x: 0,
|
|
1275
1392
|
y: 0
|
|
1276
|
-
}, this.lastAction ===
|
|
1393
|
+
}, this.lastAction === l.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
1277
1394
|
const i = this.transformations.some(
|
|
1278
|
-
(r) => r.key ===
|
|
1395
|
+
(r) => r.key === l.Metadata
|
|
1279
1396
|
), s = this.transformations.findLast(
|
|
1280
|
-
(r) => r.key ===
|
|
1397
|
+
(r) => r.key === l.Quality
|
|
1281
1398
|
);
|
|
1282
1399
|
this.selectedFormat = {
|
|
1283
1400
|
...this.selectedFormat,
|
|
@@ -1291,7 +1408,7 @@ let l = class extends H {
|
|
|
1291
1408
|
* url: `${this.baseUrl}/${response.relativePath}`,
|
|
1292
1409
|
*/
|
|
1293
1410
|
};
|
|
1294
|
-
const o =
|
|
1411
|
+
const o = G({
|
|
1295
1412
|
asset: this.asset,
|
|
1296
1413
|
baseUrl: "",
|
|
1297
1414
|
extension: this.selectedFormat.extension,
|
|
@@ -1323,7 +1440,7 @@ let l = class extends H {
|
|
|
1323
1440
|
width: Number.parseInt(this.asset.width, 10)
|
|
1324
1441
|
});
|
|
1325
1442
|
const t = this.transformations.findLast(
|
|
1326
|
-
(e) => e.key ===
|
|
1443
|
+
(e) => e.key === l.Quality
|
|
1327
1444
|
);
|
|
1328
1445
|
this.selectedFormat = {
|
|
1329
1446
|
extension: this.asset.extension,
|
|
@@ -1353,7 +1470,7 @@ let l = class extends H {
|
|
|
1353
1470
|
width: this.defaultSize.width,
|
|
1354
1471
|
x: 0,
|
|
1355
1472
|
y: 0
|
|
1356
|
-
}, this.
|
|
1473
|
+
}, this.selectedProxy || (this.selectedProxy = this.proxies && this.proxies.length > 0 ? this.proxies[0].id : "");
|
|
1357
1474
|
}
|
|
1358
1475
|
handleProxiesChange() {
|
|
1359
1476
|
!this.proxies || this.proxies.length === 0 || (!this.selectedProxy || !this.proxies.some((t) => t.id === this.selectedProxy)) && (this.selectedProxy = this.proxies[0].id);
|
|
@@ -1369,24 +1486,25 @@ let l = class extends H {
|
|
|
1369
1486
|
e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
|
|
1370
1487
|
const i = this.proxies?.find((s) => s.id === t);
|
|
1371
1488
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
1372
|
-
if (s.key ===
|
|
1373
|
-
const o = s.value, r = o.width / i.formatWidth * e.formatWidth,
|
|
1489
|
+
if (s.key === l.Crop) {
|
|
1490
|
+
const o = s.value, r = o.width / i.formatWidth * e.formatWidth, h = o.height / i.formatHeight * e.formatHeight, d = o.x / i.formatWidth * e.formatWidth, g = o.y / i.formatHeight * e.formatHeight;
|
|
1374
1491
|
return {
|
|
1375
1492
|
...s,
|
|
1376
1493
|
value: {
|
|
1377
|
-
|
|
1494
|
+
...s.value,
|
|
1495
|
+
height: h,
|
|
1378
1496
|
width: r,
|
|
1379
|
-
x,
|
|
1380
|
-
y:
|
|
1497
|
+
x: d,
|
|
1498
|
+
y: g
|
|
1381
1499
|
}
|
|
1382
1500
|
};
|
|
1383
1501
|
}
|
|
1384
|
-
if (s.key ===
|
|
1385
|
-
const o = s.value, r = o.width / i.formatWidth * e.formatWidth,
|
|
1502
|
+
if (s.key === l.Resize) {
|
|
1503
|
+
const o = s.value, r = o.width / i.formatWidth * e.formatWidth, h = o.height / i.formatHeight * e.formatHeight;
|
|
1386
1504
|
return {
|
|
1387
1505
|
...s,
|
|
1388
1506
|
value: {
|
|
1389
|
-
height:
|
|
1507
|
+
height: h,
|
|
1390
1508
|
width: r
|
|
1391
1509
|
}
|
|
1392
1510
|
};
|
|
@@ -1453,32 +1571,32 @@ let l = class extends H {
|
|
|
1453
1571
|
keepAspectRatio: s,
|
|
1454
1572
|
percentageHeight: o,
|
|
1455
1573
|
percentageWidth: r,
|
|
1456
|
-
ratioHeight:
|
|
1457
|
-
ratioWidth:
|
|
1458
|
-
unit:
|
|
1459
|
-
useCropMode:
|
|
1460
|
-
width:
|
|
1574
|
+
ratioHeight: h,
|
|
1575
|
+
ratioWidth: d,
|
|
1576
|
+
unit: g,
|
|
1577
|
+
useCropMode: b,
|
|
1578
|
+
width: f
|
|
1461
1579
|
}) {
|
|
1462
1580
|
if (!this.selectedFormat?.url || e === "manual")
|
|
1463
1581
|
return;
|
|
1464
|
-
this.loading = !0, this.lastAction =
|
|
1465
|
-
const
|
|
1582
|
+
this.loading = !0, this.lastAction = l.Crop;
|
|
1583
|
+
const v = await this.apiGetCropFocusMode({
|
|
1466
1584
|
autoCropMode: e,
|
|
1467
1585
|
cropHeight: i,
|
|
1468
|
-
cropWidth:
|
|
1586
|
+
cropWidth: f,
|
|
1469
1587
|
imageUrl: this.selectedFormat.url
|
|
1470
1588
|
});
|
|
1471
|
-
if (
|
|
1472
|
-
let
|
|
1473
|
-
i || (
|
|
1589
|
+
if (v) {
|
|
1590
|
+
let P = o, Q = r;
|
|
1591
|
+
i || (P = v.height * 100 / this.selectedFormat.height), f || (Q = v.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
1474
1592
|
...this.cropSize,
|
|
1475
|
-
height:
|
|
1476
|
-
percentageHeight:
|
|
1477
|
-
percentageWidth:
|
|
1478
|
-
width:
|
|
1479
|
-
x:
|
|
1480
|
-
y:
|
|
1481
|
-
|
|
1593
|
+
height: v.height,
|
|
1594
|
+
percentageHeight: P ?? this.cropSize.percentageHeight,
|
|
1595
|
+
percentageWidth: Q ?? this.cropSize.percentageWidth,
|
|
1596
|
+
width: v.width,
|
|
1597
|
+
x: v.x * 100 / this.selectedFormat.width,
|
|
1598
|
+
y: v.y * 100 / this.selectedFormat.height,
|
|
1599
|
+
...b ? {
|
|
1482
1600
|
cropMode: e,
|
|
1483
1601
|
focusMode: "manual",
|
|
1484
1602
|
keepAspectRatio: !1
|
|
@@ -1487,9 +1605,9 @@ let l = class extends H {
|
|
|
1487
1605
|
focusMode: e
|
|
1488
1606
|
},
|
|
1489
1607
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
1490
|
-
ratioHeight:
|
|
1491
|
-
ratioWidth:
|
|
1492
|
-
unit:
|
|
1608
|
+
ratioHeight: h ?? this.cropSize.ratioHeight,
|
|
1609
|
+
ratioWidth: d ?? this.cropSize.ratioWidth,
|
|
1610
|
+
unit: g ?? this.cropSize.unit
|
|
1493
1611
|
};
|
|
1494
1612
|
}
|
|
1495
1613
|
this.loading = !1, this.lastAction = void 0;
|
|
@@ -1503,26 +1621,26 @@ let l = class extends H {
|
|
|
1503
1621
|
} = e;
|
|
1504
1622
|
if (s === 0 || i === 0)
|
|
1505
1623
|
return;
|
|
1506
|
-
const
|
|
1507
|
-
let
|
|
1508
|
-
|
|
1624
|
+
const h = this.cropSize.percentageWidth !== s, d = this.cropSize.percentageHeight !== i;
|
|
1625
|
+
let g = this.cropSize.height, b = this.cropSize.width;
|
|
1626
|
+
h && (b = Math.round(s * this.selectedFormat.width / 100)), d && (g = Math.round(
|
|
1509
1627
|
i * this.selectedFormat.height / 100
|
|
1510
1628
|
));
|
|
1511
|
-
const
|
|
1629
|
+
const f = this.cropSize.focusMode;
|
|
1512
1630
|
this.focusModes.find(
|
|
1513
|
-
(
|
|
1631
|
+
(P) => P.value === f
|
|
1514
1632
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
1515
|
-
focusMode:
|
|
1516
|
-
height:
|
|
1633
|
+
focusMode: f,
|
|
1634
|
+
height: g,
|
|
1517
1635
|
percentageHeight: i,
|
|
1518
1636
|
percentageWidth: s,
|
|
1519
|
-
width:
|
|
1637
|
+
width: b
|
|
1520
1638
|
}) : this.cropSize = {
|
|
1521
1639
|
...this.cropSize,
|
|
1522
|
-
height:
|
|
1640
|
+
height: g,
|
|
1523
1641
|
percentageHeight: i,
|
|
1524
1642
|
percentageWidth: s,
|
|
1525
|
-
width:
|
|
1643
|
+
width: b,
|
|
1526
1644
|
x: o,
|
|
1527
1645
|
y: r
|
|
1528
1646
|
};
|
|
@@ -1547,7 +1665,7 @@ let l = class extends H {
|
|
|
1547
1665
|
}
|
|
1548
1666
|
onProxyChange(t) {
|
|
1549
1667
|
const e = t.detail;
|
|
1550
|
-
this.lastAction =
|
|
1668
|
+
this.lastAction = l.Proxy, this.selectedProxy = e.id;
|
|
1551
1669
|
}
|
|
1552
1670
|
async onCropModeChange(t) {
|
|
1553
1671
|
const { mode: e } = t.detail;
|
|
@@ -1558,10 +1676,10 @@ let l = class extends H {
|
|
|
1558
1676
|
});
|
|
1559
1677
|
else {
|
|
1560
1678
|
const s = this.focusModes.find(
|
|
1561
|
-
(
|
|
1679
|
+
(g) => g.value === this.cropSize.focusMode
|
|
1562
1680
|
)?.auto;
|
|
1563
|
-
let o = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode,
|
|
1564
|
-
e === "free" ? (o = !1, r = "manual") : this.cropSize.unit === a.Pixel && !s && (
|
|
1681
|
+
let o = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, d = this.cropSize.y;
|
|
1682
|
+
e === "free" ? (o = !1, r = "manual") : this.cropSize.unit === a.Pixel && !s && (h = 0, d = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
1565
1683
|
cropMode: e,
|
|
1566
1684
|
focusMode: r,
|
|
1567
1685
|
height: this.cropSize.height,
|
|
@@ -1572,21 +1690,42 @@ let l = class extends H {
|
|
|
1572
1690
|
cropMode: e,
|
|
1573
1691
|
focusMode: r,
|
|
1574
1692
|
keepAspectRatio: o,
|
|
1575
|
-
x:
|
|
1576
|
-
y:
|
|
1577
|
-
}
|
|
1693
|
+
x: h,
|
|
1694
|
+
y: d
|
|
1695
|
+
}, this.asset || (e && e !== "free" ? this.upsertTransformation({
|
|
1696
|
+
key: l.Crop,
|
|
1697
|
+
value: {
|
|
1698
|
+
mode: e
|
|
1699
|
+
}
|
|
1700
|
+
}) : this.transformations = this.transformations.filter(
|
|
1701
|
+
(g) => g.key !== l.Crop
|
|
1702
|
+
));
|
|
1578
1703
|
}
|
|
1579
1704
|
}
|
|
1580
1705
|
onCropFocusModeChange(t) {
|
|
1581
|
-
const { mode: e } = t.detail;
|
|
1582
|
-
|
|
1706
|
+
const { mode: e } = t.detail, i = this.focusModes.find((s) => s.value === e)?.auto;
|
|
1707
|
+
if (i && this.selectedFormat?.url ? this.handleRequestAutoCropSuggestion({
|
|
1583
1708
|
focusMode: e,
|
|
1584
1709
|
height: this.cropSize.height,
|
|
1585
1710
|
width: this.cropSize.width
|
|
1586
1711
|
}) : this.cropSize = {
|
|
1587
1712
|
...this.cropSize,
|
|
1588
1713
|
focusMode: e
|
|
1589
|
-
}
|
|
1714
|
+
}, !this.asset) {
|
|
1715
|
+
const { height: s, unit: o, width: r, x: h, y: d } = this.cropSize;
|
|
1716
|
+
(s || r) && this.upsertTransformation({
|
|
1717
|
+
key: l.Crop,
|
|
1718
|
+
value: {
|
|
1719
|
+
focusMode: e,
|
|
1720
|
+
height: s,
|
|
1721
|
+
isFocusModeAuto: i ?? !1,
|
|
1722
|
+
unit: o,
|
|
1723
|
+
width: r,
|
|
1724
|
+
x: h,
|
|
1725
|
+
y: d
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1590
1729
|
}
|
|
1591
1730
|
async onCropChange(t) {
|
|
1592
1731
|
const e = this.cropSize.unit;
|
|
@@ -1597,37 +1736,37 @@ let l = class extends H {
|
|
|
1597
1736
|
), o = Math.min(
|
|
1598
1737
|
Math.max(Math.round(s / i), 0),
|
|
1599
1738
|
this.resizeSize.height
|
|
1600
|
-
), r = o * 100 / this.selectedFormat.height,
|
|
1601
|
-
let
|
|
1602
|
-
|
|
1603
|
-
let
|
|
1739
|
+
), r = o * 100 / this.selectedFormat.height, h = s * 100 / this.selectedFormat.width;
|
|
1740
|
+
let d = this.cropSize.x, g = this.cropSize.y;
|
|
1741
|
+
d + h > 100 && (d = 100 - h), g + r > 100 && (g = 100 - r);
|
|
1742
|
+
let b = this.cropSize.cropMode;
|
|
1604
1743
|
this.cropModes.find(
|
|
1605
|
-
(
|
|
1606
|
-
)?.auto && (
|
|
1744
|
+
(v) => v.value === b
|
|
1745
|
+
)?.auto && (b = "free"), t.detail.silent ? (this.cropSize.height = o, 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 = a.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
1607
1746
|
...this.cropSize,
|
|
1608
|
-
cropMode:
|
|
1747
|
+
cropMode: b,
|
|
1609
1748
|
height: o,
|
|
1610
1749
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
1611
1750
|
percentageHeight: r,
|
|
1612
|
-
percentageWidth:
|
|
1751
|
+
percentageWidth: h,
|
|
1613
1752
|
ratioHeight: t.detail.height,
|
|
1614
1753
|
ratioWidth: t.detail.width,
|
|
1615
1754
|
unit: a.AspectRatio,
|
|
1616
1755
|
width: s,
|
|
1617
|
-
x,
|
|
1618
|
-
y:
|
|
1756
|
+
x: d,
|
|
1757
|
+
y: g
|
|
1619
1758
|
};
|
|
1620
1759
|
} else {
|
|
1621
1760
|
const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
|
|
1622
1761
|
let o = this.cropSize.x, r = this.cropSize.y;
|
|
1623
1762
|
o + s > 100 && (o = 100 - s), r + i > 100 && (r = 100 - i);
|
|
1624
|
-
let
|
|
1625
|
-
const
|
|
1626
|
-
(
|
|
1763
|
+
let h = this.cropSize.cropMode;
|
|
1764
|
+
const d = this.cropModes.find(
|
|
1765
|
+
(g) => g.value === h
|
|
1627
1766
|
)?.auto;
|
|
1628
|
-
(t.detail.breakAspectRatio ||
|
|
1767
|
+
(t.detail.breakAspectRatio || d) && (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 = a.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = o, this.cropSize.y = r) : this.cropSize = {
|
|
1629
1768
|
...this.cropSize,
|
|
1630
|
-
cropMode:
|
|
1769
|
+
cropMode: h,
|
|
1631
1770
|
height: t.detail.height,
|
|
1632
1771
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
1633
1772
|
percentageHeight: i,
|
|
@@ -1638,10 +1777,26 @@ let l = class extends H {
|
|
|
1638
1777
|
y: r
|
|
1639
1778
|
};
|
|
1640
1779
|
}
|
|
1641
|
-
e !== this.cropSize.unit && (this.cropSize = {
|
|
1780
|
+
if (e !== this.cropSize.unit && (this.cropSize = {
|
|
1642
1781
|
...this.cropSize,
|
|
1643
1782
|
cropMode: "free"
|
|
1644
|
-
}, this.onCropChanged())
|
|
1783
|
+
}, this.onCropChanged()), !this.asset && !t.detail.silent) {
|
|
1784
|
+
const { focusMode: i, height: s, unit: o, width: r, x: h, y: d } = this.cropSize, g = this.focusModes.find(
|
|
1785
|
+
(b) => b.value === i
|
|
1786
|
+
)?.auto ?? !1;
|
|
1787
|
+
(s || r) && this.upsertTransformation({
|
|
1788
|
+
key: l.Crop,
|
|
1789
|
+
value: {
|
|
1790
|
+
focusMode: i,
|
|
1791
|
+
height: s,
|
|
1792
|
+
isFocusModeAuto: g,
|
|
1793
|
+
unit: o,
|
|
1794
|
+
width: r,
|
|
1795
|
+
x: h,
|
|
1796
|
+
y: d
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1645
1800
|
}
|
|
1646
1801
|
async onCropChanged() {
|
|
1647
1802
|
this.focusModes.find(
|
|
@@ -1654,46 +1809,56 @@ let l = class extends H {
|
|
|
1654
1809
|
}
|
|
1655
1810
|
onCropApply(t) {
|
|
1656
1811
|
const { height: e, mode: i, unit: s, width: o } = t.detail;
|
|
1657
|
-
if (this.preResetTransformations = void 0, this.lastAction =
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1812
|
+
if (this.preResetTransformations = void 0, this.lastAction = l.Crop, !this.cropperElement || !this.selectedFormat)
|
|
1813
|
+
return;
|
|
1814
|
+
const r = this.cropSize.focusMode, h = this.focusModes.find(
|
|
1815
|
+
(d) => d.value === r
|
|
1816
|
+
)?.auto ?? !1;
|
|
1817
|
+
if (e && o && s) {
|
|
1818
|
+
let d = o, g = e;
|
|
1819
|
+
if (s === a.AspectRatio && (d = this.cropSize.percentageWidth * this.selectedFormat.width / 100, g = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
|
|
1820
|
+
this.transformations = [
|
|
1821
|
+
...this.transformations,
|
|
1822
|
+
{
|
|
1823
|
+
key: l.Crop,
|
|
1824
|
+
value: {
|
|
1825
|
+
focusMode: r,
|
|
1826
|
+
height: g,
|
|
1827
|
+
isFocusModeAuto: h,
|
|
1828
|
+
mode: i,
|
|
1829
|
+
width: d
|
|
1670
1830
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1831
|
+
}
|
|
1832
|
+
];
|
|
1833
|
+
else {
|
|
1834
|
+
const b = this.cropSize.x / 100 * this.selectedFormat.width, f = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
1835
|
+
this.transformations = [
|
|
1836
|
+
...this.transformations,
|
|
1837
|
+
{
|
|
1838
|
+
key: l.Crop,
|
|
1839
|
+
value: {
|
|
1840
|
+
focusMode: r,
|
|
1841
|
+
height: g,
|
|
1842
|
+
isFocusModeAuto: h,
|
|
1843
|
+
unit: s,
|
|
1844
|
+
width: d,
|
|
1845
|
+
x: b,
|
|
1846
|
+
y: f
|
|
1685
1847
|
}
|
|
1686
|
-
];
|
|
1687
|
-
}
|
|
1688
|
-
} else i && (this.transformations = [
|
|
1689
|
-
...this.transformations,
|
|
1690
|
-
{
|
|
1691
|
-
key: d.Crop,
|
|
1692
|
-
value: {
|
|
1693
|
-
mode: i
|
|
1694
1848
|
}
|
|
1849
|
+
];
|
|
1850
|
+
}
|
|
1851
|
+
} else i && (this.transformations = [
|
|
1852
|
+
...this.transformations,
|
|
1853
|
+
{
|
|
1854
|
+
key: l.Crop,
|
|
1855
|
+
value: {
|
|
1856
|
+
focusMode: r,
|
|
1857
|
+
isFocusModeAuto: h,
|
|
1858
|
+
mode: i
|
|
1695
1859
|
}
|
|
1696
|
-
|
|
1860
|
+
}
|
|
1861
|
+
]);
|
|
1697
1862
|
}
|
|
1698
1863
|
onResizeChange(t) {
|
|
1699
1864
|
if (t.detail.unit === a.AspectRatio) {
|
|
@@ -1718,37 +1883,55 @@ let l = class extends H {
|
|
|
1718
1883
|
unit: t.detail.unit,
|
|
1719
1884
|
width: Math.max(t.detail.width, 0)
|
|
1720
1885
|
};
|
|
1886
|
+
if (!this.asset) {
|
|
1887
|
+
const { height: e, unit: i, width: s } = this.resizeSize;
|
|
1888
|
+
(e || s) && this.upsertTransformation({
|
|
1889
|
+
key: l.Resize,
|
|
1890
|
+
value: {
|
|
1891
|
+
height: e,
|
|
1892
|
+
unit: i,
|
|
1893
|
+
width: s
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1721
1897
|
}
|
|
1722
1898
|
onResizeApply(t) {
|
|
1723
1899
|
if (!this.selectedFormat)
|
|
1724
1900
|
return;
|
|
1725
1901
|
const { height: e, unit: i, width: s } = t.detail;
|
|
1726
|
-
this.preResetTransformations = void 0, this.lastAction =
|
|
1902
|
+
this.preResetTransformations = void 0, this.lastAction = l.Resize;
|
|
1727
1903
|
const o = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
|
|
1728
|
-
let
|
|
1729
|
-
this.resizeSize.unit !== i ? (
|
|
1904
|
+
let h = s, d = e;
|
|
1905
|
+
this.resizeSize.unit !== i ? (h = o, d = r) : i === a.AspectRatio && (h = Math.round(s / e * r), d = r), this.transformations = [
|
|
1730
1906
|
...this.transformations,
|
|
1731
1907
|
{
|
|
1732
|
-
key:
|
|
1908
|
+
key: l.Resize,
|
|
1733
1909
|
value: {
|
|
1734
|
-
height:
|
|
1910
|
+
height: d,
|
|
1735
1911
|
unit: i,
|
|
1736
|
-
width:
|
|
1912
|
+
width: h
|
|
1737
1913
|
}
|
|
1738
1914
|
}
|
|
1739
1915
|
];
|
|
1740
1916
|
}
|
|
1741
1917
|
onRotationChange(t) {
|
|
1742
|
-
this.rotation = t.detail
|
|
1918
|
+
this.rotation = t.detail, this.asset || (this.rotation ? this.upsertTransformation({
|
|
1919
|
+
key: l.Rotate,
|
|
1920
|
+
value: {
|
|
1921
|
+
rotation: this.rotation
|
|
1922
|
+
}
|
|
1923
|
+
}) : this.transformations = this.transformations.filter(
|
|
1924
|
+
(e) => e.key !== l.Rotate
|
|
1925
|
+
));
|
|
1743
1926
|
}
|
|
1744
1927
|
onRotationApply(t) {
|
|
1745
1928
|
if (!this.selectedFormat)
|
|
1746
1929
|
return;
|
|
1747
1930
|
const e = t.detail;
|
|
1748
|
-
this.preResetTransformations = void 0, this.lastAction =
|
|
1931
|
+
this.preResetTransformations = void 0, this.lastAction = l.Rotate, this.transformations = [
|
|
1749
1932
|
...this.transformations,
|
|
1750
1933
|
{
|
|
1751
|
-
key:
|
|
1934
|
+
key: l.Rotate,
|
|
1752
1935
|
value: {
|
|
1753
1936
|
rotation: e
|
|
1754
1937
|
}
|
|
@@ -1756,52 +1939,56 @@ let l = class extends H {
|
|
|
1756
1939
|
];
|
|
1757
1940
|
}
|
|
1758
1941
|
onQualityChange(t) {
|
|
1759
|
-
if (!this.selectedFormat)
|
|
1760
|
-
return;
|
|
1761
1942
|
const e = t.detail;
|
|
1762
|
-
this.selectedFormat.quality = e, this.preResetTransformations = void 0, this.lastAction =
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
quality: e
|
|
1768
|
-
}
|
|
1943
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = l.Quality;
|
|
1944
|
+
const i = {
|
|
1945
|
+
key: l.Quality,
|
|
1946
|
+
value: {
|
|
1947
|
+
quality: e
|
|
1769
1948
|
}
|
|
1770
|
-
|
|
1949
|
+
};
|
|
1950
|
+
this.asset ? this.transformations = [...this.transformations, i] : this.upsertTransformation(i);
|
|
1771
1951
|
}
|
|
1772
1952
|
onMetadataChange(t) {
|
|
1773
|
-
if (!this.selectedFormat)
|
|
1774
|
-
return;
|
|
1775
1953
|
const e = t.detail;
|
|
1776
|
-
this.preResetTransformations = void 0, this.selectedFormat = {
|
|
1954
|
+
if (this.preResetTransformations = void 0, this.selectedFormat && (this.selectedFormat = {
|
|
1777
1955
|
...this.selectedFormat,
|
|
1778
1956
|
keepMetadata: e
|
|
1779
|
-
},
|
|
1957
|
+
}), !this.asset) {
|
|
1958
|
+
e ? this.upsertTransformation({
|
|
1959
|
+
key: l.Metadata,
|
|
1960
|
+
value: {
|
|
1961
|
+
keepMetadata: e
|
|
1962
|
+
}
|
|
1963
|
+
}) : this.transformations = this.transformations.filter(
|
|
1964
|
+
(i) => i.key !== l.Metadata
|
|
1965
|
+
);
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
e ? this.transformations = [
|
|
1780
1969
|
...this.transformations.filter(
|
|
1781
|
-
(i) => i.key !==
|
|
1970
|
+
(i) => i.key !== l.Metadata
|
|
1782
1971
|
),
|
|
1783
1972
|
{
|
|
1784
|
-
key:
|
|
1973
|
+
key: l.Metadata,
|
|
1785
1974
|
value: {
|
|
1786
1975
|
keepMetadata: e
|
|
1787
1976
|
}
|
|
1788
1977
|
}
|
|
1789
1978
|
] : this.transformations = this.transformations.filter(
|
|
1790
|
-
(i) => i.key !==
|
|
1979
|
+
(i) => i.key !== l.Metadata
|
|
1791
1980
|
);
|
|
1792
1981
|
}
|
|
1793
1982
|
onExtensionChange(t) {
|
|
1794
|
-
if (!this.selectedFormat)
|
|
1795
|
-
return;
|
|
1796
1983
|
const e = t.detail;
|
|
1797
|
-
this.selectedFormat = {
|
|
1984
|
+
this.selectedFormat && (this.selectedFormat = {
|
|
1798
1985
|
...this.selectedFormat,
|
|
1799
1986
|
extension: e
|
|
1800
|
-
};
|
|
1987
|
+
});
|
|
1801
1988
|
}
|
|
1802
1989
|
syncQuality() {
|
|
1803
1990
|
const t = this.transformations.findLast(
|
|
1804
|
-
(e) => e.key ===
|
|
1991
|
+
(e) => e.key === l.Quality
|
|
1805
1992
|
)?.value?.quality;
|
|
1806
1993
|
this.selectedFormat && (this.selectedFormat = {
|
|
1807
1994
|
...this.selectedFormat,
|
|
@@ -1815,152 +2002,160 @@ let l = class extends H {
|
|
|
1815
2002
|
this.preResetTransformations = [...this.transformations], this.transformations = [], this.frozenIndex = -1, this.syncQuality();
|
|
1816
2003
|
}
|
|
1817
2004
|
render() {
|
|
1818
|
-
return m`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${
|
|
2005
|
+
return m`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${k(
|
|
1819
2006
|
!this.hideHeader,
|
|
1820
|
-
() => m`<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>${
|
|
1821
|
-
() =>
|
|
1822
|
-
)}
|
|
2007
|
+
() => m`<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>${k(this.canReset, () => m`<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>`,
|
|
2008
|
+
() => nt
|
|
2009
|
+
)}
|
|
2010
|
+
${k(
|
|
2011
|
+
!this.noFormat,
|
|
2012
|
+
() => m`<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 === l.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
2013
|
+
)}
|
|
2014
|
+
${k(
|
|
1823
2015
|
!this.noCrop,
|
|
1824
|
-
() => m`<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 ===
|
|
2016
|
+
() => m`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.Crop} ?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[a.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[a.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>`
|
|
1825
2017
|
)}
|
|
1826
|
-
${
|
|
2018
|
+
${k(
|
|
1827
2019
|
!this.noResize,
|
|
1828
|
-
() => m`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction ===
|
|
2020
|
+
() => m`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.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>`
|
|
1829
2021
|
)}
|
|
1830
|
-
${
|
|
2022
|
+
${k(
|
|
1831
2023
|
!this.noRotate,
|
|
1832
|
-
() => m`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
1833
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
2024
|
+
() => m`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === l.Rotate} ?can-apply=${!!this.asset} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
|
|
2025
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.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>${k(
|
|
1834
2026
|
!this.noMetadata,
|
|
1835
2027
|
() => m`<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>`
|
|
1836
2028
|
)}
|
|
1837
|
-
${
|
|
2029
|
+
${k(
|
|
1838
2030
|
this.useCustomExtension,
|
|
1839
2031
|
() => m`<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>`
|
|
1840
2032
|
)}</div>`;
|
|
1841
2033
|
}
|
|
1842
2034
|
};
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
"cx-asset-link-format-crop":
|
|
1846
|
-
"cx-asset-link-format-extension":
|
|
1847
|
-
"cx-asset-link-format-metadata":
|
|
1848
|
-
"cx-asset-link-format-proxy":
|
|
1849
|
-
"cx-asset-link-format-quality":
|
|
1850
|
-
"cx-asset-link-format-resize":
|
|
1851
|
-
"cx-asset-link-format-rotation":
|
|
1852
|
-
"cx-button":
|
|
1853
|
-
"cx-space":
|
|
1854
|
-
"cx-typography":
|
|
2035
|
+
c.styles = [E, ut];
|
|
2036
|
+
c.dependencies = {
|
|
2037
|
+
"cx-asset-link-format-crop": u,
|
|
2038
|
+
"cx-asset-link-format-extension": T,
|
|
2039
|
+
"cx-asset-link-format-metadata": H,
|
|
2040
|
+
"cx-asset-link-format-proxy": $,
|
|
2041
|
+
"cx-asset-link-format-quality": A,
|
|
2042
|
+
"cx-asset-link-format-resize": y,
|
|
2043
|
+
"cx-asset-link-format-rotation": C,
|
|
2044
|
+
"cx-button": B,
|
|
2045
|
+
"cx-space": _,
|
|
2046
|
+
"cx-typography": F
|
|
1855
2047
|
};
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
],
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
],
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
],
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
],
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
],
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
],
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
],
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
],
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
],
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
],
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
],
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
],
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
],
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
],
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
],
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
],
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
],
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
],
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
],
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
],
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
],
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
],
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
],
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
],
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
],
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
],
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
],
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
],
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
],
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
],
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
],
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
],
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
],
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
],
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
],
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
],
|
|
2048
|
+
p([
|
|
2049
|
+
n({ attribute: "base-url", type: String })
|
|
2050
|
+
], c.prototype, "baseUrl", 2);
|
|
2051
|
+
p([
|
|
2052
|
+
n({ attribute: "token", type: String })
|
|
2053
|
+
], c.prototype, "token", 2);
|
|
2054
|
+
p([
|
|
2055
|
+
n({ reflect: !1, type: Object })
|
|
2056
|
+
], c.prototype, "asset", 2);
|
|
2057
|
+
p([
|
|
2058
|
+
n({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
2059
|
+
], c.prototype, "cropModes", 2);
|
|
2060
|
+
p([
|
|
2061
|
+
n({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
2062
|
+
], c.prototype, "focusModes", 2);
|
|
2063
|
+
p([
|
|
2064
|
+
n({ reflect: !1, type: Array })
|
|
2065
|
+
], c.prototype, "extensions", 2);
|
|
2066
|
+
p([
|
|
2067
|
+
n({ reflect: !1, type: Array })
|
|
2068
|
+
], c.prototype, "proxies", 2);
|
|
2069
|
+
p([
|
|
2070
|
+
n({ attribute: "for-cropper", reflect: !0, type: String })
|
|
2071
|
+
], c.prototype, "forCropper", 2);
|
|
2072
|
+
p([
|
|
2073
|
+
n({ attribute: "use-session", reflect: !0, type: String })
|
|
2074
|
+
], c.prototype, "useSession", 2);
|
|
2075
|
+
p([
|
|
2076
|
+
n({ reflect: !1, type: Array })
|
|
2077
|
+
], c.prototype, "transformations", 2);
|
|
2078
|
+
p([
|
|
2079
|
+
n({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
2080
|
+
], c.prototype, "selectedProxy", 2);
|
|
2081
|
+
p([
|
|
2082
|
+
n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
2083
|
+
], c.prototype, "useCustomExtension", 2);
|
|
2084
|
+
p([
|
|
2085
|
+
n({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
2086
|
+
], c.prototype, "noMetadata", 2);
|
|
2087
|
+
p([
|
|
2088
|
+
n({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
2089
|
+
], c.prototype, "noFormat", 2);
|
|
2090
|
+
p([
|
|
2091
|
+
n({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
2092
|
+
], c.prototype, "noCrop", 2);
|
|
2093
|
+
p([
|
|
2094
|
+
n({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
2095
|
+
], c.prototype, "noResize", 2);
|
|
2096
|
+
p([
|
|
2097
|
+
n({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
2098
|
+
], c.prototype, "noRotate", 2);
|
|
2099
|
+
p([
|
|
2100
|
+
n({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
2101
|
+
], c.prototype, "lastImageSize", 2);
|
|
2102
|
+
p([
|
|
2103
|
+
n({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
2104
|
+
], c.prototype, "hideHeader", 2);
|
|
2105
|
+
p([
|
|
2106
|
+
n({ attribute: "can-reset", type: Boolean })
|
|
2107
|
+
], c.prototype, "canReset", 2);
|
|
2108
|
+
p([
|
|
2109
|
+
n({ attribute: !1, reflect: !1, type: Object })
|
|
2110
|
+
], c.prototype, "queryElement", 2);
|
|
2111
|
+
p([
|
|
2112
|
+
z()
|
|
2113
|
+
], c.prototype, "activeSetting", 2);
|
|
2114
|
+
p([
|
|
2115
|
+
z()
|
|
2116
|
+
], c.prototype, "selectedFormat", 2);
|
|
2117
|
+
p([
|
|
2118
|
+
z()
|
|
2119
|
+
], c.prototype, "resizeSize", 2);
|
|
2120
|
+
p([
|
|
2121
|
+
z()
|
|
2122
|
+
], c.prototype, "cropSize", 2);
|
|
2123
|
+
p([
|
|
2124
|
+
z()
|
|
2125
|
+
], c.prototype, "rotation", 2);
|
|
2126
|
+
p([
|
|
2127
|
+
z()
|
|
2128
|
+
], c.prototype, "defaultSize", 2);
|
|
2129
|
+
p([
|
|
2130
|
+
z()
|
|
2131
|
+
], c.prototype, "cropperElement", 2);
|
|
2132
|
+
p([
|
|
2133
|
+
z()
|
|
2134
|
+
], c.prototype, "parameters", 2);
|
|
2135
|
+
p([
|
|
2136
|
+
z()
|
|
2137
|
+
], c.prototype, "loading", 2);
|
|
2138
|
+
p([
|
|
2139
|
+
z()
|
|
2140
|
+
], c.prototype, "lastAction", 2);
|
|
2141
|
+
p([
|
|
2142
|
+
z()
|
|
2143
|
+
], c.prototype, "frozenIndex", 2);
|
|
2144
|
+
p([
|
|
2145
|
+
z()
|
|
2146
|
+
], c.prototype, "preResetTransformations", 2);
|
|
2147
|
+
p([
|
|
2148
|
+
w("transformations")
|
|
2149
|
+
], c.prototype, "handleTransformationsChange", 1);
|
|
2150
|
+
p([
|
|
2151
|
+
w("selectedProxy")
|
|
2152
|
+
], c.prototype, "handleSelectedProxyChange", 1);
|
|
2153
|
+
p([
|
|
2154
|
+
w("loading")
|
|
2155
|
+
], c.prototype, "handleLoadingChange", 1);
|
|
2156
|
+
c = p([
|
|
2157
|
+
N("cx-asset-link-format")
|
|
2158
|
+
], c);
|
|
1964
2159
|
export {
|
|
1965
|
-
|
|
2160
|
+
c as default
|
|
1966
2161
|
};
|