gantt-lib 0.139.0 → 0.140.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/README.md +9 -0
- package/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/{index-BfFHn43h.d.mts → index-uVwdodEf.d.mts} +10 -1
- package/dist/{index-BfFHn43h.d.ts → index-uVwdodEf.d.ts} +10 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -581,3 +581,12 @@ MIT
|
|
|
581
581
|
```
|
|
582
582
|
|
|
583
583
|
All four dependency types (`FS`, `SS`, `FF`, `SF`), signed lags, cross-row links, packed lanes and filtered/virtualized rows are supported. `showActivityLinks={false}` hides the graph; `showActivityLag={false}` hides its lag labels.
|
|
584
|
+
|
|
585
|
+
To control which links remain visible while a chain is active, pass `activityDependencyHighlight`. The selection uses host-scoped identities; `mode` is `chain` (default), `chain-incoming`, `chain-outgoing`, or `chain-all`. Omit the prop when deselecting to restore all links.
|
|
586
|
+
|
|
587
|
+
```tsx
|
|
588
|
+
activityDependencyHighlight={{
|
|
589
|
+
activities: [{taskId: 'floor-1', activityId: 'walls'}, {taskId: 'floor-2', activityId: 'walls'}],
|
|
590
|
+
mode: 'chain-incoming',
|
|
591
|
+
}}
|
|
592
|
+
```
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { an as CascadeContext, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, L as LinkType, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, S as ScaleTaskSubtreeResult, u as ScaleTaskSubtreeWarning, ao as ScheduleCommandOptions, ap as ScheduleCommandResult, aq as ScheduleDependency, ar as ScheduleTask, as as ScheduleTaskUpdate, T as Task, at as TaskDependency, V as ValidationResult, au as addBusinessDays, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, av as cascadeTaskProgress, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, aw as createCascadeContext, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, ax as getBusinessDaysCount, $ 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, ay as subtractBusinessDays, al as universalCascade, am as validateDependencies } from '../../index-uVwdodEf.mjs';
|
|
2
2
|
import 'react';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { an as CascadeContext, C as CriticalPathOptions, D as DAY_MS, i as DependencyError, L as LinkType, q as ScaleTaskSubtreeAnchor, r as ScaleTaskSubtreeErrorCode, s as ScaleTaskSubtreeExternalPolicy, t as ScaleTaskSubtreeOptions, S as ScaleTaskSubtreeResult, u as ScaleTaskSubtreeWarning, ao as ScheduleCommandOptions, ap as ScheduleCommandResult, aq as ScheduleDependency, ar as ScheduleTask, as as ScheduleTaskUpdate, T as Task, at as TaskDependency, V as ValidationResult, au as addBusinessDays, x as alignToWorkingDay, y as areTasksHierarchicallyRelated, z as buildAdjacencyList, E as buildTaskRangeFromEnd, F as buildTaskRangeFromStart, H as calculateSuccessorDate, I as cascadeByLinks, av as cascadeTaskProgress, J as clampTaskRangeForIncomingFS, K as computeCriticalPath, N as computeLagFromDates, O as computeParentDates, P as computeParentProgress, aw as createCascadeContext, Q as detectCycles, U as extendCriticalIdsToParents, X as findParentId, Y as getAllDependencyEdges, Z as getAllDescendants, _ as getBusinessDayOffset, ax as getBusinessDaysCount, $ 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, ay as subtractBusinessDays, al as universalCascade, am as validateDependencies } from '../../index-uVwdodEf.js';
|
|
2
2
|
import 'react';
|
|
@@ -170,6 +170,15 @@ interface TaskActivityTooltipField {
|
|
|
170
170
|
/** Field value — any renderable content (string, badge, icon, JSX) */
|
|
171
171
|
value: ReactNode;
|
|
172
172
|
}
|
|
173
|
+
interface ActivityDependencyHighlight {
|
|
174
|
+
/** All activity bars in the selected chain, scoped by host row. */
|
|
175
|
+
activities: readonly {
|
|
176
|
+
taskId: string;
|
|
177
|
+
activityId: string;
|
|
178
|
+
}[];
|
|
179
|
+
/** Show internal chain edges, optionally also edges entering/leaving the chain. */
|
|
180
|
+
mode?: 'chain' | 'chain-incoming' | 'chain-outgoing' | 'chain-all';
|
|
181
|
+
}
|
|
173
182
|
interface TaskActivityDependency {
|
|
174
183
|
predecessorTaskId: string;
|
|
175
184
|
predecessorActivityId: string;
|
|
@@ -846,4 +855,4 @@ type ScaleTaskSubtreeResult = {
|
|
|
846
855
|
*/
|
|
847
856
|
declare function scaleTaskSubtreeDuration(parentId: string, targetDuration: number, snapshot: Task[], options?: ScaleTaskSubtreeOptions): ScaleTaskSubtreeResult;
|
|
848
857
|
|
|
849
|
-
export {
|
|
858
|
+
export { getChildren as $, type ActivityDependencyHighlight as A, type BuiltInResourceTableColumnId as B, type CriticalPathOptions as C, DAY_MS as D, buildTaskRangeFromEnd as E, buildTaskRangeFromStart as F, type GanttScheduleIntent as G, calculateSuccessorDate as H, cascadeByLinks as I, clampTaskRangeForIncomingFS as J, computeCriticalPath as K, type LinkType as L, type MonthSpan as M, computeLagFromDates as N, computeParentDates as O, computeParentProgress as P, detectCycles as Q, type ResourceTimelineItem as R, type ScaleTaskSubtreeResult as S, type Task as T, extendCriticalIdsToParents as U, type ValidationResult as V, type WeekendBlock as W, findParentId as X, getAllDependencyEdges as Y, getAllDescendants as Z, getBusinessDayOffset as _, type GanttDateRange as a, getDependencyLag as a0, getSuccessorChain as a1, getTaskDuration as a2, getTransitiveCascadeChain as a3, isAncestorTask as a4, isTaskParent as a5, moveTaskRange as a6, moveTaskWithCascade as a7, normalizeDependencyLag as a8, normalizePredecessorDates as a9, normalizeTaskDependencyLags as aa, normalizeUTCDate as ab, parseDateOnly as ac, recalculateIncomingLags as ad, recalculateProjectSchedule as ae, recalculateTaskFromDependencies as af, reflowTasksOnModeSwitch as ag, removeDependenciesBetweenTasks as ah, resizeTaskWithCascade as ai, scaleTaskSubtreeDuration as aj, shiftBusinessDayOffset as ak, universalCascade as al, validateDependencies as am, type CascadeContext as an, type ScheduleCommandOptions as ao, type ScheduleCommandResult as ap, type ScheduleDependency as aq, type ScheduleTask as ar, type ScheduleTaskUpdate as as, type TaskDependency as at, addBusinessDays as au, cascadeTaskProgress as av, createCascadeContext as aw, getBusinessDaysCount as ax, subtractBusinessDays as ay, type TaskActivityDependency as b, type ActivityTooltipContext as c, type TimelineMarker as d, type TaskDateChangeMode as e, type ResourcePlannerChartProps as f, type TaskActivity as g, type ResourceTimelineResource as h, type DependencyError as i, type GanttChartMode as j, type GridConfig as k, type GridLine as l, type ResourceTableColumnId as m, type ResourceTableColumnWidthMap as n, type ResourceTimelineMove as o, type ResourceTimelineResourceMenuCommand as p, type ScaleTaskSubtreeAnchor as q, type ScaleTaskSubtreeErrorCode as r, type ScaleTaskSubtreeExternalPolicy as s, type ScaleTaskSubtreeOptions as t, type ScaleTaskSubtreeWarning as u, type TaskActivityTooltipField as v, type TaskBarGeometry as w, alignToWorkingDay as x, areTasksHierarchicallyRelated as y, buildAdjacencyList as z };
|
|
@@ -170,6 +170,15 @@ interface TaskActivityTooltipField {
|
|
|
170
170
|
/** Field value — any renderable content (string, badge, icon, JSX) */
|
|
171
171
|
value: ReactNode;
|
|
172
172
|
}
|
|
173
|
+
interface ActivityDependencyHighlight {
|
|
174
|
+
/** All activity bars in the selected chain, scoped by host row. */
|
|
175
|
+
activities: readonly {
|
|
176
|
+
taskId: string;
|
|
177
|
+
activityId: string;
|
|
178
|
+
}[];
|
|
179
|
+
/** Show internal chain edges, optionally also edges entering/leaving the chain. */
|
|
180
|
+
mode?: 'chain' | 'chain-incoming' | 'chain-outgoing' | 'chain-all';
|
|
181
|
+
}
|
|
173
182
|
interface TaskActivityDependency {
|
|
174
183
|
predecessorTaskId: string;
|
|
175
184
|
predecessorActivityId: string;
|
|
@@ -846,4 +855,4 @@ type ScaleTaskSubtreeResult = {
|
|
|
846
855
|
*/
|
|
847
856
|
declare function scaleTaskSubtreeDuration(parentId: string, targetDuration: number, snapshot: Task[], options?: ScaleTaskSubtreeOptions): ScaleTaskSubtreeResult;
|
|
848
857
|
|
|
849
|
-
export {
|
|
858
|
+
export { getChildren as $, type ActivityDependencyHighlight as A, type BuiltInResourceTableColumnId as B, type CriticalPathOptions as C, DAY_MS as D, buildTaskRangeFromEnd as E, buildTaskRangeFromStart as F, type GanttScheduleIntent as G, calculateSuccessorDate as H, cascadeByLinks as I, clampTaskRangeForIncomingFS as J, computeCriticalPath as K, type LinkType as L, type MonthSpan as M, computeLagFromDates as N, computeParentDates as O, computeParentProgress as P, detectCycles as Q, type ResourceTimelineItem as R, type ScaleTaskSubtreeResult as S, type Task as T, extendCriticalIdsToParents as U, type ValidationResult as V, type WeekendBlock as W, findParentId as X, getAllDependencyEdges as Y, getAllDescendants as Z, getBusinessDayOffset as _, type GanttDateRange as a, getDependencyLag as a0, getSuccessorChain as a1, getTaskDuration as a2, getTransitiveCascadeChain as a3, isAncestorTask as a4, isTaskParent as a5, moveTaskRange as a6, moveTaskWithCascade as a7, normalizeDependencyLag as a8, normalizePredecessorDates as a9, normalizeTaskDependencyLags as aa, normalizeUTCDate as ab, parseDateOnly as ac, recalculateIncomingLags as ad, recalculateProjectSchedule as ae, recalculateTaskFromDependencies as af, reflowTasksOnModeSwitch as ag, removeDependenciesBetweenTasks as ah, resizeTaskWithCascade as ai, scaleTaskSubtreeDuration as aj, shiftBusinessDayOffset as ak, universalCascade as al, validateDependencies as am, type CascadeContext as an, type ScheduleCommandOptions as ao, type ScheduleCommandResult as ap, type ScheduleDependency as aq, type ScheduleTask as ar, type ScheduleTaskUpdate as as, type TaskDependency as at, addBusinessDays as au, cascadeTaskProgress as av, createCascadeContext as aw, getBusinessDaysCount as ax, subtractBusinessDays as ay, type TaskActivityDependency as b, type ActivityTooltipContext as c, type TimelineMarker as d, type TaskDateChangeMode as e, type ResourcePlannerChartProps as f, type TaskActivity as g, type ResourceTimelineResource as h, type DependencyError as i, type GanttChartMode as j, type GridConfig as k, type GridLine as l, type ResourceTableColumnId as m, type ResourceTableColumnWidthMap as n, type ResourceTimelineMove as o, type ResourceTimelineResourceMenuCommand as p, type ScaleTaskSubtreeAnchor as q, type ScaleTaskSubtreeErrorCode as r, type ScaleTaskSubtreeExternalPolicy as s, type ScaleTaskSubtreeOptions as t, type ScaleTaskSubtreeWarning as u, type TaskActivityTooltipField as v, type TaskBarGeometry as w, alignToWorkingDay as x, areTasksHierarchicallyRelated as y, buildAdjacencyList as z };
|
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
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS,
|
|
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-uVwdodEf.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-uVwdodEf.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -697,6 +697,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
697
697
|
showActivityLinks?: boolean;
|
|
698
698
|
/** Explicit visual activity graph. When provided (including []), replaces implicit consecutive-row activity links. */
|
|
699
699
|
activityDependencies?: readonly TaskActivityDependency[];
|
|
700
|
+
/** Controlled chain selection: internal edges only, with optional incoming/outgoing edges. Undefined shows the whole graph. */
|
|
701
|
+
activityDependencyHighlight?: ActivityDependencyHighlight;
|
|
700
702
|
/** Label the lag («+N») on work links (default: true). */
|
|
701
703
|
showActivityLag?: boolean;
|
|
702
704
|
/** Render extra tooltip content for a work (dates, crew — anything). */
|
|
@@ -1890,4 +1892,4 @@ interface ResourceTimelineLayoutResult<TItem extends ResourceTimelineItem = Reso
|
|
|
1890
1892
|
}
|
|
1891
1893
|
declare const layoutResourceTimelineItems: <TItem extends ResourceTimelineItem = ResourceTimelineItem>(resources: Array<ResourceTimelineResource<TItem>>, options: ResourceTimelineLayoutOptions) => ResourceTimelineLayoutResult<TItem>;
|
|
1892
1894
|
|
|
1893
|
-
export { ACTIVITY_LANES_PADDING, ACTIVITY_LANE_BAR_HEIGHT, ACTIVITY_LANE_STEP, type ActivityChainPushResult, type ActivityChainShift, type ActivityChainTask, type ActivityLanesLayout, type ActivitySegment, type ActivityStartConstraint, ActivityTooltipContext, 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, GanttDateRange, type GanttModeProps, GanttScheduleIntent, GenerationSkeletonRows, type GenerationSkeletonRowsProps, type GenerationSkeletonTaskListLayout, type GenerationSkeletonVariant, GridBackground, Input, type InputProps, MIN_EDGE_ZONE_PX, MIN_MOVE_ZONE_PX, type MonthBlock, type PlanFactCellCommitContext, type PlanFactCellKind, PlanFactMatrix, type PlanFactModeProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type ReorderDropPlacement, type ReorderDropTarget, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, ScaleTaskSubtreeResult, TableMatrix, type TableMatrixCellClickContext, type TableMatrixColumn, type TableMatrixColumnGroup, type TableMatrixDateOverlay, type TableMatrixModeProps, type Task, TaskActivity$1 as TaskActivity, TaskActivityDependency, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListColumnWidthMap, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TimelineMarker, TodayIndicator, ValidationResult, type VisibleReorderPlan, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, activityBounds, activityChainMinStartDelta, activityLanesExtraHeight, activitySpanMs, activityStartConstraint, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, computeActivityLanes, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDateRangeDays, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getTodayLocalUtcDate, getVisibleReorderPlan, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, packIntervals, parseUTCDate, pixelsToDate, progressInRange, pushActivityChain, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, shiftActivityChain, shiftActivityDate, subtractBusinessDays, useTaskDrag, withoutDeps };
|
|
1895
|
+
export { ACTIVITY_LANES_PADDING, ACTIVITY_LANE_BAR_HEIGHT, ACTIVITY_LANE_STEP, type ActivityChainPushResult, type ActivityChainShift, type ActivityChainTask, ActivityDependencyHighlight, type ActivityLanesLayout, type ActivitySegment, type ActivityStartConstraint, ActivityTooltipContext, 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, GanttDateRange, type GanttModeProps, GanttScheduleIntent, GenerationSkeletonRows, type GenerationSkeletonRowsProps, type GenerationSkeletonTaskListLayout, type GenerationSkeletonVariant, GridBackground, Input, type InputProps, MIN_EDGE_ZONE_PX, MIN_MOVE_ZONE_PX, type MonthBlock, type PlanFactCellCommitContext, type PlanFactCellKind, PlanFactMatrix, type PlanFactModeProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type ReorderDropPlacement, type ReorderDropTarget, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, ScaleTaskSubtreeResult, TableMatrix, type TableMatrixCellClickContext, type TableMatrixColumn, type TableMatrixColumnGroup, type TableMatrixDateOverlay, type TableMatrixModeProps, type Task, TaskActivity$1 as TaskActivity, TaskActivityDependency, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListColumnWidthMap, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TimelineMarker, TodayIndicator, ValidationResult, type VisibleReorderPlan, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, activityBounds, activityChainMinStartDelta, activityLanesExtraHeight, activitySpanMs, activityStartConstraint, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, computeActivityLanes, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDateRangeDays, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getTodayLocalUtcDate, getVisibleReorderPlan, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, packIntervals, parseUTCDate, pixelsToDate, progressInRange, pushActivityChain, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, shiftActivityChain, shiftActivityDate, 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, G as GanttScheduleIntent, V as ValidationResult, a as GanttDateRange, b as TaskActivityDependency, A as
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, C as CriticalPathOptions, D as DAY_MS,
|
|
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-uVwdodEf.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-uVwdodEf.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -697,6 +697,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
697
697
|
showActivityLinks?: boolean;
|
|
698
698
|
/** Explicit visual activity graph. When provided (including []), replaces implicit consecutive-row activity links. */
|
|
699
699
|
activityDependencies?: readonly TaskActivityDependency[];
|
|
700
|
+
/** Controlled chain selection: internal edges only, with optional incoming/outgoing edges. Undefined shows the whole graph. */
|
|
701
|
+
activityDependencyHighlight?: ActivityDependencyHighlight;
|
|
700
702
|
/** Label the lag («+N») on work links (default: true). */
|
|
701
703
|
showActivityLag?: boolean;
|
|
702
704
|
/** Render extra tooltip content for a work (dates, crew — anything). */
|
|
@@ -1890,4 +1892,4 @@ interface ResourceTimelineLayoutResult<TItem extends ResourceTimelineItem = Reso
|
|
|
1890
1892
|
}
|
|
1891
1893
|
declare const layoutResourceTimelineItems: <TItem extends ResourceTimelineItem = ResourceTimelineItem>(resources: Array<ResourceTimelineResource<TItem>>, options: ResourceTimelineLayoutOptions) => ResourceTimelineLayoutResult<TItem>;
|
|
1892
1894
|
|
|
1893
|
-
export { ACTIVITY_LANES_PADDING, ACTIVITY_LANE_BAR_HEIGHT, ACTIVITY_LANE_STEP, type ActivityChainPushResult, type ActivityChainShift, type ActivityChainTask, type ActivityLanesLayout, type ActivitySegment, type ActivityStartConstraint, ActivityTooltipContext, 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, GanttDateRange, type GanttModeProps, GanttScheduleIntent, GenerationSkeletonRows, type GenerationSkeletonRowsProps, type GenerationSkeletonTaskListLayout, type GenerationSkeletonVariant, GridBackground, Input, type InputProps, MIN_EDGE_ZONE_PX, MIN_MOVE_ZONE_PX, type MonthBlock, type PlanFactCellCommitContext, type PlanFactCellKind, PlanFactMatrix, type PlanFactModeProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type ReorderDropPlacement, type ReorderDropTarget, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, ScaleTaskSubtreeResult, TableMatrix, type TableMatrixCellClickContext, type TableMatrixColumn, type TableMatrixColumnGroup, type TableMatrixDateOverlay, type TableMatrixModeProps, type Task, TaskActivity$1 as TaskActivity, TaskActivityDependency, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListColumnWidthMap, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TimelineMarker, TodayIndicator, ValidationResult, type VisibleReorderPlan, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, activityBounds, activityChainMinStartDelta, activityLanesExtraHeight, activitySpanMs, activityStartConstraint, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, computeActivityLanes, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDateRangeDays, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getTodayLocalUtcDate, getVisibleReorderPlan, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, packIntervals, parseUTCDate, pixelsToDate, progressInRange, pushActivityChain, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, shiftActivityChain, shiftActivityDate, subtractBusinessDays, useTaskDrag, withoutDeps };
|
|
1895
|
+
export { ACTIVITY_LANES_PADDING, ACTIVITY_LANE_BAR_HEIGHT, ACTIVITY_LANE_STEP, type ActivityChainPushResult, type ActivityChainShift, type ActivityChainTask, ActivityDependencyHighlight, type ActivityLanesLayout, type ActivitySegment, type ActivityStartConstraint, ActivityTooltipContext, 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, GanttDateRange, type GanttModeProps, GanttScheduleIntent, GenerationSkeletonRows, type GenerationSkeletonRowsProps, type GenerationSkeletonTaskListLayout, type GenerationSkeletonVariant, GridBackground, Input, type InputProps, MIN_EDGE_ZONE_PX, MIN_MOVE_ZONE_PX, type MonthBlock, type PlanFactCellCommitContext, type PlanFactCellKind, PlanFactMatrix, type PlanFactModeProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type ReorderDropPlacement, type ReorderDropTarget, ResourcePlannerChartProps, ResourceTimelineChart, type ResourceTimelineConflictRange, ResourceTimelineItem, type ResourceTimelineLayoutDiagnostic, type ResourceTimelineLayoutItem, type ResourceTimelineLayoutOptions, type ResourceTimelineLayoutResult, type ResourceTimelineLayoutRow, ResourceTimelineResource, ScaleTaskSubtreeResult, TableMatrix, type TableMatrixCellClickContext, type TableMatrixColumn, type TableMatrixColumnGroup, type TableMatrixDateOverlay, type TableMatrixModeProps, type Task, TaskActivity$1 as TaskActivity, TaskActivityDependency, TaskDateChangeMode, type TaskDependency, TaskList, type TaskListColumn, type TaskListColumnContext, type TaskListColumnId, type TaskListColumnWidthMap, type TaskListMenuCommand, type TaskListProps, type TaskPredicate, TaskRow, TimeScaleHeader, TimelineMarker, TodayIndicator, ValidationResult, type VisibleReorderPlan, type VisibleReorderPosition, type WeekBlock, type WeekSpan, type WithoutDepsOptions, type YearSpan, activityBounds, activityChainMinStartDelta, activityLanesExtraHeight, activitySpanMs, activityStartConstraint, addBusinessDays, and, calculateBezierPath, calculateDependencyPath, calculateGridLines, calculateGridWidth, calculateMilestoneConnectionBounds, calculateMilestoneGeometry, calculateMonthGridLines, calculateOrthogonalPath, calculateTaskBar, calculateWeekGridLines, calculateWeekendBlocks, clampDateRangeForIncomingFS, computeActivityLanes, createCustomDayPredicate, createDateKey, detectEdgeZone, expired, flattenHierarchy, formatDateLabel, formatDateRangeLabel, getBusinessDaysCount, getCursorForPosition, getDateRangeDays, getDayOffset, getMonthBlocks, getMonthDays, getMonthSpans, getMultiMonthDays, getTodayLocalUtcDate, getVisibleReorderPlan, getVisibleReorderPosition, getWeekBlocks, getWeekSpans, getYearSpans, inDateRange, isTaskExpired, isToday, isWeekend, layoutResourceTimelineItems, nameContains, normalizeHierarchyTasks, normalizeTaskDates, not, or, packIntervals, parseUTCDate, pixelsToDate, progressInRange, pushActivityChain, resolveDateRangeFromPixels, resolveTaskHorizontalGeometry, shiftActivityChain, shiftActivityDate, subtractBusinessDays, useTaskDrag, withoutDeps };
|
package/dist/index.js
CHANGED
|
@@ -6603,7 +6603,17 @@ function ActivityDependencyLines(props) {
|
|
|
6603
6603
|
const flattened = [], rendered = [], tops = [], heights = [];
|
|
6604
6604
|
const indices = /* @__PURE__ */ new Map();
|
|
6605
6605
|
const incoming = /* @__PURE__ */ new Map();
|
|
6606
|
+
const selected = props.highlight ? new Set(props.highlight.activities.map((activity) => activityKey(activity.taskId, activity.activityId))) : void 0;
|
|
6607
|
+
const highlightMode = props.highlight?.mode ?? "chain";
|
|
6606
6608
|
for (const edge of dependencies) {
|
|
6609
|
+
if (selected) {
|
|
6610
|
+
const fromSelected = selected.has(activityKey(edge.predecessorTaskId, edge.predecessorActivityId));
|
|
6611
|
+
const toSelected = selected.has(activityKey(edge.successorTaskId, edge.successorActivityId));
|
|
6612
|
+
const internal = fromSelected && toSelected;
|
|
6613
|
+
const incoming2 = !fromSelected && toSelected && (highlightMode === "chain-incoming" || highlightMode === "chain-all");
|
|
6614
|
+
const outgoing = fromSelected && !toSelected && (highlightMode === "chain-outgoing" || highlightMode === "chain-all");
|
|
6615
|
+
if (!internal && !incoming2 && !outgoing) continue;
|
|
6616
|
+
}
|
|
6607
6617
|
const id = activityKey(edge.successorTaskId, edge.successorActivityId);
|
|
6608
6618
|
const values = incoming.get(id) ?? [];
|
|
6609
6619
|
values.push({ taskId: activityKey(edge.predecessorTaskId, edge.predecessorActivityId), type: edge.type, lag: edge.lag });
|
|
@@ -6630,7 +6640,7 @@ function ActivityDependencyLines(props) {
|
|
|
6630
6640
|
}
|
|
6631
6641
|
}
|
|
6632
6642
|
return { flattened, rendered, indices, tops, heights };
|
|
6633
|
-
}, [tasks, dependencies, monthStart, dayWidth, props.rowIndexByTaskId, props.rowTops, props.rowHeights, props.rowHeight, props.renderedTaskIds, previewStore, previewVersion]);
|
|
6643
|
+
}, [tasks, dependencies, props.highlight, monthStart, dayWidth, props.rowIndexByTaskId, props.rowTops, props.rowHeights, props.rowHeight, props.renderedTaskIds, previewStore, previewVersion]);
|
|
6634
6644
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DependencyLines, { tasks: layout.rendered, allTasks: layout.flattened, monthStart, dayWidth, rowHeight: ACTIVITY_LANE_BAR_HEIGHT, gridWidth: props.gridWidth, totalHeight: props.totalHeight, rowIndexByTaskId: layout.indices, rowTops: layout.tops, rowHeights: layout.heights, horizontalWindow: props.horizontalWindow, showLag: props.showLag, activityEndpoints: true });
|
|
6635
6645
|
}
|
|
6636
6646
|
|
|
@@ -15506,6 +15516,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15506
15516
|
activityActivationMode = "none",
|
|
15507
15517
|
showActivityLinks = true,
|
|
15508
15518
|
activityDependencies,
|
|
15519
|
+
activityDependencyHighlight,
|
|
15509
15520
|
showActivityLag = true,
|
|
15510
15521
|
activityTooltip,
|
|
15511
15522
|
timelineMarkers,
|
|
@@ -16995,7 +17006,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16995
17006
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
16996
17007
|
}
|
|
16997
17008
|
),
|
|
16998
|
-
showActivityLinks && activityDependencies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ActivityDependencyLines, { tasks: visibleTasks, renderedTaskIds: renderedTaskIdsRef.current, dependencies: activityDependencies, monthStart, dayWidth, rowHeight: effectiveRowHeight, gridWidth: renderGridWidth, totalHeight: totalGridHeight, rowIndexByTaskId: visibleTaskIndexMap, rowTops: compositeRowLayout.tops, rowHeights: compositeRowLayout.heights, showLag: showActivityLag, previewStore: activityPreviewStore, horizontalWindow }),
|
|
17009
|
+
showActivityLinks && activityDependencies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ActivityDependencyLines, { tasks: visibleTasks, renderedTaskIds: renderedTaskIdsRef.current, dependencies: activityDependencies, highlight: activityDependencyHighlight, monthStart, dayWidth, rowHeight: effectiveRowHeight, gridWidth: renderGridWidth, totalHeight: totalGridHeight, rowIndexByTaskId: visibleTaskIndexMap, rowTops: compositeRowLayout.tops, rowHeights: compositeRowLayout.heights, showLag: showActivityLag, previewStore: activityPreviewStore, horizontalWindow }),
|
|
16999
17010
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
17000
17011
|
DependencyLines_default,
|
|
17001
17012
|
{
|