@tesouro/embedded-components-react 0.5.270 → 0.5.272
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 +17 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +4 -4
- package/dist/lib/BankAccountOnboardingWidget.d.ts +19 -0
- package/dist/lib/BankAccountOnboardingWidget.js +4 -4
- package/dist/lib/WidgetSuite.d.ts +19 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +94 -73
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +71 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +61 -46
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +22 -24
- 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 +28 -32
- 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/fieldErrors.js +40 -0
- 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 +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +26 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +6 -58
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +57 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +31 -38
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +27 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +34 -91
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +96 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +4 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +269 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +28 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +21 -68
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +59 -225
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +338 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +29 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -74
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +71 -82
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +85 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +8 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +57 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +34 -261
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +9 -62
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +331 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +2 -48
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +53 -139
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +146 -50
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +50 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +35 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/reconcileSubmittedForApprovalQueries.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +14 -9
- package/package.json +1 -1
|
@@ -2,56 +2,71 @@
|
|
|
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/index26.js";
|
|
6
6
|
import "../../../../ui/dist/index.js";
|
|
7
7
|
import { bankAccountOnboardingTestIds as t } from "./testIds.js";
|
|
8
8
|
import { getMaxBirthDate as n } from "./fieldInput/maxBirthDate.js";
|
|
9
9
|
import { buildPersonalDetailsSchema as r } from "./stepSchemas.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { fieldErrorsFromIssues as i, fieldsToFlagOnOpen as a, labelOwnedFallback as o, useTouchedFields as s, withFieldFeedback as c } from "./fieldErrors.js";
|
|
11
|
+
import { buildAboutYouEditFields as l, buildAboutYouPanelLabels as u, buildAboutYouSummaryRows as d, buildSsnDisplayValues as f, mergePersonalDetailsLabels as p } from "./personalDetailsPanelMapping.js";
|
|
12
|
+
import { useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
13
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
15
|
+
var y = [
|
|
16
|
+
"firstName",
|
|
17
|
+
"lastName",
|
|
18
|
+
"dateOfBirth",
|
|
19
|
+
"ssn",
|
|
20
|
+
"homeAddress",
|
|
21
|
+
"city",
|
|
22
|
+
"state",
|
|
23
|
+
"zipCode",
|
|
24
|
+
"mobilePhoneNumber",
|
|
25
|
+
"workEmail",
|
|
26
|
+
"ownsOver25Percent",
|
|
27
|
+
"ownershipPercentage"
|
|
28
|
+
];
|
|
29
|
+
function b({ value: b, onValueChange: x, onSnapshotChange: S, stateOptions: C, isSubmitting: w, labels: T }) {
|
|
30
|
+
let E = h(() => p(T), [T]), D = h(() => r(E), [E]).safeParse(b, o(E.invalidFieldError)), O = D.success ? D.data : null, k = i(y, b, D.error?.issues, E.requiredFieldError), { touched: A, touch: j } = s(() => a(y, b, k)), M = JSON.stringify({
|
|
31
|
+
...O,
|
|
32
|
+
dateOfBirth: O?.dateOfBirth?.toISOString()
|
|
33
|
+
}), N = g(S);
|
|
34
|
+
N.current = S, m(() => {
|
|
35
|
+
N.current(O);
|
|
36
|
+
}, [M]);
|
|
37
|
+
let [P, F] = _(() => O === null), [I, L] = _(!1);
|
|
38
|
+
m(() => {
|
|
39
|
+
O === null && F(!0);
|
|
40
|
+
}, [M]);
|
|
41
|
+
let R = h(() => ({
|
|
42
|
+
stateOptions: C,
|
|
43
|
+
labels: T
|
|
44
|
+
}), [C, T]), z = h(() => u(T), [T]), B = h(() => d(b, R), [b, R]), V = h(() => l(b, x, R), [
|
|
45
|
+
b,
|
|
46
|
+
x,
|
|
47
|
+
R
|
|
48
|
+
]), H = c(V, k, A, j), U = h(() => f(b.ssn, b.ssnOnFileLast4, T), [
|
|
49
|
+
b.ssn,
|
|
50
|
+
b.ssnOnFileLast4,
|
|
51
|
+
T
|
|
52
|
+
]), W = h(() => n(), []);
|
|
53
|
+
return /* @__PURE__ */ v(e, {
|
|
54
|
+
isEditing: P,
|
|
55
|
+
onEditClick: () => F(!0),
|
|
56
|
+
summaryRows: B,
|
|
57
|
+
editFields: H,
|
|
58
|
+
labels: z,
|
|
59
|
+
isDisabled: w,
|
|
60
|
+
ssnRevealed: I,
|
|
61
|
+
ssnToggleAriaLabel: I ? z.ssnHide : z.ssnShow,
|
|
62
|
+
onToggleSsnVisibility: () => L((e) => !e),
|
|
63
|
+
showOwnershipPercentage: b.ownsOver25Percent === !0,
|
|
64
|
+
maxBirthDate: W,
|
|
65
|
+
ssnMaskedDisplay: U.masked,
|
|
66
|
+
ssnFormattedDisplay: U.formatted,
|
|
67
|
+
ssnRequired: U.required,
|
|
68
|
+
ssnPlaceholder: U.placeholder,
|
|
69
|
+
ssnHelpText: U.helpText,
|
|
55
70
|
testIds: {
|
|
56
71
|
root: t.aboutYouPanel,
|
|
57
72
|
editButton: t.aboutYouEditButton,
|
|
@@ -64,4 +79,4 @@ function m({ value: m, onValueChange: h, onSnapshotChange: g, stateOptions: _, i
|
|
|
64
79
|
});
|
|
65
80
|
}
|
|
66
81
|
//#endregion
|
|
67
|
-
export {
|
|
82
|
+
export { b as PersonalDetailsStep };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/
|
|
1
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index6.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
3
|
import { storedIdentifierFieldDisplay as t } from "./fieldInput/storedIdentifier.js";
|
|
4
|
-
import { getMaxBirthDate as n
|
|
5
|
-
import { formatPhoneNumberInput as
|
|
6
|
-
import { sanitizeZipCodeInput as
|
|
7
|
-
import { formatSsnInput as
|
|
4
|
+
import { getMaxBirthDate as n } from "./fieldInput/maxBirthDate.js";
|
|
5
|
+
import { formatPhoneNumberInput as r } from "./fieldInput/formatPhoneNumberInput.js";
|
|
6
|
+
import { sanitizeZipCodeInput as i } from "./fieldInput/sanitizeZipCodeInput.js";
|
|
7
|
+
import { formatSsnInput as a, maskSsn as o, sanitizeSsnDigits as s } from "./fieldInput/maskedSsnInput.js";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js
|
|
9
|
-
var
|
|
9
|
+
var c = {
|
|
10
10
|
firstName: "",
|
|
11
11
|
lastName: "",
|
|
12
12
|
dateOfBirth: void 0,
|
|
@@ -19,33 +19,31 @@ var l = {
|
|
|
19
19
|
ownsOver25Percent: null,
|
|
20
20
|
ownershipPercentage: null
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function l(e) {
|
|
23
23
|
return {
|
|
24
24
|
...e,
|
|
25
|
-
ssn:
|
|
26
|
-
zipCode:
|
|
27
|
-
mobilePhoneNumber:
|
|
25
|
+
ssn: s(e.ssn),
|
|
26
|
+
zipCode: i(e.zipCode),
|
|
27
|
+
mobilePhoneNumber: r(e.mobilePhoneNumber),
|
|
28
28
|
ownsOver25Percent: e.ownershipPercentage === null ? null : e.ownershipPercentage >= 25
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
31
|
+
function u(r, i) {
|
|
32
|
+
let s = {
|
|
33
33
|
...e,
|
|
34
|
-
...
|
|
35
|
-
},
|
|
34
|
+
...i
|
|
35
|
+
}, c = t(r.ssnOnFileLast4, s.ssnOnFileTemplate);
|
|
36
36
|
return {
|
|
37
|
-
ssnRequired:
|
|
38
|
-
ssnPlaceholder:
|
|
39
|
-
ssnHelpText:
|
|
40
|
-
dateOfBirthInvalid: i.dateOfBirth !== void 0 && !r(i.dateOfBirth),
|
|
41
|
-
ownershipPercentageInvalid: i.ownershipPercentage !== null && i.ownershipPercentage < 25,
|
|
37
|
+
ssnRequired: c.required,
|
|
38
|
+
ssnPlaceholder: c.placeholder,
|
|
39
|
+
ssnHelpText: c.helpText,
|
|
42
40
|
maxBirthDate: n(),
|
|
43
|
-
ssnMaskedDisplay:
|
|
44
|
-
ssnFormattedDisplay:
|
|
41
|
+
ssnMaskedDisplay: o(r.ssn),
|
|
42
|
+
ssnFormattedDisplay: a(r.ssn)
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
|
-
function
|
|
48
|
-
let r = (n) => (r) => t(
|
|
45
|
+
function d(e, t, n) {
|
|
46
|
+
let r = (n) => (r) => t(l({
|
|
49
47
|
...e,
|
|
50
48
|
[n]: r
|
|
51
49
|
}));
|
|
@@ -94,4 +92,4 @@ function f(e, t, n) {
|
|
|
94
92
|
};
|
|
95
93
|
}
|
|
96
94
|
//#endregion
|
|
97
|
-
export {
|
|
95
|
+
export { c as EMPTY_ADDITIONAL_OWNER, u as buildAdditionalOwnerEditDisplay, d as buildAdditionalOwnerEditFields, l as normalizeAdditionalOwnerDraft };
|
|
@@ -2,8 +2,8 @@ import { OnboardingSuppressionReason as e } from "../../../../../shared/data-acc
|
|
|
2
2
|
import "../../../../../shared/data-access/dist/index.js";
|
|
3
3
|
import { deniedNoticeExpiresAt as t } from "../../../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
4
4
|
import "../../../../../shared/feature/dist/index.js";
|
|
5
|
-
import { interpolateBankName as n } from "../../../../ui/dist/
|
|
6
|
-
import { ApplicationStatusTone as r } from "../../../../ui/dist/
|
|
5
|
+
import { interpolateBankName as n } from "../../../../ui/dist/index8.js";
|
|
6
|
+
import { ApplicationStatusTone as r } from "../../../../ui/dist/index11.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
import { APPLICATION_STATUS_LABELS_EN as i } from "./labels.js";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { BUSINESS_DETAILS_LABELS_EN as e } from "../../../../ui/dist/
|
|
2
|
-
import { BUSINESS_DETAILS_PANEL_LABELS_EN as t } from "../../../../ui/dist/
|
|
1
|
+
import { BUSINESS_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
|
|
2
|
+
import { BUSINESS_DETAILS_PANEL_LABELS_EN as t } from "../../../../ui/dist/index21.js";
|
|
3
3
|
import "../../../../ui/dist/index.js";
|
|
4
4
|
import { maskIdentifierLast4 as n } from "./fieldInput/maskIdentifierLast4.js";
|
|
5
5
|
import { storedIdentifierFieldDisplay as r, usableStoredTaxIdLast4 as i } from "./fieldInput/storedIdentifier.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { sanitizeTaxIdInput as c } from "./fieldInput/sanitizeTaxIdInput.js";
|
|
6
|
+
import { formatPhoneNumberInput as a } from "./fieldInput/formatPhoneNumberInput.js";
|
|
7
|
+
import { sanitizeZipCodeInput as o } from "./fieldInput/sanitizeZipCodeInput.js";
|
|
8
|
+
import { sanitizeTaxIdInput as s } from "./fieldInput/sanitizeTaxIdInput.js";
|
|
10
9
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js
|
|
11
|
-
function
|
|
10
|
+
function c(t) {
|
|
12
11
|
return {
|
|
13
12
|
...e,
|
|
14
13
|
...t,
|
|
@@ -26,11 +25,8 @@ function l(t) {
|
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
function d(e) {
|
|
33
|
-
let n = l(e);
|
|
28
|
+
function l(e) {
|
|
29
|
+
let n = c(e);
|
|
34
30
|
return {
|
|
35
31
|
...t,
|
|
36
32
|
companyLegalName: n.companyLegalName,
|
|
@@ -50,8 +46,8 @@ function d(e) {
|
|
|
50
46
|
naicsCodePlaceholder: n.naicsCodePlaceholder
|
|
51
47
|
};
|
|
52
48
|
}
|
|
53
|
-
function
|
|
54
|
-
let r =
|
|
49
|
+
function u(e, t) {
|
|
50
|
+
let r = l(t.labels), a = c(t.labels), o = i(e), s = e.companyStructure && a.companyStructureOptions[e.companyStructure], u = t.stateOptions.find((t) => t.value === e.state)?.label ?? e.state, d = t.naicsOptions.find((t) => t.value === e.naicsCode)?.label ?? e.naicsCode;
|
|
55
51
|
return [
|
|
56
52
|
{
|
|
57
53
|
label: r.companyLegalName,
|
|
@@ -75,7 +71,7 @@ function f(e, t) {
|
|
|
75
71
|
},
|
|
76
72
|
{
|
|
77
73
|
label: r.state,
|
|
78
|
-
value:
|
|
74
|
+
value: u,
|
|
79
75
|
testId: "business-details-summary-state"
|
|
80
76
|
},
|
|
81
77
|
{
|
|
@@ -105,17 +101,17 @@ function f(e, t) {
|
|
|
105
101
|
},
|
|
106
102
|
{
|
|
107
103
|
label: r.naicsCode,
|
|
108
|
-
value:
|
|
104
|
+
value: d,
|
|
109
105
|
testId: "business-details-summary-naics"
|
|
110
106
|
}
|
|
111
107
|
];
|
|
112
108
|
}
|
|
113
|
-
function
|
|
114
|
-
let n =
|
|
109
|
+
function d(e, t) {
|
|
110
|
+
let n = c(t);
|
|
115
111
|
return r(i(e), n.taxIdOnFileTemplate);
|
|
116
112
|
}
|
|
117
|
-
function
|
|
118
|
-
let r =
|
|
113
|
+
function f(e, t, n) {
|
|
114
|
+
let r = c(n.labels), i = [
|
|
119
115
|
"CORPORATION_PUBLIC",
|
|
120
116
|
"CORPORATION_PRIVATE",
|
|
121
117
|
"CORPORATION_NOT_FOR_PROFIT",
|
|
@@ -130,39 +126,39 @@ function m(e, t, n) {
|
|
|
130
126
|
].map((e) => ({
|
|
131
127
|
value: e,
|
|
132
128
|
label: r.companyStructureOptions[e]
|
|
133
|
-
})),
|
|
129
|
+
})), l = (n) => (r) => t({
|
|
134
130
|
...e,
|
|
135
131
|
[n]: r
|
|
136
132
|
});
|
|
137
133
|
return {
|
|
138
134
|
companyLegalName: {
|
|
139
135
|
value: e.companyLegalName,
|
|
140
|
-
onValueChange:
|
|
136
|
+
onValueChange: l("companyLegalName")
|
|
141
137
|
},
|
|
142
138
|
companyDbaName: {
|
|
143
139
|
value: e.companyDbaName,
|
|
144
|
-
onValueChange:
|
|
140
|
+
onValueChange: l("companyDbaName")
|
|
145
141
|
},
|
|
146
142
|
businessAddress: {
|
|
147
143
|
value: e.businessAddress,
|
|
148
|
-
onValueChange:
|
|
144
|
+
onValueChange: l("businessAddress")
|
|
149
145
|
},
|
|
150
146
|
city: {
|
|
151
147
|
value: e.city,
|
|
152
|
-
onValueChange:
|
|
148
|
+
onValueChange: l("city")
|
|
153
149
|
},
|
|
154
150
|
state: {
|
|
155
151
|
value: e.state,
|
|
156
|
-
onValueChange:
|
|
152
|
+
onValueChange: l("state"),
|
|
157
153
|
options: n.stateOptions
|
|
158
154
|
},
|
|
159
155
|
zipCode: {
|
|
160
156
|
value: e.zipCode,
|
|
161
|
-
onValueChange: (e) =>
|
|
157
|
+
onValueChange: (e) => l("zipCode")(o(e))
|
|
162
158
|
},
|
|
163
159
|
companyPhoneNumber: {
|
|
164
160
|
value: e.companyPhoneNumber,
|
|
165
|
-
onValueChange: (e) =>
|
|
161
|
+
onValueChange: (e) => l("companyPhoneNumber")(a(e))
|
|
166
162
|
},
|
|
167
163
|
companyStructure: {
|
|
168
164
|
value: e.companyStructure,
|
|
@@ -174,18 +170,18 @@ function m(e, t, n) {
|
|
|
174
170
|
},
|
|
175
171
|
website: {
|
|
176
172
|
value: e.website,
|
|
177
|
-
onValueChange:
|
|
173
|
+
onValueChange: l("website")
|
|
178
174
|
},
|
|
179
175
|
taxId: {
|
|
180
176
|
value: e.taxId,
|
|
181
|
-
onValueChange: (e) =>
|
|
177
|
+
onValueChange: (e) => l("taxId")(s(e))
|
|
182
178
|
},
|
|
183
179
|
naicsCode: {
|
|
184
180
|
value: e.naicsCode,
|
|
185
|
-
onValueChange:
|
|
181
|
+
onValueChange: l("naicsCode"),
|
|
186
182
|
options: n.naicsOptions
|
|
187
183
|
}
|
|
188
184
|
};
|
|
189
185
|
}
|
|
190
186
|
//#endregion
|
|
191
|
-
export {
|
|
187
|
+
export { f as buildBusinessDetailsEditFields, l as buildBusinessDetailsPanelLabels, u as buildBusinessDetailsSummaryRows, d as buildTaxIdFieldDisplay, c as mergeBusinessDetailsLabels };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/
|
|
2
|
-
import { BUSINESS_DETAILS_LABELS_EN as t } from "../../../../ui/dist/
|
|
3
|
-
import { PERSONAL_DETAILS_LABELS_EN as n } from "../../../../ui/dist/
|
|
1
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index6.js";
|
|
2
|
+
import { BUSINESS_DETAILS_LABELS_EN as t } from "../../../../ui/dist/index8.js";
|
|
3
|
+
import { PERSONAL_DETAILS_LABELS_EN as n } from "../../../../ui/dist/index9.js";
|
|
4
4
|
import "../../../../ui/dist/index.js";
|
|
5
5
|
import { isIdentifierEnteredOrStored as r, usableStoredTaxIdLast4 as i } from "./fieldInput/storedIdentifier.js";
|
|
6
6
|
import { buildAdditionalOwnerSchema as a, buildBusinessDetailsPanelFieldsSchema as o, buildPersonalDetailsSchema as s } from "./stepSchemas.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useCallback as e, useState as t } from "react";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldErrors.js
|
|
3
|
+
function n(e) {
|
|
4
|
+
return { error: () => e };
|
|
5
|
+
}
|
|
6
|
+
function r(e) {
|
|
7
|
+
return e === "" || e == null;
|
|
8
|
+
}
|
|
9
|
+
function i(e, t, n, i) {
|
|
10
|
+
let a = {};
|
|
11
|
+
for (let o of n ?? []) {
|
|
12
|
+
let n = o.path[0];
|
|
13
|
+
typeof n == "string" && e.includes(n) && a[n] === void 0 && (a[n] = r(t[n]) ? i : o.message);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
}
|
|
17
|
+
function a(e, t, n) {
|
|
18
|
+
return e.some((e) => !r(t[e])) ? e.filter((e) => n[e] !== void 0) : [];
|
|
19
|
+
}
|
|
20
|
+
function o(n) {
|
|
21
|
+
let [r, i] = t(() => new Set(n()));
|
|
22
|
+
return {
|
|
23
|
+
touched: r,
|
|
24
|
+
touch: e((e) => {
|
|
25
|
+
i((t) => t.has(e) ? t : new Set(t).add(e));
|
|
26
|
+
}, []),
|
|
27
|
+
reset: e((e) => i(new Set(e)), [])
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function s(e, t, n, r) {
|
|
31
|
+
let i = { ...e };
|
|
32
|
+
for (let a of Object.keys(e)) i[a] = {
|
|
33
|
+
...e[a],
|
|
34
|
+
error: n.has(a) ? t[a] : void 0,
|
|
35
|
+
onBlur: () => r(a)
|
|
36
|
+
};
|
|
37
|
+
return i;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as fieldErrorsFromIssues, a as fieldsToFlagOnOpen, r as isBlankFieldValue, n as labelOwnedFallback, o as useTouchedFields, s as withFieldFeedback };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RESULT_LABELS_EN as e } from "../../../../ui/dist/
|
|
1
|
+
import { RESULT_LABELS_EN as e } from "../../../../ui/dist/index16.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js
|
|
4
4
|
function t({ applicantName: e, submittedOn: t }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PERSONAL_DETAILS_LABELS_EN as e } from "../../../../ui/dist/
|
|
2
|
-
import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../../../ui/dist/
|
|
1
|
+
import { PERSONAL_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index9.js";
|
|
2
|
+
import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../../../ui/dist/index25.js";
|
|
3
3
|
import "../../../../ui/dist/index.js";
|
|
4
4
|
import { maskIdentifierLast4 as n } from "./fieldInput/maskIdentifierLast4.js";
|
|
5
5
|
import { storedIdentifierFieldDisplay as r } from "./fieldInput/storedIdentifier.js";
|
|
@@ -3,24 +3,25 @@ import { isValidWebsiteUrl as n } from "./fieldInput/isValidWebsiteUrl.js";
|
|
|
3
3
|
import { isAtLeastMinOwnerAge as r } from "./fieldInput/maxBirthDate.js";
|
|
4
4
|
import { z as i } from "zod";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js
|
|
6
|
-
|
|
6
|
+
var a = { when: () => !0 };
|
|
7
|
+
function o(e) {
|
|
7
8
|
return i.object({
|
|
8
9
|
companyLegalName: i.string().min(1),
|
|
9
10
|
companyDbaName: i.string(),
|
|
10
11
|
businessAddress: i.string().min(1),
|
|
11
12
|
city: i.string().min(1),
|
|
12
13
|
state: i.string().min(2),
|
|
13
|
-
zipCode: i.string().min(5),
|
|
14
|
+
zipCode: i.string().min(5, { message: e.zipCodeInvalid }),
|
|
14
15
|
companyPhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: e.companyPhoneNumberInvalid }),
|
|
15
|
-
companyStructure:
|
|
16
|
+
companyStructure: c,
|
|
16
17
|
website: i.string().refine((e) => !e || n(e), { message: e.websiteInvalid }),
|
|
17
18
|
taxId: i.string(),
|
|
18
19
|
taxIdOnFileLast4: i.string().optional(),
|
|
19
|
-
taxIdOnFileStructure:
|
|
20
|
+
taxIdOnFileStructure: c.optional(),
|
|
20
21
|
naicsCode: i.string().min(1)
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
var
|
|
24
|
+
var s = (n) => e(n.taxId, t(n)), c = i.enum([
|
|
24
25
|
"CORPORATION_PUBLIC",
|
|
25
26
|
"CORPORATION_PRIVATE",
|
|
26
27
|
"CORPORATION_NOT_FOR_PROFIT",
|
|
@@ -33,16 +34,17 @@ var o = (n) => e(n.taxId, t(n)), s = i.enum([
|
|
|
33
34
|
"ASSOCIATION",
|
|
34
35
|
"OTHER"
|
|
35
36
|
]);
|
|
36
|
-
function
|
|
37
|
-
return
|
|
37
|
+
function l(e) {
|
|
38
|
+
return o(e).extend({
|
|
38
39
|
isAuthorized: i.literal(!0),
|
|
39
40
|
isCheckboxChecked: i.literal(!0)
|
|
40
|
-
}).refine(
|
|
41
|
+
}).refine(s, {
|
|
41
42
|
message: e.taxIdInvalid,
|
|
42
|
-
path: ["taxId"]
|
|
43
|
+
path: ["taxId"],
|
|
44
|
+
...a
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function u(t) {
|
|
46
48
|
return i.object({
|
|
47
49
|
firstName: i.string().min(1),
|
|
48
50
|
lastName: i.string().min(1),
|
|
@@ -52,20 +54,22 @@ function l(t) {
|
|
|
52
54
|
homeAddress: i.string().min(1),
|
|
53
55
|
city: i.string().min(1),
|
|
54
56
|
state: i.string().min(2),
|
|
55
|
-
zipCode: i.string().min(5),
|
|
57
|
+
zipCode: i.string().min(5, { message: t.zipCodeInvalid }),
|
|
56
58
|
mobilePhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: t.mobilePhoneNumberInvalid }),
|
|
57
|
-
workEmail: i.email(),
|
|
59
|
+
workEmail: i.email({ message: t.workEmailInvalid }),
|
|
58
60
|
ownsOver25Percent: i.boolean(),
|
|
59
|
-
ownershipPercentage: i.number().min(0).max(100).nullable()
|
|
61
|
+
ownershipPercentage: i.number().min(0, { message: t.ownershipPercentageRangeError }).max(100, { message: t.ownershipPercentageRangeError }).nullable()
|
|
60
62
|
}).refine((t) => e(t.ssn, t.ssnOnFileLast4), {
|
|
61
63
|
message: t.ssnInvalid,
|
|
62
|
-
path: ["ssn"]
|
|
63
|
-
|
|
64
|
+
path: ["ssn"],
|
|
65
|
+
...a
|
|
66
|
+
}).refine((e) => e.ownsOver25Percent !== !0 || e.ownershipPercentage !== null && e.ownershipPercentage >= 25 && e.ownershipPercentage <= 100, {
|
|
64
67
|
message: t.ownershipPercentageRangeError,
|
|
65
|
-
path: ["ownershipPercentage"]
|
|
68
|
+
path: ["ownershipPercentage"],
|
|
69
|
+
...a
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
function
|
|
72
|
+
function d(t) {
|
|
69
73
|
return i.object({
|
|
70
74
|
id: i.string().optional(),
|
|
71
75
|
firstName: i.string().min(1),
|
|
@@ -76,14 +80,15 @@ function u(t) {
|
|
|
76
80
|
homeAddress: i.string().min(1),
|
|
77
81
|
city: i.string().min(1),
|
|
78
82
|
state: i.string().min(2),
|
|
79
|
-
zipCode: i.string().min(5),
|
|
83
|
+
zipCode: i.string().min(5, { message: t.zipCodeInvalid }),
|
|
80
84
|
mobilePhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: t.mobilePhoneNumberInvalid }),
|
|
81
85
|
ownsOver25Percent: i.literal(!0),
|
|
82
|
-
ownershipPercentage: i.number().min(25).max(100)
|
|
86
|
+
ownershipPercentage: i.number().min(25, { message: t.ownershipPercentageMinError }).max(100, { message: t.ownershipPercentageMaxError })
|
|
83
87
|
}).refine((t) => e(t.ssn, t.ssnOnFileLast4), {
|
|
84
88
|
message: t.ssnInvalid,
|
|
85
|
-
path: ["ssn"]
|
|
89
|
+
path: ["ssn"],
|
|
90
|
+
...a
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
93
|
//#endregion
|
|
89
|
-
export {
|
|
94
|
+
export { a as ALWAYS_CHECK, d as buildAdditionalOwnerSchema, o as buildBusinessDetailsPanelFieldsSchema, l as buildBusinessDetailsSchema, u as buildPersonalDetailsSchema, s as isTaxIdSatisfied };
|
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "./
|
|
2
|
-
import { AdditionalOwnersForm as t } from "./
|
|
3
|
-
import { BUSINESS_DETAILS_LABELS_EN as n, interpolateBankName as r } from "./
|
|
4
|
-
import { PERSONAL_DETAILS_LABELS_EN as i } from "./
|
|
5
|
-
import "./
|
|
6
|
-
import { ApplicationStatusCard as a, ApplicationStatusTone as o } from "./
|
|
7
|
-
import { ResultStep as s } from "./
|
|
8
|
-
import { RESULT_LABELS_EN as c } from "./
|
|
9
|
-
import "./index16.js";
|
|
1
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "./index6.js";
|
|
2
|
+
import { AdditionalOwnersForm as t } from "./index7.js";
|
|
3
|
+
import { BUSINESS_DETAILS_LABELS_EN as n, interpolateBankName as r } from "./index8.js";
|
|
4
|
+
import { PERSONAL_DETAILS_LABELS_EN as i } from "./index9.js";
|
|
5
|
+
import "./index10.js";
|
|
6
|
+
import { ApplicationStatusCard as a, ApplicationStatusTone as o } from "./index11.js";
|
|
7
|
+
import { ResultStep as s } from "./index15.js";
|
|
8
|
+
import { RESULT_LABELS_EN as c } from "./index16.js";
|
|
10
9
|
import "./index17.js";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "./index27.js";
|
|
17
|
-
import
|
|
18
|
-
import "./index29.js";
|
|
19
|
-
import
|
|
10
|
+
import "./index18.js";
|
|
11
|
+
import { BUSINESS_DETAILS_PANEL_LABELS_EN as l } from "./index21.js";
|
|
12
|
+
import { BusinessDetailsPanel as u } from "./index22.js";
|
|
13
|
+
import { ABOUT_YOU_PANEL_LABELS_EN as d } from "./index25.js";
|
|
14
|
+
import { AboutYouPanel as f } from "./index26.js";
|
|
15
|
+
import { BusinessDisclosuresSection as p } from "./index27.js";
|
|
16
|
+
import "./index28.js";
|
|
17
|
+
import { UnsavedApplicationDialog as m } from "./index29.js";
|
|
18
|
+
import "./index30.js";
|
|
19
|
+
import { DeleteApplicationDialog as h } from "./index31.js";
|
|
20
20
|
export { d as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, f as AboutYouPanel, t as AdditionalOwnersForm, a as ApplicationStatusCard, o as ApplicationStatusTone, n as BUSINESS_DETAILS_LABELS_EN, l as BUSINESS_DETAILS_PANEL_LABELS_EN, u as BusinessDetailsPanel, p as BusinessDisclosuresSection, h as DeleteApplicationDialog, i as PERSONAL_DETAILS_LABELS_EN, c as RESULT_LABELS_EN, s as ResultStep, m as UnsavedApplicationDialog, r as interpolateBankName };
|
|
@@ -1,61 +1,9 @@
|
|
|
1
|
-
import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { APPLICATION_STATUS_CARD_LABELS_EN as n } from "./index9.js";
|
|
3
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
1
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[a.Brand]: "ttw:border-transparent ttw:bg-primary/10 ttw:text-primary",
|
|
11
|
-
[a.Warning]: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700",
|
|
12
|
-
[a.Danger]: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive"
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Business bank account application",
|
|
4
|
+
bankDisclosure: "",
|
|
5
|
+
chipLabel: "Application status",
|
|
6
|
+
body: []
|
|
13
7
|
};
|
|
14
|
-
function s({ chipTone: a, labels: s, action: c, className: l, testIds: u }) {
|
|
15
|
-
let { title: d, bankDisclosure: f, chipLabel: p, heading: m, body: h } = {
|
|
16
|
-
...n,
|
|
17
|
-
...s
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ i("section", {
|
|
20
|
-
"data-testid": u?.root,
|
|
21
|
-
"aria-label": d,
|
|
22
|
-
className: t("ttw:flex ttw:w-full ttw:flex-col ttw:items-start ttw:gap-3 ttw:rounded-2xl ttw:border ttw:border-border ttw:bg-card ttw:p-6 ttw:text-card-foreground", l),
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ i("header", {
|
|
25
|
-
className: "ttw:flex ttw:w-full ttw:flex-wrap ttw:items-baseline ttw:justify-between ttw:gap-x-4 ttw:gap-y-1",
|
|
26
|
-
children: [/* @__PURE__ */ r("p", {
|
|
27
|
-
className: "ttw:text-lg ttw:font-semibold",
|
|
28
|
-
children: d
|
|
29
|
-
}), f ? /* @__PURE__ */ r("p", {
|
|
30
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
31
|
-
children: f
|
|
32
|
-
}) : null]
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */ i(e, {
|
|
35
|
-
"data-testid": u?.chip,
|
|
36
|
-
variant: "outline",
|
|
37
|
-
className: t("ttw:gap-2 ttw:rounded-full ttw:px-3 ttw:py-1 ttw:text-sm", o[a]),
|
|
38
|
-
children: [/* @__PURE__ */ r("span", {
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
className: "ttw:size-2 ttw:rounded-full ttw:bg-current"
|
|
41
|
-
}), p]
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ i("div", {
|
|
44
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
45
|
-
children: [m ? /* @__PURE__ */ r("p", {
|
|
46
|
-
className: "ttw:text-xl ttw:font-semibold ttw:text-primary",
|
|
47
|
-
children: m
|
|
48
|
-
}) : null, h.map((e) => /* @__PURE__ */ r("p", {
|
|
49
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
50
|
-
children: e
|
|
51
|
-
}, e))]
|
|
52
|
-
}),
|
|
53
|
-
c ? /* @__PURE__ */ r("div", {
|
|
54
|
-
className: "ttw:pt-2",
|
|
55
|
-
children: c
|
|
56
|
-
}) : null
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
8
|
//#endregion
|
|
61
|
-
export {
|
|
9
|
+
export { e as APPLICATION_STATUS_CARD_LABELS_EN };
|