@mx-cartographer/experiences 9.2.4-alpha.al5 → 9.2.5
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 +8 -0
- package/dist/{AccountDetailsDrawer-DVZTB7Dp.mjs → AccountDetailsDrawer-CwDPr4i5.mjs} +5 -5
- package/dist/{AccountDetailsDrawer-DVZTB7Dp.mjs.map → AccountDetailsDrawer-CwDPr4i5.mjs.map} +1 -1
- package/dist/{CategorySelectorDrawer-CWZoNePh.mjs → CategorySelectorDrawer-NJsFsKP1.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-CWZoNePh.mjs.map → CategorySelectorDrawer-NJsFsKP1.mjs.map} +1 -1
- package/dist/{ConnectCard-CVMLPujx.mjs → ConnectCard-D7uxoH5Y.mjs} +2 -2
- package/dist/{ConnectCard-CVMLPujx.mjs.map → ConnectCard-D7uxoH5Y.mjs.map} +1 -1
- package/dist/{ConnectDrawer-L-UwjKiw.mjs → ConnectDrawer-CW4LA3H3.mjs} +2 -2
- package/dist/{ConnectDrawer-L-UwjKiw.mjs.map → ConnectDrawer-CW4LA3H3.mjs.map} +1 -1
- package/dist/{ConnectionsDrawer-B2-IGB21.mjs → ConnectionsDrawer-CZU9ku-k.mjs} +2 -2
- package/dist/{ConnectionsDrawer-B2-IGB21.mjs.map → ConnectionsDrawer-CZU9ku-k.mjs.map} +1 -1
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/{EmbeddedCard-B1xiWlSD.mjs → EmbeddedCard-CQEnrozC.mjs} +2 -2
- package/dist/{EmbeddedCard-B1xiWlSD.mjs.map → EmbeddedCard-CQEnrozC.mjs.map} +1 -1
- package/dist/{ExportCsvAction-BmhxpUxp.mjs → ExportCsvAction-B_8I-Le6.mjs} +2 -2
- package/dist/{ExportCsvAction-BmhxpUxp.mjs.map → ExportCsvAction-B_8I-Le6.mjs.map} +1 -1
- package/dist/GlobalAccountFilter-z4N1ElqC.mjs +208 -0
- package/dist/GlobalAccountFilter-z4N1ElqC.mjs.map +1 -0
- package/dist/{Help-CsyZsI4_.mjs → Help-D4sOpItq.mjs} +2 -2
- package/dist/{Help-CsyZsI4_.mjs.map → Help-D4sOpItq.mjs.map} +1 -1
- package/dist/{ManageIncome-Cy_iopks.mjs → ManageIncome-Br11zvAT.mjs} +5 -5
- package/dist/{ManageIncome-Cy_iopks.mjs.map → ManageIncome-Br11zvAT.mjs.map} +1 -1
- package/dist/{NotificationSettings-C7-S6PC1.mjs → NotificationSettings-CW7okUrk.mjs} +2 -2
- package/dist/{NotificationSettings-C7-S6PC1.mjs.map → NotificationSettings-CW7okUrk.mjs.map} +1 -1
- package/dist/{RecurringSettings-UHjXxW8J.mjs → RecurringSettings-BkRz-uzd.mjs} +2 -2
- package/dist/{RecurringSettings-UHjXxW8J.mjs.map → RecurringSettings-BkRz-uzd.mjs.map} +1 -1
- package/dist/{TransactionDetails-Nuyunc5m.mjs → TransactionDetails-CLc7oeHT.mjs} +106 -106
- package/dist/TransactionDetails-CLc7oeHT.mjs.map +1 -0
- package/dist/{WidgetContainer-By47tuTw.mjs → WidgetContainer-DvKtBdhn.mjs} +3 -3
- package/dist/{WidgetContainer-By47tuTw.mjs.map → WidgetContainer-DvKtBdhn.mjs.map} +1 -1
- package/dist/accounts/index.es.js +5 -5
- package/dist/budgets/index.es.js +7 -7
- package/dist/cashflow/index.es.js +6 -6
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +5 -5
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +3 -3
- package/dist/finstrong/index.es.js +7 -7
- package/dist/goals/index.es.js +3 -3
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +3 -3
- package/dist/investments/index.es.js +3 -3
- package/dist/networth/index.es.js +3 -3
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +9 -9
- package/dist/trends/index.es.js +6 -6
- package/package.json +1 -1
- package/dist/Drawer-BDN1RgiP.mjs +0 -233
- package/dist/Drawer-BDN1RgiP.mjs.map +0 -1
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +0 -230
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +0 -1
- package/dist/TransactionDetails-Nuyunc5m.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import c, { useMemo as ke } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as M } from "mobx-react-lite";
|
|
4
4
|
import Ue from "@mui/material/Alert";
|
|
5
5
|
import Y from "@mui/material/Box";
|
|
6
6
|
import be from "@mui/material/Divider";
|
|
7
7
|
import Ce from "@mui/material/List";
|
|
8
8
|
import ye from "@mui/material/Paper";
|
|
9
9
|
import ze from "@mui/material/Snackbar";
|
|
10
|
-
import
|
|
10
|
+
import w from "@mui/material/Stack";
|
|
11
11
|
import { useTheme as H, alpha as Ie } from "@mui/material/styles";
|
|
12
12
|
import { P as ee, Text as x, H2 as We, MerchantLogo as fe, Toast as Ve, CategoryIcon as Oe, CategoryIconVariants as Ge, TextField as Le, Icon as Te } from "@mxenabled/mxui";
|
|
13
13
|
import { endOfMonth as Be } from "date-fns/endOfMonth";
|
|
@@ -22,8 +22,8 @@ import Xe from "@mui/material/FormGroup";
|
|
|
22
22
|
import de from "@mui/material/IconButton";
|
|
23
23
|
import $e from "@mui/material/TextField";
|
|
24
24
|
import { u as Ne } from "./useAriaLive-MkYebyUR.mjs";
|
|
25
|
-
import { b as Ze, T as Je, u as ne, O as f, c as et, d as tt, E as at, C as nt } from "./EmbeddedCard-
|
|
26
|
-
import { u as
|
|
25
|
+
import { b as Ze, T as Je, u as ne, O as f, c as et, d as tt, E as at, C as nt } from "./EmbeddedCard-CQEnrozC.mjs";
|
|
26
|
+
import { u as O, g as R, o as rt, c as ot, l as we, f as G, a as it, C as st } from "./hooks-97sNJ_lf.mjs";
|
|
27
27
|
import { A as j } from "./Analytics-D-jdcL72.mjs";
|
|
28
28
|
import lt from "@mui/material/ToggleButton";
|
|
29
29
|
import { ChevronRight as Ke, Icon as k, Delete as Ae, Cancel as xe, Search as ct, Edit as dt, Flag as ut } from "@mxenabled/mx-icons";
|
|
@@ -36,10 +36,10 @@ import { BarChart as mt } from "@mui/x-charts";
|
|
|
36
36
|
import { L as _t } from "./Loader-CxeBwuPG.mjs";
|
|
37
37
|
import X from "@mui/material/ListItemButton";
|
|
38
38
|
import Z from "@mui/material/ListItemIcon";
|
|
39
|
-
import { b as Fe } from "./CategorySelectorDrawer-
|
|
39
|
+
import { b as Fe } from "./CategorySelectorDrawer-NJsFsKP1.mjs";
|
|
40
40
|
import { D as ae } from "./Dialog-Bvd2n8hz.mjs";
|
|
41
41
|
import { getUnixTime as gt } from "date-fns/getUnixTime";
|
|
42
|
-
import { D as me } from "./Drawer-
|
|
42
|
+
import { D as me } from "./Drawer-DsnW2o0v.mjs";
|
|
43
43
|
import { b as pt, C as ht, a as yt } from "./CurrencyDialog-DumQCTPO.mjs";
|
|
44
44
|
import Pe from "@mui/material/InputAdornment";
|
|
45
45
|
import Tt from "@mui/material/Checkbox";
|
|
@@ -68,7 +68,7 @@ const ft = [
|
|
|
68
68
|
iconColor: i,
|
|
69
69
|
icon: _
|
|
70
70
|
}) => {
|
|
71
|
-
const { budgets: s } =
|
|
71
|
+
const { budgets: s } = O();
|
|
72
72
|
return /* @__PURE__ */ e(c.Fragment, { children: /* @__PURE__ */ m(
|
|
73
73
|
Y,
|
|
74
74
|
{
|
|
@@ -80,7 +80,7 @@ const ft = [
|
|
|
80
80
|
},
|
|
81
81
|
children: [
|
|
82
82
|
/* @__PURE__ */ m(
|
|
83
|
-
|
|
83
|
+
w,
|
|
84
84
|
{
|
|
85
85
|
sx: {
|
|
86
86
|
alignItems: "center",
|
|
@@ -99,7 +99,7 @@ const ft = [
|
|
|
99
99
|
/* @__PURE__ */ e(
|
|
100
100
|
Ze,
|
|
101
101
|
{
|
|
102
|
-
amount: /* @__PURE__ */ m(
|
|
102
|
+
amount: /* @__PURE__ */ m(w, { sx: { alignItems: "baseline", flexDirection: "row", gap: 4 }, children: [
|
|
103
103
|
/* @__PURE__ */ e(We, { children: V(l, "0,0.00") }),
|
|
104
104
|
/* @__PURE__ */ e(ee, { color: "text.secondary", variant: "body2", children: "/" }),
|
|
105
105
|
/* @__PURE__ */ e(ee, { color: "text.secondary", variant: "body2", children: V(a, "0,0.00") })
|
|
@@ -131,7 +131,7 @@ const ft = [
|
|
|
131
131
|
setCurrencyDialogAction: r,
|
|
132
132
|
renderingToast: o
|
|
133
133
|
}) => {
|
|
134
|
-
const { budgets: i, common: _ } =
|
|
134
|
+
const { budgets: i, common: _ } = O(), { sortedTransactions: s } = R(), d = c.useMemo(() => s.reduce((h, D) => D.parent_guid ? h : h + D.amount, 0), [s]), { remainingAmount: u, spentPercentage: g, iconColor: p } = qe(
|
|
135
135
|
d,
|
|
136
136
|
t.amount ?? 0
|
|
137
137
|
);
|
|
@@ -182,17 +182,17 @@ const ft = [
|
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
);
|
|
185
|
-
}, Nt =
|
|
185
|
+
}, Nt = M(xt);
|
|
186
186
|
var Ee = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.EDIT = "edit", t.DELETE = "delete", t))(Ee || {});
|
|
187
|
-
const It =
|
|
187
|
+
const It = M(({ transaction: t }) => {
|
|
188
188
|
const [n, l] = c.useState(null), [a, r] = c.useState(""), [o, i] = c.useState(!1), _ = c.useRef(!1), [s, d] = c.useState(null), u = H(), {
|
|
189
189
|
addMerchantBudget: g,
|
|
190
190
|
updateMerchantBudget: p,
|
|
191
191
|
deleteMerchantBudget: h,
|
|
192
192
|
getMerchantBudgetByMerchantGuid: D,
|
|
193
|
-
alert:
|
|
193
|
+
alert: L,
|
|
194
194
|
setAlert: K
|
|
195
|
-
} = rt(), { setFilter: P } =
|
|
195
|
+
} = rt(), { setFilter: P } = R(), { accounts: y } = ot(), N = u.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: C, common: J } = O(), { announce: se, ariaLive: le } = Ne(), [te, B] = c.useState(!1), b = t?.merchant_guid ? D(t.merchant_guid) : void 0, F = () => {
|
|
196
196
|
d(n), l(null), r("");
|
|
197
197
|
}, re = () => {
|
|
198
198
|
b ? B(!0) : l(
|
|
@@ -270,8 +270,8 @@ const It = w(({ transaction: t }) => {
|
|
|
270
270
|
}, A = async () => {
|
|
271
271
|
if (_.current) return;
|
|
272
272
|
_.current = !0;
|
|
273
|
-
const { apiTrigger: S, successAlertMessage:
|
|
274
|
-
F(), i(!
|
|
273
|
+
const { apiTrigger: S, successAlertMessage: v, errorAlertMessage: T } = U[n], { isSuccess: E } = await S(), oe = E ? v : T;
|
|
274
|
+
F(), i(!E), K(oe), se(oe), E && n === "delete" && B(!1), _.current = !1;
|
|
275
275
|
};
|
|
276
276
|
c.useEffect(() => {
|
|
277
277
|
const S = {
|
|
@@ -279,8 +279,8 @@ const It = w(({ transaction: t }) => {
|
|
|
279
279
|
end: Be(new Date(t.date * 1e3))
|
|
280
280
|
};
|
|
281
281
|
te && P({
|
|
282
|
-
accounts: y.map((
|
|
283
|
-
custom: te ? (
|
|
282
|
+
accounts: y.map((v) => v.guid),
|
|
283
|
+
custom: te ? (v) => v.merchant_guid === t.merchant_guid : (v) => v.guid === t.guid,
|
|
284
284
|
dateRange: S
|
|
285
285
|
});
|
|
286
286
|
}, [te, t, y]);
|
|
@@ -291,9 +291,9 @@ const It = w(({ transaction: t }) => {
|
|
|
291
291
|
autoHideDuration: 3500,
|
|
292
292
|
closeAriaLabel: J.close_aria,
|
|
293
293
|
handleClose: () => K(""),
|
|
294
|
-
message:
|
|
294
|
+
message: L,
|
|
295
295
|
onActionClick: U[s]?.errorRetryAction,
|
|
296
|
-
open: !!
|
|
296
|
+
open: !!L,
|
|
297
297
|
severity: o ? "error" : "success",
|
|
298
298
|
showAction: o,
|
|
299
299
|
showClose: !0
|
|
@@ -319,7 +319,7 @@ const It = w(({ transaction: t }) => {
|
|
|
319
319
|
isOpen: te,
|
|
320
320
|
merchantBudget: b,
|
|
321
321
|
onClose: () => B(!1),
|
|
322
|
-
renderingToast: () =>
|
|
322
|
+
renderingToast: () => L && $(),
|
|
323
323
|
setCurrencyDialogAction: (S) => {
|
|
324
324
|
S === "edit" && r(b?.amount.toString() || ""), l(S);
|
|
325
325
|
},
|
|
@@ -343,10 +343,10 @@ const It = w(({ transaction: t }) => {
|
|
|
343
343
|
title: U[n].title
|
|
344
344
|
}
|
|
345
345
|
),
|
|
346
|
-
!!
|
|
346
|
+
!!L && $()
|
|
347
347
|
] });
|
|
348
348
|
}), Dt = ({ transaction: t }) => {
|
|
349
|
-
const { addOrUpdateTransactionRule: n, updateTransaction: l } =
|
|
349
|
+
const { addOrUpdateTransactionRule: n, updateTransaction: l } = R(), { categories: a } = we(), { onEvent: r } = G(), { setShouldDisableDrawerScroll: o, updateManualTransaction: i } = ne(), { transactions: _ } = O(), s = H(), [d, u] = c.useState(!1), [g, p] = c.useState(""), h = async (y) => {
|
|
350
350
|
await l({ ...t, category_guid: g }), y && await n(g, t), p(""), r(j.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
351
351
|
transaction_guid: t.guid
|
|
352
352
|
});
|
|
@@ -361,8 +361,8 @@ const It = w(({ transaction: t }) => {
|
|
|
361
361
|
});
|
|
362
362
|
} else
|
|
363
363
|
p(y);
|
|
364
|
-
|
|
365
|
-
},
|
|
364
|
+
L();
|
|
365
|
+
}, L = () => {
|
|
366
366
|
u(!1), o(!1);
|
|
367
367
|
}, K = c.useMemo(
|
|
368
368
|
() => a.find((y) => y.guid === g),
|
|
@@ -401,7 +401,7 @@ const It = w(({ transaction: t }) => {
|
|
|
401
401
|
Fe,
|
|
402
402
|
{
|
|
403
403
|
initialSelected: t.category_guid,
|
|
404
|
-
onClose:
|
|
404
|
+
onClose: L,
|
|
405
405
|
onSelect: D,
|
|
406
406
|
showDrawer: d,
|
|
407
407
|
title: _.actions_select_a_category
|
|
@@ -431,7 +431,7 @@ const It = w(({ transaction: t }) => {
|
|
|
431
431
|
)
|
|
432
432
|
] });
|
|
433
433
|
}, vt = ({ transaction: t }) => {
|
|
434
|
-
const { onEvent: n } = G(), { updateTransaction: l } =
|
|
434
|
+
const { onEvent: n } = G(), { updateTransaction: l } = R(), { updateManualTransaction: a } = ne(), { common: r, transactions: o } = O(), i = H(), [_, s] = c.useState(!1), [d, u] = c.useState(t.date), g = (D) => {
|
|
435
435
|
u(gt(D));
|
|
436
436
|
}, p = async () => {
|
|
437
437
|
if (t.is_manual && !t.guid) {
|
|
@@ -471,7 +471,7 @@ const It = w(({ transaction: t }) => {
|
|
|
471
471
|
primaryText: r.save_button,
|
|
472
472
|
secondaryText: r.cancel_button,
|
|
473
473
|
title: o.date_edit_title,
|
|
474
|
-
children: /* @__PURE__ */ e(
|
|
474
|
+
children: /* @__PURE__ */ e(w, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
475
475
|
ht,
|
|
476
476
|
{
|
|
477
477
|
beginDate: Se(d),
|
|
@@ -488,7 +488,7 @@ const It = w(({ transaction: t }) => {
|
|
|
488
488
|
)
|
|
489
489
|
] });
|
|
490
490
|
}, Et = ({ transaction: t }) => {
|
|
491
|
-
const { onEvent: n } = G(), { removeTransaction: l } =
|
|
491
|
+
const { onEvent: n } = G(), { removeTransaction: l } = R(), { setShouldDisableDrawerScroll: a } = ne(), { common: r, transactions: o } = O(), [i, _] = c.useState(!1), s = async () => {
|
|
492
492
|
await l(t.guid), n(f.ON_TRANSACTION_DELETE_DELETED);
|
|
493
493
|
};
|
|
494
494
|
return /* @__PURE__ */ m(Y, { className: "mx-txn-delete", children: [
|
|
@@ -527,8 +527,8 @@ const It = w(({ transaction: t }) => {
|
|
|
527
527
|
}
|
|
528
528
|
)
|
|
529
529
|
] });
|
|
530
|
-
}, Ot =
|
|
531
|
-
const { onEvent: n } = G(), { updateTransaction: l } =
|
|
530
|
+
}, Ot = M(Et), Lt = ({ transaction: t }) => {
|
|
531
|
+
const { onEvent: n } = G(), { updateTransaction: l } = R(), { setShouldDisableDrawerScroll: a } = ne(), { common: r, transactions: o } = O(), i = H(), [_, s] = c.useState(!1), d = async () => {
|
|
532
532
|
await l({ ...t, merchant_guid: "" }), n(j.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
533
533
|
transaction_guid: t.guid
|
|
534
534
|
});
|
|
@@ -567,8 +567,8 @@ const It = w(({ transaction: t }) => {
|
|
|
567
567
|
}
|
|
568
568
|
)
|
|
569
569
|
] }) });
|
|
570
|
-
}, wt =
|
|
571
|
-
const { onEvent: n } = G(), { setAlert: l, updateTransaction: a } =
|
|
570
|
+
}, wt = M(Lt), Mt = ({ transaction: t }) => {
|
|
571
|
+
const { onEvent: n } = G(), { setAlert: l, updateTransaction: a } = R(), { setShouldDisableDrawerScroll: r } = ne(), { common: o, transactions: i } = O(), _ = H(), [s, d] = c.useState(!1), u = t.is_hidden, g = async () => {
|
|
572
572
|
try {
|
|
573
573
|
await a({ ...t, is_hidden: !t.is_hidden }), n(
|
|
574
574
|
u ? f.ON_TRANSACTION_UNHIDDEN : f.ON_TRANSACTION_HIDDEN
|
|
@@ -636,9 +636,9 @@ const It = w(({ transaction: t }) => {
|
|
|
636
636
|
}
|
|
637
637
|
)
|
|
638
638
|
] }) });
|
|
639
|
-
}, Rt =
|
|
639
|
+
}, Rt = M(Mt), He = ({ transaction: t }) => {
|
|
640
640
|
const { amount: n, description: l, isIncome: a, merchant_guid: r, payee: o, top_level_category_guid: i } = t;
|
|
641
|
-
return /* @__PURE__ */ m(
|
|
641
|
+
return /* @__PURE__ */ m(w, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
642
642
|
/* @__PURE__ */ e(
|
|
643
643
|
fe,
|
|
644
644
|
{
|
|
@@ -647,7 +647,7 @@ const It = w(({ transaction: t }) => {
|
|
|
647
647
|
size: 64
|
|
648
648
|
}
|
|
649
649
|
),
|
|
650
|
-
/* @__PURE__ */ m(
|
|
650
|
+
/* @__PURE__ */ m(w, { overflow: "hidden'", children: [
|
|
651
651
|
/* @__PURE__ */ e(x, { bold: !0, mb: 4, truncate: !0, variant: "body1", children: l || o }),
|
|
652
652
|
/* @__PURE__ */ m(ee, { color: a ? "success.main" : "text.primary", truncate: !0, variant: "h1", children: [
|
|
653
653
|
a ? "+" : "",
|
|
@@ -656,7 +656,7 @@ const It = w(({ transaction: t }) => {
|
|
|
656
656
|
] })
|
|
657
657
|
] });
|
|
658
658
|
}, kt = ({ transaction: t }) => {
|
|
659
|
-
const { onEvent: n } = G(), { updateTransaction: l } =
|
|
659
|
+
const { onEvent: n } = G(), { updateTransaction: l } = R(), { updateManualTransaction: a } = ne(), { common: r, transactions: o } = O(), i = H(), [_, s] = c.useState(!1), [d, u] = c.useState("");
|
|
660
660
|
c.useEffect(() => {
|
|
661
661
|
_ && u(t.memo ? t.memo : "");
|
|
662
662
|
}, [_]);
|
|
@@ -716,19 +716,19 @@ const It = w(({ transaction: t }) => {
|
|
|
716
716
|
}
|
|
717
717
|
)
|
|
718
718
|
] });
|
|
719
|
-
}, Pt =
|
|
719
|
+
}, Pt = M(kt), Gt = ({
|
|
720
720
|
index: t,
|
|
721
721
|
onDeleteRow: n,
|
|
722
722
|
onCategoryChanged: l,
|
|
723
723
|
onUpdateAmount: a,
|
|
724
724
|
split: r
|
|
725
725
|
}) => {
|
|
726
|
-
const { onEvent: o } = G(), { transactions: i } =
|
|
726
|
+
const { onEvent: o } = G(), { transactions: i } = O(), [_, s] = c.useState(`${r.amount}`), [d, u] = c.useState(!1), g = t === 0, p = (h) => {
|
|
727
727
|
isNaN(Number(h)) || (s(h), a(t, Number(h)));
|
|
728
728
|
};
|
|
729
729
|
return /* @__PURE__ */ m(Y, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
730
730
|
/* @__PURE__ */ m(De, { alignItems: g ? "center" : "start", container: !0, children: [
|
|
731
|
-
/* @__PURE__ */ e(De, { size: 7, children: /* @__PURE__ */ m(
|
|
731
|
+
/* @__PURE__ */ e(De, { size: 7, children: /* @__PURE__ */ m(w, { alignItems: "start", children: [
|
|
732
732
|
/* @__PURE__ */ e(
|
|
733
733
|
ue,
|
|
734
734
|
{
|
|
@@ -739,13 +739,13 @@ const It = w(({ transaction: t }) => {
|
|
|
739
739
|
children: r.category
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
/* @__PURE__ */ e(Y, { children: !r.category_guid && /* @__PURE__ */ m(
|
|
742
|
+
/* @__PURE__ */ e(Y, { children: !r.category_guid && /* @__PURE__ */ m(w, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
|
|
743
743
|
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(xe, { sx: { fontSize: 15 } }) }),
|
|
744
744
|
/* @__PURE__ */ e(x, { variant: "body2", children: i.split_transaction_errors_select_category })
|
|
745
745
|
] }) })
|
|
746
746
|
] }) }),
|
|
747
|
-
/* @__PURE__ */ e(De, { size: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(x, { children: V(r.amount, "0,0.00") }) }) : /* @__PURE__ */ m(
|
|
748
|
-
/* @__PURE__ */ m(
|
|
747
|
+
/* @__PURE__ */ e(De, { size: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(x, { children: V(r.amount, "0,0.00") }) }) : /* @__PURE__ */ m(w, { alignItems: "start", children: [
|
|
748
|
+
/* @__PURE__ */ m(w, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
749
749
|
/* @__PURE__ */ e(
|
|
750
750
|
bt,
|
|
751
751
|
{
|
|
@@ -774,7 +774,7 @@ const It = w(({ transaction: t }) => {
|
|
|
774
774
|
}
|
|
775
775
|
)
|
|
776
776
|
] }),
|
|
777
|
-
!_ && /* @__PURE__ */ m(
|
|
777
|
+
!_ && /* @__PURE__ */ m(w, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
|
|
778
778
|
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(xe, { sx: { fontSize: 15 } }) }),
|
|
779
779
|
/* @__PURE__ */ e(x, { variant: "body2", children: i.split_transaction_errors_enter_an_amount })
|
|
780
780
|
] })
|
|
@@ -793,7 +793,7 @@ const It = w(({ transaction: t }) => {
|
|
|
793
793
|
}
|
|
794
794
|
)
|
|
795
795
|
] });
|
|
796
|
-
}, Bt =
|
|
796
|
+
}, Bt = M(Gt), $t = ({
|
|
797
797
|
onAddSplit: t,
|
|
798
798
|
onCategoryChanged: n,
|
|
799
799
|
onDeleteSplit: l,
|
|
@@ -801,7 +801,7 @@ const It = w(({ transaction: t }) => {
|
|
|
801
801
|
splits: r,
|
|
802
802
|
transaction: o
|
|
803
803
|
}) => {
|
|
804
|
-
const { transactions: i } =
|
|
804
|
+
const { transactions: i } = O(), { onEvent: _ } = G(), [s, d] = c.useState(""), { announce: u, ariaLive: g } = Ne();
|
|
805
805
|
return c.useEffect(() => {
|
|
806
806
|
if (r.length <= 1)
|
|
807
807
|
d(i.split_transaction_errors_min_splits), u(i.split_transaction_errors_min_splits);
|
|
@@ -826,7 +826,7 @@ const It = w(({ transaction: t }) => {
|
|
|
826
826
|
},
|
|
827
827
|
h
|
|
828
828
|
)),
|
|
829
|
-
s && /* @__PURE__ */ m(
|
|
829
|
+
s && /* @__PURE__ */ m(w, { bgcolor: "background.paper", color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
830
830
|
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(xe, { sx: { fontSize: 15 } }) }),
|
|
831
831
|
/* @__PURE__ */ e(x, { variant: "body2", children: s })
|
|
832
832
|
] }),
|
|
@@ -841,8 +841,8 @@ const It = w(({ transaction: t }) => {
|
|
|
841
841
|
}
|
|
842
842
|
) })
|
|
843
843
|
] });
|
|
844
|
-
}, Kt =
|
|
845
|
-
const { onEvent: n } = G(), { announce: l, ariaLive: a } = Ne(), { splitTransaction: r, unSplitTransaction: o, transactionSplitting: i } =
|
|
844
|
+
}, Kt = M($t), Ft = ({ transaction: t }) => {
|
|
845
|
+
const { onEvent: n } = G(), { announce: l, ariaLive: a } = Ne(), { splitTransaction: r, unSplitTransaction: o, transactionSplitting: i } = R(), { common: _, transactions: s } = O(), { setShouldDisableDrawerScroll: d } = ne(), { categories: u } = we(), g = H(), p = {
|
|
846
846
|
...t,
|
|
847
847
|
amount: t.amount - 1,
|
|
848
848
|
guid: "",
|
|
@@ -857,7 +857,7 @@ const It = w(({ transaction: t }) => {
|
|
|
857
857
|
has_been_split: !1,
|
|
858
858
|
parent_guid: t.guid,
|
|
859
859
|
top_level_category_guid: void 0
|
|
860
|
-
}, [D,
|
|
860
|
+
}, [D, L] = c.useState(!1), [K, P] = c.useState(!1), [y, N] = c.useState([]), C = () => {
|
|
861
861
|
const A = [...y];
|
|
862
862
|
A.push({ ...h }), A[0].amount -= 1, N(A), l(
|
|
863
863
|
I(
|
|
@@ -875,20 +875,20 @@ const It = w(({ transaction: t }) => {
|
|
|
875
875
|
}, se = (A, $) => {
|
|
876
876
|
const S = [...y];
|
|
877
877
|
S[A].amount = $, S[0].amount = t.amount - S.reduce(
|
|
878
|
-
(
|
|
878
|
+
(v, T, E) => v + (E !== 0 ? T.amount : 0),
|
|
879
879
|
0
|
|
880
880
|
), N(S);
|
|
881
881
|
}, le = (A, $) => {
|
|
882
|
-
const S = [...y],
|
|
883
|
-
|
|
882
|
+
const S = [...y], v = u.find((T) => T.guid === $);
|
|
883
|
+
v && (S[A] = {
|
|
884
884
|
...S[A],
|
|
885
885
|
category_guid: $,
|
|
886
|
-
category:
|
|
887
|
-
top_level_category_guid:
|
|
886
|
+
category: v.name,
|
|
887
|
+
top_level_category_guid: v.parent_guid || $
|
|
888
888
|
}, N(S), l(
|
|
889
889
|
I(
|
|
890
890
|
s.split_transaction_select_category_announcement,
|
|
891
|
-
|
|
891
|
+
v.name,
|
|
892
892
|
A + 1
|
|
893
893
|
)
|
|
894
894
|
));
|
|
@@ -899,11 +899,11 @@ const It = w(({ transaction: t }) => {
|
|
|
899
899
|
}
|
|
900
900
|
N([{ ...p }, { ...h }]), n(j.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
901
901
|
transaction_guid: t.guid
|
|
902
|
-
}),
|
|
902
|
+
}), L(!0);
|
|
903
903
|
}, B = async () => {
|
|
904
|
-
n(f.ON_TRANSACTION_SPLIT_SAVE_CLICK), await r({ ...t, has_been_split: !0 }, y),
|
|
904
|
+
n(f.ON_TRANSACTION_SPLIT_SAVE_CLICK), await r({ ...t, has_been_split: !0 }, y), L(!1);
|
|
905
905
|
}, b = async () => {
|
|
906
|
-
i || (n(f.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...p }, { ...h }]),
|
|
906
|
+
i || (n(f.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...p }, { ...h }]), L(!1));
|
|
907
907
|
}, F = async () => {
|
|
908
908
|
n(j.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
909
909
|
transaction_guid: t.guid
|
|
@@ -911,8 +911,8 @@ const It = w(({ transaction: t }) => {
|
|
|
911
911
|
const A = t.parent_guid ?? t.guid;
|
|
912
912
|
await o(A);
|
|
913
913
|
}, re = c.useMemo(() => {
|
|
914
|
-
const A = y.some((
|
|
915
|
-
return A ||
|
|
914
|
+
const A = y.length <= 1, $ = y.some((v) => !v.category_guid), S = y.some((v) => v.amount <= 0);
|
|
915
|
+
return A || $ || S;
|
|
916
916
|
}, [y]), U = g.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
917
917
|
return /* @__PURE__ */ e(c.Fragment, { children: t && /* @__PURE__ */ m(z, { disableGutters: !0, disablePadding: !0, children: [
|
|
918
918
|
/* @__PURE__ */ m(X, { onClick: te, children: [
|
|
@@ -975,8 +975,8 @@ const It = w(({ transaction: t }) => {
|
|
|
975
975
|
}
|
|
976
976
|
)
|
|
977
977
|
] }) });
|
|
978
|
-
}, Ht =
|
|
979
|
-
const t = H(), { onEvent: n } = G(), { addTag: l } =
|
|
978
|
+
}, Ht = M(Ft), Ut = () => {
|
|
979
|
+
const t = H(), { onEvent: n } = G(), { addTag: l } = R(), { transactions: a } = O(), [r, o] = c.useState(!1), [i, _] = c.useState(""), [s, d] = c.useState(""), u = c.useRef(null);
|
|
980
980
|
c.useEffect(() => {
|
|
981
981
|
r && u?.current?.focus();
|
|
982
982
|
}, [r]);
|
|
@@ -991,7 +991,7 @@ const It = w(({ transaction: t }) => {
|
|
|
991
991
|
d(i.length > 40 ? a.tags_error_name_must_be_40_chars : "");
|
|
992
992
|
}, [i]), /* @__PURE__ */ m(Y, { className: "mx-txn-tag-manager-header", children: [
|
|
993
993
|
/* @__PURE__ */ m(
|
|
994
|
-
|
|
994
|
+
w,
|
|
995
995
|
{
|
|
996
996
|
alignItems: "center",
|
|
997
997
|
bgcolor: t.palette.background.default,
|
|
@@ -1038,8 +1038,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
)
|
|
1040
1040
|
] });
|
|
1041
|
-
}, zt =
|
|
1042
|
-
const { common: l, transactions: a } =
|
|
1041
|
+
}, zt = M(Ut), Wt = ({ onSearchValueChanged: t, searchValue: n }) => {
|
|
1042
|
+
const { common: l, transactions: a } = O(), r = /* @__PURE__ */ e(
|
|
1043
1043
|
de,
|
|
1044
1044
|
{
|
|
1045
1045
|
"aria-label": a.tags_cancel_search || "Search",
|
|
@@ -1064,14 +1064,14 @@ const It = w(({ transaction: t }) => {
|
|
|
1064
1064
|
value: n
|
|
1065
1065
|
}
|
|
1066
1066
|
) });
|
|
1067
|
-
}, Vt =
|
|
1068
|
-
const { onEvent: a } = G(), { removeTag: r, updateTag: o } =
|
|
1067
|
+
}, Vt = M(Wt), Yt = ({ onTagChecked: t, selectedTags: n, tag: l }) => {
|
|
1068
|
+
const { onEvent: a } = G(), { removeTag: r, updateTag: o } = R(), { common: i, transactions: _ } = O(), [s, d] = c.useState(!1), [u, g] = c.useState(!1), [p, h] = c.useState(""), [D, L] = c.useState(""), K = async () => {
|
|
1069
1069
|
a(f.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), l && await o({ ...l, name: p }), d(!1);
|
|
1070
1070
|
}, P = async () => {
|
|
1071
1071
|
a(f.ON_TRANSACTION_TAGS_TAG_DELETED), await r(l.guid), g(!1);
|
|
1072
1072
|
};
|
|
1073
1073
|
c.useEffect(() => {
|
|
1074
|
-
|
|
1074
|
+
L(p.length > 40 ? _.tags_error_name_must_be_40_chars : "");
|
|
1075
1075
|
}, [p]);
|
|
1076
1076
|
const y = () => {
|
|
1077
1077
|
a(f.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), h(l.name), d(!0);
|
|
@@ -1084,7 +1084,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1084
1084
|
className: "mx-txn-transaction-manager-row",
|
|
1085
1085
|
disableGutters: !0,
|
|
1086
1086
|
disablePadding: !0,
|
|
1087
|
-
secondaryAction: !l.is_default_tag && /* @__PURE__ */ m(
|
|
1087
|
+
secondaryAction: !l.is_default_tag && /* @__PURE__ */ m(w, { direction: "row", children: [
|
|
1088
1088
|
/* @__PURE__ */ e(
|
|
1089
1089
|
de,
|
|
1090
1090
|
{
|
|
@@ -1166,8 +1166,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1166
1166
|
]
|
|
1167
1167
|
}
|
|
1168
1168
|
);
|
|
1169
|
-
}, jt =
|
|
1170
|
-
const { tags: l } =
|
|
1169
|
+
}, jt = M(Yt), qt = ({ selectedTags: t, onTagChecked: n }) => {
|
|
1170
|
+
const { tags: l } = R(), [a, r] = c.useState(""), o = l.filter(
|
|
1171
1171
|
(i) => i.name.toLowerCase().includes(a.toLowerCase())
|
|
1172
1172
|
);
|
|
1173
1173
|
return /* @__PURE__ */ m("div", { className: "mx-txn-tag-manager", children: [
|
|
@@ -1184,8 +1184,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1184
1184
|
/* @__PURE__ */ e(be, { sx: { ml: 24 } })
|
|
1185
1185
|
] }, i.guid)) }) })
|
|
1186
1186
|
] });
|
|
1187
|
-
}, Qt =
|
|
1188
|
-
const { onEvent: n } = G(), { tags: l, updateTaggings: a, updateTransaction: r } =
|
|
1187
|
+
}, Qt = M(qt), Xt = ({ transaction: t }) => {
|
|
1188
|
+
const { onEvent: n } = G(), { tags: l, updateTaggings: a, updateTransaction: r } = R(), { common: o, transactions: i } = O(), { updateManualTransaction: _ } = ne(), s = H(), [d, u] = c.useState(!1), [g, p] = c.useState(t.tags);
|
|
1189
1189
|
c.useEffect(() => {
|
|
1190
1190
|
p(t.tags);
|
|
1191
1191
|
}, [d, t]);
|
|
@@ -1198,7 +1198,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
1200
1200
|
await a(g, t.guid), await r({ ...t, tags: g }), n(j.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
|
|
1201
|
-
},
|
|
1201
|
+
}, L = c.useMemo(
|
|
1202
1202
|
() => t.tags.map(
|
|
1203
1203
|
(P, y, N) => `${l.find((C) => C.guid === P)?.name}${y < N.length - 1 ? " / " : ""}`
|
|
1204
1204
|
),
|
|
@@ -1217,7 +1217,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1217
1217
|
W,
|
|
1218
1218
|
{
|
|
1219
1219
|
primary: i.tags_title,
|
|
1220
|
-
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.tags?.length > 0 ?
|
|
1220
|
+
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.tags?.length > 0 ? L : i.tags_desc }),
|
|
1221
1221
|
slotProps: { primary: { variant: "caption", fontSize: 11, fontWeight: "normal" } }
|
|
1222
1222
|
}
|
|
1223
1223
|
),
|
|
@@ -1239,8 +1239,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
)
|
|
1241
1241
|
] });
|
|
1242
|
-
}, Zt =
|
|
1243
|
-
const { updateTransaction: l } =
|
|
1242
|
+
}, Zt = M(Xt), Jt = ({ transaction: t, viewOnly: n = !1 }) => {
|
|
1243
|
+
const { updateTransaction: l } = R(), { common: a, transactions: r } = O(), { onEvent: o } = G(), { announce: i, ariaLive: _ } = Ne(), [s, d] = c.useState(!1), [u, g] = c.useState(""), p = c.useRef(null);
|
|
1244
1244
|
c.useEffect(() => {
|
|
1245
1245
|
s && (g(t.description), p?.current?.focus());
|
|
1246
1246
|
}, [s]);
|
|
@@ -1261,7 +1261,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1261
1261
|
id: "transaction-description-input",
|
|
1262
1262
|
label: r.payee_title,
|
|
1263
1263
|
name: r.payee_title,
|
|
1264
|
-
onChange: (
|
|
1264
|
+
onChange: (L) => g(L.target.value),
|
|
1265
1265
|
ref: p,
|
|
1266
1266
|
slotProps: { htmlInput: { maxLength: 140 } },
|
|
1267
1267
|
sx: {
|
|
@@ -1286,7 +1286,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1286
1286
|
children: a.save_button
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
1289
|
-
] }) : /* @__PURE__ */ m(
|
|
1289
|
+
] }) : /* @__PURE__ */ m(w, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1290
1290
|
/* @__PURE__ */ e(x, { bold: !0, children: t.description }),
|
|
1291
1291
|
!n && /* @__PURE__ */ e(
|
|
1292
1292
|
de,
|
|
@@ -1300,8 +1300,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1300
1300
|
)
|
|
1301
1301
|
] })
|
|
1302
1302
|
] });
|
|
1303
|
-
}, ea =
|
|
1304
|
-
const { updateTransaction: n } =
|
|
1303
|
+
}, ea = M(Jt), ta = ({ transaction: t }) => {
|
|
1304
|
+
const { updateTransaction: n } = R(), { transactions: l } = O(), { onEvent: a } = G(), r = H(), o = r.palette.mode === "dark", i = async () => {
|
|
1305
1305
|
a(j.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await n({ ...t, is_flagged: !t.is_flagged });
|
|
1306
1306
|
};
|
|
1307
1307
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
@@ -1332,7 +1332,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1332
1332
|
children: /* @__PURE__ */ e(ut, { color: "inherit" })
|
|
1333
1333
|
}
|
|
1334
1334
|
) });
|
|
1335
|
-
}, aa =
|
|
1335
|
+
}, aa = M(ta), he = (t, n, l, a = !0, r = "inset") => a ? /* @__PURE__ */ m(c.Fragment, { children: [
|
|
1336
1336
|
/* @__PURE__ */ m(z, { disableGutters: !0, disablePadding: !0, children: [
|
|
1337
1337
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(q, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: t }) }),
|
|
1338
1338
|
/* @__PURE__ */ e(
|
|
@@ -1346,7 +1346,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1346
1346
|
] }),
|
|
1347
1347
|
/* @__PURE__ */ e(be, { variant: r })
|
|
1348
1348
|
] }) : null, na = ({ transaction: t }) => {
|
|
1349
|
-
const { transactions: n } =
|
|
1349
|
+
const { transactions: n } = O(), { tags: l } = R(), a = c.useMemo(() => {
|
|
1350
1350
|
const r = new Map(l.map((o) => [o.guid, o.name]));
|
|
1351
1351
|
return t.tags.map((o) => r.get(o)).filter(Boolean).join(" / ");
|
|
1352
1352
|
}, [l, t.tags]);
|
|
@@ -1384,7 +1384,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1384
1384
|
"fullWidth"
|
|
1385
1385
|
)
|
|
1386
1386
|
] });
|
|
1387
|
-
}, ra =
|
|
1387
|
+
}, ra = M(na), oa = ({
|
|
1388
1388
|
data: t,
|
|
1389
1389
|
color: n,
|
|
1390
1390
|
width: l = 85,
|
|
@@ -1412,7 +1412,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1412
1412
|
return `M${u},0 L${s - u},0 Q${s},0 ${s},${u} L${s},${d} L0,${d} L0,${u} Q0,0 ${u},0 Z`;
|
|
1413
1413
|
};
|
|
1414
1414
|
return /* @__PURE__ */ e(
|
|
1415
|
-
|
|
1415
|
+
w,
|
|
1416
1416
|
{
|
|
1417
1417
|
sx: {
|
|
1418
1418
|
width: l,
|
|
@@ -1504,14 +1504,14 @@ const It = w(({ transaction: t }) => {
|
|
|
1504
1504
|
topActions: l = ft,
|
|
1505
1505
|
transaction: a
|
|
1506
1506
|
}) => {
|
|
1507
|
-
const { onEvent: r } = G(), { isCopyLoaded: o } = it(), { userFeatures: i } = st(), { accounts: _, common: s, insights_feed: d } =
|
|
1507
|
+
const { onEvent: r } = G(), { isCopyLoaded: o } = it(), { userFeatures: i } = st(), { accounts: _, common: s, insights_feed: d } = O(), { detailedCategories: u } = we(), {
|
|
1508
1508
|
alert: g,
|
|
1509
1509
|
associatedBeats: p,
|
|
1510
1510
|
detailedTransactions: h,
|
|
1511
1511
|
cachedStartDate: D,
|
|
1512
|
-
loadEmbeddedInstanceTransactions:
|
|
1512
|
+
loadEmbeddedInstanceTransactions: L,
|
|
1513
1513
|
setAlert: K
|
|
1514
|
-
} =
|
|
1514
|
+
} = R(), [P, y] = c.useState(!1), [N, C] = c.useState(!1), [J, se] = c.useState(!1), le = H(), te = a?.number && a.number.length > 4, B = c.useMemo(() => p.find((T) => T.associated_transaction_guid === a.guid), [p, a]), b = sa(s, B), [F, re] = c.useState(
|
|
1515
1515
|
b ? b.dataSeries.length - 1 : 0
|
|
1516
1516
|
);
|
|
1517
1517
|
c.useEffect(
|
|
@@ -1519,8 +1519,8 @@ const It = w(({ transaction: t }) => {
|
|
|
1519
1519
|
[]
|
|
1520
1520
|
), c.useEffect(() => {
|
|
1521
1521
|
if (!b || b.dataSeries.length === 0) return;
|
|
1522
|
-
const { date: T } = b.dataSeries[F],
|
|
1523
|
-
Ye(
|
|
1522
|
+
const { date: T } = b.dataSeries[F], E = ve(T);
|
|
1523
|
+
Ye(E, D) && (C(!0), L(E).finally(() => {
|
|
1524
1524
|
C(!1);
|
|
1525
1525
|
}));
|
|
1526
1526
|
}, [F, b, D]);
|
|
@@ -1528,17 +1528,17 @@ const It = w(({ transaction: t }) => {
|
|
|
1528
1528
|
if (b) {
|
|
1529
1529
|
const T = u.find(
|
|
1530
1530
|
(pe) => pe.guid === a.top_level_category_guid
|
|
1531
|
-
),
|
|
1531
|
+
), E = B?.payload?.average_amount ?? 0, oe = a.amount;
|
|
1532
1532
|
let _e = d.general.increased_text;
|
|
1533
|
-
oe -
|
|
1534
|
-
const ge =
|
|
1533
|
+
oe - E < 0 && (_e = d.general.decreased_text);
|
|
1534
|
+
const ge = E === 0 ? 0 : Math.round(Math.abs(oe - E) / E * 100);
|
|
1535
1535
|
return { category: T, percentageAmount: ge, changetype: _e };
|
|
1536
1536
|
}
|
|
1537
1537
|
return null;
|
|
1538
1538
|
}, [b, u]), $ = ke(() => {
|
|
1539
1539
|
if (!b?.dataSeries?.length)
|
|
1540
1540
|
return [];
|
|
1541
|
-
const { guid: T, date:
|
|
1541
|
+
const { guid: T, date: E } = b.dataSeries[F], oe = ve(E), _e = Be(E);
|
|
1542
1542
|
return h.filter((ge) => {
|
|
1543
1543
|
const pe = Se(ge.date);
|
|
1544
1544
|
return pe >= oe && pe <= _e && ge.guid === T;
|
|
@@ -1546,10 +1546,10 @@ const It = w(({ transaction: t }) => {
|
|
|
1546
1546
|
}, [F, b, h, N]);
|
|
1547
1547
|
if (!o)
|
|
1548
1548
|
return /* @__PURE__ */ e(_t, {});
|
|
1549
|
-
const S = Qe(i, "MX_TXN_DETAILS_VIEW_ONLY"),
|
|
1549
|
+
const S = Qe(i, "MX_TXN_DETAILS_VIEW_ONLY"), v = le.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1550
1550
|
return /* @__PURE__ */ m(Y, { className: "mx-txn-transaction-details", width: "100%", children: [
|
|
1551
|
-
a && /* @__PURE__ */ m(
|
|
1552
|
-
/* @__PURE__ */ m(
|
|
1551
|
+
a && /* @__PURE__ */ m(w, { children: [
|
|
1552
|
+
/* @__PURE__ */ m(w, { gap: 12, p: 24, children: [
|
|
1553
1553
|
/* @__PURE__ */ e(ye, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1554
1554
|
fe,
|
|
1555
1555
|
{
|
|
@@ -1559,7 +1559,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1559
1559
|
}
|
|
1560
1560
|
) }),
|
|
1561
1561
|
/* @__PURE__ */ e(ea, { transaction: a, viewOnly: S }),
|
|
1562
|
-
/* @__PURE__ */ m(
|
|
1562
|
+
/* @__PURE__ */ m(w, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1563
1563
|
/* @__PURE__ */ m(ee, { color: a.isIncome ? "success.main" : "text.primary", variant: "h1", children: [
|
|
1564
1564
|
a.isIncome ? "+" : "",
|
|
1565
1565
|
V(a.amount, "0,0.00")
|
|
@@ -1582,13 +1582,13 @@ const It = w(({ transaction: t }) => {
|
|
|
1582
1582
|
title: B.html_micro_title
|
|
1583
1583
|
}
|
|
1584
1584
|
),
|
|
1585
|
-
/* @__PURE__ */ m(
|
|
1585
|
+
/* @__PURE__ */ m(w, { sx: { bgcolor: v, borderRadius: "4px", gap: 4, p: 8 }, children: [
|
|
1586
1586
|
/* @__PURE__ */ e(x, { bold: !0, children: `${a.account}
|
|
1587
1587
|
${te ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
|
|
1588
1588
|
/* @__PURE__ */ e(x, { bold: !0, truncate: !0, variant: "tiny", children: a.feed_description })
|
|
1589
1589
|
] })
|
|
1590
1590
|
] }),
|
|
1591
|
-
/* @__PURE__ */ e(ye, { square: !0, sx: { boxShadow: "none" }, children: S ? /* @__PURE__ */ e(ra, { transaction: a }) : /* @__PURE__ */ e(Ce, { children: l.map((T,
|
|
1591
|
+
/* @__PURE__ */ e(ye, { square: !0, sx: { boxShadow: "none" }, children: S ? /* @__PURE__ */ e(ra, { transaction: a }) : /* @__PURE__ */ e(Ce, { children: l.map((T, E) => /* @__PURE__ */ m(c.Fragment, { children: [
|
|
1592
1592
|
T === ce.Category && /* @__PURE__ */ e(Dt, { transaction: a }),
|
|
1593
1593
|
T === ce.Date && /* @__PURE__ */ e(vt, { transaction: a }),
|
|
1594
1594
|
T === ce.Memo && /* @__PURE__ */ e(Pt, { transaction: a }),
|
|
@@ -1597,14 +1597,14 @@ const It = w(({ transaction: t }) => {
|
|
|
1597
1597
|
be,
|
|
1598
1598
|
{
|
|
1599
1599
|
component: "li",
|
|
1600
|
-
variant:
|
|
1600
|
+
variant: E < l.length - 1 ? "inset" : "fullWidth"
|
|
1601
1601
|
}
|
|
1602
1602
|
)
|
|
1603
1603
|
] }, T)) }) }),
|
|
1604
1604
|
!S && U.length > 0 && /* @__PURE__ */ m(c.Fragment, { children: [
|
|
1605
1605
|
/* @__PURE__ */ e(x, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: _.actions }),
|
|
1606
1606
|
/* @__PURE__ */ e(ye, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ m(Ce, { children: [
|
|
1607
|
-
U.map((T,
|
|
1607
|
+
U.map((T, E) => /* @__PURE__ */ m(c.Fragment, { children: [
|
|
1608
1608
|
T === ie.MerchantBudget && /* @__PURE__ */ e(It, { transaction: a }),
|
|
1609
1609
|
T === ie.SplitTransaction && /* @__PURE__ */ e(Ht, { transaction: a }),
|
|
1610
1610
|
T === ie.HideTransaction && /* @__PURE__ */ e(Rt, { transaction: a }),
|
|
@@ -1613,7 +1613,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1613
1613
|
be,
|
|
1614
1614
|
{
|
|
1615
1615
|
component: "li",
|
|
1616
|
-
variant:
|
|
1616
|
+
variant: E < U.length - 1 ? "inset" : "fullWidth"
|
|
1617
1617
|
}
|
|
1618
1618
|
)
|
|
1619
1619
|
] }, T)),
|
|
@@ -1696,7 +1696,7 @@ const It = w(({ transaction: t }) => {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
)
|
|
1698
1698
|
] });
|
|
1699
|
-
}, nn =
|
|
1699
|
+
}, nn = M(la);
|
|
1700
1700
|
export {
|
|
1701
1701
|
ie as B,
|
|
1702
1702
|
Dt as C,
|
|
@@ -1707,4 +1707,4 @@ export {
|
|
|
1707
1707
|
ce as b,
|
|
1708
1708
|
At as c
|
|
1709
1709
|
};
|
|
1710
|
-
//# sourceMappingURL=TransactionDetails-
|
|
1710
|
+
//# sourceMappingURL=TransactionDetails-CLc7oeHT.mjs.map
|