@tesouro/embedded-components-react 0.3.16 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -1
- package/dist/index.js +10 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -1
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/BalancesWidget.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +21 -21
- package/dist/lib/BankAccountOnboardingWidget.js +1 -1
- package/dist/lib/CardsWidget.js +1 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.js +1 -1
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +1 -1
- package/dist/lib/ReceiptMatchWidget.js +1 -1
- package/dist/lib/TransfersWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +10 -140
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +152 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js +15 -64
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +109 -169
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +170 -63
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +73 -81
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +77 -101
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +110 -83
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +91 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +26 -320
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +341 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +29 -100
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +80 -77
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +24 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +28 -55
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +54 -209
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +206 -81
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +95 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -255
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +253 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +7 -218
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +219 -79
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +2 -47
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +49 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +12 -14
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +21 -62
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +67 -46
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/testIds.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +151 -135
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js +6 -6
- 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 +21 -20
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +18 -99
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -1,176 +1,116 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { bankAccountOnboardingTestIds as e } from "./index9.js";
|
|
6
|
+
import { isValidWebsiteUrl as t } from "./index6.js";
|
|
7
|
+
import { BusinessDetailsPanel as n } from "../../ui/dist/index18.js";
|
|
8
|
+
import { BusinessDisclosuresSection as r } from "../../ui/dist/index23.js";
|
|
5
9
|
import "../../ui/dist/index.js";
|
|
6
|
-
import {
|
|
10
|
+
import { buildBusinessDetailsEditFields as i, buildBusinessDetailsPanelLabels as a, buildBusinessDetailsSummaryRows as o, isBusinessWebsiteInvalid as s, mergeBusinessDetailsLabels as c } from "./index8.js";
|
|
11
|
+
import { useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
|
+
import { z as h } from "zod";
|
|
7
14
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js
|
|
8
|
-
function
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
state: t.state,
|
|
35
|
-
statePlaceholder: t.statePlaceholder,
|
|
36
|
-
zipCode: t.zipCode,
|
|
37
|
-
mobilePhoneNumber: t.mobilePhoneNumber,
|
|
38
|
-
workEmail: t.workEmail,
|
|
39
|
-
ownsOver25Question: t.ownsOver25Question,
|
|
40
|
-
ownsOver25SummaryLabel: t.ownsOver25SummaryLabel,
|
|
41
|
-
ownsOver25Yes: t.ownsOver25Yes,
|
|
42
|
-
ownsOver25No: t.ownsOver25No,
|
|
43
|
-
ownershipPercentage: t.ownershipPercentage,
|
|
44
|
-
ownershipPercentagePlaceholder: t.ownershipPercentagePlaceholder
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function u(e, t) {
|
|
48
|
-
let n = l(t.labels), r = t.stateOptions.find((t) => t.value === e.state)?.label ?? e.state;
|
|
49
|
-
return [
|
|
50
|
-
{
|
|
51
|
-
label: n.firstName,
|
|
52
|
-
value: e.firstName,
|
|
53
|
-
testId: "about-you-summary-first-name"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: n.lastName,
|
|
57
|
-
value: e.lastName,
|
|
58
|
-
testId: "about-you-summary-last-name"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: n.dateOfBirth,
|
|
62
|
-
value: s(e.dateOfBirth),
|
|
63
|
-
testId: "about-you-summary-dob"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: n.ssn,
|
|
67
|
-
value: a(e.ssn),
|
|
68
|
-
testId: "about-you-summary-ssn",
|
|
69
|
-
valueMonospace: !0
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: n.homeAddress,
|
|
73
|
-
value: e.homeAddress,
|
|
74
|
-
testId: "about-you-summary-home-address"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: n.city,
|
|
78
|
-
value: e.city,
|
|
79
|
-
testId: "about-you-summary-city"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: n.state,
|
|
83
|
-
value: r,
|
|
84
|
-
testId: "about-you-summary-state"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: n.zipCode,
|
|
88
|
-
value: e.zipCode,
|
|
89
|
-
testId: "about-you-summary-zip-code"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: n.mobilePhoneNumber,
|
|
93
|
-
value: e.mobilePhoneNumber,
|
|
94
|
-
testId: "about-you-summary-mobile-phone"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: n.workEmail,
|
|
98
|
-
value: e.workEmail,
|
|
99
|
-
testId: "about-you-summary-email"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: n.ownershipPercentage,
|
|
103
|
-
value: e.ownershipPercentage === null ? "" : `${e.ownershipPercentage}%`,
|
|
104
|
-
testId: "about-you-summary-ownership-percentage"
|
|
105
|
-
}
|
|
106
|
-
];
|
|
15
|
+
function g(e) {
|
|
16
|
+
return h.object({
|
|
17
|
+
companyLegalName: h.string().min(1),
|
|
18
|
+
companyDbaName: h.string(),
|
|
19
|
+
businessAddress: h.string().min(1),
|
|
20
|
+
city: h.string().min(1),
|
|
21
|
+
state: h.string().min(2),
|
|
22
|
+
zipCode: h.string().min(5),
|
|
23
|
+
companyPhoneNumber: h.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: e.companyPhoneNumberInvalid }),
|
|
24
|
+
companyStructure: h.enum([
|
|
25
|
+
"CORPORATION_PUBLIC",
|
|
26
|
+
"CORPORATION_PRIVATE",
|
|
27
|
+
"CORPORATION_NOT_FOR_PROFIT",
|
|
28
|
+
"LLC",
|
|
29
|
+
"LLP",
|
|
30
|
+
"PARTNERSHIP",
|
|
31
|
+
"SOLE_PROPRIETORSHIP",
|
|
32
|
+
"GOVERNMENT",
|
|
33
|
+
"COOPERATIVE",
|
|
34
|
+
"ASSOCIATION",
|
|
35
|
+
"OTHER"
|
|
36
|
+
]),
|
|
37
|
+
website: h.string().refine((e) => !e || t(e), { message: e.websiteInvalid }),
|
|
38
|
+
taxId: h.string().refine((e) => /^\d{9}$/.test(e), { message: e.taxIdInvalid }),
|
|
39
|
+
naicsCode: h.string().min(1)
|
|
40
|
+
});
|
|
107
41
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
42
|
+
function _(e) {
|
|
43
|
+
return g(e).extend({
|
|
44
|
+
isAuthorized: h.literal(!0),
|
|
45
|
+
isCheckboxChecked: h.literal(!0)
|
|
112
46
|
});
|
|
113
|
-
return {
|
|
114
|
-
firstName: {
|
|
115
|
-
value: n.firstName,
|
|
116
|
-
onValueChange: a("firstName")
|
|
117
|
-
},
|
|
118
|
-
lastName: {
|
|
119
|
-
value: n.lastName,
|
|
120
|
-
onValueChange: a("lastName")
|
|
121
|
-
},
|
|
122
|
-
dateOfBirth: {
|
|
123
|
-
value: n.dateOfBirth,
|
|
124
|
-
onValueChange: a("dateOfBirth")
|
|
125
|
-
},
|
|
126
|
-
ssn: {
|
|
127
|
-
value: n.ssn,
|
|
128
|
-
onValueChange: (e) => a("ssn")(o(e))
|
|
129
|
-
},
|
|
130
|
-
homeAddress: {
|
|
131
|
-
value: n.homeAddress,
|
|
132
|
-
onValueChange: a("homeAddress")
|
|
133
|
-
},
|
|
134
|
-
city: {
|
|
135
|
-
value: n.city,
|
|
136
|
-
onValueChange: a("city")
|
|
137
|
-
},
|
|
138
|
-
state: {
|
|
139
|
-
value: n.state,
|
|
140
|
-
onValueChange: a("state"),
|
|
141
|
-
options: i.stateOptions
|
|
142
|
-
},
|
|
143
|
-
zipCode: {
|
|
144
|
-
value: n.zipCode,
|
|
145
|
-
onValueChange: (e) => a("zipCode")(t(e))
|
|
146
|
-
},
|
|
147
|
-
mobilePhoneNumber: {
|
|
148
|
-
value: n.mobilePhoneNumber,
|
|
149
|
-
onValueChange: (t) => a("mobilePhoneNumber")(e(t))
|
|
150
|
-
},
|
|
151
|
-
workEmail: {
|
|
152
|
-
value: n.workEmail,
|
|
153
|
-
onValueChange: a("workEmail")
|
|
154
|
-
},
|
|
155
|
-
ownsOver25Percent: {
|
|
156
|
-
value: n.ownsOver25Percent === null ? "" : n.ownsOver25Percent ? "yes" : "no",
|
|
157
|
-
onValueChange: (e) => r({
|
|
158
|
-
...n,
|
|
159
|
-
ownsOver25Percent: e === "" ? null : e === "yes",
|
|
160
|
-
ownershipPercentage: e === "yes" ? n.ownershipPercentage : null
|
|
161
|
-
})
|
|
162
|
-
},
|
|
163
|
-
ownershipPercentage: {
|
|
164
|
-
value: n.ownershipPercentage,
|
|
165
|
-
onValueChange: a("ownershipPercentage")
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
47
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
};
|
|
48
|
+
function v({ value: t, onValueChange: h, onSnapshotChange: v, naicsOptions: y, stateOptions: b, isSubmitting: x, labels: S, bankName: C, termsHref: w, privacyHref: T, electronicCommunicationHref: E, patriotActHref: D }) {
|
|
49
|
+
let O = u(() => c(S), [S]), k = u(() => ({
|
|
50
|
+
panelFields: g(O),
|
|
51
|
+
full: _(O)
|
|
52
|
+
}), [O]), A = k.full.safeParse(t), j = A.success ? A.data : null, M = k.panelFields.safeParse(t).success, N = JSON.stringify(j), P = d(v);
|
|
53
|
+
P.current = v, l(() => {
|
|
54
|
+
P.current(j);
|
|
55
|
+
}, [N]);
|
|
56
|
+
let [F, I] = f(() => !M);
|
|
57
|
+
l(() => {
|
|
58
|
+
M || I(!0);
|
|
59
|
+
}, [M]);
|
|
60
|
+
let L = u(() => ({
|
|
61
|
+
stateOptions: b,
|
|
62
|
+
naicsOptions: y,
|
|
63
|
+
labels: S
|
|
64
|
+
}), [
|
|
65
|
+
b,
|
|
66
|
+
y,
|
|
67
|
+
S
|
|
68
|
+
]), R = u(() => a(S), [S]), z = u(() => o(t, L), [t, L]), B = u(() => i(t, h, L), [
|
|
69
|
+
t,
|
|
70
|
+
h,
|
|
71
|
+
L
|
|
72
|
+
]), V = s(t.website);
|
|
73
|
+
return /* @__PURE__ */ m("div", {
|
|
74
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
75
|
+
children: [/* @__PURE__ */ p(n, {
|
|
76
|
+
isEditing: F,
|
|
77
|
+
onEditClick: () => I(!0),
|
|
78
|
+
summaryRows: z,
|
|
79
|
+
editFields: B,
|
|
80
|
+
labels: R,
|
|
81
|
+
isDisabled: x,
|
|
82
|
+
websiteInvalid: V,
|
|
83
|
+
testIds: {
|
|
84
|
+
root: e.businessDetailsPanel,
|
|
85
|
+
editButton: e.businessDetailsEditButton,
|
|
86
|
+
summary: { root: e.businessDetailsSummary },
|
|
87
|
+
editForm: {
|
|
88
|
+
root: e.businessDetailsEditForm,
|
|
89
|
+
naicsCombobox: e.businessDetailsNaicsCombobox
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}), /* @__PURE__ */ p(r, {
|
|
93
|
+
value: {
|
|
94
|
+
isAuthorized: t.isAuthorized,
|
|
95
|
+
isCheckboxChecked: t.isCheckboxChecked
|
|
96
|
+
},
|
|
97
|
+
onChange: (e) => h({
|
|
98
|
+
...t,
|
|
99
|
+
...e
|
|
100
|
+
}),
|
|
101
|
+
isSubmitting: x,
|
|
102
|
+
labels: S,
|
|
103
|
+
bankName: C,
|
|
104
|
+
termsHref: w,
|
|
105
|
+
privacyHref: T,
|
|
106
|
+
electronicCommunicationHref: E,
|
|
107
|
+
patriotActHref: D,
|
|
108
|
+
testIds: {
|
|
109
|
+
authorizationCheckbox: e.authorizationCheckbox,
|
|
110
|
+
disclosureCheckbox: e.disclosureCheckbox
|
|
111
|
+
}
|
|
112
|
+
})]
|
|
113
|
+
});
|
|
174
114
|
}
|
|
175
115
|
//#endregion
|
|
176
|
-
export {
|
|
116
|
+
export { v as BusinessDetailsStep };
|
|
@@ -1,69 +1,176 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { AboutYouPanel as e } from "../../ui/dist/index22.js";
|
|
1
|
+
import { formatPhoneNumberInput as e } from "./index2.js";
|
|
2
|
+
import { sanitizeZipCodeInput as t } from "./index3.js";
|
|
3
|
+
import { PERSONAL_DETAILS_LABELS_EN as n } from "../../ui/dist/index7.js";
|
|
4
|
+
import { ABOUT_YOU_PANEL_LABELS_EN as r } from "../../ui/dist/index21.js";
|
|
6
5
|
import "../../ui/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import { buildAboutYouEditFields as r, buildAboutYouPanelLabels as i, buildAboutYouSummaryRows as a, buildSsnDisplayValues as o, mergePersonalDetailsLabels as s } from "./index10.js";
|
|
9
|
-
import { useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
10
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
11
|
-
import { z as p } from "zod";
|
|
6
|
+
import { formatSsnInput as i, maskSsn as a, sanitizeSsnDigits as o } from "./index4.js";
|
|
12
7
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
8
|
+
function s(e) {
|
|
9
|
+
return e ? e.toLocaleDateString("en-US", {
|
|
10
|
+
month: "short",
|
|
11
|
+
day: "numeric",
|
|
12
|
+
year: "numeric"
|
|
13
|
+
}) : "";
|
|
14
|
+
}
|
|
15
|
+
function c(e) {
|
|
16
|
+
return {
|
|
17
|
+
...n,
|
|
18
|
+
...e
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function l(e) {
|
|
22
|
+
let t = c(e);
|
|
23
|
+
return {
|
|
24
|
+
...r,
|
|
25
|
+
firstName: t.firstName,
|
|
26
|
+
lastName: t.lastName,
|
|
27
|
+
dateOfBirth: t.dateOfBirth,
|
|
28
|
+
dateOfBirthPlaceholder: t.dateOfBirthPlaceholder,
|
|
29
|
+
ssn: t.ssn,
|
|
30
|
+
ssnShow: t.ssnShow,
|
|
31
|
+
ssnHide: t.ssnHide,
|
|
32
|
+
homeAddress: t.homeAddress,
|
|
33
|
+
city: t.city,
|
|
34
|
+
state: t.state,
|
|
35
|
+
statePlaceholder: t.statePlaceholder,
|
|
36
|
+
zipCode: t.zipCode,
|
|
37
|
+
mobilePhoneNumber: t.mobilePhoneNumber,
|
|
38
|
+
workEmail: t.workEmail,
|
|
39
|
+
ownsOver25Question: t.ownsOver25Question,
|
|
40
|
+
ownsOver25SummaryLabel: t.ownsOver25SummaryLabel,
|
|
41
|
+
ownsOver25Yes: t.ownsOver25Yes,
|
|
42
|
+
ownsOver25No: t.ownsOver25No,
|
|
43
|
+
ownershipPercentage: t.ownershipPercentage,
|
|
44
|
+
ownershipPercentagePlaceholder: t.ownershipPercentagePlaceholder
|
|
45
|
+
};
|
|
31
46
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
function u(e, t) {
|
|
48
|
+
let n = l(t.labels), r = t.stateOptions.find((t) => t.value === e.state)?.label ?? e.state;
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
label: n.firstName,
|
|
52
|
+
value: e.firstName,
|
|
53
|
+
testId: "about-you-summary-first-name"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: n.lastName,
|
|
57
|
+
value: e.lastName,
|
|
58
|
+
testId: "about-you-summary-last-name"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: n.dateOfBirth,
|
|
62
|
+
value: s(e.dateOfBirth),
|
|
63
|
+
testId: "about-you-summary-dob"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: n.ssn,
|
|
67
|
+
value: a(e.ssn),
|
|
68
|
+
testId: "about-you-summary-ssn",
|
|
69
|
+
valueMonospace: !0
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: n.homeAddress,
|
|
73
|
+
value: e.homeAddress,
|
|
74
|
+
testId: "about-you-summary-home-address"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: n.city,
|
|
78
|
+
value: e.city,
|
|
79
|
+
testId: "about-you-summary-city"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: n.state,
|
|
83
|
+
value: r,
|
|
84
|
+
testId: "about-you-summary-state"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: n.zipCode,
|
|
88
|
+
value: e.zipCode,
|
|
89
|
+
testId: "about-you-summary-zip-code"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: n.mobilePhoneNumber,
|
|
93
|
+
value: e.mobilePhoneNumber,
|
|
94
|
+
testId: "about-you-summary-mobile-phone"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: n.workEmail,
|
|
98
|
+
value: e.workEmail,
|
|
99
|
+
testId: "about-you-summary-email"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: n.ownershipPercentage,
|
|
103
|
+
value: e.ownershipPercentage === null ? "" : `${e.ownershipPercentage}%`,
|
|
104
|
+
testId: "about-you-summary-ownership-percentage"
|
|
105
|
+
}
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
function d(n, r, i) {
|
|
109
|
+
let a = (e) => (t) => r({
|
|
110
|
+
...n,
|
|
111
|
+
[e]: t
|
|
66
112
|
});
|
|
113
|
+
return {
|
|
114
|
+
firstName: {
|
|
115
|
+
value: n.firstName,
|
|
116
|
+
onValueChange: a("firstName")
|
|
117
|
+
},
|
|
118
|
+
lastName: {
|
|
119
|
+
value: n.lastName,
|
|
120
|
+
onValueChange: a("lastName")
|
|
121
|
+
},
|
|
122
|
+
dateOfBirth: {
|
|
123
|
+
value: n.dateOfBirth,
|
|
124
|
+
onValueChange: a("dateOfBirth")
|
|
125
|
+
},
|
|
126
|
+
ssn: {
|
|
127
|
+
value: n.ssn,
|
|
128
|
+
onValueChange: (e) => a("ssn")(o(e))
|
|
129
|
+
},
|
|
130
|
+
homeAddress: {
|
|
131
|
+
value: n.homeAddress,
|
|
132
|
+
onValueChange: a("homeAddress")
|
|
133
|
+
},
|
|
134
|
+
city: {
|
|
135
|
+
value: n.city,
|
|
136
|
+
onValueChange: a("city")
|
|
137
|
+
},
|
|
138
|
+
state: {
|
|
139
|
+
value: n.state,
|
|
140
|
+
onValueChange: a("state"),
|
|
141
|
+
options: i.stateOptions
|
|
142
|
+
},
|
|
143
|
+
zipCode: {
|
|
144
|
+
value: n.zipCode,
|
|
145
|
+
onValueChange: (e) => a("zipCode")(t(e))
|
|
146
|
+
},
|
|
147
|
+
mobilePhoneNumber: {
|
|
148
|
+
value: n.mobilePhoneNumber,
|
|
149
|
+
onValueChange: (t) => a("mobilePhoneNumber")(e(t))
|
|
150
|
+
},
|
|
151
|
+
workEmail: {
|
|
152
|
+
value: n.workEmail,
|
|
153
|
+
onValueChange: a("workEmail")
|
|
154
|
+
},
|
|
155
|
+
ownsOver25Percent: {
|
|
156
|
+
value: n.ownsOver25Percent === null ? "" : n.ownsOver25Percent ? "yes" : "no",
|
|
157
|
+
onValueChange: (e) => r({
|
|
158
|
+
...n,
|
|
159
|
+
ownsOver25Percent: e === "" ? null : e === "yes",
|
|
160
|
+
ownershipPercentage: e === "yes" ? n.ownershipPercentage : null
|
|
161
|
+
})
|
|
162
|
+
},
|
|
163
|
+
ownershipPercentage: {
|
|
164
|
+
value: n.ownershipPercentage,
|
|
165
|
+
onValueChange: a("ownershipPercentage")
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function f(e) {
|
|
170
|
+
return {
|
|
171
|
+
masked: a(e),
|
|
172
|
+
formatted: i(e)
|
|
173
|
+
};
|
|
67
174
|
}
|
|
68
175
|
//#endregion
|
|
69
|
-
export {
|
|
176
|
+
export { d as buildAboutYouEditFields, l as buildAboutYouPanelLabels, u as buildAboutYouSummaryRows, f as buildSsnDisplayValues, c as mergePersonalDetailsLabels };
|