@tesouro/embedded-components-react 0.11.219 → 0.11.221

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 (62) hide show
  1. package/README.md +11 -7
  2. package/dist/experimental/QuickViewWidget.d.ts +25 -13
  3. package/dist/experimental/index.d.ts +25 -13
  4. package/dist/index.css +394 -30
  5. package/dist/index.d.ts +24 -7
  6. package/dist/lib/AcceptDisclosuresWidget.d.ts +6 -2
  7. package/dist/lib/BankAccountsWidget.d.ts +4 -0
  8. package/dist/lib/BillPayWidget.d.ts +4 -3
  9. package/dist/lib/ExpenseManagementWidget.d.ts +7 -0
  10. package/dist/lib/ReceivablesWidget.d.ts +3 -2
  11. package/dist/lib/WidgetSuite.d.ts +13 -1
  12. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -2
  13. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/resolveAcceptDisclosuresContent.js +1 -2
  14. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +7 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +5 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +27 -13
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +3 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +28 -30
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +3 -0
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +8 -3
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +3 -0
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +47 -44
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +66 -63
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +73 -74
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +2 -1
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +4 -1
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
  39. package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +0 -8
  41. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +13 -14
  42. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +1 -6
  43. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +5 -5
  44. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +0 -8
  45. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index3.js +13 -14
  46. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +1 -0
  47. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +5 -6
  48. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js +86 -77
  52. package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +18 -19
  53. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +11 -12
  54. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/FdicLogo.js +76 -72
  55. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +7 -5
  56. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +49 -43
  57. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +20 -4
  58. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +10 -10
  59. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +1 -0
  60. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +1 -0
  61. package/dist/packages/shared-ui-shadcn/dist/index.js +141 -124
  62. package/package.json +1 -1
@@ -15,134 +15,134 @@ import { useDesignSystemEnsurer as ne, useFrameworkRenderer as re } from "../../
15
15
  import { HostIsolationScope as ie } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
16
16
  import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
17
17
  import "../../../../ui/dist/index.js";
18
- import { getGlobalSnapshot as ae, subscribeToGlobal as oe } from "./globalStore.js";
19
- import { EmbeddedAnalyticsEvent as c } from "../analytics/events.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";
23
- import { noop as le, resolveOrgId as ue, useAuthEpoch as de } from "./utils.js";
24
- import { useWidgetFetch as fe } from "./useWidgetFetch.js";
25
- import { deriveOrganizationStatus as pe } from "./deriveOrganizationStatus.js";
26
- import { deriveWidgetInitState as me, useWidgetInitPublisher as he } from "./useWidgetInitPublisher.js";
27
- import { useTokenRefreshRef as ge } from "./useTokenRefreshRef.js";
28
- import { useAnalyticsTrack as u } from "../analytics/hooks.js";
29
- import { resolveProviderLabels as _e } from "./labels.js";
30
- import { WidgetErrorBoundary as ve } from "./WidgetErrorBoundary.js";
31
- import { DISCLOSURES_REQUIRED_TEST_ID as d, hasRenderableAcceptanceSurface as f, resolveDisclosuresBlockedReason as p, shouldGateOnDisclosuresAcceptance as ye } from "./isDisclosuresAcceptanceRequired.js";
32
- import { useContext as be, useEffect as m, useMemo as h, useRef as g, useState as _, useSyncExternalStore as xe } from "react";
33
- import { jsx as v } from "react/jsx-runtime";
18
+ import { getGlobalSnapshot as c, subscribeToGlobal as ae } from "./globalStore.js";
19
+ import { EmbeddedAnalyticsEvent as l } from "../analytics/events.js";
20
+ import { configureEmbeddedClient as oe } from "../analytics/client.js";
21
+ import { generateCorrelationId as se } from "../analytics/ids.js";
22
+ import { WidgetContext as u } from "./WidgetContext.js";
23
+ import { noop as ce, resolveOrgId as le, useAuthEpoch as ue } from "./utils.js";
24
+ import { useWidgetFetch as de } from "./useWidgetFetch.js";
25
+ import { deriveOrganizationStatus as fe } from "./deriveOrganizationStatus.js";
26
+ import { deriveWidgetInitState as pe, useWidgetInitPublisher as me } from "./useWidgetInitPublisher.js";
27
+ import { useTokenRefreshRef as he } from "./useTokenRefreshRef.js";
28
+ import { useAnalyticsTrack as d } from "../analytics/hooks.js";
29
+ import { resolveProviderLabels as ge } from "./labels.js";
30
+ import { WidgetErrorBoundary as _e } from "./WidgetErrorBoundary.js";
31
+ import { DISCLOSURES_REQUIRED_TEST_ID as f, hasRenderableAcceptanceSurface as p, resolveDisclosuresBlockedReason as m, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
32
+ import { useContext as ye, useEffect as h, useMemo as g, useRef as _, useState as v, useSyncExternalStore as be } from "react";
33
+ import { jsx as y, jsxs as xe } from "react/jsx-runtime";
34
34
  import { QueryClient as Se, QueryClientProvider as Ce } from "@tanstack/react-query";
35
35
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
36
- function y({ children: re, baseUrl: s, widgetToken: c, organizationId: u, configClient: d, gatewayRouting: f, linkComponent: p, uiFramework: y, errorFallback: Te, onError: Ee, analytics: b, disclosuresAcceptance: De, providerLabels: Oe, widgetName: x }) {
36
+ function b({ children: re, baseUrl: s, widgetToken: l, organizationId: d, configClient: f, gatewayRouting: p, linkComponent: m, uiFramework: b, errorFallback: Te, onError: Ee, analytics: x, disclosuresAcceptance: De, providerLabels: Oe, widgetName: S, header: ke }) {
37
37
  e();
38
- let S = be(l), C = xe(oe, ae, ae), w = S?.resolved ?? C, ke = S?.refetch ?? le, Ae = S?.loading ?? !1, je = S?.error ?? null, T = s ?? w.baseUrl, E = c === void 0 ? w.widgetToken : c, Me = S ? S.cascadeOrgId : C.organizationId, D = u === void 0 ? Me : u, O = d ?? w.configClient, k = f ?? w.gatewayRouting, A = p ?? w.linkComponent, j = y ?? w.uiFramework, M = De ?? S?.disclosuresAcceptance, N = Oe ?? S?.providerLabels, P = h(() => _e(N), [N]), F = S === null, I = F ? b !== !1 : S.analytics.enabled, [Ne] = _(ce), L = F ? Ne : S.analytics.rootCorrelationId, [Pe] = _(ce), R = x === void 0 ? S?.analytics.widgetName : x, z = x === void 0 ? S?.analytics.widgetInstanceId : Pe, B = g({
39
- enabled: I,
38
+ let C = ye(u), Ae = be(ae, c, c), w = C?.resolved ?? Ae, je = C?.refetch ?? ce, Me = C?.loading ?? !1, Ne = C?.error ?? null, T = s ?? w.baseUrl, E = l === void 0 ? w.widgetToken : l, Pe = C ? C.cascadeOrgId : Ae.organizationId, D = d === void 0 ? Pe : d, O = f ?? w.configClient, k = p ?? w.gatewayRouting, A = m ?? w.linkComponent, j = b ?? w.uiFramework, M = De ?? C?.disclosuresAcceptance, N = Oe ?? C?.providerLabels, Fe = g(() => ge(N), [N]), P = C === null, F = P ? x !== !1 : C.analytics.enabled, [Ie] = v(se), I = P ? Ie : C.analytics.rootCorrelationId, [Le] = v(se), L = S === void 0 ? C?.analytics.widgetName : S, R = S === void 0 ? C?.analytics.widgetInstanceId : Le, z = _({
39
+ enabled: F,
40
40
  organizationId: D,
41
- rootCorrelationId: L,
42
- widgetName: R,
43
- widgetInstanceId: z
44
- }), Fe = g(!1);
45
- m(() => {
46
- F || b === void 0 || Fe.current || (Fe.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."));
47
- }, [b, F]), m(() => {
48
- if (!F || !I || !("window" in globalThis)) return;
41
+ rootCorrelationId: I,
42
+ widgetName: L,
43
+ widgetInstanceId: R
44
+ }), Re = _(!1);
45
+ h(() => {
46
+ P || x === void 0 || Re.current || (Re.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."));
47
+ }, [x, P]), h(() => {
48
+ if (!P || !F || !("window" in globalThis)) return;
49
49
  let e = !1;
50
50
  return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
51
51
  e || t();
52
52
  }), () => {
53
53
  e = !0;
54
54
  };
55
- }, [F, I]);
56
- let V = ne(ee(j));
57
- m(() => {
58
- V && V().catch(() => {});
59
- }, [V]);
60
- let Ie = S === null || s !== void 0 || c !== void 0 || u !== void 0 || d != null || f !== void 0 || x !== void 0, Le = g(E);
61
- Le.current = E;
62
- let Re = ge(), ze = g(null), Be = h(() => t(ze), []), Ve = o(), He = de(E), H = h(() => {
63
- if (!Ie) return null;
64
- let e = se(i(T), {
65
- tokenRef: Le,
66
- analyticsContextRef: B,
67
- clientSecretRef: ze,
55
+ }, [P, F]);
56
+ let B = ne(ee(j));
57
+ h(() => {
58
+ B && B().catch(() => {});
59
+ }, [B]);
60
+ let V = C === null || s !== void 0 || l !== void 0 || d !== void 0 || f != null || p !== void 0 || S !== void 0, H = _(E);
61
+ H.current = E;
62
+ let ze = he(), Be = _(null), Ve = g(() => t(Be), []), He = o(), Ue = ue(E), U = g(() => {
63
+ if (!V) return null;
64
+ let e = oe(i(T), {
65
+ tokenRef: H,
66
+ analyticsContextRef: z,
67
+ clientSecretRef: Be,
68
68
  gatewayRouting: k,
69
- refreshTokenRef: Re
69
+ refreshTokenRef: ze
70
70
  });
71
71
  return O ? O(e) : e;
72
72
  }, [
73
- Ie,
73
+ V,
74
74
  T,
75
75
  O,
76
76
  k,
77
- Re
78
- ]), U = S === null || s !== void 0 || c !== void 0, Ue = U ? He : Ve.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: We, initStaleForToken: q, initReplacementPending: Ge, refetch: Ke } = fe(U ? H : null, U ? E : void 0, B), qe = U ? Ke : ke, Je = U ? G : Ae, Ye = U ? K : je, Xe = S?.resolved.initResponse, J = !U || !We && !K && !W && !!E && !G, Y = J ? Xe : W ?? void 0, X = J ? U || (S?.initResponseStaleForToken ?? !1) : q, Ze = S === null, Qe = h(() => Ze ? me({
77
+ ze
78
+ ]), W = C === null || s !== void 0 || l !== void 0, We = W ? Ue : He.authEpoch, { result: G, loading: K, error: q, clearedForAuthChange: Ge, initStaleForToken: J, initReplacementPending: Ke, refetch: qe } = de(W ? U : null, W ? E : void 0, z), Je = W ? qe : je, Ye = W ? K : Me, Xe = W ? q : Ne, Ze = C?.resolved.initResponse, Qe = !W || !Ge && !q && !G && !!E && !K, Y = Qe ? Ze : G ?? void 0, X = Qe ? W || (C?.initResponseStaleForToken ?? !1) : J, $e = C === null, et = g(() => $e ? pe({
79
79
  hasToken: !!E,
80
- loading: G,
81
- error: K,
82
- initResponse: W ?? void 0,
83
- initStaleForToken: q
80
+ loading: K,
81
+ error: q,
82
+ initResponse: G ?? void 0,
83
+ initStaleForToken: J
84
84
  }) : null, [
85
- Ze,
85
+ $e,
86
86
  E,
87
- G,
88
87
  K,
89
- W,
90
- q
88
+ q,
89
+ G,
90
+ J
91
91
  ]);
92
- he(Qe, E);
93
- let Z = ue(D, X ? void 0 : Y?.organizationId), $e = pe({
92
+ me(et, E);
93
+ let Z = le(D, X ? void 0 : Y?.organizationId), tt = fe({
94
94
  organizationId: Z,
95
95
  cascadeOrgId: D,
96
- ownsFetch: U,
97
- parentStatus: Ve.organizationStatus,
96
+ ownsFetch: W,
97
+ parentStatus: He.organizationStatus,
98
98
  hasToken: !!E,
99
- loading: G,
100
- error: K,
101
- hasResult: !!W,
102
- initReplacementPending: Ge
103
- }), Q = h(() => ({
104
- enabled: I,
99
+ loading: K,
100
+ error: q,
101
+ hasResult: !!G,
102
+ initReplacementPending: Ke
103
+ }), Q = g(() => ({
104
+ enabled: F,
105
105
  organizationId: Z,
106
- rootCorrelationId: L,
107
- widgetName: R,
108
- widgetInstanceId: z
106
+ rootCorrelationId: I,
107
+ widgetName: L,
108
+ widgetInstanceId: R
109
109
  }), [
110
- I,
110
+ F,
111
111
  Z,
112
+ I,
112
113
  L,
113
- R,
114
- z
114
+ R
115
115
  ]);
116
- B.current = Q;
117
- let [$] = _(() => S === null ? new Se({ defaultOptions: {
116
+ z.current = Q;
117
+ let [$] = v(() => C === null ? new Se({ defaultOptions: {
118
118
  queries: {
119
119
  retry: !1,
120
120
  refetchOnWindowFocus: !1
121
121
  },
122
122
  mutations: { retry: !1 }
123
123
  } }) : null);
124
- m(() => {
124
+ h(() => {
125
125
  if (!$) return;
126
126
  let e = $;
127
127
  return n(e), () => r(e);
128
128
  }, [$]);
129
- let et = h(() => ({
129
+ let nt = g(() => ({
130
130
  baseUrl: s,
131
- widgetToken: c,
132
- organizationId: u,
133
- configClient: d,
134
- gatewayRouting: f,
135
- linkComponent: p,
136
- uiFramework: y
131
+ widgetToken: l,
132
+ organizationId: d,
133
+ configClient: f,
134
+ gatewayRouting: p,
135
+ linkComponent: m,
136
+ uiFramework: b
137
137
  }), [
138
138
  s,
139
- c,
140
- u,
139
+ l,
141
140
  d,
142
141
  f,
143
142
  p,
144
- y
145
- ]), tt = h(() => ({
143
+ m,
144
+ b
145
+ ]), rt = g(() => ({
146
146
  baseUrl: T,
147
147
  widgetToken: E,
148
148
  organizationId: Z,
@@ -160,79 +160,79 @@ function y({ children: re, baseUrl: s, widgetToken: c, organizationId: u, config
160
160
  A,
161
161
  j,
162
162
  Y
163
- ]), nt = h(() => ({
164
- resolved: tt,
165
- own: et,
166
- refetch: qe,
167
- loading: Je,
168
- error: Ye,
163
+ ]), it = g(() => ({
164
+ resolved: rt,
165
+ own: nt,
166
+ refetch: Je,
167
+ loading: Ye,
168
+ error: Xe,
169
169
  analytics: Q,
170
170
  cascadeOrgId: D,
171
171
  initResponseStaleForToken: X,
172
172
  disclosuresAcceptance: M,
173
173
  providerLabels: N
174
174
  }), [
175
- tt,
176
- et,
177
- qe,
175
+ rt,
176
+ nt,
178
177
  Je,
179
178
  Ye,
179
+ Xe,
180
180
  Q,
181
181
  D,
182
182
  X,
183
183
  M,
184
184
  N
185
- ]), rt = /* @__PURE__ */ v(l.Provider, {
186
- value: nt,
187
- children: /* @__PURE__ */ v(te, {
185
+ ]), at = /* @__PURE__ */ y(u.Provider, {
186
+ value: it,
187
+ children: /* @__PURE__ */ y(te, {
188
188
  linkComponent: A,
189
189
  uiFramework: j,
190
- children: /* @__PURE__ */ v(ie, { children: /* @__PURE__ */ v(ve, {
190
+ children: /* @__PURE__ */ xe(ie, { children: [ke, /* @__PURE__ */ y(_e, {
191
191
  resetKeys: [E],
192
192
  errorFallback: Te,
193
193
  onError: Ee,
194
- labels: P,
195
- children: ye(Y, x) ? /* @__PURE__ */ v(we, {
194
+ labels: Fe,
195
+ children: ve(Y, S) ? /* @__PURE__ */ y(we, {
196
196
  disclosuresAcceptance: M,
197
197
  initStaleForToken: X,
198
- labels: P
198
+ labels: Fe
199
199
  }) : re
200
- }) })
200
+ })] })
201
201
  })
202
- }), it = H ? /* @__PURE__ */ v(a, {
203
- client: H,
202
+ }), ot = U ? /* @__PURE__ */ y(a, {
203
+ client: U,
204
204
  organizationId: Z,
205
205
  widgetToken: E,
206
- installClientSecret: Be,
207
- authEpoch: Ue,
208
- organizationStatus: $e,
209
- children: rt
210
- }) : rt;
211
- return $ ? /* @__PURE__ */ v(Ce, {
206
+ installClientSecret: Ve,
207
+ authEpoch: We,
208
+ organizationStatus: tt,
209
+ children: at
210
+ }) : at;
211
+ return $ ? /* @__PURE__ */ y(Ce, {
212
212
  client: $,
213
- children: it
214
- }) : it;
213
+ children: ot
214
+ }) : ot;
215
215
  }
216
216
  function we({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
217
- let r = re("error-state") ?? s, i = u(), a = f(e), o = p({
217
+ let r = re("error-state") ?? s, i = d(), a = p(e), o = m({
218
218
  initStaleForToken: t,
219
219
  hasAcceptanceSurface: a
220
220
  });
221
- return m(() => {
222
- i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
223
- }, [o, i]), t ? /* @__PURE__ */ v(r, {
221
+ return h(() => {
222
+ i(l.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
223
+ }, [o, i]), t ? /* @__PURE__ */ y(r, {
224
224
  title: n.disclosuresRefreshingTitle,
225
225
  description: n.disclosuresRefreshingDescription,
226
- testId: d,
226
+ testId: f,
227
227
  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"
228
- }) : a ? /* @__PURE__ */ v("div", {
229
- "data-testid": d,
228
+ }) : a ? /* @__PURE__ */ y("div", {
229
+ "data-testid": f,
230
230
  className: "ttw:w-full",
231
231
  children: e
232
- }) : /* @__PURE__ */ v(r, {
232
+ }) : /* @__PURE__ */ y(r, {
233
233
  title: n.disclosuresRequiredTitle,
234
- testId: d,
234
+ testId: f,
235
235
  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"
236
236
  });
237
237
  }
238
- export { y as WidgetProvider, y as default };
238
+ export { b as WidgetProvider, b 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.11.219", n = "82156859d7a4506d465d6313dfa905a8a15ab1f5", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.221", n = "d6ab3e12650f9324437fda18bfb402f02879ce07", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -31,87 +31,96 @@ function d({ inputValue: d, onInputValueChange: f, options: p, value: m, onOptio
31
31
  P.current = e, e && b && e.focus();
32
32
  }, [b]), I = () => {
33
33
  T ? A() : (P.current?.focus(), E(!0));
34
- }, L = T && k >= 0 ? M(k) : void 0;
34
+ }, L = T && k >= 0 ? M(k) : void 0, R = T && !_ && p.length > 0;
35
35
  return /* @__PURE__ */ s("div", {
36
36
  className: "ttw:relative ttw:w-full",
37
- children: [/* @__PURE__ */ s("div", {
38
- className: e("ttw:flex ttw:h-9 ttw:w-full ttw:min-w-0 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:has-[input:focus-visible]:border-ring ttw:has-[input:focus-visible]:ring-[3px] ttw:has-[input:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive", _ && "ttw:opacity-50"),
39
- children: [
40
- g ? /* @__PURE__ */ o(u, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : null,
41
- /* @__PURE__ */ o("input", {
42
- id: y,
43
- role: "combobox",
44
- "aria-label": C.fieldLabel,
45
- "aria-autocomplete": "list",
46
- "aria-expanded": T,
47
- "aria-controls": w,
48
- "aria-activedescendant": L,
49
- "aria-invalid": v || void 0,
50
- autoComplete: "off",
51
- ref: F,
52
- maxLength: x,
53
- disabled: _,
54
- placeholder: C.placeholder,
55
- className: e("ttw:h-full ttw:min-w-0 ttw:flex-1 ttw:text-ellipsis ttw:bg-transparent ttw:pr-2 ttw:text-base ttw:outline-none ttw:placeholder:text-muted-foreground ttw:disabled:cursor-not-allowed ttw:md:text-sm", g ? "ttw:pl-2" : "ttw:pl-3"),
56
- value: d,
57
- title: d || void 0,
58
- onFocus: () => E(!0),
59
- onClick: () => E(!0),
60
- onBlur: A,
61
- onChange: (e) => {
62
- f(e.target.value), E(!0), O(void 0);
63
- },
64
- onKeyDown: N
65
- }),
66
- /* @__PURE__ */ o("button", {
67
- type: "button",
68
- tabIndex: -1,
69
- "aria-label": C.toggleListButton,
70
- "aria-controls": w,
71
- "aria-expanded": T,
72
- disabled: _,
73
- className: "ttw:mr-1 ttw:flex ttw:size-6 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-sm ttw:text-muted-foreground ttw:transition-all ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:disabled:pointer-events-none",
74
- onMouseDown: (e) => e.preventDefault(),
75
- onClick: I,
76
- children: /* @__PURE__ */ o(l, { className: "ttw:pointer-events-none ttw:size-4" })
77
- })
78
- ]
79
- }), T && !_ ? /* @__PURE__ */ o("div", {
80
- role: "presentation",
81
- className: e("ttw:absolute ttw:left-0 ttw:top-full ttw:z-50 ttw:mt-1.5 ttw:w-full ttw:min-w-138 ttw:overflow-hidden ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10", !p.length && "ttw:pointer-events-none"),
82
- onMouseDown: p.length ? (e) => e.preventDefault() : void 0,
83
- children: /* @__PURE__ */ s("ul", {
84
- id: w,
85
- role: "listbox",
86
- "aria-label": C.fieldLabel,
87
- className: "ttw:max-h-87 ttw:scroll-py-1 ttw:overflow-y-auto ttw:p-1",
88
- children: [p.map((t, n) => /* @__PURE__ */ s("li", {
89
- id: M(n),
90
- role: "option",
91
- "aria-selected": t.value === m,
92
- className: e("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", n === k && "ttw:bg-accent ttw:text-accent-foreground"),
93
- onMouseEnter: () => O(t.value),
94
- onMouseDown: () => j(t.value),
95
- children: [
96
- /* @__PURE__ */ o("span", {
97
- className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
98
- children: t.label
99
- }),
100
- t.meta ? /* @__PURE__ */ o("span", {
101
- className: "ttw:shrink-0 ttw:text-right ttw:text-xs ttw:text-muted-foreground",
102
- children: t.meta
103
- }) : null,
104
- t.value === m ? /* @__PURE__ */ o("span", {
105
- className: "ttw:pointer-events-none ttw:absolute ttw:right-2 ttw:flex ttw:size-4 ttw:items-center ttw:justify-center",
106
- children: /* @__PURE__ */ o(c, { className: "ttw:size-4" })
107
- }) : null
108
- ]
109
- }, t.value)), p.length ? null : /* @__PURE__ */ o("li", {
110
- className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
37
+ children: [
38
+ /* @__PURE__ */ s("div", {
39
+ className: e("ttw:flex ttw:h-9 ttw:w-full ttw:min-w-0 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:has-[input:focus-visible]:border-ring ttw:has-[input:focus-visible]:ring-[3px] ttw:has-[input:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive", _ && "ttw:opacity-50"),
40
+ children: [
41
+ g ? /* @__PURE__ */ o(u, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : null,
42
+ /* @__PURE__ */ o("input", {
43
+ id: y,
44
+ role: "combobox",
45
+ "aria-label": C.fieldLabel,
46
+ "aria-autocomplete": "list",
47
+ "aria-expanded": R,
48
+ "aria-controls": R ? w : void 0,
49
+ "aria-activedescendant": L,
50
+ "aria-invalid": v || void 0,
51
+ autoComplete: "off",
52
+ ref: F,
53
+ maxLength: x,
54
+ disabled: _,
55
+ placeholder: C.placeholder,
56
+ className: e("ttw:h-full ttw:min-w-0 ttw:flex-1 ttw:text-ellipsis ttw:bg-transparent ttw:pr-2 ttw:text-base ttw:outline-none ttw:placeholder:text-muted-foreground ttw:disabled:cursor-not-allowed ttw:md:text-sm", g ? "ttw:pl-2" : "ttw:pl-3"),
57
+ value: d,
58
+ title: d || void 0,
59
+ onFocus: () => E(!0),
60
+ onClick: () => E(!0),
61
+ onBlur: A,
62
+ onChange: (e) => {
63
+ f(e.target.value), E(!0), O(void 0);
64
+ },
65
+ onKeyDown: N
66
+ }),
67
+ /* @__PURE__ */ o("button", {
68
+ type: "button",
69
+ tabIndex: -1,
70
+ "aria-label": C.toggleListButton,
71
+ "aria-controls": R ? w : void 0,
72
+ "aria-expanded": R,
73
+ disabled: _,
74
+ className: "ttw:mr-1 ttw:flex ttw:size-6 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-sm ttw:text-muted-foreground ttw:transition-all ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:disabled:pointer-events-none",
75
+ onMouseDown: (e) => e.preventDefault(),
76
+ onClick: I,
77
+ children: /* @__PURE__ */ o(l, { className: "ttw:pointer-events-none ttw:size-4" })
78
+ })
79
+ ]
80
+ }),
81
+ /* @__PURE__ */ o("div", {
82
+ role: "status",
83
+ className: "ttw:sr-only",
84
+ children: T && !_ && !p.length ? C.emptyText : null
85
+ }),
86
+ T && !_ ? /* @__PURE__ */ s("div", {
87
+ role: "presentation",
88
+ className: e("ttw:absolute ttw:left-0 ttw:top-full ttw:z-50 ttw:mt-1.5 ttw:w-full ttw:min-w-138 ttw:overflow-hidden ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10", !p.length && "ttw:pointer-events-none"),
89
+ onMouseDown: p.length ? (e) => e.preventDefault() : void 0,
90
+ children: [p.length ? null : /* @__PURE__ */ o("div", {
91
+ "aria-hidden": !0,
92
+ className: "ttw:py-3 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
111
93
  children: C.emptyText
94
+ }), /* @__PURE__ */ o("ul", {
95
+ id: w,
96
+ role: "listbox",
97
+ "aria-label": C.fieldLabel,
98
+ className: e("ttw:max-h-87 ttw:scroll-py-1 ttw:overflow-y-auto ttw:p-1", !p.length && "ttw:hidden"),
99
+ children: p.map((t, n) => /* @__PURE__ */ s("li", {
100
+ id: M(n),
101
+ role: "option",
102
+ "aria-selected": t.value === m,
103
+ className: e("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", n === k && "ttw:bg-accent ttw:text-accent-foreground"),
104
+ onMouseEnter: () => O(t.value),
105
+ onMouseDown: () => j(t.value),
106
+ children: [
107
+ /* @__PURE__ */ o("span", {
108
+ className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
109
+ children: t.label
110
+ }),
111
+ t.meta ? /* @__PURE__ */ o("span", {
112
+ className: "ttw:shrink-0 ttw:text-right ttw:text-xs ttw:text-muted-foreground",
113
+ children: t.meta
114
+ }) : null,
115
+ t.value === m ? /* @__PURE__ */ o("span", {
116
+ className: "ttw:pointer-events-none ttw:absolute ttw:right-2 ttw:flex ttw:size-4 ttw:items-center ttw:justify-center",
117
+ children: /* @__PURE__ */ o(c, { className: "ttw:size-4" })
118
+ }) : null
119
+ ]
120
+ }, t.value))
112
121
  })]
113
- })
114
- }) : null]
122
+ }) : null
123
+ ]
115
124
  });
116
125
  }
117
126
  export { d as ProductSelector, d as default };
@@ -15,14 +15,14 @@ function g({ "aria-describedby": e, ...t }) {
15
15
  function _({ "aria-describedby": e, ...t }) {
16
16
  return /* @__PURE__ */ d("div", { ...t });
17
17
  }
18
- function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValue: S, exactSubtext: C, linkText: w, onClick: T, ariaLabel: E, isLoading: D = !1, isError: O = !1, onRetry: k, labels: A, testIds: j, className: M, style: N }) {
18
+ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValue: S, exactSubtext: C, spokenValue: w, linkText: T, onClick: E, isLoading: D = !1, isError: O = !1, onRetry: k, labels: A, testIds: j, className: M, style: N }) {
19
19
  let P = {
20
20
  ...l,
21
21
  ...A
22
22
  }, F = typeof b == "string" ? b ? [{
23
23
  text: b,
24
24
  tone: x
25
- }] : [] : b ?? [], I = !!T && !D && !O, L = /* @__PURE__ */ f("span", {
25
+ }] : [] : b ?? [], I = !!E && !D && !O, L = w ?? S, R = /* @__PURE__ */ f("span", {
26
26
  className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
27
27
  children: [/* @__PURE__ */ d(o, {
28
28
  component: "span",
@@ -39,7 +39,7 @@ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValu
39
39
  className: s(m, M),
40
40
  style: N,
41
41
  "data-testid": j?.tile,
42
- children: [L, /* @__PURE__ */ f("div", {
42
+ children: [R, /* @__PURE__ */ f("div", {
43
43
  role: "status",
44
44
  "aria-busy": !0,
45
45
  className: "ttw:flex ttw:flex-col ttw:gap-2",
@@ -66,7 +66,7 @@ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValu
66
66
  className: s(m, M),
67
67
  style: N,
68
68
  "data-testid": j?.tile,
69
- children: [L, /* @__PURE__ */ d(c, {
69
+ children: [R, /* @__PURE__ */ d(c, {
70
70
  title: P.loadErrorTitle,
71
71
  retryLabel: P.loadErrorRetry,
72
72
  onRetry: k,
@@ -74,15 +74,15 @@ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValu
74
74
  testId: j?.error
75
75
  })]
76
76
  });
77
- let R = /* @__PURE__ */ f(u, { children: [
78
- L,
79
- S ? /* @__PURE__ */ d("span", {
77
+ let z = /* @__PURE__ */ f(u, { children: [
78
+ R,
79
+ L ? /* @__PURE__ */ d("span", {
80
80
  className: "ttw:sr-only",
81
- children: S
81
+ children: L
82
82
  }) : null,
83
83
  /* @__PURE__ */ d(e, {
84
84
  component: "span",
85
- "aria-hidden": S ? !0 : void 0,
85
+ "aria-hidden": L ? !0 : void 0,
86
86
  className: "ttw:block ttw:min-w-0 ttw:break-words ttw:leading-tight ttw:tracking-tight ttw:text-foreground",
87
87
  children: y
88
88
  }),
@@ -102,12 +102,12 @@ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValu
102
102
  }, n))
103
103
  })]
104
104
  }) : null,
105
- I && w ? /* @__PURE__ */ d("span", {
105
+ I && T ? /* @__PURE__ */ d("span", {
106
106
  className: "ttw:mt-3 ttw:min-w-0 ttw:break-words ttw:text-sm ttw:font-medium ttw:text-primary ttw:group-hover:underline",
107
- children: w
107
+ children: T
108
108
  }) : null
109
- ] }), z = !!(S || C);
110
- return ((e) => z ? /* @__PURE__ */ d(i, { children: /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(a, {
109
+ ] }), B = !!(S || C);
110
+ return ((e) => B ? /* @__PURE__ */ d(i, { children: /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(a, {
111
111
  asChild: !0,
112
112
  children: e
113
113
  }), /* @__PURE__ */ f(r, {
@@ -120,18 +120,17 @@ function v({ title: v, value: y, subtext: b, subtextTone: x = "muted", exactValu
120
120
  children: C
121
121
  }) : null]
122
122
  })] }) }) : e)(I ? /* @__PURE__ */ d(g, {
123
- onClick: T,
124
- "aria-label": E,
123
+ onClick: E,
125
124
  "data-testid": j?.tile,
126
125
  style: N,
127
126
  className: s(m, "ttw:group ttw:cursor-pointer ttw:transition-colors ttw:hover:bg-accent/40", h, M),
128
- children: R
127
+ children: z
129
128
  }) : /* @__PURE__ */ d(_, {
130
- tabIndex: z ? 0 : void 0,
131
- className: s(m, z && h, M),
129
+ tabIndex: B ? 0 : void 0,
130
+ className: s(m, B && h, M),
132
131
  style: N,
133
132
  "data-testid": j?.tile,
134
- children: R
133
+ children: z
135
134
  }));
136
135
  }
137
136
  export { v as QuickViewTile };