gantt-lib 0.141.3 → 0.142.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/dist/index.mjs CHANGED
@@ -5250,53 +5250,6 @@ var TaskRow = React2.memo(
5250
5250
  }
5251
5251
  return { left: segment.left, width: segment.width + activityDrag.dayDelta * dayWidth };
5252
5252
  };
5253
- const activityLinks = useMemo2(() => {
5254
- const gaps = [];
5255
- const elbows = [];
5256
- if (!showActivityLinks || !renderActivities || !activityLayout) return { gaps, elbows };
5257
- const activities = task.activities ?? [];
5258
- const segmentById = new Map(activityLayout.segments.map((segment) => [segment.id, segment]));
5259
- const visibleIds = new Set(visibleActivitySegments.map((segment) => segment.id));
5260
- const laneTopY = (lane) => activityTopOffset + lane * ACTIVITY_LANE_STEP + (ACTIVITY_LANE_STEP - ACTIVITY_LANE_BAR_HEIGHT) / 2;
5261
- const liveRect = (segment) => {
5262
- const geometry = liveActivityGeometry(segment);
5263
- const chainDelta = activityOverrides?.get(segment.id) ?? 0;
5264
- const left2 = geometry.left + (chainDelta !== 0 ? chainDelta * dayWidth : 0);
5265
- return { left: left2, right: left2 + geometry.width };
5266
- };
5267
- for (let index = 0; index < activities.length - 1; index += 1) {
5268
- const predecessor = segmentById.get(activities[index].id);
5269
- const successor = segmentById.get(activities[index + 1].id);
5270
- if (!predecessor || !successor) continue;
5271
- if (!visibleIds.has(predecessor.id) || !visibleIds.has(successor.id)) continue;
5272
- const lag = activities[index + 1].lag ?? 0;
5273
- const predRect = liveRect(predecessor);
5274
- const succRect = liveRect(successor);
5275
- if (predecessor.lane === successor.lane && succRect.left >= predRect.right) {
5276
- const width2 = succRect.left - predRect.right;
5277
- if (width2 >= 1) {
5278
- gaps.push({ key: `${predecessor.id}->${successor.id}`, left: predRect.right, width: width2, lane: predecessor.lane, lag });
5279
- }
5280
- continue;
5281
- }
5282
- const predecessorLaneTop = laneTopY(predecessor.lane);
5283
- const successorLaneTop = laneTopY(successor.lane);
5284
- const sameLane = predecessor.lane === successor.lane;
5285
- const reverseOrder = !sameLane && successorLaneTop < predecessorLaneTop;
5286
- const fromY = reverseOrder ? predecessorLaneTop + 6 : predecessorLaneTop + ACTIVITY_LANE_BAR_HEIGHT - 6;
5287
- const toY = reverseOrder ? successorLaneTop + ACTIVITY_LANE_BAR_HEIGHT - 6 : successorLaneTop + (sameLane ? ACTIVITY_LANE_STEP : 0) + 6;
5288
- const fromX = predRect.right;
5289
- const toX = succRect.left;
5290
- elbows.push({
5291
- key: `${predecessor.id}->${successor.id}`,
5292
- d: calculateDependencyPath({ x: fromX, y: fromY }, { x: toX, y: toY }, false),
5293
- lagX: toX - 14,
5294
- lagY: reverseOrder ? fromY - 4 : fromY + 12,
5295
- lag
5296
- });
5297
- }
5298
- return { gaps, elbows };
5299
- }, [showActivityLinks, renderActivities, activityLayout, visibleActivitySegments, activityTopOffset, activityOverrides, activityDrag, dayWidth, task.activities]);
5300
5253
  const activityTipData = useMemo2(() => {
5301
5254
  if (!activityTipId || !task.activities) return null;
5302
5255
  const activity = task.activities.find((item) => item.id === activityTipId);
@@ -5368,121 +5321,72 @@ var TaskRow = React2.memo(
5368
5321
  }
5369
5322
  }
5370
5323
  ),
5371
- renderActivities && activityLayout && /* @__PURE__ */ jsxs2("div", { className: "gantt-tr-activityLanes", children: [
5372
- activityLinks.elbows.length > 0 && /* @__PURE__ */ jsxs2("svg", { className: "gantt-tr-activityLinksSvg", width: "100%", height: "100%", "aria-hidden": "true", children: [
5373
- /* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsx2("marker", { id: "arrowhead", markerWidth: "8", markerHeight: "6", markerUnits: "userSpaceOnUse", refX: "7", refY: "3", orient: "auto", children: /* @__PURE__ */ jsx2("polygon", { points: "0 0, 8 3, 0 6", fill: "var(--gantt-dependency-line-color, #666666)" }) }) }),
5374
- activityLinks.elbows.map((link) => /* @__PURE__ */ jsxs2("g", { children: [
5375
- /* @__PURE__ */ jsx2("path", { className: "gantt-dependency-path", d: link.d, markerEnd: "url(#arrowhead)" }),
5376
- showActivityLag && link.lag !== 0 && /* @__PURE__ */ jsx2(
5377
- "text",
5378
- {
5379
- className: "gantt-dependency-lag-label",
5380
- x: link.lagX,
5381
- y: link.lagY,
5382
- textAnchor: "middle",
5383
- fontSize: "10",
5384
- fill: "var(--gantt-dependency-line-color, #666666)",
5385
- children: link.lag > 0 ? `+${link.lag}` : `${link.lag}`
5324
+ renderActivities && activityLayout && /* @__PURE__ */ jsx2("div", { className: "gantt-tr-activityLanes", children: visibleActivitySegments.map((segment) => {
5325
+ const live = liveActivityGeometry(segment);
5326
+ const chainDelta = activityOverrides?.get(segment.id) ?? 0;
5327
+ const activityProgress = segment.progress === void 0 ? 0 : Math.min(100, Math.max(0, Math.round(segment.progress)));
5328
+ const liveLeft = live.left + (chainDelta !== 0 ? chainDelta * dayWidth : 0);
5329
+ const isDraggingActivity = activityDrag?.id === segment.id;
5330
+ const isBlockingActivity = blockedActivityIds?.has(segment.id) ?? false;
5331
+ const isAtLimit = isDraggingActivity && activityBlockedBy !== null;
5332
+ const isActiveActivity = activationVisualEnabled && activeActivityKey === activityOwnerKey(task.id, segment.id);
5333
+ const isSameWorkType = activeWork !== null && (segment.id === activeWork.id || activeWork.name !== null && segment.name === activeWork.name);
5334
+ const isDimmed = dimOthers && activeWork !== null && !isSameWorkType;
5335
+ const isChainHighlighted = highlightChain && activeWork !== null && isSameWorkType;
5336
+ return /* @__PURE__ */ jsxs2(
5337
+ "div",
5338
+ {
5339
+ "data-activity-id": segment.id,
5340
+ className: `gantt-tr-activityBar${isDraggingActivity ? " gantt-tr-activityBar-dragging" : ""}${isBlockingActivity ? " gantt-tr-activityBar-blocking" : ""}${isAtLimit ? " gantt-tr-activityBar-atLimit" : ""}${isActiveActivity ? " gantt-tr-activityBar-active" : ""}${isDimmed ? " gantt-tr-activityBar-dimmed" : ""}${isChainHighlighted ? " gantt-tr-activityBar-chain" : ""}${activityDragEnabled ? "" : " gantt-tr-activityBar-locked"}`,
5341
+ style: {
5342
+ left: `${liveLeft}px`,
5343
+ width: `${live.width}px`,
5344
+ top: `${activityTopOffset + segment.lane * ACTIVITY_LANE_STEP + (ACTIVITY_LANE_STEP - ACTIVITY_LANE_BAR_HEIGHT) / 2}px`,
5345
+ height: `${ACTIVITY_LANE_BAR_HEIGHT}px`,
5346
+ backgroundColor: segment.color || "var(--gantt-task-bar-default-color)"
5347
+ },
5348
+ onMouseDown: (event) => {
5349
+ if (!activityDragEnabled) return;
5350
+ const activationKey = activityOwnerKey(task.id, segment.id);
5351
+ const isActive = activityActivationStore?.getActiveKey() === activationKey;
5352
+ if (activationVisualEnabled && !isActive) {
5353
+ activityActivationStore?.setActiveKey(activationKey);
5386
5354
  }
5387
- )
5388
- ] }, link.key))
5389
- ] }),
5390
- visibleActivitySegments.map((segment) => {
5391
- const live = liveActivityGeometry(segment);
5392
- const chainDelta = activityOverrides?.get(segment.id) ?? 0;
5393
- const activityProgress = segment.progress === void 0 ? 0 : Math.min(100, Math.max(0, Math.round(segment.progress)));
5394
- const liveLeft = live.left + (chainDelta !== 0 ? chainDelta * dayWidth : 0);
5395
- const isDraggingActivity = activityDrag?.id === segment.id;
5396
- const isBlockingActivity = blockedActivityIds?.has(segment.id) ?? false;
5397
- const isAtLimit = isDraggingActivity && activityBlockedBy !== null;
5398
- const isActiveActivity = activationVisualEnabled && activeActivityKey === activityOwnerKey(task.id, segment.id);
5399
- const isSameWorkType = activeWork !== null && (segment.id === activeWork.id || activeWork.name !== null && segment.name === activeWork.name);
5400
- const isDimmed = dimOthers && activeWork !== null && !isSameWorkType;
5401
- const isChainHighlighted = highlightChain && activeWork !== null && isSameWorkType;
5402
- return /* @__PURE__ */ jsxs2(
5403
- "div",
5404
- {
5405
- "data-activity-id": segment.id,
5406
- className: `gantt-tr-activityBar${isDraggingActivity ? " gantt-tr-activityBar-dragging" : ""}${isBlockingActivity ? " gantt-tr-activityBar-blocking" : ""}${isAtLimit ? " gantt-tr-activityBar-atLimit" : ""}${isActiveActivity ? " gantt-tr-activityBar-active" : ""}${isDimmed ? " gantt-tr-activityBar-dimmed" : ""}${isChainHighlighted ? " gantt-tr-activityBar-chain" : ""}${activityDragEnabled ? "" : " gantt-tr-activityBar-locked"}`,
5407
- style: {
5408
- left: `${liveLeft}px`,
5409
- width: `${live.width}px`,
5410
- top: `${activityTopOffset + segment.lane * ACTIVITY_LANE_STEP + (ACTIVITY_LANE_STEP - ACTIVITY_LANE_BAR_HEIGHT) / 2}px`,
5411
- height: `${ACTIVITY_LANE_BAR_HEIGHT}px`,
5412
- backgroundColor: segment.color || "var(--gantt-task-bar-default-color)"
5413
- },
5414
- onMouseDown: (event) => {
5415
- if (!activityDragEnabled) return;
5416
- const activationKey = activityOwnerKey(task.id, segment.id);
5417
- const isActive = activityActivationStore?.getActiveKey() === activationKey;
5418
- if (activationVisualEnabled && !isActive) {
5419
- activityActivationStore?.setActiveKey(activationKey);
5420
- }
5421
- if (activityClickToDrag && !isActive) return;
5422
- const target = event.target;
5423
- const mode = target.closest(".gantt-tr-resizeHandleLeft") ? "resize-left" : target.closest(".gantt-tr-resizeHandleRight") ? "resize-right" : "move";
5424
- handleActivityPointerDown(segment, mode)(event);
5425
- },
5426
- onMouseEnter: (event) => {
5427
- if (activityDrag || activityDragOwner?.get()) return;
5428
- setActivityTipPosition(anchorActivityTip(event.currentTarget.getBoundingClientRect()));
5429
- setActivityTipId(segment.id);
5430
- },
5431
- onMouseLeave: () => {
5432
- if (!activityDrag) {
5433
- setActivityTipId((current) => current === segment.id ? null : current);
5434
- activityTipAnchor.current = null;
5435
- setActivityTipPosition(null);
5436
- }
5437
- },
5438
- children: [
5439
- activityProgress > 0 && /* @__PURE__ */ jsx2(
5440
- "span",
5441
- {
5442
- className: "gantt-tr-activityProgress",
5443
- style: { width: `${activityProgress}%` }
5444
- }
5445
- ),
5446
- /* @__PURE__ */ jsx2("span", { className: "gantt-tr-activityName", style: { color: activityTextColor(segment.color) }, children: segment.name }),
5447
- activityDragEnabled && /* @__PURE__ */ jsxs2(Fragment, { children: [
5448
- /* @__PURE__ */ jsx2("div", { className: "gantt-tr-resizeHandle gantt-tr-resizeHandleLeft" }),
5449
- /* @__PURE__ */ jsx2("div", { className: "gantt-tr-resizeHandle gantt-tr-resizeHandleRight" })
5450
- ] })
5451
- ]
5355
+ if (activityClickToDrag && !isActive) return;
5356
+ const target = event.target;
5357
+ const mode = target.closest(".gantt-tr-resizeHandleLeft") ? "resize-left" : target.closest(".gantt-tr-resizeHandleRight") ? "resize-right" : "move";
5358
+ handleActivityPointerDown(segment, mode)(event);
5452
5359
  },
5453
- segment.id
5454
- );
5455
- }),
5456
- activityLinks.gaps.map((gap) => /* @__PURE__ */ jsxs2(React2.Fragment, { children: [
5457
- /* @__PURE__ */ jsx2(
5458
- "span",
5459
- {
5460
- className: "gantt-tr-activityLink",
5461
- "aria-hidden": "true",
5462
- style: {
5463
- left: `${gap.left}px`,
5464
- width: `${gap.width}px`,
5465
- top: `${activityTopOffset + gap.lane * ACTIVITY_LANE_STEP + ACTIVITY_LANE_STEP / 2}px`
5360
+ onMouseEnter: (event) => {
5361
+ if (activityDrag || activityDragOwner?.get()) return;
5362
+ setActivityTipPosition(anchorActivityTip(event.currentTarget.getBoundingClientRect()));
5363
+ setActivityTipId(segment.id);
5364
+ },
5365
+ onMouseLeave: () => {
5366
+ if (!activityDrag) {
5367
+ setActivityTipId((current) => current === segment.id ? null : current);
5368
+ activityTipAnchor.current = null;
5369
+ setActivityTipPosition(null);
5466
5370
  }
5467
- }
5468
- ),
5469
- showActivityLag && gap.lag > 0 && /* @__PURE__ */ jsxs2(
5470
- "span",
5471
- {
5472
- className: "gantt-tr-activityLag",
5473
- title: `\u0417\u0430\u0437\u043E\u0440 ${gap.lag} \u0434`,
5474
- style: {
5475
- left: `${gap.left + gap.width - 14}px`,
5476
- top: `${activityTopOffset + gap.lane * ACTIVITY_LANE_STEP + ACTIVITY_LANE_STEP / 2}px`
5477
- },
5478
- children: [
5479
- "+",
5480
- gap.lag
5481
- ]
5482
- }
5483
- )
5484
- ] }, gap.key))
5485
- ] }),
5371
+ },
5372
+ children: [
5373
+ activityProgress > 0 && /* @__PURE__ */ jsx2(
5374
+ "span",
5375
+ {
5376
+ className: "gantt-tr-activityProgress",
5377
+ style: { width: `${activityProgress}%` }
5378
+ }
5379
+ ),
5380
+ /* @__PURE__ */ jsx2("span", { className: "gantt-tr-activityName", style: { color: activityTextColor(segment.color) }, children: segment.name }),
5381
+ activityDragEnabled && /* @__PURE__ */ jsxs2(Fragment, { children: [
5382
+ /* @__PURE__ */ jsx2("div", { className: "gantt-tr-resizeHandle gantt-tr-resizeHandleLeft" }),
5383
+ /* @__PURE__ */ jsx2("div", { className: "gantt-tr-resizeHandle gantt-tr-resizeHandleRight" })
5384
+ ] })
5385
+ ]
5386
+ },
5387
+ segment.id
5388
+ );
5389
+ }) }),
5486
5390
  !renderActivities && /* @__PURE__ */ jsxs2(
5487
5391
  "div",
5488
5392
  {
@@ -6026,7 +5930,7 @@ var DragGuideLines_default = DragGuideLines;
6026
5930
 
6027
5931
  // src/components/DependencyLines/DependencyLines.tsx
6028
5932
  import React6, { useId, useMemo as useMemo6, useState as useState3 } from "react";
6029
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
5933
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
6030
5934
  function isTaskHidden(taskId, collapsedParentIds, taskMap) {
6031
5935
  const task = taskMap.get(taskId);
6032
5936
  if (!task || !task.parentId) return false;
@@ -6202,8 +6106,8 @@ var DependencyLines = React6.memo(({
6202
6106
  fromY = predecessor.rowTop + predecessor.rowHeight / 2;
6203
6107
  toY = successor.rowTop + successor.rowHeight / 2;
6204
6108
  } else if (activityEndpoints) {
6205
- fromY = reverseOrder ? predecessor.rowTop : predecessor.rowTop + predecessor.rowHeight;
6206
- toY = reverseOrder ? successor.rowTop + successor.rowHeight : successor.rowTop;
6109
+ fromY = reverseOrder ? predecessor.rowTop + 6 : predecessor.rowTop + predecessor.rowHeight - 6;
6110
+ toY = reverseOrder ? successor.rowTop + successor.rowHeight - 6 : successor.rowTop + 6;
6207
6111
  } else if (reverseOrder) {
6208
6112
  fromY = predecessor.rowTop + 10;
6209
6113
  toY = successor.rowTop + successor.rowHeight - 6;
@@ -6241,7 +6145,8 @@ var DependencyLines = React6.memo(({
6241
6145
  fromY,
6242
6146
  reverseOrder,
6243
6147
  isVirtual,
6244
- isCritical
6148
+ isCritical,
6149
+ isCoupling: activityEndpoints && predecessor.rowTop === successor.rowTop && edge.type === "FS" && edge.lag === 0 && Math.abs(fromX - finalToX) < 0.01 && !isVirtual
6245
6150
  });
6246
6151
  }
6247
6152
  }
@@ -6358,7 +6263,7 @@ var DependencyLines = React6.memo(({
6358
6263
  }
6359
6264
  )
6360
6265
  ] }),
6361
- visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical }) => {
6266
+ visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical, isCoupling }) => {
6362
6267
  const isHovered = hoveredLineId === id;
6363
6268
  const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
6364
6269
  let pathClassName = "gantt-dependency-path";
@@ -6374,7 +6279,7 @@ var DependencyLines = React6.memo(({
6374
6279
  else markerEnd = `url(#${markerId("arrowhead")})`;
6375
6280
  const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : isCritical ? "var(--gantt-critical-path-color, #dc2626)" : "var(--gantt-dependency-line-color, #666666)";
6376
6281
  return /* @__PURE__ */ jsxs5(React6.Fragment, { children: [
6377
- /* @__PURE__ */ jsxs5(
6282
+ /* @__PURE__ */ jsx7(
6378
6283
  "g",
6379
6284
  {
6380
6285
  className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
@@ -6392,23 +6297,14 @@ var DependencyLines = React6.memo(({
6392
6297
  },
6393
6298
  role: "button",
6394
6299
  "aria-label": `\u0421\u0432\u044F\u0437\u044C ${linkType}`,
6395
- children: [
6396
- /* @__PURE__ */ jsx7(
6397
- "path",
6398
- {
6399
- d: path,
6400
- className: "gantt-dependency-hit-area"
6401
- }
6402
- ),
6403
- /* @__PURE__ */ jsx7(
6404
- "path",
6405
- {
6406
- d: path,
6407
- className: pathClassName,
6408
- markerEnd
6409
- }
6410
- )
6411
- ]
6300
+ children: isCoupling ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
6301
+ /* @__PURE__ */ jsx7("title", { children: "\u041F\u043E\u0441\u043B\u0435 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F \xB7 \u0431\u0435\u0437 \u043B\u0430\u0433\u0430" }),
6302
+ /* @__PURE__ */ jsx7("circle", { cx: toX, cy: fromY, r: 12, className: "gantt-dependency-coupling-hit-area" }),
6303
+ /* @__PURE__ */ jsx7("circle", { cx: toX, cy: fromY, r: 4, className: `${pathClassName} gantt-dependency-coupling` })
6304
+ ] }) : /* @__PURE__ */ jsxs5(Fragment3, { children: [
6305
+ /* @__PURE__ */ jsx7("path", { d: path, className: "gantt-dependency-hit-area" }),
6306
+ /* @__PURE__ */ jsx7("path", { d: path, className: pathClassName, markerEnd })
6307
+ ] })
6412
6308
  }
6413
6309
  ),
6414
6310
  showLag && lag !== 0 && /* @__PURE__ */ jsx7(
@@ -7313,7 +7209,7 @@ function buildDefaultTaskDateRange(startDate, {
7313
7209
  }
7314
7210
 
7315
7211
  // src/components/TaskList/TaskListRow.tsx
7316
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
7212
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
7317
7213
  var DAY_MS4 = 24 * 60 * 60 * 1e3;
7318
7214
  var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
7319
7215
  var getInclusiveDurationDays = (startDate, endDate) => {
@@ -7540,7 +7436,7 @@ var HierarchyButton = ({
7540
7436
  const canPromote = isChild && onPromote;
7541
7437
  const showDemote = canDemote && !!onDemote;
7542
7438
  if (!canPromote && !showDemote) return null;
7543
- return /* @__PURE__ */ jsxs10(Fragment3, { children: [
7439
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
7544
7440
  canPromote && /* @__PURE__ */ jsx15(
7545
7441
  "button",
7546
7442
  {
@@ -7839,7 +7735,7 @@ var DepChip = ({
7839
7735
  formatTaskNumberLabel(predecessorTaskNumber),
7840
7736
  depName
7841
7737
  ] }),
7842
- !disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment3, { children: [
7738
+ !disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment4, { children: [
7843
7739
  /* @__PURE__ */ jsx15("hr", { className: "gantt-tl-dep-edit-divider" }),
7844
7740
  /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-actions", children: [
7845
7741
  /* @__PURE__ */ jsx15(
@@ -8863,8 +8759,8 @@ var TaskListRow = React11.memo(
8863
8759
  return `${numberColumnWidth + nestedAxisDepth * 20 + 9}px`;
8864
8760
  })();
8865
8761
  const nameCell = /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-cell gantt-tl-cell-name", style: getColumnStyle("name", 200), children: [
8866
- isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
8867
- !isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment3, { children: [
8762
+ isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8763
+ !isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8868
8764
  ancestorLineModes.map(
8869
8765
  (mode, idx) => mode ? /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
8870
8766
  /* @__PURE__ */ jsx15(
@@ -8964,7 +8860,7 @@ var TaskListRow = React11.memo(
8964
8860
  }
8965
8861
  }
8966
8862
  ),
8967
- isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment3, { children: /* @__PURE__ */ jsx15(
8863
+ isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment4, { children: /* @__PURE__ */ jsx15(
8968
8864
  "button",
8969
8865
  {
8970
8866
  type: "button",
@@ -8976,7 +8872,7 @@ var TaskListRow = React11.memo(
8976
8872
  }
8977
8873
  ) })
8978
8874
  ] }),
8979
- !isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
8875
+ !isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8980
8876
  !isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx15(
8981
8877
  "span",
8982
8878
  {
@@ -9018,7 +8914,7 @@ var TaskListRow = React11.memo(
9018
8914
  style: { paddingLeft: nameInputPaddingLeft },
9019
8915
  onClick: (e) => e.stopPropagation()
9020
8916
  }
9021
- ) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
8917
+ ) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
9022
8918
  task.composite && /* @__PURE__ */ jsx15(
9023
8919
  "button",
9024
8920
  {
@@ -9040,7 +8936,7 @@ var TaskListRow = React11.memo(
9040
8936
  strokeLinecap: "round",
9041
8937
  strokeLinejoin: "round",
9042
8938
  "aria-hidden": "true",
9043
- children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
8939
+ children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
9044
8940
  /* @__PURE__ */ jsx15("path", { d: "M21 5H11" }),
9045
8941
  /* @__PURE__ */ jsx15("path", { d: "M21 12H11" }),
9046
8942
  /* @__PURE__ */ jsx15("path", { d: "M21 19H11" }),
@@ -9509,7 +9405,7 @@ var TaskListRow = React11.memo(
9509
9405
  className: "gantt-tl-cell gantt-tl-cell-deps",
9510
9406
  style: getColumnStyle("dependencies", 128),
9511
9407
  onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
9512
- children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
9408
+ children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
9513
9409
  /* @__PURE__ */ jsx15(
9514
9410
  "span",
9515
9411
  {
@@ -9519,7 +9415,7 @@ var TaskListRow = React11.memo(
9519
9415
  }
9520
9416
  ),
9521
9417
  sourcePickerContent
9522
- ] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
9418
+ ] }) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
9523
9419
  printDependencyLabels ? /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dependency-print-labels", children: chips.map(({ dep, lag }) => formatDependencyPrintLabel(
9524
9420
  dep,
9525
9421
  taskNumberMap[dep.taskId],
@@ -9904,7 +9800,7 @@ var NewTaskRow = ({
9904
9800
 
9905
9801
  // src/components/GenerationSkeleton/GenerationSkeleton.tsx
9906
9802
  import { useRef as useRef7 } from "react";
9907
- import { Fragment as Fragment4, jsx as jsx17 } from "react/jsx-runtime";
9803
+ import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
9908
9804
  var MAX_SKELETON_ROWS = 200;
9909
9805
  var SHIMMER_DURATION_MS = 1450;
9910
9806
  function stableRowJitter(rowIndex, maxDays) {
@@ -9963,7 +9859,7 @@ var GenerationSkeletonRows = ({
9963
9859
  {
9964
9860
  className: "gantt-generation-skeleton-row",
9965
9861
  style: { top: `${(startTop ?? startIndex * rowHeight) + index * rowHeight}px`, height: `${rowHeight}px` },
9966
- children: variant === "task-list" ? /* @__PURE__ */ jsx17(Fragment4, { children: /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-label ${shortShape ? "gantt-generation-skeleton-label-short" : ""} ${mediumShape ? "gantt-generation-skeleton-label-medium" : ""}` }) }) : /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-bar ${parentShape ? "gantt-generation-skeleton-bar-parent" : ""} ${shortShape ? "gantt-generation-skeleton-bar-short" : ""}`, style: chartBarStyle })
9862
+ children: variant === "task-list" ? /* @__PURE__ */ jsx17(Fragment5, { children: /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-label ${shortShape ? "gantt-generation-skeleton-label-short" : ""} ${mediumShape ? "gantt-generation-skeleton-label-medium" : ""}` }) }) : /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-bar ${parentShape ? "gantt-generation-skeleton-bar-parent" : ""} ${shortShape ? "gantt-generation-skeleton-bar-short" : ""}`, style: chartBarStyle })
9967
9863
  },
9968
9864
  rowIndex
9969
9865
  );
@@ -11985,7 +11881,7 @@ var useResourceItemDrag = ({
11985
11881
  };
11986
11882
 
11987
11883
  // src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
11988
- import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
11884
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
11989
11885
  var DEFAULT_DAY_WIDTH = 40;
11990
11886
  var DEFAULT_HEADER_HEIGHT = 40;
11991
11887
  var DEFAULT_LANE_HEIGHT = 40;
@@ -13327,7 +13223,7 @@ function ResourceTimelineChart({
13327
13223
  backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
13328
13224
  },
13329
13225
  children: [
13330
- !readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment5, { children: [
13226
+ !readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment6, { children: [
13331
13227
  /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
13332
13228
  /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
13333
13229
  ] }),
@@ -15181,7 +15077,7 @@ async function printGanttChart({
15181
15077
  }
15182
15078
 
15183
15079
  // src/components/GanttChart/GanttChart.tsx
15184
- import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
15080
+ import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
15185
15081
  var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
15186
15082
  var TASK_ROW_OVERSCAN = 8;
15187
15083
  var SCROLL_TOP_BUCKET_PX = 64;
@@ -15401,6 +15297,17 @@ function TaskGanttChartInner(props, ref) {
15401
15297
  onTaskDateChangeModeChange: externalOnTaskDateChangeModeChange,
15402
15298
  printDependencyLabels = false
15403
15299
  } = props;
15300
+ const resolvedActivityDependencies = useMemo14(() => {
15301
+ if (activityDependencies !== void 0) return activityDependencies;
15302
+ return tasks.flatMap((task) => (task.activities ?? []).slice(1).map((successor, index) => ({
15303
+ predecessorTaskId: task.id,
15304
+ predecessorActivityId: task.activities[index].id,
15305
+ successorTaskId: task.id,
15306
+ successorActivityId: successor.id,
15307
+ type: "FS",
15308
+ lag: successor.lag ?? 0
15309
+ })));
15310
+ }, [tasks, activityDependencies]);
15404
15311
  const dayWidth = !isTableMatrixMode ? props.dayWidth ?? 40 : 40;
15405
15312
  const criticalPathMode = !isTableMatrixMode && !isPlanFactMode ? props.criticalPathMode : void 0;
15406
15313
  const onSubtreeScaleResult = !isTableMatrixMode && !isPlanFactMode ? props.onSubtreeScaleResult : void 0;
@@ -16802,7 +16709,7 @@ function TaskGanttChartInner(props, ref) {
16802
16709
  todayDateIndex: todayInRange ? todayIndex : void 0,
16803
16710
  isCustomWeekend
16804
16711
  }
16805
- ) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
16712
+ ) : /* @__PURE__ */ jsxs16(Fragment7, { children: [
16806
16713
  /* @__PURE__ */ jsxs16(
16807
16714
  "div",
16808
16715
  {
@@ -16877,7 +16784,7 @@ function TaskGanttChartInner(props, ref) {
16877
16784
  onHoverEnd: () => setActiveTimelineTooltip(null)
16878
16785
  }
16879
16786
  ),
16880
- 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 }),
16787
+ showActivityLinks && resolvedActivityDependencies.length > 0 && /* @__PURE__ */ jsx22(ActivityDependencyLines, { tasks: visibleTasks, renderedTaskIds: renderedTaskIdsRef.current, dependencies: resolvedActivityDependencies, highlight: activityDependencyHighlight, monthStart, dayWidth, rowHeight: effectiveRowHeight, gridWidth: renderGridWidth, totalHeight: totalGridHeight, rowIndexByTaskId: visibleTaskIndexMap, rowTops: compositeRowLayout.tops, rowHeights: compositeRowLayout.heights, showLag: showActivityLag, previewStore: activityPreviewStore, horizontalWindow }),
16881
16788
  /* @__PURE__ */ jsx22(
16882
16789
  DependencyLines_default,
16883
16790
  {
@@ -17020,7 +16927,7 @@ function TaskGanttChartInner(props, ref) {
17020
16927
  activityActivationStore,
17021
16928
  activityClickToDrag,
17022
16929
  activityActivationMode,
17023
- showActivityLinks: showActivityLinks && activityDependencies === void 0,
16930
+ showActivityLinks: false,
17024
16931
  showActivityLag,
17025
16932
  activityTooltip,
17026
16933
  horizontalWindow,