gantt-lib 0.121.2 → 0.122.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 +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +878 -459
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +958 -539
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +219 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// src/components/GanttChart/GanttChart.tsx
|
|
6
|
-
import { useMemo as useMemo13, useCallback as useCallback10, useRef as useRef11, useState as
|
|
6
|
+
import { useMemo as useMemo13, useCallback as useCallback10, useRef as useRef11, useState as useState12, useEffect as useEffect10, useImperativeHandle, forwardRef } from "react";
|
|
7
7
|
|
|
8
8
|
// src/core/scheduling/dateMath.ts
|
|
9
9
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -2835,12 +2835,12 @@ var useTaskDrag = (options) => {
|
|
|
2835
2835
|
};
|
|
2836
2836
|
|
|
2837
2837
|
// src/components/TaskRow/TaskRow.tsx
|
|
2838
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2838
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2839
2839
|
var arePropsEqual = (prevProps, nextProps) => {
|
|
2840
|
-
return prevProps.task.id === nextProps.task.id && prevProps.task.name === nextProps.task.name && prevProps.task.startDate === nextProps.task.startDate && prevProps.task.endDate === nextProps.task.endDate && prevProps.task.baselineStartDate === nextProps.task.baselineStartDate && prevProps.task.baselineEndDate === nextProps.task.baselineEndDate && prevProps.task.type === nextProps.task.type && prevProps.task.color === nextProps.task.color && prevProps.task.progress === nextProps.task.progress && prevProps.task.accepted === nextProps.task.accepted && prevProps.monthStart.getTime() === nextProps.monthStart.getTime() && prevProps.dayWidth === nextProps.dayWidth && prevProps.rowHeight === nextProps.rowHeight && prevProps.overridePosition?.left === nextProps.overridePosition?.left && prevProps.overridePosition?.width === nextProps.overridePosition?.width && prevProps.previewPositionStore === nextProps.previewPositionStore && prevProps.allTasks === nextProps.allTasks && prevProps.disableConstraints === nextProps.disableConstraints && prevProps.task.locked === nextProps.task.locked && prevProps.task.synced === nextProps.task.synced && prevProps.task.divider === nextProps.task.divider && prevProps.highlightExpiredTasks === nextProps.highlightExpiredTasks && prevProps.showBaseline === nextProps.showBaseline && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.businessDays === nextProps.businessDays && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.disableTaskDrag === nextProps.disableTaskDrag && prevProps.viewMode === nextProps.viewMode;
|
|
2840
|
+
return prevProps.task.id === nextProps.task.id && prevProps.task.name === nextProps.task.name && prevProps.task.startDate === nextProps.task.startDate && prevProps.task.endDate === nextProps.task.endDate && prevProps.task.baselineStartDate === nextProps.task.baselineStartDate && prevProps.task.baselineEndDate === nextProps.task.baselineEndDate && prevProps.task.type === nextProps.task.type && prevProps.task.color === nextProps.task.color && prevProps.task.progress === nextProps.task.progress && prevProps.task.accepted === nextProps.task.accepted && prevProps.monthStart.getTime() === nextProps.monthStart.getTime() && prevProps.dayWidth === nextProps.dayWidth && prevProps.rowHeight === nextProps.rowHeight && prevProps.overridePosition?.left === nextProps.overridePosition?.left && prevProps.overridePosition?.width === nextProps.overridePosition?.width && prevProps.previewPositionStore === nextProps.previewPositionStore && prevProps.allTasks === nextProps.allTasks && prevProps.disableConstraints === nextProps.disableConstraints && prevProps.task.locked === nextProps.task.locked && prevProps.task.synced === nextProps.task.synced && prevProps.task.divider === nextProps.task.divider && prevProps.highlightExpiredTasks === nextProps.highlightExpiredTasks && prevProps.showBaseline === nextProps.showBaseline && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.businessDays === nextProps.businessDays && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.disableTaskDrag === nextProps.disableTaskDrag && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.isDependencyDragActive === nextProps.isDependencyDragActive && prevProps.viewMode === nextProps.viewMode;
|
|
2841
2841
|
};
|
|
2842
2842
|
var TaskRow = React2.memo(
|
|
2843
|
-
({ task, monthStart, dayWidth, rowHeight, onTasksChange, onDragStateChange, rowIndex, allTasks, enableAutoSchedule, disableConstraints, overridePosition, previewPositionStore, onCascadeProgress, onCascade, divider, highlightExpiredTasks, showBaseline = false, isFilterMatch = false, businessDays, customDays, isWeekend: isWeekend3, disableTaskDrag = false, viewMode = "day" }) => {
|
|
2843
|
+
({ task, monthStart, dayWidth, rowHeight, onTasksChange, onDragStateChange, rowIndex, allTasks, enableAutoSchedule, disableConstraints, overridePosition, previewPositionStore, onCascadeProgress, onCascade, divider, highlightExpiredTasks, showBaseline = false, isFilterMatch = false, businessDays, customDays, isWeekend: isWeekend3, disableTaskDrag = false, disableDependencyEditing = false, onDependencyPortPointerDown, isDependencyDragActive = false, viewMode = "day" }) => {
|
|
2844
2844
|
const defaultParentBarColor = "#782FC4";
|
|
2845
2845
|
const { divider: taskDivider } = task;
|
|
2846
2846
|
const normalizedTask = useMemo2(() => normalizeTaskDatesForType(task), [task]);
|
|
@@ -3072,6 +3072,36 @@ var TaskRow = React2.memo(
|
|
|
3072
3072
|
]
|
|
3073
3073
|
}
|
|
3074
3074
|
),
|
|
3075
|
+
!disableDependencyEditing && onDependencyPortPointerDown && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
3076
|
+
/* @__PURE__ */ jsx2(
|
|
3077
|
+
"button",
|
|
3078
|
+
{
|
|
3079
|
+
type: "button",
|
|
3080
|
+
"data-gantt-dependency-port": true,
|
|
3081
|
+
"data-task-id": task.id,
|
|
3082
|
+
"data-port-side": "left",
|
|
3083
|
+
className: `gantt-tr-dependencyPort gantt-tr-dependencyPortLeft ${milestone ? "gantt-tr-dependencyPortMilestone" : ""} ${isParent ? "gantt-tr-dependencyPortParent" : ""} ${isDependencyDragActive ? "gantt-tr-dependencyPortDragActive" : ""}`,
|
|
3084
|
+
style: { left: `${visualLeft - 21}px` },
|
|
3085
|
+
"aria-label": `\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C \u043E\u0442 \u043B\u0435\u0432\u043E\u0433\u043E \u043A\u0440\u0430\u044F: ${task.name}`,
|
|
3086
|
+
title: "\u041F\u043E\u0442\u044F\u043D\u0438\u0442\u0435 \u043A \u043A\u0440\u0430\u044E \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
3087
|
+
onPointerDown: (event) => onDependencyPortPointerDown(task.id, "left", event)
|
|
3088
|
+
}
|
|
3089
|
+
),
|
|
3090
|
+
/* @__PURE__ */ jsx2(
|
|
3091
|
+
"button",
|
|
3092
|
+
{
|
|
3093
|
+
type: "button",
|
|
3094
|
+
"data-gantt-dependency-port": true,
|
|
3095
|
+
"data-task-id": task.id,
|
|
3096
|
+
"data-port-side": "right",
|
|
3097
|
+
className: `gantt-tr-dependencyPort gantt-tr-dependencyPortRight ${milestone ? "gantt-tr-dependencyPortMilestone" : ""} ${isParent ? "gantt-tr-dependencyPortParent" : ""} ${isDependencyDragActive ? "gantt-tr-dependencyPortDragActive" : ""}`,
|
|
3098
|
+
style: { left: `${visualLeft + visualWidth}px` },
|
|
3099
|
+
"aria-label": `\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C \u043E\u0442 \u043F\u0440\u0430\u0432\u043E\u0433\u043E \u043A\u0440\u0430\u044F: ${task.name}`,
|
|
3100
|
+
title: "\u041F\u043E\u0442\u044F\u043D\u0438\u0442\u0435 \u043A \u043A\u0440\u0430\u044E \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
3101
|
+
onPointerDown: (event) => onDependencyPortPointerDown(task.id, "right", event)
|
|
3102
|
+
}
|
|
3103
|
+
)
|
|
3104
|
+
] }),
|
|
3075
3105
|
/* @__PURE__ */ jsx2(
|
|
3076
3106
|
"div",
|
|
3077
3107
|
{
|
|
@@ -3335,7 +3365,7 @@ GridBackground.displayName = "GridBackground";
|
|
|
3335
3365
|
var GridBackground_default = GridBackground;
|
|
3336
3366
|
|
|
3337
3367
|
// src/components/DragGuideLines/DragGuideLines.tsx
|
|
3338
|
-
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3368
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3339
3369
|
var DragGuideLines = ({
|
|
3340
3370
|
isDragging,
|
|
3341
3371
|
dragMode,
|
|
@@ -3348,7 +3378,7 @@ var DragGuideLines = ({
|
|
|
3348
3378
|
}
|
|
3349
3379
|
const showLeftLine = dragMode === "move" || dragMode === "resize-left";
|
|
3350
3380
|
const showRightLine = dragMode === "move" || dragMode === "resize-right";
|
|
3351
|
-
return /* @__PURE__ */ jsxs4(
|
|
3381
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3352
3382
|
showLeftLine && /* @__PURE__ */ jsx6(
|
|
3353
3383
|
"div",
|
|
3354
3384
|
{
|
|
@@ -3374,7 +3404,7 @@ var DragGuideLines = ({
|
|
|
3374
3404
|
var DragGuideLines_default = DragGuideLines;
|
|
3375
3405
|
|
|
3376
3406
|
// src/components/DependencyLines/DependencyLines.tsx
|
|
3377
|
-
import React6, { useMemo as useMemo6 } from "react";
|
|
3407
|
+
import React6, { useMemo as useMemo6, useState as useState2 } from "react";
|
|
3378
3408
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3379
3409
|
function isTaskHidden(taskId, collapsedParentIds, taskMap) {
|
|
3380
3410
|
const task = taskMap.get(taskId);
|
|
@@ -3416,8 +3446,10 @@ var DependencyLines = React6.memo(({
|
|
|
3416
3446
|
dragOverrides,
|
|
3417
3447
|
selectedDep,
|
|
3418
3448
|
businessDays = true,
|
|
3419
|
-
weekendPredicate
|
|
3449
|
+
weekendPredicate,
|
|
3450
|
+
onDependencyClick
|
|
3420
3451
|
}) => {
|
|
3452
|
+
const [hoveredLineId, setHoveredLineId] = useState2(null);
|
|
3421
3453
|
const tasksForPositions = allTasks ?? tasks;
|
|
3422
3454
|
const { taskPositions, taskIndices, hiddenTaskIds } = useMemo6(() => {
|
|
3423
3455
|
const positions = /* @__PURE__ */ new Map();
|
|
@@ -3553,6 +3585,9 @@ var DependencyLines = React6.memo(({
|
|
|
3553
3585
|
const hasCycle = cycleInfo.has(edge.predecessorId) || cycleInfo.has(edge.successorId);
|
|
3554
3586
|
lines2.push({
|
|
3555
3587
|
id: `${edge.predecessorId}-${edge.successorId}-${edge.type}`,
|
|
3588
|
+
predecessorId: edge.predecessorId,
|
|
3589
|
+
successorId: edge.successorId,
|
|
3590
|
+
linkType: edge.type,
|
|
3556
3591
|
path,
|
|
3557
3592
|
hasCycle,
|
|
3558
3593
|
lag: edge.lag,
|
|
@@ -3654,7 +3689,8 @@ var DependencyLines = React6.memo(({
|
|
|
3654
3689
|
}
|
|
3655
3690
|
)
|
|
3656
3691
|
] }),
|
|
3657
|
-
lines.map(({ id, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
3692
|
+
lines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
3693
|
+
const isHovered = hoveredLineId === id;
|
|
3658
3694
|
const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
|
|
3659
3695
|
let pathClassName = "gantt-dependency-path";
|
|
3660
3696
|
if (isSelected) pathClassName += " gantt-dependency-selected";
|
|
@@ -3666,23 +3702,43 @@ var DependencyLines = React6.memo(({
|
|
|
3666
3702
|
else markerEnd = "url(#arrowhead)";
|
|
3667
3703
|
const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : "var(--gantt-dependency-line-color, #666666)";
|
|
3668
3704
|
return /* @__PURE__ */ jsxs5(React6.Fragment, { children: [
|
|
3669
|
-
/* @__PURE__ */ jsxs5(
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
{
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3705
|
+
/* @__PURE__ */ jsxs5(
|
|
3706
|
+
"g",
|
|
3707
|
+
{
|
|
3708
|
+
className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
|
|
3709
|
+
onPointerEnter: () => setHoveredLineId(id),
|
|
3710
|
+
onPointerLeave: () => setHoveredLineId((current) => current === id ? null : current),
|
|
3711
|
+
onClick: (event) => {
|
|
3712
|
+
event.stopPropagation();
|
|
3713
|
+
onDependencyClick?.({
|
|
3714
|
+
predecessorId,
|
|
3715
|
+
successorId,
|
|
3716
|
+
linkType,
|
|
3717
|
+
x: toX,
|
|
3718
|
+
y: reverseOrder ? fromY - 4 : fromY + 12
|
|
3719
|
+
});
|
|
3720
|
+
},
|
|
3721
|
+
role: "button",
|
|
3722
|
+
"aria-label": `\u0421\u0432\u044F\u0437\u044C ${linkType}`,
|
|
3723
|
+
children: [
|
|
3724
|
+
/* @__PURE__ */ jsx7(
|
|
3725
|
+
"path",
|
|
3726
|
+
{
|
|
3727
|
+
d: path,
|
|
3728
|
+
className: "gantt-dependency-hit-area"
|
|
3729
|
+
}
|
|
3730
|
+
),
|
|
3731
|
+
/* @__PURE__ */ jsx7(
|
|
3732
|
+
"path",
|
|
3733
|
+
{
|
|
3734
|
+
d: path,
|
|
3735
|
+
className: pathClassName,
|
|
3736
|
+
markerEnd
|
|
3737
|
+
}
|
|
3738
|
+
)
|
|
3739
|
+
]
|
|
3740
|
+
}
|
|
3741
|
+
),
|
|
3686
3742
|
lag !== 0 && /* @__PURE__ */ jsx7(
|
|
3687
3743
|
"text",
|
|
3688
3744
|
{
|
|
@@ -3704,8 +3760,64 @@ var DependencyLines = React6.memo(({
|
|
|
3704
3760
|
DependencyLines.displayName = "DependencyLines";
|
|
3705
3761
|
var DependencyLines_default = DependencyLines;
|
|
3706
3762
|
|
|
3763
|
+
// src/components/DependencyCreationOverlay/DependencyCreationOverlay.tsx
|
|
3764
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3765
|
+
var LINK_TYPE_LABELS_RU = {
|
|
3766
|
+
FS: "\u041E\u041D",
|
|
3767
|
+
SS: "\u041D\u041D",
|
|
3768
|
+
FF: "\u041E\u041E",
|
|
3769
|
+
SF: "\u041D\u041E"
|
|
3770
|
+
};
|
|
3771
|
+
function getPath(drag) {
|
|
3772
|
+
const from = drag.source;
|
|
3773
|
+
const to = drag.current;
|
|
3774
|
+
const direction = to.y >= from.y ? 1 : -1;
|
|
3775
|
+
const bend = Math.max(18, Math.abs(to.y - from.y) * 0.45);
|
|
3776
|
+
const middleX = Math.round((from.x + to.x) / 2);
|
|
3777
|
+
if (Math.abs(to.y - from.y) < 2) {
|
|
3778
|
+
return `M ${Math.round(from.x)} ${Math.round(from.y)} H ${Math.round(to.x)}`;
|
|
3779
|
+
}
|
|
3780
|
+
return [
|
|
3781
|
+
`M ${Math.round(from.x)} ${Math.round(from.y)}`,
|
|
3782
|
+
`C ${Math.round(from.x)} ${Math.round(from.y + bend * direction)}, ${Math.round(to.x)} ${Math.round(to.y - bend * direction)}, ${Math.round(to.x)} ${Math.round(to.y)}`
|
|
3783
|
+
].join(" ");
|
|
3784
|
+
}
|
|
3785
|
+
var DependencyCreationOverlay = ({ drag, width, height }) => {
|
|
3786
|
+
if (!drag) return null;
|
|
3787
|
+
return /* @__PURE__ */ jsxs6(
|
|
3788
|
+
"svg",
|
|
3789
|
+
{
|
|
3790
|
+
className: "gantt-dependencyCreation-svg",
|
|
3791
|
+
"data-testid": "dependency-creation-preview",
|
|
3792
|
+
width,
|
|
3793
|
+
height,
|
|
3794
|
+
"aria-hidden": "true",
|
|
3795
|
+
children: [
|
|
3796
|
+
/* @__PURE__ */ jsx8(
|
|
3797
|
+
"path",
|
|
3798
|
+
{
|
|
3799
|
+
className: `gantt-dependencyCreation-path ${drag.target ? "gantt-dependencyCreation-pathTargeted" : ""}`,
|
|
3800
|
+
d: getPath(drag)
|
|
3801
|
+
}
|
|
3802
|
+
),
|
|
3803
|
+
/* @__PURE__ */ jsx8("circle", { className: "gantt-dependencyCreation-source", cx: drag.source.x, cy: drag.source.y, r: "4" }),
|
|
3804
|
+
/* @__PURE__ */ jsx8(
|
|
3805
|
+
"circle",
|
|
3806
|
+
{
|
|
3807
|
+
className: `gantt-dependencyCreation-target ${drag.target ? "gantt-dependencyCreation-targetValid" : ""}`,
|
|
3808
|
+
cx: drag.current.x,
|
|
3809
|
+
cy: drag.current.y,
|
|
3810
|
+
r: "5"
|
|
3811
|
+
}
|
|
3812
|
+
),
|
|
3813
|
+
drag.linkType && /* @__PURE__ */ jsx8("text", { className: "gantt-dependencyCreation-label", x: drag.current.x + 10, y: drag.current.y - 10, children: LINK_TYPE_LABELS_RU[drag.linkType] ?? drag.linkType })
|
|
3814
|
+
]
|
|
3815
|
+
}
|
|
3816
|
+
);
|
|
3817
|
+
};
|
|
3818
|
+
|
|
3707
3819
|
// src/components/TaskList/TaskList.tsx
|
|
3708
|
-
import React12, { useMemo as useMemo9, useCallback as useCallback6, useState as
|
|
3820
|
+
import React12, { useMemo as useMemo9, useCallback as useCallback6, useState as useState7, useEffect as useEffect6, useRef as useRef6 } from "react";
|
|
3709
3821
|
|
|
3710
3822
|
// src/utils/taskListReorder.ts
|
|
3711
3823
|
function getDescendantIds(taskId, tasks) {
|
|
@@ -3876,9 +3988,9 @@ function getVisibleReorderPlan(orderedTasks, visibleTasks, movedTaskId, target)
|
|
|
3876
3988
|
|
|
3877
3989
|
// src/components/ui/Popover.tsx
|
|
3878
3990
|
import * as RadixPopover from "@radix-ui/react-popover";
|
|
3879
|
-
import { jsx as
|
|
3991
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3880
3992
|
var Popover = ({ open, onOpenChange, children }) => {
|
|
3881
|
-
return /* @__PURE__ */
|
|
3993
|
+
return /* @__PURE__ */ jsx9(RadixPopover.Root, { open, onOpenChange, children });
|
|
3882
3994
|
};
|
|
3883
3995
|
var PopoverTrigger = RadixPopover.Trigger;
|
|
3884
3996
|
var PopoverContent = ({
|
|
@@ -3890,7 +4002,7 @@ var PopoverContent = ({
|
|
|
3890
4002
|
collisionPadding = 8,
|
|
3891
4003
|
onInteractOutside
|
|
3892
4004
|
}) => {
|
|
3893
|
-
const content = /* @__PURE__ */
|
|
4005
|
+
const content = /* @__PURE__ */ jsx9(
|
|
3894
4006
|
RadixPopover.Content,
|
|
3895
4007
|
{
|
|
3896
4008
|
className: `gantt-popover${className ? ` ${className}` : ""}`,
|
|
@@ -3903,14 +4015,14 @@ var PopoverContent = ({
|
|
|
3903
4015
|
}
|
|
3904
4016
|
);
|
|
3905
4017
|
if (portal) {
|
|
3906
|
-
return /* @__PURE__ */
|
|
4018
|
+
return /* @__PURE__ */ jsx9(RadixPopover.Portal, { children: content });
|
|
3907
4019
|
}
|
|
3908
4020
|
return content;
|
|
3909
4021
|
};
|
|
3910
4022
|
|
|
3911
4023
|
// src/components/TaskList/TaskListRow.tsx
|
|
3912
4024
|
import React10, {
|
|
3913
|
-
useState as
|
|
4025
|
+
useState as useState5,
|
|
3914
4026
|
useRef as useRef4,
|
|
3915
4027
|
useEffect as useEffect4,
|
|
3916
4028
|
useCallback as useCallback5,
|
|
@@ -3919,10 +4031,10 @@ import React10, {
|
|
|
3919
4031
|
|
|
3920
4032
|
// src/components/ui/Input.tsx
|
|
3921
4033
|
import React7 from "react";
|
|
3922
|
-
import { jsx as
|
|
4034
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3923
4035
|
var Input = React7.forwardRef(
|
|
3924
4036
|
({ className, ...props }, ref) => {
|
|
3925
|
-
return /* @__PURE__ */
|
|
4037
|
+
return /* @__PURE__ */ jsx10(
|
|
3926
4038
|
"input",
|
|
3927
4039
|
{
|
|
3928
4040
|
ref,
|
|
@@ -3935,12 +4047,12 @@ var Input = React7.forwardRef(
|
|
|
3935
4047
|
Input.displayName = "Input";
|
|
3936
4048
|
|
|
3937
4049
|
// src/components/ui/DatePicker.tsx
|
|
3938
|
-
import { useState as
|
|
4050
|
+
import { useState as useState4, useCallback as useCallback4, useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
3939
4051
|
import { format as format3, isValid, parse, addDays, addMonths as addMonths2, addYears, subMonths as subMonths2, subYears, subDays } from "date-fns";
|
|
3940
4052
|
|
|
3941
4053
|
// src/components/ui/Calendar.tsx
|
|
3942
4054
|
import {
|
|
3943
|
-
useState as
|
|
4055
|
+
useState as useState3,
|
|
3944
4056
|
useRef as useRef2,
|
|
3945
4057
|
useEffect as useEffect2,
|
|
3946
4058
|
useCallback as useCallback3,
|
|
@@ -3960,7 +4072,7 @@ import {
|
|
|
3960
4072
|
startOfDay
|
|
3961
4073
|
} from "date-fns";
|
|
3962
4074
|
import { ru as ru2 } from "date-fns/locale";
|
|
3963
|
-
import { jsx as
|
|
4075
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3964
4076
|
function getDayClassName(day, selected, isWeekendProp) {
|
|
3965
4077
|
const classes = ["gantt-day-btn"];
|
|
3966
4078
|
if (selected && isSameDay(day, selected)) classes.push("selected");
|
|
@@ -3983,7 +4095,7 @@ var Calendar = ({
|
|
|
3983
4095
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3984
4096
|
[]
|
|
3985
4097
|
);
|
|
3986
|
-
const [months, setMonths] =
|
|
4098
|
+
const [months, setMonths] = useState3(() => [
|
|
3987
4099
|
subMonths(initialMonth, 1),
|
|
3988
4100
|
initialMonth,
|
|
3989
4101
|
addMonths(initialMonth, 1)
|
|
@@ -4032,13 +4144,13 @@ var Calendar = ({
|
|
|
4032
4144
|
const monthKey = format2(month, "yyyy-MM");
|
|
4033
4145
|
const monthLabel = format2(month, "LLLL yyyy", { locale: ru2 });
|
|
4034
4146
|
const weekdayLabels = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
4035
|
-
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */
|
|
4036
|
-
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */
|
|
4147
|
+
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */ jsx11("div", { className: "gantt-cal-weekday", children: label }, `wd-${i}`));
|
|
4148
|
+
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */ jsx11("div", { className: "gantt-cal-empty-day" }, `e-${i}`));
|
|
4037
4149
|
const dayCells = Array.from({ length: totalDays }, (_, i) => {
|
|
4038
4150
|
const dayNum = i + 1;
|
|
4039
4151
|
const day = new Date(Date.UTC(month.getFullYear(), month.getMonth(), dayNum));
|
|
4040
4152
|
const className = getDayClassName(day, selected, isWeekendProp);
|
|
4041
|
-
return /* @__PURE__ */
|
|
4153
|
+
return /* @__PURE__ */ jsx11(
|
|
4042
4154
|
"button",
|
|
4043
4155
|
{
|
|
4044
4156
|
type: "button",
|
|
@@ -4054,9 +4166,9 @@ var Calendar = ({
|
|
|
4054
4166
|
dayNum
|
|
4055
4167
|
);
|
|
4056
4168
|
});
|
|
4057
|
-
return /* @__PURE__ */
|
|
4058
|
-
/* @__PURE__ */
|
|
4059
|
-
/* @__PURE__ */
|
|
4169
|
+
return /* @__PURE__ */ jsxs7("div", { className: "gantt-cal-month", "data-month": monthKey, children: [
|
|
4170
|
+
/* @__PURE__ */ jsx11("div", { className: "gantt-cal-month-header", children: monthLabel }),
|
|
4171
|
+
/* @__PURE__ */ jsxs7("div", { className: "gantt-cal-month-days", children: [
|
|
4060
4172
|
weekdayHeaders,
|
|
4061
4173
|
emptyCells,
|
|
4062
4174
|
dayCells
|
|
@@ -4069,12 +4181,12 @@ var Calendar = ({
|
|
|
4069
4181
|
() => months.map(renderMonth),
|
|
4070
4182
|
[months, renderMonth]
|
|
4071
4183
|
);
|
|
4072
|
-
return /* @__PURE__ */
|
|
4184
|
+
return /* @__PURE__ */ jsx11("div", { ref: scrollRef, className: "gantt-cal-container", children: renderedMonths });
|
|
4073
4185
|
};
|
|
4074
4186
|
Calendar.displayName = "Calendar";
|
|
4075
4187
|
|
|
4076
4188
|
// src/components/ui/DatePicker.tsx
|
|
4077
|
-
import { jsx as
|
|
4189
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4078
4190
|
var segments = [
|
|
4079
4191
|
{ start: 0, end: 2, label: "day", max: 31 },
|
|
4080
4192
|
{ start: 3, end: 5, label: "month", max: 12 },
|
|
@@ -4120,9 +4232,9 @@ var DatePicker = ({
|
|
|
4120
4232
|
businessDays = true,
|
|
4121
4233
|
footer
|
|
4122
4234
|
}) => {
|
|
4123
|
-
const [open, setOpen] =
|
|
4124
|
-
const [inputValue, setInputValue] =
|
|
4125
|
-
const [draftDate, setDraftDate] =
|
|
4235
|
+
const [open, setOpen] = useState4(false);
|
|
4236
|
+
const [inputValue, setInputValue] = useState4("");
|
|
4237
|
+
const [draftDate, setDraftDate] = useState4(void 0);
|
|
4126
4238
|
const dateInputRef = useRef3(null);
|
|
4127
4239
|
const segIdxRef = useRef3(0);
|
|
4128
4240
|
const charPosRef = useRef3(0);
|
|
@@ -4341,8 +4453,8 @@ var DatePicker = ({
|
|
|
4341
4453
|
}
|
|
4342
4454
|
setOpen(nextOpen);
|
|
4343
4455
|
}, [commitDate, open]);
|
|
4344
|
-
return /* @__PURE__ */
|
|
4345
|
-
/* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: disabled ? void 0 : handleOpenChange, children: [
|
|
4457
|
+
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
|
|
4346
4458
|
"button",
|
|
4347
4459
|
{
|
|
4348
4460
|
type: "button",
|
|
@@ -4355,17 +4467,17 @@ var DatePicker = ({
|
|
|
4355
4467
|
children: displayValue
|
|
4356
4468
|
}
|
|
4357
4469
|
) }),
|
|
4358
|
-
/* @__PURE__ */
|
|
4470
|
+
/* @__PURE__ */ jsxs8(
|
|
4359
4471
|
PopoverContent,
|
|
4360
4472
|
{
|
|
4361
4473
|
portal,
|
|
4362
4474
|
align: "start",
|
|
4363
4475
|
side: "bottom",
|
|
4364
4476
|
children: [
|
|
4365
|
-
/* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
/* @__PURE__ */
|
|
4368
|
-
/* @__PURE__ */
|
|
4477
|
+
/* @__PURE__ */ jsxs8("div", { className: "gantt-datepicker-input-row", children: [
|
|
4478
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-7), tabIndex: -1, children: "-7" }),
|
|
4479
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-1), tabIndex: -1, children: "-1" }),
|
|
4480
|
+
/* @__PURE__ */ jsx12(
|
|
4369
4481
|
"input",
|
|
4370
4482
|
{
|
|
4371
4483
|
ref: dateInputRef,
|
|
@@ -4384,10 +4496,10 @@ var DatePicker = ({
|
|
|
4384
4496
|
autoComplete: "off"
|
|
4385
4497
|
}
|
|
4386
4498
|
),
|
|
4387
|
-
/* @__PURE__ */
|
|
4388
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(1), tabIndex: -1, children: "+1" }),
|
|
4500
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(7), tabIndex: -1, children: "+7" })
|
|
4389
4501
|
] }),
|
|
4390
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsx12(
|
|
4391
4503
|
Calendar,
|
|
4392
4504
|
{
|
|
4393
4505
|
mode: "single",
|
|
@@ -4397,7 +4509,7 @@ var DatePicker = ({
|
|
|
4397
4509
|
isWeekend: isWeekend3
|
|
4398
4510
|
}
|
|
4399
4511
|
),
|
|
4400
|
-
footer ? /* @__PURE__ */
|
|
4512
|
+
footer ? /* @__PURE__ */ jsx12("div", { className: "gantt-datepicker-footer", children: footer }) : null
|
|
4401
4513
|
]
|
|
4402
4514
|
}
|
|
4403
4515
|
)
|
|
@@ -4406,24 +4518,24 @@ var DatePicker = ({
|
|
|
4406
4518
|
DatePicker.displayName = "DatePicker";
|
|
4407
4519
|
|
|
4408
4520
|
// src/components/TaskList/DepIcons.tsx
|
|
4409
|
-
import { jsx as
|
|
4410
|
-
var DepIconFS = () => /* @__PURE__ */
|
|
4411
|
-
/* @__PURE__ */
|
|
4412
|
-
/* @__PURE__ */
|
|
4521
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4522
|
+
var DepIconFS = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4523
|
+
/* @__PURE__ */ jsx13("path", { d: "m10 15 5 5 5-5" }),
|
|
4524
|
+
/* @__PURE__ */ jsx13("path", { d: "M4 4h7a4 4 0 0 1 4 4v12" })
|
|
4413
4525
|
] });
|
|
4414
|
-
var DepIconSS = () => /* @__PURE__ */
|
|
4415
|
-
/* @__PURE__ */
|
|
4416
|
-
/* @__PURE__ */
|
|
4417
|
-
/* @__PURE__ */
|
|
4526
|
+
var DepIconSS = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4527
|
+
/* @__PURE__ */ jsx13("path", { d: "M3 5v14" }),
|
|
4528
|
+
/* @__PURE__ */ jsx13("path", { d: "M21 12H7" }),
|
|
4529
|
+
/* @__PURE__ */ jsx13("path", { d: "m15 18 6-6-6-6" })
|
|
4418
4530
|
] });
|
|
4419
|
-
var DepIconFF = () => /* @__PURE__ */
|
|
4420
|
-
/* @__PURE__ */
|
|
4421
|
-
/* @__PURE__ */
|
|
4422
|
-
/* @__PURE__ */
|
|
4531
|
+
var DepIconFF = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4532
|
+
/* @__PURE__ */ jsx13("path", { d: "M17 12H3" }),
|
|
4533
|
+
/* @__PURE__ */ jsx13("path", { d: "m11 18 6-6-6-6" }),
|
|
4534
|
+
/* @__PURE__ */ jsx13("path", { d: "M21 5v14" })
|
|
4423
4535
|
] });
|
|
4424
|
-
var DepIconSF = () => /* @__PURE__ */
|
|
4425
|
-
/* @__PURE__ */
|
|
4426
|
-
/* @__PURE__ */
|
|
4536
|
+
var DepIconSF = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4537
|
+
/* @__PURE__ */ jsx13("path", { d: "m14 15-5 5-5-5" }),
|
|
4538
|
+
/* @__PURE__ */ jsx13("path", { d: "M20 4h-7a4 4 0 0 0-4 4v12" })
|
|
4427
4539
|
] });
|
|
4428
4540
|
var LINK_TYPE_ICONS = {
|
|
4429
4541
|
FS: DepIconFS,
|
|
@@ -4432,10 +4544,10 @@ var LINK_TYPE_ICONS = {
|
|
|
4432
4544
|
SF: DepIconSF
|
|
4433
4545
|
};
|
|
4434
4546
|
var LINK_TYPE_LABELS = {
|
|
4435
|
-
FS: "\u041E\
|
|
4436
|
-
SS: "\u041D\
|
|
4437
|
-
FF: "\u041E\
|
|
4438
|
-
SF: "\u041D\
|
|
4547
|
+
FS: "\u041E\u041D",
|
|
4548
|
+
SS: "\u041D\u041D",
|
|
4549
|
+
FF: "\u041E\u041E",
|
|
4550
|
+
SF: "\u041D\u041E"
|
|
4439
4551
|
};
|
|
4440
4552
|
|
|
4441
4553
|
// src/components/TaskList/defaultTaskDates.ts
|
|
@@ -4473,7 +4585,7 @@ function buildDefaultTaskDateRange(startDate, {
|
|
|
4473
4585
|
}
|
|
4474
4586
|
|
|
4475
4587
|
// src/components/TaskList/TaskListRow.tsx
|
|
4476
|
-
import { Fragment as
|
|
4588
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4477
4589
|
var DAY_MS3 = 24 * 60 * 60 * 1e3;
|
|
4478
4590
|
var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
|
|
4479
4591
|
var getInclusiveDurationDays = (startDate, endDate) => {
|
|
@@ -4488,7 +4600,7 @@ var getEndDateFromDuration = (startDate, durationDays) => {
|
|
|
4488
4600
|
const start = parseUTCDate(startDate);
|
|
4489
4601
|
return new Date(start.getTime() + (durationDays - 1) * DAY_MS3).toISOString().split("T")[0];
|
|
4490
4602
|
};
|
|
4491
|
-
var TrashIcon = () => /* @__PURE__ */
|
|
4603
|
+
var TrashIcon = () => /* @__PURE__ */ jsxs10(
|
|
4492
4604
|
"svg",
|
|
4493
4605
|
{
|
|
4494
4606
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4501,13 +4613,13 @@ var TrashIcon = () => /* @__PURE__ */ jsxs9(
|
|
|
4501
4613
|
strokeLinecap: "round",
|
|
4502
4614
|
strokeLinejoin: "round",
|
|
4503
4615
|
children: [
|
|
4504
|
-
/* @__PURE__ */
|
|
4505
|
-
/* @__PURE__ */
|
|
4506
|
-
/* @__PURE__ */
|
|
4616
|
+
/* @__PURE__ */ jsx14("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
4617
|
+
/* @__PURE__ */ jsx14("path", { d: "M3 6h18" }),
|
|
4618
|
+
/* @__PURE__ */ jsx14("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
4507
4619
|
]
|
|
4508
4620
|
}
|
|
4509
4621
|
);
|
|
4510
|
-
var PlusIcon = () => /* @__PURE__ */
|
|
4622
|
+
var PlusIcon = () => /* @__PURE__ */ jsx14(
|
|
4511
4623
|
"svg",
|
|
4512
4624
|
{
|
|
4513
4625
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4519,18 +4631,37 @@ var PlusIcon = () => /* @__PURE__ */ jsx13(
|
|
|
4519
4631
|
strokeWidth: "2",
|
|
4520
4632
|
strokeLinecap: "round",
|
|
4521
4633
|
strokeLinejoin: "round",
|
|
4522
|
-
children: /* @__PURE__ */
|
|
4634
|
+
children: /* @__PURE__ */ jsx14("path", { d: "M12 5v14M5 12h14" })
|
|
4635
|
+
}
|
|
4636
|
+
);
|
|
4637
|
+
var DepEditIcon = () => /* @__PURE__ */ jsxs10(
|
|
4638
|
+
"svg",
|
|
4639
|
+
{
|
|
4640
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4641
|
+
width: "16",
|
|
4642
|
+
height: "16",
|
|
4643
|
+
viewBox: "0 0 24 24",
|
|
4644
|
+
fill: "none",
|
|
4645
|
+
stroke: "currentColor",
|
|
4646
|
+
strokeWidth: "2",
|
|
4647
|
+
strokeLinecap: "round",
|
|
4648
|
+
strokeLinejoin: "round",
|
|
4649
|
+
"aria-hidden": "true",
|
|
4650
|
+
children: [
|
|
4651
|
+
/* @__PURE__ */ jsx14("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }),
|
|
4652
|
+
/* @__PURE__ */ jsx14("path", { d: "m15 5 4 4" })
|
|
4653
|
+
]
|
|
4523
4654
|
}
|
|
4524
4655
|
);
|
|
4525
|
-
var DragHandleIcon = () => /* @__PURE__ */
|
|
4526
|
-
/* @__PURE__ */
|
|
4527
|
-
/* @__PURE__ */
|
|
4528
|
-
/* @__PURE__ */
|
|
4529
|
-
/* @__PURE__ */
|
|
4530
|
-
/* @__PURE__ */
|
|
4531
|
-
/* @__PURE__ */
|
|
4656
|
+
var DragHandleIcon = () => /* @__PURE__ */ jsxs10("svg", { width: "10", height: "14", viewBox: "0 0 10 14", fill: "currentColor", children: [
|
|
4657
|
+
/* @__PURE__ */ jsx14("circle", { cx: "2", cy: "2", r: "1.5" }),
|
|
4658
|
+
/* @__PURE__ */ jsx14("circle", { cx: "8", cy: "2", r: "1.5" }),
|
|
4659
|
+
/* @__PURE__ */ jsx14("circle", { cx: "2", cy: "7", r: "1.5" }),
|
|
4660
|
+
/* @__PURE__ */ jsx14("circle", { cx: "8", cy: "7", r: "1.5" }),
|
|
4661
|
+
/* @__PURE__ */ jsx14("circle", { cx: "2", cy: "12", r: "1.5" }),
|
|
4662
|
+
/* @__PURE__ */ jsx14("circle", { cx: "8", cy: "12", r: "1.5" })
|
|
4532
4663
|
] });
|
|
4533
|
-
var VerticalDotsIcon = () => /* @__PURE__ */
|
|
4664
|
+
var VerticalDotsIcon = () => /* @__PURE__ */ jsxs10(
|
|
4534
4665
|
"svg",
|
|
4535
4666
|
{
|
|
4536
4667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4539,13 +4670,13 @@ var VerticalDotsIcon = () => /* @__PURE__ */ jsxs9(
|
|
|
4539
4670
|
viewBox: "0 0 24 24",
|
|
4540
4671
|
fill: "currentColor",
|
|
4541
4672
|
children: [
|
|
4542
|
-
/* @__PURE__ */
|
|
4543
|
-
/* @__PURE__ */
|
|
4544
|
-
/* @__PURE__ */
|
|
4673
|
+
/* @__PURE__ */ jsx14("circle", { cx: "12", cy: "5", r: "2" }),
|
|
4674
|
+
/* @__PURE__ */ jsx14("circle", { cx: "12", cy: "12", r: "2" }),
|
|
4675
|
+
/* @__PURE__ */ jsx14("circle", { cx: "12", cy: "19", r: "2" })
|
|
4545
4676
|
]
|
|
4546
4677
|
}
|
|
4547
4678
|
);
|
|
4548
|
-
var CopyIcon = () => /* @__PURE__ */
|
|
4679
|
+
var CopyIcon = () => /* @__PURE__ */ jsxs10(
|
|
4549
4680
|
"svg",
|
|
4550
4681
|
{
|
|
4551
4682
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4558,12 +4689,12 @@ var CopyIcon = () => /* @__PURE__ */ jsxs9(
|
|
|
4558
4689
|
strokeLinecap: "round",
|
|
4559
4690
|
strokeLinejoin: "round",
|
|
4560
4691
|
children: [
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
/* @__PURE__ */
|
|
4692
|
+
/* @__PURE__ */ jsx14("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
4693
|
+
/* @__PURE__ */ jsx14("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
4563
4694
|
]
|
|
4564
4695
|
}
|
|
4565
4696
|
);
|
|
4566
|
-
var UngroupIcon = () => /* @__PURE__ */
|
|
4697
|
+
var UngroupIcon = () => /* @__PURE__ */ jsxs10(
|
|
4567
4698
|
"svg",
|
|
4568
4699
|
{
|
|
4569
4700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4576,10 +4707,10 @@ var UngroupIcon = () => /* @__PURE__ */ jsxs9(
|
|
|
4576
4707
|
strokeLinecap: "round",
|
|
4577
4708
|
strokeLinejoin: "round",
|
|
4578
4709
|
children: [
|
|
4579
|
-
/* @__PURE__ */
|
|
4580
|
-
/* @__PURE__ */
|
|
4581
|
-
/* @__PURE__ */
|
|
4582
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ jsx14("path", { d: "M3 12h10" }),
|
|
4711
|
+
/* @__PURE__ */ jsx14("path", { d: "m6 9-3 3 3 3" }),
|
|
4712
|
+
/* @__PURE__ */ jsx14("path", { d: "M13 6h8" }),
|
|
4713
|
+
/* @__PURE__ */ jsx14("path", { d: "M13 18h8" })
|
|
4583
4714
|
]
|
|
4584
4715
|
}
|
|
4585
4716
|
);
|
|
@@ -4606,7 +4737,7 @@ var TASK_COLOR_PALETTE = [
|
|
|
4606
4737
|
// { label: "Океан2", value: "#0626ba" },
|
|
4607
4738
|
// { label: "Виноград", value: "#AE3EC9" },
|
|
4608
4739
|
];
|
|
4609
|
-
var ChevronRightIcon = () => /* @__PURE__ */
|
|
4740
|
+
var ChevronRightIcon = () => /* @__PURE__ */ jsx14(
|
|
4610
4741
|
"svg",
|
|
4611
4742
|
{
|
|
4612
4743
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4618,10 +4749,10 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx13(
|
|
|
4618
4749
|
strokeWidth: "2",
|
|
4619
4750
|
strokeLinecap: "round",
|
|
4620
4751
|
strokeLinejoin: "round",
|
|
4621
|
-
children: /* @__PURE__ */
|
|
4752
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m9 18 6-6-6-6" })
|
|
4622
4753
|
}
|
|
4623
4754
|
);
|
|
4624
|
-
var
|
|
4755
|
+
var LINK_TYPE_LABELS_RU2 = {
|
|
4625
4756
|
FS: "\u041E\u041D",
|
|
4626
4757
|
SS: "\u041D\u041D",
|
|
4627
4758
|
FF: "\u041E\u041E",
|
|
@@ -4630,7 +4761,7 @@ var LINK_TYPE_LABELS_RU = {
|
|
|
4630
4761
|
function formatTaskNumberLabel(taskNumber) {
|
|
4631
4762
|
return taskNumber ? `${taskNumber}. ` : "";
|
|
4632
4763
|
}
|
|
4633
|
-
var ArrowLeft = () => /* @__PURE__ */
|
|
4764
|
+
var ArrowLeft = () => /* @__PURE__ */ jsxs10(
|
|
4634
4765
|
"svg",
|
|
4635
4766
|
{
|
|
4636
4767
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4643,12 +4774,12 @@ var ArrowLeft = () => /* @__PURE__ */ jsxs9(
|
|
|
4643
4774
|
strokeLinecap: "round",
|
|
4644
4775
|
strokeLinejoin: "round",
|
|
4645
4776
|
children: [
|
|
4646
|
-
/* @__PURE__ */
|
|
4647
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ jsx14("path", { d: "m12 19-7-7 7-7" }),
|
|
4778
|
+
/* @__PURE__ */ jsx14("path", { d: "M19 12H5" })
|
|
4648
4779
|
]
|
|
4649
4780
|
}
|
|
4650
4781
|
);
|
|
4651
|
-
var ArrowRight = () => /* @__PURE__ */
|
|
4782
|
+
var ArrowRight = () => /* @__PURE__ */ jsxs10(
|
|
4652
4783
|
"svg",
|
|
4653
4784
|
{
|
|
4654
4785
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4661,8 +4792,8 @@ var ArrowRight = () => /* @__PURE__ */ jsxs9(
|
|
|
4661
4792
|
strokeLinecap: "round",
|
|
4662
4793
|
strokeLinejoin: "round",
|
|
4663
4794
|
children: [
|
|
4664
|
-
/* @__PURE__ */
|
|
4665
|
-
/* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ jsx14("path", { d: "M5 12h14" }),
|
|
4796
|
+
/* @__PURE__ */ jsx14("path", { d: "m12 5 7 7-7 7" })
|
|
4666
4797
|
]
|
|
4667
4798
|
}
|
|
4668
4799
|
);
|
|
@@ -4676,8 +4807,8 @@ var HierarchyButton = ({
|
|
|
4676
4807
|
const canPromote = isChild && onPromote;
|
|
4677
4808
|
const showDemote = canDemote && !!onDemote;
|
|
4678
4809
|
if (!canPromote && !showDemote) return null;
|
|
4679
|
-
return /* @__PURE__ */
|
|
4680
|
-
canPromote && /* @__PURE__ */
|
|
4810
|
+
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
4811
|
+
canPromote && /* @__PURE__ */ jsx14(
|
|
4681
4812
|
"button",
|
|
4682
4813
|
{
|
|
4683
4814
|
type: "button",
|
|
@@ -4687,10 +4818,10 @@ var HierarchyButton = ({
|
|
|
4687
4818
|
onPromote(e);
|
|
4688
4819
|
},
|
|
4689
4820
|
title: "\u041F\u043E\u0432\u044B\u0441\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
4690
|
-
children: /* @__PURE__ */
|
|
4821
|
+
children: /* @__PURE__ */ jsx14(ArrowLeft, {})
|
|
4691
4822
|
}
|
|
4692
4823
|
),
|
|
4693
|
-
showDemote && /* @__PURE__ */
|
|
4824
|
+
showDemote && /* @__PURE__ */ jsx14(
|
|
4694
4825
|
"button",
|
|
4695
4826
|
{
|
|
4696
4827
|
type: "button",
|
|
@@ -4700,7 +4831,7 @@ var HierarchyButton = ({
|
|
|
4700
4831
|
onDemote(e);
|
|
4701
4832
|
},
|
|
4702
4833
|
title: "\u041F\u043E\u043D\u0438\u0437\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
4703
|
-
children: /* @__PURE__ */
|
|
4834
|
+
children: /* @__PURE__ */ jsx14(ArrowRight, {})
|
|
4704
4835
|
}
|
|
4705
4836
|
)
|
|
4706
4837
|
] });
|
|
@@ -4725,9 +4856,9 @@ var DepChip = ({
|
|
|
4725
4856
|
businessDays = true,
|
|
4726
4857
|
weekendPredicate
|
|
4727
4858
|
}) => {
|
|
4728
|
-
const [popoverOpen, setPopoverOpen] =
|
|
4859
|
+
const [popoverOpen, setPopoverOpen] = useState5(false);
|
|
4729
4860
|
const lagAbs = Math.abs(lag ?? 0);
|
|
4730
|
-
const [inputAbs, setInputAbs] =
|
|
4861
|
+
const [inputAbs, setInputAbs] = useState5(lagAbs === 0 ? "" : String(lagAbs));
|
|
4731
4862
|
useEffect4(() => {
|
|
4732
4863
|
const abs = Math.abs(lag ?? 0);
|
|
4733
4864
|
setInputAbs(abs === 0 ? "" : String(abs));
|
|
@@ -4736,9 +4867,7 @@ var DepChip = ({
|
|
|
4736
4867
|
const handleClick = (e) => {
|
|
4737
4868
|
e.stopPropagation();
|
|
4738
4869
|
if (disableDependencyEditing) return;
|
|
4739
|
-
|
|
4740
|
-
setPopoverOpen(nextOpen);
|
|
4741
|
-
if (nextOpen) {
|
|
4870
|
+
if (!isSelected) {
|
|
4742
4871
|
onChipSelect?.({
|
|
4743
4872
|
successorId: taskId,
|
|
4744
4873
|
predecessorId: dep.taskId,
|
|
@@ -4870,44 +4999,71 @@ var DepChip = ({
|
|
|
4870
4999
|
afterWhat = "\u043F\u043E\u0441\u043B\u0435 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F";
|
|
4871
5000
|
}
|
|
4872
5001
|
}
|
|
4873
|
-
return /* @__PURE__ */
|
|
4874
|
-
/* @__PURE__ */
|
|
5002
|
+
return /* @__PURE__ */ jsxs10(Popover, { open: popoverOpen, onOpenChange: handleOpenChange, children: [
|
|
5003
|
+
/* @__PURE__ */ jsxs10(
|
|
4875
5004
|
"span",
|
|
4876
5005
|
{
|
|
4877
|
-
className: `gantt-tl-dep-chip-
|
|
4878
|
-
onClick: handleClick,
|
|
4879
|
-
"aria-label": `[${LINK_TYPE_LABELS_RU[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
5006
|
+
className: `gantt-tl-dep-chip-control${isSelected ? " gantt-tl-dep-chip-control-selected" : ""}`,
|
|
4880
5007
|
children: [
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
5008
|
+
/* @__PURE__ */ jsxs10(
|
|
5009
|
+
"span",
|
|
5010
|
+
{
|
|
5011
|
+
className: `gantt-tl-dep-chip-with-number${isSelected ? " gantt-tl-dep-chip-with-number-selected" : ""}`,
|
|
5012
|
+
onClick: handleClick,
|
|
5013
|
+
role: "button",
|
|
5014
|
+
tabIndex: 0,
|
|
5015
|
+
onKeyDown: (e) => {
|
|
5016
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
5017
|
+
e.preventDefault();
|
|
5018
|
+
handleClick(e);
|
|
5019
|
+
}
|
|
5020
|
+
},
|
|
5021
|
+
"aria-label": `[${LINK_TYPE_LABELS_RU2[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
5022
|
+
children: [
|
|
5023
|
+
predecessorTaskNumber && /* @__PURE__ */ jsx14("span", { className: "gantt-tl-dep-chip-task-number", children: predecessorTaskNumber }),
|
|
5024
|
+
/* @__PURE__ */ jsx14("span", { className: "gantt-tl-dep-chip", children: /* @__PURE__ */ jsx14(Icon, {}) }),
|
|
5025
|
+
effectiveLag !== 0 && /* @__PURE__ */ jsx14("span", { className: "gantt-tl-dep-chip-lag", children: effectiveLag > 0 ? `+${effectiveLag}` : `${effectiveLag}` }),
|
|
5026
|
+
/* @__PURE__ */ jsxs10("span", { className: "gantt-tl-dep-chip-tooltip", role: "tooltip", children: [
|
|
5027
|
+
"[",
|
|
5028
|
+
LINK_TYPE_LABELS_RU2[dep.type],
|
|
5029
|
+
"] ",
|
|
5030
|
+
formatTaskNumberLabel(predecessorTaskNumber),
|
|
5031
|
+
depName
|
|
5032
|
+
] })
|
|
5033
|
+
]
|
|
5034
|
+
}
|
|
5035
|
+
),
|
|
5036
|
+
isSelected && !disableDependencyEditing && /* @__PURE__ */ jsx14(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
|
|
5037
|
+
"button",
|
|
5038
|
+
{
|
|
5039
|
+
type: "button",
|
|
5040
|
+
className: "gantt-tl-dep-expand",
|
|
5041
|
+
"aria-label": "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
5042
|
+
title: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
5043
|
+
onClick: (e) => e.stopPropagation(),
|
|
5044
|
+
children: /* @__PURE__ */ jsx14(DepEditIcon, {})
|
|
5045
|
+
}
|
|
5046
|
+
) })
|
|
4891
5047
|
]
|
|
4892
5048
|
}
|
|
4893
|
-
)
|
|
4894
|
-
/* @__PURE__ */
|
|
5049
|
+
),
|
|
5050
|
+
/* @__PURE__ */ jsx14(
|
|
4895
5051
|
PopoverContent,
|
|
4896
5052
|
{
|
|
4897
5053
|
className: "gantt-tl-dep-edit-popover",
|
|
4898
5054
|
portal: true,
|
|
4899
5055
|
align: "start",
|
|
4900
|
-
children: /* @__PURE__ */
|
|
4901
|
-
/* @__PURE__ */
|
|
5056
|
+
children: /* @__PURE__ */ jsxs10("div", { onClick: (e) => e.stopPropagation(), children: [
|
|
5057
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-task", children: [
|
|
4902
5058
|
formatTaskNumberLabel(taskNumber),
|
|
4903
5059
|
task.name
|
|
4904
5060
|
] }),
|
|
4905
|
-
/* @__PURE__ */
|
|
4906
|
-
/* @__PURE__ */
|
|
5061
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-row", children: [
|
|
5062
|
+
/* @__PURE__ */ jsxs10("span", { className: "gantt-tl-dep-edit-label", children: [
|
|
4907
5063
|
actionVerb,
|
|
4908
5064
|
preWord ? ` ${preWord}` : ""
|
|
4909
5065
|
] }),
|
|
4910
|
-
/* @__PURE__ */
|
|
5066
|
+
/* @__PURE__ */ jsx14(
|
|
4911
5067
|
"button",
|
|
4912
5068
|
{
|
|
4913
5069
|
type: "button",
|
|
@@ -4916,7 +5072,7 @@ var DepChip = ({
|
|
|
4916
5072
|
children: "\u2212"
|
|
4917
5073
|
}
|
|
4918
5074
|
),
|
|
4919
|
-
/* @__PURE__ */
|
|
5075
|
+
/* @__PURE__ */ jsx14(
|
|
4920
5076
|
"input",
|
|
4921
5077
|
{
|
|
4922
5078
|
type: "number",
|
|
@@ -4932,7 +5088,7 @@ var DepChip = ({
|
|
|
4932
5088
|
}
|
|
4933
5089
|
}
|
|
4934
5090
|
),
|
|
4935
|
-
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */
|
|
5091
|
+
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */ jsx14(
|
|
4936
5092
|
"button",
|
|
4937
5093
|
{
|
|
4938
5094
|
type: "button",
|
|
@@ -4941,17 +5097,17 @@ var DepChip = ({
|
|
|
4941
5097
|
children: "+"
|
|
4942
5098
|
}
|
|
4943
5099
|
),
|
|
4944
|
-
effectiveLag !== 0 && /* @__PURE__ */
|
|
4945
|
-
/* @__PURE__ */
|
|
5100
|
+
effectiveLag !== 0 && /* @__PURE__ */ jsx14("span", { children: "\u0434." }),
|
|
5101
|
+
/* @__PURE__ */ jsx14("span", { children: afterWhat })
|
|
4946
5102
|
] }),
|
|
4947
|
-
/* @__PURE__ */
|
|
5103
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-pred", children: [
|
|
4948
5104
|
formatTaskNumberLabel(predecessorTaskNumber),
|
|
4949
5105
|
depName
|
|
4950
5106
|
] }),
|
|
4951
|
-
!disableDependencyEditing && /* @__PURE__ */
|
|
4952
|
-
/* @__PURE__ */
|
|
4953
|
-
/* @__PURE__ */
|
|
4954
|
-
/* @__PURE__ */
|
|
5107
|
+
!disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
5108
|
+
/* @__PURE__ */ jsx14("hr", { className: "gantt-tl-dep-edit-divider" }),
|
|
5109
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-actions", children: [
|
|
5110
|
+
/* @__PURE__ */ jsx14(
|
|
4955
5111
|
"button",
|
|
4956
5112
|
{
|
|
4957
5113
|
type: "button",
|
|
@@ -4963,7 +5119,7 @@ var DepChip = ({
|
|
|
4963
5119
|
children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C"
|
|
4964
5120
|
}
|
|
4965
5121
|
),
|
|
4966
|
-
/* @__PURE__ */
|
|
5122
|
+
/* @__PURE__ */ jsx14(
|
|
4967
5123
|
"button",
|
|
4968
5124
|
{
|
|
4969
5125
|
type: "button",
|
|
@@ -5083,8 +5239,8 @@ var TaskListRow = React10.memo(
|
|
|
5083
5239
|
taskDateChangeMode = "preserve-duration",
|
|
5084
5240
|
onTaskDateChangeModeChange
|
|
5085
5241
|
}) => {
|
|
5086
|
-
const [editingColumnId, setEditingColumnId] =
|
|
5087
|
-
const [editingColumnStartValue, setEditingColumnStartValue] =
|
|
5242
|
+
const [editingColumnId, setEditingColumnId] = useState5(null);
|
|
5243
|
+
const [editingColumnStartValue, setEditingColumnStartValue] = useState5(void 0);
|
|
5088
5244
|
const editingName = editingColumnId === "name";
|
|
5089
5245
|
const editingDuration = editingColumnId === "duration";
|
|
5090
5246
|
const editingProgress = editingColumnId === "progress";
|
|
@@ -5115,19 +5271,19 @@ var TaskListRow = React10.memo(
|
|
|
5115
5271
|
}, [columnWidthStyleMap]);
|
|
5116
5272
|
const normalizedTask = useMemo8(() => normalizeTaskDatesForType(task), [task]);
|
|
5117
5273
|
const isMilestone = useMemo8(() => isMilestoneTask(normalizedTask), [normalizedTask]);
|
|
5118
|
-
const [nameValue, setNameValue] =
|
|
5274
|
+
const [nameValue, setNameValue] = useState5("");
|
|
5119
5275
|
const nameInputRef = useRef4(null);
|
|
5120
|
-
const [durationValue, setDurationValue] =
|
|
5276
|
+
const [durationValue, setDurationValue] = useState5(
|
|
5121
5277
|
() => getInclusiveDurationDays(normalizedTask.startDate, normalizedTask.endDate)
|
|
5122
5278
|
);
|
|
5123
5279
|
const durationInputRef = useRef4(null);
|
|
5124
5280
|
const dependencySearchInputRef = useRef4(null);
|
|
5125
5281
|
const dependencySearchListRef = useRef4(null);
|
|
5126
|
-
const [progressValue, setProgressValue] =
|
|
5282
|
+
const [progressValue, setProgressValue] = useState5(0);
|
|
5127
5283
|
const progressInputRef = useRef4(null);
|
|
5128
|
-
const [overflowOpen, setOverflowOpen] =
|
|
5129
|
-
const [contextMenuOpen, setContextMenuOpen] =
|
|
5130
|
-
const [colorMenuOpen, setColorMenuOpen] =
|
|
5284
|
+
const [overflowOpen, setOverflowOpen] = useState5(false);
|
|
5285
|
+
const [contextMenuOpen, setContextMenuOpen] = useState5(false);
|
|
5286
|
+
const [colorMenuOpen, setColorMenuOpen] = useState5(false);
|
|
5131
5287
|
const nameConfirmedRef = useRef4(false);
|
|
5132
5288
|
const durationConfirmedRef = useRef4(false);
|
|
5133
5289
|
const progressConfirmedRef = useRef4(false);
|
|
@@ -5167,8 +5323,8 @@ var TaskListRow = React10.memo(
|
|
|
5167
5323
|
}, []);
|
|
5168
5324
|
const isPicking = selectingPredecessorFor != null;
|
|
5169
5325
|
const isSourceRow = isPicking && selectingPredecessorFor === task.id;
|
|
5170
|
-
const [dependencySearchQuery, setDependencySearchQuery] =
|
|
5171
|
-
const [highlightedDependencyIndex, setHighlightedDependencyIndex] =
|
|
5326
|
+
const [dependencySearchQuery, setDependencySearchQuery] = useState5("");
|
|
5327
|
+
const [highlightedDependencyIndex, setHighlightedDependencyIndex] = useState5(0);
|
|
5172
5328
|
const chips = useMemo8(() => {
|
|
5173
5329
|
const taskById = new Map((allTasks ?? []).map((t) => [t.id, t]));
|
|
5174
5330
|
return (task.dependencies ?? []).map((dep) => {
|
|
@@ -5612,8 +5768,8 @@ var TaskListRow = React10.memo(
|
|
|
5612
5768
|
},
|
|
5613
5769
|
[task, onTasksChange, businessDays, getDuration, weekendPredicate, allTasks, isMilestone, emitMilestoneDateChange, taskDateChangeMode]
|
|
5614
5770
|
);
|
|
5615
|
-
const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */
|
|
5616
|
-
/* @__PURE__ */
|
|
5771
|
+
const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */ jsxs10("label", { className: "gantt-datepicker-mode-checkbox", children: [
|
|
5772
|
+
/* @__PURE__ */ jsx14(
|
|
5617
5773
|
"input",
|
|
5618
5774
|
{
|
|
5619
5775
|
type: "checkbox",
|
|
@@ -5621,7 +5777,7 @@ var TaskListRow = React10.memo(
|
|
|
5621
5777
|
onChange: (event) => onTaskDateChangeModeChange(event.target.checked ? "preserve-duration" : "free")
|
|
5622
5778
|
}
|
|
5623
5779
|
),
|
|
5624
|
-
/* @__PURE__ */
|
|
5780
|
+
/* @__PURE__ */ jsx14("span", { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C" })
|
|
5625
5781
|
] }) : null;
|
|
5626
5782
|
const handleRowClickInternal = useCallback5(() => {
|
|
5627
5783
|
onRowClick?.(task.id);
|
|
@@ -5772,14 +5928,14 @@ var TaskListRow = React10.memo(
|
|
|
5772
5928
|
},
|
|
5773
5929
|
[allTasks, dependencyPickMode, onRemoveDependency, task.dependencies, task.id]
|
|
5774
5930
|
);
|
|
5775
|
-
const sourcePickerContent = /* @__PURE__ */
|
|
5931
|
+
const sourcePickerContent = /* @__PURE__ */ jsxs10(
|
|
5776
5932
|
"div",
|
|
5777
5933
|
{
|
|
5778
5934
|
className: "gantt-tl-dep-source-picker",
|
|
5779
5935
|
onClick: (e) => e.stopPropagation(),
|
|
5780
5936
|
children: [
|
|
5781
|
-
/* @__PURE__ */
|
|
5782
|
-
/* @__PURE__ */
|
|
5937
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-source-direction", children: [
|
|
5938
|
+
/* @__PURE__ */ jsx14(
|
|
5783
5939
|
"button",
|
|
5784
5940
|
{
|
|
5785
5941
|
type: "button",
|
|
@@ -5788,7 +5944,7 @@ var TaskListRow = React10.memo(
|
|
|
5788
5944
|
children: "\u041F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C"
|
|
5789
5945
|
}
|
|
5790
5946
|
),
|
|
5791
|
-
/* @__PURE__ */
|
|
5947
|
+
/* @__PURE__ */ jsx14(
|
|
5792
5948
|
"button",
|
|
5793
5949
|
{
|
|
5794
5950
|
type: "button",
|
|
@@ -5798,9 +5954,9 @@ var TaskListRow = React10.memo(
|
|
|
5798
5954
|
}
|
|
5799
5955
|
)
|
|
5800
5956
|
] }),
|
|
5801
|
-
/* @__PURE__ */
|
|
5957
|
+
/* @__PURE__ */ jsx14("div", { className: "gantt-tl-dep-source-types", children: LINK_TYPE_ORDER.map((linkType) => {
|
|
5802
5958
|
const Icon = LINK_TYPE_ICONS[linkType];
|
|
5803
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsxs10(
|
|
5804
5960
|
"button",
|
|
5805
5961
|
{
|
|
5806
5962
|
type: "button",
|
|
@@ -5809,14 +5965,14 @@ var TaskListRow = React10.memo(
|
|
|
5809
5965
|
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u0441\u0432\u044F\u0437\u0438 ${linkType}`,
|
|
5810
5966
|
title: linkType,
|
|
5811
5967
|
children: [
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5968
|
+
/* @__PURE__ */ jsx14(Icon, {}),
|
|
5969
|
+
/* @__PURE__ */ jsx14("span", { children: LINK_TYPE_LABELS_RU2[linkType] })
|
|
5814
5970
|
]
|
|
5815
5971
|
},
|
|
5816
5972
|
linkType
|
|
5817
5973
|
);
|
|
5818
5974
|
}) }),
|
|
5819
|
-
/* @__PURE__ */
|
|
5975
|
+
/* @__PURE__ */ jsx14("div", { className: "gantt-tl-dep-source-picker-head", children: /* @__PURE__ */ jsx14(
|
|
5820
5976
|
"input",
|
|
5821
5977
|
{
|
|
5822
5978
|
ref: dependencySearchInputRef,
|
|
@@ -5858,12 +6014,12 @@ var TaskListRow = React10.memo(
|
|
|
5858
6014
|
}
|
|
5859
6015
|
}
|
|
5860
6016
|
) }),
|
|
5861
|
-
/* @__PURE__ */
|
|
6017
|
+
/* @__PURE__ */ jsx14(
|
|
5862
6018
|
"div",
|
|
5863
6019
|
{
|
|
5864
6020
|
ref: dependencySearchListRef,
|
|
5865
6021
|
className: "gantt-tl-dep-source-list",
|
|
5866
|
-
children: dependencySearchCandidates.length > 0 ? dependencySearchCandidates.map(({ task: candidate, label, isAlreadyLinked }, index) => /* @__PURE__ */
|
|
6022
|
+
children: dependencySearchCandidates.length > 0 ? dependencySearchCandidates.map(({ task: candidate, label, isAlreadyLinked }, index) => /* @__PURE__ */ jsxs10(
|
|
5867
6023
|
"button",
|
|
5868
6024
|
{
|
|
5869
6025
|
type: "button",
|
|
@@ -5883,8 +6039,8 @@ var TaskListRow = React10.memo(
|
|
|
5883
6039
|
},
|
|
5884
6040
|
title: label,
|
|
5885
6041
|
children: [
|
|
5886
|
-
/* @__PURE__ */
|
|
5887
|
-
isAlreadyLinked && /* @__PURE__ */
|
|
6042
|
+
/* @__PURE__ */ jsx14("span", { className: "gantt-tl-dep-source-option-label", children: label }),
|
|
6043
|
+
isAlreadyLinked && /* @__PURE__ */ jsx14(
|
|
5888
6044
|
"span",
|
|
5889
6045
|
{
|
|
5890
6046
|
className: "gantt-tl-dep-source-option-remove",
|
|
@@ -5899,7 +6055,7 @@ var TaskListRow = React10.memo(
|
|
|
5899
6055
|
]
|
|
5900
6056
|
},
|
|
5901
6057
|
candidate.id
|
|
5902
|
-
)) : /* @__PURE__ */
|
|
6058
|
+
)) : /* @__PURE__ */ jsx14("span", { className: "gantt-tl-dep-source-hint", children: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E" })
|
|
5903
6059
|
}
|
|
5904
6060
|
)
|
|
5905
6061
|
]
|
|
@@ -5909,13 +6065,13 @@ var TaskListRow = React10.memo(
|
|
|
5909
6065
|
const isSelectedDependencyOwner = selectedChip != null && selectedChip.successorId === task.id;
|
|
5910
6066
|
const startDateISO = toISODate2(normalizedTask.startDate);
|
|
5911
6067
|
const endDateISO = editingDuration ? getEndDate(normalizedTask.startDate, durationValue) : toISODate2(normalizedTask.endDate);
|
|
5912
|
-
const selectionCell = /* @__PURE__ */
|
|
6068
|
+
const selectionCell = /* @__PURE__ */ jsx14(
|
|
5913
6069
|
"div",
|
|
5914
6070
|
{
|
|
5915
6071
|
className: "gantt-tl-cell gantt-tl-cell-selection",
|
|
5916
6072
|
style: getColumnStyle("selection", 36),
|
|
5917
6073
|
onClick: (e) => e.stopPropagation(),
|
|
5918
|
-
children: /* @__PURE__ */
|
|
6074
|
+
children: /* @__PURE__ */ jsx14(
|
|
5919
6075
|
"input",
|
|
5920
6076
|
{
|
|
5921
6077
|
type: "checkbox",
|
|
@@ -5927,14 +6083,14 @@ var TaskListRow = React10.memo(
|
|
|
5927
6083
|
)
|
|
5928
6084
|
}
|
|
5929
6085
|
);
|
|
5930
|
-
const numberCell = /* @__PURE__ */
|
|
6086
|
+
const numberCell = /* @__PURE__ */ jsxs10(
|
|
5931
6087
|
"div",
|
|
5932
6088
|
{
|
|
5933
6089
|
className: `gantt-tl-cell gantt-tl-cell-number${onDragStart ? " gantt-tl-cell-number-reorderable" : ""}`,
|
|
5934
6090
|
style: getColumnStyle("number", 40),
|
|
5935
6091
|
onClick: handleNumberClick,
|
|
5936
6092
|
children: [
|
|
5937
|
-
onDragStart && /* @__PURE__ */
|
|
6093
|
+
onDragStart && /* @__PURE__ */ jsx14(
|
|
5938
6094
|
"span",
|
|
5939
6095
|
{
|
|
5940
6096
|
className: "gantt-tl-drag-handle",
|
|
@@ -5945,10 +6101,10 @@ var TaskListRow = React10.memo(
|
|
|
5945
6101
|
},
|
|
5946
6102
|
onDragEnd: (e) => onDragEnd?.(e),
|
|
5947
6103
|
onClick: (e) => e.stopPropagation(),
|
|
5948
|
-
children: /* @__PURE__ */
|
|
6104
|
+
children: /* @__PURE__ */ jsx14(DragHandleIcon, {})
|
|
5949
6105
|
}
|
|
5950
6106
|
),
|
|
5951
|
-
/* @__PURE__ */
|
|
6107
|
+
/* @__PURE__ */ jsx14("span", { className: "gantt-tl-num-label", children: taskNumber || rowIndex + 1 })
|
|
5952
6108
|
]
|
|
5953
6109
|
}
|
|
5954
6110
|
);
|
|
@@ -5964,12 +6120,12 @@ var TaskListRow = React10.memo(
|
|
|
5964
6120
|
const nestedAxisDepth = Math.max(0, nestingDepth);
|
|
5965
6121
|
return `${numberColumnWidth + nestedAxisDepth * 20 + 9}px`;
|
|
5966
6122
|
})();
|
|
5967
|
-
const nameCell = /* @__PURE__ */
|
|
5968
|
-
isChild && !editingName && /* @__PURE__ */
|
|
5969
|
-
!isFilterHideMode && /* @__PURE__ */
|
|
6123
|
+
const nameCell = /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-cell gantt-tl-cell-name", style: getColumnStyle("name", 200), children: [
|
|
6124
|
+
isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
6125
|
+
!isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
5970
6126
|
ancestorLineModes.map(
|
|
5971
|
-
(mode, idx) => mode ? /* @__PURE__ */
|
|
5972
|
-
/* @__PURE__ */
|
|
6127
|
+
(mode, idx) => mode ? /* @__PURE__ */ jsxs10(React10.Fragment, { children: [
|
|
6128
|
+
/* @__PURE__ */ jsx14(
|
|
5973
6129
|
"span",
|
|
5974
6130
|
{
|
|
5975
6131
|
"data-testid": `gantt-tl-ancestor-connector-${idx}`,
|
|
@@ -5985,7 +6141,7 @@ var TaskListRow = React10.memo(
|
|
|
5985
6141
|
}
|
|
5986
6142
|
}
|
|
5987
6143
|
),
|
|
5988
|
-
mode === "half" && /* @__PURE__ */
|
|
6144
|
+
mode === "half" && /* @__PURE__ */ jsx14(
|
|
5989
6145
|
"span",
|
|
5990
6146
|
{
|
|
5991
6147
|
"data-testid": `gantt-tl-ancestor-connector-cap-${idx}`,
|
|
@@ -6003,7 +6159,7 @@ var TaskListRow = React10.memo(
|
|
|
6003
6159
|
)
|
|
6004
6160
|
] }, idx) : null
|
|
6005
6161
|
),
|
|
6006
|
-
nestingDepth > 0 && /* @__PURE__ */
|
|
6162
|
+
nestingDepth > 0 && /* @__PURE__ */ jsx14(
|
|
6007
6163
|
"span",
|
|
6008
6164
|
{
|
|
6009
6165
|
"data-testid": "gantt-tl-child-connector-vertical",
|
|
@@ -6019,7 +6175,7 @@ var TaskListRow = React10.memo(
|
|
|
6019
6175
|
}
|
|
6020
6176
|
}
|
|
6021
6177
|
),
|
|
6022
|
-
/* @__PURE__ */
|
|
6178
|
+
/* @__PURE__ */ jsx14(
|
|
6023
6179
|
"span",
|
|
6024
6180
|
{
|
|
6025
6181
|
style: {
|
|
@@ -6034,7 +6190,7 @@ var TaskListRow = React10.memo(
|
|
|
6034
6190
|
}
|
|
6035
6191
|
}
|
|
6036
6192
|
),
|
|
6037
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsx14(
|
|
6038
6194
|
"span",
|
|
6039
6195
|
{
|
|
6040
6196
|
style: {
|
|
@@ -6050,8 +6206,8 @@ var TaskListRow = React10.memo(
|
|
|
6050
6206
|
}
|
|
6051
6207
|
)
|
|
6052
6208
|
] }),
|
|
6053
|
-
isParent && !editingName && /* @__PURE__ */
|
|
6054
|
-
!isFilterHideMode && !isCollapsed && /* @__PURE__ */
|
|
6209
|
+
isParent && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
6210
|
+
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx14(
|
|
6055
6211
|
"span",
|
|
6056
6212
|
{
|
|
6057
6213
|
style: {
|
|
@@ -6066,7 +6222,7 @@ var TaskListRow = React10.memo(
|
|
|
6066
6222
|
}
|
|
6067
6223
|
}
|
|
6068
6224
|
),
|
|
6069
|
-
/* @__PURE__ */
|
|
6225
|
+
/* @__PURE__ */ jsx14(
|
|
6070
6226
|
"button",
|
|
6071
6227
|
{
|
|
6072
6228
|
type: "button",
|
|
@@ -6074,13 +6230,13 @@ var TaskListRow = React10.memo(
|
|
|
6074
6230
|
onClick: handleToggleCollapse,
|
|
6075
6231
|
style: { left: `${nestingDepth * 20 + 1}px` },
|
|
6076
6232
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
6077
|
-
children: /* @__PURE__ */
|
|
6233
|
+
children: /* @__PURE__ */ jsx14(ChevronRightIcon, {})
|
|
6078
6234
|
}
|
|
6079
6235
|
)
|
|
6080
6236
|
] })
|
|
6081
6237
|
] }),
|
|
6082
|
-
!isChild && isParent && !editingName && /* @__PURE__ */
|
|
6083
|
-
!isFilterHideMode && !isCollapsed && /* @__PURE__ */
|
|
6238
|
+
!isChild && isParent && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
6239
|
+
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx14(
|
|
6084
6240
|
"span",
|
|
6085
6241
|
{
|
|
6086
6242
|
"data-testid": "gantt-tl-parent-connector-tail",
|
|
@@ -6096,7 +6252,7 @@ var TaskListRow = React10.memo(
|
|
|
6096
6252
|
}
|
|
6097
6253
|
}
|
|
6098
6254
|
),
|
|
6099
|
-
/* @__PURE__ */
|
|
6255
|
+
/* @__PURE__ */ jsx14(
|
|
6100
6256
|
"button",
|
|
6101
6257
|
{
|
|
6102
6258
|
type: "button",
|
|
@@ -6104,11 +6260,11 @@ var TaskListRow = React10.memo(
|
|
|
6104
6260
|
onClick: handleToggleCollapse,
|
|
6105
6261
|
style: { left: `${nestingDepth * 20 + 1}px` },
|
|
6106
6262
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
6107
|
-
children: /* @__PURE__ */
|
|
6263
|
+
children: /* @__PURE__ */ jsx14(ChevronRightIcon, {})
|
|
6108
6264
|
}
|
|
6109
6265
|
)
|
|
6110
6266
|
] }),
|
|
6111
|
-
editingName ? /* @__PURE__ */
|
|
6267
|
+
editingName ? /* @__PURE__ */ jsx14(
|
|
6112
6268
|
Input,
|
|
6113
6269
|
{
|
|
6114
6270
|
ref: nameInputRef,
|
|
@@ -6121,7 +6277,7 @@ var TaskListRow = React10.memo(
|
|
|
6121
6277
|
style: { paddingLeft: nameInputPaddingLeft },
|
|
6122
6278
|
onClick: (e) => e.stopPropagation()
|
|
6123
6279
|
}
|
|
6124
|
-
) : /* @__PURE__ */
|
|
6280
|
+
) : /* @__PURE__ */ jsxs10(
|
|
6125
6281
|
"button",
|
|
6126
6282
|
{
|
|
6127
6283
|
type: "button",
|
|
@@ -6137,12 +6293,12 @@ var TaskListRow = React10.memo(
|
|
|
6137
6293
|
paddingRight: task.color ? "20px" : void 0
|
|
6138
6294
|
},
|
|
6139
6295
|
children: [
|
|
6140
|
-
taskListNamePrefixIcon ? /* @__PURE__ */
|
|
6141
|
-
/* @__PURE__ */
|
|
6296
|
+
taskListNamePrefixIcon ? /* @__PURE__ */ jsx14("span", { className: "gantt-tl-name-trigger-icon", "aria-hidden": "true", children: taskListNamePrefixIcon }) : null,
|
|
6297
|
+
/* @__PURE__ */ jsx14("span", { className: "gantt-tl-name-trigger-text", children: task.name })
|
|
6142
6298
|
]
|
|
6143
6299
|
}
|
|
6144
6300
|
),
|
|
6145
|
-
!editingName && task.color && /* @__PURE__ */
|
|
6301
|
+
!editingName && task.color && /* @__PURE__ */ jsx14(
|
|
6146
6302
|
"span",
|
|
6147
6303
|
{
|
|
6148
6304
|
className: "gantt-tl-name-color-stripe",
|
|
@@ -6150,8 +6306,8 @@ var TaskListRow = React10.memo(
|
|
|
6150
6306
|
"aria-hidden": "true"
|
|
6151
6307
|
}
|
|
6152
6308
|
),
|
|
6153
|
-
!editingName && !hideTaskListRowActions && (onInsertAfter || onDelete || onPromoteTask || onDemoteTask || onUngroupTask || onDuplicateTask || onTasksChange || hasContextMenu) && /* @__PURE__ */
|
|
6154
|
-
onInsertAfter && /* @__PURE__ */
|
|
6309
|
+
!editingName && !hideTaskListRowActions && (onInsertAfter || onDelete || onPromoteTask || onDemoteTask || onUngroupTask || onDuplicateTask || onTasksChange || hasContextMenu) && /* @__PURE__ */ jsxs10("div", { className: `gantt-tl-name-actions${contextMenuOpen ? " gantt-tl-name-actions-open" : ""}`, children: [
|
|
6310
|
+
onInsertAfter && /* @__PURE__ */ jsx14(
|
|
6155
6311
|
"button",
|
|
6156
6312
|
{
|
|
6157
6313
|
type: "button",
|
|
@@ -6173,10 +6329,10 @@ var TaskListRow = React10.memo(
|
|
|
6173
6329
|
onInsertAfter(task.id, newTask);
|
|
6174
6330
|
},
|
|
6175
6331
|
"aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443 \u043F\u043E\u0441\u043B\u0435 \u044D\u0442\u043E\u0439",
|
|
6176
|
-
children: /* @__PURE__ */
|
|
6332
|
+
children: /* @__PURE__ */ jsx14(PlusIcon, {})
|
|
6177
6333
|
}
|
|
6178
6334
|
),
|
|
6179
|
-
/* @__PURE__ */
|
|
6335
|
+
/* @__PURE__ */ jsx14(
|
|
6180
6336
|
HierarchyButton,
|
|
6181
6337
|
{
|
|
6182
6338
|
isChild,
|
|
@@ -6186,11 +6342,11 @@ var TaskListRow = React10.memo(
|
|
|
6186
6342
|
onDemote: onDemoteTask ? handleDemote : void 0
|
|
6187
6343
|
}
|
|
6188
6344
|
),
|
|
6189
|
-
hasContextMenu && /* @__PURE__ */
|
|
6345
|
+
hasContextMenu && /* @__PURE__ */ jsxs10(Popover, { open: contextMenuOpen, onOpenChange: (open) => {
|
|
6190
6346
|
setContextMenuOpen(open);
|
|
6191
6347
|
if (!open) closeColorMenu();
|
|
6192
6348
|
}, children: [
|
|
6193
|
-
/* @__PURE__ */
|
|
6349
|
+
/* @__PURE__ */ jsx14(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
|
|
6194
6350
|
"button",
|
|
6195
6351
|
{
|
|
6196
6352
|
type: "button",
|
|
@@ -6200,11 +6356,11 @@ var TaskListRow = React10.memo(
|
|
|
6200
6356
|
setContextMenuOpen((v) => !v);
|
|
6201
6357
|
},
|
|
6202
6358
|
"aria-label": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
6203
|
-
children: /* @__PURE__ */
|
|
6359
|
+
children: /* @__PURE__ */ jsx14(VerticalDotsIcon, {})
|
|
6204
6360
|
}
|
|
6205
6361
|
) }),
|
|
6206
|
-
/* @__PURE__ */
|
|
6207
|
-
onTasksChange && /* @__PURE__ */
|
|
6362
|
+
/* @__PURE__ */ jsxs10(PopoverContent, { className: "gantt-tl-context-menu", portal: true, align: "end", children: [
|
|
6363
|
+
onTasksChange && /* @__PURE__ */ jsxs10(
|
|
6208
6364
|
"div",
|
|
6209
6365
|
{
|
|
6210
6366
|
className: "gantt-tl-context-menu-section gantt-tl-context-submenu-wrap",
|
|
@@ -6219,7 +6375,7 @@ var TaskListRow = React10.memo(
|
|
|
6219
6375
|
}
|
|
6220
6376
|
},
|
|
6221
6377
|
children: [
|
|
6222
|
-
/* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ jsxs10(
|
|
6223
6379
|
"button",
|
|
6224
6380
|
{
|
|
6225
6381
|
type: "button",
|
|
@@ -6228,8 +6384,8 @@ var TaskListRow = React10.memo(
|
|
|
6228
6384
|
"aria-expanded": colorMenuOpen,
|
|
6229
6385
|
"aria-haspopup": "menu",
|
|
6230
6386
|
children: [
|
|
6231
|
-
/* @__PURE__ */
|
|
6232
|
-
task.color && /* @__PURE__ */
|
|
6387
|
+
/* @__PURE__ */ jsxs10("span", { className: "gantt-tl-context-menu-item-main", children: [
|
|
6388
|
+
task.color && /* @__PURE__ */ jsx14(
|
|
6233
6389
|
"span",
|
|
6234
6390
|
{
|
|
6235
6391
|
className: "gantt-tl-color-swatch gantt-tl-color-swatch-inline",
|
|
@@ -6239,12 +6395,12 @@ var TaskListRow = React10.memo(
|
|
|
6239
6395
|
),
|
|
6240
6396
|
"\u0426\u0432\u0435\u0442"
|
|
6241
6397
|
] }),
|
|
6242
|
-
/* @__PURE__ */
|
|
6398
|
+
/* @__PURE__ */ jsx14(ChevronRightIcon, {})
|
|
6243
6399
|
]
|
|
6244
6400
|
}
|
|
6245
6401
|
),
|
|
6246
|
-
colorMenuOpen && /* @__PURE__ */
|
|
6247
|
-
/* @__PURE__ */
|
|
6402
|
+
colorMenuOpen && /* @__PURE__ */ jsx14("div", { className: "gantt-tl-context-submenu", role: "menu", "aria-label": "\u0412\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430", children: /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-color-grid", children: [
|
|
6403
|
+
/* @__PURE__ */ jsx14(
|
|
6248
6404
|
"button",
|
|
6249
6405
|
{
|
|
6250
6406
|
type: "button",
|
|
@@ -6255,10 +6411,10 @@ var TaskListRow = React10.memo(
|
|
|
6255
6411
|
},
|
|
6256
6412
|
"aria-label": "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
6257
6413
|
title: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
6258
|
-
children: /* @__PURE__ */
|
|
6414
|
+
children: /* @__PURE__ */ jsx14("span", { className: "gantt-tl-color-swatch-clear-line" })
|
|
6259
6415
|
}
|
|
6260
6416
|
),
|
|
6261
|
-
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */
|
|
6417
|
+
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */ jsx14(
|
|
6262
6418
|
"button",
|
|
6263
6419
|
{
|
|
6264
6420
|
type: "button",
|
|
@@ -6277,7 +6433,7 @@ var TaskListRow = React10.memo(
|
|
|
6277
6433
|
]
|
|
6278
6434
|
}
|
|
6279
6435
|
),
|
|
6280
|
-
onDuplicateTask && /* @__PURE__ */
|
|
6436
|
+
onDuplicateTask && /* @__PURE__ */ jsxs10(
|
|
6281
6437
|
"button",
|
|
6282
6438
|
{
|
|
6283
6439
|
type: "button",
|
|
@@ -6288,14 +6444,14 @@ var TaskListRow = React10.memo(
|
|
|
6288
6444
|
onDuplicateTask(task.id);
|
|
6289
6445
|
},
|
|
6290
6446
|
children: [
|
|
6291
|
-
/* @__PURE__ */
|
|
6447
|
+
/* @__PURE__ */ jsx14(CopyIcon, {}),
|
|
6292
6448
|
"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
6293
6449
|
]
|
|
6294
6450
|
}
|
|
6295
6451
|
),
|
|
6296
|
-
visibleCustomMenuCommands.map((command) => /* @__PURE__ */
|
|
6297
|
-
command.divider === "top" && /* @__PURE__ */
|
|
6298
|
-
/* @__PURE__ */
|
|
6452
|
+
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ jsxs10(React10.Fragment, { children: [
|
|
6453
|
+
command.divider === "top" && /* @__PURE__ */ jsx14("hr", { className: "gantt-tl-context-menu-divider" }),
|
|
6454
|
+
/* @__PURE__ */ jsxs10(
|
|
6299
6455
|
"button",
|
|
6300
6456
|
{
|
|
6301
6457
|
type: "button",
|
|
@@ -6308,21 +6464,21 @@ var TaskListRow = React10.memo(
|
|
|
6308
6464
|
]
|
|
6309
6465
|
}
|
|
6310
6466
|
),
|
|
6311
|
-
command.divider === "bottom" && /* @__PURE__ */
|
|
6467
|
+
command.divider === "bottom" && /* @__PURE__ */ jsx14("hr", { className: "gantt-tl-context-menu-divider" })
|
|
6312
6468
|
] }, command.id)),
|
|
6313
|
-
isParent && onUngroupTask && /* @__PURE__ */
|
|
6469
|
+
isParent && onUngroupTask && /* @__PURE__ */ jsxs10(
|
|
6314
6470
|
"button",
|
|
6315
6471
|
{
|
|
6316
6472
|
type: "button",
|
|
6317
6473
|
className: "gantt-tl-context-menu-item",
|
|
6318
6474
|
onClick: handleUngroup,
|
|
6319
6475
|
children: [
|
|
6320
|
-
/* @__PURE__ */
|
|
6476
|
+
/* @__PURE__ */ jsx14(UngroupIcon, {}),
|
|
6321
6477
|
"\u0420\u0430\u0437\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
6322
6478
|
]
|
|
6323
6479
|
}
|
|
6324
6480
|
),
|
|
6325
|
-
onDelete && /* @__PURE__ */
|
|
6481
|
+
onDelete && /* @__PURE__ */ jsxs10(
|
|
6326
6482
|
"button",
|
|
6327
6483
|
{
|
|
6328
6484
|
type: "button",
|
|
@@ -6333,7 +6489,7 @@ var TaskListRow = React10.memo(
|
|
|
6333
6489
|
onDelete(task.id);
|
|
6334
6490
|
},
|
|
6335
6491
|
children: [
|
|
6336
|
-
/* @__PURE__ */
|
|
6492
|
+
/* @__PURE__ */ jsx14(TrashIcon, {}),
|
|
6337
6493
|
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
6338
6494
|
]
|
|
6339
6495
|
}
|
|
@@ -6342,13 +6498,13 @@ var TaskListRow = React10.memo(
|
|
|
6342
6498
|
] })
|
|
6343
6499
|
] })
|
|
6344
6500
|
] });
|
|
6345
|
-
const startDateCell = /* @__PURE__ */
|
|
6501
|
+
const startDateCell = /* @__PURE__ */ jsx14(
|
|
6346
6502
|
"div",
|
|
6347
6503
|
{
|
|
6348
6504
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
6349
6505
|
style: getColumnStyle("startDate", 90),
|
|
6350
6506
|
onClick: (e) => e.stopPropagation(),
|
|
6351
|
-
children: /* @__PURE__ */
|
|
6507
|
+
children: /* @__PURE__ */ jsx14(
|
|
6352
6508
|
DatePicker,
|
|
6353
6509
|
{
|
|
6354
6510
|
value: startDateISO,
|
|
@@ -6363,13 +6519,13 @@ var TaskListRow = React10.memo(
|
|
|
6363
6519
|
)
|
|
6364
6520
|
}
|
|
6365
6521
|
);
|
|
6366
|
-
const endDateCell = /* @__PURE__ */
|
|
6522
|
+
const endDateCell = /* @__PURE__ */ jsx14(
|
|
6367
6523
|
"div",
|
|
6368
6524
|
{
|
|
6369
6525
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
6370
6526
|
style: getColumnStyle("endDate", 90),
|
|
6371
6527
|
onClick: (e) => e.stopPropagation(),
|
|
6372
|
-
children: /* @__PURE__ */
|
|
6528
|
+
children: /* @__PURE__ */ jsx14(
|
|
6373
6529
|
DatePicker,
|
|
6374
6530
|
{
|
|
6375
6531
|
value: endDateISO,
|
|
@@ -6384,20 +6540,20 @@ var TaskListRow = React10.memo(
|
|
|
6384
6540
|
)
|
|
6385
6541
|
}
|
|
6386
6542
|
);
|
|
6387
|
-
const durationCell = /* @__PURE__ */
|
|
6543
|
+
const durationCell = /* @__PURE__ */ jsxs10(
|
|
6388
6544
|
"div",
|
|
6389
6545
|
{
|
|
6390
6546
|
className: "gantt-tl-cell gantt-tl-cell-duration",
|
|
6391
6547
|
style: getColumnStyle("duration", 60),
|
|
6392
6548
|
onClick: handleDurationClick,
|
|
6393
6549
|
children: [
|
|
6394
|
-
editingDuration && /* @__PURE__ */
|
|
6550
|
+
editingDuration && /* @__PURE__ */ jsxs10(
|
|
6395
6551
|
"div",
|
|
6396
6552
|
{
|
|
6397
6553
|
className: "gantt-tl-number-editor",
|
|
6398
6554
|
onClick: (e) => e.stopPropagation(),
|
|
6399
6555
|
children: [
|
|
6400
|
-
/* @__PURE__ */
|
|
6556
|
+
/* @__PURE__ */ jsx14(
|
|
6401
6557
|
Input,
|
|
6402
6558
|
{
|
|
6403
6559
|
ref: durationInputRef,
|
|
@@ -6411,8 +6567,8 @@ var TaskListRow = React10.memo(
|
|
|
6411
6567
|
className: "gantt-tl-number-input"
|
|
6412
6568
|
}
|
|
6413
6569
|
),
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
6571
|
+
/* @__PURE__ */ jsx14(
|
|
6416
6572
|
"button",
|
|
6417
6573
|
{
|
|
6418
6574
|
type: "button",
|
|
@@ -6420,7 +6576,7 @@ var TaskListRow = React10.memo(
|
|
|
6420
6576
|
tabIndex: -1,
|
|
6421
6577
|
onMouseDown: (e) => e.preventDefault(),
|
|
6422
6578
|
onClick: () => handleDurationAdjust(1),
|
|
6423
|
-
children: /* @__PURE__ */
|
|
6579
|
+
children: /* @__PURE__ */ jsx14(
|
|
6424
6580
|
"svg",
|
|
6425
6581
|
{
|
|
6426
6582
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6432,12 +6588,12 @@ var TaskListRow = React10.memo(
|
|
|
6432
6588
|
strokeWidth: "2",
|
|
6433
6589
|
strokeLinecap: "round",
|
|
6434
6590
|
strokeLinejoin: "round",
|
|
6435
|
-
children: /* @__PURE__ */
|
|
6591
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m18 15-6-6-6 6" })
|
|
6436
6592
|
}
|
|
6437
6593
|
)
|
|
6438
6594
|
}
|
|
6439
6595
|
),
|
|
6440
|
-
/* @__PURE__ */
|
|
6596
|
+
/* @__PURE__ */ jsx14(
|
|
6441
6597
|
"button",
|
|
6442
6598
|
{
|
|
6443
6599
|
type: "button",
|
|
@@ -6445,7 +6601,7 @@ var TaskListRow = React10.memo(
|
|
|
6445
6601
|
tabIndex: -1,
|
|
6446
6602
|
onMouseDown: (e) => e.preventDefault(),
|
|
6447
6603
|
onClick: () => handleDurationAdjust(-1),
|
|
6448
|
-
children: /* @__PURE__ */
|
|
6604
|
+
children: /* @__PURE__ */ jsx14(
|
|
6449
6605
|
"svg",
|
|
6450
6606
|
{
|
|
6451
6607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6457,7 +6613,7 @@ var TaskListRow = React10.memo(
|
|
|
6457
6613
|
strokeWidth: "2",
|
|
6458
6614
|
strokeLinecap: "round",
|
|
6459
6615
|
strokeLinejoin: "round",
|
|
6460
|
-
children: /* @__PURE__ */
|
|
6616
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" })
|
|
6461
6617
|
}
|
|
6462
6618
|
)
|
|
6463
6619
|
}
|
|
@@ -6466,7 +6622,7 @@ var TaskListRow = React10.memo(
|
|
|
6466
6622
|
]
|
|
6467
6623
|
}
|
|
6468
6624
|
),
|
|
6469
|
-
/* @__PURE__ */
|
|
6625
|
+
/* @__PURE__ */ jsx14(
|
|
6470
6626
|
"span",
|
|
6471
6627
|
{
|
|
6472
6628
|
className: "gantt-tl-duration-display",
|
|
@@ -6477,20 +6633,20 @@ var TaskListRow = React10.memo(
|
|
|
6477
6633
|
]
|
|
6478
6634
|
}
|
|
6479
6635
|
);
|
|
6480
|
-
const progressCell = /* @__PURE__ */
|
|
6636
|
+
const progressCell = /* @__PURE__ */ jsxs10(
|
|
6481
6637
|
"div",
|
|
6482
6638
|
{
|
|
6483
6639
|
className: "gantt-tl-cell gantt-tl-cell-progress",
|
|
6484
6640
|
style: getColumnStyle("progress", 50),
|
|
6485
6641
|
onClick: handleProgressClick,
|
|
6486
6642
|
children: [
|
|
6487
|
-
editingProgress && /* @__PURE__ */
|
|
6643
|
+
editingProgress && /* @__PURE__ */ jsxs10(
|
|
6488
6644
|
"div",
|
|
6489
6645
|
{
|
|
6490
6646
|
className: "gantt-tl-number-editor",
|
|
6491
6647
|
onClick: (e) => e.stopPropagation(),
|
|
6492
6648
|
children: [
|
|
6493
|
-
/* @__PURE__ */
|
|
6649
|
+
/* @__PURE__ */ jsx14(
|
|
6494
6650
|
Input,
|
|
6495
6651
|
{
|
|
6496
6652
|
ref: progressInputRef,
|
|
@@ -6505,8 +6661,8 @@ var TaskListRow = React10.memo(
|
|
|
6505
6661
|
className: "gantt-tl-number-input"
|
|
6506
6662
|
}
|
|
6507
6663
|
),
|
|
6508
|
-
/* @__PURE__ */
|
|
6509
|
-
/* @__PURE__ */
|
|
6664
|
+
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
6665
|
+
/* @__PURE__ */ jsx14(
|
|
6510
6666
|
"button",
|
|
6511
6667
|
{
|
|
6512
6668
|
type: "button",
|
|
@@ -6514,7 +6670,7 @@ var TaskListRow = React10.memo(
|
|
|
6514
6670
|
tabIndex: -1,
|
|
6515
6671
|
onMouseDown: (e) => e.preventDefault(),
|
|
6516
6672
|
onClick: () => handleProgressAdjust(1),
|
|
6517
|
-
children: /* @__PURE__ */
|
|
6673
|
+
children: /* @__PURE__ */ jsx14(
|
|
6518
6674
|
"svg",
|
|
6519
6675
|
{
|
|
6520
6676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6526,12 +6682,12 @@ var TaskListRow = React10.memo(
|
|
|
6526
6682
|
strokeWidth: "2",
|
|
6527
6683
|
strokeLinecap: "round",
|
|
6528
6684
|
strokeLinejoin: "round",
|
|
6529
|
-
children: /* @__PURE__ */
|
|
6685
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m18 15-6-6-6 6" })
|
|
6530
6686
|
}
|
|
6531
6687
|
)
|
|
6532
6688
|
}
|
|
6533
6689
|
),
|
|
6534
|
-
/* @__PURE__ */
|
|
6690
|
+
/* @__PURE__ */ jsx14(
|
|
6535
6691
|
"button",
|
|
6536
6692
|
{
|
|
6537
6693
|
type: "button",
|
|
@@ -6539,7 +6695,7 @@ var TaskListRow = React10.memo(
|
|
|
6539
6695
|
tabIndex: -1,
|
|
6540
6696
|
onMouseDown: (e) => e.preventDefault(),
|
|
6541
6697
|
onClick: () => handleProgressAdjust(-1),
|
|
6542
|
-
children: /* @__PURE__ */
|
|
6698
|
+
children: /* @__PURE__ */ jsx14(
|
|
6543
6699
|
"svg",
|
|
6544
6700
|
{
|
|
6545
6701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6551,7 +6707,7 @@ var TaskListRow = React10.memo(
|
|
|
6551
6707
|
strokeWidth: "2",
|
|
6552
6708
|
strokeLinecap: "round",
|
|
6553
6709
|
strokeLinejoin: "round",
|
|
6554
|
-
children: /* @__PURE__ */
|
|
6710
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" })
|
|
6555
6711
|
}
|
|
6556
6712
|
)
|
|
6557
6713
|
}
|
|
@@ -6560,7 +6716,7 @@ var TaskListRow = React10.memo(
|
|
|
6560
6716
|
]
|
|
6561
6717
|
}
|
|
6562
6718
|
),
|
|
6563
|
-
/* @__PURE__ */
|
|
6719
|
+
/* @__PURE__ */ jsx14(
|
|
6564
6720
|
"span",
|
|
6565
6721
|
{
|
|
6566
6722
|
className: "gantt-tl-progress-display",
|
|
@@ -6576,14 +6732,14 @@ var TaskListRow = React10.memo(
|
|
|
6576
6732
|
]
|
|
6577
6733
|
}
|
|
6578
6734
|
);
|
|
6579
|
-
const dependenciesCell = /* @__PURE__ */
|
|
6735
|
+
const dependenciesCell = /* @__PURE__ */ jsx14(
|
|
6580
6736
|
"div",
|
|
6581
6737
|
{
|
|
6582
6738
|
className: "gantt-tl-cell gantt-tl-cell-deps",
|
|
6583
6739
|
style: getColumnStyle("dependencies", 128),
|
|
6584
6740
|
onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
|
|
6585
|
-
children: isSourceRow ? /* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6741
|
+
children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
6742
|
+
/* @__PURE__ */ jsx14(
|
|
6587
6743
|
"span",
|
|
6588
6744
|
{
|
|
6589
6745
|
className: "gantt-tl-dep-source-hint",
|
|
@@ -6592,11 +6748,11 @@ var TaskListRow = React10.memo(
|
|
|
6592
6748
|
}
|
|
6593
6749
|
),
|
|
6594
6750
|
sourcePickerContent
|
|
6595
|
-
] }) : /* @__PURE__ */
|
|
6751
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
6596
6752
|
chips.length >= 2 ? (
|
|
6597
6753
|
/* 2+ deps — show only "N связей" summary chip that opens a popover */
|
|
6598
|
-
/* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */
|
|
6754
|
+
/* @__PURE__ */ jsxs10(Popover, { open: overflowOpen, onOpenChange: setOverflowOpen, children: [
|
|
6755
|
+
/* @__PURE__ */ jsx14(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs10(
|
|
6600
6756
|
"button",
|
|
6601
6757
|
{
|
|
6602
6758
|
type: "button",
|
|
@@ -6612,12 +6768,12 @@ var TaskListRow = React10.memo(
|
|
|
6612
6768
|
]
|
|
6613
6769
|
}
|
|
6614
6770
|
) }),
|
|
6615
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ jsx14(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ jsx14(
|
|
6616
6772
|
"div",
|
|
6617
6773
|
{
|
|
6618
6774
|
className: "gantt-tl-dep-overflow-list",
|
|
6619
6775
|
onClick: (e) => e.stopPropagation(),
|
|
6620
|
-
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */
|
|
6776
|
+
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */ jsx14(
|
|
6621
6777
|
DepChip,
|
|
6622
6778
|
{
|
|
6623
6779
|
lag,
|
|
@@ -6646,7 +6802,7 @@ var TaskListRow = React10.memo(
|
|
|
6646
6802
|
] })
|
|
6647
6803
|
) : chips.length === 1 ? (
|
|
6648
6804
|
/* Single chip — unified DepChip */
|
|
6649
|
-
/* @__PURE__ */
|
|
6805
|
+
/* @__PURE__ */ jsx14(
|
|
6650
6806
|
DepChip,
|
|
6651
6807
|
{
|
|
6652
6808
|
lag: chips[0].lag,
|
|
@@ -6670,7 +6826,7 @@ var TaskListRow = React10.memo(
|
|
|
6670
6826
|
}
|
|
6671
6827
|
)
|
|
6672
6828
|
) : null,
|
|
6673
|
-
!disableDependencyEditing && !isPicking && /* @__PURE__ */
|
|
6829
|
+
!disableDependencyEditing && !isPicking && /* @__PURE__ */ jsx14(
|
|
6674
6830
|
"button",
|
|
6675
6831
|
{
|
|
6676
6832
|
type: "button",
|
|
@@ -6735,7 +6891,7 @@ var TaskListRow = React10.memo(
|
|
|
6735
6891
|
focusCustomCell(nextCell.taskId, nextCell.columnId);
|
|
6736
6892
|
});
|
|
6737
6893
|
}, [focusCustomCell, onActiveCustomCellChange, resolvedColumns, task.id]);
|
|
6738
|
-
return /* @__PURE__ */
|
|
6894
|
+
return /* @__PURE__ */ jsx14(
|
|
6739
6895
|
"div",
|
|
6740
6896
|
{
|
|
6741
6897
|
ref: rowRef,
|
|
@@ -6775,7 +6931,7 @@ var TaskListRow = React10.memo(
|
|
|
6775
6931
|
tabIndex: isSelected ? 0 : -1,
|
|
6776
6932
|
children: resolvedColumns?.map((col) => {
|
|
6777
6933
|
const builtIn = builtInCells[col.id];
|
|
6778
|
-
if (builtIn) return /* @__PURE__ */
|
|
6934
|
+
if (builtIn) return /* @__PURE__ */ jsx14(React10.Fragment, { children: builtIn }, col.id);
|
|
6779
6935
|
const isEditing = editingColumnId === col.id;
|
|
6780
6936
|
const editorFn = col.renderEditor;
|
|
6781
6937
|
const isActiveCustomCell = activeCustomCell?.taskId === task.id && activeCustomCell?.columnId === col.id;
|
|
@@ -6813,7 +6969,7 @@ var TaskListRow = React10.memo(
|
|
|
6813
6969
|
});
|
|
6814
6970
|
}
|
|
6815
6971
|
};
|
|
6816
|
-
return /* @__PURE__ */
|
|
6972
|
+
return /* @__PURE__ */ jsx14(
|
|
6817
6973
|
"div",
|
|
6818
6974
|
{
|
|
6819
6975
|
className: `gantt-tl-cell gantt-tl-cell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -6882,7 +7038,7 @@ var TaskListRow = React10.memo(
|
|
|
6882
7038
|
}
|
|
6883
7039
|
} : void 0,
|
|
6884
7040
|
style: { width: col.width ?? 120, minWidth: col.width ?? 120, flexShrink: 0 },
|
|
6885
|
-
children: isEditing && editorFn ? /* @__PURE__ */
|
|
7041
|
+
children: isEditing && editorFn ? /* @__PURE__ */ jsx14(
|
|
6886
7042
|
"div",
|
|
6887
7043
|
{
|
|
6888
7044
|
className: "gantt-tl-cell-custom-editor",
|
|
@@ -6891,7 +7047,7 @@ var TaskListRow = React10.memo(
|
|
|
6891
7047
|
onClick: (e) => e.stopPropagation(),
|
|
6892
7048
|
children: editorFn(columnContext)
|
|
6893
7049
|
}
|
|
6894
|
-
) : /* @__PURE__ */
|
|
7050
|
+
) : /* @__PURE__ */ jsx14("div", { className: "gantt-tl-cell-custom-content", children: col.renderCell(columnContext) })
|
|
6895
7051
|
},
|
|
6896
7052
|
col.id
|
|
6897
7053
|
);
|
|
@@ -6904,15 +7060,15 @@ var TaskListRow = React10.memo(
|
|
|
6904
7060
|
TaskListRow.displayName = "TaskListRow";
|
|
6905
7061
|
|
|
6906
7062
|
// src/components/TaskList/NewTaskRow.tsx
|
|
6907
|
-
import { useState as
|
|
6908
|
-
import { jsx as
|
|
7063
|
+
import { useState as useState6, useRef as useRef5, useEffect as useEffect5 } from "react";
|
|
7064
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6909
7065
|
var NewTaskRow = ({
|
|
6910
7066
|
rowHeight,
|
|
6911
7067
|
onConfirm,
|
|
6912
7068
|
onCancel,
|
|
6913
7069
|
nestingDepth = 0
|
|
6914
7070
|
}) => {
|
|
6915
|
-
const [nameValue, setNameValue] =
|
|
7071
|
+
const [nameValue, setNameValue] = useState6("");
|
|
6916
7072
|
const inputRef = useRef5(null);
|
|
6917
7073
|
const confirmedRef = useRef5(false);
|
|
6918
7074
|
const inputInnerPadding = 4;
|
|
@@ -6944,9 +7100,9 @@ var NewTaskRow = ({
|
|
|
6944
7100
|
onCancel();
|
|
6945
7101
|
}
|
|
6946
7102
|
};
|
|
6947
|
-
return /* @__PURE__ */
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
7103
|
+
return /* @__PURE__ */ jsxs11("div", { className: "gantt-tl-row gantt-tl-row-new", style: { height: `${rowHeight}px` }, children: [
|
|
7104
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell gantt-tl-cell-number" }),
|
|
7105
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell gantt-tl-cell-name gantt-tl-cell-new-name", children: /* @__PURE__ */ jsx15(
|
|
6950
7106
|
Input,
|
|
6951
7107
|
{
|
|
6952
7108
|
ref: inputRef,
|
|
@@ -6963,9 +7119,9 @@ var NewTaskRow = ({
|
|
|
6963
7119
|
}
|
|
6964
7120
|
}
|
|
6965
7121
|
) }),
|
|
6966
|
-
/* @__PURE__ */
|
|
6967
|
-
/* @__PURE__ */
|
|
6968
|
-
/* @__PURE__ */
|
|
7122
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell" }),
|
|
7123
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell" }),
|
|
7124
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell" })
|
|
6969
7125
|
] });
|
|
6970
7126
|
};
|
|
6971
7127
|
|
|
@@ -7056,7 +7212,7 @@ function resolveTaskListColumns(builtIn, custom, hiddenColumnIds = []) {
|
|
|
7056
7212
|
}
|
|
7057
7213
|
|
|
7058
7214
|
// src/components/TaskList/TaskList.tsx
|
|
7059
|
-
import { jsx as
|
|
7215
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7060
7216
|
var LINK_TYPE_ORDER2 = ["FS", "SS", "FF", "SF"];
|
|
7061
7217
|
var MIN_TASK_LIST_WIDTH = 530;
|
|
7062
7218
|
var DEFAULT_COLUMN_MIN_WIDTH = 40;
|
|
@@ -7194,7 +7350,7 @@ var SelectAllCheckbox = ({
|
|
|
7194
7350
|
ref.current.indeterminate = indeterminate;
|
|
7195
7351
|
}
|
|
7196
7352
|
}, [indeterminate]);
|
|
7197
|
-
return /* @__PURE__ */
|
|
7353
|
+
return /* @__PURE__ */ jsx16(
|
|
7198
7354
|
"input",
|
|
7199
7355
|
{
|
|
7200
7356
|
ref,
|
|
@@ -7221,6 +7377,7 @@ var TaskList = ({
|
|
|
7221
7377
|
disableDependencyEditing = false,
|
|
7222
7378
|
onScrollToTask,
|
|
7223
7379
|
onSelectedChipChange,
|
|
7380
|
+
selectedChip: controlledSelectedChip,
|
|
7224
7381
|
onAdd,
|
|
7225
7382
|
onDelete,
|
|
7226
7383
|
onInsertAfter,
|
|
@@ -7261,9 +7418,9 @@ var TaskList = ({
|
|
|
7261
7418
|
visibleRowIndices
|
|
7262
7419
|
}) => {
|
|
7263
7420
|
const reorderDisabled = disableTaskListReorder || disableTaskDrag;
|
|
7264
|
-
const [internalSelectedTaskIds, setInternalSelectedTaskIds] =
|
|
7265
|
-
const [activeCustomCell, setActiveCustomCell] =
|
|
7266
|
-
const [columnWidthOverrides, setColumnWidthOverrides] =
|
|
7421
|
+
const [internalSelectedTaskIds, setInternalSelectedTaskIds] = useState7(/* @__PURE__ */ new Set());
|
|
7422
|
+
const [activeCustomCell, setActiveCustomCell] = useState7(null);
|
|
7423
|
+
const [columnWidthOverrides, setColumnWidthOverrides] = useState7(() => normalizeColumnWidthMap(taskListColumnWidths));
|
|
7267
7424
|
const resizeStateRef = useRef6(null);
|
|
7268
7425
|
const effectiveSelectedTaskIds = selectedTaskIds ?? internalSelectedTaskIds;
|
|
7269
7426
|
const emitSelectedTaskIdsChange = useCallback6((nextSelectedTaskIds) => {
|
|
@@ -7272,7 +7429,7 @@ var TaskList = ({
|
|
|
7272
7429
|
}
|
|
7273
7430
|
onSelectedTaskIdsChange?.(nextSelectedTaskIds);
|
|
7274
7431
|
}, [onSelectedTaskIdsChange, selectedTaskIds]);
|
|
7275
|
-
const [internalCollapsedParentIds, setInternalCollapsedParentIds] =
|
|
7432
|
+
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = useState7(/* @__PURE__ */ new Set());
|
|
7276
7433
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
7277
7434
|
const handleToggleCollapse = externalOnToggleCollapse ?? useCallback6((parentId) => {
|
|
7278
7435
|
setInternalCollapsedParentIds((prev) => {
|
|
@@ -7435,19 +7592,33 @@ var TaskList = ({
|
|
|
7435
7592
|
const handleRowClick = useCallback6((taskId) => {
|
|
7436
7593
|
onTaskSelect?.(taskId);
|
|
7437
7594
|
}, [onTaskSelect]);
|
|
7438
|
-
const [activeLinkType, setActiveLinkType] =
|
|
7439
|
-
const [selectingPredecessorFor, setSelectingPredecessorFor] =
|
|
7440
|
-
const [dependencyPickMode, setDependencyPickMode] =
|
|
7441
|
-
const [typeMenuOpen, setTypeMenuOpen] =
|
|
7442
|
-
const [dependencyError, setDependencyError] =
|
|
7595
|
+
const [activeLinkType, setActiveLinkType] = useState7("FS");
|
|
7596
|
+
const [selectingPredecessorFor, setSelectingPredecessorFor] = useState7(null);
|
|
7597
|
+
const [dependencyPickMode, setDependencyPickMode] = useState7("successor");
|
|
7598
|
+
const [typeMenuOpen, setTypeMenuOpen] = useState7(false);
|
|
7599
|
+
const [dependencyError, setDependencyError] = useState7(null);
|
|
7443
7600
|
const overlayRef = useRef6(null);
|
|
7444
|
-
const [selectedChip, setSelectedChip] =
|
|
7601
|
+
const [selectedChip, setSelectedChip] = useState7(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7602
|
+
useEffect6(() => {
|
|
7603
|
+
if (controlledSelectedChip !== void 0) {
|
|
7604
|
+
setSelectedChip(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7605
|
+
}
|
|
7606
|
+
}, [controlledSelectedChip]);
|
|
7445
7607
|
const handleChipSelect = useCallback6((chip) => {
|
|
7446
7608
|
setSelectedChip(chip);
|
|
7447
7609
|
onSelectedChipChange?.(chip);
|
|
7448
7610
|
}, [onSelectedChipChange]);
|
|
7449
7611
|
useEffect6(() => {
|
|
7450
7612
|
if (!selectingPredecessorFor && !selectedChip && !selectedTaskId && !activeCustomCell) return;
|
|
7613
|
+
const pendingCanvasMouseDownRef = {
|
|
7614
|
+
container: null,
|
|
7615
|
+
x: 0,
|
|
7616
|
+
y: 0,
|
|
7617
|
+
scrollLeft: 0,
|
|
7618
|
+
scrollTop: 0,
|
|
7619
|
+
moved: false,
|
|
7620
|
+
active: false
|
|
7621
|
+
};
|
|
7451
7622
|
const handleKeyDown = (e) => {
|
|
7452
7623
|
if (e.key === "Escape") {
|
|
7453
7624
|
setSelectingPredecessorFor(null);
|
|
@@ -7465,6 +7636,18 @@ var TaskList = ({
|
|
|
7465
7636
|
}
|
|
7466
7637
|
return;
|
|
7467
7638
|
}
|
|
7639
|
+
if (target.closest?.("[data-taskbar]")) return;
|
|
7640
|
+
if (target.closest?.(".gantt-scrollContainer")) {
|
|
7641
|
+
const canvas = target.closest(".gantt-scrollContainer");
|
|
7642
|
+
pendingCanvasMouseDownRef.container = canvas;
|
|
7643
|
+
pendingCanvasMouseDownRef.x = e.clientX;
|
|
7644
|
+
pendingCanvasMouseDownRef.y = e.clientY;
|
|
7645
|
+
pendingCanvasMouseDownRef.scrollLeft = canvas.scrollLeft;
|
|
7646
|
+
pendingCanvasMouseDownRef.scrollTop = canvas.scrollTop;
|
|
7647
|
+
pendingCanvasMouseDownRef.moved = false;
|
|
7648
|
+
pendingCanvasMouseDownRef.active = true;
|
|
7649
|
+
return;
|
|
7650
|
+
}
|
|
7468
7651
|
if (target.closest?.(".gantt-popover")) return;
|
|
7469
7652
|
setSelectingPredecessorFor(null);
|
|
7470
7653
|
setSelectedChip(null);
|
|
@@ -7472,11 +7655,52 @@ var TaskList = ({
|
|
|
7472
7655
|
onSelectedChipChange?.(null);
|
|
7473
7656
|
onTaskSelect?.(null);
|
|
7474
7657
|
};
|
|
7658
|
+
const handleCanvasMouseMove = (e) => {
|
|
7659
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7660
|
+
const distance = Math.hypot(
|
|
7661
|
+
e.clientX - pendingCanvasMouseDownRef.x,
|
|
7662
|
+
e.clientY - pendingCanvasMouseDownRef.y
|
|
7663
|
+
);
|
|
7664
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7665
|
+
const scrollChanged = canvas && (canvas.scrollLeft !== pendingCanvasMouseDownRef.scrollLeft || canvas.scrollTop !== pendingCanvasMouseDownRef.scrollTop);
|
|
7666
|
+
if (distance > 3 || scrollChanged) pendingCanvasMouseDownRef.moved = true;
|
|
7667
|
+
};
|
|
7668
|
+
const handleCanvasScroll = (e) => {
|
|
7669
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7670
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7671
|
+
if (canvas && e.target === canvas) pendingCanvasMouseDownRef.moved = true;
|
|
7672
|
+
};
|
|
7673
|
+
const handleCanvasWheel = (e) => {
|
|
7674
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7675
|
+
if (pendingCanvasMouseDownRef.container?.contains(e.target)) {
|
|
7676
|
+
pendingCanvasMouseDownRef.moved = true;
|
|
7677
|
+
}
|
|
7678
|
+
};
|
|
7679
|
+
const handleCanvasMouseUp = () => {
|
|
7680
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7681
|
+
const wasPan = pendingCanvasMouseDownRef.moved;
|
|
7682
|
+
pendingCanvasMouseDownRef.active = false;
|
|
7683
|
+
pendingCanvasMouseDownRef.container = null;
|
|
7684
|
+
if (wasPan) return;
|
|
7685
|
+
setSelectingPredecessorFor(null);
|
|
7686
|
+
setSelectedChip(null);
|
|
7687
|
+
setActiveCustomCell(null);
|
|
7688
|
+
onSelectedChipChange?.(null);
|
|
7689
|
+
onTaskSelect?.(null);
|
|
7690
|
+
};
|
|
7475
7691
|
document.addEventListener("keydown", handleKeyDown);
|
|
7476
7692
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
7693
|
+
document.addEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7694
|
+
document.addEventListener("scroll", handleCanvasScroll, true);
|
|
7695
|
+
document.addEventListener("wheel", handleCanvasWheel, true);
|
|
7696
|
+
document.addEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7477
7697
|
return () => {
|
|
7478
7698
|
document.removeEventListener("keydown", handleKeyDown);
|
|
7479
7699
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
7700
|
+
document.removeEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7701
|
+
document.removeEventListener("scroll", handleCanvasScroll, true);
|
|
7702
|
+
document.removeEventListener("wheel", handleCanvasWheel, true);
|
|
7703
|
+
document.removeEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7480
7704
|
};
|
|
7481
7705
|
}, [selectingPredecessorFor, selectedChip, selectedTaskId, activeCustomCell, onTaskSelect, onSelectedChipChange]);
|
|
7482
7706
|
const handleAddDependency = useCallback6((successorTaskId, predecessorTaskId, linkType) => {
|
|
@@ -7565,11 +7789,11 @@ var TaskList = ({
|
|
|
7565
7789
|
);
|
|
7566
7790
|
onTasksChange?.([{ ...task, dependencies: updatedDeps }]);
|
|
7567
7791
|
}, [tasks, onTasksChange]);
|
|
7568
|
-
const [isCreating, setIsCreating] =
|
|
7569
|
-
const [pendingInsert, setPendingInsert] =
|
|
7570
|
-
const [draggingIndex, setDraggingIndex] =
|
|
7571
|
-
const [dragOverTarget, setDragOverTarget] =
|
|
7572
|
-
const [isBeforeFirstDropZoneActive, setIsBeforeFirstDropZoneActive] =
|
|
7792
|
+
const [isCreating, setIsCreating] = useState7(false);
|
|
7793
|
+
const [pendingInsert, setPendingInsert] = useState7(null);
|
|
7794
|
+
const [draggingIndex, setDraggingIndex] = useState7(null);
|
|
7795
|
+
const [dragOverTarget, setDragOverTarget] = useState7(null);
|
|
7796
|
+
const [isBeforeFirstDropZoneActive, setIsBeforeFirstDropZoneActive] = useState7(false);
|
|
7573
7797
|
const dragOriginIndexRef = useRef6(null);
|
|
7574
7798
|
const dragTaskIdRef = useRef6(null);
|
|
7575
7799
|
const clearDragState = useCallback6(() => {
|
|
@@ -7991,7 +8215,7 @@ var TaskList = ({
|
|
|
7991
8215
|
document.body.style.cursor = "col-resize";
|
|
7992
8216
|
document.body.style.userSelect = "none";
|
|
7993
8217
|
}, [resolvedColumns]);
|
|
7994
|
-
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */
|
|
8218
|
+
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */ jsx16(
|
|
7995
8219
|
"button",
|
|
7996
8220
|
{
|
|
7997
8221
|
type: "button",
|
|
@@ -8005,7 +8229,7 @@ var TaskList = ({
|
|
|
8005
8229
|
}
|
|
8006
8230
|
}
|
|
8007
8231
|
), [startColumnResize]);
|
|
8008
|
-
return /* @__PURE__ */
|
|
8232
|
+
return /* @__PURE__ */ jsx16(
|
|
8009
8233
|
"div",
|
|
8010
8234
|
{
|
|
8011
8235
|
ref: overlayRef,
|
|
@@ -8014,17 +8238,17 @@ var TaskList = ({
|
|
|
8014
8238
|
"--tasklist-width": `${effectiveTaskListWidth}px`,
|
|
8015
8239
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
8016
8240
|
},
|
|
8017
|
-
children: /* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8241
|
+
children: /* @__PURE__ */ jsxs12("div", { className: "gantt-tl-table", children: [
|
|
8242
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-header", style: { height: `${tableHeaderHeight}px` }, children: resolvedColumns.map((col) => {
|
|
8019
8243
|
if (col.id === "selection") {
|
|
8020
|
-
return /* @__PURE__ */
|
|
8244
|
+
return /* @__PURE__ */ jsxs12(
|
|
8021
8245
|
"div",
|
|
8022
8246
|
{
|
|
8023
8247
|
className: "gantt-tl-headerCell gantt-tl-cell-selection",
|
|
8024
8248
|
"data-column-id": "selection",
|
|
8025
8249
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8026
8250
|
children: [
|
|
8027
|
-
/* @__PURE__ */
|
|
8251
|
+
/* @__PURE__ */ jsx16(
|
|
8028
8252
|
SelectAllCheckbox,
|
|
8029
8253
|
{
|
|
8030
8254
|
checked: areAllVisibleTasksSelected,
|
|
@@ -8039,15 +8263,15 @@ var TaskList = ({
|
|
|
8039
8263
|
);
|
|
8040
8264
|
}
|
|
8041
8265
|
if (col.id === "dependencies") {
|
|
8042
|
-
return /* @__PURE__ */
|
|
8266
|
+
return /* @__PURE__ */ jsxs12(
|
|
8043
8267
|
"div",
|
|
8044
8268
|
{
|
|
8045
8269
|
className: "gantt-tl-headerCell gantt-tl-cell-deps",
|
|
8046
8270
|
"data-column-id": "dependencies",
|
|
8047
8271
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8048
8272
|
children: [
|
|
8049
|
-
/* @__PURE__ */
|
|
8050
|
-
/* @__PURE__ */
|
|
8273
|
+
/* @__PURE__ */ jsxs12(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
8274
|
+
/* @__PURE__ */ jsx16(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
8051
8275
|
"button",
|
|
8052
8276
|
{
|
|
8053
8277
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -8060,7 +8284,7 @@ var TaskList = ({
|
|
|
8060
8284
|
]
|
|
8061
8285
|
}
|
|
8062
8286
|
) }),
|
|
8063
|
-
/* @__PURE__ */
|
|
8287
|
+
/* @__PURE__ */ jsx16(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ jsx16("div", { className: "gantt-tl-dep-type-menu", children: LINK_TYPE_ORDER2.map((lt) => /* @__PURE__ */ jsxs12(
|
|
8064
8288
|
"button",
|
|
8065
8289
|
{
|
|
8066
8290
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -8070,13 +8294,13 @@ var TaskList = ({
|
|
|
8070
8294
|
},
|
|
8071
8295
|
children: [
|
|
8072
8296
|
React12.createElement(LINK_TYPE_ICONS[lt]),
|
|
8073
|
-
/* @__PURE__ */
|
|
8297
|
+
/* @__PURE__ */ jsx16("span", { children: LINK_TYPE_LABELS[lt] })
|
|
8074
8298
|
]
|
|
8075
8299
|
},
|
|
8076
8300
|
lt
|
|
8077
8301
|
)) }) })
|
|
8078
8302
|
] }),
|
|
8079
|
-
dependencyError && /* @__PURE__ */
|
|
8303
|
+
dependencyError && /* @__PURE__ */ jsx16("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
8080
8304
|
renderResizeHandle(col.id)
|
|
8081
8305
|
]
|
|
8082
8306
|
},
|
|
@@ -8085,7 +8309,7 @@ var TaskList = ({
|
|
|
8085
8309
|
}
|
|
8086
8310
|
const builtInClass = BUILT_IN_CSS_CLASSES[col.id];
|
|
8087
8311
|
if (builtInClass !== void 0) {
|
|
8088
|
-
return /* @__PURE__ */
|
|
8312
|
+
return /* @__PURE__ */ jsxs12(
|
|
8089
8313
|
"div",
|
|
8090
8314
|
{
|
|
8091
8315
|
className: `gantt-tl-headerCell ${builtInClass}`,
|
|
@@ -8099,7 +8323,7 @@ var TaskList = ({
|
|
|
8099
8323
|
col.id
|
|
8100
8324
|
);
|
|
8101
8325
|
}
|
|
8102
|
-
return /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ jsxs12(
|
|
8103
8327
|
"div",
|
|
8104
8328
|
{
|
|
8105
8329
|
className: `gantt-tl-headerCell gantt-tl-headerCell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -8114,7 +8338,7 @@ var TaskList = ({
|
|
|
8114
8338
|
col.id
|
|
8115
8339
|
);
|
|
8116
8340
|
}) }),
|
|
8117
|
-
/* @__PURE__ */
|
|
8341
|
+
/* @__PURE__ */ jsxs12(
|
|
8118
8342
|
"div",
|
|
8119
8343
|
{
|
|
8120
8344
|
className: "gantt-tl-body",
|
|
@@ -8124,7 +8348,7 @@ var TaskList = ({
|
|
|
8124
8348
|
position: "relative"
|
|
8125
8349
|
},
|
|
8126
8350
|
children: [
|
|
8127
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */
|
|
8351
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ jsx16(
|
|
8128
8352
|
"div",
|
|
8129
8353
|
{
|
|
8130
8354
|
className: [
|
|
@@ -8141,7 +8365,7 @@ var TaskList = ({
|
|
|
8141
8365
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
8142
8366
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
8143
8367
|
const topOffset = index * rowHeight + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
8144
|
-
return /* @__PURE__ */
|
|
8368
|
+
return /* @__PURE__ */ jsx16(
|
|
8145
8369
|
"div",
|
|
8146
8370
|
{
|
|
8147
8371
|
style: {
|
|
@@ -8150,7 +8374,7 @@ var TaskList = ({
|
|
|
8150
8374
|
left: 0,
|
|
8151
8375
|
right: 0
|
|
8152
8376
|
},
|
|
8153
|
-
children: /* @__PURE__ */
|
|
8377
|
+
children: /* @__PURE__ */ jsx16(
|
|
8154
8378
|
TaskListRow,
|
|
8155
8379
|
{
|
|
8156
8380
|
task,
|
|
@@ -8223,7 +8447,7 @@ var TaskList = ({
|
|
|
8223
8447
|
task.id
|
|
8224
8448
|
);
|
|
8225
8449
|
}),
|
|
8226
|
-
hasVisiblePendingInsert && /* @__PURE__ */
|
|
8450
|
+
hasVisiblePendingInsert && /* @__PURE__ */ jsx16(
|
|
8227
8451
|
"div",
|
|
8228
8452
|
{
|
|
8229
8453
|
style: {
|
|
@@ -8232,7 +8456,7 @@ var TaskList = ({
|
|
|
8232
8456
|
left: 0,
|
|
8233
8457
|
right: 0
|
|
8234
8458
|
},
|
|
8235
|
-
children: /* @__PURE__ */
|
|
8459
|
+
children: /* @__PURE__ */ jsx16(
|
|
8236
8460
|
NewTaskRow,
|
|
8237
8461
|
{
|
|
8238
8462
|
rowHeight,
|
|
@@ -8246,7 +8470,7 @@ var TaskList = ({
|
|
|
8246
8470
|
]
|
|
8247
8471
|
}
|
|
8248
8472
|
),
|
|
8249
|
-
isCreating && !pendingInsert && /* @__PURE__ */
|
|
8473
|
+
isCreating && !pendingInsert && /* @__PURE__ */ jsx16(
|
|
8250
8474
|
NewTaskRow,
|
|
8251
8475
|
{
|
|
8252
8476
|
rowHeight,
|
|
@@ -8255,7 +8479,7 @@ var TaskList = ({
|
|
|
8255
8479
|
nestingDepth: 0
|
|
8256
8480
|
}
|
|
8257
8481
|
),
|
|
8258
|
-
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */
|
|
8482
|
+
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ jsx16(
|
|
8259
8483
|
"button",
|
|
8260
8484
|
{
|
|
8261
8485
|
className: `gantt-tl-add-btn${!reorderDisabled && dragOverTarget?.index === visibleTasks.length ? " gantt-tl-add-btn-drag-over" : ""}`,
|
|
@@ -8290,7 +8514,7 @@ var TaskList = ({
|
|
|
8290
8514
|
};
|
|
8291
8515
|
|
|
8292
8516
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8293
|
-
import React13, { useCallback as useCallback8, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useState as
|
|
8517
|
+
import React13, { useCallback as useCallback8, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useState as useState9 } from "react";
|
|
8294
8518
|
|
|
8295
8519
|
// src/utils/resourceTimelineLayout.ts
|
|
8296
8520
|
var isInvalidDate = (date) => Number.isNaN(date.getTime());
|
|
@@ -8492,7 +8716,7 @@ var layoutResourceTimelineItems = (resources, options) => {
|
|
|
8492
8716
|
};
|
|
8493
8717
|
|
|
8494
8718
|
// src/hooks/useResourceItemDrag.ts
|
|
8495
|
-
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef7, useState as
|
|
8719
|
+
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef7, useState as useState8 } from "react";
|
|
8496
8720
|
var RESOURCE_CURSOR_STYLE_ID = "gantt-resource-global-drag-cursor-style";
|
|
8497
8721
|
function ensureResourceGlobalCursorStyle() {
|
|
8498
8722
|
if (typeof document === "undefined") return;
|
|
@@ -8608,7 +8832,7 @@ var useResourceItemDrag = ({
|
|
|
8608
8832
|
const rowsRef = useRef7(rows);
|
|
8609
8833
|
const onResourceItemMoveRef = useRef7(onResourceItemMove);
|
|
8610
8834
|
const rafRef = useRef7(null);
|
|
8611
|
-
const [preview, setPreview] =
|
|
8835
|
+
const [preview, setPreview] = useState8(null);
|
|
8612
8836
|
useEffect7(() => {
|
|
8613
8837
|
rowsRef.current = rows;
|
|
8614
8838
|
}, [rows]);
|
|
@@ -8746,7 +8970,7 @@ var useResourceItemDrag = ({
|
|
|
8746
8970
|
};
|
|
8747
8971
|
|
|
8748
8972
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8749
|
-
import { Fragment as
|
|
8973
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8750
8974
|
var DEFAULT_DAY_WIDTH = 40;
|
|
8751
8975
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
8752
8976
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -8909,41 +9133,41 @@ var orderResourcesByType = (resources) => {
|
|
|
8909
9133
|
};
|
|
8910
9134
|
var ResourceTypeIcon = ({ type }) => {
|
|
8911
9135
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
8912
|
-
return /* @__PURE__ */
|
|
8913
|
-
/* @__PURE__ */
|
|
8914
|
-
/* @__PURE__ */
|
|
8915
|
-
/* @__PURE__ */
|
|
8916
|
-
/* @__PURE__ */
|
|
9136
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconPeople", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9137
|
+
/* @__PURE__ */ jsx17("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
9138
|
+
/* @__PURE__ */ jsx17("circle", { cx: "9", cy: "7", r: "4" }),
|
|
9139
|
+
/* @__PURE__ */ jsx17("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
9140
|
+
/* @__PURE__ */ jsx17("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
8917
9141
|
] });
|
|
8918
9142
|
}
|
|
8919
9143
|
if (type === "\u041E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u0435") {
|
|
8920
|
-
return /* @__PURE__ */
|
|
8921
|
-
/* @__PURE__ */
|
|
8922
|
-
/* @__PURE__ */
|
|
8923
|
-
/* @__PURE__ */
|
|
9144
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconEquipment", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9145
|
+
/* @__PURE__ */ jsx17("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
9146
|
+
/* @__PURE__ */ jsx17("path", { d: "m18 15 4-4" }),
|
|
9147
|
+
/* @__PURE__ */ jsx17("path", { d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" })
|
|
8924
9148
|
] });
|
|
8925
9149
|
}
|
|
8926
9150
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
8927
|
-
return /* @__PURE__ */
|
|
8928
|
-
/* @__PURE__ */
|
|
8929
|
-
/* @__PURE__ */
|
|
8930
|
-
/* @__PURE__ */
|
|
9151
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconMaterials", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9152
|
+
/* @__PURE__ */ jsx17("path", { d: "M10 22v-8" }),
|
|
9153
|
+
/* @__PURE__ */ jsx17("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
9154
|
+
/* @__PURE__ */ jsx17("path", { d: "M22 14a2 2 0 0 1-.971 1.715l-10 6a2 2 0 0 1-2.138-.05l-6-4A2 2 0 0 1 2 16v-6a2 2 0 0 1 .971-1.715l10-6a2 2 0 0 1 2.138.05l6 4A2 2 0 0 1 22 8z" })
|
|
8931
9155
|
] });
|
|
8932
9156
|
}
|
|
8933
|
-
return /* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
8935
|
-
/* @__PURE__ */
|
|
8936
|
-
/* @__PURE__ */
|
|
9157
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconOther", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9158
|
+
/* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "9" }),
|
|
9159
|
+
/* @__PURE__ */ jsx17("path", { d: "M12 8v4" }),
|
|
9160
|
+
/* @__PURE__ */ jsx17("path", { d: "M12 16h.01" })
|
|
8937
9161
|
] });
|
|
8938
9162
|
};
|
|
8939
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */
|
|
8940
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */
|
|
9163
|
+
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ jsx17("svg", { className: "gantt-resourceTimeline-resourceTypeDropdownIcon", width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx17("path", { d: "M2 3.5 5 6.5 8 3.5" }) });
|
|
9164
|
+
var ResourceGroupChevronIcon = () => /* @__PURE__ */ jsx17("svg", { className: "gantt-resourceTimeline-resourceGroupChevronIcon", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx17("path", { d: "M4 2.5 7.5 6 4 9.5" }) });
|
|
8941
9165
|
function isInactiveResourceStatus(status) {
|
|
8942
9166
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
8943
9167
|
}
|
|
8944
|
-
var ResourceStatusLockIcon = () => /* @__PURE__ */
|
|
8945
|
-
/* @__PURE__ */
|
|
8946
|
-
/* @__PURE__ */
|
|
9168
|
+
var ResourceStatusLockIcon = () => /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9169
|
+
/* @__PURE__ */ jsx17("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
9170
|
+
/* @__PURE__ */ jsx17("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
8947
9171
|
] });
|
|
8948
9172
|
var ResourceHeader = ({
|
|
8949
9173
|
resource,
|
|
@@ -8960,11 +9184,11 @@ var ResourceHeader = ({
|
|
|
8960
9184
|
onConflictBadgeClick,
|
|
8961
9185
|
columnTemplate
|
|
8962
9186
|
}) => {
|
|
8963
|
-
const [menuOpen, setMenuOpen] =
|
|
8964
|
-
const [typeMenuOpen, setTypeMenuOpen] =
|
|
8965
|
-
const [scopeMenuOpen, setScopeMenuOpen] =
|
|
8966
|
-
const [editingName, setEditingName] =
|
|
8967
|
-
const [nameValue, setNameValue] =
|
|
9187
|
+
const [menuOpen, setMenuOpen] = useState9(false);
|
|
9188
|
+
const [typeMenuOpen, setTypeMenuOpen] = useState9(false);
|
|
9189
|
+
const [scopeMenuOpen, setScopeMenuOpen] = useState9(false);
|
|
9190
|
+
const [editingName, setEditingName] = useState9(false);
|
|
9191
|
+
const [nameValue, setNameValue] = useState9(resource.name);
|
|
8968
9192
|
const nameInputRef = useRef8(null);
|
|
8969
9193
|
const nameConfirmedRef = useRef8(false);
|
|
8970
9194
|
const visibleCommands = useMemo10(
|
|
@@ -9033,7 +9257,7 @@ var ResourceHeader = ({
|
|
|
9033
9257
|
handleNameCancel();
|
|
9034
9258
|
}
|
|
9035
9259
|
}, [applyResourcePatch, handleNameCancel, nameValue, resource.name]);
|
|
9036
|
-
return /* @__PURE__ */
|
|
9260
|
+
return /* @__PURE__ */ jsxs13(
|
|
9037
9261
|
"div",
|
|
9038
9262
|
{
|
|
9039
9263
|
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
|
|
@@ -9044,10 +9268,10 @@ var ResourceHeader = ({
|
|
|
9044
9268
|
gridTemplateColumns: columnTemplate
|
|
9045
9269
|
},
|
|
9046
9270
|
children: [
|
|
9047
|
-
/* @__PURE__ */
|
|
9048
|
-
/* @__PURE__ */
|
|
9049
|
-
/* @__PURE__ */
|
|
9050
|
-
/* @__PURE__ */
|
|
9271
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
9272
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
9273
|
+
/* @__PURE__ */ jsxs13(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
9274
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
9051
9275
|
"button",
|
|
9052
9276
|
{
|
|
9053
9277
|
type: "button",
|
|
@@ -9060,12 +9284,12 @@ var ResourceHeader = ({
|
|
|
9060
9284
|
setTypeMenuOpen((open) => !open);
|
|
9061
9285
|
},
|
|
9062
9286
|
children: [
|
|
9063
|
-
/* @__PURE__ */
|
|
9064
|
-
/* @__PURE__ */
|
|
9287
|
+
/* @__PURE__ */ jsx17(ResourceTypeIcon, { type }),
|
|
9288
|
+
/* @__PURE__ */ jsx17(ResourceTypeDropdownIcon, {})
|
|
9065
9289
|
]
|
|
9066
9290
|
}
|
|
9067
9291
|
) }),
|
|
9068
|
-
/* @__PURE__ */
|
|
9292
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
9069
9293
|
"button",
|
|
9070
9294
|
{
|
|
9071
9295
|
type: "button",
|
|
@@ -9076,14 +9300,14 @@ var ResourceHeader = ({
|
|
|
9076
9300
|
applyResourcePatch({ type: option });
|
|
9077
9301
|
},
|
|
9078
9302
|
children: [
|
|
9079
|
-
/* @__PURE__ */
|
|
9303
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ jsx17(ResourceTypeIcon, { type: option }) }),
|
|
9080
9304
|
option
|
|
9081
9305
|
]
|
|
9082
9306
|
},
|
|
9083
9307
|
option
|
|
9084
9308
|
)) })
|
|
9085
9309
|
] }),
|
|
9086
|
-
editingName ? /* @__PURE__ */
|
|
9310
|
+
editingName ? /* @__PURE__ */ jsx17(
|
|
9087
9311
|
Input,
|
|
9088
9312
|
{
|
|
9089
9313
|
ref: nameInputRef,
|
|
@@ -9095,7 +9319,7 @@ var ResourceHeader = ({
|
|
|
9095
9319
|
"aria-label": `\u041D\u043E\u0432\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}`,
|
|
9096
9320
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
9097
9321
|
}
|
|
9098
|
-
) : /* @__PURE__ */
|
|
9322
|
+
) : /* @__PURE__ */ jsx17(
|
|
9099
9323
|
"button",
|
|
9100
9324
|
{
|
|
9101
9325
|
type: "button",
|
|
@@ -9107,23 +9331,23 @@ var ResourceHeader = ({
|
|
|
9107
9331
|
onResourceNameClick?.(resourceId);
|
|
9108
9332
|
},
|
|
9109
9333
|
onDoubleClick: handleNameDoubleClick,
|
|
9110
|
-
children: /* @__PURE__ */
|
|
9111
|
-
isInactive && /* @__PURE__ */
|
|
9334
|
+
children: /* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
9335
|
+
isInactive && /* @__PURE__ */ jsx17(
|
|
9112
9336
|
"span",
|
|
9113
9337
|
{
|
|
9114
9338
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
9115
9339
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
9116
9340
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
9117
|
-
children: /* @__PURE__ */
|
|
9341
|
+
children: /* @__PURE__ */ jsx17(ResourceStatusLockIcon, {})
|
|
9118
9342
|
}
|
|
9119
9343
|
),
|
|
9120
|
-
/* @__PURE__ */
|
|
9344
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
9121
9345
|
] })
|
|
9122
9346
|
}
|
|
9123
9347
|
)
|
|
9124
9348
|
] }),
|
|
9125
|
-
/* @__PURE__ */
|
|
9126
|
-
/* @__PURE__ */
|
|
9349
|
+
/* @__PURE__ */ jsxs13(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
9350
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
9127
9351
|
"button",
|
|
9128
9352
|
{
|
|
9129
9353
|
type: "button",
|
|
@@ -9134,10 +9358,10 @@ var ResourceHeader = ({
|
|
|
9134
9358
|
event.stopPropagation();
|
|
9135
9359
|
setScopeMenuOpen((open) => !open);
|
|
9136
9360
|
},
|
|
9137
|
-
children: /* @__PURE__ */
|
|
9361
|
+
children: /* @__PURE__ */ jsx17("span", { children: scopeLabel })
|
|
9138
9362
|
}
|
|
9139
9363
|
) }),
|
|
9140
|
-
/* @__PURE__ */
|
|
9364
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_SCOPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
9141
9365
|
"button",
|
|
9142
9366
|
{
|
|
9143
9367
|
type: "button",
|
|
@@ -9148,35 +9372,35 @@ var ResourceHeader = ({
|
|
|
9148
9372
|
applyResourcePatch({ scope: option });
|
|
9149
9373
|
},
|
|
9150
9374
|
children: [
|
|
9151
|
-
/* @__PURE__ */
|
|
9375
|
+
/* @__PURE__ */ jsx17("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
9152
9376
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
9153
9377
|
]
|
|
9154
9378
|
},
|
|
9155
9379
|
option
|
|
9156
9380
|
)) })
|
|
9157
9381
|
] }),
|
|
9158
|
-
/* @__PURE__ */
|
|
9382
|
+
/* @__PURE__ */ jsxs13(
|
|
9159
9383
|
"span",
|
|
9160
9384
|
{
|
|
9161
9385
|
className: "gantt-resourceTimeline-resourceAssignments",
|
|
9162
9386
|
"aria-label": `\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}: ${assignmentCount}, ${workedDays} \u0434\u043D.`,
|
|
9163
9387
|
children: [
|
|
9164
|
-
/* @__PURE__ */
|
|
9165
|
-
/* @__PURE__ */
|
|
9166
|
-
/* @__PURE__ */
|
|
9388
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
9389
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
9390
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
9167
9391
|
] }),
|
|
9168
|
-
/* @__PURE__ */
|
|
9169
|
-
/* @__PURE__ */
|
|
9170
|
-
assignmentCount > 0 && /* @__PURE__ */
|
|
9171
|
-
/* @__PURE__ */
|
|
9172
|
-
/* @__PURE__ */
|
|
9392
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
9393
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
9394
|
+
assignmentCount > 0 && /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceAssignmentIcon", width: "14", height: "14", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9395
|
+
/* @__PURE__ */ jsx17("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
9396
|
+
/* @__PURE__ */ jsx17("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
9173
9397
|
] })
|
|
9174
9398
|
] })
|
|
9175
9399
|
]
|
|
9176
9400
|
}
|
|
9177
9401
|
),
|
|
9178
|
-
/* @__PURE__ */
|
|
9179
|
-
conflictCount > 0 && /* @__PURE__ */
|
|
9402
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
9403
|
+
conflictCount > 0 && /* @__PURE__ */ jsx17(
|
|
9180
9404
|
"button",
|
|
9181
9405
|
{
|
|
9182
9406
|
type: "button",
|
|
@@ -9190,8 +9414,8 @@ var ResourceHeader = ({
|
|
|
9190
9414
|
children: conflictCount
|
|
9191
9415
|
}
|
|
9192
9416
|
),
|
|
9193
|
-
hasMenu && /* @__PURE__ */
|
|
9194
|
-
/* @__PURE__ */
|
|
9417
|
+
hasMenu && /* @__PURE__ */ jsxs13(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
9418
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
9195
9419
|
"button",
|
|
9196
9420
|
{
|
|
9197
9421
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -9201,10 +9425,10 @@ var ResourceHeader = ({
|
|
|
9201
9425
|
event.stopPropagation();
|
|
9202
9426
|
setMenuOpen((open) => !open);
|
|
9203
9427
|
},
|
|
9204
|
-
children: /* @__PURE__ */
|
|
9428
|
+
children: /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
9205
9429
|
}
|
|
9206
9430
|
) }),
|
|
9207
|
-
/* @__PURE__ */
|
|
9431
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceMenu", portal: true, align: "end", children: visibleCommands.map((command) => /* @__PURE__ */ jsxs13(
|
|
9208
9432
|
"button",
|
|
9209
9433
|
{
|
|
9210
9434
|
type: "button",
|
|
@@ -9225,7 +9449,7 @@ var ResourceHeader = ({
|
|
|
9225
9449
|
);
|
|
9226
9450
|
};
|
|
9227
9451
|
var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
9228
|
-
const [nameValue, setNameValue] =
|
|
9452
|
+
const [nameValue, setNameValue] = useState9("");
|
|
9229
9453
|
const inputRef = useRef8(null);
|
|
9230
9454
|
const confirmedRef = useRef8(false);
|
|
9231
9455
|
useEffect8(() => {
|
|
@@ -9257,7 +9481,7 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9257
9481
|
handleConfirm();
|
|
9258
9482
|
}
|
|
9259
9483
|
};
|
|
9260
|
-
return /* @__PURE__ */
|
|
9484
|
+
return /* @__PURE__ */ jsxs13(
|
|
9261
9485
|
"div",
|
|
9262
9486
|
{
|
|
9263
9487
|
className: "gantt-resourceTimeline-resourceHeader gantt-resourceTimeline-resourceHeaderNew",
|
|
@@ -9267,8 +9491,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9267
9491
|
gridTemplateColumns: columnTemplate
|
|
9268
9492
|
},
|
|
9269
9493
|
children: [
|
|
9270
|
-
/* @__PURE__ */
|
|
9271
|
-
/* @__PURE__ */
|
|
9494
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
9495
|
+
/* @__PURE__ */ jsx17(
|
|
9272
9496
|
Input,
|
|
9273
9497
|
{
|
|
9274
9498
|
ref: inputRef,
|
|
@@ -9320,11 +9544,11 @@ function ResourceTimelineChart({
|
|
|
9320
9544
|
const conflictNavigationIndexRef = useRef8(/* @__PURE__ */ new Map());
|
|
9321
9545
|
const resourceNavigationIndexRef = useRef8(/* @__PURE__ */ new Map());
|
|
9322
9546
|
const conflictHighlightTimeoutRef = useRef8(null);
|
|
9323
|
-
const [isCreatingResource, setIsCreatingResource] =
|
|
9324
|
-
const [creatingResourceGroupType, setCreatingResourceGroupType] =
|
|
9325
|
-
const [activeConflictItemId, setActiveConflictItemId] =
|
|
9326
|
-
const [resourceColumnHasRightShadow, setResourceColumnHasRightShadow] =
|
|
9327
|
-
const [resourceColumnWidthOverrides, setResourceColumnWidthOverrides] =
|
|
9547
|
+
const [isCreatingResource, setIsCreatingResource] = useState9(false);
|
|
9548
|
+
const [creatingResourceGroupType, setCreatingResourceGroupType] = useState9(null);
|
|
9549
|
+
const [activeConflictItemId, setActiveConflictItemId] = useState9(null);
|
|
9550
|
+
const [resourceColumnHasRightShadow, setResourceColumnHasRightShadow] = useState9(false);
|
|
9551
|
+
const [resourceColumnWidthOverrides, setResourceColumnWidthOverrides] = useState9(() => normalizeResourceColumnWidthMap(resourceTableColumnWidths));
|
|
9328
9552
|
const validItems = useMemo10(() => collectValidItems(resources), [resources]);
|
|
9329
9553
|
const dateRange = useMemo10(() => getMultiMonthDays(validItems), [validItems]);
|
|
9330
9554
|
const monthStart = useMemo10(() => {
|
|
@@ -9392,7 +9616,7 @@ function ResourceTimelineChart({
|
|
|
9392
9616
|
);
|
|
9393
9617
|
const canAddResource = enableAddResource && Boolean(onAddResource);
|
|
9394
9618
|
const resourceAddRowHeight = laneHeight + DEFAULT_RESOURCE_ROW_GAP;
|
|
9395
|
-
const [collapsedResourceGroups, setCollapsedResourceGroups] =
|
|
9619
|
+
const [collapsedResourceGroups, setCollapsedResourceGroups] = useState9(/* @__PURE__ */ new Set());
|
|
9396
9620
|
const updateResourceColumnWidth = useCallback8((columnId, width) => {
|
|
9397
9621
|
setResourceColumnWidthOverrides((prev) => {
|
|
9398
9622
|
if (prev[columnId] === width) {
|
|
@@ -9447,7 +9671,7 @@ function ResourceTimelineChart({
|
|
|
9447
9671
|
document.body.style.cursor = "col-resize";
|
|
9448
9672
|
document.body.style.userSelect = "none";
|
|
9449
9673
|
}, [resolvedResourceColumnWidths]);
|
|
9450
|
-
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */
|
|
9674
|
+
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */ jsx17(
|
|
9451
9675
|
"button",
|
|
9452
9676
|
{
|
|
9453
9677
|
type: "button",
|
|
@@ -9758,7 +9982,7 @@ function ResourceTimelineChart({
|
|
|
9758
9982
|
}
|
|
9759
9983
|
};
|
|
9760
9984
|
}, []);
|
|
9761
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ jsx17("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ jsx17(
|
|
9762
9986
|
"div",
|
|
9763
9987
|
{
|
|
9764
9988
|
ref: scrollContainerRef,
|
|
@@ -9769,44 +9993,44 @@ function ResourceTimelineChart({
|
|
|
9769
9993
|
},
|
|
9770
9994
|
"data-allow-vertical-pan": allowVerticalPan ? "true" : "false",
|
|
9771
9995
|
onMouseDown: handlePanStart,
|
|
9772
|
-
children: /* @__PURE__ */
|
|
9773
|
-
/* @__PURE__ */
|
|
9996
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-scrollContent", children: [
|
|
9997
|
+
/* @__PURE__ */ jsxs13(
|
|
9774
9998
|
"div",
|
|
9775
9999
|
{
|
|
9776
10000
|
className: `gantt-resourceTimeline-resourceColumn${resourceColumnHasRightShadow ? " gantt-resourceTimeline-resourceColumnShadowed" : ""}`,
|
|
9777
10001
|
style: { width: `${effectiveRowHeaderWidth}px`, minWidth: `${effectiveRowHeaderWidth}px` },
|
|
9778
10002
|
children: [
|
|
9779
|
-
/* @__PURE__ */
|
|
10003
|
+
/* @__PURE__ */ jsxs13(
|
|
9780
10004
|
"div",
|
|
9781
10005
|
{
|
|
9782
10006
|
className: "gantt-resourceTimeline-corner",
|
|
9783
10007
|
style: { height: `${timelineHeaderHeight}px`, gridTemplateColumns: resourceColumnTemplate },
|
|
9784
10008
|
children: [
|
|
9785
|
-
/* @__PURE__ */
|
|
10009
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderNumber", children: [
|
|
9786
10010
|
"#",
|
|
9787
10011
|
renderResizeHandle("number")
|
|
9788
10012
|
] }),
|
|
9789
|
-
/* @__PURE__ */
|
|
10013
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderName", children: [
|
|
9790
10014
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
9791
10015
|
renderResizeHandle("name")
|
|
9792
10016
|
] }),
|
|
9793
|
-
/* @__PURE__ */
|
|
9794
|
-
/* @__PURE__ */
|
|
10017
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceHeaderCell", "aria-label": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C", children: renderResizeHandle("availability") }),
|
|
10018
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
9795
10019
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
9796
10020
|
renderResizeHandle("assignments")
|
|
9797
10021
|
] }),
|
|
9798
|
-
/* @__PURE__ */
|
|
10022
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderActions", "aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F", children: renderResizeHandle("actions") })
|
|
9799
10023
|
]
|
|
9800
10024
|
}
|
|
9801
10025
|
),
|
|
9802
|
-
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
9803
|
-
/* @__PURE__ */
|
|
10026
|
+
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsxs13(React13.Fragment, { children: [
|
|
10027
|
+
/* @__PURE__ */ jsxs13(
|
|
9804
10028
|
"div",
|
|
9805
10029
|
{
|
|
9806
10030
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
9807
10031
|
style: { height: `${group.height}px` },
|
|
9808
10032
|
children: [
|
|
9809
|
-
/* @__PURE__ */
|
|
10033
|
+
/* @__PURE__ */ jsx17(
|
|
9810
10034
|
"button",
|
|
9811
10035
|
{
|
|
9812
10036
|
type: "button",
|
|
@@ -9817,12 +10041,12 @@ function ResourceTimelineChart({
|
|
|
9817
10041
|
event.stopPropagation();
|
|
9818
10042
|
toggleResourceGroupCollapsed(group.key);
|
|
9819
10043
|
},
|
|
9820
|
-
children: /* @__PURE__ */
|
|
10044
|
+
children: /* @__PURE__ */ jsx17(ResourceGroupChevronIcon, {})
|
|
9821
10045
|
}
|
|
9822
10046
|
),
|
|
9823
|
-
/* @__PURE__ */
|
|
9824
|
-
/* @__PURE__ */
|
|
9825
|
-
canAddResource && /* @__PURE__ */
|
|
10047
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
10048
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
10049
|
+
canAddResource && /* @__PURE__ */ jsx17(
|
|
9826
10050
|
"button",
|
|
9827
10051
|
{
|
|
9828
10052
|
type: "button",
|
|
@@ -9841,7 +10065,7 @@ function ResourceTimelineChart({
|
|
|
9841
10065
|
),
|
|
9842
10066
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
9843
10067
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
9844
|
-
return /* @__PURE__ */
|
|
10068
|
+
return /* @__PURE__ */ jsx17(
|
|
9845
10069
|
ResourceHeader,
|
|
9846
10070
|
{
|
|
9847
10071
|
resource: row.resource,
|
|
@@ -9861,7 +10085,7 @@ function ResourceTimelineChart({
|
|
|
9861
10085
|
row.resourceId
|
|
9862
10086
|
);
|
|
9863
10087
|
}),
|
|
9864
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */
|
|
10088
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ jsx17(
|
|
9865
10089
|
NewResourceRow,
|
|
9866
10090
|
{
|
|
9867
10091
|
height: resourceAddRowHeight,
|
|
@@ -9870,7 +10094,7 @@ function ResourceTimelineChart({
|
|
|
9870
10094
|
columnTemplate: resourceColumnTemplate
|
|
9871
10095
|
}
|
|
9872
10096
|
)
|
|
9873
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */
|
|
10097
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ jsx17(
|
|
9874
10098
|
ResourceHeader,
|
|
9875
10099
|
{
|
|
9876
10100
|
resource: row.resource,
|
|
@@ -9889,7 +10113,7 @@ function ResourceTimelineChart({
|
|
|
9889
10113
|
},
|
|
9890
10114
|
row.resourceId
|
|
9891
10115
|
)),
|
|
9892
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */
|
|
10116
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ jsx17(
|
|
9893
10117
|
NewResourceRow,
|
|
9894
10118
|
{
|
|
9895
10119
|
height: resourceAddRowHeight,
|
|
@@ -9897,7 +10121,7 @@ function ResourceTimelineChart({
|
|
|
9897
10121
|
onCancel: handleCancelNewResource,
|
|
9898
10122
|
columnTemplate: resourceColumnTemplate
|
|
9899
10123
|
}
|
|
9900
|
-
) : /* @__PURE__ */
|
|
10124
|
+
) : /* @__PURE__ */ jsx17(
|
|
9901
10125
|
"button",
|
|
9902
10126
|
{
|
|
9903
10127
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -9913,18 +10137,18 @@ function ResourceTimelineChart({
|
|
|
9913
10137
|
]
|
|
9914
10138
|
}
|
|
9915
10139
|
),
|
|
9916
|
-
/* @__PURE__ */
|
|
10140
|
+
/* @__PURE__ */ jsxs13(
|
|
9917
10141
|
"div",
|
|
9918
10142
|
{
|
|
9919
10143
|
className: "gantt-resourceTimeline-chartSurface",
|
|
9920
10144
|
style: { minWidth: `${gridWidth}px` },
|
|
9921
10145
|
children: [
|
|
9922
|
-
/* @__PURE__ */
|
|
10146
|
+
/* @__PURE__ */ jsx17(
|
|
9923
10147
|
"div",
|
|
9924
10148
|
{
|
|
9925
10149
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
9926
10150
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
9927
|
-
children: /* @__PURE__ */
|
|
10151
|
+
children: /* @__PURE__ */ jsx17(
|
|
9928
10152
|
TimeScaleHeader_default,
|
|
9929
10153
|
{
|
|
9930
10154
|
days: dateRange,
|
|
@@ -9936,14 +10160,14 @@ function ResourceTimelineChart({
|
|
|
9936
10160
|
)
|
|
9937
10161
|
}
|
|
9938
10162
|
),
|
|
9939
|
-
/* @__PURE__ */
|
|
10163
|
+
/* @__PURE__ */ jsxs13(
|
|
9940
10164
|
"div",
|
|
9941
10165
|
{
|
|
9942
10166
|
ref: gridRef,
|
|
9943
10167
|
className: "gantt-resourceTimeline-grid",
|
|
9944
10168
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
9945
10169
|
children: [
|
|
9946
|
-
/* @__PURE__ */
|
|
10170
|
+
/* @__PURE__ */ jsx17(
|
|
9947
10171
|
GridBackground_default,
|
|
9948
10172
|
{
|
|
9949
10173
|
dateRange,
|
|
@@ -9953,8 +10177,8 @@ function ResourceTimelineChart({
|
|
|
9953
10177
|
isCustomWeekend: weekendPredicate
|
|
9954
10178
|
}
|
|
9955
10179
|
),
|
|
9956
|
-
todayInRange && /* @__PURE__ */
|
|
9957
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
10180
|
+
todayInRange && /* @__PURE__ */ jsx17(TodayIndicator_default, { monthStart, dayWidth }),
|
|
10181
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsx17(
|
|
9958
10182
|
"div",
|
|
9959
10183
|
{
|
|
9960
10184
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -9966,7 +10190,7 @@ function ResourceTimelineChart({
|
|
|
9966
10190
|
},
|
|
9967
10191
|
`group-row-${group.key}`
|
|
9968
10192
|
)),
|
|
9969
|
-
displayLayout.rows.map((row) => /* @__PURE__ */
|
|
10193
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ jsx17(
|
|
9970
10194
|
"div",
|
|
9971
10195
|
{
|
|
9972
10196
|
className: "gantt-resourceTimeline-row",
|
|
@@ -9978,7 +10202,7 @@ function ResourceTimelineChart({
|
|
|
9978
10202
|
},
|
|
9979
10203
|
row.resourceId
|
|
9980
10204
|
)),
|
|
9981
|
-
canAddResource && /* @__PURE__ */
|
|
10205
|
+
canAddResource && /* @__PURE__ */ jsx17(
|
|
9982
10206
|
"div",
|
|
9983
10207
|
{
|
|
9984
10208
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -9989,7 +10213,7 @@ function ResourceTimelineChart({
|
|
|
9989
10213
|
}
|
|
9990
10214
|
}
|
|
9991
10215
|
),
|
|
9992
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */
|
|
10216
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ jsx17(
|
|
9993
10217
|
"div",
|
|
9994
10218
|
{
|
|
9995
10219
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10060,7 +10284,7 @@ function ResourceTimelineChart({
|
|
|
10060
10284
|
const tooltipFirstLine = layoutItem.item.tooltip?.firstLine ?? layoutItem.item.title;
|
|
10061
10285
|
const tooltipSecondLine = resourceItemTooltipLines === 2 ? layoutItem.item.tooltip?.secondLine ?? layoutItem.item.subtitle : void 0;
|
|
10062
10286
|
const tooltipSecondLineIcon = layoutItem.item.tooltip?.secondLineIcon;
|
|
10063
|
-
return /* @__PURE__ */
|
|
10287
|
+
return /* @__PURE__ */ jsxs13(
|
|
10064
10288
|
"div",
|
|
10065
10289
|
{
|
|
10066
10290
|
className,
|
|
@@ -10088,11 +10312,11 @@ function ResourceTimelineChart({
|
|
|
10088
10312
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
10089
10313
|
},
|
|
10090
10314
|
children: [
|
|
10091
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */
|
|
10092
|
-
/* @__PURE__ */
|
|
10093
|
-
/* @__PURE__ */
|
|
10315
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
10316
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
10317
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
10094
10318
|
] }),
|
|
10095
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
10319
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx17(
|
|
10096
10320
|
"span",
|
|
10097
10321
|
{
|
|
10098
10322
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -10104,7 +10328,7 @@ function ResourceTimelineChart({
|
|
|
10104
10328
|
},
|
|
10105
10329
|
`weekend-overlay-${index}`
|
|
10106
10330
|
)),
|
|
10107
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
10331
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx17(
|
|
10108
10332
|
"span",
|
|
10109
10333
|
{
|
|
10110
10334
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -10116,7 +10340,7 @@ function ResourceTimelineChart({
|
|
|
10116
10340
|
},
|
|
10117
10341
|
`conflict-overlay-${index}`
|
|
10118
10342
|
)),
|
|
10119
|
-
hasItemMenu && /* @__PURE__ */
|
|
10343
|
+
hasItemMenu && /* @__PURE__ */ jsx17(
|
|
10120
10344
|
"button",
|
|
10121
10345
|
{
|
|
10122
10346
|
type: "button",
|
|
@@ -10129,12 +10353,12 @@ function ResourceTimelineChart({
|
|
|
10129
10353
|
event.stopPropagation();
|
|
10130
10354
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
10131
10355
|
},
|
|
10132
|
-
children: /* @__PURE__ */
|
|
10356
|
+
children: /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
10133
10357
|
}
|
|
10134
10358
|
),
|
|
10135
|
-
/* @__PURE__ */
|
|
10136
|
-
/* @__PURE__ */
|
|
10137
|
-
/* @__PURE__ */
|
|
10359
|
+
/* @__PURE__ */ jsx17("div", { className: "gantt-resourceTimeline-itemInner", children: renderItem ? renderItem(layoutItem.item, renderContext) : /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemContent", children: [
|
|
10360
|
+
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
10361
|
+
/* @__PURE__ */ jsx17(
|
|
10138
10362
|
"span",
|
|
10139
10363
|
{
|
|
10140
10364
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -10142,15 +10366,15 @@ function ResourceTimelineChart({
|
|
|
10142
10366
|
children: durationValue
|
|
10143
10367
|
}
|
|
10144
10368
|
),
|
|
10145
|
-
/* @__PURE__ */
|
|
10369
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
10146
10370
|
] }),
|
|
10147
|
-
layoutItem.item.subtitle && /* @__PURE__ */
|
|
10371
|
+
layoutItem.item.subtitle && /* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
10148
10372
|
] }) }),
|
|
10149
|
-
/* @__PURE__ */
|
|
10150
|
-
/* @__PURE__ */
|
|
10151
|
-
tooltipSecondLine && /* @__PURE__ */
|
|
10152
|
-
tooltipSecondLineIcon && /* @__PURE__ */
|
|
10153
|
-
/* @__PURE__ */
|
|
10373
|
+
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
10374
|
+
/* @__PURE__ */ jsx17("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
10375
|
+
tooltipSecondLine && /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
10376
|
+
tooltipSecondLineIcon && /* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
10377
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
10154
10378
|
] })
|
|
10155
10379
|
] })
|
|
10156
10380
|
]
|
|
@@ -10171,8 +10395,8 @@ function ResourceTimelineChart({
|
|
|
10171
10395
|
}
|
|
10172
10396
|
|
|
10173
10397
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
10174
|
-
import { useLayoutEffect, useMemo as useMemo11, useRef as useRef9, useState as
|
|
10175
|
-
import { jsx as
|
|
10398
|
+
import { useLayoutEffect, useMemo as useMemo11, useRef as useRef9, useState as useState10 } from "react";
|
|
10399
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10176
10400
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
10177
10401
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
10178
10402
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
@@ -10239,7 +10463,7 @@ function TableMatrix({
|
|
|
10239
10463
|
visibleRowIndices
|
|
10240
10464
|
}) {
|
|
10241
10465
|
const measureRef = useRef9(null);
|
|
10242
|
-
const [measuredAutoWidths, setMeasuredAutoWidths] =
|
|
10466
|
+
const [measuredAutoWidths, setMeasuredAutoWidths] = useState10([]);
|
|
10243
10467
|
const hasAutoWidthColumns = useMemo11(
|
|
10244
10468
|
() => columns.some((column) => typeof column.width !== "number"),
|
|
10245
10469
|
[columns]
|
|
@@ -10372,9 +10596,9 @@ function TableMatrix({
|
|
|
10372
10596
|
return task ? { task, index } : null;
|
|
10373
10597
|
}).filter((entry) => entry !== null);
|
|
10374
10598
|
}, [tasks, visibleRowIndices]);
|
|
10375
|
-
return /* @__PURE__ */
|
|
10376
|
-
hasAutoWidthColumns && /* @__PURE__ */
|
|
10377
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
10599
|
+
return /* @__PURE__ */ jsxs14("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
10600
|
+
hasAutoWidthColumns && /* @__PURE__ */ jsxs14("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
10601
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx18(
|
|
10378
10602
|
"div",
|
|
10379
10603
|
{
|
|
10380
10604
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10383,7 +10607,7 @@ function TableMatrix({
|
|
|
10383
10607
|
},
|
|
10384
10608
|
`header:${column.id}`
|
|
10385
10609
|
)),
|
|
10386
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
10610
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx18(
|
|
10387
10611
|
"div",
|
|
10388
10612
|
{
|
|
10389
10613
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10393,8 +10617,8 @@ function TableMatrix({
|
|
|
10393
10617
|
`${task.id}:${column.id}`
|
|
10394
10618
|
)))
|
|
10395
10619
|
] }),
|
|
10396
|
-
/* @__PURE__ */
|
|
10397
|
-
hasGroupHeader && /* @__PURE__ */
|
|
10620
|
+
/* @__PURE__ */ jsxs14("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
10621
|
+
hasGroupHeader && /* @__PURE__ */ jsx18(
|
|
10398
10622
|
"div",
|
|
10399
10623
|
{
|
|
10400
10624
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -10402,7 +10626,7 @@ function TableMatrix({
|
|
|
10402
10626
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
10403
10627
|
height: `${topRowHeight}px`
|
|
10404
10628
|
},
|
|
10405
|
-
children: headerSpans.map((span) => /* @__PURE__ */
|
|
10629
|
+
children: headerSpans.map((span) => /* @__PURE__ */ jsx18(
|
|
10406
10630
|
"div",
|
|
10407
10631
|
{
|
|
10408
10632
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -10413,7 +10637,7 @@ function TableMatrix({
|
|
|
10413
10637
|
))
|
|
10414
10638
|
}
|
|
10415
10639
|
),
|
|
10416
|
-
/* @__PURE__ */
|
|
10640
|
+
/* @__PURE__ */ jsx18(
|
|
10417
10641
|
"div",
|
|
10418
10642
|
{
|
|
10419
10643
|
className: "gantt-mx-headerRow",
|
|
@@ -10421,7 +10645,7 @@ function TableMatrix({
|
|
|
10421
10645
|
children: columns.map((column) => {
|
|
10422
10646
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10423
10647
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10424
|
-
return /* @__PURE__ */
|
|
10648
|
+
return /* @__PURE__ */ jsxs14(
|
|
10425
10649
|
"div",
|
|
10426
10650
|
{
|
|
10427
10651
|
className: joinClasses(
|
|
@@ -10430,7 +10654,7 @@ function TableMatrix({
|
|
|
10430
10654
|
),
|
|
10431
10655
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
10432
10656
|
children: [
|
|
10433
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
10657
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx18(
|
|
10434
10658
|
"span",
|
|
10435
10659
|
{
|
|
10436
10660
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10440,7 +10664,7 @@ function TableMatrix({
|
|
|
10440
10664
|
}
|
|
10441
10665
|
}
|
|
10442
10666
|
),
|
|
10443
|
-
/* @__PURE__ */
|
|
10667
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
10444
10668
|
]
|
|
10445
10669
|
},
|
|
10446
10670
|
column.id
|
|
@@ -10449,7 +10673,7 @@ function TableMatrix({
|
|
|
10449
10673
|
}
|
|
10450
10674
|
)
|
|
10451
10675
|
] }),
|
|
10452
|
-
/* @__PURE__ */
|
|
10676
|
+
/* @__PURE__ */ jsx18(
|
|
10453
10677
|
"div",
|
|
10454
10678
|
{
|
|
10455
10679
|
className: "gantt-mx-body",
|
|
@@ -10463,7 +10687,7 @@ function TableMatrix({
|
|
|
10463
10687
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
10464
10688
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
10465
10689
|
const isTotal = Boolean(task.isTotal);
|
|
10466
|
-
return /* @__PURE__ */
|
|
10690
|
+
return /* @__PURE__ */ jsx18(
|
|
10467
10691
|
"div",
|
|
10468
10692
|
{
|
|
10469
10693
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10488,7 +10712,7 @@ function TableMatrix({
|
|
|
10488
10712
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10489
10713
|
const shouldRenderOverlay = overlayWidthPercent > 0 && (!dateOverlay || !dateOverlay.shouldRender || dateOverlay.shouldRender({ task, column, rowIndex: index, columnIndex }));
|
|
10490
10714
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10491
|
-
return /* @__PURE__ */
|
|
10715
|
+
return /* @__PURE__ */ jsxs14(
|
|
10492
10716
|
"div",
|
|
10493
10717
|
{
|
|
10494
10718
|
className: joinClasses(
|
|
@@ -10503,7 +10727,7 @@ function TableMatrix({
|
|
|
10503
10727
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
10504
10728
|
},
|
|
10505
10729
|
children: [
|
|
10506
|
-
shouldRenderOverlay && /* @__PURE__ */
|
|
10730
|
+
shouldRenderOverlay && /* @__PURE__ */ jsx18(
|
|
10507
10731
|
"span",
|
|
10508
10732
|
{
|
|
10509
10733
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -10513,7 +10737,7 @@ function TableMatrix({
|
|
|
10513
10737
|
}
|
|
10514
10738
|
}
|
|
10515
10739
|
),
|
|
10516
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
10740
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx18(
|
|
10517
10741
|
"span",
|
|
10518
10742
|
{
|
|
10519
10743
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10523,7 +10747,7 @@ function TableMatrix({
|
|
|
10523
10747
|
}
|
|
10524
10748
|
}
|
|
10525
10749
|
),
|
|
10526
|
-
/* @__PURE__ */
|
|
10750
|
+
/* @__PURE__ */ jsx18("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
10527
10751
|
]
|
|
10528
10752
|
},
|
|
10529
10753
|
`${task.id}:${column.id}`
|
|
@@ -10539,8 +10763,8 @@ function TableMatrix({
|
|
|
10539
10763
|
}
|
|
10540
10764
|
|
|
10541
10765
|
// src/components/PlanFactMatrix/PlanFactMatrix.tsx
|
|
10542
|
-
import React15, { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo12, useRef as useRef10, useState as
|
|
10543
|
-
import { jsx as
|
|
10766
|
+
import React15, { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo12, useRef as useRef10, useState as useState11 } from "react";
|
|
10767
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10544
10768
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
10545
10769
|
function joinClasses2(...values) {
|
|
10546
10770
|
return values.filter(Boolean).join(" ");
|
|
@@ -10631,7 +10855,7 @@ function PlanFactCellEditor({
|
|
|
10631
10855
|
onCommitRange,
|
|
10632
10856
|
onCancel
|
|
10633
10857
|
}) {
|
|
10634
|
-
const [draft, setDraft] =
|
|
10858
|
+
const [draft, setDraft] = useState11(startValue ?? (value === void 0 ? "" : String(value)));
|
|
10635
10859
|
const inputRef = useRef10(null);
|
|
10636
10860
|
useEffect9(() => {
|
|
10637
10861
|
inputRef.current?.focus();
|
|
@@ -10649,7 +10873,7 @@ function PlanFactCellEditor({
|
|
|
10649
10873
|
}
|
|
10650
10874
|
onCommit(parsed);
|
|
10651
10875
|
}, [draft, onCancel, onCommit]);
|
|
10652
|
-
return /* @__PURE__ */
|
|
10876
|
+
return /* @__PURE__ */ jsx19(
|
|
10653
10877
|
"input",
|
|
10654
10878
|
{
|
|
10655
10879
|
ref: inputRef,
|
|
@@ -10763,7 +10987,7 @@ function PlanFactRowInner({
|
|
|
10763
10987
|
showOverflowTooltip,
|
|
10764
10988
|
hideOverflowTooltip
|
|
10765
10989
|
}) {
|
|
10766
|
-
return /* @__PURE__ */
|
|
10990
|
+
return /* @__PURE__ */ jsx19(
|
|
10767
10991
|
"div",
|
|
10768
10992
|
{
|
|
10769
10993
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10801,7 +11025,7 @@ function PlanFactRowInner({
|
|
|
10801
11025
|
const isSelected = !isParent && isInRenderedRange;
|
|
10802
11026
|
const showFillHandle = !isParent && !isEditing && isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.toDateIndex && subrowIndex === renderedRangeBounds.toSubrowIndex;
|
|
10803
11027
|
const isRangeAnchor = !showFillHandle && !isParent && selectedRange?.anchor.taskId === task.id && selectedRange.anchor.dateIndex === dateIndex && selectedRange.anchor.kind === kind;
|
|
10804
|
-
return /* @__PURE__ */
|
|
11028
|
+
return /* @__PURE__ */ jsxs15(
|
|
10805
11029
|
"div",
|
|
10806
11030
|
{
|
|
10807
11031
|
"data-plan-fact-task-id": task.id,
|
|
@@ -10898,7 +11122,7 @@ function PlanFactRowInner({
|
|
|
10898
11122
|
}
|
|
10899
11123
|
},
|
|
10900
11124
|
children: [
|
|
10901
|
-
isEditing ? /* @__PURE__ */
|
|
11125
|
+
isEditing ? /* @__PURE__ */ jsx19(
|
|
10902
11126
|
PlanFactCellEditor,
|
|
10903
11127
|
{
|
|
10904
11128
|
value,
|
|
@@ -10924,7 +11148,7 @@ function PlanFactRowInner({
|
|
|
10924
11148
|
focusCell(nextActiveCell);
|
|
10925
11149
|
}
|
|
10926
11150
|
}
|
|
10927
|
-
) : /* @__PURE__ */
|
|
11151
|
+
) : /* @__PURE__ */ jsx19(
|
|
10928
11152
|
"span",
|
|
10929
11153
|
{
|
|
10930
11154
|
className: "gantt-pf-cellValue",
|
|
@@ -10938,7 +11162,7 @@ function PlanFactRowInner({
|
|
|
10938
11162
|
children: isParent ? "" : formatValue(value)
|
|
10939
11163
|
}
|
|
10940
11164
|
),
|
|
10941
|
-
showFillHandle && /* @__PURE__ */
|
|
11165
|
+
showFillHandle && /* @__PURE__ */ jsx19(
|
|
10942
11166
|
"span",
|
|
10943
11167
|
{
|
|
10944
11168
|
className: "gantt-pf-fillHandle",
|
|
@@ -10986,11 +11210,11 @@ function PlanFactMatrix({
|
|
|
10986
11210
|
todayDateIndex,
|
|
10987
11211
|
isCustomWeekend
|
|
10988
11212
|
}) {
|
|
10989
|
-
const [activeCell, setActiveCell] =
|
|
10990
|
-
const [editingCell, setEditingCell] =
|
|
10991
|
-
const [selectedRange, setSelectedRange] =
|
|
10992
|
-
const [fillRange, setFillRange] =
|
|
10993
|
-
const [overflowTooltip, setOverflowTooltip] =
|
|
11213
|
+
const [activeCell, setActiveCell] = useState11(null);
|
|
11214
|
+
const [editingCell, setEditingCell] = useState11(null);
|
|
11215
|
+
const [selectedRange, setSelectedRange] = useState11(null);
|
|
11216
|
+
const [fillRange, setFillRange] = useState11(null);
|
|
11217
|
+
const [overflowTooltip, setOverflowTooltip] = useState11(null);
|
|
10994
11218
|
const isSelectingRef = useRef10(false);
|
|
10995
11219
|
const isFillDraggingRef = useRef10(false);
|
|
10996
11220
|
const didDragSelectRef = useRef10(false);
|
|
@@ -11450,7 +11674,7 @@ function PlanFactMatrix({
|
|
|
11450
11674
|
document.removeEventListener("mousedown", handleMouseDown);
|
|
11451
11675
|
};
|
|
11452
11676
|
}, [clearSelection]);
|
|
11453
|
-
return /* @__PURE__ */
|
|
11677
|
+
return /* @__PURE__ */ jsxs15(
|
|
11454
11678
|
"div",
|
|
11455
11679
|
{
|
|
11456
11680
|
ref: rootRef,
|
|
@@ -11460,8 +11684,8 @@ function PlanFactMatrix({
|
|
|
11460
11684
|
["--gantt-pf-day-width"]: `${dayWidth}px`
|
|
11461
11685
|
},
|
|
11462
11686
|
children: [
|
|
11463
|
-
/* @__PURE__ */
|
|
11464
|
-
/* @__PURE__ */
|
|
11687
|
+
/* @__PURE__ */ jsxs15("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
11688
|
+
/* @__PURE__ */ jsx19(
|
|
11465
11689
|
"div",
|
|
11466
11690
|
{
|
|
11467
11691
|
className: "gantt-pf-dateWindow",
|
|
@@ -11469,7 +11693,7 @@ function PlanFactMatrix({
|
|
|
11469
11693
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11470
11694
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11471
11695
|
},
|
|
11472
|
-
children: /* @__PURE__ */
|
|
11696
|
+
children: /* @__PURE__ */ jsx19(
|
|
11473
11697
|
TimeScaleHeader_default,
|
|
11474
11698
|
{
|
|
11475
11699
|
days: renderedDateWindow.days,
|
|
@@ -11481,7 +11705,7 @@ function PlanFactMatrix({
|
|
|
11481
11705
|
)
|
|
11482
11706
|
}
|
|
11483
11707
|
),
|
|
11484
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */
|
|
11708
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ jsx19(
|
|
11485
11709
|
"span",
|
|
11486
11710
|
{
|
|
11487
11711
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -11493,7 +11717,7 @@ function PlanFactMatrix({
|
|
|
11493
11717
|
}
|
|
11494
11718
|
)
|
|
11495
11719
|
] }),
|
|
11496
|
-
/* @__PURE__ */
|
|
11720
|
+
/* @__PURE__ */ jsx19("div", { className: "gantt-pf-monthSeparatorLayer", "aria-hidden": "true", children: monthSeparatorIndices.map((dateIndex) => /* @__PURE__ */ jsx19(
|
|
11497
11721
|
"span",
|
|
11498
11722
|
{
|
|
11499
11723
|
className: "gantt-pf-monthSeparator",
|
|
@@ -11504,7 +11728,7 @@ function PlanFactMatrix({
|
|
|
11504
11728
|
},
|
|
11505
11729
|
`month-separator-${dateIndex}`
|
|
11506
11730
|
)) }),
|
|
11507
|
-
/* @__PURE__ */
|
|
11731
|
+
/* @__PURE__ */ jsxs15(
|
|
11508
11732
|
"div",
|
|
11509
11733
|
{
|
|
11510
11734
|
ref: bodyRef,
|
|
@@ -11515,7 +11739,7 @@ function PlanFactMatrix({
|
|
|
11515
11739
|
width: `${totalWidth}px`
|
|
11516
11740
|
},
|
|
11517
11741
|
children: [
|
|
11518
|
-
/* @__PURE__ */
|
|
11742
|
+
/* @__PURE__ */ jsx19(
|
|
11519
11743
|
"div",
|
|
11520
11744
|
{
|
|
11521
11745
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -11523,7 +11747,7 @@ function PlanFactMatrix({
|
|
|
11523
11747
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11524
11748
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11525
11749
|
},
|
|
11526
|
-
children: /* @__PURE__ */
|
|
11750
|
+
children: /* @__PURE__ */ jsx19(
|
|
11527
11751
|
GridBackground_default,
|
|
11528
11752
|
{
|
|
11529
11753
|
dateRange: renderedDateWindow.days,
|
|
@@ -11541,7 +11765,7 @@ function PlanFactMatrix({
|
|
|
11541
11765
|
if (!task) return null;
|
|
11542
11766
|
const isParent = parentTaskIds.has(task.id);
|
|
11543
11767
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
11544
|
-
return /* @__PURE__ */
|
|
11768
|
+
return /* @__PURE__ */ jsx19(
|
|
11545
11769
|
PlanFactRow,
|
|
11546
11770
|
{
|
|
11547
11771
|
task,
|
|
@@ -11586,7 +11810,7 @@ function PlanFactMatrix({
|
|
|
11586
11810
|
]
|
|
11587
11811
|
}
|
|
11588
11812
|
),
|
|
11589
|
-
overflowTooltip && /* @__PURE__ */
|
|
11813
|
+
overflowTooltip && /* @__PURE__ */ jsx19(
|
|
11590
11814
|
"div",
|
|
11591
11815
|
{
|
|
11592
11816
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -12012,7 +12236,7 @@ function createTaskPreviewPositionStore() {
|
|
|
12012
12236
|
}
|
|
12013
12237
|
|
|
12014
12238
|
// src/components/GanttChart/GanttChart.tsx
|
|
12015
|
-
import { Fragment as
|
|
12239
|
+
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
12016
12240
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
12017
12241
|
var TASK_ROW_OVERSCAN = 8;
|
|
12018
12242
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
@@ -12139,9 +12363,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
12139
12363
|
}
|
|
12140
12364
|
function GanttChartInner(props, ref) {
|
|
12141
12365
|
if (props.mode === "resource-planner") {
|
|
12142
|
-
return /* @__PURE__ */
|
|
12366
|
+
return /* @__PURE__ */ jsx20(ResourceTimelineChart, { ...props });
|
|
12143
12367
|
}
|
|
12144
|
-
return /* @__PURE__ */
|
|
12368
|
+
return /* @__PURE__ */ jsx20(
|
|
12145
12369
|
TaskGanttChart,
|
|
12146
12370
|
{
|
|
12147
12371
|
...props,
|
|
@@ -12223,20 +12447,176 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12223
12447
|
previewPositionStoreRef.current = createTaskPreviewPositionStore();
|
|
12224
12448
|
}
|
|
12225
12449
|
const previewPositionStore = previewPositionStoreRef.current;
|
|
12226
|
-
const [selectedTaskId, setSelectedTaskId] =
|
|
12227
|
-
const [taskListHasRightShadow, setTaskListHasRightShadow] =
|
|
12228
|
-
const [internalTaskDateChangeMode, setInternalTaskDateChangeMode] =
|
|
12229
|
-
const [scrollViewport, setScrollViewport] =
|
|
12450
|
+
const [selectedTaskId, setSelectedTaskId] = useState12(null);
|
|
12451
|
+
const [taskListHasRightShadow, setTaskListHasRightShadow] = useState12(false);
|
|
12452
|
+
const [internalTaskDateChangeMode, setInternalTaskDateChangeMode] = useState12("preserve-duration");
|
|
12453
|
+
const [scrollViewport, setScrollViewport] = useState12(() => ({
|
|
12230
12454
|
scrollTop: 0,
|
|
12231
12455
|
viewportHeight: getInitialScrollViewportHeight(containerHeight, headerHeight + 1)
|
|
12232
12456
|
}));
|
|
12233
|
-
const [forceFullRenderForPrint, setForceFullRenderForPrint] =
|
|
12234
|
-
const [planFactDateWindow, setPlanFactDateWindow] =
|
|
12235
|
-
const [selectedChip, setSelectedChip] =
|
|
12236
|
-
const [
|
|
12237
|
-
const
|
|
12457
|
+
const [forceFullRenderForPrint, setForceFullRenderForPrint] = useState12(false);
|
|
12458
|
+
const [planFactDateWindow, setPlanFactDateWindow] = useState12({ start: 0, end: 0 });
|
|
12459
|
+
const [selectedChip, setSelectedChip] = useState12(null);
|
|
12460
|
+
const [dependencyCreationDrag, setDependencyCreationDrag] = useState12(null);
|
|
12461
|
+
const dependencyCreationRef = useRef11(null);
|
|
12462
|
+
const [dependencyCreationError, setDependencyCreationError] = useState12(null);
|
|
12463
|
+
const [dependencyLineMenu, setDependencyLineMenu] = useState12(null);
|
|
12464
|
+
const getDependencyPortPoint = useCallback10((element, chartRect) => {
|
|
12465
|
+
const rect = element.getBoundingClientRect();
|
|
12466
|
+
const side = element.getAttribute("data-port-side");
|
|
12467
|
+
return {
|
|
12468
|
+
// The port hit-area is deliberately outside the bar. Anchor the preview
|
|
12469
|
+
// to the actual bar boundary instead of the center of that outside zone.
|
|
12470
|
+
x: Math.round((side === "left" ? rect.right - 6 : rect.left + 6) - chartRect.left),
|
|
12471
|
+
y: Math.round(rect.top + rect.height / 2 - chartRect.top)
|
|
12472
|
+
};
|
|
12473
|
+
}, []);
|
|
12474
|
+
const getVisualDependencyType = useCallback10((sourceSide, targetSide) => {
|
|
12475
|
+
if (sourceSide === "right" && targetSide === "left") return "FS";
|
|
12476
|
+
if (sourceSide === "left" && targetSide === "left") return "SS";
|
|
12477
|
+
if (sourceSide === "right" && targetSide === "right") return "FF";
|
|
12478
|
+
return "SF";
|
|
12479
|
+
}, []);
|
|
12480
|
+
const handleDependencyPortPointerDown = useCallback10((sourceId, sourceSide, event) => {
|
|
12481
|
+
if (disableDependencyEditing || event.button !== 0) return;
|
|
12482
|
+
const chartElement = event.currentTarget.closest(".gantt-taskArea");
|
|
12483
|
+
if (!(chartElement instanceof HTMLElement)) return;
|
|
12484
|
+
event.preventDefault();
|
|
12485
|
+
event.stopPropagation();
|
|
12486
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
12487
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12488
|
+
const source = getDependencyPortPoint(event.currentTarget, chartRect);
|
|
12489
|
+
const nextDrag = { sourceId, sourceSide, source, current: source };
|
|
12490
|
+
dependencyCreationRef.current = nextDrag;
|
|
12491
|
+
setDependencyCreationDrag(nextDrag);
|
|
12492
|
+
}, [disableDependencyEditing, getDependencyPortPoint]);
|
|
12493
|
+
useEffect10(() => {
|
|
12494
|
+
if (!dependencyCreationDrag) return;
|
|
12495
|
+
const handlePointerMove = (event) => {
|
|
12496
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12497
|
+
const chartElement = scrollContentRef.current?.querySelector(".gantt-taskArea");
|
|
12498
|
+
if (!activeDrag || !(chartElement instanceof HTMLElement)) return;
|
|
12499
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12500
|
+
const targetElement = document.elementFromPoint(event.clientX, event.clientY)?.closest("[data-gantt-dependency-port]");
|
|
12501
|
+
const targetTaskId = targetElement?.getAttribute("data-task-id") ?? void 0;
|
|
12502
|
+
const targetSide = targetElement?.getAttribute("data-port-side");
|
|
12503
|
+
const target = targetTaskId && targetSide && targetTaskId !== activeDrag.sourceId ? { taskId: targetTaskId, side: targetSide } : void 0;
|
|
12504
|
+
const current = targetElement ? getDependencyPortPoint(targetElement, chartRect) : { x: Math.round(event.clientX - chartRect.left), y: Math.round(event.clientY - chartRect.top) };
|
|
12505
|
+
const nextDrag = {
|
|
12506
|
+
...activeDrag,
|
|
12507
|
+
current,
|
|
12508
|
+
target,
|
|
12509
|
+
linkType: target ? getVisualDependencyType(activeDrag.sourceSide, target.side) : void 0
|
|
12510
|
+
};
|
|
12511
|
+
dependencyCreationRef.current = nextDrag;
|
|
12512
|
+
setDependencyCreationDrag(nextDrag);
|
|
12513
|
+
};
|
|
12514
|
+
const handlePointerUp = () => {
|
|
12515
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12516
|
+
dependencyCreationRef.current = null;
|
|
12517
|
+
setDependencyCreationDrag(null);
|
|
12518
|
+
if (!activeDrag?.target || !activeDrag.linkType) return;
|
|
12519
|
+
const predecessorId = activeDrag.sourceId;
|
|
12520
|
+
const successorId = activeDrag.target.taskId;
|
|
12521
|
+
const successor = tasks.find((task) => task.id === successorId);
|
|
12522
|
+
if (!successor || areTasksHierarchicallyRelated(predecessorId, successorId, tasks)) {
|
|
12523
|
+
setDependencyCreationError("\u0421\u0432\u044F\u0437\u0438 \u043C\u0435\u0436\u0434\u0443 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u0435\u043C \u0438 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u043C \u0437\u0430\u043F\u0440\u0435\u0449\u0435\u043D\u044B");
|
|
12524
|
+
return;
|
|
12525
|
+
}
|
|
12526
|
+
const nextDependency = { taskId: predecessorId, type: activeDrag.linkType, lag: 0 };
|
|
12527
|
+
if ((successor.dependencies ?? []).some((dependency) => dependency.taskId === predecessorId && dependency.type === nextDependency.type)) return;
|
|
12528
|
+
const hypothetical = tasks.map((task) => task.id === successorId ? { ...task, dependencies: [...task.dependencies ?? [], nextDependency] } : task);
|
|
12529
|
+
const validation = validateDependencies(hypothetical);
|
|
12530
|
+
if (!validation.isValid) {
|
|
12531
|
+
setDependencyCreationError(validation.errors.some((error) => error.type === "constraint") ? "\u0421\u0432\u044F\u0437\u0438 \u043C\u0435\u0436\u0434\u0443 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u0435\u043C \u0438 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u043C \u0437\u0430\u043F\u0440\u0435\u0449\u0435\u043D\u044B" : "\u0426\u0438\u043A\u043B \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0435\u0439!");
|
|
12532
|
+
return;
|
|
12533
|
+
}
|
|
12534
|
+
const predecessor = tasks.find((task) => task.id === predecessorId);
|
|
12535
|
+
const updatedSuccessor = hypothetical.find((task) => task.id === successorId);
|
|
12536
|
+
if (!predecessor) {
|
|
12537
|
+
onTasksChange?.([updatedSuccessor]);
|
|
12538
|
+
return;
|
|
12539
|
+
}
|
|
12540
|
+
const constraintDate = calculateSuccessorDate(
|
|
12541
|
+
parseUTCDate(predecessor.startDate),
|
|
12542
|
+
parseUTCDate(predecessor.endDate),
|
|
12543
|
+
nextDependency.type,
|
|
12544
|
+
0,
|
|
12545
|
+
businessDays,
|
|
12546
|
+
isCustomWeekend
|
|
12547
|
+
);
|
|
12548
|
+
const duration = getTaskDuration(
|
|
12549
|
+
updatedSuccessor.startDate,
|
|
12550
|
+
updatedSuccessor.endDate,
|
|
12551
|
+
businessDays,
|
|
12552
|
+
isCustomWeekend
|
|
12553
|
+
);
|
|
12554
|
+
const range = nextDependency.type === "FS" || nextDependency.type === "SS" ? buildTaskRangeFromStart(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 })) : buildTaskRangeFromEnd(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }));
|
|
12555
|
+
onTasksChange?.([{
|
|
12556
|
+
...updatedSuccessor,
|
|
12557
|
+
startDate: range.start.toISOString().split("T")[0],
|
|
12558
|
+
endDate: range.end.toISOString().split("T")[0]
|
|
12559
|
+
}]);
|
|
12560
|
+
};
|
|
12561
|
+
const handleKeyDown = (event) => {
|
|
12562
|
+
if (event.key === "Escape") {
|
|
12563
|
+
dependencyCreationRef.current = null;
|
|
12564
|
+
setDependencyCreationDrag(null);
|
|
12565
|
+
}
|
|
12566
|
+
};
|
|
12567
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
12568
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
12569
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
12570
|
+
return () => {
|
|
12571
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12572
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
12573
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
12574
|
+
};
|
|
12575
|
+
}, [businessDays, customDays, dependencyCreationDrag !== null, getDependencyPortPoint, getVisualDependencyType, isWeekend3, onTasksChange, tasks]);
|
|
12576
|
+
useEffect10(() => {
|
|
12577
|
+
if (!dependencyCreationError) return;
|
|
12578
|
+
const timeout = window.setTimeout(() => setDependencyCreationError(null), 3e3);
|
|
12579
|
+
return () => window.clearTimeout(timeout);
|
|
12580
|
+
}, [dependencyCreationError]);
|
|
12581
|
+
useEffect10(() => {
|
|
12582
|
+
if (!dependencyLineMenu) return;
|
|
12583
|
+
const closeMenu = (event) => {
|
|
12584
|
+
const target = event.target;
|
|
12585
|
+
if (!target.closest(".gantt-dependencyLineMenu")) setDependencyLineMenu(null);
|
|
12586
|
+
};
|
|
12587
|
+
const closeOnEscape = (event) => {
|
|
12588
|
+
if (event.key === "Escape") setDependencyLineMenu(null);
|
|
12589
|
+
};
|
|
12590
|
+
document.addEventListener("mousedown", closeMenu, true);
|
|
12591
|
+
document.addEventListener("keydown", closeOnEscape);
|
|
12592
|
+
return () => {
|
|
12593
|
+
document.removeEventListener("mousedown", closeMenu, true);
|
|
12594
|
+
document.removeEventListener("keydown", closeOnEscape);
|
|
12595
|
+
};
|
|
12596
|
+
}, [dependencyLineMenu]);
|
|
12597
|
+
const handleDependencyLineClick = useCallback10((dependency) => {
|
|
12598
|
+
setSelectedChip({
|
|
12599
|
+
predecessorId: dependency.predecessorId,
|
|
12600
|
+
successorId: dependency.successorId,
|
|
12601
|
+
linkType: dependency.linkType
|
|
12602
|
+
});
|
|
12603
|
+
setDependencyLineMenu(dependency);
|
|
12604
|
+
}, []);
|
|
12605
|
+
const handleDependencyLineDelete = useCallback10(() => {
|
|
12606
|
+
if (!dependencyLineMenu) return;
|
|
12607
|
+
const successor = tasks.find((task) => task.id === dependencyLineMenu.successorId);
|
|
12608
|
+
if (!successor) return;
|
|
12609
|
+
onTasksChange?.([{
|
|
12610
|
+
...successor,
|
|
12611
|
+
dependencies: (successor.dependencies ?? []).filter((dependency) => !(dependency.taskId === dependencyLineMenu.predecessorId && dependency.type === dependencyLineMenu.linkType))
|
|
12612
|
+
}]);
|
|
12613
|
+
setSelectedChip(null);
|
|
12614
|
+
setDependencyLineMenu(null);
|
|
12615
|
+
}, [dependencyLineMenu, onTasksChange, tasks]);
|
|
12616
|
+
const [activeTimelineTooltip, setActiveTimelineTooltip] = useState12(null);
|
|
12617
|
+
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = useState12(/* @__PURE__ */ new Set());
|
|
12238
12618
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
12239
|
-
const [editingTaskId, setEditingTaskId] =
|
|
12619
|
+
const [editingTaskId, setEditingTaskId] = useState12(null);
|
|
12240
12620
|
const taskDateChangeMode = externalTaskDateChangeMode ?? internalTaskDateChangeMode;
|
|
12241
12621
|
const handleTaskDateChangeMode = externalOnTaskDateChangeModeChange ?? setInternalTaskDateChangeMode;
|
|
12242
12622
|
const resolvedRowContentLines = isPlanFactMode ? Math.max(2, Math.floor(rowContentLines)) : Math.max(1, Math.floor(rowContentLines));
|
|
@@ -12267,8 +12647,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12267
12647
|
() => isPlanFactMode ? getFullMonthDays(dateRangeTasks) : getMultiMonthDays(dateRangeTasks),
|
|
12268
12648
|
[dateRangeTasks, isPlanFactMode]
|
|
12269
12649
|
);
|
|
12270
|
-
const [validationResult, setValidationResult] =
|
|
12271
|
-
const [cascadeOverrides, setCascadeOverrides] =
|
|
12650
|
+
const [validationResult, setValidationResult] = useState12(null);
|
|
12651
|
+
const [cascadeOverrides, setCascadeOverrides] = useState12(/* @__PURE__ */ new Map());
|
|
12272
12652
|
const gridWidth = useMemo13(
|
|
12273
12653
|
() => Math.round(dateRange.length * dayWidth),
|
|
12274
12654
|
[dateRange.length, dayWidth]
|
|
@@ -12486,9 +12866,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12486
12866
|
}
|
|
12487
12867
|
container.scrollTo({ top: scrollTop, behavior });
|
|
12488
12868
|
}, [effectiveRowHeight, tasks, visibleTasks]);
|
|
12489
|
-
const [dragGuideLines, setDragGuideLines] =
|
|
12490
|
-
const [draggedTaskOverride, setDraggedTaskOverride] =
|
|
12491
|
-
const [previewTasksById, setPreviewTasksById] =
|
|
12869
|
+
const [dragGuideLines, setDragGuideLines] = useState12(null);
|
|
12870
|
+
const [draggedTaskOverride, setDraggedTaskOverride] = useState12(null);
|
|
12871
|
+
const [previewTasksById, setPreviewTasksById] = useState12(/* @__PURE__ */ new Map());
|
|
12492
12872
|
useEffect10(() => {
|
|
12493
12873
|
const result = validateDependencies(tasks);
|
|
12494
12874
|
setValidationResult(result);
|
|
@@ -13005,19 +13385,19 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13005
13385
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
13006
13386
|
};
|
|
13007
13387
|
}, []);
|
|
13008
|
-
return /* @__PURE__ */
|
|
13388
|
+
return /* @__PURE__ */ jsx20(
|
|
13009
13389
|
"div",
|
|
13010
13390
|
{
|
|
13011
13391
|
ref: containerRef,
|
|
13012
13392
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
13013
|
-
children: /* @__PURE__ */
|
|
13393
|
+
children: /* @__PURE__ */ jsx20(
|
|
13014
13394
|
"div",
|
|
13015
13395
|
{
|
|
13016
13396
|
ref: scrollContainerRef,
|
|
13017
13397
|
className: "gantt-scrollContainer",
|
|
13018
13398
|
style: { height: containerHeight ?? "auto", cursor: "grab" },
|
|
13019
13399
|
onMouseDown: handlePanStart,
|
|
13020
|
-
children: /* @__PURE__ */
|
|
13400
|
+
children: /* @__PURE__ */ jsxs16(
|
|
13021
13401
|
"div",
|
|
13022
13402
|
{
|
|
13023
13403
|
ref: scrollContentRef,
|
|
@@ -13025,7 +13405,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13025
13405
|
onMouseOver: handleSharedRowHover,
|
|
13026
13406
|
onMouseLeave: clearHoveredRows,
|
|
13027
13407
|
children: [
|
|
13028
|
-
/* @__PURE__ */
|
|
13408
|
+
/* @__PURE__ */ jsx20(
|
|
13029
13409
|
TaskList,
|
|
13030
13410
|
{
|
|
13031
13411
|
tasks: normalizedTasks,
|
|
@@ -13040,7 +13420,10 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13040
13420
|
disableTaskNameEditing,
|
|
13041
13421
|
disableDependencyEditing,
|
|
13042
13422
|
onScrollToTask: scrollToTask,
|
|
13043
|
-
onSelectedChipChange: setSelectedChip
|
|
13423
|
+
onSelectedChipChange: (chip) => setSelectedChip(
|
|
13424
|
+
chip ? { ...chip, linkType: chip.linkType } : null
|
|
13425
|
+
),
|
|
13426
|
+
selectedChip,
|
|
13044
13427
|
onAdd,
|
|
13045
13428
|
onDelete: handleDelete,
|
|
13046
13429
|
onInsertAfter: handleInsertAfter,
|
|
@@ -13080,7 +13463,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13080
13463
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13081
13464
|
}
|
|
13082
13465
|
),
|
|
13083
|
-
/* @__PURE__ */
|
|
13466
|
+
/* @__PURE__ */ jsx20(
|
|
13084
13467
|
"div",
|
|
13085
13468
|
{
|
|
13086
13469
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
@@ -13090,7 +13473,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13090
13473
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
13091
13474
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
13092
13475
|
},
|
|
13093
|
-
children: isTableMatrixMode ? /* @__PURE__ */
|
|
13476
|
+
children: isTableMatrixMode ? /* @__PURE__ */ jsx20(
|
|
13094
13477
|
TableMatrix,
|
|
13095
13478
|
{
|
|
13096
13479
|
tasks: visibleTasks,
|
|
@@ -13108,7 +13491,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13108
13491
|
filterMode,
|
|
13109
13492
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13110
13493
|
}
|
|
13111
|
-
) : isPlanFactMode ? /* @__PURE__ */
|
|
13494
|
+
) : isPlanFactMode ? /* @__PURE__ */ jsx20(
|
|
13112
13495
|
PlanFactMatrix,
|
|
13113
13496
|
{
|
|
13114
13497
|
tasks: visibleTasks,
|
|
@@ -13129,14 +13512,14 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13129
13512
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
13130
13513
|
isCustomWeekend
|
|
13131
13514
|
}
|
|
13132
|
-
) : /* @__PURE__ */
|
|
13133
|
-
/* @__PURE__ */
|
|
13515
|
+
) : /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
13516
|
+
/* @__PURE__ */ jsxs16(
|
|
13134
13517
|
"div",
|
|
13135
13518
|
{
|
|
13136
13519
|
className: "gantt-stickyHeader",
|
|
13137
13520
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
13138
13521
|
children: [
|
|
13139
|
-
/* @__PURE__ */
|
|
13522
|
+
/* @__PURE__ */ jsx20(
|
|
13140
13523
|
TimeScaleHeader_default,
|
|
13141
13524
|
{
|
|
13142
13525
|
days: dateRange,
|
|
@@ -13149,7 +13532,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13149
13532
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13150
13533
|
}
|
|
13151
13534
|
),
|
|
13152
|
-
activeTimelineTooltip && /* @__PURE__ */
|
|
13535
|
+
activeTimelineTooltip && /* @__PURE__ */ jsx20("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
|
|
13153
13536
|
"div",
|
|
13154
13537
|
{
|
|
13155
13538
|
className: "gantt-timelineTooltip",
|
|
@@ -13163,7 +13546,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13163
13546
|
]
|
|
13164
13547
|
}
|
|
13165
13548
|
),
|
|
13166
|
-
/* @__PURE__ */
|
|
13549
|
+
/* @__PURE__ */ jsxs16(
|
|
13167
13550
|
"div",
|
|
13168
13551
|
{
|
|
13169
13552
|
className: "gantt-taskArea",
|
|
@@ -13173,7 +13556,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13173
13556
|
height: `${totalGridHeight}px`
|
|
13174
13557
|
},
|
|
13175
13558
|
children: [
|
|
13176
|
-
/* @__PURE__ */
|
|
13559
|
+
/* @__PURE__ */ jsx20(
|
|
13177
13560
|
GridBackground_default,
|
|
13178
13561
|
{
|
|
13179
13562
|
dateRange,
|
|
@@ -13183,7 +13566,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13183
13566
|
isCustomWeekend
|
|
13184
13567
|
}
|
|
13185
13568
|
),
|
|
13186
|
-
todayInRange && /* @__PURE__ */
|
|
13569
|
+
todayInRange && /* @__PURE__ */ jsx20(
|
|
13187
13570
|
TodayIndicator_default,
|
|
13188
13571
|
{
|
|
13189
13572
|
monthStart,
|
|
@@ -13192,7 +13575,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13192
13575
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13193
13576
|
}
|
|
13194
13577
|
),
|
|
13195
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */
|
|
13578
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ jsx20(
|
|
13196
13579
|
TimelineMarkers_default,
|
|
13197
13580
|
{
|
|
13198
13581
|
rangeStart: monthStart,
|
|
@@ -13203,7 +13586,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13203
13586
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13204
13587
|
}
|
|
13205
13588
|
),
|
|
13206
|
-
/* @__PURE__ */
|
|
13589
|
+
/* @__PURE__ */ jsx20(
|
|
13207
13590
|
DependencyLines_default,
|
|
13208
13591
|
{
|
|
13209
13592
|
tasks: renderedDependencyTasks,
|
|
@@ -13218,10 +13601,43 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13218
13601
|
dragOverrides: dependencyOverrides,
|
|
13219
13602
|
selectedDep: selectedChip,
|
|
13220
13603
|
businessDays,
|
|
13221
|
-
weekendPredicate: isCustomWeekend
|
|
13604
|
+
weekendPredicate: isCustomWeekend,
|
|
13605
|
+
onDependencyClick: handleDependencyLineClick
|
|
13606
|
+
}
|
|
13607
|
+
),
|
|
13608
|
+
dependencyLineMenu && /* @__PURE__ */ jsxs16(
|
|
13609
|
+
"div",
|
|
13610
|
+
{
|
|
13611
|
+
className: "gantt-dependencyLineMenu",
|
|
13612
|
+
style: { left: `${dependencyLineMenu.x + 10}px`, top: `${dependencyLineMenu.y}px` },
|
|
13613
|
+
role: "dialog",
|
|
13614
|
+
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
13615
|
+
children: [
|
|
13616
|
+
/* @__PURE__ */ jsx20("span", { className: "gantt-dependencyLineMenuType", children: dependencyLineMenu.linkType === "FS" ? "\u041E\u041D" : dependencyLineMenu.linkType === "SS" ? "\u041D\u041D" : dependencyLineMenu.linkType === "FF" ? "\u041E\u041E" : "\u041D\u041E" }),
|
|
13617
|
+
!disableDependencyEditing && /* @__PURE__ */ jsx20(
|
|
13618
|
+
"button",
|
|
13619
|
+
{
|
|
13620
|
+
type: "button",
|
|
13621
|
+
className: "gantt-dependencyLineMenuDelete",
|
|
13622
|
+
"aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13623
|
+
title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13624
|
+
onClick: handleDependencyLineDelete,
|
|
13625
|
+
children: "\xD7"
|
|
13626
|
+
}
|
|
13627
|
+
)
|
|
13628
|
+
]
|
|
13629
|
+
}
|
|
13630
|
+
),
|
|
13631
|
+
/* @__PURE__ */ jsx20(
|
|
13632
|
+
DependencyCreationOverlay,
|
|
13633
|
+
{
|
|
13634
|
+
drag: dependencyCreationDrag,
|
|
13635
|
+
width: gridWidth,
|
|
13636
|
+
height: totalGridHeight
|
|
13222
13637
|
}
|
|
13223
13638
|
),
|
|
13224
|
-
|
|
13639
|
+
dependencyCreationError && /* @__PURE__ */ jsx20("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
13640
|
+
dragGuideLines && /* @__PURE__ */ jsx20(
|
|
13225
13641
|
DragGuideLines_default,
|
|
13226
13642
|
{
|
|
13227
13643
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -13231,7 +13647,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13231
13647
|
totalHeight: totalGridHeight
|
|
13232
13648
|
}
|
|
13233
13649
|
),
|
|
13234
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */
|
|
13650
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ jsx20(
|
|
13235
13651
|
"div",
|
|
13236
13652
|
{
|
|
13237
13653
|
style: {
|
|
@@ -13241,7 +13657,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13241
13657
|
right: 0,
|
|
13242
13658
|
height: `${effectiveRowHeight}px`
|
|
13243
13659
|
},
|
|
13244
|
-
children: /* @__PURE__ */
|
|
13660
|
+
children: /* @__PURE__ */ jsx20(
|
|
13245
13661
|
TaskRow_default,
|
|
13246
13662
|
{
|
|
13247
13663
|
task,
|
|
@@ -13272,6 +13688,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13272
13688
|
customDays,
|
|
13273
13689
|
isWeekend: isWeekend3,
|
|
13274
13690
|
disableTaskDrag,
|
|
13691
|
+
disableDependencyEditing,
|
|
13692
|
+
onDependencyPortPointerDown: handleDependencyPortPointerDown,
|
|
13693
|
+
isDependencyDragActive: dependencyCreationDrag !== null,
|
|
13275
13694
|
viewMode
|
|
13276
13695
|
}
|
|
13277
13696
|
)
|
|
@@ -13298,7 +13717,7 @@ GanttChart.displayName = "GanttChart";
|
|
|
13298
13717
|
|
|
13299
13718
|
// src/components/ui/Button.tsx
|
|
13300
13719
|
import React17 from "react";
|
|
13301
|
-
import { jsx as
|
|
13720
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
13302
13721
|
var Button = React17.forwardRef(
|
|
13303
13722
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
13304
13723
|
const classes = [
|
|
@@ -13307,7 +13726,7 @@ var Button = React17.forwardRef(
|
|
|
13307
13726
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
13308
13727
|
className || ""
|
|
13309
13728
|
].filter(Boolean).join(" ");
|
|
13310
|
-
return /* @__PURE__ */
|
|
13729
|
+
return /* @__PURE__ */ jsx21("button", { ref, className: classes, ...props, children });
|
|
13311
13730
|
}
|
|
13312
13731
|
);
|
|
13313
13732
|
Button.displayName = "Button";
|