@tesouro/embedded-components-react 0.5.2 → 0.5.4
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 +15 -2
- package/dist/index.d.ts +120 -100
- package/dist/index.js +7 -4
- package/dist/lib/BankAccountOnboardingWidget.d.ts +214 -246
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/MarketingWidget.d.ts +684 -0
- package/dist/lib/MarketingWidget.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +183 -205
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +70 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +37 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +110 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +73 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +7 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +21 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +22 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +63 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +2 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +81 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +32 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +166 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +39 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +50 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +11 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +59 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +139 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +16 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +41 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +14 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +8 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +91 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +86 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +3 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +49 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +135 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +33 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +186 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +75 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +21 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +232 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +210 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +103 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -121
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +31 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +198 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +31 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +19 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +24 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +427 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -433
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +38 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +220 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -224
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +10 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +57 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +110 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +101 -239
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +202 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -209
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index2.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/ui/dist/index26.js → marketing-widget/feature/dist/index3.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js +81 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/ui/dist/index24.js → marketing-widget/ui/dist/index2.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/ui/dist/index25.js → marketing-widget/ui/dist/index3.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/ui/dist/index27.js → marketing-widget/ui/dist/index4.js} +36 -37
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index5.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +24 -22
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/data-access/dist/index9.js → shared/data-access/dist/lib/onboardingSuppressionReason.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/{bank-account-onboarding-widget/data-access/dist/index10.js → shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js} +5 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +0 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnboardingSuppressionReason as e } from "../../../shared/data-access/dist/lib/onboardingSuppressionReason.js";
|
|
2
|
+
import { useOrganizationOnboardingSuppression as t } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
|
|
3
|
+
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
import { ApplicationClientSecretProvider as n, useApplicationClientSecret as r } from "./index2.js";
|
|
2
5
|
import "./index3.js";
|
|
3
|
-
import { useCreateApplication as
|
|
4
|
-
import { useUpdateApplication as
|
|
5
|
-
import { useSubmitApplication as
|
|
6
|
-
import { usePollApplicationCompletion as
|
|
7
|
-
|
|
8
|
-
import { useOrganizationOnboardingSuppression as s } from "./index10.js";
|
|
9
|
-
export { e as ApplicationClientSecretProvider, o as OnboardingSuppressionReason, t as useApplicationClientSecret, n as useCreateApplication, s as useOrganizationOnboardingSuppression, a as usePollApplicationCompletion, i as useSubmitApplication, r as useUpdateApplication };
|
|
6
|
+
import { useCreateApplication as i } from "./index4.js";
|
|
7
|
+
import { useUpdateApplication as a } from "./index6.js";
|
|
8
|
+
import { useSubmitApplication as o } from "./index7.js";
|
|
9
|
+
import { usePollApplicationCompletion as s } from "./index8.js";
|
|
10
|
+
export { n as ApplicationClientSecretProvider, e as OnboardingSuppressionReason, r as useApplicationClientSecret, i as useCreateApplication, t as useOrganizationOnboardingSuppression, s as usePollApplicationCompletion, o as useSubmitApplication, a as useUpdateApplication };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js
|
|
2
2
|
var e = {
|
|
3
3
|
Mounted: "onboarding.mounted",
|
|
4
|
-
OpenMarketing: "onboarding_widget_open_marketing_widget",
|
|
5
|
-
BeginOnboarding: "onboarding_widget_begin_onboarding",
|
|
6
4
|
Suppressed: "onboarding.suppressed"
|
|
7
5
|
}, t = "onboarding";
|
|
8
6
|
//#endregion
|
|
@@ -5,38 +5,37 @@
|
|
|
5
5
|
import { Dialog as e, DialogContent as t, DialogTitle as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { useAcceptWidgetDisclosures as r } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
7
7
|
import { useDisclosuresQuery as i } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
8
|
+
import { OnboardingSuppressionReason as a } from "../../../shared/data-access/dist/lib/onboardingSuppressionReason.js";
|
|
9
|
+
import { useOrganizationOnboardingSuppression as o } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
|
|
8
10
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { OnboardingShell as
|
|
11
|
+
import { OnboardingShell as s } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
|
|
10
12
|
import "../../../shared/ui/dist/index.js";
|
|
11
|
-
import { useAnalyticsTrack as
|
|
12
|
-
import { WidgetProvider as
|
|
13
|
-
import { getStateOptions as
|
|
14
|
-
import { extractApiErrorMessage as
|
|
15
|
-
import { useRefetchWidget as
|
|
16
|
-
import { getNaicsOptions as
|
|
13
|
+
import { useAnalyticsTrack as c } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
14
|
+
import { WidgetProvider as l } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
15
|
+
import { getStateOptions as u } from "../../../shared/util/dist/lib/usStates.js";
|
|
16
|
+
import { extractApiErrorMessage as ee } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
17
|
+
import { useRefetchWidget as te, useWidgetConfig as d } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
18
|
+
import { getNaicsOptions as f } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
|
|
17
19
|
import "../../../shared/feature/dist/index.js";
|
|
18
|
-
import { bankAccountOnboardingTestIds as
|
|
19
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as
|
|
20
|
+
import { bankAccountOnboardingTestIds as p } from "./index9.js";
|
|
21
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as ne } from "../../ui/dist/index4.js";
|
|
20
22
|
import { interpolateBankName as m } from "../../ui/dist/index6.js";
|
|
21
|
-
import { ResultStep as
|
|
22
|
-
import { MarketingWidget as ne } from "../../ui/dist/index28.js";
|
|
23
|
+
import { ResultStep as re } from "../../ui/dist/index11.js";
|
|
23
24
|
import "../../ui/dist/index.js";
|
|
24
|
-
import { BusinessDetailsStep as
|
|
25
|
-
import { PersonalDetailsStep as
|
|
26
|
-
import { AdditionalOwnersStep as
|
|
27
|
-
import { buildCreateApplicationBody as
|
|
28
|
-
import { OnboardingAnalyticsEvent as
|
|
29
|
-
import { DEFAULT_LABELS as
|
|
30
|
-
import { ApplicationClientSecretProvider as
|
|
31
|
-
import { useCreateApplication as
|
|
32
|
-
import { useUpdateApplication as
|
|
33
|
-
import { useSubmitApplication as
|
|
34
|
-
import { usePollApplicationCompletion as
|
|
35
|
-
import { OnboardingSuppressionReason as v } from "../../data-access/dist/index9.js";
|
|
36
|
-
import { useOrganizationOnboardingSuppression as me } from "../../data-access/dist/index10.js";
|
|
25
|
+
import { BusinessDetailsStep as ie } from "./index10.js";
|
|
26
|
+
import { PersonalDetailsStep as ae } from "./index12.js";
|
|
27
|
+
import { AdditionalOwnersStep as oe } from "./index14.js";
|
|
28
|
+
import { buildCreateApplicationBody as se, buildUpdateApplicationBody as h } from "./index15.js";
|
|
29
|
+
import { OnboardingAnalyticsEvent as g, WIDGET_NAME as _ } from "./index16.js";
|
|
30
|
+
import { DEFAULT_LABELS as v } from "./index17.js";
|
|
31
|
+
import { ApplicationClientSecretProvider as y, useApplicationClientSecret as ce } from "../../data-access/dist/index2.js";
|
|
32
|
+
import { useCreateApplication as le } from "../../data-access/dist/index4.js";
|
|
33
|
+
import { useUpdateApplication as ue } from "../../data-access/dist/index6.js";
|
|
34
|
+
import { useSubmitApplication as de } from "../../data-access/dist/index7.js";
|
|
35
|
+
import { usePollApplicationCompletion as fe } from "../../data-access/dist/index8.js";
|
|
37
36
|
import "../../data-access/dist/index.js";
|
|
38
|
-
import { useCallback as
|
|
39
|
-
import { Fragment as
|
|
37
|
+
import { useCallback as pe, useEffect as b, useMemo as x, useRef as me, useState as S } from "react";
|
|
38
|
+
import { Fragment as he, jsx as C, jsxs as ge } from "react/jsx-runtime";
|
|
40
39
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js
|
|
41
40
|
var _e = {
|
|
42
41
|
companyLegalName: "",
|
|
@@ -76,7 +75,7 @@ function ye(e, t) {
|
|
|
76
75
|
subtitle: t.personalReviewSubtitle
|
|
77
76
|
};
|
|
78
77
|
let n = {
|
|
79
|
-
...
|
|
78
|
+
...ne,
|
|
80
79
|
...t.additionalOwners
|
|
81
80
|
};
|
|
82
81
|
return {
|
|
@@ -84,239 +83,218 @@ function ye(e, t) {
|
|
|
84
83
|
subtitle: n.subheading
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
|
-
function
|
|
88
|
-
let
|
|
86
|
+
function w({ onEmbeddedOnboardingCompletedSuccessfully: l, onNavigateToDashboard: ne, labels: _, initialBusinessDetails: y, initialPersonalDetails: w, initialAdditionalOwners: T, bankLogoSrc: E, disclosureLinks: be, open: D, defaultOpen: O, onOpenChange: k }) {
|
|
87
|
+
let A = c();
|
|
89
88
|
b(() => {
|
|
90
|
-
|
|
91
|
-
}, [
|
|
92
|
-
let
|
|
89
|
+
A(g.Mounted);
|
|
90
|
+
}, [A]);
|
|
91
|
+
let j = {
|
|
92
|
+
...v,
|
|
93
93
|
..._,
|
|
94
|
-
...g,
|
|
95
94
|
stepIndicator: {
|
|
96
|
-
...
|
|
97
|
-
...
|
|
95
|
+
...v.stepIndicator,
|
|
96
|
+
..._?.stepIndicator
|
|
98
97
|
},
|
|
99
|
-
businessDetails:
|
|
100
|
-
personalDetails:
|
|
101
|
-
additionalOwners:
|
|
98
|
+
businessDetails: _?.businessDetails ?? {},
|
|
99
|
+
personalDetails: _?.personalDetails ?? {},
|
|
100
|
+
additionalOwners: _?.additionalOwners ?? {},
|
|
102
101
|
result: {
|
|
103
|
-
...
|
|
104
|
-
...
|
|
102
|
+
...v.result,
|
|
103
|
+
..._?.result
|
|
105
104
|
}
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
}, [
|
|
109
|
-
|
|
110
|
-
}, [
|
|
111
|
-
M(!1);
|
|
112
|
-
}, []), Be = y(() => {
|
|
113
|
-
O(h.BeginOnboarding), M(!1), N(!0);
|
|
114
|
-
}, [N, O]), Ve = y(() => {
|
|
115
|
-
Me(!1), s();
|
|
116
|
-
}, [s]), He = ee(), [P, F] = S(0), [Ue, We] = S(() => ({
|
|
105
|
+
}, M = d().initResponse, { termsHref: xe, privacyHref: Se, electronicCommunicationHref: Ce, patriotActHref: we } = be ?? {}, N = D === void 0, [Te, Ee] = S(() => O ?? !1), P = N ? Te : D, De = O ?? !1, F = pe((e) => {
|
|
106
|
+
N && Ee(e), k?.(e);
|
|
107
|
+
}, [k, N]), Oe = pe(() => {
|
|
108
|
+
l();
|
|
109
|
+
}, [l]), ke = te(), [I, L] = S(0), [Ae, je] = S(() => ({
|
|
117
110
|
..._e,
|
|
118
|
-
...
|
|
119
|
-
})), [
|
|
111
|
+
...y
|
|
112
|
+
})), [R, Me] = S(() => ({
|
|
120
113
|
...ve,
|
|
121
|
-
...
|
|
122
|
-
})), [
|
|
123
|
-
b(() => () =>
|
|
124
|
-
let
|
|
114
|
+
...w
|
|
115
|
+
})), [Ne, Pe] = S(() => T ?? []), [z, Fe] = S(null), [B, Ie] = S(null), [V, Le] = S(null), [H, Re] = S(null), [ze, U] = S(null), [W, Be] = S(!1), [Ve, G] = S(null), He = le(), K = ue(), Ue = de(), We = fe(), { setClientSecret: Ge } = ce(), { data: Ke, refetch: qe } = i(), { mutateAsync: Je } = r(), q = o(), J = me(null);
|
|
116
|
+
b(() => () => J.current?.abort(), []);
|
|
117
|
+
let Ye = x(() => f(j.businessDetails.naicsTitles), [j.businessDetails.naicsTitles]), Xe = x(() => u(j.businessDetails.stateTitles), [j.businessDetails.stateTitles]), Ze = x(() => u(j.personalDetails.stateTitles), [j.personalDetails.stateTitles]), Qe = x(() => u(j.additionalOwners.stateTitles), [j.additionalOwners.stateTitles]), Y = W || Ve !== null, $e = M?.status === "ACTIVE" || M?.status === "INACTIVE", et = M?.status === "INVITED", X = !!M && !Y && ($e || et || q.isSuppressed), Z = X ? $e ? a.UserAlreadyOnboarded : et ? a.UserInvitedToOrganization : q.reason : null;
|
|
125
118
|
if (b(() => {
|
|
126
|
-
!
|
|
119
|
+
!X || !Z || (A(g.Suppressed, { reason: Z }), console.info(`[onboarding] not shown: ${Z}`));
|
|
127
120
|
}, [
|
|
121
|
+
X,
|
|
128
122
|
Z,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
U(!0), N(!0);
|
|
123
|
+
A
|
|
124
|
+
]), !M || !Y && (X || !q.isResolved)) return null;
|
|
125
|
+
let tt = z?.companyStructure === "SOLE_PROPRIETORSHIP", nt = [
|
|
126
|
+
j.stepIndicator.business,
|
|
127
|
+
j.stepIndicator.personal,
|
|
128
|
+
j.stepIndicator.ownership
|
|
129
|
+
], rt = I === 0 ? z : I === 1 ? B : I === 2 ? V : null, Q = He.isPending || K.isPending || Ue.isPending || W, it = () => {
|
|
130
|
+
U(null), L((e) => e === 0 ? 0 : e - 1);
|
|
131
|
+
}, $ = () => {
|
|
132
|
+
F(!1);
|
|
133
|
+
}, at = async (e) => {
|
|
134
|
+
Be(!0), F(!0);
|
|
142
135
|
let t = new AbortController();
|
|
143
|
-
|
|
136
|
+
J.current = t;
|
|
144
137
|
let n = !1;
|
|
145
138
|
try {
|
|
146
|
-
let r = await
|
|
139
|
+
let r = await Ue.mutateAsync({ path: { id: e } });
|
|
147
140
|
if (t.signal.aborted) return;
|
|
148
|
-
if (!r.id) throw Error(
|
|
149
|
-
if (n = !0, (await
|
|
150
|
-
let e =
|
|
151
|
-
if (e === void 0 && (e = (await
|
|
141
|
+
if (!r.id) throw Error(j.submitFailedError);
|
|
142
|
+
if (n = !0, (await We(e, { signal: t.signal })).status === "complete") {
|
|
143
|
+
let e = Ke;
|
|
144
|
+
if (e === void 0 && (e = (await qe()).data), t.signal.aborted) return;
|
|
152
145
|
if (e !== void 0) try {
|
|
153
|
-
await
|
|
146
|
+
await Je({ displayedVersion: e.version ?? null });
|
|
154
147
|
} catch {}
|
|
155
148
|
if (t.signal.aborted) return;
|
|
156
|
-
G("success"),
|
|
149
|
+
G("success"), ke(), Oe();
|
|
157
150
|
} else G("pending");
|
|
158
151
|
} catch (e) {
|
|
159
152
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
160
153
|
if (!n) throw e;
|
|
161
154
|
G("pending");
|
|
162
155
|
} finally {
|
|
163
|
-
|
|
156
|
+
J.current = null, Be(!1);
|
|
164
157
|
}
|
|
165
|
-
},
|
|
166
|
-
|
|
158
|
+
}, ot = async () => {
|
|
159
|
+
U(null);
|
|
167
160
|
try {
|
|
168
|
-
if (
|
|
169
|
-
if (!
|
|
170
|
-
let e =
|
|
161
|
+
if (I === 0) {
|
|
162
|
+
if (!z) return;
|
|
163
|
+
let e = H;
|
|
171
164
|
if (!e) {
|
|
172
|
-
let t = await
|
|
173
|
-
e = t.id,
|
|
165
|
+
let t = await He.mutateAsync({ body: se(z) });
|
|
166
|
+
e = t.id, Re(e), t.clientSecret && Ge(t.clientSecret);
|
|
174
167
|
}
|
|
175
|
-
|
|
176
|
-
} else if (
|
|
177
|
-
if (!
|
|
178
|
-
await
|
|
179
|
-
path: { id:
|
|
180
|
-
body:
|
|
181
|
-
businessDetails:
|
|
182
|
-
applicant:
|
|
168
|
+
L(1);
|
|
169
|
+
} else if (I === 1) {
|
|
170
|
+
if (!B || !z || !H) return;
|
|
171
|
+
await K.mutateAsync({
|
|
172
|
+
path: { id: H },
|
|
173
|
+
body: h({
|
|
174
|
+
businessDetails: z,
|
|
175
|
+
applicant: B
|
|
183
176
|
})
|
|
184
|
-
}),
|
|
185
|
-
} else if (
|
|
186
|
-
if (!
|
|
187
|
-
await
|
|
188
|
-
path: { id:
|
|
189
|
-
body:
|
|
190
|
-
}), await
|
|
177
|
+
}), L(2);
|
|
178
|
+
} else if (I === 2) {
|
|
179
|
+
if (!V || !H) return;
|
|
180
|
+
await K.mutateAsync({
|
|
181
|
+
path: { id: H },
|
|
182
|
+
body: h({ businessOwners: V })
|
|
183
|
+
}), await at(H);
|
|
191
184
|
}
|
|
192
185
|
} catch (e) {
|
|
193
|
-
let t =
|
|
194
|
-
|
|
186
|
+
let t = ee(e) ?? (e instanceof Error ? e.message : void 0) ?? j.genericRetryError;
|
|
187
|
+
U(t);
|
|
195
188
|
}
|
|
196
|
-
},
|
|
197
|
-
if (
|
|
198
|
-
let r =
|
|
199
|
-
...
|
|
200
|
-
...
|
|
189
|
+
}, st = ye(Math.min(I, 2), j), ct = M.bankName?.trim() || j.fallbackBankName, lt = m(j.shellFdicDisclaimer, ct);
|
|
190
|
+
if (Y) {
|
|
191
|
+
let r = z?.companyLegalName ?? "", i = M.bankName?.trim() || j.fallbackBankName, a = Ve ?? "pending", o = a === "success", s = {
|
|
192
|
+
...v.result,
|
|
193
|
+
...j.result
|
|
201
194
|
};
|
|
202
195
|
return /* @__PURE__ */ C(e, {
|
|
203
|
-
open:
|
|
204
|
-
onOpenChange:
|
|
205
|
-
children: /* @__PURE__ */
|
|
196
|
+
open: P,
|
|
197
|
+
onOpenChange: F,
|
|
198
|
+
children: /* @__PURE__ */ ge(t, {
|
|
206
199
|
className: "ttw:grid ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:grid-rows-[1fr] ttw:gap-0 ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
|
|
207
200
|
children: [/* @__PURE__ */ C(n, {
|
|
208
201
|
className: "ttw:sr-only",
|
|
209
|
-
children:
|
|
210
|
-
}), /* @__PURE__ */ C(
|
|
202
|
+
children: j.modalTitle
|
|
203
|
+
}), /* @__PURE__ */ C(re, {
|
|
211
204
|
testIds: {
|
|
212
|
-
processing:
|
|
213
|
-
dashboardButton:
|
|
205
|
+
processing: p.resultProcessing,
|
|
206
|
+
dashboardButton: p.resultDashboardButton
|
|
214
207
|
},
|
|
215
208
|
status: a,
|
|
216
|
-
isLoading:
|
|
209
|
+
isLoading: W,
|
|
217
210
|
loadingMessage: s.loadingMessage,
|
|
218
211
|
headingLine1: o ? s.successHeadingLine1 : s.pendingHeadingLine1,
|
|
219
212
|
headingLine2: `${r}!`,
|
|
220
213
|
body: o ? s.successBody : s.pendingBody,
|
|
221
|
-
followUpEmail:
|
|
214
|
+
followUpEmail: B?.workEmail ?? "",
|
|
222
215
|
emailBoxLead: s.pendingEmailBoxLead,
|
|
223
216
|
navigateToDashboardLabel: s.navigateToDashboard,
|
|
224
|
-
bankLogoSrc:
|
|
217
|
+
bankLogoSrc: E,
|
|
225
218
|
bankLogoAlt: m(s.bankLogoAlt, i),
|
|
226
219
|
fdicDisclaimer: m(s.fdicDisclaimer, i),
|
|
227
|
-
onNavigateToDashboard:
|
|
220
|
+
onNavigateToDashboard: ne
|
|
228
221
|
})]
|
|
229
222
|
})
|
|
230
223
|
});
|
|
231
224
|
}
|
|
232
|
-
let
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
open:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
onOpenMarketingModal: Re,
|
|
246
|
-
onCloseMarketingModal: ze,
|
|
247
|
-
onPrimaryCtaClick: Be
|
|
248
|
-
}) : null, /* @__PURE__ */ w(a, {
|
|
249
|
-
open: Ie,
|
|
250
|
-
defaultOpen: Le,
|
|
251
|
-
onOpenChange: N,
|
|
252
|
-
title: vt.title,
|
|
253
|
-
subtitle: vt.subtitle,
|
|
254
|
-
stepLabels: ft,
|
|
255
|
-
activeStep: P,
|
|
256
|
-
disclaimerText: bt,
|
|
257
|
-
onBack: P === 0 ? ht : mt,
|
|
258
|
-
onCancel: P > 0 ? ht : void 0,
|
|
259
|
-
onNext: _t,
|
|
225
|
+
let ut = I === 2 ? j.submit : j.next, dt = rt === null || Q;
|
|
226
|
+
return /* @__PURE__ */ C(he, { children: /* @__PURE__ */ ge(s, {
|
|
227
|
+
open: P,
|
|
228
|
+
defaultOpen: De,
|
|
229
|
+
onOpenChange: F,
|
|
230
|
+
title: st.title,
|
|
231
|
+
subtitle: st.subtitle,
|
|
232
|
+
stepLabels: nt,
|
|
233
|
+
activeStep: I,
|
|
234
|
+
disclaimerText: lt,
|
|
235
|
+
onBack: I === 0 ? $ : it,
|
|
236
|
+
onCancel: I > 0 ? $ : void 0,
|
|
237
|
+
onNext: ot,
|
|
260
238
|
showDismissButton: !1,
|
|
261
|
-
isNextDisabled:
|
|
262
|
-
isNextLoading:
|
|
263
|
-
nextLabel:
|
|
239
|
+
isNextDisabled: dt,
|
|
240
|
+
isNextLoading: Q,
|
|
241
|
+
nextLabel: ut,
|
|
264
242
|
nextIcon: null,
|
|
265
|
-
errorMessage:
|
|
243
|
+
errorMessage: ze,
|
|
266
244
|
labels: {
|
|
267
|
-
backButton:
|
|
268
|
-
cancelButton:
|
|
245
|
+
backButton: I === 0 ? j.cancel : j.back,
|
|
246
|
+
cancelButton: j.cancel
|
|
269
247
|
},
|
|
270
248
|
testIds: {
|
|
271
|
-
root:
|
|
272
|
-
dismiss:
|
|
273
|
-
back:
|
|
274
|
-
cancel:
|
|
275
|
-
next:
|
|
249
|
+
root: p.shell,
|
|
250
|
+
dismiss: p.shellDismiss,
|
|
251
|
+
back: p.shellBack,
|
|
252
|
+
cancel: p.shellCancel,
|
|
253
|
+
next: p.shellNext,
|
|
276
254
|
scrollRegion: {
|
|
277
|
-
root:
|
|
278
|
-
fade:
|
|
279
|
-
hint:
|
|
255
|
+
root: p.shellScrollRegion,
|
|
256
|
+
fade: p.shellScrollFade,
|
|
257
|
+
hint: p.shellScrollHint
|
|
280
258
|
}
|
|
281
259
|
},
|
|
282
260
|
children: [
|
|
283
|
-
|
|
284
|
-
value:
|
|
285
|
-
onValueChange:
|
|
286
|
-
onSnapshotChange:
|
|
287
|
-
naicsOptions:
|
|
288
|
-
stateOptions:
|
|
289
|
-
isSubmitting:
|
|
290
|
-
labels:
|
|
291
|
-
bankName:
|
|
292
|
-
termsHref:
|
|
293
|
-
privacyHref:
|
|
294
|
-
electronicCommunicationHref:
|
|
295
|
-
patriotActHref:
|
|
261
|
+
I === 0 ? /* @__PURE__ */ C(ie, {
|
|
262
|
+
value: Ae,
|
|
263
|
+
onValueChange: je,
|
|
264
|
+
onSnapshotChange: Fe,
|
|
265
|
+
naicsOptions: Ye,
|
|
266
|
+
stateOptions: Xe,
|
|
267
|
+
isSubmitting: Q,
|
|
268
|
+
labels: j.businessDetails,
|
|
269
|
+
bankName: ct,
|
|
270
|
+
termsHref: xe,
|
|
271
|
+
privacyHref: Se,
|
|
272
|
+
electronicCommunicationHref: Ce,
|
|
273
|
+
patriotActHref: we
|
|
296
274
|
}, "business") : null,
|
|
297
|
-
|
|
298
|
-
value:
|
|
299
|
-
onValueChange:
|
|
300
|
-
onSnapshotChange:
|
|
301
|
-
stateOptions:
|
|
302
|
-
isSubmitting:
|
|
303
|
-
labels:
|
|
275
|
+
I === 1 ? /* @__PURE__ */ C(ae, {
|
|
276
|
+
value: R,
|
|
277
|
+
onValueChange: Me,
|
|
278
|
+
onSnapshotChange: Ie,
|
|
279
|
+
stateOptions: Ze,
|
|
280
|
+
isSubmitting: Q,
|
|
281
|
+
labels: j.personalDetails
|
|
304
282
|
}, "personal") : null,
|
|
305
|
-
|
|
306
|
-
owners:
|
|
307
|
-
onOwnersChange:
|
|
308
|
-
primaryOwnerName: `${
|
|
309
|
-
primaryOwnerPercentage:
|
|
310
|
-
stateOptions:
|
|
311
|
-
onSnapshotChange:
|
|
312
|
-
isSubmitting:
|
|
313
|
-
labels:
|
|
283
|
+
I === 2 ? /* @__PURE__ */ C(oe, {
|
|
284
|
+
owners: Ne,
|
|
285
|
+
onOwnersChange: Pe,
|
|
286
|
+
primaryOwnerName: `${R.firstName} ${R.lastName}`.trim(),
|
|
287
|
+
primaryOwnerPercentage: tt ? 100 : B?.ownsOver25Percent === !0 ? B.ownershipPercentage ?? 0 : 0,
|
|
288
|
+
stateOptions: Qe,
|
|
289
|
+
onSnapshotChange: Le,
|
|
290
|
+
isSubmitting: Q,
|
|
291
|
+
labels: j.additionalOwners
|
|
314
292
|
}) : null
|
|
315
293
|
]
|
|
316
|
-
})
|
|
294
|
+
}) });
|
|
317
295
|
}
|
|
318
|
-
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework:
|
|
319
|
-
return /* @__PURE__ */ C(
|
|
296
|
+
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: u, analytics: ee, disclosuresAcceptance: te, providerLabels: d, ...f }) {
|
|
297
|
+
return /* @__PURE__ */ C(l, {
|
|
320
298
|
baseUrl: e,
|
|
321
299
|
widgetToken: t,
|
|
322
300
|
organizationId: n,
|
|
@@ -324,19 +302,19 @@ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
324
302
|
gatewayRouting: i,
|
|
325
303
|
linkComponent: a,
|
|
326
304
|
implementation: o,
|
|
327
|
-
uiFramework:
|
|
328
|
-
errorFallback:
|
|
329
|
-
onError:
|
|
330
|
-
analytics:
|
|
331
|
-
disclosuresAcceptance:
|
|
332
|
-
providerLabels:
|
|
333
|
-
widgetName:
|
|
334
|
-
children: /* @__PURE__ */ C(
|
|
305
|
+
uiFramework: s,
|
|
306
|
+
errorFallback: c,
|
|
307
|
+
onError: u,
|
|
308
|
+
analytics: ee,
|
|
309
|
+
disclosuresAcceptance: te,
|
|
310
|
+
providerLabels: d,
|
|
311
|
+
widgetName: _,
|
|
312
|
+
children: /* @__PURE__ */ C(E, { ...f })
|
|
335
313
|
});
|
|
336
314
|
}
|
|
337
|
-
function
|
|
338
|
-
let { initResponse: t } =
|
|
339
|
-
return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */ C(
|
|
315
|
+
function E(e) {
|
|
316
|
+
let { initResponse: t } = d(), n = t?.userId ?? null, [r, i] = S(n), [a, o] = S(0);
|
|
317
|
+
return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */ C(y, { children: /* @__PURE__ */ C(w, { ...e }, a) }, a);
|
|
340
318
|
}
|
|
341
319
|
//#endregion
|
|
342
320
|
export { T as BankAccountOnboardingWidget, T as default };
|
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js
CHANGED
|
@@ -11,7 +11,4 @@ import { BusinessDetailsPanel as c } from "./index18.js";
|
|
|
11
11
|
import { ABOUT_YOU_PANEL_LABELS_EN as l } from "./index21.js";
|
|
12
12
|
import { AboutYouPanel as u } from "./index22.js";
|
|
13
13
|
import { BusinessDisclosuresSection as d } from "./index23.js";
|
|
14
|
-
|
|
15
|
-
import "./index27.js";
|
|
16
|
-
import { MarketingWidget as f } from "./index28.js";
|
|
17
|
-
export { l as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, u as AboutYouPanel, t as AdditionalOwnersForm, n as BUSINESS_DETAILS_LABELS_EN, s as BUSINESS_DETAILS_PANEL_LABELS_EN, c as BusinessDetailsPanel, d as BusinessDisclosuresSection, f as MarketingWidget, i as PERSONAL_DETAILS_LABELS_EN, o as RESULT_LABELS_EN, a as ResultStep, r as interpolateBankName };
|
|
14
|
+
export { l as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, u as AboutYouPanel, t as AdditionalOwnersForm, n as BUSINESS_DETAILS_LABELS_EN, s as BUSINESS_DETAILS_PANEL_LABELS_EN, c as BusinessDetailsPanel, d as BusinessDisclosuresSection, i as PERSONAL_DETAILS_LABELS_EN, o as RESULT_LABELS_EN, a as ResultStep, r as interpolateBankName };
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
+
import "./index5.js";
|
|
1
2
|
import "./index6.js";
|
|
2
3
|
import "./index7.js";
|
|
3
|
-
import "./
|
|
4
|
+
import "./index9.js";
|
|
4
5
|
import "./index10.js";
|
|
5
6
|
import "./index11.js";
|
|
6
7
|
import "./index12.js";
|
|
7
8
|
import "./index13.js";
|
|
8
9
|
import "./index14.js";
|
|
9
|
-
import "./
|
|
10
|
+
import "./index26.js";
|
|
10
11
|
import "./index27.js";
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
12
|
+
import "./index39.js";
|
|
13
|
+
import "./index41.js";
|
|
14
|
+
import "./index47.js";
|
|
15
|
+
import "./index56.js";
|
|
16
|
+
import "./index58.js";
|
|
17
|
+
import "./index60.js";
|
|
17
18
|
import "./index61.js";
|
|
18
19
|
import "./index62.js";
|
|
19
20
|
import "./index63.js";
|
|
20
21
|
import "./index64.js";
|
|
21
|
-
import "./
|
|
22
|
+
import "./index68.js";
|
|
22
23
|
import "./index69.js";
|
|
23
24
|
import "./index70.js";
|
|
24
25
|
import "./index71.js";
|
|
25
26
|
import "./index72.js";
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
27
|
+
import "./index75.js";
|
|
28
|
+
import "./index81.js";
|
|
28
29
|
import "./index82.js";
|
|
29
30
|
import "./index83.js";
|
|
30
|
-
import "./
|
|
31
|
-
import { BillPayWidget as e } from "./index88.js";
|
|
31
|
+
import { BillPayWidget as e } from "./index87.js";
|
|
32
32
|
export { e as BillPayWidget };
|