@tesouro/embedded-components-react 0.5.215 → 0.5.217

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 (55) hide show
  1. package/dist/index.d.ts +56 -2
  2. package/dist/index.js +13 -12
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
  4. package/dist/lib/BankAccountOnboardingWidget.js +4 -3
  5. package/dist/lib/MarketingWidget.js +1 -1
  6. package/dist/lib/WidgetSuite.d.ts +53 -0
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -1
  45. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
  47. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js +26 -0
  52. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +54 -36
  53. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
@@ -2,22 +2,22 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { bankAccountOnboardingTestIds as e } from "./index12.js";
6
- import { buildBusinessDetailsPanelFieldsSchema as t, buildBusinessDetailsSchema as n, isTaxIdSatisfied as r } from "./index10.js";
7
- import { BusinessDetailsPanel as i } from "../../ui/dist/index19.js";
8
- import { BusinessDisclosuresSection as a } from "../../ui/dist/index24.js";
5
+ import { BusinessDetailsPanel as e } from "../../ui/dist/index21.js";
6
+ import { BusinessDisclosuresSection as t } from "../../ui/dist/index26.js";
9
7
  import "../../ui/dist/index.js";
8
+ import { bankAccountOnboardingTestIds as n } from "./index12.js";
9
+ import { buildBusinessDetailsPanelFieldsSchema as r, buildBusinessDetailsSchema as i, isTaxIdSatisfied as a } from "./index10.js";
10
10
  import { buildBusinessDetailsEditFields as o, buildBusinessDetailsPanelLabels as s, buildBusinessDetailsSummaryRows as c, buildTaxIdFieldDisplay as l, isBusinessWebsiteInvalid as u, mergeBusinessDetailsLabels as d } from "./index11.js";
11
11
  import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
12
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js
14
14
  function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, stateOptions: S, isSubmitting: C, labels: w, bankName: T, termsHref: E, privacyHref: D, electronicCommunicationHref: O, patriotActHref: k }) {
15
15
  let A = p(() => d(w), [w]), j = p(() => ({
16
- panelFields: t(A).refine(r, {
16
+ panelFields: r(A).refine(a, {
17
17
  message: A.taxIdInvalid,
18
18
  path: ["taxId"]
19
19
  }),
20
- full: n(A)
20
+ full: i(A)
21
21
  }), [A]), M = j.full.safeParse(v), N = M.success ? M.data : null, P = j.panelFields.safeParse(v).success, F = JSON.stringify(N), I = m(b);
22
22
  I.current = b, f(() => {
23
23
  I.current(N);
@@ -41,7 +41,7 @@ function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, s
41
41
  ]), U = u(v.website), W = p(() => l(v, w), [v, w]);
42
42
  return /* @__PURE__ */ _("div", {
43
43
  className: "ttw:flex ttw:flex-col ttw:gap-6",
44
- children: [/* @__PURE__ */ g(i, {
44
+ children: [/* @__PURE__ */ g(e, {
45
45
  isEditing: L,
46
46
  onEditClick: () => R(!0),
47
47
  summaryRows: V,
@@ -53,15 +53,15 @@ function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, s
53
53
  taxIdPlaceholder: W.placeholder,
54
54
  taxIdHelpText: W.helpText,
55
55
  testIds: {
56
- root: e.businessDetailsPanel,
57
- editButton: e.businessDetailsEditButton,
58
- summary: { root: e.businessDetailsSummary },
56
+ root: n.businessDetailsPanel,
57
+ editButton: n.businessDetailsEditButton,
58
+ summary: { root: n.businessDetailsSummary },
59
59
  editForm: {
60
- root: e.businessDetailsEditForm,
61
- naicsCombobox: e.businessDetailsNaicsCombobox
60
+ root: n.businessDetailsEditForm,
61
+ naicsCombobox: n.businessDetailsNaicsCombobox
62
62
  }
63
63
  }
64
- }), /* @__PURE__ */ g(a, {
64
+ }), /* @__PURE__ */ g(t, {
65
65
  value: {
66
66
  isAuthorized: v.isAuthorized,
67
67
  isCheckboxChecked: v.isCheckboxChecked
@@ -78,8 +78,8 @@ function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, s
78
78
  electronicCommunicationHref: O,
79
79
  patriotActHref: k,
80
80
  testIds: {
81
- authorizationCheckbox: e.authorizationCheckbox,
82
- disclosureCheckbox: e.disclosureCheckbox
81
+ authorizationCheckbox: n.authorizationCheckbox,
82
+ disclosureCheckbox: n.disclosureCheckbox
83
83
  }
84
84
  })]
85
85
  });
@@ -1,10 +1,10 @@
1
- import { maskIdentifierLast4 as e } from "./index6.js";
2
- import { storedIdentifierFieldDisplay as t } from "./index7.js";
3
- import { formatPhoneNumberInput as n } from "./index2.js";
4
- import { sanitizeZipCodeInput as r } from "./index3.js";
5
- import { PERSONAL_DETAILS_LABELS_EN as i } from "../../ui/dist/index8.js";
6
- import { ABOUT_YOU_PANEL_LABELS_EN as a } from "../../ui/dist/index22.js";
1
+ import { PERSONAL_DETAILS_LABELS_EN as e } from "../../ui/dist/index8.js";
2
+ import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../ui/dist/index24.js";
7
3
  import "../../ui/dist/index.js";
4
+ import { maskIdentifierLast4 as n } from "./index6.js";
5
+ import { storedIdentifierFieldDisplay as r } from "./index7.js";
6
+ import { formatPhoneNumberInput as i } from "./index2.js";
7
+ import { sanitizeZipCodeInput as a } from "./index3.js";
8
8
  import { formatSsnInput as o, maskSsn as s, sanitizeSsnDigits as c } from "./index4.js";
9
9
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js
10
10
  function l(e) {
@@ -14,70 +14,70 @@ function l(e) {
14
14
  year: "numeric"
15
15
  }) : "";
16
16
  }
17
- function u(e) {
17
+ function u(t) {
18
18
  return {
19
- ...i,
20
- ...e
19
+ ...e,
20
+ ...t
21
21
  };
22
22
  }
23
23
  function d(e) {
24
- let t = u(e);
24
+ let n = u(e);
25
25
  return {
26
- ...a,
27
- firstName: t.firstName,
28
- lastName: t.lastName,
29
- dateOfBirth: t.dateOfBirth,
30
- dateOfBirthPlaceholder: t.dateOfBirthPlaceholder,
31
- ssn: t.ssn,
32
- ssnShow: t.ssnShow,
33
- ssnHide: t.ssnHide,
34
- homeAddress: t.homeAddress,
35
- city: t.city,
36
- state: t.state,
37
- statePlaceholder: t.statePlaceholder,
38
- zipCode: t.zipCode,
39
- mobilePhoneNumber: t.mobilePhoneNumber,
40
- workEmail: t.workEmail,
41
- ownsOver25Question: t.ownsOver25Question,
42
- ownsOver25SummaryLabel: t.ownsOver25SummaryLabel,
43
- ownsOver25Yes: t.ownsOver25Yes,
44
- ownsOver25No: t.ownsOver25No,
45
- ownershipPercentage: t.ownershipPercentage,
46
- ownershipPercentagePlaceholder: t.ownershipPercentagePlaceholder
26
+ ...t,
27
+ firstName: n.firstName,
28
+ lastName: n.lastName,
29
+ dateOfBirth: n.dateOfBirth,
30
+ dateOfBirthPlaceholder: n.dateOfBirthPlaceholder,
31
+ ssn: n.ssn,
32
+ ssnShow: n.ssnShow,
33
+ ssnHide: n.ssnHide,
34
+ homeAddress: n.homeAddress,
35
+ city: n.city,
36
+ state: n.state,
37
+ statePlaceholder: n.statePlaceholder,
38
+ zipCode: n.zipCode,
39
+ mobilePhoneNumber: n.mobilePhoneNumber,
40
+ workEmail: n.workEmail,
41
+ ownsOver25Question: n.ownsOver25Question,
42
+ ownsOver25SummaryLabel: n.ownsOver25SummaryLabel,
43
+ ownsOver25Yes: n.ownsOver25Yes,
44
+ ownsOver25No: n.ownsOver25No,
45
+ ownershipPercentage: n.ownershipPercentage,
46
+ ownershipPercentagePlaceholder: n.ownershipPercentagePlaceholder
47
47
  };
48
48
  }
49
- function f(t, n) {
50
- let r = d(n.labels), i = n.stateOptions.find((e) => e.value === t.state)?.label ?? t.state;
49
+ function f(e, t) {
50
+ let r = d(t.labels), i = t.stateOptions.find((t) => t.value === e.state)?.label ?? e.state;
51
51
  return [
52
52
  {
53
53
  label: r.firstName,
54
- value: t.firstName,
54
+ value: e.firstName,
55
55
  testId: "about-you-summary-first-name"
56
56
  },
57
57
  {
58
58
  label: r.lastName,
59
- value: t.lastName,
59
+ value: e.lastName,
60
60
  testId: "about-you-summary-last-name"
61
61
  },
62
62
  {
63
63
  label: r.dateOfBirth,
64
- value: l(t.dateOfBirth),
64
+ value: l(e.dateOfBirth),
65
65
  testId: "about-you-summary-dob"
66
66
  },
67
67
  {
68
68
  label: r.ssn,
69
- value: t.ssn ? s(t.ssn) : t.ssnOnFileLast4 ? e(t.ssnOnFileLast4) : "",
69
+ value: e.ssn ? s(e.ssn) : e.ssnOnFileLast4 ? n(e.ssnOnFileLast4) : "",
70
70
  testId: "about-you-summary-ssn",
71
71
  valueMonospace: !0
72
72
  },
73
73
  {
74
74
  label: r.homeAddress,
75
- value: t.homeAddress,
75
+ value: e.homeAddress,
76
76
  testId: "about-you-summary-home-address"
77
77
  },
78
78
  {
79
79
  label: r.city,
80
- value: t.city,
80
+ value: e.city,
81
81
  testId: "about-you-summary-city"
82
82
  },
83
83
  {
@@ -87,72 +87,72 @@ function f(t, n) {
87
87
  },
88
88
  {
89
89
  label: r.zipCode,
90
- value: t.zipCode,
90
+ value: e.zipCode,
91
91
  testId: "about-you-summary-zip-code"
92
92
  },
93
93
  {
94
94
  label: r.mobilePhoneNumber,
95
- value: t.mobilePhoneNumber,
95
+ value: e.mobilePhoneNumber,
96
96
  testId: "about-you-summary-mobile-phone"
97
97
  },
98
98
  {
99
99
  label: r.workEmail,
100
- value: t.workEmail,
100
+ value: e.workEmail,
101
101
  testId: "about-you-summary-email"
102
102
  },
103
103
  {
104
104
  label: r.ownershipPercentage,
105
- value: t.ownershipPercentage === null ? "" : `${t.ownershipPercentage}%`,
105
+ value: e.ownershipPercentage === null ? "" : `${e.ownershipPercentage}%`,
106
106
  testId: "about-you-summary-ownership-percentage"
107
107
  }
108
108
  ];
109
109
  }
110
- function p(e, t, i) {
111
- let a = (n) => (r) => t({
110
+ function p(e, t, n) {
111
+ let r = (n) => (r) => t({
112
112
  ...e,
113
113
  [n]: r
114
114
  });
115
115
  return {
116
116
  firstName: {
117
117
  value: e.firstName,
118
- onValueChange: a("firstName")
118
+ onValueChange: r("firstName")
119
119
  },
120
120
  lastName: {
121
121
  value: e.lastName,
122
- onValueChange: a("lastName")
122
+ onValueChange: r("lastName")
123
123
  },
124
124
  dateOfBirth: {
125
125
  value: e.dateOfBirth,
126
- onValueChange: a("dateOfBirth")
126
+ onValueChange: r("dateOfBirth")
127
127
  },
128
128
  ssn: {
129
129
  value: e.ssn,
130
- onValueChange: (e) => a("ssn")(c(e))
130
+ onValueChange: (e) => r("ssn")(c(e))
131
131
  },
132
132
  homeAddress: {
133
133
  value: e.homeAddress,
134
- onValueChange: a("homeAddress")
134
+ onValueChange: r("homeAddress")
135
135
  },
136
136
  city: {
137
137
  value: e.city,
138
- onValueChange: a("city")
138
+ onValueChange: r("city")
139
139
  },
140
140
  state: {
141
141
  value: e.state,
142
- onValueChange: a("state"),
143
- options: i.stateOptions
142
+ onValueChange: r("state"),
143
+ options: n.stateOptions
144
144
  },
145
145
  zipCode: {
146
146
  value: e.zipCode,
147
- onValueChange: (e) => a("zipCode")(r(e))
147
+ onValueChange: (e) => r("zipCode")(a(e))
148
148
  },
149
149
  mobilePhoneNumber: {
150
150
  value: e.mobilePhoneNumber,
151
- onValueChange: (e) => a("mobilePhoneNumber")(n(e))
151
+ onValueChange: (e) => r("mobilePhoneNumber")(i(e))
152
152
  },
153
153
  workEmail: {
154
154
  value: e.workEmail,
155
- onValueChange: a("workEmail")
155
+ onValueChange: r("workEmail")
156
156
  },
157
157
  ownsOver25Percent: {
158
158
  value: e.ownsOver25Percent === null ? "" : e.ownsOver25Percent ? "yes" : "no",
@@ -164,16 +164,16 @@ function p(e, t, i) {
164
164
  },
165
165
  ownershipPercentage: {
166
166
  value: e.ownershipPercentage,
167
- onValueChange: a("ownershipPercentage")
167
+ onValueChange: r("ownershipPercentage")
168
168
  }
169
169
  };
170
170
  }
171
- function m(e, n, r) {
172
- let i = u(r);
171
+ function m(e, t, n) {
172
+ let i = u(n);
173
173
  return {
174
174
  masked: s(e),
175
175
  formatted: o(e),
176
- ...t(n, i.ssnOnFileTemplate)
176
+ ...r(t, i.ssnOnFileTemplate)
177
177
  };
178
178
  }
179
179
  //#endregion
@@ -2,17 +2,17 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { bankAccountOnboardingTestIds as e } from "./index12.js";
6
- import { getMaxBirthDate as t } from "./index9.js";
7
- import { buildPersonalDetailsSchema as n } from "./index10.js";
8
- import { AboutYouPanel as r } from "../../ui/dist/index23.js";
5
+ import { AboutYouPanel as e } from "../../ui/dist/index25.js";
9
6
  import "../../ui/dist/index.js";
7
+ import { bankAccountOnboardingTestIds as t } from "./index12.js";
8
+ import { getMaxBirthDate as n } from "./index9.js";
9
+ import { buildPersonalDetailsSchema as r } from "./index10.js";
10
10
  import { buildAboutYouEditFields as i, buildAboutYouPanelLabels as a, buildAboutYouSummaryRows as o, buildSsnDisplayValues as s, mergePersonalDetailsLabels as c } from "./index14.js";
11
11
  import { useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
12
12
  import { jsx as p } from "react/jsx-runtime";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js
14
14
  function m({ value: m, onValueChange: h, onSnapshotChange: g, stateOptions: _, isSubmitting: v, labels: y }) {
15
- let b = u(() => c(y), [y]), x = u(() => n(b), [b]).safeParse(m), S = x.success ? x.data : null, C = JSON.stringify({
15
+ let b = u(() => c(y), [y]), x = u(() => r(b), [b]).safeParse(m), S = x.success ? x.data : null, C = JSON.stringify({
16
16
  ...S,
17
17
  dateOfBirth: S?.dateOfBirth?.toISOString()
18
18
  }), w = d(g);
@@ -34,8 +34,8 @@ function m({ value: m, onValueChange: h, onSnapshotChange: g, stateOptions: _, i
34
34
  m.ssn,
35
35
  m.ssnOnFileLast4,
36
36
  y
37
- ]), P = u(() => t(), []);
38
- return /* @__PURE__ */ p(r, {
37
+ ]), P = u(() => n(), []);
38
+ return /* @__PURE__ */ p(e, {
39
39
  isEditing: T,
40
40
  onEditClick: () => E(!0),
41
41
  summaryRows: j,
@@ -53,12 +53,12 @@ function m({ value: m, onValueChange: h, onSnapshotChange: g, stateOptions: _, i
53
53
  ssnPlaceholder: N.placeholder,
54
54
  ssnHelpText: N.helpText,
55
55
  testIds: {
56
- root: e.aboutYouPanel,
57
- editButton: e.aboutYouEditButton,
58
- summary: { root: e.aboutYouSummary },
56
+ root: t.aboutYouPanel,
57
+ editButton: t.aboutYouEditButton,
58
+ summary: { root: t.aboutYouSummary },
59
59
  editForm: {
60
- root: e.aboutYouEditForm,
61
- ownsOver25Question: e.aboutYouOwnsOver25Question
60
+ root: t.aboutYouEditForm,
61
+ ownsOver25Question: t.aboutYouOwnsOver25Question
62
62
  }
63
63
  }
64
64
  });
@@ -1,9 +1,9 @@
1
- import { storedIdentifierFieldDisplay as e } from "./index7.js";
2
- import { getMaxBirthDate as t, isAtLeastMinOwnerAge as n } from "./index9.js";
3
- import { formatPhoneNumberInput as r } from "./index2.js";
4
- import { sanitizeZipCodeInput as i } from "./index3.js";
5
- import { ADDITIONAL_OWNERS_LABELS_EN as a } from "../../ui/dist/index5.js";
1
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../ui/dist/index5.js";
6
2
  import "../../ui/dist/index.js";
3
+ import { storedIdentifierFieldDisplay as t } from "./index7.js";
4
+ import { getMaxBirthDate as n, isAtLeastMinOwnerAge as r } from "./index9.js";
5
+ import { formatPhoneNumberInput as i } from "./index2.js";
6
+ import { sanitizeZipCodeInput as a } from "./index3.js";
7
7
  import { formatSsnInput as o, maskSsn as s, sanitizeSsnDigits as c } from "./index4.js";
8
8
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js
9
9
  var l = {
@@ -23,25 +23,25 @@ function u(e) {
23
23
  return {
24
24
  ...e,
25
25
  ssn: c(e.ssn),
26
- zipCode: i(e.zipCode),
27
- mobilePhoneNumber: r(e.mobilePhoneNumber),
26
+ zipCode: a(e.zipCode),
27
+ mobilePhoneNumber: i(e.mobilePhoneNumber),
28
28
  ownsOver25Percent: e.ownershipPercentage === null ? null : e.ownershipPercentage >= 25
29
29
  };
30
30
  }
31
- function d(r, i) {
31
+ function d(i, a) {
32
32
  let c = {
33
- ...a,
34
- ...i
35
- }, l = e(r.ssnOnFileLast4, c.ssnOnFileTemplate);
33
+ ...e,
34
+ ...a
35
+ }, l = t(i.ssnOnFileLast4, c.ssnOnFileTemplate);
36
36
  return {
37
37
  ssnRequired: l.required,
38
38
  ssnPlaceholder: l.placeholder,
39
39
  ssnHelpText: l.helpText,
40
- dateOfBirthInvalid: r.dateOfBirth !== void 0 && !n(r.dateOfBirth),
41
- ownershipPercentageInvalid: r.ownershipPercentage !== null && r.ownershipPercentage < 25,
42
- maxBirthDate: t(),
43
- ssnMaskedDisplay: s(r.ssn),
44
- ssnFormattedDisplay: o(r.ssn)
40
+ dateOfBirthInvalid: i.dateOfBirth !== void 0 && !r(i.dateOfBirth),
41
+ ownershipPercentageInvalid: i.ownershipPercentage !== null && i.ownershipPercentage < 25,
42
+ maxBirthDate: n(),
43
+ ssnMaskedDisplay: s(i.ssn),
44
+ ssnFormattedDisplay: o(i.ssn)
45
45
  };
46
46
  }
47
47
  function f(e, t, n) {
@@ -2,11 +2,11 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { bankAccountOnboardingTestIds as e } from "./index12.js";
6
- import { buildAdditionalOwnerSchema as t } from "./index10.js";
7
- import { ADDITIONAL_OWNERS_LABELS_EN as n } from "../../ui/dist/index5.js";
8
- import { AdditionalOwnersForm as r } from "../../ui/dist/index6.js";
5
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../ui/dist/index5.js";
6
+ import { AdditionalOwnersForm as t } from "../../ui/dist/index6.js";
9
7
  import "../../ui/dist/index.js";
8
+ import { bankAccountOnboardingTestIds as n } from "./index12.js";
9
+ import { buildAdditionalOwnerSchema as r } from "./index10.js";
10
10
  import { valuesKey as i } from "./index17.js";
11
11
  import { EMPTY_ADDITIONAL_OWNER as a, buildAdditionalOwnerEditDisplay as o, buildAdditionalOwnerEditFields as s, normalizeAdditionalOwnerDraft as c } from "./index16.js";
12
12
  import { useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
@@ -26,9 +26,9 @@ function g(e) {
26
26
  }
27
27
  function _({ owners: h, onOwnersChange: _, primaryOwnerName: v, primaryOwnerPercentage: y, stateOptions: b, onSnapshotChange: x, onPendingOwnerChange: S, isSubmitting: C, labels: w }) {
28
28
  let T = u(() => ({
29
- ...n,
29
+ ...e,
30
30
  ...w
31
- }), [w]), E = u(() => t(T), [T]), [D, O] = f(null), [k, A] = f(null), [j, M] = f(null), [N, P] = f(null), [F, I] = f(!1), L = (e) => {
31
+ }), [w]), E = u(() => r(T), [T]), [D, O] = f(null), [k, A] = f(null), [j, M] = f(null), [N, P] = f(null), [F, I] = f(!1), L = (e) => {
32
32
  O(c(e));
33
33
  }, R = y + h.reduce((e, t) => e + m(t), 0), z = R > 100 ? T.totalOwnershipExceedsTemplate(R) : null, B = R > 75, V = `${y}%`, H = y >= 25, U = h.every((e) => E.safeParse(e).success), W = D !== null && E.safeParse(D).success, G = U && z === null && D === null && N === null ? h : null, K = JSON.stringify({ snapshot: G?.map((e) => ({
34
34
  ...e,
@@ -84,7 +84,7 @@ function _({ owners: h, onOwnersChange: _, primaryOwnerName: v, primaryOwnerPerc
84
84
  O(null), A(null), I(!1);
85
85
  }
86
86
  } : null;
87
- return /* @__PURE__ */ p(r, {
87
+ return /* @__PURE__ */ p(t, {
88
88
  ownerRows: h.map(g),
89
89
  primaryOwnerName: v,
90
90
  primaryOwnerShareDisplay: V,
@@ -101,11 +101,11 @@ function _({ owners: h, onOwnersChange: _, primaryOwnerName: v, primaryOwnerPerc
101
101
  isSubmitting: C,
102
102
  labels: w,
103
103
  testIds: {
104
- addOwnerButton: e.addOwnerButton,
105
- overlay: { root: e.shellOverlay },
104
+ addOwnerButton: n.addOwnerButton,
105
+ overlay: { root: n.shellOverlay },
106
106
  deleteOverlay: {
107
- root: e.ownerDeleteOverlay,
108
- content: e.ownerDeleteContent
107
+ root: n.ownerDeleteOverlay,
108
+ content: n.ownerDeleteContent
109
109
  }
110
110
  }
111
111
  });
@@ -1,22 +1,22 @@
1
- import { isIdentifierEnteredOrStored as e, usableStoredTaxIdLast4 as t } from "./index7.js";
2
- import { buildAdditionalOwnerSchema as n, buildBusinessDetailsPanelFieldsSchema as r, buildPersonalDetailsSchema as i } from "./index10.js";
3
- import { ADDITIONAL_OWNERS_LABELS_EN as a } from "../../ui/dist/index5.js";
4
- import { BUSINESS_DETAILS_LABELS_EN as o } from "../../ui/dist/index7.js";
5
- import { PERSONAL_DETAILS_LABELS_EN as s } from "../../ui/dist/index8.js";
1
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../ui/dist/index5.js";
2
+ import { BUSINESS_DETAILS_LABELS_EN as t } from "../../ui/dist/index7.js";
3
+ import { PERSONAL_DETAILS_LABELS_EN as n } from "../../ui/dist/index8.js";
6
4
  import "../../ui/dist/index.js";
5
+ import { isIdentifierEnteredOrStored as r, usableStoredTaxIdLast4 as i } from "./index7.js";
6
+ import { buildAdditionalOwnerSchema as a, buildBusinessDetailsPanelFieldsSchema as o, buildPersonalDetailsSchema as s } from "./index10.js";
7
7
  import { EMPTY_ADDITIONAL_OWNER as c } from "./index16.js";
8
8
  import { formatBirthDate as l, stripPhone as u } from "./index19.js";
9
9
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js
10
- var d = r(o).shape, f = i(s).shape, p = n(a).shape, m = (e, t) => e.safeParse(t).success;
10
+ var d = o(t).shape, f = s(n).shape, p = a(e).shape, m = (e, t) => e.safeParse(t).success;
11
11
  function h(e) {
12
12
  return Object.keys(e).length === 0 ? {} : {
13
13
  ...e,
14
14
  countryCode: "USA"
15
15
  };
16
16
  }
17
- var g = (t) => e(t, void 0);
17
+ var g = (e) => r(e, void 0);
18
18
  function _(e) {
19
- return !(e.taxIdOnFileLast4 && !t(e)) || g(e.taxId);
19
+ return !(e.taxIdOnFileLast4 && !i(e)) || g(e.taxId);
20
20
  }
21
21
  function v(e) {
22
22
  return _(e) ? e.companyStructure : e.taxIdOnFileStructure;
@@ -1,7 +1,73 @@
1
+ import { RESULT_LABELS_EN as e } from "../../ui/dist/index15.js";
2
+ import "../../ui/dist/index.js";
1
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js
2
- var e = {
3
- Mounted: "onboarding.mounted",
4
- Suppressed: "onboarding.suppressed"
5
- }, t = "onboarding";
4
+ function t({ applicantName: e, submittedOn: t }) {
5
+ return e && t ? [`Submitted by ${e} on ${t}.`] : e ? [`Submitted by ${e}.`] : t ? [`Submitted on ${t}.`] : [];
6
+ }
7
+ var n = {
8
+ title: "Business bank account application",
9
+ bankDisclosure: "{bankName}, Member FDIC",
10
+ close: "Close",
11
+ formatDate: (e) => new Date(e).toLocaleDateString("en-US", {
12
+ month: "short",
13
+ day: "numeric",
14
+ year: "numeric"
15
+ }),
16
+ draftStartedByOther: {
17
+ chipLabel: "Application in progress",
18
+ heading: ({ startedOn: e }) => e ? `An application is already in progress as of ${e}.` : "An application is already in progress.",
19
+ body: () => ["Only the user who started the application can finish it. If someone else needs to apply instead, the original applicant can cancel theirs so someone else can start one."]
20
+ },
21
+ submittedByYou: {
22
+ chipLabel: "Under review",
23
+ heading: ({ bankName: e }) => `Your application is with ${e}.`,
24
+ body: ({ submittedOn: e }) => [e ? `Submitted ${e}. Reviews usually take 1–3 business days.` : "Reviews usually take 1–3 business days.", "Nothing is needed from you right now. We'll email you if anything else is needed."]
25
+ },
26
+ submittedByOther: {
27
+ chipLabel: "Under review",
28
+ heading: ({ bankName: e }) => `Your business's application is with ${e}.`,
29
+ body: (e) => [...t(e), `${e.applicantName ?? "The applicant"} will be contacted with updates.`]
30
+ },
31
+ deniedByYou: {
32
+ chipLabel: "Not approved",
33
+ body: ({ deniedOn: e }) => [e ? `Application denied on ${e}. Details have been sent to your email.` : "Application denied. Details have been sent to your email."]
34
+ },
35
+ deniedByOther: {
36
+ chipLabel: "Not approved",
37
+ body: ({ bankName: e, applicantName: t }) => [`${e} was unable to approve your business's application.`, `${t ?? "The applicant"} has the details.`]
38
+ }
39
+ }, r = {
40
+ stepIndicator: {
41
+ business: "Business",
42
+ personal: "Personal",
43
+ ownership: "Ownership",
44
+ done: "Done"
45
+ },
46
+ businessDetails: {},
47
+ personalDetails: {},
48
+ additionalOwners: {},
49
+ result: e,
50
+ unsavedApplicationDialog: {},
51
+ deleteApplicationDialog: {},
52
+ back: "Back",
53
+ cancel: "Cancel",
54
+ next: "Next",
55
+ submit: "Submit application",
56
+ saveAndClose: "Save and close",
57
+ deleteApplication: "Cancel and delete application",
58
+ applicationDeletedToast: "Application deleted.",
59
+ applicationSavedToast: "Application saved. You can continue later.",
60
+ businessReviewTitle: "Review your business details",
61
+ businessReviewSubtitle: "Take a moment to make sure your business information is correct.",
62
+ personalReviewTitle: "Review your personal details",
63
+ personalReviewSubtitle: "Take a moment to make sure your personal information is correct.",
64
+ modalTitle: "Bank account onboarding",
65
+ submitFailedError: "Unable to submit application. Please try again.",
66
+ genericRetryError: "Please try again.",
67
+ saveDraftNothingValidError: "Fix the highlighted fields before saving, or discard your changes.",
68
+ fallbackBankName: "Member Bank",
69
+ shellFdicDisclaimer: "Products and services are offered by {bankName}, N.A., Member FDIC.",
70
+ applicationStatus: n
71
+ };
6
72
  //#endregion
7
- export { e as OnboardingAnalyticsEvent, t as WIDGET_NAME };
73
+ export { n as APPLICATION_STATUS_LABELS_EN, r as DEFAULT_LABELS };