@tesouro/embedded-components-react 0.10.2 → 0.10.6
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/dist/index.d.ts +3 -0
- package/dist/lib/BankAccountsWidget.d.ts +3 -0
- package/dist/lib/WidgetSuite.d.ts +3 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +39 -36
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetFeature.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +31 -22
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +44 -31
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +59 -56
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/useDismissedInsightIds.js +77 -38
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2415,6 +2415,9 @@ interface Labels$3 {
|
|
|
2415
2415
|
statementsTab: string;
|
|
2416
2416
|
detailsTab: string;
|
|
2417
2417
|
noTransactionsLabel: string;
|
|
2418
|
+
transactionsErrorTitle: string;
|
|
2419
|
+
transactionsErrorRetry: string;
|
|
2420
|
+
transactionsLoadingLabel: string;
|
|
2418
2421
|
transactionDateColumn: string;
|
|
2419
2422
|
transactionDescriptionColumn: string;
|
|
2420
2423
|
transactionAmountColumn: string;
|
|
@@ -643,6 +643,9 @@ interface Labels {
|
|
|
643
643
|
statementsTab: string;
|
|
644
644
|
detailsTab: string;
|
|
645
645
|
noTransactionsLabel: string;
|
|
646
|
+
transactionsErrorTitle: string;
|
|
647
|
+
transactionsErrorRetry: string;
|
|
648
|
+
transactionsLoadingLabel: string;
|
|
646
649
|
transactionDateColumn: string;
|
|
647
650
|
transactionDescriptionColumn: string;
|
|
648
651
|
transactionAmountColumn: string;
|
|
@@ -1439,6 +1439,9 @@ interface Labels$3 {
|
|
|
1439
1439
|
statementsTab: string;
|
|
1440
1440
|
detailsTab: string;
|
|
1441
1441
|
noTransactionsLabel: string;
|
|
1442
|
+
transactionsErrorTitle: string;
|
|
1443
|
+
transactionsErrorRetry: string;
|
|
1444
|
+
transactionsLoadingLabel: string;
|
|
1442
1445
|
transactionDateColumn: string;
|
|
1443
1446
|
transactionDescriptionColumn: string;
|
|
1444
1447
|
transactionAmountColumn: string;
|
|
@@ -12,12 +12,12 @@ import { useEmbedApi as a } from "../../../../../shared/data-access/dist/lib/Emb
|
|
|
12
12
|
import { Scope as o } from "../../../../../shared/data-access/dist/lib/scopes.js";
|
|
13
13
|
import { useAllBankAccountsQuery as s } from "../../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
14
14
|
import "../../../../../shared/data-access/dist/index.js";
|
|
15
|
-
import { useRefetchWidget as c, useWidgetConfig as l, useWidgetError as u,
|
|
15
|
+
import { useRefetchWidget as c, useWidgetConfig as l, useWidgetError as u, useWidgetInitStaleForToken as d, useWidgetLoading as f } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
16
16
|
import "../../../../../shared/feature/dist/index.js";
|
|
17
|
-
import { createContext as
|
|
18
|
-
import { jsx as
|
|
17
|
+
import { createContext as p, useCallback as m, useContext as h, useMemo as g } from "react";
|
|
18
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
19
19
|
// ../../libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js
|
|
20
|
-
var
|
|
20
|
+
var v = p({
|
|
21
21
|
accountRows: [],
|
|
22
22
|
isLoading: !1,
|
|
23
23
|
isError: !1,
|
|
@@ -26,15 +26,17 @@ var _ = f({
|
|
|
26
26
|
shouldTotalBalanceDisplay: !1,
|
|
27
27
|
shouldShowViewAllAccounts: !1,
|
|
28
28
|
isRowClickable: !1,
|
|
29
|
+
isVisible: !1,
|
|
29
30
|
onViewAllAccountsClicked: () => {}
|
|
30
|
-
}),
|
|
31
|
-
let { data:
|
|
32
|
-
|
|
31
|
+
}), y = () => h(v), b = ({ children: p, maxAccounts: h, onBalanceRowClick: y, onViewAllAccountsClick: b }) => {
|
|
32
|
+
let { initResponse: x } = l(), S = d(), C = !S && (x?.scopes?.includes(o.BankAccountReadOrg) ?? !1), { data: w, isLoading: T, isError: E, refetch: D, hasNextPage: O, isFetchingNextPage: k } = s({ enabled: C }), A = f(), j = i(a().organizationStatus), M = u(), N = c(), P = A && !x || j && !w || T, F = !!M || E, I = m(() => {
|
|
33
|
+
N(), !M && C && D();
|
|
33
34
|
}, [
|
|
34
|
-
A,
|
|
35
35
|
C,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
N,
|
|
37
|
+
D,
|
|
38
|
+
M
|
|
39
|
+
]), L = w?.data ?? [], R = g(() => L.map((t) => {
|
|
38
40
|
let r = t.accountNumber.slice(-4), i = n(t.balance);
|
|
39
41
|
return {
|
|
40
42
|
accountId: t.id,
|
|
@@ -47,37 +49,38 @@ var _ = f({
|
|
|
47
49
|
})
|
|
48
50
|
}
|
|
49
51
|
};
|
|
50
|
-
}), [
|
|
51
|
-
let n = t(
|
|
52
|
+
}), [L]), z = g(() => {
|
|
53
|
+
let n = t(L[0]?.balance?.currencyCode), i = r(L.map((e) => e.balance), n);
|
|
52
54
|
return e(i, {
|
|
53
55
|
currencyCode: n,
|
|
54
56
|
includeSpaceAfterCurrencySymbol: !1
|
|
55
57
|
});
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
]),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
]),
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
return /* @__PURE__ */
|
|
58
|
+
}, [L]), B = g(() => L.length > 1 && (x?.scopes?.includes(o.BankAccountReadOrg) ?? !1) && !O && !k, [
|
|
59
|
+
L.length,
|
|
60
|
+
x?.scopes,
|
|
61
|
+
O,
|
|
62
|
+
k
|
|
63
|
+
]), V = g(() => L.length > h && !!b, [
|
|
64
|
+
L.length,
|
|
65
|
+
h,
|
|
66
|
+
b
|
|
67
|
+
]), H = m(() => {
|
|
68
|
+
b?.();
|
|
69
|
+
}, [b]), U = g(() => !!y, [y]);
|
|
70
|
+
return /* @__PURE__ */ _(v.Provider, {
|
|
69
71
|
value: {
|
|
70
|
-
accountRows:
|
|
71
|
-
isLoading:
|
|
72
|
-
isError:
|
|
73
|
-
refetch:
|
|
74
|
-
totalBalance:
|
|
75
|
-
shouldTotalBalanceDisplay:
|
|
76
|
-
shouldShowViewAllAccounts:
|
|
77
|
-
isRowClickable:
|
|
78
|
-
|
|
72
|
+
accountRows: R,
|
|
73
|
+
isLoading: P,
|
|
74
|
+
isError: F,
|
|
75
|
+
refetch: I,
|
|
76
|
+
totalBalance: z,
|
|
77
|
+
shouldTotalBalanceDisplay: B,
|
|
78
|
+
shouldShowViewAllAccounts: V,
|
|
79
|
+
isRowClickable: U,
|
|
80
|
+
isVisible: !x || S || C || !!M,
|
|
81
|
+
onViewAllAccountsClicked: H
|
|
79
82
|
},
|
|
80
|
-
children:
|
|
83
|
+
children: p
|
|
81
84
|
});
|
|
82
85
|
};
|
|
83
|
-
export {
|
|
86
|
+
export { b as BalancesWidgetContextProvider, y as useBalancesWidgetContext };
|
|
@@ -20,16 +20,16 @@ function p({ maxAccounts: t, labels: r, onBalanceRowClick: i }) {
|
|
|
20
20
|
l(() => {
|
|
21
21
|
f(n.Mounted);
|
|
22
22
|
}, [f]);
|
|
23
|
-
let { accountRows: p, isLoading: m, isError: h, refetch: g, totalBalance: _, shouldTotalBalanceDisplay: v, shouldShowViewAllAccounts: y, isRowClickable: b,
|
|
24
|
-
return /* @__PURE__ */ d(s, {
|
|
25
|
-
accountRows:
|
|
23
|
+
let { accountRows: p, isLoading: m, isError: h, refetch: g, totalBalance: _, shouldTotalBalanceDisplay: v, shouldShowViewAllAccounts: y, isRowClickable: b, isVisible: x, onViewAllAccountsClicked: S } = a(), C = u(() => p.slice(0, t), [p, t]), w = u(() => p.map((e) => e.view), [p]);
|
|
24
|
+
return x ? /* @__PURE__ */ d(s, {
|
|
25
|
+
accountRows: w,
|
|
26
26
|
isLoading: m,
|
|
27
27
|
isError: h,
|
|
28
28
|
onRetry: h ? () => void g() : void 0,
|
|
29
29
|
totalBalance: _,
|
|
30
30
|
shouldTotalBalanceDisplay: v,
|
|
31
31
|
shouldShowViewAllAccounts: y,
|
|
32
|
-
onViewAllAccountsClicked:
|
|
32
|
+
onViewAllAccountsClicked: S,
|
|
33
33
|
labels: r,
|
|
34
34
|
testIds: {
|
|
35
35
|
skeleton: o.skeleton,
|
|
@@ -38,13 +38,13 @@ function p({ maxAccounts: t, labels: r, onBalanceRowClick: i }) {
|
|
|
38
38
|
totalBalanceInfo: o.totalBalanceInfo,
|
|
39
39
|
totalAvailableLabel: o.totalAvailableLabel
|
|
40
40
|
},
|
|
41
|
-
children:
|
|
41
|
+
children: C.map((e) => /* @__PURE__ */ d(c, {
|
|
42
42
|
accountId: e.accountId,
|
|
43
43
|
row: e.view,
|
|
44
44
|
onBalanceRowClick: i,
|
|
45
45
|
isRowClickable: b
|
|
46
46
|
}, e.accountId))
|
|
47
|
-
});
|
|
47
|
+
}) : null;
|
|
48
48
|
}
|
|
49
49
|
var m = ({ maxAccounts: e = f, labels: t, onBalanceRowClick: n, onViewAllAccountsClick: r }) => {
|
|
50
50
|
let a = Math.max(0, e);
|
|
@@ -121,27 +121,33 @@ function m({ accountId: m, onBack: Ae, labels: je, featureLabels: Me, isBankingT
|
|
|
121
121
|
h.viewStatementButtonAriaLabel,
|
|
122
122
|
B,
|
|
123
123
|
gt
|
|
124
|
-
]), X = W.data?.nextPaginationToken ?? void 0, Z = W.data?.prevPaginationToken ?? void 0, vt = C && T === "
|
|
124
|
+
]), X = W.data?.nextPaginationToken ?? void 0, Z = W.data?.prevPaginationToken ?? void 0, vt = C && T === "transactions" && U.isLoading, yt = C && T === "transactions" && U.isError, bt = d(() => {
|
|
125
|
+
C && T === "transactions" && U.refetch();
|
|
126
|
+
}, [
|
|
127
|
+
T,
|
|
128
|
+
C,
|
|
129
|
+
U.refetch
|
|
130
|
+
]), xt = C && T === "statements" && !!W.data && !W.isError, St = C && T === "statements" && W.isLoading, Ct = C && T === "statements" && W.isError && !r(W.error), wt = d(() => {
|
|
125
131
|
W.refetch();
|
|
126
|
-
}, [W.refetch]),
|
|
132
|
+
}, [W.refetch]), Tt = d((e) => {
|
|
127
133
|
Ze(e), z(void 0);
|
|
128
|
-
}, []),
|
|
134
|
+
}, []), Et = d(() => {
|
|
129
135
|
z(Z);
|
|
130
|
-
}, [Z]),
|
|
136
|
+
}, [Z]), Dt = d(() => {
|
|
131
137
|
z(X);
|
|
132
|
-
}, [X]),
|
|
138
|
+
}, [X]), Ot = w || !o(M, P), kt = f(() => {
|
|
133
139
|
let e = [{ after: c() }];
|
|
134
140
|
return P && e.push({ after: s(P) }), e;
|
|
135
|
-
}, [P]),
|
|
141
|
+
}, [P]), At = f(() => {
|
|
136
142
|
let e = [{ after: c() }];
|
|
137
143
|
return M && e.push({ before: s(M) }), e;
|
|
138
|
-
}, [M]),
|
|
144
|
+
}, [M]), jt = d((e) => {
|
|
139
145
|
if (e) {
|
|
140
146
|
let { startDate: e, endDate: t } = ie();
|
|
141
147
|
N(e), F(t);
|
|
142
148
|
}
|
|
143
149
|
j(e);
|
|
144
|
-
}, []),
|
|
150
|
+
}, []), Mt = d(async () => {
|
|
145
151
|
if (!b || !x.canRead || !M || !P || !o(M, P)) return;
|
|
146
152
|
j(!1);
|
|
147
153
|
let t = e.loading(g.exportLoadingToast);
|
|
@@ -199,26 +205,29 @@ function m({ accountId: m, onBack: Ae, labels: je, featureLabels: Me, isBankingT
|
|
|
199
205
|
isBankingTaglineVisible: Ne,
|
|
200
206
|
activeTab: T,
|
|
201
207
|
transactionRows: mt,
|
|
208
|
+
isTransactionsError: yt,
|
|
209
|
+
isTransactionsLoading: vt,
|
|
210
|
+
onTransactionsRetry: bt,
|
|
202
211
|
statementRows: _t,
|
|
203
|
-
isStatementsLoading:
|
|
204
|
-
isStatementsError:
|
|
205
|
-
onStatementsRetry:
|
|
206
|
-
isStatementsPaginationVisible:
|
|
212
|
+
isStatementsLoading: St,
|
|
213
|
+
isStatementsError: Ct,
|
|
214
|
+
onStatementsRetry: wt,
|
|
215
|
+
isStatementsPaginationVisible: xt,
|
|
207
216
|
statementsPageSize: I,
|
|
208
217
|
statementsPageSizeOptions: Ee,
|
|
209
218
|
isStatementsPreviousPageDisabled: !Z,
|
|
210
219
|
isStatementsNextPageDisabled: !X,
|
|
211
|
-
onStatementsPageSizeChange:
|
|
212
|
-
onStatementsPreviousPageClick:
|
|
213
|
-
onStatementsNextPageClick:
|
|
220
|
+
onStatementsPageSizeChange: Tt,
|
|
221
|
+
onStatementsPreviousPageClick: Et,
|
|
222
|
+
onStatementsNextPageClick: Dt,
|
|
214
223
|
showExport: ht,
|
|
215
224
|
isExportOpen: Xe,
|
|
216
225
|
exportStartDate: M,
|
|
217
226
|
exportEndDate: P,
|
|
218
227
|
isExportDownloading: ot,
|
|
219
|
-
isExportDownloadDisabled:
|
|
220
|
-
disabledExportStartDates:
|
|
221
|
-
disabledExportEndDates:
|
|
228
|
+
isExportDownloadDisabled: Ot,
|
|
229
|
+
disabledExportStartDates: kt,
|
|
230
|
+
disabledExportEndDates: At,
|
|
222
231
|
accountNumberLabel: q?.accountNumber ?? "",
|
|
223
232
|
maskedAccountNumberLabel: ue(q?.accountNumber ?? ""),
|
|
224
233
|
accountNumberTestId: "bank-accounts-widget-detail-account-number",
|
|
@@ -233,8 +242,8 @@ function m({ accountId: m, onBack: Ae, labels: je, featureLabels: Me, isBankingT
|
|
|
233
242
|
isAccountNumberCopied: Ke,
|
|
234
243
|
isRoutingNumberCopied: qe,
|
|
235
244
|
isDomesticWireExpanded: Je,
|
|
236
|
-
isLoading: !y && (Ve && !q || Be && !v || C &&
|
|
237
|
-
isError: y || C &&
|
|
245
|
+
isLoading: !y && (Ve && !q || Be && !v || C && H.isLoading),
|
|
246
|
+
isError: y || C && H.isError,
|
|
238
247
|
isEditOpen: Ue,
|
|
239
248
|
isEditDisabled: !x.canWrite,
|
|
240
249
|
isEditError: G,
|
|
@@ -270,11 +279,11 @@ function m({ accountId: m, onBack: Ae, labels: je, featureLabels: Me, isBankingT
|
|
|
270
279
|
});
|
|
271
280
|
},
|
|
272
281
|
onEditNicknameClick: () => $(!0),
|
|
273
|
-
onExportOpenChange:
|
|
282
|
+
onExportOpenChange: jt,
|
|
274
283
|
onExportStartDateChange: N,
|
|
275
284
|
onExportEndDateChange: F,
|
|
276
285
|
onExportDownload: () => {
|
|
277
|
-
|
|
286
|
+
Mt();
|
|
278
287
|
}
|
|
279
288
|
});
|
|
280
289
|
}
|
|
@@ -2,73 +2,86 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { Button as e, Skeleton as t, Table as n, TableBody as r, TableCell as i, TableHead as a, TableHeader as o, TableRow as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { ErrorState as c } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
|
+
import "../../../../shared/ui/dist/index.js";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { DownloadIcon as d } from "lucide-react";
|
|
8
10
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
+
function f({ labels: f, rows: p, showExport: m = !1, onExportClick: h, isError: g = !1, onRetry: _, isLoading: v = !1 }) {
|
|
12
|
+
return g ? /* @__PURE__ */ l("div", {
|
|
13
|
+
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
|
|
14
|
+
children: /* @__PURE__ */ l(c, {
|
|
15
|
+
title: f.transactionsErrorTitle,
|
|
16
|
+
retryLabel: _ ? f.transactionsErrorRetry : void 0,
|
|
17
|
+
onRetry: _
|
|
18
|
+
})
|
|
19
|
+
}) : v ? /* @__PURE__ */ l("div", {
|
|
20
|
+
className: "ttw:space-y-3 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
21
|
+
"aria-label": f.transactionsLoadingLabel,
|
|
22
|
+
children: Array.from({ length: 3 }).map((e, n) => /* @__PURE__ */ l(t, { className: "ttw:h-5 ttw:w-full" }, n))
|
|
23
|
+
}) : p.length === 0 ? /* @__PURE__ */ l("div", {
|
|
11
24
|
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
12
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ l("p", {
|
|
13
26
|
className: "ttw:text-muted-foreground",
|
|
14
|
-
children:
|
|
27
|
+
children: f.noTransactionsLabel
|
|
15
28
|
})
|
|
16
|
-
}) : /* @__PURE__ */
|
|
29
|
+
}) : /* @__PURE__ */ l("div", {
|
|
17
30
|
className: "ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
-
className:
|
|
20
|
-
children: [
|
|
31
|
+
children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ u(o, {
|
|
32
|
+
className: m ? "ttw:[&_tr:first-child]:border-b-0" : void 0,
|
|
33
|
+
children: [m ? /* @__PURE__ */ l(s, {
|
|
21
34
|
className: "ttw:border-b-0 ttw:bg-card ttw:hover:bg-card",
|
|
22
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ l(a, {
|
|
23
36
|
colSpan: 4,
|
|
24
37
|
className: "ttw:h-auto ttw:px-4 ttw:py-3 ttw:text-right",
|
|
25
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ u(e, {
|
|
26
39
|
type: "button",
|
|
27
40
|
variant: "outline",
|
|
28
41
|
size: "sm",
|
|
29
|
-
onClick:
|
|
30
|
-
children: [/* @__PURE__ */
|
|
42
|
+
onClick: h,
|
|
43
|
+
children: [/* @__PURE__ */ l(d, { className: "ttw:size-4" }), f.exportButton]
|
|
31
44
|
})
|
|
32
45
|
})
|
|
33
|
-
}) : null, /* @__PURE__ */
|
|
46
|
+
}) : null, /* @__PURE__ */ u(s, {
|
|
34
47
|
className: "ttw:border-border ttw:bg-card ttw:hover:bg-card",
|
|
35
48
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ l(a, {
|
|
37
50
|
className: "ttw:h-auto ttw:w-[15%] ttw:px-4 ttw:py-3 ttw:font-semibold",
|
|
38
|
-
children:
|
|
51
|
+
children: f.transactionDateColumn
|
|
39
52
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ l(a, {
|
|
41
54
|
className: "ttw:h-auto ttw:w-[60%] ttw:px-4 ttw:py-3 ttw:font-semibold",
|
|
42
|
-
children:
|
|
55
|
+
children: f.transactionDescriptionColumn
|
|
43
56
|
}),
|
|
44
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ l(a, {
|
|
45
58
|
className: "ttw:h-auto ttw:w-[12%] ttw:px-4 ttw:py-3 ttw:text-right ttw:font-semibold",
|
|
46
|
-
children:
|
|
59
|
+
children: f.transactionAmountColumn
|
|
47
60
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ l(a, {
|
|
49
62
|
className: "ttw:h-auto ttw:w-[13%] ttw:px-4 ttw:py-3 ttw:text-right ttw:font-semibold",
|
|
50
|
-
children:
|
|
63
|
+
children: f.transactionBalanceColumn
|
|
51
64
|
})
|
|
52
65
|
]
|
|
53
66
|
})]
|
|
54
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ l(r, {
|
|
55
68
|
className: "ttw:bg-card",
|
|
56
|
-
children:
|
|
69
|
+
children: p.map((e) => /* @__PURE__ */ u(s, {
|
|
57
70
|
className: "ttw:bg-card ttw:hover:bg-transparent",
|
|
58
71
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ l(i, {
|
|
60
73
|
className: "ttw:px-4 ttw:py-3 ttw:align-top",
|
|
61
74
|
children: e.dateLabel
|
|
62
75
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ l(i, {
|
|
64
77
|
className: "ttw:px-4 ttw:py-3 ttw:align-top ttw:font-medium",
|
|
65
78
|
children: e.descriptionLabel
|
|
66
79
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ l(i, {
|
|
68
81
|
className: `ttw:px-4 ttw:py-3 ttw:text-right ttw:align-top ttw:whitespace-nowrap ${e.amountVariant === "positive" ? "ttw:text-green-700" : "ttw:text-foreground"}`,
|
|
69
82
|
children: e.amountLabel
|
|
70
83
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ l(i, {
|
|
72
85
|
className: "ttw:px-4 ttw:py-3 ttw:text-right ttw:align-top ttw:whitespace-nowrap",
|
|
73
86
|
children: e.balanceLabel
|
|
74
87
|
})
|
|
@@ -77,4 +90,4 @@ function u({ labels: u, rows: d, showExport: f = !1, onExportClick: p }) {
|
|
|
77
90
|
})] })
|
|
78
91
|
});
|
|
79
92
|
}
|
|
80
|
-
export {
|
|
93
|
+
export { f as TransactionsTable };
|
|
@@ -8,6 +8,9 @@ var e = {
|
|
|
8
8
|
statementsTab: "Statements",
|
|
9
9
|
detailsTab: "Details",
|
|
10
10
|
noTransactionsLabel: "No transactions found",
|
|
11
|
+
transactionsErrorTitle: "Unable to load transactions.",
|
|
12
|
+
transactionsErrorRetry: "Retry",
|
|
13
|
+
transactionsLoadingLabel: "Loading transactions",
|
|
11
14
|
transactionDateColumn: "Date",
|
|
12
15
|
transactionDescriptionColumn: "Description",
|
|
13
16
|
transactionAmountColumn: "Amount",
|
|
@@ -14,15 +14,15 @@ import { TransactionsTable as se } from "./index6.js";
|
|
|
14
14
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
15
|
import { ChevronLeftIcon as m, HelpCircleIcon as h } from "lucide-react";
|
|
16
16
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js
|
|
17
|
-
function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAlt: b, balanceLabel: x, balanceTestId: S, isBankingTaglineVisible: C, activeTab: w, transactionRows: T,
|
|
17
|
+
function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAlt: b, balanceLabel: x, balanceTestId: S, isBankingTaglineVisible: C, activeTab: w, transactionRows: T, isTransactionsError: E, isTransactionsLoading: D, onTransactionsRetry: O, statementRows: k, isStatementsLoading: A, isStatementsError: j, onStatementsRetry: M, isStatementsPaginationVisible: N, statementsPageSize: P, statementsPageSizeOptions: F, statementsRangeLabel: I = "", isStatementsPreviousPageDisabled: L, isStatementsNextPageDisabled: R, onStatementsPageSizeChange: z, onStatementsPreviousPageClick: B, onStatementsNextPageClick: V, showExport: H, isExportOpen: U, exportStartDate: W, exportEndDate: G, isExportDownloading: K, isExportDownloadDisabled: ce, disabledExportStartDates: le, disabledExportEndDates: ue, accountNumberLabel: de, maskedAccountNumberLabel: fe, accountNumberTestId: pe, routingNumberLabel: me, bankAddressLabel: he, wireAccountNumberLabel: ge, domesticWireIntroLabel: _e, domesticWireNoteLabel: ve, thingsToKnowBodyLabel: ye, supportTeamHref: be, isAccountNumberVisible: q, isAccountNumberCopied: xe, isRoutingNumberCopied: Se, isDomesticWireExpanded: Ce, isLoading: J, isError: Y, isEditOpen: we, isEditDisabled: Te, isEditError: Ee, isSubmitting: De, isEditSaveDisabled: Oe, editForm: ke, canEdit: Ae, onBack: je, onTabChange: Me, onToggleAccountNumberVisibility: Ne, onCopyAccountNumber: X, onCopyRoutingNumber: Z, onCopyBankName: Pe, onCopyBankAddress: Fe, onDomesticWireExpandedChange: Ie, onEditOpenChange: Le, onEditFormChange: Re, onEditSubmit: ze, onEditNicknameClick: Be, onExportOpenChange: Q, onExportStartDateChange: Ve, onExportEndDateChange: He, onExportDownload: Ue }) {
|
|
18
18
|
let $ = {
|
|
19
19
|
...te,
|
|
20
20
|
...g
|
|
21
|
-
},
|
|
21
|
+
}, We = /* @__PURE__ */ p(e, {
|
|
22
22
|
type: "button",
|
|
23
23
|
variant: "ghost",
|
|
24
24
|
className: "ttw:h-auto ttw:justify-start ttw:gap-1 ttw:px-0 ttw:py-1 ttw:has-[>svg]:px-0 ttw:text-sm ttw:font-medium ttw:leading-5 ttw:text-primary ttw:hover:bg-transparent",
|
|
25
|
-
onClick:
|
|
25
|
+
onClick: je,
|
|
26
26
|
children: [/* @__PURE__ */ f(m, { className: "ttw:size-4" }), $.backToAccounts]
|
|
27
27
|
});
|
|
28
28
|
return /* @__PURE__ */ p("section", {
|
|
@@ -30,34 +30,34 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
30
30
|
children: [
|
|
31
31
|
!J && !Y ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ie, {
|
|
32
32
|
labels: $,
|
|
33
|
-
open:
|
|
34
|
-
form:
|
|
35
|
-
isSubmitting:
|
|
36
|
-
isSaveDisabled:
|
|
37
|
-
isError:
|
|
38
|
-
onOpenChange:
|
|
39
|
-
onFormChange:
|
|
40
|
-
onSubmit:
|
|
33
|
+
open: we,
|
|
34
|
+
form: ke,
|
|
35
|
+
isSubmitting: De,
|
|
36
|
+
isSaveDisabled: Oe,
|
|
37
|
+
isError: Ee,
|
|
38
|
+
onOpenChange: Le,
|
|
39
|
+
onFormChange: Re,
|
|
40
|
+
onSubmit: ze
|
|
41
41
|
}), /* @__PURE__ */ f(ae, {
|
|
42
42
|
labels: $,
|
|
43
|
-
open:
|
|
44
|
-
startDate:
|
|
45
|
-
endDate:
|
|
46
|
-
isDownloading:
|
|
47
|
-
isDownloadDisabled:
|
|
48
|
-
disabledStartDates:
|
|
49
|
-
disabledEndDates:
|
|
43
|
+
open: U,
|
|
44
|
+
startDate: W,
|
|
45
|
+
endDate: G,
|
|
46
|
+
isDownloading: K,
|
|
47
|
+
isDownloadDisabled: ce,
|
|
48
|
+
disabledStartDates: le,
|
|
49
|
+
disabledEndDates: ue,
|
|
50
50
|
onOpenChange: Q,
|
|
51
|
-
onStartDateChange:
|
|
52
|
-
onEndDateChange:
|
|
53
|
-
onDownload:
|
|
51
|
+
onStartDateChange: Ve,
|
|
52
|
+
onEndDateChange: He,
|
|
53
|
+
onDownload: Ue
|
|
54
54
|
})] }) : null,
|
|
55
55
|
/* @__PURE__ */ p("div", {
|
|
56
56
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
57
|
-
children: [
|
|
57
|
+
children: [We, !J && !Y ? /* @__PURE__ */ f(re, {
|
|
58
58
|
labels: $,
|
|
59
|
-
canEdit:
|
|
60
|
-
onEditNickname:
|
|
59
|
+
canEdit: Ae,
|
|
60
|
+
onEditNickname: Be
|
|
61
61
|
}) : null]
|
|
62
62
|
}),
|
|
63
63
|
J ? /* @__PURE__ */ p("div", {
|
|
@@ -110,7 +110,7 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
110
110
|
})]
|
|
111
111
|
}), /* @__PURE__ */ p(ee, {
|
|
112
112
|
value: w,
|
|
113
|
-
onValueChange: (e) =>
|
|
113
|
+
onValueChange: (e) => Me(e),
|
|
114
114
|
className: "ttw:gap-4",
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ p(r, { children: [
|
|
@@ -132,55 +132,58 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
132
132
|
children: /* @__PURE__ */ f(se, {
|
|
133
133
|
labels: $,
|
|
134
134
|
rows: T,
|
|
135
|
-
showExport:
|
|
136
|
-
onExportClick: () => Q(!0)
|
|
135
|
+
showExport: H,
|
|
136
|
+
onExportClick: () => Q(!0),
|
|
137
|
+
isError: E,
|
|
138
|
+
isLoading: D,
|
|
139
|
+
onRetry: O
|
|
137
140
|
})
|
|
138
141
|
}),
|
|
139
142
|
/* @__PURE__ */ f(n, {
|
|
140
143
|
value: "statements",
|
|
141
144
|
children: /* @__PURE__ */ f(oe, {
|
|
142
145
|
labels: $,
|
|
143
|
-
rows:
|
|
144
|
-
isLoading:
|
|
145
|
-
isError:
|
|
146
|
-
onRetry:
|
|
147
|
-
isPaginationVisible:
|
|
148
|
-
pageSize:
|
|
149
|
-
pageSizeOptions:
|
|
150
|
-
rangeLabel:
|
|
151
|
-
isPreviousPageDisabled:
|
|
152
|
-
isNextPageDisabled:
|
|
153
|
-
onPageSizeChange:
|
|
154
|
-
onPreviousPageClick:
|
|
155
|
-
onNextPageClick:
|
|
146
|
+
rows: k,
|
|
147
|
+
isLoading: A,
|
|
148
|
+
isError: j,
|
|
149
|
+
onRetry: M,
|
|
150
|
+
isPaginationVisible: N,
|
|
151
|
+
pageSize: P,
|
|
152
|
+
pageSizeOptions: F,
|
|
153
|
+
rangeLabel: I,
|
|
154
|
+
isPreviousPageDisabled: L,
|
|
155
|
+
isNextPageDisabled: R,
|
|
156
|
+
onPageSizeChange: z,
|
|
157
|
+
onPreviousPageClick: B,
|
|
158
|
+
onNextPageClick: V
|
|
156
159
|
})
|
|
157
160
|
}),
|
|
158
161
|
/* @__PURE__ */ f(n, {
|
|
159
162
|
value: "details",
|
|
160
163
|
children: /* @__PURE__ */ f(ne, {
|
|
161
164
|
labels: $,
|
|
162
|
-
routingNumberLabel:
|
|
163
|
-
accountNumberDisplayLabel: q ?
|
|
164
|
-
accountNumberTestId:
|
|
165
|
-
wireAccountNumberLabel:
|
|
165
|
+
routingNumberLabel: me,
|
|
166
|
+
accountNumberDisplayLabel: q ? de : fe,
|
|
167
|
+
accountNumberTestId: pe,
|
|
168
|
+
wireAccountNumberLabel: ge,
|
|
166
169
|
bankNameLabel: v,
|
|
167
|
-
bankAddressLabel:
|
|
168
|
-
domesticWireIntroLabel:
|
|
169
|
-
domesticWireNoteLabel:
|
|
170
|
-
thingsToKnowBodyLabel:
|
|
171
|
-
supportTeamHref:
|
|
170
|
+
bankAddressLabel: he,
|
|
171
|
+
domesticWireIntroLabel: _e,
|
|
172
|
+
domesticWireNoteLabel: ve,
|
|
173
|
+
thingsToKnowBodyLabel: ye,
|
|
174
|
+
supportTeamHref: be,
|
|
172
175
|
isAccountNumberVisible: q,
|
|
173
|
-
isAccountNumberCopied:
|
|
174
|
-
isRoutingNumberCopied:
|
|
175
|
-
isDomesticWireExpanded:
|
|
176
|
-
onDomesticWireExpandedChange:
|
|
177
|
-
onToggleAccountNumberVisibility:
|
|
176
|
+
isAccountNumberCopied: xe,
|
|
177
|
+
isRoutingNumberCopied: Se,
|
|
178
|
+
isDomesticWireExpanded: Ce,
|
|
179
|
+
onDomesticWireExpandedChange: Ie,
|
|
180
|
+
onToggleAccountNumberVisibility: Ne,
|
|
178
181
|
onCopyAccountNumber: X,
|
|
179
182
|
onCopyRoutingNumber: Z,
|
|
180
183
|
onCopyWireAccountNumber: X,
|
|
181
184
|
onCopyWireRoutingNumber: Z,
|
|
182
|
-
onCopyBankName:
|
|
183
|
-
onCopyBankAddress:
|
|
185
|
+
onCopyBankName: Pe,
|
|
186
|
+
onCopyBankAddress: Fe
|
|
184
187
|
})
|
|
185
188
|
})
|
|
186
189
|
]
|
|
@@ -6,58 +6,97 @@ import { useEmbedApi as e } from "../../../../../shared/data-access/dist/lib/Emb
|
|
|
6
6
|
import { useGetUserDataQuery as t } from "../../../../../shared/data-access/dist/lib/useGetUserDataQuery.js";
|
|
7
7
|
import { useUpsertUserDataMutation as n } from "../../../../../shared/data-access/dist/lib/useUpsertUserDataMutation.js";
|
|
8
8
|
import "../../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
9
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
+
import "../../../../../shared/feature/dist/index.js";
|
|
11
|
+
import { getDismissedInsightsUserDataKey as a } from "./dismissedInsightsUserDataKey.js";
|
|
12
|
+
import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
11
13
|
// ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/useDismissedInsightIds.js
|
|
12
|
-
function
|
|
14
|
+
function d(e) {
|
|
13
15
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
|
|
14
16
|
}
|
|
15
|
-
function
|
|
17
|
+
function f(e, t) {
|
|
16
18
|
if (e.length !== t.length) return !1;
|
|
17
19
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
18
20
|
return !0;
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
function p(e, t) {
|
|
23
|
+
let n = t.filter((t) => !e.includes(t));
|
|
24
|
+
return n.length === 0 ? e : [...e, ...n];
|
|
25
|
+
}
|
|
26
|
+
function m() {
|
|
27
|
+
let { organizationId: m } = e(), { initResponse: h } = r(), g = i(), _ = a(m), v = !!(!g && _ && h?.userId), y = l(null);
|
|
28
|
+
g || (y.current = h?.userId ?? null);
|
|
29
|
+
let b = y.current, x = _ ? `${_}:${b ?? "session"}` : "", { data: S, dataUpdatedAt: C, isLoading: w, isError: T, isPlaceholderData: E, refetch: D } = t({
|
|
30
|
+
key: _,
|
|
31
|
+
defaultWhenNotFound: [],
|
|
32
|
+
enabled: v
|
|
33
|
+
}), { mutateAsync: O } = n(), k = c(() => !v || E ? null : S?.value === void 0 ? T ? [] : null : d(S.value), [
|
|
34
|
+
v,
|
|
35
|
+
S,
|
|
36
|
+
C,
|
|
37
|
+
T,
|
|
38
|
+
E
|
|
39
|
+
]), [A, j] = u([]), [M, N] = u(""), P = l([]), F = l([]), I = l(x);
|
|
40
|
+
I.current = x;
|
|
41
|
+
let L = l({
|
|
42
|
+
key: _,
|
|
43
|
+
userId: b
|
|
44
|
+
});
|
|
45
|
+
s(() => {
|
|
46
|
+
let e = L.current;
|
|
47
|
+
if (L.current = {
|
|
48
|
+
key: _,
|
|
49
|
+
userId: b
|
|
50
|
+
}, !_ || e.key !== _) j((e) => e.length === 0 ? e : []), N(""), P.current = [], F.current = [];
|
|
51
|
+
else if (e.userId !== b && e.userId !== null) {
|
|
52
|
+
let e = F.current;
|
|
53
|
+
j((t) => f(t, e) ? t : e), N(""), P.current = [];
|
|
54
|
+
}
|
|
55
|
+
if (!v || w || k === null) return;
|
|
56
|
+
let t = F.current, n = p(k, t);
|
|
57
|
+
if (j((e) => f(e, n) ? e : n), N(x), P.current = k, t.length === 0 || (F.current = [], n === k)) return;
|
|
58
|
+
let r = x;
|
|
59
|
+
O({
|
|
60
|
+
path: { key: _ },
|
|
61
|
+
body: { value: n }
|
|
62
|
+
}).then(() => {
|
|
63
|
+
r === I.current && (P.current = n);
|
|
64
|
+
}).catch((e) => {
|
|
65
|
+
r === I.current && (j(P.current), console.error("Error persisting dismissed insight id", e));
|
|
66
|
+
});
|
|
34
67
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
68
|
+
v,
|
|
69
|
+
x,
|
|
70
|
+
_,
|
|
71
|
+
w,
|
|
72
|
+
O,
|
|
73
|
+
k,
|
|
74
|
+
b
|
|
38
75
|
]);
|
|
39
|
-
let
|
|
40
|
-
if (!
|
|
41
|
-
let t =
|
|
42
|
-
|
|
76
|
+
let R = v && T, z = o((e) => {
|
|
77
|
+
if (!_ || !x) return;
|
|
78
|
+
let t = A, n = t.includes(e) ? t : [...t, e], r = _, i = x;
|
|
79
|
+
j(n), v ? O({
|
|
43
80
|
path: { key: r },
|
|
44
81
|
body: { value: n }
|
|
45
82
|
}).then(() => {
|
|
46
|
-
|
|
83
|
+
i === I.current && (P.current = n);
|
|
47
84
|
}).catch((e) => {
|
|
48
|
-
|
|
49
|
-
});
|
|
85
|
+
i === I.current && (j(P.current), console.error("Error persisting dismissed insight id", e));
|
|
86
|
+
}) : F.current.includes(e) || (F.current = [...F.current, e]);
|
|
50
87
|
}, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
88
|
+
v,
|
|
89
|
+
A,
|
|
90
|
+
_,
|
|
91
|
+
x,
|
|
92
|
+
O
|
|
93
|
+
]), B = o(() => v ? D() : Promise.resolve(void 0), [v, D]);
|
|
55
94
|
return {
|
|
56
|
-
dismissedIds:
|
|
57
|
-
isLoading:
|
|
58
|
-
isError:
|
|
59
|
-
refetch:
|
|
60
|
-
dismissInsight:
|
|
95
|
+
dismissedIds: A,
|
|
96
|
+
isLoading: v ? w || !!(E && M !== x) : !1,
|
|
97
|
+
isError: R,
|
|
98
|
+
refetch: B,
|
|
99
|
+
dismissInsight: z
|
|
61
100
|
};
|
|
62
101
|
}
|
|
63
|
-
export {
|
|
102
|
+
export { m as useDismissedInsightIds };
|
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.10.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.10.6", n = "6c22884e4442995b8f3e0a602617477d95225b30", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|