@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/bank-accounts-widget/feature/dist/index7.js
CHANGED
|
@@ -4,198 +4,200 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as t, emitWidgetDomEvent as n } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { OrganizationStatus as r, isOrganizationOnItsWay as ee } from "../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
8
|
+
import { useEmbedApi as te } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { Scope as ne } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
10
|
+
import { useAllBankAccountsQuery as re } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
11
|
+
import { useAllOrganizationRolesQuery as ie } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
10
12
|
import "../../../shared/data-access/dist/index.js";
|
|
11
13
|
import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
|
|
12
|
-
import { copyTextToClipboard as
|
|
13
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
14
|
-
import { getBankAccountsPermissions as
|
|
15
|
-
import { toAccessRows as
|
|
16
|
-
import { DEFAULT_LABELS as
|
|
14
|
+
import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailableBalanceLabel as oe, maskAccountNumber as o } from "./index3.js";
|
|
15
|
+
import { DEFAULT_FEATURE_LABELS as se } from "./index4.js";
|
|
16
|
+
import { getBankAccountsPermissions as ce } from "./index5.js";
|
|
17
|
+
import { toAccessRows as le, toOrganizationRoleOptions as ue, toTeamMembers as de } from "./index6.js";
|
|
18
|
+
import { DEFAULT_LABELS as fe } from "../../ui/dist/lib/labels.js";
|
|
17
19
|
import "../../../shared/ui/dist/index.js";
|
|
18
20
|
import "../../ui/dist/index.js";
|
|
19
|
-
import { useAnalyticsTrack as
|
|
20
|
-
import { useWidgetConfig as
|
|
21
|
+
import { useAnalyticsTrack as pe } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
22
|
+
import { useWidgetConfig as me, useWidgetError as he, useWidgetLoading as ge } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
21
23
|
import "../../../shared/feature/dist/index.js";
|
|
22
|
-
import { useCreateBankAccountMutation as
|
|
23
|
-
import { useGrantBankAccountAccessMutation as
|
|
24
|
-
import { useAllOrganizationUsersQuery as
|
|
24
|
+
import { useCreateBankAccountMutation as _e } from "../../data-access/dist/index3.js";
|
|
25
|
+
import { useGrantBankAccountAccessMutation as ve } from "../../data-access/dist/index4.js";
|
|
26
|
+
import { useAllOrganizationUsersQuery as s } from "../../data-access/dist/index5.js";
|
|
25
27
|
import "../../data-access/dist/index.js";
|
|
26
|
-
import { filterRolesForOrganization as
|
|
27
|
-
import { useCallback as
|
|
28
|
-
import { useControllableState as
|
|
28
|
+
import { filterRolesForOrganization as ye } from "../../../../shared/util-validation/dist/index6.js";
|
|
29
|
+
import { useCallback as be, useEffect as c, useMemo as l, useRef as xe, useState as u } from "react";
|
|
30
|
+
import { useControllableState as Se } from "@radix-ui/react-use-controllable-state";
|
|
29
31
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
+
var d = { nickname: "" }, Ce = ne.BankAccountWriteOrg;
|
|
33
|
+
function f(e, t) {
|
|
32
34
|
return e !== void 0 && t !== void 0 && e !== t;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
let
|
|
36
|
-
...
|
|
37
|
-
...
|
|
38
|
-
},
|
|
39
|
-
...
|
|
36
|
+
function p({ labels: ne, featureLabels: a, isBankingTaglineVisible: o = !0, bankLogoSrc: p, bankLogoAlt: Te, depositAgreementUrl: Ee, selectedAccountId: De, defaultSelectedAccountId: Oe, onSelectedAccountIdChange: ke, "data-testid": Ae } = {}) {
|
|
37
|
+
let je = {
|
|
38
|
+
...fe,
|
|
39
|
+
...ne
|
|
40
|
+
}, m = {
|
|
41
|
+
...se,
|
|
40
42
|
...a
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
let [
|
|
44
|
-
|
|
45
|
-
let [
|
|
46
|
-
prop:
|
|
47
|
-
defaultProp:
|
|
48
|
-
onChange:
|
|
43
|
+
}, h = pe(), { organizationId: g, widgetToken: _, initResponse: v } = me(), Me = ge(), { organizationStatus: y } = te(), Ne = ee(y), b = !!he(), x = !!(g && _), Pe = x || !!_ && y === r.Rotating, S = l(() => ce(v?.scopes), [v?.scopes]), Fe = Pe && S.canRead && !!v, C = v?.userId ?? void 0, [w, Ie] = u(g);
|
|
44
|
+
g !== void 0 && g !== w && Ie(g);
|
|
45
|
+
let [T, Le] = u(C);
|
|
46
|
+
C !== void 0 && C !== T && Le(C);
|
|
47
|
+
let [Re, E] = Se({
|
|
48
|
+
prop: De,
|
|
49
|
+
defaultProp: Oe ?? null,
|
|
50
|
+
onChange: ke,
|
|
49
51
|
caller: "BankAccountsWidget"
|
|
50
|
-
}),
|
|
51
|
-
organizationId:
|
|
52
|
-
userId:
|
|
53
|
-
}),
|
|
54
|
-
|
|
55
|
-
let e =
|
|
56
|
-
|
|
57
|
-
organizationId:
|
|
58
|
-
userId:
|
|
59
|
-
}, (
|
|
52
|
+
}), D = xe({
|
|
53
|
+
organizationId: w,
|
|
54
|
+
userId: T
|
|
55
|
+
}), ze = f(D.current.organizationId, w) || f(D.current.userId, T);
|
|
56
|
+
c(() => {
|
|
57
|
+
let e = D.current;
|
|
58
|
+
D.current = {
|
|
59
|
+
organizationId: w,
|
|
60
|
+
userId: T
|
|
61
|
+
}, (f(e.organizationId, w) || f(e.userId, T)) && E(null);
|
|
60
62
|
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
w,
|
|
64
|
+
T,
|
|
65
|
+
E
|
|
64
66
|
]);
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
let
|
|
72
|
-
enabled:
|
|
73
|
-
permissions: [
|
|
74
|
-
}),
|
|
75
|
-
let e =
|
|
76
|
-
organizationId:
|
|
77
|
-
organizationTypes:
|
|
67
|
+
let Be = ze ? null : Re, O = Fe && !Be, k = be((e) => {
|
|
68
|
+
E(e);
|
|
69
|
+
}, [E]), [A, j] = u(!1), [M, N] = u(d), [Ve, P] = u([]), [He, F] = u(!1), [Ue, I] = u(), [L, We] = u({}), [R, z] = u({});
|
|
70
|
+
c(() => {
|
|
71
|
+
h(i.Mounted);
|
|
72
|
+
}, [h]);
|
|
73
|
+
let B = re({ enabled: O }), V = _e(), H = ve(), U = A, W = s({ enabled: U }), G = ie({ enabled: U }), K = s({
|
|
74
|
+
enabled: U,
|
|
75
|
+
permissions: [Ce]
|
|
76
|
+
}), q = l(() => new Set((K.data?.data ?? []).filter((e) => e.organizationId === g).map((e) => e.id)), [K.data?.data, g]), J = l(() => {
|
|
77
|
+
let e = G.data?.data ?? [], t = g ? ye(e, {
|
|
78
|
+
organizationId: g,
|
|
79
|
+
organizationTypes: v?.organizationTypes ?? []
|
|
78
80
|
}) : e;
|
|
79
|
-
return
|
|
81
|
+
return de(W.data?.data ?? [], ue(t), q);
|
|
80
82
|
}, [
|
|
81
|
-
|
|
83
|
+
q,
|
|
84
|
+
G.data?.data,
|
|
82
85
|
W.data?.data,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
await ne(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), R((e) => ({
|
|
86
|
+
g,
|
|
87
|
+
v?.organizationTypes
|
|
88
|
+
]), Ge = W.isLoading || W.isFetchingNextPage || !!W.hasNextPage || G.isResolving || K.isLoading || K.isFetchingNextPage || !!K.hasNextPage, Ke = !Ge && !W.isError && !K.isError, Y = O ? B.data?.data ?? [] : [], X = [.../* @__PURE__ */ new Set([...J.filter((e) => e.locked).map((e) => e.id), ...Ve])], qe = v?.bankName?.trim() ?? "", Je = v?.vspName?.trim() ?? "", Ye = Ee?.trim() || void 0, Z = x && S.canWrite, Q = !B.hasNextPage && !B.isFetchingNextPage, Xe = l(() => Q ? oe(Y) : void 0, [Y, Q]), Ze = Y.length > 1 && S.canRead && Q, $ = be(async (t, n, r) => {
|
|
89
|
+
await ae(r) && (e.success(n === "account" ? m.copyAccountNumberToast : m.copyRoutingNumberToast), z((e) => ({
|
|
88
90
|
...e,
|
|
89
91
|
[t]: n
|
|
90
92
|
})), window.setTimeout(() => {
|
|
91
|
-
|
|
93
|
+
z((e) => ({
|
|
92
94
|
...e,
|
|
93
95
|
[t]: void 0
|
|
94
96
|
}));
|
|
95
97
|
}, 2e3));
|
|
96
|
-
}, [
|
|
97
|
-
isAccountNumberVisible:
|
|
98
|
-
isAccountNumberCopied:
|
|
99
|
-
isRoutingNumberCopied:
|
|
100
|
-
onToggleAccountNumberVisibility: () =>
|
|
98
|
+
}, [m.copyAccountNumberToast, m.copyRoutingNumberToast]), Qe = l(() => Y.map((e) => we(e, m, {
|
|
99
|
+
isAccountNumberVisible: L[e.id] ?? !1,
|
|
100
|
+
isAccountNumberCopied: R[e.id] === "account",
|
|
101
|
+
isRoutingNumberCopied: R[e.id] === "routing",
|
|
102
|
+
onToggleAccountNumberVisibility: () => We((t) => ({
|
|
101
103
|
...t,
|
|
102
104
|
[e.id]: !t[e.id]
|
|
103
105
|
})),
|
|
104
106
|
onCopyAccountNumber: () => void $(e.id, "account", e.accountNumber),
|
|
105
107
|
onCopyRoutingNumber: () => void $(e.id, "routing", e.routingNumber),
|
|
106
108
|
onSelect: () => {
|
|
107
|
-
|
|
109
|
+
k(e.id), h(i.AccountSelected, { accountId: e.id });
|
|
108
110
|
}
|
|
109
111
|
})), [
|
|
110
112
|
Y,
|
|
111
|
-
I,
|
|
112
113
|
L,
|
|
113
|
-
|
|
114
|
+
R,
|
|
115
|
+
m,
|
|
114
116
|
$,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
]),
|
|
118
|
-
|
|
117
|
+
k,
|
|
118
|
+
h
|
|
119
|
+
]), $e = (r) => {
|
|
120
|
+
H.mutate({
|
|
119
121
|
path: { id: r },
|
|
120
122
|
body: { userIds: X }
|
|
121
123
|
}, { onSuccess: () => {
|
|
122
|
-
n(t), e.success(
|
|
124
|
+
n(t), e.success(m.createSuccessToast), N(d), P([]), I(void 0), F(!1), j(!1);
|
|
123
125
|
} });
|
|
124
|
-
},
|
|
125
|
-
if (Z &&
|
|
126
|
-
if (
|
|
127
|
-
|
|
126
|
+
}, et = () => {
|
|
127
|
+
if (Z && Ke) {
|
|
128
|
+
if (M.nickname.trim() === "") {
|
|
129
|
+
F(!0);
|
|
128
130
|
return;
|
|
129
131
|
}
|
|
130
132
|
if (X.length === 0) {
|
|
131
133
|
console.warn("No team members selected on submit");
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
+
if (Ue) {
|
|
137
|
+
$e(Ue);
|
|
136
138
|
return;
|
|
137
139
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
V.mutate({ body: { nickname: M.nickname.trim() } }, { onSuccess: (e) => {
|
|
141
|
+
h(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), $e(e.id));
|
|
140
142
|
} });
|
|
141
143
|
}
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
(!e || Z) && (e && (
|
|
146
|
-
},
|
|
147
|
-
selectedUserIds:
|
|
148
|
-
disabled:
|
|
149
|
-
fallbackTooltip:
|
|
150
|
-
onUserToggle:
|
|
144
|
+
}, tt = (e, t) => {
|
|
145
|
+
J.find((t) => t.id === e)?.locked || P((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
|
|
146
|
+
}, nt = (e) => {
|
|
147
|
+
(!e || Z) && (e && (N(d), P([]), I(void 0), F(!1), V.reset(), H.reset()), j(e));
|
|
148
|
+
}, rt = V.isPending || H.isPending, it = le(J, {
|
|
149
|
+
selectedUserIds: Ve,
|
|
150
|
+
disabled: rt || !S.canWrite,
|
|
151
|
+
fallbackTooltip: je.teamMemberAccessTooltip,
|
|
152
|
+
onUserToggle: tt
|
|
151
153
|
});
|
|
152
154
|
return {
|
|
153
|
-
"data-testid":
|
|
154
|
-
selectedAccountId:
|
|
155
|
-
bankDisplayName:
|
|
156
|
-
bankLogoSrc:
|
|
157
|
-
bankLogoAlt:
|
|
158
|
-
availableBalanceLabel:
|
|
159
|
-
shouldDisplayAvailableBalance:
|
|
160
|
-
isBankingTaglineVisible:
|
|
161
|
-
accountCards:
|
|
162
|
-
shouldDisplayAddAccountCard:
|
|
163
|
-
isLoading: !
|
|
164
|
-
isError:
|
|
165
|
-
isCreateOpen:
|
|
166
|
-
createForm:
|
|
155
|
+
"data-testid": Ae,
|
|
156
|
+
selectedAccountId: Be,
|
|
157
|
+
bankDisplayName: qe,
|
|
158
|
+
bankLogoSrc: p,
|
|
159
|
+
bankLogoAlt: Te,
|
|
160
|
+
availableBalanceLabel: Xe,
|
|
161
|
+
shouldDisplayAvailableBalance: Ze,
|
|
162
|
+
isBankingTaglineVisible: o,
|
|
163
|
+
accountCards: Qe,
|
|
164
|
+
shouldDisplayAddAccountCard: S.canWrite,
|
|
165
|
+
isLoading: !b && (Ne && !B.data || Me && !v || O && (B.isLoading || B.isFetchingNextPage || B.hasNextPage)),
|
|
166
|
+
isError: b || O && B.isError,
|
|
167
|
+
isCreateOpen: A,
|
|
168
|
+
createForm: M,
|
|
167
169
|
legalCopy: {
|
|
168
|
-
bankName:
|
|
169
|
-
vspName:
|
|
170
|
-
agreementUrl:
|
|
170
|
+
bankName: qe,
|
|
171
|
+
vspName: Je,
|
|
172
|
+
agreementUrl: Ye
|
|
171
173
|
},
|
|
172
|
-
accessRows:
|
|
173
|
-
isTeamMembersLoading:
|
|
174
|
-
isTeamMembersError:
|
|
175
|
-
isCreateSubmitDisabled: !Z || !
|
|
176
|
-
isCreateError:
|
|
177
|
-
hasNicknameError:
|
|
178
|
-
isSubmitting:
|
|
174
|
+
accessRows: it,
|
|
175
|
+
isTeamMembersLoading: Ge,
|
|
176
|
+
isTeamMembersError: W.isError || K.isError,
|
|
177
|
+
isCreateSubmitDisabled: !Z || !Ke || M.nickname.trim() === "" || X.length === 0,
|
|
178
|
+
isCreateError: V.isError || H.isError,
|
|
179
|
+
hasNicknameError: He,
|
|
180
|
+
isSubmitting: rt,
|
|
179
181
|
isCreateDisabled: !Z,
|
|
180
|
-
onCreateOpenChange:
|
|
182
|
+
onCreateOpenChange: nt,
|
|
181
183
|
onCreateFormChange: (e) => {
|
|
182
|
-
|
|
184
|
+
F(!1), N(e);
|
|
183
185
|
},
|
|
184
|
-
onCreateSubmit:
|
|
185
|
-
onAddAccountClick: () =>
|
|
186
|
-
onSelectAccount:
|
|
186
|
+
onCreateSubmit: et,
|
|
187
|
+
onAddAccountClick: () => nt(!0),
|
|
188
|
+
onSelectAccount: k
|
|
187
189
|
};
|
|
188
190
|
}
|
|
189
|
-
function
|
|
191
|
+
function we(e, t, n) {
|
|
190
192
|
return {
|
|
191
193
|
id: e.id,
|
|
192
194
|
name: e.nickname?.trim() || t.accountFallback,
|
|
193
195
|
balanceLabel: a(e.balance),
|
|
194
196
|
accountNumberLabel: e.accountNumber,
|
|
195
|
-
maskedAccountNumberLabel:
|
|
197
|
+
maskedAccountNumberLabel: o(e.accountNumber),
|
|
196
198
|
routingNumberLabel: e.routingNumber,
|
|
197
199
|
...n
|
|
198
200
|
};
|
|
199
201
|
}
|
|
200
202
|
//#endregion
|
|
201
|
-
export {
|
|
203
|
+
export { p as useBankAccountsWidget };
|
|
@@ -4,39 +4,38 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getPaymentRecords as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getPaymentRecordsOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
11
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
12
|
-
import { useMemo as
|
|
13
|
-
import { useInfiniteQuery as
|
|
12
|
+
import { useMemo as c } from "react";
|
|
13
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let { client:
|
|
18
|
-
limit:
|
|
19
|
-
object_id__in:
|
|
15
|
+
var u = 100;
|
|
16
|
+
function d(d, { enabled: f } = {}) {
|
|
17
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = r(), v = i(m), y = !!(m && h && d) && f !== !1, b = {
|
|
18
|
+
limit: u,
|
|
19
|
+
object_id__in: d ? [d] : [],
|
|
20
20
|
order: "desc",
|
|
21
21
|
sort: "paid_at"
|
|
22
|
-
},
|
|
23
|
-
client:
|
|
24
|
-
headers:
|
|
25
|
-
query:
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
authEpoch:
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
enabled: b,
|
|
22
|
+
}, x = t({
|
|
23
|
+
client: p,
|
|
24
|
+
headers: v,
|
|
25
|
+
query: b
|
|
26
|
+
}), S = l({
|
|
27
|
+
...n(x.queryKey, {
|
|
28
|
+
authEpoch: g,
|
|
29
|
+
organizationStatus: _
|
|
30
|
+
}, { suffix: ["all"] }),
|
|
31
|
+
enabled: y,
|
|
33
32
|
initialPageParam: void 0,
|
|
34
33
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
35
34
|
let { data: r } = await e({
|
|
36
|
-
client:
|
|
37
|
-
headers:
|
|
35
|
+
client: p,
|
|
36
|
+
headers: v,
|
|
38
37
|
query: {
|
|
39
|
-
...
|
|
38
|
+
...b,
|
|
40
39
|
...n ? { pagination_token: n } : {}
|
|
41
40
|
},
|
|
42
41
|
signal: t,
|
|
@@ -44,15 +43,15 @@ function f(f, { enabled: p } = {}) {
|
|
|
44
43
|
});
|
|
45
44
|
return r;
|
|
46
45
|
},
|
|
47
|
-
getNextPageParam:
|
|
46
|
+
getNextPageParam: a
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
let
|
|
48
|
+
s(S, y);
|
|
49
|
+
let C = c(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
|
|
51
50
|
return {
|
|
52
|
-
...
|
|
53
|
-
paymentRecords:
|
|
54
|
-
isResolving:
|
|
51
|
+
...S,
|
|
52
|
+
paymentRecords: C,
|
|
53
|
+
isResolving: y && o(S)
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
56
|
//#endregion
|
|
58
|
-
export {
|
|
57
|
+
export { d as usePayablePaymentRecordsQuery };
|
|
@@ -11,13 +11,13 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js
|
|
13
13
|
function o(o, { enabled: s = !0 } = {}) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d,
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationStatus: f } = n(), p = !!(l && u && o) && s, m = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { payable_id: o ?? "" }
|
|
18
18
|
}), { queryKey: h, queryFn: g } = t(m, {
|
|
19
19
|
authEpoch: d,
|
|
20
|
-
|
|
20
|
+
organizationStatus: f
|
|
21
21
|
});
|
|
22
22
|
return a({
|
|
23
23
|
queryKey: h,
|
|
@@ -16,7 +16,7 @@ import "../../../data-access/dist/index.js";
|
|
|
16
16
|
import { useMutation as d, useQuery as f } from "@tanstack/react-query";
|
|
17
17
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js
|
|
18
18
|
function p(e, { enabled: t } = {}) {
|
|
19
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d,
|
|
19
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationStatus: p } = i(), m = !!(l && u && e) && t !== !1, h = n({
|
|
20
20
|
client: c,
|
|
21
21
|
headers: a(l),
|
|
22
22
|
query: {
|
|
@@ -28,7 +28,7 @@ function p(e, { enabled: t } = {}) {
|
|
|
28
28
|
return f({
|
|
29
29
|
...r(h, {
|
|
30
30
|
authEpoch: d,
|
|
31
|
-
|
|
31
|
+
organizationStatus: p
|
|
32
32
|
}),
|
|
33
33
|
enabled: m
|
|
34
34
|
});
|
|
@@ -13,7 +13,7 @@ import { payablePolicyAssignmentQueryOptions as a } from "./index20.js";
|
|
|
13
13
|
import { useQuery as o } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js
|
|
15
15
|
function s(s, { enabled: c = !0, pollWhileOcrProcessing: l = !1, pollWhilePolicyAssignmentUnsettled: u = !1 } = {}) {
|
|
16
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m,
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = n(), g = !!(f && p && s) && c, _ = l ? i({
|
|
17
17
|
client: d,
|
|
18
18
|
organizationId: f,
|
|
19
19
|
payableId: s ?? ""
|
|
@@ -35,7 +35,7 @@ function s(s, { enabled: c = !0, pollWhileOcrProcessing: l = !1, pollWhilePolicy
|
|
|
35
35
|
return o({
|
|
36
36
|
...t(b, {
|
|
37
37
|
authEpoch: m,
|
|
38
|
-
|
|
38
|
+
organizationStatus: h
|
|
39
39
|
}),
|
|
40
40
|
enabled: g
|
|
41
41
|
});
|
|
@@ -10,7 +10,7 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQueries as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js
|
|
12
12
|
function a(a, { enabled: o = !0 } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && o, p = r(c);
|
|
14
14
|
return i({ queries: a.map((n) => ({
|
|
15
15
|
...t(e({
|
|
16
16
|
client: s,
|
|
@@ -18,7 +18,7 @@ function a(a, { enabled: o = !0 } = {}) {
|
|
|
18
18
|
path: { payable_id: n }
|
|
19
19
|
}), {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: f
|
|
24
24
|
})) });
|
|
@@ -11,7 +11,7 @@ import { useQuery as i } from "@tanstack/react-query";
|
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js
|
|
12
12
|
var a = 100;
|
|
13
13
|
function o(o, { enabled: s } = {}) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d,
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationStatus: f } = n(), p = !!(l && u && o) && s !== !1, m = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { payable_id: o ?? "" },
|
|
@@ -24,7 +24,7 @@ function o(o, { enabled: s } = {}) {
|
|
|
24
24
|
return i({
|
|
25
25
|
...t(m, {
|
|
26
26
|
authEpoch: d,
|
|
27
|
-
|
|
27
|
+
organizationStatus: f
|
|
28
28
|
}),
|
|
29
29
|
enabled: p
|
|
30
30
|
});
|
|
@@ -4,38 +4,37 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getPayablesIdLineItemsOptions as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
7
|
+
import { withAuthEpochInfinite as r } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as i } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as a } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
11
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
12
|
-
import { invalidatePayableQueries as
|
|
12
|
+
import { invalidatePayableQueries as l } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
13
13
|
import "../../../data-access/dist/invalidation.js";
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { useInfiniteQuery as
|
|
14
|
+
import { useMemo as u } from "react";
|
|
15
|
+
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let { client:
|
|
20
|
-
client:
|
|
21
|
-
headers:
|
|
17
|
+
var p = 100;
|
|
18
|
+
function m(t, { enabled: l } = {}) {
|
|
19
|
+
let { client: f, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = i(), v = a(m), y = !!(m && h && t) && l !== !1, b = n({
|
|
20
|
+
client: f,
|
|
21
|
+
headers: v,
|
|
22
22
|
path: { payable_id: t ?? "" },
|
|
23
|
-
query: { limit:
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
authEpoch:
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
enabled: b,
|
|
23
|
+
query: { limit: p }
|
|
24
|
+
}), x = d({
|
|
25
|
+
...r(b.queryKey, {
|
|
26
|
+
authEpoch: g,
|
|
27
|
+
organizationStatus: _
|
|
28
|
+
}, { suffix: ["all"] }),
|
|
29
|
+
enabled: y,
|
|
31
30
|
initialPageParam: void 0,
|
|
32
31
|
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
33
32
|
let { data: i } = await e({
|
|
34
|
-
client:
|
|
35
|
-
headers:
|
|
33
|
+
client: f,
|
|
34
|
+
headers: v,
|
|
36
35
|
path: { payable_id: t ?? "" },
|
|
37
36
|
query: {
|
|
38
|
-
limit:
|
|
37
|
+
limit: p,
|
|
39
38
|
...r ? { pagination_token: r } : {}
|
|
40
39
|
},
|
|
41
40
|
signal: n,
|
|
@@ -43,31 +42,31 @@ function h(t, { enabled: u } = {}) {
|
|
|
43
42
|
});
|
|
44
43
|
return i;
|
|
45
44
|
},
|
|
46
|
-
getNextPageParam:
|
|
45
|
+
getNextPageParam: o
|
|
47
46
|
});
|
|
48
|
-
|
|
49
|
-
let
|
|
47
|
+
c(x, y);
|
|
48
|
+
let S = u(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
50
49
|
return {
|
|
51
|
-
...
|
|
52
|
-
lineItems:
|
|
53
|
-
isResolving:
|
|
50
|
+
...x,
|
|
51
|
+
lineItems: S,
|
|
52
|
+
isResolving: s(x)
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
let { client: e, organizationId: n } =
|
|
58
|
-
return
|
|
55
|
+
function h() {
|
|
56
|
+
let { client: e, organizationId: n } = i();
|
|
57
|
+
return f({
|
|
59
58
|
mutationFn: async ({ path: r, body: i }) => {
|
|
60
|
-
let { data:
|
|
59
|
+
let { data: o } = await t({
|
|
61
60
|
client: e,
|
|
62
|
-
headers:
|
|
61
|
+
headers: a(n),
|
|
63
62
|
path: r,
|
|
64
63
|
body: i,
|
|
65
64
|
throwOnError: !0
|
|
66
65
|
});
|
|
67
|
-
return
|
|
66
|
+
return o;
|
|
68
67
|
},
|
|
69
68
|
onSuccess: async (t, r) => {
|
|
70
|
-
await
|
|
69
|
+
await l({
|
|
71
70
|
client: e,
|
|
72
71
|
organizationId: n,
|
|
73
72
|
payableId: r.path.payable_id,
|
|
@@ -77,4 +76,4 @@ function g() {
|
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
78
|
//#endregion
|
|
80
|
-
export {
|
|
79
|
+
export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
|