@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.
- package/README.de.md +21 -0
- package/README.md +21 -0
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.js +155 -137
- package/dist/components/chord-chart/ChordChart.types.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.js +134 -121
- package/dist/components/gantt-chart/GanttTaskDialog.js +131 -126
- package/dist/components/gantt-chart/hooks/useGanttDrag.js +44 -38
- package/dist/components/gantt-chart/util/gantt-chart.util.d.ts +7 -0
- package/dist/components/gantt-chart/util/gantt-chart.util.js +31 -20
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +222 -206
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.d.ts +1 -1
- package/dist/components/json-editor/JsonEditorContent.js +134 -119
- package/dist/components/json-editor/JsonEditorToolbar.js +3 -3
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +131 -130
- package/dist/components/radial-tree-chart/RadialTreeChart.js +197 -186
- package/dist/components/rich-text-editor/RichTextEditor.js +1 -1
- package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +40 -39
- package/dist/components/shared/useTimedFlag.d.ts +6 -0
- package/dist/components/shared/useTimedFlag.js +14 -0
- package/dist/components/sql-editor/SqlEditorHistoryMenu.js +1 -1
- package/dist/components/sql-editor/useSqlQueryHistory.js +14 -12
- package/dist/components/sql-editor/util/sqlQueryHistory.util.d.ts +1 -0
- package/dist/components/sql-editor/util/sqlQueryHistory.util.js +21 -13
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.js +126 -115
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +7 -5
- package/dist/index.cjs +2 -2
- package/dist/index.js +7 -7
- 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
|
|
5
|
-
import * as
|
|
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
|
|
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
|
|
11
|
+
function re({ path: e, size: t }) {
|
|
12
12
|
let n = t / 2;
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ f("g", {
|
|
14
14
|
transform: `translate(${-n},${-n})`,
|
|
15
15
|
pointerEvents: "none",
|
|
16
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
21
|
+
children: /* @__PURE__ */ f("path", {
|
|
22
22
|
d: e,
|
|
23
23
|
fill: "white"
|
|
24
24
|
})
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
e.specialValueA != null && /* @__PURE__ */
|
|
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__ */
|
|
66
|
+
children: [/* @__PURE__ */ f(u, {
|
|
67
67
|
variant: "caption",
|
|
68
68
|
color: "text.secondary",
|
|
69
69
|
children: t
|
|
70
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ f(u, {
|
|
71
71
|
variant: "caption",
|
|
72
72
|
children: String(e.specialValueA)
|
|
73
73
|
})]
|
|
74
74
|
}),
|
|
75
|
-
e.specialValueB != null && /* @__PURE__ */
|
|
75
|
+
e.specialValueB != null && /* @__PURE__ */ p(c, {
|
|
76
76
|
sx: {
|
|
77
77
|
display: "flex",
|
|
78
78
|
justifyContent: "space-between"
|
|
79
79
|
},
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ f(u, {
|
|
81
81
|
variant: "caption",
|
|
82
82
|
color: "text.secondary",
|
|
83
83
|
children: n
|
|
84
|
-
}), /* @__PURE__ */
|
|
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
|
|
93
|
-
let
|
|
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
|
-
...
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
],
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]),
|
|
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 =
|
|
121
|
-
if (
|
|
122
|
-
if (
|
|
123
|
-
|
|
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
|
-
|
|
126
|
+
q(e), ye(1);
|
|
127
127
|
let t = performance.now(), n = (e) => {
|
|
128
|
-
let r = Math.min(1, (e - t) /
|
|
129
|
-
|
|
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
|
|
132
|
-
|
|
131
|
+
return G.current = requestAnimationFrame(n), () => {
|
|
132
|
+
G.current != null && cancelAnimationFrame(G.current);
|
|
133
133
|
};
|
|
134
134
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
H,
|
|
136
|
+
k,
|
|
137
|
+
z
|
|
138
138
|
]);
|
|
139
|
-
let
|
|
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
|
-
}), []),
|
|
150
|
+
}), []), Se = a(null), [J, Y] = o(`-${l / 2} -${l / 2} ${l} ${l}`), [X, Ce] = o(1);
|
|
151
151
|
r(() => {
|
|
152
|
-
|
|
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
|
-
|
|
161
|
+
Y(`${t.x - 20} ${t.y - 20} ${t.width + 40} ${t.height + 40}`);
|
|
158
162
|
} catch {
|
|
159
|
-
|
|
163
|
+
Y(`-${l / 2} -${l / 2} ${l} ${l}`);
|
|
160
164
|
}
|
|
161
165
|
});
|
|
162
166
|
return () => cancelAnimationFrame(t);
|
|
163
167
|
}, [
|
|
164
168
|
l,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
H,
|
|
170
|
+
_,
|
|
171
|
+
d
|
|
168
172
|
]);
|
|
169
|
-
let
|
|
170
|
-
if (
|
|
171
|
-
let [e, t, n, r] =
|
|
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
|
-
}, [
|
|
174
|
-
if (!
|
|
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
|
-
|
|
178
|
-
}, [
|
|
179
|
-
|
|
180
|
-
|
|
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" && (
|
|
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
|
-
|
|
199
|
+
O
|
|
190
200
|
]);
|
|
191
|
-
let
|
|
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
|
-
}), [$,
|
|
201
|
-
|
|
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
|
|
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
|
-
}, [
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
if (
|
|
221
|
-
let t =
|
|
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 =
|
|
224
|
-
if ((e.ctrlKey || e.metaKey) &&
|
|
225
|
-
|
|
226
|
-
|
|
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 (
|
|
231
|
-
let t =
|
|
232
|
-
|
|
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
|
-
}),
|
|
239
|
+
}), Pe(Ae.current), Le(n), Me(!0);
|
|
236
240
|
}
|
|
237
|
-
|
|
238
|
-
},
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
ref:
|
|
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:
|
|
245
|
-
cursor:
|
|
248
|
+
opacity: A ? .5 : 1,
|
|
249
|
+
cursor: A ? "not-allowed" : "default",
|
|
246
250
|
userSelect: "none"
|
|
247
251
|
},
|
|
248
252
|
children: [
|
|
249
|
-
|
|
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__ */
|
|
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:
|
|
275
|
+
children: I.map((e) => e.name).join(" › ")
|
|
272
276
|
})
|
|
273
277
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
ref:
|
|
278
|
+
/* @__PURE__ */ f(c, {
|
|
279
|
+
ref: Ae,
|
|
276
280
|
sx: {
|
|
277
281
|
position: "absolute",
|
|
278
|
-
left:
|
|
279
|
-
top:
|
|
282
|
+
left: Fe.left,
|
|
283
|
+
top: Fe.top,
|
|
280
284
|
width: 0,
|
|
281
285
|
height: 0
|
|
282
286
|
}
|
|
283
287
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ f("svg", {
|
|
285
289
|
width: l,
|
|
286
290
|
height: l,
|
|
287
|
-
viewBox:
|
|
288
|
-
onWheel:
|
|
291
|
+
viewBox: we,
|
|
292
|
+
onWheel: Te,
|
|
289
293
|
style: {
|
|
290
|
-
fontFamily:
|
|
291
|
-
overflow:
|
|
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__ */
|
|
296
|
-
ref:
|
|
299
|
+
children: /* @__PURE__ */ p("g", {
|
|
300
|
+
ref: Se,
|
|
297
301
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
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:
|
|
301
|
-
strokeOpacity:
|
|
302
|
-
strokeWidth:
|
|
303
|
-
children:
|
|
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__ */
|
|
306
|
-
let n =
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
title: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
355
|
+
children: [/* @__PURE__ */ f(u, {
|
|
345
356
|
variant: "caption",
|
|
346
357
|
sx: { opacity: .6 },
|
|
347
|
-
children:
|
|
348
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
370
|
+
children: [/* @__PURE__ */ f(u, {
|
|
360
371
|
variant: "caption",
|
|
361
372
|
sx: { opacity: .6 },
|
|
362
|
-
children:
|
|
363
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
385
|
+
children: [/* @__PURE__ */ f(u, {
|
|
375
386
|
variant: "caption",
|
|
376
387
|
sx: { opacity: .6 },
|
|
377
388
|
children: "Reports"
|
|
378
|
-
}), /* @__PURE__ */
|
|
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:
|
|
401
|
+
disableHoverListener: A,
|
|
391
402
|
slotProps: { tooltip: { sx: { maxWidth: 260 } } },
|
|
392
|
-
children: /* @__PURE__ */
|
|
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:
|
|
396
|
-
onDoubleClick:
|
|
397
|
-
onMouseEnter: () => !
|
|
398
|
-
onMouseLeave: () =>
|
|
399
|
-
style: { cursor:
|
|
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__ */
|
|
412
|
+
/* @__PURE__ */ f("circle", {
|
|
402
413
|
r: Math.max(n + 8, 24),
|
|
403
414
|
fill: "transparent"
|
|
404
415
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ f("circle", {
|
|
406
417
|
r: n + 2,
|
|
407
418
|
fill: r,
|
|
408
419
|
fillOpacity: .15
|
|
409
420
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
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__ */
|
|
439
|
+
children: [/* @__PURE__ */ f("g", {
|
|
429
440
|
fill: "none",
|
|
430
|
-
stroke:
|
|
431
|
-
strokeOpacity:
|
|
432
|
-
strokeWidth:
|
|
433
|
-
children: e.links().map((e, t) => /* @__PURE__ */
|
|
434
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
438
|
-
r:
|
|
439
|
-
fill:
|
|
448
|
+
/* @__PURE__ */ f("circle", {
|
|
449
|
+
r: P(e) + 2,
|
|
450
|
+
fill: F(e),
|
|
440
451
|
fillOpacity: .15
|
|
441
452
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
r:
|
|
444
|
-
fill:
|
|
453
|
+
/* @__PURE__ */ f("circle", {
|
|
454
|
+
r: P(e),
|
|
455
|
+
fill: F(e)
|
|
445
456
|
}),
|
|
446
|
-
|
|
447
|
-
path: e.children ?
|
|
448
|
-
size: Math.round(
|
|
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
|
-
}))(
|
|
453
|
-
|
|
454
|
-
let n =
|
|
455
|
-
return /* @__PURE__ */
|
|
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:
|
|
472
|
+
stroke: Ue,
|
|
462
473
|
strokeWidth: 3,
|
|
463
|
-
fill:
|
|
464
|
-
fontSize:
|
|
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
|
-
|
|
474
|
-
open:
|
|
475
|
-
anchorEl:
|
|
476
|
-
onClose: () =>
|
|
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: $ && (
|
|
497
|
+
children: $ && (ue ? ue($) : /* @__PURE__ */ f(ie, {
|
|
487
498
|
info: $,
|
|
488
|
-
labelA:
|
|
489
|
-
labelB:
|
|
499
|
+
labelA: M.specialValueA ?? "Value A",
|
|
500
|
+
labelB: M.specialValueB ?? "Value B"
|
|
490
501
|
}))
|
|
491
502
|
})
|
|
492
503
|
]
|
|
493
504
|
});
|
|
494
505
|
}
|
|
495
|
-
|
|
506
|
+
g.displayName = "RadialTreeChart";
|
|
496
507
|
//#endregion
|
|
497
|
-
export {
|
|
508
|
+
export { g as RadialTreeChart };
|