@hybridcore/ui 1.6.8 → 1.6.10
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/AnimatedTheme-ktdO3Bel.js +7708 -0
- package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-BCQoUJw6.js} +51 -49
- package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-DVczI2TD.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-CcsPEIDh.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-Cy5s-pVc.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/ColorSet-cyPmWGwh.js +77 -0
- package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-CtRTsn-E.js} +4 -4
- package/dist/{DateAxis-YX3QNIB-.js → DateAxis-DEXKps1S.js} +8 -7
- package/dist/{ColorSet-C7vpNXhM.js → Entity-BJCuhdq_.js} +638 -712
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CEOK8Gzh.js} +21 -19
- package/dist/{Legend-Dp_MKfS4.js → Legend-CFvQiIfn.js} +11 -10
- package/dist/{LineSeries-Uiv5o56b.js → LineSeries-D_IL2qGF.js} +13 -12
- package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-CxQyCSEB.js} +11 -11
- package/dist/{PieSeries-B2fW3z0s.js → PieSeries-CMH0Z7pz.js} +34 -32
- package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-BKLX1LKM.js} +4 -4
- package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-B19rbYDZ.js → Slice-BUncQh1B.js} +2 -2
- package/dist/{Tick-2bcLyHpF.js → Tick--VhF0xlz.js} +15 -15
- package/dist/Tooltip-vyZRZWih.js +3606 -0
- package/dist/{XYCursor-C8WktvKM.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Ca_pDVYQ.js} +7 -7
- package/dist/components/charts/_common/tooltip.js +73 -0
- package/dist/components/charts/_common/utils.js +10 -9
- package/dist/components/charts/candlestick/logic.js +191 -164
- package/dist/components/charts/column-line-mix/logic.js +116 -107
- package/dist/components/charts/donut-chart/logic.js +36 -34
- package/dist/components/charts/drill-down-treemap/logic.js +49 -48
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
- package/dist/components/charts/heatmap/logic.js +33 -32
- package/dist/components/charts/highlighting-line-data/logic.js +26 -24
- package/dist/components/charts/line/logic.js +147 -185
- package/dist/components/charts/logaritmic-scale/logic.js +99 -84
- package/dist/components/charts/multiple-value-axes/logic.js +117 -107
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +28 -27
- package/dist/components/charts/pie-chart/logic.js +43 -41
- package/dist/components/charts/stacked-area-radar/logic.js +124 -121
- package/dist/components/charts/stacked-column-chart/logic.js +107 -95
- package/dist/components/charts/xy-chart/logic.js +112 -98
- package/dist/components/metric-card/MetricChart.js +29 -28
- package/dist/main.d.ts +13 -0
- package/package.json +1 -1
- package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
- package/dist/DataProcessor-CHDO51q4.js +0 -83
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { applyValueFormat as
|
|
6
|
-
import { Z as
|
|
7
|
-
import { M as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { R as X, A as I } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as ee } from "@mui/material";
|
|
3
|
+
import te from "dayjs";
|
|
4
|
+
import { useId as re, useRef as ne, useEffect as ie } from "react";
|
|
5
|
+
import { applyValueFormat as se, colorSetFromPalette as oe } from "../_common/utils.js";
|
|
6
|
+
import { Z as U } from "../../../ZoomableContainer-Ca_pDVYQ.js";
|
|
7
|
+
import { M as ae, m as ue, e as le, b as q } from "../../../Entity-BJCuhdq_.js";
|
|
8
|
+
import { C as $, G as A, a as ce, b as he } from "../../../Tooltip-vyZRZWih.js";
|
|
9
|
+
import { B as O } from "../../../Button-BLY4PVJC.js";
|
|
10
|
+
import { H as J } from "../../../Hierarchy-CEOK8Gzh.js";
|
|
11
|
+
import { C as fe } from "../../../Circle-BnfBNKBD.js";
|
|
11
12
|
import { o as de, c as z, a as me } from "../../../constant-BiOGvlZc.js";
|
|
12
|
-
class j extends
|
|
13
|
+
class j extends $ {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), Object.defineProperty(this, "homeButton", {
|
|
15
16
|
enumerable: !0,
|
|
@@ -53,11 +54,11 @@ class j extends U {
|
|
|
53
54
|
_prepareChildren() {
|
|
54
55
|
if (super._prepareChildren(), this.isDirty("target")) {
|
|
55
56
|
const r = this.get("target"), e = this._prevSettings.target;
|
|
56
|
-
r && (r instanceof
|
|
57
|
+
r && (r instanceof U && (this._targetDisposer = this.addDisposer(r.contents.on("scale", (n) => {
|
|
57
58
|
n == r.get("minZoomLevel") ? this.minusButton.set("disabled", !0) : this.minusButton.set("disabled", !1), n == r.get("maxZoomLevel") ? this.plusButton.set("disabled", !0) : this.plusButton.set("disabled", !1);
|
|
58
59
|
})), this.root.events.once("frameended", () => {
|
|
59
60
|
r.get("scale") == r.get("minZoomLevel") && this.minusButton.set("disabled", !0);
|
|
60
|
-
})), this._disposer = new
|
|
61
|
+
})), this._disposer = new ae([
|
|
61
62
|
this.plusButton.events.on("click", () => {
|
|
62
63
|
r.zoomIn();
|
|
63
64
|
}),
|
|
@@ -81,7 +82,7 @@ Object.defineProperty(j, "classNames", {
|
|
|
81
82
|
enumerable: !0,
|
|
82
83
|
configurable: !0,
|
|
83
84
|
writable: !0,
|
|
84
|
-
value:
|
|
85
|
+
value: $.classNames.concat([j.className])
|
|
85
86
|
});
|
|
86
87
|
const pe = 1664525, ge = 1013904223, E = 4294967296;
|
|
87
88
|
function ye() {
|
|
@@ -266,8 +267,8 @@ class R extends J {
|
|
|
266
267
|
enumerable: !0,
|
|
267
268
|
configurable: !0,
|
|
268
269
|
writable: !0,
|
|
269
|
-
value: this.addDisposer(new
|
|
270
|
-
themeTags:
|
|
270
|
+
value: this.addDisposer(new ce(he.new({}), () => fe._new(this._root, {
|
|
271
|
+
themeTags: ue(this.circles.template.get("themeTags", []), [this._tag, "shape"])
|
|
271
272
|
}, [this.circles.template])))
|
|
272
273
|
});
|
|
273
274
|
}
|
|
@@ -297,7 +298,7 @@ class R extends J {
|
|
|
297
298
|
const n = e.get("node"), i = e.get("circle"), s = this.getPrivate("scaleR", 1), a = r.x * s, l = r.y * s, o = r.r * s;
|
|
298
299
|
n.setAll({ x: a, y: l }), i.set("radius", o);
|
|
299
300
|
const u = r.children;
|
|
300
|
-
u &&
|
|
301
|
+
u && le(u, (c) => {
|
|
301
302
|
this._updateNodesScale(c);
|
|
302
303
|
});
|
|
303
304
|
}
|
|
@@ -337,7 +338,7 @@ Object.defineProperty(R, "classNames", {
|
|
|
337
338
|
value: J.classNames.concat([R.className])
|
|
338
339
|
});
|
|
339
340
|
function Ce(t, r) {
|
|
340
|
-
const e =
|
|
341
|
+
const e = te(t);
|
|
341
342
|
switch (r) {
|
|
342
343
|
case "millisecond":
|
|
343
344
|
return e.format("HH:mm:ss.SSS");
|
|
@@ -359,8 +360,8 @@ function Ce(t, r) {
|
|
|
359
360
|
return e.format();
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
|
-
const
|
|
363
|
-
const r =
|
|
363
|
+
const ze = (t) => {
|
|
364
|
+
const r = ee({ props: t, name: "HCPackedCircles" }), {
|
|
364
365
|
dimensions: e,
|
|
365
366
|
values: n,
|
|
366
367
|
data: i,
|
|
@@ -369,17 +370,17 @@ const qe = (t) => {
|
|
|
369
370
|
colors: l,
|
|
370
371
|
sx: o,
|
|
371
372
|
...u
|
|
372
|
-
} = r, h = `hc-packed-circles-${
|
|
373
|
+
} = r, h = `hc-packed-circles-${re().replace(/:/g, "")}`, d = ne(null);
|
|
373
374
|
let m = null;
|
|
374
|
-
e.length < 1 ? m = "PackedCircles requires at least 1 dimension" : n.length < 1 && (m = "PackedCircles requires at least 1 value"),
|
|
375
|
+
e.length < 1 ? m = "PackedCircles requires at least 1 dimension" : n.length < 1 && (m = "PackedCircles requires at least 1 value"), ie(() => {
|
|
375
376
|
if (m) return;
|
|
376
377
|
let p;
|
|
377
378
|
return p = setTimeout(() => {
|
|
378
379
|
var v;
|
|
379
|
-
const f =
|
|
380
|
-
d.current = f,
|
|
380
|
+
const f = X.new(h);
|
|
381
|
+
d.current = f, se(f, (v = n == null ? void 0 : n[0]) == null ? void 0 : v.format), f.setThemes([I.new(f)]);
|
|
381
382
|
const y = f.container.children.push(
|
|
382
|
-
|
|
383
|
+
U.new(f, {
|
|
383
384
|
width: q,
|
|
384
385
|
height: q,
|
|
385
386
|
wheelable: !0,
|
|
@@ -397,7 +398,7 @@ const qe = (t) => {
|
|
|
397
398
|
categoryField: e[0].value,
|
|
398
399
|
childDataField: "children"
|
|
399
400
|
})
|
|
400
|
-
), w =
|
|
401
|
+
), w = oe(f, l);
|
|
401
402
|
x.set("colors", w), e[0].type === "date" && i.forEach((g) => {
|
|
402
403
|
g[e[0].value] = Ce(
|
|
403
404
|
g[e[0].value],
|
|
@@ -414,5 +415,5 @@ const qe = (t) => {
|
|
|
414
415
|
};
|
|
415
416
|
export {
|
|
416
417
|
Ce as formatTimeLabel,
|
|
417
|
-
|
|
418
|
+
ze as usePackedCirclesLogic
|
|
418
419
|
};
|
|
@@ -1,66 +1,68 @@
|
|
|
1
|
-
import { R as w, A
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { applyValueFormat as
|
|
6
|
-
import { P as E, a as
|
|
7
|
-
import { c as m, p as
|
|
8
|
-
import { L as
|
|
9
|
-
const
|
|
10
|
-
const p =
|
|
1
|
+
import { R as w, A } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as C, useTheme as F } from "@mui/material";
|
|
3
|
+
import L from "dayjs";
|
|
4
|
+
import { useId as R, useRef as D, useEffect as I } from "react";
|
|
5
|
+
import { applyValueFormat as S, colorSetFromPalette as b } from "../_common/utils.js";
|
|
6
|
+
import { P as E, a as N } from "../../../PieSeries-CMH0Z7pz.js";
|
|
7
|
+
import { c as m, p as v } from "../../../Entity-BJCuhdq_.js";
|
|
8
|
+
import { L as j } from "../../../Legend-CFvQiIfn.js";
|
|
9
|
+
const K = (y) => {
|
|
10
|
+
const p = C({ props: y, name: "HCPieChart" }), {
|
|
11
11
|
dimensions: t,
|
|
12
|
-
values:
|
|
12
|
+
values: o,
|
|
13
13
|
data: i,
|
|
14
|
-
initDelay:
|
|
15
|
-
colors:
|
|
16
|
-
sx:
|
|
17
|
-
...
|
|
18
|
-
} = p,
|
|
14
|
+
initDelay: T = 0,
|
|
15
|
+
colors: u,
|
|
16
|
+
sx: x,
|
|
17
|
+
...M
|
|
18
|
+
} = p, a = F(), d = `hc-pie-chart-${R().replace(/:/g, "")}`, l = D(null);
|
|
19
19
|
let s = null;
|
|
20
|
-
t.length < 1 ? s = "Missing dimensions config!" :
|
|
20
|
+
t.length < 1 ? s = "Missing dimensions config!" : o.length < 1 && (s = "Missing values config!"), I(() => {
|
|
21
21
|
if (s) return;
|
|
22
|
-
let
|
|
23
|
-
return
|
|
24
|
-
var
|
|
25
|
-
const e = w.new(
|
|
26
|
-
|
|
22
|
+
let n;
|
|
23
|
+
return n = setTimeout(() => {
|
|
24
|
+
var g;
|
|
25
|
+
const e = w.new(d);
|
|
26
|
+
l.current = e, S(e, (g = o == null ? void 0 : o[0]) == null ? void 0 : g.format), e.setThemes([A.new(e)]);
|
|
27
27
|
const f = e.container.children.push(
|
|
28
28
|
E.new(e, {
|
|
29
29
|
layout: e.verticalLayout
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
e.interfaceColors.setAll({
|
|
33
|
-
text: m(
|
|
34
|
-
grid: m(
|
|
35
|
-
stroke: m(
|
|
33
|
+
text: m(a.palette.text.primary),
|
|
34
|
+
grid: m(a.palette.divider),
|
|
35
|
+
stroke: m(a.palette.divider)
|
|
36
36
|
});
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
valueField:
|
|
37
|
+
const r = f.series.push(
|
|
38
|
+
N.new(e, {
|
|
39
|
+
valueField: o[0].dataFieldName,
|
|
40
40
|
categoryField: t[0].value
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
|
-
|
|
43
|
+
r.set("colors", b(e, u));
|
|
44
|
+
const h = "{category}: {valuePercentTotal.formatNumber('0.00')}% ({value})";
|
|
45
|
+
r.slices.template.set("tooltipText", h), r.labels.template.set("text", h), t[0].type === "date" && i.forEach((Y) => {
|
|
44
46
|
let c = "YYYY";
|
|
45
|
-
t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"),
|
|
47
|
+
t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"), Y[t[0].value] = L(Y[t[0].value]).format(
|
|
46
48
|
c
|
|
47
49
|
);
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
centerX:
|
|
51
|
-
x:
|
|
50
|
+
}), r.data.setAll(i), f.children.push(
|
|
51
|
+
j.new(e, {
|
|
52
|
+
centerX: v(50),
|
|
53
|
+
x: v(50),
|
|
52
54
|
marginTop: 15,
|
|
53
55
|
marginBottom: 15
|
|
54
56
|
})
|
|
55
|
-
).data.setAll(
|
|
56
|
-
},
|
|
57
|
+
).data.setAll(r.dataItems), r.appear(1e3, 100);
|
|
58
|
+
}, T), () => {
|
|
57
59
|
var e;
|
|
58
|
-
|
|
60
|
+
n && clearTimeout(n), (e = l.current) == null || e.dispose(), l.current = null;
|
|
59
61
|
};
|
|
60
|
-
}, [i, t,
|
|
61
|
-
const
|
|
62
|
-
return { chartId:
|
|
62
|
+
}, [i, t, o, a.palette.mode, u]);
|
|
63
|
+
const P = { ...p };
|
|
64
|
+
return { chartId: d, ownerState: P, sx: x, error: s, other: M };
|
|
63
65
|
};
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
K as usePieChartLogic
|
|
66
68
|
};
|