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