gantt-lib 0.7.1 → 0.9.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/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +233 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -235
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -216,8 +216,8 @@ interface GanttChartProps {
|
|
|
216
216
|
headerHeight?: number;
|
|
217
217
|
/** Container height. Can be pixels (600), string ("90vh", "100%", "500px"), or undefined for auto height */
|
|
218
218
|
containerHeight?: number | string;
|
|
219
|
-
/** Callback when tasks are modified
|
|
220
|
-
|
|
219
|
+
/** Callback when tasks are modified. Receives ONLY the changed tasks as full objects with all properties. */
|
|
220
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
221
221
|
/** Optional callback for dependency validation results */
|
|
222
222
|
onValidateDependencies?: (result: ValidationResult) => void;
|
|
223
223
|
/** Enable automatic shifting of dependent tasks when predecessor moves (default: false) */
|
|
@@ -244,6 +244,10 @@ interface GanttChartProps {
|
|
|
244
244
|
onInsertAfter?: (taskId: string, newTask: Task) => void;
|
|
245
245
|
/** Callback when tasks are reordered via drag in the task list */
|
|
246
246
|
onReorder?: (tasks: Task[], movedTaskId?: string, inferredParentId?: string) => void;
|
|
247
|
+
/** Callback when a task is promoted (parentId removed). If not provided, default internal logic is used. */
|
|
248
|
+
onPromoteTask?: (taskId: string) => void;
|
|
249
|
+
/** Callback when a task is demoted (parentId set). If not provided, default internal logic is used. */
|
|
250
|
+
onDemoteTask?: (taskId: string, newParentId: string) => void;
|
|
247
251
|
/** Enable add task button at bottom of task list (default: true) */
|
|
248
252
|
enableAddTask?: boolean;
|
|
249
253
|
}
|
|
@@ -289,8 +293,8 @@ interface TaskRowProps {
|
|
|
289
293
|
dayWidth: number;
|
|
290
294
|
/** Height of the task row in pixels */
|
|
291
295
|
rowHeight: number;
|
|
292
|
-
/** Callback when task is modified via drag/resize */
|
|
293
|
-
|
|
296
|
+
/** Callback when task is modified via drag/resize. Receives array of changed tasks. */
|
|
297
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
294
298
|
/** Callback when task drag state changes (for rendering guide lines) */
|
|
295
299
|
onDragStateChange?: (state: {
|
|
296
300
|
isDragging: boolean;
|
|
@@ -401,8 +405,8 @@ interface TaskListProps {
|
|
|
401
405
|
headerHeight: number;
|
|
402
406
|
/** Width of the task list overlay in pixels (default: 400) */
|
|
403
407
|
taskListWidth?: number;
|
|
404
|
-
/** Callback when
|
|
405
|
-
|
|
408
|
+
/** Callback when tasks are modified via inline edit. Receives array of changed tasks. */
|
|
409
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
406
410
|
/** ID of currently selected task */
|
|
407
411
|
selectedTaskId?: string;
|
|
408
412
|
/** Callback when task row is clicked */
|
package/dist/index.d.ts
CHANGED
|
@@ -216,8 +216,8 @@ interface GanttChartProps {
|
|
|
216
216
|
headerHeight?: number;
|
|
217
217
|
/** Container height. Can be pixels (600), string ("90vh", "100%", "500px"), or undefined for auto height */
|
|
218
218
|
containerHeight?: number | string;
|
|
219
|
-
/** Callback when tasks are modified
|
|
220
|
-
|
|
219
|
+
/** Callback when tasks are modified. Receives ONLY the changed tasks as full objects with all properties. */
|
|
220
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
221
221
|
/** Optional callback for dependency validation results */
|
|
222
222
|
onValidateDependencies?: (result: ValidationResult) => void;
|
|
223
223
|
/** Enable automatic shifting of dependent tasks when predecessor moves (default: false) */
|
|
@@ -244,6 +244,10 @@ interface GanttChartProps {
|
|
|
244
244
|
onInsertAfter?: (taskId: string, newTask: Task) => void;
|
|
245
245
|
/** Callback when tasks are reordered via drag in the task list */
|
|
246
246
|
onReorder?: (tasks: Task[], movedTaskId?: string, inferredParentId?: string) => void;
|
|
247
|
+
/** Callback when a task is promoted (parentId removed). If not provided, default internal logic is used. */
|
|
248
|
+
onPromoteTask?: (taskId: string) => void;
|
|
249
|
+
/** Callback when a task is demoted (parentId set). If not provided, default internal logic is used. */
|
|
250
|
+
onDemoteTask?: (taskId: string, newParentId: string) => void;
|
|
247
251
|
/** Enable add task button at bottom of task list (default: true) */
|
|
248
252
|
enableAddTask?: boolean;
|
|
249
253
|
}
|
|
@@ -289,8 +293,8 @@ interface TaskRowProps {
|
|
|
289
293
|
dayWidth: number;
|
|
290
294
|
/** Height of the task row in pixels */
|
|
291
295
|
rowHeight: number;
|
|
292
|
-
/** Callback when task is modified via drag/resize */
|
|
293
|
-
|
|
296
|
+
/** Callback when task is modified via drag/resize. Receives array of changed tasks. */
|
|
297
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
294
298
|
/** Callback when task drag state changes (for rendering guide lines) */
|
|
295
299
|
onDragStateChange?: (state: {
|
|
296
300
|
isDragging: boolean;
|
|
@@ -401,8 +405,8 @@ interface TaskListProps {
|
|
|
401
405
|
headerHeight: number;
|
|
402
406
|
/** Width of the task list overlay in pixels (default: 400) */
|
|
403
407
|
taskListWidth?: number;
|
|
404
|
-
/** Callback when
|
|
405
|
-
|
|
408
|
+
/** Callback when tasks are modified via inline edit. Receives array of changed tasks. */
|
|
409
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
406
410
|
/** ID of currently selected task */
|
|
407
411
|
selectedTaskId?: string;
|
|
408
412
|
/** Callback when task row is clicked */
|