@hybridcore/ui 1.6.5 → 1.6.7

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 (34) hide show
  1. package/dist/IconX-C2wmVYSK.js +11 -0
  2. package/dist/components/charts/_common/format.js +55 -0
  3. package/dist/components/charts/_common/utils.js +12 -7
  4. package/dist/components/charts/chart-wrapper/helpers.js +46 -21
  5. package/dist/components/charts/chart-wrapper/logic.js +57 -40
  6. package/dist/components/charts/column-line-mix/logic.js +87 -86
  7. package/dist/components/charts/donut-chart/logic.js +37 -36
  8. package/dist/components/charts/drill-down-treemap/logic.js +123 -123
  9. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
  10. package/dist/components/charts/heatmap/logic.js +73 -73
  11. package/dist/components/charts/line/logic.js +201 -103
  12. package/dist/components/charts/logaritmic-scale/logic.js +65 -65
  13. package/dist/components/charts/multiple-value-axes/logic.js +96 -94
  14. package/dist/components/charts/nested-pie/logic.js +43 -42
  15. package/dist/components/charts/packed-circles/logic.js +111 -110
  16. package/dist/components/charts/pie-chart/logic.js +40 -39
  17. package/dist/components/charts/stacked-area-radar/logic.js +68 -67
  18. package/dist/components/charts/stacked-column-chart/logic.js +71 -70
  19. package/dist/components/charts/xy-chart/logic.js +82 -76
  20. package/dist/components/color-picker/index.js +1645 -1602
  21. package/dist/components/color-picker/logic.js +21 -12
  22. package/dist/components/color-picker/styled.js +4 -2
  23. package/dist/components/date-range-picker/index.js +359 -365
  24. package/dist/components/metric-card/helpers.js +12 -5
  25. package/dist/components/metric-card/index.js +58 -54
  26. package/dist/components/metric-card/logic.js +78 -61
  27. package/dist/components/metric-card/styled.js +63 -45
  28. package/dist/components/simple-pivot-table/index.js +129 -54
  29. package/dist/components/simple-pivot-table/logic.js +111 -45
  30. package/dist/components/simple-pivot-table/styled.js +31 -11
  31. package/dist/main.d.ts +125 -8
  32. package/dist/main.js +145 -141
  33. package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
  34. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { C as V, G as A, k as X, l as I, R as ee, A as te } from "../../../AnimatedTheme-jnasw6rT.js";
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
2
  import { useThemeProps as re } from "@mui/material";
3
3
  import ne from "dayjs";
4
- import { useId as se, useRef as ie, useEffect as oe } from "react";
5
- import { colorSetFromPalette as ae } from "../_common/utils.js";
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
6
  import { Z as $ } from "../../../ZoomableContainer-DYyqwaMb.js";
7
- import { M as ue, m as le, e as ce, b as q } from "../../../ColorSet-C7vpNXhM.js";
7
+ import { M as le, m as ce, e as he, b as q } from "../../../ColorSet-C7vpNXhM.js";
8
8
  import { B as O } from "../../../Button-CcsPEIDh.js";
9
9
  import { H as J } from "../../../Hierarchy-Bihj0S61.js";
10
- import { C as he } from "../../../Circle-Cy5s-pVc.js";
11
- import { o as fe, c as z, a as de } from "../../../constant-BiOGvlZc.js";
12
- class j extends V {
10
+ import { C as fe } from "../../../Circle-Cy5s-pVc.js";
11
+ import { o as de, c as z, a as me } from "../../../constant-BiOGvlZc.js";
12
+ class j extends U {
13
13
  constructor() {
14
14
  super(...arguments), Object.defineProperty(this, "homeButton", {
15
15
  enumerable: !0,
@@ -57,7 +57,7 @@ class j extends V {
57
57
  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
58
  })), this.root.events.once("frameended", () => {
59
59
  r.get("scale") == r.get("minZoomLevel") && this.minusButton.set("disabled", !0);
60
- })), this._disposer = new ue([
60
+ })), this._disposer = new le([
61
61
  this.plusButton.events.on("click", () => {
62
62
  r.zoomIn();
63
63
  }),
@@ -81,46 +81,46 @@ Object.defineProperty(j, "classNames", {
81
81
  enumerable: !0,
82
82
  configurable: !0,
83
83
  writable: !0,
84
- value: V.classNames.concat([j.className])
84
+ value: U.classNames.concat([j.className])
85
85
  });
86
- const me = 1664525, pe = 1013904223, E = 4294967296;
87
- function ge() {
86
+ const pe = 1664525, ge = 1013904223, E = 4294967296;
87
+ function ye() {
88
88
  let t = 1;
89
- return () => (t = (me * t + pe) % E) / E;
89
+ return () => (t = (pe * t + ge) % E) / E;
90
90
  }
91
- function ye(t) {
91
+ function xe(t) {
92
92
  return typeof t == "object" && "length" in t ? t : Array.from(t);
93
93
  }
94
- function xe(t, r) {
95
- let e = t.length, n, s;
94
+ function be(t, r) {
95
+ let e = t.length, n, i;
96
96
  for (; e; )
97
- s = r() * e-- | 0, n = t[e], t[e] = t[s], t[s] = n;
97
+ i = r() * e-- | 0, n = t[e], t[e] = t[i], t[i] = n;
98
98
  return t;
99
99
  }
100
100
  function ve(t, r) {
101
- for (var e = 0, n = (t = xe(Array.from(t), r)).length, s = [], i, a; e < n; )
102
- i = t[e], a && K(a, i) ? ++e : (a = _e(s = be(s, i)), e = 0);
101
+ for (var e = 0, n = (t = be(Array.from(t), r)).length, i = [], s, a; e < n; )
102
+ s = t[e], a && K(a, s) ? ++e : (a = we(i = _e(i, s)), e = 0);
103
103
  return a;
104
104
  }
105
- function be(t, r) {
105
+ function _e(t, r) {
106
106
  var e, n;
107
107
  if (L(r, t)) return [r];
108
108
  for (e = 0; e < t.length; ++e)
109
- if (D(r, t[e]) && L(b(t[e], r), t))
109
+ if (D(r, t[e]) && L(_(t[e], r), t))
110
110
  return [t[e], r];
111
111
  for (e = 0; e < t.length - 1; ++e)
112
112
  for (n = e + 1; n < t.length; ++n)
113
- if (D(b(t[e], t[n]), r) && D(b(t[e], r), t[n]) && D(b(t[n], r), t[e]) && L(Q(t[e], t[n], r), t))
113
+ if (D(_(t[e], t[n]), r) && D(_(t[e], r), t[n]) && D(_(t[n], r), t[e]) && L(Q(t[e], t[n], r), t))
114
114
  return [t[e], t[n], r];
115
115
  throw new Error();
116
116
  }
117
117
  function D(t, r) {
118
- var e = t.r - r.r, n = r.x - t.x, s = r.y - t.y;
119
- return e < 0 || e * e < n * n + s * s;
118
+ var e = t.r - r.r, n = r.x - t.x, i = r.y - t.y;
119
+ return e < 0 || e * e < n * n + i * i;
120
120
  }
121
121
  function K(t, r) {
122
- var e = t.r - r.r + Math.max(t.r, r.r, 1) * 1e-9, n = r.x - t.x, s = r.y - t.y;
123
- return e > 0 && e * e > n * n + s * s;
122
+ var e = t.r - r.r + Math.max(t.r, r.r, 1) * 1e-9, n = r.x - t.x, i = r.y - t.y;
123
+ return e > 0 && e * e > n * n + i * i;
124
124
  }
125
125
  function L(t, r) {
126
126
  for (var e = 0; e < r.length; ++e)
@@ -128,118 +128,118 @@ function L(t, r) {
128
128
  return !1;
129
129
  return !0;
130
130
  }
131
- function _e(t) {
131
+ function we(t) {
132
132
  switch (t.length) {
133
133
  case 1:
134
- return we(t[0]);
134
+ return ke(t[0]);
135
135
  case 2:
136
- return b(t[0], t[1]);
136
+ return _(t[0], t[1]);
137
137
  case 3:
138
138
  return Q(t[0], t[1], t[2]);
139
139
  }
140
140
  }
141
- function we(t) {
141
+ function ke(t) {
142
142
  return {
143
143
  x: t.x,
144
144
  y: t.y,
145
145
  r: t.r
146
146
  };
147
147
  }
148
- function b(t, r) {
149
- var e = t.x, n = t.y, s = t.r, i = r.x, a = r.y, l = r.r, o = i - e, u = a - n, c = l - s, h = Math.sqrt(o * o + u * u);
148
+ function _(t, r) {
149
+ var e = t.x, n = t.y, i = t.r, s = r.x, a = r.y, l = r.r, o = s - e, u = a - n, c = l - i, h = Math.sqrt(o * o + u * u);
150
150
  return {
151
- x: (e + i + o / h * c) / 2,
151
+ x: (e + s + o / h * c) / 2,
152
152
  y: (n + a + u / h * c) / 2,
153
- r: (h + s + l) / 2
153
+ r: (h + i + l) / 2
154
154
  };
155
155
  }
156
156
  function Q(t, r, e) {
157
- var n = t.x, s = t.y, i = t.r, a = r.x, l = r.y, o = r.r, u = e.x, c = e.y, h = e.r, d = n - a, m = n - u, x = s - l, p = s - c, f = o - i, g = h - i, y = n * n + s * s - i * i, _ = y - a * a - l * l + o * o, v = y - u * u - c * c + h * h, w = m * x - d * p, k = (x * v - p * _) / (w * 2) - n, P = (p * f - x * g) / w, N = (m * _ - d * v) / (w * 2) - s, M = (d * g - m * f) / w, H = P * P + M * M - 1, C = 2 * (i + k * P + N * M), Z = k * k + N * N - i * i, Y = -(Math.abs(H) > 1e-6 ? (C + Math.sqrt(C * C - 4 * H * Z)) / (2 * H) : Z / C);
157
+ var n = t.x, i = t.y, s = t.r, a = r.x, l = r.y, o = r.r, u = e.x, c = e.y, h = e.r, d = n - a, m = n - u, b = i - l, p = i - c, f = o - s, y = h - s, x = n * n + i * i - s * s, w = x - a * a - l * l + o * o, v = x - u * u - c * c + h * h, g = m * b - d * p, k = (b * v - p * w) / (g * 2) - n, P = (p * f - b * y) / g, N = (m * w - d * v) / (g * 2) - i, M = (d * y - m * f) / g, H = P * P + M * M - 1, C = 2 * (s + k * P + N * M), Z = k * k + N * N - s * s, Y = -(Math.abs(H) > 1e-6 ? (C + Math.sqrt(C * C - 4 * H * Z)) / (2 * H) : Z / C);
158
158
  return {
159
159
  x: n + k + P * Y,
160
- y: s + N + M * Y,
160
+ y: i + N + M * Y,
161
161
  r: Y
162
162
  };
163
163
  }
164
- function W(t, r, e) {
165
- var n = t.x - r.x, s, i, a = t.y - r.y, l, o, u = n * n + a * a;
166
- u ? (i = r.r + e.r, i *= i, o = t.r + e.r, o *= o, i > o ? (s = (u + o - i) / (2 * u), l = Math.sqrt(Math.max(0, o / u - s * s)), e.x = t.x - s * n - l * a, e.y = t.y - s * a + l * n) : (s = (u + i - o) / (2 * u), l = Math.sqrt(Math.max(0, i / u - s * s)), e.x = r.x + s * n - l * a, e.y = r.y + s * a + l * n)) : (e.x = r.x + e.r, e.y = r.y);
164
+ function F(t, r, e) {
165
+ var n = t.x - r.x, i, s, a = t.y - r.y, l, o, u = n * n + a * a;
166
+ u ? (s = r.r + e.r, s *= s, o = t.r + e.r, o *= o, s > o ? (i = (u + o - s) / (2 * u), l = Math.sqrt(Math.max(0, o / u - i * i)), e.x = t.x - i * n - l * a, e.y = t.y - i * a + l * n) : (i = (u + s - o) / (2 * u), l = Math.sqrt(Math.max(0, s / u - i * i)), e.x = r.x + i * n - l * a, e.y = r.y + i * a + l * n)) : (e.x = r.x + e.r, e.y = r.y);
167
167
  }
168
- function F(t, r) {
169
- var e = t.r + r.r - 1e-6, n = r.x - t.x, s = r.y - t.y;
170
- return e > 0 && e * e > n * n + s * s;
168
+ function W(t, r) {
169
+ var e = t.r + r.r - 1e-6, n = r.x - t.x, i = r.y - t.y;
170
+ return e > 0 && e * e > n * n + i * i;
171
171
  }
172
- function B(t) {
173
- var r = t._, e = t.next._, n = r.r + e.r, s = (r.x * e.r + e.x * r.r) / n, i = (r.y * e.r + e.y * r.r) / n;
174
- return s * s + i * i;
172
+ function V(t) {
173
+ var r = t._, e = t.next._, n = r.r + e.r, i = (r.x * e.r + e.x * r.r) / n, s = (r.y * e.r + e.y * r.r) / n;
174
+ return i * i + s * s;
175
175
  }
176
176
  function T(t) {
177
177
  this._ = t, this.next = null, this.previous = null;
178
178
  }
179
- function ke(t, r) {
180
- if (!(i = (t = ye(t)).length)) return 0;
181
- var e, n, s, i, a, l, o, u, c, h, d;
182
- if (e = t[0], e.x = 0, e.y = 0, !(i > 1)) return e.r;
183
- if (n = t[1], e.x = -n.r, n.x = e.r, n.y = 0, !(i > 2)) return e.r + n.r;
184
- W(n, e, s = t[2]), e = new T(e), n = new T(n), s = new T(s), e.next = s.previous = n, n.next = e.previous = s, s.next = n.previous = e;
185
- e: for (o = 3; o < i; ++o) {
186
- W(e._, n._, s = t[o]), s = new T(s), u = n.next, c = e.previous, h = n._.r, d = e._.r;
179
+ function Pe(t, r) {
180
+ if (!(s = (t = xe(t)).length)) return 0;
181
+ var e, n, i, s, a, l, o, u, c, h, d;
182
+ if (e = t[0], e.x = 0, e.y = 0, !(s > 1)) return e.r;
183
+ if (n = t[1], e.x = -n.r, n.x = e.r, n.y = 0, !(s > 2)) return e.r + n.r;
184
+ F(n, e, i = t[2]), e = new T(e), n = new T(n), i = new T(i), e.next = i.previous = n, n.next = e.previous = i, i.next = n.previous = e;
185
+ e: for (o = 3; o < s; ++o) {
186
+ F(e._, n._, i = t[o]), i = new T(i), u = n.next, c = e.previous, h = n._.r, d = e._.r;
187
187
  do
188
188
  if (h <= d) {
189
- if (F(u._, s._)) {
189
+ if (W(u._, i._)) {
190
190
  n = u, e.next = n, n.previous = e, --o;
191
191
  continue e;
192
192
  }
193
193
  h += u._.r, u = u.next;
194
194
  } else {
195
- if (F(c._, s._)) {
195
+ if (W(c._, i._)) {
196
196
  e = c, e.next = n, n.previous = e, --o;
197
197
  continue e;
198
198
  }
199
199
  d += c._.r, c = c.previous;
200
200
  }
201
201
  while (u !== c.next);
202
- for (s.previous = e, s.next = n, e.next = n.previous = n = s, a = B(e); (s = s.next) !== n; )
203
- (l = B(s)) < a && (e = s, a = l);
202
+ for (i.previous = e, i.next = n, e.next = n.previous = n = i, a = V(e); (i = i.next) !== n; )
203
+ (l = V(i)) < a && (e = i, a = l);
204
204
  n = e.next;
205
205
  }
206
- for (e = [n._], s = n; (s = s.next) !== n; ) e.push(s._);
207
- for (s = ve(e, r), o = 0; o < i; ++o) e = t[o], e.x -= s.x, e.y -= s.y;
208
- return s.r;
206
+ for (e = [n._], i = n; (i = i.next) !== n; ) e.push(i._);
207
+ for (i = ve(e, r), o = 0; o < s; ++o) e = t[o], e.x -= i.x, e.y -= i.y;
208
+ return i.r;
209
209
  }
210
- function Pe(t) {
210
+ function Ne(t) {
211
211
  return Math.sqrt(t.value);
212
212
  }
213
- function Ne() {
213
+ function Me() {
214
214
  var t = null, r = 1, e = 1, n = z;
215
- function s(i) {
216
- const a = ge();
217
- return i.x = r / 2, i.y = e / 2, t ? i.eachBefore(G(t)).eachAfter(S(n, 0.5, a)).eachBefore(U(1)) : i.eachBefore(G(Pe)).eachAfter(S(z, 1, a)).eachAfter(S(n, i.r / Math.min(r, e), a)).eachBefore(U(Math.min(r, e) / (2 * i.r))), i;
215
+ function i(s) {
216
+ const a = ye();
217
+ return s.x = r / 2, s.y = e / 2, t ? s.eachBefore(B(t)).eachAfter(S(n, 0.5, a)).eachBefore(G(1)) : s.eachBefore(B(Ne)).eachAfter(S(z, 1, a)).eachAfter(S(n, s.r / Math.min(r, e), a)).eachBefore(G(Math.min(r, e) / (2 * s.r))), s;
218
218
  }
219
- return s.radius = function(i) {
220
- return arguments.length ? (t = fe(i), s) : t;
221
- }, s.size = function(i) {
222
- return arguments.length ? (r = +i[0], e = +i[1], s) : [r, e];
223
- }, s.padding = function(i) {
224
- return arguments.length ? (n = typeof i == "function" ? i : de(+i), s) : n;
225
- }, s;
219
+ return i.radius = function(s) {
220
+ return arguments.length ? (t = de(s), i) : t;
221
+ }, i.size = function(s) {
222
+ return arguments.length ? (r = +s[0], e = +s[1], i) : [r, e];
223
+ }, i.padding = function(s) {
224
+ return arguments.length ? (n = typeof s == "function" ? s : me(+s), i) : n;
225
+ }, i;
226
226
  }
227
- function G(t) {
227
+ function B(t) {
228
228
  return function(r) {
229
229
  r.children || (r.r = Math.max(0, +t(r) || 0));
230
230
  };
231
231
  }
232
232
  function S(t, r, e) {
233
233
  return function(n) {
234
- if (s = n.children) {
235
- var s, i, a = s.length, l = t(n) * r || 0, o;
236
- if (l) for (i = 0; i < a; ++i) s[i].r += l;
237
- if (o = ke(s, e), l) for (i = 0; i < a; ++i) s[i].r -= l;
234
+ if (i = n.children) {
235
+ var i, s, a = i.length, l = t(n) * r || 0, o;
236
+ if (l) for (s = 0; s < a; ++s) i[s].r += l;
237
+ if (o = Pe(i, e), l) for (s = 0; s < a; ++s) i[s].r -= l;
238
238
  n.r = o + l;
239
239
  }
240
240
  };
241
241
  }
242
- function U(t) {
242
+ function G(t) {
243
243
  return function(r) {
244
244
  var e = r.parent;
245
245
  r.r *= t, e && (r.x = e.x + t * r.x, r.y = e.y + t * r.y);
@@ -256,7 +256,7 @@ class R extends J {
256
256
  enumerable: !0,
257
257
  configurable: !0,
258
258
  writable: !0,
259
- value: Ne()
259
+ value: Me()
260
260
  }), Object.defineProperty(this, "_packData", {
261
261
  enumerable: !0,
262
262
  configurable: !0,
@@ -266,8 +266,8 @@ class R extends J {
266
266
  enumerable: !0,
267
267
  configurable: !0,
268
268
  writable: !0,
269
- value: this.addDisposer(new X(I.new({}), () => he._new(this._root, {
270
- themeTags: le(this.circles.template.get("themeTags", []), [this._tag, "shape"])
269
+ value: this.addDisposer(new X(I.new({}), () => fe._new(this._root, {
270
+ themeTags: ce(this.circles.template.get("themeTags", []), [this._tag, "shape"])
271
271
  }, [this.circles.template])))
272
272
  });
273
273
  }
@@ -285,7 +285,7 @@ class R extends J {
285
285
  }
286
286
  _updateNode(r) {
287
287
  super._updateNode(r);
288
- const e = r.get("node"), n = r.get("circle"), s = r.get("d3HierarchyNode"), i = this.getPrivate("scaleR", 1), a = s.x * i, l = s.y * i, o = s.r * i, u = this.get("animationDuration", 0), c = this.get("animationEasing");
288
+ const e = r.get("node"), n = r.get("circle"), i = r.get("d3HierarchyNode"), s = this.getPrivate("scaleR", 1), a = i.x * s, l = i.y * s, o = i.r * s, u = this.get("animationDuration", 0), c = this.get("animationEasing");
289
289
  if (e.animate({ key: "x", to: a, duration: u, easing: c }), e.animate({ key: "y", to: l, duration: u, easing: c }), n) {
290
290
  const h = r.get("fill"), d = r.get("fillPattern");
291
291
  n.animate({ key: "radius", to: o, duration: u, easing: c }), n._setDefault("fill", h), n._setDefault("fillPattern", d), n._setDefault("stroke", h);
@@ -294,10 +294,10 @@ class R extends J {
294
294
  _updateNodesScale(r) {
295
295
  const e = r.data.dataItem;
296
296
  if (e) {
297
- const n = e.get("node"), s = e.get("circle"), i = this.getPrivate("scaleR", 1), a = r.x * i, l = r.y * i, o = r.r * i;
298
- n.setAll({ x: a, y: l }), s.set("radius", o);
297
+ 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
+ n.setAll({ x: a, y: l }), i.set("radius", o);
299
299
  const u = r.children;
300
- u && ce(u, (c) => {
300
+ u && he(u, (c) => {
301
301
  this._updateNodesScale(c);
302
302
  });
303
303
  }
@@ -308,20 +308,20 @@ class R extends J {
308
308
  makeNode(r) {
309
309
  const e = super.makeNode(r), n = e.children.moveValue(this.circles.make(), 0);
310
310
  e.setPrivate("tooltipTarget", n), this.circles.push(n), r.setRaw("circle", n);
311
- const s = r.get("label");
311
+ const i = r.get("label");
312
312
  return n.on("radius", () => {
313
- const i = n.get("radius", this.width()) * 2;
314
- s.setAll({ maxWidth: i, maxHeight: i });
313
+ const s = n.get("radius", this.width()) * 2;
314
+ i.setAll({ maxWidth: s, maxHeight: s });
315
315
  }), e;
316
316
  }
317
317
  _zoom(r) {
318
318
  const e = r.get("d3HierarchyNode");
319
- let n = e.x, s = e.y, i = e.r, a = Math.min(this.innerWidth(), this.innerHeight()) / (i * 2);
319
+ let n = e.x, i = e.y, s = e.r, a = Math.min(this.innerWidth(), this.innerHeight()) / (s * 2);
320
320
  const l = this.get("animationEasing");
321
321
  let o = this.get("animationDuration", 0);
322
322
  this.inited || (o = 0), this.animatePrivate({ key: "scaleR", to: a, duration: o, easing: l });
323
323
  const u = this.nodesContainer;
324
- u.animate({ key: "x", from: u.x(), to: this.width() / 2 - n * a, duration: o, easing: l }), u.animate({ key: "y", from: u.y(), to: this.height() / 2 - s * a, duration: o, easing: l });
324
+ u.animate({ key: "x", from: u.x(), to: this.width() / 2 - n * a, duration: o, easing: l }), u.animate({ key: "y", from: u.y(), to: this.height() / 2 - i * a, duration: o, easing: l });
325
325
  }
326
326
  }
327
327
  Object.defineProperty(R, "className", {
@@ -336,7 +336,7 @@ Object.defineProperty(R, "classNames", {
336
336
  writable: !0,
337
337
  value: J.classNames.concat([R.className])
338
338
  });
339
- function Me(t, r) {
339
+ function Ce(t, r) {
340
340
  const e = ne(t);
341
341
  switch (r) {
342
342
  case "millisecond":
@@ -359,25 +359,26 @@ function Me(t, r) {
359
359
  return e.format();
360
360
  }
361
361
  }
362
- const Ze = (t) => {
362
+ const qe = (t) => {
363
363
  const r = re({ props: t, name: "HCPackedCircles" }), {
364
364
  dimensions: e,
365
365
  values: n,
366
- data: s,
367
- initDelay: i = 0,
366
+ data: i,
367
+ initDelay: s = 0,
368
368
  baseInterval: a = { timeUnit: "year", count: 1 },
369
369
  colors: l,
370
370
  sx: o,
371
371
  ...u
372
- } = r, h = `hc-packed-circles-${se().replace(/:/g, "")}`, d = ie(null);
372
+ } = r, h = `hc-packed-circles-${ie().replace(/:/g, "")}`, d = se(null);
373
373
  let m = null;
374
374
  e.length < 1 ? m = "PackedCircles requires at least 1 dimension" : n.length < 1 && (m = "PackedCircles requires at least 1 value"), oe(() => {
375
375
  if (m) return;
376
376
  let p;
377
377
  return p = setTimeout(() => {
378
+ var v;
378
379
  const f = ee.new(h);
379
- d.current = f, f.setThemes([te.new(f)]);
380
- const g = f.container.children.push(
380
+ d.current = f, ae(f, (v = n == null ? void 0 : n[0]) == null ? void 0 : v.format), f.setThemes([te.new(f)]);
381
+ const y = f.container.children.push(
381
382
  $.new(f, {
382
383
  width: q,
383
384
  height: q,
@@ -385,10 +386,10 @@ const Ze = (t) => {
385
386
  pinchZoom: !0
386
387
  })
387
388
  );
388
- g.children.push(
389
- j.new(f, { target: g })
389
+ y.children.push(
390
+ j.new(f, { target: y })
390
391
  );
391
- const y = g.contents.children.push(
392
+ const x = y.contents.children.push(
392
393
  R.new(f, {
393
394
  maskContent: !1,
394
395
  topDepth: 1,
@@ -396,22 +397,22 @@ const Ze = (t) => {
396
397
  categoryField: e[0].value,
397
398
  childDataField: "children"
398
399
  })
399
- ), _ = ae(f, l);
400
- y.set("colors", _), e[0].type === "date" && s.forEach((v) => {
401
- v[e[0].value] = Me(
402
- v[e[0].value],
400
+ ), w = ue(f, l);
401
+ x.set("colors", w), e[0].type === "date" && i.forEach((g) => {
402
+ g[e[0].value] = Ce(
403
+ g[e[0].value],
403
404
  a.timeUnit
404
405
  );
405
- }), y.data.setAll([{ name: "Root", children: s }]), y.appear(1e3, 100);
406
- }, i), () => {
406
+ }), x.data.setAll([{ name: "Root", children: i }]), x.appear(1e3, 100);
407
+ }, s), () => {
407
408
  var f;
408
409
  p && clearTimeout(p), (f = d.current) == null || f.dispose(), d.current = null;
409
410
  };
410
- }, [s, e, n, l]);
411
- const x = { ...r };
412
- return { chartId: h, ownerState: x, sx: o, error: m, other: u };
411
+ }, [i, e, n, l]);
412
+ const b = { ...r };
413
+ return { chartId: h, ownerState: b, sx: o, error: m, other: u };
413
414
  };
414
415
  export {
415
- Me as formatTimeLabel,
416
- Ze as usePackedCirclesLogic
416
+ Ce as formatTimeLabel,
417
+ qe as usePackedCirclesLogic
417
418
  };
@@ -1,65 +1,66 @@
1
- import { R as T, A as w } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as x, useTheme as A } from "@mui/material";
3
- import C from "dayjs";
4
- import { useId as F, useRef as L, useEffect as R } from "react";
5
- import { colorSetFromPalette as D } from "../_common/utils.js";
6
- import { P as I, a as S } from "../../../PieSeries-B2fW3z0s.js";
7
- import { c as m, p as g } from "../../../ColorSet-C7vpNXhM.js";
8
- import { L as E } from "../../../Legend-Dp_MKfS4.js";
9
- const G = (Y) => {
10
- const u = x({ props: Y, name: "HCPieChart" }), {
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" }), {
11
11
  dimensions: t,
12
- values: a,
12
+ values: r,
13
13
  data: i,
14
- initDelay: v = 0,
14
+ initDelay: y = 0,
15
15
  colors: d,
16
- sx: y,
17
- ...M
18
- } = u, r = A(), p = `hc-pie-chart-${F().replace(/:/g, "")}`, n = L(null);
19
- let o = null;
20
- t.length < 1 ? o = "Missing dimensions config!" : a.length < 1 && (o = "Missing values config!"), R(() => {
21
- if (o) return;
16
+ sx: M,
17
+ ...P
18
+ } = p, o = C(), u = `hc-pie-chart-${L().replace(/:/g, "")}`, n = R(null);
19
+ let s = null;
20
+ t.length < 1 ? s = "Missing dimensions config!" : r.length < 1 && (s = "Missing values config!"), D(() => {
21
+ if (s) return;
22
22
  let l;
23
23
  return l = setTimeout(() => {
24
- const e = T.new(p);
25
- n.current = e, e.setThemes([w.new(e)]);
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)]);
26
27
  const f = e.container.children.push(
27
- I.new(e, {
28
+ E.new(e, {
28
29
  layout: e.verticalLayout
29
30
  })
30
31
  );
31
32
  e.interfaceColors.setAll({
32
- text: m(r.palette.text.primary),
33
- grid: m(r.palette.divider),
34
- stroke: m(r.palette.divider)
33
+ text: m(o.palette.text.primary),
34
+ grid: m(o.palette.divider),
35
+ stroke: m(o.palette.divider)
35
36
  });
36
- const s = f.series.push(
37
- S.new(e, {
38
- valueField: a[0].dataFieldName,
37
+ const a = f.series.push(
38
+ j.new(e, {
39
+ valueField: r[0].dataFieldName,
39
40
  categoryField: t[0].value
40
41
  })
41
42
  );
42
- s.set("colors", D(e, d)), t[0].type === "date" && i.forEach((h) => {
43
+ a.set("colors", S(e, d)), t[0].type === "date" && i.forEach((g) => {
43
44
  let c = "YYYY";
44
- t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"), h[t[0].value] = C(h[t[0].value]).format(
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(
45
46
  c
46
47
  );
47
- }), s.data.setAll(i), f.children.push(
48
- E.new(e, {
49
- centerX: g(50),
50
- x: g(50),
48
+ }), a.data.setAll(i), f.children.push(
49
+ k.new(e, {
50
+ centerX: Y(50),
51
+ x: Y(50),
51
52
  marginTop: 15,
52
53
  marginBottom: 15
53
54
  })
54
- ).data.setAll(s.dataItems), s.appear(1e3, 100);
55
- }, v), () => {
55
+ ).data.setAll(a.dataItems), a.appear(1e3, 100);
56
+ }, y), () => {
56
57
  var e;
57
58
  l && clearTimeout(l), (e = n.current) == null || e.dispose(), n.current = null;
58
59
  };
59
- }, [i, t, a, r.palette.mode, d]);
60
- const P = { ...u };
61
- return { chartId: p, ownerState: P, sx: y, error: o, other: M };
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
63
  };
63
64
  export {
64
- G as usePieChartLogic
65
+ J as usePieChartLogic
65
66
  };