@hybridcore/ui 1.6.3 → 1.6.4
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/LinearGradient-DiRq5YcI.js +93 -0
- package/dist/components/charts/chart-wrapper/index.js +41 -40
- package/dist/components/charts/chart-wrapper/logic.js +14 -12
- package/dist/components/charts/heatmap/logic.js +155 -242
- package/dist/components/metric-card/MetricChart.js +65 -50
- package/dist/components/metric-card/helpers.js +18 -0
- package/dist/components/metric-card/index.js +83 -73
- package/dist/components/metric-card/logic.js +64 -76
- package/dist/components/metric-card/styled.js +125 -137
- package/dist/components/sortable-list/index.js +1992 -346
- package/dist/main.d.ts +23 -5
- package/package.json +5 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { E as M, e as v, f as w, u as G } from "./ColorSet-C7vpNXhM.js";
|
|
2
|
+
import { m as B, s as O } from "./AnimatedTheme-jnasw6rT.js";
|
|
3
|
+
class c extends M {
|
|
4
|
+
_afterNew() {
|
|
5
|
+
super._afterNewApplyThemes();
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
getFill(t) {
|
|
11
|
+
return {
|
|
12
|
+
addColorStop: (l, e) => {
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
_changed() {
|
|
17
|
+
super._changed();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
getBounds(t) {
|
|
23
|
+
const l = this.get("target");
|
|
24
|
+
if (l) {
|
|
25
|
+
let e = l.globalBounds();
|
|
26
|
+
const r = t.toLocal({ x: e.left, y: e.top }), s = t.toLocal({ x: e.right, y: e.top }), a = t.toLocal({ x: e.right, y: e.bottom }), n = t.toLocal({ x: e.left, y: e.bottom });
|
|
27
|
+
return {
|
|
28
|
+
left: Math.min(r.x, s.x, a.x, n.x),
|
|
29
|
+
top: Math.min(r.y, s.y, a.y, n.y),
|
|
30
|
+
right: Math.max(r.x, s.x, a.x, n.x),
|
|
31
|
+
bottom: Math.max(r.y, s.y, a.y, n.y)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return t._display.getLocalBounds();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(c, "className", {
|
|
38
|
+
enumerable: !0,
|
|
39
|
+
configurable: !0,
|
|
40
|
+
writable: !0,
|
|
41
|
+
value: "Gradient"
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(c, "classNames", {
|
|
44
|
+
enumerable: !0,
|
|
45
|
+
configurable: !0,
|
|
46
|
+
writable: !0,
|
|
47
|
+
value: M.classNames.concat([c.className])
|
|
48
|
+
});
|
|
49
|
+
class d extends c {
|
|
50
|
+
/**
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
getFill(t) {
|
|
54
|
+
const l = this.get("rotation", 0);
|
|
55
|
+
let e = this.getBounds(t), r = e.left || 0, s = e.right || 0, a = e.top || 0, n = e.bottom || 0, h = B(l), p = O(l), u = h * (s - r), f = p * (n - a);
|
|
56
|
+
u == 0 && (u = 1), f == 0 && (f = 1);
|
|
57
|
+
let y = Math.max(u, f);
|
|
58
|
+
const x = this._root._renderer.createLinearGradient(r, a, r + y * h, a + y * p), b = this.get("stops");
|
|
59
|
+
if (b) {
|
|
60
|
+
let N = 0;
|
|
61
|
+
v(b, (i) => {
|
|
62
|
+
let g = i.offset;
|
|
63
|
+
w(g) || (g = N / (b.length - 1));
|
|
64
|
+
let m = i.opacity;
|
|
65
|
+
w(m) || (m = 1);
|
|
66
|
+
let o = i.color;
|
|
67
|
+
if (o) {
|
|
68
|
+
const _ = i.lighten;
|
|
69
|
+
_ && (o = G.lighten(o, _));
|
|
70
|
+
const L = i.brighten;
|
|
71
|
+
L && (o = G.brighten(o, L)), x.addColorStop(g, "rgba(" + o.r + "," + o.g + "," + o.b + "," + m + ")");
|
|
72
|
+
}
|
|
73
|
+
N++;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return x;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
Object.defineProperty(d, "className", {
|
|
80
|
+
enumerable: !0,
|
|
81
|
+
configurable: !0,
|
|
82
|
+
writable: !0,
|
|
83
|
+
value: "LinearGradient"
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(d, "classNames", {
|
|
86
|
+
enumerable: !0,
|
|
87
|
+
configurable: !0,
|
|
88
|
+
writable: !0,
|
|
89
|
+
value: c.classNames.concat([d.className])
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
d as L
|
|
93
|
+
};
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ r(
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
e === "
|
|
27
|
-
e === "
|
|
28
|
-
e === "
|
|
29
|
-
e === "
|
|
30
|
-
e === "
|
|
31
|
-
e === "
|
|
32
|
-
e === "
|
|
33
|
-
e === "
|
|
34
|
-
e === "
|
|
35
|
-
e === "
|
|
36
|
-
e === "
|
|
37
|
-
e === "
|
|
38
|
-
e === "
|
|
39
|
-
|
|
1
|
+
import { jsxs as i, jsx as r, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as d, Divider as h } from "@mui/material";
|
|
3
|
+
import { Loading as C } from "../../loading/index.js";
|
|
4
|
+
import { CandlestickChart as c } from "../candlestick/index.js";
|
|
5
|
+
import { ColumnLineMix as f } from "../column-line-mix/index.js";
|
|
6
|
+
import { DrillDownTreemap as s } from "../drill-down-treemap/index.js";
|
|
7
|
+
import { DrillDownVoronoiTreemap as u } from "../drill-down-voronoi-treemap/index.js";
|
|
8
|
+
import { Heatmap as L } from "../heatmap/index.js";
|
|
9
|
+
import { LineChart as g } from "../line/index.js";
|
|
10
|
+
import { LogaritmicScale as x } from "../logaritmic-scale/index.js";
|
|
11
|
+
import { MultipleValueAxes as D } from "../multiple-value-axes/index.js";
|
|
12
|
+
import { NestedPie as k } from "../nested-pie/index.js";
|
|
13
|
+
import { PackedCircles as S } from "../packed-circles/index.js";
|
|
14
|
+
import { PieChart as P } from "../pie-chart/index.js";
|
|
15
|
+
import { StackedAreaRadar as w } from "../stacked-area-radar/index.js";
|
|
16
|
+
import { StackedColumnChart as A } from "../stacked-column-chart/index.js";
|
|
17
|
+
import { XYChart as T } from "../xy-chart/index.js";
|
|
18
|
+
import { useChartWrapperLogic as W } from "./logic.js";
|
|
19
|
+
import { ChartWrapperRoot as M, ChartWrapperHeader as V, ChartWrapperContent as v } from "./styled.js";
|
|
20
|
+
const U = (a) => {
|
|
21
|
+
const { title: m, type: e, chartProps: o, loading: p, ownerState: t, sx: n } = W(a);
|
|
22
|
+
return /* @__PURE__ */ i(M, { ownerState: t, sx: n, children: [
|
|
23
|
+
/* @__PURE__ */ r(V, { ownerState: t, children: /* @__PURE__ */ r(d, { sx: { paddingLeft: "0.5rem" }, variant: "h3", children: m }) }),
|
|
24
|
+
/* @__PURE__ */ r(h, {}),
|
|
25
|
+
/* @__PURE__ */ r(v, { ownerState: t, children: p ? /* @__PURE__ */ r(C, { show: !0, position: "absolute" }) : /* @__PURE__ */ i(l, { children: [
|
|
26
|
+
e === "MultipleValueAxes" && /* @__PURE__ */ r(D, { ...o }),
|
|
27
|
+
e === "XYChart" && /* @__PURE__ */ r(T, { ...o }),
|
|
28
|
+
e === "HeatLegend" && /* @__PURE__ */ r(L, { ...o }),
|
|
29
|
+
e === "PieChart" && /* @__PURE__ */ r(P, { ...o }),
|
|
30
|
+
e === "StackedColumnChart" && /* @__PURE__ */ r(A, { ...o }),
|
|
31
|
+
e === "StackedAreaRadar" && /* @__PURE__ */ r(w, { ...o }),
|
|
32
|
+
e === "LineChart" && /* @__PURE__ */ r(g, { ...o }),
|
|
33
|
+
e === "NestedPie" && /* @__PURE__ */ r(k, { ...o }),
|
|
34
|
+
e === "SingleLevelPackedCircles" && /* @__PURE__ */ r(S, { ...o }),
|
|
35
|
+
e === "LogarithmicScale" && /* @__PURE__ */ r(x, { ...o }),
|
|
36
|
+
e === "ColumnAndLineMix" && /* @__PURE__ */ r(f, { ...o }),
|
|
37
|
+
e === "DrillDownTreemap" && /* @__PURE__ */ r(s, { ...o }),
|
|
38
|
+
e === "DrillDownVoronoiTreemap" && /* @__PURE__ */ r(u, { ...o }),
|
|
39
|
+
e === "CandlestickChart" && /* @__PURE__ */ r(c, { ...o })
|
|
40
|
+
] }) })
|
|
40
41
|
] });
|
|
41
42
|
};
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
U as ChartWrapper
|
|
44
45
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useThemeProps as v } from "@mui/material";
|
|
2
2
|
import { useMemo as P } from "react";
|
|
3
|
-
import { adaptTemporalData as
|
|
4
|
-
const
|
|
3
|
+
import { adaptTemporalData as C } from "./helpers.js";
|
|
4
|
+
const M = (l) => {
|
|
5
5
|
const n = v({ props: l, name: "HCChartWrapper" }), {
|
|
6
6
|
title: m,
|
|
7
7
|
description: d,
|
|
@@ -11,9 +11,10 @@ const x = (l) => {
|
|
|
11
11
|
dimensions: s = [],
|
|
12
12
|
values: p = [],
|
|
13
13
|
series: r = [],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
loading: f = !1,
|
|
15
|
+
sx: u,
|
|
16
|
+
...h
|
|
17
|
+
} = n, y = {
|
|
17
18
|
...P(() => {
|
|
18
19
|
let t = { data: a, dimensions: s, values: p };
|
|
19
20
|
if (s.length > 0) {
|
|
@@ -26,22 +27,23 @@ const x = (l) => {
|
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
} else if (r.length > 0) {
|
|
29
|
-
const o =
|
|
30
|
+
const o = C(r);
|
|
30
31
|
t = { ...t, ...o };
|
|
31
32
|
}
|
|
32
33
|
return t;
|
|
33
34
|
}, [i, a, s, p, r]),
|
|
34
|
-
...
|
|
35
|
-
},
|
|
35
|
+
...h
|
|
36
|
+
}, g = { ...n };
|
|
36
37
|
return {
|
|
37
38
|
title: m,
|
|
38
39
|
description: d,
|
|
39
40
|
type: c,
|
|
40
|
-
chartProps:
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
chartProps: y,
|
|
42
|
+
loading: f,
|
|
43
|
+
ownerState: g,
|
|
44
|
+
sx: u
|
|
43
45
|
};
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
M as useChartWrapperLogic
|
|
47
49
|
};
|