@tesouro/embedded-components-react 0.10.15 → 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.
- package/README.md +70 -6
- package/dist/index.d.ts +21 -2
- package/dist/index.js +56 -55
- package/dist/lib/WidgetProvider.d.ts +21 -2
- package/dist/lib/WidgetProvider.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +54 -52
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +23 -21
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +133 -130
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/HostIsolationScope/HostIsolationScope.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js +9 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +4088 -4100
- package/dist/pdf.worker.min.mjs +28 -0
- package/package.json +13 -3
|
@@ -2,45 +2,48 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
11
|
-
import { UIProvider as
|
|
12
|
-
import { useDesignSystemEnsurer as
|
|
13
|
-
import { HostIsolationScope as
|
|
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
|
|
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
|
|
19
|
-
import { generateCorrelationId as
|
|
20
|
-
import { WidgetContext as
|
|
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
|
|
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
|
|
29
|
-
import { useContext as ye, useEffect as
|
|
30
|
-
import { jsx as
|
|
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
|
|
34
|
-
|
|
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:
|
|
39
|
+
organizationId: E,
|
|
37
40
|
rootCorrelationId: F,
|
|
38
41
|
widgetName: I,
|
|
39
42
|
widgetInstanceId: L
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
N ||
|
|
43
|
-
}, [
|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
let
|
|
59
|
-
if (!
|
|
60
|
-
let e =
|
|
61
|
-
tokenRef:
|
|
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:
|
|
64
|
-
gatewayRouting:
|
|
66
|
+
clientSecretRef: H,
|
|
67
|
+
gatewayRouting: O
|
|
65
68
|
});
|
|
66
|
-
return
|
|
69
|
+
return D ? D(e) : e;
|
|
67
70
|
}, [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]),
|
|
73
|
-
hasToken: !!
|
|
74
|
-
loading:
|
|
75
|
-
error:
|
|
76
|
-
initResponse:
|
|
77
|
-
initStaleForToken:
|
|
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
|
-
|
|
81
|
-
G,
|
|
83
|
+
T,
|
|
82
84
|
K,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
q,
|
|
86
|
+
G,
|
|
87
|
+
J
|
|
85
88
|
]);
|
|
86
|
-
he(Xe,
|
|
87
|
-
let
|
|
88
|
-
organizationId:
|
|
89
|
-
cascadeOrgId:
|
|
90
|
-
ownsFetch:
|
|
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: !!
|
|
93
|
-
loading:
|
|
94
|
-
error:
|
|
95
|
-
hasResult: !!
|
|
95
|
+
hasToken: !!T,
|
|
96
|
+
loading: K,
|
|
97
|
+
error: q,
|
|
98
|
+
hasResult: !!G,
|
|
96
99
|
initReplacementPending: He
|
|
97
|
-
}),
|
|
100
|
+
}), Q = h(() => ({
|
|
98
101
|
enabled: P,
|
|
99
|
-
organizationId:
|
|
102
|
+
organizationId: Z,
|
|
100
103
|
rootCorrelationId: F,
|
|
101
104
|
widgetName: I,
|
|
102
105
|
widgetInstanceId: L
|
|
103
106
|
}), [
|
|
104
107
|
P,
|
|
105
|
-
|
|
108
|
+
Z,
|
|
106
109
|
F,
|
|
107
110
|
I,
|
|
108
111
|
L
|
|
109
112
|
]);
|
|
110
|
-
R.current =
|
|
111
|
-
let [
|
|
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
|
-
|
|
119
|
-
if (
|
|
120
|
-
let e =
|
|
121
|
-
return
|
|
122
|
-
}, [
|
|
123
|
-
let Qe =
|
|
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:
|
|
127
|
-
configClient:
|
|
128
|
-
gatewayRouting:
|
|
129
|
-
linkComponent:
|
|
130
|
-
uiFramework:
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
152
|
-
|
|
153
|
+
T,
|
|
154
|
+
Z,
|
|
153
155
|
D,
|
|
154
156
|
O,
|
|
155
157
|
k,
|
|
156
|
-
|
|
157
|
-
|
|
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:
|
|
164
|
-
cascadeOrgId:
|
|
165
|
-
initResponseStaleForToken:
|
|
166
|
-
disclosuresAcceptance:
|
|
167
|
-
providerLabels:
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
]), tt = /* @__PURE__ */
|
|
177
|
+
Q,
|
|
178
|
+
E,
|
|
179
|
+
X,
|
|
180
|
+
j,
|
|
181
|
+
M
|
|
182
|
+
]), tt = /* @__PURE__ */ v(l.Provider, {
|
|
180
183
|
value: et,
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
linkComponent:
|
|
183
|
-
uiFramework:
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
resetKeys: [
|
|
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:
|
|
189
|
-
children: ve(
|
|
190
|
-
disclosuresAcceptance:
|
|
191
|
-
initStaleForToken:
|
|
192
|
-
labels:
|
|
193
|
-
}) :
|
|
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
|
-
}),
|
|
197
|
-
client:
|
|
198
|
-
organizationId:
|
|
199
|
-
widgetToken:
|
|
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
|
|
206
|
-
client:
|
|
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 =
|
|
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
|
|
218
|
+
return m(() => {
|
|
216
219
|
i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
|
|
217
|
-
}, [o, i]), t ? /* @__PURE__ */
|
|
220
|
+
}, [o, i]), t ? /* @__PURE__ */ v(r, {
|
|
218
221
|
title: n.disclosuresRefreshingTitle,
|
|
219
222
|
description: n.disclosuresRefreshingDescription,
|
|
220
|
-
testId:
|
|
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__ */
|
|
223
|
-
"data-testid":
|
|
225
|
+
}) : a ? /* @__PURE__ */ v("div", {
|
|
226
|
+
"data-testid": d,
|
|
224
227
|
className: "ttw:w-full",
|
|
225
228
|
children: e
|
|
226
|
-
}) : /* @__PURE__ */
|
|
229
|
+
}) : /* @__PURE__ */ v(r, {
|
|
227
230
|
title: n.disclosuresRequiredTitle,
|
|
228
|
-
testId:
|
|
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 {
|
|
235
|
+
export { y as WidgetProvider, y as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -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.
|
|
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
|
|
@@ -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.
|
|
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.
|
|
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
|
-
|
|
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 };
|