@mx-cartographer/experiences 4.0.14-alpha.JB0 → 4.0.14-alpha.JB2
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/dist/AccountStore-B23-oV1B.mjs +244 -0
- package/dist/AccountStore-B23-oV1B.mjs.map +1 -0
- package/dist/BeatApi-BxXgbSJY.mjs +99 -0
- package/dist/BeatApi-BxXgbSJY.mjs.map +1 -0
- package/dist/BudgetUtil-BSn9Zr71.mjs +208 -0
- package/dist/BudgetUtil-BSn9Zr71.mjs.map +1 -0
- package/dist/CashflowApi-zcebgnO1.mjs +103 -0
- package/dist/CashflowApi-zcebgnO1.mjs.map +1 -0
- package/dist/CashflowStore-gPEEBiXo.mjs +53 -0
- package/dist/CashflowStore-gPEEBiXo.mjs.map +1 -0
- package/dist/Categories-XVFviD23.mjs +117 -0
- package/dist/Categories-XVFviD23.mjs.map +1 -0
- package/dist/CategoryStore-CSNSMNA6.mjs +298 -0
- package/dist/CategoryStore-CSNSMNA6.mjs.map +1 -0
- package/dist/ConnectMiniWidget-Ep65CtHH.mjs +10854 -0
- package/dist/ConnectMiniWidget-Ep65CtHH.mjs.map +1 -0
- package/dist/DebtsStore-Duf3n1vZ.mjs +127 -0
- package/dist/DebtsStore-Duf3n1vZ.mjs.map +1 -0
- package/dist/Donut-DgMeKScZ.mjs +53 -0
- package/dist/Donut-DgMeKScZ.mjs.map +1 -0
- package/dist/Fetch-DpUi1_Dx.mjs +99 -0
- package/dist/Fetch-DpUi1_Dx.mjs.map +1 -0
- package/dist/GoalStore-BYoRLx99.mjs +128 -0
- package/dist/GoalStore-BYoRLx99.mjs.map +1 -0
- package/dist/MerchantStore-RhLvDvX-.mjs +118 -0
- package/dist/MerchantStore-RhLvDvX-.mjs.map +1 -0
- package/dist/NetWorthStore-syD1VnxE.mjs +66 -0
- package/dist/NetWorthStore-syD1VnxE.mjs.map +1 -0
- package/dist/NotificationStore-CqTYHfJC.mjs +141 -0
- package/dist/NotificationStore-CqTYHfJC.mjs.map +1 -0
- package/dist/RecurringActivityStore-B_COvGWG.mjs +304 -0
- package/dist/RecurringActivityStore-B_COvGWG.mjs.map +1 -0
- package/dist/StackedLineChart-CCqGRwvs.mjs +342 -0
- package/dist/StackedLineChart-CCqGRwvs.mjs.map +1 -0
- package/dist/TransactionStore-BUrjBWkk.mjs +478 -0
- package/dist/TransactionStore-BUrjBWkk.mjs.map +1 -0
- package/dist/index.es.js +12 -17869
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +107 -0
- package/dist/index.es10.js.map +1 -0
- package/dist/index.es11.js +159 -0
- package/dist/index.es11.js.map +1 -0
- package/dist/index.es12.js +483 -0
- package/dist/index.es12.js.map +1 -0
- package/dist/index.es13.js +620 -0
- package/dist/index.es13.js.map +1 -0
- package/dist/index.es14.js +788 -0
- package/dist/index.es14.js.map +1 -0
- package/dist/index.es15.js +891 -0
- package/dist/index.es15.js.map +1 -0
- package/dist/index.es16.js +962 -0
- package/dist/index.es16.js.map +1 -0
- package/dist/index.es17.js +1904 -0
- package/dist/index.es17.js.map +1 -0
- package/dist/index.es2.js +11 -0
- package/dist/index.es2.js.map +1 -0
- package/dist/index.es3.js +10 -0
- package/dist/index.es3.js.map +1 -0
- package/dist/index.es4.js +9 -0
- package/dist/index.es4.js.map +1 -0
- package/dist/index.es5.js +7 -0
- package/dist/index.es5.js.map +1 -0
- package/dist/index.es6.js +7 -0
- package/dist/index.es6.js.map +1 -0
- package/dist/index.es7.js +10 -0
- package/dist/index.es7.js.map +1 -0
- package/dist/index.es8.js +10 -0
- package/dist/index.es8.js.map +1 -0
- package/dist/index.es9.js +18 -0
- package/dist/index.es9.js.map +1 -0
- package/dist/useCombineEvents-CZUDHE96.mjs +170 -0
- package/dist/useCombineEvents-CZUDHE96.mjs.map +1 -0
- package/dist/usePrevious-BLb3umpI.mjs +11 -0
- package/dist/usePrevious-BLb3umpI.mjs.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { jsx as r, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import H from "react";
|
|
3
|
+
import N from "@mui/material/Box";
|
|
4
|
+
import j from "@mui/material/Stack";
|
|
5
|
+
import { useTheme as st } from "@mui/material/styles";
|
|
6
|
+
import { LineChart as mt } from "@mui/x-charts";
|
|
7
|
+
import { ae as pt, af as L, ag as R, ah as ct, aa as D, ai as lt, aj as b, a7 as w, ak as dt } from "./ConnectMiniWidget-Ep65CtHH.mjs";
|
|
8
|
+
import "date-fns/getUnixTime";
|
|
9
|
+
import "bowser";
|
|
10
|
+
import "@honeybadger-io/react";
|
|
11
|
+
import ut from "@mui/material/Button";
|
|
12
|
+
import { Text as W } from "@kyper/mui";
|
|
13
|
+
import "@mui/material/Tooltip";
|
|
14
|
+
import "@mui/material/IconButton";
|
|
15
|
+
import "@mxenabled/cssinjs";
|
|
16
|
+
import "date-fns/addDays";
|
|
17
|
+
import "date-fns/addMonths";
|
|
18
|
+
import "date-fns/eachDayOfInterval";
|
|
19
|
+
import "date-fns/eachWeekOfInterval";
|
|
20
|
+
import "date-fns/endOfMonth";
|
|
21
|
+
import "date-fns/format";
|
|
22
|
+
import "date-fns/isBefore";
|
|
23
|
+
import "date-fns/isSameMonth";
|
|
24
|
+
import "date-fns/startOfMonth";
|
|
25
|
+
import "date-fns/startOfToday";
|
|
26
|
+
import "date-fns/subMonths";
|
|
27
|
+
import "@mui/material/Paper";
|
|
28
|
+
import "@mui/icons-material/KeyboardArrowLeftRounded";
|
|
29
|
+
import "@mui/icons-material/KeyboardArrowRightRounded";
|
|
30
|
+
import "date-fns/isSameDay";
|
|
31
|
+
import "date-fns/isWithinInterval";
|
|
32
|
+
import "@mui/material/styles/useTheme";
|
|
33
|
+
import "d3";
|
|
34
|
+
import { useTheme as gt, Card as ht, CardContent as yt, Box as vt } from "@mui/material";
|
|
35
|
+
import "date-fns/intlFormat";
|
|
36
|
+
import "date-fns/addYears";
|
|
37
|
+
import "date-fns/differenceInCalendarDays";
|
|
38
|
+
import "date-fns/endOfToday";
|
|
39
|
+
import "date-fns/endOfYear";
|
|
40
|
+
import "date-fns/startOfYear";
|
|
41
|
+
import "date-fns/subDays";
|
|
42
|
+
import "date-fns/subYears";
|
|
43
|
+
import "@mui/material/ButtonGroup";
|
|
44
|
+
import "@mui/material/Tab";
|
|
45
|
+
import "@mui/material/Tabs";
|
|
46
|
+
import "@mui/material/ToggleButton";
|
|
47
|
+
import "@mui/material/ToggleButtonGroup";
|
|
48
|
+
import "@mui/material/Dialog";
|
|
49
|
+
import "@mui/material/DialogContent";
|
|
50
|
+
import "@mui/icons-material/ArrowBackOutlined";
|
|
51
|
+
import "@mui/material/Card";
|
|
52
|
+
import "@mui/material/CardHeader";
|
|
53
|
+
import "@mui/material/CardContent";
|
|
54
|
+
import "uuid";
|
|
55
|
+
import "numeral";
|
|
56
|
+
import "@mui/material/CircularProgress";
|
|
57
|
+
import "@mui/material/FormControlLabel";
|
|
58
|
+
import "@mui/material/Radio";
|
|
59
|
+
import "@mui/material/Avatar";
|
|
60
|
+
import "@mui/material/ListItem";
|
|
61
|
+
import "@mui/material/ListItemAvatar";
|
|
62
|
+
import "@mui/material/ListItemButton";
|
|
63
|
+
import "@mui/material/ListItemText";
|
|
64
|
+
import "@mui/material/ListItemIcon";
|
|
65
|
+
import "mobx";
|
|
66
|
+
import "date-fns/differenceInDays";
|
|
67
|
+
import "date-fns/fromUnixTime";
|
|
68
|
+
import "@mui/x-data-grid-pro";
|
|
69
|
+
import "date-fns";
|
|
70
|
+
import "date-fns/getMonth";
|
|
71
|
+
import "date-fns/isAfter";
|
|
72
|
+
import "date-fns/addQuarters";
|
|
73
|
+
import "date-fns/addWeeks";
|
|
74
|
+
import "date-fns/nextDay";
|
|
75
|
+
import "date-fns/parseISO";
|
|
76
|
+
import "date-fns/setDate";
|
|
77
|
+
import "date-fns/subWeeks";
|
|
78
|
+
import "date-fns/getDay";
|
|
79
|
+
import "date-fns/formatISO";
|
|
80
|
+
const ft = ({
|
|
81
|
+
categoryGuids: { guid: d, topLevelGuid: u },
|
|
82
|
+
itemData: { dataIndex: s },
|
|
83
|
+
series: m,
|
|
84
|
+
xData: i
|
|
85
|
+
}) => {
|
|
86
|
+
const n = gt(), c = m.data[s], a = i[s];
|
|
87
|
+
return c === void 0 || !a ? null : /* @__PURE__ */ r(ht, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ r(yt, { children: /* @__PURE__ */ B(vt, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
88
|
+
/* @__PURE__ */ r(pt, { categoryGuid: d, topLevelCategoryGuid: u }),
|
|
89
|
+
/* @__PURE__ */ r(W, { color: n.palette.text.secondary, variant: "Small", children: L(a, R.MONTH_SHORT_YEAR) }),
|
|
90
|
+
/* @__PURE__ */ r(ct, { amount: String(c), bold: !0, formatString: "0,0", variant: "Body" })
|
|
91
|
+
] }) }) });
|
|
92
|
+
}, xt = ({
|
|
93
|
+
sx: d,
|
|
94
|
+
categoryGuids: u,
|
|
95
|
+
hoveredLegend: s,
|
|
96
|
+
onHoverLegend: m,
|
|
97
|
+
onClickLegend: i
|
|
98
|
+
}) => {
|
|
99
|
+
const { isMobile: n } = D(), { getCategoryName: c } = lt();
|
|
100
|
+
return /* @__PURE__ */ r(j, { direction: "row", flexWrap: "wrap", gap: n ? 2 : 6, justifyContent: "start", sx: d, children: u.map(({ guid: a, top_level_guid: M }) => {
|
|
101
|
+
const v = s === a, f = b[a], g = b[M], h = f ?? g ?? b.default, _ = h + "33";
|
|
102
|
+
return /* @__PURE__ */ B(
|
|
103
|
+
ut,
|
|
104
|
+
{
|
|
105
|
+
onClick: () => i(a),
|
|
106
|
+
onMouseEnter: () => m(a),
|
|
107
|
+
onMouseLeave: () => m(null),
|
|
108
|
+
sx: {
|
|
109
|
+
color: "text.primary",
|
|
110
|
+
fontWeight: "normal",
|
|
111
|
+
display: "flex",
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
alignItems: "center",
|
|
114
|
+
paddingX: 8,
|
|
115
|
+
paddingY: 4,
|
|
116
|
+
borderRadius: 1,
|
|
117
|
+
opacity: v ? 1 : 0.7
|
|
118
|
+
},
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ r(
|
|
121
|
+
N,
|
|
122
|
+
{
|
|
123
|
+
sx: {
|
|
124
|
+
width: 16,
|
|
125
|
+
height: 16,
|
|
126
|
+
marginRight: n ? 5 : 10,
|
|
127
|
+
borderRadius: "2px",
|
|
128
|
+
backgroundColor: s ? v ? h : _ : h
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ r(W, { variant: "Body", children: c(a) })
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
a
|
|
136
|
+
);
|
|
137
|
+
}) });
|
|
138
|
+
}, ze = ({
|
|
139
|
+
onHoverArea: d,
|
|
140
|
+
onHoverPoint: u,
|
|
141
|
+
onHoverLegend: s,
|
|
142
|
+
onClickLegend: m,
|
|
143
|
+
stackedDatasets: i,
|
|
144
|
+
unstackedDatasets: n = [],
|
|
145
|
+
height: c,
|
|
146
|
+
width: a
|
|
147
|
+
}) => {
|
|
148
|
+
const M = st(), { isMobile: v } = D(), f = H.useRef(null), [g, h] = H.useState(null), [_, y] = H.useState({
|
|
149
|
+
hoveredSeriesId: null,
|
|
150
|
+
hoveredAreaData: null,
|
|
151
|
+
isAreaHovered: !1,
|
|
152
|
+
cursorPos: { x: 0, y: 0 }
|
|
153
|
+
}), { hoveredSeriesId: l, hoveredAreaData: G, isAreaHovered: Y, cursorPos: x } = _, I = Y && l && G, E = !I, A = [...i, ...n], $ = A[0]?.dataset.length ?? 0, k = A.flatMap((t) => t.dataset.map((e) => e.x)), F = A.flatMap((t) => t.dataset.map((e) => e.y)), z = i[0]?.dataset?.map(
|
|
154
|
+
(t, e) => i.reduce((o, p) => o + p.dataset[e]?.y || 0, 0)
|
|
155
|
+
) ?? [0], X = Math.max(...z), V = Math.max(
|
|
156
|
+
...n.flatMap((t) => t.dataset.map((e) => e.y))
|
|
157
|
+
), q = Math.floor(Math.min(...F) / 100) * 100, J = Math.ceil(Math.max(X, V) / 100) * 100, S = i.map((t, e) => ({
|
|
158
|
+
id: `stacked-${e}`,
|
|
159
|
+
guid: t.category_guid,
|
|
160
|
+
top_level_guid: t.top_level_category_guid,
|
|
161
|
+
area: !0,
|
|
162
|
+
color: i[e].category_color ?? M.palette.primary.main,
|
|
163
|
+
data: t.dataset.map((o) => o.y),
|
|
164
|
+
label: i[e].category_name,
|
|
165
|
+
stack: "total",
|
|
166
|
+
type: "line",
|
|
167
|
+
highlightScope: { highlight: "item" },
|
|
168
|
+
valueFormatter: (o) => w(o, "0,0")
|
|
169
|
+
})), P = n.map((t, e) => ({
|
|
170
|
+
id: `unstacked-${e}`,
|
|
171
|
+
guid: t.category_guid,
|
|
172
|
+
top_level_guid: t.top_level_category_guid,
|
|
173
|
+
area: !1,
|
|
174
|
+
color: t.category_color,
|
|
175
|
+
data: t.dataset.map((o) => o.y),
|
|
176
|
+
label: t.category_name,
|
|
177
|
+
type: "line",
|
|
178
|
+
valueFormatter: (o) => w(o, "0,0")
|
|
179
|
+
})), O = [...S, ...P], K = [
|
|
180
|
+
...S.map(({ guid: t, top_level_guid: e }) => ({
|
|
181
|
+
guid: t,
|
|
182
|
+
top_level_guid: e
|
|
183
|
+
})),
|
|
184
|
+
...P.map(({ guid: t, top_level_guid: e }) => ({
|
|
185
|
+
guid: t,
|
|
186
|
+
top_level_guid: e
|
|
187
|
+
}))
|
|
188
|
+
], C = (t) => {
|
|
189
|
+
const o = t.startsWith("stacked-") ? i[parseInt(t.split("-")[1])] : n[parseInt(t.split("-")[1])];
|
|
190
|
+
return {
|
|
191
|
+
guid: o?.category_guid,
|
|
192
|
+
topLevelGuid: o?.top_level_category_guid
|
|
193
|
+
};
|
|
194
|
+
}, Q = (t) => {
|
|
195
|
+
h(t), s?.(t ?? "");
|
|
196
|
+
}, U = (t) => {
|
|
197
|
+
m?.(t ?? "");
|
|
198
|
+
}, Z = () => {
|
|
199
|
+
const t = C(String(l)).guid;
|
|
200
|
+
t && m?.(t);
|
|
201
|
+
}, tt = (t) => {
|
|
202
|
+
const e = String(t?.seriesId), o = C(e).guid, p = O.find((T) => T.id === e), rt = p && t?.dataIndex !== void 0, it = p && t?.dataIndex === void 0;
|
|
203
|
+
if (rt)
|
|
204
|
+
y({
|
|
205
|
+
hoveredSeriesId: e,
|
|
206
|
+
hoveredAreaData: null,
|
|
207
|
+
isAreaHovered: !1,
|
|
208
|
+
cursorPos: x
|
|
209
|
+
}), u?.(o);
|
|
210
|
+
else if (it) {
|
|
211
|
+
const T = p?.data.map((at, nt) => ({
|
|
212
|
+
x: k[nt],
|
|
213
|
+
y: at
|
|
214
|
+
})) ?? [];
|
|
215
|
+
y({
|
|
216
|
+
hoveredSeriesId: e,
|
|
217
|
+
hoveredAreaData: T,
|
|
218
|
+
isAreaHovered: !0,
|
|
219
|
+
cursorPos: x
|
|
220
|
+
}), d?.(o);
|
|
221
|
+
} else
|
|
222
|
+
y({
|
|
223
|
+
hoveredSeriesId: null,
|
|
224
|
+
hoveredAreaData: null,
|
|
225
|
+
isAreaHovered: !1,
|
|
226
|
+
cursorPos: x
|
|
227
|
+
});
|
|
228
|
+
}, et = (t) => {
|
|
229
|
+
const e = t.currentTarget.getBoundingClientRect();
|
|
230
|
+
y((o) => ({
|
|
231
|
+
...o,
|
|
232
|
+
cursorPos: {
|
|
233
|
+
x: t.clientX - e.left,
|
|
234
|
+
y: t.clientY - e.top
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
237
|
+
}, ot = {
|
|
238
|
+
p: 4,
|
|
239
|
+
"& .MuiBarLabel-root": {
|
|
240
|
+
fontSize: 10,
|
|
241
|
+
fontWeight: 600
|
|
242
|
+
},
|
|
243
|
+
"& .MuiAreaElement-root": {
|
|
244
|
+
opacity: 0.4,
|
|
245
|
+
transition: "opacity 0.3s ease"
|
|
246
|
+
},
|
|
247
|
+
"& .MuiAreaElement-root:hover": {
|
|
248
|
+
opacity: 1
|
|
249
|
+
},
|
|
250
|
+
'& [class*="MuiLineElement-series-unstacked-"]': {
|
|
251
|
+
strokeWidth: 3
|
|
252
|
+
},
|
|
253
|
+
...g && S.reduce((t, e, o) => {
|
|
254
|
+
const p = `.MuiAreaElement-series-stacked-${o}`;
|
|
255
|
+
return t[p] = {
|
|
256
|
+
opacity: S[o].guid === g ? 0.9 : 0.2
|
|
257
|
+
}, t;
|
|
258
|
+
}, {})
|
|
259
|
+
};
|
|
260
|
+
return /* @__PURE__ */ r(N, { onMouseMove: et, ref: f, style: { position: "relative" }, children: /* @__PURE__ */ B(
|
|
261
|
+
j,
|
|
262
|
+
{
|
|
263
|
+
direction: { xs: "column", md: "column" },
|
|
264
|
+
spacing: { xs: 0, md: 4 },
|
|
265
|
+
sx: { width: "100%", position: "relative" },
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ r(
|
|
268
|
+
mt,
|
|
269
|
+
{
|
|
270
|
+
height: c || 400,
|
|
271
|
+
margin: { bottom: 50 },
|
|
272
|
+
onAreaClick: Z,
|
|
273
|
+
onHighlightChange: tt,
|
|
274
|
+
series: O,
|
|
275
|
+
skipAnimation: !0,
|
|
276
|
+
slotProps: {
|
|
277
|
+
legend: {
|
|
278
|
+
hidden: !0
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
slots: {
|
|
282
|
+
itemContent: (t) => E && l ? /* @__PURE__ */ r(
|
|
283
|
+
ft,
|
|
284
|
+
{
|
|
285
|
+
categoryGuids: C(l),
|
|
286
|
+
xData: k,
|
|
287
|
+
...t
|
|
288
|
+
}
|
|
289
|
+
) : null
|
|
290
|
+
},
|
|
291
|
+
sx: ot,
|
|
292
|
+
tooltip: {
|
|
293
|
+
trigger: E ? "item" : "none"
|
|
294
|
+
},
|
|
295
|
+
width: a,
|
|
296
|
+
xAxis: [
|
|
297
|
+
{
|
|
298
|
+
data: k,
|
|
299
|
+
scaleType: "time",
|
|
300
|
+
valueFormatter: (t) => L(t, R.MONTH_SHORT_YEAR),
|
|
301
|
+
tickNumber: $
|
|
302
|
+
// How many ticks to show on the x-axis
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
yAxis: [
|
|
306
|
+
{
|
|
307
|
+
min: q,
|
|
308
|
+
max: J || 100
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
),
|
|
313
|
+
/* @__PURE__ */ r(
|
|
314
|
+
xt,
|
|
315
|
+
{
|
|
316
|
+
categoryGuids: K,
|
|
317
|
+
hoveredLegend: g,
|
|
318
|
+
onClickLegend: U,
|
|
319
|
+
onHoverLegend: Q,
|
|
320
|
+
sx: { px: v ? 0 : 24 }
|
|
321
|
+
}
|
|
322
|
+
),
|
|
323
|
+
I && /* @__PURE__ */ r(
|
|
324
|
+
dt,
|
|
325
|
+
{
|
|
326
|
+
categoryGuids: C(l),
|
|
327
|
+
chartContainerRef: f,
|
|
328
|
+
cursorPosition: x,
|
|
329
|
+
hoveredAreaData: G.map((t) => ({
|
|
330
|
+
...t,
|
|
331
|
+
x: L(t.x, R.MONTH_SHORT_YEAR)
|
|
332
|
+
}))
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
) });
|
|
338
|
+
};
|
|
339
|
+
export {
|
|
340
|
+
ze as S
|
|
341
|
+
};
|
|
342
|
+
//# sourceMappingURL=StackedLineChart-CCqGRwvs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StackedLineChart-CCqGRwvs.mjs","sources":["../src/common/components/charts/stackedlinechart/CustomPointTooltip.tsx","../src/common/components/charts/stackedlinechart/CustomLegend.tsx","../src/common/components/charts/StackedLineChart.tsx"],"sourcesContent":["import React from 'react'\nimport { Box, Card, CardContent, useTheme } from '@mui/material'\nimport { ChartsItemContentProps } from '@mui/x-charts'\nimport { Text } from '@kyper/mui'\n\nimport { CategoryIconLabel } from './CategoryIconLabel'\nimport { CurrencyText } from '../../CurrencyText'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../constants'\n\ninterface CustomPointTooltipProps extends ChartsItemContentProps<'line'> {\n categoryGuids: { guid: string; topLevelGuid: string }\n xData: Date[]\n}\n\n// Custom tooltip for hovering on line points\nexport const CustomPointTooltip: React.FC<CustomPointTooltipProps> = ({\n categoryGuids: { guid, topLevelGuid },\n itemData: { dataIndex },\n series,\n xData,\n}) => {\n const theme = useTheme()\n const dataValue = series.data[dataIndex as number]\n const dataDate = xData[dataIndex as number]\n\n if (dataValue === undefined || !dataDate) return null\n\n return (\n <Card sx={{ pt: 4, px: 8 }}>\n <CardContent>\n <Box alignItems=\"center\" display=\"flex\" flexDirection=\"column\">\n <CategoryIconLabel categoryGuid={guid} topLevelCategoryGuid={topLevelGuid} />\n <Text color={theme.palette.text.secondary} variant=\"Small\">\n {formatDate(dataDate, DATE_FORMATS_INTL.MONTH_SHORT_YEAR)}\n </Text>\n <CurrencyText amount={String(dataValue)} bold={true} formatString=\"0,0\" variant=\"Body\" />\n </Box>\n </CardContent>\n </Card>\n )\n}\n","import React from 'react'\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { Text } from '@kyper/mui'\n\nimport { useScreenSize } from '../../../hooks'\nimport { CategoryColors } from '../../../constants'\nimport { useCategoryStore } from '../../../context'\n\ninterface CustomLegendProps {\n sx?: object\n categoryGuids: { guid: string; top_level_guid: string }[]\n hoveredLegend: string | null\n onHoverLegend: (label: string | null) => void\n onClickLegend: (label: string | null) => void\n}\n\nexport const CustomLegend: React.FC<CustomLegendProps> = ({\n sx,\n categoryGuids,\n hoveredLegend,\n onHoverLegend,\n onClickLegend,\n}) => {\n const { isMobile } = useScreenSize()\n const { getCategoryName } = useCategoryStore()\n\n return (\n <Stack direction=\"row\" flexWrap=\"wrap\" gap={isMobile ? 2 : 6} justifyContent=\"start\" sx={sx}>\n {categoryGuids.map(({ guid, top_level_guid }) => {\n const isHovered = hoveredLegend === guid\n const categoryColor = CategoryColors[guid]\n const topLevelCategoryColor = CategoryColors[top_level_guid]\n const baseBackground = categoryColor ?? topLevelCategoryColor ?? CategoryColors.default\n const transparentBackground = baseBackground + '33'\n const hoveredBackground = isHovered ? baseBackground : transparentBackground\n const backgroundColor = hoveredLegend ? hoveredBackground : baseBackground\n\n return (\n <Button\n key={guid}\n onClick={() => onClickLegend(guid)}\n onMouseEnter={() => onHoverLegend(guid)}\n onMouseLeave={() => onHoverLegend(null)}\n sx={{\n color: 'text.primary',\n fontWeight: 'normal',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n paddingX: 8,\n paddingY: 4,\n borderRadius: 1,\n opacity: isHovered ? 1 : 0.7,\n }}\n >\n <Box\n sx={{\n width: 16,\n height: 16,\n marginRight: isMobile ? 5 : 10,\n borderRadius: '2px',\n backgroundColor,\n }}\n />\n <Text variant=\"Body\">{getCategoryName(guid)}</Text>\n </Button>\n )\n })}\n </Stack>\n )\n}\n","import React from 'react'\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\nimport { LineSeriesType, LineChart, HighlightItemData } from '@mui/x-charts'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../constants'\nimport { formatCurrency } from '../../utils'\nimport { useScreenSize } from '../../hooks'\n\nimport CustomAreaTooltip from './stackedlinechart/CustomAreaTooltip'\nimport { CustomPointTooltip } from './stackedlinechart/CustomPointTooltip'\nimport { CustomLegend } from './stackedlinechart/CustomLegend'\n\ntype DataPoint = { x: Date; y: number }\ntype Dataset = DataPoint[]\n\ninterface StackedLineChartData {\n top_level_category_guid: string\n category_guid: string\n category_name: string\n category_color: string\n dataset: Dataset\n}\n\ninterface StackedLineChartProps {\n stackedDatasets: StackedLineChartData[]\n unstackedDatasets?: StackedLineChartData[]\n onHoverArea?: (category: string) => void\n onHoverPoint?: (category: string) => void\n onHoverLegend?: (category: string) => void\n onClickLegend?: (category: string) => void\n height?: number\n width?: number\n}\n\nexport const StackedLineChart: React.FC<StackedLineChartProps> = ({\n onHoverArea,\n onHoverPoint,\n onHoverLegend,\n onClickLegend,\n stackedDatasets,\n unstackedDatasets = [],\n height,\n width,\n}) => {\n const theme = useTheme()\n const { isMobile } = useScreenSize()\n const chartContainerRef = React.useRef<HTMLDivElement>(null)\n\n const [hoveredLegend, setHoveredLegend] = React.useState<string | null>(null)\n const [hoverState, setHoverState] = React.useState({\n hoveredSeriesId: null as string | null,\n hoveredAreaData: null as DataPoint[] | null,\n isAreaHovered: false,\n cursorPos: { x: 0, y: 0 },\n })\n\n const { hoveredSeriesId, hoveredAreaData, isAreaHovered, cursorPos } = hoverState\n const showAreaTooltip = isAreaHovered && hoveredSeriesId && hoveredAreaData\n const showPointTooltip = !showAreaTooltip\n\n const datasets = [...stackedDatasets, ...unstackedDatasets]\n const xTicks = datasets[0]?.dataset.length ?? 0\n const xData = datasets.flatMap((data) => data.dataset.map((d) => d.x))\n const yData = datasets.flatMap((data) => data.dataset.map((d) => d.y))\n\n // Calculate max cumulative heights for stacked datasets\n const cumulativeHeights = stackedDatasets[0]?.dataset?.map((_, i) =>\n stackedDatasets.reduce((sum, dataset) => sum + dataset.dataset[i]?.y || 0, 0),\n ) ?? [0]\n const stackedMax = Math.max(...cumulativeHeights)\n const unstackedMax = Math.max(\n ...unstackedDatasets.flatMap((data) => data.dataset.map((d) => d.y)),\n )\n\n const yMin = Math.floor(Math.min(...yData) / 100) * 100\n const yMax = Math.ceil(Math.max(stackedMax, unstackedMax) / 100) * 100\n\n const stackedSeries = stackedDatasets.map((data, index) => ({\n id: `stacked-${index}`,\n guid: data.category_guid,\n top_level_guid: data.top_level_category_guid,\n area: true,\n color: stackedDatasets[index].category_color ?? theme.palette.primary.main,\n data: data.dataset.map((d) => d.y),\n label: stackedDatasets[index].category_name,\n stack: 'total',\n type: 'line',\n highlightScope: { highlight: 'item' },\n valueFormatter: (value: number) => formatCurrency(value, '0,0'),\n }))\n\n const unstackedSeries = unstackedDatasets.map((data, index) => ({\n id: `unstacked-${index}`,\n guid: data.category_guid,\n top_level_guid: data.top_level_category_guid,\n area: false,\n color: data.category_color,\n data: data.dataset.map((d) => d.y),\n label: data.category_name,\n type: 'line',\n valueFormatter: (value: number) => formatCurrency(value, '0,0'),\n }))\n\n const series = [...stackedSeries, ...unstackedSeries]\n const guids = [\n ...stackedSeries.map(({ guid, top_level_guid }) => ({\n guid,\n top_level_guid,\n })),\n ...unstackedSeries.map(({ guid, top_level_guid }) => ({\n guid,\n top_level_guid,\n })),\n ]\n\n const getSeriesCategoryGuids = (seriesId: string) => {\n const isStacked = seriesId.startsWith('stacked-')\n const dataset = isStacked\n ? stackedDatasets[parseInt(seriesId.split('-')[1])]\n : unstackedDatasets[parseInt(seriesId.split('-')[1])]\n return {\n guid: dataset?.category_guid,\n topLevelGuid: dataset?.top_level_category_guid,\n }\n }\n\n const handleHoverLegend = (guid: string | null) => {\n setHoveredLegend(guid)\n onHoverLegend?.(guid ?? '')\n }\n\n const handleClickLegend = (guid: string | null) => {\n onClickLegend?.(guid ?? '')\n }\n\n const handleClickArea = () => {\n const clickedSeriesGuid = getSeriesCategoryGuids(String(hoveredSeriesId)).guid\n if (clickedSeriesGuid) onClickLegend?.(clickedSeriesGuid)\n }\n\n const handleHighlightChange = (highlightedItem: HighlightItemData | null) => {\n const hoveredSeriesId = String(highlightedItem?.seriesId)\n const hoveredSeriesGuid = getSeriesCategoryGuids(hoveredSeriesId).guid\n const hoveredSeries = series.find((s) => s.id === hoveredSeriesId)\n const isPointHovered = hoveredSeries && highlightedItem?.dataIndex !== undefined\n const isAreaHovered = hoveredSeries && highlightedItem?.dataIndex === undefined\n\n if (isPointHovered) {\n setHoverState({\n hoveredSeriesId: hoveredSeriesId,\n hoveredAreaData: null,\n isAreaHovered: false,\n cursorPos,\n })\n onHoverPoint?.(hoveredSeriesGuid)\n } else if (isAreaHovered) {\n const hoveredDataPoints =\n hoveredSeries?.data.map((yValue, index) => ({\n x: xData[index],\n y: yValue,\n })) ?? []\n\n setHoverState({\n hoveredSeriesId: hoveredSeriesId,\n hoveredAreaData: hoveredDataPoints,\n isAreaHovered: true,\n cursorPos,\n })\n onHoverArea?.(hoveredSeriesGuid)\n } else {\n setHoverState({\n hoveredSeriesId: null,\n hoveredAreaData: null,\n isAreaHovered: false,\n cursorPos,\n })\n }\n }\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n const rect = event.currentTarget.getBoundingClientRect()\n setHoverState((prev) => ({\n ...prev,\n cursorPos: {\n x: event.clientX - rect.left,\n y: event.clientY - rect.top,\n },\n }))\n }\n\n const customStyles = {\n p: 4,\n '& .MuiBarLabel-root': {\n fontSize: 10,\n fontWeight: 600,\n },\n '& .MuiAreaElement-root': {\n opacity: 0.4,\n transition: 'opacity 0.3s ease',\n },\n '& .MuiAreaElement-root:hover': {\n opacity: 1,\n },\n '& [class*=\"MuiLineElement-series-unstacked-\"]': {\n strokeWidth: 3,\n },\n ...(hoveredLegend &&\n stackedSeries.reduce<Record<string, any>>((acc, _, index) => {\n const selector = `.MuiAreaElement-series-stacked-${index}`\n acc[selector] = {\n opacity: stackedSeries[index].guid === hoveredLegend ? 0.9 : 0.2,\n }\n return acc\n }, {})),\n }\n\n return (\n <Box onMouseMove={handleMouseMove} ref={chartContainerRef} style={{ position: 'relative' }}>\n <Stack\n direction={{ xs: 'column', md: 'column' }}\n spacing={{ xs: 0, md: 4 }}\n sx={{ width: '100%', position: 'relative' }}\n >\n <LineChart\n height={height || 400}\n margin={{ bottom: 50 }}\n onAreaClick={handleClickArea}\n onHighlightChange={handleHighlightChange}\n series={series as LineSeriesType[]}\n skipAnimation={true}\n slotProps={{\n legend: {\n hidden: true,\n },\n }}\n slots={{\n itemContent: (props) => {\n return showPointTooltip && hoveredSeriesId ? (\n <CustomPointTooltip\n categoryGuids={getSeriesCategoryGuids(hoveredSeriesId)}\n xData={xData}\n {...props}\n />\n ) : null\n },\n }}\n sx={customStyles}\n tooltip={{\n trigger: showPointTooltip ? 'item' : 'none',\n }}\n width={width}\n xAxis={[\n {\n data: xData,\n scaleType: 'time',\n valueFormatter: (value: Date) =>\n formatDate(value, DATE_FORMATS_INTL.MONTH_SHORT_YEAR),\n tickNumber: xTicks, // How many ticks to show on the x-axis\n },\n ]}\n yAxis={[\n {\n min: yMin,\n max: yMax || 100,\n },\n ]}\n />\n <CustomLegend\n categoryGuids={guids}\n hoveredLegend={hoveredLegend}\n onClickLegend={handleClickLegend}\n onHoverLegend={handleHoverLegend}\n sx={{ px: isMobile ? 0 : 24 }}\n />\n\n {showAreaTooltip && (\n <CustomAreaTooltip\n categoryGuids={getSeriesCategoryGuids(hoveredSeriesId)}\n chartContainerRef={chartContainerRef}\n cursorPosition={cursorPos}\n hoveredAreaData={hoveredAreaData.map((point) => ({\n ...point,\n x: formatDate(point.x, DATE_FORMATS_INTL.MONTH_SHORT_YEAR),\n }))}\n />\n )}\n </Stack>\n </Box>\n )\n}\n"],"names":["CustomPointTooltip","guid","topLevelGuid","dataIndex","series","xData","theme","useTheme","dataValue","dataDate","Card","jsx","CardContent","Box","CategoryIconLabel","Text","formatDate","DATE_FORMATS_INTL","CurrencyText","CustomLegend","sx","categoryGuids","hoveredLegend","onHoverLegend","onClickLegend","isMobile","useScreenSize","getCategoryName","useCategoryStore","Stack","top_level_guid","isHovered","categoryColor","CategoryColors","topLevelCategoryColor","baseBackground","transparentBackground","jsxs","Button","StackedLineChart","onHoverArea","onHoverPoint","stackedDatasets","unstackedDatasets","height","width","chartContainerRef","React","setHoveredLegend","hoverState","setHoverState","hoveredSeriesId","hoveredAreaData","isAreaHovered","cursorPos","showAreaTooltip","showPointTooltip","datasets","xTicks","data","d","yData","cumulativeHeights","_","i","sum","dataset","stackedMax","unstackedMax","yMin","yMax","stackedSeries","index","value","formatCurrency","unstackedSeries","guids","getSeriesCategoryGuids","seriesId","handleHoverLegend","handleClickLegend","handleClickArea","clickedSeriesGuid","handleHighlightChange","highlightedItem","hoveredSeriesGuid","hoveredSeries","s","isPointHovered","hoveredDataPoints","yValue","handleMouseMove","event","rect","prev","customStyles","acc","selector","LineChart","props","CustomAreaTooltip","point"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAMA,KAAwD,CAAC;AAAA,EACpE,eAAe,EAAE,MAAAC,GAAM,cAAAC,EAAa;AAAA,EACpC,UAAU,EAAE,WAAAC,EAAU;AAAA,EACtB,QAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACJ,QAAMC,IAAQC,MACRC,IAAYJ,EAAO,KAAKD,CAAmB,GAC3CM,IAAWJ,EAAMF,CAAmB;AAE1C,SAAIK,MAAc,UAAa,CAACC,IAAiB,yBAG9CC,IAAK,EAAA,IAAI,EAAE,IAAI,GAAG,IAAI,KACrB,UAAC,gBAAAC,EAAAC,IAAA,EACC,4BAACC,IAAI,EAAA,YAAW,UAAS,SAAQ,QAAO,eAAc,UACpD,UAAA;AAAA,IAAA,gBAAAF,EAACG,IAAkB,EAAA,cAAcb,GAAM,sBAAsBC,GAAc;AAAA,IAC1E,gBAAAS,EAAAI,GAAA,EAAK,OAAOT,EAAM,QAAQ,KAAK,WAAW,SAAQ,SAChD,UAAAU,EAAWP,GAAUQ,EAAkB,gBAAgB,GAC1D;AAAA,IACA,gBAAAN,EAACO,IAAa,EAAA,QAAQ,OAAOV,CAAS,GAAG,MAAM,IAAM,cAAa,OAAM,SAAQ,OAAO,CAAA;AAAA,EAAA,GACzF,GACF,EACF,CAAA;AAEJ,GCtBaW,KAA4C,CAAC;AAAA,EACxD,IAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACE,QAAA,EAAE,UAAAC,MAAaC,KACf,EAAE,iBAAAC,MAAoBC;AAE5B,2BACGC,GAAM,EAAA,WAAU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