@tesouro/embedded-components-react 0.7.73 → 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.
Files changed (69) hide show
  1. package/README.md +14 -17
  2. package/dist/index.css +18 -17
  3. package/dist/index.d.ts +178 -49
  4. package/dist/index.js +51 -50
  5. package/dist/lib/BankAccountOnboardingWidget.d.ts +178 -49
  6. package/dist/lib/BankAccountOnboardingWidget.js +8 -7
  7. package/dist/lib/WidgetSuite.d.ts +177 -48
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +5 -4
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +131 -96
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +509 -496
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +47 -78
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +47 -49
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +103 -0
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +35 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +49 -28
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +35 -42
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -3
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/buildOnboardingPrefill.js +4 -10
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +4 -2
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js +6 -2
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +4 -1
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +22 -9
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +8 -5
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +59 -60
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +17 -9
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +19 -18
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +344 -6
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +59 -58
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +40 -33
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +7 -40
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +57 -37
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +30 -93
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +40 -12
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +36 -269
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +93 -25
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +10 -19
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +61 -78
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +270 -61
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +25 -338
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +23 -29
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +53 -26
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +342 -66
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -82
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +27 -6
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +56 -54
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +123 -9
  48. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +5 -62
  49. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +82 -0
  50. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +11 -0
  51. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +64 -0
  52. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +256 -311
  53. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +81 -2
  54. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +83 -53
  55. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +2 -147
  56. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +69 -46
  57. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +5 -35
  58. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/labels.js +1 -2
  59. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +8 -9
  60. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +127 -141
  61. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/validatePolicyDraft.js +1 -1
  62. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +4 -4
  64. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +122 -165
  65. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +12 -27
  66. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +0 -1
  67. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js +0 -1
  68. package/dist/packages/shared-ui-shadcn/dist/index.js +81 -23
  69. 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/index20.js";
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 { ALWAYS_CHECK as r, buildBusinessDetailsPanelFieldsSchema as i, buildBusinessDetailsSchema as a, isTaxIdSatisfied as o } from "./stepSchemas.js";
10
- import { buildBusinessDetailsEditFields as s, buildBusinessDetailsPanelLabels as c, buildBusinessDetailsSummaryRows as l, buildTaxIdFieldDisplay as ee, mergeBusinessDetailsLabels as u } from "./businessDetailsPanelMapping.js";
11
- import { fieldErrorsFromIssues as d, fieldsToFlagOnOpen as f, labelOwnedFallback as p, useTouchedFields as m, withFieldFeedback as h } from "./fieldErrors.js";
12
- import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
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 S = [
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 C({ value: C, onValueChange: w, onSnapshotChange: T, naicsOptions: E, stateOptions: D, isSubmitting: O, labels: k, bankName: A, termsHref: j, privacyHref: M, electronicCommunicationHref: N, patriotActHref: P }) {
29
- let F = _(() => u(k), [k]), I = _(() => ({
30
- panelFields: i(F).refine(o, {
31
- message: F.taxIdInvalid,
32
- path: ["taxId"],
33
- ...r
34
- }),
35
- full: a(F)
36
- }), [F]), L = I.full.safeParse(C), R = L.success ? L.data : null, z = I.panelFields.safeParse(C, p(F.invalidFieldError)), B = z.success, V = d(S, C, z.error?.issues, F.requiredFieldError), { touched: H, touch: U } = m(() => f(S, C, V)), W = JSON.stringify(R), G = v(T);
37
- G.current = T, g(() => {
38
- G.current(R);
39
- }, [W]);
40
- let [K, q] = y(() => !B);
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
- J
56
- ]), Q = h(Z, V, H, U), $ = _(() => ee(C, k), [C, k]);
57
- return /* @__PURE__ */ x("div", {
58
- className: "ttw:flex ttw:flex-col ttw:gap-6",
59
- children: [/* @__PURE__ */ b(e, {
60
- isEditing: K,
61
- onEditClick: () => q(!0),
62
- summaryRows: X,
63
- editFields: Q,
64
- labels: Y,
65
- isDisabled: O,
66
- taxIdRequired: $.required,
67
- taxIdPlaceholder: $.placeholder,
68
- taxIdHelpText: $.helpText,
69
- testIds: {
70
- root: n.businessDetailsPanel,
71
- editButton: n.businessDetailsEditButton,
72
- summary: { root: n.businessDetailsSummary },
73
- editForm: {
74
- root: n.businessDetailsEditForm,
75
- naicsCombobox: n.businessDetailsNaicsCombobox
76
- }
77
- }
78
- }), /* @__PURE__ */ b(t, {
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 { C as BusinessDetailsStep };
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/index24.js";
5
+ import { AboutYouPanel as e } from "../../../../ui/dist/index27.js";
6
6
  import "../../../../ui/dist/index.js";
7
- import { bankAccountOnboardingTestIds as t } from "./testIds.js";
8
- import { getMaxBirthDate as n } from "./fieldInput/maxBirthDate.js";
9
- import { buildPersonalDetailsSchema as r } from "./stepSchemas.js";
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";
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 y = [
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, 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(() => ({
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: T
44
- }), [C, T]), z = h(() => u(T), [T]), B = h(() => d(b, R), [b, R]), V = h(() => l(b, x, R), [
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
- R
48
- ]), H = c(V, k, A, j), U = h(() => f(b.ssn, b.ssnOnFileLast4, T), [
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
- 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,
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: I,
61
- ssnToggleAriaLabel: I ? z.ssnHide : z.ssnShow,
62
- onToggleSsnVisibility: () => L((e) => !e),
59
+ ssnRevealed: L,
60
+ ssnToggleAriaLabel: L ? B.ssnHide : B.ssnShow,
61
+ onToggleSsnVisibility: () => R((e) => !e),
63
62
  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,
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: t.aboutYouPanel,
72
- editButton: t.aboutYouEditButton,
73
- summary: { root: t.aboutYouSummary },
69
+ root: n.aboutYouPanel,
70
+ editButton: n.aboutYouEditButton,
71
+ summary: { root: n.aboutYouSummary },
74
72
  editForm: {
75
- root: t.aboutYouEditForm,
76
- ownsOver25Question: t.aboutYouOwnsOver25Question
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/index6.js";
1
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
2
2
  import "../../../../ui/dist/index.js";
3
- import { storedIdentifierFieldDisplay as t } from "./fieldInput/storedIdentifier.js";
4
- import { getMaxBirthDate as n } from "./fieldInput/maxBirthDate.js";
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 c = {
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 l(e) {
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 u(r, i) {
32
- let s = {
32
+ function d(t, r) {
33
+ let i = {
33
34
  ...e,
34
- ...i
35
- }, c = t(r.ssnOnFileLast4, s.ssnOnFileTemplate);
35
+ ...r
36
+ }, s = n(t.ssnOnFileLast4, i.ssnOnFileTemplate);
36
37
  return {
37
- ssnRequired: c.required,
38
- ssnPlaceholder: c.placeholder,
39
- ssnHelpText: c.helpText,
40
- maxBirthDate: n(),
41
- ssnMaskedDisplay: o(r.ssn),
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 d(e, t, n) {
46
- let r = (n) => (r) => t(l({
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: r("firstName")
53
+ onValueChange: i("firstName")
54
54
  },
55
55
  lastName: {
56
56
  value: e.lastName,
57
- onValueChange: r("lastName")
57
+ onValueChange: i("lastName")
58
58
  },
59
59
  dateOfBirth: {
60
60
  value: e.dateOfBirth,
61
- onValueChange: r("dateOfBirth")
61
+ onValueChange: i("dateOfBirth")
62
62
  },
63
63
  ssn: {
64
64
  value: e.ssn,
65
- onValueChange: (e) => r("ssn")(e)
65
+ onValueChange: (e) => i("ssn")(e)
66
66
  },
67
67
  homeAddress: {
68
68
  value: e.homeAddress,
69
- onValueChange: r("homeAddress")
69
+ onValueChange: i("homeAddress")
70
70
  },
71
71
  city: {
72
72
  value: e.city,
73
- onValueChange: r("city")
73
+ onValueChange: i("city")
74
74
  },
75
75
  state: {
76
76
  value: e.state,
77
- onValueChange: r("state"),
77
+ onValueChange: i("state"),
78
78
  options: n.stateOptions
79
79
  },
80
80
  zipCode: {
81
81
  value: e.zipCode,
82
- onValueChange: (e) => r("zipCode")(e)
82
+ onValueChange: (e) => i("zipCode")(e)
83
83
  },
84
84
  mobilePhoneNumber: {
85
85
  value: e.mobilePhoneNumber,
86
- onValueChange: (e) => r("mobilePhoneNumber")(e)
86
+ onValueChange: (e) => i("mobilePhoneNumber")(r(e))
87
87
  },
88
88
  ownershipPercentage: {
89
89
  value: e.ownershipPercentage,
90
- onValueChange: r("ownershipPercentage")
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 { c as EMPTY_ADDITIONAL_OWNER, u as buildAdditionalOwnerEditDisplay, d as buildAdditionalOwnerEditFields, l as normalizeAdditionalOwnerDraft };
116
+ export { l as EMPTY_ADDITIONAL_OWNER, d as buildAdditionalOwnerEditDisplay, f as buildAdditionalOwnerEditFields, p as buildAdditionalOwnerReviewRows, u as normalizeAdditionalOwnerDraft };