@tesouro/embedded-components-react 0.7.74 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -17
- package/dist/index.css +18 -17
- package/dist/index.d.ts +178 -49
- package/dist/index.js +51 -50
- package/dist/lib/BankAccountOnboardingWidget.d.ts +178 -49
- package/dist/lib/BankAccountOnboardingWidget.js +8 -7
- package/dist/lib/WidgetSuite.d.ts +177 -48
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +131 -96
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +509 -496
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +47 -78
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +47 -49
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +103 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +49 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +35 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/buildOnboardingPrefill.js +4 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +4 -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/fieldInput/formatPhoneNumberInput.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +22 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +8 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +59 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +17 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +344 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +59 -58
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +40 -33
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +7 -40
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +57 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +30 -93
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +40 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +36 -269
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +93 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +61 -78
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +270 -61
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +25 -338
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +23 -29
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +53 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +342 -66
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -82
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +27 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +56 -54
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +123 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +5 -62
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +82 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +256 -311
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +81 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +83 -53
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +2 -147
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +69 -46
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +5 -35
- 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/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +122 -165
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +12 -27
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js +0 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +81 -23
- package/package.json +1 -1
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { BusinessDetailsPanel as e } from "../../../../ui/dist/
|
|
6
|
-
import { BusinessDisclosuresSection as t } from "../../../../ui/dist/index25.js";
|
|
5
|
+
import { BusinessDetailsPanel as e } from "../../../../ui/dist/index23.js";
|
|
7
6
|
import "../../../../ui/dist/index.js";
|
|
7
|
+
import { buildBusinessDetailsSchema as t } from "./stepSchemas.js";
|
|
8
8
|
import { bankAccountOnboardingTestIds as n } from "./testIds.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
9
|
+
import { buildBusinessDetailsEditFields as r, buildBusinessDetailsPanelLabels as i, buildBusinessDetailsSummaryRows as a, buildTaxIdFieldDisplay as o, mergeBusinessDetailsLabels as s } from "./businessDetailsPanelMapping.js";
|
|
10
|
+
import { fieldErrorsFromIssues as c, fieldsToFlagOnOpen as l, labelOwnedFallback as u, useTouchedFields as d, withFieldFeedback as f } from "./fieldErrors.js";
|
|
11
|
+
import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
12
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
14
13
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js
|
|
15
|
-
var
|
|
14
|
+
var v = [
|
|
16
15
|
"companyLegalName",
|
|
17
16
|
"companyDbaName",
|
|
18
17
|
"businessAddress",
|
|
@@ -24,79 +23,49 @@ var S = [
|
|
|
24
23
|
"website",
|
|
25
24
|
"taxId",
|
|
26
25
|
"naicsCode"
|
|
27
|
-
];
|
|
28
|
-
function
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
g(() => {
|
|
42
|
-
B || q(!0);
|
|
43
|
-
}, [B]);
|
|
44
|
-
let J = _(() => ({
|
|
45
|
-
stateOptions: D,
|
|
46
|
-
naicsOptions: E,
|
|
47
|
-
labels: k
|
|
26
|
+
], y = new Set(v);
|
|
27
|
+
function b({ value: b, onValueChange: x, onSnapshotChange: S, naicsOptions: C, stateOptions: w, isSubmitting: T, showAllErrors: E = !1, labels: D }) {
|
|
28
|
+
let O = m(() => s(D), [D]), k = m(() => t(O), [O]).safeParse(b, u(O.invalidFieldError)), A = k.success ? k.data : null, j = k.success, M = c(v, b, k.error?.issues, O.requiredFieldError), { touched: N, touch: P } = d(() => l(v, b, M)), F = JSON.stringify(A), I = h(S);
|
|
29
|
+
I.current = S, p(() => {
|
|
30
|
+
I.current(A);
|
|
31
|
+
}, [F]);
|
|
32
|
+
let [L, R] = g(() => !j);
|
|
33
|
+
p(() => {
|
|
34
|
+
j || R(!0);
|
|
35
|
+
}, [j]);
|
|
36
|
+
let z = m(() => ({
|
|
37
|
+
stateOptions: w,
|
|
38
|
+
naicsOptions: C,
|
|
39
|
+
labels: D
|
|
48
40
|
}), [
|
|
49
|
-
D,
|
|
50
|
-
E,
|
|
51
|
-
k
|
|
52
|
-
]), Y = _(() => c(k), [k]), X = _(() => l(C, J), [C, J]), Z = _(() => s(C, w, J), [
|
|
53
|
-
C,
|
|
54
41
|
w,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
value: {
|
|
80
|
-
isAuthorized: C.isAuthorized,
|
|
81
|
-
isCheckboxChecked: C.isCheckboxChecked
|
|
82
|
-
},
|
|
83
|
-
onChange: (e) => w({
|
|
84
|
-
...C,
|
|
85
|
-
...e
|
|
86
|
-
}),
|
|
87
|
-
isSubmitting: O,
|
|
88
|
-
labels: k,
|
|
89
|
-
bankName: A,
|
|
90
|
-
termsHref: j,
|
|
91
|
-
privacyHref: M,
|
|
92
|
-
electronicCommunicationHref: N,
|
|
93
|
-
patriotActHref: P,
|
|
94
|
-
testIds: {
|
|
95
|
-
authorizationCheckbox: n.authorizationCheckbox,
|
|
96
|
-
disclosureCheckbox: n.disclosureCheckbox
|
|
42
|
+
C,
|
|
43
|
+
D
|
|
44
|
+
]), B = m(() => i(D), [D]), V = m(() => a(b, z), [b, z]), H = m(() => r(b, x, z), [
|
|
45
|
+
b,
|
|
46
|
+
x,
|
|
47
|
+
z
|
|
48
|
+
]), U = f(H, M, E ? y : N, P), W = m(() => o(b, D), [b, D]);
|
|
49
|
+
return /* @__PURE__ */ _(e, {
|
|
50
|
+
isEditing: L,
|
|
51
|
+
onEditClick: () => R(!0),
|
|
52
|
+
summaryRows: V,
|
|
53
|
+
editFields: U,
|
|
54
|
+
labels: B,
|
|
55
|
+
isDisabled: T,
|
|
56
|
+
taxIdRequired: W.required,
|
|
57
|
+
taxIdPlaceholder: W.placeholder,
|
|
58
|
+
taxIdHelpText: W.helpText,
|
|
59
|
+
testIds: {
|
|
60
|
+
root: n.businessDetailsPanel,
|
|
61
|
+
editButton: n.businessDetailsEditButton,
|
|
62
|
+
summary: { root: n.businessDetailsSummary },
|
|
63
|
+
editForm: {
|
|
64
|
+
root: n.businessDetailsEditForm,
|
|
65
|
+
naicsCombobox: n.businessDetailsNaicsCombobox
|
|
97
66
|
}
|
|
98
|
-
}
|
|
67
|
+
}
|
|
99
68
|
});
|
|
100
69
|
}
|
|
101
70
|
//#endregion
|
|
102
|
-
export {
|
|
71
|
+
export { b as BusinessDetailsStep };
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { AboutYouPanel as e } from "../../../../ui/dist/
|
|
5
|
+
import { AboutYouPanel as e } from "../../../../ui/dist/index27.js";
|
|
6
6
|
import "../../../../ui/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { jsx as v } from "react/jsx-runtime";
|
|
7
|
+
import { buildPersonalDetailsSchema as t } from "./stepSchemas.js";
|
|
8
|
+
import { bankAccountOnboardingTestIds as n } from "./testIds.js";
|
|
9
|
+
import { fieldErrorsFromIssues as r, fieldsToFlagOnOpen as i, labelOwnedFallback as a, useTouchedFields as o, withFieldFeedback as s } from "./fieldErrors.js";
|
|
10
|
+
import { buildAboutYouEditFields as c, buildAboutYouPanelLabels as l, buildAboutYouSummaryRows as u, buildSsnDisplayValues as d, mergePersonalDetailsLabels as f } from "./personalDetailsPanelMapping.js";
|
|
11
|
+
import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
12
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
14
13
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js
|
|
15
|
-
var
|
|
14
|
+
var v = [
|
|
16
15
|
"firstName",
|
|
17
16
|
"lastName",
|
|
18
17
|
"dateOfBirth",
|
|
@@ -25,55 +24,54 @@ var y = [
|
|
|
25
24
|
"workEmail",
|
|
26
25
|
"ownsOver25Percent",
|
|
27
26
|
"ownershipPercentage"
|
|
28
|
-
];
|
|
29
|
-
function b({ value: b, onValueChange: x, onSnapshotChange: S, stateOptions: C, isSubmitting: w,
|
|
30
|
-
let
|
|
31
|
-
...
|
|
32
|
-
dateOfBirth:
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
let [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
let
|
|
27
|
+
], y = new Set(v);
|
|
28
|
+
function b({ value: b, onValueChange: x, onSnapshotChange: S, stateOptions: C, isSubmitting: w, showAllErrors: T = !1, labels: E }) {
|
|
29
|
+
let D = m(() => f(E), [E]), O = m(() => t(D), [D]).safeParse(b, a(D.invalidFieldError)), k = O.success ? O.data : null, A = r(v, b, O.error?.issues, D.requiredFieldError), { touched: j, touch: M } = o(() => i(v, b, A)), N = JSON.stringify({
|
|
30
|
+
...k,
|
|
31
|
+
dateOfBirth: k?.dateOfBirth?.toISOString()
|
|
32
|
+
}), P = h(S);
|
|
33
|
+
P.current = S, p(() => {
|
|
34
|
+
P.current(k);
|
|
35
|
+
}, [N]);
|
|
36
|
+
let [F, I] = g(() => k === null), [L, R] = g(!1);
|
|
37
|
+
p(() => {
|
|
38
|
+
k === null && I(!0);
|
|
39
|
+
}, [N]);
|
|
40
|
+
let z = m(() => ({
|
|
42
41
|
stateOptions: C,
|
|
43
|
-
labels:
|
|
44
|
-
}), [C,
|
|
42
|
+
labels: E
|
|
43
|
+
}), [C, E]), B = m(() => l(E), [E]), V = m(() => u(b, z), [b, z]), H = m(() => c(b, x, z), [
|
|
45
44
|
b,
|
|
46
45
|
x,
|
|
47
|
-
|
|
48
|
-
]),
|
|
46
|
+
z
|
|
47
|
+
]), U = s(H, A, T ? y : j, M), W = m(() => d(b.ssn, b.ssnOnFileLast4, E), [
|
|
49
48
|
b.ssn,
|
|
50
49
|
b.ssnOnFileLast4,
|
|
51
|
-
|
|
52
|
-
])
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
isEditing:
|
|
55
|
-
onEditClick: () =>
|
|
56
|
-
summaryRows:
|
|
57
|
-
editFields:
|
|
58
|
-
labels:
|
|
50
|
+
E
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ _(e, {
|
|
53
|
+
isEditing: F,
|
|
54
|
+
onEditClick: () => I(!0),
|
|
55
|
+
summaryRows: V,
|
|
56
|
+
editFields: U,
|
|
57
|
+
labels: B,
|
|
59
58
|
isDisabled: w,
|
|
60
|
-
ssnRevealed:
|
|
61
|
-
ssnToggleAriaLabel:
|
|
62
|
-
onToggleSsnVisibility: () =>
|
|
59
|
+
ssnRevealed: L,
|
|
60
|
+
ssnToggleAriaLabel: L ? B.ssnHide : B.ssnShow,
|
|
61
|
+
onToggleSsnVisibility: () => R((e) => !e),
|
|
63
62
|
showOwnershipPercentage: b.ownsOver25Percent === !0,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
ssnHelpText: U.helpText,
|
|
63
|
+
ssnMaskedDisplay: W.masked,
|
|
64
|
+
ssnFormattedDisplay: W.formatted,
|
|
65
|
+
ssnRequired: W.required,
|
|
66
|
+
ssnPlaceholder: W.placeholder,
|
|
67
|
+
ssnHelpText: W.helpText,
|
|
70
68
|
testIds: {
|
|
71
|
-
root:
|
|
72
|
-
editButton:
|
|
73
|
-
summary: { root:
|
|
69
|
+
root: n.aboutYouPanel,
|
|
70
|
+
editButton: n.aboutYouEditButton,
|
|
71
|
+
summary: { root: n.aboutYouSummary },
|
|
74
72
|
editForm: {
|
|
75
|
-
root:
|
|
76
|
-
ownsOver25Question:
|
|
73
|
+
root: n.aboutYouEditForm,
|
|
74
|
+
ownsOver25Question: n.aboutYouOwnsOver25Question
|
|
77
75
|
}
|
|
78
76
|
}
|
|
79
77
|
});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
|
|
6
|
+
import { ApplicationReview as t } from "../../../../ui/dist/index30.js";
|
|
7
|
+
import "../../../../ui/dist/index.js";
|
|
8
|
+
import { bankAccountOnboardingTestIds as n } from "./testIds.js";
|
|
9
|
+
import { buildBusinessDetailsPanelLabels as r, buildBusinessDetailsSummaryRows as i } from "./businessDetailsPanelMapping.js";
|
|
10
|
+
import { buildAboutYouPanelLabels as a, buildAboutYouSummaryRows as o } from "./personalDetailsPanelMapping.js";
|
|
11
|
+
import { useMemo as s } from "react";
|
|
12
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
13
|
+
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js
|
|
14
|
+
function l(e) {
|
|
15
|
+
return e.filter((e) => e.value);
|
|
16
|
+
}
|
|
17
|
+
function u({ personalDetails: u, businessDetails: d, additionalOwners: f, primaryOwnerName: p, primaryOwnerPercentage: m, personalStateOptions: h, businessStateOptions: g, naicsOptions: _, onEditPersonal: v, onEditBusiness: y, ownersEditAriaLabel: b, isSubmitting: x, labels: S }) {
|
|
18
|
+
let C = s(() => {
|
|
19
|
+
let t = a(S.personalDetails), n = r(S.businessDetails), s = {
|
|
20
|
+
...e,
|
|
21
|
+
...S.additionalOwners
|
|
22
|
+
}, c = [...m >= 25 ? [{
|
|
23
|
+
label: p,
|
|
24
|
+
value: `${m}${s.percentSuffix}`
|
|
25
|
+
}] : [], ...f.map((e) => ({
|
|
26
|
+
label: `${e.firstName} ${e.lastName}`.trim(),
|
|
27
|
+
value: `${e.ownershipPercentage ?? 0}${s.percentSuffix}`
|
|
28
|
+
}))];
|
|
29
|
+
return [
|
|
30
|
+
{
|
|
31
|
+
id: "personal",
|
|
32
|
+
title: t.panelTitle,
|
|
33
|
+
rows: l(o(u, {
|
|
34
|
+
stateOptions: h,
|
|
35
|
+
labels: S.personalDetails
|
|
36
|
+
})),
|
|
37
|
+
onEdit: v,
|
|
38
|
+
editAriaLabel: t.editButtonAriaLabel
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "business",
|
|
42
|
+
title: n.panelTitle,
|
|
43
|
+
rows: l(i(d, {
|
|
44
|
+
stateOptions: g,
|
|
45
|
+
naicsOptions: _,
|
|
46
|
+
labels: S.businessDetails
|
|
47
|
+
})),
|
|
48
|
+
onEdit: y,
|
|
49
|
+
editAriaLabel: n.editButtonAriaLabel
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "owners",
|
|
53
|
+
title: s.reviewSectionTitle,
|
|
54
|
+
rows: c,
|
|
55
|
+
columnHeaders: {
|
|
56
|
+
label: s.ownerNameColumn,
|
|
57
|
+
value: s.ownerShareColumn
|
|
58
|
+
},
|
|
59
|
+
onEdit: y,
|
|
60
|
+
editAriaLabel: b
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
}, [
|
|
64
|
+
u,
|
|
65
|
+
d,
|
|
66
|
+
f,
|
|
67
|
+
p,
|
|
68
|
+
m,
|
|
69
|
+
h,
|
|
70
|
+
g,
|
|
71
|
+
_,
|
|
72
|
+
v,
|
|
73
|
+
y,
|
|
74
|
+
b,
|
|
75
|
+
S.personalDetails,
|
|
76
|
+
S.businessDetails,
|
|
77
|
+
S.additionalOwners
|
|
78
|
+
]);
|
|
79
|
+
return /* @__PURE__ */ c(t, {
|
|
80
|
+
sections: C,
|
|
81
|
+
isDisabled: x,
|
|
82
|
+
labels: S.applicationReview,
|
|
83
|
+
testIds: {
|
|
84
|
+
root: n.review,
|
|
85
|
+
sections: {
|
|
86
|
+
personal: {
|
|
87
|
+
root: n.reviewPersonalSection,
|
|
88
|
+
editButton: n.reviewPersonalEditButton
|
|
89
|
+
},
|
|
90
|
+
business: {
|
|
91
|
+
root: n.reviewBusinessSection,
|
|
92
|
+
editButton: n.reviewBusinessEditButton
|
|
93
|
+
},
|
|
94
|
+
owners: {
|
|
95
|
+
root: n.reviewOwnersSection,
|
|
96
|
+
editButton: n.reviewOwnersEditButton
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { u as ReviewStep };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { BusinessDisclosuresSection as e } from "../../../../ui/dist/index28.js";
|
|
6
|
+
import "../../../../ui/dist/index.js";
|
|
7
|
+
import { bankAccountOnboardingTestIds as t } from "./testIds.js";
|
|
8
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js
|
|
10
|
+
function r({ value: r, onValueChange: i, isSubmitting: a, showAllErrors: o = !1, labels: s, bankName: c, termsHref: l, privacyHref: u, electronicCommunicationHref: d, patriotActHref: f }) {
|
|
11
|
+
return /* @__PURE__ */ n(e, {
|
|
12
|
+
value: {
|
|
13
|
+
isAuthorized: r.isAuthorized,
|
|
14
|
+
isCheckboxChecked: r.isCheckboxChecked
|
|
15
|
+
},
|
|
16
|
+
onChange: (e) => i({
|
|
17
|
+
...r,
|
|
18
|
+
...e
|
|
19
|
+
}),
|
|
20
|
+
isSubmitting: a,
|
|
21
|
+
showErrors: o,
|
|
22
|
+
labels: s,
|
|
23
|
+
bankName: c,
|
|
24
|
+
termsHref: l,
|
|
25
|
+
privacyHref: u,
|
|
26
|
+
electronicCommunicationHref: d,
|
|
27
|
+
patriotActHref: f,
|
|
28
|
+
testIds: {
|
|
29
|
+
authorizationCheckbox: t.authorizationCheckbox,
|
|
30
|
+
disclosureCheckbox: t.disclosureCheckbox
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as TermsStep };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/
|
|
1
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { maskIdentifierLast4 as t } from "./fieldInput/maskIdentifierLast4.js";
|
|
4
|
+
import { storedIdentifierFieldDisplay as n } from "./fieldInput/storedIdentifier.js";
|
|
5
5
|
import { formatPhoneNumberInput as r } from "./fieldInput/formatPhoneNumberInput.js";
|
|
6
6
|
import { sanitizeZipCodeInput as i } from "./fieldInput/sanitizeZipCodeInput.js";
|
|
7
7
|
import { formatSsnInput as a, maskSsn as o, sanitizeSsnDigits as s } from "./fieldInput/maskedSsnInput.js";
|
|
8
|
+
import { formatDate as c } from "./personalDetailsPanelMapping.js";
|
|
8
9
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js
|
|
9
|
-
var
|
|
10
|
+
var l = {
|
|
10
11
|
firstName: "",
|
|
11
12
|
lastName: "",
|
|
12
13
|
dateOfBirth: void 0,
|
|
@@ -19,7 +20,7 @@ var c = {
|
|
|
19
20
|
ownsOver25Percent: null,
|
|
20
21
|
ownershipPercentage: null
|
|
21
22
|
};
|
|
22
|
-
function
|
|
23
|
+
function u(e) {
|
|
23
24
|
return {
|
|
24
25
|
...e,
|
|
25
26
|
ssn: s(e.ssn),
|
|
@@ -28,68 +29,88 @@ function l(e) {
|
|
|
28
29
|
ownsOver25Percent: e.ownershipPercentage === null ? null : e.ownershipPercentage >= 25
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
32
|
+
function d(t, r) {
|
|
33
|
+
let i = {
|
|
33
34
|
...e,
|
|
34
|
-
...
|
|
35
|
-
},
|
|
35
|
+
...r
|
|
36
|
+
}, s = n(t.ssnOnFileLast4, i.ssnOnFileTemplate);
|
|
36
37
|
return {
|
|
37
|
-
ssnRequired:
|
|
38
|
-
ssnPlaceholder:
|
|
39
|
-
ssnHelpText:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
ssnFormattedDisplay: a(r.ssn)
|
|
38
|
+
ssnRequired: s.required,
|
|
39
|
+
ssnPlaceholder: s.placeholder,
|
|
40
|
+
ssnHelpText: s.helpText,
|
|
41
|
+
ssnMaskedDisplay: o(t.ssn),
|
|
42
|
+
ssnFormattedDisplay: a(t.ssn)
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
let
|
|
45
|
+
function f(e, t, n) {
|
|
46
|
+
let i = (n) => (r) => t(u({
|
|
47
47
|
...e,
|
|
48
48
|
[n]: r
|
|
49
49
|
}));
|
|
50
50
|
return {
|
|
51
51
|
firstName: {
|
|
52
52
|
value: e.firstName,
|
|
53
|
-
onValueChange:
|
|
53
|
+
onValueChange: i("firstName")
|
|
54
54
|
},
|
|
55
55
|
lastName: {
|
|
56
56
|
value: e.lastName,
|
|
57
|
-
onValueChange:
|
|
57
|
+
onValueChange: i("lastName")
|
|
58
58
|
},
|
|
59
59
|
dateOfBirth: {
|
|
60
60
|
value: e.dateOfBirth,
|
|
61
|
-
onValueChange:
|
|
61
|
+
onValueChange: i("dateOfBirth")
|
|
62
62
|
},
|
|
63
63
|
ssn: {
|
|
64
64
|
value: e.ssn,
|
|
65
|
-
onValueChange: (e) =>
|
|
65
|
+
onValueChange: (e) => i("ssn")(e)
|
|
66
66
|
},
|
|
67
67
|
homeAddress: {
|
|
68
68
|
value: e.homeAddress,
|
|
69
|
-
onValueChange:
|
|
69
|
+
onValueChange: i("homeAddress")
|
|
70
70
|
},
|
|
71
71
|
city: {
|
|
72
72
|
value: e.city,
|
|
73
|
-
onValueChange:
|
|
73
|
+
onValueChange: i("city")
|
|
74
74
|
},
|
|
75
75
|
state: {
|
|
76
76
|
value: e.state,
|
|
77
|
-
onValueChange:
|
|
77
|
+
onValueChange: i("state"),
|
|
78
78
|
options: n.stateOptions
|
|
79
79
|
},
|
|
80
80
|
zipCode: {
|
|
81
81
|
value: e.zipCode,
|
|
82
|
-
onValueChange: (e) =>
|
|
82
|
+
onValueChange: (e) => i("zipCode")(e)
|
|
83
83
|
},
|
|
84
84
|
mobilePhoneNumber: {
|
|
85
85
|
value: e.mobilePhoneNumber,
|
|
86
|
-
onValueChange: (e) =>
|
|
86
|
+
onValueChange: (e) => i("mobilePhoneNumber")(r(e))
|
|
87
87
|
},
|
|
88
88
|
ownershipPercentage: {
|
|
89
89
|
value: e.ownershipPercentage,
|
|
90
|
-
onValueChange:
|
|
90
|
+
onValueChange: i("ownershipPercentage")
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
+
function p(e, n) {
|
|
95
|
+
let i = e.ssn ? o(e.ssn) : e.ssnOnFileLast4 ? t(e.ssnOnFileLast4) : "", a = [e.state, e.zipCode].filter(Boolean).join(" "), s = [e.city, a].filter(Boolean).join(", "), l = [e.homeAddress, s].filter(Boolean).join(",\n");
|
|
96
|
+
return [
|
|
97
|
+
{
|
|
98
|
+
label: n.reviewDateOfBirth,
|
|
99
|
+
value: c(e.dateOfBirth)
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: n.reviewSsn,
|
|
103
|
+
value: i
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: n.reviewPhone,
|
|
107
|
+
value: r(e.mobilePhoneNumber)
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: n.reviewHomeAddress,
|
|
111
|
+
value: l
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
}
|
|
94
115
|
//#endregion
|
|
95
|
-
export {
|
|
116
|
+
export { l as EMPTY_ADDITIONAL_OWNER, d as buildAdditionalOwnerEditDisplay, f as buildAdditionalOwnerEditFields, p as buildAdditionalOwnerReviewRows, u as normalizeAdditionalOwnerDraft };
|