@orangelogic/design-system 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{asset-link-format.C5Ue4EGP.js → asset-link-format.DTLA2CFh.js} +407 -388
- package/library/chunks/{button.DbAUlIXG.js → button.cbDkxJHn.js} +1 -1
- package/library/chunks/{color-swatch-group.B10yWbVM.js → color-swatch-group.CZSeCrot.js} +7 -7
- package/library/chunks/{confirm-popover.Cd4HM5-B.js → confirm-popover.Dvgoz-oA.js} +3 -3
- package/library/chunks/{dialog.CXphbq8N.js → dialog.BvSMV36r.js} +2 -2
- package/library/chunks/{document-viewer.B_ESlazf.js → document-viewer.BLdEjbza.js} +7 -7
- package/library/chunks/{dot-pagination.CzT-MZmt.js → dot-pagination.CukHxNBk.js} +1 -1
- package/library/chunks/{folder-select.BWeanVkA.js → folder-select.DAZQRdLq.js} +4 -4
- package/library/chunks/{header.Dy57RuQW.js → header.2RH_nPmz.js} +1 -1
- package/library/chunks/{i18n.Q5_2aVLU.js → i18n.BSPmBQ73.js} +1 -0
- package/library/chunks/{icon-button.BjAbCuH8.js → icon-button.DV5Fks8j.js} +1 -1
- package/library/chunks/{iframe.CdktjPCB.js → iframe.ddX2kGu3.js} +1 -1
- package/library/chunks/{image.CCo__54F.js → image.BM7bPTub.js} +174 -143
- package/library/chunks/{index.DiZGZkHv.js → index.DKKvxBAi.js} +70 -66
- package/library/chunks/{input.ftEf4GS6.js → input.7pumTpdu.js} +1 -1
- package/library/chunks/{markdown.RljldBNb.js → markdown.LHSzm035.js} +2 -2
- package/library/chunks/{menu-item.BNs1Ji48.js → menu-item.CqPvDGeN.js} +1 -1
- package/library/chunks/{option.C8IEnv5Q.js → option.dBUWN4sF.js} +1 -1
- package/library/chunks/{pagination.Bke9vgl4.js → pagination.C2f8lUVb.js} +5 -5
- package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
- package/library/chunks/{tab-group.DZ32f41G.js → tab-group.DOnaT12G.js} +4 -4
- package/library/chunks/{tree.Umn7TAkc.js → tree.CHQ1WjZV.js} +1 -1
- package/library/chunks/{types.BW36Gr9c.js → types.PdpKNndx.js} +2519 -2411
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +15 -15
- package/library/components/audio.js +3 -3
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +6 -6
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -3
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +2 -2
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +21 -21
- package/library/components/video.js +1341 -1294
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +16 -0
- package/library/packages/atoms/src/components/video/video.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +10 -3
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +6 -0
- package/library/packages/types/src/content-builder.d.ts +6 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/react-web-component.d.ts +4 -0
- package/library/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { r as $e, R as
|
|
1
|
+
import { r as $e, R as je, H as K, a as ie, b as oe } from "./resizable-component.styles.kMFDlGgv.js";
|
|
2
2
|
import { c as He } from "./component.styles.CAS3c9pM.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import { P as
|
|
5
|
-
import { c as
|
|
3
|
+
import { a as re } from "./index.Cpamj0jB.js";
|
|
4
|
+
import { P as Ae } from "./position-picker.qkbJlboF.js";
|
|
5
|
+
import { c as Te } from "./custom-element.L4WJXn1j.js";
|
|
6
6
|
import { d as Oe } from "./debounce.DaHuiSGU.js";
|
|
7
|
-
import { L as Ze } from "./i18n.
|
|
7
|
+
import { L as Ze } from "./i18n.BSPmBQ73.js";
|
|
8
8
|
import { w as M } from "./watch.DJF5K-8U.js";
|
|
9
9
|
import { a as Ie } from "./url.CGdWC06g.js";
|
|
10
|
-
import { i as
|
|
10
|
+
import { i as he, E as X, x as R } from "./lit-element.jLBm65_O.js";
|
|
11
11
|
import { n as p } from "./lib-cortex-element.CVMmyPMC.js";
|
|
12
12
|
import { r as E } from "./state.CSDxrqLd.js";
|
|
13
13
|
import { e as G } from "./query.BBf1UFkC.js";
|
|
14
|
-
import { e as
|
|
15
|
-
import { o as
|
|
14
|
+
import { e as L } from "./class-map.BiVq-cVR.js";
|
|
15
|
+
import { o as S } from "./if-defined.BRoBj_Rp.js";
|
|
16
16
|
import { i as Me } from "./keyed.DdOUTIg-.js";
|
|
17
17
|
import { o as Pe } from "./style-map.llVFPd__.js";
|
|
18
|
-
import { n as
|
|
18
|
+
import { n as A } from "./when.Dr1es41R.js";
|
|
19
19
|
import { C as Fe } from "./icon.BLXWp6CU.js";
|
|
20
20
|
import _e from "../components/popup.js";
|
|
21
21
|
import Ne from "../components/resize-observer.js";
|
|
22
22
|
import We from "../components/skeleton.js";
|
|
23
23
|
import Be from "../components/space.js";
|
|
24
|
-
var I = /* @__PURE__ */ ((
|
|
24
|
+
var I = /* @__PURE__ */ ((e) => (e.Automatic = "automatic", e.Manual = "manual", e))(I || {});
|
|
25
25
|
/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
|
|
26
|
-
var
|
|
27
|
-
for (var
|
|
28
|
-
var o = arguments[
|
|
26
|
+
var $ = Object.assign || function(e) {
|
|
27
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
+
var o = arguments[i];
|
|
29
29
|
for (var h in o)
|
|
30
|
-
Object.prototype.hasOwnProperty.call(o, h) && (
|
|
31
|
-
}
|
|
32
|
-
return
|
|
33
|
-
}, W = function(
|
|
34
|
-
return
|
|
35
|
-
}, Ue = function(
|
|
36
|
-
return NodeList.prototype.isPrototypeOf(
|
|
37
|
-
}, B = function(
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
var o =
|
|
30
|
+
Object.prototype.hasOwnProperty.call(o, h) && (e[h] = o[h]);
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
33
|
+
}, W = function(i) {
|
|
34
|
+
return i.tagName === "IMG";
|
|
35
|
+
}, Ue = function(i) {
|
|
36
|
+
return NodeList.prototype.isPrototypeOf(i);
|
|
37
|
+
}, B = function(i) {
|
|
38
|
+
return i && i.nodeType === 1;
|
|
39
|
+
}, ae = function(i) {
|
|
40
|
+
var o = i.currentSrc || i.src;
|
|
41
41
|
return o.substr(-4).toLowerCase() === ".svg";
|
|
42
|
-
}, ne = function(
|
|
42
|
+
}, ne = function(i) {
|
|
43
43
|
try {
|
|
44
|
-
return Array.isArray(
|
|
44
|
+
return Array.isArray(i) ? i.filter(W) : Ue(i) ? [].slice.call(i).filter(W) : B(i) ? [i].filter(W) : typeof i == "string" ? [].slice.call(document.querySelectorAll(i)).filter(W) : [];
|
|
45
45
|
} catch {
|
|
46
46
|
throw new TypeError(`The provided selector is invalid.
|
|
47
47
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
48
48
|
See: https://github.com/francoischalifour/medium-zoom`);
|
|
49
49
|
}
|
|
50
|
-
}, De = function(
|
|
50
|
+
}, De = function(i) {
|
|
51
51
|
var o = document.createElement("div");
|
|
52
|
-
return o.classList.add("medium-zoom-overlay"), o.style.background =
|
|
53
|
-
}, qe = function(
|
|
54
|
-
var o =
|
|
52
|
+
return o.classList.add("medium-zoom-overlay"), o.style.background = i, o;
|
|
53
|
+
}, qe = function(i) {
|
|
54
|
+
var o = i.getBoundingClientRect(), h = o.top, d = o.left, C = o.width, k = o.height, z = i.cloneNode(), U = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, P = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
55
55
|
return z.removeAttribute("id"), z.style.position = "absolute", z.style.top = h + U + "px", z.style.left = d + P + "px", z.style.width = C + "px", z.style.height = k + "px", z.style.transform = "", z;
|
|
56
|
-
},
|
|
57
|
-
var h =
|
|
56
|
+
}, T = function(i, o) {
|
|
57
|
+
var h = $({
|
|
58
58
|
bubbles: !1,
|
|
59
59
|
cancelable: !1,
|
|
60
60
|
detail: void 0
|
|
61
61
|
}, o);
|
|
62
62
|
if (typeof window.CustomEvent == "function")
|
|
63
|
-
return new CustomEvent(
|
|
63
|
+
return new CustomEvent(i, h);
|
|
64
64
|
var d = document.createEvent("CustomEvent");
|
|
65
|
-
return d.initCustomEvent(
|
|
66
|
-
}, Ve = function i
|
|
65
|
+
return d.initCustomEvent(i, h.bubbles, h.cancelable, h.detail), d;
|
|
66
|
+
}, Ve = function e(i) {
|
|
67
67
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = window.Promise || function(r) {
|
|
68
68
|
function n() {
|
|
69
69
|
}
|
|
@@ -76,7 +76,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
76
76
|
}
|
|
77
77
|
y.indexOf(n) !== -1 && Q({ target: n });
|
|
78
78
|
}, C = function() {
|
|
79
|
-
if (!(j || !
|
|
79
|
+
if (!(j || !t.original)) {
|
|
80
80
|
var r = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
81
81
|
Math.abs(ee - r) > c.scrollOffset && setTimeout(x, 150);
|
|
82
82
|
}
|
|
@@ -85,18 +85,18 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
85
85
|
(n === "Escape" || n === "Esc" || n === 27) && x();
|
|
86
86
|
}, z = function() {
|
|
87
87
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r;
|
|
88
|
-
if (r.background && (_.style.background = r.background), r.container && r.container instanceof Object && (n.container =
|
|
88
|
+
if (r.background && (_.style.background = r.background), r.container && r.container instanceof Object && (n.container = $({}, c.container, r.container)), r.template) {
|
|
89
89
|
var m = B(r.template) ? r.template : document.querySelector(r.template);
|
|
90
90
|
n.template = m;
|
|
91
91
|
}
|
|
92
|
-
return c =
|
|
93
|
-
g.dispatchEvent(
|
|
92
|
+
return c = $({}, c, n), y.forEach(function(g) {
|
|
93
|
+
g.dispatchEvent(T("medium-zoom:update", {
|
|
94
94
|
detail: { zoom: u }
|
|
95
95
|
}));
|
|
96
96
|
}), u;
|
|
97
97
|
}, U = function() {
|
|
98
98
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
99
|
-
return
|
|
99
|
+
return e($({}, c, r));
|
|
100
100
|
}, P = function() {
|
|
101
101
|
for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
|
|
102
102
|
n[m] = arguments[m];
|
|
@@ -113,26 +113,26 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
113
113
|
w.addEventListener(v, b, H);
|
|
114
114
|
});
|
|
115
115
|
}), u;
|
|
116
|
-
},
|
|
116
|
+
}, me = function() {
|
|
117
117
|
for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
|
|
118
118
|
n[m] = arguments[m];
|
|
119
|
-
|
|
119
|
+
t.zoomed && x();
|
|
120
120
|
var g = n.length > 0 ? n.reduce(function(s, v) {
|
|
121
121
|
return [].concat(s, ne(v));
|
|
122
122
|
}, []) : y;
|
|
123
123
|
return g.forEach(function(s) {
|
|
124
|
-
s.classList.remove("medium-zoom-image"), s.dispatchEvent(
|
|
124
|
+
s.classList.remove("medium-zoom-image"), s.dispatchEvent(T("medium-zoom:detach", {
|
|
125
125
|
detail: { zoom: u }
|
|
126
126
|
}));
|
|
127
127
|
}), y = y.filter(function(s) {
|
|
128
128
|
return g.indexOf(s) === -1;
|
|
129
129
|
}), u;
|
|
130
|
-
},
|
|
130
|
+
}, ge = function(r, n) {
|
|
131
131
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
132
132
|
return y.forEach(function(g) {
|
|
133
133
|
g.addEventListener("medium-zoom:" + r, n, m);
|
|
134
134
|
}), F.push({ type: "medium-zoom:" + r, listener: n, options: m }), u;
|
|
135
|
-
},
|
|
135
|
+
}, ue = function(r, n) {
|
|
136
136
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
137
137
|
return y.forEach(function(g) {
|
|
138
138
|
g.removeEventListener("medium-zoom:" + r, n, m);
|
|
@@ -151,19 +151,19 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
151
151
|
}, v = void 0, b = void 0;
|
|
152
152
|
if (c.container)
|
|
153
153
|
if (c.container instanceof Object)
|
|
154
|
-
s =
|
|
154
|
+
s = $({}, s, c.container), v = s.width - s.left - s.right - c.margin * 2, b = s.height - s.top - s.bottom - c.margin * 2;
|
|
155
155
|
else {
|
|
156
|
-
var H = B(c.container) ? c.container : document.querySelector(c.container), w = H.getBoundingClientRect(), D = w.width,
|
|
157
|
-
s =
|
|
156
|
+
var H = B(c.container) ? c.container : document.querySelector(c.container), w = H.getBoundingClientRect(), D = w.width, ye = w.height, be = w.left, ze = w.top;
|
|
157
|
+
s = $({}, s, {
|
|
158
158
|
width: D,
|
|
159
|
-
height:
|
|
160
|
-
left:
|
|
161
|
-
top:
|
|
159
|
+
height: ye,
|
|
160
|
+
left: be,
|
|
161
|
+
top: ze
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
v = v || s.width - c.margin * 2, b = b || s.height - c.margin * 2;
|
|
165
|
-
var Z =
|
|
166
|
-
|
|
165
|
+
var Z = t.zoomedHd || t.original, xe = ae(Z) ? v : Z.naturalWidth || v, we = ae(Z) ? b : Z.naturalHeight || b, N = Z.getBoundingClientRect(), Ee = N.top, Ce = N.left, q = N.width, V = N.height, ke = Math.min(Math.max(q, xe), v) / q, Re = Math.min(Math.max(V, we), b) / V, Y = Math.min(ke, Re), Le = (-Ce + (v - q) / 2 + c.margin + s.left) / Y, Se = (-Ee + (b - V) / 2 + c.margin + s.top) / Y, te = "scale(" + Y + ") translate3d(" + Le + "px, " + Se + "px, 0)";
|
|
166
|
+
t.zoomed.style.transform = te, t.zoomedHd && (t.zoomedHd.style.transform = te);
|
|
167
167
|
};
|
|
168
168
|
return new h(function(g) {
|
|
169
169
|
if (n && y.indexOf(n) === -1) {
|
|
@@ -171,78 +171,78 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
var s = function D() {
|
|
174
|
-
j = !1,
|
|
174
|
+
j = !1, t.zoomed.removeEventListener("transitionend", D), t.original.dispatchEvent(T("medium-zoom:opened", {
|
|
175
175
|
detail: { zoom: u }
|
|
176
176
|
})), g(u);
|
|
177
177
|
};
|
|
178
|
-
if (
|
|
178
|
+
if (t.zoomed) {
|
|
179
179
|
g(u);
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
if (n)
|
|
183
|
-
|
|
183
|
+
t.original = n;
|
|
184
184
|
else if (y.length > 0) {
|
|
185
185
|
var v = y;
|
|
186
|
-
|
|
186
|
+
t.original = v[0];
|
|
187
187
|
} else {
|
|
188
188
|
g(u);
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
|
-
if (
|
|
191
|
+
if (t.original.dispatchEvent(T("medium-zoom:open", {
|
|
192
192
|
detail: { zoom: u }
|
|
193
|
-
})), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, j = !0,
|
|
193
|
+
})), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, j = !0, t.zoomed = qe(t.original), document.body.appendChild(_), c.template) {
|
|
194
194
|
var b = B(c.template) ? c.template : document.querySelector(c.template);
|
|
195
|
-
|
|
195
|
+
t.template = document.createElement("div"), t.template.appendChild(b.content.cloneNode(!0)), document.body.appendChild(t.template);
|
|
196
196
|
}
|
|
197
|
-
if (
|
|
197
|
+
if (t.original.parentElement && t.original.parentElement.tagName === "PICTURE" && t.original.currentSrc && (t.zoomed.src = t.original.currentSrc), document.body.appendChild(t.zoomed), window.requestAnimationFrame(function() {
|
|
198
198
|
document.body.classList.add("medium-zoom--opened");
|
|
199
|
-
}),
|
|
200
|
-
|
|
201
|
-
clearInterval(H), console.warn("Unable to reach the zoom image target " +
|
|
199
|
+
}), t.original.classList.add("medium-zoom-image--hidden"), t.zoomed.classList.add("medium-zoom-image--opened"), t.zoomed.addEventListener("click", x), t.zoomed.addEventListener("transitionend", s), t.original.getAttribute("data-zoom-src")) {
|
|
200
|
+
t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("srcset"), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading"), t.zoomedHd.src = t.zoomed.getAttribute("data-zoom-src"), t.zoomedHd.onerror = function() {
|
|
201
|
+
clearInterval(H), console.warn("Unable to reach the zoom image target " + t.zoomedHd.src), t.zoomedHd = null, m();
|
|
202
202
|
};
|
|
203
203
|
var H = setInterval(function() {
|
|
204
|
-
|
|
204
|
+
t.zoomedHd.complete && (clearInterval(H), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m());
|
|
205
205
|
}, 10);
|
|
206
|
-
} else if (
|
|
207
|
-
|
|
208
|
-
var w =
|
|
209
|
-
|
|
206
|
+
} else if (t.original.hasAttribute("srcset")) {
|
|
207
|
+
t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading");
|
|
208
|
+
var w = t.zoomedHd.addEventListener("load", function() {
|
|
209
|
+
t.zoomedHd.removeEventListener("load", w), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m();
|
|
210
210
|
});
|
|
211
211
|
} else
|
|
212
212
|
m();
|
|
213
213
|
});
|
|
214
214
|
}, x = function() {
|
|
215
215
|
return new h(function(r) {
|
|
216
|
-
if (j || !
|
|
216
|
+
if (j || !t.original) {
|
|
217
217
|
r(u);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
var n = function m() {
|
|
221
|
-
|
|
221
|
+
t.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(t.zoomed), t.zoomedHd && document.body.removeChild(t.zoomedHd), document.body.removeChild(_), t.zoomed.classList.remove("medium-zoom-image--opened"), t.template && document.body.removeChild(t.template), j = !1, t.zoomed.removeEventListener("transitionend", m), t.original.dispatchEvent(T("medium-zoom:closed", {
|
|
222
222
|
detail: { zoom: u }
|
|
223
|
-
})),
|
|
223
|
+
})), t.original = null, t.zoomed = null, t.zoomedHd = null, t.template = null, r(u);
|
|
224
224
|
};
|
|
225
|
-
j = !0, document.body.classList.remove("medium-zoom--opened"),
|
|
225
|
+
j = !0, document.body.classList.remove("medium-zoom--opened"), t.zoomed.style.transform = "", t.zoomedHd && (t.zoomedHd.style.transform = ""), t.template && (t.template.style.transition = "opacity 150ms", t.template.style.opacity = 0), t.original.dispatchEvent(T("medium-zoom:close", {
|
|
226
226
|
detail: { zoom: u }
|
|
227
|
-
})),
|
|
227
|
+
})), t.zoomed.addEventListener("transitionend", n);
|
|
228
228
|
});
|
|
229
229
|
}, Q = function() {
|
|
230
230
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r.target;
|
|
231
|
-
return
|
|
232
|
-
}, ue = function() {
|
|
233
|
-
return c;
|
|
231
|
+
return t.original ? x() : J({ target: n });
|
|
234
232
|
}, pe = function() {
|
|
235
|
-
return
|
|
233
|
+
return c;
|
|
236
234
|
}, fe = function() {
|
|
237
|
-
return
|
|
238
|
-
},
|
|
235
|
+
return y;
|
|
236
|
+
}, ve = function() {
|
|
237
|
+
return t.original;
|
|
238
|
+
}, y = [], F = [], j = !1, ee = 0, c = o, t = {
|
|
239
239
|
original: null,
|
|
240
240
|
zoomed: null,
|
|
241
241
|
zoomedHd: null,
|
|
242
242
|
template: null
|
|
243
243
|
// If the selector is omitted, it's replaced by the options
|
|
244
244
|
};
|
|
245
|
-
Object.prototype.toString.call(
|
|
245
|
+
Object.prototype.toString.call(i) === "[object Object]" ? c = i : (i || typeof i == "string") && P(i), c = $({
|
|
246
246
|
margin: 0,
|
|
247
247
|
background: "#fff",
|
|
248
248
|
scrollOffset: 40,
|
|
@@ -258,26 +258,26 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
258
258
|
update: z,
|
|
259
259
|
clone: U,
|
|
260
260
|
attach: P,
|
|
261
|
-
detach:
|
|
262
|
-
on:
|
|
263
|
-
off:
|
|
264
|
-
getOptions:
|
|
265
|
-
getImages:
|
|
266
|
-
getZoomedImage:
|
|
261
|
+
detach: me,
|
|
262
|
+
on: ge,
|
|
263
|
+
off: ue,
|
|
264
|
+
getOptions: pe,
|
|
265
|
+
getImages: fe,
|
|
266
|
+
getZoomedImage: ve
|
|
267
267
|
};
|
|
268
268
|
return u;
|
|
269
269
|
};
|
|
270
|
-
function Ye(
|
|
271
|
-
|
|
272
|
-
var o =
|
|
270
|
+
function Ye(e, i) {
|
|
271
|
+
i === void 0 && (i = {});
|
|
272
|
+
var o = i.insertAt;
|
|
273
273
|
if (!(typeof document > "u")) {
|
|
274
274
|
var h = document.head || document.getElementsByTagName("head")[0], d = document.createElement("style");
|
|
275
|
-
d.type = "text/css", o === "top" && h.firstChild ? h.insertBefore(d, h.firstChild) : h.appendChild(d), d.styleSheet ? d.styleSheet.cssText =
|
|
275
|
+
d.type = "text/css", o === "top" && h.firstChild ? h.insertBefore(d, h.firstChild) : h.appendChild(d), d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
var Ke = ".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";
|
|
279
279
|
Ye(Ke);
|
|
280
|
-
const Xe =
|
|
280
|
+
const Xe = he`:host([effect=jump]) .container,:host([effect=text-reveal]) .container,:host([effect=zoom]) .container{overflow:initial}:host([effect=jump]) .highlighter{transition:all var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=jump]) .highlighter:hover{transform:translateY(calc(var(--highlightable-item-effect-jump-distance,0) * -1))}:host([effect=zoom][zoom-style=pop-out]){overflow-clip-margin:var(--column-padding,10px);overflow:clip}.highlighter--effect-text-reveal,:host([effect=zoom]) .highlighter--zoom-style-within-borders{overflow:hidden}:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{z-index:3;animation:none}:host([effect=zoom][zoom-style=pop-out]) .highlighter:not(:hover){animation:drop-z var(--transition-transform-duration) forwards}@keyframes drop-z{0%{z-index:2}99%{z-index:2}to{z-index:0}}.highlighter--can-hover:hover:after,.highlighter--selected:after,.highlighter--color-overlay:after{content:"";pointer-events:none;width:100%;height:100%;transition:all var(--transition-duration,.5s) var(--easing,linear);position:absolute;top:0;left:0}.highlighter--can-hover:hover:after,.highlighter--selected:after{outline:2px solid var(--cx-color-primary)}.highlighter--border:hover .image{border-color:var(--highlightable-item-highlight-border-color,var(--cx-color-primary))}.highlighter--color-overlay:after{border-radius:var(--border-radius,none)}.highlighter--color-overlay:hover:after{background-color:var(--highlightable-item-highlight-color-overlay-color,transparent)}.highlighter--drop-shadow:hover .image{box-shadow:var(--highlightable-item-highlight-drop-shadow,none)}.highlighter--background:hover .highlightable-item{--content-background-color:var(--highlightable-item-highlight-background,transparent);--highlightable-item-background-color:var(--highlightable-item-highlight-background,transparent)}.highlighter--opacity{opacity:var(--highlightable-item-highlight-opacity,1)}:host([effect=zoom][zoom-style=within-borders]) .highlighter .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter{transition:transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=zoom][zoom-style=within-borders]) .highlighter:hover .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{transform:scale(var(--highlightable-item-effect-zoom-scale,1))}.highlightable-item{transition:background-color var(--transition-duration,.5s) var(--easing,linear), border-color var(--transition-duration,.5s) var(--easing,linear), box-shadow var(--transition-duration,.5s) var(--easing,linear), opacity var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear), visibility var(--transition-duration,.5s) var(--easing,linear)}`, Ge = he`
|
|
281
281
|
:host {
|
|
282
282
|
--justify-content: flex-start;
|
|
283
283
|
--border-radius: 0px;
|
|
@@ -405,6 +405,19 @@ const Xe = le`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
405
405
|
outline: none;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
.highlighter--loading-ratio {
|
|
409
|
+
aspect-ratio: var(--image-loading-aspect-ratio);
|
|
410
|
+
height: auto;
|
|
411
|
+
min-height: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* Jump/Zoom put the image in the popup's anchor slot; its host is display: contents. */
|
|
415
|
+
.highlighter--loading-ratio > .highlightable-item,
|
|
416
|
+
.highlighter--loading-ratio > .popup-container > .highlightable-item[slot='anchor'] {
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
408
421
|
.highlighter--centered {
|
|
409
422
|
display: flex;
|
|
410
423
|
justify-content: center;
|
|
@@ -622,16 +635,16 @@ const Xe = le`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
622
635
|
color: var(--fallback-icon-color);
|
|
623
636
|
}
|
|
624
637
|
`;
|
|
625
|
-
var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor,
|
|
626
|
-
throw TypeError(
|
|
627
|
-
}, l = (
|
|
628
|
-
for (var d = h > 1 ? void 0 : h ? Qe(
|
|
629
|
-
(k =
|
|
630
|
-
return h && d && Je(
|
|
631
|
-
},
|
|
632
|
-
let a = class extends
|
|
638
|
+
var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, ce = (e) => {
|
|
639
|
+
throw TypeError(e);
|
|
640
|
+
}, l = (e, i, o, h) => {
|
|
641
|
+
for (var d = h > 1 ? void 0 : h ? Qe(i, o) : i, C = e.length - 1, k; C >= 0; C--)
|
|
642
|
+
(k = e[C]) && (d = (h ? k(i, o, d) : k(d)) || d);
|
|
643
|
+
return h && d && Je(i, o, d), d;
|
|
644
|
+
}, de = (e, i, o) => i.has(e) || ce("Cannot " + o), se = (e, i, o) => (de(e, i, "read from private field"), o ? o.call(e) : i.get(e)), et = (e, i, o) => i.has(e) ? ce("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, o), le = (e, i, o, h) => (de(e, i, "write to private field"), i.set(e, o), o), O;
|
|
645
|
+
let a = class extends je {
|
|
633
646
|
constructor() {
|
|
634
|
-
super(...arguments), this.localize = new Ze(this), this.retryCount = 0, this.retryTimer = null, this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryIndex = 0, this.src = "", this.srcset = "", this.sizes = "", this.placeholder = "", this.alt = "", this.objectFit =
|
|
647
|
+
super(...arguments), this.localize = new Ze(this), this.retryCount = 0, this.retryTimer = null, this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryIndex = 0, this.src = "", this.aspectRatio = 0, this.srcset = "", this.sizes = "", this.placeholder = "", this.alt = "", this.objectFit = re.Fill, this.cropFocus = Ae.CenterCenter, this.skeleton = !1, this.fallback = !1, this.canZoom = !1, this.loading = !1, this.block = !1, this.htmlLoading = "lazy", this.noCrossorigin = !1, this.clickHandlerType = I.Automatic, this.retryOnError = !1, this.maxRetries = 10, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null, et(this, O, "");
|
|
635
648
|
}
|
|
636
649
|
get currentAltValue() {
|
|
637
650
|
return this.alt;
|
|
@@ -651,7 +664,7 @@ let a = class extends Re {
|
|
|
651
664
|
* the focal point must instead be applied by aligning the `<img>` within this flex parent.
|
|
652
665
|
*/
|
|
653
666
|
get highlighterCropFocusClass() {
|
|
654
|
-
return this.objectFit ===
|
|
667
|
+
return this.objectFit === re.Contain ? { [`highlightable-item--crop-focus-${this.cropFocus}`]: !0 } : {};
|
|
655
668
|
}
|
|
656
669
|
get highlighterClass() {
|
|
657
670
|
return {
|
|
@@ -661,13 +674,26 @@ let a = class extends Re {
|
|
|
661
674
|
...this.highlighterCropFocusClass
|
|
662
675
|
};
|
|
663
676
|
}
|
|
677
|
+
get currentAspectRatio() {
|
|
678
|
+
return this.aspectRatio;
|
|
679
|
+
}
|
|
680
|
+
get loadingAspectRatio() {
|
|
681
|
+
const e = this.currentAspectRatio;
|
|
682
|
+
return this.heightMode === ie.Auto && !this.isLoaded && !this.isEmpty && Number.isFinite(e) && e > 0 ? e : void 0;
|
|
683
|
+
}
|
|
684
|
+
getHighlighterClass(e = !1) {
|
|
685
|
+
return {
|
|
686
|
+
...super.getHighlighterClass(e),
|
|
687
|
+
"highlighter--loading-ratio": this.loadingAspectRatio !== void 0
|
|
688
|
+
};
|
|
689
|
+
}
|
|
664
690
|
get imageClass() {
|
|
665
|
-
let
|
|
691
|
+
let e = "landscape", i = this.ratio;
|
|
666
692
|
const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width), h = this.isResizing ? this.resizeSize.width : o, d = this.isResizing ? this.resizeSize.height : Number.parseFloat(this.height);
|
|
667
|
-
return h && d && (
|
|
693
|
+
return h && d && (i = h / d), i > this.imageRatio && (e = "portrait"), {
|
|
668
694
|
image: !0,
|
|
669
695
|
[`image--${this.objectFit}`]: !0,
|
|
670
|
-
[`image--${
|
|
696
|
+
[`image--${e}`]: !0,
|
|
671
697
|
[`image--height-${this.heightMode}`]: !0,
|
|
672
698
|
[`image--crop-focus-${this.cropFocus}`]: !0,
|
|
673
699
|
"image--can-zoom": this.canZoom,
|
|
@@ -727,8 +753,8 @@ let a = class extends Re {
|
|
|
727
753
|
handleBlur() {
|
|
728
754
|
this.isZoomed && this.zoom?.close();
|
|
729
755
|
}
|
|
730
|
-
handleKeyDown(
|
|
731
|
-
|
|
756
|
+
handleKeyDown(e) {
|
|
757
|
+
e.target === this.highlighterElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.highlighterElement.click());
|
|
732
758
|
}
|
|
733
759
|
async handleCanZoomChange() {
|
|
734
760
|
await this.updateComplete, this.hasZoomAction ? this.initZoom() : (this.zoom?.detach(), this.zoom = null);
|
|
@@ -737,20 +763,20 @@ let a = class extends Re {
|
|
|
737
763
|
await this.updateComplete, this.requestUpdate();
|
|
738
764
|
}
|
|
739
765
|
handleSrcChange() {
|
|
740
|
-
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0,
|
|
766
|
+
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, le(this, O, ""), this.clearRetryTimer();
|
|
741
767
|
}
|
|
742
768
|
clearRetryTimer() {
|
|
743
769
|
this.retryTimer !== null && (clearTimeout(this.retryTimer), this.retryTimer = null);
|
|
744
770
|
}
|
|
745
771
|
scheduleRetry() {
|
|
746
|
-
const
|
|
772
|
+
const e = Math.min(1e3 * Math.pow(2, this.retryCount - 1), 1e4);
|
|
747
773
|
this.retryTimer = setTimeout(() => {
|
|
748
|
-
this.retryTimer = null,
|
|
749
|
-
},
|
|
774
|
+
this.retryTimer = null, le(this, O, `${this.retryCount}-${Math.random().toString(36).slice(2)}`), this.retryIndex += 1;
|
|
775
|
+
}, e);
|
|
750
776
|
}
|
|
751
777
|
/** Appends the retry cache-bust param to `src` while a retry attempt is in flight, so a CDN edge caching a corrupted/truncated response is bypassed in favor of a fresh origin fetch. */
|
|
752
|
-
applyRetryCacheBust(
|
|
753
|
-
return this.retryIndex === 0 || !
|
|
778
|
+
applyRetryCacheBust(e) {
|
|
779
|
+
return this.retryIndex === 0 || !se(this, O) || !e ? e : Ie(e, "cachebust", se(this, O));
|
|
754
780
|
}
|
|
755
781
|
async initZoom() {
|
|
756
782
|
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = Ve(this.zoomImageElement, {
|
|
@@ -763,11 +789,11 @@ let a = class extends Re {
|
|
|
763
789
|
this.emit("cx-image-zoom-close"), this.isZoomed = !1;
|
|
764
790
|
}));
|
|
765
791
|
}
|
|
766
|
-
handleLoad(
|
|
767
|
-
const
|
|
768
|
-
if (!
|
|
792
|
+
handleLoad(e) {
|
|
793
|
+
const i = e?.currentTarget ?? this.imageElement;
|
|
794
|
+
if (!i)
|
|
769
795
|
return;
|
|
770
|
-
const { naturalHeight: o, naturalWidth: h } =
|
|
796
|
+
const { naturalHeight: o, naturalWidth: h } = i;
|
|
771
797
|
this.imageRatio = h / o, this.clearRetryTimer(), this.retryCount = 0, this.isRetrying = !1, this.isLoaded || this.emit("cx-load"), this.isLoaded = !0, this.isError = !1;
|
|
772
798
|
}
|
|
773
799
|
handleError() {
|
|
@@ -778,68 +804,70 @@ let a = class extends Re {
|
|
|
778
804
|
this.isRetrying = !1, this.emit("cx-error"), this.isLoaded = !0, this.isError = !0;
|
|
779
805
|
}
|
|
780
806
|
handleSizeChange() {
|
|
781
|
-
const
|
|
782
|
-
|
|
807
|
+
const e = this.resizeDirection !== oe.Vertical, i = this.resizeDirection !== oe.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, h = this.isResizing ? `${this.resizeSize.height}px` : this.height;
|
|
808
|
+
e && (this.width || this.isResizing ? this.style.setProperty("--width", o) : this.style.removeProperty("--width")), i && (this.heightMode !== ie.Auto && (this.height || this.isResizing) ? this.style.setProperty("--height", h) : this.style.removeProperty("--height"));
|
|
783
809
|
}
|
|
784
|
-
handleResize(
|
|
785
|
-
const { entries:
|
|
786
|
-
for (const o of
|
|
810
|
+
handleResize(e) {
|
|
811
|
+
const { entries: i } = e.detail;
|
|
812
|
+
for (const o of i)
|
|
787
813
|
o.target === this.highlighterElement && this.width.endsWith("%") && !this.isResizing && Math.abs(o.contentRect.width - (this.lastPatchedWidth ?? 0)) > 1 && this.updateLastPatchedWidth(o.contentRect.width);
|
|
788
814
|
}
|
|
789
|
-
updateLastPatchedWidth(
|
|
790
|
-
this.lastPatchedWidth =
|
|
815
|
+
updateLastPatchedWidth(e) {
|
|
816
|
+
this.lastPatchedWidth = e, this.requestUpdate();
|
|
791
817
|
}
|
|
792
818
|
/**
|
|
793
819
|
* Support CMS5 click action for the image.
|
|
794
820
|
*/
|
|
795
|
-
handleClickAction(
|
|
796
|
-
!(
|
|
821
|
+
handleClickAction(e) {
|
|
822
|
+
!(e.target instanceof HTMLElement) || this.clickHandlerType === I.Manual || this.canZoom && this.openZoom();
|
|
797
823
|
}
|
|
798
|
-
updated(
|
|
799
|
-
super.updated(
|
|
824
|
+
updated(e) {
|
|
825
|
+
super.updated(e);
|
|
826
|
+
const i = this.loadingAspectRatio;
|
|
827
|
+
i !== void 0 ? this.style.setProperty("--image-loading-aspect-ratio", String(i)) : this.style.removeProperty("--image-loading-aspect-ratio"), (e.has("width") || e.has("height") || e.has("heightMode") || e.has("resizeSize")) && this.handleSizeChange();
|
|
800
828
|
}
|
|
801
829
|
openZoom() {
|
|
802
830
|
this.zoom && this.zoom.open();
|
|
803
831
|
}
|
|
804
832
|
renderContent() {
|
|
805
|
-
const
|
|
833
|
+
const e = this.applyRetryCacheBust(this.currentSrc), i = this.currentAltValue;
|
|
806
834
|
if (this.retryOnError) {
|
|
807
835
|
if (this.isError && this.retryCount >= this.maxRetries)
|
|
808
836
|
return X;
|
|
809
837
|
} else if (this.isError)
|
|
810
838
|
return X;
|
|
811
|
-
return
|
|
839
|
+
return R`<div part="content" slot="anchor" class=${L(this.highlighterClass)}>${Me(
|
|
812
840
|
this.retryIndex,
|
|
813
|
-
|
|
841
|
+
R`<img part="image" class=${L(this.imageClass)} src=${e || this.placeholder} srcset=${S(this.srcset || void 0)} sizes=${S(this.sizes || void 0)} alt=${i} aria-label=${i} crossorigin=${S(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.retryIndex > 0 ? "eager" : this.htmlLoading} decoding="async" width=${S(this.width || void 0)} height=${S(this.height || void 0)}>`
|
|
814
842
|
)}</div>`;
|
|
815
843
|
}
|
|
816
844
|
render() {
|
|
817
|
-
const
|
|
818
|
-
return
|
|
845
|
+
const e = this.hasZoomAction, i = this.currentAltValue;
|
|
846
|
+
return R`<div part="base" class=${L({
|
|
819
847
|
container: !0,
|
|
820
848
|
"container--empty": this.isEmpty,
|
|
821
849
|
"container--loading": this.loading,
|
|
822
850
|
"container--resizing": this.resizable && this.isResizeActive
|
|
823
851
|
})} style=${Pe({
|
|
824
852
|
"--easing": this.easeCSSVariable
|
|
825
|
-
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${
|
|
853
|
+
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${S(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${i} aria-roledescription=${this.localize.term("image")} class=${L(this.isEmpty ? {} : this.getHighlighterClass(this.isError))} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${A(
|
|
826
854
|
this.isEmpty,
|
|
827
855
|
() => X,
|
|
828
|
-
() =>
|
|
856
|
+
() => A(
|
|
829
857
|
this.effect === K.Jump || this.effect === K.Zoom,
|
|
830
|
-
() =>
|
|
858
|
+
() => R`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
|
|
831
859
|
() => this.renderContent()
|
|
832
860
|
)
|
|
833
|
-
)}<div class="zoom-image-container">${
|
|
834
|
-
|
|
835
|
-
() =>
|
|
861
|
+
)}<div class="zoom-image-container">${A(
|
|
862
|
+
e,
|
|
863
|
+
() => R`<img part="zoom-image" class=${L({
|
|
836
864
|
"zoom-image": !0,
|
|
837
865
|
"zoom-image--hidden": !this.isZoomed
|
|
838
|
-
})} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${
|
|
839
|
-
)}</div>${
|
|
866
|
+
})} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${S(this.crossorigin)}>`
|
|
867
|
+
)}</div>${A(this.showPlaceholderSkeleton, () => R`<slot name="skeleton" part="skeleton"><div class=${L({
|
|
840
868
|
skeleton: !0
|
|
841
869
|
})}><cx-skeleton effect="none" role="status" aria-live="polite" aria-label=${this.localize.term("loading")}></cx-skeleton></div></slot>`)}
|
|
842
|
-
${
|
|
870
|
+
${A(this.isError, () => R`<slot name="fallback" part="fallback"><cx-space class=${L({ fallback: !0 })} direction="column" align-items="center" justify-content="center"><cx-icon name="hide_image" part="fallback-icon"> </cx-icon></cx-space></slot>`)}</div></cx-resize-observer>${A(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
|
|
843
871
|
}
|
|
844
872
|
};
|
|
845
873
|
O = /* @__PURE__ */ new WeakMap();
|
|
@@ -875,6 +903,9 @@ l([
|
|
|
875
903
|
l([
|
|
876
904
|
p({ reflect: !0, type: String })
|
|
877
905
|
], a.prototype, "src", 2);
|
|
906
|
+
l([
|
|
907
|
+
p({ attribute: "aspect-ratio", reflect: !0, type: Number })
|
|
908
|
+
], a.prototype, "aspectRatio", 2);
|
|
878
909
|
l([
|
|
879
910
|
p({ reflect: !0, type: String })
|
|
880
911
|
], a.prototype, "srcset", 2);
|
|
@@ -950,7 +981,7 @@ l([
|
|
|
950
981
|
Oe(100)
|
|
951
982
|
], a.prototype, "updateLastPatchedWidth", 1);
|
|
952
983
|
a = l([
|
|
953
|
-
|
|
984
|
+
Te("cx-image")
|
|
954
985
|
], a);
|
|
955
986
|
export {
|
|
956
987
|
a as C,
|