gantt-lib 0.146.0 → 0.146.2
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.md +4 -0
- package/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/core/scheduling/index.js +199 -19
- package/dist/core/scheduling/index.js.map +1 -1
- package/dist/core/scheduling/index.mjs +199 -19
- package/dist/core/scheduling/index.mjs.map +1 -1
- package/dist/{index-Cue-aV4x.d.mts → index-r9kDy05N.d.mts} +6 -3
- package/dist/{index-Cue-aV4x.d.ts → index-r9kDy05N.d.ts} +6 -3
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +242 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +242 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -245,6 +245,9 @@ interface Task {
|
|
|
245
245
|
startDate: string | Date;
|
|
246
246
|
/** Task end date (ISO string or Date object) */
|
|
247
247
|
endDate: string | Date;
|
|
248
|
+
/** Optional fixed date-only boundaries; null or absence leaves the boundary automatic. */
|
|
249
|
+
fixedStartDate?: string | null;
|
|
250
|
+
fixedEndDate?: string | null;
|
|
248
251
|
/** Optional baseline start date for planned schedule visualization */
|
|
249
252
|
baselineStartDate?: string | Date;
|
|
250
253
|
/** Optional baseline end date for planned schedule visualization */
|
|
@@ -599,7 +602,7 @@ declare function getTransitiveCascadeChain(changedTaskId: string, allTasks: Task
|
|
|
599
602
|
* Universal cascade engine that propagates a moved task's new position through
|
|
600
603
|
* the entire dependency+hierarchy graph using BFS with change detection.
|
|
601
604
|
*/
|
|
602
|
-
declare function universalCascade(movedTask: Task, newStart: Date, newEnd: Date, allTasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean, context?: CascadeContext): Task[];
|
|
605
|
+
declare function universalCascade(movedTask: Task, newStart: Date, newEnd: Date, allTasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean, context?: CascadeContext, rootIsRollup?: boolean): Task[];
|
|
603
606
|
|
|
604
607
|
/**
|
|
605
608
|
* Recalculate all task dates when switching between business/calendar day modes.
|
|
@@ -728,7 +731,7 @@ declare function isTaskParent(taskId: string, tasks: Task[]): boolean;
|
|
|
728
731
|
* - startDate = min(children.startDate) or own startDate if no children
|
|
729
732
|
* - endDate = max(children.endDate) or own endDate if no children
|
|
730
733
|
*/
|
|
731
|
-
declare function computeParentDates(parentId: string, tasks: Task[]): {
|
|
734
|
+
declare function computeParentDates(parentId: string, tasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean): {
|
|
732
735
|
startDate: Date;
|
|
733
736
|
endDate: Date;
|
|
734
737
|
};
|
|
@@ -838,7 +841,7 @@ type ScaleTaskSubtreeWarning = {
|
|
|
838
841
|
requestedDuration: number;
|
|
839
842
|
minimumDuration: number;
|
|
840
843
|
};
|
|
841
|
-
type ScaleTaskSubtreeErrorCode = 'INVALID_TARGET_DURATION' | 'TASK_NOT_FOUND' | 'NOT_A_PARENT' | 'INVALID_HIERARCHY' | 'INVALID_DEPENDENCIES' | 'INVALID_DATES' | 'INVALID_MINIMUM' | 'EXTERNAL_DEPENDENCY_CONFLICT';
|
|
844
|
+
type ScaleTaskSubtreeErrorCode = 'INVALID_TARGET_DURATION' | 'TASK_NOT_FOUND' | 'NOT_A_PARENT' | 'INVALID_HIERARCHY' | 'INVALID_DEPENDENCIES' | 'INVALID_DATES' | 'INVALID_MINIMUM' | 'FIXED_DATE_CONFLICT' | 'EXTERNAL_DEPENDENCY_CONFLICT';
|
|
842
845
|
type ScaleTaskSubtreeResult = {
|
|
843
846
|
ok: true;
|
|
844
847
|
changedTasks: Task[];
|
|
@@ -245,6 +245,9 @@ interface Task {
|
|
|
245
245
|
startDate: string | Date;
|
|
246
246
|
/** Task end date (ISO string or Date object) */
|
|
247
247
|
endDate: string | Date;
|
|
248
|
+
/** Optional fixed date-only boundaries; null or absence leaves the boundary automatic. */
|
|
249
|
+
fixedStartDate?: string | null;
|
|
250
|
+
fixedEndDate?: string | null;
|
|
248
251
|
/** Optional baseline start date for planned schedule visualization */
|
|
249
252
|
baselineStartDate?: string | Date;
|
|
250
253
|
/** Optional baseline end date for planned schedule visualization */
|
|
@@ -599,7 +602,7 @@ declare function getTransitiveCascadeChain(changedTaskId: string, allTasks: Task
|
|
|
599
602
|
* Universal cascade engine that propagates a moved task's new position through
|
|
600
603
|
* the entire dependency+hierarchy graph using BFS with change detection.
|
|
601
604
|
*/
|
|
602
|
-
declare function universalCascade(movedTask: Task, newStart: Date, newEnd: Date, allTasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean, context?: CascadeContext): Task[];
|
|
605
|
+
declare function universalCascade(movedTask: Task, newStart: Date, newEnd: Date, allTasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean, context?: CascadeContext, rootIsRollup?: boolean): Task[];
|
|
603
606
|
|
|
604
607
|
/**
|
|
605
608
|
* Recalculate all task dates when switching between business/calendar day modes.
|
|
@@ -728,7 +731,7 @@ declare function isTaskParent(taskId: string, tasks: Task[]): boolean;
|
|
|
728
731
|
* - startDate = min(children.startDate) or own startDate if no children
|
|
729
732
|
* - endDate = max(children.endDate) or own endDate if no children
|
|
730
733
|
*/
|
|
731
|
-
declare function computeParentDates(parentId: string, tasks: Task[]): {
|
|
734
|
+
declare function computeParentDates(parentId: string, tasks: Task[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean): {
|
|
732
735
|
startDate: Date;
|
|
733
736
|
endDate: Date;
|
|
734
737
|
};
|
|
@@ -838,7 +841,7 @@ type ScaleTaskSubtreeWarning = {
|
|
|
838
841
|
requestedDuration: number;
|
|
839
842
|
minimumDuration: number;
|
|
840
843
|
};
|
|
841
|
-
type ScaleTaskSubtreeErrorCode = 'INVALID_TARGET_DURATION' | 'TASK_NOT_FOUND' | 'NOT_A_PARENT' | 'INVALID_HIERARCHY' | 'INVALID_DEPENDENCIES' | 'INVALID_DATES' | 'INVALID_MINIMUM' | 'EXTERNAL_DEPENDENCY_CONFLICT';
|
|
844
|
+
type ScaleTaskSubtreeErrorCode = 'INVALID_TARGET_DURATION' | 'TASK_NOT_FOUND' | 'NOT_A_PARENT' | 'INVALID_HIERARCHY' | 'INVALID_DEPENDENCIES' | 'INVALID_DATES' | 'INVALID_MINIMUM' | 'FIXED_DATE_CONFLICT' | 'EXTERNAL_DEPENDENCY_CONFLICT';
|
|
842
845
|
type ScaleTaskSubtreeResult = {
|
|
843
846
|
ok: true;
|
|
844
847
|
changedTasks: Task[];
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TaskActivityDependency, A as ActivityDependencyHighlight, c as ActivityTooltipContext, d as TimelineMarker, e as TaskDateChangeMode, S as ScaleTaskSubtreeResult, f as ResourcePlannerChartProps, g as TaskActivity$1, h as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, j as GanttChartMode, k as GridConfig, l as GridLine, L as LinkType, M as MonthSpan, m as ResourceTableColumnId, n as ResourceTableColumnWidthMap, o as ResourceTimelineMove, p as ResourceTimelineResourceMenuCommand, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, u as ScaleTaskSubtreeWarning, v as TaskActivityTooltipField, w as TaskBarGeometry, W as WeekendBlock, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, $ as getChildren, a0 as getDependencyLag, a1 as getSuccessorChain, a2 as getTaskDuration, a3 as getTransitiveCascadeChain, a4 as isAncestorTask, a5 as isTaskParent, a6 as moveTaskRange, a7 as moveTaskWithCascade, a8 as normalizeDependencyLag, a9 as normalizePredecessorDates, aa as normalizeTaskDependencyLags, ab as normalizeUTCDate, ac as parseDateOnly, ad as recalculateIncomingLags, ae as recalculateProjectSchedule, af as recalculateTaskFromDependencies, ag as reflowTasksOnModeSwitch, ah as removeDependenciesBetweenTasks, ai as resizeTaskWithCascade, aj as scaleTaskSubtreeDuration, ak as shiftBusinessDayOffset, al as universalCascade, am as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TaskActivityDependency, A as ActivityDependencyHighlight, c as ActivityTooltipContext, d as TimelineMarker, e as TaskDateChangeMode, S as ScaleTaskSubtreeResult, f as ResourcePlannerChartProps, g as TaskActivity$1, h as ResourceTimelineResource } from './index-r9kDy05N.mjs';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, j as GanttChartMode, k as GridConfig, l as GridLine, L as LinkType, M as MonthSpan, m as ResourceTableColumnId, n as ResourceTableColumnWidthMap, o as ResourceTimelineMove, p as ResourceTimelineResourceMenuCommand, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, u as ScaleTaskSubtreeWarning, v as TaskActivityTooltipField, w as TaskBarGeometry, W as WeekendBlock, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, $ as getChildren, a0 as getDependencyLag, a1 as getSuccessorChain, a2 as getTaskDuration, a3 as getTransitiveCascadeChain, a4 as isAncestorTask, a5 as isTaskParent, a6 as moveTaskRange, a7 as moveTaskWithCascade, a8 as normalizeDependencyLag, a9 as normalizePredecessorDates, aa as normalizeTaskDependencyLags, ab as normalizeUTCDate, ac as parseDateOnly, ad as recalculateIncomingLags, ae as recalculateProjectSchedule, af as recalculateTaskFromDependencies, ag as reflowTasksOnModeSwitch, ah as removeDependenciesBetweenTasks, ai as resizeTaskWithCascade, aj as scaleTaskSubtreeDuration, ak as shiftBusinessDayOffset, al as universalCascade, am as validateDependencies } from './index-r9kDy05N.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -445,6 +445,9 @@ interface Task {
|
|
|
445
445
|
startDate: string | Date;
|
|
446
446
|
/** Task end date (ISO string or Date object) */
|
|
447
447
|
endDate: string | Date;
|
|
448
|
+
/** Optional fixed date-only boundaries; null or absence leaves the boundary automatic. */
|
|
449
|
+
fixedStartDate?: string | null;
|
|
450
|
+
fixedEndDate?: string | null;
|
|
448
451
|
/** Optional baseline start date for planned schedule visualization */
|
|
449
452
|
baselineStartDate?: string | Date;
|
|
450
453
|
/** Optional baseline end date for planned schedule visualization */
|
|
@@ -1876,7 +1879,7 @@ declare function flattenHierarchy<T extends HierarchyTask>(tasks: T[]): T[];
|
|
|
1876
1879
|
* taking precedence over any hardcoded parent values from the input.
|
|
1877
1880
|
* Also normalizes task dates to ensure startDate is always before or equal to endDate.
|
|
1878
1881
|
*/
|
|
1879
|
-
declare function normalizeHierarchyTasks<T extends HierarchyTask>(tasks: T[]): T[];
|
|
1882
|
+
declare function normalizeHierarchyTasks<T extends HierarchyTask>(tasks: T[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean): T[];
|
|
1880
1883
|
|
|
1881
1884
|
interface ResourceTimelineLayoutOptions {
|
|
1882
1885
|
monthStart: Date;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TaskActivityDependency, A as ActivityDependencyHighlight, c as ActivityTooltipContext, d as TimelineMarker, e as TaskDateChangeMode, S as ScaleTaskSubtreeResult, f as ResourcePlannerChartProps, g as TaskActivity$1, h as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, j as GanttChartMode, k as GridConfig, l as GridLine, L as LinkType, M as MonthSpan, m as ResourceTableColumnId, n as ResourceTableColumnWidthMap, o as ResourceTimelineMove, p as ResourceTimelineResourceMenuCommand, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, u as ScaleTaskSubtreeWarning, v as TaskActivityTooltipField, w as TaskBarGeometry, W as WeekendBlock, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, $ as getChildren, a0 as getDependencyLag, a1 as getSuccessorChain, a2 as getTaskDuration, a3 as getTransitiveCascadeChain, a4 as isAncestorTask, a5 as isTaskParent, a6 as moveTaskRange, a7 as moveTaskWithCascade, a8 as normalizeDependencyLag, a9 as normalizePredecessorDates, aa as normalizeTaskDependencyLags, ab as normalizeUTCDate, ac as parseDateOnly, ad as recalculateIncomingLags, ae as recalculateProjectSchedule, af as recalculateTaskFromDependencies, ag as reflowTasksOnModeSwitch, ah as removeDependenciesBetweenTasks, ai as resizeTaskWithCascade, aj as scaleTaskSubtreeDuration, ak as shiftBusinessDayOffset, al as universalCascade, am as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TaskActivityDependency, A as ActivityDependencyHighlight, c as ActivityTooltipContext, d as TimelineMarker, e as TaskDateChangeMode, S as ScaleTaskSubtreeResult, f as ResourcePlannerChartProps, g as TaskActivity$1, h as ResourceTimelineResource } from './index-r9kDy05N.js';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, j as GanttChartMode, k as GridConfig, l as GridLine, L as LinkType, M as MonthSpan, m as ResourceTableColumnId, n as ResourceTableColumnWidthMap, o as ResourceTimelineMove, p as ResourceTimelineResourceMenuCommand, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, u as ScaleTaskSubtreeWarning, v as TaskActivityTooltipField, w as TaskBarGeometry, W as WeekendBlock, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, $ as getChildren, a0 as getDependencyLag, a1 as getSuccessorChain, a2 as getTaskDuration, a3 as getTransitiveCascadeChain, a4 as isAncestorTask, a5 as isTaskParent, a6 as moveTaskRange, a7 as moveTaskWithCascade, a8 as normalizeDependencyLag, a9 as normalizePredecessorDates, aa as normalizeTaskDependencyLags, ab as normalizeUTCDate, ac as parseDateOnly, ad as recalculateIncomingLags, ae as recalculateProjectSchedule, af as recalculateTaskFromDependencies, ag as reflowTasksOnModeSwitch, ah as removeDependenciesBetweenTasks, ai as resizeTaskWithCascade, aj as scaleTaskSubtreeDuration, ak as shiftBusinessDayOffset, al as universalCascade, am as validateDependencies } from './index-r9kDy05N.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -445,6 +445,9 @@ interface Task {
|
|
|
445
445
|
startDate: string | Date;
|
|
446
446
|
/** Task end date (ISO string or Date object) */
|
|
447
447
|
endDate: string | Date;
|
|
448
|
+
/** Optional fixed date-only boundaries; null or absence leaves the boundary automatic. */
|
|
449
|
+
fixedStartDate?: string | null;
|
|
450
|
+
fixedEndDate?: string | null;
|
|
448
451
|
/** Optional baseline start date for planned schedule visualization */
|
|
449
452
|
baselineStartDate?: string | Date;
|
|
450
453
|
/** Optional baseline end date for planned schedule visualization */
|
|
@@ -1876,7 +1879,7 @@ declare function flattenHierarchy<T extends HierarchyTask>(tasks: T[]): T[];
|
|
|
1876
1879
|
* taking precedence over any hardcoded parent values from the input.
|
|
1877
1880
|
* Also normalizes task dates to ensure startDate is always before or equal to endDate.
|
|
1878
1881
|
*/
|
|
1879
|
-
declare function normalizeHierarchyTasks<T extends HierarchyTask>(tasks: T[]): T[];
|
|
1882
|
+
declare function normalizeHierarchyTasks<T extends HierarchyTask>(tasks: T[], businessDays?: boolean, weekendPredicate?: (date: Date) => boolean): T[];
|
|
1880
1883
|
|
|
1881
1884
|
interface ResourceTimelineLayoutOptions {
|
|
1882
1885
|
monthStart: Date;
|