@thebuoyant-tsdev/mui-ts-library 2.0.1 → 2.2.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 +32 -1
- package/README.md +32 -1
- package/dist/components/json-editor/JsonEditorToolbar.d.ts +2 -2
- package/dist/components/rich-text-editor/RichTextEditor.types.d.ts +23 -0
- package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.d.ts +10 -0
- package/dist/components/rich-text-editor/RichTextEditorImageDialog.d.ts +10 -0
- package/dist/components/rich-text-editor/RichTextEditorTableMenu.d.ts +9 -0
- package/dist/components/rich-text-editor/util/emojis.d.ts +9 -0
- package/dist/components/sql-editor/SqlEditorToolbar.d.ts +2 -2
- package/dist/components/sunburst-chart/SunburstChart.d.ts +5 -0
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2662 -1271
- package/package.json +15 -11
package/README.de.md
CHANGED
|
@@ -14,9 +14,10 @@ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **M
|
|
|
14
14
|
| [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Ctrl+Scroll-Zoom, Heute-Chip und integrierten CRUD-Dialogen | [Vollständiges Manual →](user-manuals/GanttChart.de.md) |
|
|
15
15
|
| [`TagSelection`](#tagselection) | Multi-Tag-Auswahlfeld mit Autocomplete, freier Tag-Erstellung, Overflow-Chips und MUI-Theme-Farben | [Vollständiges Manual →](user-manuals/TagSelection.de.md) |
|
|
16
16
|
| [`PasswordStrengthMeter`](#passwordstrengthmeter) | Passwort-Eingabe mit animiertem Stärke-Meter, segmentierter Balkenanzeige, eigenen Anforderungen und Anforderungsliste | [Vollständiges Manual →](user-manuals/PasswordStrengthMeter.de.md) |
|
|
17
|
-
| [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung, Wörter-Zähler, Vollbild-Modus
|
|
17
|
+
| [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung, Wörter-Zähler, Vollbild-Modus, Markdown-Einfügen, Tabellen-Bearbeitung, Bild-Embed und Emoji-Picker | [Vollständiges Manual →](user-manuals/RichTextEditor.de.md) |
|
|
18
18
|
| [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete, Linting und `Cmd+Enter`-Ausführen-Shortcut | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
|
|
19
19
|
| [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche sowie optionaler Minimap | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
|
|
20
|
+
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchisches Chart — konzentrische Ringe, Ctrl+Click-Zoom, Donut-Modus, eigene Farben, MUI-Theme-Integration. Erste der D3-Chart-Familie. | [Vollständiges Manual →](user-manuals/SunburstChart.de.md) |
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -171,6 +172,36 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
|
|
|
171
172
|
|
|
172
173
|
---
|
|
173
174
|
|
|
175
|
+
### SunburstChart
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
179
|
+
import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
|
|
180
|
+
|
|
181
|
+
const data: SunburstChartData = {
|
|
182
|
+
id: 'root', name: 'Budget',
|
|
183
|
+
children: [
|
|
184
|
+
{ id: 'eng', name: 'Engineering', children: [
|
|
185
|
+
{ id: 'fe', name: 'Frontend', value: 480 },
|
|
186
|
+
{ id: 'be', name: 'Backend', value: 620 },
|
|
187
|
+
]},
|
|
188
|
+
{ id: 'sales', name: 'Vertrieb', value: 890 },
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
<SunburstChart
|
|
193
|
+
data={data}
|
|
194
|
+
size={500}
|
|
195
|
+
onSegmentClick={(info) => console.log(info.path, info.value)}
|
|
196
|
+
/>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Zoom:** `Ctrl+Click` → Drill-down · `Ctrl+Doppelklick` → Zoom out · `Escape` → Reset
|
|
200
|
+
|
|
201
|
+
→ [Vollständige Dokumentation](user-manuals/SunburstChart.de.md)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
174
205
|
## TypeScript
|
|
175
206
|
|
|
176
207
|
Alle Typen und Defaults werden direkt exportiert — kein separates `@types/...`-Paket nötig.
|
package/README.md
CHANGED
|
@@ -14,9 +14,10 @@ A type-safe React component library built on **TypeScript** and **MUI (Material
|
|
|
14
14
|
| [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, Ctrl+Scroll zoom, today chip, and built-in CRUD dialogs | [Full Manual →](user-manuals/GanttChart.md) |
|
|
15
15
|
| [`TagSelection`](#tagselection) | Multi-tag selector with autocomplete, free tag creation, overflow chips, and MUI theme colors | [Full Manual →](user-manuals/TagSelection.md) |
|
|
16
16
|
| [`PasswordStrengthMeter`](#passwordstrengthmeter) | Password input with animated strength meter, segmented bar, custom requirements, and requirements checklist | [Full Manual →](user-manuals/PasswordStrengthMeter.md) |
|
|
17
|
-
| [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, word count, fullscreen mode,
|
|
17
|
+
| [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, word count, fullscreen mode, Markdown paste, table editing, image embed, and emoji picker | [Full Manual →](user-manuals/RichTextEditor.md) |
|
|
18
18
|
| [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, linting, and `Cmd+Enter` execute shortcut | [Full Manual →](user-manuals/SqlEditor.md) |
|
|
19
19
|
| [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, Compact buttons, and optional minimap | [Full Manual →](user-manuals/JsonEditor.md) |
|
|
20
|
+
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchical chart — concentric rings, Ctrl+Click zoom, donut mode, custom colors, MUI theme integration. First of the D3 Charts family. | [Full Manual →](user-manuals/SunburstChart.md) |
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -171,6 +172,36 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
|
|
|
171
172
|
|
|
172
173
|
---
|
|
173
174
|
|
|
175
|
+
### SunburstChart
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
179
|
+
import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
|
|
180
|
+
|
|
181
|
+
const data: SunburstChartData = {
|
|
182
|
+
id: 'root', name: 'Budget',
|
|
183
|
+
children: [
|
|
184
|
+
{ id: 'eng', name: 'Engineering', children: [
|
|
185
|
+
{ id: 'fe', name: 'Frontend', value: 480 },
|
|
186
|
+
{ id: 'be', name: 'Backend', value: 620 },
|
|
187
|
+
]},
|
|
188
|
+
{ id: 'sales', name: 'Sales', value: 890 },
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
<SunburstChart
|
|
193
|
+
data={data}
|
|
194
|
+
size={500}
|
|
195
|
+
onSegmentClick={(info) => console.log(info.path, info.value)}
|
|
196
|
+
/>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Zoom:** `Ctrl+Click` → drill down · `Ctrl+Double-click` → zoom out · `Escape` → reset
|
|
200
|
+
|
|
201
|
+
→ [Full documentation](user-manuals/SunburstChart.md)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
174
205
|
## TypeScript
|
|
175
206
|
|
|
176
207
|
All types and defaults are exported directly — no separate `@types/...` package needed.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { EditorView } from "@codemirror/view";
|
|
2
2
|
import type { JsonEditorToolbarConfig, JsonEditorTranslation } from "./JsonEditor.types";
|
|
3
3
|
type JsonEditorToolbarProps = {
|
|
4
|
-
|
|
4
|
+
editorView: EditorView | null;
|
|
5
5
|
toolbarConfig: Required<JsonEditorToolbarConfig>;
|
|
6
6
|
translation: JsonEditorTranslation;
|
|
7
7
|
indent: number;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function JsonEditorToolbar({
|
|
10
|
+
export declare function JsonEditorToolbar({ editorView, toolbarConfig: tc, translation: t, indent, disabled, }: JsonEditorToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -18,6 +18,12 @@ export type RichTextEditorToolbarConfig = {
|
|
|
18
18
|
showClearFormat?: boolean;
|
|
19
19
|
/** Fullscreen-Button in der Toolbar — standardmäßig deaktiviert (opt-in) */
|
|
20
20
|
showFullscreenButton?: boolean;
|
|
21
|
+
/** Tabellen einfügen + Zeilen/Spalten verwalten — standardmäßig deaktiviert (opt-in) */
|
|
22
|
+
showTableButton?: boolean;
|
|
23
|
+
/** Bilder per URL einfügen — standardmäßig deaktiviert (opt-in) */
|
|
24
|
+
showImageButton?: boolean;
|
|
25
|
+
/** Emoji-Picker — standardmäßig deaktiviert (opt-in) */
|
|
26
|
+
showEmojiButton?: boolean;
|
|
21
27
|
};
|
|
22
28
|
export declare const DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG: Required<RichTextEditorToolbarConfig>;
|
|
23
29
|
export type RichTextEditorTranslation = {
|
|
@@ -54,6 +60,23 @@ export type RichTextEditorTranslation = {
|
|
|
54
60
|
fullscreen: string;
|
|
55
61
|
/** Tooltip für den Exit-Fullscreen-Button */
|
|
56
62
|
exitFullscreen: string;
|
|
63
|
+
table: string;
|
|
64
|
+
insertTable: string;
|
|
65
|
+
addRowBefore: string;
|
|
66
|
+
addRowAfter: string;
|
|
67
|
+
deleteRow: string;
|
|
68
|
+
addColumnBefore: string;
|
|
69
|
+
addColumnAfter: string;
|
|
70
|
+
deleteColumn: string;
|
|
71
|
+
deleteTable: string;
|
|
72
|
+
image: string;
|
|
73
|
+
imageDialogTitle: string;
|
|
74
|
+
imageDialogUrlLabel: string;
|
|
75
|
+
imageDialogAltLabel: string;
|
|
76
|
+
imageDialogSave: string;
|
|
77
|
+
imageDialogCancel: string;
|
|
78
|
+
emoji: string;
|
|
79
|
+
emojiSearchPlaceholder: string;
|
|
57
80
|
};
|
|
58
81
|
export declare const DEFAULT_RICH_TEXT_EDITOR_TRANSLATION: RichTextEditorTranslation;
|
|
59
82
|
export type RichTextEditorProps = {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RichTextEditorTranslation } from "./RichTextEditor.types";
|
|
2
|
+
type RichTextEditorEmojiPickerProps = {
|
|
3
|
+
anchorEl: HTMLElement | null;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSelect: (emoji: string) => void;
|
|
7
|
+
translation: RichTextEditorTranslation;
|
|
8
|
+
};
|
|
9
|
+
export declare function RichTextEditorEmojiPicker({ anchorEl, open, onClose, onSelect, translation: t, }: RichTextEditorEmojiPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Editor } from "@tiptap/react";
|
|
2
|
+
import { type RichTextEditorTranslation } from "./RichTextEditor.types";
|
|
3
|
+
type RichTextEditorImageDialogProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
translation: RichTextEditorTranslation;
|
|
8
|
+
};
|
|
9
|
+
export declare function RichTextEditorImageDialog({ open, onClose, editor, translation: t, }: RichTextEditorImageDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Editor } from "@tiptap/react";
|
|
2
|
+
import { type RichTextEditorTranslation } from "./RichTextEditor.types";
|
|
3
|
+
type RichTextEditorTableMenuProps = {
|
|
4
|
+
editor: Editor | null;
|
|
5
|
+
translation: RichTextEditorTranslation;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function RichTextEditorTableMenu({ editor, translation: t, disabled, }: RichTextEditorTableMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { EditorView } from "@codemirror/view";
|
|
2
2
|
import type { SqlEditorDialect, SqlEditorToolbarConfig, SqlEditorTranslation } from "./SqlEditor.types";
|
|
3
3
|
type SqlEditorToolbarProps = {
|
|
4
|
-
|
|
4
|
+
editorView: EditorView | null;
|
|
5
5
|
toolbarConfig: Required<SqlEditorToolbarConfig>;
|
|
6
6
|
translation: SqlEditorTranslation;
|
|
7
7
|
dialect: SqlEditorDialect;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
onExecute?: (sql: string) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare function SqlEditorToolbar({
|
|
11
|
+
export declare function SqlEditorToolbar({ editorView, toolbarConfig: tc, translation: t, dialect, disabled, onExecute, }: SqlEditorToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type SunburstChartProps } from "./SunburstChart.types";
|
|
2
|
+
export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, disabled, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace SunburstChart {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export type SunburstSortBy = 'value' | 'name';
|
|
2
|
+
export type SunburstChartData = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value?: number;
|
|
6
|
+
children?: SunburstChartData[];
|
|
7
|
+
};
|
|
8
|
+
export type SunburstSegmentInfo = {
|
|
9
|
+
/** Node ID — direct access, same as `data.id` */
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
/** D3 aggregate value — sum of all descendant leaf values */
|
|
13
|
+
value: number | null;
|
|
14
|
+
/** Percentage of root total — `(value / root.value) * 100` */
|
|
15
|
+
percentage: number;
|
|
16
|
+
depth: number;
|
|
17
|
+
/** Breadcrumb path from root — array of node names */
|
|
18
|
+
path: string[];
|
|
19
|
+
/** Breadcrumb path from root — array of node IDs (for backend linking) */
|
|
20
|
+
pathIds: string[];
|
|
21
|
+
childrenCount: number;
|
|
22
|
+
/** Original data node as passed to the chart */
|
|
23
|
+
data: SunburstChartData;
|
|
24
|
+
};
|
|
25
|
+
export type SunburstZoomInfo = {
|
|
26
|
+
/** The node that is now the focus center */
|
|
27
|
+
focusNode: SunburstSegmentInfo;
|
|
28
|
+
/** True when zoom has been reset to root */
|
|
29
|
+
isRoot: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type SunburstChartTranslation = {
|
|
32
|
+
/** Shown when data has no children and no value */
|
|
33
|
+
noData: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const DEFAULT_SUNBURST_CHART_TRANSLATION: SunburstChartTranslation;
|
|
36
|
+
export type SunburstChartProps = {
|
|
37
|
+
/** Hierarchical data tree — root node with optional nested children */
|
|
38
|
+
data: SunburstChartData;
|
|
39
|
+
/** Width and height of the SVG in pixels (default: 500) */
|
|
40
|
+
size?: number;
|
|
41
|
+
/** Show name labels on segments (default: true) */
|
|
42
|
+
showSegmentLabels?: boolean;
|
|
43
|
+
/** Inner hole radius in px — 0 = solid sunburst, > 0 = donut style (default: 0) */
|
|
44
|
+
innerRadius?: number;
|
|
45
|
+
/** Sort segments by value (largest first) or by name (default: 'value') */
|
|
46
|
+
sortBy?: SunburstSortBy;
|
|
47
|
+
/** Custom color palette for top-level segments — falls back to MUI theme palette */
|
|
48
|
+
chartColors?: string[];
|
|
49
|
+
/** Show the root node name in the center (default: true) */
|
|
50
|
+
showRootLabel?: boolean;
|
|
51
|
+
/** Fired on single-click on any segment */
|
|
52
|
+
onSegmentClick?: (info: SunburstSegmentInfo, event: React.MouseEvent<SVGPathElement | SVGCircleElement>) => void;
|
|
53
|
+
/** Fired when zoom focus changes (Ctrl+Click in/out, Escape reset) */
|
|
54
|
+
onZoomChange?: (zoom: SunburstZoomInfo) => void;
|
|
55
|
+
/** Decimal places for value display in tooltips (default: 0) */
|
|
56
|
+
valueDecimalCount?: number;
|
|
57
|
+
/** Decimal separator for values (default: '.') */
|
|
58
|
+
valueDecimalSeparator?: string;
|
|
59
|
+
/** Thousands separator for values (default: ',') */
|
|
60
|
+
valueThousandsSeparator?: string;
|
|
61
|
+
/** Disables all interactions (default: false) */
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
/** Override any translation string */
|
|
64
|
+
translation?: Partial<SunburstChartTranslation>;
|
|
65
|
+
};
|