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