@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,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_CIRCLE_PACKING_TRANSLATION as e } from "./CirclePackingChart.types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Box as t, Tooltip as n, Typography as r, useTheme as i } from "@mui/material";
|
|
3
|
+
import { useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
4
4
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import * as p from "d3";
|
|
6
6
|
//#region src/components/circle-packing-chart/CirclePackingChart.tsx
|
|
@@ -8,18 +8,18 @@ var m = .56;
|
|
|
8
8
|
function ee(e, t, n) {
|
|
9
9
|
return e.length * n * m <= t ? e : t >= 3 * n * m + n * 2 ? "…" : "";
|
|
10
10
|
}
|
|
11
|
-
function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLabels: v = !0, showAllLabels: y = !1, labelFontSize: te = 13, innerLabelFontSize: b = 9, labelColor: ne, chartColors: x, depthColorStart: S, depthColorEnd: C, background:
|
|
12
|
-
let
|
|
11
|
+
function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLabels: v = !0, showAllLabels: y = !1, labelFontSize: te = 13, innerLabelFontSize: b = 9, labelColor: ne, chartColors: x, depthColorStart: S, depthColorEnd: C, background: w, duration: T = 750, zoomable: E = !1, disabled: D = !1, onCircleClick: re, onCircleHover: O, onZoomChange: k, valueFormatter: A, translation: ie }) {
|
|
12
|
+
let j = i(), ae = {
|
|
13
13
|
...e,
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
],
|
|
14
|
+
...ie
|
|
15
|
+
}, oe = !m.children?.length && !m.value, se = [
|
|
16
|
+
j.palette.primary.main,
|
|
17
|
+
j.palette.secondary.main,
|
|
18
|
+
j.palette.error.main,
|
|
19
|
+
j.palette.warning.main,
|
|
20
|
+
j.palette.success.main,
|
|
21
|
+
j.palette.info.main
|
|
22
|
+
], M = ne || j.palette.text.primary, N = w || j.palette.background.default, ce = j.typography.fontFamily, P = c(() => {
|
|
23
23
|
let e = p.hierarchy(m).sum((e) => e.value ?? 0);
|
|
24
24
|
return _ === "value" ? e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0)) : e.sort((e, t) => String(e.data.name).localeCompare(String(t.data.name), void 0, {
|
|
25
25
|
numeric: !0,
|
|
@@ -30,36 +30,36 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
30
30
|
h,
|
|
31
31
|
g,
|
|
32
32
|
_
|
|
33
|
-
]),
|
|
34
|
-
|
|
33
|
+
]), F = P.descendants(), I = c(() => p.max(F, (e) => e.depth) ?? 0, [F]), L = !!(S && C), R = c(() => L ? p.scaleSequential(p.interpolateHcl(S, C)).domain([0, Math.max(1, I)]) : null, [
|
|
34
|
+
L,
|
|
35
35
|
S,
|
|
36
36
|
C,
|
|
37
|
-
|
|
38
|
-
]),
|
|
39
|
-
I,
|
|
37
|
+
I
|
|
38
|
+
]), z = x && x.length > 0 ? x : se, le = a((e) => e.data.colorConfig?.fill ? e.data.colorConfig.fill : L && R ? e.children ? R(e.depth) : j.palette.background.paper : z[e.depth % z.length], [
|
|
40
39
|
L,
|
|
41
40
|
R,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
z,
|
|
42
|
+
j
|
|
43
|
+
]), [B, V] = u(1), H = a((e) => {
|
|
44
|
+
if (!E || D || !e.ctrlKey) return;
|
|
45
45
|
e.preventDefault();
|
|
46
46
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
if (!
|
|
47
|
+
V((e) => Math.max(.25, Math.min(8, e * t)));
|
|
48
|
+
}, [E, D]);
|
|
49
|
+
s(() => {
|
|
50
|
+
if (!E) return;
|
|
51
51
|
let e = (e) => {
|
|
52
|
-
e.key === "Escape" &&
|
|
52
|
+
e.key === "Escape" && V(1);
|
|
53
53
|
};
|
|
54
54
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
55
|
-
}, [
|
|
56
|
-
let
|
|
55
|
+
}, [E]);
|
|
56
|
+
let U = c(() => {
|
|
57
57
|
let e = `${-h / 2} ${-h / 2} ${h} ${h}`;
|
|
58
|
-
if (
|
|
59
|
-
let t = h /
|
|
58
|
+
if (B === 1) return e;
|
|
59
|
+
let t = h / B, n = (h - t) / 2;
|
|
60
60
|
return `${-h / 2 + n} ${-h / 2 + n} ${t} ${t}`;
|
|
61
|
-
}, [h,
|
|
62
|
-
let t = e.value ?? 0, n =
|
|
61
|
+
}, [h, B]), ue = a((e) => {
|
|
62
|
+
let t = e.value ?? 0, n = P.value ?? 0;
|
|
63
63
|
return {
|
|
64
64
|
id: e.data.id ?? null,
|
|
65
65
|
name: e.data.name,
|
|
@@ -70,38 +70,38 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
70
70
|
childrenCount: e.children?.length ?? 0,
|
|
71
71
|
data: e.data
|
|
72
72
|
};
|
|
73
|
-
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]),
|
|
78
|
-
|
|
79
|
-
}, []), [
|
|
80
|
-
|
|
81
|
-
let Y =
|
|
82
|
-
let t =
|
|
73
|
+
}, [P]), W = l(null), G = l([
|
|
74
|
+
P.x,
|
|
75
|
+
P.y,
|
|
76
|
+
P.r * 2
|
|
77
|
+
]), K = l(P), [q, de] = u(P), J = a((e) => {
|
|
78
|
+
K.current = e, de(e);
|
|
79
|
+
}, []), [fe, pe] = u(P);
|
|
80
|
+
fe !== P && (pe(P), J(P), K.current = P);
|
|
81
|
+
let Y = a((e) => {
|
|
82
|
+
let t = W.current;
|
|
83
83
|
if (!t) return;
|
|
84
|
-
|
|
85
|
-
let n = h / e[2], r =
|
|
86
|
-
for (let t = 0; t <
|
|
87
|
-
let r =
|
|
84
|
+
G.current = e;
|
|
85
|
+
let n = h / e[2], r = K.current, i = t.querySelectorAll("g[data-role='nodes'] > g"), a = t.querySelectorAll("g[data-role='nodes'] > g > circle");
|
|
86
|
+
for (let t = 0; t < F.length; t++) {
|
|
87
|
+
let r = F[t], o = i[t];
|
|
88
88
|
o && o.setAttribute("transform", `translate(${(r.x - e[0]) * n},${(r.y - e[1]) * n})`);
|
|
89
89
|
let s = t - 1;
|
|
90
90
|
s >= 0 && a[s] && a[s].setAttribute("r", String(r.r * n));
|
|
91
91
|
}
|
|
92
92
|
if (v) {
|
|
93
93
|
let r = t.querySelectorAll("g[data-role='labels'] > text");
|
|
94
|
-
for (let t = 0; t <
|
|
95
|
-
let i =
|
|
94
|
+
for (let t = 0; t < F.length; t++) {
|
|
95
|
+
let i = F[t], a = r[t];
|
|
96
96
|
a && (a.setAttribute("transform", `translate(${(i.x - e[0]) * n},${(i.y - e[1]) * n})`), a.setAttribute("font-weight", i.children ? "bold" : "normal"));
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
if (y) {
|
|
100
100
|
let i = t.querySelectorAll("g[data-role='inner-labels'] > text");
|
|
101
|
-
for (let t = 0; t <
|
|
102
|
-
let a =
|
|
101
|
+
for (let t = 0; t < F.length; t++) {
|
|
102
|
+
let a = F[t], o = i[t];
|
|
103
103
|
if (!o) continue;
|
|
104
|
-
let s = a.r * n, c = s * 1.6, l = r ===
|
|
104
|
+
let s = a.r * n, c = s * 1.6, l = r === P ? a !== P : a.ancestors().includes(r), u = a.parent === r;
|
|
105
105
|
if (l && !u && s >= 14) {
|
|
106
106
|
let t = ee(a.data.name, c, b);
|
|
107
107
|
t ? (o.textContent = t, o.setAttribute("transform", `translate(${(a.x - e[0]) * n},${(a.y - e[1]) * n})`), o.setAttribute("font-weight", a.children ? "bold" : "normal"), o.style.display = "inline") : o.style.display = "none";
|
|
@@ -109,127 +109,127 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}, [
|
|
112
|
-
|
|
112
|
+
F,
|
|
113
113
|
h,
|
|
114
114
|
v,
|
|
115
115
|
y,
|
|
116
116
|
b,
|
|
117
|
-
|
|
117
|
+
P
|
|
118
118
|
]);
|
|
119
|
-
|
|
119
|
+
s(() => {
|
|
120
120
|
Y([
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
q.x,
|
|
122
|
+
q.y,
|
|
123
|
+
q.r * 2
|
|
124
124
|
]);
|
|
125
125
|
}, [
|
|
126
|
-
|
|
126
|
+
P,
|
|
127
127
|
h,
|
|
128
|
-
|
|
128
|
+
q,
|
|
129
129
|
Y
|
|
130
130
|
]);
|
|
131
|
-
let X =
|
|
132
|
-
let n =
|
|
131
|
+
let X = a((e, t) => {
|
|
132
|
+
let n = W.current;
|
|
133
133
|
if (!n) return;
|
|
134
|
-
let r =
|
|
134
|
+
let r = q, i = G.current, a = [
|
|
135
135
|
e.x,
|
|
136
136
|
e.y,
|
|
137
137
|
e.r * 2
|
|
138
138
|
];
|
|
139
|
-
|
|
139
|
+
J(e), p.select(n).transition().duration(t).ease(p.easeCubic).tween("zoom", () => {
|
|
140
140
|
let e = p.interpolateZoom(i, a);
|
|
141
141
|
return (t) => Y(e(t));
|
|
142
142
|
});
|
|
143
143
|
let o = n.querySelectorAll("g[data-role='labels'] > text");
|
|
144
|
-
p.selectAll(o).transition().duration(t).ease(p.easeCubic).style("fill-opacity", (t, n) => +(
|
|
145
|
-
|
|
144
|
+
p.selectAll(o).transition().duration(t).ease(p.easeCubic).style("fill-opacity", (t, n) => +(F[n].parent === e)).on("start", function(t, n) {
|
|
145
|
+
F[n].parent === e && (this.style.display = "inline");
|
|
146
146
|
}).on("end", function(t, n) {
|
|
147
|
-
|
|
148
|
-
}),
|
|
147
|
+
F[n].parent !== e && (this.style.display = "none");
|
|
148
|
+
}), k?.({
|
|
149
149
|
previousName: r.data.name,
|
|
150
150
|
currentName: e.data.name,
|
|
151
151
|
currentDepth: e.depth,
|
|
152
|
-
isRoot: e ===
|
|
152
|
+
isRoot: e === P
|
|
153
153
|
});
|
|
154
154
|
}, [
|
|
155
|
-
|
|
155
|
+
q,
|
|
156
|
+
F,
|
|
156
157
|
P,
|
|
157
|
-
N,
|
|
158
158
|
Y,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]), Z =
|
|
159
|
+
k,
|
|
160
|
+
J
|
|
161
|
+
]), Z = l(null), me = (e) => {
|
|
162
162
|
Z.current &&= (clearTimeout(Z.current), null), Z.current = setTimeout(() => {
|
|
163
163
|
e(), Z.current = null;
|
|
164
164
|
}, 250);
|
|
165
165
|
}, Q = () => {
|
|
166
166
|
Z.current &&= (clearTimeout(Z.current), null);
|
|
167
|
-
}, $ =
|
|
168
|
-
|
|
167
|
+
}, $ = l(X);
|
|
168
|
+
o(() => {
|
|
169
169
|
$.current = X;
|
|
170
|
-
}, [X]),
|
|
171
|
-
if (
|
|
170
|
+
}, [X]), s(() => {
|
|
171
|
+
if (D) return;
|
|
172
172
|
let e = (e) => {
|
|
173
|
-
e.key === "Escape" && (Q(), $.current(
|
|
173
|
+
e.key === "Escape" && (Q(), $.current(P, T));
|
|
174
174
|
};
|
|
175
175
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
176
176
|
}, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
D,
|
|
178
|
+
P,
|
|
179
|
+
T
|
|
180
180
|
]);
|
|
181
181
|
let he = (e) => {
|
|
182
|
-
if (
|
|
182
|
+
if (D || !(e.ctrlKey || e.metaKey)) return;
|
|
183
183
|
Q(), e.preventDefault();
|
|
184
|
-
let t =
|
|
185
|
-
t !==
|
|
184
|
+
let t = q.parent ?? P;
|
|
185
|
+
t !== q && X(t, e.altKey ? Math.max(250, T * 10) : T);
|
|
186
186
|
}, ge = {
|
|
187
187
|
followCursor: !0,
|
|
188
188
|
enterDelay: 50,
|
|
189
189
|
enterNextDelay: 0,
|
|
190
|
-
disableHoverListener:
|
|
190
|
+
disableHoverListener: D,
|
|
191
191
|
slotProps: { tooltip: { sx: { maxWidth: 220 } } }
|
|
192
192
|
};
|
|
193
|
-
return /* @__PURE__ */ f(
|
|
193
|
+
return /* @__PURE__ */ f(t, {
|
|
194
194
|
sx: {
|
|
195
195
|
display: "inline-flex",
|
|
196
196
|
position: "relative",
|
|
197
|
-
opacity:
|
|
198
|
-
cursor:
|
|
197
|
+
opacity: D ? .5 : 1,
|
|
198
|
+
cursor: D ? "not-allowed" : "default",
|
|
199
199
|
userSelect: "none"
|
|
200
200
|
},
|
|
201
201
|
children: [/* @__PURE__ */ f("svg", {
|
|
202
|
-
ref:
|
|
202
|
+
ref: W,
|
|
203
203
|
width: h,
|
|
204
204
|
height: h,
|
|
205
|
-
viewBox:
|
|
206
|
-
onWheel:
|
|
205
|
+
viewBox: U,
|
|
206
|
+
onWheel: H,
|
|
207
207
|
style: {
|
|
208
208
|
display: "block",
|
|
209
|
-
background:
|
|
210
|
-
fontFamily:
|
|
211
|
-
overflow:
|
|
209
|
+
background: N,
|
|
210
|
+
fontFamily: ce ?? "sans-serif",
|
|
211
|
+
overflow: E && B > 1 ? "hidden" : "visible"
|
|
212
212
|
},
|
|
213
213
|
role: "img",
|
|
214
214
|
"aria-label": m.name,
|
|
215
215
|
onDoubleClick: he,
|
|
216
216
|
children: [
|
|
217
|
-
|
|
217
|
+
oe && /* @__PURE__ */ d("text", {
|
|
218
218
|
textAnchor: "middle",
|
|
219
219
|
dy: "0.35em",
|
|
220
220
|
fontSize: 13,
|
|
221
|
-
fill:
|
|
222
|
-
children:
|
|
221
|
+
fill: j.palette.text.secondary,
|
|
222
|
+
children: ae.noData
|
|
223
223
|
}),
|
|
224
224
|
/* @__PURE__ */ d("g", {
|
|
225
225
|
"data-role": "nodes",
|
|
226
|
-
children:
|
|
227
|
-
let
|
|
226
|
+
children: F.map((e, i) => {
|
|
227
|
+
let a = ue(e), o = /* @__PURE__ */ f(t, {
|
|
228
228
|
sx: {
|
|
229
229
|
py: .5,
|
|
230
230
|
minWidth: 160
|
|
231
231
|
},
|
|
232
|
-
children: [/* @__PURE__ */ d(
|
|
232
|
+
children: [/* @__PURE__ */ d(r, {
|
|
233
233
|
variant: "caption",
|
|
234
234
|
sx: {
|
|
235
235
|
fontWeight: "bold",
|
|
@@ -237,54 +237,54 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
237
237
|
fontSize: "0.8rem"
|
|
238
238
|
},
|
|
239
239
|
children: e.data.name
|
|
240
|
-
}), (e.value ?? 0) > 0 && /* @__PURE__ */ f(
|
|
240
|
+
}), (e.value ?? 0) > 0 && /* @__PURE__ */ f(t, {
|
|
241
241
|
sx: {
|
|
242
242
|
mt: .75,
|
|
243
243
|
borderTop: "1px solid rgba(255,255,255,0.2)",
|
|
244
244
|
pt: .75
|
|
245
245
|
},
|
|
246
246
|
children: [
|
|
247
|
-
/* @__PURE__ */ f(
|
|
247
|
+
/* @__PURE__ */ f(t, {
|
|
248
248
|
sx: {
|
|
249
249
|
display: "flex",
|
|
250
250
|
justifyContent: "space-between",
|
|
251
251
|
gap: 2
|
|
252
252
|
},
|
|
253
|
-
children: [/* @__PURE__ */ d(
|
|
253
|
+
children: [/* @__PURE__ */ d(r, {
|
|
254
254
|
variant: "caption",
|
|
255
255
|
sx: { opacity: .6 },
|
|
256
256
|
children: "Value"
|
|
257
|
-
}), /* @__PURE__ */ d(
|
|
257
|
+
}), /* @__PURE__ */ d(r, {
|
|
258
258
|
variant: "caption",
|
|
259
|
-
children:
|
|
259
|
+
children: A ? A(e.value ?? 0) : (e.value ?? 0).toLocaleString()
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */ f(
|
|
262
|
+
/* @__PURE__ */ f(t, {
|
|
263
263
|
sx: {
|
|
264
264
|
display: "flex",
|
|
265
265
|
justifyContent: "space-between",
|
|
266
266
|
gap: 2
|
|
267
267
|
},
|
|
268
|
-
children: [/* @__PURE__ */ d(
|
|
268
|
+
children: [/* @__PURE__ */ d(r, {
|
|
269
269
|
variant: "caption",
|
|
270
270
|
sx: { opacity: .6 },
|
|
271
271
|
children: "Share"
|
|
272
|
-
}), /* @__PURE__ */ f(
|
|
272
|
+
}), /* @__PURE__ */ f(r, {
|
|
273
273
|
variant: "caption",
|
|
274
|
-
children: [
|
|
274
|
+
children: [a.percentage, "%"]
|
|
275
275
|
})]
|
|
276
276
|
}),
|
|
277
|
-
e.children && /* @__PURE__ */ f(
|
|
277
|
+
e.children && /* @__PURE__ */ f(t, {
|
|
278
278
|
sx: {
|
|
279
279
|
display: "flex",
|
|
280
280
|
justifyContent: "space-between",
|
|
281
281
|
gap: 2
|
|
282
282
|
},
|
|
283
|
-
children: [/* @__PURE__ */ d(
|
|
283
|
+
children: [/* @__PURE__ */ d(r, {
|
|
284
284
|
variant: "caption",
|
|
285
285
|
sx: { opacity: .6 },
|
|
286
286
|
children: "Children"
|
|
287
|
-
}), /* @__PURE__ */ d(
|
|
287
|
+
}), /* @__PURE__ */ d(r, {
|
|
288
288
|
variant: "caption",
|
|
289
289
|
children: e.children.length
|
|
290
290
|
})]
|
|
@@ -294,46 +294,46 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
294
294
|
});
|
|
295
295
|
return /* @__PURE__ */ d("g", {
|
|
296
296
|
transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
|
|
297
|
-
children:
|
|
297
|
+
children: i === 0 ? null : /* @__PURE__ */ d(n, {
|
|
298
298
|
...ge,
|
|
299
|
-
title:
|
|
299
|
+
title: o,
|
|
300
300
|
children: /* @__PURE__ */ d("circle", {
|
|
301
301
|
r: e.r,
|
|
302
|
-
fill:
|
|
303
|
-
stroke: e.data.colorConfig?.stroke ??
|
|
302
|
+
fill: le(e),
|
|
303
|
+
stroke: e.data.colorConfig?.stroke ?? j.palette.background.paper,
|
|
304
304
|
strokeWidth: .75,
|
|
305
305
|
style: {
|
|
306
|
-
cursor:
|
|
306
|
+
cursor: D ? "not-allowed" : e.children ? "pointer" : "default",
|
|
307
307
|
transition: "stroke-width 0.1s"
|
|
308
308
|
},
|
|
309
309
|
onMouseEnter: (e) => {
|
|
310
|
-
|
|
310
|
+
D || (e.currentTarget.style.strokeWidth = "2", O?.(a, e));
|
|
311
311
|
},
|
|
312
312
|
onMouseLeave: (e) => {
|
|
313
|
-
e.currentTarget.style.strokeWidth = "0.75",
|
|
313
|
+
e.currentTarget.style.strokeWidth = "0.75", O?.(null, e);
|
|
314
314
|
},
|
|
315
315
|
onClick: (t) => {
|
|
316
|
-
if (!
|
|
316
|
+
if (!D) {
|
|
317
317
|
if (t.ctrlKey || t.metaKey) {
|
|
318
318
|
if (e.children) {
|
|
319
|
-
let n = t.altKey ? Math.max(250,
|
|
319
|
+
let n = t.altKey ? Math.max(250, T * 10) : T;
|
|
320
320
|
me(() => X(e, n));
|
|
321
321
|
}
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
re?.(a, t);
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
onDoubleClick: (e) => {
|
|
328
|
-
if (!
|
|
328
|
+
if (!D && (e.ctrlKey || e.metaKey)) {
|
|
329
329
|
Q(), e.preventDefault(), e.stopPropagation();
|
|
330
|
-
let t =
|
|
331
|
-
t !==
|
|
330
|
+
let t = q.parent ?? P;
|
|
331
|
+
t !== q && X(t, e.altKey ? Math.max(250, T * 10) : T);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
})
|
|
335
335
|
})
|
|
336
|
-
}, `n-${
|
|
336
|
+
}, `n-${i}`);
|
|
337
337
|
})
|
|
338
338
|
}),
|
|
339
339
|
v && /* @__PURE__ */ d("g", {
|
|
@@ -342,12 +342,12 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
342
342
|
dominantBaseline: "middle",
|
|
343
343
|
pointerEvents: "none",
|
|
344
344
|
fontSize: te,
|
|
345
|
-
fill:
|
|
346
|
-
children:
|
|
345
|
+
fill: M,
|
|
346
|
+
children: F.map((e, t) => /* @__PURE__ */ d("text", {
|
|
347
347
|
transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
|
|
348
348
|
style: {
|
|
349
|
-
display: e.parent ===
|
|
350
|
-
fillOpacity: +(e.parent ===
|
|
349
|
+
display: e.parent === P ? "inline" : "none",
|
|
350
|
+
fillOpacity: +(e.parent === P)
|
|
351
351
|
},
|
|
352
352
|
children: e.data.name
|
|
353
353
|
}, `lbl-${t}`))
|
|
@@ -358,14 +358,14 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
358
358
|
dominantBaseline: "middle",
|
|
359
359
|
pointerEvents: "none",
|
|
360
360
|
fontSize: b,
|
|
361
|
-
fill:
|
|
362
|
-
children:
|
|
361
|
+
fill: M,
|
|
362
|
+
children: F.map((e, t) => /* @__PURE__ */ d("text", {
|
|
363
363
|
transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
|
|
364
364
|
style: { display: "none" }
|
|
365
365
|
}, `inner-lbl-${t}`))
|
|
366
366
|
})
|
|
367
367
|
]
|
|
368
|
-
}),
|
|
368
|
+
}), q !== P && !D && /* @__PURE__ */ d(t, {
|
|
369
369
|
sx: {
|
|
370
370
|
position: "absolute",
|
|
371
371
|
bottom: 6,
|
|
@@ -375,7 +375,7 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
375
375
|
justifyContent: "center",
|
|
376
376
|
pointerEvents: "none"
|
|
377
377
|
},
|
|
378
|
-
children: /* @__PURE__ */ f(
|
|
378
|
+
children: /* @__PURE__ */ f(r, {
|
|
379
379
|
variant: "caption",
|
|
380
380
|
sx: {
|
|
381
381
|
bgcolor: "action.hover",
|
|
@@ -385,7 +385,7 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
|
|
|
385
385
|
color: "text.secondary",
|
|
386
386
|
fontSize: "0.7rem"
|
|
387
387
|
},
|
|
388
|
-
children: [
|
|
388
|
+
children: [q.ancestors().map((e) => e.data.name).reverse().join(" › "), " · Ctrl / Cmd ⌘+DblClick to zoom out · Escape to reset"]
|
|
389
389
|
})
|
|
390
390
|
})]
|
|
391
391
|
});
|