@hybridcore/ui 1.6.28 → 1.6.30

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.
@@ -1,31 +1,31 @@
1
- import v from "dayjs";
1
+ import S from "dayjs";
2
2
  import { c as k, g as q } from "../../../_commonjsHelpers-BkfeUUK-.js";
3
- var S = { exports: {} };
3
+ var E = { exports: {} };
4
4
  (function(t, e) {
5
5
  (function(r, n) {
6
6
  t.exports = n();
7
7
  })(k, function() {
8
8
  return function(r, n, s) {
9
9
  r = r || {};
10
- var i = n.prototype, b = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
10
+ var i = n.prototype, h = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
11
11
  function d(o, c, m, f) {
12
12
  return i.fromToBase(o, c, m, f);
13
13
  }
14
- s.en.relativeTime = b, i.fromToBase = function(o, c, m, f, $) {
15
- for (var N, h, y, M = m.$locale().relativeTime || b, D = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], L = D.length, p = 0; p < L; p += 1) {
16
- var u = D[p];
14
+ s.en.relativeTime = h, i.fromToBase = function(o, c, m, f, $) {
15
+ for (var N, p, M, y = m.$locale().relativeTime || h, D = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], L = D.length, b = 0; b < L; b += 1) {
16
+ var u = D[b];
17
17
  u.d && (N = f ? s(o).diff(m, u.d, !0) : m.diff(o, u.d, !0));
18
18
  var a = (r.rounding || Math.round)(Math.abs(N));
19
- if (y = N > 0, a <= u.r || !u.r) {
20
- a <= 1 && p > 0 && (u = D[p - 1]);
21
- var w = M[u.l];
22
- $ && (a = $("" + a)), h = typeof w == "string" ? w.replace("%d", a) : w(a, c, u.l, y);
19
+ if (M = N > 0, a <= u.r || !u.r) {
20
+ a <= 1 && b > 0 && (u = D[b - 1]);
21
+ var x = y[u.l];
22
+ $ && (a = $("" + a)), p = typeof x == "string" ? x.replace("%d", a) : x(a, c, u.l, M);
23
23
  break;
24
24
  }
25
25
  }
26
- if (c) return h;
27
- var Y = y ? M.future : M.past;
28
- return typeof Y == "function" ? Y(h) : Y.replace("%s", h);
26
+ if (c) return p;
27
+ var w = M ? y.future : y.past;
28
+ return typeof w == "function" ? w(p) : w.replace("%s", p);
29
29
  }, i.to = function(o, c) {
30
30
  return d(o, c, this, !0);
31
31
  }, i.from = function(o, c) {
@@ -41,10 +41,10 @@ var S = { exports: {} };
41
41
  };
42
42
  };
43
43
  });
44
- })(S);
45
- var E = S.exports;
46
- const B = /* @__PURE__ */ q(E);
47
- v.extend(B);
44
+ })(E);
45
+ var A = E.exports;
46
+ const B = /* @__PURE__ */ q(A);
47
+ S.extend(B);
48
48
  const W = "—", j = (t) => {
49
49
  const { decimals: e, notation: r } = t ?? {};
50
50
  return r === "compact" ? new Intl.NumberFormat("en-US", {
@@ -56,7 +56,7 @@ const W = "—", j = (t) => {
56
56
  "en-US",
57
57
  e === void 0 ? { maximumFractionDigits: 2 } : { minimumFractionDigits: e, maximumFractionDigits: e }
58
58
  );
59
- }, T = (t) => {
59
+ }, C = (t) => {
60
60
  if (typeof t == "boolean") return t;
61
61
  if (typeof t == "number") return t === 1;
62
62
  if (typeof t == "string") {
@@ -64,38 +64,47 @@ const W = "—", j = (t) => {
64
64
  return e === "true" || e === "1";
65
65
  }
66
66
  return !1;
67
- }, U = (t) => {
67
+ }, I = (t) => {
68
68
  const e = t.toLowerCase();
69
69
  return e.includes("year") ? "YYYY" : e.includes("month") ? "MMM YYYY" : e.includes("hour") || e.includes("minute") || e.includes("time") ? "DD MMM YYYY HH:mm" : "DD MMM YYYY";
70
- }, V = (t, e, r = "") => {
71
- const n = v(t);
72
- return n.isValid() ? e === "relative" ? n.fromNow() : n.format(e || U(r)) : String(t);
73
- }, x = (t, e) => `${(t == null ? void 0 : t.prefix) ?? ""}${e}${(t == null ? void 0 : t.suffix) ?? ""}`, Z = (t, e, r = W, n = "") => {
70
+ }, P = (t, e, r = "") => {
71
+ const n = S(t);
72
+ return n.isValid() ? e === "relative" ? n.fromNow() : n.format(e || I(r)) : String(t);
73
+ }, F = (t, e) => `${(t == null ? void 0 : t.prefix) ?? ""}${e}${(t == null ? void 0 : t.suffix) ?? ""}`, X = (t, e, r = W, n = "") => {
74
74
  if (t == null || t === "") return r;
75
75
  switch ((e == null ? void 0 : e.valueType) ?? (e != null && e.dateFormat ? "date" : "number")) {
76
76
  case "date":
77
- return V(t, e == null ? void 0 : e.dateFormat, n);
77
+ return P(t, e == null ? void 0 : e.dateFormat, n);
78
78
  case "boolean":
79
- return T(t) ? (e == null ? void 0 : e.trueLabel) ?? "true" : (e == null ? void 0 : e.falseLabel) ?? "false";
79
+ return C(t) ? (e == null ? void 0 : e.trueLabel) ?? "true" : (e == null ? void 0 : e.falseLabel) ?? "false";
80
80
  case "text":
81
- return x(e, String(t));
81
+ return F(e, String(t));
82
82
  case "number":
83
83
  default: {
84
84
  const i = Number(t);
85
- return Number.isNaN(i) ? x(e, String(t)) : x(e, j(e).format(i));
85
+ return Number.isNaN(i) ? F(e, String(t)) : F(e, j(e).format(i));
86
86
  }
87
87
  }
88
- }, _ = (t) => {
88
+ }, Z = (t) => {
89
89
  if (!t) return;
90
90
  const { prefix: e, suffix: r, decimals: n, notation: s } = t, i = s === "compact";
91
91
  if (e === void 0 && r === void 0 && n === void 0 && !i)
92
92
  return;
93
- const b = i ? n === void 0 ? "#,###.#a" : n <= 0 ? "#,##0a" : `#,##0.${"0".repeat(n)}a` : n === void 0 ? "#,###.##" : n <= 0 ? "#,##0" : `#,##0.${"0".repeat(n)}`, d = (l) => l ? `'${l.replace(/'/g, "")}'` : "";
94
- return `${d(e)}${b}${d(r)}`;
95
- }, J = (t) => t && t.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase()), F = (t) => t instanceof Date ? t.getTime() : typeof t == "number" ? t : typeof t == "string" && t !== "" ? Date.parse(t) : NaN, C = (t, e) => {
93
+ const h = i ? n === void 0 ? "#,###.#a" : n <= 0 ? "#,##0a" : `#,##0.${"0".repeat(n)}a` : n === void 0 ? "#,###.##" : n <= 0 ? "#,##0" : `#,##0.${"0".repeat(n)}`, d = (l) => l ? `'${l.replace(/'/g, "")}'` : "";
94
+ return `${d(e)}${h}${d(r)}`;
95
+ }, Y = 4, J = (t, e = 2) => {
96
+ if (!Number.isFinite(t)) return "";
97
+ const r = Math.max(0, Math.trunc(e)), n = t.toFixed(r);
98
+ if (Number(n) !== 0 || t === 0) return n;
99
+ for (let s = r + 1; s <= Y; s++) {
100
+ const i = t.toFixed(s);
101
+ if (Number(i) !== 0) return i;
102
+ }
103
+ return `<${(10 ** -Y).toFixed(Y)}`;
104
+ }, K = (t) => t && t.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase()), T = (t) => t instanceof Date ? t.getTime() : typeof t == "number" ? t : typeof t == "string" && t !== "" ? Date.parse(t) : NaN, v = (t, e) => {
96
105
  const r = new Date(t), n = new Date(e);
97
106
  return r.getFullYear() === n.getFullYear() && r.getMonth() === n.getMonth() && r.getDate() === n.getDate();
98
- }, z = (t, e) => {
107
+ }, U = (t, e) => {
99
108
  const r = Number(t);
100
109
  if (Number.isNaN(r)) return !1;
101
110
  const n = Number(e.value);
@@ -119,8 +128,8 @@ const W = "—", j = (t) => {
119
128
  default:
120
129
  return !1;
121
130
  }
122
- }, A = (t, e) => {
123
- const r = F(t), n = F(e.value);
131
+ }, V = (t, e) => {
132
+ const r = T(t), n = T(e.value);
124
133
  if (Number.isNaN(r) || Number.isNaN(n)) return !1;
125
134
  switch (e.op) {
126
135
  case "lt":
@@ -132,17 +141,17 @@ const W = "—", j = (t) => {
132
141
  case "gte":
133
142
  return r >= n;
134
143
  case "eq":
135
- return C(r, n);
144
+ return v(r, n);
136
145
  case "neq":
137
- return !C(r, n);
146
+ return !v(r, n);
138
147
  case "between": {
139
- const s = F(e.value2);
148
+ const s = T(e.value2);
140
149
  return !Number.isNaN(s) && r >= n && r <= s;
141
150
  }
142
151
  default:
143
152
  return !1;
144
153
  }
145
- }, H = (t, e) => {
154
+ }, _ = (t, e) => {
146
155
  const r = String(t ?? "").toLowerCase(), n = String(e.value ?? "").toLowerCase();
147
156
  switch (e.op) {
148
157
  case "eq":
@@ -164,44 +173,45 @@ const W = "—", j = (t) => {
164
173
  default:
165
174
  return !1;
166
175
  }
167
- }, I = (t, e) => {
176
+ }, z = (t, e) => {
168
177
  switch (e.op) {
169
178
  case "isTrue":
170
- return T(t);
179
+ return C(t);
171
180
  case "isFalse":
172
- return !T(t);
181
+ return !C(t);
173
182
  default:
174
183
  return !1;
175
184
  }
176
- }, G = (t, e) => {
185
+ }, H = (t, e) => {
177
186
  switch (e.type ?? "number") {
178
187
  case "date":
179
- return A(t, e);
188
+ return V(t, e);
180
189
  case "text":
181
- return H(t, e);
190
+ return _(t, e);
182
191
  case "boolean":
183
- return I(t, e);
192
+ return z(t, e);
184
193
  case "number":
185
194
  default:
186
- return z(t, e);
195
+ return U(t, e);
187
196
  }
188
- }, g = (t) => t || void 0, K = (t, e) => {
197
+ }, g = (t) => t || void 0, O = (t, e) => {
189
198
  const r = {
190
199
  color: g(e == null ? void 0 : e.color),
191
200
  backgroundColor: g(e == null ? void 0 : e.backgroundColor)
192
201
  }, n = e == null ? void 0 : e.conditionalRules;
193
202
  if (!(n != null && n.length)) return r;
194
- const s = n.find((i) => G(t, i));
203
+ const s = n.find((i) => H(t, i));
195
204
  return s ? {
196
205
  color: g(s.color) ?? r.color,
197
206
  backgroundColor: g(s.backgroundColor) ?? r.backgroundColor
198
207
  } : r;
199
208
  };
200
209
  export {
201
- _ as buildAmNumberFormat,
202
- U as defaultDateFormat,
203
- V as formatDateValue,
204
- Z as formatValue,
205
- J as humanizeLabel,
206
- K as resolveConditionalStyle
210
+ Z as buildAmNumberFormat,
211
+ I as defaultDateFormat,
212
+ P as formatDateValue,
213
+ J as formatPercent,
214
+ X as formatValue,
215
+ K as humanizeLabel,
216
+ O as resolveConditionalStyle
207
217
  };
@@ -1,7 +1,7 @@
1
- import { buildAmNumberFormat as u, formatDateValue as s } from "./format.js";
2
- import { C as F } from "../../../ColorSet-cyPmWGwh.js";
3
- import { c as l } from "../../../Entity-BJCuhdq_.js";
4
- const n = [
1
+ import { buildAmNumberFormat as c, formatDateValue as m, formatPercent as s } from "./format.js";
2
+ import { C as l } from "../../../ColorSet-cyPmWGwh.js";
3
+ import { c as p } from "../../../Entity-BJCuhdq_.js";
4
+ const b = [
5
5
  "#294D94",
6
6
  "#375F97",
7
7
  "#44729C",
@@ -12,30 +12,49 @@ const n = [
12
12
  "#9FCFBF",
13
13
  "#B9E1C9",
14
14
  "#D6F1D5"
15
- ], i = (r, e = n) => F.new(r, {
16
- colors: e.map((t) => l(t)),
15
+ ], v = (t, e = b) => l.new(t, {
16
+ colors: e.map((r) => p(r)),
17
17
  reuse: !0
18
- }), b = [
18
+ }), F = [
19
19
  { number: 1e3, suffix: "K" },
20
20
  { number: 1e6, suffix: "M" },
21
21
  { number: 1e9, suffix: "B" },
22
22
  { number: 1e12, suffix: "T" }
23
- ], d = (r, e) => {
24
- const t = u(e) ?? "#,###.##";
25
- r.numberFormatter.set("numericFields", void 0), r.numberFormatter.set("numberFormat", t), (e == null ? void 0 : e.notation) === "compact" && r.numberFormatter.set("bigNumberPrefixes", b);
26
- }, x = (r, e) => {
27
- e.type !== "date" || !e.dateFormat || r.get("renderer").labels.template.adapters.add(
23
+ ], P = (t, e) => {
24
+ const r = c(e) ?? "#,###.##";
25
+ t.numberFormatter.set("numericFields", void 0), t.numberFormatter.set("numberFormat", r), (e == null ? void 0 : e.notation) === "compact" && t.numberFormatter.set("bigNumberPrefixes", F);
26
+ }, D = (t, e) => {
27
+ e.type !== "date" || !e.dateFormat || t.get("renderer").labels.template.adapters.add(
28
28
  "text",
29
- (t, a) => {
30
- var o;
31
- const m = (o = a == null ? void 0 : a.dataItem) == null ? void 0 : o.get("value");
32
- return typeof m == "number" ? s(m, e.dateFormat, e.value) : t;
29
+ (r, a) => {
30
+ var u;
31
+ const o = (u = a == null ? void 0 : a.dataItem) == null ? void 0 : u.get("value");
32
+ return typeof o == "number" ? m(o, e.dateFormat, e.value) : r;
33
33
  }
34
34
  );
35
+ }, n = (t) => {
36
+ const { percentDecimals: e, percent: r } = t, a = e <= 0 ? "0" : `0.${"0".repeat(e)}`;
37
+ return r === void 0 ? `{valuePercentTotal.formatNumber('${a}')}%` : `${s(r, e)}%`;
38
+ }, y = (t) => {
39
+ const { percentDecimals: e, showValueText: r, percent: a } = t, o = n({ percentDecimals: e, percent: a });
40
+ return r ? `{category}: ${o} ({value})` : `{category}: ${o}`;
41
+ }, d = (t) => {
42
+ var r;
43
+ const e = (r = t == null ? void 0 : t.dataItem) == null ? void 0 : r.get("valuePercentTotal");
44
+ return typeof e == "number" ? e : void 0;
45
+ }, A = (t, e) => {
46
+ t.valueLabels.template.set("text", n({ percentDecimals: e })), t.valueLabels.template.adapters.add("text", (r, a) => {
47
+ const o = d(a);
48
+ return o === void 0 ? r : n({ percentDecimals: e, percent: o });
49
+ });
35
50
  };
36
51
  export {
37
- n as DEFAULT_VIRIDIS_COOL,
38
- x as applyDateAxisLabelFormat,
39
- d as applyValueFormat,
40
- i as colorSetFromPalette
52
+ b as DEFAULT_VIRIDIS_COOL,
53
+ D as applyDateAxisLabelFormat,
54
+ A as applyLegendPercentFormat,
55
+ P as applyValueFormat,
56
+ n as buildPercentText,
57
+ y as buildSliceText,
58
+ v as colorSetFromPalette,
59
+ d as readSharePercent
41
60
  };
@@ -1,82 +1,120 @@
1
- import { R as w, A } from "../../../AnimatedTheme-ktdO3Bel.js";
2
- import { useThemeProps as P, useTheme as R } from "@mui/material";
3
- import b from "dayjs";
4
- import { useId as C, useRef as D, useEffect as F } from "react";
5
- import { applyValueFormat as L, colorSetFromPalette as I } from "../_common/utils.js";
6
- import { P as S, a as B } from "../../../PieSeries-CMH0Z7pz.js";
7
- import { p as l, c as s } from "../../../Entity-BJCuhdq_.js";
8
- import { L as E } from "../../../Legend-CFvQiIfn.js";
9
- const G = (y) => {
10
- const u = P({ props: y, name: "HCDonutChart" }), {
11
- dimensions: t,
1
+ import { R as N, A as V } from "../../../AnimatedTheme-ktdO3Bel.js";
2
+ import { useThemeProps as z, useTheme as E } from "@mui/material";
3
+ import W from "dayjs";
4
+ import { useId as X, useRef as j, useEffect as H } from "react";
5
+ import { formatDateValue as O } from "../_common/format.js";
6
+ import { applyValueFormat as $, colorSetFromPalette as q, buildSliceText as k, applyLegendPercentFormat as G, readSharePercent as J } from "../_common/utils.js";
7
+ import { P as K, a as Q } from "../../../PieSeries-CMH0Z7pz.js";
8
+ import { p as c, c as d } from "../../../Entity-BJCuhdq_.js";
9
+ import { L as U } from "../../../Legend-CFvQiIfn.js";
10
+ import { L as Z } from "../../../Tooltip-vyZRZWih.js";
11
+ const de = (A) => {
12
+ const y = z({ props: A, name: "HCDonutChart" }), {
13
+ dimensions: a,
12
14
  values: o,
13
- data: n,
14
- initDelay: T = 0,
15
- colors: d,
16
- sx: x,
17
- ...M
18
- } = u, a = R(), f = `hc-donut-chart-${C().replace(/:/g, "")}`, c = D(null);
19
- let i = null;
20
- t.length < 1 ? i = "Missing dimensions config!" : o.length < 1 && (i = "Missing values config!"), F(() => {
21
- if (i) return;
22
- let m;
23
- return m = setTimeout(() => {
24
- var v;
25
- const e = w.new(f);
26
- c.current = e, L(e, (v = o == null ? void 0 : o[0]) == null ? void 0 : v.format), e.setThemes([A.new(e)]);
27
- const h = e.container.children.push(
28
- S.new(e, {
15
+ data: m,
16
+ initDelay: P = 0,
17
+ colors: T,
18
+ showDimensionLabel: Y = !1,
19
+ showValueText: f = !0,
20
+ percentDecimals: p = 2,
21
+ sx: R,
22
+ ...C
23
+ } = y, i = E(), w = `hc-donut-chart-${X().replace(/:/g, "")}`, g = j(null), l = o.length > 1;
24
+ let u = null;
25
+ o.length < 1 ? u = "Missing values config!" : !l && a.length < 1 && (u = "Missing dimensions config!"), H(() => {
26
+ if (u) return;
27
+ let v;
28
+ return v = setTimeout(() => {
29
+ var M, F;
30
+ const e = N.new(w);
31
+ g.current = e, $(e, (M = o == null ? void 0 : o[0]) == null ? void 0 : M.format), e.setThemes([V.new(e)]);
32
+ const x = e.container.children.push(
33
+ K.new(e, {
29
34
  layout: e.verticalLayout,
30
- innerRadius: l(50)
35
+ innerRadius: c(50)
31
36
  })
32
37
  );
33
38
  e.interfaceColors.setAll({
34
- text: s(a.palette.text.primary),
35
- grid: s(a.palette.divider),
36
- stroke: s(a.palette.divider),
39
+ text: d(i.palette.text.primary),
40
+ grid: d(i.palette.divider),
41
+ stroke: d(i.palette.divider),
37
42
  // Drives the gap color between slices; tie it to the surface so the
38
43
  // beveled edges read correctly in both light and dark mode.
39
- background: s(a.palette.background.paper)
44
+ background: d(i.palette.background.paper)
40
45
  });
41
- const r = h.series.push(
42
- B.new(e, {
43
- valueField: o[0].dataFieldName,
44
- categoryField: t[0].value
46
+ const I = l ? o.map((r) => {
47
+ var s;
48
+ return {
49
+ category: r.label || r.name || r.fieldName,
50
+ value: (s = m[0]) == null ? void 0 : s[r.dataFieldName]
51
+ };
52
+ }) : m, t = x.series.push(
53
+ Q.new(e, {
54
+ valueField: l ? "value" : o[0].dataFieldName,
55
+ categoryField: l ? "category" : a[0].value
45
56
  })
46
57
  );
47
- r.set("colors", I(e, d));
48
- const g = "{category}: {valuePercentTotal.formatNumber('0.00')}% ({value})";
49
- r.slices.template.setAll({
50
- tooltipText: g,
51
- stroke: s(a.palette.background.paper),
58
+ t.set("colors", q(e, T));
59
+ const b = k({ percentDecimals: p, showValueText: f });
60
+ t.slices.template.setAll({
61
+ tooltipText: b,
62
+ stroke: d(i.palette.background.paper),
52
63
  strokeWidth: 2,
53
64
  strokeOpacity: 1,
54
65
  cornerRadius: 4
55
- }), r.slices.template.states.create("hover", { scale: 1.04 }), r.set("radius", l(80)), r.labels.template.setAll({
56
- text: g,
66
+ }), t.slices.template.states.create("hover", { scale: 1.04 }), t.set("radius", c(80)), t.labels.template.setAll({
67
+ text: b,
57
68
  maxWidth: 140,
58
69
  oversizedBehavior: "wrap"
59
- }), t[0].type === "date" && n.forEach((Y) => {
60
- let p = "YYYY";
61
- t[0].value.includes("month") ? p = "MMM YYYY" : t[0].value.includes("day") && (p = "DD MMM YYYY"), Y[t[0].value] = b(Y[t[0].value]).format(
62
- p
70
+ });
71
+ const D = (r, s) => {
72
+ const S = J(s);
73
+ return S === void 0 ? r : k({ percentDecimals: p, showValueText: f, percent: S });
74
+ };
75
+ t.slices.template.adapters.add("tooltipText", D), t.labels.template.adapters.add("text", D), !l && a[0].type === "date" && m.forEach((r) => {
76
+ let s = "YYYY";
77
+ a[0].value.includes("month") ? s = "MMM YYYY" : a[0].value.includes("day") && (s = "DD MMM YYYY"), r[a[0].value] = W(r[a[0].value]).format(
78
+ s
63
79
  );
64
- }), r.data.setAll(n), h.children.push(
65
- E.new(e, {
66
- centerX: l(50),
67
- x: l(50),
80
+ }), t.data.setAll(I);
81
+ const L = x.children.push(
82
+ U.new(e, {
83
+ centerX: c(50),
84
+ x: c(50),
68
85
  marginTop: 15,
69
86
  marginBottom: 15
70
87
  })
71
- ).data.setAll(r.dataItems), r.appear(1e3, 100);
72
- }, T), () => {
88
+ );
89
+ G(L, p), L.data.setAll(t.dataItems);
90
+ const n = a[0], h = n ? (F = m[0]) == null ? void 0 : F[n.value] : void 0;
91
+ Y && l && n && h != null && h !== "" && x.children.push(
92
+ Z.new(e, {
93
+ text: n.type === "date" ? O(h, n.dateFormat, n.value) : String(h),
94
+ centerX: c(50),
95
+ x: c(50),
96
+ fill: d(i.palette.text.secondary),
97
+ fontSize: 12,
98
+ paddingBottom: 8
99
+ })
100
+ ), t.appear(1e3, 100);
101
+ }, P), () => {
73
102
  var e;
74
- m && clearTimeout(m), (e = c.current) == null || e.dispose(), c.current = null;
103
+ v && clearTimeout(v), (e = g.current) == null || e.dispose(), g.current = null;
75
104
  };
76
- }, [n, t, o, a.palette.mode, d]);
77
- const k = { ...u };
78
- return { chartId: f, ownerState: k, sx: x, error: i, other: M };
105
+ }, [
106
+ m,
107
+ a,
108
+ o,
109
+ i.palette.mode,
110
+ T,
111
+ Y,
112
+ f,
113
+ p
114
+ ]);
115
+ const B = { ...y };
116
+ return { chartId: w, ownerState: B, sx: R, error: u, other: C };
79
117
  };
80
118
  export {
81
- G as useDonutChartLogic
119
+ de as useDonutChartLogic
82
120
  };