gantt-lib 0.78.0 → 0.80.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-CZzZrxn-.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 TaskBarGeometry, W as WeekendBlock, i as alignToWorkingDay, j as areTasksHierarchicallyRelated, k as buildAdjacencyList, l as buildTaskRangeFromEnd, m as buildTaskRangeFromStart, n as calculateSuccessorDate, o as cascadeByLinks, p as clampTaskRangeForIncomingFS, q as computeLagFromDates, r as computeParentDates, s as computeParentProgress, t as detectCycles, u as findParentId, v as getAllDependencyEdges, w as getAllDescendants, x as getBusinessDayOffset, y as getChildren, z as getDependencyLag, A as getSuccessorChain, B as getTaskDuration, C as getTransitiveCascadeChain, E as isAncestorTask, F as isTaskParent, H as moveTaskRange, I as moveTaskWithCascade, J as normalizeDependencyLag, K as normalizePredecessorDates, N as normalizeUTCDate, O as parseDateOnly, P as recalculateIncomingLags, Q as recalculateProjectSchedule, S as recalculateTaskFromDependencies, U as reflowTasksOnModeSwitch, X as removeDependenciesBetweenTasks, Y as resizeTaskWithCascade, Z as shiftBusinessDayOffset, _ as universalCascade, $ as validateDependencies } from './index-CZzZrxn-.mjs';
2
+ import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as ResourcePlannerChartProps, b as ResourceTimelineResource } from './index-DAfJyZbj.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 normalizeUTCDate, P as parseDateOnly, Q as recalculateIncomingLags, S as recalculateProjectSchedule, U as recalculateTaskFromDependencies, X as reflowTasksOnModeSwitch, Y as removeDependenciesBetweenTasks, Z as resizeTaskWithCascade, _ as shiftBusinessDayOffset, $ as universalCascade, a0 as validateDependencies } from './index-DAfJyZbj.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as RadixPopover from '@radix-ui/react-popover';
6
6
 
@@ -260,11 +260,20 @@ declare const or: (...predicates: TaskPredicate[]) => TaskPredicate;
260
260
  * @returns Composite predicate that returns the opposite of the input predicate
261
261
  */
262
262
  declare const not: (predicate: TaskPredicate) => TaskPredicate;
263
+ interface WithoutDepsOptions {
264
+ /** If true, only child tasks (tasks with parentId) can match. */
265
+ onlyChildren?: boolean;
266
+ /** Full task list, required when excluding parent rows. */
267
+ tasks?: Task$1[];
268
+ /** If true, only non-parent regular tasks can match. Requires tasks. */
269
+ onlyLeafTasks?: boolean;
270
+ }
263
271
  /**
264
272
  * Filter tasks that have no dependencies
273
+ * @param options - Optional flags to narrow matching tasks
265
274
  * @returns Predicate that returns true for tasks without dependencies array or with empty array
266
275
  */
267
- declare const withoutDeps: () => TaskPredicate;
276
+ declare const withoutDeps: (options?: WithoutDepsOptions) => TaskPredicate;
268
277
  /**
269
278
  * Filter expired (overdue) tasks
270
279
  * @param referenceDate - Date to compare against (default: now)
@@ -540,7 +549,7 @@ declare const GanttChart: <TTask extends Task = Task, TItem extends ResourceTime
540
549
  ref?: React$1.Ref<GanttChartHandle>;
541
550
  }) => React$1.ReactElement;
542
551
 
543
- declare function ResourceTimelineChart<TItem extends ResourceTimelineItem = ResourceTimelineItem>({ resources, dayWidth, viewMode, rowHeaderWidth, laneHeight, headerHeight, containerHeight, allowVerticalPan, customDays, isWeekend, businessDays, readonly, disableResourceReassignment, renderItem, getItemClassName, onResourceItemClick, onResourceItemMove, }: ResourcePlannerChartProps<TItem>): react_jsx_runtime.JSX.Element;
552
+ declare function ResourceTimelineChart<TItem extends ResourceTimelineItem = ResourceTimelineItem>({ resources, dayWidth, viewMode, rowHeaderWidth, laneHeight, headerHeight, containerHeight, allowVerticalPan, customDays, isWeekend, businessDays, readonly, disableResourceReassignment, renderItem, getItemClassName, onResourceItemClick, onResourceItemMove, onAddResource, enableAddResource, resourceMenuCommands, }: ResourcePlannerChartProps<TItem>): react_jsx_runtime.JSX.Element;
544
553
 
545
554
  interface TaskRowProps {
546
555
  /** Task data to render */
@@ -643,6 +652,12 @@ interface GridBackgroundProps {
643
652
  viewMode?: 'day' | 'week' | 'month';
644
653
  /** Optional predicate for custom weekend logic (e.g., holidays, shift patterns) */
645
654
  isCustomWeekend?: (date: Date) => boolean;
655
+ /** Optional extra class for layered rendering contexts. */
656
+ className?: string;
657
+ /** Whether to render weekend background blocks. */
658
+ showWeekendBlocks?: boolean;
659
+ /** Whether to render vertical grid lines. */
660
+ showGridLines?: boolean;
646
661
  }
647
662
  /**
648
663
  * GridBackground component - renders vertical grid lines and weekend background highlighting
@@ -1249,4 +1264,4 @@ interface VisibleReorderPosition {
1249
1264
  */
1250
1265
  declare function getVisibleReorderPosition(orderedTasks: TaskLike[], visibleTasks: TaskLike[], movedTaskId: string, originVisibleIndex: number, dropVisibleIndex: number): VisibleReorderPosition | null;
1251
1266
 
1252
- 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 TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, 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 };
1267
+ 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 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-CZzZrxn-.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 TaskBarGeometry, W as WeekendBlock, i as alignToWorkingDay, j as areTasksHierarchicallyRelated, k as buildAdjacencyList, l as buildTaskRangeFromEnd, m as buildTaskRangeFromStart, n as calculateSuccessorDate, o as cascadeByLinks, p as clampTaskRangeForIncomingFS, q as computeLagFromDates, r as computeParentDates, s as computeParentProgress, t as detectCycles, u as findParentId, v as getAllDependencyEdges, w as getAllDescendants, x as getBusinessDayOffset, y as getChildren, z as getDependencyLag, A as getSuccessorChain, B as getTaskDuration, C as getTransitiveCascadeChain, E as isAncestorTask, F as isTaskParent, H as moveTaskRange, I as moveTaskWithCascade, J as normalizeDependencyLag, K as normalizePredecessorDates, N as normalizeUTCDate, O as parseDateOnly, P as recalculateIncomingLags, Q as recalculateProjectSchedule, S as recalculateTaskFromDependencies, U as reflowTasksOnModeSwitch, X as removeDependenciesBetweenTasks, Y as resizeTaskWithCascade, Z as shiftBusinessDayOffset, _ as universalCascade, $ as validateDependencies } from './index-CZzZrxn-.js';
2
+ import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as ResourcePlannerChartProps, b as ResourceTimelineResource } from './index-DAfJyZbj.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 normalizeUTCDate, P as parseDateOnly, Q as recalculateIncomingLags, S as recalculateProjectSchedule, U as recalculateTaskFromDependencies, X as reflowTasksOnModeSwitch, Y as removeDependenciesBetweenTasks, Z as resizeTaskWithCascade, _ as shiftBusinessDayOffset, $ as universalCascade, a0 as validateDependencies } from './index-DAfJyZbj.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as RadixPopover from '@radix-ui/react-popover';
6
6
 
@@ -260,11 +260,20 @@ declare const or: (...predicates: TaskPredicate[]) => TaskPredicate;
260
260
  * @returns Composite predicate that returns the opposite of the input predicate
261
261
  */
262
262
  declare const not: (predicate: TaskPredicate) => TaskPredicate;
263
+ interface WithoutDepsOptions {
264
+ /** If true, only child tasks (tasks with parentId) can match. */
265
+ onlyChildren?: boolean;
266
+ /** Full task list, required when excluding parent rows. */
267
+ tasks?: Task$1[];
268
+ /** If true, only non-parent regular tasks can match. Requires tasks. */
269
+ onlyLeafTasks?: boolean;
270
+ }
263
271
  /**
264
272
  * Filter tasks that have no dependencies
273
+ * @param options - Optional flags to narrow matching tasks
265
274
  * @returns Predicate that returns true for tasks without dependencies array or with empty array
266
275
  */
267
- declare const withoutDeps: () => TaskPredicate;
276
+ declare const withoutDeps: (options?: WithoutDepsOptions) => TaskPredicate;
268
277
  /**
269
278
  * Filter expired (overdue) tasks
270
279
  * @param referenceDate - Date to compare against (default: now)
@@ -540,7 +549,7 @@ declare const GanttChart: <TTask extends Task = Task, TItem extends ResourceTime
540
549
  ref?: React$1.Ref<GanttChartHandle>;
541
550
  }) => React$1.ReactElement;
542
551
 
543
- declare function ResourceTimelineChart<TItem extends ResourceTimelineItem = ResourceTimelineItem>({ resources, dayWidth, viewMode, rowHeaderWidth, laneHeight, headerHeight, containerHeight, allowVerticalPan, customDays, isWeekend, businessDays, readonly, disableResourceReassignment, renderItem, getItemClassName, onResourceItemClick, onResourceItemMove, }: ResourcePlannerChartProps<TItem>): react_jsx_runtime.JSX.Element;
552
+ declare function ResourceTimelineChart<TItem extends ResourceTimelineItem = ResourceTimelineItem>({ resources, dayWidth, viewMode, rowHeaderWidth, laneHeight, headerHeight, containerHeight, allowVerticalPan, customDays, isWeekend, businessDays, readonly, disableResourceReassignment, renderItem, getItemClassName, onResourceItemClick, onResourceItemMove, onAddResource, enableAddResource, resourceMenuCommands, }: ResourcePlannerChartProps<TItem>): react_jsx_runtime.JSX.Element;
544
553
 
545
554
  interface TaskRowProps {
546
555
  /** Task data to render */
@@ -643,6 +652,12 @@ interface GridBackgroundProps {
643
652
  viewMode?: 'day' | 'week' | 'month';
644
653
  /** Optional predicate for custom weekend logic (e.g., holidays, shift patterns) */
645
654
  isCustomWeekend?: (date: Date) => boolean;
655
+ /** Optional extra class for layered rendering contexts. */
656
+ className?: string;
657
+ /** Whether to render weekend background blocks. */
658
+ showWeekendBlocks?: boolean;
659
+ /** Whether to render vertical grid lines. */
660
+ showGridLines?: boolean;
646
661
  }
647
662
  /**
648
663
  * GridBackground component - renders vertical grid lines and weekend background highlighting
@@ -1249,4 +1264,4 @@ interface VisibleReorderPosition {
1249
1264
  */
1250
1265
  declare function getVisibleReorderPosition(orderedTasks: TaskLike[], visibleTasks: TaskLike[], movedTaskId: string, originVisibleIndex: number, dropVisibleIndex: number): VisibleReorderPosition | null;
1251
1266
 
1252
- 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 TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TodayIndicator, ValidationResult, type VisibleReorderPosition, type WeekBlock, type WeekSpan, 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 };
1267
+ 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 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 };