@invoice-sdk/widget 1.113.4 → 1.114.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.
@@ -1,26 +1,26 @@
1
- var a = (e, t, r) => new Promise((i, u) => {
1
+ var a = (e, t, r) => new Promise((i, c) => {
2
2
  var s = (o) => {
3
3
  try {
4
- c(r.next(o));
5
- } catch (g) {
6
- u(g);
4
+ u(r.next(o));
5
+ } catch (d) {
6
+ c(d);
7
7
  }
8
- }, d = (o) => {
8
+ }, g = (o) => {
9
9
  try {
10
- c(r.throw(o));
11
- } catch (g) {
12
- u(g);
10
+ u(r.throw(o));
11
+ } catch (d) {
12
+ c(d);
13
13
  }
14
- }, c = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(s, d);
15
- c((r = r.apply(e, t)).next());
14
+ }, u = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(s, g);
15
+ u((r = r.apply(e, t)).next());
16
16
  });
17
- import { j as f, g as l, k as w, C as m, G as E, l as R, I as v, S as y, n as C, a as I, o as T, p, q as O, O as S } from "./index-BVpfY0do.js";
17
+ import { j as f, g as l, k as w, C as R, G as m, l as E, I as v, S as C, n as y, a as I, o as T, p, q as O, O as h } from "./index-DJ4GkllD.js";
18
18
  function N({
19
19
  title: e,
20
20
  isDisabled: t = !1,
21
21
  handleClick: r = null,
22
22
  type: i = "button",
23
- className: u = ""
23
+ className: c = ""
24
24
  } = {}) {
25
25
  const s = document.createElement("button");
26
26
  return s.type = i, s.disabled = t, s.className = [
@@ -33,14 +33,14 @@ function N({
33
33
  "wgt:disabled:cursor-not-allowed",
34
34
  "wgt:cursor-pointer",
35
35
  "wgt:hover:text-primary-hover-text",
36
- u
37
- ].filter(Boolean).join(" "), s.innerText = e, typeof r == "function" && s.addEventListener("click", (d) => a(null, null, function* () {
36
+ c
37
+ ].filter(Boolean).join(" "), s.innerText = e, typeof r == "function" && s.addEventListener("click", (g) => a(null, null, function* () {
38
38
  if (!s.disabled) {
39
39
  s.disabled = !0;
40
40
  try {
41
- yield r(d);
42
- } catch (c) {
43
- console.error("Button click handler error:", c);
41
+ yield r(g);
42
+ } catch (u) {
43
+ console.error("Button click handler error:", u);
44
44
  } finally {
45
45
  s.disabled = !1;
46
46
  }
@@ -65,7 +65,7 @@ function x(e) {
65
65
  return a(this, null, function* () {
66
66
  if (!e)
67
67
  throw new Error("Tax code is required to fetch tax information.");
68
- return yield n.get(R, {
68
+ return yield n.get(E, {
69
69
  params: {
70
70
  tax: e
71
71
  }
@@ -76,7 +76,7 @@ function $(e, t, r) {
76
76
  return a(this, null, function* () {
77
77
  if (!t)
78
78
  throw new Error("Tax code is required to check new customer.");
79
- return (yield n.get(m, {
79
+ return (yield n.get(R, {
80
80
  params: {
81
81
  provider: e,
82
82
  taxCode: t,
@@ -85,9 +85,9 @@ function $(e, t, r) {
85
85
  })).data;
86
86
  });
87
87
  }
88
- function b(e, t) {
88
+ function A(e, t) {
89
89
  return a(this, null, function* () {
90
- return (yield n.get(E, {
90
+ return (yield n.get(m, {
91
91
  params: {
92
92
  provider: e,
93
93
  taxCode: t
@@ -95,7 +95,7 @@ function b(e, t) {
95
95
  })).data;
96
96
  });
97
97
  }
98
- const A = (e) => new Intl.NumberFormat("vi-VN").format(e), h = "1.113.4";
98
+ const b = (e) => new Intl.NumberFormat("vi-VN").format(e), S = "1.114.0";
99
99
  function U(r) {
100
100
  return a(this, arguments, function* ({ search: e, bank: t }) {
101
101
  return (yield n.get(`${p}`, {
@@ -119,15 +119,16 @@ function M(t) {
119
119
  })).data;
120
120
  });
121
121
  }
122
- function q(r) {
123
- return a(this, arguments, function* ({ bank: e, hasRenew: t }) {
122
+ function q(i) {
123
+ return a(this, arguments, function* ({ bank: e, hasRenew: t, isCashRegister: r }) {
124
124
  return (yield n.get(`${p}`, {
125
125
  params: {
126
126
  isActive: !0,
127
127
  type: "service",
128
128
  bank: e,
129
129
  hasRenew: t,
130
- limit: 99
130
+ limit: 99,
131
+ isCashRegister: r
131
132
  }
132
133
  })).data;
133
134
  });
@@ -155,18 +156,18 @@ function G(e) {
155
156
  e.organizationRegistrationCert
156
157
  ), e.legalRepresentativeIdCard.forEach((i) => {
157
158
  t.append("legalRepresentativeIdCard", i);
158
- }), t.append("isRenew", e.isRenew), yield n.post(C, t, {
159
+ }), t.append("isRenew", e.isRenew), t.append("isCashRegister", e.isCashRegister), yield n.post(y, t, {
159
160
  headers: {
160
161
  "Content-Type": "multipart/form-data",
161
162
  "X-Invoice-Widget-Mode": I(),
162
- "X-Invoice-Widget-Version": h
163
+ "X-Invoice-Widget-Version": S
163
164
  }
164
165
  });
165
166
  });
166
167
  }
167
168
  function j(e) {
168
169
  return a(this, null, function* () {
169
- return yield n.get(`${S}/${e}/status`);
170
+ return yield n.get(`${h}/${e}/status`);
170
171
  });
171
172
  }
172
173
  function B() {
@@ -192,7 +193,7 @@ function W(e, t) {
192
193
  return a(this, null, function* () {
193
194
  try {
194
195
  return yield n.post(
195
- `${y}/${encodeURIComponent(e)}`,
196
+ `${C}/${encodeURIComponent(e)}`,
196
197
  t
197
198
  );
198
199
  } catch (r) {
@@ -206,8 +207,8 @@ export {
206
207
  N as c,
207
208
  U as d,
208
209
  G as e,
209
- A as f,
210
- b as g,
210
+ b as f,
211
+ A as g,
211
212
  B as h,
212
213
  M as i,
213
214
  q as j,