@mx-cartographer/experiences 7.13.4 → 7.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{LineChart-DBcA1UJI.mjs → LineChart-EAr5ox5U.mjs} +207 -204
- package/dist/accounts/index.es.js +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
- package/dist/finstrong/index.es.js +2 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
2
|
import U from "@mui/material/Box";
|
|
3
3
|
import { useTheme as N } from "@mui/material/styles";
|
|
4
|
-
import { BarPlot as
|
|
5
|
-
import { ChartContainer as
|
|
6
|
-
import { ChartsAxisHighlight as
|
|
7
|
-
import { ChartsReferenceLine as
|
|
8
|
-
import { useAxesTooltip as
|
|
9
|
-
import { ChartsXAxis as
|
|
10
|
-
import { ChartsYAxis as
|
|
11
|
-
import { AreaPlot as
|
|
12
|
-
import { f as
|
|
13
|
-
import { observer as
|
|
4
|
+
import { BarPlot as gt } from "@mui/x-charts/BarChart";
|
|
5
|
+
import { ChartContainer as pt } from "@mui/x-charts/ChartContainer";
|
|
6
|
+
import { ChartsAxisHighlight as Lt } from "@mui/x-charts/ChartsAxisHighlight";
|
|
7
|
+
import { ChartsReferenceLine as bt } from "@mui/x-charts/ChartsReferenceLine";
|
|
8
|
+
import { useAxesTooltip as kt, ChartsTooltipContainer as Mt } from "@mui/x-charts/ChartsTooltip";
|
|
9
|
+
import { ChartsXAxis as wt } from "@mui/x-charts/ChartsXAxis";
|
|
10
|
+
import { ChartsYAxis as Ct } from "@mui/x-charts/ChartsYAxis";
|
|
11
|
+
import { AreaPlot as vt, LinePlot as St, MarkPlot as At } from "@mui/x-charts/LineChart";
|
|
12
|
+
import { f as L, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
13
|
+
import { observer as Dt } from "mobx-react-lite";
|
|
14
14
|
import z from "@mui/material/Stack";
|
|
15
|
-
import { Text as
|
|
16
|
-
import { u as
|
|
17
|
-
import
|
|
18
|
-
import { Stack as
|
|
15
|
+
import { Text as d } from "@mxenabled/mxui";
|
|
16
|
+
import { u as Tt } from "./hooks-BxkfR-Ff.mjs";
|
|
17
|
+
import Rt from "@mui/material/useMediaQuery";
|
|
18
|
+
import { Stack as M, Box as $t } from "@mui/material";
|
|
19
19
|
const B = {
|
|
20
20
|
circle: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
|
|
21
21
|
square: "M-4,-4L4,-4L4,4L-4,4Z",
|
|
@@ -36,30 +36,30 @@ const B = {
|
|
|
36
36
|
function Z(t) {
|
|
37
37
|
return _[t % _.length];
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Pt = ({
|
|
40
40
|
label: t,
|
|
41
|
-
customLegendVariant:
|
|
41
|
+
customLegendVariant: a
|
|
42
42
|
}) => {
|
|
43
|
-
const l =
|
|
44
|
-
return typeof t == "string" ? /* @__PURE__ */ e(
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e(
|
|
43
|
+
const l = a || "body2";
|
|
44
|
+
return typeof t == "string" ? /* @__PURE__ */ e(d, { variant: l, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(E, { children: [
|
|
45
|
+
/* @__PURE__ */ e(d, { variant: l, children: t.label }),
|
|
46
|
+
/* @__PURE__ */ e(d, { bold: !0, sx: { marginLeft: 8 }, variant: l, children: L(t.amount, "0,0") })
|
|
47
47
|
] }) : null;
|
|
48
|
-
},
|
|
48
|
+
}, Et = ({
|
|
49
49
|
average: t,
|
|
50
|
-
customLegendVariant:
|
|
50
|
+
customLegendVariant: a,
|
|
51
51
|
customLegendBoxSx: l,
|
|
52
52
|
labels: o = [],
|
|
53
|
-
series:
|
|
54
|
-
style:
|
|
55
|
-
title:
|
|
56
|
-
valueFormatterString:
|
|
53
|
+
series: f,
|
|
54
|
+
style: y,
|
|
55
|
+
title: m,
|
|
56
|
+
valueFormatterString: u
|
|
57
57
|
}) => {
|
|
58
|
-
const { common:
|
|
59
|
-
return /* @__PURE__ */ i(z, { style: { flexDirection: "row", gap: 24, ...
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
return
|
|
58
|
+
const { common: g } = Tt(), s = a || "body2";
|
|
59
|
+
return /* @__PURE__ */ i(z, { style: { flexDirection: "row", gap: 24, ...y }, children: [
|
|
60
|
+
f.map((c, n) => {
|
|
61
|
+
const h = o[n];
|
|
62
|
+
return h ? /* @__PURE__ */ i(
|
|
63
63
|
z,
|
|
64
64
|
{
|
|
65
65
|
style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
|
|
@@ -70,7 +70,7 @@ const $t = ({
|
|
|
70
70
|
sx: {
|
|
71
71
|
width: 10,
|
|
72
72
|
height: 10,
|
|
73
|
-
backgroundColor:
|
|
73
|
+
backgroundColor: c.color,
|
|
74
74
|
marginRight: 8,
|
|
75
75
|
...l
|
|
76
76
|
}
|
|
@@ -86,30 +86,30 @@ const $t = ({
|
|
|
86
86
|
children: /* @__PURE__ */ e(
|
|
87
87
|
"path",
|
|
88
88
|
{
|
|
89
|
-
d: B[Z(
|
|
90
|
-
fill:
|
|
91
|
-
stroke:
|
|
89
|
+
d: B[Z(n)],
|
|
90
|
+
fill: c.color,
|
|
91
|
+
stroke: c.color,
|
|
92
92
|
strokeWidth: 1
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
/* @__PURE__ */ e(
|
|
97
|
+
/* @__PURE__ */ e(Pt, { customLegendVariant: a, label: h })
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
|
-
|
|
100
|
+
n
|
|
101
101
|
) : null;
|
|
102
102
|
}),
|
|
103
103
|
t !== void 0 && /* @__PURE__ */ i(z, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
-
/* @__PURE__ */ i(
|
|
106
|
-
|
|
104
|
+
/* @__PURE__ */ e(d, { bold: !0, sx: { marginRight: 8 }, variant: s, children: "– –" }),
|
|
105
|
+
/* @__PURE__ */ i(d, { variant: s, children: [
|
|
106
|
+
m || g.average,
|
|
107
107
|
" "
|
|
108
108
|
] }),
|
|
109
|
-
/* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e(d, { bold: !0, variant: s, children: u ? L(t, u) : t })
|
|
110
110
|
] })
|
|
111
111
|
] });
|
|
112
|
-
},
|
|
112
|
+
}, It = Dt(Et), Wt = (t) => /* @__PURE__ */ i(E, { children: [
|
|
113
113
|
/* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
|
|
114
114
|
/* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
|
|
115
115
|
"path",
|
|
@@ -126,8 +126,8 @@ const $t = ({
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
) })
|
|
129
|
-
] }),
|
|
130
|
-
const
|
|
129
|
+
] }), jt = (t) => {
|
|
130
|
+
const a = N(), l = t.showLabel, o = t.style, f = o?.markLabelStyles, y = Number(t.x), m = Number(t.y), u = t.handlers?.onMarkClick, g = t.handlers?.onMouseEnter, s = t.handlers?.onMouseLeave, c = Rt(a.breakpoints.up("sm")), n = t.valueFormatterString ? L(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), h = c ? a.typography.body2?.fontSize : a.typography.caption?.fontSize, b = 30, D = 24, I = y - b / 2, T = m - 30;
|
|
131
131
|
return /* @__PURE__ */ i(E, { children: [
|
|
132
132
|
l && /* @__PURE__ */ i(E, { children: [
|
|
133
133
|
t.labelBackgroundColor && /* @__PURE__ */ e(
|
|
@@ -136,9 +136,9 @@ const $t = ({
|
|
|
136
136
|
fill: t.labelBackgroundColor,
|
|
137
137
|
height: D,
|
|
138
138
|
rx: "3",
|
|
139
|
-
width:
|
|
140
|
-
x:
|
|
141
|
-
y:
|
|
139
|
+
width: b,
|
|
140
|
+
x: I,
|
|
141
|
+
y: T
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
144
|
/* @__PURE__ */ e(
|
|
@@ -146,36 +146,36 @@ const $t = ({
|
|
|
146
146
|
{
|
|
147
147
|
className: "MuiLineChart-markLabel",
|
|
148
148
|
dominantBaseline: "middle",
|
|
149
|
-
fill: t.labelFontColor ? t.labelFontColor :
|
|
149
|
+
fill: t.labelFontColor ? t.labelFontColor : a.palette.text.primary,
|
|
150
150
|
style: {
|
|
151
|
-
fontSize: t.labelFontSize ? t.labelFontSize :
|
|
152
|
-
...
|
|
151
|
+
fontSize: t.labelFontSize ? t.labelFontSize : h,
|
|
152
|
+
...f
|
|
153
153
|
},
|
|
154
154
|
textAnchor: "middle",
|
|
155
|
-
x,
|
|
156
|
-
y:
|
|
157
|
-
children:
|
|
155
|
+
x: y,
|
|
156
|
+
y: m - 28 + D / 2,
|
|
157
|
+
children: n
|
|
158
158
|
}
|
|
159
159
|
)
|
|
160
160
|
] }),
|
|
161
161
|
t.showMark && /* @__PURE__ */ e(
|
|
162
162
|
"path",
|
|
163
163
|
{
|
|
164
|
-
cursor:
|
|
164
|
+
cursor: u ? "pointer" : "unset",
|
|
165
165
|
d: B[t.shape ?? "circle"],
|
|
166
166
|
height: "20px",
|
|
167
|
-
onClick: (
|
|
168
|
-
|
|
167
|
+
onClick: (R) => {
|
|
168
|
+
u?.(R, t.dataIndex);
|
|
169
169
|
},
|
|
170
170
|
onMouseEnter: () => {
|
|
171
|
-
|
|
171
|
+
g?.(t.dataIndex);
|
|
172
172
|
},
|
|
173
173
|
onMouseLeave: () => {
|
|
174
|
-
|
|
174
|
+
s?.();
|
|
175
175
|
},
|
|
176
176
|
style: {
|
|
177
|
-
fill: o?.fill ? o.fill :
|
|
178
|
-
stroke: o?.stroke ? o.stroke :
|
|
177
|
+
fill: o?.fill ? o.fill : a.palette.background.paper,
|
|
178
|
+
stroke: o?.stroke ? o.stroke : a.palette.primary.main,
|
|
179
179
|
strokeWidth: 2,
|
|
180
180
|
transform: `translate(${t.x}px, ${t.y}px)`,
|
|
181
181
|
transformOrigin: `${t.x}px, ${t.y}px`,
|
|
@@ -186,22 +186,23 @@ const $t = ({
|
|
|
186
186
|
)
|
|
187
187
|
] });
|
|
188
188
|
};
|
|
189
|
-
function
|
|
189
|
+
function zt({
|
|
190
190
|
customLabels: t,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
isCurrency: a = !0,
|
|
192
|
+
labels: l = [],
|
|
193
|
+
series: o,
|
|
194
|
+
valueFormatterString: f = "0,0"
|
|
194
195
|
}) {
|
|
195
|
-
const
|
|
196
|
-
if (!
|
|
197
|
-
const { axisValue:
|
|
196
|
+
const y = kt(), m = N(), u = y?.[0];
|
|
197
|
+
if (!u) return null;
|
|
198
|
+
const { axisValue: g, dataIndex: s = 0 } = u;
|
|
198
199
|
if (t) {
|
|
199
|
-
const c = t[
|
|
200
|
+
const c = t[s]?.[0]?.header || String(g);
|
|
200
201
|
return /* @__PURE__ */ i(
|
|
201
|
-
|
|
202
|
+
M,
|
|
202
203
|
{
|
|
203
204
|
sx: {
|
|
204
|
-
backgroundColor:
|
|
205
|
+
backgroundColor: m.palette.background.paper,
|
|
205
206
|
boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
|
|
206
207
|
flexDirection: "column",
|
|
207
208
|
alignItems: "flex-start",
|
|
@@ -213,7 +214,7 @@ function jt({
|
|
|
213
214
|
},
|
|
214
215
|
children: [
|
|
215
216
|
/* @__PURE__ */ i(
|
|
216
|
-
|
|
217
|
+
M,
|
|
217
218
|
{
|
|
218
219
|
sx: {
|
|
219
220
|
flexDirection: "row",
|
|
@@ -224,15 +225,15 @@ function jt({
|
|
|
224
225
|
marginTop: 4
|
|
225
226
|
},
|
|
226
227
|
children: [
|
|
227
|
-
/* @__PURE__ */ e(
|
|
228
|
-
/* @__PURE__ */ e(
|
|
228
|
+
/* @__PURE__ */ e(d, { variant: "h3", children: c }),
|
|
229
|
+
/* @__PURE__ */ e(d, { bold: !0, variant: "h3", children: L(o[0]?.data[s], f) })
|
|
229
230
|
]
|
|
230
231
|
}
|
|
231
232
|
),
|
|
232
|
-
t[
|
|
233
|
-
const
|
|
234
|
-
return
|
|
235
|
-
|
|
233
|
+
t[s]?.some((n) => (typeof n == "string" ? 0 : n.amount) !== 0) ? t[s]?.map((n) => {
|
|
234
|
+
const h = typeof n == "string" ? n : n.label, b = typeof n == "string" ? 0 : n.amount;
|
|
235
|
+
return b === 0 ? null : /* @__PURE__ */ i(
|
|
236
|
+
M,
|
|
236
237
|
{
|
|
237
238
|
sx: {
|
|
238
239
|
flexDirection: "row",
|
|
@@ -244,7 +245,7 @@ function jt({
|
|
|
244
245
|
},
|
|
245
246
|
children: [
|
|
246
247
|
/* @__PURE__ */ i(
|
|
247
|
-
|
|
248
|
+
M,
|
|
248
249
|
{
|
|
249
250
|
sx: {
|
|
250
251
|
flexDirection: "row",
|
|
@@ -255,35 +256,35 @@ function jt({
|
|
|
255
256
|
},
|
|
256
257
|
children: [
|
|
257
258
|
/* @__PURE__ */ e(
|
|
258
|
-
|
|
259
|
+
$t,
|
|
259
260
|
{
|
|
260
261
|
sx: {
|
|
261
262
|
width: "12px",
|
|
262
263
|
height: "12px",
|
|
263
|
-
backgroundColor:
|
|
264
|
+
backgroundColor: o[0]?.color,
|
|
264
265
|
borderRadius: "4px"
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
268
|
),
|
|
268
|
-
/* @__PURE__ */ e(
|
|
269
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: h })
|
|
269
270
|
]
|
|
270
271
|
}
|
|
271
272
|
),
|
|
272
|
-
/* @__PURE__ */ e(
|
|
273
|
+
/* @__PURE__ */ e(d, { bold: !0, variant: "body1", children: L(Math.abs(b), f) })
|
|
273
274
|
]
|
|
274
275
|
},
|
|
275
|
-
|
|
276
|
+
h
|
|
276
277
|
);
|
|
277
|
-
}) : /* @__PURE__ */ e(
|
|
278
|
+
}) : /* @__PURE__ */ e(d, { variant: "body1", children: "No data" })
|
|
278
279
|
]
|
|
279
280
|
}
|
|
280
281
|
);
|
|
281
282
|
}
|
|
282
283
|
return /* @__PURE__ */ i(
|
|
283
|
-
|
|
284
|
+
M,
|
|
284
285
|
{
|
|
285
286
|
sx: {
|
|
286
|
-
backgroundColor:
|
|
287
|
+
backgroundColor: m.palette.background.paper,
|
|
287
288
|
boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
|
|
288
289
|
flexDirection: "column",
|
|
289
290
|
alignItems: "flex-start",
|
|
@@ -294,9 +295,9 @@ function jt({
|
|
|
294
295
|
py: 12
|
|
295
296
|
},
|
|
296
297
|
children: [
|
|
297
|
-
/* @__PURE__ */ e(
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
/* @__PURE__ */ e(d, { variant: "h3", children: String(g) }),
|
|
299
|
+
o.map((c, n) => /* @__PURE__ */ i(
|
|
300
|
+
M,
|
|
300
301
|
{
|
|
301
302
|
sx: {
|
|
302
303
|
flexDirection: "row",
|
|
@@ -307,14 +308,14 @@ function jt({
|
|
|
307
308
|
marginTop: 4
|
|
308
309
|
},
|
|
309
310
|
children: [
|
|
310
|
-
/* @__PURE__ */ i(
|
|
311
|
-
/* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: B[Z(
|
|
312
|
-
/* @__PURE__ */ e(
|
|
311
|
+
/* @__PURE__ */ i(M, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
312
|
+
/* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: B[Z(n)], fill: c.color }) }),
|
|
313
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: typeof l[n] == "string" ? l[n] : l[n]?.label })
|
|
313
314
|
] }),
|
|
314
|
-
/* @__PURE__ */ e(
|
|
315
|
+
/* @__PURE__ */ e(d, { bold: !0, variant: "body1", children: a ? L(c.data[s], f) : c.data[s] })
|
|
315
316
|
]
|
|
316
317
|
},
|
|
317
|
-
`${c.id}-${
|
|
318
|
+
`${c.id}-${n}`
|
|
318
319
|
))
|
|
319
320
|
]
|
|
320
321
|
}
|
|
@@ -322,78 +323,79 @@ function jt({
|
|
|
322
323
|
}
|
|
323
324
|
const ne = ({
|
|
324
325
|
areaColor: t,
|
|
325
|
-
axisColor:
|
|
326
|
+
axisColor: a,
|
|
326
327
|
baseline: l = "max",
|
|
327
328
|
chartFor: o,
|
|
328
|
-
chartXaxisSx:
|
|
329
|
-
chartYaxisSx:
|
|
330
|
-
colors:
|
|
331
|
-
curveType:
|
|
332
|
-
customLegendVariant:
|
|
333
|
-
customLegendSx:
|
|
334
|
-
customLegendBoxSx:
|
|
335
|
-
customTooltipLabels:
|
|
336
|
-
datasets:
|
|
337
|
-
height:
|
|
338
|
-
|
|
329
|
+
chartXaxisSx: f,
|
|
330
|
+
chartYaxisSx: y,
|
|
331
|
+
colors: m,
|
|
332
|
+
curveType: u = "linear",
|
|
333
|
+
customLegendVariant: g,
|
|
334
|
+
customLegendSx: s,
|
|
335
|
+
customLegendBoxSx: c,
|
|
336
|
+
customTooltipLabels: n,
|
|
337
|
+
datasets: h,
|
|
338
|
+
height: b,
|
|
339
|
+
isCurrency: D,
|
|
340
|
+
isGraphClippingXAxis: I = !1,
|
|
339
341
|
labels: T,
|
|
340
342
|
labelBackgroundColor: R,
|
|
341
|
-
labelFontColor:
|
|
342
|
-
labelFontSize:
|
|
343
|
-
margin:
|
|
344
|
-
markHandlers:
|
|
345
|
-
markStyles:
|
|
346
|
-
minRange:
|
|
347
|
-
maxRange:
|
|
343
|
+
labelFontColor: X,
|
|
344
|
+
labelFontSize: Y,
|
|
345
|
+
margin: K,
|
|
346
|
+
markHandlers: Q,
|
|
347
|
+
markStyles: V,
|
|
348
|
+
minRange: J,
|
|
349
|
+
maxRange: tt,
|
|
348
350
|
onItemClick: W,
|
|
349
351
|
peerAverage: H,
|
|
350
352
|
showArea: G = !1,
|
|
351
353
|
showAverage: q = !1,
|
|
352
|
-
showAxisHighlight:
|
|
354
|
+
showAxisHighlight: et = !1,
|
|
353
355
|
showBars: j = !1,
|
|
354
|
-
showLegend:
|
|
356
|
+
showLegend: rt = !1,
|
|
355
357
|
showMark: nt = !0,
|
|
356
|
-
showMarkLabel:
|
|
357
|
-
showTooltip:
|
|
358
|
-
showXAxis:
|
|
359
|
-
showXAxisTicks:
|
|
360
|
-
showYAxis:
|
|
361
|
-
showYAxisTicks:
|
|
362
|
-
title:
|
|
363
|
-
useCustomMark:
|
|
364
|
-
valueFormatterString:
|
|
365
|
-
width:
|
|
366
|
-
xAxisScaleType:
|
|
358
|
+
showMarkLabel: at = !1,
|
|
359
|
+
showTooltip: it = !1,
|
|
360
|
+
showXAxis: ot = !1,
|
|
361
|
+
showXAxisTicks: lt = !1,
|
|
362
|
+
showYAxis: st = !1,
|
|
363
|
+
showYAxisTicks: ct = !1,
|
|
364
|
+
title: dt,
|
|
365
|
+
useCustomMark: ht = !1,
|
|
366
|
+
valueFormatterString: k,
|
|
367
|
+
width: mt,
|
|
368
|
+
xAxisScaleType: ut
|
|
367
369
|
}) => {
|
|
368
|
-
const
|
|
370
|
+
const x = N(), ft = h.flat().map((r) => r.x), C = h.flat().map((r) => r.y), F = H || Math.round(C.reduce((r, w) => w + r, 0) / C.length), v = Math.floor(Math.min(...C) / 100) * 100, S = Math.ceil(Math.max(...C) / 100) * 100, $ = h.map((r, w) => ({
|
|
369
371
|
type: j ? "bar" : "line",
|
|
370
|
-
curve:
|
|
371
|
-
color: j ?
|
|
372
|
-
data:
|
|
372
|
+
curve: u,
|
|
373
|
+
color: j ? x.palette.chart?.chart6 : m[w] ?? x.palette.primary.main,
|
|
374
|
+
data: r.map((p) => p.y),
|
|
373
375
|
area: G,
|
|
374
376
|
baseline: l,
|
|
375
377
|
showMark: !0,
|
|
376
|
-
shape: Z(
|
|
377
|
-
valueFormatter: (
|
|
378
|
-
})),
|
|
378
|
+
shape: Z(w),
|
|
379
|
+
valueFormatter: (p) => k ? L(p || 0, k) : String(p)
|
|
380
|
+
})), xt = {
|
|
379
381
|
...{
|
|
380
382
|
top: 60,
|
|
381
383
|
right: 35,
|
|
382
384
|
bottom: 25,
|
|
383
385
|
left: -10
|
|
384
386
|
},
|
|
385
|
-
...
|
|
387
|
+
...K
|
|
386
388
|
};
|
|
387
|
-
let
|
|
389
|
+
let A = J ?? v, P = tt ?? S;
|
|
388
390
|
if (o === "networthChart") {
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
+
const r = S - v, w = r < S * 0.05 ? 0.25 : 0.2, p = Math.max(r * w, S * 0.015);
|
|
392
|
+
A = v - p < 0 ? v : v - p, P = S + p;
|
|
391
393
|
}
|
|
392
|
-
const
|
|
394
|
+
const yt = () => {
|
|
393
395
|
if (o === "creditOverTime")
|
|
394
|
-
return O(
|
|
396
|
+
return O(A, 850, 5);
|
|
395
397
|
if (o === "networthChart")
|
|
396
|
-
return O(
|
|
398
|
+
return O(A, P, 5);
|
|
397
399
|
};
|
|
398
400
|
return /* @__PURE__ */ i(
|
|
399
401
|
U,
|
|
@@ -415,10 +417,10 @@ const ne = ({
|
|
|
415
417
|
},
|
|
416
418
|
children: [
|
|
417
419
|
/* @__PURE__ */ i(
|
|
418
|
-
|
|
420
|
+
pt,
|
|
419
421
|
{
|
|
420
|
-
height:
|
|
421
|
-
margin:
|
|
422
|
+
height: b,
|
|
423
|
+
margin: xt,
|
|
422
424
|
series: $,
|
|
423
425
|
sx: {
|
|
424
426
|
"& .MuiBarLabel-root": {
|
|
@@ -429,38 +431,38 @@ const ne = ({
|
|
|
429
431
|
opacity: 0.15
|
|
430
432
|
},
|
|
431
433
|
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
432
|
-
fontFamily:
|
|
434
|
+
fontFamily: x.typography.body2.fontFamily
|
|
433
435
|
},
|
|
434
436
|
"& .MuiLineChart-markLabel": {
|
|
435
|
-
fontFamily:
|
|
437
|
+
fontFamily: x.typography.body2.fontFamily
|
|
436
438
|
}
|
|
437
439
|
},
|
|
438
|
-
width:
|
|
439
|
-
xAxis: [{ data:
|
|
440
|
+
width: mt,
|
|
441
|
+
xAxis: [{ data: ft, scaleType: ut || (j ? "band" : "point") }],
|
|
440
442
|
yAxis: [
|
|
441
443
|
{
|
|
442
|
-
tickInterval:
|
|
443
|
-
min:
|
|
444
|
+
tickInterval: yt(),
|
|
445
|
+
min: I ? -22 : A,
|
|
444
446
|
max: P || 100,
|
|
445
447
|
colorMap: G && $.length < 2 ? {
|
|
446
448
|
type: "continuous",
|
|
447
|
-
min:
|
|
449
|
+
min: A,
|
|
448
450
|
max: P,
|
|
449
451
|
color: [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
+
x.palette.background.paper,
|
|
453
|
+
m[0] ?? x.palette.primary.main
|
|
452
454
|
]
|
|
453
455
|
} : void 0,
|
|
454
|
-
valueFormatter: (
|
|
456
|
+
valueFormatter: (r) => k ? L(r, k) : String(r),
|
|
455
457
|
width: 62
|
|
456
458
|
}
|
|
457
459
|
],
|
|
458
460
|
children: [
|
|
459
461
|
q && /* @__PURE__ */ e(
|
|
460
|
-
|
|
462
|
+
bt,
|
|
461
463
|
{
|
|
462
464
|
lineStyle: {
|
|
463
|
-
stroke: R ?
|
|
465
|
+
stroke: R ? x.palette.neutral.main : x.palette.neutral.dark,
|
|
464
466
|
strokeDasharray: "10, 8",
|
|
465
467
|
strokeWidth: 2
|
|
466
468
|
},
|
|
@@ -468,136 +470,137 @@ const ne = ({
|
|
|
468
470
|
}
|
|
469
471
|
),
|
|
470
472
|
/* @__PURE__ */ e(
|
|
471
|
-
|
|
473
|
+
vt,
|
|
472
474
|
{
|
|
473
475
|
onItemClick: W,
|
|
474
476
|
...t && {
|
|
475
477
|
slots: {
|
|
476
|
-
area: (
|
|
478
|
+
area: (r) => /* @__PURE__ */ i("g", { children: [
|
|
477
479
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ i("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
478
480
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: t }),
|
|
479
481
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0.02 })
|
|
480
482
|
] }) }),
|
|
481
|
-
/* @__PURE__ */ e("path", { ...
|
|
483
|
+
/* @__PURE__ */ e("path", { ...r, fill: "url(#customGradient)" })
|
|
482
484
|
] })
|
|
483
485
|
}
|
|
484
486
|
}
|
|
485
487
|
}
|
|
486
488
|
),
|
|
487
489
|
/* @__PURE__ */ e(
|
|
488
|
-
|
|
490
|
+
St,
|
|
489
491
|
{
|
|
490
492
|
onItemClick: W,
|
|
491
493
|
slots: {
|
|
492
|
-
line: (
|
|
493
|
-
|
|
494
|
+
line: (r) => /* @__PURE__ */ e(
|
|
495
|
+
Wt,
|
|
494
496
|
{
|
|
495
|
-
...
|
|
496
|
-
lineColor: t ??
|
|
497
|
+
...r,
|
|
498
|
+
lineColor: t ?? r.ownerState.color ?? x.palette.primary.main
|
|
497
499
|
}
|
|
498
500
|
)
|
|
499
501
|
}
|
|
500
502
|
}
|
|
501
503
|
),
|
|
502
504
|
/* @__PURE__ */ e(
|
|
503
|
-
|
|
505
|
+
At,
|
|
504
506
|
{
|
|
505
507
|
onItemClick: W,
|
|
506
|
-
slots:
|
|
507
|
-
mark: (
|
|
508
|
-
|
|
508
|
+
slots: ht ? {
|
|
509
|
+
mark: (r) => /* @__PURE__ */ e(
|
|
510
|
+
jt,
|
|
509
511
|
{
|
|
510
|
-
handlers:
|
|
512
|
+
handlers: Q,
|
|
511
513
|
labelBackgroundColor: R,
|
|
512
|
-
labelFontColor:
|
|
513
|
-
labelFontSize:
|
|
514
|
-
showLabel:
|
|
515
|
-
showMark: nt ||
|
|
516
|
-
style:
|
|
517
|
-
valueFormatterString:
|
|
518
|
-
yData:
|
|
519
|
-
...
|
|
514
|
+
labelFontColor: X,
|
|
515
|
+
labelFontSize: Y,
|
|
516
|
+
showLabel: at,
|
|
517
|
+
showMark: nt || r.dataIndex === h[0].length - 1,
|
|
518
|
+
style: V?.(r.dataIndex) ?? {},
|
|
519
|
+
valueFormatterString: k,
|
|
520
|
+
yData: C,
|
|
521
|
+
...r
|
|
520
522
|
}
|
|
521
523
|
)
|
|
522
524
|
} : void 0
|
|
523
525
|
}
|
|
524
526
|
),
|
|
525
527
|
/* @__PURE__ */ e(
|
|
526
|
-
|
|
528
|
+
gt,
|
|
527
529
|
{
|
|
528
|
-
barLabel: (
|
|
530
|
+
barLabel: (r) => Number(r.value) > 0 ? `$${r.value}` : null,
|
|
529
531
|
borderRadius: 10
|
|
530
532
|
}
|
|
531
533
|
),
|
|
532
534
|
/* @__PURE__ */ e(
|
|
533
|
-
|
|
535
|
+
wt,
|
|
534
536
|
{
|
|
535
|
-
disableLine: !
|
|
536
|
-
disableTicks: !
|
|
537
|
-
slotProps:
|
|
537
|
+
disableLine: !ot,
|
|
538
|
+
disableTicks: !lt,
|
|
539
|
+
slotProps: a ? {
|
|
538
540
|
axisLine: {
|
|
539
541
|
style: {
|
|
540
|
-
stroke:
|
|
542
|
+
stroke: a
|
|
541
543
|
}
|
|
542
544
|
},
|
|
543
545
|
axisTick: {
|
|
544
546
|
style: {
|
|
545
|
-
stroke:
|
|
547
|
+
stroke: a
|
|
546
548
|
}
|
|
547
549
|
}
|
|
548
550
|
} : {},
|
|
549
|
-
sx: { ...
|
|
551
|
+
sx: { ...f }
|
|
550
552
|
}
|
|
551
553
|
),
|
|
552
554
|
/* @__PURE__ */ e(
|
|
553
|
-
|
|
555
|
+
Ct,
|
|
554
556
|
{
|
|
555
|
-
disableLine: !
|
|
556
|
-
disableTicks: !
|
|
557
|
-
slotProps:
|
|
557
|
+
disableLine: !st,
|
|
558
|
+
disableTicks: !ct,
|
|
559
|
+
slotProps: a ? {
|
|
558
560
|
axisLine: {
|
|
559
561
|
style: {
|
|
560
|
-
stroke:
|
|
562
|
+
stroke: a
|
|
561
563
|
}
|
|
562
564
|
},
|
|
563
565
|
axisTick: {
|
|
564
566
|
style: {
|
|
565
|
-
stroke:
|
|
567
|
+
stroke: a
|
|
566
568
|
}
|
|
567
569
|
}
|
|
568
570
|
} : {},
|
|
569
|
-
sx: { ...
|
|
571
|
+
sx: { ...y }
|
|
570
572
|
}
|
|
571
573
|
),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
574
|
+
et && /* @__PURE__ */ e(Lt, { x: "line" }),
|
|
575
|
+
it && /* @__PURE__ */ e(Mt, { trigger: "axis", children: /* @__PURE__ */ e(
|
|
576
|
+
zt,
|
|
575
577
|
{
|
|
576
|
-
customLabels:
|
|
578
|
+
customLabels: n,
|
|
579
|
+
isCurrency: D,
|
|
577
580
|
labels: T,
|
|
578
581
|
series: $,
|
|
579
|
-
valueFormatterString:
|
|
582
|
+
valueFormatterString: k
|
|
580
583
|
}
|
|
581
584
|
) })
|
|
582
585
|
]
|
|
583
586
|
}
|
|
584
587
|
),
|
|
585
|
-
|
|
586
|
-
|
|
588
|
+
rt && /* @__PURE__ */ e(
|
|
589
|
+
It,
|
|
587
590
|
{
|
|
588
591
|
average: q ? F : void 0,
|
|
589
|
-
customLegendBoxSx:
|
|
590
|
-
customLegendVariant:
|
|
592
|
+
customLegendBoxSx: c,
|
|
593
|
+
customLegendVariant: g,
|
|
591
594
|
labels: T,
|
|
592
595
|
series: $,
|
|
593
596
|
style: {
|
|
594
597
|
position: "absolute",
|
|
595
598
|
top: 16,
|
|
596
599
|
left: 16,
|
|
597
|
-
...
|
|
600
|
+
...s
|
|
598
601
|
},
|
|
599
|
-
title:
|
|
600
|
-
valueFormatterString:
|
|
602
|
+
title: dt,
|
|
603
|
+
valueFormatterString: k
|
|
601
604
|
}
|
|
602
605
|
)
|
|
603
606
|
]
|
|
@@ -11,7 +11,7 @@ import U from "@mui/material/ListSubheader";
|
|
|
11
11
|
import P from "@mui/system/Stack";
|
|
12
12
|
import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
|
|
13
13
|
import { u as S, A as x1 } from "../AccountDetailsHeader-D9gbTbUt.mjs";
|
|
14
|
-
import { L as b1 } from "../LineChart-
|
|
14
|
+
import { L as b1 } from "../LineChart-EAr5ox5U.mjs";
|
|
15
15
|
import { g as w1, a as R1, b as S1 } from "../SpendingData-Bz1bCWAs.mjs";
|
|
16
16
|
import { l as T1, u as y, d as k, g as I, h as m1, b as G, a as E1 } from "../hooks-BxkfR-Ff.mjs";
|
|
17
17
|
import { A as N, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LineChartLabel, TooltipLabel } from '../LineChart';
|
|
2
2
|
interface CustomTooltipProps {
|
|
3
3
|
customLabels?: TooltipLabel[][];
|
|
4
|
+
isCurrency?: boolean;
|
|
4
5
|
labels?: LineChartLabel[];
|
|
5
6
|
series: Array<{
|
|
6
7
|
id?: string;
|
|
@@ -9,5 +10,5 @@ interface CustomTooltipProps {
|
|
|
9
10
|
}>;
|
|
10
11
|
valueFormatterString?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function CustomTooltip({ customLabels, labels, series, valueFormatterString, }: CustomTooltipProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare function CustomTooltip({ customLabels, isCurrency, labels, series, valueFormatterString, }: CustomTooltipProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export {};
|
|
@@ -14,7 +14,7 @@ import { L as U } from "../Loader-D3rjKx72.mjs";
|
|
|
14
14
|
import h, { useState as Fn, useRef as Bn, useCallback as rt, useEffect as at } from "react";
|
|
15
15
|
import P from "@mui/material/Button";
|
|
16
16
|
import X from "@mui/material/Card";
|
|
17
|
-
import { L as Ye } from "../LineChart-
|
|
17
|
+
import { L as Ye } from "../LineChart-EAr5ox5U.mjs";
|
|
18
18
|
import { C as St } from "../ConnectionsDrawer-IA7vnv1J.mjs";
|
|
19
19
|
import { C as ae } from "../ConnectDrawer-C0wjwcJt.mjs";
|
|
20
20
|
import le from "@mui/material/Tab";
|
|
@@ -3630,6 +3630,7 @@ const zo = ({ total: t }) => {
|
|
|
3630
3630
|
customLegendVariant: "caption",
|
|
3631
3631
|
datasets: [u],
|
|
3632
3632
|
height: 300,
|
|
3633
|
+
isCurrency: !1,
|
|
3633
3634
|
isGraphClippingXAxis: !0,
|
|
3634
3635
|
labelBackgroundColor: F.palette.border.dark,
|
|
3635
3636
|
labelFontColor: F.palette.common.white,
|
|
@@ -3,7 +3,7 @@ import { fromUnixTime as re } from "date-fns/fromUnixTime";
|
|
|
3
3
|
import { observer as _ } from "mobx-react-lite";
|
|
4
4
|
import ie from "@mui/material/Stack/Stack";
|
|
5
5
|
import { useTheme as z } from "@mui/material/styles";
|
|
6
|
-
import { L as ae } from "../LineChart-
|
|
6
|
+
import { L as ae } from "../LineChart-EAr5ox5U.mjs";
|
|
7
7
|
import { p as se, q as $, u as N, g as G, d as ce, b as Y } from "../hooks-BxkfR-Ff.mjs";
|
|
8
8
|
import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
9
9
|
import { f as le, D as de } from "../DateFormats-BMpMrZpW.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { D as Pe } from "../Drawer-Bbe4AMB1.mjs";
|
|
|
41
41
|
import { u as Ie } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
42
42
|
import { L as Le } from "../Loader-D3rjKx72.mjs";
|
|
43
43
|
import { W as ut } from "../WidgetContainer-D_iaToWJ.mjs";
|
|
44
|
-
import { L as Ve } from "../LineChart-
|
|
44
|
+
import { L as Ve } from "../LineChart-EAr5ox5U.mjs";
|
|
45
45
|
import { M as Jt } from "../MiniWidgetContainer-xLWSV6Wz.mjs";
|
|
46
46
|
import { subMonths as eo } from "date-fns";
|
|
47
47
|
import { TrendingUp as to, TrendingDown as oo, MultilineChart as no, ExpandLess as so, ExpandMore as ro, ArrowBack as ao } from "@mxenabled/mx-icons";
|