@invoice-sdk/widget 1.120.1 → 1.120.3
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/{index-DveBzjNY.js → index-DOx-LBdB.js} +594 -592
- package/dist/{index-CdN3aILt.js → index-DgDF2RGv.js} +57 -57
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +49 -43
- package/dist/{loading-pdqPXs86.js → loading-XFy-I2ys.js} +2 -2
- package/dist/{widget-DbDXoK_-.js → widget-a9FOiF4X.js} +880 -869
- package/dist/widget.css +1 -1
- package/package.json +1 -1
|
@@ -9,24 +9,24 @@ var ee = (r, t, e) => t in r ? re(r, t, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
se.call(t, e) && ee(r, e, t[e]);
|
|
10
10
|
return r;
|
|
11
11
|
};
|
|
12
|
-
var j = (r, t, e) => new Promise((n,
|
|
12
|
+
var j = (r, t, e) => new Promise((n, l) => {
|
|
13
13
|
var s = (p) => {
|
|
14
14
|
try {
|
|
15
15
|
g(e.next(p));
|
|
16
16
|
} catch (N) {
|
|
17
|
-
|
|
17
|
+
l(N);
|
|
18
18
|
}
|
|
19
19
|
}, a = (p) => {
|
|
20
20
|
try {
|
|
21
21
|
g(e.throw(p));
|
|
22
22
|
} catch (N) {
|
|
23
|
-
|
|
23
|
+
l(N);
|
|
24
24
|
}
|
|
25
25
|
}, g = (p) => p.done ? n(p.value) : Promise.resolve(p.value).then(s, a);
|
|
26
26
|
g((e = e.apply(r, t)).next());
|
|
27
27
|
});
|
|
28
|
-
import { c as G, f as te, e as oe, b as
|
|
29
|
-
import { t as i, c as J, j as ce } from "./index-
|
|
28
|
+
import { c as G, f as te, e as oe, b as le, o as ne, s as de } from "./loading-XFy-I2ys.js";
|
|
29
|
+
import { t as i, c as J, j as ce } from "./index-DOx-LBdB.js";
|
|
30
30
|
function z(r) {
|
|
31
31
|
const t = r.trim();
|
|
32
32
|
return t ? t.length < 2 || t.length > 250 ? { valid: !1, error: i("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(t) ? { valid: !1, error: i("invalid_characters") } : { valid: !0 } : { valid: !1, error: i("required_name") };
|
|
@@ -68,7 +68,7 @@ function pe({ defaultValues: r = {}, onChange: t } = {}) {
|
|
|
68
68
|
phone: r.phone || ""
|
|
69
69
|
}, n = document.createElement("div");
|
|
70
70
|
n.className = "wgt:space-y-2";
|
|
71
|
-
function
|
|
71
|
+
function l() {
|
|
72
72
|
typeof t == "function" && t($({}, e));
|
|
73
73
|
}
|
|
74
74
|
function s({ label: v, required: E, name: H, type: B = "text", placeholder: b }) {
|
|
@@ -83,7 +83,7 @@ function pe({ defaultValues: r = {}, onChange: t } = {}) {
|
|
|
83
83
|
e[H] = m.value, m.classList.remove(
|
|
84
84
|
"wgt:border-semantic-error",
|
|
85
85
|
"wgt:bg-semantic-error-50"
|
|
86
|
-
), T.classList.add("wgt:hidden"),
|
|
86
|
+
), T.classList.add("wgt:hidden"), l();
|
|
87
87
|
}), m.addEventListener("blur", () => {
|
|
88
88
|
let w;
|
|
89
89
|
switch (H) {
|
|
@@ -125,7 +125,7 @@ function pe({ defaultValues: r = {}, onChange: t } = {}) {
|
|
|
125
125
|
}), {
|
|
126
126
|
field: F,
|
|
127
127
|
input: M,
|
|
128
|
-
errorEl:
|
|
128
|
+
errorEl: d
|
|
129
129
|
} = s({
|
|
130
130
|
label: i("email"),
|
|
131
131
|
required: !0,
|
|
@@ -162,7 +162,7 @@ function pe({ defaultValues: r = {}, onChange: t } = {}) {
|
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
const B = K(e.email);
|
|
165
|
-
if (B.valid || E(M,
|
|
165
|
+
if (B.valid || E(M, d, B.error), e.phone.trim()) {
|
|
166
166
|
const b = Y(e.phone, !1);
|
|
167
167
|
b.valid || E(o, u, b.error);
|
|
168
168
|
}
|
|
@@ -187,8 +187,8 @@ function ge({
|
|
|
187
187
|
// performerName: defaultValues.performerName || '',
|
|
188
188
|
email: r.email || "",
|
|
189
189
|
phone: r.phone || ""
|
|
190
|
-
},
|
|
191
|
-
|
|
190
|
+
}, l = document.createElement("div");
|
|
191
|
+
l.className = "wgt:space-y-2";
|
|
192
192
|
function s() {
|
|
193
193
|
typeof t == "function" && t($({}, n));
|
|
194
194
|
}
|
|
@@ -237,7 +237,7 @@ function ge({
|
|
|
237
237
|
p.type = "checkbox", p.className = "wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary", p.checked = n.noTaxCode;
|
|
238
238
|
const N = document.createElement("span");
|
|
239
239
|
N.textContent = i("business_noTaxCode"), N.className = "wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]", N.style.fontFamily = "Inter, sans-serif", p.addEventListener("change", () => {
|
|
240
|
-
n.noTaxCode = p.checked,
|
|
240
|
+
n.noTaxCode = p.checked, d.disabled = n.noTaxCode, o.disabled = n.noTaxCode, d.classList.remove(
|
|
241
241
|
"wgt:border-semantic-error",
|
|
242
242
|
"wgt:bg-semantic-error-50"
|
|
243
243
|
), x.classList.add("wgt:hidden"), s();
|
|
@@ -248,18 +248,18 @@ function ge({
|
|
|
248
248
|
F.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 ", F.innerHTML = i("confirmation_popup_taxCode") + '<span class="wgt:text-[#ED1C24]">*</span>';
|
|
249
249
|
const M = document.createElement("div");
|
|
250
250
|
M.className = "wgt:flex wgt:gap-2 wgt:mt-2";
|
|
251
|
-
const
|
|
252
|
-
|
|
251
|
+
const d = document.createElement("input");
|
|
252
|
+
d.type = "text", d.name = "taxCode", d.placeholder = i("taxCode_input"), d.value = n.taxCode, d.className = "wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";
|
|
253
253
|
const x = document.createElement("div");
|
|
254
|
-
x.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",
|
|
255
|
-
n.taxCode =
|
|
254
|
+
x.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", d.addEventListener("input", () => {
|
|
255
|
+
n.taxCode = d.value, d.classList.remove(
|
|
256
256
|
"wgt:border-semantic-error",
|
|
257
257
|
"wgt:bg-semantic-error-50"
|
|
258
258
|
), x.classList.add("wgt:hidden"), s();
|
|
259
|
-
}),
|
|
260
|
-
if (n.noTaxCode || !
|
|
261
|
-
const C = Q(
|
|
262
|
-
C.valid || (
|
|
259
|
+
}), d.addEventListener("blur", () => {
|
|
260
|
+
if (n.noTaxCode || !d.value.trim()) return;
|
|
261
|
+
const C = Q(d.value);
|
|
262
|
+
C.valid || (d.classList.add(
|
|
263
263
|
"wgt:border-semantic-error",
|
|
264
264
|
"wgt:bg-semantic-error-50"
|
|
265
265
|
), x.textContent = C.error, x.classList.remove("wgt:hidden"));
|
|
@@ -273,7 +273,7 @@ function ge({
|
|
|
273
273
|
return;
|
|
274
274
|
const C = String(n.taxCode || "").trim();
|
|
275
275
|
if (!C) {
|
|
276
|
-
|
|
276
|
+
d.classList.add(
|
|
277
277
|
"wgt:border-semantic-error",
|
|
278
278
|
"wgt:bg-semantic-error-50"
|
|
279
279
|
), x.textContent = "Vui lòng nhập MST", x.classList.remove("wgt:hidden");
|
|
@@ -281,7 +281,7 @@ function ge({
|
|
|
281
281
|
}
|
|
282
282
|
const L = Q(C);
|
|
283
283
|
if (!L.valid) {
|
|
284
|
-
|
|
284
|
+
d.classList.add(
|
|
285
285
|
"wgt:border-semantic-error",
|
|
286
286
|
"wgt:bg-semantic-error-50"
|
|
287
287
|
), x.textContent = L.error, x.classList.remove("wgt:hidden");
|
|
@@ -293,7 +293,7 @@ function ge({
|
|
|
293
293
|
if (!h || typeof h != "object") return;
|
|
294
294
|
h.businessName != null && (n.businessName = String(h.businessName || ""), f.value = n.businessName), h.representativeName != null && (n.representativeName = String(h.representativeName || ""), E.value = n.representativeName), h.buyerAddress != null && (n.buyerAddress = String(h.buyerAddress || ""), b.value = n.buyerAddress), s();
|
|
295
295
|
} catch (h) {
|
|
296
|
-
|
|
296
|
+
d.classList.add(
|
|
297
297
|
"wgt:border-semantic-error",
|
|
298
298
|
"wgt:bg-semantic-error-50"
|
|
299
299
|
), x.textContent = "Không tìm thấy thông tin MST", x.classList.remove("wgt:hidden");
|
|
@@ -302,7 +302,7 @@ function ge({
|
|
|
302
302
|
}
|
|
303
303
|
})
|
|
304
304
|
});
|
|
305
|
-
M.appendChild(
|
|
305
|
+
M.appendChild(d), M.appendChild(o), k.appendChild(F), k.appendChild(M), k.appendChild(x);
|
|
306
306
|
const {
|
|
307
307
|
field: u,
|
|
308
308
|
input: f,
|
|
@@ -351,7 +351,7 @@ function ge({
|
|
|
351
351
|
type: "tel",
|
|
352
352
|
placeholder: i("phone_input")
|
|
353
353
|
});
|
|
354
|
-
|
|
354
|
+
l.appendChild(g), l.appendChild(k), l.appendChild(u), l.appendChild(v), l.appendChild(B), l.appendChild(_), l.appendChild(w), d.disabled = n.noTaxCode, o.disabled = n.noTaxCode;
|
|
355
355
|
function P() {
|
|
356
356
|
let C = !0;
|
|
357
357
|
function L(Z, q, y) {
|
|
@@ -363,7 +363,7 @@ function ge({
|
|
|
363
363
|
}
|
|
364
364
|
if (!n.noTaxCode) {
|
|
365
365
|
const Z = Q(n.taxCode);
|
|
366
|
-
Z.valid || L(
|
|
366
|
+
Z.valid || L(d, x, Z.error);
|
|
367
367
|
}
|
|
368
368
|
const h = z(n.businessName);
|
|
369
369
|
h.valid || L(f, c, h.error);
|
|
@@ -382,14 +382,14 @@ function ge({
|
|
|
382
382
|
function R() {
|
|
383
383
|
return $({}, n);
|
|
384
384
|
}
|
|
385
|
-
return { container:
|
|
385
|
+
return { container: l, getValues: R, validate: P };
|
|
386
386
|
}
|
|
387
387
|
function me({
|
|
388
388
|
type: r,
|
|
389
389
|
data: t,
|
|
390
390
|
orderInfo: e,
|
|
391
391
|
theme: n,
|
|
392
|
-
onClose:
|
|
392
|
+
onClose: l,
|
|
393
393
|
onConfirm: s
|
|
394
394
|
}) {
|
|
395
395
|
const a = document.createElement("div");
|
|
@@ -409,7 +409,7 @@ function me({
|
|
|
409
409
|
F.className = "wgt:px-6 wgt:pb-4";
|
|
410
410
|
const M = document.createElement("div");
|
|
411
411
|
M.className = "wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";
|
|
412
|
-
function
|
|
412
|
+
function d(b, A, _) {
|
|
413
413
|
const m = document.createElement("div");
|
|
414
414
|
m.className = "wgt:flex wgt:items-start wgt:gap-3";
|
|
415
415
|
const T = document.createElement("span");
|
|
@@ -423,19 +423,19 @@ function me({
|
|
|
423
423
|
}
|
|
424
424
|
const x = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>', o = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>', u = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
|
|
425
425
|
M.appendChild(
|
|
426
|
-
|
|
426
|
+
d(
|
|
427
427
|
x,
|
|
428
428
|
i("confirmation_popup_orderCode"),
|
|
429
429
|
e == null ? void 0 : e.billNo
|
|
430
430
|
)
|
|
431
431
|
), M.appendChild(
|
|
432
|
-
|
|
432
|
+
d(
|
|
433
433
|
o,
|
|
434
434
|
i("confirmation_popup_address"),
|
|
435
435
|
e == null ? void 0 : e.merchantAddress
|
|
436
436
|
)
|
|
437
437
|
), M.appendChild(
|
|
438
|
-
|
|
438
|
+
d(
|
|
439
439
|
u,
|
|
440
440
|
i("confirmation_popup_totalAmount"),
|
|
441
441
|
te(e == null ? void 0 : e.amount) + " VND"
|
|
@@ -485,7 +485,7 @@ function me({
|
|
|
485
485
|
title: "Đóng",
|
|
486
486
|
className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-white wgt:text-primary wgt:border wgt:border-primary",
|
|
487
487
|
handleClick: () => {
|
|
488
|
-
typeof
|
|
488
|
+
typeof l == "function" && l(), a.remove();
|
|
489
489
|
}
|
|
490
490
|
}), B = G({
|
|
491
491
|
type: "button",
|
|
@@ -496,7 +496,7 @@ function me({
|
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
return E.appendChild(H), E.appendChild(B), g.appendChild(E), a.appendChild(g), a.addEventListener("click", (b) => {
|
|
499
|
-
b.target === a && (typeof
|
|
499
|
+
b.target === a && (typeof l == "function" && l(), a.remove());
|
|
500
500
|
}), { overlay: a };
|
|
501
501
|
}
|
|
502
502
|
function ue({
|
|
@@ -504,7 +504,7 @@ function ue({
|
|
|
504
504
|
onPreview: t,
|
|
505
505
|
theme: e,
|
|
506
506
|
onSubmit: n,
|
|
507
|
-
taxCode:
|
|
507
|
+
taxCode: l = ""
|
|
508
508
|
}) {
|
|
509
509
|
const s = document.createElement("div");
|
|
510
510
|
s.className = "wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full wgt:shadow wgt:rounded-xl", e && s.setAttribute("data-theme", e);
|
|
@@ -522,8 +522,8 @@ function ue({
|
|
|
522
522
|
F.className = "wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center", F.textContent = i("invoiceform_title");
|
|
523
523
|
const M = document.createElement("p");
|
|
524
524
|
M.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", M.textContent = i("invoiceform_subtitle"), k.appendChild(F), k.appendChild(M), a.appendChild(k);
|
|
525
|
-
const
|
|
526
|
-
|
|
525
|
+
const d = document.createElement("div");
|
|
526
|
+
d.className = "wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";
|
|
527
527
|
function x(w, V) {
|
|
528
528
|
const S = document.createElement("div");
|
|
529
529
|
S.className = "wgt:flex wgt:items-start";
|
|
@@ -532,7 +532,7 @@ function ue({
|
|
|
532
532
|
const R = document.createElement("span");
|
|
533
533
|
R.className = "wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";
|
|
534
534
|
let C = "";
|
|
535
|
-
w === i("
|
|
535
|
+
w === i("invoice_number") ? C = `
|
|
536
536
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
537
537
|
<path d="M12.7996 14H3.19961C3.04048 14 2.88787 13.9368 2.77535 13.8243C2.66282 13.7117 2.59961 13.5591 2.59961 13.4V2.6C2.59961 2.44087 2.66282 2.28826 2.77535 2.17574C2.88787 2.06321 3.04048 2 3.19961 2H12.7996C12.9587 2 13.1114 2.06321 13.2239 2.17574C13.3364 2.28826 13.3996 2.44087 13.3996 2.6V13.4C13.3996 13.5591 13.3364 13.7117 13.2239 13.8243C13.1114 13.9368 12.9587 14 12.7996 14ZM12.1996 12.8V3.2H3.79961V12.8H12.1996ZM5.59961 6.2H10.3996V7.4H5.59961V6.2ZM5.59961 8.6H10.3996V9.8H5.59961V8.6Z" fill="currentColor"/>
|
|
538
538
|
</svg>
|
|
@@ -553,14 +553,14 @@ function ue({
|
|
|
553
553
|
const h = document.createElement("span");
|
|
554
554
|
return h.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", h.textContent = V, S.appendChild(P), S.appendChild(h), S;
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
d.appendChild(x(i("invoice_number"), r == null ? void 0 : r.billNo)), d.appendChild(
|
|
557
557
|
x(i("address_form"), r == null ? void 0 : r.merchantAddress)
|
|
558
|
-
),
|
|
558
|
+
), d.appendChild(
|
|
559
559
|
x(
|
|
560
560
|
i("total_amount"),
|
|
561
561
|
te(r == null ? void 0 : r.amount) + " VND"
|
|
562
562
|
)
|
|
563
|
-
), a.appendChild(
|
|
563
|
+
), a.appendChild(d);
|
|
564
564
|
const o = document.createElement("div");
|
|
565
565
|
o.className = "wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6", a.appendChild(o);
|
|
566
566
|
const u = document.createElement("div");
|
|
@@ -588,10 +588,10 @@ function ue({
|
|
|
588
588
|
const v = document.createElement("div");
|
|
589
589
|
v.className = "wgt:mt-4 wgt:px-4", o.appendChild(v);
|
|
590
590
|
const E = pe(), H = ge({
|
|
591
|
-
defaultValues: { taxCode:
|
|
591
|
+
defaultValues: { taxCode: l || "" },
|
|
592
592
|
onFetchByTaxCode: (w) => j(null, null, function* () {
|
|
593
593
|
var S, P, R;
|
|
594
|
-
const V = yield
|
|
594
|
+
const V = yield le(w);
|
|
595
595
|
return {
|
|
596
596
|
representativeName: (S = V.nguoi_dai_dien) != null ? S : "",
|
|
597
597
|
buyerAddress: (P = V.dia_chi) != null ? P : "",
|
|
@@ -684,15 +684,15 @@ function we({ theme: r, onClose: t } = {}) {
|
|
|
684
684
|
e.className = " wgt:flex wgt:h-screen wgt:bg-[#F3F4F6] wgt:p-4", r && e.setAttribute("data-theme", r);
|
|
685
685
|
const n = document.createElement("div");
|
|
686
686
|
n.className = "wgt:w-full wgt:max-w-md wgt:max-h-[208px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:p-8 wgt:text-center";
|
|
687
|
-
const
|
|
688
|
-
|
|
687
|
+
const l = document.createElement("div");
|
|
688
|
+
l.className = "wgt:flex wgt:justify-center wgt:mb-4";
|
|
689
689
|
const s = document.createElement("div");
|
|
690
690
|
s.className = "wgt:w-12 wgt:h-12 wgt:rounded-full wgt:flex wgt:items-center wgt:justify-center", s.style.backgroundColor = "#335CFF", s.innerHTML = `
|
|
691
691
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
692
692
|
<path d="M20.7996 22.75H5.19961C4.94102 22.75 4.69303 22.6473 4.51018 22.4644C4.32733 22.2816 4.22461 22.0336 4.22461 21.775V4.225C4.22461 3.96641 4.32733 3.71842 4.51018 3.53557C4.69303 3.35272 4.94102 3.25 5.19961 3.25H20.7996C21.0582 3.25 21.3062 3.35272 21.489 3.53557C21.6719 3.71842 21.7746 3.96641 21.7746 4.225V21.775C21.7746 22.0336 21.6719 22.2816 21.489 22.4644C21.3062 22.6473 21.0582 22.75 20.7996 22.75ZM9.09961 10.075V12.025H16.8996V10.075H9.09961ZM9.09961 13.975V15.925H16.8996V13.975H9.09961Z" fill="white"/>
|
|
693
693
|
</svg>
|
|
694
694
|
|
|
695
|
-
`,
|
|
695
|
+
`, l.appendChild(s), n.appendChild(l);
|
|
696
696
|
const a = document.createElement("h2");
|
|
697
697
|
a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = i("invoiceCheckout_title"), n.appendChild(a);
|
|
698
698
|
const g = document.createElement("p");
|
|
@@ -703,8 +703,8 @@ function Ce({ theme: r, onClose: t } = {}) {
|
|
|
703
703
|
e.className = "wgt:min-h-screen wgt:flex wgt:bg-[#F3F4F6] wgt:p-4", r && e.setAttribute("data-theme", r);
|
|
704
704
|
const n = document.createElement("div");
|
|
705
705
|
n.className = "wgt:w-full wgt:max-w-md wgt:max-h-[252px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:px-4 wgt:py-5 wgt:text-center";
|
|
706
|
-
const
|
|
707
|
-
|
|
706
|
+
const l = document.createElement("div");
|
|
707
|
+
l.className = "wgt:flex wgt:justify-center wgt:mb-2";
|
|
708
708
|
const s = document.createElement("div");
|
|
709
709
|
s.innerHTML = `
|
|
710
710
|
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -724,7 +724,7 @@ function Ce({ theme: r, onClose: t } = {}) {
|
|
|
724
724
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.7788 33.9142C39.4439 33.9142 39.9696 34.4369 39.9696 35.1051C39.9696 35.7748 39.4447 36.2959 38.7788 36.2959C38.1144 36.2959 37.5879 35.7748 37.5879 35.1051C37.5879 34.4361 38.1144 33.9142 38.7788 33.9142ZM44.1494 28.6799C43.9468 28.6837 43.7479 28.7675 43.6039 28.9146L39.9376 32.59C39.5826 32.4232 39.1925 32.3234 38.7788 32.3234C37.2542 32.3234 36.0039 33.5813 36.0039 35.1051C36.0039 36.6296 37.2542 37.8891 38.7788 37.8891C40.3033 37.8891 41.5544 36.6296 41.5544 35.1051C41.5544 34.5679 41.3944 34.0712 41.1285 33.6445L44.727 30.0376C45.2367 29.5317 44.8702 28.6632 44.1494 28.6799Z" fill="#808080"/>
|
|
725
725
|
</svg>
|
|
726
726
|
|
|
727
|
-
`,
|
|
727
|
+
`, l.appendChild(s), n.appendChild(l);
|
|
728
728
|
const a = document.createElement("h2");
|
|
729
729
|
a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = i("invoiceExpired_title"), n.appendChild(a);
|
|
730
730
|
const g = document.createElement("p");
|
|
@@ -738,9 +738,9 @@ function ie(r) {
|
|
|
738
738
|
function Ne({ uuid: r, orderInfo: t, theme: e }) {
|
|
739
739
|
const n = document.createElement("div");
|
|
740
740
|
n.className = "wgt:w-full wgt:min-h-screen";
|
|
741
|
-
let
|
|
741
|
+
let l = !1;
|
|
742
742
|
function s(o) {
|
|
743
|
-
|
|
743
|
+
l || (n.innerHTML = "", o && n.appendChild(o));
|
|
744
744
|
}
|
|
745
745
|
function a(o) {
|
|
746
746
|
o && console.log("[DEBUG] renderFailedPage:", o);
|
|
@@ -771,7 +771,7 @@ function Ne({ uuid: r, orderInfo: t, theme: e }) {
|
|
|
771
771
|
if (!E)
|
|
772
772
|
return a({ reason: "MISSING_UUID_ON_SUBMIT" }), { ok: !1 };
|
|
773
773
|
const H = fe(f, c);
|
|
774
|
-
return yield
|
|
774
|
+
return yield de(E, H), { ok: !0, finalData: yield ve(E, {
|
|
775
775
|
maxTries: 20,
|
|
776
776
|
intervalMs: 1500
|
|
777
777
|
}) };
|
|
@@ -806,7 +806,7 @@ function Ne({ uuid: r, orderInfo: t, theme: e }) {
|
|
|
806
806
|
}
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function d() {
|
|
810
810
|
return j(this, null, function* () {
|
|
811
811
|
a({ reason: "INIT_DEFAULT_RENDER" });
|
|
812
812
|
try {
|
|
@@ -820,9 +820,9 @@ function Ne({ uuid: r, orderInfo: t, theme: e }) {
|
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
822
|
function x() {
|
|
823
|
-
|
|
823
|
+
l = !0, n.innerHTML = "";
|
|
824
824
|
}
|
|
825
|
-
return { container: n, init:
|
|
825
|
+
return { container: n, init: d, destroy: x };
|
|
826
826
|
}
|
|
827
827
|
function he(r) {
|
|
828
828
|
return String(r || "").trim().toLowerCase() === "business" ? "enterprise" : "individual";
|
|
@@ -847,8 +847,8 @@ function ve(n) {
|
|
|
847
847
|
throw p.code = "EXPIRED", p.data = a, p;
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
const
|
|
851
|
-
throw
|
|
850
|
+
const l = new Error("Polling timeout: status not invoiced");
|
|
851
|
+
throw l.code = "POLL_TIMEOUT", l;
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
function xe(r) {
|
package/dist/index.esm.js
CHANGED