@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.
- package/README.md +70 -6
- package/dist/experimental/QuickViewWidget.d.ts +11 -0
- package/dist/experimental/RemoteCheckCapture.d.ts +11 -0
- package/dist/experimental/index.d.ts +11 -0
- package/dist/index.css +15 -50
- package/dist/index.d.ts +75 -15
- package/dist/index.js +56 -55
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -0
- package/dist/lib/BalancesWidget.d.ts +11 -0
- package/dist/lib/BankAccountOnboardingWidget.d.ts +11 -0
- package/dist/lib/BankAccountsWidget.d.ts +11 -0
- package/dist/lib/BankingComplianceBannerWidget.d.ts +11 -0
- package/dist/lib/BillPayWidget.d.ts +11 -0
- package/dist/lib/CardDetailsWidget.d.ts +11 -0
- package/dist/lib/CounterpartsWidget.d.ts +11 -0
- package/dist/lib/CounterpartsWidgetPublic.d.ts +11 -0
- package/dist/lib/CreditCardsWidget.d.ts +11 -0
- package/dist/lib/CustomersWidget.d.ts +11 -0
- package/dist/lib/DebitCardsWidget.d.ts +11 -0
- package/dist/lib/ExpenseManagementWidget.d.ts +11 -0
- package/dist/lib/InsightsWidget.d.ts +11 -0
- package/dist/lib/LinkedAccountsWidget.d.ts +11 -0
- package/dist/lib/OfferWidget.d.ts +11 -0
- package/dist/lib/ProductsWidget.d.ts +11 -0
- package/dist/lib/ReceivablesWidget.d.ts +11 -0
- package/dist/lib/SettingsWidget.d.ts +11 -0
- package/dist/lib/TransfersWidget.d.ts +54 -13
- package/dist/lib/WidgetProvider.d.ts +32 -2
- package/dist/lib/WidgetProvider.js +15 -13
- package/dist/lib/WidgetProviderPublic.d.ts +11 -0
- package/dist/lib/WidgetSuite.d.ts +54 -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/index.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AmountInput/AmountInput.js +30 -0
- 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/ui/dist/lib/LoadingRegion/LoadingRegion.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +57 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/labels.js +7 -0
- 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/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/testIds.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +10 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +159 -218
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +37 -88
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +184 -245
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +43 -58
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/reviewTransferStepLabels.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/transferResultStepLabels.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/useFocusFirstInvalidField.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountValue.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferDetailSheet.js +68 -101
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +155 -153
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js +20 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/maskLabels.js +7 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +4325 -4094
- package/dist/pdf.worker.min.mjs +28 -0
- package/package.json +13 -3
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModalHeader.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferReviewAccountCard.js +0 -64
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountTile.js +0 -14
- 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 {
|
|
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.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
|
|
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
|
|
19
|
-
import { ERROR_STATE_ID as
|
|
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/
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
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
|
|
30
|
-
import { SectionHeading as
|
|
31
|
-
export {
|
|
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 };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AmountInput/AmountInput.js
ADDED
|
@@ -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.
|
|
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;
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -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: {
|
|
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: {
|