@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
|
@@ -3,99 +3,102 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { isOrganizationOnItsWay as t } from "../../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
6
9
|
import "../../../../shared/ui/dist/index.js";
|
|
7
|
-
import { useAnalyticsTrack as
|
|
8
|
-
import { useWidgetConfig as
|
|
10
|
+
import { useAnalyticsTrack as r } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
11
|
+
import { useWidgetConfig as ee, useWidgetError as te, useWidgetLoading as ne } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
12
|
import "../../../../shared/feature/dist/index.js";
|
|
10
|
-
import { AccountDetailsWidgetAnalyticsEvent as
|
|
11
|
-
import { formatDateParam as
|
|
12
|
-
import { copyTextToClipboard as
|
|
13
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
14
|
-
import { getBankAccountsPermissions as
|
|
15
|
-
import { getStatementsStartDate as
|
|
13
|
+
import { AccountDetailsWidgetAnalyticsEvent as i } from "./index2.js";
|
|
14
|
+
import { formatDateParam as re, getDefaultExportDateRange as ie, isExportRangeValid as a, startOfLocalDay as o, triggerCsvDownload as ae, yesterdayLocal as s } from "./index3.js";
|
|
15
|
+
import { copyTextToClipboard as oe, formatAmountLabel as c, formatSignedTransactionAmountLabel as se, formatStatementPeriodLabel as ce, formatTransactionDateLabel as le, maskAccountNumber as ue } from "./index4.js";
|
|
16
|
+
import { DEFAULT_FEATURE_LABELS as de } from "./index5.js";
|
|
17
|
+
import { getBankAccountsPermissions as fe } from "./index6.js";
|
|
18
|
+
import { getStatementsStartDate as pe } from "./index7.js";
|
|
16
19
|
import { interpolateLabel as l } from "./index8.js";
|
|
17
|
-
import { useBankAccountDetailsQuery as
|
|
18
|
-
import { useBankAccountStatementsQuery as
|
|
19
|
-
import { useBankAccountTransactionsQuery as
|
|
20
|
-
import { useDownloadBankAccountTransactionsMutation as
|
|
21
|
-
import { useRetrieveBankAccountStatementMutation as
|
|
22
|
-
import { useUpdateBankAccountMutation as
|
|
20
|
+
import { useBankAccountDetailsQuery as me } from "../../data-access/dist/index2.js";
|
|
21
|
+
import { useBankAccountStatementsQuery as he } from "../../data-access/dist/index3.js";
|
|
22
|
+
import { useBankAccountTransactionsQuery as ge } from "../../data-access/dist/index4.js";
|
|
23
|
+
import { useDownloadBankAccountTransactionsMutation as _e } from "../../data-access/dist/index5.js";
|
|
24
|
+
import { useRetrieveBankAccountStatementMutation as ve } from "../../data-access/dist/index6.js";
|
|
25
|
+
import { useUpdateBankAccountMutation as ye } from "../../data-access/dist/index7.js";
|
|
23
26
|
import "../../data-access/dist/index.js";
|
|
24
|
-
import { DEFAULT_LABELS as
|
|
25
|
-
import { AccountDetailsWidgetUi as
|
|
27
|
+
import { DEFAULT_LABELS as be } from "../../ui/dist/index7.js";
|
|
28
|
+
import { AccountDetailsWidgetUi as xe } from "../../ui/dist/index8.js";
|
|
26
29
|
import "../../ui/dist/index.js";
|
|
27
|
-
import { useCallback as u, useEffect as
|
|
28
|
-
import { jsx as
|
|
30
|
+
import { useCallback as u, useEffect as Se, useMemo as d, useState as f } from "react";
|
|
31
|
+
import { jsx as Ce } from "react/jsx-runtime";
|
|
29
32
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js
|
|
30
|
-
var
|
|
33
|
+
var we = 3e3, Te = 5e3, Ee = [
|
|
31
34
|
10,
|
|
32
35
|
25,
|
|
33
36
|
50
|
|
34
|
-
],
|
|
35
|
-
function p({ accountId: p, onBack:
|
|
37
|
+
], De = 10, Oe = 6e5, ke = { nickname: "" };
|
|
38
|
+
function p({ accountId: p, onBack: Ae, labels: je, featureLabels: Me, isBankingTaglineVisible: Ne = !0, bankLogoSrc: Pe, bankLogoAlt: Fe, bankAddress: Ie, supportTeamUrl: Le }) {
|
|
36
39
|
let m = {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
40
|
+
...be,
|
|
41
|
+
...je
|
|
39
42
|
}, h = {
|
|
40
|
-
...
|
|
41
|
-
...
|
|
42
|
-
}, g =
|
|
43
|
+
...de,
|
|
44
|
+
...Me
|
|
45
|
+
}, g = r(), { organizationId: Re, widgetToken: ze, initResponse: _ } = ee(), Be = ne(), Ve = t(n().organizationStatus), v = !!te(), y = !!(Re && ze), b = d(() => fe(_?.scopes), [_?.scopes]), x = b.canRead && !!_, S = y && x, C = x && !y, [w, He] = f("transactions"), [Ue, T] = f(!1), [E, D] = f(ke), [We, Ge] = f(!1), [Ke, qe] = f(!1), [Je, Ye] = f(!1), [Xe, Ze] = f(!1), [Qe, $e] = f(!1), [O, k] = f(), [A, j] = f(), [M, et] = f(De), [N, P] = f(() => ({
|
|
43
46
|
accountId: p,
|
|
44
47
|
token: void 0
|
|
45
48
|
}));
|
|
46
|
-
|
|
49
|
+
N.accountId !== p && P({
|
|
47
50
|
accountId: p,
|
|
48
51
|
token: void 0
|
|
49
52
|
});
|
|
50
|
-
let
|
|
51
|
-
|
|
53
|
+
let tt = N.accountId === p ? N.token : void 0, F = u((e) => {
|
|
54
|
+
P((t) => ({
|
|
52
55
|
...t,
|
|
53
56
|
token: e
|
|
54
57
|
}));
|
|
55
|
-
}, []), [
|
|
56
|
-
|
|
57
|
-
g(
|
|
58
|
+
}, []), [I, L] = f(() => /* @__PURE__ */ new Set());
|
|
59
|
+
Se(() => {
|
|
60
|
+
g(i.Mounted);
|
|
58
61
|
}, [g]);
|
|
59
|
-
let
|
|
62
|
+
let R = me({
|
|
60
63
|
id: p,
|
|
61
64
|
enabled: S
|
|
62
|
-
}),
|
|
65
|
+
}), z = ge({
|
|
63
66
|
id: p,
|
|
64
67
|
enabled: S && w === "transactions",
|
|
65
68
|
limit: 25,
|
|
66
69
|
sortBy: "DATE",
|
|
67
70
|
sortOrder: "DESC"
|
|
68
|
-
}), [
|
|
71
|
+
}), [nt] = f(pe), B = he({
|
|
69
72
|
id: p,
|
|
70
|
-
startDate:
|
|
73
|
+
startDate: nt,
|
|
71
74
|
enabled: S && w === "statements",
|
|
72
|
-
limit:
|
|
73
|
-
pagination_token:
|
|
75
|
+
limit: M,
|
|
76
|
+
pagination_token: tt,
|
|
74
77
|
category: "STATEMENTS"
|
|
75
|
-
}),
|
|
78
|
+
}), rt = ye(), it = _e(), at = ve(), { mutate: ot, isPending: st, isError: V, reset: H } = rt, { mutateAsync: U, isPending: ct } = it, { mutateAsync: W } = at, G = x ? R.data : void 0, K = _?.bankName?.trim() ?? "", q = Ie?.trim() || void 0, J = { bankName: K }, lt = d(() => l(m.domesticWireIntro, J), [m.domesticWireIntro, K]), ut = d(() => l(m.domesticWireNote, J), [m.domesticWireNote, K]), dt = d(() => l(m.thingsToKnowBody, J), [m.thingsToKnowBody, K]), ft = G?.nickname?.trim() || h.accountFallback, pt = c(G?.balance), Y = d(() => (z.data?.data ?? []).map((e, t) => ({
|
|
76
79
|
key: `${e.date}-${t}`,
|
|
77
80
|
descriptionLabel: e.description,
|
|
78
|
-
dateLabel:
|
|
79
|
-
amountLabel:
|
|
81
|
+
dateLabel: le(e.date),
|
|
82
|
+
amountLabel: se(e.amount, e.direction),
|
|
80
83
|
amountVariant: e.direction === "CREDIT" ? "positive" : "default",
|
|
81
84
|
balanceLabel: c(e.runningBalance)
|
|
82
|
-
})), [
|
|
85
|
+
})), [z.data?.data]), mt = b.canRead && Y.length > 0, X = u((t) => {
|
|
83
86
|
if (!y || !b.canRead) return;
|
|
84
87
|
let n = window.open("", "_blank");
|
|
85
88
|
if (!n) {
|
|
86
89
|
e.error(h.viewStatementErrorToast);
|
|
87
90
|
return;
|
|
88
91
|
}
|
|
89
|
-
n.opener = null,
|
|
92
|
+
n.opener = null, L((e) => new Set(e).add(t)), W({
|
|
90
93
|
id: p,
|
|
91
94
|
statementId: t
|
|
92
95
|
}).then((e) => {
|
|
93
96
|
let t = URL.createObjectURL(e);
|
|
94
|
-
n.location.href = t, window.setTimeout(() => URL.revokeObjectURL(t),
|
|
97
|
+
n.location.href = t, window.setTimeout(() => URL.revokeObjectURL(t), Oe);
|
|
95
98
|
}).catch(() => {
|
|
96
99
|
n.close(), e.error(h.viewStatementErrorToast);
|
|
97
100
|
}).finally(() => {
|
|
98
|
-
|
|
101
|
+
L((e) => {
|
|
99
102
|
if (!e.has(t)) return e;
|
|
100
103
|
let n = new Set(e);
|
|
101
104
|
return n.delete(t), n;
|
|
@@ -106,73 +109,73 @@ function p({ accountId: p, onBack: Oe, labels: ke, featureLabels: Ae, isBankingT
|
|
|
106
109
|
h.viewStatementErrorToast,
|
|
107
110
|
y,
|
|
108
111
|
b.canRead,
|
|
109
|
-
|
|
110
|
-
]),
|
|
111
|
-
let t =
|
|
112
|
+
W
|
|
113
|
+
]), ht = d(() => (B.data?.data ?? []).map((e) => {
|
|
114
|
+
let t = ce(e.statementDate);
|
|
112
115
|
return {
|
|
113
116
|
key: e.statementId,
|
|
114
117
|
label: t,
|
|
115
118
|
viewButtonAriaLabel: l(m.viewStatementButtonAriaLabel, { date: t }),
|
|
116
|
-
isViewDisabled:
|
|
117
|
-
onView: () =>
|
|
119
|
+
isViewDisabled: I.has(e.statementId),
|
|
120
|
+
onView: () => X(e.statementId)
|
|
118
121
|
};
|
|
119
122
|
}), [
|
|
120
|
-
|
|
123
|
+
B.data?.data,
|
|
121
124
|
m.viewStatementButtonAriaLabel,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]), Z =
|
|
125
|
-
|
|
126
|
-
}, [
|
|
127
|
-
|
|
128
|
-
}, []),
|
|
129
|
-
|
|
130
|
-
}, [Q]),
|
|
131
|
-
|
|
132
|
-
}, [Z]),
|
|
125
|
+
I,
|
|
126
|
+
X
|
|
127
|
+
]), Z = B.data?.nextPaginationToken ?? void 0, Q = B.data?.prevPaginationToken ?? void 0, gt = S && w === "statements" && !!B.data && !B.isError, _t = S && w === "statements" && B.isLoading, vt = S && w === "statements" && B.isError, yt = u(() => {
|
|
128
|
+
B.refetch();
|
|
129
|
+
}, [B.refetch]), bt = u((e) => {
|
|
130
|
+
et(e), F(void 0);
|
|
131
|
+
}, []), xt = u(() => {
|
|
132
|
+
F(Q);
|
|
133
|
+
}, [Q]), St = u(() => {
|
|
134
|
+
F(Z);
|
|
135
|
+
}, [Z]), Ct = C || !a(O, A), wt = d(() => {
|
|
133
136
|
let e = [{ after: s() }];
|
|
134
|
-
return
|
|
135
|
-
}, [
|
|
137
|
+
return A && e.push({ after: o(A) }), e;
|
|
138
|
+
}, [A]), Tt = d(() => {
|
|
136
139
|
let e = [{ after: s() }];
|
|
137
|
-
return
|
|
138
|
-
}, [
|
|
140
|
+
return O && e.push({ before: o(O) }), e;
|
|
141
|
+
}, [O]), Et = u((e) => {
|
|
139
142
|
if (e) {
|
|
140
|
-
let { startDate: e, endDate: t } =
|
|
141
|
-
|
|
143
|
+
let { startDate: e, endDate: t } = ie();
|
|
144
|
+
k(e), j(t);
|
|
142
145
|
}
|
|
143
|
-
|
|
144
|
-
}, []),
|
|
145
|
-
if (!y || !b.canRead || !
|
|
146
|
-
|
|
146
|
+
$e(e);
|
|
147
|
+
}, []), Dt = u(async () => {
|
|
148
|
+
if (!y || !b.canRead || !O || !A || !a(O, A)) return;
|
|
149
|
+
$e(!1);
|
|
147
150
|
let t = e.loading(h.exportLoadingToast);
|
|
148
151
|
try {
|
|
149
|
-
let n = await
|
|
152
|
+
let n = await U({
|
|
150
153
|
id: p,
|
|
151
|
-
startDate:
|
|
152
|
-
endDate:
|
|
154
|
+
startDate: re(O),
|
|
155
|
+
endDate: re(A)
|
|
153
156
|
});
|
|
154
|
-
|
|
157
|
+
ae(n.csv, n.filename), e.success(h.exportSuccessToast, {
|
|
155
158
|
id: t,
|
|
156
|
-
duration:
|
|
159
|
+
duration: we
|
|
157
160
|
});
|
|
158
161
|
} catch {
|
|
159
162
|
e.error(h.exportErrorToast, {
|
|
160
163
|
id: t,
|
|
161
|
-
duration:
|
|
164
|
+
duration: Te
|
|
162
165
|
});
|
|
163
166
|
}
|
|
164
167
|
}, [
|
|
165
168
|
p,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
U,
|
|
170
|
+
A,
|
|
171
|
+
O,
|
|
169
172
|
h.exportErrorToast,
|
|
170
173
|
h.exportLoadingToast,
|
|
171
174
|
h.exportSuccessToast,
|
|
172
175
|
y,
|
|
173
176
|
b.canRead
|
|
174
177
|
]), $ = u(async (t, n) => {
|
|
175
|
-
if (!await
|
|
178
|
+
if (!await oe(t)) return;
|
|
176
179
|
let r = {
|
|
177
180
|
account: h.copyAccountNumberToast,
|
|
178
181
|
routing: h.copyRoutingNumberToast,
|
|
@@ -180,105 +183,105 @@ function p({ accountId: p, onBack: Oe, labels: ke, featureLabels: Ae, isBankingT
|
|
|
180
183
|
bankAddress: h.copyBankAddressToast
|
|
181
184
|
};
|
|
182
185
|
if (e.success(r[n]), n === "account") {
|
|
183
|
-
|
|
186
|
+
qe(!0), window.setTimeout(() => qe(!1), 2e3);
|
|
184
187
|
return;
|
|
185
188
|
}
|
|
186
|
-
n === "routing" && (
|
|
189
|
+
n === "routing" && (Ye(!0), window.setTimeout(() => Ye(!1), 2e3));
|
|
187
190
|
}, [
|
|
188
191
|
h.copyAccountNumberToast,
|
|
189
192
|
h.copyBankAddressToast,
|
|
190
193
|
h.copyBankNameToast,
|
|
191
194
|
h.copyRoutingNumberToast
|
|
192
|
-
]),
|
|
193
|
-
e && (D({ nickname:
|
|
195
|
+
]), Ot = (e) => {
|
|
196
|
+
e && (D({ nickname: G?.nickname?.trim() ?? "" }), H()), T(e);
|
|
194
197
|
};
|
|
195
|
-
return /* @__PURE__ */ xe
|
|
198
|
+
return /* @__PURE__ */ Ce(xe, {
|
|
196
199
|
labels: m,
|
|
197
|
-
title:
|
|
198
|
-
bankDisplayName:
|
|
199
|
-
bankLogoSrc:
|
|
200
|
-
bankLogoAlt:
|
|
201
|
-
balanceLabel:
|
|
200
|
+
title: ft,
|
|
201
|
+
bankDisplayName: K,
|
|
202
|
+
bankLogoSrc: Pe,
|
|
203
|
+
bankLogoAlt: Fe,
|
|
204
|
+
balanceLabel: pt,
|
|
202
205
|
balanceTestId: "bank-accounts-widget-detail-balance",
|
|
203
|
-
isBankingTaglineVisible:
|
|
206
|
+
isBankingTaglineVisible: Ne,
|
|
204
207
|
activeTab: w,
|
|
205
|
-
transactionRows:
|
|
206
|
-
statementRows:
|
|
207
|
-
isStatementsLoading:
|
|
208
|
-
isStatementsError:
|
|
209
|
-
onStatementsRetry:
|
|
210
|
-
isStatementsPaginationVisible:
|
|
211
|
-
statementsPageSize:
|
|
212
|
-
statementsPageSizeOptions:
|
|
208
|
+
transactionRows: Y,
|
|
209
|
+
statementRows: ht,
|
|
210
|
+
isStatementsLoading: _t,
|
|
211
|
+
isStatementsError: vt,
|
|
212
|
+
onStatementsRetry: yt,
|
|
213
|
+
isStatementsPaginationVisible: gt,
|
|
214
|
+
statementsPageSize: M,
|
|
215
|
+
statementsPageSizeOptions: Ee,
|
|
213
216
|
isStatementsPreviousPageDisabled: !Q,
|
|
214
217
|
isStatementsNextPageDisabled: !Z,
|
|
215
|
-
onStatementsPageSizeChange:
|
|
216
|
-
onStatementsPreviousPageClick:
|
|
217
|
-
onStatementsNextPageClick:
|
|
218
|
-
showExport:
|
|
219
|
-
isExportOpen:
|
|
220
|
-
exportStartDate:
|
|
221
|
-
exportEndDate:
|
|
222
|
-
isExportDownloading:
|
|
223
|
-
isExportDownloadDisabled:
|
|
224
|
-
disabledExportStartDates:
|
|
225
|
-
disabledExportEndDates:
|
|
226
|
-
accountNumberLabel:
|
|
227
|
-
maskedAccountNumberLabel:
|
|
218
|
+
onStatementsPageSizeChange: bt,
|
|
219
|
+
onStatementsPreviousPageClick: xt,
|
|
220
|
+
onStatementsNextPageClick: St,
|
|
221
|
+
showExport: mt,
|
|
222
|
+
isExportOpen: Qe,
|
|
223
|
+
exportStartDate: O,
|
|
224
|
+
exportEndDate: A,
|
|
225
|
+
isExportDownloading: ct,
|
|
226
|
+
isExportDownloadDisabled: Ct,
|
|
227
|
+
disabledExportStartDates: wt,
|
|
228
|
+
disabledExportEndDates: Tt,
|
|
229
|
+
accountNumberLabel: G?.accountNumber ?? "",
|
|
230
|
+
maskedAccountNumberLabel: ue(G?.accountNumber ?? ""),
|
|
228
231
|
accountNumberTestId: "bank-accounts-widget-detail-account-number",
|
|
229
|
-
wireAccountNumberLabel:
|
|
230
|
-
routingNumberLabel:
|
|
231
|
-
bankAddressLabel:
|
|
232
|
-
domesticWireIntroLabel:
|
|
233
|
-
domesticWireNoteLabel:
|
|
234
|
-
thingsToKnowBodyLabel:
|
|
235
|
-
supportTeamHref:
|
|
236
|
-
isAccountNumberVisible:
|
|
237
|
-
isAccountNumberCopied:
|
|
238
|
-
isRoutingNumberCopied:
|
|
239
|
-
isDomesticWireExpanded:
|
|
240
|
-
isLoading: !v && (
|
|
241
|
-
isError: v || S && (
|
|
242
|
-
isEditOpen:
|
|
232
|
+
wireAccountNumberLabel: G?.accountNumber ?? "",
|
|
233
|
+
routingNumberLabel: G?.routingNumber ?? "",
|
|
234
|
+
bankAddressLabel: q,
|
|
235
|
+
domesticWireIntroLabel: lt,
|
|
236
|
+
domesticWireNoteLabel: ut,
|
|
237
|
+
thingsToKnowBodyLabel: dt,
|
|
238
|
+
supportTeamHref: Le,
|
|
239
|
+
isAccountNumberVisible: We,
|
|
240
|
+
isAccountNumberCopied: Ke,
|
|
241
|
+
isRoutingNumberCopied: Je,
|
|
242
|
+
isDomesticWireExpanded: Xe,
|
|
243
|
+
isLoading: !v && (Ve && !G || Be && !_ || S && (R.isLoading || w === "transactions" && z.isLoading)),
|
|
244
|
+
isError: v || S && (R.isError || w === "transactions" && z.isError),
|
|
245
|
+
isEditOpen: Ue,
|
|
243
246
|
isEditDisabled: !b.canWrite,
|
|
244
|
-
isEditError:
|
|
245
|
-
isSubmitting:
|
|
247
|
+
isEditError: V,
|
|
248
|
+
isSubmitting: st,
|
|
246
249
|
isEditSaveDisabled: C,
|
|
247
250
|
editForm: E,
|
|
248
251
|
canEdit: b.canWrite,
|
|
249
|
-
onBack:
|
|
250
|
-
onTabChange:
|
|
251
|
-
onToggleAccountNumberVisibility: () =>
|
|
252
|
-
onCopyAccountNumber: () => void $(
|
|
253
|
-
onCopyRoutingNumber: () => void $(
|
|
254
|
-
onCopyBankName: () => void $(
|
|
255
|
-
onCopyBankAddress: () => void $(
|
|
256
|
-
onDomesticWireExpandedChange:
|
|
257
|
-
onEditOpenChange:
|
|
252
|
+
onBack: Ae,
|
|
253
|
+
onTabChange: He,
|
|
254
|
+
onToggleAccountNumberVisibility: () => Ge((e) => !e),
|
|
255
|
+
onCopyAccountNumber: () => void $(G?.accountNumber ?? "", "account"),
|
|
256
|
+
onCopyRoutingNumber: () => void $(G?.routingNumber ?? "", "routing"),
|
|
257
|
+
onCopyBankName: () => void $(K, "bankName"),
|
|
258
|
+
onCopyBankAddress: () => void $(q ?? "", "bankAddress"),
|
|
259
|
+
onDomesticWireExpandedChange: Ze,
|
|
260
|
+
onEditOpenChange: Ot,
|
|
258
261
|
onEditFormChange: (e) => {
|
|
259
|
-
|
|
262
|
+
V && H(), D(e);
|
|
260
263
|
},
|
|
261
264
|
onEditSubmit: () => {
|
|
262
265
|
if (!y || !b.canWrite) return;
|
|
263
266
|
let t = E.nickname.trim();
|
|
264
|
-
t &&
|
|
267
|
+
t && ot({
|
|
265
268
|
path: { id: p },
|
|
266
269
|
body: { nickname: t }
|
|
267
270
|
}, {
|
|
268
271
|
onSuccess: () => {
|
|
269
|
-
g(
|
|
272
|
+
g(i.AccountUpdated, { accountId: p }), e.success(h.editSuccessToast), T(!1);
|
|
270
273
|
},
|
|
271
274
|
onError: () => {
|
|
272
275
|
e.error(h.editErrorToast);
|
|
273
276
|
}
|
|
274
277
|
});
|
|
275
278
|
},
|
|
276
|
-
onEditNicknameClick: () =>
|
|
277
|
-
onExportOpenChange:
|
|
278
|
-
onExportStartDateChange:
|
|
279
|
-
onExportEndDateChange:
|
|
279
|
+
onEditNicknameClick: () => Ot(!0),
|
|
280
|
+
onExportOpenChange: Et,
|
|
281
|
+
onExportStartDateChange: k,
|
|
282
|
+
onExportEndDateChange: j,
|
|
280
283
|
onExportDownload: () => {
|
|
281
|
-
|
|
284
|
+
Dt();
|
|
282
285
|
}
|
|
283
286
|
});
|
|
284
287
|
}
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
CHANGED
|
@@ -4,43 +4,38 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getUsers as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getUsersOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders 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
10
|
import "../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useEffect as
|
|
12
|
-
import { useInfiniteQuery as
|
|
11
|
+
import { useEffect as a, useMemo as o } from "react";
|
|
12
|
+
import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
14
|
+
var c = 100, l = ["ACTIVE", "INVITED"];
|
|
15
|
+
function u(l, u, d) {
|
|
16
|
+
let { client: f, organizationId: p, authEpoch: m, organizationStatus: h } = r(), g = i(p), _ = d?.length ? { Permissions: d } : {}, v = t({
|
|
17
|
+
client: f,
|
|
18
|
+
headers: g,
|
|
19
19
|
query: {
|
|
20
|
-
Status:
|
|
21
|
-
Limit:
|
|
22
|
-
...
|
|
20
|
+
Status: l,
|
|
21
|
+
Limit: c,
|
|
22
|
+
..._
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
queryKey
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"all",
|
|
31
|
-
u
|
|
32
|
-
],
|
|
33
|
-
placeholderData: n(y.queryKey, g),
|
|
34
|
-
enabled: d,
|
|
24
|
+
}), y = s({
|
|
25
|
+
...n(v.queryKey, {
|
|
26
|
+
authEpoch: m,
|
|
27
|
+
organizationStatus: h
|
|
28
|
+
}, { suffix: ["all", l] }),
|
|
29
|
+
enabled: u,
|
|
35
30
|
initialPageParam: void 0,
|
|
36
31
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
37
32
|
let { data: r } = await e({
|
|
38
|
-
client:
|
|
39
|
-
headers:
|
|
33
|
+
client: f,
|
|
34
|
+
headers: g,
|
|
40
35
|
query: {
|
|
41
|
-
Status:
|
|
42
|
-
Limit:
|
|
43
|
-
...
|
|
36
|
+
Status: l,
|
|
37
|
+
Limit: c,
|
|
38
|
+
..._,
|
|
44
39
|
...n ? { PaginationToken: n } : {}
|
|
45
40
|
},
|
|
46
41
|
signal: t,
|
|
@@ -53,32 +48,32 @@ function d(u, d, f) {
|
|
|
53
48
|
if (!(i === void 0 || r.includes(i))) return i;
|
|
54
49
|
}
|
|
55
50
|
});
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
a(() => {
|
|
52
|
+
u && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
|
|
58
53
|
}, [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
u,
|
|
55
|
+
y.hasNextPage,
|
|
56
|
+
y.isFetchingNextPage,
|
|
57
|
+
y.isError,
|
|
58
|
+
y.fetchNextPage
|
|
64
59
|
]);
|
|
65
|
-
let
|
|
66
|
-
if (
|
|
67
|
-
data:
|
|
60
|
+
let b = o(() => {
|
|
61
|
+
if (y.data) return {
|
|
62
|
+
data: y.data.pages.flatMap((e) => e.data ?? []),
|
|
68
63
|
nextPaginationToken: null,
|
|
69
64
|
prevPaginationToken: null
|
|
70
65
|
};
|
|
71
|
-
}, [
|
|
66
|
+
}, [y.data]);
|
|
72
67
|
return {
|
|
73
|
-
...
|
|
74
|
-
data:
|
|
68
|
+
...y,
|
|
69
|
+
data: b
|
|
75
70
|
};
|
|
76
71
|
}
|
|
77
|
-
function
|
|
78
|
-
let { organizationId: n, widgetToken:
|
|
72
|
+
function d({ enabled: e, permissions: t } = {}) {
|
|
73
|
+
let { organizationId: n, widgetToken: i } = r(), a = !!(n && i) && (e === !0 || e === void 0), s = u("ACTIVE", a, t), c = u("INVITED", a, t), d = o(() => {
|
|
79
74
|
let e = /* @__PURE__ */ new Map();
|
|
80
|
-
for (let t of
|
|
81
|
-
let n = t === "ACTIVE" ?
|
|
75
|
+
for (let t of l) {
|
|
76
|
+
let n = t === "ACTIVE" ? s.data?.data ?? [] : c.data?.data ?? [];
|
|
82
77
|
for (let t of n) e.set(t.id, t);
|
|
83
78
|
}
|
|
84
79
|
return {
|
|
@@ -86,16 +81,16 @@ function f({ enabled: e, permissions: t } = {}) {
|
|
|
86
81
|
nextPaginationToken: null,
|
|
87
82
|
prevPaginationToken: null
|
|
88
83
|
};
|
|
89
|
-
}, [
|
|
84
|
+
}, [s.data, c.data]), f = s.isLoading || c.isLoading, p = s.isFetchingNextPage || c.isFetchingNextPage, m = s.hasNextPage || c.hasNextPage, h = s.isError || c.isError;
|
|
90
85
|
return {
|
|
91
|
-
...
|
|
92
|
-
data:
|
|
86
|
+
...s,
|
|
87
|
+
data: d,
|
|
93
88
|
isLoading: f,
|
|
94
89
|
isFetchingNextPage: p,
|
|
95
90
|
hasNextPage: m,
|
|
96
91
|
isError: h,
|
|
97
|
-
isSuccess:
|
|
92
|
+
isSuccess: s.isSuccess && c.isSuccess
|
|
98
93
|
};
|
|
99
94
|
}
|
|
100
95
|
//#endregion
|
|
101
|
-
export {
|
|
96
|
+
export { d as useAllOrganizationUsersQuery };
|