@mx-cartographer/experiences 7.4.15 → 7.4.17-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 +8 -0
- package/dist/LineChart-Ck3RRxi_.mjs +580 -0
- package/dist/accounts/index.es.js +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/debts/index.es.js +195 -198
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +2 -3
- package/dist/finstrong/index.es.js +547 -540
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +2 -2
- package/dist/trends/index.es.js +476 -473
- package/package.json +2 -2
- package/dist/LineChart-BQRxZF3p.mjs +0 -581
package/dist/trends/index.es.js
CHANGED
|
@@ -1,115 +1,116 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { CategoryIcon as
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as y, jsx as e, Fragment as it } from "react/jsx-runtime";
|
|
2
|
+
import h, { useRef as ct, useState as lt, useEffect as dt } from "react";
|
|
3
|
+
import { observer as k } from "mobx-react-lite";
|
|
4
|
+
import { CategoryIcon as be, Text as z, Icon as _e, P as he, H3 as Fe, ChevronRightIcon as ut } from "@mxenabled/mxui";
|
|
5
|
+
import R from "@mui/material/Box";
|
|
6
6
|
import b from "@mui/material/Stack";
|
|
7
|
-
import
|
|
8
|
-
import { addSeconds as
|
|
7
|
+
import Te from "@mui/material/Button";
|
|
8
|
+
import { addSeconds as ze } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as Re } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { useTheme as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
10
|
+
import { useTheme as me } from "@mui/material/styles";
|
|
11
|
+
import { useItemTooltip as ht, ChartsTooltipContainer as gt } from "@mui/x-charts/ChartsTooltip";
|
|
12
|
+
import { LineChart as mt } from "@mui/x-charts/LineChart";
|
|
13
|
+
import { u as te } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
+
import { u as pt } from "../useDimensions-27p2evRx.mjs";
|
|
15
|
+
import $e from "@mui/material/Card";
|
|
16
|
+
import Ke from "@mui/material/CardContent";
|
|
16
17
|
import ke from "@mui/material/Divider";
|
|
17
18
|
import Oe from "@mui/material/Grid";
|
|
18
|
-
import { u as N, m as U, g as V, b as
|
|
19
|
-
import { b as
|
|
20
|
-
import { C as
|
|
21
|
-
import {
|
|
22
|
-
import { f as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { DataGridPro as Rt } from "@mui/x-data-grid-pro";
|
|
19
|
+
import { u as N, m as U, g as V, b as pe, h as xe, d as ve, v as fe, p as je, f as Ne, a as ft } from "../hooks-ZMp65DFz.mjs";
|
|
20
|
+
import { b as Ye } from "../Localization-2MODESHW.mjs";
|
|
21
|
+
import { C as Se } from "../CurrencyText-Dr0EZ7bp.mjs";
|
|
22
|
+
import { C as Ae, c as Ct } from "../Category-CevNQ03n.mjs";
|
|
23
|
+
import { f as ee, a as F } from "../Dialog-BPTr3qHE.mjs";
|
|
24
|
+
import { f as se, a as yt } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
25
|
+
import { a as _t, g as Tt, L as Ue } from "../TrendsStore-BW9FGQeE.mjs";
|
|
26
|
+
import { T as On } from "../TrendsStore-BW9FGQeE.mjs";
|
|
27
|
+
import { i as St, c as bt, d as xt, e as vt, f as wt, h as It, b as Xe, g as Ze, j as Ge } from "../SpendingData-BuJ03S9d.mjs";
|
|
28
|
+
import Dt from "@mui/material/ToggleButton";
|
|
29
|
+
import Et from "@mui/material/ToggleButtonGroup";
|
|
30
|
+
import { DataGridPro as Lt } from "@mui/x-data-grid-pro";
|
|
31
31
|
import { H as Be } from "../HeaderCell-DjuifqHJ.mjs";
|
|
32
|
-
import { T as G, b as
|
|
33
|
-
import { A as v, W as
|
|
34
|
-
import { a as
|
|
32
|
+
import { T as G, b as Mt } from "../ViewMoreMicroCard-DwR0v_ll.mjs";
|
|
33
|
+
import { A as v, W as Qe } from "../WidgetContainer-CoFDmQRE.mjs";
|
|
34
|
+
import { a as qe, T as Je } from "../TransactionDetails-m5PddMQn.mjs";
|
|
35
35
|
import { D as He } from "../Drawer-By9V-B5L.mjs";
|
|
36
36
|
import { u as we } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
37
37
|
import { L as ge } from "../Loader-DUaFpDGv.mjs";
|
|
38
|
-
import { L as We } from "../LineChart-
|
|
39
|
-
import { M as
|
|
40
|
-
import { subMonths as
|
|
41
|
-
import { TrendingUp as
|
|
42
|
-
import { M as
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
|
|
38
|
+
import { L as We } from "../LineChart-Ck3RRxi_.mjs";
|
|
39
|
+
import { M as At } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
|
|
40
|
+
import { subMonths as Rt } from "date-fns";
|
|
41
|
+
import { TrendingUp as kt, TrendingDown as Ht, MultilineChart as Nt, ExpandLess as Wt, ExpandMore as Ot } from "@mxenabled/mx-icons";
|
|
42
|
+
import { M as Gt } from "../MicroWidgetContainer-r6mtxRer.mjs";
|
|
43
|
+
import Bt from "@mui/material/Collapse";
|
|
44
|
+
import Vt from "@mui/material/List";
|
|
45
|
+
import Pt from "@mui/material/ListItem";
|
|
46
|
+
import Ft from "@mui/material/ListItemButton";
|
|
47
|
+
import zt from "@mui/material/ListItemIcon";
|
|
48
|
+
import $t from "@mui/material/ListItemText";
|
|
49
|
+
import et from "@mui/material/styles/useTheme";
|
|
50
|
+
import { Stack as Kt } from "@mui/material";
|
|
51
|
+
import jt from "@mui/material/Paper";
|
|
52
|
+
import { b as Yt } from "../CategoryUtil-DUM8NuGO.mjs";
|
|
53
|
+
import { E as Ut } from "../ExportCsvAction-Cglo8Mca.mjs";
|
|
54
|
+
import { u as Xt } from "../useInsightsEnabled-B7dxpDrX.mjs";
|
|
55
|
+
import { E as Zt } from "../EmptyState-DoxNUae-.mjs";
|
|
56
|
+
import { l as Qt } from "../ConnectDrawer-BkvlItWx.mjs";
|
|
57
|
+
const tt = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
57
58
|
const { categories: t } = N(), { getCategoryName: n } = U(), s = n(o);
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ y(b, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
59
60
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
61
|
+
R,
|
|
61
62
|
{
|
|
62
|
-
"aria-label":
|
|
63
|
+
"aria-label": Ye(t.category_icon_label_aria, s),
|
|
63
64
|
mb: 4,
|
|
64
65
|
role: "img",
|
|
65
|
-
children: /* @__PURE__ */ e(
|
|
66
|
+
children: /* @__PURE__ */ e(be, { categoryGuid: r })
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(z, { variant: "Body", children: s })
|
|
69
70
|
] });
|
|
70
|
-
},
|
|
71
|
+
}, qt = ({
|
|
71
72
|
categoryGuids: { guid: o, topLevelGuid: r },
|
|
72
73
|
hoveredAreaData: t,
|
|
73
74
|
cursorPosition: n,
|
|
74
75
|
chartContainerRef: s
|
|
75
76
|
}) => {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
77
|
+
const g = me(), d = ct(null), [u, c] = lt({ x: n.x, y: n.y });
|
|
78
|
+
if (dt(() => {
|
|
78
79
|
(() => {
|
|
79
|
-
const l =
|
|
80
|
+
const l = d.current, T = s.current;
|
|
80
81
|
if (!l || !T) return;
|
|
81
|
-
const a = l.getBoundingClientRect(),
|
|
82
|
-
let _ = n.x,
|
|
83
|
-
_ + a.width * 2 >
|
|
82
|
+
const a = l.getBoundingClientRect(), f = T.getBoundingClientRect();
|
|
83
|
+
let _ = n.x, C = n.y;
|
|
84
|
+
_ + a.width * 2 > f.right ? _ = n.x - a.width : _ - a.width < f.left && (_ = n.x), C + a.height * 2 > f.bottom && (C = n.y - a.height), c({ x: _, y: C });
|
|
84
85
|
})();
|
|
85
86
|
}, [n, s]), !t) return null;
|
|
86
|
-
const m = t.reduce((
|
|
87
|
+
const m = t.reduce((p, l) => p + l.y, 0);
|
|
87
88
|
return /* @__PURE__ */ e(
|
|
88
|
-
|
|
89
|
+
$e,
|
|
89
90
|
{
|
|
90
|
-
ref:
|
|
91
|
+
ref: d,
|
|
91
92
|
sx: {
|
|
92
93
|
position: "absolute",
|
|
93
|
-
top:
|
|
94
|
-
left:
|
|
94
|
+
top: u.y,
|
|
95
|
+
left: u.x,
|
|
95
96
|
width: 250,
|
|
96
97
|
pointerEvents: "none"
|
|
97
98
|
},
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
/* @__PURE__ */ e(
|
|
102
|
-
/* @__PURE__ */ e(
|
|
99
|
+
children: /* @__PURE__ */ y(Ke, { children: [
|
|
100
|
+
/* @__PURE__ */ y(R, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
101
|
+
/* @__PURE__ */ e(tt, { categoryGuid: o, topLevelCategoryGuid: r }),
|
|
102
|
+
/* @__PURE__ */ e(z, { variant: "Small", children: `${t.length}-month total` }),
|
|
103
|
+
/* @__PURE__ */ e(Se, { amount: m, bold: !0, formatString: "0,0", variant: "body2" })
|
|
103
104
|
] }),
|
|
104
105
|
/* @__PURE__ */ e(ke, { sx: { my: 16, width: "100%" } }),
|
|
105
|
-
/* @__PURE__ */ e(Oe, { container: !0, children: t.map((
|
|
106
|
+
/* @__PURE__ */ e(Oe, { container: !0, children: t.map((p, l) => /* @__PURE__ */ y(h.Fragment, { children: [
|
|
106
107
|
l > 0 && l % 3 === 0 && /* @__PURE__ */ e(ke, { sx: { my: 16, width: "100%" } }),
|
|
107
|
-
/* @__PURE__ */ e(Oe, { item: !0, xs: 4, children: /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(Oe, { item: !0, xs: 4, children: /* @__PURE__ */ y(R, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
109
|
+
/* @__PURE__ */ e(z, { color: g.palette.text.secondary, variant: "XSmall", children: p.x }),
|
|
109
110
|
/* @__PURE__ */ e(
|
|
110
|
-
|
|
111
|
+
Se,
|
|
111
112
|
{
|
|
112
|
-
amount:
|
|
113
|
+
amount: p.y,
|
|
113
114
|
bold: !0,
|
|
114
115
|
formatString: "0,0",
|
|
115
116
|
variant: "Body"
|
|
@@ -120,42 +121,30 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
120
121
|
] })
|
|
121
122
|
}
|
|
122
123
|
);
|
|
123
|
-
},
|
|
124
|
-
categoryGuids: { guid: o, topLevelGuid: r },
|
|
125
|
-
itemData: { dataIndex: t },
|
|
126
|
-
series: n,
|
|
127
|
-
xData: s
|
|
128
|
-
}) => {
|
|
129
|
-
const h = pt(), g = n.data[t], d = s[t];
|
|
130
|
-
return g === void 0 || !d ? null : /* @__PURE__ */ e(Ct, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(yt, { children: /* @__PURE__ */ f(ft, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
131
|
-
/* @__PURE__ */ e(Je, { categoryGuid: o, topLevelCategoryGuid: r }),
|
|
132
|
-
/* @__PURE__ */ e($, { color: h.palette.text.secondary, variant: "Small", children: J(d, F.MONTH_SHORT_YEAR) }),
|
|
133
|
-
/* @__PURE__ */ e(Te, { amount: String(g), bold: !0, formatString: "0,0", variant: "Body" })
|
|
134
|
-
] }) }) });
|
|
135
|
-
}, no = ({
|
|
124
|
+
}, Jt = k(qt), eo = ({
|
|
136
125
|
sx: o,
|
|
137
126
|
categoryGuids: r,
|
|
138
127
|
hoveredLegend: t,
|
|
139
128
|
legendRef: n,
|
|
140
129
|
onHoverLegend: s,
|
|
141
|
-
onClickLegend:
|
|
130
|
+
onClickLegend: g
|
|
142
131
|
}) => {
|
|
143
|
-
const { isMobile:
|
|
132
|
+
const { isMobile: d } = te(), { getCategoryName: u } = U();
|
|
144
133
|
return /* @__PURE__ */ e(
|
|
145
134
|
b,
|
|
146
135
|
{
|
|
147
136
|
direction: "row",
|
|
148
137
|
flexWrap: "wrap",
|
|
149
|
-
gap:
|
|
138
|
+
gap: d ? 2 : 6,
|
|
150
139
|
justifyContent: "start",
|
|
151
140
|
ref: n,
|
|
152
141
|
sx: o,
|
|
153
142
|
children: r.map(({ guid: c, top_level_guid: m }) => {
|
|
154
|
-
const
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
|
|
143
|
+
const p = t === c, l = Ae[c], T = Ae[m], a = l ?? T ?? Ae.default, f = a + "33";
|
|
144
|
+
return /* @__PURE__ */ y(
|
|
145
|
+
Te,
|
|
157
146
|
{
|
|
158
|
-
onClick: () =>
|
|
147
|
+
onClick: () => g(c),
|
|
159
148
|
onMouseEnter: () => s(c),
|
|
160
149
|
onMouseLeave: () => s(null),
|
|
161
150
|
sx: {
|
|
@@ -167,22 +156,22 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
167
156
|
paddingX: 8,
|
|
168
157
|
paddingY: 4,
|
|
169
158
|
borderRadius: 1,
|
|
170
|
-
opacity:
|
|
159
|
+
opacity: p ? 1 : 0.7
|
|
171
160
|
},
|
|
172
161
|
children: [
|
|
173
162
|
/* @__PURE__ */ e(
|
|
174
|
-
|
|
163
|
+
R,
|
|
175
164
|
{
|
|
176
165
|
sx: {
|
|
177
166
|
width: 16,
|
|
178
167
|
height: 16,
|
|
179
|
-
marginRight:
|
|
168
|
+
marginRight: d ? 5 : 10,
|
|
180
169
|
borderRadius: "2px",
|
|
181
|
-
backgroundColor: t ?
|
|
170
|
+
backgroundColor: t ? p ? a : f : a
|
|
182
171
|
}
|
|
183
172
|
}
|
|
184
173
|
),
|
|
185
|
-
/* @__PURE__ */ e(
|
|
174
|
+
/* @__PURE__ */ e(z, { variant: "Body", children: u(c) })
|
|
186
175
|
]
|
|
187
176
|
},
|
|
188
177
|
c
|
|
@@ -190,53 +179,68 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
190
179
|
})
|
|
191
180
|
}
|
|
192
181
|
);
|
|
193
|
-
},
|
|
182
|
+
}, to = ({
|
|
183
|
+
categoryGuids: { guid: o, topLevelGuid: r },
|
|
184
|
+
series: t,
|
|
185
|
+
xData: n
|
|
186
|
+
}) => {
|
|
187
|
+
const s = ht(), g = me();
|
|
188
|
+
if (!s?.identifier) return null;
|
|
189
|
+
const { dataIndex: d, seriesId: u } = s.identifier;
|
|
190
|
+
if (d == null || !u) return null;
|
|
191
|
+
const m = t.find((l) => l.id === u)?.data?.[d], p = n?.[d];
|
|
192
|
+
return m === void 0 || !p ? null : /* @__PURE__ */ e($e, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Ke, { children: /* @__PURE__ */ y(R, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
193
|
+
/* @__PURE__ */ e(tt, { categoryGuid: o, topLevelCategoryGuid: r }),
|
|
194
|
+
/* @__PURE__ */ e(z, { color: g.palette.text.secondary, variant: "Small", children: ee(p, F.MONTH_SHORT_YEAR) }),
|
|
195
|
+
/* @__PURE__ */ e(Se, { amount: String(m), bold: !0, formatString: "0,0", variant: "Body" })
|
|
196
|
+
] }) }) });
|
|
197
|
+
}, oo = ({
|
|
194
198
|
onHoverArea: o,
|
|
195
199
|
onHoverPoint: r,
|
|
196
200
|
onHoverLegend: t,
|
|
197
201
|
onClickLegend: n,
|
|
198
202
|
stackedDatasets: s,
|
|
199
|
-
unstackedDatasets:
|
|
200
|
-
availableHeight:
|
|
201
|
-
minimumHeight:
|
|
203
|
+
unstackedDatasets: g = [],
|
|
204
|
+
availableHeight: d = 0,
|
|
205
|
+
minimumHeight: u = 350
|
|
202
206
|
}) => {
|
|
203
|
-
const c =
|
|
204
|
-
|
|
205
|
-
const i = Math.max(
|
|
206
|
-
|
|
207
|
-
}, [
|
|
208
|
-
const [_,
|
|
207
|
+
const c = me(), { isMobile: m } = te(), [p, { height: l }] = pt(), T = h.useRef(null), [a, f] = h.useState(0);
|
|
208
|
+
h.useEffect(() => {
|
|
209
|
+
const i = Math.max(d - l, u);
|
|
210
|
+
f(i);
|
|
211
|
+
}, [d, l]);
|
|
212
|
+
const [_, C] = h.useState(null), [E, x] = h.useState({
|
|
209
213
|
hoveredSeriesId: null,
|
|
210
214
|
hoveredAreaData: null,
|
|
211
215
|
isAreaHovered: !1,
|
|
212
216
|
cursorPos: { x: 0, y: 0 }
|
|
213
|
-
}), { hoveredSeriesId:
|
|
214
|
-
(i, S) => s.reduce((
|
|
215
|
-
) ?? [0], re = Math.max(...
|
|
216
|
-
...
|
|
217
|
-
), ce = Math.floor(Math.min(...Ce) / 100) * 100,
|
|
217
|
+
}), { hoveredSeriesId: D, hoveredAreaData: W, isAreaHovered: L, cursorPos: O } = E, A = L && D && W, M = !A, P = [...s, ...g], $ = P[0]?.dataset.length ?? 0, X = P.flatMap((i) => i.dataset.map((S) => S.x)), Ce = P.flatMap((i) => i.dataset.map((S) => S.y)), oe = s[0]?.dataset?.map(
|
|
218
|
+
(i, S) => s.reduce((I, Y) => I + Y.dataset[S]?.y || 0, 0)
|
|
219
|
+
) ?? [0], re = Math.max(...oe), Z = Math.max(
|
|
220
|
+
...g.flatMap((i) => i.dataset.map((S) => S.y))
|
|
221
|
+
), ce = Math.floor(Math.min(...Ce) / 100) * 100, ne = Math.ceil(Math.max(re, Z) / 100) * 100, K = s.map((i, S) => ({
|
|
218
222
|
id: `stacked-${S}`,
|
|
219
223
|
guid: i.category_guid,
|
|
220
224
|
top_level_guid: i.top_level_category_guid,
|
|
221
225
|
area: !0,
|
|
222
226
|
color: s[S].category_color ?? c.palette.primary.main,
|
|
223
|
-
data: i.dataset.map((
|
|
227
|
+
data: i.dataset.map((I) => I.y),
|
|
224
228
|
label: s[S].category_name,
|
|
225
229
|
stack: "total",
|
|
226
230
|
type: "line",
|
|
227
231
|
highlightScope: { highlight: "item" },
|
|
228
|
-
valueFormatter: (
|
|
229
|
-
})), ae =
|
|
232
|
+
valueFormatter: (I) => se(I, "0,0")
|
|
233
|
+
})), ae = g.map((i, S) => ({
|
|
230
234
|
id: `unstacked-${S}`,
|
|
231
235
|
guid: i.category_guid,
|
|
232
236
|
top_level_guid: i.top_level_category_guid,
|
|
233
237
|
area: !1,
|
|
234
238
|
color: i.category_color,
|
|
235
|
-
data: i.dataset.map((
|
|
239
|
+
data: i.dataset.map((I) => I.y),
|
|
236
240
|
label: i.category_name,
|
|
237
241
|
type: "line",
|
|
238
|
-
valueFormatter: (
|
|
239
|
-
})),
|
|
242
|
+
valueFormatter: (I) => se(I, "0,0")
|
|
243
|
+
})), Q = [...K, ...ae], ie = [
|
|
240
244
|
...K.map(({ guid: i, top_level_guid: S }) => ({
|
|
241
245
|
guid: i,
|
|
242
246
|
top_level_guid: S
|
|
@@ -245,28 +249,28 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
245
249
|
guid: i,
|
|
246
250
|
top_level_guid: S
|
|
247
251
|
}))
|
|
248
|
-
],
|
|
249
|
-
const
|
|
252
|
+
], q = (i) => {
|
|
253
|
+
const I = i.startsWith("stacked-") ? s[parseInt(i.split("-")[1])] : g[parseInt(i.split("-")[1])];
|
|
250
254
|
return {
|
|
251
|
-
guid:
|
|
252
|
-
topLevelGuid:
|
|
255
|
+
guid: I?.category_guid,
|
|
256
|
+
topLevelGuid: I?.top_level_category_guid
|
|
253
257
|
};
|
|
254
258
|
}, w = (i) => {
|
|
255
|
-
|
|
259
|
+
C(i), t?.(i ?? "");
|
|
256
260
|
}, B = (i) => {
|
|
257
261
|
n?.(i ?? "");
|
|
258
262
|
}, j = () => {
|
|
259
|
-
const i =
|
|
263
|
+
const i = q(String(D)).guid;
|
|
260
264
|
i && n?.(i);
|
|
261
265
|
}, le = (i) => {
|
|
262
|
-
const S = String(i?.seriesId),
|
|
263
|
-
if (
|
|
266
|
+
const S = String(i?.seriesId), I = q(S).guid, Y = Q.find((de) => de.id === S), De = Y && i?.dataIndex !== void 0, Ee = Y && i?.dataIndex === void 0;
|
|
267
|
+
if (De)
|
|
264
268
|
x({
|
|
265
269
|
hoveredSeriesId: S,
|
|
266
270
|
hoveredAreaData: null,
|
|
267
271
|
isAreaHovered: !1,
|
|
268
272
|
cursorPos: O
|
|
269
|
-
}), r?.(
|
|
273
|
+
}), r?.(I);
|
|
270
274
|
else if (Ee) {
|
|
271
275
|
const de = Y?.data.map((Le, Me) => ({
|
|
272
276
|
x: X[Me],
|
|
@@ -277,7 +281,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
277
281
|
hoveredAreaData: de,
|
|
278
282
|
isAreaHovered: !0,
|
|
279
283
|
cursorPos: O
|
|
280
|
-
}), o?.(
|
|
284
|
+
}), o?.(I);
|
|
281
285
|
} else
|
|
282
286
|
x({
|
|
283
287
|
hoveredSeriesId: null,
|
|
@@ -286,15 +290,17 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
286
290
|
cursorPos: O
|
|
287
291
|
});
|
|
288
292
|
}, ye = (i) => {
|
|
293
|
+
if (i.target instanceof Element && i.target.classList[0]?.includes("MuiMarkElement-root"))
|
|
294
|
+
return;
|
|
289
295
|
const S = i.currentTarget.getBoundingClientRect();
|
|
290
|
-
x((
|
|
291
|
-
...
|
|
296
|
+
x((I) => ({
|
|
297
|
+
...I,
|
|
292
298
|
cursorPos: {
|
|
293
299
|
x: i.clientX - S.left,
|
|
294
300
|
y: i.clientY - S.top
|
|
295
301
|
}
|
|
296
302
|
}));
|
|
297
|
-
},
|
|
303
|
+
}, Ie = {
|
|
298
304
|
p: 4,
|
|
299
305
|
"& .MuiBarLabel-root": {
|
|
300
306
|
fontSize: 10,
|
|
@@ -310,15 +316,15 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
310
316
|
'& [class*="MuiLineElement-series-unstacked-"]': {
|
|
311
317
|
strokeWidth: 3
|
|
312
318
|
},
|
|
313
|
-
..._ && K.reduce((i, S,
|
|
314
|
-
const Y = `.MuiAreaElement-series-stacked-${
|
|
319
|
+
..._ && K.reduce((i, S, I) => {
|
|
320
|
+
const Y = `.MuiAreaElement-series-stacked-${I}`;
|
|
315
321
|
return i[Y] = {
|
|
316
|
-
opacity: K[
|
|
322
|
+
opacity: K[I].guid === _ ? 0.9 : 0.2
|
|
317
323
|
}, i;
|
|
318
324
|
}, {})
|
|
319
325
|
};
|
|
320
326
|
return /* @__PURE__ */ e(
|
|
321
|
-
|
|
327
|
+
R,
|
|
322
328
|
{
|
|
323
329
|
onMouseMove: ye,
|
|
324
330
|
ref: T,
|
|
@@ -333,7 +339,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
333
339
|
touchAction: "pan-y"
|
|
334
340
|
}
|
|
335
341
|
},
|
|
336
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ y(
|
|
337
343
|
b,
|
|
338
344
|
{
|
|
339
345
|
direction: { xs: "column", md: "column" },
|
|
@@ -341,70 +347,67 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
341
347
|
sx: { width: "100%", position: "relative" },
|
|
342
348
|
children: [
|
|
343
349
|
/* @__PURE__ */ e(
|
|
344
|
-
|
|
350
|
+
mt,
|
|
345
351
|
{
|
|
346
352
|
height: a,
|
|
347
|
-
|
|
353
|
+
hideLegend: !0,
|
|
354
|
+
margin: { bottom: 24, left: 12, right: 54, top: 48 },
|
|
348
355
|
onAreaClick: j,
|
|
349
356
|
onHighlightChange: le,
|
|
350
|
-
series:
|
|
357
|
+
series: Q,
|
|
351
358
|
skipAnimation: !0,
|
|
352
359
|
slotProps: {
|
|
353
|
-
|
|
354
|
-
hidden: !0
|
|
355
|
-
}
|
|
360
|
+
tooltip: { trigger: M ? "item" : "none" }
|
|
356
361
|
},
|
|
357
362
|
slots: {
|
|
358
|
-
|
|
359
|
-
|
|
363
|
+
tooltip: M && D ? (i) => /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ e(
|
|
364
|
+
to,
|
|
360
365
|
{
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
366
|
+
...i,
|
|
367
|
+
categoryGuids: q(D),
|
|
368
|
+
series: Q,
|
|
369
|
+
xData: X
|
|
364
370
|
}
|
|
365
|
-
) :
|
|
366
|
-
},
|
|
367
|
-
sx: De,
|
|
368
|
-
tooltip: {
|
|
369
|
-
trigger: M ? "item" : "none"
|
|
371
|
+
) }) : void 0
|
|
370
372
|
},
|
|
373
|
+
sx: Ie,
|
|
371
374
|
xAxis: [
|
|
372
375
|
{
|
|
373
376
|
data: X,
|
|
374
377
|
scaleType: "time",
|
|
375
|
-
valueFormatter: (i) =>
|
|
376
|
-
tickNumber:
|
|
378
|
+
valueFormatter: (i) => ee(i, F.MONTH_SHORT_YEAR),
|
|
379
|
+
tickNumber: $
|
|
377
380
|
// How many ticks to show on the x-axis
|
|
378
381
|
}
|
|
379
382
|
],
|
|
380
383
|
yAxis: [
|
|
381
384
|
{
|
|
382
385
|
min: ce,
|
|
383
|
-
max:
|
|
386
|
+
max: ne || 100
|
|
384
387
|
}
|
|
385
388
|
]
|
|
386
389
|
}
|
|
387
390
|
),
|
|
388
391
|
/* @__PURE__ */ e(
|
|
389
|
-
|
|
392
|
+
eo,
|
|
390
393
|
{
|
|
391
394
|
categoryGuids: ie,
|
|
392
395
|
hoveredLegend: _,
|
|
393
|
-
legendRef:
|
|
396
|
+
legendRef: p,
|
|
394
397
|
onClickLegend: B,
|
|
395
398
|
onHoverLegend: w,
|
|
396
399
|
sx: { px: m ? 0 : 24 }
|
|
397
400
|
}
|
|
398
401
|
),
|
|
399
402
|
A && /* @__PURE__ */ e(
|
|
400
|
-
|
|
403
|
+
Jt,
|
|
401
404
|
{
|
|
402
|
-
categoryGuids:
|
|
405
|
+
categoryGuids: q(D),
|
|
403
406
|
chartContainerRef: T,
|
|
404
407
|
cursorPosition: O,
|
|
405
408
|
hoveredAreaData: W.map((i) => ({
|
|
406
409
|
...i,
|
|
407
|
-
x:
|
|
410
|
+
x: ee(i.x, F.MONTH_SHORT_YEAR)
|
|
408
411
|
}))
|
|
409
412
|
}
|
|
410
413
|
)
|
|
@@ -413,29 +416,29 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
413
416
|
)
|
|
414
417
|
}
|
|
415
418
|
);
|
|
416
|
-
},
|
|
417
|
-
|
|
419
|
+
}, ot = ({ selectedTab: o, onTabChange: r }) => /* @__PURE__ */ e(
|
|
420
|
+
Et,
|
|
418
421
|
{
|
|
419
422
|
exclusive: !0,
|
|
420
423
|
onChange: r,
|
|
421
424
|
orientation: "horizontal",
|
|
422
425
|
value: o,
|
|
423
|
-
children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(
|
|
426
|
+
children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(Dt, { color: "primary", sx: { width: 56 }, value: t, children: t === "Chart" ? /* @__PURE__ */ e(_e, { name: "table_chart_view" }) : /* @__PURE__ */ e(_e, { name: "format_list_bulleted" }) }, t))
|
|
424
427
|
}
|
|
425
|
-
),
|
|
426
|
-
const { trends: t } = N(), { isMobile: n, isDesktop: s } =
|
|
427
|
-
const
|
|
428
|
+
), nt = ({ selectedDateRange: o, selectedCategoryGuid: r }) => {
|
|
429
|
+
const { trends: t } = N(), { isMobile: n, isDesktop: s } = te(), { getCategoryName: g } = U(), d = h.useMemo(() => {
|
|
430
|
+
const u = ee(
|
|
428
431
|
o.start,
|
|
429
432
|
n ? F.MONTH_SHORT_YEAR : F.MONTH_YEAR
|
|
430
|
-
), c =
|
|
433
|
+
), c = ee(
|
|
431
434
|
o.end,
|
|
432
435
|
n ? F.MONTH_SHORT_YEAR : F.MONTH_YEAR
|
|
433
436
|
);
|
|
434
|
-
return `${
|
|
437
|
+
return `${u} - ${c}`;
|
|
435
438
|
}, [o, n]);
|
|
436
|
-
return /* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ y(R, { sx: { mr: 10, minWidth: "60%" }, children: [
|
|
437
440
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
441
|
+
z,
|
|
439
442
|
{
|
|
440
443
|
display: "block",
|
|
441
444
|
fontWeight: 700,
|
|
@@ -445,100 +448,100 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
445
448
|
textOverflow: "unset"
|
|
446
449
|
},
|
|
447
450
|
variant: s ? "H3" : "Body",
|
|
448
|
-
children:
|
|
451
|
+
children: g(r) || t.sub_title
|
|
449
452
|
}
|
|
450
453
|
),
|
|
451
|
-
/* @__PURE__ */ e(
|
|
454
|
+
/* @__PURE__ */ e(z, { variant: s ? "Body" : "Small", children: d })
|
|
452
455
|
] });
|
|
453
|
-
},
|
|
456
|
+
}, no = (o) => {
|
|
454
457
|
const r = o.row[o.field];
|
|
455
|
-
return /* @__PURE__ */ e(b, { alignItems: "flex-end", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
|
|
456
|
-
},
|
|
458
|
+
return /* @__PURE__ */ e(b, { alignItems: "flex-end", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(Se, { amount: r, variant: "Small" }) });
|
|
459
|
+
}, so = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
457
460
|
const { getCategoryName: t } = U(), { categories: n } = N(), s = n.default_categories[o]?.replace(/&/g, "&") ?? t(o);
|
|
458
|
-
return /* @__PURE__ */
|
|
461
|
+
return /* @__PURE__ */ y(b, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
459
462
|
/* @__PURE__ */ e(
|
|
460
|
-
|
|
463
|
+
R,
|
|
461
464
|
{
|
|
462
|
-
"aria-label":
|
|
465
|
+
"aria-label": Ye(n.category_icon_label_aria, s),
|
|
463
466
|
role: "img",
|
|
464
|
-
children: /* @__PURE__ */ e(
|
|
467
|
+
children: /* @__PURE__ */ e(be, { categoryGuid: r })
|
|
465
468
|
}
|
|
466
469
|
),
|
|
467
|
-
/* @__PURE__ */ e(
|
|
470
|
+
/* @__PURE__ */ e(z, { sx: { ml: 12, pb: 6 }, variant: "Small", children: s })
|
|
468
471
|
] });
|
|
469
|
-
},
|
|
470
|
-
|
|
472
|
+
}, ro = (o) => /* @__PURE__ */ e(b, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
|
|
473
|
+
so,
|
|
471
474
|
{
|
|
472
475
|
categoryGuid: o.row.category,
|
|
473
476
|
topLevelCategoryGuid: o.row.top_level_category_guid
|
|
474
477
|
}
|
|
475
|
-
) }),
|
|
478
|
+
) }), ao = (o, r) => {
|
|
476
479
|
const t = [], n = new Date(o);
|
|
477
480
|
for (; n <= r; ) {
|
|
478
|
-
const s =
|
|
481
|
+
const s = ee(n, F.MONTH);
|
|
479
482
|
t.push(s), n.setMonth(n.getMonth() + 1);
|
|
480
483
|
}
|
|
481
484
|
return t;
|
|
482
|
-
},
|
|
485
|
+
}, st = ({
|
|
483
486
|
monthlyCategoryTotals: o,
|
|
484
487
|
selectedDateRange: r,
|
|
485
488
|
selectedCategory: t,
|
|
486
489
|
onClickRow: n,
|
|
487
490
|
height: s = "100dvh",
|
|
488
|
-
sx:
|
|
491
|
+
sx: g = {}
|
|
489
492
|
}) => {
|
|
490
|
-
const { onEvent:
|
|
491
|
-
{ field:
|
|
492
|
-
]),
|
|
493
|
+
const { onEvent: d } = V(), u = ee(/* @__PURE__ */ new Date(), F.MONTH_SHORT), [c, m] = h.useState([
|
|
494
|
+
{ field: u, sort: "desc" }
|
|
495
|
+
]), p = h.useMemo(() => ao(r.start, r.end), [r]), l = [
|
|
493
496
|
{
|
|
494
497
|
field: "category",
|
|
495
498
|
flex: 1,
|
|
496
499
|
headerName: "Category",
|
|
497
500
|
minWidth: 175,
|
|
498
501
|
renderHeader: Be,
|
|
499
|
-
renderCell:
|
|
502
|
+
renderCell: ro,
|
|
500
503
|
sortable: !0,
|
|
501
504
|
type: "string"
|
|
502
505
|
},
|
|
503
|
-
...
|
|
506
|
+
...p.map(
|
|
504
507
|
(a) => ({
|
|
505
508
|
field: a,
|
|
506
509
|
flex: 1,
|
|
507
510
|
headerName: a,
|
|
508
511
|
minWidth: 100,
|
|
509
512
|
renderHeader: Be,
|
|
510
|
-
renderCell:
|
|
513
|
+
renderCell: no,
|
|
511
514
|
align: "right",
|
|
512
515
|
headerAlign: "right",
|
|
513
516
|
sortable: !0,
|
|
514
517
|
hideSortIcons: !1,
|
|
515
518
|
type: "number",
|
|
516
|
-
sortComparator:
|
|
519
|
+
sortComparator: _t
|
|
517
520
|
})
|
|
518
521
|
)
|
|
519
|
-
], T =
|
|
522
|
+
], T = h.useMemo(() => {
|
|
520
523
|
const a = o.filter(
|
|
521
|
-
(
|
|
524
|
+
(C) => !St(C) && !bt(C)
|
|
522
525
|
), _ = (t ? a.filter(
|
|
523
|
-
(
|
|
526
|
+
(C) => C.category_guid === t || C.top_level_category_guid === t
|
|
524
527
|
) : a).reduce(
|
|
525
|
-
(
|
|
526
|
-
const { category_guid: x, top_level_category_guid:
|
|
527
|
-
|
|
528
|
+
(C, E) => {
|
|
529
|
+
const { category_guid: x, top_level_category_guid: D, month: W, total: L, year: O } = E, A = t ? x : D;
|
|
530
|
+
C[A] || (C[A] = {
|
|
528
531
|
id: A,
|
|
529
532
|
category: A,
|
|
530
533
|
category_guid: x,
|
|
531
|
-
top_level_category_guid:
|
|
534
|
+
top_level_category_guid: D
|
|
532
535
|
});
|
|
533
|
-
const M =
|
|
534
|
-
return
|
|
536
|
+
const M = ee(new Date(O, W - 1), F.MONTH_SHORT);
|
|
537
|
+
return C[A][M] || (C[A][M] = 0), C[A][M] = C[A][M] + Math.abs(L), C;
|
|
535
538
|
},
|
|
536
539
|
{}
|
|
537
540
|
);
|
|
538
541
|
return Object.values(_);
|
|
539
542
|
}, [o, t]);
|
|
540
|
-
return /* @__PURE__ */ e(
|
|
541
|
-
|
|
543
|
+
return /* @__PURE__ */ e(R, { sx: { height: s, width: "100%", overflowX: "auto", boxShadow: "none", ...g }, children: /* @__PURE__ */ e(
|
|
544
|
+
Lt,
|
|
542
545
|
{
|
|
543
546
|
columns: l,
|
|
544
547
|
disableColumnFilter: !0,
|
|
@@ -546,13 +549,13 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
546
549
|
hideFooter: !0,
|
|
547
550
|
initialState: { sorting: { sortModel: c } },
|
|
548
551
|
onRowClick: (a) => {
|
|
549
|
-
n?.(a.row.category),
|
|
552
|
+
n?.(a.row.category), d(v.TRENDS_CLICK_LIST_ITEM, {
|
|
550
553
|
...G,
|
|
551
|
-
listItem:
|
|
554
|
+
listItem: Ct[a.row.category]
|
|
552
555
|
});
|
|
553
556
|
},
|
|
554
557
|
onSortModelChange: (a) => {
|
|
555
|
-
m(a),
|
|
558
|
+
m(a), d(v.TRENDS_CLICK_TABLE_SORT, G);
|
|
556
559
|
},
|
|
557
560
|
rows: T,
|
|
558
561
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
@@ -560,107 +563,107 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
560
563
|
sortingOrder: ["asc", "desc"]
|
|
561
564
|
}
|
|
562
565
|
) });
|
|
563
|
-
},
|
|
566
|
+
}, io = {
|
|
564
567
|
title: "Transaction List"
|
|
565
|
-
},
|
|
568
|
+
}, co = ({
|
|
566
569
|
categoryGuid: o,
|
|
567
570
|
dateRange: r,
|
|
568
571
|
isOpen: t,
|
|
569
572
|
onClose: n
|
|
570
573
|
}) => {
|
|
571
|
-
const { onEvent: s } = V(), { selectedAccountGuids:
|
|
574
|
+
const { onEvent: s } = V(), { selectedAccountGuids: g } = pe(), { common: d } = N(), { setFilter: u, sortedTransactions: c } = xe(), [m, p] = h.useState(""), l = h.useMemo(
|
|
572
575
|
() => c.find((a) => a.guid === m),
|
|
573
576
|
[m, c]
|
|
574
577
|
);
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
accounts:
|
|
578
|
+
h.useEffect(() => {
|
|
579
|
+
u({
|
|
580
|
+
accounts: g,
|
|
578
581
|
dateRange: r,
|
|
579
582
|
custom: (a) => o === "" || o === a.category_guid || o === a.top_level_category_guid,
|
|
580
583
|
showSplits: !!o
|
|
581
584
|
});
|
|
582
|
-
}, [
|
|
585
|
+
}, [g, o, r]), h.useEffect(() => s(v.TRENDS_VIEW_TRANSACTIONS), []);
|
|
583
586
|
const T = () => {
|
|
584
|
-
|
|
587
|
+
p(""), n();
|
|
585
588
|
};
|
|
586
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ y(
|
|
587
590
|
He,
|
|
588
591
|
{
|
|
589
|
-
ariaLabelClose:
|
|
592
|
+
ariaLabelClose: d.close_aria,
|
|
590
593
|
isOpen: t,
|
|
591
594
|
onClose: T,
|
|
592
|
-
title:
|
|
595
|
+
title: io.title,
|
|
593
596
|
children: [
|
|
594
|
-
l && /* @__PURE__ */ e(
|
|
595
|
-
!l && /* @__PURE__ */ e(
|
|
597
|
+
l && /* @__PURE__ */ e(qe, { transaction: l }),
|
|
598
|
+
!l && /* @__PURE__ */ e(Je, { onClick: p })
|
|
596
599
|
]
|
|
597
600
|
}
|
|
598
601
|
);
|
|
599
|
-
},
|
|
600
|
-
const { onEvent: t } = V(), { isDesktop: n, isTablet: s, isMobile:
|
|
602
|
+
}, lo = k(co), uo = ({ onBackClick: o, sx: r }) => {
|
|
603
|
+
const { onEvent: t } = V(), { isDesktop: n, isTablet: s, isMobile: g } = te(), { visibleAccounts: d } = ve(), { loadMonthlyCategoryTotals: u, monthlyCategoryTotals: c, getCategoryName: m } = U(), { sortedTransactions: p } = xe(), { selectedDateRange: l, setSelectedDateRange: T } = fe(), { isCopyLoaded: a, isInitialized: f, selectedAccounts: _, setSelectedAccounts: C } = pe(), { trends: E } = N(), [x, D] = h.useState(!1), [W, L] = h.useState(!1), [O, A] = h.useState("Chart"), [M, P] = h.useState(""), [$, X] = h.useState(window.innerHeight), oe = $ - (g ? 315 : 345);
|
|
601
604
|
we({
|
|
602
605
|
widgetName: "TrendsFullWidget",
|
|
603
606
|
isLoaded: x
|
|
604
|
-
}),
|
|
607
|
+
}), h.useEffect(() => {
|
|
605
608
|
const w = () => X(window.innerHeight);
|
|
606
609
|
return window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
|
|
607
|
-
}, []),
|
|
608
|
-
|
|
609
|
-
}, [
|
|
610
|
-
|
|
610
|
+
}, []), h.useEffect(() => {
|
|
611
|
+
C(d);
|
|
612
|
+
}, [d]), h.useEffect(() => {
|
|
613
|
+
f && u(
|
|
611
614
|
_,
|
|
612
615
|
l.start,
|
|
613
616
|
l.end
|
|
614
617
|
).finally(() => {
|
|
615
|
-
|
|
618
|
+
D(!0);
|
|
616
619
|
});
|
|
617
|
-
}, [
|
|
618
|
-
const re =
|
|
620
|
+
}, [f, _, l]);
|
|
621
|
+
const re = h.useMemo(() => {
|
|
619
622
|
if (!x) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
620
|
-
const w =
|
|
623
|
+
const w = Tt(
|
|
621
624
|
c,
|
|
622
625
|
l.start,
|
|
623
626
|
l.end
|
|
624
627
|
), B = M.length ? w.filter(
|
|
625
628
|
(j) => j.top_level_category_guid === M || j.category_guid === M
|
|
626
|
-
) :
|
|
629
|
+
) : xt(w);
|
|
627
630
|
return {
|
|
628
|
-
stackedDatasets: B.filter(
|
|
629
|
-
unstackedDatasets: B.filter(
|
|
631
|
+
stackedDatasets: B.filter(vt),
|
|
632
|
+
unstackedDatasets: B.filter(wt)
|
|
630
633
|
};
|
|
631
634
|
}, [c, M, l]), Z = (w, B) => {
|
|
632
635
|
A(B ?? O), t(v.TRENDS_CLICK_TOGGLE_VIEW);
|
|
633
636
|
}, ce = (w) => {
|
|
634
|
-
const B =
|
|
637
|
+
const B = ze(w?.[0], 1), j = w?.[1], le = Re(j, B);
|
|
635
638
|
T({ start: B, end: j }), t(v.TRENDS_CLICK_TIME_WINDOW, {
|
|
636
639
|
time_period: le + "M"
|
|
637
640
|
});
|
|
638
|
-
},
|
|
641
|
+
}, ne = () => {
|
|
639
642
|
t(v.TRENDS_CLICK_FILTER);
|
|
640
643
|
}, K = (w) => {
|
|
641
644
|
P(w);
|
|
642
645
|
}, ae = (w) => {
|
|
643
646
|
P(w), t(v.TRENDS_CLICK_LEGEND, { category: m(w) });
|
|
644
|
-
},
|
|
647
|
+
}, Q = (w) => {
|
|
645
648
|
t(v.TRENDS_HOVER_LEGEND, { category: m(w) });
|
|
646
649
|
}, ie = (w) => {
|
|
647
650
|
t(v.TRENDS_HOVER_AREA, { category: w });
|
|
648
|
-
},
|
|
651
|
+
}, q = (w) => {
|
|
649
652
|
t(v.TRENDS_HOVER_POINT, { category: w });
|
|
650
653
|
};
|
|
651
|
-
return !a || !
|
|
652
|
-
|
|
654
|
+
return !a || !f || !x ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ y(
|
|
655
|
+
Qe,
|
|
653
656
|
{
|
|
654
|
-
accountOptions:
|
|
657
|
+
accountOptions: d,
|
|
655
658
|
calendarActions: { onRangeChanged: ce },
|
|
656
659
|
dateRange: l,
|
|
657
660
|
dateRangeVariant: "timeframebuttons",
|
|
658
|
-
onAccountsFilterClick:
|
|
661
|
+
onAccountsFilterClick: ne,
|
|
659
662
|
onBackClick: o,
|
|
660
663
|
sx: r,
|
|
661
664
|
title: E.title,
|
|
662
665
|
children: [
|
|
663
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ y(
|
|
664
667
|
b,
|
|
665
668
|
{
|
|
666
669
|
sx: {
|
|
@@ -668,46 +671,46 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
668
671
|
px: n ? 48 : s ? 24 : 12
|
|
669
672
|
},
|
|
670
673
|
children: [
|
|
671
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ y(
|
|
672
675
|
b,
|
|
673
676
|
{
|
|
674
677
|
flexDirection: "row",
|
|
675
678
|
justifyContent: "space-between",
|
|
676
|
-
sx: { pb:
|
|
679
|
+
sx: { pb: g ? 12 : 24, pt: g ? 24 : 48 },
|
|
677
680
|
children: [
|
|
678
681
|
/* @__PURE__ */ e(
|
|
679
|
-
|
|
682
|
+
nt,
|
|
680
683
|
{
|
|
681
684
|
selectedCategoryGuid: M,
|
|
682
685
|
selectedDateRange: l
|
|
683
686
|
}
|
|
684
687
|
),
|
|
685
|
-
/* @__PURE__ */ e(
|
|
688
|
+
/* @__PURE__ */ e(ot, { onTabChange: Z, selectedTab: O })
|
|
686
689
|
]
|
|
687
690
|
}
|
|
688
691
|
),
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */ e(
|
|
691
|
-
/* @__PURE__ */ e(
|
|
692
|
+
/* @__PURE__ */ y(b, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
693
|
+
/* @__PURE__ */ e(R, { flexGrow: 1, children: M && /* @__PURE__ */ y(Te, { onClick: () => P(""), sx: { p: 0, pr: 5 }, children: [
|
|
694
|
+
/* @__PURE__ */ e(_e, { name: "arrow_back" }),
|
|
692
695
|
E.all_categories
|
|
693
696
|
] }) }),
|
|
694
|
-
/* @__PURE__ */ e(
|
|
697
|
+
/* @__PURE__ */ e(Te, { onClick: () => L(!0), sx: { px: 5 }, children: `${E.view_transactions} (${p.length})` })
|
|
695
698
|
] }),
|
|
696
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ y(R, { children: [
|
|
697
700
|
O === "Chart" && /* @__PURE__ */ e(
|
|
698
|
-
|
|
701
|
+
oo,
|
|
699
702
|
{
|
|
700
|
-
availableHeight:
|
|
703
|
+
availableHeight: oe,
|
|
701
704
|
onClickLegend: ae,
|
|
702
705
|
onHoverArea: ie,
|
|
703
|
-
onHoverLegend:
|
|
704
|
-
onHoverPoint:
|
|
706
|
+
onHoverLegend: Q,
|
|
707
|
+
onHoverPoint: q,
|
|
705
708
|
stackedDatasets: re.stackedDatasets,
|
|
706
709
|
unstackedDatasets: re.unstackedDatasets
|
|
707
710
|
}
|
|
708
711
|
),
|
|
709
712
|
O === "Table" && /* @__PURE__ */ e(
|
|
710
|
-
|
|
713
|
+
st,
|
|
711
714
|
{
|
|
712
715
|
monthlyCategoryTotals: c,
|
|
713
716
|
onClickRow: K,
|
|
@@ -720,7 +723,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
720
723
|
}
|
|
721
724
|
),
|
|
722
725
|
/* @__PURE__ */ e(
|
|
723
|
-
|
|
726
|
+
lo,
|
|
724
727
|
{
|
|
725
728
|
categoryGuid: M,
|
|
726
729
|
dateRange: l,
|
|
@@ -731,8 +734,8 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
731
734
|
]
|
|
732
735
|
}
|
|
733
736
|
);
|
|
734
|
-
},
|
|
735
|
-
const { monthlyCategoryTotals: o } = U(), { trends: r } = N(), t =
|
|
737
|
+
}, An = k(uo), ho = () => {
|
|
738
|
+
const { monthlyCategoryTotals: o } = U(), { trends: r } = N(), t = me(), { availableHeight: n = 300 } = je(), s = It(o);
|
|
736
739
|
return /* @__PURE__ */ e(
|
|
737
740
|
We,
|
|
738
741
|
{
|
|
@@ -749,40 +752,40 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
749
752
|
valueFormatterString: "0,0"
|
|
750
753
|
}
|
|
751
754
|
);
|
|
752
|
-
},
|
|
753
|
-
const { visibleAccounts: t } = ve(), { loadMonthlyCategoryTotals: n, monthlyTotalsLoaded: s } = U(), { isInitialized:
|
|
755
|
+
}, go = k(ho), mo = ({ onPrimaryCtaClick: o, sx: r }) => {
|
|
756
|
+
const { visibleAccounts: t } = ve(), { loadMonthlyCategoryTotals: n, monthlyTotalsLoaded: s } = U(), { isInitialized: g } = Ne(), { trends: d } = N(), { isCopyLoaded: u, selectedAccounts: c, setSelectedAccounts: m } = pe();
|
|
754
757
|
return we({
|
|
755
758
|
widgetName: "TrendsMiniWidget",
|
|
756
759
|
isLoaded: s
|
|
757
|
-
}),
|
|
760
|
+
}), h.useEffect(() => {
|
|
758
761
|
m(t);
|
|
759
|
-
}, [t]),
|
|
760
|
-
|
|
761
|
-
}, [
|
|
762
|
-
|
|
762
|
+
}, [t]), h.useEffect(() => {
|
|
763
|
+
g && n(c).finally();
|
|
764
|
+
}, [g, c]), !u || !g ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
|
|
765
|
+
At,
|
|
763
766
|
{
|
|
764
767
|
contentStyles: { height: "calc(100% - 72px)", ":last-child": { pb: 0 } },
|
|
765
768
|
onPrimaryCtaClick: o,
|
|
766
|
-
primaryCtaLabel:
|
|
767
|
-
subTitle:
|
|
769
|
+
primaryCtaLabel: d.primary_cta,
|
|
770
|
+
subTitle: d.sub_title,
|
|
768
771
|
sx: { height: "100%", ...r },
|
|
769
|
-
title:
|
|
770
|
-
children: s ? /* @__PURE__ */ e(
|
|
772
|
+
title: d.mini_title,
|
|
773
|
+
children: s ? /* @__PURE__ */ e(go, {}) : /* @__PURE__ */ e(ge, {})
|
|
771
774
|
}
|
|
772
775
|
);
|
|
773
|
-
},
|
|
776
|
+
}, Rn = k(mo), po = 70, Ve = ({
|
|
774
777
|
title: o,
|
|
775
778
|
totalAmount: r,
|
|
776
779
|
transactionType: t,
|
|
777
780
|
percentage: n,
|
|
778
781
|
secondaryLabel: s,
|
|
779
|
-
shouldDisplayPercentage:
|
|
782
|
+
shouldDisplayPercentage: g
|
|
780
783
|
}) => {
|
|
781
|
-
const { availableWidth:
|
|
784
|
+
const { availableWidth: d } = je(), u = h.useRef(null), c = h.useRef(null), m = yt(Number(Math.abs(n)), {
|
|
782
785
|
style: "percent",
|
|
783
786
|
minimumIntegerDigits: 1
|
|
784
|
-
}),
|
|
785
|
-
return /* @__PURE__ */
|
|
787
|
+
}), p = d === 288 && se(r, "0,0.00").length > 10 ? se(r, "0,0") : se(r, "0,0.00"), l = t === "spending" ? n > 0 : n >= 0, T = t === "spending" ? "error.main" : "success.main", a = t === "spending" ? "success.main" : "text.secondary", f = u?.current, _ = c?.current, C = f && _ ? f.scrollWidth > _.clientWidth - po : !1;
|
|
788
|
+
return /* @__PURE__ */ y(
|
|
786
789
|
b,
|
|
787
790
|
{
|
|
788
791
|
sx: {
|
|
@@ -795,7 +798,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
795
798
|
py: 8
|
|
796
799
|
},
|
|
797
800
|
children: [
|
|
798
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ y(
|
|
799
802
|
b,
|
|
800
803
|
{
|
|
801
804
|
sx: {
|
|
@@ -805,8 +808,8 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
805
808
|
},
|
|
806
809
|
children: [
|
|
807
810
|
/* @__PURE__ */ e(he, { color: "text.secondary", variant: "caption", children: o }),
|
|
808
|
-
|
|
809
|
-
l ? /* @__PURE__ */ e(
|
|
811
|
+
g && /* @__PURE__ */ y(b, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
812
|
+
l ? /* @__PURE__ */ e(kt, { size: 20, sx: { color: T } }) : /* @__PURE__ */ e(Ht, { size: 20, sx: { color: a } }),
|
|
810
813
|
/* @__PURE__ */ e(
|
|
811
814
|
he,
|
|
812
815
|
{
|
|
@@ -822,7 +825,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
822
825
|
]
|
|
823
826
|
}
|
|
824
827
|
),
|
|
825
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ y(
|
|
826
829
|
b,
|
|
827
830
|
{
|
|
828
831
|
ref: c,
|
|
@@ -833,14 +836,14 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
833
836
|
},
|
|
834
837
|
children: [
|
|
835
838
|
/* @__PURE__ */ e(
|
|
836
|
-
|
|
839
|
+
R,
|
|
837
840
|
{
|
|
838
|
-
ref:
|
|
841
|
+
ref: u,
|
|
839
842
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
840
|
-
children: /* @__PURE__ */ e(Fe, { children:
|
|
843
|
+
children: /* @__PURE__ */ e(Fe, { children: p })
|
|
841
844
|
}
|
|
842
845
|
),
|
|
843
|
-
|
|
846
|
+
g && d >= 450 && !C && /* @__PURE__ */ e(
|
|
844
847
|
he,
|
|
845
848
|
{
|
|
846
849
|
color: l ? T : a,
|
|
@@ -854,52 +857,52 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
854
857
|
]
|
|
855
858
|
}
|
|
856
859
|
);
|
|
857
|
-
}, fo =
|
|
860
|
+
}, fo = k(() => {
|
|
858
861
|
const { trends: o } = N();
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */ e(
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ y(b, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
863
|
+
/* @__PURE__ */ e(Nt, { size: 32 }),
|
|
864
|
+
/* @__PURE__ */ y(b, { children: [
|
|
862
865
|
/* @__PURE__ */ e(he, { fontWeight: 600, variant: "body1", children: o.zero_state_content_header }),
|
|
863
866
|
/* @__PURE__ */ e(he, { color: "text.secondary", variant: "subtitle2", children: o.zero_state_content_description })
|
|
864
867
|
] })
|
|
865
868
|
] });
|
|
866
|
-
}),
|
|
867
|
-
const { visibleAccounts: r } = ve(), { onEvent: t } = V(), { monthlyCategoryTotals: n, loadMonthlyCategoryTotals: s, monthlyTotalsLoaded:
|
|
868
|
-
start:
|
|
869
|
+
}), kn = k(({ onCtaClick: o }) => {
|
|
870
|
+
const { visibleAccounts: r } = ve(), { onEvent: t } = V(), { monthlyCategoryTotals: n, loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: g } = U(), d = {
|
|
871
|
+
start: Rt(/* @__PURE__ */ new Date(), 1),
|
|
869
872
|
end: /* @__PURE__ */ new Date()
|
|
870
|
-
}, { trends:
|
|
873
|
+
}, { trends: u } = N(), { selectedAccounts: c, setSelectedAccounts: m, isInitialized: p } = pe();
|
|
871
874
|
we({
|
|
872
875
|
widgetName: "TrendsMicroWidget",
|
|
873
|
-
isLoaded:
|
|
874
|
-
}),
|
|
876
|
+
isLoaded: g
|
|
877
|
+
}), h.useEffect(() => {
|
|
875
878
|
m(r);
|
|
876
|
-
}, [r]),
|
|
877
|
-
|
|
879
|
+
}, [r]), h.useEffect(() => {
|
|
880
|
+
p && s(c, d.start).then(() => {
|
|
878
881
|
t(v.TRENDS_LOAD_WIDGET, {
|
|
879
882
|
state: r?.length ? "default" : "zeroState"
|
|
880
883
|
});
|
|
881
884
|
});
|
|
882
|
-
}, [
|
|
883
|
-
const { spendingData: l, incomeData: T } =
|
|
885
|
+
}, [p, c]);
|
|
886
|
+
const { spendingData: l, incomeData: T } = h.useMemo(
|
|
884
887
|
() => ({
|
|
885
|
-
spendingData:
|
|
886
|
-
incomeData:
|
|
888
|
+
spendingData: Xe(n, d),
|
|
889
|
+
incomeData: Ze(n, d)
|
|
887
890
|
}),
|
|
888
|
-
[n,
|
|
889
|
-
), [a,
|
|
891
|
+
[n, d]
|
|
892
|
+
), [a, f] = l, [_, C] = T, E = Ge(f.y, a.y), x = Ge(C.y, _.y), D = p && !r?.length, W = () => {
|
|
890
893
|
t(
|
|
891
|
-
|
|
894
|
+
D ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
|
|
892
895
|
), o();
|
|
893
896
|
};
|
|
894
|
-
return !
|
|
895
|
-
|
|
897
|
+
return !g || !p ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
|
|
898
|
+
Gt,
|
|
896
899
|
{
|
|
897
900
|
className: "mx-trends-microwidget",
|
|
898
|
-
ctaLabel:
|
|
901
|
+
ctaLabel: u.micro_primary_cta_label,
|
|
899
902
|
onCTAClick: W,
|
|
900
|
-
subHeader:
|
|
901
|
-
title:
|
|
902
|
-
children:
|
|
903
|
+
subHeader: D ? void 0 : u.micro_subheader,
|
|
904
|
+
title: u.title,
|
|
905
|
+
children: D ? /* @__PURE__ */ e(fo, {}) : /* @__PURE__ */ y(
|
|
903
906
|
b,
|
|
904
907
|
{
|
|
905
908
|
sx: {
|
|
@@ -912,10 +915,10 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
912
915
|
Ve,
|
|
913
916
|
{
|
|
914
917
|
percentage: E,
|
|
915
|
-
secondaryLabel:
|
|
916
|
-
shouldDisplayPercentage:
|
|
917
|
-
title:
|
|
918
|
-
totalAmount:
|
|
918
|
+
secondaryLabel: u.micro_secondary_label,
|
|
919
|
+
shouldDisplayPercentage: f.y !== 0 && a.y !== 0,
|
|
920
|
+
title: u.spending_label,
|
|
921
|
+
totalAmount: f.y,
|
|
919
922
|
transactionType: "spending"
|
|
920
923
|
}
|
|
921
924
|
),
|
|
@@ -923,10 +926,10 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
923
926
|
Ve,
|
|
924
927
|
{
|
|
925
928
|
percentage: x,
|
|
926
|
-
secondaryLabel:
|
|
927
|
-
shouldDisplayPercentage:
|
|
928
|
-
title:
|
|
929
|
-
totalAmount:
|
|
929
|
+
secondaryLabel: u.micro_secondary_label,
|
|
930
|
+
shouldDisplayPercentage: C.y !== 0 && _.y !== 0,
|
|
931
|
+
title: u.income_label,
|
|
932
|
+
totalAmount: C.y,
|
|
930
933
|
transactionType: "income"
|
|
931
934
|
}
|
|
932
935
|
)
|
|
@@ -935,17 +938,17 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
935
938
|
)
|
|
936
939
|
}
|
|
937
940
|
);
|
|
938
|
-
}),
|
|
941
|
+
}), Co = k(
|
|
939
942
|
({ isExpanded: o, onClick: r }) => {
|
|
940
|
-
const t =
|
|
941
|
-
return /* @__PURE__ */ e(
|
|
943
|
+
const t = et();
|
|
944
|
+
return /* @__PURE__ */ e(Pt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Ft, { onClick: r, sx: { justifyContent: "center" }, children: /* @__PURE__ */ y(
|
|
942
945
|
b,
|
|
943
946
|
{
|
|
944
947
|
sx: { color: t.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
945
948
|
children: [
|
|
946
|
-
/* @__PURE__ */ e(
|
|
947
|
-
/* @__PURE__ */ e(
|
|
948
|
-
|
|
949
|
+
/* @__PURE__ */ e($t, { children: /* @__PURE__ */ e(z, { bold: !0, variant: "body2", children: o ? "View less" : "View more" }) }),
|
|
950
|
+
/* @__PURE__ */ e(zt, { sx: { color: t.palette.primary.main }, children: o ? /* @__PURE__ */ e(Wt, {}) : /* @__PURE__ */ e(
|
|
951
|
+
Ot,
|
|
949
952
|
{
|
|
950
953
|
sx: {
|
|
951
954
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -957,94 +960,94 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
957
960
|
}
|
|
958
961
|
) }) });
|
|
959
962
|
}
|
|
960
|
-
), Pe =
|
|
963
|
+
), Pe = k(
|
|
961
964
|
({
|
|
962
965
|
totalAmount: o,
|
|
963
966
|
guid: r,
|
|
964
967
|
name: t,
|
|
965
968
|
transactions: n,
|
|
966
969
|
onClick: s,
|
|
967
|
-
isLastItem:
|
|
968
|
-
showDivider:
|
|
970
|
+
isLastItem: g = !1,
|
|
971
|
+
showDivider: d = !0
|
|
969
972
|
}) => {
|
|
970
|
-
const { trends:
|
|
973
|
+
const { trends: u } = N(), { onEvent: c } = V(), m = `${n.length} ${n.length === 1 ? u.transaction : u.transactions}`, p = () => {
|
|
971
974
|
s?.(), c(v.TRENDS_CLICK_LIST_ITEM, {
|
|
972
975
|
...G,
|
|
973
976
|
listItem: t
|
|
974
977
|
});
|
|
975
978
|
};
|
|
976
|
-
return /* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ y(h.Fragment, { children: [
|
|
977
980
|
/* @__PURE__ */ e(
|
|
978
|
-
|
|
981
|
+
Ue,
|
|
979
982
|
{
|
|
980
|
-
leftIcon: r ? /* @__PURE__ */ e(
|
|
981
|
-
onClick:
|
|
983
|
+
leftIcon: r ? /* @__PURE__ */ e(be, { categoryGuid: r }) : void 0,
|
|
984
|
+
onClick: p,
|
|
982
985
|
rightContent: se(Math.abs(o), "0,0.00"),
|
|
983
|
-
rightIcon: s ? /* @__PURE__ */ e(
|
|
986
|
+
rightIcon: s ? /* @__PURE__ */ e(ut, {}) : void 0,
|
|
984
987
|
subtitle: m,
|
|
985
988
|
title: t
|
|
986
989
|
}
|
|
987
990
|
),
|
|
988
|
-
|
|
991
|
+
d && /* @__PURE__ */ e(ke, { sx: { ml: g ? 24 : 68 } })
|
|
989
992
|
] }, r);
|
|
990
993
|
}
|
|
991
|
-
),
|
|
994
|
+
), yo = k(
|
|
992
995
|
({ availableHeight: o = 0, onCategoryClick: r }) => {
|
|
993
|
-
const { collapsedCategories: t, visibleCategories: n, setVisibleListLength: s } =
|
|
994
|
-
|
|
995
|
-
const
|
|
996
|
-
|
|
996
|
+
const { collapsedCategories: t, visibleCategories: n, setVisibleListLength: s } = fe(), { isLargeDesktop: g, isDesktop: d } = te(), { trends: u } = N(), { onEvent: c } = V(), [m, p] = h.useState(!1), l = d || g;
|
|
997
|
+
h.useEffect(() => {
|
|
998
|
+
const f = Math.floor(o / 64) - 1, _ = n.length + t.length;
|
|
999
|
+
f !== n.length && (s(l ? Math.max(f, 5) : 5), p(f >= _));
|
|
997
1000
|
}, [o]);
|
|
998
1001
|
const T = () => {
|
|
999
|
-
|
|
1002
|
+
p(!m), c(v.TRENDS_CLICK_VIEW_MORE, {
|
|
1000
1003
|
...G
|
|
1001
1004
|
});
|
|
1002
1005
|
}, a = n.length + (m ? t.length : 0);
|
|
1003
|
-
return /* @__PURE__ */ e(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */
|
|
1004
|
-
/* @__PURE__ */ e(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Fe, { children:
|
|
1005
|
-
n.map((
|
|
1006
|
+
return /* @__PURE__ */ e(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ y(Vt, { children: [
|
|
1007
|
+
/* @__PURE__ */ e(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Fe, { children: u.categories }) }),
|
|
1008
|
+
n.map((f, _) => /* @__PURE__ */ e(
|
|
1006
1009
|
Pe,
|
|
1007
1010
|
{
|
|
1008
|
-
...
|
|
1011
|
+
...f,
|
|
1009
1012
|
isLastItem: _ === a - 1,
|
|
1010
|
-
onClick:
|
|
1013
|
+
onClick: f.transactions.length > 0 ? () => r(f) : void 0,
|
|
1011
1014
|
showDivider: !0
|
|
1012
1015
|
},
|
|
1013
|
-
|
|
1016
|
+
f.guid
|
|
1014
1017
|
)),
|
|
1015
1018
|
/* @__PURE__ */ e(
|
|
1016
|
-
|
|
1019
|
+
Bt,
|
|
1017
1020
|
{
|
|
1018
1021
|
in: m,
|
|
1019
1022
|
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
1020
|
-
children: t.map((
|
|
1021
|
-
const
|
|
1023
|
+
children: t.map((f, _) => {
|
|
1024
|
+
const C = n.length + _;
|
|
1022
1025
|
return /* @__PURE__ */ e(
|
|
1023
1026
|
Pe,
|
|
1024
1027
|
{
|
|
1025
|
-
...
|
|
1026
|
-
isLastItem:
|
|
1027
|
-
onClick:
|
|
1028
|
+
...f,
|
|
1029
|
+
isLastItem: C === a - 1,
|
|
1030
|
+
onClick: f.transactions.length > 0 ? () => r(f) : void 0,
|
|
1028
1031
|
showDivider: !0
|
|
1029
1032
|
},
|
|
1030
|
-
|
|
1033
|
+
f.guid
|
|
1031
1034
|
);
|
|
1032
1035
|
})
|
|
1033
1036
|
}
|
|
1034
1037
|
),
|
|
1035
|
-
t.length > 0 && /* @__PURE__ */ e(
|
|
1038
|
+
t.length > 0 && /* @__PURE__ */ e(Co, { isExpanded: m, onClick: T })
|
|
1036
1039
|
] }) });
|
|
1037
1040
|
}
|
|
1038
|
-
),
|
|
1039
|
-
const { onEvent: t } = V(), { isMobile: n, isDesktop: s, isLargeDesktop:
|
|
1041
|
+
), _o = ({ beats: o, onInsightCardClick: r }) => {
|
|
1042
|
+
const { onEvent: t } = V(), { isMobile: n, isDesktop: s, isLargeDesktop: g } = te(), { beatStore: d, endpoint: u, sessionToken: c } = Ne(), m = s || g, p = m || n ? 1 : 2, l = () => null, T = (x) => {
|
|
1040
1043
|
r?.(x), t(v.TRENDS_CLICK_INSIGHT, G);
|
|
1041
|
-
}, a = m ? 200 : 170,
|
|
1042
|
-
return /* @__PURE__ */ e(
|
|
1043
|
-
|
|
1044
|
+
}, a = m ? 200 : 170, f = m ? 170 : 124, _ = m ? 56 : 0, C = o.length > 0 ? a + _ : f, E = m && o.length > 0 ? a : void 0;
|
|
1045
|
+
return /* @__PURE__ */ e(Kt, { sx: { height: C }, children: /* @__PURE__ */ e(
|
|
1046
|
+
Mt,
|
|
1044
1047
|
{
|
|
1045
|
-
areBeatsLoading:
|
|
1048
|
+
areBeatsLoading: d.isLoading,
|
|
1046
1049
|
beats: o,
|
|
1047
|
-
endpoint:
|
|
1050
|
+
endpoint: u,
|
|
1048
1051
|
heightOverrides: E,
|
|
1049
1052
|
logOutUser: l,
|
|
1050
1053
|
onCardClick: T,
|
|
@@ -1057,13 +1060,13 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1057
1060
|
token: c,
|
|
1058
1061
|
userHasFullInsightFeedBeats: !1,
|
|
1059
1062
|
variant: "outlined",
|
|
1060
|
-
visibleCardsCount:
|
|
1063
|
+
visibleCardsCount: p
|
|
1061
1064
|
}
|
|
1062
1065
|
) });
|
|
1063
|
-
},
|
|
1066
|
+
}, To = k(_o), So = k(({ chartLabel: o, chartColor: r }) => {
|
|
1064
1067
|
const { onEvent: t } = V(), {
|
|
1065
1068
|
categoryDetailsChartData: { monthlyAmounts: n, tooltipLabels: s }
|
|
1066
|
-
} =
|
|
1069
|
+
} = fe();
|
|
1067
1070
|
return /* @__PURE__ */ e(b, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
1068
1071
|
We,
|
|
1069
1072
|
{
|
|
@@ -1093,47 +1096,47 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1093
1096
|
valueFormatterString: "0,0"
|
|
1094
1097
|
}
|
|
1095
1098
|
) });
|
|
1096
|
-
}),
|
|
1097
|
-
const r =
|
|
1098
|
-
if (!
|
|
1099
|
+
}), bo = k(({ onClose: o }) => {
|
|
1100
|
+
const r = et(), { onEvent: t } = V(), { common: n, trends: s } = N(), { selectedCategoryData: g, selectedDateRangeMonthRange: d } = fe(), { sortedTransactions: u } = xe(), [c, m] = h.useState(null);
|
|
1101
|
+
if (!g)
|
|
1099
1102
|
return null;
|
|
1100
|
-
const { guid:
|
|
1101
|
-
() =>
|
|
1102
|
-
[c,
|
|
1103
|
-
),
|
|
1103
|
+
const { guid: p, name: l, is_income: T, totalAmount: a } = g, f = T ? s.category_income : s.category_spending, _ = Yt(p, r), C = T ? s.income_label : s.spending_label, E = ` ${g.transactions.length === 1 ? s.transaction : s.transactions} (${g.transactions.length})`, x = h.useMemo(
|
|
1104
|
+
() => u.find((L) => L.guid === c),
|
|
1105
|
+
[c, u]
|
|
1106
|
+
), D = (L) => L.category_guid === p || L.top_level_category_guid === p, W = () => {
|
|
1104
1107
|
o?.(), t(v.TRENDS_CLICK_BACK, G);
|
|
1105
1108
|
};
|
|
1106
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ y(
|
|
1107
1110
|
He,
|
|
1108
1111
|
{
|
|
1109
1112
|
ariaLabelClose: s.close_category_details,
|
|
1110
1113
|
isOpen: !0,
|
|
1111
1114
|
onClose: W,
|
|
1112
1115
|
shouldShowHeaderShadow: !0,
|
|
1113
|
-
title:
|
|
1116
|
+
title: f,
|
|
1114
1117
|
children: [
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ y(b, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1119
|
+
/* @__PURE__ */ y(jt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
1117
1120
|
/* @__PURE__ */ e(
|
|
1118
|
-
|
|
1121
|
+
Ue,
|
|
1119
1122
|
{
|
|
1120
|
-
leftIcon: /* @__PURE__ */ e(
|
|
1123
|
+
leftIcon: /* @__PURE__ */ e(be, { categoryGuid: p }),
|
|
1121
1124
|
rightContent: se(Math.abs(a), "0,0.00"),
|
|
1122
|
-
subtitle:
|
|
1125
|
+
subtitle: d,
|
|
1123
1126
|
title: l
|
|
1124
1127
|
}
|
|
1125
1128
|
),
|
|
1126
|
-
/* @__PURE__ */ e(
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */ e(
|
|
1129
|
-
/* @__PURE__ */ e(
|
|
1129
|
+
/* @__PURE__ */ e(So, { chartColor: _, chartLabel: C }),
|
|
1130
|
+
/* @__PURE__ */ y(b, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
1131
|
+
/* @__PURE__ */ e(z, { bold: !0, variant: "body1", children: E }),
|
|
1132
|
+
/* @__PURE__ */ e(Ut, { filter: D })
|
|
1130
1133
|
] })
|
|
1131
1134
|
] }),
|
|
1132
1135
|
/* @__PURE__ */ e(
|
|
1133
|
-
|
|
1136
|
+
Je,
|
|
1134
1137
|
{
|
|
1135
1138
|
bgcolor: "transparent",
|
|
1136
|
-
filter:
|
|
1139
|
+
filter: D,
|
|
1137
1140
|
height: "calc(100vh - 475px)",
|
|
1138
1141
|
onClick: m
|
|
1139
1142
|
}
|
|
@@ -1146,34 +1149,34 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1146
1149
|
isOpen: !!x,
|
|
1147
1150
|
onClose: () => m(""),
|
|
1148
1151
|
title: s.transaction,
|
|
1149
|
-
children: x && /* @__PURE__ */ e(
|
|
1152
|
+
children: x && /* @__PURE__ */ e(qe, { transaction: x })
|
|
1150
1153
|
}
|
|
1151
1154
|
)
|
|
1152
1155
|
]
|
|
1153
1156
|
}
|
|
1154
1157
|
);
|
|
1155
|
-
}),
|
|
1156
|
-
const t =
|
|
1158
|
+
}), xo = (o, r) => {
|
|
1159
|
+
const t = Ze(o, r), n = Xe(o, r);
|
|
1157
1160
|
return [t, n].filter((s) => s.length > 0);
|
|
1158
|
-
},
|
|
1159
|
-
const [t, n] = o, s = t,
|
|
1161
|
+
}, vo = (o, r) => {
|
|
1162
|
+
const [t, n] = o, s = t, g = n ?? t, d = [];
|
|
1160
1163
|
if (s) {
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1164
|
+
const u = s.reduce((c, m) => c + m.y, 0);
|
|
1165
|
+
d.push({ label: r.income_label, amount: u });
|
|
1163
1166
|
}
|
|
1164
|
-
if (
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
+
if (g) {
|
|
1168
|
+
const u = g.reduce((c, m) => c + m.y, 0);
|
|
1169
|
+
d.push({ label: r.spending_label, amount: u });
|
|
1167
1170
|
}
|
|
1168
|
-
return
|
|
1169
|
-
},
|
|
1171
|
+
return d;
|
|
1172
|
+
}, wo = ({
|
|
1170
1173
|
availableHeight: o = 0,
|
|
1171
1174
|
minHeight: r = 500,
|
|
1172
1175
|
selectedDateRange: t,
|
|
1173
1176
|
totals: n
|
|
1174
1177
|
}) => {
|
|
1175
|
-
const s =
|
|
1176
|
-
return
|
|
1178
|
+
const s = me(), { onEvent: g } = V(), { trends: d } = N(), { isSmallMobile: u, isMobile: c, isSmallTablet: m, isTablet: p } = te(), l = [s.palette.chart?.chart1, s.palette.chart?.chart2], T = xo(n, t), a = vo(T, d), [f, _] = h.useState(0), C = 458, E = 195, x = 56, D = c || u ? E : m || p ? C : f;
|
|
1179
|
+
return h.useEffect(() => {
|
|
1177
1180
|
const L = Math.max(o - x, r);
|
|
1178
1181
|
_(L);
|
|
1179
1182
|
}, [o]), /* @__PURE__ */ e(
|
|
@@ -1183,10 +1186,10 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1183
1186
|
colors: l,
|
|
1184
1187
|
curveType: "bump",
|
|
1185
1188
|
datasets: T,
|
|
1186
|
-
height:
|
|
1189
|
+
height: D,
|
|
1187
1190
|
labels: a,
|
|
1188
1191
|
onItemClick: () => {
|
|
1189
|
-
|
|
1192
|
+
g(v.TRENDS_CLICK_CHART, G);
|
|
1190
1193
|
},
|
|
1191
1194
|
showArea: !0,
|
|
1192
1195
|
showAxisHighlight: !0,
|
|
@@ -1199,7 +1202,7 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1199
1202
|
valueFormatterString: "0.0a"
|
|
1200
1203
|
}
|
|
1201
1204
|
);
|
|
1202
|
-
},
|
|
1205
|
+
}, Io = k(wo), Do = [
|
|
1203
1206
|
"BillAmountNotStandard",
|
|
1204
1207
|
"CategorySpendingV2",
|
|
1205
1208
|
"CostOfLivingToIncome",
|
|
@@ -1233,32 +1236,32 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1233
1236
|
"WeeklyNewMerchantsV2",
|
|
1234
1237
|
"WeeklyNoSpendDays",
|
|
1235
1238
|
"WeeklySmallPurchasesSummary"
|
|
1236
|
-
],
|
|
1237
|
-
const { onEvent: n } = V(), { config: s } =
|
|
1238
|
-
isCopyLoaded:
|
|
1239
|
+
], Eo = ({ onBackClick: o, onInsightCardClick: r, sx: t }) => {
|
|
1240
|
+
const { onEvent: n } = V(), { config: s } = ft(), { isLargeDesktop: g, isDesktop: d, isMobile: u } = te(), { visibleAccounts: c } = ve(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: p, monthlyCategoryTotals: l } = U(), { setFilter: T } = xe(), { selectedDateRange: a, setSelectedCategoryData: f, setSelectedDateRange: _ } = fe(), {
|
|
1241
|
+
isCopyLoaded: C,
|
|
1239
1242
|
isInitialized: E,
|
|
1240
1243
|
selectedAccounts: x,
|
|
1241
|
-
selectedAccountGuids:
|
|
1244
|
+
selectedAccountGuids: D,
|
|
1242
1245
|
setSelectedAccounts: W
|
|
1243
|
-
} =
|
|
1246
|
+
} = pe(), { trends: L, connect: O } = N(), { beatStore: A } = Ne(), P = Xt() && s.show_insights_widget_in_master, $ = d || g, [X, Ce] = h.useState(!1), [oe, re] = h.useState(!1), [Z, ce] = h.useState("Chart"), [ne, K] = h.useState(""), [ae, Q] = h.useState(!1), [ie, q] = h.useState(window.innerHeight), w = $ ? 56 : 0, B = ie - 208, j = ie - (P ? 550 + w : 266), [le, ye] = h.useState(!1), Ie = s.show_connections_widget_in_master ? "buttons" : "no-buttons", i = h.useMemo(
|
|
1244
1247
|
() => c && c.length === 0 || l.length === 0,
|
|
1245
1248
|
[c, l]
|
|
1246
1249
|
);
|
|
1247
1250
|
we({
|
|
1248
1251
|
widgetName: "TrendsWidget",
|
|
1249
1252
|
isLoaded: X
|
|
1250
|
-
}),
|
|
1253
|
+
}), h.useEffect(() => {
|
|
1251
1254
|
E && A.loadBeats().finally(() => re(!0));
|
|
1252
1255
|
}, [E]);
|
|
1253
|
-
const S =
|
|
1254
|
-
|
|
1255
|
-
const
|
|
1256
|
-
return window.addEventListener("resize",
|
|
1257
|
-
}, []),
|
|
1256
|
+
const S = h.useMemo(() => oe ? A.getFilteredBeats({ templates: Do }) : [], [oe]);
|
|
1257
|
+
h.useEffect(() => {
|
|
1258
|
+
const H = () => q(window.innerHeight);
|
|
1259
|
+
return window.addEventListener("resize", H), () => window.removeEventListener("resize", H);
|
|
1260
|
+
}, []), h.useEffect(() => {
|
|
1258
1261
|
W(c);
|
|
1259
|
-
}, [c]),
|
|
1262
|
+
}, [c]), h.useEffect(() => {
|
|
1260
1263
|
E && m(x, a.start, a.end).then(() => {
|
|
1261
|
-
|
|
1264
|
+
p(
|
|
1262
1265
|
x,
|
|
1263
1266
|
a.start,
|
|
1264
1267
|
a.end
|
|
@@ -1269,104 +1272,104 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1269
1272
|
time_period: `${Re(a.end, a.start)}M`
|
|
1270
1273
|
});
|
|
1271
1274
|
});
|
|
1272
|
-
}, [E, x, a]),
|
|
1275
|
+
}, [E, x, a]), h.useEffect(() => {
|
|
1273
1276
|
if (l.length !== 0) {
|
|
1274
|
-
const
|
|
1275
|
-
accounts:
|
|
1277
|
+
const H = {
|
|
1278
|
+
accounts: D,
|
|
1276
1279
|
dateRange: { start: a.start, end: a.end }
|
|
1277
1280
|
};
|
|
1278
1281
|
T({
|
|
1279
|
-
...
|
|
1280
|
-
custom: (
|
|
1281
|
-
(ue) => ue.top_level_category_guid ===
|
|
1282
|
+
...H,
|
|
1283
|
+
custom: (J) => !!l.find(
|
|
1284
|
+
(ue) => ue.top_level_category_guid === J.top_level_category_guid || ue.category_guid === J.category_guid
|
|
1282
1285
|
)
|
|
1283
1286
|
});
|
|
1284
1287
|
}
|
|
1285
1288
|
}, [l]);
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1289
|
+
const I = (H) => {
|
|
1290
|
+
f(H), Q(!0);
|
|
1288
1291
|
}, Y = () => {
|
|
1289
|
-
|
|
1290
|
-
},
|
|
1292
|
+
f(null), Q(!1);
|
|
1293
|
+
}, De = () => {
|
|
1291
1294
|
ye(!0), n(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
1292
|
-
}, Ee = (
|
|
1293
|
-
ce(
|
|
1295
|
+
}, Ee = (H, J) => {
|
|
1296
|
+
ce(J ?? Z), n(v.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
1294
1297
|
...G,
|
|
1295
|
-
toggleView:
|
|
1298
|
+
toggleView: J
|
|
1296
1299
|
});
|
|
1297
|
-
}, de = (
|
|
1298
|
-
const
|
|
1299
|
-
_({ start:
|
|
1300
|
+
}, de = (H) => {
|
|
1301
|
+
const J = ze(H?.[0], 1), ue = H?.[1], at = Re(ue, J);
|
|
1302
|
+
_({ start: J, end: ue }), n(v.TRENDS_CLICK_TIME_WINDOW, {
|
|
1300
1303
|
...G,
|
|
1301
|
-
time_period:
|
|
1304
|
+
time_period: at + "M"
|
|
1302
1305
|
});
|
|
1303
|
-
}, Le = (
|
|
1306
|
+
}, Le = (H) => {
|
|
1304
1307
|
n(v.TRENDS_CLICK_FILTER, {
|
|
1305
1308
|
...G,
|
|
1306
|
-
filterValue:
|
|
1309
|
+
filterValue: H
|
|
1307
1310
|
});
|
|
1308
|
-
}, Me = (
|
|
1309
|
-
K(
|
|
1310
|
-
},
|
|
1311
|
+
}, Me = (H) => {
|
|
1312
|
+
K(H);
|
|
1313
|
+
}, rt = () => {
|
|
1311
1314
|
K(""), n(v.TRENDS_CLICK_ALL_CATEGORIES, G);
|
|
1312
1315
|
};
|
|
1313
|
-
return !
|
|
1314
|
-
|
|
1316
|
+
return !C || !X ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ y(
|
|
1317
|
+
Qe,
|
|
1315
1318
|
{
|
|
1316
1319
|
accountOptions: c,
|
|
1317
1320
|
calendarActions: { onRangeChanged: de },
|
|
1318
1321
|
dateRange: a,
|
|
1319
|
-
dateRangeVariant:
|
|
1322
|
+
dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
|
|
1320
1323
|
onAccountsFilterClick: Le,
|
|
1321
1324
|
onBackClick: o,
|
|
1322
1325
|
sx: t,
|
|
1323
1326
|
title: L.title,
|
|
1324
1327
|
children: [
|
|
1325
1328
|
i && /* @__PURE__ */ e(
|
|
1326
|
-
|
|
1329
|
+
Zt,
|
|
1327
1330
|
{
|
|
1328
1331
|
header: L.zero_state_content_header,
|
|
1329
1332
|
icon: "",
|
|
1330
|
-
onClick:
|
|
1333
|
+
onClick: De,
|
|
1331
1334
|
primaryButton: L.empty_state_primary,
|
|
1332
1335
|
subText: L.empty_state_sub_text,
|
|
1333
1336
|
sx: { height: B },
|
|
1334
|
-
variant:
|
|
1337
|
+
variant: Ie
|
|
1335
1338
|
}
|
|
1336
1339
|
),
|
|
1337
|
-
!i && /* @__PURE__ */
|
|
1340
|
+
!i && /* @__PURE__ */ y(
|
|
1338
1341
|
b,
|
|
1339
1342
|
{
|
|
1340
1343
|
sx: {
|
|
1341
|
-
px:
|
|
1344
|
+
px: u ? 0 : 48
|
|
1342
1345
|
},
|
|
1343
1346
|
children: [
|
|
1344
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ y(
|
|
1345
1348
|
b,
|
|
1346
1349
|
{
|
|
1347
1350
|
flexDirection: "row",
|
|
1348
1351
|
justifyContent: "space-between",
|
|
1349
|
-
sx: { pb:
|
|
1352
|
+
sx: { pb: u ? 12 : 24, pt: u ? 24 : 48 },
|
|
1350
1353
|
children: [
|
|
1351
1354
|
/* @__PURE__ */ e(
|
|
1352
|
-
|
|
1355
|
+
nt,
|
|
1353
1356
|
{
|
|
1354
|
-
selectedCategoryGuid:
|
|
1357
|
+
selectedCategoryGuid: ne,
|
|
1355
1358
|
selectedDateRange: a
|
|
1356
1359
|
}
|
|
1357
1360
|
),
|
|
1358
|
-
/* @__PURE__ */ e(
|
|
1361
|
+
/* @__PURE__ */ e(ot, { onTabChange: Ee, selectedTab: Z })
|
|
1359
1362
|
]
|
|
1360
1363
|
}
|
|
1361
1364
|
),
|
|
1362
|
-
/* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(
|
|
1363
|
-
/* @__PURE__ */ e(
|
|
1365
|
+
/* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(R, { flexGrow: 1, children: ne && /* @__PURE__ */ y(Te, { onClick: rt, sx: { p: 0, pr: 5 }, children: [
|
|
1366
|
+
/* @__PURE__ */ e(_e, { name: "arrow_back" }),
|
|
1364
1367
|
L.all_categories
|
|
1365
1368
|
] }) }) }),
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
Z === "Chart" && /* @__PURE__ */
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1369
|
-
|
|
1369
|
+
/* @__PURE__ */ y(b, { flexDirection: $ ? "row" : "column", gap: $ ? 48 : 16, children: [
|
|
1370
|
+
Z === "Chart" && /* @__PURE__ */ y(it, { children: [
|
|
1371
|
+
/* @__PURE__ */ e(R, { sx: { width: $ ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
1372
|
+
Io,
|
|
1370
1373
|
{
|
|
1371
1374
|
availableHeight: B,
|
|
1372
1375
|
minHeight: 450,
|
|
@@ -1374,40 +1377,40 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1374
1377
|
totals: l
|
|
1375
1378
|
}
|
|
1376
1379
|
) }),
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
P &&
|
|
1379
|
-
|
|
1380
|
+
/* @__PURE__ */ y(b, { gap: 16, sx: { width: $ ? "32%" : "100%" }, children: [
|
|
1381
|
+
P && oe && S.length > 0 && /* @__PURE__ */ e(
|
|
1382
|
+
To,
|
|
1380
1383
|
{
|
|
1381
1384
|
beats: S,
|
|
1382
1385
|
onInsightCardClick: r
|
|
1383
1386
|
}
|
|
1384
1387
|
),
|
|
1385
1388
|
/* @__PURE__ */ e(
|
|
1386
|
-
|
|
1389
|
+
yo,
|
|
1387
1390
|
{
|
|
1388
1391
|
availableHeight: j,
|
|
1389
|
-
onCategoryClick:
|
|
1392
|
+
onCategoryClick: I
|
|
1390
1393
|
}
|
|
1391
1394
|
)
|
|
1392
1395
|
] })
|
|
1393
1396
|
] }),
|
|
1394
|
-
Z === "Table" && /* @__PURE__ */ e(
|
|
1395
|
-
|
|
1397
|
+
Z === "Table" && /* @__PURE__ */ e(R, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1398
|
+
st,
|
|
1396
1399
|
{
|
|
1397
1400
|
height: "unset",
|
|
1398
1401
|
monthlyCategoryTotals: l,
|
|
1399
1402
|
onClickRow: Me,
|
|
1400
|
-
selectedCategory:
|
|
1403
|
+
selectedCategory: ne,
|
|
1401
1404
|
selectedDateRange: a
|
|
1402
1405
|
}
|
|
1403
1406
|
) })
|
|
1404
1407
|
] }),
|
|
1405
|
-
ae && /* @__PURE__ */ e(
|
|
1408
|
+
ae && /* @__PURE__ */ e(bo, { onClose: Y })
|
|
1406
1409
|
]
|
|
1407
1410
|
}
|
|
1408
1411
|
),
|
|
1409
1412
|
/* @__PURE__ */ e(
|
|
1410
|
-
|
|
1413
|
+
Qt,
|
|
1411
1414
|
{
|
|
1412
1415
|
onClose: () => ye(!1),
|
|
1413
1416
|
showConnectWidget: le,
|
|
@@ -1417,11 +1420,11 @@ const Je = ({ categoryGuid: o, topLevelCategoryGuid: r }) => {
|
|
|
1417
1420
|
]
|
|
1418
1421
|
}
|
|
1419
1422
|
);
|
|
1420
|
-
},
|
|
1423
|
+
}, Hn = k(Eo);
|
|
1421
1424
|
export {
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
An as TrendsFullWidget,
|
|
1426
|
+
kn as TrendsMicroWidget,
|
|
1427
|
+
Rn as TrendsMiniWidget,
|
|
1428
|
+
On as TrendsStore,
|
|
1429
|
+
Hn as TrendsWidget
|
|
1427
1430
|
};
|