@tesouro/embedded-components-react 0.5.148 → 0.5.149
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/bank-account-onboarding-widget/data-access/dist/index11.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +21 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +43 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +52 -49
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +30 -15
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -17
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +99 -98
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +139 -138
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +11 -10
- 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/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +16 -13
- package/package.json +7 -1
|
@@ -10,35 +10,38 @@ import { useCallback as i, useMemo as a, useRef as o } from "react";
|
|
|
10
10
|
import { useQueries as s } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js
|
|
12
12
|
function c({ roleIds: c, enabled: l }) {
|
|
13
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(),
|
|
13
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationPending: m } = n(), h = r(d), g = !!(d && f) && (l === !0 || l === void 0), _ = a(() => [...new Set(c)].sort(), [c]), v = s({ queries: _.map((n) => ({
|
|
14
14
|
...t(e({
|
|
15
15
|
client: u,
|
|
16
|
-
headers:
|
|
16
|
+
headers: h,
|
|
17
17
|
path: { roleId: n }
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
}), {
|
|
19
|
+
authEpoch: p,
|
|
20
|
+
organizationPending: m
|
|
21
|
+
}),
|
|
22
|
+
enabled: g
|
|
23
|
+
})) }), y = o(v);
|
|
24
|
+
y.current = v;
|
|
25
|
+
let b = i(() => {
|
|
26
|
+
for (let e of y.current) e.refetch();
|
|
24
27
|
}, []);
|
|
25
28
|
return a(() => {
|
|
26
29
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
27
|
-
return
|
|
28
|
-
let i =
|
|
30
|
+
return _.forEach((n, r) => {
|
|
31
|
+
let i = v[r], a = i?.data?.data;
|
|
29
32
|
a && e.set(n, new Set(a.map((e) => e.key))), i?.isLoading && t.add(n);
|
|
30
33
|
}), {
|
|
31
34
|
byRoleId: e,
|
|
32
|
-
isResolving:
|
|
33
|
-
isError:
|
|
35
|
+
isResolving: g && _.length > 0 && v.some((e) => e.isLoading),
|
|
36
|
+
isError: v.some((e) => e.isError),
|
|
34
37
|
resolvingRoleIds: t,
|
|
35
|
-
refetch:
|
|
38
|
+
refetch: b
|
|
36
39
|
};
|
|
37
40
|
}, [
|
|
38
|
-
g,
|
|
39
41
|
_,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
v,
|
|
43
|
+
g,
|
|
44
|
+
b
|
|
42
45
|
]);
|
|
43
46
|
}
|
|
44
47
|
//#endregion
|
|
@@ -9,13 +9,16 @@ import { organizationHeaders as r } from "./organizationHeaders.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js
|
|
11
11
|
function a({ enabled: a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(),
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (a === !0 || a === void 0);
|
|
13
13
|
return i({
|
|
14
14
|
...t(e({
|
|
15
15
|
client: o,
|
|
16
16
|
headers: r(s)
|
|
17
|
-
}),
|
|
18
|
-
|
|
17
|
+
}), {
|
|
18
|
+
authEpoch: l,
|
|
19
|
+
organizationPending: u
|
|
20
|
+
}),
|
|
21
|
+
enabled: d,
|
|
19
22
|
staleTime: Infinity,
|
|
20
23
|
refetchOnMount: !1
|
|
21
24
|
});
|
|
@@ -9,25 +9,28 @@ import { isUserDataNotFoundError as r } from "./isUserDataNotFoundError.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js
|
|
11
11
|
function a({ key: a, enabled: o, defaultWhenNotFound: s }) {
|
|
12
|
-
let { client: c, widgetToken: l, authEpoch: u } = n(),
|
|
12
|
+
let { client: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(l && a) && o !== !1, p = e({
|
|
13
13
|
client: c,
|
|
14
14
|
path: { key: a }
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
}), m = p.queryFn, h = t(p, {
|
|
16
|
+
authEpoch: u,
|
|
17
|
+
organizationPending: d
|
|
18
|
+
});
|
|
19
|
+
return i(s !== void 0 && m ? {
|
|
20
|
+
...h,
|
|
21
|
+
enabled: f,
|
|
22
|
+
queryKey: [...h.queryKey, { userDataNotFoundDefault: s }],
|
|
20
23
|
queryFn: async (e) => {
|
|
21
24
|
try {
|
|
22
|
-
return await
|
|
25
|
+
return await m(e);
|
|
23
26
|
} catch (e) {
|
|
24
27
|
if (r(e)) return { value: s };
|
|
25
28
|
throw e;
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
} : {
|
|
29
|
-
...
|
|
30
|
-
enabled:
|
|
32
|
+
...h,
|
|
33
|
+
enabled: f
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
36
|
//#endregion
|
|
@@ -13,26 +13,29 @@ 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
14
|
var u = 100;
|
|
15
15
|
function d({ enabled: d, permissions: f } = {}) {
|
|
16
|
-
let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = r(),
|
|
16
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationPending: _ } = r(), v = i(m), y = !!(m && h) && (d === !0 || d === void 0), b = f?.length ? { Permissions: f } : {}, x = t({
|
|
17
17
|
client: p,
|
|
18
|
-
headers:
|
|
18
|
+
headers: v,
|
|
19
19
|
query: {
|
|
20
20
|
Status: "ACTIVE",
|
|
21
21
|
Limit: u,
|
|
22
|
-
...
|
|
22
|
+
...b
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
queryKey: [...n(
|
|
26
|
-
|
|
24
|
+
}), S = l({
|
|
25
|
+
queryKey: [...n(x, {
|
|
26
|
+
authEpoch: g,
|
|
27
|
+
organizationPending: _
|
|
28
|
+
}).queryKey, "all"],
|
|
29
|
+
enabled: y,
|
|
27
30
|
initialPageParam: void 0,
|
|
28
31
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
32
|
let { data: r } = await e({
|
|
30
33
|
client: p,
|
|
31
|
-
headers:
|
|
34
|
+
headers: v,
|
|
32
35
|
query: {
|
|
33
36
|
Status: "ACTIVE",
|
|
34
37
|
Limit: u,
|
|
35
|
-
...
|
|
38
|
+
...b,
|
|
36
39
|
...n ? { PaginationToken: n } : {}
|
|
37
40
|
},
|
|
38
41
|
signal: t,
|
|
@@ -42,18 +45,18 @@ function d({ enabled: d, permissions: f } = {}) {
|
|
|
42
45
|
},
|
|
43
46
|
getNextPageParam: a
|
|
44
47
|
});
|
|
45
|
-
s(
|
|
46
|
-
let
|
|
47
|
-
if (
|
|
48
|
-
data:
|
|
48
|
+
s(S, y);
|
|
49
|
+
let C = c(() => {
|
|
50
|
+
if (S.data) return {
|
|
51
|
+
data: S.data.pages.flatMap((e) => e.data ?? []),
|
|
49
52
|
nextPaginationToken: null,
|
|
50
53
|
prevPaginationToken: null
|
|
51
54
|
};
|
|
52
|
-
}, [
|
|
55
|
+
}, [S.data]);
|
|
53
56
|
return {
|
|
54
|
-
...
|
|
55
|
-
data:
|
|
56
|
-
isResolving: o(
|
|
57
|
+
...S,
|
|
58
|
+
data: C,
|
|
59
|
+
isResolving: o(S)
|
|
57
60
|
};
|
|
58
61
|
}
|
|
59
62
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
CHANGED
|
@@ -11,21 +11,21 @@ function a(e, a, o) {
|
|
|
11
11
|
let s = o ? r(e) : e, [c] = s;
|
|
12
12
|
return i(a && t(c) ? [c.baseUrl, n(c)] : s);
|
|
13
13
|
}
|
|
14
|
-
function o(n) {
|
|
15
|
-
let [
|
|
16
|
-
return t(
|
|
14
|
+
function o(n, r) {
|
|
15
|
+
let [i] = n;
|
|
16
|
+
return r && t(i) && t(i.headers) && e in i.headers && !i.headers[e];
|
|
17
17
|
}
|
|
18
18
|
var s = /* @__PURE__ */ new Map(), c = 500;
|
|
19
|
-
function l(e, t) {
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
return s.size >= c && s.delete(s.keys().next().value), s.set(
|
|
19
|
+
function l(e, t, n) {
|
|
20
|
+
let r = o(e, n), i = a(e, t, r), l = `${t}:${r}:${e.length}:${i}`, u = s.get(l);
|
|
21
|
+
if (u) return s.delete(l), s.set(l, u), u;
|
|
22
|
+
let d = (n, o) => o && a(o.queryKey.slice(0, e.length), t, r) === i ? n : void 0;
|
|
23
|
+
return s.size >= c && s.delete(s.keys().next().value), s.set(l, d), d;
|
|
24
24
|
}
|
|
25
|
-
var u = (e) => l(e, !1);
|
|
26
|
-
function d(e, t, { carryWithinOrg:
|
|
25
|
+
var u = (e, t) => l(e, !1, t);
|
|
26
|
+
function d(e, { authEpoch: t, organizationPending: n }, { carryWithinOrg: r = !1 } = {}) {
|
|
27
27
|
return {
|
|
28
|
-
placeholderData: l(e.queryKey, n),
|
|
28
|
+
placeholderData: l(e.queryKey, r, n),
|
|
29
29
|
...e,
|
|
30
30
|
queryKey: [...e.queryKey, { authEpoch: t }]
|
|
31
31
|
};
|
|
@@ -11,13 +11,16 @@ 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 } = i(),
|
|
14
|
+
let { client: t, organizationId: r, widgetToken: a, authEpoch: o, organizationPending: 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
|
-
...n(
|
|
20
|
-
|
|
19
|
+
...n(u, {
|
|
20
|
+
authEpoch: o,
|
|
21
|
+
organizationPending: c
|
|
22
|
+
}),
|
|
23
|
+
enabled: l
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
function l() {
|
|
@@ -3,169 +3,170 @@
|
|
|
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
|
|
6
|
+
import { registerQueryClient as t, unregisterQueryClient as n } from "../../../../data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { createEmbeddedClient as ee } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
|
|
8
8
|
import { EmbedApiProvider as te } 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
|
-
import { UIProvider as
|
|
12
|
-
import { useDesignSystemEnsurer as
|
|
11
|
+
import { UIProvider as ne } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
12
|
+
import { useDesignSystemEnsurer as re } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
13
13
|
import "../../../../ui/dist/index.js";
|
|
14
|
-
import { getGlobalSnapshot as
|
|
15
|
-
import { configureEmbeddedClient as
|
|
16
|
-
import { generateCorrelationId as
|
|
17
|
-
import { WidgetContext as
|
|
18
|
-
import { resolveOrgId as
|
|
19
|
-
import { useWidgetFetch as
|
|
20
|
-
import { deriveWidgetInitState as
|
|
21
|
-
import { useEffect as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { QueryClient as
|
|
14
|
+
import { getGlobalSnapshot as i, subscribeToGlobal as ie } from "./globalStore.js";
|
|
15
|
+
import { configureEmbeddedClient as ae } from "../analytics/client.js";
|
|
16
|
+
import { generateCorrelationId as oe } from "../analytics/ids.js";
|
|
17
|
+
import { WidgetContext as se } from "./WidgetContext.js";
|
|
18
|
+
import { resolveOrgId as ce, useAuthEpoch as le } from "./utils.js";
|
|
19
|
+
import { useWidgetFetch as ue } from "./useWidgetFetch.js";
|
|
20
|
+
import { deriveWidgetInitState as a, useWidgetInitPublisher as o } from "./useWidgetInitPublisher.js";
|
|
21
|
+
import { useEffect as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as de } from "react";
|
|
22
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
23
|
+
import { QueryClient as f, QueryClientProvider as p } from "@tanstack/react-query";
|
|
24
24
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
enabled:
|
|
28
|
-
organizationId:
|
|
29
|
-
rootCorrelationId:
|
|
30
|
-
}), [
|
|
25
|
+
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] = u(oe), R = l({
|
|
27
|
+
enabled: I,
|
|
28
|
+
organizationId: A,
|
|
29
|
+
rootCorrelationId: L
|
|
30
|
+
}), [z] = u(() => new f({ defaultOptions: {
|
|
31
31
|
queries: {
|
|
32
32
|
retry: !1,
|
|
33
33
|
refetchOnWindowFocus: !1
|
|
34
34
|
},
|
|
35
35
|
mutations: { retry: !1 }
|
|
36
36
|
} }));
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
let
|
|
41
|
-
let e =
|
|
42
|
-
tokenRef:
|
|
43
|
-
analyticsContextRef:
|
|
44
|
-
clientSecretRef:
|
|
45
|
-
gatewayRouting:
|
|
37
|
+
s(() => (t(z), () => n(z)), [z]);
|
|
38
|
+
let B = l(k);
|
|
39
|
+
B.current = k;
|
|
40
|
+
let V = l(null), fe = c(() => e(V), []), pe = le(k), H = c(() => {
|
|
41
|
+
let e = ae(ee(O), {
|
|
42
|
+
tokenRef: B,
|
|
43
|
+
analyticsContextRef: R,
|
|
44
|
+
clientSecretRef: V,
|
|
45
|
+
gatewayRouting: M
|
|
46
46
|
});
|
|
47
|
-
return
|
|
47
|
+
return j ? j(e) : e;
|
|
48
48
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
O,
|
|
50
|
+
j,
|
|
51
|
+
M
|
|
52
52
|
]);
|
|
53
|
-
|
|
54
|
-
if (!
|
|
53
|
+
s(() => {
|
|
54
|
+
if (!I || !("window" in globalThis)) return;
|
|
55
55
|
let e = !1;
|
|
56
56
|
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
|
|
57
57
|
e || t();
|
|
58
58
|
}), () => {
|
|
59
59
|
e = !0;
|
|
60
60
|
};
|
|
61
|
-
}, [
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
let { result:
|
|
67
|
-
hasToken: !!
|
|
68
|
-
loading:
|
|
69
|
-
error:
|
|
61
|
+
}, [I]);
|
|
62
|
+
let U = re(r(P));
|
|
63
|
+
s(() => {
|
|
64
|
+
U && U().catch(() => {});
|
|
65
|
+
}, [U]);
|
|
66
|
+
let { result: me, loading: W, error: G, initStaleForToken: he, initReplacementPending: K, refetch: q } = ue(w ? null : H, k, R), J = k ? w ?? me ?? void 0 : void 0, Y = !w && he, X = ce(A, Y ? void 0 : J?.organizationId), ge = A === void 0 && K, _e = c(() => a({
|
|
67
|
+
hasToken: !!k,
|
|
68
|
+
loading: W,
|
|
69
|
+
error: G,
|
|
70
70
|
initResponse: J,
|
|
71
71
|
initStaleForToken: Y
|
|
72
72
|
}), [
|
|
73
|
-
|
|
73
|
+
k,
|
|
74
|
+
W,
|
|
74
75
|
G,
|
|
75
|
-
K,
|
|
76
76
|
J,
|
|
77
77
|
Y
|
|
78
78
|
]);
|
|
79
|
-
|
|
80
|
-
let Z =
|
|
81
|
-
enabled:
|
|
79
|
+
o(_e, k);
|
|
80
|
+
let Z = c(() => ({
|
|
81
|
+
enabled: I,
|
|
82
82
|
organizationId: X,
|
|
83
|
-
rootCorrelationId:
|
|
83
|
+
rootCorrelationId: L
|
|
84
84
|
}), [
|
|
85
|
-
|
|
85
|
+
I,
|
|
86
86
|
X,
|
|
87
|
-
|
|
87
|
+
L
|
|
88
88
|
]);
|
|
89
|
-
|
|
90
|
-
let Q =
|
|
91
|
-
baseUrl:
|
|
92
|
-
widgetToken:
|
|
93
|
-
organizationId:
|
|
94
|
-
configClient:
|
|
95
|
-
gatewayRouting:
|
|
96
|
-
linkComponent:
|
|
97
|
-
uiFramework:
|
|
98
|
-
implementation:
|
|
89
|
+
R.current = Z;
|
|
90
|
+
let Q = c(() => ({
|
|
91
|
+
baseUrl: h,
|
|
92
|
+
widgetToken: g,
|
|
93
|
+
organizationId: _,
|
|
94
|
+
configClient: v,
|
|
95
|
+
gatewayRouting: y,
|
|
96
|
+
linkComponent: b,
|
|
97
|
+
uiFramework: x,
|
|
98
|
+
implementation: S
|
|
99
99
|
}), [
|
|
100
|
+
h,
|
|
100
101
|
g,
|
|
101
102
|
_,
|
|
102
103
|
v,
|
|
103
104
|
y,
|
|
104
105
|
b,
|
|
105
106
|
x,
|
|
106
|
-
S
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
widgetToken: A,
|
|
107
|
+
S
|
|
108
|
+
]), $ = c(() => ({
|
|
109
|
+
baseUrl: O,
|
|
110
|
+
widgetToken: k,
|
|
111
111
|
organizationId: X,
|
|
112
|
-
configClient:
|
|
113
|
-
gatewayRouting:
|
|
114
|
-
linkComponent:
|
|
115
|
-
uiFramework:
|
|
116
|
-
implementation:
|
|
112
|
+
configClient: j,
|
|
113
|
+
gatewayRouting: M,
|
|
114
|
+
linkComponent: N,
|
|
115
|
+
uiFramework: P,
|
|
116
|
+
implementation: F,
|
|
117
117
|
initResponse: J
|
|
118
118
|
}), [
|
|
119
|
+
O,
|
|
119
120
|
k,
|
|
120
|
-
A,
|
|
121
121
|
X,
|
|
122
|
+
j,
|
|
122
123
|
M,
|
|
123
124
|
N,
|
|
124
125
|
P,
|
|
125
126
|
F,
|
|
126
|
-
I,
|
|
127
127
|
J
|
|
128
|
-
]),
|
|
128
|
+
]), ve = c(() => ({
|
|
129
129
|
resolved: $,
|
|
130
130
|
own: Q,
|
|
131
131
|
refetch: q,
|
|
132
|
-
loading:
|
|
133
|
-
error:
|
|
132
|
+
loading: W,
|
|
133
|
+
error: G,
|
|
134
134
|
analytics: Z,
|
|
135
|
-
cascadeOrgId:
|
|
135
|
+
cascadeOrgId: A,
|
|
136
136
|
initResponseStaleForToken: Y,
|
|
137
|
-
disclosuresAcceptance:
|
|
138
|
-
providerLabels:
|
|
137
|
+
disclosuresAcceptance: T,
|
|
138
|
+
providerLabels: E
|
|
139
139
|
}), [
|
|
140
140
|
$,
|
|
141
141
|
Q,
|
|
142
142
|
q,
|
|
143
|
+
W,
|
|
143
144
|
G,
|
|
144
|
-
K,
|
|
145
145
|
Z,
|
|
146
|
-
|
|
146
|
+
A,
|
|
147
147
|
Y,
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
T,
|
|
149
|
+
E
|
|
150
150
|
]);
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
client:
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
client:
|
|
151
|
+
return /* @__PURE__ */ d(p, {
|
|
152
|
+
client: z,
|
|
153
|
+
children: /* @__PURE__ */ d(te, {
|
|
154
|
+
client: H,
|
|
155
155
|
organizationId: X,
|
|
156
|
-
widgetToken:
|
|
157
|
-
installClientSecret:
|
|
158
|
-
authEpoch:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
widgetToken: k,
|
|
157
|
+
installClientSecret: fe,
|
|
158
|
+
authEpoch: pe,
|
|
159
|
+
organizationPending: ge,
|
|
160
|
+
children: /* @__PURE__ */ d(se.Provider, {
|
|
161
|
+
value: ve,
|
|
162
|
+
children: /* @__PURE__ */ d(ne, {
|
|
163
|
+
linkComponent: N,
|
|
164
|
+
uiFramework: P,
|
|
165
|
+
children: m
|
|
165
166
|
})
|
|
166
167
|
})
|
|
167
168
|
})
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
//#endregion
|
|
171
|
-
export {
|
|
172
|
+
export { m as RootWidgetProvider };
|