@mx-cartographer/experiences 7.4.7-alpha.mega1 → 7.4.8-alpha.mm0
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 +2 -2
- package/dist/{Account-01wOyrH1.mjs → Account-BrOTlmeK.mjs} +1 -1
- package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-B7FqH05C.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-C8MxsxhN.mjs} +4 -4
- package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-BQZ-o6Kj.mjs} +2 -2
- package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-aIE9WWTO.mjs} +4 -4
- package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-DqO84Aer.mjs} +2 -2
- package/dist/{Accounts-D7QljYas.mjs → Accounts-DC_A4UCa.mjs} +1 -1
- package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-SUgfE5GN.mjs} +1 -1
- package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-KL8t1qSC.mjs} +1 -1
- package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-DaK5uIL5.mjs} +2 -2
- package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
- package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-DVPZbv2C.mjs} +1 -1
- package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-o4rrjGSJ.mjs} +2 -2
- package/dist/{Help-BnPXM_N2.mjs → Help-BjLMsuMS.mjs} +1 -1
- package/dist/{LineChart-bc1D9xBE.mjs → LineChart-BQRxZF3p.mjs} +1 -1
- package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-BxTkF6Tz.mjs} +1 -1
- package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-rcnDYsBJ.mjs} +75 -75
- package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
- package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-DG2X69jG.mjs} +2 -2
- package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-C7FYNM7I.mjs} +250 -248
- package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +3 -3
- package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-C81H1l38.mjs} +3 -3
- package/dist/{SpendingLegend-Bf-wbJvb.mjs → SpendingLegend-DqZxN_BZ.mjs} +2 -2
- package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-BA_E5nQ-.mjs} +5 -5
- package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-PRlwE-TF.mjs} +2 -2
- package/dist/{User-wXzDI4M8.mjs → User-Cnlegl1N.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-C0832BMe.mjs → ViewMoreMicroCard-DfPXJzbv.mjs} +105 -101
- package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-CaPjoWeE.mjs} +2 -2
- package/dist/accounts/index.es.js +148 -140
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +483 -478
- package/dist/cashflow/index.es.js +367 -362
- package/dist/categories/index.es.js +1 -1
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +35 -33
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +346 -342
- package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +1 -1
- package/dist/finstrong/index.es.js +352 -350
- package/dist/goals/index.es.js +518 -511
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
- package/dist/investments/index.es.js +395 -393
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +245 -240
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +293 -285
- package/dist/settings/index.es.js +252 -249
- package/dist/spending/index.es.js +136 -124
- package/dist/transactions/index.es.js +77 -73
- package/dist/trends/index.es.js +601 -588
- package/dist/{useAccountDisplayName-CMMlIOXF.mjs → useAccountDisplayName-Cjx8YmKK.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +23 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import a from "react";
|
|
3
3
|
import { observer as x } from "mobx-react-lite";
|
|
4
4
|
import { startOfMonth as it } from "date-fns/startOfMonth";
|
|
5
5
|
import { endOfMonth as rt } from "date-fns/endOfMonth";
|
|
@@ -7,37 +7,43 @@ import M from "@mui/material/Box";
|
|
|
7
7
|
import C from "@mui/material/Stack";
|
|
8
8
|
import E from "@mui/material/Tab";
|
|
9
9
|
import st from "@mui/material/Tabs";
|
|
10
|
-
import
|
|
11
|
-
import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-
|
|
12
|
-
import { Text as y, Icon as
|
|
10
|
+
import bt from "@mui/material/styles/useTheme";
|
|
11
|
+
import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-DqZxN_BZ.mjs";
|
|
12
|
+
import { Text as y, Icon as _t } from "@mxenabled/mxui";
|
|
13
13
|
import { f as A } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
|
-
import { u as
|
|
14
|
+
import { u as w, b as R, m as F, d as dt, a as V, h as Ct, g as yt } from "../hooks-ZMp65DFz.mjs";
|
|
15
|
+
import { u as gt } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
|
|
15
16
|
import { L as P } from "../Loader-DUaFpDGv.mjs";
|
|
16
|
-
import { M as St } from "../MiniWidgetContainer-
|
|
17
|
+
import { M as St } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
17
18
|
import { startOfToday as Z } from "date-fns/startOfToday";
|
|
18
19
|
import Tt from "@mui/material/Button";
|
|
19
20
|
import { useTheme as Mt } from "@mui/material";
|
|
20
|
-
import { e as xt } from "../exportTransactionsToCSV-
|
|
21
|
-
import { T as
|
|
21
|
+
import { e as xt } from "../exportTransactionsToCSV-DuAaI5XA.mjs";
|
|
22
|
+
import { T as wt, a as vt } from "../TransactionDetails-BA_E5nQ-.mjs";
|
|
22
23
|
import Dt from "@mui/material/Collapse";
|
|
23
24
|
import z from "@mui/material/Divider";
|
|
24
25
|
import tt from "@mui/material/List";
|
|
25
26
|
import et from "@mui/material/ListItem";
|
|
26
|
-
import
|
|
27
|
-
import { u as
|
|
27
|
+
import Lt from "@mui/material/ListItemButton";
|
|
28
|
+
import { u as It } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
28
29
|
import { D as nt } from "../Drawer-BEtCk82g.mjs";
|
|
29
|
-
import { b as
|
|
30
|
-
import { A as ot, W as At } from "../WidgetContainer-
|
|
31
|
-
const N = ({ amount: e, label: d }) => /* @__PURE__ */
|
|
30
|
+
import { b as L } from "../Category-CevNQ03n.mjs";
|
|
31
|
+
import { A as ot, W as At } from "../WidgetContainer-CaPjoWeE.mjs";
|
|
32
|
+
const N = ({ amount: e, label: d }) => /* @__PURE__ */ l(C, { direction: "column", children: [
|
|
32
33
|
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
|
|
33
34
|
/* @__PURE__ */ t(y, { variant: "XSmall", children: A(e, "0,0") })
|
|
34
35
|
] }), Et = () => {
|
|
35
|
-
const e =
|
|
36
|
-
categories:
|
|
37
|
-
dateRangeCategoryTotals:
|
|
36
|
+
const e = bt(), { goals: d, spending: o } = w(), { selectedAccounts: r } = R(), {
|
|
37
|
+
categories: i,
|
|
38
|
+
dateRangeCategoryTotals: s,
|
|
38
39
|
dataRangeTotalsLoaded: n,
|
|
39
40
|
loadDateRangeCategoryTotals: u
|
|
40
|
-
} = F()
|
|
41
|
+
} = F();
|
|
42
|
+
gt({
|
|
43
|
+
widgetName: "SpendingMiniWidget",
|
|
44
|
+
isLoaded: n
|
|
45
|
+
});
|
|
46
|
+
const c = a.useMemo(
|
|
41
47
|
() => [
|
|
42
48
|
e.palette.chartMono.chartMono5,
|
|
43
49
|
e.palette.chartMono.chartMono4,
|
|
@@ -48,26 +54,26 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
48
54
|
],
|
|
49
55
|
[e]
|
|
50
56
|
);
|
|
51
|
-
|
|
57
|
+
a.useEffect(() => {
|
|
52
58
|
u(
|
|
53
|
-
|
|
59
|
+
r,
|
|
54
60
|
it(/* @__PURE__ */ new Date()),
|
|
55
61
|
rt(/* @__PURE__ */ new Date())
|
|
56
62
|
).finally();
|
|
57
|
-
}, [
|
|
58
|
-
const [m,
|
|
59
|
-
() => ct(
|
|
60
|
-
[
|
|
61
|
-
), f =
|
|
62
|
-
() => lt(
|
|
63
|
-
[
|
|
63
|
+
}, [r]);
|
|
64
|
+
const [m, g] = a.useState(""), [h, v] = a.useState(0), _ = a.useMemo(
|
|
65
|
+
() => ct(i, d, e, s),
|
|
66
|
+
[i, s]
|
|
67
|
+
), f = a.useMemo(
|
|
68
|
+
() => lt(i, s, c),
|
|
69
|
+
[i, s, c]
|
|
64
70
|
), O = (T, k) => {
|
|
65
|
-
|
|
71
|
+
v(k), g("");
|
|
66
72
|
}, S = (T) => {
|
|
67
|
-
|
|
73
|
+
g(m === T ? "" : T);
|
|
68
74
|
};
|
|
69
|
-
return n ? /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
75
|
+
return n ? /* @__PURE__ */ l(M, { width: "100%", children: [
|
|
76
|
+
/* @__PURE__ */ l(
|
|
71
77
|
st,
|
|
72
78
|
{
|
|
73
79
|
"aria-label": o.mini_title,
|
|
@@ -115,7 +121,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
115
121
|
hidden: h !== 0,
|
|
116
122
|
id: "spending-tabpanel",
|
|
117
123
|
role: "tabpanel",
|
|
118
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ l(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
119
125
|
/* @__PURE__ */ t(
|
|
120
126
|
W,
|
|
121
127
|
{
|
|
@@ -136,7 +142,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
136
142
|
hidden: h !== 1,
|
|
137
143
|
id: "income-tabpanel",
|
|
138
144
|
role: "tabpanel",
|
|
139
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ l(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
140
146
|
/* @__PURE__ */ t(
|
|
141
147
|
W,
|
|
142
148
|
{
|
|
@@ -153,31 +159,31 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
153
159
|
)
|
|
154
160
|
] }) : /* @__PURE__ */ t(P, { height: 250 });
|
|
155
161
|
}, Wt = x(Et), Nt = ({ onPrimaryCtaClick: e, sx: d = {} }) => {
|
|
156
|
-
const { visibleAccounts: o } = dt(), { spending:
|
|
157
|
-
return
|
|
162
|
+
const { visibleAccounts: o } = dt(), { spending: r } = w(), { isCopyLoaded: i, isInitialized: s, setSelectedAccounts: n } = R();
|
|
163
|
+
return a.useEffect(() => {
|
|
158
164
|
n(o);
|
|
159
|
-
}, [o]), !
|
|
165
|
+
}, [o]), !i || !s ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
|
|
160
166
|
St,
|
|
161
167
|
{
|
|
162
168
|
className: "mx-exp-spending-miniwidget",
|
|
163
169
|
onPrimaryCtaClick: e,
|
|
164
|
-
primaryCtaLabel:
|
|
170
|
+
primaryCtaLabel: r.primary_cta,
|
|
165
171
|
sx: { height: "100%", ...d },
|
|
166
|
-
title:
|
|
172
|
+
title: r.mini_title,
|
|
167
173
|
children: /* @__PURE__ */ t(Wt, {})
|
|
168
174
|
}
|
|
169
175
|
);
|
|
170
|
-
},
|
|
176
|
+
}, _e = x(Nt), Rt = ({
|
|
171
177
|
data: e,
|
|
172
178
|
onSelected: d,
|
|
173
179
|
selectedId: o = "",
|
|
174
|
-
title:
|
|
180
|
+
title: r
|
|
175
181
|
}) => {
|
|
176
|
-
const { spending:
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${
|
|
182
|
+
const { spending: i } = w(), s = e.categoryData.find((n) => n.guid === o);
|
|
183
|
+
return /* @__PURE__ */ l(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
184
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${r} ${i.by_category}` }),
|
|
179
185
|
/* @__PURE__ */ t(z, { "aria-hidden": "true" }),
|
|
180
|
-
/* @__PURE__ */ t(tt, { children: e.categoryData.map((n) => /* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ t(tt, { children: e.categoryData.map((n) => /* @__PURE__ */ l(a.Fragment, { children: [
|
|
181
187
|
/* @__PURE__ */ t(
|
|
182
188
|
et,
|
|
183
189
|
{
|
|
@@ -186,10 +192,10 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
186
192
|
sx: {
|
|
187
193
|
minHeight: 44
|
|
188
194
|
},
|
|
189
|
-
children: /* @__PURE__ */
|
|
190
|
-
|
|
195
|
+
children: /* @__PURE__ */ l(
|
|
196
|
+
Lt,
|
|
191
197
|
{
|
|
192
|
-
"aria-expanded":
|
|
198
|
+
"aria-expanded": s?.guid === n.guid,
|
|
193
199
|
onClick: () => d(n.guid),
|
|
194
200
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
195
201
|
children: [
|
|
@@ -203,7 +209,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
203
209
|
width: 8
|
|
204
210
|
}
|
|
205
211
|
),
|
|
206
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ l(
|
|
207
213
|
C,
|
|
208
214
|
{
|
|
209
215
|
alignItems: "center",
|
|
@@ -222,8 +228,8 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
222
228
|
}
|
|
223
229
|
),
|
|
224
230
|
/* @__PURE__ */ t(z, {}),
|
|
225
|
-
n.categoryTotals && n.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in:
|
|
226
|
-
|
|
231
|
+
n.categoryTotals && n.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in: s?.guid === n.guid, unmountOnExit: !0, children: /* @__PURE__ */ l(tt, { children: [
|
|
232
|
+
s?.categoryTotals?.map((u) => /* @__PURE__ */ t(
|
|
227
233
|
et,
|
|
228
234
|
{
|
|
229
235
|
sx: {
|
|
@@ -231,8 +237,8 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
231
237
|
pr: 8,
|
|
232
238
|
py: 0
|
|
233
239
|
},
|
|
234
|
-
children: /* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ l(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
241
|
+
/* @__PURE__ */ l(y, { children: [
|
|
236
242
|
u.name,
|
|
237
243
|
" "
|
|
238
244
|
] }),
|
|
@@ -244,17 +250,17 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
244
250
|
/* @__PURE__ */ t(z, {})
|
|
245
251
|
] }) })
|
|
246
252
|
] }, n.guid)) }),
|
|
247
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${
|
|
253
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${A(e.totalAmount, "0,0")}` })
|
|
248
254
|
] });
|
|
249
255
|
}, Ot = x(Rt), kt = ({
|
|
250
256
|
data: e,
|
|
251
257
|
onSelected: d,
|
|
252
258
|
onViewTransactions: o,
|
|
253
|
-
selectedId:
|
|
254
|
-
title:
|
|
259
|
+
selectedId: r,
|
|
260
|
+
title: i
|
|
255
261
|
}) => {
|
|
256
|
-
const { isDesktop:
|
|
257
|
-
return /* @__PURE__ */
|
|
262
|
+
const { isDesktop: s, isMobile: n } = It(), { isLoadingCategoryTotals: u } = F(), { spending: c } = w();
|
|
263
|
+
return /* @__PURE__ */ l(
|
|
258
264
|
C,
|
|
259
265
|
{
|
|
260
266
|
alignItems: n ? "center" : "flex-start",
|
|
@@ -275,7 +281,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
275
281
|
onSelected: () => {
|
|
276
282
|
},
|
|
277
283
|
selectedId: "",
|
|
278
|
-
size:
|
|
284
|
+
size: s ? 400 : 300,
|
|
279
285
|
totalLabel: "Loading ...",
|
|
280
286
|
variant: "full"
|
|
281
287
|
}
|
|
@@ -286,13 +292,13 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
286
292
|
data: e,
|
|
287
293
|
onSelected: d,
|
|
288
294
|
onViewTransactions: o,
|
|
289
|
-
selectedId:
|
|
290
|
-
size:
|
|
291
|
-
totalLabel:
|
|
295
|
+
selectedId: r,
|
|
296
|
+
size: s ? 400 : 300,
|
|
297
|
+
totalLabel: c.total_amount,
|
|
292
298
|
variant: "full"
|
|
293
299
|
}
|
|
294
300
|
),
|
|
295
|
-
/* @__PURE__ */ t(Ot, { data: e, onSelected: d, selectedId:
|
|
301
|
+
/* @__PURE__ */ t(Ot, { data: e, onSelected: d, selectedId: r, title: i })
|
|
296
302
|
]
|
|
297
303
|
}
|
|
298
304
|
);
|
|
@@ -304,67 +310,73 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
304
310
|
e.palette.chartMono.chartMono1,
|
|
305
311
|
e.palette.chartMono.chartMono6
|
|
306
312
|
], Bt = () => {
|
|
307
|
-
const e = Mt(), {
|
|
313
|
+
const e = Mt(), { is_mobile_webview: d } = V(), { clientConfig: o } = V(), {
|
|
314
|
+
categories: r,
|
|
315
|
+
dateRangeCategoryTotals: i,
|
|
316
|
+
loadDateRangeCategoryTotals: s,
|
|
317
|
+
dataRangeTotalsLoaded: n
|
|
318
|
+
} = F(), {
|
|
308
319
|
goals: u,
|
|
309
|
-
spending:
|
|
320
|
+
spending: c,
|
|
310
321
|
transactions: m
|
|
311
|
-
} =
|
|
322
|
+
} = w(), { displayedDateRange: g, selectedAccounts: h, selectedAccountGuids: v } = R(), {
|
|
312
323
|
setFilter: _,
|
|
313
324
|
sortedTransactions: f,
|
|
314
325
|
sortedTransactionsWithSplits: O,
|
|
315
326
|
tags: S
|
|
316
|
-
} = Ct(), T =
|
|
317
|
-
|
|
318
|
-
|
|
327
|
+
} = Ct(), T = o?.master?.deep_link_params?.account_guids, k = o?.master?.deep_link_params?.view, [$, H] = a.useState(""), [I, pt] = a.useState(k === "income" ? 1 : 0), [K, U] = a.useState(""), [ut, X] = a.useState(!1);
|
|
328
|
+
gt({
|
|
329
|
+
widgetName: "SpendingWidget",
|
|
330
|
+
isLoaded: n
|
|
331
|
+
}), a.useEffect(() => {
|
|
332
|
+
s(
|
|
319
333
|
h,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
).finally(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
), G = i.useMemo(
|
|
333
|
-
() => f.find((g) => g.guid === K),
|
|
334
|
+
g.start,
|
|
335
|
+
g.end
|
|
336
|
+
).finally();
|
|
337
|
+
}, [h, g]);
|
|
338
|
+
const B = a.useMemo(
|
|
339
|
+
() => ct(r, u, e, i),
|
|
340
|
+
[r, i]
|
|
341
|
+
), Y = a.useMemo(
|
|
342
|
+
() => lt(r, i, $t(e)),
|
|
343
|
+
[r, i]
|
|
344
|
+
), G = a.useMemo(
|
|
345
|
+
() => f.find((p) => p.guid === K),
|
|
334
346
|
[K, f]
|
|
335
|
-
),
|
|
347
|
+
), mt = (p, D) => {
|
|
336
348
|
pt(D), H("");
|
|
337
|
-
}, q = (
|
|
338
|
-
H($ ===
|
|
339
|
-
}, J = (
|
|
349
|
+
}, q = (p) => {
|
|
350
|
+
H($ === p || p === "0" ? "" : p);
|
|
351
|
+
}, J = (p) => {
|
|
340
352
|
const D = {
|
|
341
|
-
accounts: T ||
|
|
342
|
-
dateRange:
|
|
353
|
+
accounts: T || v,
|
|
354
|
+
dateRange: g
|
|
343
355
|
};
|
|
344
|
-
if (
|
|
345
|
-
if (
|
|
356
|
+
if (I === 0)
|
|
357
|
+
if (p === "other") {
|
|
346
358
|
const b = B.categoryData.find((j) => j.guid === "other");
|
|
347
359
|
_({
|
|
348
360
|
...D,
|
|
349
|
-
custom: (j) => !!b?.categoryTotals?.find((
|
|
361
|
+
custom: (j) => !!b?.categoryTotals?.find((ft) => ft.guid === j.top_level_category_guid)
|
|
350
362
|
});
|
|
351
363
|
} else
|
|
352
364
|
_({
|
|
353
365
|
...D,
|
|
354
|
-
custom: (b) =>
|
|
355
|
-
showSplits: !!
|
|
366
|
+
custom: (b) => p ? b.top_level_category_guid === p : b.top_level_category_guid !== L.INCOME && b.top_level_category_guid !== L.INVESTMENTS && b.top_level_category_guid !== L.TRANSFER,
|
|
367
|
+
showSplits: !!p
|
|
356
368
|
});
|
|
357
369
|
else
|
|
358
370
|
_({
|
|
359
371
|
...D,
|
|
360
|
-
custom: (b) =>
|
|
372
|
+
custom: (b) => p ? b.category_guid === p : b.category_guid === L.INCOME || b.top_level_category_guid === L.INCOME
|
|
361
373
|
});
|
|
362
374
|
X(!0);
|
|
363
|
-
},
|
|
375
|
+
}, ht = () => {
|
|
364
376
|
xt(O, S);
|
|
365
377
|
};
|
|
366
|
-
return /* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ l(M, { children: [
|
|
379
|
+
/* @__PURE__ */ l(st, { onChange: mt, value: I, variant: "fullWidth", children: [
|
|
368
380
|
/* @__PURE__ */ t(
|
|
369
381
|
E,
|
|
370
382
|
{
|
|
@@ -372,7 +384,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
372
384
|
N,
|
|
373
385
|
{
|
|
374
386
|
amount: B.totalAmount,
|
|
375
|
-
label:
|
|
387
|
+
label: c.spend_tab_title
|
|
376
388
|
}
|
|
377
389
|
)
|
|
378
390
|
}
|
|
@@ -384,88 +396,88 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
|
|
|
384
396
|
N,
|
|
385
397
|
{
|
|
386
398
|
amount: Y.totalAmount,
|
|
387
|
-
label:
|
|
399
|
+
label: c.income_tab_title
|
|
388
400
|
}
|
|
389
401
|
)
|
|
390
402
|
}
|
|
391
403
|
)
|
|
392
404
|
] }),
|
|
393
|
-
|
|
405
|
+
I === 0 && /* @__PURE__ */ t(
|
|
394
406
|
at,
|
|
395
407
|
{
|
|
396
408
|
data: B,
|
|
397
409
|
onSelected: q,
|
|
398
410
|
onViewTransactions: J,
|
|
399
411
|
selectedId: $,
|
|
400
|
-
title:
|
|
412
|
+
title: c.spend_tab_title
|
|
401
413
|
}
|
|
402
414
|
),
|
|
403
|
-
|
|
415
|
+
I === 1 && /* @__PURE__ */ t(
|
|
404
416
|
at,
|
|
405
417
|
{
|
|
406
418
|
data: Y,
|
|
407
419
|
onSelected: q,
|
|
408
420
|
onViewTransactions: J,
|
|
409
421
|
selectedId: $,
|
|
410
|
-
title:
|
|
422
|
+
title: c.income_tab_title
|
|
411
423
|
}
|
|
412
424
|
),
|
|
413
425
|
/* @__PURE__ */ t(
|
|
414
426
|
nt,
|
|
415
427
|
{
|
|
416
|
-
ariaLabelClose:
|
|
417
|
-
isOpen:
|
|
428
|
+
ariaLabelClose: c.close_drawer_aria,
|
|
429
|
+
isOpen: ut,
|
|
418
430
|
onClose: () => X(!1),
|
|
419
|
-
title:
|
|
420
|
-
children: /* @__PURE__ */
|
|
421
|
-
!
|
|
431
|
+
title: c.transactions_drawer_title,
|
|
432
|
+
children: /* @__PURE__ */ l(C, { children: [
|
|
433
|
+
!d && f.length > 0 && /* @__PURE__ */ t(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
422
434
|
Tt,
|
|
423
435
|
{
|
|
424
|
-
onClick:
|
|
425
|
-
startIcon: /* @__PURE__ */ t(
|
|
436
|
+
onClick: ht,
|
|
437
|
+
startIcon: /* @__PURE__ */ t(_t, { name: "ios_share" }),
|
|
426
438
|
variant: "text",
|
|
427
439
|
children: m.export_csv_btn
|
|
428
440
|
}
|
|
429
441
|
) }),
|
|
430
|
-
/* @__PURE__ */ t(
|
|
442
|
+
/* @__PURE__ */ t(wt, { onClick: U })
|
|
431
443
|
] })
|
|
432
444
|
}
|
|
433
445
|
),
|
|
434
446
|
/* @__PURE__ */ t(
|
|
435
447
|
nt,
|
|
436
448
|
{
|
|
437
|
-
ariaLabelClose:
|
|
449
|
+
ariaLabelClose: c.close_drawer_aria,
|
|
438
450
|
isOpen: !!G,
|
|
439
451
|
onClose: () => U(""),
|
|
440
|
-
title:
|
|
441
|
-
children: G && /* @__PURE__ */ t(
|
|
452
|
+
title: c.transaction_details_drawer_title,
|
|
453
|
+
children: G && /* @__PURE__ */ t(vt, { transaction: G })
|
|
442
454
|
}
|
|
443
455
|
)
|
|
444
456
|
] });
|
|
445
457
|
}, Gt = x(Bt), jt = ({ onBackClick: e, sx: d = {} }) => {
|
|
446
|
-
const { visibleAccounts: o } = dt(), { spending:
|
|
447
|
-
|
|
458
|
+
const { visibleAccounts: o } = dt(), { spending: r } = w(), { isCopyLoaded: i, isInitialized: s, setDisplayedDate: n, setSelectedAccounts: u } = R(), { onEvent: c } = yt(), { clientConfig: m } = V(), g = m?.master?.deep_link_params?.date_range, [h, v] = a.useState(!1);
|
|
459
|
+
a.useEffect(() => {
|
|
448
460
|
u(o);
|
|
449
|
-
}, [o]),
|
|
450
|
-
|
|
461
|
+
}, [o]), a.useEffect(() => {
|
|
462
|
+
g && Array.isArray(g) && g.length === 2 ? n(g[0], g[1]) : n(it(Z()), rt(Z())), v(!0), c(ot.SPENDING_VIEW);
|
|
451
463
|
}, []);
|
|
452
464
|
const _ = (f) => {
|
|
453
465
|
n(f[0], f[1]);
|
|
454
466
|
};
|
|
455
|
-
return !
|
|
467
|
+
return !i || !s || !h ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
|
|
456
468
|
At,
|
|
457
469
|
{
|
|
458
470
|
accountOptions: o,
|
|
459
471
|
calendarActions: { onRangeChanged: _ },
|
|
460
|
-
onAccountsFilterClick: () =>
|
|
472
|
+
onAccountsFilterClick: () => c(ot.SPENDING_CLICK_FILTER),
|
|
461
473
|
onBackClick: e,
|
|
462
474
|
sx: d,
|
|
463
|
-
title:
|
|
475
|
+
title: r.title,
|
|
464
476
|
children: /* @__PURE__ */ t(M, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Gt, {}) })
|
|
465
477
|
}
|
|
466
478
|
);
|
|
467
|
-
},
|
|
479
|
+
}, Ce = x(jt);
|
|
468
480
|
export {
|
|
469
|
-
|
|
470
|
-
|
|
481
|
+
_e as SpendingMiniWidget,
|
|
482
|
+
Ce as SpendingWidget
|
|
471
483
|
};
|