@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms1
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-BDXA6PWh.mjs} +1 -1
- package/dist/AccountDetailsContent-CUztd3-b.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-i3KFhNuo.mjs} +18 -18
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-QZspYAji.mjs} +10 -12
- package/dist/AccountListItem-DX5upmCS.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-BcnDpyLL.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DXfZotRC.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-Df2nII9u.mjs} +31 -31
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +27 -27
- package/dist/{CategoryStore-MUwRWH9e.mjs → CategoryStore-DTgyAMM7.mjs} +2 -2
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-C5cR-nfQ.mjs} +4 -4
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BIbTqYOH.mjs} +47 -48
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +2 -2
- package/dist/CurrencyInput-BFKcs-_K.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-BbJB0nmu.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-BEtCk82g.mjs} +17 -17
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-DpWY3gVb.mjs} +4 -4
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-BnPXM_N2.mjs} +145 -124
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-NpXHhO1n.mjs} +46 -46
- package/dist/MicroWidgetContainer-DEiRnYVa.mjs +45 -0
- package/dist/MiniWidgetContainer-CmXpTylX.mjs +56 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-lsuhEpn6.mjs} +4 -4
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-CNmJWVeI.mjs} +77 -77
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +8 -8
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-CqZh1SQa.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BKcYmpv3.mjs} +77 -77
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/{SpendingData-DPQ96k3x.mjs → SpendingData-BuJ03S9d.mjs} +4 -4
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CjX-hX2O.mjs} +12 -12
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-D-Q3BU9Z.mjs} +58 -41
- package/dist/{TrendsStore-_mRaFUdf.mjs → TrendsStore-BW9FGQeE.mjs} +37 -37
- package/dist/{User-BklmOUSd.mjs → User-wXzDI4M8.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-C0832BMe.mjs} +233 -231
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-BhQ1Kx2z.mjs} +36 -36
- package/dist/accounts/index.es.js +94 -94
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +251 -250
- package/dist/cashflow/index.es.js +158 -157
- package/dist/categories/index.es.js +2 -2
- 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 +660 -395
- 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 +440 -440
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +3 -3
- package/dist/finstrong/index.es.js +118 -118
- package/dist/goals/index.es.js +380 -386
- 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 +6 -6
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +7 -7
- 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 +30 -30
- package/dist/recurringtransactions/index.es.js +85 -85
- package/dist/settings/index.es.js +270 -270
- package/dist/spending/index.es.js +44 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +169 -168
- package/dist/trends/index.es.js +318 -317
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-CFNF8766.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 +50 -45
- 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/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- 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-QZspYAji.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-
|
|
12
|
-
import { f as M, a as P } from "./Dialog-
|
|
13
|
-
import { I as L, P as U, S as j } from "./Account-
|
|
14
|
-
import { u as z } from "./useAccountDisplayName-
|
|
15
|
-
import { f as
|
|
11
|
+
import { L as H } from "./Loader-DUaFpDGv.mjs";
|
|
12
|
+
import { f as M, a as P } from "./Dialog-BPTr3qHE.mjs";
|
|
13
|
+
import { I as L, P as U, S as j } from "./Account-BDXA6PWh.mjs";
|
|
14
|
+
import { u as z } from "./useAccountDisplayName-CFNF8766.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,10 +1,10 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
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 _,
|
|
2
|
+
import { Icon as p, Text as y } from "@mxenabled/mxui";
|
|
3
|
+
import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-BIbTqYOH.mjs";
|
|
4
|
+
import { i as T, u as A, a as D, b as g, c as O } from "./Accounts-DXfZotRC.mjs";
|
|
5
|
+
import { f as _, i as b, a as N, b as S } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
6
6
|
import { b as i } from "./Localization-2MODESHW.mjs";
|
|
7
|
-
import { f as o, a as f } from "./Dialog-
|
|
7
|
+
import { f as o, a as f } from "./Dialog-BPTr3qHE.mjs";
|
|
8
8
|
const w = (l, e) => {
|
|
9
9
|
const r = [
|
|
10
10
|
{
|
|
@@ -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,20 +103,18 @@ 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
|
-
// checking or savings
|
|
110
109
|
case 1:
|
|
111
110
|
case 2: {
|
|
112
111
|
l.available_balance ? (r = e.available_balance, a = l.available_balance, t = l.available_balance ? e.current_balance : null, n = _(l.balance, "0,0.00"), s = !0) : (r = e.current_balance, a = l.balance);
|
|
113
112
|
break;
|
|
114
113
|
}
|
|
115
|
-
// credit cards, loans, investments, etc
|
|
116
114
|
default:
|
|
117
115
|
if (r = e.current_balance, a = l.balance, l.minimum_payment && l.payment_due_at) {
|
|
118
116
|
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: "
|
|
117
|
+
t = /* @__PURE__ */ u(y, { component: "strong", variant: "XSmall", children: i(
|
|
120
118
|
e.payment_due_on,
|
|
121
119
|
_(l.minimum_payment, "0,0.00"),
|
|
122
120
|
o(c, f.FULL_MONTH_DAY)
|
|
@@ -131,11 +129,11 @@ const w = (l, e) => {
|
|
|
131
129
|
hasAvailableBalance: s
|
|
132
130
|
};
|
|
133
131
|
}, x = (l, e) => l.reduce((a, t) => {
|
|
134
|
-
const s =
|
|
132
|
+
const s = C(t, e).firstValue || 0;
|
|
135
133
|
return a + s;
|
|
136
134
|
}, 0);
|
|
137
135
|
export {
|
|
138
136
|
x as a,
|
|
139
137
|
w as b,
|
|
140
|
-
|
|
138
|
+
C as g
|
|
141
139
|
};
|
|
@@ -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-B9oC6uL2.mjs";
|
|
13
|
+
import { g as T } from "./AccountFields-QZspYAji.mjs";
|
|
14
|
+
import { u as X } from "./useAccountDisplayName-CFNF8766.mjs";
|
|
15
|
+
import { u as $ } from "./hooks-C41HAxM5.mjs";
|
|
16
|
+
import { C as d } from "./ConnectDrawer-BIbTqYOH.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-wXzDI4M8.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-DXfZotRC.mjs";
|
|
5
|
+
import { A as c, j as u } from "./ConnectDrawer-BIbTqYOH.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-BIbTqYOH.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);
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { i as _ } from "./hooks-C41HAxM5.mjs";
|
|
2
|
-
import { b as d } from "./Category-
|
|
2
|
+
import { b as d } from "./Category-CevNQ03n.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,40 +2,47 @@ 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,
|
|
5
|
+
import { Text as s, Icon as p, IconWeight as h } 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 g = ({
|
|
13
13
|
body: o,
|
|
14
14
|
iconName: e = "info",
|
|
15
|
-
title:
|
|
15
|
+
title: n
|
|
16
16
|
}) => /* @__PURE__ */ t(
|
|
17
17
|
l,
|
|
18
18
|
{
|
|
19
19
|
enterTouchDelay: 500,
|
|
20
20
|
title: /* @__PURE__ */ a(m, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
-
/* @__PURE__ */ t(
|
|
21
|
+
/* @__PURE__ */ t(s, { bold: !0, variant: "Body", children: n }),
|
|
22
|
+
/* @__PURE__ */ t(s, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
|
|
23
23
|
] }),
|
|
24
24
|
children: /* @__PURE__ */ t(
|
|
25
25
|
c,
|
|
26
26
|
{
|
|
27
|
-
"aria-label":
|
|
27
|
+
"aria-label": n,
|
|
28
28
|
sx: {
|
|
29
29
|
minHeight: 0,
|
|
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
|
-
);
|
|
38
|
-
class
|
|
44
|
+
), E = g;
|
|
45
|
+
class I {
|
|
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 _ {
|
|
68
75
|
globalStore;
|
|
69
76
|
uiStore;
|
|
70
77
|
constructor(e) {
|
|
71
|
-
this.globalStore = e, this.uiStore = new
|
|
78
|
+
this.globalStore = e, this.uiStore = new I(), 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
|
+
_ as C,
|
|
90
|
+
E as I
|
|
84
91
|
};
|