@mx-cartographer/experiences 8.1.5 → 8.1.7

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