@mx-cartographer/experiences 7.10.28 → 7.10.29
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
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l } from "react";
|
|
3
|
+
import p from "@mui/material/IconButton";
|
|
4
|
+
import f from "@mui/material/Stack";
|
|
5
|
+
import h from "@mui/material/Tooltip";
|
|
6
|
+
import { Text as a, Icon as d, IconWeight as u } from "@mxenabled/mxui";
|
|
7
|
+
import { makeAutoObservable as c } from "mobx";
|
|
8
|
+
import { addDays as x } from "date-fns/addDays";
|
|
9
|
+
import { differenceInDays as g } from "date-fns/differenceInDays";
|
|
10
|
+
import { endOfMonth as S } from "date-fns/endOfMonth";
|
|
11
|
+
import { isBefore as I } from "date-fns/isBefore";
|
|
12
|
+
import { startOfToday as s } from "date-fns/startOfToday";
|
|
13
|
+
const b = ({
|
|
14
|
+
body: o,
|
|
15
|
+
iconName: e = "info",
|
|
16
|
+
title: n
|
|
17
|
+
}) => {
|
|
18
|
+
const [i, r] = l(!1);
|
|
19
|
+
return /* @__PURE__ */ t(
|
|
20
|
+
h,
|
|
21
|
+
{
|
|
22
|
+
open: i,
|
|
23
|
+
title: /* @__PURE__ */ m(f, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
|
|
24
|
+
/* @__PURE__ */ t(a, { bold: !0, variant: "Body", children: n }),
|
|
25
|
+
/* @__PURE__ */ t(a, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
|
|
26
|
+
] }),
|
|
27
|
+
children: /* @__PURE__ */ t(
|
|
28
|
+
p,
|
|
29
|
+
{
|
|
30
|
+
"aria-label": n,
|
|
31
|
+
onClick: () => r(!i),
|
|
32
|
+
onMouseEnter: () => r(!0),
|
|
33
|
+
onMouseLeave: () => r(!1),
|
|
34
|
+
sx: {
|
|
35
|
+
minHeight: 0,
|
|
36
|
+
minWidth: 0,
|
|
37
|
+
p: 0
|
|
38
|
+
},
|
|
39
|
+
children: /* @__PURE__ */ t(
|
|
40
|
+
d,
|
|
41
|
+
{
|
|
42
|
+
name: e,
|
|
43
|
+
sx: { color: "primary.main", fontSize: 16 },
|
|
44
|
+
weight: u.Dark
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}, B = b;
|
|
52
|
+
class w {
|
|
53
|
+
// Cashflow is hard-coded to display 30 days starting from today
|
|
54
|
+
dateRange = { start: s(), end: x(s(), 30) };
|
|
55
|
+
isDirty = !1;
|
|
56
|
+
nextIncome = void 0;
|
|
57
|
+
upcomingExpenses = [];
|
|
58
|
+
selectedCashAccounts = [];
|
|
59
|
+
constructor() {
|
|
60
|
+
c(this);
|
|
61
|
+
}
|
|
62
|
+
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
63
|
+
get daysUntilNextIncome() {
|
|
64
|
+
return this.nextIncome ? Math.abs(g(s(), this.nextIncome.expectedDate)) : 0;
|
|
65
|
+
}
|
|
66
|
+
// Returns the expenses (Activities) until the next income activity or the end of the month
|
|
67
|
+
// if there is no income activity
|
|
68
|
+
get expensesTilNextIncome() {
|
|
69
|
+
return this.upcomingExpenses.filter(
|
|
70
|
+
(e) => I(e.expectedDate, this.nextIncome?.expectedDate || S(/* @__PURE__ */ new Date()))
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
setNextIncome = (e) => {
|
|
74
|
+
this.nextIncome = e;
|
|
75
|
+
};
|
|
76
|
+
setUpcomingExpenses = (e) => {
|
|
77
|
+
this.upcomingExpenses = e;
|
|
78
|
+
};
|
|
79
|
+
setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
|
|
80
|
+
}
|
|
81
|
+
class N {
|
|
82
|
+
globalStore;
|
|
83
|
+
uiStore;
|
|
84
|
+
constructor(e) {
|
|
85
|
+
this.globalStore = e, this.uiStore = new w(), c(this);
|
|
86
|
+
}
|
|
87
|
+
completeOnboarding = async () => {
|
|
88
|
+
const e = {
|
|
89
|
+
...this.globalStore.userStore.userProfile,
|
|
90
|
+
has_completed_cash_flow_onboarding: !0
|
|
91
|
+
};
|
|
92
|
+
await this.globalStore.userStore.updateUserProfile(e);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
N as C,
|
|
97
|
+
B as I
|
|
98
|
+
};
|
|
@@ -10,8 +10,8 @@ import se from "@mui/material/styles/useTheme";
|
|
|
10
10
|
import { Text as m, P as N, Icon as M, InstitutionLogo as Ce, H2 as de, H3 as Ve } from "@mxenabled/mxui";
|
|
11
11
|
import { G as Ye, t as me, u as L, p as ce, d as Ne, b as P, i as U, g as ke, a as Qe, h as He, o as Ke } from "../hooks-DWJQ4phS.mjs";
|
|
12
12
|
import { C as R } from "../CurrencyText-C-85TnUF.mjs";
|
|
13
|
-
import { I as ue } from "../CashflowStore-
|
|
14
|
-
import { C as qn } from "../CashflowStore-
|
|
13
|
+
import { I as ue } from "../CashflowStore-DEdQJU5i.mjs";
|
|
14
|
+
import { C as qn } from "../CashflowStore-DEdQJU5i.mjs";
|
|
15
15
|
import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
16
16
|
import { L as Z } from "../Loader-D3rjKx72.mjs";
|
|
17
17
|
import { b as $ } from "../Localization-2MODESHW.mjs";
|
package/dist/common/index.es.js
CHANGED
|
@@ -25,8 +25,8 @@ import { S as gs } from "../TransactionStore-B-fc3CsB.mjs";
|
|
|
25
25
|
import { T as fs } from "../TabContentContainer-j01JYR_7.mjs";
|
|
26
26
|
import { I as ys } from "../IconBacking-B9oC6uL2.mjs";
|
|
27
27
|
import { D as bs, F as ws, c as Cs, d as Ds, R as As, S as Es } from "../RecurringTransactions-B_I4_FGO.mjs";
|
|
28
|
-
import { C as Q } from "../CashflowStore-
|
|
29
|
-
import { I as Ts } from "../CashflowStore-
|
|
28
|
+
import { C as Q } from "../CashflowStore-DEdQJU5i.mjs";
|
|
29
|
+
import { I as Ts } from "../CashflowStore-DEdQJU5i.mjs";
|
|
30
30
|
import { d as K } from "../GoalStore-ZZir5h81.mjs";
|
|
31
31
|
import { C as vs, G as Bs, M as ks, T as Ms } from "../GoalStore-ZZir5h81.mjs";
|
|
32
32
|
import { C as Us } from "../CurrencyText-C-85TnUF.mjs";
|
package/package.json
CHANGED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import c from "@mui/material/IconButton";
|
|
3
|
-
import m from "@mui/material/Stack";
|
|
4
|
-
import l from "@mui/material/Tooltip";
|
|
5
|
-
import { Text as s, Icon as p, IconWeight as h } from "@mxenabled/mxui";
|
|
6
|
-
import { makeAutoObservable as i } from "mobx";
|
|
7
|
-
import { addDays as d } from "date-fns/addDays";
|
|
8
|
-
import { differenceInDays as f } from "date-fns/differenceInDays";
|
|
9
|
-
import { endOfMonth as x } from "date-fns/endOfMonth";
|
|
10
|
-
import { isBefore as u } from "date-fns/isBefore";
|
|
11
|
-
import { startOfToday as r } from "date-fns/startOfToday";
|
|
12
|
-
const g = ({
|
|
13
|
-
body: o,
|
|
14
|
-
iconName: e = "info",
|
|
15
|
-
title: n
|
|
16
|
-
}) => /* @__PURE__ */ t(
|
|
17
|
-
l,
|
|
18
|
-
{
|
|
19
|
-
enterTouchDelay: 500,
|
|
20
|
-
title: /* @__PURE__ */ a(m, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
|
|
21
|
-
/* @__PURE__ */ t(s, { bold: !0, variant: "Body", children: n }),
|
|
22
|
-
/* @__PURE__ */ t(s, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
|
|
23
|
-
] }),
|
|
24
|
-
children: /* @__PURE__ */ t(
|
|
25
|
-
c,
|
|
26
|
-
{
|
|
27
|
-
"aria-label": n,
|
|
28
|
-
sx: {
|
|
29
|
-
minHeight: 0,
|
|
30
|
-
minWidth: 0,
|
|
31
|
-
p: 0
|
|
32
|
-
},
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
34
|
-
p,
|
|
35
|
-
{
|
|
36
|
-
name: e,
|
|
37
|
-
sx: { color: "primary.main", fontSize: 16 },
|
|
38
|
-
weight: h.Dark
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
), E = g;
|
|
45
|
-
class I {
|
|
46
|
-
// Cashflow is hard-coded to display 30 days starting from today
|
|
47
|
-
dateRange = { start: r(), end: d(r(), 30) };
|
|
48
|
-
isDirty = !1;
|
|
49
|
-
nextIncome = void 0;
|
|
50
|
-
upcomingExpenses = [];
|
|
51
|
-
selectedCashAccounts = [];
|
|
52
|
-
constructor() {
|
|
53
|
-
i(this);
|
|
54
|
-
}
|
|
55
|
-
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
56
|
-
get daysUntilNextIncome() {
|
|
57
|
-
return this.nextIncome ? Math.abs(f(r(), this.nextIncome.expectedDate)) : 0;
|
|
58
|
-
}
|
|
59
|
-
// Returns the expenses (Activities) until the next income activity or the end of the month
|
|
60
|
-
// if there is no income activity
|
|
61
|
-
get expensesTilNextIncome() {
|
|
62
|
-
return this.upcomingExpenses.filter(
|
|
63
|
-
(e) => u(e.expectedDate, this.nextIncome?.expectedDate || x(/* @__PURE__ */ new Date()))
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
setNextIncome = (e) => {
|
|
67
|
-
this.nextIncome = e;
|
|
68
|
-
};
|
|
69
|
-
setUpcomingExpenses = (e) => {
|
|
70
|
-
this.upcomingExpenses = e;
|
|
71
|
-
};
|
|
72
|
-
setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
|
|
73
|
-
}
|
|
74
|
-
class _ {
|
|
75
|
-
globalStore;
|
|
76
|
-
uiStore;
|
|
77
|
-
constructor(e) {
|
|
78
|
-
this.globalStore = e, this.uiStore = new I(), i(this);
|
|
79
|
-
}
|
|
80
|
-
completeOnboarding = async () => {
|
|
81
|
-
const e = {
|
|
82
|
-
...this.globalStore.userStore.userProfile,
|
|
83
|
-
has_completed_cash_flow_onboarding: !0
|
|
84
|
-
};
|
|
85
|
-
await this.globalStore.userStore.updateUserProfile(e);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export {
|
|
89
|
-
_ as C,
|
|
90
|
-
E as I
|
|
91
|
-
};
|