@tesouro/embedded-components-react 0.2.276 → 0.2.281
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 +17 -14
- package/dist/experimental/WidgetSuite.d.ts +9 -1
- package/dist/experimental/index.d.ts +9 -1
- package/dist/index.css +3 -0
- package/dist/index.d.ts +46 -23
- package/dist/index.js +54 -53
- package/dist/lib/AcceptDisclosuresWidget.d.ts +9 -1
- package/dist/lib/BalancesWidget.d.ts +8 -0
- package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -1
- package/dist/lib/BankAccountsWidget.d.ts +9 -1
- package/dist/lib/BillPayWidget.d.ts +8 -0
- package/dist/lib/CardDetailsWidget.d.ts +9 -1
- package/dist/lib/CardsWidget.d.ts +9 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +9 -1
- package/dist/lib/CounterpartsWidget.d.ts +9 -1
- package/dist/lib/CreateCardWidget.d.ts +9 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +9 -1
- package/dist/lib/ExpenseManagementWidget.d.ts +9 -1
- package/dist/lib/ExpenseRequirementsWidget.d.ts +9 -1
- package/dist/lib/HelpWidget.d.ts +9 -1
- package/dist/lib/InsightsWidget.d.ts +8 -0
- package/dist/lib/InvoicingWidget.d.ts +9 -1
- package/dist/lib/LinkedAccountsWidget.d.ts +9 -1
- package/dist/lib/ProductsWidget.d.ts +9 -1
- package/dist/lib/ProfileWidget.d.ts +9 -1
- package/dist/lib/ReceiptMatchWidget.d.ts +9 -1
- package/dist/lib/ReceivablesWidget.d.ts +9 -1
- package/dist/lib/SettingsWidget.d.ts +9 -1
- package/dist/lib/TagsWidget.d.ts +9 -1
- package/dist/lib/TeamWidget.d.ts +9 -1
- package/dist/lib/TransfersWidget.d.ts +8 -0
- package/dist/lib/WidgetProvider.d.ts +25 -2
- package/dist/lib/WidgetProvider.js +8 -7
- package/dist/lib/WidgetProviderPublic.d.ts +8 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +54 -53
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +30 -29
- package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +69 -67
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +158 -132
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js +6 -1
- 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 +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +3 -2
- package/package.json +1 -1
|
@@ -2,185 +2,211 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { registerQueryClient as e, unregisterQueryClient as
|
|
6
|
-
import { createEmbeddedClient as
|
|
7
|
-
import { EmbedApiProvider as
|
|
5
|
+
import { registerQueryClient as e, unregisterQueryClient as t } from "../../../../data-access/dist/lib/clientRegistry.js";
|
|
6
|
+
import { createEmbeddedClient as n } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
|
|
7
|
+
import { EmbedApiProvider as r, useEmbedApi as ee } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import "../../../../data-access/dist/index.js";
|
|
9
|
-
import { getGlobalSnapshot as
|
|
10
|
-
import { configureEmbeddedClient as
|
|
11
|
-
import { generateCorrelationId as
|
|
12
|
-
import { WidgetContext as
|
|
13
|
-
import { noop as
|
|
14
|
-
import { useWidgetFetch as
|
|
15
|
-
import { deriveWidgetInitState as
|
|
16
|
-
import { resolveUIFramework as
|
|
17
|
-
import { UIProvider as
|
|
18
|
-
import { useDesignSystemEnsurer as
|
|
19
|
-
import { HostIsolationScope as
|
|
9
|
+
import { getGlobalSnapshot as te, subscribeToGlobal as ne } from "./globalStore.js";
|
|
10
|
+
import { configureEmbeddedClient as re } from "../analytics/client.js";
|
|
11
|
+
import { generateCorrelationId as ie } from "../analytics/ids.js";
|
|
12
|
+
import { WidgetContext as ae } from "./WidgetContext.js";
|
|
13
|
+
import { noop as oe, resolveOrgId as se, useAuthEpoch as ce } from "./utils.js";
|
|
14
|
+
import { useWidgetFetch as le } from "./useWidgetFetch.js";
|
|
15
|
+
import { deriveWidgetInitState as ue, useWidgetInitPublisher as de } from "./useWidgetInitPublisher.js";
|
|
16
|
+
import { resolveUIFramework as fe } from "../../../../ui/dist/lib/UIContext/UIContext.js";
|
|
17
|
+
import { UIProvider as pe } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
|
|
18
|
+
import { useDesignSystemEnsurer as me, useFrameworkRenderer as he } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
19
|
+
import { HostIsolationScope as ge } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
|
|
20
|
+
import { ErrorState as i } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
|
|
20
21
|
import "../../../../ui/dist/index.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
22
|
+
import { DEFAULT_LABELS as a } from "./labels.js";
|
|
23
|
+
import { WidgetErrorBoundary as _e } from "./WidgetErrorBoundary.js";
|
|
24
|
+
import { DISCLOSURES_REQUIRED_TEST_ID as o, isAuthenticatedDisclosuresReacceptance as s, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
|
|
25
|
+
import { useContext as ye, useEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as be } from "react";
|
|
26
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
27
|
+
import { QueryClient as xe, QueryClientProvider as Se } from "@tanstack/react-query";
|
|
25
28
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
|
|
26
|
-
function
|
|
27
|
-
let
|
|
29
|
+
function p({ children: he, baseUrl: i, widgetToken: a, organizationId: o, configClient: s, gatewayRouting: p, linkComponent: m, uiFramework: h, implementation: g, errorFallback: we, onError: Te, analytics: _, disclosuresAcceptance: Ee, widgetName: v }) {
|
|
30
|
+
let y = ye(ae), b = be(ne, te, te), x = y?.resolved ?? b, De = y?.refetch ?? oe, Oe = y?.loading ?? !1, ke = y?.error ?? null, S = i ?? x.baseUrl, C = a === void 0 ? x.widgetToken : a, Ae = y ? y.cascadeOrgId : b.organizationId, w = o === void 0 ? Ae : o, T = s ?? x.configClient, E = p ?? x.gatewayRouting, D = m ?? x.linkComponent, O = h ?? x.uiFramework, k = g ?? x.implementation, A = Ee ?? y?.disclosuresAcceptance, j = y === null, M = j ? _ !== !1 : y.analytics.enabled, [je] = d(ie), N = j ? je : y.analytics.rootCorrelationId, [Me] = d(ie), P = v === void 0 ? y?.analytics.widgetName : v, F = v === void 0 ? y?.analytics.widgetInstanceId : Me, I = u({
|
|
28
31
|
enabled: M,
|
|
29
|
-
organizationId:
|
|
32
|
+
organizationId: w,
|
|
30
33
|
rootCorrelationId: N,
|
|
31
34
|
widgetName: P,
|
|
32
35
|
widgetInstanceId: F
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
j ||
|
|
36
|
-
}, [
|
|
36
|
+
}), Ne = u(!1);
|
|
37
|
+
c(() => {
|
|
38
|
+
j || _ === void 0 || Ne.current || (Ne.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."));
|
|
39
|
+
}, [_, j]), c(() => {
|
|
37
40
|
if (!j || !M || !("window" in globalThis)) return;
|
|
38
41
|
let e = !1;
|
|
39
|
-
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled:
|
|
40
|
-
e ||
|
|
42
|
+
return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
|
|
43
|
+
e || t();
|
|
41
44
|
}), () => {
|
|
42
45
|
e = !0;
|
|
43
46
|
};
|
|
44
47
|
}, [j, M]);
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
if (!
|
|
53
|
-
let e =
|
|
54
|
-
tokenRef:
|
|
48
|
+
let L = me(fe(O));
|
|
49
|
+
c(() => {
|
|
50
|
+
L && L().catch(() => {});
|
|
51
|
+
}, [L]);
|
|
52
|
+
let R = y === null || i !== void 0 || a !== void 0 || o !== void 0 || s != null || p !== void 0 || v !== void 0, z = u(C);
|
|
53
|
+
z.current = C;
|
|
54
|
+
let Pe = ee(), Fe = ce(C), B = l(() => {
|
|
55
|
+
if (!R) return null;
|
|
56
|
+
let e = re(n(S), {
|
|
57
|
+
tokenRef: z,
|
|
55
58
|
analyticsContextRef: I,
|
|
56
|
-
gatewayRouting:
|
|
59
|
+
gatewayRouting: E
|
|
57
60
|
});
|
|
58
|
-
return
|
|
61
|
+
return T ? T(e) : e;
|
|
59
62
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
]),
|
|
65
|
-
hasToken: !!
|
|
66
|
-
loading:
|
|
67
|
-
error:
|
|
68
|
-
initResponse:
|
|
69
|
-
initStaleForToken:
|
|
63
|
+
R,
|
|
64
|
+
S,
|
|
65
|
+
T,
|
|
66
|
+
E
|
|
67
|
+
]), V = y === null || i !== void 0 || a !== void 0, Ie = V ? Fe : Pe.authEpoch, { result: H, loading: U, error: W, clearedForAuthChange: Le, initStaleForToken: G, refetch: Re } = le(V ? B : null, V ? C : void 0, I), K = V ? Re : De, q = V ? U : Oe, J = V ? W : ke, ze = y?.resolved.initResponse, Be = !V || !Le && !W && !H && !!C && !U, Y = Be ? ze : H ?? void 0, X = Be ? V || (y?.initResponseStaleForToken ?? !1) : G, Ve = y === null, He = l(() => Ve ? ue({
|
|
68
|
+
hasToken: !!C,
|
|
69
|
+
loading: U,
|
|
70
|
+
error: W,
|
|
71
|
+
initResponse: H ?? void 0,
|
|
72
|
+
initStaleForToken: G
|
|
70
73
|
}) : null, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
W,
|
|
74
|
-
G,
|
|
74
|
+
Ve,
|
|
75
|
+
C,
|
|
75
76
|
U,
|
|
76
|
-
|
|
77
|
+
W,
|
|
78
|
+
H,
|
|
79
|
+
G
|
|
77
80
|
]);
|
|
78
|
-
|
|
79
|
-
let
|
|
81
|
+
de(He, C);
|
|
82
|
+
let Z = se(w, X ? void 0 : Y?.organizationId), Q = l(() => ({
|
|
80
83
|
enabled: M,
|
|
81
|
-
organizationId:
|
|
84
|
+
organizationId: Z,
|
|
82
85
|
rootCorrelationId: N,
|
|
83
86
|
widgetName: P,
|
|
84
87
|
widgetInstanceId: F
|
|
85
88
|
}), [
|
|
86
89
|
M,
|
|
87
|
-
|
|
90
|
+
Z,
|
|
88
91
|
N,
|
|
89
92
|
P,
|
|
90
93
|
F
|
|
91
94
|
]);
|
|
92
|
-
I.current =
|
|
93
|
-
let [
|
|
95
|
+
I.current = Q;
|
|
96
|
+
let [$] = d(() => y === null ? new xe({ defaultOptions: {
|
|
94
97
|
queries: {
|
|
95
98
|
retry: !1,
|
|
96
99
|
refetchOnWindowFocus: !1
|
|
97
100
|
},
|
|
98
101
|
mutations: { retry: !1 }
|
|
99
102
|
} }) : null);
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
let
|
|
103
|
-
return e(
|
|
104
|
-
}, [
|
|
105
|
-
let
|
|
106
|
-
baseUrl:
|
|
107
|
-
widgetToken:
|
|
108
|
-
organizationId:
|
|
109
|
-
configClient:
|
|
110
|
-
gatewayRouting:
|
|
111
|
-
linkComponent:
|
|
112
|
-
uiFramework:
|
|
113
|
-
implementation:
|
|
103
|
+
c(() => {
|
|
104
|
+
if (!$) return;
|
|
105
|
+
let n = $;
|
|
106
|
+
return e(n), () => t(n);
|
|
107
|
+
}, [$]);
|
|
108
|
+
let Ue = l(() => ({
|
|
109
|
+
baseUrl: i,
|
|
110
|
+
widgetToken: a,
|
|
111
|
+
organizationId: o,
|
|
112
|
+
configClient: s,
|
|
113
|
+
gatewayRouting: p,
|
|
114
|
+
linkComponent: m,
|
|
115
|
+
uiFramework: h,
|
|
116
|
+
implementation: g
|
|
114
117
|
}), [
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
i,
|
|
119
|
+
a,
|
|
120
|
+
o,
|
|
121
|
+
s,
|
|
117
122
|
p,
|
|
118
123
|
m,
|
|
119
124
|
h,
|
|
120
|
-
g
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
implementation: A,
|
|
132
|
-
initResponse: q
|
|
125
|
+
g
|
|
126
|
+
]), We = l(() => ({
|
|
127
|
+
baseUrl: S,
|
|
128
|
+
widgetToken: C,
|
|
129
|
+
organizationId: Z,
|
|
130
|
+
configClient: T,
|
|
131
|
+
gatewayRouting: E,
|
|
132
|
+
linkComponent: D,
|
|
133
|
+
uiFramework: O,
|
|
134
|
+
implementation: k,
|
|
135
|
+
initResponse: Y
|
|
133
136
|
}), [
|
|
137
|
+
S,
|
|
134
138
|
C,
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
Z,
|
|
140
|
+
T,
|
|
137
141
|
E,
|
|
138
142
|
D,
|
|
139
143
|
O,
|
|
140
144
|
k,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
Y
|
|
146
|
+
]), Ge = l(() => ({
|
|
147
|
+
resolved: We,
|
|
148
|
+
own: Ue,
|
|
149
|
+
refetch: K,
|
|
150
|
+
loading: q,
|
|
151
|
+
error: J,
|
|
152
|
+
analytics: Q,
|
|
153
|
+
cascadeOrgId: w,
|
|
154
|
+
initResponseStaleForToken: X,
|
|
155
|
+
disclosuresAcceptance: A
|
|
152
156
|
}), [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
157
|
+
We,
|
|
158
|
+
Ue,
|
|
159
|
+
K,
|
|
160
|
+
q,
|
|
161
|
+
J,
|
|
162
|
+
Q,
|
|
163
|
+
w,
|
|
164
|
+
X,
|
|
165
|
+
A
|
|
166
|
+
]), Ke = /* @__PURE__ */ f(ae.Provider, {
|
|
167
|
+
value: Ge,
|
|
168
|
+
children: /* @__PURE__ */ f(pe, {
|
|
169
|
+
linkComponent: D,
|
|
170
|
+
uiFramework: O,
|
|
171
|
+
children: /* @__PURE__ */ f(ge, { children: /* @__PURE__ */ f(_e, {
|
|
172
|
+
resetKeys: [C],
|
|
173
|
+
errorFallback: we,
|
|
174
|
+
onError: Te,
|
|
175
|
+
children: ve(Y, v) ? /* @__PURE__ */ f(Ce, {
|
|
176
|
+
init: Y,
|
|
177
|
+
disclosuresAcceptance: A,
|
|
178
|
+
initStaleForToken: X
|
|
179
|
+
}) : he
|
|
171
180
|
}) })
|
|
172
181
|
})
|
|
173
|
-
}),
|
|
174
|
-
client:
|
|
175
|
-
organizationId:
|
|
176
|
-
widgetToken:
|
|
177
|
-
authEpoch:
|
|
178
|
-
children:
|
|
179
|
-
}) :
|
|
180
|
-
return
|
|
181
|
-
client:
|
|
182
|
-
children:
|
|
183
|
-
}) :
|
|
182
|
+
}), qe = B ? /* @__PURE__ */ f(r, {
|
|
183
|
+
client: B,
|
|
184
|
+
organizationId: Z,
|
|
185
|
+
widgetToken: C,
|
|
186
|
+
authEpoch: Ie,
|
|
187
|
+
children: Ke
|
|
188
|
+
}) : Ke;
|
|
189
|
+
return $ ? /* @__PURE__ */ f(Se, {
|
|
190
|
+
client: $,
|
|
191
|
+
children: qe
|
|
192
|
+
}) : qe;
|
|
193
|
+
}
|
|
194
|
+
function Ce({ init: e, disclosuresAcceptance: t, initStaleForToken: n }) {
|
|
195
|
+
let r = he("error-state") ?? i;
|
|
196
|
+
return n ? /* @__PURE__ */ f(r, {
|
|
197
|
+
title: a.disclosuresRefreshingTitle,
|
|
198
|
+
description: a.disclosuresRefreshingDescription,
|
|
199
|
+
testId: o,
|
|
200
|
+
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"
|
|
201
|
+
}) : s(e) && t != null ? /* @__PURE__ */ f("div", {
|
|
202
|
+
"data-testid": o,
|
|
203
|
+
className: "ttw:w-full",
|
|
204
|
+
children: t
|
|
205
|
+
}) : /* @__PURE__ */ f(r, {
|
|
206
|
+
title: a.disclosuresRequiredTitle,
|
|
207
|
+
testId: o,
|
|
208
|
+
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"
|
|
209
|
+
});
|
|
184
210
|
}
|
|
185
211
|
//#endregion
|
|
186
|
-
export {
|
|
212
|
+
export { p as WidgetProvider, p as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js
CHANGED
|
@@ -12,16 +12,19 @@ function s() {
|
|
|
12
12
|
return i(n)?.own ?? null;
|
|
13
13
|
}
|
|
14
14
|
function c() {
|
|
15
|
-
return i(n)?.
|
|
15
|
+
return i(n)?.disclosuresAcceptance;
|
|
16
16
|
}
|
|
17
17
|
function l() {
|
|
18
|
-
return i(n)?.
|
|
18
|
+
return i(n)?.initResponseStaleForToken ?? !1;
|
|
19
19
|
}
|
|
20
20
|
function u() {
|
|
21
|
-
return i(n)?.
|
|
21
|
+
return i(n)?.refetch ?? r;
|
|
22
22
|
}
|
|
23
23
|
function d() {
|
|
24
|
+
return i(n)?.loading ?? !1;
|
|
25
|
+
}
|
|
26
|
+
function f() {
|
|
24
27
|
return i(n)?.error ?? null;
|
|
25
28
|
}
|
|
26
29
|
//#endregion
|
|
27
|
-
export { s as useOwnWidgetConfig,
|
|
30
|
+
export { c as useDisclosuresAcceptanceSurface, s as useOwnWidgetConfig, u as useRefetchWidget, o as useWidgetConfig, f as useWidgetError, l as useWidgetInitStaleForToken, d as useWidgetLoading };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js
|
|
2
|
+
var e = "widget-disclosures-required", t = /* @__PURE__ */ new Set([
|
|
3
|
+
"accept_disclosures",
|
|
4
|
+
"onboarding",
|
|
5
|
+
"widget_suite"
|
|
6
|
+
]);
|
|
7
|
+
function n(e) {
|
|
8
|
+
return e?.disclosuresRequired === "REQUIRED" && e?.disclosuresAccepted === !1;
|
|
9
|
+
}
|
|
10
|
+
function r(e) {
|
|
11
|
+
return e !== void 0 && t.has(e);
|
|
12
|
+
}
|
|
13
|
+
function i(e, t) {
|
|
14
|
+
return t !== void 0 && n(e) && !r(t);
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
return n(e) && e?.status === "ACTIVE";
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as DISCLOSURES_REQUIRED_TEST_ID, a as isAuthenticatedDisclosuresReacceptance, n as isDisclosuresAcceptanceRequired, r as isDisclosuresGateExempt, i as shouldGateOnDisclosuresAcceptance };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js
|
|
2
|
-
var e = {
|
|
2
|
+
var e = {
|
|
3
|
+
errorBoundaryFallback: "Something went wrong loading this widget.",
|
|
4
|
+
disclosuresRequiredTitle: "Accept disclosures to continue",
|
|
5
|
+
disclosuresRefreshingTitle: "Updating your session",
|
|
6
|
+
disclosuresRefreshingDescription: "Please wait while we load the latest disclosures for this session."
|
|
7
|
+
};
|
|
3
8
|
//#endregion
|
|
4
9
|
export { e as DEFAULT_LABELS };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.281", n = "3edd9856a4389e08020d7acb2298be398fc4ce89", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -12,14 +12,14 @@ import { HostIsolationScope as l } from "./lib/HostIsolationScope/HostIsolationS
|
|
|
12
12
|
import { Link as u } from "./lib/Link/Link.js";
|
|
13
13
|
import { WidgetContainer as d } from "./lib/WidgetContainer/WidgetContainer.js";
|
|
14
14
|
import { EmptyState as f } from "./lib/EmptyState/EmptyState.js";
|
|
15
|
-
import {
|
|
16
|
-
import { InlineErrorAlert as
|
|
17
|
-
import { PAGINATION_FOOTER_LABELS_EN as
|
|
18
|
-
import { PaginationFooter as
|
|
19
|
-
import { WidgetTitleWithIconAndChildren as
|
|
15
|
+
import { ERROR_STATE_ID as p, ErrorState as m } from "./lib/ErrorState/ErrorState.js";
|
|
16
|
+
import { InlineErrorAlert as h } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
17
|
+
import { PAGINATION_FOOTER_LABELS_EN as g } from "./lib/PaginationFooter/labels.js";
|
|
18
|
+
import { PaginationFooter as _ } from "./lib/PaginationFooter/PaginationFooter.js";
|
|
19
|
+
import { WidgetTitleWithIconAndChildren as v } from "./lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
|
|
20
20
|
import "./lib/OnboardingShell/labels.js";
|
|
21
21
|
import "./lib/OnboardingShell/OnboardingShellStepper.js";
|
|
22
|
-
import { OnboardingShellOverlayPortal as
|
|
23
|
-
import { OnboardingShell as
|
|
24
|
-
import { SectionHeading as
|
|
25
|
-
export { t as EmbeddedToaster, f as EmptyState,
|
|
22
|
+
import { OnboardingShellOverlayPortal as y } from "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
|
|
23
|
+
import { OnboardingShell as b } from "./lib/OnboardingShell/OnboardingShell.js";
|
|
24
|
+
import { SectionHeading as x } from "./lib/SectionHeading/SectionHeading.js";
|
|
25
|
+
export { p as ERROR_STATE_ID, t as EmbeddedToaster, f as EmptyState, m as ErrorState, l as HostIsolationScope, h as InlineErrorAlert, u as Link, b as OnboardingShell, y as OnboardingShellOverlayPortal, g as PAGINATION_FOOTER_LABELS_EN, _ as PaginationFooter, x as SectionHeading, n as UIFramework, i as UIProvider, d as WidgetContainer, v as WidgetTitleWithIconAndChildren, e as avatarSwatchFor, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { AlertCircleIcon as
|
|
1
|
+
import { Button as e, cn as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { AlertCircleIcon as i } from "lucide-react";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var a = "error-state";
|
|
6
|
+
function o({ icon: a, title: o, description: s, retryLabel: c, onRetry: l, className: u, testId: d }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
"data-testid": d,
|
|
9
|
+
className: t("ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center", u),
|
|
9
10
|
children: [
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
+
/* @__PURE__ */ n("div", {
|
|
11
12
|
className: "ttw:mb-4 ttw:flex ttw:h-14 ttw:w-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-destructive/10",
|
|
12
|
-
children:
|
|
13
|
+
children: a ?? /* @__PURE__ */ n(i, { className: "ttw:h-6 ttw:w-6 ttw:text-destructive" })
|
|
13
14
|
}),
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ n("h3", {
|
|
15
16
|
className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
|
|
16
|
-
children: a
|
|
17
|
-
}),
|
|
18
|
-
o && /* @__PURE__ */ t("p", {
|
|
19
|
-
className: "ttw:mb-6 ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
|
|
20
17
|
children: o
|
|
21
18
|
}),
|
|
22
|
-
s &&
|
|
23
|
-
|
|
24
|
-
onClick: c,
|
|
19
|
+
s && /* @__PURE__ */ n("p", {
|
|
20
|
+
className: t("ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground", c && l && "ttw:mb-6"),
|
|
25
21
|
children: s
|
|
22
|
+
}),
|
|
23
|
+
c && l && /* @__PURE__ */ n(e, {
|
|
24
|
+
variant: "outline",
|
|
25
|
+
onClick: l,
|
|
26
|
+
children: c
|
|
26
27
|
})
|
|
27
28
|
]
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
//#endregion
|
|
31
|
-
export {
|
|
32
|
+
export { a as ERROR_STATE_ID, o as ErrorState, o as default };
|
|
@@ -72,7 +72,7 @@ function p({ pageSizeOptions: t = i, screenLabels: r, formLabels: p, deleteLabel
|
|
|
72
72
|
})
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
|
-
function m({ baseUrl: e, widgetToken: n, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: f, analytics: m,
|
|
75
|
+
function m({ baseUrl: e, widgetToken: n, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: f, analytics: m, disclosuresAcceptance: h, ...g }) {
|
|
76
76
|
return /* @__PURE__ */ d(t, {
|
|
77
77
|
widgetName: r,
|
|
78
78
|
baseUrl: e,
|
|
@@ -86,7 +86,8 @@ function m({ baseUrl: e, widgetToken: n, organizationId: i, configClient: a, gat
|
|
|
86
86
|
errorFallback: u,
|
|
87
87
|
onError: f,
|
|
88
88
|
analytics: m,
|
|
89
|
-
|
|
89
|
+
disclosuresAcceptance: h,
|
|
90
|
+
children: /* @__PURE__ */ d(p, { ...g })
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
//#endregion
|
|
@@ -344,7 +344,7 @@ function h({ labels: r, featureLabels: a, title: h, acceptInviteRedirectUri: g }
|
|
|
344
344
|
})
|
|
345
345
|
] });
|
|
346
346
|
}
|
|
347
|
-
function g({ baseUrl: e, widgetToken: t, organizationId: ee, configClient: n, gatewayRouting: te, linkComponent: ne, implementation: re, uiFramework: ie, errorFallback: ae, onError: oe, analytics: i,
|
|
347
|
+
function g({ baseUrl: e, widgetToken: t, organizationId: ee, configClient: n, gatewayRouting: te, linkComponent: ne, implementation: re, uiFramework: ie, errorFallback: ae, onError: oe, analytics: i, disclosuresAcceptance: o, ...se }) {
|
|
348
348
|
return /* @__PURE__ */ f(r, {
|
|
349
349
|
widgetName: a,
|
|
350
350
|
baseUrl: e,
|
|
@@ -358,7 +358,8 @@ function g({ baseUrl: e, widgetToken: t, organizationId: ee, configClient: n, ga
|
|
|
358
358
|
errorFallback: ae,
|
|
359
359
|
onError: oe,
|
|
360
360
|
analytics: i,
|
|
361
|
-
|
|
361
|
+
disclosuresAcceptance: o,
|
|
362
|
+
children: /* @__PURE__ */ f(h, { ...se })
|
|
362
363
|
});
|
|
363
364
|
}
|
|
364
365
|
//#endregion
|
|
@@ -110,7 +110,7 @@ function D({ sections: r, labels: m, sectionLabels: D, sectionTitleLabels: O, co
|
|
|
110
110
|
labels: m
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
function O({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d,
|
|
113
|
+
function O({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...p }) {
|
|
114
114
|
return /* @__PURE__ */ w(r, {
|
|
115
115
|
widgetName: m,
|
|
116
116
|
baseUrl: e,
|
|
@@ -124,7 +124,8 @@ function O({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
|
|
|
124
124
|
errorFallback: l,
|
|
125
125
|
onError: u,
|
|
126
126
|
analytics: d,
|
|
127
|
-
|
|
127
|
+
disclosuresAcceptance: f,
|
|
128
|
+
children: /* @__PURE__ */ w(D, { ...p })
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
//#endregion
|