@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug
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 +18 -0
- package/dist/Account-BiB1F8lL.mjs +118 -0
- package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
- package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
- package/dist/AccountStore-BbPWe2C9.mjs +244 -0
- package/dist/Accounts-M-LTzStv.mjs +27 -0
- package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
- package/dist/CategoryUtil-meuejJqP.mjs +80 -0
- package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
- package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
- package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
- package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
- package/dist/GoalStore-B4LVt_kH.mjs +422 -0
- package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
- package/dist/NetWorthStore-yV43kJro.mjs +168 -0
- package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
- package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
- package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
- package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
- package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
- package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
- package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
- package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
- package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
- package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
- package/dist/accounts/index.es.js +421 -391
- package/dist/accounts/stores/AccountStore.d.ts +30 -23
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +546 -540
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +444 -457
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +10 -5
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +459 -445
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +10 -6
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +84 -116
- package/dist/debts/index.es.js +417 -413
- package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
- package/dist/finstrong/index.es.js +1167 -1110
- package/dist/goals/index.es.js +618 -598
- package/dist/goals/stores/GoalStore.d.ts +19 -4
- package/dist/help/index.es.js +13 -13
- package/dist/investments/index.es.js +330 -325
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +423 -433
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +90 -91
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +543 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
- package/dist/settings/index.es.js +253 -248
- package/dist/spending/index.es.js +282 -301
- package/dist/transactions/index.es.js +269 -263
- package/dist/transactions/stores/TransactionStore.d.ts +26 -77
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +708 -699
- package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
- package/package.json +3 -3
- package/dist/AccountStore-CWFzg8-E.mjs +0 -260
- package/dist/Accounts-CWt-NRq8.mjs +0 -9
- package/dist/CategoryUtil-DZflYFam.mjs +0 -78
- package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
- package/dist/GoalStore-C7ahxxLi.mjs +0 -364
- package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
- package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
- package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,116 +1,98 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
6
6
|
import v from "@mui/material/Box";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import b from "@mui/material/Stack";
|
|
8
|
+
import N from "@mui/material/Tab";
|
|
9
|
+
import it from "@mui/material/Tabs";
|
|
10
10
|
import yt from "@mui/material/styles/useTheme";
|
|
11
|
-
import { g as
|
|
12
|
-
import { Text as T, Icon as
|
|
13
|
-
import { f as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { L as
|
|
17
|
-
import { M as
|
|
18
|
-
import { startOfToday as
|
|
19
|
-
import
|
|
20
|
-
import { useTheme as
|
|
21
|
-
import { e as
|
|
22
|
-
import { T as Dt, a as
|
|
23
|
-
import
|
|
11
|
+
import { g as rt, a as st, S as $, b as Y } from "../SpendingLegend-CD60HCYS.mjs";
|
|
12
|
+
import { Text as T, Icon as _t } from "@mxenabled/mxui";
|
|
13
|
+
import { f as R } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
|
+
import { u as I, m as E, d as lt, b as z, a as V, h as ct, g as bt } from "../hooks-ZMp65DFz.mjs";
|
|
15
|
+
import { u as dt } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
16
|
+
import { L as gt } from "../Loader-DUaFpDGv.mjs";
|
|
17
|
+
import { M as Ct } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
18
|
+
import { startOfToday as q } from "date-fns/startOfToday";
|
|
19
|
+
import St from "@mui/material/Button";
|
|
20
|
+
import { useTheme as Tt } from "@mui/material";
|
|
21
|
+
import { e as Mt } from "../exportTransactionsToCSV-DtQ7ovAR.mjs";
|
|
22
|
+
import { T as Dt, a as xt } from "../TransactionDetails-BDhz3DLT.mjs";
|
|
23
|
+
import wt from "@mui/material/Collapse";
|
|
24
24
|
import F from "@mui/material/Divider";
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { u as
|
|
29
|
-
import { D as
|
|
25
|
+
import J from "@mui/material/List";
|
|
26
|
+
import Q from "@mui/material/ListItem";
|
|
27
|
+
import Z from "@mui/material/ListItemButton";
|
|
28
|
+
import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
29
|
+
import { D as tt } from "../Drawer-DV4NTsFg.mjs";
|
|
30
30
|
import { b as L } from "../Category-CevNQ03n.mjs";
|
|
31
|
-
import { A as
|
|
32
|
-
const
|
|
33
|
-
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children:
|
|
34
|
-
/* @__PURE__ */ t(T, { variant: "XSmall", children:
|
|
35
|
-
] }),
|
|
36
|
-
const
|
|
37
|
-
categories: i,
|
|
38
|
-
dateRangeCategoryTotals: r,
|
|
39
|
-
dataRangeTotalsLoaded: n,
|
|
40
|
-
loadDateRangeCategoryTotals: u
|
|
41
|
-
} = H();
|
|
42
|
-
pt({
|
|
43
|
-
widgetName: "SpendingMiniWidget",
|
|
44
|
-
isLoaded: n
|
|
45
|
-
});
|
|
46
|
-
const l = a.useMemo(
|
|
31
|
+
import { A as et, W as vt } from "../WidgetContainer-BbPS3Yxz.mjs";
|
|
32
|
+
const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b, { direction: "column", children: [
|
|
33
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
|
|
34
|
+
/* @__PURE__ */ t(T, { variant: "XSmall", children: R(n, a === "mini" ? "0,0" : "0,0.00") })
|
|
35
|
+
] }), At = () => {
|
|
36
|
+
const n = yt(), { goals: d, spending: a } = I(), { categories: o, dateRangeCategoryTotals: i } = E(), g = l.useMemo(
|
|
47
37
|
() => [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
n.palette.chartMono.chartMono5,
|
|
39
|
+
n.palette.chartMono.chartMono4,
|
|
40
|
+
n.palette.chartMono.chartMono3,
|
|
41
|
+
n.palette.chartMono.chartMono2,
|
|
42
|
+
n.palette.chartMono.chartMono1,
|
|
43
|
+
n.palette.chartMono.chartMono6
|
|
54
44
|
],
|
|
55
|
-
[
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
(
|
|
66
|
-
[i, r]
|
|
67
|
-
), _ = a.useMemo(
|
|
68
|
-
() => dt(i, r, l),
|
|
69
|
-
[i, r, l]
|
|
70
|
-
), k = (S, O) => {
|
|
71
|
-
M(O), p("");
|
|
72
|
-
}, x = (S) => {
|
|
73
|
-
p(f === S ? "" : S);
|
|
45
|
+
[n]
|
|
46
|
+
), [e, r] = l.useState(""), [p, _] = l.useState(0), u = l.useMemo(
|
|
47
|
+
() => rt(o, d, n, i),
|
|
48
|
+
[o, i]
|
|
49
|
+
), m = l.useMemo(
|
|
50
|
+
() => st(o, i, g),
|
|
51
|
+
[o, i, g]
|
|
52
|
+
), M = (f, D) => {
|
|
53
|
+
_(D), r("");
|
|
54
|
+
}, y = (f) => {
|
|
55
|
+
r(e === f ? "" : f);
|
|
74
56
|
};
|
|
75
|
-
return
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
57
|
+
return /* @__PURE__ */ c(v, { width: "100%", children: [
|
|
58
|
+
/* @__PURE__ */ c(
|
|
59
|
+
it,
|
|
78
60
|
{
|
|
79
|
-
"aria-label":
|
|
80
|
-
onChange:
|
|
81
|
-
value:
|
|
61
|
+
"aria-label": a.mini_title,
|
|
62
|
+
onChange: M,
|
|
63
|
+
value: p,
|
|
82
64
|
variant: "fullWidth",
|
|
83
65
|
children: [
|
|
84
66
|
/* @__PURE__ */ t(
|
|
85
|
-
|
|
67
|
+
N,
|
|
86
68
|
{
|
|
87
69
|
"aria-controls": "spending-tabpanel",
|
|
88
70
|
id: "spending-tab",
|
|
89
71
|
label: /* @__PURE__ */ t(
|
|
90
|
-
|
|
72
|
+
k,
|
|
91
73
|
{
|
|
92
|
-
amount:
|
|
93
|
-
label:
|
|
74
|
+
amount: u.totalAmount,
|
|
75
|
+
label: a.spend_tab_title,
|
|
94
76
|
variant: "mini"
|
|
95
77
|
}
|
|
96
78
|
),
|
|
97
|
-
tabIndex:
|
|
79
|
+
tabIndex: p === 0 ? 0 : -1
|
|
98
80
|
}
|
|
99
81
|
),
|
|
100
82
|
/* @__PURE__ */ t(
|
|
101
|
-
|
|
83
|
+
N,
|
|
102
84
|
{
|
|
103
85
|
"aria-controls": "income-tabpanel",
|
|
104
86
|
id: "income-tab",
|
|
105
87
|
label: /* @__PURE__ */ t(
|
|
106
|
-
|
|
88
|
+
k,
|
|
107
89
|
{
|
|
108
|
-
amount:
|
|
109
|
-
label:
|
|
90
|
+
amount: m.totalAmount,
|
|
91
|
+
label: a.income_tab_title,
|
|
110
92
|
variant: "mini"
|
|
111
93
|
}
|
|
112
94
|
),
|
|
113
|
-
tabIndex:
|
|
95
|
+
tabIndex: p === 1 ? 0 : -1
|
|
114
96
|
}
|
|
115
97
|
)
|
|
116
98
|
]
|
|
@@ -120,20 +102,20 @@ const R = ({ amount: e, label: g, variant: o = "full" }) => /* @__PURE__ */ d(y,
|
|
|
120
102
|
v,
|
|
121
103
|
{
|
|
122
104
|
"aria-labelledby": "spending-tab",
|
|
123
|
-
hidden:
|
|
105
|
+
hidden: p !== 0,
|
|
124
106
|
id: "spending-tabpanel",
|
|
125
107
|
role: "tabpanel",
|
|
126
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ c(b, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
127
109
|
/* @__PURE__ */ t(
|
|
128
|
-
|
|
110
|
+
$,
|
|
129
111
|
{
|
|
130
|
-
data:
|
|
131
|
-
onSelected:
|
|
132
|
-
selectedId:
|
|
133
|
-
totalLabel:
|
|
112
|
+
data: u,
|
|
113
|
+
onSelected: y,
|
|
114
|
+
selectedId: e,
|
|
115
|
+
totalLabel: a.total_spending
|
|
134
116
|
}
|
|
135
117
|
),
|
|
136
|
-
/* @__PURE__ */ t(
|
|
118
|
+
/* @__PURE__ */ t(Y, { data: u, onSelected: y, selectedId: e })
|
|
137
119
|
] })
|
|
138
120
|
}
|
|
139
121
|
),
|
|
@@ -141,65 +123,74 @@ const R = ({ amount: e, label: g, variant: o = "full" }) => /* @__PURE__ */ d(y,
|
|
|
141
123
|
v,
|
|
142
124
|
{
|
|
143
125
|
"aria-labelledby": "income-tab",
|
|
144
|
-
hidden:
|
|
126
|
+
hidden: p !== 1,
|
|
145
127
|
id: "income-tabpanel",
|
|
146
128
|
role: "tabpanel",
|
|
147
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ c(b, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
148
130
|
/* @__PURE__ */ t(
|
|
149
|
-
|
|
131
|
+
$,
|
|
150
132
|
{
|
|
151
|
-
data:
|
|
133
|
+
data: m,
|
|
152
134
|
isIncome: !0,
|
|
153
|
-
onSelected:
|
|
154
|
-
selectedId:
|
|
155
|
-
totalLabel:
|
|
135
|
+
onSelected: y,
|
|
136
|
+
selectedId: e,
|
|
137
|
+
totalLabel: a.total_income
|
|
156
138
|
}
|
|
157
139
|
),
|
|
158
|
-
/* @__PURE__ */ t(
|
|
140
|
+
/* @__PURE__ */ t(Y, { data: m, onSelected: y, selectedId: e })
|
|
159
141
|
] })
|
|
160
142
|
}
|
|
161
143
|
)
|
|
162
|
-
] })
|
|
163
|
-
},
|
|
164
|
-
const {
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
144
|
+
] });
|
|
145
|
+
}, It = A(At), Et = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
146
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { spending: p } = I(), { isInitialized: _, selectedAccounts: u } = z();
|
|
147
|
+
return dt({
|
|
148
|
+
widgetName: "SpendingMiniWidget",
|
|
149
|
+
isLoaded: i
|
|
150
|
+
}), l.useEffect(() => {
|
|
151
|
+
a || o().finally(), g || e().finally();
|
|
152
|
+
}, []), l.useEffect(() => {
|
|
153
|
+
r(
|
|
154
|
+
u,
|
|
155
|
+
at(/* @__PURE__ */ new Date()),
|
|
156
|
+
ot(/* @__PURE__ */ new Date())
|
|
157
|
+
).finally();
|
|
158
|
+
}, [u]), _ ? /* @__PURE__ */ t(
|
|
159
|
+
Ct,
|
|
169
160
|
{
|
|
170
161
|
className: "mx-exp-spending-miniwidget",
|
|
171
|
-
onPrimaryCtaClick:
|
|
172
|
-
primaryCtaLabel:
|
|
173
|
-
sx: { height: "100%", ...
|
|
174
|
-
title:
|
|
175
|
-
children: /* @__PURE__ */ t(
|
|
162
|
+
onPrimaryCtaClick: n,
|
|
163
|
+
primaryCtaLabel: p.primary_cta,
|
|
164
|
+
sx: { height: "100%", ...d },
|
|
165
|
+
title: p.mini_title,
|
|
166
|
+
children: /* @__PURE__ */ t(It, {})
|
|
176
167
|
}
|
|
177
|
-
);
|
|
178
|
-
},
|
|
179
|
-
data:
|
|
180
|
-
onSelected:
|
|
181
|
-
selectedId:
|
|
182
|
-
title:
|
|
168
|
+
) : /* @__PURE__ */ t(gt, {});
|
|
169
|
+
}, fe = A(Et), Wt = ({
|
|
170
|
+
data: n,
|
|
171
|
+
onSelected: d,
|
|
172
|
+
selectedId: a = "",
|
|
173
|
+
title: o
|
|
183
174
|
}) => {
|
|
184
|
-
const { spending: i } =
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${
|
|
175
|
+
const { spending: i } = I(), g = n.categoryData.find((e) => e.guid === a);
|
|
176
|
+
return /* @__PURE__ */ c(b, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
177
|
+
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${o} ${i.by_category}` }),
|
|
187
178
|
/* @__PURE__ */ t(F, { "aria-hidden": "true" }),
|
|
188
|
-
/* @__PURE__ */ t(
|
|
179
|
+
/* @__PURE__ */ t(J, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
189
180
|
/* @__PURE__ */ t(
|
|
190
|
-
|
|
181
|
+
Q,
|
|
191
182
|
{
|
|
192
183
|
disableGutters: !0,
|
|
193
184
|
disablePadding: !0,
|
|
194
185
|
sx: {
|
|
195
186
|
minHeight: 44
|
|
196
187
|
},
|
|
197
|
-
children: /* @__PURE__ */
|
|
198
|
-
|
|
188
|
+
children: /* @__PURE__ */ c(
|
|
189
|
+
Z,
|
|
199
190
|
{
|
|
200
|
-
"aria-expanded":
|
|
201
|
-
id: `spending-list-category-${
|
|
202
|
-
onClick: () =>
|
|
191
|
+
"aria-expanded": g?.guid === e.guid,
|
|
192
|
+
id: `spending-list-category-${e.guid}`,
|
|
193
|
+
onClick: () => d(e.guid),
|
|
203
194
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
204
195
|
children: [
|
|
205
196
|
/* @__PURE__ */ t(
|
|
@@ -208,20 +199,20 @@ const R = ({ amount: e, label: g, variant: o = "full" }) => /* @__PURE__ */ d(y,
|
|
|
208
199
|
borderRadius: 4,
|
|
209
200
|
flexShrink: 0,
|
|
210
201
|
height: 8,
|
|
211
|
-
sx: { backgroundColor:
|
|
202
|
+
sx: { backgroundColor: e.color, mr: 8 },
|
|
212
203
|
width: 8
|
|
213
204
|
}
|
|
214
205
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
|
|
206
|
+
/* @__PURE__ */ c(
|
|
207
|
+
b,
|
|
217
208
|
{
|
|
218
209
|
alignItems: "center",
|
|
219
210
|
direction: "row",
|
|
220
211
|
justifyContent: "space-between",
|
|
221
212
|
width: "100%",
|
|
222
213
|
children: [
|
|
223
|
-
/* @__PURE__ */ t(T, { bold:
|
|
224
|
-
/* @__PURE__ */ t(T, { bold:
|
|
214
|
+
/* @__PURE__ */ t(T, { bold: a === e.guid, children: e.name }),
|
|
215
|
+
/* @__PURE__ */ t(T, { bold: a === e.guid, variant: "Body", children: R(e.amount, "0,0.00") })
|
|
225
216
|
]
|
|
226
217
|
}
|
|
227
218
|
)
|
|
@@ -231,57 +222,57 @@ const R = ({ amount: e, label: g, variant: o = "full" }) => /* @__PURE__ */ d(y,
|
|
|
231
222
|
}
|
|
232
223
|
),
|
|
233
224
|
/* @__PURE__ */ t(F, {}),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
225
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(wt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ c(J, { children: [
|
|
226
|
+
g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
|
|
227
|
+
Q,
|
|
237
228
|
{
|
|
238
229
|
sx: {
|
|
239
230
|
pl: 12,
|
|
240
231
|
py: 0
|
|
241
232
|
},
|
|
242
233
|
children: /* @__PURE__ */ t(
|
|
243
|
-
|
|
234
|
+
Z,
|
|
244
235
|
{
|
|
245
|
-
id: `spending-list-subcategory-${
|
|
246
|
-
onClick: () =>
|
|
236
|
+
id: `spending-list-subcategory-${r.guid}`,
|
|
237
|
+
onClick: () => d(r.guid, !0),
|
|
247
238
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
248
|
-
children: /* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
|
|
239
|
+
children: /* @__PURE__ */ c(b, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
240
|
+
/* @__PURE__ */ c(T, { children: [
|
|
241
|
+
r.name,
|
|
251
242
|
" "
|
|
252
243
|
] }),
|
|
253
|
-
/* @__PURE__ */ t(T, { children:
|
|
244
|
+
/* @__PURE__ */ t(T, { children: R(r.amount, "0,0.00") })
|
|
254
245
|
] })
|
|
255
246
|
}
|
|
256
247
|
)
|
|
257
248
|
},
|
|
258
|
-
|
|
249
|
+
r.guid
|
|
259
250
|
)),
|
|
260
251
|
/* @__PURE__ */ t(F, {})
|
|
261
252
|
] }) })
|
|
262
|
-
] },
|
|
263
|
-
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${
|
|
253
|
+
] }, e.guid)) }),
|
|
254
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${R(n.totalAmount, "0,0.00")}` })
|
|
264
255
|
] });
|
|
265
|
-
},
|
|
266
|
-
data:
|
|
267
|
-
onSelected:
|
|
268
|
-
onViewTransactions:
|
|
269
|
-
selectedId:
|
|
256
|
+
}, Rt = A(Wt), Nt = ({
|
|
257
|
+
data: n,
|
|
258
|
+
onSelected: d,
|
|
259
|
+
onViewTransactions: a,
|
|
260
|
+
selectedId: o,
|
|
270
261
|
title: i
|
|
271
262
|
}) => {
|
|
272
|
-
const { isDesktop:
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
-
|
|
263
|
+
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = E(), { spending: p } = I();
|
|
264
|
+
return /* @__PURE__ */ c(
|
|
265
|
+
b,
|
|
275
266
|
{
|
|
276
|
-
alignItems:
|
|
277
|
-
direction:
|
|
267
|
+
alignItems: e ? "center" : "flex-start",
|
|
268
|
+
direction: e ? "column" : "row",
|
|
278
269
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
279
270
|
justifyContent: "center",
|
|
280
271
|
pt: 50,
|
|
281
272
|
px: 8,
|
|
282
273
|
children: [
|
|
283
|
-
|
|
284
|
-
|
|
274
|
+
r && /* @__PURE__ */ t(
|
|
275
|
+
$,
|
|
285
276
|
{
|
|
286
277
|
data: {
|
|
287
278
|
categoryData: [],
|
|
@@ -291,214 +282,204 @@ const R = ({ amount: e, label: g, variant: o = "full" }) => /* @__PURE__ */ d(y,
|
|
|
291
282
|
onSelected: () => {
|
|
292
283
|
},
|
|
293
284
|
selectedId: "",
|
|
294
|
-
size:
|
|
285
|
+
size: g ? 400 : 300,
|
|
295
286
|
totalLabel: "Loading ...",
|
|
296
287
|
variant: "full"
|
|
297
288
|
}
|
|
298
289
|
),
|
|
299
|
-
!
|
|
300
|
-
|
|
290
|
+
!r && /* @__PURE__ */ t(
|
|
291
|
+
$,
|
|
301
292
|
{
|
|
302
|
-
data:
|
|
293
|
+
data: n,
|
|
303
294
|
onSelected: (m) => {
|
|
304
|
-
|
|
295
|
+
d(m), setTimeout(() => document.getElementById(`spending-list-category-${m}`)?.focus(), 0);
|
|
305
296
|
},
|
|
306
|
-
onViewTransactions:
|
|
307
|
-
selectedId:
|
|
308
|
-
size:
|
|
309
|
-
totalLabel:
|
|
297
|
+
onViewTransactions: a,
|
|
298
|
+
selectedId: o,
|
|
299
|
+
size: g ? 400 : 300,
|
|
300
|
+
totalLabel: p.total_amount,
|
|
310
301
|
variant: "full"
|
|
311
302
|
}
|
|
312
303
|
),
|
|
313
|
-
/* @__PURE__ */ t(
|
|
304
|
+
/* @__PURE__ */ t(Rt, { data: n, onSelected: d, selectedId: o, title: i })
|
|
314
305
|
]
|
|
315
306
|
}
|
|
316
307
|
);
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
],
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
} =
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}, [m, p]);
|
|
350
|
-
const G = a.useMemo(
|
|
351
|
-
() => lt(s, u, e, i),
|
|
352
|
-
[s, i]
|
|
353
|
-
), Y = a.useMemo(
|
|
354
|
-
() => dt(s, i, Bt(e)),
|
|
355
|
-
[s, i]
|
|
356
|
-
), j = a.useMemo(
|
|
357
|
-
() => _.find((c) => c.guid === U),
|
|
358
|
-
[U, _]
|
|
359
|
-
), ht = (c, C) => {
|
|
360
|
-
ut(C), K("");
|
|
361
|
-
}, q = (c, C = !1) => {
|
|
362
|
-
C ? ft(c) : K(I === c || c === "0" ? "" : c);
|
|
363
|
-
}, ft = (c) => {
|
|
364
|
-
b({
|
|
308
|
+
}, nt = A(Nt), $t = (n) => [
|
|
309
|
+
n.palette.chartMono.chartMono5,
|
|
310
|
+
n.palette.chartMono.chartMono4,
|
|
311
|
+
n.palette.chartMono.chartMono3,
|
|
312
|
+
n.palette.chartMono.chartMono2,
|
|
313
|
+
n.palette.chartMono.chartMono1,
|
|
314
|
+
n.palette.chartMono.chartMono6
|
|
315
|
+
], kt = () => {
|
|
316
|
+
const n = Tt(), { is_mobile_webview: d } = V(), { clientConfig: a } = V(), { categories: o, dateRangeCategoryTotals: i } = E(), {
|
|
317
|
+
goals: g,
|
|
318
|
+
spending: e,
|
|
319
|
+
transactions: r
|
|
320
|
+
} = I(), { displayedDateRange: p, selectedAccountGuids: _ } = z(), {
|
|
321
|
+
setFilter: u,
|
|
322
|
+
sortedTransactions: m,
|
|
323
|
+
sortedTransactionsWithSplits: M,
|
|
324
|
+
tags: y
|
|
325
|
+
} = ct(), f = a?.master?.deep_link_params?.account_guids, D = a?.master?.deep_link_params?.view, [x, C] = l.useState(""), [w, W] = l.useState(D === "income" ? 1 : 0), [H, P] = l.useState(""), [pt, O] = l.useState(!1), B = l.useMemo(
|
|
326
|
+
() => rt(o, g, n, i),
|
|
327
|
+
[o, i]
|
|
328
|
+
), K = l.useMemo(
|
|
329
|
+
() => st(o, i, $t(n)),
|
|
330
|
+
[o, i]
|
|
331
|
+
), G = l.useMemo(
|
|
332
|
+
() => m.find((s) => s.guid === H),
|
|
333
|
+
[H, m]
|
|
334
|
+
), ut = (s, S) => {
|
|
335
|
+
W(S), C("");
|
|
336
|
+
}, U = (s, S = !1) => {
|
|
337
|
+
S ? mt(s) : C(x === s || s === "0" ? "" : s);
|
|
338
|
+
}, mt = (s) => {
|
|
339
|
+
u({
|
|
365
340
|
...{
|
|
366
|
-
accounts:
|
|
341
|
+
accounts: f || _,
|
|
367
342
|
dateRange: p
|
|
368
343
|
},
|
|
369
|
-
custom: (h) =>
|
|
344
|
+
custom: (h) => x === "other" ? h.top_level_category_guid === s : h.category_guid === s,
|
|
370
345
|
showSplits: !0
|
|
371
|
-
}),
|
|
372
|
-
},
|
|
373
|
-
const
|
|
374
|
-
accounts:
|
|
346
|
+
}), O(!0);
|
|
347
|
+
}, X = (s) => {
|
|
348
|
+
const S = {
|
|
349
|
+
accounts: f || _,
|
|
375
350
|
dateRange: p
|
|
376
351
|
};
|
|
377
|
-
if (
|
|
378
|
-
if (
|
|
379
|
-
const h =
|
|
380
|
-
|
|
381
|
-
...
|
|
382
|
-
custom: (
|
|
352
|
+
if (w === 0)
|
|
353
|
+
if (s === "other") {
|
|
354
|
+
const h = B.categoryData.find((j) => j.guid === "other");
|
|
355
|
+
u({
|
|
356
|
+
...S,
|
|
357
|
+
custom: (j) => !!h?.categoryTotals?.find((ft) => ft.guid === j.top_level_category_guid)
|
|
383
358
|
});
|
|
384
359
|
} else
|
|
385
|
-
|
|
386
|
-
...
|
|
387
|
-
custom: (h) =>
|
|
388
|
-
showSplits: !!
|
|
360
|
+
u({
|
|
361
|
+
...S,
|
|
362
|
+
custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== L.INCOME && h.category_guid !== L.INCOME && h.top_level_category_guid !== L.INVESTMENTS && h.top_level_category_guid !== L.TRANSFER,
|
|
363
|
+
showSplits: !!s
|
|
389
364
|
});
|
|
390
365
|
else
|
|
391
|
-
|
|
392
|
-
...
|
|
393
|
-
custom: (h) =>
|
|
366
|
+
u({
|
|
367
|
+
...S,
|
|
368
|
+
custom: (h) => s ? h.category_guid === s : h.category_guid === L.INCOME || h.top_level_category_guid === L.INCOME
|
|
394
369
|
});
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
370
|
+
O(!0);
|
|
371
|
+
}, ht = () => {
|
|
372
|
+
Mt(M, y);
|
|
398
373
|
};
|
|
399
|
-
return /* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
375
|
+
/* @__PURE__ */ c(it, { onChange: ut, value: w, variant: "fullWidth", children: [
|
|
401
376
|
/* @__PURE__ */ t(
|
|
402
|
-
|
|
377
|
+
N,
|
|
403
378
|
{
|
|
404
379
|
label: /* @__PURE__ */ t(
|
|
405
|
-
|
|
380
|
+
k,
|
|
406
381
|
{
|
|
407
|
-
amount:
|
|
408
|
-
label:
|
|
382
|
+
amount: B.totalAmount,
|
|
383
|
+
label: e.spend_tab_title
|
|
409
384
|
}
|
|
410
385
|
)
|
|
411
386
|
}
|
|
412
387
|
),
|
|
413
388
|
/* @__PURE__ */ t(
|
|
414
|
-
|
|
389
|
+
N,
|
|
415
390
|
{
|
|
416
391
|
label: /* @__PURE__ */ t(
|
|
417
|
-
|
|
392
|
+
k,
|
|
418
393
|
{
|
|
419
|
-
amount:
|
|
420
|
-
label:
|
|
394
|
+
amount: K.totalAmount,
|
|
395
|
+
label: e.income_tab_title
|
|
421
396
|
}
|
|
422
397
|
)
|
|
423
398
|
}
|
|
424
399
|
)
|
|
425
400
|
] }),
|
|
426
|
-
|
|
427
|
-
|
|
401
|
+
w === 0 && /* @__PURE__ */ t(
|
|
402
|
+
nt,
|
|
428
403
|
{
|
|
429
|
-
data:
|
|
430
|
-
onSelected:
|
|
431
|
-
onViewTransactions:
|
|
432
|
-
selectedId:
|
|
433
|
-
title:
|
|
404
|
+
data: B,
|
|
405
|
+
onSelected: U,
|
|
406
|
+
onViewTransactions: X,
|
|
407
|
+
selectedId: x,
|
|
408
|
+
title: e.spend_tab_title
|
|
434
409
|
}
|
|
435
410
|
),
|
|
436
|
-
|
|
437
|
-
|
|
411
|
+
w === 1 && /* @__PURE__ */ t(
|
|
412
|
+
nt,
|
|
438
413
|
{
|
|
439
|
-
data:
|
|
440
|
-
onSelected:
|
|
441
|
-
onViewTransactions:
|
|
442
|
-
selectedId:
|
|
443
|
-
title:
|
|
414
|
+
data: K,
|
|
415
|
+
onSelected: U,
|
|
416
|
+
onViewTransactions: X,
|
|
417
|
+
selectedId: x,
|
|
418
|
+
title: e.income_tab_title
|
|
444
419
|
}
|
|
445
420
|
),
|
|
446
421
|
/* @__PURE__ */ t(
|
|
447
|
-
|
|
422
|
+
tt,
|
|
448
423
|
{
|
|
449
|
-
ariaLabelClose:
|
|
450
|
-
isOpen:
|
|
451
|
-
onClose: () =>
|
|
452
|
-
title:
|
|
453
|
-
children: /* @__PURE__ */
|
|
454
|
-
!
|
|
455
|
-
|
|
424
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
425
|
+
isOpen: pt,
|
|
426
|
+
onClose: () => O(!1),
|
|
427
|
+
title: e.transactions_drawer_title,
|
|
428
|
+
children: /* @__PURE__ */ c(b, { children: [
|
|
429
|
+
!d && m.length > 0 && /* @__PURE__ */ t(b, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
430
|
+
St,
|
|
456
431
|
{
|
|
457
|
-
onClick:
|
|
458
|
-
startIcon: /* @__PURE__ */ t(
|
|
432
|
+
onClick: ht,
|
|
433
|
+
startIcon: /* @__PURE__ */ t(_t, { name: "ios_share" }),
|
|
459
434
|
variant: "text",
|
|
460
|
-
children:
|
|
435
|
+
children: r.export_csv_btn
|
|
461
436
|
}
|
|
462
437
|
) }),
|
|
463
|
-
/* @__PURE__ */ t(Dt, { onClick:
|
|
438
|
+
/* @__PURE__ */ t(Dt, { onClick: P })
|
|
464
439
|
] })
|
|
465
440
|
}
|
|
466
441
|
),
|
|
467
442
|
/* @__PURE__ */ t(
|
|
468
|
-
|
|
443
|
+
tt,
|
|
469
444
|
{
|
|
470
|
-
ariaLabelClose:
|
|
471
|
-
isOpen: !!
|
|
472
|
-
onClose: () =>
|
|
473
|
-
title:
|
|
474
|
-
children:
|
|
445
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
446
|
+
isOpen: !!G,
|
|
447
|
+
onClose: () => P(""),
|
|
448
|
+
title: e.transaction_details_drawer_title,
|
|
449
|
+
children: G && /* @__PURE__ */ t(xt, { transaction: G })
|
|
475
450
|
}
|
|
476
451
|
)
|
|
477
452
|
] });
|
|
478
|
-
},
|
|
479
|
-
const {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
453
|
+
}, Ot = A(kt), Bt = ({ onBackClick: n, sx: d = {} }) => {
|
|
454
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { isTransactionDataLoaded: p, loadTransactionData: _ } = ct(), { spending: u } = I(), { displayedDateRange: m, isInitialized: M, setDisplayedDate: y, selectedAccounts: f } = z(), { onEvent: D } = bt(), { clientConfig: x } = V(), C = x?.master?.deep_link_params?.date_range;
|
|
455
|
+
dt({
|
|
456
|
+
widgetName: "SpendingWidget",
|
|
457
|
+
isLoaded: g
|
|
458
|
+
}), l.useEffect(() => {
|
|
459
|
+
C && Array.isArray(C) && C.length === 2 ? y(C[0], C[1]) : y(at(q()), ot(q())), a || o().finally(), i || e().finally(), p || _().finally(), D(et.SPENDING_VIEW);
|
|
460
|
+
}, []), l.useEffect(() => {
|
|
461
|
+
M && r(
|
|
462
|
+
f,
|
|
463
|
+
m.start,
|
|
464
|
+
m.end
|
|
465
|
+
).finally();
|
|
466
|
+
}, [m, M, f]);
|
|
467
|
+
const w = (W) => {
|
|
468
|
+
y(W[0], W[1]);
|
|
487
469
|
};
|
|
488
|
-
return
|
|
489
|
-
|
|
470
|
+
return M ? /* @__PURE__ */ t(
|
|
471
|
+
vt,
|
|
490
472
|
{
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
children: /* @__PURE__ */ t(v, { width: "100%", children: /* @__PURE__ */ t(jt, {}) })
|
|
473
|
+
calendarActions: { onRangeChanged: w },
|
|
474
|
+
onAccountsFilterClick: () => D(et.SPENDING_CLICK_FILTER),
|
|
475
|
+
onBackClick: n,
|
|
476
|
+
sx: d,
|
|
477
|
+
title: u.title,
|
|
478
|
+
children: /* @__PURE__ */ t(v, { width: "100%", children: /* @__PURE__ */ t(Ot, {}) })
|
|
498
479
|
}
|
|
499
|
-
);
|
|
500
|
-
},
|
|
480
|
+
) : /* @__PURE__ */ t(gt, {});
|
|
481
|
+
}, ye = A(Bt);
|
|
501
482
|
export {
|
|
502
|
-
|
|
503
|
-
|
|
483
|
+
fe as SpendingMiniWidget,
|
|
484
|
+
ye as SpendingWidget
|
|
504
485
|
};
|