@invoice-sdk/widget 1.25.0 → 1.25.1
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.esm.js +29 -30
- package/dist/index.umd.js +11 -11
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3733,15 +3733,15 @@ function yw(C) {
|
|
|
3733
3733
|
Ag.className = "wgt:font-semibold wgt:italic", Ag.innerText = "Bạn đã sử dụng hoá đơn điện tử?", hA.appendChild(Ag), iA.appendChild(hA);
|
|
3734
3734
|
const jA = document.createElement("div");
|
|
3735
3735
|
jA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", jA.appendChild(u);
|
|
3736
|
-
const
|
|
3737
|
-
|
|
3736
|
+
const XA = document.createElement("h4");
|
|
3737
|
+
XA.className = "wgt:font-semibold wgt:italic", XA.innerText = "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?", jA.appendChild(XA);
|
|
3738
3738
|
const uA = document.createElement("div");
|
|
3739
3739
|
uA.className = "wgt:w-full wgt:flex wgt:flex-row-reverse wgt:space-x-4 wgt:gap-4 wgt:items-center wgt:justify-start", uA.appendChild(O.container);
|
|
3740
|
-
const XA = document.createElement("div");
|
|
3741
|
-
XA.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
3742
|
-
let TA = !0;
|
|
3743
3740
|
const LA = document.createElement("div");
|
|
3744
|
-
LA.className =
|
|
3741
|
+
LA.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
3742
|
+
let TA = !0;
|
|
3743
|
+
const mA = document.createElement("div");
|
|
3744
|
+
mA.className = [
|
|
3745
3745
|
"wgt:w-4",
|
|
3746
3746
|
"wgt:h-4",
|
|
3747
3747
|
"wgt:mt-1",
|
|
@@ -3761,7 +3761,7 @@ function yw(C) {
|
|
|
3761
3761
|
q.setAttribute("fill-rule", "evenodd"), q.setAttribute("clip-rule", "evenodd"), q.setAttribute(
|
|
3762
3762
|
"d",
|
|
3763
3763
|
"M5.23 12.03a.75.75 0 011.06.02L10 15.94l7.71-7.71a.75.75 0 111.06 1.06l-8.24 8.24a.75.75 0 01-1.06 0L5.21 13.09a.75.75 0 01.02-1.06z"
|
|
3764
|
-
), q.setAttribute("fill", "white"), GA.appendChild(q),
|
|
3764
|
+
), q.setAttribute("fill", "white"), GA.appendChild(q), mA.appendChild(GA);
|
|
3765
3765
|
const W = document.createElement("label");
|
|
3766
3766
|
W.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", W.appendChild(document.createTextNode("Tôi đồng ý với "));
|
|
3767
3767
|
const dA = (K, G) => {
|
|
@@ -3770,8 +3770,8 @@ function yw(C) {
|
|
|
3770
3770
|
};
|
|
3771
3771
|
W.appendChild(dA("Điều khoản", "#")), W.appendChild(document.createTextNode(" và ")), W.appendChild(dA("Chính sách sử dụng", "#")), W.appendChild(
|
|
3772
3772
|
document.createTextNode(` của ${B ? B.toUpperCase() : "OCB"}.`)
|
|
3773
|
-
),
|
|
3774
|
-
TA = !TA, TA ? (
|
|
3773
|
+
), LA.appendChild(mA), LA.appendChild(W), I.appendChild(LA), mA.addEventListener("click", () => {
|
|
3774
|
+
TA = !TA, TA ? (mA.classList.add("wgt:bg-primary"), GA.classList.remove("wgt:hidden")) : (mA.classList.remove("wgt:bg-primary"), GA.classList.add("wgt:hidden")), Z();
|
|
3775
3775
|
});
|
|
3776
3776
|
const ZA = document.createElement("div");
|
|
3777
3777
|
ZA.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", S.type = "submit", S.innerText = "Tiếp theo", S.className = [
|
|
@@ -3971,7 +3971,7 @@ function IQ({
|
|
|
3971
3971
|
"wgt:text-2xl",
|
|
3972
3972
|
"wgt:font-bold",
|
|
3973
3973
|
n ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
3974
|
-
].join(" "), d.innerText =
|
|
3974
|
+
].join(" "), d.innerText = bA((D == null ? void 0 : D.limit) * (D == null ? void 0 : D.price)), v.appendChild(d);
|
|
3975
3975
|
const R = document.createElement("span");
|
|
3976
3976
|
R.className = "wgt:text-sm wgt:text-text-sub-600", R.innerText = "VND/Gói", v.appendChild(R), f.appendChild(v), I.appendChild(f);
|
|
3977
3977
|
});
|
|
@@ -4044,7 +4044,6 @@ function qw(A) {
|
|
|
4044
4044
|
}
|
|
4045
4045
|
function Tw(g) {
|
|
4046
4046
|
return N(this, null, function* () {
|
|
4047
|
-
console.log("🚀 ~ bodyParams:", g);
|
|
4048
4047
|
const A = new FormData();
|
|
4049
4048
|
return A.append(
|
|
4050
4049
|
"eInvoiceRegistration",
|
|
@@ -4105,7 +4104,7 @@ function pw({ name: g, value: A, feeLabel: B, required: C, description: Q }) {
|
|
|
4105
4104
|
const D = document.createElement("p");
|
|
4106
4105
|
return D.className = "wgt:text-text-soft-400 wgt:text-sm", D.textContent = Q, w.appendChild(D), I.appendChild(w), { container: I };
|
|
4107
4106
|
}
|
|
4108
|
-
const
|
|
4107
|
+
const bA = (g) => new Intl.NumberFormat("vi-VN").format(g) + " VND";
|
|
4109
4108
|
function Dg(g, A) {
|
|
4110
4109
|
const B = g.find((I) => I._id === A);
|
|
4111
4110
|
if (!B)
|
|
@@ -4277,9 +4276,9 @@ function Ww(t) {
|
|
|
4277
4276
|
J += 1, y();
|
|
4278
4277
|
}), rA.appendChild(_), fA.appendChild(rA), T.appendChild(fA);
|
|
4279
4278
|
const QA = document.createElement("td");
|
|
4280
|
-
QA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", QA.innerText =
|
|
4279
|
+
QA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", QA.innerText = bA((W = D[0]) == null ? void 0 : W.price), T.appendChild(QA);
|
|
4281
4280
|
const JA = document.createElement("td");
|
|
4282
|
-
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText =
|
|
4281
|
+
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = bA(((dA = D[0]) == null ? void 0 : dA.price) * J), T.appendChild(JA), CA.appendChild(T);
|
|
4283
4282
|
}
|
|
4284
4283
|
{
|
|
4285
4284
|
const T = IA(o);
|
|
@@ -4303,9 +4302,9 @@ function Ww(t) {
|
|
|
4303
4302
|
v += 1, y();
|
|
4304
4303
|
}), BA.appendChild(QA), rA.appendChild(BA), Z.appendChild(rA);
|
|
4305
4304
|
const JA = document.createElement("td");
|
|
4306
|
-
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText =
|
|
4305
|
+
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = bA((T == null ? void 0 : T.price) * (T == null ? void 0 : T.limit)), Z.appendChild(JA);
|
|
4307
4306
|
const zA = document.createElement("td");
|
|
4308
|
-
zA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", zA.innerText =
|
|
4307
|
+
zA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", zA.innerText = bA(
|
|
4309
4308
|
(T == null ? void 0 : T.price) * (T == null ? void 0 : T.limit) * v
|
|
4310
4309
|
), Z.appendChild(zA), CA.appendChild(Z);
|
|
4311
4310
|
}
|
|
@@ -4332,9 +4331,9 @@ function Ww(t) {
|
|
|
4332
4331
|
d += 1, y();
|
|
4333
4332
|
}), BA.appendChild(QA), rA.appendChild(BA), Z.appendChild(rA);
|
|
4334
4333
|
const JA = document.createElement("td");
|
|
4335
|
-
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText =
|
|
4334
|
+
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = bA(T.limit * T.price), Z.appendChild(JA);
|
|
4336
4335
|
const zA = document.createElement("td");
|
|
4337
|
-
zA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", zA.innerText =
|
|
4336
|
+
zA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", zA.innerText = bA(
|
|
4338
4337
|
T.limit * T.price * d
|
|
4339
4338
|
), Z.appendChild(zA), CA.appendChild(Z);
|
|
4340
4339
|
}
|
|
@@ -4345,7 +4344,7 @@ function Ww(t) {
|
|
|
4345
4344
|
const V = document.createElement("tr"), _ = document.createElement("td");
|
|
4346
4345
|
_.colSpan = 4, _.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", _.innerText = "Tổng cộng", V.appendChild(_);
|
|
4347
4346
|
const QA = document.createElement("td");
|
|
4348
|
-
QA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", QA.innerText =
|
|
4347
|
+
QA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", QA.innerText = bA(BA), V.appendChild(QA), CA.appendChild(V);
|
|
4349
4348
|
}
|
|
4350
4349
|
}
|
|
4351
4350
|
y();
|
|
@@ -4407,8 +4406,8 @@ function Ww(t) {
|
|
|
4407
4406
|
}
|
|
4408
4407
|
});
|
|
4409
4408
|
iA.appendChild(Ag);
|
|
4410
|
-
const jA = ((GA = D[0]) == null ? void 0 : GA.price) * J,
|
|
4411
|
-
return w(
|
|
4409
|
+
const jA = ((GA = D[0]) == null ? void 0 : GA.price) * J, XA = IA(o), uA = XA ? XA.price * XA.limit * v : 0, LA = X(r), TA = LA ? LA.price * LA.limit * d : 0, mA = jA + uA + TA;
|
|
4410
|
+
return w(mA), { container: R };
|
|
4412
4411
|
});
|
|
4413
4412
|
}
|
|
4414
4413
|
function Vw({
|
|
@@ -4674,9 +4673,9 @@ function Ce() {
|
|
|
4674
4673
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
4675
4674
|
}), _g;
|
|
4676
4675
|
}
|
|
4677
|
-
var $g = {},
|
|
4676
|
+
var $g = {}, KA = {}, eQ;
|
|
4678
4677
|
function UA() {
|
|
4679
|
-
if (eQ) return
|
|
4678
|
+
if (eQ) return KA;
|
|
4680
4679
|
eQ = 1;
|
|
4681
4680
|
let g;
|
|
4682
4681
|
const A = [
|
|
@@ -4723,26 +4722,26 @@ function UA() {
|
|
|
4723
4722
|
3532,
|
|
4724
4723
|
3706
|
|
4725
4724
|
];
|
|
4726
|
-
return
|
|
4725
|
+
return KA.getSymbolSize = function(C) {
|
|
4727
4726
|
if (!C) throw new Error('"version" cannot be null or undefined');
|
|
4728
4727
|
if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
4729
4728
|
return C * 4 + 17;
|
|
4730
|
-
},
|
|
4729
|
+
}, KA.getSymbolTotalCodewords = function(C) {
|
|
4731
4730
|
return A[C];
|
|
4732
|
-
},
|
|
4731
|
+
}, KA.getBCHDigit = function(B) {
|
|
4733
4732
|
let C = 0;
|
|
4734
4733
|
for (; B !== 0; )
|
|
4735
4734
|
C++, B >>>= 1;
|
|
4736
4735
|
return C;
|
|
4737
|
-
},
|
|
4736
|
+
}, KA.setToSJISFunction = function(C) {
|
|
4738
4737
|
if (typeof C != "function")
|
|
4739
4738
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
4740
4739
|
g = C;
|
|
4741
|
-
},
|
|
4740
|
+
}, KA.isKanjiModeEnabled = function() {
|
|
4742
4741
|
return typeof g != "undefined";
|
|
4743
|
-
},
|
|
4742
|
+
}, KA.toSJIS = function(C) {
|
|
4744
4743
|
return g(C);
|
|
4745
|
-
},
|
|
4744
|
+
}, KA;
|
|
4746
4745
|
}
|
|
4747
4746
|
var AC = {}, DQ;
|
|
4748
4747
|
function hC() {
|