@thebuoyant-tsdev/mui-ts-library 3.20.0 → 3.22.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 +20 -6
- package/README.md +20 -6
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.js +66 -65
- package/dist/components/chord-chart/ChordChart.types.d.ts +7 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.js +128 -128
- package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +7 -0
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.d.ts +1 -1
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +85 -84
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.types.d.ts +8 -0
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.js +41 -40
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +7 -0
- package/dist/components/tag-selection/TagSelection.d.ts +1 -1
- package/dist/components/tag-selection/TagSelection.js +61 -58
- package/dist/components/tag-selection/TagSelection.types.d.ts +6 -0
- package/dist/components/tag-selection/TagSelectionAutocomplete.d.ts +2 -1
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +97 -96
- package/dist/components/tag-selection/TagSelectionChip.d.ts +2 -1
- package/dist/components/tag-selection/TagSelectionChip.js +8 -8
- package/dist/components/tag-selection/TagSelectionSelectedTags.d.ts +2 -1
- package/dist/components/tag-selection/TagSelectionSelectedTags.js +18 -16
- package/dist/index.cjs +2 -2
- package/package.json +1 -1
package/README.de.md
CHANGED
|
@@ -461,20 +461,34 @@ import type {
|
|
|
461
461
|
|
|
462
462
|
## Versionierung & Abwärtskompatibilität
|
|
463
463
|
|
|
464
|
-
Dieses Projekt folgt [Semantic Versioning](https://semver.org/)
|
|
464
|
+
Dieses Projekt folgt [Semantic Versioning](https://semver.org/):
|
|
465
465
|
|
|
466
|
-
- **Patch**
|
|
467
|
-
- **Minor**
|
|
468
|
-
- **Major**
|
|
466
|
+
- **Patch** — nur Bugfixes, jederzeit gefahrlos aktualisierbar.
|
|
467
|
+
- **Minor** — neue Features, vollständig abwärtskompatibel.
|
|
468
|
+
- **Major** — Breaking Changes, explizit im [Changelog](#changelog) gekennzeichnet.
|
|
469
469
|
|
|
470
|
-
**Bisher nur ein Breaking Release:** [`3.0.0`](#300--2026-06-15--breaking-changes) hat `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` entfernt und die Signatur von `TagSelection`s `onTagCreate` geändert. Jedes Release
|
|
470
|
+
**Bisher nur ein Breaking Release:** [`3.0.0`](#300--2026-06-15--breaking-changes) hat `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` entfernt und die Signatur von `TagSelection`s `onTagCreate` geändert. Jedes andere Release war additiv.
|
|
471
471
|
|
|
472
|
-
**TypeScript-Hinweis:** Translation-
|
|
472
|
+
**TypeScript-Hinweis:** Translation-Objekte immer als `Partial<...>` inline übergeben — z.B. `translation={{ noData: 'Keine Daten' }}`. Translation-Typen bekommen mit neuen Features optionale Felder hinzu; `Partial<...>` macht den Code automatisch vorwärtskompatibel.
|
|
473
473
|
|
|
474
474
|
---
|
|
475
475
|
|
|
476
476
|
## Changelog
|
|
477
477
|
|
|
478
|
+
### [3.22.0] — 2026-07-09
|
|
479
|
+
|
|
480
|
+
**Hinzugefügt**
|
|
481
|
+
- `RadialStackedBarChart`, `ChordChart`, `SunburstChart`, `CirclePackingChart`: neue `valueFormatter`-Prop für vollständige Kontrolle über numerische Tooltip-Werte — überschreibt die eingebauten `valueDecimalCount`/Separator-Props wenn gesetzt. `RadialStackedBarChart` erhält zusätzlich ein `seriesKey`-Argument für serienabhängige Formatierung. Siehe [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) für Details.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
### [3.21.0] — 2026-07-09
|
|
486
|
+
|
|
487
|
+
**Hinzugefügt**
|
|
488
|
+
- `TagSelection`: neue Prop `chipVariant?: 'filled' | 'outlined'` (Standard: `'filled'`) — steuert die MUI-Chip-Variante für alle Tag-Chips im Auswahl-Bereich und im Autocomplete-Dropdown. Consumer mit eigenem Design-System, das `outlined`-Chips bevorzugt, müssen keine Styles mehr manuell überschreiben. Siehe [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) für Details.
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
478
492
|
### [3.20.0] — 2026-07-09
|
|
479
493
|
|
|
480
494
|
**Hinzugefügt**
|
package/README.md
CHANGED
|
@@ -461,20 +461,34 @@ import type {
|
|
|
461
461
|
|
|
462
462
|
## Versioning & Compatibility
|
|
463
463
|
|
|
464
|
-
This project follows [Semantic Versioning](https://semver.org/)
|
|
464
|
+
This project follows [Semantic Versioning](https://semver.org/):
|
|
465
465
|
|
|
466
|
-
- **Patch**
|
|
467
|
-
- **Minor**
|
|
468
|
-
- **Major**
|
|
466
|
+
- **Patch** — bug fixes only, always safe to upgrade.
|
|
467
|
+
- **Minor** — new features, fully backwards compatible.
|
|
468
|
+
- **Major** — breaking changes, called out explicitly in the [Changelog](#changelog).
|
|
469
469
|
|
|
470
|
-
**Only one breaking release to date:** [`3.0.0`](#300--2026-06-15--breaking-changes) removed `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` and changed `TagSelection`'s `onTagCreate` signature. Every other release
|
|
470
|
+
**Only one breaking release to date:** [`3.0.0`](#300--2026-06-15--breaking-changes) removed `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` and changed `TagSelection`'s `onTagCreate` signature. Every other release has been additive.
|
|
471
471
|
|
|
472
|
-
**TypeScript note:**
|
|
472
|
+
**TypeScript note:** Always pass translation objects as `Partial<...>` inline — e.g. `translation={{ noData: 'No data' }}`. Translation types gain new optional fields as features are added; using `Partial<...>` keeps your code forward-compatible automatically.
|
|
473
473
|
|
|
474
474
|
---
|
|
475
475
|
|
|
476
476
|
## Changelog
|
|
477
477
|
|
|
478
|
+
### [3.22.0] — 2026-07-09
|
|
479
|
+
|
|
480
|
+
**Added**
|
|
481
|
+
- `RadialStackedBarChart`, `ChordChart`, `SunburstChart`, `CirclePackingChart`: new `valueFormatter` prop for full control over numeric values in tooltips — replaces the built-in `valueDecimalCount`/separator props when set. `RadialStackedBarChart` additionally receives a `seriesKey` argument for per-series formatting. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
### [3.21.0] — 2026-07-09
|
|
486
|
+
|
|
487
|
+
**Added**
|
|
488
|
+
- `TagSelection`: new `chipVariant?: 'filled' | 'outlined'` prop (default: `'filled'`) — controls the MUI Chip variant for all tag chips in the selected-tags area and in the autocomplete dropdown. Consumers with a design system that prefers `outlined` chips no longer need to override styles manually. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
478
492
|
### [3.20.0] — 2026-07-09
|
|
479
493
|
|
|
480
494
|
**Added**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChordChartProps } from "./ChordChart.types";
|
|
2
|
-
export declare function ChordChart({ data, size, innerRadius, ringThickness, padAngle, ribbonPadAngle, sortSubgroups, sortChords, chartColors, groupColorConfigs, showGroupLabels, labelOffset, ribbonOpacity, ribbonBlendMode, directed, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, onGroupClick, onChordClick, zoomable, disabled, translation, }: ChordChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ChordChart({ data, size, innerRadius, ringThickness, padAngle, ribbonPadAngle, sortSubgroups, sortChords, chartColors, groupColorConfigs, showGroupLabels, labelOffset, ribbonOpacity, ribbonBlendMode, directed, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, onGroupClick, onChordClick, zoomable, disabled, translation, }: ChordChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace ChordChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -4,12 +4,12 @@ import { Box as o, Tooltip as s, Typography as c, useTheme as ee } from "@mui/ma
|
|
|
4
4
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
import * as d from "d3";
|
|
6
6
|
//#region src/components/chord-chart/ChordChart.tsx
|
|
7
|
-
function
|
|
7
|
+
function f(e, t = 0, n = ".", r = ",") {
|
|
8
8
|
if (!isFinite(e)) return String(e);
|
|
9
9
|
let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
|
|
10
10
|
return a ? `${o}${n}${a}` : o;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function te({ name: e, valueOut: t, valueIn: n, fmt: r }) {
|
|
13
13
|
return /* @__PURE__ */ u(o, {
|
|
14
14
|
sx: { py: .25 },
|
|
15
15
|
children: [
|
|
@@ -40,7 +40,7 @@ function ne({ name: e, valueOut: t, valueIn: n, fmt: r }) {
|
|
|
40
40
|
]
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ne({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, directed: i, fmt: a }) {
|
|
44
44
|
return /* @__PURE__ */ u(o, {
|
|
45
45
|
sx: { py: .25 },
|
|
46
46
|
children: [
|
|
@@ -82,21 +82,22 @@ function f({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, direc
|
|
|
82
82
|
]
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padAngle:
|
|
86
|
-
let M = ee(),
|
|
85
|
+
function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padAngle: g, ribbonPadAngle: _, sortSubgroups: v = "descending", sortChords: y = "descending", chartColors: b, groupColorConfigs: x, showGroupLabels: re = !0, labelOffset: S = 8, ribbonOpacity: C = .75, ribbonBlendMode: w, directed: T = !0, valueDecimalCount: E = 0, valueDecimalSeparator: D = ".", valueThousandsSeparator: O = ",", valueFormatter: k, onGroupClick: ie, onChordClick: ae, zoomable: A = !1, disabled: j = !1, translation: oe }) {
|
|
86
|
+
let M = ee(), se = {
|
|
87
87
|
...e,
|
|
88
|
-
...
|
|
89
|
-
},
|
|
88
|
+
...oe
|
|
89
|
+
}, ce = c.length === 0, le = w ?? (M.palette.mode === "dark" ? "normal" : "multiply"), ue = [
|
|
90
90
|
M.palette.primary.main,
|
|
91
91
|
M.palette.secondary.main,
|
|
92
92
|
M.palette.error.main,
|
|
93
93
|
M.palette.warning.main,
|
|
94
94
|
M.palette.success.main,
|
|
95
95
|
M.palette.info.main
|
|
96
|
-
], N =
|
|
97
|
-
|
|
96
|
+
], N = b && b.length > 0 ? b : ue, de = m ?? Math.min(p, p) * .5 - 90, P = Math.max(10, de), F = P + Math.max(1, h), I = g ?? 10 / P, L = _ ?? 1 / P, R = t((e) => k ? k(e) : f(e, E, D, O), [
|
|
97
|
+
k,
|
|
98
98
|
E,
|
|
99
|
-
D
|
|
99
|
+
D,
|
|
100
|
+
O
|
|
100
101
|
]), { names: z, matrix: B } = r(() => {
|
|
101
102
|
let e = d.sort(d.union(c.map((e) => e.source), c.map((e) => e.target))), t = new Map(e.map((e, t) => [e, t])), n = Array.from({ length: e.length }, () => Array(e.length).fill(0));
|
|
102
103
|
for (let { source: e, target: r, value: i } of c) {
|
|
@@ -108,19 +109,19 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
108
109
|
matrix: n
|
|
109
110
|
};
|
|
110
111
|
}, [c]), V = r(() => {
|
|
111
|
-
let e = (
|
|
112
|
-
return
|
|
112
|
+
let e = (T ? d.chordDirected() : d.chord()).padAngle(I);
|
|
113
|
+
return v === "ascending" && (e = e.sortSubgroups(d.ascending)), v === "descending" && (e = e.sortSubgroups(d.descending)), y === "ascending" && (e = e.sortChords(d.ascending)), y === "descending" && (e = e.sortChords(d.descending)), e(B);
|
|
113
114
|
}, [
|
|
114
115
|
B,
|
|
115
116
|
I,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
]),
|
|
117
|
+
T,
|
|
118
|
+
v,
|
|
119
|
+
y
|
|
120
|
+
]), fe = r(() => d.arc().innerRadius(P).outerRadius(F), [P, F]), H = r(() => (T ? d.ribbonArrow() : d.ribbon()).radius(P - 1).padAngle(L), [
|
|
120
121
|
P,
|
|
121
122
|
L,
|
|
122
|
-
|
|
123
|
-
]),
|
|
123
|
+
T
|
|
124
|
+
]), pe = t((e) => H({
|
|
124
125
|
source: {
|
|
125
126
|
startAngle: e.source.startAngle,
|
|
126
127
|
endAngle: e.source.endAngle,
|
|
@@ -131,24 +132,24 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
131
132
|
endAngle: e.target.endAngle,
|
|
132
133
|
radius: P - 1
|
|
133
134
|
}
|
|
134
|
-
}) ?? "", [
|
|
135
|
-
|
|
135
|
+
}) ?? "", [H, P]), U = r(() => d.scaleOrdinal().domain(d.range(z.length)).range(N.length >= z.length ? N : [...Array(Math.ceil(z.length / N.length))].flatMap(() => N).slice(0, z.length)), [N, z.length]), W = t((e) => x?.[z[e]]?.fill ?? U(e), [
|
|
136
|
+
x,
|
|
136
137
|
z,
|
|
137
|
-
|
|
138
|
-
]),
|
|
139
|
-
if (
|
|
140
|
-
let [e, t, n, r] =
|
|
138
|
+
U
|
|
139
|
+
]), G = i(null), [K, q] = a(`-${p / 2} -${p / 2} ${p} ${p}`), [J, Y] = a(1), me = r(() => {
|
|
140
|
+
if (J === 1) return K;
|
|
141
|
+
let [e, t, n, r] = K.split(" ").map(Number), i = n / J, a = r / J;
|
|
141
142
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
142
|
-
}, [
|
|
143
|
+
}, [K, J]);
|
|
143
144
|
n(() => {
|
|
144
|
-
let e =
|
|
145
|
+
let e = G.current;
|
|
145
146
|
if (!e) return;
|
|
146
147
|
let t = requestAnimationFrame(() => {
|
|
147
148
|
try {
|
|
148
149
|
let t = e.getBBox();
|
|
149
|
-
|
|
150
|
+
q(`${t.x - 8} ${t.y - 8} ${t.width + 16} ${t.height + 16}`);
|
|
150
151
|
} catch {
|
|
151
|
-
|
|
152
|
+
q(`-${p / 2} -${p / 2} ${p} ${p}`);
|
|
152
153
|
}
|
|
153
154
|
});
|
|
154
155
|
return () => cancelAnimationFrame(t);
|
|
@@ -159,16 +160,16 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
159
160
|
z.length,
|
|
160
161
|
V
|
|
161
162
|
]);
|
|
162
|
-
let [
|
|
163
|
+
let [X, Z] = a(null), he = t((e) => ({
|
|
163
164
|
name: z[e.index],
|
|
164
165
|
index: e.index,
|
|
165
|
-
valueOut: d.sum(V, (t) => (t.source.index === e.index ? t.source.value : 0) + (!
|
|
166
|
-
valueIn: d.sum(V, (t) => (t.target.index === e.index ? t.source.value : 0) + (!
|
|
166
|
+
valueOut: d.sum(V, (t) => (t.source.index === e.index ? t.source.value : 0) + (!T && t.target.index === e.index ? t.target.value : 0)),
|
|
167
|
+
valueIn: d.sum(V, (t) => (t.target.index === e.index ? t.source.value : 0) + (!T && t.source.index === e.index ? t.target.value : 0))
|
|
167
168
|
}), [
|
|
168
169
|
z,
|
|
169
170
|
V,
|
|
170
|
-
|
|
171
|
-
]),
|
|
171
|
+
T
|
|
172
|
+
]), ge = t((e) => ({
|
|
172
173
|
source: {
|
|
173
174
|
name: z[e.source.index],
|
|
174
175
|
index: e.source.index,
|
|
@@ -179,19 +180,19 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
179
180
|
index: e.target.index,
|
|
180
181
|
value: e.target.value
|
|
181
182
|
}
|
|
182
|
-
}), [z]),
|
|
183
|
+
}), [z]), _e = (e) => {
|
|
183
184
|
let t = (e.startAngle + e.endAngle) / 2, n = t * 180 / Math.PI - 90, r = t > Math.PI ? " rotate(180)" : "";
|
|
184
|
-
return `rotate(${n}) translate(${F +
|
|
185
|
-
},
|
|
185
|
+
return `rotate(${n}) translate(${F + S})${r}`;
|
|
186
|
+
}, Q = (e) => (e.startAngle + e.endAngle) / 2 > Math.PI ? "end" : "start", ve = t((e) => {
|
|
186
187
|
if (!A || j || !e.ctrlKey) return;
|
|
187
188
|
e.preventDefault();
|
|
188
189
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
189
|
-
|
|
190
|
+
Y((e) => Math.max(.25, Math.min(8, e * t)));
|
|
190
191
|
}, [A, j]);
|
|
191
192
|
n(() => {
|
|
192
193
|
if (!A) return;
|
|
193
194
|
let e = (e) => {
|
|
194
|
-
e.key === "Escape" &&
|
|
195
|
+
e.key === "Escape" && Y(1);
|
|
195
196
|
};
|
|
196
197
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
197
198
|
}, [A]);
|
|
@@ -201,7 +202,7 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
201
202
|
enterNextDelay: 0,
|
|
202
203
|
disableHoverListener: j,
|
|
203
204
|
slotProps: { tooltip: { sx: { maxWidth: 240 } } }
|
|
204
|
-
},
|
|
205
|
+
}, ye = M.palette.text.primary, be = M.typography.fontFamily;
|
|
205
206
|
return /* @__PURE__ */ l(o, {
|
|
206
207
|
sx: {
|
|
207
208
|
display: "inline-flex",
|
|
@@ -212,29 +213,29 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
212
213
|
children: /* @__PURE__ */ l("svg", {
|
|
213
214
|
width: p,
|
|
214
215
|
height: p,
|
|
215
|
-
viewBox:
|
|
216
|
-
onWheel:
|
|
216
|
+
viewBox: me,
|
|
217
|
+
onWheel: ve,
|
|
217
218
|
style: {
|
|
218
|
-
fontFamily:
|
|
219
|
-
overflow: A &&
|
|
219
|
+
fontFamily: be ?? "sans-serif",
|
|
220
|
+
overflow: A && J > 1 ? "hidden" : "visible"
|
|
220
221
|
},
|
|
221
222
|
role: "img",
|
|
222
223
|
"aria-label": "Chord chart",
|
|
223
224
|
children: /* @__PURE__ */ u("g", {
|
|
224
|
-
ref:
|
|
225
|
+
ref: G,
|
|
225
226
|
children: [
|
|
226
|
-
|
|
227
|
+
ce && /* @__PURE__ */ l("text", {
|
|
227
228
|
textAnchor: "middle",
|
|
228
229
|
dy: "0.35em",
|
|
229
230
|
fontSize: 13,
|
|
230
231
|
fill: M.palette.text.secondary,
|
|
231
|
-
children:
|
|
232
|
+
children: se.noData
|
|
232
233
|
}),
|
|
233
234
|
/* @__PURE__ */ l("g", { children: V.groups.map((e) => {
|
|
234
|
-
let t =
|
|
235
|
+
let t = he(e), n = X === e.index, r = X !== null && !n;
|
|
235
236
|
return /* @__PURE__ */ l(s, {
|
|
236
237
|
...$,
|
|
237
|
-
title: /* @__PURE__ */ l(
|
|
238
|
+
title: /* @__PURE__ */ l(te, {
|
|
238
239
|
name: t.name,
|
|
239
240
|
valueOut: t.valueOut,
|
|
240
241
|
valueIn: t.valueIn,
|
|
@@ -242,21 +243,21 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
242
243
|
}),
|
|
243
244
|
children: /* @__PURE__ */ u("g", {
|
|
244
245
|
style: { cursor: j ? "not-allowed" : "pointer" },
|
|
245
|
-
onMouseEnter: () => !j &&
|
|
246
|
-
onMouseLeave: () =>
|
|
247
|
-
onClick: (e) => !j &&
|
|
246
|
+
onMouseEnter: () => !j && Z(e.index),
|
|
247
|
+
onMouseLeave: () => Z(null),
|
|
248
|
+
onClick: (e) => !j && ie?.(t, e),
|
|
248
249
|
children: [/* @__PURE__ */ l("path", {
|
|
249
|
-
d:
|
|
250
|
-
fill:
|
|
250
|
+
d: fe(e) || "",
|
|
251
|
+
fill: W(e.index),
|
|
251
252
|
stroke: M.palette.divider,
|
|
252
253
|
opacity: r ? .35 : 1,
|
|
253
254
|
style: { transition: "opacity 0.15s" }
|
|
254
|
-
}),
|
|
255
|
+
}), re && /* @__PURE__ */ l("text", {
|
|
255
256
|
dy: "0.35em",
|
|
256
257
|
fontSize: 11,
|
|
257
|
-
fill:
|
|
258
|
-
transform:
|
|
259
|
-
textAnchor:
|
|
258
|
+
fill: ye,
|
|
259
|
+
transform: _e(e),
|
|
260
|
+
textAnchor: Q(e),
|
|
260
261
|
pointerEvents: "none",
|
|
261
262
|
children: z[e.index]
|
|
262
263
|
})]
|
|
@@ -264,30 +265,30 @@ function p({ data: c, size: p = 500, innerRadius: m, ringThickness: h = 20, padA
|
|
|
264
265
|
}, `grp-tt-${e.index}`);
|
|
265
266
|
}) }),
|
|
266
267
|
/* @__PURE__ */ l("g", {
|
|
267
|
-
fillOpacity:
|
|
268
|
-
style: { mixBlendMode:
|
|
268
|
+
fillOpacity: C,
|
|
269
|
+
style: { mixBlendMode: le },
|
|
269
270
|
children: V.map((e, t) => {
|
|
270
|
-
let n =
|
|
271
|
+
let n = ge(e), r = X === null || e.source.index === X || e.target.index === X;
|
|
271
272
|
return /* @__PURE__ */ l(s, {
|
|
272
273
|
...$,
|
|
273
|
-
title: /* @__PURE__ */ l(
|
|
274
|
+
title: /* @__PURE__ */ l(ne, {
|
|
274
275
|
sourceName: n.source.name,
|
|
275
276
|
targetName: n.target.name,
|
|
276
277
|
sourceValue: n.source.value,
|
|
277
278
|
targetValue: n.target.value,
|
|
278
|
-
directed:
|
|
279
|
+
directed: T,
|
|
279
280
|
fmt: R
|
|
280
281
|
}),
|
|
281
282
|
children: /* @__PURE__ */ l("path", {
|
|
282
|
-
d:
|
|
283
|
-
fill:
|
|
283
|
+
d: pe(e),
|
|
284
|
+
fill: W(e.target.index),
|
|
284
285
|
stroke: "none",
|
|
285
286
|
opacity: r ? 1 : .12,
|
|
286
287
|
style: {
|
|
287
288
|
cursor: j ? "not-allowed" : "pointer",
|
|
288
289
|
transition: "opacity 0.15s"
|
|
289
290
|
},
|
|
290
|
-
onClick: (e) => !j &&
|
|
291
|
+
onClick: (e) => !j && ae?.(n, e)
|
|
291
292
|
})
|
|
292
293
|
}, `chord-tt-${t}`);
|
|
293
294
|
})
|
|
@@ -82,6 +82,13 @@ export type ChordChartProps = {
|
|
|
82
82
|
valueDecimalSeparator?: string;
|
|
83
83
|
/** Thousands separator (default: ',') */
|
|
84
84
|
valueThousandsSeparator?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Custom formatter for all numeric values shown in tooltips. Overrides
|
|
87
|
+
* `valueDecimalCount`, `valueDecimalSeparator`, and `valueThousandsSeparator`.
|
|
88
|
+
* Example: `(v) => \`${v.toLocaleString('de-DE')} kg\``
|
|
89
|
+
* @since 3.22.0
|
|
90
|
+
*/
|
|
91
|
+
valueFormatter?: (value: number) => string;
|
|
85
92
|
/** Fired on click of a group arc */
|
|
86
93
|
onGroupClick?: (info: ChordGroupInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
87
94
|
/** Fired on click of a ribbon */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CirclePackingChartProps } from "./CirclePackingChart.types";
|
|
2
|
-
export declare function CirclePackingChart({ data, size, padding, sortBy, showLabels, showAllLabels, labelFontSize, innerLabelFontSize, labelColor, chartColors, depthColorStart, depthColorEnd, background, duration, zoomable, disabled, onCircleClick, onZoomChange, translation, }: CirclePackingChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function CirclePackingChart({ data, size, padding, sortBy, showLabels, showAllLabels, labelFontSize, innerLabelFontSize, labelColor, chartColors, depthColorStart, depthColorEnd, background, duration, zoomable, disabled, onCircleClick, onZoomChange, valueFormatter, translation, }: CirclePackingChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace CirclePackingChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|