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

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