@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
|
@@ -13,214 +13,225 @@ import { useDesignSystemEnsurer as te, useFrameworkRenderer as ne } from "../../
|
|
|
13
13
|
import { HostIsolationScope as re } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
|
|
14
14
|
import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
|
|
15
15
|
import "../../../../ui/dist/index.js";
|
|
16
|
-
import { getGlobalSnapshot as
|
|
17
|
-
import { EmbeddedAnalyticsEvent as
|
|
18
|
-
import { configureEmbeddedClient as
|
|
19
|
-
import { generateCorrelationId as
|
|
20
|
-
import { WidgetContext as
|
|
21
|
-
import { noop as
|
|
22
|
-
import { useWidgetFetch as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
16
|
+
import { getGlobalSnapshot as ie, subscribeToGlobal as ae } from "./globalStore.js";
|
|
17
|
+
import { EmbeddedAnalyticsEvent as c } from "../analytics/events.js";
|
|
18
|
+
import { configureEmbeddedClient as oe } from "../analytics/client.js";
|
|
19
|
+
import { generateCorrelationId as se } from "../analytics/ids.js";
|
|
20
|
+
import { WidgetContext as ce } from "./WidgetContext.js";
|
|
21
|
+
import { noop as le, resolveOrgId as ue, useAuthEpoch as de } from "./utils.js";
|
|
22
|
+
import { useWidgetFetch as fe } from "./useWidgetFetch.js";
|
|
23
|
+
import { deriveOrganizationStatus as pe } from "./deriveOrganizationStatus.js";
|
|
24
|
+
import { deriveWidgetInitState as me, useWidgetInitPublisher as he } from "./useWidgetInitPublisher.js";
|
|
25
|
+
import { useAnalyticsTrack as l } from "../analytics/hooks.js";
|
|
26
|
+
import { resolveProviderLabels as ge } from "./labels.js";
|
|
27
|
+
import { WidgetErrorBoundary as _e } from "./WidgetErrorBoundary.js";
|
|
28
|
+
import { DISCLOSURES_REQUIRED_TEST_ID as u, hasRenderableAcceptanceSurface as d, resolveDisclosuresBlockedReason as f, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
|
|
29
|
+
import { useContext as ye, useEffect as p, useMemo as m, useRef as h, useState as g, useSyncExternalStore as be } from "react";
|
|
30
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
31
|
+
import { QueryClient as xe, QueryClientProvider as Se } from "@tanstack/react-query";
|
|
31
32
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
enabled:
|
|
35
|
-
organizationId:
|
|
36
|
-
rootCorrelationId:
|
|
37
|
-
widgetName:
|
|
38
|
-
widgetInstanceId:
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
if (!
|
|
33
|
+
function v({ children: ne, baseUrl: s, widgetToken: c, organizationId: l, configClient: u, gatewayRouting: d, linkComponent: f, uiFramework: v, implementation: y, errorFallback: we, onError: Te, analytics: b, disclosuresAcceptance: Ee, providerLabels: De, widgetName: x }) {
|
|
34
|
+
let S = ye(ce), Oe = be(ae, ie, ie), C = S?.resolved ?? Oe, ke = S?.refetch ?? le, Ae = S?.loading ?? !1, je = S?.error ?? null, w = s ?? C.baseUrl, T = c === void 0 ? C.widgetToken : c, Me = S ? S.cascadeOrgId : Oe.organizationId, E = l === void 0 ? Me : l, D = u ?? C.configClient, O = d ?? C.gatewayRouting, k = f ?? C.linkComponent, A = v ?? C.uiFramework, j = y ?? C.implementation, M = Ee ?? S?.disclosuresAcceptance, N = De ?? S?.providerLabels, Ne = m(() => ge(N), [N]), P = S === null, F = P ? b !== !1 : S.analytics.enabled, [Pe] = g(se), I = P ? Pe : S.analytics.rootCorrelationId, [Fe] = g(se), L = x === void 0 ? S?.analytics.widgetName : x, R = x === void 0 ? S?.analytics.widgetInstanceId : Fe, z = h({
|
|
35
|
+
enabled: F,
|
|
36
|
+
organizationId: E,
|
|
37
|
+
rootCorrelationId: I,
|
|
38
|
+
widgetName: L,
|
|
39
|
+
widgetInstanceId: R
|
|
40
|
+
}), B = h(!1);
|
|
41
|
+
p(() => {
|
|
42
|
+
P || b === void 0 || B.current || (B.current = !0, console.warn("[tesouro-embedded] `analytics` on a nested WidgetProvider is ignored in v1. Set it on the outermost RootWidgetProvider or standalone WidgetProvider instead."));
|
|
43
|
+
}, [b, P]), p(() => {
|
|
44
|
+
if (!P || !F || !("window" in globalThis)) return;
|
|
44
45
|
let e = !1;
|
|
45
46
|
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
|
|
46
47
|
e || t();
|
|
47
48
|
}), () => {
|
|
48
49
|
e = !0;
|
|
49
50
|
};
|
|
50
|
-
}, [
|
|
51
|
-
let V = te(o(
|
|
52
|
-
|
|
51
|
+
}, [P, F]);
|
|
52
|
+
let V = te(o(A));
|
|
53
|
+
p(() => {
|
|
53
54
|
V && V().catch(() => {});
|
|
54
55
|
}, [V]);
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
let
|
|
58
|
-
if (!
|
|
59
|
-
let e =
|
|
60
|
-
tokenRef:
|
|
61
|
-
analyticsContextRef:
|
|
62
|
-
clientSecretRef:
|
|
63
|
-
gatewayRouting:
|
|
56
|
+
let Ie = S === null || s !== void 0 || c !== void 0 || l !== void 0 || u != null || d !== void 0 || x !== void 0, Le = h(T);
|
|
57
|
+
Le.current = T;
|
|
58
|
+
let Re = h(null), ze = m(() => e(Re), []), Be = a(), Ve = de(T), H = m(() => {
|
|
59
|
+
if (!Ie) return null;
|
|
60
|
+
let e = oe(r(w), {
|
|
61
|
+
tokenRef: Le,
|
|
62
|
+
analyticsContextRef: z,
|
|
63
|
+
clientSecretRef: Re,
|
|
64
|
+
gatewayRouting: O
|
|
64
65
|
});
|
|
65
|
-
return
|
|
66
|
+
return D ? D(e) : e;
|
|
66
67
|
}, [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
]), U =
|
|
72
|
-
hasToken: !!
|
|
68
|
+
Ie,
|
|
69
|
+
w,
|
|
70
|
+
D,
|
|
71
|
+
O
|
|
72
|
+
]), U = S === null || s !== void 0 || c !== void 0, He = U ? Ve : Be.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: Ue, initStaleForToken: q, initReplacementPending: We, refetch: Ge } = fe(U ? H : null, U ? T : void 0, z), Ke = U ? Ge : ke, qe = U ? G : Ae, Je = U ? K : je, Ye = S?.resolved.initResponse, Xe = !U || !Ue && !K && !W && !!T && !G, J = Xe ? Ye : W ?? void 0, Y = Xe ? U || (S?.initResponseStaleForToken ?? !1) : q, Ze = S === null, Qe = m(() => Ze ? me({
|
|
73
|
+
hasToken: !!T,
|
|
73
74
|
loading: G,
|
|
74
75
|
error: K,
|
|
75
76
|
initResponse: W ?? void 0,
|
|
76
77
|
initStaleForToken: q
|
|
77
78
|
}) : null, [
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
Ze,
|
|
80
|
+
T,
|
|
80
81
|
G,
|
|
81
82
|
K,
|
|
82
83
|
W,
|
|
83
84
|
q
|
|
84
85
|
]);
|
|
85
|
-
|
|
86
|
-
let X =
|
|
87
|
-
|
|
86
|
+
he(Qe, T);
|
|
87
|
+
let X = ue(E, Y ? void 0 : J?.organizationId), $e = pe({
|
|
88
|
+
organizationId: X,
|
|
89
|
+
cascadeOrgId: E,
|
|
90
|
+
ownsFetch: U,
|
|
91
|
+
parentStatus: Be.organizationStatus,
|
|
92
|
+
hasToken: !!T,
|
|
93
|
+
loading: G,
|
|
94
|
+
error: K,
|
|
95
|
+
hasResult: !!W,
|
|
96
|
+
initReplacementPending: We
|
|
97
|
+
}), Z = m(() => ({
|
|
98
|
+
enabled: F,
|
|
88
99
|
organizationId: X,
|
|
89
|
-
rootCorrelationId:
|
|
90
|
-
widgetName:
|
|
91
|
-
widgetInstanceId:
|
|
100
|
+
rootCorrelationId: I,
|
|
101
|
+
widgetName: L,
|
|
102
|
+
widgetInstanceId: R
|
|
92
103
|
}), [
|
|
93
|
-
|
|
104
|
+
F,
|
|
94
105
|
X,
|
|
106
|
+
I,
|
|
95
107
|
L,
|
|
96
|
-
R
|
|
97
|
-
z
|
|
108
|
+
R
|
|
98
109
|
]);
|
|
99
|
-
|
|
100
|
-
let [Q] =
|
|
110
|
+
z.current = Z;
|
|
111
|
+
let [Q] = g(() => S === null ? new xe({ defaultOptions: {
|
|
101
112
|
queries: {
|
|
102
113
|
retry: !1,
|
|
103
114
|
refetchOnWindowFocus: !1
|
|
104
115
|
},
|
|
105
116
|
mutations: { retry: !1 }
|
|
106
117
|
} }) : null);
|
|
107
|
-
|
|
118
|
+
p(() => {
|
|
108
119
|
if (!Q) return;
|
|
109
120
|
let e = Q;
|
|
110
121
|
return t(e), () => n(e);
|
|
111
122
|
}, [Q]);
|
|
112
|
-
let
|
|
123
|
+
let et = m(() => ({
|
|
113
124
|
baseUrl: s,
|
|
114
|
-
widgetToken:
|
|
115
|
-
organizationId:
|
|
116
|
-
configClient:
|
|
117
|
-
gatewayRouting:
|
|
118
|
-
linkComponent:
|
|
119
|
-
uiFramework:
|
|
120
|
-
implementation:
|
|
125
|
+
widgetToken: c,
|
|
126
|
+
organizationId: l,
|
|
127
|
+
configClient: u,
|
|
128
|
+
gatewayRouting: d,
|
|
129
|
+
linkComponent: f,
|
|
130
|
+
uiFramework: v,
|
|
131
|
+
implementation: y
|
|
121
132
|
}), [
|
|
122
133
|
s,
|
|
134
|
+
c,
|
|
123
135
|
l,
|
|
124
136
|
u,
|
|
125
137
|
d,
|
|
126
138
|
f,
|
|
127
|
-
|
|
128
|
-
y
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
widgetToken: E,
|
|
139
|
+
v,
|
|
140
|
+
y
|
|
141
|
+
]), tt = m(() => ({
|
|
142
|
+
baseUrl: w,
|
|
143
|
+
widgetToken: T,
|
|
133
144
|
organizationId: X,
|
|
134
|
-
configClient:
|
|
135
|
-
gatewayRouting:
|
|
136
|
-
linkComponent:
|
|
137
|
-
uiFramework:
|
|
138
|
-
implementation:
|
|
145
|
+
configClient: D,
|
|
146
|
+
gatewayRouting: O,
|
|
147
|
+
linkComponent: k,
|
|
148
|
+
uiFramework: A,
|
|
149
|
+
implementation: j,
|
|
139
150
|
initResponse: J
|
|
140
151
|
}), [
|
|
152
|
+
w,
|
|
141
153
|
T,
|
|
142
|
-
E,
|
|
143
154
|
X,
|
|
155
|
+
D,
|
|
144
156
|
O,
|
|
145
157
|
k,
|
|
146
158
|
A,
|
|
147
159
|
j,
|
|
148
|
-
M,
|
|
149
160
|
J
|
|
150
|
-
]),
|
|
151
|
-
resolved:
|
|
152
|
-
own:
|
|
153
|
-
refetch:
|
|
154
|
-
loading:
|
|
155
|
-
error:
|
|
161
|
+
]), nt = m(() => ({
|
|
162
|
+
resolved: tt,
|
|
163
|
+
own: et,
|
|
164
|
+
refetch: Ke,
|
|
165
|
+
loading: qe,
|
|
166
|
+
error: Je,
|
|
156
167
|
analytics: Z,
|
|
157
|
-
cascadeOrgId:
|
|
168
|
+
cascadeOrgId: E,
|
|
158
169
|
initResponseStaleForToken: Y,
|
|
159
|
-
disclosuresAcceptance:
|
|
160
|
-
providerLabels:
|
|
170
|
+
disclosuresAcceptance: M,
|
|
171
|
+
providerLabels: N
|
|
161
172
|
}), [
|
|
173
|
+
tt,
|
|
162
174
|
et,
|
|
163
|
-
$e,
|
|
164
|
-
Ge,
|
|
165
175
|
Ke,
|
|
166
176
|
qe,
|
|
177
|
+
Je,
|
|
167
178
|
Z,
|
|
168
|
-
|
|
179
|
+
E,
|
|
169
180
|
Y,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
]),
|
|
173
|
-
value:
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
linkComponent:
|
|
176
|
-
uiFramework:
|
|
177
|
-
children: /* @__PURE__ */
|
|
178
|
-
resetKeys: [
|
|
179
|
-
errorFallback:
|
|
180
|
-
onError:
|
|
181
|
-
labels:
|
|
182
|
-
children:
|
|
183
|
-
disclosuresAcceptance:
|
|
181
|
+
M,
|
|
182
|
+
N
|
|
183
|
+
]), rt = /* @__PURE__ */ _(ce.Provider, {
|
|
184
|
+
value: nt,
|
|
185
|
+
children: /* @__PURE__ */ _(ee, {
|
|
186
|
+
linkComponent: k,
|
|
187
|
+
uiFramework: A,
|
|
188
|
+
children: /* @__PURE__ */ _(re, { children: /* @__PURE__ */ _(_e, {
|
|
189
|
+
resetKeys: [T],
|
|
190
|
+
errorFallback: we,
|
|
191
|
+
onError: Te,
|
|
192
|
+
labels: Ne,
|
|
193
|
+
children: ve(J, x) ? /* @__PURE__ */ _(Ce, {
|
|
194
|
+
disclosuresAcceptance: M,
|
|
184
195
|
initStaleForToken: Y,
|
|
185
|
-
labels:
|
|
196
|
+
labels: Ne
|
|
186
197
|
}) : ne
|
|
187
198
|
}) })
|
|
188
199
|
})
|
|
189
|
-
}), $ = H ? /* @__PURE__ */
|
|
200
|
+
}), $ = H ? /* @__PURE__ */ _(i, {
|
|
190
201
|
client: H,
|
|
191
202
|
organizationId: X,
|
|
192
|
-
widgetToken:
|
|
193
|
-
installClientSecret:
|
|
194
|
-
authEpoch:
|
|
195
|
-
|
|
196
|
-
children:
|
|
197
|
-
}) :
|
|
198
|
-
return Q ? /* @__PURE__ */
|
|
203
|
+
widgetToken: T,
|
|
204
|
+
installClientSecret: ze,
|
|
205
|
+
authEpoch: He,
|
|
206
|
+
organizationStatus: $e,
|
|
207
|
+
children: rt
|
|
208
|
+
}) : rt;
|
|
209
|
+
return Q ? /* @__PURE__ */ _(Se, {
|
|
199
210
|
client: Q,
|
|
200
211
|
children: $
|
|
201
212
|
}) : $;
|
|
202
213
|
}
|
|
203
|
-
function
|
|
204
|
-
let r = ne("error-state") ?? s, i =
|
|
214
|
+
function Ce({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
|
|
215
|
+
let r = ne("error-state") ?? s, i = l(), a = d(e), o = f({
|
|
205
216
|
initStaleForToken: t,
|
|
206
217
|
hasAcceptanceSurface: a
|
|
207
218
|
});
|
|
208
|
-
return
|
|
209
|
-
i(
|
|
210
|
-
}, [o, i]), t ? /* @__PURE__ */
|
|
219
|
+
return p(() => {
|
|
220
|
+
i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
|
|
221
|
+
}, [o, i]), t ? /* @__PURE__ */ _(r, {
|
|
211
222
|
title: n.disclosuresRefreshingTitle,
|
|
212
223
|
description: n.disclosuresRefreshingDescription,
|
|
213
|
-
testId:
|
|
224
|
+
testId: u,
|
|
214
225
|
className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
|
|
215
|
-
}) : a ? /* @__PURE__ */
|
|
216
|
-
"data-testid":
|
|
226
|
+
}) : a ? /* @__PURE__ */ _("div", {
|
|
227
|
+
"data-testid": u,
|
|
217
228
|
className: "ttw:w-full",
|
|
218
229
|
children: e
|
|
219
|
-
}) : /* @__PURE__ */
|
|
230
|
+
}) : /* @__PURE__ */ _(r, {
|
|
220
231
|
title: n.disclosuresRequiredTitle,
|
|
221
|
-
testId:
|
|
232
|
+
testId: u,
|
|
222
233
|
className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
|
|
223
234
|
});
|
|
224
235
|
}
|
|
225
236
|
//#endregion
|
|
226
|
-
export {
|
|
237
|
+
export { v as WidgetProvider, v as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js
|
|
2
|
+
function e({ organizationId: e, cascadeOrgId: t, ownsFetch: n, parentStatus: r, hasToken: i, loading: a, error: o, hasResult: s, initReplacementPending: c }) {
|
|
3
|
+
return i ? e ? "known" : t === void 0 ? n ? c ? "rotating" : a || !s && !o ? "pending" : o ? "failed" : "none" : r : "none" : "pending";
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as deriveOrganizationStatus };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.227", n = "5d413a6fc2962d365de306d5d524882f6212437a", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js
|
|
12
12
|
function a(a, { enabled: o = !0 } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l && a) && o, p = e({
|
|
14
14
|
query: { measure_unit_id: a ?? "" },
|
|
15
15
|
client: s,
|
|
16
16
|
headers: r(c)
|
|
@@ -18,7 +18,7 @@ function a(a, { enabled: o = !0 } = {}) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
|
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.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 = !!(c && l) && (a === !0 || a === void 0), p = 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(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}, { carryWithinOrg: !0 }),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
|
@@ -12,7 +12,7 @@ import { queryOptions as a, useQuery as o } from "@tanstack/react-query";
|
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js
|
|
13
13
|
var s = 100;
|
|
14
14
|
function c({ enabled: c, ...l } = {}) {
|
|
15
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p,
|
|
15
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = i(d), g = a({
|
|
16
16
|
queryKey: [...t({
|
|
17
17
|
client: u,
|
|
18
18
|
headers: h,
|
|
@@ -45,7 +45,7 @@ function c({ enabled: c, ...l } = {}) {
|
|
|
45
45
|
return o({
|
|
46
46
|
...n(g, {
|
|
47
47
|
authEpoch: p,
|
|
48
|
-
|
|
48
|
+
organizationStatus: m
|
|
49
49
|
}),
|
|
50
50
|
enabled: !!(d && f) && (c === !0 || c === void 0)
|
|
51
51
|
});
|
|
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js
|
|
12
12
|
function a(a, { enabled: o = !0 } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l && a) && o, p = e({
|
|
14
14
|
client: s,
|
|
15
15
|
headers: r(c),
|
|
16
16
|
path: { product_id: a ?? "" }
|
|
@@ -18,7 +18,7 @@ function a(a, { enabled: o = !0 } = {}) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
|
@@ -10,14 +10,14 @@ import "../../../data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js
|
|
12
12
|
function a({ enabled: a = !0 } = {}) {
|
|
13
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
13
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c) && a, f = e({
|
|
14
14
|
client: o,
|
|
15
15
|
headers: r(s)
|
|
16
16
|
});
|
|
17
17
|
return i({
|
|
18
18
|
...t(f, {
|
|
19
19
|
authEpoch: l,
|
|
20
|
-
|
|
20
|
+
organizationStatus: u
|
|
21
21
|
}),
|
|
22
22
|
enabled: d
|
|
23
23
|
});
|
package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js
CHANGED
|
@@ -14,7 +14,7 @@ import { useQueries as s } from "@tanstack/react-query";
|
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js
|
|
15
15
|
var c = 25;
|
|
16
16
|
function l({ enabled: l, transfersPerAccount: u = c } = {}) {
|
|
17
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m,
|
|
17
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = n(), g = r(f), _ = !!(f && p) && (l === !0 || l === void 0), v = a({ enabled: _ }), y = o(() => [...v.data?.data?.map((e) => e.id).filter(Boolean) ?? []].sort(), [v.data?.data]), b = s({ queries: y.map((n) => ({
|
|
18
18
|
...t(e({
|
|
19
19
|
client: d,
|
|
20
20
|
headers: g,
|
|
@@ -22,7 +22,7 @@ function l({ enabled: l, transfersPerAccount: u = c } = {}) {
|
|
|
22
22
|
query: { limit: u }
|
|
23
23
|
}), {
|
|
24
24
|
authEpoch: m,
|
|
25
|
-
|
|
25
|
+
organizationStatus: h
|
|
26
26
|
}),
|
|
27
27
|
enabled: _
|
|
28
28
|
})) });
|