@tesouro/embedded-components-react 0.11.167 → 0.11.169
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/dist/index.d.ts +3 -0
- package/dist/lib/BankAccountsWidget.d.ts +1 -0
- package/dist/lib/CreditCardsWidget.d.ts +1 -0
- package/dist/lib/DebitCardsWidget.d.ts +1 -0
- package/dist/lib/LinkedAccountsWidget.d.ts +1 -0
- package/dist/lib/WidgetSuite.d.ts +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +122 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +63 -59
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +161 -160
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +126 -122
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +192 -191
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +100 -96
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -15,190 +15,190 @@ import { useAllOrganizationUsersQuery as oe } from "../../../../shared/data-acce
|
|
|
15
15
|
import "../../../../shared/data-access/dist/index.js";
|
|
16
16
|
import "../../../../shared/ui/dist/index.js";
|
|
17
17
|
import { useAnalyticsTrack as se } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
18
|
-
import { useRefetchWidget as ce, useWidgetConfig as le, useWidgetError as ue,
|
|
18
|
+
import { useRefetchWidget as ce, useWidgetConfig as le, useWidgetError as ue, useWidgetInitStaleForToken as de, useWidgetLoading as fe } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
19
19
|
import "../../../../shared/feature/dist/index.js";
|
|
20
|
-
import { filterRolesForOrganization as
|
|
21
|
-
import { filterUsersForOrganization as
|
|
22
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
20
|
+
import { filterRolesForOrganization as pe } from "../../../../../shared/util-validation/dist/index6.js";
|
|
21
|
+
import { filterUsersForOrganization as me } from "../../../../../shared/util-validation/dist/index7.js";
|
|
22
|
+
import { DEFAULT_FEATURE_LABELS as he } from "./labels.js";
|
|
23
23
|
import { LinkedAccountsWidgetAnalyticsEvent as i } from "./analytics/events.js";
|
|
24
|
-
import { EMPTY_CONNECT_FORM as
|
|
25
|
-
import { getLinkedAccountsPermissions as
|
|
26
|
-
import { toAccountRows as
|
|
27
|
-
import { fromApiAccountHolderType as
|
|
28
|
-
import { useConnectExternalBankAccountMutation as
|
|
29
|
-
import { useExternalBankAccountsQuery as
|
|
30
|
-
import { useGrantExternalBankAccountAccessMutation as
|
|
31
|
-
import { useLinkExternalBankAccountMutation as
|
|
32
|
-
import { useUnlinkExternalBankAccountMutation as
|
|
33
|
-
import { useUpdateExternalBankAccountMutation as
|
|
34
|
-
import { useValidateExternalBankAccountMutation as
|
|
24
|
+
import { EMPTY_CONNECT_FORM as ge, EMPTY_EDIT_FORM as _e, EMPTY_VERIFY_FORM as ve, isConnectStep1Valid as ye, isRoutingNumberValid as be, isVerifyAmountInRange as xe, isVerifyFormValid as Se, parseVerifyAmountToMinorUnits as Ce, sanitizeRoutingNumberInput as we, toEditForm as Te, toUpdateBody as Ee } from "./forms.js";
|
|
25
|
+
import { getLinkedAccountsPermissions as De } from "./permissions.js";
|
|
26
|
+
import { toAccountRows as Oe } from "./rows.js";
|
|
27
|
+
import { fromApiAccountHolderType as ke, toApiAccountHolderType as Ae, toSummaryTypeLabel as je, toTextParts as a } from "./summary.js";
|
|
28
|
+
import { useConnectExternalBankAccountMutation as Me } from "../../../data-access/dist/index3.js";
|
|
29
|
+
import { useExternalBankAccountsQuery as Ne } from "../../../data-access/dist/index4.js";
|
|
30
|
+
import { useGrantExternalBankAccountAccessMutation as Pe } from "../../../data-access/dist/index5.js";
|
|
31
|
+
import { useLinkExternalBankAccountMutation as Fe } from "../../../data-access/dist/index6.js";
|
|
32
|
+
import { useUnlinkExternalBankAccountMutation as Ie } from "../../../data-access/dist/index9.js";
|
|
33
|
+
import { useUpdateExternalBankAccountMutation as Le } from "../../../data-access/dist/index10.js";
|
|
34
|
+
import { useValidateExternalBankAccountMutation as Re } from "../../../data-access/dist/index11.js";
|
|
35
35
|
import "../../../data-access/dist/index.js";
|
|
36
|
-
import { useAdminEligibleUserIds as
|
|
37
|
-
import { toAccessRows as
|
|
38
|
-
import { DEFAULT_LABELS as
|
|
36
|
+
import { useAdminEligibleUserIds as ze } from "./useAdminEligibleUserIds.js";
|
|
37
|
+
import { toAccessRows as Be, toOrganizationRoleOptions as Ve, toTeamMembers as He } from "./teamMembers.js";
|
|
38
|
+
import { DEFAULT_LABELS as Ue } from "../../../ui/dist/index13.js";
|
|
39
39
|
import "../../../ui/dist/index.js";
|
|
40
|
-
import { useCallback as
|
|
41
|
-
import { useControllableState as
|
|
40
|
+
import { useCallback as We, useEffect as Ge, useMemo as o, useState as s } from "react";
|
|
41
|
+
import { useControllableState as Ke } from "@radix-ui/react-use-controllable-state";
|
|
42
42
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js
|
|
43
|
-
function
|
|
43
|
+
function qe(e) {
|
|
44
44
|
let t = e;
|
|
45
45
|
return typeof e == "object" && !!e && "verificationStatus" in e && t.verificationStatus === "VERIFIED";
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var c = "tesouro.linkedAccounts.locallySentMicroDepositAccountIds.v1";
|
|
48
|
+
function Je() {
|
|
49
49
|
if (typeof window > "u") return /* @__PURE__ */ new Set();
|
|
50
50
|
try {
|
|
51
|
-
let e = window.sessionStorage.getItem(
|
|
52
|
-
return new Set(Array.isArray(t) ? t.filter(
|
|
51
|
+
let e = window.sessionStorage.getItem(c), t = e ? JSON.parse(e) : [];
|
|
52
|
+
return new Set(Array.isArray(t) ? t.filter(Ye) : []);
|
|
53
53
|
} catch {
|
|
54
54
|
return /* @__PURE__ */ new Set();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ye(e) {
|
|
58
58
|
return typeof e == "string";
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Xe(e) {
|
|
61
61
|
if (typeof window < "u") try {
|
|
62
|
-
window.sessionStorage.setItem(
|
|
62
|
+
window.sessionStorage.setItem(c, JSON.stringify([...e]));
|
|
63
63
|
} catch {}
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ze(e, t) {
|
|
66
66
|
let n = new Set(e).add(t);
|
|
67
|
-
return
|
|
67
|
+
return Xe(n), n;
|
|
68
68
|
}
|
|
69
|
-
var
|
|
70
|
-
function
|
|
71
|
-
let
|
|
72
|
-
...
|
|
69
|
+
var Qe = re.ExternalBankAccountWriteOrg;
|
|
70
|
+
function l({ labels: re, featureLabels: c, isLinkAccountOpen: Ye, onLinkAccountOpenChange: Xe }) {
|
|
71
|
+
let l = {
|
|
72
|
+
...Ue,
|
|
73
73
|
...re
|
|
74
|
-
},
|
|
75
|
-
...
|
|
76
|
-
...
|
|
77
|
-
},
|
|
78
|
-
prop:
|
|
74
|
+
}, u = {
|
|
75
|
+
...he,
|
|
76
|
+
...c
|
|
77
|
+
}, d = se(), { organizationId: f, widgetToken: $e, initResponse: p } = le(), et = fe(), tt = de(), { organizationStatus: nt } = ne(), m = te(nt), h = !!ue(), rt = ce(), g = !!(f && $e), it = g || !!$e && nt === ee.Rotating, _ = o(() => De(p?.scopes), [p?.scopes]), at = tt && !_.canRead, v = !h && !tt && !!p && !_.canRead, y = it && _.canRead && !!p, [b, ot] = s(), [st, ct] = Ke({
|
|
78
|
+
prop: Ye,
|
|
79
79
|
defaultProp: !1,
|
|
80
|
-
onChange:
|
|
80
|
+
onChange: Xe,
|
|
81
81
|
caller: "LinkedAccountsWidget"
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
let L =
|
|
82
|
+
}), lt = g && _.canWrite && !v, x = st && lt, [S, C] = s(1), [w, ut] = s([]), [T, dt] = s(), [ft, E] = s(), [D, pt] = s(Je), [mt, O] = s(!1), [ht, k] = s(!1), [gt, _t] = s(!1), [vt, A] = s(!1), [yt, bt] = s(!1), [j, M] = s(), [N, P] = s(), [F, xt] = s(ge), [St, Ct] = s(!1), [wt, Tt] = s(_e), [I, Et] = s(ve);
|
|
83
|
+
Ge(() => {
|
|
84
|
+
d(i.Mounted);
|
|
85
|
+
}, [d]);
|
|
86
|
+
let L = Ne({
|
|
87
87
|
limit: 100,
|
|
88
88
|
enabled: y
|
|
89
|
-
}), R =
|
|
89
|
+
}), R = Me(), z = Pe(), B = Le(), V = Ie(), H = Fe(), U = Re(), W = x && S >= 2, G = oe({ enabled: W }), K = ae({ enabled: W }), Dt = ie({ enabled: x && _.canReadOrganization }).data?.legalName ?? "", q = o(() => St ? F : {
|
|
90
90
|
...F,
|
|
91
|
-
nameOnAccount:
|
|
91
|
+
nameOnAccount: Dt
|
|
92
92
|
}, [
|
|
93
|
-
|
|
93
|
+
St,
|
|
94
94
|
F,
|
|
95
|
-
|
|
96
|
-
]), { userIds:
|
|
95
|
+
Dt
|
|
96
|
+
]), { userIds: Ot, isResolving: kt, isError: At, refetch: jt } = ze({
|
|
97
97
|
enabled: W,
|
|
98
|
-
permissionKey:
|
|
99
|
-
organizationId:
|
|
100
|
-
}), J =
|
|
101
|
-
let e = K.data?.data ?? [], t =
|
|
102
|
-
organizationId:
|
|
103
|
-
organizationTypes:
|
|
104
|
-
}) : e, n =
|
|
105
|
-
return
|
|
98
|
+
permissionKey: Qe,
|
|
99
|
+
organizationId: f
|
|
100
|
+
}), J = o(() => {
|
|
101
|
+
let e = K.data?.data ?? [], t = f ? pe(e, {
|
|
102
|
+
organizationId: f,
|
|
103
|
+
organizationTypes: p?.organizationTypes ?? []
|
|
104
|
+
}) : e, n = me(G.data?.data ?? [], f);
|
|
105
|
+
return He(n, Ve(t), Ot);
|
|
106
106
|
}, [
|
|
107
|
-
|
|
107
|
+
Ot,
|
|
108
108
|
K.data?.data,
|
|
109
109
|
G.data?.data,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
]),
|
|
113
|
-
G.isError && G.refetch(),
|
|
114
|
-
}, X = y ? L.data?.data ?? [] : [], Z =
|
|
110
|
+
f,
|
|
111
|
+
p?.organizationTypes
|
|
112
|
+
]), Mt = G.isError && G.isFetching, Y = G.isLoading || G.isFetchingNextPage || !!G.hasNextPage || Mt || K.isResolving || kt, Nt = G.isError && !Mt || At, Pt = !Y && !Nt, Ft = () => {
|
|
113
|
+
G.isError && G.refetch(), At && jt(), K.isError && K.refetch();
|
|
114
|
+
}, X = y ? L.data?.data ?? [] : [], Z = o(() => X.map((e) => e.verificationStatus === "UNVERIFIED" && D.has(e.id) ? {
|
|
115
115
|
...e,
|
|
116
116
|
verificationStatus: "VERIFICATION_SENT"
|
|
117
|
-
} : e), [X, D]),
|
|
118
|
-
R.reset(), z.reset(), H.reset(), e.nameOnAccount !== q.nameOnAccount &&
|
|
117
|
+
} : e), [X, D]), It = [.../* @__PURE__ */ new Set([...J.filter((e) => e.locked).map((e) => e.id), ...w])], Lt = We((e) => {
|
|
118
|
+
R.reset(), z.reset(), H.reset(), e.nameOnAccount !== q.nameOnAccount && Ct(!0), xt({
|
|
119
119
|
...e,
|
|
120
|
-
routingNumber:
|
|
120
|
+
routingNumber: we(e.routingNumber)
|
|
121
121
|
});
|
|
122
122
|
}, [
|
|
123
123
|
q.nameOnAccount,
|
|
124
124
|
R,
|
|
125
125
|
z,
|
|
126
126
|
H
|
|
127
|
-
]),
|
|
127
|
+
]), Rt = () => {
|
|
128
128
|
C(3), n(t);
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
E(void 0),
|
|
132
|
-
} })) :
|
|
133
|
-
},
|
|
129
|
+
}, zt = (e) => {
|
|
130
|
+
_.canMicroDeposit ? (E("connect"), H.mutate({ path: { id: e } }, { onSuccess: () => {
|
|
131
|
+
E(void 0), pt((t) => Ze(t, e)), d(i.AccountLinked, { accountId: e }), Rt();
|
|
132
|
+
} })) : Rt();
|
|
133
|
+
}, Bt = (e) => {
|
|
134
134
|
z.mutate({
|
|
135
135
|
path: { id: e },
|
|
136
|
-
body: { userIds:
|
|
137
|
-
}, { onSuccess: () =>
|
|
138
|
-
},
|
|
139
|
-
if (
|
|
136
|
+
body: { userIds: It }
|
|
137
|
+
}, { onSuccess: () => zt(e) });
|
|
138
|
+
}, Vt = () => {
|
|
139
|
+
if (g && _.canWrite) {
|
|
140
140
|
if (S === 1) {
|
|
141
|
-
if (!
|
|
142
|
-
|
|
141
|
+
if (!ye(q)) {
|
|
142
|
+
bt(!0);
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
C(2);
|
|
146
|
-
} else S === 2 && (
|
|
146
|
+
} else S === 2 && (Pt ? T ? Bt(T.id) : R.mutate({ body: {
|
|
147
147
|
nickname: q.nickname.trim(),
|
|
148
148
|
accountNumber: q.accountNumber.trim(),
|
|
149
149
|
routingNumber: q.routingNumber.trim(),
|
|
150
150
|
nameOnAccount: q.nameOnAccount.trim(),
|
|
151
151
|
type: q.type,
|
|
152
|
-
accountHolderType:
|
|
152
|
+
accountHolderType: Ae(q.accountHolderType)
|
|
153
153
|
} }, { onSuccess: (e) => {
|
|
154
|
-
|
|
155
|
-
} }) : Y ||
|
|
154
|
+
d(i.AccountConnected, { accountId: e?.id }), dt(e), e?.id && Bt(e.id);
|
|
155
|
+
} }) : Y || Ft());
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, Ht = () => {
|
|
158
158
|
S === 2 && C(1);
|
|
159
|
-
},
|
|
160
|
-
J.find((t) => t.id === e)?.locked ||
|
|
161
|
-
}, [
|
|
162
|
-
x !==
|
|
163
|
-
let { reset:
|
|
164
|
-
|
|
165
|
-
x && (
|
|
159
|
+
}, Ut = (e, t) => {
|
|
160
|
+
J.find((t) => t.id === e)?.locked || ut((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
|
|
161
|
+
}, [Wt, Gt] = s(x);
|
|
162
|
+
x !== Wt && (Gt(x), x && (C(1), bt(!1), xt(ge), Ct(!1), ut([]), dt(void 0), E(void 0)));
|
|
163
|
+
let { reset: Kt } = R, { reset: qt } = z, { reset: Jt } = H;
|
|
164
|
+
Ge(() => {
|
|
165
|
+
x && (Kt(), qt(), Jt());
|
|
166
166
|
}, [
|
|
167
167
|
x,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
Kt,
|
|
169
|
+
qt,
|
|
170
|
+
Jt
|
|
171
171
|
]);
|
|
172
|
-
let
|
|
173
|
-
(!e ||
|
|
174
|
-
},
|
|
175
|
-
if (!
|
|
172
|
+
let Yt = (e) => {
|
|
173
|
+
(!e || lt) && ct(e);
|
|
174
|
+
}, Xt = (e) => {
|
|
175
|
+
if (!g || !_.canWrite) return;
|
|
176
176
|
let t = X.find((t) => t.id === e);
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
e && !
|
|
180
|
-
},
|
|
181
|
-
if (!
|
|
182
|
-
let t = X.find((e) => e.id === b), n =
|
|
177
|
+
ot(e), Tt(Te(t)), O(!0);
|
|
178
|
+
}, Zt = (e) => {
|
|
179
|
+
e && !g || e && !_.canWrite || O(e);
|
|
180
|
+
}, Qt = () => {
|
|
181
|
+
if (!g || !_.canWrite || !b) return;
|
|
182
|
+
let t = X.find((e) => e.id === b), n = Ee(wt, t);
|
|
183
183
|
Object.keys(n).length !== 0 && B.mutate({
|
|
184
184
|
path: { id: b },
|
|
185
185
|
body: n
|
|
186
186
|
}, { onSuccess: () => {
|
|
187
|
-
|
|
187
|
+
d(i.AccountUpdated, { accountId: b }), e.success(u.editSuccessToast), O(!1);
|
|
188
188
|
} });
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
e && !
|
|
193
|
-
},
|
|
194
|
-
U.reset(), A(!1),
|
|
195
|
-
},
|
|
196
|
-
if (!
|
|
197
|
-
if (!
|
|
198
|
-
|
|
189
|
+
}, $t = (e) => {
|
|
190
|
+
g && _.canWrite && (ot(e), Et(ve), A(!1), _t(!1), U.reset(), k(!0));
|
|
191
|
+
}, en = (e) => {
|
|
192
|
+
e && !g || e && !_.canWrite || k(e);
|
|
193
|
+
}, tn = (e) => {
|
|
194
|
+
U.reset(), A(!1), Et(e);
|
|
195
|
+
}, nn = () => {
|
|
196
|
+
if (!g || !_.canWrite || !b) return;
|
|
197
|
+
if (!Se(I)) {
|
|
198
|
+
_t(!0);
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
-
let t =
|
|
201
|
+
let t = Ce(I.firstAmount), r = Ce(I.secondAmount);
|
|
202
202
|
t !== null && r !== null && (A(!1), U.mutate({
|
|
203
203
|
path: { id: b },
|
|
204
204
|
body: {
|
|
@@ -206,39 +206,39 @@ function u({ labels: re, featureLabels: l, isLinkAccountOpen: qe, onLinkAccountO
|
|
|
206
206
|
secondAmount: r
|
|
207
207
|
}
|
|
208
208
|
}, { onSuccess: (t) => {
|
|
209
|
-
|
|
209
|
+
qe(t) ? (d(i.AccountVerified, { accountId: b }), n("tesouro-new-external-bank-account-linked-success"), e.success(u.verifySuccessToast), k(!1)) : A(!0);
|
|
210
210
|
} }));
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
},
|
|
211
|
+
}, rn = (e) => {
|
|
212
|
+
g && _.canMicroDeposit && (H.reset(), P(e));
|
|
213
|
+
}, an = (e) => {
|
|
214
214
|
e || P(void 0);
|
|
215
|
-
},
|
|
216
|
-
if (!
|
|
215
|
+
}, on = () => {
|
|
216
|
+
if (!g || !_.canMicroDeposit || !N) return;
|
|
217
217
|
let t = N;
|
|
218
218
|
E("row"), H.mutate({ path: { id: t } }, { onSuccess: () => {
|
|
219
|
-
E(void 0),
|
|
219
|
+
E(void 0), pt((e) => Ze(e, t)), d(i.AccountLinked, { accountId: t }), e.success(u.sendDepositsSuccessToast), P(void 0);
|
|
220
220
|
} });
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
},
|
|
221
|
+
}, sn = (e) => {
|
|
222
|
+
g && _.canWrite && (V.reset(), M(e));
|
|
223
|
+
}, cn = (e) => {
|
|
224
224
|
e || M(void 0);
|
|
225
|
-
},
|
|
226
|
-
if (!
|
|
225
|
+
}, ln = () => {
|
|
226
|
+
if (!g || !_.canWrite || !j) return;
|
|
227
227
|
let t = j;
|
|
228
228
|
V.mutate({ path: { id: t } }, { onSuccess: () => {
|
|
229
|
-
|
|
229
|
+
d(i.AccountUnlinked, { accountId: t }), e.success(u.unlinkSuccessToast), M(void 0);
|
|
230
230
|
} });
|
|
231
|
-
},
|
|
232
|
-
Q !==
|
|
233
|
-
let $ = H.isError &&
|
|
231
|
+
}, un = R.isPending || z.isPending || B.isPending || U.isPending || V.isPending || H.isPending, dn = _.canWrite, fn = !g || un, pn = !g && m, Q = !g && !m || v, [mn, hn] = s(Q);
|
|
232
|
+
Q !== mn && (hn(Q), Q && (O(!1), k(!1), M(void 0), P(void 0)));
|
|
233
|
+
let $ = H.isError && ft === "connect", gn = Be(J, {
|
|
234
234
|
selectedUserIds: w,
|
|
235
|
-
disabled:
|
|
236
|
-
fallbackTooltip:
|
|
237
|
-
onUserToggle:
|
|
238
|
-
}),
|
|
235
|
+
disabled: fn || !dn,
|
|
236
|
+
fallbackTooltip: l.teamMemberAccessTooltip,
|
|
237
|
+
onUserToggle: Ut
|
|
238
|
+
}), _n = J.filter((e) => e.locked).length + w.length, vn = T ? ((e) => {
|
|
239
239
|
let t = e.accountNumber.slice(-4), n = {
|
|
240
240
|
type: {
|
|
241
|
-
text:
|
|
241
|
+
text: je(e.accountHolderType ? ke(e.accountHolderType) : q.accountHolderType, e.type ?? q.type, u),
|
|
242
242
|
emphasized: !1
|
|
243
243
|
},
|
|
244
244
|
last4: {
|
|
@@ -248,31 +248,31 @@ function u({ labels: re, featureLabels: l, isLinkAccountOpen: qe, onLinkAccountO
|
|
|
248
248
|
};
|
|
249
249
|
return D.has(e.id) ? {
|
|
250
250
|
variant: "deposits-sent",
|
|
251
|
-
description: a(
|
|
251
|
+
description: a(u.summaryDescription, n),
|
|
252
252
|
nextSteps: [{
|
|
253
253
|
key: "check-bank",
|
|
254
|
-
title:
|
|
255
|
-
description: a(
|
|
254
|
+
title: u.summaryCheckBankTitle.replaceAll("{last4}", t),
|
|
255
|
+
description: a(u.summaryCheckBankDescription, n)
|
|
256
256
|
}, {
|
|
257
257
|
key: "verify",
|
|
258
|
-
title:
|
|
259
|
-
description: a(
|
|
258
|
+
title: u.summaryVerifyTitle,
|
|
259
|
+
description: a(u.summaryVerifyDescription, n)
|
|
260
260
|
}]
|
|
261
261
|
} : {
|
|
262
262
|
variant: "account-added",
|
|
263
|
-
description: a(
|
|
263
|
+
description: a(u.summaryAccountAddedDescription, n),
|
|
264
264
|
nextSteps: []
|
|
265
265
|
};
|
|
266
|
-
})(T) : void 0,
|
|
267
|
-
labels:
|
|
268
|
-
onEditSelect:
|
|
269
|
-
onVerifySelect:
|
|
270
|
-
onSendDepositsSelect:
|
|
271
|
-
onUnlinkSelect:
|
|
272
|
-
}),
|
|
266
|
+
})(T) : void 0, yn = Oe(Z, u, _, {
|
|
267
|
+
labels: l,
|
|
268
|
+
onEditSelect: Xt,
|
|
269
|
+
onVerifySelect: $t,
|
|
270
|
+
onSendDepositsSelect: rn,
|
|
271
|
+
onUnlinkSelect: sn
|
|
272
|
+
}), bn = o(() => {
|
|
273
273
|
if (!R.isError && !z.isError && !$) return;
|
|
274
274
|
let e = R.error ?? z.error ?? ($ ? H.error : void 0);
|
|
275
|
-
return r(e) ??
|
|
275
|
+
return r(e) ?? l.connectErrorTitle;
|
|
276
276
|
}, [
|
|
277
277
|
R.error,
|
|
278
278
|
R.isError,
|
|
@@ -280,16 +280,17 @@ function u({ labels: re, featureLabels: l, isLinkAccountOpen: qe, onLinkAccountO
|
|
|
280
280
|
z.isError,
|
|
281
281
|
$,
|
|
282
282
|
H.error,
|
|
283
|
-
|
|
283
|
+
l.connectErrorTitle
|
|
284
284
|
]);
|
|
285
285
|
return {
|
|
286
|
-
rows:
|
|
287
|
-
isLoading: !
|
|
288
|
-
isError:
|
|
289
|
-
|
|
286
|
+
rows: yn,
|
|
287
|
+
isLoading: !h && (at || m && !L.data || et && !p || y && L.isLoading),
|
|
288
|
+
isError: h || y && L.isError,
|
|
289
|
+
isAccessRestricted: v,
|
|
290
|
+
onRetry: h ? rt : () => void L.refetch(),
|
|
290
291
|
isConnectOpen: x,
|
|
291
|
-
isEditOpen:
|
|
292
|
-
isVerifyOpen:
|
|
292
|
+
isEditOpen: mt,
|
|
293
|
+
isVerifyOpen: ht,
|
|
293
294
|
verifyAccountName: Z.find((e) => e.id === b)?.nickname,
|
|
294
295
|
verifyAccountNumber: Z.find((e) => e.id === b)?.accountNumber,
|
|
295
296
|
isUnlinkOpen: !!j,
|
|
@@ -297,44 +298,44 @@ function u({ labels: re, featureLabels: l, isLinkAccountOpen: qe, onLinkAccountO
|
|
|
297
298
|
isSendDepositsOpen: !!N,
|
|
298
299
|
sendDepositsAccountNumber: Z.find((e) => e.id === N)?.accountNumber,
|
|
299
300
|
connectStep: S,
|
|
300
|
-
accessRows:
|
|
301
|
-
accessGrantedCount:
|
|
302
|
-
connectSummary:
|
|
301
|
+
accessRows: gn,
|
|
302
|
+
accessGrantedCount: _n,
|
|
303
|
+
connectSummary: vn,
|
|
303
304
|
isTeamMembersLoading: Y,
|
|
304
|
-
isTeamMembersError:
|
|
305
|
-
onTeamMembersRetry:
|
|
306
|
-
isConnectRequiredErrorVisible:
|
|
307
|
-
isConnectRoutingNumberInvalid: q.routingNumber.trim() !== "" && !
|
|
308
|
-
connectErrorMessage:
|
|
309
|
-
isVerifyFirstAmountInvalid: I.firstAmount.trim() !== "" && !
|
|
310
|
-
isVerifySecondAmountInvalid: I.secondAmount.trim() !== "" && !
|
|
311
|
-
isVerifyRequiredErrorVisible:
|
|
312
|
-
isActionDisabled:
|
|
313
|
-
isAuthPending:
|
|
314
|
-
canConnect:
|
|
315
|
-
isSubmitting:
|
|
305
|
+
isTeamMembersError: Nt,
|
|
306
|
+
onTeamMembersRetry: Ft,
|
|
307
|
+
isConnectRequiredErrorVisible: yt,
|
|
308
|
+
isConnectRoutingNumberInvalid: q.routingNumber.trim() !== "" && !be(q.routingNumber),
|
|
309
|
+
connectErrorMessage: bn,
|
|
310
|
+
isVerifyFirstAmountInvalid: I.firstAmount.trim() !== "" && !xe(I.firstAmount),
|
|
311
|
+
isVerifySecondAmountInvalid: I.secondAmount.trim() !== "" && !xe(I.secondAmount),
|
|
312
|
+
isVerifyRequiredErrorVisible: gt,
|
|
313
|
+
isActionDisabled: fn,
|
|
314
|
+
isAuthPending: pn,
|
|
315
|
+
canConnect: dn,
|
|
316
|
+
isSubmitting: un,
|
|
316
317
|
isConnectError: R.isError || z.isError || $,
|
|
317
318
|
isEditError: B.isError,
|
|
318
319
|
isUnlinkError: V.isError,
|
|
319
|
-
isSendDepositsError: H.isError &&
|
|
320
|
-
isVerifyError: U.isError ||
|
|
320
|
+
isSendDepositsError: H.isError && ft === "row",
|
|
321
|
+
isVerifyError: U.isError || vt,
|
|
321
322
|
connectForm: q,
|
|
322
|
-
editForm:
|
|
323
|
+
editForm: wt,
|
|
323
324
|
verifyForm: I,
|
|
324
|
-
onConnectOpenChange:
|
|
325
|
-
onEditOpenChange:
|
|
326
|
-
onVerifyOpenChange:
|
|
327
|
-
onUnlinkOpenChange:
|
|
328
|
-
onSendDepositsOpenChange:
|
|
329
|
-
onConnectFormChange:
|
|
330
|
-
onEditFormChange:
|
|
331
|
-
onVerifyFormChange:
|
|
332
|
-
onConnectNext:
|
|
333
|
-
onConnectBack:
|
|
334
|
-
onEditSubmit:
|
|
335
|
-
onVerifySubmit:
|
|
336
|
-
onUnlinkConfirm:
|
|
337
|
-
onSendDepositsConfirm:
|
|
325
|
+
onConnectOpenChange: Yt,
|
|
326
|
+
onEditOpenChange: Zt,
|
|
327
|
+
onVerifyOpenChange: en,
|
|
328
|
+
onUnlinkOpenChange: cn,
|
|
329
|
+
onSendDepositsOpenChange: an,
|
|
330
|
+
onConnectFormChange: Lt,
|
|
331
|
+
onEditFormChange: Tt,
|
|
332
|
+
onVerifyFormChange: tn,
|
|
333
|
+
onConnectNext: Vt,
|
|
334
|
+
onConnectBack: Ht,
|
|
335
|
+
onEditSubmit: Qt,
|
|
336
|
+
onVerifySubmit: nn,
|
|
337
|
+
onUnlinkConfirm: ln,
|
|
338
|
+
onSendDepositsConfirm: on
|
|
338
339
|
};
|
|
339
340
|
}
|
|
340
|
-
export {
|
|
341
|
+
export { c as LOCALLY_SENT_MICRO_DEPOSIT_ACCOUNT_IDS_STORAGE_KEY, l as useLinkedAccountsWidget };
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js
CHANGED
|
@@ -76,6 +76,7 @@ var e = {
|
|
|
76
76
|
actionErrorTitle: "Couldn't save account. Try again.",
|
|
77
77
|
verifyErrorTitle: "Couldn't verify account. Check the amounts and try again.",
|
|
78
78
|
emptyTitle: "No linked accounts yet",
|
|
79
|
-
emptyDescription: "No external accounts have been linked yet."
|
|
79
|
+
emptyDescription: "No external accounts have been linked yet.",
|
|
80
|
+
accessRestrictedTitle: "You don't have access to linked accounts"
|
|
80
81
|
};
|
|
81
82
|
export { e as DEFAULT_LABELS };
|