gantt-lib 0.135.9 → 0.136.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.
- package/README.md +22 -0
- package/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/{index-DR8Q6-de.d.mts → index-D99kbU4p.d.mts} +5 -0
- package/dist/{index-DR8Q6-de.d.ts → index-D99kbU4p.d.ts} +5 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +469 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +665 -315
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +228 -4
- package/package.json +1 -1
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 TimelineMarker, c as TaskDateChangeMode, S as ScaleTaskSubtreeResult, d as ResourcePlannerChartProps, e as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, f as DependencyError, g as GanttChartMode, h as GridConfig, i as GridLine, L as LinkType, M as MonthSpan, j as ResourceTableColumnId, k as ResourceTableColumnWidthMap, l as ResourceTimelineMove, m as ResourceTimelineResourceMenuCommand, n as ScaleTaskSubtreeAnchor, o as ScaleTaskSubtreeErrorCode, p as ScaleTaskSubtreeExternalPolicy, q as ScaleTaskSubtreeOptions, r as ScaleTaskSubtreeWarning, s as TaskBarGeometry, W as WeekendBlock, t as alignToWorkingDay, u as areTasksHierarchicallyRelated, v as buildAdjacencyList, w as buildTaskRangeFromEnd, x as buildTaskRangeFromStart, y as calculateSuccessorDate, z as cascadeByLinks, A as clampTaskRangeForIncomingFS, E as computeCriticalPath, F as computeLagFromDates, H as computeParentDates, I as computeParentProgress, J as detectCycles, K as extendCriticalIdsToParents, N as findParentId, O as getAllDependencyEdges, P as getAllDescendants, Q as getBusinessDayOffset, U as getChildren, X as getDependencyLag, Y as getSuccessorChain, Z as getTaskDuration, _ as getTransitiveCascadeChain, $ as isAncestorTask, a0 as isTaskParent, a1 as moveTaskRange, a2 as moveTaskWithCascade, a3 as normalizeDependencyLag, a4 as normalizePredecessorDates, a5 as normalizeTaskDependencyLags, a6 as normalizeUTCDate, a7 as parseDateOnly, a8 as recalculateIncomingLags, a9 as recalculateProjectSchedule, aa as recalculateTaskFromDependencies, ab as reflowTasksOnModeSwitch, ac as removeDependenciesBetweenTasks, ad as resizeTaskWithCascade, ae as scaleTaskSubtreeDuration, af as shiftBusinessDayOffset, ag as universalCascade, ah as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TimelineMarker, c as TaskDateChangeMode, S as ScaleTaskSubtreeResult, d as ResourcePlannerChartProps, e as ResourceTimelineResource } from './index-D99kbU4p.mjs';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, f as DependencyError, g as GanttChartMode, h as GridConfig, i as GridLine, L as LinkType, M as MonthSpan, j as ResourceTableColumnId, k as ResourceTableColumnWidthMap, l as ResourceTimelineMove, m as ResourceTimelineResourceMenuCommand, n as ScaleTaskSubtreeAnchor, o as ScaleTaskSubtreeErrorCode, p as ScaleTaskSubtreeExternalPolicy, q as ScaleTaskSubtreeOptions, r as ScaleTaskSubtreeWarning, s as TaskBarGeometry, W as WeekendBlock, t as alignToWorkingDay, u as areTasksHierarchicallyRelated, v as buildAdjacencyList, w as buildTaskRangeFromEnd, x as buildTaskRangeFromStart, y as calculateSuccessorDate, z as cascadeByLinks, A as clampTaskRangeForIncomingFS, E as computeCriticalPath, F as computeLagFromDates, H as computeParentDates, I as computeParentProgress, J as detectCycles, K as extendCriticalIdsToParents, N as findParentId, O as getAllDependencyEdges, P as getAllDescendants, Q as getBusinessDayOffset, U as getChildren, X as getDependencyLag, Y as getSuccessorChain, Z as getTaskDuration, _ as getTransitiveCascadeChain, $ as isAncestorTask, a0 as isTaskParent, a1 as moveTaskRange, a2 as moveTaskWithCascade, a3 as normalizeDependencyLag, a4 as normalizePredecessorDates, a5 as normalizeTaskDependencyLags, a6 as normalizeUTCDate, a7 as parseDateOnly, a8 as recalculateIncomingLags, a9 as recalculateProjectSchedule, aa as recalculateTaskFromDependencies, ab as reflowTasksOnModeSwitch, ac as removeDependenciesBetweenTasks, ad as resizeTaskWithCascade, ae as scaleTaskSubtreeDuration, af as shiftBusinessDayOffset, ag as universalCascade, ah as validateDependencies } from './index-D99kbU4p.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -458,6 +458,8 @@ interface Task {
|
|
|
458
458
|
type?: 'task' | 'milestone';
|
|
459
459
|
/** Optional parent task ID for hierarchy relationship */
|
|
460
460
|
parentId?: string;
|
|
461
|
+
/** Render this parent as a compact accordion bar. Its children remain ordinary tasks. */
|
|
462
|
+
composite?: boolean;
|
|
461
463
|
/**
|
|
462
464
|
* Optional progress value from 0-100
|
|
463
465
|
* - Decimal values are allowed and rounded to nearest integer for display
|
|
@@ -633,6 +635,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
633
635
|
showTaskDateLabels?: boolean;
|
|
634
636
|
/** Render task names to the right of task bars in Gantt mode (default: true). */
|
|
635
637
|
showTaskNames?: boolean;
|
|
638
|
+
/** Render composite child mini-bars inside the parent bar (default: true). */
|
|
639
|
+
showCompositeSegments?: boolean;
|
|
636
640
|
/** Optional vertical timeline markers such as deadlines and checkpoints. */
|
|
637
641
|
timelineMarkers?: TimelineMarker[];
|
|
638
642
|
/** Additional custom columns to render in the TaskList after built-in columns */
|
|
@@ -845,6 +849,14 @@ interface TaskRowProps {
|
|
|
845
849
|
showTaskDateLabels?: boolean;
|
|
846
850
|
/** Render the task name to the right of the task bar (default: true). */
|
|
847
851
|
showTaskNames?: boolean;
|
|
852
|
+
/** Render composite child mini-bars inside the parent bar (default: true). */
|
|
853
|
+
showCompositeSegments?: boolean;
|
|
854
|
+
/** Open or close the composite detail rows. */
|
|
855
|
+
onCompositeToggle?: (source: 'release' | 'click' | 'keyboard') => void;
|
|
856
|
+
compactDetail?: boolean;
|
|
857
|
+
/** Parent bar color used to tint a composite detail row. */
|
|
858
|
+
compositeParentColor?: string;
|
|
859
|
+
compositeExpanded?: boolean;
|
|
848
860
|
}
|
|
849
861
|
/**
|
|
850
862
|
* TaskRow component - renders a single task row with a task bar
|
|
@@ -864,6 +876,8 @@ interface GenerationSkeletonRowsProps {
|
|
|
864
876
|
rowHeight: number;
|
|
865
877
|
variant: GenerationSkeletonVariant;
|
|
866
878
|
startIndex?: number;
|
|
879
|
+
/** Pixel offset of the first placeholder when preceding rows have variable heights. */
|
|
880
|
+
startTop?: number;
|
|
867
881
|
taskListLayout?: GenerationSkeletonTaskListLayout;
|
|
868
882
|
chartDayWidth?: number;
|
|
869
883
|
chartStartDayOffset?: number;
|
|
@@ -978,6 +992,9 @@ interface TaskListProps {
|
|
|
978
992
|
tasks: Task[];
|
|
979
993
|
/** Height of each row in pixels (must match Gantt chart's rowHeight) */
|
|
980
994
|
rowHeight: number;
|
|
995
|
+
/** Pixel positions shared with the chart for variable-height detail rows. */
|
|
996
|
+
rowTops?: number[];
|
|
997
|
+
rowHeights?: number[];
|
|
981
998
|
/** Height of the header row in pixels (must match Gantt chart's headerHeight) */
|
|
982
999
|
headerHeight: number;
|
|
983
1000
|
/** Width of the task list overlay in pixels. Values below the visible column width are clamped. */
|
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 TimelineMarker, c as TaskDateChangeMode, S as ScaleTaskSubtreeResult, d as ResourcePlannerChartProps, e as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, f as DependencyError, g as GanttChartMode, h as GridConfig, i as GridLine, L as LinkType, M as MonthSpan, j as ResourceTableColumnId, k as ResourceTableColumnWidthMap, l as ResourceTimelineMove, m as ResourceTimelineResourceMenuCommand, n as ScaleTaskSubtreeAnchor, o as ScaleTaskSubtreeErrorCode, p as ScaleTaskSubtreeExternalPolicy, q as ScaleTaskSubtreeOptions, r as ScaleTaskSubtreeWarning, s as TaskBarGeometry, W as WeekendBlock, t as alignToWorkingDay, u as areTasksHierarchicallyRelated, v as buildAdjacencyList, w as buildTaskRangeFromEnd, x as buildTaskRangeFromStart, y as calculateSuccessorDate, z as cascadeByLinks, A as clampTaskRangeForIncomingFS, E as computeCriticalPath, F as computeLagFromDates, H as computeParentDates, I as computeParentProgress, J as detectCycles, K as extendCriticalIdsToParents, N as findParentId, O as getAllDependencyEdges, P as getAllDescendants, Q as getBusinessDayOffset, U as getChildren, X as getDependencyLag, Y as getSuccessorChain, Z as getTaskDuration, _ as getTransitiveCascadeChain, $ as isAncestorTask, a0 as isTaskParent, a1 as moveTaskRange, a2 as moveTaskWithCascade, a3 as normalizeDependencyLag, a4 as normalizePredecessorDates, a5 as normalizeTaskDependencyLags, a6 as normalizeUTCDate, a7 as parseDateOnly, a8 as recalculateIncomingLags, a9 as recalculateProjectSchedule, aa as recalculateTaskFromDependencies, ab as reflowTasksOnModeSwitch, ac as removeDependenciesBetweenTasks, ad as resizeTaskWithCascade, ae as scaleTaskSubtreeDuration, af as shiftBusinessDayOffset, ag as universalCascade, ah as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TimelineMarker, c as TaskDateChangeMode, S as ScaleTaskSubtreeResult, d as ResourcePlannerChartProps, e as ResourceTimelineResource } from './index-D99kbU4p.js';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS, f as DependencyError, g as GanttChartMode, h as GridConfig, i as GridLine, L as LinkType, M as MonthSpan, j as ResourceTableColumnId, k as ResourceTableColumnWidthMap, l as ResourceTimelineMove, m as ResourceTimelineResourceMenuCommand, n as ScaleTaskSubtreeAnchor, o as ScaleTaskSubtreeErrorCode, p as ScaleTaskSubtreeExternalPolicy, q as ScaleTaskSubtreeOptions, r as ScaleTaskSubtreeWarning, s as TaskBarGeometry, W as WeekendBlock, t as alignToWorkingDay, u as areTasksHierarchicallyRelated, v as buildAdjacencyList, w as buildTaskRangeFromEnd, x as buildTaskRangeFromStart, y as calculateSuccessorDate, z as cascadeByLinks, A as clampTaskRangeForIncomingFS, E as computeCriticalPath, F as computeLagFromDates, H as computeParentDates, I as computeParentProgress, J as detectCycles, K as extendCriticalIdsToParents, N as findParentId, O as getAllDependencyEdges, P as getAllDescendants, Q as getBusinessDayOffset, U as getChildren, X as getDependencyLag, Y as getSuccessorChain, Z as getTaskDuration, _ as getTransitiveCascadeChain, $ as isAncestorTask, a0 as isTaskParent, a1 as moveTaskRange, a2 as moveTaskWithCascade, a3 as normalizeDependencyLag, a4 as normalizePredecessorDates, a5 as normalizeTaskDependencyLags, a6 as normalizeUTCDate, a7 as parseDateOnly, a8 as recalculateIncomingLags, a9 as recalculateProjectSchedule, aa as recalculateTaskFromDependencies, ab as reflowTasksOnModeSwitch, ac as removeDependenciesBetweenTasks, ad as resizeTaskWithCascade, ae as scaleTaskSubtreeDuration, af as shiftBusinessDayOffset, ag as universalCascade, ah as validateDependencies } from './index-D99kbU4p.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -458,6 +458,8 @@ interface Task {
|
|
|
458
458
|
type?: 'task' | 'milestone';
|
|
459
459
|
/** Optional parent task ID for hierarchy relationship */
|
|
460
460
|
parentId?: string;
|
|
461
|
+
/** Render this parent as a compact accordion bar. Its children remain ordinary tasks. */
|
|
462
|
+
composite?: boolean;
|
|
461
463
|
/**
|
|
462
464
|
* Optional progress value from 0-100
|
|
463
465
|
* - Decimal values are allowed and rounded to nearest integer for display
|
|
@@ -633,6 +635,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
633
635
|
showTaskDateLabels?: boolean;
|
|
634
636
|
/** Render task names to the right of task bars in Gantt mode (default: true). */
|
|
635
637
|
showTaskNames?: boolean;
|
|
638
|
+
/** Render composite child mini-bars inside the parent bar (default: true). */
|
|
639
|
+
showCompositeSegments?: boolean;
|
|
636
640
|
/** Optional vertical timeline markers such as deadlines and checkpoints. */
|
|
637
641
|
timelineMarkers?: TimelineMarker[];
|
|
638
642
|
/** Additional custom columns to render in the TaskList after built-in columns */
|
|
@@ -845,6 +849,14 @@ interface TaskRowProps {
|
|
|
845
849
|
showTaskDateLabels?: boolean;
|
|
846
850
|
/** Render the task name to the right of the task bar (default: true). */
|
|
847
851
|
showTaskNames?: boolean;
|
|
852
|
+
/** Render composite child mini-bars inside the parent bar (default: true). */
|
|
853
|
+
showCompositeSegments?: boolean;
|
|
854
|
+
/** Open or close the composite detail rows. */
|
|
855
|
+
onCompositeToggle?: (source: 'release' | 'click' | 'keyboard') => void;
|
|
856
|
+
compactDetail?: boolean;
|
|
857
|
+
/** Parent bar color used to tint a composite detail row. */
|
|
858
|
+
compositeParentColor?: string;
|
|
859
|
+
compositeExpanded?: boolean;
|
|
848
860
|
}
|
|
849
861
|
/**
|
|
850
862
|
* TaskRow component - renders a single task row with a task bar
|
|
@@ -864,6 +876,8 @@ interface GenerationSkeletonRowsProps {
|
|
|
864
876
|
rowHeight: number;
|
|
865
877
|
variant: GenerationSkeletonVariant;
|
|
866
878
|
startIndex?: number;
|
|
879
|
+
/** Pixel offset of the first placeholder when preceding rows have variable heights. */
|
|
880
|
+
startTop?: number;
|
|
867
881
|
taskListLayout?: GenerationSkeletonTaskListLayout;
|
|
868
882
|
chartDayWidth?: number;
|
|
869
883
|
chartStartDayOffset?: number;
|
|
@@ -978,6 +992,9 @@ interface TaskListProps {
|
|
|
978
992
|
tasks: Task[];
|
|
979
993
|
/** Height of each row in pixels (must match Gantt chart's rowHeight) */
|
|
980
994
|
rowHeight: number;
|
|
995
|
+
/** Pixel positions shared with the chart for variable-height detail rows. */
|
|
996
|
+
rowTops?: number[];
|
|
997
|
+
rowHeights?: number[];
|
|
981
998
|
/** Height of the header row in pixels (must match Gantt chart's headerHeight) */
|
|
982
999
|
headerHeight: number;
|
|
983
1000
|
/** Width of the task list overlay in pixels. Values below the visible column width are clamped. */
|