@tesouro/embedded-components-react 0.5.28 → 0.5.31
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/README.md +14 -13
- package/dist/index.css +15 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -0
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +155 -151
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +52 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +57 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +68 -207
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +278 -175
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +53 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +204 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +532 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -436
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +42 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +230 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -233
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +122 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +206 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -213
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +123 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +158 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +100 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +103 -146
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +93 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +15 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +43 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +55 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +33 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +34 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -201
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +39 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +187 -350
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +3 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +13 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +356 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +87 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +25 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +90 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +26 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +30 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +9 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +85 -104
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +92 -87
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +126 -105
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +0 -28
|
@@ -7,144 +7,149 @@ import { useCreateCounterpartMutation as t, useUpdateCounterpartMutation as n }
|
|
|
7
7
|
import { useCreateCounterpartBankAccountMutation as r, useUpdateCounterpartBankAccountMutation as i } from "../../../data-access/dist/index5.js";
|
|
8
8
|
import { useCreateCounterpartAddressMutation as a, useUpdateCounterpartAddressMutation as o } from "../../../data-access/dist/index7.js";
|
|
9
9
|
import "../../../data-access/dist/index.js";
|
|
10
|
-
import { addressFormToCreatePayload as s, addressFormToUpdatePayload as c, addressResponseToFormValues as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartFormToCreatePayload as f, counterpartFormToUpdatePayload as p, counterpartToFormValues as m, emptyCounterpartFormValues as h, getAchInstructions as g, hasCounterpartFormAddressValues as _, hasCounterpartFormBankAccountValues as v, hasCounterpartFormErrors as
|
|
11
|
-
import { useCallback as
|
|
10
|
+
import { addressFormToCreatePayload as s, addressFormToUpdatePayload as c, addressResponseToFormValues as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartFormToCreatePayload as f, counterpartFormToUpdatePayload as p, counterpartToFormValues as m, emptyCounterpartFormValues as h, getAchInstructions as g, hasCounterpartFormAddressValues as _, hasCounterpartFormBankAccountValues as v, hasCounterpartFormErrors as ee, resolveCounterpartBankAccountWrite as y, validateCounterpartForm as b } from "./helpers.js";
|
|
11
|
+
import { useCallback as x, useState as S } from "react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js
|
|
13
|
-
function
|
|
13
|
+
function C(e, t) {
|
|
14
14
|
if (!t) return _(e);
|
|
15
15
|
let n = l(t);
|
|
16
16
|
return e.address.line1.trim() !== n.line1.trim() || e.address.line2.trim() !== n.line2.trim() || e.address.city.trim() !== n.city.trim() || e.address.state.trim() !== n.state.trim() || e.address.postalCode.trim() !== n.postalCode.trim();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function w(e) {
|
|
19
19
|
return {
|
|
20
20
|
accountHolderName: e.account_holder_name ?? "",
|
|
21
21
|
routingNumber: e.routing_number ?? "",
|
|
22
22
|
accountNumber: e.account_number ?? ""
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function T(e, t) {
|
|
26
26
|
if (!t) return v(e);
|
|
27
|
-
let n =
|
|
27
|
+
let n = w(t);
|
|
28
28
|
return e.bankAccount.accountHolderName.trim() !== n.accountHolderName.trim() || e.bankAccount.routingNumber.trim() !== n.routingNumber.trim() || e.bankAccount.accountNumber.trim() !== n.accountNumber.trim();
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let L = t(),
|
|
30
|
+
function E({ view: l, setView: E, selectedId: D, setSelectedId: O, messages: k, counterpartType: A, counterpart: j, primaryAddress: M, bankAccounts: N, isBankAccountsLoading: P, isBankAccountsError: F, includeBankAccount: I = !0 }) {
|
|
31
|
+
let L = A === "vendor" && I, R = t(), z = a(), B = r(), V = n(), H = o(), U = i(), [W, G] = S(() => h()), [K, q] = S({}), [J, Y] = S({
|
|
32
32
|
address: !1,
|
|
33
33
|
bankAccount: !1
|
|
34
|
-
}), [
|
|
35
|
-
|
|
36
|
-
address:
|
|
34
|
+
}), [X, Z] = S(), [Q, $] = S(), te = R.isPending || z.isPending || B.isPending || U.isPending || V.isPending || H.isPending, ne = x(() => {
|
|
35
|
+
O(void 0), $(void 0), Z(void 0), Y({
|
|
36
|
+
address: A === "vendor",
|
|
37
37
|
bankAccount: !1
|
|
38
|
-
}),
|
|
38
|
+
}), G(h("organization", A)), q({}), E("create");
|
|
39
39
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
]),
|
|
44
|
-
if (!
|
|
45
|
-
let e = g(
|
|
46
|
-
|
|
40
|
+
A,
|
|
41
|
+
O,
|
|
42
|
+
E
|
|
43
|
+
]), re = x(() => {
|
|
44
|
+
if (!j || L && (P || F)) return;
|
|
45
|
+
let e = L ? g(N) : void 0, t = m(j, M);
|
|
46
|
+
$(void 0), Z(e?.id), Y({
|
|
47
47
|
address: _(t),
|
|
48
48
|
bankAccount: !1
|
|
49
|
-
}),
|
|
49
|
+
}), G({
|
|
50
50
|
...t,
|
|
51
|
-
...e ? { bankAccount:
|
|
52
|
-
}),
|
|
51
|
+
...e ? { bankAccount: w(e) } : {}
|
|
52
|
+
}), q({}), E("edit");
|
|
53
53
|
}, [
|
|
54
|
-
|
|
55
|
-
M,
|
|
54
|
+
N,
|
|
56
55
|
j,
|
|
57
|
-
I,
|
|
58
56
|
F,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
P,
|
|
58
|
+
M,
|
|
59
|
+
E,
|
|
60
|
+
L
|
|
61
|
+
]), ie = x(() => {
|
|
62
|
+
E("none");
|
|
63
|
+
}, [E]);
|
|
64
64
|
return {
|
|
65
|
-
values:
|
|
66
|
-
errors:
|
|
67
|
-
setValues:
|
|
68
|
-
isSubmitting:
|
|
69
|
-
sectionsToExpand:
|
|
70
|
-
expandAddress:
|
|
71
|
-
|
|
65
|
+
values: W,
|
|
66
|
+
errors: K,
|
|
67
|
+
setValues: G,
|
|
68
|
+
isSubmitting: te,
|
|
69
|
+
sectionsToExpand: J,
|
|
70
|
+
expandAddress: x(() => {
|
|
71
|
+
Y((e) => ({
|
|
72
72
|
...e,
|
|
73
73
|
address: !0
|
|
74
74
|
}));
|
|
75
75
|
}, []),
|
|
76
|
-
openCreate:
|
|
77
|
-
openEdit:
|
|
78
|
-
close:
|
|
79
|
-
submit:
|
|
80
|
-
let t = l === "edit" ? "edit" : "create", n =
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
K({}), J({
|
|
76
|
+
openCreate: ne,
|
|
77
|
+
openEdit: re,
|
|
78
|
+
close: ie,
|
|
79
|
+
submit: x(async () => {
|
|
80
|
+
let t = l === "edit" ? "edit" : "create", n = b(W, t, k, A, t === "edit" && L && !!X);
|
|
81
|
+
if (ee(n)) return q(n), Y((e) => ({
|
|
82
|
+
address: e.address || !!n.address,
|
|
83
|
+
bankAccount: e.bankAccount || !!n.bankAccount
|
|
84
|
+
})), { ok: !1 };
|
|
85
|
+
q({}), Y({
|
|
89
86
|
address: !1,
|
|
90
87
|
bankAccount: !1
|
|
91
88
|
});
|
|
92
|
-
let r =
|
|
89
|
+
let r = Q;
|
|
93
90
|
try {
|
|
94
|
-
if (l === "edit" &&
|
|
95
|
-
|
|
96
|
-
path: { counterpart_id:
|
|
97
|
-
body: p(
|
|
91
|
+
if (l === "edit" && D) {
|
|
92
|
+
$(void 0), await V.mutateAsync({
|
|
93
|
+
path: { counterpart_id: D },
|
|
94
|
+
body: p(W, A)
|
|
98
95
|
});
|
|
99
|
-
let e =
|
|
96
|
+
let e = M ? C(W, M) ? H.mutateAsync({
|
|
100
97
|
path: {
|
|
101
|
-
counterpart_id:
|
|
102
|
-
address_id:
|
|
98
|
+
counterpart_id: D,
|
|
99
|
+
address_id: M.id
|
|
103
100
|
},
|
|
104
|
-
body: c(
|
|
105
|
-
}) : void 0 : _(
|
|
106
|
-
path: { counterpart_id:
|
|
107
|
-
body: s(
|
|
108
|
-
}) : void 0, t =
|
|
101
|
+
body: c(W.address)
|
|
102
|
+
}) : void 0 : _(W) ? z.mutateAsync({
|
|
103
|
+
path: { counterpart_id: D },
|
|
104
|
+
body: s(W.address)
|
|
105
|
+
}) : void 0, t = L && T(W, g(N)) ? y(N, X) : void 0, n = t?.kind === "update" ? U.mutateAsync({
|
|
109
106
|
path: {
|
|
110
|
-
counterpart_id:
|
|
107
|
+
counterpart_id: D,
|
|
111
108
|
bank_account_id: t.bankAccountId
|
|
112
109
|
},
|
|
113
|
-
body: d(
|
|
114
|
-
}) : t?.kind === "create" ?
|
|
115
|
-
path: { counterpart_id:
|
|
116
|
-
body: u(
|
|
110
|
+
body: d(W.bankAccount, { includeAchDefaults: t.includeAchDefaults })
|
|
111
|
+
}) : t?.kind === "create" ? B.mutateAsync({
|
|
112
|
+
path: { counterpart_id: D },
|
|
113
|
+
body: u(W.bankAccount, { isDefaultForCurrency: t.isDefaultForCurrency })
|
|
117
114
|
}) : void 0, [r, i] = await Promise.allSettled([e, n]);
|
|
118
|
-
if (t?.kind === "create" && i.status === "fulfilled" &&
|
|
115
|
+
if (t?.kind === "create" && i.status === "fulfilled" && Z(i.value?.id), r.status === "rejected") throw r.reason;
|
|
119
116
|
if (i.status === "rejected") throw i.reason;
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
return E("none"), {
|
|
118
|
+
ok: !0,
|
|
119
|
+
counterpartId: D
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return r ||= (await R.mutateAsync({ body: f(W, A) }))?.id, r && L && v(W) && ($(r), await B.mutateAsync({
|
|
122
123
|
path: { counterpart_id: r },
|
|
123
|
-
body: u(
|
|
124
|
-
})),
|
|
124
|
+
body: u(W.bankAccount)
|
|
125
|
+
})), $(void 0), E("none"), r && O(r), {
|
|
126
|
+
ok: !0,
|
|
127
|
+
counterpartId: r
|
|
128
|
+
};
|
|
125
129
|
} catch (t) {
|
|
126
|
-
r && (
|
|
130
|
+
return r && ($(r), O(r)), q({ form: e(t) ?? k.genericError }), { ok: !1 };
|
|
127
131
|
}
|
|
128
132
|
}, [
|
|
129
133
|
l,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
W,
|
|
135
|
+
D,
|
|
136
|
+
Q,
|
|
137
|
+
k,
|
|
133
138
|
A,
|
|
134
|
-
|
|
139
|
+
M,
|
|
135
140
|
N,
|
|
136
|
-
|
|
137
|
-
Y,
|
|
138
|
-
R,
|
|
141
|
+
X,
|
|
139
142
|
z,
|
|
140
|
-
L,
|
|
141
|
-
V,
|
|
142
|
-
H,
|
|
143
143
|
B,
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
R,
|
|
145
|
+
H,
|
|
146
|
+
U,
|
|
147
|
+
V,
|
|
148
|
+
E,
|
|
149
|
+
O,
|
|
150
|
+
L
|
|
146
151
|
])
|
|
147
152
|
};
|
|
148
153
|
}
|
|
149
154
|
//#endregion
|
|
150
|
-
export {
|
|
155
|
+
export { E as useCounterpartForm };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.31", n = "c07219435de2aa7cc613f43fc993c42d9f6c739d", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -10,120 +10,141 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
|
10
10
|
import { useControllableState as g } from "@radix-ui/react-use-controllable-state";
|
|
11
11
|
import { Check as _, X as v } from "lucide-react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
|
|
13
|
-
function y({
|
|
14
|
-
|
|
13
|
+
function y({ isFullScreenInline: e, className: t, children: n }) {
|
|
14
|
+
return m(e ? "h2" : a, {
|
|
15
|
+
className: t,
|
|
16
|
+
children: n
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function b({ isFullScreenInline: e, className: t, children: n }) {
|
|
20
|
+
return m(e ? "p" : i, {
|
|
21
|
+
className: t,
|
|
22
|
+
children: n
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline: S = !1, title: C, subtitle: w, stepLabels: T, activeStep: E, disclaimerText: D, onBack: O, onNext: k, onCancel: A, isBackDisabled: j = !1, showDismissButton: M = !0, isNextDisabled: N = !1, isNextLoading: P = !1, nextLabel: F, nextIcon: I, errorMessage: L, children: R, labels: z, testIds: B }) {
|
|
26
|
+
let V = {
|
|
15
27
|
...c,
|
|
16
|
-
...
|
|
17
|
-
}, [
|
|
18
|
-
prop:
|
|
19
|
-
defaultProp:
|
|
28
|
+
...z
|
|
29
|
+
}, [H, U] = g({
|
|
30
|
+
prop: i,
|
|
31
|
+
defaultProp: a,
|
|
20
32
|
onChange: x
|
|
21
|
-
}), [
|
|
22
|
-
|
|
23
|
-
}, []),
|
|
33
|
+
}), [W, G] = p.useState(null), K = p.useCallback((e) => {
|
|
34
|
+
G(e);
|
|
35
|
+
}, []), q = p.useMemo(() => ({
|
|
36
|
+
container: W,
|
|
37
|
+
isFullScreenInline: S
|
|
38
|
+
}), [W, S]), J = !P && (I === void 0 ? /* @__PURE__ */ m(_, {
|
|
24
39
|
className: "ttw:size-5",
|
|
25
40
|
"aria-hidden": !0
|
|
26
|
-
}) :
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
}) : I), Y = M && !S, X = /* @__PURE__ */ h("div", {
|
|
42
|
+
ref: K,
|
|
43
|
+
className: S ? "ttw:relative ttw:grid ttw:h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background" : "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
|
|
44
|
+
"data-testid": S ? B?.root : void 0,
|
|
45
|
+
children: [
|
|
46
|
+
Y ? /* @__PURE__ */ h(n, {
|
|
47
|
+
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
|
|
48
|
+
"data-testid": B?.dismiss,
|
|
49
|
+
children: [/* @__PURE__ */ m(v, {
|
|
50
|
+
className: "ttw:size-4",
|
|
51
|
+
"aria-hidden": !0
|
|
52
|
+
}), /* @__PURE__ */ m("span", {
|
|
53
|
+
className: "ttw:sr-only",
|
|
54
|
+
children: V.dismissAriaLabel
|
|
55
|
+
})]
|
|
56
|
+
}) : null,
|
|
57
|
+
/* @__PURE__ */ h("header", {
|
|
58
|
+
className: Y ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ m(y, {
|
|
61
|
+
isFullScreenInline: S,
|
|
62
|
+
className: "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground",
|
|
63
|
+
children: C
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ m(b, {
|
|
66
|
+
isFullScreenInline: S,
|
|
67
|
+
className: "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
|
|
68
|
+
children: w
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ m(l, {
|
|
71
|
+
stepLabels: T,
|
|
72
|
+
activeStep: E,
|
|
73
|
+
labels: z
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ m(f, {
|
|
78
|
+
activeStep: E,
|
|
79
|
+
scrollForMoreLabel: V.scrollForMore,
|
|
80
|
+
testIds: B?.scrollRegion,
|
|
81
|
+
children: R
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ h("footer", {
|
|
84
|
+
className: "ttw:px-8 ttw:pb-8",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ m(o, { className: "ttw:mb-3" }),
|
|
87
|
+
/* @__PURE__ */ h("div", {
|
|
88
|
+
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
|
|
89
|
+
children: [/* @__PURE__ */ m("p", {
|
|
90
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
91
|
+
children: D
|
|
92
|
+
}), /* @__PURE__ */ m(d, {})]
|
|
93
|
+
}),
|
|
94
|
+
L ? /* @__PURE__ */ m(s, {
|
|
95
|
+
className: "ttw:mb-3",
|
|
96
|
+
children: L
|
|
97
|
+
}) : null,
|
|
98
|
+
/* @__PURE__ */ h("div", {
|
|
99
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
100
|
+
children: [/* @__PURE__ */ m(e, {
|
|
101
|
+
type: "button",
|
|
102
|
+
variant: "outline",
|
|
103
|
+
disabled: j || P,
|
|
104
|
+
onClick: O,
|
|
105
|
+
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
106
|
+
"data-testid": B?.back,
|
|
107
|
+
children: V.backButton
|
|
108
|
+
}), /* @__PURE__ */ h("div", {
|
|
109
|
+
className: "ttw:flex ttw:items-center ttw:gap-3",
|
|
110
|
+
children: [A ? /* @__PURE__ */ m(e, {
|
|
111
|
+
type: "button",
|
|
112
|
+
variant: "outline",
|
|
113
|
+
disabled: P,
|
|
114
|
+
onClick: A,
|
|
115
|
+
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
116
|
+
"data-testid": B?.cancel,
|
|
117
|
+
children: V.cancelButton
|
|
118
|
+
}) : null, /* @__PURE__ */ h(e, {
|
|
119
|
+
type: "button",
|
|
120
|
+
disabled: N || P,
|
|
121
|
+
loading: P,
|
|
122
|
+
onClick: k,
|
|
123
|
+
className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
|
|
124
|
+
"data-testid": B?.next,
|
|
125
|
+
children: [F, J]
|
|
126
|
+
})]
|
|
127
|
+
})]
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
return S ? /* @__PURE__ */ m(u.Provider, {
|
|
134
|
+
value: q,
|
|
135
|
+
children: X
|
|
136
|
+
}) : /* @__PURE__ */ m(t, {
|
|
137
|
+
open: H,
|
|
138
|
+
onOpenChange: U,
|
|
30
139
|
children: /* @__PURE__ */ m(u.Provider, {
|
|
31
|
-
value:
|
|
140
|
+
value: q,
|
|
32
141
|
children: /* @__PURE__ */ m(r, {
|
|
33
142
|
className: "ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
|
|
34
|
-
"data-testid":
|
|
35
|
-
children:
|
|
36
|
-
ref: G,
|
|
37
|
-
className: "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
|
|
38
|
-
children: [
|
|
39
|
-
j ? /* @__PURE__ */ h(n, {
|
|
40
|
-
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
|
|
41
|
-
"data-testid": z?.dismiss,
|
|
42
|
-
children: [/* @__PURE__ */ m(v, {
|
|
43
|
-
className: "ttw:size-4",
|
|
44
|
-
"aria-hidden": !0
|
|
45
|
-
}), /* @__PURE__ */ m("span", {
|
|
46
|
-
className: "ttw:sr-only",
|
|
47
|
-
children: B.dismissAriaLabel
|
|
48
|
-
})]
|
|
49
|
-
}) : null,
|
|
50
|
-
/* @__PURE__ */ h("header", {
|
|
51
|
-
className: j ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ m(a, {
|
|
54
|
-
className: "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground",
|
|
55
|
-
children: S
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ m(i, {
|
|
58
|
-
className: "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
|
|
59
|
-
children: C
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ m(l, {
|
|
62
|
-
stepLabels: w,
|
|
63
|
-
activeStep: T,
|
|
64
|
-
labels: R
|
|
65
|
-
})
|
|
66
|
-
]
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ m(f, {
|
|
69
|
-
activeStep: T,
|
|
70
|
-
scrollForMoreLabel: B.scrollForMore,
|
|
71
|
-
testIds: z?.scrollRegion,
|
|
72
|
-
children: L
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ h("footer", {
|
|
75
|
-
className: "ttw:px-8 ttw:pb-8",
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ m(o, { className: "ttw:mb-3" }),
|
|
78
|
-
/* @__PURE__ */ h("div", {
|
|
79
|
-
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
|
|
80
|
-
children: [/* @__PURE__ */ m("p", {
|
|
81
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
82
|
-
children: E
|
|
83
|
-
}), /* @__PURE__ */ m(d, {})]
|
|
84
|
-
}),
|
|
85
|
-
I ? /* @__PURE__ */ m(s, {
|
|
86
|
-
className: "ttw:mb-3",
|
|
87
|
-
children: I
|
|
88
|
-
}) : null,
|
|
89
|
-
/* @__PURE__ */ h("div", {
|
|
90
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
91
|
-
children: [/* @__PURE__ */ m(e, {
|
|
92
|
-
type: "button",
|
|
93
|
-
variant: "outline",
|
|
94
|
-
disabled: A || N,
|
|
95
|
-
onClick: D,
|
|
96
|
-
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
97
|
-
"data-testid": z?.back,
|
|
98
|
-
children: B.backButton
|
|
99
|
-
}), /* @__PURE__ */ h("div", {
|
|
100
|
-
className: "ttw:flex ttw:items-center ttw:gap-3",
|
|
101
|
-
children: [k ? /* @__PURE__ */ m(e, {
|
|
102
|
-
type: "button",
|
|
103
|
-
variant: "outline",
|
|
104
|
-
disabled: N,
|
|
105
|
-
onClick: k,
|
|
106
|
-
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
107
|
-
"data-testid": z?.cancel,
|
|
108
|
-
children: B.cancelButton
|
|
109
|
-
}) : null, /* @__PURE__ */ h(e, {
|
|
110
|
-
type: "button",
|
|
111
|
-
disabled: M || N,
|
|
112
|
-
loading: N,
|
|
113
|
-
onClick: O,
|
|
114
|
-
className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
|
|
115
|
-
"data-testid": z?.next,
|
|
116
|
-
children: [P, K]
|
|
117
|
-
})]
|
|
118
|
-
})]
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
})
|
|
143
|
+
"data-testid": B?.root,
|
|
144
|
+
children: X
|
|
124
145
|
})
|
|
125
146
|
})
|
|
126
147
|
});
|
|
127
148
|
}
|
|
128
149
|
//#endregion
|
|
129
|
-
export { c as ONBOARDING_SHELL_LABELS_EN,
|
|
150
|
+
export { c as ONBOARDING_SHELL_LABELS_EN, x as OnboardingShell, l as OnboardingShellStepper };
|
|
@@ -6,22 +6,29 @@ import * as e from "react";
|
|
|
6
6
|
import { createPortal as t } from "react-dom";
|
|
7
7
|
import { jsx as n } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js
|
|
9
|
-
var r = e.createContext(
|
|
9
|
+
var r = e.createContext({
|
|
10
|
+
container: null,
|
|
11
|
+
isFullScreenInline: !1
|
|
12
|
+
});
|
|
10
13
|
function i({ children: i, expandContainer: a = !1, testIds: o }) {
|
|
11
|
-
let s = e.useContext(r);
|
|
14
|
+
let { container: s, isFullScreenInline: c } = e.useContext(r);
|
|
12
15
|
e.useEffect(() => {
|
|
13
|
-
if (!s || !a) return;
|
|
16
|
+
if (!s || !a || c) return;
|
|
14
17
|
let e = s.style.minHeight;
|
|
15
18
|
return s.style.minHeight = "min(840px, 92vh)", () => {
|
|
16
19
|
s.style.minHeight = e;
|
|
17
20
|
};
|
|
18
|
-
}, [
|
|
19
|
-
|
|
21
|
+
}, [
|
|
22
|
+
s,
|
|
23
|
+
a,
|
|
24
|
+
c
|
|
25
|
+
]);
|
|
26
|
+
let l = /* @__PURE__ */ n("div", {
|
|
20
27
|
className: "ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-2xl ttw:bg-background",
|
|
21
28
|
"data-testid": o?.root,
|
|
22
29
|
children: i
|
|
23
30
|
});
|
|
24
|
-
return s ? t(
|
|
31
|
+
return s ? t(l, s) : l;
|
|
25
32
|
}
|
|
26
33
|
//#endregion
|
|
27
34
|
export { r as OnboardingShellOverlayContainerContext, i as OnboardingShellOverlayPortal };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
6
|
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/
|
|
7
|
+
import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index87.js";
|
|
8
8
|
import "../../../bill-pay-widget/feature/dist/index.js";
|
|
9
9
|
import { jsx as n } from "react/jsx-runtime";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
|
|
6
|
-
import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
7
|
-
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import { BillPayWidgetMonite as n } from "./index67.js";
|
|
9
|
-
import "./index68.js";
|
|
10
|
-
import { BillPayWidgetNative as r } from "./index86.js";
|
|
11
|
-
import "./index87.js";
|
|
12
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
13
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js
|
|
14
|
-
function a({ implementation: a, ...o }) {
|
|
15
|
-
let s = t().implementation, c = a ?? s ?? e.Monite;
|
|
16
|
-
return c === e.Native ? /* @__PURE__ */ i(r, {
|
|
17
|
-
implementation: c,
|
|
18
|
-
...o
|
|
19
|
-
}) : /* @__PURE__ */ i(n, {
|
|
20
|
-
implementation: c,
|
|
21
|
-
...o
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
export { a as BillPayWidget, a as default };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BILL_STATUS_BADGE_LABELS_EN as e } from "./index18.js";
|
|
2
|
-
import "./index20.js";
|
|
3
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js
|
|
4
|
-
var t = {
|
|
5
|
-
title: "Possible duplicate files",
|
|
6
|
-
descriptionFirstLine: "The following bills may be duplicates of each other.",
|
|
7
|
-
descriptionSecondLine: "You can keep or remove duplicates, or view them for more detail before making a decision.",
|
|
8
|
-
columnInvoiceNumber: "Invoice number",
|
|
9
|
-
columnAmount: "Amount",
|
|
10
|
-
columnStatus: "Status",
|
|
11
|
-
columnDueDate: "Due date",
|
|
12
|
-
columnAddedOn: "Added on",
|
|
13
|
-
columnActions: "Actions",
|
|
14
|
-
statusBadge: e,
|
|
15
|
-
removalHelperBeforeUnsubmitted: "Removing duplicates deletes ",
|
|
16
|
-
removalHelperUnsubmitted: "bills not yet submitted",
|
|
17
|
-
removalHelperBetween: ", and cancels ",
|
|
18
|
-
removalHelperSubmitted: "ones already submitted",
|
|
19
|
-
removalHelperAfterSubmitted: ". This action cannot be undone.",
|
|
20
|
-
removalOutcomeDelete: "Deletes this bill",
|
|
21
|
-
removalOutcomeCancel: "Cancels this bill",
|
|
22
|
-
keepSelectedButton: "Keep selected files as their own file",
|
|
23
|
-
removeDuplicatesButton: "Remove selected duplicates",
|
|
24
|
-
emptyState: "No possible duplicates left to review.",
|
|
25
|
-
errorState: "Couldn't load the possible duplicates. Try again shortly."
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { t as DUPLICATE_BILLS_DIALOG_LABELS_EN };
|