@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.
- package/README.md +11 -7
- package/dist/experimental/QuickViewWidget.d.ts +25 -13
- package/dist/experimental/index.d.ts +25 -13
- package/dist/index.css +394 -30
- package/dist/index.d.ts +24 -7
- package/dist/lib/AcceptDisclosuresWidget.d.ts +6 -2
- package/dist/lib/BankAccountsWidget.d.ts +4 -0
- package/dist/lib/BillPayWidget.d.ts +4 -3
- package/dist/lib/ExpenseManagementWidget.d.ts +7 -0
- package/dist/lib/ReceivablesWidget.d.ts +3 -2
- package/dist/lib/WidgetSuite.d.ts +13 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/resolveAcceptDisclosuresContent.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +27 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +28 -30
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +8 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +47 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +66 -63
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +73 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
- package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index3.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +5 -6
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
- 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/product-catalog/ui/dist/index9.js +86 -77
- package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +18 -19
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +11 -12
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/FdicLogo.js +76 -72
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +49 -43
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +20 -4
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +141 -124
- 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
|
|
19
|
-
import { EmbeddedAnalyticsEvent as
|
|
20
|
-
import { configureEmbeddedClient as
|
|
21
|
-
import { generateCorrelationId as
|
|
22
|
-
import { WidgetContext as
|
|
23
|
-
import { noop as
|
|
24
|
-
import { useWidgetFetch as
|
|
25
|
-
import { deriveOrganizationStatus as
|
|
26
|
-
import { deriveWidgetInitState as
|
|
27
|
-
import { useTokenRefreshRef as
|
|
28
|
-
import { useAnalyticsTrack as
|
|
29
|
-
import { resolveProviderLabels as
|
|
30
|
-
import { WidgetErrorBoundary as
|
|
31
|
-
import { DISCLOSURES_REQUIRED_TEST_ID as
|
|
32
|
-
import { useContext as
|
|
33
|
-
import { jsx as
|
|
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
|
|
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
|
|
39
|
-
enabled:
|
|
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:
|
|
42
|
-
widgetName:
|
|
43
|
-
widgetInstanceId:
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, [
|
|
48
|
-
if (!
|
|
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
|
-
}, [
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
if (!
|
|
64
|
-
let e =
|
|
65
|
-
tokenRef:
|
|
66
|
-
analyticsContextRef:
|
|
67
|
-
clientSecretRef:
|
|
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:
|
|
69
|
+
refreshTokenRef: ze
|
|
70
70
|
});
|
|
71
71
|
return O ? O(e) : e;
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
V,
|
|
74
74
|
T,
|
|
75
75
|
O,
|
|
76
76
|
k,
|
|
77
|
-
|
|
78
|
-
]),
|
|
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:
|
|
81
|
-
error:
|
|
82
|
-
initResponse:
|
|
83
|
-
initStaleForToken:
|
|
80
|
+
loading: K,
|
|
81
|
+
error: q,
|
|
82
|
+
initResponse: G ?? void 0,
|
|
83
|
+
initStaleForToken: J
|
|
84
84
|
}) : null, [
|
|
85
|
-
|
|
85
|
+
$e,
|
|
86
86
|
E,
|
|
87
|
-
G,
|
|
88
87
|
K,
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
q,
|
|
89
|
+
G,
|
|
90
|
+
J
|
|
91
91
|
]);
|
|
92
|
-
|
|
93
|
-
let Z =
|
|
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:
|
|
97
|
-
parentStatus:
|
|
96
|
+
ownsFetch: W,
|
|
97
|
+
parentStatus: He.organizationStatus,
|
|
98
98
|
hasToken: !!E,
|
|
99
|
-
loading:
|
|
100
|
-
error:
|
|
101
|
-
hasResult: !!
|
|
102
|
-
initReplacementPending:
|
|
103
|
-
}), Q =
|
|
104
|
-
enabled:
|
|
99
|
+
loading: K,
|
|
100
|
+
error: q,
|
|
101
|
+
hasResult: !!G,
|
|
102
|
+
initReplacementPending: Ke
|
|
103
|
+
}), Q = g(() => ({
|
|
104
|
+
enabled: F,
|
|
105
105
|
organizationId: Z,
|
|
106
|
-
rootCorrelationId:
|
|
107
|
-
widgetName:
|
|
108
|
-
widgetInstanceId:
|
|
106
|
+
rootCorrelationId: I,
|
|
107
|
+
widgetName: L,
|
|
108
|
+
widgetInstanceId: R
|
|
109
109
|
}), [
|
|
110
|
-
|
|
110
|
+
F,
|
|
111
111
|
Z,
|
|
112
|
+
I,
|
|
112
113
|
L,
|
|
113
|
-
R
|
|
114
|
-
z
|
|
114
|
+
R
|
|
115
115
|
]);
|
|
116
|
-
|
|
117
|
-
let [$] =
|
|
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
|
-
|
|
124
|
+
h(() => {
|
|
125
125
|
if (!$) return;
|
|
126
126
|
let e = $;
|
|
127
127
|
return n(e), () => r(e);
|
|
128
128
|
}, [$]);
|
|
129
|
-
let
|
|
129
|
+
let nt = g(() => ({
|
|
130
130
|
baseUrl: s,
|
|
131
|
-
widgetToken:
|
|
132
|
-
organizationId:
|
|
133
|
-
configClient:
|
|
134
|
-
gatewayRouting:
|
|
135
|
-
linkComponent:
|
|
136
|
-
uiFramework:
|
|
131
|
+
widgetToken: l,
|
|
132
|
+
organizationId: d,
|
|
133
|
+
configClient: f,
|
|
134
|
+
gatewayRouting: p,
|
|
135
|
+
linkComponent: m,
|
|
136
|
+
uiFramework: b
|
|
137
137
|
}), [
|
|
138
138
|
s,
|
|
139
|
-
|
|
140
|
-
u,
|
|
139
|
+
l,
|
|
141
140
|
d,
|
|
142
141
|
f,
|
|
143
142
|
p,
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
]),
|
|
164
|
-
resolved:
|
|
165
|
-
own:
|
|
166
|
-
refetch:
|
|
167
|
-
loading:
|
|
168
|
-
error:
|
|
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
|
-
|
|
176
|
-
|
|
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
|
-
]),
|
|
186
|
-
value:
|
|
187
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
190
|
+
children: /* @__PURE__ */ xe(ie, { children: [ke, /* @__PURE__ */ y(_e, {
|
|
191
191
|
resetKeys: [E],
|
|
192
192
|
errorFallback: Te,
|
|
193
193
|
onError: Ee,
|
|
194
|
-
labels:
|
|
195
|
-
children:
|
|
194
|
+
labels: Fe,
|
|
195
|
+
children: ve(Y, S) ? /* @__PURE__ */ y(we, {
|
|
196
196
|
disclosuresAcceptance: M,
|
|
197
197
|
initStaleForToken: X,
|
|
198
|
-
labels:
|
|
198
|
+
labels: Fe
|
|
199
199
|
}) : re
|
|
200
|
-
}) })
|
|
200
|
+
})] })
|
|
201
201
|
})
|
|
202
|
-
}),
|
|
203
|
-
client:
|
|
202
|
+
}), ot = U ? /* @__PURE__ */ y(a, {
|
|
203
|
+
client: U,
|
|
204
204
|
organizationId: Z,
|
|
205
205
|
widgetToken: E,
|
|
206
|
-
installClientSecret:
|
|
207
|
-
authEpoch:
|
|
208
|
-
organizationStatus:
|
|
209
|
-
children:
|
|
210
|
-
}) :
|
|
211
|
-
return $ ? /* @__PURE__ */
|
|
206
|
+
installClientSecret: Ve,
|
|
207
|
+
authEpoch: We,
|
|
208
|
+
organizationStatus: tt,
|
|
209
|
+
children: at
|
|
210
|
+
}) : at;
|
|
211
|
+
return $ ? /* @__PURE__ */ y(Ce, {
|
|
212
212
|
client: $,
|
|
213
|
-
children:
|
|
214
|
-
}) :
|
|
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 =
|
|
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
|
|
222
|
-
i(
|
|
223
|
-
}, [o, i]), t ? /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
229
|
-
"data-testid":
|
|
228
|
+
}) : a ? /* @__PURE__ */ y("div", {
|
|
229
|
+
"data-testid": f,
|
|
230
230
|
className: "ttw:w-full",
|
|
231
231
|
children: e
|
|
232
|
-
}) : /* @__PURE__ */
|
|
232
|
+
}) : /* @__PURE__ */ y(r, {
|
|
233
233
|
title: n.disclosuresRequiredTitle,
|
|
234
|
-
testId:
|
|
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 {
|
|
238
|
+
export { b as WidgetProvider, b 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.11.
|
|
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
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js
CHANGED
|
@@ -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: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"aria-
|
|
92
|
-
className:
|
|
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
|
-
|
|
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,
|
|
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 = !!
|
|
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: [
|
|
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: [
|
|
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
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
let z = /* @__PURE__ */ f(u, { children: [
|
|
78
|
+
R,
|
|
79
|
+
L ? /* @__PURE__ */ d("span", {
|
|
80
80
|
className: "ttw:sr-only",
|
|
81
|
-
children:
|
|
81
|
+
children: L
|
|
82
82
|
}) : null,
|
|
83
83
|
/* @__PURE__ */ d(e, {
|
|
84
84
|
component: "span",
|
|
85
|
-
"aria-hidden":
|
|
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 &&
|
|
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:
|
|
107
|
+
children: T
|
|
108
108
|
}) : null
|
|
109
|
-
] }),
|
|
110
|
-
return ((e) =>
|
|
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:
|
|
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:
|
|
127
|
+
children: z
|
|
129
128
|
}) : /* @__PURE__ */ d(_, {
|
|
130
|
-
tabIndex:
|
|
131
|
-
className: s(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:
|
|
133
|
+
children: z
|
|
135
134
|
}));
|
|
136
135
|
}
|
|
137
136
|
export { v as QuickViewTile };
|