gantt-lib 0.139.0 → 0.141.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 +13 -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-C7mf06-7.d.mts} +12 -1
- package/dist/{index-BfFHn43h.d.ts → index-C7mf06-7.d.ts} +12 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6158,6 +6158,7 @@ var DependencyLines = React6.memo(({
|
|
|
6158
6158
|
continue;
|
|
6159
6159
|
}
|
|
6160
6160
|
for (const dependency of successorTaskForEdges.dependencies) {
|
|
6161
|
+
if (dependency.hidden) continue;
|
|
6161
6162
|
if (!taskPositions.has(dependency.taskId)) {
|
|
6162
6163
|
continue;
|
|
6163
6164
|
}
|
|
@@ -6440,7 +6441,17 @@ function ActivityDependencyLines(props) {
|
|
|
6440
6441
|
const flattened = [], rendered = [], tops = [], heights = [];
|
|
6441
6442
|
const indices = /* @__PURE__ */ new Map();
|
|
6442
6443
|
const incoming = /* @__PURE__ */ new Map();
|
|
6444
|
+
const selected = props.highlight ? new Set(props.highlight.activities.map((activity) => activityKey(activity.taskId, activity.activityId))) : void 0;
|
|
6445
|
+
const highlightMode = props.highlight?.mode ?? "chain";
|
|
6443
6446
|
for (const edge of dependencies) {
|
|
6447
|
+
if (selected) {
|
|
6448
|
+
const fromSelected = selected.has(activityKey(edge.predecessorTaskId, edge.predecessorActivityId));
|
|
6449
|
+
const toSelected = selected.has(activityKey(edge.successorTaskId, edge.successorActivityId));
|
|
6450
|
+
const internal = fromSelected && toSelected;
|
|
6451
|
+
const incoming2 = !fromSelected && toSelected && (highlightMode === "chain-incoming" || highlightMode === "chain-all");
|
|
6452
|
+
const outgoing = fromSelected && !toSelected && (highlightMode === "chain-outgoing" || highlightMode === "chain-all");
|
|
6453
|
+
if (!internal && !incoming2 && !outgoing) continue;
|
|
6454
|
+
}
|
|
6444
6455
|
const id = activityKey(edge.successorTaskId, edge.successorActivityId);
|
|
6445
6456
|
const values = incoming.get(id) ?? [];
|
|
6446
6457
|
values.push({ taskId: activityKey(edge.predecessorTaskId, edge.predecessorActivityId), type: edge.type, lag: edge.lag });
|
|
@@ -6467,7 +6478,7 @@ function ActivityDependencyLines(props) {
|
|
|
6467
6478
|
}
|
|
6468
6479
|
}
|
|
6469
6480
|
return { flattened, rendered, indices, tops, heights };
|
|
6470
|
-
}, [tasks, dependencies, monthStart, dayWidth, props.rowIndexByTaskId, props.rowTops, props.rowHeights, props.rowHeight, props.renderedTaskIds, previewStore, previewVersion]);
|
|
6481
|
+
}, [tasks, dependencies, props.highlight, monthStart, dayWidth, props.rowIndexByTaskId, props.rowTops, props.rowHeights, props.rowHeight, props.renderedTaskIds, previewStore, previewVersion]);
|
|
6471
6482
|
return /* @__PURE__ */ jsx8(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 });
|
|
6472
6483
|
}
|
|
6473
6484
|
|
|
@@ -8077,7 +8088,7 @@ var TaskListRow = React11.memo(
|
|
|
8077
8088
|
const [highlightedDependencyIndex, setHighlightedDependencyIndex] = useState6(0);
|
|
8078
8089
|
const chips = useMemo9(() => {
|
|
8079
8090
|
const taskById = new Map((allTasks ?? []).map((t) => [t.id, t]));
|
|
8080
|
-
return (task.dependencies ?? []).map((dep) => {
|
|
8091
|
+
return (task.dependencies ?? []).filter((dep) => !dep.hidden).map((dep) => {
|
|
8081
8092
|
const pred = taskById.get(dep.taskId);
|
|
8082
8093
|
const lag = getDependencyLag(dep);
|
|
8083
8094
|
return { dep, lag, predecessorName: pred?.name ?? dep.taskId };
|
|
@@ -15367,6 +15378,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15367
15378
|
activityActivationMode = "none",
|
|
15368
15379
|
showActivityLinks = true,
|
|
15369
15380
|
activityDependencies,
|
|
15381
|
+
activityDependencyHighlight,
|
|
15370
15382
|
showActivityLag = true,
|
|
15371
15383
|
activityTooltip,
|
|
15372
15384
|
timelineMarkers,
|
|
@@ -16856,7 +16868,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16856
16868
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
16857
16869
|
}
|
|
16858
16870
|
),
|
|
16859
|
-
showActivityLinks && activityDependencies !== void 0 && /* @__PURE__ */ jsx22(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 }),
|
|
16871
|
+
showActivityLinks && activityDependencies !== void 0 && /* @__PURE__ */ jsx22(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 }),
|
|
16860
16872
|
/* @__PURE__ */ jsx22(
|
|
16861
16873
|
DependencyLines_default,
|
|
16862
16874
|
{
|