@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms2
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-B4CDD-zq.mjs → Account-Cp30A3ad.mjs} +1 -1
- package/dist/AccountDetailsContent-C1HumFnW.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-NMx79DGs.mjs} +17 -17
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-CW6cIthP.mjs} +8 -8
- package/dist/AccountListItem-DxmAs98Z.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-hIs-yA6W.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DUHkUyK4.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-CIDAPPPT.mjs} +30 -30
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-naOtJcwo.mjs} +22 -15
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqDAA_5I.mjs} +26 -26
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-Dn1MlqLz.mjs} +60 -61
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-CSo6AFkG.mjs} +2 -2
- package/dist/CurrencyInput-BrGvhgVK.mjs +85 -0
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-hi1cqrRk.mjs} +3 -3
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-Dqe5EqvA.mjs} +6 -6
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-CQ1grpwo.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-dKZOZ2hM.mjs} +3 -3
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-CFeAJloA.mjs} +3 -3
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-i4OasOO-.mjs} +176 -158
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/Loader-BSWSYqvn.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-D_qVX5dN.mjs} +44 -44
- package/dist/{MiniWidgetContainer-CKzf_Ira.mjs → MiniWidgetContainer-D7MkHG15.mjs} +12 -12
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-8FFC1Bs0.mjs} +2 -2
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-BsWiYD94.mjs} +67 -67
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-62e0mU_3.mjs} +7 -7
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-RfZ8Wuhh.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-Bhx56aA3.mjs} +76 -76
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-D3EOKZ2B.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-C6KH8JH4.mjs} +1 -1
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-PsRQPkmV.mjs} +1 -1
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CZzDb-7d.mjs} +10 -10
- package/dist/TransactionDetails-Duv1X9ec.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-DgLrYW4C.mjs} +3 -3
- package/dist/{User-BklmOUSd.mjs → User-DqNX2GAK.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-CH9E-jOx.mjs} +178 -177
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-B1Jzb4XA.mjs} +6 -6
- package/dist/accounts/index.es.js +45 -45
- package/dist/analytics/index.es.js +22 -22
- package/dist/budgets/index.es.js +266 -265
- package/dist/cashflow/index.es.js +155 -154
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +659 -394
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +438 -438
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-BFpuIAXW.mjs} +1 -1
- package/dist/finstrong/index.es.js +113 -113
- package/dist/goals/index.es.js +379 -385
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +3 -3
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +16 -16
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +29 -29
- package/dist/recurringtransactions/index.es.js +82 -82
- package/dist/settings/index.es.js +254 -254
- package/dist/spending/index.es.js +43 -43
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +150 -149
- package/dist/trends/index.es.js +297 -296
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-usSZCQ7I.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +30 -30
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -4,20 +4,20 @@ import e from "@mui/material/Stack";
|
|
|
4
4
|
import { H3 as _, InstitutionLogo as x, Text as a, H2 as T } from "@mxenabled/mxui";
|
|
5
5
|
import d from "react";
|
|
6
6
|
import { G as N, d as f, m as D, f as w, u as E } from "./hooks-C41HAxM5.mjs";
|
|
7
|
-
import { g as I } from "./AccountFields-
|
|
7
|
+
import { g as I } from "./AccountFields-CW6cIthP.mjs";
|
|
8
8
|
import G from "@mui/material/Card";
|
|
9
9
|
import v from "@mui/material/CardContent";
|
|
10
10
|
import O from "@mui/material/CardHeader";
|
|
11
|
-
import { L as H } from "./Loader-
|
|
11
|
+
import { L as H } from "./Loader-BSWSYqvn.mjs";
|
|
12
12
|
import { f as M, a as P } from "./Dialog-CDV0kKxj.mjs";
|
|
13
|
-
import { I as L, P as U, S as j } from "./Account-
|
|
14
|
-
import { u as z } from "./useAccountDisplayName-
|
|
15
|
-
import { f as
|
|
13
|
+
import { I as L, P as U, S as j } from "./Account-Cp30A3ad.mjs";
|
|
14
|
+
import { u as z } from "./useAccountDisplayName-usSZCQ7I.mjs";
|
|
15
|
+
import { f as B } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
16
16
|
const p = () => {
|
|
17
17
|
if (!d.useContext(N))
|
|
18
18
|
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
|
19
19
|
return f().uiStore;
|
|
20
|
-
},
|
|
20
|
+
}, Y = ({ sx: n, ChartComponent: s }) => {
|
|
21
21
|
const { loadMonthlyCategoryTotals: c } = D(), { isInitialized: o } = w(), { selectedAccount: r } = p(), [l, u] = d.useState(!1);
|
|
22
22
|
return d.useEffect(() => {
|
|
23
23
|
o && c([r]).finally(() => {
|
|
@@ -44,17 +44,17 @@ const p = () => {
|
|
|
44
44
|
]
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
},
|
|
47
|
+
}, k = m(Y), R = ({
|
|
48
48
|
customDetailsChart: n,
|
|
49
49
|
ChartComponent: s
|
|
50
50
|
}) => {
|
|
51
|
-
const { institutions: c } = f(), { selectedAccount: o } = p(), { accounts: r } = E(), { firstSubtitle: l, firstValue: u, hasAvailableBalance:
|
|
52
|
-
(
|
|
51
|
+
const { institutions: c } = f(), { selectedAccount: o } = p(), { accounts: r } = E(), { firstSubtitle: l, firstValue: u, hasAvailableBalance: C, secondSubtitle: h, secondValue: S } = I(o, r), b = c.find(
|
|
52
|
+
(y) => y.guid === o?.institution_guid
|
|
53
53
|
), A = [
|
|
54
54
|
...L,
|
|
55
55
|
...U,
|
|
56
56
|
...j
|
|
57
|
-
].includes(o.account_type),
|
|
57
|
+
].includes(o.account_type), g = z(o);
|
|
58
58
|
return /* @__PURE__ */ i(e, { bgcolor: "background.default", p: 24, children: [
|
|
59
59
|
/* @__PURE__ */ i(e, { gap: 12, children: [
|
|
60
60
|
/* @__PURE__ */ t(
|
|
@@ -65,20 +65,20 @@ const p = () => {
|
|
|
65
65
|
size: 64
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */ t(a, { variant: "
|
|
68
|
+
/* @__PURE__ */ t(a, { variant: "Small", children: b?.name })
|
|
69
69
|
] }),
|
|
70
70
|
/* @__PURE__ */ i(e, { gap: 8, mb: 24, mt: 4, children: [
|
|
71
|
-
/* @__PURE__ */ t(T, { children:
|
|
71
|
+
/* @__PURE__ */ t(T, { children: g }),
|
|
72
72
|
/* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
|
|
73
|
-
/* @__PURE__ */ t(a, { bold:
|
|
74
|
-
/* @__PURE__ */ t(a, { bold: !0, variant: "
|
|
73
|
+
/* @__PURE__ */ t(a, { bold: C, variant: "Body", children: l }),
|
|
74
|
+
/* @__PURE__ */ t(a, { bold: !0, variant: "Body", children: B(u, "0,0.00") })
|
|
75
75
|
] }),
|
|
76
76
|
/* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
|
|
77
|
-
/* @__PURE__ */ t(a, { variant: "
|
|
78
|
-
/* @__PURE__ */ t(a, { variant: "
|
|
77
|
+
/* @__PURE__ */ t(a, { variant: "Small", children: h }),
|
|
78
|
+
/* @__PURE__ */ t(a, { variant: "Small", children: S })
|
|
79
79
|
] })
|
|
80
80
|
] }),
|
|
81
|
-
A && /* @__PURE__ */ t(e, { children: n || /* @__PURE__ */ t(
|
|
81
|
+
A && /* @__PURE__ */ t(e, { children: n || /* @__PURE__ */ t(k, { ChartComponent: s }) })
|
|
82
82
|
] });
|
|
83
83
|
}, rt = m(R);
|
|
84
84
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { Text as y, Icon as p } from "@mxenabled/mxui";
|
|
3
|
-
import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-
|
|
4
|
-
import { i as T, u as A, a as D, b as g, c as O } from "./Accounts-
|
|
5
|
-
import { f as _, a as N, i as b, b as
|
|
3
|
+
import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-Dn1MlqLz.mjs";
|
|
4
|
+
import { i as T, u as A, a as D, b as g, c as O } from "./Accounts-DUHkUyK4.mjs";
|
|
5
|
+
import { f as _, a as N, i as b, b as S } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
6
6
|
import { b as i } from "./Localization-2MODESHW.mjs";
|
|
7
7
|
import { f as o, a as f } from "./Dialog-CDV0kKxj.mjs";
|
|
8
8
|
const w = (l, e) => {
|
|
@@ -87,7 +87,7 @@ const w = (l, e) => {
|
|
|
87
87
|
type: m.Date,
|
|
88
88
|
valueFormatter: (a) => i(
|
|
89
89
|
e.day_of_every_month,
|
|
90
|
-
|
|
90
|
+
S(a <= 31 ? a : new Date(a).getDate())
|
|
91
91
|
)
|
|
92
92
|
})), g(l) && r.push({
|
|
93
93
|
label: e.credit_limit,
|
|
@@ -103,7 +103,7 @@ const w = (l, e) => {
|
|
|
103
103
|
type: m.Currency,
|
|
104
104
|
valueFormatter: (a) => _(a, "0,0.00")
|
|
105
105
|
}), r;
|
|
106
|
-
},
|
|
106
|
+
}, C = (l, e) => {
|
|
107
107
|
let r = "", a = null, t = null, n = null, s = !1;
|
|
108
108
|
switch (l.account_type) {
|
|
109
109
|
// checking or savings
|
|
@@ -116,7 +116,7 @@ const w = (l, e) => {
|
|
|
116
116
|
default:
|
|
117
117
|
if (r = e.current_balance, a = l.balance, l.minimum_payment && l.payment_due_at) {
|
|
118
118
|
const c = typeof l.payment_due_at == "number" ? new Date(l.payment_due_at * 1e3) : l.payment_due_at;
|
|
119
|
-
t = /* @__PURE__ */ u(y, { component: "strong", variant: "
|
|
119
|
+
t = /* @__PURE__ */ u(y, { component: "strong", variant: "XSmall", children: i(
|
|
120
120
|
e.payment_due_on,
|
|
121
121
|
_(l.minimum_payment, "0,0.00"),
|
|
122
122
|
o(c, f.FULL_MONTH_DAY)
|
|
@@ -131,11 +131,11 @@ const w = (l, e) => {
|
|
|
131
131
|
hasAvailableBalance: s
|
|
132
132
|
};
|
|
133
133
|
}, x = (l, e) => l.reduce((a, t) => {
|
|
134
|
-
const s =
|
|
134
|
+
const s = C(t, e).firstValue || 0;
|
|
135
135
|
return a + s;
|
|
136
136
|
}, 0);
|
|
137
137
|
export {
|
|
138
138
|
x as a,
|
|
139
139
|
w as b,
|
|
140
|
-
|
|
140
|
+
C as g
|
|
141
141
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { observer as b } from "mobx-react-lite";
|
|
3
|
+
import I from "@mui/material/Badge";
|
|
4
|
+
import m from "@mui/material/Box";
|
|
5
|
+
import S from "@mui/material/ListItem";
|
|
6
|
+
import v from "@mui/material/ListItemAvatar";
|
|
7
|
+
import C from "@mui/material/ListItemButton";
|
|
8
|
+
import _ from "@mui/material/ListItemText";
|
|
9
|
+
import B from "@mui/material/styles/useTheme";
|
|
10
|
+
import { InstitutionLogo as L, Text as o } from "@mxenabled/mxui";
|
|
11
|
+
import { Error as A } from "@mxenabled/mx-icons";
|
|
12
|
+
import { I as j } from "./IconBacking-DgT8DCeh.mjs";
|
|
13
|
+
import { g as T } from "./AccountFields-CW6cIthP.mjs";
|
|
14
|
+
import { u as X } from "./useAccountDisplayName-usSZCQ7I.mjs";
|
|
15
|
+
import { u as $ } from "./hooks-C41HAxM5.mjs";
|
|
16
|
+
import { C as d } from "./ConnectDrawer-Dn1MlqLz.mjs";
|
|
17
|
+
import { f as k } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
18
|
+
const w = {
|
|
19
|
+
gridRow: 1,
|
|
20
|
+
gridColumn: 1,
|
|
21
|
+
zIndex: 2
|
|
22
|
+
}, E = ({ size: t = 20 }) => /* @__PURE__ */ e(j, { size: t, children: /* @__PURE__ */ e(A, { color: "error", filled: !0, sx: { fontSize: t, ...w } }) }), M = ({
|
|
23
|
+
account: t,
|
|
24
|
+
onRowClick: s,
|
|
25
|
+
listItemProps: c,
|
|
26
|
+
shouldShowConnectionStatus: p = !1
|
|
27
|
+
}) => {
|
|
28
|
+
const u = B(), f = X(t), { accounts: i } = $(), { firstSubtitle: h, firstValue: g, secondSubtitle: x, secondValue: y } = T(
|
|
29
|
+
t,
|
|
30
|
+
i
|
|
31
|
+
);
|
|
32
|
+
let n;
|
|
33
|
+
(t.connectionStatus === d.Error || t.connectionStatus === d.RequiresMfa) && (n = /* @__PURE__ */ e(E, { size: 16 }));
|
|
34
|
+
const a = /* @__PURE__ */ r(l, { children: [
|
|
35
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(
|
|
36
|
+
I,
|
|
37
|
+
{
|
|
38
|
+
badgeContent: p ? n : void 0,
|
|
39
|
+
sx: {
|
|
40
|
+
"& .MuiBadge-badge": {
|
|
41
|
+
right: -1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ e(L, { 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: "Body",
|
|
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(l, { children: [
|
|
67
|
+
/* @__PURE__ */ r(m, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
68
|
+
/* @__PURE__ */ e(o, { variant: "XSmall", children: h }),
|
|
69
|
+
/* @__PURE__ */ e(o, { bold: !0, variant: "Small", children: k(g, "0,0.00") })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ r(m, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
72
|
+
/* @__PURE__ */ e(o, { variant: "XSmall", children: x }),
|
|
73
|
+
/* @__PURE__ */ e(o, { ml: "auto", variant: "XSmall", children: y })
|
|
74
|
+
] })
|
|
75
|
+
] })
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] });
|
|
79
|
+
return /* @__PURE__ */ e(
|
|
80
|
+
S,
|
|
81
|
+
{
|
|
82
|
+
sx: { backgroundColor: "background.paper", color: t.is_closed ? "grey.700" : "" },
|
|
83
|
+
...c,
|
|
84
|
+
children: s ? /* @__PURE__ */ e(C, { alignItems: "flex-start", onClick: s, sx: { px: 24 }, children: a }) : a
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}, Z = b(M);
|
|
88
|
+
export {
|
|
89
|
+
Z as A
|
|
90
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeAutoObservable as l, runInAction as a } from "mobx";
|
|
2
|
-
import { i as A } from "./User-
|
|
2
|
+
import { i as A } from "./User-DqNX2GAK.mjs";
|
|
3
3
|
import { F as g, A as i } from "./Fetch-DecPFeGU.mjs";
|
|
4
|
-
import { d as m } from "./Accounts-
|
|
5
|
-
import { A as c, j as u } from "./ConnectDrawer-
|
|
4
|
+
import { d as m } from "./Accounts-DUHkUyK4.mjs";
|
|
5
|
+
import { A as c, j as u } from "./ConnectDrawer-Dn1MlqLz.mjs";
|
|
6
6
|
class d {
|
|
7
7
|
fetchInstance;
|
|
8
8
|
constructor(t, e, s) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as u, E as r, c as p, M as y } from "./ConnectDrawer-
|
|
1
|
+
import { A as e, C as u, E as r, c as p, M as y } from "./ConnectDrawer-Dn1MlqLz.mjs";
|
|
2
2
|
const l = (t) => t && (t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CHECKING_LINE_OF_CREDIT), I = (t) => t.is_manual || !t.guid, R = (t) => t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.CHECKING_LINE_OF_CREDIT, f = (t) => t.account_type === e.SAVINGS || t.account_type === e.CHECKING || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE, m = (t) => t.account_type === e.LOAN || t.account_type === e.MORTGAGE, A = (t, n, s, _) => t.filter((i) => !(i.member_is_managed_by_user && _)).sort(d).map((i) => {
|
|
3
3
|
const c = n.find((a) => a.guid === i.institution_guid), o = s.find((a) => a.guid === i.member_guid);
|
|
4
4
|
return E(i, c, o);
|
|
@@ -3,56 +3,56 @@ import { b as d } from "./Category-Ccoew_sA.mjs";
|
|
|
3
3
|
import { b as f } from "./Localization-2MODESHW.mjs";
|
|
4
4
|
import { f as l } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
5
5
|
const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.guid === e), T = (n, e) => {
|
|
6
|
-
const t = n.find((
|
|
6
|
+
const t = n.find((r) => r.subCategories.find((a) => a.guid === e));
|
|
7
7
|
if (t)
|
|
8
|
-
return t.subCategories.find((
|
|
8
|
+
return t.subCategories.find((r) => r.guid === e);
|
|
9
9
|
}, k = (n, e) => {
|
|
10
10
|
const t = [];
|
|
11
|
-
for (const
|
|
12
|
-
const a = p(n,
|
|
11
|
+
for (const r of e) {
|
|
12
|
+
const a = p(n, r.category_guid);
|
|
13
13
|
if (!a) continue;
|
|
14
|
-
const
|
|
14
|
+
const o = a.parent_guid ?? a.guid, s = p(n, o);
|
|
15
15
|
if (!s) continue;
|
|
16
16
|
const u = {
|
|
17
|
-
amount:
|
|
17
|
+
amount: r.total,
|
|
18
18
|
category: a,
|
|
19
19
|
guid: a.guid,
|
|
20
20
|
subCategoryTotals: []
|
|
21
|
-
}, i = t.find((g) => g.guid ===
|
|
22
|
-
i ? (i.amount +=
|
|
23
|
-
amount:
|
|
21
|
+
}, i = t.find((g) => g.guid === o);
|
|
22
|
+
i ? (i.amount += r.total, i.subCategoryTotals.push(u)) : t.push({
|
|
23
|
+
amount: r.total,
|
|
24
24
|
category: s,
|
|
25
|
-
guid:
|
|
25
|
+
guid: o,
|
|
26
26
|
subCategoryTotals: [u]
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}, w = (n, e) => {
|
|
31
|
-
const t = n.find((
|
|
31
|
+
const t = n.find((r) => r.guid === e);
|
|
32
32
|
return t ? t.guid === d.INCOME || t.parent_guid === d.INCOME : !1;
|
|
33
33
|
}, y = (n, e) => !n && !e ? 0 : !n && e ? 101 : e / n * 100, b = (n, e) => {
|
|
34
34
|
const t = {
|
|
35
35
|
background: e.palette.success.main,
|
|
36
36
|
description: n <= 100 ? e.palette.text.secondary : e.palette.error.main,
|
|
37
37
|
text: e.palette.common.white,
|
|
38
|
-
mercury: e.palette.success.
|
|
38
|
+
mercury: e.palette.success.lighter
|
|
39
39
|
};
|
|
40
|
-
return n > 100 ? (t.background = e.palette.error.main, t.mercury = e.palette.error.
|
|
40
|
+
return n > 100 ? (t.background = e.palette.error.main, t.mercury = e.palette.error.lighter) : n > 80 && (t.background = e.palette.warning.main, t.text = e.palette.grey[900], t.mercury = e.palette.warning.lighter), t;
|
|
41
41
|
}, G = () => {
|
|
42
42
|
const { detailedBudgets: n } = _();
|
|
43
43
|
return n.map((t) => {
|
|
44
|
-
const
|
|
45
|
-
return t.amount -
|
|
46
|
-
}).reduce((t,
|
|
47
|
-
}, I = (n, e, t,
|
|
44
|
+
const r = t.transaction_total;
|
|
45
|
+
return t.amount - r;
|
|
46
|
+
}).reduce((t, r) => t + r, 0);
|
|
47
|
+
}, I = (n, e, t, r) => {
|
|
48
48
|
const a = [];
|
|
49
|
-
for (const
|
|
50
|
-
const s = B(e,
|
|
49
|
+
for (const o of n) {
|
|
50
|
+
const s = B(e, o.category_guid);
|
|
51
51
|
if (!s) continue;
|
|
52
|
-
const u = s.totalAmount, i = y(
|
|
52
|
+
const u = s.totalAmount, i = y(o.amount, u), g = o.amount - u;
|
|
53
53
|
a.push({
|
|
54
|
-
...
|
|
55
|
-
budgetColors: b(i,
|
|
54
|
+
...o,
|
|
55
|
+
budgetColors: b(i, r),
|
|
56
56
|
category: s,
|
|
57
57
|
description: f(
|
|
58
58
|
g < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
@@ -63,15 +63,15 @@ const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.g
|
|
|
63
63
|
transaction_total: u
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
for (const
|
|
67
|
-
const s = T(e,
|
|
66
|
+
for (const o of n) {
|
|
67
|
+
const s = T(e, o.category_guid);
|
|
68
68
|
if (!s) continue;
|
|
69
69
|
const u = s.currentAmount, i = a.find((C) => C.category_guid === s.parent_guid);
|
|
70
70
|
if (!i) continue;
|
|
71
|
-
const g =
|
|
71
|
+
const g = o.amount - u, c = y(o.amount, u);
|
|
72
72
|
i && i.subBudgets.push({
|
|
73
|
-
...
|
|
74
|
-
budgetColors: b(c,
|
|
73
|
+
...o,
|
|
74
|
+
budgetColors: b(c, r),
|
|
75
75
|
category: s,
|
|
76
76
|
description: f(
|
|
77
77
|
g < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
@@ -84,9 +84,9 @@ const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.g
|
|
|
84
84
|
}
|
|
85
85
|
return a;
|
|
86
86
|
}, m = (n, e) => n.find((t) => t.guid === e), S = (n, e, t) => {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
return m(
|
|
87
|
+
const r = m(n, t);
|
|
88
|
+
if (r)
|
|
89
|
+
return m(r.subBudgets, e);
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
92
|
S as a,
|
|
@@ -2,14 +2,14 @@ import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
|
2
2
|
import c from "@mui/material/IconButton";
|
|
3
3
|
import m from "@mui/material/Stack";
|
|
4
4
|
import l from "@mui/material/Tooltip";
|
|
5
|
-
import { Icon as p, Text as n } from "@mxenabled/mxui";
|
|
5
|
+
import { Icon as p, IconWeight as h, Text as n } from "@mxenabled/mxui";
|
|
6
6
|
import { makeAutoObservable as i } from "mobx";
|
|
7
7
|
import { addDays as d } from "date-fns/addDays";
|
|
8
|
-
import { differenceInDays as
|
|
9
|
-
import { endOfMonth as
|
|
10
|
-
import { isBefore as
|
|
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
11
|
import { startOfToday as r } from "date-fns/startOfToday";
|
|
12
|
-
const
|
|
12
|
+
const A = ({
|
|
13
13
|
body: o,
|
|
14
14
|
iconName: e = "info",
|
|
15
15
|
title: s
|
|
@@ -18,8 +18,8 @@ const U = ({
|
|
|
18
18
|
{
|
|
19
19
|
enterTouchDelay: 500,
|
|
20
20
|
title: /* @__PURE__ */ a(m, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
|
|
21
|
-
/* @__PURE__ */ t(n, { bold: !0, variant: "
|
|
22
|
-
/* @__PURE__ */ t(n, { sx: { whiteSpace: "unset" }, variant: "
|
|
21
|
+
/* @__PURE__ */ t(n, { bold: !0, variant: "Body", children: s }),
|
|
22
|
+
/* @__PURE__ */ t(n, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
|
|
23
23
|
] }),
|
|
24
24
|
children: /* @__PURE__ */ t(
|
|
25
25
|
c,
|
|
@@ -30,12 +30,19 @@ const U = ({
|
|
|
30
30
|
minWidth: 0,
|
|
31
31
|
p: 0
|
|
32
32
|
},
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
33
|
+
children: /* @__PURE__ */ t(
|
|
34
|
+
p,
|
|
35
|
+
{
|
|
36
|
+
name: e,
|
|
37
|
+
sx: { color: "primary.main", fontSize: 16 },
|
|
38
|
+
weight: h.Dark
|
|
39
|
+
}
|
|
40
|
+
)
|
|
34
41
|
}
|
|
35
42
|
)
|
|
36
43
|
}
|
|
37
44
|
);
|
|
38
|
-
class
|
|
45
|
+
class g {
|
|
39
46
|
// Cashflow is hard-coded to display 30 days starting from today
|
|
40
47
|
dateRange = { start: r(), end: d(r(), 30) };
|
|
41
48
|
isDirty = !1;
|
|
@@ -47,13 +54,13 @@ class u {
|
|
|
47
54
|
}
|
|
48
55
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
49
56
|
get daysUntilNextIncome() {
|
|
50
|
-
return this.nextIncome ? Math.abs(
|
|
57
|
+
return this.nextIncome ? Math.abs(f(r(), this.nextIncome.expectedDate)) : 0;
|
|
51
58
|
}
|
|
52
59
|
// Returns the expenses (Activities) until the next income activity or the end of the month
|
|
53
60
|
// if there is no income activity
|
|
54
61
|
get expensesTilNextIncome() {
|
|
55
62
|
return this.upcomingExpenses.filter(
|
|
56
|
-
(e) =>
|
|
63
|
+
(e) => u(e.expectedDate, this.nextIncome?.expectedDate || x(/* @__PURE__ */ new Date()))
|
|
57
64
|
);
|
|
58
65
|
}
|
|
59
66
|
setNextIncome = (e) => {
|
|
@@ -64,11 +71,11 @@ class u {
|
|
|
64
71
|
};
|
|
65
72
|
setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
|
|
66
73
|
}
|
|
67
|
-
class
|
|
74
|
+
class E {
|
|
68
75
|
globalStore;
|
|
69
76
|
uiStore;
|
|
70
77
|
constructor(e) {
|
|
71
|
-
this.globalStore = e, this.uiStore = new
|
|
78
|
+
this.globalStore = e, this.uiStore = new g(), i(this);
|
|
72
79
|
}
|
|
73
80
|
completeOnboarding = async () => {
|
|
74
81
|
const e = {
|
|
@@ -79,6 +86,6 @@ class A {
|
|
|
79
86
|
};
|
|
80
87
|
}
|
|
81
88
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
E as C,
|
|
90
|
+
A as I
|
|
84
91
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as E } from "react/jsx-runtime";
|
|
|
2
2
|
import { observer as g } from "mobx-react-lite";
|
|
3
3
|
import C from "react";
|
|
4
4
|
import $ from "@mui/material/Stack";
|
|
5
|
-
import { G as K, m as
|
|
5
|
+
import { G as K, m as y, u as b, g as D, b as U } from "./hooks-C41HAxM5.mjs";
|
|
6
6
|
import Y from "@mui/material/List";
|
|
7
7
|
import V from "@mui/material/Paper";
|
|
8
8
|
import v from "@mui/material/Divider";
|
|
@@ -12,21 +12,21 @@ import N from "@mui/material/ListItemButton";
|
|
|
12
12
|
import F from "@mui/material/ListItemIcon";
|
|
13
13
|
import G from "@mui/material/ListItemText";
|
|
14
14
|
import { CheckCircle as M, Edit as j, Delete as X, ExpandMore as z } from "@mxenabled/mx-icons";
|
|
15
|
-
import { Text as
|
|
15
|
+
import { Text as B, TextField as q, CategoryIcon as H } from "@mxenabled/mxui";
|
|
16
16
|
import J from "@mui/material/Collapse";
|
|
17
17
|
import Q from "@mui/material/DialogContent";
|
|
18
18
|
import { b as S } from "./Localization-2MODESHW.mjs";
|
|
19
19
|
import { D as Z } from "./Dialog-CDV0kKxj.mjs";
|
|
20
20
|
import ee from "@mui/material/Box";
|
|
21
21
|
import te from "@mui/material/Chip";
|
|
22
|
-
import
|
|
23
|
-
import { L as k } from "./Loader-
|
|
24
|
-
import { S as oe } from "./SearchBox-
|
|
25
|
-
import { D as ae } from "./Drawer-
|
|
22
|
+
import I from "@mui/material/IconButton";
|
|
23
|
+
import { L as k } from "./Loader-BSWSYqvn.mjs";
|
|
24
|
+
import { S as oe } from "./SearchBox-B2_zLv8-.mjs";
|
|
25
|
+
import { D as ae } from "./Drawer-Dqe5EqvA.mjs";
|
|
26
26
|
const p = () => {
|
|
27
27
|
if (!C.useContext(K))
|
|
28
28
|
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
|
29
|
-
return
|
|
29
|
+
return y().uiStore;
|
|
30
30
|
}, m = {
|
|
31
31
|
ON_CATEGORY_EXPANDED: "onCategoryExpanded",
|
|
32
32
|
ON_CATEGORY_COLLAPSED: "onCategoryCollapsed",
|
|
@@ -48,7 +48,7 @@ const re = ({
|
|
|
48
48
|
isOpen: c,
|
|
49
49
|
type: s
|
|
50
50
|
}) => {
|
|
51
|
-
const [a, i] = C.useState(e), { categories: n } =
|
|
51
|
+
const [a, i] = C.useState(e), { categories: n } = b(), { setShouldDisableDrawerScroll: l } = p();
|
|
52
52
|
let u = "", d = [];
|
|
53
53
|
const _ = s === "delete";
|
|
54
54
|
switch (s) {
|
|
@@ -61,7 +61,7 @@ const re = ({
|
|
|
61
61
|
case "delete":
|
|
62
62
|
u = n.delete_subcategory_heading, d = S(
|
|
63
63
|
n.all_transactions_in_this_subcategory,
|
|
64
|
-
/* @__PURE__ */ t(
|
|
64
|
+
/* @__PURE__ */ t(B, { bold: !0, children: S(n.all_parent_category, e) })
|
|
65
65
|
);
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
@@ -79,7 +79,7 @@ const re = ({
|
|
|
79
79
|
onPrimaryAction: () => {
|
|
80
80
|
l(!1), r(a);
|
|
81
81
|
},
|
|
82
|
-
children: /* @__PURE__ */ t(Q, { children: _ ? /* @__PURE__ */ t(
|
|
82
|
+
children: /* @__PURE__ */ t(Q, { children: _ ? /* @__PURE__ */ t(B, { children: d }) : /* @__PURE__ */ t(
|
|
83
83
|
q,
|
|
84
84
|
{
|
|
85
85
|
inputProps: {
|
|
@@ -95,7 +95,7 @@ const re = ({
|
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
}, R = g(re), ne = ({ parentCategory: e }) => {
|
|
98
|
-
const [o, r] = C.useState(!1), { addCategory: c } =
|
|
98
|
+
const [o, r] = C.useState(!1), { addCategory: c } = y(), { categories: s } = b(), { onEvent: a } = D(), { setShouldDisableDrawerScroll: i } = p(), n = async (d) => {
|
|
99
99
|
await c(d.trim(), e.guid), a(m.ON_SUBCATEGORY_ADDED), r(!1);
|
|
100
100
|
}, l = async () => {
|
|
101
101
|
a(m.ON_SUBCATEGORY_ADD_CLICK), i(!0), r(!0);
|
|
@@ -107,7 +107,7 @@ const re = ({
|
|
|
107
107
|
G,
|
|
108
108
|
{
|
|
109
109
|
primary: s.add_subcategory_button,
|
|
110
|
-
primaryTypographyProps: { color: "primary", fontWeight: "normal", variant: "
|
|
110
|
+
primaryTypographyProps: { color: "primary", fontWeight: "normal", variant: "Body" }
|
|
111
111
|
}
|
|
112
112
|
) }),
|
|
113
113
|
o && /* @__PURE__ */ t(
|
|
@@ -125,7 +125,7 @@ const re = ({
|
|
|
125
125
|
subCategory: o,
|
|
126
126
|
showRename: r
|
|
127
127
|
}) => {
|
|
128
|
-
const { updateCategory: c } =
|
|
128
|
+
const { updateCategory: c } = y(), { onEvent: s } = D(), a = async (n) => {
|
|
129
129
|
await c({ ...o, name: n }), s(m.ON_SUBCATEGORY_SAVED), e(!1);
|
|
130
130
|
}, i = () => {
|
|
131
131
|
e(!1), s(m.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
|
|
@@ -146,7 +146,7 @@ const re = ({
|
|
|
146
146
|
setShowDelete: r,
|
|
147
147
|
subCategory: c
|
|
148
148
|
}) => {
|
|
149
|
-
const { onEvent: s } = D(), { removeCategory: a } =
|
|
149
|
+
const { onEvent: s } = D(), { removeCategory: a } = y(), i = () => {
|
|
150
150
|
r(!1), s(m.ON_SUBCATEGORY_DELETE_CLICK);
|
|
151
151
|
}, n = async () => {
|
|
152
152
|
s(m.ON_SUBCATEGORY_DELETED), await a(c.guid), r(!1);
|
|
@@ -170,7 +170,7 @@ const re = ({
|
|
|
170
170
|
showSelected: i,
|
|
171
171
|
unselectable: n,
|
|
172
172
|
unselectableText: l
|
|
173
|
-
} = p(), { categories: u } =
|
|
173
|
+
} = p(), { categories: u } = b(), { onEvent: d } = D(), [_, h] = C.useState(!1), [f, O] = C.useState(!1), T = !!o.revision, A = o.guid === c, w = !n.some((P) => P === o.guid);
|
|
174
174
|
return /* @__PURE__ */ E(
|
|
175
175
|
x,
|
|
176
176
|
{
|
|
@@ -193,7 +193,7 @@ const re = ({
|
|
|
193
193
|
G,
|
|
194
194
|
{
|
|
195
195
|
primary: o.name,
|
|
196
|
-
primaryTypographyProps: { fontWeight: "normal", variant: "
|
|
196
|
+
primaryTypographyProps: { fontWeight: "normal", variant: "Body" }
|
|
197
197
|
}
|
|
198
198
|
),
|
|
199
199
|
i && A && /* @__PURE__ */ t(M, { fontSize: "small" }),
|
|
@@ -203,7 +203,7 @@ const re = ({
|
|
|
203
203
|
),
|
|
204
204
|
T && /* @__PURE__ */ E(ee, { className: "mx-cat-subcategory-edit-container", sx: { marginRight: 24 }, children: [
|
|
205
205
|
/* @__PURE__ */ t(
|
|
206
|
-
|
|
206
|
+
I,
|
|
207
207
|
{
|
|
208
208
|
"aria-label": S(u.edit_subcategory_aria, o.name),
|
|
209
209
|
onClick: () => {
|
|
@@ -213,7 +213,7 @@ const re = ({
|
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
/* @__PURE__ */ t(
|
|
216
|
-
|
|
216
|
+
I,
|
|
217
217
|
{
|
|
218
218
|
"aria-label": S(u.delete_subcategory_aria, o.name),
|
|
219
219
|
edge: "end",
|
|
@@ -290,7 +290,7 @@ const re = ({
|
|
|
290
290
|
G,
|
|
291
291
|
{
|
|
292
292
|
primary: e.name,
|
|
293
|
-
primaryTypographyProps: { fontWeight: "normal", variant: "
|
|
293
|
+
primaryTypographyProps: { fontWeight: "normal", variant: "Body" }
|
|
294
294
|
}
|
|
295
295
|
),
|
|
296
296
|
/* @__PURE__ */ t(F, { children: /* @__PURE__ */ t(
|
|
@@ -310,7 +310,7 @@ const re = ({
|
|
|
310
310
|
/* @__PURE__ */ t(ge, { categories: o, parentCategory: e })
|
|
311
311
|
] });
|
|
312
312
|
}, Ee = g(_e), pe = () => {
|
|
313
|
-
const { categories: e } =
|
|
313
|
+
const { categories: e } = y(), { searchValue: o } = p(), { categories: r } = b(), s = ((a, i = "") => a.reduce((n, l) => {
|
|
314
314
|
if (l.parent_guid === null) {
|
|
315
315
|
const d = [
|
|
316
316
|
{
|
|
@@ -342,7 +342,7 @@ const re = ({
|
|
|
342
342
|
unselectable: c = [],
|
|
343
343
|
unselectableText: s = "Unselectable"
|
|
344
344
|
}) => {
|
|
345
|
-
const { categories: a, loadCategories: i } =
|
|
345
|
+
const { categories: a, loadCategories: i } = y(), { common: n } = b(), { isCopyLoaded: l } = U(), {
|
|
346
346
|
searchValue: u,
|
|
347
347
|
setOnSelect: d,
|
|
348
348
|
setSearchValue: _,
|
|
@@ -370,14 +370,14 @@ const re = ({
|
|
|
370
370
|
),
|
|
371
371
|
/* @__PURE__ */ t(he, {})
|
|
372
372
|
] }) : /* @__PURE__ */ t(k, {});
|
|
373
|
-
},
|
|
373
|
+
}, ye = g(Se), be = ({
|
|
374
374
|
id: e,
|
|
375
375
|
onClose: o,
|
|
376
376
|
title: r,
|
|
377
377
|
showDrawer: c,
|
|
378
378
|
...s
|
|
379
379
|
}) => {
|
|
380
|
-
const { common: a } =
|
|
380
|
+
const { common: a } = b(), { isCopyLoaded: i } = U();
|
|
381
381
|
return i ? /* @__PURE__ */ t(
|
|
382
382
|
ae,
|
|
383
383
|
{
|
|
@@ -387,12 +387,12 @@ const re = ({
|
|
|
387
387
|
isOpen: c,
|
|
388
388
|
onClose: o,
|
|
389
389
|
title: r,
|
|
390
|
-
children: /* @__PURE__ */ t(
|
|
390
|
+
children: /* @__PURE__ */ t(ye, { ...s })
|
|
391
391
|
}
|
|
392
392
|
) : /* @__PURE__ */ t(k, {});
|
|
393
|
-
}, ze = g(
|
|
393
|
+
}, ze = g(be);
|
|
394
394
|
export {
|
|
395
|
-
|
|
395
|
+
ye as C,
|
|
396
396
|
ze as a,
|
|
397
397
|
Ee as b,
|
|
398
398
|
p as u
|