gantt-lib 0.89.0 → 0.91.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import React$1, { ReactNode } from 'react';
2
- import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as ResourcePlannerChartProps, b as ResourceTimelineResource } from './index-CQI1GCao.mjs';
3
- export { D as DAY_MS, c as DependencyError, G as GanttChartMode, d as GanttDateRange, e as GridConfig, f as GridLine, L as LinkType, M as MonthSpan, g as ResourceTimelineMove, h as ResourceTimelineResourceMenuCommand, i as TaskBarGeometry, W as WeekendBlock, j as alignToWorkingDay, k as areTasksHierarchicallyRelated, l as buildAdjacencyList, m as buildTaskRangeFromEnd, n as buildTaskRangeFromStart, o as calculateSuccessorDate, p as cascadeByLinks, q as clampTaskRangeForIncomingFS, r as computeLagFromDates, s as computeParentDates, t as computeParentProgress, u as detectCycles, v as findParentId, w as getAllDependencyEdges, x as getAllDescendants, y as getBusinessDayOffset, z as getChildren, A as getDependencyLag, B as getSuccessorChain, C as getTaskDuration, E as getTransitiveCascadeChain, F as isAncestorTask, H as isTaskParent, I as moveTaskRange, J as moveTaskWithCascade, K as normalizeDependencyLag, N as normalizePredecessorDates, O as normalizeTaskDependencyLags, P as normalizeUTCDate, Q as parseDateOnly, S as recalculateIncomingLags, U as recalculateProjectSchedule, X as recalculateTaskFromDependencies, Y as reflowTasksOnModeSwitch, Z as removeDependenciesBetweenTasks, _ as resizeTaskWithCascade, $ as shiftBusinessDayOffset, a0 as universalCascade, a1 as validateDependencies } from './index-CQI1GCao.mjs';
2
+ import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TaskDateChangeMode, b as ResourcePlannerChartProps, c as ResourceTimelineResource } from './index-CKJZfeDv.mjs';
3
+ export { D as DAY_MS, d as DependencyError, G as GanttChartMode, e as GanttDateRange, f as GridConfig, g as GridLine, L as LinkType, M as MonthSpan, h as ResourceTimelineMove, i as ResourceTimelineResourceMenuCommand, j as TaskBarGeometry, W as WeekendBlock, k as alignToWorkingDay, l as areTasksHierarchicallyRelated, m as buildAdjacencyList, n as buildTaskRangeFromEnd, o as buildTaskRangeFromStart, p as calculateSuccessorDate, q as cascadeByLinks, r as clampTaskRangeForIncomingFS, s as computeLagFromDates, t as computeParentDates, u as computeParentProgress, v as detectCycles, w as findParentId, x as getAllDependencyEdges, y as getAllDescendants, z as getBusinessDayOffset, A as getChildren, B as getDependencyLag, C as getSuccessorChain, E as getTaskDuration, F as getTransitiveCascadeChain, H as isAncestorTask, I as isTaskParent, J as moveTaskRange, K as moveTaskWithCascade, N as normalizeDependencyLag, O as normalizePredecessorDates, P as normalizeTaskDependencyLags, Q as normalizeUTCDate, S as parseDateOnly, U as recalculateIncomingLags, X as recalculateProjectSchedule, Y as recalculateTaskFromDependencies, Z as reflowTasksOnModeSwitch, _ as removeDependenciesBetweenTasks, $ as resizeTaskWithCascade, a0 as shiftBusinessDayOffset, a1 as universalCascade, a2 as validateDependencies } from './index-CKJZfeDv.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as RadixPopover from '@radix-ui/react-popover';
6
6
 
@@ -467,7 +467,7 @@ interface GanttModeProps<TTask extends Task = Task> {
467
467
  onPromoteTask?: (taskId: string) => void;
468
468
  /** Callback when a task is demoted (parentId set). If not provided, default internal logic is used. */
469
469
  onDemoteTask?: (taskId: string, newParentId: string) => void;
470
- /** Callback when a parent task is ungrouped (removed while direct children move one level up). */
470
+ /** Callback when a parent task is ungrouped while direct children move one level up and the parent remains. */
471
471
  onUngroupTask?: (taskId: string) => void;
472
472
  /** Enable add task button at bottom of task list (default: true) */
473
473
  enableAddTask?: boolean;
@@ -511,6 +511,10 @@ interface GanttModeProps<TTask extends Task = Task> {
511
511
  hiddenTaskListColumns?: readonly TaskListColumnId[];
512
512
  /** Additional commands rendered in the TaskList row three-dots menu */
513
513
  taskListMenuCommands?: TaskListMenuCommand<TTask>[];
514
+ /** How task-list date pickers apply start/end edits (default: preserve-duration) */
515
+ taskDateChangeMode?: TaskDateChangeMode;
516
+ /** Controlled callback for task-list date picker mode changes */
517
+ onTaskDateChangeModeChange?: (mode: TaskDateChangeMode) => void;
514
518
  }
515
519
  type GanttChartProps<TTask extends Task = Task, TItem extends ResourceTimelineItem = ResourceTimelineItem> = GanttModeProps<TTask> | ResourcePlannerChartProps<TItem>;
516
520
  interface ExportToPdfOptions {
@@ -772,7 +776,7 @@ interface TaskListProps {
772
776
  onPromoteTask?: (taskId: string) => void;
773
777
  /** Callback when task is demoted (parentId set to previous task) */
774
778
  onDemoteTask?: (taskId: string, newParentId: string) => void;
775
- /** Callback when parent task is ungrouped (removed while direct children move one level up) */
779
+ /** Callback when a parent task is ungrouped while direct children move one level up and the parent remains */
776
780
  onUngroupTask?: (taskId: string) => void;
777
781
  /** Custom day configurations for date picker */
778
782
  customDays?: CustomDayConfig[];
@@ -800,6 +804,10 @@ interface TaskListProps {
800
804
  hiddenTaskListColumns?: readonly TaskListColumnId[];
801
805
  /** Additional commands rendered in each row three-dots menu */
802
806
  taskListMenuCommands?: TaskListMenuCommand<Task>[];
807
+ /** How task-list date pickers apply start/end edits */
808
+ taskDateChangeMode?: TaskDateChangeMode;
809
+ /** Controlled callback for task-list date picker mode changes */
810
+ onTaskDateChangeModeChange?: (mode: TaskDateChangeMode) => void;
803
811
  }
804
812
  /**
805
813
  * TaskList component - displays tasks in a table format as an overlay
@@ -898,6 +906,8 @@ interface DatePickerProps {
898
906
  isWeekend?: (date: Date) => boolean;
899
907
  /** Whether to use business days for +1/+7 buttons (default: true) */
900
908
  businessDays?: boolean;
909
+ /** Optional footer content rendered below the calendar popup */
910
+ footer?: React$1.ReactNode;
901
911
  }
902
912
  /**
903
913
  * DatePicker component — shows formatted date as a button, opens calendar popup on click.
@@ -1295,4 +1305,4 @@ interface VisibleReorderPosition {
1295
1305
  */
1296
1306
  declare function getVisibleReorderPosition(orderedTasks: TaskLike[], visibleTasks: TaskLike[], movedTaskId: string, originVisibleIndex: number, dropVisibleIndex: number): VisibleReorderPosition | null;
1297
1307
 
1298
- export { type BuiltInTaskListColumnId, Button, type ButtonProps, Calendar, type CalendarProps, type CustomDayConfig, type CustomDayPredicateConfig, DatePicker, type DatePickerProps, DragGuideLines, type ExportToPdfHeaderOptions, type ExportToPdfOptions, GanttChart, type GanttChartHandle, type GanttChartProps, type GanttModeProps, GridBackground, Input, type InputProps, type MonthBlock, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, type Task, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, parseUTCDate, pixelsToDate, progressInRange, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, subtractBusinessDays, useTaskDrag, withoutDeps };
1308
+ export { type BuiltInTaskListColumnId, Button, type ButtonProps, Calendar, type CalendarProps, type CustomDayConfig, type CustomDayPredicateConfig, DatePicker, type DatePickerProps, DragGuideLines, type ExportToPdfHeaderOptions, type ExportToPdfOptions, GanttChart, type GanttChartHandle, type GanttChartProps, type GanttModeProps, GridBackground, Input, type InputProps, type MonthBlock, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, type Task, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, parseUTCDate, pixelsToDate, progressInRange, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, subtractBusinessDays, useTaskDrag, withoutDeps };
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, V as ValidationResult, a as ResourcePlannerChartProps, b as ResourceTimelineResource } from './index-CQI1GCao.js';
3
- export { D as DAY_MS, c as DependencyError, G as GanttChartMode, d as GanttDateRange, e as GridConfig, f as GridLine, L as LinkType, M as MonthSpan, g as ResourceTimelineMove, h as ResourceTimelineResourceMenuCommand, i as TaskBarGeometry, W as WeekendBlock, j as alignToWorkingDay, k as areTasksHierarchicallyRelated, l as buildAdjacencyList, m as buildTaskRangeFromEnd, n as buildTaskRangeFromStart, o as calculateSuccessorDate, p as cascadeByLinks, q as clampTaskRangeForIncomingFS, r as computeLagFromDates, s as computeParentDates, t as computeParentProgress, u as detectCycles, v as findParentId, w as getAllDependencyEdges, x as getAllDescendants, y as getBusinessDayOffset, z as getChildren, A as getDependencyLag, B as getSuccessorChain, C as getTaskDuration, E as getTransitiveCascadeChain, F as isAncestorTask, H as isTaskParent, I as moveTaskRange, J as moveTaskWithCascade, K as normalizeDependencyLag, N as normalizePredecessorDates, O as normalizeTaskDependencyLags, P as normalizeUTCDate, Q as parseDateOnly, S as recalculateIncomingLags, U as recalculateProjectSchedule, X as recalculateTaskFromDependencies, Y as reflowTasksOnModeSwitch, Z as removeDependenciesBetweenTasks, _ as resizeTaskWithCascade, $ as shiftBusinessDayOffset, a0 as universalCascade, a1 as validateDependencies } from './index-CQI1GCao.js';
2
+ import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TaskDateChangeMode, b as ResourcePlannerChartProps, c as ResourceTimelineResource } from './index-CKJZfeDv.js';
3
+ export { D as DAY_MS, d as DependencyError, G as GanttChartMode, e as GanttDateRange, f as GridConfig, g as GridLine, L as LinkType, M as MonthSpan, h as ResourceTimelineMove, i as ResourceTimelineResourceMenuCommand, j as TaskBarGeometry, W as WeekendBlock, k as alignToWorkingDay, l as areTasksHierarchicallyRelated, m as buildAdjacencyList, n as buildTaskRangeFromEnd, o as buildTaskRangeFromStart, p as calculateSuccessorDate, q as cascadeByLinks, r as clampTaskRangeForIncomingFS, s as computeLagFromDates, t as computeParentDates, u as computeParentProgress, v as detectCycles, w as findParentId, x as getAllDependencyEdges, y as getAllDescendants, z as getBusinessDayOffset, A as getChildren, B as getDependencyLag, C as getSuccessorChain, E as getTaskDuration, F as getTransitiveCascadeChain, H as isAncestorTask, I as isTaskParent, J as moveTaskRange, K as moveTaskWithCascade, N as normalizeDependencyLag, O as normalizePredecessorDates, P as normalizeTaskDependencyLags, Q as normalizeUTCDate, S as parseDateOnly, U as recalculateIncomingLags, X as recalculateProjectSchedule, Y as recalculateTaskFromDependencies, Z as reflowTasksOnModeSwitch, _ as removeDependenciesBetweenTasks, $ as resizeTaskWithCascade, a0 as shiftBusinessDayOffset, a1 as universalCascade, a2 as validateDependencies } from './index-CKJZfeDv.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as RadixPopover from '@radix-ui/react-popover';
6
6
 
@@ -467,7 +467,7 @@ interface GanttModeProps<TTask extends Task = Task> {
467
467
  onPromoteTask?: (taskId: string) => void;
468
468
  /** Callback when a task is demoted (parentId set). If not provided, default internal logic is used. */
469
469
  onDemoteTask?: (taskId: string, newParentId: string) => void;
470
- /** Callback when a parent task is ungrouped (removed while direct children move one level up). */
470
+ /** Callback when a parent task is ungrouped while direct children move one level up and the parent remains. */
471
471
  onUngroupTask?: (taskId: string) => void;
472
472
  /** Enable add task button at bottom of task list (default: true) */
473
473
  enableAddTask?: boolean;
@@ -511,6 +511,10 @@ interface GanttModeProps<TTask extends Task = Task> {
511
511
  hiddenTaskListColumns?: readonly TaskListColumnId[];
512
512
  /** Additional commands rendered in the TaskList row three-dots menu */
513
513
  taskListMenuCommands?: TaskListMenuCommand<TTask>[];
514
+ /** How task-list date pickers apply start/end edits (default: preserve-duration) */
515
+ taskDateChangeMode?: TaskDateChangeMode;
516
+ /** Controlled callback for task-list date picker mode changes */
517
+ onTaskDateChangeModeChange?: (mode: TaskDateChangeMode) => void;
514
518
  }
515
519
  type GanttChartProps<TTask extends Task = Task, TItem extends ResourceTimelineItem = ResourceTimelineItem> = GanttModeProps<TTask> | ResourcePlannerChartProps<TItem>;
516
520
  interface ExportToPdfOptions {
@@ -772,7 +776,7 @@ interface TaskListProps {
772
776
  onPromoteTask?: (taskId: string) => void;
773
777
  /** Callback when task is demoted (parentId set to previous task) */
774
778
  onDemoteTask?: (taskId: string, newParentId: string) => void;
775
- /** Callback when parent task is ungrouped (removed while direct children move one level up) */
779
+ /** Callback when a parent task is ungrouped while direct children move one level up and the parent remains */
776
780
  onUngroupTask?: (taskId: string) => void;
777
781
  /** Custom day configurations for date picker */
778
782
  customDays?: CustomDayConfig[];
@@ -800,6 +804,10 @@ interface TaskListProps {
800
804
  hiddenTaskListColumns?: readonly TaskListColumnId[];
801
805
  /** Additional commands rendered in each row three-dots menu */
802
806
  taskListMenuCommands?: TaskListMenuCommand<Task>[];
807
+ /** How task-list date pickers apply start/end edits */
808
+ taskDateChangeMode?: TaskDateChangeMode;
809
+ /** Controlled callback for task-list date picker mode changes */
810
+ onTaskDateChangeModeChange?: (mode: TaskDateChangeMode) => void;
803
811
  }
804
812
  /**
805
813
  * TaskList component - displays tasks in a table format as an overlay
@@ -898,6 +906,8 @@ interface DatePickerProps {
898
906
  isWeekend?: (date: Date) => boolean;
899
907
  /** Whether to use business days for +1/+7 buttons (default: true) */
900
908
  businessDays?: boolean;
909
+ /** Optional footer content rendered below the calendar popup */
910
+ footer?: React$1.ReactNode;
901
911
  }
902
912
  /**
903
913
  * DatePicker component — shows formatted date as a button, opens calendar popup on click.
@@ -1295,4 +1305,4 @@ interface VisibleReorderPosition {
1295
1305
  */
1296
1306
  declare function getVisibleReorderPosition(orderedTasks: TaskLike[], visibleTasks: TaskLike[], movedTaskId: string, originVisibleIndex: number, dropVisibleIndex: number): VisibleReorderPosition | null;
1297
1307
 
1298
- export { type BuiltInTaskListColumnId, Button, type ButtonProps, Calendar, type CalendarProps, type CustomDayConfig, type CustomDayPredicateConfig, DatePicker, type DatePickerProps, DragGuideLines, type ExportToPdfHeaderOptions, type ExportToPdfOptions, GanttChart, type GanttChartHandle, type GanttChartProps, type GanttModeProps, GridBackground, Input, type InputProps, type MonthBlock, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, type Task, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, parseUTCDate, pixelsToDate, progressInRange, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, subtractBusinessDays, useTaskDrag, withoutDeps };
1308
+ export { type BuiltInTaskListColumnId, Button, type ButtonProps, Calendar, type CalendarProps, type CustomDayConfig, type CustomDayPredicateConfig, DatePicker, type DatePickerProps, DragGuideLines, type ExportToPdfHeaderOptions, type ExportToPdfOptions, GanttChart, type GanttChartHandle, type GanttChartProps, type GanttModeProps, GridBackground, Input, type InputProps, type MonthBlock, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, type Task, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, parseUTCDate, pixelsToDate, progressInRange, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, subtractBusinessDays, useTaskDrag, withoutDeps };
package/dist/index.js CHANGED
@@ -3922,7 +3922,8 @@ var DatePicker = ({
3922
3922
  className,
3923
3923
  disabled = false,
3924
3924
  isWeekend: isWeekend3,
3925
- businessDays = true
3925
+ businessDays = true,
3926
+ footer
3926
3927
  }) => {
3927
3928
  const [open, setOpen] = (0, import_react9.useState)(false);
3928
3929
  const [inputValue, setInputValue] = (0, import_react9.useState)("");
@@ -4200,7 +4201,8 @@ var DatePicker = ({
4200
4201
  initialDate: activeDate,
4201
4202
  isWeekend: isWeekend3
4202
4203
  }
4203
- )
4204
+ ),
4205
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "gantt-datepicker-footer", children: footer }) : null
4204
4206
  ]
4205
4207
  }
4206
4208
  )
@@ -4842,7 +4844,9 @@ var TaskListRow = import_react10.default.memo(
4842
4844
  resolvedColumns,
4843
4845
  isTaskSelected = false,
4844
4846
  onTaskSelectionChange,
4845
- taskListMenuCommands = []
4847
+ taskListMenuCommands = [],
4848
+ taskDateChangeMode = "preserve-duration",
4849
+ onTaskDateChangeModeChange
4846
4850
  }) => {
4847
4851
  const [editingColumnId, setEditingColumnId] = (0, import_react10.useState)(null);
4848
4852
  const editingName = editingColumnId === "name";
@@ -5142,10 +5146,13 @@ var TaskListRow = import_react10.default.memo(
5142
5146
  }
5143
5147
  const clampedValue = Math.max(0, Math.min(100, progressValue));
5144
5148
  if ((clampedValue === 100 || clampedValue === 0) && isTaskParent(task.id, allTasks)) {
5145
- const children = getChildren(task.id, allTasks);
5149
+ const descendants = getAllDescendants(task.id, allTasks);
5146
5150
  const updatedTasks = [
5147
5151
  { ...task, progress: clampedValue },
5148
- ...children.map((child) => ({ ...child, progress: clampedValue }))
5152
+ ...descendants.map((descendant) => ({
5153
+ ...descendant,
5154
+ progress: clampedValue
5155
+ }))
5149
5156
  ];
5150
5157
  onTasksChange?.(updatedTasks);
5151
5158
  } else {
@@ -5168,11 +5175,11 @@ var TaskListRow = import_react10.default.memo(
5168
5175
  progressConfirmedRef.current = true;
5169
5176
  const clampedValue = Math.max(0, Math.min(100, progressValue));
5170
5177
  if ((clampedValue === 100 || clampedValue === 0) && isTaskParent(task.id, allTasks)) {
5171
- const children = getChildren(task.id, allTasks);
5178
+ const descendants = getAllDescendants(task.id, allTasks);
5172
5179
  const updatedTasks = [
5173
5180
  { ...task, progress: clampedValue },
5174
- ...children.map((child) => ({
5175
- ...child,
5181
+ ...descendants.map((descendant) => ({
5182
+ ...descendant,
5176
5183
  progress: clampedValue
5177
5184
  }))
5178
5185
  ];
@@ -5242,24 +5249,22 @@ var TaskListRow = import_react10.default.memo(
5242
5249
  emitMilestoneDateChange(newDateISO);
5243
5250
  return;
5244
5251
  }
5245
- let nextEndISO;
5246
5252
  const normalizedInputStart = businessDays ? alignToWorkingDay(/* @__PURE__ */ new Date(`${newDateISO}T00:00:00.000Z`), 1, weekendPredicate) : /* @__PURE__ */ new Date(`${newDateISO}T00:00:00.000Z`);
5247
- if (businessDays) {
5248
- const duration = getDuration(task.startDate, task.endDate);
5249
- nextEndISO = buildTaskRangeFromStart(
5253
+ const { startDate: normalizedStart, endDate: normalizedEnd } = taskDateChangeMode === "free" ? normalizeTaskDates(
5254
+ normalizedInputStart,
5255
+ normalizedInputStart.getTime() > parseUTCDate(task.endDate).getTime() ? normalizedInputStart : parseUTCDate(task.endDate)
5256
+ ) : normalizeTaskDates(
5257
+ normalizedInputStart,
5258
+ businessDays ? buildTaskRangeFromStart(
5250
5259
  normalizedInputStart,
5251
- duration,
5260
+ getDuration(task.startDate, task.endDate),
5252
5261
  true,
5253
5262
  weekendPredicate,
5254
5263
  1
5255
- ).end.toISOString().split("T")[0];
5256
- } else {
5257
- const origStart = parseUTCDate(task.startDate);
5258
- const origEnd = parseUTCDate(task.endDate);
5259
- const durationMs = origEnd.getTime() - origStart.getTime();
5260
- nextEndISO = new Date(normalizedInputStart.getTime() + durationMs).toISOString().split("T")[0];
5261
- }
5262
- const { startDate: normalizedStart, endDate: normalizedEnd } = normalizeTaskDates(normalizedInputStart, nextEndISO);
5264
+ ).end.toISOString().split("T")[0] : new Date(
5265
+ normalizedInputStart.getTime() + (parseUTCDate(task.endDate).getTime() - parseUTCDate(task.startDate).getTime())
5266
+ ).toISOString().split("T")[0]
5267
+ );
5263
5268
  const clampedRange = clampTaskRangeForIncomingFS(
5264
5269
  task,
5265
5270
  /* @__PURE__ */ new Date(`${normalizedStart}T00:00:00.000Z`),
@@ -5288,7 +5293,7 @@ var TaskListRow = import_react10.default.memo(
5288
5293
  }
5289
5294
  ]);
5290
5295
  },
5291
- [task, onTasksChange, businessDays, getDuration, getEndDate, allTasks, weekendPredicate, isMilestone, emitMilestoneDateChange]
5296
+ [task, onTasksChange, businessDays, getDuration, allTasks, weekendPredicate, isMilestone, emitMilestoneDateChange, taskDateChangeMode]
5292
5297
  );
5293
5298
  const handleEndDateChange = (0, import_react10.useCallback)(
5294
5299
  (newDateISO) => {
@@ -5297,24 +5302,22 @@ var TaskListRow = import_react10.default.memo(
5297
5302
  emitMilestoneDateChange(newDateISO);
5298
5303
  return;
5299
5304
  }
5300
- let nextStartISO;
5301
5305
  const normalizedInputEnd = businessDays ? alignToWorkingDay(/* @__PURE__ */ new Date(`${newDateISO}T00:00:00.000Z`), -1, weekendPredicate) : /* @__PURE__ */ new Date(`${newDateISO}T00:00:00.000Z`);
5302
- if (businessDays) {
5303
- const duration = getDuration(task.startDate, task.endDate);
5304
- nextStartISO = buildTaskRangeFromEnd(
5306
+ const { startDate: normalizedStart, endDate: normalizedEnd } = taskDateChangeMode === "free" ? normalizeTaskDates(
5307
+ normalizedInputEnd.getTime() < parseUTCDate(task.startDate).getTime() ? normalizedInputEnd : parseUTCDate(task.startDate),
5308
+ normalizedInputEnd
5309
+ ) : normalizeTaskDates(
5310
+ businessDays ? buildTaskRangeFromEnd(
5305
5311
  normalizedInputEnd,
5306
- duration,
5312
+ getDuration(task.startDate, task.endDate),
5307
5313
  true,
5308
5314
  weekendPredicate,
5309
5315
  -1
5310
- ).start.toISOString().split("T")[0];
5311
- } else {
5312
- const origStart = parseUTCDate(task.startDate);
5313
- const origEnd = parseUTCDate(task.endDate);
5314
- const durationMs = origEnd.getTime() - origStart.getTime();
5315
- nextStartISO = new Date(normalizedInputEnd.getTime() - durationMs).toISOString().split("T")[0];
5316
- }
5317
- const { startDate: normalizedStart, endDate: normalizedEnd } = normalizeTaskDates(nextStartISO, normalizedInputEnd);
5316
+ ).start.toISOString().split("T")[0] : new Date(
5317
+ normalizedInputEnd.getTime() - (parseUTCDate(task.endDate).getTime() - parseUTCDate(task.startDate).getTime())
5318
+ ).toISOString().split("T")[0],
5319
+ normalizedInputEnd
5320
+ );
5318
5321
  const clampedRange = clampTaskRangeForIncomingFS(
5319
5322
  task,
5320
5323
  /* @__PURE__ */ new Date(`${normalizedStart}T00:00:00.000Z`),
@@ -5343,8 +5346,19 @@ var TaskListRow = import_react10.default.memo(
5343
5346
  }
5344
5347
  ]);
5345
5348
  },
5346
- [task, onTasksChange, businessDays, getDuration, weekendPredicate, allTasks, isMilestone, emitMilestoneDateChange]
5349
+ [task, onTasksChange, businessDays, getDuration, weekendPredicate, allTasks, isMilestone, emitMilestoneDateChange, taskDateChangeMode]
5347
5350
  );
5351
+ const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "gantt-datepicker-mode-checkbox", children: [
5352
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
5353
+ "input",
5354
+ {
5355
+ type: "checkbox",
5356
+ checked: taskDateChangeMode === "preserve-duration",
5357
+ onChange: (event) => onTaskDateChangeModeChange(event.target.checked ? "preserve-duration" : "free")
5358
+ }
5359
+ ),
5360
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C" })
5361
+ ] }) : null;
5348
5362
  const handleRowClickInternal = (0, import_react10.useCallback)(() => {
5349
5363
  onRowClick?.(task.id);
5350
5364
  }, [task.id, onRowClick]);
@@ -5379,16 +5393,9 @@ var TaskListRow = import_react10.default.memo(
5379
5393
  const handleApplyColor = (0, import_react10.useCallback)(
5380
5394
  (color) => {
5381
5395
  if (!onTasksChange) return;
5382
- const descendantIds = /* @__PURE__ */ new Set();
5383
- if (isParent) {
5384
- const stack = getChildren(task.id, allTasks);
5385
- while (stack.length > 0) {
5386
- const current = stack.shift();
5387
- if (!current || descendantIds.has(current.id)) continue;
5388
- descendantIds.add(current.id);
5389
- stack.push(...getChildren(current.id, allTasks));
5390
- }
5391
- }
5396
+ const descendantIds = new Set(
5397
+ isParent ? getAllDescendants(task.id, allTasks).map((descendant) => descendant.id) : []
5398
+ );
5392
5399
  const updatedTasks = [
5393
5400
  { ...task, color },
5394
5401
  ...allTasks.filter((candidate) => descendantIds.has(candidate.id)).map((candidate) => ({ ...candidate, color }))
@@ -6050,7 +6057,8 @@ var TaskListRow = import_react10.default.memo(
6050
6057
  portal: true,
6051
6058
  disabled: task.locked,
6052
6059
  isWeekend: weekendPredicate,
6053
- businessDays
6060
+ businessDays,
6061
+ footer: datePickerFooter
6054
6062
  }
6055
6063
  )
6056
6064
  }
@@ -6069,7 +6077,8 @@ var TaskListRow = import_react10.default.memo(
6069
6077
  portal: true,
6070
6078
  disabled: task.locked,
6071
6079
  isWeekend: weekendPredicate,
6072
- businessDays
6080
+ businessDays,
6081
+ footer: datePickerFooter
6073
6082
  }
6074
6083
  )
6075
6084
  }
@@ -6749,7 +6758,9 @@ var TaskList = ({
6749
6758
  isFilterActive = false,
6750
6759
  additionalColumns,
6751
6760
  hiddenTaskListColumns,
6752
- taskListMenuCommands
6761
+ taskListMenuCommands,
6762
+ taskDateChangeMode = "preserve-duration",
6763
+ onTaskDateChangeModeChange
6753
6764
  }) => {
6754
6765
  const [internalSelectedTaskIds, setInternalSelectedTaskIds] = (0, import_react12.useState)(/* @__PURE__ */ new Set());
6755
6766
  const effectiveSelectedTaskIds = selectedTaskIds ?? internalSelectedTaskIds;
@@ -7485,7 +7496,9 @@ var TaskList = ({
7485
7496
  resolvedColumns,
7486
7497
  isTaskSelected: effectiveSelectedTaskIds.has(task.id),
7487
7498
  onTaskSelectionChange: handleToggleTaskSelection,
7488
- taskListMenuCommands
7499
+ taskListMenuCommands,
7500
+ taskDateChangeMode,
7501
+ onTaskDateChangeModeChange
7489
7502
  }
7490
7503
  ),
7491
7504
  pendingInsertDisplayTaskId === task.id && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
@@ -9617,7 +9630,9 @@ function TaskGanttChartInner(props, ref) {
9617
9630
  showChart = true,
9618
9631
  additionalColumns,
9619
9632
  hiddenTaskListColumns,
9620
- taskListMenuCommands
9633
+ taskListMenuCommands,
9634
+ taskDateChangeMode: externalTaskDateChangeMode,
9635
+ onTaskDateChangeModeChange: externalOnTaskDateChangeModeChange
9621
9636
  } = props;
9622
9637
  const containerRef = (0, import_react15.useRef)(null);
9623
9638
  const scrollContainerRef = (0, import_react15.useRef)(null);
@@ -9625,16 +9640,29 @@ function TaskGanttChartInner(props, ref) {
9625
9640
  const clearSelectedTaskTimeoutRef = (0, import_react15.useRef)(null);
9626
9641
  const [selectedTaskId, setSelectedTaskId] = (0, import_react15.useState)(null);
9627
9642
  const [taskListHasRightShadow, setTaskListHasRightShadow] = (0, import_react15.useState)(false);
9643
+ const [internalTaskDateChangeMode, setInternalTaskDateChangeMode] = (0, import_react15.useState)("preserve-duration");
9628
9644
  const [selectedChip, setSelectedChip] = (0, import_react15.useState)(null);
9629
9645
  const [internalCollapsedParentIds, setInternalCollapsedParentIds] = (0, import_react15.useState)(/* @__PURE__ */ new Set());
9630
9646
  const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
9631
9647
  const [editingTaskId, setEditingTaskId] = (0, import_react15.useState)(null);
9648
+ const taskDateChangeMode = externalTaskDateChangeMode ?? internalTaskDateChangeMode;
9649
+ const handleTaskDateChangeMode = externalOnTaskDateChangeModeChange ?? setInternalTaskDateChangeMode;
9632
9650
  const normalizedTasks = (0, import_react15.useMemo)(() => normalizeHierarchyTasks(tasks), [tasks]);
9633
9651
  const isCustomWeekend = (0, import_react15.useMemo)(
9634
9652
  () => createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }),
9635
9653
  [customDays, isWeekend3]
9636
9654
  );
9637
- const dateRange = (0, import_react15.useMemo)(() => getMultiMonthDays(normalizedTasks), [normalizedTasks]);
9655
+ const dateRangeTasks = (0, import_react15.useMemo)(() => {
9656
+ if (!showBaseline) {
9657
+ return normalizedTasks;
9658
+ }
9659
+ return normalizedTasks.map((task) => ({
9660
+ ...task,
9661
+ startDate: task.baselineStartDate && parseUTCDate(task.baselineStartDate).getTime() < parseUTCDate(task.startDate).getTime() ? task.baselineStartDate : task.startDate,
9662
+ endDate: task.baselineEndDate && parseUTCDate(task.baselineEndDate).getTime() > parseUTCDate(task.endDate).getTime() ? task.baselineEndDate : task.endDate
9663
+ }));
9664
+ }, [normalizedTasks, showBaseline]);
9665
+ const dateRange = (0, import_react15.useMemo)(() => getMultiMonthDays(dateRangeTasks), [dateRangeTasks]);
9638
9666
  const [validationResult, setValidationResult] = (0, import_react15.useState)(null);
9639
9667
  const [cascadeOverrides, setCascadeOverrides] = (0, import_react15.useState)(/* @__PURE__ */ new Map());
9640
9668
  const gridWidth = (0, import_react15.useMemo)(
@@ -10102,7 +10130,6 @@ function TaskGanttChartInner(props, ref) {
10102
10130
  if (!hasDirectChildren) return;
10103
10131
  const changedTasks = [];
10104
10132
  for (const task of tasks) {
10105
- if (task.id === taskId) continue;
10106
10133
  const nextParentId = task.parentId === taskId ? parentTask.parentId : task.parentId;
10107
10134
  const nextDependencies = task.dependencies?.filter((dep) => dep.taskId !== taskId);
10108
10135
  if (nextParentId !== task.parentId || nextDependencies?.length !== task.dependencies?.length) {
@@ -10116,8 +10143,7 @@ function TaskGanttChartInner(props, ref) {
10116
10143
  if (changedTasks.length > 0) {
10117
10144
  onTasksChange?.(changedTasks);
10118
10145
  }
10119
- onDelete?.(taskId);
10120
- }, [tasks, onTasksChange, onDelete, onUngroupTask]);
10146
+ }, [tasks, onTasksChange, onUngroupTask]);
10121
10147
  const panStateRef = (0, import_react15.useRef)(null);
10122
10148
  const handlePanStart = (0, import_react15.useCallback)((e) => {
10123
10149
  if (e.button !== 0) return;
@@ -10217,7 +10243,9 @@ function TaskGanttChartInner(props, ref) {
10217
10243
  isFilterActive: !!taskFilter,
10218
10244
  additionalColumns,
10219
10245
  hiddenTaskListColumns,
10220
- taskListMenuCommands
10246
+ taskListMenuCommands,
10247
+ taskDateChangeMode,
10248
+ onTaskDateChangeModeChange: handleTaskDateChangeMode
10221
10249
  }
10222
10250
  ),
10223
10251
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(