@orangelogic/design-system 2.86.0 → 2.89.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/{color-swatch-group.DPGjdQIL.js → color-swatch-group.BaMEIlzq.js} +1 -1
- package/library/chunks/{list-editor.DnLRd7ks.js → list-editor.DsI3-bUG.js} +1 -1
- package/library/chunks/{table.vctaA5cg.js → table.CGTmaN_x.js} +1887 -1879
- package/library/components/asset-link-format.js +151 -138
- package/library/components/atoms.js +1 -1
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/drawer.js +55 -50
- package/library/components/list-editor.js +2 -2
- package/library/components/menu.js +25 -24
- package/library/components/molecules.js +1 -1
- package/library/components/organisms.js +1 -1
- package/library/components/select.js +17 -17
- package/library/components/table.js +1 -1
- package/library/components/types.js +4 -4
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +1 -0
- package/library/packages/atoms/src/components/menu/menu.d.ts +2 -1
- package/library/packages/types/src/menu.d.ts +4 -0
- package/library/packages/types/src/table.d.ts +7 -1
- package/library/react-web-component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -37,26 +37,39 @@ function J({
|
|
|
37
37
|
useSession: h = ""
|
|
38
38
|
}) {
|
|
39
39
|
let r = e;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(v) => v.key === c.Quality
|
|
40
|
+
const y = a?.findLast(
|
|
41
|
+
(x) => x.key === c.Quality
|
|
43
42
|
);
|
|
44
|
-
|
|
43
|
+
if (y && (a = [
|
|
45
44
|
...a?.filter(
|
|
46
|
-
(
|
|
45
|
+
(x) => x.key !== c.Quality
|
|
47
46
|
) || [],
|
|
48
|
-
|
|
49
|
-
]), a
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
y
|
|
48
|
+
]), a) {
|
|
49
|
+
const x = [];
|
|
50
|
+
for (let g = 0; g < a.length; g++) {
|
|
51
|
+
const m = a[g];
|
|
52
|
+
if (m.key === c.Rotate) {
|
|
53
|
+
let n = m.value.rotation ?? 0;
|
|
54
|
+
for (; a[g + 1]?.key === c.Rotate; )
|
|
55
|
+
g++, n += a[g].value.rotation ?? 0;
|
|
56
|
+
n !== 0 && x.push({ key: c.Rotate, value: { rotation: n } });
|
|
57
|
+
} else
|
|
58
|
+
x.push(m);
|
|
59
|
+
}
|
|
60
|
+
a = x;
|
|
61
|
+
}
|
|
62
|
+
a && a.length > 0 && (r += "/t/"), a?.forEach(({ key: x, value: g }) => {
|
|
63
|
+
if (x === c.Resize) {
|
|
64
|
+
const m = [
|
|
52
65
|
...[
|
|
53
66
|
{
|
|
54
67
|
key: "re_w_",
|
|
55
|
-
value: Math.round(
|
|
68
|
+
value: Math.round(g.width ?? 0)
|
|
56
69
|
},
|
|
57
70
|
{
|
|
58
71
|
key: "re_h_",
|
|
59
|
-
value: Math.round(
|
|
72
|
+
value: Math.round(g.height ?? 0)
|
|
60
73
|
}
|
|
61
74
|
].filter((n) => n.value !== void 0).map((n) => ({
|
|
62
75
|
key: n.key,
|
|
@@ -67,33 +80,33 @@ function J({
|
|
|
67
80
|
value: "stretch"
|
|
68
81
|
}
|
|
69
82
|
];
|
|
70
|
-
|
|
71
|
-
r += `${n}${$}${B <
|
|
83
|
+
m.forEach(({ key: n, value: $ }, B) => {
|
|
84
|
+
r += `${n}${$}${B < m.length - 1 ? "," : ""}`;
|
|
72
85
|
}), r += "/";
|
|
73
86
|
}
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
87
|
+
if (x === c.Crop) {
|
|
88
|
+
const m = [
|
|
76
89
|
...[
|
|
77
90
|
{
|
|
78
91
|
key: "c_",
|
|
79
|
-
value:
|
|
92
|
+
value: g.mode
|
|
80
93
|
},
|
|
81
|
-
...
|
|
94
|
+
...g.disabledSize ? [] : [
|
|
82
95
|
{
|
|
83
96
|
key: "c_w_",
|
|
84
|
-
value: Math.round(
|
|
97
|
+
value: Math.round(g.width ?? 0)
|
|
85
98
|
},
|
|
86
99
|
{
|
|
87
100
|
key: "c_h_",
|
|
88
|
-
value: Math.round(
|
|
101
|
+
value: Math.round(g.height ?? 0)
|
|
89
102
|
},
|
|
90
103
|
{
|
|
91
104
|
key: "c_x_",
|
|
92
|
-
value: Math.round(
|
|
105
|
+
value: Math.round(g.x ?? 0)
|
|
93
106
|
},
|
|
94
107
|
{
|
|
95
108
|
key: "c_y_",
|
|
96
|
-
value: Math.round(
|
|
109
|
+
value: Math.round(g.y ?? 0)
|
|
97
110
|
}
|
|
98
111
|
]
|
|
99
112
|
].filter((n) => n.value !== void 0 && n.value !== null).map((n) => ({
|
|
@@ -105,56 +118,56 @@ function J({
|
|
|
105
118
|
value: "pixel"
|
|
106
119
|
}
|
|
107
120
|
];
|
|
108
|
-
|
|
121
|
+
m.forEach(({ key: n, value: $ }, B) => {
|
|
109
122
|
const ot = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(n);
|
|
110
|
-
r += `${n}${ot ? Math.round(Number($)) : $}${B <
|
|
123
|
+
r += `${n}${ot ? Math.round(Number($)) : $}${B < m.length - 1 ? "," : ""}`;
|
|
111
124
|
}), r += "/";
|
|
112
125
|
}
|
|
113
|
-
if (
|
|
126
|
+
if (x === c.Rotate && ([
|
|
114
127
|
{
|
|
115
128
|
key: "r_a_",
|
|
116
|
-
value:
|
|
129
|
+
value: g.rotation
|
|
117
130
|
}
|
|
118
131
|
].filter((n) => n.value !== void 0).map((n) => ({
|
|
119
132
|
key: n.key,
|
|
120
133
|
value: Math.round(Number(n.value))
|
|
121
134
|
})).forEach(({ key: n, value: $ }) => {
|
|
122
135
|
r += `${n}${$}`;
|
|
123
|
-
}), r += "/"),
|
|
124
|
-
const
|
|
136
|
+
}), r += "/"), x === c.Quality) {
|
|
137
|
+
const m = [
|
|
125
138
|
{
|
|
126
139
|
key: "q_level_",
|
|
127
|
-
value:
|
|
140
|
+
value: g.quality
|
|
128
141
|
}
|
|
129
142
|
].filter((n) => n.value !== void 0).map((n) => ({
|
|
130
143
|
key: n.key,
|
|
131
144
|
value: Math.round(Number(n.value))
|
|
132
145
|
}));
|
|
133
|
-
|
|
134
|
-
r += `${n}${$}${B <
|
|
146
|
+
m.forEach(({ key: n, value: $ }, B) => {
|
|
147
|
+
r += `${n}${$}${B < m.length - 1 ? "," : ""}`;
|
|
135
148
|
}), r += "/";
|
|
136
149
|
}
|
|
137
|
-
if (
|
|
138
|
-
const
|
|
150
|
+
if (x === c.Metadata) {
|
|
151
|
+
const m = [
|
|
139
152
|
{
|
|
140
153
|
key: "fl_keep_metadata",
|
|
141
|
-
value:
|
|
154
|
+
value: g.keepMetadata
|
|
142
155
|
}
|
|
143
156
|
].filter((n) => n.value !== void 0).map((n) => ({ key: n.key, value: n.value }));
|
|
144
|
-
|
|
145
|
-
r += `${n}${$ <
|
|
157
|
+
m.forEach(({ key: n }, $) => {
|
|
158
|
+
r += `${n}${$ < m.length - 1 ? "," : ""}`;
|
|
146
159
|
}), r += "/";
|
|
147
160
|
}
|
|
148
161
|
}), i && (r += `${t?.identifier}${i}`);
|
|
149
|
-
const
|
|
150
|
-
return s && s.length > 0 && s.forEach(({ key:
|
|
151
|
-
|
|
152
|
-
`${encodeURIComponent(
|
|
162
|
+
const w = [];
|
|
163
|
+
return s && s.length > 0 && s.forEach(({ key: x, value: g }) => {
|
|
164
|
+
w.push(
|
|
165
|
+
`${encodeURIComponent(x.trim())}=${encodeURIComponent(g.trim())}`
|
|
153
166
|
);
|
|
154
|
-
}),
|
|
167
|
+
}), w.length > 0 && (r += `?${w.join("&")}`), r.endsWith("/") && (r = r.slice(0, -1)), r;
|
|
155
168
|
}
|
|
156
169
|
const gt = D`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}`;
|
|
157
|
-
var mt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor,
|
|
170
|
+
var mt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, f = (t, e, i, s) => {
|
|
158
171
|
for (var a = s > 1 ? void 0 : s ? xt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
|
|
159
172
|
(r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
|
|
160
173
|
return s && a && mt(e, i, a), a;
|
|
@@ -428,82 +441,82 @@ u.dependencies = {
|
|
|
428
441
|
"cx-space": H,
|
|
429
442
|
"cx-typography": W
|
|
430
443
|
};
|
|
431
|
-
|
|
444
|
+
f([
|
|
432
445
|
T(".details")
|
|
433
446
|
], u.prototype, "base", 2);
|
|
434
|
-
|
|
447
|
+
f([
|
|
435
448
|
l({ reflect: !0, type: Boolean })
|
|
436
449
|
], u.prototype, "open", 2);
|
|
437
|
-
|
|
450
|
+
f([
|
|
438
451
|
l({ reflect: !0, type: Number })
|
|
439
452
|
], u.prototype, "width", 2);
|
|
440
|
-
|
|
453
|
+
f([
|
|
441
454
|
l({ reflect: !0, type: Number })
|
|
442
455
|
], u.prototype, "height", 2);
|
|
443
|
-
|
|
456
|
+
f([
|
|
444
457
|
l({ attribute: "max-width", reflect: !0, type: Number })
|
|
445
458
|
], u.prototype, "maxWidth", 2);
|
|
446
|
-
|
|
459
|
+
f([
|
|
447
460
|
l({ attribute: "max-height", reflect: !0, type: Number })
|
|
448
461
|
], u.prototype, "maxHeight", 2);
|
|
449
|
-
|
|
462
|
+
f([
|
|
450
463
|
l({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
451
464
|
], u.prototype, "ratioWidth", 2);
|
|
452
|
-
|
|
465
|
+
f([
|
|
453
466
|
l({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
454
467
|
], u.prototype, "ratioHeight", 2);
|
|
455
|
-
|
|
468
|
+
f([
|
|
456
469
|
l({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
457
470
|
], u.prototype, "percentageWidth", 2);
|
|
458
|
-
|
|
471
|
+
f([
|
|
459
472
|
l({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
460
473
|
], u.prototype, "percentageHeight", 2);
|
|
461
|
-
|
|
474
|
+
f([
|
|
462
475
|
l({ reflect: !0, type: String })
|
|
463
476
|
], u.prototype, "unit", 2);
|
|
464
|
-
|
|
477
|
+
f([
|
|
465
478
|
l({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
466
479
|
], u.prototype, "disabledApply", 2);
|
|
467
|
-
|
|
480
|
+
f([
|
|
468
481
|
l({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
469
482
|
], u.prototype, "lastAppliedSetting", 2);
|
|
470
|
-
|
|
483
|
+
f([
|
|
471
484
|
l({ reflect: !0, type: Boolean })
|
|
472
485
|
], u.prototype, "loading", 2);
|
|
473
|
-
|
|
486
|
+
f([
|
|
474
487
|
l({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
475
488
|
], u.prototype, "cropModes", 2);
|
|
476
|
-
|
|
489
|
+
f([
|
|
477
490
|
l({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
478
491
|
], u.prototype, "focusModes", 2);
|
|
479
|
-
|
|
492
|
+
f([
|
|
480
493
|
l({ attribute: "focus-mode", reflect: !0, type: String })
|
|
481
494
|
], u.prototype, "focusMode", 2);
|
|
482
|
-
|
|
495
|
+
f([
|
|
483
496
|
l({ attribute: "crop-mode", reflect: !0, type: String })
|
|
484
497
|
], u.prototype, "cropMode", 2);
|
|
485
|
-
|
|
498
|
+
f([
|
|
486
499
|
l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
487
500
|
], u.prototype, "keepAspectRatio", 2);
|
|
488
|
-
|
|
501
|
+
f([
|
|
489
502
|
z()
|
|
490
503
|
], u.prototype, "invalidWidth", 2);
|
|
491
|
-
|
|
504
|
+
f([
|
|
492
505
|
z()
|
|
493
506
|
], u.prototype, "invalidHeight", 2);
|
|
494
|
-
|
|
507
|
+
f([
|
|
495
508
|
z()
|
|
496
509
|
], u.prototype, "aspectRatio", 2);
|
|
497
|
-
|
|
510
|
+
f([
|
|
498
511
|
k("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
499
512
|
k("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
500
513
|
k("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
501
514
|
k("keepAspectRatio")
|
|
502
515
|
], u.prototype, "handleCropModeChange", 1);
|
|
503
|
-
|
|
516
|
+
f([
|
|
504
517
|
k("open")
|
|
505
518
|
], u.prototype, "handleOpenChange", 1);
|
|
506
|
-
u =
|
|
519
|
+
u = f([
|
|
507
520
|
N("cx-asset-link-format-crop")
|
|
508
521
|
], u);
|
|
509
522
|
const ft = D`.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%}}`;
|
|
@@ -738,7 +751,7 @@ var At = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, S = (t, e,
|
|
|
738
751
|
(r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
|
|
739
752
|
return s && a && At(e, i, a), a;
|
|
740
753
|
};
|
|
741
|
-
let
|
|
754
|
+
let v = class extends F {
|
|
742
755
|
constructor() {
|
|
743
756
|
super(...arguments), this.localize = new O(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
|
|
744
757
|
[o.Pixel]: { height: 0, width: 0 },
|
|
@@ -885,8 +898,8 @@ let f = class extends F {
|
|
|
885
898
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
886
899
|
}
|
|
887
900
|
};
|
|
888
|
-
|
|
889
|
-
|
|
901
|
+
v.styles = [E, Ct];
|
|
902
|
+
v.dependencies = {
|
|
890
903
|
"cx-button": q,
|
|
891
904
|
"cx-details": L,
|
|
892
905
|
"cx-icon": j,
|
|
@@ -899,61 +912,61 @@ f.dependencies = {
|
|
|
899
912
|
};
|
|
900
913
|
S([
|
|
901
914
|
T(".details")
|
|
902
|
-
],
|
|
915
|
+
], v.prototype, "base", 2);
|
|
903
916
|
S([
|
|
904
917
|
l({ reflect: !0, type: Boolean })
|
|
905
|
-
],
|
|
918
|
+
], v.prototype, "open", 2);
|
|
906
919
|
S([
|
|
907
920
|
l({ reflect: !0, type: Number })
|
|
908
|
-
],
|
|
921
|
+
], v.prototype, "width", 2);
|
|
909
922
|
S([
|
|
910
923
|
l({ reflect: !0, type: Number })
|
|
911
|
-
],
|
|
924
|
+
], v.prototype, "height", 2);
|
|
912
925
|
S([
|
|
913
926
|
l({ attribute: "max-width", reflect: !0, type: Number })
|
|
914
|
-
],
|
|
927
|
+
], v.prototype, "maxWidth", 2);
|
|
915
928
|
S([
|
|
916
929
|
l({ attribute: "max-height", reflect: !0, type: Number })
|
|
917
|
-
],
|
|
930
|
+
], v.prototype, "maxHeight", 2);
|
|
918
931
|
S([
|
|
919
932
|
l({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
920
|
-
],
|
|
933
|
+
], v.prototype, "ratioWidth", 2);
|
|
921
934
|
S([
|
|
922
935
|
l({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
923
|
-
],
|
|
936
|
+
], v.prototype, "ratioHeight", 2);
|
|
924
937
|
S([
|
|
925
938
|
l({ reflect: !0, type: String })
|
|
926
|
-
],
|
|
939
|
+
], v.prototype, "unit", 2);
|
|
927
940
|
S([
|
|
928
941
|
l({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
929
|
-
],
|
|
942
|
+
], v.prototype, "lastAppliedSetting", 2);
|
|
930
943
|
S([
|
|
931
944
|
l({ reflect: !0, type: Boolean })
|
|
932
|
-
],
|
|
945
|
+
], v.prototype, "loading", 2);
|
|
933
946
|
S([
|
|
934
947
|
l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
935
|
-
],
|
|
948
|
+
], v.prototype, "keepAspectRatio", 2);
|
|
936
949
|
S([
|
|
937
950
|
z()
|
|
938
|
-
],
|
|
951
|
+
], v.prototype, "invalidWidth", 2);
|
|
939
952
|
S([
|
|
940
953
|
z()
|
|
941
|
-
],
|
|
954
|
+
], v.prototype, "invalidHeight", 2);
|
|
942
955
|
S([
|
|
943
956
|
z()
|
|
944
|
-
],
|
|
957
|
+
], v.prototype, "aspectRatio", 2);
|
|
945
958
|
S([
|
|
946
959
|
k("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
947
960
|
k("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
948
961
|
k("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
949
962
|
k("keepAspectRatio")
|
|
950
|
-
],
|
|
963
|
+
], v.prototype, "handleCropModeChange", 1);
|
|
951
964
|
S([
|
|
952
965
|
k("open")
|
|
953
|
-
],
|
|
954
|
-
|
|
966
|
+
], v.prototype, "handleOpenChange", 1);
|
|
967
|
+
v = S([
|
|
955
968
|
N("cx-asset-link-format-resize")
|
|
956
|
-
],
|
|
969
|
+
], v);
|
|
957
970
|
const Mt = D`cx-details::part(base){border-bottom-width:0}`;
|
|
958
971
|
var _t = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, V = (t, e, i, s) => {
|
|
959
972
|
for (var a = s > 1 ? void 0 : s ? Pt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
|
|
@@ -1488,14 +1501,14 @@ let p = class extends F {
|
|
|
1488
1501
|
const i = this.proxies?.find((s) => s.id === t);
|
|
1489
1502
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
1490
1503
|
if (s.key === c.Crop) {
|
|
1491
|
-
const a = s.value, h = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight,
|
|
1504
|
+
const a = s.value, h = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight, y = a.x / i.formatWidth * e.formatWidth, w = a.y / i.formatHeight * e.formatHeight;
|
|
1492
1505
|
return {
|
|
1493
1506
|
...s,
|
|
1494
1507
|
value: {
|
|
1495
1508
|
height: r,
|
|
1496
1509
|
width: h,
|
|
1497
|
-
x:
|
|
1498
|
-
y
|
|
1510
|
+
x: y,
|
|
1511
|
+
y: w
|
|
1499
1512
|
}
|
|
1500
1513
|
};
|
|
1501
1514
|
}
|
|
@@ -1572,31 +1585,31 @@ let p = class extends F {
|
|
|
1572
1585
|
percentageHeight: a,
|
|
1573
1586
|
percentageWidth: h,
|
|
1574
1587
|
ratioHeight: r,
|
|
1575
|
-
ratioWidth:
|
|
1576
|
-
unit:
|
|
1577
|
-
useCropMode:
|
|
1578
|
-
width:
|
|
1588
|
+
ratioWidth: y,
|
|
1589
|
+
unit: w,
|
|
1590
|
+
useCropMode: x,
|
|
1591
|
+
width: g
|
|
1579
1592
|
}) {
|
|
1580
1593
|
if (!this.selectedFormat?.url || e === "manual")
|
|
1581
1594
|
return;
|
|
1582
1595
|
this.loading = !0, this.lastAction = c.Crop;
|
|
1583
|
-
const
|
|
1596
|
+
const m = await this.apiGetCropFocusMode({
|
|
1584
1597
|
autoCropMode: e,
|
|
1585
1598
|
cropHeight: i,
|
|
1586
|
-
cropWidth:
|
|
1599
|
+
cropWidth: g,
|
|
1587
1600
|
imageUrl: this.selectedFormat.url
|
|
1588
1601
|
});
|
|
1589
|
-
if (
|
|
1602
|
+
if (m) {
|
|
1590
1603
|
let n = a, $ = h;
|
|
1591
|
-
i || (n =
|
|
1604
|
+
i || (n = m.height * 100 / this.selectedFormat.height), g || ($ = m.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
1592
1605
|
...this.cropSize,
|
|
1593
|
-
height:
|
|
1606
|
+
height: m.height,
|
|
1594
1607
|
percentageHeight: n ?? this.cropSize.percentageHeight,
|
|
1595
1608
|
percentageWidth: $ ?? this.cropSize.percentageWidth,
|
|
1596
|
-
width:
|
|
1597
|
-
x:
|
|
1598
|
-
y:
|
|
1599
|
-
...
|
|
1609
|
+
width: m.width,
|
|
1610
|
+
x: m.x * 100 / this.selectedFormat.width,
|
|
1611
|
+
y: m.y * 100 / this.selectedFormat.height,
|
|
1612
|
+
...x ? {
|
|
1600
1613
|
cropMode: e,
|
|
1601
1614
|
focusMode: "manual",
|
|
1602
1615
|
keepAspectRatio: !1
|
|
@@ -1606,8 +1619,8 @@ let p = class extends F {
|
|
|
1606
1619
|
},
|
|
1607
1620
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
1608
1621
|
ratioHeight: r ?? this.cropSize.ratioHeight,
|
|
1609
|
-
ratioWidth:
|
|
1610
|
-
unit:
|
|
1622
|
+
ratioWidth: y ?? this.cropSize.ratioWidth,
|
|
1623
|
+
unit: w ?? this.cropSize.unit
|
|
1611
1624
|
};
|
|
1612
1625
|
}
|
|
1613
1626
|
this.loading = !1, this.lastAction = void 0;
|
|
@@ -1618,26 +1631,26 @@ let p = class extends F {
|
|
|
1618
1631
|
width: s,
|
|
1619
1632
|
x: a,
|
|
1620
1633
|
y: h
|
|
1621
|
-
} = e, r = this.cropSize.percentageWidth !== s,
|
|
1622
|
-
let
|
|
1623
|
-
r && (
|
|
1634
|
+
} = e, r = this.cropSize.percentageWidth !== s, y = this.cropSize.percentageHeight !== i;
|
|
1635
|
+
let w = this.cropSize.height, x = this.cropSize.width;
|
|
1636
|
+
r && (x = Math.round(s * this.selectedFormat.width / 100)), y && (w = Math.round(
|
|
1624
1637
|
i * this.selectedFormat.height / 100
|
|
1625
1638
|
));
|
|
1626
|
-
const
|
|
1639
|
+
const g = this.cropSize.focusMode;
|
|
1627
1640
|
this.focusModes.find(
|
|
1628
|
-
(n) => n.value ===
|
|
1641
|
+
(n) => n.value === g
|
|
1629
1642
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
1630
|
-
focusMode:
|
|
1631
|
-
height:
|
|
1643
|
+
focusMode: g,
|
|
1644
|
+
height: w,
|
|
1632
1645
|
percentageHeight: i,
|
|
1633
1646
|
percentageWidth: s,
|
|
1634
|
-
width:
|
|
1647
|
+
width: x
|
|
1635
1648
|
}) : this.cropSize = {
|
|
1636
1649
|
...this.cropSize,
|
|
1637
|
-
height:
|
|
1650
|
+
height: w,
|
|
1638
1651
|
percentageHeight: i,
|
|
1639
1652
|
percentageWidth: s,
|
|
1640
|
-
width:
|
|
1653
|
+
width: x,
|
|
1641
1654
|
x: a,
|
|
1642
1655
|
y: h
|
|
1643
1656
|
};
|
|
@@ -1673,10 +1686,10 @@ let p = class extends F {
|
|
|
1673
1686
|
});
|
|
1674
1687
|
else {
|
|
1675
1688
|
const s = this.focusModes.find(
|
|
1676
|
-
(
|
|
1689
|
+
(w) => w.value === this.cropSize.focusMode
|
|
1677
1690
|
)?.auto;
|
|
1678
|
-
let a = this.cropSize.keepAspectRatio, h = this.cropSize.focusMode, r = this.cropSize.x,
|
|
1679
|
-
e === "free" ? (a = !1, h = "manual") : this.cropSize.unit === o.Pixel && !s && (r = 0,
|
|
1691
|
+
let a = this.cropSize.keepAspectRatio, h = this.cropSize.focusMode, r = this.cropSize.x, y = this.cropSize.y;
|
|
1692
|
+
e === "free" ? (a = !1, h = "manual") : this.cropSize.unit === o.Pixel && !s && (r = 0, y = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
1680
1693
|
cropMode: e,
|
|
1681
1694
|
focusMode: h,
|
|
1682
1695
|
height: this.cropSize.height,
|
|
@@ -1688,7 +1701,7 @@ let p = class extends F {
|
|
|
1688
1701
|
focusMode: h,
|
|
1689
1702
|
keepAspectRatio: a,
|
|
1690
1703
|
x: r,
|
|
1691
|
-
y
|
|
1704
|
+
y
|
|
1692
1705
|
};
|
|
1693
1706
|
}
|
|
1694
1707
|
}
|
|
@@ -1713,14 +1726,14 @@ let p = class extends F {
|
|
|
1713
1726
|
Math.max(Math.round(s / i), 0),
|
|
1714
1727
|
this.resizeSize.height
|
|
1715
1728
|
), h = a * 100 / this.selectedFormat.height, r = s * 100 / this.selectedFormat.width;
|
|
1716
|
-
let
|
|
1717
|
-
|
|
1718
|
-
let
|
|
1729
|
+
let y = this.cropSize.x, w = this.cropSize.y;
|
|
1730
|
+
y + r > 100 && (y = 100 - r), w + h > 100 && (w = 100 - h);
|
|
1731
|
+
let x = this.cropSize.cropMode;
|
|
1719
1732
|
this.cropModes.find(
|
|
1720
|
-
(
|
|
1721
|
-
)?.auto && (
|
|
1733
|
+
(m) => m.value === x
|
|
1734
|
+
)?.auto && (x = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = h, this.cropSize.percentageWidth = r, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
1722
1735
|
...this.cropSize,
|
|
1723
|
-
cropMode:
|
|
1736
|
+
cropMode: x,
|
|
1724
1737
|
height: a,
|
|
1725
1738
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
1726
1739
|
percentageHeight: h,
|
|
@@ -1729,18 +1742,18 @@ let p = class extends F {
|
|
|
1729
1742
|
ratioWidth: t.detail.width,
|
|
1730
1743
|
unit: o.AspectRatio,
|
|
1731
1744
|
width: s,
|
|
1732
|
-
x:
|
|
1733
|
-
y
|
|
1745
|
+
x: y,
|
|
1746
|
+
y: w
|
|
1734
1747
|
};
|
|
1735
1748
|
} else {
|
|
1736
1749
|
const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
|
|
1737
1750
|
let a = this.cropSize.x, h = this.cropSize.y;
|
|
1738
1751
|
a + s > 100 && (a = 100 - s), h + i > 100 && (h = 100 - i);
|
|
1739
1752
|
let r = this.cropSize.cropMode;
|
|
1740
|
-
const
|
|
1741
|
-
(
|
|
1753
|
+
const y = this.cropModes.find(
|
|
1754
|
+
(w) => w.value === r
|
|
1742
1755
|
)?.auto;
|
|
1743
|
-
(t.detail.breakAspectRatio ||
|
|
1756
|
+
(t.detail.breakAspectRatio || y) && (r = "free"), t.detail.silent ? (this.cropSize.cropMode = r, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = h) : this.cropSize = {
|
|
1744
1757
|
...this.cropSize,
|
|
1745
1758
|
cropMode: r,
|
|
1746
1759
|
height: t.detail.height,
|
|
@@ -1785,7 +1798,7 @@ let p = class extends F {
|
|
|
1785
1798
|
}
|
|
1786
1799
|
];
|
|
1787
1800
|
else {
|
|
1788
|
-
const
|
|
1801
|
+
const y = this.cropSize.x / 100 * this.selectedFormat.width, w = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
1789
1802
|
this.transformations = [
|
|
1790
1803
|
...this.transformations,
|
|
1791
1804
|
{
|
|
@@ -1794,8 +1807,8 @@ let p = class extends F {
|
|
|
1794
1807
|
height: r,
|
|
1795
1808
|
unit: s,
|
|
1796
1809
|
width: h,
|
|
1797
|
-
x:
|
|
1798
|
-
y
|
|
1810
|
+
x: y,
|
|
1811
|
+
y: w
|
|
1799
1812
|
}
|
|
1800
1813
|
}
|
|
1801
1814
|
];
|
|
@@ -1840,13 +1853,13 @@ let p = class extends F {
|
|
|
1840
1853
|
const { height: e, unit: i, width: s } = t.detail;
|
|
1841
1854
|
this.lastAction = c.Resize;
|
|
1842
1855
|
const a = this.selectedFormat.width || this.defaultSize.width, h = this.selectedFormat.height || this.defaultSize.height;
|
|
1843
|
-
let r = s,
|
|
1844
|
-
this.resizeSize.unit !== i ? (r = a,
|
|
1856
|
+
let r = s, y = e;
|
|
1857
|
+
this.resizeSize.unit !== i ? (r = a, y = h) : i === o.AspectRatio && (r = Math.round(s / e * h), y = h), this.transformations = [
|
|
1845
1858
|
...this.transformations,
|
|
1846
1859
|
{
|
|
1847
1860
|
key: c.Resize,
|
|
1848
1861
|
value: {
|
|
1849
|
-
height:
|
|
1862
|
+
height: y,
|
|
1850
1863
|
unit: i,
|
|
1851
1864
|
width: r
|
|
1852
1865
|
}
|
|
@@ -1942,7 +1955,7 @@ p.dependencies = {
|
|
|
1942
1955
|
"cx-asset-link-format-metadata": P,
|
|
1943
1956
|
"cx-asset-link-format-proxy": C,
|
|
1944
1957
|
"cx-asset-link-format-quality": A,
|
|
1945
|
-
"cx-asset-link-format-resize":
|
|
1958
|
+
"cx-asset-link-format-resize": v,
|
|
1946
1959
|
"cx-asset-link-format-rotation": R,
|
|
1947
1960
|
"cx-button": q,
|
|
1948
1961
|
"cx-space": H,
|
|
@@ -70,7 +70,7 @@ import { default as ka } from "./stepper.js";
|
|
|
70
70
|
import { default as Ea } from "./switch.js";
|
|
71
71
|
import { default as La } from "./tab.js";
|
|
72
72
|
import { C as ja } from "../chunks/tab-group.B6olTWpV.js";
|
|
73
|
-
import { C as za } from "../chunks/table.
|
|
73
|
+
import { C as za } from "../chunks/table.CGTmaN_x.js";
|
|
74
74
|
import { default as qa } from "./tab-panel.js";
|
|
75
75
|
import { default as Ka } from "./tag.js";
|
|
76
76
|
import { default as Wa } from "./textarea.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./space.js";
|
|
2
|
-
import "../chunks/table.
|
|
2
|
+
import "../chunks/table.CGTmaN_x.js";
|
|
3
3
|
import "../chunks/typography.DJC_UXgs.js";
|
|
4
4
|
import "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
5
5
|
import "../chunks/color-swatch.hsIcIXE-.js";
|
|
6
6
|
import "../chunks/component.styles.CRO4Odto.js";
|
|
7
|
-
import { C as w } from "../chunks/color-swatch-group.
|
|
7
|
+
import { C as w } from "../chunks/color-swatch-group.BaMEIlzq.js";
|
|
8
8
|
import "../chunks/content-builder.B4Tqoc6M.js";
|
|
9
9
|
import "../chunks/custom-element.L4WJXn1j.js";
|
|
10
10
|
import "../chunks/debounce.DaHuiSGU.js";
|