gantt-lib 0.141.3 → 0.142.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/dist/index.mjs CHANGED
@@ -6026,7 +6026,7 @@ var DragGuideLines_default = DragGuideLines;
6026
6026
 
6027
6027
  // src/components/DependencyLines/DependencyLines.tsx
6028
6028
  import React6, { useId, useMemo as useMemo6, useState as useState3 } from "react";
6029
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
6029
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
6030
6030
  function isTaskHidden(taskId, collapsedParentIds, taskMap) {
6031
6031
  const task = taskMap.get(taskId);
6032
6032
  if (!task || !task.parentId) return false;
@@ -6241,7 +6241,8 @@ var DependencyLines = React6.memo(({
6241
6241
  fromY,
6242
6242
  reverseOrder,
6243
6243
  isVirtual,
6244
- isCritical
6244
+ isCritical,
6245
+ isCoupling: activityEndpoints && predecessor.rowTop === successor.rowTop && edge.type === "FS" && edge.lag === 0 && Math.abs(fromX - finalToX) < 0.01 && !isVirtual
6245
6246
  });
6246
6247
  }
6247
6248
  }
@@ -6358,7 +6359,7 @@ var DependencyLines = React6.memo(({
6358
6359
  }
6359
6360
  )
6360
6361
  ] }),
6361
- visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical }) => {
6362
+ visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical, isCoupling }) => {
6362
6363
  const isHovered = hoveredLineId === id;
6363
6364
  const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
6364
6365
  let pathClassName = "gantt-dependency-path";
@@ -6374,7 +6375,7 @@ var DependencyLines = React6.memo(({
6374
6375
  else markerEnd = `url(#${markerId("arrowhead")})`;
6375
6376
  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
6377
  return /* @__PURE__ */ jsxs5(React6.Fragment, { children: [
6377
- /* @__PURE__ */ jsxs5(
6378
+ /* @__PURE__ */ jsx7(
6378
6379
  "g",
6379
6380
  {
6380
6381
  className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
@@ -6392,23 +6393,14 @@ var DependencyLines = React6.memo(({
6392
6393
  },
6393
6394
  role: "button",
6394
6395
  "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
- ]
6396
+ children: isCoupling ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
6397
+ /* @__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" }),
6398
+ /* @__PURE__ */ jsx7("circle", { cx: toX, cy: fromY, r: 12, className: "gantt-dependency-coupling-hit-area" }),
6399
+ /* @__PURE__ */ jsx7("circle", { cx: toX, cy: fromY, r: 4, className: `${pathClassName} gantt-dependency-coupling` })
6400
+ ] }) : /* @__PURE__ */ jsxs5(Fragment3, { children: [
6401
+ /* @__PURE__ */ jsx7("path", { d: path, className: "gantt-dependency-hit-area" }),
6402
+ /* @__PURE__ */ jsx7("path", { d: path, className: pathClassName, markerEnd })
6403
+ ] })
6412
6404
  }
6413
6405
  ),
6414
6406
  showLag && lag !== 0 && /* @__PURE__ */ jsx7(
@@ -7313,7 +7305,7 @@ function buildDefaultTaskDateRange(startDate, {
7313
7305
  }
7314
7306
 
7315
7307
  // src/components/TaskList/TaskListRow.tsx
7316
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
7308
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
7317
7309
  var DAY_MS4 = 24 * 60 * 60 * 1e3;
7318
7310
  var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
7319
7311
  var getInclusiveDurationDays = (startDate, endDate) => {
@@ -7540,7 +7532,7 @@ var HierarchyButton = ({
7540
7532
  const canPromote = isChild && onPromote;
7541
7533
  const showDemote = canDemote && !!onDemote;
7542
7534
  if (!canPromote && !showDemote) return null;
7543
- return /* @__PURE__ */ jsxs10(Fragment3, { children: [
7535
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
7544
7536
  canPromote && /* @__PURE__ */ jsx15(
7545
7537
  "button",
7546
7538
  {
@@ -7839,7 +7831,7 @@ var DepChip = ({
7839
7831
  formatTaskNumberLabel(predecessorTaskNumber),
7840
7832
  depName
7841
7833
  ] }),
7842
- !disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment3, { children: [
7834
+ !disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment4, { children: [
7843
7835
  /* @__PURE__ */ jsx15("hr", { className: "gantt-tl-dep-edit-divider" }),
7844
7836
  /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-actions", children: [
7845
7837
  /* @__PURE__ */ jsx15(
@@ -8863,8 +8855,8 @@ var TaskListRow = React11.memo(
8863
8855
  return `${numberColumnWidth + nestedAxisDepth * 20 + 9}px`;
8864
8856
  })();
8865
8857
  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: [
8858
+ isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8859
+ !isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8868
8860
  ancestorLineModes.map(
8869
8861
  (mode, idx) => mode ? /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
8870
8862
  /* @__PURE__ */ jsx15(
@@ -8964,7 +8956,7 @@ var TaskListRow = React11.memo(
8964
8956
  }
8965
8957
  }
8966
8958
  ),
8967
- isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment3, { children: /* @__PURE__ */ jsx15(
8959
+ isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment4, { children: /* @__PURE__ */ jsx15(
8968
8960
  "button",
8969
8961
  {
8970
8962
  type: "button",
@@ -8976,7 +8968,7 @@ var TaskListRow = React11.memo(
8976
8968
  }
8977
8969
  ) })
8978
8970
  ] }),
8979
- !isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
8971
+ !isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
8980
8972
  !isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx15(
8981
8973
  "span",
8982
8974
  {
@@ -9018,7 +9010,7 @@ var TaskListRow = React11.memo(
9018
9010
  style: { paddingLeft: nameInputPaddingLeft },
9019
9011
  onClick: (e) => e.stopPropagation()
9020
9012
  }
9021
- ) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
9013
+ ) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
9022
9014
  task.composite && /* @__PURE__ */ jsx15(
9023
9015
  "button",
9024
9016
  {
@@ -9040,7 +9032,7 @@ var TaskListRow = React11.memo(
9040
9032
  strokeLinecap: "round",
9041
9033
  strokeLinejoin: "round",
9042
9034
  "aria-hidden": "true",
9043
- children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
9035
+ children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
9044
9036
  /* @__PURE__ */ jsx15("path", { d: "M21 5H11" }),
9045
9037
  /* @__PURE__ */ jsx15("path", { d: "M21 12H11" }),
9046
9038
  /* @__PURE__ */ jsx15("path", { d: "M21 19H11" }),
@@ -9509,7 +9501,7 @@ var TaskListRow = React11.memo(
9509
9501
  className: "gantt-tl-cell gantt-tl-cell-deps",
9510
9502
  style: getColumnStyle("dependencies", 128),
9511
9503
  onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
9512
- children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
9504
+ children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
9513
9505
  /* @__PURE__ */ jsx15(
9514
9506
  "span",
9515
9507
  {
@@ -9519,7 +9511,7 @@ var TaskListRow = React11.memo(
9519
9511
  }
9520
9512
  ),
9521
9513
  sourcePickerContent
9522
- ] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
9514
+ ] }) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
9523
9515
  printDependencyLabels ? /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dependency-print-labels", children: chips.map(({ dep, lag }) => formatDependencyPrintLabel(
9524
9516
  dep,
9525
9517
  taskNumberMap[dep.taskId],
@@ -9904,7 +9896,7 @@ var NewTaskRow = ({
9904
9896
 
9905
9897
  // src/components/GenerationSkeleton/GenerationSkeleton.tsx
9906
9898
  import { useRef as useRef7 } from "react";
9907
- import { Fragment as Fragment4, jsx as jsx17 } from "react/jsx-runtime";
9899
+ import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
9908
9900
  var MAX_SKELETON_ROWS = 200;
9909
9901
  var SHIMMER_DURATION_MS = 1450;
9910
9902
  function stableRowJitter(rowIndex, maxDays) {
@@ -9963,7 +9955,7 @@ var GenerationSkeletonRows = ({
9963
9955
  {
9964
9956
  className: "gantt-generation-skeleton-row",
9965
9957
  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 })
9958
+ 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
9959
  },
9968
9960
  rowIndex
9969
9961
  );
@@ -11985,7 +11977,7 @@ var useResourceItemDrag = ({
11985
11977
  };
11986
11978
 
11987
11979
  // src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
11988
- import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
11980
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
11989
11981
  var DEFAULT_DAY_WIDTH = 40;
11990
11982
  var DEFAULT_HEADER_HEIGHT = 40;
11991
11983
  var DEFAULT_LANE_HEIGHT = 40;
@@ -13327,7 +13319,7 @@ function ResourceTimelineChart({
13327
13319
  backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
13328
13320
  },
13329
13321
  children: [
13330
- !readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment5, { children: [
13322
+ !readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment6, { children: [
13331
13323
  /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
13332
13324
  /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
13333
13325
  ] }),
@@ -15181,7 +15173,7 @@ async function printGanttChart({
15181
15173
  }
15182
15174
 
15183
15175
  // src/components/GanttChart/GanttChart.tsx
15184
- import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
15176
+ import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
15185
15177
  var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
15186
15178
  var TASK_ROW_OVERSCAN = 8;
15187
15179
  var SCROLL_TOP_BUCKET_PX = 64;
@@ -16802,7 +16794,7 @@ function TaskGanttChartInner(props, ref) {
16802
16794
  todayDateIndex: todayInRange ? todayIndex : void 0,
16803
16795
  isCustomWeekend
16804
16796
  }
16805
- ) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
16797
+ ) : /* @__PURE__ */ jsxs16(Fragment7, { children: [
16806
16798
  /* @__PURE__ */ jsxs16(
16807
16799
  "div",
16808
16800
  {