@thebuoyant-tsdev/mui-ts-library 1.3.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.de.md +224 -0
  3. package/README.md +224 -0
  4. package/dist/components/confirm-dialog/ConfirmDialog.types.d.ts +21 -0
  5. package/dist/components/confirm-dialog/ConfirmDialogProvider.d.ts +5 -0
  6. package/dist/components/gantt-chart/GanttChart.constants.d.ts +11 -0
  7. package/dist/components/gantt-chart/GanttChart.d.ts +7 -0
  8. package/dist/components/gantt-chart/GanttChart.store.d.ts +28 -0
  9. package/dist/components/gantt-chart/GanttChart.types.d.ts +119 -0
  10. package/dist/components/gantt-chart/GanttDeleteDialog.d.ts +9 -0
  11. package/dist/components/gantt-chart/GanttTaskDialog.d.ts +11 -0
  12. package/dist/components/gantt-chart/GanttTaskPanel.d.ts +21 -0
  13. package/dist/components/gantt-chart/GanttTimeline.d.ts +19 -0
  14. package/dist/components/gantt-chart/GanttTimelineHeader.d.ts +17 -0
  15. package/dist/components/gantt-chart/GanttToolbar.d.ts +7 -0
  16. package/dist/components/gantt-chart/util/gantt-chart.util.d.ts +80 -0
  17. package/dist/components/json-editor/JsonEditor.d.ts +2 -0
  18. package/dist/components/json-editor/JsonEditor.types.d.ts +60 -0
  19. package/dist/components/json-editor/JsonEditorContent.d.ts +17 -0
  20. package/dist/components/json-editor/JsonEditorFooter.d.ts +13 -0
  21. package/dist/components/json-editor/JsonEditorToolbar.d.ts +11 -0
  22. package/dist/components/password-strength-meter/PasswordStrengthMeter.d.ts +2 -0
  23. package/dist/components/password-strength-meter/PasswordStrengthMeter.types.d.ts +56 -0
  24. package/dist/components/password-strength-meter/util/password-strength.util.d.ts +2 -0
  25. package/dist/components/rich-text-editor/RichTextEditor.d.ts +2 -0
  26. package/dist/components/rich-text-editor/RichTextEditor.types.d.ts +72 -0
  27. package/dist/components/rich-text-editor/RichTextEditorColorPicker.d.ts +12 -0
  28. package/dist/components/rich-text-editor/RichTextEditorContent.d.ts +9 -0
  29. package/dist/components/rich-text-editor/RichTextEditorFooter.d.ts +11 -0
  30. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.d.ts +10 -0
  31. package/dist/components/rich-text-editor/RichTextEditorToolbar.d.ts +10 -0
  32. package/dist/components/rich-text-editor/util/rich-text-editor.util.d.ts +9 -0
  33. package/dist/components/sql-editor/SqlEditor.d.ts +2 -0
  34. package/dist/components/sql-editor/SqlEditor.types.d.ts +73 -0
  35. package/dist/components/sql-editor/SqlEditorContent.d.ts +23 -0
  36. package/dist/components/sql-editor/SqlEditorFooter.d.ts +13 -0
  37. package/dist/components/sql-editor/SqlEditorToolbar.d.ts +12 -0
  38. package/dist/components/tag-selection/TagSelection.d.ts +2 -0
  39. package/dist/components/tag-selection/TagSelection.store.d.ts +12 -0
  40. package/dist/components/tag-selection/TagSelection.types.d.ts +41 -0
  41. package/dist/components/tag-selection/TagSelectionAutocomplete.d.ts +18 -0
  42. package/dist/components/tag-selection/TagSelectionChip.d.ts +10 -0
  43. package/dist/components/tag-selection/TagSelectionSelectedTags.d.ts +13 -0
  44. package/dist/index.cjs +230 -0
  45. package/dist/index.d.ts +14 -0
  46. package/dist/index.js +43753 -0
  47. package/package.json +175 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Thomas Schlender
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.de.md ADDED
@@ -0,0 +1,224 @@
1
+ # mui-ts-library
2
+
3
+ > [English Version →](README.md)
4
+
5
+ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **MUI (Material UI v9)**. Die Komponenten folgen MUI's Design-Sprache, unterstützen Dark Mode und Theming von Haus aus und werden mit vollständigen TypeScript-Typen, Storybook-Stories und Unit-Tests ausgeliefert.
6
+
7
+ ---
8
+
9
+ ## Komponenten
10
+
11
+ | Komponente | Beschreibung | Docs |
12
+ |---|---|---|
13
+ | [`ConfirmDialog`](#confirmdialog) | Deklarativer Async-Bestätigungs-Dialog — `await confirm({ title, severity })` von überall in der App | [Vollständiges Manual →](user-manuals/ConfirmDialog.de.md) |
14
+ | [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Zoom und integrierten CRUD-Dialogen | [Vollständiges Manual →](user-manuals/GanttChart.de.md) |
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
+ | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Passwort-Eingabe mit animiertem Stärke-Meter und Anforderungsliste | [Vollständiges Manual →](user-manuals/PasswordStrengthMeter.de.md) |
17
+ | [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung und Markdown-Einfügen | [Vollständiges Manual →](user-manuals/RichTextEditor.de.md) |
18
+ | [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete und Linting | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
19
+ | [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
20
+
21
+ ---
22
+
23
+ ## Installation
24
+
25
+ ### Schritt 1 — Paketdatei erstellen
26
+
27
+ Dieses Repository klonen und ausführen:
28
+
29
+ ```bash
30
+ npm install
31
+ npm run pack-release
32
+ ```
33
+
34
+ Dieser Befehl baut die Bibliothek und legt eine fertige Paketdatei im Ordner `releases/` ab:
35
+
36
+ ```
37
+ releases/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
38
+ ```
39
+
40
+ Diese Datei per Slack, E-Mail oder Netzlaufwerk an das Team weitergeben.
41
+
42
+ ### Schritt 2 — Im eigenen Projekt installieren
43
+
44
+ Ein Terminal im **eigenen React-Projekt** öffnen und ausführen:
45
+
46
+ ```bash
47
+ npm install /pfad/zur/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
48
+ ```
49
+
50
+ **Beispiele:**
51
+
52
+ ```bash
53
+ # Datei liegt im Downloads-Ordner
54
+ npm install ~/Downloads/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
55
+
56
+ # Datei liegt im Nachbarordner des Projekts
57
+ npm install ../thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
58
+ ```
59
+
60
+ ### Schritt 3 — Peer-Dependencies installieren
61
+
62
+ Falls MUI noch nicht im Projekt vorhanden ist:
63
+
64
+ ```bash
65
+ npm install react@^19 react-dom@^19 @mui/material@^9 @emotion/react @emotion/styled @mui/icons-material@^9
66
+ ```
67
+
68
+ ### Schritt 4 — Fertig
69
+
70
+ Beliebige Komponente importieren — TypeScript-Typen sind automatisch verfügbar:
71
+
72
+ ```tsx
73
+ import { GanttChart, JsonEditor, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Schnellstart
79
+
80
+ Die App wie gewohnt in MUI's `ThemeProvider` einschließen. `ConfirmDialog` benötigt zusätzlich einen `ConfirmDialogProvider` nahe der App-Wurzel — alle anderen Komponenten funktionieren ohne Provider.
81
+
82
+ ### ConfirmDialog
83
+
84
+ ```tsx
85
+ import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
86
+
87
+ // App-Wurzel — einmalig
88
+ <ConfirmDialogProvider>
89
+ <App />
90
+ </ConfirmDialogProvider>
91
+
92
+ // Überall innerhalb der App
93
+ const confirm = useConfirm();
94
+ const ok = await confirm({ title: 'Eintrag löschen?', severity: 'error', confirmLabel: 'Löschen' });
95
+ if (ok) handleDelete();
96
+ ```
97
+
98
+ → [Vollständige Dokumentation](user-manuals/ConfirmDialog.de.md)
99
+
100
+ ---
101
+
102
+ ### GanttChart
103
+
104
+ ```tsx
105
+ import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
106
+ import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
107
+
108
+ const tasks: GanttTask[] = [
109
+ { id: '1', name: 'Phase 1', status: 'in-progress', startDate: new Date('2026-01-01'), endDate: new Date('2026-03-31') },
110
+ { id: '2', name: 'Go-Live', status: 'planned', startDate: new Date('2026-03-31'), endDate: new Date('2026-03-31'), isMilestone: true },
111
+ ];
112
+
113
+ <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable onTasksChange={save} />
114
+ ```
115
+
116
+ → [Vollständige Dokumentation](user-manuals/GanttChart.de.md)
117
+
118
+ ---
119
+
120
+ ### TagSelection
121
+
122
+ ```tsx
123
+ import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
124
+ import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
125
+
126
+ const tags: TagSelectionItem[] = [
127
+ { id: 'react', label: 'React', selected: true },
128
+ { id: 'ts', label: 'TypeScript' },
129
+ ];
130
+
131
+ <TagSelection tags={tags} onTagsChange={(selected) => console.log(selected)} />
132
+ ```
133
+
134
+ → [Vollständige Dokumentation](user-manuals/TagSelection.de.md)
135
+
136
+ ---
137
+
138
+ ### PasswordStrengthMeter
139
+
140
+ ```tsx
141
+ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
142
+
143
+ <PasswordStrengthMeter
144
+ passwordMinLength={10}
145
+ onPasswordChange={(password, result) => console.log(result.score)}
146
+ />
147
+ ```
148
+
149
+ → [Vollständige Dokumentation](user-manuals/PasswordStrengthMeter.de.md)
150
+
151
+ ---
152
+
153
+ ### RichTextEditor
154
+
155
+ ```tsx
156
+ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
157
+
158
+ <RichTextEditor
159
+ placeholder="Hier tippen …"
160
+ onChange={(html) => console.log(html)}
161
+ />
162
+ ```
163
+
164
+ → [Vollständige Dokumentation](user-manuals/RichTextEditor.de.md)
165
+
166
+ ---
167
+
168
+ ### SqlEditor
169
+
170
+ ```tsx
171
+ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
172
+
173
+ <SqlEditor
174
+ placeholder="SQL-Abfrage eingeben …"
175
+ dialect="postgresql"
176
+ onChange={(sql) => console.log(sql)}
177
+ />
178
+ ```
179
+
180
+ → [Vollständige Dokumentation](user-manuals/SqlEditor.de.md)
181
+
182
+ ---
183
+
184
+ ### JsonEditor
185
+
186
+ ```tsx
187
+ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
188
+
189
+ <JsonEditor
190
+ placeholder="JSON eingeben …"
191
+ showValidation
192
+ onChange={(json) => console.log(json)}
193
+ />
194
+ ```
195
+
196
+ → [Vollständige Dokumentation](user-manuals/JsonEditor.de.md)
197
+
198
+ ---
199
+
200
+ ## TypeScript
201
+
202
+ Alle Typen und Defaults werden direkt exportiert — kein separates `@types/...`-Paket nötig.
203
+
204
+ ```tsx
205
+ import type {
206
+ GanttTask,
207
+ ConfirmDialogOptions,
208
+ JsonEditorHighlightColors,
209
+ SqlEditorProps,
210
+ RichTextEditorTranslation,
211
+ } from '@thebuoyant-tsdev/mui-ts-library';
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Entwicklung
217
+
218
+ Für lokales Setup, Storybook, Tests und Publish-Anleitung: [DEVELOPMENT.md](DEVELOPMENT.md).
219
+
220
+ ---
221
+
222
+ ## Lizenz
223
+
224
+ MIT © Thomas Schlender
package/README.md ADDED
@@ -0,0 +1,224 @@
1
+ # mui-ts-library
2
+
3
+ > [Deutsche Version →](README.de.md)
4
+
5
+ A type-safe React component library built on **TypeScript** and **MUI (Material UI v9)**. Components follow MUI's design language, support dark mode and theming out of the box, and ship with complete TypeScript types, Storybook stories, and unit tests.
6
+
7
+ ---
8
+
9
+ ## Components
10
+
11
+ | Component | Description | Docs |
12
+ |---|---|---|
13
+ | [`ConfirmDialog`](#confirmdialog) | Declarative async confirmation dialog — `await confirm({ title, severity })` from anywhere in the app | [Full Manual →](user-manuals/ConfirmDialog.md) |
14
+ | [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, zoom, and built-in CRUD dialogs | [Full Manual →](user-manuals/GanttChart.md) |
15
+ | [`TagSelection`](#tagselection) | Multi-tag selector with autocomplete, free tag creation, overflow chips, and MUI theme colors | [Full Manual →](user-manuals/TagSelection.md) |
16
+ | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Password input with animated strength meter and requirements checklist | [Full Manual →](user-manuals/PasswordStrengthMeter.md) |
17
+ | [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, and Markdown paste | [Full Manual →](user-manuals/RichTextEditor.md) |
18
+ | [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, and linting | [Full Manual →](user-manuals/SqlEditor.md) |
19
+ | [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, and Compact buttons | [Full Manual →](user-manuals/JsonEditor.md) |
20
+
21
+ ---
22
+
23
+ ## Installation
24
+
25
+ ### Step 1 — Get the package file
26
+
27
+ Clone this repository and run:
28
+
29
+ ```bash
30
+ npm install
31
+ npm run pack-release
32
+ ```
33
+
34
+ This builds the library and places a ready-to-use package file in the `releases/` folder:
35
+
36
+ ```
37
+ releases/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
38
+ ```
39
+
40
+ Share this file with your team via Slack, email, or a network drive.
41
+
42
+ ### Step 2 — Install in your project
43
+
44
+ Open a terminal in **your own React project** and run:
45
+
46
+ ```bash
47
+ npm install /path/to/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
48
+ ```
49
+
50
+ **Examples:**
51
+
52
+ ```bash
53
+ # File is in your Downloads folder
54
+ npm install ~/Downloads/thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
55
+
56
+ # File is next to your project folder
57
+ npm install ../thebuoyant-tsdev-mui-ts-library-1.3.0.tgz
58
+ ```
59
+
60
+ ### Step 3 — Install peer dependencies
61
+
62
+ If your project doesn't have MUI set up yet:
63
+
64
+ ```bash
65
+ npm install react@^19 react-dom@^19 @mui/material@^9 @emotion/react @emotion/styled @mui/icons-material@^9
66
+ ```
67
+
68
+ ### Step 4 — Done
69
+
70
+ Import any component and TypeScript types are included automatically:
71
+
72
+ ```tsx
73
+ import { GanttChart, JsonEditor, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Quick Start
79
+
80
+ Wrap your app in MUI's `ThemeProvider` as usual. `ConfirmDialog` additionally requires a `ConfirmDialogProvider` near the app root — all other components work without a provider.
81
+
82
+ ### ConfirmDialog
83
+
84
+ ```tsx
85
+ import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
86
+
87
+ // App root — once
88
+ <ConfirmDialogProvider>
89
+ <App />
90
+ </ConfirmDialogProvider>
91
+
92
+ // Anywhere inside
93
+ const confirm = useConfirm();
94
+ const ok = await confirm({ title: 'Delete entry?', severity: 'error', confirmLabel: 'Delete' });
95
+ if (ok) handleDelete();
96
+ ```
97
+
98
+ → [Full documentation](user-manuals/ConfirmDialog.md)
99
+
100
+ ---
101
+
102
+ ### GanttChart
103
+
104
+ ```tsx
105
+ import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
106
+ import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
107
+
108
+ const tasks: GanttTask[] = [
109
+ { id: '1', name: 'Phase 1', status: 'in-progress', startDate: new Date('2026-01-01'), endDate: new Date('2026-03-31') },
110
+ { id: '2', name: 'Go-Live', status: 'planned', startDate: new Date('2026-03-31'), endDate: new Date('2026-03-31'), isMilestone: true },
111
+ ];
112
+
113
+ <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable onTasksChange={save} />
114
+ ```
115
+
116
+ → [Full documentation](user-manuals/GanttChart.md)
117
+
118
+ ---
119
+
120
+ ### TagSelection
121
+
122
+ ```tsx
123
+ import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
124
+ import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
125
+
126
+ const tags: TagSelectionItem[] = [
127
+ { id: 'react', label: 'React', selected: true },
128
+ { id: 'ts', label: 'TypeScript' },
129
+ ];
130
+
131
+ <TagSelection tags={tags} onTagsChange={(selected) => console.log(selected)} />
132
+ ```
133
+
134
+ → [Full documentation](user-manuals/TagSelection.md)
135
+
136
+ ---
137
+
138
+ ### PasswordStrengthMeter
139
+
140
+ ```tsx
141
+ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
142
+
143
+ <PasswordStrengthMeter
144
+ passwordMinLength={10}
145
+ onPasswordChange={(password, result) => console.log(result.score)}
146
+ />
147
+ ```
148
+
149
+ → [Full documentation](user-manuals/PasswordStrengthMeter.md)
150
+
151
+ ---
152
+
153
+ ### RichTextEditor
154
+
155
+ ```tsx
156
+ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
157
+
158
+ <RichTextEditor
159
+ placeholder="Start typing…"
160
+ onChange={(html) => console.log(html)}
161
+ />
162
+ ```
163
+
164
+ → [Full documentation](user-manuals/RichTextEditor.md)
165
+
166
+ ---
167
+
168
+ ### SqlEditor
169
+
170
+ ```tsx
171
+ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
172
+
173
+ <SqlEditor
174
+ placeholder="Enter SQL query…"
175
+ dialect="postgresql"
176
+ onChange={(sql) => console.log(sql)}
177
+ />
178
+ ```
179
+
180
+ → [Full documentation](user-manuals/SqlEditor.md)
181
+
182
+ ---
183
+
184
+ ### JsonEditor
185
+
186
+ ```tsx
187
+ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
188
+
189
+ <JsonEditor
190
+ placeholder="Enter JSON…"
191
+ showValidation
192
+ onChange={(json) => console.log(json)}
193
+ />
194
+ ```
195
+
196
+ → [Full documentation](user-manuals/JsonEditor.md)
197
+
198
+ ---
199
+
200
+ ## TypeScript
201
+
202
+ All types and defaults are exported directly — no separate `@types/...` package needed.
203
+
204
+ ```tsx
205
+ import type {
206
+ GanttTask,
207
+ ConfirmDialogOptions,
208
+ JsonEditorHighlightColors,
209
+ SqlEditorProps,
210
+ RichTextEditorTranslation,
211
+ } from '@thebuoyant-tsdev/mui-ts-library';
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Development
217
+
218
+ For local setup, Storybook, tests, and publishing instructions, see [DEVELOPMENT.md](DEVELOPMENT.md).
219
+
220
+ ---
221
+
222
+ ## License
223
+
224
+ MIT © Thomas Schlender
@@ -0,0 +1,21 @@
1
+ import type React from "react";
2
+ export type ConfirmDialogSeverity = "info" | "warning" | "error" | "success";
3
+ export type ConfirmDialogTranslation = {
4
+ confirmLabel: string;
5
+ cancelLabel: string;
6
+ };
7
+ export declare const DEFAULT_CONFIRM_DIALOG_TRANSLATION: ConfirmDialogTranslation;
8
+ export type ConfirmDialogOptions = {
9
+ title?: string;
10
+ description?: string | React.ReactNode;
11
+ confirmLabel?: string;
12
+ cancelLabel?: string;
13
+ severity?: ConfirmDialogSeverity;
14
+ hideCancelButton?: boolean;
15
+ maxWidth?: "xs" | "sm" | "md" | "lg" | "xl";
16
+ showIcon?: boolean;
17
+ };
18
+ export type ConfirmDialogProviderProps = {
19
+ children: React.ReactNode;
20
+ translation?: Partial<ConfirmDialogTranslation>;
21
+ };
@@ -0,0 +1,5 @@
1
+ import type { ConfirmDialogOptions, ConfirmDialogProviderProps } from "./ConfirmDialog.types";
2
+ type ConfirmFn = (options: ConfirmDialogOptions) => Promise<boolean>;
3
+ export declare function ConfirmDialogProvider({ children, translation }: ConfirmDialogProviderProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function useConfirm(): ConfirmFn;
5
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const ROW_HEIGHT = 40;
2
+ export declare const HEADER_HEIGHT = 40;
3
+ export declare const LEFT_PANEL_WIDTH = 320;
4
+ export declare const COLUMN_WIDTH_DAY = 20;
5
+ export declare const COLUMN_WIDTH_WEEK = 40;
6
+ export declare const COLUMN_WIDTH_MONTH = 120;
7
+ export declare const COLUMN_WIDTH_QUARTER = 360;
8
+ export declare const BAR_HEIGHT = 16;
9
+ export declare const STATUS_COL_WIDTH = 90;
10
+ export declare const ACTIONS_COL_WIDTH = 96;
11
+ export declare const DIVIDER_WIDTH = 4;
@@ -0,0 +1,7 @@
1
+ import { type GanttChartStore } from "./GanttChart.store";
2
+ import type { GanttChartProps, GanttTheme, GanttTranslations } from "./GanttChart.types";
3
+ export declare function useGanttChartStore<T>(selector: (state: ReturnType<GanttChartStore["getState"]>) => T): T;
4
+ export declare function useRawGanttChartStore(): GanttChartStore;
5
+ export declare function useGanttTranslations(): GanttTranslations;
6
+ export declare function useGanttTheme(): GanttTheme;
7
+ export declare function GanttChart({ tasks, timeScale, initialExpandAll, showToolbar, defaultRangeStart, defaultRangeEnd, translations, enableBuiltinDialogs, toolbarConfig, zoomable, draggable, resizable, inlineEdit, progressDraggable, showCriticalPath, virtualizeRows, cascadeDependencies, statusColors, ganttTheme, onTaskClick, onMilestoneClick, onAddTask, onEditTask, onDeleteTask, onStatusChange, onTasksChange, onTaskMoved, onTaskResized, onTaskCreated, onTaskUpdated, onTaskDeleted, height, width, minPanelWidth, maxPanelWidth, }: GanttChartProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import type { GanttTask, GanttTaskNode, GanttTimeScale } from "./GanttChart.types";
2
+ import type { TimelineRange } from "./util/gantt-chart.util";
3
+ export type GanttChartStoreState = {
4
+ tasks: GanttTask[];
5
+ taskTree: GanttTaskNode[];
6
+ expandedIds: Set<string>;
7
+ timeScale: GanttTimeScale;
8
+ timelineRange: TimelineRange;
9
+ isRangeCustomized: boolean;
10
+ cascadeDependencies: boolean;
11
+ defaultTimeScale: GanttTimeScale;
12
+ initialExpandAll: boolean;
13
+ isExpandedCustomized: boolean;
14
+ setTasks: (tasks: GanttTask[]) => void;
15
+ addTask: (task: GanttTask) => void;
16
+ updateTask: (task: GanttTask) => void;
17
+ deleteTask: (taskId: string) => void;
18
+ toggleExpand: (taskId: string) => void;
19
+ expandAll: () => void;
20
+ collapseAll: () => void;
21
+ setTimeScale: (scale: GanttTimeScale) => void;
22
+ setTimelineRange: (range: TimelineRange) => void;
23
+ resetTimelineRange: () => void;
24
+ resetView: () => void;
25
+ getVisibleTasks: () => GanttTaskNode[];
26
+ };
27
+ export type GanttChartStore = ReturnType<typeof createGanttChartStore>;
28
+ export declare function createGanttChartStore(initialTasks: GanttTask[], initialTimeScale?: GanttTimeScale, initialExpandAll?: boolean, initialRange?: TimelineRange, cascadeDependencies?: boolean): import("zustand").StoreApi<GanttChartStoreState>;
@@ -0,0 +1,119 @@
1
+ export type GanttTaskStatus = "planned" | "in-progress" | "done" | "blocked";
2
+ export type GanttTimeScale = "days" | "weeks" | "months" | "quarters";
3
+ export type GanttTask = {
4
+ id: string;
5
+ parentId?: string;
6
+ name: string;
7
+ status: GanttTaskStatus;
8
+ startDate: Date;
9
+ endDate: Date;
10
+ dependencies?: string[];
11
+ isMilestone?: boolean;
12
+ progress?: number;
13
+ color?: string;
14
+ };
15
+ export type GanttTaskNode = GanttTask & {
16
+ children: GanttTaskNode[];
17
+ depth: number;
18
+ };
19
+ export type GanttTranslations = {
20
+ scaleDays: string;
21
+ scaleWeeks: string;
22
+ scaleMonths: string;
23
+ scaleQuarters: string;
24
+ rangeFrom: string;
25
+ rangeTo: string;
26
+ rangeResetTooltip: string;
27
+ columnName: string;
28
+ columnStatus: string;
29
+ statusPlanned: string;
30
+ statusInProgress: string;
31
+ statusDone: string;
32
+ statusBlocked: string;
33
+ weekColumnPrefix: string;
34
+ dateLocale: string;
35
+ dialogAddTitle: string;
36
+ dialogEditTitle: string;
37
+ dialogDeleteTitle: string;
38
+ dialogSave: string;
39
+ dialogCancel: string;
40
+ dialogDelete: string;
41
+ dialogFieldName: string;
42
+ dialogFieldStartDate: string;
43
+ dialogFieldEndDate: string;
44
+ dialogFieldStatus: string;
45
+ dialogFieldMilestone: string;
46
+ dialogFieldParent: string;
47
+ dialogFieldParentNone: string;
48
+ dialogDeleteConfirm: string;
49
+ dialogFieldDependencies: string;
50
+ dialogFieldDependenciesNone: string;
51
+ columnActions: string;
52
+ addTaskTooltip: string;
53
+ editTaskTooltip: string;
54
+ deleteTaskTooltip: string;
55
+ scrollToTodayTooltip: string;
56
+ expandAllTooltip: string;
57
+ collapseAllTooltip: string;
58
+ resetViewTooltip: string;
59
+ };
60
+ export declare const DEFAULT_GANTT_TRANSLATIONS: GanttTranslations;
61
+ export type GanttStatusColors = Partial<Record<GanttTaskStatus, string>>;
62
+ export type GanttTheme = {
63
+ statusColors?: GanttStatusColors;
64
+ criticalPathColor?: string;
65
+ milestoneColor?: string;
66
+ todayLineColor?: string;
67
+ weekendColor?: string;
68
+ barBorderRadius?: number;
69
+ };
70
+ export type GanttToolbarConfig = {
71
+ showScaleDays?: boolean;
72
+ showScaleWeeks?: boolean;
73
+ showScaleMonths?: boolean;
74
+ showScaleQuarters?: boolean;
75
+ showExpandCollapseAll?: boolean;
76
+ showScrollToToday?: boolean;
77
+ showDateRange?: boolean;
78
+ showRangeReset?: boolean;
79
+ showResetView?: boolean;
80
+ };
81
+ export type GanttChartProps = {
82
+ tasks: GanttTask[];
83
+ timeScale?: GanttTimeScale;
84
+ /** Höhe des Charts. "auto" = 100 % des Eltern-Containers. Standard: 400. */
85
+ height?: number | string;
86
+ /** Breite des Charts. "auto" = 100 % des Eltern-Containers. Standard: "100%". */
87
+ width?: number | string;
88
+ initialExpandAll?: boolean;
89
+ showToolbar?: boolean;
90
+ toolbarConfig?: GanttToolbarConfig;
91
+ defaultRangeStart?: Date;
92
+ defaultRangeEnd?: Date;
93
+ translations?: Partial<GanttTranslations>;
94
+ minPanelWidth?: number;
95
+ maxPanelWidth?: number;
96
+ enableBuiltinDialogs?: boolean;
97
+ zoomable?: boolean;
98
+ draggable?: boolean;
99
+ resizable?: boolean;
100
+ cascadeDependencies?: boolean;
101
+ showCriticalPath?: boolean;
102
+ inlineEdit?: boolean;
103
+ progressDraggable?: boolean;
104
+ virtualizeRows?: boolean;
105
+ statusColors?: GanttStatusColors;
106
+ ganttTheme?: GanttTheme;
107
+ onTaskClick?: (task: GanttTask) => void;
108
+ onMilestoneClick?: (task: GanttTask) => void;
109
+ onAddTask?: (parentTask?: GanttTask) => void;
110
+ onEditTask?: (task: GanttTask) => void;
111
+ onDeleteTask?: (task: GanttTask) => void;
112
+ onStatusChange?: (task: GanttTask, status: GanttTaskStatus) => void;
113
+ onTaskMoved?: (task: GanttTask, newStart: Date, newEnd: Date) => void;
114
+ onTaskResized?: (task: GanttTask, newEnd: Date) => void;
115
+ onTasksChange?: (tasks: GanttTask[]) => void;
116
+ onTaskCreated?: (task: GanttTask) => void;
117
+ onTaskUpdated?: (task: GanttTask) => void;
118
+ onTaskDeleted?: (taskId: string) => void;
119
+ };
@@ -0,0 +1,9 @@
1
+ import type { GanttTask } from "./GanttChart.types";
2
+ type GanttDeleteDialogProps = {
3
+ open: boolean;
4
+ task: GanttTask | null;
5
+ onConfirm: () => void;
6
+ onClose: () => void;
7
+ };
8
+ export declare function GanttDeleteDialog({ open, task, onConfirm, onClose }: GanttDeleteDialogProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { GanttTask } from "./GanttChart.types";
2
+ type GanttTaskDialogProps = {
3
+ open: boolean;
4
+ mode: "add" | "edit";
5
+ initialTask?: GanttTask;
6
+ defaultParentId?: string;
7
+ onSave: (data: Omit<GanttTask, "id">) => void;
8
+ onClose: () => void;
9
+ };
10
+ export declare function GanttTaskDialog({ open, mode, initialTask, defaultParentId, onSave, onClose, }: GanttTaskDialogProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};