@thebuoyant-tsdev/mui-ts-library 3.11.0 → 3.11.2

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 (28) hide show
  1. package/README.de.md +14 -0
  2. package/README.md +14 -0
  3. package/dist/components/chord-chart/ChordChart.d.ts +1 -1
  4. package/dist/components/chord-chart/ChordChart.js +155 -137
  5. package/dist/components/chord-chart/ChordChart.types.d.ts +1 -1
  6. package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
  7. package/dist/components/circle-packing-chart/CirclePackingChart.js +134 -121
  8. package/dist/components/gantt-chart/hooks/useGanttDrag.js +44 -38
  9. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +222 -206
  10. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.d.ts +1 -1
  11. package/dist/components/json-editor/JsonEditorContent.js +134 -119
  12. package/dist/components/json-editor/JsonEditorToolbar.js +3 -3
  13. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +131 -130
  14. package/dist/components/radial-tree-chart/RadialTreeChart.js +197 -186
  15. package/dist/components/rich-text-editor/RichTextEditor.js +1 -1
  16. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +40 -39
  17. package/dist/components/shared/useTimedFlag.d.ts +6 -0
  18. package/dist/components/shared/useTimedFlag.js +14 -0
  19. package/dist/components/sql-editor/SqlEditorHistoryMenu.js +1 -1
  20. package/dist/components/sql-editor/useSqlQueryHistory.js +14 -12
  21. package/dist/components/sql-editor/util/sqlQueryHistory.util.d.ts +1 -0
  22. package/dist/components/sql-editor/util/sqlQueryHistory.util.js +21 -13
  23. package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
  24. package/dist/components/sunburst-chart/SunburstChart.js +126 -115
  25. package/dist/components/tag-selection/TagSelectionAutocomplete.js +7 -5
  26. package/dist/index.cjs +2 -2
  27. package/dist/index.js +7 -7
  28. package/package.json +1 -1
@@ -1,87 +1,87 @@
1
1
  import { DEFAULT_RADIAL_TREE_CHART_TRANSLATION as e } from "./RadialTreeChart.types.js";
2
2
  import { useCallback as t, useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
3
3
  import { Avatar as s, Box as c, Divider as l, Popover as ee, Tooltip as te, Typography as u, useTheme as ne } from "@mui/material";
4
- import { Fragment as re, jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import * as p from "d3";
4
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
+ import * as m from "d3";
6
6
  //#region src/components/radial-tree-chart/RadialTreeChart.tsx
7
- var m = {
7
+ var h = {
8
8
  folder: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",
9
9
  person: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
10
10
  };
11
- function ie({ path: e, size: t }) {
11
+ function re({ path: e, size: t }) {
12
12
  let n = t / 2;
13
- return /* @__PURE__ */ d("g", {
13
+ return /* @__PURE__ */ f("g", {
14
14
  transform: `translate(${-n},${-n})`,
15
15
  pointerEvents: "none",
16
- children: /* @__PURE__ */ d("svg", {
16
+ children: /* @__PURE__ */ f("svg", {
17
17
  width: t,
18
18
  height: t,
19
19
  viewBox: "0 0 24 24",
20
20
  overflow: "visible",
21
- children: /* @__PURE__ */ d("path", {
21
+ children: /* @__PURE__ */ f("path", {
22
22
  d: e,
23
23
  fill: "white"
24
24
  })
25
25
  })
26
26
  });
27
27
  }
28
- function ae({ info: e, labelA: t, labelB: n }) {
29
- return /* @__PURE__ */ f(c, {
28
+ function ie({ info: e, labelA: t, labelB: n }) {
29
+ return /* @__PURE__ */ p(c, {
30
30
  sx: {
31
31
  p: 2,
32
32
  minWidth: 200,
33
33
  maxWidth: 280
34
34
  },
35
- children: [/* @__PURE__ */ f(c, {
35
+ children: [/* @__PURE__ */ p(c, {
36
36
  sx: {
37
37
  display: "flex",
38
38
  alignItems: "center",
39
39
  gap: 1.5,
40
40
  mb: 1.5
41
41
  },
42
- children: [/* @__PURE__ */ d(s, {
42
+ children: [/* @__PURE__ */ f(s, {
43
43
  sx: {
44
44
  bgcolor: "primary.main",
45
45
  width: 40,
46
46
  height: 40
47
47
  },
48
48
  children: e.name.charAt(0).toUpperCase()
49
- }), /* @__PURE__ */ f(c, { children: [/* @__PURE__ */ d(u, {
49
+ }), /* @__PURE__ */ p(c, { children: [/* @__PURE__ */ f(u, {
50
50
  variant: "body2",
51
51
  sx: { fontWeight: "bold" },
52
52
  children: e.name
53
- }), e.subname && /* @__PURE__ */ d(u, {
53
+ }), e.subname && /* @__PURE__ */ f(u, {
54
54
  variant: "caption",
55
55
  color: "text.secondary",
56
56
  children: e.subname
57
57
  })] })]
58
- }), (e.specialValueA != null || e.specialValueB != null) && /* @__PURE__ */ f(re, { children: [
59
- /* @__PURE__ */ d(l, { sx: { mb: 1.5 } }),
60
- e.specialValueA != null && /* @__PURE__ */ f(c, {
58
+ }), (e.specialValueA != null || e.specialValueB != null) && /* @__PURE__ */ p(d, { children: [
59
+ /* @__PURE__ */ f(l, { sx: { mb: 1.5 } }),
60
+ e.specialValueA != null && /* @__PURE__ */ p(c, {
61
61
  sx: {
62
62
  display: "flex",
63
63
  justifyContent: "space-between",
64
64
  mb: .5
65
65
  },
66
- children: [/* @__PURE__ */ d(u, {
66
+ children: [/* @__PURE__ */ f(u, {
67
67
  variant: "caption",
68
68
  color: "text.secondary",
69
69
  children: t
70
- }), /* @__PURE__ */ d(u, {
70
+ }), /* @__PURE__ */ f(u, {
71
71
  variant: "caption",
72
72
  children: String(e.specialValueA)
73
73
  })]
74
74
  }),
75
- e.specialValueB != null && /* @__PURE__ */ f(c, {
75
+ e.specialValueB != null && /* @__PURE__ */ p(c, {
76
76
  sx: {
77
77
  display: "flex",
78
78
  justifyContent: "space-between"
79
79
  },
80
- children: [/* @__PURE__ */ d(u, {
80
+ children: [/* @__PURE__ */ f(u, {
81
81
  variant: "caption",
82
82
  color: "text.secondary",
83
83
  children: n
84
- }), /* @__PURE__ */ d(u, {
84
+ }), /* @__PURE__ */ f(u, {
85
85
  variant: "caption",
86
86
  children: String(e.specialValueB)
87
87
  })]
@@ -89,54 +89,54 @@ function ae({ info: e, labelA: t, labelB: n }) {
89
89
  ] })]
90
90
  });
91
91
  }
92
- function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showLabels: g = !0, showIcons: _ = !0, chartColors: v, rootNodeRadius: y = 22, branchNodeRadius: b = 16, leafNodeRadius: x = 11, linkColor: oe, linkStrokeOpacity: S = 1, linkStrokeWidth: C = 1.5, labelFontSize: se = 12, labelColor: ce, separationSibling: w = 1, separationCousin: le = 2, zoomable: T = !1, drillable: E = !1, onFocusChange: D, duration: O = 750, showNodePopover: k = !1, renderNodePopoverContent: A, onNodeClick: ue, disabled: j = !1, translation: de }) {
93
- let M = ne(), N = {
92
+ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLabels: _ = !0, showIcons: v = !0, chartColors: y, rootNodeRadius: b = 22, branchNodeRadius: x = 16, leafNodeRadius: S = 11, linkColor: ae, linkStrokeOpacity: C = 1, linkStrokeWidth: w = 1.5, labelFontSize: oe = 12, labelColor: se, separationSibling: T = 1, separationCousin: ce = 2, zoomable: E = !1, drillable: D = !1, onFocusChange: O, duration: k = 750, showNodePopover: le = !1, renderNodePopoverContent: ue, onNodeClick: de, disabled: A = !1, translation: fe }) {
93
+ let j = ne(), M = {
94
94
  ...e,
95
- ...de
96
- }, fe = [
97
- M.palette.primary.main,
98
- M.palette.secondary.main,
99
- M.palette.info.main,
100
- M.palette.success.main,
101
- M.palette.warning.main,
102
- M.palette.error.main
103
- ], P = v && v.length > 0 ? v : fe, F = t((e) => e.depth === 0 ? y : e.children ? b : x, [
104
- y,
95
+ ...fe
96
+ }, pe = [
97
+ j.palette.primary.main,
98
+ j.palette.secondary.main,
99
+ j.palette.info.main,
100
+ j.palette.success.main,
101
+ j.palette.warning.main,
102
+ j.palette.error.main
103
+ ], N = y && y.length > 0 ? y : pe, P = t((e) => e.depth === 0 ? b : e.children ? x : S, [
105
104
  b,
106
- x
107
- ]), I = t((e) => e.data.colorConfig?.fill ?? P[e.depth % P.length], [P]), [L, R] = o([s]), z = L[L.length - 1], [pe, me] = o(s), [B, V] = o(!1);
108
- pe !== s && (me(s), R([s]), V(!0));
109
- let H = Math.max(1, l / 2 - 70), U = i(() => {
110
- let e = p.hierarchy(z);
111
- return h === "value" ? (e.sum((e) => e.value ?? 0), e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0))) : e.sort((e, t) => p.ascending(e.data.name, t.data.name)), p.tree().size([2 * Math.PI, H]).separation((e, t) => (e.parent === t.parent ? w : le) * 1.4 / Math.max(1, e.depth))(e);
105
+ x,
106
+ S
107
+ ]), F = t((e) => e.data.colorConfig?.fill ?? N[e.depth % N.length], [N]), [I, L] = o([s]), R = I[I.length - 1], [me, he] = o(s), [z, B] = o(!1);
108
+ me !== s && (he(s), L([s]), B(!0));
109
+ let ge = !s.children?.length && !s.value, V = Math.max(1, l / 2 - 70), H = i(() => {
110
+ let e = m.hierarchy(R);
111
+ return g === "value" ? (e.sum((e) => e.value ?? 0), e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0))) : e.sort((e, t) => m.ascending(e.data.name, t.data.name)), m.tree().size([2 * Math.PI, V]).separation((e, t) => (e.parent === t.parent ? T : ce) * 1.4 / Math.max(1, e.depth))(e);
112
112
  }, [
113
- z,
114
- h,
115
- H,
116
- w,
117
- le
118
- ]), he = U.links(), W = U.descendants(), G = a(U), K = a(null), [q, J] = o(null), [ge, _e] = o(0);
113
+ R,
114
+ g,
115
+ V,
116
+ T,
117
+ ce
118
+ ]), _e = H.links(), U = H.descendants(), W = a(H), G = a(null), [K, q] = o(null), [ve, ye] = o(0);
119
119
  n(() => {
120
- let e = G.current;
121
- if (G.current = U, e === U) return;
122
- if (K.current != null && (cancelAnimationFrame(K.current), K.current = null), B || O <= 0) {
123
- V(!1), J(null);
120
+ let e = W.current;
121
+ if (W.current = H, e === H) return;
122
+ if (G.current != null && (cancelAnimationFrame(G.current), G.current = null), z || k <= 0) {
123
+ B(!1), q(null);
124
124
  return;
125
125
  }
126
- J(e), _e(1);
126
+ q(e), ye(1);
127
127
  let t = performance.now(), n = (e) => {
128
- let r = Math.min(1, (e - t) / O);
129
- _e(1 - p.easeCubic(r)), r < 1 ? K.current = requestAnimationFrame(n) : (K.current = null, J(null));
128
+ let r = Math.min(1, (e - t) / k);
129
+ ye(1 - m.easeCubic(r)), r < 1 ? G.current = requestAnimationFrame(n) : (G.current = null, q(null));
130
130
  };
131
- return K.current = requestAnimationFrame(n), () => {
132
- K.current != null && cancelAnimationFrame(K.current);
131
+ return G.current = requestAnimationFrame(n), () => {
132
+ G.current != null && cancelAnimationFrame(G.current);
133
133
  };
134
134
  }, [
135
- U,
136
- O,
137
- B
135
+ H,
136
+ k,
137
+ z
138
138
  ]);
139
- let Y = i(() => p.linkRadial().angle((e) => e.x).radius((e) => e.y), []), ve = t((e) => ({
139
+ let be = i(() => m.linkRadial().angle((e) => e.x).radius((e) => e.y), []), xe = t((e) => ({
140
140
  id: e.data.id,
141
141
  name: e.data.name,
142
142
  subname: e.data.subname ?? null,
@@ -147,61 +147,65 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
147
147
  path: e.ancestors().map((e) => e.data.name).reverse(),
148
148
  childrenCount: e.children?.length ?? 0,
149
149
  data: e.data
150
- }), []), ye = a(null), [X, be] = o(`-${l / 2} -${l / 2} ${l} ${l}`), [Z, xe] = o(1);
150
+ }), []), Se = a(null), [J, Y] = o(`-${l / 2} -${l / 2} ${l} ${l}`), [X, Ce] = o(1);
151
151
  r(() => {
152
- let e = ye.current;
152
+ if (!d) {
153
+ Y(`-${l / 2} -${l / 2} ${l} ${l}`);
154
+ return;
155
+ }
156
+ let e = Se.current;
153
157
  if (!e) return;
154
158
  let t = requestAnimationFrame(() => {
155
159
  try {
156
160
  let t = e.getBBox();
157
- be(`${t.x - 20} ${t.y - 20} ${t.width + 40} ${t.height + 40}`);
161
+ Y(`${t.x - 20} ${t.y - 20} ${t.width + 40} ${t.height + 40}`);
158
162
  } catch {
159
- be(`-${l / 2} -${l / 2} ${l} ${l}`);
163
+ Y(`-${l / 2} -${l / 2} ${l} ${l}`);
160
164
  }
161
165
  });
162
166
  return () => cancelAnimationFrame(t);
163
167
  }, [
164
168
  l,
165
- U,
166
- g,
167
- re
169
+ H,
170
+ _,
171
+ d
168
172
  ]);
169
- let Se = i(() => {
170
- if (Z === 1) return X;
171
- let [e, t, n, r] = X.split(" ").map(Number), i = n / Z, a = r / Z;
173
+ let we = i(() => {
174
+ if (X === 1) return J;
175
+ let [e, t, n, r] = J.split(" ").map(Number), i = n / X, a = r / X;
172
176
  return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
173
- }, [X, Z]), Ce = t((e) => {
174
- if (!T || j || !e.ctrlKey) return;
177
+ }, [J, X]), Te = t((e) => {
178
+ if (!E || A || !e.ctrlKey) return;
175
179
  e.preventDefault();
176
180
  let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
177
- xe((e) => Math.max(.25, Math.min(8, e * t)));
178
- }, [T, j]);
179
- r(() => {
180
- if (!T && !E) return;
181
+ Ce((e) => Math.max(.25, Math.min(8, e * t)));
182
+ }, [E, A]), Z = a(null), Ee = (e) => {
183
+ Z.current &&= (clearTimeout(Z.current), null), Z.current = setTimeout(() => {
184
+ e(), Z.current = null;
185
+ }, 250);
186
+ }, Q = () => {
187
+ Z.current &&= (clearTimeout(Z.current), null);
188
+ };
189
+ n(() => () => Q(), []), r(() => {
190
+ if (!E && !D) return;
181
191
  let e = (e) => {
182
- e.key === "Escape" && (T && xe(1), E && (R([s]), D?.(null)));
192
+ e.key === "Escape" && (E && Ce(1), D && (Q(), L([s]), O?.(null)));
183
193
  };
184
194
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
185
195
  }, [
186
- T,
187
196
  E,
197
+ D,
188
198
  s,
189
- D
199
+ O
190
200
  ]);
191
- let Q = a(null), we = (e) => {
192
- Q.current &&= (clearTimeout(Q.current), null), Q.current = setTimeout(() => {
193
- e(), Q.current = null;
194
- }, 250);
195
- }, Te = () => {
196
- Q.current &&= (clearTimeout(Q.current), null);
197
- }, [Ee, De] = o(null), Oe = a(null), ke = a(null), [Ae, je] = o(!1), [Me, Ne] = o(null), [Pe, Fe] = o({
201
+ let [De, Oe] = o(null), ke = a(null), Ae = a(null), [je, Me] = o(!1), [Ne, Pe] = o(null), [Fe, Ie] = o({
198
202
  left: 0,
199
203
  top: 0
200
- }), [$, Ie] = o(null), Le = t(() => {
201
- R((e) => {
204
+ }), [$, Le] = o(null), Re = t(() => {
205
+ L((e) => {
202
206
  if (e.length <= 1) return e;
203
207
  let t = e.slice(0, -1);
204
- return D?.(t.length <= 1 ? null : {
208
+ return O?.(t.length <= 1 ? null : {
205
209
  id: t[t.length - 1].id,
206
210
  name: t[t.length - 1].name,
207
211
  subname: t[t.length - 1].subname ?? null,
@@ -214,39 +218,39 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
214
218
  data: t[t.length - 1]
215
219
  }), t;
216
220
  });
217
- }, [D]), Re = (e) => {
218
- j || !E || (e.ctrlKey || e.metaKey) && (Te(), Le());
219
- }, ze = (e) => {
220
- if (j) return;
221
- let t = W[Number(e.currentTarget.getAttribute("data-idx"))];
221
+ }, [O]), ze = (e) => {
222
+ A || !D || (e.ctrlKey || e.metaKey) && (Q(), Re());
223
+ }, Be = (e) => {
224
+ if (A) return;
225
+ let t = U[Number(e.currentTarget.getAttribute("data-idx"))];
222
226
  if (!t) return;
223
- let n = ve(t);
224
- if ((e.ctrlKey || e.metaKey) && E && t.children) {
225
- we(() => {
226
- R((e) => [...e, t.data]), D?.(n);
227
+ let n = xe(t);
228
+ if ((e.ctrlKey || e.metaKey) && D && t.children) {
229
+ Ee(() => {
230
+ L((e) => [...e, t.data]), O?.(n);
227
231
  });
228
232
  return;
229
233
  }
230
- if (k) {
231
- let t = Oe.current?.getBoundingClientRect();
232
- Fe({
234
+ if (le) {
235
+ let t = ke.current?.getBoundingClientRect();
236
+ Ie({
233
237
  left: t ? e.clientX - t.left : e.clientX,
234
238
  top: t ? e.clientY - t.top : e.clientY
235
- }), Ne(ke.current), Ie(n), je(!0);
239
+ }), Pe(Ae.current), Le(n), Me(!0);
236
240
  }
237
- ue?.(n, e);
238
- }, Be = ce || M.palette.text.primary, Ve = oe || M.palette.text.secondary, He = M.palette.background.paper, Ue = M.typography.fontFamily;
239
- return /* @__PURE__ */ f(c, {
240
- ref: Oe,
241
+ de?.(n, e);
242
+ }, Ve = se || j.palette.text.primary, He = ae || j.palette.text.secondary, Ue = j.palette.background.paper, We = j.typography.fontFamily;
243
+ return /* @__PURE__ */ p(c, {
244
+ ref: ke,
241
245
  sx: {
242
246
  display: "inline-flex",
243
247
  position: "relative",
244
- opacity: j ? .5 : 1,
245
- cursor: j ? "not-allowed" : "default",
248
+ opacity: A ? .5 : 1,
249
+ cursor: A ? "not-allowed" : "default",
246
250
  userSelect: "none"
247
251
  },
248
252
  children: [
249
- E && L.length > 1 && /* @__PURE__ */ d(c, {
253
+ D && I.length > 1 && /* @__PURE__ */ f(c, {
250
254
  sx: {
251
255
  position: "absolute",
252
256
  top: 4,
@@ -258,7 +262,7 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
258
262
  pointerEvents: "none",
259
263
  zIndex: 1
260
264
  },
261
- children: /* @__PURE__ */ d(u, {
265
+ children: /* @__PURE__ */ f(u, {
262
266
  variant: "caption",
263
267
  sx: {
264
268
  bgcolor: "action.hover",
@@ -268,50 +272,57 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
268
272
  color: "text.secondary",
269
273
  fontSize: "0.7rem"
270
274
  },
271
- children: L.map((e) => e.name).join(" › ")
275
+ children: I.map((e) => e.name).join(" › ")
272
276
  })
273
277
  }),
274
- /* @__PURE__ */ d(c, {
275
- ref: ke,
278
+ /* @__PURE__ */ f(c, {
279
+ ref: Ae,
276
280
  sx: {
277
281
  position: "absolute",
278
- left: Pe.left,
279
- top: Pe.top,
282
+ left: Fe.left,
283
+ top: Fe.top,
280
284
  width: 0,
281
285
  height: 0
282
286
  }
283
287
  }),
284
- /* @__PURE__ */ d("svg", {
288
+ /* @__PURE__ */ f("svg", {
285
289
  width: l,
286
290
  height: l,
287
- viewBox: Se,
288
- onWheel: Ce,
291
+ viewBox: we,
292
+ onWheel: Te,
289
293
  style: {
290
- fontFamily: Ue ?? "sans-serif",
291
- overflow: T && Z > 1 ? "hidden" : "visible"
294
+ fontFamily: We ?? "sans-serif",
295
+ overflow: E && X > 1 ? "hidden" : "visible"
292
296
  },
293
297
  role: "img",
294
298
  "aria-label": s.name,
295
- children: /* @__PURE__ */ f("g", {
296
- ref: ye,
299
+ children: /* @__PURE__ */ p("g", {
300
+ ref: Se,
297
301
  children: [
298
- /* @__PURE__ */ d("g", {
302
+ ge && /* @__PURE__ */ f("text", {
303
+ textAnchor: "middle",
304
+ dy: "0.35em",
305
+ fontSize: 13,
306
+ fill: Ve,
307
+ children: M.noData
308
+ }),
309
+ /* @__PURE__ */ f("g", {
299
310
  fill: "none",
300
- stroke: Ve,
301
- strokeOpacity: S,
302
- strokeWidth: C,
303
- children: he.map((e, t) => /* @__PURE__ */ d("path", { d: Y(e) }, `link-${t}`))
311
+ stroke: He,
312
+ strokeOpacity: C,
313
+ strokeWidth: w,
314
+ children: _e.map((e, t) => /* @__PURE__ */ f("path", { d: be(e) }, `link-${t}`))
304
315
  }),
305
- /* @__PURE__ */ d("g", { children: W.map((e, t) => {
306
- let n = F(e), r = I(e), i = ve(e), a = Ee === t, o = e.children ? m.folder : m.person, s = Math.round(n * 1.3);
307
- return /* @__PURE__ */ d(te, {
308
- title: /* @__PURE__ */ f(c, {
316
+ /* @__PURE__ */ f("g", { children: U.map((e, t) => {
317
+ let n = P(e), r = F(e), i = xe(e), a = De === t, o = e.children ? h.folder : h.person, s = Math.round(n * 1.3);
318
+ return /* @__PURE__ */ f(te, {
319
+ title: /* @__PURE__ */ p(c, {
309
320
  sx: {
310
321
  py: .5,
311
322
  minWidth: 160
312
323
  },
313
324
  children: [
314
- /* @__PURE__ */ d(u, {
325
+ /* @__PURE__ */ f(u, {
315
326
  variant: "caption",
316
327
  sx: {
317
328
  fontWeight: "bold",
@@ -320,7 +331,7 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
320
331
  },
321
332
  children: e.data.name
322
333
  }),
323
- e.data.subname && /* @__PURE__ */ d(u, {
334
+ e.data.subname && /* @__PURE__ */ f(u, {
324
335
  variant: "caption",
325
336
  sx: {
326
337
  display: "block",
@@ -328,54 +339,54 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
328
339
  },
329
340
  children: e.data.subname
330
341
  }),
331
- (i.specialValueA != null || i.specialValueB != null || e.children) && /* @__PURE__ */ f(c, {
342
+ (i.specialValueA != null || i.specialValueB != null || e.children) && /* @__PURE__ */ p(c, {
332
343
  sx: {
333
344
  mt: .75,
334
345
  borderTop: "1px solid rgba(255,255,255,0.2)",
335
346
  pt: .75
336
347
  },
337
348
  children: [
338
- i.specialValueA != null && /* @__PURE__ */ f(c, {
349
+ i.specialValueA != null && /* @__PURE__ */ p(c, {
339
350
  sx: {
340
351
  display: "flex",
341
352
  justifyContent: "space-between",
342
353
  gap: 2
343
354
  },
344
- children: [/* @__PURE__ */ d(u, {
355
+ children: [/* @__PURE__ */ f(u, {
345
356
  variant: "caption",
346
357
  sx: { opacity: .6 },
347
- children: N.specialValueA ?? "A"
348
- }), /* @__PURE__ */ d(u, {
358
+ children: M.specialValueA ?? "A"
359
+ }), /* @__PURE__ */ f(u, {
349
360
  variant: "caption",
350
361
  children: String(i.specialValueA)
351
362
  })]
352
363
  }),
353
- i.specialValueB != null && /* @__PURE__ */ f(c, {
364
+ i.specialValueB != null && /* @__PURE__ */ p(c, {
354
365
  sx: {
355
366
  display: "flex",
356
367
  justifyContent: "space-between",
357
368
  gap: 2
358
369
  },
359
- children: [/* @__PURE__ */ d(u, {
370
+ children: [/* @__PURE__ */ f(u, {
360
371
  variant: "caption",
361
372
  sx: { opacity: .6 },
362
- children: N.specialValueB ?? "B"
363
- }), /* @__PURE__ */ d(u, {
373
+ children: M.specialValueB ?? "B"
374
+ }), /* @__PURE__ */ f(u, {
364
375
  variant: "caption",
365
376
  children: String(i.specialValueB)
366
377
  })]
367
378
  }),
368
- e.children && /* @__PURE__ */ f(c, {
379
+ e.children && /* @__PURE__ */ p(c, {
369
380
  sx: {
370
381
  display: "flex",
371
382
  justifyContent: "space-between",
372
383
  gap: 2
373
384
  },
374
- children: [/* @__PURE__ */ d(u, {
385
+ children: [/* @__PURE__ */ f(u, {
375
386
  variant: "caption",
376
387
  sx: { opacity: .6 },
377
388
  children: "Reports"
378
- }), /* @__PURE__ */ d(u, {
389
+ }), /* @__PURE__ */ f(u, {
379
390
  variant: "caption",
380
391
  children: e.children.length
381
392
  })]
@@ -387,33 +398,33 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
387
398
  followCursor: !0,
388
399
  enterDelay: 50,
389
400
  enterNextDelay: 0,
390
- disableHoverListener: j,
401
+ disableHoverListener: A,
391
402
  slotProps: { tooltip: { sx: { maxWidth: 260 } } },
392
- children: /* @__PURE__ */ f("g", {
403
+ children: /* @__PURE__ */ p("g", {
393
404
  "data-idx": t,
394
405
  transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0)`,
395
- onClick: ze,
396
- onDoubleClick: Re,
397
- onMouseEnter: () => !j && De(t),
398
- onMouseLeave: () => De(null),
399
- style: { cursor: j ? "not-allowed" : "pointer" },
406
+ onClick: Be,
407
+ onDoubleClick: ze,
408
+ onMouseEnter: () => !A && Oe(t),
409
+ onMouseLeave: () => Oe(null),
410
+ style: { cursor: A ? "not-allowed" : "pointer" },
400
411
  children: [
401
- /* @__PURE__ */ d("circle", {
412
+ /* @__PURE__ */ f("circle", {
402
413
  r: Math.max(n + 8, 24),
403
414
  fill: "transparent"
404
415
  }),
405
- /* @__PURE__ */ d("circle", {
416
+ /* @__PURE__ */ f("circle", {
406
417
  r: n + 2,
407
418
  fill: r,
408
419
  fillOpacity: .15
409
420
  }),
410
- /* @__PURE__ */ d("circle", {
421
+ /* @__PURE__ */ f("circle", {
411
422
  r: n,
412
423
  fill: r,
413
424
  fillOpacity: a ? .85 : 1,
414
425
  style: { transition: "fill-opacity 0.15s" }
415
426
  }),
416
- _ && /* @__PURE__ */ d(ie, {
427
+ v && /* @__PURE__ */ f(re, {
417
428
  path: o,
418
429
  size: s
419
430
  })
@@ -421,47 +432,47 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
421
432
  })
422
433
  }, `node-${e.data.id}-${t}`);
423
434
  }) }),
424
- q && ((e, t) => /* @__PURE__ */ f("g", {
435
+ K && ((e, t) => /* @__PURE__ */ p("g", {
425
436
  "data-testid": "drill-ghost-layer",
426
437
  opacity: t,
427
438
  pointerEvents: "none",
428
- children: [/* @__PURE__ */ d("g", {
439
+ children: [/* @__PURE__ */ f("g", {
429
440
  fill: "none",
430
- stroke: Ve,
431
- strokeOpacity: S,
432
- strokeWidth: C,
433
- children: e.links().map((e, t) => /* @__PURE__ */ d("path", { d: Y(e) }, `ghost-link-${t}`))
434
- }), /* @__PURE__ */ d("g", { children: e.descendants().map((e, t) => /* @__PURE__ */ f("g", {
441
+ stroke: He,
442
+ strokeOpacity: C,
443
+ strokeWidth: w,
444
+ children: e.links().map((e, t) => /* @__PURE__ */ f("path", { d: be(e) }, `ghost-link-${t}`))
445
+ }), /* @__PURE__ */ f("g", { children: e.descendants().map((e, t) => /* @__PURE__ */ p("g", {
435
446
  transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0)`,
436
447
  children: [
437
- /* @__PURE__ */ d("circle", {
438
- r: F(e) + 2,
439
- fill: I(e),
448
+ /* @__PURE__ */ f("circle", {
449
+ r: P(e) + 2,
450
+ fill: F(e),
440
451
  fillOpacity: .15
441
452
  }),
442
- /* @__PURE__ */ d("circle", {
443
- r: F(e),
444
- fill: I(e)
453
+ /* @__PURE__ */ f("circle", {
454
+ r: P(e),
455
+ fill: F(e)
445
456
  }),
446
- _ && /* @__PURE__ */ d(ie, {
447
- path: e.children ? m.folder : m.person,
448
- size: Math.round(F(e) * 1.3)
457
+ v && /* @__PURE__ */ f(re, {
458
+ path: e.children ? h.folder : h.person,
459
+ size: Math.round(P(e) * 1.3)
449
460
  })
450
461
  ]
451
462
  }, `ghost-node-${t}`)) })]
452
- }))(q, ge),
453
- g && /* @__PURE__ */ d("g", { children: W.map((e, t) => {
454
- let n = F(e), r = e.x < Math.PI == !e.children, i = n + 6, a = r ? i : -i, o = r ? "start" : "end";
455
- return /* @__PURE__ */ d("text", {
463
+ }))(K, ve),
464
+ _ && /* @__PURE__ */ f("g", { children: U.map((e, t) => {
465
+ let n = P(e), r = e.x < Math.PI == !e.children, i = n + 6, a = r ? i : -i, o = r ? "start" : "end";
466
+ return /* @__PURE__ */ f("text", {
456
467
  transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0) rotate(${e.x >= Math.PI ? 180 : 0})`,
457
468
  dy: "0.35em",
458
469
  x: a,
459
470
  textAnchor: o,
460
471
  paintOrder: "stroke",
461
- stroke: He,
472
+ stroke: Ue,
462
473
  strokeWidth: 3,
463
- fill: Be,
464
- fontSize: se,
474
+ fill: Ve,
475
+ fontSize: oe,
465
476
  fontWeight: e.depth === 0 ? "bold" : "normal",
466
477
  pointerEvents: "none",
467
478
  children: e.data.name
@@ -470,10 +481,10 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
470
481
  ]
471
482
  })
472
483
  }),
473
- k && /* @__PURE__ */ d(ee, {
474
- open: Ae,
475
- anchorEl: Me,
476
- onClose: () => je(!1),
484
+ le && /* @__PURE__ */ f(ee, {
485
+ open: je,
486
+ anchorEl: Ne,
487
+ onClose: () => Me(!1),
477
488
  anchorOrigin: {
478
489
  vertical: "top",
479
490
  horizontal: "right"
@@ -483,15 +494,15 @@ function h({ data: s, size: l = 600, autoFit: re = !0, sortBy: h = "name", showL
483
494
  horizontal: "left"
484
495
  },
485
496
  slotProps: { paper: { elevation: 4 } },
486
- children: $ && (A ? A($) : /* @__PURE__ */ d(ae, {
497
+ children: $ && (ue ? ue($) : /* @__PURE__ */ f(ie, {
487
498
  info: $,
488
- labelA: N.specialValueA ?? "Value A",
489
- labelB: N.specialValueB ?? "Value B"
499
+ labelA: M.specialValueA ?? "Value A",
500
+ labelB: M.specialValueB ?? "Value B"
490
501
  }))
491
502
  })
492
503
  ]
493
504
  });
494
505
  }
495
- h.displayName = "RadialTreeChart";
506
+ g.displayName = "RadialTreeChart";
496
507
  //#endregion
497
- export { h as RadialTreeChart };
508
+ export { g as RadialTreeChart };