@openhive-eu/payment 1.0.0-next.0 → 1.0.0-next.8
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/dist/components/error-fallback.d.ts +2 -0
- package/dist/index.js +57 -49
- package/dist/index.js.gz +0 -0
- package/dist/index.min.js +39 -34
- package/dist/index.min.js.gz +0 -0
- package/dist/react.js +58 -50
- package/dist/styles.css +1 -1
- package/dist/styles.css.gz +0 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -242,7 +242,7 @@ let f2 = class extends HTMLElement {
|
|
|
242
242
|
f2.elementStyles = [], f2.shadowRootOptions = { mode: "open" }, f2[v2("elementProperties")] = /* @__PURE__ */ new Map(), f2[v2("finalized")] = /* @__PURE__ */ new Map(), m1?.({ ReactiveElement: f2 }), (q2.reactiveElementVersions ??= []).push("2.1.2");
|
|
243
243
|
const y0 = globalThis, M0 = (t) => t, z2 = y0.trustedTypes, T0 = z2 ? z2.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ee = "$lit$", t2 = `lit$${Math.random().toFixed(9).slice(2)}$`, Ae = "?" + t2, y1 = `<${Ae}>`, s2 = document, _2 = () => s2.createComment(""), w2 = (t) => t === null || typeof t != "object" && typeof t != "function", g0 = Array.isArray, g1 = (t) => g0(t) || typeof t?.[Symbol.iterator] == "function", r0 = `[
|
|
244
244
|
\f\r]`, g2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, L0 = /-->/g, F0 = />/g, o2 = RegExp(`>|${r0}(?:([^\\s"'>=/]+)(${r0}*=${r0}*(?:[^
|
|
245
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), V0 = /'/g, D0 = /"/g, Se = /^(?:script|style|textarea|title)$/i, b1 = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }),
|
|
245
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), V0 = /'/g, D0 = /"/g, Se = /^(?:script|style|textarea|title)$/i, b1 = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), v = b1(1), h2 = /* @__PURE__ */ Symbol.for("lit-noChange"), _ = /* @__PURE__ */ Symbol.for("lit-nothing"), H0 = /* @__PURE__ */ new WeakMap(), a2 = s2.createTreeWalker(s2, 129);
|
|
246
246
|
function Ne(t, e) {
|
|
247
247
|
if (!g0(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
248
248
|
return T0 !== void 0 ? T0.createHTML(e) : e;
|
|
@@ -272,8 +272,8 @@ class x2 {
|
|
|
272
272
|
for (; (d = a2.nextNode()) !== null && s.length < a; ) {
|
|
273
273
|
if (d.nodeType === 1) {
|
|
274
274
|
if (d.hasAttributes()) for (const $ of d.getAttributeNames()) if ($.endsWith(Ee)) {
|
|
275
|
-
const u = c[i++], g = d.getAttribute($).split(t2),
|
|
276
|
-
s.push({ type: 1, index: o, name:
|
|
275
|
+
const u = c[i++], g = d.getAttribute($).split(t2), C = /([.?@])?(.*)/.exec(u);
|
|
276
|
+
s.push({ type: 1, index: o, name: C[2], strings: g, ctor: C[1] === "." ? _1 : C[1] === "?" ? w1 : C[1] === "@" ? x1 : X2 }), d.removeAttribute($);
|
|
277
277
|
} else $.startsWith(t2) && (s.push({ type: 6, index: o }), d.removeAttribute($));
|
|
278
278
|
if (Se.test(d.tagName)) {
|
|
279
279
|
const $ = d.textContent.split(t2), u = $.length - 1;
|
|
@@ -542,7 +542,7 @@ function V1(t) {
|
|
|
542
542
|
async function c($, u) {
|
|
543
543
|
const {
|
|
544
544
|
baseUrl: g,
|
|
545
|
-
fetch:
|
|
545
|
+
fetch: C = n,
|
|
546
546
|
Request: S = r,
|
|
547
547
|
headers: x,
|
|
548
548
|
params: I = {},
|
|
@@ -593,7 +593,7 @@ function V1(t) {
|
|
|
593
593
|
if (L.length) {
|
|
594
594
|
J = F1(), D = Object.freeze({
|
|
595
595
|
baseUrl: m,
|
|
596
|
-
fetch:
|
|
596
|
+
fetch: C,
|
|
597
597
|
parseAs: V,
|
|
598
598
|
querySerializer: O,
|
|
599
599
|
bodySerializer: B
|
|
@@ -619,7 +619,7 @@ function V1(t) {
|
|
|
619
619
|
}
|
|
620
620
|
if (!b) {
|
|
621
621
|
try {
|
|
622
|
-
b = await
|
|
622
|
+
b = await C(A, a);
|
|
623
623
|
} catch (f) {
|
|
624
624
|
let P = f;
|
|
625
625
|
if (L.length)
|
|
@@ -1731,8 +1731,8 @@ var Mt = ";ext=", u2 = function(e) {
|
|
|
1731
1731
|
return "([".concat(H, "]{1,").concat(e, "})");
|
|
1732
1732
|
};
|
|
1733
1733
|
function Fe(t) {
|
|
1734
|
-
var e = "20", r = "15", n = "9", d = "6", o = "[ \\t,]*", i = "[:\\..]?[ \\t,-]*", a = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", l = "(?:[xx##~~]|int|int)", c = "[- ]+", $ = "[ \\t]*", u = "(?:,{2}|;)", g = Mt + u2(e),
|
|
1735
|
-
return g + "|" +
|
|
1734
|
+
var e = "20", r = "15", n = "9", d = "6", o = "[ \\t,]*", i = "[:\\..]?[ \\t,-]*", a = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", l = "(?:[xx##~~]|int|int)", c = "[- ]+", $ = "[ \\t]*", u = "(?:,{2}|;)", g = Mt + u2(e), C = o + s + i + u2(e) + a, S = o + l + i + u2(n) + a, x = c + u2(d) + "#", I = $ + u + i + u2(r) + a, V = $ + "(?:,)+" + i + u2(n) + a;
|
|
1735
|
+
return g + "|" + C + "|" + S + "|" + x + "|" + I + "|" + V;
|
|
1736
1736
|
}
|
|
1737
1737
|
var Tt = "[" + H + "]{" + w0 + "}", Lt = "[" + x0 + "]{0,1}(?:[" + Z2 + "]*[" + H + "]){3,}[" + Z2 + H + "]*", Ft = new RegExp("^[" + x0 + "]{0,1}(?:[" + Z2 + "]*[" + H + "]){1,2}$", "i"), Vt = Lt + // Phone number extensions
|
|
1738
1738
|
"(?:" + Fe() + ")?", Dt = new RegExp(
|
|
@@ -2289,16 +2289,16 @@ function Rr(t, e, r) {
|
|
|
2289
2289
|
var g = new Qt(c, l, r.metadata);
|
|
2290
2290
|
return s && (g.country = s), u && (g.carrierCode = u), o && (g.ext = o), g.__countryCallingCodeSource = $, g;
|
|
2291
2291
|
}
|
|
2292
|
-
var
|
|
2292
|
+
var C = (e.extended ? r.hasSelectedNumberingPlan() : s) ? Y(l, r.nationalNumberPattern()) : !1;
|
|
2293
2293
|
return e.extended ? {
|
|
2294
2294
|
country: s,
|
|
2295
2295
|
countryCallingCode: c,
|
|
2296
2296
|
carrierCode: u,
|
|
2297
|
-
valid:
|
|
2298
|
-
possible:
|
|
2297
|
+
valid: C,
|
|
2298
|
+
possible: C ? !0 : !!(e.extended === !0 && r.possibleLengths() && Me(l, s, r)),
|
|
2299
2299
|
phone: l,
|
|
2300
2300
|
ext: o
|
|
2301
|
-
} :
|
|
2301
|
+
} : C ? Tr(s, l, o) : {};
|
|
2302
2302
|
}
|
|
2303
2303
|
function Ir(t, e, r) {
|
|
2304
2304
|
if (t) {
|
|
@@ -2674,8 +2674,8 @@ const pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, he = Ge, R
|
|
|
2674
2674
|
return u === void 0 || (l[$] = u), l;
|
|
2675
2675
|
}, {}), s = e == null || (n = e.compoundVariants) === null || n === void 0 ? void 0 : n.reduce((l, c) => {
|
|
2676
2676
|
let { class: $, className: u, ...g } = c;
|
|
2677
|
-
return Object.entries(g).every((
|
|
2678
|
-
let [S, x] =
|
|
2677
|
+
return Object.entries(g).every((C) => {
|
|
2678
|
+
let [S, x] = C;
|
|
2679
2679
|
return Array.isArray(x) ? x.includes({
|
|
2680
2680
|
...o,
|
|
2681
2681
|
...a
|
|
@@ -2859,8 +2859,8 @@ const pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, he = Ge, R
|
|
|
2859
2859
|
*/
|
|
2860
2860
|
$.startsWith(f0) && (u = $.slice(1), g = !0)
|
|
2861
2861
|
);
|
|
2862
|
-
const
|
|
2863
|
-
return ge(o, g, u,
|
|
2862
|
+
const C = l && l > s ? l - s : void 0;
|
|
2863
|
+
return ge(o, g, u, C);
|
|
2864
2864
|
};
|
|
2865
2865
|
if (e) {
|
|
2866
2866
|
const d = e + ye, o = n;
|
|
@@ -2905,20 +2905,20 @@ const pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, he = Ge, R
|
|
|
2905
2905
|
isExternal: $,
|
|
2906
2906
|
modifiers: u,
|
|
2907
2907
|
hasImportantModifier: g,
|
|
2908
|
-
baseClassName:
|
|
2908
|
+
baseClassName: C,
|
|
2909
2909
|
maybePostfixModifierPosition: S
|
|
2910
2910
|
} = r(c);
|
|
2911
2911
|
if ($) {
|
|
2912
2912
|
s = c + (s.length > 0 ? " " + s : s);
|
|
2913
2913
|
continue;
|
|
2914
2914
|
}
|
|
2915
|
-
let x = !!S, I = n(x ?
|
|
2915
|
+
let x = !!S, I = n(x ? C.substring(0, S) : C);
|
|
2916
2916
|
if (!I) {
|
|
2917
2917
|
if (!x) {
|
|
2918
2918
|
s = c + (s.length > 0 ? " " + s : s);
|
|
2919
2919
|
continue;
|
|
2920
2920
|
}
|
|
2921
|
-
if (I = n(
|
|
2921
|
+
if (I = n(C), !I) {
|
|
2922
2922
|
s = c + (s.length > 0 ? " " + s : s);
|
|
2923
2923
|
continue;
|
|
2924
2924
|
}
|
|
@@ -2976,7 +2976,7 @@ const pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, he = Ge, R
|
|
|
2976
2976
|
const n = qe.exec(t);
|
|
2977
2977
|
return n ? n[1] ? e(n[1]) : r : !1;
|
|
2978
2978
|
}, Ye = (t) => t === "position" || t === "percentage", Je = (t) => t === "image" || t === "url", Qe = (t) => t === "length" || t === "size" || t === "bg-size", e1 = (t) => t === "length", Kn = (t) => t === "number", t1 = (t) => t === "family-name", r1 = (t) => t === "number" || t === "weight", n1 = (t) => t === "shadow", qn = () => {
|
|
2979
|
-
const t = N("color"), e = N("font"), r = N("text"), n = N("font-weight"), d = N("tracking"), o = N("leading"), i = N("breakpoint"), a = N("container"), s = N("spacing"), l = N("radius"), c = N("shadow"), $ = N("inset-shadow"), u = N("text-shadow"), g = N("drop-shadow"),
|
|
2979
|
+
const t = N("color"), e = N("font"), r = N("text"), n = N("font-weight"), d = N("tracking"), o = N("leading"), i = N("breakpoint"), a = N("container"), s = N("spacing"), l = N("radius"), c = N("shadow"), $ = N("inset-shadow"), u = N("text-shadow"), g = N("drop-shadow"), C = N("blur"), S = N("perspective"), x = N("aspect"), I = N("ease"), V = N("animate"), j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], B = () => [
|
|
2980
2980
|
"center",
|
|
2981
2981
|
"top",
|
|
2982
2982
|
"bottom",
|
|
@@ -3014,7 +3014,7 @@ const pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, he = Ge, R
|
|
|
3014
3014
|
// Deprecated since Tailwind CSS v4.0.0
|
|
3015
3015
|
"",
|
|
3016
3016
|
"none",
|
|
3017
|
-
|
|
3017
|
+
C,
|
|
3018
3018
|
h,
|
|
3019
3019
|
p
|
|
3020
3020
|
], L2 = () => ["none", y, h, p], F2 = () => ["none", y, h, p], t0 = () => [y, h, p], V2 = () => [Q, "full", ...m()];
|
|
@@ -5648,7 +5648,7 @@ const Jn = R2(
|
|
|
5648
5648
|
);
|
|
5649
5649
|
function we(t, e) {
|
|
5650
5650
|
const { type: r = "button", variant: n, size: d, disabled: o, onClick: i } = t;
|
|
5651
|
-
return
|
|
5651
|
+
return v`
|
|
5652
5652
|
<button
|
|
5653
5653
|
type=${r}
|
|
5654
5654
|
class=${p0(Jn({ variant: n, size: d }), t.class)}
|
|
@@ -5660,14 +5660,14 @@ function we(t, e) {
|
|
|
5660
5660
|
`;
|
|
5661
5661
|
}
|
|
5662
5662
|
function U2(t, e) {
|
|
5663
|
-
return
|
|
5663
|
+
return v`<label
|
|
5664
5664
|
for=${e}
|
|
5665
5665
|
class="pay:flex pay:items-center pay:gap-2 pay:text-sm pay:leading-none pay:font-medium pay:select-none"
|
|
5666
5666
|
>${t}</label
|
|
5667
5667
|
>`;
|
|
5668
5668
|
}
|
|
5669
5669
|
function a0(t) {
|
|
5670
|
-
return t ?
|
|
5670
|
+
return t ? v`<div
|
|
5671
5671
|
role="alert"
|
|
5672
5672
|
class="pay:text-destructive pay:text-sm pay:font-normal"
|
|
5673
5673
|
>
|
|
@@ -5675,7 +5675,7 @@ function a0(t) {
|
|
|
5675
5675
|
</div>` : _;
|
|
5676
5676
|
}
|
|
5677
5677
|
function Qn(t = "") {
|
|
5678
|
-
return
|
|
5678
|
+
return v`<div
|
|
5679
5679
|
class="pay:bg-accent pay:animate-pulse pay:rounded-md ${t}"
|
|
5680
5680
|
></div>`;
|
|
5681
5681
|
}
|
|
@@ -5683,7 +5683,7 @@ function ed() {
|
|
|
5683
5683
|
return Qn("pay:h-16 pay:w-full pay:rounded-xl");
|
|
5684
5684
|
}
|
|
5685
5685
|
function td() {
|
|
5686
|
-
return
|
|
5686
|
+
return v`<svg
|
|
5687
5687
|
role="status"
|
|
5688
5688
|
aria-label="Loading"
|
|
5689
5689
|
class="pay:size-4 pay:animate-spin"
|
|
@@ -5704,7 +5704,7 @@ const rd = R2(
|
|
|
5704
5704
|
"pay:pointer-events-none pay:absolute pay:size-2 pay:rounded-full pay:bg-primary pay:top-1/2 pay:left-1/2 pay:-translate-x-1/2 pay:-translate-y-1/2 pay:scale-0 pay:peer-checked:scale-100 pay:transition-transform pay:duration-200"
|
|
5705
5705
|
);
|
|
5706
5706
|
function d1(t) {
|
|
5707
|
-
return
|
|
5707
|
+
return v`
|
|
5708
5708
|
<div class="pay:relative pay:shrink-0 pay:w-4 pay:h-4">
|
|
5709
5709
|
<input
|
|
5710
5710
|
type="radio"
|
|
@@ -5733,14 +5733,14 @@ const o1 = R2(
|
|
|
5733
5733
|
}
|
|
5734
5734
|
);
|
|
5735
5735
|
function dd(t) {
|
|
5736
|
-
return
|
|
5736
|
+
return v`
|
|
5737
5737
|
<label class=${o1({ size: "method" })}>
|
|
5738
5738
|
${d1(t)}
|
|
5739
5739
|
<div
|
|
5740
5740
|
class="pay:flex pay:items-center pay:gap-1 pay:grow pay:justify-between pay:ml-2"
|
|
5741
5741
|
>
|
|
5742
5742
|
<span class="pay:text-sm pay:font-medium">${t.label}</span>
|
|
5743
|
-
${t.logoUrl ?
|
|
5743
|
+
${t.logoUrl ? v`<span
|
|
5744
5744
|
class="pay:relative pay:inline-flex pay:h-4 pay:shrink-0"
|
|
5745
5745
|
role="img"
|
|
5746
5746
|
aria-label=${t.label}
|
|
@@ -5761,7 +5761,7 @@ function dd(t) {
|
|
|
5761
5761
|
`;
|
|
5762
5762
|
}
|
|
5763
5763
|
function xe(t) {
|
|
5764
|
-
return
|
|
5764
|
+
return v`
|
|
5765
5765
|
<label class=${o1({ size: "channel" })}>
|
|
5766
5766
|
${d1(t)}
|
|
5767
5767
|
<div
|
|
@@ -5775,7 +5775,7 @@ function xe(t) {
|
|
|
5775
5775
|
}
|
|
5776
5776
|
const od = R2(
|
|
5777
5777
|
"pay:file:text-foreground pay:placeholder:text-muted-foreground pay:selection:bg-primary pay:selection:text-primary-foreground pay:border-input pay:h-9 pay:w-full pay:min-w-0 pay:rounded-md pay:border pay:bg-transparent pay:px-3 pay:py-1 pay:text-sm pay:shadow-xs pay:transition-[color,box-shadow] pay:outline-none pay:disabled:pointer-events-none pay:disabled:cursor-not-allowed pay:disabled:opacity-50 pay:focus-visible:border-ring pay:focus-visible:ring-ring/50 pay:focus-visible:ring-[3px] pay:aria-invalid:ring-destructive/20 pay:aria-invalid:border-destructive"
|
|
5778
|
-
), j2 = od(), id =
|
|
5778
|
+
), j2 = od(), id = v`<svg
|
|
5779
5779
|
class="pay:size-4 pay:text-muted-foreground"
|
|
5780
5780
|
viewBox="0 0 24 24"
|
|
5781
5781
|
fill="none"
|
|
@@ -5786,7 +5786,7 @@ const od = R2(
|
|
|
5786
5786
|
>
|
|
5787
5787
|
<rect x="2" y="4" width="20" height="16" rx="2" />
|
|
5788
5788
|
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
|
5789
|
-
</svg>`, ad =
|
|
5789
|
+
</svg>`, ad = v`<svg
|
|
5790
5790
|
class="pay:size-4 pay:text-muted-foreground"
|
|
5791
5791
|
viewBox="0 0 24 24"
|
|
5792
5792
|
fill="none"
|
|
@@ -5798,14 +5798,14 @@ const od = R2(
|
|
|
5798
5798
|
<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z" />
|
|
5799
5799
|
</svg>`;
|
|
5800
5800
|
function sd(t) {
|
|
5801
|
-
return
|
|
5801
|
+
return v`
|
|
5802
5802
|
<select
|
|
5803
5803
|
class="pay:border-input pay:h-9 pay:flex-shrink-0 pay:rounded-md pay:border pay:bg-transparent pay:px-3 pay:py-1 pay:text-sm pay:shadow-xs pay:transition-[color,box-shadow] pay:outline-none pay:focus-visible:ring-[3px] pay:focus-visible:border-ring pay:focus-visible:ring-ring/50 pay:cursor-pointer"
|
|
5804
5804
|
aria-label=${t.label}
|
|
5805
5805
|
@change=${t.onChange}
|
|
5806
5806
|
>
|
|
5807
5807
|
${Ue.map(
|
|
5808
|
-
(e) =>
|
|
5808
|
+
(e) => v`
|
|
5809
5809
|
<option value=${e.code} ?selected=${e.code === t.value}>
|
|
5810
5810
|
${e.flag} ${e.code} ${e.dial}
|
|
5811
5811
|
</option>
|
|
@@ -5814,14 +5814,24 @@ function sd(t) {
|
|
|
5814
5814
|
</select>
|
|
5815
5815
|
`;
|
|
5816
5816
|
}
|
|
5817
|
-
|
|
5817
|
+
function ld() {
|
|
5818
|
+
return v`
|
|
5819
|
+
<div
|
|
5820
|
+
role="alert"
|
|
5821
|
+
class="pay:bg-red-50 pay:border pay:border-red-400 pay:text-red-700 pay:p-4 pay:rounded-md"
|
|
5822
|
+
>
|
|
5823
|
+
<p>Something went wrong while loading the payment component.</p>
|
|
5824
|
+
</div>
|
|
5825
|
+
`;
|
|
5826
|
+
}
|
|
5827
|
+
var $d = Object.defineProperty, E = (t, e, r, n) => {
|
|
5818
5828
|
for (var d = void 0, o = t.length - 1, i; o >= 0; o--)
|
|
5819
5829
|
(i = t[o]) && (d = i(e, r, d) || d);
|
|
5820
|
-
return d &&
|
|
5830
|
+
return d && $d(e, r, d), d;
|
|
5821
5831
|
};
|
|
5822
5832
|
class w extends C2 {
|
|
5823
5833
|
constructor() {
|
|
5824
|
-
super(...arguments), this.token = "", this.currency = "EUR", this.defaultAmount = "", this.defaultReference = "", this.readOnlyAmount = !1, this.customerName = "", this.customerEmail = "", this.customerPhone = "", this.locale = "fr", this.payClientRef = "", this._amount = "", this._email = "", this._phone = "", this._paymentReference = "", this._method = "", this._channel = void 0, this._country = an.code, this._loading = !1, this._success = !1, this._paymentMethods = [], this._methodsLoading = !0, this._methodsError = null, this._initialized = !1, this._t = o0("fr"), this._apiUrl =
|
|
5834
|
+
super(...arguments), this.token = "", this.currency = "EUR", this.defaultAmount = "", this.defaultReference = "", this.readOnlyAmount = !1, this.customerName = "", this.customerEmail = "", this.customerPhone = "", this.locale = "fr", this.payClientRef = "", this._amount = "", this._email = "", this._phone = "", this._paymentReference = "", this._method = "", this._channel = void 0, this._country = an.code, this._loading = !1, this._success = !1, this._paymentMethods = [], this._methodsLoading = !0, this._methodsError = null, this._initialized = !1, this._t = o0("fr"), this._apiUrl = "https://localhost:4004";
|
|
5825
5835
|
}
|
|
5826
5836
|
createRenderRoot() {
|
|
5827
5837
|
return this;
|
|
@@ -5922,9 +5932,7 @@ class w extends C2 {
|
|
|
5922
5932
|
);
|
|
5923
5933
|
}
|
|
5924
5934
|
_renderMethods() {
|
|
5925
|
-
return this._methodsLoading ? ed() : this.
|
|
5926
|
-
${this._methodsError}
|
|
5927
|
-
</p>` : this._paymentMethods.map(
|
|
5935
|
+
return this._methodsLoading ? ed() : this._paymentMethods.map(
|
|
5928
5936
|
(e) => dd({
|
|
5929
5937
|
name: "payment-method",
|
|
5930
5938
|
value: e.id,
|
|
@@ -5936,7 +5944,7 @@ class w extends C2 {
|
|
|
5936
5944
|
);
|
|
5937
5945
|
}
|
|
5938
5946
|
_renderChannels() {
|
|
5939
|
-
return
|
|
5947
|
+
return v`
|
|
5940
5948
|
${xe({
|
|
5941
5949
|
name: "channel",
|
|
5942
5950
|
value: "email",
|
|
@@ -5957,7 +5965,7 @@ class w extends C2 {
|
|
|
5957
5965
|
}
|
|
5958
5966
|
_renderForm() {
|
|
5959
5967
|
const e = this._amount ? !this._validateAmount(this._amount) : !1, r = this._email ? !$e(this._email) : !1, n = this._phone ? !ce(this._country, this._phone) : !1;
|
|
5960
|
-
return
|
|
5968
|
+
return v`
|
|
5961
5969
|
<form @submit=${this._onSubmit} class="pay:space-y-4">
|
|
5962
5970
|
<p
|
|
5963
5971
|
class="pay:text-xl pay:font-bold pay:text-accent-foreground pay:text-center"
|
|
@@ -6012,7 +6020,7 @@ class w extends C2 {
|
|
|
6012
6020
|
<div class="pay:grid pay:gap-1">${this._renderMethods()}</div>
|
|
6013
6021
|
</div>
|
|
6014
6022
|
|
|
6015
|
-
${this._method ?
|
|
6023
|
+
${this._method ? v`
|
|
6016
6024
|
<div
|
|
6017
6025
|
class="pay:animate-in pay:fade-in pay:slide-in-from-bottom-1 pay:duration-300"
|
|
6018
6026
|
>
|
|
@@ -6024,7 +6032,7 @@ class w extends C2 {
|
|
|
6024
6032
|
</div>
|
|
6025
6033
|
</div>
|
|
6026
6034
|
` : _}
|
|
6027
|
-
${this._channel === "email" ?
|
|
6035
|
+
${this._channel === "email" ? v`
|
|
6028
6036
|
<div
|
|
6029
6037
|
class="pay:flex pay:flex-col pay:gap-1 pay:animate-in pay:fade-in pay:slide-in-from-bottom-1 pay:duration-300"
|
|
6030
6038
|
>
|
|
@@ -6046,7 +6054,7 @@ class w extends C2 {
|
|
|
6046
6054
|
${a0(r && this._t.emailInvalid)}
|
|
6047
6055
|
</div>
|
|
6048
6056
|
` : _}
|
|
6049
|
-
${this._channel === "sms" ?
|
|
6057
|
+
${this._channel === "sms" ? v`
|
|
6050
6058
|
<div
|
|
6051
6059
|
class="pay:flex pay:flex-col pay:gap-1 pay:animate-in pay:fade-in pay:slide-in-from-bottom-1 pay:duration-300"
|
|
6052
6060
|
>
|
|
@@ -6083,7 +6091,7 @@ class w extends C2 {
|
|
|
6083
6091
|
`;
|
|
6084
6092
|
}
|
|
6085
6093
|
_renderSuccess() {
|
|
6086
|
-
return
|
|
6094
|
+
return v`
|
|
6087
6095
|
<div
|
|
6088
6096
|
class="pay:absolute pay:inset-0 pay:flex pay:items-center pay:justify-center pay:z-10 pay:bg-background pay:rounded-lg pay:px-6 pay:animate-in pay:fade-in pay:duration-300"
|
|
6089
6097
|
>
|
|
@@ -6091,16 +6099,16 @@ class w extends C2 {
|
|
|
6091
6099
|
<h2 class="pay:text-xl pay:font-bold pay:text-accent-foreground">
|
|
6092
6100
|
${this._t.paymentLinkSent}
|
|
6093
6101
|
</h2>
|
|
6094
|
-
${this._channel === "email" ?
|
|
6102
|
+
${this._channel === "email" ? v`<p>
|
|
6095
6103
|
${this._t.emailSentTo} <strong>${this._email}</strong>
|
|
6096
|
-
</p>` :
|
|
6104
|
+
</p>` : v`<p>${this._t.smsSentTo} <strong>${this._phone}</strong></p>`}
|
|
6097
6105
|
${we({ type: "button", onClick: this._onClose }, this._t.close)}
|
|
6098
6106
|
</div>
|
|
6099
6107
|
</div>
|
|
6100
6108
|
`;
|
|
6101
6109
|
}
|
|
6102
6110
|
render() {
|
|
6103
|
-
return
|
|
6111
|
+
return !this._methodsLoading && this._methodsError ? v`<div class="pay:p-4">${ld()}</div>` : v`
|
|
6104
6112
|
<div class="pay:relative pay:p-4 pay:space-y-6">
|
|
6105
6113
|
${this._renderForm()} ${this._success ? this._renderSuccess() : _}
|
|
6106
6114
|
</div>
|
package/dist/index.js.gz
CHANGED
|
Binary file
|