@mx-cartographer/experiences 7.11.18 → 7.11.19
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-DvCvL2Ed.mjs → LineChart-DVn1AamK.mjs} +245 -216
- package/dist/accounts/index.es.js +1 -1
- package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
- package/dist/finstrong/index.es.js +1 -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,77 +1,115 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useTheme as
|
|
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 p, c as
|
|
13
|
-
import { observer as
|
|
14
|
-
import
|
|
15
|
-
import { Text as
|
|
16
|
-
import { u as
|
|
17
|
-
import
|
|
18
|
-
import { Stack as
|
|
19
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import _ from "@mui/material/Box";
|
|
3
|
+
import { useTheme as j } from "@mui/material/styles";
|
|
4
|
+
import { BarPlot as gt } from "@mui/x-charts/BarChart";
|
|
5
|
+
import { ChartContainer as yt } from "@mui/x-charts/ChartContainer";
|
|
6
|
+
import { ChartsAxisHighlight as pt } from "@mui/x-charts/ChartsAxisHighlight";
|
|
7
|
+
import { ChartsReferenceLine as Lt } from "@mui/x-charts/ChartsReferenceLine";
|
|
8
|
+
import { useAxesTooltip as kt, ChartsTooltipContainer as bt } from "@mui/x-charts/ChartsTooltip";
|
|
9
|
+
import { ChartsXAxis as Mt } from "@mui/x-charts/ChartsXAxis";
|
|
10
|
+
import { ChartsYAxis as wt } from "@mui/x-charts/ChartsYAxis";
|
|
11
|
+
import { AreaPlot as St, LinePlot as Ct, MarkPlot as vt } from "@mui/x-charts/LineChart";
|
|
12
|
+
import { f as p, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
13
|
+
import { observer as At } from "mobx-react-lite";
|
|
14
|
+
import W from "@mui/material/Stack";
|
|
15
|
+
import { Text as s } from "@mxenabled/mxui";
|
|
16
|
+
import { u as Dt } from "./hooks-zu7yblbi.mjs";
|
|
17
|
+
import Tt from "@mui/material/useMediaQuery";
|
|
18
|
+
import { Stack as b, Box as Rt } from "@mui/material";
|
|
19
|
+
const z = {
|
|
20
|
+
circle: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
|
|
21
|
+
square: "M-4,-4L4,-4L4,4L-4,4Z",
|
|
22
|
+
wye: "M0.6,0.6L0.6,4.5L-0.6,4.5L-0.6,0.6L-4,2.6L-3.4,1.5L-0.6,-0.1L-3.4,-1.5L-4,-2.6L-0.6,-0.6L-0.6,-4.5L0.6,-4.5L0.6,-0.6L4,-2.6L3.4,-1.5L0.6,-0.1L3.4,1.5L4,2.6L0.6,0.6Z",
|
|
23
|
+
star: "M0,-5L1.1,-1.5L4.8,-1.5L1.8,0.9L2.9,4.5L0,2.2L-2.9,4.5L-1.8,0.9L-4.8,-1.5L-1.1,-1.5Z",
|
|
24
|
+
cross: "M-1.5,-5L1.5,-5L1.5,-1.5L5,-1.5L5,1.5L1.5,1.5L1.5,5L-1.5,5L-1.5,1.5L-5,1.5L-5,-1.5L-1.5,-1.5Z",
|
|
25
|
+
triangle: "M0,-5L4.33,3.5L-4.33,3.5Z",
|
|
26
|
+
diamond: "M0,-5.5L3.9,0L0,5.5L-3.9,0Z"
|
|
27
|
+
}, X = [
|
|
28
|
+
"circle",
|
|
29
|
+
"square",
|
|
30
|
+
"wye",
|
|
31
|
+
"star",
|
|
32
|
+
"cross",
|
|
33
|
+
"triangle",
|
|
34
|
+
"diamond"
|
|
35
|
+
];
|
|
36
|
+
function N(t) {
|
|
37
|
+
return X[t % X.length];
|
|
38
|
+
}
|
|
39
|
+
const Bt = ({
|
|
20
40
|
label: t,
|
|
21
41
|
customLegendVariant: r
|
|
22
42
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
return typeof t == "string" ? /* @__PURE__ */ e(
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(
|
|
43
|
+
const l = r || "Small";
|
|
44
|
+
return typeof t == "string" ? /* @__PURE__ */ e(s, { variant: l, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(E, { children: [
|
|
45
|
+
/* @__PURE__ */ e(s, { variant: l, children: t.label }),
|
|
46
|
+
/* @__PURE__ */ e(s, { bold: !0, sx: { marginLeft: 8 }, variant: l, children: p(t.amount, "0,0") })
|
|
27
47
|
] }) : null;
|
|
28
|
-
},
|
|
48
|
+
}, Pt = ({
|
|
29
49
|
average: t,
|
|
30
50
|
customLegendVariant: r,
|
|
31
|
-
customLegendBoxSx:
|
|
51
|
+
customLegendBoxSx: l,
|
|
32
52
|
labels: o = [],
|
|
33
|
-
series:
|
|
53
|
+
series: L,
|
|
34
54
|
style: x,
|
|
35
55
|
title: h,
|
|
36
|
-
valueFormatterString:
|
|
56
|
+
valueFormatterString: f
|
|
37
57
|
}) => {
|
|
38
|
-
const { common: m } =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
const d = o[
|
|
42
|
-
return d ? /* @__PURE__ */
|
|
43
|
-
|
|
58
|
+
const { common: m } = Dt(), c = r || "Small";
|
|
59
|
+
return /* @__PURE__ */ i(W, { style: { flexDirection: "row", gap: 24, ...x }, children: [
|
|
60
|
+
L.map((a, u) => {
|
|
61
|
+
const d = o[u];
|
|
62
|
+
return d ? /* @__PURE__ */ i(
|
|
63
|
+
W,
|
|
44
64
|
{
|
|
45
65
|
style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
|
|
46
66
|
children: [
|
|
47
|
-
/* @__PURE__ */ e(
|
|
48
|
-
|
|
67
|
+
l !== void 0 ? /* @__PURE__ */ e(
|
|
68
|
+
_,
|
|
49
69
|
{
|
|
50
70
|
sx: {
|
|
51
71
|
width: 10,
|
|
52
72
|
height: 10,
|
|
53
|
-
backgroundColor:
|
|
73
|
+
backgroundColor: a.color,
|
|
54
74
|
marginRight: 8,
|
|
55
|
-
...
|
|
75
|
+
...l
|
|
56
76
|
}
|
|
57
77
|
}
|
|
78
|
+
) : /* @__PURE__ */ e(
|
|
79
|
+
"svg",
|
|
80
|
+
{
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
height: 14,
|
|
83
|
+
style: { marginRight: 8, flexShrink: 0 },
|
|
84
|
+
viewBox: "-6 -6 12 12",
|
|
85
|
+
width: 14,
|
|
86
|
+
children: /* @__PURE__ */ e(
|
|
87
|
+
"path",
|
|
88
|
+
{
|
|
89
|
+
d: z[N(u)],
|
|
90
|
+
fill: a.color,
|
|
91
|
+
stroke: a.color,
|
|
92
|
+
strokeWidth: 1
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
}
|
|
58
96
|
),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
97
|
+
/* @__PURE__ */ e(Bt, { customLegendVariant: r, label: d })
|
|
60
98
|
]
|
|
61
99
|
},
|
|
62
|
-
|
|
100
|
+
u
|
|
63
101
|
) : null;
|
|
64
102
|
}),
|
|
65
|
-
t !== void 0 && /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */ e(
|
|
67
|
-
/* @__PURE__ */
|
|
103
|
+
t !== void 0 && /* @__PURE__ */ i(W, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
104
|
+
/* @__PURE__ */ e(s, { bold: !0, sx: { marginRight: 8 }, variant: c, children: "– –" }),
|
|
105
|
+
/* @__PURE__ */ i(s, { variant: c, children: [
|
|
68
106
|
h || m.average,
|
|
69
107
|
" "
|
|
70
108
|
] }),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: c, children: f ? p(t, f) : t })
|
|
72
110
|
] })
|
|
73
111
|
] });
|
|
74
|
-
},
|
|
112
|
+
}, Et = At(Pt), It = (t) => /* @__PURE__ */ i(E, { children: [
|
|
75
113
|
/* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
|
|
76
114
|
/* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
|
|
77
115
|
"path",
|
|
@@ -88,19 +126,19 @@ const Tt = ({
|
|
|
88
126
|
}
|
|
89
127
|
}
|
|
90
128
|
) })
|
|
91
|
-
] }),
|
|
92
|
-
const r =
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
129
|
+
] }), $t = (t) => {
|
|
130
|
+
const r = j(), l = t.showLabel, o = t.style, L = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), f = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, a = Tt(r.breakpoints.up("sm")), u = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = a ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, A = 30, D = 24, T = x - A / 2, R = h - 30;
|
|
131
|
+
return /* @__PURE__ */ i(E, { children: [
|
|
132
|
+
l && /* @__PURE__ */ i(E, { children: [
|
|
95
133
|
t.labelBackgroundColor && /* @__PURE__ */ e(
|
|
96
134
|
"rect",
|
|
97
135
|
{
|
|
98
136
|
fill: t.labelBackgroundColor,
|
|
99
|
-
height:
|
|
137
|
+
height: D,
|
|
100
138
|
rx: "3",
|
|
101
|
-
width:
|
|
102
|
-
x:
|
|
103
|
-
y:
|
|
139
|
+
width: A,
|
|
140
|
+
x: T,
|
|
141
|
+
y: R
|
|
104
142
|
}
|
|
105
143
|
),
|
|
106
144
|
/* @__PURE__ */ e(
|
|
@@ -111,23 +149,23 @@ const Tt = ({
|
|
|
111
149
|
fill: t.labelFontColor ? t.labelFontColor : r.palette.text.primary,
|
|
112
150
|
style: {
|
|
113
151
|
fontSize: t.labelFontSize ? t.labelFontSize : d,
|
|
114
|
-
...
|
|
152
|
+
...L
|
|
115
153
|
},
|
|
116
154
|
textAnchor: "middle",
|
|
117
155
|
x,
|
|
118
|
-
y: h - 28 +
|
|
119
|
-
children:
|
|
156
|
+
y: h - 28 + D / 2,
|
|
157
|
+
children: u
|
|
120
158
|
}
|
|
121
159
|
)
|
|
122
160
|
] }),
|
|
123
161
|
t.showMark && /* @__PURE__ */ e(
|
|
124
162
|
"path",
|
|
125
163
|
{
|
|
126
|
-
cursor:
|
|
127
|
-
d:
|
|
164
|
+
cursor: f ? "pointer" : "unset",
|
|
165
|
+
d: z[t.shape ?? "circle"],
|
|
128
166
|
height: "20px",
|
|
129
|
-
onClick: (
|
|
130
|
-
|
|
167
|
+
onClick: (I) => {
|
|
168
|
+
f?.(I, t.dataIndex);
|
|
131
169
|
},
|
|
132
170
|
onMouseEnter: () => {
|
|
133
171
|
m?.(t.dataIndex);
|
|
@@ -148,19 +186,19 @@ const Tt = ({
|
|
|
148
186
|
)
|
|
149
187
|
] });
|
|
150
188
|
};
|
|
151
|
-
function
|
|
189
|
+
function Ht({
|
|
152
190
|
customLabels: t,
|
|
153
191
|
labels: r = [],
|
|
154
|
-
series:
|
|
192
|
+
series: l,
|
|
155
193
|
valueFormatterString: o = "0,0"
|
|
156
194
|
}) {
|
|
157
|
-
const
|
|
195
|
+
const L = kt(), x = j(), h = L?.[0];
|
|
158
196
|
if (!h) return null;
|
|
159
|
-
const { axisValue:
|
|
197
|
+
const { axisValue: f, dataIndex: m = 0 } = h;
|
|
160
198
|
if (t) {
|
|
161
|
-
const c = t[m]?.[0]?.header || String(
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
|
|
199
|
+
const c = t[m]?.[0]?.header || String(f);
|
|
200
|
+
return /* @__PURE__ */ i(
|
|
201
|
+
b,
|
|
164
202
|
{
|
|
165
203
|
sx: {
|
|
166
204
|
backgroundColor: x.palette.background.paper,
|
|
@@ -174,8 +212,8 @@ function $t({
|
|
|
174
212
|
py: 12
|
|
175
213
|
},
|
|
176
214
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
215
|
+
/* @__PURE__ */ i(
|
|
216
|
+
b,
|
|
179
217
|
{
|
|
180
218
|
sx: {
|
|
181
219
|
flexDirection: "row",
|
|
@@ -186,15 +224,15 @@ function $t({
|
|
|
186
224
|
marginTop: 4
|
|
187
225
|
},
|
|
188
226
|
children: [
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
-
/* @__PURE__ */ e(
|
|
227
|
+
/* @__PURE__ */ e(s, { variant: "H3", children: c }),
|
|
228
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "H3", children: p(l[0]?.data[m], o) })
|
|
191
229
|
]
|
|
192
230
|
}
|
|
193
231
|
),
|
|
194
|
-
t[m]?.some((
|
|
195
|
-
const
|
|
196
|
-
return d === 0 ? null : /* @__PURE__ */
|
|
197
|
-
|
|
232
|
+
t[m]?.some((a) => (typeof a == "string" ? 0 : a.amount) !== 0) ? t[m]?.map((a) => {
|
|
233
|
+
const u = typeof a == "string" ? a : a.label, d = typeof a == "string" ? 0 : a.amount;
|
|
234
|
+
return d === 0 ? null : /* @__PURE__ */ i(
|
|
235
|
+
b,
|
|
198
236
|
{
|
|
199
237
|
sx: {
|
|
200
238
|
flexDirection: "row",
|
|
@@ -205,8 +243,8 @@ function $t({
|
|
|
205
243
|
marginTop: 4
|
|
206
244
|
},
|
|
207
245
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
246
|
+
/* @__PURE__ */ i(
|
|
247
|
+
b,
|
|
210
248
|
{
|
|
211
249
|
sx: {
|
|
212
250
|
flexDirection: "row",
|
|
@@ -217,32 +255,32 @@ function $t({
|
|
|
217
255
|
},
|
|
218
256
|
children: [
|
|
219
257
|
/* @__PURE__ */ e(
|
|
220
|
-
|
|
258
|
+
Rt,
|
|
221
259
|
{
|
|
222
260
|
sx: {
|
|
223
261
|
width: "12px",
|
|
224
262
|
height: "12px",
|
|
225
|
-
backgroundColor:
|
|
263
|
+
backgroundColor: l[0]?.color,
|
|
226
264
|
borderRadius: "4px"
|
|
227
265
|
}
|
|
228
266
|
}
|
|
229
267
|
),
|
|
230
|
-
/* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ e(s, { variant: "Body", children: u })
|
|
231
269
|
]
|
|
232
270
|
}
|
|
233
271
|
),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
272
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(Math.abs(d), o) })
|
|
235
273
|
]
|
|
236
274
|
},
|
|
237
|
-
|
|
275
|
+
u
|
|
238
276
|
);
|
|
239
|
-
}) : /* @__PURE__ */ e(
|
|
277
|
+
}) : /* @__PURE__ */ e(s, { variant: "Body", children: "No data" })
|
|
240
278
|
]
|
|
241
279
|
}
|
|
242
280
|
);
|
|
243
281
|
}
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
|
|
282
|
+
return /* @__PURE__ */ i(
|
|
283
|
+
b,
|
|
246
284
|
{
|
|
247
285
|
sx: {
|
|
248
286
|
backgroundColor: x.palette.background.paper,
|
|
@@ -256,9 +294,9 @@ function $t({
|
|
|
256
294
|
py: 12
|
|
257
295
|
},
|
|
258
296
|
children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
260
|
-
|
|
261
|
-
|
|
297
|
+
/* @__PURE__ */ e(s, { variant: "H3", children: String(f) }),
|
|
298
|
+
l.map((c, a) => /* @__PURE__ */ i(
|
|
299
|
+
b,
|
|
262
300
|
{
|
|
263
301
|
sx: {
|
|
264
302
|
flexDirection: "row",
|
|
@@ -269,21 +307,11 @@ function $t({
|
|
|
269
307
|
marginTop: 4
|
|
270
308
|
},
|
|
271
309
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */ e(
|
|
274
|
-
|
|
275
|
-
{
|
|
276
|
-
sx: {
|
|
277
|
-
width: "12px",
|
|
278
|
-
height: "12px",
|
|
279
|
-
backgroundColor: c.color,
|
|
280
|
-
borderRadius: "4px"
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ e(l, { variant: "Body", children: typeof r[i] == "string" ? r[i] : r[i]?.label })
|
|
310
|
+
/* @__PURE__ */ i(b, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
311
|
+
/* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: z[N(a)], fill: c.color }) }),
|
|
312
|
+
/* @__PURE__ */ e(s, { variant: "Body", children: typeof r[a] == "string" ? r[a] : r[a]?.label })
|
|
285
313
|
] }),
|
|
286
|
-
/* @__PURE__ */ e(
|
|
314
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(c.data[m], o) })
|
|
287
315
|
]
|
|
288
316
|
},
|
|
289
317
|
c.id
|
|
@@ -292,82 +320,83 @@ function $t({
|
|
|
292
320
|
}
|
|
293
321
|
);
|
|
294
322
|
}
|
|
295
|
-
const
|
|
323
|
+
const ne = ({
|
|
296
324
|
areaColor: t,
|
|
297
325
|
axisColor: r,
|
|
298
|
-
baseline:
|
|
326
|
+
baseline: l = "max",
|
|
299
327
|
chartFor: o,
|
|
300
|
-
chartXaxisSx:
|
|
328
|
+
chartXaxisSx: L,
|
|
301
329
|
chartYaxisSx: x,
|
|
302
330
|
colors: h,
|
|
303
|
-
curveType:
|
|
331
|
+
curveType: f = "linear",
|
|
304
332
|
customLegendVariant: m,
|
|
305
333
|
customLegendSx: c,
|
|
306
|
-
customLegendBoxSx:
|
|
307
|
-
customTooltipLabels:
|
|
334
|
+
customLegendBoxSx: a,
|
|
335
|
+
customTooltipLabels: u,
|
|
308
336
|
datasets: d,
|
|
309
|
-
height:
|
|
310
|
-
isGraphClippingXAxis:
|
|
311
|
-
labels:
|
|
312
|
-
labelBackgroundColor:
|
|
313
|
-
labelFontColor:
|
|
314
|
-
labelFontSize:
|
|
315
|
-
margin:
|
|
316
|
-
markHandlers:
|
|
317
|
-
markStyles:
|
|
318
|
-
minRange:
|
|
319
|
-
maxRange:
|
|
320
|
-
onItemClick:
|
|
321
|
-
peerAverage:
|
|
322
|
-
showArea:
|
|
323
|
-
showAverage:
|
|
324
|
-
showAxisHighlight:
|
|
325
|
-
showBars:
|
|
326
|
-
showLegend:
|
|
327
|
-
showMark:
|
|
328
|
-
showMarkLabel:
|
|
329
|
-
showTooltip:
|
|
330
|
-
showXAxis:
|
|
331
|
-
showXAxisTicks:
|
|
332
|
-
showYAxis:
|
|
333
|
-
showYAxisTicks:
|
|
334
|
-
title:
|
|
335
|
-
useCustomMark:
|
|
337
|
+
height: A,
|
|
338
|
+
isGraphClippingXAxis: D = !1,
|
|
339
|
+
labels: T,
|
|
340
|
+
labelBackgroundColor: R,
|
|
341
|
+
labelFontColor: I,
|
|
342
|
+
labelFontSize: U,
|
|
343
|
+
margin: Y,
|
|
344
|
+
markHandlers: K,
|
|
345
|
+
markStyles: Q,
|
|
346
|
+
minRange: V,
|
|
347
|
+
maxRange: J,
|
|
348
|
+
onItemClick: $,
|
|
349
|
+
peerAverage: Z,
|
|
350
|
+
showArea: G = !1,
|
|
351
|
+
showAverage: q = !1,
|
|
352
|
+
showAxisHighlight: tt = !1,
|
|
353
|
+
showBars: H = !1,
|
|
354
|
+
showLegend: et = !1,
|
|
355
|
+
showMark: nt = !0,
|
|
356
|
+
showMarkLabel: rt = !1,
|
|
357
|
+
showTooltip: at = !1,
|
|
358
|
+
showXAxis: it = !1,
|
|
359
|
+
showXAxisTicks: ot = !1,
|
|
360
|
+
showYAxis: lt = !1,
|
|
361
|
+
showYAxisTicks: st = !1,
|
|
362
|
+
title: ct,
|
|
363
|
+
useCustomMark: dt = !1,
|
|
336
364
|
valueFormatterString: k,
|
|
337
|
-
width:
|
|
338
|
-
xAxisScaleType:
|
|
365
|
+
width: ht,
|
|
366
|
+
xAxisScaleType: mt
|
|
339
367
|
}) => {
|
|
340
|
-
const
|
|
341
|
-
type:
|
|
342
|
-
curve:
|
|
343
|
-
color:
|
|
344
|
-
data: n.map((
|
|
345
|
-
area:
|
|
346
|
-
baseline:
|
|
368
|
+
const g = j(), ut = d.flat().map((n) => n.x), w = d.flat().map((n) => n.y), F = Z || Math.round(w.reduce((n, M) => M + n, 0) / w.length), S = Math.floor(Math.min(...w) / 100) * 100, C = Math.ceil(Math.max(...w) / 100) * 100, B = d.map((n, M) => ({
|
|
369
|
+
type: H ? "bar" : "line",
|
|
370
|
+
curve: f,
|
|
371
|
+
color: H ? g.palette.chart?.chart6 : h[M] ?? g.palette.primary.main,
|
|
372
|
+
data: n.map((y) => y.y),
|
|
373
|
+
area: G,
|
|
374
|
+
baseline: l,
|
|
347
375
|
showMark: !0,
|
|
348
|
-
|
|
349
|
-
|
|
376
|
+
shape: N(M),
|
|
377
|
+
valueFormatter: (y) => k ? p(y || 0, k) : String(y)
|
|
378
|
+
})), ft = {
|
|
350
379
|
...{
|
|
351
380
|
top: 60,
|
|
352
381
|
right: 35,
|
|
353
382
|
bottom: 25,
|
|
354
383
|
left: -10
|
|
355
384
|
},
|
|
356
|
-
...
|
|
385
|
+
...Y
|
|
357
386
|
};
|
|
358
|
-
let
|
|
387
|
+
let v = V ?? S, P = J ?? C;
|
|
359
388
|
if (o === "networthChart") {
|
|
360
|
-
const n =
|
|
361
|
-
|
|
389
|
+
const n = C - S, M = n < C * 0.05 ? 0.25 : 0.2, y = Math.max(n * M, C * 0.015);
|
|
390
|
+
v = S - y < 0 ? S : S - y, P = C + y;
|
|
362
391
|
}
|
|
363
|
-
const
|
|
392
|
+
const xt = () => {
|
|
364
393
|
if (o === "creditOverTime")
|
|
365
|
-
return
|
|
394
|
+
return O(v, 850, 5);
|
|
366
395
|
if (o === "networthChart")
|
|
367
|
-
return
|
|
396
|
+
return O(v, P, 5);
|
|
368
397
|
};
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
|
|
398
|
+
return /* @__PURE__ */ i(
|
|
399
|
+
_,
|
|
371
400
|
{
|
|
372
401
|
sx: {
|
|
373
402
|
position: "relative",
|
|
@@ -385,12 +414,12 @@ const _t = ({
|
|
|
385
414
|
}
|
|
386
415
|
},
|
|
387
416
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
417
|
+
/* @__PURE__ */ i(
|
|
418
|
+
yt,
|
|
390
419
|
{
|
|
391
|
-
height:
|
|
392
|
-
margin:
|
|
393
|
-
series:
|
|
420
|
+
height: A,
|
|
421
|
+
margin: ft,
|
|
422
|
+
series: B,
|
|
394
423
|
sx: {
|
|
395
424
|
"& .MuiBarLabel-root": {
|
|
396
425
|
fontSize: 10,
|
|
@@ -400,26 +429,26 @@ const _t = ({
|
|
|
400
429
|
opacity: 0.15
|
|
401
430
|
},
|
|
402
431
|
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
403
|
-
fontFamily:
|
|
432
|
+
fontFamily: g.typography.Small.fontFamily
|
|
404
433
|
},
|
|
405
434
|
"& .MuiLineChart-markLabel": {
|
|
406
|
-
fontFamily:
|
|
435
|
+
fontFamily: g.typography.Small.fontFamily
|
|
407
436
|
}
|
|
408
437
|
},
|
|
409
|
-
width:
|
|
410
|
-
xAxis: [{ data:
|
|
438
|
+
width: ht,
|
|
439
|
+
xAxis: [{ data: ut, scaleType: mt || (H ? "band" : "point") }],
|
|
411
440
|
yAxis: [
|
|
412
441
|
{
|
|
413
|
-
tickInterval:
|
|
414
|
-
min:
|
|
415
|
-
max:
|
|
416
|
-
colorMap:
|
|
442
|
+
tickInterval: xt(),
|
|
443
|
+
min: D ? -22 : v,
|
|
444
|
+
max: P || 100,
|
|
445
|
+
colorMap: G && B.length < 2 ? {
|
|
417
446
|
type: "continuous",
|
|
418
|
-
min:
|
|
419
|
-
max:
|
|
447
|
+
min: v,
|
|
448
|
+
max: P,
|
|
420
449
|
color: [
|
|
421
|
-
|
|
422
|
-
h[0] ??
|
|
450
|
+
g.palette.background.paper,
|
|
451
|
+
h[0] ?? g.palette.primary.main
|
|
423
452
|
]
|
|
424
453
|
} : void 0,
|
|
425
454
|
valueFormatter: (n) => k ? p(n, k) : String(n),
|
|
@@ -427,25 +456,25 @@ const _t = ({
|
|
|
427
456
|
}
|
|
428
457
|
],
|
|
429
458
|
children: [
|
|
430
|
-
|
|
431
|
-
|
|
459
|
+
q && /* @__PURE__ */ e(
|
|
460
|
+
Lt,
|
|
432
461
|
{
|
|
433
462
|
lineStyle: {
|
|
434
|
-
stroke:
|
|
463
|
+
stroke: R ? g.palette.neutral.main : g.palette.neutral.dark,
|
|
435
464
|
strokeDasharray: "10, 8",
|
|
436
465
|
strokeWidth: 2
|
|
437
466
|
},
|
|
438
|
-
y:
|
|
467
|
+
y: F
|
|
439
468
|
}
|
|
440
469
|
),
|
|
441
470
|
/* @__PURE__ */ e(
|
|
442
|
-
|
|
471
|
+
St,
|
|
443
472
|
{
|
|
444
|
-
onItemClick:
|
|
473
|
+
onItemClick: $,
|
|
445
474
|
...t && {
|
|
446
475
|
slots: {
|
|
447
|
-
area: (n) => /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
476
|
+
area: (n) => /* @__PURE__ */ i("g", { children: [
|
|
477
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ i("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
449
478
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: t }),
|
|
450
479
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0.02 })
|
|
451
480
|
] }) }),
|
|
@@ -456,37 +485,37 @@ const _t = ({
|
|
|
456
485
|
}
|
|
457
486
|
),
|
|
458
487
|
/* @__PURE__ */ e(
|
|
459
|
-
|
|
488
|
+
Ct,
|
|
460
489
|
{
|
|
461
|
-
onItemClick:
|
|
490
|
+
onItemClick: $,
|
|
462
491
|
slots: {
|
|
463
492
|
line: (n) => /* @__PURE__ */ e(
|
|
464
493
|
It,
|
|
465
494
|
{
|
|
466
495
|
...n,
|
|
467
|
-
lineColor: t ?? n.ownerState.color ??
|
|
496
|
+
lineColor: t ?? n.ownerState.color ?? g.palette.primary.main
|
|
468
497
|
}
|
|
469
498
|
)
|
|
470
499
|
}
|
|
471
500
|
}
|
|
472
501
|
),
|
|
473
502
|
/* @__PURE__ */ e(
|
|
474
|
-
|
|
503
|
+
vt,
|
|
475
504
|
{
|
|
476
|
-
onItemClick:
|
|
477
|
-
slots:
|
|
505
|
+
onItemClick: $,
|
|
506
|
+
slots: dt ? {
|
|
478
507
|
mark: (n) => /* @__PURE__ */ e(
|
|
479
|
-
|
|
508
|
+
$t,
|
|
480
509
|
{
|
|
481
|
-
handlers:
|
|
482
|
-
labelBackgroundColor:
|
|
483
|
-
labelFontColor:
|
|
484
|
-
labelFontSize:
|
|
485
|
-
showLabel:
|
|
486
|
-
showMark:
|
|
487
|
-
style:
|
|
510
|
+
handlers: K,
|
|
511
|
+
labelBackgroundColor: R,
|
|
512
|
+
labelFontColor: I,
|
|
513
|
+
labelFontSize: U,
|
|
514
|
+
showLabel: rt,
|
|
515
|
+
showMark: nt || n.dataIndex === d[0].length - 1,
|
|
516
|
+
style: Q?.(n.dataIndex) ?? {},
|
|
488
517
|
valueFormatterString: k,
|
|
489
|
-
yData:
|
|
518
|
+
yData: w,
|
|
490
519
|
...n
|
|
491
520
|
}
|
|
492
521
|
)
|
|
@@ -494,17 +523,17 @@ const _t = ({
|
|
|
494
523
|
}
|
|
495
524
|
),
|
|
496
525
|
/* @__PURE__ */ e(
|
|
497
|
-
|
|
526
|
+
gt,
|
|
498
527
|
{
|
|
499
528
|
barLabel: (n) => Number(n.value) > 0 ? `$${n.value}` : null,
|
|
500
529
|
borderRadius: 10
|
|
501
530
|
}
|
|
502
531
|
),
|
|
503
532
|
/* @__PURE__ */ e(
|
|
504
|
-
|
|
533
|
+
Mt,
|
|
505
534
|
{
|
|
506
|
-
disableLine: !
|
|
507
|
-
disableTicks: !
|
|
535
|
+
disableLine: !it,
|
|
536
|
+
disableTicks: !ot,
|
|
508
537
|
slotProps: r ? {
|
|
509
538
|
axisLine: {
|
|
510
539
|
style: {
|
|
@@ -517,14 +546,14 @@ const _t = ({
|
|
|
517
546
|
}
|
|
518
547
|
}
|
|
519
548
|
} : {},
|
|
520
|
-
sx: { ...
|
|
549
|
+
sx: { ...L }
|
|
521
550
|
}
|
|
522
551
|
),
|
|
523
552
|
/* @__PURE__ */ e(
|
|
524
|
-
|
|
553
|
+
wt,
|
|
525
554
|
{
|
|
526
|
-
disableLine: !
|
|
527
|
-
disableTicks: !
|
|
555
|
+
disableLine: !lt,
|
|
556
|
+
disableTicks: !st,
|
|
528
557
|
slotProps: r ? {
|
|
529
558
|
axisLine: {
|
|
530
559
|
style: {
|
|
@@ -540,34 +569,34 @@ const _t = ({
|
|
|
540
569
|
sx: { ...x }
|
|
541
570
|
}
|
|
542
571
|
),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
572
|
+
tt && /* @__PURE__ */ e(pt, { x: "line" }),
|
|
573
|
+
at && /* @__PURE__ */ e(bt, { trigger: "axis", children: /* @__PURE__ */ e(
|
|
574
|
+
Ht,
|
|
546
575
|
{
|
|
547
|
-
customLabels:
|
|
548
|
-
labels:
|
|
549
|
-
series:
|
|
576
|
+
customLabels: u,
|
|
577
|
+
labels: T,
|
|
578
|
+
series: B,
|
|
550
579
|
valueFormatterString: k
|
|
551
580
|
}
|
|
552
581
|
) })
|
|
553
582
|
]
|
|
554
583
|
}
|
|
555
584
|
),
|
|
556
|
-
|
|
557
|
-
|
|
585
|
+
et && /* @__PURE__ */ e(
|
|
586
|
+
Et,
|
|
558
587
|
{
|
|
559
|
-
average:
|
|
560
|
-
customLegendBoxSx:
|
|
588
|
+
average: q ? F : void 0,
|
|
589
|
+
customLegendBoxSx: a,
|
|
561
590
|
customLegendVariant: m,
|
|
562
|
-
labels:
|
|
563
|
-
series:
|
|
591
|
+
labels: T,
|
|
592
|
+
series: B,
|
|
564
593
|
style: {
|
|
565
594
|
position: "absolute",
|
|
566
595
|
top: 16,
|
|
567
596
|
left: 16,
|
|
568
597
|
...c
|
|
569
598
|
},
|
|
570
|
-
title:
|
|
599
|
+
title: ct,
|
|
571
600
|
valueFormatterString: k
|
|
572
601
|
}
|
|
573
602
|
)
|
|
@@ -576,5 +605,5 @@ const _t = ({
|
|
|
576
605
|
);
|
|
577
606
|
};
|
|
578
607
|
export {
|
|
579
|
-
|
|
608
|
+
ne as L
|
|
580
609
|
};
|
|
@@ -11,7 +11,7 @@ import B from "@mui/material/ListSubheader";
|
|
|
11
11
|
import W from "@mui/system/Stack";
|
|
12
12
|
import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
|
|
13
13
|
import { u as R, A as x1 } from "../AccountDetailsHeader-DCTCLB3K.mjs";
|
|
14
|
-
import { L as w1 } from "../LineChart-
|
|
14
|
+
import { L as w1 } from "../LineChart-DVn1AamK.mjs";
|
|
15
15
|
import { g as b1, a as S1, b as R1 } from "../SpendingData-Bz1bCWAs.mjs";
|
|
16
16
|
import { m as T1, u as y, d as k, g as I, h as m1, b as G, a as E1 } from "../hooks-zu7yblbi.mjs";
|
|
17
17
|
import { A as N, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
|
|
@@ -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 Y from "@mui/material/Card";
|
|
17
|
-
import { L as Xe } from "../LineChart-
|
|
17
|
+
import { L as Xe } from "../LineChart-DVn1AamK.mjs";
|
|
18
18
|
import { C as St } from "../ConnectionsDrawer-c7HaKeRj.mjs";
|
|
19
19
|
import { C as ae } from "../ConnectDrawer-CVt-8rPJ.mjs";
|
|
20
20
|
import le from "@mui/material/Tab";
|
|
@@ -3,7 +3,7 @@ import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
|
3
3
|
import { observer as S } from "mobx-react-lite";
|
|
4
4
|
import ie from "@mui/material/Stack/Stack";
|
|
5
5
|
import { useTheme as j } from "@mui/material/styles";
|
|
6
|
-
import { L as ae } from "../LineChart-
|
|
6
|
+
import { L as ae } from "../LineChart-DVn1AamK.mjs";
|
|
7
7
|
import { p as se, q as R, u as N, g as z, d as ce, b as Y } from "../hooks-zu7yblbi.mjs";
|
|
8
8
|
import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
9
9
|
import { f as le, D as me } from "../DateFormats-BMpMrZpW.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { D as We } from "../Drawer-DV4NTsFg.mjs";
|
|
|
41
41
|
import { u as Ie } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
42
42
|
import { L as Le } from "../Loader-D3rjKx72.mjs";
|
|
43
43
|
import { W as dt } from "../WidgetContainer-DSs6lJbr.mjs";
|
|
44
|
-
import { L as Be } from "../LineChart-
|
|
44
|
+
import { L as Be } from "../LineChart-DVn1AamK.mjs";
|
|
45
45
|
import { M as Xt } from "../MiniWidgetContainer-DhEx4qKi.mjs";
|
|
46
46
|
import { subMonths as Zt } from "date-fns";
|
|
47
47
|
import { TrendingUp as Qt, TrendingDown as qt, MultilineChart as Jt, ExpandLess as eo, ExpandMore as to, ArrowBack as oo } from "@mxenabled/mx-icons";
|