@mx-cartographer/experiences 7.2.15-alpha.sms3 → 7.2.16-alpha.mm0
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/dist/{AccountDetailsContent-Vj4LO6cx.mjs → AccountDetailsContent-CsH1w_GZ.mjs} +1 -1
- package/dist/{ManageIncome-B9yGuahc.mjs → ManageIncome-CV-bGuR-.mjs} +1 -1
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-5i3IywCi.mjs} +238 -236
- package/dist/{RecurringSettings-D9GFcsXV.mjs → RecurringSettings-G6_BbsIF.mjs} +1 -1
- package/dist/{TransactionDetails-BqCr2FTh.mjs → TransactionDetails-CDtya0KS.mjs} +42 -42
- package/dist/{TransactionStore-Dx8hFybD.mjs → TransactionStore-DxPLdF3B.mjs} +57 -57
- package/dist/accounts/index.es.js +118 -116
- package/dist/budgets/index.es.js +501 -499
- package/dist/cashflow/index.es.js +383 -381
- package/dist/common/index.es.js +2 -2
- package/dist/debts/index.es.js +377 -375
- package/dist/finstrong/index.es.js +417 -415
- package/dist/goals/index.es.js +559 -557
- package/dist/investments/index.es.js +436 -434
- package/dist/networth/index.es.js +173 -171
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +174 -172
- package/dist/settings/index.es.js +284 -278
- package/dist/spending/index.es.js +282 -280
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +2 -2
- package/dist/transactions/index.es.js +4 -4
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import b from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
8
|
import R from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-CV-bGuR-.mjs";
|
|
11
11
|
import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
|
|
12
12
|
import { R as y, F as N } from "./RecurringTransactions-ej39mgA6.mjs";
|
|
13
13
|
import { A as m } from "./WidgetContainer-EbrN1oIo.mjs";
|
|
@@ -218,7 +218,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
218
218
|
]
|
|
219
219
|
}
|
|
220
220
|
) }) });
|
|
221
|
-
},
|
|
221
|
+
}, Ra = b(ut), mt = ({ transaction: t }) => {
|
|
222
222
|
const { addOrUpdateTransactionRule: r, updateTransaction: a } = v(), { categories: s } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: n, updateManualTransaction: c } = G(), { transactions: d } = A(), [i, u] = _.useState(!1), [m, g] = _.useState(""), p = async (C) => {
|
|
223
223
|
await a({ ...t, category_guid: m }), C && await r(m, t), g(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
224
224
|
transaction_guid: t.guid
|
|
@@ -360,7 +360,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
360
360
|
}
|
|
361
361
|
)
|
|
362
362
|
] });
|
|
363
|
-
}, pt =
|
|
363
|
+
}, pt = ({ transaction: t }) => {
|
|
364
364
|
const { onEvent: r } = L(), { removeTransaction: a } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: n } = A(), [c, d] = _.useState(!1), i = async () => {
|
|
365
365
|
await a(t.guid), r(h.ON_TRANSACTION_DELETE_DELETED);
|
|
366
366
|
};
|
|
@@ -400,7 +400,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
400
400
|
}
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
|
-
},
|
|
403
|
+
}, ht = b(pt), Tt = ({ transaction: t }) => {
|
|
404
404
|
const { onEvent: r } = L(), { updateTransaction: a } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: n } = A(), [c, d] = _.useState(!1), i = async () => {
|
|
405
405
|
await a({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
406
406
|
transaction_guid: t.guid
|
|
@@ -440,7 +440,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] });
|
|
443
|
-
},
|
|
443
|
+
}, yt = b(Tt), St = ({ transaction: t }) => {
|
|
444
444
|
const { onEvent: r } = L(), { updateTransaction: a } = v(), { setShouldDisableDrawerScroll: s } = G(), { common: o, transactions: n } = A(), [c, d] = _.useState(!1), i = t.is_hidden, u = async () => {
|
|
445
445
|
await a({ ...t, is_hidden: !t.is_hidden }), r(
|
|
446
446
|
i ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
|
|
@@ -510,7 +510,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] });
|
|
513
|
-
},
|
|
513
|
+
}, Ct = b(St), Le = ({ transaction: t }) => {
|
|
514
514
|
const { amount: r, description: a, isIncome: s, merchant_guid: o, payee: n, top_level_category_guid: c } = t;
|
|
515
515
|
return /* @__PURE__ */ l(f, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
@@ -529,7 +529,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
529
529
|
] })
|
|
530
530
|
] })
|
|
531
531
|
] });
|
|
532
|
-
},
|
|
532
|
+
}, ft = ({ transaction: t }) => {
|
|
533
533
|
const { onEvent: r } = L(), { updateTransaction: a } = v(), { updateManualTransaction: s } = G(), { common: o, transactions: n } = A(), [c, d] = _.useState(!1), [i, u] = _.useState("");
|
|
534
534
|
_.useEffect(() => {
|
|
535
535
|
c && u(t.memo ? t.memo : "");
|
|
@@ -599,7 +599,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
599
599
|
}
|
|
600
600
|
)
|
|
601
601
|
] });
|
|
602
|
-
},
|
|
602
|
+
}, bt = b(ft), At = ({
|
|
603
603
|
index: t,
|
|
604
604
|
onDeleteRow: r,
|
|
605
605
|
onCategoryChanged: a,
|
|
@@ -701,7 +701,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
701
701
|
]
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
|
-
},
|
|
704
|
+
}, xt = b(At), Nt = ({
|
|
705
705
|
onAddSplit: t,
|
|
706
706
|
onCategoryChanged: r,
|
|
707
707
|
onDeleteSplit: a,
|
|
@@ -719,7 +719,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
719
719
|
);
|
|
720
720
|
}, [o]), /* @__PURE__ */ l(w, { className: "mx-txn-split-manager", children: [
|
|
721
721
|
o.map((g, p) => /* @__PURE__ */ e(
|
|
722
|
-
|
|
722
|
+
xt,
|
|
723
723
|
{
|
|
724
724
|
index: p,
|
|
725
725
|
onCategoryChanged: r,
|
|
@@ -753,7 +753,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
753
753
|
}
|
|
754
754
|
) })
|
|
755
755
|
] });
|
|
756
|
-
},
|
|
756
|
+
}, It = b(Nt), Dt = ({ transaction: t }) => {
|
|
757
757
|
const { onEvent: r } = L(), { splitTransaction: a, unSplitTransaction: s } = v(), { common: o, transactions: n } = A(), { setShouldDisableDrawerScroll: c } = G(), { categories: d } = xe(), i = {
|
|
758
758
|
...t,
|
|
759
759
|
amount: t.amount - 1,
|
|
@@ -839,7 +839,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
839
839
|
children: [
|
|
840
840
|
/* @__PURE__ */ e(Le, { transaction: t }),
|
|
841
841
|
/* @__PURE__ */ e(
|
|
842
|
-
|
|
842
|
+
It,
|
|
843
843
|
{
|
|
844
844
|
onAddSplit: C,
|
|
845
845
|
onCategoryChanged: $,
|
|
@@ -873,7 +873,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
873
873
|
}
|
|
874
874
|
)
|
|
875
875
|
] });
|
|
876
|
-
},
|
|
876
|
+
}, vt = b(Dt), Et = () => {
|
|
877
877
|
const t = ve(), { onEvent: r } = L(), { addTag: a } = v(), { transactions: s } = A(), [o, n] = _.useState(!1), [c, d] = _.useState(""), [i, u] = _.useState(""), m = _.useRef(null);
|
|
878
878
|
_.useEffect(() => {
|
|
879
879
|
o && m?.current?.focus();
|
|
@@ -936,7 +936,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
936
936
|
}
|
|
937
937
|
)
|
|
938
938
|
] });
|
|
939
|
-
},
|
|
939
|
+
}, Ot = b(Et), wt = ({ onSearchValueChanged: t, searchValue: r }) => {
|
|
940
940
|
const { common: a, transactions: s } = A(), o = ee(), n = /* @__PURE__ */ e(
|
|
941
941
|
Q,
|
|
942
942
|
{
|
|
@@ -960,7 +960,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
960
960
|
value: r
|
|
961
961
|
}
|
|
962
962
|
) });
|
|
963
|
-
},
|
|
963
|
+
}, Lt = b(wt), Rt = ({ onTagChecked: t, selectedTags: r, tag: a }) => {
|
|
964
964
|
const { onEvent: s } = L(), { removeTag: o, updateTag: n } = v(), { common: c, transactions: d } = A(), [i, u] = _.useState(!1), [m, g] = _.useState(!1), [p, x] = _.useState(""), [y, N] = _.useState(""), C = async () => {
|
|
965
965
|
s(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), a && await n({ ...a, name: p }), u(!1);
|
|
966
966
|
}, R = async () => {
|
|
@@ -1054,25 +1054,25 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1054
1054
|
]
|
|
1055
1055
|
}
|
|
1056
1056
|
);
|
|
1057
|
-
},
|
|
1057
|
+
}, kt = b(Rt), Pt = ({ selectedTags: t, onTagChecked: r }) => {
|
|
1058
1058
|
const { tags: a } = v(), [s, o] = _.useState(""), n = a.filter(
|
|
1059
1059
|
(c) => c.name.toLowerCase().includes(s.toLowerCase())
|
|
1060
1060
|
);
|
|
1061
1061
|
return /* @__PURE__ */ l("div", { className: "mx-txn-tag-manager", children: [
|
|
1062
1062
|
/* @__PURE__ */ e(
|
|
1063
|
-
|
|
1063
|
+
Lt,
|
|
1064
1064
|
{
|
|
1065
1065
|
onSearchValueChanged: (c) => o(c),
|
|
1066
1066
|
searchValue: s
|
|
1067
1067
|
}
|
|
1068
1068
|
),
|
|
1069
|
-
/* @__PURE__ */ e(
|
|
1069
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1070
1070
|
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: n.map((c) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1071
|
-
/* @__PURE__ */ e(
|
|
1071
|
+
/* @__PURE__ */ e(kt, { onTagChecked: r, selectedTags: t, tag: c }),
|
|
1072
1072
|
/* @__PURE__ */ e(Z, { sx: { ml: 24 } })
|
|
1073
1073
|
] }, c.guid)) }) })
|
|
1074
1074
|
] });
|
|
1075
|
-
},
|
|
1075
|
+
}, Gt = b(Pt), Mt = ({ transaction: t }) => {
|
|
1076
1076
|
const { onEvent: r } = L(), { tags: a, updateTaggings: s, updateTransaction: o } = v(), { common: n, transactions: c } = A(), { updateManualTransaction: d } = G(), [i, u] = _.useState(!1), [m, g] = _.useState(t.tags);
|
|
1077
1077
|
_.useEffect(() => {
|
|
1078
1078
|
g(t.tags);
|
|
@@ -1123,11 +1123,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1123
1123
|
primaryText: n.save_button,
|
|
1124
1124
|
secondaryText: n.cancel_button,
|
|
1125
1125
|
title: c.tags_title,
|
|
1126
|
-
children: /* @__PURE__ */ e(
|
|
1126
|
+
children: /* @__PURE__ */ e(Gt, { onTagChecked: p, selectedTags: m })
|
|
1127
1127
|
}
|
|
1128
1128
|
)
|
|
1129
1129
|
] });
|
|
1130
|
-
},
|
|
1130
|
+
}, Kt = b(Mt), $t = ({ transaction: t, viewOnly: r = !1 }) => {
|
|
1131
1131
|
const { updateTransaction: a } = v(), { common: s, transactions: o } = A(), { onEvent: n } = L(), [c, d] = _.useState(!1), [i, u] = _.useState(""), m = _.useRef(null);
|
|
1132
1132
|
_.useEffect(() => {
|
|
1133
1133
|
c && (u(t.description), m?.current?.focus());
|
|
@@ -1178,7 +1178,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
)
|
|
1180
1180
|
] }) });
|
|
1181
|
-
},
|
|
1181
|
+
}, Bt = b($t), Ft = ({ transaction: t }) => {
|
|
1182
1182
|
const { updateTransaction: r } = v(), { transactions: a } = A(), { onEvent: s } = L(), o = ve(), n = async () => {
|
|
1183
1183
|
s(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1184
1184
|
};
|
|
@@ -1210,7 +1210,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1210
1210
|
children: /* @__PURE__ */ e(We, { color: "inherit" })
|
|
1211
1211
|
}
|
|
1212
1212
|
) });
|
|
1213
|
-
},
|
|
1213
|
+
}, Ht = b(Ft), ae = (t, r, a, s = !0, o = "inset") => s ? /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1214
1214
|
/* @__PURE__ */ l(F, { disableGutters: !0, disablePadding: !0, children: [
|
|
1215
1215
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1216
1216
|
/* @__PURE__ */ e(
|
|
@@ -1223,7 +1223,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1223
1223
|
)
|
|
1224
1224
|
] }),
|
|
1225
1225
|
/* @__PURE__ */ e(Z, { variant: o })
|
|
1226
|
-
] }) : null,
|
|
1226
|
+
] }) : null, zt = ({ transaction: t }) => {
|
|
1227
1227
|
const { transactions: r } = A(), { tags: a } = v(), s = _.useMemo(() => {
|
|
1228
1228
|
const o = new Map(a.map((n) => [n.guid, n.name]));
|
|
1229
1229
|
return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
|
|
@@ -1262,7 +1262,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1262
1262
|
"fullWidth"
|
|
1263
1263
|
)
|
|
1264
1264
|
] });
|
|
1265
|
-
},
|
|
1265
|
+
}, Ut = b(zt), Xt = ({
|
|
1266
1266
|
bottomActions: t = at,
|
|
1267
1267
|
topActions: r = tt,
|
|
1268
1268
|
transaction: a
|
|
@@ -1284,51 +1284,51 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1284
1284
|
size: 64
|
|
1285
1285
|
}
|
|
1286
1286
|
) }),
|
|
1287
|
-
/* @__PURE__ */ e(
|
|
1287
|
+
/* @__PURE__ */ e(Bt, { transaction: a, viewOnly: d }),
|
|
1288
1288
|
/* @__PURE__ */ l(f, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1289
1289
|
/* @__PURE__ */ l(Ae, { color: a.isIncome ? "success.main" : "text.primary", children: [
|
|
1290
1290
|
a.isIncome ? "+" : "",
|
|
1291
1291
|
te(a.amount, "0,0.00")
|
|
1292
1292
|
] }),
|
|
1293
|
-
!d && /* @__PURE__ */ e(
|
|
1293
|
+
!d && /* @__PURE__ */ e(Ht, { transaction: a })
|
|
1294
1294
|
] }),
|
|
1295
1295
|
/* @__PURE__ */ l(f, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1296
1296
|
/* @__PURE__ */ e(T, { bold: !0, children: `${a.account}
|
|
1297
1297
|
${c ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
|
|
1298
|
-
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: a.
|
|
1298
|
+
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: a.feed_description })
|
|
1299
1299
|
] })
|
|
1300
1300
|
] }),
|
|
1301
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(
|
|
1301
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(Ut, { transaction: a }) : /* @__PURE__ */ e(J, { children: r.map((i, u) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1302
1302
|
i === q.Category && /* @__PURE__ */ e(mt, { transaction: a }),
|
|
1303
|
-
i === q.Date && /* @__PURE__ */ e(
|
|
1304
|
-
i === q.Memo && /* @__PURE__ */ e(
|
|
1305
|
-
i === q.Tags && /* @__PURE__ */ e(
|
|
1303
|
+
i === q.Date && /* @__PURE__ */ e(gt, { transaction: a }),
|
|
1304
|
+
i === q.Memo && /* @__PURE__ */ e(bt, { transaction: a }),
|
|
1305
|
+
i === q.Tags && /* @__PURE__ */ e(Kt, { transaction: a }),
|
|
1306
1306
|
/* @__PURE__ */ e(Z, { variant: u < r.length - 1 ? "inset" : "fullWidth" })
|
|
1307
1307
|
] }, i)) }) }),
|
|
1308
1308
|
!d && /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1309
1309
|
/* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1310
1310
|
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ l(J, { children: [
|
|
1311
1311
|
t.map((i, u) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1312
|
-
i === re.SplitTransaction && /* @__PURE__ */ e(
|
|
1313
|
-
i === re.HideTransaction && /* @__PURE__ */ e(
|
|
1314
|
-
i === re.MerchantLogo && /* @__PURE__ */ e(
|
|
1312
|
+
i === re.SplitTransaction && /* @__PURE__ */ e(vt, { transaction: a }),
|
|
1313
|
+
i === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: a }),
|
|
1314
|
+
i === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: a }),
|
|
1315
1315
|
/* @__PURE__ */ e(Z, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
|
|
1316
1316
|
] }, i)),
|
|
1317
|
-
a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(
|
|
1317
|
+
a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(ht, { transaction: a })
|
|
1318
1318
|
] }) })
|
|
1319
1319
|
] })
|
|
1320
1320
|
] }) });
|
|
1321
|
-
},
|
|
1321
|
+
}, ka = b(Xt);
|
|
1322
1322
|
export {
|
|
1323
1323
|
re as B,
|
|
1324
1324
|
mt as C,
|
|
1325
|
-
|
|
1326
|
-
|
|
1325
|
+
gt as D,
|
|
1326
|
+
bt as M,
|
|
1327
1327
|
lt as S,
|
|
1328
|
-
|
|
1329
|
-
|
|
1328
|
+
Ra as T,
|
|
1329
|
+
ka as a,
|
|
1330
1330
|
st as b,
|
|
1331
|
-
|
|
1331
|
+
Kt as c,
|
|
1332
1332
|
q as d,
|
|
1333
1333
|
G as u
|
|
1334
1334
|
};
|
|
@@ -4,36 +4,36 @@ import U from "@mui/material/FormControlLabel";
|
|
|
4
4
|
import K from "@mui/material/Radio";
|
|
5
5
|
import V from "@mui/material/styles/useTheme";
|
|
6
6
|
import v from "@mui/material/Tooltip";
|
|
7
|
-
import { makeAutoObservable as y,
|
|
7
|
+
import { makeAutoObservable as y, runInAction as d } from "mobx";
|
|
8
8
|
import { endOfToday as D } from "date-fns/endOfToday";
|
|
9
|
-
import { formatISO as
|
|
9
|
+
import { formatISO as B } from "date-fns/formatISO";
|
|
10
10
|
import { fromUnixTime as h } from "date-fns/fromUnixTime";
|
|
11
11
|
import { getUnixTime as u } from "date-fns/getUnixTime";
|
|
12
|
-
import { isBefore as
|
|
12
|
+
import { isBefore as Y } from "date-fns/isBefore";
|
|
13
13
|
import { startOfMonth as R } from "date-fns/startOfMonth";
|
|
14
14
|
import { startOfToday as b } from "date-fns/startOfToday";
|
|
15
|
-
import { subDays as
|
|
15
|
+
import { subDays as F } from "date-fns/subDays";
|
|
16
16
|
import { O as n, a as G, T as w } from "./User-BQUxBeZV.mjs";
|
|
17
17
|
import { T as p } from "./TransactionApi-B3Tksf7L.mjs";
|
|
18
|
-
import { b as
|
|
19
|
-
import { f as
|
|
20
|
-
import { format as
|
|
21
|
-
import { f as g, D as O, O as
|
|
22
|
-
import { endOfMonth as
|
|
18
|
+
import { b as W } from "./Category-CevNQ03n.mjs";
|
|
19
|
+
import { f as z } from "./exportTransactionsToCSV-7bVS7KXf.mjs";
|
|
20
|
+
import { format as k } from "date-fns/format";
|
|
21
|
+
import { f as g, D as O, O as $ } from "./Dialog-CWW597AF.mjs";
|
|
22
|
+
import { endOfMonth as X } from "date-fns/endOfMonth";
|
|
23
23
|
import { B as f } from "./BeatApi-DhJpgCLz.mjs";
|
|
24
|
-
const
|
|
25
|
-
checked:
|
|
24
|
+
const j = ({
|
|
25
|
+
checked: S = !1,
|
|
26
26
|
label: t,
|
|
27
27
|
sx: a = {},
|
|
28
28
|
tooltip: e = "",
|
|
29
29
|
value: c
|
|
30
30
|
}) => {
|
|
31
|
-
const _ = V(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], A =
|
|
31
|
+
const _ = V(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], A = S ? _.palette.action.active : i;
|
|
32
32
|
return /* @__PURE__ */ C(
|
|
33
33
|
P,
|
|
34
34
|
{
|
|
35
35
|
bgcolor: "background.paper",
|
|
36
|
-
border: `${
|
|
36
|
+
border: `${S ? 3 : 1}px solid`,
|
|
37
37
|
borderColor: A,
|
|
38
38
|
borderRadius: 2,
|
|
39
39
|
mt: -2,
|
|
@@ -59,7 +59,7 @@ const Z = ({
|
|
|
59
59
|
) })
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
},
|
|
62
|
+
}, ft = j, x = {
|
|
63
63
|
ASC: "ASC",
|
|
64
64
|
DESC: "DESC",
|
|
65
65
|
DIRECTION: {
|
|
@@ -322,74 +322,74 @@ const Z = ({
|
|
|
322
322
|
category: o.TRANSACTIONS_WIDGET,
|
|
323
323
|
label: r.DELETE_TRANSACTION
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, Z = async (S, t) => !t || !m[S] ? null : t.sendAnalyticEvent(m[S]), L = {
|
|
326
326
|
FLAG: "flag",
|
|
327
327
|
DATE: "date",
|
|
328
328
|
PAYEE: "payee",
|
|
329
329
|
CATEGORY: "category",
|
|
330
330
|
ACCOUNT: "account",
|
|
331
331
|
AMOUNT: "amount"
|
|
332
|
-
},
|
|
332
|
+
}, q = (S, t, a, e = []) => {
|
|
333
333
|
const c = t.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), _ = a.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), i = e.reduce((A, s) => {
|
|
334
|
-
const { transaction_guid:
|
|
335
|
-
if (!A[
|
|
334
|
+
const { transaction_guid: l, tag_guid: I } = s;
|
|
335
|
+
if (!A[l])
|
|
336
336
|
return {
|
|
337
337
|
...A,
|
|
338
|
-
[
|
|
338
|
+
[l]: [I]
|
|
339
339
|
};
|
|
340
|
-
const E = [...A[
|
|
340
|
+
const E = [...A[l], I];
|
|
341
341
|
return {
|
|
342
342
|
...A,
|
|
343
|
-
[
|
|
343
|
+
[l]: E
|
|
344
344
|
};
|
|
345
345
|
}, {});
|
|
346
|
-
return
|
|
347
|
-
const s = c[A.account_guid],
|
|
346
|
+
return S.map((A) => {
|
|
347
|
+
const s = c[A.account_guid], l = A.category_guid ? _[A.category_guid] : null, I = i[A.guid] ?? [];
|
|
348
348
|
return {
|
|
349
349
|
...A,
|
|
350
350
|
account: s?.user_name || "Unknown",
|
|
351
351
|
accountIsClosed: s?.is_closed,
|
|
352
352
|
accountIsHidden: s?.is_hidden,
|
|
353
|
-
category:
|
|
354
|
-
isIncome: A.top_level_category_guid ===
|
|
353
|
+
category: l?.name || "Uncategorized",
|
|
354
|
+
isIncome: A.top_level_category_guid === W.INCOME,
|
|
355
355
|
isPending: A.feed_status === G.PENDING,
|
|
356
356
|
number: s?.account_number || "",
|
|
357
357
|
payee: A.description,
|
|
358
358
|
tags: I
|
|
359
359
|
};
|
|
360
360
|
});
|
|
361
|
-
},
|
|
362
|
-
const i =
|
|
361
|
+
}, J = "uncategorized", Q = (S, t, a, e, c, _) => {
|
|
362
|
+
const i = tt(S, c, _), A = at(i, a, e);
|
|
363
363
|
return t.forEach((s) => {
|
|
364
|
-
const
|
|
365
|
-
A.splice(
|
|
364
|
+
const l = A.findIndex((E) => E.guid === s), I = _.filter((E) => E.parent_guid === s);
|
|
365
|
+
A.splice(l + 1, 0, ...I);
|
|
366
366
|
}), A;
|
|
367
|
-
},
|
|
367
|
+
}, tt = (S, t, a) => {
|
|
368
368
|
const {
|
|
369
369
|
accounts: e = [],
|
|
370
370
|
dateRange: c = { start: R(b()), end: D() },
|
|
371
371
|
custom: _ = () => !0,
|
|
372
372
|
searchTerm: i = "",
|
|
373
373
|
showSplits: A = !1
|
|
374
|
-
} =
|
|
375
|
-
return a.filter((s) => A ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((
|
|
376
|
-
if (i ===
|
|
374
|
+
} = S;
|
|
375
|
+
return a.filter((s) => A ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((l) => l === s.account_guid)).filter((s) => s.date >= u(c.start) && s.date <= u(c.end)).filter(_).filter((s) => {
|
|
376
|
+
if (i === J && s.has_been_split)
|
|
377
377
|
return !1;
|
|
378
378
|
if (/^spl/i.test(i) && (s.has_been_split || s.parent_guid))
|
|
379
379
|
return !0;
|
|
380
380
|
const I = s.tags.some(
|
|
381
|
-
(M) =>
|
|
381
|
+
(M) => N(i, t.find((H) => H.guid === M)?.name)
|
|
382
382
|
), E = h(s.date);
|
|
383
|
-
return
|
|
383
|
+
return N(i, s.payee) || N(i, s.feed_description) || N(i, s.category) || N(i, g(E, O.MONTH)) || N(i, g(E, O.DAY)) || N(i, g(E, O.FULL_MONTH_DAY)) || N(i, g(E, O.MONTH_DAY_YEAR)) || N(i, k(E, $)) || N(i, s.account) || N(i, `${s.amount}`) || N(i, s.memo) || I;
|
|
384
384
|
});
|
|
385
|
-
},
|
|
385
|
+
}, at = (S, t, a) => [...S].sort((e, c) => {
|
|
386
386
|
const _ = t, i = (e[_] || "") > (c[_] || "");
|
|
387
387
|
let A = i ? -1 : 1, s = i ? 1 : -1;
|
|
388
388
|
return (t === L.DATE || t === L.AMOUNT) && (A = i ? 1 : -1, s = i ? -1 : 1), a === x.ASC ? A : s;
|
|
389
|
-
}),
|
|
390
|
-
const a =
|
|
389
|
+
}), N = (S, t) => {
|
|
390
|
+
const a = S.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
|
|
391
391
|
return a.every((c) => e.indexOf(c) > -1);
|
|
392
|
-
},
|
|
392
|
+
}, et = {
|
|
393
393
|
account_guid: "",
|
|
394
394
|
amount: 0,
|
|
395
395
|
currency_code: "",
|
|
@@ -418,9 +418,9 @@ const Z = ({
|
|
|
418
418
|
memo: void 0,
|
|
419
419
|
tags: []
|
|
420
420
|
};
|
|
421
|
-
class
|
|
421
|
+
class it {
|
|
422
422
|
beginDate = R(/* @__PURE__ */ new Date());
|
|
423
|
-
endDate =
|
|
423
|
+
endDate = X(/* @__PURE__ */ new Date());
|
|
424
424
|
expandedSplits = [];
|
|
425
425
|
isInitialized = !1;
|
|
426
426
|
height = 550;
|
|
@@ -428,7 +428,7 @@ class st {
|
|
|
428
428
|
shouldDisableDrawerScroll = !1;
|
|
429
429
|
searchValue = "";
|
|
430
430
|
selectedAccountGuids = [];
|
|
431
|
-
manualTransaction =
|
|
431
|
+
manualTransaction = et;
|
|
432
432
|
isAmountValid = !1;
|
|
433
433
|
showInsights = !1;
|
|
434
434
|
constructor() {
|
|
@@ -459,13 +459,13 @@ class st {
|
|
|
459
459
|
this.manualTransaction = t;
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
class
|
|
462
|
+
class mt {
|
|
463
463
|
globalStore;
|
|
464
464
|
uiStore;
|
|
465
465
|
api = new p("/", "");
|
|
466
466
|
beatApi = new f("/", "");
|
|
467
467
|
associatedBeats = [];
|
|
468
|
-
cachedStartDate =
|
|
468
|
+
cachedStartDate = F(b(), 90);
|
|
469
469
|
filter = {};
|
|
470
470
|
isLoading = !0;
|
|
471
471
|
rawTransactions = [];
|
|
@@ -474,13 +474,13 @@ class yt {
|
|
|
474
474
|
taggings = [];
|
|
475
475
|
tags = [];
|
|
476
476
|
transactionRules = [];
|
|
477
|
-
onAnalyticEvent =
|
|
477
|
+
onAnalyticEvent = Z;
|
|
478
478
|
constructor(t) {
|
|
479
|
-
this.globalStore = t, this.uiStore = new
|
|
479
|
+
this.globalStore = t, this.uiStore = new it(), this.api = new p(
|
|
480
480
|
t.endpoint,
|
|
481
481
|
t.sessionToken,
|
|
482
482
|
t.onError
|
|
483
|
-
), this.beatApi = new f(t.endpoint, t.sessionToken, t.onError), y(this)
|
|
483
|
+
), this.beatApi = new f(t.endpoint, t.sessionToken, t.onError), y(this);
|
|
484
484
|
}
|
|
485
485
|
loadTransactionData = async ({
|
|
486
486
|
associatedBeats: t,
|
|
@@ -499,7 +499,7 @@ class yt {
|
|
|
499
499
|
});
|
|
500
500
|
};
|
|
501
501
|
get sortedTransactions() {
|
|
502
|
-
return
|
|
502
|
+
return Q(
|
|
503
503
|
this.filter,
|
|
504
504
|
this.uiStore.expandedSplits,
|
|
505
505
|
this.sortColumn,
|
|
@@ -509,7 +509,7 @@ class yt {
|
|
|
509
509
|
);
|
|
510
510
|
}
|
|
511
511
|
get sortedTransactionsWithSplits() {
|
|
512
|
-
return
|
|
512
|
+
return z(this.sortedTransactions, this.transactions);
|
|
513
513
|
}
|
|
514
514
|
get transactions() {
|
|
515
515
|
return this.augmentTransactions(this.rawTransactions);
|
|
@@ -545,7 +545,7 @@ class yt {
|
|
|
545
545
|
this.globalStore.accountStore.updateAccountBalance(a.account_guid, e);
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
augmentTransactions = (t) =>
|
|
548
|
+
augmentTransactions = (t) => q(
|
|
549
549
|
t,
|
|
550
550
|
this.globalStore.accountStore.visibleAccounts,
|
|
551
551
|
this.globalStore.categoryStore.categories,
|
|
@@ -553,7 +553,7 @@ class yt {
|
|
|
553
553
|
);
|
|
554
554
|
getTransactionData = () => ({});
|
|
555
555
|
loadAssociatedBeats = async (t, a) => {
|
|
556
|
-
const e = t ?
|
|
556
|
+
const e = t ? B(t, { representation: "date" }) : void 0, c = a ?? await this.beatApi.getBeatsWithAssociatedTransaction(e);
|
|
557
557
|
d(() => this.associatedBeats = c);
|
|
558
558
|
};
|
|
559
559
|
loadTags = async () => {
|
|
@@ -607,7 +607,7 @@ class yt {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
setFilter = (t) => {
|
|
610
|
-
this.filter = t, t.dateRange &&
|
|
610
|
+
this.filter = t, t.dateRange && Y(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start, D()).then(() => {
|
|
611
611
|
t.dateRange && (this.cachedStartDate = t.dateRange.start);
|
|
612
612
|
});
|
|
613
613
|
};
|
|
@@ -661,17 +661,17 @@ class yt {
|
|
|
661
661
|
};
|
|
662
662
|
updateTransaction = async (t) => {
|
|
663
663
|
const a = await this.api.updateTransaction(t), e = this.transactions.findIndex((c) => c.guid === t.guid);
|
|
664
|
-
e >= 0 &&
|
|
664
|
+
e >= 0 && d(
|
|
665
665
|
() => this.rawTransactions = [
|
|
666
666
|
...this.transactions.slice(0, e),
|
|
667
667
|
a,
|
|
668
668
|
...this.transactions.slice(e + 1)
|
|
669
669
|
]
|
|
670
|
-
)
|
|
670
|
+
);
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
673
|
export {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
674
|
+
et as D,
|
|
675
|
+
ft as S,
|
|
676
|
+
mt as T
|
|
677
677
|
};
|