@tesouro/embedded-components-react 0.5.271 → 0.5.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.css +17 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +4 -4
- package/dist/lib/BankAccountOnboardingWidget.d.ts +19 -0
- package/dist/lib/BankAccountOnboardingWidget.js +4 -4
- package/dist/lib/WidgetSuite.d.ts +19 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +94 -73
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +71 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +61 -46
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +22 -24
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +28 -32
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldErrors.js +40 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +26 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +6 -58
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +57 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +31 -38
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +27 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +34 -91
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +96 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +4 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +269 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +28 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +21 -68
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +59 -225
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +338 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +29 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -74
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +71 -82
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +85 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +8 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +57 -9
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +34 -261
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +9 -62
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +331 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +2 -48
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +53 -139
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +146 -50
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +50 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +35 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +14 -9
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -42,6 +42,10 @@ export function App() {
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
`widgetToken` comes from your server, never the browser: create it with
|
|
46
|
+
[`@tesouro/embedded-components-widget-token`](https://www.npmjs.com/package/@tesouro/embedded-components-widget-token),
|
|
47
|
+
which keeps your client and widget secrets server-side.
|
|
48
|
+
|
|
45
49
|
Every provider and widget prop is typed in the shipped declarations, so your
|
|
46
50
|
editor documents them inline.
|
|
47
51
|
|
package/dist/index.css
CHANGED
|
@@ -4697,6 +4697,9 @@
|
|
|
4697
4697
|
.ttw\:last\:border-b-transparent:last-child {
|
|
4698
4698
|
border-bottom-color: transparent;
|
|
4699
4699
|
}
|
|
4700
|
+
.ttw\:focus-within\:border-destructive:focus-within {
|
|
4701
|
+
border-color: var(--ttw-destructive);
|
|
4702
|
+
}
|
|
4700
4703
|
.ttw\:focus-within\:border-ring:focus-within {
|
|
4701
4704
|
border-color: var(--ttw-ring);
|
|
4702
4705
|
}
|
|
@@ -4704,6 +4707,12 @@
|
|
|
4704
4707
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
4705
4708
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4706
4709
|
}
|
|
4710
|
+
.ttw\:focus-within\:ring-destructive\/20:focus-within {
|
|
4711
|
+
--tw-ring-color: var(--ttw-destructive);
|
|
4712
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4713
|
+
--tw-ring-color: color-mix(in oklab, var(--ttw-destructive) 20%, transparent);
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4707
4716
|
.ttw\:focus-within\:ring-ring\/50:focus-within {
|
|
4708
4717
|
--tw-ring-color: var(--ttw-ring);
|
|
4709
4718
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -4776,6 +4785,14 @@
|
|
|
4776
4785
|
.ttw\:hover\:bg-cyan-50:hover {
|
|
4777
4786
|
background-color: var(--ttw-color-cyan-50);
|
|
4778
4787
|
}
|
|
4788
|
+
.ttw\:hover\:bg-destructive\/5:hover {
|
|
4789
|
+
background-color: var(--ttw-destructive);
|
|
4790
|
+
}
|
|
4791
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4792
|
+
.ttw\:hover\:bg-destructive\/5:hover {
|
|
4793
|
+
background-color: color-mix(in oklab, var(--ttw-destructive) 5%, transparent);
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4779
4796
|
.ttw\:hover\:bg-destructive\/10:hover {
|
|
4780
4797
|
background-color: var(--ttw-destructive);
|
|
4781
4798
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1739,11 +1739,19 @@ interface AdditionalOwnersLabels {
|
|
|
1739
1739
|
state: string;
|
|
1740
1740
|
statePlaceholder: string;
|
|
1741
1741
|
zipCode: string;
|
|
1742
|
+
zipCodeInvalid: string;
|
|
1742
1743
|
mobilePhoneNumber: string;
|
|
1743
1744
|
mobilePhoneNumberInvalid: string;
|
|
1744
1745
|
ownershipPercentage: string;
|
|
1745
1746
|
ownershipPercentagePlaceholder: string;
|
|
1746
1747
|
ownershipPercentageMinError: string;
|
|
1748
|
+
ownershipPercentageMaxError: string;
|
|
1749
|
+
/** Shown under a required field the user left blank. */
|
|
1750
|
+
requiredFieldError: string;
|
|
1751
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
1752
|
+
invalidFieldError: string;
|
|
1753
|
+
/** Shown on an owners-list row whose saved details are incomplete or invalid. */
|
|
1754
|
+
ownerIncompleteError: string;
|
|
1747
1755
|
/** Required-field marker appended to field labels (e.g. ` *`). */
|
|
1748
1756
|
requiredFieldMarker: string;
|
|
1749
1757
|
/** Suffix shown after ownership percentage inputs (e.g. `%`). */
|
|
@@ -1767,8 +1775,13 @@ interface BusinessDetailsLabels {
|
|
|
1767
1775
|
state: string;
|
|
1768
1776
|
statePlaceholder: string;
|
|
1769
1777
|
zipCode: string;
|
|
1778
|
+
zipCodeInvalid: string;
|
|
1770
1779
|
companyPhoneNumber: string;
|
|
1771
1780
|
companyPhoneNumberInvalid: string;
|
|
1781
|
+
/** Shown under a required field the user left blank. */
|
|
1782
|
+
requiredFieldError: string;
|
|
1783
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
1784
|
+
invalidFieldError: string;
|
|
1772
1785
|
companyStructure: string;
|
|
1773
1786
|
companyStructurePlaceholder: string;
|
|
1774
1787
|
website: string;
|
|
@@ -1816,9 +1829,15 @@ interface PersonalDetailsLabels {
|
|
|
1816
1829
|
state: string;
|
|
1817
1830
|
statePlaceholder: string;
|
|
1818
1831
|
zipCode: string;
|
|
1832
|
+
zipCodeInvalid: string;
|
|
1819
1833
|
mobilePhoneNumber: string;
|
|
1820
1834
|
mobilePhoneNumberInvalid: string;
|
|
1821
1835
|
workEmail: string;
|
|
1836
|
+
workEmailInvalid: string;
|
|
1837
|
+
/** Shown under a required field the user left blank. */
|
|
1838
|
+
requiredFieldError: string;
|
|
1839
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
1840
|
+
invalidFieldError: string;
|
|
1822
1841
|
ownsOver25Question: string;
|
|
1823
1842
|
ownsOver25SummaryLabel: string;
|
|
1824
1843
|
ownsOver25Yes: string;
|
package/dist/index.js
CHANGED
|
@@ -37,10 +37,10 @@ import { TRANSFERS_WIDGET_LABELS_EN as q } from "./libs/tesouro-embedded-compone
|
|
|
37
37
|
import { TransfersWidget as J } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetFeature.js";
|
|
38
38
|
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as Y } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
39
39
|
import { AcceptDisclosuresWidget as X } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
40
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as Z } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
41
|
-
import { BUSINESS_DETAILS_LABELS_EN as Q } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
42
|
-
import { PERSONAL_DETAILS_LABELS_EN as $ } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
43
|
-
import { RESULT_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
40
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as Z } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js";
|
|
41
|
+
import { BUSINESS_DETAILS_LABELS_EN as Q } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js";
|
|
42
|
+
import { PERSONAL_DETAILS_LABELS_EN as $ } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js";
|
|
43
|
+
import { RESULT_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js";
|
|
44
44
|
import { APPLICATION_STATUS_LABELS_EN as te } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js";
|
|
45
45
|
import { BankAccountOnboardingWidget as ne } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js";
|
|
46
46
|
import { WidgetSuite as re } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js";
|
|
@@ -807,11 +807,19 @@ interface AdditionalOwnersLabels {
|
|
|
807
807
|
state: string;
|
|
808
808
|
statePlaceholder: string;
|
|
809
809
|
zipCode: string;
|
|
810
|
+
zipCodeInvalid: string;
|
|
810
811
|
mobilePhoneNumber: string;
|
|
811
812
|
mobilePhoneNumberInvalid: string;
|
|
812
813
|
ownershipPercentage: string;
|
|
813
814
|
ownershipPercentagePlaceholder: string;
|
|
814
815
|
ownershipPercentageMinError: string;
|
|
816
|
+
ownershipPercentageMaxError: string;
|
|
817
|
+
/** Shown under a required field the user left blank. */
|
|
818
|
+
requiredFieldError: string;
|
|
819
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
820
|
+
invalidFieldError: string;
|
|
821
|
+
/** Shown on an owners-list row whose saved details are incomplete or invalid. */
|
|
822
|
+
ownerIncompleteError: string;
|
|
815
823
|
/** Required-field marker appended to field labels (e.g. ` *`). */
|
|
816
824
|
requiredFieldMarker: string;
|
|
817
825
|
/** Suffix shown after ownership percentage inputs (e.g. `%`). */
|
|
@@ -835,8 +843,13 @@ interface BusinessDetailsLabels {
|
|
|
835
843
|
state: string;
|
|
836
844
|
statePlaceholder: string;
|
|
837
845
|
zipCode: string;
|
|
846
|
+
zipCodeInvalid: string;
|
|
838
847
|
companyPhoneNumber: string;
|
|
839
848
|
companyPhoneNumberInvalid: string;
|
|
849
|
+
/** Shown under a required field the user left blank. */
|
|
850
|
+
requiredFieldError: string;
|
|
851
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
852
|
+
invalidFieldError: string;
|
|
840
853
|
companyStructure: string;
|
|
841
854
|
companyStructurePlaceholder: string;
|
|
842
855
|
website: string;
|
|
@@ -884,9 +897,15 @@ interface PersonalDetailsLabels {
|
|
|
884
897
|
state: string;
|
|
885
898
|
statePlaceholder: string;
|
|
886
899
|
zipCode: string;
|
|
900
|
+
zipCodeInvalid: string;
|
|
887
901
|
mobilePhoneNumber: string;
|
|
888
902
|
mobilePhoneNumberInvalid: string;
|
|
889
903
|
workEmail: string;
|
|
904
|
+
workEmailInvalid: string;
|
|
905
|
+
/** Shown under a required field the user left blank. */
|
|
906
|
+
requiredFieldError: string;
|
|
907
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
908
|
+
invalidFieldError: string;
|
|
890
909
|
ownsOver25Question: string;
|
|
891
910
|
ownsOver25SummaryLabel: string;
|
|
892
911
|
ownsOver25Yes: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
2
|
-
import { BUSINESS_DETAILS_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
3
|
-
import { PERSONAL_DETAILS_LABELS_EN as n } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
4
|
-
import { RESULT_LABELS_EN as r } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/
|
|
1
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js";
|
|
2
|
+
import { BUSINESS_DETAILS_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js";
|
|
3
|
+
import { PERSONAL_DETAILS_LABELS_EN as n } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js";
|
|
4
|
+
import { RESULT_LABELS_EN as r } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js";
|
|
5
5
|
import "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js";
|
|
6
6
|
import { APPLICATION_STATUS_LABELS_EN as i } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js";
|
|
7
7
|
import { BankAccountOnboardingWidget as a } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js";
|
|
@@ -861,11 +861,19 @@ interface AdditionalOwnersLabels {
|
|
|
861
861
|
state: string;
|
|
862
862
|
statePlaceholder: string;
|
|
863
863
|
zipCode: string;
|
|
864
|
+
zipCodeInvalid: string;
|
|
864
865
|
mobilePhoneNumber: string;
|
|
865
866
|
mobilePhoneNumberInvalid: string;
|
|
866
867
|
ownershipPercentage: string;
|
|
867
868
|
ownershipPercentagePlaceholder: string;
|
|
868
869
|
ownershipPercentageMinError: string;
|
|
870
|
+
ownershipPercentageMaxError: string;
|
|
871
|
+
/** Shown under a required field the user left blank. */
|
|
872
|
+
requiredFieldError: string;
|
|
873
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
874
|
+
invalidFieldError: string;
|
|
875
|
+
/** Shown on an owners-list row whose saved details are incomplete or invalid. */
|
|
876
|
+
ownerIncompleteError: string;
|
|
869
877
|
/** Required-field marker appended to field labels (e.g. ` *`). */
|
|
870
878
|
requiredFieldMarker: string;
|
|
871
879
|
/** Suffix shown after ownership percentage inputs (e.g. `%`). */
|
|
@@ -888,8 +896,13 @@ interface BusinessDetailsLabels {
|
|
|
888
896
|
state: string;
|
|
889
897
|
statePlaceholder: string;
|
|
890
898
|
zipCode: string;
|
|
899
|
+
zipCodeInvalid: string;
|
|
891
900
|
companyPhoneNumber: string;
|
|
892
901
|
companyPhoneNumberInvalid: string;
|
|
902
|
+
/** Shown under a required field the user left blank. */
|
|
903
|
+
requiredFieldError: string;
|
|
904
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
905
|
+
invalidFieldError: string;
|
|
893
906
|
companyStructure: string;
|
|
894
907
|
companyStructurePlaceholder: string;
|
|
895
908
|
website: string;
|
|
@@ -936,9 +949,15 @@ interface PersonalDetailsLabels {
|
|
|
936
949
|
state: string;
|
|
937
950
|
statePlaceholder: string;
|
|
938
951
|
zipCode: string;
|
|
952
|
+
zipCodeInvalid: string;
|
|
939
953
|
mobilePhoneNumber: string;
|
|
940
954
|
mobilePhoneNumberInvalid: string;
|
|
941
955
|
workEmail: string;
|
|
956
|
+
workEmailInvalid: string;
|
|
957
|
+
/** Shown under a required field the user left blank. */
|
|
958
|
+
requiredFieldError: string;
|
|
959
|
+
/** Shown under a filled-in field that fails a rule with no message of its own. */
|
|
960
|
+
invalidFieldError: string;
|
|
942
961
|
ownsOver25Question: string;
|
|
943
962
|
ownsOver25SummaryLabel: string;
|
|
944
963
|
ownsOver25Yes: string;
|
|
@@ -2,104 +2,125 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/
|
|
6
|
-
import { AdditionalOwnersForm as t } from "../../../../ui/dist/
|
|
5
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as e } from "../../../../ui/dist/index6.js";
|
|
6
|
+
import { AdditionalOwnersForm as t } from "../../../../ui/dist/index7.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
import { bankAccountOnboardingTestIds as n } from "./testIds.js";
|
|
9
9
|
import { buildAdditionalOwnerSchema as r } from "./stepSchemas.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { fieldErrorsFromIssues as i, fieldsToFlagOnOpen as ee, labelOwnedFallback as a, useTouchedFields as te, withFieldFeedback as o } from "./fieldErrors.js";
|
|
11
|
+
import { valuesKey as s } from "./valuesKey.js";
|
|
12
|
+
import { EMPTY_ADDITIONAL_OWNER as c, buildAdditionalOwnerEditDisplay as l, buildAdditionalOwnerEditFields as u, normalizeAdditionalOwnerDraft as d } from "./additionalOwnerDraft.js";
|
|
13
|
+
import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
14
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
14
15
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js
|
|
15
|
-
|
|
16
|
+
var _ = [
|
|
17
|
+
"firstName",
|
|
18
|
+
"lastName",
|
|
19
|
+
"dateOfBirth",
|
|
20
|
+
"ssn",
|
|
21
|
+
"homeAddress",
|
|
22
|
+
"city",
|
|
23
|
+
"state",
|
|
24
|
+
"zipCode",
|
|
25
|
+
"mobilePhoneNumber",
|
|
26
|
+
"ownershipPercentage"
|
|
27
|
+
];
|
|
28
|
+
function v(e) {
|
|
16
29
|
return e.ownershipPercentage !== null && e.ownershipPercentage >= 25 ? e.ownershipPercentage : 0;
|
|
17
30
|
}
|
|
18
|
-
function
|
|
19
|
-
return `${
|
|
31
|
+
function y(e) {
|
|
32
|
+
return `${e.ownershipPercentage ?? 0}%`;
|
|
20
33
|
}
|
|
21
|
-
function
|
|
34
|
+
function b(e, t) {
|
|
22
35
|
return {
|
|
23
36
|
name: `${e.firstName} ${e.lastName}`.trim(),
|
|
24
|
-
shareDisplay:
|
|
37
|
+
shareDisplay: y(e),
|
|
38
|
+
error: t
|
|
25
39
|
};
|
|
26
40
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
41
|
+
function x({ owners: y, onOwnersChange: x, primaryOwnerName: S, primaryOwnerPercentage: C, stateOptions: w, onSnapshotChange: T, onPendingOwnerChange: E, isSubmitting: ne, labels: D }) {
|
|
42
|
+
let O = p(() => ({
|
|
29
43
|
...e,
|
|
30
|
-
...
|
|
31
|
-
}), [
|
|
32
|
-
|
|
33
|
-
},
|
|
44
|
+
...D
|
|
45
|
+
}), [D]), k = p(() => r(O), [O]), A = a(O.invalidFieldError), [j, M] = h(null), [N, P] = h(null), [re, F] = h(null), [I, L] = h(null), [R, z] = h(!1), B = te(() => []), V = (e) => {
|
|
46
|
+
M(d(e));
|
|
47
|
+
}, H = C + y.reduce((e, t) => e + v(t), 0), U = H > 100 ? O.totalOwnershipExceedsTemplate(H) : null, W = H > 75, G = `${C}%`, K = C >= 25, q = y.map((e) => {
|
|
48
|
+
let t = k.safeParse(e, A);
|
|
49
|
+
if (t.success) return;
|
|
50
|
+
let n = t.error.issues.find((e) => e.path[0] === "ownershipPercentage");
|
|
51
|
+
return n ? e.ownershipPercentage === null ? O.ownershipPercentageMinError : n.message : O.ownerIncompleteError;
|
|
52
|
+
}), J = q.every((e) => e === void 0), Y = j === null ? null : k.safeParse(j, A), ie = Y?.success ?? !1, X = J && U === null && j === null && I === null ? y : null, ae = JSON.stringify({ snapshot: X?.map((e) => ({
|
|
34
53
|
...e,
|
|
35
54
|
dateOfBirth: e.dateOfBirth?.toISOString()
|
|
36
|
-
})) }),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
let
|
|
41
|
-
owner:
|
|
42
|
-
index:
|
|
43
|
-
} : null,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, [
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
let t =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
})) }), Z = m(T);
|
|
56
|
+
Z.current = T, f(() => {
|
|
57
|
+
Z.current(X);
|
|
58
|
+
}, [ae]);
|
|
59
|
+
let Q = j !== null && N !== null && s(j) !== s(re) ? {
|
|
60
|
+
owner: j,
|
|
61
|
+
index: N
|
|
62
|
+
} : null, oe = s(Q), $ = m(E);
|
|
63
|
+
$.current = E, f(() => {
|
|
64
|
+
$.current?.(Q);
|
|
65
|
+
}, [oe]), f(() => () => $.current?.(null), []);
|
|
66
|
+
let se = () => {
|
|
67
|
+
P(null), z(!1), M({ ...c }), F({ ...c }), B.reset([]);
|
|
68
|
+
}, ce = (e) => {
|
|
69
|
+
P(e), z(!1);
|
|
70
|
+
let t = d({ ...y[e] });
|
|
71
|
+
M(t), F(t);
|
|
72
|
+
let n = k.safeParse(t, A);
|
|
73
|
+
B.reset(ee(_, t, i(_, t, n.error?.issues, O.requiredFieldError)));
|
|
74
|
+
}, le = (e) => {
|
|
75
|
+
let t = y[e];
|
|
76
|
+
L({
|
|
56
77
|
index: e,
|
|
57
78
|
displayName: `${t.firstName} ${t.lastName}`.trim()
|
|
58
79
|
});
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
fields:
|
|
65
|
-
display:
|
|
66
|
-
isExisting:
|
|
67
|
-
isValid:
|
|
68
|
-
ssnRevealed:
|
|
69
|
-
ssnToggleAriaLabel:
|
|
70
|
-
onToggleSsnVisibility: () =>
|
|
80
|
+
}, ue = () => {
|
|
81
|
+
I && (x(y.filter((e, t) => t !== I.index)), L(null));
|
|
82
|
+
}, de = () => {
|
|
83
|
+
L(null);
|
|
84
|
+
}, fe = j ? {
|
|
85
|
+
fields: o(u(j, V, { stateOptions: w }), i(_, j, Y?.error?.issues, O.requiredFieldError), B.touched, B.touch),
|
|
86
|
+
display: l(j, O),
|
|
87
|
+
isExisting: N !== null,
|
|
88
|
+
isValid: ie,
|
|
89
|
+
ssnRevealed: R,
|
|
90
|
+
ssnToggleAriaLabel: R ? O.ssnHide : O.ssnShow,
|
|
91
|
+
onToggleSsnVisibility: () => z((e) => !e),
|
|
71
92
|
onSubmit: () => {
|
|
72
|
-
if (!
|
|
73
|
-
let e =
|
|
93
|
+
if (!j) return;
|
|
94
|
+
let e = k.safeParse(j);
|
|
74
95
|
if (e.success) {
|
|
75
|
-
if (
|
|
96
|
+
if (N === null) x([...y, e.data]);
|
|
76
97
|
else {
|
|
77
|
-
let t = [...
|
|
78
|
-
t[
|
|
98
|
+
let t = [...y];
|
|
99
|
+
t[N] = e.data, x(t);
|
|
79
100
|
}
|
|
80
|
-
|
|
101
|
+
M(null), P(null), z(!1);
|
|
81
102
|
}
|
|
82
103
|
},
|
|
83
104
|
onCancel: () => {
|
|
84
|
-
|
|
105
|
+
M(null), P(null), z(!1);
|
|
85
106
|
}
|
|
86
107
|
} : null;
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
ownerRows:
|
|
89
|
-
primaryOwnerName:
|
|
90
|
-
primaryOwnerShareDisplay:
|
|
91
|
-
showPrimaryOwner:
|
|
92
|
-
totalOwnershipError:
|
|
93
|
-
addOwnerDisabled:
|
|
94
|
-
onAddOwner:
|
|
95
|
-
onEditOwner:
|
|
96
|
-
onDeleteOwnerRequest:
|
|
97
|
-
deletingOwnerName:
|
|
98
|
-
onDeleteOwnerConfirm:
|
|
99
|
-
onDeleteOwnerCancel:
|
|
100
|
-
editingOverlay:
|
|
101
|
-
isSubmitting:
|
|
102
|
-
labels:
|
|
108
|
+
return /* @__PURE__ */ g(t, {
|
|
109
|
+
ownerRows: y.map((e, t) => b(e, q[t])),
|
|
110
|
+
primaryOwnerName: S,
|
|
111
|
+
primaryOwnerShareDisplay: G,
|
|
112
|
+
showPrimaryOwner: K,
|
|
113
|
+
totalOwnershipError: U,
|
|
114
|
+
addOwnerDisabled: W,
|
|
115
|
+
onAddOwner: se,
|
|
116
|
+
onEditOwner: ce,
|
|
117
|
+
onDeleteOwnerRequest: le,
|
|
118
|
+
deletingOwnerName: I?.displayName ?? null,
|
|
119
|
+
onDeleteOwnerConfirm: ue,
|
|
120
|
+
onDeleteOwnerCancel: de,
|
|
121
|
+
editingOverlay: fe,
|
|
122
|
+
isSubmitting: ne,
|
|
123
|
+
labels: D,
|
|
103
124
|
testIds: {
|
|
104
125
|
addOwnerButton: n.addOwnerButton,
|
|
105
126
|
overlay: { root: n.shellOverlay },
|
|
@@ -111,4 +132,4 @@ function _({ owners: h, onOwnersChange: _, primaryOwnerName: v, primaryOwnerPerc
|
|
|
111
132
|
});
|
|
112
133
|
}
|
|
113
134
|
//#endregion
|
|
114
|
-
export {
|
|
135
|
+
export { x as AdditionalOwnersStep, v as getAdditionalOwnerShare };
|
|
@@ -22,12 +22,12 @@ import { useRefetchWidget as oe, useWidgetConfig as se, useWidgetInitStaleForTok
|
|
|
22
22
|
import { getNaicsOptions as ue } from "../../../../../shared/feature/dist/lib/naicsCodeMap.js";
|
|
23
23
|
import { deniedNoticeExpiresAt as de, selectBankAccountApplication as fe } from "../../../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
24
24
|
import "../../../../../shared/feature/dist/index.js";
|
|
25
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as pe } from "../../../../ui/dist/
|
|
26
|
-
import { interpolateBankName as me } from "../../../../ui/dist/
|
|
27
|
-
import { ApplicationStatusCard as he } from "../../../../ui/dist/
|
|
28
|
-
import { ResultStep as ge } from "../../../../ui/dist/
|
|
29
|
-
import { UnsavedApplicationDialog as _e } from "../../../../ui/dist/
|
|
30
|
-
import { DeleteApplicationDialog as ve } from "../../../../ui/dist/
|
|
25
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as pe } from "../../../../ui/dist/index6.js";
|
|
26
|
+
import { interpolateBankName as me } from "../../../../ui/dist/index8.js";
|
|
27
|
+
import { ApplicationStatusCard as he } from "../../../../ui/dist/index11.js";
|
|
28
|
+
import { ResultStep as ge } from "../../../../ui/dist/index15.js";
|
|
29
|
+
import { UnsavedApplicationDialog as _e } from "../../../../ui/dist/index29.js";
|
|
30
|
+
import { DeleteApplicationDialog as ve } from "../../../../ui/dist/index31.js";
|
|
31
31
|
import "../../../../ui/dist/index.js";
|
|
32
32
|
import { DEFAULT_LABELS as ye } from "./labels.js";
|
|
33
33
|
import { OnboardingApplicationView as be, applicationStatusNoticeFor as xe, hiddenViewReason as Se, isNoticeView as Ce, mergeApplicationStatusLabels as we, onboardingApplicationViewFor as Te } from "./applicationStatusView.js";
|
|
@@ -71,7 +71,7 @@ function at(e) {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
function ot(e, t) {
|
|
74
|
-
return t ?
|
|
74
|
+
return t ? e.map((e, n) => n === t.index ? t.owner : e) : e;
|
|
75
75
|
}
|
|
76
76
|
var st = {
|
|
77
77
|
companyLegalName: "",
|
|
@@ -2,56 +2,70 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { BusinessDetailsPanel as e } from "../../../../ui/dist/
|
|
6
|
-
import { BusinessDisclosuresSection as t } from "../../../../ui/dist/
|
|
5
|
+
import { BusinessDetailsPanel as e } from "../../../../ui/dist/index22.js";
|
|
6
|
+
import { BusinessDisclosuresSection as t } from "../../../../ui/dist/index27.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
import { bankAccountOnboardingTestIds as n } from "./testIds.js";
|
|
9
|
-
import {
|
|
10
|
-
import { buildBusinessDetailsEditFields as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
var S = [
|
|
16
|
+
"companyLegalName",
|
|
17
|
+
"companyDbaName",
|
|
18
|
+
"businessAddress",
|
|
19
|
+
"city",
|
|
20
|
+
"state",
|
|
21
|
+
"zipCode",
|
|
22
|
+
"companyPhoneNumber",
|
|
23
|
+
"companyStructure",
|
|
24
|
+
"website",
|
|
25
|
+
"taxId",
|
|
26
|
+
"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
|
|
19
34
|
}),
|
|
20
|
-
full:
|
|
21
|
-
}), [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
let [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
let
|
|
30
|
-
stateOptions:
|
|
31
|
-
naicsOptions:
|
|
32
|
-
labels:
|
|
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
|
|
33
48
|
}), [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
]),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
]),
|
|
42
|
-
return /* @__PURE__ */
|
|
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
|
+
w,
|
|
55
|
+
J
|
|
56
|
+
]), Q = h(Z, V, H, U), $ = _(() => ee(C, k), [C, k]);
|
|
57
|
+
return /* @__PURE__ */ x("div", {
|
|
43
58
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
isEditing:
|
|
46
|
-
onEditClick: () =>
|
|
47
|
-
summaryRows:
|
|
48
|
-
editFields:
|
|
49
|
-
labels:
|
|
50
|
-
isDisabled:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
taxIdHelpText: W.helpText,
|
|
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,
|
|
55
69
|
testIds: {
|
|
56
70
|
root: n.businessDetailsPanel,
|
|
57
71
|
editButton: n.businessDetailsEditButton,
|
|
@@ -61,22 +75,22 @@ function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, s
|
|
|
61
75
|
naicsCombobox: n.businessDetailsNaicsCombobox
|
|
62
76
|
}
|
|
63
77
|
}
|
|
64
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ b(t, {
|
|
65
79
|
value: {
|
|
66
|
-
isAuthorized:
|
|
67
|
-
isCheckboxChecked:
|
|
80
|
+
isAuthorized: C.isAuthorized,
|
|
81
|
+
isCheckboxChecked: C.isCheckboxChecked
|
|
68
82
|
},
|
|
69
|
-
onChange: (e) =>
|
|
70
|
-
...
|
|
83
|
+
onChange: (e) => w({
|
|
84
|
+
...C,
|
|
71
85
|
...e
|
|
72
86
|
}),
|
|
73
|
-
isSubmitting:
|
|
74
|
-
labels:
|
|
75
|
-
bankName:
|
|
76
|
-
termsHref:
|
|
77
|
-
privacyHref:
|
|
78
|
-
electronicCommunicationHref:
|
|
79
|
-
patriotActHref:
|
|
87
|
+
isSubmitting: O,
|
|
88
|
+
labels: k,
|
|
89
|
+
bankName: A,
|
|
90
|
+
termsHref: j,
|
|
91
|
+
privacyHref: M,
|
|
92
|
+
electronicCommunicationHref: N,
|
|
93
|
+
patriotActHref: P,
|
|
80
94
|
testIds: {
|
|
81
95
|
authorizationCheckbox: n.authorizationCheckbox,
|
|
82
96
|
disclosureCheckbox: n.disclosureCheckbox
|
|
@@ -85,4 +99,4 @@ function v({ value: v, onValueChange: y, onSnapshotChange: b, naicsOptions: x, s
|
|
|
85
99
|
});
|
|
86
100
|
}
|
|
87
101
|
//#endregion
|
|
88
|
-
export {
|
|
102
|
+
export { C as BusinessDetailsStep };
|