@tesouro/embedded-components-react 0.10.9 → 0.10.10
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.css +9 -0
- package/dist/index.d.ts +46 -7
- package/dist/index.js +4 -4
- package/dist/lib/BankAccountOnboardingWidget.d.ts +46 -7
- package/dist/lib/BankAccountOnboardingWidget.js +4 -4
- package/dist/lib/WidgetSuite.d.ts +46 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +175 -98
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +365 -343
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +24 -23
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +15 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicantOwnerSummary.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +3 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +5 -340
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +422 -58
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +50 -30
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +6 -58
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +62 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +31 -38
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +27 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +34 -91
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +96 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +12 -276
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +294 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +28 -23
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +23 -53
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +46 -343
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +268 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +29 -29
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +29 -59
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +53 -118
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +123 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +5 -80
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +80 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +10 -64
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +64 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js +6 -44
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +110 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +2 -77
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +89 -5
- 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 +67 -61
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +16 -19
- package/package.json +1 -1
|
@@ -13,8 +13,8 @@ import { OnboardingSuppressionReason as c } from "../../../../../shared/data-acc
|
|
|
13
13
|
import { useOrganizationOnboardingSuppression as l } from "../../../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
|
|
14
14
|
import { useOrganizationApplicationStatus as u } from "../../../../../shared/data-access/dist/lib/useOrganizationApplicationStatus.js";
|
|
15
15
|
import "../../../../../shared/data-access/dist/index.js";
|
|
16
|
-
import { EmbeddedToaster as
|
|
17
|
-
import { OnboardingShell as
|
|
16
|
+
import { EmbeddedToaster as d } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
17
|
+
import { OnboardingShell as ee } from "../../../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
|
|
18
18
|
import "../../../../../shared/ui/dist/index.js";
|
|
19
19
|
import { useAnalyticsTrack as f } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
20
20
|
import { WidgetProvider as te } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
@@ -22,11 +22,11 @@ import { useRefetchWidget as ne, useWidgetConfig as re, useWidgetInitStaleForTok
|
|
|
22
22
|
import { getNaicsOptions as oe } from "../../../../../shared/feature/dist/lib/naicsCodeMap.js";
|
|
23
23
|
import { deniedNoticeExpiresAt as se, selectBankAccountApplication as ce } from "../../../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
24
24
|
import "../../../../../shared/feature/dist/index.js";
|
|
25
|
-
import { interpolateBankName as le } from "../../../../ui/dist/
|
|
26
|
-
import { ApplicationStatusCard as ue } from "../../../../ui/dist/
|
|
27
|
-
import { ResultStep as de } from "../../../../ui/dist/
|
|
28
|
-
import { DeleteApplicationDialog as fe } from "../../../../ui/dist/
|
|
29
|
-
import { ApplicationDeletedScreen as pe } from "../../../../ui/dist/
|
|
25
|
+
import { interpolateBankName as le } from "../../../../ui/dist/index12.js";
|
|
26
|
+
import { ApplicationStatusCard as ue } from "../../../../ui/dist/index15.js";
|
|
27
|
+
import { ResultStep as de } from "../../../../ui/dist/index19.js";
|
|
28
|
+
import { DeleteApplicationDialog as fe } from "../../../../ui/dist/index33.js";
|
|
29
|
+
import { ApplicationDeletedScreen as pe } from "../../../../ui/dist/index35.js";
|
|
30
30
|
import "../../../../ui/dist/index.js";
|
|
31
31
|
import { DEFAULT_LABELS as p } from "./labels.js";
|
|
32
32
|
import { OnboardingApplicationView as me, applicationStatusNoticeFor as he, hiddenViewReason as ge, isNoticeView as _e, mergeApplicationStatusLabels as ve, onboardingApplicationViewFor as ye } from "./applicationStatusView.js";
|
|
@@ -54,9 +54,9 @@ import { useResumableBankAccountApplication as Ge } from "../../../../data-acces
|
|
|
54
54
|
import { useStartedBankAccountApplication as Ke } from "../../../../data-access/dist/index12.js";
|
|
55
55
|
import "../../../../data-access/dist/index.js";
|
|
56
56
|
import { useCallback as _, useEffect as v, useMemo as y, useReducer as qe, useRef as b, useState as x } from "react";
|
|
57
|
-
import { Fragment as Je, jsx as S, jsxs as
|
|
57
|
+
import { Fragment as Je, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
58
58
|
// ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js
|
|
59
|
-
var
|
|
59
|
+
var Ye = 2 ** 31 - 1, Xe = "DRAFT", Ze = [], Qe = "ttw:grid ttw:w-full ttw:place-items-center ttw:overflow-auto ttw:bg-background ttw:p-6", w = (e) => xe(e, void 0);
|
|
60
60
|
function $e(e) {
|
|
61
61
|
return {
|
|
62
62
|
...e,
|
|
@@ -108,20 +108,20 @@ var rt = {
|
|
|
108
108
|
workEmail: "",
|
|
109
109
|
ownsOver25Percent: null,
|
|
110
110
|
ownershipPercentage: null
|
|
111
|
-
},
|
|
111
|
+
}, T = {
|
|
112
112
|
personal: 0,
|
|
113
113
|
business: 1,
|
|
114
114
|
review: 2,
|
|
115
115
|
terms: 3
|
|
116
116
|
};
|
|
117
117
|
function at(e, t) {
|
|
118
|
-
return e ===
|
|
118
|
+
return e === T.personal ? {
|
|
119
119
|
title: t.personalReviewTitle,
|
|
120
120
|
subtitle: t.personalReviewSubtitle
|
|
121
|
-
} : e ===
|
|
121
|
+
} : e === T.business ? {
|
|
122
122
|
title: t.businessReviewTitle,
|
|
123
123
|
subtitle: t.businessReviewSubtitle
|
|
124
|
-
} : e ===
|
|
124
|
+
} : e === T.review ? {
|
|
125
125
|
title: t.reviewTitle,
|
|
126
126
|
subtitle: t.reviewSubtitle
|
|
127
127
|
} : {
|
|
@@ -129,12 +129,17 @@ function at(e, t) {
|
|
|
129
129
|
subtitle: t.termsSubtitle
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function ot({
|
|
133
|
-
|
|
132
|
+
function ot({ callback: e }) {
|
|
133
|
+
return v(() => {
|
|
134
|
+
e?.();
|
|
135
|
+
}, [e]), null;
|
|
136
|
+
}
|
|
137
|
+
function st({ onEmbeddedOnboardingCompletedSuccessfully: te, onNavigateToDashboard: pe, onSuppressed: xe, labels: g, initialBusinessDetails: Fe, initialPersonalDetails: Le, initialAdditionalOwners: Re, initialApplicationId: Ge = null, initialBoundAuthEpoch: Ke, onEditableDraftChange: Xe, onApplicationDeleted: st, onNoticeReplacedByForm: ct, focusFormOnMount: E = !1, onFocusFormOnMountDone: lt, bankLogoSrc: ut, disclosureLinks: dt, showApplicationStatusRefresh: ft = !1, onResultPhaseChange: pt }) {
|
|
138
|
+
let D = f(), { authEpoch: mt } = i();
|
|
134
139
|
v(() => {
|
|
135
|
-
|
|
136
|
-
}, [
|
|
137
|
-
let
|
|
140
|
+
D(Pe.Mounted);
|
|
141
|
+
}, [D]);
|
|
142
|
+
let O = {
|
|
138
143
|
...p,
|
|
139
144
|
...g,
|
|
140
145
|
deleteFailedError: g?.deleteFailedError ?? p.deleteFailedError,
|
|
@@ -159,339 +164,343 @@ function ot({ onEmbeddedOnboardingCompletedSuccessfully: te, onNavigateToDashboa
|
|
|
159
164
|
...g?.result
|
|
160
165
|
},
|
|
161
166
|
deleteApplicationDialog: g?.deleteApplicationDialog ?? {},
|
|
162
|
-
applicationDeleted: g?.applicationDeleted ?? {},
|
|
163
167
|
applicationStatus: ve(g?.applicationStatus)
|
|
164
|
-
},
|
|
168
|
+
}, k = re().initResponse, { termsHref: ht, privacyHref: gt, electronicCommunicationHref: _t, patriotActHref: vt } = dt ?? {}, yt = _(() => {
|
|
165
169
|
te();
|
|
166
|
-
}, [te]),
|
|
170
|
+
}, [te]), bt = ne(), [A, xt] = x(T.personal), [j, St] = x(() => ({
|
|
167
171
|
...rt,
|
|
168
172
|
...Fe
|
|
169
|
-
})), [
|
|
173
|
+
})), [M, Ct] = x(() => ({
|
|
170
174
|
...it,
|
|
171
175
|
...Le
|
|
172
|
-
})), [
|
|
173
|
-
business:
|
|
174
|
-
personal:
|
|
175
|
-
owners:
|
|
176
|
-
})), [
|
|
176
|
+
})), [N, P] = x(() => Re ?? []), [F, wt] = x(() => ({
|
|
177
|
+
business: j,
|
|
178
|
+
personal: M,
|
|
179
|
+
owners: N
|
|
180
|
+
})), [Tt, Et] = x(null);
|
|
177
181
|
v(() => {
|
|
178
|
-
if (!
|
|
182
|
+
if (!Tt) return;
|
|
179
183
|
let e = {
|
|
180
|
-
business:
|
|
181
|
-
personal:
|
|
182
|
-
owners:
|
|
184
|
+
business: j,
|
|
185
|
+
personal: M,
|
|
186
|
+
owners: N
|
|
183
187
|
};
|
|
184
|
-
|
|
188
|
+
wt((t) => Tt.next(e, t)), Et(null);
|
|
185
189
|
}, [
|
|
186
|
-
|
|
187
|
-
A,
|
|
190
|
+
Tt,
|
|
188
191
|
j,
|
|
189
|
-
M
|
|
192
|
+
M,
|
|
193
|
+
N
|
|
190
194
|
]);
|
|
191
|
-
let
|
|
195
|
+
let Dt = (e, { ownersCleared: t = !1 } = {}) => Et({ next: (n, r) => ({
|
|
192
196
|
business: e.includes("business") ? n.business : r.business,
|
|
193
197
|
personal: e.includes("personal") ? n.personal : r.personal,
|
|
194
|
-
owners: t ?
|
|
195
|
-
}) }), [
|
|
198
|
+
owners: t ? Ze : e.includes("owners") ? n.owners : r.owners
|
|
199
|
+
}) }), [I, Ot] = x(null), [kt, At] = x(0), [jt, Mt] = x(null), [Nt, Pt] = x(!1), [L, Ft] = x(null), [R, It] = x(null), [Lt, Rt] = x(null), [z, zt] = x(Ge), [Bt, Vt] = x({}), Ht = (e) => Vt((t) => ({
|
|
196
200
|
...t,
|
|
197
|
-
...e.taxId &&
|
|
201
|
+
...e.taxId && w(e.taxId) && e.taxIdStructure ? {
|
|
198
202
|
taxId: e.taxId,
|
|
199
203
|
taxIdStructure: e.taxIdStructure
|
|
200
204
|
} : {},
|
|
201
|
-
...e.ssn &&
|
|
202
|
-
})),
|
|
203
|
-
let { taxId: t, taxIdStructure: n } =
|
|
204
|
-
|
|
205
|
+
...e.ssn && w(e.ssn) ? { ssn: e.ssn } : {}
|
|
206
|
+
})), Ut = (e) => {
|
|
207
|
+
let { taxId: t, taxIdStructure: n } = Bt, r = t !== void 0 && n !== void 0 && e.companyStructure !== j.companyStructure && e.companyStructure !== "" && e.companyStructure === "SOLE_PROPRIETORSHIP" != (n === "SOLE_PROPRIETORSHIP");
|
|
208
|
+
St(r ? {
|
|
205
209
|
...e,
|
|
206
210
|
taxId: e.taxId === t ? "" : e.taxId,
|
|
207
211
|
taxIdOnFileLast4: be(t),
|
|
208
212
|
taxIdOnFileStructure: n
|
|
209
213
|
} : e);
|
|
210
|
-
}, [
|
|
214
|
+
}, [Wt, Gt] = x(Ke ?? mt), [Kt, B] = x(null), [qt, Jt] = x(null), [Yt, Xt] = x(0), Zt = b(null);
|
|
211
215
|
v(() => {
|
|
212
|
-
if (
|
|
213
|
-
let e =
|
|
216
|
+
if (Yt === 0) return;
|
|
217
|
+
let e = Zt.current;
|
|
214
218
|
(e?.querySelector("[aria-invalid=\"true\"]") ?? e?.querySelector("[data-needs-attention]"))?.focus();
|
|
215
|
-
}, [
|
|
216
|
-
let [
|
|
217
|
-
|
|
218
|
-
let
|
|
219
|
+
}, [Yt]);
|
|
220
|
+
let [Qt, $t] = x(!1), [en, tn] = x(!1), [nn, rn] = x(!1), [an, on] = x(null), sn = Be(), V = Ve(), cn = He(), ln = Ue(), un = We(), { setClientSecret: dn } = ze(), { data: fn, refetch: pn } = s(), { mutateAsync: mn } = o(), hn = l(), H = u(), gn = ie(), [_n, vn] = qe((e) => e + 1, 0), yn = y(() => ce(H.applications), [H.applications]), bn = b(null);
|
|
221
|
+
H.isResolved && (bn.current = { application: yn });
|
|
222
|
+
let U = H.isResolved ? yn : bn.current?.application ?? null, xn = se(U), W = ye(U), Sn = H.isResolved || bn.current !== null && W === me.Form;
|
|
219
223
|
v(() => {
|
|
220
|
-
if (
|
|
221
|
-
let e =
|
|
224
|
+
if (xn === null) return;
|
|
225
|
+
let e = xn - Date.now();
|
|
222
226
|
if (e < 0) return;
|
|
223
|
-
let t = setTimeout(
|
|
227
|
+
let t = setTimeout(vn, Math.min(e + 1, Ye));
|
|
224
228
|
return () => clearTimeout(t);
|
|
225
|
-
}, [
|
|
226
|
-
let
|
|
227
|
-
v(() => () =>
|
|
228
|
-
let
|
|
229
|
-
|
|
230
|
-
if (
|
|
231
|
-
}, [
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
let
|
|
235
|
-
|
|
236
|
-
let
|
|
237
|
-
|
|
238
|
-
let
|
|
229
|
+
}, [xn, _n]);
|
|
230
|
+
let Cn = b(null);
|
|
231
|
+
v(() => () => Cn.current?.abort(), []);
|
|
232
|
+
let wn = y(() => oe(O.businessDetails.naicsTitles), [O.businessDetails.naicsTitles]), Tn = y(() => r(O.businessDetails.stateTitles), [O.businessDetails.stateTitles]), En = y(() => r(O.personalDetails.stateTitles), [O.personalDetails.stateTitles]), Dn = y(() => r(O.additionalOwners.stateTitles), [O.additionalOwners.stateTitles]), G = nn || an !== null, On = b(pt);
|
|
233
|
+
On.current = pt, v(() => {
|
|
234
|
+
if (G) return On.current?.(!0), () => On.current?.(!1);
|
|
235
|
+
}, [G]);
|
|
236
|
+
let kn = k?.status === "ACTIVE" || k?.status === "INACTIVE", An = k?.status === "INVITED", jn = kn || An, K = hn.isResolved && Sn, Mn = k && !G && !jn && K && _e(W) ? W : null, Nn = !!k && !G && Mn === null && (jn || K && (hn.isSuppressed || W === me.Hidden)), q = Nn ? kn ? c.UserAlreadyOnboarded : An ? c.UserInvitedToOrganization : W === me.Hidden ? ge(U) : hn.reason ?? ge(U) : null, Pn = !!k && K && !G, [Fn, In] = x(!1), Ln = Fn && Nn && !jn && q !== c.OrganizationApplicationDenialExpired, J = Mn ?? (Ln ? "unavailable" : null);
|
|
237
|
+
Pn && Fn !== (J !== null) && In(J !== null);
|
|
238
|
+
let Y = Ln && q === c.OrganizationApplicationComplete, Rn = ae(), [X, zn] = x("idle"), [Bn, Vn] = x(!1);
|
|
239
|
+
Pn && Y !== Bn && (Vn(Y), Y && zn("requested")), X === "requested" && Rn && zn("inFlight"), X === "inFlight" && !Rn && zn("idle");
|
|
240
|
+
let Hn = Y && X !== "idle", Un = b(xe);
|
|
241
|
+
Un.current = xe;
|
|
242
|
+
let Wn = Nn && J === null;
|
|
239
243
|
v(() => {
|
|
240
|
-
|
|
244
|
+
Wn && q && (D(Pe.Suppressed, { reason: q }), console.info(`[onboarding] not shown: ${q}`), Un.current?.(q));
|
|
241
245
|
}, [
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
Wn,
|
|
247
|
+
q,
|
|
248
|
+
D
|
|
245
249
|
]);
|
|
246
|
-
let
|
|
250
|
+
let Gn = gn ? null : Mn;
|
|
247
251
|
v(() => {
|
|
248
|
-
|
|
249
|
-
}, [
|
|
250
|
-
let
|
|
251
|
-
|
|
252
|
-
let
|
|
253
|
-
|
|
254
|
-
if (!
|
|
255
|
-
let e =
|
|
256
|
-
|
|
252
|
+
Gn && D(Pe.ApplicationStatusShown, { view: Gn });
|
|
253
|
+
}, [Gn, D]);
|
|
254
|
+
let Kn = b(J), qn = b(ct);
|
|
255
|
+
qn.current = ct;
|
|
256
|
+
let Jn = b(bt);
|
|
257
|
+
Jn.current = bt, v(() => {
|
|
258
|
+
if (!K || G) return;
|
|
259
|
+
let e = Kn.current !== null;
|
|
260
|
+
Kn.current = J, e && J === null && W === me.Form && qn.current?.();
|
|
257
261
|
}, [
|
|
258
|
-
U,
|
|
259
262
|
W,
|
|
260
263
|
G,
|
|
261
|
-
|
|
264
|
+
K,
|
|
265
|
+
J
|
|
262
266
|
]), v(() => {
|
|
263
|
-
|
|
264
|
-
}, [
|
|
265
|
-
|
|
266
|
-
applicationId:
|
|
267
|
-
authEpoch:
|
|
267
|
+
X === "requested" && Jn.current();
|
|
268
|
+
}, [X]), v(() => {
|
|
269
|
+
Xe?.(G || z === null ? null : {
|
|
270
|
+
applicationId: z,
|
|
271
|
+
authEpoch: Wt
|
|
268
272
|
});
|
|
269
273
|
}, [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
Xe,
|
|
275
|
+
G,
|
|
276
|
+
z,
|
|
277
|
+
Wt
|
|
274
278
|
]);
|
|
275
|
-
let
|
|
276
|
-
if (
|
|
277
|
-
if (!
|
|
278
|
-
if (
|
|
279
|
-
if (
|
|
280
|
-
if (
|
|
281
|
-
let t = he(
|
|
279
|
+
let Yn = b(mt);
|
|
280
|
+
if (Yn.current = mt, !k) return null;
|
|
281
|
+
if (!G) {
|
|
282
|
+
if (Nn && !J || Hn || !K) return null;
|
|
283
|
+
if (J) {
|
|
284
|
+
if (gn) return null;
|
|
285
|
+
let t = he(J, U, k.bankName?.trim() || O.fallbackBankName, O.applicationStatus), n = /* @__PURE__ */ S(ue, {
|
|
282
286
|
...t,
|
|
283
287
|
className: "ttw:max-w-2xl",
|
|
288
|
+
focusTitleOnMount: E,
|
|
284
289
|
testIds: {
|
|
285
290
|
root: m.statusCard,
|
|
286
291
|
chip: m.statusCardChip
|
|
287
292
|
},
|
|
288
|
-
action:
|
|
293
|
+
action: ft ? /* @__PURE__ */ S(e, {
|
|
289
294
|
variant: "outline",
|
|
290
|
-
onClick:
|
|
295
|
+
onClick: Y ? () => zn("requested") : hn.refetch,
|
|
291
296
|
"data-testid": m.statusCardCheckAgain,
|
|
292
|
-
children:
|
|
297
|
+
children: O.applicationStatus.checkAgain
|
|
293
298
|
}) : void 0
|
|
294
299
|
});
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
className:
|
|
297
|
-
children: n
|
|
300
|
+
return /* @__PURE__ */ C("div", {
|
|
301
|
+
className: Qe,
|
|
302
|
+
children: [n, E ? /* @__PURE__ */ S(ot, { callback: lt }) : null]
|
|
298
303
|
});
|
|
299
304
|
}
|
|
300
305
|
}
|
|
301
|
-
let
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
let Z = j.companyStructure === "SOLE_PROPRIETORSHIP", Xn = j.companyStructure !== "" && !Z, Zn = Xn ? Lt : Ze, Q = R && {
|
|
307
|
+
...R,
|
|
308
|
+
ownsOver25Percent: M.ownsOver25Percent,
|
|
309
|
+
ownershipPercentage: M.ownershipPercentage
|
|
310
|
+
}, Qn = [
|
|
311
|
+
O.stepIndicator.personal,
|
|
312
|
+
O.stepIndicator.business,
|
|
313
|
+
O.stepIndicator.review,
|
|
314
|
+
O.stepIndicator.terms
|
|
315
|
+
], $n = R !== null && L !== null && Zn !== null, er = A === T.personal ? R !== null : A === T.business ? L !== null && Zn !== null : A === T.review ? $n : $n && Se(j), $ = sn.isPending || V.isPending || cn.isPending || ln.isPending || nn, tr = () => {
|
|
316
|
+
St((e) => e.isAuthorized === null && !e.isCheckboxChecked ? e : {
|
|
308
317
|
...e,
|
|
309
318
|
isAuthorized: null,
|
|
310
319
|
isCheckboxChecked: !1
|
|
311
320
|
});
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
},
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
business: h(
|
|
320
|
-
personal: h(
|
|
321
|
-
owners: h(nt(
|
|
322
|
-
},
|
|
323
|
-
|
|
321
|
+
}, nr = () => {
|
|
322
|
+
B(null), tr(), xt(T.personal);
|
|
323
|
+
}, rr = () => {
|
|
324
|
+
B(null), tr(), xt(T.business);
|
|
325
|
+
}, ir = () => {
|
|
326
|
+
B(null), A === T.review && tr(), I && P(tt(N, I)), xt((e) => e === T.personal ? e : e - 1);
|
|
327
|
+
}, ar = {
|
|
328
|
+
business: h(j) !== h(F.business),
|
|
329
|
+
personal: h(M) !== h(F.personal),
|
|
330
|
+
owners: h(nt(j.companyStructure === "SOLE_PROPRIETORSHIP" ? Ze : tt(N, I))) !== h(nt(F.owners))
|
|
331
|
+
}, or = async (e) => {
|
|
332
|
+
rn(!0);
|
|
324
333
|
let t = new AbortController();
|
|
325
|
-
|
|
334
|
+
Cn.current = t;
|
|
326
335
|
let n = !1;
|
|
327
336
|
try {
|
|
328
|
-
let r = await
|
|
337
|
+
let r = await cn.mutateAsync({ path: { id: e } });
|
|
329
338
|
if (t.signal.aborted) return;
|
|
330
|
-
if (!r.id) throw Error(
|
|
331
|
-
if (n = !0, (await
|
|
332
|
-
let e =
|
|
333
|
-
if (e === void 0 && (e = (await
|
|
339
|
+
if (!r.id) throw Error(O.submitFailedError);
|
|
340
|
+
if (n = !0, (await un(e, { signal: t.signal })).status === "complete") {
|
|
341
|
+
let e = fn;
|
|
342
|
+
if (e === void 0 && (e = (await pn()).data), t.signal.aborted) return;
|
|
334
343
|
if (e !== void 0) try {
|
|
335
|
-
await
|
|
344
|
+
await mn({ displayedVersion: a(e)?.disclosureId ?? null });
|
|
336
345
|
} catch {}
|
|
337
346
|
if (t.signal.aborted) return;
|
|
338
|
-
|
|
339
|
-
} else
|
|
347
|
+
on("success"), bt(), yt();
|
|
348
|
+
} else on("pending");
|
|
340
349
|
} catch (e) {
|
|
341
350
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
342
351
|
if (!n) throw e;
|
|
343
|
-
|
|
352
|
+
on("pending");
|
|
344
353
|
} finally {
|
|
345
|
-
|
|
354
|
+
Cn.current = null, rn(!1);
|
|
346
355
|
}
|
|
347
|
-
},
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
},
|
|
356
|
-
let t =
|
|
357
|
-
return
|
|
358
|
-
},
|
|
359
|
-
if (
|
|
360
|
-
if (!
|
|
361
|
-
let e =
|
|
362
|
-
return t ? await
|
|
356
|
+
}, sr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
357
|
+
St((t) => (t.taxIdOnFileLast4 || e) && w(t.taxId) ? $e(t) : t);
|
|
358
|
+
}, cr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
359
|
+
Ct((t) => (t.ssnOnFileLast4 || e) && w(t.ssn) ? et(t) : t);
|
|
360
|
+
}, lr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
361
|
+
P((t) => t.map((t) => (t.ssnOnFileLast4 || e && t.id) && w(t.ssn) ? et(t) : t));
|
|
362
|
+
}, ur = () => {
|
|
363
|
+
P((e) => e.map(Ie));
|
|
364
|
+
}, dr = async (e) => {
|
|
365
|
+
let t = Yn.current, n = await sn.mutateAsync({ body: Ne(e, M) });
|
|
366
|
+
return zt(n.id), Gt(t), n.clientSecret && dn(n.id, n.clientSecret), n.id;
|
|
367
|
+
}, fr = async () => {
|
|
368
|
+
if (A === T.personal) {
|
|
369
|
+
if (!Q) return null;
|
|
370
|
+
let e = F.business.companyStructure === "SOLE_PROPRIETORSHIP", t = z;
|
|
371
|
+
return t ? await V.mutateAsync({
|
|
363
372
|
path: { id: t },
|
|
364
373
|
body: ke({
|
|
365
|
-
applicant:
|
|
374
|
+
applicant: Q,
|
|
366
375
|
isSoleProprietor: e
|
|
367
376
|
})
|
|
368
|
-
}) : t = await
|
|
369
|
-
applicant:
|
|
377
|
+
}) : t = await dr(Oe({
|
|
378
|
+
applicant: Q,
|
|
370
379
|
isSoleProprietor: e
|
|
371
|
-
})),
|
|
380
|
+
})), Ht({ ssn: Q.ssn }), cr(), Dt(["personal"]), t;
|
|
372
381
|
}
|
|
373
|
-
if (
|
|
374
|
-
if (!
|
|
382
|
+
if (A === T.business) {
|
|
383
|
+
if (!Q || !L || !Zn) return null;
|
|
375
384
|
let e = {
|
|
376
|
-
businessDetails:
|
|
377
|
-
applicant:
|
|
378
|
-
businessOwners:
|
|
379
|
-
}, t =
|
|
380
|
-
return t ? await
|
|
385
|
+
businessDetails: L,
|
|
386
|
+
applicant: Q,
|
|
387
|
+
businessOwners: Zn
|
|
388
|
+
}, t = z;
|
|
389
|
+
return t ? await V.mutateAsync({
|
|
381
390
|
path: { id: t },
|
|
382
391
|
body: ke(e)
|
|
383
|
-
}) : t = await
|
|
384
|
-
taxId:
|
|
385
|
-
taxIdStructure:
|
|
386
|
-
ssn:
|
|
387
|
-
}),
|
|
392
|
+
}) : t = await dr(ke(e)), Ht({
|
|
393
|
+
taxId: L.taxId,
|
|
394
|
+
taxIdStructure: L.companyStructure,
|
|
395
|
+
ssn: Q.ssn
|
|
396
|
+
}), sr(), cr(), Z ? ur() : lr(), Dt([
|
|
388
397
|
"business",
|
|
389
398
|
"personal",
|
|
390
399
|
"owners"
|
|
391
|
-
], { ownersCleared:
|
|
400
|
+
], { ownersCleared: Z }), t;
|
|
392
401
|
}
|
|
393
|
-
return
|
|
394
|
-
path: { id:
|
|
402
|
+
return A === T.review ? $n ? z : null : !z || !Se(j) ? null : (await V.mutateAsync({
|
|
403
|
+
path: { id: z },
|
|
395
404
|
body: ke({ consent: {
|
|
396
405
|
isLegallyAuthorized: !0,
|
|
397
406
|
hasAcceptedDisclosures: !0
|
|
398
407
|
} })
|
|
399
|
-
}),
|
|
400
|
-
},
|
|
401
|
-
if (
|
|
402
|
-
|
|
408
|
+
}), Dt(["business"]), z);
|
|
409
|
+
}, pr = async () => {
|
|
410
|
+
if (B(null), !er) {
|
|
411
|
+
Jt(A), Xt((e) => e + 1);
|
|
403
412
|
return;
|
|
404
413
|
}
|
|
405
414
|
let e;
|
|
406
415
|
try {
|
|
407
|
-
e = await
|
|
416
|
+
e = await fr();
|
|
408
417
|
} catch {
|
|
409
|
-
|
|
418
|
+
B(O.genericRetryError);
|
|
410
419
|
return;
|
|
411
420
|
}
|
|
412
421
|
if (e !== null) {
|
|
413
|
-
if (
|
|
414
|
-
await
|
|
422
|
+
if (Jt(null), A === T.terms) try {
|
|
423
|
+
await or(e);
|
|
415
424
|
} catch {
|
|
416
|
-
|
|
425
|
+
B(O.submitFailedError);
|
|
417
426
|
}
|
|
418
|
-
else
|
|
427
|
+
else xt(A + 1);
|
|
419
428
|
}
|
|
420
|
-
},
|
|
421
|
-
|
|
429
|
+
}, mr = async () => {
|
|
430
|
+
B(null), $t(!0);
|
|
422
431
|
try {
|
|
423
|
-
if (await
|
|
424
|
-
|
|
432
|
+
if (await fr() === null) return;
|
|
433
|
+
cr({ evenWithoutMarker: !0 }), A >= T.business && (sr({ evenWithoutMarker: !0 }), lr({ evenWithoutMarker: !0 })), n.success(O.applicationSavedToast);
|
|
425
434
|
} catch {
|
|
426
|
-
n.error(
|
|
435
|
+
n.error(O.genericRetryError);
|
|
427
436
|
} finally {
|
|
428
|
-
|
|
437
|
+
$t(!1);
|
|
429
438
|
}
|
|
430
|
-
},
|
|
431
|
-
let e = tt(
|
|
432
|
-
businessDetails:
|
|
433
|
-
applicant:
|
|
439
|
+
}, hr = async () => {
|
|
440
|
+
let e = tt(N, I), t = Me({
|
|
441
|
+
businessDetails: j,
|
|
442
|
+
applicant: M,
|
|
434
443
|
businessOwners: e,
|
|
435
|
-
savedBusinessDetails:
|
|
436
|
-
savedOwners:
|
|
437
|
-
dirty:
|
|
438
|
-
}), r =
|
|
439
|
-
|
|
444
|
+
savedBusinessDetails: F.business,
|
|
445
|
+
savedOwners: F.owners,
|
|
446
|
+
dirty: ar
|
|
447
|
+
}), r = ar;
|
|
448
|
+
Pt(!0);
|
|
440
449
|
try {
|
|
441
450
|
if (!t) {
|
|
442
|
-
n.error(
|
|
451
|
+
n.error(O.saveDraftNothingValidError);
|
|
443
452
|
return;
|
|
444
453
|
}
|
|
445
|
-
|
|
446
|
-
path: { id:
|
|
454
|
+
z ? await V.mutateAsync({
|
|
455
|
+
path: { id: z },
|
|
447
456
|
body: t
|
|
448
|
-
}) : await
|
|
457
|
+
}) : await dr(je(t)), I && P(e), n.success(O.applicationSavedToast);
|
|
449
458
|
let i = t;
|
|
450
|
-
|
|
459
|
+
Ht({
|
|
451
460
|
taxId: i.businessDetails?.taxId?.value,
|
|
452
|
-
taxIdStructure:
|
|
461
|
+
taxIdStructure: j.companyStructure,
|
|
453
462
|
ssn: i.applicant?.personalIdentificationNumber?.value
|
|
454
|
-
}), i.businessDetails?.taxId !== void 0 &&
|
|
463
|
+
}), i.businessDetails?.taxId !== void 0 && sr({ evenWithoutMarker: !0 }), i.applicant?.personalIdentificationNumber !== void 0 && cr({ evenWithoutMarker: !0 }), Array.isArray(i.businessOwners) && lr({ evenWithoutMarker: !0 }), i.businessOwners === null && e.length > 0 && ur();
|
|
455
464
|
let a = Array.isArray(i.businessOwners) ? "list" : i.businessOwners === null ? "cleared" : "none";
|
|
456
|
-
|
|
465
|
+
Et({ next: (e, t) => Ae({
|
|
457
466
|
current: e,
|
|
458
467
|
saved: t,
|
|
459
468
|
dirty: r,
|
|
460
469
|
ownersWrite: a
|
|
461
|
-
}) }),
|
|
470
|
+
}) }), Ot(null), At((e) => e + 1);
|
|
462
471
|
} catch {
|
|
463
|
-
n.error(
|
|
472
|
+
n.error(O.genericRetryError);
|
|
464
473
|
} finally {
|
|
465
|
-
|
|
474
|
+
Pt(!1);
|
|
466
475
|
}
|
|
467
|
-
},
|
|
468
|
-
if (
|
|
469
|
-
await
|
|
476
|
+
}, gr = async () => {
|
|
477
|
+
if (z !== null) try {
|
|
478
|
+
await ln.mutateAsync({ path: { id: z } });
|
|
470
479
|
} catch {
|
|
471
|
-
n.error(
|
|
480
|
+
n.error(O.deleteFailedError);
|
|
472
481
|
return;
|
|
473
482
|
}
|
|
474
|
-
|
|
475
|
-
},
|
|
476
|
-
if (
|
|
477
|
-
let e =
|
|
483
|
+
tn(!1), st?.();
|
|
484
|
+
}, _r = at(A, O), vr = k.bankName?.trim() || O.fallbackBankName, yr = le(O.shellFdicDisclaimer, vr);
|
|
485
|
+
if (G) {
|
|
486
|
+
let e = L?.companyLegalName ?? "", t = k.bankName?.trim() || O.fallbackBankName, n = an ?? "pending", r = n === "success", i = {
|
|
478
487
|
...p.result,
|
|
479
|
-
...
|
|
488
|
+
...O.result
|
|
480
489
|
}, a = /* @__PURE__ */ S(de, {
|
|
481
490
|
testIds: {
|
|
482
491
|
processing: m.resultProcessing,
|
|
483
492
|
dashboardButton: m.resultDashboardButton
|
|
484
493
|
},
|
|
485
494
|
status: n,
|
|
486
|
-
isLoading:
|
|
495
|
+
isLoading: nn,
|
|
487
496
|
loadingMessage: i.loadingMessage,
|
|
488
497
|
headingLine1: r ? i.successHeadingLine1 : i.pendingHeadingLine1,
|
|
489
498
|
headingLine2: `${e}!`,
|
|
490
499
|
body: r ? i.successBody : i.pendingBody,
|
|
491
|
-
followUpEmail:
|
|
500
|
+
followUpEmail: R?.workEmail ?? "",
|
|
492
501
|
emailBoxLead: i.pendingEmailBoxLead,
|
|
493
502
|
navigateToDashboardLabel: i.navigateToDashboard,
|
|
494
|
-
bankLogoSrc:
|
|
503
|
+
bankLogoSrc: ut,
|
|
495
504
|
bankLogoAlt: le(i.bankLogoAlt, t),
|
|
496
505
|
fdicDisclaimer: le(i.fdicDisclaimer, t),
|
|
497
506
|
onNavigateToDashboard: pe
|
|
@@ -501,34 +510,34 @@ function ot({ onEmbeddedOnboardingCompletedSuccessfully: te, onNavigateToDashboa
|
|
|
501
510
|
children: a
|
|
502
511
|
});
|
|
503
512
|
}
|
|
504
|
-
let
|
|
505
|
-
return /* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */ S(
|
|
507
|
-
title:
|
|
508
|
-
subtitle:
|
|
509
|
-
focusTitleOnMount:
|
|
510
|
-
stepLabels:
|
|
511
|
-
activeStep:
|
|
512
|
-
disclaimerText:
|
|
513
|
-
onBack:
|
|
514
|
-
showBackButton:
|
|
515
|
-
backAriaLabel:
|
|
516
|
-
onNext:
|
|
517
|
-
onSaveAndClose:
|
|
518
|
-
onDelete: () =>
|
|
519
|
-
isNextDisabled:
|
|
520
|
-
isNextLoading:
|
|
521
|
-
isSaveAndCloseDisabled:
|
|
522
|
-
isSaveAndCloseLoading:
|
|
523
|
-
nextLabel:
|
|
513
|
+
let br = A === T.personal ? O.nextToStep.business : A === T.business ? O.nextToStep.review : A === T.review ? O.nextToStep.terms : O.submit, xr = A === T.business ? O.backToStepAriaLabel.personal : A === T.review ? O.backToStepAriaLabel.business : A === T.terms ? O.backToStepAriaLabel.review : void 0, Sr = $, Cr = qt === A, wr = ar.business || ar.personal || ar.owners, Tr = er ? mr : hr, Er = $ || Nt || !er && !wr, Dr = `${M.firstName} ${M.lastName}`.trim(), Or = Z ? 100 : M.ownsOver25Percent === !0 ? M.ownershipPercentage ?? 0 : 0, kr = j.companyDbaName.trim() || j.companyLegalName.trim(), Ar = Z ? Ze : N, jr = qt === T.business && A === T.business && Ar.some((e) => !e.reviewed) ? O.ownersNeedReviewError : null;
|
|
514
|
+
return /* @__PURE__ */ C(Je, { children: [
|
|
515
|
+
/* @__PURE__ */ S(ee, {
|
|
516
|
+
title: _r.title,
|
|
517
|
+
subtitle: _r.subtitle,
|
|
518
|
+
focusTitleOnMount: E,
|
|
519
|
+
stepLabels: Qn,
|
|
520
|
+
activeStep: A,
|
|
521
|
+
disclaimerText: yr,
|
|
522
|
+
onBack: ir,
|
|
523
|
+
showBackButton: A !== T.personal,
|
|
524
|
+
backAriaLabel: xr,
|
|
525
|
+
onNext: pr,
|
|
526
|
+
onSaveAndClose: Tr,
|
|
527
|
+
onDelete: () => tn(!0),
|
|
528
|
+
isNextDisabled: Sr,
|
|
529
|
+
isNextLoading: $ && !Qt,
|
|
530
|
+
isSaveAndCloseDisabled: Er,
|
|
531
|
+
isSaveAndCloseLoading: Qt || Nt,
|
|
532
|
+
nextLabel: br,
|
|
524
533
|
nextIcon: null,
|
|
525
|
-
nextTone:
|
|
526
|
-
isTitleVisuallyHidden:
|
|
527
|
-
errorMessage:
|
|
534
|
+
nextTone: A === T.terms ? "success" : "primary",
|
|
535
|
+
isTitleVisuallyHidden: A === T.terms,
|
|
536
|
+
errorMessage: Kt,
|
|
528
537
|
labels: {
|
|
529
|
-
backButton:
|
|
530
|
-
saveAndCloseButton:
|
|
531
|
-
deleteButton:
|
|
538
|
+
backButton: O.back,
|
|
539
|
+
saveAndCloseButton: O.saveAndClose,
|
|
540
|
+
deleteButton: O.deleteApplication
|
|
532
541
|
},
|
|
533
542
|
testIds: {
|
|
534
543
|
root: m.shell,
|
|
@@ -541,93 +550,103 @@ function ot({ onEmbeddedOnboardingCompletedSuccessfully: te, onNavigateToDashboa
|
|
|
541
550
|
fade: m.shellScrollFade
|
|
542
551
|
}
|
|
543
552
|
},
|
|
544
|
-
children: /* @__PURE__ */
|
|
545
|
-
ref:
|
|
553
|
+
children: /* @__PURE__ */ C("div", {
|
|
554
|
+
ref: Zt,
|
|
546
555
|
className: "ttw:contents",
|
|
547
556
|
children: [
|
|
548
|
-
|
|
557
|
+
A === T.personal ? /* @__PURE__ */ S("div", {
|
|
549
558
|
className: "ttw:max-w-2xl",
|
|
550
559
|
children: /* @__PURE__ */ S(we, {
|
|
551
|
-
value:
|
|
552
|
-
onValueChange:
|
|
553
|
-
onSnapshotChange:
|
|
554
|
-
stateOptions:
|
|
555
|
-
isSubmitting:
|
|
556
|
-
showAllErrors:
|
|
557
|
-
labels:
|
|
560
|
+
value: M,
|
|
561
|
+
onValueChange: Ct,
|
|
562
|
+
onSnapshotChange: It,
|
|
563
|
+
stateOptions: En,
|
|
564
|
+
isSubmitting: $,
|
|
565
|
+
showAllErrors: Cr,
|
|
566
|
+
labels: O.personalDetails
|
|
558
567
|
}, "personal")
|
|
559
568
|
}) : null,
|
|
560
|
-
|
|
569
|
+
A === T.business ? /* @__PURE__ */ C("div", {
|
|
561
570
|
className: "ttw:flex ttw:max-w-2xl ttw:flex-col ttw:gap-10",
|
|
562
|
-
children: [
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
571
|
+
children: [/* @__PURE__ */ S(Ce, {
|
|
572
|
+
value: j,
|
|
573
|
+
onValueChange: Ut,
|
|
574
|
+
onSnapshotChange: Ft,
|
|
575
|
+
naicsOptions: wn,
|
|
576
|
+
stateOptions: Tn,
|
|
577
|
+
isSubmitting: $,
|
|
578
|
+
showAllErrors: Cr,
|
|
579
|
+
labels: O.businessDetails
|
|
580
|
+
}, "business"), Xn ? /* @__PURE__ */ C(Je, { children: [/* @__PURE__ */ S(t, {}), /* @__PURE__ */ S(De, {
|
|
581
|
+
owners: Ar,
|
|
582
|
+
onOwnersChange: P,
|
|
583
|
+
primaryOwnerName: Dr,
|
|
584
|
+
applicantOwnership: {
|
|
585
|
+
ownsOver25Percent: M.ownsOver25Percent,
|
|
586
|
+
ownershipPercentage: M.ownershipPercentage
|
|
587
|
+
},
|
|
588
|
+
onApplicantOwnershipChange: (e) => Ct((t) => ({
|
|
589
|
+
...t,
|
|
590
|
+
...e
|
|
591
|
+
})),
|
|
592
|
+
applicantOwnershipBaseline: jt,
|
|
593
|
+
onApplicantOwnershipBaselineChange: Mt,
|
|
594
|
+
businessName: kr,
|
|
595
|
+
applicantPersonalDetails: M,
|
|
596
|
+
onEditPersonalDetails: nr,
|
|
597
|
+
stateOptions: Dn,
|
|
598
|
+
onSnapshotChange: Rt,
|
|
599
|
+
onPendingOwnerChange: Ot,
|
|
600
|
+
isSubmitting: $,
|
|
601
|
+
showAllErrors: Cr,
|
|
602
|
+
revealErrorsAttempt: Yt,
|
|
603
|
+
reviewError: jr,
|
|
604
|
+
labels: O.additionalOwners
|
|
605
|
+
}, kt)] }) : null]
|
|
589
606
|
}) : null,
|
|
590
|
-
|
|
607
|
+
A === T.review ? /* @__PURE__ */ S("div", {
|
|
591
608
|
className: "ttw:max-w-2xl",
|
|
592
609
|
children: /* @__PURE__ */ S(Te, {
|
|
593
|
-
personalDetails:
|
|
594
|
-
businessDetails:
|
|
595
|
-
additionalOwners:
|
|
596
|
-
primaryOwnerName:
|
|
597
|
-
primaryOwnerPercentage:
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
610
|
+
personalDetails: M,
|
|
611
|
+
businessDetails: j,
|
|
612
|
+
additionalOwners: Ar,
|
|
613
|
+
primaryOwnerName: Dr,
|
|
614
|
+
primaryOwnerPercentage: Or,
|
|
615
|
+
isSoleProprietor: Z,
|
|
616
|
+
personalStateOptions: En,
|
|
617
|
+
businessStateOptions: Tn,
|
|
618
|
+
naicsOptions: wn,
|
|
619
|
+
onEditPersonal: nr,
|
|
620
|
+
onEditBusiness: rr,
|
|
621
|
+
ownersEditAriaLabel: O.reviewOwnersEditAriaLabel,
|
|
622
|
+
isSubmitting: $,
|
|
623
|
+
labels: O
|
|
606
624
|
})
|
|
607
625
|
}) : null,
|
|
608
|
-
|
|
609
|
-
value:
|
|
610
|
-
onValueChange:
|
|
611
|
-
isSubmitting:
|
|
612
|
-
showAllErrors:
|
|
613
|
-
labels:
|
|
614
|
-
bankName:
|
|
615
|
-
termsHref:
|
|
616
|
-
privacyHref:
|
|
617
|
-
electronicCommunicationHref:
|
|
618
|
-
patriotActHref:
|
|
626
|
+
A === T.terms ? /* @__PURE__ */ S(Ee, {
|
|
627
|
+
value: j,
|
|
628
|
+
onValueChange: St,
|
|
629
|
+
isSubmitting: $,
|
|
630
|
+
showAllErrors: Cr,
|
|
631
|
+
labels: O.businessDetails,
|
|
632
|
+
bankName: vr,
|
|
633
|
+
termsHref: ht,
|
|
634
|
+
privacyHref: gt,
|
|
635
|
+
electronicCommunicationHref: _t,
|
|
636
|
+
patriotActHref: vt
|
|
619
637
|
}) : null
|
|
620
638
|
]
|
|
621
639
|
})
|
|
622
640
|
}),
|
|
641
|
+
E ? /* @__PURE__ */ S(ot, { callback: lt }) : null,
|
|
623
642
|
/* @__PURE__ */ S(fe, {
|
|
624
|
-
open:
|
|
625
|
-
onConfirm:
|
|
626
|
-
onCancel: () =>
|
|
627
|
-
isDeleting:
|
|
643
|
+
open: en,
|
|
644
|
+
onConfirm: gr,
|
|
645
|
+
onCancel: () => tn(!1),
|
|
646
|
+
isDeleting: ln.isPending,
|
|
628
647
|
labels: {
|
|
629
|
-
descriptionEmphasis:
|
|
630
|
-
...
|
|
648
|
+
descriptionEmphasis: O.saveAndClose,
|
|
649
|
+
...O.deleteApplicationDialog
|
|
631
650
|
},
|
|
632
651
|
testIds: {
|
|
633
652
|
root: m.deleteDialog,
|
|
@@ -635,10 +654,10 @@ function ot({ onEmbeddedOnboardingCompletedSuccessfully: te, onNavigateToDashboa
|
|
|
635
654
|
cancel: m.deleteDialogCancel
|
|
636
655
|
}
|
|
637
656
|
}),
|
|
638
|
-
/* @__PURE__ */ S(
|
|
657
|
+
/* @__PURE__ */ S(d, {})
|
|
639
658
|
] });
|
|
640
659
|
}
|
|
641
|
-
function
|
|
660
|
+
function ct({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, uiFramework: o, errorFallback: s, onError: c, analytics: l, disclosuresAcceptance: u, providerLabels: d, ...ee }) {
|
|
642
661
|
return /* @__PURE__ */ S(te, {
|
|
643
662
|
baseUrl: e,
|
|
644
663
|
widgetToken: t,
|
|
@@ -651,49 +670,52 @@ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
651
670
|
onError: c,
|
|
652
671
|
analytics: l,
|
|
653
672
|
disclosuresAcceptance: u,
|
|
654
|
-
providerLabels:
|
|
673
|
+
providerLabels: d,
|
|
655
674
|
widgetName: Fe,
|
|
656
|
-
children: /* @__PURE__ */ S(
|
|
675
|
+
children: /* @__PURE__ */ S(E, { ...ee })
|
|
657
676
|
});
|
|
658
677
|
}
|
|
659
|
-
function
|
|
678
|
+
function E(e) {
|
|
660
679
|
let { initResponse: t } = re(), { client: n } = i(), r = t?.userId ?? null, [a, o] = x(r), [s, c] = x(0);
|
|
661
680
|
r !== a && (o(r), a !== null && r !== null && c((e) => e + 1));
|
|
662
681
|
let [l, u] = x(n);
|
|
663
|
-
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ S(
|
|
682
|
+
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ S(lt, { ...e }, s);
|
|
664
683
|
}
|
|
665
|
-
function
|
|
666
|
-
let { authEpoch: t } = i(), { ownApplicationIds: n } = Ge(), [r, a] = x(null), [o, s] = x(0), [c, l] = x(
|
|
684
|
+
function lt(e) {
|
|
685
|
+
let { authEpoch: t } = i(), { ownApplicationIds: n } = Ge(), [r, a] = x(null), [o, s] = x(0), [c, l] = x(null), [u, d] = x(null), [ee, f] = x(null), te = _(() => {
|
|
686
|
+
f(null);
|
|
687
|
+
}, []), ne = _(() => {
|
|
667
688
|
a(null), s((e) => e + 1);
|
|
668
|
-
}, []),
|
|
669
|
-
a(null), l(
|
|
670
|
-
}, []),
|
|
671
|
-
l(
|
|
689
|
+
}, []), re = _(() => {
|
|
690
|
+
d(r?.applicationId ?? null), a(null), l(t);
|
|
691
|
+
}, [t, r]), ie = _(() => {
|
|
692
|
+
l(null), d(null), f(o + 1), s(o + 1);
|
|
672
693
|
}, [o]);
|
|
673
|
-
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (a(null), s((e) => e + 1)), c ? /* @__PURE__ */ S(
|
|
674
|
-
|
|
694
|
+
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (a(null), s((e) => e + 1)), c !== null && t !== c && n !== null && n.some((e) => e !== u) && (l(null), d(null), f(o + 1), s(o + 1)), c === null ? /* @__PURE__ */ S(Re, { children: /* @__PURE__ */ S(dt, {
|
|
695
|
+
...e,
|
|
696
|
+
onEditableDraftChange: a,
|
|
697
|
+
onApplicationDeleted: re,
|
|
698
|
+
onNoticeReplacedByForm: ne,
|
|
699
|
+
focusFormOnMount: ee === o,
|
|
700
|
+
onFocusFormOnMountDone: te
|
|
701
|
+
}, o) }, o) : /* @__PURE__ */ S("div", {
|
|
702
|
+
className: Qe,
|
|
675
703
|
children: /* @__PURE__ */ S(pe, {
|
|
676
704
|
className: "ttw:max-w-2xl",
|
|
677
|
-
onStartNewApplication:
|
|
705
|
+
onStartNewApplication: ie,
|
|
678
706
|
labels: e.labels?.applicationDeleted,
|
|
679
707
|
testIds: {
|
|
680
708
|
root: m.applicationDeletedScreen,
|
|
681
709
|
startNewApplication: m.applicationDeletedStartNew
|
|
682
710
|
}
|
|
683
711
|
})
|
|
684
|
-
})
|
|
685
|
-
...e,
|
|
686
|
-
onEditableDraftChange: a,
|
|
687
|
-
onApplicationDeleted: f,
|
|
688
|
-
onNoticeReplacedByForm: d,
|
|
689
|
-
focusFormOnMount: u === o
|
|
690
|
-
}, o) }, o);
|
|
712
|
+
});
|
|
691
713
|
}
|
|
692
|
-
var
|
|
693
|
-
function
|
|
714
|
+
var ut = { canRender: !1 };
|
|
715
|
+
function dt(e) {
|
|
694
716
|
let { authEpoch: t } = i(), { applicationId: n, clientSecret: r, isResolved: a } = Ge(), { application: o, isResolved: s, isUnavailable: c } = Ke(n, r), [l, u] = x(null);
|
|
695
717
|
if (v(() => {
|
|
696
|
-
l?.canRender !== !0 && a && s && (c || o !== null && o.status !== void 0 && o.status !==
|
|
718
|
+
l?.canRender !== !0 && a && s && (c || o !== null && o.status !== void 0 && o.status !== Xe ? u(ut) : u({
|
|
697
719
|
canRender: !0,
|
|
698
720
|
applicationId: o === null ? null : n,
|
|
699
721
|
authEpoch: t,
|
|
@@ -708,11 +730,11 @@ function ut(e) {
|
|
|
708
730
|
o,
|
|
709
731
|
n
|
|
710
732
|
]), l === null || !l.canRender) return null;
|
|
711
|
-
let { applicationId:
|
|
712
|
-
return /* @__PURE__ */ S(
|
|
733
|
+
let { applicationId: d, authEpoch: ee, prefill: f } = l;
|
|
734
|
+
return /* @__PURE__ */ S(st, {
|
|
713
735
|
...e,
|
|
714
|
-
initialApplicationId:
|
|
715
|
-
initialBoundAuthEpoch:
|
|
736
|
+
initialApplicationId: d,
|
|
737
|
+
initialBoundAuthEpoch: ee,
|
|
716
738
|
initialBusinessDetails: {
|
|
717
739
|
...Le(e.initialBusinessDetails),
|
|
718
740
|
...f?.businessDetails
|
|
@@ -724,4 +746,4 @@ function ut(e) {
|
|
|
724
746
|
initialAdditionalOwners: f?.additionalOwners ?? e.initialAdditionalOwners?.map(Ie)
|
|
725
747
|
});
|
|
726
748
|
}
|
|
727
|
-
export {
|
|
749
|
+
export { ct as BankAccountOnboardingWidget, ct as default, c as OnboardingSuppressionReason };
|