@thebuoyant-tsdev/mui-ts-library 3.34.0 → 3.36.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 +19 -2
- package/README.md +19 -2
- package/dist/components/gantt-chart/GanttTaskPanel.js +66 -66
- package/dist/components/kanban-board/KanbanBoard.d.ts +1 -1
- package/dist/components/kanban-board/KanbanBoard.js +163 -88
- package/dist/components/kanban-board/KanbanBoard.types.d.ts +49 -0
- package/dist/components/kanban-board/KanbanBoard.types.js +10 -1
- package/dist/components/kanban-board/KanbanBoardCard.d.ts +3 -1
- package/dist/components/kanban-board/KanbanBoardCard.js +151 -91
- package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +2 -1
- package/dist/components/kanban-board/KanbanBoardCardDialog.js +162 -66
- package/dist/components/kanban-board/KanbanBoardColumn.d.ts +5 -1
- package/dist/components/kanban-board/KanbanBoardColumn.js +115 -54
- package/dist/components/kanban-board/KanbanBoardColumnDialog.d.ts +17 -0
- package/dist/components/kanban-board/KanbanBoardColumnDialog.js +78 -0
- package/dist/components/kanban-board/kanbanBoardClasses.d.ts +8 -0
- package/dist/components/kanban-board/kanbanBoardClasses.js +5 -1
- package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +32 -32
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +4 -4
- package/dist/index.cjs +2 -2
- package/package.json +6 -2
package/README.de.md
CHANGED
|
@@ -104,7 +104,7 @@ const tasks: GanttTask[] = [
|
|
|
104
104
|
|
|
105
105
|
### KanbanBoard
|
|
106
106
|
|
|
107
|
-
Ein Drag-and-Drop-Kanban-Board mit eingebauten Hinzufügen-/Bearbeiten-/Löschen-Dialogen, WIP-Limits und vollständiger i18n. Ideal für Task-Management-Dashboards, Sprint-Boards oder jeden Workflow, bei dem Nutzer Aufgaben zwischen Statusspalten verschieben sollen — mit Kartenfarben, Prioritäts-Punkten, Zuständige-Person-Chips, Fälligkeitsdatum-Chips mit Überfälligkeits-Warnung
|
|
107
|
+
Ein Drag-and-Drop-Kanban-Board mit eingebauten Hinzufügen-/Bearbeiten-/Löschen-Dialogen, WIP-Limits und vollständiger i18n. Ideal für Task-Management-Dashboards, Sprint-Boards oder jeden Workflow, bei dem Nutzer Aufgaben zwischen Statusspalten verschieben sollen — mit Kartenfarben, Prioritäts-Punkten, Zuständige-Person-Chips, Fälligkeitsdatum-Chips mit Überfälligkeits-Warnung, Subtask-Checkliste mit Fortschrittsbalken, eingebautem Suchfeld (`showSearchField`) oder `filterText`-Prop für Live-Filterung, und optionalem Spalten-Management (`enableColumnManagement`) zum Hinzufügen, Umbenennen und Löschen von Spalten direkt im Board.
|
|
108
108
|
|
|
109
109
|
```tsx
|
|
110
110
|
import { KanbanBoard } from '@thebuoyant-tsdev/mui-ts-library';
|
|
@@ -497,7 +497,7 @@ import type {
|
|
|
497
497
|
GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
|
|
498
498
|
|
|
499
499
|
// KanbanBoard
|
|
500
|
-
KanbanTask, KanbanColumn, KanbanBoardProps, KanbanBoardTranslation,
|
|
500
|
+
KanbanTask, KanbanSubtask, KanbanColumn, KanbanBoardProps, KanbanBoardTranslation,
|
|
501
501
|
|
|
502
502
|
// DateRangePicker
|
|
503
503
|
DateRange, DateRangeEntry, DateRangeInput, DateRangePickerProps, DateRangePickerTranslation,
|
|
@@ -555,6 +555,23 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/):
|
|
|
555
555
|
|
|
556
556
|
## Changelog
|
|
557
557
|
|
|
558
|
+
### [3.36.0] — 2026-07-21
|
|
559
|
+
|
|
560
|
+
**Hinzugefügt**
|
|
561
|
+
- **KanbanBoard — Spalten-Management-UI (`enableColumnManagement`)**: Neues Opt-in-Prop (Standard `false`). Wenn aktiviert, erhalten Spalten-Header bei Hover Umbenennen-/Löschen-Icon-Buttons und am rechten Board-Ende erscheint ein „Spalte hinzufügen"-Button. Umbenennen erfolgt inline; Löschen zeigt einen Bestätigungsdialog mit Karten-Anzahl-Warnung. Löschen einer Spalte entfernt auch alle ihre Karten. Neue Callbacks: `onColumnsChange`, `onColumnAdd`, `onColumnUpdate`, `onColumnDelete`. Sechs neue Translation-Keys, zwei neue CSS-Klassen. Siehe [Vollständiger Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.de.md) für Details.
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### [3.35.0] — 2026-07-20
|
|
566
|
+
|
|
567
|
+
**Hinzugefügt**
|
|
568
|
+
- **KanbanBoard — `subtasks` in `KanbanTask`**: Neues Feld `subtasks?: KanbanSubtask[]` — auf der Karte erscheint ein Fortschrittsbalken (`{erledigt} / {gesamt} ✓`), im Dialog eine Checkliste. Sichtbarkeit über `showSubtasks` steuerbar (Standard `true`).
|
|
569
|
+
- **KanbanBoard — Typ `KanbanSubtask`**: Neuer exportierter Typ `{ id: string; title: string; done: boolean }`.
|
|
570
|
+
- **KanbanBoard — `+`-Button in Subtask-Zeile**: Beim Hover erscheint ein kleiner `+`-Button mit Tooltip in der Fortschrittszeile der Karte, der den Bearbeiten-Dialog direkt öffnet.
|
|
571
|
+
- **KanbanBoard — CSS-Klassen**: `MuiTsKanbanBoard-cardSubtasks` und `MuiTsKanbanBoard-cardSubtasksBar`. Siehe [Vollständiger Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.de.md) für Details.
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
558
575
|
### [3.34.0] — 2026-07-18
|
|
559
576
|
|
|
560
577
|
**Hinzugefügt**
|
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ const tasks: GanttTask[] = [
|
|
|
104
104
|
|
|
105
105
|
### KanbanBoard
|
|
106
106
|
|
|
107
|
-
A drag-and-drop Kanban board with built-in Add / Edit / Delete dialogs, WIP limits, and full i18n. Use it for task management dashboards, sprint boards, or any workflow where users move work items between status columns — with card colors, priority dots, assignee chips, due-date chips with overdue highlighting,
|
|
107
|
+
A drag-and-drop Kanban board with built-in Add / Edit / Delete dialogs, WIP limits, and full i18n. Use it for task management dashboards, sprint boards, or any workflow where users move work items between status columns — with card colors, priority dots, assignee chips, due-date chips with overdue highlighting, a subtask checklist with progress bar, a built-in search field (`showSearchField`) or controlled `filterText` prop for live card filtering, and optional column management (`enableColumnManagement`) for adding, renaming, and deleting columns directly in the board.
|
|
108
108
|
|
|
109
109
|
```tsx
|
|
110
110
|
import { KanbanBoard } from '@thebuoyant-tsdev/mui-ts-library';
|
|
@@ -497,7 +497,7 @@ import type {
|
|
|
497
497
|
GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
|
|
498
498
|
|
|
499
499
|
// KanbanBoard
|
|
500
|
-
KanbanTask, KanbanColumn, KanbanBoardProps, KanbanBoardTranslation,
|
|
500
|
+
KanbanTask, KanbanSubtask, KanbanColumn, KanbanBoardProps, KanbanBoardTranslation,
|
|
501
501
|
|
|
502
502
|
// DateRangePicker
|
|
503
503
|
DateRange, DateRangeEntry, DateRangeInput, DateRangePickerProps, DateRangePickerTranslation,
|
|
@@ -555,6 +555,23 @@ This project follows [Semantic Versioning](https://semver.org/):
|
|
|
555
555
|
|
|
556
556
|
## Changelog
|
|
557
557
|
|
|
558
|
+
### [3.36.0] — 2026-07-21
|
|
559
|
+
|
|
560
|
+
**Added**
|
|
561
|
+
- **KanbanBoard — column management UI (`enableColumnManagement`)**: New opt-in prop (default `false`). When enabled, column headers show inline Rename / Delete icon buttons on hover and an "Add column" button appears at the right end of the board. Rename is inline in the header; delete shows a confirmation dialog with card-count warning. Deleting a column also removes all its cards. New callbacks: `onColumnsChange`, `onColumnAdd`, `onColumnUpdate`, `onColumnDelete`. Six new translation keys (`columnAddLabel`, `columnAddPlaceholder`, `columnDeleteConfirm`, `columnDeleteCardsWarning`, `columnRenameTooltip`, `columnDeleteTooltip`). Two new CSS classes: `MuiTsKanbanBoard-columnActions`, `MuiTsKanbanBoard-columnAddButton`. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### [3.35.0] — 2026-07-20
|
|
566
|
+
|
|
567
|
+
**Added**
|
|
568
|
+
- **KanbanBoard — `subtasks` on `KanbanTask`**: New `subtasks?: KanbanSubtask[]` field renders a progress bar (`{done} / {total} ✓`) on the card and a checklist in the Add/Edit dialog. Control visibility with `showSubtasks` (default `true`).
|
|
569
|
+
- **KanbanBoard — `KanbanSubtask` type**: New exported type `{ id: string; title: string; done: boolean }`.
|
|
570
|
+
- **KanbanBoard — subtask `+` button**: A small `+` button with tooltip appears on hover in the card's subtask progress row, opening the Edit dialog directly.
|
|
571
|
+
- **KanbanBoard — CSS classes**: `MuiTsKanbanBoard-cardSubtasks` and `MuiTsKanbanBoard-cardSubtasksBar`. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
558
575
|
### [3.34.0] — 2026-07-18
|
|
559
576
|
|
|
560
577
|
**Added**
|
|
@@ -2,12 +2,12 @@ import { filterByAssignee as e, getVisibleTasks as t } from "./util/gantt-chart.
|
|
|
2
2
|
import { STATUS_BAR_COLOR as n, STATUS_CHIP_COLOR as r } from "./GanttChart.constants.js";
|
|
3
3
|
import { GanttTaskDialog as i } from "./GanttTaskDialog.js";
|
|
4
4
|
import { GanttDeleteDialog as ee } from "./GanttDeleteDialog.js";
|
|
5
|
-
import { useGanttChartStore as a, useGanttTheme as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import x from "
|
|
10
|
-
import S from "@mui/icons-material/
|
|
5
|
+
import { useGanttChartStore as a, useGanttTheme as o, useGanttTranslations as te, useRawGanttChartStore as s } from "./GanttChart.js";
|
|
6
|
+
import c from "@mui/icons-material/Add";
|
|
7
|
+
import { Box as l, Chip as ne, IconButton as u, Menu as d, MenuItem as f, TextField as p, Tooltip as m, Typography as h } from "@mui/material";
|
|
8
|
+
import { useEffect as g, useMemo as _, useState as v } from "react";
|
|
9
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
|
+
import S from "@mui/icons-material/Delete";
|
|
11
11
|
import { useVirtualizer as C } from "@tanstack/react-virtual";
|
|
12
12
|
import w from "@mui/icons-material/Edit";
|
|
13
13
|
//#region src/components/gantt-chart/GanttTaskPanel.tsx
|
|
@@ -19,11 +19,11 @@ function T(e, t) {
|
|
|
19
19
|
blocked: t.statusBlocked
|
|
20
20
|
}[e];
|
|
21
21
|
}
|
|
22
|
-
function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, showAssigneeColumn: a, onTaskClick:
|
|
23
|
-
let [A, j] =
|
|
22
|
+
function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, showAssigneeColumn: a, onTaskClick: s, onAddTask: g, onEditTask: _, onDeleteTask: y, onStatusChange: C, inlineEdit: E, onInlineRename: D, isSelected: O, onSelect: k }) {
|
|
23
|
+
let [A, j] = v(null), [M, N] = v(null), P = te(), { statusColors: F } = o(), I = () => {
|
|
24
24
|
M !== null && M.trim() && D?.(e, M.trim()), N(null);
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ x(l, {
|
|
27
27
|
className: "gantt-task-row",
|
|
28
28
|
"data-testid": `gantt-task-row-${e.id}`,
|
|
29
29
|
"aria-selected": O ?? !1,
|
|
@@ -35,16 +35,16 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
35
35
|
borderBottom: "1px solid",
|
|
36
36
|
borderRight: "1px solid",
|
|
37
37
|
borderColor: "divider",
|
|
38
|
-
cursor:
|
|
38
|
+
cursor: s ? "pointer" : "default",
|
|
39
39
|
bgcolor: O ? "action.selected" : void 0,
|
|
40
40
|
boxShadow: O ? (e) => `inset 3px 0 0 ${e.palette.primary.main}` : void 0,
|
|
41
|
-
"&:hover": { bgcolor: O ? "action.selected" :
|
|
41
|
+
"&:hover": { bgcolor: O ? "action.selected" : s ? "action.hover" : void 0 }
|
|
42
42
|
},
|
|
43
43
|
onClick: () => {
|
|
44
|
-
k?.(),
|
|
44
|
+
k?.(), s?.(e);
|
|
45
45
|
},
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ x(l, {
|
|
48
48
|
sx: {
|
|
49
49
|
flex: 1,
|
|
50
50
|
minWidth: 0,
|
|
@@ -56,14 +56,14 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
56
56
|
height: "100%"
|
|
57
57
|
},
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ b(l, {
|
|
60
60
|
sx: {
|
|
61
61
|
width: 16,
|
|
62
62
|
flexShrink: 0,
|
|
63
63
|
display: "flex",
|
|
64
64
|
justifyContent: "center"
|
|
65
65
|
},
|
|
66
|
-
children: e.children.length > 0 && /* @__PURE__ */
|
|
66
|
+
children: e.children.length > 0 && /* @__PURE__ */ b(l, {
|
|
67
67
|
component: "span",
|
|
68
68
|
sx: {
|
|
69
69
|
fontSize: 9,
|
|
@@ -76,7 +76,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
76
76
|
children: t.has(e.id) ? "▼" : "▶"
|
|
77
77
|
})
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ b(l, { sx: {
|
|
80
80
|
width: 8,
|
|
81
81
|
height: 8,
|
|
82
82
|
borderRadius: e.isMilestone ? 0 : "50%",
|
|
@@ -84,7 +84,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
84
84
|
flexShrink: 0,
|
|
85
85
|
bgcolor: e.color ?? F?.[e.status] ?? n[e.status] ?? "grey.400"
|
|
86
86
|
} }),
|
|
87
|
-
M === null ? /* @__PURE__ */
|
|
87
|
+
M === null ? /* @__PURE__ */ b(h, {
|
|
88
88
|
variant: "body2",
|
|
89
89
|
noWrap: !0,
|
|
90
90
|
sx: {
|
|
@@ -96,7 +96,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
96
96
|
t.stopPropagation(), N(e.name);
|
|
97
97
|
} : void 0,
|
|
98
98
|
children: e.name
|
|
99
|
-
}) : /* @__PURE__ */
|
|
99
|
+
}) : /* @__PURE__ */ b(p, {
|
|
100
100
|
size: "small",
|
|
101
101
|
variant: "standard",
|
|
102
102
|
value: M,
|
|
@@ -115,7 +115,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
115
115
|
})
|
|
116
116
|
]
|
|
117
117
|
}),
|
|
118
|
-
a && /* @__PURE__ */
|
|
118
|
+
a && /* @__PURE__ */ b(l, {
|
|
119
119
|
sx: {
|
|
120
120
|
width: 110,
|
|
121
121
|
flexShrink: 0,
|
|
@@ -124,14 +124,14 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
124
124
|
px: 1,
|
|
125
125
|
overflow: "hidden"
|
|
126
126
|
},
|
|
127
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ b(h, {
|
|
128
128
|
variant: "caption",
|
|
129
129
|
noWrap: !0,
|
|
130
130
|
color: e.assignee ? "text.primary" : "text.disabled",
|
|
131
131
|
children: e.assignee ?? "—"
|
|
132
132
|
})
|
|
133
133
|
}),
|
|
134
|
-
ee && /* @__PURE__ */
|
|
134
|
+
ee && /* @__PURE__ */ x(l, {
|
|
135
135
|
className: "gantt-row-actions",
|
|
136
136
|
sx: {
|
|
137
137
|
width: 96,
|
|
@@ -142,45 +142,45 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
142
142
|
pr: .5
|
|
143
143
|
},
|
|
144
144
|
children: [
|
|
145
|
-
|
|
145
|
+
_ && /* @__PURE__ */ b(m, {
|
|
146
146
|
title: P.editTaskTooltip,
|
|
147
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ b(u, {
|
|
148
148
|
size: "small",
|
|
149
149
|
"aria-label": P.editTaskTooltip,
|
|
150
150
|
"data-testid": `gantt-edit-task-${e.id}`,
|
|
151
151
|
onClick: (t) => {
|
|
152
|
-
t.stopPropagation(),
|
|
152
|
+
t.stopPropagation(), _(e);
|
|
153
153
|
},
|
|
154
|
-
children: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ b(w, { fontSize: "inherit" })
|
|
155
155
|
})
|
|
156
156
|
}),
|
|
157
|
-
|
|
157
|
+
g && /* @__PURE__ */ b(m, {
|
|
158
158
|
title: P.addTaskTooltip,
|
|
159
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ b(u, {
|
|
160
160
|
size: "small",
|
|
161
161
|
"aria-label": P.addTaskTooltip,
|
|
162
162
|
"data-testid": `gantt-add-task-${e.id}`,
|
|
163
163
|
onClick: (t) => {
|
|
164
|
-
t.stopPropagation(),
|
|
164
|
+
t.stopPropagation(), g(e);
|
|
165
165
|
},
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ b(c, { fontSize: "inherit" })
|
|
167
167
|
})
|
|
168
168
|
}),
|
|
169
|
-
|
|
169
|
+
y && /* @__PURE__ */ b(m, {
|
|
170
170
|
title: P.deleteTaskTooltip,
|
|
171
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ b(u, {
|
|
172
172
|
size: "small",
|
|
173
173
|
"aria-label": P.deleteTaskTooltip,
|
|
174
174
|
"data-testid": `gantt-delete-task-${e.id}`,
|
|
175
175
|
onClick: (t) => {
|
|
176
|
-
t.stopPropagation(),
|
|
176
|
+
t.stopPropagation(), y(e);
|
|
177
177
|
},
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ b(S, { fontSize: "inherit" })
|
|
179
179
|
})
|
|
180
180
|
})
|
|
181
181
|
]
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ x(l, {
|
|
184
184
|
sx: {
|
|
185
185
|
width: 90,
|
|
186
186
|
flexShrink: 0,
|
|
@@ -188,7 +188,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
188
188
|
alignItems: "center",
|
|
189
189
|
justifyContent: "center"
|
|
190
190
|
},
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ b(ne, {
|
|
192
192
|
label: T(e.status, P),
|
|
193
193
|
size: "small",
|
|
194
194
|
variant: "outlined",
|
|
@@ -205,7 +205,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
205
205
|
onClick: C ? (e) => {
|
|
206
206
|
e.stopPropagation(), j(e.currentTarget);
|
|
207
207
|
} : void 0
|
|
208
|
-
}), C && /* @__PURE__ */
|
|
208
|
+
}), C && /* @__PURE__ */ b(d, {
|
|
209
209
|
anchorEl: A,
|
|
210
210
|
open: !!A,
|
|
211
211
|
onClose: () => j(null),
|
|
@@ -214,7 +214,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
214
214
|
"in-progress",
|
|
215
215
|
"done",
|
|
216
216
|
"blocked"
|
|
217
|
-
].map((t) => /* @__PURE__ */
|
|
217
|
+
].map((t) => /* @__PURE__ */ b(f, {
|
|
218
218
|
selected: e.status === t,
|
|
219
219
|
onClick: () => {
|
|
220
220
|
C(e, t), j(null);
|
|
@@ -226,8 +226,8 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
|
|
|
226
226
|
]
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
function D({ scrollRef: n, onScroll: r, panelWidth:
|
|
230
|
-
let A =
|
|
229
|
+
function D({ scrollRef: n, onScroll: r, panelWidth: o, onTaskClick: c, onAddTask: ne, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m, onTaskCreated: S, onTaskUpdated: w, onTaskDeleted: T, inlineEdit: D, virtualizeRows: O = !1, showAssigneeColumn: k = !1 }) {
|
|
230
|
+
let A = te(), j = s(), M = a((e) => e.taskTree), N = a((e) => e.expandedIds), P = a((e) => e.toggleExpand), F = a((e) => e.timeScale), I = a((e) => e.addTask), re = a((e) => e.updateTask), ie = a((e) => e.deleteTask), L = a((e) => e.assigneeFilter), R = _(() => {
|
|
231
231
|
let n = t(M, N);
|
|
232
232
|
return L ? e(n, L) : n;
|
|
233
233
|
}, [
|
|
@@ -239,7 +239,7 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
239
239
|
getScrollElement: () => n.current,
|
|
240
240
|
estimateSize: () => 40,
|
|
241
241
|
overscan: 5
|
|
242
|
-
}), [ae, B] =
|
|
242
|
+
}), [ae, B] = v(!1), [oe, V] = v(!1), [se, H] = v(!1), [U, W] = v(null), ce = (e) => {
|
|
243
243
|
let t = {
|
|
244
244
|
...e,
|
|
245
245
|
id: crypto.randomUUID()
|
|
@@ -260,14 +260,14 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
260
260
|
name: t
|
|
261
261
|
};
|
|
262
262
|
re(n), p?.(j.getState().tasks), w?.(n);
|
|
263
|
-
}, K =
|
|
263
|
+
}, K = m ? (e) => {
|
|
264
264
|
W(e), B(!0);
|
|
265
|
-
} :
|
|
265
|
+
} : ne, q = m ? (e) => {
|
|
266
266
|
W(e), V(!0);
|
|
267
|
-
} : u, J =
|
|
267
|
+
} : u, J = m ? (e) => {
|
|
268
268
|
W(e), H(!0);
|
|
269
|
-
} : d, Y = !!(K || q || J), X = F === "days" ? 80 : 40, [Z, Q] =
|
|
270
|
-
|
|
269
|
+
} : d, Y = !!(K || q || J), X = F === "days" ? 80 : 40, [Z, Q] = v(null), $ = Z ? R.findIndex((e) => e.id === Z) : -1;
|
|
270
|
+
g(() => {
|
|
271
271
|
if ($ < 0 || !n.current) return;
|
|
272
272
|
let e = n.current, t = X + $ * 40, r = t + 40;
|
|
273
273
|
t < e.scrollTop ? e.scrollTop = t : r > e.scrollTop + e.clientHeight && (e.scrollTop = r - e.clientHeight);
|
|
@@ -281,21 +281,21 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
281
281
|
let t = R.length;
|
|
282
282
|
t !== 0 && (e.key === "ArrowDown" ? (e.preventDefault(), Q(R[Math.min($ < 0 ? 0 : $ + 1, t - 1)].id)) : e.key === "ArrowUp" ? (e.preventDefault(), Q(R[Math.max($ <= 0 ? 0 : $ - 1, 0)].id)) : e.key === "Enter" && $ >= 0 ? (e.preventDefault(), q?.(R[$])) : e.key === "Escape" && Q(null));
|
|
283
283
|
}
|
|
284
|
-
return /* @__PURE__ */
|
|
284
|
+
return /* @__PURE__ */ x(l, {
|
|
285
285
|
ref: n,
|
|
286
286
|
onScroll: r,
|
|
287
287
|
tabIndex: 0,
|
|
288
288
|
"data-testid": "gantt-task-panel",
|
|
289
289
|
onKeyDown: de,
|
|
290
290
|
sx: {
|
|
291
|
-
width:
|
|
291
|
+
width: o,
|
|
292
292
|
flexShrink: 0,
|
|
293
293
|
overflowY: "auto",
|
|
294
294
|
overflowX: "hidden",
|
|
295
295
|
outline: "none"
|
|
296
296
|
},
|
|
297
297
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ x(l, {
|
|
299
299
|
sx: {
|
|
300
300
|
height: X,
|
|
301
301
|
position: "sticky",
|
|
@@ -308,7 +308,7 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
308
308
|
display: "flex",
|
|
309
309
|
flexDirection: "column"
|
|
310
310
|
},
|
|
311
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ x(l, {
|
|
312
312
|
sx: {
|
|
313
313
|
height: 40,
|
|
314
314
|
display: "flex",
|
|
@@ -318,19 +318,19 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
318
318
|
borderColor: F === "days" ? "divider" : void 0
|
|
319
319
|
},
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ b(l, {
|
|
322
322
|
sx: {
|
|
323
323
|
flex: 1,
|
|
324
324
|
minWidth: 0,
|
|
325
325
|
pl: 2
|
|
326
326
|
},
|
|
327
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ b(h, {
|
|
328
328
|
variant: "caption",
|
|
329
329
|
color: "text.secondary",
|
|
330
330
|
children: A.columnName
|
|
331
331
|
})
|
|
332
332
|
}),
|
|
333
|
-
k && /* @__PURE__ */
|
|
333
|
+
k && /* @__PURE__ */ b(l, {
|
|
334
334
|
sx: {
|
|
335
335
|
width: 110,
|
|
336
336
|
flexShrink: 0,
|
|
@@ -338,13 +338,13 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
338
338
|
alignItems: "center",
|
|
339
339
|
px: 1
|
|
340
340
|
},
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ b(h, {
|
|
342
342
|
variant: "caption",
|
|
343
343
|
color: "text.secondary",
|
|
344
344
|
children: A.columnAssignee
|
|
345
345
|
})
|
|
346
346
|
}),
|
|
347
|
-
Y && /* @__PURE__ */
|
|
347
|
+
Y && /* @__PURE__ */ b(l, {
|
|
348
348
|
sx: {
|
|
349
349
|
width: 96,
|
|
350
350
|
flexShrink: 0,
|
|
@@ -352,13 +352,13 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
352
352
|
alignItems: "center",
|
|
353
353
|
justifyContent: "center"
|
|
354
354
|
},
|
|
355
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ b(h, {
|
|
356
356
|
variant: "caption",
|
|
357
357
|
color: "text.secondary",
|
|
358
358
|
children: A.columnActions
|
|
359
359
|
})
|
|
360
360
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ b(l, {
|
|
362
362
|
sx: {
|
|
363
363
|
width: 90,
|
|
364
364
|
flexShrink: 0,
|
|
@@ -366,21 +366,21 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
366
366
|
alignItems: "center",
|
|
367
367
|
justifyContent: "center"
|
|
368
368
|
},
|
|
369
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ b(h, {
|
|
370
370
|
variant: "caption",
|
|
371
371
|
color: "text.secondary",
|
|
372
372
|
children: A.columnStatus
|
|
373
373
|
})
|
|
374
374
|
})
|
|
375
375
|
]
|
|
376
|
-
}), F === "days" && /* @__PURE__ */
|
|
376
|
+
}), F === "days" && /* @__PURE__ */ b(l, { sx: { flex: 1 } })]
|
|
377
377
|
}),
|
|
378
|
-
O ? /* @__PURE__ */
|
|
378
|
+
O ? /* @__PURE__ */ b(l, {
|
|
379
379
|
sx: {
|
|
380
380
|
position: "relative",
|
|
381
381
|
height: z.getTotalSize()
|
|
382
382
|
},
|
|
383
|
-
children: z.getVirtualItems().map((e) => /* @__PURE__ */
|
|
383
|
+
children: z.getVirtualItems().map((e) => /* @__PURE__ */ b(l, {
|
|
384
384
|
style: {
|
|
385
385
|
position: "absolute",
|
|
386
386
|
top: 0,
|
|
@@ -389,7 +389,7 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
389
389
|
height: 40,
|
|
390
390
|
transform: `translateY(${e.start}px)`
|
|
391
391
|
},
|
|
392
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ b(E, {
|
|
393
393
|
task: R[e.index],
|
|
394
394
|
expandedIds: N,
|
|
395
395
|
toggleExpand: P,
|
|
@@ -406,7 +406,7 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
406
406
|
onSelect: () => Q(R[e.index].id)
|
|
407
407
|
})
|
|
408
408
|
}, e.key))
|
|
409
|
-
}) : R.map((e) => /* @__PURE__ */
|
|
409
|
+
}) : R.map((e) => /* @__PURE__ */ b(E, {
|
|
410
410
|
task: e,
|
|
411
411
|
expandedIds: N,
|
|
412
412
|
toggleExpand: P,
|
|
@@ -422,22 +422,22 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
|
|
|
422
422
|
isSelected: e.id === Z,
|
|
423
423
|
onSelect: () => Q(e.id)
|
|
424
424
|
}, e.id)),
|
|
425
|
-
|
|
426
|
-
/* @__PURE__ */
|
|
425
|
+
m && /* @__PURE__ */ x(y, { children: [
|
|
426
|
+
/* @__PURE__ */ b(i, {
|
|
427
427
|
open: ae,
|
|
428
428
|
mode: "add",
|
|
429
429
|
defaultParentId: U?.id,
|
|
430
430
|
onSave: ce,
|
|
431
431
|
onClose: () => B(!1)
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ b(i, {
|
|
434
434
|
open: oe,
|
|
435
435
|
mode: "edit",
|
|
436
436
|
initialTask: U ?? void 0,
|
|
437
437
|
onSave: le,
|
|
438
438
|
onClose: () => V(!1)
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ b(ee, {
|
|
441
441
|
open: se,
|
|
442
442
|
task: U,
|
|
443
443
|
onConfirm: ue,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type KanbanBoardProps } from "./KanbanBoard.types";
|
|
2
|
-
export declare function KanbanBoard({ tasks, columns, onTasksChange, onCardClick, enableBuiltinDialogs, onTaskCreated, onTaskUpdated, onTaskDeleted, onTaskMoved, showPriority, showAssignee, showDueDate, showDueDateWarning, chipVariant, showSearchField, filterText, width, height, translation, }: KanbanBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function KanbanBoard({ tasks, columns, onTasksChange, onCardClick, enableBuiltinDialogs, enableColumnManagement, onTaskCreated, onTaskUpdated, onTaskDeleted, onTaskMoved, onColumnsChange, onColumnAdd, onColumnUpdate, onColumnDelete, showPriority, showAssignee, showDueDate, showDueDateWarning, showSubtasks, chipVariant, showSearchField, filterText, width, height, translation, }: KanbanBoardProps): import("react/jsx-runtime").JSX.Element;
|