@thebuoyant-tsdev/mui-ts-library 3.29.2 → 3.30.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 (53) hide show
  1. package/README.de.md +49 -1
  2. package/README.md +49 -1
  3. package/dist/components/chord-chart/ChordChart.js +112 -112
  4. package/dist/components/circle-packing-chart/CirclePackingChart.js +135 -135
  5. package/dist/components/color-picker/ColorPicker.js +217 -217
  6. package/dist/components/color-picker/PopoverColorPicker.js +7 -7
  7. package/dist/components/date-range-picker/DateRangePicker.js +9 -9
  8. package/dist/components/gantt-chart/GanttChart.js +18 -18
  9. package/dist/components/gantt-chart/GanttTaskDialog.js +43 -43
  10. package/dist/components/gantt-chart/GanttTaskPanel.js +128 -128
  11. package/dist/components/gantt-chart/GanttTimeline.js +16 -16
  12. package/dist/components/gantt-chart/GanttToolbar.js +24 -24
  13. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +244 -244
  14. package/dist/components/json-editor/JsonEditor.js +9 -9
  15. package/dist/components/json-editor/JsonEditorContent.js +54 -54
  16. package/dist/components/json-editor/JsonEditorToolbar.js +12 -12
  17. package/dist/components/kanban-board/KanbanBoard.d.ts +2 -0
  18. package/dist/components/kanban-board/KanbanBoard.js +129 -0
  19. package/dist/components/kanban-board/KanbanBoard.types.d.ts +84 -0
  20. package/dist/components/kanban-board/KanbanBoard.types.js +19 -0
  21. package/dist/components/kanban-board/KanbanBoardCard.d.ts +13 -0
  22. package/dist/components/kanban-board/KanbanBoardCard.js +104 -0
  23. package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +23 -0
  24. package/dist/components/kanban-board/KanbanBoardCardDialog.js +120 -0
  25. package/dist/components/kanban-board/KanbanBoardColumn.d.ts +14 -0
  26. package/dist/components/kanban-board/KanbanBoardColumn.js +129 -0
  27. package/dist/components/kanban-board/kanbanBoardClasses.d.ts +47 -0
  28. package/dist/components/kanban-board/kanbanBoardClasses.js +18 -0
  29. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +27 -27
  30. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +48 -48
  31. package/dist/components/radial-tree-chart/RadialTreeChart.js +173 -173
  32. package/dist/components/rich-text-editor/RichTextEditor.js +32 -32
  33. package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +20 -20
  34. package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +12 -12
  35. package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +11 -11
  36. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +11 -11
  37. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +14 -14
  38. package/dist/components/rich-text-editor/RichTextEditorMentionList.js +14 -14
  39. package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +28 -28
  40. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +35 -35
  41. package/dist/components/sql-editor/SqlEditor.js +24 -24
  42. package/dist/components/sql-editor/SqlEditorContent.js +16 -16
  43. package/dist/components/sql-editor/SqlEditorHistoryMenu.js +15 -15
  44. package/dist/components/sql-editor/SqlEditorToolbar.js +21 -21
  45. package/dist/components/sunburst-chart/SunburstChart.js +126 -126
  46. package/dist/components/tag-selection/TagSelection.js +18 -18
  47. package/dist/components/tag-selection/TagSelectionAutocomplete.js +120 -120
  48. package/dist/components/tag-selection/TagSelectionSelectedTags.js +10 -10
  49. package/dist/index.cjs +2 -2
  50. package/dist/index.d.cts +3 -0
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.js +38 -35
  53. package/package.json +9 -2
@@ -1,17 +1,17 @@
1
1
  import { filterByAssignee as e, getVisibleTasks as t } from "./util/gantt-chart.util.js";
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
- import { GanttDeleteDialog as a } from "./GanttDeleteDialog.js";
5
- import { useGanttChartStore as o, useGanttTheme as ee, useGanttTranslations as te, useRawGanttChartStore as s } from "./GanttChart.js";
6
- import { useEffect as c, useMemo as l, useState as u } from "react";
7
- import { Box as d, Chip as f, IconButton as p, Menu as ne, MenuItem as re, TextField as m, Tooltip as h, Typography as g } from "@mui/material";
8
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
9
- import b from "@mui/icons-material/Delete";
10
- import { useVirtualizer as x } from "@tanstack/react-virtual";
4
+ import { GanttDeleteDialog as ee } from "./GanttDeleteDialog.js";
5
+ import { useGanttChartStore as a, useGanttTheme as te, useGanttTranslations as ne, useRawGanttChartStore as o } from "./GanttChart.js";
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
+ 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";
11
10
  import S from "@mui/icons-material/Add";
12
- import C from "@mui/icons-material/Edit";
11
+ import { useVirtualizer as C } from "@tanstack/react-virtual";
12
+ import w from "@mui/icons-material/Edit";
13
13
  //#region src/components/gantt-chart/GanttTaskPanel.tsx
14
- function w(e, t) {
14
+ function T(e, t) {
15
15
  return {
16
16
  planned: t.statusPlanned,
17
17
  "in-progress": t.statusInProgress,
@@ -19,14 +19,14 @@ function w(e, t) {
19
19
  blocked: t.statusBlocked
20
20
  }[e];
21
21
  }
22
- function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, showAssigneeColumn: o, onTaskClick: s, onAddTask: c, onEditTask: l, onDeleteTask: _, onStatusChange: x, inlineEdit: T, onInlineRename: E, isSelected: D, onSelect: O }) {
23
- let [k, A] = u(null), [j, M] = u(null), N = te(), { statusColors: P } = ee(), F = () => {
24
- j !== null && j.trim() && E?.(e, j.trim()), M(null);
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 }) {
23
+ let [A, j] = _(null), [M, N] = _(null), P = ne(), { statusColors: F } = te(), I = () => {
24
+ M !== null && M.trim() && D?.(e, M.trim()), N(null);
25
25
  };
26
- return /* @__PURE__ */ y(d, {
26
+ return /* @__PURE__ */ b(s, {
27
27
  className: "gantt-task-row",
28
28
  "data-testid": `gantt-task-row-${e.id}`,
29
- "aria-selected": D ?? !1,
29
+ "aria-selected": O ?? !1,
30
30
  sx: {
31
31
  height: 40,
32
32
  display: "flex",
@@ -35,16 +35,16 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
35
35
  borderBottom: "1px solid",
36
36
  borderRight: "1px solid",
37
37
  borderColor: "divider",
38
- cursor: s ? "pointer" : "default",
39
- bgcolor: D ? "action.selected" : void 0,
40
- boxShadow: D ? (e) => `inset 3px 0 0 ${e.palette.primary.main}` : void 0,
41
- "&:hover": { bgcolor: D ? "action.selected" : s ? "action.hover" : void 0 }
38
+ cursor: o ? "pointer" : "default",
39
+ bgcolor: O ? "action.selected" : void 0,
40
+ boxShadow: O ? (e) => `inset 3px 0 0 ${e.palette.primary.main}` : void 0,
41
+ "&:hover": { bgcolor: O ? "action.selected" : o ? "action.hover" : void 0 }
42
42
  },
43
43
  onClick: () => {
44
- O?.(), s?.(e);
44
+ k?.(), o?.(e);
45
45
  },
46
46
  children: [
47
- /* @__PURE__ */ y(d, {
47
+ /* @__PURE__ */ b(s, {
48
48
  sx: {
49
49
  flex: 1,
50
50
  minWidth: 0,
@@ -56,14 +56,14 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
56
56
  height: "100%"
57
57
  },
58
58
  children: [
59
- /* @__PURE__ */ v(d, {
59
+ /* @__PURE__ */ y(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__ */ v(d, {
66
+ children: e.children.length > 0 && /* @__PURE__ */ y(s, {
67
67
  component: "span",
68
68
  sx: {
69
69
  fontSize: 9,
@@ -76,35 +76,35 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
76
76
  children: t.has(e.id) ? "▼" : "▶"
77
77
  })
78
78
  }),
79
- /* @__PURE__ */ v(d, { sx: {
79
+ /* @__PURE__ */ y(s, { sx: {
80
80
  width: 8,
81
81
  height: 8,
82
82
  borderRadius: e.isMilestone ? 0 : "50%",
83
83
  transform: e.isMilestone ? "rotate(45deg)" : void 0,
84
84
  flexShrink: 0,
85
- bgcolor: e.color ?? P?.[e.status] ?? n[e.status] ?? "grey.400"
85
+ bgcolor: e.color ?? F?.[e.status] ?? n[e.status] ?? "grey.400"
86
86
  } }),
87
- j === null ? /* @__PURE__ */ v(g, {
87
+ M === null ? /* @__PURE__ */ y(m, {
88
88
  variant: "body2",
89
89
  noWrap: !0,
90
90
  sx: {
91
91
  flex: 1,
92
92
  minWidth: 0,
93
- cursor: T ? "text" : "inherit"
93
+ cursor: E ? "text" : "inherit"
94
94
  },
95
- onDoubleClick: T ? (t) => {
96
- t.stopPropagation(), M(e.name);
95
+ onDoubleClick: E ? (t) => {
96
+ t.stopPropagation(), N(e.name);
97
97
  } : void 0,
98
98
  children: e.name
99
- }) : /* @__PURE__ */ v(m, {
99
+ }) : /* @__PURE__ */ y(f, {
100
100
  size: "small",
101
101
  variant: "standard",
102
- value: j,
102
+ value: M,
103
103
  autoFocus: !0,
104
- onChange: (e) => M(e.target.value),
105
- onBlur: F,
104
+ onChange: (e) => N(e.target.value),
105
+ onBlur: I,
106
106
  onKeyDown: (e) => {
107
- e.key === "Enter" && (e.preventDefault(), F()), e.key === "Escape" && (e.stopPropagation(), M(null));
107
+ e.key === "Enter" && (e.preventDefault(), I()), e.key === "Escape" && (e.stopPropagation(), N(null));
108
108
  },
109
109
  onClick: (e) => e.stopPropagation(),
110
110
  sx: {
@@ -115,7 +115,7 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
115
115
  })
116
116
  ]
117
117
  }),
118
- o && /* @__PURE__ */ v(d, {
118
+ a && /* @__PURE__ */ y(s, {
119
119
  sx: {
120
120
  width: 110,
121
121
  flexShrink: 0,
@@ -124,14 +124,14 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
124
124
  px: 1,
125
125
  overflow: "hidden"
126
126
  },
127
- children: /* @__PURE__ */ v(g, {
127
+ children: /* @__PURE__ */ y(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
- a && /* @__PURE__ */ y(d, {
134
+ ee && /* @__PURE__ */ b(s, {
135
135
  className: "gantt-row-actions",
136
136
  sx: {
137
137
  width: 96,
@@ -142,45 +142,45 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
142
142
  pr: .5
143
143
  },
144
144
  children: [
145
- l && /* @__PURE__ */ v(h, {
146
- title: N.editTaskTooltip,
147
- children: /* @__PURE__ */ v(p, {
145
+ g && /* @__PURE__ */ y(p, {
146
+ title: P.editTaskTooltip,
147
+ children: /* @__PURE__ */ y(l, {
148
148
  size: "small",
149
- "aria-label": N.editTaskTooltip,
149
+ "aria-label": P.editTaskTooltip,
150
150
  "data-testid": `gantt-edit-task-${e.id}`,
151
151
  onClick: (t) => {
152
- t.stopPropagation(), l(e);
152
+ t.stopPropagation(), g(e);
153
153
  },
154
- children: /* @__PURE__ */ v(C, { fontSize: "inherit" })
154
+ children: /* @__PURE__ */ y(w, { fontSize: "inherit" })
155
155
  })
156
156
  }),
157
- c && /* @__PURE__ */ v(h, {
158
- title: N.addTaskTooltip,
159
- children: /* @__PURE__ */ v(p, {
157
+ h && /* @__PURE__ */ y(p, {
158
+ title: P.addTaskTooltip,
159
+ children: /* @__PURE__ */ y(l, {
160
160
  size: "small",
161
- "aria-label": N.addTaskTooltip,
161
+ "aria-label": P.addTaskTooltip,
162
162
  "data-testid": `gantt-add-task-${e.id}`,
163
163
  onClick: (t) => {
164
- t.stopPropagation(), c(e);
164
+ t.stopPropagation(), h(e);
165
165
  },
166
- children: /* @__PURE__ */ v(S, { fontSize: "inherit" })
166
+ children: /* @__PURE__ */ y(S, { fontSize: "inherit" })
167
167
  })
168
168
  }),
169
- _ && /* @__PURE__ */ v(h, {
170
- title: N.deleteTaskTooltip,
171
- children: /* @__PURE__ */ v(p, {
169
+ v && /* @__PURE__ */ y(p, {
170
+ title: P.deleteTaskTooltip,
171
+ children: /* @__PURE__ */ y(l, {
172
172
  size: "small",
173
- "aria-label": N.deleteTaskTooltip,
173
+ "aria-label": P.deleteTaskTooltip,
174
174
  "data-testid": `gantt-delete-task-${e.id}`,
175
175
  onClick: (t) => {
176
- t.stopPropagation(), _(e);
176
+ t.stopPropagation(), v(e);
177
177
  },
178
- children: /* @__PURE__ */ v(b, { fontSize: "inherit" })
178
+ children: /* @__PURE__ */ y(x, { fontSize: "inherit" })
179
179
  })
180
180
  })
181
181
  ]
182
182
  }),
183
- /* @__PURE__ */ y(d, {
183
+ /* @__PURE__ */ b(s, {
184
184
  sx: {
185
185
  width: 90,
186
186
  flexShrink: 0,
@@ -188,86 +188,86 @@ function T({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
188
188
  alignItems: "center",
189
189
  justifyContent: "center"
190
190
  },
191
- children: [/* @__PURE__ */ v(f, {
192
- label: w(e.status, N),
191
+ children: [/* @__PURE__ */ y(c, {
192
+ label: T(e.status, P),
193
193
  size: "small",
194
194
  variant: "outlined",
195
- color: e.color ?? P?.[e.status] ? "default" : r[e.status] ?? "default",
195
+ color: e.color ?? F?.[e.status] ? "default" : r[e.status] ?? "default",
196
196
  sx: {
197
197
  height: 20,
198
198
  fontSize: 10,
199
- cursor: x ? "pointer" : "default",
200
- ...(e.color ?? P?.[e.status]) && {
201
- borderColor: e.color ?? P?.[e.status],
202
- color: e.color ?? P?.[e.status]
199
+ cursor: C ? "pointer" : "default",
200
+ ...(e.color ?? F?.[e.status]) && {
201
+ borderColor: e.color ?? F?.[e.status],
202
+ color: e.color ?? F?.[e.status]
203
203
  }
204
204
  },
205
- onClick: x ? (e) => {
206
- e.stopPropagation(), A(e.currentTarget);
205
+ onClick: C ? (e) => {
206
+ e.stopPropagation(), j(e.currentTarget);
207
207
  } : void 0
208
- }), x && /* @__PURE__ */ v(ne, {
209
- anchorEl: k,
210
- open: !!k,
211
- onClose: () => A(null),
208
+ }), C && /* @__PURE__ */ y(u, {
209
+ anchorEl: A,
210
+ open: !!A,
211
+ onClose: () => j(null),
212
212
  children: [
213
213
  "planned",
214
214
  "in-progress",
215
215
  "done",
216
216
  "blocked"
217
- ].map((t) => /* @__PURE__ */ v(re, {
217
+ ].map((t) => /* @__PURE__ */ y(d, {
218
218
  selected: e.status === t,
219
219
  onClick: () => {
220
- x(e, t), A(null);
220
+ C(e, t), j(null);
221
221
  },
222
- children: w(t, N)
222
+ children: T(t, P)
223
223
  }, t))
224
224
  })]
225
225
  })
226
226
  ]
227
227
  });
228
228
  }
229
- function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTask: p, onEditTask: ne, onDeleteTask: re, onStatusChange: m, onTasksChange: h, enableBuiltinDialogs: b, onTaskCreated: S, onTaskUpdated: C, onTaskDeleted: w, inlineEdit: E, virtualizeRows: D = !1, showAssigneeColumn: O = !1 }) {
230
- let k = te(), A = s(), j = o((e) => e.taskTree), M = o((e) => e.expandedIds), N = o((e) => e.toggleExpand), P = o((e) => e.timeScale), F = o((e) => e.addTask), I = o((e) => e.updateTask), ie = o((e) => e.deleteTask), L = o((e) => e.assigneeFilter), R = l(() => {
231
- let n = t(j, M);
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 }) {
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
+ let n = t(M, N);
232
232
  return L ? e(n, L) : n;
233
233
  }, [
234
- j,
235
234
  M,
235
+ N,
236
236
  L
237
- ]), z = x({
237
+ ]), z = C({
238
238
  count: R.length,
239
239
  getScrollElement: () => n.current,
240
240
  estimateSize: () => 40,
241
241
  overscan: 5
242
- }), [ae, B] = u(!1), [oe, V] = u(!1), [se, H] = u(!1), [U, W] = u(null), ce = (e) => {
242
+ }), [ae, B] = _(!1), [oe, V] = _(!1), [se, H] = _(!1), [U, W] = _(null), ce = (e) => {
243
243
  let t = {
244
244
  ...e,
245
245
  id: crypto.randomUUID()
246
246
  };
247
- F(t), h?.(A.getState().tasks), S?.(t), B(!1);
247
+ I(t), p?.(j.getState().tasks), S?.(t), B(!1);
248
248
  }, le = (e) => {
249
249
  if (!U) return;
250
250
  let t = {
251
251
  ...e,
252
252
  id: U.id
253
253
  };
254
- I(t), h?.(A.getState().tasks), C?.(t), V(!1);
254
+ re(t), p?.(j.getState().tasks), w?.(t), V(!1);
255
255
  }, ue = () => {
256
- U && (ie(U.id), h?.(A.getState().tasks), w?.(U.id), H(!1));
256
+ U && (ie(U.id), p?.(j.getState().tasks), T?.(U.id), H(!1));
257
257
  }, G = (e, t) => {
258
258
  let n = {
259
259
  ...e,
260
260
  name: t
261
261
  };
262
- I(n), h?.(A.getState().tasks), C?.(n);
263
- }, K = b ? (e) => {
262
+ re(n), p?.(j.getState().tasks), w?.(n);
263
+ }, K = x ? (e) => {
264
264
  W(e), B(!0);
265
- } : p, q = b ? (e) => {
265
+ } : l, q = x ? (e) => {
266
266
  W(e), V(!0);
267
- } : ne, J = b ? (e) => {
267
+ } : u, J = x ? (e) => {
268
268
  W(e), H(!0);
269
- } : re, Y = !!(K || q || J), X = P === "days" ? 80 : 40, [Z, Q] = u(null), $ = Z ? R.findIndex((e) => e.id === Z) : -1;
270
- c(() => {
269
+ } : d, Y = !!(K || q || J), X = F === "days" ? 80 : 40, [Z, Q] = _(null), $ = Z ? R.findIndex((e) => e.id === Z) : -1;
270
+ h(() => {
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 E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, 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__ */ y(d, {
284
+ return /* @__PURE__ */ b(s, {
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: ee,
291
+ width: te,
292
292
  flexShrink: 0,
293
293
  overflowY: "auto",
294
294
  overflowX: "hidden",
295
295
  outline: "none"
296
296
  },
297
297
  children: [
298
- /* @__PURE__ */ y(d, {
298
+ /* @__PURE__ */ b(s, {
299
299
  sx: {
300
300
  height: X,
301
301
  position: "sticky",
@@ -308,29 +308,29 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
308
308
  display: "flex",
309
309
  flexDirection: "column"
310
310
  },
311
- children: [/* @__PURE__ */ y(d, {
311
+ children: [/* @__PURE__ */ b(s, {
312
312
  sx: {
313
313
  height: 40,
314
314
  display: "flex",
315
315
  alignItems: "center",
316
316
  overflow: "hidden",
317
- borderBottom: P === "days" ? "1px solid" : void 0,
318
- borderColor: P === "days" ? "divider" : void 0
317
+ borderBottom: F === "days" ? "1px solid" : void 0,
318
+ borderColor: F === "days" ? "divider" : void 0
319
319
  },
320
320
  children: [
321
- /* @__PURE__ */ v(d, {
321
+ /* @__PURE__ */ y(s, {
322
322
  sx: {
323
323
  flex: 1,
324
324
  minWidth: 0,
325
325
  pl: 2
326
326
  },
327
- children: /* @__PURE__ */ v(g, {
327
+ children: /* @__PURE__ */ y(m, {
328
328
  variant: "caption",
329
329
  color: "text.secondary",
330
- children: k.columnName
330
+ children: A.columnName
331
331
  })
332
332
  }),
333
- O && /* @__PURE__ */ v(d, {
333
+ k && /* @__PURE__ */ y(s, {
334
334
  sx: {
335
335
  width: 110,
336
336
  flexShrink: 0,
@@ -338,13 +338,13 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
338
338
  alignItems: "center",
339
339
  px: 1
340
340
  },
341
- children: /* @__PURE__ */ v(g, {
341
+ children: /* @__PURE__ */ y(m, {
342
342
  variant: "caption",
343
343
  color: "text.secondary",
344
- children: k.columnAssignee
344
+ children: A.columnAssignee
345
345
  })
346
346
  }),
347
- Y && /* @__PURE__ */ v(d, {
347
+ Y && /* @__PURE__ */ y(s, {
348
348
  sx: {
349
349
  width: 96,
350
350
  flexShrink: 0,
@@ -352,13 +352,13 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
352
352
  alignItems: "center",
353
353
  justifyContent: "center"
354
354
  },
355
- children: /* @__PURE__ */ v(g, {
355
+ children: /* @__PURE__ */ y(m, {
356
356
  variant: "caption",
357
357
  color: "text.secondary",
358
- children: k.columnActions
358
+ children: A.columnActions
359
359
  })
360
360
  }),
361
- /* @__PURE__ */ v(d, {
361
+ /* @__PURE__ */ y(s, {
362
362
  sx: {
363
363
  width: 90,
364
364
  flexShrink: 0,
@@ -366,21 +366,21 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
366
366
  alignItems: "center",
367
367
  justifyContent: "center"
368
368
  },
369
- children: /* @__PURE__ */ v(g, {
369
+ children: /* @__PURE__ */ y(m, {
370
370
  variant: "caption",
371
371
  color: "text.secondary",
372
- children: k.columnStatus
372
+ children: A.columnStatus
373
373
  })
374
374
  })
375
375
  ]
376
- }), P === "days" && /* @__PURE__ */ v(d, { sx: { flex: 1 } })]
376
+ }), F === "days" && /* @__PURE__ */ y(s, { sx: { flex: 1 } })]
377
377
  }),
378
- D ? /* @__PURE__ */ v(d, {
378
+ O ? /* @__PURE__ */ y(s, {
379
379
  sx: {
380
380
  position: "relative",
381
381
  height: z.getTotalSize()
382
382
  },
383
- children: z.getVirtualItems().map((e) => /* @__PURE__ */ v(d, {
383
+ children: z.getVirtualItems().map((e) => /* @__PURE__ */ y(s, {
384
384
  style: {
385
385
  position: "absolute",
386
386
  top: 0,
@@ -389,55 +389,55 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
389
389
  height: 40,
390
390
  transform: `translateY(${e.start}px)`
391
391
  },
392
- children: /* @__PURE__ */ v(T, {
392
+ children: /* @__PURE__ */ y(E, {
393
393
  task: R[e.index],
394
- expandedIds: M,
395
- toggleExpand: N,
394
+ expandedIds: N,
395
+ toggleExpand: P,
396
396
  hasActionsColumn: Y,
397
- showAssigneeColumn: O,
398
- onTaskClick: f,
397
+ showAssigneeColumn: k,
398
+ onTaskClick: c,
399
399
  onAddTask: K,
400
400
  onEditTask: q,
401
401
  onDeleteTask: J,
402
- onStatusChange: m,
403
- inlineEdit: E,
404
- onInlineRename: E ? G : void 0,
402
+ onStatusChange: f,
403
+ inlineEdit: D,
404
+ onInlineRename: D ? G : void 0,
405
405
  isSelected: R[e.index].id === Z,
406
406
  onSelect: () => Q(R[e.index].id)
407
407
  })
408
408
  }, e.key))
409
- }) : R.map((e) => /* @__PURE__ */ v(T, {
409
+ }) : R.map((e) => /* @__PURE__ */ y(E, {
410
410
  task: e,
411
- expandedIds: M,
412
- toggleExpand: N,
411
+ expandedIds: N,
412
+ toggleExpand: P,
413
413
  hasActionsColumn: Y,
414
- showAssigneeColumn: O,
415
- onTaskClick: f,
414
+ showAssigneeColumn: k,
415
+ onTaskClick: c,
416
416
  onAddTask: K,
417
417
  onEditTask: q,
418
418
  onDeleteTask: J,
419
- onStatusChange: m,
420
- inlineEdit: E,
421
- onInlineRename: E ? G : void 0,
419
+ onStatusChange: f,
420
+ inlineEdit: D,
421
+ onInlineRename: D ? G : void 0,
422
422
  isSelected: e.id === Z,
423
423
  onSelect: () => Q(e.id)
424
424
  }, e.id)),
425
- b && /* @__PURE__ */ y(_, { children: [
426
- /* @__PURE__ */ v(i, {
425
+ x && /* @__PURE__ */ b(v, { children: [
426
+ /* @__PURE__ */ y(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__ */ v(i, {
433
+ /* @__PURE__ */ y(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__ */ v(a, {
440
+ /* @__PURE__ */ y(ee, {
441
441
  open: se,
442
442
  task: U,
443
443
  onConfirm: ue,
@@ -448,4 +448,4 @@ function E({ scrollRef: n, onScroll: r, panelWidth: ee, onTaskClick: f, onAddTas
448
448
  });
449
449
  }
450
450
  //#endregion
451
- export { E as GanttTaskPanel };
451
+ export { D as GanttTaskPanel };
@@ -6,8 +6,8 @@ import { GanttWeekendStrips as f } from "./GanttWeekendStrips.js";
6
6
  import { GanttStatusContextMenu as p } from "./GanttStatusContextMenu.js";
7
7
  import { GanttDependencyArrows as m } from "./GanttDependencyArrows.js";
8
8
  import { useGanttChartStore as h, useGanttTheme as te, useGanttTranslations as ne, useRawGanttChartStore as re } from "./GanttChart.js";
9
- import { useEffect as ie, useId as ae, useMemo as g, useRef as _, useState as oe } from "react";
10
- import { Box as v, useTheme as se } from "@mui/material";
9
+ import { Box as g, useTheme as ie } from "@mui/material";
10
+ import { useEffect as ae, useId as oe, useMemo as _, useRef as v, useState as se } from "react";
11
11
  import { Fragment as ce, jsx as y, jsxs as le } from "react/jsx-runtime";
12
12
  import { useVirtualizer as ue } from "@tanstack/react-virtual";
13
13
  //#region src/components/gantt-chart/GanttTimeline.tsx
@@ -30,14 +30,14 @@ function de(t, n, r) {
30
30
  return i;
31
31
  }
32
32
  function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, draggable: C = !1, resizable: w = !1, progressDraggable: T = !1, showCriticalPath: E = !1, virtualizeRows: fe = !1, onDragStart: pe, onTaskMoved: me, onTaskResized: he, onTasksChange: D, onStatusChange: O }) {
33
- let k = h((e) => e.taskTree), A = h((e) => e.tasks), j = h((e) => e.expandedIds), M = h((e) => e.timelineRange), N = h((e) => e.timeScale), ge = h((e) => e.updateTask), P = re(), F = ne(), _e = se(), { todayLineColor: ve } = te(), ye = `gantt-arrow-${ae().replace(/:/g, "")}`, I = h((e) => e.assigneeFilter), L = g(() => {
33
+ let k = h((e) => e.taskTree), A = h((e) => e.tasks), j = h((e) => e.expandedIds), M = h((e) => e.timelineRange), N = h((e) => e.timeScale), ge = h((e) => e.updateTask), P = re(), F = ne(), _e = ie(), { todayLineColor: ve } = te(), ye = `gantt-arrow-${oe().replace(/:/g, "")}`, I = h((e) => e.assigneeFilter), L = _(() => {
34
34
  let e = c(k, j);
35
35
  return I ? n(e, I) : e;
36
36
  }, [
37
37
  k,
38
38
  j,
39
39
  I
40
- ]), R = g(() => i(M, N), [M, N]), z = g(() => N === "days" ? r(R).map((e) => ({
40
+ ]), R = _(() => i(M, N), [M, N]), z = _(() => N === "days" ? r(R).map((e) => ({
41
41
  key: e.toISOString(),
42
42
  label: String(e.getDate()),
43
43
  width: 20,
@@ -62,7 +62,7 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
62
62
  R,
63
63
  F.weekColumnPrefix,
64
64
  F.dateLocale
65
- ]), B = g(() => z.reduce((e, t) => e + t.width, 0), [z]), V = g(() => {
65
+ ]), B = _(() => z.reduce((e, t) => e + t.width, 0), [z]), V = _(() => {
66
66
  if (N !== "days") return;
67
67
  let e = /* @__PURE__ */ new Map();
68
68
  for (let t of z) {
@@ -83,16 +83,16 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
83
83
  N,
84
84
  z,
85
85
  F.dateLocale
86
- ]), be = g(() => de(L, R, B), [
86
+ ]), be = _(() => de(L, R, B), [
87
87
  L,
88
88
  R,
89
89
  B
90
- ]), H = g(() => E ? t(A) : /* @__PURE__ */ new Set(), [E, A]), U = ue({
90
+ ]), H = _(() => E ? t(A) : /* @__PURE__ */ new Set(), [E, A]), U = ue({
91
91
  count: L.length,
92
92
  getScrollElement: () => e.current,
93
93
  estimateSize: () => 40,
94
94
  overscan: 5
95
- }), xe = g(() => {
95
+ }), xe = _(() => {
96
96
  if (N !== "days") return [];
97
97
  let e = 0;
98
98
  return z.flatMap((t) => {
@@ -102,16 +102,16 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
102
102
  }] : [];
103
103
  return e += t.width, n;
104
104
  });
105
- }, [N, z]), W = g(() => {
105
+ }, [N, z]), W = _(() => {
106
106
  let e = Date.now(), t = R.start.getTime(), n = R.end.getTime();
107
107
  return e < t || e > n ? null : (e - t) / (n - t) * B;
108
- }, [R, B]), Se = g(() => (/* @__PURE__ */ new Date()).toLocaleDateString(F.dateLocale, {
108
+ }, [R, B]), Se = _(() => (/* @__PURE__ */ new Date()).toLocaleDateString(F.dateLocale, {
109
109
  weekday: "long",
110
110
  day: "numeric",
111
111
  month: "long",
112
112
  year: "numeric"
113
113
  }), [F.dateLocale]), Ce = ve || _e.palette.primary.main;
114
- ie(() => {
114
+ ae(() => {
115
115
  if (W === null || !e.current) return;
116
116
  let t = e.current.clientWidth;
117
117
  e.current.scrollLeft = Math.max(0, W - t / 2);
@@ -123,10 +123,10 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
123
123
  onTaskMoved: me,
124
124
  onTaskResized: he,
125
125
  onTasksChange: D
126
- }), [we, Q] = oe(null), Te = _(O);
126
+ }), [we, Q] = se(null), Te = v(O);
127
127
  Te.current = O;
128
- let $ = _(D);
129
- return $.current = D, /* @__PURE__ */ y(v, {
128
+ let $ = v(D);
129
+ return $.current = D, /* @__PURE__ */ y(g, {
130
130
  ref: e,
131
131
  onScroll: b,
132
132
  "data-testid": "gantt-timeline-scroll",
@@ -134,7 +134,7 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
134
134
  flex: 1,
135
135
  overflow: "auto"
136
136
  },
137
- children: /* @__PURE__ */ le(v, {
137
+ children: /* @__PURE__ */ le(g, {
138
138
  sx: {
139
139
  minWidth: B,
140
140
  position: "relative"
@@ -154,7 +154,7 @@ function b({ scrollRef: e, onScroll: b, onTaskClick: x, onMilestoneClick: S, dra
154
154
  height: L.length * 40,
155
155
  top: K
156
156
  }),
157
- fe ? /* @__PURE__ */ y(v, {
157
+ fe ? /* @__PURE__ */ y(g, {
158
158
  sx: {
159
159
  position: "relative",
160
160
  height: U.getTotalSize()