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