@mx-cartographer/experiences 7.8.2-alpha.bb6 → 7.8.2-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/CHANGELOG.md +0 -4
- package/dist/{AccountStore-btBtMI9s.mjs → AccountStore-BbPWe2C9.mjs} +1 -4
- package/dist/{ManageIncome-CL3hv8i9.mjs → ManageIncome-Da1ktIdG.mjs} +83 -79
- package/dist/{RecurringSettings-Bmnnpb48.mjs → RecurringSettings-B4sByhIM.mjs} +2 -2
- package/dist/{TransactionDetails-BDhz3DLT.mjs → TransactionDetails-B9NQYa6j.mjs} +1 -1
- package/dist/{TransactionStore-DcBF3oIZ.mjs → TransactionStore-BSp5bOKg.mjs} +47 -47
- package/dist/{WidgetContainer-BbPS3Yxz.mjs → WidgetContainer-CYdQ0BSm.mjs} +151 -148
- package/dist/accounts/index.es.js +3 -3
- package/dist/accounts/stores/AccountStore.d.ts +0 -1
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +4 -4
- package/dist/common/index.es.js +5 -4
- package/dist/common/types/AppData.d.ts +1 -0
- package/dist/debts/index.es.js +1 -1
- package/dist/finstrong/index.es.js +4 -4
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -2
- package/dist/goals/index.es.js +639 -544
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +5 -5
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/index.es.js +332 -321
- package/dist/trends/index.es.js +2 -2
- package/package.json +1 -1
|
@@ -4,24 +4,24 @@ import H from "@mui/material/FormControlLabel";
|
|
|
4
4
|
import P from "@mui/material/Radio";
|
|
5
5
|
import U from "@mui/material/styles/useTheme";
|
|
6
6
|
import B from "@mui/material/Tooltip";
|
|
7
|
-
import { makeAutoObservable as p
|
|
7
|
+
import { makeAutoObservable as p } from "mobx";
|
|
8
8
|
import { endOfToday as f } from "date-fns/endOfToday";
|
|
9
|
-
import { formatISO as
|
|
9
|
+
import { formatISO as K } from "date-fns/formatISO";
|
|
10
10
|
import { getUnixTime as O } from "date-fns/getUnixTime";
|
|
11
|
-
import { isBefore as
|
|
11
|
+
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
|
-
import { subDays as
|
|
14
|
+
import { subDays as v } from "date-fns/subDays";
|
|
15
15
|
import { O as n, a as y, T as b } from "./User-B0LnmiKO.mjs";
|
|
16
16
|
import { T as D } from "./TransactionApi-CjBoLleL.mjs";
|
|
17
|
-
import { b as
|
|
18
|
-
import { f as
|
|
19
|
-
import { format as
|
|
20
|
-
import { fromUnixTime as
|
|
21
|
-
import { f as I, D as C, O as
|
|
22
|
-
import { endOfMonth as
|
|
17
|
+
import { b as Y } from "./Category-CevNQ03n.mjs";
|
|
18
|
+
import { f as F } from "./exportTransactionsToCSV-DtQ7ovAR.mjs";
|
|
19
|
+
import { format as W } from "date-fns/format";
|
|
20
|
+
import { fromUnixTime as $ } from "date-fns/fromUnixTime";
|
|
21
|
+
import { f as I, D as C, O as k } from "./Dialog-B4PI-_bL.mjs";
|
|
22
|
+
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
23
23
|
import { B as u } from "./BeatApi-De2IaqH2.mjs";
|
|
24
|
-
const
|
|
24
|
+
const X = ({
|
|
25
25
|
checked: l = !1,
|
|
26
26
|
label: t,
|
|
27
27
|
sx: a = {},
|
|
@@ -59,7 +59,7 @@ const j = ({
|
|
|
59
59
|
) })
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
},
|
|
62
|
+
}, pt = X, G = {
|
|
63
63
|
ASC: "ASC",
|
|
64
64
|
DESC: "DESC",
|
|
65
65
|
DIRECTION: {
|
|
@@ -322,7 +322,7 @@ const j = ({
|
|
|
322
322
|
category: T.TRANSACTIONS_WIDGET,
|
|
323
323
|
label: r.DELETE_TRANSACTION
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, j = async (l, t) => !t || !R[l] ? null : t.sendAnalyticEvent(R[l]), L = {
|
|
326
326
|
FLAG: "flag",
|
|
327
327
|
DATE: "date",
|
|
328
328
|
PAYEE: "payee",
|
|
@@ -331,40 +331,40 @@ const j = ({
|
|
|
331
331
|
AMOUNT: "amount"
|
|
332
332
|
}, Z = (l, t, a, e = []) => {
|
|
333
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) => {
|
|
334
|
-
const { transaction_guid:
|
|
335
|
-
if (!c[
|
|
334
|
+
const { transaction_guid: S, tag_guid: N } = i;
|
|
335
|
+
if (!c[S])
|
|
336
336
|
return {
|
|
337
337
|
...c,
|
|
338
|
-
[
|
|
338
|
+
[S]: [N]
|
|
339
339
|
};
|
|
340
|
-
const g = [...c[
|
|
340
|
+
const g = [...c[S], N];
|
|
341
341
|
return {
|
|
342
342
|
...c,
|
|
343
|
-
[
|
|
343
|
+
[S]: g
|
|
344
344
|
};
|
|
345
345
|
}, {});
|
|
346
346
|
return l.map((c) => {
|
|
347
|
-
const i = A[c.account_guid],
|
|
347
|
+
const i = A[c.account_guid], S = c.category_guid ? d[c.category_guid] : null, N = s[c.guid] ?? [];
|
|
348
348
|
return {
|
|
349
349
|
...c,
|
|
350
350
|
account: i?.user_name || "Unknown",
|
|
351
351
|
accountIsClosed: i?.is_closed,
|
|
352
352
|
accountIsHidden: i?.is_hidden,
|
|
353
|
-
category:
|
|
354
|
-
isIncome: c.top_level_category_guid ===
|
|
353
|
+
category: S?.name || "Uncategorized",
|
|
354
|
+
isIncome: c.top_level_category_guid === Y.INCOME,
|
|
355
355
|
isPending: c.feed_status === y.PENDING,
|
|
356
356
|
number: i?.account_number || "",
|
|
357
357
|
payee: c.description,
|
|
358
358
|
tags: N
|
|
359
359
|
};
|
|
360
360
|
});
|
|
361
|
-
}, q = "uncategorized",
|
|
362
|
-
const s =
|
|
361
|
+
}, q = "uncategorized", J = (l, t, a, e, A, d) => {
|
|
362
|
+
const s = Q(l, A, d), c = tt(s, a, e);
|
|
363
363
|
return t.forEach((i) => {
|
|
364
|
-
const
|
|
365
|
-
c.splice(
|
|
364
|
+
const S = c.findIndex((g) => g.guid === i), N = d.filter((g) => g.parent_guid === i);
|
|
365
|
+
c.splice(S + 1, 0, ...N);
|
|
366
366
|
}), c;
|
|
367
|
-
},
|
|
367
|
+
}, Q = (l, t, a) => {
|
|
368
368
|
const {
|
|
369
369
|
accounts: e = [],
|
|
370
370
|
dateRange: A = { start: h(m()), end: f() },
|
|
@@ -372,24 +372,24 @@ const j = ({
|
|
|
372
372
|
searchTerm: s = "",
|
|
373
373
|
showSplits: c = !1
|
|
374
374
|
} = l;
|
|
375
|
-
return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!e.find((
|
|
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) => {
|
|
376
376
|
if (s === q && i.has_been_split)
|
|
377
377
|
return !1;
|
|
378
378
|
if (/^spl/i.test(s) && (i.has_been_split || i.parent_guid))
|
|
379
379
|
return !0;
|
|
380
380
|
const N = i.tags.some(
|
|
381
|
-
(w) =>
|
|
382
|
-
), g =
|
|
383
|
-
return
|
|
381
|
+
(w) => _(s, t.find((x) => x.guid === w)?.name)
|
|
382
|
+
), g = $(i.date);
|
|
383
|
+
return _(s, i.payee) || _(s, i.feed_description) || _(s, i.category) || _(s, I(g, C.MONTH)) || _(s, I(g, C.DAY)) || _(s, I(g, C.FULL_MONTH_DAY)) || _(s, I(g, C.MONTH_DAY_YEAR)) || _(s, W(g, k)) || _(s, i.account) || _(s, `${i.amount}`) || _(s, i.memo) || N;
|
|
384
384
|
});
|
|
385
|
-
},
|
|
385
|
+
}, tt = (l, t, a) => [...l].sort((e, A) => {
|
|
386
386
|
const d = t, s = (e[d] || "") > (A[d] || "");
|
|
387
387
|
let c = s ? -1 : 1, i = s ? 1 : -1;
|
|
388
388
|
return (t === L.DATE || t === L.AMOUNT) && (c = s ? 1 : -1, i = s ? -1 : 1), a === G.ASC ? c : i;
|
|
389
|
-
}),
|
|
389
|
+
}), _ = (l, t) => {
|
|
390
390
|
const a = l.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
|
|
391
391
|
return a.every((A) => e.indexOf(A) > -1);
|
|
392
|
-
},
|
|
392
|
+
}, at = {
|
|
393
393
|
account_guid: "",
|
|
394
394
|
amount: 0,
|
|
395
395
|
currency_code: "",
|
|
@@ -418,16 +418,16 @@ const j = ({
|
|
|
418
418
|
memo: void 0,
|
|
419
419
|
tags: []
|
|
420
420
|
};
|
|
421
|
-
class
|
|
421
|
+
class et {
|
|
422
422
|
beginDate = h(/* @__PURE__ */ new Date());
|
|
423
|
-
endDate =
|
|
423
|
+
endDate = z(/* @__PURE__ */ new Date());
|
|
424
424
|
expandedSplits = [];
|
|
425
425
|
height = 550;
|
|
426
426
|
width = 1e3;
|
|
427
427
|
shouldDisableDrawerScroll = !1;
|
|
428
428
|
searchValue = "";
|
|
429
429
|
selectedAccountGuids = [];
|
|
430
|
-
manualTransaction =
|
|
430
|
+
manualTransaction = at;
|
|
431
431
|
isAmountValid = !1;
|
|
432
432
|
showInsights = !1;
|
|
433
433
|
constructor() {
|
|
@@ -457,7 +457,7 @@ class st {
|
|
|
457
457
|
this.manualTransaction = t;
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class ft {
|
|
461
461
|
globalStore;
|
|
462
462
|
uiStore;
|
|
463
463
|
api = new D("/", "");
|
|
@@ -477,14 +477,14 @@ class mt {
|
|
|
477
477
|
transactionRules = [];
|
|
478
478
|
transactionRulesLoaded = !1;
|
|
479
479
|
transactionRulesLoading = !1;
|
|
480
|
-
cachedStartDate =
|
|
480
|
+
cachedStartDate = v(m(), 90);
|
|
481
481
|
filter = {};
|
|
482
482
|
isLoading = !0;
|
|
483
483
|
sortColumn = L.DATE;
|
|
484
484
|
sortDirection = G.DESC;
|
|
485
|
-
onAnalyticEvent =
|
|
485
|
+
onAnalyticEvent = j;
|
|
486
486
|
constructor(t) {
|
|
487
|
-
this.globalStore = t, this.uiStore = new
|
|
487
|
+
this.globalStore = t, this.uiStore = new et(), this.api = new D(
|
|
488
488
|
t.endpoint,
|
|
489
489
|
t.sessionToken,
|
|
490
490
|
t.onError
|
|
@@ -512,7 +512,7 @@ class mt {
|
|
|
512
512
|
) : [];
|
|
513
513
|
}
|
|
514
514
|
get sortedTransactions() {
|
|
515
|
-
return
|
|
515
|
+
return J(
|
|
516
516
|
this.filter,
|
|
517
517
|
this.uiStore.expandedSplits,
|
|
518
518
|
this.sortColumn,
|
|
@@ -522,7 +522,7 @@ class mt {
|
|
|
522
522
|
);
|
|
523
523
|
}
|
|
524
524
|
get sortedTransactionsWithSplits() {
|
|
525
|
-
return
|
|
525
|
+
return F(this.sortedTransactions, this.transactions);
|
|
526
526
|
}
|
|
527
527
|
setAssociatedBeats = (t) => {
|
|
528
528
|
this.associatedBeats = t, this.associatedBeatsLoading = !1, this.associatedBeatsLoaded = !0;
|
|
@@ -573,7 +573,7 @@ class mt {
|
|
|
573
573
|
loadAssociatedBeats = async (t) => {
|
|
574
574
|
if (this.associatedBeatsLoading) return;
|
|
575
575
|
this.associatedBeatsLoading = !0;
|
|
576
|
-
const a = t ?
|
|
576
|
+
const a = t ? K(t, { representation: "date" }) : void 0;
|
|
577
577
|
try {
|
|
578
578
|
const e = await this.beatApi.getBeatsWithAssociatedTransaction(a);
|
|
579
579
|
this.setAssociatedBeats(e);
|
|
@@ -644,7 +644,7 @@ class mt {
|
|
|
644
644
|
}
|
|
645
645
|
};
|
|
646
646
|
setFilter = (t) => {
|
|
647
|
-
this.filter = t, t.dateRange &&
|
|
647
|
+
this.filter = t, t.dateRange && V(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start).then(() => {
|
|
648
648
|
t.dateRange && (this.cachedStartDate = t.dateRange.start);
|
|
649
649
|
});
|
|
650
650
|
};
|
|
@@ -699,7 +699,7 @@ class mt {
|
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
701
|
export {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
at as D,
|
|
703
|
+
pt as S,
|
|
704
|
+
ft as T
|
|
705
705
|
};
|