@mx-cartographer/experiences 7.2.16-alpha.mm0 → 8.0.0-alpha.bb1
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-vp_TAbGt.mjs → Account-Bxw0_4FU.mjs} +1 -1
- package/dist/{AccountDetailsContent-CsH1w_GZ.mjs → AccountDetailsContent-CAM9y39M.mjs} +6 -6
- package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-JtSX6Uf9.mjs} +4 -4
- package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-C9FlatNb.mjs} +2 -2
- package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-JFMZROh7.mjs} +7 -7
- package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-BgNOyMdp.mjs} +74 -100
- package/dist/Accounts-BRf_YeTf.mjs +27 -0
- package/dist/CategoryStore-yHI0hWmK.mjs +174 -0
- package/dist/CategoryUtil-pZRIYOgN.mjs +80 -0
- package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-BQNs-hjk.mjs} +9 -9
- package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-ByGQE7D5.mjs} +3 -3
- package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-C9bblOgW.mjs} +1 -1
- package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-D-aB35SY.mjs} +151 -111
- package/dist/{ManageIncome-CV-bGuR-.mjs → ManageIncome-1s_q5W4X.mjs} +3 -3
- package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-DCsTZpuS.mjs} +2 -2
- package/dist/{NotificationSettings-5i3IywCi.mjs → NotificationSettings-DqrkNMod.mjs} +236 -238
- package/dist/{NotificationStore-C6PH6MKm.mjs → NotificationStore-BxP_P2dA.mjs} +23 -15
- package/dist/{RecurringSettings-G6_BbsIF.mjs → RecurringSettings-A_rAGCTP.mjs} +3 -3
- package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-DK8dWldr.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4YOD7_D.mjs} +29 -26
- package/dist/{TransactionDetails-CDtya0KS.mjs → TransactionDetails-oP1eSuiS.mjs} +1 -1
- package/dist/TransactionStore-ai3uII_r.mjs +690 -0
- package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-BHWANqT4.mjs} +1 -1
- package/dist/accounts/components/AccountsWidgetContent.d.ts +3 -0
- package/dist/accounts/index.es.js +184 -174
- package/dist/accounts/stores/AccountStore.d.ts +25 -22
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +499 -501
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +382 -384
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +5 -1
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/index.es.js +206 -214
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +1 -1
- package/dist/debts/index.es.js +375 -377
- package/dist/finstrong/index.es.js +415 -417
- package/dist/goals/index.es.js +557 -559
- package/dist/goals/stores/GoalStore.d.ts +17 -4
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +435 -437
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/index.es.js +172 -174
- package/dist/notifications/index.es.js +3 -3
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/index.es.js +173 -175
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +3 -2
- package/dist/settings/index.es.js +279 -285
- package/dist/spending/index.es.js +281 -283
- package/dist/transactions/index.es.js +6 -6
- package/dist/transactions/stores/TransactionStore.d.ts +21 -77
- package/dist/trends/index.es.js +4 -4
- package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-BUAApBIb.mjs} +1 -1
- package/package.json +4 -4
- package/dist/Accounts-C1QxUB-e.mjs +0 -9
- package/dist/CategoryStore-BCcpI3oJ.mjs +0 -183
- package/dist/CategoryUtil-BR3H5i6n.mjs +0 -78
- package/dist/TransactionStore-DxPLdF3B.mjs +0 -677
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
|
|
2
2
|
import { fromUnixTime as o, isSameDay as d } from "date-fns";
|
|
3
|
-
import { F as l, A as
|
|
3
|
+
import { F as l, A as a } from "./Fetch-87LIQbEA.mjs";
|
|
4
4
|
class s {
|
|
5
5
|
fetchInstance;
|
|
6
|
-
constructor(t, i,
|
|
7
|
-
this.fetchInstance = new l(t, i, void 0,
|
|
6
|
+
constructor(t, i, n) {
|
|
7
|
+
this.fetchInstance = new l(t, i, void 0, n);
|
|
8
8
|
}
|
|
9
|
-
getNotifications = () => this.fetchInstance.get(
|
|
9
|
+
getNotifications = () => this.fetchInstance.get(a.NOTIFICATIONS).then(
|
|
10
10
|
(t) => t.notifications.map((i) => i.notification)
|
|
11
11
|
).finally();
|
|
12
|
-
updateNotification = (t) => this.fetchInstance.put(`${
|
|
12
|
+
updateNotification = (t) => this.fetchInstance.put(`${a.NOTIFICATIONS}/${t.guid}`, {
|
|
13
13
|
guid: t.guid,
|
|
14
14
|
has_been_viewed: t.has_been_viewed
|
|
15
15
|
}).then((i) => i.notification).finally();
|
|
16
16
|
// Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
|
|
17
17
|
// A bug ticket has been filed to fix it, but should not require any changes here.
|
|
18
|
-
markAllAsViewed = (t) => this.fetchInstance.put(`${
|
|
18
|
+
markAllAsViewed = (t) => this.fetchInstance.put(`${a.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
|
|
19
19
|
}
|
|
20
20
|
const w = (e, t) => {
|
|
21
|
-
const i = o(t[e].delivered_at),
|
|
22
|
-
return !d(i,
|
|
21
|
+
const i = o(t[e].delivered_at), n = o(t[e - 1]?.delivered_at);
|
|
22
|
+
return !d(i, n);
|
|
23
23
|
};
|
|
24
24
|
function u(e) {
|
|
25
25
|
const i = Math.floor(Date.now() / 1e3);
|
|
26
|
-
return e.filter((
|
|
27
|
-
const r =
|
|
26
|
+
return e.filter((n) => {
|
|
27
|
+
const r = n.delivered_at;
|
|
28
28
|
return i - r <= 604800;
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@ class A {
|
|
|
33
33
|
api = new s("/", "");
|
|
34
34
|
isLoading = !0;
|
|
35
35
|
notifications = [];
|
|
36
|
-
|
|
36
|
+
notificationsLoaded = !1;
|
|
37
37
|
constructor(t) {
|
|
38
38
|
this.globalStore = t, this.api = new s(
|
|
39
39
|
t.endpoint,
|
|
@@ -45,15 +45,23 @@ class A {
|
|
|
45
45
|
get newNotifications() {
|
|
46
46
|
return this.recentNotifications.filter((t) => !t.has_been_viewed);
|
|
47
47
|
}
|
|
48
|
+
get recentNotifications() {
|
|
49
|
+
return u(this.notifications);
|
|
50
|
+
}
|
|
51
|
+
setNotifications = (t) => {
|
|
52
|
+
this.notifications = t, this.notificationsLoaded = !0;
|
|
53
|
+
};
|
|
48
54
|
loadNotifications = async () => {
|
|
55
|
+
this.isLoading = !0;
|
|
49
56
|
try {
|
|
50
|
-
this.isLoading = !0;
|
|
51
57
|
const t = await this.api.getNotifications();
|
|
52
|
-
|
|
53
|
-
this.notifications = t, this.recentNotifications = u(t), this.isLoading = !1;
|
|
54
|
-
});
|
|
58
|
+
this.setNotifications(t);
|
|
55
59
|
} catch (t) {
|
|
56
60
|
console.error(`Error occurred while loading notifications: ${t}`);
|
|
61
|
+
} finally {
|
|
62
|
+
h(() => {
|
|
63
|
+
this.isLoading = !1;
|
|
64
|
+
});
|
|
57
65
|
}
|
|
58
66
|
};
|
|
59
67
|
markAllAsViewed = async () => {
|
|
@@ -7,10 +7,10 @@ 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-1s_q5W4X.mjs";
|
|
11
11
|
import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactions-
|
|
13
|
-
import { A as m } from "./WidgetContainer-
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactions-DK8dWldr.mjs";
|
|
13
|
+
import { A as m } from "./WidgetContainer-BHWANqT4.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { repeatingTransactions: n } = A(), { onEvent: o } = f(), l = (r) => {
|
|
16
16
|
o(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4YOD7_D.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
import { endOfMonth as
|
|
1
|
+
import { makeAutoObservable as R, runInAction as o } from "mobx";
|
|
2
|
+
import { endOfMonth as f } from "date-fns/endOfMonth";
|
|
3
3
|
import { isAfter as p } from "date-fns/isAfter";
|
|
4
4
|
import { isBefore as I } from "date-fns/isBefore";
|
|
5
5
|
import { isSameDay as g } from "date-fns/isSameDay";
|
|
6
6
|
import { isWithinInterval as m } from "date-fns/isWithinInterval";
|
|
7
7
|
import { startOfMonth as S } from "date-fns/startOfMonth";
|
|
8
|
-
import { startOfToday as
|
|
8
|
+
import { startOfToday as i } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as y } from "date-fns/subDays";
|
|
10
|
-
import { F as x, A as
|
|
11
|
-
import { b as E,
|
|
10
|
+
import { F as x, A as c } from "./Fetch-87LIQbEA.mjs";
|
|
11
|
+
import { a as u, b as E, c as a, d } from "./RecurringTransactions-DK8dWldr.mjs";
|
|
12
12
|
var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
|
|
13
13
|
const U = 44;
|
|
14
14
|
class h {
|
|
@@ -16,36 +16,42 @@ class h {
|
|
|
16
16
|
constructor(e, t, n) {
|
|
17
17
|
this.fetchInstance = new x(e, t, void 0, n);
|
|
18
18
|
}
|
|
19
|
-
addRepeatingTransaction = async (e) => this.fetchInstance.post(
|
|
20
|
-
getRepeatingTransactions = async () => this.fetchInstance.get(
|
|
19
|
+
addRepeatingTransaction = async (e) => this.fetchInstance.post(c.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
|
|
20
|
+
getRepeatingTransactions = async () => this.fetchInstance.get(c.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
|
|
21
21
|
updateRepeatingTransaction = async (e) => this.fetchInstance.put(
|
|
22
|
-
`${
|
|
22
|
+
`${c.REPEATING_TRANSACTIONS}/${e.guid}`,
|
|
23
23
|
e
|
|
24
24
|
).then((t) => t.repeating_transaction);
|
|
25
|
-
deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${
|
|
25
|
+
deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${c.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
|
|
26
26
|
}
|
|
27
27
|
const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
|
|
28
28
|
class C {
|
|
29
29
|
globalStore;
|
|
30
30
|
api = new h("/", "");
|
|
31
|
-
transactions = [];
|
|
32
31
|
repeatingTransactions = [];
|
|
33
|
-
selectedDay;
|
|
34
|
-
dateRange = { start: S(c()), end: R(c()) };
|
|
35
32
|
isDataLoaded = !1;
|
|
33
|
+
selectedDay;
|
|
34
|
+
dateRange = { start: S(i()), end: f(i()) };
|
|
36
35
|
constructor(e) {
|
|
37
36
|
this.globalStore = e, this.api = new h(
|
|
38
37
|
e.endpoint,
|
|
39
38
|
e.sessionToken,
|
|
40
39
|
e.onError
|
|
41
|
-
),
|
|
40
|
+
), R(this);
|
|
41
|
+
}
|
|
42
|
+
get detailedRepeatingTransactions() {
|
|
43
|
+
return u(
|
|
44
|
+
this.globalStore.accountStore.visibleAccounts,
|
|
45
|
+
this.repeatingTransactions,
|
|
46
|
+
this.globalStore.transactionStore.transactions
|
|
47
|
+
);
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
50
|
* Returns all recurrences built from repeating transactions and filtered by accounts.
|
|
45
51
|
*/
|
|
46
52
|
get recurrences() {
|
|
47
53
|
const e = this.globalStore.accountStore.visibleAccounts;
|
|
48
|
-
return E(this.
|
|
54
|
+
return E(this.detailedRepeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
|
|
49
55
|
}
|
|
50
56
|
/**
|
|
51
57
|
* Returns all recurrences that have occurred in the past, including those that are paid or missed
|
|
@@ -61,7 +67,7 @@ class C {
|
|
|
61
67
|
*/
|
|
62
68
|
get upcomingRecurrences() {
|
|
63
69
|
return this.recurrences.filter(
|
|
64
|
-
(e) => p(e.expectedDate, y(
|
|
70
|
+
(e) => p(e.expectedDate, y(i(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
|
|
65
71
|
);
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
@@ -97,7 +103,7 @@ class C {
|
|
|
97
103
|
);
|
|
98
104
|
}
|
|
99
105
|
get nextIncomeRecurrence() {
|
|
100
|
-
return this.upcomingIncome.find((e) => p(e.expectedDate,
|
|
106
|
+
return this.upcomingIncome.find((e) => p(e.expectedDate, i()));
|
|
101
107
|
}
|
|
102
108
|
/**
|
|
103
109
|
* Returns the expense recurrences for the current month.
|
|
@@ -165,6 +171,9 @@ class C {
|
|
|
165
171
|
(e) => this.selectedDay && g(e.occurredOnDate || e.expectedDate, this.selectedDay)
|
|
166
172
|
);
|
|
167
173
|
}
|
|
174
|
+
setRepeatingTransactions = (e) => {
|
|
175
|
+
this.repeatingTransactions = e, this.isDataLoaded = !0;
|
|
176
|
+
};
|
|
168
177
|
/**
|
|
169
178
|
* Set the date range for filtering recurrences.
|
|
170
179
|
* @param dateRange - The date range to set.
|
|
@@ -183,13 +192,7 @@ class C {
|
|
|
183
192
|
loadRepeatingTransactions = async () => {
|
|
184
193
|
try {
|
|
185
194
|
const e = await this.api.getRepeatingTransactions();
|
|
186
|
-
|
|
187
|
-
this.repeatingTransactions = u(
|
|
188
|
-
this.globalStore.accountStore.visibleAccounts,
|
|
189
|
-
e,
|
|
190
|
-
this.globalStore.transactionStore.transactions
|
|
191
|
-
), this.isDataLoaded = !0;
|
|
192
|
-
});
|
|
195
|
+
this.setRepeatingTransactions(e);
|
|
193
196
|
} catch (e) {
|
|
194
197
|
console.error(`Error occurred while getting repeating transactions: ${e}`);
|
|
195
198
|
}
|
|
@@ -205,7 +208,7 @@ class C {
|
|
|
205
208
|
await this.globalStore.transactionStore.updateTransaction({
|
|
206
209
|
...t,
|
|
207
210
|
repeating_transaction_guid: n.guid
|
|
208
|
-
}),
|
|
211
|
+
}), o(() => {
|
|
209
212
|
this.repeatingTransactions = [
|
|
210
213
|
...this.repeatingTransactions,
|
|
211
214
|
...u(
|
|
@@ -225,7 +228,7 @@ class C {
|
|
|
225
228
|
*/
|
|
226
229
|
deleteRepeatingTransaction = async (e) => {
|
|
227
230
|
try {
|
|
228
|
-
await this.api.deleteRepeatingTransaction(e),
|
|
231
|
+
await this.api.deleteRepeatingTransaction(e), o(() => {
|
|
229
232
|
this.repeatingTransactions = [
|
|
230
233
|
...this.repeatingTransactions.filter((t) => t.guid !== e)
|
|
231
234
|
];
|
|
@@ -244,7 +247,7 @@ class C {
|
|
|
244
247
|
(T) => T.guid === t.guid
|
|
245
248
|
);
|
|
246
249
|
if (n < 0) return;
|
|
247
|
-
|
|
250
|
+
o(() => {
|
|
248
251
|
this.repeatingTransactions = [
|
|
249
252
|
...this.repeatingTransactions.slice(0, n),
|
|
250
253
|
...u(
|
|
@@ -17,7 +17,7 @@ import { fromUnixTime as W } from "date-fns/fromUnixTime";
|
|
|
17
17
|
import { isSameDay as Ne } from "date-fns/isSameDay";
|
|
18
18
|
import { h as Ye } from "./DateUtil-BcuH7ErC.mjs";
|
|
19
19
|
import { L as Ie } from "./Loader-DUaFpDGv.mjs";
|
|
20
|
-
import { A as P } from "./WidgetContainer-
|
|
20
|
+
import { A as P } from "./WidgetContainer-BHWANqT4.mjs";
|
|
21
21
|
import ne from "@mui/material/Paper";
|
|
22
22
|
import ce from "@mui/material/Button";
|
|
23
23
|
import je from "@mui/material/FormGroup";
|