gantt-lib 0.124.1 → 0.124.2

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
@@ -1004,6 +1004,10 @@ interface TaskListProps {
1004
1004
  filteredTaskIds?: Set<string>;
1005
1005
  /** Whether filter is currently active (needed to distinguish "no filter" from "filter with no matches") */
1006
1006
  isFilterActive?: boolean;
1007
+ /** Critical path display mode. In 'hide' mode only critical tasks (and their parents) are shown. */
1008
+ criticalPathMode?: 'highlight' | 'hide';
1009
+ /** Task IDs that belong to the critical path (leaves + lifted parents). Used when criticalPathMode === 'hide'. */
1010
+ criticalTaskIds?: Set<string>;
1007
1011
  /** Additional columns to display after built-in columns */
1008
1012
  additionalColumns?: TaskListColumn<any>[];
1009
1013
  /** Built-in or custom TaskList column IDs to hide after column placement is resolved */
package/dist/index.d.ts CHANGED
@@ -1004,6 +1004,10 @@ interface TaskListProps {
1004
1004
  filteredTaskIds?: Set<string>;
1005
1005
  /** Whether filter is currently active (needed to distinguish "no filter" from "filter with no matches") */
1006
1006
  isFilterActive?: boolean;
1007
+ /** Critical path display mode. In 'hide' mode only critical tasks (and their parents) are shown. */
1008
+ criticalPathMode?: 'highlight' | 'hide';
1009
+ /** Task IDs that belong to the critical path (leaves + lifted parents). Used when criticalPathMode === 'hide'. */
1010
+ criticalTaskIds?: Set<string>;
1007
1011
  /** Additional columns to display after built-in columns */
1008
1012
  additionalColumns?: TaskListColumn<any>[];
1009
1013
  /** Built-in or custom TaskList column IDs to hide after column placement is resolved */
package/dist/index.js CHANGED
@@ -7703,6 +7703,8 @@ var TaskList = ({
7703
7703
  filterMode = "highlight",
7704
7704
  filteredTaskIds = /* @__PURE__ */ new Set(),
7705
7705
  isFilterActive = false,
7706
+ criticalPathMode,
7707
+ criticalTaskIds,
7706
7708
  additionalColumns,
7707
7709
  hiddenTaskListColumns,
7708
7710
  taskListColumnWidths,
@@ -7763,8 +7765,11 @@ var TaskList = ({
7763
7765
  if (filterMode === "hide" && isFilterActive) {
7764
7766
  tasks2 = tasks2.filter((task) => filteredTaskIds.has(task.id));
7765
7767
  }
7768
+ if (criticalPathMode === "hide" && criticalTaskIds) {
7769
+ tasks2 = tasks2.filter((task) => criticalTaskIds.has(task.id));
7770
+ }
7766
7771
  return tasks2;
7767
- }, [orderedTasks, collapsedParentIds, filterMode, filteredTaskIds, isFilterActive]);
7772
+ }, [orderedTasks, collapsedParentIds, filterMode, filteredTaskIds, isFilterActive, criticalPathMode, criticalTaskIds]);
7768
7773
  const totalHeight = (0, import_react13.useMemo)(
7769
7774
  () => visibleTasks.length * rowHeight,
7770
7775
  [visibleTasks.length, rowHeight]
@@ -13765,6 +13770,8 @@ function TaskGanttChartInner(props, ref) {
13765
13770
  filterMode,
13766
13771
  filteredTaskIds: matchedTaskIds,
13767
13772
  isFilterActive: !!taskFilter,
13773
+ criticalPathMode,
13774
+ criticalTaskIds: criticalPathMode === "hide" ? criticalTaskIds : void 0,
13768
13775
  additionalColumns,
13769
13776
  hiddenTaskListColumns,
13770
13777
  taskListColumnWidths,