@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,90 +89,90 @@ function ie({ info: e, labelA: t, labelB: n }) {
|
|
|
89
89
|
] })]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function _({ data: s, orientation: l = "LR", width: d = 800, height: _ = 500, levelSpacing: v = 200, nodeRadius: y = 10, sortBy: ie = "name", showLabels: ae = !0, labelFontSize: oe = 12, labelColor: se, showIcons: b = !0, chartColors: x, linkStrokeOpacity: S = 1, linkStrokeWidth: C = 1.5, linkColor: ce, zoomable: w = !1, drillable: T = !1, onFocusChange: E, showNodePopover: le = !1, renderNodePopoverContent: ue, onNodeClick: de, onNodeHover: fe, duration: D = 750, disabled: O = !1, translation: pe }) {
|
|
93
93
|
let k = ne(), A = {
|
|
94
94
|
...e,
|
|
95
|
-
...
|
|
96
|
-
},
|
|
95
|
+
...pe
|
|
96
|
+
}, me = [
|
|
97
97
|
k.palette.primary.main,
|
|
98
98
|
k.palette.secondary.main,
|
|
99
99
|
k.palette.error.main,
|
|
100
100
|
k.palette.warning.main,
|
|
101
101
|
k.palette.success.main,
|
|
102
102
|
k.palette.info.main
|
|
103
|
-
], j =
|
|
104
|
-
|
|
105
|
-
let
|
|
106
|
-
let e = m.hierarchy(
|
|
107
|
-
|
|
103
|
+
], j = x && x.length > 0 ? x : me, M = se || k.palette.text.primary, N = ce || k.palette.text.secondary, he = k.palette.background.paper, ge = k.typography.fontFamily, _e = !s.children?.length && !s.value, P = l === "TB" || l === "BT", F = P ? _ : d, I = P ? d : _, [L, R] = o([s]), z = L[L.length - 1], [ve, ye] = o(s), [B, V] = o(!1);
|
|
104
|
+
ve !== s && (ye(s), R([s]), V(!0));
|
|
105
|
+
let H = i(() => {
|
|
106
|
+
let e = m.hierarchy(z);
|
|
107
|
+
ie === "value" ? (e.sum((e) => e.value ?? 0), e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0))) : e.sort((e, t) => m.ascending(String(e.data.name), String(t.data.name)));
|
|
108
108
|
let t = m.max(e.descendants(), (e) => e.depth) ?? 1;
|
|
109
|
-
return m.tree().size([
|
|
109
|
+
return m.tree().size([F * .8, Math.min(t * v, I * .85)])(e);
|
|
110
110
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
]),
|
|
117
|
-
let e = m.max(m.hierarchy(
|
|
118
|
-
return Math.min(e *
|
|
111
|
+
z,
|
|
112
|
+
ie,
|
|
113
|
+
F,
|
|
114
|
+
I,
|
|
115
|
+
v
|
|
116
|
+
]), U = i(() => {
|
|
117
|
+
let e = m.max(m.hierarchy(z).descendants(), (e) => e.depth) ?? 1;
|
|
118
|
+
return Math.min(e * v, I * .85);
|
|
119
119
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
]),
|
|
120
|
+
z,
|
|
121
|
+
v,
|
|
122
|
+
I
|
|
123
|
+
]), be = H.descendants(), xe = H.links(), Se = a(H), W = a(null), [Ce, G] = o(null), [we, Te] = o(0);
|
|
124
124
|
n(() => {
|
|
125
|
-
let e =
|
|
126
|
-
if (
|
|
127
|
-
if (
|
|
128
|
-
|
|
125
|
+
let e = Se.current;
|
|
126
|
+
if (Se.current = H, e === H) return;
|
|
127
|
+
if (W.current != null && (cancelAnimationFrame(W.current), W.current = null), B || D <= 0) {
|
|
128
|
+
V(!1), G(null);
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
G(e),
|
|
131
|
+
G(e), Te(1);
|
|
132
132
|
let t = performance.now(), n = (e) => {
|
|
133
133
|
let r = Math.min(1, (e - t) / D);
|
|
134
|
-
|
|
134
|
+
Te(1 - m.easeCubic(r)), r < 1 ? W.current = requestAnimationFrame(n) : (W.current = null, G(null));
|
|
135
135
|
};
|
|
136
|
-
return
|
|
137
|
-
|
|
136
|
+
return W.current = requestAnimationFrame(n), () => {
|
|
137
|
+
W.current != null && cancelAnimationFrame(W.current);
|
|
138
138
|
};
|
|
139
139
|
}, [
|
|
140
|
-
|
|
140
|
+
H,
|
|
141
141
|
D,
|
|
142
|
-
|
|
142
|
+
B
|
|
143
143
|
]);
|
|
144
|
-
let
|
|
144
|
+
let K = t((e) => e.data.colorConfig?.fill ?? j[e.depth % j.length], [j]), q = t((e) => {
|
|
145
145
|
switch (l) {
|
|
146
146
|
case "LR": return {
|
|
147
147
|
x: e.y,
|
|
148
|
-
y: e.x -
|
|
148
|
+
y: e.x - F * .4
|
|
149
149
|
};
|
|
150
150
|
case "RL": return {
|
|
151
|
-
x:
|
|
152
|
-
y: e.x -
|
|
151
|
+
x: U - e.y,
|
|
152
|
+
y: e.x - F * .4
|
|
153
153
|
};
|
|
154
154
|
case "TB": return {
|
|
155
|
-
x: e.x -
|
|
155
|
+
x: e.x - F * .4,
|
|
156
156
|
y: e.y
|
|
157
157
|
};
|
|
158
158
|
case "BT": return {
|
|
159
|
-
x: e.x -
|
|
160
|
-
y:
|
|
159
|
+
x: e.x - F * .4,
|
|
160
|
+
y: U - e.y
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
}, [
|
|
164
164
|
l,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
]),
|
|
168
|
-
let t =
|
|
165
|
+
F,
|
|
166
|
+
U
|
|
167
|
+
]), Ee = t((e) => {
|
|
168
|
+
let t = q(e.source), n = q(e.target);
|
|
169
169
|
if (l === "LR" || l === "RL") {
|
|
170
170
|
let e = (t.x + n.x) / 2;
|
|
171
171
|
return `M${t.x},${t.y} C${e},${t.y} ${e},${n.y} ${n.x},${n.y}`;
|
|
172
172
|
}
|
|
173
173
|
let r = (t.y + n.y) / 2;
|
|
174
174
|
return `M${t.x},${t.y} C${t.x},${r} ${n.x},${r} ${n.x},${n.y}`;
|
|
175
|
-
}, [
|
|
175
|
+
}, [q, l]), J = t((e) => ({
|
|
176
176
|
id: e.data.id ?? null,
|
|
177
177
|
name: e.data.name,
|
|
178
178
|
subname: e.data.subname ?? null,
|
|
@@ -183,35 +183,35 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
183
183
|
path: e.ancestors().map((e) => e.data.name).reverse(),
|
|
184
184
|
childrenCount: e.children?.length ?? 0,
|
|
185
185
|
data: e.data
|
|
186
|
-
}), []), [Y,
|
|
186
|
+
}), []), [Y, De] = o(`0 -${_ / 2} ${d} ${_}`), [X, Oe] = o(1), ke = a(null), Ae = i(() => {
|
|
187
187
|
if (X === 1) return Y;
|
|
188
188
|
let [e, t, n, r] = Y.split(" ").map(Number), i = n / X, a = r / X;
|
|
189
189
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
190
190
|
}, [Y, X]);
|
|
191
191
|
r(() => {
|
|
192
|
-
let e =
|
|
192
|
+
let e = ke.current;
|
|
193
193
|
if (!e) return;
|
|
194
194
|
let t = requestAnimationFrame(() => {
|
|
195
195
|
try {
|
|
196
196
|
let t = e.getBBox();
|
|
197
|
-
|
|
197
|
+
De(`${t.x - 24} ${t.y - 24} ${t.width + 48} ${t.height + 48}`);
|
|
198
198
|
} catch {
|
|
199
|
-
|
|
199
|
+
De(`0 -${_ / 2} ${d} ${_}`);
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
return () => cancelAnimationFrame(t);
|
|
203
203
|
}, [
|
|
204
|
-
|
|
204
|
+
H,
|
|
205
205
|
d,
|
|
206
|
-
|
|
206
|
+
_,
|
|
207
207
|
l
|
|
208
208
|
]);
|
|
209
|
-
let
|
|
210
|
-
if (!
|
|
209
|
+
let je = t((e) => {
|
|
210
|
+
if (!w || O || !e.ctrlKey) return;
|
|
211
211
|
e.preventDefault();
|
|
212
212
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
213
|
-
|
|
214
|
-
}, [
|
|
213
|
+
Oe((e) => Math.max(.25, Math.min(8, e * t)));
|
|
214
|
+
}, [w, O]), Z = a(null), Me = (e) => {
|
|
215
215
|
Z.current &&= (clearTimeout(Z.current), null), Z.current = setTimeout(() => {
|
|
216
216
|
e(), Z.current = null;
|
|
217
217
|
}, 250);
|
|
@@ -219,11 +219,11 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
219
219
|
Z.current &&= (clearTimeout(Z.current), null);
|
|
220
220
|
};
|
|
221
221
|
n(() => () => Q(), []);
|
|
222
|
-
let
|
|
223
|
-
|
|
222
|
+
let Ne = t(() => {
|
|
223
|
+
R((e) => {
|
|
224
224
|
if (e.length <= 1) return e;
|
|
225
225
|
let t = e.slice(0, -1);
|
|
226
|
-
return
|
|
226
|
+
return E?.({
|
|
227
227
|
focusedNode: {
|
|
228
228
|
id: t[t.length - 1].id ?? null,
|
|
229
229
|
name: t[t.length - 1].name,
|
|
@@ -239,11 +239,11 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
239
239
|
isRoot: t.length <= 1
|
|
240
240
|
}), t;
|
|
241
241
|
});
|
|
242
|
-
}, [
|
|
242
|
+
}, [E]);
|
|
243
243
|
r(() => {
|
|
244
|
-
if (!
|
|
244
|
+
if (!w && !T) return;
|
|
245
245
|
let e = (e) => {
|
|
246
|
-
e.key === "Escape" && (
|
|
246
|
+
e.key === "Escape" && (w && Oe(1), T && (Q(), R([s]), E?.({
|
|
247
247
|
focusedNode: {
|
|
248
248
|
id: s.id ?? null,
|
|
249
249
|
name: s.name,
|
|
@@ -261,49 +261,49 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
261
261
|
};
|
|
262
262
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
263
263
|
}, [
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
w,
|
|
265
|
+
T,
|
|
266
266
|
s,
|
|
267
|
-
|
|
267
|
+
E
|
|
268
268
|
]);
|
|
269
|
-
let
|
|
269
|
+
let Pe = a(null), Fe = a(null), [Ie, Le] = o(!1), [Re, ze] = o(null), [Be, Ve] = o({
|
|
270
270
|
left: 0,
|
|
271
271
|
top: 0
|
|
272
|
-
}), [$,
|
|
272
|
+
}), [$, He] = o(null), Ue = (e, t) => {
|
|
273
273
|
if (O) return;
|
|
274
|
-
let n =
|
|
275
|
-
if ((t.ctrlKey || t.metaKey) &&
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
let n = J(e);
|
|
275
|
+
if ((t.ctrlKey || t.metaKey) && T && e.children) {
|
|
276
|
+
Me(() => {
|
|
277
|
+
R((t) => [...t, e.data]), E?.({
|
|
278
278
|
focusedNode: n,
|
|
279
279
|
isRoot: !1
|
|
280
280
|
});
|
|
281
281
|
});
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
if ((t.ctrlKey || t.metaKey) &&
|
|
285
|
-
Q(),
|
|
284
|
+
if ((t.ctrlKey || t.metaKey) && T) {
|
|
285
|
+
Q(), Ne();
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
|
-
if (
|
|
289
|
-
let e =
|
|
290
|
-
|
|
288
|
+
if (le) {
|
|
289
|
+
let e = Pe.current?.getBoundingClientRect();
|
|
290
|
+
Ve({
|
|
291
291
|
left: e ? t.clientX - e.left : t.clientX,
|
|
292
292
|
top: e ? t.clientY - e.top : t.clientY
|
|
293
|
-
}),
|
|
293
|
+
}), ze(Fe.current), He(n), Le(!0);
|
|
294
294
|
}
|
|
295
295
|
de?.(n, t);
|
|
296
|
-
},
|
|
297
|
-
O || !
|
|
298
|
-
},
|
|
296
|
+
}, We = (e, t) => {
|
|
297
|
+
O || !T || (t.ctrlKey || t.metaKey) && (Q(), Ne());
|
|
298
|
+
}, Ge = {
|
|
299
299
|
followCursor: !0,
|
|
300
300
|
enterDelay: 50,
|
|
301
301
|
enterNextDelay: 0,
|
|
302
302
|
disableHoverListener: O,
|
|
303
303
|
slotProps: { tooltip: { sx: { maxWidth: 240 } } }
|
|
304
|
-
},
|
|
304
|
+
}, Ke = Math.round(y * 1.3);
|
|
305
305
|
return /* @__PURE__ */ p(c, {
|
|
306
|
-
ref:
|
|
306
|
+
ref: Pe,
|
|
307
307
|
sx: {
|
|
308
308
|
display: "inline-flex",
|
|
309
309
|
position: "relative",
|
|
@@ -313,16 +313,16 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
313
313
|
},
|
|
314
314
|
children: [
|
|
315
315
|
/* @__PURE__ */ f(c, {
|
|
316
|
-
ref:
|
|
316
|
+
ref: Fe,
|
|
317
317
|
sx: {
|
|
318
318
|
position: "absolute",
|
|
319
|
-
left:
|
|
320
|
-
top:
|
|
319
|
+
left: Be.left,
|
|
320
|
+
top: Be.top,
|
|
321
321
|
width: 0,
|
|
322
322
|
height: 0
|
|
323
323
|
}
|
|
324
324
|
}),
|
|
325
|
-
|
|
325
|
+
T && L.length > 1 && /* @__PURE__ */ f(c, {
|
|
326
326
|
sx: {
|
|
327
327
|
position: "absolute",
|
|
328
328
|
top: 4,
|
|
@@ -343,22 +343,22 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
343
343
|
color: "text.secondary",
|
|
344
344
|
fontSize: "0.7rem"
|
|
345
345
|
},
|
|
346
|
-
children:
|
|
346
|
+
children: L.map((e) => e.name).join(" › ")
|
|
347
347
|
})
|
|
348
348
|
}),
|
|
349
349
|
/* @__PURE__ */ f("svg", {
|
|
350
350
|
width: d,
|
|
351
|
-
height:
|
|
352
|
-
viewBox:
|
|
353
|
-
onWheel:
|
|
351
|
+
height: _,
|
|
352
|
+
viewBox: Ae,
|
|
353
|
+
onWheel: je,
|
|
354
354
|
style: {
|
|
355
355
|
fontFamily: ge ?? "sans-serif",
|
|
356
|
-
overflow:
|
|
356
|
+
overflow: w && X > 1 ? "hidden" : "visible"
|
|
357
357
|
},
|
|
358
358
|
role: "img",
|
|
359
359
|
"aria-label": s.name,
|
|
360
360
|
children: /* @__PURE__ */ p("g", {
|
|
361
|
-
ref:
|
|
361
|
+
ref: ke,
|
|
362
362
|
children: [
|
|
363
363
|
_e && /* @__PURE__ */ f("text", {
|
|
364
364
|
textAnchor: "middle",
|
|
@@ -369,13 +369,13 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
369
369
|
}),
|
|
370
370
|
/* @__PURE__ */ f("g", {
|
|
371
371
|
fill: "none",
|
|
372
|
-
stroke:
|
|
373
|
-
strokeOpacity:
|
|
374
|
-
strokeWidth:
|
|
375
|
-
children:
|
|
372
|
+
stroke: N,
|
|
373
|
+
strokeOpacity: S,
|
|
374
|
+
strokeWidth: C,
|
|
375
|
+
children: xe.map((e, t) => /* @__PURE__ */ f("path", { d: Ee(e) }, `link-${t}`))
|
|
376
376
|
}),
|
|
377
|
-
|
|
378
|
-
let n =
|
|
377
|
+
be.map((e, t) => {
|
|
378
|
+
let n = q(e), r = K(e), i = J(e), a = e.children ? h.folder : h.person, o = l === "LR", s = l === "RL", ee = o ? y + 6 : s ? -(y + 6) : 0, ne = !o && !s ? l === "TB" ? y + 16 : -(y + 6) : 0, d = o ? "start" : s ? "end" : "middle", m = /* @__PURE__ */ p(c, {
|
|
379
379
|
sx: {
|
|
380
380
|
py: .5,
|
|
381
381
|
minWidth: 140
|
|
@@ -455,30 +455,36 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
455
455
|
]
|
|
456
456
|
});
|
|
457
457
|
return /* @__PURE__ */ f(te, {
|
|
458
|
-
...
|
|
458
|
+
...Ge,
|
|
459
459
|
title: m,
|
|
460
460
|
children: /* @__PURE__ */ p("g", {
|
|
461
461
|
transform: `translate(${n.x},${n.y})`,
|
|
462
|
-
onClick: (t) =>
|
|
463
|
-
onDoubleClick: (t) =>
|
|
462
|
+
onClick: (t) => Ue(e, t),
|
|
463
|
+
onDoubleClick: (t) => We(e, t),
|
|
464
|
+
onMouseEnter: (t) => {
|
|
465
|
+
O || fe?.(J(e), t);
|
|
466
|
+
},
|
|
467
|
+
onMouseLeave: (e) => {
|
|
468
|
+
fe?.(null, e);
|
|
469
|
+
},
|
|
464
470
|
style: { cursor: O ? "not-allowed" : "pointer" },
|
|
465
471
|
children: [
|
|
466
472
|
/* @__PURE__ */ f("circle", {
|
|
467
|
-
r:
|
|
473
|
+
r: y + 8,
|
|
468
474
|
fill: "transparent"
|
|
469
475
|
}),
|
|
470
476
|
/* @__PURE__ */ f("circle", {
|
|
471
|
-
r:
|
|
477
|
+
r: y + 2,
|
|
472
478
|
fill: r,
|
|
473
479
|
fillOpacity: .15
|
|
474
480
|
}),
|
|
475
481
|
/* @__PURE__ */ f("circle", {
|
|
476
|
-
r:
|
|
482
|
+
r: y,
|
|
477
483
|
fill: r
|
|
478
484
|
}),
|
|
479
|
-
|
|
485
|
+
b && /* @__PURE__ */ f(g, {
|
|
480
486
|
path: a,
|
|
481
|
-
size:
|
|
487
|
+
size: Ke
|
|
482
488
|
}),
|
|
483
489
|
ae && /* @__PURE__ */ f("text", {
|
|
484
490
|
x: ee,
|
|
@@ -498,45 +504,45 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
498
504
|
})
|
|
499
505
|
}, `node-${t}`);
|
|
500
506
|
}),
|
|
501
|
-
|
|
507
|
+
Ce && ((e, t) => /* @__PURE__ */ p("g", {
|
|
502
508
|
"data-testid": "drill-ghost-layer",
|
|
503
509
|
opacity: t,
|
|
504
510
|
pointerEvents: "none",
|
|
505
511
|
children: [/* @__PURE__ */ f("g", {
|
|
506
512
|
fill: "none",
|
|
507
|
-
stroke:
|
|
508
|
-
strokeOpacity:
|
|
509
|
-
strokeWidth:
|
|
510
|
-
children: e.links().map((e, t) => /* @__PURE__ */ f("path", { d:
|
|
513
|
+
stroke: N,
|
|
514
|
+
strokeOpacity: S,
|
|
515
|
+
strokeWidth: C,
|
|
516
|
+
children: e.links().map((e, t) => /* @__PURE__ */ f("path", { d: Ee(e) }, `ghost-link-${t}`))
|
|
511
517
|
}), /* @__PURE__ */ f("g", { children: e.descendants().map((e, t) => {
|
|
512
|
-
let n =
|
|
518
|
+
let n = q(e);
|
|
513
519
|
return /* @__PURE__ */ p("g", {
|
|
514
520
|
transform: `translate(${n.x},${n.y})`,
|
|
515
521
|
children: [
|
|
516
522
|
/* @__PURE__ */ f("circle", {
|
|
517
|
-
r:
|
|
518
|
-
fill:
|
|
523
|
+
r: y + 2,
|
|
524
|
+
fill: K(e),
|
|
519
525
|
fillOpacity: .15
|
|
520
526
|
}),
|
|
521
527
|
/* @__PURE__ */ f("circle", {
|
|
522
|
-
r:
|
|
523
|
-
fill:
|
|
528
|
+
r: y,
|
|
529
|
+
fill: K(e)
|
|
524
530
|
}),
|
|
525
|
-
|
|
531
|
+
b && /* @__PURE__ */ f(g, {
|
|
526
532
|
path: e.children ? h.folder : h.person,
|
|
527
|
-
size:
|
|
533
|
+
size: Ke
|
|
528
534
|
})
|
|
529
535
|
]
|
|
530
536
|
}, `ghost-node-${t}`);
|
|
531
537
|
}) })]
|
|
532
|
-
}))(
|
|
538
|
+
}))(Ce, we)
|
|
533
539
|
]
|
|
534
540
|
})
|
|
535
541
|
}),
|
|
536
|
-
|
|
537
|
-
open:
|
|
538
|
-
anchorEl:
|
|
539
|
-
onClose: () =>
|
|
542
|
+
le && /* @__PURE__ */ f(ee, {
|
|
543
|
+
open: Ie,
|
|
544
|
+
anchorEl: Re,
|
|
545
|
+
onClose: () => Le(!1),
|
|
540
546
|
anchorOrigin: {
|
|
541
547
|
vertical: "top",
|
|
542
548
|
horizontal: "right"
|
|
@@ -546,7 +552,7 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
546
552
|
horizontal: "left"
|
|
547
553
|
},
|
|
548
554
|
slotProps: { paper: { elevation: 4 } },
|
|
549
|
-
children: $ && (
|
|
555
|
+
children: $ && (ue ? ue($) : /* @__PURE__ */ f(re, {
|
|
550
556
|
info: $,
|
|
551
557
|
labelA: A.specialValueA ?? "Value A",
|
|
552
558
|
labelB: A.specialValueB ?? "Value B"
|
|
@@ -555,6 +561,6 @@ function g({ data: s, orientation: l = "LR", width: d = 800, height: g = 500, le
|
|
|
555
561
|
]
|
|
556
562
|
});
|
|
557
563
|
}
|
|
558
|
-
|
|
564
|
+
_.displayName = "HorizontalTreeChart";
|
|
559
565
|
//#endregion
|
|
560
|
-
export {
|
|
566
|
+
export { _ as HorizontalTreeChart };
|
|
@@ -88,6 +88,8 @@ export type HorizontalTreeChartProps = {
|
|
|
88
88
|
renderNodePopoverContent?: (info: HorizontalTreeNodeInfo) => React.ReactNode;
|
|
89
89
|
/** Fires on every node click */
|
|
90
90
|
onNodeClick?: (info: HorizontalTreeNodeInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
91
|
+
/** Fired on mouse enter/leave a node — `null` on leave. Use for linked-view highlighting. */
|
|
92
|
+
onNodeHover?: (info: HorizontalTreeNodeInfo | null, event: React.MouseEvent<SVGGElement> | null) => void;
|
|
91
93
|
/** Drill-down/out crossfade duration in ms — set to 0 to disable (default: 750) */
|
|
92
94
|
duration?: number;
|
|
93
95
|
/** Disables all interactions (default: false) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RadialStackedBarChartProps } from "./RadialStackedBarChart.types";
|
|
2
|
-
export declare function RadialStackedBarChart({ data, keys, size, innerRadius, barPadding, chartColors, colorConfig, showLabels, showGridLines, gridLineCount, showGridValues, showLegend, sortBy, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, gridValueFormatter, zoomable, onBarClick, disabled, translation, }: RadialStackedBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function RadialStackedBarChart({ data, keys, size, innerRadius, barPadding, chartColors, colorConfig, showLabels, showGridLines, gridLineCount, showGridValues, showLegend, sortBy, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, gridValueFormatter, zoomable, onBarClick, onBarHover, disabled, translation, }: RadialStackedBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace RadialStackedBarChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|