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.mjs
CHANGED
|
@@ -3351,6 +3351,25 @@ var DependencyLines = React5.memo(({
|
|
|
3351
3351
|
}
|
|
3352
3352
|
)
|
|
3353
3353
|
}
|
|
3354
|
+
),
|
|
3355
|
+
/* @__PURE__ */ jsx6(
|
|
3356
|
+
"marker",
|
|
3357
|
+
{
|
|
3358
|
+
id: "arrowhead-hover",
|
|
3359
|
+
markerWidth: "8",
|
|
3360
|
+
markerHeight: "6",
|
|
3361
|
+
markerUnits: "userSpaceOnUse",
|
|
3362
|
+
refX: "7",
|
|
3363
|
+
refY: "3",
|
|
3364
|
+
orient: "auto",
|
|
3365
|
+
children: /* @__PURE__ */ jsx6(
|
|
3366
|
+
"polygon",
|
|
3367
|
+
{
|
|
3368
|
+
points: "0 0, 8 3, 0 6",
|
|
3369
|
+
fill: "var(--gantt-dependency-hover-color, #ef4444)"
|
|
3370
|
+
}
|
|
3371
|
+
)
|
|
3372
|
+
}
|
|
3354
3373
|
)
|
|
3355
3374
|
] }),
|
|
3356
3375
|
lines.map(({ id, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
@@ -3365,14 +3384,23 @@ var DependencyLines = React5.memo(({
|
|
|
3365
3384
|
else markerEnd = "url(#arrowhead)";
|
|
3366
3385
|
const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : "var(--gantt-dependency-line-color, #666666)";
|
|
3367
3386
|
return /* @__PURE__ */ jsxs5(React5.Fragment, { children: [
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3387
|
+
/* @__PURE__ */ jsxs5("g", { className: "gantt-dependency-line", children: [
|
|
3388
|
+
/* @__PURE__ */ jsx6(
|
|
3389
|
+
"path",
|
|
3390
|
+
{
|
|
3391
|
+
d: path,
|
|
3392
|
+
className: "gantt-dependency-hit-area"
|
|
3393
|
+
}
|
|
3394
|
+
),
|
|
3395
|
+
/* @__PURE__ */ jsx6(
|
|
3396
|
+
"path",
|
|
3397
|
+
{
|
|
3398
|
+
d: path,
|
|
3399
|
+
className: pathClassName,
|
|
3400
|
+
markerEnd
|
|
3401
|
+
}
|
|
3402
|
+
)
|
|
3403
|
+
] }),
|
|
3376
3404
|
lag !== 0 && /* @__PURE__ */ jsx6(
|
|
3377
3405
|
"text",
|
|
3378
3406
|
{
|
|
@@ -4446,12 +4474,20 @@ var DepChip = ({
|
|
|
4446
4474
|
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
|
|
4447
4475
|
"span",
|
|
4448
4476
|
{
|
|
4449
|
-
className: `gantt-tl-dep-chip${isSelected ? " gantt-tl-dep-chip-selected" : ""}`,
|
|
4477
|
+
className: `gantt-tl-dep-chip-with-number${isSelected ? " gantt-tl-dep-chip-with-number-selected" : ""}`,
|
|
4450
4478
|
onClick: handleClick,
|
|
4451
|
-
|
|
4479
|
+
"aria-label": `[${LINK_TYPE_LABELS_RU[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
4452
4480
|
children: [
|
|
4453
|
-
/* @__PURE__ */ jsx12(
|
|
4454
|
-
|
|
4481
|
+
predecessorTaskNumber && /* @__PURE__ */ jsx12("span", { className: "gantt-tl-dep-chip-task-number", children: predecessorTaskNumber }),
|
|
4482
|
+
/* @__PURE__ */ jsx12("span", { className: "gantt-tl-dep-chip", children: /* @__PURE__ */ jsx12(Icon, {}) }),
|
|
4483
|
+
effectiveLag !== 0 && /* @__PURE__ */ jsx12("span", { className: "gantt-tl-dep-chip-lag", children: effectiveLag > 0 ? `+${effectiveLag}` : `${effectiveLag}` }),
|
|
4484
|
+
/* @__PURE__ */ jsxs9("span", { className: "gantt-tl-dep-chip-tooltip", role: "tooltip", children: [
|
|
4485
|
+
"[",
|
|
4486
|
+
LINK_TYPE_LABELS_RU[dep.type],
|
|
4487
|
+
"] ",
|
|
4488
|
+
formatTaskNumberLabel(predecessorTaskNumber),
|
|
4489
|
+
depName
|
|
4490
|
+
] })
|
|
4455
4491
|
]
|
|
4456
4492
|
}
|
|
4457
4493
|
) }),
|
|
@@ -6296,7 +6332,7 @@ var BUILT_IN_COLUMN_WIDTHS = {
|
|
|
6296
6332
|
endDate: 90,
|
|
6297
6333
|
duration: 60,
|
|
6298
6334
|
progress: 50,
|
|
6299
|
-
dependencies:
|
|
6335
|
+
dependencies: 128,
|
|
6300
6336
|
actions: 80
|
|
6301
6337
|
};
|
|
6302
6338
|
function createBuiltInColumns(opts) {
|
|
@@ -7942,6 +7978,7 @@ function ResourceTimelineChart({
|
|
|
7942
7978
|
{
|
|
7943
7979
|
className,
|
|
7944
7980
|
"data-resource-item-id": layoutItem.itemId,
|
|
7981
|
+
"data-resource-item-tooltip": layoutItem.item.title,
|
|
7945
7982
|
onMouseDown: (event) => startDrag(event, layoutItem),
|
|
7946
7983
|
onClick: () => onResourceItemClick?.(layoutItem.item),
|
|
7947
7984
|
onKeyDown: (event) => {
|
|
@@ -9078,7 +9115,11 @@ Button.displayName = "Button";
|
|
|
9078
9115
|
var and = (...predicates) => (task) => predicates.every((p) => p(task));
|
|
9079
9116
|
var or = (...predicates) => (task) => predicates.some((p) => p(task));
|
|
9080
9117
|
var not = (predicate) => (task) => !predicate(task);
|
|
9081
|
-
var withoutDeps = () => (task) =>
|
|
9118
|
+
var withoutDeps = (options = {}) => (task) => {
|
|
9119
|
+
if (!task) return false;
|
|
9120
|
+
if (options.onlyChildren && !task.parentId) return false;
|
|
9121
|
+
return !task.dependencies || task.dependencies.length === 0;
|
|
9122
|
+
};
|
|
9082
9123
|
var expired = (referenceDate = /* @__PURE__ */ new Date()) => (task) => isTaskExpired(task, referenceDate);
|
|
9083
9124
|
var inDateRange = (rangeStart, rangeEnd) => (task) => {
|
|
9084
9125
|
if (!task) return false;
|