@thebuoyant-tsdev/mui-ts-library 3.15.0 → 3.17.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 +56 -0
- package/README.md +56 -0
- package/dist/components/gantt-chart/GanttChart.d.ts +1 -1
- package/dist/components/gantt-chart/GanttChart.js +36 -33
- package/dist/components/gantt-chart/GanttChart.store.d.ts +2 -0
- package/dist/components/gantt-chart/GanttChart.store.js +3 -0
- package/dist/components/gantt-chart/GanttChart.types.d.ts +15 -0
- package/dist/components/gantt-chart/GanttChart.types.js +3 -0
- package/dist/components/gantt-chart/GanttTaskDialog.js +170 -124
- package/dist/components/gantt-chart/GanttTaskPanel.js +131 -124
- package/dist/components/gantt-chart/GanttTimeline.d.ts +2 -1
- package/dist/components/gantt-chart/GanttTimeline.js +99 -91
- package/dist/components/gantt-chart/GanttToolbar.js +155 -131
- package/dist/components/gantt-chart/hooks/useGanttDrag.d.ts +2 -1
- package/dist/components/gantt-chart/hooks/useGanttDrag.js +35 -35
- package/dist/components/gantt-chart/util/gantt-chart.util.d.ts +5 -0
- package/dist/components/gantt-chart/util/gantt-chart.util.js +36 -30
- package/dist/index.cjs +2 -2
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { STATUS_BAR_COLOR as
|
|
3
|
-
import { GanttTaskDialog as
|
|
4
|
-
import { GanttDeleteDialog as
|
|
5
|
-
import { useGanttChartStore as
|
|
6
|
-
import { useMemo as
|
|
7
|
-
import { Box as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import
|
|
10
|
-
import { useVirtualizer as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
1
|
+
import { filterByAssignee as e, getVisibleTasks as t } from "./util/gantt-chart.util.js";
|
|
2
|
+
import { STATUS_BAR_COLOR as n, STATUS_CHIP_COLOR as r } from "./GanttChart.constants.js";
|
|
3
|
+
import { GanttTaskDialog as i } from "./GanttTaskDialog.js";
|
|
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";
|
|
13
13
|
//#region src/components/gantt-chart/GanttTaskPanel.tsx
|
|
14
|
-
function
|
|
14
|
+
function D(e, t) {
|
|
15
15
|
return {
|
|
16
16
|
planned: t.statusPlanned,
|
|
17
17
|
"in-progress": t.statusInProgress,
|
|
@@ -19,11 +19,11 @@ function E(e, t) {
|
|
|
19
19
|
blocked: t.statusBlocked
|
|
20
20
|
}[e];
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
let [j, M] =
|
|
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
24
|
N !== null && N.trim() && A?.(e, N.trim()), P(null);
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ S(f, {
|
|
27
27
|
className: "gantt-task-row",
|
|
28
28
|
"data-testid": `gantt-task-row-${e.id}`,
|
|
29
29
|
sx: {
|
|
@@ -38,7 +38,7 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
38
38
|
},
|
|
39
39
|
onClick: () => l?.(e),
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ S(f, {
|
|
42
42
|
sx: {
|
|
43
43
|
flex: 1,
|
|
44
44
|
minWidth: 0,
|
|
@@ -50,14 +50,14 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
50
50
|
height: "100%"
|
|
51
51
|
},
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ x(f, {
|
|
54
54
|
sx: {
|
|
55
55
|
width: 16,
|
|
56
56
|
flexShrink: 0,
|
|
57
57
|
display: "flex",
|
|
58
58
|
justifyContent: "center"
|
|
59
59
|
},
|
|
60
|
-
children: e.children.length > 0 && /* @__PURE__ */
|
|
60
|
+
children: e.children.length > 0 && /* @__PURE__ */ x(f, {
|
|
61
61
|
component: "span",
|
|
62
62
|
sx: {
|
|
63
63
|
fontSize: 9,
|
|
@@ -67,18 +67,18 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
67
67
|
onClick: (t) => {
|
|
68
68
|
t.stopPropagation(), i(e.id);
|
|
69
69
|
},
|
|
70
|
-
children:
|
|
70
|
+
children: t.has(e.id) ? "▼" : "▶"
|
|
71
71
|
})
|
|
72
72
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ x(f, { sx: {
|
|
74
74
|
width: 8,
|
|
75
75
|
height: 8,
|
|
76
76
|
borderRadius: e.isMilestone ? 0 : "50%",
|
|
77
77
|
transform: e.isMilestone ? "rotate(45deg)" : void 0,
|
|
78
78
|
flexShrink: 0,
|
|
79
|
-
bgcolor: e.color ?? I?.[e.status] ??
|
|
79
|
+
bgcolor: e.color ?? I?.[e.status] ?? n[e.status] ?? "grey.400"
|
|
80
80
|
} }),
|
|
81
|
-
N === null ? /* @__PURE__ */
|
|
81
|
+
N === null ? /* @__PURE__ */ x(y, {
|
|
82
82
|
variant: "body2",
|
|
83
83
|
noWrap: !0,
|
|
84
84
|
sx: {
|
|
@@ -90,7 +90,7 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
90
90
|
t.stopPropagation(), P(e.name);
|
|
91
91
|
} : void 0,
|
|
92
92
|
children: e.name
|
|
93
|
-
}) : /* @__PURE__ */
|
|
93
|
+
}) : /* @__PURE__ */ x(_, {
|
|
94
94
|
size: "small",
|
|
95
95
|
variant: "standard",
|
|
96
96
|
value: N,
|
|
@@ -109,7 +109,7 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
109
109
|
})
|
|
110
110
|
]
|
|
111
111
|
}),
|
|
112
|
-
|
|
112
|
+
o && /* @__PURE__ */ x(f, {
|
|
113
113
|
sx: {
|
|
114
114
|
width: 110,
|
|
115
115
|
flexShrink: 0,
|
|
@@ -118,14 +118,14 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
118
118
|
px: 1,
|
|
119
119
|
overflow: "hidden"
|
|
120
120
|
},
|
|
121
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ x(y, {
|
|
122
122
|
variant: "caption",
|
|
123
123
|
noWrap: !0,
|
|
124
124
|
color: e.assignee ? "text.primary" : "text.disabled",
|
|
125
125
|
children: e.assignee ?? "—"
|
|
126
126
|
})
|
|
127
127
|
}),
|
|
128
|
-
a && /* @__PURE__ */
|
|
128
|
+
a && /* @__PURE__ */ S(f, {
|
|
129
129
|
className: "gantt-row-actions",
|
|
130
130
|
sx: {
|
|
131
131
|
width: 96,
|
|
@@ -136,45 +136,45 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
136
136
|
pr: .5
|
|
137
137
|
},
|
|
138
138
|
children: [
|
|
139
|
-
|
|
139
|
+
b && /* @__PURE__ */ x(v, {
|
|
140
140
|
title: F.editTaskTooltip,
|
|
141
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ x(m, {
|
|
142
142
|
size: "small",
|
|
143
143
|
"aria-label": F.editTaskTooltip,
|
|
144
144
|
"data-testid": `gantt-edit-task-${e.id}`,
|
|
145
145
|
onClick: (t) => {
|
|
146
|
-
t.stopPropagation(),
|
|
146
|
+
t.stopPropagation(), b(e);
|
|
147
147
|
},
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ x(E, { fontSize: "inherit" })
|
|
149
149
|
})
|
|
150
150
|
}),
|
|
151
|
-
|
|
151
|
+
u && /* @__PURE__ */ x(v, {
|
|
152
152
|
title: F.addTaskTooltip,
|
|
153
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ x(m, {
|
|
154
154
|
size: "small",
|
|
155
155
|
"aria-label": F.addTaskTooltip,
|
|
156
156
|
"data-testid": `gantt-add-task-${e.id}`,
|
|
157
157
|
onClick: (t) => {
|
|
158
|
-
t.stopPropagation(),
|
|
158
|
+
t.stopPropagation(), u(e);
|
|
159
159
|
},
|
|
160
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ x(T, { fontSize: "inherit" })
|
|
161
161
|
})
|
|
162
162
|
}),
|
|
163
|
-
|
|
163
|
+
w && /* @__PURE__ */ x(v, {
|
|
164
164
|
title: F.deleteTaskTooltip,
|
|
165
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ x(m, {
|
|
166
166
|
size: "small",
|
|
167
167
|
"aria-label": F.deleteTaskTooltip,
|
|
168
168
|
"data-testid": `gantt-delete-task-${e.id}`,
|
|
169
169
|
onClick: (t) => {
|
|
170
|
-
t.stopPropagation(),
|
|
170
|
+
t.stopPropagation(), w(e);
|
|
171
171
|
},
|
|
172
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ x(C, { fontSize: "inherit" })
|
|
173
173
|
})
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ S(f, {
|
|
178
178
|
sx: {
|
|
179
179
|
width: 90,
|
|
180
180
|
flexShrink: 0,
|
|
@@ -182,11 +182,11 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
182
182
|
alignItems: "center",
|
|
183
183
|
justifyContent: "center"
|
|
184
184
|
},
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
-
label:
|
|
185
|
+
children: [/* @__PURE__ */ x(p, {
|
|
186
|
+
label: D(e.status, F),
|
|
187
187
|
size: "small",
|
|
188
188
|
variant: "outlined",
|
|
189
|
-
color: e.color ?? I?.[e.status] ? "default" :
|
|
189
|
+
color: e.color ?? I?.[e.status] ? "default" : r[e.status] ?? "default",
|
|
190
190
|
sx: {
|
|
191
191
|
height: 20,
|
|
192
192
|
fontSize: 10,
|
|
@@ -199,7 +199,7 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
199
199
|
onClick: O ? (e) => {
|
|
200
200
|
e.stopPropagation(), M(e.currentTarget);
|
|
201
201
|
} : void 0
|
|
202
|
-
}), O && /* @__PURE__ */
|
|
202
|
+
}), O && /* @__PURE__ */ x(h, {
|
|
203
203
|
anchorEl: j,
|
|
204
204
|
open: !!j,
|
|
205
205
|
onClose: () => M(null),
|
|
@@ -208,65 +208,72 @@ function D({ task: e, expandedIds: r, toggleExpand: i, hasActionsColumn: a, show
|
|
|
208
208
|
"in-progress",
|
|
209
209
|
"done",
|
|
210
210
|
"blocked"
|
|
211
|
-
].map((t) => /* @__PURE__ */
|
|
211
|
+
].map((t) => /* @__PURE__ */ x(g, {
|
|
212
212
|
selected: e.status === t,
|
|
213
213
|
onClick: () => {
|
|
214
214
|
O(e, t), M(null);
|
|
215
215
|
},
|
|
216
|
-
children:
|
|
216
|
+
children: D(t, F)
|
|
217
217
|
}, t))
|
|
218
218
|
})]
|
|
219
219
|
})
|
|
220
220
|
]
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
let
|
|
225
|
-
|
|
226
|
-
|
|
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;
|
|
227
|
+
}, [
|
|
228
|
+
P,
|
|
229
|
+
F,
|
|
230
|
+
z
|
|
231
|
+
]), V = w({
|
|
232
|
+
count: B.length,
|
|
233
|
+
getScrollElement: () => n.current,
|
|
227
234
|
estimateSize: () => 40,
|
|
228
235
|
overscan: 5
|
|
229
|
-
}), [
|
|
236
|
+
}), [ne, H] = d(!1), [re, U] = d(!1), [ie, W] = d(!1), [G, K] = d(null), q = (e) => {
|
|
230
237
|
let t = {
|
|
231
238
|
...e,
|
|
232
239
|
id: crypto.randomUUID()
|
|
233
240
|
};
|
|
234
|
-
|
|
235
|
-
},
|
|
236
|
-
if (!
|
|
241
|
+
ee(t), v?.(N.getState().tasks), T?.(t), H(!1);
|
|
242
|
+
}, J = (e) => {
|
|
243
|
+
if (!G) return;
|
|
237
244
|
let t = {
|
|
238
245
|
...e,
|
|
239
|
-
id:
|
|
246
|
+
id: G.id
|
|
240
247
|
};
|
|
241
|
-
R(t),
|
|
242
|
-
},
|
|
243
|
-
|
|
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));
|
|
244
251
|
}, Y = (e, t) => {
|
|
245
252
|
let n = {
|
|
246
253
|
...e,
|
|
247
254
|
name: t
|
|
248
255
|
};
|
|
249
|
-
R(n),
|
|
250
|
-
}, X =
|
|
251
|
-
|
|
252
|
-
} :
|
|
253
|
-
|
|
254
|
-
} :
|
|
255
|
-
|
|
256
|
-
} :
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
-
ref:
|
|
259
|
-
onScroll:
|
|
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, {
|
|
265
|
+
ref: n,
|
|
266
|
+
onScroll: r,
|
|
260
267
|
sx: {
|
|
261
|
-
width:
|
|
268
|
+
width: s,
|
|
262
269
|
flexShrink: 0,
|
|
263
270
|
overflowY: "auto",
|
|
264
271
|
overflowX: "hidden"
|
|
265
272
|
},
|
|
266
273
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ S(f, {
|
|
268
275
|
sx: {
|
|
269
|
-
height:
|
|
276
|
+
height: L === "days" ? 80 : 40,
|
|
270
277
|
position: "sticky",
|
|
271
278
|
top: 0,
|
|
272
279
|
bgcolor: "background.paper",
|
|
@@ -277,28 +284,28 @@ function O({ scrollRef: t, onScroll: n, panelWidth: o, onTaskClick: f, onAddTask
|
|
|
277
284
|
display: "flex",
|
|
278
285
|
flexDirection: "column"
|
|
279
286
|
},
|
|
280
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ S(f, {
|
|
281
288
|
sx: {
|
|
282
289
|
height: 40,
|
|
283
290
|
display: "flex",
|
|
284
291
|
alignItems: "center",
|
|
285
|
-
borderBottom:
|
|
286
|
-
borderColor:
|
|
292
|
+
borderBottom: L === "days" ? "1px solid" : void 0,
|
|
293
|
+
borderColor: L === "days" ? "divider" : void 0
|
|
287
294
|
},
|
|
288
295
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ x(f, {
|
|
290
297
|
sx: {
|
|
291
298
|
flex: 1,
|
|
292
299
|
minWidth: 0,
|
|
293
300
|
pl: 2
|
|
294
301
|
},
|
|
295
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ x(y, {
|
|
296
303
|
variant: "caption",
|
|
297
304
|
color: "text.secondary",
|
|
298
|
-
children:
|
|
305
|
+
children: M.columnName
|
|
299
306
|
})
|
|
300
307
|
}),
|
|
301
|
-
|
|
308
|
+
j && /* @__PURE__ */ x(f, {
|
|
302
309
|
sx: {
|
|
303
310
|
width: 110,
|
|
304
311
|
flexShrink: 0,
|
|
@@ -306,13 +313,13 @@ function O({ scrollRef: t, onScroll: n, panelWidth: o, onTaskClick: f, onAddTask
|
|
|
306
313
|
alignItems: "center",
|
|
307
314
|
px: 1
|
|
308
315
|
},
|
|
309
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ x(y, {
|
|
310
317
|
variant: "caption",
|
|
311
318
|
color: "text.secondary",
|
|
312
|
-
children:
|
|
319
|
+
children: M.columnAssignee
|
|
313
320
|
})
|
|
314
321
|
}),
|
|
315
|
-
$ && /* @__PURE__ */
|
|
322
|
+
$ && /* @__PURE__ */ x(f, {
|
|
316
323
|
sx: {
|
|
317
324
|
width: 96,
|
|
318
325
|
flexShrink: 0,
|
|
@@ -320,13 +327,13 @@ function O({ scrollRef: t, onScroll: n, panelWidth: o, onTaskClick: f, onAddTask
|
|
|
320
327
|
alignItems: "center",
|
|
321
328
|
justifyContent: "center"
|
|
322
329
|
},
|
|
323
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ x(y, {
|
|
324
331
|
variant: "caption",
|
|
325
332
|
color: "text.secondary",
|
|
326
|
-
children:
|
|
333
|
+
children: M.columnActions
|
|
327
334
|
})
|
|
328
335
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ x(f, {
|
|
330
337
|
sx: {
|
|
331
338
|
width: 90,
|
|
332
339
|
flexShrink: 0,
|
|
@@ -334,21 +341,21 @@ function O({ scrollRef: t, onScroll: n, panelWidth: o, onTaskClick: f, onAddTask
|
|
|
334
341
|
alignItems: "center",
|
|
335
342
|
justifyContent: "center"
|
|
336
343
|
},
|
|
337
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ x(y, {
|
|
338
345
|
variant: "caption",
|
|
339
346
|
color: "text.secondary",
|
|
340
|
-
children:
|
|
347
|
+
children: M.columnStatus
|
|
341
348
|
})
|
|
342
349
|
})
|
|
343
350
|
]
|
|
344
|
-
}),
|
|
351
|
+
}), L === "days" && /* @__PURE__ */ x(f, { sx: { flex: 1 } })]
|
|
345
352
|
}),
|
|
346
|
-
|
|
353
|
+
A ? /* @__PURE__ */ x(f, {
|
|
347
354
|
sx: {
|
|
348
355
|
position: "relative",
|
|
349
|
-
height:
|
|
356
|
+
height: V.getTotalSize()
|
|
350
357
|
},
|
|
351
|
-
children:
|
|
358
|
+
children: V.getVirtualItems().map((e) => /* @__PURE__ */ x(f, {
|
|
352
359
|
style: {
|
|
353
360
|
position: "absolute",
|
|
354
361
|
top: 0,
|
|
@@ -357,59 +364,59 @@ function O({ scrollRef: t, onScroll: n, panelWidth: o, onTaskClick: f, onAddTask
|
|
|
357
364
|
height: 40,
|
|
358
365
|
transform: `translateY(${e.start}px)`
|
|
359
366
|
},
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
-
task:
|
|
362
|
-
expandedIds:
|
|
363
|
-
toggleExpand:
|
|
367
|
+
children: /* @__PURE__ */ x(O, {
|
|
368
|
+
task: B[e.index],
|
|
369
|
+
expandedIds: F,
|
|
370
|
+
toggleExpand: I,
|
|
364
371
|
hasActionsColumn: $,
|
|
365
|
-
showAssigneeColumn:
|
|
366
|
-
onTaskClick:
|
|
372
|
+
showAssigneeColumn: j,
|
|
373
|
+
onTaskClick: p,
|
|
367
374
|
onAddTask: X,
|
|
368
375
|
onEditTask: Z,
|
|
369
376
|
onDeleteTask: Q,
|
|
370
|
-
onStatusChange:
|
|
371
|
-
inlineEdit:
|
|
372
|
-
onInlineRename:
|
|
377
|
+
onStatusChange: _,
|
|
378
|
+
inlineEdit: k,
|
|
379
|
+
onInlineRename: k ? Y : void 0
|
|
373
380
|
})
|
|
374
381
|
}, e.key))
|
|
375
|
-
}) :
|
|
382
|
+
}) : B.map((e) => /* @__PURE__ */ x(O, {
|
|
376
383
|
task: e,
|
|
377
|
-
expandedIds:
|
|
378
|
-
toggleExpand:
|
|
384
|
+
expandedIds: F,
|
|
385
|
+
toggleExpand: I,
|
|
379
386
|
hasActionsColumn: $,
|
|
380
|
-
showAssigneeColumn:
|
|
381
|
-
onTaskClick:
|
|
387
|
+
showAssigneeColumn: j,
|
|
388
|
+
onTaskClick: p,
|
|
382
389
|
onAddTask: X,
|
|
383
390
|
onEditTask: Z,
|
|
384
391
|
onDeleteTask: Q,
|
|
385
|
-
onStatusChange:
|
|
386
|
-
inlineEdit:
|
|
387
|
-
onInlineRename:
|
|
392
|
+
onStatusChange: _,
|
|
393
|
+
inlineEdit: k,
|
|
394
|
+
onInlineRename: k ? Y : void 0
|
|
388
395
|
}, e.id)),
|
|
389
|
-
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
open:
|
|
396
|
+
C && /* @__PURE__ */ S(b, { children: [
|
|
397
|
+
/* @__PURE__ */ x(i, {
|
|
398
|
+
open: ne,
|
|
392
399
|
mode: "add",
|
|
393
|
-
defaultParentId:
|
|
394
|
-
onSave:
|
|
400
|
+
defaultParentId: G?.id,
|
|
401
|
+
onSave: q,
|
|
395
402
|
onClose: () => H(!1)
|
|
396
403
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
open:
|
|
404
|
+
/* @__PURE__ */ x(i, {
|
|
405
|
+
open: re,
|
|
399
406
|
mode: "edit",
|
|
400
|
-
initialTask:
|
|
401
|
-
onSave:
|
|
402
|
-
onClose: () =>
|
|
407
|
+
initialTask: G ?? void 0,
|
|
408
|
+
onSave: J,
|
|
409
|
+
onClose: () => U(!1)
|
|
403
410
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
open:
|
|
406
|
-
task:
|
|
407
|
-
onConfirm:
|
|
408
|
-
onClose: () =>
|
|
411
|
+
/* @__PURE__ */ x(a, {
|
|
412
|
+
open: ie,
|
|
413
|
+
task: G,
|
|
414
|
+
onConfirm: ae,
|
|
415
|
+
onClose: () => W(!1)
|
|
409
416
|
})
|
|
410
417
|
] })
|
|
411
418
|
]
|
|
412
419
|
});
|
|
413
420
|
}
|
|
414
421
|
//#endregion
|
|
415
|
-
export {
|
|
422
|
+
export { k as GanttTaskPanel };
|
|
@@ -10,10 +10,11 @@ type GanttTimelineProps = {
|
|
|
10
10
|
progressDraggable?: boolean;
|
|
11
11
|
showCriticalPath?: boolean;
|
|
12
12
|
virtualizeRows?: boolean;
|
|
13
|
+
onDragStart?: (task: GanttTask, type: "move" | "resize") => void;
|
|
13
14
|
onTaskMoved?: (task: GanttTask, newStart: Date, newEnd: Date) => void;
|
|
14
15
|
onTaskResized?: (task: GanttTask, newEnd: Date) => void;
|
|
15
16
|
onTasksChange?: (tasks: GanttTask[]) => void;
|
|
16
17
|
onStatusChange?: (task: GanttTask, status: GanttTaskStatus) => void;
|
|
17
18
|
};
|
|
18
|
-
export declare function GanttTimeline({ scrollRef, onScroll, onTaskClick, onMilestoneClick, draggable, resizable, progressDraggable, showCriticalPath, virtualizeRows, onTaskMoved, onTaskResized, onTasksChange, onStatusChange, }: GanttTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function GanttTimeline({ scrollRef, onScroll, onTaskClick, onMilestoneClick, draggable, resizable, progressDraggable, showCriticalPath, virtualizeRows, onDragStart, onTaskMoved, onTaskResized, onTasksChange, onStatusChange, }: GanttTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export {};
|