@mx-cartographer/experiences 9.0.15 → 9.0.16-alpha
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/CHANGELOG.md +4 -0
- package/dist/{AccountDetailsDrawer-BRA7SYQ_.mjs → AccountDetailsDrawer-CZPeLsCq.mjs} +2 -2
- package/dist/{EmbeddedCard-BxgB26dd.mjs → EmbeddedCard-DH8vQ3qN.mjs} +183 -181
- package/dist/{ExportCsvAction-BV69DnpC.mjs → ExportCsvAction-C9KWH3Az.mjs} +1 -1
- package/dist/ListItemWrapper-DRse79Iu.mjs +43 -0
- package/dist/{ManageIncome-Dn9Y3Z2U.mjs → ManageIncome-Dcsnnz86.mjs} +7 -7
- package/dist/{RecurringSettings-BWlg0zsv.mjs → RecurringSettings-D8hBbXV_.mjs} +1 -1
- package/dist/{TransactionDetails-DQ_eE7M4.mjs → TransactionDetails-roZ5xLq8.mjs} +1 -1
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +4 -4
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/index.es.js +1 -1
- package/dist/finstrong/index.es.js +4 -4
- package/dist/insights/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +121 -111
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +3 -3
- package/package.json +1 -1
- package/dist/ListItemWrapper-BHIbqx7E.mjs +0 -42
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import x, { useMemo as X, useState as P, useEffect as q } from "react";
|
|
3
3
|
import L from "@mui/material/Box";
|
|
4
4
|
import Y from "@mui/material/Button";
|
|
5
5
|
import l from "@mui/material/Stack";
|
|
@@ -15,7 +15,7 @@ import ht from "@mui/material/ListItemAvatar";
|
|
|
15
15
|
import Ct from "@mui/material/ListItemText";
|
|
16
16
|
import { useTheme as M } from "@mui/material/styles";
|
|
17
17
|
import { f as H } from "./NumberFormatting--XMeeBfr.mjs";
|
|
18
|
-
import { L as _t } from "./ListItemWrapper-
|
|
18
|
+
import { L as _t } from "./ListItemWrapper-DRse79Iu.mjs";
|
|
19
19
|
import { fromUnixTime as v } from "date-fns/fromUnixTime";
|
|
20
20
|
import { isSameDay as F } from "date-fns/isSameDay";
|
|
21
21
|
import { f as ut, D as pt } from "./DateFormats-HudZ3Bjs.mjs";
|
|
@@ -29,7 +29,7 @@ import { D as It } from "./Drawer-DsnW2o0v.mjs";
|
|
|
29
29
|
import { ChartContainer as xt, ChartsReferenceLine as U, ChartsXAxis as St, BarPlot as Ot } from "@mui/x-charts";
|
|
30
30
|
import Dt from "@mui/material/Card";
|
|
31
31
|
const K = () => {
|
|
32
|
-
if (!
|
|
32
|
+
if (!x.useContext(lt))
|
|
33
33
|
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
|
34
34
|
return G().uiStore;
|
|
35
35
|
}, bt = {
|
|
@@ -98,32 +98,33 @@ function fe(t) {
|
|
|
98
98
|
type: "mx/pulse/client_configured_cta"
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
const yt = ({ transaction: t, onClick: r }) => {
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
return
|
|
101
|
+
const yt = ({ transaction: t, onClick: r, component: n }) => {
|
|
102
|
+
const o = M().palette.mode === "dark", { associatedBeats: s } = G(), { expandedSplits: d } = K(), { transactions: g } = z(), { showInsights: u } = K(), T = t.transaction_type === it.CREDIT, _ = x.useMemo(() => s.find((c) => c.associated_transaction_guid === t.guid), [s, t]), p = (c, A) => {
|
|
103
|
+
const f = [];
|
|
104
|
+
return c.is_flagged && f.push(
|
|
105
105
|
/* @__PURE__ */ e(
|
|
106
106
|
k,
|
|
107
107
|
{
|
|
108
108
|
fill: !0,
|
|
109
109
|
name: "flag",
|
|
110
110
|
size: 16,
|
|
111
|
-
sx: { color:
|
|
111
|
+
sx: { color: A ? "primary.main" : "warning.dark" }
|
|
112
112
|
},
|
|
113
113
|
"flag"
|
|
114
114
|
)
|
|
115
|
-
),
|
|
116
|
-
},
|
|
115
|
+
), c.is_hidden && f.push(/* @__PURE__ */ e(k, { name: "visibility_off", size: 16 }, "hidden")), c.has_been_split && f.push(/* @__PURE__ */ e(k, { name: "call_split", size: 16 }, "split")), f;
|
|
116
|
+
}, C = (c, A) => c.is_hidden ? A.is_excluded : c.has_been_split ? A.split_transaction_category_label : c.category || "";
|
|
117
117
|
return (
|
|
118
118
|
//TODO: implement common/components/ListItemRow.tsx
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ a(
|
|
120
120
|
_t,
|
|
121
121
|
{
|
|
122
122
|
clickEventName: bt.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
123
|
+
...n && { component: n },
|
|
123
124
|
onClick: r ? () => r(t.guid) : void 0,
|
|
124
125
|
sx: t.is_hidden ? { backgroundColor: "grey.50", color: "text.secondary" } : void 0,
|
|
125
126
|
children: [
|
|
126
|
-
/* @__PURE__ */ e(ht, { children: t.parent_guid &&
|
|
127
|
+
/* @__PURE__ */ e(ht, { children: t.parent_guid && d.includes(t.parent_guid) ? /* @__PURE__ */ e(x.Fragment, {}) : /* @__PURE__ */ e(
|
|
127
128
|
J,
|
|
128
129
|
{
|
|
129
130
|
categoryGuid: t.top_level_category_guid || "",
|
|
@@ -134,36 +135,36 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
134
135
|
Ct,
|
|
135
136
|
{
|
|
136
137
|
disableTypography: !0,
|
|
137
|
-
secondary: /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
p(t,
|
|
140
|
-
/* @__PURE__ */ e(m, { truncate: !0, variant: "caption", children:
|
|
138
|
+
secondary: /* @__PURE__ */ a(l, { direction: "row", justifyContent: "space-between", children: [
|
|
139
|
+
/* @__PURE__ */ a(l, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
140
|
+
p(t, o),
|
|
141
|
+
/* @__PURE__ */ e(m, { truncate: !0, variant: "caption", children: C(t, g) })
|
|
141
142
|
] }),
|
|
142
|
-
|
|
143
|
+
_ && u && /* @__PURE__ */ e(
|
|
143
144
|
m,
|
|
144
145
|
{
|
|
145
146
|
bold: !0,
|
|
146
147
|
color: "action.active",
|
|
147
|
-
onClick: (
|
|
148
|
-
|
|
148
|
+
onClick: (c) => {
|
|
149
|
+
c.stopPropagation(), c.preventDefault(), Lt(_.guid);
|
|
149
150
|
},
|
|
150
151
|
truncate: !0,
|
|
151
152
|
variant: "caption",
|
|
152
|
-
children:
|
|
153
|
+
children: _.short_title
|
|
153
154
|
}
|
|
154
155
|
)
|
|
155
156
|
] }),
|
|
156
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ a(l, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
157
158
|
/* @__PURE__ */ e(m, { bold: !0, truncate: !0, variant: "body1", children: t.payee || t.description || t.feed_description }),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ a(
|
|
159
160
|
m,
|
|
160
161
|
{
|
|
161
162
|
bold: !0,
|
|
162
|
-
color:
|
|
163
|
+
color: T ? "success.main" : "text.primary",
|
|
163
164
|
sx: { flexShrink: 0 },
|
|
164
165
|
variant: "body1",
|
|
165
166
|
children: [
|
|
166
|
-
|
|
167
|
+
T ? "+" : "",
|
|
167
168
|
H(t.amount, "0,0.00")
|
|
168
169
|
]
|
|
169
170
|
}
|
|
@@ -180,7 +181,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
180
181
|
children: r
|
|
181
182
|
}) => /* @__PURE__ */ e(L, { display: "inline-block", sx: { bgcolor: t, py: 6, width: "100%" }, children: /* @__PURE__ */ e(m, { bold: !0, sx: { pl: 24 }, variant: "caption", children: r }) }), kt = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
|
|
182
183
|
const { transactions: n } = z();
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ a(l, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
184
185
|
t && /* @__PURE__ */ e(nt, { color: "action", sx: { fontSize: 32 } }),
|
|
185
186
|
/* @__PURE__ */ e(m, { bold: !0, color: "text.secondary", variant: "body2", children: n.zero_state_no_transactions }),
|
|
186
187
|
r && /* @__PURE__ */ e(m, { color: "text.secondary", variant: "caption", children: n.zero_state_there_are_no_transactions })
|
|
@@ -208,78 +209,79 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
208
209
|
height: n = "calc(100dvh - 36px)",
|
|
209
210
|
loader: i = /* @__PURE__ */ e(Z, { label: "Loading", size: 40 }),
|
|
210
211
|
onClick: o,
|
|
211
|
-
showInsights:
|
|
212
|
-
showLoader:
|
|
212
|
+
showInsights: s = !1,
|
|
213
|
+
showLoader: d = !1,
|
|
213
214
|
transaction: g,
|
|
214
|
-
width:
|
|
215
|
-
zeroState:
|
|
215
|
+
width: u = "100%",
|
|
216
|
+
zeroState: T = /* @__PURE__ */ e(vt, {})
|
|
216
217
|
}) => {
|
|
217
|
-
const { isLoading:
|
|
218
|
-
const N = r ?
|
|
218
|
+
const { isLoading: _, sortedTransactions: p } = G(), C = x.useMemo(() => {
|
|
219
|
+
const N = r ? p.filter(r) : p;
|
|
219
220
|
return g ?? N;
|
|
220
|
-
}, [
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
b
|
|
221
|
+
}, [p, g]), { clearExpandedSplits: c, setShowInsights: A, toggleSplit: f } = K(), { onEvent: O } = dt(), D = (N) => {
|
|
222
|
+
const b = C.find((y) => y.guid === N);
|
|
223
|
+
if (b?.has_been_split) {
|
|
224
|
+
f(b.guid);
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
|
-
|
|
227
|
-
account_guid:
|
|
227
|
+
O(gt.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
228
|
+
account_guid: b?.account_guid,
|
|
228
229
|
transaction_guid: N
|
|
229
230
|
}), o?.(N);
|
|
230
|
-
}, w =
|
|
231
|
-
count:
|
|
231
|
+
}, w = x.useRef(null), I = at({
|
|
232
|
+
count: C.length,
|
|
232
233
|
getScrollElement: () => w.current,
|
|
233
|
-
estimateSize: (N) => B + (W(N,
|
|
234
|
+
estimateSize: (N) => B + (W(N, C) ? j : 0),
|
|
234
235
|
overscan: 5
|
|
235
236
|
});
|
|
236
|
-
return
|
|
237
|
+
return x.useEffect(() => I.measure(), [C]), x.useEffect(() => A(s), [s]), x.useEffect(() => () => c(), []), /* @__PURE__ */ e(ct, { component: "div", role: "list", sx: { width: u }, children: /* @__PURE__ */ e(L, { height: n, overflow: "auto", ref: w, role: "presentation", width: u, children: /* @__PURE__ */ a(
|
|
237
238
|
L,
|
|
238
239
|
{
|
|
239
240
|
height: (
|
|
240
241
|
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
241
|
-
|
|
242
|
+
I.getVirtualItems().length === 0 ? "auto" : I.getTotalSize()
|
|
242
243
|
),
|
|
243
244
|
position: "relative",
|
|
244
245
|
role: "presentation",
|
|
245
246
|
width: "100%",
|
|
246
247
|
children: [
|
|
247
|
-
(
|
|
248
|
-
!
|
|
249
|
-
!
|
|
250
|
-
const
|
|
251
|
-
return /* @__PURE__ */
|
|
248
|
+
(_ || d) && i,
|
|
249
|
+
!_ && !d && I.getVirtualItems().length === 0 && T,
|
|
250
|
+
!_ && !d && I.getVirtualItems().length > 0 && I.getVirtualItems().map((N) => {
|
|
251
|
+
const b = C[N.index], y = W(N.index, C), h = Gt(N.index, C), S = B + (y ? j : 0);
|
|
252
|
+
return /* @__PURE__ */ a(
|
|
252
253
|
L,
|
|
253
254
|
{
|
|
254
255
|
role: "listitem",
|
|
255
256
|
sx: {
|
|
256
|
-
height:
|
|
257
|
+
height: S,
|
|
257
258
|
position: "absolute",
|
|
258
259
|
transform: `translateY(${N.start}px)`,
|
|
259
260
|
width: "100%",
|
|
260
261
|
bgcolor: "background.paper"
|
|
261
262
|
},
|
|
262
263
|
children: [
|
|
263
|
-
y && /* @__PURE__ */ e(Rt, { bgcolor: t, children: mt(
|
|
264
|
+
y && /* @__PURE__ */ e(Rt, { bgcolor: t, children: mt(b.date) }),
|
|
264
265
|
/* @__PURE__ */ e(
|
|
265
266
|
wt,
|
|
266
267
|
{
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
component: "div",
|
|
269
|
+
...o && { onClick: D },
|
|
270
|
+
transaction: b
|
|
269
271
|
}
|
|
270
272
|
),
|
|
271
273
|
/* @__PURE__ */ e(st, { sx: { ml: h ? 68 : 0 } })
|
|
272
274
|
]
|
|
273
275
|
},
|
|
274
|
-
|
|
276
|
+
b.guid
|
|
275
277
|
);
|
|
276
278
|
})
|
|
277
279
|
]
|
|
278
280
|
}
|
|
279
281
|
) }) });
|
|
280
282
|
}, Ht = V(Mt), Kt = ({ message: t, tipAriaLabel: r, onDismiss: n, onAction: i, sx: o }) => {
|
|
281
|
-
const
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
+
const s = i || n, d = i ? "chevron_right" : "close";
|
|
284
|
+
return /* @__PURE__ */ a(
|
|
283
285
|
l,
|
|
284
286
|
{
|
|
285
287
|
sx: {
|
|
@@ -296,18 +298,18 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
296
298
|
...o
|
|
297
299
|
},
|
|
298
300
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ a(l, { sx: { flexDirection: "row", gap: 4 }, children: [
|
|
300
302
|
/* @__PURE__ */ e(k, { color: "info", fill: !0, name: "lightbulb", size: 24 }),
|
|
301
303
|
/* @__PURE__ */ e($, { color: "primary.dark", fontWeight: 400, noWrap: !1, variant: "subtitle2", children: t })
|
|
302
304
|
] }),
|
|
303
|
-
|
|
305
|
+
s && /* @__PURE__ */ e(
|
|
304
306
|
ft,
|
|
305
307
|
{
|
|
306
308
|
"aria-label": r,
|
|
307
|
-
onClick:
|
|
309
|
+
onClick: s,
|
|
308
310
|
size: "small",
|
|
309
311
|
sx: { minHeight: 0, minWidth: 0, p: 0 },
|
|
310
|
-
children: /* @__PURE__ */ e(k, { color: "primary", fill: !0, name:
|
|
312
|
+
children: /* @__PURE__ */ e(k, { color: "primary", fill: !0, name: d, size: 20 })
|
|
311
313
|
}
|
|
312
314
|
)
|
|
313
315
|
]
|
|
@@ -319,47 +321,47 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
319
321
|
chart: n,
|
|
320
322
|
children: i,
|
|
321
323
|
data: o,
|
|
322
|
-
defaultSelectedIndex:
|
|
323
|
-
icon:
|
|
324
|
+
defaultSelectedIndex: s,
|
|
325
|
+
icon: d,
|
|
324
326
|
onTabChange: g,
|
|
325
|
-
tipSection:
|
|
327
|
+
tipSection: u
|
|
326
328
|
}) => {
|
|
327
|
-
const { heading:
|
|
328
|
-
() =>
|
|
329
|
-
[
|
|
330
|
-
), [
|
|
331
|
-
g?.(
|
|
332
|
-
},
|
|
333
|
-
|
|
329
|
+
const { heading: T, subHeading: _ } = r, p = X(
|
|
330
|
+
() => s ?? (o.length ? o.length - 1 : 0),
|
|
331
|
+
[s, o.length]
|
|
332
|
+
), [C, c] = P(p), A = (O, D) => {
|
|
333
|
+
g?.(D), c(D);
|
|
334
|
+
}, f = (O) => {
|
|
335
|
+
c(O);
|
|
334
336
|
};
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */ e(Nt, { "aria-label": t, onChange: A, value:
|
|
337
|
+
return /* @__PURE__ */ a(L, { sx: { bgcolor: "background.paper", width: "100%" }, children: [
|
|
338
|
+
/* @__PURE__ */ e(Nt, { "aria-label": t, onChange: A, value: C, variant: "fullWidth", children: o.map((O, D) => /* @__PURE__ */ e(
|
|
337
339
|
At,
|
|
338
340
|
{
|
|
339
|
-
id: `transaction-details-tab-${
|
|
340
|
-
label:
|
|
341
|
+
id: `transaction-details-tab-${D}`,
|
|
342
|
+
label: O.label,
|
|
341
343
|
sx: { minWidth: "auto", px: 0 }
|
|
342
344
|
},
|
|
343
|
-
`${
|
|
345
|
+
`${O.label}-${D}`
|
|
344
346
|
)) }),
|
|
345
|
-
/* @__PURE__ */ e(l, { sx: { pt: 16, px: 24 }, children: (
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
/* @__PURE__ */ e(m, { textTransform: "uppercase", variant: "body2", children:
|
|
347
|
+
/* @__PURE__ */ e(l, { sx: { pt: 16, px: 24 }, children: (T || _) && /* @__PURE__ */ a(l, { sx: { gap: 4 }, children: [
|
|
348
|
+
T && /* @__PURE__ */ e(tt, { children: T }),
|
|
349
|
+
_ && /* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
350
|
+
d,
|
|
351
|
+
/* @__PURE__ */ e(m, { textTransform: "uppercase", variant: "body2", children: _.description })
|
|
350
352
|
] })
|
|
351
353
|
] }) }),
|
|
352
|
-
n?.(
|
|
353
|
-
|
|
354
|
-
i?.(
|
|
354
|
+
n?.(C, f),
|
|
355
|
+
u && /* @__PURE__ */ e(Kt, { ...u }),
|
|
356
|
+
i?.(C)
|
|
355
357
|
] });
|
|
356
358
|
}, Vt = (t) => {
|
|
357
359
|
const [r, n] = P({ width: 0, height: 0 });
|
|
358
360
|
return q(() => {
|
|
359
361
|
const i = () => {
|
|
360
362
|
if (t.current) {
|
|
361
|
-
const { offsetWidth: o, offsetHeight:
|
|
362
|
-
n({ width: o, height:
|
|
363
|
+
const { offsetWidth: o, offsetHeight: s } = t.current;
|
|
364
|
+
n({ width: o, height: s });
|
|
363
365
|
}
|
|
364
366
|
};
|
|
365
367
|
return i(), window.addEventListener("resize", i), () => {
|
|
@@ -372,10 +374,10 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
372
374
|
monthlyAmount: n,
|
|
373
375
|
monthlyAmountLabel: i,
|
|
374
376
|
trendAmount: o,
|
|
375
|
-
trendAmountLabel:
|
|
377
|
+
trendAmountLabel: s
|
|
376
378
|
}) => {
|
|
377
|
-
const
|
|
378
|
-
return /* @__PURE__ */
|
|
379
|
+
const d = M();
|
|
380
|
+
return /* @__PURE__ */ a(
|
|
379
381
|
l,
|
|
380
382
|
{
|
|
381
383
|
sx: {
|
|
@@ -388,7 +390,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
388
390
|
...r
|
|
389
391
|
},
|
|
390
392
|
children: [
|
|
391
|
-
i && /* @__PURE__ */
|
|
393
|
+
i && /* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
392
394
|
/* @__PURE__ */ e(
|
|
393
395
|
"svg",
|
|
394
396
|
{
|
|
@@ -401,13 +403,13 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
401
403
|
children: /* @__PURE__ */ e("rect", { fill: t, height: "12", rx: "2", width: "12" })
|
|
402
404
|
}
|
|
403
405
|
),
|
|
404
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ a(m, { id: "chartLegendLabel", variant: "caption", children: [
|
|
405
407
|
i,
|
|
406
408
|
": ",
|
|
407
409
|
n
|
|
408
410
|
] })
|
|
409
411
|
] }),
|
|
410
|
-
|
|
412
|
+
s && /* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
411
413
|
/* @__PURE__ */ e(
|
|
412
414
|
"svg",
|
|
413
415
|
{
|
|
@@ -417,11 +419,11 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
417
419
|
height: "12",
|
|
418
420
|
role: "figure",
|
|
419
421
|
width: "12",
|
|
420
|
-
children: /* @__PURE__ */ e("rect", { fill:
|
|
422
|
+
children: /* @__PURE__ */ e("rect", { fill: d.palette.chart.chart7, height: "12", rx: "2", width: "12" })
|
|
421
423
|
}
|
|
422
424
|
),
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
|
|
425
|
+
/* @__PURE__ */ a(m, { id: "chartLegendLabel", variant: "caption", children: [
|
|
426
|
+
s,
|
|
425
427
|
": ",
|
|
426
428
|
o
|
|
427
429
|
] })
|
|
@@ -439,18 +441,18 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
439
441
|
dataIndex: n,
|
|
440
442
|
removeSelectedTabColorChange: i,
|
|
441
443
|
selectedTabIndex: o,
|
|
442
|
-
style:
|
|
443
|
-
...
|
|
444
|
+
style: s,
|
|
445
|
+
...d
|
|
444
446
|
}) => {
|
|
445
|
-
const g = M(), { ariaLabel:
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
+
const g = M(), { ariaLabel: u, formattedAmount: T } = r[n], _ = o === n ? "bold" : 400, p = s.x ?? 0, C = s.y ?? 0, c = s.width ?? 0, A = s.height ?? 0;
|
|
448
|
+
return /* @__PURE__ */ a("g", { "aria-label": u, children: [
|
|
447
449
|
/* @__PURE__ */ e(
|
|
448
450
|
"path",
|
|
449
451
|
{
|
|
450
|
-
...
|
|
451
|
-
d: Ut(
|
|
452
|
+
...d,
|
|
453
|
+
d: Ut(c, A),
|
|
452
454
|
fill: t[n],
|
|
453
|
-
transform: `translate(${
|
|
455
|
+
transform: `translate(${p}, ${C})`
|
|
454
456
|
}
|
|
455
457
|
),
|
|
456
458
|
/* @__PURE__ */ e(
|
|
@@ -458,11 +460,11 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
458
460
|
{
|
|
459
461
|
fill: g.palette.text.primary,
|
|
460
462
|
fontSize: 11,
|
|
461
|
-
fontWeight: i ? "bold" :
|
|
463
|
+
fontWeight: i ? "bold" : _,
|
|
462
464
|
textAnchor: "middle",
|
|
463
|
-
x:
|
|
464
|
-
y:
|
|
465
|
-
children:
|
|
465
|
+
x: p + c / 2,
|
|
466
|
+
y: C - 8,
|
|
467
|
+
children: T
|
|
466
468
|
}
|
|
467
469
|
)
|
|
468
470
|
] });
|
|
@@ -477,15 +479,15 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
477
479
|
right: 40,
|
|
478
480
|
top: 20
|
|
479
481
|
},
|
|
480
|
-
onBarClick:
|
|
481
|
-
legendPosition:
|
|
482
|
+
onBarClick: s,
|
|
483
|
+
legendPosition: d = "bottom",
|
|
482
484
|
monthlyAmountLabel: g,
|
|
483
|
-
removeSelectedTabColorChange:
|
|
484
|
-
selectedTabIndex:
|
|
485
|
-
trendAmountLabel:
|
|
485
|
+
removeSelectedTabColorChange: u,
|
|
486
|
+
selectedTabIndex: T,
|
|
487
|
+
trendAmountLabel: _
|
|
486
488
|
}) => {
|
|
487
|
-
const
|
|
488
|
-
const h = n.map(({ value: R }) => R),
|
|
489
|
+
const p = x.useRef(null), { height: C, width: c } = Vt(p), A = M(), f = x.useMemo(() => {
|
|
490
|
+
const h = n.map(({ value: R }) => R), S = Math.min(...h), E = Math.max(...h);
|
|
489
491
|
return {
|
|
490
492
|
series: [
|
|
491
493
|
{
|
|
@@ -503,38 +505,38 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
503
505
|
yAxis: [
|
|
504
506
|
{
|
|
505
507
|
scaleType: "linear",
|
|
506
|
-
min:
|
|
508
|
+
min: S < 0 ? S * 1.2 : 0,
|
|
507
509
|
max: E > 0 ? E : 0
|
|
508
510
|
}
|
|
509
511
|
]
|
|
510
512
|
};
|
|
511
|
-
}, [n]),
|
|
513
|
+
}, [n]), O = x.useMemo(() => {
|
|
512
514
|
const h = `${r}80`;
|
|
513
|
-
return
|
|
514
|
-
}, [r, n,
|
|
515
|
-
() => n[
|
|
516
|
-
[n,
|
|
517
|
-
),
|
|
515
|
+
return u ? n.map(() => r) : T == null ? [...new Array(n.length - 1).fill(h), r] : n.map((S, E) => E === T ? r : h);
|
|
516
|
+
}, [r, n, T]), D = x.useMemo(
|
|
517
|
+
() => n[T ?? n.length - 1],
|
|
518
|
+
[n, T]
|
|
519
|
+
), I = n.reduce((h, S) => Math.min(h, S.value), 1 / 0) < 0, N = /* @__PURE__ */ e(
|
|
518
520
|
zt,
|
|
519
521
|
{
|
|
520
522
|
color: r,
|
|
521
523
|
legendStyle: { pl: o.left },
|
|
522
|
-
monthlyAmount:
|
|
524
|
+
monthlyAmount: D.formattedAmount,
|
|
523
525
|
monthlyAmountLabel: g,
|
|
524
526
|
trendAmount: t?.formattedAverage,
|
|
525
|
-
trendAmountLabel:
|
|
527
|
+
trendAmountLabel: _
|
|
526
528
|
}
|
|
527
|
-
),
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
|
|
529
|
+
), b = g || _, y = (h, { dataIndex: S }) => s?.(S);
|
|
530
|
+
return /* @__PURE__ */ a(l, { sx: { alignItems: "center", width: "100%" }, children: [
|
|
531
|
+
b && d === "top" && N,
|
|
530
532
|
/* @__PURE__ */ e(
|
|
531
533
|
L,
|
|
532
534
|
{
|
|
533
|
-
ref:
|
|
535
|
+
ref: p,
|
|
534
536
|
sx: {
|
|
535
537
|
height: i || 122,
|
|
536
|
-
mb:
|
|
537
|
-
mt:
|
|
538
|
+
mb: d === "top" ? 0 : 4,
|
|
539
|
+
mt: d === "top" ? 4 : 0,
|
|
538
540
|
touchAction: "pan-y",
|
|
539
541
|
width: "100%",
|
|
540
542
|
"& svg": {
|
|
@@ -545,19 +547,19 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
545
547
|
touchAction: "pan-y"
|
|
546
548
|
}
|
|
547
549
|
},
|
|
548
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ a(
|
|
549
551
|
xt,
|
|
550
552
|
{
|
|
551
|
-
height:
|
|
553
|
+
height: C,
|
|
552
554
|
margin: {
|
|
553
555
|
bottom: o.bottom,
|
|
554
556
|
left: o.left,
|
|
555
557
|
right: o.right,
|
|
556
558
|
top: o.top || 45
|
|
557
559
|
},
|
|
558
|
-
series:
|
|
559
|
-
width:
|
|
560
|
-
xAxis:
|
|
560
|
+
series: f.series,
|
|
561
|
+
width: c,
|
|
562
|
+
xAxis: f.xAxis,
|
|
561
563
|
yAxis: [{ width: 0 }],
|
|
562
564
|
children: [
|
|
563
565
|
t?.average && /* @__PURE__ */ e(
|
|
@@ -573,7 +575,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
573
575
|
y: t?.average
|
|
574
576
|
}
|
|
575
577
|
),
|
|
576
|
-
|
|
578
|
+
I && /* @__PURE__ */ e(
|
|
577
579
|
U,
|
|
578
580
|
{
|
|
579
581
|
labelAlign: "middle",
|
|
@@ -588,15 +590,15 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
588
590
|
{
|
|
589
591
|
slots: {
|
|
590
592
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
591
|
-
axisTickLabel: ({ text: h, ownerState:
|
|
592
|
-
const R = n[
|
|
593
|
+
axisTickLabel: ({ text: h, ownerState: S, ...E }) => {
|
|
594
|
+
const R = n[T ?? n.length - 1]?.label;
|
|
593
595
|
return /* @__PURE__ */ e(
|
|
594
596
|
"text",
|
|
595
597
|
{
|
|
596
598
|
...E,
|
|
597
599
|
style: {
|
|
598
600
|
...E.style,
|
|
599
|
-
fontWeight: !
|
|
601
|
+
fontWeight: !u && R === h ? "bold" : 400
|
|
600
602
|
},
|
|
601
603
|
children: h
|
|
602
604
|
}
|
|
@@ -605,13 +607,13 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
605
607
|
},
|
|
606
608
|
sx: (h) => ({
|
|
607
609
|
"& .MuiChartsAxis-line": {
|
|
608
|
-
stroke:
|
|
610
|
+
stroke: I ? "none" : h.palette.text?.primary
|
|
609
611
|
},
|
|
610
612
|
"& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick": {
|
|
611
613
|
display: "none"
|
|
612
614
|
},
|
|
613
615
|
"& .MuiChartsAxis-tickLabel": {
|
|
614
|
-
transform:
|
|
616
|
+
transform: I ? "translateY(15px)" : {}
|
|
615
617
|
}
|
|
616
618
|
}),
|
|
617
619
|
tickLabelStyle: {
|
|
@@ -625,16 +627,16 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
625
627
|
onItemClick: y,
|
|
626
628
|
slots: {
|
|
627
629
|
bar: (h) => {
|
|
628
|
-
const { ownerState:
|
|
630
|
+
const { ownerState: S, ...E } = h;
|
|
629
631
|
return /* @__PURE__ */ e(
|
|
630
632
|
Wt,
|
|
631
633
|
{
|
|
632
634
|
...E,
|
|
633
|
-
colorRange:
|
|
635
|
+
colorRange: O,
|
|
634
636
|
data: n,
|
|
635
|
-
dataIndex:
|
|
636
|
-
removeSelectedTabColorChange:
|
|
637
|
-
selectedTabIndex:
|
|
637
|
+
dataIndex: S.dataIndex,
|
|
638
|
+
removeSelectedTabColorChange: u,
|
|
639
|
+
selectedTabIndex: T ?? n.length - 1,
|
|
638
640
|
style: {
|
|
639
641
|
height: h.height,
|
|
640
642
|
x: h.x,
|
|
@@ -652,7 +654,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
652
654
|
)
|
|
653
655
|
}
|
|
654
656
|
),
|
|
655
|
-
|
|
657
|
+
b && d === "bottom" && N
|
|
656
658
|
] });
|
|
657
659
|
}, Se = ({
|
|
658
660
|
ariaLabel: t,
|
|
@@ -660,37 +662,37 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
660
662
|
beat: n,
|
|
661
663
|
data: i,
|
|
662
664
|
defaultSelectedIndex: o = 0,
|
|
663
|
-
icon:
|
|
664
|
-
isOpen:
|
|
665
|
+
icon: s,
|
|
666
|
+
isOpen: d = !1,
|
|
665
667
|
onClose: g,
|
|
666
|
-
onTabChange:
|
|
667
|
-
tipSection:
|
|
668
|
-
title:
|
|
669
|
-
transactionListProps:
|
|
668
|
+
onTabChange: u,
|
|
669
|
+
tipSection: T,
|
|
670
|
+
title: _,
|
|
671
|
+
transactionListProps: p = {}
|
|
670
672
|
}) => {
|
|
671
|
-
const { common:
|
|
672
|
-
return A ? /* @__PURE__ */ e(It, { ariaLabelClose:
|
|
673
|
+
const { common: C, transactions: c } = z(), { isCopyLoaded: A } = Tt(), { sortedTransactionsWithSplits: f, tags: O } = G();
|
|
674
|
+
return A ? /* @__PURE__ */ e(It, { ariaLabelClose: C.close_aria, isOpen: d, onClose: g, title: _, children: /* @__PURE__ */ e(
|
|
673
675
|
$t,
|
|
674
676
|
{
|
|
675
677
|
ariaLabel: t,
|
|
676
678
|
beat: n,
|
|
677
|
-
chart: (
|
|
679
|
+
chart: (D, w) => /* @__PURE__ */ e(L, { sx: { pt: 16 }, children: /* @__PURE__ */ e(
|
|
678
680
|
Bt,
|
|
679
681
|
{
|
|
680
682
|
...r,
|
|
681
|
-
onBarClick: (
|
|
682
|
-
w(
|
|
683
|
+
onBarClick: (I) => {
|
|
684
|
+
w(I), r.onBarClick?.(I);
|
|
683
685
|
},
|
|
684
|
-
selectedTabIndex:
|
|
686
|
+
selectedTabIndex: D
|
|
685
687
|
}
|
|
686
688
|
) }),
|
|
687
689
|
data: i,
|
|
688
690
|
defaultSelectedIndex: o,
|
|
689
|
-
icon:
|
|
690
|
-
onTabChange:
|
|
691
|
-
tipSection:
|
|
692
|
-
children: () => /* @__PURE__ */
|
|
693
|
-
/* @__PURE__ */
|
|
691
|
+
icon: s,
|
|
692
|
+
onTabChange: u,
|
|
693
|
+
tipSection: T,
|
|
694
|
+
children: () => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
695
|
+
/* @__PURE__ */ a(
|
|
694
696
|
l,
|
|
695
697
|
{
|
|
696
698
|
sx: {
|
|
@@ -705,25 +707,25 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
705
707
|
px: 24
|
|
706
708
|
},
|
|
707
709
|
children: [
|
|
708
|
-
/* @__PURE__ */ e(m, { bold: !0, variant: "body1", children:
|
|
709
|
-
(
|
|
710
|
+
/* @__PURE__ */ e(m, { bold: !0, variant: "body1", children: c.transactions_title }),
|
|
711
|
+
(p?.transaction || f.length > 0) && /* @__PURE__ */ e(
|
|
710
712
|
Y,
|
|
711
713
|
{
|
|
712
714
|
onClick: () => {
|
|
713
715
|
ot(
|
|
714
|
-
|
|
715
|
-
|
|
716
|
+
p?.transaction || f,
|
|
717
|
+
O
|
|
716
718
|
);
|
|
717
719
|
},
|
|
718
720
|
startIcon: /* @__PURE__ */ e(rt, { name: "ios_share" }),
|
|
719
721
|
sx: { height: 28 },
|
|
720
|
-
children: /* @__PURE__ */ e(m, { bold: !0, variant: "body2", children:
|
|
722
|
+
children: /* @__PURE__ */ e(m, { bold: !0, variant: "body2", children: c.export_csv_btn })
|
|
721
723
|
}
|
|
722
724
|
)
|
|
723
725
|
]
|
|
724
726
|
}
|
|
725
727
|
),
|
|
726
|
-
/* @__PURE__ */ e(Ht, { ...
|
|
728
|
+
/* @__PURE__ */ e(Ht, { ...p })
|
|
727
729
|
] })
|
|
728
730
|
}
|
|
729
731
|
) }) : /* @__PURE__ */ e(Z, {});
|
|
@@ -733,20 +735,20 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
733
735
|
count: n,
|
|
734
736
|
completeColor: i = "success.main",
|
|
735
737
|
icon: o,
|
|
736
|
-
label:
|
|
737
|
-
leftLabel:
|
|
738
|
+
label: s,
|
|
739
|
+
leftLabel: d,
|
|
738
740
|
percentComplete: g = 0,
|
|
739
|
-
rightLabel:
|
|
740
|
-
sx:
|
|
741
|
-
}) => /* @__PURE__ */
|
|
742
|
-
/* @__PURE__ */
|
|
741
|
+
rightLabel: u,
|
|
742
|
+
sx: T
|
|
743
|
+
}) => /* @__PURE__ */ a(l, { className: "details-container", sx: { p: 24, width: "100%", gap: 16, ...T }, children: [
|
|
744
|
+
/* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 12 }, children: [
|
|
743
745
|
/* @__PURE__ */ e(L, { children: o }),
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
typeof
|
|
746
|
+
/* @__PURE__ */ a(l, { children: [
|
|
747
|
+
typeof s == "string" ? /* @__PURE__ */ e($, { dangerouslySetInnerHTML: { __html: s }, variant: "body2" }) : s,
|
|
746
748
|
typeof t == "string" ? /* @__PURE__ */ e(et, { children: t }) : t
|
|
747
749
|
] })
|
|
748
750
|
] }),
|
|
749
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ a(l, { sx: { gap: 4 }, children: [
|
|
750
752
|
/* @__PURE__ */ e(
|
|
751
753
|
l,
|
|
752
754
|
{
|
|
@@ -775,9 +777,9 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
775
777
|
)
|
|
776
778
|
}
|
|
777
779
|
),
|
|
778
|
-
!n && /* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */ e(m, { variant: "body2", children:
|
|
780
|
-
/* @__PURE__ */ e(m, { variant: "body2", children:
|
|
780
|
+
!n && /* @__PURE__ */ a(l, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
781
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: d }),
|
|
782
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: u })
|
|
781
783
|
] })
|
|
782
784
|
] })
|
|
783
785
|
] }), De = ({
|
|
@@ -787,7 +789,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
787
789
|
instanceSlot: i = void 0,
|
|
788
790
|
onCtaClick: o = () => {
|
|
789
791
|
}
|
|
790
|
-
}) => /* @__PURE__ */
|
|
792
|
+
}) => /* @__PURE__ */ a(Dt, { sx: { pt: 8, pr: 16, pb: 12, pl: 8, borderRadius: "8px" }, children: [
|
|
791
793
|
/* @__PURE__ */ e(
|
|
792
794
|
l,
|
|
793
795
|
{
|
|
@@ -801,7 +803,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
801
803
|
children: /* @__PURE__ */ e(m, { bold: !0, variant: "body1", children: t })
|
|
802
804
|
}
|
|
803
805
|
),
|
|
804
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ a(
|
|
805
807
|
l,
|
|
806
808
|
{
|
|
807
809
|
sx: {
|
|
@@ -811,7 +813,7 @@ const yt = ({ transaction: t, onClick: r }) => {
|
|
|
811
813
|
justifyContent: "space-between"
|
|
812
814
|
},
|
|
813
815
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ a(l, { children: [
|
|
815
817
|
/* @__PURE__ */ e(l, { sx: { pt: 2, pl: 8, pb: 8 }, children: /* @__PURE__ */ e($, { sx: { fontWeight: 400 }, variant: "subtitle2", children: r }) }),
|
|
816
818
|
/* @__PURE__ */ e(l, { sx: { alignItems: "flex-start" }, children: /* @__PURE__ */ e(
|
|
817
819
|
Y,
|