@tesouro/embedded-components-react 0.5.226 → 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/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/index10.js +12 -12
- 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/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/data-access/dist/index.js +39 -38
- 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/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/invoicing-widget/data-access/dist/index12.js
CHANGED
|
@@ -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/invoicing-widget/data-access/dist/index12.js
|
|
12
12
|
function a({ enabled: a = !0, ...o }) {
|
|
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) && a, p = e({
|
|
14
14
|
client: s,
|
|
15
15
|
headers: r(c),
|
|
16
16
|
query: o
|
|
@@ -18,7 +18,7 @@ function a({ enabled: a = !0, ...o }) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
CHANGED
|
@@ -4,81 +4,82 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { postBankDetails as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getBankDetailsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { OrganizationStatus as n } from "../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { invalidateAllClients as i } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
10
|
+
import { useEmbedApi as a } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
11
|
+
import { organizationHeaders as o } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
12
|
+
import { useAllBankAccountsQuery as s } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
13
|
+
import { useAllExternalBankAccountsQuery as c } from "../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
|
|
13
14
|
import "../../../shared/data-access/dist/index.js";
|
|
14
|
-
import { entityBankAccountsInvalidationKey as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { useMutation as
|
|
15
|
+
import { entityBankAccountsInvalidationKey as l } from "./index2.js";
|
|
16
|
+
import { useMemo as u } from "react";
|
|
17
|
+
import { useMutation as d, useQuery as f } from "@tanstack/react-query";
|
|
17
18
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
|
|
18
|
-
function
|
|
19
|
-
let { client:
|
|
20
|
-
client:
|
|
21
|
-
headers:
|
|
19
|
+
function p({ enabled: e = !0 } = {}) {
|
|
20
|
+
let { client: n, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = t({
|
|
21
|
+
client: n,
|
|
22
|
+
headers: o(i)
|
|
22
23
|
});
|
|
23
|
-
return
|
|
24
|
-
...
|
|
24
|
+
return f({
|
|
25
|
+
...r(u, {
|
|
25
26
|
authEpoch: c,
|
|
26
|
-
|
|
27
|
+
organizationStatus: l
|
|
27
28
|
}),
|
|
28
|
-
enabled: e && !!(
|
|
29
|
+
enabled: e && !!(i && s)
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let { client: t, organizationId: n } =
|
|
33
|
-
return
|
|
32
|
+
function m() {
|
|
33
|
+
let { client: t, organizationId: n } = a();
|
|
34
|
+
return d({
|
|
34
35
|
mutationFn: async ({ body: r }) => {
|
|
35
36
|
let { data: i } = await e({
|
|
36
37
|
client: t,
|
|
37
|
-
headers:
|
|
38
|
+
headers: o(n),
|
|
38
39
|
body: r,
|
|
39
40
|
throwOnError: !0
|
|
40
41
|
});
|
|
41
42
|
return i;
|
|
42
43
|
},
|
|
43
44
|
onSuccess: async () => {
|
|
44
|
-
await
|
|
45
|
+
await i(l({
|
|
45
46
|
client: t,
|
|
46
47
|
organizationId: n
|
|
47
48
|
}));
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
let { organizationId:
|
|
54
|
-
...(
|
|
52
|
+
var h = (e) => e ? e.slice(-4) : null;
|
|
53
|
+
function g({ enabled: e = !0, canReadEmbedded: t = !1, canReadExternal: r = !1 } = {}) {
|
|
54
|
+
let { organizationId: i, widgetToken: o, organizationStatus: l } = a(), d = l === n.Rotating, f = e && !!(o && (i || d)), m = f && t, g = f && r, _ = p({ enabled: e }), v = s({ enabled: m }), y = c({ enabled: g }), b = f ? _.data?.data : void 0, x = m ? v.data?.data : void 0, S = g ? y.data?.data : void 0, C = u(() => [
|
|
55
|
+
...(b ?? []).map((e) => ({
|
|
55
56
|
id: e.id,
|
|
56
57
|
type: "BANK_DETAILS",
|
|
57
58
|
displayName: e.display_name ?? null,
|
|
58
|
-
accountNumberLast4:
|
|
59
|
+
accountNumberLast4: h(e.account_number) ?? e.account_number_last4 ?? null
|
|
59
60
|
})),
|
|
60
|
-
...(
|
|
61
|
+
...(x ?? []).filter((e) => e.status === "ACTIVE").map((e) => ({
|
|
61
62
|
id: e.id,
|
|
62
63
|
type: "INTERNAL",
|
|
63
64
|
displayName: e.nickname ?? null,
|
|
64
|
-
accountNumberLast4:
|
|
65
|
+
accountNumberLast4: h(e.accountNumber)
|
|
65
66
|
})),
|
|
66
|
-
...(
|
|
67
|
+
...(S ?? []).filter((e) => e.accountStatus === "ACTIVE" && e.verificationStatus === "VERIFIED").map((e) => ({
|
|
67
68
|
id: e.id,
|
|
68
69
|
type: "EXTERNAL",
|
|
69
70
|
displayName: e.nickname || e.nameOnAccount || null,
|
|
70
|
-
accountNumberLast4:
|
|
71
|
+
accountNumberLast4: h(e.accountNumber)
|
|
71
72
|
}))
|
|
72
73
|
], [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]),
|
|
74
|
+
b,
|
|
75
|
+
x,
|
|
76
|
+
S
|
|
77
|
+
]), w = f && _.isLoading || m && v.isLoading || g && y.isLoading;
|
|
77
78
|
return {
|
|
78
|
-
paymentAccounts:
|
|
79
|
-
isLoading:
|
|
80
|
-
isIncomplete:
|
|
79
|
+
paymentAccounts: C,
|
|
80
|
+
isLoading: w,
|
|
81
|
+
isIncomplete: w || f && d || f && (_.isFetching || _.isError) || m && (v.isFetching || v.isError || v.hasNextPage) || g && (y.isFetching || y.isError || y.hasNextPage) || !!(f && _.data?.next_pagination_token)
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
84
|
//#endregion
|
|
84
|
-
export {
|
|
85
|
+
export { m as useCreateEntityBankAccountMutation, p as useEntityBankAccountsQuery, g as usePaymentAccountsQuery };
|
|
@@ -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/linked-accounts-widget/data-access/dist/index4.js
|
|
12
12
|
function a({ enabled: a, ...o } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = e({
|
|
14
14
|
query: o,
|
|
15
15
|
client: s,
|
|
16
16
|
headers: r(c)
|
|
@@ -18,7 +18,7 @@ function a({ enabled: a, ...o } = {}) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(f, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: !!(c && l) && (a === !0 || a === void 0)
|
|
24
24
|
});
|