@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms1
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/{Account-B4CDD-zq.mjs → Account-BDXA6PWh.mjs} +1 -1
- package/dist/AccountDetailsContent-CUztd3-b.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-i3KFhNuo.mjs} +18 -18
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-QZspYAji.mjs} +10 -12
- package/dist/AccountListItem-DX5upmCS.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-BcnDpyLL.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DXfZotRC.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-Df2nII9u.mjs} +31 -31
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +27 -27
- package/dist/{CategoryStore-MUwRWH9e.mjs → CategoryStore-DTgyAMM7.mjs} +2 -2
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-C5cR-nfQ.mjs} +4 -4
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BIbTqYOH.mjs} +47 -48
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +2 -2
- package/dist/CurrencyInput-BFKcs-_K.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-BbJB0nmu.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-BEtCk82g.mjs} +17 -17
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-DpWY3gVb.mjs} +4 -4
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-BnPXM_N2.mjs} +145 -124
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-NpXHhO1n.mjs} +46 -46
- package/dist/MicroWidgetContainer-DEiRnYVa.mjs +45 -0
- package/dist/MiniWidgetContainer-CmXpTylX.mjs +56 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-lsuhEpn6.mjs} +4 -4
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-CNmJWVeI.mjs} +77 -77
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +8 -8
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-CqZh1SQa.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BKcYmpv3.mjs} +77 -77
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/{SpendingData-DPQ96k3x.mjs → SpendingData-BuJ03S9d.mjs} +4 -4
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CjX-hX2O.mjs} +12 -12
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-D-Q3BU9Z.mjs} +58 -41
- package/dist/{TrendsStore-_mRaFUdf.mjs → TrendsStore-BW9FGQeE.mjs} +37 -37
- package/dist/{User-BklmOUSd.mjs → User-wXzDI4M8.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-C0832BMe.mjs} +233 -231
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-BhQ1Kx2z.mjs} +36 -36
- package/dist/accounts/index.es.js +94 -94
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +251 -250
- package/dist/cashflow/index.es.js +158 -157
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +660 -395
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +440 -440
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +3 -3
- package/dist/finstrong/index.es.js +118 -118
- package/dist/goals/index.es.js +380 -386
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +7 -7
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +30 -30
- package/dist/recurringtransactions/index.es.js +85 -85
- package/dist/settings/index.es.js +270 -270
- package/dist/spending/index.es.js +44 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +169 -168
- package/dist/trends/index.es.js +318 -317
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-CFNF8766.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +50 -45
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import M from "@mui/material/Box";
|
|
3
|
+
import H from "@mui/material/FormControlLabel";
|
|
4
|
+
import P from "@mui/material/Radio";
|
|
5
|
+
import U from "@mui/material/styles/useTheme";
|
|
6
|
+
import K from "@mui/material/Tooltip";
|
|
7
7
|
import { makeAutoObservable as p } from "mobx";
|
|
8
8
|
import { endOfToday as f } from "date-fns/endOfToday";
|
|
9
9
|
import { formatISO as V } from "date-fns/formatISO";
|
|
@@ -12,25 +12,25 @@ import { isBefore as v } from "date-fns/isBefore";
|
|
|
12
12
|
import { startOfMonth as h } from "date-fns/startOfMonth";
|
|
13
13
|
import { startOfToday as m } from "date-fns/startOfToday";
|
|
14
14
|
import { subDays as B } from "date-fns/subDays";
|
|
15
|
-
import { O as o, a as y, T as b } from "./User-
|
|
16
|
-
import { T as
|
|
17
|
-
import { b as Y } from "./Category-
|
|
18
|
-
import { f as F } from "./exportTransactionsToCSV-
|
|
15
|
+
import { O as o, a as y, T as b } from "./User-wXzDI4M8.mjs";
|
|
16
|
+
import { T as L } from "./TransactionApi-CjBoLleL.mjs";
|
|
17
|
+
import { b as Y } from "./Category-CevNQ03n.mjs";
|
|
18
|
+
import { f as F } from "./exportTransactionsToCSV-Cz2t0lmA.mjs";
|
|
19
19
|
import { format as W } from "date-fns/format";
|
|
20
20
|
import { fromUnixTime as $ } from "date-fns/fromUnixTime";
|
|
21
|
-
import { f as I, a as C, O as k } from "./Dialog-
|
|
21
|
+
import { f as I, a as C, O as k } from "./Dialog-BPTr3qHE.mjs";
|
|
22
22
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
23
|
-
import { B as
|
|
24
|
-
const
|
|
23
|
+
import { B as u } from "./BeatApi-De2IaqH2.mjs";
|
|
24
|
+
const X = ({
|
|
25
25
|
checked: l = !1,
|
|
26
26
|
label: t,
|
|
27
27
|
sx: a = {},
|
|
28
28
|
tooltip: e = "",
|
|
29
29
|
value: A
|
|
30
30
|
}) => {
|
|
31
|
-
const d =
|
|
31
|
+
const d = U(), s = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : s;
|
|
32
32
|
return /* @__PURE__ */ g(
|
|
33
|
-
|
|
33
|
+
M,
|
|
34
34
|
{
|
|
35
35
|
bgcolor: "background.paper",
|
|
36
36
|
border: `${l ? 3 : 1}px solid`,
|
|
@@ -41,11 +41,11 @@ const Rt = ({
|
|
|
41
41
|
pr: 8,
|
|
42
42
|
py: 4,
|
|
43
43
|
sx: { "&:hover": { borderColor: d.palette.action.active }, ...a },
|
|
44
|
-
children: /* @__PURE__ */ g(
|
|
45
|
-
|
|
44
|
+
children: /* @__PURE__ */ g(K, { title: e, children: /* @__PURE__ */ g(
|
|
45
|
+
H,
|
|
46
46
|
{
|
|
47
47
|
control: /* @__PURE__ */ g(
|
|
48
|
-
|
|
48
|
+
P,
|
|
49
49
|
{
|
|
50
50
|
disableRipple: !0,
|
|
51
51
|
sx: { "&.Mui-checked": { color: d.palette.action.active } }
|
|
@@ -59,19 +59,31 @@ const Rt = ({
|
|
|
59
59
|
) })
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
}, G = {
|
|
62
|
+
}, pt = X, G = {
|
|
63
63
|
ASC: "ASC",
|
|
64
|
-
DESC: "DESC"
|
|
64
|
+
DESC: "DESC",
|
|
65
|
+
DIRECTION: {
|
|
66
|
+
ASC: "ascending",
|
|
67
|
+
DESC: "descending"
|
|
68
|
+
},
|
|
69
|
+
ALIGN: {
|
|
70
|
+
center: "center",
|
|
71
|
+
left: "flex-start",
|
|
72
|
+
right: "flex-end"
|
|
73
|
+
}
|
|
65
74
|
}, n = {
|
|
66
75
|
ADD: "Add",
|
|
67
76
|
ADD_CATEGORY: "Add Category",
|
|
68
77
|
CHANGE_CATEGORY: "Change Category",
|
|
78
|
+
CHANGE_DATE: "Change Date",
|
|
69
79
|
CLOSE: "Close",
|
|
70
80
|
DELETE: "Delete",
|
|
71
81
|
EDIT: "Edit",
|
|
82
|
+
HIDE: "Hide",
|
|
72
83
|
SAVE: "Save",
|
|
73
84
|
SPLIT: "Split",
|
|
74
85
|
SELECT: "Select",
|
|
86
|
+
UNHIDE: "Unhide",
|
|
75
87
|
UNSPLIT: "Unsplit"
|
|
76
88
|
}, T = {
|
|
77
89
|
TRANSACTION_DETAILS: "Transaction Details",
|
|
@@ -94,6 +106,7 @@ const Rt = ({
|
|
|
94
106
|
TAG_DELETE: "Delete Tag",
|
|
95
107
|
TAG_EDIT: "Edit Tag",
|
|
96
108
|
TRANSACTION: "Transaction",
|
|
109
|
+
TRANSACTIONS_LIST: "Transactions List",
|
|
97
110
|
UNHIDE_TRANSACTION: "Unhide Transaction"
|
|
98
111
|
}, R = {
|
|
99
112
|
// splits
|
|
@@ -309,10 +322,14 @@ const Rt = ({
|
|
|
309
322
|
category: T.TRANSACTIONS_WIDGET,
|
|
310
323
|
label: r.DELETE_TRANSACTION
|
|
311
324
|
}
|
|
312
|
-
},
|
|
325
|
+
}, j = async (l, t) => !t || !R[l] ? null : t.sendAnalyticEvent(R[l]), D = {
|
|
326
|
+
FLAG: "flag",
|
|
313
327
|
DATE: "date",
|
|
328
|
+
PAYEE: "payee",
|
|
329
|
+
CATEGORY: "category",
|
|
330
|
+
ACCOUNT: "account",
|
|
314
331
|
AMOUNT: "amount"
|
|
315
|
-
},
|
|
332
|
+
}, Z = (l, t, a, e = []) => {
|
|
316
333
|
const A = t.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), d = a.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), s = e.reduce((c, i) => {
|
|
317
334
|
const { transaction_guid: S, tag_guid: E } = i;
|
|
318
335
|
if (!c[S])
|
|
@@ -341,13 +358,13 @@ const Rt = ({
|
|
|
341
358
|
tags: E
|
|
342
359
|
};
|
|
343
360
|
});
|
|
344
|
-
},
|
|
345
|
-
const s =
|
|
361
|
+
}, q = "uncategorized", J = (l, t, a, e, A, d) => {
|
|
362
|
+
const s = Q(l, A, d), c = tt(s, a, e);
|
|
346
363
|
return t.forEach((i) => {
|
|
347
364
|
const S = c.findIndex((N) => N.guid === i), E = d.filter((N) => N.parent_guid === i);
|
|
348
365
|
c.splice(S + 1, 0, ...E);
|
|
349
366
|
}), c;
|
|
350
|
-
},
|
|
367
|
+
}, Q = (l, t, a) => {
|
|
351
368
|
const {
|
|
352
369
|
accounts: e = [],
|
|
353
370
|
dateRange: A = { start: h(m()), end: f() },
|
|
@@ -356,23 +373,23 @@ const Rt = ({
|
|
|
356
373
|
showSplits: c = !1
|
|
357
374
|
} = l;
|
|
358
375
|
return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!e.find((S) => S === i.account_guid)).filter((i) => i.date >= O(A.start) && i.date <= O(A.end)).filter(d).filter((i) => {
|
|
359
|
-
if (s ===
|
|
376
|
+
if (s === q && i.has_been_split)
|
|
360
377
|
return !1;
|
|
361
378
|
if (/^spl/i.test(s) && (i.has_been_split || i.parent_guid))
|
|
362
379
|
return !0;
|
|
363
380
|
const E = i.tags.some(
|
|
364
|
-
(w) => _(s, t.find((
|
|
381
|
+
(w) => _(s, t.find((x) => x.guid === w)?.name)
|
|
365
382
|
), N = $(i.date);
|
|
366
383
|
return _(s, i.payee) || _(s, i.feed_description) || _(s, i.category) || _(s, I(N, C.MONTH)) || _(s, I(N, C.DAY)) || _(s, I(N, C.FULL_MONTH_DAY)) || _(s, I(N, C.MONTH_DAY_YEAR)) || _(s, W(N, k)) || _(s, i.account) || _(s, `${i.amount}`) || _(s, i.memo) || E;
|
|
367
384
|
});
|
|
368
|
-
},
|
|
385
|
+
}, tt = (l, t, a) => [...l].sort((e, A) => {
|
|
369
386
|
const d = t, s = (e[d] || "") > (A[d] || "");
|
|
370
387
|
let c = s ? -1 : 1, i = s ? 1 : -1;
|
|
371
388
|
return (t === D.DATE || t === D.AMOUNT) && (c = s ? 1 : -1, i = s ? -1 : 1), a === G.ASC ? c : i;
|
|
372
389
|
}), _ = (l, t) => {
|
|
373
390
|
const a = l.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
|
|
374
391
|
return a.every((A) => e.indexOf(A) > -1);
|
|
375
|
-
},
|
|
392
|
+
}, at = {
|
|
376
393
|
account_guid: "",
|
|
377
394
|
amount: 0,
|
|
378
395
|
currency_code: "",
|
|
@@ -401,7 +418,7 @@ const Rt = ({
|
|
|
401
418
|
memo: void 0,
|
|
402
419
|
tags: []
|
|
403
420
|
};
|
|
404
|
-
class
|
|
421
|
+
class et {
|
|
405
422
|
beginDate = h(/* @__PURE__ */ new Date());
|
|
406
423
|
endDate = z(/* @__PURE__ */ new Date());
|
|
407
424
|
expandedSplits = [];
|
|
@@ -410,7 +427,7 @@ class at {
|
|
|
410
427
|
shouldDisableDrawerScroll = !1;
|
|
411
428
|
searchValue = "";
|
|
412
429
|
selectedAccountGuids = [];
|
|
413
|
-
manualTransaction =
|
|
430
|
+
manualTransaction = at;
|
|
414
431
|
isAmountValid = !1;
|
|
415
432
|
showInsights = !1;
|
|
416
433
|
constructor() {
|
|
@@ -440,11 +457,11 @@ class at {
|
|
|
440
457
|
this.manualTransaction = t;
|
|
441
458
|
};
|
|
442
459
|
}
|
|
443
|
-
class
|
|
460
|
+
class ft {
|
|
444
461
|
globalStore;
|
|
445
462
|
uiStore;
|
|
446
|
-
api = new
|
|
447
|
-
beatApi = new
|
|
463
|
+
api = new L("/", "");
|
|
464
|
+
beatApi = new u("/", "");
|
|
448
465
|
associatedBeats = [];
|
|
449
466
|
associatedBeatsLoaded = !1;
|
|
450
467
|
transactions = [];
|
|
@@ -460,13 +477,13 @@ class pt {
|
|
|
460
477
|
isLoading = !0;
|
|
461
478
|
sortColumn = D.DATE;
|
|
462
479
|
sortDirection = G.DESC;
|
|
463
|
-
onAnalyticEvent =
|
|
480
|
+
onAnalyticEvent = j;
|
|
464
481
|
constructor(t) {
|
|
465
|
-
this.globalStore = t, this.uiStore = new
|
|
482
|
+
this.globalStore = t, this.uiStore = new et(), this.api = new L(
|
|
466
483
|
t.endpoint,
|
|
467
484
|
t.sessionToken,
|
|
468
485
|
t.onError
|
|
469
|
-
), this.beatApi = new
|
|
486
|
+
), this.beatApi = new u(t.endpoint, t.sessionToken, t.onError), p(this);
|
|
470
487
|
}
|
|
471
488
|
loadTransactionData = async () => {
|
|
472
489
|
this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
|
|
@@ -482,7 +499,7 @@ class pt {
|
|
|
482
499
|
return this.associatedBeatsLoaded && this.tagsLoaded && this.taggingsLoaded && this.transactionRulesLoaded && this.transactionsLoaded;
|
|
483
500
|
}
|
|
484
501
|
get detailedTransactions() {
|
|
485
|
-
return this.isTransactionDataLoaded ?
|
|
502
|
+
return this.isTransactionDataLoaded ? Z(
|
|
486
503
|
this.transactions,
|
|
487
504
|
this.globalStore.accountStore.visibleAccounts,
|
|
488
505
|
this.globalStore.categoryStore.categories,
|
|
@@ -490,7 +507,7 @@ class pt {
|
|
|
490
507
|
) : [];
|
|
491
508
|
}
|
|
492
509
|
get sortedTransactions() {
|
|
493
|
-
return
|
|
510
|
+
return J(
|
|
494
511
|
this.filter,
|
|
495
512
|
this.uiStore.expandedSplits,
|
|
496
513
|
this.sortColumn,
|
|
@@ -665,7 +682,7 @@ class pt {
|
|
|
665
682
|
};
|
|
666
683
|
}
|
|
667
684
|
export {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
685
|
+
at as D,
|
|
686
|
+
pt as S,
|
|
687
|
+
ft as T
|
|
671
688
|
};
|
|
@@ -11,14 +11,14 @@ import { addSeconds as v } from "date-fns/addSeconds";
|
|
|
11
11
|
import { differenceInCalendarMonths as w } from "date-fns/differenceInCalendarMonths";
|
|
12
12
|
import { endOfMonth as D } from "date-fns/endOfMonth";
|
|
13
13
|
import { subMonths as I } from "date-fns/subMonths";
|
|
14
|
-
import { b as E,
|
|
15
|
-
import { f as L, a as T } from "./Dialog-
|
|
16
|
-
const
|
|
14
|
+
import { b as E, C as _, c as O } from "./Category-CevNQ03n.mjs";
|
|
15
|
+
import { f as L, a as T } from "./Dialog-BPTr3qHE.mjs";
|
|
16
|
+
const at = ({
|
|
17
17
|
onClick: e,
|
|
18
18
|
leftIcon: t,
|
|
19
19
|
rightIcon: o,
|
|
20
|
-
title:
|
|
21
|
-
subtitle:
|
|
20
|
+
title: r,
|
|
21
|
+
subtitle: a,
|
|
22
22
|
rightContent: n,
|
|
23
23
|
titleBold: s = !0,
|
|
24
24
|
rightContentBold: m = !0
|
|
@@ -35,8 +35,8 @@ const rt = ({
|
|
|
35
35
|
},
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ d(h, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
38
|
-
/* @__PURE__ */ l(y, { bold: s, variant: "body1", children:
|
|
39
|
-
|
|
38
|
+
/* @__PURE__ */ l(y, { bold: s, variant: "body1", children: r }),
|
|
39
|
+
a && /* @__PURE__ */ l(y, { variant: "caption", children: a })
|
|
40
40
|
] }),
|
|
41
41
|
/* @__PURE__ */ d(h, { sx: { flexDirection: "row", alignItems: "center", gap: 1 }, children: [
|
|
42
42
|
n && /* @__PURE__ */ l(y, { bold: m, display: "flex", variant: "body1", children: n }),
|
|
@@ -70,27 +70,27 @@ const rt = ({
|
|
|
70
70
|
) });
|
|
71
71
|
}, W = (e) => _[e] ?? _.default, F = (e) => O[e];
|
|
72
72
|
function G(e, t) {
|
|
73
|
-
const o = [],
|
|
74
|
-
for (;
|
|
75
|
-
const
|
|
76
|
-
o.push(+`${
|
|
73
|
+
const o = [], r = new Date(e);
|
|
74
|
+
for (; r <= t; ) {
|
|
75
|
+
const a = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0");
|
|
76
|
+
o.push(+`${a}${n}`), r.setMonth(r.getMonth() + 1);
|
|
77
77
|
}
|
|
78
78
|
return o;
|
|
79
79
|
}
|
|
80
|
-
const $ = (e) => e.reduce((o,
|
|
81
|
-
const
|
|
82
|
-
top_level_category_guid:
|
|
83
|
-
category_guid:
|
|
84
|
-
amount:
|
|
85
|
-
year_month:
|
|
86
|
-
}, { top_level_category_guid: n, category_guid: s } =
|
|
87
|
-
return o[s] || (o[s] = []), o[s].push(
|
|
80
|
+
const $ = (e) => e.reduce((o, r) => {
|
|
81
|
+
const a = {
|
|
82
|
+
top_level_category_guid: r.top_level_category_guid,
|
|
83
|
+
category_guid: r.category_guid,
|
|
84
|
+
amount: r.total,
|
|
85
|
+
year_month: r.year_month
|
|
86
|
+
}, { top_level_category_guid: n, category_guid: s } = a;
|
|
87
|
+
return o[s] || (o[s] = []), o[s].push(a), n !== s && (o[n] || (o[n] = []), o[n].push(a)), o;
|
|
88
88
|
}, {}), nt = (e, t, o) => {
|
|
89
|
-
const
|
|
90
|
-
return Object.entries(
|
|
91
|
-
const c = m[0].top_level_category_guid, b =
|
|
92
|
-
const g = m.filter((p) => p.year_month === i).reduce((p,
|
|
93
|
-
return { x: new Date(u,
|
|
89
|
+
const r = $(e), a = G(t, o);
|
|
90
|
+
return Object.entries(r).map(([s, m]) => {
|
|
91
|
+
const c = m[0].top_level_category_guid, b = a.map((i) => {
|
|
92
|
+
const g = m.filter((p) => p.year_month === i).reduce((p, M) => p + Math.abs(M.amount), 0), u = Number(String(i).slice(0, 4)), C = Number(String(i).slice(4));
|
|
93
|
+
return { x: new Date(u, C - 1), y: g };
|
|
94
94
|
}).sort((i, g) => i.x.getTime() - g.x.getTime());
|
|
95
95
|
return {
|
|
96
96
|
top_level_category_guid: c,
|
|
@@ -101,19 +101,19 @@ const $ = (e) => e.reduce((o, a) => {
|
|
|
101
101
|
};
|
|
102
102
|
});
|
|
103
103
|
}, st = (e, t) => {
|
|
104
|
-
const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e,
|
|
105
|
-
return (o || 0) - (
|
|
104
|
+
const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, r = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
|
|
105
|
+
return (o || 0) - (r || 0);
|
|
106
106
|
}, j = (e, t) => {
|
|
107
|
-
const o = e.subCategories.filter((n) => n.currentAmount !== 0),
|
|
108
|
-
return
|
|
109
|
-
const s =
|
|
110
|
-
const g = i.monthlyAmounts.slice(-t).find((u) =>
|
|
107
|
+
const o = e.subCategories.filter((n) => n.currentAmount !== 0), r = e.totalMonthlyAmounts.slice(-t), a = (n) => n.substring(0, 3) + " " + n.slice(-4);
|
|
108
|
+
return r.map((n) => {
|
|
109
|
+
const s = a(n.label), m = o.map((i) => {
|
|
110
|
+
const g = i.monthlyAmounts.slice(-t).find((u) => a(u.label) === s);
|
|
111
111
|
return {
|
|
112
112
|
label: i.name,
|
|
113
113
|
amount: Math.abs(g?.amount || 0),
|
|
114
114
|
header: s
|
|
115
115
|
};
|
|
116
|
-
}), c = e.monthlyAmounts.slice(-t).find((i) =>
|
|
116
|
+
}), c = e.monthlyAmounts.slice(-t).find((i) => a(i.label) === s);
|
|
117
117
|
return [{
|
|
118
118
|
label: e.name,
|
|
119
119
|
amount: Math.abs(c?.amount || 0),
|
|
@@ -121,11 +121,11 @@ const $ = (e) => e.reduce((o, a) => {
|
|
|
121
121
|
}, ...m].sort((i, g) => g.amount - i.amount);
|
|
122
122
|
});
|
|
123
123
|
}, k = (e, t) => {
|
|
124
|
-
const o = e ? e.totalMonthlyAmounts.slice(-t).map((
|
|
125
|
-
x:
|
|
126
|
-
y: Math.abs(
|
|
127
|
-
})) : [],
|
|
128
|
-
return { monthlyAmounts: o, tooltipLabels:
|
|
124
|
+
const o = e ? e.totalMonthlyAmounts.slice(-t).map((a) => ({
|
|
125
|
+
x: a.label.substring(0, 3),
|
|
126
|
+
y: Math.abs(a.amount)
|
|
127
|
+
})) : [], r = e ? j(e, t) : [];
|
|
128
|
+
return { monthlyAmounts: o, tooltipLabels: r };
|
|
129
129
|
}, H = (e) => e.slice().filter(
|
|
130
130
|
(t) => t.totalAmount !== 0 && t.isTransfer === !1 && t.guid !== E.INVESTMENTS
|
|
131
131
|
).sort((t, o) => Math.abs(o.totalAmount) - Math.abs(t.totalAmount));
|
|
@@ -175,7 +175,7 @@ class it {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
export {
|
|
178
|
-
|
|
178
|
+
at as L,
|
|
179
179
|
it as T,
|
|
180
180
|
st as a,
|
|
181
181
|
nt as g
|