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