@mx-cartographer/experiences 7.6.6 → 7.6.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 +8 -0
- package/dist/spending/index.es.js +124 -121
- package/dist/trends/index.es.js +519 -519
- package/package.json +1 -1
package/dist/trends/index.es.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsxs as C, jsx as e, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { CategoryIcon as Se, Text as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsxs as C, jsx as e, Fragment as mt } from "react/jsx-runtime";
|
|
2
|
+
import p, { useRef as pt, useState as ft, useEffect as Ct } from "react";
|
|
3
|
+
import { observer as R } from "mobx-react-lite";
|
|
4
|
+
import { CategoryIcon as Se, Text as z, Icon as _e, P as ge, H3 as je, ChevronRightIcon as yt } from "@mxenabled/mxui";
|
|
5
|
+
import A from "@mui/material/Box";
|
|
6
|
+
import S from "@mui/material/Stack";
|
|
7
7
|
import be from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as Ue } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as ke } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import
|
|
10
|
+
import _t from "numeral";
|
|
11
11
|
import { useTheme as ce } from "@mui/material/styles";
|
|
12
|
-
import { useItemTooltip as
|
|
13
|
-
import { LineChart as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
12
|
+
import { useItemTooltip as bt, ChartsTooltipContainer as Tt } from "@mui/x-charts/ChartsTooltip";
|
|
13
|
+
import { LineChart as St } from "@mui/x-charts/LineChart";
|
|
14
|
+
import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
15
|
+
import { u as wt } from "../useDimensions-27p2evRx.mjs";
|
|
16
16
|
import Xe from "@mui/material/Card";
|
|
17
17
|
import Ze from "@mui/material/CardContent";
|
|
18
18
|
import He from "@mui/material/Divider";
|
|
19
19
|
import Ge from "@mui/material/Grid";
|
|
20
|
-
import { u as
|
|
21
|
-
import { b as
|
|
20
|
+
import { u as k, m as Z, g as F, b as pe, h as we, d as xe, v as fe, p as Qe, f as We, a as qe } from "../hooks-ZMp65DFz.mjs";
|
|
21
|
+
import { b as Je } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { C as Te } from "../CurrencyText-Dr0EZ7bp.mjs";
|
|
23
|
-
import { C as Ae, b as Be, c as
|
|
24
|
-
import { f as
|
|
25
|
-
import { f as se, a as
|
|
26
|
-
import { c as It, a as Ve, g as Lt, L as
|
|
23
|
+
import { C as Ae, b as Be, c as xt } from "../Category-CevNQ03n.mjs";
|
|
24
|
+
import { f as U, a as B } from "../Dialog-BlnUNqVo.mjs";
|
|
25
|
+
import { f as se, a as vt } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
26
|
+
import { c as It, a as Ve, g as Lt, L as et } from "../TrendsStore-CQAsOAvy.mjs";
|
|
27
27
|
import { T as Kn } from "../TrendsStore-CQAsOAvy.mjs";
|
|
28
|
-
import { c as Et, i as Dt, d as Mt, e as At, b as
|
|
28
|
+
import { c as Et, i as Dt, d as Mt, e as At, b as tt, g as ot, f as Pe } from "../SpendingData-zOn0cwrq.mjs";
|
|
29
29
|
import Rt from "@mui/material/ToggleButton";
|
|
30
30
|
import kt from "@mui/material/ToggleButtonGroup";
|
|
31
31
|
import { DataGridPro as Ht } from "@mui/x-data-grid-pro";
|
|
32
|
-
import { T as
|
|
33
|
-
import { parseISO as
|
|
32
|
+
import { T as V, b as Nt } from "../ViewMoreMicroCard-DwR0v_ll.mjs";
|
|
33
|
+
import { parseISO as nt } from "date-fns/parseISO";
|
|
34
34
|
import { H as Re } from "../HeaderCell-DjuifqHJ.mjs";
|
|
35
|
-
import { A as
|
|
36
|
-
import { a as
|
|
35
|
+
import { A as x, W as st } from "../WidgetContainer-8RexRzms.mjs";
|
|
36
|
+
import { a as rt, T as at } from "../TransactionDetails-vXstDuDk.mjs";
|
|
37
37
|
import { D as Ne } from "../Drawer-DV4NTsFg.mjs";
|
|
38
|
-
import { u as
|
|
38
|
+
import { u as ve } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
39
39
|
import { L as me } from "../Loader-DUaFpDGv.mjs";
|
|
40
40
|
import { L as Oe } from "../LineChart-BF4QA-Lx.mjs";
|
|
41
41
|
import { M as Wt } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
@@ -48,7 +48,7 @@ import Yt from "@mui/material/ListItem";
|
|
|
48
48
|
import jt from "@mui/material/ListItemButton";
|
|
49
49
|
import Ut from "@mui/material/ListItemIcon";
|
|
50
50
|
import Xt from "@mui/material/ListItemText";
|
|
51
|
-
import
|
|
51
|
+
import it from "@mui/material/styles/useTheme";
|
|
52
52
|
import { Stack as Zt } from "@mui/material";
|
|
53
53
|
import Qt from "@mui/material/Paper";
|
|
54
54
|
import { b as qt } from "../CategoryUtil-CKczWF-y.mjs";
|
|
@@ -56,19 +56,19 @@ import { E as Jt } from "../ExportCsvAction-Col0j3VJ.mjs";
|
|
|
56
56
|
import { u as eo } from "../useInsightsEnabled-B7dxpDrX.mjs";
|
|
57
57
|
import { E as to } from "../EmptyState-DoxNUae-.mjs";
|
|
58
58
|
import { l as oo } from "../ConnectDrawer-DJV-yWGN.mjs";
|
|
59
|
-
const
|
|
60
|
-
const { categories: n } =
|
|
61
|
-
return /* @__PURE__ */ C(
|
|
59
|
+
const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
60
|
+
const { categories: n } = k(), { getCategoryName: t } = Z(), r = t(o);
|
|
61
|
+
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
62
62
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
63
|
+
A,
|
|
64
64
|
{
|
|
65
|
-
"aria-label":
|
|
65
|
+
"aria-label": Je(n.category_icon_label_aria, r),
|
|
66
66
|
mb: 4,
|
|
67
67
|
role: "img",
|
|
68
68
|
children: /* @__PURE__ */ e(Se, { categoryGuid: s })
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
71
|
+
/* @__PURE__ */ e(z, { variant: "Body", children: r })
|
|
72
72
|
] });
|
|
73
73
|
}, no = ({
|
|
74
74
|
categoryGuids: { guid: o, topLevelGuid: s },
|
|
@@ -76,39 +76,39 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
76
76
|
cursorPosition: t,
|
|
77
77
|
chartContainerRef: r
|
|
78
78
|
}) => {
|
|
79
|
-
const a = ce(),
|
|
80
|
-
if (
|
|
79
|
+
const a = ce(), d = pt(null), [u, i] = ft({ x: t.x, y: t.y });
|
|
80
|
+
if (Ct(() => {
|
|
81
81
|
(() => {
|
|
82
|
-
const
|
|
83
|
-
if (!
|
|
84
|
-
const g =
|
|
85
|
-
let _ = t.x,
|
|
86
|
-
_ + g.width * 2 >
|
|
82
|
+
const l = d.current, y = r.current;
|
|
83
|
+
if (!l || !y) return;
|
|
84
|
+
const g = l.getBoundingClientRect(), m = y.getBoundingClientRect();
|
|
85
|
+
let _ = t.x, T = t.y;
|
|
86
|
+
_ + g.width * 2 > m.right ? _ = t.x - g.width : _ - g.width < m.left && (_ = t.x), T + g.height * 2 > m.bottom && (T = t.y - g.height), i({ x: _, y: T });
|
|
87
87
|
})();
|
|
88
88
|
}, [t, r]), !n) return null;
|
|
89
|
-
const
|
|
89
|
+
const h = n.reduce((f, l) => f + l.y, 0);
|
|
90
90
|
return /* @__PURE__ */ e(
|
|
91
91
|
Xe,
|
|
92
92
|
{
|
|
93
|
-
ref:
|
|
93
|
+
ref: d,
|
|
94
94
|
sx: {
|
|
95
95
|
position: "absolute",
|
|
96
|
-
top:
|
|
97
|
-
left:
|
|
96
|
+
top: u.y,
|
|
97
|
+
left: u.x,
|
|
98
98
|
width: 250,
|
|
99
99
|
pointerEvents: "none"
|
|
100
100
|
},
|
|
101
101
|
children: /* @__PURE__ */ C(Ze, { children: [
|
|
102
|
-
/* @__PURE__ */ C(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
-
/* @__PURE__ */ e(Te, { amount:
|
|
102
|
+
/* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
103
|
+
/* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
|
|
104
|
+
/* @__PURE__ */ e(z, { variant: "Small", children: `${n.length}-month total` }),
|
|
105
|
+
/* @__PURE__ */ e(Te, { amount: h, bold: !0, formatString: "0,0", variant: "body2" })
|
|
106
106
|
] }),
|
|
107
107
|
/* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
|
|
108
|
-
/* @__PURE__ */ e(Ge, { container: !0, children: n.map((f,
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */ e(Ge, { item: !0, xs: 4, children: /* @__PURE__ */ C(
|
|
111
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(Ge, { container: !0, children: n.map((f, l) => /* @__PURE__ */ C(p.Fragment, { children: [
|
|
109
|
+
l > 0 && l % 3 === 0 && /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
|
|
110
|
+
/* @__PURE__ */ e(Ge, { item: !0, xs: 4, children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
111
|
+
/* @__PURE__ */ e(z, { color: a.palette.text.secondary, variant: "XSmall", children: f.x }),
|
|
112
112
|
/* @__PURE__ */ e(
|
|
113
113
|
Te,
|
|
114
114
|
{
|
|
@@ -119,11 +119,11 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
] }) })
|
|
122
|
-
] },
|
|
122
|
+
] }, l)) })
|
|
123
123
|
] })
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
}, so =
|
|
126
|
+
}, so = R(no), ro = ({
|
|
127
127
|
sx: o,
|
|
128
128
|
categoryGuids: s,
|
|
129
129
|
hoveredLegend: n,
|
|
@@ -131,23 +131,23 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
131
131
|
onHoverLegend: r,
|
|
132
132
|
onClickLegend: a
|
|
133
133
|
}) => {
|
|
134
|
-
const { isMobile:
|
|
134
|
+
const { isMobile: d } = X(), { getCategoryName: u } = Z();
|
|
135
135
|
return /* @__PURE__ */ e(
|
|
136
|
-
|
|
136
|
+
S,
|
|
137
137
|
{
|
|
138
138
|
direction: "row",
|
|
139
139
|
flexWrap: "wrap",
|
|
140
|
-
gap:
|
|
140
|
+
gap: d ? 2 : 6,
|
|
141
141
|
justifyContent: "start",
|
|
142
142
|
ref: t,
|
|
143
143
|
sx: o,
|
|
144
|
-
children: s.map(({ guid:
|
|
145
|
-
const f = n ===
|
|
144
|
+
children: s.map(({ guid: i, top_level_guid: h }) => {
|
|
145
|
+
const f = n === i, l = Ae[i], y = Ae[h], g = l ?? y ?? Ae.default, m = g + "33";
|
|
146
146
|
return /* @__PURE__ */ C(
|
|
147
147
|
be,
|
|
148
148
|
{
|
|
149
|
-
onClick: () => a(
|
|
150
|
-
onMouseEnter: () => r(
|
|
149
|
+
onClick: () => a(i),
|
|
150
|
+
onMouseEnter: () => r(i),
|
|
151
151
|
onMouseLeave: () => r(null),
|
|
152
152
|
sx: {
|
|
153
153
|
color: "text.primary",
|
|
@@ -162,21 +162,21 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
162
162
|
},
|
|
163
163
|
children: [
|
|
164
164
|
/* @__PURE__ */ e(
|
|
165
|
-
|
|
165
|
+
A,
|
|
166
166
|
{
|
|
167
167
|
sx: {
|
|
168
168
|
width: 16,
|
|
169
169
|
height: 16,
|
|
170
|
-
marginRight:
|
|
170
|
+
marginRight: d ? 5 : 10,
|
|
171
171
|
borderRadius: "2px",
|
|
172
|
-
backgroundColor: n ? f ? g :
|
|
172
|
+
backgroundColor: n ? f ? g : m : g
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ e(z, { variant: "Body", children: u(i) })
|
|
177
177
|
]
|
|
178
178
|
},
|
|
179
|
-
|
|
179
|
+
i
|
|
180
180
|
);
|
|
181
181
|
})
|
|
182
182
|
}
|
|
@@ -186,15 +186,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
186
186
|
series: n,
|
|
187
187
|
xData: t
|
|
188
188
|
}) => {
|
|
189
|
-
const r =
|
|
189
|
+
const r = bt(), a = ce();
|
|
190
190
|
if (!r?.identifier) return null;
|
|
191
|
-
const { dataIndex:
|
|
192
|
-
if (
|
|
193
|
-
const
|
|
194
|
-
return
|
|
195
|
-
/* @__PURE__ */ e(
|
|
196
|
-
/* @__PURE__ */ e(
|
|
197
|
-
/* @__PURE__ */ e(Te, { amount: String(
|
|
191
|
+
const { dataIndex: d, seriesId: u } = r.identifier;
|
|
192
|
+
if (d == null || !u) return null;
|
|
193
|
+
const h = n.find((l) => l.id === u)?.data?.[d], f = t?.[d];
|
|
194
|
+
return h === void 0 || !f ? null : /* @__PURE__ */ e(Xe, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Ze, { children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
195
|
+
/* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
|
|
196
|
+
/* @__PURE__ */ e(z, { color: a.palette.text.secondary, variant: "Small", children: U(f, B.MONTH_SHORT_YEAR) }),
|
|
197
|
+
/* @__PURE__ */ e(Te, { amount: String(h), bold: !0, formatString: "0,0", variant: "Body" })
|
|
198
198
|
] }) }) });
|
|
199
199
|
}, io = ({
|
|
200
200
|
onHoverArea: o,
|
|
@@ -203,103 +203,103 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
203
203
|
onClickLegend: t,
|
|
204
204
|
stackedDatasets: r,
|
|
205
205
|
unstackedDatasets: a = [],
|
|
206
|
-
availableHeight:
|
|
207
|
-
minimumHeight:
|
|
206
|
+
availableHeight: d = 0,
|
|
207
|
+
minimumHeight: u = 350
|
|
208
208
|
}) => {
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
}, [
|
|
214
|
-
const [_,
|
|
209
|
+
const i = ce(), { isMobile: h } = X(), [f, { height: l }] = wt(), y = p.useRef(null), [g, m] = p.useState(0);
|
|
210
|
+
p.useEffect(() => {
|
|
211
|
+
const c = Math.max(d - l, u);
|
|
212
|
+
m(c);
|
|
213
|
+
}, [d, l]);
|
|
214
|
+
const [_, T] = p.useState(null), [L, I] = p.useState({
|
|
215
215
|
hoveredSeriesId: null,
|
|
216
216
|
hoveredAreaData: null,
|
|
217
217
|
isAreaHovered: !1,
|
|
218
218
|
cursorPos: { x: 0, y: 0 }
|
|
219
|
-
}), { hoveredSeriesId: E, hoveredAreaData:
|
|
220
|
-
(
|
|
221
|
-
) ?? [0], re = Math.max(...oe),
|
|
222
|
-
...a.flatMap((
|
|
223
|
-
), le = Math.floor(Math.min(...Ce) / 100) * 100, ne = Math.ceil(Math.max(re,
|
|
219
|
+
}), { hoveredSeriesId: E, hoveredAreaData: P, isAreaHovered: H, cursorPos: D } = L, $ = H && E && P, M = !$, O = [...r, ...a], N = O[0]?.dataset.length ?? 0, Q = O.flatMap((c) => c.dataset.map((b) => b.x)), Ce = O.flatMap((c) => c.dataset.map((b) => b.y)), oe = r[0]?.dataset?.map(
|
|
220
|
+
(c, b) => r.reduce((v, j) => v + j.dataset[b]?.y || 0, 0)
|
|
221
|
+
) ?? [0], re = Math.max(...oe), q = Math.max(
|
|
222
|
+
...a.flatMap((c) => c.dataset.map((b) => b.y))
|
|
223
|
+
), le = Math.floor(Math.min(...Ce) / 100) * 100, ne = Math.ceil(Math.max(re, q) / 100) * 100, K = r.map((c, b) => ({
|
|
224
224
|
id: `stacked-${b}`,
|
|
225
|
-
guid:
|
|
226
|
-
top_level_guid:
|
|
225
|
+
guid: c.category_guid,
|
|
226
|
+
top_level_guid: c.top_level_category_guid,
|
|
227
227
|
area: !0,
|
|
228
|
-
color: r[b].category_color ??
|
|
229
|
-
data:
|
|
228
|
+
color: r[b].category_color ?? i.palette.primary.main,
|
|
229
|
+
data: c.dataset.map((v) => v.y),
|
|
230
230
|
label: r[b].category_name,
|
|
231
231
|
stack: "total",
|
|
232
232
|
type: "line",
|
|
233
233
|
highlightScope: { highlight: "item" },
|
|
234
|
-
valueFormatter: (
|
|
235
|
-
})), ae = a.map((
|
|
234
|
+
valueFormatter: (v) => se(v, "0,0")
|
|
235
|
+
})), ae = a.map((c, b) => ({
|
|
236
236
|
id: `unstacked-${b}`,
|
|
237
|
-
guid:
|
|
238
|
-
top_level_guid:
|
|
237
|
+
guid: c.category_guid,
|
|
238
|
+
top_level_guid: c.top_level_category_guid,
|
|
239
239
|
area: !1,
|
|
240
|
-
color:
|
|
241
|
-
data:
|
|
242
|
-
label:
|
|
240
|
+
color: c.category_color,
|
|
241
|
+
data: c.dataset.map((v) => v.y),
|
|
242
|
+
label: c.category_name,
|
|
243
243
|
type: "line",
|
|
244
|
-
valueFormatter: (
|
|
245
|
-
})),
|
|
246
|
-
|
|
247
|
-
guid:
|
|
244
|
+
valueFormatter: (v) => se(v, "0,0")
|
|
245
|
+
})), J = [...K, ...ae], ie = [
|
|
246
|
+
...K.map(({ guid: c, top_level_guid: b }) => ({
|
|
247
|
+
guid: c,
|
|
248
248
|
top_level_guid: b
|
|
249
249
|
})),
|
|
250
|
-
...ae.map(({ guid:
|
|
251
|
-
guid:
|
|
250
|
+
...ae.map(({ guid: c, top_level_guid: b }) => ({
|
|
251
|
+
guid: c,
|
|
252
252
|
top_level_guid: b
|
|
253
253
|
}))
|
|
254
|
-
],
|
|
255
|
-
const
|
|
254
|
+
], ee = (c) => {
|
|
255
|
+
const v = c.startsWith("stacked-") ? r[parseInt(c.split("-")[1])] : a[parseInt(c.split("-")[1])];
|
|
256
256
|
return {
|
|
257
|
-
guid:
|
|
258
|
-
topLevelGuid:
|
|
257
|
+
guid: v?.category_guid,
|
|
258
|
+
topLevelGuid: v?.top_level_category_guid
|
|
259
259
|
};
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
t?.(
|
|
264
|
-
},
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
}, de = (
|
|
268
|
-
const b = String(
|
|
260
|
+
}, w = (c) => {
|
|
261
|
+
T(c), n?.(c ?? "");
|
|
262
|
+
}, G = (c) => {
|
|
263
|
+
t?.(c ?? "");
|
|
264
|
+
}, Y = () => {
|
|
265
|
+
const c = ee(String(E)).guid;
|
|
266
|
+
c && t?.(c);
|
|
267
|
+
}, de = (c) => {
|
|
268
|
+
const b = String(c?.seriesId), v = ee(b).guid, j = J.find((ue) => ue.id === b), Le = j && c?.dataIndex !== void 0, Ee = j && c?.dataIndex === void 0;
|
|
269
269
|
if (Le)
|
|
270
|
-
|
|
270
|
+
I({
|
|
271
271
|
hoveredSeriesId: b,
|
|
272
272
|
hoveredAreaData: null,
|
|
273
273
|
isAreaHovered: !1,
|
|
274
|
-
cursorPos:
|
|
275
|
-
}), s?.(
|
|
274
|
+
cursorPos: D
|
|
275
|
+
}), s?.(v);
|
|
276
276
|
else if (Ee) {
|
|
277
|
-
const ue =
|
|
278
|
-
x:
|
|
277
|
+
const ue = j?.data.map((De, Me) => ({
|
|
278
|
+
x: Q[Me],
|
|
279
279
|
y: De
|
|
280
280
|
})) ?? [];
|
|
281
|
-
|
|
281
|
+
I({
|
|
282
282
|
hoveredSeriesId: b,
|
|
283
283
|
hoveredAreaData: ue,
|
|
284
284
|
isAreaHovered: !0,
|
|
285
|
-
cursorPos:
|
|
286
|
-
}), o?.(
|
|
285
|
+
cursorPos: D
|
|
286
|
+
}), o?.(v);
|
|
287
287
|
} else
|
|
288
|
-
|
|
288
|
+
I({
|
|
289
289
|
hoveredSeriesId: null,
|
|
290
290
|
hoveredAreaData: null,
|
|
291
291
|
isAreaHovered: !1,
|
|
292
|
-
cursorPos:
|
|
292
|
+
cursorPos: D
|
|
293
293
|
});
|
|
294
|
-
}, ye = (
|
|
295
|
-
if (
|
|
294
|
+
}, ye = (c) => {
|
|
295
|
+
if (c.target instanceof Element && c.target.classList[0]?.includes("MuiMarkElement-root"))
|
|
296
296
|
return;
|
|
297
|
-
const b =
|
|
298
|
-
|
|
299
|
-
...
|
|
297
|
+
const b = c.currentTarget.getBoundingClientRect();
|
|
298
|
+
I((v) => ({
|
|
299
|
+
...v,
|
|
300
300
|
cursorPos: {
|
|
301
|
-
x:
|
|
302
|
-
y:
|
|
301
|
+
x: c.clientX - b.left,
|
|
302
|
+
y: c.clientY - b.top
|
|
303
303
|
}
|
|
304
304
|
}));
|
|
305
305
|
}, Ie = {
|
|
@@ -318,15 +318,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
318
318
|
'& [class*="MuiLineElement-series-unstacked-"]': {
|
|
319
319
|
strokeWidth: 3
|
|
320
320
|
},
|
|
321
|
-
..._ &&
|
|
322
|
-
const
|
|
323
|
-
return
|
|
324
|
-
opacity:
|
|
325
|
-
},
|
|
321
|
+
..._ && K.reduce((c, b, v) => {
|
|
322
|
+
const j = `.MuiAreaElement-series-stacked-${v}`;
|
|
323
|
+
return c[j] = {
|
|
324
|
+
opacity: K[v].guid === _ ? 0.9 : 0.2
|
|
325
|
+
}, c;
|
|
326
326
|
}, {})
|
|
327
327
|
};
|
|
328
328
|
return /* @__PURE__ */ e(
|
|
329
|
-
|
|
329
|
+
A,
|
|
330
330
|
{
|
|
331
331
|
onMouseMove: ye,
|
|
332
332
|
ref: y,
|
|
@@ -342,43 +342,43 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
children: /* @__PURE__ */ C(
|
|
345
|
-
|
|
345
|
+
S,
|
|
346
346
|
{
|
|
347
347
|
direction: { xs: "column", md: "column" },
|
|
348
348
|
spacing: { xs: 0, md: 4 },
|
|
349
349
|
sx: { width: "100%", position: "relative" },
|
|
350
350
|
children: [
|
|
351
351
|
/* @__PURE__ */ e(
|
|
352
|
-
|
|
352
|
+
St,
|
|
353
353
|
{
|
|
354
354
|
height: g,
|
|
355
355
|
hideLegend: !0,
|
|
356
356
|
margin: { bottom: 24, left: 12, right: 54, top: 48 },
|
|
357
|
-
onAreaClick:
|
|
357
|
+
onAreaClick: Y,
|
|
358
358
|
onHighlightChange: de,
|
|
359
|
-
series:
|
|
359
|
+
series: J,
|
|
360
360
|
skipAnimation: !0,
|
|
361
361
|
slotProps: {
|
|
362
|
-
tooltip: { trigger:
|
|
362
|
+
tooltip: { trigger: M ? "item" : "none" }
|
|
363
363
|
},
|
|
364
364
|
slots: {
|
|
365
|
-
tooltip:
|
|
365
|
+
tooltip: M && E ? (c) => /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e(
|
|
366
366
|
ao,
|
|
367
367
|
{
|
|
368
|
-
...
|
|
369
|
-
categoryGuids:
|
|
370
|
-
series:
|
|
371
|
-
xData:
|
|
368
|
+
...c,
|
|
369
|
+
categoryGuids: ee(E),
|
|
370
|
+
series: J,
|
|
371
|
+
xData: Q
|
|
372
372
|
}
|
|
373
373
|
) }) : void 0
|
|
374
374
|
},
|
|
375
375
|
sx: Ie,
|
|
376
376
|
xAxis: [
|
|
377
377
|
{
|
|
378
|
-
data:
|
|
378
|
+
data: Q,
|
|
379
379
|
scaleType: "time",
|
|
380
|
-
valueFormatter: (
|
|
381
|
-
tickNumber:
|
|
380
|
+
valueFormatter: (c) => U(c, B.MONTH_SHORT_YEAR),
|
|
381
|
+
tickNumber: N
|
|
382
382
|
// How many ticks to show on the x-axis
|
|
383
383
|
}
|
|
384
384
|
],
|
|
@@ -386,7 +386,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
386
386
|
{
|
|
387
387
|
min: le,
|
|
388
388
|
max: ne || 100,
|
|
389
|
-
valueFormatter: (
|
|
389
|
+
valueFormatter: (c) => _t(c).format("0a")
|
|
390
390
|
}
|
|
391
391
|
]
|
|
392
392
|
}
|
|
@@ -397,20 +397,20 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
397
397
|
categoryGuids: ie,
|
|
398
398
|
hoveredLegend: _,
|
|
399
399
|
legendRef: f,
|
|
400
|
-
onClickLegend:
|
|
401
|
-
onHoverLegend:
|
|
402
|
-
sx: { px:
|
|
400
|
+
onClickLegend: G,
|
|
401
|
+
onHoverLegend: w,
|
|
402
|
+
sx: { px: h ? 0 : 24 }
|
|
403
403
|
}
|
|
404
404
|
),
|
|
405
|
-
|
|
405
|
+
$ && /* @__PURE__ */ e(
|
|
406
406
|
so,
|
|
407
407
|
{
|
|
408
|
-
categoryGuids:
|
|
408
|
+
categoryGuids: ee(E),
|
|
409
409
|
chartContainerRef: y,
|
|
410
|
-
cursorPosition:
|
|
411
|
-
hoveredAreaData:
|
|
412
|
-
...
|
|
413
|
-
x:
|
|
410
|
+
cursorPosition: D,
|
|
411
|
+
hoveredAreaData: P.map((c) => ({
|
|
412
|
+
...c,
|
|
413
|
+
x: U(c.x, B.MONTH_SHORT_YEAR)
|
|
414
414
|
}))
|
|
415
415
|
}
|
|
416
416
|
)
|
|
@@ -419,8 +419,8 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
419
419
|
)
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
|
-
},
|
|
423
|
-
const { common: n } =
|
|
422
|
+
}, lt = ({ selectedTab: o, onTabChange: s }) => {
|
|
423
|
+
const { common: n } = k();
|
|
424
424
|
return /* @__PURE__ */ e(
|
|
425
425
|
kt,
|
|
426
426
|
{
|
|
@@ -443,23 +443,23 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
443
443
|
))
|
|
444
444
|
}
|
|
445
445
|
);
|
|
446
|
-
},
|
|
447
|
-
const { trends: n } =
|
|
448
|
-
const
|
|
446
|
+
}, dt = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
|
|
447
|
+
const { trends: n } = k(), { isMobile: t, isDesktop: r } = X(), { getCategoryName: a } = Z(), d = p.useMemo(() => {
|
|
448
|
+
const u = o.start.getFullYear() === o.end.getFullYear() ? U(
|
|
449
449
|
o.start,
|
|
450
|
-
t ?
|
|
451
|
-
) :
|
|
450
|
+
t ? B.MONTH_SHORT : B.MONTH_LONG
|
|
451
|
+
) : U(
|
|
452
452
|
o.start,
|
|
453
|
-
t ?
|
|
454
|
-
),
|
|
453
|
+
t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
|
|
454
|
+
), i = U(
|
|
455
455
|
o.end,
|
|
456
|
-
t ?
|
|
456
|
+
t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
|
|
457
457
|
);
|
|
458
|
-
return `${
|
|
458
|
+
return `${u} - ${i}`;
|
|
459
459
|
}, [o, t]);
|
|
460
|
-
return /* @__PURE__ */ C(
|
|
460
|
+
return /* @__PURE__ */ C(A, { sx: { mr: 10, minWidth: "60%" }, children: [
|
|
461
461
|
/* @__PURE__ */ e(
|
|
462
|
-
|
|
462
|
+
z,
|
|
463
463
|
{
|
|
464
464
|
display: "block",
|
|
465
465
|
fontWeight: 700,
|
|
@@ -472,12 +472,12 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
472
472
|
children: a(s) || n.sub_title
|
|
473
473
|
}
|
|
474
474
|
),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(z, { variant: r ? "subtitle1" : "body2", children: d })
|
|
476
476
|
] });
|
|
477
|
-
}, co = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ C(
|
|
478
|
-
/* @__PURE__ */ e(
|
|
479
|
-
/* @__PURE__ */ e(
|
|
480
|
-
] }), lo = (o) => /* @__PURE__ */ e(
|
|
477
|
+
}, co = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
478
|
+
/* @__PURE__ */ e(A, { "aria-hidden": !0, children: /* @__PURE__ */ e(Se, { categoryGuid: s, variant: "twotone" }) }),
|
|
479
|
+
/* @__PURE__ */ e(z, { sx: { ml: 12 }, variant: "body2", children: o })
|
|
480
|
+
] }), lo = (o) => /* @__PURE__ */ e(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
|
|
481
481
|
co,
|
|
482
482
|
{
|
|
483
483
|
name: o.row.category,
|
|
@@ -485,7 +485,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
485
485
|
}
|
|
486
486
|
) }), Fe = (o) => {
|
|
487
487
|
const s = o.row.category_guid, n = o.row.top_level_category_guid, t = s === Be.INCOME || n === Be.INCOME, r = o.row[o.field];
|
|
488
|
-
return /* @__PURE__ */ e(
|
|
488
|
+
return /* @__PURE__ */ e(S, { alignItems: "flex-end", direction: "row", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
|
|
489
489
|
Te,
|
|
490
490
|
{
|
|
491
491
|
amount: t ? Math.abs(r) : r,
|
|
@@ -496,15 +496,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
496
496
|
}
|
|
497
497
|
) });
|
|
498
498
|
}, ze = (o, s) => {
|
|
499
|
-
const n =
|
|
499
|
+
const n = U(nt(s.isoDate), B.MONTH_LONG);
|
|
500
500
|
return o[n] = s.amount, o;
|
|
501
501
|
}, $e = (o) => (s, n) => {
|
|
502
|
-
const t =
|
|
502
|
+
const t = U(nt(n.isoDate), B.MONTH_LONG);
|
|
503
503
|
return s + (o.includes(t) ? n.amount : 0);
|
|
504
504
|
}, uo = (o, s) => {
|
|
505
505
|
const n = [], t = new Date(o);
|
|
506
506
|
for (; t <= s; ) {
|
|
507
|
-
const r =
|
|
507
|
+
const r = U(t, B.MONTH_LONG);
|
|
508
508
|
n.push(r), t.setMonth(t.getMonth() + 1);
|
|
509
509
|
}
|
|
510
510
|
return n;
|
|
@@ -552,22 +552,22 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
552
552
|
return [n, ...t, r];
|
|
553
553
|
}, go = (o, s, n, t) => {
|
|
554
554
|
const r = o.map((a) => {
|
|
555
|
-
let
|
|
556
|
-
return t && (
|
|
555
|
+
let d = a.totalMonthlyAmounts;
|
|
556
|
+
return t && (d = a.monthlyAmounts), {
|
|
557
557
|
id: a.guid,
|
|
558
558
|
category: a.name,
|
|
559
559
|
category_guid: a.guid,
|
|
560
560
|
isParent: !1,
|
|
561
561
|
top_level_category_guid: a.parent_guid || a.guid,
|
|
562
|
-
total:
|
|
563
|
-
...
|
|
562
|
+
total: d.reduce($e(n), 0),
|
|
563
|
+
...d.reduce(ze, {})
|
|
564
564
|
};
|
|
565
565
|
});
|
|
566
566
|
if (t) {
|
|
567
567
|
const a = t.monthlyAmounts.reduce($e(n), 0);
|
|
568
568
|
a !== 0 && r.push({
|
|
569
569
|
id: `sub-${t.guid}`,
|
|
570
|
-
category:
|
|
570
|
+
category: Je(s.category_general, t.name),
|
|
571
571
|
category_guid: t.guid,
|
|
572
572
|
isParent: !0,
|
|
573
573
|
top_level_category_guid: t.guid,
|
|
@@ -576,34 +576,34 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
return r;
|
|
579
|
-
},
|
|
579
|
+
}, ut = ({
|
|
580
580
|
selectedDateRange: o,
|
|
581
581
|
selectedCategory: s,
|
|
582
582
|
onClickRow: n,
|
|
583
583
|
height: t = "100%",
|
|
584
584
|
sx: r = {}
|
|
585
585
|
}) => {
|
|
586
|
-
const a = ce(), { onEvent:
|
|
586
|
+
const a = ce(), { onEvent: d } = F(), { trends: u } = k(), { trendsCategories: i } = Z(), h = p.useMemo(() => uo(o.start, o.end), [o]), f = a.palette.mode === "light", l = p.useMemo(() => ho(h, u), [h, u]), y = p.useMemo(() => {
|
|
587
587
|
if (s)
|
|
588
|
-
return
|
|
589
|
-
}, [s,
|
|
590
|
-
let
|
|
591
|
-
return y && (
|
|
592
|
-
(_) => _.monthlyAmounts.some((
|
|
593
|
-
)), go(
|
|
594
|
-
}, [
|
|
595
|
-
return /* @__PURE__ */ e(
|
|
588
|
+
return i.find((m) => m.guid === s);
|
|
589
|
+
}, [s, i]), g = p.useMemo(() => {
|
|
590
|
+
let m = i;
|
|
591
|
+
return y && (m = y.subCategories.filter(
|
|
592
|
+
(_) => _.monthlyAmounts.some((T) => T.amount !== 0)
|
|
593
|
+
)), go(m, u, h, y);
|
|
594
|
+
}, [i, h, y, u]);
|
|
595
|
+
return /* @__PURE__ */ e(A, { sx: { height: t, width: "100%", overflowX: "auto", boxShadow: "none", ...r }, children: /* @__PURE__ */ e(
|
|
596
596
|
Ht,
|
|
597
597
|
{
|
|
598
|
-
columns:
|
|
598
|
+
columns: l,
|
|
599
599
|
disableColumnFilter: !0,
|
|
600
600
|
disableColumnMenu: !0,
|
|
601
601
|
hideFooter: !0,
|
|
602
602
|
initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
|
|
603
|
-
onRowClick: (
|
|
604
|
-
y || n?.(
|
|
605
|
-
...
|
|
606
|
-
listItem:
|
|
603
|
+
onRowClick: (m) => {
|
|
604
|
+
y || n?.(m.row.category_guid), d(x.TRENDS_CLICK_LIST_ITEM, {
|
|
605
|
+
...V,
|
|
606
|
+
listItem: xt[m.row.category_guid]
|
|
607
607
|
});
|
|
608
608
|
},
|
|
609
609
|
rowHeight: 64,
|
|
@@ -633,92 +633,92 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
633
633
|
isOpen: n,
|
|
634
634
|
onClose: t
|
|
635
635
|
}) => {
|
|
636
|
-
const { onEvent: r } =
|
|
637
|
-
() =>
|
|
638
|
-
[
|
|
636
|
+
const { onEvent: r } = F(), { selectedAccountGuids: a } = pe(), { common: d } = k(), { setFilter: u, sortedTransactions: i } = we(), [h, f] = p.useState(""), l = p.useMemo(
|
|
637
|
+
() => i.find((g) => g.guid === h),
|
|
638
|
+
[h, i]
|
|
639
639
|
);
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
p.useEffect(() => {
|
|
641
|
+
u({
|
|
642
642
|
accounts: a,
|
|
643
643
|
dateRange: s,
|
|
644
644
|
custom: (g) => o === "" || o === g.category_guid || o === g.top_level_category_guid,
|
|
645
645
|
showSplits: !!o
|
|
646
646
|
});
|
|
647
|
-
}, [a, o, s]),
|
|
647
|
+
}, [a, o, s]), p.useEffect(() => r(x.TRENDS_VIEW_TRANSACTIONS), []);
|
|
648
648
|
const y = () => {
|
|
649
649
|
f(""), t();
|
|
650
650
|
};
|
|
651
651
|
return /* @__PURE__ */ C(
|
|
652
652
|
Ne,
|
|
653
653
|
{
|
|
654
|
-
ariaLabelClose:
|
|
654
|
+
ariaLabelClose: d.close_aria,
|
|
655
655
|
isOpen: n,
|
|
656
656
|
onClose: y,
|
|
657
657
|
title: mo.title,
|
|
658
658
|
children: [
|
|
659
|
-
|
|
660
|
-
!
|
|
659
|
+
l && /* @__PURE__ */ e(rt, { transaction: l }),
|
|
660
|
+
!l && /* @__PURE__ */ e(at, { onClick: f })
|
|
661
661
|
]
|
|
662
662
|
}
|
|
663
663
|
);
|
|
664
|
-
}, fo =
|
|
665
|
-
const { onEvent: n } =
|
|
666
|
-
|
|
664
|
+
}, fo = R(po), Co = ({ onBackClick: o, sx: s }) => {
|
|
665
|
+
const { onEvent: n } = F(), { isDesktop: t, isTablet: r, isMobile: a } = X(), { visibleAccounts: d } = xe(), { loadMonthlyCategoryTotals: u, monthlyCategoryTotals: i, getCategoryName: h } = Z(), { sortedTransactions: f } = we(), { selectedDateRange: l, setSelectedDateRange: y } = fe(), { isCopyLoaded: g, isInitialized: m, selectedAccounts: _, setSelectedAccounts: T } = pe(), { trends: L } = k(), [I, E] = p.useState(!1), [P, H] = p.useState(!1), [D, $] = p.useState("Chart"), [M, O] = p.useState(""), [N, Q] = p.useState(window.innerHeight), oe = N - (a ? 315 : 345);
|
|
666
|
+
ve({
|
|
667
667
|
widgetName: "TrendsFullWidget",
|
|
668
|
-
isLoaded:
|
|
669
|
-
}),
|
|
670
|
-
const
|
|
671
|
-
return window.addEventListener("resize",
|
|
672
|
-
}, []),
|
|
673
|
-
|
|
674
|
-
}, [
|
|
675
|
-
|
|
668
|
+
isLoaded: I
|
|
669
|
+
}), p.useEffect(() => {
|
|
670
|
+
const w = () => Q(window.innerHeight);
|
|
671
|
+
return window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
|
|
672
|
+
}, []), p.useEffect(() => {
|
|
673
|
+
T(d);
|
|
674
|
+
}, [d]), p.useEffect(() => {
|
|
675
|
+
m && u(
|
|
676
676
|
_,
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
l.start,
|
|
678
|
+
l.end
|
|
679
679
|
).finally(() => {
|
|
680
680
|
E(!0);
|
|
681
681
|
});
|
|
682
|
-
}, [
|
|
683
|
-
const re =
|
|
684
|
-
if (!
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
),
|
|
690
|
-
(
|
|
691
|
-
) : Et(
|
|
682
|
+
}, [m, _, l]);
|
|
683
|
+
const re = p.useMemo(() => {
|
|
684
|
+
if (!I) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
685
|
+
const w = Lt(
|
|
686
|
+
i,
|
|
687
|
+
l.start,
|
|
688
|
+
l.end
|
|
689
|
+
), G = M.length ? w.filter(
|
|
690
|
+
(Y) => Y.top_level_category_guid === M || Y.category_guid === M
|
|
691
|
+
) : Et(w);
|
|
692
692
|
return {
|
|
693
|
-
stackedDatasets:
|
|
694
|
-
unstackedDatasets:
|
|
693
|
+
stackedDatasets: G.filter(Dt),
|
|
694
|
+
unstackedDatasets: G.filter(Mt)
|
|
695
695
|
};
|
|
696
|
-
}, [
|
|
697
|
-
|
|
698
|
-
}, le = (
|
|
699
|
-
const
|
|
700
|
-
y({ start:
|
|
696
|
+
}, [i, M, l]), q = (w, G) => {
|
|
697
|
+
$(G ?? D), n(x.TRENDS_CLICK_TOGGLE_VIEW);
|
|
698
|
+
}, le = (w) => {
|
|
699
|
+
const G = Ue(w?.[0], 1), Y = w?.[1], de = ke(Y, G);
|
|
700
|
+
y({ start: G, end: Y }), n(x.TRENDS_CLICK_TIME_WINDOW, {
|
|
701
701
|
time_period: de + "M"
|
|
702
702
|
});
|
|
703
703
|
}, ne = () => {
|
|
704
|
-
n(
|
|
705
|
-
},
|
|
706
|
-
|
|
707
|
-
}, ae = (
|
|
708
|
-
|
|
709
|
-
},
|
|
710
|
-
n(
|
|
711
|
-
}, ie = (
|
|
712
|
-
n(
|
|
713
|
-
},
|
|
714
|
-
n(
|
|
704
|
+
n(x.TRENDS_CLICK_FILTER);
|
|
705
|
+
}, K = (w) => {
|
|
706
|
+
O(w);
|
|
707
|
+
}, ae = (w) => {
|
|
708
|
+
O(w), n(x.TRENDS_CLICK_LEGEND, { category: h(w) });
|
|
709
|
+
}, J = (w) => {
|
|
710
|
+
n(x.TRENDS_HOVER_LEGEND, { category: h(w) });
|
|
711
|
+
}, ie = (w) => {
|
|
712
|
+
n(x.TRENDS_HOVER_AREA, { category: w });
|
|
713
|
+
}, ee = (w) => {
|
|
714
|
+
n(x.TRENDS_HOVER_POINT, { category: w });
|
|
715
715
|
};
|
|
716
|
-
return !g || !
|
|
717
|
-
|
|
716
|
+
return !g || !m || !I ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
|
|
717
|
+
st,
|
|
718
718
|
{
|
|
719
|
-
accountOptions:
|
|
719
|
+
accountOptions: d,
|
|
720
720
|
calendarActions: { onRangeChanged: le },
|
|
721
|
-
dateRange:
|
|
721
|
+
dateRange: l,
|
|
722
722
|
dateRangeVariant: "timeframebuttons",
|
|
723
723
|
onAccountsFilterClick: ne,
|
|
724
724
|
onBackClick: o,
|
|
@@ -726,7 +726,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
726
726
|
title: L.title,
|
|
727
727
|
children: [
|
|
728
728
|
/* @__PURE__ */ C(
|
|
729
|
-
|
|
729
|
+
S,
|
|
730
730
|
{
|
|
731
731
|
sx: {
|
|
732
732
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -734,49 +734,49 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
734
734
|
},
|
|
735
735
|
children: [
|
|
736
736
|
/* @__PURE__ */ C(
|
|
737
|
-
|
|
737
|
+
S,
|
|
738
738
|
{
|
|
739
739
|
flexDirection: "row",
|
|
740
740
|
justifyContent: "space-between",
|
|
741
741
|
sx: { pb: a ? 12 : 24, pt: a ? 24 : 48 },
|
|
742
742
|
children: [
|
|
743
743
|
/* @__PURE__ */ e(
|
|
744
|
-
|
|
744
|
+
dt,
|
|
745
745
|
{
|
|
746
|
-
selectedCategoryGuid:
|
|
747
|
-
selectedDateRange:
|
|
746
|
+
selectedCategoryGuid: M,
|
|
747
|
+
selectedDateRange: l
|
|
748
748
|
}
|
|
749
749
|
),
|
|
750
|
-
/* @__PURE__ */ e(
|
|
750
|
+
/* @__PURE__ */ e(lt, { onTabChange: q, selectedTab: D })
|
|
751
751
|
]
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
|
-
/* @__PURE__ */ C(
|
|
755
|
-
/* @__PURE__ */ e(
|
|
754
|
+
/* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
755
|
+
/* @__PURE__ */ e(A, { flexGrow: 1, children: M && /* @__PURE__ */ C(be, { onClick: () => O(""), sx: { p: 0, pr: 5 }, children: [
|
|
756
756
|
/* @__PURE__ */ e(_e, { name: "arrow_back" }),
|
|
757
757
|
L.all_categories
|
|
758
758
|
] }) }),
|
|
759
|
-
/* @__PURE__ */ e(be, { onClick: () =>
|
|
759
|
+
/* @__PURE__ */ e(be, { onClick: () => H(!0), sx: { px: 5 }, children: `${L.view_transactions} (${f.length})` })
|
|
760
760
|
] }),
|
|
761
|
-
/* @__PURE__ */ C(
|
|
762
|
-
|
|
761
|
+
/* @__PURE__ */ C(A, { children: [
|
|
762
|
+
D === "Chart" && /* @__PURE__ */ e(
|
|
763
763
|
io,
|
|
764
764
|
{
|
|
765
765
|
availableHeight: oe,
|
|
766
766
|
onClickLegend: ae,
|
|
767
767
|
onHoverArea: ie,
|
|
768
|
-
onHoverLegend:
|
|
769
|
-
onHoverPoint:
|
|
768
|
+
onHoverLegend: J,
|
|
769
|
+
onHoverPoint: ee,
|
|
770
770
|
stackedDatasets: re.stackedDatasets,
|
|
771
771
|
unstackedDatasets: re.unstackedDatasets
|
|
772
772
|
}
|
|
773
773
|
),
|
|
774
|
-
|
|
775
|
-
|
|
774
|
+
D === "Table" && /* @__PURE__ */ e(
|
|
775
|
+
ut,
|
|
776
776
|
{
|
|
777
|
-
onClickRow:
|
|
778
|
-
selectedCategory:
|
|
779
|
-
selectedDateRange:
|
|
777
|
+
onClickRow: K,
|
|
778
|
+
selectedCategory: M,
|
|
779
|
+
selectedDateRange: l
|
|
780
780
|
}
|
|
781
781
|
)
|
|
782
782
|
] })
|
|
@@ -786,17 +786,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
786
786
|
/* @__PURE__ */ e(
|
|
787
787
|
fo,
|
|
788
788
|
{
|
|
789
|
-
categoryGuid:
|
|
790
|
-
dateRange:
|
|
791
|
-
isOpen:
|
|
792
|
-
onClose: () =>
|
|
789
|
+
categoryGuid: M,
|
|
790
|
+
dateRange: l,
|
|
791
|
+
isOpen: P,
|
|
792
|
+
onClose: () => H(!1)
|
|
793
793
|
}
|
|
794
794
|
)
|
|
795
795
|
]
|
|
796
796
|
}
|
|
797
797
|
);
|
|
798
|
-
}, Bn =
|
|
799
|
-
const { monthlyCategoryTotals: o } =
|
|
798
|
+
}, Bn = R(Co), yo = () => {
|
|
799
|
+
const { monthlyCategoryTotals: o } = Z(), { trends: s } = k(), n = ce(), { availableHeight: t = 300 } = Qe(), r = At(o);
|
|
800
800
|
return /* @__PURE__ */ e(
|
|
801
801
|
Oe,
|
|
802
802
|
{
|
|
@@ -813,28 +813,28 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
813
813
|
valueFormatterString: "0,0"
|
|
814
814
|
}
|
|
815
815
|
);
|
|
816
|
-
}, _o =
|
|
817
|
-
const { visibleAccounts: n } =
|
|
818
|
-
return
|
|
816
|
+
}, _o = R(yo), bo = ({ onPrimaryCtaClick: o, sx: s }) => {
|
|
817
|
+
const { visibleAccounts: n } = xe(), { loadMonthlyCategoryTotals: t, monthlyTotalsLoaded: r } = Z(), { isInitialized: a } = We(), { trends: d } = k(), { isCopyLoaded: u, selectedAccounts: i, setSelectedAccounts: h } = pe();
|
|
818
|
+
return ve({
|
|
819
819
|
widgetName: "TrendsMiniWidget",
|
|
820
820
|
isLoaded: r
|
|
821
|
-
}),
|
|
822
|
-
|
|
823
|
-
}, [n]),
|
|
824
|
-
a && t(
|
|
825
|
-
}, [a,
|
|
821
|
+
}), p.useEffect(() => {
|
|
822
|
+
h(n);
|
|
823
|
+
}, [n]), p.useEffect(() => {
|
|
824
|
+
a && t(i).finally();
|
|
825
|
+
}, [a, i]), !u || !a ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
|
|
826
826
|
Wt,
|
|
827
827
|
{
|
|
828
828
|
contentStyles: { height: "calc(100% - 72px)", ":last-child": { pb: 0 } },
|
|
829
829
|
onPrimaryCtaClick: o,
|
|
830
|
-
primaryCtaLabel:
|
|
831
|
-
subTitle:
|
|
830
|
+
primaryCtaLabel: d.primary_cta,
|
|
831
|
+
subTitle: d.sub_title,
|
|
832
832
|
sx: { height: "100%", ...s },
|
|
833
|
-
title:
|
|
833
|
+
title: d.mini_title,
|
|
834
834
|
children: r ? /* @__PURE__ */ e(_o, {}) : /* @__PURE__ */ e(me, {})
|
|
835
835
|
}
|
|
836
836
|
);
|
|
837
|
-
}, Vn =
|
|
837
|
+
}, Vn = R(bo), To = 70, Ke = ({
|
|
838
838
|
title: o,
|
|
839
839
|
totalAmount: s,
|
|
840
840
|
transactionType: n,
|
|
@@ -842,12 +842,12 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
842
842
|
secondaryLabel: r,
|
|
843
843
|
shouldDisplayPercentage: a
|
|
844
844
|
}) => {
|
|
845
|
-
const { availableWidth:
|
|
845
|
+
const { availableWidth: d } = Qe(), u = p.useRef(null), i = p.useRef(null), h = vt(Number(Math.abs(t)), {
|
|
846
846
|
style: "percent",
|
|
847
847
|
minimumIntegerDigits: 1
|
|
848
|
-
}), f =
|
|
848
|
+
}), f = d === 288 && se(s, "0,0.00").length > 10 ? se(s, "0,0") : se(s, "0,0.00"), l = n === "spending" ? t > 0 : t >= 0, y = n === "spending" ? "error.main" : "success.main", g = n === "spending" ? "success.main" : "text.secondary", m = u?.current, _ = i?.current, T = m && _ ? m.scrollWidth > _.clientWidth - To : !1;
|
|
849
849
|
return /* @__PURE__ */ C(
|
|
850
|
-
|
|
850
|
+
S,
|
|
851
851
|
{
|
|
852
852
|
sx: {
|
|
853
853
|
border: 1,
|
|
@@ -860,7 +860,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
860
860
|
},
|
|
861
861
|
children: [
|
|
862
862
|
/* @__PURE__ */ C(
|
|
863
|
-
|
|
863
|
+
S,
|
|
864
864
|
{
|
|
865
865
|
sx: {
|
|
866
866
|
alignItems: "center",
|
|
@@ -869,17 +869,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
869
869
|
},
|
|
870
870
|
children: [
|
|
871
871
|
/* @__PURE__ */ e(ge, { color: "text.secondary", variant: "caption", children: o }),
|
|
872
|
-
a && /* @__PURE__ */ C(
|
|
873
|
-
|
|
872
|
+
a && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
873
|
+
l ? /* @__PURE__ */ e(Gt, { size: 20, sx: { color: y } }) : /* @__PURE__ */ e(Bt, { size: 20, sx: { color: g } }),
|
|
874
874
|
/* @__PURE__ */ e(
|
|
875
875
|
ge,
|
|
876
876
|
{
|
|
877
877
|
sx: {
|
|
878
|
-
color:
|
|
878
|
+
color: l ? y : g,
|
|
879
879
|
fontWeight: 600
|
|
880
880
|
},
|
|
881
881
|
variant: "body2",
|
|
882
|
-
children:
|
|
882
|
+
children: h
|
|
883
883
|
}
|
|
884
884
|
)
|
|
885
885
|
] })
|
|
@@ -887,9 +887,9 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
889
|
/* @__PURE__ */ C(
|
|
890
|
-
|
|
890
|
+
S,
|
|
891
891
|
{
|
|
892
|
-
ref:
|
|
892
|
+
ref: i,
|
|
893
893
|
sx: {
|
|
894
894
|
alignItems: "center",
|
|
895
895
|
flexDirection: "row",
|
|
@@ -897,17 +897,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
897
897
|
},
|
|
898
898
|
children: [
|
|
899
899
|
/* @__PURE__ */ e(
|
|
900
|
-
|
|
900
|
+
A,
|
|
901
901
|
{
|
|
902
|
-
ref:
|
|
902
|
+
ref: u,
|
|
903
903
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
904
904
|
children: /* @__PURE__ */ e(je, { children: f })
|
|
905
905
|
}
|
|
906
906
|
),
|
|
907
|
-
a &&
|
|
907
|
+
a && d >= 450 && !T && /* @__PURE__ */ e(
|
|
908
908
|
ge,
|
|
909
909
|
{
|
|
910
|
-
color:
|
|
910
|
+
color: l ? y : g,
|
|
911
911
|
variant: "caption",
|
|
912
912
|
children: r
|
|
913
913
|
}
|
|
@@ -918,53 +918,53 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
|
-
}, So =
|
|
922
|
-
const { trends: o } =
|
|
923
|
-
return /* @__PURE__ */ C(
|
|
921
|
+
}, So = R(() => {
|
|
922
|
+
const { trends: o } = k();
|
|
923
|
+
return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
924
924
|
/* @__PURE__ */ e(Vt, { size: 32 }),
|
|
925
|
-
/* @__PURE__ */ C(
|
|
925
|
+
/* @__PURE__ */ C(S, { children: [
|
|
926
926
|
/* @__PURE__ */ e(ge, { fontWeight: 600, variant: "body1", children: o.zero_state_content_header }),
|
|
927
927
|
/* @__PURE__ */ e(ge, { color: "text.secondary", variant: "subtitle2", children: o.zero_state_content_description })
|
|
928
928
|
] })
|
|
929
929
|
] });
|
|
930
|
-
}), Pn =
|
|
931
|
-
const { visibleAccounts: s } =
|
|
930
|
+
}), Pn = R(({ onCtaClick: o }) => {
|
|
931
|
+
const { visibleAccounts: s } = xe(), { onEvent: n } = F(), { monthlyCategoryTotals: t, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: a } = Z(), d = {
|
|
932
932
|
start: Ot(/* @__PURE__ */ new Date(), 1),
|
|
933
933
|
end: /* @__PURE__ */ new Date()
|
|
934
|
-
}, { trends:
|
|
935
|
-
|
|
934
|
+
}, { trends: u } = k(), { selectedAccounts: i, setSelectedAccounts: h, isInitialized: f } = pe();
|
|
935
|
+
ve({
|
|
936
936
|
widgetName: "TrendsMicroWidget",
|
|
937
937
|
isLoaded: a
|
|
938
|
-
}),
|
|
939
|
-
|
|
940
|
-
}, [s]),
|
|
941
|
-
f && r(
|
|
942
|
-
n(
|
|
938
|
+
}), p.useEffect(() => {
|
|
939
|
+
h(s);
|
|
940
|
+
}, [s]), p.useEffect(() => {
|
|
941
|
+
f && r(i, d.start).then(() => {
|
|
942
|
+
n(x.TRENDS_LOAD_WIDGET, {
|
|
943
943
|
state: s?.length ? "default" : "zeroState"
|
|
944
944
|
});
|
|
945
945
|
});
|
|
946
|
-
}, [f,
|
|
947
|
-
const { spendingData:
|
|
946
|
+
}, [f, i]);
|
|
947
|
+
const { spendingData: l, incomeData: y } = p.useMemo(
|
|
948
948
|
() => ({
|
|
949
|
-
spendingData:
|
|
950
|
-
incomeData:
|
|
949
|
+
spendingData: tt(t, d),
|
|
950
|
+
incomeData: ot(t, d)
|
|
951
951
|
}),
|
|
952
|
-
[t,
|
|
953
|
-
), [g,
|
|
952
|
+
[t, d]
|
|
953
|
+
), [g, m] = l, [_, T] = y, L = Pe(m.y, g.y), I = Pe(T.y, _.y), E = f && !s?.length, P = () => {
|
|
954
954
|
n(
|
|
955
|
-
E ?
|
|
955
|
+
E ? x.TRENDS_CLICK_GET_STARTED : x.TRENDS_CLICK_VIEW_MORE
|
|
956
956
|
), o();
|
|
957
957
|
};
|
|
958
958
|
return !a || !f ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
|
|
959
959
|
zt,
|
|
960
960
|
{
|
|
961
961
|
className: "mx-trends-microwidget",
|
|
962
|
-
ctaLabel:
|
|
963
|
-
onCTAClick:
|
|
964
|
-
subHeader: E ? void 0 :
|
|
965
|
-
title:
|
|
962
|
+
ctaLabel: u.micro_primary_cta_label,
|
|
963
|
+
onCTAClick: P,
|
|
964
|
+
subHeader: E ? void 0 : u.micro_subheader,
|
|
965
|
+
title: u.title,
|
|
966
966
|
children: E ? /* @__PURE__ */ e(So, {}) : /* @__PURE__ */ C(
|
|
967
|
-
|
|
967
|
+
S,
|
|
968
968
|
{
|
|
969
969
|
sx: {
|
|
970
970
|
alignItems: "stretch",
|
|
@@ -976,21 +976,21 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
976
976
|
Ke,
|
|
977
977
|
{
|
|
978
978
|
percentage: L,
|
|
979
|
-
secondaryLabel:
|
|
980
|
-
shouldDisplayPercentage:
|
|
981
|
-
title:
|
|
982
|
-
totalAmount:
|
|
979
|
+
secondaryLabel: u.micro_secondary_label,
|
|
980
|
+
shouldDisplayPercentage: m.y !== 0 && g.y !== 0,
|
|
981
|
+
title: u.spending_label,
|
|
982
|
+
totalAmount: m.y,
|
|
983
983
|
transactionType: "spending"
|
|
984
984
|
}
|
|
985
985
|
),
|
|
986
986
|
/* @__PURE__ */ e(
|
|
987
987
|
Ke,
|
|
988
988
|
{
|
|
989
|
-
percentage:
|
|
990
|
-
secondaryLabel:
|
|
991
|
-
shouldDisplayPercentage:
|
|
992
|
-
title:
|
|
993
|
-
totalAmount:
|
|
989
|
+
percentage: I,
|
|
990
|
+
secondaryLabel: u.micro_secondary_label,
|
|
991
|
+
shouldDisplayPercentage: T.y !== 0 && _.y !== 0,
|
|
992
|
+
title: u.income_label,
|
|
993
|
+
totalAmount: T.y,
|
|
994
994
|
transactionType: "income"
|
|
995
995
|
}
|
|
996
996
|
)
|
|
@@ -999,15 +999,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
999
999
|
)
|
|
1000
1000
|
}
|
|
1001
1001
|
);
|
|
1002
|
-
}),
|
|
1002
|
+
}), wo = R(
|
|
1003
1003
|
({ isExpanded: o, onClick: s }) => {
|
|
1004
|
-
const n =
|
|
1004
|
+
const n = it();
|
|
1005
1005
|
return /* @__PURE__ */ e(Yt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(jt, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
|
|
1006
|
-
|
|
1006
|
+
S,
|
|
1007
1007
|
{
|
|
1008
1008
|
sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
1009
1009
|
children: [
|
|
1010
|
-
/* @__PURE__ */ e(Xt, { children: /* @__PURE__ */ e(
|
|
1010
|
+
/* @__PURE__ */ e(Xt, { children: /* @__PURE__ */ e(z, { bold: !0, variant: "body2", children: o ? "View less" : "View more" }) }),
|
|
1011
1011
|
/* @__PURE__ */ e(Ut, { sx: { color: n.palette.primary.main }, children: o ? /* @__PURE__ */ e(Pt, {}) : /* @__PURE__ */ e(
|
|
1012
1012
|
Ft,
|
|
1013
1013
|
{
|
|
@@ -1021,7 +1021,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
) }) });
|
|
1023
1023
|
}
|
|
1024
|
-
), Ye =
|
|
1024
|
+
), Ye = R(
|
|
1025
1025
|
({
|
|
1026
1026
|
totalAmount: o,
|
|
1027
1027
|
guid: s,
|
|
@@ -1029,106 +1029,106 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1029
1029
|
transactions: t,
|
|
1030
1030
|
onClick: r,
|
|
1031
1031
|
isLastItem: a = !1,
|
|
1032
|
-
showDivider:
|
|
1032
|
+
showDivider: d = !0
|
|
1033
1033
|
}) => {
|
|
1034
|
-
const { trends:
|
|
1035
|
-
r?.(),
|
|
1036
|
-
...
|
|
1034
|
+
const { trends: u } = k(), { onEvent: i } = F(), h = `${t.length} ${t.length === 1 ? u.transaction : u.transactions}`, f = () => {
|
|
1035
|
+
r?.(), i(x.TRENDS_CLICK_LIST_ITEM, {
|
|
1036
|
+
...V,
|
|
1037
1037
|
listItem: n
|
|
1038
1038
|
});
|
|
1039
1039
|
};
|
|
1040
|
-
return /* @__PURE__ */ C(
|
|
1040
|
+
return /* @__PURE__ */ C(p.Fragment, { children: [
|
|
1041
1041
|
/* @__PURE__ */ e(
|
|
1042
|
-
|
|
1042
|
+
et,
|
|
1043
1043
|
{
|
|
1044
1044
|
leftIcon: s ? /* @__PURE__ */ e(Se, { categoryGuid: s }) : void 0,
|
|
1045
1045
|
onClick: f,
|
|
1046
1046
|
rightContent: se(Math.abs(o), "0,0.00"),
|
|
1047
|
-
rightIcon: r ? /* @__PURE__ */ e(
|
|
1048
|
-
subtitle:
|
|
1047
|
+
rightIcon: r ? /* @__PURE__ */ e(yt, {}) : void 0,
|
|
1048
|
+
subtitle: h,
|
|
1049
1049
|
title: n
|
|
1050
1050
|
}
|
|
1051
1051
|
),
|
|
1052
|
-
|
|
1052
|
+
d && /* @__PURE__ */ e(He, { sx: { ml: a ? 24 : 68 } })
|
|
1053
1053
|
] }, s);
|
|
1054
1054
|
}
|
|
1055
|
-
),
|
|
1055
|
+
), xo = R(
|
|
1056
1056
|
({ availableHeight: o = 0, onCategoryClick: s }) => {
|
|
1057
|
-
const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = fe(), { isLargeDesktop: a, isDesktop:
|
|
1058
|
-
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1057
|
+
const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = fe(), { isLargeDesktop: a, isDesktop: d } = X(), { trends: u } = k(), { onEvent: i } = F(), [h, f] = p.useState(!1), l = d || a;
|
|
1058
|
+
p.useEffect(() => {
|
|
1059
|
+
const m = Math.floor(o / 64) - 1, _ = t.length + n.length;
|
|
1060
|
+
m !== t.length && (r(l ? Math.max(m, 5) : 5), f(m >= _));
|
|
1061
1061
|
}, [o]);
|
|
1062
1062
|
const y = () => {
|
|
1063
|
-
f(!
|
|
1064
|
-
...
|
|
1063
|
+
f(!h), i(x.TRENDS_CLICK_VIEW_MORE, {
|
|
1064
|
+
...V
|
|
1065
1065
|
});
|
|
1066
|
-
}, g = t.length + (
|
|
1067
|
-
return /* @__PURE__ */ e(
|
|
1068
|
-
/* @__PURE__ */ e(
|
|
1069
|
-
t.map((
|
|
1066
|
+
}, g = t.length + (h ? n.length : 0);
|
|
1067
|
+
return /* @__PURE__ */ e(S, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Kt, { children: [
|
|
1068
|
+
/* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(je, { children: u.categories }) }),
|
|
1069
|
+
t.map((m, _) => /* @__PURE__ */ e(
|
|
1070
1070
|
Ye,
|
|
1071
1071
|
{
|
|
1072
|
-
...
|
|
1072
|
+
...m,
|
|
1073
1073
|
isLastItem: _ === g - 1,
|
|
1074
|
-
onClick:
|
|
1074
|
+
onClick: m.transactions.length > 0 ? () => s(m) : void 0,
|
|
1075
1075
|
showDivider: !0
|
|
1076
1076
|
},
|
|
1077
|
-
|
|
1077
|
+
m.guid
|
|
1078
1078
|
)),
|
|
1079
1079
|
/* @__PURE__ */ e(
|
|
1080
1080
|
$t,
|
|
1081
1081
|
{
|
|
1082
|
-
in:
|
|
1082
|
+
in: h,
|
|
1083
1083
|
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
1084
|
-
children: n.map((
|
|
1085
|
-
const
|
|
1084
|
+
children: n.map((m, _) => {
|
|
1085
|
+
const T = t.length + _;
|
|
1086
1086
|
return /* @__PURE__ */ e(
|
|
1087
1087
|
Ye,
|
|
1088
1088
|
{
|
|
1089
|
-
...
|
|
1090
|
-
isLastItem:
|
|
1091
|
-
onClick:
|
|
1089
|
+
...m,
|
|
1090
|
+
isLastItem: T === g - 1,
|
|
1091
|
+
onClick: m.transactions.length > 0 ? () => s(m) : void 0,
|
|
1092
1092
|
showDivider: !0
|
|
1093
1093
|
},
|
|
1094
|
-
|
|
1094
|
+
m.guid
|
|
1095
1095
|
);
|
|
1096
1096
|
})
|
|
1097
1097
|
}
|
|
1098
1098
|
),
|
|
1099
|
-
n.length > 0 && /* @__PURE__ */ e(
|
|
1099
|
+
n.length > 0 && /* @__PURE__ */ e(wo, { isExpanded: h, onClick: y })
|
|
1100
1100
|
] }) });
|
|
1101
1101
|
}
|
|
1102
|
-
),
|
|
1103
|
-
const { onEvent: n } =
|
|
1104
|
-
s?.(
|
|
1105
|
-
}, g =
|
|
1106
|
-
return /* @__PURE__ */ e(Zt, { sx: { height:
|
|
1102
|
+
), vo = ({ beats: o, onInsightCardClick: s }) => {
|
|
1103
|
+
const { onEvent: n } = F(), { isMobile: t, isDesktop: r, isLargeDesktop: a } = X(), { beatStore: d, endpoint: u, sessionToken: i } = We(), h = r || a, f = h || t ? 1 : 2, l = () => null, y = (I) => {
|
|
1104
|
+
s?.(I), n(x.TRENDS_CLICK_INSIGHT, V);
|
|
1105
|
+
}, g = h ? 200 : 170, m = h ? 170 : 124, _ = h ? 56 : 0, T = o.length > 0 ? g + _ : m, L = h && o.length > 0 ? g : void 0;
|
|
1106
|
+
return /* @__PURE__ */ e(Zt, { sx: { height: T }, children: /* @__PURE__ */ e(
|
|
1107
1107
|
Nt,
|
|
1108
1108
|
{
|
|
1109
|
-
areBeatsLoading:
|
|
1109
|
+
areBeatsLoading: d.isLoading,
|
|
1110
1110
|
beats: o,
|
|
1111
|
-
endpoint:
|
|
1111
|
+
endpoint: u,
|
|
1112
1112
|
heightOverrides: L,
|
|
1113
|
-
logOutUser:
|
|
1113
|
+
logOutUser: l,
|
|
1114
1114
|
onCardClick: y,
|
|
1115
1115
|
showBorder: !0,
|
|
1116
1116
|
showCTAColocatedWithText: !1,
|
|
1117
1117
|
showCarouselControls: !0,
|
|
1118
|
-
showHeader:
|
|
1118
|
+
showHeader: h,
|
|
1119
1119
|
showIcon: !0,
|
|
1120
1120
|
showWithMargin: !1,
|
|
1121
|
-
token:
|
|
1121
|
+
token: i,
|
|
1122
1122
|
userHasFullInsightFeedBeats: !1,
|
|
1123
1123
|
variant: "outlined",
|
|
1124
1124
|
visibleCardsCount: f
|
|
1125
1125
|
}
|
|
1126
1126
|
) });
|
|
1127
|
-
}, Io =
|
|
1128
|
-
const { onEvent: n } =
|
|
1127
|
+
}, Io = R(vo), Lo = R(({ chartLabel: o, chartColor: s }) => {
|
|
1128
|
+
const { onEvent: n } = F(), {
|
|
1129
1129
|
categoryDetailsChartData: { monthlyAmounts: t, tooltipLabels: r }
|
|
1130
1130
|
} = fe();
|
|
1131
|
-
return /* @__PURE__ */ e(
|
|
1131
|
+
return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
1132
1132
|
Oe,
|
|
1133
1133
|
{
|
|
1134
1134
|
baseline: "min",
|
|
@@ -1142,7 +1142,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1142
1142
|
stroke: s
|
|
1143
1143
|
}),
|
|
1144
1144
|
onItemClick: () => {
|
|
1145
|
-
n(
|
|
1145
|
+
n(x.TRENDS_CLICK_CHART, V);
|
|
1146
1146
|
},
|
|
1147
1147
|
showArea: !0,
|
|
1148
1148
|
showAverage: !0,
|
|
@@ -1157,100 +1157,100 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1157
1157
|
valueFormatterString: "0,0"
|
|
1158
1158
|
}
|
|
1159
1159
|
) });
|
|
1160
|
-
}), Eo =
|
|
1161
|
-
const s =
|
|
1162
|
-
if (!
|
|
1160
|
+
}), Eo = R(({ onClose: o }) => {
|
|
1161
|
+
const s = it(), { is_mobile_webview: n } = qe(), { isDesktop: t, isSmallTablet: r, isTablet: a } = X(), { onEvent: d } = F(), { common: u, trends: i } = k(), { selectedCategoryData: h, selectedDateRangeMonthRange: f } = fe(), { sortedTransactions: l } = we(), [y, g] = p.useState(null);
|
|
1162
|
+
if (!h)
|
|
1163
1163
|
return null;
|
|
1164
|
-
const { guid:
|
|
1165
|
-
() =>
|
|
1166
|
-
[
|
|
1167
|
-
),
|
|
1168
|
-
o?.(),
|
|
1164
|
+
const { guid: m, name: _, is_income: T, totalAmount: L } = h, I = T ? i.category_income : i.category_spending, E = qt(m, s), P = T ? i.income_label : i.spending_label, H = ` ${h.transactions.length === 1 ? i.transaction : i.transactions} (${h.transactions.length})`, D = p.useMemo(
|
|
1165
|
+
() => l.find((N) => N.guid === y),
|
|
1166
|
+
[y, l]
|
|
1167
|
+
), $ = l.length > 0 && !n && (t || a && !r), M = (N) => N.category_guid === m || N.top_level_category_guid === m, O = () => {
|
|
1168
|
+
o?.(), d(x.TRENDS_CLICK_BACK, V);
|
|
1169
1169
|
};
|
|
1170
1170
|
return /* @__PURE__ */ C(
|
|
1171
1171
|
Ne,
|
|
1172
1172
|
{
|
|
1173
|
-
ariaLabelClose:
|
|
1173
|
+
ariaLabelClose: i.close_category_details,
|
|
1174
1174
|
isOpen: !0,
|
|
1175
|
-
onClose:
|
|
1175
|
+
onClose: O,
|
|
1176
1176
|
shouldShowHeaderShadow: !0,
|
|
1177
|
-
title:
|
|
1177
|
+
title: I,
|
|
1178
1178
|
children: [
|
|
1179
|
-
/* @__PURE__ */ C(
|
|
1179
|
+
/* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1180
1180
|
/* @__PURE__ */ C(Qt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
1181
1181
|
/* @__PURE__ */ e(
|
|
1182
|
-
|
|
1182
|
+
et,
|
|
1183
1183
|
{
|
|
1184
|
-
leftIcon: /* @__PURE__ */ e(Se, { categoryGuid:
|
|
1185
|
-
rightContent: se(Math.abs(
|
|
1186
|
-
subtitle:
|
|
1187
|
-
title:
|
|
1184
|
+
leftIcon: /* @__PURE__ */ e(Se, { categoryGuid: m }),
|
|
1185
|
+
rightContent: se(Math.abs(L), "0,0.00"),
|
|
1186
|
+
subtitle: f,
|
|
1187
|
+
title: _
|
|
1188
1188
|
}
|
|
1189
1189
|
),
|
|
1190
|
-
/* @__PURE__ */ e(Lo, { chartColor:
|
|
1191
|
-
/* @__PURE__ */ C(
|
|
1192
|
-
/* @__PURE__ */ e(
|
|
1193
|
-
/* @__PURE__ */ e(Jt, { filter:
|
|
1190
|
+
/* @__PURE__ */ e(Lo, { chartColor: E, chartLabel: P }),
|
|
1191
|
+
/* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
1192
|
+
/* @__PURE__ */ e(z, { bold: !0, variant: "body1", children: H }),
|
|
1193
|
+
$ && /* @__PURE__ */ e(Jt, { filter: M })
|
|
1194
1194
|
] })
|
|
1195
1195
|
] }),
|
|
1196
1196
|
/* @__PURE__ */ e(
|
|
1197
|
-
|
|
1197
|
+
at,
|
|
1198
1198
|
{
|
|
1199
1199
|
bgcolor: "transparent",
|
|
1200
|
-
filter:
|
|
1200
|
+
filter: M,
|
|
1201
1201
|
height: "calc(100vh - 475px)",
|
|
1202
|
-
onClick:
|
|
1202
|
+
onClick: g
|
|
1203
1203
|
}
|
|
1204
1204
|
)
|
|
1205
1205
|
] }),
|
|
1206
1206
|
/* @__PURE__ */ e(
|
|
1207
1207
|
Ne,
|
|
1208
1208
|
{
|
|
1209
|
-
ariaLabelClose:
|
|
1210
|
-
isOpen: !!
|
|
1211
|
-
onClose: () =>
|
|
1212
|
-
title:
|
|
1213
|
-
children:
|
|
1209
|
+
ariaLabelClose: u.close_aria,
|
|
1210
|
+
isOpen: !!D,
|
|
1211
|
+
onClose: () => g(""),
|
|
1212
|
+
title: i.transaction,
|
|
1213
|
+
children: D && /* @__PURE__ */ e(rt, { transaction: D })
|
|
1214
1214
|
}
|
|
1215
1215
|
)
|
|
1216
1216
|
]
|
|
1217
1217
|
}
|
|
1218
1218
|
);
|
|
1219
1219
|
}), Do = (o, s) => {
|
|
1220
|
-
const n =
|
|
1220
|
+
const n = ot(o, s), t = tt(o, s);
|
|
1221
1221
|
return [n, t].filter((r) => r.length > 0);
|
|
1222
1222
|
}, Mo = (o, s) => {
|
|
1223
|
-
const [n, t] = o, r = n, a = t ?? n,
|
|
1223
|
+
const [n, t] = o, r = n, a = t ?? n, d = [];
|
|
1224
1224
|
if (r) {
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1225
|
+
const u = r.reduce((i, h) => i + h.y, 0);
|
|
1226
|
+
d.push({ label: s.income_label, amount: u });
|
|
1227
1227
|
}
|
|
1228
1228
|
if (a) {
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1229
|
+
const u = a.reduce((i, h) => i + h.y, 0);
|
|
1230
|
+
d.push({ label: s.spending_label, amount: u });
|
|
1231
1231
|
}
|
|
1232
|
-
return
|
|
1232
|
+
return d;
|
|
1233
1233
|
}, Ao = ({
|
|
1234
1234
|
availableHeight: o = 0,
|
|
1235
1235
|
minHeight: s = 500,
|
|
1236
1236
|
selectedDateRange: n,
|
|
1237
1237
|
totals: t
|
|
1238
1238
|
}) => {
|
|
1239
|
-
const r = ce(), { onEvent: a } =
|
|
1240
|
-
return
|
|
1241
|
-
const
|
|
1242
|
-
_(
|
|
1239
|
+
const r = ce(), { onEvent: a } = F(), { trends: d } = k(), { isSmallMobile: u, isMobile: i, isSmallTablet: h, isTablet: f } = X(), l = [r.palette.chart?.chart1, r.palette.chart?.chart2], y = Do(t, n), g = Mo(y, d), [m, _] = p.useState(0), T = 458, L = 195, I = 56, E = i || u ? L : h || f ? T : m;
|
|
1240
|
+
return p.useEffect(() => {
|
|
1241
|
+
const H = Math.max(o - I, s);
|
|
1242
|
+
_(H);
|
|
1243
1243
|
}, [o]), /* @__PURE__ */ e(
|
|
1244
1244
|
Oe,
|
|
1245
1245
|
{
|
|
1246
1246
|
baseline: "min",
|
|
1247
|
-
colors:
|
|
1247
|
+
colors: l,
|
|
1248
1248
|
curveType: "bump",
|
|
1249
1249
|
datasets: y,
|
|
1250
1250
|
height: E,
|
|
1251
1251
|
labels: g,
|
|
1252
1252
|
onItemClick: () => {
|
|
1253
|
-
a(
|
|
1253
|
+
a(x.TRENDS_CLICK_CHART, V);
|
|
1254
1254
|
},
|
|
1255
1255
|
showArea: !0,
|
|
1256
1256
|
showAxisHighlight: !0,
|
|
@@ -1263,7 +1263,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1263
1263
|
valueFormatterString: "0.0a"
|
|
1264
1264
|
}
|
|
1265
1265
|
);
|
|
1266
|
-
}, Ro =
|
|
1266
|
+
}, Ro = R(Ao), ko = [
|
|
1267
1267
|
"BillAmountNotStandard",
|
|
1268
1268
|
"CategorySpendingV2",
|
|
1269
1269
|
"CostOfLivingToIncome",
|
|
@@ -1298,149 +1298,149 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1298
1298
|
"WeeklyNoSpendDays",
|
|
1299
1299
|
"WeeklySmallPurchasesSummary"
|
|
1300
1300
|
], Ho = ({ onBackClick: o, onInsightCardClick: s, sx: n }) => {
|
|
1301
|
-
const { onEvent: t } =
|
|
1302
|
-
isCopyLoaded:
|
|
1301
|
+
const { onEvent: t } = F(), { config: r } = qe(), { isLargeDesktop: a, isDesktop: d, isMobile: u } = X(), { visibleAccounts: i } = xe(), { loadDateRangeCategoryTotals: h, loadMonthlyCategoryTotals: f, monthlyCategoryTotals: l } = Z(), { setFilter: y } = we(), { selectedDateRange: g, setSelectedCategoryData: m, setSelectedDateRange: _ } = fe(), {
|
|
1302
|
+
isCopyLoaded: T,
|
|
1303
1303
|
isInitialized: L,
|
|
1304
|
-
selectedAccounts:
|
|
1304
|
+
selectedAccounts: I,
|
|
1305
1305
|
selectedAccountGuids: E,
|
|
1306
|
-
setSelectedAccounts:
|
|
1307
|
-
} = pe(), { trends:
|
|
1308
|
-
() =>
|
|
1309
|
-
[
|
|
1306
|
+
setSelectedAccounts: P
|
|
1307
|
+
} = pe(), { trends: H, connect: D } = k(), { beatStore: $ } = We(), O = eo() && r.show_insights_widget_in_master, N = d || a, [Q, Ce] = p.useState(!1), [oe, re] = p.useState(!1), [q, le] = p.useState("Chart"), [ne, K] = p.useState(""), [ae, J] = p.useState(!1), [ie, ee] = p.useState(window.innerHeight), w = N ? 56 : 0, G = ie - 208, Y = ie - (O ? 550 + w : 266), [de, ye] = p.useState(!1), Ie = r.show_connections_widget_in_master ? "buttons" : "no-buttons", c = p.useMemo(
|
|
1308
|
+
() => i && i.length === 0 || l.length === 0,
|
|
1309
|
+
[i, l]
|
|
1310
1310
|
);
|
|
1311
|
-
|
|
1311
|
+
ve({
|
|
1312
1312
|
widgetName: "TrendsWidget",
|
|
1313
|
-
isLoaded:
|
|
1314
|
-
}),
|
|
1315
|
-
L &&
|
|
1313
|
+
isLoaded: Q
|
|
1314
|
+
}), p.useEffect(() => {
|
|
1315
|
+
L && $.loadBeats().finally(() => re(!0));
|
|
1316
1316
|
}, [L]);
|
|
1317
|
-
const b =
|
|
1318
|
-
|
|
1319
|
-
const
|
|
1320
|
-
return window.addEventListener("resize",
|
|
1321
|
-
}, []),
|
|
1322
|
-
|
|
1323
|
-
}, [
|
|
1317
|
+
const b = p.useMemo(() => oe ? $.getFilteredBeats({ templates: ko }) : [], [oe]);
|
|
1318
|
+
p.useEffect(() => {
|
|
1319
|
+
const W = () => ee(window.innerHeight);
|
|
1320
|
+
return window.addEventListener("resize", W), () => window.removeEventListener("resize", W);
|
|
1321
|
+
}, []), p.useEffect(() => {
|
|
1322
|
+
P(i);
|
|
1323
|
+
}, [i]), p.useEffect(() => {
|
|
1324
1324
|
L && Promise.all([
|
|
1325
|
-
|
|
1326
|
-
|
|
1325
|
+
h(
|
|
1326
|
+
I,
|
|
1327
1327
|
g.start,
|
|
1328
1328
|
g.end
|
|
1329
1329
|
),
|
|
1330
|
-
f(
|
|
1330
|
+
f(I, g.start, g.end)
|
|
1331
1331
|
]).finally(() => {
|
|
1332
|
-
Ce(!0), t(
|
|
1333
|
-
...
|
|
1332
|
+
Ce(!0), t(x.TRENDS_LOAD_WIDGET, {
|
|
1333
|
+
...V,
|
|
1334
1334
|
time_period: `${ke(g.end, g.start)}M`
|
|
1335
1335
|
});
|
|
1336
1336
|
});
|
|
1337
|
-
}, [L,
|
|
1338
|
-
if (
|
|
1339
|
-
const
|
|
1337
|
+
}, [L, I, g]), p.useEffect(() => {
|
|
1338
|
+
if (l.length !== 0) {
|
|
1339
|
+
const W = {
|
|
1340
1340
|
accounts: E,
|
|
1341
1341
|
dateRange: { start: g.start, end: g.end }
|
|
1342
1342
|
};
|
|
1343
1343
|
y({
|
|
1344
|
-
...
|
|
1345
|
-
custom: (
|
|
1346
|
-
(he) => he.top_level_category_guid ===
|
|
1344
|
+
...W,
|
|
1345
|
+
custom: (te) => !!l.find(
|
|
1346
|
+
(he) => he.top_level_category_guid === te.top_level_category_guid || he.category_guid === te.category_guid
|
|
1347
1347
|
)
|
|
1348
1348
|
});
|
|
1349
1349
|
}
|
|
1350
|
-
}, [
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1353
|
-
},
|
|
1354
|
-
|
|
1350
|
+
}, [l]);
|
|
1351
|
+
const v = (W) => {
|
|
1352
|
+
m(W), J(!0);
|
|
1353
|
+
}, j = () => {
|
|
1354
|
+
m(null), J(!1);
|
|
1355
1355
|
}, Le = () => {
|
|
1356
|
-
ye(!0), t(
|
|
1357
|
-
}, Ee = (
|
|
1358
|
-
le(
|
|
1359
|
-
...
|
|
1360
|
-
toggleView:
|
|
1356
|
+
ye(!0), t(x.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
1357
|
+
}, Ee = (W, te) => {
|
|
1358
|
+
le(te ?? q), t(x.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
1359
|
+
...V,
|
|
1360
|
+
toggleView: te
|
|
1361
1361
|
});
|
|
1362
|
-
}, ue = (
|
|
1363
|
-
const
|
|
1364
|
-
_({ start:
|
|
1365
|
-
...
|
|
1366
|
-
time_period:
|
|
1362
|
+
}, ue = (W) => {
|
|
1363
|
+
const te = Ue(W?.[0], 1), he = W?.[1], gt = ke(he, te);
|
|
1364
|
+
_({ start: te, end: he }), t(x.TRENDS_CLICK_TIME_WINDOW, {
|
|
1365
|
+
...V,
|
|
1366
|
+
time_period: gt + "M"
|
|
1367
1367
|
});
|
|
1368
|
-
}, De = (
|
|
1369
|
-
t(
|
|
1370
|
-
...
|
|
1371
|
-
filterValue:
|
|
1368
|
+
}, De = (W) => {
|
|
1369
|
+
t(x.TRENDS_CLICK_FILTER, {
|
|
1370
|
+
...V,
|
|
1371
|
+
filterValue: W
|
|
1372
1372
|
});
|
|
1373
|
-
}, Me = (
|
|
1374
|
-
|
|
1375
|
-
},
|
|
1376
|
-
|
|
1373
|
+
}, Me = (W) => {
|
|
1374
|
+
K(W);
|
|
1375
|
+
}, ht = () => {
|
|
1376
|
+
K(""), t(x.TRENDS_CLICK_ALL_CATEGORIES, V);
|
|
1377
1377
|
};
|
|
1378
|
-
return !
|
|
1379
|
-
|
|
1378
|
+
return !T || !Q ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
|
|
1379
|
+
st,
|
|
1380
1380
|
{
|
|
1381
|
-
accountOptions:
|
|
1381
|
+
accountOptions: i,
|
|
1382
1382
|
calendarActions: { onRangeChanged: ue },
|
|
1383
1383
|
dateRange: g,
|
|
1384
|
-
dateRangeVariant:
|
|
1384
|
+
dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
|
|
1385
1385
|
onAccountsFilterClick: De,
|
|
1386
1386
|
onBackClick: o,
|
|
1387
1387
|
sx: n,
|
|
1388
|
-
title:
|
|
1388
|
+
title: H.title,
|
|
1389
1389
|
children: [
|
|
1390
|
-
|
|
1390
|
+
c && /* @__PURE__ */ e(
|
|
1391
1391
|
to,
|
|
1392
1392
|
{
|
|
1393
|
-
header:
|
|
1393
|
+
header: H.zero_state_content_header,
|
|
1394
1394
|
icon: "",
|
|
1395
1395
|
onClick: Le,
|
|
1396
|
-
primaryButton:
|
|
1397
|
-
subText:
|
|
1398
|
-
sx: { height:
|
|
1396
|
+
primaryButton: H.empty_state_primary,
|
|
1397
|
+
subText: H.empty_state_sub_text,
|
|
1398
|
+
sx: { height: G },
|
|
1399
1399
|
variant: Ie
|
|
1400
1400
|
}
|
|
1401
1401
|
),
|
|
1402
|
-
!
|
|
1403
|
-
|
|
1402
|
+
!c && /* @__PURE__ */ C(
|
|
1403
|
+
S,
|
|
1404
1404
|
{
|
|
1405
1405
|
sx: {
|
|
1406
|
-
px:
|
|
1406
|
+
px: u ? 0 : 48
|
|
1407
1407
|
},
|
|
1408
1408
|
children: [
|
|
1409
1409
|
/* @__PURE__ */ C(
|
|
1410
|
-
|
|
1410
|
+
S,
|
|
1411
1411
|
{
|
|
1412
1412
|
flexDirection: "row",
|
|
1413
1413
|
justifyContent: "space-between",
|
|
1414
|
-
sx: { pb:
|
|
1414
|
+
sx: { pb: u ? 12 : 24, pt: u ? 24 : 48 },
|
|
1415
1415
|
children: [
|
|
1416
1416
|
/* @__PURE__ */ e(
|
|
1417
|
-
|
|
1417
|
+
dt,
|
|
1418
1418
|
{
|
|
1419
1419
|
selectedCategoryGuid: ne,
|
|
1420
1420
|
selectedDateRange: g
|
|
1421
1421
|
}
|
|
1422
1422
|
),
|
|
1423
|
-
/* @__PURE__ */ e(
|
|
1423
|
+
/* @__PURE__ */ e(lt, { onTabChange: Ee, selectedTab: q })
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
1426
1426
|
),
|
|
1427
|
-
/* @__PURE__ */ e(
|
|
1427
|
+
/* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(A, { flexGrow: 1, children: ne && /* @__PURE__ */ C(be, { onClick: ht, sx: { p: 0, pr: 5 }, children: [
|
|
1428
1428
|
/* @__PURE__ */ e(_e, { name: "arrow_back" }),
|
|
1429
|
-
|
|
1429
|
+
H.all_categories
|
|
1430
1430
|
] }) }) }),
|
|
1431
|
-
/* @__PURE__ */ C(
|
|
1432
|
-
|
|
1433
|
-
/* @__PURE__ */ e(
|
|
1431
|
+
/* @__PURE__ */ C(S, { flexDirection: N ? "row" : "column", gap: N ? 48 : 16, children: [
|
|
1432
|
+
q === "Chart" && /* @__PURE__ */ C(mt, { children: [
|
|
1433
|
+
/* @__PURE__ */ e(A, { sx: { width: N ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
1434
1434
|
Ro,
|
|
1435
1435
|
{
|
|
1436
|
-
availableHeight:
|
|
1436
|
+
availableHeight: G,
|
|
1437
1437
|
minHeight: 450,
|
|
1438
1438
|
selectedDateRange: g,
|
|
1439
|
-
totals:
|
|
1439
|
+
totals: l
|
|
1440
1440
|
}
|
|
1441
1441
|
) }),
|
|
1442
|
-
/* @__PURE__ */ C(
|
|
1443
|
-
|
|
1442
|
+
/* @__PURE__ */ C(S, { gap: 16, sx: { width: N ? "32%" : "100%" }, children: [
|
|
1443
|
+
O && oe && b.length > 0 && /* @__PURE__ */ e(
|
|
1444
1444
|
Io,
|
|
1445
1445
|
{
|
|
1446
1446
|
beats: b,
|
|
@@ -1448,16 +1448,16 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
),
|
|
1450
1450
|
/* @__PURE__ */ e(
|
|
1451
|
-
|
|
1451
|
+
xo,
|
|
1452
1452
|
{
|
|
1453
|
-
availableHeight:
|
|
1454
|
-
onCategoryClick:
|
|
1453
|
+
availableHeight: Y,
|
|
1454
|
+
onCategoryClick: v
|
|
1455
1455
|
}
|
|
1456
1456
|
)
|
|
1457
1457
|
] })
|
|
1458
1458
|
] }),
|
|
1459
|
-
|
|
1460
|
-
|
|
1459
|
+
q === "Table" && /* @__PURE__ */ e(A, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1460
|
+
ut,
|
|
1461
1461
|
{
|
|
1462
1462
|
height: "unset",
|
|
1463
1463
|
onClickRow: Me,
|
|
@@ -1466,7 +1466,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
) })
|
|
1468
1468
|
] }),
|
|
1469
|
-
ae && /* @__PURE__ */ e(Eo, { onClose:
|
|
1469
|
+
ae && /* @__PURE__ */ e(Eo, { onClose: j })
|
|
1470
1470
|
]
|
|
1471
1471
|
}
|
|
1472
1472
|
),
|
|
@@ -1475,13 +1475,13 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
|
|
|
1475
1475
|
{
|
|
1476
1476
|
onClose: () => ye(!1),
|
|
1477
1477
|
showConnectWidget: de,
|
|
1478
|
-
title:
|
|
1478
|
+
title: D.mini_title
|
|
1479
1479
|
}
|
|
1480
1480
|
)
|
|
1481
1481
|
]
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
|
-
}, Fn =
|
|
1484
|
+
}, Fn = R(Ho);
|
|
1485
1485
|
export {
|
|
1486
1486
|
Bn as TrendsFullWidget,
|
|
1487
1487
|
Pn as TrendsMicroWidget,
|