@thebuoyant-tsdev/mui-ts-library 3.34.0 → 3.35.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 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 und `filterText`-Prop für Live-Suche.
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 und eingebautem Suchfeld (`showSearchField`) oder `filterText`-Prop für Live-Filterung.
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,16 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/):
555
555
 
556
556
  ## Changelog
557
557
 
558
+ ### [3.35.0] — 2026-07-20
559
+
560
+ **Hinzugefügt**
561
+ - **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`).
562
+ - **KanbanBoard — Typ `KanbanSubtask`**: Neuer exportierter Typ `{ id: string; title: string; done: boolean }`.
563
+ - **KanbanBoard — `+`-Button in Subtask-Zeile**: Beim Hover erscheint ein kleiner `+`-Button mit Tooltip in der Fortschrittszeile der Karte, der den Bearbeiten-Dialog direkt öffnet.
564
+ - **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.
565
+
566
+ ---
567
+
558
568
  ### [3.34.0] — 2026-07-18
559
569
 
560
570
  **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, and a `filterText` prop for live card search.
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, and a built-in search field (`showSearchField`) or controlled `filterText` prop for live card filtering.
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,16 @@ This project follows [Semantic Versioning](https://semver.org/):
555
555
 
556
556
  ## Changelog
557
557
 
558
+ ### [3.35.0] — 2026-07-20
559
+
560
+ **Added**
561
+ - **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`).
562
+ - **KanbanBoard — `KanbanSubtask` type**: New exported type `{ id: string; title: string; done: boolean }`.
563
+ - **KanbanBoard — subtask `+` button**: A small `+` button with tooltip appears on hover in the card's subtask progress row, opening the Edit dialog directly.
564
+ - **KanbanBoard — CSS classes**: `MuiTsKanbanBoard-cardSubtasks` and `MuiTsKanbanBoard-cardSubtasksBar`. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
565
+
566
+ ---
567
+
558
568
  ### [3.34.0] — 2026-07-18
559
569
 
560
570
  **Added**
@@ -5,9 +5,9 @@ import { GanttDeleteDialog as ee } from "./GanttDeleteDialog.js";
5
5
  import { useGanttChartStore as a, useGanttTheme as te, useGanttTranslations as ne, useRawGanttChartStore as o } from "./GanttChart.js";
6
6
  import { Box as s, Chip as c, IconButton as l, Menu as u, MenuItem as d, TextField as f, Tooltip as p, Typography as m } from "@mui/material";
7
7
  import { useEffect as h, useMemo as g, useState as _ } from "react";
8
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import x from "@mui/icons-material/Delete";
10
- import S from "@mui/icons-material/Add";
8
+ import v from "@mui/icons-material/Add";
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: o, onAddTask: h, onEditTask: g, onDeleteTask: v, onStatusChange: C, inlineEdit: E, onInlineRename: D, isSelected: O, onSelect: k }) {
22
+ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, showAssigneeColumn: a, onTaskClick: o, onAddTask: h, onEditTask: g, onDeleteTask: y, onStatusChange: C, inlineEdit: E, onInlineRename: D, isSelected: O, onSelect: k }) {
23
23
  let [A, j] = _(null), [M, N] = _(null), P = ne(), { statusColors: F } = te(), I = () => {
24
24
  M !== null && M.trim() && D?.(e, M.trim()), N(null);
25
25
  };
26
- return /* @__PURE__ */ b(s, {
26
+ return /* @__PURE__ */ x(s, {
27
27
  className: "gantt-task-row",
28
28
  "data-testid": `gantt-task-row-${e.id}`,
29
29
  "aria-selected": O ?? !1,
@@ -44,7 +44,7 @@ function E({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: ee, sho
44
44
  k?.(), o?.(e);
45
45
  },
46
46
  children: [
47
- /* @__PURE__ */ b(s, {
47
+ /* @__PURE__ */ x(s, {
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__ */ y(s, {
59
+ /* @__PURE__ */ b(s, {
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__ */ y(s, {
66
+ children: e.children.length > 0 && /* @__PURE__ */ b(s, {
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__ */ y(s, { sx: {
79
+ /* @__PURE__ */ b(s, { 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__ */ y(m, {
87
+ M === null ? /* @__PURE__ */ b(m, {
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__ */ y(f, {
99
+ }) : /* @__PURE__ */ b(f, {
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__ */ y(s, {
118
+ a && /* @__PURE__ */ b(s, {
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__ */ y(m, {
127
+ children: /* @__PURE__ */ b(m, {
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__ */ b(s, {
134
+ ee && /* @__PURE__ */ x(s, {
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
- g && /* @__PURE__ */ y(p, {
145
+ g && /* @__PURE__ */ b(p, {
146
146
  title: P.editTaskTooltip,
147
- children: /* @__PURE__ */ y(l, {
147
+ children: /* @__PURE__ */ b(l, {
148
148
  size: "small",
149
149
  "aria-label": P.editTaskTooltip,
150
150
  "data-testid": `gantt-edit-task-${e.id}`,
151
151
  onClick: (t) => {
152
152
  t.stopPropagation(), g(e);
153
153
  },
154
- children: /* @__PURE__ */ y(w, { fontSize: "inherit" })
154
+ children: /* @__PURE__ */ b(w, { fontSize: "inherit" })
155
155
  })
156
156
  }),
157
- h && /* @__PURE__ */ y(p, {
157
+ h && /* @__PURE__ */ b(p, {
158
158
  title: P.addTaskTooltip,
159
- children: /* @__PURE__ */ y(l, {
159
+ children: /* @__PURE__ */ b(l, {
160
160
  size: "small",
161
161
  "aria-label": P.addTaskTooltip,
162
162
  "data-testid": `gantt-add-task-${e.id}`,
163
163
  onClick: (t) => {
164
164
  t.stopPropagation(), h(e);
165
165
  },
166
- children: /* @__PURE__ */ y(S, { fontSize: "inherit" })
166
+ children: /* @__PURE__ */ b(v, { fontSize: "inherit" })
167
167
  })
168
168
  }),
169
- v && /* @__PURE__ */ y(p, {
169
+ y && /* @__PURE__ */ b(p, {
170
170
  title: P.deleteTaskTooltip,
171
- children: /* @__PURE__ */ y(l, {
171
+ children: /* @__PURE__ */ b(l, {
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(), v(e);
176
+ t.stopPropagation(), y(e);
177
177
  },
178
- children: /* @__PURE__ */ y(x, { fontSize: "inherit" })
178
+ children: /* @__PURE__ */ b(S, { fontSize: "inherit" })
179
179
  })
180
180
  })
181
181
  ]
182
182
  }),
183
- /* @__PURE__ */ b(s, {
183
+ /* @__PURE__ */ x(s, {
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__ */ y(c, {
191
+ children: [/* @__PURE__ */ b(c, {
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__ */ y(u, {
208
+ }), C && /* @__PURE__ */ b(u, {
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__ */ y(d, {
217
+ ].map((t) => /* @__PURE__ */ b(d, {
218
218
  selected: e.status === t,
219
219
  onClick: () => {
220
220
  C(e, t), j(null);
@@ -226,7 +226,7 @@ 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: te, onTaskClick: c, onAddTask: l, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: x, onTaskCreated: S, onTaskUpdated: w, onTaskDeleted: T, inlineEdit: D, virtualizeRows: O = !1, showAssigneeColumn: k = !1 }) {
229
+ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTask: l, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: v, onTaskCreated: S, onTaskUpdated: w, onTaskDeleted: T, inlineEdit: D, virtualizeRows: O = !1, showAssigneeColumn: k = !1 }) {
230
230
  let A = ne(), j = o(), 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 = g(() => {
231
231
  let n = t(M, N);
232
232
  return L ? e(n, L) : n;
@@ -260,11 +260,11 @@ 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 = x ? (e) => {
263
+ }, K = v ? (e) => {
264
264
  W(e), B(!0);
265
- } : l, q = x ? (e) => {
265
+ } : l, q = v ? (e) => {
266
266
  W(e), V(!0);
267
- } : u, J = x ? (e) => {
267
+ } : u, J = v ? (e) => {
268
268
  W(e), H(!0);
269
269
  } : d, Y = !!(K || q || J), X = F === "days" ? 80 : 40, [Z, Q] = _(null), $ = Z ? R.findIndex((e) => e.id === Z) : -1;
270
270
  h(() => {
@@ -281,7 +281,7 @@ 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__ */ b(s, {
284
+ return /* @__PURE__ */ x(s, {
285
285
  ref: n,
286
286
  onScroll: r,
287
287
  tabIndex: 0,
@@ -295,7 +295,7 @@ function D({ scrollRef: n, onScroll: r, panelWidth: te, onTaskClick: c, onAddTas
295
295
  outline: "none"
296
296
  },
297
297
  children: [
298
- /* @__PURE__ */ b(s, {
298
+ /* @__PURE__ */ x(s, {
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__ */ b(s, {
311
+ children: [/* @__PURE__ */ x(s, {
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__ */ y(s, {
321
+ /* @__PURE__ */ b(s, {
322
322
  sx: {
323
323
  flex: 1,
324
324
  minWidth: 0,
325
325
  pl: 2
326
326
  },
327
- children: /* @__PURE__ */ y(m, {
327
+ children: /* @__PURE__ */ b(m, {
328
328
  variant: "caption",
329
329
  color: "text.secondary",
330
330
  children: A.columnName
331
331
  })
332
332
  }),
333
- k && /* @__PURE__ */ y(s, {
333
+ k && /* @__PURE__ */ b(s, {
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__ */ y(m, {
341
+ children: /* @__PURE__ */ b(m, {
342
342
  variant: "caption",
343
343
  color: "text.secondary",
344
344
  children: A.columnAssignee
345
345
  })
346
346
  }),
347
- Y && /* @__PURE__ */ y(s, {
347
+ Y && /* @__PURE__ */ b(s, {
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__ */ y(m, {
355
+ children: /* @__PURE__ */ b(m, {
356
356
  variant: "caption",
357
357
  color: "text.secondary",
358
358
  children: A.columnActions
359
359
  })
360
360
  }),
361
- /* @__PURE__ */ y(s, {
361
+ /* @__PURE__ */ b(s, {
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__ */ y(m, {
369
+ children: /* @__PURE__ */ b(m, {
370
370
  variant: "caption",
371
371
  color: "text.secondary",
372
372
  children: A.columnStatus
373
373
  })
374
374
  })
375
375
  ]
376
- }), F === "days" && /* @__PURE__ */ y(s, { sx: { flex: 1 } })]
376
+ }), F === "days" && /* @__PURE__ */ b(s, { sx: { flex: 1 } })]
377
377
  }),
378
- O ? /* @__PURE__ */ y(s, {
378
+ O ? /* @__PURE__ */ b(s, {
379
379
  sx: {
380
380
  position: "relative",
381
381
  height: z.getTotalSize()
382
382
  },
383
- children: z.getVirtualItems().map((e) => /* @__PURE__ */ y(s, {
383
+ children: z.getVirtualItems().map((e) => /* @__PURE__ */ b(s, {
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__ */ y(E, {
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__ */ y(E, {
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
- x && /* @__PURE__ */ b(v, { children: [
426
- /* @__PURE__ */ y(i, {
425
+ v && /* @__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__ */ y(i, {
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__ */ y(ee, {
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, onTaskCreated, onTaskUpdated, onTaskDeleted, onTaskMoved, showPriority, showAssignee, showDueDate, showDueDateWarning, showSubtasks, chipVariant, showSearchField, filterText, width, height, translation, }: KanbanBoardProps): import("react/jsx-runtime").JSX.Element;
@@ -4,119 +4,119 @@ import { KanbanBoardCard as n } from "./KanbanBoardCard.js";
4
4
  import { KanbanBoardCardDialog as r } from "./KanbanBoardCardDialog.js";
5
5
  import { KanbanBoardColumn as i } from "./KanbanBoardColumn.js";
6
6
  import { DndContext as a, DragOverlay as o, KeyboardSensor as s, PointerSensor as c, closestCorners as l, useSensor as u, useSensors as d } from "@dnd-kit/core";
7
- import { arrayMove as f, sortableKeyboardCoordinates as p } from "@dnd-kit/sortable";
8
- import m from "@mui/icons-material/Search";
9
- import { Box as h, InputAdornment as g, TextField as ee } from "@mui/material";
7
+ import { arrayMove as ee, sortableKeyboardCoordinates as f } from "@dnd-kit/sortable";
8
+ import p from "@mui/icons-material/Search";
9
+ import { Box as m, InputAdornment as h, TextField as g } from "@mui/material";
10
10
  import { useEffect as _, useState as v } from "react";
11
11
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
12
12
  //#region src/components/kanban-board/KanbanBoard.tsx
13
- function x({ tasks: x, columns: S, onTasksChange: C, onCardClick: w, enableBuiltinDialogs: T = !0, onTaskCreated: E, onTaskUpdated: D, onTaskDeleted: O, onTaskMoved: k, showPriority: A = !0, showAssignee: j = !0, showDueDate: M = !0, showDueDateWarning: N = !0, chipVariant: P = "outlined", showSearchField: F = !1, filterText: I = "", width: L = "100%", height: R = "100%", translation: z }) {
14
- let B = {
13
+ function x({ tasks: x, columns: S, onTasksChange: C, onCardClick: w, enableBuiltinDialogs: T = !0, onTaskCreated: E, onTaskUpdated: D, onTaskDeleted: O, onTaskMoved: k, showPriority: A = !0, showAssignee: j = !0, showDueDate: M = !0, showDueDateWarning: N = !0, showSubtasks: P = !0, chipVariant: F = "outlined", showSearchField: I = !1, filterText: L = "", width: R = "100%", height: z = "100%", translation: B }) {
14
+ let V = {
15
15
  ...t,
16
- ...z
17
- }, [V, H] = v(x);
16
+ ...B
17
+ }, [H, U] = v(x);
18
18
  _(() => {
19
- H(x);
19
+ U(x);
20
20
  }, [x]);
21
- let [U, W] = v(null), [G, K] = v(null), [q, J] = v(""), Y = d(u(c, { activationConstraint: { distance: 8 } }), u(s, { coordinateGetter: p }));
22
- function X({ active: e }) {
23
- W(V.find((t) => t.id === e.id) ?? null);
21
+ let [W, G] = v(null), [K, q] = v(null), [J, Y] = v(""), X = d(u(c, { activationConstraint: { distance: 8 } }), u(s, { coordinateGetter: f }));
22
+ function Z({ active: e }) {
23
+ G(H.find((t) => t.id === e.id) ?? null);
24
24
  }
25
- function Z({ active: e, over: t }) {
25
+ function Q({ active: e, over: t }) {
26
26
  if (!t) return;
27
- let n = e.id, r = t.id, i = V.find((e) => e.id === n);
27
+ let n = e.id, r = t.id, i = H.find((e) => e.id === n);
28
28
  if (!i) return;
29
- let a = S.find((e) => e.id === r), o = V.find((e) => e.id === r), s = a?.id ?? o?.status;
30
- !s || i.status === s || H((e) => e.map((e) => e.id === n ? {
29
+ let a = S.find((e) => e.id === r), o = H.find((e) => e.id === r), s = a?.id ?? o?.status;
30
+ !s || i.status === s || U((e) => e.map((e) => e.id === n ? {
31
31
  ...e,
32
32
  status: s
33
33
  } : e));
34
34
  }
35
- function Q({ active: e, over: t }) {
36
- let n = U?.status;
37
- if (W(null), !t) {
38
- H(x);
35
+ function te({ active: e, over: t }) {
36
+ let n = W?.status;
37
+ if (G(null), !t) {
38
+ U(x);
39
39
  return;
40
40
  }
41
- let r = e.id, i = t.id, a = V.findIndex((e) => e.id === r), o = V.findIndex((e) => e.id === i), s;
42
- if (s = a !== -1 && o !== -1 && a !== o ? f(V, a, o) : [...V], H(s), C?.(s), n) {
41
+ let r = e.id, i = t.id, a = H.findIndex((e) => e.id === r), o = H.findIndex((e) => e.id === i), s;
42
+ if (s = a !== -1 && o !== -1 && a !== o ? ee(H, a, o) : [...H], U(s), C?.(s), n) {
43
43
  let e = s.find((e) => e.id === r);
44
44
  e && e.status !== n && k?.(e, n, e.status);
45
45
  }
46
46
  }
47
- function te(e) {
48
- T ? K({
47
+ function ne(e) {
48
+ T ? q({
49
49
  mode: "edit",
50
50
  task: e
51
51
  }) : w?.(e);
52
52
  }
53
- function ne(e) {
54
- K({
53
+ function re(e) {
54
+ q({
55
55
  mode: "add",
56
56
  columnId: e
57
57
  });
58
58
  }
59
- function re(e) {
60
- let t = !V.find((t) => t.id === e.id), n = t ? [...V, e] : V.map((t) => t.id === e.id ? e : t);
61
- H(n), C?.(n), t ? E?.(e) : D?.(e), K(null);
62
- }
63
59
  function ie(e) {
64
- let t = V.filter((t) => t.id !== e);
65
- H(t), C?.(t), O?.(e), K(null);
60
+ let t = !H.find((t) => t.id === e.id), n = t ? [...H, e] : H.map((t) => t.id === e.id ? e : t);
61
+ U(n), C?.(n), t ? E?.(e) : D?.(e), q(null);
66
62
  }
67
63
  function ae(e) {
68
- K({
64
+ let t = H.filter((t) => t.id !== e);
65
+ U(t), C?.(t), O?.(e), q(null);
66
+ }
67
+ function oe(e) {
68
+ q({
69
69
  mode: "delete",
70
70
  task: e
71
71
  });
72
72
  }
73
- let $ = (I || q).trim().toLowerCase();
74
- function oe(e) {
73
+ let $ = (L || J).trim().toLowerCase();
74
+ function se(e) {
75
75
  return $ ? e.title.toLowerCase().includes($) || (e.assignee?.toLowerCase().includes($) ?? !1) : !0;
76
76
  }
77
- return /* @__PURE__ */ b(h, {
77
+ return /* @__PURE__ */ b(m, {
78
78
  className: e.root,
79
79
  sx: {
80
- width: L,
81
- height: R,
80
+ width: R,
81
+ height: z,
82
82
  display: "flex",
83
83
  flexDirection: "column",
84
84
  overflow: "hidden"
85
85
  },
86
86
  children: [
87
- F && /* @__PURE__ */ y(h, {
87
+ I && /* @__PURE__ */ y(m, {
88
88
  className: e.searchFieldWrapper,
89
89
  sx: {
90
90
  px: 2,
91
91
  pt: 1.5,
92
92
  pb: .5
93
93
  },
94
- children: /* @__PURE__ */ y(ee, {
94
+ children: /* @__PURE__ */ y(g, {
95
95
  className: e.searchField,
96
96
  size: "small",
97
- placeholder: B.searchFieldPlaceholder,
98
- value: q,
99
- onChange: (e) => J(e.target.value),
97
+ placeholder: V.searchFieldPlaceholder,
98
+ value: J,
99
+ onChange: (e) => Y(e.target.value),
100
100
  slotProps: {
101
- input: { startAdornment: /* @__PURE__ */ y(g, {
101
+ input: { startAdornment: /* @__PURE__ */ y(h, {
102
102
  position: "start",
103
- children: /* @__PURE__ */ y(m, {
103
+ children: /* @__PURE__ */ y(p, {
104
104
  fontSize: "small",
105
105
  sx: { color: "text.disabled" }
106
106
  })
107
107
  }) },
108
- htmlInput: { "aria-label": B.searchFieldPlaceholder }
108
+ htmlInput: { "aria-label": V.searchFieldPlaceholder }
109
109
  },
110
110
  sx: { width: 280 }
111
111
  })
112
112
  }),
113
113
  /* @__PURE__ */ b(a, {
114
- sensors: Y,
114
+ sensors: X,
115
115
  collisionDetection: l,
116
- onDragStart: X,
117
- onDragOver: Z,
118
- onDragEnd: Q,
119
- children: [/* @__PURE__ */ y(h, {
116
+ onDragStart: Z,
117
+ onDragOver: Q,
118
+ onDragEnd: te,
119
+ children: [/* @__PURE__ */ y(m, {
120
120
  className: e.columns,
121
121
  sx: {
122
122
  flex: 1,
@@ -128,43 +128,47 @@ function x({ tasks: x, columns: S, onTasksChange: C, onCardClick: w, enableBuilt
128
128
  alignItems: "stretch"
129
129
  },
130
130
  children: S.map((e) => {
131
- let t = V.filter((t) => t.status === e.id);
131
+ let t = H.filter((t) => t.status === e.id);
132
132
  return /* @__PURE__ */ y(i, {
133
133
  column: e,
134
- tasks: t.filter(oe),
134
+ tasks: t.filter(se),
135
135
  totalCount: t.length,
136
136
  showPriority: A,
137
137
  showAssignee: j,
138
138
  showDueDate: M,
139
139
  showDueDateWarning: N,
140
- chipVariant: P,
141
- t: B,
140
+ showSubtasks: P,
141
+ chipVariant: F,
142
+ t: V,
142
143
  enableBuiltinDialogs: T,
143
- onCardClick: te,
144
- onAddClick: ne
144
+ onCardClick: ne,
145
+ onAddClick: re
145
146
  }, e.id);
146
147
  })
147
- }), /* @__PURE__ */ y(o, { children: U && /* @__PURE__ */ y(n, {
148
- task: U,
148
+ }), /* @__PURE__ */ y(o, { children: W && /* @__PURE__ */ y(n, {
149
+ task: W,
149
150
  showPriority: A,
150
151
  showAssignee: j,
151
152
  showDueDate: M,
152
153
  showDueDateWarning: N,
153
- chipVariant: P,
154
- t: B,
154
+ showSubtasks: P,
155
+ enableBuiltinDialogs: !1,
156
+ chipVariant: F,
157
+ t: V,
155
158
  onCardClick: () => {},
156
159
  isOverlay: !0
157
160
  }) })]
158
161
  }),
159
162
  T && /* @__PURE__ */ y(r, {
160
- state: G,
163
+ state: K,
161
164
  columns: S,
162
- t: B,
163
- onSave: re,
164
- onDelete: ie,
165
- onRequestDelete: ae,
166
- onClose: () => K(null)
167
- }, G ? `${G.mode}-${G.mode === "add" ? G.columnId : G.task.id}` : "closed")
165
+ t: V,
166
+ showSubtasks: P,
167
+ onSave: ie,
168
+ onDelete: ae,
169
+ onRequestDelete: oe,
170
+ onClose: () => q(null)
171
+ }, K ? `${K.mode}-${K.mode === "add" ? K.columnId : K.task.id}` : "closed")
168
172
  ]
169
173
  });
170
174
  }