@mx-cartographer/experiences 7.8.2-alpha.bb4 → 7.8.2-alpha.bb5
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 +4 -0
- package/dist/{TransactionStore-DUki-08W.mjs → TransactionStore-DcBF3oIZ.mjs} +35 -35
- package/dist/common/index.es.js +2 -2
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +2 -1
- package/dist/goals/index.es.js +544 -639
- package/dist/transactions/index.es.js +183 -185
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { makeAutoObservable as
|
|
8
|
-
import { endOfToday as
|
|
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 B from "@mui/material/Tooltip";
|
|
7
|
+
import { makeAutoObservable as p, toJS as K } from "mobx";
|
|
8
|
+
import { endOfToday as f } from "date-fns/endOfToday";
|
|
9
9
|
import { formatISO as V } from "date-fns/formatISO";
|
|
10
10
|
import { getUnixTime as O } from "date-fns/getUnixTime";
|
|
11
11
|
import { isBefore as v } from "date-fns/isBefore";
|
|
12
12
|
import { startOfMonth as h } from "date-fns/startOfMonth";
|
|
13
|
-
import { startOfToday as
|
|
13
|
+
import { startOfToday as m } from "date-fns/startOfToday";
|
|
14
14
|
import { subDays as Y } from "date-fns/subDays";
|
|
15
|
-
import { O as n, a as
|
|
16
|
-
import { T as
|
|
15
|
+
import { O as n, a as y, T as b } from "./User-B0LnmiKO.mjs";
|
|
16
|
+
import { T as D } from "./TransactionApi-CjBoLleL.mjs";
|
|
17
17
|
import { b as F } from "./Category-CevNQ03n.mjs";
|
|
18
18
|
import { f as W } from "./exportTransactionsToCSV-DtQ7ovAR.mjs";
|
|
19
19
|
import { format as $ } from "date-fns/format";
|
|
20
20
|
import { fromUnixTime as k } from "date-fns/fromUnixTime";
|
|
21
21
|
import { f as I, D as C, O as z } from "./Dialog-B4PI-_bL.mjs";
|
|
22
22
|
import { endOfMonth as X } from "date-fns/endOfMonth";
|
|
23
|
-
import { B as
|
|
23
|
+
import { B as u } from "./BeatApi-De2IaqH2.mjs";
|
|
24
24
|
const j = ({
|
|
25
25
|
checked: l = !1,
|
|
26
26
|
label: t,
|
|
@@ -28,9 +28,9 @@ const j = ({
|
|
|
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__ */ E(
|
|
33
|
-
|
|
33
|
+
M,
|
|
34
34
|
{
|
|
35
35
|
bgcolor: "background.paper",
|
|
36
36
|
border: `${l ? 3 : 1}px solid`,
|
|
@@ -41,11 +41,11 @@ const j = ({
|
|
|
41
41
|
pr: 8,
|
|
42
42
|
py: 4,
|
|
43
43
|
sx: { "&:hover": { borderColor: d.palette.action.active }, ...a },
|
|
44
|
-
children: /* @__PURE__ */ E(
|
|
45
|
-
|
|
44
|
+
children: /* @__PURE__ */ E(B, { title: e, children: /* @__PURE__ */ E(
|
|
45
|
+
H,
|
|
46
46
|
{
|
|
47
47
|
control: /* @__PURE__ */ E(
|
|
48
|
-
|
|
48
|
+
P,
|
|
49
49
|
{
|
|
50
50
|
disableRipple: !0,
|
|
51
51
|
sx: { "&.Mui-checked": { color: d.palette.action.active } }
|
|
@@ -59,7 +59,7 @@ const j = ({
|
|
|
59
59
|
) })
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
}, ft = j,
|
|
62
|
+
}, ft = j, G = {
|
|
63
63
|
ASC: "ASC",
|
|
64
64
|
DESC: "DESC",
|
|
65
65
|
DIRECTION: {
|
|
@@ -108,7 +108,7 @@ const j = ({
|
|
|
108
108
|
TRANSACTION: "Transaction",
|
|
109
109
|
TRANSACTIONS_LIST: "Transactions List",
|
|
110
110
|
UNHIDE_TRANSACTION: "Unhide Transaction"
|
|
111
|
-
},
|
|
111
|
+
}, R = {
|
|
112
112
|
// splits
|
|
113
113
|
[n.ON_TRANSACTION_SPLIT_CLICK]: {
|
|
114
114
|
action: o.SELECT,
|
|
@@ -322,7 +322,7 @@ const j = ({
|
|
|
322
322
|
category: T.TRANSACTIONS_WIDGET,
|
|
323
323
|
label: r.DELETE_TRANSACTION
|
|
324
324
|
}
|
|
325
|
-
}, J = async (l, t) => !t || !
|
|
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",
|
|
@@ -352,7 +352,7 @@ const j = ({
|
|
|
352
352
|
accountIsHidden: i?.is_hidden,
|
|
353
353
|
category: _?.name || "Uncategorized",
|
|
354
354
|
isIncome: c.top_level_category_guid === F.INCOME,
|
|
355
|
-
isPending: c.feed_status ===
|
|
355
|
+
isPending: c.feed_status === y.PENDING,
|
|
356
356
|
number: i?.account_number || "",
|
|
357
357
|
payee: c.description,
|
|
358
358
|
tags: N
|
|
@@ -367,7 +367,7 @@ const j = ({
|
|
|
367
367
|
}, tt = (l, t, a) => {
|
|
368
368
|
const {
|
|
369
369
|
accounts: e = [],
|
|
370
|
-
dateRange: A = { start: h(
|
|
370
|
+
dateRange: A = { start: h(m()), end: f() },
|
|
371
371
|
custom: d = () => !0,
|
|
372
372
|
searchTerm: s = "",
|
|
373
373
|
showSplits: c = !1
|
|
@@ -378,14 +378,14 @@ const j = ({
|
|
|
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
|
-
(
|
|
381
|
+
(w) => S(s, t.find((x) => x.guid === w)?.name)
|
|
382
382
|
), g = k(i.date);
|
|
383
383
|
return S(s, i.payee) || S(s, i.feed_description) || S(s, i.category) || S(s, I(g, C.MONTH)) || S(s, I(g, C.DAY)) || S(s, I(g, C.FULL_MONTH_DAY)) || S(s, I(g, C.MONTH_DAY_YEAR)) || S(s, $(g, z)) || S(s, i.account) || S(s, `${i.amount}`) || S(s, i.memo) || N;
|
|
384
384
|
});
|
|
385
385
|
}, at = (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
|
-
return (t === L.DATE || t === L.AMOUNT) && (c = s ? 1 : -1, i = s ? -1 : 1), a ===
|
|
388
|
+
return (t === L.DATE || t === L.AMOUNT) && (c = s ? 1 : -1, i = s ? -1 : 1), a === G.ASC ? c : i;
|
|
389
389
|
}), S = (l, t) => {
|
|
390
390
|
const a = l.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
|
|
391
391
|
return a.every((A) => e.indexOf(A) > -1);
|
|
@@ -397,7 +397,7 @@ const j = ({
|
|
|
397
397
|
description: "",
|
|
398
398
|
duplicate: !1,
|
|
399
399
|
feed_description: "",
|
|
400
|
-
feed_status:
|
|
400
|
+
feed_status: y.POSTED,
|
|
401
401
|
feed_transaction_date: 0,
|
|
402
402
|
has_been_split: !1,
|
|
403
403
|
has_been_viewed: !1,
|
|
@@ -410,7 +410,7 @@ const j = ({
|
|
|
410
410
|
is_subscription: !1,
|
|
411
411
|
is_void: !1,
|
|
412
412
|
revision: 1,
|
|
413
|
-
transaction_type:
|
|
413
|
+
transaction_type: b.DEBIT,
|
|
414
414
|
user_guid: "",
|
|
415
415
|
is_duplicate: !1,
|
|
416
416
|
feed_transacted_at: 0,
|
|
@@ -431,7 +431,7 @@ class st {
|
|
|
431
431
|
isAmountValid = !1;
|
|
432
432
|
showInsights = !1;
|
|
433
433
|
constructor() {
|
|
434
|
-
|
|
434
|
+
p(this);
|
|
435
435
|
}
|
|
436
436
|
setDateRange = (t, a) => {
|
|
437
437
|
this.beginDate = t, this.endDate = a;
|
|
@@ -460,8 +460,8 @@ class st {
|
|
|
460
460
|
class mt {
|
|
461
461
|
globalStore;
|
|
462
462
|
uiStore;
|
|
463
|
-
api = new
|
|
464
|
-
beatApi = new
|
|
463
|
+
api = new D("/", "");
|
|
464
|
+
beatApi = new u("/", "");
|
|
465
465
|
associatedBeats = [];
|
|
466
466
|
associatedBeatsLoaded = !1;
|
|
467
467
|
associatedBeatsLoading = !1;
|
|
@@ -477,18 +477,18 @@ class mt {
|
|
|
477
477
|
transactionRules = [];
|
|
478
478
|
transactionRulesLoaded = !1;
|
|
479
479
|
transactionRulesLoading = !1;
|
|
480
|
-
cachedStartDate = Y(
|
|
480
|
+
cachedStartDate = Y(m(), 90);
|
|
481
481
|
filter = {};
|
|
482
482
|
isLoading = !0;
|
|
483
483
|
sortColumn = L.DATE;
|
|
484
|
-
sortDirection =
|
|
484
|
+
sortDirection = G.DESC;
|
|
485
485
|
onAnalyticEvent = J;
|
|
486
486
|
constructor(t) {
|
|
487
|
-
this.globalStore = t, this.uiStore = new st(), this.api = new
|
|
487
|
+
this.globalStore = t, this.uiStore = new st(), this.api = new D(
|
|
488
488
|
t.endpoint,
|
|
489
489
|
t.sessionToken,
|
|
490
490
|
t.onError
|
|
491
|
-
), this.beatApi = new
|
|
491
|
+
), this.beatApi = new u(t.endpoint, t.sessionToken, t.onError), p(this);
|
|
492
492
|
}
|
|
493
493
|
loadTransactionData = async () => {
|
|
494
494
|
this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
|
|
@@ -512,7 +512,7 @@ class mt {
|
|
|
512
512
|
) : [];
|
|
513
513
|
}
|
|
514
514
|
get sortedTransactions() {
|
|
515
|
-
return console.warn("Sorting & Filtering: ",
|
|
515
|
+
return console.warn("Sorting & Filtering: ", K(this.filter)), Q(
|
|
516
516
|
this.filter,
|
|
517
517
|
this.uiStore.expandedSplits,
|
|
518
518
|
this.sortColumn,
|
|
@@ -566,7 +566,7 @@ class mt {
|
|
|
566
566
|
const a = await this.api.addTransaction(t);
|
|
567
567
|
if (a) {
|
|
568
568
|
this.setTransactions([a, ...this.transactions]);
|
|
569
|
-
const e = a.transaction_type ===
|
|
569
|
+
const e = a.transaction_type === b.CREDIT ? a.amount : -a.amount;
|
|
570
570
|
this.globalStore.accountStore.updateAccountBalance(a.account_guid, e);
|
|
571
571
|
}
|
|
572
572
|
};
|
|
@@ -615,7 +615,7 @@ class mt {
|
|
|
615
615
|
try {
|
|
616
616
|
const a = await this.api.getTransactionsByDateRange(
|
|
617
617
|
O(t),
|
|
618
|
-
O(
|
|
618
|
+
O(f())
|
|
619
619
|
);
|
|
620
620
|
this.setTransactions(a);
|
|
621
621
|
} catch (a) {
|
package/dist/common/index.es.js
CHANGED
|
@@ -18,8 +18,8 @@ import { C as Ms } from "../CurrencyInput-itK0R3wV.mjs";
|
|
|
18
18
|
import { L as Us } from "../Loader-DUaFpDGv.mjs";
|
|
19
19
|
import { R as Rs } from "../ResponsiveButton-DZFp78fJ.mjs";
|
|
20
20
|
import { S as Os } from "../SearchBox-B2_zLv8-.mjs";
|
|
21
|
-
import { T as it } from "../TransactionStore-
|
|
22
|
-
import { S as Fs } from "../TransactionStore-
|
|
21
|
+
import { T as it } from "../TransactionStore-DcBF3oIZ.mjs";
|
|
22
|
+
import { S as Fs } from "../TransactionStore-DcBF3oIZ.mjs";
|
|
23
23
|
import { T as Gs } from "../TabContentContainer-j01JYR_7.mjs";
|
|
24
24
|
import { I as qs } from "../IconBacking-B9oC6uL2.mjs";
|
|
25
25
|
import { D as Qs, F as Xs, c as js, d as Ks, R as zs, S as Vs } from "../RepeatingTransaction-miZVnk_A.mjs";
|
|
@@ -2,6 +2,7 @@ import { Goal } from '../../../common';
|
|
|
2
2
|
interface OngoingListItemProps {
|
|
3
3
|
goal: Goal;
|
|
4
4
|
index: number;
|
|
5
|
+
onUpClick?: (goal: Goal) => void;
|
|
5
6
|
}
|
|
6
|
-
export declare const OngoingListItem: ({ goal, index }: OngoingListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const OngoingListItem: ({ goal, index, onUpClick }: OngoingListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|