@thebuoyant-tsdev/mui-ts-library 3.26.1 → 3.27.1
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 +17 -0
- package/README.md +17 -0
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.js +138 -128
- package/dist/components/chord-chart/ChordChart.types.d.ts +4 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.js +142 -142
- package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +2 -0
- package/dist/components/gantt-chart/GanttChart.js +125 -125
- package/dist/components/gantt-chart/GanttTaskPanel.js +2 -0
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.d.ts +1 -1
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +131 -125
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.d.ts +2 -0
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.d.ts +1 -1
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +60 -50
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.types.d.ts +2 -0
- package/dist/components/radial-tree-chart/RadialTreeChart.d.ts +1 -1
- package/dist/components/radial-tree-chart/RadialTreeChart.js +115 -111
- package/dist/components/radial-tree-chart/RadialTreeChart.types.d.ts +2 -0
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.js +120 -106
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +2 -0
- package/dist/index.cjs +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,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 g({ path: e, size: t }) {
|
|
12
12
|
let n = t / 2;
|
|
13
13
|
return /* @__PURE__ */ f("g", {
|
|
14
14
|
transform: `translate(${-n},${-n})`,
|
|
@@ -25,7 +25,7 @@ function re({ path: e, size: t }) {
|
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function re({ info: e, labelA: t, labelB: n }) {
|
|
29
29
|
return /* @__PURE__ */ p(c, {
|
|
30
30
|
sx: {
|
|
31
31
|
p: 2,
|
|
@@ -89,54 +89,54 @@ function ie({ info: e, labelA: t, labelB: n }) {
|
|
|
89
89
|
] })]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
let
|
|
92
|
+
function _({ data: s, size: l = 600, autoFit: d = !0, sortBy: _ = "name", showLabels: v = !0, showIcons: y = !0, chartColors: b, rootNodeRadius: x = 22, branchNodeRadius: S = 16, leafNodeRadius: C = 11, linkColor: ie, linkStrokeOpacity: ae = 1, linkStrokeWidth: w = 1.5, labelFontSize: oe = 12, labelColor: se, separationSibling: ce = 1, separationCousin: T = 2, zoomable: E = !1, drillable: D = !1, onFocusChange: O, duration: k = 750, showNodePopover: le = !1, renderNodePopoverContent: ue, onNodeClick: de, onNodeHover: A, disabled: j = !1, translation: fe }) {
|
|
93
|
+
let M = ne(), N = {
|
|
94
94
|
...e,
|
|
95
95
|
...fe
|
|
96
96
|
}, pe = [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
],
|
|
104
|
-
b,
|
|
97
|
+
M.palette.primary.main,
|
|
98
|
+
M.palette.secondary.main,
|
|
99
|
+
M.palette.info.main,
|
|
100
|
+
M.palette.success.main,
|
|
101
|
+
M.palette.warning.main,
|
|
102
|
+
M.palette.error.main
|
|
103
|
+
], P = b && b.length > 0 ? b : pe, F = t((e) => e.depth === 0 ? x : e.children ? S : C, [
|
|
105
104
|
x,
|
|
106
|
-
S
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
S,
|
|
106
|
+
C
|
|
107
|
+
]), I = t((e) => e.data.colorConfig?.fill ?? P[e.depth % P.length], [P]), [L, R] = o([s]), z = L[L.length - 1], [me, he] = o(s), [B, V] = o(!1);
|
|
108
|
+
me !== s && (he(s), R([s]), V(!0));
|
|
109
|
+
let ge = !s.children?.length && !s.value, H = Math.max(1, l / 2 - 70), U = i(() => {
|
|
110
|
+
let e = m.hierarchy(z);
|
|
111
|
+
return _ === "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, H]).separation((e, t) => (e.parent === t.parent ? ce : T) * 1.4 / Math.max(1, e.depth))(e);
|
|
112
112
|
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]), _e =
|
|
113
|
+
z,
|
|
114
|
+
_,
|
|
115
|
+
H,
|
|
116
|
+
ce,
|
|
117
|
+
T
|
|
118
|
+
]), _e = U.links(), W = U.descendants(), G = a(U), K = a(null), [ve, q] = o(null), [ye, be] = o(0);
|
|
119
119
|
n(() => {
|
|
120
|
-
let e =
|
|
121
|
-
if (
|
|
122
|
-
if (
|
|
123
|
-
|
|
120
|
+
let e = G.current;
|
|
121
|
+
if (G.current = U, e === U) return;
|
|
122
|
+
if (K.current != null && (cancelAnimationFrame(K.current), K.current = null), B || k <= 0) {
|
|
123
|
+
V(!1), q(null);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
q(e),
|
|
126
|
+
q(e), be(1);
|
|
127
127
|
let t = performance.now(), n = (e) => {
|
|
128
128
|
let r = Math.min(1, (e - t) / k);
|
|
129
|
-
|
|
129
|
+
be(1 - m.easeCubic(r)), r < 1 ? K.current = requestAnimationFrame(n) : (K.current = null, q(null));
|
|
130
130
|
};
|
|
131
|
-
return
|
|
132
|
-
|
|
131
|
+
return K.current = requestAnimationFrame(n), () => {
|
|
132
|
+
K.current != null && cancelAnimationFrame(K.current);
|
|
133
133
|
};
|
|
134
134
|
}, [
|
|
135
|
-
|
|
135
|
+
U,
|
|
136
136
|
k,
|
|
137
|
-
|
|
137
|
+
B
|
|
138
138
|
]);
|
|
139
|
-
let
|
|
139
|
+
let xe = i(() => m.linkRadial().angle((e) => e.x).radius((e) => e.y), []), Se = t((e) => ({
|
|
140
140
|
id: e.data.id,
|
|
141
141
|
name: e.data.name,
|
|
142
142
|
subname: e.data.subname ?? null,
|
|
@@ -147,13 +147,13 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "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
|
-
}), []),
|
|
150
|
+
}), []), Ce = a(null), [J, Y] = o(`-${l / 2} -${l / 2} ${l} ${l}`), [X, we] = o(1);
|
|
151
151
|
r(() => {
|
|
152
152
|
if (!d) {
|
|
153
153
|
Y(`-${l / 2} -${l / 2} ${l} ${l}`);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
let e =
|
|
156
|
+
let e = Ce.current;
|
|
157
157
|
if (!e) return;
|
|
158
158
|
let t = requestAnimationFrame(() => {
|
|
159
159
|
try {
|
|
@@ -166,20 +166,20 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
166
166
|
return () => cancelAnimationFrame(t);
|
|
167
167
|
}, [
|
|
168
168
|
l,
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
U,
|
|
170
|
+
v,
|
|
171
171
|
d
|
|
172
172
|
]);
|
|
173
|
-
let
|
|
173
|
+
let Te = i(() => {
|
|
174
174
|
if (X === 1) return J;
|
|
175
175
|
let [e, t, n, r] = J.split(" ").map(Number), i = n / X, a = r / X;
|
|
176
176
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
177
|
-
}, [J, X]),
|
|
178
|
-
if (!E ||
|
|
177
|
+
}, [J, X]), Ee = t((e) => {
|
|
178
|
+
if (!E || j || !e.ctrlKey) return;
|
|
179
179
|
e.preventDefault();
|
|
180
180
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
181
|
-
|
|
182
|
-
}, [E,
|
|
181
|
+
we((e) => Math.max(.25, Math.min(8, e * t)));
|
|
182
|
+
}, [E, j]), Z = a(null), De = (e) => {
|
|
183
183
|
Z.current &&= (clearTimeout(Z.current), null), Z.current = setTimeout(() => {
|
|
184
184
|
e(), Z.current = null;
|
|
185
185
|
}, 250);
|
|
@@ -189,7 +189,7 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
189
189
|
n(() => () => Q(), []), r(() => {
|
|
190
190
|
if (!E && !D) return;
|
|
191
191
|
let e = (e) => {
|
|
192
|
-
e.key === "Escape" && (E &&
|
|
192
|
+
e.key === "Escape" && (E && we(1), D && (Q(), R([s]), O?.(null)));
|
|
193
193
|
};
|
|
194
194
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
195
195
|
}, [
|
|
@@ -198,11 +198,11 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
198
198
|
s,
|
|
199
199
|
O
|
|
200
200
|
]);
|
|
201
|
-
let [
|
|
201
|
+
let [Oe, ke] = o(null), Ae = a(null), je = a(null), [Me, Ne] = o(!1), [Pe, Fe] = o(null), [Ie, Le] = o({
|
|
202
202
|
left: 0,
|
|
203
203
|
top: 0
|
|
204
|
-
}), [$,
|
|
205
|
-
|
|
204
|
+
}), [$, Re] = o(null), ze = t(() => {
|
|
205
|
+
R((e) => {
|
|
206
206
|
if (e.length <= 1) return e;
|
|
207
207
|
let t = e.slice(0, -1);
|
|
208
208
|
return O?.(t.length <= 1 ? null : {
|
|
@@ -218,39 +218,39 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
218
218
|
data: t[t.length - 1]
|
|
219
219
|
}), t;
|
|
220
220
|
});
|
|
221
|
-
}, [O]),
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
if (
|
|
225
|
-
let t =
|
|
221
|
+
}, [O]), Be = (e) => {
|
|
222
|
+
j || !D || (e.ctrlKey || e.metaKey) && (Q(), ze());
|
|
223
|
+
}, Ve = (e) => {
|
|
224
|
+
if (j) return;
|
|
225
|
+
let t = W[Number(e.currentTarget.getAttribute("data-idx"))];
|
|
226
226
|
if (!t) return;
|
|
227
|
-
let n =
|
|
227
|
+
let n = Se(t);
|
|
228
228
|
if ((e.ctrlKey || e.metaKey) && D && t.children) {
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
De(() => {
|
|
230
|
+
R((e) => [...e, t.data]), O?.(n);
|
|
231
231
|
});
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
if (le) {
|
|
235
|
-
let t =
|
|
236
|
-
|
|
235
|
+
let t = Ae.current?.getBoundingClientRect();
|
|
236
|
+
Le({
|
|
237
237
|
left: t ? e.clientX - t.left : e.clientX,
|
|
238
238
|
top: t ? e.clientY - t.top : e.clientY
|
|
239
|
-
}),
|
|
239
|
+
}), Fe(je.current), Re(n), Ne(!0);
|
|
240
240
|
}
|
|
241
241
|
de?.(n, e);
|
|
242
|
-
},
|
|
242
|
+
}, He = se || M.palette.text.primary, Ue = ie || M.palette.text.secondary, We = M.palette.background.paper, Ge = M.typography.fontFamily;
|
|
243
243
|
return /* @__PURE__ */ p(c, {
|
|
244
|
-
ref:
|
|
244
|
+
ref: Ae,
|
|
245
245
|
sx: {
|
|
246
246
|
display: "inline-flex",
|
|
247
247
|
position: "relative",
|
|
248
|
-
opacity:
|
|
249
|
-
cursor:
|
|
248
|
+
opacity: j ? .5 : 1,
|
|
249
|
+
cursor: j ? "not-allowed" : "default",
|
|
250
250
|
userSelect: "none"
|
|
251
251
|
},
|
|
252
252
|
children: [
|
|
253
|
-
D &&
|
|
253
|
+
D && L.length > 1 && /* @__PURE__ */ f(c, {
|
|
254
254
|
sx: {
|
|
255
255
|
position: "absolute",
|
|
256
256
|
top: 4,
|
|
@@ -272,15 +272,15 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
272
272
|
color: "text.secondary",
|
|
273
273
|
fontSize: "0.7rem"
|
|
274
274
|
},
|
|
275
|
-
children:
|
|
275
|
+
children: L.map((e) => e.name).join(" › ")
|
|
276
276
|
})
|
|
277
277
|
}),
|
|
278
278
|
/* @__PURE__ */ f(c, {
|
|
279
|
-
ref:
|
|
279
|
+
ref: je,
|
|
280
280
|
sx: {
|
|
281
281
|
position: "absolute",
|
|
282
|
-
left:
|
|
283
|
-
top:
|
|
282
|
+
left: Ie.left,
|
|
283
|
+
top: Ie.top,
|
|
284
284
|
width: 0,
|
|
285
285
|
height: 0
|
|
286
286
|
}
|
|
@@ -288,33 +288,33 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
288
288
|
/* @__PURE__ */ f("svg", {
|
|
289
289
|
width: l,
|
|
290
290
|
height: l,
|
|
291
|
-
viewBox:
|
|
292
|
-
onWheel:
|
|
291
|
+
viewBox: Te,
|
|
292
|
+
onWheel: Ee,
|
|
293
293
|
style: {
|
|
294
|
-
fontFamily:
|
|
294
|
+
fontFamily: Ge ?? "sans-serif",
|
|
295
295
|
overflow: E && X > 1 ? "hidden" : "visible"
|
|
296
296
|
},
|
|
297
297
|
role: "img",
|
|
298
298
|
"aria-label": s.name,
|
|
299
299
|
children: /* @__PURE__ */ p("g", {
|
|
300
|
-
ref:
|
|
300
|
+
ref: Ce,
|
|
301
301
|
children: [
|
|
302
302
|
ge && /* @__PURE__ */ f("text", {
|
|
303
303
|
textAnchor: "middle",
|
|
304
304
|
dy: "0.35em",
|
|
305
305
|
fontSize: 13,
|
|
306
|
-
fill:
|
|
307
|
-
children:
|
|
306
|
+
fill: He,
|
|
307
|
+
children: N.noData
|
|
308
308
|
}),
|
|
309
309
|
/* @__PURE__ */ f("g", {
|
|
310
310
|
fill: "none",
|
|
311
|
-
stroke:
|
|
312
|
-
strokeOpacity:
|
|
311
|
+
stroke: Ue,
|
|
312
|
+
strokeOpacity: ae,
|
|
313
313
|
strokeWidth: w,
|
|
314
|
-
children: _e.map((e, t) => /* @__PURE__ */ f("path", { d:
|
|
314
|
+
children: _e.map((e, t) => /* @__PURE__ */ f("path", { d: xe(e) }, `link-${t}`))
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */ f("g", { children:
|
|
317
|
-
let n =
|
|
316
|
+
/* @__PURE__ */ f("g", { children: W.map((e, t) => {
|
|
317
|
+
let n = F(e), r = I(e), i = Se(e), a = Oe === t, o = e.children ? h.folder : h.person, s = Math.round(n * 1.3);
|
|
318
318
|
return /* @__PURE__ */ f(te, {
|
|
319
319
|
title: /* @__PURE__ */ p(c, {
|
|
320
320
|
sx: {
|
|
@@ -355,7 +355,7 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
355
355
|
children: [/* @__PURE__ */ f(u, {
|
|
356
356
|
variant: "caption",
|
|
357
357
|
sx: { opacity: .6 },
|
|
358
|
-
children:
|
|
358
|
+
children: N.specialValueA ?? "A"
|
|
359
359
|
}), /* @__PURE__ */ f(u, {
|
|
360
360
|
variant: "caption",
|
|
361
361
|
children: String(i.specialValueA)
|
|
@@ -370,7 +370,7 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
370
370
|
children: [/* @__PURE__ */ f(u, {
|
|
371
371
|
variant: "caption",
|
|
372
372
|
sx: { opacity: .6 },
|
|
373
|
-
children:
|
|
373
|
+
children: N.specialValueB ?? "B"
|
|
374
374
|
}), /* @__PURE__ */ f(u, {
|
|
375
375
|
variant: "caption",
|
|
376
376
|
children: String(i.specialValueB)
|
|
@@ -398,16 +398,20 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
398
398
|
followCursor: !0,
|
|
399
399
|
enterDelay: 50,
|
|
400
400
|
enterNextDelay: 0,
|
|
401
|
-
disableHoverListener:
|
|
401
|
+
disableHoverListener: j,
|
|
402
402
|
slotProps: { tooltip: { sx: { maxWidth: 260 } } },
|
|
403
403
|
children: /* @__PURE__ */ p("g", {
|
|
404
404
|
"data-idx": t,
|
|
405
405
|
transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0)`,
|
|
406
|
-
onClick:
|
|
407
|
-
onDoubleClick:
|
|
408
|
-
onMouseEnter: () =>
|
|
409
|
-
|
|
410
|
-
|
|
406
|
+
onClick: Ve,
|
|
407
|
+
onDoubleClick: Be,
|
|
408
|
+
onMouseEnter: (e) => {
|
|
409
|
+
j || (ke(t), A?.(i, e));
|
|
410
|
+
},
|
|
411
|
+
onMouseLeave: (e) => {
|
|
412
|
+
ke(null), A?.(null, e);
|
|
413
|
+
},
|
|
414
|
+
style: { cursor: j ? "not-allowed" : "pointer" },
|
|
411
415
|
children: [
|
|
412
416
|
/* @__PURE__ */ f("circle", {
|
|
413
417
|
r: Math.max(n + 8, 24),
|
|
@@ -424,7 +428,7 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
424
428
|
fillOpacity: a ? .85 : 1,
|
|
425
429
|
style: { transition: "fill-opacity 0.15s" }
|
|
426
430
|
}),
|
|
427
|
-
|
|
431
|
+
y && /* @__PURE__ */ f(g, {
|
|
428
432
|
path: o,
|
|
429
433
|
size: s
|
|
430
434
|
})
|
|
@@ -432,46 +436,46 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
432
436
|
})
|
|
433
437
|
}, `node-${e.data.id}-${t}`);
|
|
434
438
|
}) }),
|
|
435
|
-
|
|
439
|
+
ve && ((e, t) => /* @__PURE__ */ p("g", {
|
|
436
440
|
"data-testid": "drill-ghost-layer",
|
|
437
441
|
opacity: t,
|
|
438
442
|
pointerEvents: "none",
|
|
439
443
|
children: [/* @__PURE__ */ f("g", {
|
|
440
444
|
fill: "none",
|
|
441
|
-
stroke:
|
|
442
|
-
strokeOpacity:
|
|
445
|
+
stroke: Ue,
|
|
446
|
+
strokeOpacity: ae,
|
|
443
447
|
strokeWidth: w,
|
|
444
|
-
children: e.links().map((e, t) => /* @__PURE__ */ f("path", { d:
|
|
448
|
+
children: e.links().map((e, t) => /* @__PURE__ */ f("path", { d: xe(e) }, `ghost-link-${t}`))
|
|
445
449
|
}), /* @__PURE__ */ f("g", { children: e.descendants().map((e, t) => /* @__PURE__ */ p("g", {
|
|
446
450
|
transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0)`,
|
|
447
451
|
children: [
|
|
448
452
|
/* @__PURE__ */ f("circle", {
|
|
449
|
-
r:
|
|
450
|
-
fill:
|
|
453
|
+
r: F(e) + 2,
|
|
454
|
+
fill: I(e),
|
|
451
455
|
fillOpacity: .15
|
|
452
456
|
}),
|
|
453
457
|
/* @__PURE__ */ f("circle", {
|
|
454
|
-
r:
|
|
455
|
-
fill:
|
|
458
|
+
r: F(e),
|
|
459
|
+
fill: I(e)
|
|
456
460
|
}),
|
|
457
|
-
|
|
461
|
+
y && /* @__PURE__ */ f(g, {
|
|
458
462
|
path: e.children ? h.folder : h.person,
|
|
459
|
-
size: Math.round(
|
|
463
|
+
size: Math.round(F(e) * 1.3)
|
|
460
464
|
})
|
|
461
465
|
]
|
|
462
466
|
}, `ghost-node-${t}`)) })]
|
|
463
|
-
}))(
|
|
464
|
-
|
|
465
|
-
let n =
|
|
467
|
+
}))(ve, ye),
|
|
468
|
+
v && /* @__PURE__ */ f("g", { children: W.map((e, t) => {
|
|
469
|
+
let n = F(e), r = e.x < Math.PI == !e.children, i = n + 6, a = r ? i : -i, o = r ? "start" : "end";
|
|
466
470
|
return /* @__PURE__ */ f("text", {
|
|
467
471
|
transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0) rotate(${e.x >= Math.PI ? 180 : 0})`,
|
|
468
472
|
dy: "0.35em",
|
|
469
473
|
x: a,
|
|
470
474
|
textAnchor: o,
|
|
471
475
|
paintOrder: "stroke",
|
|
472
|
-
stroke:
|
|
476
|
+
stroke: We,
|
|
473
477
|
strokeWidth: 3,
|
|
474
|
-
fill:
|
|
478
|
+
fill: He,
|
|
475
479
|
fontSize: oe,
|
|
476
480
|
fontWeight: e.depth === 0 ? "bold" : "normal",
|
|
477
481
|
pointerEvents: "none",
|
|
@@ -482,9 +486,9 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
482
486
|
})
|
|
483
487
|
}),
|
|
484
488
|
le && /* @__PURE__ */ f(ee, {
|
|
485
|
-
open:
|
|
486
|
-
anchorEl:
|
|
487
|
-
onClose: () =>
|
|
489
|
+
open: Me,
|
|
490
|
+
anchorEl: Pe,
|
|
491
|
+
onClose: () => Ne(!1),
|
|
488
492
|
anchorOrigin: {
|
|
489
493
|
vertical: "top",
|
|
490
494
|
horizontal: "right"
|
|
@@ -494,15 +498,15 @@ function g({ data: s, size: l = 600, autoFit: d = !0, sortBy: g = "name", showLa
|
|
|
494
498
|
horizontal: "left"
|
|
495
499
|
},
|
|
496
500
|
slotProps: { paper: { elevation: 4 } },
|
|
497
|
-
children: $ && (ue ? ue($) : /* @__PURE__ */ f(
|
|
501
|
+
children: $ && (ue ? ue($) : /* @__PURE__ */ f(re, {
|
|
498
502
|
info: $,
|
|
499
|
-
labelA:
|
|
500
|
-
labelB:
|
|
503
|
+
labelA: N.specialValueA ?? "Value A",
|
|
504
|
+
labelB: N.specialValueB ?? "Value B"
|
|
501
505
|
}))
|
|
502
506
|
})
|
|
503
507
|
]
|
|
504
508
|
});
|
|
505
509
|
}
|
|
506
|
-
|
|
510
|
+
_.displayName = "RadialTreeChart";
|
|
507
511
|
//#endregion
|
|
508
|
-
export {
|
|
512
|
+
export { _ as RadialTreeChart };
|
|
@@ -81,6 +81,8 @@ export type RadialTreeChartProps = {
|
|
|
81
81
|
renderNodePopoverContent?: (info: RadialTreeNodeInfo) => React.ReactNode;
|
|
82
82
|
/** Fired on every node click */
|
|
83
83
|
onNodeClick?: (info: RadialTreeNodeInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
84
|
+
/** Fired on mouse enter/leave a node — `null` on leave. Use for linked-view highlighting. */
|
|
85
|
+
onNodeHover?: (info: RadialTreeNodeInfo | null, event: React.MouseEvent<SVGGElement> | null) => void;
|
|
84
86
|
/** Enable Ctrl+Scroll zoom — Ctrl+Wheel zooms in/out, Escape resets (default: false) */
|
|
85
87
|
zoomable?: boolean;
|
|
86
88
|
/** Enable Ctrl+Click drill-down into subtrees, Ctrl+DblClick zoom out (default: false) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SunburstChartProps } from "./SunburstChart.types";
|
|
2
|
-
export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, zoomable, duration, disabled, translation, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onSegmentHover, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, zoomable, duration, disabled, translation, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace SunburstChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|