gantt-lib 0.78.0 → 0.79.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.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +55 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -14
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +132 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3489,6 +3489,25 @@ var DependencyLines = import_react6.default.memo(({
|
|
|
3489
3489
|
}
|
|
3490
3490
|
)
|
|
3491
3491
|
}
|
|
3492
|
+
),
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3494
|
+
"marker",
|
|
3495
|
+
{
|
|
3496
|
+
id: "arrowhead-hover",
|
|
3497
|
+
markerWidth: "8",
|
|
3498
|
+
markerHeight: "6",
|
|
3499
|
+
markerUnits: "userSpaceOnUse",
|
|
3500
|
+
refX: "7",
|
|
3501
|
+
refY: "3",
|
|
3502
|
+
orient: "auto",
|
|
3503
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3504
|
+
"polygon",
|
|
3505
|
+
{
|
|
3506
|
+
points: "0 0, 8 3, 0 6",
|
|
3507
|
+
fill: "var(--gantt-dependency-hover-color, #ef4444)"
|
|
3508
|
+
}
|
|
3509
|
+
)
|
|
3510
|
+
}
|
|
3492
3511
|
)
|
|
3493
3512
|
] }),
|
|
3494
3513
|
lines.map(({ id, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
@@ -3503,14 +3522,23 @@ var DependencyLines = import_react6.default.memo(({
|
|
|
3503
3522
|
else markerEnd = "url(#arrowhead)";
|
|
3504
3523
|
const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : "var(--gantt-dependency-line-color, #666666)";
|
|
3505
3524
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react6.default.Fragment, { children: [
|
|
3506
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", { className: "gantt-dependency-line", children: [
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3527
|
+
"path",
|
|
3528
|
+
{
|
|
3529
|
+
d: path,
|
|
3530
|
+
className: "gantt-dependency-hit-area"
|
|
3531
|
+
}
|
|
3532
|
+
),
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3534
|
+
"path",
|
|
3535
|
+
{
|
|
3536
|
+
d: path,
|
|
3537
|
+
className: pathClassName,
|
|
3538
|
+
markerEnd
|
|
3539
|
+
}
|
|
3540
|
+
)
|
|
3541
|
+
] }),
|
|
3514
3542
|
lag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3515
3543
|
"text",
|
|
3516
3544
|
{
|
|
@@ -4560,12 +4588,20 @@ var DepChip = ({
|
|
|
4560
4588
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
4561
4589
|
"span",
|
|
4562
4590
|
{
|
|
4563
|
-
className: `gantt-tl-dep-chip${isSelected ? " gantt-tl-dep-chip-selected" : ""}`,
|
|
4591
|
+
className: `gantt-tl-dep-chip-with-number${isSelected ? " gantt-tl-dep-chip-with-number-selected" : ""}`,
|
|
4564
4592
|
onClick: handleClick,
|
|
4565
|
-
|
|
4593
|
+
"aria-label": `[${LINK_TYPE_LABELS_RU[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
4566
4594
|
children: [
|
|
4567
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4568
|
-
|
|
4595
|
+
predecessorTaskNumber && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "gantt-tl-dep-chip-task-number", children: predecessorTaskNumber }),
|
|
4596
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "gantt-tl-dep-chip", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, {}) }),
|
|
4597
|
+
effectiveLag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "gantt-tl-dep-chip-lag", children: effectiveLag > 0 ? `+${effectiveLag}` : `${effectiveLag}` }),
|
|
4598
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "gantt-tl-dep-chip-tooltip", role: "tooltip", children: [
|
|
4599
|
+
"[",
|
|
4600
|
+
LINK_TYPE_LABELS_RU[dep.type],
|
|
4601
|
+
"] ",
|
|
4602
|
+
formatTaskNumberLabel(predecessorTaskNumber),
|
|
4603
|
+
depName
|
|
4604
|
+
] })
|
|
4569
4605
|
]
|
|
4570
4606
|
}
|
|
4571
4607
|
) }),
|
|
@@ -6410,7 +6446,7 @@ var BUILT_IN_COLUMN_WIDTHS = {
|
|
|
6410
6446
|
endDate: 90,
|
|
6411
6447
|
duration: 60,
|
|
6412
6448
|
progress: 50,
|
|
6413
|
-
dependencies:
|
|
6449
|
+
dependencies: 128,
|
|
6414
6450
|
actions: 80
|
|
6415
6451
|
};
|
|
6416
6452
|
function createBuiltInColumns(opts) {
|
|
@@ -8056,6 +8092,7 @@ function ResourceTimelineChart({
|
|
|
8056
8092
|
{
|
|
8057
8093
|
className,
|
|
8058
8094
|
"data-resource-item-id": layoutItem.itemId,
|
|
8095
|
+
"data-resource-item-tooltip": layoutItem.item.title,
|
|
8059
8096
|
onMouseDown: (event) => startDrag(event, layoutItem),
|
|
8060
8097
|
onClick: () => onResourceItemClick?.(layoutItem.item),
|
|
8061
8098
|
onKeyDown: (event) => {
|
|
@@ -9192,7 +9229,11 @@ Button.displayName = "Button";
|
|
|
9192
9229
|
var and = (...predicates) => (task) => predicates.every((p) => p(task));
|
|
9193
9230
|
var or = (...predicates) => (task) => predicates.some((p) => p(task));
|
|
9194
9231
|
var not = (predicate) => (task) => !predicate(task);
|
|
9195
|
-
var withoutDeps = () => (task) =>
|
|
9232
|
+
var withoutDeps = (options = {}) => (task) => {
|
|
9233
|
+
if (!task) return false;
|
|
9234
|
+
if (options.onlyChildren && !task.parentId) return false;
|
|
9235
|
+
return !task.dependencies || task.dependencies.length === 0;
|
|
9236
|
+
};
|
|
9196
9237
|
var expired = (referenceDate = /* @__PURE__ */ new Date()) => (task) => isTaskExpired(task, referenceDate);
|
|
9197
9238
|
var inDateRange = (rangeStart, rangeEnd) => (task) => {
|
|
9198
9239
|
if (!task) return false;
|