@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.
Files changed (47) hide show
  1. package/dist/AnimatedTheme-ktdO3Bel.js +7708 -0
  2. package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-BCQoUJw6.js} +51 -49
  3. package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-AXWvGU6r.js} +3 -3
  4. package/dist/{Bullet-DVczI2TD.js → Bullet-Djj7Vs9T.js} +1 -1
  5. package/dist/{Button-CcsPEIDh.js → Button-BLY4PVJC.js} +3 -3
  6. package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B6NqW8qd.js} +3 -3
  7. package/dist/{Circle-Cy5s-pVc.js → Circle-BnfBNKBD.js} +1 -1
  8. package/dist/ColorSet-cyPmWGwh.js +77 -0
  9. package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-CtRTsn-E.js} +4 -4
  10. package/dist/{DateAxis-YX3QNIB-.js → DateAxis-DEXKps1S.js} +8 -7
  11. package/dist/{ColorSet-C7vpNXhM.js → Entity-BJCuhdq_.js} +638 -712
  12. package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
  13. package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CEOK8Gzh.js} +21 -19
  14. package/dist/{Legend-Dp_MKfS4.js → Legend-CFvQiIfn.js} +11 -10
  15. package/dist/{LineSeries-Uiv5o56b.js → LineSeries-D_IL2qGF.js} +13 -12
  16. package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-CxQyCSEB.js} +11 -11
  17. package/dist/{PieSeries-B2fW3z0s.js → PieSeries-CMH0Z7pz.js} +34 -32
  18. package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-BKLX1LKM.js} +4 -4
  19. package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-CTI7_8Qw.js} +4 -4
  20. package/dist/{Slice-B19rbYDZ.js → Slice-BUncQh1B.js} +2 -2
  21. package/dist/{Tick-2bcLyHpF.js → Tick--VhF0xlz.js} +15 -15
  22. package/dist/Tooltip-vyZRZWih.js +3606 -0
  23. package/dist/{XYCursor-C8WktvKM.js → XYCursor-CVUSpqb9.js} +3 -3
  24. package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Ca_pDVYQ.js} +7 -7
  25. package/dist/components/charts/_common/tooltip.js +73 -0
  26. package/dist/components/charts/_common/utils.js +10 -9
  27. package/dist/components/charts/candlestick/logic.js +191 -164
  28. package/dist/components/charts/column-line-mix/logic.js +116 -107
  29. package/dist/components/charts/donut-chart/logic.js +36 -34
  30. package/dist/components/charts/drill-down-treemap/logic.js +49 -48
  31. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
  32. package/dist/components/charts/heatmap/logic.js +33 -32
  33. package/dist/components/charts/highlighting-line-data/logic.js +26 -24
  34. package/dist/components/charts/line/logic.js +147 -185
  35. package/dist/components/charts/logaritmic-scale/logic.js +99 -84
  36. package/dist/components/charts/multiple-value-axes/logic.js +117 -107
  37. package/dist/components/charts/nested-pie/logic.js +3 -3
  38. package/dist/components/charts/packed-circles/logic.js +28 -27
  39. package/dist/components/charts/pie-chart/logic.js +43 -41
  40. package/dist/components/charts/stacked-area-radar/logic.js +124 -121
  41. package/dist/components/charts/stacked-column-chart/logic.js +107 -95
  42. package/dist/components/charts/xy-chart/logic.js +112 -98
  43. package/dist/components/metric-card/MetricChart.js +29 -28
  44. package/dist/main.d.ts +13 -0
  45. package/package.json +1 -1
  46. package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
  47. package/dist/DataProcessor-CHDO51q4.js +0 -83
@@ -1,15 +1,16 @@
1
- import { C as U, G as A, k as X, l as I, R as ee, A as te } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as re } from "@mui/material";
3
- import ne from "dayjs";
4
- import { useId as ie, useRef as se, useEffect as oe } from "react";
5
- import { applyValueFormat as ae, colorSetFromPalette as ue } from "../_common/utils.js";
6
- import { Z as $ } from "../../../ZoomableContainer-DYyqwaMb.js";
7
- import { M as le, m as ce, e as he, b as q } from "../../../ColorSet-C7vpNXhM.js";
8
- import { B as O } from "../../../Button-CcsPEIDh.js";
9
- import { H as J } from "../../../Hierarchy-Bihj0S61.js";
10
- import { C as fe } from "../../../Circle-Cy5s-pVc.js";
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 U {
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 $ && (this._targetDisposer = this.addDisposer(r.contents.on("scale", (n) => {
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 le([
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: U.classNames.concat([j.className])
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 X(I.new({}), () => fe._new(this._root, {
270
- themeTags: ce(this.circles.template.get("themeTags", []), [this._tag, "shape"])
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 && he(u, (c) => {
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 = ne(t);
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 qe = (t) => {
363
- const r = re({ props: t, name: "HCPackedCircles" }), {
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-${ie().replace(/:/g, "")}`, d = se(null);
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"), oe(() => {
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 = ee.new(h);
380
- d.current = f, ae(f, (v = n == null ? void 0 : n[0]) == null ? void 0 : v.format), f.setThemes([te.new(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
- $.new(f, {
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 = ue(f, l);
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
- qe as usePackedCirclesLogic
418
+ ze as usePackedCirclesLogic
418
419
  };
@@ -1,66 +1,68 @@
1
- import { R as w, A as x } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as A, useTheme as C } from "@mui/material";
3
- import F from "dayjs";
4
- import { useId as L, useRef as R, useEffect as D } from "react";
5
- import { applyValueFormat as I, colorSetFromPalette as S } from "../_common/utils.js";
6
- import { P as E, a as j } from "../../../PieSeries-B2fW3z0s.js";
7
- import { c as m, p as Y } from "../../../ColorSet-C7vpNXhM.js";
8
- import { L as k } from "../../../Legend-Dp_MKfS4.js";
9
- const J = (v) => {
10
- const p = A({ props: v, name: "HCPieChart" }), {
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: r,
12
+ values: o,
13
13
  data: i,
14
- initDelay: y = 0,
15
- colors: d,
16
- sx: M,
17
- ...P
18
- } = p, o = C(), u = `hc-pie-chart-${L().replace(/:/g, "")}`, n = R(null);
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!" : r.length < 1 && (s = "Missing values config!"), D(() => {
20
+ t.length < 1 ? s = "Missing dimensions config!" : o.length < 1 && (s = "Missing values config!"), I(() => {
21
21
  if (s) return;
22
- let l;
23
- return l = setTimeout(() => {
24
- var h;
25
- const e = w.new(u);
26
- n.current = e, I(e, (h = r == null ? void 0 : r[0]) == null ? void 0 : h.format), e.setThemes([x.new(e)]);
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(o.palette.text.primary),
34
- grid: m(o.palette.divider),
35
- stroke: m(o.palette.divider)
33
+ text: m(a.palette.text.primary),
34
+ grid: m(a.palette.divider),
35
+ stroke: m(a.palette.divider)
36
36
  });
37
- const a = f.series.push(
38
- j.new(e, {
39
- valueField: r[0].dataFieldName,
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
- a.set("colors", S(e, d)), t[0].type === "date" && i.forEach((g) => {
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"), g[t[0].value] = F(g[t[0].value]).format(
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
- }), a.data.setAll(i), f.children.push(
49
- k.new(e, {
50
- centerX: Y(50),
51
- x: Y(50),
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(a.dataItems), a.appear(1e3, 100);
56
- }, y), () => {
57
+ ).data.setAll(r.dataItems), r.appear(1e3, 100);
58
+ }, T), () => {
57
59
  var e;
58
- l && clearTimeout(l), (e = n.current) == null || e.dispose(), n.current = null;
60
+ n && clearTimeout(n), (e = l.current) == null || e.dispose(), l.current = null;
59
61
  };
60
- }, [i, t, r, o.palette.mode, d]);
61
- const T = { ...p };
62
- return { chartId: u, ownerState: T, sx: M, error: s, other: P };
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
- J as usePieChartLogic
67
+ K as usePieChartLogic
66
68
  };