@tesouro/embedded-components-react 0.7.74 → 0.8.1

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 (67) 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/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +4 -4
  60. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +2 -2
  61. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +4 -4
  62. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +122 -165
  63. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +12 -27
  64. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +0 -1
  65. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js +0 -1
  66. package/dist/packages/shared-ui-shadcn/dist/index.js +81 -23
  67. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  import { keepsStoredIdentifier as e, usableStoredTaxIdLast4 as t } from "./fieldInput/storedIdentifier.js";
2
+ import { usPhoneDigits as n } from "./fieldInput/formatPhoneNumberInput.js";
2
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js
3
- var n = (e) => e.replace(/\D/g, "").slice(0, 10), r = (e) => `${e.getFullYear().toString().padStart(4, "0")}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${e.getDate().toString().padStart(2, "0")}`;
4
- function i(e) {
4
+ var r = (e) => n(e).slice(0, 10), i = (e) => `${e.getFullYear().toString().padStart(4, "0")}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${e.getDate().toString().padStart(2, "0")}`;
5
+ function a(e) {
5
6
  return {
6
7
  address1: e.address1,
7
8
  city: e.city,
@@ -10,51 +11,45 @@ function i(e) {
10
11
  countryCode: "USA"
11
12
  };
12
13
  }
13
- function a(r) {
14
+ function o(n) {
14
15
  return {
15
- legalName: r.companyLegalName,
16
- dbaName: r.companyDbaName.trim() || null,
17
- address: i({
18
- address1: r.businessAddress,
19
- city: r.city,
20
- state: r.state,
21
- postalCode: r.zipCode
16
+ legalName: n.companyLegalName,
17
+ dbaName: n.companyDbaName.trim() || null,
18
+ address: a({
19
+ address1: n.businessAddress,
20
+ city: n.city,
21
+ state: n.state,
22
+ postalCode: n.zipCode
22
23
  }),
23
- phoneNumber: n(r.companyPhoneNumber),
24
- businessStructureType: r.companyStructure,
25
- website: r.website.trim() || null,
26
- ...e(r.taxId, t(r)) ? {} : { taxId: {
27
- type: r.companyStructure === "SOLE_PROPRIETORSHIP" ? "SSN" : "EIN",
28
- value: r.taxId
24
+ phoneNumber: r(n.companyPhoneNumber),
25
+ businessStructureType: n.companyStructure,
26
+ website: n.website.trim() || null,
27
+ ...e(n.taxId, t(n)) ? {} : { taxId: {
28
+ type: n.companyStructure === "SOLE_PROPRIETORSHIP" ? "SSN" : "EIN",
29
+ value: n.taxId
29
30
  } },
30
- northAmericanIndustryClassificationSystemCode: r.naicsCode
31
- };
32
- }
33
- function o(e) {
34
- return {
35
- isLegallyAuthorized: e.isAuthorized,
36
- hasAcceptedDisclosures: e.isCheckboxChecked
31
+ northAmericanIndustryClassificationSystemCode: n.naicsCode
37
32
  };
38
33
  }
39
34
  var s = 1;
40
- function c(t, { isSoleProprietor: a = !1 } = {}) {
35
+ function c(t, { isSoleProprietor: n = !1 } = {}) {
41
36
  return {
42
37
  firstName: t.firstName,
43
38
  lastName: t.lastName,
44
- birthDate: r(t.dateOfBirth),
39
+ birthDate: i(t.dateOfBirth),
45
40
  ...e(t.ssn, t.ssnOnFileLast4) ? {} : { personalIdentificationNumber: {
46
41
  type: "SSN",
47
42
  value: t.ssn
48
43
  } },
49
- homeAddress: i({
44
+ homeAddress: a({
50
45
  address1: t.homeAddress,
51
46
  city: t.city,
52
47
  state: t.state,
53
48
  postalCode: t.zipCode
54
49
  }),
55
- mobilePhoneNumber: n(t.mobilePhoneNumber),
50
+ mobilePhoneNumber: r(t.mobilePhoneNumber),
56
51
  workEmailAddress: t.workEmail,
57
- ownershipPercentage: a ? s : t.ownsOver25Percent && t.ownershipPercentage !== null ? t.ownershipPercentage / 100 : 0
52
+ ownershipPercentage: n ? s : t.ownsOver25Percent && t.ownershipPercentage !== null ? t.ownershipPercentage / 100 : 0
58
53
  };
59
54
  }
60
55
  function l(t) {
@@ -62,14 +57,14 @@ function l(t) {
62
57
  ...t.id ? { id: t.id } : {},
63
58
  firstName: t.firstName,
64
59
  lastName: t.lastName,
65
- birthDate: t.dateOfBirth ? r(t.dateOfBirth) : void 0,
66
- homeAddress: i({
60
+ birthDate: t.dateOfBirth ? i(t.dateOfBirth) : void 0,
61
+ homeAddress: a({
67
62
  address1: t.homeAddress,
68
63
  city: t.city,
69
64
  state: t.state,
70
65
  postalCode: t.zipCode
71
66
  }),
72
- mobilePhoneNumber: n(t.mobilePhoneNumber),
67
+ mobilePhoneNumber: r(t.mobilePhoneNumber),
73
68
  ownershipPercentage: t.ownershipPercentage !== null && t.ownershipPercentage >= 25 ? t.ownershipPercentage / 100 : 0,
74
69
  ...e(t.ssn, t.id ? t.ssnOnFileLast4 : void 0) ? {} : { personalIdentificationNumber: {
75
70
  type: "SSN",
@@ -78,24 +73,22 @@ function l(t) {
78
73
  }));
79
74
  }
80
75
  function u(e) {
76
+ let t = e.isSoleProprietor || e.businessDetails?.companyStructure === "SOLE_PROPRIETORSHIP";
81
77
  return {
82
- businessDetails: a(e),
83
- applicant: o(e)
78
+ ...e.businessDetails && { businessDetails: o(e.businessDetails) },
79
+ applicant: c(e.applicant, { isSoleProprietor: t })
84
80
  };
85
81
  }
86
82
  function d(e) {
87
- let t = e.businessDetails?.companyStructure === "SOLE_PROPRIETORSHIP", n = e.carryConsent && e.businessDetails && {
88
- isLegallyAuthorized: e.businessDetails.isAuthorized,
89
- hasAcceptedDisclosures: e.businessDetails.isCheckboxChecked
90
- };
83
+ let t = e.businessDetails?.companyStructure === "SOLE_PROPRIETORSHIP", n = t || !!e.isSoleProprietor, { consent: r } = e;
91
84
  return {
92
- ...e.businessDetails && { businessDetails: a(e.businessDetails) },
93
- ...(e.applicant || n) && { applicant: {
94
- ...e.applicant ? c(e.applicant, { isSoleProprietor: t }) : {},
95
- ...n
85
+ ...e.businessDetails && { businessDetails: o(e.businessDetails) },
86
+ ...(e.applicant || r) && { applicant: {
87
+ ...e.applicant ? c(e.applicant, { isSoleProprietor: n }) : {},
88
+ ...r
96
89
  } },
97
90
  ...(t || e.businessOwners !== void 0) && { businessOwners: !t && e.businessOwners?.length ? l(e.businessOwners) : null }
98
91
  };
99
92
  }
100
93
  //#endregion
101
- export { o as buildApplicantForCreate, c as buildApplicantForUpdate, a as buildBusinessDetails, l as buildBusinessOwners, u as buildCreateApplicationBody, d as buildUpdateApplicationBody, r as formatBirthDate, n as stripPhone };
94
+ export { c as buildApplicantForUpdate, o as buildBusinessDetails, l as buildBusinessOwners, u as buildCreateApplicationBody, d as buildUpdateApplicationBody, i as formatBirthDate, r as stripPhone };
@@ -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/index8.js";
6
- import { ApplicationStatusTone as r } from "../../../../ui/dist/index11.js";
5
+ import { interpolateBankName as n } from "../../../../ui/dist/index11.js";
6
+ import { ApplicationStatusTone as r } from "../../../../ui/dist/index14.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
@@ -65,7 +65,6 @@ function f(e) {
65
65
  return {
66
66
  title: e?.title ?? t.title,
67
67
  bankDisclosure: e?.bankDisclosure ?? t.bankDisclosure,
68
- close: e?.close ?? t.close,
69
68
  checkAgain: e?.checkAgain ?? t.checkAgain,
70
69
  formatDate: e?.formatDate ?? t.formatDate,
71
70
  draftStartedByOther: n("draftStartedByOther"),
@@ -39,7 +39,7 @@ function d(e, t) {
39
39
  website: e.website ?? "",
40
40
  naicsCode: e.northAmericanIndustryClassificationSystemCode ?? void 0,
41
41
  isAuthorized: t?.isLegallyAuthorized ?? void 0,
42
- taxId: "",
42
+ taxId: e.taxIdLast4 ? "" : void 0,
43
43
  taxIdOnFileLast4: e.taxIdLast4 ?? void 0,
44
44
  taxIdOnFileStructure: e.businessStructureType ?? void 0,
45
45
  isCheckboxChecked: !1
@@ -59,7 +59,7 @@ function f(t) {
59
59
  workEmail: t.workEmailAddress ?? void 0,
60
60
  ownsOver25Percent: l(t.ownershipPercentage) ?? void 0,
61
61
  ownershipPercentage: c(t.ownershipPercentage) ?? void 0,
62
- ssn: "",
62
+ ssn: t.personalIdentificationNumberLast4 ? "" : void 0,
63
63
  ssnOnFileLast4: t.personalIdentificationNumberLast4 ?? void 0
64
64
  });
65
65
  }
@@ -76,20 +76,14 @@ function p(t) {
76
76
  city: n.city ?? "",
77
77
  state: n.state ?? "",
78
78
  zipCode: n.zipCode ?? "",
79
- mobilePhoneNumber: t.mobilePhoneNumber ?? "",
79
+ mobilePhoneNumber: a(t.mobilePhoneNumber) ?? "",
80
80
  ownsOver25Percent: null,
81
81
  ownershipPercentage: c(t.ownershipPercentage)
82
82
  });
83
83
  }
84
84
  function m(e) {
85
85
  if (!e) return;
86
- let { applicant: t, businessDetails: n, businessOwners: r } = e, i = {
87
- businessDetails: {
88
- taxId: "",
89
- isCheckboxChecked: !1
90
- },
91
- personalDetails: { ssn: "" }
92
- };
86
+ let { applicant: t, businessDetails: n, businessOwners: r } = e, i = { businessDetails: { isCheckboxChecked: !1 } };
93
87
  return n && (i.businessDetails = d(n, t)), t && (i.personalDetails = f(t)), r !== void 0 && (i.additionalOwners = r?.map(p) ?? []), i;
94
88
  }
95
89
  //#endregion
@@ -1,5 +1,5 @@
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/index19.js";
1
+ import { BUSINESS_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index11.js";
2
+ import { BUSINESS_DETAILS_PANEL_LABELS_EN as t } from "../../../../ui/dist/index22.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";
@@ -29,6 +29,8 @@ function l(e) {
29
29
  let n = c(e);
30
30
  return {
31
31
  ...t,
32
+ requiredFieldsNote: n.requiredFieldsNote,
33
+ requiredFieldMarker: n.requiredFieldMarker,
32
34
  companyLegalName: n.companyLegalName,
33
35
  companyDbaName: n.companyDbaName,
34
36
  businessAddress: n.businessAddress,
@@ -1,6 +1,6 @@
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";
1
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
2
+ import { BUSINESS_DETAILS_LABELS_EN as t } from "../../../../ui/dist/index11.js";
3
+ import { PERSONAL_DETAILS_LABELS_EN as n } from "../../../../ui/dist/index12.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";
@@ -1,7 +1,11 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js
2
2
  function e(e) {
3
- let t = e.replace(/\D/g, ""), n = (t.length === 11 && t.startsWith("1") ? t.slice(1) : t).slice(0, 10), r = n.slice(0, 3), i = n.slice(3, 6), a = n.slice(6, 10);
3
+ let t = e.replace(/\D/g, "");
4
+ return t.length === 11 && t.startsWith("1") ? t.slice(1) : t;
5
+ }
6
+ function t(t) {
7
+ let n = e(t).slice(0, 10), r = n.slice(0, 3), i = n.slice(3, 6), a = n.slice(6, 10);
4
8
  return n.length > 6 ? `${r}-${i}-${a}` : n.length > 3 ? `${r}-${i}` : r;
5
9
  }
6
10
  //#endregion
7
- export { e as formatPhoneNumberInput };
11
+ export { t as formatPhoneNumberInput, e as usPhoneDigits };
@@ -6,5 +6,8 @@ function e(e = /* @__PURE__ */ new Date()) {
6
6
  function t(t, n = /* @__PURE__ */ new Date()) {
7
7
  return t.getTime() <= e(n).getTime();
8
8
  }
9
+ function n(e, t = /* @__PURE__ */ new Date()) {
10
+ return e.getFullYear() >= 1900 && e.getTime() <= t.getTime();
11
+ }
9
12
  //#endregion
10
- export { e as getMaxBirthDate, t as isAtLeastMinOwnerAge };
13
+ export { e as getMaxBirthDate, t as isAtLeastMinOwnerAge, n as isPlausibleBirthDate };
@@ -1,4 +1,4 @@
1
- import { RESULT_LABELS_EN as e } from "../../../../ui/dist/index16.js";
1
+ import { RESULT_LABELS_EN as e } from "../../../../ui/dist/index19.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 }) {
@@ -7,7 +7,6 @@ function t({ applicantName: e, submittedOn: t }) {
7
7
  var n = {
8
8
  title: "Business bank account application",
9
9
  bankDisclosure: "{bankName}, Member FDIC",
10
- close: "Close",
11
10
  checkAgain: "Check again",
12
11
  formatDate: (e) => new Date(e).toLocaleDateString("en-US", {
13
12
  month: "short",
@@ -44,30 +43,44 @@ var n = {
44
43
  }
45
44
  }, r = {
46
45
  stepIndicator: {
47
- business: "Business",
48
46
  personal: "Personal",
49
- ownership: "Ownership",
47
+ business: "Business",
48
+ review: "Review",
49
+ terms: "Terms",
50
50
  done: "Done"
51
51
  },
52
52
  businessDetails: {},
53
53
  personalDetails: {},
54
54
  additionalOwners: {},
55
+ applicationReview: {},
55
56
  result: e,
56
- unsavedApplicationDialog: {},
57
57
  deleteApplicationDialog: {},
58
58
  back: "Back",
59
- cancel: "Cancel",
60
- next: "Next",
59
+ nextToStep: {
60
+ business: "Next: Business details",
61
+ review: "Next: Review",
62
+ terms: "Next: Terms and conditions"
63
+ },
64
+ backToStepAriaLabel: {
65
+ personal: "Back: Personal details",
66
+ business: "Back: Business details",
67
+ review: "Back: Review"
68
+ },
61
69
  submit: "Submit application",
62
70
  saveAndClose: "Save and continue later",
63
- deleteApplication: "Delete",
71
+ deleteApplication: "Delete application",
64
72
  applicationDeletedToast: "Application deleted.",
65
73
  applicationSavedToast: "Application saved. You can continue later.",
66
74
  businessReviewTitle: "Review your business details",
67
75
  businessReviewSubtitle: "Take a moment to make sure your business information is correct.",
68
76
  personalReviewTitle: "Review your personal details",
69
77
  personalReviewSubtitle: "Take a moment to make sure your personal information is correct.",
70
- modalTitle: "Bank account onboarding",
78
+ reviewTitle: "Review your application",
79
+ reviewSubtitle: "Check everything below before you accept the terms and submit.",
80
+ reviewOwnersEditAriaLabel: "Edit beneficial owners",
81
+ termsTitle: "Accept terms and conditions",
82
+ termsSubtitle: "Read and accept the terms below to submit your application.",
83
+ ownersNeedReviewError: "Review each beneficial owner before continuing.",
71
84
  submitFailedError: "Unable to submit application. Please try again.",
72
85
  genericRetryError: "Please try again.",
73
86
  deleteFailedError: "Unable to delete application. Please try again.",
@@ -1,5 +1,5 @@
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/index23.js";
1
+ import { PERSONAL_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index12.js";
2
+ import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../../../ui/dist/index26.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";
@@ -8,11 +8,11 @@ import { sanitizeZipCodeInput as a } from "./fieldInput/sanitizeZipCodeInput.js"
8
8
  import { formatSsnInput as o, maskSsn as s, sanitizeSsnDigits as c } from "./fieldInput/maskedSsnInput.js";
9
9
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js
10
10
  function l(e) {
11
- return e ? e.toLocaleDateString("en-US", {
11
+ return !e || Number.isNaN(e.getTime()) ? "" : e.toLocaleDateString("en-US", {
12
12
  month: "short",
13
13
  day: "numeric",
14
14
  year: "numeric"
15
- }) : "";
15
+ });
16
16
  }
17
17
  function u(t) {
18
18
  return {
@@ -24,10 +24,13 @@ function d(e) {
24
24
  let n = u(e);
25
25
  return {
26
26
  ...t,
27
+ requiredFieldsNote: n.requiredFieldsNote,
28
+ requiredFieldMarker: n.requiredFieldMarker,
27
29
  firstName: n.firstName,
28
30
  lastName: n.lastName,
29
31
  dateOfBirth: n.dateOfBirth,
30
32
  dateOfBirthPlaceholder: n.dateOfBirthPlaceholder,
33
+ dateOfBirthHint: n.dateOfBirthHint,
31
34
  ssn: n.ssn,
32
35
  ssnShow: n.ssnShow,
33
36
  ssnHide: n.ssnHide,
@@ -177,4 +180,4 @@ function m(e, t, n) {
177
180
  };
178
181
  }
179
182
  //#endregion
180
- export { p as buildAboutYouEditFields, d as buildAboutYouPanelLabels, f as buildAboutYouSummaryRows, m as buildSsnDisplayValues, u as mergePersonalDetailsLabels };
183
+ export { p as buildAboutYouEditFields, d as buildAboutYouPanelLabels, f as buildAboutYouSummaryRows, m as buildSsnDisplayValues, l as formatDate, u as mergePersonalDetailsLabels };
@@ -1,27 +1,28 @@
1
1
  import { isIdentifierEnteredOrStored as e, usableStoredTaxIdLast4 as t } from "./fieldInput/storedIdentifier.js";
2
- import { isValidWebsiteUrl as n } from "./fieldInput/isValidWebsiteUrl.js";
3
- import { isAtLeastMinOwnerAge as r } from "./fieldInput/maxBirthDate.js";
4
- import { z as i } from "zod";
2
+ import { usPhoneDigits as n } from "./fieldInput/formatPhoneNumberInput.js";
3
+ import { isValidWebsiteUrl as r } from "./fieldInput/isValidWebsiteUrl.js";
4
+ import { isAtLeastMinOwnerAge as i, isPlausibleBirthDate as a } from "./fieldInput/maxBirthDate.js";
5
+ import { z as o } from "zod";
5
6
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js
6
- var a = { when: () => !0 };
7
- function o(e) {
8
- return i.object({
9
- companyLegalName: i.string().min(1),
10
- companyDbaName: i.string(),
11
- businessAddress: i.string().min(1),
12
- city: i.string().min(1),
13
- state: i.string().min(2),
14
- zipCode: i.string().min(5, { message: e.zipCodeInvalid }),
15
- companyPhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: e.companyPhoneNumberInvalid }),
16
- companyStructure: c,
17
- website: i.string().refine((e) => !e || n(e), { message: e.websiteInvalid }),
18
- taxId: i.string(),
19
- taxIdOnFileLast4: i.string().optional(),
20
- taxIdOnFileStructure: c.optional(),
21
- naicsCode: i.string().min(1)
7
+ var s = { when: () => !0 };
8
+ function c(e) {
9
+ return o.object({
10
+ companyLegalName: o.string().min(1),
11
+ companyDbaName: o.string(),
12
+ businessAddress: o.string().min(1),
13
+ city: o.string().min(1),
14
+ state: o.string().min(2),
15
+ zipCode: o.string().min(5, { message: e.zipCodeInvalid }),
16
+ companyPhoneNumber: o.string().refine((e) => n(e).length === 10, { message: e.companyPhoneNumberInvalid }),
17
+ companyStructure: u,
18
+ website: o.string().refine((e) => !e || r(e), { message: e.websiteInvalid }),
19
+ taxId: o.string(),
20
+ taxIdOnFileLast4: o.string().optional(),
21
+ taxIdOnFileStructure: u.optional(),
22
+ naicsCode: o.string().min(1)
22
23
  });
23
24
  }
24
- var s = (n) => e(n.taxId, t(n)), c = i.enum([
25
+ var l = (n) => e(n.taxId, t(n)), u = o.enum([
25
26
  "CORPORATION_PUBLIC",
26
27
  "CORPORATION_PRIVATE",
27
28
  "CORPORATION_NOT_FOR_PROFIT",
@@ -34,61 +35,59 @@ var s = (n) => e(n.taxId, t(n)), c = i.enum([
34
35
  "ASSOCIATION",
35
36
  "OTHER"
36
37
  ]);
37
- function l(e) {
38
- return o(e).extend({
39
- isAuthorized: i.literal(!0),
40
- isCheckboxChecked: i.literal(!0)
41
- }).refine(s, {
38
+ function d(e) {
39
+ return c(e).refine(l, {
42
40
  message: e.taxIdInvalid,
43
41
  path: ["taxId"],
44
- ...a
42
+ ...s
45
43
  });
46
44
  }
47
- function u(t) {
48
- return i.object({
49
- firstName: i.string().min(1),
50
- lastName: i.string().min(1),
51
- dateOfBirth: i.date().refine(r, { message: t.dateOfBirthMinAgeError }),
52
- ssn: i.string(),
53
- ssnOnFileLast4: i.string().optional(),
54
- homeAddress: i.string().min(1),
55
- city: i.string().min(1),
56
- state: i.string().min(2),
57
- zipCode: i.string().min(5, { message: t.zipCodeInvalid }),
58
- mobilePhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: t.mobilePhoneNumberInvalid }),
59
- workEmail: i.email({ message: t.workEmailInvalid }),
60
- ownsOver25Percent: i.boolean(),
61
- ownershipPercentage: i.number().min(0, { message: t.ownershipPercentageRangeError }).max(100, { message: t.ownershipPercentageRangeError }).nullable()
45
+ var f = (e) => e.isAuthorized === !0 && e.isCheckboxChecked;
46
+ function p(t) {
47
+ return o.object({
48
+ firstName: o.string().min(1),
49
+ lastName: o.string().min(1),
50
+ dateOfBirth: o.date({ error: () => t.dateOfBirthInvalidError }).refine((e) => a(e), { message: t.dateOfBirthInvalidError }).refine((e) => i(e), { message: t.dateOfBirthMinAgeError }),
51
+ ssn: o.string(),
52
+ ssnOnFileLast4: o.string().optional(),
53
+ homeAddress: o.string().min(1),
54
+ city: o.string().min(1),
55
+ state: o.string().min(2),
56
+ zipCode: o.string().min(5, { message: t.zipCodeInvalid }),
57
+ mobilePhoneNumber: o.string().refine((e) => n(e).length === 10, { message: t.mobilePhoneNumberInvalid }),
58
+ workEmail: o.email({ message: t.workEmailInvalid }),
59
+ ownsOver25Percent: o.boolean(),
60
+ ownershipPercentage: o.number().min(0, { message: t.ownershipPercentageRangeError }).max(100, { message: t.ownershipPercentageRangeError }).nullable()
62
61
  }).refine((t) => e(t.ssn, t.ssnOnFileLast4), {
63
62
  message: t.ssnInvalid,
64
63
  path: ["ssn"],
65
- ...a
64
+ ...s
66
65
  }).refine((e) => e.ownsOver25Percent !== !0 || e.ownershipPercentage !== null && e.ownershipPercentage >= 25 && e.ownershipPercentage <= 100, {
67
66
  message: t.ownershipPercentageRangeError,
68
67
  path: ["ownershipPercentage"],
69
- ...a
68
+ ...s
70
69
  });
71
70
  }
72
- function d(t) {
73
- return i.object({
74
- id: i.string().optional(),
75
- firstName: i.string().min(1),
76
- lastName: i.string().min(1),
77
- dateOfBirth: i.date().refine(r, { message: t.dateOfBirthMinAgeError }),
78
- ssn: i.string(),
79
- ssnOnFileLast4: i.string().optional(),
80
- homeAddress: i.string().min(1),
81
- city: i.string().min(1),
82
- state: i.string().min(2),
83
- zipCode: i.string().min(5, { message: t.zipCodeInvalid }),
84
- mobilePhoneNumber: i.string().refine((e) => e.replace(/\D/g, "").length === 10, { message: t.mobilePhoneNumberInvalid }),
85
- ownsOver25Percent: i.literal(!0),
86
- ownershipPercentage: i.number().min(25, { message: t.ownershipPercentageMinError }).max(100, { message: t.ownershipPercentageMaxError })
71
+ function m(t) {
72
+ return o.object({
73
+ id: o.string().optional(),
74
+ firstName: o.string().min(1),
75
+ lastName: o.string().min(1),
76
+ dateOfBirth: o.date({ error: () => t.dateOfBirthInvalidError }).refine((e) => a(e), { message: t.dateOfBirthInvalidError }),
77
+ ssn: o.string(),
78
+ ssnOnFileLast4: o.string().optional(),
79
+ homeAddress: o.string().min(1),
80
+ city: o.string().min(1),
81
+ state: o.string().min(2),
82
+ zipCode: o.string().min(5, { message: t.zipCodeInvalid }),
83
+ mobilePhoneNumber: o.string().refine((e) => n(e).length === 10, { message: t.mobilePhoneNumberInvalid }),
84
+ ownsOver25Percent: o.literal(!0),
85
+ ownershipPercentage: o.number().min(25, { message: t.ownershipPercentageMinError }).max(100, { message: t.ownershipPercentageMaxError })
87
86
  }).refine((t) => e(t.ssn, t.ssnOnFileLast4), {
88
87
  message: t.ssnInvalid,
89
88
  path: ["ssn"],
90
- ...a
89
+ ...s
91
90
  });
92
91
  }
93
92
  //#endregion
94
- export { a as ALWAYS_CHECK, d as buildAdditionalOwnerSchema, o as buildBusinessDetailsPanelFieldsSchema, l as buildBusinessDetailsSchema, u as buildPersonalDetailsSchema, s as isTaxIdSatisfied };
93
+ export { s as ALWAYS_CHECK, m as buildAdditionalOwnerSchema, c as buildBusinessDetailsPanelFieldsSchema, d as buildBusinessDetailsSchema, p as buildPersonalDetailsSchema, f as isConsentGiven, l as isTaxIdSatisfied };
@@ -1,20 +1,13 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js
2
2
  var e = {
3
3
  shell: "onboarding-shell",
4
- shellDismiss: "onboarding-shell-dismiss",
5
4
  shellBack: "onboarding-shell-back",
6
- shellCancel: "onboarding-shell-cancel",
7
5
  shellSaveAndClose: "onboarding-shell-save-and-close",
8
6
  shellDelete: "onboarding-shell-delete",
9
7
  shellNext: "onboarding-shell-next",
10
8
  shellScrollRegion: "onboarding-shell-scroll-region",
11
9
  shellScrollFade: "onboarding-shell-scroll-fade",
12
10
  shellScrollHint: "onboarding-shell-scroll-hint",
13
- shellOverlay: "onboarding-shell-overlay",
14
- unsavedDialog: "unsaved-application-dialog",
15
- unsavedDialogSaveDraft: "unsaved-application-dialog-save-draft",
16
- unsavedDialogDiscard: "unsaved-application-dialog-discard",
17
- unsavedDialogClose: "unsaved-application-dialog-close",
18
11
  deleteDialog: "delete-application-dialog",
19
12
  deleteDialogConfirm: "delete-application-dialog-confirm",
20
13
  deleteDialogCancel: "delete-application-dialog-cancel",
@@ -31,13 +24,28 @@ var e = {
31
24
  aboutYouEditForm: "about-you-edit-form",
32
25
  aboutYouOwnsOver25Question: "about-you-owns-over-25-question",
33
26
  addOwnerButton: "bank-account-onboarding-add-owner-button",
34
- ownerDeleteOverlay: "additional-owner-delete-overlay",
27
+ ownerDeleteConfirmation: "additional-owner-delete-confirmation",
35
28
  ownerDeleteContent: "additional-owner-delete-content",
29
+ ownerStartReviewButton: "additional-owner-start-review-button",
30
+ ownerCompleteDetailsButton: "additional-owner-complete-details-button",
31
+ ownerInlineEditor: "additional-owner-inline-editor",
32
+ ownerInlineEditorSave: "additional-owner-inline-editor-save",
33
+ ownerAddEditor: "additional-owner-add-editor",
34
+ ownerAddEditorSave: "additional-owner-add-editor-save",
35
+ ownerReviewCard: "additional-owner-review-card",
36
+ ownerReviewCardEdit: "additional-owner-review-card-edit",
37
+ ownerReviewCardConfirm: "additional-owner-review-card-confirm",
38
+ review: "bank-account-onboarding-review",
39
+ reviewPersonalSection: "bank-account-onboarding-review-personal",
40
+ reviewPersonalEditButton: "bank-account-onboarding-review-personal-edit",
41
+ reviewBusinessSection: "bank-account-onboarding-review-business",
42
+ reviewBusinessEditButton: "bank-account-onboarding-review-business-edit",
43
+ reviewOwnersSection: "bank-account-onboarding-review-owners",
44
+ reviewOwnersEditButton: "bank-account-onboarding-review-owners-edit",
36
45
  resultProcessing: "bank-account-onboarding-result-processing",
37
46
  resultDashboardButton: "bank-account-onboarding-result-dashboard-button",
38
47
  statusCard: "bank-account-onboarding-status-card",
39
48
  statusCardChip: "bank-account-onboarding-status-card-chip",
40
- statusCardClose: "bank-account-onboarding-status-card-close",
41
49
  statusCardCheckAgain: "bank-account-onboarding-status-card-check-again"
42
50
  };
43
51
  //#endregion
@@ -1,18 +1,19 @@
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";
9
- import { BUSINESS_DETAILS_PANEL_LABELS_EN as l } from "./index19.js";
10
- import { BusinessDetailsPanel as u } from "./index20.js";
11
- import { ABOUT_YOU_PANEL_LABELS_EN as d } from "./index23.js";
12
- import { AboutYouPanel as f } from "./index24.js";
13
- import { BusinessDisclosuresSection as p } from "./index25.js";
14
- import "./index26.js";
15
- import { UnsavedApplicationDialog as m } from "./index27.js";
16
- import "./index28.js";
17
- import { DeleteApplicationDialog as h } from "./index29.js";
18
- 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
+ import { ADDITIONAL_OWNERS_LABELS_EN as e } from "./index8.js";
2
+ import { AdditionalOwnerRowStatus as t } from "./index9.js";
3
+ import { AdditionalOwnersForm as n } from "./index10.js";
4
+ import { BUSINESS_DETAILS_LABELS_EN as r, interpolateBankName as i } from "./index11.js";
5
+ import { PERSONAL_DETAILS_LABELS_EN as a } from "./index12.js";
6
+ import "./index13.js";
7
+ import { ApplicationStatusCard as o, ApplicationStatusTone as s } from "./index14.js";
8
+ import { ResultStep as c } from "./index18.js";
9
+ import { RESULT_LABELS_EN as l } from "./index19.js";
10
+ import { BUSINESS_DETAILS_PANEL_LABELS_EN as u } from "./index22.js";
11
+ import { BusinessDetailsPanel as d } from "./index23.js";
12
+ import { ABOUT_YOU_PANEL_LABELS_EN as f } from "./index26.js";
13
+ import { AboutYouPanel as p } from "./index27.js";
14
+ import { BusinessDisclosuresSection as m } from "./index28.js";
15
+ import "./index29.js";
16
+ import { ApplicationReview as h } from "./index30.js";
17
+ import "./index31.js";
18
+ import { DeleteApplicationDialog as g } from "./index32.js";
19
+ export { f as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, p as AboutYouPanel, t as AdditionalOwnerRowStatus, n as AdditionalOwnersForm, h as ApplicationReview, o as ApplicationStatusCard, s as ApplicationStatusTone, r as BUSINESS_DETAILS_LABELS_EN, u as BUSINESS_DETAILS_PANEL_LABELS_EN, d as BusinessDetailsPanel, m as BusinessDisclosuresSection, g as DeleteApplicationDialog, a as PERSONAL_DETAILS_LABELS_EN, l as RESULT_LABELS_EN, c as ResultStep, i as interpolateBankName };