gantt-lib 0.84.0 → 0.85.1

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.
@@ -93,7 +93,7 @@ interface TaskDependency {
93
93
  taskId: string;
94
94
  /** Type of link: FS (finish-to-start), SS, FF, SF */
95
95
  type: LinkType;
96
- /** Lag in days (positive or negative integer) */
96
+ /** Lag in days. FS lag is clamped to zero. */
97
97
  lag: number;
98
98
  }
99
99
  /**
@@ -350,7 +350,11 @@ declare function normalizePredecessorDates(predecessor: Pick<Task, 'startDate' |
350
350
  */
351
351
  declare function getDependencyLag(dep: Pick<TaskDependency, 'lag'>): number;
352
352
  /**
353
- * Normalize lag for FS links clamp to >= -predecessorDuration.
353
+ * Return a copy of a task with impossible dependency lag values reset.
354
+ */
355
+ declare function normalizeTaskDependencyLags<TTask extends Pick<Task, 'dependencies'>>(task: TTask): TTask;
356
+ /**
357
+ * Normalize lag for links whose domain rules restrict negative offsets.
354
358
  */
355
359
  declare function normalizeDependencyLag(linkType: LinkType, lag: number, predecessorStart: Date, predecessorEnd: Date, businessDays?: boolean, weekendPredicate?: (date: Date) => boolean): number;
356
360
  /**
@@ -566,4 +570,4 @@ declare function isAncestorTask(ancestorId: string, taskId: string, tasks: Task[
566
570
  */
567
571
  declare function areTasksHierarchicallyRelated(taskId1: string, taskId2: string, tasks: Task[]): boolean;
568
572
 
569
- export { universalCascade as $, getDependencyLag as A, getSuccessorChain as B, getTaskDuration as C, DAY_MS as D, getTransitiveCascadeChain as E, isAncestorTask as F, type GanttChartMode as G, isTaskParent as H, moveTaskRange as I, moveTaskWithCascade as J, normalizeDependencyLag as K, type LinkType as L, type MonthSpan as M, normalizePredecessorDates as N, normalizeUTCDate as O, parseDateOnly as P, recalculateIncomingLags as Q, type ResourceTimelineItem as R, recalculateProjectSchedule as S, type Task as T, recalculateTaskFromDependencies as U, type ValidationResult as V, type WeekendBlock as W, reflowTasksOnModeSwitch as X, removeDependenciesBetweenTasks as Y, resizeTaskWithCascade as Z, shiftBusinessDayOffset as _, type ResourcePlannerChartProps as a, validateDependencies as a0, type ScheduleCommandOptions as a1, type ScheduleCommandResult as a2, type ScheduleDependency as a3, type ScheduleTask as a4, type ScheduleTaskUpdate as a5, type TaskDependency as a6, addBusinessDays as a7, getBusinessDaysCount as a8, subtractBusinessDays as a9, type ResourceTimelineResource as b, type DependencyError as c, type GanttDateRange as d, type GridConfig as e, type GridLine as f, type ResourceTimelineMove as g, type ResourceTimelineResourceMenuCommand as h, type TaskBarGeometry as i, alignToWorkingDay as j, areTasksHierarchicallyRelated as k, buildAdjacencyList as l, buildTaskRangeFromEnd as m, buildTaskRangeFromStart as n, calculateSuccessorDate as o, cascadeByLinks as p, clampTaskRangeForIncomingFS as q, computeLagFromDates as r, computeParentDates as s, computeParentProgress as t, detectCycles as u, findParentId as v, getAllDependencyEdges as w, getAllDescendants as x, getBusinessDayOffset as y, getChildren as z };
573
+ export { shiftBusinessDayOffset as $, getDependencyLag as A, getSuccessorChain as B, getTaskDuration as C, DAY_MS as D, getTransitiveCascadeChain as E, isAncestorTask as F, type GanttChartMode as G, isTaskParent as H, moveTaskRange as I, moveTaskWithCascade as J, normalizeDependencyLag as K, type LinkType as L, type MonthSpan as M, normalizePredecessorDates as N, normalizeTaskDependencyLags as O, normalizeUTCDate as P, parseDateOnly as Q, type ResourceTimelineItem as R, recalculateIncomingLags as S, type Task as T, recalculateProjectSchedule as U, type ValidationResult as V, type WeekendBlock as W, recalculateTaskFromDependencies as X, reflowTasksOnModeSwitch as Y, removeDependenciesBetweenTasks as Z, resizeTaskWithCascade as _, type ResourcePlannerChartProps as a, universalCascade as a0, validateDependencies as a1, type ScheduleCommandOptions as a2, type ScheduleCommandResult as a3, type ScheduleDependency as a4, type ScheduleTask as a5, type ScheduleTaskUpdate as a6, type TaskDependency as a7, addBusinessDays as a8, getBusinessDaysCount as a9, subtractBusinessDays as aa, type ResourceTimelineResource as b, type DependencyError as c, type GanttDateRange as d, type GridConfig as e, type GridLine as f, type ResourceTimelineMove as g, type ResourceTimelineResourceMenuCommand as h, type TaskBarGeometry as i, alignToWorkingDay as j, areTasksHierarchicallyRelated as k, buildAdjacencyList as l, buildTaskRangeFromEnd as m, buildTaskRangeFromStart as n, calculateSuccessorDate as o, cascadeByLinks as p, clampTaskRangeForIncomingFS as q, computeLagFromDates as r, computeParentDates as s, computeParentProgress as t, detectCycles as u, findParentId as v, getAllDependencyEdges as w, getAllDescendants as x, getBusinessDayOffset as y, getChildren as z };