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