@tesouro/embedded-components-react 0.10.14 → 0.11.0

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 (34) hide show
  1. package/README.md +70 -6
  2. package/dist/experimental/QuickViewWidget.d.ts +73 -2
  3. package/dist/experimental/index.d.ts +73 -2
  4. package/dist/index.d.ts +21 -2
  5. package/dist/index.js +56 -55
  6. package/dist/lib/WidgetProvider.d.ts +21 -2
  7. package/dist/lib/WidgetProvider.js +15 -13
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +54 -52
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +23 -21
  10. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/data-access/dist/index.js +1 -0
  11. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/data-access/dist/index2.js +84 -0
  12. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/index.js +3 -0
  13. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +101 -0
  14. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/labels.js +19 -0
  15. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/summarizeOpenBills.js +13 -0
  16. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/testIds.js +7 -0
  17. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/useOpenBillsSummary.js +30 -0
  18. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/analytics/events.js +4 -0
  19. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index.js +3 -0
  20. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js +8 -0
  21. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +32 -0
  22. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js +51 -35
  23. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js +6 -3
  24. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +133 -130
  25. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/HostIsolationScope/HostIsolationScope.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -1
  30. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +37 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js +9 -0
  32. package/dist/packages/shared-ui-shadcn/dist/index.js +4090 -4101
  33. package/dist/pdf.worker.min.mjs +28 -0
  34. package/package.json +13 -3
@@ -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.14", n = "40711da1c0671bc9bb72598372cf9cacc19424b2", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.0", n = "e6a6ac128fb58394e9391583d640a385022b289d", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -74,7 +74,7 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
74
74
  component: "span",
75
75
  variant: "body2",
76
76
  color: p,
77
- className: n("ttw:block", p === "destructive" && "ttw:font-medium"),
77
+ className: n("ttw:block", p !== "muted" && "ttw:font-medium"),
78
78
  children: f
79
79
  }) : null,
80
80
  T && m ? /* @__PURE__ */ o("span", {
@@ -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;
@@ -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 };