gantt-lib 0.121.2 → 0.123.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 +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +885 -460
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +965 -540
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +220 -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" })
|
|
4523
4635
|
}
|
|
4524
4636
|
);
|
|
4525
|
-
var
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
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
|
+
]
|
|
4654
|
+
}
|
|
4655
|
+
);
|
|
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,
|
|
@@ -7229,6 +7386,7 @@ var TaskList = ({
|
|
|
7229
7386
|
disableTaskListReorder = false,
|
|
7230
7387
|
editingTaskId: propEditingTaskId,
|
|
7231
7388
|
enableAddTask = true,
|
|
7389
|
+
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
7232
7390
|
defaultTaskDurationDays = DEFAULT_TASK_DURATION_DAYS,
|
|
7233
7391
|
collapsedParentIds: externalCollapsedParentIds,
|
|
7234
7392
|
onToggleCollapse: externalOnToggleCollapse,
|
|
@@ -7261,9 +7419,9 @@ var TaskList = ({
|
|
|
7261
7419
|
visibleRowIndices
|
|
7262
7420
|
}) => {
|
|
7263
7421
|
const reorderDisabled = disableTaskListReorder || disableTaskDrag;
|
|
7264
|
-
const [internalSelectedTaskIds, setInternalSelectedTaskIds] =
|
|
7265
|
-
const [activeCustomCell, setActiveCustomCell] =
|
|
7266
|
-
const [columnWidthOverrides, setColumnWidthOverrides] =
|
|
7422
|
+
const [internalSelectedTaskIds, setInternalSelectedTaskIds] = useState7(/* @__PURE__ */ new Set());
|
|
7423
|
+
const [activeCustomCell, setActiveCustomCell] = useState7(null);
|
|
7424
|
+
const [columnWidthOverrides, setColumnWidthOverrides] = useState7(() => normalizeColumnWidthMap(taskListColumnWidths));
|
|
7267
7425
|
const resizeStateRef = useRef6(null);
|
|
7268
7426
|
const effectiveSelectedTaskIds = selectedTaskIds ?? internalSelectedTaskIds;
|
|
7269
7427
|
const emitSelectedTaskIdsChange = useCallback6((nextSelectedTaskIds) => {
|
|
@@ -7272,7 +7430,7 @@ var TaskList = ({
|
|
|
7272
7430
|
}
|
|
7273
7431
|
onSelectedTaskIdsChange?.(nextSelectedTaskIds);
|
|
7274
7432
|
}, [onSelectedTaskIdsChange, selectedTaskIds]);
|
|
7275
|
-
const [internalCollapsedParentIds, setInternalCollapsedParentIds] =
|
|
7433
|
+
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = useState7(/* @__PURE__ */ new Set());
|
|
7276
7434
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
7277
7435
|
const handleToggleCollapse = externalOnToggleCollapse ?? useCallback6((parentId) => {
|
|
7278
7436
|
setInternalCollapsedParentIds((prev) => {
|
|
@@ -7435,19 +7593,33 @@ var TaskList = ({
|
|
|
7435
7593
|
const handleRowClick = useCallback6((taskId) => {
|
|
7436
7594
|
onTaskSelect?.(taskId);
|
|
7437
7595
|
}, [onTaskSelect]);
|
|
7438
|
-
const [activeLinkType, setActiveLinkType] =
|
|
7439
|
-
const [selectingPredecessorFor, setSelectingPredecessorFor] =
|
|
7440
|
-
const [dependencyPickMode, setDependencyPickMode] =
|
|
7441
|
-
const [typeMenuOpen, setTypeMenuOpen] =
|
|
7442
|
-
const [dependencyError, setDependencyError] =
|
|
7596
|
+
const [activeLinkType, setActiveLinkType] = useState7("FS");
|
|
7597
|
+
const [selectingPredecessorFor, setSelectingPredecessorFor] = useState7(null);
|
|
7598
|
+
const [dependencyPickMode, setDependencyPickMode] = useState7("successor");
|
|
7599
|
+
const [typeMenuOpen, setTypeMenuOpen] = useState7(false);
|
|
7600
|
+
const [dependencyError, setDependencyError] = useState7(null);
|
|
7443
7601
|
const overlayRef = useRef6(null);
|
|
7444
|
-
const [selectedChip, setSelectedChip] =
|
|
7602
|
+
const [selectedChip, setSelectedChip] = useState7(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7603
|
+
useEffect6(() => {
|
|
7604
|
+
if (controlledSelectedChip !== void 0) {
|
|
7605
|
+
setSelectedChip(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7606
|
+
}
|
|
7607
|
+
}, [controlledSelectedChip]);
|
|
7445
7608
|
const handleChipSelect = useCallback6((chip) => {
|
|
7446
7609
|
setSelectedChip(chip);
|
|
7447
7610
|
onSelectedChipChange?.(chip);
|
|
7448
7611
|
}, [onSelectedChipChange]);
|
|
7449
7612
|
useEffect6(() => {
|
|
7450
7613
|
if (!selectingPredecessorFor && !selectedChip && !selectedTaskId && !activeCustomCell) return;
|
|
7614
|
+
const pendingCanvasMouseDownRef = {
|
|
7615
|
+
container: null,
|
|
7616
|
+
x: 0,
|
|
7617
|
+
y: 0,
|
|
7618
|
+
scrollLeft: 0,
|
|
7619
|
+
scrollTop: 0,
|
|
7620
|
+
moved: false,
|
|
7621
|
+
active: false
|
|
7622
|
+
};
|
|
7451
7623
|
const handleKeyDown = (e) => {
|
|
7452
7624
|
if (e.key === "Escape") {
|
|
7453
7625
|
setSelectingPredecessorFor(null);
|
|
@@ -7465,6 +7637,18 @@ var TaskList = ({
|
|
|
7465
7637
|
}
|
|
7466
7638
|
return;
|
|
7467
7639
|
}
|
|
7640
|
+
if (target.closest?.("[data-taskbar]")) return;
|
|
7641
|
+
if (target.closest?.(".gantt-scrollContainer")) {
|
|
7642
|
+
const canvas = target.closest(".gantt-scrollContainer");
|
|
7643
|
+
pendingCanvasMouseDownRef.container = canvas;
|
|
7644
|
+
pendingCanvasMouseDownRef.x = e.clientX;
|
|
7645
|
+
pendingCanvasMouseDownRef.y = e.clientY;
|
|
7646
|
+
pendingCanvasMouseDownRef.scrollLeft = canvas.scrollLeft;
|
|
7647
|
+
pendingCanvasMouseDownRef.scrollTop = canvas.scrollTop;
|
|
7648
|
+
pendingCanvasMouseDownRef.moved = false;
|
|
7649
|
+
pendingCanvasMouseDownRef.active = true;
|
|
7650
|
+
return;
|
|
7651
|
+
}
|
|
7468
7652
|
if (target.closest?.(".gantt-popover")) return;
|
|
7469
7653
|
setSelectingPredecessorFor(null);
|
|
7470
7654
|
setSelectedChip(null);
|
|
@@ -7472,11 +7656,52 @@ var TaskList = ({
|
|
|
7472
7656
|
onSelectedChipChange?.(null);
|
|
7473
7657
|
onTaskSelect?.(null);
|
|
7474
7658
|
};
|
|
7659
|
+
const handleCanvasMouseMove = (e) => {
|
|
7660
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7661
|
+
const distance = Math.hypot(
|
|
7662
|
+
e.clientX - pendingCanvasMouseDownRef.x,
|
|
7663
|
+
e.clientY - pendingCanvasMouseDownRef.y
|
|
7664
|
+
);
|
|
7665
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7666
|
+
const scrollChanged = canvas && (canvas.scrollLeft !== pendingCanvasMouseDownRef.scrollLeft || canvas.scrollTop !== pendingCanvasMouseDownRef.scrollTop);
|
|
7667
|
+
if (distance > 3 || scrollChanged) pendingCanvasMouseDownRef.moved = true;
|
|
7668
|
+
};
|
|
7669
|
+
const handleCanvasScroll = (e) => {
|
|
7670
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7671
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7672
|
+
if (canvas && e.target === canvas) pendingCanvasMouseDownRef.moved = true;
|
|
7673
|
+
};
|
|
7674
|
+
const handleCanvasWheel = (e) => {
|
|
7675
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7676
|
+
if (pendingCanvasMouseDownRef.container?.contains(e.target)) {
|
|
7677
|
+
pendingCanvasMouseDownRef.moved = true;
|
|
7678
|
+
}
|
|
7679
|
+
};
|
|
7680
|
+
const handleCanvasMouseUp = () => {
|
|
7681
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7682
|
+
const wasPan = pendingCanvasMouseDownRef.moved;
|
|
7683
|
+
pendingCanvasMouseDownRef.active = false;
|
|
7684
|
+
pendingCanvasMouseDownRef.container = null;
|
|
7685
|
+
if (wasPan) return;
|
|
7686
|
+
setSelectingPredecessorFor(null);
|
|
7687
|
+
setSelectedChip(null);
|
|
7688
|
+
setActiveCustomCell(null);
|
|
7689
|
+
onSelectedChipChange?.(null);
|
|
7690
|
+
onTaskSelect?.(null);
|
|
7691
|
+
};
|
|
7475
7692
|
document.addEventListener("keydown", handleKeyDown);
|
|
7476
7693
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
7694
|
+
document.addEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7695
|
+
document.addEventListener("scroll", handleCanvasScroll, true);
|
|
7696
|
+
document.addEventListener("wheel", handleCanvasWheel, true);
|
|
7697
|
+
document.addEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7477
7698
|
return () => {
|
|
7478
7699
|
document.removeEventListener("keydown", handleKeyDown);
|
|
7479
7700
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
7701
|
+
document.removeEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7702
|
+
document.removeEventListener("scroll", handleCanvasScroll, true);
|
|
7703
|
+
document.removeEventListener("wheel", handleCanvasWheel, true);
|
|
7704
|
+
document.removeEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7480
7705
|
};
|
|
7481
7706
|
}, [selectingPredecessorFor, selectedChip, selectedTaskId, activeCustomCell, onTaskSelect, onSelectedChipChange]);
|
|
7482
7707
|
const handleAddDependency = useCallback6((successorTaskId, predecessorTaskId, linkType) => {
|
|
@@ -7565,11 +7790,11 @@ var TaskList = ({
|
|
|
7565
7790
|
);
|
|
7566
7791
|
onTasksChange?.([{ ...task, dependencies: updatedDeps }]);
|
|
7567
7792
|
}, [tasks, onTasksChange]);
|
|
7568
|
-
const [isCreating, setIsCreating] =
|
|
7569
|
-
const [pendingInsert, setPendingInsert] =
|
|
7570
|
-
const [draggingIndex, setDraggingIndex] =
|
|
7571
|
-
const [dragOverTarget, setDragOverTarget] =
|
|
7572
|
-
const [isBeforeFirstDropZoneActive, setIsBeforeFirstDropZoneActive] =
|
|
7793
|
+
const [isCreating, setIsCreating] = useState7(false);
|
|
7794
|
+
const [pendingInsert, setPendingInsert] = useState7(null);
|
|
7795
|
+
const [draggingIndex, setDraggingIndex] = useState7(null);
|
|
7796
|
+
const [dragOverTarget, setDragOverTarget] = useState7(null);
|
|
7797
|
+
const [isBeforeFirstDropZoneActive, setIsBeforeFirstDropZoneActive] = useState7(false);
|
|
7573
7798
|
const dragOriginIndexRef = useRef6(null);
|
|
7574
7799
|
const dragTaskIdRef = useRef6(null);
|
|
7575
7800
|
const clearDragState = useCallback6(() => {
|
|
@@ -7991,7 +8216,7 @@ var TaskList = ({
|
|
|
7991
8216
|
document.body.style.cursor = "col-resize";
|
|
7992
8217
|
document.body.style.userSelect = "none";
|
|
7993
8218
|
}, [resolvedColumns]);
|
|
7994
|
-
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */
|
|
8219
|
+
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */ jsx16(
|
|
7995
8220
|
"button",
|
|
7996
8221
|
{
|
|
7997
8222
|
type: "button",
|
|
@@ -8005,7 +8230,7 @@ var TaskList = ({
|
|
|
8005
8230
|
}
|
|
8006
8231
|
}
|
|
8007
8232
|
), [startColumnResize]);
|
|
8008
|
-
return /* @__PURE__ */
|
|
8233
|
+
return /* @__PURE__ */ jsx16(
|
|
8009
8234
|
"div",
|
|
8010
8235
|
{
|
|
8011
8236
|
ref: overlayRef,
|
|
@@ -8014,17 +8239,17 @@ var TaskList = ({
|
|
|
8014
8239
|
"--tasklist-width": `${effectiveTaskListWidth}px`,
|
|
8015
8240
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
8016
8241
|
},
|
|
8017
|
-
children: /* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8242
|
+
children: /* @__PURE__ */ jsxs12("div", { className: "gantt-tl-table", children: [
|
|
8243
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-header", style: { height: `${tableHeaderHeight}px` }, children: resolvedColumns.map((col) => {
|
|
8019
8244
|
if (col.id === "selection") {
|
|
8020
|
-
return /* @__PURE__ */
|
|
8245
|
+
return /* @__PURE__ */ jsxs12(
|
|
8021
8246
|
"div",
|
|
8022
8247
|
{
|
|
8023
8248
|
className: "gantt-tl-headerCell gantt-tl-cell-selection",
|
|
8024
8249
|
"data-column-id": "selection",
|
|
8025
8250
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8026
8251
|
children: [
|
|
8027
|
-
/* @__PURE__ */
|
|
8252
|
+
/* @__PURE__ */ jsx16(
|
|
8028
8253
|
SelectAllCheckbox,
|
|
8029
8254
|
{
|
|
8030
8255
|
checked: areAllVisibleTasksSelected,
|
|
@@ -8039,15 +8264,15 @@ var TaskList = ({
|
|
|
8039
8264
|
);
|
|
8040
8265
|
}
|
|
8041
8266
|
if (col.id === "dependencies") {
|
|
8042
|
-
return /* @__PURE__ */
|
|
8267
|
+
return /* @__PURE__ */ jsxs12(
|
|
8043
8268
|
"div",
|
|
8044
8269
|
{
|
|
8045
8270
|
className: "gantt-tl-headerCell gantt-tl-cell-deps",
|
|
8046
8271
|
"data-column-id": "dependencies",
|
|
8047
8272
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8048
8273
|
children: [
|
|
8049
|
-
/* @__PURE__ */
|
|
8050
|
-
/* @__PURE__ */
|
|
8274
|
+
/* @__PURE__ */ jsxs12(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
8275
|
+
/* @__PURE__ */ jsx16(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
8051
8276
|
"button",
|
|
8052
8277
|
{
|
|
8053
8278
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -8060,7 +8285,7 @@ var TaskList = ({
|
|
|
8060
8285
|
]
|
|
8061
8286
|
}
|
|
8062
8287
|
) }),
|
|
8063
|
-
/* @__PURE__ */
|
|
8288
|
+
/* @__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
8289
|
"button",
|
|
8065
8290
|
{
|
|
8066
8291
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -8070,13 +8295,13 @@ var TaskList = ({
|
|
|
8070
8295
|
},
|
|
8071
8296
|
children: [
|
|
8072
8297
|
React12.createElement(LINK_TYPE_ICONS[lt]),
|
|
8073
|
-
/* @__PURE__ */
|
|
8298
|
+
/* @__PURE__ */ jsx16("span", { children: LINK_TYPE_LABELS[lt] })
|
|
8074
8299
|
]
|
|
8075
8300
|
},
|
|
8076
8301
|
lt
|
|
8077
8302
|
)) }) })
|
|
8078
8303
|
] }),
|
|
8079
|
-
dependencyError && /* @__PURE__ */
|
|
8304
|
+
dependencyError && /* @__PURE__ */ jsx16("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
8080
8305
|
renderResizeHandle(col.id)
|
|
8081
8306
|
]
|
|
8082
8307
|
},
|
|
@@ -8085,7 +8310,7 @@ var TaskList = ({
|
|
|
8085
8310
|
}
|
|
8086
8311
|
const builtInClass = BUILT_IN_CSS_CLASSES[col.id];
|
|
8087
8312
|
if (builtInClass !== void 0) {
|
|
8088
|
-
return /* @__PURE__ */
|
|
8313
|
+
return /* @__PURE__ */ jsxs12(
|
|
8089
8314
|
"div",
|
|
8090
8315
|
{
|
|
8091
8316
|
className: `gantt-tl-headerCell ${builtInClass}`,
|
|
@@ -8099,7 +8324,7 @@ var TaskList = ({
|
|
|
8099
8324
|
col.id
|
|
8100
8325
|
);
|
|
8101
8326
|
}
|
|
8102
|
-
return /* @__PURE__ */
|
|
8327
|
+
return /* @__PURE__ */ jsxs12(
|
|
8103
8328
|
"div",
|
|
8104
8329
|
{
|
|
8105
8330
|
className: `gantt-tl-headerCell gantt-tl-headerCell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -8114,7 +8339,7 @@ var TaskList = ({
|
|
|
8114
8339
|
col.id
|
|
8115
8340
|
);
|
|
8116
8341
|
}) }),
|
|
8117
|
-
/* @__PURE__ */
|
|
8342
|
+
/* @__PURE__ */ jsxs12(
|
|
8118
8343
|
"div",
|
|
8119
8344
|
{
|
|
8120
8345
|
className: "gantt-tl-body",
|
|
@@ -8124,7 +8349,7 @@ var TaskList = ({
|
|
|
8124
8349
|
position: "relative"
|
|
8125
8350
|
},
|
|
8126
8351
|
children: [
|
|
8127
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */
|
|
8352
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ jsx16(
|
|
8128
8353
|
"div",
|
|
8129
8354
|
{
|
|
8130
8355
|
className: [
|
|
@@ -8141,7 +8366,7 @@ var TaskList = ({
|
|
|
8141
8366
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
8142
8367
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
8143
8368
|
const topOffset = index * rowHeight + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
8144
|
-
return /* @__PURE__ */
|
|
8369
|
+
return /* @__PURE__ */ jsx16(
|
|
8145
8370
|
"div",
|
|
8146
8371
|
{
|
|
8147
8372
|
style: {
|
|
@@ -8150,7 +8375,7 @@ var TaskList = ({
|
|
|
8150
8375
|
left: 0,
|
|
8151
8376
|
right: 0
|
|
8152
8377
|
},
|
|
8153
|
-
children: /* @__PURE__ */
|
|
8378
|
+
children: /* @__PURE__ */ jsx16(
|
|
8154
8379
|
TaskListRow,
|
|
8155
8380
|
{
|
|
8156
8381
|
task,
|
|
@@ -8223,7 +8448,7 @@ var TaskList = ({
|
|
|
8223
8448
|
task.id
|
|
8224
8449
|
);
|
|
8225
8450
|
}),
|
|
8226
|
-
hasVisiblePendingInsert && /* @__PURE__ */
|
|
8451
|
+
hasVisiblePendingInsert && /* @__PURE__ */ jsx16(
|
|
8227
8452
|
"div",
|
|
8228
8453
|
{
|
|
8229
8454
|
style: {
|
|
@@ -8232,7 +8457,7 @@ var TaskList = ({
|
|
|
8232
8457
|
left: 0,
|
|
8233
8458
|
right: 0
|
|
8234
8459
|
},
|
|
8235
|
-
children: /* @__PURE__ */
|
|
8460
|
+
children: /* @__PURE__ */ jsx16(
|
|
8236
8461
|
NewTaskRow,
|
|
8237
8462
|
{
|
|
8238
8463
|
rowHeight,
|
|
@@ -8246,7 +8471,7 @@ var TaskList = ({
|
|
|
8246
8471
|
]
|
|
8247
8472
|
}
|
|
8248
8473
|
),
|
|
8249
|
-
isCreating && !pendingInsert && /* @__PURE__ */
|
|
8474
|
+
isCreating && !pendingInsert && /* @__PURE__ */ jsx16(
|
|
8250
8475
|
NewTaskRow,
|
|
8251
8476
|
{
|
|
8252
8477
|
rowHeight,
|
|
@@ -8255,7 +8480,7 @@ var TaskList = ({
|
|
|
8255
8480
|
nestingDepth: 0
|
|
8256
8481
|
}
|
|
8257
8482
|
),
|
|
8258
|
-
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */
|
|
8483
|
+
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ jsxs12(
|
|
8259
8484
|
"button",
|
|
8260
8485
|
{
|
|
8261
8486
|
className: `gantt-tl-add-btn${!reorderDisabled && dragOverTarget?.index === visibleTasks.length ? " gantt-tl-add-btn-drag-over" : ""}`,
|
|
@@ -8281,7 +8506,10 @@ var TaskList = ({
|
|
|
8281
8506
|
handleDrop(visibleTasks.length, e);
|
|
8282
8507
|
},
|
|
8283
8508
|
type: "button",
|
|
8284
|
-
children:
|
|
8509
|
+
children: [
|
|
8510
|
+
"+ ",
|
|
8511
|
+
addTaskLabel
|
|
8512
|
+
]
|
|
8285
8513
|
}
|
|
8286
8514
|
)
|
|
8287
8515
|
] })
|
|
@@ -8290,7 +8518,7 @@ var TaskList = ({
|
|
|
8290
8518
|
};
|
|
8291
8519
|
|
|
8292
8520
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8293
|
-
import React13, { useCallback as useCallback8, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useState as
|
|
8521
|
+
import React13, { useCallback as useCallback8, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useState as useState9 } from "react";
|
|
8294
8522
|
|
|
8295
8523
|
// src/utils/resourceTimelineLayout.ts
|
|
8296
8524
|
var isInvalidDate = (date) => Number.isNaN(date.getTime());
|
|
@@ -8492,7 +8720,7 @@ var layoutResourceTimelineItems = (resources, options) => {
|
|
|
8492
8720
|
};
|
|
8493
8721
|
|
|
8494
8722
|
// src/hooks/useResourceItemDrag.ts
|
|
8495
|
-
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef7, useState as
|
|
8723
|
+
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef7, useState as useState8 } from "react";
|
|
8496
8724
|
var RESOURCE_CURSOR_STYLE_ID = "gantt-resource-global-drag-cursor-style";
|
|
8497
8725
|
function ensureResourceGlobalCursorStyle() {
|
|
8498
8726
|
if (typeof document === "undefined") return;
|
|
@@ -8608,7 +8836,7 @@ var useResourceItemDrag = ({
|
|
|
8608
8836
|
const rowsRef = useRef7(rows);
|
|
8609
8837
|
const onResourceItemMoveRef = useRef7(onResourceItemMove);
|
|
8610
8838
|
const rafRef = useRef7(null);
|
|
8611
|
-
const [preview, setPreview] =
|
|
8839
|
+
const [preview, setPreview] = useState8(null);
|
|
8612
8840
|
useEffect7(() => {
|
|
8613
8841
|
rowsRef.current = rows;
|
|
8614
8842
|
}, [rows]);
|
|
@@ -8746,7 +8974,7 @@ var useResourceItemDrag = ({
|
|
|
8746
8974
|
};
|
|
8747
8975
|
|
|
8748
8976
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8749
|
-
import { Fragment as
|
|
8977
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8750
8978
|
var DEFAULT_DAY_WIDTH = 40;
|
|
8751
8979
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
8752
8980
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -8909,41 +9137,41 @@ var orderResourcesByType = (resources) => {
|
|
|
8909
9137
|
};
|
|
8910
9138
|
var ResourceTypeIcon = ({ type }) => {
|
|
8911
9139
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
8912
|
-
return /* @__PURE__ */
|
|
8913
|
-
/* @__PURE__ */
|
|
8914
|
-
/* @__PURE__ */
|
|
8915
|
-
/* @__PURE__ */
|
|
8916
|
-
/* @__PURE__ */
|
|
9140
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconPeople", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9141
|
+
/* @__PURE__ */ jsx17("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
9142
|
+
/* @__PURE__ */ jsx17("circle", { cx: "9", cy: "7", r: "4" }),
|
|
9143
|
+
/* @__PURE__ */ jsx17("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
9144
|
+
/* @__PURE__ */ jsx17("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
8917
9145
|
] });
|
|
8918
9146
|
}
|
|
8919
9147
|
if (type === "\u041E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u0435") {
|
|
8920
|
-
return /* @__PURE__ */
|
|
8921
|
-
/* @__PURE__ */
|
|
8922
|
-
/* @__PURE__ */
|
|
8923
|
-
/* @__PURE__ */
|
|
9148
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconEquipment", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9149
|
+
/* @__PURE__ */ jsx17("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
9150
|
+
/* @__PURE__ */ jsx17("path", { d: "m18 15 4-4" }),
|
|
9151
|
+
/* @__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
9152
|
] });
|
|
8925
9153
|
}
|
|
8926
9154
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
8927
|
-
return /* @__PURE__ */
|
|
8928
|
-
/* @__PURE__ */
|
|
8929
|
-
/* @__PURE__ */
|
|
8930
|
-
/* @__PURE__ */
|
|
9155
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconMaterials", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9156
|
+
/* @__PURE__ */ jsx17("path", { d: "M10 22v-8" }),
|
|
9157
|
+
/* @__PURE__ */ jsx17("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
9158
|
+
/* @__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
9159
|
] });
|
|
8932
9160
|
}
|
|
8933
|
-
return /* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
8935
|
-
/* @__PURE__ */
|
|
8936
|
-
/* @__PURE__ */
|
|
9161
|
+
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconOther", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9162
|
+
/* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "9" }),
|
|
9163
|
+
/* @__PURE__ */ jsx17("path", { d: "M12 8v4" }),
|
|
9164
|
+
/* @__PURE__ */ jsx17("path", { d: "M12 16h.01" })
|
|
8937
9165
|
] });
|
|
8938
9166
|
};
|
|
8939
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */
|
|
8940
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */
|
|
9167
|
+
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" }) });
|
|
9168
|
+
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
9169
|
function isInactiveResourceStatus(status) {
|
|
8942
9170
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
8943
9171
|
}
|
|
8944
|
-
var ResourceStatusLockIcon = () => /* @__PURE__ */
|
|
8945
|
-
/* @__PURE__ */
|
|
8946
|
-
/* @__PURE__ */
|
|
9172
|
+
var ResourceStatusLockIcon = () => /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9173
|
+
/* @__PURE__ */ jsx17("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
9174
|
+
/* @__PURE__ */ jsx17("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
8947
9175
|
] });
|
|
8948
9176
|
var ResourceHeader = ({
|
|
8949
9177
|
resource,
|
|
@@ -8960,11 +9188,11 @@ var ResourceHeader = ({
|
|
|
8960
9188
|
onConflictBadgeClick,
|
|
8961
9189
|
columnTemplate
|
|
8962
9190
|
}) => {
|
|
8963
|
-
const [menuOpen, setMenuOpen] =
|
|
8964
|
-
const [typeMenuOpen, setTypeMenuOpen] =
|
|
8965
|
-
const [scopeMenuOpen, setScopeMenuOpen] =
|
|
8966
|
-
const [editingName, setEditingName] =
|
|
8967
|
-
const [nameValue, setNameValue] =
|
|
9191
|
+
const [menuOpen, setMenuOpen] = useState9(false);
|
|
9192
|
+
const [typeMenuOpen, setTypeMenuOpen] = useState9(false);
|
|
9193
|
+
const [scopeMenuOpen, setScopeMenuOpen] = useState9(false);
|
|
9194
|
+
const [editingName, setEditingName] = useState9(false);
|
|
9195
|
+
const [nameValue, setNameValue] = useState9(resource.name);
|
|
8968
9196
|
const nameInputRef = useRef8(null);
|
|
8969
9197
|
const nameConfirmedRef = useRef8(false);
|
|
8970
9198
|
const visibleCommands = useMemo10(
|
|
@@ -9033,7 +9261,7 @@ var ResourceHeader = ({
|
|
|
9033
9261
|
handleNameCancel();
|
|
9034
9262
|
}
|
|
9035
9263
|
}, [applyResourcePatch, handleNameCancel, nameValue, resource.name]);
|
|
9036
|
-
return /* @__PURE__ */
|
|
9264
|
+
return /* @__PURE__ */ jsxs13(
|
|
9037
9265
|
"div",
|
|
9038
9266
|
{
|
|
9039
9267
|
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
|
|
@@ -9044,10 +9272,10 @@ var ResourceHeader = ({
|
|
|
9044
9272
|
gridTemplateColumns: columnTemplate
|
|
9045
9273
|
},
|
|
9046
9274
|
children: [
|
|
9047
|
-
/* @__PURE__ */
|
|
9048
|
-
/* @__PURE__ */
|
|
9049
|
-
/* @__PURE__ */
|
|
9050
|
-
/* @__PURE__ */
|
|
9275
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
9276
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
9277
|
+
/* @__PURE__ */ jsxs13(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
9278
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
9051
9279
|
"button",
|
|
9052
9280
|
{
|
|
9053
9281
|
type: "button",
|
|
@@ -9060,12 +9288,12 @@ var ResourceHeader = ({
|
|
|
9060
9288
|
setTypeMenuOpen((open) => !open);
|
|
9061
9289
|
},
|
|
9062
9290
|
children: [
|
|
9063
|
-
/* @__PURE__ */
|
|
9064
|
-
/* @__PURE__ */
|
|
9291
|
+
/* @__PURE__ */ jsx17(ResourceTypeIcon, { type }),
|
|
9292
|
+
/* @__PURE__ */ jsx17(ResourceTypeDropdownIcon, {})
|
|
9065
9293
|
]
|
|
9066
9294
|
}
|
|
9067
9295
|
) }),
|
|
9068
|
-
/* @__PURE__ */
|
|
9296
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
9069
9297
|
"button",
|
|
9070
9298
|
{
|
|
9071
9299
|
type: "button",
|
|
@@ -9076,14 +9304,14 @@ var ResourceHeader = ({
|
|
|
9076
9304
|
applyResourcePatch({ type: option });
|
|
9077
9305
|
},
|
|
9078
9306
|
children: [
|
|
9079
|
-
/* @__PURE__ */
|
|
9307
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ jsx17(ResourceTypeIcon, { type: option }) }),
|
|
9080
9308
|
option
|
|
9081
9309
|
]
|
|
9082
9310
|
},
|
|
9083
9311
|
option
|
|
9084
9312
|
)) })
|
|
9085
9313
|
] }),
|
|
9086
|
-
editingName ? /* @__PURE__ */
|
|
9314
|
+
editingName ? /* @__PURE__ */ jsx17(
|
|
9087
9315
|
Input,
|
|
9088
9316
|
{
|
|
9089
9317
|
ref: nameInputRef,
|
|
@@ -9095,7 +9323,7 @@ var ResourceHeader = ({
|
|
|
9095
9323
|
"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
9324
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
9097
9325
|
}
|
|
9098
|
-
) : /* @__PURE__ */
|
|
9326
|
+
) : /* @__PURE__ */ jsx17(
|
|
9099
9327
|
"button",
|
|
9100
9328
|
{
|
|
9101
9329
|
type: "button",
|
|
@@ -9107,23 +9335,23 @@ var ResourceHeader = ({
|
|
|
9107
9335
|
onResourceNameClick?.(resourceId);
|
|
9108
9336
|
},
|
|
9109
9337
|
onDoubleClick: handleNameDoubleClick,
|
|
9110
|
-
children: /* @__PURE__ */
|
|
9111
|
-
isInactive && /* @__PURE__ */
|
|
9338
|
+
children: /* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
9339
|
+
isInactive && /* @__PURE__ */ jsx17(
|
|
9112
9340
|
"span",
|
|
9113
9341
|
{
|
|
9114
9342
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
9115
9343
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
9116
9344
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
9117
|
-
children: /* @__PURE__ */
|
|
9345
|
+
children: /* @__PURE__ */ jsx17(ResourceStatusLockIcon, {})
|
|
9118
9346
|
}
|
|
9119
9347
|
),
|
|
9120
|
-
/* @__PURE__ */
|
|
9348
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
9121
9349
|
] })
|
|
9122
9350
|
}
|
|
9123
9351
|
)
|
|
9124
9352
|
] }),
|
|
9125
|
-
/* @__PURE__ */
|
|
9126
|
-
/* @__PURE__ */
|
|
9353
|
+
/* @__PURE__ */ jsxs13(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
9354
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
9127
9355
|
"button",
|
|
9128
9356
|
{
|
|
9129
9357
|
type: "button",
|
|
@@ -9134,10 +9362,10 @@ var ResourceHeader = ({
|
|
|
9134
9362
|
event.stopPropagation();
|
|
9135
9363
|
setScopeMenuOpen((open) => !open);
|
|
9136
9364
|
},
|
|
9137
|
-
children: /* @__PURE__ */
|
|
9365
|
+
children: /* @__PURE__ */ jsx17("span", { children: scopeLabel })
|
|
9138
9366
|
}
|
|
9139
9367
|
) }),
|
|
9140
|
-
/* @__PURE__ */
|
|
9368
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_SCOPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
9141
9369
|
"button",
|
|
9142
9370
|
{
|
|
9143
9371
|
type: "button",
|
|
@@ -9148,35 +9376,35 @@ var ResourceHeader = ({
|
|
|
9148
9376
|
applyResourcePatch({ scope: option });
|
|
9149
9377
|
},
|
|
9150
9378
|
children: [
|
|
9151
|
-
/* @__PURE__ */
|
|
9379
|
+
/* @__PURE__ */ jsx17("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
9152
9380
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
9153
9381
|
]
|
|
9154
9382
|
},
|
|
9155
9383
|
option
|
|
9156
9384
|
)) })
|
|
9157
9385
|
] }),
|
|
9158
|
-
/* @__PURE__ */
|
|
9386
|
+
/* @__PURE__ */ jsxs13(
|
|
9159
9387
|
"span",
|
|
9160
9388
|
{
|
|
9161
9389
|
className: "gantt-resourceTimeline-resourceAssignments",
|
|
9162
9390
|
"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
9391
|
children: [
|
|
9164
|
-
/* @__PURE__ */
|
|
9165
|
-
/* @__PURE__ */
|
|
9166
|
-
/* @__PURE__ */
|
|
9392
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
9393
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
9394
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
9167
9395
|
] }),
|
|
9168
|
-
/* @__PURE__ */
|
|
9169
|
-
/* @__PURE__ */
|
|
9170
|
-
assignmentCount > 0 && /* @__PURE__ */
|
|
9171
|
-
/* @__PURE__ */
|
|
9172
|
-
/* @__PURE__ */
|
|
9396
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
9397
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
9398
|
+
assignmentCount > 0 && /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceAssignmentIcon", width: "14", height: "14", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9399
|
+
/* @__PURE__ */ jsx17("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
9400
|
+
/* @__PURE__ */ jsx17("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
9173
9401
|
] })
|
|
9174
9402
|
] })
|
|
9175
9403
|
]
|
|
9176
9404
|
}
|
|
9177
9405
|
),
|
|
9178
|
-
/* @__PURE__ */
|
|
9179
|
-
conflictCount > 0 && /* @__PURE__ */
|
|
9406
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
9407
|
+
conflictCount > 0 && /* @__PURE__ */ jsx17(
|
|
9180
9408
|
"button",
|
|
9181
9409
|
{
|
|
9182
9410
|
type: "button",
|
|
@@ -9190,8 +9418,8 @@ var ResourceHeader = ({
|
|
|
9190
9418
|
children: conflictCount
|
|
9191
9419
|
}
|
|
9192
9420
|
),
|
|
9193
|
-
hasMenu && /* @__PURE__ */
|
|
9194
|
-
/* @__PURE__ */
|
|
9421
|
+
hasMenu && /* @__PURE__ */ jsxs13(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
9422
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
9195
9423
|
"button",
|
|
9196
9424
|
{
|
|
9197
9425
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -9201,10 +9429,10 @@ var ResourceHeader = ({
|
|
|
9201
9429
|
event.stopPropagation();
|
|
9202
9430
|
setMenuOpen((open) => !open);
|
|
9203
9431
|
},
|
|
9204
|
-
children: /* @__PURE__ */
|
|
9432
|
+
children: /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
9205
9433
|
}
|
|
9206
9434
|
) }),
|
|
9207
|
-
/* @__PURE__ */
|
|
9435
|
+
/* @__PURE__ */ jsx17(PopoverContent, { className: "gantt-resourceTimeline-resourceMenu", portal: true, align: "end", children: visibleCommands.map((command) => /* @__PURE__ */ jsxs13(
|
|
9208
9436
|
"button",
|
|
9209
9437
|
{
|
|
9210
9438
|
type: "button",
|
|
@@ -9225,7 +9453,7 @@ var ResourceHeader = ({
|
|
|
9225
9453
|
);
|
|
9226
9454
|
};
|
|
9227
9455
|
var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
9228
|
-
const [nameValue, setNameValue] =
|
|
9456
|
+
const [nameValue, setNameValue] = useState9("");
|
|
9229
9457
|
const inputRef = useRef8(null);
|
|
9230
9458
|
const confirmedRef = useRef8(false);
|
|
9231
9459
|
useEffect8(() => {
|
|
@@ -9257,7 +9485,7 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9257
9485
|
handleConfirm();
|
|
9258
9486
|
}
|
|
9259
9487
|
};
|
|
9260
|
-
return /* @__PURE__ */
|
|
9488
|
+
return /* @__PURE__ */ jsxs13(
|
|
9261
9489
|
"div",
|
|
9262
9490
|
{
|
|
9263
9491
|
className: "gantt-resourceTimeline-resourceHeader gantt-resourceTimeline-resourceHeaderNew",
|
|
@@ -9267,8 +9495,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9267
9495
|
gridTemplateColumns: columnTemplate
|
|
9268
9496
|
},
|
|
9269
9497
|
children: [
|
|
9270
|
-
/* @__PURE__ */
|
|
9271
|
-
/* @__PURE__ */
|
|
9498
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
9499
|
+
/* @__PURE__ */ jsx17(
|
|
9272
9500
|
Input,
|
|
9273
9501
|
{
|
|
9274
9502
|
ref: inputRef,
|
|
@@ -9320,11 +9548,11 @@ function ResourceTimelineChart({
|
|
|
9320
9548
|
const conflictNavigationIndexRef = useRef8(/* @__PURE__ */ new Map());
|
|
9321
9549
|
const resourceNavigationIndexRef = useRef8(/* @__PURE__ */ new Map());
|
|
9322
9550
|
const conflictHighlightTimeoutRef = useRef8(null);
|
|
9323
|
-
const [isCreatingResource, setIsCreatingResource] =
|
|
9324
|
-
const [creatingResourceGroupType, setCreatingResourceGroupType] =
|
|
9325
|
-
const [activeConflictItemId, setActiveConflictItemId] =
|
|
9326
|
-
const [resourceColumnHasRightShadow, setResourceColumnHasRightShadow] =
|
|
9327
|
-
const [resourceColumnWidthOverrides, setResourceColumnWidthOverrides] =
|
|
9551
|
+
const [isCreatingResource, setIsCreatingResource] = useState9(false);
|
|
9552
|
+
const [creatingResourceGroupType, setCreatingResourceGroupType] = useState9(null);
|
|
9553
|
+
const [activeConflictItemId, setActiveConflictItemId] = useState9(null);
|
|
9554
|
+
const [resourceColumnHasRightShadow, setResourceColumnHasRightShadow] = useState9(false);
|
|
9555
|
+
const [resourceColumnWidthOverrides, setResourceColumnWidthOverrides] = useState9(() => normalizeResourceColumnWidthMap(resourceTableColumnWidths));
|
|
9328
9556
|
const validItems = useMemo10(() => collectValidItems(resources), [resources]);
|
|
9329
9557
|
const dateRange = useMemo10(() => getMultiMonthDays(validItems), [validItems]);
|
|
9330
9558
|
const monthStart = useMemo10(() => {
|
|
@@ -9392,7 +9620,7 @@ function ResourceTimelineChart({
|
|
|
9392
9620
|
);
|
|
9393
9621
|
const canAddResource = enableAddResource && Boolean(onAddResource);
|
|
9394
9622
|
const resourceAddRowHeight = laneHeight + DEFAULT_RESOURCE_ROW_GAP;
|
|
9395
|
-
const [collapsedResourceGroups, setCollapsedResourceGroups] =
|
|
9623
|
+
const [collapsedResourceGroups, setCollapsedResourceGroups] = useState9(/* @__PURE__ */ new Set());
|
|
9396
9624
|
const updateResourceColumnWidth = useCallback8((columnId, width) => {
|
|
9397
9625
|
setResourceColumnWidthOverrides((prev) => {
|
|
9398
9626
|
if (prev[columnId] === width) {
|
|
@@ -9447,7 +9675,7 @@ function ResourceTimelineChart({
|
|
|
9447
9675
|
document.body.style.cursor = "col-resize";
|
|
9448
9676
|
document.body.style.userSelect = "none";
|
|
9449
9677
|
}, [resolvedResourceColumnWidths]);
|
|
9450
|
-
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */
|
|
9678
|
+
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */ jsx17(
|
|
9451
9679
|
"button",
|
|
9452
9680
|
{
|
|
9453
9681
|
type: "button",
|
|
@@ -9758,7 +9986,7 @@ function ResourceTimelineChart({
|
|
|
9758
9986
|
}
|
|
9759
9987
|
};
|
|
9760
9988
|
}, []);
|
|
9761
|
-
return /* @__PURE__ */
|
|
9989
|
+
return /* @__PURE__ */ jsx17("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ jsx17(
|
|
9762
9990
|
"div",
|
|
9763
9991
|
{
|
|
9764
9992
|
ref: scrollContainerRef,
|
|
@@ -9769,44 +9997,44 @@ function ResourceTimelineChart({
|
|
|
9769
9997
|
},
|
|
9770
9998
|
"data-allow-vertical-pan": allowVerticalPan ? "true" : "false",
|
|
9771
9999
|
onMouseDown: handlePanStart,
|
|
9772
|
-
children: /* @__PURE__ */
|
|
9773
|
-
/* @__PURE__ */
|
|
10000
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-scrollContent", children: [
|
|
10001
|
+
/* @__PURE__ */ jsxs13(
|
|
9774
10002
|
"div",
|
|
9775
10003
|
{
|
|
9776
10004
|
className: `gantt-resourceTimeline-resourceColumn${resourceColumnHasRightShadow ? " gantt-resourceTimeline-resourceColumnShadowed" : ""}`,
|
|
9777
10005
|
style: { width: `${effectiveRowHeaderWidth}px`, minWidth: `${effectiveRowHeaderWidth}px` },
|
|
9778
10006
|
children: [
|
|
9779
|
-
/* @__PURE__ */
|
|
10007
|
+
/* @__PURE__ */ jsxs13(
|
|
9780
10008
|
"div",
|
|
9781
10009
|
{
|
|
9782
10010
|
className: "gantt-resourceTimeline-corner",
|
|
9783
10011
|
style: { height: `${timelineHeaderHeight}px`, gridTemplateColumns: resourceColumnTemplate },
|
|
9784
10012
|
children: [
|
|
9785
|
-
/* @__PURE__ */
|
|
10013
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderNumber", children: [
|
|
9786
10014
|
"#",
|
|
9787
10015
|
renderResizeHandle("number")
|
|
9788
10016
|
] }),
|
|
9789
|
-
/* @__PURE__ */
|
|
10017
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderName", children: [
|
|
9790
10018
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
9791
10019
|
renderResizeHandle("name")
|
|
9792
10020
|
] }),
|
|
9793
|
-
/* @__PURE__ */
|
|
9794
|
-
/* @__PURE__ */
|
|
10021
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceHeaderCell", "aria-label": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C", children: renderResizeHandle("availability") }),
|
|
10022
|
+
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
9795
10023
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
9796
10024
|
renderResizeHandle("assignments")
|
|
9797
10025
|
] }),
|
|
9798
|
-
/* @__PURE__ */
|
|
10026
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderActions", "aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F", children: renderResizeHandle("actions") })
|
|
9799
10027
|
]
|
|
9800
10028
|
}
|
|
9801
10029
|
),
|
|
9802
|
-
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
9803
|
-
/* @__PURE__ */
|
|
10030
|
+
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsxs13(React13.Fragment, { children: [
|
|
10031
|
+
/* @__PURE__ */ jsxs13(
|
|
9804
10032
|
"div",
|
|
9805
10033
|
{
|
|
9806
10034
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
9807
10035
|
style: { height: `${group.height}px` },
|
|
9808
10036
|
children: [
|
|
9809
|
-
/* @__PURE__ */
|
|
10037
|
+
/* @__PURE__ */ jsx17(
|
|
9810
10038
|
"button",
|
|
9811
10039
|
{
|
|
9812
10040
|
type: "button",
|
|
@@ -9817,12 +10045,12 @@ function ResourceTimelineChart({
|
|
|
9817
10045
|
event.stopPropagation();
|
|
9818
10046
|
toggleResourceGroupCollapsed(group.key);
|
|
9819
10047
|
},
|
|
9820
|
-
children: /* @__PURE__ */
|
|
10048
|
+
children: /* @__PURE__ */ jsx17(ResourceGroupChevronIcon, {})
|
|
9821
10049
|
}
|
|
9822
10050
|
),
|
|
9823
|
-
/* @__PURE__ */
|
|
9824
|
-
/* @__PURE__ */
|
|
9825
|
-
canAddResource && /* @__PURE__ */
|
|
10051
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
10052
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
10053
|
+
canAddResource && /* @__PURE__ */ jsx17(
|
|
9826
10054
|
"button",
|
|
9827
10055
|
{
|
|
9828
10056
|
type: "button",
|
|
@@ -9841,7 +10069,7 @@ function ResourceTimelineChart({
|
|
|
9841
10069
|
),
|
|
9842
10070
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
9843
10071
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
9844
|
-
return /* @__PURE__ */
|
|
10072
|
+
return /* @__PURE__ */ jsx17(
|
|
9845
10073
|
ResourceHeader,
|
|
9846
10074
|
{
|
|
9847
10075
|
resource: row.resource,
|
|
@@ -9861,7 +10089,7 @@ function ResourceTimelineChart({
|
|
|
9861
10089
|
row.resourceId
|
|
9862
10090
|
);
|
|
9863
10091
|
}),
|
|
9864
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */
|
|
10092
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ jsx17(
|
|
9865
10093
|
NewResourceRow,
|
|
9866
10094
|
{
|
|
9867
10095
|
height: resourceAddRowHeight,
|
|
@@ -9870,7 +10098,7 @@ function ResourceTimelineChart({
|
|
|
9870
10098
|
columnTemplate: resourceColumnTemplate
|
|
9871
10099
|
}
|
|
9872
10100
|
)
|
|
9873
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */
|
|
10101
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ jsx17(
|
|
9874
10102
|
ResourceHeader,
|
|
9875
10103
|
{
|
|
9876
10104
|
resource: row.resource,
|
|
@@ -9889,7 +10117,7 @@ function ResourceTimelineChart({
|
|
|
9889
10117
|
},
|
|
9890
10118
|
row.resourceId
|
|
9891
10119
|
)),
|
|
9892
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */
|
|
10120
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ jsx17(
|
|
9893
10121
|
NewResourceRow,
|
|
9894
10122
|
{
|
|
9895
10123
|
height: resourceAddRowHeight,
|
|
@@ -9897,7 +10125,7 @@ function ResourceTimelineChart({
|
|
|
9897
10125
|
onCancel: handleCancelNewResource,
|
|
9898
10126
|
columnTemplate: resourceColumnTemplate
|
|
9899
10127
|
}
|
|
9900
|
-
) : /* @__PURE__ */
|
|
10128
|
+
) : /* @__PURE__ */ jsx17(
|
|
9901
10129
|
"button",
|
|
9902
10130
|
{
|
|
9903
10131
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -9913,18 +10141,18 @@ function ResourceTimelineChart({
|
|
|
9913
10141
|
]
|
|
9914
10142
|
}
|
|
9915
10143
|
),
|
|
9916
|
-
/* @__PURE__ */
|
|
10144
|
+
/* @__PURE__ */ jsxs13(
|
|
9917
10145
|
"div",
|
|
9918
10146
|
{
|
|
9919
10147
|
className: "gantt-resourceTimeline-chartSurface",
|
|
9920
10148
|
style: { minWidth: `${gridWidth}px` },
|
|
9921
10149
|
children: [
|
|
9922
|
-
/* @__PURE__ */
|
|
10150
|
+
/* @__PURE__ */ jsx17(
|
|
9923
10151
|
"div",
|
|
9924
10152
|
{
|
|
9925
10153
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
9926
10154
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
9927
|
-
children: /* @__PURE__ */
|
|
10155
|
+
children: /* @__PURE__ */ jsx17(
|
|
9928
10156
|
TimeScaleHeader_default,
|
|
9929
10157
|
{
|
|
9930
10158
|
days: dateRange,
|
|
@@ -9936,14 +10164,14 @@ function ResourceTimelineChart({
|
|
|
9936
10164
|
)
|
|
9937
10165
|
}
|
|
9938
10166
|
),
|
|
9939
|
-
/* @__PURE__ */
|
|
10167
|
+
/* @__PURE__ */ jsxs13(
|
|
9940
10168
|
"div",
|
|
9941
10169
|
{
|
|
9942
10170
|
ref: gridRef,
|
|
9943
10171
|
className: "gantt-resourceTimeline-grid",
|
|
9944
10172
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
9945
10173
|
children: [
|
|
9946
|
-
/* @__PURE__ */
|
|
10174
|
+
/* @__PURE__ */ jsx17(
|
|
9947
10175
|
GridBackground_default,
|
|
9948
10176
|
{
|
|
9949
10177
|
dateRange,
|
|
@@ -9953,8 +10181,8 @@ function ResourceTimelineChart({
|
|
|
9953
10181
|
isCustomWeekend: weekendPredicate
|
|
9954
10182
|
}
|
|
9955
10183
|
),
|
|
9956
|
-
todayInRange && /* @__PURE__ */
|
|
9957
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
10184
|
+
todayInRange && /* @__PURE__ */ jsx17(TodayIndicator_default, { monthStart, dayWidth }),
|
|
10185
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsx17(
|
|
9958
10186
|
"div",
|
|
9959
10187
|
{
|
|
9960
10188
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -9966,7 +10194,7 @@ function ResourceTimelineChart({
|
|
|
9966
10194
|
},
|
|
9967
10195
|
`group-row-${group.key}`
|
|
9968
10196
|
)),
|
|
9969
|
-
displayLayout.rows.map((row) => /* @__PURE__ */
|
|
10197
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ jsx17(
|
|
9970
10198
|
"div",
|
|
9971
10199
|
{
|
|
9972
10200
|
className: "gantt-resourceTimeline-row",
|
|
@@ -9978,7 +10206,7 @@ function ResourceTimelineChart({
|
|
|
9978
10206
|
},
|
|
9979
10207
|
row.resourceId
|
|
9980
10208
|
)),
|
|
9981
|
-
canAddResource && /* @__PURE__ */
|
|
10209
|
+
canAddResource && /* @__PURE__ */ jsx17(
|
|
9982
10210
|
"div",
|
|
9983
10211
|
{
|
|
9984
10212
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -9989,7 +10217,7 @@ function ResourceTimelineChart({
|
|
|
9989
10217
|
}
|
|
9990
10218
|
}
|
|
9991
10219
|
),
|
|
9992
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */
|
|
10220
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ jsx17(
|
|
9993
10221
|
"div",
|
|
9994
10222
|
{
|
|
9995
10223
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10060,7 +10288,7 @@ function ResourceTimelineChart({
|
|
|
10060
10288
|
const tooltipFirstLine = layoutItem.item.tooltip?.firstLine ?? layoutItem.item.title;
|
|
10061
10289
|
const tooltipSecondLine = resourceItemTooltipLines === 2 ? layoutItem.item.tooltip?.secondLine ?? layoutItem.item.subtitle : void 0;
|
|
10062
10290
|
const tooltipSecondLineIcon = layoutItem.item.tooltip?.secondLineIcon;
|
|
10063
|
-
return /* @__PURE__ */
|
|
10291
|
+
return /* @__PURE__ */ jsxs13(
|
|
10064
10292
|
"div",
|
|
10065
10293
|
{
|
|
10066
10294
|
className,
|
|
@@ -10088,11 +10316,11 @@ function ResourceTimelineChart({
|
|
|
10088
10316
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
10089
10317
|
},
|
|
10090
10318
|
children: [
|
|
10091
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */
|
|
10092
|
-
/* @__PURE__ */
|
|
10093
|
-
/* @__PURE__ */
|
|
10319
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
10320
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
10321
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
10094
10322
|
] }),
|
|
10095
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
10323
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx17(
|
|
10096
10324
|
"span",
|
|
10097
10325
|
{
|
|
10098
10326
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -10104,7 +10332,7 @@ function ResourceTimelineChart({
|
|
|
10104
10332
|
},
|
|
10105
10333
|
`weekend-overlay-${index}`
|
|
10106
10334
|
)),
|
|
10107
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
10335
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx17(
|
|
10108
10336
|
"span",
|
|
10109
10337
|
{
|
|
10110
10338
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -10116,7 +10344,7 @@ function ResourceTimelineChart({
|
|
|
10116
10344
|
},
|
|
10117
10345
|
`conflict-overlay-${index}`
|
|
10118
10346
|
)),
|
|
10119
|
-
hasItemMenu && /* @__PURE__ */
|
|
10347
|
+
hasItemMenu && /* @__PURE__ */ jsx17(
|
|
10120
10348
|
"button",
|
|
10121
10349
|
{
|
|
10122
10350
|
type: "button",
|
|
@@ -10129,12 +10357,12 @@ function ResourceTimelineChart({
|
|
|
10129
10357
|
event.stopPropagation();
|
|
10130
10358
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
10131
10359
|
},
|
|
10132
|
-
children: /* @__PURE__ */
|
|
10360
|
+
children: /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
10133
10361
|
}
|
|
10134
10362
|
),
|
|
10135
|
-
/* @__PURE__ */
|
|
10136
|
-
/* @__PURE__ */
|
|
10137
|
-
/* @__PURE__ */
|
|
10363
|
+
/* @__PURE__ */ jsx17("div", { className: "gantt-resourceTimeline-itemInner", children: renderItem ? renderItem(layoutItem.item, renderContext) : /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemContent", children: [
|
|
10364
|
+
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
10365
|
+
/* @__PURE__ */ jsx17(
|
|
10138
10366
|
"span",
|
|
10139
10367
|
{
|
|
10140
10368
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -10142,15 +10370,15 @@ function ResourceTimelineChart({
|
|
|
10142
10370
|
children: durationValue
|
|
10143
10371
|
}
|
|
10144
10372
|
),
|
|
10145
|
-
/* @__PURE__ */
|
|
10373
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
10146
10374
|
] }),
|
|
10147
|
-
layoutItem.item.subtitle && /* @__PURE__ */
|
|
10375
|
+
layoutItem.item.subtitle && /* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
10148
10376
|
] }) }),
|
|
10149
|
-
/* @__PURE__ */
|
|
10150
|
-
/* @__PURE__ */
|
|
10151
|
-
tooltipSecondLine && /* @__PURE__ */
|
|
10152
|
-
tooltipSecondLineIcon && /* @__PURE__ */
|
|
10153
|
-
/* @__PURE__ */
|
|
10377
|
+
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
10378
|
+
/* @__PURE__ */ jsx17("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
10379
|
+
tooltipSecondLine && /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
10380
|
+
tooltipSecondLineIcon && /* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
10381
|
+
/* @__PURE__ */ jsx17("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
10154
10382
|
] })
|
|
10155
10383
|
] })
|
|
10156
10384
|
]
|
|
@@ -10171,8 +10399,8 @@ function ResourceTimelineChart({
|
|
|
10171
10399
|
}
|
|
10172
10400
|
|
|
10173
10401
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
10174
|
-
import { useLayoutEffect, useMemo as useMemo11, useRef as useRef9, useState as
|
|
10175
|
-
import { jsx as
|
|
10402
|
+
import { useLayoutEffect, useMemo as useMemo11, useRef as useRef9, useState as useState10 } from "react";
|
|
10403
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10176
10404
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
10177
10405
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
10178
10406
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
@@ -10239,7 +10467,7 @@ function TableMatrix({
|
|
|
10239
10467
|
visibleRowIndices
|
|
10240
10468
|
}) {
|
|
10241
10469
|
const measureRef = useRef9(null);
|
|
10242
|
-
const [measuredAutoWidths, setMeasuredAutoWidths] =
|
|
10470
|
+
const [measuredAutoWidths, setMeasuredAutoWidths] = useState10([]);
|
|
10243
10471
|
const hasAutoWidthColumns = useMemo11(
|
|
10244
10472
|
() => columns.some((column) => typeof column.width !== "number"),
|
|
10245
10473
|
[columns]
|
|
@@ -10372,9 +10600,9 @@ function TableMatrix({
|
|
|
10372
10600
|
return task ? { task, index } : null;
|
|
10373
10601
|
}).filter((entry) => entry !== null);
|
|
10374
10602
|
}, [tasks, visibleRowIndices]);
|
|
10375
|
-
return /* @__PURE__ */
|
|
10376
|
-
hasAutoWidthColumns && /* @__PURE__ */
|
|
10377
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
10603
|
+
return /* @__PURE__ */ jsxs14("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
10604
|
+
hasAutoWidthColumns && /* @__PURE__ */ jsxs14("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
10605
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx18(
|
|
10378
10606
|
"div",
|
|
10379
10607
|
{
|
|
10380
10608
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10383,7 +10611,7 @@ function TableMatrix({
|
|
|
10383
10611
|
},
|
|
10384
10612
|
`header:${column.id}`
|
|
10385
10613
|
)),
|
|
10386
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
10614
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx18(
|
|
10387
10615
|
"div",
|
|
10388
10616
|
{
|
|
10389
10617
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10393,8 +10621,8 @@ function TableMatrix({
|
|
|
10393
10621
|
`${task.id}:${column.id}`
|
|
10394
10622
|
)))
|
|
10395
10623
|
] }),
|
|
10396
|
-
/* @__PURE__ */
|
|
10397
|
-
hasGroupHeader && /* @__PURE__ */
|
|
10624
|
+
/* @__PURE__ */ jsxs14("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
10625
|
+
hasGroupHeader && /* @__PURE__ */ jsx18(
|
|
10398
10626
|
"div",
|
|
10399
10627
|
{
|
|
10400
10628
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -10402,7 +10630,7 @@ function TableMatrix({
|
|
|
10402
10630
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
10403
10631
|
height: `${topRowHeight}px`
|
|
10404
10632
|
},
|
|
10405
|
-
children: headerSpans.map((span) => /* @__PURE__ */
|
|
10633
|
+
children: headerSpans.map((span) => /* @__PURE__ */ jsx18(
|
|
10406
10634
|
"div",
|
|
10407
10635
|
{
|
|
10408
10636
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -10413,7 +10641,7 @@ function TableMatrix({
|
|
|
10413
10641
|
))
|
|
10414
10642
|
}
|
|
10415
10643
|
),
|
|
10416
|
-
/* @__PURE__ */
|
|
10644
|
+
/* @__PURE__ */ jsx18(
|
|
10417
10645
|
"div",
|
|
10418
10646
|
{
|
|
10419
10647
|
className: "gantt-mx-headerRow",
|
|
@@ -10421,7 +10649,7 @@ function TableMatrix({
|
|
|
10421
10649
|
children: columns.map((column) => {
|
|
10422
10650
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10423
10651
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10424
|
-
return /* @__PURE__ */
|
|
10652
|
+
return /* @__PURE__ */ jsxs14(
|
|
10425
10653
|
"div",
|
|
10426
10654
|
{
|
|
10427
10655
|
className: joinClasses(
|
|
@@ -10430,7 +10658,7 @@ function TableMatrix({
|
|
|
10430
10658
|
),
|
|
10431
10659
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
10432
10660
|
children: [
|
|
10433
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
10661
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx18(
|
|
10434
10662
|
"span",
|
|
10435
10663
|
{
|
|
10436
10664
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10440,7 +10668,7 @@ function TableMatrix({
|
|
|
10440
10668
|
}
|
|
10441
10669
|
}
|
|
10442
10670
|
),
|
|
10443
|
-
/* @__PURE__ */
|
|
10671
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
10444
10672
|
]
|
|
10445
10673
|
},
|
|
10446
10674
|
column.id
|
|
@@ -10449,7 +10677,7 @@ function TableMatrix({
|
|
|
10449
10677
|
}
|
|
10450
10678
|
)
|
|
10451
10679
|
] }),
|
|
10452
|
-
/* @__PURE__ */
|
|
10680
|
+
/* @__PURE__ */ jsx18(
|
|
10453
10681
|
"div",
|
|
10454
10682
|
{
|
|
10455
10683
|
className: "gantt-mx-body",
|
|
@@ -10463,7 +10691,7 @@ function TableMatrix({
|
|
|
10463
10691
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
10464
10692
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
10465
10693
|
const isTotal = Boolean(task.isTotal);
|
|
10466
|
-
return /* @__PURE__ */
|
|
10694
|
+
return /* @__PURE__ */ jsx18(
|
|
10467
10695
|
"div",
|
|
10468
10696
|
{
|
|
10469
10697
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10488,7 +10716,7 @@ function TableMatrix({
|
|
|
10488
10716
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10489
10717
|
const shouldRenderOverlay = overlayWidthPercent > 0 && (!dateOverlay || !dateOverlay.shouldRender || dateOverlay.shouldRender({ task, column, rowIndex: index, columnIndex }));
|
|
10490
10718
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10491
|
-
return /* @__PURE__ */
|
|
10719
|
+
return /* @__PURE__ */ jsxs14(
|
|
10492
10720
|
"div",
|
|
10493
10721
|
{
|
|
10494
10722
|
className: joinClasses(
|
|
@@ -10503,7 +10731,7 @@ function TableMatrix({
|
|
|
10503
10731
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
10504
10732
|
},
|
|
10505
10733
|
children: [
|
|
10506
|
-
shouldRenderOverlay && /* @__PURE__ */
|
|
10734
|
+
shouldRenderOverlay && /* @__PURE__ */ jsx18(
|
|
10507
10735
|
"span",
|
|
10508
10736
|
{
|
|
10509
10737
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -10513,7 +10741,7 @@ function TableMatrix({
|
|
|
10513
10741
|
}
|
|
10514
10742
|
}
|
|
10515
10743
|
),
|
|
10516
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
10744
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx18(
|
|
10517
10745
|
"span",
|
|
10518
10746
|
{
|
|
10519
10747
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10523,7 +10751,7 @@ function TableMatrix({
|
|
|
10523
10751
|
}
|
|
10524
10752
|
}
|
|
10525
10753
|
),
|
|
10526
|
-
/* @__PURE__ */
|
|
10754
|
+
/* @__PURE__ */ jsx18("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
10527
10755
|
]
|
|
10528
10756
|
},
|
|
10529
10757
|
`${task.id}:${column.id}`
|
|
@@ -10539,8 +10767,8 @@ function TableMatrix({
|
|
|
10539
10767
|
}
|
|
10540
10768
|
|
|
10541
10769
|
// 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
|
|
10770
|
+
import React15, { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo12, useRef as useRef10, useState as useState11 } from "react";
|
|
10771
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10544
10772
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
10545
10773
|
function joinClasses2(...values) {
|
|
10546
10774
|
return values.filter(Boolean).join(" ");
|
|
@@ -10631,7 +10859,7 @@ function PlanFactCellEditor({
|
|
|
10631
10859
|
onCommitRange,
|
|
10632
10860
|
onCancel
|
|
10633
10861
|
}) {
|
|
10634
|
-
const [draft, setDraft] =
|
|
10862
|
+
const [draft, setDraft] = useState11(startValue ?? (value === void 0 ? "" : String(value)));
|
|
10635
10863
|
const inputRef = useRef10(null);
|
|
10636
10864
|
useEffect9(() => {
|
|
10637
10865
|
inputRef.current?.focus();
|
|
@@ -10649,7 +10877,7 @@ function PlanFactCellEditor({
|
|
|
10649
10877
|
}
|
|
10650
10878
|
onCommit(parsed);
|
|
10651
10879
|
}, [draft, onCancel, onCommit]);
|
|
10652
|
-
return /* @__PURE__ */
|
|
10880
|
+
return /* @__PURE__ */ jsx19(
|
|
10653
10881
|
"input",
|
|
10654
10882
|
{
|
|
10655
10883
|
ref: inputRef,
|
|
@@ -10763,7 +10991,7 @@ function PlanFactRowInner({
|
|
|
10763
10991
|
showOverflowTooltip,
|
|
10764
10992
|
hideOverflowTooltip
|
|
10765
10993
|
}) {
|
|
10766
|
-
return /* @__PURE__ */
|
|
10994
|
+
return /* @__PURE__ */ jsx19(
|
|
10767
10995
|
"div",
|
|
10768
10996
|
{
|
|
10769
10997
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10801,7 +11029,7 @@ function PlanFactRowInner({
|
|
|
10801
11029
|
const isSelected = !isParent && isInRenderedRange;
|
|
10802
11030
|
const showFillHandle = !isParent && !isEditing && isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.toDateIndex && subrowIndex === renderedRangeBounds.toSubrowIndex;
|
|
10803
11031
|
const isRangeAnchor = !showFillHandle && !isParent && selectedRange?.anchor.taskId === task.id && selectedRange.anchor.dateIndex === dateIndex && selectedRange.anchor.kind === kind;
|
|
10804
|
-
return /* @__PURE__ */
|
|
11032
|
+
return /* @__PURE__ */ jsxs15(
|
|
10805
11033
|
"div",
|
|
10806
11034
|
{
|
|
10807
11035
|
"data-plan-fact-task-id": task.id,
|
|
@@ -10898,7 +11126,7 @@ function PlanFactRowInner({
|
|
|
10898
11126
|
}
|
|
10899
11127
|
},
|
|
10900
11128
|
children: [
|
|
10901
|
-
isEditing ? /* @__PURE__ */
|
|
11129
|
+
isEditing ? /* @__PURE__ */ jsx19(
|
|
10902
11130
|
PlanFactCellEditor,
|
|
10903
11131
|
{
|
|
10904
11132
|
value,
|
|
@@ -10924,7 +11152,7 @@ function PlanFactRowInner({
|
|
|
10924
11152
|
focusCell(nextActiveCell);
|
|
10925
11153
|
}
|
|
10926
11154
|
}
|
|
10927
|
-
) : /* @__PURE__ */
|
|
11155
|
+
) : /* @__PURE__ */ jsx19(
|
|
10928
11156
|
"span",
|
|
10929
11157
|
{
|
|
10930
11158
|
className: "gantt-pf-cellValue",
|
|
@@ -10938,7 +11166,7 @@ function PlanFactRowInner({
|
|
|
10938
11166
|
children: isParent ? "" : formatValue(value)
|
|
10939
11167
|
}
|
|
10940
11168
|
),
|
|
10941
|
-
showFillHandle && /* @__PURE__ */
|
|
11169
|
+
showFillHandle && /* @__PURE__ */ jsx19(
|
|
10942
11170
|
"span",
|
|
10943
11171
|
{
|
|
10944
11172
|
className: "gantt-pf-fillHandle",
|
|
@@ -10986,11 +11214,11 @@ function PlanFactMatrix({
|
|
|
10986
11214
|
todayDateIndex,
|
|
10987
11215
|
isCustomWeekend
|
|
10988
11216
|
}) {
|
|
10989
|
-
const [activeCell, setActiveCell] =
|
|
10990
|
-
const [editingCell, setEditingCell] =
|
|
10991
|
-
const [selectedRange, setSelectedRange] =
|
|
10992
|
-
const [fillRange, setFillRange] =
|
|
10993
|
-
const [overflowTooltip, setOverflowTooltip] =
|
|
11217
|
+
const [activeCell, setActiveCell] = useState11(null);
|
|
11218
|
+
const [editingCell, setEditingCell] = useState11(null);
|
|
11219
|
+
const [selectedRange, setSelectedRange] = useState11(null);
|
|
11220
|
+
const [fillRange, setFillRange] = useState11(null);
|
|
11221
|
+
const [overflowTooltip, setOverflowTooltip] = useState11(null);
|
|
10994
11222
|
const isSelectingRef = useRef10(false);
|
|
10995
11223
|
const isFillDraggingRef = useRef10(false);
|
|
10996
11224
|
const didDragSelectRef = useRef10(false);
|
|
@@ -11450,7 +11678,7 @@ function PlanFactMatrix({
|
|
|
11450
11678
|
document.removeEventListener("mousedown", handleMouseDown);
|
|
11451
11679
|
};
|
|
11452
11680
|
}, [clearSelection]);
|
|
11453
|
-
return /* @__PURE__ */
|
|
11681
|
+
return /* @__PURE__ */ jsxs15(
|
|
11454
11682
|
"div",
|
|
11455
11683
|
{
|
|
11456
11684
|
ref: rootRef,
|
|
@@ -11460,8 +11688,8 @@ function PlanFactMatrix({
|
|
|
11460
11688
|
["--gantt-pf-day-width"]: `${dayWidth}px`
|
|
11461
11689
|
},
|
|
11462
11690
|
children: [
|
|
11463
|
-
/* @__PURE__ */
|
|
11464
|
-
/* @__PURE__ */
|
|
11691
|
+
/* @__PURE__ */ jsxs15("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
11692
|
+
/* @__PURE__ */ jsx19(
|
|
11465
11693
|
"div",
|
|
11466
11694
|
{
|
|
11467
11695
|
className: "gantt-pf-dateWindow",
|
|
@@ -11469,7 +11697,7 @@ function PlanFactMatrix({
|
|
|
11469
11697
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11470
11698
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11471
11699
|
},
|
|
11472
|
-
children: /* @__PURE__ */
|
|
11700
|
+
children: /* @__PURE__ */ jsx19(
|
|
11473
11701
|
TimeScaleHeader_default,
|
|
11474
11702
|
{
|
|
11475
11703
|
days: renderedDateWindow.days,
|
|
@@ -11481,7 +11709,7 @@ function PlanFactMatrix({
|
|
|
11481
11709
|
)
|
|
11482
11710
|
}
|
|
11483
11711
|
),
|
|
11484
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */
|
|
11712
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ jsx19(
|
|
11485
11713
|
"span",
|
|
11486
11714
|
{
|
|
11487
11715
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -11493,7 +11721,7 @@ function PlanFactMatrix({
|
|
|
11493
11721
|
}
|
|
11494
11722
|
)
|
|
11495
11723
|
] }),
|
|
11496
|
-
/* @__PURE__ */
|
|
11724
|
+
/* @__PURE__ */ jsx19("div", { className: "gantt-pf-monthSeparatorLayer", "aria-hidden": "true", children: monthSeparatorIndices.map((dateIndex) => /* @__PURE__ */ jsx19(
|
|
11497
11725
|
"span",
|
|
11498
11726
|
{
|
|
11499
11727
|
className: "gantt-pf-monthSeparator",
|
|
@@ -11504,7 +11732,7 @@ function PlanFactMatrix({
|
|
|
11504
11732
|
},
|
|
11505
11733
|
`month-separator-${dateIndex}`
|
|
11506
11734
|
)) }),
|
|
11507
|
-
/* @__PURE__ */
|
|
11735
|
+
/* @__PURE__ */ jsxs15(
|
|
11508
11736
|
"div",
|
|
11509
11737
|
{
|
|
11510
11738
|
ref: bodyRef,
|
|
@@ -11515,7 +11743,7 @@ function PlanFactMatrix({
|
|
|
11515
11743
|
width: `${totalWidth}px`
|
|
11516
11744
|
},
|
|
11517
11745
|
children: [
|
|
11518
|
-
/* @__PURE__ */
|
|
11746
|
+
/* @__PURE__ */ jsx19(
|
|
11519
11747
|
"div",
|
|
11520
11748
|
{
|
|
11521
11749
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -11523,7 +11751,7 @@ function PlanFactMatrix({
|
|
|
11523
11751
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11524
11752
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11525
11753
|
},
|
|
11526
|
-
children: /* @__PURE__ */
|
|
11754
|
+
children: /* @__PURE__ */ jsx19(
|
|
11527
11755
|
GridBackground_default,
|
|
11528
11756
|
{
|
|
11529
11757
|
dateRange: renderedDateWindow.days,
|
|
@@ -11541,7 +11769,7 @@ function PlanFactMatrix({
|
|
|
11541
11769
|
if (!task) return null;
|
|
11542
11770
|
const isParent = parentTaskIds.has(task.id);
|
|
11543
11771
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
11544
|
-
return /* @__PURE__ */
|
|
11772
|
+
return /* @__PURE__ */ jsx19(
|
|
11545
11773
|
PlanFactRow,
|
|
11546
11774
|
{
|
|
11547
11775
|
task,
|
|
@@ -11586,7 +11814,7 @@ function PlanFactMatrix({
|
|
|
11586
11814
|
]
|
|
11587
11815
|
}
|
|
11588
11816
|
),
|
|
11589
|
-
overflowTooltip && /* @__PURE__ */
|
|
11817
|
+
overflowTooltip && /* @__PURE__ */ jsx19(
|
|
11590
11818
|
"div",
|
|
11591
11819
|
{
|
|
11592
11820
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -12012,7 +12240,7 @@ function createTaskPreviewPositionStore() {
|
|
|
12012
12240
|
}
|
|
12013
12241
|
|
|
12014
12242
|
// src/components/GanttChart/GanttChart.tsx
|
|
12015
|
-
import { Fragment as
|
|
12243
|
+
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
12016
12244
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
12017
12245
|
var TASK_ROW_OVERSCAN = 8;
|
|
12018
12246
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
@@ -12139,9 +12367,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
12139
12367
|
}
|
|
12140
12368
|
function GanttChartInner(props, ref) {
|
|
12141
12369
|
if (props.mode === "resource-planner") {
|
|
12142
|
-
return /* @__PURE__ */
|
|
12370
|
+
return /* @__PURE__ */ jsx20(ResourceTimelineChart, { ...props });
|
|
12143
12371
|
}
|
|
12144
|
-
return /* @__PURE__ */
|
|
12372
|
+
return /* @__PURE__ */ jsx20(
|
|
12145
12373
|
TaskGanttChart,
|
|
12146
12374
|
{
|
|
12147
12375
|
...props,
|
|
@@ -12177,6 +12405,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12177
12405
|
onDemoteTask,
|
|
12178
12406
|
onUngroupTask,
|
|
12179
12407
|
enableAddTask = true,
|
|
12408
|
+
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
12180
12409
|
defaultTaskDurationDays,
|
|
12181
12410
|
taskFilter,
|
|
12182
12411
|
filterMode = "highlight",
|
|
@@ -12223,20 +12452,176 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12223
12452
|
previewPositionStoreRef.current = createTaskPreviewPositionStore();
|
|
12224
12453
|
}
|
|
12225
12454
|
const previewPositionStore = previewPositionStoreRef.current;
|
|
12226
|
-
const [selectedTaskId, setSelectedTaskId] =
|
|
12227
|
-
const [taskListHasRightShadow, setTaskListHasRightShadow] =
|
|
12228
|
-
const [internalTaskDateChangeMode, setInternalTaskDateChangeMode] =
|
|
12229
|
-
const [scrollViewport, setScrollViewport] =
|
|
12455
|
+
const [selectedTaskId, setSelectedTaskId] = useState12(null);
|
|
12456
|
+
const [taskListHasRightShadow, setTaskListHasRightShadow] = useState12(false);
|
|
12457
|
+
const [internalTaskDateChangeMode, setInternalTaskDateChangeMode] = useState12("preserve-duration");
|
|
12458
|
+
const [scrollViewport, setScrollViewport] = useState12(() => ({
|
|
12230
12459
|
scrollTop: 0,
|
|
12231
12460
|
viewportHeight: getInitialScrollViewportHeight(containerHeight, headerHeight + 1)
|
|
12232
12461
|
}));
|
|
12233
|
-
const [forceFullRenderForPrint, setForceFullRenderForPrint] =
|
|
12234
|
-
const [planFactDateWindow, setPlanFactDateWindow] =
|
|
12235
|
-
const [selectedChip, setSelectedChip] =
|
|
12236
|
-
const [
|
|
12237
|
-
const
|
|
12462
|
+
const [forceFullRenderForPrint, setForceFullRenderForPrint] = useState12(false);
|
|
12463
|
+
const [planFactDateWindow, setPlanFactDateWindow] = useState12({ start: 0, end: 0 });
|
|
12464
|
+
const [selectedChip, setSelectedChip] = useState12(null);
|
|
12465
|
+
const [dependencyCreationDrag, setDependencyCreationDrag] = useState12(null);
|
|
12466
|
+
const dependencyCreationRef = useRef11(null);
|
|
12467
|
+
const [dependencyCreationError, setDependencyCreationError] = useState12(null);
|
|
12468
|
+
const [dependencyLineMenu, setDependencyLineMenu] = useState12(null);
|
|
12469
|
+
const getDependencyPortPoint = useCallback10((element, chartRect) => {
|
|
12470
|
+
const rect = element.getBoundingClientRect();
|
|
12471
|
+
const side = element.getAttribute("data-port-side");
|
|
12472
|
+
return {
|
|
12473
|
+
// The port hit-area is deliberately outside the bar. Anchor the preview
|
|
12474
|
+
// to the actual bar boundary instead of the center of that outside zone.
|
|
12475
|
+
x: Math.round((side === "left" ? rect.right - 6 : rect.left + 6) - chartRect.left),
|
|
12476
|
+
y: Math.round(rect.top + rect.height / 2 - chartRect.top)
|
|
12477
|
+
};
|
|
12478
|
+
}, []);
|
|
12479
|
+
const getVisualDependencyType = useCallback10((sourceSide, targetSide) => {
|
|
12480
|
+
if (sourceSide === "right" && targetSide === "left") return "FS";
|
|
12481
|
+
if (sourceSide === "left" && targetSide === "left") return "SS";
|
|
12482
|
+
if (sourceSide === "right" && targetSide === "right") return "FF";
|
|
12483
|
+
return "SF";
|
|
12484
|
+
}, []);
|
|
12485
|
+
const handleDependencyPortPointerDown = useCallback10((sourceId, sourceSide, event) => {
|
|
12486
|
+
if (disableDependencyEditing || event.button !== 0) return;
|
|
12487
|
+
const chartElement = event.currentTarget.closest(".gantt-taskArea");
|
|
12488
|
+
if (!(chartElement instanceof HTMLElement)) return;
|
|
12489
|
+
event.preventDefault();
|
|
12490
|
+
event.stopPropagation();
|
|
12491
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
12492
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12493
|
+
const source = getDependencyPortPoint(event.currentTarget, chartRect);
|
|
12494
|
+
const nextDrag = { sourceId, sourceSide, source, current: source };
|
|
12495
|
+
dependencyCreationRef.current = nextDrag;
|
|
12496
|
+
setDependencyCreationDrag(nextDrag);
|
|
12497
|
+
}, [disableDependencyEditing, getDependencyPortPoint]);
|
|
12498
|
+
useEffect10(() => {
|
|
12499
|
+
if (!dependencyCreationDrag) return;
|
|
12500
|
+
const handlePointerMove = (event) => {
|
|
12501
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12502
|
+
const chartElement = scrollContentRef.current?.querySelector(".gantt-taskArea");
|
|
12503
|
+
if (!activeDrag || !(chartElement instanceof HTMLElement)) return;
|
|
12504
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12505
|
+
const targetElement = document.elementFromPoint(event.clientX, event.clientY)?.closest("[data-gantt-dependency-port]");
|
|
12506
|
+
const targetTaskId = targetElement?.getAttribute("data-task-id") ?? void 0;
|
|
12507
|
+
const targetSide = targetElement?.getAttribute("data-port-side");
|
|
12508
|
+
const target = targetTaskId && targetSide && targetTaskId !== activeDrag.sourceId ? { taskId: targetTaskId, side: targetSide } : void 0;
|
|
12509
|
+
const current = targetElement ? getDependencyPortPoint(targetElement, chartRect) : { x: Math.round(event.clientX - chartRect.left), y: Math.round(event.clientY - chartRect.top) };
|
|
12510
|
+
const nextDrag = {
|
|
12511
|
+
...activeDrag,
|
|
12512
|
+
current,
|
|
12513
|
+
target,
|
|
12514
|
+
linkType: target ? getVisualDependencyType(activeDrag.sourceSide, target.side) : void 0
|
|
12515
|
+
};
|
|
12516
|
+
dependencyCreationRef.current = nextDrag;
|
|
12517
|
+
setDependencyCreationDrag(nextDrag);
|
|
12518
|
+
};
|
|
12519
|
+
const handlePointerUp = () => {
|
|
12520
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12521
|
+
dependencyCreationRef.current = null;
|
|
12522
|
+
setDependencyCreationDrag(null);
|
|
12523
|
+
if (!activeDrag?.target || !activeDrag.linkType) return;
|
|
12524
|
+
const predecessorId = activeDrag.sourceId;
|
|
12525
|
+
const successorId = activeDrag.target.taskId;
|
|
12526
|
+
const successor = tasks.find((task) => task.id === successorId);
|
|
12527
|
+
if (!successor || areTasksHierarchicallyRelated(predecessorId, successorId, tasks)) {
|
|
12528
|
+
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");
|
|
12529
|
+
return;
|
|
12530
|
+
}
|
|
12531
|
+
const nextDependency = { taskId: predecessorId, type: activeDrag.linkType, lag: 0 };
|
|
12532
|
+
if ((successor.dependencies ?? []).some((dependency) => dependency.taskId === predecessorId && dependency.type === nextDependency.type)) return;
|
|
12533
|
+
const hypothetical = tasks.map((task) => task.id === successorId ? { ...task, dependencies: [...task.dependencies ?? [], nextDependency] } : task);
|
|
12534
|
+
const validation = validateDependencies(hypothetical);
|
|
12535
|
+
if (!validation.isValid) {
|
|
12536
|
+
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!");
|
|
12537
|
+
return;
|
|
12538
|
+
}
|
|
12539
|
+
const predecessor = tasks.find((task) => task.id === predecessorId);
|
|
12540
|
+
const updatedSuccessor = hypothetical.find((task) => task.id === successorId);
|
|
12541
|
+
if (!predecessor) {
|
|
12542
|
+
onTasksChange?.([updatedSuccessor]);
|
|
12543
|
+
return;
|
|
12544
|
+
}
|
|
12545
|
+
const constraintDate = calculateSuccessorDate(
|
|
12546
|
+
parseUTCDate(predecessor.startDate),
|
|
12547
|
+
parseUTCDate(predecessor.endDate),
|
|
12548
|
+
nextDependency.type,
|
|
12549
|
+
0,
|
|
12550
|
+
businessDays,
|
|
12551
|
+
isCustomWeekend
|
|
12552
|
+
);
|
|
12553
|
+
const duration = getTaskDuration(
|
|
12554
|
+
updatedSuccessor.startDate,
|
|
12555
|
+
updatedSuccessor.endDate,
|
|
12556
|
+
businessDays,
|
|
12557
|
+
isCustomWeekend
|
|
12558
|
+
);
|
|
12559
|
+
const range = nextDependency.type === "FS" || nextDependency.type === "SS" ? buildTaskRangeFromStart(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 })) : buildTaskRangeFromEnd(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }));
|
|
12560
|
+
onTasksChange?.([{
|
|
12561
|
+
...updatedSuccessor,
|
|
12562
|
+
startDate: range.start.toISOString().split("T")[0],
|
|
12563
|
+
endDate: range.end.toISOString().split("T")[0]
|
|
12564
|
+
}]);
|
|
12565
|
+
};
|
|
12566
|
+
const handleKeyDown = (event) => {
|
|
12567
|
+
if (event.key === "Escape") {
|
|
12568
|
+
dependencyCreationRef.current = null;
|
|
12569
|
+
setDependencyCreationDrag(null);
|
|
12570
|
+
}
|
|
12571
|
+
};
|
|
12572
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
12573
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
12574
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
12575
|
+
return () => {
|
|
12576
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12577
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
12578
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
12579
|
+
};
|
|
12580
|
+
}, [businessDays, customDays, dependencyCreationDrag !== null, getDependencyPortPoint, getVisualDependencyType, isWeekend3, onTasksChange, tasks]);
|
|
12581
|
+
useEffect10(() => {
|
|
12582
|
+
if (!dependencyCreationError) return;
|
|
12583
|
+
const timeout = window.setTimeout(() => setDependencyCreationError(null), 3e3);
|
|
12584
|
+
return () => window.clearTimeout(timeout);
|
|
12585
|
+
}, [dependencyCreationError]);
|
|
12586
|
+
useEffect10(() => {
|
|
12587
|
+
if (!dependencyLineMenu) return;
|
|
12588
|
+
const closeMenu = (event) => {
|
|
12589
|
+
const target = event.target;
|
|
12590
|
+
if (!target.closest(".gantt-dependencyLineMenu")) setDependencyLineMenu(null);
|
|
12591
|
+
};
|
|
12592
|
+
const closeOnEscape = (event) => {
|
|
12593
|
+
if (event.key === "Escape") setDependencyLineMenu(null);
|
|
12594
|
+
};
|
|
12595
|
+
document.addEventListener("mousedown", closeMenu, true);
|
|
12596
|
+
document.addEventListener("keydown", closeOnEscape);
|
|
12597
|
+
return () => {
|
|
12598
|
+
document.removeEventListener("mousedown", closeMenu, true);
|
|
12599
|
+
document.removeEventListener("keydown", closeOnEscape);
|
|
12600
|
+
};
|
|
12601
|
+
}, [dependencyLineMenu]);
|
|
12602
|
+
const handleDependencyLineClick = useCallback10((dependency) => {
|
|
12603
|
+
setSelectedChip({
|
|
12604
|
+
predecessorId: dependency.predecessorId,
|
|
12605
|
+
successorId: dependency.successorId,
|
|
12606
|
+
linkType: dependency.linkType
|
|
12607
|
+
});
|
|
12608
|
+
setDependencyLineMenu(dependency);
|
|
12609
|
+
}, []);
|
|
12610
|
+
const handleDependencyLineDelete = useCallback10(() => {
|
|
12611
|
+
if (!dependencyLineMenu) return;
|
|
12612
|
+
const successor = tasks.find((task) => task.id === dependencyLineMenu.successorId);
|
|
12613
|
+
if (!successor) return;
|
|
12614
|
+
onTasksChange?.([{
|
|
12615
|
+
...successor,
|
|
12616
|
+
dependencies: (successor.dependencies ?? []).filter((dependency) => !(dependency.taskId === dependencyLineMenu.predecessorId && dependency.type === dependencyLineMenu.linkType))
|
|
12617
|
+
}]);
|
|
12618
|
+
setSelectedChip(null);
|
|
12619
|
+
setDependencyLineMenu(null);
|
|
12620
|
+
}, [dependencyLineMenu, onTasksChange, tasks]);
|
|
12621
|
+
const [activeTimelineTooltip, setActiveTimelineTooltip] = useState12(null);
|
|
12622
|
+
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = useState12(/* @__PURE__ */ new Set());
|
|
12238
12623
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
12239
|
-
const [editingTaskId, setEditingTaskId] =
|
|
12624
|
+
const [editingTaskId, setEditingTaskId] = useState12(null);
|
|
12240
12625
|
const taskDateChangeMode = externalTaskDateChangeMode ?? internalTaskDateChangeMode;
|
|
12241
12626
|
const handleTaskDateChangeMode = externalOnTaskDateChangeModeChange ?? setInternalTaskDateChangeMode;
|
|
12242
12627
|
const resolvedRowContentLines = isPlanFactMode ? Math.max(2, Math.floor(rowContentLines)) : Math.max(1, Math.floor(rowContentLines));
|
|
@@ -12267,8 +12652,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12267
12652
|
() => isPlanFactMode ? getFullMonthDays(dateRangeTasks) : getMultiMonthDays(dateRangeTasks),
|
|
12268
12653
|
[dateRangeTasks, isPlanFactMode]
|
|
12269
12654
|
);
|
|
12270
|
-
const [validationResult, setValidationResult] =
|
|
12271
|
-
const [cascadeOverrides, setCascadeOverrides] =
|
|
12655
|
+
const [validationResult, setValidationResult] = useState12(null);
|
|
12656
|
+
const [cascadeOverrides, setCascadeOverrides] = useState12(/* @__PURE__ */ new Map());
|
|
12272
12657
|
const gridWidth = useMemo13(
|
|
12273
12658
|
() => Math.round(dateRange.length * dayWidth),
|
|
12274
12659
|
[dateRange.length, dayWidth]
|
|
@@ -12486,9 +12871,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12486
12871
|
}
|
|
12487
12872
|
container.scrollTo({ top: scrollTop, behavior });
|
|
12488
12873
|
}, [effectiveRowHeight, tasks, visibleTasks]);
|
|
12489
|
-
const [dragGuideLines, setDragGuideLines] =
|
|
12490
|
-
const [draggedTaskOverride, setDraggedTaskOverride] =
|
|
12491
|
-
const [previewTasksById, setPreviewTasksById] =
|
|
12874
|
+
const [dragGuideLines, setDragGuideLines] = useState12(null);
|
|
12875
|
+
const [draggedTaskOverride, setDraggedTaskOverride] = useState12(null);
|
|
12876
|
+
const [previewTasksById, setPreviewTasksById] = useState12(/* @__PURE__ */ new Map());
|
|
12492
12877
|
useEffect10(() => {
|
|
12493
12878
|
const result = validateDependencies(tasks);
|
|
12494
12879
|
setValidationResult(result);
|
|
@@ -13005,19 +13390,19 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13005
13390
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
13006
13391
|
};
|
|
13007
13392
|
}, []);
|
|
13008
|
-
return /* @__PURE__ */
|
|
13393
|
+
return /* @__PURE__ */ jsx20(
|
|
13009
13394
|
"div",
|
|
13010
13395
|
{
|
|
13011
13396
|
ref: containerRef,
|
|
13012
13397
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
13013
|
-
children: /* @__PURE__ */
|
|
13398
|
+
children: /* @__PURE__ */ jsx20(
|
|
13014
13399
|
"div",
|
|
13015
13400
|
{
|
|
13016
13401
|
ref: scrollContainerRef,
|
|
13017
13402
|
className: "gantt-scrollContainer",
|
|
13018
13403
|
style: { height: containerHeight ?? "auto", cursor: "grab" },
|
|
13019
13404
|
onMouseDown: handlePanStart,
|
|
13020
|
-
children: /* @__PURE__ */
|
|
13405
|
+
children: /* @__PURE__ */ jsxs16(
|
|
13021
13406
|
"div",
|
|
13022
13407
|
{
|
|
13023
13408
|
ref: scrollContentRef,
|
|
@@ -13025,7 +13410,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13025
13410
|
onMouseOver: handleSharedRowHover,
|
|
13026
13411
|
onMouseLeave: clearHoveredRows,
|
|
13027
13412
|
children: [
|
|
13028
|
-
/* @__PURE__ */
|
|
13413
|
+
/* @__PURE__ */ jsx20(
|
|
13029
13414
|
TaskList,
|
|
13030
13415
|
{
|
|
13031
13416
|
tasks: normalizedTasks,
|
|
@@ -13040,7 +13425,10 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13040
13425
|
disableTaskNameEditing,
|
|
13041
13426
|
disableDependencyEditing,
|
|
13042
13427
|
onScrollToTask: scrollToTask,
|
|
13043
|
-
onSelectedChipChange: setSelectedChip
|
|
13428
|
+
onSelectedChipChange: (chip) => setSelectedChip(
|
|
13429
|
+
chip ? { ...chip, linkType: chip.linkType } : null
|
|
13430
|
+
),
|
|
13431
|
+
selectedChip,
|
|
13044
13432
|
onAdd,
|
|
13045
13433
|
onDelete: handleDelete,
|
|
13046
13434
|
onInsertAfter: handleInsertAfter,
|
|
@@ -13048,6 +13436,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13048
13436
|
disableTaskDrag: disableTaskDrag || disableTaskListReorder,
|
|
13049
13437
|
editingTaskId,
|
|
13050
13438
|
enableAddTask,
|
|
13439
|
+
addTaskLabel,
|
|
13051
13440
|
defaultTaskDurationDays,
|
|
13052
13441
|
collapsedParentIds,
|
|
13053
13442
|
onToggleCollapse: handleToggleCollapse,
|
|
@@ -13080,7 +13469,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13080
13469
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13081
13470
|
}
|
|
13082
13471
|
),
|
|
13083
|
-
/* @__PURE__ */
|
|
13472
|
+
/* @__PURE__ */ jsx20(
|
|
13084
13473
|
"div",
|
|
13085
13474
|
{
|
|
13086
13475
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
@@ -13090,7 +13479,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13090
13479
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
13091
13480
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
13092
13481
|
},
|
|
13093
|
-
children: isTableMatrixMode ? /* @__PURE__ */
|
|
13482
|
+
children: isTableMatrixMode ? /* @__PURE__ */ jsx20(
|
|
13094
13483
|
TableMatrix,
|
|
13095
13484
|
{
|
|
13096
13485
|
tasks: visibleTasks,
|
|
@@ -13108,7 +13497,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13108
13497
|
filterMode,
|
|
13109
13498
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13110
13499
|
}
|
|
13111
|
-
) : isPlanFactMode ? /* @__PURE__ */
|
|
13500
|
+
) : isPlanFactMode ? /* @__PURE__ */ jsx20(
|
|
13112
13501
|
PlanFactMatrix,
|
|
13113
13502
|
{
|
|
13114
13503
|
tasks: visibleTasks,
|
|
@@ -13129,14 +13518,14 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13129
13518
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
13130
13519
|
isCustomWeekend
|
|
13131
13520
|
}
|
|
13132
|
-
) : /* @__PURE__ */
|
|
13133
|
-
/* @__PURE__ */
|
|
13521
|
+
) : /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
13522
|
+
/* @__PURE__ */ jsxs16(
|
|
13134
13523
|
"div",
|
|
13135
13524
|
{
|
|
13136
13525
|
className: "gantt-stickyHeader",
|
|
13137
13526
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
13138
13527
|
children: [
|
|
13139
|
-
/* @__PURE__ */
|
|
13528
|
+
/* @__PURE__ */ jsx20(
|
|
13140
13529
|
TimeScaleHeader_default,
|
|
13141
13530
|
{
|
|
13142
13531
|
days: dateRange,
|
|
@@ -13149,7 +13538,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13149
13538
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13150
13539
|
}
|
|
13151
13540
|
),
|
|
13152
|
-
activeTimelineTooltip && /* @__PURE__ */
|
|
13541
|
+
activeTimelineTooltip && /* @__PURE__ */ jsx20("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
|
|
13153
13542
|
"div",
|
|
13154
13543
|
{
|
|
13155
13544
|
className: "gantt-timelineTooltip",
|
|
@@ -13163,7 +13552,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13163
13552
|
]
|
|
13164
13553
|
}
|
|
13165
13554
|
),
|
|
13166
|
-
/* @__PURE__ */
|
|
13555
|
+
/* @__PURE__ */ jsxs16(
|
|
13167
13556
|
"div",
|
|
13168
13557
|
{
|
|
13169
13558
|
className: "gantt-taskArea",
|
|
@@ -13173,7 +13562,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13173
13562
|
height: `${totalGridHeight}px`
|
|
13174
13563
|
},
|
|
13175
13564
|
children: [
|
|
13176
|
-
/* @__PURE__ */
|
|
13565
|
+
/* @__PURE__ */ jsx20(
|
|
13177
13566
|
GridBackground_default,
|
|
13178
13567
|
{
|
|
13179
13568
|
dateRange,
|
|
@@ -13183,7 +13572,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13183
13572
|
isCustomWeekend
|
|
13184
13573
|
}
|
|
13185
13574
|
),
|
|
13186
|
-
todayInRange && /* @__PURE__ */
|
|
13575
|
+
todayInRange && /* @__PURE__ */ jsx20(
|
|
13187
13576
|
TodayIndicator_default,
|
|
13188
13577
|
{
|
|
13189
13578
|
monthStart,
|
|
@@ -13192,7 +13581,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13192
13581
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13193
13582
|
}
|
|
13194
13583
|
),
|
|
13195
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */
|
|
13584
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ jsx20(
|
|
13196
13585
|
TimelineMarkers_default,
|
|
13197
13586
|
{
|
|
13198
13587
|
rangeStart: monthStart,
|
|
@@ -13203,7 +13592,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13203
13592
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13204
13593
|
}
|
|
13205
13594
|
),
|
|
13206
|
-
/* @__PURE__ */
|
|
13595
|
+
/* @__PURE__ */ jsx20(
|
|
13207
13596
|
DependencyLines_default,
|
|
13208
13597
|
{
|
|
13209
13598
|
tasks: renderedDependencyTasks,
|
|
@@ -13218,10 +13607,43 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13218
13607
|
dragOverrides: dependencyOverrides,
|
|
13219
13608
|
selectedDep: selectedChip,
|
|
13220
13609
|
businessDays,
|
|
13221
|
-
weekendPredicate: isCustomWeekend
|
|
13610
|
+
weekendPredicate: isCustomWeekend,
|
|
13611
|
+
onDependencyClick: handleDependencyLineClick
|
|
13612
|
+
}
|
|
13613
|
+
),
|
|
13614
|
+
dependencyLineMenu && /* @__PURE__ */ jsxs16(
|
|
13615
|
+
"div",
|
|
13616
|
+
{
|
|
13617
|
+
className: "gantt-dependencyLineMenu",
|
|
13618
|
+
style: { left: `${dependencyLineMenu.x + 10}px`, top: `${dependencyLineMenu.y}px` },
|
|
13619
|
+
role: "dialog",
|
|
13620
|
+
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
13621
|
+
children: [
|
|
13622
|
+
/* @__PURE__ */ jsx20("span", { className: "gantt-dependencyLineMenuType", children: dependencyLineMenu.linkType === "FS" ? "\u041E\u041D" : dependencyLineMenu.linkType === "SS" ? "\u041D\u041D" : dependencyLineMenu.linkType === "FF" ? "\u041E\u041E" : "\u041D\u041E" }),
|
|
13623
|
+
!disableDependencyEditing && /* @__PURE__ */ jsx20(
|
|
13624
|
+
"button",
|
|
13625
|
+
{
|
|
13626
|
+
type: "button",
|
|
13627
|
+
className: "gantt-dependencyLineMenuDelete",
|
|
13628
|
+
"aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13629
|
+
title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13630
|
+
onClick: handleDependencyLineDelete,
|
|
13631
|
+
children: "\xD7"
|
|
13632
|
+
}
|
|
13633
|
+
)
|
|
13634
|
+
]
|
|
13635
|
+
}
|
|
13636
|
+
),
|
|
13637
|
+
/* @__PURE__ */ jsx20(
|
|
13638
|
+
DependencyCreationOverlay,
|
|
13639
|
+
{
|
|
13640
|
+
drag: dependencyCreationDrag,
|
|
13641
|
+
width: gridWidth,
|
|
13642
|
+
height: totalGridHeight
|
|
13222
13643
|
}
|
|
13223
13644
|
),
|
|
13224
|
-
|
|
13645
|
+
dependencyCreationError && /* @__PURE__ */ jsx20("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
13646
|
+
dragGuideLines && /* @__PURE__ */ jsx20(
|
|
13225
13647
|
DragGuideLines_default,
|
|
13226
13648
|
{
|
|
13227
13649
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -13231,7 +13653,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13231
13653
|
totalHeight: totalGridHeight
|
|
13232
13654
|
}
|
|
13233
13655
|
),
|
|
13234
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */
|
|
13656
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ jsx20(
|
|
13235
13657
|
"div",
|
|
13236
13658
|
{
|
|
13237
13659
|
style: {
|
|
@@ -13241,7 +13663,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13241
13663
|
right: 0,
|
|
13242
13664
|
height: `${effectiveRowHeight}px`
|
|
13243
13665
|
},
|
|
13244
|
-
children: /* @__PURE__ */
|
|
13666
|
+
children: /* @__PURE__ */ jsx20(
|
|
13245
13667
|
TaskRow_default,
|
|
13246
13668
|
{
|
|
13247
13669
|
task,
|
|
@@ -13272,6 +13694,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13272
13694
|
customDays,
|
|
13273
13695
|
isWeekend: isWeekend3,
|
|
13274
13696
|
disableTaskDrag,
|
|
13697
|
+
disableDependencyEditing,
|
|
13698
|
+
onDependencyPortPointerDown: handleDependencyPortPointerDown,
|
|
13699
|
+
isDependencyDragActive: dependencyCreationDrag !== null,
|
|
13275
13700
|
viewMode
|
|
13276
13701
|
}
|
|
13277
13702
|
)
|
|
@@ -13298,7 +13723,7 @@ GanttChart.displayName = "GanttChart";
|
|
|
13298
13723
|
|
|
13299
13724
|
// src/components/ui/Button.tsx
|
|
13300
13725
|
import React17 from "react";
|
|
13301
|
-
import { jsx as
|
|
13726
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
13302
13727
|
var Button = React17.forwardRef(
|
|
13303
13728
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
13304
13729
|
const classes = [
|
|
@@ -13307,7 +13732,7 @@ var Button = React17.forwardRef(
|
|
|
13307
13732
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
13308
13733
|
className || ""
|
|
13309
13734
|
].filter(Boolean).join(" ");
|
|
13310
|
-
return /* @__PURE__ */
|
|
13735
|
+
return /* @__PURE__ */ jsx21("button", { ref, className: classes, ...props, children });
|
|
13311
13736
|
}
|
|
13312
13737
|
);
|
|
13313
13738
|
Button.displayName = "Button";
|