@mx-cartographer/experiences 7.10.17 → 7.10.19
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 +8 -0
- package/dist/{InvestmentUtil-jOyOgzIB.mjs → InvestmentUtil-BItV7uEs.mjs} +17 -17
- package/dist/common/index.es.js +1 -1
- package/dist/common/types/AppData.d.ts +4 -1
- package/dist/investments/index.es.js +1 -1
- package/dist/spending/index.es.js +112 -110
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [7.10.19] - 02-13-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Bug causing Investment widget analysis to crash MD.
|
|
4
|
+
|
|
5
|
+
## [7.10.18] - 02-13-2026
|
|
6
|
+
|
|
7
|
+
- **FIXED** - Deep link parameters for date range in Spending widget
|
|
8
|
+
|
|
1
9
|
## [7.10.17] - 02-13-2026
|
|
2
10
|
|
|
3
11
|
- **FIXED** - Impove TrendsWidget accessibility
|
|
@@ -49,23 +49,23 @@ const V = {
|
|
|
49
49
|
for (let e = 0; e < a.length; e += s)
|
|
50
50
|
o.push(a.slice(e, e + s).map((c) => t[c]));
|
|
51
51
|
return o;
|
|
52
|
-
}, W = A(O), h = A(L),
|
|
52
|
+
}, W = A(O), h = A(L), S = (t) => {
|
|
53
53
|
const s = M(t, g), a = M(t, f), o = (c, i) => {
|
|
54
|
-
const _ = c.reduce((n, r) => n + T(r), 0),
|
|
55
|
-
const
|
|
56
|
-
return Object.keys(
|
|
54
|
+
const _ = c.reduce((n, r) => n + T(r), 0), l = c.reduce((n, r) => {
|
|
55
|
+
const u = i(r);
|
|
56
|
+
return Object.keys(u).forEach((E) => n[E] = (n[E] || 0) + u[E]), n;
|
|
57
57
|
}, {});
|
|
58
58
|
return Object.fromEntries(
|
|
59
|
-
Object.entries(
|
|
59
|
+
Object.entries(l).map(([n, r]) => [n, r / _ * 100])
|
|
60
60
|
);
|
|
61
61
|
};
|
|
62
62
|
return {
|
|
63
63
|
stocks: o(s, D),
|
|
64
64
|
bonds: o(a, R)
|
|
65
65
|
};
|
|
66
|
-
},
|
|
67
|
-
const s = t.filter((e) => !isNaN(e.equity_classification)), a = t.filter((e) => !isNaN(e.fixed_income_classification)), o = (e, c, i) => e.reduce((_,
|
|
68
|
-
const n = c(
|
|
66
|
+
}, w = (t) => {
|
|
67
|
+
const s = t.filter((e) => !isNaN(e.equity_classification)), a = t.filter((e) => !isNaN(e.fixed_income_classification)), o = (e, c, i) => e.reduce((_, l) => {
|
|
68
|
+
const n = c(l);
|
|
69
69
|
return Object.keys(i).forEach((r) => {
|
|
70
70
|
_[r] = (_[r] || 0) + (n[r] || 0);
|
|
71
71
|
}), _;
|
|
@@ -90,10 +90,10 @@ const V = {
|
|
|
90
90
|
mid_growth_weight: c,
|
|
91
91
|
mid_value_weight: i,
|
|
92
92
|
small_core_weight: _,
|
|
93
|
-
small_growth_weight:
|
|
93
|
+
small_growth_weight: l,
|
|
94
94
|
small_value_weight: n,
|
|
95
95
|
unknown_weight: r,
|
|
96
|
-
equity_classification:
|
|
96
|
+
equity_classification: u
|
|
97
97
|
} = t, E = {
|
|
98
98
|
LARGE_CORE: s ?? 0,
|
|
99
99
|
LARGE_GROWTH: a ?? 0,
|
|
@@ -102,20 +102,20 @@ const V = {
|
|
|
102
102
|
MID_GROWTH: c ?? 0,
|
|
103
103
|
MID_VALUE: i ?? 0,
|
|
104
104
|
SMALL_CORE: _ ?? 0,
|
|
105
|
-
SMALL_GROWTH:
|
|
105
|
+
SMALL_GROWTH: l ?? 0,
|
|
106
106
|
SMALL_VALUE: n ?? 0,
|
|
107
107
|
UNKNOWN: r ?? 0
|
|
108
108
|
};
|
|
109
|
-
return I(E) === 0 &&
|
|
109
|
+
return I(E) === 0 && u !== void 0 ? { [L[u]]: 100 } : E;
|
|
110
110
|
}, G = (t, s, a) => {
|
|
111
111
|
const o = s(t), e = T(t), c = H(o, e);
|
|
112
112
|
if (I(c) === 0) {
|
|
113
113
|
const i = String(
|
|
114
114
|
t.equity_classification ?? t.fixed_income_classification
|
|
115
115
|
);
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
if (i in a)
|
|
117
|
+
return { [a[i]]: e };
|
|
118
|
+
console.error(`Invalid classification key: ${i}`);
|
|
119
119
|
}
|
|
120
120
|
return c;
|
|
121
121
|
}, b = (t) => t.split("_").map((s) => s.charAt(0).toUpperCase() + s.slice(1).toLowerCase()).join(" "), p = (t) => t >= 1 ? `${d(t).format("0")}%` : "< 1%", T = (t) => t.calculated_market_value ?? t.market_value, M = (t, s) => t.filter((a) => {
|
|
@@ -127,8 +127,8 @@ const V = {
|
|
|
127
127
|
}, I = (t) => Object.values(t).reduce((s, a) => s + a, 0);
|
|
128
128
|
export {
|
|
129
129
|
m as A,
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
S as a,
|
|
131
|
+
w as b,
|
|
132
132
|
b as f,
|
|
133
133
|
C as m
|
|
134
134
|
};
|
package/dist/common/index.es.js
CHANGED
|
@@ -65,7 +65,7 @@ import { f as wt, a as Ct, b as O } from "../BudgetUtil-CrAD2kHT.mjs";
|
|
|
65
65
|
import { g as Po, e as Fo, c as Ho, d as Go, i as Wo } from "../BudgetUtil-CrAD2kHT.mjs";
|
|
66
66
|
import { a as xt } from "../DebtsStore-BIbOVCPe.mjs";
|
|
67
67
|
import { F as Dt } from "../FinstrongStore-DBSoLGSE.mjs";
|
|
68
|
-
import { A as At, m as vt, a as Et, b as Tt } from "../InvestmentUtil-
|
|
68
|
+
import { A as At, m as vt, a as Et, b as Tt } from "../InvestmentUtil-BItV7uEs.mjs";
|
|
69
69
|
import { M as Bt } from "../MerchantStore-WvZ4gnQe.mjs";
|
|
70
70
|
import { N as It } from "../NetWorthStore-yV43kJro.mjs";
|
|
71
71
|
import { a as Nt } from "../SettingsStore-uQ4s2d0P.mjs";
|
|
@@ -24,7 +24,7 @@ import ce from "@mui/material/styles/useTheme";
|
|
|
24
24
|
import { Icon as k } from "@mxenabled/mx-icons";
|
|
25
25
|
import { D as ze } from "../Donut-DKY8mL3P.mjs";
|
|
26
26
|
import { useTheme as Oe } from "@mui/material/styles";
|
|
27
|
-
import { f as Ve, A as V } from "../InvestmentUtil-
|
|
27
|
+
import { f as Ve, A as V } from "../InvestmentUtil-BItV7uEs.mjs";
|
|
28
28
|
import Re from "@mui/material/ListItemText";
|
|
29
29
|
import de from "@mui/material/IconButton";
|
|
30
30
|
import Pe from "@mui/material/Tooltip";
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { observer as v } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as ot } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as it } from "date-fns/endOfMonth";
|
|
6
|
+
import L from "@mui/material/Box";
|
|
7
|
+
import C from "@mui/material/Stack";
|
|
8
8
|
import N from "@mui/material/Tab";
|
|
9
|
-
import
|
|
9
|
+
import rt from "@mui/material/Tabs";
|
|
10
10
|
import yt from "@mui/material/styles/useTheme";
|
|
11
|
-
import { g as
|
|
12
|
-
import { Text as T, Icon as
|
|
11
|
+
import { g as st, a as lt, S as $, b as Y } from "../SpendingLegend-Ct-XcqUs.mjs";
|
|
12
|
+
import { Text as T, Icon as bt } from "@mxenabled/mxui";
|
|
13
13
|
import { f as R } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
|
-
import { u as I, m as
|
|
15
|
-
import { u as
|
|
16
|
-
import { L as
|
|
17
|
-
import { M as
|
|
14
|
+
import { u as I, m as A, d as ct, b as z, a as V, h as dt, g as Ct } from "../hooks-BUCn6FeJ.mjs";
|
|
15
|
+
import { u as gt } from "../useWidgetLoadTimer-BYMP5Q8g.mjs";
|
|
16
|
+
import { L as pt } from "../Loader-DUaFpDGv.mjs";
|
|
17
|
+
import { M as St } from "../MiniWidgetContainer-BHk-RlKA.mjs";
|
|
18
18
|
import { startOfToday as q } from "date-fns/startOfToday";
|
|
19
|
-
import
|
|
20
|
-
import { useTheme as
|
|
21
|
-
import { e as
|
|
22
|
-
import { T as
|
|
23
|
-
import
|
|
19
|
+
import Tt from "@mui/material/Button";
|
|
20
|
+
import { useTheme as Mt } from "@mui/material";
|
|
21
|
+
import { e as Dt } from "../exportTransactionsToCSV-DoifE4Fe.mjs";
|
|
22
|
+
import { T as xt, a as wt } from "../TransactionDetails-BEQAfeE3.mjs";
|
|
23
|
+
import Lt from "@mui/material/Collapse";
|
|
24
24
|
import F from "@mui/material/Divider";
|
|
25
25
|
import J from "@mui/material/List";
|
|
26
26
|
import Q from "@mui/material/ListItem";
|
|
27
27
|
import Z from "@mui/material/ListItemButton";
|
|
28
|
-
import { u as
|
|
28
|
+
import { u as vt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
29
29
|
import { D as tt } from "../Drawer-DV4NTsFg.mjs";
|
|
30
|
-
import { b as
|
|
31
|
-
import {
|
|
32
|
-
|
|
30
|
+
import { b as w } from "../Category-CevNQ03n.mjs";
|
|
31
|
+
import { parseISO as et } from "date-fns/parseISO";
|
|
32
|
+
import { A as nt, W as It } from "../WidgetContainer-BV3Rll6V.mjs";
|
|
33
|
+
const O = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(C, { direction: "column", children: [
|
|
33
34
|
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
|
|
34
35
|
/* @__PURE__ */ t(T, { variant: "XSmall", children: R(n, a === "mini" ? "0,0" : "0,0.00") })
|
|
35
36
|
] }), At = () => {
|
|
36
|
-
const n = yt(), { goals: d, spending: a } = I(), { categories: o, dateRangeCategoryTotals: i } =
|
|
37
|
+
const n = yt(), { goals: d, spending: a } = I(), { categories: o, dateRangeCategoryTotals: i } = A(), g = l.useMemo(
|
|
37
38
|
() => [
|
|
38
39
|
n.palette.chartMono.chartMono5,
|
|
39
40
|
n.palette.chartMono.chartMono4,
|
|
@@ -43,20 +44,20 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
43
44
|
n.palette.chartMono.chartMono6
|
|
44
45
|
],
|
|
45
46
|
[n]
|
|
46
|
-
), [e, r] = l.useState(""), [p,
|
|
47
|
-
() =>
|
|
47
|
+
), [e, r] = l.useState(""), [p, y] = l.useState(0), u = l.useMemo(
|
|
48
|
+
() => st(o, d, n, i),
|
|
48
49
|
[o, i]
|
|
49
50
|
), m = l.useMemo(
|
|
50
|
-
() =>
|
|
51
|
+
() => lt(o, i, g),
|
|
51
52
|
[o, i, g]
|
|
52
53
|
), M = (f, D) => {
|
|
53
|
-
|
|
54
|
-
},
|
|
54
|
+
y(D), r("");
|
|
55
|
+
}, b = (f) => {
|
|
55
56
|
r(e === f ? "" : f);
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */ c(
|
|
58
|
+
return /* @__PURE__ */ c(L, { width: "100%", children: [
|
|
58
59
|
/* @__PURE__ */ c(
|
|
59
|
-
|
|
60
|
+
rt,
|
|
60
61
|
{
|
|
61
62
|
"aria-label": a.mini_title,
|
|
62
63
|
onChange: M,
|
|
@@ -69,7 +70,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
69
70
|
"aria-controls": "spending-tabpanel",
|
|
70
71
|
id: "spending-tab",
|
|
71
72
|
label: /* @__PURE__ */ t(
|
|
72
|
-
|
|
73
|
+
O,
|
|
73
74
|
{
|
|
74
75
|
amount: u.totalAmount,
|
|
75
76
|
label: a.spend_tab_title,
|
|
@@ -85,7 +86,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
85
86
|
"aria-controls": "income-tabpanel",
|
|
86
87
|
id: "income-tab",
|
|
87
88
|
label: /* @__PURE__ */ t(
|
|
88
|
-
|
|
89
|
+
O,
|
|
89
90
|
{
|
|
90
91
|
amount: m.totalAmount,
|
|
91
92
|
label: a.income_tab_title,
|
|
@@ -99,52 +100,52 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
102
|
/* @__PURE__ */ t(
|
|
102
|
-
|
|
103
|
+
L,
|
|
103
104
|
{
|
|
104
105
|
"aria-labelledby": "spending-tab",
|
|
105
106
|
hidden: p !== 0,
|
|
106
107
|
id: "spending-tabpanel",
|
|
107
108
|
role: "tabpanel",
|
|
108
|
-
children: /* @__PURE__ */ c(
|
|
109
|
+
children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
109
110
|
/* @__PURE__ */ t(
|
|
110
111
|
$,
|
|
111
112
|
{
|
|
112
113
|
data: u,
|
|
113
|
-
onSelected:
|
|
114
|
+
onSelected: b,
|
|
114
115
|
selectedId: e,
|
|
115
116
|
totalLabel: a.total_spending
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
|
-
/* @__PURE__ */ t(Y, { data: u, onSelected:
|
|
119
|
+
/* @__PURE__ */ t(Y, { data: u, onSelected: b, selectedId: e })
|
|
119
120
|
] })
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
123
|
/* @__PURE__ */ t(
|
|
123
|
-
|
|
124
|
+
L,
|
|
124
125
|
{
|
|
125
126
|
"aria-labelledby": "income-tab",
|
|
126
127
|
hidden: p !== 1,
|
|
127
128
|
id: "income-tabpanel",
|
|
128
129
|
role: "tabpanel",
|
|
129
|
-
children: /* @__PURE__ */ c(
|
|
130
|
+
children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
130
131
|
/* @__PURE__ */ t(
|
|
131
132
|
$,
|
|
132
133
|
{
|
|
133
134
|
data: m,
|
|
134
135
|
isIncome: !0,
|
|
135
|
-
onSelected:
|
|
136
|
+
onSelected: b,
|
|
136
137
|
selectedId: e,
|
|
137
138
|
totalLabel: a.total_income
|
|
138
139
|
}
|
|
139
140
|
),
|
|
140
|
-
/* @__PURE__ */ t(Y, { data: m, onSelected:
|
|
141
|
+
/* @__PURE__ */ t(Y, { data: m, onSelected: b, selectedId: e })
|
|
141
142
|
] })
|
|
142
143
|
}
|
|
143
144
|
)
|
|
144
145
|
] });
|
|
145
|
-
},
|
|
146
|
-
const { isAccountDataLoaded: a, loadAccountData: o } =
|
|
147
|
-
return
|
|
146
|
+
}, Et = v(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
147
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = ct(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = A(), { spending: p } = I(), { isInitialized: y, selectedAccounts: u } = z();
|
|
148
|
+
return gt({
|
|
148
149
|
widgetName: "SpendingMiniWidget",
|
|
149
150
|
isLoaded: i
|
|
150
151
|
}), l.useEffect(() => {
|
|
@@ -152,28 +153,28 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
152
153
|
}, []), l.useEffect(() => {
|
|
153
154
|
r(
|
|
154
155
|
u,
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
ot(/* @__PURE__ */ new Date()),
|
|
157
|
+
it(/* @__PURE__ */ new Date())
|
|
157
158
|
).finally();
|
|
158
|
-
}, [u]),
|
|
159
|
-
|
|
159
|
+
}, [u]), y ? /* @__PURE__ */ t(
|
|
160
|
+
St,
|
|
160
161
|
{
|
|
161
162
|
className: "mx-exp-spending-miniwidget",
|
|
162
163
|
onPrimaryCtaClick: n,
|
|
163
164
|
primaryCtaLabel: p.primary_cta,
|
|
164
165
|
sx: { height: "100%", ...d },
|
|
165
166
|
title: p.mini_title,
|
|
166
|
-
children: /* @__PURE__ */ t(
|
|
167
|
+
children: /* @__PURE__ */ t(Et, {})
|
|
167
168
|
}
|
|
168
|
-
) : /* @__PURE__ */ t(
|
|
169
|
-
},
|
|
169
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
170
|
+
}, ye = v(Wt), Rt = ({
|
|
170
171
|
data: n,
|
|
171
172
|
onSelected: d,
|
|
172
173
|
selectedId: a = "",
|
|
173
174
|
title: o
|
|
174
175
|
}) => {
|
|
175
176
|
const { spending: i } = I(), g = n.categoryData.find((e) => e.guid === a);
|
|
176
|
-
return /* @__PURE__ */ c(
|
|
177
|
+
return /* @__PURE__ */ c(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
177
178
|
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${o} ${i.by_category}` }),
|
|
178
179
|
/* @__PURE__ */ t(F, { "aria-hidden": "true" }),
|
|
179
180
|
/* @__PURE__ */ t(J, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
@@ -194,7 +195,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
194
195
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
195
196
|
children: [
|
|
196
197
|
/* @__PURE__ */ t(
|
|
197
|
-
|
|
198
|
+
L,
|
|
198
199
|
{
|
|
199
200
|
borderRadius: 4,
|
|
200
201
|
flexShrink: 0,
|
|
@@ -204,7 +205,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
204
205
|
}
|
|
205
206
|
),
|
|
206
207
|
/* @__PURE__ */ c(
|
|
207
|
-
|
|
208
|
+
C,
|
|
208
209
|
{
|
|
209
210
|
alignItems: "center",
|
|
210
211
|
direction: "row",
|
|
@@ -222,7 +223,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
222
223
|
}
|
|
223
224
|
),
|
|
224
225
|
/* @__PURE__ */ t(F, {}),
|
|
225
|
-
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(
|
|
226
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(Lt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ c(J, { children: [
|
|
226
227
|
g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
|
|
227
228
|
Q,
|
|
228
229
|
{
|
|
@@ -236,7 +237,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
236
237
|
id: `spending-list-subcategory-${r.guid}`,
|
|
237
238
|
onClick: () => d(r.guid, !0),
|
|
238
239
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
239
|
-
children: /* @__PURE__ */ c(
|
|
240
|
+
children: /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
240
241
|
/* @__PURE__ */ c(T, { children: [
|
|
241
242
|
r.name,
|
|
242
243
|
" "
|
|
@@ -253,16 +254,16 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
253
254
|
] }, e.guid)) }),
|
|
254
255
|
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${R(n.totalAmount, "0,0.00")}` })
|
|
255
256
|
] });
|
|
256
|
-
},
|
|
257
|
+
}, Nt = v(Rt), $t = ({
|
|
257
258
|
data: n,
|
|
258
259
|
onSelected: d,
|
|
259
260
|
onViewTransactions: a,
|
|
260
261
|
selectedId: o,
|
|
261
262
|
title: i
|
|
262
263
|
}) => {
|
|
263
|
-
const { isDesktop: g, isMobile: e } =
|
|
264
|
+
const { isDesktop: g, isMobile: e } = vt(), { dateRangeTotalsLoading: r } = A(), { spending: p } = I();
|
|
264
265
|
return /* @__PURE__ */ c(
|
|
265
|
-
|
|
266
|
+
C,
|
|
266
267
|
{
|
|
267
268
|
alignItems: e ? "center" : "flex-start",
|
|
268
269
|
direction: e ? "column" : "row",
|
|
@@ -301,11 +302,11 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
301
302
|
variant: "full"
|
|
302
303
|
}
|
|
303
304
|
),
|
|
304
|
-
/* @__PURE__ */ t(
|
|
305
|
+
/* @__PURE__ */ t(Nt, { data: n, onSelected: d, selectedId: o, title: i })
|
|
305
306
|
]
|
|
306
307
|
}
|
|
307
308
|
);
|
|
308
|
-
},
|
|
309
|
+
}, at = v($t), Ot = (n) => [
|
|
309
310
|
n.palette.chartMono.chartMono5,
|
|
310
311
|
n.palette.chartMono.chartMono4,
|
|
311
312
|
n.palette.chartMono.chartMono3,
|
|
@@ -313,71 +314,71 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
313
314
|
n.palette.chartMono.chartMono1,
|
|
314
315
|
n.palette.chartMono.chartMono6
|
|
315
316
|
], kt = () => {
|
|
316
|
-
const n =
|
|
317
|
+
const n = Mt(), { is_mobile_webview: d } = V(), { clientConfig: a } = V(), { categories: o, dateRangeCategoryTotals: i } = A(), {
|
|
317
318
|
goals: g,
|
|
318
319
|
spending: e,
|
|
319
320
|
transactions: r
|
|
320
|
-
} = I(), { displayedDateRange: p, selectedAccountGuids:
|
|
321
|
+
} = I(), { displayedDateRange: p, selectedAccountGuids: y } = z(), {
|
|
321
322
|
setFilter: u,
|
|
322
323
|
sortedTransactions: m,
|
|
323
324
|
sortedTransactionsWithSplits: M,
|
|
324
|
-
tags:
|
|
325
|
-
} =
|
|
326
|
-
() =>
|
|
325
|
+
tags: b
|
|
326
|
+
} = dt(), f = a?.master?.deep_link_params?.account_guids, D = a?.master?.deep_link_params?.view, [x, E] = l.useState(""), [_, W] = l.useState(D === "income" ? 1 : 0), [H, P] = l.useState(""), [ut, k] = l.useState(!1), B = l.useMemo(
|
|
327
|
+
() => st(o, g, n, i),
|
|
327
328
|
[o, i]
|
|
328
329
|
), K = l.useMemo(
|
|
329
|
-
() =>
|
|
330
|
+
() => lt(o, i, Ot(n)),
|
|
330
331
|
[o, i]
|
|
331
332
|
), G = l.useMemo(
|
|
332
333
|
() => m.find((s) => s.guid === H),
|
|
333
334
|
[H, m]
|
|
334
|
-
),
|
|
335
|
-
W(S),
|
|
335
|
+
), mt = (s, S) => {
|
|
336
|
+
W(S), E("");
|
|
336
337
|
}, U = (s, S = !1) => {
|
|
337
|
-
S ?
|
|
338
|
-
},
|
|
338
|
+
S ? ht(s) : E(x === s || s === "0" ? "" : s);
|
|
339
|
+
}, ht = (s) => {
|
|
339
340
|
u({
|
|
340
341
|
...{
|
|
341
|
-
accounts: f ||
|
|
342
|
+
accounts: f || y,
|
|
342
343
|
dateRange: p
|
|
343
344
|
},
|
|
344
345
|
custom: (h) => x === "other" ? h.top_level_category_guid === s : h.category_guid === s,
|
|
345
346
|
showSplits: !0
|
|
346
|
-
}),
|
|
347
|
+
}), k(!0);
|
|
347
348
|
}, X = (s) => {
|
|
348
349
|
const S = {
|
|
349
|
-
accounts: f ||
|
|
350
|
+
accounts: f || y,
|
|
350
351
|
dateRange: p
|
|
351
352
|
};
|
|
352
|
-
if (
|
|
353
|
+
if (_ === 0)
|
|
353
354
|
if (s === "other") {
|
|
354
355
|
const h = B.categoryData.find((j) => j.guid === "other");
|
|
355
356
|
u({
|
|
356
357
|
...S,
|
|
357
|
-
custom: (j) => !!h?.categoryTotals?.find((
|
|
358
|
+
custom: (j) => !!h?.categoryTotals?.find((_t) => _t.guid === j.top_level_category_guid)
|
|
358
359
|
});
|
|
359
360
|
} else
|
|
360
361
|
u({
|
|
361
362
|
...S,
|
|
362
|
-
custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !==
|
|
363
|
+
custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== w.INCOME && h.category_guid !== w.INCOME && h.top_level_category_guid !== w.INVESTMENTS && h.top_level_category_guid !== w.TRANSFER,
|
|
363
364
|
showSplits: !!s
|
|
364
365
|
});
|
|
365
366
|
else
|
|
366
367
|
u({
|
|
367
368
|
...S,
|
|
368
|
-
custom: (h) => s ? h.category_guid === s : h.category_guid ===
|
|
369
|
+
custom: (h) => s ? h.category_guid === s : h.category_guid === w.INCOME || h.top_level_category_guid === w.INCOME
|
|
369
370
|
});
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
|
|
371
|
+
k(!0);
|
|
372
|
+
}, ft = () => {
|
|
373
|
+
Dt(M, b);
|
|
373
374
|
};
|
|
374
|
-
return /* @__PURE__ */ c(
|
|
375
|
-
/* @__PURE__ */ c(
|
|
375
|
+
return /* @__PURE__ */ c(L, { children: [
|
|
376
|
+
/* @__PURE__ */ c(rt, { onChange: mt, value: _, variant: "fullWidth", children: [
|
|
376
377
|
/* @__PURE__ */ t(
|
|
377
378
|
N,
|
|
378
379
|
{
|
|
379
380
|
label: /* @__PURE__ */ t(
|
|
380
|
-
|
|
381
|
+
O,
|
|
381
382
|
{
|
|
382
383
|
amount: B.totalAmount,
|
|
383
384
|
label: e.spend_tab_title
|
|
@@ -389,7 +390,7 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
389
390
|
N,
|
|
390
391
|
{
|
|
391
392
|
label: /* @__PURE__ */ t(
|
|
392
|
-
|
|
393
|
+
O,
|
|
393
394
|
{
|
|
394
395
|
amount: K.totalAmount,
|
|
395
396
|
label: e.income_tab_title
|
|
@@ -398,8 +399,8 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
398
399
|
}
|
|
399
400
|
)
|
|
400
401
|
] }),
|
|
401
|
-
|
|
402
|
-
|
|
402
|
+
_ === 0 && /* @__PURE__ */ t(
|
|
403
|
+
at,
|
|
403
404
|
{
|
|
404
405
|
data: B,
|
|
405
406
|
onSelected: U,
|
|
@@ -408,8 +409,8 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
408
409
|
title: e.spend_tab_title
|
|
409
410
|
}
|
|
410
411
|
),
|
|
411
|
-
|
|
412
|
-
|
|
412
|
+
_ === 1 && /* @__PURE__ */ t(
|
|
413
|
+
at,
|
|
413
414
|
{
|
|
414
415
|
data: K,
|
|
415
416
|
onSelected: U,
|
|
@@ -422,20 +423,20 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
422
423
|
tt,
|
|
423
424
|
{
|
|
424
425
|
ariaLabelClose: e.close_drawer_aria,
|
|
425
|
-
isOpen:
|
|
426
|
-
onClose: () =>
|
|
426
|
+
isOpen: ut,
|
|
427
|
+
onClose: () => k(!1),
|
|
427
428
|
title: e.transactions_drawer_title,
|
|
428
|
-
children: /* @__PURE__ */ c(
|
|
429
|
-
!d && m.length > 0 && /* @__PURE__ */ t(
|
|
430
|
-
|
|
429
|
+
children: /* @__PURE__ */ c(C, { children: [
|
|
430
|
+
!d && m.length > 0 && /* @__PURE__ */ t(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
431
|
+
Tt,
|
|
431
432
|
{
|
|
432
|
-
onClick:
|
|
433
|
-
startIcon: /* @__PURE__ */ t(
|
|
433
|
+
onClick: ft,
|
|
434
|
+
startIcon: /* @__PURE__ */ t(bt, { name: "ios_share" }),
|
|
434
435
|
variant: "text",
|
|
435
436
|
children: r.export_csv_btn
|
|
436
437
|
}
|
|
437
438
|
) }),
|
|
438
|
-
/* @__PURE__ */ t(
|
|
439
|
+
/* @__PURE__ */ t(xt, { onClick: P })
|
|
439
440
|
] })
|
|
440
441
|
}
|
|
441
442
|
),
|
|
@@ -446,17 +447,18 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
446
447
|
isOpen: !!G,
|
|
447
448
|
onClose: () => P(""),
|
|
448
449
|
title: e.transaction_details_drawer_title,
|
|
449
|
-
children: G && /* @__PURE__ */ t(
|
|
450
|
+
children: G && /* @__PURE__ */ t(wt, { transaction: G })
|
|
450
451
|
}
|
|
451
452
|
)
|
|
452
453
|
] });
|
|
453
|
-
},
|
|
454
|
-
const { isAccountDataLoaded: a, loadAccountData: o } =
|
|
455
|
-
|
|
454
|
+
}, Bt = v(kt), Gt = ({ onBackClick: n, sx: d = {} }) => {
|
|
455
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = ct(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = A(), { isTransactionDataLoaded: p, loadTransactionData: y } = dt(), { spending: u } = I(), { displayedDateRange: m, isInitialized: M, setDisplayedDate: b, selectedAccounts: f } = z(), { onEvent: D } = Ct(), { clientConfig: x } = V();
|
|
456
|
+
gt({
|
|
456
457
|
widgetName: "SpendingWidget",
|
|
457
458
|
isLoaded: g
|
|
458
459
|
}), l.useEffect(() => {
|
|
459
|
-
|
|
460
|
+
const _ = x?.master?.deep_link_params, W = _?.date_range ? [et(_.date_range.from), et(_.date_range.to)] : [ot(q()), it(q())];
|
|
461
|
+
b(W[0], W[1]), a || o().finally(), i || e().finally(), p || y().finally(), D(nt.SPENDING_VIEW);
|
|
460
462
|
}, []), l.useEffect(() => {
|
|
461
463
|
M && r(
|
|
462
464
|
f,
|
|
@@ -464,22 +466,22 @@ const k = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b,
|
|
|
464
466
|
m.end
|
|
465
467
|
).finally();
|
|
466
468
|
}, [m, M, f]);
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
+
const E = (_) => {
|
|
470
|
+
b(_[0], _[1]);
|
|
469
471
|
};
|
|
470
472
|
return M ? /* @__PURE__ */ t(
|
|
471
|
-
|
|
473
|
+
It,
|
|
472
474
|
{
|
|
473
|
-
calendarActions: { onRangeChanged:
|
|
474
|
-
onAccountsFilterClick: () => D(
|
|
475
|
+
calendarActions: { onRangeChanged: E },
|
|
476
|
+
onAccountsFilterClick: () => D(nt.SPENDING_CLICK_FILTER),
|
|
475
477
|
onBackClick: n,
|
|
476
478
|
sx: d,
|
|
477
479
|
title: u.title,
|
|
478
|
-
children: /* @__PURE__ */ t(
|
|
480
|
+
children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
479
481
|
}
|
|
480
|
-
) : /* @__PURE__ */ t(
|
|
481
|
-
},
|
|
482
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
483
|
+
}, be = v(Gt);
|
|
482
484
|
export {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
+
ye as SpendingMiniWidget,
|
|
486
|
+
be as SpendingWidget
|
|
485
487
|
};
|