@tesouro/embedded-components-react 0.5.225 → 0.5.227
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 +21 -21
- package/dist/index.d.ts +23 -2
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +23 -2
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +41 -39
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +50 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +51 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +20 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +17 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +220 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +145 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +46 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +113 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +58 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +98 -225
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +111 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +225 -462
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +34 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +627 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +39 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -112
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +75 -310
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +124 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +324 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +20 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +56 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +33 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +184 -162
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +78 -69
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -39
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +210 -199
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +60 -52
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
- 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/product-catalog/data-access/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js
CHANGED
|
@@ -4,281 +4,283 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { getInitials as t } from "../../../shared/util/dist/lib/getInitials.js";
|
|
7
|
-
import { TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as n, emitWidgetDomEvent as
|
|
8
|
-
import { extractApiErrorMessage as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as n, emitWidgetDomEvent as r } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
8
|
+
import { extractApiErrorMessage as ee } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
9
|
+
import { OrganizationStatus as te, isOrganizationOnItsWay as ne } from "../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
10
|
+
import { useEmbedApi as re } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
11
|
+
import { Scope as i } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
12
|
+
import { useAllOrganizationRolesQuery as ie } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
13
|
+
import { useAllOrganizationUsersQuery as ae } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
12
14
|
import "../../../shared/data-access/dist/index.js";
|
|
13
15
|
import "../../../shared/ui/dist/index.js";
|
|
14
|
-
import { useAnalyticsTrack as
|
|
15
|
-
import { useWidgetConfig as
|
|
16
|
+
import { useAnalyticsTrack as oe } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
17
|
+
import { useWidgetConfig as se, useWidgetError as ce, useWidgetLoading as le } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
16
18
|
import "../../../shared/feature/dist/index.js";
|
|
17
|
-
import { filterRolesForOrganization as
|
|
18
|
-
import { filterUsersForOrganization as
|
|
19
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
20
|
-
import { LinkedAccountsWidgetAnalyticsEvent as
|
|
21
|
-
import { EMPTY_CONNECT_FORM as
|
|
22
|
-
import { getLinkedAccountsPermissions as
|
|
23
|
-
import { toAccountRows as
|
|
24
|
-
import { useConnectExternalBankAccountMutation as
|
|
25
|
-
import { useExternalBankAccountsQuery as
|
|
26
|
-
import { useGrantExternalBankAccountAccessMutation as
|
|
27
|
-
import { useLinkExternalBankAccountMutation as
|
|
28
|
-
import { useUnlinkExternalBankAccountMutation as
|
|
29
|
-
import { useUpdateExternalBankAccountMutation as
|
|
30
|
-
import { useValidateExternalBankAccountMutation as
|
|
19
|
+
import { filterRolesForOrganization as ue } from "../../../../shared/util-validation/dist/index6.js";
|
|
20
|
+
import { filterUsersForOrganization as de } from "../../../../shared/util-validation/dist/index7.js";
|
|
21
|
+
import { DEFAULT_FEATURE_LABELS as fe } from "./index4.js";
|
|
22
|
+
import { LinkedAccountsWidgetAnalyticsEvent as a } from "./index2.js";
|
|
23
|
+
import { EMPTY_CONNECT_FORM as o, EMPTY_EDIT_FORM as pe, EMPTY_VERIFY_FORM as me, isConnectStep1Valid as he, isRoutingNumberValid as ge, isVerifyAmountInRange as _e, isVerifyFormValid as ve, parseVerifyAmountToMinorUnits as ye, sanitizeRoutingNumberInput as be, toEditForm as xe, toUpdateBody as Se } from "./index3.js";
|
|
24
|
+
import { getLinkedAccountsPermissions as Ce } from "./index5.js";
|
|
25
|
+
import { toAccountRows as we } from "./index6.js";
|
|
26
|
+
import { useConnectExternalBankAccountMutation as Te } from "../../data-access/dist/index3.js";
|
|
27
|
+
import { useExternalBankAccountsQuery as Ee } from "../../data-access/dist/index4.js";
|
|
28
|
+
import { useGrantExternalBankAccountAccessMutation as De } from "../../data-access/dist/index5.js";
|
|
29
|
+
import { useLinkExternalBankAccountMutation as Oe } from "../../data-access/dist/index6.js";
|
|
30
|
+
import { useUnlinkExternalBankAccountMutation as ke } from "../../data-access/dist/index9.js";
|
|
31
|
+
import { useUpdateExternalBankAccountMutation as Ae } from "../../data-access/dist/index10.js";
|
|
32
|
+
import { useValidateExternalBankAccountMutation as je } from "../../data-access/dist/index11.js";
|
|
31
33
|
import "../../data-access/dist/index.js";
|
|
32
|
-
import { useAdminEligibleUserIds as
|
|
33
|
-
import { toAccessRows as
|
|
34
|
-
import { DEFAULT_LABELS as
|
|
34
|
+
import { useAdminEligibleUserIds as Me } from "./index7.js";
|
|
35
|
+
import { toAccessRows as Ne, toOrganizationRoleOptions as Pe, toTeamMembers as Fe } from "./index8.js";
|
|
36
|
+
import { DEFAULT_LABELS as Ie } from "../../ui/dist/index15.js";
|
|
35
37
|
import "../../ui/dist/index.js";
|
|
36
|
-
import { useCallback as
|
|
38
|
+
import { useCallback as Le, useEffect as Re, useMemo as s, useState as c } from "react";
|
|
37
39
|
//#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js
|
|
38
|
-
function
|
|
40
|
+
function ze(e) {
|
|
39
41
|
let t = e;
|
|
40
42
|
return typeof e == "object" && !!e && "verificationStatus" in e && t.verificationStatus === "VERIFIED";
|
|
41
43
|
}
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
+
var l = "tesouro.linkedAccounts.locallySentMicroDepositAccountIds.v1";
|
|
45
|
+
function Be() {
|
|
44
46
|
if (typeof window > "u") return /* @__PURE__ */ new Set();
|
|
45
47
|
try {
|
|
46
|
-
let e = window.sessionStorage.getItem(
|
|
47
|
-
return new Set(Array.isArray(t) ? t.filter(
|
|
48
|
+
let e = window.sessionStorage.getItem(l), t = e ? JSON.parse(e) : [];
|
|
49
|
+
return new Set(Array.isArray(t) ? t.filter(u) : []);
|
|
48
50
|
} catch {
|
|
49
51
|
return /* @__PURE__ */ new Set();
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
function
|
|
54
|
+
function u(e) {
|
|
53
55
|
return typeof e == "string";
|
|
54
56
|
}
|
|
55
|
-
function
|
|
57
|
+
function d(e) {
|
|
56
58
|
if (!(typeof window > "u")) try {
|
|
57
|
-
window.sessionStorage.setItem(
|
|
59
|
+
window.sessionStorage.setItem(l, JSON.stringify([...e]));
|
|
58
60
|
} catch {}
|
|
59
61
|
}
|
|
60
|
-
function
|
|
62
|
+
function f(e, t) {
|
|
61
63
|
let n = new Set(e).add(t);
|
|
62
|
-
return
|
|
64
|
+
return d(n), n;
|
|
63
65
|
}
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
let
|
|
67
|
-
...
|
|
68
|
-
...
|
|
69
|
-
},
|
|
70
|
-
...
|
|
71
|
-
...
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
let
|
|
66
|
+
var Ve = i.ExternalBankAccountWriteOrg;
|
|
67
|
+
function p({ labels: i, featureLabels: l }) {
|
|
68
|
+
let u = {
|
|
69
|
+
...Ie,
|
|
70
|
+
...i
|
|
71
|
+
}, d = {
|
|
72
|
+
...fe,
|
|
73
|
+
...l
|
|
74
|
+
}, p = oe(), { organizationId: m, widgetToken: h, initResponse: g } = se(), He = le(), { organizationStatus: _ } = re(), Ue = ne(_), v = !!ce(), y = !!(m && h), We = y || !!h && _ === te.Rotating, b = s(() => Ce(g?.scopes), [g?.scopes]), x = We && b.canRead && !!g, [S, C] = c(), [w, Ge] = c(!1), [T, E] = c(1), [D, O] = c([]), [k, A] = c(), [Ke, j] = c(), [qe, Je] = c(Be), [Ye, M] = c(!1), [Xe, Ze] = c(!1), [Qe, N] = c(!1), [$e, P] = c(!1), [F, I] = c(), [L, et] = c(o), [tt, nt] = c(pe), [R, rt] = c(me);
|
|
75
|
+
Re(() => {
|
|
76
|
+
p(a.Mounted);
|
|
77
|
+
}, [p]);
|
|
78
|
+
let z = Ee({
|
|
77
79
|
limit: 100,
|
|
78
|
-
enabled:
|
|
79
|
-
}),
|
|
80
|
-
enabled:
|
|
81
|
-
permissionKey:
|
|
82
|
-
organizationId:
|
|
83
|
-
}),
|
|
84
|
-
let e =
|
|
85
|
-
organizationId:
|
|
86
|
-
organizationTypes:
|
|
87
|
-
}) : e, n =
|
|
88
|
-
return
|
|
80
|
+
enabled: x
|
|
81
|
+
}), B = Te(), V = De(), H = Ae(), U = ke(), W = Oe(), G = je(), K = w && T >= 2, q = ae({ enabled: K }), J = ie({ enabled: K }), { userIds: it, isResolving: at, isError: ot } = Me({
|
|
82
|
+
enabled: K,
|
|
83
|
+
permissionKey: Ve,
|
|
84
|
+
organizationId: m
|
|
85
|
+
}), Y = s(() => {
|
|
86
|
+
let e = J.data?.data ?? [], t = m ? ue(e, {
|
|
87
|
+
organizationId: m,
|
|
88
|
+
organizationTypes: g?.organizationTypes ?? []
|
|
89
|
+
}) : e, n = de(q.data?.data ?? [], m);
|
|
90
|
+
return Fe(n, Pe(t), it);
|
|
89
91
|
}, [
|
|
90
|
-
|
|
91
|
-
Y.data?.data,
|
|
92
|
+
it,
|
|
92
93
|
J.data?.data,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
q.data?.data,
|
|
95
|
+
m,
|
|
96
|
+
g?.organizationTypes
|
|
97
|
+
]), st = q.isLoading || q.isFetchingNextPage || !!q.hasNextPage || J.isResolving || at, ct = !st && !q.isError && !ot, X = x ? z.data?.data ?? [] : [], Z = s(() => X.map((e) => e.verificationStatus === "UNVERIFIED" && qe.has(e.id) ? {
|
|
96
98
|
...e,
|
|
97
99
|
verificationStatus: "VERIFICATION_SENT"
|
|
98
|
-
} : e), [
|
|
99
|
-
|
|
100
|
+
} : e), [X, qe]), lt = [.../* @__PURE__ */ new Set([...Y.filter((e) => e.locked).map((e) => e.id), ...D])], ut = Le((e) => {
|
|
101
|
+
B.reset(), V.reset(), W.reset(), et({
|
|
100
102
|
...e,
|
|
101
|
-
routingNumber:
|
|
103
|
+
routingNumber: be(e.routingNumber)
|
|
102
104
|
});
|
|
103
105
|
}, [
|
|
106
|
+
B,
|
|
104
107
|
V,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
it();
|
|
108
|
+
W
|
|
109
|
+
]), dt = () => {
|
|
110
|
+
E(3), r(n);
|
|
111
|
+
}, ft = (e) => {
|
|
112
|
+
if (!b.canMicroDeposit) {
|
|
113
|
+
dt();
|
|
112
114
|
return;
|
|
113
115
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
j("connect"), W.mutate({ path: { id: e } }, { onSuccess: () => {
|
|
117
|
+
j(void 0), Je((t) => f(t, e)), p(a.AccountLinked, { accountId: e }), dt();
|
|
116
118
|
} });
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
+
}, pt = (e) => {
|
|
120
|
+
V.mutate({
|
|
119
121
|
path: { id: e },
|
|
120
|
-
body: { userIds:
|
|
121
|
-
}, { onSuccess: () =>
|
|
122
|
-
},
|
|
123
|
-
if (
|
|
124
|
-
if (
|
|
125
|
-
if (!
|
|
126
|
-
|
|
122
|
+
body: { userIds: lt }
|
|
123
|
+
}, { onSuccess: () => ft(e) });
|
|
124
|
+
}, mt = () => {
|
|
125
|
+
if (y && b.canWrite) {
|
|
126
|
+
if (T === 1) {
|
|
127
|
+
if (!he(L)) return;
|
|
128
|
+
E(2);
|
|
127
129
|
return;
|
|
128
130
|
}
|
|
129
|
-
if (
|
|
130
|
-
if (
|
|
131
|
-
|
|
131
|
+
if (T === 2 && ct) {
|
|
132
|
+
if (k) {
|
|
133
|
+
pt(k.id);
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
|
-
|
|
135
|
-
nickname:
|
|
136
|
-
accountNumber:
|
|
137
|
-
routingNumber:
|
|
138
|
-
nameOnAccount:
|
|
139
|
-
type:
|
|
136
|
+
B.mutate({ body: {
|
|
137
|
+
nickname: L.nickname.trim(),
|
|
138
|
+
accountNumber: L.accountNumber.trim(),
|
|
139
|
+
routingNumber: L.routingNumber.trim(),
|
|
140
|
+
nameOnAccount: L.nickname.trim(),
|
|
141
|
+
type: L.type
|
|
140
142
|
} }, { onSuccess: (e) => {
|
|
141
|
-
|
|
143
|
+
p(a.AccountConnected, { accountId: e?.id }), A(e), e?.id && pt(e.id);
|
|
142
144
|
} });
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
(!e ||
|
|
151
|
-
},
|
|
152
|
-
if (!
|
|
153
|
-
let t =
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
(!e ||
|
|
157
|
-
},
|
|
158
|
-
if (!
|
|
159
|
-
let t =
|
|
160
|
-
Object.keys(n).length !== 0 &&
|
|
161
|
-
path: { id:
|
|
147
|
+
}, ht = () => {
|
|
148
|
+
T === 2 && E(1);
|
|
149
|
+
}, gt = (e, t) => {
|
|
150
|
+
Y.find((t) => t.id === e)?.locked || O((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
|
|
151
|
+
}, _t = (e) => {
|
|
152
|
+
(!e || y) && (!e || b.canWrite) && (e && (E(1), et(o), O([]), A(void 0), j(void 0), B.reset(), V.reset(), W.reset()), Ge(e));
|
|
153
|
+
}, vt = (e) => {
|
|
154
|
+
if (!y || !b.canWrite) return;
|
|
155
|
+
let t = X.find((t) => t.id === e);
|
|
156
|
+
C(e), nt(xe(t)), M(!0);
|
|
157
|
+
}, yt = (e) => {
|
|
158
|
+
(!e || y) && (!e || b.canWrite) && M(e);
|
|
159
|
+
}, bt = () => {
|
|
160
|
+
if (!y || !b.canWrite || !S) return;
|
|
161
|
+
let t = X.find((e) => e.id === S), n = Se(tt, t);
|
|
162
|
+
Object.keys(n).length !== 0 && H.mutate({
|
|
163
|
+
path: { id: S },
|
|
162
164
|
body: n
|
|
163
165
|
}, { onSuccess: () => {
|
|
164
|
-
|
|
166
|
+
p(a.AccountUpdated, { accountId: S }), e.success(d.editSuccessToast), M(!1);
|
|
165
167
|
} });
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
(!e ||
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
if (!
|
|
174
|
-
let e =
|
|
175
|
-
e !== null && t !== null && (
|
|
176
|
-
path: { id:
|
|
168
|
+
}, xt = (e) => {
|
|
169
|
+
y && b.canWrite && (C(e), rt(me), P(!1), N(!1), Ze(!0));
|
|
170
|
+
}, St = (e) => {
|
|
171
|
+
(!e || y) && (!e || b.canWrite) && (e || (P(!1), N(!1)), Ze(e));
|
|
172
|
+
}, Ct = (e) => {
|
|
173
|
+
G.reset(), P(!1), rt(e);
|
|
174
|
+
}, wt = () => {
|
|
175
|
+
if (!y || !b.canWrite || !S || !ve(R)) return;
|
|
176
|
+
let e = ye(R.firstAmount), t = ye(R.secondAmount);
|
|
177
|
+
e !== null && t !== null && (P(!1), G.mutate({
|
|
178
|
+
path: { id: S },
|
|
177
179
|
body: {
|
|
178
180
|
firstAmount: e,
|
|
179
181
|
secondAmount: t
|
|
180
182
|
}
|
|
181
183
|
}, { onSuccess: (e) => {
|
|
182
|
-
if (!
|
|
183
|
-
|
|
184
|
+
if (!ze(e)) {
|
|
185
|
+
P(!0);
|
|
184
186
|
return;
|
|
185
187
|
}
|
|
186
|
-
|
|
188
|
+
p(a.AccountVerified, { accountId: S }), r("tesouro-new-external-bank-account-linked-success"), N(!0);
|
|
187
189
|
} }));
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
}, Tt = (e) => {
|
|
191
|
+
y && b.canMicroDeposit && (j("row"), W.mutate({ path: { id: e } }, { onSuccess: () => {
|
|
192
|
+
j(void 0), Je((t) => f(t, e)), p(a.AccountLinked, { accountId: e });
|
|
191
193
|
} }));
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
e ||
|
|
196
|
-
},
|
|
197
|
-
if (!
|
|
198
|
-
let t =
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
}, Et = (e) => {
|
|
195
|
+
y && b.canWrite && I(e);
|
|
196
|
+
}, Dt = (e) => {
|
|
197
|
+
e || I(void 0);
|
|
198
|
+
}, Ot = () => {
|
|
199
|
+
if (!y || !b.canWrite || !F) return;
|
|
200
|
+
let t = F;
|
|
201
|
+
U.mutate({ path: { id: t } }, { onSuccess: () => {
|
|
202
|
+
p(a.AccountUnlinked, { accountId: t }), e.success(d.unlinkSuccessToast), I(void 0);
|
|
201
203
|
} });
|
|
202
|
-
},
|
|
203
|
-
selectedUserIds:
|
|
204
|
-
disabled:
|
|
205
|
-
fallbackTooltip:
|
|
206
|
-
onUserToggle:
|
|
207
|
-
}),
|
|
208
|
-
nickname:
|
|
209
|
-
maskedAccountNumber:
|
|
210
|
-
users:
|
|
204
|
+
}, kt = B.isPending || V.isPending || H.isPending || G.isPending || U.isPending || W.isPending, At = b.canWrite, Q = !y || kt, $ = W.isError && Ke === "connect", jt = Ne(Y, {
|
|
205
|
+
selectedUserIds: D,
|
|
206
|
+
disabled: Q || !At,
|
|
207
|
+
fallbackTooltip: u.teamMemberAccessTooltip,
|
|
208
|
+
onUserToggle: gt
|
|
209
|
+
}), Mt = Y.filter((e) => e.locked).length + D.length, Nt = Y.filter((e) => e.locked || D.includes(e.id)), Pt = k ? {
|
|
210
|
+
nickname: k.nickname || L.nickname.trim(),
|
|
211
|
+
maskedAccountNumber: k.accountNumber,
|
|
212
|
+
users: Nt.map((e) => ({
|
|
211
213
|
key: e.id,
|
|
212
214
|
initials: t(e.name),
|
|
213
215
|
name: e.name,
|
|
214
216
|
role: e.role
|
|
215
217
|
}))
|
|
216
|
-
} : void 0,
|
|
217
|
-
labels:
|
|
218
|
-
onEditSelect:
|
|
219
|
-
onVerifySelect:
|
|
220
|
-
onLinkSelect:
|
|
221
|
-
onUnlinkSelect:
|
|
222
|
-
}),
|
|
223
|
-
if (!
|
|
224
|
-
let e =
|
|
225
|
-
return
|
|
218
|
+
} : void 0, Ft = we(Z, d, b, {
|
|
219
|
+
labels: u,
|
|
220
|
+
onEditSelect: vt,
|
|
221
|
+
onVerifySelect: xt,
|
|
222
|
+
onLinkSelect: Tt,
|
|
223
|
+
onUnlinkSelect: Et
|
|
224
|
+
}), It = s(() => {
|
|
225
|
+
if (!B.isError && !V.isError && !$) return;
|
|
226
|
+
let e = B.error ?? V.error ?? ($ ? W.error : void 0);
|
|
227
|
+
return ee(e) ?? u.actionErrorTitle;
|
|
226
228
|
}, [
|
|
229
|
+
B.error,
|
|
230
|
+
B.isError,
|
|
227
231
|
V.error,
|
|
228
232
|
V.isError,
|
|
229
|
-
H.error,
|
|
230
|
-
H.isError,
|
|
231
233
|
$,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
W.error,
|
|
235
|
+
u.actionErrorTitle
|
|
234
236
|
]);
|
|
235
237
|
return {
|
|
236
|
-
rows:
|
|
237
|
-
isLoading: !
|
|
238
|
-
isError:
|
|
239
|
-
isConnectOpen:
|
|
240
|
-
isEditOpen:
|
|
241
|
-
isVerifyOpen:
|
|
242
|
-
isVerifySuccess:
|
|
243
|
-
verifyAccountName:
|
|
244
|
-
verifyAccountNumber:
|
|
245
|
-
isUnlinkOpen: !!
|
|
246
|
-
unlinkAccountNumber:
|
|
247
|
-
connectStep:
|
|
248
|
-
accessRows:
|
|
249
|
-
accessGrantedCount:
|
|
250
|
-
connectSummary:
|
|
251
|
-
isTeamMembersLoading:
|
|
252
|
-
isTeamMembersError:
|
|
253
|
-
isConnectNextDisabled:
|
|
254
|
-
isConnectRoutingNumberInvalid:
|
|
255
|
-
connectErrorMessage:
|
|
256
|
-
isVerifyFirstAmountInvalid: R.firstAmount.trim() !== "" && !
|
|
257
|
-
isVerifySecondAmountInvalid: R.secondAmount.trim() !== "" && !
|
|
258
|
-
isVerifySubmitDisabled: !
|
|
259
|
-
isActionDisabled:
|
|
260
|
-
canConnect:
|
|
261
|
-
isSubmitting:
|
|
262
|
-
isActionError:
|
|
263
|
-
isConnectError:
|
|
264
|
-
isEditError:
|
|
265
|
-
isVerifyError:
|
|
266
|
-
connectForm:
|
|
267
|
-
editForm:
|
|
238
|
+
rows: Ft,
|
|
239
|
+
isLoading: !v && (Ue && !z.data || He && !g || x && z.isLoading),
|
|
240
|
+
isError: v || x && z.isError,
|
|
241
|
+
isConnectOpen: w,
|
|
242
|
+
isEditOpen: Ye,
|
|
243
|
+
isVerifyOpen: Xe,
|
|
244
|
+
isVerifySuccess: Qe,
|
|
245
|
+
verifyAccountName: Z.find((e) => e.id === S)?.nickname,
|
|
246
|
+
verifyAccountNumber: Z.find((e) => e.id === S)?.accountNumber,
|
|
247
|
+
isUnlinkOpen: !!F,
|
|
248
|
+
unlinkAccountNumber: Z.find((e) => e.id === F)?.accountNumber,
|
|
249
|
+
connectStep: T,
|
|
250
|
+
accessRows: jt,
|
|
251
|
+
accessGrantedCount: Mt,
|
|
252
|
+
connectSummary: Pt,
|
|
253
|
+
isTeamMembersLoading: st,
|
|
254
|
+
isTeamMembersError: q.isError || ot,
|
|
255
|
+
isConnectNextDisabled: T === 1 ? !he(L) : T === 2 && !ct,
|
|
256
|
+
isConnectRoutingNumberInvalid: L.routingNumber.trim() !== "" && !ge(L.routingNumber),
|
|
257
|
+
connectErrorMessage: It,
|
|
258
|
+
isVerifyFirstAmountInvalid: R.firstAmount.trim() !== "" && !_e(R.firstAmount),
|
|
259
|
+
isVerifySecondAmountInvalid: R.secondAmount.trim() !== "" && !_e(R.secondAmount),
|
|
260
|
+
isVerifySubmitDisabled: !ve(R),
|
|
261
|
+
isActionDisabled: Q,
|
|
262
|
+
canConnect: At,
|
|
263
|
+
isSubmitting: kt,
|
|
264
|
+
isActionError: W.isError || U.isError || B.isError || V.isError || H.isError || G.isError || $e,
|
|
265
|
+
isConnectError: B.isError || V.isError || $,
|
|
266
|
+
isEditError: H.isError,
|
|
267
|
+
isVerifyError: G.isError || $e,
|
|
268
|
+
connectForm: L,
|
|
269
|
+
editForm: tt,
|
|
268
270
|
verifyForm: R,
|
|
269
|
-
onConnectOpenChange:
|
|
270
|
-
onEditOpenChange:
|
|
271
|
-
onVerifyOpenChange:
|
|
272
|
-
onUnlinkOpenChange:
|
|
273
|
-
onConnectFormChange:
|
|
274
|
-
onEditFormChange:
|
|
275
|
-
onVerifyFormChange:
|
|
276
|
-
onConnectNext:
|
|
277
|
-
onConnectBack:
|
|
278
|
-
onEditSubmit:
|
|
279
|
-
onVerifySubmit:
|
|
280
|
-
onUnlinkConfirm:
|
|
271
|
+
onConnectOpenChange: _t,
|
|
272
|
+
onEditOpenChange: yt,
|
|
273
|
+
onVerifyOpenChange: St,
|
|
274
|
+
onUnlinkOpenChange: Dt,
|
|
275
|
+
onConnectFormChange: ut,
|
|
276
|
+
onEditFormChange: nt,
|
|
277
|
+
onVerifyFormChange: Ct,
|
|
278
|
+
onConnectNext: mt,
|
|
279
|
+
onConnectBack: ht,
|
|
280
|
+
onEditSubmit: bt,
|
|
281
|
+
onVerifySubmit: wt,
|
|
282
|
+
onUnlinkConfirm: Ot
|
|
281
283
|
};
|
|
282
284
|
}
|
|
283
285
|
//#endregion
|
|
284
|
-
export {
|
|
286
|
+
export { l as LOCALLY_SENT_MICRO_DEPOSIT_ACCOUNT_IDS_STORAGE_KEY, p as useLinkedAccountsWidget };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getCounterparts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getCounterpartsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
@@ -13,17 +13,22 @@ import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
|
|
14
14
|
var c = 100;
|
|
15
15
|
function l({ enabled: l } = {}) {
|
|
16
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p,
|
|
16
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = i(d), g = !!(d && f) && (l === !0 || l === void 0), _ = t({
|
|
17
17
|
client: u,
|
|
18
18
|
headers: h,
|
|
19
19
|
query: {
|
|
20
20
|
limit: c,
|
|
21
21
|
is_customer: !0
|
|
22
22
|
}
|
|
23
|
-
})
|
|
24
|
-
|
|
23
|
+
}), v = s({
|
|
24
|
+
...n(_.queryKey, {
|
|
25
|
+
authEpoch: p,
|
|
26
|
+
organizationStatus: m
|
|
27
|
+
}, {
|
|
28
|
+
suffix: ["all"],
|
|
29
|
+
carryWhileRotating: !1
|
|
30
|
+
}),
|
|
25
31
|
enabled: g,
|
|
26
|
-
placeholderData: n(_, m),
|
|
27
32
|
initialPageParam: void 0,
|
|
28
33
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
34
|
let { data: r } = await e({
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getDepositableBankAccounts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getDepositableBankAccountsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
@@ -14,13 +14,18 @@ import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
|
|
15
15
|
var l = 100;
|
|
16
16
|
function u({ enabled: u } = {}) {
|
|
17
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m,
|
|
17
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
|
|
18
18
|
client: d,
|
|
19
19
|
headers: g,
|
|
20
20
|
query: { limit: l }
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
}), y = c({
|
|
22
|
+
...n(v.queryKey, {
|
|
23
|
+
authEpoch: m,
|
|
24
|
+
organizationStatus: h
|
|
25
|
+
}, {
|
|
26
|
+
suffix: ["all"],
|
|
27
|
+
carryWhileRotating: !1
|
|
28
|
+
}),
|
|
24
29
|
enabled: _,
|
|
25
30
|
initialPageParam: void 0,
|
|
26
31
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getReceivables as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getReceivablesOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
@@ -17,20 +17,25 @@ var c = 100, l = [
|
|
|
17
17
|
"overdue"
|
|
18
18
|
];
|
|
19
19
|
function u({ counterpartId: u, enabled: d } = {}) {
|
|
20
|
-
let { client: f, organizationId: p, widgetToken: m, authEpoch: h,
|
|
20
|
+
let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationStatus: g } = r(), _ = i(p), v = !!(p && m && u) && (d === !0 || d === void 0), y = {
|
|
21
21
|
type: "invoice",
|
|
22
22
|
bank_account_type: "INTERNAL",
|
|
23
23
|
limit: c,
|
|
24
24
|
counterpart_id__in: u ? [u] : void 0,
|
|
25
25
|
status__in: [...l]
|
|
26
|
-
}, b =
|
|
26
|
+
}, b = t({
|
|
27
27
|
client: f,
|
|
28
28
|
headers: _,
|
|
29
29
|
query: y
|
|
30
|
-
})
|
|
31
|
-
|
|
30
|
+
}), x = s({
|
|
31
|
+
...n(b.queryKey, {
|
|
32
|
+
authEpoch: h,
|
|
33
|
+
organizationStatus: g
|
|
34
|
+
}, {
|
|
35
|
+
suffix: ["all"],
|
|
36
|
+
carryWhileRotating: !1
|
|
37
|
+
}),
|
|
32
38
|
enabled: v,
|
|
33
|
-
placeholderData: n(b, g),
|
|
34
39
|
initialPageParam: void 0,
|
|
35
40
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
36
41
|
let { data: r } = await e({
|
|
@@ -10,7 +10,7 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js
|
|
12
12
|
function a(a) {
|
|
13
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
13
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c && a), f = e({
|
|
14
14
|
client: o,
|
|
15
15
|
headers: r(s),
|
|
16
16
|
path: { entity_id: a ?? "" }
|
|
@@ -18,7 +18,7 @@ function a(a) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(f, {
|
|
20
20
|
authEpoch: l,
|
|
21
|
-
|
|
21
|
+
organizationStatus: u
|
|
22
22
|
}),
|
|
23
23
|
enabled: d
|
|
24
24
|
});
|