@tesouro/embedded-components-react 0.10.15 → 0.11.1

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 (68) hide show
  1. package/README.md +70 -6
  2. package/dist/experimental/QuickViewWidget.d.ts +11 -0
  3. package/dist/experimental/RemoteCheckCapture.d.ts +11 -0
  4. package/dist/experimental/index.d.ts +11 -0
  5. package/dist/index.css +15 -50
  6. package/dist/index.d.ts +75 -15
  7. package/dist/index.js +56 -55
  8. package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -0
  9. package/dist/lib/BalancesWidget.d.ts +11 -0
  10. package/dist/lib/BankAccountOnboardingWidget.d.ts +11 -0
  11. package/dist/lib/BankAccountsWidget.d.ts +11 -0
  12. package/dist/lib/BankingComplianceBannerWidget.d.ts +11 -0
  13. package/dist/lib/BillPayWidget.d.ts +11 -0
  14. package/dist/lib/CardDetailsWidget.d.ts +11 -0
  15. package/dist/lib/CounterpartsWidget.d.ts +11 -0
  16. package/dist/lib/CounterpartsWidgetPublic.d.ts +11 -0
  17. package/dist/lib/CreditCardsWidget.d.ts +11 -0
  18. package/dist/lib/CustomersWidget.d.ts +11 -0
  19. package/dist/lib/DebitCardsWidget.d.ts +11 -0
  20. package/dist/lib/ExpenseManagementWidget.d.ts +11 -0
  21. package/dist/lib/InsightsWidget.d.ts +11 -0
  22. package/dist/lib/LinkedAccountsWidget.d.ts +11 -0
  23. package/dist/lib/OfferWidget.d.ts +11 -0
  24. package/dist/lib/ProductsWidget.d.ts +11 -0
  25. package/dist/lib/ReceivablesWidget.d.ts +11 -0
  26. package/dist/lib/SettingsWidget.d.ts +11 -0
  27. package/dist/lib/TransfersWidget.d.ts +54 -13
  28. package/dist/lib/WidgetProvider.d.ts +32 -2
  29. package/dist/lib/WidgetProvider.js +15 -13
  30. package/dist/lib/WidgetProviderPublic.d.ts +11 -0
  31. package/dist/lib/WidgetSuite.d.ts +54 -13
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +54 -52
  33. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +23 -21
  34. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +133 -130
  35. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  36. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +15 -12
  37. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AmountInput/AmountInput.js +30 -0
  38. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/HostIsolationScope/HostIsolationScope.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +14 -1
  41. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +57 -0
  42. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/labels.js +7 -0
  43. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -1
  44. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +37 -0
  45. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js +9 -0
  46. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +4 -2
  47. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/testIds.js +2 -2
  48. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +10 -17
  49. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +159 -218
  50. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/labels.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +37 -88
  52. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +184 -245
  53. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +43 -58
  54. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/reviewTransferStepLabels.js +6 -5
  55. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/transferResultStepLabels.js +7 -6
  56. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/useFocusFirstInvalidField.js +9 -0
  57. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountValue.js +32 -0
  58. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferDetailSheet.js +68 -101
  59. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +155 -153
  60. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js +20 -11
  61. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/maskLabels.js +7 -0
  62. package/dist/packages/shared-ui-shadcn/dist/index.js +4325 -4094
  63. package/dist/pdf.worker.min.mjs +28 -0
  64. package/package.json +13 -3
  65. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModalHeader.js +0 -29
  66. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferReviewAccountCard.js +0 -64
  67. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountTile.js +0 -14
  68. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferStatusBadge.js +0 -17
@@ -2,45 +2,48 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { createClientSecretInstaller as e } from "../../../../data-access/dist/lib/scopedClientSecret.js";
6
- import { registerQueryClient as t, unregisterQueryClient as n } from "../../../../data-access/dist/lib/clientRegistry.js";
7
- import { createEmbeddedClient as r } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
8
- import { EmbedApiProvider as i, useEmbedApi as a } from "../../../../data-access/dist/lib/EmbedApiContext.js";
5
+ import { installStyleNonce as e } from "../../../../util/dist/lib/csp.js";
6
+ import "../../../../util/dist/index.js";
7
+ import { createClientSecretInstaller as t } from "../../../../data-access/dist/lib/scopedClientSecret.js";
8
+ import { registerQueryClient as n, unregisterQueryClient as r } from "../../../../data-access/dist/lib/clientRegistry.js";
9
+ import { createEmbeddedClient as i } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
10
+ import { EmbedApiProvider as a, useEmbedApi as o } from "../../../../data-access/dist/lib/EmbedApiContext.js";
9
11
  import "../../../../data-access/dist/index.js";
10
- import { resolveUIFramework as o } from "../../../../ui/dist/lib/UIContext/UIContext.js";
11
- import { UIProvider as ee } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
12
- import { useDesignSystemEnsurer as te, useFrameworkRenderer as ne } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
13
- import { HostIsolationScope as re } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
12
+ import { resolveUIFramework as ee } from "../../../../ui/dist/lib/UIContext/UIContext.js";
13
+ import { UIProvider as te } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
14
+ import { useDesignSystemEnsurer as ne, useFrameworkRenderer as re } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
15
+ import { HostIsolationScope as ie } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
14
16
  import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
15
17
  import "../../../../ui/dist/index.js";
16
- import { getGlobalSnapshot as ie, subscribeToGlobal as ae } from "./globalStore.js";
18
+ import { getGlobalSnapshot as ae, subscribeToGlobal as oe } from "./globalStore.js";
17
19
  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";
20
+ import { configureEmbeddedClient as se } from "../analytics/client.js";
21
+ import { generateCorrelationId as ce } from "../analytics/ids.js";
22
+ import { WidgetContext as l } from "./WidgetContext.js";
21
23
  import { noop as le, resolveOrgId as ue, useAuthEpoch as de } from "./utils.js";
22
24
  import { useWidgetFetch as fe } from "./useWidgetFetch.js";
23
25
  import { deriveOrganizationStatus as pe } from "./deriveOrganizationStatus.js";
24
26
  import { deriveWidgetInitState as me, useWidgetInitPublisher as he } from "./useWidgetInitPublisher.js";
25
- import { useAnalyticsTrack as l } from "../analytics/hooks.js";
27
+ import { useAnalyticsTrack as u } from "../analytics/hooks.js";
26
28
  import { resolveProviderLabels as ge } from "./labels.js";
27
29
  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";
30
+ import { DISCLOSURES_REQUIRED_TEST_ID as d, hasRenderableAcceptanceSurface as f, resolveDisclosuresBlockedReason as p, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
31
+ import { useContext as ye, useEffect as m, useMemo as h, useRef as g, useState as _, useSyncExternalStore as be } from "react";
32
+ import { jsx as v } from "react/jsx-runtime";
31
33
  import { QueryClient as xe, QueryClientProvider as Se } from "@tanstack/react-query";
32
34
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
33
- function v({ children: ne, baseUrl: s, widgetToken: c, organizationId: l, configClient: u, gatewayRouting: d, linkComponent: f, uiFramework: v, errorFallback: we, onError: Te, analytics: y, disclosuresAcceptance: Ee, providerLabels: De, widgetName: b }) {
34
- let x = ye(ce), Oe = be(ae, ie, ie), S = x?.resolved ?? Oe, ke = x?.refetch ?? le, Ae = x?.loading ?? !1, je = x?.error ?? null, C = s ?? S.baseUrl, w = c === void 0 ? S.widgetToken : c, Me = x ? x.cascadeOrgId : Oe.organizationId, T = l === void 0 ? Me : l, E = u ?? S.configClient, D = d ?? S.gatewayRouting, O = f ?? S.linkComponent, k = v ?? S.uiFramework, A = Ee ?? x?.disclosuresAcceptance, j = De ?? x?.providerLabels, M = m(() => ge(j), [j]), N = x === null, P = N ? y !== !1 : x.analytics.enabled, [Ne] = g(se), F = N ? Ne : x.analytics.rootCorrelationId, [Pe] = g(se), I = b === void 0 ? x?.analytics.widgetName : b, L = b === void 0 ? x?.analytics.widgetInstanceId : Pe, R = h({
35
+ function y({ children: re, baseUrl: s, widgetToken: c, organizationId: u, configClient: d, gatewayRouting: f, linkComponent: p, uiFramework: y, errorFallback: we, onError: Te, analytics: b, disclosuresAcceptance: Ee, providerLabels: De, widgetName: x }) {
36
+ e();
37
+ let S = ye(l), Oe = be(oe, ae, ae), 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 = u === void 0 ? Me : u, D = d ?? C.configClient, O = f ?? C.gatewayRouting, k = p ?? C.linkComponent, A = y ?? C.uiFramework, j = Ee ?? S?.disclosuresAcceptance, M = De ?? S?.providerLabels, Ne = h(() => ge(M), [M]), N = S === null, P = N ? b !== !1 : S.analytics.enabled, [Pe] = _(ce), F = N ? Pe : S.analytics.rootCorrelationId, [Fe] = _(ce), I = x === void 0 ? S?.analytics.widgetName : x, L = x === void 0 ? S?.analytics.widgetInstanceId : Fe, R = g({
35
38
  enabled: P,
36
- organizationId: T,
39
+ organizationId: E,
37
40
  rootCorrelationId: F,
38
41
  widgetName: I,
39
42
  widgetInstanceId: L
40
- }), z = h(!1);
41
- p(() => {
42
- N || y === void 0 || z.current || (z.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
- }, [y, N]), p(() => {
43
+ }), Ie = g(!1);
44
+ m(() => {
45
+ N || b === void 0 || Ie.current || (Ie.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."));
46
+ }, [b, N]), m(() => {
44
47
  if (!N || !P || !("window" in globalThis)) return;
45
48
  let e = !1;
46
49
  return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
@@ -49,184 +52,184 @@ function v({ children: ne, baseUrl: s, widgetToken: c, organizationId: l, config
49
52
  e = !0;
50
53
  };
51
54
  }, [N, P]);
52
- let B = te(o(k));
53
- p(() => {
54
- B && B().catch(() => {});
55
- }, [B]);
56
- let V = x === null || s !== void 0 || c !== void 0 || l !== void 0 || u != null || d !== void 0 || b !== void 0, Fe = h(w);
57
- Fe.current = w;
58
- let Ie = h(null), Le = m(() => e(Ie), []), Re = a(), ze = de(w), H = m(() => {
59
- if (!V) return null;
60
- let e = oe(r(C), {
61
- tokenRef: Fe,
55
+ let z = ne(ee(A));
56
+ m(() => {
57
+ z && z().catch(() => {});
58
+ }, [z]);
59
+ let B = S === null || s !== void 0 || c !== void 0 || u !== void 0 || d != null || f !== void 0 || x !== void 0, V = g(T);
60
+ V.current = T;
61
+ let H = g(null), Le = h(() => t(H), []), Re = o(), ze = de(T), U = h(() => {
62
+ if (!B) return null;
63
+ let e = se(i(w), {
64
+ tokenRef: V,
62
65
  analyticsContextRef: R,
63
- clientSecretRef: Ie,
64
- gatewayRouting: D
66
+ clientSecretRef: H,
67
+ gatewayRouting: O
65
68
  });
66
- return E ? E(e) : e;
69
+ return D ? D(e) : e;
67
70
  }, [
68
- V,
69
- C,
70
- E,
71
- D
72
- ]), U = x === null || s !== void 0 || c !== void 0, Be = U ? ze : Re.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: Ve, initStaleForToken: q, initReplacementPending: He, refetch: Ue } = fe(U ? H : null, U ? w : void 0, R), We = U ? Ue : ke, Ge = U ? G : Ae, Ke = U ? K : je, qe = x?.resolved.initResponse, Je = !U || !Ve && !K && !W && !!w && !G, J = Je ? qe : W ?? void 0, Y = Je ? U || (x?.initResponseStaleForToken ?? !1) : q, Ye = x === null, Xe = m(() => Ye ? me({
73
- hasToken: !!w,
74
- loading: G,
75
- error: K,
76
- initResponse: W ?? void 0,
77
- initStaleForToken: q
71
+ B,
72
+ w,
73
+ D,
74
+ O
75
+ ]), W = S === null || s !== void 0 || c !== void 0, Be = W ? ze : Re.authEpoch, { result: G, loading: K, error: q, clearedForAuthChange: Ve, initStaleForToken: J, initReplacementPending: He, refetch: Ue } = fe(W ? U : null, W ? T : void 0, R), We = W ? Ue : ke, Ge = W ? K : Ae, Ke = W ? q : je, qe = S?.resolved.initResponse, Je = !W || !Ve && !q && !G && !!T && !K, Y = Je ? qe : G ?? void 0, X = Je ? W || (S?.initResponseStaleForToken ?? !1) : J, Ye = S === null, Xe = h(() => Ye ? me({
76
+ hasToken: !!T,
77
+ loading: K,
78
+ error: q,
79
+ initResponse: G ?? void 0,
80
+ initStaleForToken: J
78
81
  }) : null, [
79
82
  Ye,
80
- w,
81
- G,
83
+ T,
82
84
  K,
83
- W,
84
- q
85
+ q,
86
+ G,
87
+ J
85
88
  ]);
86
- he(Xe, w);
87
- let X = ue(T, Y ? void 0 : J?.organizationId), Ze = pe({
88
- organizationId: X,
89
- cascadeOrgId: T,
90
- ownsFetch: U,
89
+ he(Xe, T);
90
+ let Z = ue(E, X ? void 0 : Y?.organizationId), Ze = pe({
91
+ organizationId: Z,
92
+ cascadeOrgId: E,
93
+ ownsFetch: W,
91
94
  parentStatus: Re.organizationStatus,
92
- hasToken: !!w,
93
- loading: G,
94
- error: K,
95
- hasResult: !!W,
95
+ hasToken: !!T,
96
+ loading: K,
97
+ error: q,
98
+ hasResult: !!G,
96
99
  initReplacementPending: He
97
- }), Z = m(() => ({
100
+ }), Q = h(() => ({
98
101
  enabled: P,
99
- organizationId: X,
102
+ organizationId: Z,
100
103
  rootCorrelationId: F,
101
104
  widgetName: I,
102
105
  widgetInstanceId: L
103
106
  }), [
104
107
  P,
105
- X,
108
+ Z,
106
109
  F,
107
110
  I,
108
111
  L
109
112
  ]);
110
- R.current = Z;
111
- let [Q] = g(() => x === null ? new xe({ defaultOptions: {
113
+ R.current = Q;
114
+ let [$] = _(() => S === null ? new xe({ defaultOptions: {
112
115
  queries: {
113
116
  retry: !1,
114
117
  refetchOnWindowFocus: !1
115
118
  },
116
119
  mutations: { retry: !1 }
117
120
  } }) : null);
118
- p(() => {
119
- if (!Q) return;
120
- let e = Q;
121
- return t(e), () => n(e);
122
- }, [Q]);
123
- let Qe = m(() => ({
121
+ m(() => {
122
+ if (!$) return;
123
+ let e = $;
124
+ return n(e), () => r(e);
125
+ }, [$]);
126
+ let Qe = h(() => ({
124
127
  baseUrl: s,
125
128
  widgetToken: c,
126
- organizationId: l,
127
- configClient: u,
128
- gatewayRouting: d,
129
- linkComponent: f,
130
- uiFramework: v
129
+ organizationId: u,
130
+ configClient: d,
131
+ gatewayRouting: f,
132
+ linkComponent: p,
133
+ uiFramework: y
131
134
  }), [
132
135
  s,
133
136
  c,
134
- l,
135
137
  u,
136
138
  d,
137
139
  f,
138
- v
139
- ]), $e = m(() => ({
140
- baseUrl: C,
141
- widgetToken: w,
142
- organizationId: X,
143
- configClient: E,
144
- gatewayRouting: D,
145
- linkComponent: O,
146
- uiFramework: k,
147
- initResponse: J
140
+ p,
141
+ y
142
+ ]), $e = h(() => ({
143
+ baseUrl: w,
144
+ widgetToken: T,
145
+ organizationId: Z,
146
+ configClient: D,
147
+ gatewayRouting: O,
148
+ linkComponent: k,
149
+ uiFramework: A,
150
+ initResponse: Y
148
151
  }), [
149
- C,
150
152
  w,
151
- X,
152
- E,
153
+ T,
154
+ Z,
153
155
  D,
154
156
  O,
155
157
  k,
156
- J
157
- ]), et = m(() => ({
158
+ A,
159
+ Y
160
+ ]), et = h(() => ({
158
161
  resolved: $e,
159
162
  own: Qe,
160
163
  refetch: We,
161
164
  loading: Ge,
162
165
  error: Ke,
163
- analytics: Z,
164
- cascadeOrgId: T,
165
- initResponseStaleForToken: Y,
166
- disclosuresAcceptance: A,
167
- providerLabels: j
166
+ analytics: Q,
167
+ cascadeOrgId: E,
168
+ initResponseStaleForToken: X,
169
+ disclosuresAcceptance: j,
170
+ providerLabels: M
168
171
  }), [
169
172
  $e,
170
173
  Qe,
171
174
  We,
172
175
  Ge,
173
176
  Ke,
174
- Z,
175
- T,
176
- Y,
177
- A,
178
- j
179
- ]), tt = /* @__PURE__ */ _(ce.Provider, {
177
+ Q,
178
+ E,
179
+ X,
180
+ j,
181
+ M
182
+ ]), tt = /* @__PURE__ */ v(l.Provider, {
180
183
  value: et,
181
- children: /* @__PURE__ */ _(ee, {
182
- linkComponent: O,
183
- uiFramework: k,
184
- children: /* @__PURE__ */ _(re, { children: /* @__PURE__ */ _(_e, {
185
- resetKeys: [w],
184
+ children: /* @__PURE__ */ v(te, {
185
+ linkComponent: k,
186
+ uiFramework: A,
187
+ children: /* @__PURE__ */ v(ie, { children: /* @__PURE__ */ v(_e, {
188
+ resetKeys: [T],
186
189
  errorFallback: we,
187
190
  onError: Te,
188
- labels: M,
189
- children: ve(J, b) ? /* @__PURE__ */ _(Ce, {
190
- disclosuresAcceptance: A,
191
- initStaleForToken: Y,
192
- labels: M
193
- }) : ne
191
+ labels: Ne,
192
+ children: ve(Y, x) ? /* @__PURE__ */ v(Ce, {
193
+ disclosuresAcceptance: j,
194
+ initStaleForToken: X,
195
+ labels: Ne
196
+ }) : re
194
197
  }) })
195
198
  })
196
- }), $ = H ? /* @__PURE__ */ _(i, {
197
- client: H,
198
- organizationId: X,
199
- widgetToken: w,
199
+ }), nt = U ? /* @__PURE__ */ v(a, {
200
+ client: U,
201
+ organizationId: Z,
202
+ widgetToken: T,
200
203
  installClientSecret: Le,
201
204
  authEpoch: Be,
202
205
  organizationStatus: Ze,
203
206
  children: tt
204
207
  }) : tt;
205
- return Q ? /* @__PURE__ */ _(Se, {
206
- client: Q,
207
- children: $
208
- }) : $;
208
+ return $ ? /* @__PURE__ */ v(Se, {
209
+ client: $,
210
+ children: nt
211
+ }) : nt;
209
212
  }
210
213
  function Ce({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
211
- let r = ne("error-state") ?? s, i = l(), a = d(e), o = f({
214
+ let r = re("error-state") ?? s, i = u(), a = f(e), o = p({
212
215
  initStaleForToken: t,
213
216
  hasAcceptanceSurface: a
214
217
  });
215
- return p(() => {
218
+ return m(() => {
216
219
  i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
217
- }, [o, i]), t ? /* @__PURE__ */ _(r, {
220
+ }, [o, i]), t ? /* @__PURE__ */ v(r, {
218
221
  title: n.disclosuresRefreshingTitle,
219
222
  description: n.disclosuresRefreshingDescription,
220
- testId: u,
223
+ testId: d,
221
224
  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"
222
- }) : a ? /* @__PURE__ */ _("div", {
223
- "data-testid": u,
225
+ }) : a ? /* @__PURE__ */ v("div", {
226
+ "data-testid": d,
224
227
  className: "ttw:w-full",
225
228
  children: e
226
- }) : /* @__PURE__ */ _(r, {
229
+ }) : /* @__PURE__ */ v(r, {
227
230
  title: n.disclosuresRequiredTitle,
228
- testId: u,
231
+ testId: d,
229
232
  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"
230
233
  });
231
234
  }
232
- export { v as WidgetProvider, v as default };
235
+ export { y as WidgetProvider, y as default };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.10.15", n = "a19816aae6c67c1ae01c867042643c02e0546f04", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.1", n = "1199a87eb3454312056c8d4ec5dd4ce22d22e518", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -11,21 +11,24 @@ import { registerDesignSystemEnsurer as o, registerUIRenderers as s, useDesignSy
11
11
  import "./lib/UIContext/index.js";
12
12
  import { HostIsolationScope as u } from "./lib/HostIsolationScope/HostIsolationScope.js";
13
13
  import { Link as d } from "./lib/Link/Link.js";
14
- import "./lib/WidgetFrame/WidgetFrame.js";
15
- import { WidgetContainer as f } from "./lib/WidgetContainer/WidgetContainer.js";
14
+ import { WidgetFrame as f } from "./lib/WidgetFrame/WidgetFrame.js";
15
+ import { WidgetContainer as p } from "./lib/WidgetContainer/WidgetContainer.js";
16
16
  import "./lib/StatePanel/labels.js";
17
17
  import "./lib/StatePanel/StatePanel.js";
18
- import { EmptyState as p } from "./lib/EmptyState/EmptyState.js";
19
- import { ERROR_STATE_ID as m, ErrorState as h } from "./lib/ErrorState/ErrorState.js";
18
+ import { EmptyState as m } from "./lib/EmptyState/EmptyState.js";
19
+ import { ERROR_STATE_ID as h, ErrorState as g } from "./lib/ErrorState/ErrorState.js";
20
20
  import "./lib/StatePanel/NoAccessState.js";
21
- import "./lib/LoadingRegion/LoadingRegion.js";
22
- import { InlineErrorAlert as g } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
23
- import { PAGINATION_FOOTER_LABELS_EN as _ } from "./lib/PaginationFooter/labels.js";
24
- import { PaginationFooter as v } from "./lib/PaginationFooter/PaginationFooter.js";
25
- import { WidgetTitleWithIconAndChildren as y } from "./lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
21
+ import { AmountInput as _ } from "./lib/AmountInput/AmountInput.js";
22
+ import { LoadingRegion as v } from "./lib/LoadingRegion/LoadingRegion.js";
23
+ import "./lib/MaskedAccountNumber/labels.js";
24
+ import { MaskedAccountNumber as y } from "./lib/MaskedAccountNumber/MaskedAccountNumber.js";
25
+ import { InlineErrorAlert as b } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
26
+ import { PAGINATION_FOOTER_LABELS_EN as x } from "./lib/PaginationFooter/labels.js";
27
+ import { PaginationFooter as S } from "./lib/PaginationFooter/PaginationFooter.js";
28
+ import { WidgetTitleWithIconAndChildren as C } from "./lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
26
29
  import "./lib/OnboardingShell/labels.js";
27
30
  import "./lib/OnboardingShell/OnboardingShellStepper.js";
28
31
  import "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
29
- import { OnboardingShell as b } from "./lib/OnboardingShell/OnboardingShell.js";
30
- import { SectionHeading as x } from "./lib/SectionHeading/SectionHeading.js";
31
- export { m as ERROR_STATE_ID, t as EmbeddedToaster, p as EmptyState, h as ErrorState, u as HostIsolationScope, g as InlineErrorAlert, d as Link, b as OnboardingShell, _ as PAGINATION_FOOTER_LABELS_EN, v as PaginationFooter, x as SectionHeading, n as ToastNameMessage, r as UIFramework, a as UIProvider, f as WidgetContainer, y as WidgetTitleWithIconAndChildren, e as avatarSwatchFor, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
32
+ import { OnboardingShell as w } from "./lib/OnboardingShell/OnboardingShell.js";
33
+ import { SectionHeading as T } from "./lib/SectionHeading/SectionHeading.js";
34
+ export { _ as AmountInput, h as ERROR_STATE_ID, t as EmbeddedToaster, m as EmptyState, g as ErrorState, u as HostIsolationScope, b as InlineErrorAlert, d as Link, v as LoadingRegion, y as MaskedAccountNumber, w as OnboardingShell, x as PAGINATION_FOOTER_LABELS_EN, S as PaginationFooter, T as SectionHeading, n as ToastNameMessage, r as UIFramework, a as UIProvider, p as WidgetContainer, f as WidgetFrame, C as WidgetTitleWithIconAndChildren, e as avatarSwatchFor, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
@@ -0,0 +1,30 @@
1
+ import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n, cn as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
3
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/AmountInput/AmountInput.js
4
+ var o = /^(\d*)(?:\.(\d{0,2}))?$/;
5
+ function s(e) {
6
+ let t = o.exec(e.trim());
7
+ return !t || !t[1] && !t[2] ? e : `${t[1].replace(/^0+(?=\d)/, "") || "0"}.${(t[2] ?? "").padEnd(2, "0")}`;
8
+ }
9
+ function c({ value: o, onValueChange: c, currencySymbol: l, onBlur: u, className: d, ...f }) {
10
+ let p = (e) => {
11
+ u?.(e);
12
+ let t = s(o);
13
+ t !== o && c(t);
14
+ };
15
+ return /* @__PURE__ */ a(e, { children: [/* @__PURE__ */ i(t, {
16
+ "aria-hidden": !0,
17
+ children: l
18
+ }), /* @__PURE__ */ i(n, {
19
+ ...f,
20
+ type: "text",
21
+ inputMode: "decimal",
22
+ autoComplete: "off",
23
+ "data-has-start-addon": !0,
24
+ className: r("ttw:text-right ttw:tabular-nums", d),
25
+ value: o,
26
+ onChange: (e) => c(e.target.value),
27
+ onBlur: p
28
+ })] });
29
+ }
30
+ export { c as AmountInput, s as formatAmountInputValue };
@@ -38,7 +38,7 @@ var h = `position: relative; z-index: calc(${n} + 1);`, g = "document" in global
38
38
  function _() {
39
39
  if (!("document" in globalThis)) return null;
40
40
  let e = globalThis.document.createElement("div");
41
- return e.classList.add(r), e.setAttribute("style", h), e;
41
+ return e.classList.add(r), e.style.cssText = h, e;
42
42
  }
43
43
  function v(e) {
44
44
  let [t] = o(_);
@@ -14,7 +14,7 @@ function m({ children: n }) {
14
14
  let o = t(), [s] = l(() => {
15
15
  if (o != null || !("document" in globalThis)) return null;
16
16
  let e = globalThis.document.createElement("div");
17
- return e.classList.add(r), e.setAttribute("style", f), e;
17
+ return e.classList.add(r), e.style.cssText = f, e;
18
18
  });
19
19
  p(() => {
20
20
  if (!s) return;
@@ -1 +1,14 @@
1
- import "react/jsx-runtime";
1
+ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js
3
+ function r({ isLoading: r, loadingLabel: i, children: a, ...o }) {
4
+ return /* @__PURE__ */ n(e, { children: [r ? /* @__PURE__ */ t("span", {
5
+ role: "status",
6
+ className: "ttw:sr-only",
7
+ children: i
8
+ }) : null, /* @__PURE__ */ t("div", {
9
+ "aria-busy": r || void 0,
10
+ ...o,
11
+ children: a
12
+ })] });
13
+ }
14
+ export { r as LoadingRegion, r as default };
@@ -0,0 +1,57 @@
1
+ import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, formatLabel as a } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { MASKED_ACCOUNT_NUMBER_LABELS_EN as o } from "./labels.js";
3
+ import { useState as s } from "react";
4
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { Asterisk as u, Eye as d, EyeOff as f } from "lucide-react";
6
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js
7
+ function p({ last4: p, fullNumber: m, labels: h }) {
8
+ let g = {
9
+ ...o,
10
+ ...h
11
+ }, [_, v] = s(!1), y = /* @__PURE__ */ l("span", {
12
+ className: "ttw:whitespace-nowrap ttw:tabular-nums",
13
+ children: [/* @__PURE__ */ l("span", {
14
+ "aria-hidden": "true",
15
+ children: [
16
+ /* @__PURE__ */ c("span", {
17
+ className: "ttw:inline-flex",
18
+ children: [
19
+ 0,
20
+ 1,
21
+ 2,
22
+ 3
23
+ ].map((e) => /* @__PURE__ */ c(u, {
24
+ strokeWidth: 3,
25
+ className: "ttw:-mx-[0.1em] ttw:size-[0.75em]"
26
+ }, e))
27
+ }),
28
+ " ",
29
+ p
30
+ ]
31
+ }), /* @__PURE__ */ c("span", {
32
+ className: "ttw:sr-only",
33
+ children: a(g.endingIn, { last4: p })
34
+ })]
35
+ });
36
+ if (!m) return y;
37
+ let b = _ ? g.hideNumber : g.showNumber;
38
+ return /* @__PURE__ */ l("span", {
39
+ className: "ttw:inline-flex ttw:items-center ttw:gap-1",
40
+ children: [_ ? /* @__PURE__ */ c("span", {
41
+ className: "ttw:tabular-nums",
42
+ children: m
43
+ }) : y, /* @__PURE__ */ c(r, { children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
44
+ asChild: !0,
45
+ children: /* @__PURE__ */ c(e, {
46
+ type: "button",
47
+ variant: "ghost",
48
+ size: "icon-sm",
49
+ className: "ttw:-my-1.5",
50
+ "aria-label": b,
51
+ onClick: () => v((e) => !e),
52
+ children: c(_ ? f : d, { "aria-hidden": !0 })
53
+ })
54
+ }), /* @__PURE__ */ c(n, { children: b })] }) })]
55
+ });
56
+ }
57
+ export { p as MaskedAccountNumber };
@@ -0,0 +1,7 @@
1
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/labels.js
2
+ var e = {
3
+ endingIn: "ending in {last4}",
4
+ showNumber: "Show number",
5
+ hideNumber: "Hide number"
6
+ };
7
+ export { e as MASKED_ACCOUNT_NUMBER_LABELS_EN };
@@ -29,4 +29,6 @@ import { THEME_TOKEN_NAMES as j } from "./lib/theme/themeTokens.js";
29
29
  import "./lib/theme/toneColors.js";
30
30
  import { createTheme as M, isThemeDevelopmentBuild as N, readThemeTokens as P, reportThemeIssues as F, themeIssues as I, themeToCss as L } from "./lib/theme/createTheme.js";
31
31
  import "./lib/theme/index.js";
32
- export { C as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, w as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, j as THEME_TOKEN_NAMES, n as amountOutputToMajorUnits, k as buildPayableAuditHistory, O as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, t as createCurrencyFormatter, M as createTheme, S as createWidgetTokenManager, s as currencySymbolForCode, T as emitWidgetDomEvent, E as extractApiErrorMessage, i as formatCalendarDate, c as formatMoneyExact, l as formatPhoneDisplay, o as formatRejectionDate, a as formatTimestampDate, u as getInitials, _ as getRelativeCalendarDay, b as getStateOptions, A as hasUnattributedAuditRows, x as isStateValid, N as isThemeDevelopmentBuild, d as isValidAchAccountNumber, f as mergeLabelTree, r as minorExponentForCurrency, p as normalizeAmountOutputCurrencyCode, m as parseAmountOutputMajorUnits, D as parseApiValidationErrors, h as parseCalendarDate, g as parseDateOrTimestamp, v as parseDecimalAmountToMinorUnits, P as readThemeTokens, F as reportThemeIssues, y as sumAmountOutputsMajorUnits, I as themeIssues, L as themeToCss };
32
+ import { configureCsp as R, installStyleNonce as z } from "./lib/csp.js";
33
+ import { resolvePdfWorkerSrc as B } from "./lib/pdfWorkerSrc.js";
34
+ export { C as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, w as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, j as THEME_TOKEN_NAMES, n as amountOutputToMajorUnits, k as buildPayableAuditHistory, O as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, R as configureCsp, t as createCurrencyFormatter, M as createTheme, S as createWidgetTokenManager, s as currencySymbolForCode, T as emitWidgetDomEvent, E as extractApiErrorMessage, i as formatCalendarDate, c as formatMoneyExact, l as formatPhoneDisplay, o as formatRejectionDate, a as formatTimestampDate, u as getInitials, _ as getRelativeCalendarDay, b as getStateOptions, A as hasUnattributedAuditRows, z as installStyleNonce, x as isStateValid, N as isThemeDevelopmentBuild, d as isValidAchAccountNumber, f as mergeLabelTree, r as minorExponentForCurrency, p as normalizeAmountOutputCurrencyCode, m as parseAmountOutputMajorUnits, D as parseApiValidationErrors, h as parseCalendarDate, g as parseDateOrTimestamp, v as parseDecimalAmountToMinorUnits, P as readThemeTokens, F as reportThemeIssues, B as resolvePdfWorkerSrc, y as sumAmountOutputsMajorUnits, I as themeIssues, L as themeToCss };
@@ -0,0 +1,37 @@
1
+ import { setNonce as e } from "get-nonce";
2
+ // ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js
3
+ var t = {
4
+ nonce: null,
5
+ pdfWorkerSrc: null
6
+ };
7
+ function n(e) {
8
+ return e && e.trim() ? e : null;
9
+ }
10
+ function r(e) {
11
+ e.nonce !== void 0 && (t.nonce = n(e.nonce)), e.pdfWorkerSrc !== void 0 && (t.pdfWorkerSrc = n(e.pdfWorkerSrc)), u();
12
+ }
13
+ function i() {
14
+ return t;
15
+ }
16
+ function a(e) {
17
+ return e ? n(e.nonce || e.getAttribute("nonce")) : null;
18
+ }
19
+ function o(e) {
20
+ let t = e ?? (typeof document > "u" ? void 0 : document);
21
+ if (!t) return null;
22
+ let n = a(t.querySelector("meta[property=\"csp-nonce\"]"));
23
+ if (n) return n;
24
+ for (let e of Array.from(t.querySelectorAll("script[nonce]"))) {
25
+ let t = a(e);
26
+ if (t) return t;
27
+ }
28
+ return null;
29
+ }
30
+ function s() {
31
+ return t.nonce ?? o();
32
+ }
33
+ var c = { toString: () => s() ?? "" }, l = !1;
34
+ function u() {
35
+ l || (l = !0, e(c));
36
+ }
37
+ export { r as configureCsp, o as findPageNonce, i as getCspConfig, u as installStyleNonce, s as resolveStyleNonce };
@@ -0,0 +1,9 @@
1
+ import { getCspConfig as e } from "./csp.js";
2
+ // ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js
3
+ function t(e) {
4
+ return `pdfjs-dist/${e}/pdf.worker.min.js`;
5
+ }
6
+ function n(n) {
7
+ return e().pdfWorkerSrc ?? `https://widgets.tesouro.com/deps/${t(n)}`;
8
+ }
9
+ export { t as pdfWorkerObjectKey, n as resolvePdfWorkerSrc };
@@ -121,7 +121,10 @@ function h({ labels: e, featureLabels: t, isTransferMoneyOpen: h, defaultIsTrans
121
121
  confirm: c.modalConfirmTransferButton,
122
122
  goBack: c.modalGoBackButton
123
123
  },
124
- resultStep: { backToTransfers: c.modalBackToTransfersButton }
124
+ resultStep: {
125
+ title: c.modalResultTitle,
126
+ done: c.modalDoneButton
127
+ }
125
128
  }
126
129
  },
127
130
  labels: e,
@@ -129,7 +132,6 @@ function h({ labels: e, featureLabels: t, isTransferMoneyOpen: h, defaultIsTrans
129
132
  transferMoneyButton: c.transferMoneyButton,
130
133
  skeleton: c.skeleton,
131
134
  error: c.error,
132
- retry: c.retry,
133
135
  empty: c.empty,
134
136
  transferRow: c.transferRow,
135
137
  transferDetail: {