gantt-lib 0.141.2 → 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.css.map +1 -1
- package/dist/index.js +15 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -38
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
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;
|
|
@@ -6201,6 +6201,9 @@ var DependencyLines = React6.memo(({
|
|
|
6201
6201
|
if (activityEndpoints && predecessor.rowTop === successor.rowTop) {
|
|
6202
6202
|
fromY = predecessor.rowTop + predecessor.rowHeight / 2;
|
|
6203
6203
|
toY = successor.rowTop + successor.rowHeight / 2;
|
|
6204
|
+
} else if (activityEndpoints) {
|
|
6205
|
+
fromY = reverseOrder ? predecessor.rowTop : predecessor.rowTop + predecessor.rowHeight;
|
|
6206
|
+
toY = reverseOrder ? successor.rowTop + successor.rowHeight : successor.rowTop;
|
|
6204
6207
|
} else if (reverseOrder) {
|
|
6205
6208
|
fromY = predecessor.rowTop + 10;
|
|
6206
6209
|
toY = successor.rowTop + successor.rowHeight - 6;
|
|
@@ -6238,7 +6241,8 @@ var DependencyLines = React6.memo(({
|
|
|
6238
6241
|
fromY,
|
|
6239
6242
|
reverseOrder,
|
|
6240
6243
|
isVirtual,
|
|
6241
|
-
isCritical
|
|
6244
|
+
isCritical,
|
|
6245
|
+
isCoupling: activityEndpoints && predecessor.rowTop === successor.rowTop && edge.type === "FS" && edge.lag === 0 && Math.abs(fromX - finalToX) < 0.01 && !isVirtual
|
|
6242
6246
|
});
|
|
6243
6247
|
}
|
|
6244
6248
|
}
|
|
@@ -6355,7 +6359,7 @@ var DependencyLines = React6.memo(({
|
|
|
6355
6359
|
}
|
|
6356
6360
|
)
|
|
6357
6361
|
] }),
|
|
6358
|
-
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 }) => {
|
|
6359
6363
|
const isHovered = hoveredLineId === id;
|
|
6360
6364
|
const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
|
|
6361
6365
|
let pathClassName = "gantt-dependency-path";
|
|
@@ -6371,7 +6375,7 @@ var DependencyLines = React6.memo(({
|
|
|
6371
6375
|
else markerEnd = `url(#${markerId("arrowhead")})`;
|
|
6372
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)";
|
|
6373
6377
|
return /* @__PURE__ */ jsxs5(React6.Fragment, { children: [
|
|
6374
|
-
/* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ jsx7(
|
|
6375
6379
|
"g",
|
|
6376
6380
|
{
|
|
6377
6381
|
className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
|
|
@@ -6389,23 +6393,14 @@ var DependencyLines = React6.memo(({
|
|
|
6389
6393
|
},
|
|
6390
6394
|
role: "button",
|
|
6391
6395
|
"aria-label": `\u0421\u0432\u044F\u0437\u044C ${linkType}`,
|
|
6392
|
-
children: [
|
|
6393
|
-
/* @__PURE__ */ jsx7(
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
/* @__PURE__ */ jsx7(
|
|
6401
|
-
"path",
|
|
6402
|
-
{
|
|
6403
|
-
d: path,
|
|
6404
|
-
className: pathClassName,
|
|
6405
|
-
markerEnd
|
|
6406
|
-
}
|
|
6407
|
-
)
|
|
6408
|
-
]
|
|
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
|
+
] })
|
|
6409
6404
|
}
|
|
6410
6405
|
),
|
|
6411
6406
|
showLag && lag !== 0 && /* @__PURE__ */ jsx7(
|
|
@@ -7310,7 +7305,7 @@ function buildDefaultTaskDateRange(startDate, {
|
|
|
7310
7305
|
}
|
|
7311
7306
|
|
|
7312
7307
|
// src/components/TaskList/TaskListRow.tsx
|
|
7313
|
-
import { Fragment as
|
|
7308
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7314
7309
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
7315
7310
|
var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
|
|
7316
7311
|
var getInclusiveDurationDays = (startDate, endDate) => {
|
|
@@ -7537,7 +7532,7 @@ var HierarchyButton = ({
|
|
|
7537
7532
|
const canPromote = isChild && onPromote;
|
|
7538
7533
|
const showDemote = canDemote && !!onDemote;
|
|
7539
7534
|
if (!canPromote && !showDemote) return null;
|
|
7540
|
-
return /* @__PURE__ */ jsxs10(
|
|
7535
|
+
return /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
7541
7536
|
canPromote && /* @__PURE__ */ jsx15(
|
|
7542
7537
|
"button",
|
|
7543
7538
|
{
|
|
@@ -7836,7 +7831,7 @@ var DepChip = ({
|
|
|
7836
7831
|
formatTaskNumberLabel(predecessorTaskNumber),
|
|
7837
7832
|
depName
|
|
7838
7833
|
] }),
|
|
7839
|
-
!disableDependencyEditing && /* @__PURE__ */ jsxs10(
|
|
7834
|
+
!disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
7840
7835
|
/* @__PURE__ */ jsx15("hr", { className: "gantt-tl-dep-edit-divider" }),
|
|
7841
7836
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-actions", children: [
|
|
7842
7837
|
/* @__PURE__ */ jsx15(
|
|
@@ -8860,8 +8855,8 @@ var TaskListRow = React11.memo(
|
|
|
8860
8855
|
return `${numberColumnWidth + nestedAxisDepth * 20 + 9}px`;
|
|
8861
8856
|
})();
|
|
8862
8857
|
const nameCell = /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-cell gantt-tl-cell-name", style: getColumnStyle("name", 200), children: [
|
|
8863
|
-
isChild && !editingName && /* @__PURE__ */ jsxs10(
|
|
8864
|
-
!isFilterHideMode && /* @__PURE__ */ jsxs10(
|
|
8858
|
+
isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
8859
|
+
!isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
8865
8860
|
ancestorLineModes.map(
|
|
8866
8861
|
(mode, idx) => mode ? /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
|
|
8867
8862
|
/* @__PURE__ */ jsx15(
|
|
@@ -8961,7 +8956,7 @@ var TaskListRow = React11.memo(
|
|
|
8961
8956
|
}
|
|
8962
8957
|
}
|
|
8963
8958
|
),
|
|
8964
|
-
isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(
|
|
8959
|
+
isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment4, { children: /* @__PURE__ */ jsx15(
|
|
8965
8960
|
"button",
|
|
8966
8961
|
{
|
|
8967
8962
|
type: "button",
|
|
@@ -8973,7 +8968,7 @@ var TaskListRow = React11.memo(
|
|
|
8973
8968
|
}
|
|
8974
8969
|
) })
|
|
8975
8970
|
] }),
|
|
8976
|
-
!isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(
|
|
8971
|
+
!isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
8977
8972
|
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx15(
|
|
8978
8973
|
"span",
|
|
8979
8974
|
{
|
|
@@ -9015,7 +9010,7 @@ var TaskListRow = React11.memo(
|
|
|
9015
9010
|
style: { paddingLeft: nameInputPaddingLeft },
|
|
9016
9011
|
onClick: (e) => e.stopPropagation()
|
|
9017
9012
|
}
|
|
9018
|
-
) : /* @__PURE__ */ jsxs10(
|
|
9013
|
+
) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
9019
9014
|
task.composite && /* @__PURE__ */ jsx15(
|
|
9020
9015
|
"button",
|
|
9021
9016
|
{
|
|
@@ -9037,7 +9032,7 @@ var TaskListRow = React11.memo(
|
|
|
9037
9032
|
strokeLinecap: "round",
|
|
9038
9033
|
strokeLinejoin: "round",
|
|
9039
9034
|
"aria-hidden": "true",
|
|
9040
|
-
children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(
|
|
9035
|
+
children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
9041
9036
|
/* @__PURE__ */ jsx15("path", { d: "M21 5H11" }),
|
|
9042
9037
|
/* @__PURE__ */ jsx15("path", { d: "M21 12H11" }),
|
|
9043
9038
|
/* @__PURE__ */ jsx15("path", { d: "M21 19H11" }),
|
|
@@ -9506,7 +9501,7 @@ var TaskListRow = React11.memo(
|
|
|
9506
9501
|
className: "gantt-tl-cell gantt-tl-cell-deps",
|
|
9507
9502
|
style: getColumnStyle("dependencies", 128),
|
|
9508
9503
|
onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
|
|
9509
|
-
children: isSourceRow ? /* @__PURE__ */ jsxs10(
|
|
9504
|
+
children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
9510
9505
|
/* @__PURE__ */ jsx15(
|
|
9511
9506
|
"span",
|
|
9512
9507
|
{
|
|
@@ -9516,7 +9511,7 @@ var TaskListRow = React11.memo(
|
|
|
9516
9511
|
}
|
|
9517
9512
|
),
|
|
9518
9513
|
sourcePickerContent
|
|
9519
|
-
] }) : /* @__PURE__ */ jsxs10(
|
|
9514
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
9520
9515
|
printDependencyLabels ? /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dependency-print-labels", children: chips.map(({ dep, lag }) => formatDependencyPrintLabel(
|
|
9521
9516
|
dep,
|
|
9522
9517
|
taskNumberMap[dep.taskId],
|
|
@@ -9901,7 +9896,7 @@ var NewTaskRow = ({
|
|
|
9901
9896
|
|
|
9902
9897
|
// src/components/GenerationSkeleton/GenerationSkeleton.tsx
|
|
9903
9898
|
import { useRef as useRef7 } from "react";
|
|
9904
|
-
import { Fragment as
|
|
9899
|
+
import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
|
|
9905
9900
|
var MAX_SKELETON_ROWS = 200;
|
|
9906
9901
|
var SHIMMER_DURATION_MS = 1450;
|
|
9907
9902
|
function stableRowJitter(rowIndex, maxDays) {
|
|
@@ -9960,7 +9955,7 @@ var GenerationSkeletonRows = ({
|
|
|
9960
9955
|
{
|
|
9961
9956
|
className: "gantt-generation-skeleton-row",
|
|
9962
9957
|
style: { top: `${(startTop ?? startIndex * rowHeight) + index * rowHeight}px`, height: `${rowHeight}px` },
|
|
9963
|
-
children: variant === "task-list" ? /* @__PURE__ */ jsx17(
|
|
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 })
|
|
9964
9959
|
},
|
|
9965
9960
|
rowIndex
|
|
9966
9961
|
);
|
|
@@ -11982,7 +11977,7 @@ var useResourceItemDrag = ({
|
|
|
11982
11977
|
};
|
|
11983
11978
|
|
|
11984
11979
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
11985
|
-
import { Fragment as
|
|
11980
|
+
import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
11986
11981
|
var DEFAULT_DAY_WIDTH = 40;
|
|
11987
11982
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
11988
11983
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -13324,7 +13319,7 @@ function ResourceTimelineChart({
|
|
|
13324
13319
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
13325
13320
|
},
|
|
13326
13321
|
children: [
|
|
13327
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(
|
|
13322
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
13328
13323
|
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
13329
13324
|
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
13330
13325
|
] }),
|
|
@@ -15178,7 +15173,7 @@ async function printGanttChart({
|
|
|
15178
15173
|
}
|
|
15179
15174
|
|
|
15180
15175
|
// src/components/GanttChart/GanttChart.tsx
|
|
15181
|
-
import { Fragment as
|
|
15176
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
15182
15177
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
15183
15178
|
var TASK_ROW_OVERSCAN = 8;
|
|
15184
15179
|
var SCROLL_TOP_BUCKET_PX = 64;
|
|
@@ -16799,7 +16794,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16799
16794
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
16800
16795
|
isCustomWeekend
|
|
16801
16796
|
}
|
|
16802
|
-
) : /* @__PURE__ */ jsxs16(
|
|
16797
|
+
) : /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
16803
16798
|
/* @__PURE__ */ jsxs16(
|
|
16804
16799
|
"div",
|
|
16805
16800
|
{
|