@tesouro/embedded-components-react 0.3.42 → 0.3.44
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 +18 -2
- package/dist/experimental/index.d.ts +1 -975
- package/dist/experimental/index.js +0 -6
- package/dist/index.d.ts +1730 -1425
- package/dist/index.js +65 -61
- package/dist/lib/WidgetProvider.js +7 -7
- package/dist/lib/WidgetSuite.d.ts +2081 -0
- package/dist/lib/WidgetSuite.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +45 -45
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +118 -118
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index10.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index12.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index13.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index15.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +116 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +46 -23
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +20 -88
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +31 -34
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +12 -132
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +11 -137
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +12 -12
- package/package.json +1 -1
- package/dist/experimental/WidgetSuite.d.ts +0 -976
- package/dist/experimental/WidgetSuite.js +0 -6
|
@@ -6,23 +6,23 @@ import { registerQueryClient as e, unregisterQueryClient as t } from "../../../.
|
|
|
6
6
|
import { createEmbeddedClient as ee } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
|
|
7
7
|
import { EmbedApiProvider as te } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import "../../../../data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { WidgetContext as r } from "./WidgetContext.js";
|
|
13
|
-
import { resolveOrgId as i, useAuthEpoch as ae } from "./utils.js";
|
|
14
|
-
import { useWidgetFetch as oe } from "./useWidgetFetch.js";
|
|
15
|
-
import { deriveWidgetInitState as se, useWidgetInitPublisher as ce } from "./useWidgetInitPublisher.js";
|
|
16
|
-
import { resolveUIFramework as a } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
17
|
-
import { UIProvider as o } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
18
|
-
import { useDesignSystemEnsurer as le } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
9
|
+
import { resolveUIFramework as ne } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
10
|
+
import { UIProvider as re } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
11
|
+
import { useDesignSystemEnsurer as ie } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
19
12
|
import "../../../../ui/dist/index.js";
|
|
13
|
+
import { getGlobalSnapshot as n, subscribeToGlobal as r } from "./globalStore.js";
|
|
14
|
+
import { configureEmbeddedClient as i } from "../analytics/client.js";
|
|
15
|
+
import { generateCorrelationId as ae } from "../analytics/ids.js";
|
|
16
|
+
import { WidgetContext as oe } from "./WidgetContext.js";
|
|
17
|
+
import { resolveOrgId as se, useAuthEpoch as ce } from "./utils.js";
|
|
18
|
+
import { useWidgetFetch as a } from "./useWidgetFetch.js";
|
|
19
|
+
import { deriveWidgetInitState as o, useWidgetInitPublisher as le } from "./useWidgetInitPublisher.js";
|
|
20
20
|
import { useEffect as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
|
|
21
21
|
import { jsx as f } from "react/jsx-runtime";
|
|
22
22
|
import { QueryClient as p, QueryClientProvider as m } from "@tanstack/react-query";
|
|
23
23
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js
|
|
24
24
|
function h({ children: h, baseUrl: g, widgetToken: _, organizationId: v, configClient: y, gatewayRouting: b, linkComponent: x, uiFramework: S, implementation: C, analytics: w, unstable_initResponseOverride: T, disclosuresAcceptance: E, providerLabels: D }) {
|
|
25
|
-
let O = d(
|
|
25
|
+
let O = d(r, n, n), k = g ?? O.baseUrl, A = _ === void 0 ? O.widgetToken : _, j = v === void 0 ? O.organizationId : v, M = y ?? O.configClient, N = b ?? O.gatewayRouting, P = x ?? O.linkComponent, F = S ?? O.uiFramework, I = C ?? O.implementation, L = w !== !1, [R] = u(ae), z = l({
|
|
26
26
|
enabled: L,
|
|
27
27
|
organizationId: j,
|
|
28
28
|
rootCorrelationId: R
|
|
@@ -36,8 +36,8 @@ function h({ children: h, baseUrl: g, widgetToken: _, organizationId: v, configC
|
|
|
36
36
|
s(() => (e(B), () => t(B)), [B]);
|
|
37
37
|
let V = l(A);
|
|
38
38
|
V.current = A;
|
|
39
|
-
let H =
|
|
40
|
-
let e =
|
|
39
|
+
let H = ce(A), U = c(() => {
|
|
40
|
+
let e = i(ee(k), {
|
|
41
41
|
tokenRef: V,
|
|
42
42
|
analyticsContextRef: z,
|
|
43
43
|
gatewayRouting: N
|
|
@@ -57,11 +57,11 @@ function h({ children: h, baseUrl: g, widgetToken: _, organizationId: v, configC
|
|
|
57
57
|
e = !0;
|
|
58
58
|
};
|
|
59
59
|
}, [L]);
|
|
60
|
-
let W =
|
|
60
|
+
let W = ie(ne(F));
|
|
61
61
|
s(() => {
|
|
62
62
|
W && W().catch(() => {});
|
|
63
63
|
}, [W]);
|
|
64
|
-
let { result: ue, loading: G, error: K, initStaleForToken: de, refetch: q } =
|
|
64
|
+
let { result: ue, loading: G, error: K, initStaleForToken: de, refetch: q } = a(T ? null : U, A, z), J = A ? T ?? ue ?? void 0 : void 0, Y = !T && de, X = se(j, Y ? void 0 : J?.organizationId), fe = c(() => o({
|
|
65
65
|
hasToken: !!A,
|
|
66
66
|
loading: G,
|
|
67
67
|
error: K,
|
|
@@ -74,7 +74,7 @@ function h({ children: h, baseUrl: g, widgetToken: _, organizationId: v, configC
|
|
|
74
74
|
J,
|
|
75
75
|
Y
|
|
76
76
|
]);
|
|
77
|
-
|
|
77
|
+
le(fe, A);
|
|
78
78
|
let Z = c(() => ({
|
|
79
79
|
enabled: L,
|
|
80
80
|
organizationId: X,
|
|
@@ -153,9 +153,9 @@ function h({ children: h, baseUrl: g, widgetToken: _, organizationId: v, configC
|
|
|
153
153
|
organizationId: X,
|
|
154
154
|
widgetToken: A,
|
|
155
155
|
authEpoch: H,
|
|
156
|
-
children: /* @__PURE__ */ f(
|
|
156
|
+
children: /* @__PURE__ */ f(oe.Provider, {
|
|
157
157
|
value: pe,
|
|
158
|
-
children: /* @__PURE__ */ f(
|
|
158
|
+
children: /* @__PURE__ */ f(re, {
|
|
159
159
|
linkComponent: P,
|
|
160
160
|
uiFramework: F,
|
|
161
161
|
children: h
|
|
@@ -6,39 +6,39 @@ import { registerQueryClient as e, unregisterQueryClient as t } from "../../../.
|
|
|
6
6
|
import { createEmbeddedClient as n } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
|
|
7
7
|
import { EmbedApiProvider as r, useEmbedApi as i } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import "../../../../data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { noop as re, resolveOrgId as ie, useAuthEpoch as ae } from "./utils.js";
|
|
15
|
-
import { useWidgetFetch as oe } from "./useWidgetFetch.js";
|
|
16
|
-
import { deriveWidgetInitState as se, useWidgetInitPublisher as ce } from "./useWidgetInitPublisher.js";
|
|
17
|
-
import { resolveUIFramework as le } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
18
|
-
import { UIProvider as ue } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
19
|
-
import { useDesignSystemEnsurer as de, useFrameworkRenderer as c } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
20
|
-
import { HostIsolationScope as fe } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
|
|
21
|
-
import { ErrorState as l } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
|
|
9
|
+
import { resolveUIFramework as a } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
10
|
+
import { UIProvider as o } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
11
|
+
import { useDesignSystemEnsurer as ee, useFrameworkRenderer as te } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
12
|
+
import { HostIsolationScope as ne } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
|
|
13
|
+
import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
|
|
22
14
|
import "../../../../ui/dist/index.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
15
|
+
import { getGlobalSnapshot as re, subscribeToGlobal as ie } from "./globalStore.js";
|
|
16
|
+
import { EmbeddedAnalyticsEvent as c } from "../analytics/events.js";
|
|
17
|
+
import { configureEmbeddedClient as ae } from "../analytics/client.js";
|
|
18
|
+
import { generateCorrelationId as oe } from "../analytics/ids.js";
|
|
19
|
+
import { WidgetContext as se } from "./WidgetContext.js";
|
|
20
|
+
import { noop as ce, resolveOrgId as le, useAuthEpoch as ue } from "./utils.js";
|
|
21
|
+
import { useWidgetFetch as de } from "./useWidgetFetch.js";
|
|
22
|
+
import { deriveWidgetInitState as fe, useWidgetInitPublisher as pe } from "./useWidgetInitPublisher.js";
|
|
23
|
+
import { useAnalyticsTrack as l } from "../analytics/hooks.js";
|
|
24
|
+
import { resolveProviderLabels as me } from "./labels.js";
|
|
25
|
+
import { WidgetErrorBoundary as he } from "./WidgetErrorBoundary.js";
|
|
26
|
+
import { DISCLOSURES_REQUIRED_TEST_ID as u, hasRenderableAcceptanceSurface as d, resolveDisclosuresBlockedReason as f, shouldGateOnDisclosuresAcceptance as ge } from "./isDisclosuresAcceptanceRequired.js";
|
|
27
|
+
import { useContext as _e, useEffect as p, useMemo as m, useRef as h, useState as g, useSyncExternalStore as ve } from "react";
|
|
28
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
29
|
+
import { QueryClient as ye, QueryClientProvider as be } from "@tanstack/react-query";
|
|
30
30
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
|
|
31
|
-
function
|
|
32
|
-
let
|
|
31
|
+
function v({ children: te, baseUrl: s, widgetToken: c, organizationId: l, configClient: u, gatewayRouting: d, linkComponent: f, uiFramework: v, implementation: y, errorFallback: Se, onError: Ce, analytics: b, disclosuresAcceptance: we, providerLabels: Te, widgetName: x }) {
|
|
32
|
+
let S = _e(se), Ee = ve(ie, re, re), C = S?.resolved ?? Ee, De = S?.refetch ?? ce, Oe = S?.loading ?? !1, ke = S?.error ?? null, w = s ?? C.baseUrl, T = c === void 0 ? C.widgetToken : c, Ae = S ? S.cascadeOrgId : Ee.organizationId, E = l === void 0 ? Ae : l, D = u ?? C.configClient, O = d ?? C.gatewayRouting, k = f ?? C.linkComponent, A = v ?? C.uiFramework, j = y ?? C.implementation, M = we ?? S?.disclosuresAcceptance, N = Te ?? S?.providerLabels, je = m(() => me(N), [N]), P = S === null, F = P ? b !== !1 : S.analytics.enabled, [Me] = g(oe), I = P ? Me : S.analytics.rootCorrelationId, [Ne] = g(oe), L = x === void 0 ? S?.analytics.widgetName : x, R = x === void 0 ? S?.analytics.widgetInstanceId : Ne, z = h({
|
|
33
33
|
enabled: F,
|
|
34
|
-
organizationId:
|
|
34
|
+
organizationId: E,
|
|
35
35
|
rootCorrelationId: I,
|
|
36
36
|
widgetName: L,
|
|
37
37
|
widgetInstanceId: R
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
P ||
|
|
41
|
-
}, [
|
|
38
|
+
}), B = h(!1);
|
|
39
|
+
p(() => {
|
|
40
|
+
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."));
|
|
41
|
+
}, [b, P]), p(() => {
|
|
42
42
|
if (!P || !F || !("window" in globalThis)) return;
|
|
43
43
|
let e = !1;
|
|
44
44
|
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
|
|
@@ -47,41 +47,41 @@ function y({ children: s, baseUrl: c, widgetToken: l, organizationId: u, configC
|
|
|
47
47
|
e = !0;
|
|
48
48
|
};
|
|
49
49
|
}, [P, F]);
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, [
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
let
|
|
57
|
-
if (!
|
|
58
|
-
let e =
|
|
59
|
-
tokenRef:
|
|
50
|
+
let V = ee(a(A));
|
|
51
|
+
p(() => {
|
|
52
|
+
V && V().catch(() => {});
|
|
53
|
+
}, [V]);
|
|
54
|
+
let Pe = S === null || s !== void 0 || c !== void 0 || l !== void 0 || u != null || d !== void 0 || x !== void 0, Fe = h(T);
|
|
55
|
+
Fe.current = T;
|
|
56
|
+
let Ie = i(), Le = ue(T), H = m(() => {
|
|
57
|
+
if (!Pe) return null;
|
|
58
|
+
let e = ae(n(w), {
|
|
59
|
+
tokenRef: Fe,
|
|
60
60
|
analyticsContextRef: z,
|
|
61
|
-
gatewayRouting:
|
|
61
|
+
gatewayRouting: O
|
|
62
62
|
});
|
|
63
|
-
return
|
|
63
|
+
return D ? D(e) : e;
|
|
64
64
|
}, [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]),
|
|
70
|
-
hasToken: !!
|
|
71
|
-
loading:
|
|
72
|
-
error:
|
|
73
|
-
initResponse:
|
|
74
|
-
initStaleForToken:
|
|
65
|
+
Pe,
|
|
66
|
+
w,
|
|
67
|
+
D,
|
|
68
|
+
O
|
|
69
|
+
]), U = S === null || s !== void 0 || c !== void 0, Re = U ? Le : Ie.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: ze, initStaleForToken: q, refetch: Be } = de(U ? H : null, U ? T : void 0, z), Ve = U ? Be : De, He = U ? G : Oe, Ue = U ? K : ke, We = S?.resolved.initResponse, Ge = !U || !ze && !K && !W && !!T && !G, J = Ge ? We : W ?? void 0, Y = Ge ? U || (S?.initResponseStaleForToken ?? !1) : q, Ke = S === null, qe = m(() => Ke ? fe({
|
|
70
|
+
hasToken: !!T,
|
|
71
|
+
loading: G,
|
|
72
|
+
error: K,
|
|
73
|
+
initResponse: W ?? void 0,
|
|
74
|
+
initStaleForToken: q
|
|
75
75
|
}) : null, [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
W,
|
|
76
|
+
Ke,
|
|
77
|
+
T,
|
|
79
78
|
G,
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
K,
|
|
80
|
+
W,
|
|
81
|
+
q
|
|
82
82
|
]);
|
|
83
|
-
|
|
84
|
-
let X =
|
|
83
|
+
pe(qe, T);
|
|
84
|
+
let X = le(E, Y ? void 0 : J?.organizationId), Z = m(() => ({
|
|
85
85
|
enabled: F,
|
|
86
86
|
organizationId: X,
|
|
87
87
|
rootCorrelationId: I,
|
|
@@ -95,128 +95,128 @@ function y({ children: s, baseUrl: c, widgetToken: l, organizationId: u, configC
|
|
|
95
95
|
R
|
|
96
96
|
]);
|
|
97
97
|
z.current = Z;
|
|
98
|
-
let [Q] =
|
|
98
|
+
let [Q] = g(() => S === null ? new ye({ defaultOptions: {
|
|
99
99
|
queries: {
|
|
100
100
|
retry: !1,
|
|
101
101
|
refetchOnWindowFocus: !1
|
|
102
102
|
},
|
|
103
103
|
mutations: { retry: !1 }
|
|
104
104
|
} }) : null);
|
|
105
|
-
|
|
105
|
+
p(() => {
|
|
106
106
|
if (!Q) return;
|
|
107
107
|
let n = Q;
|
|
108
108
|
return e(n), () => t(n);
|
|
109
109
|
}, [Q]);
|
|
110
|
-
let Je =
|
|
111
|
-
baseUrl:
|
|
112
|
-
widgetToken:
|
|
113
|
-
organizationId:
|
|
114
|
-
configClient:
|
|
115
|
-
gatewayRouting:
|
|
116
|
-
linkComponent:
|
|
117
|
-
uiFramework:
|
|
118
|
-
implementation:
|
|
110
|
+
let Je = m(() => ({
|
|
111
|
+
baseUrl: s,
|
|
112
|
+
widgetToken: c,
|
|
113
|
+
organizationId: l,
|
|
114
|
+
configClient: u,
|
|
115
|
+
gatewayRouting: d,
|
|
116
|
+
linkComponent: f,
|
|
117
|
+
uiFramework: v,
|
|
118
|
+
implementation: y
|
|
119
119
|
}), [
|
|
120
|
+
s,
|
|
120
121
|
c,
|
|
121
122
|
l,
|
|
122
123
|
u,
|
|
123
124
|
d,
|
|
124
125
|
f,
|
|
125
|
-
|
|
126
|
-
y
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
widgetToken: E,
|
|
126
|
+
v,
|
|
127
|
+
y
|
|
128
|
+
]), Ye = m(() => ({
|
|
129
|
+
baseUrl: w,
|
|
130
|
+
widgetToken: T,
|
|
131
131
|
organizationId: X,
|
|
132
|
-
configClient:
|
|
133
|
-
gatewayRouting:
|
|
134
|
-
linkComponent:
|
|
135
|
-
uiFramework:
|
|
136
|
-
implementation:
|
|
137
|
-
initResponse:
|
|
132
|
+
configClient: D,
|
|
133
|
+
gatewayRouting: O,
|
|
134
|
+
linkComponent: k,
|
|
135
|
+
uiFramework: A,
|
|
136
|
+
implementation: j,
|
|
137
|
+
initResponse: J
|
|
138
138
|
}), [
|
|
139
|
+
w,
|
|
139
140
|
T,
|
|
140
|
-
E,
|
|
141
141
|
X,
|
|
142
|
+
D,
|
|
142
143
|
O,
|
|
143
144
|
k,
|
|
144
145
|
A,
|
|
145
146
|
j,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]), Xe = h(() => ({
|
|
147
|
+
J
|
|
148
|
+
]), Xe = m(() => ({
|
|
149
149
|
resolved: Ye,
|
|
150
150
|
own: Je,
|
|
151
|
-
refetch:
|
|
152
|
-
loading:
|
|
153
|
-
error:
|
|
151
|
+
refetch: Ve,
|
|
152
|
+
loading: He,
|
|
153
|
+
error: Ue,
|
|
154
154
|
analytics: Z,
|
|
155
|
-
cascadeOrgId:
|
|
156
|
-
initResponseStaleForToken:
|
|
155
|
+
cascadeOrgId: E,
|
|
156
|
+
initResponseStaleForToken: Y,
|
|
157
157
|
disclosuresAcceptance: M,
|
|
158
158
|
providerLabels: N
|
|
159
159
|
}), [
|
|
160
160
|
Ye,
|
|
161
161
|
Je,
|
|
162
|
+
Ve,
|
|
162
163
|
He,
|
|
163
164
|
Ue,
|
|
164
|
-
We,
|
|
165
165
|
Z,
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
E,
|
|
167
|
+
Y,
|
|
168
168
|
M,
|
|
169
169
|
N
|
|
170
|
-
]), Ze = /* @__PURE__ */
|
|
170
|
+
]), Ze = /* @__PURE__ */ _(se.Provider, {
|
|
171
171
|
value: Xe,
|
|
172
|
-
children: /* @__PURE__ */
|
|
173
|
-
linkComponent:
|
|
174
|
-
uiFramework:
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
-
resetKeys: [
|
|
177
|
-
errorFallback:
|
|
178
|
-
onError:
|
|
172
|
+
children: /* @__PURE__ */ _(o, {
|
|
173
|
+
linkComponent: k,
|
|
174
|
+
uiFramework: A,
|
|
175
|
+
children: /* @__PURE__ */ _(ne, { children: /* @__PURE__ */ _(he, {
|
|
176
|
+
resetKeys: [T],
|
|
177
|
+
errorFallback: Se,
|
|
178
|
+
onError: Ce,
|
|
179
179
|
labels: je,
|
|
180
|
-
children:
|
|
180
|
+
children: ge(J, x) ? /* @__PURE__ */ _(xe, {
|
|
181
181
|
disclosuresAcceptance: M,
|
|
182
|
-
initStaleForToken:
|
|
182
|
+
initStaleForToken: Y,
|
|
183
183
|
labels: je
|
|
184
|
-
}) :
|
|
184
|
+
}) : te
|
|
185
185
|
}) })
|
|
186
186
|
})
|
|
187
|
-
}), $ =
|
|
188
|
-
client:
|
|
187
|
+
}), $ = H ? /* @__PURE__ */ _(r, {
|
|
188
|
+
client: H,
|
|
189
189
|
organizationId: X,
|
|
190
|
-
widgetToken:
|
|
191
|
-
authEpoch:
|
|
190
|
+
widgetToken: T,
|
|
191
|
+
authEpoch: Re,
|
|
192
192
|
children: Ze
|
|
193
193
|
}) : Ze;
|
|
194
|
-
return Q ? /* @__PURE__ */
|
|
194
|
+
return Q ? /* @__PURE__ */ _(be, {
|
|
195
195
|
client: Q,
|
|
196
196
|
children: $
|
|
197
197
|
}) : $;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
let r =
|
|
199
|
+
function xe({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
|
|
200
|
+
let r = te("error-state") ?? s, i = l(), a = d(e), o = f({
|
|
201
201
|
initStaleForToken: t,
|
|
202
202
|
hasAcceptanceSurface: a
|
|
203
203
|
});
|
|
204
|
-
return
|
|
205
|
-
i(
|
|
206
|
-
}, [o, i]), t ? /* @__PURE__ */
|
|
204
|
+
return p(() => {
|
|
205
|
+
i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
|
|
206
|
+
}, [o, i]), t ? /* @__PURE__ */ _(r, {
|
|
207
207
|
title: n.disclosuresRefreshingTitle,
|
|
208
208
|
description: n.disclosuresRefreshingDescription,
|
|
209
|
-
testId:
|
|
209
|
+
testId: u,
|
|
210
210
|
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"
|
|
211
|
-
}) : a ? /* @__PURE__ */
|
|
212
|
-
"data-testid":
|
|
211
|
+
}) : a ? /* @__PURE__ */ _("div", {
|
|
212
|
+
"data-testid": u,
|
|
213
213
|
className: "ttw:w-full",
|
|
214
214
|
children: e
|
|
215
|
-
}) : /* @__PURE__ */
|
|
215
|
+
}) : /* @__PURE__ */ _(r, {
|
|
216
216
|
title: n.disclosuresRequiredTitle,
|
|
217
|
-
testId:
|
|
217
|
+
testId: u,
|
|
218
218
|
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"
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
//#endregion
|
|
222
|
-
export {
|
|
222
|
+
export { v as WidgetProvider, v as default };
|
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.3.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.3.44", n = "0302e28ba43fc02ee1e0092ff82a31347c804c8f", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { WIDGET_SUITE_DEFAULT_SECTIONS as i, WidgetSuiteSectionId as a } from "./index7.js";
|
|
3
|
-
import { WIDGET_SUITE_SHELL_LABELS_EN as o } from "../../ui/dist/index2.js";
|
|
1
|
+
import "../../ui/dist/index2.js";
|
|
4
2
|
import "../../ui/dist/index.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { WIDGET_SUITE_LABELS_EN as e } from "./index4.js";
|
|
4
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as t, WidgetSuiteSectionId as n } from "./index5.js";
|
|
5
|
+
import "./index15.js";
|
|
6
|
+
import { WidgetSuite as r } from "./index16.js";
|
|
7
|
+
export { t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, r as WidgetSuite, n as WidgetSuiteSectionId };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { WidgetSuiteSectionId as t } from "./index5.js";
|
|
7
|
+
import { useWidgetSuiteProvider as n } from "./index6.js";
|
|
8
|
+
import { hasAnyScope as r } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
9
|
+
import { Scope as i } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { BalancesWidget as a } from "../../../balances-widget/feature/dist/index6.js";
|
|
12
|
+
import "../../../balances-widget/feature/dist/index.js";
|
|
13
|
+
import { InsightsWidget as o } from "../../../insights-widget/feature/dist/index12.js";
|
|
14
|
+
import "../../../insights-widget/feature/dist/index.js";
|
|
15
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
16
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index10.js
|
|
17
|
+
function l() {
|
|
18
|
+
let { grantedScopes: l, availableSections: u, labels: d, navigate: f, openAccount: p } = n(), m = r(l, [i.BankAccountReadOrg]), h = u.includes(t.Accounts), g = u.includes(t.Transfers), _ = h ? () => f(t.Accounts) : void 0;
|
|
19
|
+
return /* @__PURE__ */ c("div", {
|
|
20
|
+
className: e("ttw:grid ttw:gap-4", m && "ttw:md:grid-cols-2"),
|
|
21
|
+
children: [m && /* @__PURE__ */ s(a, {
|
|
22
|
+
...d.sections.dashboard.balances,
|
|
23
|
+
onViewAllAccountsClick: _,
|
|
24
|
+
onBalanceRowClick: h ? p : void 0
|
|
25
|
+
}), /* @__PURE__ */ s(o, {
|
|
26
|
+
...d.sections.dashboard.insights,
|
|
27
|
+
onLinkExternalAccountClick: g ? () => f(t.Transfers) : void 0
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
var u = { Content: l };
|
|
32
|
+
//#endregion
|
|
33
|
+
export { l as DashboardSection, u as dashboardSection };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useWidgetSuiteProvider as e } from "./index6.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js
|
|
10
|
+
var r = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
11
|
+
className: "ttw:rounded-md ttw:border ttw:border-dashed ttw:border-border ttw:p-8 ttw:text-sm ttw:text-muted-foreground",
|
|
12
|
+
children: e
|
|
13
|
+
});
|
|
14
|
+
function i() {
|
|
15
|
+
let { labels: t } = e();
|
|
16
|
+
return /* @__PURE__ */ n(r, { children: t.sections.expenses.expensesUnavailable });
|
|
17
|
+
}
|
|
18
|
+
var a = {
|
|
19
|
+
anyOfScopes: [t.ExpenseReadOrg, t.ExpenseReadSelf],
|
|
20
|
+
Content: i
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { i as ExpensesSection, a as expensesSection };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
|
+
import "../../../shared/data-access/dist/index.js";
|
|
7
|
+
import { InvoicingWidget as t } from "../../../invoicing-widget/feature/dist/index3.js";
|
|
8
|
+
import "../../../invoicing-widget/feature/dist/index.js";
|
|
9
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index12.js
|
|
11
|
+
function r() {
|
|
12
|
+
return /* @__PURE__ */ n(t, {});
|
|
13
|
+
}
|
|
14
|
+
var i = {
|
|
15
|
+
anyOfScopes: [e.InvoiceReadOrg],
|
|
16
|
+
Content: r
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as InvoicingSection, i as invoicingSection };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useWidgetSuiteProvider as e } from "./index6.js";
|
|
6
|
+
import { SettingsWidget as t } from "../../../settings-widget/feature/dist/index6.js";
|
|
7
|
+
import "../../../settings-widget/feature/dist/index.js";
|
|
8
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index13.js
|
|
10
|
+
function r() {
|
|
11
|
+
let { labels: r } = e();
|
|
12
|
+
return /* @__PURE__ */ n(t, { ...r.sections.settings });
|
|
13
|
+
}
|
|
14
|
+
var i = { Content: r };
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as SettingsSection, i as settingsSection };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useWidgetSuiteProvider as e } from "./index6.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import { TransfersWidget as n } from "../../../transfers-widget/feature/dist/index7.js";
|
|
9
|
+
import "../../../transfers-widget/feature/dist/index.js";
|
|
10
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
11
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js
|
|
12
|
+
function i() {
|
|
13
|
+
let { labels: t } = e();
|
|
14
|
+
return /* @__PURE__ */ r(n, { ...t.sections.transfers });
|
|
15
|
+
}
|
|
16
|
+
var a = {
|
|
17
|
+
anyOfScopes: [t.BankAccountReadOrg],
|
|
18
|
+
Content: i
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { i as TransfersSection, a as transfersSection };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WidgetSuiteSectionId as e } from "./index5.js";
|
|
2
|
+
import { accountsSection as t } from "./index7.js";
|
|
3
|
+
import { billPaySection as n } from "./index8.js";
|
|
4
|
+
import { cardsSection as r } from "./index9.js";
|
|
5
|
+
import { dashboardSection as i } from "./index10.js";
|
|
6
|
+
import { expensesSection as a } from "./index11.js";
|
|
7
|
+
import { invoicingSection as o } from "./index12.js";
|
|
8
|
+
import { settingsSection as s } from "./index13.js";
|
|
9
|
+
import { transfersSection as c } from "./index14.js";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index15.js
|
|
11
|
+
var l = {
|
|
12
|
+
[e.Dashboard]: i,
|
|
13
|
+
[e.Accounts]: t,
|
|
14
|
+
[e.Cards]: r,
|
|
15
|
+
[e.Transfers]: c,
|
|
16
|
+
[e.BillPay]: n,
|
|
17
|
+
[e.Invoicing]: o,
|
|
18
|
+
[e.Expenses]: a,
|
|
19
|
+
[e.Settings]: s
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { l as WIDGET_SUITE_SECTIONS, e as WidgetSuiteSectionId };
|