@thebuoyant-tsdev/mui-ts-library 3.24.1 → 3.26.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.
@@ -2,16 +2,16 @@ 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 a } from "./GanttDeleteDialog.js";
5
- import { useGanttChartStore as o, useGanttTheme as s, useGanttTranslations as c, useRawGanttChartStore as l } from "./GanttChart.js";
6
- import { useMemo as u, useState as d } from "react";
7
- import { Box as f, Chip as p, IconButton as m, Menu as h, MenuItem as g, TextField as _, Tooltip as v, Typography as y } from "@mui/material";
8
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
9
- import C from "@mui/icons-material/Delete";
10
- import { useVirtualizer as w } from "@tanstack/react-virtual";
11
- import T from "@mui/icons-material/Add";
12
- import E from "@mui/icons-material/Edit";
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";
11
+ import S from "@mui/icons-material/Add";
12
+ import C from "@mui/icons-material/Edit";
13
13
  //#region src/components/gantt-chart/GanttTaskPanel.tsx
14
- function D(e, t) {
14
+ function w(e, t) {
15
15
  return {
16
16
  planned: t.statusPlanned,
17
17
  "in-progress": t.statusInProgress,
@@ -19,13 +19,14 @@ function D(e, t) {
19
19
  blocked: t.statusBlocked
20
20
  }[e];
21
21
  }
22
- function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, showAssigneeColumn: o, onTaskClick: l, onAddTask: u, onEditTask: b, onDeleteTask: w, onStatusChange: O, inlineEdit: k, onInlineRename: A }) {
23
- let [j, M] = d(null), [N, P] = d(null), F = c(), { statusColors: I } = s(), L = () => {
24
- N !== null && N.trim() && A?.(e, N.trim()), P(null);
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);
25
25
  };
26
- return /* @__PURE__ */ S(f, {
26
+ return /* @__PURE__ */ y(d, {
27
27
  className: "gantt-task-row",
28
28
  "data-testid": `gantt-task-row-${e.id}`,
29
+ "aria-selected": D ?? !1,
29
30
  sx: {
30
31
  height: 40,
31
32
  display: "flex",
@@ -33,12 +34,16 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
33
34
  borderBottom: "1px solid",
34
35
  borderRight: "1px solid",
35
36
  borderColor: "divider",
36
- cursor: l ? "pointer" : "default",
37
- "&:hover": l ? { bgcolor: "action.hover" } : void 0
37
+ cursor: s ? "pointer" : "default",
38
+ bgcolor: D ? "action.selected" : void 0,
39
+ boxShadow: D ? (e) => `inset 3px 0 0 ${e.palette.primary.main}` : void 0,
40
+ "&:hover": { bgcolor: D ? "action.selected" : s ? "action.hover" : void 0 }
41
+ },
42
+ onClick: () => {
43
+ O?.(), s?.(e);
38
44
  },
39
- onClick: () => l?.(e),
40
45
  children: [
41
- /* @__PURE__ */ S(f, {
46
+ /* @__PURE__ */ y(d, {
42
47
  sx: {
43
48
  flex: 1,
44
49
  minWidth: 0,
@@ -50,14 +55,14 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
50
55
  height: "100%"
51
56
  },
52
57
  children: [
53
- /* @__PURE__ */ x(f, {
58
+ /* @__PURE__ */ v(d, {
54
59
  sx: {
55
60
  width: 16,
56
61
  flexShrink: 0,
57
62
  display: "flex",
58
63
  justifyContent: "center"
59
64
  },
60
- children: e.children.length > 0 && /* @__PURE__ */ x(f, {
65
+ children: e.children.length > 0 && /* @__PURE__ */ v(d, {
61
66
  component: "span",
62
67
  sx: {
63
68
  fontSize: 9,
@@ -70,35 +75,35 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
70
75
  children: t.has(e.id) ? "▼" : "▶"
71
76
  })
72
77
  }),
73
- /* @__PURE__ */ x(f, { sx: {
78
+ /* @__PURE__ */ v(d, { sx: {
74
79
  width: 8,
75
80
  height: 8,
76
81
  borderRadius: e.isMilestone ? 0 : "50%",
77
82
  transform: e.isMilestone ? "rotate(45deg)" : void 0,
78
83
  flexShrink: 0,
79
- bgcolor: e.color ?? I?.[e.status] ?? n[e.status] ?? "grey.400"
84
+ bgcolor: e.color ?? P?.[e.status] ?? n[e.status] ?? "grey.400"
80
85
  } }),
81
- N === null ? /* @__PURE__ */ x(y, {
86
+ j === null ? /* @__PURE__ */ v(g, {
82
87
  variant: "body2",
83
88
  noWrap: !0,
84
89
  sx: {
85
90
  flex: 1,
86
91
  minWidth: 0,
87
- cursor: k ? "text" : "inherit"
92
+ cursor: T ? "text" : "inherit"
88
93
  },
89
- onDoubleClick: k ? (t) => {
90
- t.stopPropagation(), P(e.name);
94
+ onDoubleClick: T ? (t) => {
95
+ t.stopPropagation(), M(e.name);
91
96
  } : void 0,
92
97
  children: e.name
93
- }) : /* @__PURE__ */ x(_, {
98
+ }) : /* @__PURE__ */ v(m, {
94
99
  size: "small",
95
100
  variant: "standard",
96
- value: N,
101
+ value: j,
97
102
  autoFocus: !0,
98
- onChange: (e) => P(e.target.value),
99
- onBlur: L,
103
+ onChange: (e) => M(e.target.value),
104
+ onBlur: F,
100
105
  onKeyDown: (e) => {
101
- e.key === "Enter" && (e.preventDefault(), L()), e.key === "Escape" && (e.stopPropagation(), P(null));
106
+ e.key === "Enter" && (e.preventDefault(), F()), e.key === "Escape" && (e.stopPropagation(), M(null));
102
107
  },
103
108
  onClick: (e) => e.stopPropagation(),
104
109
  sx: {
@@ -109,7 +114,7 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
109
114
  })
110
115
  ]
111
116
  }),
112
- o && /* @__PURE__ */ x(f, {
117
+ o && /* @__PURE__ */ v(d, {
113
118
  sx: {
114
119
  width: 110,
115
120
  flexShrink: 0,
@@ -118,14 +123,14 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
118
123
  px: 1,
119
124
  overflow: "hidden"
120
125
  },
121
- children: /* @__PURE__ */ x(y, {
126
+ children: /* @__PURE__ */ v(g, {
122
127
  variant: "caption",
123
128
  noWrap: !0,
124
129
  color: e.assignee ? "text.primary" : "text.disabled",
125
130
  children: e.assignee ?? "—"
126
131
  })
127
132
  }),
128
- a && /* @__PURE__ */ S(f, {
133
+ a && /* @__PURE__ */ y(d, {
129
134
  className: "gantt-row-actions",
130
135
  sx: {
131
136
  width: 96,
@@ -136,45 +141,45 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
136
141
  pr: .5
137
142
  },
138
143
  children: [
139
- b && /* @__PURE__ */ x(v, {
140
- title: F.editTaskTooltip,
141
- children: /* @__PURE__ */ x(m, {
144
+ l && /* @__PURE__ */ v(h, {
145
+ title: N.editTaskTooltip,
146
+ children: /* @__PURE__ */ v(p, {
142
147
  size: "small",
143
- "aria-label": F.editTaskTooltip,
148
+ "aria-label": N.editTaskTooltip,
144
149
  "data-testid": `gantt-edit-task-${e.id}`,
145
150
  onClick: (t) => {
146
- t.stopPropagation(), b(e);
151
+ t.stopPropagation(), l(e);
147
152
  },
148
- children: /* @__PURE__ */ x(E, { fontSize: "inherit" })
153
+ children: /* @__PURE__ */ v(C, { fontSize: "inherit" })
149
154
  })
150
155
  }),
151
- u && /* @__PURE__ */ x(v, {
152
- title: F.addTaskTooltip,
153
- children: /* @__PURE__ */ x(m, {
156
+ c && /* @__PURE__ */ v(h, {
157
+ title: N.addTaskTooltip,
158
+ children: /* @__PURE__ */ v(p, {
154
159
  size: "small",
155
- "aria-label": F.addTaskTooltip,
160
+ "aria-label": N.addTaskTooltip,
156
161
  "data-testid": `gantt-add-task-${e.id}`,
157
162
  onClick: (t) => {
158
- t.stopPropagation(), u(e);
163
+ t.stopPropagation(), c(e);
159
164
  },
160
- children: /* @__PURE__ */ x(T, { fontSize: "inherit" })
165
+ children: /* @__PURE__ */ v(S, { fontSize: "inherit" })
161
166
  })
162
167
  }),
163
- w && /* @__PURE__ */ x(v, {
164
- title: F.deleteTaskTooltip,
165
- children: /* @__PURE__ */ x(m, {
168
+ _ && /* @__PURE__ */ v(h, {
169
+ title: N.deleteTaskTooltip,
170
+ children: /* @__PURE__ */ v(p, {
166
171
  size: "small",
167
- "aria-label": F.deleteTaskTooltip,
172
+ "aria-label": N.deleteTaskTooltip,
168
173
  "data-testid": `gantt-delete-task-${e.id}`,
169
174
  onClick: (t) => {
170
- t.stopPropagation(), w(e);
175
+ t.stopPropagation(), _(e);
171
176
  },
172
- children: /* @__PURE__ */ x(C, { fontSize: "inherit" })
177
+ children: /* @__PURE__ */ v(b, { fontSize: "inherit" })
173
178
  })
174
179
  })
175
180
  ]
176
181
  }),
177
- /* @__PURE__ */ S(f, {
182
+ /* @__PURE__ */ y(d, {
178
183
  sx: {
179
184
  width: 90,
180
185
  flexShrink: 0,
@@ -182,98 +187,116 @@ function O({ task: e, expandedIds: t, toggleExpand: i, hasActionsColumn: a, show
182
187
  alignItems: "center",
183
188
  justifyContent: "center"
184
189
  },
185
- children: [/* @__PURE__ */ x(p, {
186
- label: D(e.status, F),
190
+ children: [/* @__PURE__ */ v(f, {
191
+ label: w(e.status, N),
187
192
  size: "small",
188
193
  variant: "outlined",
189
- color: e.color ?? I?.[e.status] ? "default" : r[e.status] ?? "default",
194
+ color: e.color ?? P?.[e.status] ? "default" : r[e.status] ?? "default",
190
195
  sx: {
191
196
  height: 20,
192
197
  fontSize: 10,
193
- cursor: O ? "pointer" : "default",
194
- ...(e.color ?? I?.[e.status]) && {
195
- borderColor: e.color ?? I?.[e.status],
196
- color: e.color ?? I?.[e.status]
198
+ cursor: x ? "pointer" : "default",
199
+ ...(e.color ?? P?.[e.status]) && {
200
+ borderColor: e.color ?? P?.[e.status],
201
+ color: e.color ?? P?.[e.status]
197
202
  }
198
203
  },
199
- onClick: O ? (e) => {
200
- e.stopPropagation(), M(e.currentTarget);
204
+ onClick: x ? (e) => {
205
+ e.stopPropagation(), A(e.currentTarget);
201
206
  } : void 0
202
- }), O && /* @__PURE__ */ x(h, {
203
- anchorEl: j,
204
- open: !!j,
205
- onClose: () => M(null),
207
+ }), x && /* @__PURE__ */ v(ne, {
208
+ anchorEl: k,
209
+ open: !!k,
210
+ onClose: () => A(null),
206
211
  children: [
207
212
  "planned",
208
213
  "in-progress",
209
214
  "done",
210
215
  "blocked"
211
- ].map((t) => /* @__PURE__ */ x(g, {
216
+ ].map((t) => /* @__PURE__ */ v(re, {
212
217
  selected: e.status === t,
213
218
  onClick: () => {
214
- O(e, t), M(null);
219
+ x(e, t), A(null);
215
220
  },
216
- children: D(t, F)
221
+ children: w(t, N)
217
222
  }, t))
218
223
  })]
219
224
  })
220
225
  ]
221
226
  });
222
227
  }
223
- function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask: m, onEditTask: h, onDeleteTask: g, onStatusChange: _, onTasksChange: v, enableBuiltinDialogs: C, onTaskCreated: T, onTaskUpdated: E, onTaskDeleted: D, inlineEdit: k, virtualizeRows: A = !1, showAssigneeColumn: j = !1 }) {
224
- let M = c(), N = l(), P = o((e) => e.taskTree), F = o((e) => e.expandedIds), I = o((e) => e.toggleExpand), L = o((e) => e.timeScale), ee = o((e) => e.addTask), R = o((e) => e.updateTask), te = o((e) => e.deleteTask), z = o((e) => e.assigneeFilter), B = u(() => {
225
- let n = t(P, F);
226
- return z ? e(n, z) : n;
228
+ 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 }) {
229
+ 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(() => {
230
+ let n = t(j, M);
231
+ return L ? e(n, L) : n;
227
232
  }, [
228
- P,
229
- F,
230
- z
231
- ]), V = w({
232
- count: B.length,
233
+ j,
234
+ M,
235
+ L
236
+ ]), z = x({
237
+ count: R.length,
233
238
  getScrollElement: () => n.current,
234
239
  estimateSize: () => 40,
235
240
  overscan: 5
236
- }), [ne, H] = d(!1), [re, U] = d(!1), [ie, W] = d(!1), [G, K] = d(null), q = (e) => {
241
+ }), [ae, B] = u(!1), [oe, V] = u(!1), [se, H] = u(!1), [U, W] = u(null), ce = (e) => {
237
242
  let t = {
238
243
  ...e,
239
244
  id: crypto.randomUUID()
240
245
  };
241
- ee(t), v?.(N.getState().tasks), T?.(t), H(!1);
242
- }, J = (e) => {
243
- if (!G) return;
246
+ F(t), h?.(A.getState().tasks), S?.(t), B(!1);
247
+ }, le = (e) => {
248
+ if (!U) return;
244
249
  let t = {
245
250
  ...e,
246
- id: G.id
251
+ id: U.id
247
252
  };
248
- R(t), v?.(N.getState().tasks), E?.(t), U(!1);
249
- }, ae = () => {
250
- G && (te(G.id), v?.(N.getState().tasks), D?.(G.id), W(!1));
251
- }, Y = (e, t) => {
253
+ I(t), h?.(A.getState().tasks), C?.(t), V(!1);
254
+ }, ue = () => {
255
+ U && (ie(U.id), h?.(A.getState().tasks), w?.(U.id), H(!1));
256
+ }, G = (e, t) => {
252
257
  let n = {
253
258
  ...e,
254
259
  name: t
255
260
  };
256
- R(n), v?.(N.getState().tasks), E?.(n);
257
- }, X = C ? (e) => {
258
- K(e), H(!0);
259
- } : m, Z = C ? (e) => {
260
- K(e), U(!0);
261
- } : h, Q = C ? (e) => {
262
- K(e), W(!0);
263
- } : g, $ = !!(X || Z || Q);
264
- return /* @__PURE__ */ S(f, {
261
+ I(n), h?.(A.getState().tasks), C?.(n);
262
+ }, K = b ? (e) => {
263
+ W(e), B(!0);
264
+ } : p, q = b ? (e) => {
265
+ W(e), V(!0);
266
+ } : ne, J = b ? (e) => {
267
+ W(e), H(!0);
268
+ } : re, Y = !!(K || q || J), X = P === "days" ? 80 : 40, [Z, Q] = u(null), $ = Z ? R.findIndex((e) => e.id === Z) : -1;
269
+ c(() => {
270
+ if ($ < 0 || !n.current) return;
271
+ let e = n.current, t = X + $ * 40, r = t + 40;
272
+ t < e.scrollTop ? e.scrollTop = t : r > e.scrollTop + e.clientHeight && (e.scrollTop = r - e.clientHeight);
273
+ }, [
274
+ $,
275
+ X,
276
+ n
277
+ ]);
278
+ function de(e) {
279
+ if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
280
+ let t = R.length;
281
+ 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));
282
+ }
283
+ return /* @__PURE__ */ y(d, {
265
284
  ref: n,
266
285
  onScroll: r,
286
+ tabIndex: 0,
287
+ "data-testid": "gantt-task-panel",
288
+ onKeyDown: de,
267
289
  sx: {
268
- width: s,
290
+ width: ee,
269
291
  flexShrink: 0,
270
292
  overflowY: "auto",
271
- overflowX: "hidden"
293
+ overflowX: "hidden",
294
+ outline: "none"
272
295
  },
273
296
  children: [
274
- /* @__PURE__ */ S(f, {
297
+ /* @__PURE__ */ y(d, {
275
298
  sx: {
276
- height: L === "days" ? 80 : 40,
299
+ height: X,
277
300
  position: "sticky",
278
301
  top: 0,
279
302
  bgcolor: "background.paper",
@@ -284,28 +307,28 @@ function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask
284
307
  display: "flex",
285
308
  flexDirection: "column"
286
309
  },
287
- children: [/* @__PURE__ */ S(f, {
310
+ children: [/* @__PURE__ */ y(d, {
288
311
  sx: {
289
312
  height: 40,
290
313
  display: "flex",
291
314
  alignItems: "center",
292
- borderBottom: L === "days" ? "1px solid" : void 0,
293
- borderColor: L === "days" ? "divider" : void 0
315
+ borderBottom: P === "days" ? "1px solid" : void 0,
316
+ borderColor: P === "days" ? "divider" : void 0
294
317
  },
295
318
  children: [
296
- /* @__PURE__ */ x(f, {
319
+ /* @__PURE__ */ v(d, {
297
320
  sx: {
298
321
  flex: 1,
299
322
  minWidth: 0,
300
323
  pl: 2
301
324
  },
302
- children: /* @__PURE__ */ x(y, {
325
+ children: /* @__PURE__ */ v(g, {
303
326
  variant: "caption",
304
327
  color: "text.secondary",
305
- children: M.columnName
328
+ children: k.columnName
306
329
  })
307
330
  }),
308
- j && /* @__PURE__ */ x(f, {
331
+ O && /* @__PURE__ */ v(d, {
309
332
  sx: {
310
333
  width: 110,
311
334
  flexShrink: 0,
@@ -313,13 +336,13 @@ function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask
313
336
  alignItems: "center",
314
337
  px: 1
315
338
  },
316
- children: /* @__PURE__ */ x(y, {
339
+ children: /* @__PURE__ */ v(g, {
317
340
  variant: "caption",
318
341
  color: "text.secondary",
319
- children: M.columnAssignee
342
+ children: k.columnAssignee
320
343
  })
321
344
  }),
322
- $ && /* @__PURE__ */ x(f, {
345
+ Y && /* @__PURE__ */ v(d, {
323
346
  sx: {
324
347
  width: 96,
325
348
  flexShrink: 0,
@@ -327,13 +350,13 @@ function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask
327
350
  alignItems: "center",
328
351
  justifyContent: "center"
329
352
  },
330
- children: /* @__PURE__ */ x(y, {
353
+ children: /* @__PURE__ */ v(g, {
331
354
  variant: "caption",
332
355
  color: "text.secondary",
333
- children: M.columnActions
356
+ children: k.columnActions
334
357
  })
335
358
  }),
336
- /* @__PURE__ */ x(f, {
359
+ /* @__PURE__ */ v(d, {
337
360
  sx: {
338
361
  width: 90,
339
362
  flexShrink: 0,
@@ -341,21 +364,21 @@ function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask
341
364
  alignItems: "center",
342
365
  justifyContent: "center"
343
366
  },
344
- children: /* @__PURE__ */ x(y, {
367
+ children: /* @__PURE__ */ v(g, {
345
368
  variant: "caption",
346
369
  color: "text.secondary",
347
- children: M.columnStatus
370
+ children: k.columnStatus
348
371
  })
349
372
  })
350
373
  ]
351
- }), L === "days" && /* @__PURE__ */ x(f, { sx: { flex: 1 } })]
374
+ }), P === "days" && /* @__PURE__ */ v(d, { sx: { flex: 1 } })]
352
375
  }),
353
- A ? /* @__PURE__ */ x(f, {
376
+ D ? /* @__PURE__ */ v(d, {
354
377
  sx: {
355
378
  position: "relative",
356
- height: V.getTotalSize()
379
+ height: z.getTotalSize()
357
380
  },
358
- children: V.getVirtualItems().map((e) => /* @__PURE__ */ x(f, {
381
+ children: z.getVirtualItems().map((e) => /* @__PURE__ */ v(d, {
359
382
  style: {
360
383
  position: "absolute",
361
384
  top: 0,
@@ -364,59 +387,63 @@ function k({ scrollRef: n, onScroll: r, panelWidth: s, onTaskClick: p, onAddTask
364
387
  height: 40,
365
388
  transform: `translateY(${e.start}px)`
366
389
  },
367
- children: /* @__PURE__ */ x(O, {
368
- task: B[e.index],
369
- expandedIds: F,
370
- toggleExpand: I,
371
- hasActionsColumn: $,
372
- showAssigneeColumn: j,
373
- onTaskClick: p,
374
- onAddTask: X,
375
- onEditTask: Z,
376
- onDeleteTask: Q,
377
- onStatusChange: _,
378
- inlineEdit: k,
379
- onInlineRename: k ? Y : void 0
390
+ children: /* @__PURE__ */ v(T, {
391
+ task: R[e.index],
392
+ expandedIds: M,
393
+ toggleExpand: N,
394
+ hasActionsColumn: Y,
395
+ showAssigneeColumn: O,
396
+ onTaskClick: f,
397
+ onAddTask: K,
398
+ onEditTask: q,
399
+ onDeleteTask: J,
400
+ onStatusChange: m,
401
+ inlineEdit: E,
402
+ onInlineRename: E ? G : void 0,
403
+ isSelected: R[e.index].id === Z,
404
+ onSelect: () => Q(R[e.index].id)
380
405
  })
381
406
  }, e.key))
382
- }) : B.map((e) => /* @__PURE__ */ x(O, {
407
+ }) : R.map((e) => /* @__PURE__ */ v(T, {
383
408
  task: e,
384
- expandedIds: F,
385
- toggleExpand: I,
386
- hasActionsColumn: $,
387
- showAssigneeColumn: j,
388
- onTaskClick: p,
389
- onAddTask: X,
390
- onEditTask: Z,
391
- onDeleteTask: Q,
392
- onStatusChange: _,
393
- inlineEdit: k,
394
- onInlineRename: k ? Y : void 0
409
+ expandedIds: M,
410
+ toggleExpand: N,
411
+ hasActionsColumn: Y,
412
+ showAssigneeColumn: O,
413
+ onTaskClick: f,
414
+ onAddTask: K,
415
+ onEditTask: q,
416
+ onDeleteTask: J,
417
+ onStatusChange: m,
418
+ inlineEdit: E,
419
+ onInlineRename: E ? G : void 0,
420
+ isSelected: e.id === Z,
421
+ onSelect: () => Q(e.id)
395
422
  }, e.id)),
396
- C && /* @__PURE__ */ S(b, { children: [
397
- /* @__PURE__ */ x(i, {
398
- open: ne,
423
+ b && /* @__PURE__ */ y(_, { children: [
424
+ /* @__PURE__ */ v(i, {
425
+ open: ae,
399
426
  mode: "add",
400
- defaultParentId: G?.id,
401
- onSave: q,
402
- onClose: () => H(!1)
427
+ defaultParentId: U?.id,
428
+ onSave: ce,
429
+ onClose: () => B(!1)
403
430
  }),
404
- /* @__PURE__ */ x(i, {
405
- open: re,
431
+ /* @__PURE__ */ v(i, {
432
+ open: oe,
406
433
  mode: "edit",
407
- initialTask: G ?? void 0,
408
- onSave: J,
409
- onClose: () => U(!1)
434
+ initialTask: U ?? void 0,
435
+ onSave: le,
436
+ onClose: () => V(!1)
410
437
  }),
411
- /* @__PURE__ */ x(a, {
412
- open: ie,
413
- task: G,
414
- onConfirm: ae,
415
- onClose: () => W(!1)
438
+ /* @__PURE__ */ v(a, {
439
+ open: se,
440
+ task: U,
441
+ onConfirm: ue,
442
+ onClose: () => H(!1)
416
443
  })
417
444
  ] })
418
445
  ]
419
446
  });
420
447
  }
421
448
  //#endregion
422
- export { k as GanttTaskPanel };
449
+ export { E as GanttTaskPanel };
@@ -1,2 +1,2 @@
1
1
  import { type JsonEditorProps } from "./JsonEditor.types";
2
- export declare function JsonEditor({ value, onChange, onValidChange, placeholder, height, width, disabled, readonly, error, helperText, name, indent, schema, showLineNumbers, showLineColumn, showMinimap, showFolding, showValidation, enablePathFinder, toolbarConfig, translation, highlightColors, onBlur, onFocus, onPathCopy, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function JsonEditor({ value, onChange, onValidChange, placeholder, height, width, disabled, readonly, error, helperText, name, indent, schema, showLineNumbers, showLineColumn, showMinimap, showFolding, showValidation, enablePathFinder, downloadFilename, toolbarConfig, translation, highlightColors, onBlur, onFocus, onPathCopy, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;