@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,43 +1,44 @@
1
- import { R as B, A as I, T as d } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as M, useTheme as P } from "@mui/material";
3
- import X from "lodash";
4
- import { useId as V, useRef as E, useEffect as N } from "react";
5
- import { humanizeLabel as k } from "../_common/format.js";
1
+ import { R as I, A as M } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as O, useTheme as P } from "@mui/material";
3
+ import k from "lodash";
4
+ import { useId as V, useRef as z, useEffect as E } from "react";
5
+ import { humanizeLabel as C } from "../_common/format.js";
6
+ import { attachCombinedAxisTooltip as N } from "../_common/tooltip.js";
6
7
  import { colorSetFromPalette as W, applyValueFormat as q } from "../_common/utils.js";
7
- import { c as l, p as H, a as C } from "../../../ColorSet-C7vpNXhM.js";
8
- import { X as U, V as _ } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { S as $ } from "../../../Scrollbar-D86MJyr2.js";
10
- import { D as j } from "../../../DateAxis-YX3QNIB-.js";
11
- import { A as b, a as G } from "../../../AxisRendererY-C_ItLPNV.js";
12
- import { C as J } from "../../../CategoryAxis-CwnfaGc8.js";
13
- import { C as K } from "../../../ColumnSeries-CjgdJ2QL.js";
14
- import { D as L } from "../../../DataProcessor-CHDO51q4.js";
15
- import { L as Q } from "../../../LineSeries-Uiv5o56b.js";
16
- import { B as Z } from "../../../Bullet-DVczI2TD.js";
17
- import { C as ee } from "../../../Circle-Cy5s-pVc.js";
18
- import { X as te } from "../../../XYCursor-C8WktvKM.js";
19
- import { L as re } from "../../../Legend-Dp_MKfS4.js";
20
- const ke = (T) => {
21
- const h = M({ props: T, name: "HCColumnLineMix" }), {
8
+ import { c as l, p as H, a as b } from "../../../Entity-CCUIdRAr.js";
9
+ import { X as U, V as _ } from "../../../AxisRenderer-lUbezuh7.js";
10
+ import { S as $ } from "../../../Scrollbar-BzSBcIUt.js";
11
+ import { D as j } from "../../../DateAxis-zNtbSVjW.js";
12
+ import { A as X, a as G } from "../../../AxisRendererY-DbSiyb45.js";
13
+ import { C as J } from "../../../CategoryAxis-B8KQp1pE.js";
14
+ import { C as K } from "../../../ColumnSeries-rgnGm-Bg.js";
15
+ import { D as L } from "../../../DataProcessor-CvIe9BVn.js";
16
+ import { L as Q } from "../../../LineSeries-BLFvwrLT.js";
17
+ import { B as Z } from "../../../Bullet-PgoNb3Jv.js";
18
+ import { C as ee } from "../../../Circle-BWRdiMpG.js";
19
+ import { X as te } from "../../../XYCursor-gHAo40xC.js";
20
+ import { L as re } from "../../../Legend-kbCFjJAW.js";
21
+ const Xe = (D) => {
22
+ const f = O({ props: D, name: "HCColumnLineMix" }), {
22
23
  dimensions: t,
23
24
  values: n,
24
25
  data: p,
25
26
  initDelay: Y = 0,
26
- baseInterval: D,
27
- colors: g,
27
+ baseInterval: h,
28
+ colors: x,
28
29
  sx: S,
29
- ...O
30
- } = h, a = P(), x = `hc-column-line-mix-${V().replace(/:/g, "")}`, c = E(null), w = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
31
- N(() => {
32
- if (w) return;
33
- let u;
34
- return u = setTimeout(() => {
35
- var y, A, v, F;
36
- const e = B.new(x);
37
- c.current = e, e.setThemes([I.new(e)]), e.interfaceColors.setAll({
38
- text: l(a.palette.text.primary),
39
- grid: l(a.palette.divider),
40
- stroke: l(a.palette.divider)
30
+ ...T
31
+ } = f, s = P(), A = `hc-column-line-mix-${V().replace(/:/g, "")}`, d = z(null), g = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
32
+ E(() => {
33
+ if (g) return;
34
+ let c;
35
+ return c = setTimeout(() => {
36
+ var y, w, v, F;
37
+ const e = I.new(A);
38
+ d.current = e, e.setThemes([M.new(e)]), e.interfaceColors.setAll({
39
+ text: l(s.palette.text.primary),
40
+ grid: l(s.palette.divider),
41
+ stroke: l(s.palette.divider)
41
42
  });
42
43
  const r = e.container.children.push(
43
44
  U.new(e, {
@@ -45,62 +46,57 @@ const ke = (T) => {
45
46
  panY: !1,
46
47
  wheelX: "none",
47
48
  wheelY: "none",
49
+ maxTooltipDistance: -1,
48
50
  paddingLeft: 0,
49
51
  layout: e.verticalLayout
50
52
  })
51
53
  );
52
- r.set("colors", W(e, g)), r.get("colors", {}).set("step", 3), r.set(
54
+ r.set("colors", W(e, x)), r.get("colors", {}).set("step", 3), r.set(
53
55
  "scrollbarX",
54
56
  $.new(e, { orientation: "horizontal" })
55
57
  );
56
- let s, m = p;
57
- t[0].type === "date" ? (m = X.orderBy(p, [t[0].value]), s = r.xAxes.push(
58
+ let a, m = p;
59
+ t[0].type === "date" ? (m = k.orderBy(p, [t[0].value]), a = r.xAxes.push(
58
60
  j.new(e, {
59
61
  maxDeviation: 0.1,
60
62
  groupData: !1,
61
- baseInterval: D || { timeUnit: "day", count: 1 },
62
- renderer: b.new(e, {}),
63
- tooltip: d.new(e, {})
63
+ baseInterval: h || { timeUnit: "day", count: 1 },
64
+ renderer: X.new(e, {})
64
65
  })
65
- ), (y = s.get("renderer")) == null || y.grid.template.setAll({
66
- stroke: l(a.palette.divider),
66
+ ), (y = a.get("renderer")) == null || y.grid.template.setAll({
67
+ stroke: l(s.palette.divider),
67
68
  strokeOpacity: 1
68
- })) : (s = r.xAxes.push(
69
+ })) : (a = r.xAxes.push(
69
70
  J.new(e, {
70
71
  categoryField: t[0].value,
71
- renderer: b.new(e, {}),
72
- tooltip: d.new(e, {})
72
+ renderer: X.new(e, {})
73
73
  })
74
- ), (A = s.get("renderer")) == null || A.grid.template.setAll({
75
- stroke: l(a.palette.divider),
74
+ ), (w = a.get("renderer")) == null || w.grid.template.setAll({
75
+ stroke: l(s.palette.divider),
76
76
  strokeOpacity: 1
77
77
  }), e.numberFormatter.setAll({
78
78
  numberFormat: "#",
79
79
  numericFields: ["valueX"]
80
- }), m = X.orderBy(p, [t[0].value]), s.data.setAll(m));
81
- const f = r.yAxes.push(
80
+ }), m = k.orderBy(p, [t[0].value]), a.data.setAll(m));
81
+ const u = r.yAxes.push(
82
82
  _.new(e, {
83
83
  min: 0,
84
84
  extraMax: 0.1,
85
85
  renderer: G.new(e, { strokeOpacity: 0.1 })
86
86
  })
87
87
  );
88
- (v = f.get("renderer")) == null || v.grid.template.setAll({
89
- stroke: l(a.palette.divider),
88
+ (v = u.get("renderer")) == null || v.grid.template.setAll({
89
+ stroke: l(s.palette.divider),
90
90
  strokeOpacity: 1
91
- }), n.forEach((i, z) => {
92
- if (z === 0) {
91
+ }), n.forEach((i, B) => {
92
+ if (B === 0) {
93
93
  const o = r.series.push(
94
94
  K.new(e, {
95
- name: i.label ?? k(i.name),
96
- xAxis: s,
97
- yAxis: f,
95
+ name: i.label ?? C(i.name),
96
+ xAxis: a,
97
+ yAxis: u,
98
98
  valueYField: i.dataFieldName,
99
- ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
100
- tooltip: d.new(e, {
101
- pointerOrientation: "horizontal",
102
- labelText: "{name} in {categoryX}: {valueY} {info}"
103
- })
99
+ ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
104
100
  })
105
101
  );
106
102
  o.columns.template.setAll({
@@ -113,15 +109,11 @@ const ke = (T) => {
113
109
  } else {
114
110
  const o = r.series.push(
115
111
  Q.new(e, {
116
- name: i.label ?? k(i.name),
117
- xAxis: s,
118
- yAxis: f,
112
+ name: i.label ?? C(i.name),
113
+ xAxis: a,
114
+ yAxis: u,
119
115
  valueYField: i.dataFieldName,
120
- ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
121
- tooltip: d.new(e, {
122
- pointerOrientation: "horizontal",
123
- labelText: "{name} in {categoryX}: {valueY} {info}"
124
- })
116
+ ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
125
117
  })
126
118
  );
127
119
  o.strokes.template.setAll({
@@ -141,20 +133,31 @@ const ke = (T) => {
141
133
  });
142
134
  });
143
135
  }
144
- }), r.set("cursor", te.new(e, {})), r.children.push(
136
+ }), r.set(
137
+ "cursor",
138
+ te.new(e, { xAxis: a, behavior: "none" })
139
+ ).lineY.set("visible", !1), N({
140
+ root: e,
141
+ chart: r,
142
+ xAxis: a,
143
+ theme: s,
144
+ isDateAxis: t[0].type === "date",
145
+ baseInterval: h,
146
+ follow: !0
147
+ }), r.children.push(
145
148
  re.new(e, {
146
- centerX: C,
147
- x: C
149
+ centerX: b,
150
+ x: b
148
151
  })
149
152
  ).data.setAll(r.series.values), q(e, (F = n == null ? void 0 : n[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
150
153
  }, Y), () => {
151
154
  var e;
152
- u && clearTimeout(u), (e = c.current) == null || e.dispose(), c.current = null;
155
+ c && clearTimeout(c), (e = d.current) == null || e.dispose(), d.current = null;
153
156
  };
154
- }, [p, t, n, a.palette.mode, g]);
155
- const R = { ...h };
156
- return { chartId: x, ownerState: R, sx: S, error: w, other: O };
157
+ }, [p, t, n, s.palette.mode, x]);
158
+ const R = { ...f };
159
+ return { chartId: A, ownerState: R, sx: S, error: g, other: T };
157
160
  };
158
161
  export {
159
- ke as useColumnLineMixLogic
162
+ Xe as useColumnLineMixLogic
160
163
  };
@@ -1,29 +1,29 @@
1
- import { R as x, A } from "../../../AnimatedTheme-jnasw6rT.js";
1
+ import { R as P, A } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
2
  import { useThemeProps as C, useTheme as D } from "@mui/material";
3
3
  import F from "dayjs";
4
- import { useId as P, useRef as R, useEffect as L } 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 { p as m, c as u } from "../../../ColorSet-C7vpNXhM.js";
8
- import { L as k } from "../../../Legend-Dp_MKfS4.js";
9
- const J = (v) => {
10
- const d = C({ props: v, name: "HCDonutChart" }), {
4
+ import { useId as R, useRef as L, 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 { p as m, c as u } from "../../../Entity-CCUIdRAr.js";
8
+ import { L as j } from "../../../Legend-kbCFjJAW.js";
9
+ const K = (y) => {
10
+ const p = C({ props: y, name: "HCDonutChart" }), {
11
11
  dimensions: t,
12
12
  values: o,
13
- data: n,
14
- initDelay: y = 0,
15
- colors: p,
16
- sx: M,
17
- ...T
18
- } = d, r = D(), f = `hc-donut-chart-${P().replace(/:/g, "")}`, i = R(null);
13
+ data: i,
14
+ initDelay: T = 0,
15
+ colors: d,
16
+ sx: x,
17
+ ...M
18
+ } = p, a = D(), f = `hc-donut-chart-${R().replace(/:/g, "")}`, n = L(null);
19
19
  let s = null;
20
- t.length < 1 ? s = "Missing dimensions config!" : o.length < 1 && (s = "Missing values config!"), L(() => {
20
+ t.length < 1 ? s = "Missing dimensions config!" : o.length < 1 && (s = "Missing values config!"), I(() => {
21
21
  if (s) return;
22
22
  let l;
23
23
  return l = setTimeout(() => {
24
- var g;
25
- const e = x.new(f);
26
- i.current = e, I(e, (g = o == null ? void 0 : o[0]) == null ? void 0 : g.format), e.setThemes([A.new(e)]);
24
+ var Y;
25
+ const e = P.new(f);
26
+ n.current = e, S(e, (Y = o == null ? void 0 : o[0]) == null ? void 0 : Y.format), e.setThemes([A.new(e)]);
27
27
  const h = e.container.children.push(
28
28
  E.new(e, {
29
29
  layout: e.verticalLayout,
@@ -31,37 +31,39 @@ const J = (v) => {
31
31
  })
32
32
  );
33
33
  e.interfaceColors.setAll({
34
- text: u(r.palette.text.primary),
35
- grid: u(r.palette.divider),
36
- stroke: u(r.palette.divider)
34
+ text: u(a.palette.text.primary),
35
+ grid: u(a.palette.divider),
36
+ stroke: u(a.palette.divider)
37
37
  });
38
- const a = h.series.push(
39
- j.new(e, {
38
+ const r = h.series.push(
39
+ N.new(e, {
40
40
  valueField: o[0].dataFieldName,
41
41
  categoryField: t[0].value
42
42
  })
43
43
  );
44
- a.set("colors", S(e, p)), t[0].type === "date" && n.forEach((Y) => {
44
+ r.set("colors", b(e, d));
45
+ const g = "{category}: {valuePercentTotal.formatNumber('0.00')}% ({value})";
46
+ r.slices.template.set("tooltipText", g), r.labels.template.set("text", g), t[0].type === "date" && i.forEach((v) => {
45
47
  let c = "YYYY";
46
- t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"), Y[t[0].value] = F(Y[t[0].value]).format(
48
+ t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"), v[t[0].value] = F(v[t[0].value]).format(
47
49
  c
48
50
  );
49
- }), a.data.setAll(n), h.children.push(
50
- k.new(e, {
51
+ }), r.data.setAll(i), h.children.push(
52
+ j.new(e, {
51
53
  centerX: m(50),
52
54
  x: m(50),
53
55
  marginTop: 15,
54
56
  marginBottom: 15
55
57
  })
56
- ).data.setAll(a.dataItems), a.appear(1e3, 100);
57
- }, y), () => {
58
+ ).data.setAll(r.dataItems), r.appear(1e3, 100);
59
+ }, T), () => {
58
60
  var e;
59
- l && clearTimeout(l), (e = i.current) == null || e.dispose(), i.current = null;
61
+ l && clearTimeout(l), (e = n.current) == null || e.dispose(), n.current = null;
60
62
  };
61
- }, [n, t, o, r.palette.mode, p]);
62
- const w = { ...d };
63
- return { chartId: f, ownerState: w, sx: M, error: s, other: T };
63
+ }, [i, t, o, a.palette.mode, d]);
64
+ const w = { ...p };
65
+ return { chartId: f, ownerState: w, sx: x, error: s, other: M };
64
66
  };
65
67
  export {
66
- J as useDonutChartLogic
68
+ K as useDonutChartLogic
67
69
  };
@@ -1,12 +1,13 @@
1
- import { C as x, k as F, l as I, L as W, R as E, a as Z, A as $ } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as G, useTheme as J } from "@mui/material";
3
- import K from "dayjs";
4
- import Q from "lodash";
5
- import { useId as U, useRef as ee, useEffect as te } from "react";
6
- import { applyValueFormat as ie, colorSetFromPalette as ae } from "../_common/utils.js";
7
- import { m as M, f as O, e as j, p as C } from "../../../ColorSet-C7vpNXhM.js";
8
- import { a as ne, H as X } from "../../../Hierarchy-Bihj0S61.js";
9
- import { R as z } from "../../../RoundedRectangle-CWLi2PXn.js";
1
+ import { R as W, T as E, A as Z } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as $, useTheme as G } from "@mui/material";
3
+ import J from "dayjs";
4
+ import K from "lodash";
5
+ import { useId as Q, useRef as U, useEffect as ee } from "react";
6
+ import { applyValueFormat as te, colorSetFromPalette as ie } from "../_common/utils.js";
7
+ import { C as x, a as F, b as I, L as ae } from "../../../Tooltip-A_HlttXp.js";
8
+ import { m as M, f as O, e as j, p as C } from "../../../Entity-CCUIdRAr.js";
9
+ import { a as ne, H as X } from "../../../Hierarchy-CCvGsF1A.js";
10
+ import { R as z } from "../../../RoundedRectangle-CqMMmPM0.js";
10
11
  import { r as se, c as R, a as L } from "../../../constant-BiOGvlZc.js";
11
12
  class Y extends x {
12
13
  constructor() {
@@ -14,7 +15,7 @@ class Y extends x {
14
15
  enumerable: !0,
15
16
  configurable: !0,
16
17
  writable: !0,
17
- value: this.addDisposer(new F(I.new({}), () => W._new(this._root, {
18
+ value: this.addDisposer(new F(I.new({}), () => ae._new(this._root, {
18
19
  themeTags: M(this.labels.template.get("themeTags", []), ["label"]),
19
20
  background: z.new(this._root, {
20
21
  themeTags: ["background"]
@@ -74,28 +75,28 @@ function re(u) {
74
75
  u.x0 = Math.round(u.x0), u.y0 = Math.round(u.y0), u.x1 = Math.round(u.x1), u.y1 = Math.round(u.y1);
75
76
  }
76
77
  function A(u, t, i, a, r) {
77
- for (var l = u.children, s, h = -1, y = l.length, c = u.value && (a - t) / u.value; ++h < y; )
78
+ for (var l = u.children, s, h = -1, b = l.length, c = u.value && (a - t) / u.value; ++h < b; )
78
79
  s = l[h], s.y0 = i, s.y1 = r, s.x0 = t, s.x1 = t += s.value * c;
79
80
  }
80
81
  function H(u, t, i, a, r) {
81
- for (var l = u.children, s, h = -1, y = l.length, c = u.value && (r - i) / u.value; ++h < y; )
82
+ for (var l = u.children, s, h = -1, b = l.length, c = u.value && (r - i) / u.value; ++h < b; )
82
83
  s = l[h], s.x0 = t, s.x1 = a, s.y0 = i, s.y1 = i += s.value * c;
83
84
  }
84
85
  var oe = (1 + Math.sqrt(5)) / 2;
85
86
  function le(u, t, i, a, r, l) {
86
- for (var s = [], h = t.children, y, c, o = 0, m = 0, e = h.length, d, g, p = t.value, n, f, w, v, P, b, _; o < e; ) {
87
+ for (var s = [], h = t.children, b, c, o = 0, m = 0, e = h.length, d, g, p = t.value, n, f, w, v, P, y, _; o < e; ) {
87
88
  d = r - i, g = l - a;
88
89
  do
89
90
  n = h[m++].value;
90
91
  while (!n && m < e);
91
- for (f = w = n, b = Math.max(g / d, d / g) / (p * u), _ = n * n * b, P = Math.max(w / _, _ / f); m < e; ++m) {
92
- if (n += c = h[m].value, c < f && (f = c), c > w && (w = c), _ = n * n * b, v = Math.max(w / _, _ / f), v > P) {
92
+ for (f = w = n, y = Math.max(g / d, d / g) / (p * u), _ = n * n * y, P = Math.max(w / _, _ / f); m < e; ++m) {
93
+ if (n += c = h[m].value, c < f && (f = c), c > w && (w = c), _ = n * n * y, v = Math.max(w / _, _ / f), v > P) {
93
94
  n -= c;
94
95
  break;
95
96
  }
96
97
  P = v;
97
98
  }
98
- s.push(y = { value: n, dice: d < g, children: h.slice(o, m) }), y.dice ? A(y, i, a, r, p ? a += g * n / p : l) : H(y, i, a, p ? i += d * n / p : r, l), p -= n, o = m;
99
+ s.push(b = { value: n, dice: d < g, children: h.slice(o, m) }), b.dice ? A(b, i, a, r, p ? a += g * n / p : l) : H(b, i, a, p ? i += d * n / p : r, l), p -= n, o = m;
99
100
  }
100
101
  return s;
101
102
  }
@@ -108,13 +109,13 @@ const V = function u(t) {
108
109
  }, i;
109
110
  }(oe);
110
111
  function q() {
111
- var u = V, t = !1, i = 1, a = 1, r = [0], l = R, s = R, h = R, y = R, c = R;
112
+ var u = V, t = !1, i = 1, a = 1, r = [0], l = R, s = R, h = R, b = R, c = R;
112
113
  function o(e) {
113
114
  return e.x0 = e.y0 = 0, e.x1 = i, e.y1 = a, e.eachBefore(m), r = [0], t && e.eachBefore(re), e;
114
115
  }
115
116
  function m(e) {
116
117
  var d = r[e.depth], g = e.x0 + d, p = e.y0 + d, n = e.x1 - d, f = e.y1 - d;
117
- n < g && (g = n = (g + n) / 2), f < p && (p = f = (p + f) / 2), e.x0 = g, e.y0 = p, e.x1 = n, e.y1 = f, e.children && (d = r[e.depth + 1] = l(e) / 2, g += c(e) - d, p += s(e) - d, n -= h(e) - d, f -= y(e) - d, n < g && (g = n = (g + n) / 2), f < p && (p = f = (p + f) / 2), u(e, g, p, n, f));
118
+ n < g && (g = n = (g + n) / 2), f < p && (p = f = (p + f) / 2), e.x0 = g, e.y0 = p, e.x1 = n, e.y1 = f, e.children && (d = r[e.depth + 1] = l(e) / 2, g += c(e) - d, p += s(e) - d, n -= h(e) - d, f -= b(e) - d, n < g && (g = n = (g + n) / 2), f < p && (p = f = (p + f) / 2), u(e, g, p, n, f));
118
119
  }
119
120
  return o.round = function(e) {
120
121
  return arguments.length ? (t = !!e, o) : t;
@@ -133,15 +134,15 @@ function q() {
133
134
  }, o.paddingRight = function(e) {
134
135
  return arguments.length ? (h = typeof e == "function" ? e : L(+e), o) : h;
135
136
  }, o.paddingBottom = function(e) {
136
- return arguments.length ? (y = typeof e == "function" ? e : L(+e), o) : y;
137
+ return arguments.length ? (b = typeof e == "function" ? e : L(+e), o) : b;
137
138
  }, o.paddingLeft = function(e) {
138
139
  return arguments.length ? (c = typeof e == "function" ? e : L(+e), o) : c;
139
140
  }, o;
140
141
  }
141
142
  function de(u, t, i, a, r) {
142
- var l = u.children, s, h = l.length, y, c = new Array(h + 1);
143
- for (c[0] = y = s = 0; s < h; ++s)
144
- c[s + 1] = y += l[s].value;
143
+ var l = u.children, s, h = l.length, b, c = new Array(h + 1);
144
+ for (c[0] = b = s = 0; s < h; ++s)
145
+ c[s + 1] = b += l[s].value;
145
146
  o(0, h, u.value, t, i, a, r);
146
147
  function o(m, e, d, g, p, n, f) {
147
148
  if (m >= e - 1) {
@@ -149,18 +150,18 @@ function de(u, t, i, a, r) {
149
150
  w.x0 = g, w.y0 = p, w.x1 = n, w.y1 = f;
150
151
  return;
151
152
  }
152
- for (var v = c[m], P = d / 2 + v, b = m + 1, _ = e - 1; b < _; ) {
153
- var k = b + _ >>> 1;
154
- c[k] < P ? b = k + 1 : _ = k;
153
+ for (var v = c[m], P = d / 2 + v, y = m + 1, _ = e - 1; y < _; ) {
154
+ var k = y + _ >>> 1;
155
+ c[k] < P ? y = k + 1 : _ = k;
155
156
  }
156
- P - c[b - 1] < c[b] - P && m + 1 < b && --b;
157
- var D = c[b] - v, T = d - D;
157
+ P - c[y - 1] < c[y] - P && m + 1 < y && --y;
158
+ var D = c[y] - v, T = d - D;
158
159
  if (n - g > f - p) {
159
160
  var N = d ? (g * T + n * D) / d : n;
160
- o(m, b, D, g, p, N, f), o(b, e, T, N, p, n, f);
161
+ o(m, y, D, g, p, N, f), o(y, e, T, N, p, n, f);
161
162
  } else {
162
163
  var S = d ? (p * T + f * D) / d : f;
163
- o(m, b, D, g, p, n, S), o(b, e, T, g, S, n, f);
164
+ o(m, y, D, g, p, n, S), o(y, e, T, g, S, n, f);
164
165
  }
165
166
  }
166
167
  }
@@ -234,7 +235,7 @@ class B extends X {
234
235
  }
235
236
  _updateNode(t) {
236
237
  super._updateNode(t);
237
- const i = t.get("node"), a = t.get("rectangle"), r = t.get("d3HierarchyNode"), l = this.getPrivate("scaleX", 1), s = this.getPrivate("scaleY", 1), h = r.x0 * l, y = r.x1 * l, c = r.y0 * s, o = r.y1 * s, m = y - h, e = o - c, d = this.get("animationDuration", 0), g = this.get("animationEasing");
238
+ const i = t.get("node"), a = t.get("rectangle"), r = t.get("d3HierarchyNode"), l = this.getPrivate("scaleX", 1), s = this.getPrivate("scaleY", 1), h = r.x0 * l, b = r.x1 * l, c = r.y0 * s, o = r.y1 * s, m = b - h, e = o - c, d = this.get("animationDuration", 0), g = this.get("animationEasing");
238
239
  if (i.animate({ key: "x", to: h, duration: d, easing: g }), i.animate({ key: "y", to: c, duration: d, easing: g }), i.animate({ key: "width", to: m, duration: d, easing: g }), i.animate({ key: "height", to: e, duration: d, easing: g }), a) {
239
240
  const p = t.get("fill"), n = t.get("fillPattern");
240
241
  a.animate({ key: "width", to: m, duration: d, easing: g }), a.animate({ key: "height", to: e, duration: d, easing: g }), a._setDefault("fill", p), a._setDefault("fillPattern", n), a._setDefault("stroke", p);
@@ -243,7 +244,7 @@ class B extends X {
243
244
  _updateNodesScale(t) {
244
245
  const i = t.data.dataItem;
245
246
  if (i) {
246
- const a = i.get("node"), r = i.get("rectangle"), l = this.getPrivate("scaleX", 1), s = this.getPrivate("scaleY", 1), h = t.x0 * l, y = t.x1 * l, c = t.y0 * s, o = t.y1 * s, m = y - h, e = o - c;
247
+ const a = i.get("node"), r = i.get("rectangle"), l = this.getPrivate("scaleX", 1), s = this.getPrivate("scaleY", 1), h = t.x0 * l, b = t.x1 * l, c = t.y0 * s, o = t.y1 * s, m = b - h, e = o - c;
247
248
  a.setAll({ x: h, y: c, width: m, height: e }), r.setAll({ width: m, height: e });
248
249
  const d = t.children;
249
250
  d && j(d, (g) => {
@@ -267,10 +268,10 @@ class B extends X {
267
268
  _zoom(t) {
268
269
  if (this.width() > 0 && this.height() > 0) {
269
270
  const i = t.get("d3HierarchyNode"), a = this.get("nodePaddingOuter", 0);
270
- let r = i.x0 + a, l = i.x1 - a, s = i.y0 + a, h = i.y1 - a, y = (this.innerWidth() - a * 2) / (l - r), c = (this.innerHeight() - a * 2) / (h - s);
271
+ let r = i.x0 + a, l = i.x1 - a, s = i.y0 + a, h = i.y1 - a, b = (this.innerWidth() - a * 2) / (l - r), c = (this.innerHeight() - a * 2) / (h - s);
271
272
  const o = this.get("animationEasing");
272
273
  let m = this.get("animationDuration", 0);
273
- this.inited || (m = 0), this.animatePrivate({ key: "scaleX", to: y, duration: m, easing: o }), this.animatePrivate({ key: "scaleY", to: c, duration: m, easing: o }), this.nodesContainer.animate({ key: "x", to: a - r * y, duration: m, easing: o }), this.nodesContainer.animate({ key: "y", to: a - s * c, duration: m, easing: o });
274
+ this.inited || (m = 0), this.animatePrivate({ key: "scaleX", to: b, duration: m, easing: o }), this.animatePrivate({ key: "scaleY", to: c, duration: m, easing: o }), this.nodesContainer.animate({ key: "x", to: a - r * b, duration: m, easing: o }), this.nodesContainer.animate({ key: "y", to: a - s * c, duration: m, easing: o });
274
275
  }
275
276
  }
276
277
  _selectDataItem(t, i, a) {
@@ -304,26 +305,26 @@ Object.defineProperty(B, "classNames", {
304
305
  writable: !0,
305
306
  value: X.classNames.concat([B.className])
306
307
  });
307
- const _e = (u) => {
308
- const t = G({ props: u, name: "HCDrillDownTreemap" }), {
308
+ const De = (u) => {
309
+ const t = $({ props: u, name: "HCDrillDownTreemap" }), {
309
310
  dimensions: i,
310
311
  values: a,
311
312
  data: r,
312
313
  initDelay: l = 0,
313
314
  colors: s,
314
315
  sx: h,
315
- ...y
316
- } = t, c = J(), m = `hc-drill-down-treemap-${U().replace(/:/g, "")}`, e = ee(null);
316
+ ...b
317
+ } = t, c = G(), m = `hc-drill-down-treemap-${Q().replace(/:/g, "")}`, e = U(null);
317
318
  let d = null;
318
- i.length < 2 ? d = "DrillDownTreemap requires at least 2 dimensions" : a.length < 1 && (d = "DrillDownTreemap requires at least 1 value"), te(() => {
319
+ i.length < 2 ? d = "DrillDownTreemap requires at least 2 dimensions" : a.length < 1 && (d = "DrillDownTreemap requires at least 1 value"), ee(() => {
319
320
  if (d) return;
320
321
  let p;
321
322
  return p = setTimeout(() => {
322
- var b, _;
323
- const n = E.new(m);
324
- e.current = n, ie(n, (b = a == null ? void 0 : a[0]) == null ? void 0 : b.format);
325
- const f = Z.new(n);
326
- f.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth1"]).setAll({ strokeWidth: 2 }), f.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth2"]).setAll({ strokeWidth: 1, strokeOpacity: 0.2 }), f.rule("Label", ["node", "depth1"]).setAll({ fontSize: 10 }), f.rule("Label", ["node", "depth2"]).setAll({ fontSize: 10 }), n.setThemes([$.new(n), f]);
323
+ var y, _;
324
+ const n = W.new(m);
325
+ e.current = n, te(n, (y = a == null ? void 0 : a[0]) == null ? void 0 : y.format);
326
+ const f = E.new(n);
327
+ f.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth1"]).setAll({ strokeWidth: 2 }), f.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth2"]).setAll({ strokeWidth: 1, strokeOpacity: 0.2 }), f.rule("Label", ["node", "depth1"]).setAll({ fontSize: 10 }), f.rule("Label", ["node", "depth2"]).setAll({ fontSize: 10 }), n.setThemes([Z.new(n), f]);
327
328
  const w = n.container.children.push(
328
329
  x.new(n, {
329
330
  width: C(100),
@@ -344,19 +345,19 @@ const _e = (u) => {
344
345
  nodePaddingInner: 0
345
346
  })
346
347
  );
347
- v.nodes.template.setPrivate("trustBounds", !0), v.set("colors", ae(n, s)), (_ = v.get("colors")) == null || _.set("step", 1), w.children.moveValue(
348
+ v.nodes.template.setPrivate("trustBounds", !0), v.set("colors", ie(n, s)), (_ = v.get("colors")) == null || _.set("step", 1), w.children.moveValue(
348
349
  Y.new(n, { series: v }),
349
350
  0
350
351
  );
351
352
  const P = (k, D, T) => {
352
353
  if (k === "date") {
353
354
  let N = "YYYY";
354
- return D.includes("month") ? N = "MMM YYYY" : D.includes("day") && (N = "DD MMM YYYY"), K(T).format(N);
355
+ return D.includes("month") ? N = "MMM YYYY" : D.includes("day") && (N = "DD MMM YYYY"), J(T).format(N);
355
356
  }
356
357
  return T;
357
358
  };
358
359
  if (i.length > 1) {
359
- const k = Q.groupBy(r, i[0].value), D = [];
360
+ const k = K.groupBy(r, i[0].value), D = [];
360
361
  Object.keys(k).forEach((T) => {
361
362
  D.push({
362
363
  name: P(i[0].type, i[0].value, T),
@@ -378,8 +379,8 @@ const _e = (u) => {
378
379
  };
379
380
  }, [r, i, a, c.palette.mode, s]);
380
381
  const g = { ...t };
381
- return { chartId: m, ownerState: g, sx: h, error: d, other: y };
382
+ return { chartId: m, ownerState: g, sx: h, error: d, other: b };
382
383
  };
383
384
  export {
384
- _e as useDrillDownTreemapLogic
385
+ De as useDrillDownTreemapLogic
385
386
  };