@everymatrix/cashier-method-details 1.77.5 → 1.77.7
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/components/{CashierError-DohAsTU9.js → CashierError-DF-u83bh.js} +1 -1
- package/components/{CashierError-XM-zLW-s.cjs → CashierError-DGbaIkKw.cjs} +1 -1
- package/components/{CashierError-BsBgFLdZ.js → CashierError-DPlMj_aG.js} +1 -1
- package/components/{CashierMethodDetails-7IMoMf7C.cjs → CashierMethodDetails-DCeEk9ge.cjs} +2 -2
- package/components/{CashierMethodDetails-DrvIMHge.js → CashierMethodDetails-DnmwydeN.js} +6 -6
- package/components/{CashierMethodDetails-BO133hRe.js → CashierMethodDetails-zD3MMp3U.js} +6 -6
- package/components/{CashierModal-B8mAYtg1.cjs → CashierModal-BRkWSAyS.cjs} +1 -1
- package/components/{CashierModal-DU_HOWO6.js → CashierModal-C8eqkt3x.js} +1 -1
- package/components/{CashierModal-CsvX6JLM.js → CashierModal-D2J1GlPr.js} +1 -1
- package/components/{CashierNotifications-BOr23XH6.cjs → CashierNotifications-B6xUAhsL.cjs} +1 -1
- package/components/{CashierNotifications-ElwLvwt1.js → CashierNotifications-BaYbigj9.js} +1 -1
- package/components/{CashierNotifications-ZLegMjG5.js → CashierNotifications-CRzI0zZM.js} +1 -1
- package/components/{CashierReceiptPage-CuY_gAMZ.js → CashierReceiptPage-D2d0fSmj.js} +3 -3
- package/components/{CashierReceiptPage-BeufADrl.cjs → CashierReceiptPage-DEynYfD5.cjs} +1 -1
- package/components/{CashierReceiptPage-DWNUFP3w.js → CashierReceiptPage-EUJ7lIUj.js} +3 -3
- package/components/{CashierSpinner-B6l8-0Zq.js → CashierSpinner-CNRWXQEh.js} +1 -1
- package/components/{CashierSpinner-KmXh-4G3.cjs → CashierSpinner-DQIeaO2S.cjs} +1 -1
- package/components/{CashierSpinner-BCoFGxGC.js → CashierSpinner-DTGXsOoU.js} +1 -1
- package/es2015/cashier-method-details.cjs +1 -1
- package/es2015/cashier-method-details.js +1 -1
- package/esnext/cashier-method-details.js +1 -1
- package/package.json +1 -1
- package/stencil/index-256b7d4e-7jcaQ7rC.js +543 -0
- package/stencil/index-256b7d4e-BnoVkrXr.cjs +1 -0
- package/stencil/index-256b7d4e-CSg5Fmgt.js +559 -0
- package/stencil/ui-image-8975d115-BIwRmPA-.cjs +1 -0
- package/stencil/ui-image-8975d115-C8pJTCfZ.js +71 -0
- package/stencil/ui-image-8975d115-DxO6YS6C.js +71 -0
- package/stencil/{ui-image-C0Jfm_O4.js → ui-image-Bn9a7Spu.js} +1 -1
- package/stencil/{ui-image-DmRWEjrp.js → ui-image-CfDP8dmz.js} +1 -1
- package/stencil/{ui-image-EfKW3THf.cjs → ui-image-DB-cMaV6.cjs} +1 -1
- package/stencil/{ui-image_2-CLk629jW.cjs → ui-image_2-CXGY1IY3.cjs} +1 -1
- package/stencil/{ui-image_2-VgK3B8gQ.js → ui-image_2-DwuycSdC.js} +2 -2
- package/stencil/{ui-image_2-B21W_djK.js → ui-image_2-rhY_9uoo.js} +2 -2
- package/stencil/index-242ac81a-BqeIndhr.js +0 -554
- package/stencil/index-242ac81a-CI4JxPRf.js +0 -538
- package/stencil/index-242ac81a-CjjM4VND.cjs +0 -1
- package/stencil/ui-image-2ff23cd5-BHGIWJop.cjs +0 -1
- package/stencil/ui-image-2ff23cd5-D0rXudCW.js +0 -86
- package/stencil/ui-image-2ff23cd5-DCLQ0SIO.js +0 -86
@@ -1,86 +0,0 @@
|
|
1
|
-
import { r as n, h as t, H as r, g as a } from "./index-242ac81a-BqeIndhr.js";
|
2
|
-
const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", o = h, d = class {
|
3
|
-
constructor(e) {
|
4
|
-
n(this, e), this.hasStarted = !1, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
|
5
|
-
}
|
6
|
-
onSrcChange() {
|
7
|
-
this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window == "undefined" || !("IntersectionObserver" in window)) && this.beginLoad());
|
8
|
-
}
|
9
|
-
onLoadingChange(e, i) {
|
10
|
-
e !== i && (this.cleanupObserver(), this.detachImgHandlers(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
|
11
|
-
}
|
12
|
-
componentDidLoad() {
|
13
|
-
this.loading !== "eager" && this.setupObserver();
|
14
|
-
}
|
15
|
-
disconnectedCallback() {
|
16
|
-
this.cleanupObserver(), this.detachImgHandlers();
|
17
|
-
}
|
18
|
-
canUseIO() {
|
19
|
-
return typeof window != "undefined" && "IntersectionObserver" in window;
|
20
|
-
}
|
21
|
-
setupObserver() {
|
22
|
-
if (this.loading !== "eager") {
|
23
|
-
if (!this.canUseIO()) {
|
24
|
-
this.beginLoad();
|
25
|
-
return;
|
26
|
-
}
|
27
|
-
this.io = new IntersectionObserver((e) => {
|
28
|
-
var i;
|
29
|
-
for (const s of e)
|
30
|
-
if (s.isIntersecting) {
|
31
|
-
this.beginLoad(), (i = this.io) === null || i === void 0 || i.unobserve(s.target), this.cleanupObserver();
|
32
|
-
break;
|
33
|
-
}
|
34
|
-
}, { root: null, rootMargin: this.detectDistance, threshold: 0 }), this.io.observe(this.el);
|
35
|
-
}
|
36
|
-
}
|
37
|
-
cleanupObserver() {
|
38
|
-
var e;
|
39
|
-
(e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
|
40
|
-
}
|
41
|
-
wireOnceHandlers() {
|
42
|
-
this.imgEl && (this.detachImgHandlers(), this._onLoad = () => {
|
43
|
-
var e;
|
44
|
-
this.currentSrc && (!((e = this.imgEl) === null || e === void 0) && e.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc) || (this.imgLoaded = !0);
|
45
|
-
}, this._onError = () => {
|
46
|
-
console.error("Load image failed:", this.src);
|
47
|
-
}, this.imgEl.addEventListener("load", this._onLoad, { once: !0 }), this.imgEl.addEventListener("error", this._onError, { once: !0 }));
|
48
|
-
}
|
49
|
-
detachImgHandlers() {
|
50
|
-
this.imgEl && (this._onLoad && this.imgEl.removeEventListener("load", this._onLoad), this._onError && this.imgEl.removeEventListener("error", this._onError), this._onLoad = void 0, this._onError = void 0);
|
51
|
-
}
|
52
|
-
beginLoad() {
|
53
|
-
if (!this.hasStarted && this.imgEl && this.src) {
|
54
|
-
if (this.hasStarted = !0, this.wireOnceHandlers(), this.imgEl.complete && this.imgEl.naturalWidth > 0) {
|
55
|
-
this.imgLoaded = !0;
|
56
|
-
return;
|
57
|
-
}
|
58
|
-
this.currentSrc = this.src, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
get showSkeleton() {
|
62
|
-
return this.loading !== "eager" && !this.imgLoaded;
|
63
|
-
}
|
64
|
-
renderEager() {
|
65
|
-
return t(r, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
|
66
|
-
}
|
67
|
-
renderLazy() {
|
68
|
-
return t(r, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
|
69
|
-
}
|
70
|
-
render() {
|
71
|
-
return this.loading === "eager" ? this.renderEager() : this.renderLazy();
|
72
|
-
}
|
73
|
-
get el() {
|
74
|
-
return a(this);
|
75
|
-
}
|
76
|
-
static get watchers() {
|
77
|
-
return {
|
78
|
-
src: ["onSrcChange"],
|
79
|
-
loading: ["onLoadingChange"]
|
80
|
-
};
|
81
|
-
}
|
82
|
-
};
|
83
|
-
d.style = o;
|
84
|
-
export {
|
85
|
-
d as U
|
86
|
-
};
|