@libxai/board 0.12.2 → 0.13.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.cjs +48 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +48 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1859,10 +1859,11 @@ interface TaskBarProps {
|
|
|
1859
1859
|
onDateChange?: (task: Task, newStart: Date, newEnd: Date) => void;
|
|
1860
1860
|
onDependencyCreate?: (fromTask: Task, toTaskId: string) => void;
|
|
1861
1861
|
allTaskPositions?: TaskPosition[];
|
|
1862
|
+
onDragMove?: (taskId: string, daysDelta: number, isDragging: boolean) => void;
|
|
1862
1863
|
}
|
|
1863
1864
|
declare function TaskBar({ task, x, y, width, theme, dayWidth, startDate, templates, onClick, onDoubleClick, // v0.8.0
|
|
1864
1865
|
onContextMenu, // v0.8.0
|
|
1865
|
-
onDateChange, onDependencyCreate, allTaskPositions }: TaskBarProps): react_jsx_runtime.JSX.Element;
|
|
1866
|
+
onDateChange, onDependencyCreate, allTaskPositions, onDragMove, }: TaskBarProps): react_jsx_runtime.JSX.Element;
|
|
1866
1867
|
|
|
1867
1868
|
interface DependencyLineProps {
|
|
1868
1869
|
x1: number;
|
|
@@ -2212,6 +2213,30 @@ declare const ganttUtils: {
|
|
|
2212
2213
|
* @returns Updated tasks with rescheduled dependencies
|
|
2213
2214
|
*/
|
|
2214
2215
|
autoScheduleDependents: (tasks: Task[], changedTaskId: string) => Task[];
|
|
2216
|
+
/**
|
|
2217
|
+
* v0.13.0: Calculate cascade preview positions for dependent tasks during drag
|
|
2218
|
+
* Returns preview positions showing where dependent tasks will move
|
|
2219
|
+
* @param tasks - All tasks (flattened)
|
|
2220
|
+
* @param draggedTaskId - Task being dragged
|
|
2221
|
+
* @param daysDelta - How many days the dragged task is being moved
|
|
2222
|
+
* @param flatTasks - Flattened task list with row indices
|
|
2223
|
+
* @param timelineStartDate - Start date of the timeline
|
|
2224
|
+
* @param dayWidth - Width of one day in pixels
|
|
2225
|
+
* @param rowHeight - Height of each row
|
|
2226
|
+
* @param headerHeight - Height of the header
|
|
2227
|
+
* @returns Array of DependentTaskPreview objects
|
|
2228
|
+
*/
|
|
2229
|
+
calculateCascadePreview: (tasks: Task[], draggedTaskId: string, daysDelta: number, flatTasks: Task[], timelineStartDate: Date, dayWidth: number, rowHeight: number, headerHeight: number) => Array<{
|
|
2230
|
+
taskId: string;
|
|
2231
|
+
taskName: string;
|
|
2232
|
+
originalX: number;
|
|
2233
|
+
previewX: number;
|
|
2234
|
+
width: number;
|
|
2235
|
+
y: number;
|
|
2236
|
+
rowIndex: number;
|
|
2237
|
+
daysDelta: number;
|
|
2238
|
+
color?: string;
|
|
2239
|
+
}>;
|
|
2215
2240
|
/**
|
|
2216
2241
|
* 🚀 KILLER FEATURE #3: Split a task (create GAP in the middle, like Bryntum/DHTMLX)
|
|
2217
2242
|
* Same task, but work is paused for some days then continues
|
package/dist/index.d.ts
CHANGED
|
@@ -1859,10 +1859,11 @@ interface TaskBarProps {
|
|
|
1859
1859
|
onDateChange?: (task: Task, newStart: Date, newEnd: Date) => void;
|
|
1860
1860
|
onDependencyCreate?: (fromTask: Task, toTaskId: string) => void;
|
|
1861
1861
|
allTaskPositions?: TaskPosition[];
|
|
1862
|
+
onDragMove?: (taskId: string, daysDelta: number, isDragging: boolean) => void;
|
|
1862
1863
|
}
|
|
1863
1864
|
declare function TaskBar({ task, x, y, width, theme, dayWidth, startDate, templates, onClick, onDoubleClick, // v0.8.0
|
|
1864
1865
|
onContextMenu, // v0.8.0
|
|
1865
|
-
onDateChange, onDependencyCreate, allTaskPositions }: TaskBarProps): react_jsx_runtime.JSX.Element;
|
|
1866
|
+
onDateChange, onDependencyCreate, allTaskPositions, onDragMove, }: TaskBarProps): react_jsx_runtime.JSX.Element;
|
|
1866
1867
|
|
|
1867
1868
|
interface DependencyLineProps {
|
|
1868
1869
|
x1: number;
|
|
@@ -2212,6 +2213,30 @@ declare const ganttUtils: {
|
|
|
2212
2213
|
* @returns Updated tasks with rescheduled dependencies
|
|
2213
2214
|
*/
|
|
2214
2215
|
autoScheduleDependents: (tasks: Task[], changedTaskId: string) => Task[];
|
|
2216
|
+
/**
|
|
2217
|
+
* v0.13.0: Calculate cascade preview positions for dependent tasks during drag
|
|
2218
|
+
* Returns preview positions showing where dependent tasks will move
|
|
2219
|
+
* @param tasks - All tasks (flattened)
|
|
2220
|
+
* @param draggedTaskId - Task being dragged
|
|
2221
|
+
* @param daysDelta - How many days the dragged task is being moved
|
|
2222
|
+
* @param flatTasks - Flattened task list with row indices
|
|
2223
|
+
* @param timelineStartDate - Start date of the timeline
|
|
2224
|
+
* @param dayWidth - Width of one day in pixels
|
|
2225
|
+
* @param rowHeight - Height of each row
|
|
2226
|
+
* @param headerHeight - Height of the header
|
|
2227
|
+
* @returns Array of DependentTaskPreview objects
|
|
2228
|
+
*/
|
|
2229
|
+
calculateCascadePreview: (tasks: Task[], draggedTaskId: string, daysDelta: number, flatTasks: Task[], timelineStartDate: Date, dayWidth: number, rowHeight: number, headerHeight: number) => Array<{
|
|
2230
|
+
taskId: string;
|
|
2231
|
+
taskName: string;
|
|
2232
|
+
originalX: number;
|
|
2233
|
+
previewX: number;
|
|
2234
|
+
width: number;
|
|
2235
|
+
y: number;
|
|
2236
|
+
rowIndex: number;
|
|
2237
|
+
daysDelta: number;
|
|
2238
|
+
color?: string;
|
|
2239
|
+
}>;
|
|
2215
2240
|
/**
|
|
2216
2241
|
* 🚀 KILLER FEATURE #3: Split a task (create GAP in the middle, like Bryntum/DHTMLX)
|
|
2217
2242
|
* Same task, but work is paused for some days then continues
|