@tesouro/embedded-components-react 0.2.296 → 0.2.299
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 +6 -0
- package/dist/index.d.ts +107 -87
- package/dist/lib/CounterpartsWidget.d.ts +24 -4
- package/dist/lib/ReceivablesWidget.d.ts +20 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +210 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +31 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +122 -149
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +163 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +52 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +98 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +6 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +7 -3
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +103 -50
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +126 -76
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +6 -173
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +173 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +5 -57
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +51 -22
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +24 -72
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +76 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +13 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +53 -110
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +115 -51
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +53 -47
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +44 -504
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +480 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +21 -19
- package/dist/libs/tesouro-embedded-components-react/{accept-disclosures-widget/data-access/dist/index2.js → shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js} +3 -4
- package/dist/libs/tesouro-embedded-components-react/{accept-disclosures-widget/data-access/dist/index3.js → shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js} +4 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -3,38 +3,41 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Dialog as e, DialogContent as t, DialogTitle as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useAcceptWidgetDisclosures as r } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
7
|
+
import { useDisclosuresQuery as i } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { OnboardingShell as a } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
|
|
7
10
|
import "../../../shared/ui/dist/index.js";
|
|
8
|
-
import { useAnalyticsTrack as
|
|
9
|
-
import { WidgetProvider as
|
|
10
|
-
import { getStateOptions as
|
|
11
|
-
import { extractApiErrorMessage as
|
|
12
|
-
import { useRefetchWidget as
|
|
13
|
-
import { getNaicsOptions as
|
|
11
|
+
import { useAnalyticsTrack as o } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
12
|
+
import { WidgetProvider as s } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
13
|
+
import { getStateOptions as c } from "../../../shared/util/dist/lib/usStates.js";
|
|
14
|
+
import { extractApiErrorMessage as l } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
15
|
+
import { useRefetchWidget as u, useWidgetConfig as d } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
16
|
+
import { getNaicsOptions as f } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
|
|
14
17
|
import "../../../shared/feature/dist/index.js";
|
|
15
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as
|
|
16
|
-
import { interpolateBankName as
|
|
17
|
-
import { ResultStep as
|
|
18
|
-
import { MarketingWidget as
|
|
18
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as p } from "../../ui/dist/index4.js";
|
|
19
|
+
import { interpolateBankName as m } from "../../ui/dist/index6.js";
|
|
20
|
+
import { ResultStep as ee } from "../../ui/dist/index11.js";
|
|
21
|
+
import { MarketingWidget as te } from "../../ui/dist/index28.js";
|
|
19
22
|
import "../../ui/dist/index.js";
|
|
20
|
-
import { BusinessDetailsStep as
|
|
21
|
-
import { PersonalDetailsStep as
|
|
22
|
-
import { AdditionalOwnersStep as
|
|
23
|
-
import { buildCreateApplicationBody as
|
|
24
|
-
import { OnboardingAnalyticsEvent as
|
|
25
|
-
import { DEFAULT_LABELS as
|
|
26
|
-
import { ApplicationClientSecretProvider as
|
|
27
|
-
import { useCreateApplication as
|
|
28
|
-
import { useUpdateApplication as
|
|
29
|
-
import { useSubmitApplication as
|
|
30
|
-
import { usePollApplicationCompletion as
|
|
31
|
-
import { OnboardingSuppressionReason as
|
|
32
|
-
import { useOrganizationOnboardingSuppression as
|
|
23
|
+
import { BusinessDetailsStep as ne } from "./index9.js";
|
|
24
|
+
import { PersonalDetailsStep as re } from "./index11.js";
|
|
25
|
+
import { AdditionalOwnersStep as ie } from "./index13.js";
|
|
26
|
+
import { buildCreateApplicationBody as ae, buildUpdateApplicationBody as h } from "./index14.js";
|
|
27
|
+
import { OnboardingAnalyticsEvent as g, WIDGET_NAME as _ } from "./index15.js";
|
|
28
|
+
import { DEFAULT_LABELS as v } from "./index16.js";
|
|
29
|
+
import { ApplicationClientSecretProvider as oe, useApplicationClientSecret as se } from "../../data-access/dist/index2.js";
|
|
30
|
+
import { useCreateApplication as ce } from "../../data-access/dist/index4.js";
|
|
31
|
+
import { useUpdateApplication as le } from "../../data-access/dist/index6.js";
|
|
32
|
+
import { useSubmitApplication as ue } from "../../data-access/dist/index7.js";
|
|
33
|
+
import { usePollApplicationCompletion as de } from "../../data-access/dist/index8.js";
|
|
34
|
+
import { OnboardingSuppressionReason as y } from "../../data-access/dist/index9.js";
|
|
35
|
+
import { useOrganizationOnboardingSuppression as fe } from "../../data-access/dist/index10.js";
|
|
33
36
|
import "../../data-access/dist/index.js";
|
|
34
|
-
import { useCallback as
|
|
35
|
-
import { Fragment as
|
|
37
|
+
import { useCallback as b, useEffect as x, useMemo as S, useRef as pe, useState as C } from "react";
|
|
38
|
+
import { Fragment as me, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
36
39
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js
|
|
37
|
-
var
|
|
40
|
+
var he = {
|
|
38
41
|
companyLegalName: "",
|
|
39
42
|
companyDbaName: "",
|
|
40
43
|
businessAddress: "",
|
|
@@ -48,7 +51,7 @@ var _e = {
|
|
|
48
51
|
naicsCode: "",
|
|
49
52
|
isAuthorized: null,
|
|
50
53
|
isCheckboxChecked: !1
|
|
51
|
-
},
|
|
54
|
+
}, ge = {
|
|
52
55
|
firstName: "",
|
|
53
56
|
lastName: "",
|
|
54
57
|
dateOfBirth: void 0,
|
|
@@ -62,7 +65,7 @@ var _e = {
|
|
|
62
65
|
ownsOver25Percent: null,
|
|
63
66
|
ownershipPercentage: null
|
|
64
67
|
};
|
|
65
|
-
function
|
|
68
|
+
function _e(e, t) {
|
|
66
69
|
if (e === 0) return {
|
|
67
70
|
title: t.businessReviewTitle,
|
|
68
71
|
subtitle: t.businessReviewSubtitle
|
|
@@ -72,7 +75,7 @@ function ye(e, t) {
|
|
|
72
75
|
subtitle: t.personalReviewSubtitle
|
|
73
76
|
};
|
|
74
77
|
let n = {
|
|
75
|
-
...
|
|
78
|
+
...p,
|
|
76
79
|
...t.additionalOwners
|
|
77
80
|
};
|
|
78
81
|
return {
|
|
@@ -80,234 +83,242 @@ function ye(e, t) {
|
|
|
80
83
|
subtitle: n.subheading
|
|
81
84
|
};
|
|
82
85
|
}
|
|
83
|
-
function
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
-
let
|
|
89
|
-
...
|
|
90
|
-
...
|
|
86
|
+
function E({ onEmbeddedOnboardingCompletedSuccessfully: s, onNavigateToDashboard: p, labels: _, initialBusinessDetails: oe, initialPersonalDetails: E, initialAdditionalOwners: D, bankLogoSrc: ve, disclosureLinks: ye, marketingContent: O = null, open: be, defaultOpen: k, onOpenChange: A }) {
|
|
87
|
+
let j = o();
|
|
88
|
+
x(() => {
|
|
89
|
+
j(g.Mounted);
|
|
90
|
+
}, [j]);
|
|
91
|
+
let M = {
|
|
92
|
+
...v,
|
|
93
|
+
..._,
|
|
91
94
|
stepIndicator: {
|
|
92
|
-
...
|
|
93
|
-
...
|
|
95
|
+
...v.stepIndicator,
|
|
96
|
+
..._?.stepIndicator
|
|
94
97
|
},
|
|
95
|
-
businessDetails:
|
|
96
|
-
personalDetails:
|
|
97
|
-
additionalOwners:
|
|
98
|
+
businessDetails: _?.businessDetails ?? {},
|
|
99
|
+
personalDetails: _?.personalDetails ?? {},
|
|
100
|
+
additionalOwners: _?.additionalOwners ?? {},
|
|
98
101
|
result: {
|
|
99
|
-
...
|
|
100
|
-
...
|
|
102
|
+
...v.result,
|
|
103
|
+
..._?.result
|
|
101
104
|
}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
}, [
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
}, []),
|
|
109
|
-
|
|
110
|
-
}, [
|
|
111
|
-
|
|
112
|
-
}, [
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
})), [
|
|
116
|
-
...
|
|
117
|
-
...
|
|
118
|
-
})), [
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
if (
|
|
122
|
-
!Z || !Q || (
|
|
105
|
+
}, N = d().initResponse, { termsHref: xe, privacyHref: Se, electronicCommunicationHref: Ce, patriotActHref: we } = ye ?? {}, Te = O !== null, P = be === void 0, [Ee, F] = C(!1), [De, Oe] = C(!0), [ke, Ae] = C(() => k ?? !1), je = ve ?? O?.bankLogoSrc ?? void 0, Me = P ? ke : be, Ne = k ?? !1, I = b((e) => {
|
|
106
|
+
P && Ae(e), A?.(e);
|
|
107
|
+
}, [A, P]), Pe = b(() => {
|
|
108
|
+
j(g.OpenMarketing), F(!0);
|
|
109
|
+
}, [j]), Fe = b(() => {
|
|
110
|
+
F(!1);
|
|
111
|
+
}, []), Ie = b(() => {
|
|
112
|
+
j(g.BeginOnboarding), F(!1), I(!0);
|
|
113
|
+
}, [I, j]), Le = b(() => {
|
|
114
|
+
Oe(!1), s();
|
|
115
|
+
}, [s]), Re = u(), [L, R] = C(0), [ze, Be] = C(() => ({
|
|
116
|
+
...he,
|
|
117
|
+
...oe
|
|
118
|
+
})), [z, Ve] = C(() => ({
|
|
119
|
+
...ge,
|
|
120
|
+
...E
|
|
121
|
+
})), [He, Ue] = C(() => D ?? []), [B, We] = C(null), [V, Ge] = C(null), [H, Ke] = C(null), [U, qe] = C(null), [Je, W] = C(null), [G, Ye] = C(!1), [Xe, K] = C(null), Ze = ce(), q = le(), Qe = ue(), $e = de(), { setClientSecret: et } = se(), { data: tt, refetch: nt } = i(), { mutateAsync: rt } = r(), J = fe(), Y = pe(null);
|
|
122
|
+
x(() => () => Y.current?.abort(), []);
|
|
123
|
+
let it = S(() => f(M.businessDetails.naicsTitles), [M.businessDetails.naicsTitles]), at = S(() => c(M.businessDetails.stateTitles), [M.businessDetails.stateTitles]), ot = S(() => c(M.personalDetails.stateTitles), [M.personalDetails.stateTitles]), st = S(() => c(M.additionalOwners.stateTitles), [M.additionalOwners.stateTitles]), X = G || Xe !== null, ct = N?.status === "ACTIVE" || N?.status === "INACTIVE", lt = N?.status === "INVITED", Z = !!N && !X && (ct || lt || J.isSuppressed), Q = Z ? ct ? y.UserAlreadyOnboarded : lt ? y.UserInvitedToOrganization : J.reason : null;
|
|
124
|
+
if (x(() => {
|
|
125
|
+
!Z || !Q || (j(g.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
|
|
123
126
|
}, [
|
|
124
127
|
Z,
|
|
125
128
|
Q,
|
|
126
|
-
|
|
127
|
-
]), !
|
|
128
|
-
let
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
],
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
|
|
129
|
+
j
|
|
130
|
+
]), !N || !X && (Z || !J.isResolved)) return null;
|
|
131
|
+
let ut = B?.companyStructure === "SOLE_PROPRIETORSHIP", dt = [
|
|
132
|
+
M.stepIndicator.business,
|
|
133
|
+
M.stepIndicator.personal,
|
|
134
|
+
M.stepIndicator.ownership
|
|
135
|
+
], ft = L === 0 ? B : L === 1 ? V : L === 2 ? H : null, $ = Ze.isPending || q.isPending || Qe.isPending || G, pt = () => {
|
|
136
|
+
W(null), R((e) => e === 0 ? 0 : e - 1);
|
|
137
|
+
}, mt = () => {
|
|
138
|
+
I(!1);
|
|
139
|
+
}, ht = async (e) => {
|
|
140
|
+
Ye(!0), I(!0);
|
|
138
141
|
let t = new AbortController();
|
|
139
|
-
|
|
142
|
+
Y.current = t;
|
|
140
143
|
let n = !1;
|
|
141
144
|
try {
|
|
142
|
-
let r = await
|
|
145
|
+
let r = await Qe.mutateAsync({ path: { id: e } });
|
|
143
146
|
if (t.signal.aborted) return;
|
|
144
|
-
if (!r.id) throw Error(
|
|
145
|
-
n = !0, (await
|
|
147
|
+
if (!r.id) throw Error(M.submitFailedError);
|
|
148
|
+
if (n = !0, (await $e(e, { signal: t.signal })).status === "complete") {
|
|
149
|
+
let e = tt;
|
|
150
|
+
if (e === void 0 && (e = (await nt()).data), t.signal.aborted) return;
|
|
151
|
+
if (e !== void 0) try {
|
|
152
|
+
await rt({ displayedVersion: e.version ?? null });
|
|
153
|
+
} catch {}
|
|
154
|
+
if (t.signal.aborted) return;
|
|
155
|
+
K("success"), Re(), Le();
|
|
156
|
+
} else K("pending");
|
|
146
157
|
} catch (e) {
|
|
147
158
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
148
159
|
if (!n) throw e;
|
|
149
|
-
|
|
160
|
+
K("pending");
|
|
150
161
|
} finally {
|
|
151
|
-
|
|
162
|
+
Y.current = null, Ye(!1);
|
|
152
163
|
}
|
|
153
|
-
},
|
|
154
|
-
|
|
164
|
+
}, gt = async () => {
|
|
165
|
+
W(null);
|
|
155
166
|
try {
|
|
156
|
-
if (
|
|
157
|
-
if (!
|
|
158
|
-
let e =
|
|
167
|
+
if (L === 0) {
|
|
168
|
+
if (!B) return;
|
|
169
|
+
let e = U;
|
|
159
170
|
if (!e) {
|
|
160
|
-
let t = await
|
|
161
|
-
e = t.id,
|
|
171
|
+
let t = await Ze.mutateAsync({ body: ae(B) });
|
|
172
|
+
e = t.id, qe(e), t.clientSecret && et(t.clientSecret);
|
|
162
173
|
}
|
|
163
|
-
|
|
164
|
-
} else if (
|
|
165
|
-
if (!
|
|
166
|
-
await
|
|
167
|
-
path: { id:
|
|
168
|
-
body:
|
|
169
|
-
businessDetails:
|
|
170
|
-
applicant:
|
|
174
|
+
R(1);
|
|
175
|
+
} else if (L === 1) {
|
|
176
|
+
if (!V || !B || !U) return;
|
|
177
|
+
await q.mutateAsync({
|
|
178
|
+
path: { id: U },
|
|
179
|
+
body: h({
|
|
180
|
+
businessDetails: B,
|
|
181
|
+
applicant: V
|
|
171
182
|
})
|
|
172
|
-
}),
|
|
173
|
-
} else if (
|
|
174
|
-
if (!
|
|
175
|
-
await
|
|
176
|
-
path: { id:
|
|
177
|
-
body:
|
|
178
|
-
}), await
|
|
183
|
+
}), R(2);
|
|
184
|
+
} else if (L === 2) {
|
|
185
|
+
if (!H || !U) return;
|
|
186
|
+
await q.mutateAsync({
|
|
187
|
+
path: { id: U },
|
|
188
|
+
body: h({ businessOwners: H })
|
|
189
|
+
}), await ht(U);
|
|
179
190
|
}
|
|
180
191
|
} catch (e) {
|
|
181
|
-
let t =
|
|
182
|
-
|
|
192
|
+
let t = l(e) ?? (e instanceof Error ? e.message : void 0) ?? M.genericRetryError;
|
|
193
|
+
W(t);
|
|
183
194
|
}
|
|
184
|
-
},
|
|
185
|
-
if (
|
|
186
|
-
let r =
|
|
187
|
-
...
|
|
188
|
-
...
|
|
195
|
+
}, _t = _e(Math.min(L, 2), M), vt = N.bankName?.trim() || M.fallbackBankName, yt = m(M.shellFdicDisclaimer, vt);
|
|
196
|
+
if (X) {
|
|
197
|
+
let r = B?.companyLegalName ?? "", i = N.bankName?.trim() || M.fallbackBankName, a = Xe ?? "pending", o = a === "success", s = {
|
|
198
|
+
...v.result,
|
|
199
|
+
...M.result
|
|
189
200
|
};
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
-
open:
|
|
192
|
-
onOpenChange:
|
|
193
|
-
children: /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ w(e, {
|
|
202
|
+
open: Me,
|
|
203
|
+
onOpenChange: I,
|
|
204
|
+
children: /* @__PURE__ */ T(t, {
|
|
194
205
|
className: "ttw:grid ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:grid-rows-[1fr] ttw:gap-0 ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ w(n, {
|
|
196
207
|
className: "ttw:sr-only",
|
|
197
|
-
children:
|
|
198
|
-
}), /* @__PURE__ */
|
|
208
|
+
children: M.modalTitle
|
|
209
|
+
}), /* @__PURE__ */ w(ee, {
|
|
199
210
|
status: a,
|
|
200
|
-
isLoading:
|
|
211
|
+
isLoading: G,
|
|
201
212
|
loadingMessage: s.loadingMessage,
|
|
202
213
|
headingLine1: o ? s.successHeadingLine1 : s.pendingHeadingLine1,
|
|
203
214
|
headingLine2: `${r}!`,
|
|
204
215
|
body: o ? s.successBody : s.pendingBody,
|
|
205
|
-
followUpEmail:
|
|
216
|
+
followUpEmail: V?.workEmail ?? "",
|
|
206
217
|
emailBoxLead: s.pendingEmailBoxLead,
|
|
207
218
|
navigateToDashboardLabel: s.navigateToDashboard,
|
|
208
|
-
bankLogoSrc:
|
|
209
|
-
bankLogoAlt:
|
|
210
|
-
fdicDisclaimer:
|
|
211
|
-
onNavigateToDashboard:
|
|
219
|
+
bankLogoSrc: je,
|
|
220
|
+
bankLogoAlt: m(s.bankLogoAlt, i),
|
|
221
|
+
fdicDisclaimer: m(s.fdicDisclaimer, i),
|
|
222
|
+
onNavigateToDashboard: p
|
|
212
223
|
})]
|
|
213
224
|
})
|
|
214
225
|
});
|
|
215
226
|
}
|
|
216
|
-
let
|
|
217
|
-
return /* @__PURE__ */
|
|
218
|
-
open:
|
|
227
|
+
let bt = L === 2 ? M.submit : M.next, xt = ft === null || $;
|
|
228
|
+
return /* @__PURE__ */ T(me, { children: [Te && De && O ? /* @__PURE__ */ w(te, {
|
|
229
|
+
open: Ee,
|
|
219
230
|
isVisible: !0,
|
|
220
|
-
vspLogo:
|
|
221
|
-
bankingText:
|
|
222
|
-
primaryCaption:
|
|
223
|
-
secondaryCaption:
|
|
224
|
-
providedByCaption:
|
|
225
|
-
modalPrimaryImg:
|
|
226
|
-
primaryModalHeader:
|
|
227
|
-
benefits:
|
|
228
|
-
appearance:
|
|
229
|
-
onOpenMarketingModal:
|
|
230
|
-
onCloseMarketingModal:
|
|
231
|
-
onPrimaryCtaClick:
|
|
232
|
-
}) : null, /* @__PURE__ */
|
|
233
|
-
open:
|
|
234
|
-
defaultOpen:
|
|
235
|
-
onOpenChange:
|
|
236
|
-
title:
|
|
237
|
-
subtitle:
|
|
238
|
-
stepLabels:
|
|
239
|
-
activeStep:
|
|
240
|
-
disclaimerText:
|
|
241
|
-
onBack:
|
|
242
|
-
onCancel:
|
|
243
|
-
onNext:
|
|
231
|
+
vspLogo: O.vspLogo,
|
|
232
|
+
bankingText: O.bankingText,
|
|
233
|
+
primaryCaption: O.primaryCaption,
|
|
234
|
+
secondaryCaption: O.secondaryCaption,
|
|
235
|
+
providedByCaption: O.providedByCaption,
|
|
236
|
+
modalPrimaryImg: O.modalPrimaryImg,
|
|
237
|
+
primaryModalHeader: O.primaryModalHeader,
|
|
238
|
+
benefits: O.benefits,
|
|
239
|
+
appearance: O.appearance,
|
|
240
|
+
onOpenMarketingModal: Pe,
|
|
241
|
+
onCloseMarketingModal: Fe,
|
|
242
|
+
onPrimaryCtaClick: Ie
|
|
243
|
+
}) : null, /* @__PURE__ */ T(a, {
|
|
244
|
+
open: Me,
|
|
245
|
+
defaultOpen: Ne,
|
|
246
|
+
onOpenChange: I,
|
|
247
|
+
title: _t.title,
|
|
248
|
+
subtitle: _t.subtitle,
|
|
249
|
+
stepLabels: dt,
|
|
250
|
+
activeStep: L,
|
|
251
|
+
disclaimerText: yt,
|
|
252
|
+
onBack: L === 0 ? mt : pt,
|
|
253
|
+
onCancel: L > 0 ? mt : void 0,
|
|
254
|
+
onNext: gt,
|
|
244
255
|
showDismissButton: !1,
|
|
245
|
-
isNextDisabled:
|
|
256
|
+
isNextDisabled: xt,
|
|
246
257
|
isNextLoading: $,
|
|
247
|
-
nextLabel:
|
|
258
|
+
nextLabel: bt,
|
|
248
259
|
nextIcon: null,
|
|
249
|
-
errorMessage:
|
|
260
|
+
errorMessage: Je,
|
|
250
261
|
labels: {
|
|
251
|
-
backButton:
|
|
252
|
-
cancelButton:
|
|
262
|
+
backButton: L === 0 ? M.cancel : M.back,
|
|
263
|
+
cancelButton: M.cancel
|
|
253
264
|
},
|
|
254
265
|
children: [
|
|
255
|
-
|
|
256
|
-
value:
|
|
257
|
-
onValueChange:
|
|
258
|
-
onSnapshotChange:
|
|
259
|
-
naicsOptions:
|
|
260
|
-
stateOptions:
|
|
266
|
+
L === 0 ? /* @__PURE__ */ w(ne, {
|
|
267
|
+
value: ze,
|
|
268
|
+
onValueChange: Be,
|
|
269
|
+
onSnapshotChange: We,
|
|
270
|
+
naicsOptions: it,
|
|
271
|
+
stateOptions: at,
|
|
261
272
|
isSubmitting: $,
|
|
262
|
-
labels:
|
|
263
|
-
bankName:
|
|
264
|
-
termsHref:
|
|
265
|
-
privacyHref:
|
|
266
|
-
electronicCommunicationHref:
|
|
267
|
-
patriotActHref:
|
|
273
|
+
labels: M.businessDetails,
|
|
274
|
+
bankName: vt,
|
|
275
|
+
termsHref: xe,
|
|
276
|
+
privacyHref: Se,
|
|
277
|
+
electronicCommunicationHref: Ce,
|
|
278
|
+
patriotActHref: we
|
|
268
279
|
}, "business") : null,
|
|
269
|
-
|
|
270
|
-
value:
|
|
271
|
-
onValueChange:
|
|
272
|
-
onSnapshotChange:
|
|
273
|
-
stateOptions:
|
|
280
|
+
L === 1 ? /* @__PURE__ */ w(re, {
|
|
281
|
+
value: z,
|
|
282
|
+
onValueChange: Ve,
|
|
283
|
+
onSnapshotChange: Ge,
|
|
284
|
+
stateOptions: ot,
|
|
274
285
|
isSubmitting: $,
|
|
275
|
-
labels:
|
|
286
|
+
labels: M.personalDetails
|
|
276
287
|
}, "personal") : null,
|
|
277
|
-
|
|
278
|
-
owners:
|
|
279
|
-
onOwnersChange:
|
|
280
|
-
primaryOwnerName: `${
|
|
281
|
-
primaryOwnerPercentage:
|
|
282
|
-
stateOptions:
|
|
283
|
-
onSnapshotChange:
|
|
288
|
+
L === 2 ? /* @__PURE__ */ w(ie, {
|
|
289
|
+
owners: He,
|
|
290
|
+
onOwnersChange: Ue,
|
|
291
|
+
primaryOwnerName: `${z.firstName} ${z.lastName}`.trim(),
|
|
292
|
+
primaryOwnerPercentage: ut ? 100 : V?.ownsOver25Percent === !0 ? V.ownershipPercentage ?? 0 : 0,
|
|
293
|
+
stateOptions: st,
|
|
294
|
+
onSnapshotChange: Ke,
|
|
284
295
|
isSubmitting: $,
|
|
285
|
-
labels:
|
|
296
|
+
labels: M.additionalOwners
|
|
286
297
|
}) : null
|
|
287
298
|
]
|
|
288
299
|
})] });
|
|
289
300
|
}
|
|
290
|
-
function
|
|
291
|
-
return /* @__PURE__ */
|
|
301
|
+
function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...p }) {
|
|
302
|
+
return /* @__PURE__ */ w(s, {
|
|
292
303
|
baseUrl: e,
|
|
293
304
|
widgetToken: t,
|
|
294
305
|
organizationId: n,
|
|
295
306
|
configClient: r,
|
|
296
307
|
gatewayRouting: i,
|
|
297
|
-
linkComponent:
|
|
298
|
-
implementation:
|
|
299
|
-
uiFramework:
|
|
300
|
-
errorFallback:
|
|
301
|
-
onError:
|
|
302
|
-
analytics:
|
|
303
|
-
disclosuresAcceptance:
|
|
304
|
-
widgetName:
|
|
305
|
-
children: /* @__PURE__ */
|
|
308
|
+
linkComponent: a,
|
|
309
|
+
implementation: o,
|
|
310
|
+
uiFramework: c,
|
|
311
|
+
errorFallback: l,
|
|
312
|
+
onError: u,
|
|
313
|
+
analytics: d,
|
|
314
|
+
disclosuresAcceptance: f,
|
|
315
|
+
widgetName: _,
|
|
316
|
+
children: /* @__PURE__ */ w(ve, { ...p })
|
|
306
317
|
});
|
|
307
318
|
}
|
|
308
|
-
function
|
|
309
|
-
let { initResponse: t } =
|
|
310
|
-
return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */
|
|
319
|
+
function ve(e) {
|
|
320
|
+
let { initResponse: t } = d(), n = t?.userId ?? null, [r, i] = C(n), [a, o] = C(0);
|
|
321
|
+
return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */ w(oe, { children: /* @__PURE__ */ w(E, { ...e }, a) }, a);
|
|
311
322
|
}
|
|
312
323
|
//#endregion
|
|
313
|
-
export {
|
|
324
|
+
export { D as BankAccountOnboardingWidget, D as default };
|
|
@@ -32,44 +32,48 @@ function g({ open: g, onOpenChange: _, payableId: v, readOnly: y, copy: b }) {
|
|
|
32
32
|
}, [w, I]);
|
|
33
33
|
let L = d((e) => {
|
|
34
34
|
T(!0), C(e);
|
|
35
|
-
}, []), R =
|
|
35
|
+
}, []), R = l({
|
|
36
|
+
payableId: A,
|
|
37
|
+
counterpartId: S,
|
|
38
|
+
payableCounterpartId: I,
|
|
39
|
+
onCounterpartChange: L,
|
|
40
|
+
requiredError: F.errors?.vendor
|
|
41
|
+
}), z = i({
|
|
36
42
|
payableId: v,
|
|
37
43
|
form: F,
|
|
38
44
|
counterpartId: S,
|
|
45
|
+
clearCounterpart: !!(A && w) && !S,
|
|
46
|
+
prepareVendorForSave: R.savePaymentInstructions,
|
|
39
47
|
onPayableCreated: k,
|
|
40
48
|
onSaved: k,
|
|
41
49
|
onDraftSaved: () => _(!1),
|
|
42
50
|
onFinalized: () => _(!1)
|
|
43
|
-
}),
|
|
51
|
+
}), B = !!(z.isSavingDraft || z.isFinalizing), V = p(() => (N.data?.data ?? []).map((e) => ({
|
|
44
52
|
value: e.id,
|
|
45
53
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
46
|
-
})), [N.data]),
|
|
47
|
-
|
|
54
|
+
})), [N.data]), H = P?.source_of_payable_data === "ocr", U = P?.counterpart_raw_data?.name, W = d(() => {
|
|
55
|
+
let e = F.isDirty || R.hasUnsavedVendorChanges;
|
|
56
|
+
!y && e && !window.confirm(x.discardConfirm) || _(!1);
|
|
48
57
|
}, [
|
|
49
58
|
x.discardConfirm,
|
|
50
59
|
F.isDirty,
|
|
51
60
|
_,
|
|
52
|
-
y
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
y,
|
|
62
|
+
R.hasUnsavedVendorChanges
|
|
63
|
+
]), G = d((e) => {
|
|
64
|
+
if (!B) return e ? _(!0) : W();
|
|
55
65
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
W,
|
|
67
|
+
B,
|
|
58
68
|
_
|
|
59
|
-
])
|
|
60
|
-
payableId: A,
|
|
61
|
-
counterpartId: S,
|
|
62
|
-
payableCounterpartId: I,
|
|
63
|
-
onCounterpartChange: L,
|
|
64
|
-
requiredError: F.errors?.vendor
|
|
65
|
-
});
|
|
69
|
+
]);
|
|
66
70
|
return /* @__PURE__ */ h(o, {
|
|
67
71
|
open: g,
|
|
68
|
-
onOpenChange:
|
|
69
|
-
title: y ? x.readOnlyTitle :
|
|
70
|
-
notice:
|
|
72
|
+
onOpenChange: G,
|
|
73
|
+
title: y ? x.readOnlyTitle : H && U ? x.extractedTitle(U) : x.newTitle,
|
|
74
|
+
notice: H && !E ? /* @__PURE__ */ h(s, { onDismiss: () => D(!0) }) : void 0,
|
|
71
75
|
vendor: {
|
|
72
|
-
...
|
|
76
|
+
...R,
|
|
73
77
|
testId: u.vendorSection
|
|
74
78
|
},
|
|
75
79
|
values: F.values,
|
|
@@ -77,7 +81,7 @@ function g({ open: g, onOpenChange: _, payableId: v, readOnly: y, copy: b }) {
|
|
|
77
81
|
onChange: F.onChange,
|
|
78
82
|
lineItems: {
|
|
79
83
|
items: F.lineItemRows,
|
|
80
|
-
glCodeOptions:
|
|
84
|
+
glCodeOptions: V,
|
|
81
85
|
discount: F.discount,
|
|
82
86
|
onDiscountChange: F.onDiscountChange,
|
|
83
87
|
tax: F.tax,
|
|
@@ -101,12 +105,12 @@ function g({ open: g, onOpenChange: _, payableId: v, readOnly: y, copy: b }) {
|
|
|
101
105
|
}),
|
|
102
106
|
readOnly: y,
|
|
103
107
|
isLineItemsLoading: M.isResolving,
|
|
104
|
-
isSaving:
|
|
105
|
-
isSavingDraft:
|
|
106
|
-
isFinalizing:
|
|
107
|
-
onCancel:
|
|
108
|
-
onSaveDraft:
|
|
109
|
-
onFinalize:
|
|
108
|
+
isSaving: B,
|
|
109
|
+
isSavingDraft: z.isSavingDraft,
|
|
110
|
+
isFinalizing: z.isFinalizing,
|
|
111
|
+
onCancel: W,
|
|
112
|
+
onSaveDraft: z.saveDraft,
|
|
113
|
+
onFinalize: z.finalize,
|
|
110
114
|
testId: u.dialog
|
|
111
115
|
});
|
|
112
116
|
}
|
|
@@ -17,6 +17,8 @@ var e = {
|
|
|
17
17
|
accountHolder: "Account holder",
|
|
18
18
|
routingNumber: "Routing number",
|
|
19
19
|
accountNumber: "Account number",
|
|
20
|
+
paymentMethodLoading: "Loading payment method...",
|
|
21
|
+
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
20
22
|
searchFailed: "We could not load vendors. Try again.",
|
|
21
23
|
vendorDetailsFailed: "We could not load this vendor. Try again."
|
|
22
24
|
}, n = {
|