@txgw/payout-components 0.3.0 → 0.3.2
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.
|
@@ -88830,7 +88830,6 @@ const PdfViewer$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
88830
88830
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
88831
88831
|
export {
|
|
88832
88832
|
Toast as T,
|
|
88833
|
-
dataMapping as d,
|
|
88834
88833
|
render as r,
|
|
88835
88834
|
toast as t
|
|
88836
88835
|
};
|
package/dist/{component-beneficiary-form-BD2XaMAL.js → component-beneficiary-form-iyOi2OA3.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { bX as
|
|
2
|
-
import { t as
|
|
3
|
-
const
|
|
4
|
-
async function
|
|
1
|
+
import { bX as h, bY as $, ab as y, bZ as q } from "./vendor-DyrjuDU0.js";
|
|
2
|
+
import { t as J, r as M, T as Y } from "./amis--C-EQa43.js";
|
|
3
|
+
const K = "bankDetails";
|
|
4
|
+
async function O(t, n, o) {
|
|
5
5
|
const r = {
|
|
6
6
|
authorization_code: t,
|
|
7
7
|
code_verifier: o
|
|
@@ -14,7 +14,7 @@ async function j(t, n, o) {
|
|
|
14
14
|
}
|
|
15
15
|
})).json();
|
|
16
16
|
}
|
|
17
|
-
async function
|
|
17
|
+
async function N(t, n) {
|
|
18
18
|
const o = {
|
|
19
19
|
refresh_token: t
|
|
20
20
|
};
|
|
@@ -26,7 +26,7 @@ async function B(t, n) {
|
|
|
26
26
|
}
|
|
27
27
|
})).json();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function W(t) {
|
|
30
30
|
const n = Date.parse(t);
|
|
31
31
|
if (!isNaN(n)) {
|
|
32
32
|
const o = Date.now(), r = Math.floor((n - o) / 1e3);
|
|
@@ -34,39 +34,39 @@ function Q(t) {
|
|
|
34
34
|
}
|
|
35
35
|
return 0;
|
|
36
36
|
}
|
|
37
|
-
let
|
|
38
|
-
const
|
|
37
|
+
let m = null;
|
|
38
|
+
const z = 300;
|
|
39
39
|
function S(t, n) {
|
|
40
|
-
|
|
41
|
-
const o =
|
|
40
|
+
m && (clearTimeout(m), m = null);
|
|
41
|
+
const o = W(t);
|
|
42
42
|
if (o <= 0)
|
|
43
43
|
return;
|
|
44
44
|
const r = Math.max(
|
|
45
45
|
0,
|
|
46
|
-
(o -
|
|
46
|
+
(o - z) * 1e3
|
|
47
47
|
);
|
|
48
|
-
|
|
48
|
+
m = setTimeout(async () => {
|
|
49
49
|
try {
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
50
|
+
const i = localStorage.getItem("refresh_token");
|
|
51
|
+
if (!i)
|
|
52
52
|
return;
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const u = await N(
|
|
54
|
+
i,
|
|
55
55
|
n
|
|
56
56
|
);
|
|
57
|
-
|
|
57
|
+
u.access_token && u.refresh_token && (localStorage.setItem("access_token", u.access_token), localStorage.setItem(
|
|
58
58
|
"refresh_token",
|
|
59
|
-
|
|
60
|
-
), S(
|
|
61
|
-
} catch (
|
|
62
|
-
console.error("[payout-sdk] Auto refresh token failed:",
|
|
59
|
+
u.refresh_token
|
|
60
|
+
), S(u.expires_in, n));
|
|
61
|
+
} catch (i) {
|
|
62
|
+
console.error("[payout-sdk] Auto refresh token failed:", i), m && (clearTimeout(m), m = null);
|
|
63
63
|
}
|
|
64
64
|
}, r);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
66
|
+
function Q() {
|
|
67
|
+
m && (clearTimeout(m), m = null);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function j() {
|
|
70
70
|
localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token");
|
|
71
71
|
}
|
|
72
72
|
function R(t, n) {
|
|
@@ -75,15 +75,15 @@ function R(t, n) {
|
|
|
75
75
|
async function b(t, n, o, r = 1) {
|
|
76
76
|
if (r < 0)
|
|
77
77
|
throw new Error("[payout-sdk] fetchWithAuth retries exceeded");
|
|
78
|
-
const { headers:
|
|
78
|
+
const { headers: i, authCode: u, domain: p, codeVerifier: l } = o;
|
|
79
79
|
if (!localStorage.getItem("access_token")) {
|
|
80
|
-
const e = await
|
|
81
|
-
|
|
80
|
+
const e = await O(
|
|
81
|
+
u,
|
|
82
82
|
p,
|
|
83
|
-
|
|
83
|
+
l
|
|
84
84
|
);
|
|
85
85
|
if (!e.access_token || !e.refresh_token)
|
|
86
|
-
throw
|
|
86
|
+
throw j(), new Error(
|
|
87
87
|
"[payout-sdk] getAccessToken failed, check authCode validity"
|
|
88
88
|
);
|
|
89
89
|
R(
|
|
@@ -91,39 +91,39 @@ async function b(t, n, o, r = 1) {
|
|
|
91
91
|
e.refresh_token
|
|
92
92
|
), S(e.expires_in, p);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const _ = await fetch(new URL(t, p), {
|
|
95
95
|
...o,
|
|
96
96
|
body: JSON.stringify({
|
|
97
97
|
...n,
|
|
98
98
|
access_token: localStorage.getItem("access_token")
|
|
99
99
|
}),
|
|
100
100
|
headers: {
|
|
101
|
-
...
|
|
101
|
+
...i,
|
|
102
102
|
"Content-Type": "application/json"
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
-
if (
|
|
106
|
-
const e = await
|
|
105
|
+
if (_.status === 400) {
|
|
106
|
+
const e = await _.json();
|
|
107
107
|
if (e.name != "INTERNAL_ERROR" && e.name != "INVALID_TOKEN")
|
|
108
|
-
throw
|
|
108
|
+
throw J.error(`${e.name}: ${e.message}`), new Error(`[payout-sdk] ${e.name}: ${e.message}`);
|
|
109
109
|
const C = localStorage.getItem("refresh_token");
|
|
110
110
|
if (C) {
|
|
111
|
-
const
|
|
111
|
+
const k = await N(
|
|
112
112
|
C,
|
|
113
113
|
p
|
|
114
114
|
);
|
|
115
|
-
if (!
|
|
116
|
-
|
|
115
|
+
if (!k.access_token || !k.refresh_token)
|
|
116
|
+
j(), Q();
|
|
117
117
|
else
|
|
118
118
|
return R(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
), S(
|
|
119
|
+
k.access_token,
|
|
120
|
+
k.refresh_token
|
|
121
|
+
), S(k.expires_in, p), b(t, n, o, --r);
|
|
122
122
|
}
|
|
123
|
-
const d = await
|
|
124
|
-
|
|
123
|
+
const d = await O(
|
|
124
|
+
u,
|
|
125
125
|
p,
|
|
126
|
-
|
|
126
|
+
l
|
|
127
127
|
);
|
|
128
128
|
if (!d.access_token || !d.refresh_token)
|
|
129
129
|
throw new Error(
|
|
@@ -134,12 +134,12 @@ async function b(t, n, o, r = 1) {
|
|
|
134
134
|
d.refresh_token
|
|
135
135
|
), S(d.expires_in, p), b(t, n, o, --r);
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return _;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function A(t) {
|
|
140
140
|
return t && t.startsWith("zh") ? "zh_CN" : "en_US";
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function U(t, n, o) {
|
|
143
143
|
return (await (await b(
|
|
144
144
|
"/v1/payout/beneficiary/token/countryinfos",
|
|
145
145
|
{},
|
|
@@ -151,7 +151,7 @@ async function X(t, n, o) {
|
|
|
151
151
|
}
|
|
152
152
|
)).json()).country_infos || [];
|
|
153
153
|
}
|
|
154
|
-
async function
|
|
154
|
+
async function H(t, n, o, r) {
|
|
155
155
|
return await (await b(
|
|
156
156
|
"/v1/payout/beneficiary/token/paymentmethodinfos",
|
|
157
157
|
{
|
|
@@ -165,37 +165,37 @@ async function Z(t, n, o, r) {
|
|
|
165
165
|
}
|
|
166
166
|
)).json();
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
168
|
+
function X({ inputPayoutType: t, inputCurrency: n }, o, r, i) {
|
|
169
|
+
const u = [];
|
|
170
170
|
for (const p of Object.values(o.countries)) {
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
for (const [
|
|
174
|
-
|
|
171
|
+
const l = p.payoutTypes?.[t]?.currencies;
|
|
172
|
+
if (l)
|
|
173
|
+
for (const [f, _] of Object.entries(l))
|
|
174
|
+
f === n && u.push(_);
|
|
175
175
|
}
|
|
176
|
-
if (
|
|
176
|
+
if (u.length !== 0)
|
|
177
177
|
return {
|
|
178
178
|
type: "list-select",
|
|
179
179
|
name: "inputPaymentMethod",
|
|
180
180
|
label: r("paymentMethodInputLabel", "Transfer method"),
|
|
181
|
-
options:
|
|
181
|
+
options: u.map((p) => ({
|
|
182
182
|
value: p.payment_method,
|
|
183
|
-
body: /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
183
|
+
body: /* @__PURE__ */ h.jsxs("div", { children: [
|
|
184
|
+
/* @__PURE__ */ h.jsx("span", { className: "flex font-bold", children: p.display_name }),
|
|
185
|
+
/* @__PURE__ */ h.jsx("span", { className: "flex mt-1", children: p.description })
|
|
186
186
|
] })
|
|
187
187
|
})),
|
|
188
|
-
value:
|
|
188
|
+
value: i?.payment_method
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
async function
|
|
191
|
+
async function Z({
|
|
192
192
|
inputRegionCode: t,
|
|
193
193
|
inputCurrency: n,
|
|
194
194
|
inputPaymentMethod: o
|
|
195
|
-
}, r,
|
|
196
|
-
if (!t || !n || !o || !r || !
|
|
195
|
+
}, r, i, u) {
|
|
196
|
+
if (!t || !n || !o || !r || !i || !u)
|
|
197
197
|
return;
|
|
198
|
-
const
|
|
198
|
+
const f = await (await b(
|
|
199
199
|
"/v1/payout/beneficiary/form/schema/token/query",
|
|
200
200
|
{
|
|
201
201
|
payment_method: o,
|
|
@@ -208,64 +208,52 @@ async function V({
|
|
|
208
208
|
{
|
|
209
209
|
method: "POST",
|
|
210
210
|
authCode: r,
|
|
211
|
-
domain:
|
|
212
|
-
codeVerifier:
|
|
211
|
+
domain: i,
|
|
212
|
+
codeVerifier: u
|
|
213
213
|
}
|
|
214
214
|
)).json();
|
|
215
215
|
return JSON.parse(
|
|
216
|
-
|
|
216
|
+
f.beneficiary_schema.amis_page.replace(/Area Code/g, "AREA_CODE")
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function G({
|
|
220
220
|
authCode: t,
|
|
221
221
|
domain: n,
|
|
222
222
|
codeVerifier: o,
|
|
223
223
|
emitter: r,
|
|
224
|
-
defaultValues:
|
|
225
|
-
customizations:
|
|
224
|
+
defaultValues: i,
|
|
225
|
+
customizations: u,
|
|
226
226
|
locale: p
|
|
227
227
|
}) {
|
|
228
|
-
const { t:
|
|
229
|
-
inputPayoutType:
|
|
230
|
-
inputPaymentMethod:
|
|
231
|
-
inputRegionCode:
|
|
232
|
-
inputCurrency:
|
|
233
|
-
}), [d,
|
|
234
|
-
(a) => a.name ===
|
|
235
|
-
)?.hidden, [
|
|
236
|
-
(s) => {
|
|
237
|
-
if (!s) return;
|
|
238
|
-
const a = s.body.findIndex(
|
|
239
|
-
(m) => m.type === "form"
|
|
240
|
-
), u = s.body[a];
|
|
241
|
-
s.body[a].onFinished = (m) => {
|
|
242
|
-
const $ = K(u.api.data, m, void 0, !0);
|
|
243
|
-
r.emit("submit", $.value);
|
|
244
|
-
}, F(s);
|
|
245
|
-
},
|
|
246
|
-
[r]
|
|
247
|
-
), x = y.useMemo(() => {
|
|
228
|
+
const { t: l } = $("beneficiaryForm"), [f, _] = y.useState([]), [e, C] = y.useState({
|
|
229
|
+
inputPayoutType: i?.payout_type || "B2P",
|
|
230
|
+
inputPaymentMethod: i?.payment_method,
|
|
231
|
+
inputRegionCode: i?.region_code,
|
|
232
|
+
inputCurrency: i?.currency
|
|
233
|
+
}), [d, k] = y.useState(), [I, B] = y.useState(), w = y.useMemo(() => !u?.layout?.find(
|
|
234
|
+
(a) => a.name === K
|
|
235
|
+
)?.hidden, [u?.layout]), P = y.useMemo(() => {
|
|
248
236
|
const s = /* @__PURE__ */ new Set();
|
|
249
|
-
return
|
|
250
|
-
(
|
|
251
|
-
).map((
|
|
252
|
-
label:
|
|
253
|
-
value:
|
|
254
|
-
})).sort((
|
|
255
|
-
}, [
|
|
237
|
+
return f.filter(
|
|
238
|
+
(c) => c.country_number && !s.has(c.country_number) && s.add(c.country_number)
|
|
239
|
+
).map((c) => ({
|
|
240
|
+
label: c.country_name_standard || c.country_name,
|
|
241
|
+
value: c.country_code
|
|
242
|
+
})).sort((c, g) => c.label.localeCompare(g.label));
|
|
243
|
+
}, [f]), [v, L] = y.useState();
|
|
256
244
|
y.useEffect(() => {
|
|
257
245
|
if (!e?.inputRegionCode || !e?.inputPayoutType) return;
|
|
258
246
|
const s = e.inputRegionCode;
|
|
259
|
-
|
|
247
|
+
H(s, t, n, o).then(
|
|
260
248
|
(a) => {
|
|
261
|
-
|
|
262
|
-
const
|
|
249
|
+
k(a);
|
|
250
|
+
const c = Object.keys(
|
|
263
251
|
a.countries?.[s].payoutTypes?.[e.inputPayoutType]?.currencies
|
|
264
252
|
);
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
label:
|
|
268
|
-
value:
|
|
253
|
+
c && c.length > 0 && L(
|
|
254
|
+
c.map((g) => ({
|
|
255
|
+
label: g,
|
|
256
|
+
value: g
|
|
269
257
|
}))
|
|
270
258
|
);
|
|
271
259
|
}
|
|
@@ -277,25 +265,25 @@ function ee({
|
|
|
277
265
|
e?.inputPayoutType,
|
|
278
266
|
e?.inputRegionCode
|
|
279
267
|
]);
|
|
280
|
-
const
|
|
281
|
-
new Set(
|
|
268
|
+
const x = y.useMemo(() => Array.from(
|
|
269
|
+
new Set(f.map((a) => a.currency_code))
|
|
282
270
|
).map((a) => ({
|
|
283
271
|
label: a,
|
|
284
272
|
value: a
|
|
285
|
-
})).filter((a) => !!a.label && a.label !== "-").sort((a,
|
|
273
|
+
})).filter((a) => !!a.label && a.label !== "-").sort((a, c) => a.label.localeCompare(c.label)), [f]), T = y.useMemo(() => !e?.inputCurrency || !e?.inputPayoutType || !d ? void 0 : X(
|
|
286
274
|
{
|
|
287
275
|
inputPayoutType: e.inputPayoutType,
|
|
288
276
|
inputCurrency: e.inputCurrency
|
|
289
277
|
},
|
|
290
278
|
d,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
), [
|
|
294
|
-
if (!(
|
|
279
|
+
l,
|
|
280
|
+
i
|
|
281
|
+
), [i, e, d, l]), E = y.useMemo(() => {
|
|
282
|
+
if (!(f.length === 0 || !T || !e?.inputPaymentMethod || !e?.inputRegionCode || !e?.inputCurrency))
|
|
295
283
|
return I;
|
|
296
|
-
}, [
|
|
284
|
+
}, [f, e, I, T]);
|
|
297
285
|
y.useEffect(() => {
|
|
298
|
-
|
|
286
|
+
Z(
|
|
299
287
|
{
|
|
300
288
|
inputPaymentMethod: e.inputPaymentMethod,
|
|
301
289
|
inputRegionCode: e.inputRegionCode,
|
|
@@ -304,17 +292,35 @@ function ee({
|
|
|
304
292
|
t,
|
|
305
293
|
n,
|
|
306
294
|
o
|
|
307
|
-
).then(
|
|
295
|
+
).then((s) => {
|
|
296
|
+
if (!s) return;
|
|
297
|
+
const a = s.body.findIndex(
|
|
298
|
+
(c) => c.type === "form"
|
|
299
|
+
);
|
|
300
|
+
s.body[a].api.url = "/api/form", s.body[a].api.requestAdaptor = function(c, g) {
|
|
301
|
+
return c?.body?.value && r.emit("submit", c.body.value), {
|
|
302
|
+
mockResponse: {
|
|
303
|
+
status: 200,
|
|
304
|
+
data: {
|
|
305
|
+
status: 0,
|
|
306
|
+
data: {
|
|
307
|
+
name: "mock value"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
}, B(s);
|
|
313
|
+
});
|
|
308
314
|
}, [
|
|
309
|
-
|
|
315
|
+
f,
|
|
310
316
|
T,
|
|
311
317
|
t,
|
|
312
318
|
n,
|
|
313
319
|
o,
|
|
314
|
-
P,
|
|
315
320
|
e.inputCurrency,
|
|
316
321
|
e.inputPaymentMethod,
|
|
317
|
-
e.inputRegionCode
|
|
322
|
+
e.inputRegionCode,
|
|
323
|
+
r
|
|
318
324
|
]);
|
|
319
325
|
const D = y.useMemo(
|
|
320
326
|
() => ({
|
|
@@ -322,33 +328,33 @@ function ee({
|
|
|
322
328
|
visible: w,
|
|
323
329
|
body: {
|
|
324
330
|
type: "spinner",
|
|
325
|
-
show:
|
|
331
|
+
show: f.length === 0,
|
|
326
332
|
overlay: !0,
|
|
327
333
|
body: [
|
|
328
334
|
{
|
|
329
335
|
type: "form",
|
|
330
|
-
title:
|
|
336
|
+
title: l("title", "Bank Details"),
|
|
331
337
|
submitText: "",
|
|
332
338
|
onChange: (s) => {
|
|
333
|
-
const a = s.inputRegionCode,
|
|
339
|
+
const a = s.inputRegionCode, c = s.inputRegionCode ? s.inputCurrency : "", g = s.inputRegionCode ? s.inputPaymentMethod : "";
|
|
334
340
|
C({
|
|
335
341
|
inputPayoutType: s.inputPayoutType,
|
|
336
|
-
inputPaymentMethod:
|
|
342
|
+
inputPaymentMethod: g,
|
|
337
343
|
inputRegionCode: a,
|
|
338
|
-
inputCurrency:
|
|
344
|
+
inputCurrency: c
|
|
339
345
|
});
|
|
340
346
|
},
|
|
341
347
|
body: [
|
|
342
348
|
{
|
|
343
|
-
label:
|
|
349
|
+
label: l("regionInputLabel", "Bank Location"),
|
|
344
350
|
type: "input-text",
|
|
345
351
|
creatable: !1,
|
|
346
352
|
name: "inputRegionCode",
|
|
347
|
-
options:
|
|
353
|
+
options: P,
|
|
348
354
|
value: e?.inputRegionCode
|
|
349
355
|
},
|
|
350
356
|
{
|
|
351
|
-
label:
|
|
357
|
+
label: l("payoutTypeInputLabel", "Bank account type"),
|
|
352
358
|
type: "radios",
|
|
353
359
|
name: "inputPayoutType",
|
|
354
360
|
selectFirst: !0,
|
|
@@ -361,11 +367,11 @@ function ee({
|
|
|
361
367
|
value: e?.inputPayoutType
|
|
362
368
|
},
|
|
363
369
|
{
|
|
364
|
-
label:
|
|
370
|
+
label: l("currencyInputLabel", "Account currency"),
|
|
365
371
|
type: "input-text",
|
|
366
372
|
creatable: !1,
|
|
367
373
|
name: "inputCurrency",
|
|
368
|
-
options: e.inputRegionCode ? v ||
|
|
374
|
+
options: e.inputRegionCode ? v || x : [],
|
|
369
375
|
value: e?.inputCurrency
|
|
370
376
|
},
|
|
371
377
|
T
|
|
@@ -375,40 +381,59 @@ function ee({
|
|
|
375
381
|
}
|
|
376
382
|
}),
|
|
377
383
|
[
|
|
378
|
-
|
|
384
|
+
f.length,
|
|
379
385
|
e,
|
|
380
|
-
E,
|
|
381
|
-
v,
|
|
382
386
|
x,
|
|
387
|
+
v,
|
|
388
|
+
P,
|
|
383
389
|
w,
|
|
384
|
-
|
|
390
|
+
l,
|
|
385
391
|
T
|
|
386
392
|
]
|
|
387
393
|
);
|
|
388
|
-
|
|
394
|
+
y.useEffect(() => {
|
|
389
395
|
async function s() {
|
|
390
|
-
const a = await
|
|
396
|
+
const a = await U(
|
|
391
397
|
t,
|
|
392
398
|
n,
|
|
393
399
|
o
|
|
394
400
|
);
|
|
395
|
-
|
|
401
|
+
_(a);
|
|
396
402
|
}
|
|
397
403
|
s();
|
|
398
|
-
}, [t, o, n])
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
404
|
+
}, [t, o, n]);
|
|
405
|
+
const F = y.useMemo(
|
|
406
|
+
() => ({
|
|
407
|
+
fetcher: () => new Promise(() => ({
|
|
408
|
+
status: 200,
|
|
409
|
+
data: {
|
|
410
|
+
status: 0,
|
|
411
|
+
data: {
|
|
412
|
+
name: "mock value"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}))
|
|
402
416
|
}),
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
[]
|
|
418
|
+
);
|
|
419
|
+
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
420
|
+
/* @__PURE__ */ h.jsx(Y, {}),
|
|
421
|
+
M(D, {
|
|
422
|
+
locale: A(p)
|
|
423
|
+
}),
|
|
424
|
+
E && M(
|
|
425
|
+
E,
|
|
426
|
+
{
|
|
427
|
+
locale: A(p)
|
|
428
|
+
},
|
|
429
|
+
F
|
|
430
|
+
)
|
|
406
431
|
] });
|
|
407
432
|
}
|
|
408
|
-
function
|
|
433
|
+
function te(t) {
|
|
409
434
|
const { mi18n: n } = t;
|
|
410
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ h.jsx(q, { mi18n: n, fallback: "Loading...", children: /* @__PURE__ */ h.jsx(G, { ...t }) });
|
|
411
436
|
}
|
|
412
437
|
export {
|
|
413
|
-
|
|
438
|
+
te as default
|
|
414
439
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -27,36 +27,17 @@ declare interface BeneficiaryFormDefaultValues {
|
|
|
27
27
|
payment_method?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
declare type BeneficiaryFormFinalValues = Record<string, unknown>;
|
|
31
|
+
|
|
30
32
|
declare type BeneficiaryFormOptions<T extends keyof typeof ElementsMap> = Omit<BeneficiaryFormProps, keyof BaseProps<T>>;
|
|
31
33
|
|
|
32
34
|
declare type BeneficiaryFormProps = ComponentProps<typeof BeneficiaryForm>;
|
|
33
35
|
|
|
34
|
-
declare interface BeneficiaryFormRequest {
|
|
35
|
-
"@type": string;
|
|
36
|
-
value: BeneficiaryFormRequestValues;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare interface BeneficiaryFormRequestValues {
|
|
40
|
-
beneficiary: {
|
|
41
|
-
address: {
|
|
42
|
-
country: string;
|
|
43
|
-
street_address: string;
|
|
44
|
-
};
|
|
45
|
-
bank_account: {
|
|
46
|
-
account_name: string;
|
|
47
|
-
account_number: string;
|
|
48
|
-
};
|
|
49
|
-
entity_details: {
|
|
50
|
-
mobile_number: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
36
|
export declare function createElement<T extends keyof typeof ElementsMap>(type: T, options?: ElementOptionsTypes<T>[T]): SDKComponent<T>;
|
|
56
37
|
|
|
57
38
|
declare interface ElementEventsMap extends Record<EventType, unknown> {
|
|
58
39
|
beneficiaryForm: {
|
|
59
|
-
submit:
|
|
40
|
+
submit: BeneficiaryFormFinalValues;
|
|
60
41
|
};
|
|
61
42
|
}
|
|
62
43
|
|
package/dist/index.js
CHANGED