@mx-cartographer/experiences 8.0.19 → 8.0.20
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 -4
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-B7zfcad7.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-DZpOoZQa.mjs} +1 -1
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-CmnaZDS6.mjs} +27 -27
- package/dist/{Help-DBAosGjO.mjs → Help-BkmSY96v.mjs} +1 -1
- package/dist/{ManageIncome-CvfRTf-j.mjs → ManageIncome-BJ7c7plg.mjs} +1 -1
- package/dist/{NotificationSettings-D7VqsrZy.mjs → NotificationSettings-DBT37CVB.mjs} +1 -1
- package/dist/{RecurringSettings-DJIUgK5A.mjs → RecurringSettings-DnD0AqWa.mjs} +1 -1
- package/dist/{SpendingLegend-BCnXkPCD.mjs → SpendingLegend-CypdabwS.mjs} +1 -1
- package/dist/{TransactionDetails-KklNHa-s.mjs → TransactionDetails-D6XZakc-.mjs} +1 -1
- package/dist/WidgetContainer-DYKMArWw.mjs +468 -0
- package/dist/accounts/index.es.js +95 -93
- package/dist/budgets/index.es.js +448 -444
- package/dist/cashflow/index.es.js +233 -231
- package/dist/common/components/GlobalAccountFilter.d.ts +2 -1
- package/dist/common/components/WidgetContainer.d.ts +2 -1
- package/dist/common/components/WidgetDateRangeSelector.d.ts +12 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetHeaderStyles.d.ts +32 -0
- package/dist/common/index.es.js +133 -132
- package/dist/core/types/Widgets.d.ts +1 -0
- package/dist/dashboard/index.es.js +3 -3
- package/dist/debts/components/actions/DebtsPriorityAction.d.ts +2 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
- package/dist/debts/index.es.js +589 -587
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +737 -745
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +439 -438
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/index.es.js +21 -12
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +418 -417
- package/dist/networth/index.es.js +265 -278
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +235 -232
- package/dist/settings/SettingsWidget.d.ts +1 -1
- package/dist/settings/index.es.js +283 -282
- package/dist/spending/index.es.js +109 -108
- package/dist/transactions/index.es.js +280 -277
- package/dist/trends/index.es.js +622 -615
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-CUcpY7aJ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-D-pbSa7L.mjs +0 -441
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as I } from "mobx-react-lite";
|
|
4
4
|
import { startOfMonth as ot } from "date-fns/startOfMonth";
|
|
5
5
|
import { endOfMonth as at } from "date-fns/endOfMonth";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import L from "@mui/material/Box";
|
|
7
|
+
import y from "@mui/material/Stack";
|
|
8
|
+
import $ from "@mui/material/Tab";
|
|
9
9
|
import it from "@mui/material/Tabs";
|
|
10
10
|
import _t from "@mui/material/styles/useTheme";
|
|
11
|
-
import { g as rt, a as st, S as
|
|
11
|
+
import { g as rt, a as st, S as O, b as Y } from "../SpendingLegend-CypdabwS.mjs";
|
|
12
12
|
import { Text as T, Icon as bt } from "@mxenabled/mxui";
|
|
13
|
-
import { f as
|
|
14
|
-
import { u as
|
|
13
|
+
import { f as N } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
14
|
+
import { u as A, l as W, d as lt, b as z, a as V, h as ct, g as yt } from "../hooks-BxkfR-Ff.mjs";
|
|
15
15
|
import { u as dt } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
16
16
|
import { L as gt } from "../Loader-D3rjKx72.mjs";
|
|
17
17
|
import { M as Ct } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
|
|
@@ -20,23 +20,23 @@ import St from "@mui/material/Button";
|
|
|
20
20
|
import { useTheme as Tt } from "@mui/material";
|
|
21
21
|
import { e as Mt } from "../exportTransactionsToCSV-DgdB3TBt.mjs";
|
|
22
22
|
import { T as Dt } from "../EmbeddedCard-xngm4vLT.mjs";
|
|
23
|
-
import { T as xt } from "../TransactionDetails-
|
|
23
|
+
import { T as xt } from "../TransactionDetails-D6XZakc-.mjs";
|
|
24
24
|
import vt from "@mui/material/Collapse";
|
|
25
25
|
import wt from "@mui/material/Divider";
|
|
26
26
|
import J from "@mui/material/List";
|
|
27
27
|
import Q from "@mui/material/ListItem";
|
|
28
28
|
import X from "@mui/material/ListItemButton";
|
|
29
|
-
import { u as Lt } from "../useScreenSize-
|
|
29
|
+
import { u as Lt } from "../useScreenSize-CUcpY7aJ.mjs";
|
|
30
30
|
import { D as Z } from "../Drawer-Bbe4AMB1.mjs";
|
|
31
|
-
import { b as
|
|
31
|
+
import { b as w } from "../Category-CevNQ03n.mjs";
|
|
32
32
|
import { parseISO as tt } from "date-fns/parseISO";
|
|
33
33
|
import { A as et } from "../Analytics-0Xm_BjHU.mjs";
|
|
34
|
-
import { W as It } from "../WidgetContainer-
|
|
35
|
-
const
|
|
34
|
+
import { W as It } from "../WidgetContainer-DYKMArWw.mjs";
|
|
35
|
+
const k = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
|
|
36
36
|
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
|
|
37
|
-
/* @__PURE__ */ t(T, { variant: "caption", children:
|
|
37
|
+
/* @__PURE__ */ t(T, { variant: "caption", children: N(n, o === "mini" ? "0,0" : "0,0.00") })
|
|
38
38
|
] }), At = () => {
|
|
39
|
-
const n = _t(), { goals: d, spending: o } =
|
|
39
|
+
const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } = W(), g = l.useMemo(
|
|
40
40
|
() => [
|
|
41
41
|
n.palette.chartMono.chartMono5,
|
|
42
42
|
n.palette.chartMono.chartMono4,
|
|
@@ -49,15 +49,15 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
49
49
|
), [e, r] = l.useState(""), [c, b] = l.useState(0), u = l.useMemo(
|
|
50
50
|
() => rt(a, d, n, i),
|
|
51
51
|
[a, i]
|
|
52
|
-
),
|
|
52
|
+
), h = l.useMemo(
|
|
53
53
|
() => st(a, i, g),
|
|
54
54
|
[a, i, g]
|
|
55
|
-
), M = (f,
|
|
56
|
-
b(
|
|
57
|
-
},
|
|
55
|
+
), M = (f, x) => {
|
|
56
|
+
b(x), r("");
|
|
57
|
+
}, _ = (f) => {
|
|
58
58
|
r(e === f ? "" : f);
|
|
59
59
|
};
|
|
60
|
-
return /* @__PURE__ */ p(
|
|
60
|
+
return /* @__PURE__ */ p(L, { width: "100%", children: [
|
|
61
61
|
/* @__PURE__ */ p(
|
|
62
62
|
it,
|
|
63
63
|
{
|
|
@@ -67,12 +67,12 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
67
67
|
variant: "fullWidth",
|
|
68
68
|
children: [
|
|
69
69
|
/* @__PURE__ */ t(
|
|
70
|
-
|
|
70
|
+
$,
|
|
71
71
|
{
|
|
72
72
|
"aria-controls": "spending-tabpanel",
|
|
73
73
|
id: "spending-tab",
|
|
74
74
|
label: /* @__PURE__ */ t(
|
|
75
|
-
|
|
75
|
+
k,
|
|
76
76
|
{
|
|
77
77
|
amount: u.totalAmount,
|
|
78
78
|
label: o.spend_tab_title,
|
|
@@ -83,14 +83,14 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
/* @__PURE__ */ t(
|
|
86
|
-
|
|
86
|
+
$,
|
|
87
87
|
{
|
|
88
88
|
"aria-controls": "income-tabpanel",
|
|
89
89
|
id: "income-tab",
|
|
90
90
|
label: /* @__PURE__ */ t(
|
|
91
|
-
|
|
91
|
+
k,
|
|
92
92
|
{
|
|
93
|
-
amount:
|
|
93
|
+
amount: h.totalAmount,
|
|
94
94
|
label: o.income_tab_title,
|
|
95
95
|
variant: "mini"
|
|
96
96
|
}
|
|
@@ -102,51 +102,51 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
102
102
|
}
|
|
103
103
|
),
|
|
104
104
|
/* @__PURE__ */ t(
|
|
105
|
-
|
|
105
|
+
L,
|
|
106
106
|
{
|
|
107
107
|
"aria-labelledby": "spending-tab",
|
|
108
108
|
hidden: c !== 0,
|
|
109
109
|
id: "spending-tabpanel",
|
|
110
110
|
role: "tabpanel",
|
|
111
|
-
children: /* @__PURE__ */ p(
|
|
111
|
+
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
112
112
|
/* @__PURE__ */ t(
|
|
113
|
-
|
|
113
|
+
O,
|
|
114
114
|
{
|
|
115
115
|
data: u,
|
|
116
|
-
onSelected:
|
|
116
|
+
onSelected: _,
|
|
117
117
|
selectedId: e,
|
|
118
118
|
totalLabel: o.total_spending
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
|
-
/* @__PURE__ */ t(Y, { data: u, onSelected:
|
|
121
|
+
/* @__PURE__ */ t(Y, { data: u, onSelected: _, selectedId: e })
|
|
122
122
|
] })
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
125
|
/* @__PURE__ */ t(
|
|
126
|
-
|
|
126
|
+
L,
|
|
127
127
|
{
|
|
128
128
|
"aria-labelledby": "income-tab",
|
|
129
129
|
hidden: c !== 1,
|
|
130
130
|
id: "income-tabpanel",
|
|
131
131
|
role: "tabpanel",
|
|
132
|
-
children: /* @__PURE__ */ p(
|
|
132
|
+
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
133
133
|
/* @__PURE__ */ t(
|
|
134
|
-
|
|
134
|
+
O,
|
|
135
135
|
{
|
|
136
|
-
data:
|
|
136
|
+
data: h,
|
|
137
137
|
isIncome: !0,
|
|
138
|
-
onSelected:
|
|
138
|
+
onSelected: _,
|
|
139
139
|
selectedId: e,
|
|
140
140
|
totalLabel: o.total_income
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
|
-
/* @__PURE__ */ t(Y, { data:
|
|
143
|
+
/* @__PURE__ */ t(Y, { data: h, onSelected: _, selectedId: e })
|
|
144
144
|
] })
|
|
145
145
|
}
|
|
146
146
|
)
|
|
147
147
|
] });
|
|
148
|
-
}, Et =
|
|
149
|
-
const { isAccountDataLoaded: o, loadAccountData: a } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } =
|
|
148
|
+
}, Et = I(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
149
|
+
const { isAccountDataLoaded: o, loadAccountData: a } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = W(), { spending: c } = A(), { isInitialized: b, selectedAccounts: u } = z();
|
|
150
150
|
return dt({
|
|
151
151
|
widgetName: "SpendingMiniWidget",
|
|
152
152
|
isLoaded: i
|
|
@@ -170,14 +170,14 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
170
170
|
children: /* @__PURE__ */ t(Et, {})
|
|
171
171
|
}
|
|
172
172
|
) : /* @__PURE__ */ t(gt, {});
|
|
173
|
-
}, Ce =
|
|
173
|
+
}, Ce = I(Wt), Rt = ({
|
|
174
174
|
data: n,
|
|
175
175
|
onSelected: d,
|
|
176
176
|
selectedId: o = "",
|
|
177
177
|
title: a
|
|
178
178
|
}) => {
|
|
179
|
-
const { spending: i } =
|
|
180
|
-
return /* @__PURE__ */ p(
|
|
179
|
+
const { spending: i } = A(), g = n.categoryData.find((e) => e.guid === o);
|
|
180
|
+
return /* @__PURE__ */ p(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
181
181
|
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${a} ${i.by_category}` }),
|
|
182
182
|
/* @__PURE__ */ t(wt, { "aria-hidden": "true" }),
|
|
183
183
|
/* @__PURE__ */ t(J, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ p(l.Fragment, { children: [
|
|
@@ -200,7 +200,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
200
200
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
201
201
|
children: [
|
|
202
202
|
/* @__PURE__ */ t(
|
|
203
|
-
|
|
203
|
+
L,
|
|
204
204
|
{
|
|
205
205
|
"aria-hidden": "true",
|
|
206
206
|
borderRadius: 4,
|
|
@@ -212,7 +212,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
212
212
|
}
|
|
213
213
|
),
|
|
214
214
|
/* @__PURE__ */ p(
|
|
215
|
-
|
|
215
|
+
y,
|
|
216
216
|
{
|
|
217
217
|
alignItems: "center",
|
|
218
218
|
direction: "row",
|
|
@@ -220,7 +220,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
220
220
|
width: "100%",
|
|
221
221
|
children: [
|
|
222
222
|
/* @__PURE__ */ t(T, { bold: o === e.guid, children: e.name }),
|
|
223
|
-
/* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children:
|
|
223
|
+
/* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: N(e.amount, "0,0.00") })
|
|
224
224
|
]
|
|
225
225
|
}
|
|
226
226
|
)
|
|
@@ -242,12 +242,12 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
242
242
|
id: `spending-list-subcategory-${r.guid}`,
|
|
243
243
|
onClick: () => d(r.guid, !0),
|
|
244
244
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
245
|
-
children: /* @__PURE__ */ p(
|
|
245
|
+
children: /* @__PURE__ */ p(y, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
246
246
|
/* @__PURE__ */ p(T, { children: [
|
|
247
247
|
r.name,
|
|
248
248
|
" "
|
|
249
249
|
] }),
|
|
250
|
-
/* @__PURE__ */ t(T, { children:
|
|
250
|
+
/* @__PURE__ */ t(T, { children: N(r.amount, "0,0.00") })
|
|
251
251
|
] })
|
|
252
252
|
}
|
|
253
253
|
)
|
|
@@ -255,18 +255,18 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
255
255
|
r.guid
|
|
256
256
|
)) }) })
|
|
257
257
|
] }, e.guid)) }),
|
|
258
|
-
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${
|
|
258
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${N(n.totalAmount, "0,0.00")}` })
|
|
259
259
|
] });
|
|
260
|
-
}, Nt =
|
|
260
|
+
}, Nt = I(Rt), $t = ({
|
|
261
261
|
data: n,
|
|
262
262
|
onSelected: d,
|
|
263
263
|
onViewTransactions: o,
|
|
264
264
|
selectedId: a,
|
|
265
265
|
title: i
|
|
266
266
|
}) => {
|
|
267
|
-
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } =
|
|
267
|
+
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = W(), { spending: c } = A();
|
|
268
268
|
return /* @__PURE__ */ p(
|
|
269
|
-
|
|
269
|
+
y,
|
|
270
270
|
{
|
|
271
271
|
alignItems: e ? "center" : "flex-start",
|
|
272
272
|
direction: e ? "column" : "row",
|
|
@@ -276,7 +276,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
276
276
|
px: 8,
|
|
277
277
|
children: [
|
|
278
278
|
r && /* @__PURE__ */ t(
|
|
279
|
-
|
|
279
|
+
O,
|
|
280
280
|
{
|
|
281
281
|
data: {
|
|
282
282
|
categoryData: [],
|
|
@@ -292,11 +292,11 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
292
292
|
}
|
|
293
293
|
),
|
|
294
294
|
!r && /* @__PURE__ */ t(
|
|
295
|
-
|
|
295
|
+
O,
|
|
296
296
|
{
|
|
297
297
|
data: n,
|
|
298
|
-
onSelected: (
|
|
299
|
-
d(
|
|
298
|
+
onSelected: (h) => {
|
|
299
|
+
d(h), setTimeout(() => document.getElementById(`spending-list-category-${h}`)?.focus(), 0);
|
|
300
300
|
},
|
|
301
301
|
onViewTransactions: o,
|
|
302
302
|
selectedId: a,
|
|
@@ -309,7 +309,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
309
309
|
]
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
|
-
}, nt =
|
|
312
|
+
}, nt = I($t), Ot = (n) => [
|
|
313
313
|
n.palette.chartMono.chartMono5,
|
|
314
314
|
n.palette.chartMono.chartMono4,
|
|
315
315
|
n.palette.chartMono.chartMono3,
|
|
@@ -317,83 +317,83 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
317
317
|
n.palette.chartMono.chartMono1,
|
|
318
318
|
n.palette.chartMono.chartMono6
|
|
319
319
|
], kt = () => {
|
|
320
|
-
const n = Tt(), { is_mobile_webview: d } =
|
|
320
|
+
const n = Tt(), { is_mobile_webview: d } = V(), { clientConfig: o } = V(), { categories: a, dateRangeCategoryTotals: i } = W(), {
|
|
321
321
|
goals: g,
|
|
322
322
|
spending: e,
|
|
323
323
|
transactions: r
|
|
324
|
-
} =
|
|
324
|
+
} = A(), { displayedDateRange: c, selectedAccountGuids: b } = z(), {
|
|
325
325
|
setFilter: u,
|
|
326
|
-
sortedTransactions:
|
|
326
|
+
sortedTransactions: h,
|
|
327
327
|
sortedTransactionsWithSplits: M,
|
|
328
|
-
tags:
|
|
329
|
-
} = ct(), f = o?.master?.deep_link_params?.account_guids,
|
|
328
|
+
tags: _
|
|
329
|
+
} = ct(), f = o?.master?.deep_link_params?.account_guids, x = o?.master?.deep_link_params?.view, [D, R] = l.useState(""), [v, C] = l.useState(x === "income" ? 1 : 0), [E, H] = l.useState(""), [pt, B] = l.useState(!1), G = l.useMemo(
|
|
330
330
|
() => rt(a, g, n, i),
|
|
331
331
|
[a, i]
|
|
332
332
|
), P = l.useMemo(
|
|
333
333
|
() => st(a, i, Ot(n)),
|
|
334
334
|
[a, i]
|
|
335
|
-
),
|
|
336
|
-
() =>
|
|
337
|
-
[
|
|
335
|
+
), j = l.useMemo(
|
|
336
|
+
() => h.find((s) => s.guid === E),
|
|
337
|
+
[E, h]
|
|
338
338
|
), ut = (s, S) => {
|
|
339
|
-
|
|
339
|
+
C(S), R("");
|
|
340
340
|
}, K = (s, S = !1) => {
|
|
341
|
-
S ? mt(s) :
|
|
341
|
+
S ? mt(s) : R(D === s || s === "0" ? "" : s);
|
|
342
342
|
}, mt = (s) => {
|
|
343
343
|
u({
|
|
344
344
|
...{
|
|
345
345
|
accounts: f || b,
|
|
346
346
|
dateRange: c
|
|
347
347
|
},
|
|
348
|
-
custom: (
|
|
348
|
+
custom: (m) => D === "other" ? m.top_level_category_guid === s : m.category_guid === s,
|
|
349
349
|
showSplits: !0
|
|
350
|
-
}),
|
|
350
|
+
}), B(!0);
|
|
351
351
|
}, U = (s) => {
|
|
352
352
|
const S = {
|
|
353
353
|
accounts: f || b,
|
|
354
354
|
dateRange: c
|
|
355
355
|
};
|
|
356
|
-
if (
|
|
356
|
+
if (v === 0)
|
|
357
357
|
if (s === "other") {
|
|
358
|
-
const
|
|
358
|
+
const m = G.categoryData.find((F) => F.guid === "other");
|
|
359
359
|
u({
|
|
360
360
|
...S,
|
|
361
|
-
custom: (
|
|
361
|
+
custom: (F) => !!m?.categoryTotals?.find((ft) => ft.guid === F.top_level_category_guid)
|
|
362
362
|
});
|
|
363
363
|
} else
|
|
364
364
|
u({
|
|
365
365
|
...S,
|
|
366
|
-
custom: (
|
|
366
|
+
custom: (m) => s ? m.top_level_category_guid === s : m.top_level_category_guid !== w.INCOME && m.category_guid !== w.INCOME && m.top_level_category_guid !== w.INVESTMENTS && m.top_level_category_guid !== w.TRANSFER,
|
|
367
367
|
showSplits: !!s
|
|
368
368
|
});
|
|
369
369
|
else
|
|
370
370
|
u({
|
|
371
371
|
...S,
|
|
372
|
-
custom: (
|
|
372
|
+
custom: (m) => s ? m.category_guid === s : m.category_guid === w.INCOME || m.top_level_category_guid === w.INCOME
|
|
373
373
|
});
|
|
374
|
-
|
|
374
|
+
B(!0);
|
|
375
375
|
}, ht = () => {
|
|
376
|
-
Mt(M,
|
|
376
|
+
Mt(M, _);
|
|
377
377
|
};
|
|
378
|
-
return /* @__PURE__ */ p(
|
|
379
|
-
/* @__PURE__ */ p(it, { onChange: ut, value:
|
|
378
|
+
return /* @__PURE__ */ p(L, { children: [
|
|
379
|
+
/* @__PURE__ */ p(it, { onChange: ut, value: v, variant: "fullWidth", children: [
|
|
380
380
|
/* @__PURE__ */ t(
|
|
381
|
-
|
|
381
|
+
$,
|
|
382
382
|
{
|
|
383
383
|
label: /* @__PURE__ */ t(
|
|
384
|
-
|
|
384
|
+
k,
|
|
385
385
|
{
|
|
386
|
-
amount:
|
|
386
|
+
amount: G.totalAmount,
|
|
387
387
|
label: e.spend_tab_title
|
|
388
388
|
}
|
|
389
389
|
)
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
392
|
/* @__PURE__ */ t(
|
|
393
|
-
|
|
393
|
+
$,
|
|
394
394
|
{
|
|
395
395
|
label: /* @__PURE__ */ t(
|
|
396
|
-
|
|
396
|
+
k,
|
|
397
397
|
{
|
|
398
398
|
amount: P.totalAmount,
|
|
399
399
|
label: e.income_tab_title
|
|
@@ -402,23 +402,23 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
] }),
|
|
405
|
-
|
|
405
|
+
v === 0 && /* @__PURE__ */ t(
|
|
406
406
|
nt,
|
|
407
407
|
{
|
|
408
|
-
data:
|
|
408
|
+
data: G,
|
|
409
409
|
onSelected: K,
|
|
410
410
|
onViewTransactions: U,
|
|
411
|
-
selectedId:
|
|
411
|
+
selectedId: D,
|
|
412
412
|
title: e.spend_tab_title
|
|
413
413
|
}
|
|
414
414
|
),
|
|
415
|
-
|
|
415
|
+
v === 1 && /* @__PURE__ */ t(
|
|
416
416
|
nt,
|
|
417
417
|
{
|
|
418
418
|
data: P,
|
|
419
419
|
onSelected: K,
|
|
420
420
|
onViewTransactions: U,
|
|
421
|
-
selectedId:
|
|
421
|
+
selectedId: D,
|
|
422
422
|
title: e.income_tab_title
|
|
423
423
|
}
|
|
424
424
|
),
|
|
@@ -427,10 +427,10 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
427
427
|
{
|
|
428
428
|
ariaLabelClose: e.close_drawer_aria,
|
|
429
429
|
isOpen: pt,
|
|
430
|
-
onClose: () =>
|
|
430
|
+
onClose: () => B(!1),
|
|
431
431
|
title: e.transactions_drawer_title,
|
|
432
|
-
children: /* @__PURE__ */ p(
|
|
433
|
-
!d &&
|
|
432
|
+
children: /* @__PURE__ */ p(y, { children: [
|
|
433
|
+
!d && h.length > 0 && /* @__PURE__ */ t(y, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
434
434
|
St,
|
|
435
435
|
{
|
|
436
436
|
onClick: ht,
|
|
@@ -447,43 +447,44 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
|
|
|
447
447
|
Z,
|
|
448
448
|
{
|
|
449
449
|
ariaLabelClose: e.close_drawer_aria,
|
|
450
|
-
isOpen: !!
|
|
450
|
+
isOpen: !!j,
|
|
451
451
|
onClose: () => H(""),
|
|
452
452
|
title: e.transaction_details_drawer_title,
|
|
453
|
-
children:
|
|
453
|
+
children: j && /* @__PURE__ */ t(xt, { transaction: j })
|
|
454
454
|
}
|
|
455
455
|
)
|
|
456
456
|
] });
|
|
457
|
-
}, Bt =
|
|
458
|
-
const { isAccountDataLoaded:
|
|
457
|
+
}, Bt = I(kt), Gt = ({ onBackClick: n, onMenuClick: d, sx: o = {} }) => {
|
|
458
|
+
const { isAccountDataLoaded: a, loadAccountData: i } = lt(), { categoriesLoaded: g, dateRangeTotalsLoaded: e, loadCategories: r, loadDateRangeCategoryTotals: c } = W(), { isTransactionDataLoaded: b, loadTransactionData: u } = ct(), { spending: h } = A(), { displayedDateRange: M, isInitialized: _, setDisplayedDate: f, selectedAccounts: x } = z(), { onEvent: D } = yt(), { clientConfig: R } = V();
|
|
459
459
|
dt({
|
|
460
460
|
widgetName: "SpendingWidget",
|
|
461
|
-
isLoaded:
|
|
461
|
+
isLoaded: e
|
|
462
462
|
}), l.useEffect(() => {
|
|
463
|
-
const
|
|
464
|
-
|
|
463
|
+
const C = R?.master?.deep_link_params, E = C?.date_range ? [tt(C.date_range.from), tt(C.date_range.to)] : [ot(q()), at(q())];
|
|
464
|
+
f(E[0], E[1]), a || i().finally(), g || r().finally(), b || u().finally(), D(et.SPENDING_VIEW);
|
|
465
465
|
}, []), l.useEffect(() => {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
466
|
+
_ && c(
|
|
467
|
+
x,
|
|
468
|
+
M.start,
|
|
469
|
+
M.end
|
|
470
470
|
).finally();
|
|
471
|
-
}, [
|
|
472
|
-
const
|
|
473
|
-
|
|
471
|
+
}, [M, _, x]);
|
|
472
|
+
const v = (C) => {
|
|
473
|
+
f(C[0], C[1]);
|
|
474
474
|
};
|
|
475
|
-
return
|
|
475
|
+
return _ ? /* @__PURE__ */ t(
|
|
476
476
|
It,
|
|
477
477
|
{
|
|
478
|
-
calendarActions: { onRangeChanged:
|
|
478
|
+
calendarActions: { onRangeChanged: v },
|
|
479
479
|
onAccountsFilterClick: () => D(et.SPENDING_CLICK_FILTER),
|
|
480
480
|
onBackClick: n,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
481
|
+
onMenuClick: d,
|
|
482
|
+
sx: o,
|
|
483
|
+
title: h.title,
|
|
484
|
+
children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
484
485
|
}
|
|
485
486
|
) : /* @__PURE__ */ t(gt, {});
|
|
486
|
-
}, Se =
|
|
487
|
+
}, Se = I(Gt);
|
|
487
488
|
export {
|
|
488
489
|
Ce as SpendingMiniWidget,
|
|
489
490
|
Se as SpendingWidget
|