@thebuoyant-tsdev/mui-ts-library 3.29.1 → 3.30.0

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