@mx-cartographer/experiences 7.12.17 → 7.13.0
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/{AccountDetailsHeader-BkEF1gO-.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
- package/dist/{AccountFields-C_dcdCM7.mjs → AccountFields-CxqONzjY.mjs} +6 -6
- package/dist/AccountListItem-LcJVJysf.mjs +90 -0
- package/dist/{AccountStore-ypdfueW9.mjs → AccountStore-BNlTuxWN.mjs} +1 -1
- package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
- package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
- package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
- package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
- package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
- package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
- package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
- package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
- package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
- package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
- package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
- package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
- package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
- package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
- package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
- package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
- package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
- package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
- package/dist/accounts/index.es.js +107 -107
- package/dist/analytics/index.es.js +18 -18
- package/dist/budgets/index.es.js +182 -182
- package/dist/cashflow/index.es.js +223 -223
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +54 -64
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +469 -469
- package/dist/finstrong/index.es.js +68 -68
- package/dist/goals/index.es.js +437 -437
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +159 -159
- package/dist/investments/index.es.js +292 -292
- package/dist/merchants/index.es.js +12 -12
- package/dist/networth/index.es.js +175 -168
- package/dist/notifications/index.es.js +13 -13
- package/dist/recurringtransactions/index.es.js +69 -69
- package/dist/settings/index.es.js +187 -187
- package/dist/spending/index.es.js +58 -58
- package/dist/transactions/index.es.js +70 -70
- package/dist/trends/index.es.js +15 -15
- package/package.json +1 -1
- package/dist/AccountListItem-BAf03YhK.mjs +0 -90
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { observer as f } from "mobx-react-lite";
|
|
3
|
-
import
|
|
3
|
+
import s from "@mui/material/Stack";
|
|
4
4
|
import { H3 as T, InstitutionLogo as x, Text as l, H2 as D } from "@mxenabled/mxui";
|
|
5
5
|
import p from "react";
|
|
6
6
|
import { G as N, d as _, l as P, f as G, u as O } from "./hooks-BxkfR-Ff.mjs";
|
|
7
|
-
import { g as R } from "./AccountFields-
|
|
7
|
+
import { g as R } from "./AccountFields-CxqONzjY.mjs";
|
|
8
8
|
import { A as r } from "./Account-BiB1F8lL.mjs";
|
|
9
9
|
import w from "@mui/material/Card";
|
|
10
10
|
import v from "@mui/material/CardContent";
|
|
@@ -17,34 +17,34 @@ const C = () => {
|
|
|
17
17
|
if (!p.useContext(N))
|
|
18
18
|
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
|
19
19
|
return _().uiStore;
|
|
20
|
-
},
|
|
20
|
+
}, k = (o, e) => {
|
|
21
21
|
const c = [r.LOAN, r.MORTGAGE, r.PROPERTY].includes(
|
|
22
|
-
|
|
22
|
+
o
|
|
23
23
|
), n = [
|
|
24
24
|
r.CREDIT_CARD,
|
|
25
25
|
r.LINE_OF_CREDIT,
|
|
26
26
|
r.PREPAID,
|
|
27
27
|
r.CHECKING_LINE_OF_CREDIT
|
|
28
|
-
].includes(
|
|
28
|
+
].includes(o);
|
|
29
29
|
return c ? { title: e.label_payments, description: e.chart_title_payments } : n ? { title: e.label_payments_spend, description: e.chart_title_payments_spend } : { title: e.label_income_spend, description: e.chart_title_income_spend };
|
|
30
|
-
},
|
|
31
|
-
sx:
|
|
30
|
+
}, B = ({
|
|
31
|
+
sx: o,
|
|
32
32
|
ChartComponent: e,
|
|
33
33
|
header: c
|
|
34
34
|
}) => {
|
|
35
|
-
const { loadMonthlyCategoryTotals: n } = P(), { isInitialized:
|
|
35
|
+
const { loadMonthlyCategoryTotals: n } = P(), { isInitialized: i } = G(), { selectedAccount: d } = C(), [u, m] = p.useState(!1);
|
|
36
36
|
return p.useEffect(() => {
|
|
37
|
-
|
|
37
|
+
i && n([d]).finally(() => {
|
|
38
38
|
m(!0);
|
|
39
39
|
});
|
|
40
|
-
}, [
|
|
40
|
+
}, [i, d]), !i || !u ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ a(
|
|
41
41
|
w,
|
|
42
42
|
{
|
|
43
43
|
sx: {
|
|
44
44
|
"& .MuiCardContent-root:last-child": {
|
|
45
45
|
pb: 0
|
|
46
46
|
},
|
|
47
|
-
...
|
|
47
|
+
...o
|
|
48
48
|
},
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ t(L, { sx: { pb: 0 }, title: /* @__PURE__ */ t(T, { sx: { pb: 4 }, children: c }) }),
|
|
@@ -52,44 +52,44 @@ const C = () => {
|
|
|
52
52
|
]
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
}, F = f(
|
|
56
|
-
customDetailsChart:
|
|
55
|
+
}, F = f(B), V = ({
|
|
56
|
+
customDetailsChart: o,
|
|
57
57
|
ChartComponent: e
|
|
58
58
|
}) => {
|
|
59
|
-
const { institutions: c } = _(), { selectedAccount: n } = C(), { accounts:
|
|
59
|
+
const { institutions: c } = _(), { selectedAccount: n } = C(), { accounts: i } = O(), { firstSubtitle: d, firstValue: u, hasAvailableBalance: m, secondSubtitle: h, secondValue: b } = R(n, i), A = c.find(
|
|
60
60
|
(I) => I.guid === n?.institution_guid
|
|
61
|
-
),
|
|
61
|
+
), y = [
|
|
62
62
|
...M,
|
|
63
63
|
...U,
|
|
64
64
|
...Y
|
|
65
|
-
].includes(n.account_type), g = j(n), { title:
|
|
66
|
-
return /* @__PURE__ */ s
|
|
67
|
-
/* @__PURE__ */ s
|
|
65
|
+
].includes(n.account_type), g = j(n), { title: E, description: S } = k(n.account_type, i);
|
|
66
|
+
return /* @__PURE__ */ a(s, { bgcolor: "background.default", p: 24, children: [
|
|
67
|
+
/* @__PURE__ */ a(s, { gap: 12, children: [
|
|
68
68
|
/* @__PURE__ */ t(
|
|
69
69
|
x,
|
|
70
70
|
{
|
|
71
|
-
alt:
|
|
71
|
+
alt: i.institution_logo_alt,
|
|
72
72
|
institutionGuid: n.institution_guid || "",
|
|
73
73
|
size: 64
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */ t(l, { variant: "
|
|
76
|
+
/* @__PURE__ */ t(l, { variant: "body2", children: A?.name })
|
|
77
77
|
] }),
|
|
78
|
-
/* @__PURE__ */ s
|
|
78
|
+
/* @__PURE__ */ a(s, { gap: 8, mb: 24, mt: 4, children: [
|
|
79
79
|
/* @__PURE__ */ t(D, { children: g }),
|
|
80
|
-
/* @__PURE__ */ s
|
|
81
|
-
/* @__PURE__ */ t(l, { bold: m, variant: "
|
|
82
|
-
/* @__PURE__ */ t(l, { bold: !0, variant: "
|
|
80
|
+
/* @__PURE__ */ a(s, { direction: "row", justifyContent: "space-between", children: [
|
|
81
|
+
/* @__PURE__ */ t(l, { bold: m, variant: "body1", children: d }),
|
|
82
|
+
/* @__PURE__ */ t(l, { bold: !0, variant: "body1", children: z(u, "0,0.00") })
|
|
83
83
|
] }),
|
|
84
|
-
/* @__PURE__ */ s
|
|
85
|
-
/* @__PURE__ */ t(l, { variant: "
|
|
86
|
-
/* @__PURE__ */ t(l, { variant: "
|
|
84
|
+
/* @__PURE__ */ a(s, { direction: "row", justifyContent: "space-between", children: [
|
|
85
|
+
/* @__PURE__ */ t(l, { variant: "body2", children: h }),
|
|
86
|
+
/* @__PURE__ */ t(l, { variant: "body2", children: b })
|
|
87
87
|
] })
|
|
88
88
|
] }),
|
|
89
|
-
|
|
89
|
+
y && /* @__PURE__ */ t(s, { "aria-label": S, role: "img", children: o || /* @__PURE__ */ t(F, { ChartComponent: e, header: E }) })
|
|
90
90
|
] });
|
|
91
|
-
},
|
|
91
|
+
}, at = f(V);
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
at as A,
|
|
94
94
|
C as u
|
|
95
95
|
};
|
|
@@ -3,7 +3,7 @@ import { Icon as p, Text as y } from "@mxenabled/mxui";
|
|
|
3
3
|
import { A as d, a as v, P as h, b as F } from "./Account-BiB1F8lL.mjs";
|
|
4
4
|
import { i as T, u as D, a as A, b as g, c as O } from "./Accounts-o7ohkngR.mjs";
|
|
5
5
|
import { F as m } from "./Accounts-CseLC3lL.mjs";
|
|
6
|
-
import { f as _, i as b, a as N, b as
|
|
6
|
+
import { f as _, i as b, a as N, b as C } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
7
7
|
import { b as i } from "./Localization-CPkpIwIx.mjs";
|
|
8
8
|
import { f as o, D as f } from "./DateFormats-BMpMrZpW.mjs";
|
|
9
9
|
const x = (l, e) => {
|
|
@@ -88,7 +88,7 @@ const x = (l, e) => {
|
|
|
88
88
|
type: m.Date,
|
|
89
89
|
valueFormatter: (a) => i(
|
|
90
90
|
e.day_of_every_month,
|
|
91
|
-
|
|
91
|
+
C(a <= 31 ? a : new Date(a).getDate())
|
|
92
92
|
)
|
|
93
93
|
})), g(l) && r.push({
|
|
94
94
|
label: e.credit_limit,
|
|
@@ -104,7 +104,7 @@ const x = (l, e) => {
|
|
|
104
104
|
type: m.Currency,
|
|
105
105
|
valueFormatter: (a) => _(a, "0,0.00")
|
|
106
106
|
}), r;
|
|
107
|
-
},
|
|
107
|
+
}, S = (l, e) => {
|
|
108
108
|
let r = "", a = null, t = null, n = null, s = !1;
|
|
109
109
|
switch (l.account_type) {
|
|
110
110
|
case 1:
|
|
@@ -115,7 +115,7 @@ const x = (l, e) => {
|
|
|
115
115
|
default:
|
|
116
116
|
if (r = e.current_balance, a = l.balance, l.minimum_payment && l.payment_due_at) {
|
|
117
117
|
const c = typeof l.payment_due_at == "number" ? new Date(l.payment_due_at * 1e3) : l.payment_due_at;
|
|
118
|
-
t = /* @__PURE__ */ u(y, { component: "strong", variant: "
|
|
118
|
+
t = /* @__PURE__ */ u(y, { component: "strong", variant: "caption", children: i(
|
|
119
119
|
e.payment_due_on,
|
|
120
120
|
_(l.minimum_payment, "0,0.00"),
|
|
121
121
|
o(c, f.FULL_MONTH_DAY)
|
|
@@ -130,11 +130,11 @@ const x = (l, e) => {
|
|
|
130
130
|
hasAvailableBalance: s
|
|
131
131
|
};
|
|
132
132
|
}, B = (l, e) => l.reduce((a, t) => {
|
|
133
|
-
const s =
|
|
133
|
+
const s = S(t, e).firstValue || 0;
|
|
134
134
|
return a + s;
|
|
135
135
|
}, 0);
|
|
136
136
|
export {
|
|
137
137
|
x as a,
|
|
138
138
|
B as b,
|
|
139
|
-
|
|
139
|
+
S as g
|
|
140
140
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { observer as b } from "mobx-react-lite";
|
|
3
|
+
import I from "@mui/material/Badge";
|
|
4
|
+
import l from "@mui/material/Box";
|
|
5
|
+
import v from "@mui/material/ListItem";
|
|
6
|
+
import C from "@mui/material/ListItemAvatar";
|
|
7
|
+
import S from "@mui/material/ListItemButton";
|
|
8
|
+
import _ from "@mui/material/ListItemText";
|
|
9
|
+
import L from "@mui/material/styles/useTheme";
|
|
10
|
+
import { InstitutionLogo as A, Text as o } from "@mxenabled/mxui";
|
|
11
|
+
import { Error as B } from "@mxenabled/mx-icons";
|
|
12
|
+
import { I as j } from "./IconBacking-B9oC6uL2.mjs";
|
|
13
|
+
import { g as T } from "./AccountFields-CxqONzjY.mjs";
|
|
14
|
+
import { u as $ } from "./useAccountDisplayName-DKwT1mWv.mjs";
|
|
15
|
+
import { u as k } from "./hooks-BxkfR-Ff.mjs";
|
|
16
|
+
import { C as d } from "./Account-BiB1F8lL.mjs";
|
|
17
|
+
import { f as w } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
18
|
+
const E = {
|
|
19
|
+
gridRow: 1,
|
|
20
|
+
gridColumn: 1,
|
|
21
|
+
zIndex: 2
|
|
22
|
+
}, M = ({ size: t = 20 }) => /* @__PURE__ */ e(j, { size: t, children: /* @__PURE__ */ e(B, { color: "error", filled: !0, sx: { fontSize: t, ...E } }) }), z = ({
|
|
23
|
+
account: t,
|
|
24
|
+
onRowClick: n,
|
|
25
|
+
listItemProps: c,
|
|
26
|
+
shouldShowConnectionStatus: p = !1
|
|
27
|
+
}) => {
|
|
28
|
+
const u = L(), f = $(t), { accounts: i } = k(), { firstSubtitle: h, firstValue: g, secondSubtitle: x, secondValue: y } = T(
|
|
29
|
+
t,
|
|
30
|
+
i
|
|
31
|
+
);
|
|
32
|
+
let s;
|
|
33
|
+
(t.connectionStatus === d.Error || t.connectionStatus === d.RequiresMfa) && (s = /* @__PURE__ */ e(M, { size: 16 }));
|
|
34
|
+
const a = /* @__PURE__ */ r(m, { children: [
|
|
35
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
36
|
+
I,
|
|
37
|
+
{
|
|
38
|
+
badgeContent: p ? s : void 0,
|
|
39
|
+
sx: {
|
|
40
|
+
"& .MuiBadge-badge": {
|
|
41
|
+
right: -1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ e(A, { alt: "MX", institutionGuid: t.institution_guid || "" })
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
_,
|
|
49
|
+
{
|
|
50
|
+
disableTypography: !0,
|
|
51
|
+
primary: /* @__PURE__ */ r(
|
|
52
|
+
o,
|
|
53
|
+
{
|
|
54
|
+
bold: !0,
|
|
55
|
+
color: t.is_hidden ? u.palette.text.secondary : void 0,
|
|
56
|
+
sx: { whiteSpace: "normal" },
|
|
57
|
+
variant: "body1",
|
|
58
|
+
children: [
|
|
59
|
+
`${f} ${t.account_number ? `*${t.account_number}` : ""}`,
|
|
60
|
+
" ",
|
|
61
|
+
t.is_hidden && !t.is_closed && i.is_hidden,
|
|
62
|
+
t.is_closed && i.is_closed
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
secondary: /* @__PURE__ */ r(m, { children: [
|
|
67
|
+
/* @__PURE__ */ r(l, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
68
|
+
/* @__PURE__ */ e(o, { variant: "caption", children: h }),
|
|
69
|
+
/* @__PURE__ */ e(o, { bold: !0, variant: "body2", children: w(g, "0,0.00") })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ r(l, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
72
|
+
/* @__PURE__ */ e(o, { variant: "caption", children: x }),
|
|
73
|
+
/* @__PURE__ */ e(o, { ml: "auto", variant: "caption", children: y })
|
|
74
|
+
] })
|
|
75
|
+
] })
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] });
|
|
79
|
+
return /* @__PURE__ */ e(
|
|
80
|
+
v,
|
|
81
|
+
{
|
|
82
|
+
sx: { backgroundColor: "background.paper", color: t.is_closed ? "grey.700" : "" },
|
|
83
|
+
...c,
|
|
84
|
+
children: n ? /* @__PURE__ */ e(S, { alignItems: "flex-start", onClick: n, sx: { px: 24 }, children: a }) : a
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}, Z = b(z);
|
|
88
|
+
export {
|
|
89
|
+
Z as A
|
|
90
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeAutoObservable as h, runInAction as a } from "mobx";
|
|
2
|
-
import { i as g } from "./BudgetUtil
|
|
2
|
+
import { i as g } from "./BudgetUtil-CLhRnCoX.mjs";
|
|
3
3
|
import { A as d } from "./AccountApi-ChQr5PAZ.mjs";
|
|
4
4
|
import { d as p } from "./Accounts-o7ohkngR.mjs";
|
|
5
5
|
import { A as s, d as u } from "./Account-BiB1F8lL.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
1
|
+
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import k from "react";
|
|
3
3
|
import { css as R } from "@mxenabled/cssinjs";
|
|
4
4
|
import { addDays as G } from "date-fns/addDays";
|
|
@@ -12,10 +12,10 @@ import { isSameMonth as K } from "date-fns/isSameMonth";
|
|
|
12
12
|
import { startOfMonth as Q } from "date-fns/startOfMonth";
|
|
13
13
|
import { startOfToday as I } from "date-fns/startOfToday";
|
|
14
14
|
import { subMonths as U } from "date-fns/subMonths";
|
|
15
|
-
import
|
|
15
|
+
import C from "@mui/material/Button";
|
|
16
16
|
import V from "@mui/material/Paper";
|
|
17
17
|
import { H2 as X, Text as z, H3 as tt, P as et } from "@mxenabled/mxui";
|
|
18
|
-
import { ChevronLeft as nt, ChevronRight as
|
|
18
|
+
import { ChevronLeft as nt, ChevronRight as ot, Icon as rt } from "@mxenabled/mx-icons";
|
|
19
19
|
import { f as at, D as it } from "./DateFormats-BMpMrZpW.mjs";
|
|
20
20
|
import { isSameDay as f } from "date-fns/isSameDay";
|
|
21
21
|
import { isWithinInterval as st } from "date-fns/isWithinInterval";
|
|
@@ -33,24 +33,24 @@ import { b as T } from "./Category-CevNQ03n.mjs";
|
|
|
33
33
|
import { b as j } from "./Localization-CPkpIwIx.mjs";
|
|
34
34
|
import { f as O } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
35
35
|
const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.guid === n), yt = (t, n) => {
|
|
36
|
-
const e = t.find((
|
|
36
|
+
const e = t.find((o) => o.subCategories.find((a) => a.guid === n));
|
|
37
37
|
if (e)
|
|
38
|
-
return e.subCategories.find((
|
|
38
|
+
return e.subCategories.find((o) => o.guid === n);
|
|
39
39
|
}, ce = (t, n) => {
|
|
40
40
|
const e = [];
|
|
41
|
-
for (const
|
|
42
|
-
const a = W(t,
|
|
41
|
+
for (const o of n) {
|
|
42
|
+
const a = W(t, o.category_guid);
|
|
43
43
|
if (!a) continue;
|
|
44
44
|
const s = a.parent_guid ?? a.guid, d = W(t, s);
|
|
45
45
|
if (!d) continue;
|
|
46
46
|
const i = {
|
|
47
|
-
amount:
|
|
47
|
+
amount: o.total,
|
|
48
48
|
category: a,
|
|
49
49
|
guid: a.guid,
|
|
50
50
|
subCategoryTotals: []
|
|
51
51
|
}, l = e.find((m) => m.guid === s);
|
|
52
|
-
l ? (l.amount +=
|
|
53
|
-
amount:
|
|
52
|
+
l ? (l.amount += o.total, l.subCategoryTotals.push(i)) : e.push({
|
|
53
|
+
amount: o.total,
|
|
54
54
|
category: d,
|
|
55
55
|
guid: s,
|
|
56
56
|
subCategoryTotals: [i]
|
|
@@ -58,18 +58,18 @@ const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.
|
|
|
58
58
|
}
|
|
59
59
|
return e;
|
|
60
60
|
}, le = (t, n) => {
|
|
61
|
-
const e = t.find((
|
|
61
|
+
const e = t.find((o) => o.guid === n);
|
|
62
62
|
return e ? e.guid === T.INCOME || e.parent_guid === T.INCOME : !1;
|
|
63
|
-
},
|
|
64
|
-
const a =
|
|
63
|
+
}, bt = ({ copy: t, date: n, onNextClick: e, onPreviousClick: o }) => {
|
|
64
|
+
const a = Ct();
|
|
65
65
|
return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${a}`, children: [
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ r(X, { className: "mx-cmn-calendar-header-title", variant: "h3", children: at(n, it.MONTH_YEAR) }),
|
|
67
67
|
/* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ r(C, { "aria-label": t.prevAria, onClick: o, children: /* @__PURE__ */ r(nt, { size: 24 }) }),
|
|
69
|
+
/* @__PURE__ */ r(C, { "aria-label": t.nextAria, onClick: e, children: /* @__PURE__ */ r(ot, { size: 24 }) })
|
|
70
70
|
] })
|
|
71
71
|
] });
|
|
72
|
-
},
|
|
72
|
+
}, Ct = () => R({
|
|
73
73
|
alignItems: "center",
|
|
74
74
|
display: "flex",
|
|
75
75
|
marginBottom: 16,
|
|
@@ -82,19 +82,19 @@ const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.
|
|
|
82
82
|
display: "flex",
|
|
83
83
|
gap: 4
|
|
84
84
|
}
|
|
85
|
-
}), vt = ({ beginDate: t, date: n, endDate: e, isInMonth:
|
|
85
|
+
}), vt = ({ beginDate: t, date: n, endDate: e, isInMonth: o, onClick: a }) => {
|
|
86
86
|
const s = ct(), d = kt(s), i = t && e && st(n, { start: t, end: e }) && !f(n, t) && !f(n, e), l = t && e && f(t, n) && !f(t, e), m = e && t && f(e, n) && !f(t, e), u = t && f(t, n) || e && f(e, n), p = f(n, I());
|
|
87
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ r(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: `
|
|
91
91
|
mx-cmn-calendar-day
|
|
92
92
|
${d}
|
|
93
|
-
${
|
|
93
|
+
${o ? "" : "mx-cmn-out-of-month"}
|
|
94
94
|
${i ? "mx-cmn-date-interval" : ""}
|
|
95
95
|
`,
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
|
|
96
|
+
children: /* @__PURE__ */ r(
|
|
97
|
+
C,
|
|
98
98
|
{
|
|
99
99
|
className: `
|
|
100
100
|
mx-cmn-calendar-day-button
|
|
@@ -104,14 +104,14 @@ const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.
|
|
|
104
104
|
color: u ? "primary" : "secondary",
|
|
105
105
|
onClick: () => a(n),
|
|
106
106
|
variant: u ? "contained" : "text",
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ r(
|
|
108
108
|
z,
|
|
109
109
|
{
|
|
110
110
|
className: `
|
|
111
111
|
mx-cmn-calendar-day-text
|
|
112
112
|
${u ? "mx-cmn-day-selected" : ""}
|
|
113
113
|
${p ? "mx-cmn-today" : ""}`,
|
|
114
|
-
variant: "
|
|
114
|
+
variant: "body2",
|
|
115
115
|
children: L(n, "d")
|
|
116
116
|
}
|
|
117
117
|
)
|
|
@@ -165,48 +165,48 @@ const W = (t, n) => t.find((e) => e.guid === n), xt = (t, n) => t.find((e) => e.
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
}), Bt = 340, B = 44;
|
|
168
|
-
var
|
|
169
|
-
const
|
|
168
|
+
var wt = /* @__PURE__ */ ((t) => (t.None = "None", t.Single = "Single", t.Range = "Range", t))(wt || {});
|
|
169
|
+
const _t = ({
|
|
170
170
|
copy: t,
|
|
171
171
|
beginDate: n = void 0,
|
|
172
172
|
endDate: e = void 0,
|
|
173
|
-
onDateSelected:
|
|
173
|
+
onDateSelected: o,
|
|
174
174
|
onRangeSelected: a,
|
|
175
175
|
selectionType: s = "Single"
|
|
176
176
|
/* Single */
|
|
177
177
|
}) => {
|
|
178
|
-
const d =
|
|
178
|
+
const d = St(), [i, l] = k.useState(I), [m, u] = k.useState(n), [p, g] = k.useState(e);
|
|
179
179
|
k.useEffect(() => {
|
|
180
180
|
u(n), g(e), n && l(n);
|
|
181
181
|
}, [n, e]);
|
|
182
182
|
const v = k.useMemo(() => {
|
|
183
183
|
const c = Z({ start: Q(i), end: q(i) }), y = [];
|
|
184
|
-
for (let
|
|
185
|
-
const
|
|
184
|
+
for (let b = 0; b < c.length; b++) {
|
|
185
|
+
const w = c[b], $ = Y({ start: w, end: G(w, 6) }), A = [];
|
|
186
186
|
for (let M = 0; M < $.length; M++)
|
|
187
187
|
A.push($[M]);
|
|
188
188
|
y.push(A);
|
|
189
189
|
}
|
|
190
190
|
return y;
|
|
191
|
-
}, [i]),
|
|
191
|
+
}, [i]), _ = (c) => {
|
|
192
192
|
if (s !== "None") {
|
|
193
193
|
if (s === "Single") {
|
|
194
|
-
u(c),
|
|
194
|
+
u(c), o?.(c);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
!m || p ? (u(c), g(void 0)) : J(c, m) ? (g(m), u(c), a?.(c, m)) : (g(c), a?.(m, c));
|
|
198
198
|
}
|
|
199
|
-
},
|
|
199
|
+
}, S = () => {
|
|
200
200
|
const c = I();
|
|
201
|
-
l(c), s !== "None" && (u(c), s === "Single" ?
|
|
201
|
+
l(c), s !== "None" && (u(c), s === "Single" ? o?.(c) : (g(c), a?.(c, c)));
|
|
202
202
|
}, N = () => {
|
|
203
203
|
l(P(i, 1));
|
|
204
204
|
}, x = () => {
|
|
205
205
|
l(U(i, 1));
|
|
206
206
|
};
|
|
207
|
-
return /* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
207
|
+
return /* @__PURE__ */ r("div", { className: `mx-cmn-calendar ${d}`, children: /* @__PURE__ */ h(V, { sx: { boxShadow: "none" }, children: [
|
|
208
|
+
/* @__PURE__ */ r(
|
|
209
|
+
bt,
|
|
210
210
|
{
|
|
211
211
|
copy: t,
|
|
212
212
|
date: i,
|
|
@@ -214,21 +214,21 @@ const wt = ({
|
|
|
214
214
|
onPreviousClick: x
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
v.map((c, y) => /* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ r("div", { className: "mx-cmn-calendar-header-row", children: v[0].map((c, y) => /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ r(z, { bold: !0, variant: "body2", children: L(c, "EEEEE") }) }, y)) }),
|
|
218
|
+
v.map((c, y) => /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-week", children: c.map((b, w) => /* @__PURE__ */ r(
|
|
219
219
|
vt,
|
|
220
220
|
{
|
|
221
221
|
beginDate: m,
|
|
222
|
-
date:
|
|
222
|
+
date: b,
|
|
223
223
|
endDate: p,
|
|
224
|
-
isInMonth: K(
|
|
225
|
-
onClick:
|
|
224
|
+
isInMonth: K(b, i),
|
|
225
|
+
onClick: _
|
|
226
226
|
},
|
|
227
|
-
|
|
227
|
+
w
|
|
228
228
|
)) }, `w-${y}`)),
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ r("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ r(C, { onClick: S, size: "small", variant: "text", children: t.today }) })
|
|
230
230
|
] }) });
|
|
231
|
-
},
|
|
231
|
+
}, St = () => R({
|
|
232
232
|
width: Bt,
|
|
233
233
|
"& .MuiPaper-root": {
|
|
234
234
|
paddingLeft: 24,
|
|
@@ -269,11 +269,11 @@ const wt = ({
|
|
|
269
269
|
marginRight: "auto"
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
}), de =
|
|
272
|
+
}), de = _t, Nt = ({
|
|
273
273
|
closeAriaLabel: t,
|
|
274
274
|
content: n,
|
|
275
275
|
inputLabel: e,
|
|
276
|
-
inputValue:
|
|
276
|
+
inputValue: o,
|
|
277
277
|
isOpen: a,
|
|
278
278
|
handleInputChange: s,
|
|
279
279
|
handleModalClose: d,
|
|
@@ -285,8 +285,8 @@ const wt = ({
|
|
|
285
285
|
secondaryText: g,
|
|
286
286
|
title: v
|
|
287
287
|
}) => {
|
|
288
|
-
const
|
|
289
|
-
return /* @__PURE__ */
|
|
288
|
+
const _ = parseFloat(o ?? "0"), S = o !== "" && o !== "0" && !isNaN(_), { isSmallMobile: N } = pt();
|
|
289
|
+
return /* @__PURE__ */ r(
|
|
290
290
|
lt,
|
|
291
291
|
{
|
|
292
292
|
"aria-label": v,
|
|
@@ -299,7 +299,7 @@ const wt = ({
|
|
|
299
299
|
"& .MuiDialogContent-root": { p: 0 },
|
|
300
300
|
...N && { "& .MuiDialog-paper": { minWidth: "100%" } }
|
|
301
301
|
},
|
|
302
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ r(mt, { children: /* @__PURE__ */ h(
|
|
303
303
|
"form",
|
|
304
304
|
{
|
|
305
305
|
onSubmit: (x) => {
|
|
@@ -320,26 +320,26 @@ const wt = ({
|
|
|
320
320
|
pt: 24
|
|
321
321
|
},
|
|
322
322
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ r(tt, { id: "modal-title", children: v }),
|
|
324
|
+
/* @__PURE__ */ r(
|
|
325
325
|
ut,
|
|
326
326
|
{
|
|
327
327
|
"aria-label": t,
|
|
328
328
|
onClick: d,
|
|
329
329
|
sx: { minHeight: 24, position: "absolute", right: 8, top: 18 },
|
|
330
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ r(rt, { name: "close", sx: { color: "action.active" } })
|
|
331
331
|
}
|
|
332
332
|
)
|
|
333
333
|
]
|
|
334
334
|
}
|
|
335
335
|
),
|
|
336
336
|
/* @__PURE__ */ h(E, { sx: { gap: 24, px: 24 }, children: [
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
e && /* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ r(et, { variant: "subtitle1", children: n }),
|
|
338
|
+
e && /* @__PURE__ */ r(
|
|
339
339
|
ft,
|
|
340
340
|
{
|
|
341
341
|
InputProps: {
|
|
342
|
-
startAdornment: /* @__PURE__ */
|
|
342
|
+
startAdornment: /* @__PURE__ */ r(gt, { position: "start", children: "$" })
|
|
343
343
|
},
|
|
344
344
|
autoFocus: !0,
|
|
345
345
|
inputMode: "decimal",
|
|
@@ -353,7 +353,7 @@ const wt = ({
|
|
|
353
353
|
/^\d*\.?\d*$/.test(x) && s?.(x);
|
|
354
354
|
},
|
|
355
355
|
type: "text",
|
|
356
|
-
value:
|
|
356
|
+
value: o
|
|
357
357
|
}
|
|
358
358
|
)
|
|
359
359
|
] }),
|
|
@@ -367,8 +367,8 @@ const wt = ({
|
|
|
367
367
|
">:not(style)~:not(style)": { ml: 0 }
|
|
368
368
|
},
|
|
369
369
|
children: [
|
|
370
|
-
g && /* @__PURE__ */
|
|
371
|
-
|
|
370
|
+
g && /* @__PURE__ */ r(
|
|
371
|
+
C,
|
|
372
372
|
{
|
|
373
373
|
"aria-label": g,
|
|
374
374
|
color: p,
|
|
@@ -376,12 +376,12 @@ const wt = ({
|
|
|
376
376
|
children: g
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ r(
|
|
380
|
+
C,
|
|
381
381
|
{
|
|
382
382
|
"aria-label": u,
|
|
383
383
|
color: m,
|
|
384
|
-
disabled: e ? !
|
|
384
|
+
disabled: e ? !S : !1,
|
|
385
385
|
onClick: i,
|
|
386
386
|
variant: "contained",
|
|
387
387
|
children: u
|
|
@@ -406,10 +406,10 @@ const wt = ({
|
|
|
406
406
|
}, ge = () => {
|
|
407
407
|
const { detailedBudgets: t } = ht();
|
|
408
408
|
return t.map((e) => {
|
|
409
|
-
const
|
|
410
|
-
return e.amount -
|
|
411
|
-
}).reduce((e,
|
|
412
|
-
}, fe = (t, n, e,
|
|
409
|
+
const o = e.transaction_total;
|
|
410
|
+
return e.amount - o;
|
|
411
|
+
}).reduce((e, o) => e + o, 0);
|
|
412
|
+
}, fe = (t, n, e, o) => {
|
|
413
413
|
const a = [];
|
|
414
414
|
for (const s of t) {
|
|
415
415
|
const d = xt(n, s.category_guid);
|
|
@@ -417,7 +417,7 @@ const wt = ({
|
|
|
417
417
|
const i = d.totalAmount, l = H(s.amount, i), m = s.amount - i;
|
|
418
418
|
a.push({
|
|
419
419
|
...s,
|
|
420
|
-
budgetColors: D(l,
|
|
420
|
+
budgetColors: D(l, o),
|
|
421
421
|
category: d,
|
|
422
422
|
description: j(
|
|
423
423
|
m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
|
|
@@ -436,7 +436,7 @@ const wt = ({
|
|
|
436
436
|
const m = s.amount - i, u = H(s.amount, i);
|
|
437
437
|
l && l.subBudgets.push({
|
|
438
438
|
...s,
|
|
439
|
-
budgetColors: D(u,
|
|
439
|
+
budgetColors: D(u, o),
|
|
440
440
|
category: d,
|
|
441
441
|
description: j(
|
|
442
442
|
m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
|
|
@@ -449,22 +449,22 @@ const wt = ({
|
|
|
449
449
|
}
|
|
450
450
|
return a;
|
|
451
451
|
}, F = (t, n) => t.find((e) => e.guid === n), pe = (t, n, e) => {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
454
|
-
return F(
|
|
452
|
+
const o = F(t, e);
|
|
453
|
+
if (o)
|
|
454
|
+
return F(o.subBudgets, n);
|
|
455
455
|
}, he = (t, n) => {
|
|
456
|
-
const e = Math.max(0, n - t),
|
|
456
|
+
const e = Math.max(0, n - t), o = n > 0 ? Math.min(100, t / n * 100) : 0;
|
|
457
457
|
let a = "success";
|
|
458
|
-
return
|
|
458
|
+
return o >= 100 ? a = "error" : o >= 50 && (a = "warning"), {
|
|
459
459
|
remainingAmount: e,
|
|
460
|
-
spentPercentage:
|
|
460
|
+
spentPercentage: o,
|
|
461
461
|
iconColor: a
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
export {
|
|
465
465
|
me as C,
|
|
466
466
|
de as a,
|
|
467
|
-
|
|
467
|
+
wt as b,
|
|
468
468
|
pe as c,
|
|
469
469
|
fe as d,
|
|
470
470
|
W as e,
|