@mx-cartographer/experiences 8.0.13 → 8.0.15-alpha-view-history-testing

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/EmbeddedCard-yQXb1_JB.mjs +794 -0
  3. package/dist/{ExportCsvAction-ErKh7wJ2.mjs → ExportCsvAction-CHCmCCqf.mjs} +4 -5
  4. package/dist/{ManageIncome-C_XOG9CZ.mjs → ManageIncome-soXohjI4.mjs} +3 -3
  5. package/dist/{RecurringSettings-Bt-zMwCB.mjs → RecurringSettings-rn4NvTVz.mjs} +1 -1
  6. package/dist/{Transaction-Cn5_iFm0.mjs → Transaction-C3Pg9TKf.mjs} +2 -2
  7. package/dist/TransactionDetails-UyBJ8fVg.mjs +1703 -0
  8. package/dist/{TransactionStore-CbZfz7-2.mjs → TransactionStore-BUsgGRL1.mjs} +43 -32
  9. package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BJOZcYnB.mjs} +511 -518
  10. package/dist/accounts/index.es.js +2 -2
  11. package/dist/budgets/index.es.js +5 -6
  12. package/dist/cashflow/index.es.js +3 -3
  13. package/dist/common/index.es.js +20 -21
  14. package/dist/core/index.es.js +1 -1
  15. package/dist/core/types/AppData.d.ts +0 -1
  16. package/dist/core/types/localization/InsightsFeedCopy.d.ts +11 -0
  17. package/dist/{OnClickEvents-CseHDZ94.mjs → exportTransactionsToCSV-DgdB3TBt.mjs} +70 -24
  18. package/dist/finstrong/index.es.js +3 -3
  19. package/dist/insights/components/shared/InsightsCard/EmbeddedCard.d.ts +1 -2
  20. package/dist/insights/index.es.js +1043 -1566
  21. package/dist/microinsights/index.es.js +1 -1
  22. package/dist/microinsights/interfaces.d.ts +0 -1
  23. package/dist/recurringtransactions/index.es.js +4 -4
  24. package/dist/spending/index.es.js +3 -3
  25. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +8 -0
  26. package/dist/transactions/index.es.js +15 -15
  27. package/dist/transactions/stores/TransactionStore.d.ts +1 -0
  28. package/dist/trends/index.es.js +4 -5
  29. package/package.json +1 -1
  30. package/dist/StatusIndicator-DAWRKwmE.mjs +0 -264
  31. package/dist/TransactionDetails-DA6tdnu0.mjs +0 -1476
  32. package/dist/exportTransactionsToCSV-MCYH_zzN.mjs +0 -48
@@ -0,0 +1,794 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import _, { useMemo as X, useState as K, useEffect as q } from "react";
3
+ import A from "@mui/material/Box";
4
+ import Y from "@mui/material/Button";
5
+ import c from "@mui/material/Stack";
6
+ import { Icon as E, P as N, H3 as J, Text as b, MerchantLogo as P, H2 as tt } from "@mxenabled/mxui";
7
+ import { Receipt as et, Icon as rt } from "@mxenabled/mx-icons";
8
+ import { L as nt, O as it, e as ot } from "./exportTransactionsToCSV-DgdB3TBt.mjs";
9
+ import { observer as O } from "mobx-react-lite";
10
+ import { useVirtualizer as at } from "@tanstack/react-virtual";
11
+ import st from "@mui/material/Divider";
12
+ import lt from "@mui/material/List";
13
+ import { G as ct, h as W, u as H, g as dt, b as ht } from "./hooks-BxkfR-Ff.mjs";
14
+ import mt from "@mui/material/ListItemAvatar";
15
+ import ut from "@mui/material/ListItemText";
16
+ import { useTheme as z } from "@mui/material/styles";
17
+ import { a as pt } from "./Transaction-C3Pg9TKf.mjs";
18
+ import { f as B } from "./NumberFormatting-QCaNwbjv.mjs";
19
+ import { fromUnixTime as R } from "date-fns/fromUnixTime";
20
+ import { isSameDay as Z } from "date-fns/isSameDay";
21
+ import { f as ft, D as gt } from "./DateFormats-BMpMrZpW.mjs";
22
+ import { h as xt } from "./DateUtil-wcYTmDRD.mjs";
23
+ import { L as Q } from "./Loader-D3rjKx72.mjs";
24
+ import { A as bt } from "./Analytics-0Xm_BjHU.mjs";
25
+ import yt from "@mui/material/Tab";
26
+ import _t from "@mui/material/Tabs";
27
+ import wt from "@mui/material/IconButton";
28
+ import { ChartContainer as Ct, ChartsReferenceLine as j, ChartsXAxis as vt, BarPlot as Tt } from "@mui/x-charts";
29
+ import { D as Dt } from "./Drawer-Bbe4AMB1.mjs";
30
+ import St from "@mui/material/Card";
31
+ const It = ({ message: t, tipAriaLabel: n, onDismiss: r, onAction: i, sx: o }) => {
32
+ const l = i || r, d = i ? "chevron_right" : "close";
33
+ return /* @__PURE__ */ a(
34
+ c,
35
+ {
36
+ sx: {
37
+ backgroundColor: "primary.lighter",
38
+ borderRadius: "8px",
39
+ mb: 24,
40
+ mt: 12,
41
+ p: 12,
42
+ mx: 24,
43
+ alignItems: "flex-start",
44
+ justifyContent: "space-between",
45
+ flexDirection: "row",
46
+ gap: 8,
47
+ ...o
48
+ },
49
+ children: [
50
+ /* @__PURE__ */ e(E, { color: "info", fill: !0, name: "lightbulb", size: 24 }),
51
+ /* @__PURE__ */ e(N, { color: "primary.dark", fontWeight: 400, noWrap: !1, variant: "subtitle2", children: t }),
52
+ l && /* @__PURE__ */ e(
53
+ wt,
54
+ {
55
+ "aria-label": n,
56
+ onClick: l,
57
+ size: "small",
58
+ sx: { minHeight: 0, minWidth: 0, p: 0 },
59
+ children: /* @__PURE__ */ e(E, { color: "primary", fill: !0, name: d, size: 20 })
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ );
65
+ }, Lt = ({
66
+ ariaLabel: t,
67
+ beat: n,
68
+ chart: r,
69
+ children: i,
70
+ data: o,
71
+ defaultSelectedIndex: l,
72
+ icon: d,
73
+ onTabChange: f,
74
+ tipSection: m
75
+ }) => {
76
+ const { heading: h, subHeading: p } = n, g = X(
77
+ () => l ?? (o.length ? o.length - 1 : 0),
78
+ [l, o.length]
79
+ ), [y, u] = K(g), S = (v, T) => {
80
+ f?.(T), u(T);
81
+ }, I = (v) => {
82
+ u(v);
83
+ };
84
+ return /* @__PURE__ */ a(A, { sx: { bgcolor: "background.paper", width: "100%" }, children: [
85
+ /* @__PURE__ */ e(_t, { "aria-label": t, onChange: S, value: y, variant: "fullWidth", children: o.map((v, T) => /* @__PURE__ */ e(
86
+ yt,
87
+ {
88
+ id: `transaction-details-tab-${T}`,
89
+ label: v.label,
90
+ sx: { minWidth: "auto", px: 0 }
91
+ },
92
+ `${v.label}-${T}`
93
+ )) }),
94
+ /* @__PURE__ */ e(c, { sx: { pt: 16, px: 24 }, children: (h || p) && /* @__PURE__ */ a(c, { sx: { gap: 4 }, children: [
95
+ h && /* @__PURE__ */ e(J, { children: h }),
96
+ p && /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
97
+ d,
98
+ /* @__PURE__ */ e(b, { textTransform: "uppercase", variant: "body2", children: p.description })
99
+ ] })
100
+ ] }) }),
101
+ r?.(y, I),
102
+ m && /* @__PURE__ */ e(It, { ...m }),
103
+ i?.(y)
104
+ ] });
105
+ }, V = () => {
106
+ if (!_.useContext(ct))
107
+ throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
108
+ return W().uiStore;
109
+ };
110
+ function kt() {
111
+ return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
112
+ }
113
+ function At(t) {
114
+ const n = kt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), r = window.parent || window.opener || !1;
115
+ return r && r.postMessage && n ? (r.postMessage(t, n), !0) : !1;
116
+ }
117
+ function $t(t) {
118
+ return At({
119
+ metadata: { beat_guid: t },
120
+ mx: !0,
121
+ type: "mx/moneyDashboard/insightOnTransaction"
122
+ });
123
+ }
124
+ const Et = ({ transaction: t, onClick: n }) => {
125
+ const i = z().palette.mode === "dark", { associatedBeats: o } = W(), { expandedSplits: l } = V(), { transactions: d } = H(), { showInsights: f } = V(), m = t.transaction_type === pt.CREDIT, h = _.useMemo(() => o.find((p) => p.associated_transaction_guid === t.guid), [o, t]);
126
+ return (
127
+ //TODO: implement common/components/ListItemRow.tsx
128
+ /* @__PURE__ */ a(
129
+ nt,
130
+ {
131
+ clickEventName: it.ON_TRANSACTION_LIST_ITEM_CLICK,
132
+ onClick: n ? () => n(t.guid) : void 0,
133
+ children: [
134
+ /* @__PURE__ */ e(mt, { children: t.parent_guid && l.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
135
+ P,
136
+ {
137
+ categoryGuid: t.top_level_category_guid || "",
138
+ merchantGuid: t.merchant_guid || ""
139
+ }
140
+ ) }),
141
+ /* @__PURE__ */ e(
142
+ ut,
143
+ {
144
+ disableTypography: !0,
145
+ secondary: /* @__PURE__ */ a(c, { direction: "row", justifyContent: "space-between", children: [
146
+ /* @__PURE__ */ a(c, { alignItems: "center", direction: "row", gap: 4, children: [
147
+ t.is_flagged && /* @__PURE__ */ e(
148
+ E,
149
+ {
150
+ fill: !0,
151
+ name: "flag",
152
+ size: 16,
153
+ sx: { color: i ? "primary.main" : "warning.dark" }
154
+ }
155
+ ),
156
+ t.is_hidden && /* @__PURE__ */ e(E, { name: "visibility_off", size: 16 }),
157
+ t.has_been_split && /* @__PURE__ */ e(E, { name: "call_split", size: 16 }),
158
+ /* @__PURE__ */ e(b, { variant: "caption", children: t.has_been_split ? d.split_transaction_category_label : t.category })
159
+ ] }),
160
+ h && f && /* @__PURE__ */ e(
161
+ b,
162
+ {
163
+ bold: !0,
164
+ color: "action.active",
165
+ onClick: (p) => {
166
+ p.stopPropagation(), p.preventDefault(), $t(h.guid);
167
+ },
168
+ variant: "caption",
169
+ children: h.short_title
170
+ }
171
+ )
172
+ ] }),
173
+ children: /* @__PURE__ */ a(c, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
174
+ /* @__PURE__ */ a(b, { bold: !0, variant: "body1", children: [
175
+ t.is_hidden && d.hide_trnx_cancel_hidden_note,
176
+ t.payee || t.description || t.feed_description
177
+ ] }),
178
+ /* @__PURE__ */ a(
179
+ b,
180
+ {
181
+ bold: !0,
182
+ color: m ? "success.main" : "text.primary",
183
+ sx: { flexShrink: 0 },
184
+ variant: "body1",
185
+ children: [
186
+ m ? "+" : "",
187
+ B(t.amount, "0,0.00")
188
+ ]
189
+ }
190
+ )
191
+ ] })
192
+ }
193
+ )
194
+ ]
195
+ }
196
+ )
197
+ );
198
+ }, Mt = O(Et), Rt = ({
199
+ bgcolor: t = "background.default",
200
+ children: n
201
+ }) => /* @__PURE__ */ e(A, { display: "inline-block", sx: { bgcolor: t, py: 6, width: "100%" }, children: /* @__PURE__ */ e(b, { bold: !0, sx: { pl: 24 }, variant: "caption", children: n }) }), Wt = ({ showIcon: t = !0, showSubtitle: n = !0 }) => {
202
+ const { transactions: r } = H();
203
+ return /* @__PURE__ */ a(c, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
204
+ t && /* @__PURE__ */ e(et, { color: "action", sx: { fontSize: 32 } }),
205
+ /* @__PURE__ */ e(b, { bold: !0, color: "text.secondary", variant: "body2", children: r.zero_state_no_transactions }),
206
+ n && /* @__PURE__ */ e(b, { color: "text.secondary", variant: "caption", children: r.zero_state_there_are_no_transactions })
207
+ ] });
208
+ }, zt = O(Wt), G = (t, n) => {
209
+ const r = R(n[t].date), i = R(n[t - 1]?.date);
210
+ return !Z(r, i);
211
+ }, Bt = (t, n) => {
212
+ const r = R(n[t].date), i = R(n[t + 1]?.date);
213
+ return Z(r, i);
214
+ }, ve = (t) => t?.data ? t.data.map((n) => Object.fromEntries((t.names || []).map((r, i) => [r, n[i]]))) : [], Te = (t, n = "") => t.map((i) => {
215
+ const o = ft(i.date, gt.MONTH_SHORT);
216
+ return {
217
+ ariaLabel: `
218
+ ${o},
219
+ ${B(i.amount, "0.00")},
220
+ ${n}`,
221
+ label: o,
222
+ value: i.amount,
223
+ formattedAmount: B(i.amount, "0,0")
224
+ };
225
+ }), U = 65, F = 32, Vt = ({
226
+ bgcolor: t,
227
+ filter: n,
228
+ height: r = "calc(100dvh - 36px)",
229
+ loader: i = /* @__PURE__ */ e(Q, { label: "Loading", size: 40 }),
230
+ onClick: o,
231
+ showInsights: l = !1,
232
+ showLoader: d = !1,
233
+ showHiddenTransactions: f = !1,
234
+ transaction: m,
235
+ width: h = "100%",
236
+ zeroState: p = /* @__PURE__ */ e(zt, {})
237
+ }) => {
238
+ const { isLoading: g, sortedTransactions: y } = W(), u = _.useMemo(() => {
239
+ const x = n ? y.filter(n) : y, w = m ?? x;
240
+ return f ? w : w.filter((s) => !s.is_hidden);
241
+ }, [y, f, m]), { clearExpandedSplits: S, setShowInsights: I, toggleSplit: v } = V(), { onEvent: T } = dt(), M = (x) => {
242
+ const w = u.find((s) => s.guid === x);
243
+ if (w?.has_been_split) {
244
+ v(w.guid);
245
+ return;
246
+ }
247
+ T(bt.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
248
+ account_guid: w?.account_guid,
249
+ transaction_guid: x
250
+ }), o?.(x);
251
+ }, L = _.useRef(null), k = at({
252
+ count: u.length,
253
+ getScrollElement: () => L.current,
254
+ estimateSize: (x) => U + (G(x, u) ? F : 0),
255
+ overscan: 5
256
+ });
257
+ return _.useEffect(() => k.measure(), [u]), _.useEffect(() => I(l), [l]), _.useEffect(() => () => S(), []), /* @__PURE__ */ e(lt, { component: "div", role: "list", sx: { width: h }, children: /* @__PURE__ */ e(A, { height: r, overflow: "auto", ref: L, role: "presentation", width: h, children: /* @__PURE__ */ a(
258
+ A,
259
+ {
260
+ height: (
261
+ // set the height to auto when there are no transactions so the zero state isn't set to 0
262
+ k.getVirtualItems().length === 0 ? "auto" : k.getTotalSize()
263
+ ),
264
+ position: "relative",
265
+ role: "presentation",
266
+ width: "100%",
267
+ children: [
268
+ (g || d) && i,
269
+ !g && !d && k.getVirtualItems().length === 0 && p,
270
+ !g && !d && k.getVirtualItems().length > 0 && k.getVirtualItems().map((x) => {
271
+ const w = u[x.index], s = G(x.index, u), C = Bt(x.index, u), D = U + (s ? F : 0);
272
+ return /* @__PURE__ */ a(
273
+ A,
274
+ {
275
+ role: "listitem",
276
+ sx: {
277
+ height: D,
278
+ position: "absolute",
279
+ transform: `translateY(${x.start}px)`,
280
+ width: "100%",
281
+ bgcolor: "background.paper"
282
+ },
283
+ children: [
284
+ s && /* @__PURE__ */ e(Rt, { bgcolor: t, children: xt(w.date) }),
285
+ /* @__PURE__ */ e(
286
+ Mt,
287
+ {
288
+ ...o && { onClick: M },
289
+ transaction: w
290
+ }
291
+ ),
292
+ /* @__PURE__ */ e(st, { sx: { ml: C ? 68 : 0 } })
293
+ ]
294
+ },
295
+ w.guid
296
+ );
297
+ })
298
+ ]
299
+ }
300
+ ) }) });
301
+ }, Nt = O(Vt), Ot = (t) => {
302
+ const [n, r] = K({ width: 0, height: 0 });
303
+ return q(() => {
304
+ const i = () => {
305
+ if (t.current) {
306
+ const { offsetWidth: o, offsetHeight: l } = t.current;
307
+ r({ width: o, height: l });
308
+ }
309
+ };
310
+ return i(), window.addEventListener("resize", i), () => {
311
+ window.removeEventListener("resize", i);
312
+ };
313
+ }, [t]), n;
314
+ }, Ht = ({
315
+ color: t,
316
+ legendStyle: n = {},
317
+ monthlyAmount: r,
318
+ monthlyAmountLabel: i,
319
+ trendAmount: o,
320
+ trendAmountLabel: l
321
+ }) => {
322
+ const d = z();
323
+ return /* @__PURE__ */ a(
324
+ c,
325
+ {
326
+ sx: {
327
+ alignItems: "center",
328
+ flexDirection: "row",
329
+ gap: 24,
330
+ justifyContent: "flex-start",
331
+ py: 4,
332
+ width: "100%",
333
+ ...n
334
+ },
335
+ children: [
336
+ i && /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
337
+ /* @__PURE__ */ e(
338
+ "svg",
339
+ {
340
+ "aria-hidden": "true",
341
+ "aria-labelledby": "chartLegendLabel",
342
+ fill: "none",
343
+ height: "12",
344
+ role: "figure",
345
+ width: "12",
346
+ children: /* @__PURE__ */ e("rect", { fill: t, height: "12", rx: "2", width: "12" })
347
+ }
348
+ ),
349
+ /* @__PURE__ */ a(b, { id: "chartLegendLabel", variant: "caption", children: [
350
+ i,
351
+ ": ",
352
+ r
353
+ ] })
354
+ ] }),
355
+ l && /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
356
+ /* @__PURE__ */ e(
357
+ "svg",
358
+ {
359
+ "aria-hidden": "true",
360
+ "aria-labelledby": "chartLegendLabel",
361
+ fill: "none",
362
+ height: "12",
363
+ role: "figure",
364
+ width: "12",
365
+ children: /* @__PURE__ */ e("rect", { fill: d.palette.chart.chart7, height: "12", rx: "2", width: "12" })
366
+ }
367
+ ),
368
+ /* @__PURE__ */ a(b, { id: "chartLegendLabel", variant: "caption", children: [
369
+ l,
370
+ ": ",
371
+ o
372
+ ] })
373
+ ] })
374
+ ]
375
+ }
376
+ );
377
+ }, jt = (t, n) => {
378
+ if (t <= 0 || n <= 0) return "";
379
+ const r = Math.min(4, t / 2, n / 2);
380
+ return `M${r},0 L${t - r},0 Q${t},0 ${t},${r} L${t},${n} L0,${n} L0,${r} Q0,0 ${r},0 Z`;
381
+ }, Gt = ({
382
+ colorRange: t,
383
+ data: n,
384
+ dataIndex: r,
385
+ removeSelectedTabColorChange: i,
386
+ selectedTabIndex: o,
387
+ style: l,
388
+ ...d
389
+ }) => {
390
+ const f = z(), { ariaLabel: m, formattedAmount: h } = n[r], p = o === r ? "bold" : 400, g = l.x ?? 0, y = l.y ?? 0, u = l.width ?? 0, S = l.height ?? 0;
391
+ return /* @__PURE__ */ a("g", { "aria-label": m, children: [
392
+ /* @__PURE__ */ e(
393
+ "path",
394
+ {
395
+ ...d,
396
+ d: jt(u, S),
397
+ fill: t[r],
398
+ transform: `translate(${g}, ${y})`
399
+ }
400
+ ),
401
+ /* @__PURE__ */ e(
402
+ "text",
403
+ {
404
+ fill: f.palette.text.primary,
405
+ fontSize: 11,
406
+ fontWeight: i ? "bold" : p,
407
+ textAnchor: "middle",
408
+ x: g + u / 2,
409
+ y: y - 8,
410
+ children: h
411
+ }
412
+ )
413
+ ] });
414
+ }, Ut = ({
415
+ amounts: t,
416
+ color: n,
417
+ data: r,
418
+ heightOverride: i,
419
+ margin: o = {
420
+ bottom: 30,
421
+ left: 40,
422
+ right: 40,
423
+ top: 20
424
+ },
425
+ onBarClick: l,
426
+ legendPosition: d = "bottom",
427
+ monthlyAmountLabel: f,
428
+ removeSelectedTabColorChange: m,
429
+ selectedTabIndex: h,
430
+ trendAmountLabel: p
431
+ }) => {
432
+ const g = _.useRef(null), { height: y, width: u } = Ot(g), S = z(), I = _.useMemo(() => {
433
+ const s = r.map(({ value: $ }) => $), C = Math.min(...s), D = Math.max(...s);
434
+ return {
435
+ series: [
436
+ {
437
+ data: s,
438
+ type: "bar"
439
+ }
440
+ ],
441
+ xAxis: [
442
+ {
443
+ data: r.map(({ label: $ }) => $),
444
+ scaleType: "band",
445
+ categoryGapRatio: 0.45
446
+ }
447
+ ],
448
+ yAxis: [
449
+ {
450
+ scaleType: "linear",
451
+ min: C < 0 ? C * 1.2 : 0,
452
+ max: D > 0 ? D : 0
453
+ }
454
+ ]
455
+ };
456
+ }, [r]), v = _.useMemo(() => {
457
+ const s = `${n}80`;
458
+ return m ? r.map(() => n) : h == null ? [...new Array(r.length - 1).fill(s), n] : r.map((C, D) => D === h ? n : s);
459
+ }, [n, r, h]), T = _.useMemo(
460
+ () => r[h ?? r.length - 1],
461
+ [r, h]
462
+ ), L = r.reduce((s, C) => Math.min(s, C.value), 1 / 0) < 0, k = /* @__PURE__ */ e(
463
+ Ht,
464
+ {
465
+ color: n,
466
+ legendStyle: { pl: o.left },
467
+ monthlyAmount: T.formattedAmount,
468
+ monthlyAmountLabel: f,
469
+ trendAmount: t?.formattedAverage,
470
+ trendAmountLabel: p
471
+ }
472
+ ), x = f || p, w = (s, { dataIndex: C }) => l?.(C);
473
+ return /* @__PURE__ */ a(c, { sx: { alignItems: "center", width: "100%" }, children: [
474
+ x && d === "top" && k,
475
+ /* @__PURE__ */ e(
476
+ A,
477
+ {
478
+ ref: g,
479
+ sx: {
480
+ height: i || 122,
481
+ mb: d === "top" ? 0 : 4,
482
+ mt: d === "top" ? 4 : 0,
483
+ touchAction: "pan-y",
484
+ width: "100%",
485
+ "& svg": {
486
+ touchAction: "pan-y",
487
+ userSelect: "none"
488
+ },
489
+ "& .recharts-wrapper": {
490
+ touchAction: "pan-y"
491
+ }
492
+ },
493
+ children: /* @__PURE__ */ a(
494
+ Ct,
495
+ {
496
+ height: y,
497
+ margin: {
498
+ bottom: o.bottom,
499
+ left: o.left,
500
+ right: o.right,
501
+ top: o.top || 45
502
+ },
503
+ series: I.series,
504
+ width: u,
505
+ xAxis: I.xAxis,
506
+ yAxis: [{ width: 0 }],
507
+ children: [
508
+ t?.average && /* @__PURE__ */ e(
509
+ j,
510
+ {
511
+ labelAlign: "middle",
512
+ lineStyle: {
513
+ stroke: S.palette.chart.chart7,
514
+ strokeDasharray: "4",
515
+ strokeLinecap: "round",
516
+ strokeWidth: 1
517
+ },
518
+ y: t?.average
519
+ }
520
+ ),
521
+ L && /* @__PURE__ */ e(
522
+ j,
523
+ {
524
+ labelAlign: "middle",
525
+ lineStyle: {
526
+ stroke: S.palette.chart.chart7
527
+ },
528
+ y: 0
529
+ }
530
+ ),
531
+ /* @__PURE__ */ e(
532
+ vt,
533
+ {
534
+ position: "bottom",
535
+ slots: {
536
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
537
+ axisTickLabel: ({ text: s, ownerState: C, ...D }) => {
538
+ const $ = r[h ?? r.length - 1]?.label;
539
+ return /* @__PURE__ */ e(
540
+ "text",
541
+ {
542
+ ...D,
543
+ style: {
544
+ ...D.style,
545
+ fontWeight: !m && $ === s ? "bold" : 400
546
+ },
547
+ children: s
548
+ }
549
+ );
550
+ }
551
+ },
552
+ sx: (s) => ({
553
+ "& .MuiChartsAxis-line": {
554
+ stroke: L ? "none" : s.palette.text?.primary
555
+ },
556
+ "& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick": {
557
+ display: "none"
558
+ },
559
+ "& .MuiChartsAxis-tickLabel": {
560
+ transform: L ? "translateY(15px)" : {}
561
+ }
562
+ }),
563
+ tickLabelStyle: {
564
+ fontSize: 11
565
+ }
566
+ }
567
+ ),
568
+ /* @__PURE__ */ e(
569
+ Tt,
570
+ {
571
+ onItemClick: w,
572
+ slots: {
573
+ bar: (s) => {
574
+ const { ownerState: C, ...D } = s;
575
+ return /* @__PURE__ */ e(
576
+ Gt,
577
+ {
578
+ ...D,
579
+ colorRange: v,
580
+ data: r,
581
+ dataIndex: C.dataIndex,
582
+ removeSelectedTabColorChange: m,
583
+ selectedTabIndex: h ?? r.length - 1,
584
+ style: {
585
+ height: s.height,
586
+ x: s.x,
587
+ y: s.y,
588
+ width: s.width
589
+ }
590
+ }
591
+ );
592
+ }
593
+ }
594
+ }
595
+ )
596
+ ]
597
+ }
598
+ )
599
+ }
600
+ ),
601
+ x && d === "bottom" && k
602
+ ] });
603
+ }, Ft = ({
604
+ ariaLabel: t,
605
+ barChartProps: n,
606
+ beat: r,
607
+ data: i,
608
+ defaultSelectedIndex: o = 0,
609
+ icon: l,
610
+ isOpen: d = !1,
611
+ onClose: f,
612
+ onTabChange: m,
613
+ tipSection: h,
614
+ title: p,
615
+ transactionListProps: g = {}
616
+ }) => {
617
+ const { common: y, transactions: u } = H(), { isCopyLoaded: S } = ht(), { sortedTransactionsWithSplits: I, tags: v } = W();
618
+ return S ? /* @__PURE__ */ e(Dt, { ariaLabelClose: y.close_aria, isOpen: d, onClose: f, title: p, children: /* @__PURE__ */ e(
619
+ Lt,
620
+ {
621
+ ariaLabel: t,
622
+ beat: r,
623
+ chart: (T, M) => /* @__PURE__ */ e(A, { sx: { pt: 16 }, children: /* @__PURE__ */ e(
624
+ Ut,
625
+ {
626
+ ...n,
627
+ onBarClick: (L) => {
628
+ M(L), n.onBarClick?.(L);
629
+ },
630
+ selectedTabIndex: T
631
+ }
632
+ ) }),
633
+ data: i,
634
+ defaultSelectedIndex: o,
635
+ icon: l,
636
+ onTabChange: m,
637
+ tipSection: h,
638
+ children: () => /* @__PURE__ */ a(_.Fragment, { children: [
639
+ /* @__PURE__ */ a(
640
+ c,
641
+ {
642
+ sx: {
643
+ alignItems: "center",
644
+ borderBottomColor: "divider",
645
+ borderBottomStyle: "solid",
646
+ borderBottomWidth: 1,
647
+ flexDirection: "row",
648
+ justifyContent: "space-between",
649
+ pb: 4,
650
+ pt: 16,
651
+ px: 24
652
+ },
653
+ children: [
654
+ /* @__PURE__ */ e(b, { bold: !0, variant: "body1", children: u.transactions_title }),
655
+ (g?.transaction || I.length > 0) && /* @__PURE__ */ e(
656
+ Y,
657
+ {
658
+ onClick: () => {
659
+ ot(
660
+ g?.transaction || I,
661
+ v
662
+ );
663
+ },
664
+ startIcon: /* @__PURE__ */ e(rt, { name: "ios_share" }),
665
+ sx: { height: 28 },
666
+ children: /* @__PURE__ */ e(b, { bold: !0, variant: "body2", children: u.export_csv_btn })
667
+ }
668
+ )
669
+ ]
670
+ }
671
+ ),
672
+ /* @__PURE__ */ e(Nt, { ...g })
673
+ ] })
674
+ }
675
+ ) }) : /* @__PURE__ */ e(Q, {});
676
+ }, De = Ft, Kt = ({
677
+ amount: t,
678
+ borderRadius: n = "2px",
679
+ completeColor: r = "success.main",
680
+ icon: i,
681
+ label: o,
682
+ leftLabel: l,
683
+ percentComplete: d = 0,
684
+ rightLabel: f,
685
+ sx: m
686
+ }) => /* @__PURE__ */ e(c, { sx: { p: 24, width: "100%", ...m }, children: /* @__PURE__ */ a(c, { className: "details-container", sx: { gap: 16 }, children: [
687
+ /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 12 }, children: [
688
+ /* @__PURE__ */ e(A, { children: i }),
689
+ /* @__PURE__ */ a(c, { children: [
690
+ /* @__PURE__ */ e(N, { variant: "body2", children: o }),
691
+ typeof t == "string" ? /* @__PURE__ */ e(tt, { children: t }) : t
692
+ ] })
693
+ ] }),
694
+ /* @__PURE__ */ a(c, { sx: { gap: 4 }, children: [
695
+ /* @__PURE__ */ e(
696
+ c,
697
+ {
698
+ sx: {
699
+ bgcolor: "divider",
700
+ borderRadius: n,
701
+ flexDirection: "row",
702
+ height: 16,
703
+ width: "100%"
704
+ },
705
+ children: /* @__PURE__ */ e(
706
+ A,
707
+ {
708
+ sx: {
709
+ bgcolor: r,
710
+ borderRadius: n,
711
+ height: 16,
712
+ width: `${d}%`
713
+ }
714
+ }
715
+ )
716
+ }
717
+ ),
718
+ /* @__PURE__ */ a(c, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
719
+ /* @__PURE__ */ e(b, { variant: "body2", children: l }),
720
+ /* @__PURE__ */ e(b, { variant: "body2", children: f })
721
+ ] })
722
+ ] })
723
+ ] }) }), Se = Kt, Ie = ({
724
+ title: t,
725
+ description: n,
726
+ callToAction: r,
727
+ instanceSlot: i = void 0,
728
+ onCtaClick: o = () => {
729
+ }
730
+ }) => /* @__PURE__ */ a(St, { sx: { pt: 8, pr: 16, pb: 12, pl: 8, borderRadius: "8px" }, children: [
731
+ /* @__PURE__ */ e(
732
+ c,
733
+ {
734
+ sx: {
735
+ flexDirection: "row",
736
+ alignItems: "center",
737
+ justifyContent: "space-between",
738
+ pt: 4,
739
+ pl: 8
740
+ },
741
+ children: /* @__PURE__ */ e(b, { bold: !0, variant: "body1", children: t })
742
+ }
743
+ ),
744
+ /* @__PURE__ */ a(
745
+ c,
746
+ {
747
+ sx: {
748
+ gap: 16,
749
+ alignItems: "center",
750
+ flexDirection: "row",
751
+ justifyContent: "space-between"
752
+ },
753
+ children: [
754
+ /* @__PURE__ */ a(c, { children: [
755
+ /* @__PURE__ */ e(c, { sx: { pt: 2, pl: 8, pb: 8 }, children: /* @__PURE__ */ e(N, { sx: { fontWeight: 400 }, variant: "subtitle2", children: n }) }),
756
+ /* @__PURE__ */ e(c, { sx: { alignItems: "flex-start" }, children: /* @__PURE__ */ e(
757
+ Y,
758
+ {
759
+ onClick: o,
760
+ sx: {
761
+ p: 0,
762
+ height: 24,
763
+ px: 8,
764
+ py: 8,
765
+ fontWeight: 600,
766
+ fontSize: 13,
767
+ lineHeight: "16px"
768
+ },
769
+ variant: "text",
770
+ children: r
771
+ }
772
+ ) })
773
+ ] }),
774
+ i
775
+ ]
776
+ }
777
+ )
778
+ ] });
779
+ export {
780
+ Ut as B,
781
+ De as C,
782
+ Ie as E,
783
+ Rt as S,
784
+ Nt as T,
785
+ Mt as a,
786
+ Se as b,
787
+ ve as c,
788
+ Te as d,
789
+ Ot as e,
790
+ Lt as f,
791
+ Bt as h,
792
+ G as s,
793
+ V as u
794
+ };