@mx-cartographer/experiences 7.0.65 → 7.0.66-alpha.mega1
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/trends/index.es.js +147 -147
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/trends/index.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as e, jsxs as C, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as C, Fragment as Qe } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { observer as v } from "mobx-react-lite";
|
|
4
|
-
import { Icon as ae, Text as Q, CategoryIcon as fe, P as X, H3 as xe, ChevronRightIcon as
|
|
4
|
+
import { Icon as ae, Text as Q, CategoryIcon as fe, P as X, H3 as xe, ChevronRightIcon as qe } from "@mxenabled/mxui";
|
|
5
5
|
import W from "@mui/material/Box";
|
|
6
6
|
import _ from "@mui/material/Stack";
|
|
7
7
|
import me from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as ve } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as pe } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { a as
|
|
10
|
+
import { a as Je, g as et, S as tt, L as Me } from "../TrendsStore-ZZ8X36lJ.mjs";
|
|
11
11
|
import { T as mo } from "../TrendsStore-ZZ8X36lJ.mjs";
|
|
12
|
-
import { i as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { u as R, m as
|
|
12
|
+
import { i as nt, c as ot, d as st, e as rt, f as at, h as it, b as Ae, g as Re, j as De } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
|
+
import ct from "@mui/material/ToggleButton";
|
|
14
|
+
import lt from "@mui/material/ToggleButtonGroup";
|
|
15
|
+
import { u as R, m as P, g as N, b as ee, h as ie, d as ce, v as te, f as Te, p as dt, a as ht } from "../hooks-CE2TKk4a.mjs";
|
|
16
16
|
import { u as $ } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
17
|
import { f as q, D as z } from "../Dialog-CWW597AF.mjs";
|
|
18
|
-
import { DataGridPro as
|
|
19
|
-
import { C as
|
|
20
|
-
import {
|
|
21
|
-
import { b as pt } from "../Localization-2MODESHW.mjs";
|
|
18
|
+
import { DataGridPro as ut } from "@mui/x-data-grid-pro";
|
|
19
|
+
import { C as gt } from "../CurrencyText-kyC1aseI.mjs";
|
|
20
|
+
import { b as mt } from "../Localization-2MODESHW.mjs";
|
|
22
21
|
import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
|
-
import { T as A, b as
|
|
24
|
-
import { A as y, W as
|
|
25
|
-
import {
|
|
22
|
+
import { T as A, b as pt } from "../ViewMoreMicroCard-BAz2NyEO.mjs";
|
|
23
|
+
import { A as y, W as ke } from "../WidgetContainer-B8MRJ5Y1.mjs";
|
|
24
|
+
import { c as Ct } from "../Category-CevNQ03n.mjs";
|
|
25
|
+
import { a as Ne, T as He } from "../TransactionDetails-B2Z5S7FM.mjs";
|
|
26
26
|
import { D as Ce } from "../Drawer-kEE73B87.mjs";
|
|
27
27
|
import { L as J } from "../Loader-DUaFpDGv.mjs";
|
|
28
|
-
import { useTheme as
|
|
28
|
+
import { useTheme as We } from "@mui/material/styles";
|
|
29
29
|
import { L as ye } from "../LineChart-B35qvXik.mjs";
|
|
30
30
|
import { M as ft } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
31
31
|
import { subMonths as Tt } from "date-fns";
|
|
@@ -38,7 +38,7 @@ import xt from "@mui/material/ListItem";
|
|
|
38
38
|
import vt from "@mui/material/ListItemButton";
|
|
39
39
|
import Mt from "@mui/material/ListItemIcon";
|
|
40
40
|
import At from "@mui/material/ListItemText";
|
|
41
|
-
import
|
|
41
|
+
import Oe from "@mui/material/styles/useTheme";
|
|
42
42
|
import Rt from "@mui/material/Divider";
|
|
43
43
|
import { useTheme as kt, Stack as Nt } from "@mui/material";
|
|
44
44
|
import Ht from "@mui/material/Paper";
|
|
@@ -47,17 +47,17 @@ import { E as Ot } from "../ExportCsvAction-CBJAfyAw.mjs";
|
|
|
47
47
|
import { u as Vt } from "../useInsightsEnabled-DSnpkUq0.mjs";
|
|
48
48
|
import { E as Gt } from "../EmptyState-DA_lfRBv.mjs";
|
|
49
49
|
import { k as Bt } from "../ConnectDrawer-DJA_S-rX.mjs";
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
51
|
+
lt,
|
|
52
52
|
{
|
|
53
53
|
exclusive: !0,
|
|
54
54
|
onChange: o,
|
|
55
55
|
orientation: "horizontal",
|
|
56
56
|
value: t,
|
|
57
|
-
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(
|
|
57
|
+
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(ct, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(ae, { name: "table_chart_view" }) : /* @__PURE__ */ e(ae, { name: "format_list_bulleted" }) }, n))
|
|
58
58
|
}
|
|
59
|
-
),
|
|
60
|
-
const { trends: n } = R(), { isMobile: s, isDesktop:
|
|
59
|
+
), Ge = ({ selectedDateRange: t, selectedCategoryGuid: o }) => {
|
|
60
|
+
const { trends: n } = R(), { isMobile: s, isDesktop: r } = $(), { getCategoryName: h } = P(), u = i.useMemo(() => {
|
|
61
61
|
const d = q(
|
|
62
62
|
t.start,
|
|
63
63
|
s ? z.MONTH_SHORT_YEAR : z.MONTH_YEAR
|
|
@@ -78,27 +78,27 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
78
78
|
overflow: "visible",
|
|
79
79
|
textOverflow: "unset"
|
|
80
80
|
},
|
|
81
|
-
variant:
|
|
81
|
+
variant: r ? "H3" : "Body",
|
|
82
82
|
children: h(o) || n.sub_title
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
/* @__PURE__ */ e(Q, { variant:
|
|
85
|
+
/* @__PURE__ */ e(Q, { variant: r ? "Body" : "Small", children: u })
|
|
86
86
|
] });
|
|
87
87
|
}, zt = (t) => {
|
|
88
88
|
const o = t.row[t.field];
|
|
89
|
-
return /* @__PURE__ */ e(_, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
|
|
89
|
+
return /* @__PURE__ */ e(_, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(gt, { amount: o, variant: "Small" }) });
|
|
90
90
|
}, Pt = ({ categoryGuid: t, topLevelCategoryGuid: o }) => {
|
|
91
|
-
const {
|
|
91
|
+
const { getCategoryName: n } = P(), { categories: s } = R(), r = s.default_categories[t]?.replace(/&/g, "&") ?? n(t);
|
|
92
92
|
return /* @__PURE__ */ C(_, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
93
93
|
/* @__PURE__ */ e(
|
|
94
94
|
W,
|
|
95
95
|
{
|
|
96
|
-
"aria-label":
|
|
96
|
+
"aria-label": mt(s.category_icon_label_aria, r),
|
|
97
97
|
role: "img",
|
|
98
98
|
children: /* @__PURE__ */ e(fe, { categoryGuid: o })
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
/* @__PURE__ */ e(Q, { sx: { ml: 12, pb: 6 }, variant: "Small", children:
|
|
101
|
+
/* @__PURE__ */ e(Q, { sx: { ml: 12, pb: 6 }, variant: "Small", children: r })
|
|
102
102
|
] });
|
|
103
103
|
}, Ft = (t) => /* @__PURE__ */ e(_, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
|
|
104
104
|
Pt,
|
|
@@ -109,16 +109,16 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
109
109
|
) }), Kt = (t, o) => {
|
|
110
110
|
const n = [], s = new Date(t);
|
|
111
111
|
for (; s <= o; ) {
|
|
112
|
-
const
|
|
113
|
-
n.push(
|
|
112
|
+
const r = q(s, z.MONTH);
|
|
113
|
+
n.push(r), s.setMonth(s.getMonth() + 1);
|
|
114
114
|
}
|
|
115
115
|
return n;
|
|
116
|
-
},
|
|
116
|
+
}, Be = ({
|
|
117
117
|
monthlyCategoryTotals: t,
|
|
118
118
|
selectedDateRange: o,
|
|
119
119
|
selectedCategory: n,
|
|
120
120
|
onClickRow: s,
|
|
121
|
-
height:
|
|
121
|
+
height: r = "100dvh",
|
|
122
122
|
sx: h = {}
|
|
123
123
|
}) => {
|
|
124
124
|
const { onEvent: u } = N(), d = q(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [l, m] = i.useState([
|
|
@@ -135,10 +135,10 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
135
135
|
type: "string"
|
|
136
136
|
},
|
|
137
137
|
...f.map(
|
|
138
|
-
(
|
|
139
|
-
field:
|
|
138
|
+
(a) => ({
|
|
139
|
+
field: a,
|
|
140
140
|
flex: 1,
|
|
141
|
-
headerName:
|
|
141
|
+
headerName: a,
|
|
142
142
|
minWidth: 100,
|
|
143
143
|
renderHeader: Ie,
|
|
144
144
|
renderCell: zt,
|
|
@@ -147,15 +147,15 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
147
147
|
sortable: !0,
|
|
148
148
|
hideSortIcons: !1,
|
|
149
149
|
type: "number",
|
|
150
|
-
sortComparator:
|
|
150
|
+
sortComparator: Je
|
|
151
151
|
})
|
|
152
152
|
)
|
|
153
153
|
], b = i.useMemo(() => {
|
|
154
|
-
const
|
|
155
|
-
(p) => !
|
|
156
|
-
), T = (n ?
|
|
154
|
+
const a = t.filter(
|
|
155
|
+
(p) => !nt(p) && !ot(p)
|
|
156
|
+
), T = (n ? a.filter(
|
|
157
157
|
(p) => p.category_guid === n || p.top_level_category_guid === n
|
|
158
|
-
) :
|
|
158
|
+
) : a).reduce(
|
|
159
159
|
(p, D) => {
|
|
160
160
|
const { category_guid: w, top_level_category_guid: I, month: k, total: E, year: O } = D, M = n ? w : I;
|
|
161
161
|
p[M] || (p[M] = {
|
|
@@ -171,22 +171,22 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
171
171
|
);
|
|
172
172
|
return Object.values(T);
|
|
173
173
|
}, [t, n]);
|
|
174
|
-
return /* @__PURE__ */ e(W, { sx: { height:
|
|
175
|
-
|
|
174
|
+
return /* @__PURE__ */ e(W, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...h }, children: /* @__PURE__ */ e(
|
|
175
|
+
ut,
|
|
176
176
|
{
|
|
177
177
|
columns: c,
|
|
178
178
|
disableColumnFilter: !0,
|
|
179
179
|
disableColumnMenu: !0,
|
|
180
180
|
hideFooter: !0,
|
|
181
181
|
initialState: { sorting: { sortModel: l } },
|
|
182
|
-
onRowClick: (
|
|
183
|
-
s?.(
|
|
182
|
+
onRowClick: (a) => {
|
|
183
|
+
s?.(a.row.category), u(y.TRENDS_CLICK_LIST_ITEM, {
|
|
184
184
|
...A,
|
|
185
|
-
listItem:
|
|
185
|
+
listItem: Ct[a.row.category]
|
|
186
186
|
});
|
|
187
187
|
},
|
|
188
|
-
onSortModelChange: (
|
|
189
|
-
m(
|
|
188
|
+
onSortModelChange: (a) => {
|
|
189
|
+
m(a), u(y.TRENDS_CLICK_TABLE_SORT, A);
|
|
190
190
|
},
|
|
191
191
|
rows: b,
|
|
192
192
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
@@ -202,18 +202,18 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
202
202
|
isOpen: n,
|
|
203
203
|
onClose: s
|
|
204
204
|
}) => {
|
|
205
|
-
const { onEvent:
|
|
206
|
-
() => l.find((
|
|
205
|
+
const { onEvent: r } = N(), { selectedAccountGuids: h } = ee(), { common: u } = R(), { setFilter: d, sortedTransactions: l } = ie(), [m, f] = i.useState(""), c = i.useMemo(
|
|
206
|
+
() => l.find((a) => a.guid === m),
|
|
207
207
|
[m, l]
|
|
208
208
|
);
|
|
209
209
|
i.useEffect(() => {
|
|
210
210
|
d({
|
|
211
211
|
accounts: h,
|
|
212
212
|
dateRange: o,
|
|
213
|
-
custom: (
|
|
213
|
+
custom: (a) => t === "" || t === a.category_guid || t === a.top_level_category_guid,
|
|
214
214
|
showSplits: !!t
|
|
215
215
|
});
|
|
216
|
-
}, [h, t, o]), i.useEffect(() =>
|
|
216
|
+
}, [h, t, o]), i.useEffect(() => r(y.TRENDS_VIEW_TRANSACTIONS), []);
|
|
217
217
|
const b = () => {
|
|
218
218
|
f(""), s();
|
|
219
219
|
};
|
|
@@ -225,13 +225,13 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
225
225
|
onClose: b,
|
|
226
226
|
title: $t.title,
|
|
227
227
|
children: [
|
|
228
|
-
c && /* @__PURE__ */ e(
|
|
229
|
-
!c && /* @__PURE__ */ e(
|
|
228
|
+
c && /* @__PURE__ */ e(Ne, { transaction: c }),
|
|
229
|
+
!c && /* @__PURE__ */ e(He, { onClick: f })
|
|
230
230
|
]
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
}, Yt = v(jt), Ut = ({ onBackClick: t, sx: o }) => {
|
|
234
|
-
const { onEvent: n } = N(), { isDesktop: s, isTablet:
|
|
234
|
+
const { onEvent: n } = N(), { isDesktop: s, isTablet: r, isMobile: h } = $(), { visibleAccounts: u } = ce(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: l, getCategoryName: m } = P(), { sortedTransactions: f } = ie(), { selectedDateRange: c, setSelectedDateRange: b } = te(), { isCopyLoaded: a, isInitialized: g, selectedAccounts: T, setSelectedAccounts: p } = ee(), { trends: D } = R(), [w, I] = i.useState(!1), [k, E] = i.useState(!1), [O, M] = i.useState("Chart"), [L, F] = i.useState(""), [G, le] = i.useState(window.innerHeight), j = G - (h ? 315 : 345);
|
|
235
235
|
i.useEffect(() => {
|
|
236
236
|
const S = () => le(window.innerHeight);
|
|
237
237
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
@@ -248,18 +248,18 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
248
248
|
}, [g, T, c]);
|
|
249
249
|
const ne = i.useMemo(() => {
|
|
250
250
|
if (!w) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
251
|
-
const S =
|
|
251
|
+
const S = et(
|
|
252
252
|
l,
|
|
253
253
|
c.start,
|
|
254
254
|
c.end
|
|
255
255
|
), H = L.length ? S.filter(
|
|
256
256
|
(B) => B.top_level_category_guid === L || B.category_guid === L
|
|
257
|
-
) :
|
|
257
|
+
) : st(S);
|
|
258
258
|
return {
|
|
259
|
-
stackedDatasets: H.filter(
|
|
260
|
-
unstackedDatasets: H.filter(
|
|
259
|
+
stackedDatasets: H.filter(rt),
|
|
260
|
+
unstackedDatasets: H.filter(at)
|
|
261
261
|
};
|
|
262
|
-
}, [l, L, c]),
|
|
262
|
+
}, [l, L, c]), K = (S, H) => {
|
|
263
263
|
M(H ?? O), n(y.TRENDS_CLICK_TOGGLE_VIEW);
|
|
264
264
|
}, de = (S) => {
|
|
265
265
|
const H = ve(S?.[0], 1), B = S?.[1], ge = pe(B, H);
|
|
@@ -269,9 +269,9 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
269
269
|
}, Y = () => {
|
|
270
270
|
n(y.TRENDS_CLICK_FILTER);
|
|
271
271
|
}, oe = (S) => {
|
|
272
|
-
|
|
272
|
+
F(S);
|
|
273
273
|
}, he = (S) => {
|
|
274
|
-
|
|
274
|
+
F(S), n(y.TRENDS_CLICK_LEGEND, { category: m(S) });
|
|
275
275
|
}, se = (S) => {
|
|
276
276
|
n(y.TRENDS_HOVER_LEGEND, { category: m(S) });
|
|
277
277
|
}, re = (S) => {
|
|
@@ -279,8 +279,8 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
279
279
|
}, ue = (S) => {
|
|
280
280
|
n(y.TRENDS_HOVER_POINT, { category: S });
|
|
281
281
|
};
|
|
282
|
-
return !
|
|
283
|
-
|
|
282
|
+
return !a || !g || !w ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ C(
|
|
283
|
+
ke,
|
|
284
284
|
{
|
|
285
285
|
accountOptions: u,
|
|
286
286
|
calendarActions: { onRangeChanged: de },
|
|
@@ -296,7 +296,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
296
296
|
{
|
|
297
297
|
sx: {
|
|
298
298
|
// eslint-disable-next-line no-nested-ternary
|
|
299
|
-
px: s ? 48 :
|
|
299
|
+
px: s ? 48 : r ? 24 : 12
|
|
300
300
|
},
|
|
301
301
|
children: [
|
|
302
302
|
/* @__PURE__ */ C(
|
|
@@ -307,18 +307,18 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
307
307
|
sx: { pb: h ? 12 : 24, pt: h ? 24 : 48 },
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
310
|
+
Ge,
|
|
311
311
|
{
|
|
312
312
|
selectedCategoryGuid: L,
|
|
313
313
|
selectedDateRange: c
|
|
314
314
|
}
|
|
315
315
|
),
|
|
316
|
-
/* @__PURE__ */ e(
|
|
316
|
+
/* @__PURE__ */ e(Ve, { onTabChange: K, selectedTab: O })
|
|
317
317
|
]
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
320
|
/* @__PURE__ */ C(_, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
321
|
-
/* @__PURE__ */ e(W, { flexGrow: 1, children: L && /* @__PURE__ */ C(me, { onClick: () =>
|
|
321
|
+
/* @__PURE__ */ e(W, { flexGrow: 1, children: L && /* @__PURE__ */ C(me, { onClick: () => F(""), sx: { p: 0, pr: 5 }, children: [
|
|
322
322
|
/* @__PURE__ */ e(ae, { name: "arrow_back" }),
|
|
323
323
|
D.all_categories
|
|
324
324
|
] }) }),
|
|
@@ -326,7 +326,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
326
326
|
] }),
|
|
327
327
|
/* @__PURE__ */ C(W, { children: [
|
|
328
328
|
O === "Chart" && /* @__PURE__ */ e(
|
|
329
|
-
|
|
329
|
+
tt,
|
|
330
330
|
{
|
|
331
331
|
availableHeight: j,
|
|
332
332
|
onClickLegend: he,
|
|
@@ -338,7 +338,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
338
338
|
}
|
|
339
339
|
),
|
|
340
340
|
O === "Table" && /* @__PURE__ */ e(
|
|
341
|
-
|
|
341
|
+
Be,
|
|
342
342
|
{
|
|
343
343
|
monthlyCategoryTotals: l,
|
|
344
344
|
onClickRow: oe,
|
|
@@ -363,7 +363,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
365
|
}, io = v(Ut), Xt = () => {
|
|
366
|
-
const t =
|
|
366
|
+
const t = We(), { monthlyCategoryTotals: o } = P(), { trends: n } = R(), s = it(o);
|
|
367
367
|
return /* @__PURE__ */ e(
|
|
368
368
|
ye,
|
|
369
369
|
{
|
|
@@ -381,7 +381,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}, Zt = v(Xt), Qt = ({ onPrimaryCtaClick: t, sx: o }) => {
|
|
384
|
-
const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded:
|
|
384
|
+
const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: r } = P(), { isInitialized: h } = Te(), { trends: u } = R(), { isCopyLoaded: d, selectedAccounts: l, setSelectedAccounts: m } = ee();
|
|
385
385
|
return i.useEffect(() => {
|
|
386
386
|
m(n);
|
|
387
387
|
}, [n]), i.useEffect(() => {
|
|
@@ -394,7 +394,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
394
394
|
subTitle: u.sub_title,
|
|
395
395
|
sx: o,
|
|
396
396
|
title: u.mini_title,
|
|
397
|
-
children:
|
|
397
|
+
children: r ? /* @__PURE__ */ e(Zt, {}) : /* @__PURE__ */ e(J, {})
|
|
398
398
|
}
|
|
399
399
|
);
|
|
400
400
|
}, co = v(Qt), qt = 70, Ee = ({
|
|
@@ -402,13 +402,13 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
402
402
|
totalAmount: o,
|
|
403
403
|
transactionType: n,
|
|
404
404
|
percentage: s,
|
|
405
|
-
secondaryLabel:
|
|
405
|
+
secondaryLabel: r,
|
|
406
406
|
shouldDisplayPercentage: h
|
|
407
407
|
}) => {
|
|
408
|
-
const { availableWidth: u } =
|
|
408
|
+
const { availableWidth: u } = dt(), d = i.useRef(null), l = i.useRef(null), m = Dt(Number(Math.abs(s)), {
|
|
409
409
|
style: "percent",
|
|
410
410
|
minimumIntegerDigits: 1
|
|
411
|
-
}), f = u === 288 && Z(o, "0,0.00").length > 10 ? Z(o, "0,0") : Z(o, "0,0.00"), c = n === "spending" ? s > 0 : s >= 0, b = n === "spending" ? "error.main" : "success.main",
|
|
411
|
+
}), f = u === 288 && Z(o, "0,0.00").length > 10 ? Z(o, "0,0") : Z(o, "0,0.00"), c = n === "spending" ? s > 0 : s >= 0, b = n === "spending" ? "error.main" : "success.main", a = n === "spending" ? "success.main" : "text.secondary", g = d?.current, T = l?.current, p = g && T ? g.scrollWidth > T.clientWidth - qt : !1;
|
|
412
412
|
return /* @__PURE__ */ C(
|
|
413
413
|
_,
|
|
414
414
|
{
|
|
@@ -433,12 +433,12 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
433
433
|
children: [
|
|
434
434
|
/* @__PURE__ */ e(X, { color: "text.secondary", variant: "caption", children: t }),
|
|
435
435
|
h && /* @__PURE__ */ C(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
436
|
-
c ? /* @__PURE__ */ e(yt, { size: 20, sx: { color: b } }) : /* @__PURE__ */ e(_t, { size: 20, sx: { color:
|
|
436
|
+
c ? /* @__PURE__ */ e(yt, { size: 20, sx: { color: b } }) : /* @__PURE__ */ e(_t, { size: 20, sx: { color: a } }),
|
|
437
437
|
/* @__PURE__ */ e(
|
|
438
438
|
X,
|
|
439
439
|
{
|
|
440
440
|
sx: {
|
|
441
|
-
color: c ? b :
|
|
441
|
+
color: c ? b : a,
|
|
442
442
|
fontWeight: 600
|
|
443
443
|
},
|
|
444
444
|
variant: "body2",
|
|
@@ -470,9 +470,9 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
470
470
|
h && u >= 450 && !p && /* @__PURE__ */ e(
|
|
471
471
|
X,
|
|
472
472
|
{
|
|
473
|
-
color: c ? b :
|
|
473
|
+
color: c ? b : a,
|
|
474
474
|
variant: "caption",
|
|
475
|
-
children:
|
|
475
|
+
children: r
|
|
476
476
|
}
|
|
477
477
|
)
|
|
478
478
|
]
|
|
@@ -491,14 +491,14 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
491
491
|
] })
|
|
492
492
|
] });
|
|
493
493
|
}), lo = v(({ onCtaClick: t }) => {
|
|
494
|
-
const { visibleAccounts: o } = ce(), { onEvent: n } = N(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals:
|
|
494
|
+
const { visibleAccounts: o } = ce(), { onEvent: n } = N(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: h } = P(), u = {
|
|
495
495
|
start: Tt(/* @__PURE__ */ new Date(), 1),
|
|
496
496
|
end: /* @__PURE__ */ new Date()
|
|
497
497
|
}, { trends: d } = R(), { selectedAccounts: l, setSelectedAccounts: m, isInitialized: f } = ee();
|
|
498
498
|
i.useEffect(() => {
|
|
499
499
|
m(o);
|
|
500
500
|
}, [o]), i.useEffect(() => {
|
|
501
|
-
f &&
|
|
501
|
+
f && r(l, u.start).then(() => {
|
|
502
502
|
n(y.TRENDS_LOAD_WIDGET, {
|
|
503
503
|
state: o?.length ? "default" : "zeroState"
|
|
504
504
|
});
|
|
@@ -510,7 +510,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
510
510
|
incomeData: Re(s, u)
|
|
511
511
|
}),
|
|
512
512
|
[s, u]
|
|
513
|
-
), [
|
|
513
|
+
), [a, g] = c, [T, p] = b, D = De(g.y, a.y), w = De(p.y, T.y), I = f && !o?.length, k = () => {
|
|
514
514
|
n(
|
|
515
515
|
I ? y.TRENDS_CLICK_GET_STARTED : y.TRENDS_CLICK_VIEW_MORE
|
|
516
516
|
), t();
|
|
@@ -537,7 +537,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
537
537
|
{
|
|
538
538
|
percentage: D,
|
|
539
539
|
secondaryLabel: d.micro_secondary_label,
|
|
540
|
-
shouldDisplayPercentage: g.y !== 0 &&
|
|
540
|
+
shouldDisplayPercentage: g.y !== 0 && a.y !== 0,
|
|
541
541
|
title: d.spending_label,
|
|
542
542
|
totalAmount: g.y,
|
|
543
543
|
transactionType: "spending"
|
|
@@ -561,7 +561,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
561
561
|
);
|
|
562
562
|
}), en = v(
|
|
563
563
|
({ isExpanded: t, onClick: o }) => {
|
|
564
|
-
const n =
|
|
564
|
+
const n = Oe();
|
|
565
565
|
return /* @__PURE__ */ e(xt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(vt, { onClick: o, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
|
|
566
566
|
_,
|
|
567
567
|
{
|
|
@@ -587,12 +587,12 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
587
587
|
guid: o,
|
|
588
588
|
name: n,
|
|
589
589
|
transactions: s,
|
|
590
|
-
onClick:
|
|
590
|
+
onClick: r,
|
|
591
591
|
isLastItem: h = !1,
|
|
592
592
|
showDivider: u = !0
|
|
593
593
|
}) => {
|
|
594
594
|
const { trends: d } = R(), { onEvent: l } = N(), m = `${s.length} ${s.length === 1 ? d.transaction : d.transactions}`, f = () => {
|
|
595
|
-
|
|
595
|
+
r?.(), l(y.TRENDS_CLICK_LIST_ITEM, {
|
|
596
596
|
...A,
|
|
597
597
|
listItem: n
|
|
598
598
|
});
|
|
@@ -604,7 +604,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
604
604
|
leftIcon: o ? /* @__PURE__ */ e(fe, { categoryGuid: o }) : void 0,
|
|
605
605
|
onClick: f,
|
|
606
606
|
rightContent: Z(Math.abs(t), "0,0.00"),
|
|
607
|
-
rightIcon:
|
|
607
|
+
rightIcon: r ? /* @__PURE__ */ e(qe, {}) : void 0,
|
|
608
608
|
subtitle: m,
|
|
609
609
|
title: n
|
|
610
610
|
}
|
|
@@ -614,23 +614,23 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
614
614
|
}
|
|
615
615
|
), tn = v(
|
|
616
616
|
({ availableHeight: t = 0, onCategoryClick: o }) => {
|
|
617
|
-
const { collapsedCategories: n, visibleCategories: s, setVisibleListLength:
|
|
617
|
+
const { collapsedCategories: n, visibleCategories: s, setVisibleListLength: r } = te(), { isLargeDesktop: h, isDesktop: u } = $(), { trends: d } = R(), { onEvent: l } = N(), [m, f] = i.useState(!1), c = u || h;
|
|
618
618
|
i.useEffect(() => {
|
|
619
619
|
const g = Math.floor(t / 64) - 1, T = s.length + n.length;
|
|
620
|
-
g !== s.length && (
|
|
620
|
+
g !== s.length && (r(c ? Math.max(g, 5) : 5), f(g >= T));
|
|
621
621
|
}, [t]);
|
|
622
622
|
const b = () => {
|
|
623
623
|
f(!m), l(y.TRENDS_CLICK_VIEW_MORE, {
|
|
624
624
|
...A
|
|
625
625
|
});
|
|
626
|
-
},
|
|
626
|
+
}, a = s.length + (m ? n.length : 0);
|
|
627
627
|
return /* @__PURE__ */ e(_, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Lt, { children: [
|
|
628
628
|
/* @__PURE__ */ e(_, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(xe, { children: d.categories }) }),
|
|
629
629
|
s.map((g, T) => /* @__PURE__ */ e(
|
|
630
630
|
Le,
|
|
631
631
|
{
|
|
632
632
|
...g,
|
|
633
|
-
isLastItem: T ===
|
|
633
|
+
isLastItem: T === a - 1,
|
|
634
634
|
onClick: g.transactions.length > 0 ? () => o(g) : void 0,
|
|
635
635
|
showDivider: !0
|
|
636
636
|
},
|
|
@@ -647,7 +647,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
647
647
|
Le,
|
|
648
648
|
{
|
|
649
649
|
...g,
|
|
650
|
-
isLastItem: p ===
|
|
650
|
+
isLastItem: p === a - 1,
|
|
651
651
|
onClick: g.transactions.length > 0 ? () => o(g) : void 0,
|
|
652
652
|
showDivider: !0
|
|
653
653
|
},
|
|
@@ -660,17 +660,17 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
660
660
|
] }) });
|
|
661
661
|
}
|
|
662
662
|
), nn = ({ beats: t, onInsightCardClick: o }) => {
|
|
663
|
-
const n = kt(), { onEvent: s } = N(), { isMobile:
|
|
663
|
+
const n = kt(), { onEvent: s } = N(), { isMobile: r, isDesktop: h, isLargeDesktop: u } = $(), { beatStore: d, endpoint: l, sessionToken: m } = Te(), f = n.palette.mode === "dark", c = h || u, b = c || r ? 1 : 2, a = () => null, g = (k) => {
|
|
664
664
|
o?.(k), s(y.TRENDS_CLICK_INSIGHT, A);
|
|
665
665
|
}, T = c ? 200 : 170, p = c ? 170 : 124, D = c ? 56 : 0, w = t.length > 0 ? T + D : p, I = c && t.length > 0 ? T : void 0;
|
|
666
666
|
return /* @__PURE__ */ e(Nt, { sx: { height: w }, children: /* @__PURE__ */ e(
|
|
667
|
-
|
|
667
|
+
pt,
|
|
668
668
|
{
|
|
669
669
|
areBeatsLoading: d.isLoading,
|
|
670
670
|
beats: t,
|
|
671
671
|
endpoint: l,
|
|
672
672
|
heightOverrides: I,
|
|
673
|
-
logOutUser:
|
|
673
|
+
logOutUser: a,
|
|
674
674
|
onCardClick: g,
|
|
675
675
|
showBorder: !0,
|
|
676
676
|
showCTAColocatedWithText: !1,
|
|
@@ -687,7 +687,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
687
687
|
) });
|
|
688
688
|
}, on = v(nn), sn = v(({ chartLabel: t, chartColor: o }) => {
|
|
689
689
|
const { onEvent: n } = N(), {
|
|
690
|
-
categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels:
|
|
690
|
+
categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels: r }
|
|
691
691
|
} = te();
|
|
692
692
|
return /* @__PURE__ */ e(_, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
693
693
|
ye,
|
|
@@ -695,7 +695,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
695
695
|
baseline: "min",
|
|
696
696
|
colors: [o],
|
|
697
697
|
curveType: "bump",
|
|
698
|
-
customTooltipLabels:
|
|
698
|
+
customTooltipLabels: r,
|
|
699
699
|
datasets: [s],
|
|
700
700
|
height: 265,
|
|
701
701
|
labels: [t],
|
|
@@ -719,10 +719,10 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
719
719
|
}
|
|
720
720
|
) });
|
|
721
721
|
}), rn = v(({ onClose: t }) => {
|
|
722
|
-
const o =
|
|
722
|
+
const o = Oe(), { onEvent: n } = N(), { common: s, trends: r } = R(), { selectedCategoryData: h, selectedDateRangeMonthRange: u } = te(), { sortedTransactions: d } = ie(), [l, m] = i.useState(null);
|
|
723
723
|
if (!h)
|
|
724
724
|
return null;
|
|
725
|
-
const { guid: f, name: c, is_income: b, totalAmount:
|
|
725
|
+
const { guid: f, name: c, is_income: b, totalAmount: a } = h, g = b ? r.category_income : r.category_spending, T = Wt(f, o), p = b ? r.income_label : r.spending_label, D = ` ${h.transactions.length === 1 ? r.transaction : r.transactions} (${h.transactions.length})`, w = i.useMemo(
|
|
726
726
|
() => d.find((E) => E.guid === l),
|
|
727
727
|
[l, d]
|
|
728
728
|
), I = (E) => E.category_guid === f || E.top_level_category_guid === f, k = () => {
|
|
@@ -731,7 +731,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
731
731
|
return /* @__PURE__ */ C(
|
|
732
732
|
Ce,
|
|
733
733
|
{
|
|
734
|
-
ariaLabelClose:
|
|
734
|
+
ariaLabelClose: r.close_category_details,
|
|
735
735
|
isOpen: !0,
|
|
736
736
|
onClose: k,
|
|
737
737
|
shouldShowHeaderShadow: !0,
|
|
@@ -743,7 +743,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
743
743
|
Me,
|
|
744
744
|
{
|
|
745
745
|
leftIcon: /* @__PURE__ */ e(fe, { categoryGuid: f }),
|
|
746
|
-
rightContent: Z(Math.abs(
|
|
746
|
+
rightContent: Z(Math.abs(a), "0,0.00"),
|
|
747
747
|
subtitle: u,
|
|
748
748
|
title: c
|
|
749
749
|
}
|
|
@@ -755,7 +755,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
755
755
|
] })
|
|
756
756
|
] }),
|
|
757
757
|
/* @__PURE__ */ e(
|
|
758
|
-
|
|
758
|
+
He,
|
|
759
759
|
{
|
|
760
760
|
bgcolor: "transparent",
|
|
761
761
|
filter: I,
|
|
@@ -770,8 +770,8 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
770
770
|
ariaLabelClose: s.close_aria,
|
|
771
771
|
isOpen: !!w,
|
|
772
772
|
onClose: () => m(""),
|
|
773
|
-
title:
|
|
774
|
-
children: w && /* @__PURE__ */ e(
|
|
773
|
+
title: r.transaction,
|
|
774
|
+
children: w && /* @__PURE__ */ e(Ne, { transaction: w })
|
|
775
775
|
}
|
|
776
776
|
)
|
|
777
777
|
]
|
|
@@ -779,11 +779,11 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
779
779
|
);
|
|
780
780
|
}), an = (t, o) => {
|
|
781
781
|
const n = Re(t, o), s = Ae(t, o);
|
|
782
|
-
return [n, s].filter((
|
|
782
|
+
return [n, s].filter((r) => r.length > 0);
|
|
783
783
|
}, cn = (t, o) => {
|
|
784
|
-
const [n, s] = t,
|
|
785
|
-
if (
|
|
786
|
-
const d =
|
|
784
|
+
const [n, s] = t, r = n, h = s ?? n, u = [];
|
|
785
|
+
if (r) {
|
|
786
|
+
const d = r.reduce((l, m) => l + m.y, 0);
|
|
787
787
|
u.push({ label: o.income_label, amount: d });
|
|
788
788
|
}
|
|
789
789
|
if (h) {
|
|
@@ -797,7 +797,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
797
797
|
selectedDateRange: n,
|
|
798
798
|
totals: s
|
|
799
799
|
}) => {
|
|
800
|
-
const
|
|
800
|
+
const r = We(), { onEvent: h } = N(), { trends: u } = R(), { isSmallMobile: d, isMobile: l, isSmallTablet: m, isTablet: f } = $(), c = [r.palette.chart?.chart1, r.palette.chart?.chart2], b = an(s, n), a = cn(b, u), [g, T] = i.useState(0), p = 458, D = 195, w = 56, I = l || d ? D : m || f ? p : g;
|
|
801
801
|
return i.useEffect(() => {
|
|
802
802
|
const E = Math.max(t - w, o);
|
|
803
803
|
T(E);
|
|
@@ -809,7 +809,7 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
809
809
|
curveType: "bump",
|
|
810
810
|
datasets: b,
|
|
811
811
|
height: I,
|
|
812
|
-
labels:
|
|
812
|
+
labels: a,
|
|
813
813
|
onItemClick: () => {
|
|
814
814
|
h(y.TRENDS_CLICK_CHART, A);
|
|
815
815
|
},
|
|
@@ -859,13 +859,13 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
859
859
|
"WeeklyNoSpendDays",
|
|
860
860
|
"WeeklySmallPurchasesSummary"
|
|
861
861
|
], un = ({ onBackClick: t, onInsightCardClick: o, sx: n }) => {
|
|
862
|
-
const { onEvent: s } = N(), { config:
|
|
862
|
+
const { onEvent: s } = N(), { config: r } = ht(), { isLargeDesktop: h, isDesktop: u, isMobile: d } = $(), { visibleAccounts: l } = ce(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: f, monthlyCategoryTotals: c } = P(), { setFilter: b } = ie(), { selectedDateRange: a, setSelectedCategoryData: g, setSelectedDateRange: T } = te(), {
|
|
863
863
|
isCopyLoaded: p,
|
|
864
864
|
isInitialized: D,
|
|
865
865
|
selectedAccounts: w,
|
|
866
866
|
selectedAccountGuids: I,
|
|
867
867
|
setSelectedAccounts: k
|
|
868
|
-
} = ee(), { trends: E, connect: O } = R(), { beatStore: M } = Te(),
|
|
868
|
+
} = ee(), { trends: E, connect: O } = R(), { beatStore: M } = Te(), F = Vt() && r.show_insights_widget_in_master, G = u || h, [le, _e] = i.useState(!1), [j, ne] = i.useState(!1), [K, de] = i.useState("Chart"), [Y, oe] = i.useState(""), [he, se] = i.useState(!1), [re, ue] = i.useState(window.innerHeight), S = G ? 56 : 0, H = re - 208, B = re - (F ? 550 + S : 266), [ge, be] = i.useState(!1), ze = r.show_connections_widget_in_master ? "buttons" : "no-buttons", Se = i.useMemo(
|
|
869
869
|
() => l && l.length === 0 || c.length === 0,
|
|
870
870
|
[l, c]
|
|
871
871
|
);
|
|
@@ -879,23 +879,23 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
879
879
|
}, []), i.useEffect(() => {
|
|
880
880
|
k(l);
|
|
881
881
|
}, [l]), i.useEffect(() => {
|
|
882
|
-
D && m(w,
|
|
882
|
+
D && m(w, a.start, a.end).then(() => {
|
|
883
883
|
f(
|
|
884
884
|
w,
|
|
885
|
-
|
|
886
|
-
|
|
885
|
+
a.start,
|
|
886
|
+
a.end
|
|
887
887
|
);
|
|
888
888
|
}).finally(() => {
|
|
889
889
|
_e(!0), s(y.TRENDS_LOAD_WIDGET, {
|
|
890
890
|
...A,
|
|
891
|
-
time_period: `${pe(
|
|
891
|
+
time_period: `${pe(a.end, a.start)}M`
|
|
892
892
|
});
|
|
893
893
|
});
|
|
894
|
-
}, [D, w,
|
|
894
|
+
}, [D, w, a]), i.useEffect(() => {
|
|
895
895
|
if (c.length !== 0) {
|
|
896
896
|
const x = {
|
|
897
897
|
accounts: I,
|
|
898
|
-
dateRange: { start:
|
|
898
|
+
dateRange: { start: a.start, end: a.end }
|
|
899
899
|
};
|
|
900
900
|
b({
|
|
901
901
|
...x,
|
|
@@ -905,41 +905,41 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
}, [c]);
|
|
908
|
-
const
|
|
908
|
+
const Pe = (x) => {
|
|
909
909
|
g(x), se(!0);
|
|
910
|
-
},
|
|
910
|
+
}, Fe = () => {
|
|
911
911
|
g(null), se(!1);
|
|
912
|
-
},
|
|
912
|
+
}, Ke = () => {
|
|
913
913
|
be(!0), s(y.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
914
|
-
},
|
|
915
|
-
de(V ??
|
|
914
|
+
}, $e = (x, V) => {
|
|
915
|
+
de(V ?? K), s(y.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
916
916
|
...A,
|
|
917
917
|
toggleView: V
|
|
918
918
|
});
|
|
919
|
-
},
|
|
920
|
-
const V = ve(x?.[0], 1), U = x?.[1],
|
|
919
|
+
}, je = (x) => {
|
|
920
|
+
const V = ve(x?.[0], 1), U = x?.[1], Ze = pe(U, V);
|
|
921
921
|
T({ start: V, end: U }), s(y.TRENDS_CLICK_TIME_WINDOW, {
|
|
922
922
|
...A,
|
|
923
|
-
time_period:
|
|
923
|
+
time_period: Ze + "M"
|
|
924
924
|
});
|
|
925
|
-
},
|
|
925
|
+
}, Ye = (x) => {
|
|
926
926
|
s(y.TRENDS_CLICK_FILTER, {
|
|
927
927
|
...A,
|
|
928
928
|
filterValue: x
|
|
929
929
|
});
|
|
930
|
-
},
|
|
930
|
+
}, Ue = (x) => {
|
|
931
931
|
oe(x);
|
|
932
|
-
},
|
|
932
|
+
}, Xe = () => {
|
|
933
933
|
oe(""), s(y.TRENDS_CLICK_ALL_CATEGORIES, A);
|
|
934
934
|
};
|
|
935
935
|
return !p || !le ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ C(
|
|
936
|
-
|
|
936
|
+
ke,
|
|
937
937
|
{
|
|
938
938
|
accountOptions: l,
|
|
939
|
-
calendarActions: { onRangeChanged:
|
|
940
|
-
dateRange:
|
|
939
|
+
calendarActions: { onRangeChanged: je },
|
|
940
|
+
dateRange: a,
|
|
941
941
|
dateRangeVariant: d ? "timeframetabs" : "timeframebuttons",
|
|
942
|
-
onAccountsFilterClick:
|
|
942
|
+
onAccountsFilterClick: Ye,
|
|
943
943
|
onBackClick: t,
|
|
944
944
|
sx: n,
|
|
945
945
|
title: E.title,
|
|
@@ -949,11 +949,11 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
949
949
|
{
|
|
950
950
|
header: E.zero_state_content_header,
|
|
951
951
|
icon: "",
|
|
952
|
-
onClick:
|
|
952
|
+
onClick: Ke,
|
|
953
953
|
primaryButton: E.empty_state_primary,
|
|
954
954
|
subText: E.empty_state_sub_text,
|
|
955
955
|
sx: { height: H },
|
|
956
|
-
variant:
|
|
956
|
+
variant: ze
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
959
|
!Se && /* @__PURE__ */ C(
|
|
@@ -971,33 +971,33 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
971
971
|
sx: { pb: d ? 12 : 24, pt: d ? 24 : 48 },
|
|
972
972
|
children: [
|
|
973
973
|
/* @__PURE__ */ e(
|
|
974
|
-
|
|
974
|
+
Ge,
|
|
975
975
|
{
|
|
976
976
|
selectedCategoryGuid: Y,
|
|
977
|
-
selectedDateRange:
|
|
977
|
+
selectedDateRange: a
|
|
978
978
|
}
|
|
979
979
|
),
|
|
980
|
-
/* @__PURE__ */ e(
|
|
980
|
+
/* @__PURE__ */ e(Ve, { onTabChange: $e, selectedTab: K })
|
|
981
981
|
]
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
|
-
/* @__PURE__ */ e(_, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(W, { flexGrow: 1, children: Y && /* @__PURE__ */ C(me, { onClick:
|
|
984
|
+
/* @__PURE__ */ e(_, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(W, { flexGrow: 1, children: Y && /* @__PURE__ */ C(me, { onClick: Xe, sx: { p: 0, pr: 5 }, children: [
|
|
985
985
|
/* @__PURE__ */ e(ae, { name: "arrow_back" }),
|
|
986
986
|
E.all_categories
|
|
987
987
|
] }) }) }),
|
|
988
988
|
/* @__PURE__ */ C(_, { flexDirection: G ? "row" : "column", gap: G ? 48 : 16, children: [
|
|
989
|
-
|
|
989
|
+
K === "Chart" && /* @__PURE__ */ C(Qe, { children: [
|
|
990
990
|
/* @__PURE__ */ e(W, { sx: { width: G ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
991
991
|
dn,
|
|
992
992
|
{
|
|
993
993
|
availableHeight: H,
|
|
994
994
|
minHeight: 450,
|
|
995
|
-
selectedDateRange:
|
|
995
|
+
selectedDateRange: a,
|
|
996
996
|
totals: c
|
|
997
997
|
}
|
|
998
998
|
) }),
|
|
999
999
|
/* @__PURE__ */ C(_, { gap: 16, sx: { width: G ? "32%" : "100%" }, children: [
|
|
1000
|
-
|
|
1000
|
+
F && j && we.length > 0 && /* @__PURE__ */ e(
|
|
1001
1001
|
on,
|
|
1002
1002
|
{
|
|
1003
1003
|
beats: we,
|
|
@@ -1008,23 +1008,23 @@ const Ge = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
1008
1008
|
tn,
|
|
1009
1009
|
{
|
|
1010
1010
|
availableHeight: B,
|
|
1011
|
-
onCategoryClick:
|
|
1011
|
+
onCategoryClick: Pe
|
|
1012
1012
|
}
|
|
1013
1013
|
)
|
|
1014
1014
|
] })
|
|
1015
1015
|
] }),
|
|
1016
|
-
|
|
1017
|
-
|
|
1016
|
+
K === "Table" && /* @__PURE__ */ e(W, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1017
|
+
Be,
|
|
1018
1018
|
{
|
|
1019
1019
|
height: "unset",
|
|
1020
1020
|
monthlyCategoryTotals: c,
|
|
1021
|
-
onClickRow:
|
|
1021
|
+
onClickRow: Ue,
|
|
1022
1022
|
selectedCategory: Y,
|
|
1023
|
-
selectedDateRange:
|
|
1023
|
+
selectedDateRange: a
|
|
1024
1024
|
}
|
|
1025
1025
|
) })
|
|
1026
1026
|
] }),
|
|
1027
|
-
he && /* @__PURE__ */ e(rn, { onClose:
|
|
1027
|
+
he && /* @__PURE__ */ e(rn, { onClose: Fe })
|
|
1028
1028
|
]
|
|
1029
1029
|
}
|
|
1030
1030
|
),
|