@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
|
@@ -4,39 +4,38 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getUsers as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getUsersOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPageParam as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../allPages.js";
|
|
11
|
+
import { useMemo as c } from "react";
|
|
12
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
14
|
+
var u = 100;
|
|
15
|
+
function d({ enabled: d, permissions: f } = {}) {
|
|
16
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = r(), v = i(m), y = !!(m && h) && (d === !0 || d === void 0), b = f?.length ? { Permissions: f } : {}, x = t({
|
|
17
|
+
client: p,
|
|
18
|
+
headers: v,
|
|
19
19
|
query: {
|
|
20
20
|
Status: "ACTIVE",
|
|
21
|
-
Limit:
|
|
22
|
-
...
|
|
21
|
+
Limit: u,
|
|
22
|
+
...b
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
authEpoch:
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
enabled: b,
|
|
24
|
+
}), S = l({
|
|
25
|
+
...n(x.queryKey, {
|
|
26
|
+
authEpoch: g,
|
|
27
|
+
organizationStatus: _
|
|
28
|
+
}, { suffix: ["all"] }),
|
|
29
|
+
enabled: y,
|
|
31
30
|
initialPageParam: void 0,
|
|
32
31
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
33
32
|
let { data: r } = await e({
|
|
34
|
-
client:
|
|
35
|
-
headers:
|
|
33
|
+
client: p,
|
|
34
|
+
headers: v,
|
|
36
35
|
query: {
|
|
37
36
|
Status: "ACTIVE",
|
|
38
|
-
Limit:
|
|
39
|
-
...
|
|
37
|
+
Limit: u,
|
|
38
|
+
...b,
|
|
40
39
|
...n ? { PaginationToken: n } : {}
|
|
41
40
|
},
|
|
42
41
|
signal: t,
|
|
@@ -44,21 +43,21 @@ function f({ enabled: f, permissions: p } = {}) {
|
|
|
44
43
|
});
|
|
45
44
|
return r;
|
|
46
45
|
},
|
|
47
|
-
getNextPageParam:
|
|
46
|
+
getNextPageParam: a
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
data:
|
|
48
|
+
s(S, y);
|
|
49
|
+
let C = c(() => {
|
|
50
|
+
if (S.data) return {
|
|
51
|
+
data: S.data.pages.flatMap((e) => e.data ?? []),
|
|
53
52
|
nextPaginationToken: null,
|
|
54
53
|
prevPaginationToken: null
|
|
55
54
|
};
|
|
56
|
-
}, [
|
|
55
|
+
}, [S.data]);
|
|
57
56
|
return {
|
|
58
|
-
...
|
|
59
|
-
data:
|
|
60
|
-
isResolving:
|
|
57
|
+
...S,
|
|
58
|
+
data: C,
|
|
59
|
+
isResolving: o(S)
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
62
|
//#endregion
|
|
64
|
-
export {
|
|
63
|
+
export { d as useAllOrganizationUsersQuery };
|
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
CHANGED
|
@@ -1,34 +1,45 @@
|
|
|
1
|
+
import { OrganizationStatus as e } from "./organizationStatus.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
|
|
2
|
-
var
|
|
3
|
-
if (!
|
|
4
|
-
let i = { ...
|
|
5
|
-
return delete i[
|
|
6
|
-
...
|
|
3
|
+
var t = "x-organization-id", n = (e) => typeof e == "object" && !!e && !Array.isArray(e), r = (e) => n(e.headers) ? e.headers[t] : void 0, i = ([e, ...r]) => {
|
|
4
|
+
if (!n(e) || !n(e.headers)) return [e, ...r];
|
|
5
|
+
let i = { ...e.headers };
|
|
6
|
+
return delete i[t], [{
|
|
7
|
+
...e,
|
|
7
8
|
headers: i
|
|
8
9
|
}, ...r];
|
|
9
|
-
},
|
|
10
|
-
function
|
|
11
|
-
let s = o ?
|
|
12
|
-
return
|
|
10
|
+
}, a = (e) => JSON.stringify(e, (e, t) => n(t) ? Object.fromEntries(Object.keys(t).sort().map((e) => [e, t[e]])) : t);
|
|
11
|
+
function o(e, t, o) {
|
|
12
|
+
let s = o ? i(e) : e, [c] = s;
|
|
13
|
+
return a(t && n(c) ? [c.baseUrl, r(c)] : s);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
let [
|
|
16
|
-
return
|
|
15
|
+
function s(r, i) {
|
|
16
|
+
let [a] = r;
|
|
17
|
+
return i === e.Rotating && n(a) && n(a.headers) && t in a.headers && !a.headers[t];
|
|
17
18
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let r = o(e,
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
return
|
|
19
|
+
var c = /* @__PURE__ */ new Map(), l = 500;
|
|
20
|
+
function u(e, t, n) {
|
|
21
|
+
let r = o(e, t, n), i = `${t}:${n}:${e.length}:${r}`, a = c.get(i);
|
|
22
|
+
if (a) return c.delete(i), c.set(i, a), a;
|
|
23
|
+
let s = (i, a) => a && o(a.queryKey.slice(0, e.length), t, n) === r ? i : void 0;
|
|
24
|
+
return c.size >= l && c.delete(c.keys().next().value), c.set(i, s), s;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
function d(e, { authEpoch: t, organizationPending: n }, { carryWithinOrg: r = !1 } = {}) {
|
|
26
|
+
function d(e, { authEpoch: t, organizationStatus: n }, { carryWithinOrg: r = !1 } = {}) {
|
|
27
27
|
return {
|
|
28
|
-
placeholderData:
|
|
28
|
+
placeholderData: u(e.queryKey, r, s(e.queryKey, n)),
|
|
29
29
|
...e,
|
|
30
30
|
queryKey: [...e.queryKey, { authEpoch: t }]
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
function f(e, { authEpoch: t, organizationStatus: n }, { suffix: r = [], carryWhileRotating: i = !0 } = {}) {
|
|
34
|
+
let a = [
|
|
35
|
+
...e,
|
|
36
|
+
...r,
|
|
37
|
+
"infinite"
|
|
38
|
+
];
|
|
39
|
+
return {
|
|
40
|
+
queryKey: [...a, { authEpoch: t }],
|
|
41
|
+
placeholderData: u(a, !1, i && s(a, n))
|
|
42
|
+
};
|
|
43
|
+
}
|
|
33
44
|
//#endregion
|
|
34
|
-
export {
|
|
45
|
+
export { d as withAuthEpoch, f as withAuthEpochInfinite };
|
|
@@ -11,14 +11,14 @@ import { transactionsValidationsInvalidationKey as a } from "./index2.js";
|
|
|
11
11
|
import { useMutation as o, useQuery as s } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js
|
|
13
13
|
function c() {
|
|
14
|
-
let { client: t, organizationId: r, widgetToken: a, authEpoch: o,
|
|
14
|
+
let { client: t, organizationId: r, widgetToken: a, authEpoch: o, organizationStatus: c } = i(), l = !!(r && a), u = e({
|
|
15
15
|
client: t,
|
|
16
16
|
headers: { "x-organization-id": r ?? "" }
|
|
17
17
|
});
|
|
18
18
|
return s({
|
|
19
19
|
...n(u, {
|
|
20
20
|
authEpoch: o,
|
|
21
|
-
|
|
21
|
+
organizationStatus: c
|
|
22
22
|
}),
|
|
23
23
|
enabled: l
|
|
24
24
|
});
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { createClientSecretInstaller as e } from "../../../../data-access/dist/lib/scopedClientSecret.js";
|
|
6
|
-
import { registerQueryClient as t, unregisterQueryClient as
|
|
7
|
-
import { createEmbeddedClient as
|
|
8
|
-
import { EmbedApiProvider as
|
|
6
|
+
import { registerQueryClient as t, unregisterQueryClient as ee } from "../../../../data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { createEmbeddedClient as te } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
|
|
8
|
+
import { EmbedApiProvider as n } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
9
9
|
import "../../../../data-access/dist/index.js";
|
|
10
10
|
import { resolveUIFramework as r } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
11
11
|
import { UIProvider as ne } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
@@ -14,31 +14,32 @@ import "../../../../ui/dist/index.js";
|
|
|
14
14
|
import { getGlobalSnapshot as i, subscribeToGlobal as ie } from "./globalStore.js";
|
|
15
15
|
import { configureEmbeddedClient as ae } from "../analytics/client.js";
|
|
16
16
|
import { generateCorrelationId as oe } from "../analytics/ids.js";
|
|
17
|
-
import { WidgetContext as
|
|
18
|
-
import { resolveOrgId as
|
|
19
|
-
import { useWidgetFetch as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
17
|
+
import { WidgetContext as a } from "./WidgetContext.js";
|
|
18
|
+
import { resolveOrgId as o, useAuthEpoch as s } from "./utils.js";
|
|
19
|
+
import { useWidgetFetch as se } from "./useWidgetFetch.js";
|
|
20
|
+
import { deriveOrganizationStatus as ce } from "./deriveOrganizationStatus.js";
|
|
21
|
+
import { deriveWidgetInitState as le, useWidgetInitPublisher as ue } from "./useWidgetInitPublisher.js";
|
|
22
|
+
import { useEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as de } from "react";
|
|
23
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
24
|
+
import { QueryClient as p, QueryClientProvider as fe } from "@tanstack/react-query";
|
|
24
25
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js
|
|
25
26
|
function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configClient: v, gatewayRouting: y, linkComponent: b, uiFramework: x, implementation: S, analytics: C, unstable_initResponseOverride: w, disclosuresAcceptance: T, providerLabels: E }) {
|
|
26
|
-
let D = de(ie, i, i), O = h ?? D.baseUrl, k = g === void 0 ? D.widgetToken : g, A = _ === void 0 ? D.organizationId : _, j = v ?? D.configClient, M = y ?? D.gatewayRouting, N = b ?? D.linkComponent, P = x ?? D.uiFramework, F = S ?? D.implementation, I = C !== !1, [L] =
|
|
27
|
+
let D = de(ie, i, i), O = h ?? D.baseUrl, k = g === void 0 ? D.widgetToken : g, A = _ === void 0 ? D.organizationId : _, j = v ?? D.configClient, M = y ?? D.gatewayRouting, N = b ?? D.linkComponent, P = x ?? D.uiFramework, F = S ?? D.implementation, I = C !== !1, [L] = d(oe), R = u({
|
|
27
28
|
enabled: I,
|
|
28
29
|
organizationId: A,
|
|
29
30
|
rootCorrelationId: L
|
|
30
|
-
}), [z] =
|
|
31
|
+
}), [z] = d(() => new p({ defaultOptions: {
|
|
31
32
|
queries: {
|
|
32
33
|
retry: !1,
|
|
33
34
|
refetchOnWindowFocus: !1
|
|
34
35
|
},
|
|
35
36
|
mutations: { retry: !1 }
|
|
36
37
|
} }));
|
|
37
|
-
|
|
38
|
-
let B =
|
|
38
|
+
c(() => (t(z), () => ee(z)), [z]);
|
|
39
|
+
let B = u(k);
|
|
39
40
|
B.current = k;
|
|
40
|
-
let V =
|
|
41
|
-
let e = ae(
|
|
41
|
+
let V = u(null), pe = l(() => e(V), []), me = s(k), H = l(() => {
|
|
42
|
+
let e = ae(te(O), {
|
|
42
43
|
tokenRef: B,
|
|
43
44
|
analyticsContextRef: R,
|
|
44
45
|
clientSecretRef: V,
|
|
@@ -50,7 +51,7 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
50
51
|
j,
|
|
51
52
|
M
|
|
52
53
|
]);
|
|
53
|
-
|
|
54
|
+
c(() => {
|
|
54
55
|
if (!I || !("window" in globalThis)) return;
|
|
55
56
|
let e = !1;
|
|
56
57
|
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
|
|
@@ -60,10 +61,20 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
60
61
|
};
|
|
61
62
|
}, [I]);
|
|
62
63
|
let U = re(r(P));
|
|
63
|
-
|
|
64
|
+
c(() => {
|
|
64
65
|
U && U().catch(() => {});
|
|
65
66
|
}, [U]);
|
|
66
|
-
let { result:
|
|
67
|
+
let { result: he, loading: W, error: G, initStaleForToken: K, initReplacementPending: ge, refetch: q } = se(w ? null : H, k, R), J = k ? w ?? he ?? void 0 : void 0, Y = !w && K, X = o(A, Y ? void 0 : J?.organizationId), _e = ce({
|
|
68
|
+
organizationId: X,
|
|
69
|
+
cascadeOrgId: A,
|
|
70
|
+
ownsFetch: !0,
|
|
71
|
+
parentStatus: "none",
|
|
72
|
+
hasToken: !!k,
|
|
73
|
+
loading: W,
|
|
74
|
+
error: G,
|
|
75
|
+
hasResult: !!J,
|
|
76
|
+
initReplacementPending: ge
|
|
77
|
+
}), ve = l(() => le({
|
|
67
78
|
hasToken: !!k,
|
|
68
79
|
loading: W,
|
|
69
80
|
error: G,
|
|
@@ -76,8 +87,8 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
76
87
|
J,
|
|
77
88
|
Y
|
|
78
89
|
]);
|
|
79
|
-
|
|
80
|
-
let Z =
|
|
90
|
+
ue(ve, k);
|
|
91
|
+
let Z = l(() => ({
|
|
81
92
|
enabled: I,
|
|
82
93
|
organizationId: X,
|
|
83
94
|
rootCorrelationId: L
|
|
@@ -87,7 +98,7 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
87
98
|
L
|
|
88
99
|
]);
|
|
89
100
|
R.current = Z;
|
|
90
|
-
let Q =
|
|
101
|
+
let Q = l(() => ({
|
|
91
102
|
baseUrl: h,
|
|
92
103
|
widgetToken: g,
|
|
93
104
|
organizationId: _,
|
|
@@ -105,7 +116,7 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
105
116
|
b,
|
|
106
117
|
x,
|
|
107
118
|
S
|
|
108
|
-
]), $ =
|
|
119
|
+
]), $ = l(() => ({
|
|
109
120
|
baseUrl: O,
|
|
110
121
|
widgetToken: k,
|
|
111
122
|
organizationId: X,
|
|
@@ -125,7 +136,7 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
125
136
|
P,
|
|
126
137
|
F,
|
|
127
138
|
J
|
|
128
|
-
]),
|
|
139
|
+
]), ye = l(() => ({
|
|
129
140
|
resolved: $,
|
|
130
141
|
own: Q,
|
|
131
142
|
refetch: q,
|
|
@@ -148,18 +159,18 @@ function m({ children: m, baseUrl: h, widgetToken: g, organizationId: _, configC
|
|
|
148
159
|
T,
|
|
149
160
|
E
|
|
150
161
|
]);
|
|
151
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ f(fe, {
|
|
152
163
|
client: z,
|
|
153
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ f(n, {
|
|
154
165
|
client: H,
|
|
155
166
|
organizationId: X,
|
|
156
167
|
widgetToken: k,
|
|
157
|
-
installClientSecret:
|
|
158
|
-
authEpoch:
|
|
159
|
-
|
|
160
|
-
children: /* @__PURE__ */
|
|
161
|
-
value:
|
|
162
|
-
children: /* @__PURE__ */
|
|
168
|
+
installClientSecret: pe,
|
|
169
|
+
authEpoch: me,
|
|
170
|
+
organizationStatus: _e,
|
|
171
|
+
children: /* @__PURE__ */ f(a.Provider, {
|
|
172
|
+
value: ye,
|
|
173
|
+
children: /* @__PURE__ */ f(ne, {
|
|
163
174
|
linkComponent: N,
|
|
164
175
|
uiFramework: P,
|
|
165
176
|
children: m
|