@mx-cartographer/experiences 7.2.16-alpha.mm0 → 7.3.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-vp_TAbGt.mjs → Account-Bxw0_4FU.mjs} +1 -1
- package/dist/{AccountDetailsContent-CsH1w_GZ.mjs → AccountDetailsContent-CAM9y39M.mjs} +6 -6
- package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-JtSX6Uf9.mjs} +4 -4
- package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-C9FlatNb.mjs} +2 -2
- package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-JFMZROh7.mjs} +7 -7
- package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-BgNOyMdp.mjs} +74 -100
- package/dist/Accounts-BRf_YeTf.mjs +27 -0
- package/dist/CategoryStore-yHI0hWmK.mjs +174 -0
- package/dist/CategoryUtil-pZRIYOgN.mjs +80 -0
- package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-BQNs-hjk.mjs} +9 -9
- package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-ByGQE7D5.mjs} +3 -3
- package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-C9bblOgW.mjs} +1 -1
- package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-D-aB35SY.mjs} +151 -111
- package/dist/{ManageIncome-CV-bGuR-.mjs → ManageIncome-1s_q5W4X.mjs} +3 -3
- package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-DCsTZpuS.mjs} +2 -2
- package/dist/{NotificationSettings-5i3IywCi.mjs → NotificationSettings-DqrkNMod.mjs} +236 -238
- package/dist/{NotificationStore-C6PH6MKm.mjs → NotificationStore-BxP_P2dA.mjs} +23 -15
- package/dist/{RecurringSettings-G6_BbsIF.mjs → RecurringSettings-A_rAGCTP.mjs} +3 -3
- package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-DK8dWldr.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4YOD7_D.mjs} +29 -26
- package/dist/{TransactionDetails-CDtya0KS.mjs → TransactionDetails-oP1eSuiS.mjs} +1 -1
- package/dist/TransactionStore-ai3uII_r.mjs +690 -0
- package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-BHWANqT4.mjs} +1 -1
- package/dist/accounts/index.es.js +125 -127
- package/dist/accounts/stores/AccountStore.d.ts +25 -22
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +499 -501
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +382 -384
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +5 -1
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/index.es.js +206 -214
- 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/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +1 -1
- package/dist/debts/index.es.js +375 -377
- package/dist/finstrong/index.es.js +415 -417
- package/dist/goals/index.es.js +557 -559
- package/dist/goals/stores/GoalStore.d.ts +17 -4
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +435 -437
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/index.es.js +172 -174
- package/dist/notifications/index.es.js +3 -3
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/index.es.js +173 -175
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +3 -2
- package/dist/settings/index.es.js +279 -285
- package/dist/spending/index.es.js +281 -283
- package/dist/transactions/index.es.js +6 -6
- package/dist/transactions/stores/TransactionStore.d.ts +21 -77
- package/dist/trends/index.es.js +4 -4
- package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-BUAApBIb.mjs} +1 -1
- package/package.json +4 -4
- package/dist/Accounts-C1QxUB-e.mjs +0 -9
- package/dist/CategoryStore-BCcpI3oJ.mjs +0 -183
- package/dist/CategoryUtil-BR3H5i6n.mjs +0 -78
- package/dist/TransactionStore-DxPLdF3B.mjs +0 -677
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { jsxs as h, jsx as t, Fragment as
|
|
1
|
+
import { jsxs as h, jsx as t, Fragment as mt } from "react/jsx-runtime";
|
|
2
2
|
import p from "react";
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
6
|
-
import
|
|
3
|
+
import { observer as v } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as nt } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
6
|
+
import x from "@mui/material/Box";
|
|
7
7
|
import C from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { b as V } from "../CategoryUtil-
|
|
12
|
-
import { b as
|
|
13
|
-
import { Text as y, CategoryIcon as
|
|
14
|
-
import { f as
|
|
15
|
-
import { u as
|
|
16
|
-
import
|
|
17
|
-
import { useTheme as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import { D as
|
|
8
|
+
import N from "@mui/material/Tab";
|
|
9
|
+
import at from "@mui/material/Tabs";
|
|
10
|
+
import ht from "@mui/material/styles/useTheme";
|
|
11
|
+
import { b as V } from "../CategoryUtil-pZRIYOgN.mjs";
|
|
12
|
+
import { b as S } from "../Category-CevNQ03n.mjs";
|
|
13
|
+
import { Text as y, CategoryIcon as ft, CategoryIconVariants as yt } from "@mxenabled/mxui";
|
|
14
|
+
import { f as w } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
15
|
+
import { u as bt } from "../useAriaLive-B3_pRUio.mjs";
|
|
16
|
+
import Ct from "@mui/material/Button";
|
|
17
|
+
import { useTheme as it } from "@mui/material";
|
|
18
|
+
import { u as I, b as R, m as z, d as rt, a as st, h as _t, g as St } from "../hooks-D6XlXHf4.mjs";
|
|
19
|
+
import { u as lt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
20
|
+
import { D as Tt } from "../Donut-oaQFlbit.mjs";
|
|
21
21
|
import { L as F } from "../Loader-DUaFpDGv.mjs";
|
|
22
|
-
import { M as
|
|
23
|
-
import { startOfToday as
|
|
24
|
-
import { T as
|
|
25
|
-
import
|
|
22
|
+
import { M as Mt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
|
|
23
|
+
import { startOfToday as U } from "date-fns/startOfToday";
|
|
24
|
+
import { T as Dt, a as xt } from "../TransactionDetails-oP1eSuiS.mjs";
|
|
25
|
+
import wt from "@mui/material/Collapse";
|
|
26
26
|
import B from "@mui/material/Divider";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { D as
|
|
31
|
-
import { A as
|
|
32
|
-
const j = 5,
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
const
|
|
27
|
+
import q from "@mui/material/List";
|
|
28
|
+
import J from "@mui/material/ListItem";
|
|
29
|
+
import vt from "@mui/material/ListItemButton";
|
|
30
|
+
import { D as Q } from "../Drawer-kEE73B87.mjs";
|
|
31
|
+
import { A as Z, W as It } from "../WidgetContainer-BHWANqT4.mjs";
|
|
32
|
+
const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
33
|
+
if (a.total > 0) {
|
|
34
|
+
const i = n.find((s) => s.guid === a.category_guid);
|
|
35
|
+
if (!i) return l;
|
|
36
|
+
const o = i.parent_guid ?? i.guid, e = n.find((s) => s.guid === o);
|
|
37
37
|
if (!e) return l;
|
|
38
|
-
const
|
|
39
|
-
guid:
|
|
40
|
-
name:
|
|
41
|
-
color: V(e.guid,
|
|
42
|
-
amount:
|
|
43
|
-
}, u = l.find((s) => s.guid ===
|
|
44
|
-
u ? (u.amount +=
|
|
45
|
-
guid:
|
|
38
|
+
const d = {
|
|
39
|
+
guid: i.guid,
|
|
40
|
+
name: i.guid === o ? `General ${i.name}` : i.name,
|
|
41
|
+
color: V(e.guid, c),
|
|
42
|
+
amount: a.total
|
|
43
|
+
}, u = l.find((s) => s.guid === o);
|
|
44
|
+
u ? (u.amount += a.total, u.categoryTotals?.push(d)) : l.push({
|
|
45
|
+
guid: o,
|
|
46
46
|
name: e.name,
|
|
47
|
-
color: V(e.guid,
|
|
48
|
-
categoryTotals: [
|
|
49
|
-
amount:
|
|
47
|
+
color: V(e.guid, c),
|
|
48
|
+
categoryTotals: [d],
|
|
49
|
+
amount: a.total
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
return l;
|
|
53
|
-
}, []),
|
|
54
|
-
const
|
|
55
|
-
(s) => s.guid !==
|
|
56
|
-
).sort((s, m) => m.amount - s.amount),
|
|
53
|
+
}, []), ct = (n, c, r, l) => {
|
|
54
|
+
const a = Et(n, r, l), i = a.filter(
|
|
55
|
+
(s) => s.guid !== S.INCOME && s.guid !== S.INVESTMENTS && s.guid !== S.TRANSFER
|
|
56
|
+
).sort((s, m) => m.amount - s.amount), o = i.reduce(
|
|
57
57
|
(s, m) => s + m.amount,
|
|
58
58
|
0
|
|
59
|
-
), e =
|
|
59
|
+
), e = i.length > j ? j : i.length, d = i.slice(0, e), u = d.map((s) => ({
|
|
60
60
|
id: s.guid,
|
|
61
61
|
color: V(s.guid, r),
|
|
62
62
|
label: s.name,
|
|
63
|
-
value: s.amount /
|
|
63
|
+
value: s.amount / o * 100
|
|
64
64
|
}));
|
|
65
|
-
if (
|
|
66
|
-
const s =
|
|
67
|
-
(
|
|
65
|
+
if (i.length > 5) {
|
|
66
|
+
const s = i.slice(j, a.length), m = s.reduce(
|
|
67
|
+
(T, g) => T + g.amount,
|
|
68
68
|
0
|
|
69
69
|
);
|
|
70
|
-
|
|
70
|
+
d.push({
|
|
71
71
|
guid: "other",
|
|
72
72
|
color: r.palette.categories.others || "",
|
|
73
|
-
name:
|
|
73
|
+
name: c.saving_goal_other,
|
|
74
74
|
categoryTotals: s,
|
|
75
75
|
amount: m
|
|
76
76
|
}), u.push({
|
|
77
77
|
id: "other",
|
|
78
78
|
color: r.palette.categories.others || "",
|
|
79
|
-
label:
|
|
80
|
-
value: m /
|
|
79
|
+
label: c.saving_goal_other,
|
|
80
|
+
value: m / o * 100
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
return {
|
|
84
|
-
categoryData:
|
|
84
|
+
categoryData: d,
|
|
85
85
|
donutData: u,
|
|
86
|
-
totalAmount:
|
|
86
|
+
totalAmount: o
|
|
87
87
|
};
|
|
88
|
-
},
|
|
89
|
-
const l =
|
|
90
|
-
(e) => e.guid ===
|
|
91
|
-
),
|
|
88
|
+
}, dt = (n, c, r) => {
|
|
89
|
+
const l = n.filter(
|
|
90
|
+
(e) => e.guid === S.INCOME || e.parent_guid === S.INCOME
|
|
91
|
+
), a = c.filter((e) => l.some((d) => d.guid === e.category_guid)).sort((e, d) => e.total - d.total).map((e, d) => ({
|
|
92
92
|
guid: e.category_guid,
|
|
93
|
-
name:
|
|
94
|
-
color: r[
|
|
93
|
+
name: n.find((u) => u.guid === e.category_guid)?.name,
|
|
94
|
+
color: r[d],
|
|
95
95
|
categoryTotals: [],
|
|
96
96
|
amount: Math.abs(e.total)
|
|
97
|
-
})),
|
|
98
|
-
(e,
|
|
97
|
+
})), i = a.reduce(
|
|
98
|
+
(e, d) => e + d.amount,
|
|
99
99
|
0
|
|
100
|
-
),
|
|
100
|
+
), o = a.map((e) => ({
|
|
101
101
|
id: e.guid,
|
|
102
102
|
color: e.color,
|
|
103
103
|
label: e.name,
|
|
104
|
-
value: e.amount /
|
|
104
|
+
value: e.amount / i * 100
|
|
105
105
|
}));
|
|
106
106
|
return {
|
|
107
|
-
categoryData:
|
|
108
|
-
donutData:
|
|
109
|
-
totalAmount:
|
|
107
|
+
categoryData: a,
|
|
108
|
+
donutData: o,
|
|
109
|
+
totalAmount: i
|
|
110
110
|
};
|
|
111
|
-
},
|
|
112
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children:
|
|
113
|
-
/* @__PURE__ */ t(y, { variant: "XSmall", children:
|
|
114
|
-
] }),
|
|
115
|
-
data:
|
|
116
|
-
isIncome:
|
|
111
|
+
}, W = ({ amount: n, label: c }) => /* @__PURE__ */ h(C, { direction: "column", children: [
|
|
112
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: c }),
|
|
113
|
+
/* @__PURE__ */ t(y, { variant: "XSmall", children: w(n, "0,0") })
|
|
114
|
+
] }), At = ({
|
|
115
|
+
data: n,
|
|
116
|
+
isIncome: c = !1,
|
|
117
117
|
onSelected: r,
|
|
118
118
|
onViewTransactions: l,
|
|
119
|
-
selectedId:
|
|
120
|
-
size:
|
|
121
|
-
totalLabel:
|
|
119
|
+
selectedId: a,
|
|
120
|
+
size: i = 150,
|
|
121
|
+
totalLabel: o,
|
|
122
122
|
variant: e = "mini"
|
|
123
123
|
}) => {
|
|
124
|
-
const { spending:
|
|
125
|
-
() =>
|
|
126
|
-
[
|
|
124
|
+
const { spending: d } = I(), u = it(), { isTablet: s } = lt(), { announce: m, ariaLive: T } = bt(), g = p.useMemo(
|
|
125
|
+
() => a ? n.categoryData.find((D) => D.guid === a) : void 0,
|
|
126
|
+
[a]
|
|
127
127
|
);
|
|
128
128
|
p.useEffect(() => {
|
|
129
129
|
if (g) {
|
|
130
|
-
const
|
|
131
|
-
m(`${g.name}: ${
|
|
130
|
+
const D = w(g.amount, "0,0");
|
|
131
|
+
m(`${g.name}: ${D}`);
|
|
132
132
|
}
|
|
133
133
|
}, [g, m]);
|
|
134
|
-
const
|
|
135
|
-
l?.(
|
|
136
|
-
},
|
|
137
|
-
return /* @__PURE__ */ h(
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */ t(
|
|
134
|
+
const b = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), E = () => {
|
|
135
|
+
l?.(a);
|
|
136
|
+
}, _ = s ? 32 : 48;
|
|
137
|
+
return /* @__PURE__ */ h(mt, { children: [
|
|
138
|
+
T,
|
|
139
|
+
/* @__PURE__ */ t(Tt, { data: b, onClick: r, selectedId: a, size: i, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(C, { alignItems: "center", justifyContent: "center", minHeight: i, minWidth: i, children: [
|
|
140
140
|
g && /* @__PURE__ */ h(
|
|
141
141
|
C,
|
|
142
142
|
{
|
|
@@ -147,11 +147,11 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
147
147
|
sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
148
148
|
children: [
|
|
149
149
|
/* @__PURE__ */ t(
|
|
150
|
-
|
|
150
|
+
ft,
|
|
151
151
|
{
|
|
152
|
-
categoryGuid:
|
|
153
|
-
size: e === "mini" ? 24 :
|
|
154
|
-
variant:
|
|
152
|
+
categoryGuid: c ? S.INCOME : g.guid,
|
|
153
|
+
size: e === "mini" ? 24 : _,
|
|
154
|
+
variant: yt.Transparent
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
/* @__PURE__ */ t(
|
|
@@ -160,103 +160,103 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
160
160
|
color: "secondary",
|
|
161
161
|
noWrap: !0,
|
|
162
162
|
variant: e === "mini" ? "Tiny" : "Body",
|
|
163
|
-
children: g ? g.name :
|
|
163
|
+
children: g ? g.name : o
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
|
-
!g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children:
|
|
170
|
-
/* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ?
|
|
171
|
-
!g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children:
|
|
169
|
+
!g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: o }),
|
|
170
|
+
/* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ? w(g.amount, "0,0") : w(n.totalAmount, "0,0") }),
|
|
171
|
+
!g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children: o }),
|
|
172
172
|
e === "full" && /* @__PURE__ */ t(
|
|
173
|
-
|
|
173
|
+
Ct,
|
|
174
174
|
{
|
|
175
175
|
"aria-label": `View ${g?.name || ""} Transactions`,
|
|
176
|
-
disabled:
|
|
177
|
-
onClick:
|
|
176
|
+
disabled: n.categoryData.length === 0,
|
|
177
|
+
onClick: E,
|
|
178
178
|
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
179
179
|
variant: "text",
|
|
180
|
-
children:
|
|
180
|
+
children: d.view_transactions
|
|
181
181
|
}
|
|
182
182
|
)
|
|
183
183
|
] }) }) })
|
|
184
184
|
] });
|
|
185
|
-
},
|
|
186
|
-
const l = (
|
|
187
|
-
(
|
|
185
|
+
}, O = v(At), tt = ({ data: n, onSelected: c, selectedId: r }) => {
|
|
186
|
+
const l = (a, i) => {
|
|
187
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), c(i));
|
|
188
188
|
};
|
|
189
|
-
return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children:
|
|
189
|
+
return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((a) => /* @__PURE__ */ h(
|
|
190
190
|
C,
|
|
191
191
|
{
|
|
192
192
|
alignItems: "center",
|
|
193
|
-
"aria-label":
|
|
194
|
-
"aria-pressed":
|
|
193
|
+
"aria-label": a.name,
|
|
194
|
+
"aria-pressed": a.guid === r,
|
|
195
195
|
direction: "row",
|
|
196
196
|
gap: 8,
|
|
197
|
-
onClick: () =>
|
|
198
|
-
onKeyDown: (
|
|
197
|
+
onClick: () => c(a.guid),
|
|
198
|
+
onKeyDown: (i) => l(i, a.guid),
|
|
199
199
|
role: "button",
|
|
200
200
|
sx: { cursor: "pointer" },
|
|
201
201
|
tabIndex: 0,
|
|
202
202
|
children: [
|
|
203
|
-
/* @__PURE__ */ t(
|
|
204
|
-
/* @__PURE__ */ t(y, { bold:
|
|
203
|
+
/* @__PURE__ */ t(x, { borderRadius: 4, height: 8, sx: { backgroundColor: a.color }, width: 8 }),
|
|
204
|
+
/* @__PURE__ */ t(y, { bold: a.guid === r, variant: "XSmall", children: a.name })
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
|
-
|
|
207
|
+
a.guid
|
|
208
208
|
)) });
|
|
209
|
-
},
|
|
210
|
-
const
|
|
211
|
-
categories:
|
|
212
|
-
dateRangeCategoryTotals:
|
|
213
|
-
dataRangeTotalsLoaded:
|
|
209
|
+
}, Lt = () => {
|
|
210
|
+
const n = ht(), { goals: c, spending: r } = I(), { selectedAccounts: l } = R(), {
|
|
211
|
+
categories: a,
|
|
212
|
+
dateRangeCategoryTotals: i,
|
|
213
|
+
dataRangeTotalsLoaded: o,
|
|
214
214
|
loadDateRangeCategoryTotals: e
|
|
215
|
-
} = z(),
|
|
215
|
+
} = z(), d = p.useMemo(
|
|
216
216
|
() => [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
217
|
+
n.palette.chartMono.chartMono5,
|
|
218
|
+
n.palette.chartMono.chartMono4,
|
|
219
|
+
n.palette.chartMono.chartMono3,
|
|
220
|
+
n.palette.chartMono.chartMono2,
|
|
221
|
+
n.palette.chartMono.chartMono1,
|
|
222
|
+
n.palette.chartMono.chartMono6
|
|
223
223
|
],
|
|
224
|
-
[
|
|
224
|
+
[n]
|
|
225
225
|
);
|
|
226
226
|
p.useEffect(() => {
|
|
227
227
|
e(
|
|
228
228
|
l,
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
nt(/* @__PURE__ */ new Date()),
|
|
230
|
+
ot(/* @__PURE__ */ new Date())
|
|
231
231
|
).finally();
|
|
232
232
|
}, [l]);
|
|
233
|
-
const [u, s] = p.useState(""), [m,
|
|
234
|
-
() =>
|
|
235
|
-
[
|
|
236
|
-
),
|
|
237
|
-
() =>
|
|
238
|
-
[
|
|
239
|
-
),
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
s(u ===
|
|
233
|
+
const [u, s] = p.useState(""), [m, T] = p.useState(0), g = p.useMemo(
|
|
234
|
+
() => ct(a, c, n, i),
|
|
235
|
+
[a, i]
|
|
236
|
+
), b = p.useMemo(
|
|
237
|
+
() => dt(a, i, d),
|
|
238
|
+
[a, i, d]
|
|
239
|
+
), E = (D, L) => {
|
|
240
|
+
T(L), s("");
|
|
241
|
+
}, _ = (D) => {
|
|
242
|
+
s(u === D ? "" : D);
|
|
243
243
|
};
|
|
244
|
-
return
|
|
244
|
+
return o ? /* @__PURE__ */ h(x, { width: "100%", children: [
|
|
245
245
|
/* @__PURE__ */ h(
|
|
246
|
-
|
|
246
|
+
at,
|
|
247
247
|
{
|
|
248
248
|
"aria-label": r.mini_title,
|
|
249
|
-
onChange:
|
|
249
|
+
onChange: E,
|
|
250
250
|
value: m,
|
|
251
251
|
variant: "fullWidth",
|
|
252
252
|
children: [
|
|
253
253
|
/* @__PURE__ */ t(
|
|
254
|
-
|
|
254
|
+
N,
|
|
255
255
|
{
|
|
256
256
|
"aria-controls": "spending-tabpanel",
|
|
257
257
|
id: "spending-tab",
|
|
258
258
|
label: /* @__PURE__ */ t(
|
|
259
|
-
|
|
259
|
+
W,
|
|
260
260
|
{
|
|
261
261
|
amount: g.totalAmount,
|
|
262
262
|
label: r.spend_tab_title
|
|
@@ -266,14 +266,14 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
268
|
/* @__PURE__ */ t(
|
|
269
|
-
|
|
269
|
+
N,
|
|
270
270
|
{
|
|
271
271
|
"aria-controls": "income-tabpanel",
|
|
272
272
|
id: "income-tab",
|
|
273
273
|
label: /* @__PURE__ */ t(
|
|
274
|
-
|
|
274
|
+
W,
|
|
275
275
|
{
|
|
276
|
-
amount:
|
|
276
|
+
amount: b.totalAmount,
|
|
277
277
|
label: r.income_tab_title
|
|
278
278
|
}
|
|
279
279
|
),
|
|
@@ -284,7 +284,7 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
284
284
|
}
|
|
285
285
|
),
|
|
286
286
|
/* @__PURE__ */ t(
|
|
287
|
-
|
|
287
|
+
x,
|
|
288
288
|
{
|
|
289
289
|
"aria-labelledby": "spending-tab",
|
|
290
290
|
hidden: m !== 0,
|
|
@@ -292,20 +292,20 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
292
292
|
role: "tabpanel",
|
|
293
293
|
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
294
294
|
/* @__PURE__ */ t(
|
|
295
|
-
|
|
295
|
+
O,
|
|
296
296
|
{
|
|
297
297
|
data: g,
|
|
298
|
-
onSelected:
|
|
298
|
+
onSelected: _,
|
|
299
299
|
selectedId: u,
|
|
300
300
|
totalLabel: r.total_spending
|
|
301
301
|
}
|
|
302
302
|
),
|
|
303
|
-
/* @__PURE__ */ t(
|
|
303
|
+
/* @__PURE__ */ t(tt, { data: g, onSelected: _, selectedId: u })
|
|
304
304
|
] })
|
|
305
305
|
}
|
|
306
306
|
),
|
|
307
307
|
/* @__PURE__ */ t(
|
|
308
|
-
|
|
308
|
+
x,
|
|
309
309
|
{
|
|
310
310
|
"aria-labelledby": "income-tab",
|
|
311
311
|
hidden: m !== 1,
|
|
@@ -313,48 +313,48 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
313
313
|
role: "tabpanel",
|
|
314
314
|
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
315
315
|
/* @__PURE__ */ t(
|
|
316
|
-
|
|
316
|
+
O,
|
|
317
317
|
{
|
|
318
|
-
data:
|
|
318
|
+
data: b,
|
|
319
319
|
isIncome: !0,
|
|
320
|
-
onSelected:
|
|
320
|
+
onSelected: _,
|
|
321
321
|
selectedId: u,
|
|
322
322
|
totalLabel: r.total_income
|
|
323
323
|
}
|
|
324
324
|
),
|
|
325
|
-
/* @__PURE__ */ t(
|
|
325
|
+
/* @__PURE__ */ t(tt, { data: b, onSelected: _, selectedId: u })
|
|
326
326
|
] })
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] }) : /* @__PURE__ */ t(F, { height: 250 });
|
|
330
|
-
},
|
|
331
|
-
const { visibleAccounts: r } =
|
|
330
|
+
}, Nt = v(Lt), Wt = ({ onPrimaryCtaClick: n, sx: c = {} }) => {
|
|
331
|
+
const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setSelectedAccounts: o } = R();
|
|
332
332
|
return p.useEffect(() => {
|
|
333
|
-
|
|
334
|
-
}, [r]), !
|
|
335
|
-
|
|
333
|
+
o(r);
|
|
334
|
+
}, [r]), !a || !i ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
335
|
+
Mt,
|
|
336
336
|
{
|
|
337
337
|
className: "mx-exp-spending-miniwidget",
|
|
338
|
-
onPrimaryCtaClick:
|
|
338
|
+
onPrimaryCtaClick: n,
|
|
339
339
|
primaryCtaLabel: l.primary_cta,
|
|
340
|
-
sx:
|
|
340
|
+
sx: c,
|
|
341
341
|
title: l.mini_title,
|
|
342
|
-
children: /* @__PURE__ */ t(
|
|
342
|
+
children: /* @__PURE__ */ t(Nt, {})
|
|
343
343
|
}
|
|
344
344
|
);
|
|
345
|
-
},
|
|
346
|
-
data:
|
|
347
|
-
onSelected:
|
|
345
|
+
}, be = v(Wt), Ot = ({
|
|
346
|
+
data: n,
|
|
347
|
+
onSelected: c,
|
|
348
348
|
selectedId: r = "",
|
|
349
349
|
title: l
|
|
350
350
|
}) => {
|
|
351
|
-
const { spending:
|
|
351
|
+
const { spending: a } = I(), i = n.categoryData.find((o) => o.guid === r);
|
|
352
352
|
return /* @__PURE__ */ h(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
353
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${
|
|
353
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${a.by_category}` }),
|
|
354
354
|
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
355
|
-
/* @__PURE__ */ t(
|
|
355
|
+
/* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ h(p.Fragment, { children: [
|
|
356
356
|
/* @__PURE__ */ t(
|
|
357
|
-
|
|
357
|
+
J,
|
|
358
358
|
{
|
|
359
359
|
disableGutters: !0,
|
|
360
360
|
disablePadding: !0,
|
|
@@ -362,19 +362,19 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
362
362
|
minHeight: 44
|
|
363
363
|
},
|
|
364
364
|
children: /* @__PURE__ */ h(
|
|
365
|
-
|
|
365
|
+
vt,
|
|
366
366
|
{
|
|
367
|
-
"aria-expanded":
|
|
368
|
-
onClick: () =>
|
|
367
|
+
"aria-expanded": i?.guid === o.guid,
|
|
368
|
+
onClick: () => c(o.guid),
|
|
369
369
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
370
370
|
children: [
|
|
371
371
|
/* @__PURE__ */ t(
|
|
372
|
-
|
|
372
|
+
x,
|
|
373
373
|
{
|
|
374
374
|
borderRadius: 4,
|
|
375
375
|
flexShrink: 0,
|
|
376
376
|
height: 8,
|
|
377
|
-
sx: { backgroundColor:
|
|
377
|
+
sx: { backgroundColor: o.color, mr: 8 },
|
|
378
378
|
width: 8
|
|
379
379
|
}
|
|
380
380
|
),
|
|
@@ -386,8 +386,8 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
386
386
|
justifyContent: "space-between",
|
|
387
387
|
width: "100%",
|
|
388
388
|
children: [
|
|
389
|
-
/* @__PURE__ */ t(y, { bold: r ===
|
|
390
|
-
/* @__PURE__ */ t(y, { bold: r ===
|
|
389
|
+
/* @__PURE__ */ t(y, { bold: r === o.guid, children: o.name }),
|
|
390
|
+
/* @__PURE__ */ t(y, { bold: r === o.guid, variant: "Body", children: w(o.amount, "0,0") })
|
|
391
391
|
]
|
|
392
392
|
}
|
|
393
393
|
)
|
|
@@ -397,9 +397,9 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
397
397
|
}
|
|
398
398
|
),
|
|
399
399
|
/* @__PURE__ */ t(B, {}),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
o.categoryTotals && o.categoryTotals.length > 0 && /* @__PURE__ */ t(wt, { in: i?.guid === o.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(q, { children: [
|
|
401
|
+
i?.categoryTotals?.map((e) => /* @__PURE__ */ t(
|
|
402
|
+
J,
|
|
403
403
|
{
|
|
404
404
|
sx: {
|
|
405
405
|
pl: 24,
|
|
@@ -411,36 +411,36 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
411
411
|
e.name,
|
|
412
412
|
" "
|
|
413
413
|
] }),
|
|
414
|
-
/* @__PURE__ */ t(y, { children:
|
|
414
|
+
/* @__PURE__ */ t(y, { children: w(e.amount, "0,0") })
|
|
415
415
|
] })
|
|
416
416
|
},
|
|
417
417
|
e.guid
|
|
418
418
|
)),
|
|
419
419
|
/* @__PURE__ */ t(B, {})
|
|
420
420
|
] }) })
|
|
421
|
-
] },
|
|
422
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${
|
|
421
|
+
] }, o.guid)) }),
|
|
422
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${a.total}: ${w(n.totalAmount, "0,0")}` })
|
|
423
423
|
] });
|
|
424
|
-
},
|
|
425
|
-
data:
|
|
426
|
-
onSelected:
|
|
424
|
+
}, Rt = v(Ot), kt = ({
|
|
425
|
+
data: n,
|
|
426
|
+
onSelected: c,
|
|
427
427
|
onViewTransactions: r,
|
|
428
428
|
selectedId: l,
|
|
429
|
-
title:
|
|
429
|
+
title: a
|
|
430
430
|
}) => {
|
|
431
|
-
const { isDesktop:
|
|
431
|
+
const { isDesktop: i, isMobile: o } = lt(), { isLoadingCategoryTotals: e } = z(), { spending: d } = I();
|
|
432
432
|
return /* @__PURE__ */ h(
|
|
433
433
|
C,
|
|
434
434
|
{
|
|
435
|
-
alignItems:
|
|
436
|
-
direction:
|
|
435
|
+
alignItems: o ? "center" : "flex-start",
|
|
436
|
+
direction: o ? "column" : "row",
|
|
437
437
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
438
438
|
justifyContent: "center",
|
|
439
439
|
pt: 50,
|
|
440
440
|
px: 8,
|
|
441
441
|
children: [
|
|
442
442
|
e && /* @__PURE__ */ t(
|
|
443
|
-
|
|
443
|
+
O,
|
|
444
444
|
{
|
|
445
445
|
data: {
|
|
446
446
|
categoryData: [],
|
|
@@ -450,175 +450,173 @@ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
|
450
450
|
onSelected: () => {
|
|
451
451
|
},
|
|
452
452
|
selectedId: "",
|
|
453
|
-
size:
|
|
453
|
+
size: i ? 400 : 300,
|
|
454
454
|
totalLabel: "Loading ...",
|
|
455
455
|
variant: "full"
|
|
456
456
|
}
|
|
457
457
|
),
|
|
458
458
|
!e && /* @__PURE__ */ t(
|
|
459
|
-
|
|
459
|
+
O,
|
|
460
460
|
{
|
|
461
|
-
data:
|
|
462
|
-
onSelected:
|
|
461
|
+
data: n,
|
|
462
|
+
onSelected: c,
|
|
463
463
|
onViewTransactions: r,
|
|
464
464
|
selectedId: l,
|
|
465
|
-
size:
|
|
466
|
-
totalLabel:
|
|
465
|
+
size: i ? 400 : 300,
|
|
466
|
+
totalLabel: d.total_amount,
|
|
467
467
|
variant: "full"
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
/* @__PURE__ */ t(
|
|
470
|
+
/* @__PURE__ */ t(Rt, { data: n, onSelected: c, selectedId: l, title: a })
|
|
471
471
|
]
|
|
472
472
|
}
|
|
473
473
|
);
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
],
|
|
482
|
-
const
|
|
474
|
+
}, et = v(kt), $t = (n) => [
|
|
475
|
+
n.palette.chartMono.chartMono5,
|
|
476
|
+
n.palette.chartMono.chartMono4,
|
|
477
|
+
n.palette.chartMono.chartMono3,
|
|
478
|
+
n.palette.chartMono.chartMono2,
|
|
479
|
+
n.palette.chartMono.chartMono1,
|
|
480
|
+
n.palette.chartMono.chartMono6
|
|
481
|
+
], Gt = () => {
|
|
482
|
+
const n = it(), { clientConfig: c } = st(), { categories: r, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: a } = z(), { goals: i, spending: o } = I(), { displayedDateRange: e, selectedAccounts: d, selectedAccountGuids: u } = R(), { setFilter: s, sortedTransactions: m } = _t(), T = c?.master?.deep_link_params?.account_guids, g = c?.master?.deep_link_params?.view, [b, E] = p.useState(""), [_, D] = p.useState(g === "income" ? 1 : 0), [L, H] = p.useState(""), [gt, P] = p.useState(!1);
|
|
483
483
|
p.useEffect(() => {
|
|
484
484
|
a(
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
).finally(
|
|
489
|
-
|
|
490
|
-
});
|
|
491
|
-
}, [u, c]);
|
|
485
|
+
d,
|
|
486
|
+
e.start,
|
|
487
|
+
e.end
|
|
488
|
+
).finally();
|
|
489
|
+
}, [d, e]);
|
|
492
490
|
const k = p.useMemo(
|
|
493
|
-
() =>
|
|
494
|
-
[
|
|
495
|
-
),
|
|
496
|
-
() =>
|
|
497
|
-
[
|
|
491
|
+
() => ct(r, i, n, l),
|
|
492
|
+
[r, l]
|
|
493
|
+
), K = p.useMemo(
|
|
494
|
+
() => dt(r, l, $t(n)),
|
|
495
|
+
[r, l]
|
|
498
496
|
), $ = p.useMemo(
|
|
499
|
-
() =>
|
|
500
|
-
[
|
|
501
|
-
),
|
|
502
|
-
|
|
497
|
+
() => m.find((f) => f.guid === L),
|
|
498
|
+
[L, m]
|
|
499
|
+
), ut = (f, A) => {
|
|
500
|
+
D(A), E("");
|
|
501
|
+
}, X = (f) => {
|
|
502
|
+
E(b === f || f === "0" ? "" : f);
|
|
503
503
|
}, Y = (f) => {
|
|
504
|
-
D(x === f || f === "0" ? "" : f);
|
|
505
|
-
}, U = (f) => {
|
|
506
504
|
const A = {
|
|
507
|
-
accounts:
|
|
508
|
-
dateRange:
|
|
505
|
+
accounts: T || u,
|
|
506
|
+
dateRange: e
|
|
509
507
|
};
|
|
510
|
-
if (
|
|
508
|
+
if (_ === 0)
|
|
511
509
|
if (f === "other") {
|
|
512
510
|
const M = k.categoryData.find((G) => G.guid === "other");
|
|
513
|
-
|
|
511
|
+
s({
|
|
514
512
|
...A,
|
|
515
|
-
custom: (G) => !!M?.categoryTotals?.find((
|
|
513
|
+
custom: (G) => !!M?.categoryTotals?.find((pt) => pt.guid === G.top_level_category_guid)
|
|
516
514
|
});
|
|
517
515
|
} else
|
|
518
|
-
|
|
516
|
+
s({
|
|
519
517
|
...A,
|
|
520
|
-
custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !==
|
|
518
|
+
custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !== S.INCOME && M.top_level_category_guid !== S.INVESTMENTS && M.top_level_category_guid !== S.TRANSFER,
|
|
521
519
|
showSplits: !!f
|
|
522
520
|
});
|
|
523
521
|
else
|
|
524
|
-
|
|
522
|
+
s({
|
|
525
523
|
...A,
|
|
526
|
-
custom: (M) => f ? M.category_guid === f : M.category_guid ===
|
|
524
|
+
custom: (M) => f ? M.category_guid === f : M.category_guid === S.INCOME || M.top_level_category_guid === S.INCOME
|
|
527
525
|
});
|
|
528
|
-
|
|
526
|
+
P(!0);
|
|
529
527
|
};
|
|
530
|
-
return /* @__PURE__ */ h(
|
|
531
|
-
/* @__PURE__ */ h(
|
|
528
|
+
return /* @__PURE__ */ h(x, { children: [
|
|
529
|
+
/* @__PURE__ */ h(at, { onChange: ut, value: _, variant: "fullWidth", children: [
|
|
532
530
|
/* @__PURE__ */ t(
|
|
533
|
-
|
|
531
|
+
N,
|
|
534
532
|
{
|
|
535
533
|
label: /* @__PURE__ */ t(
|
|
536
|
-
|
|
534
|
+
W,
|
|
537
535
|
{
|
|
538
536
|
amount: k.totalAmount,
|
|
539
|
-
label:
|
|
537
|
+
label: o.spend_tab_title
|
|
540
538
|
}
|
|
541
539
|
)
|
|
542
540
|
}
|
|
543
541
|
),
|
|
544
542
|
/* @__PURE__ */ t(
|
|
545
|
-
|
|
543
|
+
N,
|
|
546
544
|
{
|
|
547
545
|
label: /* @__PURE__ */ t(
|
|
548
|
-
|
|
546
|
+
W,
|
|
549
547
|
{
|
|
550
|
-
amount:
|
|
551
|
-
label:
|
|
548
|
+
amount: K.totalAmount,
|
|
549
|
+
label: o.income_tab_title
|
|
552
550
|
}
|
|
553
551
|
)
|
|
554
552
|
}
|
|
555
553
|
)
|
|
556
554
|
] }),
|
|
557
|
-
|
|
558
|
-
|
|
555
|
+
_ === 0 && /* @__PURE__ */ t(
|
|
556
|
+
et,
|
|
559
557
|
{
|
|
560
558
|
data: k,
|
|
561
|
-
onSelected:
|
|
562
|
-
onViewTransactions:
|
|
563
|
-
selectedId:
|
|
564
|
-
title:
|
|
559
|
+
onSelected: X,
|
|
560
|
+
onViewTransactions: Y,
|
|
561
|
+
selectedId: b,
|
|
562
|
+
title: o.spend_tab_title
|
|
565
563
|
}
|
|
566
564
|
),
|
|
567
|
-
|
|
568
|
-
|
|
565
|
+
_ === 1 && /* @__PURE__ */ t(
|
|
566
|
+
et,
|
|
569
567
|
{
|
|
570
|
-
data:
|
|
571
|
-
onSelected:
|
|
572
|
-
onViewTransactions:
|
|
573
|
-
selectedId:
|
|
574
|
-
title:
|
|
568
|
+
data: K,
|
|
569
|
+
onSelected: X,
|
|
570
|
+
onViewTransactions: Y,
|
|
571
|
+
selectedId: b,
|
|
572
|
+
title: o.income_tab_title
|
|
575
573
|
}
|
|
576
574
|
),
|
|
577
575
|
/* @__PURE__ */ t(
|
|
578
|
-
|
|
576
|
+
Q,
|
|
579
577
|
{
|
|
580
|
-
ariaLabelClose:
|
|
581
|
-
isOpen:
|
|
582
|
-
onClose: () =>
|
|
583
|
-
title:
|
|
584
|
-
children: /* @__PURE__ */ t(
|
|
578
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
579
|
+
isOpen: gt,
|
|
580
|
+
onClose: () => P(!1),
|
|
581
|
+
title: o.transactions_drawer_title,
|
|
582
|
+
children: /* @__PURE__ */ t(Dt, { onClick: H })
|
|
585
583
|
}
|
|
586
584
|
),
|
|
587
585
|
/* @__PURE__ */ t(
|
|
588
|
-
|
|
586
|
+
Q,
|
|
589
587
|
{
|
|
590
|
-
ariaLabelClose:
|
|
588
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
591
589
|
isOpen: !!$,
|
|
592
|
-
onClose: () =>
|
|
593
|
-
title:
|
|
594
|
-
children: $ && /* @__PURE__ */ t(
|
|
590
|
+
onClose: () => H(""),
|
|
591
|
+
title: o.transaction_details_drawer_title,
|
|
592
|
+
children: $ && /* @__PURE__ */ t(xt, { transaction: $ })
|
|
595
593
|
}
|
|
596
594
|
)
|
|
597
595
|
] });
|
|
598
|
-
},
|
|
599
|
-
const { visibleAccounts: r } =
|
|
596
|
+
}, Bt = v(Gt), jt = ({ onBackClick: n, sx: c = {} }) => {
|
|
597
|
+
const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setDisplayedDate: o, setSelectedAccounts: e } = R(), { onEvent: d } = St(), { clientConfig: u } = st(), s = u?.master?.deep_link_params?.date_range, [m, T] = p.useState(!1);
|
|
600
598
|
p.useEffect(() => {
|
|
601
599
|
e(r);
|
|
602
600
|
}, [r]), p.useEffect(() => {
|
|
603
|
-
s && Array.isArray(s) && s.length === 2 ?
|
|
601
|
+
s && Array.isArray(s) && s.length === 2 ? o(s[0], s[1]) : o(nt(U()), ot(U())), T(!0), d(Z.SPENDING_VIEW);
|
|
604
602
|
}, []);
|
|
605
|
-
const g = (
|
|
606
|
-
|
|
603
|
+
const g = (b) => {
|
|
604
|
+
o(b[0], b[1]);
|
|
607
605
|
};
|
|
608
|
-
return !
|
|
609
|
-
|
|
606
|
+
return !a || !i || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
607
|
+
It,
|
|
610
608
|
{
|
|
611
609
|
accountOptions: r,
|
|
612
610
|
calendarActions: { onRangeChanged: g },
|
|
613
|
-
onAccountsFilterClick: () =>
|
|
614
|
-
onBackClick:
|
|
615
|
-
sx:
|
|
611
|
+
onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
|
|
612
|
+
onBackClick: n,
|
|
613
|
+
sx: c,
|
|
616
614
|
title: l.title,
|
|
617
|
-
children: /* @__PURE__ */ t(
|
|
615
|
+
children: /* @__PURE__ */ t(x, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
618
616
|
}
|
|
619
617
|
);
|
|
620
|
-
},
|
|
618
|
+
}, Ce = v(jt);
|
|
621
619
|
export {
|
|
622
|
-
|
|
623
|
-
|
|
620
|
+
be as SpendingMiniWidget,
|
|
621
|
+
Ce as SpendingWidget
|
|
624
622
|
};
|