@tesouro/embedded-components-react 0.2.254 → 0.2.256
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/dist/core.js +1 -1
- package/dist/index.css +15 -0
- package/dist/index.js +2 -2
- package/dist/lib/BillPayWidget.d.ts +151 -151
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +119 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +40 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +166 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +17 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +99 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +43 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +50 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +42 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +85 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +112 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +51 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +235 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +106 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +35 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +122 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +36 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +74 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +24 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +83 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +205 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +89 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +131 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +45 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +17 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +149 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +73 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +24 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +145 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +93 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +88 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +62 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +58 -58
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +13 -62
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +66 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +11 -109
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +113 -21
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +21 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +32 -29
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useSubEntityForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +232 -220
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +171 -138
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/client/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/core/bodySerializer.gen.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +404 -293
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +75 -45
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index3.js → lib/amountOutputToMajorUnits.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index14.js → lib/apiErrors.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index2.js → lib/coerceAmountValueToMinorUnits.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index4.js → lib/formatMoneyExact.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index5.js → lib/formatPhoneDisplay.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index6.js → lib/getInitials.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index7.js → lib/normalizeAmountOutputCurrencyCode.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index8.js → lib/parseAmountOutputMajorUnits.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index9.js → lib/parseDecimalAmountToMinorUnits.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index10.js → lib/sumAmountOutputsMajorUnits.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index11.js → lib/usStates.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index13.js → lib/widgetDomEvents.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index12.js → lib/widgetTokenManager.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +3593 -3582
- package/package.json +1 -1
|
@@ -3,40 +3,38 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Dialog as e, DialogContent as t, DialogTitle as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { OnboardingShell as i } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
|
|
6
|
+
import { OnboardingShell as r } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
|
|
9
7
|
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useAnalyticsTrack as
|
|
11
|
-
import { WidgetProvider as
|
|
12
|
-
import { getStateOptions as o } from "../../../shared/util/dist/
|
|
13
|
-
import { extractApiErrorMessage as s } from "../../../shared/util/dist/
|
|
14
|
-
import { useRefetchWidget as
|
|
15
|
-
import { getNaicsOptions as
|
|
8
|
+
import { useAnalyticsTrack as i } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
9
|
+
import { WidgetProvider as a } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
10
|
+
import { getStateOptions as o } from "../../../shared/util/dist/lib/usStates.js";
|
|
11
|
+
import { extractApiErrorMessage as s } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
12
|
+
import { useRefetchWidget as c, useWidgetConfig as l } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
13
|
+
import { getNaicsOptions as u } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
|
|
16
14
|
import "../../../shared/feature/dist/index.js";
|
|
17
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as
|
|
18
|
-
import { interpolateBankName as
|
|
19
|
-
import { ResultStep as
|
|
20
|
-
import { MarketingWidget as
|
|
15
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as d } from "../../ui/dist/index4.js";
|
|
16
|
+
import { interpolateBankName as f } from "../../ui/dist/index6.js";
|
|
17
|
+
import { ResultStep as ee } from "../../ui/dist/index11.js";
|
|
18
|
+
import { MarketingWidget as te } from "../../ui/dist/index28.js";
|
|
21
19
|
import "../../ui/dist/index.js";
|
|
22
|
-
import { BusinessDetailsStep as
|
|
23
|
-
import { PersonalDetailsStep as
|
|
24
|
-
import { AdditionalOwnersStep as
|
|
25
|
-
import { buildCreateApplicationBody as
|
|
26
|
-
import { OnboardingAnalyticsEvent as
|
|
27
|
-
import { DEFAULT_LABELS as
|
|
28
|
-
import { ApplicationClientSecretProvider as
|
|
29
|
-
import { useCreateApplication as
|
|
30
|
-
import { useUpdateApplication as
|
|
31
|
-
import { useSubmitApplication as
|
|
32
|
-
import { usePollApplicationCompletion as
|
|
33
|
-
import { OnboardingSuppressionReason as
|
|
34
|
-
import { useOrganizationOnboardingSuppression as
|
|
20
|
+
import { BusinessDetailsStep as ne } from "./index9.js";
|
|
21
|
+
import { PersonalDetailsStep as re } from "./index11.js";
|
|
22
|
+
import { AdditionalOwnersStep as ie } from "./index13.js";
|
|
23
|
+
import { buildCreateApplicationBody as ae, buildUpdateApplicationBody as p } from "./index14.js";
|
|
24
|
+
import { OnboardingAnalyticsEvent as m, WIDGET_NAME as h } from "./index15.js";
|
|
25
|
+
import { DEFAULT_LABELS as g } from "./index16.js";
|
|
26
|
+
import { ApplicationClientSecretProvider as oe, useApplicationClientSecret as se } from "../../data-access/dist/index2.js";
|
|
27
|
+
import { useCreateApplication as ce } from "../../data-access/dist/index4.js";
|
|
28
|
+
import { useUpdateApplication as le } from "../../data-access/dist/index6.js";
|
|
29
|
+
import { useSubmitApplication as ue } from "../../data-access/dist/index7.js";
|
|
30
|
+
import { usePollApplicationCompletion as de } from "../../data-access/dist/index8.js";
|
|
31
|
+
import { OnboardingSuppressionReason as fe } from "../../data-access/dist/index9.js";
|
|
32
|
+
import { useOrganizationOnboardingSuppression as pe } from "../../data-access/dist/index10.js";
|
|
35
33
|
import "../../data-access/dist/index.js";
|
|
36
|
-
import { useCallback as
|
|
37
|
-
import { Fragment as
|
|
34
|
+
import { useCallback as _, useEffect as v, useMemo as y, useRef as me, useState as b } from "react";
|
|
35
|
+
import { Fragment as he, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
38
36
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js
|
|
39
|
-
var
|
|
37
|
+
var ge = {
|
|
40
38
|
companyLegalName: "",
|
|
41
39
|
companyDbaName: "",
|
|
42
40
|
businessAddress: "",
|
|
@@ -50,7 +48,7 @@ var ve = {
|
|
|
50
48
|
naicsCode: "",
|
|
51
49
|
isAuthorized: null,
|
|
52
50
|
isCheckboxChecked: !1
|
|
53
|
-
},
|
|
51
|
+
}, _e = {
|
|
54
52
|
firstName: "",
|
|
55
53
|
lastName: "",
|
|
56
54
|
dateOfBirth: void 0,
|
|
@@ -64,7 +62,7 @@ var ve = {
|
|
|
64
62
|
ownsOver25Percent: null,
|
|
65
63
|
ownershipPercentage: null
|
|
66
64
|
};
|
|
67
|
-
function
|
|
65
|
+
function ve(e, t) {
|
|
68
66
|
if (e === 0) return {
|
|
69
67
|
title: t.businessReviewTitle,
|
|
70
68
|
subtitle: t.businessReviewSubtitle
|
|
@@ -74,7 +72,7 @@ function be(e, t) {
|
|
|
74
72
|
subtitle: t.personalReviewSubtitle
|
|
75
73
|
};
|
|
76
74
|
let n = {
|
|
77
|
-
...
|
|
75
|
+
...d,
|
|
78
76
|
...t.additionalOwners
|
|
79
77
|
};
|
|
80
78
|
return {
|
|
@@ -82,55 +80,55 @@ function be(e, t) {
|
|
|
82
80
|
subtitle: n.subheading
|
|
83
81
|
};
|
|
84
82
|
}
|
|
85
|
-
function
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
let
|
|
91
|
-
...
|
|
92
|
-
...
|
|
83
|
+
function ye({ onEmbeddedOnboardingCompletedSuccessfully: a, onNavigateToDashboard: d, labels: h, initialBusinessDetails: oe, initialPersonalDetails: ye, initialAdditionalOwners: C, bankLogoSrc: be, disclosureLinks: xe, marketingContent: w = null, open: Se, defaultOpen: T, onOpenChange: Ce }) {
|
|
84
|
+
let E = i();
|
|
85
|
+
v(() => {
|
|
86
|
+
E(m.Mounted);
|
|
87
|
+
}, [E]);
|
|
88
|
+
let D = {
|
|
89
|
+
...g,
|
|
90
|
+
...h,
|
|
93
91
|
stepIndicator: {
|
|
94
|
-
...
|
|
95
|
-
...
|
|
92
|
+
...g.stepIndicator,
|
|
93
|
+
...h?.stepIndicator
|
|
96
94
|
},
|
|
97
|
-
businessDetails:
|
|
98
|
-
personalDetails:
|
|
99
|
-
additionalOwners:
|
|
95
|
+
businessDetails: h?.businessDetails ?? {},
|
|
96
|
+
personalDetails: h?.personalDetails ?? {},
|
|
97
|
+
additionalOwners: h?.additionalOwners ?? {},
|
|
100
98
|
result: {
|
|
101
|
-
...
|
|
102
|
-
...
|
|
99
|
+
...g.result,
|
|
100
|
+
...h?.result
|
|
103
101
|
}
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
}, [
|
|
109
|
-
|
|
110
|
-
}, []), ze =
|
|
111
|
-
|
|
112
|
-
}, [j,
|
|
113
|
-
|
|
114
|
-
}, [
|
|
115
|
-
...
|
|
116
|
-
...
|
|
117
|
-
})), [P, We] =
|
|
118
|
-
...
|
|
119
|
-
...
|
|
120
|
-
})), [Ge, Ke] =
|
|
121
|
-
|
|
122
|
-
let et =
|
|
123
|
-
if (
|
|
124
|
-
!Z || !Q || (
|
|
102
|
+
}, O = l().initResponse, { termsHref: we, privacyHref: Te, electronicCommunicationHref: Ee, patriotActHref: De } = xe ?? {}, Oe = w !== null, k = Se === void 0, [ke, A] = b(!1), [Ae, je] = b(!0), [Me, Ne] = b(() => T ?? !1), Pe = be ?? w?.bankLogoSrc ?? void 0, Fe = k ? Me : Se, Ie = T ?? !1, j = _((e) => {
|
|
103
|
+
k && Ne(e), Ce?.(e);
|
|
104
|
+
}, [Ce, k]), Le = _(() => {
|
|
105
|
+
E(m.OpenMarketing), A(!0);
|
|
106
|
+
}, [E]), Re = _(() => {
|
|
107
|
+
A(!1);
|
|
108
|
+
}, []), ze = _(() => {
|
|
109
|
+
E(m.BeginOnboarding), A(!1), j(!0);
|
|
110
|
+
}, [j, E]), Be = _(() => {
|
|
111
|
+
je(!1), a();
|
|
112
|
+
}, [a]), Ve = c(), [M, N] = b(0), [He, Ue] = b(() => ({
|
|
113
|
+
...ge,
|
|
114
|
+
...oe
|
|
115
|
+
})), [P, We] = b(() => ({
|
|
116
|
+
..._e,
|
|
117
|
+
...ye
|
|
118
|
+
})), [Ge, Ke] = b(() => C ?? []), [F, qe] = b(null), [I, Je] = b(null), [L, Ye] = b(null), [R, Xe] = b(null), [Ze, z] = b(null), [B, V] = b(!1), [H, U] = b(null), W = ce(), G = le(), K = ue(), Qe = de(), { setClientSecret: $e } = se(), q = pe(), J = me(null);
|
|
119
|
+
v(() => () => J.current?.abort(), []);
|
|
120
|
+
let et = y(() => u(D.businessDetails.naicsTitles), [D.businessDetails.naicsTitles]), tt = y(() => o(D.businessDetails.stateTitles), [D.businessDetails.stateTitles]), nt = y(() => o(D.personalDetails.stateTitles), [D.personalDetails.stateTitles]), rt = y(() => o(D.additionalOwners.stateTitles), [D.additionalOwners.stateTitles]), Y = B || H !== null, X = O?.status === "ACTIVE" || O?.status === "INACTIVE", it = O?.status === "INVITED", Z = !!O && !Y && (X || it || q.isSuppressed), Q = Z ? X ? fe.UserAlreadyOnboarded : it ? fe.UserInvitedToOrganization : q.reason : null;
|
|
121
|
+
if (v(() => {
|
|
122
|
+
!Z || !Q || (E(m.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
|
|
125
123
|
}, [
|
|
126
124
|
Z,
|
|
127
125
|
Q,
|
|
128
|
-
|
|
129
|
-
]), !
|
|
126
|
+
E
|
|
127
|
+
]), !O || !Y && (Z || !q.isResolved)) return null;
|
|
130
128
|
let at = F?.companyStructure === "SOLE_PROPRIETORSHIP", ot = [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
D.stepIndicator.business,
|
|
130
|
+
D.stepIndicator.personal,
|
|
131
|
+
D.stepIndicator.ownership
|
|
134
132
|
], st = M === 0 ? F : M === 1 ? I : M === 2 ? L : null, $ = W.isPending || G.isPending || K.isPending || B, ct = () => {
|
|
135
133
|
z(null), N((e) => e === 0 ? 0 : e - 1);
|
|
136
134
|
}, lt = () => {
|
|
@@ -143,7 +141,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
143
141
|
try {
|
|
144
142
|
let r = await K.mutateAsync({ path: { id: e } });
|
|
145
143
|
if (t.signal.aborted) return;
|
|
146
|
-
if (!r.id) throw Error(
|
|
144
|
+
if (!r.id) throw Error(D.submitFailedError);
|
|
147
145
|
n = !0, (await Qe(e, { signal: t.signal })).status === "complete" ? (U("success"), Ve(), Be()) : U("pending");
|
|
148
146
|
} catch (e) {
|
|
149
147
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
@@ -159,7 +157,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
159
157
|
if (!F) return;
|
|
160
158
|
let e = R;
|
|
161
159
|
if (!e) {
|
|
162
|
-
let t = await W.mutateAsync({ body:
|
|
160
|
+
let t = await W.mutateAsync({ body: ae(F) });
|
|
163
161
|
e = t.id, Xe(e), t.clientSecret && $e(t.clientSecret);
|
|
164
162
|
}
|
|
165
163
|
N(1);
|
|
@@ -167,7 +165,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
167
165
|
if (!I || !F || !R) return;
|
|
168
166
|
await G.mutateAsync({
|
|
169
167
|
path: { id: R },
|
|
170
|
-
body:
|
|
168
|
+
body: p({
|
|
171
169
|
businessDetails: F,
|
|
172
170
|
applicant: I
|
|
173
171
|
})
|
|
@@ -176,28 +174,28 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
176
174
|
if (!L || !R) return;
|
|
177
175
|
await G.mutateAsync({
|
|
178
176
|
path: { id: R },
|
|
179
|
-
body:
|
|
177
|
+
body: p({ businessOwners: L })
|
|
180
178
|
}), await ut(R);
|
|
181
179
|
}
|
|
182
180
|
} catch (e) {
|
|
183
|
-
let t = s(e) ?? (e instanceof Error ? e.message : void 0) ??
|
|
181
|
+
let t = s(e) ?? (e instanceof Error ? e.message : void 0) ?? D.genericRetryError;
|
|
184
182
|
z(t);
|
|
185
183
|
}
|
|
186
|
-
}, ft =
|
|
184
|
+
}, ft = ve(Math.min(M, 2), D), pt = O.bankName?.trim() || D.fallbackBankName, mt = f(D.shellFdicDisclaimer, pt);
|
|
187
185
|
if (Y) {
|
|
188
|
-
let r = F?.companyLegalName ?? "", i =
|
|
189
|
-
...
|
|
190
|
-
...
|
|
186
|
+
let r = F?.companyLegalName ?? "", i = O.bankName?.trim() || D.fallbackBankName, a = H ?? "pending", o = a === "success", s = {
|
|
187
|
+
...g.result,
|
|
188
|
+
...D.result
|
|
191
189
|
};
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
open:
|
|
190
|
+
return /* @__PURE__ */ x(e, {
|
|
191
|
+
open: Fe,
|
|
194
192
|
onOpenChange: j,
|
|
195
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ S(t, {
|
|
196
194
|
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",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ x(n, {
|
|
198
196
|
className: "ttw:sr-only",
|
|
199
|
-
children:
|
|
200
|
-
}), /* @__PURE__ */
|
|
197
|
+
children: D.modalTitle
|
|
198
|
+
}), /* @__PURE__ */ x(ee, {
|
|
201
199
|
status: a,
|
|
202
200
|
isLoading: B,
|
|
203
201
|
loadingMessage: s.loadingMessage,
|
|
@@ -207,17 +205,17 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
207
205
|
followUpEmail: I?.workEmail ?? "",
|
|
208
206
|
emailBoxLead: s.pendingEmailBoxLead,
|
|
209
207
|
navigateToDashboardLabel: s.navigateToDashboard,
|
|
210
|
-
bankLogoSrc:
|
|
211
|
-
bankLogoAlt:
|
|
212
|
-
fdicDisclaimer:
|
|
213
|
-
onNavigateToDashboard:
|
|
208
|
+
bankLogoSrc: Pe,
|
|
209
|
+
bankLogoAlt: f(s.bankLogoAlt, i),
|
|
210
|
+
fdicDisclaimer: f(s.fdicDisclaimer, i),
|
|
211
|
+
onNavigateToDashboard: d
|
|
214
212
|
})]
|
|
215
213
|
})
|
|
216
214
|
});
|
|
217
215
|
}
|
|
218
|
-
let ht = M === 2 ?
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
open:
|
|
216
|
+
let ht = M === 2 ? D.submit : D.next, gt = st === null || $;
|
|
217
|
+
return /* @__PURE__ */ S(he, { children: [Oe && Ae && w ? /* @__PURE__ */ x(te, {
|
|
218
|
+
open: ke,
|
|
221
219
|
isVisible: !0,
|
|
222
220
|
vspLogo: w.vspLogo,
|
|
223
221
|
bankingText: w.bankingText,
|
|
@@ -231,8 +229,8 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
231
229
|
onOpenMarketingModal: Le,
|
|
232
230
|
onCloseMarketingModal: Re,
|
|
233
231
|
onPrimaryCtaClick: ze
|
|
234
|
-
}) : null, /* @__PURE__ */
|
|
235
|
-
open:
|
|
232
|
+
}) : null, /* @__PURE__ */ S(r, {
|
|
233
|
+
open: Fe,
|
|
236
234
|
defaultOpen: Ie,
|
|
237
235
|
onOpenChange: j,
|
|
238
236
|
title: ft.title,
|
|
@@ -250,33 +248,33 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
250
248
|
nextIcon: null,
|
|
251
249
|
errorMessage: Ze,
|
|
252
250
|
labels: {
|
|
253
|
-
backButton: M === 0 ?
|
|
254
|
-
cancelButton:
|
|
251
|
+
backButton: M === 0 ? D.cancel : D.back,
|
|
252
|
+
cancelButton: D.cancel
|
|
255
253
|
},
|
|
256
254
|
children: [
|
|
257
|
-
M === 0 ? /* @__PURE__ */
|
|
255
|
+
M === 0 ? /* @__PURE__ */ x(ne, {
|
|
258
256
|
value: He,
|
|
259
257
|
onValueChange: Ue,
|
|
260
258
|
onSnapshotChange: qe,
|
|
261
259
|
naicsOptions: et,
|
|
262
260
|
stateOptions: tt,
|
|
263
261
|
isSubmitting: $,
|
|
264
|
-
labels:
|
|
262
|
+
labels: D.businessDetails,
|
|
265
263
|
bankName: pt,
|
|
266
|
-
termsHref:
|
|
267
|
-
privacyHref:
|
|
268
|
-
electronicCommunicationHref:
|
|
269
|
-
patriotActHref:
|
|
264
|
+
termsHref: we,
|
|
265
|
+
privacyHref: Te,
|
|
266
|
+
electronicCommunicationHref: Ee,
|
|
267
|
+
patriotActHref: De
|
|
270
268
|
}, "business") : null,
|
|
271
|
-
M === 1 ? /* @__PURE__ */
|
|
269
|
+
M === 1 ? /* @__PURE__ */ x(re, {
|
|
272
270
|
value: P,
|
|
273
271
|
onValueChange: We,
|
|
274
272
|
onSnapshotChange: Je,
|
|
275
273
|
stateOptions: nt,
|
|
276
274
|
isSubmitting: $,
|
|
277
|
-
labels:
|
|
275
|
+
labels: D.personalDetails
|
|
278
276
|
}, "personal") : null,
|
|
279
|
-
M === 2 ? /* @__PURE__ */
|
|
277
|
+
M === 2 ? /* @__PURE__ */ x(ie, {
|
|
280
278
|
owners: Ge,
|
|
281
279
|
onOwnersChange: Ke,
|
|
282
280
|
primaryOwnerName: `${P.firstName} ${P.lastName}`.trim(),
|
|
@@ -284,30 +282,30 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
|
|
|
284
282
|
stateOptions: rt,
|
|
285
283
|
onSnapshotChange: Ye,
|
|
286
284
|
isSubmitting: $,
|
|
287
|
-
labels:
|
|
285
|
+
labels: D.additionalOwners
|
|
288
286
|
}) : null
|
|
289
287
|
]
|
|
290
288
|
})] });
|
|
291
289
|
}
|
|
292
|
-
function C({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, linkComponent: i, implementation:
|
|
293
|
-
return /* @__PURE__ */
|
|
290
|
+
function C({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, linkComponent: i, implementation: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, ...d }) {
|
|
291
|
+
return /* @__PURE__ */ x(a, {
|
|
294
292
|
baseUrl: e,
|
|
295
293
|
widgetToken: t,
|
|
296
294
|
organizationId: n,
|
|
297
295
|
configClient: r,
|
|
298
296
|
linkComponent: i,
|
|
299
|
-
implementation:
|
|
300
|
-
uiFramework:
|
|
301
|
-
errorFallback:
|
|
302
|
-
onError:
|
|
303
|
-
analytics:
|
|
304
|
-
widgetName:
|
|
305
|
-
children: /* @__PURE__ */
|
|
297
|
+
implementation: o,
|
|
298
|
+
uiFramework: s,
|
|
299
|
+
errorFallback: c,
|
|
300
|
+
onError: l,
|
|
301
|
+
analytics: u,
|
|
302
|
+
widgetName: h,
|
|
303
|
+
children: /* @__PURE__ */ x(be, { ...d })
|
|
306
304
|
});
|
|
307
305
|
}
|
|
308
|
-
function
|
|
309
|
-
let {
|
|
310
|
-
return /* @__PURE__ */
|
|
306
|
+
function be(e) {
|
|
307
|
+
let { initResponse: t } = l(), n = t?.userId ?? null, [r, i] = b(n), [a, o] = b(0);
|
|
308
|
+
return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */ x(oe, { children: /* @__PURE__ */ x(ye, { ...e }, a) }, a);
|
|
311
309
|
}
|
|
312
310
|
//#endregion
|
|
313
311
|
export { C as BankAccountOnboardingWidget, C as default };
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useAllBankAccountsQuery as t } from "../../../shared/data-access/dist/l
|
|
|
7
7
|
import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
8
8
|
import "../../../shared/ui/dist/index.js";
|
|
9
9
|
import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
10
|
-
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidgetDomEvent as te } from "../../../shared/util/dist/
|
|
10
|
+
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidgetDomEvent as te } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
11
11
|
import { useWidgetConfig as ne, useWidgetError as re, useWidgetLoading as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
12
|
import "../../../shared/feature/dist/index.js";
|
|
13
13
|
import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
3
|
+
import "./index3.js";
|
|
4
|
+
import "./index5.js";
|
|
5
|
+
import { useAllPayableLineItemsQuery as t, useReplacePayableLineItemsMutation as n } from "./index6.js";
|
|
6
|
+
import { useAttachPayableFileMutation as r, useCreatePayableMutation as i, useDeletePayableFileMutation as a, useSubmitPayableForApprovalMutation as o, useUpdatePayableMutation as s, useUploadPayableFromFileMutation as c, useValidatePayableMutation as l } from "./index7.js";
|
|
7
|
+
import { usePayableOcrQueries as u } from "./index9.js";
|
|
8
|
+
import { usePayableQuery as d, usePayablesQuery as f } from "./index10.js";
|
|
9
|
+
import { usePayableSuggestionsQuery as p } from "./index11.js";
|
|
10
|
+
export { t as useAllPayableLineItemsQuery, r as useAttachPayableFileMutation, i as useCreatePayableMutation, a as useDeletePayableFileMutation, e as useEmbedApi, u as usePayableOcrQueries, d as usePayableQuery, p as usePayableSuggestionsQuery, f as usePayablesQuery, n as useReplacePayableLineItemsMutation, o as useSubmitPayableForApprovalMutation, s as useUpdatePayableMutation, c as useUploadPayableFromFileMutation, l as useValidatePayableMutation };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getPayablesIdOptions as n, getPayablesOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { payableOcrQueryOptions as a } from "./index8.js";
|
|
11
|
+
import { useQuery as o } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
|
|
13
|
+
function s({ enabled: n, ...a } = {}) {
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = e(), d = !!(c && l) && (n === !0 || n === void 0), f = r({
|
|
15
|
+
client: s,
|
|
16
|
+
headers: t(c),
|
|
17
|
+
query: a
|
|
18
|
+
});
|
|
19
|
+
return o({
|
|
20
|
+
...i(f, u),
|
|
21
|
+
enabled: d
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function c(r, { enabled: s = !0, pollWhileOcrProcessing: c = !1 } = {}) {
|
|
25
|
+
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = !!(u && d && r) && s, m = c ? a({
|
|
26
|
+
client: l,
|
|
27
|
+
organizationId: u,
|
|
28
|
+
payableId: r ?? ""
|
|
29
|
+
}) : n({
|
|
30
|
+
client: l,
|
|
31
|
+
headers: t(u),
|
|
32
|
+
path: { payable_id: r ?? "" }
|
|
33
|
+
});
|
|
34
|
+
return o({
|
|
35
|
+
...i(m, f),
|
|
36
|
+
enabled: p
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { c as usePayableQuery, s as usePayablesQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
|
|
13
|
+
function o(o, { enabled: s = !0 } = {}) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: t(l),
|
|
17
|
+
path: { payable_id: o ?? "" }
|
|
18
|
+
}), { queryKey: m, queryFn: h } = r(p, d);
|
|
19
|
+
return a({
|
|
20
|
+
queryKey: m,
|
|
21
|
+
enabled: f,
|
|
22
|
+
retry: !1,
|
|
23
|
+
queryFn: async (e) => {
|
|
24
|
+
try {
|
|
25
|
+
if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
|
|
26
|
+
return await h(e);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
if (i(e)) return null;
|
|
29
|
+
throw e;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
select: (e) => e ?? void 0
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as usePayableSuggestionsQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getApprovalRequestsQueryKey as t, getPayablesAnalyticsQueryKey as n, getPayablesIdHistoryQueryKey as r, getPayablesIdLineItemsQueryKey as i, getPayablesIdQueryKey as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
3
|
+
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js
|
|
5
|
+
var s = ({ client: t, organizationId: n }) => o({
|
|
6
|
+
client: t,
|
|
7
|
+
headers: e(n)
|
|
8
|
+
}), c = ({ client: n, organizationId: r }) => t({
|
|
9
|
+
client: n,
|
|
10
|
+
headers: e(r)
|
|
11
|
+
}), l = ({ client: t, organizationId: r }) => n({
|
|
12
|
+
client: t,
|
|
13
|
+
headers: e(r)
|
|
14
|
+
}), u = ({ client: t, organizationId: n, payableId: r }) => a({
|
|
15
|
+
client: t,
|
|
16
|
+
headers: e(n),
|
|
17
|
+
path: { payable_id: r }
|
|
18
|
+
}), d = ({ client: t, organizationId: n, payableId: i }) => r({
|
|
19
|
+
client: t,
|
|
20
|
+
headers: e(n),
|
|
21
|
+
path: { payable_id: i }
|
|
22
|
+
}), f = ({ client: t, organizationId: n, payableId: r }) => i({
|
|
23
|
+
client: t,
|
|
24
|
+
headers: e(n),
|
|
25
|
+
path: { payable_id: r }
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { c as approvalRequestsInvalidationKey, d as payableHistoryInvalidationKey, u as payableInvalidationKey, f as payableLineItemsInvalidationKey, l as payablesAnalyticsInvalidationKey, s as payablesInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
3
|
+
import { approvalRequestsInvalidationKey as t, payableHistoryInvalidationKey as n, payableInvalidationKey as r, payableLineItemsInvalidationKey as i, payablesAnalyticsInvalidationKey as a, payablesInvalidationKey as o } from "./index3.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js
|
|
5
|
+
async function s({ client: s, organizationId: c, payableId: l, includeLineItems: u, includeApprovalRequests: d }) {
|
|
6
|
+
let f = {
|
|
7
|
+
client: s,
|
|
8
|
+
organizationId: c
|
|
9
|
+
}, p = l ? {
|
|
10
|
+
...f,
|
|
11
|
+
payableId: l
|
|
12
|
+
} : void 0, m = [
|
|
13
|
+
o(f),
|
|
14
|
+
a(f),
|
|
15
|
+
...d ? [t(f)] : [],
|
|
16
|
+
...p ? [r(p), n(p)] : [],
|
|
17
|
+
...p && u ? [i(p)] : []
|
|
18
|
+
];
|
|
19
|
+
await Promise.all(m.map((t) => e(t)));
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { s as invalidatePayableQueries };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getPayablesIdLineItems as n, putPayablesIdLineItems as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPayablesIdLineItemsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
11
|
+
import "../../../shared/data-access/dist/index.js";
|
|
12
|
+
import { invalidatePayableQueries as l } from "./index4.js";
|
|
13
|
+
import { useMemo as u } from "react";
|
|
14
|
+
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
15
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
|
|
16
|
+
var p = 100;
|
|
17
|
+
function m(r, { enabled: l } = {}) {
|
|
18
|
+
let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && r) && l !== !1, y = i({
|
|
19
|
+
client: f,
|
|
20
|
+
headers: _,
|
|
21
|
+
path: { payable_id: r ?? "" },
|
|
22
|
+
query: { limit: p }
|
|
23
|
+
}), b = d({
|
|
24
|
+
queryKey: [...a(y, g).queryKey, "all"],
|
|
25
|
+
enabled: v,
|
|
26
|
+
initialPageParam: void 0,
|
|
27
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
28
|
+
let { data: i } = await n({
|
|
29
|
+
client: f,
|
|
30
|
+
headers: _,
|
|
31
|
+
path: { payable_id: r ?? "" },
|
|
32
|
+
query: {
|
|
33
|
+
limit: p,
|
|
34
|
+
...t ? { pagination_token: t } : {}
|
|
35
|
+
},
|
|
36
|
+
signal: e,
|
|
37
|
+
throwOnError: !0
|
|
38
|
+
});
|
|
39
|
+
return i;
|
|
40
|
+
},
|
|
41
|
+
getNextPageParam: o
|
|
42
|
+
});
|
|
43
|
+
c(b, v);
|
|
44
|
+
let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
|
|
45
|
+
return {
|
|
46
|
+
...b,
|
|
47
|
+
lineItems: x,
|
|
48
|
+
isResolving: s(b)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function h() {
|
|
52
|
+
let { client: n, organizationId: i } = e();
|
|
53
|
+
return f({
|
|
54
|
+
mutationFn: async ({ path: e, body: a }) => {
|
|
55
|
+
let { data: o } = await r({
|
|
56
|
+
client: n,
|
|
57
|
+
headers: t(i),
|
|
58
|
+
path: e,
|
|
59
|
+
body: a,
|
|
60
|
+
throwOnError: !0
|
|
61
|
+
});
|
|
62
|
+
return o;
|
|
63
|
+
},
|
|
64
|
+
onSuccess: async (e, t) => {
|
|
65
|
+
await l({
|
|
66
|
+
client: n,
|
|
67
|
+
organizationId: i,
|
|
68
|
+
payableId: t.path.payable_id,
|
|
69
|
+
includeLineItems: !0
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
|