@hybridcore/ui 1.6.7 → 1.6.9

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 (48) hide show
  1. package/dist/AnimatedTheme-BOKdw2Oy.js +7708 -0
  2. package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-lUbezuh7.js} +51 -49
  3. package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-DbSiyb45.js} +3 -3
  4. package/dist/{Bullet-DVczI2TD.js → Bullet-PgoNb3Jv.js} +1 -1
  5. package/dist/{Button-CcsPEIDh.js → Button-XBf4Mwz-.js} +3 -3
  6. package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B8KQp1pE.js} +3 -3
  7. package/dist/{Circle-Cy5s-pVc.js → Circle-BWRdiMpG.js} +1 -1
  8. package/dist/ColorSet-DDmFoKtZ.js +77 -0
  9. package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-rgnGm-Bg.js} +4 -4
  10. package/dist/{DataProcessor-CHDO51q4.js → DataProcessor-CvIe9BVn.js} +1 -1
  11. package/dist/{DateAxis-YX3QNIB-.js → DateAxis-zNtbSVjW.js} +8 -7
  12. package/dist/{ColorSet-C7vpNXhM.js → Entity-CCUIdRAr.js} +638 -712
  13. package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CCvGsF1A.js} +25 -23
  14. package/dist/{Legend-Dp_MKfS4.js → Legend-kbCFjJAW.js} +11 -10
  15. package/dist/{LineSeries-Uiv5o56b.js → LineSeries-BLFvwrLT.js} +13 -12
  16. package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-C7rnipF7.js} +11 -11
  17. package/dist/{PieSeries-B2fW3z0s.js → PieSeries-3iLRbqFv.js} +34 -32
  18. package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-CqMMmPM0.js} +4 -4
  19. package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-BzSBcIUt.js} +4 -4
  20. package/dist/{Slice-B19rbYDZ.js → Slice-CS23iLiS.js} +2 -2
  21. package/dist/{Tick-2bcLyHpF.js → Tick-BADQ8QeT.js} +15 -15
  22. package/dist/Tooltip-A_HlttXp.js +3606 -0
  23. package/dist/{XYCursor-C8WktvKM.js → XYCursor-gHAo40xC.js} +3 -3
  24. package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Brs1wHM1.js} +9 -9
  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 +181 -156
  28. package/dist/components/charts/column-line-mix/logic.js +80 -77
  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 +123 -174
  35. package/dist/components/charts/logaritmic-scale/logic.js +69 -60
  36. package/dist/components/charts/multiple-value-axes/logic.js +93 -88
  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 +103 -91
  43. package/dist/components/metric-card/MetricChart.js +29 -28
  44. package/dist/components/metric-card/index.js +1 -1
  45. package/dist/components/metric-card/logic.js +74 -67
  46. package/dist/components/metric-card/styled.js +55 -46
  47. package/package.json +1 -1
  48. package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
@@ -1,21 +1,23 @@
1
- import { G as X, R as j, A as z, T, b as q } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as U, useTheme as $ } from "@mui/material";
1
+ import { R as M, A as j } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as q, useTheme as z } from "@mui/material";
3
3
  import C from "lodash";
4
- import { useId as H, useRef as J, useEffect as K } from "react";
4
+ import { useId as U, useRef as H, useEffect as $ } from "react";
5
5
  import { humanizeLabel as F } from "../_common/format.js";
6
- import { colorSetFromPalette as Q, applyValueFormat as Z } from "../_common/utils.js";
7
- import { c as D, a as w } from "../../../ColorSet-C7vpNXhM.js";
8
- import { X as ee, V as te } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { L as re } from "../../../Legend-Dp_MKfS4.js";
10
- import { D as se } from "../../../DateAxis-YX3QNIB-.js";
11
- import { A as P, a as ae } from "../../../AxisRendererY-C_ItLPNV.js";
12
- import { C as ie } from "../../../CategoryAxis-CwnfaGc8.js";
13
- import { X as oe } from "../../../XYCursor-C8WktvKM.js";
14
- import { L as le } from "../../../LineSeries-Uiv5o56b.js";
15
- import { D as ne } from "../../../DataProcessor-CHDO51q4.js";
16
- import { C as ce } from "../../../Circle-Cy5s-pVc.js";
17
- import { B as ue } from "../../../Bullet-DVczI2TD.js";
18
- class x extends X {
6
+ import { attachCombinedAxisTooltip as J } from "../_common/tooltip.js";
7
+ import { colorSetFromPalette as K, applyValueFormat as Q } from "../_common/utils.js";
8
+ import { c as T, a as A } from "../../../Entity-CCUIdRAr.js";
9
+ import { X as Z, V as ee } from "../../../AxisRenderer-lUbezuh7.js";
10
+ import { L as te } from "../../../Legend-kbCFjJAW.js";
11
+ import { D as re } from "../../../DateAxis-zNtbSVjW.js";
12
+ import { A as P, a as se } from "../../../AxisRendererY-DbSiyb45.js";
13
+ import { C as ae } from "../../../CategoryAxis-B8KQp1pE.js";
14
+ import { X as ie } from "../../../XYCursor-gHAo40xC.js";
15
+ import { L as oe } from "../../../LineSeries-BLFvwrLT.js";
16
+ import { D as le } from "../../../DataProcessor-CvIe9BVn.js";
17
+ import { G as X, R as ne } from "../../../Tooltip-A_HlttXp.js";
18
+ import { C as ce } from "../../../Circle-BWRdiMpG.js";
19
+ import { B as me } from "../../../Bullet-PgoNb3Jv.js";
20
+ class w extends X {
19
21
  _beforeChanged() {
20
22
  super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
21
23
  }
@@ -30,109 +32,104 @@ class x extends X {
30
32
  this.markDirty(), this._clear = !0;
31
33
  }
32
34
  }
33
- Object.defineProperty(x, "className", {
35
+ Object.defineProperty(w, "className", {
34
36
  enumerable: !0,
35
37
  configurable: !0,
36
38
  writable: !0,
37
39
  value: "Triangle"
38
40
  });
39
- Object.defineProperty(x, "classNames", {
41
+ Object.defineProperty(w, "classNames", {
40
42
  enumerable: !0,
41
43
  configurable: !0,
42
44
  writable: !0,
43
- value: X.classNames.concat([x.className])
45
+ value: X.classNames.concat([w.className])
44
46
  });
45
- const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ee = (L) => {
46
- const n = U({ props: L, name: "HCMultipleValueAxes" }), {
47
+ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Fe = (D) => {
48
+ const n = q({ props: D, name: "HCMultipleValueAxes" }), {
47
49
  dimensions: s,
48
50
  values: t,
49
51
  data: p,
50
- initDelay: Y = 0,
51
- baseInterval: I,
52
+ initDelay: I = 0,
53
+ baseInterval: L,
52
54
  colors: R,
53
- sx: O,
55
+ sx: Y,
54
56
  ...V
55
- } = n, d = $(), _ = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, y = J(null);
57
+ } = n, u = z(), _ = `hc-multiple-value-axes-${U().replace(/:/g, "")}`, y = H(null);
56
58
  let h = null;
57
- s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), K(() => {
59
+ s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), $(() => {
58
60
  if (h) return;
59
61
  let b;
60
62
  return b = setTimeout(() => {
61
63
  var N;
62
- const e = j.new(_);
63
- y.current = e, e.setThemes([z.new(e)]), e.interfaceColors.setAll({
64
- text: D(d.palette.text.primary),
65
- grid: D(d.palette.divider),
66
- stroke: D(d.palette.divider)
64
+ const e = M.new(_);
65
+ y.current = e, e.setThemes([j.new(e)]), e.interfaceColors.setAll({
66
+ text: T(u.palette.text.primary),
67
+ grid: T(u.palette.divider),
68
+ stroke: T(u.palette.divider)
67
69
  });
68
70
  const r = e.container.children.push(
69
- ee.new(e, {
71
+ Z.new(e, {
70
72
  panX: !1,
71
73
  panY: !1,
72
74
  wheelX: "none",
73
75
  wheelY: "none",
76
+ maxTooltipDistance: -1,
74
77
  layout: e.verticalLayout
75
78
  })
76
79
  );
77
- r.set("colors", Q(e, R)), r.get("colors", {}).set("step", 3);
80
+ r.set("colors", K(e, R)), r.get("colors", {}).set("step", 3);
78
81
  const G = r.children.push(
79
- re.new(e, { centerX: w, x: w })
80
- ), l = s[0];
81
- let u, m = p;
82
- l.type === "date" ? (u = r.xAxes.push(
83
- se.new(e, {
82
+ te.new(e, { centerX: A, x: A })
83
+ ), i = s[0];
84
+ let c, d = p;
85
+ i.type === "date" ? (c = r.xAxes.push(
86
+ re.new(e, {
84
87
  maxDeviation: 0.1,
85
88
  groupData: !1,
86
- baseInterval: I || { timeUnit: "day", count: 1 },
87
- renderer: P.new(e, {}),
88
- tooltip: T.new(e, {})
89
+ baseInterval: L || { timeUnit: "day", count: 1 },
90
+ renderer: P.new(e, {})
89
91
  })
90
- ), m = C.orderBy(p, [l.value])) : (u = r.xAxes.push(
91
- ie.new(e, {
92
- categoryField: l.value,
93
- renderer: P.new(e, {}),
94
- tooltip: T.new(e, {})
92
+ ), d = C.orderBy(p, [i.value])) : (c = r.xAxes.push(
93
+ ae.new(e, {
94
+ categoryField: i.value,
95
+ renderer: P.new(e, {})
95
96
  })
96
97
  ), e.numberFormatter.setAll({
97
98
  numberFormat: "#",
98
99
  numericFields: ["valueX"]
99
- }), m = C.orderBy(p, [l.value]), u.data.setAll(m));
100
- function E(i, o, c, S, W, v, M) {
101
- const f = ae.new(e, { opposite: W }), k = r.yAxes.push(
102
- te.new(e, { maxDeviation: 1, renderer: f })
100
+ }), d = C.orderBy(p, [i.value]), c.data.setAll(d));
101
+ function E(o, l, m, O, S, v, W) {
102
+ const f = se.new(e, { opposite: S }), k = r.yAxes.push(
103
+ ee.new(e, { maxDeviation: 1, renderer: f })
103
104
  );
104
105
  r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
105
106
  const a = r.series.push(
106
- le.new(e, {
107
- name: o,
108
- xAxis: u,
107
+ oe.new(e, {
108
+ name: l,
109
+ xAxis: c,
109
110
  yAxis: k,
110
- valueYField: S,
111
- ...l.type === "date" ? { valueXField: c } : { categoryXField: c },
112
- tooltip: T.new(e, {
113
- pointerOrientation: "horizontal",
114
- labelText: `${o}: {valueY}`
115
- })
111
+ valueYField: O,
112
+ ...i.type === "date" ? { valueXField: m } : { categoryXField: m }
116
113
  })
117
114
  );
118
115
  a.strokes.template.setAll({ strokeWidth: 2 }), f.grid.template.set("strokeOpacity", 0.05), f.labels.template.set("fill", a.get("fill")), f.setAll({
119
116
  stroke: a.get("fill"),
120
117
  strokeOpacity: 1,
121
118
  opacity: 1
122
- }), M === "date" && (a.data.processor = ne.new(e, {
119
+ }), W === "date" && (a.data.processor = le.new(e, {
123
120
  dateFormat: "i",
124
- dateFields: [c]
121
+ dateFields: [m]
125
122
  })), v !== void 0 && a.bullets.push(function() {
126
123
  let g;
127
- return v === "RECTANGLE" ? g = q.new(e, {
124
+ return v === "RECTANGLE" ? g = ne.new(e, {
128
125
  width: 10,
129
126
  height: 10,
130
- centerX: w,
131
- centerY: w,
127
+ centerX: A,
128
+ centerY: A,
132
129
  strokeWidth: 2,
133
130
  stroke: a.get("stroke"),
134
131
  fill: e.interfaceColors.get("background")
135
- }) : v === "TRIANGLE" ? g = x.new(e, {
132
+ }) : v === "TRIANGLE" ? g = w.new(e, {
136
133
  width: 10,
137
134
  height: 10,
138
135
  strokeWidth: 2,
@@ -143,45 +140,53 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ee = (L) => {
143
140
  radius: 4,
144
141
  stroke: a.get("stroke"),
145
142
  fill: e.interfaceColors.get("background")
146
- }), ue.new(e, { sprite: g });
147
- }), a.data.setAll(i);
143
+ }), me.new(e, { sprite: g });
144
+ }), a.data.setAll(o);
148
145
  }
149
146
  if (r.set(
150
147
  "cursor",
151
- oe.new(e, { xAxis: u, behavior: "none" })
152
- ).lineY.set("visible", !1), s.length > 1) {
153
- const i = C.groupBy(m, s[1].value);
154
- Object.keys(i).forEach((o, c) => {
148
+ ie.new(e, { xAxis: c, behavior: "none" })
149
+ ).lineY.set("visible", !1), J({
150
+ root: e,
151
+ chart: r,
152
+ xAxis: c,
153
+ theme: u,
154
+ isDateAxis: i.type === "date",
155
+ baseInterval: L,
156
+ follow: !0
157
+ }), s.length > 1) {
158
+ const o = C.groupBy(d, s[1].value);
159
+ Object.keys(o).forEach((l, m) => {
155
160
  E(
156
- i[o],
157
- F(o),
161
+ o[l],
162
+ F(l),
158
163
  s[0].value,
159
164
  t[0].dataFieldName,
160
- c !== 0,
161
- A[c % A.length]
165
+ m !== 0,
166
+ x[m % x.length]
162
167
  );
163
168
  });
164
169
  } else
165
- t.forEach((i, o) => {
170
+ t.forEach((o, l) => {
166
171
  E(
167
- m,
168
- i.label ?? F(i.name),
169
- l.value,
170
- i.dataFieldName,
171
- o !== 0,
172
- A[o % A.length],
173
- l.type
172
+ d,
173
+ o.label ?? F(o.name),
174
+ i.value,
175
+ o.dataFieldName,
176
+ l !== 0,
177
+ x[l % x.length],
178
+ i.type
174
179
  );
175
180
  });
176
- G.data.setAll(r.series.values), Z(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
177
- }, Y), () => {
181
+ G.data.setAll(r.series.values), Q(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
182
+ }, I), () => {
178
183
  var e;
179
184
  b && clearTimeout(b), (e = y.current) == null || e.dispose(), y.current = null;
180
185
  };
181
- }, [p, s, t, d.palette.mode, R]);
186
+ }, [p, s, t, u.palette.mode, R]);
182
187
  const B = { ...n };
183
- return { chartId: _, ownerState: B, sx: O, error: h, other: V };
188
+ return { chartId: _, ownerState: B, sx: Y, error: h, other: V };
184
189
  };
185
190
  export {
186
- Ee as useMultipleValueAxesLogic
191
+ Fe as useMultipleValueAxesLogic
187
192
  };
@@ -1,11 +1,11 @@
1
- import { R as S, A as E } from "../../../AnimatedTheme-jnasw6rT.js";
1
+ import { R as S, A as E } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
2
  import { useThemeProps as L, useTheme as j } from "@mui/material";
3
3
  import q from "dayjs";
4
4
  import T from "lodash";
5
5
  import { useId as B, useRef as H, useEffect as I } from "react";
6
6
  import { applyValueFormat as W, colorSetFromPalette as O } from "../_common/utils.js";
7
- import { c as n, p as o } from "../../../ColorSet-C7vpNXhM.js";
8
- import { P as V, a as N } from "../../../PieSeries-B2fW3z0s.js";
7
+ import { c as n, p as o } from "../../../Entity-CCUIdRAr.js";
8
+ import { P as V, a as N } from "../../../PieSeries-3iLRbqFv.js";
9
9
  const Z = (b) => {
10
10
  const g = L({ props: b, name: "HCNestedPie" }), {
11
11
  dimensions: a,
@@ -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-BOKdw2Oy.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-Brs1wHM1.js";
7
+ import { M as ae, m as ue, e as le, b as q } from "../../../Entity-CCUIdRAr.js";
8
+ import { C as $, G as A, a as ce, b as he } from "../../../Tooltip-A_HlttXp.js";
9
+ import { B as O } from "../../../Button-XBf4Mwz-.js";
10
+ import { H as J } from "../../../Hierarchy-CCvGsF1A.js";
11
+ import { C as fe } from "../../../Circle-BWRdiMpG.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-BOKdw2Oy.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-3iLRbqFv.js";
7
+ import { c as m, p as v } from "../../../Entity-CCUIdRAr.js";
8
+ import { L as j } from "../../../Legend-kbCFjJAW.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
  };