@tesouro/embedded-components-react 0.3.43 → 0.3.45

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.
Files changed (37) hide show
  1. package/README.md +18 -2
  2. package/dist/experimental/index.d.ts +1 -975
  3. package/dist/experimental/index.js +0 -6
  4. package/dist/index.css +10 -0
  5. package/dist/index.d.ts +1730 -1425
  6. package/dist/index.js +65 -61
  7. package/dist/lib/WidgetProvider.js +7 -7
  8. package/dist/lib/WidgetSuite.d.ts +2081 -0
  9. package/dist/lib/WidgetSuite.js +5 -0
  10. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +60 -60
  11. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +6 -6
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +18 -18
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +16 -16
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +10 -10
  15. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +45 -45
  16. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +18 -18
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +118 -118
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +6 -5
  20. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index10.js +33 -0
  21. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +23 -0
  22. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index12.js +19 -0
  23. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index13.js +16 -0
  24. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +21 -0
  25. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index15.js +22 -0
  26. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +116 -0
  27. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +46 -23
  28. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +20 -88
  29. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +31 -34
  30. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +12 -132
  31. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +11 -137
  32. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +33 -0
  33. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +12 -12
  34. package/dist/packages/shared-ui-shadcn/dist/index.js +113 -113
  35. package/package.json +1 -1
  36. package/dist/experimental/WidgetSuite.d.ts +0 -976
  37. 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 { getGlobalSnapshot as n, subscribeToGlobal as ne } from "./globalStore.js";
10
- import { configureEmbeddedClient as re } from "../analytics/client.js";
11
- import { generateCorrelationId as ie } from "../analytics/ids.js";
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(ne, 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(ie), z = l({
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 = ae(A), U = c(() => {
40
- let e = re(ee(k), {
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 = le(a(F));
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 } = oe(T ? null : U, A, z), J = A ? T ?? ue ?? void 0 : void 0, Y = !T && de, X = i(j, Y ? void 0 : J?.organizationId), fe = c(() => se({
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
- ce(fe, A);
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(r.Provider, {
156
+ children: /* @__PURE__ */ f(oe.Provider, {
157
157
  value: pe,
158
- children: /* @__PURE__ */ f(o, {
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 { getGlobalSnapshot as a, subscribeToGlobal as o } from "./globalStore.js";
10
- import { EmbeddedAnalyticsEvent as s } from "../analytics/events.js";
11
- import { configureEmbeddedClient as ee } from "../analytics/client.js";
12
- import { generateCorrelationId as te } from "../analytics/ids.js";
13
- import { WidgetContext as ne } from "./WidgetContext.js";
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 { useAnalyticsTrack as u } from "../analytics/hooks.js";
24
- import { resolveProviderLabels as pe } from "./labels.js";
25
- import { WidgetErrorBoundary as me } from "./WidgetErrorBoundary.js";
26
- import { DISCLOSURES_REQUIRED_TEST_ID as d, hasRenderableAcceptanceSurface as f, resolveDisclosuresBlockedReason as p, shouldGateOnDisclosuresAcceptance as he } from "./isDisclosuresAcceptanceRequired.js";
27
- import { useContext as ge, useEffect as m, useMemo as h, useRef as g, useState as _, useSyncExternalStore as _e } from "react";
28
- import { jsx as v } from "react/jsx-runtime";
29
- import { QueryClient as ve, QueryClientProvider as ye } from "@tanstack/react-query";
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 y({ children: s, baseUrl: c, widgetToken: l, organizationId: u, configClient: d, gatewayRouting: f, linkComponent: p, uiFramework: y, implementation: b, errorFallback: xe, onError: Se, analytics: x, disclosuresAcceptance: Ce, providerLabels: we, widgetName: S }) {
32
- let C = ge(ne), Te = _e(o, a, a), w = C?.resolved ?? Te, Ee = C?.refetch ?? re, De = C?.loading ?? !1, Oe = C?.error ?? null, T = c ?? w.baseUrl, E = l === void 0 ? w.widgetToken : l, ke = C ? C.cascadeOrgId : Te.organizationId, D = u === void 0 ? ke : u, O = d ?? w.configClient, k = f ?? w.gatewayRouting, A = p ?? w.linkComponent, j = y ?? w.uiFramework, Ae = b ?? w.implementation, M = Ce ?? C?.disclosuresAcceptance, N = we ?? C?.providerLabels, je = h(() => pe(N), [N]), P = C === null, F = P ? x !== !1 : C.analytics.enabled, [Me] = _(te), I = P ? Me : C.analytics.rootCorrelationId, [Ne] = _(te), L = S === void 0 ? C?.analytics.widgetName : S, R = S === void 0 ? C?.analytics.widgetInstanceId : Ne, z = g({
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: D,
34
+ organizationId: E,
35
35
  rootCorrelationId: I,
36
36
  widgetName: L,
37
37
  widgetInstanceId: R
38
- }), Pe = g(!1);
39
- m(() => {
40
- P || x === void 0 || Pe.current || (Pe.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
- }, [x, P]), m(() => {
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 B = de(le(j));
51
- m(() => {
52
- B && B().catch(() => {});
53
- }, [B]);
54
- let Fe = C === null || c !== void 0 || l !== void 0 || u !== void 0 || d != null || f !== void 0 || S !== void 0, Ie = g(E);
55
- Ie.current = E;
56
- let Le = i(), Re = ae(E), V = h(() => {
57
- if (!Fe) return null;
58
- let e = ee(n(T), {
59
- tokenRef: Ie,
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: k
61
+ gatewayRouting: O
62
62
  });
63
- return O ? O(e) : e;
63
+ return D ? D(e) : e;
64
64
  }, [
65
- Fe,
66
- T,
67
- O,
68
- k
69
- ]), H = C === null || c !== void 0 || l !== void 0, ze = H ? Re : Le.authEpoch, { result: U, loading: W, error: G, clearedForAuthChange: Be, initStaleForToken: K, refetch: Ve } = oe(H ? V : null, H ? E : void 0, z), He = H ? Ve : Ee, Ue = H ? W : De, We = H ? G : Oe, Ge = C?.resolved.initResponse, Ke = !H || !Be && !G && !U && !!E && !W, q = Ke ? Ge : U ?? void 0, J = Ke ? H || (C?.initResponseStaleForToken ?? !1) : K, Y = C === null, qe = h(() => Y ? se({
70
- hasToken: !!E,
71
- loading: W,
72
- error: G,
73
- initResponse: U ?? void 0,
74
- initStaleForToken: K
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
- Y,
77
- E,
78
- W,
76
+ Ke,
77
+ T,
79
78
  G,
80
- U,
81
- K
79
+ K,
80
+ W,
81
+ q
82
82
  ]);
83
- ce(qe, E);
84
- let X = ie(D, J ? void 0 : q?.organizationId), Z = h(() => ({
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] = _(() => C === null ? new ve({ defaultOptions: {
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
- m(() => {
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 = h(() => ({
111
- baseUrl: c,
112
- widgetToken: l,
113
- organizationId: u,
114
- configClient: d,
115
- gatewayRouting: f,
116
- linkComponent: p,
117
- uiFramework: y,
118
- implementation: b
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
- p,
126
- y,
127
- b
128
- ]), Ye = h(() => ({
129
- baseUrl: T,
130
- widgetToken: E,
126
+ v,
127
+ y
128
+ ]), Ye = m(() => ({
129
+ baseUrl: w,
130
+ widgetToken: T,
131
131
  organizationId: X,
132
- configClient: O,
133
- gatewayRouting: k,
134
- linkComponent: A,
135
- uiFramework: j,
136
- implementation: Ae,
137
- initResponse: q
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
- Ae,
147
- q
148
- ]), Xe = h(() => ({
147
+ J
148
+ ]), Xe = m(() => ({
149
149
  resolved: Ye,
150
150
  own: Je,
151
- refetch: He,
152
- loading: Ue,
153
- error: We,
151
+ refetch: Ve,
152
+ loading: He,
153
+ error: Ue,
154
154
  analytics: Z,
155
- cascadeOrgId: D,
156
- initResponseStaleForToken: J,
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
- D,
167
- J,
166
+ E,
167
+ Y,
168
168
  M,
169
169
  N
170
- ]), Ze = /* @__PURE__ */ v(ne.Provider, {
170
+ ]), Ze = /* @__PURE__ */ _(se.Provider, {
171
171
  value: Xe,
172
- children: /* @__PURE__ */ v(ue, {
173
- linkComponent: A,
174
- uiFramework: j,
175
- children: /* @__PURE__ */ v(fe, { children: /* @__PURE__ */ v(me, {
176
- resetKeys: [E],
177
- errorFallback: xe,
178
- onError: Se,
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: he(q, S) ? /* @__PURE__ */ v(be, {
180
+ children: ge(J, x) ? /* @__PURE__ */ _(xe, {
181
181
  disclosuresAcceptance: M,
182
- initStaleForToken: J,
182
+ initStaleForToken: Y,
183
183
  labels: je
184
- }) : s
184
+ }) : te
185
185
  }) })
186
186
  })
187
- }), $ = V ? /* @__PURE__ */ v(r, {
188
- client: V,
187
+ }), $ = H ? /* @__PURE__ */ _(r, {
188
+ client: H,
189
189
  organizationId: X,
190
- widgetToken: E,
191
- authEpoch: ze,
190
+ widgetToken: T,
191
+ authEpoch: Re,
192
192
  children: Ze
193
193
  }) : Ze;
194
- return Q ? /* @__PURE__ */ v(ye, {
194
+ return Q ? /* @__PURE__ */ _(be, {
195
195
  client: Q,
196
196
  children: $
197
197
  }) : $;
198
198
  }
199
- function be({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
200
- let r = c("error-state") ?? l, i = u(), a = f(e), o = p({
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 m(() => {
205
- i(s.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
206
- }, [o, i]), t ? /* @__PURE__ */ v(r, {
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: d,
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__ */ v("div", {
212
- "data-testid": d,
211
+ }) : a ? /* @__PURE__ */ _("div", {
212
+ "data-testid": u,
213
213
  className: "ttw:w-full",
214
214
  children: e
215
- }) : /* @__PURE__ */ v(r, {
215
+ }) : /* @__PURE__ */ _(r, {
216
216
  title: n.disclosuresRequiredTitle,
217
- testId: d,
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 { y as WidgetProvider, y as default };
222
+ export { v as WidgetProvider, v as default };
@@ -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.43", n = "68fa7c9def695440c85e4947a88c2b18d248524f", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.3.45", n = "432d5e35982cbc5dddab68f4d8c07a830171a596", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,6 +1,7 @@
1
- import { WIDGET_SUITE_CONTENT_LABELS_EN as e, WIDGET_SUITE_DISCLOSURE_LABELS_EN as t, WIDGET_SUITE_SECTION_LABELS_EN as n, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as r } from "./index4.js";
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 { WidgetSuite as s } from "./index8.js";
6
- export { e as WIDGET_SUITE_CONTENT_LABELS_EN, i as WIDGET_SUITE_DEFAULT_SECTIONS, t as WIDGET_SUITE_DISCLOSURE_LABELS_EN, n as WIDGET_SUITE_SECTION_LABELS_EN, r as WIDGET_SUITE_SECTION_TITLE_LABELS_EN, o as WIDGET_SUITE_SHELL_LABELS_EN, s as WidgetSuite, a as WidgetSuiteSectionId };
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 };