@invoice-sdk/widget 1.125.13 → 1.125.15

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,5 +1,5 @@
1
- import { l as g, g as p, n as d, G as l, C as w, p as m, q as f, r as E, I as R, u as y, S as C, w as I, e as T, x as v, y as i, z as h, O as S } from "./index-DFVtmZz4.js";
2
- function b({
1
+ import { l as g, g as p, n as d, C as l, G as w, p as m, q as f, I as E, r as R, S as y, u as C, e as I, w as v, x as i, y as T, O as h } from "./index-BF6bVOOY.js";
2
+ function _({
3
3
  title: e,
4
4
  isDisabled: t = !1,
5
5
  handleClick: r = null,
@@ -45,19 +45,19 @@ n.interceptors.request.use(
45
45
  }
46
46
  );
47
47
  d(n, {});
48
- async function N(e) {
48
+ async function b(e) {
49
49
  if (!e)
50
50
  throw new Error("Tax code is required to fetch tax information.");
51
- return await n.get(f, {
51
+ return await n.get(m, {
52
52
  params: {
53
53
  tax: e
54
54
  }
55
55
  });
56
56
  }
57
- async function U(e, t, r) {
57
+ async function N(e, t, r) {
58
58
  if (!t)
59
59
  throw new Error("Tax code is required to check new customer.");
60
- return (await n.get(w, {
60
+ return (await n.get(l, {
61
61
  params: {
62
62
  provider: e,
63
63
  taxCode: t,
@@ -65,19 +65,16 @@ async function U(e, t, r) {
65
65
  }
66
66
  })).data;
67
67
  }
68
- async function x(e, t) {
69
- return (await n.get(m, {
68
+ async function U(e, t) {
69
+ return (await n.get(w, {
70
70
  params: {
71
71
  provider: e,
72
72
  taxCode: t
73
73
  }
74
74
  })).data;
75
75
  }
76
- async function $() {
77
- return await n.get(l);
78
- }
79
- const k = (e) => new Intl.NumberFormat("vi-VN").format(e), _ = "1.125.13";
80
- async function A({ search: e, bank: t, provider: r }) {
76
+ const x = (e) => new Intl.NumberFormat("vi-VN").format(e), S = "1.125.15";
77
+ async function $({ search: e, bank: t, provider: r }) {
81
78
  return (await n.get(`${i}`, {
82
79
  params: {
83
80
  isActive: !0,
@@ -88,7 +85,7 @@ async function A({ search: e, bank: t, provider: r }) {
88
85
  }
89
86
  })).data;
90
87
  }
91
- async function M({ bank: e, provider: t }) {
88
+ async function k({ bank: e, provider: t }) {
92
89
  return (await n.get(`${i}`, {
93
90
  params: {
94
91
  isActive: !0,
@@ -98,7 +95,7 @@ async function M({ bank: e, provider: t }) {
98
95
  }
99
96
  })).data;
100
97
  }
101
- async function q({
98
+ async function A({
102
99
  bank: e,
103
100
  hasRenew: t,
104
101
  isCashRegister: r,
@@ -118,7 +115,7 @@ async function q({
118
115
  }
119
116
  })).data;
120
117
  }
121
- async function B({ bank: e, provider: t }) {
118
+ async function M({ bank: e, provider: t }) {
122
119
  return (await n.get(`${i}`, {
123
120
  params: {
124
121
  isActive: !0,
@@ -129,7 +126,7 @@ async function B({ bank: e, provider: t }) {
129
126
  }
130
127
  })).data;
131
128
  }
132
- async function G(e) {
129
+ async function q(e) {
133
130
  const t = new FormData();
134
131
  return t.append(
135
132
  "eInvoiceRegistration",
@@ -139,16 +136,16 @@ async function G(e) {
139
136
  e.organizationRegistrationCert
140
137
  ), e.legalRepresentativeIdCard.forEach((s) => {
141
138
  t.append("legalRepresentativeIdCard", s);
142
- }), t.append("isRenew", e.isRenew), t.append("isCashRegister", e.isCashRegister), await n.post(I, t, {
139
+ }), t.append("isRenew", e.isRenew), t.append("isCashRegister", e.isCashRegister), await n.post(C, t, {
143
140
  headers: {
144
141
  "Content-Type": "multipart/form-data",
145
- "X-Invoice-Widget-Mode": T(),
146
- "X-Invoice-Widget-Version": _
142
+ "X-Invoice-Widget-Mode": I(),
143
+ "X-Invoice-Widget-Version": S
147
144
  }
148
145
  });
149
146
  }
150
- async function W(e) {
151
- return await n.get(`${S}/${e}/status`);
147
+ async function B(e) {
148
+ return await n.get(`${h}/${e}/status`);
152
149
  }
153
150
  async function F({
154
151
  isRenewable: e,
@@ -162,40 +159,40 @@ async function F({
162
159
  };
163
160
  return (await n.get(v, { params: s })).data;
164
161
  }
165
- async function V(e) {
166
- return await n.post(`${h}/${e}`);
162
+ async function G(e) {
163
+ return await n.post(`${T}/${e}`);
167
164
  }
168
- async function j(e) {
165
+ async function V(e) {
169
166
  return await n.get(
170
- `${R}/${encodeURIComponent(e)}`
167
+ `${E}/${encodeURIComponent(e)}`
171
168
  );
172
169
  }
173
- async function D(e, t) {
170
+ async function j(e, t) {
174
171
  try {
175
172
  return await n.post(
176
- `${C}/${encodeURIComponent(e)}`,
173
+ `${y}/${encodeURIComponent(e)}`,
177
174
  t
178
175
  );
179
176
  } catch (r) {
180
177
  throw r;
181
178
  }
182
179
  }
183
- async function L(e) {
180
+ async function W(e) {
184
181
  return await n.get(
185
- `${E}/${encodeURIComponent(e)}`
182
+ `${f}/${encodeURIComponent(e)}`
186
183
  );
187
184
  }
188
- async function z(e, t) {
185
+ async function D(e, t) {
189
186
  try {
190
187
  return await n.post(
191
- `${y}/${encodeURIComponent(e)}`,
188
+ `${R}/${encodeURIComponent(e)}`,
192
189
  t
193
190
  );
194
191
  } catch (r) {
195
192
  throw r;
196
193
  }
197
194
  }
198
- function Q() {
195
+ function L() {
199
196
  const e = document.createElement("div");
200
197
  e.className = "wgt:absolute wgt:inset-0 wgt:bg-white/80 wgt:items-center wgt:justify-center wgt:z-50 wgt:w-full wgt:h-full wgt:backdrop-blur-sm", e.style.display = "none";
201
198
  const t = document.createElement("div");
@@ -212,23 +209,22 @@ function Q() {
212
209
  };
213
210
  }
214
211
  export {
215
- U as a,
216
- N as b,
217
- b as c,
218
- A as d,
219
- Q as e,
220
- k as f,
221
- x as g,
222
- G as h,
212
+ N as a,
213
+ b,
214
+ _ as c,
215
+ $ as d,
216
+ L as e,
217
+ x as f,
218
+ U as g,
219
+ q as h,
223
220
  F as i,
224
- M as j,
225
- q as k,
226
- B as l,
227
- V as m,
228
- W as n,
229
- $ as o,
230
- L as p,
221
+ k as j,
222
+ A as k,
223
+ M as l,
224
+ G as m,
225
+ B as n,
226
+ W as o,
227
+ V as p,
231
228
  j as q,
232
- D as r,
233
- z as s
229
+ D as s
234
230
  };