@invoice-sdk/widget 1.125.4 → 1.125.6

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,10 +1,10 @@
1
- import { k as g, i as p, l as d, G as l, C as w, n as m, p as f, q as E, I as R, r as y, S as C, u as I, d as T, w as v, x as o, y as h, O } from "./index-qEdNh0wU.js";
1
+ import { k as g, g as p, l as d, G as l, C as w, n as m, p as f, q as E, I as R, r as y, S as C, u as I, e as T, w as v, x as i, y as h, O as S } from "./index-DdUmVLMz.js";
2
2
  function b({
3
3
  title: e,
4
4
  isDisabled: t = !1,
5
5
  handleClick: r = null,
6
6
  type: s = "button",
7
- className: i = ""
7
+ className: o = ""
8
8
  } = {}) {
9
9
  const a = document.createElement("button");
10
10
  return a.type = s, a.disabled = t, a.className = [
@@ -17,7 +17,7 @@ function b({
17
17
  "wgt:disabled:cursor-not-allowed",
18
18
  "wgt:cursor-pointer",
19
19
  "wgt:hover:text-primary-hover-text",
20
- i
20
+ o
21
21
  ].filter(Boolean).join(" "), a.innerText = e, typeof r == "function" && a.addEventListener("click", async (c) => {
22
22
  if (!a.disabled) {
23
23
  a.disabled = !0;
@@ -76,23 +76,25 @@ async function x(e, t) {
76
76
  async function $() {
77
77
  return await n.get(l);
78
78
  }
79
- const k = (e) => new Intl.NumberFormat("vi-VN").format(e), S = "1.125.4";
80
- async function A({ search: e, bank: t }) {
81
- return (await n.get(`${o}`, {
79
+ const k = (e) => new Intl.NumberFormat("vi-VN").format(e), _ = "1.125.6";
80
+ async function A({ search: e, bank: t, provider: r }) {
81
+ return (await n.get(`${i}`, {
82
82
  params: {
83
83
  isActive: !0,
84
84
  search: e || null,
85
85
  type: "service",
86
- bank: t
86
+ bank: t,
87
+ provider: r
87
88
  }
88
89
  })).data;
89
90
  }
90
- async function M({ bank: e }) {
91
- return (await n.get(`${o}`, {
91
+ async function M({ bank: e, provider: t }) {
92
+ return (await n.get(`${i}`, {
92
93
  params: {
93
94
  isActive: !0,
94
95
  type: "initial_fee",
95
- bank: e
96
+ bank: e,
97
+ provider: t
96
98
  }
97
99
  })).data;
98
100
  }
@@ -100,9 +102,10 @@ async function q({
100
102
  bank: e,
101
103
  hasRenew: t,
102
104
  isCashRegister: r,
103
- customerType: s
105
+ customerType: s,
106
+ provider: o
104
107
  }) {
105
- return (await n.get(`${o}`, {
108
+ return (await n.get(`${i}`, {
106
109
  params: {
107
110
  isActive: !0,
108
111
  type: "service",
@@ -110,17 +113,19 @@ async function q({
110
113
  hasRenew: t,
111
114
  limit: 99,
112
115
  isCashRegister: r,
113
- customerType: "ENTERPRISE"
116
+ customerType: "ENTERPRISE",
117
+ provider: o
114
118
  }
115
119
  })).data;
116
120
  }
117
- async function B({ bank: e }) {
118
- return (await n.get(`${o}`, {
121
+ async function B({ bank: e, provider: t }) {
122
+ return (await n.get(`${i}`, {
119
123
  params: {
120
124
  isActive: !0,
121
125
  type: "signature",
122
126
  bank: e,
123
- limit: 99
127
+ limit: 99,
128
+ provider: t
124
129
  }
125
130
  })).data;
126
131
  }
@@ -138,19 +143,24 @@ async function G(e) {
138
143
  headers: {
139
144
  "Content-Type": "multipart/form-data",
140
145
  "X-Invoice-Widget-Mode": T(),
141
- "X-Invoice-Widget-Version": S
146
+ "X-Invoice-Widget-Version": _
142
147
  }
143
148
  });
144
149
  }
145
150
  async function W(e) {
146
- return await n.get(`${O}/${e}/status`);
151
+ return await n.get(`${S}/${e}/status`);
147
152
  }
148
- async function F({ isRenewable: e, serialNumber: t } = {}) {
149
- const r = {
153
+ async function F({
154
+ isRenewable: e,
155
+ serialNumber: t,
156
+ provider: r
157
+ } = {}) {
158
+ const s = {
150
159
  isRenewable: !!e,
151
- serialNumber: (t ?? "").trim()
160
+ serialNumber: (t ?? "").trim(),
161
+ provider: r
152
162
  };
153
- return console.log("PROMO params:", r), (await n.get(v, { params: r })).data;
163
+ return (await n.get(v, { params: s })).data;
154
164
  }
155
165
  async function V(e) {
156
166
  return await n.post(`${h}/${e}`);