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.js
CHANGED
|
@@ -2980,10 +2980,10 @@ var useTaskDrag = (options) => {
|
|
|
2980
2980
|
// src/components/TaskRow/TaskRow.tsx
|
|
2981
2981
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2982
2982
|
var arePropsEqual = (prevProps, nextProps) => {
|
|
2983
|
-
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;
|
|
2983
|
+
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;
|
|
2984
2984
|
};
|
|
2985
2985
|
var TaskRow = import_react3.default.memo(
|
|
2986
|
-
({ 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" }) => {
|
|
2986
|
+
({ 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" }) => {
|
|
2987
2987
|
const defaultParentBarColor = "#782FC4";
|
|
2988
2988
|
const { divider: taskDivider } = task;
|
|
2989
2989
|
const normalizedTask = (0, import_react3.useMemo)(() => normalizeTaskDatesForType(task), [task]);
|
|
@@ -3215,6 +3215,36 @@ var TaskRow = import_react3.default.memo(
|
|
|
3215
3215
|
]
|
|
3216
3216
|
}
|
|
3217
3217
|
),
|
|
3218
|
+
!disableDependencyEditing && onDependencyPortPointerDown && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3220
|
+
"button",
|
|
3221
|
+
{
|
|
3222
|
+
type: "button",
|
|
3223
|
+
"data-gantt-dependency-port": true,
|
|
3224
|
+
"data-task-id": task.id,
|
|
3225
|
+
"data-port-side": "left",
|
|
3226
|
+
className: `gantt-tr-dependencyPort gantt-tr-dependencyPortLeft ${milestone ? "gantt-tr-dependencyPortMilestone" : ""} ${isParent ? "gantt-tr-dependencyPortParent" : ""} ${isDependencyDragActive ? "gantt-tr-dependencyPortDragActive" : ""}`,
|
|
3227
|
+
style: { left: `${visualLeft - 21}px` },
|
|
3228
|
+
"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}`,
|
|
3229
|
+
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",
|
|
3230
|
+
onPointerDown: (event) => onDependencyPortPointerDown(task.id, "left", event)
|
|
3231
|
+
}
|
|
3232
|
+
),
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3234
|
+
"button",
|
|
3235
|
+
{
|
|
3236
|
+
type: "button",
|
|
3237
|
+
"data-gantt-dependency-port": true,
|
|
3238
|
+
"data-task-id": task.id,
|
|
3239
|
+
"data-port-side": "right",
|
|
3240
|
+
className: `gantt-tr-dependencyPort gantt-tr-dependencyPortRight ${milestone ? "gantt-tr-dependencyPortMilestone" : ""} ${isParent ? "gantt-tr-dependencyPortParent" : ""} ${isDependencyDragActive ? "gantt-tr-dependencyPortDragActive" : ""}`,
|
|
3241
|
+
style: { left: `${visualLeft + visualWidth}px` },
|
|
3242
|
+
"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}`,
|
|
3243
|
+
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",
|
|
3244
|
+
onPointerDown: (event) => onDependencyPortPointerDown(task.id, "right", event)
|
|
3245
|
+
}
|
|
3246
|
+
)
|
|
3247
|
+
] }),
|
|
3218
3248
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3219
3249
|
"div",
|
|
3220
3250
|
{
|
|
@@ -3559,8 +3589,10 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
3559
3589
|
dragOverrides,
|
|
3560
3590
|
selectedDep,
|
|
3561
3591
|
businessDays = true,
|
|
3562
|
-
weekendPredicate
|
|
3592
|
+
weekendPredicate,
|
|
3593
|
+
onDependencyClick
|
|
3563
3594
|
}) => {
|
|
3595
|
+
const [hoveredLineId, setHoveredLineId] = (0, import_react7.useState)(null);
|
|
3564
3596
|
const tasksForPositions = allTasks ?? tasks;
|
|
3565
3597
|
const { taskPositions, taskIndices, hiddenTaskIds } = (0, import_react7.useMemo)(() => {
|
|
3566
3598
|
const positions = /* @__PURE__ */ new Map();
|
|
@@ -3696,6 +3728,9 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
3696
3728
|
const hasCycle = cycleInfo.has(edge.predecessorId) || cycleInfo.has(edge.successorId);
|
|
3697
3729
|
lines2.push({
|
|
3698
3730
|
id: `${edge.predecessorId}-${edge.successorId}-${edge.type}`,
|
|
3731
|
+
predecessorId: edge.predecessorId,
|
|
3732
|
+
successorId: edge.successorId,
|
|
3733
|
+
linkType: edge.type,
|
|
3699
3734
|
path,
|
|
3700
3735
|
hasCycle,
|
|
3701
3736
|
lag: edge.lag,
|
|
@@ -3797,7 +3832,8 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
3797
3832
|
}
|
|
3798
3833
|
)
|
|
3799
3834
|
] }),
|
|
3800
|
-
lines.map(({ id, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
3835
|
+
lines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual }) => {
|
|
3836
|
+
const isHovered = hoveredLineId === id;
|
|
3801
3837
|
const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
|
|
3802
3838
|
let pathClassName = "gantt-dependency-path";
|
|
3803
3839
|
if (isSelected) pathClassName += " gantt-dependency-selected";
|
|
@@ -3809,23 +3845,43 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
3809
3845
|
else markerEnd = "url(#arrowhead)";
|
|
3810
3846
|
const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : "var(--gantt-dependency-line-color, #666666)";
|
|
3811
3847
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react7.default.Fragment, { children: [
|
|
3812
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
{
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
3849
|
+
"g",
|
|
3850
|
+
{
|
|
3851
|
+
className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
|
|
3852
|
+
onPointerEnter: () => setHoveredLineId(id),
|
|
3853
|
+
onPointerLeave: () => setHoveredLineId((current) => current === id ? null : current),
|
|
3854
|
+
onClick: (event) => {
|
|
3855
|
+
event.stopPropagation();
|
|
3856
|
+
onDependencyClick?.({
|
|
3857
|
+
predecessorId,
|
|
3858
|
+
successorId,
|
|
3859
|
+
linkType,
|
|
3860
|
+
x: toX,
|
|
3861
|
+
y: reverseOrder ? fromY - 4 : fromY + 12
|
|
3862
|
+
});
|
|
3863
|
+
},
|
|
3864
|
+
role: "button",
|
|
3865
|
+
"aria-label": `\u0421\u0432\u044F\u0437\u044C ${linkType}`,
|
|
3866
|
+
children: [
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3868
|
+
"path",
|
|
3869
|
+
{
|
|
3870
|
+
d: path,
|
|
3871
|
+
className: "gantt-dependency-hit-area"
|
|
3872
|
+
}
|
|
3873
|
+
),
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3875
|
+
"path",
|
|
3876
|
+
{
|
|
3877
|
+
d: path,
|
|
3878
|
+
className: pathClassName,
|
|
3879
|
+
markerEnd
|
|
3880
|
+
}
|
|
3881
|
+
)
|
|
3882
|
+
]
|
|
3883
|
+
}
|
|
3884
|
+
),
|
|
3829
3885
|
lag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3830
3886
|
"text",
|
|
3831
3887
|
{
|
|
@@ -3847,6 +3903,62 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
3847
3903
|
DependencyLines.displayName = "DependencyLines";
|
|
3848
3904
|
var DependencyLines_default = DependencyLines;
|
|
3849
3905
|
|
|
3906
|
+
// src/components/DependencyCreationOverlay/DependencyCreationOverlay.tsx
|
|
3907
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3908
|
+
var LINK_TYPE_LABELS_RU = {
|
|
3909
|
+
FS: "\u041E\u041D",
|
|
3910
|
+
SS: "\u041D\u041D",
|
|
3911
|
+
FF: "\u041E\u041E",
|
|
3912
|
+
SF: "\u041D\u041E"
|
|
3913
|
+
};
|
|
3914
|
+
function getPath(drag) {
|
|
3915
|
+
const from = drag.source;
|
|
3916
|
+
const to = drag.current;
|
|
3917
|
+
const direction = to.y >= from.y ? 1 : -1;
|
|
3918
|
+
const bend = Math.max(18, Math.abs(to.y - from.y) * 0.45);
|
|
3919
|
+
const middleX = Math.round((from.x + to.x) / 2);
|
|
3920
|
+
if (Math.abs(to.y - from.y) < 2) {
|
|
3921
|
+
return `M ${Math.round(from.x)} ${Math.round(from.y)} H ${Math.round(to.x)}`;
|
|
3922
|
+
}
|
|
3923
|
+
return [
|
|
3924
|
+
`M ${Math.round(from.x)} ${Math.round(from.y)}`,
|
|
3925
|
+
`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)}`
|
|
3926
|
+
].join(" ");
|
|
3927
|
+
}
|
|
3928
|
+
var DependencyCreationOverlay = ({ drag, width, height }) => {
|
|
3929
|
+
if (!drag) return null;
|
|
3930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
3931
|
+
"svg",
|
|
3932
|
+
{
|
|
3933
|
+
className: "gantt-dependencyCreation-svg",
|
|
3934
|
+
"data-testid": "dependency-creation-preview",
|
|
3935
|
+
width,
|
|
3936
|
+
height,
|
|
3937
|
+
"aria-hidden": "true",
|
|
3938
|
+
children: [
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3940
|
+
"path",
|
|
3941
|
+
{
|
|
3942
|
+
className: `gantt-dependencyCreation-path ${drag.target ? "gantt-dependencyCreation-pathTargeted" : ""}`,
|
|
3943
|
+
d: getPath(drag)
|
|
3944
|
+
}
|
|
3945
|
+
),
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { className: "gantt-dependencyCreation-source", cx: drag.source.x, cy: drag.source.y, r: "4" }),
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3948
|
+
"circle",
|
|
3949
|
+
{
|
|
3950
|
+
className: `gantt-dependencyCreation-target ${drag.target ? "gantt-dependencyCreation-targetValid" : ""}`,
|
|
3951
|
+
cx: drag.current.x,
|
|
3952
|
+
cy: drag.current.y,
|
|
3953
|
+
r: "5"
|
|
3954
|
+
}
|
|
3955
|
+
),
|
|
3956
|
+
drag.linkType && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("text", { className: "gantt-dependencyCreation-label", x: drag.current.x + 10, y: drag.current.y - 10, children: LINK_TYPE_LABELS_RU[drag.linkType] ?? drag.linkType })
|
|
3957
|
+
]
|
|
3958
|
+
}
|
|
3959
|
+
);
|
|
3960
|
+
};
|
|
3961
|
+
|
|
3850
3962
|
// src/components/TaskList/TaskList.tsx
|
|
3851
3963
|
var import_react13 = __toESM(require("react"));
|
|
3852
3964
|
|
|
@@ -4019,9 +4131,9 @@ function getVisibleReorderPlan(orderedTasks, visibleTasks, movedTaskId, target)
|
|
|
4019
4131
|
|
|
4020
4132
|
// src/components/ui/Popover.tsx
|
|
4021
4133
|
var RadixPopover = __toESM(require("@radix-ui/react-popover"));
|
|
4022
|
-
var
|
|
4134
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
4023
4135
|
var Popover = ({ open, onOpenChange, children }) => {
|
|
4024
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RadixPopover.Root, { open, onOpenChange, children });
|
|
4025
4137
|
};
|
|
4026
4138
|
var PopoverTrigger = RadixPopover.Trigger;
|
|
4027
4139
|
var PopoverContent = ({
|
|
@@ -4033,7 +4145,7 @@ var PopoverContent = ({
|
|
|
4033
4145
|
collisionPadding = 8,
|
|
4034
4146
|
onInteractOutside
|
|
4035
4147
|
}) => {
|
|
4036
|
-
const content = /* @__PURE__ */ (0,
|
|
4148
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4037
4149
|
RadixPopover.Content,
|
|
4038
4150
|
{
|
|
4039
4151
|
className: `gantt-popover${className ? ` ${className}` : ""}`,
|
|
@@ -4046,7 +4158,7 @@ var PopoverContent = ({
|
|
|
4046
4158
|
}
|
|
4047
4159
|
);
|
|
4048
4160
|
if (portal) {
|
|
4049
|
-
return /* @__PURE__ */ (0,
|
|
4161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RadixPopover.Portal, { children: content });
|
|
4050
4162
|
}
|
|
4051
4163
|
return content;
|
|
4052
4164
|
};
|
|
@@ -4056,10 +4168,10 @@ var import_react11 = __toESM(require("react"));
|
|
|
4056
4168
|
|
|
4057
4169
|
// src/components/ui/Input.tsx
|
|
4058
4170
|
var import_react8 = __toESM(require("react"));
|
|
4059
|
-
var
|
|
4171
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
4060
4172
|
var Input = import_react8.default.forwardRef(
|
|
4061
4173
|
({ className, ...props }, ref) => {
|
|
4062
|
-
return /* @__PURE__ */ (0,
|
|
4174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
4063
4175
|
"input",
|
|
4064
4176
|
{
|
|
4065
4177
|
ref,
|
|
@@ -4079,7 +4191,7 @@ var import_date_fns3 = require("date-fns");
|
|
|
4079
4191
|
var import_react9 = require("react");
|
|
4080
4192
|
var import_date_fns2 = require("date-fns");
|
|
4081
4193
|
var import_locale2 = require("date-fns/locale");
|
|
4082
|
-
var
|
|
4194
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4083
4195
|
function getDayClassName(day, selected, isWeekendProp) {
|
|
4084
4196
|
const classes = ["gantt-day-btn"];
|
|
4085
4197
|
if (selected && (0, import_date_fns2.isSameDay)(day, selected)) classes.push("selected");
|
|
@@ -4151,13 +4263,13 @@ var Calendar = ({
|
|
|
4151
4263
|
const monthKey = (0, import_date_fns2.format)(month, "yyyy-MM");
|
|
4152
4264
|
const monthLabel = (0, import_date_fns2.format)(month, "LLLL yyyy", { locale: import_locale2.ru });
|
|
4153
4265
|
const weekdayLabels = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
4154
|
-
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */ (0,
|
|
4155
|
-
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */ (0,
|
|
4266
|
+
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "gantt-cal-weekday", children: label }, `wd-${i}`));
|
|
4267
|
+
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "gantt-cal-empty-day" }, `e-${i}`));
|
|
4156
4268
|
const dayCells = Array.from({ length: totalDays }, (_, i) => {
|
|
4157
4269
|
const dayNum = i + 1;
|
|
4158
4270
|
const day = new Date(Date.UTC(month.getFullYear(), month.getMonth(), dayNum));
|
|
4159
4271
|
const className = getDayClassName(day, selected, isWeekendProp);
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4161
4273
|
"button",
|
|
4162
4274
|
{
|
|
4163
4275
|
type: "button",
|
|
@@ -4173,9 +4285,9 @@ var Calendar = ({
|
|
|
4173
4285
|
dayNum
|
|
4174
4286
|
);
|
|
4175
4287
|
});
|
|
4176
|
-
return /* @__PURE__ */ (0,
|
|
4177
|
-
/* @__PURE__ */ (0,
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "gantt-cal-month", "data-month": monthKey, children: [
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "gantt-cal-month-header", children: monthLabel }),
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "gantt-cal-month-days", children: [
|
|
4179
4291
|
weekdayHeaders,
|
|
4180
4292
|
emptyCells,
|
|
4181
4293
|
dayCells
|
|
@@ -4188,12 +4300,12 @@ var Calendar = ({
|
|
|
4188
4300
|
() => months.map(renderMonth),
|
|
4189
4301
|
[months, renderMonth]
|
|
4190
4302
|
);
|
|
4191
|
-
return /* @__PURE__ */ (0,
|
|
4303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref: scrollRef, className: "gantt-cal-container", children: renderedMonths });
|
|
4192
4304
|
};
|
|
4193
4305
|
Calendar.displayName = "Calendar";
|
|
4194
4306
|
|
|
4195
4307
|
// src/components/ui/DatePicker.tsx
|
|
4196
|
-
var
|
|
4308
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4197
4309
|
var segments = [
|
|
4198
4310
|
{ start: 0, end: 2, label: "day", max: 31 },
|
|
4199
4311
|
{ start: 3, end: 5, label: "month", max: 12 },
|
|
@@ -4460,8 +4572,8 @@ var DatePicker = ({
|
|
|
4460
4572
|
}
|
|
4461
4573
|
setOpen(nextOpen);
|
|
4462
4574
|
}, [commitDate, open]);
|
|
4463
|
-
return /* @__PURE__ */ (0,
|
|
4464
|
-
/* @__PURE__ */ (0,
|
|
4575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Popover, { open, onOpenChange: disabled ? void 0 : handleOpenChange, children: [
|
|
4576
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4465
4577
|
"button",
|
|
4466
4578
|
{
|
|
4467
4579
|
type: "button",
|
|
@@ -4474,17 +4586,17 @@ var DatePicker = ({
|
|
|
4474
4586
|
children: displayValue
|
|
4475
4587
|
}
|
|
4476
4588
|
) }),
|
|
4477
|
-
/* @__PURE__ */ (0,
|
|
4589
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
4478
4590
|
PopoverContent,
|
|
4479
4591
|
{
|
|
4480
4592
|
portal,
|
|
4481
4593
|
align: "start",
|
|
4482
4594
|
side: "bottom",
|
|
4483
4595
|
children: [
|
|
4484
|
-
/* @__PURE__ */ (0,
|
|
4485
|
-
/* @__PURE__ */ (0,
|
|
4486
|
-
/* @__PURE__ */ (0,
|
|
4487
|
-
/* @__PURE__ */ (0,
|
|
4596
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "gantt-datepicker-input-row", children: [
|
|
4597
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-7), tabIndex: -1, children: "-7" }),
|
|
4598
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-1), tabIndex: -1, children: "-1" }),
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4488
4600
|
"input",
|
|
4489
4601
|
{
|
|
4490
4602
|
ref: dateInputRef,
|
|
@@ -4503,10 +4615,10 @@ var DatePicker = ({
|
|
|
4503
4615
|
autoComplete: "off"
|
|
4504
4616
|
}
|
|
4505
4617
|
),
|
|
4506
|
-
/* @__PURE__ */ (0,
|
|
4507
|
-
/* @__PURE__ */ (0,
|
|
4618
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(1), tabIndex: -1, children: "+1" }),
|
|
4619
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(7), tabIndex: -1, children: "+7" })
|
|
4508
4620
|
] }),
|
|
4509
|
-
/* @__PURE__ */ (0,
|
|
4621
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4510
4622
|
Calendar,
|
|
4511
4623
|
{
|
|
4512
4624
|
mode: "single",
|
|
@@ -4516,7 +4628,7 @@ var DatePicker = ({
|
|
|
4516
4628
|
isWeekend: isWeekend3
|
|
4517
4629
|
}
|
|
4518
4630
|
),
|
|
4519
|
-
footer ? /* @__PURE__ */ (0,
|
|
4631
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "gantt-datepicker-footer", children: footer }) : null
|
|
4520
4632
|
]
|
|
4521
4633
|
}
|
|
4522
4634
|
)
|
|
@@ -4525,24 +4637,24 @@ var DatePicker = ({
|
|
|
4525
4637
|
DatePicker.displayName = "DatePicker";
|
|
4526
4638
|
|
|
4527
4639
|
// src/components/TaskList/DepIcons.tsx
|
|
4528
|
-
var
|
|
4529
|
-
var DepIconFS = () => /* @__PURE__ */ (0,
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4531
|
-
/* @__PURE__ */ (0,
|
|
4640
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4641
|
+
var DepIconFS = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("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: [
|
|
4642
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "m10 15 5 5 5-5" }),
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M4 4h7a4 4 0 0 1 4 4v12" })
|
|
4532
4644
|
] });
|
|
4533
|
-
var DepIconSS = () => /* @__PURE__ */ (0,
|
|
4534
|
-
/* @__PURE__ */ (0,
|
|
4535
|
-
/* @__PURE__ */ (0,
|
|
4536
|
-
/* @__PURE__ */ (0,
|
|
4645
|
+
var DepIconSS = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("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: [
|
|
4646
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M3 5v14" }),
|
|
4647
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M21 12H7" }),
|
|
4648
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "m15 18 6-6-6-6" })
|
|
4537
4649
|
] });
|
|
4538
|
-
var DepIconFF = () => /* @__PURE__ */ (0,
|
|
4539
|
-
/* @__PURE__ */ (0,
|
|
4540
|
-
/* @__PURE__ */ (0,
|
|
4541
|
-
/* @__PURE__ */ (0,
|
|
4650
|
+
var DepIconFF = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("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: [
|
|
4651
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M17 12H3" }),
|
|
4652
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "m11 18 6-6-6-6" }),
|
|
4653
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M21 5v14" })
|
|
4542
4654
|
] });
|
|
4543
|
-
var DepIconSF = () => /* @__PURE__ */ (0,
|
|
4544
|
-
/* @__PURE__ */ (0,
|
|
4545
|
-
/* @__PURE__ */ (0,
|
|
4655
|
+
var DepIconSF = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("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: [
|
|
4656
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "m14 15-5 5-5-5" }),
|
|
4657
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M20 4h-7a4 4 0 0 0-4 4v12" })
|
|
4546
4658
|
] });
|
|
4547
4659
|
var LINK_TYPE_ICONS = {
|
|
4548
4660
|
FS: DepIconFS,
|
|
@@ -4551,10 +4663,10 @@ var LINK_TYPE_ICONS = {
|
|
|
4551
4663
|
SF: DepIconSF
|
|
4552
4664
|
};
|
|
4553
4665
|
var LINK_TYPE_LABELS = {
|
|
4554
|
-
FS: "\u041E\
|
|
4555
|
-
SS: "\u041D\
|
|
4556
|
-
FF: "\u041E\
|
|
4557
|
-
SF: "\u041D\
|
|
4666
|
+
FS: "\u041E\u041D",
|
|
4667
|
+
SS: "\u041D\u041D",
|
|
4668
|
+
FF: "\u041E\u041E",
|
|
4669
|
+
SF: "\u041D\u041E"
|
|
4558
4670
|
};
|
|
4559
4671
|
|
|
4560
4672
|
// src/components/TaskList/defaultTaskDates.ts
|
|
@@ -4592,7 +4704,7 @@ function buildDefaultTaskDateRange(startDate, {
|
|
|
4592
4704
|
}
|
|
4593
4705
|
|
|
4594
4706
|
// src/components/TaskList/TaskListRow.tsx
|
|
4595
|
-
var
|
|
4707
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4596
4708
|
var DAY_MS3 = 24 * 60 * 60 * 1e3;
|
|
4597
4709
|
var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
|
|
4598
4710
|
var getInclusiveDurationDays = (startDate, endDate) => {
|
|
@@ -4607,7 +4719,7 @@ var getEndDateFromDuration = (startDate, durationDays) => {
|
|
|
4607
4719
|
const start = parseUTCDate(startDate);
|
|
4608
4720
|
return new Date(start.getTime() + (durationDays - 1) * DAY_MS3).toISOString().split("T")[0];
|
|
4609
4721
|
};
|
|
4610
|
-
var TrashIcon = () => /* @__PURE__ */ (0,
|
|
4722
|
+
var TrashIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4611
4723
|
"svg",
|
|
4612
4724
|
{
|
|
4613
4725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4620,13 +4732,13 @@ var TrashIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4620
4732
|
strokeLinecap: "round",
|
|
4621
4733
|
strokeLinejoin: "round",
|
|
4622
4734
|
children: [
|
|
4623
|
-
/* @__PURE__ */ (0,
|
|
4624
|
-
/* @__PURE__ */ (0,
|
|
4625
|
-
/* @__PURE__ */ (0,
|
|
4735
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
4736
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M3 6h18" }),
|
|
4737
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
4626
4738
|
]
|
|
4627
4739
|
}
|
|
4628
4740
|
);
|
|
4629
|
-
var PlusIcon = () => /* @__PURE__ */ (0,
|
|
4741
|
+
var PlusIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4630
4742
|
"svg",
|
|
4631
4743
|
{
|
|
4632
4744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4638,18 +4750,37 @@ var PlusIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
|
4638
4750
|
strokeWidth: "2",
|
|
4639
4751
|
strokeLinecap: "round",
|
|
4640
4752
|
strokeLinejoin: "round",
|
|
4641
|
-
children: /* @__PURE__ */ (0,
|
|
4753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M12 5v14M5 12h14" })
|
|
4642
4754
|
}
|
|
4643
4755
|
);
|
|
4644
|
-
var
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4756
|
+
var DepEditIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4757
|
+
"svg",
|
|
4758
|
+
{
|
|
4759
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4760
|
+
width: "16",
|
|
4761
|
+
height: "16",
|
|
4762
|
+
viewBox: "0 0 24 24",
|
|
4763
|
+
fill: "none",
|
|
4764
|
+
stroke: "currentColor",
|
|
4765
|
+
strokeWidth: "2",
|
|
4766
|
+
strokeLinecap: "round",
|
|
4767
|
+
strokeLinejoin: "round",
|
|
4768
|
+
"aria-hidden": "true",
|
|
4769
|
+
children: [
|
|
4770
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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" }),
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m15 5 4 4" })
|
|
4772
|
+
]
|
|
4773
|
+
}
|
|
4774
|
+
);
|
|
4775
|
+
var DragHandleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { width: "10", height: "14", viewBox: "0 0 10 14", fill: "currentColor", children: [
|
|
4776
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "2", cy: "2", r: "1.5" }),
|
|
4777
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "8", cy: "2", r: "1.5" }),
|
|
4778
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "2", cy: "7", r: "1.5" }),
|
|
4779
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "8", cy: "7", r: "1.5" }),
|
|
4780
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "2", cy: "12", r: "1.5" }),
|
|
4781
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "8", cy: "12", r: "1.5" })
|
|
4651
4782
|
] });
|
|
4652
|
-
var VerticalDotsIcon = () => /* @__PURE__ */ (0,
|
|
4783
|
+
var VerticalDotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4653
4784
|
"svg",
|
|
4654
4785
|
{
|
|
4655
4786
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4658,13 +4789,13 @@ var VerticalDotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4658
4789
|
viewBox: "0 0 24 24",
|
|
4659
4790
|
fill: "currentColor",
|
|
4660
4791
|
children: [
|
|
4661
|
-
/* @__PURE__ */ (0,
|
|
4662
|
-
/* @__PURE__ */ (0,
|
|
4663
|
-
/* @__PURE__ */ (0,
|
|
4792
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "12", cy: "5", r: "2" }),
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "12", cy: "12", r: "2" }),
|
|
4794
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "12", cy: "19", r: "2" })
|
|
4664
4795
|
]
|
|
4665
4796
|
}
|
|
4666
4797
|
);
|
|
4667
|
-
var CopyIcon = () => /* @__PURE__ */ (0,
|
|
4798
|
+
var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4668
4799
|
"svg",
|
|
4669
4800
|
{
|
|
4670
4801
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4677,12 +4808,12 @@ var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4677
4808
|
strokeLinecap: "round",
|
|
4678
4809
|
strokeLinejoin: "round",
|
|
4679
4810
|
children: [
|
|
4680
|
-
/* @__PURE__ */ (0,
|
|
4681
|
-
/* @__PURE__ */ (0,
|
|
4811
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
4812
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
4682
4813
|
]
|
|
4683
4814
|
}
|
|
4684
4815
|
);
|
|
4685
|
-
var UngroupIcon = () => /* @__PURE__ */ (0,
|
|
4816
|
+
var UngroupIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4686
4817
|
"svg",
|
|
4687
4818
|
{
|
|
4688
4819
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4695,10 +4826,10 @@ var UngroupIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4695
4826
|
strokeLinecap: "round",
|
|
4696
4827
|
strokeLinejoin: "round",
|
|
4697
4828
|
children: [
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4699
|
-
/* @__PURE__ */ (0,
|
|
4700
|
-
/* @__PURE__ */ (0,
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4829
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M3 12h10" }),
|
|
4830
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m6 9-3 3 3 3" }),
|
|
4831
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M13 6h8" }),
|
|
4832
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M13 18h8" })
|
|
4702
4833
|
]
|
|
4703
4834
|
}
|
|
4704
4835
|
);
|
|
@@ -4725,7 +4856,7 @@ var TASK_COLOR_PALETTE = [
|
|
|
4725
4856
|
// { label: "Океан2", value: "#0626ba" },
|
|
4726
4857
|
// { label: "Виноград", value: "#AE3EC9" },
|
|
4727
4858
|
];
|
|
4728
|
-
var ChevronRightIcon = () => /* @__PURE__ */ (0,
|
|
4859
|
+
var ChevronRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4729
4860
|
"svg",
|
|
4730
4861
|
{
|
|
4731
4862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4737,10 +4868,10 @@ var ChevronRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
|
4737
4868
|
strokeWidth: "2",
|
|
4738
4869
|
strokeLinecap: "round",
|
|
4739
4870
|
strokeLinejoin: "round",
|
|
4740
|
-
children: /* @__PURE__ */ (0,
|
|
4871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m9 18 6-6-6-6" })
|
|
4741
4872
|
}
|
|
4742
4873
|
);
|
|
4743
|
-
var
|
|
4874
|
+
var LINK_TYPE_LABELS_RU2 = {
|
|
4744
4875
|
FS: "\u041E\u041D",
|
|
4745
4876
|
SS: "\u041D\u041D",
|
|
4746
4877
|
FF: "\u041E\u041E",
|
|
@@ -4749,7 +4880,7 @@ var LINK_TYPE_LABELS_RU = {
|
|
|
4749
4880
|
function formatTaskNumberLabel(taskNumber) {
|
|
4750
4881
|
return taskNumber ? `${taskNumber}. ` : "";
|
|
4751
4882
|
}
|
|
4752
|
-
var ArrowLeft = () => /* @__PURE__ */ (0,
|
|
4883
|
+
var ArrowLeft = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4753
4884
|
"svg",
|
|
4754
4885
|
{
|
|
4755
4886
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4762,12 +4893,12 @@ var ArrowLeft = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4762
4893
|
strokeLinecap: "round",
|
|
4763
4894
|
strokeLinejoin: "round",
|
|
4764
4895
|
children: [
|
|
4765
|
-
/* @__PURE__ */ (0,
|
|
4766
|
-
/* @__PURE__ */ (0,
|
|
4896
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m12 19-7-7 7-7" }),
|
|
4897
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M19 12H5" })
|
|
4767
4898
|
]
|
|
4768
4899
|
}
|
|
4769
4900
|
);
|
|
4770
|
-
var ArrowRight = () => /* @__PURE__ */ (0,
|
|
4901
|
+
var ArrowRight = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4771
4902
|
"svg",
|
|
4772
4903
|
{
|
|
4773
4904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4780,8 +4911,8 @@ var ArrowRight = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
|
4780
4911
|
strokeLinecap: "round",
|
|
4781
4912
|
strokeLinejoin: "round",
|
|
4782
4913
|
children: [
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
4784
|
-
/* @__PURE__ */ (0,
|
|
4914
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M5 12h14" }),
|
|
4915
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m12 5 7 7-7 7" })
|
|
4785
4916
|
]
|
|
4786
4917
|
}
|
|
4787
4918
|
);
|
|
@@ -4795,8 +4926,8 @@ var HierarchyButton = ({
|
|
|
4795
4926
|
const canPromote = isChild && onPromote;
|
|
4796
4927
|
const showDemote = canDemote && !!onDemote;
|
|
4797
4928
|
if (!canPromote && !showDemote) return null;
|
|
4798
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
-
canPromote && /* @__PURE__ */ (0,
|
|
4929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
4930
|
+
canPromote && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4800
4931
|
"button",
|
|
4801
4932
|
{
|
|
4802
4933
|
type: "button",
|
|
@@ -4806,10 +4937,10 @@ var HierarchyButton = ({
|
|
|
4806
4937
|
onPromote(e);
|
|
4807
4938
|
},
|
|
4808
4939
|
title: "\u041F\u043E\u0432\u044B\u0441\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
4809
|
-
children: /* @__PURE__ */ (0,
|
|
4940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowLeft, {})
|
|
4810
4941
|
}
|
|
4811
4942
|
),
|
|
4812
|
-
showDemote && /* @__PURE__ */ (0,
|
|
4943
|
+
showDemote && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4813
4944
|
"button",
|
|
4814
4945
|
{
|
|
4815
4946
|
type: "button",
|
|
@@ -4819,7 +4950,7 @@ var HierarchyButton = ({
|
|
|
4819
4950
|
onDemote(e);
|
|
4820
4951
|
},
|
|
4821
4952
|
title: "\u041F\u043E\u043D\u0438\u0437\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
4822
|
-
children: /* @__PURE__ */ (0,
|
|
4953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowRight, {})
|
|
4823
4954
|
}
|
|
4824
4955
|
)
|
|
4825
4956
|
] });
|
|
@@ -4855,9 +4986,7 @@ var DepChip = ({
|
|
|
4855
4986
|
const handleClick = (e) => {
|
|
4856
4987
|
e.stopPropagation();
|
|
4857
4988
|
if (disableDependencyEditing) return;
|
|
4858
|
-
|
|
4859
|
-
setPopoverOpen(nextOpen);
|
|
4860
|
-
if (nextOpen) {
|
|
4989
|
+
if (!isSelected) {
|
|
4861
4990
|
onChipSelect?.({
|
|
4862
4991
|
successorId: taskId,
|
|
4863
4992
|
predecessorId: dep.taskId,
|
|
@@ -4989,44 +5118,71 @@ var DepChip = ({
|
|
|
4989
5118
|
afterWhat = "\u043F\u043E\u0441\u043B\u0435 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F";
|
|
4990
5119
|
}
|
|
4991
5120
|
}
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
4993
|
-
/* @__PURE__ */ (0,
|
|
5121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open: popoverOpen, onOpenChange: handleOpenChange, children: [
|
|
5122
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4994
5123
|
"span",
|
|
4995
5124
|
{
|
|
4996
|
-
className: `gantt-tl-dep-chip-
|
|
4997
|
-
onClick: handleClick,
|
|
4998
|
-
"aria-label": `[${LINK_TYPE_LABELS_RU[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
5125
|
+
className: `gantt-tl-dep-chip-control${isSelected ? " gantt-tl-dep-chip-control-selected" : ""}`,
|
|
4999
5126
|
children: [
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5127
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5128
|
+
"span",
|
|
5129
|
+
{
|
|
5130
|
+
className: `gantt-tl-dep-chip-with-number${isSelected ? " gantt-tl-dep-chip-with-number-selected" : ""}`,
|
|
5131
|
+
onClick: handleClick,
|
|
5132
|
+
role: "button",
|
|
5133
|
+
tabIndex: 0,
|
|
5134
|
+
onKeyDown: (e) => {
|
|
5135
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
5136
|
+
e.preventDefault();
|
|
5137
|
+
handleClick(e);
|
|
5138
|
+
}
|
|
5139
|
+
},
|
|
5140
|
+
"aria-label": `[${LINK_TYPE_LABELS_RU2[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
5141
|
+
children: [
|
|
5142
|
+
predecessorTaskNumber && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-dep-chip-task-number", children: predecessorTaskNumber }),
|
|
5143
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-dep-chip", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, {}) }),
|
|
5144
|
+
effectiveLag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-dep-chip-lag", children: effectiveLag > 0 ? `+${effectiveLag}` : `${effectiveLag}` }),
|
|
5145
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "gantt-tl-dep-chip-tooltip", role: "tooltip", children: [
|
|
5146
|
+
"[",
|
|
5147
|
+
LINK_TYPE_LABELS_RU2[dep.type],
|
|
5148
|
+
"] ",
|
|
5149
|
+
formatTaskNumberLabel(predecessorTaskNumber),
|
|
5150
|
+
depName
|
|
5151
|
+
] })
|
|
5152
|
+
]
|
|
5153
|
+
}
|
|
5154
|
+
),
|
|
5155
|
+
isSelected && !disableDependencyEditing && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5156
|
+
"button",
|
|
5157
|
+
{
|
|
5158
|
+
type: "button",
|
|
5159
|
+
className: "gantt-tl-dep-expand",
|
|
5160
|
+
"aria-label": "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
5161
|
+
title: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
5162
|
+
onClick: (e) => e.stopPropagation(),
|
|
5163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DepEditIcon, {})
|
|
5164
|
+
}
|
|
5165
|
+
) })
|
|
5010
5166
|
]
|
|
5011
5167
|
}
|
|
5012
|
-
)
|
|
5013
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
),
|
|
5169
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5014
5170
|
PopoverContent,
|
|
5015
5171
|
{
|
|
5016
5172
|
className: "gantt-tl-dep-edit-popover",
|
|
5017
5173
|
portal: true,
|
|
5018
5174
|
align: "start",
|
|
5019
|
-
children: /* @__PURE__ */ (0,
|
|
5020
|
-
/* @__PURE__ */ (0,
|
|
5175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { onClick: (e) => e.stopPropagation(), children: [
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-dep-edit-task", children: [
|
|
5021
5177
|
formatTaskNumberLabel(taskNumber),
|
|
5022
5178
|
task.name
|
|
5023
5179
|
] }),
|
|
5024
|
-
/* @__PURE__ */ (0,
|
|
5025
|
-
/* @__PURE__ */ (0,
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-dep-edit-row", children: [
|
|
5181
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "gantt-tl-dep-edit-label", children: [
|
|
5026
5182
|
actionVerb,
|
|
5027
5183
|
preWord ? ` ${preWord}` : ""
|
|
5028
5184
|
] }),
|
|
5029
|
-
/* @__PURE__ */ (0,
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5030
5186
|
"button",
|
|
5031
5187
|
{
|
|
5032
5188
|
type: "button",
|
|
@@ -5035,7 +5191,7 @@ var DepChip = ({
|
|
|
5035
5191
|
children: "\u2212"
|
|
5036
5192
|
}
|
|
5037
5193
|
),
|
|
5038
|
-
/* @__PURE__ */ (0,
|
|
5194
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5039
5195
|
"input",
|
|
5040
5196
|
{
|
|
5041
5197
|
type: "number",
|
|
@@ -5051,7 +5207,7 @@ var DepChip = ({
|
|
|
5051
5207
|
}
|
|
5052
5208
|
}
|
|
5053
5209
|
),
|
|
5054
|
-
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */ (0,
|
|
5210
|
+
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5055
5211
|
"button",
|
|
5056
5212
|
{
|
|
5057
5213
|
type: "button",
|
|
@@ -5060,17 +5216,17 @@ var DepChip = ({
|
|
|
5060
5216
|
children: "+"
|
|
5061
5217
|
}
|
|
5062
5218
|
),
|
|
5063
|
-
effectiveLag !== 0 && /* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5219
|
+
effectiveLag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u0434." }),
|
|
5220
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: afterWhat })
|
|
5065
5221
|
] }),
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5222
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-dep-edit-pred", children: [
|
|
5067
5223
|
formatTaskNumberLabel(predecessorTaskNumber),
|
|
5068
5224
|
depName
|
|
5069
5225
|
] }),
|
|
5070
|
-
!disableDependencyEditing && /* @__PURE__ */ (0,
|
|
5071
|
-
/* @__PURE__ */ (0,
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5226
|
+
!disableDependencyEditing && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
5227
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { className: "gantt-tl-dep-edit-divider" }),
|
|
5228
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-dep-edit-actions", children: [
|
|
5229
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5074
5230
|
"button",
|
|
5075
5231
|
{
|
|
5076
5232
|
type: "button",
|
|
@@ -5082,7 +5238,7 @@ var DepChip = ({
|
|
|
5082
5238
|
children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C"
|
|
5083
5239
|
}
|
|
5084
5240
|
),
|
|
5085
|
-
/* @__PURE__ */ (0,
|
|
5241
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5086
5242
|
"button",
|
|
5087
5243
|
{
|
|
5088
5244
|
type: "button",
|
|
@@ -5731,8 +5887,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5731
5887
|
},
|
|
5732
5888
|
[task, onTasksChange, businessDays, getDuration, weekendPredicate, allTasks, isMilestone, emitMilestoneDateChange, taskDateChangeMode]
|
|
5733
5889
|
);
|
|
5734
|
-
const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */ (0,
|
|
5735
|
-
/* @__PURE__ */ (0,
|
|
5890
|
+
const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "gantt-datepicker-mode-checkbox", children: [
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5736
5892
|
"input",
|
|
5737
5893
|
{
|
|
5738
5894
|
type: "checkbox",
|
|
@@ -5740,7 +5896,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5740
5896
|
onChange: (event) => onTaskDateChangeModeChange(event.target.checked ? "preserve-duration" : "free")
|
|
5741
5897
|
}
|
|
5742
5898
|
),
|
|
5743
|
-
/* @__PURE__ */ (0,
|
|
5899
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C" })
|
|
5744
5900
|
] }) : null;
|
|
5745
5901
|
const handleRowClickInternal = (0, import_react11.useCallback)(() => {
|
|
5746
5902
|
onRowClick?.(task.id);
|
|
@@ -5891,14 +6047,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5891
6047
|
},
|
|
5892
6048
|
[allTasks, dependencyPickMode, onRemoveDependency, task.dependencies, task.id]
|
|
5893
6049
|
);
|
|
5894
|
-
const sourcePickerContent = /* @__PURE__ */ (0,
|
|
6050
|
+
const sourcePickerContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5895
6051
|
"div",
|
|
5896
6052
|
{
|
|
5897
6053
|
className: "gantt-tl-dep-source-picker",
|
|
5898
6054
|
onClick: (e) => e.stopPropagation(),
|
|
5899
6055
|
children: [
|
|
5900
|
-
/* @__PURE__ */ (0,
|
|
5901
|
-
/* @__PURE__ */ (0,
|
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-dep-source-direction", children: [
|
|
6057
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5902
6058
|
"button",
|
|
5903
6059
|
{
|
|
5904
6060
|
type: "button",
|
|
@@ -5907,7 +6063,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5907
6063
|
children: "\u041F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C"
|
|
5908
6064
|
}
|
|
5909
6065
|
),
|
|
5910
|
-
/* @__PURE__ */ (0,
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5911
6067
|
"button",
|
|
5912
6068
|
{
|
|
5913
6069
|
type: "button",
|
|
@@ -5917,9 +6073,9 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5917
6073
|
}
|
|
5918
6074
|
)
|
|
5919
6075
|
] }),
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "gantt-tl-dep-source-types", children: LINK_TYPE_ORDER.map((linkType) => {
|
|
5921
6077
|
const Icon = LINK_TYPE_ICONS[linkType];
|
|
5922
|
-
return /* @__PURE__ */ (0,
|
|
6078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5923
6079
|
"button",
|
|
5924
6080
|
{
|
|
5925
6081
|
type: "button",
|
|
@@ -5928,14 +6084,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5928
6084
|
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u0441\u0432\u044F\u0437\u0438 ${linkType}`,
|
|
5929
6085
|
title: linkType,
|
|
5930
6086
|
children: [
|
|
5931
|
-
/* @__PURE__ */ (0,
|
|
5932
|
-
/* @__PURE__ */ (0,
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, {}),
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: LINK_TYPE_LABELS_RU2[linkType] })
|
|
5933
6089
|
]
|
|
5934
6090
|
},
|
|
5935
6091
|
linkType
|
|
5936
6092
|
);
|
|
5937
6093
|
}) }),
|
|
5938
|
-
/* @__PURE__ */ (0,
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "gantt-tl-dep-source-picker-head", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5939
6095
|
"input",
|
|
5940
6096
|
{
|
|
5941
6097
|
ref: dependencySearchInputRef,
|
|
@@ -5977,12 +6133,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
5977
6133
|
}
|
|
5978
6134
|
}
|
|
5979
6135
|
) }),
|
|
5980
|
-
/* @__PURE__ */ (0,
|
|
6136
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5981
6137
|
"div",
|
|
5982
6138
|
{
|
|
5983
6139
|
ref: dependencySearchListRef,
|
|
5984
6140
|
className: "gantt-tl-dep-source-list",
|
|
5985
|
-
children: dependencySearchCandidates.length > 0 ? dependencySearchCandidates.map(({ task: candidate, label, isAlreadyLinked }, index) => /* @__PURE__ */ (0,
|
|
6141
|
+
children: dependencySearchCandidates.length > 0 ? dependencySearchCandidates.map(({ task: candidate, label, isAlreadyLinked }, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5986
6142
|
"button",
|
|
5987
6143
|
{
|
|
5988
6144
|
type: "button",
|
|
@@ -6002,8 +6158,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6002
6158
|
},
|
|
6003
6159
|
title: label,
|
|
6004
6160
|
children: [
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6006
|
-
isAlreadyLinked && /* @__PURE__ */ (0,
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-dep-source-option-label", children: label }),
|
|
6162
|
+
isAlreadyLinked && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6007
6163
|
"span",
|
|
6008
6164
|
{
|
|
6009
6165
|
className: "gantt-tl-dep-source-option-remove",
|
|
@@ -6018,7 +6174,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6018
6174
|
]
|
|
6019
6175
|
},
|
|
6020
6176
|
candidate.id
|
|
6021
|
-
)) : /* @__PURE__ */ (0,
|
|
6177
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-dep-source-hint", children: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E" })
|
|
6022
6178
|
}
|
|
6023
6179
|
)
|
|
6024
6180
|
]
|
|
@@ -6028,13 +6184,13 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6028
6184
|
const isSelectedDependencyOwner = selectedChip != null && selectedChip.successorId === task.id;
|
|
6029
6185
|
const startDateISO = toISODate2(normalizedTask.startDate);
|
|
6030
6186
|
const endDateISO = editingDuration ? getEndDate(normalizedTask.startDate, durationValue) : toISODate2(normalizedTask.endDate);
|
|
6031
|
-
const selectionCell = /* @__PURE__ */ (0,
|
|
6187
|
+
const selectionCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6032
6188
|
"div",
|
|
6033
6189
|
{
|
|
6034
6190
|
className: "gantt-tl-cell gantt-tl-cell-selection",
|
|
6035
6191
|
style: getColumnStyle("selection", 36),
|
|
6036
6192
|
onClick: (e) => e.stopPropagation(),
|
|
6037
|
-
children: /* @__PURE__ */ (0,
|
|
6193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6038
6194
|
"input",
|
|
6039
6195
|
{
|
|
6040
6196
|
type: "checkbox",
|
|
@@ -6046,14 +6202,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6046
6202
|
)
|
|
6047
6203
|
}
|
|
6048
6204
|
);
|
|
6049
|
-
const numberCell = /* @__PURE__ */ (0,
|
|
6205
|
+
const numberCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6050
6206
|
"div",
|
|
6051
6207
|
{
|
|
6052
6208
|
className: `gantt-tl-cell gantt-tl-cell-number${onDragStart ? " gantt-tl-cell-number-reorderable" : ""}`,
|
|
6053
6209
|
style: getColumnStyle("number", 40),
|
|
6054
6210
|
onClick: handleNumberClick,
|
|
6055
6211
|
children: [
|
|
6056
|
-
onDragStart && /* @__PURE__ */ (0,
|
|
6212
|
+
onDragStart && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6057
6213
|
"span",
|
|
6058
6214
|
{
|
|
6059
6215
|
className: "gantt-tl-drag-handle",
|
|
@@ -6064,10 +6220,10 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6064
6220
|
},
|
|
6065
6221
|
onDragEnd: (e) => onDragEnd?.(e),
|
|
6066
6222
|
onClick: (e) => e.stopPropagation(),
|
|
6067
|
-
children: /* @__PURE__ */ (0,
|
|
6223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DragHandleIcon, {})
|
|
6068
6224
|
}
|
|
6069
6225
|
),
|
|
6070
|
-
/* @__PURE__ */ (0,
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-num-label", children: taskNumber || rowIndex + 1 })
|
|
6071
6227
|
]
|
|
6072
6228
|
}
|
|
6073
6229
|
);
|
|
@@ -6083,12 +6239,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6083
6239
|
const nestedAxisDepth = Math.max(0, nestingDepth);
|
|
6084
6240
|
return `${numberColumnWidth + nestedAxisDepth * 20 + 9}px`;
|
|
6085
6241
|
})();
|
|
6086
|
-
const nameCell = /* @__PURE__ */ (0,
|
|
6087
|
-
isChild && !editingName && /* @__PURE__ */ (0,
|
|
6088
|
-
!isFilterHideMode && /* @__PURE__ */ (0,
|
|
6242
|
+
const nameCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-cell gantt-tl-cell-name", style: getColumnStyle("name", 200), children: [
|
|
6243
|
+
isChild && !editingName && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6244
|
+
!isFilterHideMode && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6089
6245
|
ancestorLineModes.map(
|
|
6090
|
-
(mode, idx) => mode ? /* @__PURE__ */ (0,
|
|
6091
|
-
/* @__PURE__ */ (0,
|
|
6246
|
+
(mode, idx) => mode ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react11.default.Fragment, { children: [
|
|
6247
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6092
6248
|
"span",
|
|
6093
6249
|
{
|
|
6094
6250
|
"data-testid": `gantt-tl-ancestor-connector-${idx}`,
|
|
@@ -6104,7 +6260,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6104
6260
|
}
|
|
6105
6261
|
}
|
|
6106
6262
|
),
|
|
6107
|
-
mode === "half" && /* @__PURE__ */ (0,
|
|
6263
|
+
mode === "half" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6108
6264
|
"span",
|
|
6109
6265
|
{
|
|
6110
6266
|
"data-testid": `gantt-tl-ancestor-connector-cap-${idx}`,
|
|
@@ -6122,7 +6278,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6122
6278
|
)
|
|
6123
6279
|
] }, idx) : null
|
|
6124
6280
|
),
|
|
6125
|
-
nestingDepth > 0 && /* @__PURE__ */ (0,
|
|
6281
|
+
nestingDepth > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6126
6282
|
"span",
|
|
6127
6283
|
{
|
|
6128
6284
|
"data-testid": "gantt-tl-child-connector-vertical",
|
|
@@ -6138,7 +6294,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6138
6294
|
}
|
|
6139
6295
|
}
|
|
6140
6296
|
),
|
|
6141
|
-
/* @__PURE__ */ (0,
|
|
6297
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6142
6298
|
"span",
|
|
6143
6299
|
{
|
|
6144
6300
|
style: {
|
|
@@ -6153,7 +6309,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6153
6309
|
}
|
|
6154
6310
|
}
|
|
6155
6311
|
),
|
|
6156
|
-
/* @__PURE__ */ (0,
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6157
6313
|
"span",
|
|
6158
6314
|
{
|
|
6159
6315
|
style: {
|
|
@@ -6169,8 +6325,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6169
6325
|
}
|
|
6170
6326
|
)
|
|
6171
6327
|
] }),
|
|
6172
|
-
isParent && !editingName && /* @__PURE__ */ (0,
|
|
6173
|
-
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ (0,
|
|
6328
|
+
isParent && !editingName && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6329
|
+
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6174
6330
|
"span",
|
|
6175
6331
|
{
|
|
6176
6332
|
style: {
|
|
@@ -6185,7 +6341,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6185
6341
|
}
|
|
6186
6342
|
}
|
|
6187
6343
|
),
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6344
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6189
6345
|
"button",
|
|
6190
6346
|
{
|
|
6191
6347
|
type: "button",
|
|
@@ -6193,13 +6349,13 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6193
6349
|
onClick: handleToggleCollapse,
|
|
6194
6350
|
style: { left: `${nestingDepth * 20 + 1}px` },
|
|
6195
6351
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
6196
|
-
children: /* @__PURE__ */ (0,
|
|
6352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, {})
|
|
6197
6353
|
}
|
|
6198
6354
|
)
|
|
6199
6355
|
] })
|
|
6200
6356
|
] }),
|
|
6201
|
-
!isChild && isParent && !editingName && /* @__PURE__ */ (0,
|
|
6202
|
-
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ (0,
|
|
6357
|
+
!isChild && isParent && !editingName && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6358
|
+
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6203
6359
|
"span",
|
|
6204
6360
|
{
|
|
6205
6361
|
"data-testid": "gantt-tl-parent-connector-tail",
|
|
@@ -6215,7 +6371,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6215
6371
|
}
|
|
6216
6372
|
}
|
|
6217
6373
|
),
|
|
6218
|
-
/* @__PURE__ */ (0,
|
|
6374
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6219
6375
|
"button",
|
|
6220
6376
|
{
|
|
6221
6377
|
type: "button",
|
|
@@ -6223,11 +6379,11 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6223
6379
|
onClick: handleToggleCollapse,
|
|
6224
6380
|
style: { left: `${nestingDepth * 20 + 1}px` },
|
|
6225
6381
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
6226
|
-
children: /* @__PURE__ */ (0,
|
|
6382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, {})
|
|
6227
6383
|
}
|
|
6228
6384
|
)
|
|
6229
6385
|
] }),
|
|
6230
|
-
editingName ? /* @__PURE__ */ (0,
|
|
6386
|
+
editingName ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6231
6387
|
Input,
|
|
6232
6388
|
{
|
|
6233
6389
|
ref: nameInputRef,
|
|
@@ -6240,7 +6396,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6240
6396
|
style: { paddingLeft: nameInputPaddingLeft },
|
|
6241
6397
|
onClick: (e) => e.stopPropagation()
|
|
6242
6398
|
}
|
|
6243
|
-
) : /* @__PURE__ */ (0,
|
|
6399
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6244
6400
|
"button",
|
|
6245
6401
|
{
|
|
6246
6402
|
type: "button",
|
|
@@ -6256,12 +6412,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6256
6412
|
paddingRight: task.color ? "20px" : void 0
|
|
6257
6413
|
},
|
|
6258
6414
|
children: [
|
|
6259
|
-
taskListNamePrefixIcon ? /* @__PURE__ */ (0,
|
|
6260
|
-
/* @__PURE__ */ (0,
|
|
6415
|
+
taskListNamePrefixIcon ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-name-trigger-icon", "aria-hidden": "true", children: taskListNamePrefixIcon }) : null,
|
|
6416
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-name-trigger-text", children: task.name })
|
|
6261
6417
|
]
|
|
6262
6418
|
}
|
|
6263
6419
|
),
|
|
6264
|
-
!editingName && task.color && /* @__PURE__ */ (0,
|
|
6420
|
+
!editingName && task.color && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6265
6421
|
"span",
|
|
6266
6422
|
{
|
|
6267
6423
|
className: "gantt-tl-name-color-stripe",
|
|
@@ -6269,8 +6425,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6269
6425
|
"aria-hidden": "true"
|
|
6270
6426
|
}
|
|
6271
6427
|
),
|
|
6272
|
-
!editingName && !hideTaskListRowActions && (onInsertAfter || onDelete || onPromoteTask || onDemoteTask || onUngroupTask || onDuplicateTask || onTasksChange || hasContextMenu) && /* @__PURE__ */ (0,
|
|
6273
|
-
onInsertAfter && /* @__PURE__ */ (0,
|
|
6428
|
+
!editingName && !hideTaskListRowActions && (onInsertAfter || onDelete || onPromoteTask || onDemoteTask || onUngroupTask || onDuplicateTask || onTasksChange || hasContextMenu) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: `gantt-tl-name-actions${contextMenuOpen ? " gantt-tl-name-actions-open" : ""}`, children: [
|
|
6429
|
+
onInsertAfter && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6274
6430
|
"button",
|
|
6275
6431
|
{
|
|
6276
6432
|
type: "button",
|
|
@@ -6292,10 +6448,10 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6292
6448
|
onInsertAfter(task.id, newTask);
|
|
6293
6449
|
},
|
|
6294
6450
|
"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",
|
|
6295
|
-
children: /* @__PURE__ */ (0,
|
|
6451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PlusIcon, {})
|
|
6296
6452
|
}
|
|
6297
6453
|
),
|
|
6298
|
-
/* @__PURE__ */ (0,
|
|
6454
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6299
6455
|
HierarchyButton,
|
|
6300
6456
|
{
|
|
6301
6457
|
isChild,
|
|
@@ -6305,11 +6461,11 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6305
6461
|
onDemote: onDemoteTask ? handleDemote : void 0
|
|
6306
6462
|
}
|
|
6307
6463
|
),
|
|
6308
|
-
hasContextMenu && /* @__PURE__ */ (0,
|
|
6464
|
+
hasContextMenu && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open: contextMenuOpen, onOpenChange: (open) => {
|
|
6309
6465
|
setContextMenuOpen(open);
|
|
6310
6466
|
if (!open) closeColorMenu();
|
|
6311
6467
|
}, children: [
|
|
6312
|
-
/* @__PURE__ */ (0,
|
|
6468
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6313
6469
|
"button",
|
|
6314
6470
|
{
|
|
6315
6471
|
type: "button",
|
|
@@ -6319,11 +6475,11 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6319
6475
|
setContextMenuOpen((v) => !v);
|
|
6320
6476
|
},
|
|
6321
6477
|
"aria-label": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
6322
|
-
children: /* @__PURE__ */ (0,
|
|
6478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(VerticalDotsIcon, {})
|
|
6323
6479
|
}
|
|
6324
6480
|
) }),
|
|
6325
|
-
/* @__PURE__ */ (0,
|
|
6326
|
-
onTasksChange && /* @__PURE__ */ (0,
|
|
6481
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PopoverContent, { className: "gantt-tl-context-menu", portal: true, align: "end", children: [
|
|
6482
|
+
onTasksChange && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6327
6483
|
"div",
|
|
6328
6484
|
{
|
|
6329
6485
|
className: "gantt-tl-context-menu-section gantt-tl-context-submenu-wrap",
|
|
@@ -6338,7 +6494,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6338
6494
|
}
|
|
6339
6495
|
},
|
|
6340
6496
|
children: [
|
|
6341
|
-
/* @__PURE__ */ (0,
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6342
6498
|
"button",
|
|
6343
6499
|
{
|
|
6344
6500
|
type: "button",
|
|
@@ -6347,8 +6503,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6347
6503
|
"aria-expanded": colorMenuOpen,
|
|
6348
6504
|
"aria-haspopup": "menu",
|
|
6349
6505
|
children: [
|
|
6350
|
-
/* @__PURE__ */ (0,
|
|
6351
|
-
task.color && /* @__PURE__ */ (0,
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "gantt-tl-context-menu-item-main", children: [
|
|
6507
|
+
task.color && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6352
6508
|
"span",
|
|
6353
6509
|
{
|
|
6354
6510
|
className: "gantt-tl-color-swatch gantt-tl-color-swatch-inline",
|
|
@@ -6358,12 +6514,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6358
6514
|
),
|
|
6359
6515
|
"\u0426\u0432\u0435\u0442"
|
|
6360
6516
|
] }),
|
|
6361
|
-
/* @__PURE__ */ (0,
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, {})
|
|
6362
6518
|
]
|
|
6363
6519
|
}
|
|
6364
6520
|
),
|
|
6365
|
-
colorMenuOpen && /* @__PURE__ */ (0,
|
|
6366
|
-
/* @__PURE__ */ (0,
|
|
6521
|
+
colorMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "gantt-tl-context-submenu", role: "menu", "aria-label": "\u0412\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-color-grid", children: [
|
|
6522
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6367
6523
|
"button",
|
|
6368
6524
|
{
|
|
6369
6525
|
type: "button",
|
|
@@ -6374,10 +6530,10 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6374
6530
|
},
|
|
6375
6531
|
"aria-label": "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
6376
6532
|
title: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
6377
|
-
children: /* @__PURE__ */ (0,
|
|
6533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "gantt-tl-color-swatch-clear-line" })
|
|
6378
6534
|
}
|
|
6379
6535
|
),
|
|
6380
|
-
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */ (0,
|
|
6536
|
+
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6381
6537
|
"button",
|
|
6382
6538
|
{
|
|
6383
6539
|
type: "button",
|
|
@@ -6396,7 +6552,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6396
6552
|
]
|
|
6397
6553
|
}
|
|
6398
6554
|
),
|
|
6399
|
-
onDuplicateTask && /* @__PURE__ */ (0,
|
|
6555
|
+
onDuplicateTask && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6400
6556
|
"button",
|
|
6401
6557
|
{
|
|
6402
6558
|
type: "button",
|
|
@@ -6407,14 +6563,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6407
6563
|
onDuplicateTask(task.id);
|
|
6408
6564
|
},
|
|
6409
6565
|
children: [
|
|
6410
|
-
/* @__PURE__ */ (0,
|
|
6566
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CopyIcon, {}),
|
|
6411
6567
|
"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
6412
6568
|
]
|
|
6413
6569
|
}
|
|
6414
6570
|
),
|
|
6415
|
-
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ (0,
|
|
6416
|
-
command.divider === "top" && /* @__PURE__ */ (0,
|
|
6417
|
-
/* @__PURE__ */ (0,
|
|
6571
|
+
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react11.default.Fragment, { children: [
|
|
6572
|
+
command.divider === "top" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { className: "gantt-tl-context-menu-divider" }),
|
|
6573
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6418
6574
|
"button",
|
|
6419
6575
|
{
|
|
6420
6576
|
type: "button",
|
|
@@ -6427,21 +6583,21 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6427
6583
|
]
|
|
6428
6584
|
}
|
|
6429
6585
|
),
|
|
6430
|
-
command.divider === "bottom" && /* @__PURE__ */ (0,
|
|
6586
|
+
command.divider === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { className: "gantt-tl-context-menu-divider" })
|
|
6431
6587
|
] }, command.id)),
|
|
6432
|
-
isParent && onUngroupTask && /* @__PURE__ */ (0,
|
|
6588
|
+
isParent && onUngroupTask && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6433
6589
|
"button",
|
|
6434
6590
|
{
|
|
6435
6591
|
type: "button",
|
|
6436
6592
|
className: "gantt-tl-context-menu-item",
|
|
6437
6593
|
onClick: handleUngroup,
|
|
6438
6594
|
children: [
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(UngroupIcon, {}),
|
|
6440
6596
|
"\u0420\u0430\u0437\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
6441
6597
|
]
|
|
6442
6598
|
}
|
|
6443
6599
|
),
|
|
6444
|
-
onDelete && /* @__PURE__ */ (0,
|
|
6600
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6445
6601
|
"button",
|
|
6446
6602
|
{
|
|
6447
6603
|
type: "button",
|
|
@@ -6452,7 +6608,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6452
6608
|
onDelete(task.id);
|
|
6453
6609
|
},
|
|
6454
6610
|
children: [
|
|
6455
|
-
/* @__PURE__ */ (0,
|
|
6611
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TrashIcon, {}),
|
|
6456
6612
|
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
6457
6613
|
]
|
|
6458
6614
|
}
|
|
@@ -6461,13 +6617,13 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6461
6617
|
] })
|
|
6462
6618
|
] })
|
|
6463
6619
|
] });
|
|
6464
|
-
const startDateCell = /* @__PURE__ */ (0,
|
|
6620
|
+
const startDateCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6465
6621
|
"div",
|
|
6466
6622
|
{
|
|
6467
6623
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
6468
6624
|
style: getColumnStyle("startDate", 90),
|
|
6469
6625
|
onClick: (e) => e.stopPropagation(),
|
|
6470
|
-
children: /* @__PURE__ */ (0,
|
|
6626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6471
6627
|
DatePicker,
|
|
6472
6628
|
{
|
|
6473
6629
|
value: startDateISO,
|
|
@@ -6482,13 +6638,13 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6482
6638
|
)
|
|
6483
6639
|
}
|
|
6484
6640
|
);
|
|
6485
|
-
const endDateCell = /* @__PURE__ */ (0,
|
|
6641
|
+
const endDateCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6486
6642
|
"div",
|
|
6487
6643
|
{
|
|
6488
6644
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
6489
6645
|
style: getColumnStyle("endDate", 90),
|
|
6490
6646
|
onClick: (e) => e.stopPropagation(),
|
|
6491
|
-
children: /* @__PURE__ */ (0,
|
|
6647
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6492
6648
|
DatePicker,
|
|
6493
6649
|
{
|
|
6494
6650
|
value: endDateISO,
|
|
@@ -6503,20 +6659,20 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6503
6659
|
)
|
|
6504
6660
|
}
|
|
6505
6661
|
);
|
|
6506
|
-
const durationCell = /* @__PURE__ */ (0,
|
|
6662
|
+
const durationCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6507
6663
|
"div",
|
|
6508
6664
|
{
|
|
6509
6665
|
className: "gantt-tl-cell gantt-tl-cell-duration",
|
|
6510
6666
|
style: getColumnStyle("duration", 60),
|
|
6511
6667
|
onClick: handleDurationClick,
|
|
6512
6668
|
children: [
|
|
6513
|
-
editingDuration && /* @__PURE__ */ (0,
|
|
6669
|
+
editingDuration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6514
6670
|
"div",
|
|
6515
6671
|
{
|
|
6516
6672
|
className: "gantt-tl-number-editor",
|
|
6517
6673
|
onClick: (e) => e.stopPropagation(),
|
|
6518
6674
|
children: [
|
|
6519
|
-
/* @__PURE__ */ (0,
|
|
6675
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6520
6676
|
Input,
|
|
6521
6677
|
{
|
|
6522
6678
|
ref: durationInputRef,
|
|
@@ -6530,8 +6686,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6530
6686
|
className: "gantt-tl-number-input"
|
|
6531
6687
|
}
|
|
6532
6688
|
),
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6689
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
6690
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6535
6691
|
"button",
|
|
6536
6692
|
{
|
|
6537
6693
|
type: "button",
|
|
@@ -6539,7 +6695,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6539
6695
|
tabIndex: -1,
|
|
6540
6696
|
onMouseDown: (e) => e.preventDefault(),
|
|
6541
6697
|
onClick: () => handleDurationAdjust(1),
|
|
6542
|
-
children: /* @__PURE__ */ (0,
|
|
6698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6543
6699
|
"svg",
|
|
6544
6700
|
{
|
|
6545
6701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6551,12 +6707,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6551
6707
|
strokeWidth: "2",
|
|
6552
6708
|
strokeLinecap: "round",
|
|
6553
6709
|
strokeLinejoin: "round",
|
|
6554
|
-
children: /* @__PURE__ */ (0,
|
|
6710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m18 15-6-6-6 6" })
|
|
6555
6711
|
}
|
|
6556
6712
|
)
|
|
6557
6713
|
}
|
|
6558
6714
|
),
|
|
6559
|
-
/* @__PURE__ */ (0,
|
|
6715
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6560
6716
|
"button",
|
|
6561
6717
|
{
|
|
6562
6718
|
type: "button",
|
|
@@ -6564,7 +6720,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6564
6720
|
tabIndex: -1,
|
|
6565
6721
|
onMouseDown: (e) => e.preventDefault(),
|
|
6566
6722
|
onClick: () => handleDurationAdjust(-1),
|
|
6567
|
-
children: /* @__PURE__ */ (0,
|
|
6723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6568
6724
|
"svg",
|
|
6569
6725
|
{
|
|
6570
6726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6576,7 +6732,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6576
6732
|
strokeWidth: "2",
|
|
6577
6733
|
strokeLinecap: "round",
|
|
6578
6734
|
strokeLinejoin: "round",
|
|
6579
|
-
children: /* @__PURE__ */ (0,
|
|
6735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
6580
6736
|
}
|
|
6581
6737
|
)
|
|
6582
6738
|
}
|
|
@@ -6585,7 +6741,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6585
6741
|
]
|
|
6586
6742
|
}
|
|
6587
6743
|
),
|
|
6588
|
-
/* @__PURE__ */ (0,
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6589
6745
|
"span",
|
|
6590
6746
|
{
|
|
6591
6747
|
className: "gantt-tl-duration-display",
|
|
@@ -6596,20 +6752,20 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6596
6752
|
]
|
|
6597
6753
|
}
|
|
6598
6754
|
);
|
|
6599
|
-
const progressCell = /* @__PURE__ */ (0,
|
|
6755
|
+
const progressCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6600
6756
|
"div",
|
|
6601
6757
|
{
|
|
6602
6758
|
className: "gantt-tl-cell gantt-tl-cell-progress",
|
|
6603
6759
|
style: getColumnStyle("progress", 50),
|
|
6604
6760
|
onClick: handleProgressClick,
|
|
6605
6761
|
children: [
|
|
6606
|
-
editingProgress && /* @__PURE__ */ (0,
|
|
6762
|
+
editingProgress && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6607
6763
|
"div",
|
|
6608
6764
|
{
|
|
6609
6765
|
className: "gantt-tl-number-editor",
|
|
6610
6766
|
onClick: (e) => e.stopPropagation(),
|
|
6611
6767
|
children: [
|
|
6612
|
-
/* @__PURE__ */ (0,
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6613
6769
|
Input,
|
|
6614
6770
|
{
|
|
6615
6771
|
ref: progressInputRef,
|
|
@@ -6624,8 +6780,8 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6624
6780
|
className: "gantt-tl-number-input"
|
|
6625
6781
|
}
|
|
6626
6782
|
),
|
|
6627
|
-
/* @__PURE__ */ (0,
|
|
6628
|
-
/* @__PURE__ */ (0,
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
6784
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6629
6785
|
"button",
|
|
6630
6786
|
{
|
|
6631
6787
|
type: "button",
|
|
@@ -6633,7 +6789,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6633
6789
|
tabIndex: -1,
|
|
6634
6790
|
onMouseDown: (e) => e.preventDefault(),
|
|
6635
6791
|
onClick: () => handleProgressAdjust(1),
|
|
6636
|
-
children: /* @__PURE__ */ (0,
|
|
6792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6637
6793
|
"svg",
|
|
6638
6794
|
{
|
|
6639
6795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6645,12 +6801,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6645
6801
|
strokeWidth: "2",
|
|
6646
6802
|
strokeLinecap: "round",
|
|
6647
6803
|
strokeLinejoin: "round",
|
|
6648
|
-
children: /* @__PURE__ */ (0,
|
|
6804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m18 15-6-6-6 6" })
|
|
6649
6805
|
}
|
|
6650
6806
|
)
|
|
6651
6807
|
}
|
|
6652
6808
|
),
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6809
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6654
6810
|
"button",
|
|
6655
6811
|
{
|
|
6656
6812
|
type: "button",
|
|
@@ -6658,7 +6814,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6658
6814
|
tabIndex: -1,
|
|
6659
6815
|
onMouseDown: (e) => e.preventDefault(),
|
|
6660
6816
|
onClick: () => handleProgressAdjust(-1),
|
|
6661
|
-
children: /* @__PURE__ */ (0,
|
|
6817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6662
6818
|
"svg",
|
|
6663
6819
|
{
|
|
6664
6820
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6670,7 +6826,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6670
6826
|
strokeWidth: "2",
|
|
6671
6827
|
strokeLinecap: "round",
|
|
6672
6828
|
strokeLinejoin: "round",
|
|
6673
|
-
children: /* @__PURE__ */ (0,
|
|
6829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
6674
6830
|
}
|
|
6675
6831
|
)
|
|
6676
6832
|
}
|
|
@@ -6679,7 +6835,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6679
6835
|
]
|
|
6680
6836
|
}
|
|
6681
6837
|
),
|
|
6682
|
-
/* @__PURE__ */ (0,
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6683
6839
|
"span",
|
|
6684
6840
|
{
|
|
6685
6841
|
className: "gantt-tl-progress-display",
|
|
@@ -6695,14 +6851,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6695
6851
|
]
|
|
6696
6852
|
}
|
|
6697
6853
|
);
|
|
6698
|
-
const dependenciesCell = /* @__PURE__ */ (0,
|
|
6854
|
+
const dependenciesCell = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6699
6855
|
"div",
|
|
6700
6856
|
{
|
|
6701
6857
|
className: "gantt-tl-cell gantt-tl-cell-deps",
|
|
6702
6858
|
style: getColumnStyle("dependencies", 128),
|
|
6703
6859
|
onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
|
|
6704
|
-
children: isSourceRow ? /* @__PURE__ */ (0,
|
|
6705
|
-
/* @__PURE__ */ (0,
|
|
6860
|
+
children: isSourceRow ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6861
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6706
6862
|
"span",
|
|
6707
6863
|
{
|
|
6708
6864
|
className: "gantt-tl-dep-source-hint",
|
|
@@ -6711,11 +6867,11 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6711
6867
|
}
|
|
6712
6868
|
),
|
|
6713
6869
|
sourcePickerContent
|
|
6714
|
-
] }) : /* @__PURE__ */ (0,
|
|
6870
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
6715
6871
|
chips.length >= 2 ? (
|
|
6716
6872
|
/* 2+ deps — show only "N связей" summary chip that opens a popover */
|
|
6717
|
-
/* @__PURE__ */ (0,
|
|
6718
|
-
/* @__PURE__ */ (0,
|
|
6873
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open: overflowOpen, onOpenChange: setOverflowOpen, children: [
|
|
6874
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
6719
6875
|
"button",
|
|
6720
6876
|
{
|
|
6721
6877
|
type: "button",
|
|
@@ -6731,12 +6887,12 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6731
6887
|
]
|
|
6732
6888
|
}
|
|
6733
6889
|
) }),
|
|
6734
|
-
/* @__PURE__ */ (0,
|
|
6890
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6735
6891
|
"div",
|
|
6736
6892
|
{
|
|
6737
6893
|
className: "gantt-tl-dep-overflow-list",
|
|
6738
6894
|
onClick: (e) => e.stopPropagation(),
|
|
6739
|
-
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */ (0,
|
|
6895
|
+
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6740
6896
|
DepChip,
|
|
6741
6897
|
{
|
|
6742
6898
|
lag,
|
|
@@ -6765,7 +6921,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6765
6921
|
] })
|
|
6766
6922
|
) : chips.length === 1 ? (
|
|
6767
6923
|
/* Single chip — unified DepChip */
|
|
6768
|
-
/* @__PURE__ */ (0,
|
|
6924
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6769
6925
|
DepChip,
|
|
6770
6926
|
{
|
|
6771
6927
|
lag: chips[0].lag,
|
|
@@ -6789,7 +6945,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6789
6945
|
}
|
|
6790
6946
|
)
|
|
6791
6947
|
) : null,
|
|
6792
|
-
!disableDependencyEditing && !isPicking && /* @__PURE__ */ (0,
|
|
6948
|
+
!disableDependencyEditing && !isPicking && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6793
6949
|
"button",
|
|
6794
6950
|
{
|
|
6795
6951
|
type: "button",
|
|
@@ -6854,7 +7010,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6854
7010
|
focusCustomCell(nextCell.taskId, nextCell.columnId);
|
|
6855
7011
|
});
|
|
6856
7012
|
}, [focusCustomCell, onActiveCustomCellChange, resolvedColumns, task.id]);
|
|
6857
|
-
return /* @__PURE__ */ (0,
|
|
7013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6858
7014
|
"div",
|
|
6859
7015
|
{
|
|
6860
7016
|
ref: rowRef,
|
|
@@ -6894,7 +7050,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6894
7050
|
tabIndex: isSelected ? 0 : -1,
|
|
6895
7051
|
children: resolvedColumns?.map((col) => {
|
|
6896
7052
|
const builtIn = builtInCells[col.id];
|
|
6897
|
-
if (builtIn) return /* @__PURE__ */ (0,
|
|
7053
|
+
if (builtIn) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react11.default.Fragment, { children: builtIn }, col.id);
|
|
6898
7054
|
const isEditing = editingColumnId === col.id;
|
|
6899
7055
|
const editorFn = col.renderEditor;
|
|
6900
7056
|
const isActiveCustomCell = activeCustomCell?.taskId === task.id && activeCustomCell?.columnId === col.id;
|
|
@@ -6932,7 +7088,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6932
7088
|
});
|
|
6933
7089
|
}
|
|
6934
7090
|
};
|
|
6935
|
-
return /* @__PURE__ */ (0,
|
|
7091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6936
7092
|
"div",
|
|
6937
7093
|
{
|
|
6938
7094
|
className: `gantt-tl-cell gantt-tl-cell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -7001,7 +7157,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
7001
7157
|
}
|
|
7002
7158
|
} : void 0,
|
|
7003
7159
|
style: { width: col.width ?? 120, minWidth: col.width ?? 120, flexShrink: 0 },
|
|
7004
|
-
children: isEditing && editorFn ? /* @__PURE__ */ (0,
|
|
7160
|
+
children: isEditing && editorFn ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7005
7161
|
"div",
|
|
7006
7162
|
{
|
|
7007
7163
|
className: "gantt-tl-cell-custom-editor",
|
|
@@ -7010,7 +7166,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
7010
7166
|
onClick: (e) => e.stopPropagation(),
|
|
7011
7167
|
children: editorFn(columnContext)
|
|
7012
7168
|
}
|
|
7013
|
-
) : /* @__PURE__ */ (0,
|
|
7169
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "gantt-tl-cell-custom-content", children: col.renderCell(columnContext) })
|
|
7014
7170
|
},
|
|
7015
7171
|
col.id
|
|
7016
7172
|
);
|
|
@@ -7024,7 +7180,7 @@ TaskListRow.displayName = "TaskListRow";
|
|
|
7024
7180
|
|
|
7025
7181
|
// src/components/TaskList/NewTaskRow.tsx
|
|
7026
7182
|
var import_react12 = require("react");
|
|
7027
|
-
var
|
|
7183
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
7028
7184
|
var NewTaskRow = ({
|
|
7029
7185
|
rowHeight,
|
|
7030
7186
|
onConfirm,
|
|
@@ -7063,9 +7219,9 @@ var NewTaskRow = ({
|
|
|
7063
7219
|
onCancel();
|
|
7064
7220
|
}
|
|
7065
7221
|
};
|
|
7066
|
-
return /* @__PURE__ */ (0,
|
|
7067
|
-
/* @__PURE__ */ (0,
|
|
7068
|
-
/* @__PURE__ */ (0,
|
|
7222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "gantt-tl-row gantt-tl-row-new", style: { height: `${rowHeight}px` }, children: [
|
|
7223
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "gantt-tl-cell gantt-tl-cell-number" }),
|
|
7224
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "gantt-tl-cell gantt-tl-cell-name gantt-tl-cell-new-name", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7069
7225
|
Input,
|
|
7070
7226
|
{
|
|
7071
7227
|
ref: inputRef,
|
|
@@ -7082,9 +7238,9 @@ var NewTaskRow = ({
|
|
|
7082
7238
|
}
|
|
7083
7239
|
}
|
|
7084
7240
|
) }),
|
|
7085
|
-
/* @__PURE__ */ (0,
|
|
7086
|
-
/* @__PURE__ */ (0,
|
|
7087
|
-
/* @__PURE__ */ (0,
|
|
7241
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "gantt-tl-cell" }),
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "gantt-tl-cell" }),
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "gantt-tl-cell" })
|
|
7088
7244
|
] });
|
|
7089
7245
|
};
|
|
7090
7246
|
|
|
@@ -7175,7 +7331,7 @@ function resolveTaskListColumns(builtIn, custom, hiddenColumnIds = []) {
|
|
|
7175
7331
|
}
|
|
7176
7332
|
|
|
7177
7333
|
// src/components/TaskList/TaskList.tsx
|
|
7178
|
-
var
|
|
7334
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
7179
7335
|
var LINK_TYPE_ORDER2 = ["FS", "SS", "FF", "SF"];
|
|
7180
7336
|
var MIN_TASK_LIST_WIDTH = 530;
|
|
7181
7337
|
var DEFAULT_COLUMN_MIN_WIDTH = 40;
|
|
@@ -7313,7 +7469,7 @@ var SelectAllCheckbox = ({
|
|
|
7313
7469
|
ref.current.indeterminate = indeterminate;
|
|
7314
7470
|
}
|
|
7315
7471
|
}, [indeterminate]);
|
|
7316
|
-
return /* @__PURE__ */ (0,
|
|
7472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7317
7473
|
"input",
|
|
7318
7474
|
{
|
|
7319
7475
|
ref,
|
|
@@ -7340,6 +7496,7 @@ var TaskList = ({
|
|
|
7340
7496
|
disableDependencyEditing = false,
|
|
7341
7497
|
onScrollToTask,
|
|
7342
7498
|
onSelectedChipChange,
|
|
7499
|
+
selectedChip: controlledSelectedChip,
|
|
7343
7500
|
onAdd,
|
|
7344
7501
|
onDelete,
|
|
7345
7502
|
onInsertAfter,
|
|
@@ -7348,6 +7505,7 @@ var TaskList = ({
|
|
|
7348
7505
|
disableTaskListReorder = false,
|
|
7349
7506
|
editingTaskId: propEditingTaskId,
|
|
7350
7507
|
enableAddTask = true,
|
|
7508
|
+
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
7351
7509
|
defaultTaskDurationDays = DEFAULT_TASK_DURATION_DAYS,
|
|
7352
7510
|
collapsedParentIds: externalCollapsedParentIds,
|
|
7353
7511
|
onToggleCollapse: externalOnToggleCollapse,
|
|
@@ -7560,13 +7718,27 @@ var TaskList = ({
|
|
|
7560
7718
|
const [typeMenuOpen, setTypeMenuOpen] = (0, import_react13.useState)(false);
|
|
7561
7719
|
const [dependencyError, setDependencyError] = (0, import_react13.useState)(null);
|
|
7562
7720
|
const overlayRef = (0, import_react13.useRef)(null);
|
|
7563
|
-
const [selectedChip, setSelectedChip] = (0, import_react13.useState)(null);
|
|
7721
|
+
const [selectedChip, setSelectedChip] = (0, import_react13.useState)(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7722
|
+
(0, import_react13.useEffect)(() => {
|
|
7723
|
+
if (controlledSelectedChip !== void 0) {
|
|
7724
|
+
setSelectedChip(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7725
|
+
}
|
|
7726
|
+
}, [controlledSelectedChip]);
|
|
7564
7727
|
const handleChipSelect = (0, import_react13.useCallback)((chip) => {
|
|
7565
7728
|
setSelectedChip(chip);
|
|
7566
7729
|
onSelectedChipChange?.(chip);
|
|
7567
7730
|
}, [onSelectedChipChange]);
|
|
7568
7731
|
(0, import_react13.useEffect)(() => {
|
|
7569
7732
|
if (!selectingPredecessorFor && !selectedChip && !selectedTaskId && !activeCustomCell) return;
|
|
7733
|
+
const pendingCanvasMouseDownRef = {
|
|
7734
|
+
container: null,
|
|
7735
|
+
x: 0,
|
|
7736
|
+
y: 0,
|
|
7737
|
+
scrollLeft: 0,
|
|
7738
|
+
scrollTop: 0,
|
|
7739
|
+
moved: false,
|
|
7740
|
+
active: false
|
|
7741
|
+
};
|
|
7570
7742
|
const handleKeyDown = (e) => {
|
|
7571
7743
|
if (e.key === "Escape") {
|
|
7572
7744
|
setSelectingPredecessorFor(null);
|
|
@@ -7584,6 +7756,18 @@ var TaskList = ({
|
|
|
7584
7756
|
}
|
|
7585
7757
|
return;
|
|
7586
7758
|
}
|
|
7759
|
+
if (target.closest?.("[data-taskbar]")) return;
|
|
7760
|
+
if (target.closest?.(".gantt-scrollContainer")) {
|
|
7761
|
+
const canvas = target.closest(".gantt-scrollContainer");
|
|
7762
|
+
pendingCanvasMouseDownRef.container = canvas;
|
|
7763
|
+
pendingCanvasMouseDownRef.x = e.clientX;
|
|
7764
|
+
pendingCanvasMouseDownRef.y = e.clientY;
|
|
7765
|
+
pendingCanvasMouseDownRef.scrollLeft = canvas.scrollLeft;
|
|
7766
|
+
pendingCanvasMouseDownRef.scrollTop = canvas.scrollTop;
|
|
7767
|
+
pendingCanvasMouseDownRef.moved = false;
|
|
7768
|
+
pendingCanvasMouseDownRef.active = true;
|
|
7769
|
+
return;
|
|
7770
|
+
}
|
|
7587
7771
|
if (target.closest?.(".gantt-popover")) return;
|
|
7588
7772
|
setSelectingPredecessorFor(null);
|
|
7589
7773
|
setSelectedChip(null);
|
|
@@ -7591,11 +7775,52 @@ var TaskList = ({
|
|
|
7591
7775
|
onSelectedChipChange?.(null);
|
|
7592
7776
|
onTaskSelect?.(null);
|
|
7593
7777
|
};
|
|
7778
|
+
const handleCanvasMouseMove = (e) => {
|
|
7779
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7780
|
+
const distance = Math.hypot(
|
|
7781
|
+
e.clientX - pendingCanvasMouseDownRef.x,
|
|
7782
|
+
e.clientY - pendingCanvasMouseDownRef.y
|
|
7783
|
+
);
|
|
7784
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7785
|
+
const scrollChanged = canvas && (canvas.scrollLeft !== pendingCanvasMouseDownRef.scrollLeft || canvas.scrollTop !== pendingCanvasMouseDownRef.scrollTop);
|
|
7786
|
+
if (distance > 3 || scrollChanged) pendingCanvasMouseDownRef.moved = true;
|
|
7787
|
+
};
|
|
7788
|
+
const handleCanvasScroll = (e) => {
|
|
7789
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7790
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7791
|
+
if (canvas && e.target === canvas) pendingCanvasMouseDownRef.moved = true;
|
|
7792
|
+
};
|
|
7793
|
+
const handleCanvasWheel = (e) => {
|
|
7794
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7795
|
+
if (pendingCanvasMouseDownRef.container?.contains(e.target)) {
|
|
7796
|
+
pendingCanvasMouseDownRef.moved = true;
|
|
7797
|
+
}
|
|
7798
|
+
};
|
|
7799
|
+
const handleCanvasMouseUp = () => {
|
|
7800
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7801
|
+
const wasPan = pendingCanvasMouseDownRef.moved;
|
|
7802
|
+
pendingCanvasMouseDownRef.active = false;
|
|
7803
|
+
pendingCanvasMouseDownRef.container = null;
|
|
7804
|
+
if (wasPan) return;
|
|
7805
|
+
setSelectingPredecessorFor(null);
|
|
7806
|
+
setSelectedChip(null);
|
|
7807
|
+
setActiveCustomCell(null);
|
|
7808
|
+
onSelectedChipChange?.(null);
|
|
7809
|
+
onTaskSelect?.(null);
|
|
7810
|
+
};
|
|
7594
7811
|
document.addEventListener("keydown", handleKeyDown);
|
|
7595
7812
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
7813
|
+
document.addEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7814
|
+
document.addEventListener("scroll", handleCanvasScroll, true);
|
|
7815
|
+
document.addEventListener("wheel", handleCanvasWheel, true);
|
|
7816
|
+
document.addEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7596
7817
|
return () => {
|
|
7597
7818
|
document.removeEventListener("keydown", handleKeyDown);
|
|
7598
7819
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
7820
|
+
document.removeEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7821
|
+
document.removeEventListener("scroll", handleCanvasScroll, true);
|
|
7822
|
+
document.removeEventListener("wheel", handleCanvasWheel, true);
|
|
7823
|
+
document.removeEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7599
7824
|
};
|
|
7600
7825
|
}, [selectingPredecessorFor, selectedChip, selectedTaskId, activeCustomCell, onTaskSelect, onSelectedChipChange]);
|
|
7601
7826
|
const handleAddDependency = (0, import_react13.useCallback)((successorTaskId, predecessorTaskId, linkType) => {
|
|
@@ -8110,7 +8335,7 @@ var TaskList = ({
|
|
|
8110
8335
|
document.body.style.cursor = "col-resize";
|
|
8111
8336
|
document.body.style.userSelect = "none";
|
|
8112
8337
|
}, [resolvedColumns]);
|
|
8113
|
-
const renderResizeHandle = (0, import_react13.useCallback)((columnId) => /* @__PURE__ */ (0,
|
|
8338
|
+
const renderResizeHandle = (0, import_react13.useCallback)((columnId) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8114
8339
|
"button",
|
|
8115
8340
|
{
|
|
8116
8341
|
type: "button",
|
|
@@ -8124,7 +8349,7 @@ var TaskList = ({
|
|
|
8124
8349
|
}
|
|
8125
8350
|
}
|
|
8126
8351
|
), [startColumnResize]);
|
|
8127
|
-
return /* @__PURE__ */ (0,
|
|
8352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8128
8353
|
"div",
|
|
8129
8354
|
{
|
|
8130
8355
|
ref: overlayRef,
|
|
@@ -8133,17 +8358,17 @@ var TaskList = ({
|
|
|
8133
8358
|
"--tasklist-width": `${effectiveTaskListWidth}px`,
|
|
8134
8359
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
8135
8360
|
},
|
|
8136
|
-
children: /* @__PURE__ */ (0,
|
|
8137
|
-
/* @__PURE__ */ (0,
|
|
8361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "gantt-tl-table", children: [
|
|
8362
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "gantt-tl-header", style: { height: `${tableHeaderHeight}px` }, children: resolvedColumns.map((col) => {
|
|
8138
8363
|
if (col.id === "selection") {
|
|
8139
|
-
return /* @__PURE__ */ (0,
|
|
8364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8140
8365
|
"div",
|
|
8141
8366
|
{
|
|
8142
8367
|
className: "gantt-tl-headerCell gantt-tl-cell-selection",
|
|
8143
8368
|
"data-column-id": "selection",
|
|
8144
8369
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8145
8370
|
children: [
|
|
8146
|
-
/* @__PURE__ */ (0,
|
|
8371
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8147
8372
|
SelectAllCheckbox,
|
|
8148
8373
|
{
|
|
8149
8374
|
checked: areAllVisibleTasksSelected,
|
|
@@ -8158,15 +8383,15 @@ var TaskList = ({
|
|
|
8158
8383
|
);
|
|
8159
8384
|
}
|
|
8160
8385
|
if (col.id === "dependencies") {
|
|
8161
|
-
return /* @__PURE__ */ (0,
|
|
8386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8162
8387
|
"div",
|
|
8163
8388
|
{
|
|
8164
8389
|
className: "gantt-tl-headerCell gantt-tl-cell-deps",
|
|
8165
8390
|
"data-column-id": "dependencies",
|
|
8166
8391
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8167
8392
|
children: [
|
|
8168
|
-
/* @__PURE__ */ (0,
|
|
8169
|
-
/* @__PURE__ */ (0,
|
|
8393
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
8394
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8170
8395
|
"button",
|
|
8171
8396
|
{
|
|
8172
8397
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -8179,7 +8404,7 @@ var TaskList = ({
|
|
|
8179
8404
|
]
|
|
8180
8405
|
}
|
|
8181
8406
|
) }),
|
|
8182
|
-
/* @__PURE__ */ (0,
|
|
8407
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "gantt-tl-dep-type-menu", children: LINK_TYPE_ORDER2.map((lt) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8183
8408
|
"button",
|
|
8184
8409
|
{
|
|
8185
8410
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -8189,13 +8414,13 @@ var TaskList = ({
|
|
|
8189
8414
|
},
|
|
8190
8415
|
children: [
|
|
8191
8416
|
import_react13.default.createElement(LINK_TYPE_ICONS[lt]),
|
|
8192
|
-
/* @__PURE__ */ (0,
|
|
8417
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: LINK_TYPE_LABELS[lt] })
|
|
8193
8418
|
]
|
|
8194
8419
|
},
|
|
8195
8420
|
lt
|
|
8196
8421
|
)) }) })
|
|
8197
8422
|
] }),
|
|
8198
|
-
dependencyError && /* @__PURE__ */ (0,
|
|
8423
|
+
dependencyError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
8199
8424
|
renderResizeHandle(col.id)
|
|
8200
8425
|
]
|
|
8201
8426
|
},
|
|
@@ -8204,7 +8429,7 @@ var TaskList = ({
|
|
|
8204
8429
|
}
|
|
8205
8430
|
const builtInClass = BUILT_IN_CSS_CLASSES[col.id];
|
|
8206
8431
|
if (builtInClass !== void 0) {
|
|
8207
|
-
return /* @__PURE__ */ (0,
|
|
8432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8208
8433
|
"div",
|
|
8209
8434
|
{
|
|
8210
8435
|
className: `gantt-tl-headerCell ${builtInClass}`,
|
|
@@ -8218,7 +8443,7 @@ var TaskList = ({
|
|
|
8218
8443
|
col.id
|
|
8219
8444
|
);
|
|
8220
8445
|
}
|
|
8221
|
-
return /* @__PURE__ */ (0,
|
|
8446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8222
8447
|
"div",
|
|
8223
8448
|
{
|
|
8224
8449
|
className: `gantt-tl-headerCell gantt-tl-headerCell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -8233,7 +8458,7 @@ var TaskList = ({
|
|
|
8233
8458
|
col.id
|
|
8234
8459
|
);
|
|
8235
8460
|
}) }),
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8461
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8237
8462
|
"div",
|
|
8238
8463
|
{
|
|
8239
8464
|
className: "gantt-tl-body",
|
|
@@ -8243,7 +8468,7 @@ var TaskList = ({
|
|
|
8243
8468
|
position: "relative"
|
|
8244
8469
|
},
|
|
8245
8470
|
children: [
|
|
8246
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */ (0,
|
|
8471
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8247
8472
|
"div",
|
|
8248
8473
|
{
|
|
8249
8474
|
className: [
|
|
@@ -8260,7 +8485,7 @@ var TaskList = ({
|
|
|
8260
8485
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
8261
8486
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
8262
8487
|
const topOffset = index * rowHeight + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
8263
|
-
return /* @__PURE__ */ (0,
|
|
8488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8264
8489
|
"div",
|
|
8265
8490
|
{
|
|
8266
8491
|
style: {
|
|
@@ -8269,7 +8494,7 @@ var TaskList = ({
|
|
|
8269
8494
|
left: 0,
|
|
8270
8495
|
right: 0
|
|
8271
8496
|
},
|
|
8272
|
-
children: /* @__PURE__ */ (0,
|
|
8497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8273
8498
|
TaskListRow,
|
|
8274
8499
|
{
|
|
8275
8500
|
task,
|
|
@@ -8342,7 +8567,7 @@ var TaskList = ({
|
|
|
8342
8567
|
task.id
|
|
8343
8568
|
);
|
|
8344
8569
|
}),
|
|
8345
|
-
hasVisiblePendingInsert && /* @__PURE__ */ (0,
|
|
8570
|
+
hasVisiblePendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8346
8571
|
"div",
|
|
8347
8572
|
{
|
|
8348
8573
|
style: {
|
|
@@ -8351,7 +8576,7 @@ var TaskList = ({
|
|
|
8351
8576
|
left: 0,
|
|
8352
8577
|
right: 0
|
|
8353
8578
|
},
|
|
8354
|
-
children: /* @__PURE__ */ (0,
|
|
8579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8355
8580
|
NewTaskRow,
|
|
8356
8581
|
{
|
|
8357
8582
|
rowHeight,
|
|
@@ -8365,7 +8590,7 @@ var TaskList = ({
|
|
|
8365
8590
|
]
|
|
8366
8591
|
}
|
|
8367
8592
|
),
|
|
8368
|
-
isCreating && !pendingInsert && /* @__PURE__ */ (0,
|
|
8593
|
+
isCreating && !pendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8369
8594
|
NewTaskRow,
|
|
8370
8595
|
{
|
|
8371
8596
|
rowHeight,
|
|
@@ -8374,7 +8599,7 @@ var TaskList = ({
|
|
|
8374
8599
|
nestingDepth: 0
|
|
8375
8600
|
}
|
|
8376
8601
|
),
|
|
8377
|
-
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ (0,
|
|
8602
|
+
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8378
8603
|
"button",
|
|
8379
8604
|
{
|
|
8380
8605
|
className: `gantt-tl-add-btn${!reorderDisabled && dragOverTarget?.index === visibleTasks.length ? " gantt-tl-add-btn-drag-over" : ""}`,
|
|
@@ -8400,7 +8625,10 @@ var TaskList = ({
|
|
|
8400
8625
|
handleDrop(visibleTasks.length, e);
|
|
8401
8626
|
},
|
|
8402
8627
|
type: "button",
|
|
8403
|
-
children:
|
|
8628
|
+
children: [
|
|
8629
|
+
"+ ",
|
|
8630
|
+
addTaskLabel
|
|
8631
|
+
]
|
|
8404
8632
|
}
|
|
8405
8633
|
)
|
|
8406
8634
|
] })
|
|
@@ -8865,7 +9093,7 @@ var useResourceItemDrag = ({
|
|
|
8865
9093
|
};
|
|
8866
9094
|
|
|
8867
9095
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8868
|
-
var
|
|
9096
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8869
9097
|
var DEFAULT_DAY_WIDTH = 40;
|
|
8870
9098
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
8871
9099
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -9028,41 +9256,41 @@ var orderResourcesByType = (resources) => {
|
|
|
9028
9256
|
};
|
|
9029
9257
|
var ResourceTypeIcon = ({ type }) => {
|
|
9030
9258
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
9031
|
-
return /* @__PURE__ */ (0,
|
|
9032
|
-
/* @__PURE__ */ (0,
|
|
9033
|
-
/* @__PURE__ */ (0,
|
|
9034
|
-
/* @__PURE__ */ (0,
|
|
9035
|
-
/* @__PURE__ */ (0,
|
|
9259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconPeople", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9260
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
9261
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
|
|
9262
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
9263
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
9036
9264
|
] });
|
|
9037
9265
|
}
|
|
9038
9266
|
if (type === "\u041E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u0435") {
|
|
9039
|
-
return /* @__PURE__ */ (0,
|
|
9040
|
-
/* @__PURE__ */ (0,
|
|
9041
|
-
/* @__PURE__ */ (0,
|
|
9042
|
-
/* @__PURE__ */ (0,
|
|
9267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconEquipment", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9268
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
9269
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "m18 15 4-4" }),
|
|
9270
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("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" })
|
|
9043
9271
|
] });
|
|
9044
9272
|
}
|
|
9045
9273
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
9046
|
-
return /* @__PURE__ */ (0,
|
|
9047
|
-
/* @__PURE__ */ (0,
|
|
9048
|
-
/* @__PURE__ */ (0,
|
|
9049
|
-
/* @__PURE__ */ (0,
|
|
9274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconMaterials", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9275
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 22v-8" }),
|
|
9276
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
9277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("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" })
|
|
9050
9278
|
] });
|
|
9051
9279
|
}
|
|
9052
|
-
return /* @__PURE__ */ (0,
|
|
9053
|
-
/* @__PURE__ */ (0,
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9055
|
-
/* @__PURE__ */ (0,
|
|
9280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconOther", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9281
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
9282
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 8v4" }),
|
|
9283
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 16h.01" })
|
|
9056
9284
|
] });
|
|
9057
9285
|
};
|
|
9058
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ (0,
|
|
9059
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */ (0,
|
|
9286
|
+
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { className: "gantt-resourceTimeline-resourceTypeDropdownIcon", width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M2 3.5 5 6.5 8 3.5" }) });
|
|
9287
|
+
var ResourceGroupChevronIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { className: "gantt-resourceTimeline-resourceGroupChevronIcon", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M4 2.5 7.5 6 4 9.5" }) });
|
|
9060
9288
|
function isInactiveResourceStatus(status) {
|
|
9061
9289
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
9062
9290
|
}
|
|
9063
|
-
var ResourceStatusLockIcon = () => /* @__PURE__ */ (0,
|
|
9064
|
-
/* @__PURE__ */ (0,
|
|
9065
|
-
/* @__PURE__ */ (0,
|
|
9291
|
+
var ResourceStatusLockIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9292
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
9293
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
9066
9294
|
] });
|
|
9067
9295
|
var ResourceHeader = ({
|
|
9068
9296
|
resource,
|
|
@@ -9152,7 +9380,7 @@ var ResourceHeader = ({
|
|
|
9152
9380
|
handleNameCancel();
|
|
9153
9381
|
}
|
|
9154
9382
|
}, [applyResourcePatch, handleNameCancel, nameValue, resource.name]);
|
|
9155
|
-
return /* @__PURE__ */ (0,
|
|
9383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9156
9384
|
"div",
|
|
9157
9385
|
{
|
|
9158
9386
|
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
|
|
@@ -9163,10 +9391,10 @@ var ResourceHeader = ({
|
|
|
9163
9391
|
gridTemplateColumns: columnTemplate
|
|
9164
9392
|
},
|
|
9165
9393
|
children: [
|
|
9166
|
-
/* @__PURE__ */ (0,
|
|
9167
|
-
/* @__PURE__ */ (0,
|
|
9168
|
-
/* @__PURE__ */ (0,
|
|
9169
|
-
/* @__PURE__ */ (0,
|
|
9394
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
9396
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
9397
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9170
9398
|
"button",
|
|
9171
9399
|
{
|
|
9172
9400
|
type: "button",
|
|
@@ -9179,12 +9407,12 @@ var ResourceHeader = ({
|
|
|
9179
9407
|
setTypeMenuOpen((open) => !open);
|
|
9180
9408
|
},
|
|
9181
9409
|
children: [
|
|
9182
|
-
/* @__PURE__ */ (0,
|
|
9183
|
-
/* @__PURE__ */ (0,
|
|
9410
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeIcon, { type }),
|
|
9411
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeDropdownIcon, {})
|
|
9184
9412
|
]
|
|
9185
9413
|
}
|
|
9186
9414
|
) }),
|
|
9187
|
-
/* @__PURE__ */ (0,
|
|
9415
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9188
9416
|
"button",
|
|
9189
9417
|
{
|
|
9190
9418
|
type: "button",
|
|
@@ -9195,14 +9423,14 @@ var ResourceHeader = ({
|
|
|
9195
9423
|
applyResourcePatch({ type: option });
|
|
9196
9424
|
},
|
|
9197
9425
|
children: [
|
|
9198
|
-
/* @__PURE__ */ (0,
|
|
9426
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeIcon, { type: option }) }),
|
|
9199
9427
|
option
|
|
9200
9428
|
]
|
|
9201
9429
|
},
|
|
9202
9430
|
option
|
|
9203
9431
|
)) })
|
|
9204
9432
|
] }),
|
|
9205
|
-
editingName ? /* @__PURE__ */ (0,
|
|
9433
|
+
editingName ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9206
9434
|
Input,
|
|
9207
9435
|
{
|
|
9208
9436
|
ref: nameInputRef,
|
|
@@ -9214,7 +9442,7 @@ var ResourceHeader = ({
|
|
|
9214
9442
|
"aria-label": `\u041D\u043E\u0432\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}`,
|
|
9215
9443
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
9216
9444
|
}
|
|
9217
|
-
) : /* @__PURE__ */ (0,
|
|
9445
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9218
9446
|
"button",
|
|
9219
9447
|
{
|
|
9220
9448
|
type: "button",
|
|
@@ -9226,23 +9454,23 @@ var ResourceHeader = ({
|
|
|
9226
9454
|
onResourceNameClick?.(resourceId);
|
|
9227
9455
|
},
|
|
9228
9456
|
onDoubleClick: handleNameDoubleClick,
|
|
9229
|
-
children: /* @__PURE__ */ (0,
|
|
9230
|
-
isInactive && /* @__PURE__ */ (0,
|
|
9457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
9458
|
+
isInactive && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9231
9459
|
"span",
|
|
9232
9460
|
{
|
|
9233
9461
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
9234
9462
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
9235
9463
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
9236
|
-
children: /* @__PURE__ */ (0,
|
|
9464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceStatusLockIcon, {})
|
|
9237
9465
|
}
|
|
9238
9466
|
),
|
|
9239
|
-
/* @__PURE__ */ (0,
|
|
9467
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
9240
9468
|
] })
|
|
9241
9469
|
}
|
|
9242
9470
|
)
|
|
9243
9471
|
] }),
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9245
|
-
/* @__PURE__ */ (0,
|
|
9472
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
9473
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9246
9474
|
"button",
|
|
9247
9475
|
{
|
|
9248
9476
|
type: "button",
|
|
@@ -9253,10 +9481,10 @@ var ResourceHeader = ({
|
|
|
9253
9481
|
event.stopPropagation();
|
|
9254
9482
|
setScopeMenuOpen((open) => !open);
|
|
9255
9483
|
},
|
|
9256
|
-
children: /* @__PURE__ */ (0,
|
|
9484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: scopeLabel })
|
|
9257
9485
|
}
|
|
9258
9486
|
) }),
|
|
9259
|
-
/* @__PURE__ */ (0,
|
|
9487
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_SCOPE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9260
9488
|
"button",
|
|
9261
9489
|
{
|
|
9262
9490
|
type: "button",
|
|
@@ -9267,35 +9495,35 @@ var ResourceHeader = ({
|
|
|
9267
9495
|
applyResourcePatch({ scope: option });
|
|
9268
9496
|
},
|
|
9269
9497
|
children: [
|
|
9270
|
-
/* @__PURE__ */ (0,
|
|
9498
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
9271
9499
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
9272
9500
|
]
|
|
9273
9501
|
},
|
|
9274
9502
|
option
|
|
9275
9503
|
)) })
|
|
9276
9504
|
] }),
|
|
9277
|
-
/* @__PURE__ */ (0,
|
|
9505
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9278
9506
|
"span",
|
|
9279
9507
|
{
|
|
9280
9508
|
className: "gantt-resourceTimeline-resourceAssignments",
|
|
9281
9509
|
"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.`,
|
|
9282
9510
|
children: [
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9284
|
-
/* @__PURE__ */ (0,
|
|
9285
|
-
/* @__PURE__ */ (0,
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
9512
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
9513
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
9286
9514
|
] }),
|
|
9287
|
-
/* @__PURE__ */ (0,
|
|
9288
|
-
/* @__PURE__ */ (0,
|
|
9289
|
-
assignmentCount > 0 && /* @__PURE__ */ (0,
|
|
9290
|
-
/* @__PURE__ */ (0,
|
|
9291
|
-
/* @__PURE__ */ (0,
|
|
9515
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
9516
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
9517
|
+
assignmentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "gantt-resourceTimeline-resourceAssignmentIcon", width: "14", height: "14", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
9519
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
9292
9520
|
] })
|
|
9293
9521
|
] })
|
|
9294
9522
|
]
|
|
9295
9523
|
}
|
|
9296
9524
|
),
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
conflictCount > 0 && /* @__PURE__ */ (0,
|
|
9525
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
9526
|
+
conflictCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9299
9527
|
"button",
|
|
9300
9528
|
{
|
|
9301
9529
|
type: "button",
|
|
@@ -9309,8 +9537,8 @@ var ResourceHeader = ({
|
|
|
9309
9537
|
children: conflictCount
|
|
9310
9538
|
}
|
|
9311
9539
|
),
|
|
9312
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
9313
|
-
/* @__PURE__ */ (0,
|
|
9540
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
9541
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9314
9542
|
"button",
|
|
9315
9543
|
{
|
|
9316
9544
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -9320,10 +9548,10 @@ var ResourceHeader = ({
|
|
|
9320
9548
|
event.stopPropagation();
|
|
9321
9549
|
setMenuOpen((open) => !open);
|
|
9322
9550
|
},
|
|
9323
|
-
children: /* @__PURE__ */ (0,
|
|
9551
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
9324
9552
|
}
|
|
9325
9553
|
) }),
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverContent, { className: "gantt-resourceTimeline-resourceMenu", portal: true, align: "end", children: visibleCommands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9327
9555
|
"button",
|
|
9328
9556
|
{
|
|
9329
9557
|
type: "button",
|
|
@@ -9376,7 +9604,7 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9376
9604
|
handleConfirm();
|
|
9377
9605
|
}
|
|
9378
9606
|
};
|
|
9379
|
-
return /* @__PURE__ */ (0,
|
|
9607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9380
9608
|
"div",
|
|
9381
9609
|
{
|
|
9382
9610
|
className: "gantt-resourceTimeline-resourceHeader gantt-resourceTimeline-resourceHeaderNew",
|
|
@@ -9386,8 +9614,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9386
9614
|
gridTemplateColumns: columnTemplate
|
|
9387
9615
|
},
|
|
9388
9616
|
children: [
|
|
9389
|
-
/* @__PURE__ */ (0,
|
|
9390
|
-
/* @__PURE__ */ (0,
|
|
9617
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
9618
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9391
9619
|
Input,
|
|
9392
9620
|
{
|
|
9393
9621
|
ref: inputRef,
|
|
@@ -9566,7 +9794,7 @@ function ResourceTimelineChart({
|
|
|
9566
9794
|
document.body.style.cursor = "col-resize";
|
|
9567
9795
|
document.body.style.userSelect = "none";
|
|
9568
9796
|
}, [resolvedResourceColumnWidths]);
|
|
9569
|
-
const renderResizeHandle = (0, import_react15.useCallback)((columnId) => /* @__PURE__ */ (0,
|
|
9797
|
+
const renderResizeHandle = (0, import_react15.useCallback)((columnId) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9570
9798
|
"button",
|
|
9571
9799
|
{
|
|
9572
9800
|
type: "button",
|
|
@@ -9877,7 +10105,7 @@ function ResourceTimelineChart({
|
|
|
9877
10105
|
}
|
|
9878
10106
|
};
|
|
9879
10107
|
}, []);
|
|
9880
|
-
return /* @__PURE__ */ (0,
|
|
10108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9881
10109
|
"div",
|
|
9882
10110
|
{
|
|
9883
10111
|
ref: scrollContainerRef,
|
|
@@ -9888,44 +10116,44 @@ function ResourceTimelineChart({
|
|
|
9888
10116
|
},
|
|
9889
10117
|
"data-allow-vertical-pan": allowVerticalPan ? "true" : "false",
|
|
9890
10118
|
onMouseDown: handlePanStart,
|
|
9891
|
-
children: /* @__PURE__ */ (0,
|
|
9892
|
-
/* @__PURE__ */ (0,
|
|
10119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-scrollContent", children: [
|
|
10120
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9893
10121
|
"div",
|
|
9894
10122
|
{
|
|
9895
10123
|
className: `gantt-resourceTimeline-resourceColumn${resourceColumnHasRightShadow ? " gantt-resourceTimeline-resourceColumnShadowed" : ""}`,
|
|
9896
10124
|
style: { width: `${effectiveRowHeaderWidth}px`, minWidth: `${effectiveRowHeaderWidth}px` },
|
|
9897
10125
|
children: [
|
|
9898
|
-
/* @__PURE__ */ (0,
|
|
10126
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9899
10127
|
"div",
|
|
9900
10128
|
{
|
|
9901
10129
|
className: "gantt-resourceTimeline-corner",
|
|
9902
10130
|
style: { height: `${timelineHeaderHeight}px`, gridTemplateColumns: resourceColumnTemplate },
|
|
9903
10131
|
children: [
|
|
9904
|
-
/* @__PURE__ */ (0,
|
|
10132
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderNumber", children: [
|
|
9905
10133
|
"#",
|
|
9906
10134
|
renderResizeHandle("number")
|
|
9907
10135
|
] }),
|
|
9908
|
-
/* @__PURE__ */ (0,
|
|
10136
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderName", children: [
|
|
9909
10137
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
9910
10138
|
renderResizeHandle("name")
|
|
9911
10139
|
] }),
|
|
9912
|
-
/* @__PURE__ */ (0,
|
|
9913
|
-
/* @__PURE__ */ (0,
|
|
10140
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceHeaderCell", "aria-label": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C", children: renderResizeHandle("availability") }),
|
|
10141
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
9914
10142
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
9915
10143
|
renderResizeHandle("assignments")
|
|
9916
10144
|
] }),
|
|
9917
|
-
/* @__PURE__ */ (0,
|
|
10145
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderActions", "aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F", children: renderResizeHandle("actions") })
|
|
9918
10146
|
]
|
|
9919
10147
|
}
|
|
9920
10148
|
),
|
|
9921
|
-
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0,
|
|
9922
|
-
/* @__PURE__ */ (0,
|
|
10149
|
+
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react15.default.Fragment, { children: [
|
|
10150
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9923
10151
|
"div",
|
|
9924
10152
|
{
|
|
9925
10153
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
9926
10154
|
style: { height: `${group.height}px` },
|
|
9927
10155
|
children: [
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10156
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9929
10157
|
"button",
|
|
9930
10158
|
{
|
|
9931
10159
|
type: "button",
|
|
@@ -9936,12 +10164,12 @@ function ResourceTimelineChart({
|
|
|
9936
10164
|
event.stopPropagation();
|
|
9937
10165
|
toggleResourceGroupCollapsed(group.key);
|
|
9938
10166
|
},
|
|
9939
|
-
children: /* @__PURE__ */ (0,
|
|
10167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceGroupChevronIcon, {})
|
|
9940
10168
|
}
|
|
9941
10169
|
),
|
|
9942
|
-
/* @__PURE__ */ (0,
|
|
9943
|
-
/* @__PURE__ */ (0,
|
|
9944
|
-
canAddResource && /* @__PURE__ */ (0,
|
|
10170
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
10171
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
10172
|
+
canAddResource && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9945
10173
|
"button",
|
|
9946
10174
|
{
|
|
9947
10175
|
type: "button",
|
|
@@ -9960,7 +10188,7 @@ function ResourceTimelineChart({
|
|
|
9960
10188
|
),
|
|
9961
10189
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
9962
10190
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
9963
|
-
return /* @__PURE__ */ (0,
|
|
10191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9964
10192
|
ResourceHeader,
|
|
9965
10193
|
{
|
|
9966
10194
|
resource: row.resource,
|
|
@@ -9980,7 +10208,7 @@ function ResourceTimelineChart({
|
|
|
9980
10208
|
row.resourceId
|
|
9981
10209
|
);
|
|
9982
10210
|
}),
|
|
9983
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ (0,
|
|
10211
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9984
10212
|
NewResourceRow,
|
|
9985
10213
|
{
|
|
9986
10214
|
height: resourceAddRowHeight,
|
|
@@ -9989,7 +10217,7 @@ function ResourceTimelineChart({
|
|
|
9989
10217
|
columnTemplate: resourceColumnTemplate
|
|
9990
10218
|
}
|
|
9991
10219
|
)
|
|
9992
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ (0,
|
|
10220
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9993
10221
|
ResourceHeader,
|
|
9994
10222
|
{
|
|
9995
10223
|
resource: row.resource,
|
|
@@ -10008,7 +10236,7 @@ function ResourceTimelineChart({
|
|
|
10008
10236
|
},
|
|
10009
10237
|
row.resourceId
|
|
10010
10238
|
)),
|
|
10011
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */ (0,
|
|
10239
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10012
10240
|
NewResourceRow,
|
|
10013
10241
|
{
|
|
10014
10242
|
height: resourceAddRowHeight,
|
|
@@ -10016,7 +10244,7 @@ function ResourceTimelineChart({
|
|
|
10016
10244
|
onCancel: handleCancelNewResource,
|
|
10017
10245
|
columnTemplate: resourceColumnTemplate
|
|
10018
10246
|
}
|
|
10019
|
-
) : /* @__PURE__ */ (0,
|
|
10247
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10020
10248
|
"button",
|
|
10021
10249
|
{
|
|
10022
10250
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -10032,18 +10260,18 @@ function ResourceTimelineChart({
|
|
|
10032
10260
|
]
|
|
10033
10261
|
}
|
|
10034
10262
|
),
|
|
10035
|
-
/* @__PURE__ */ (0,
|
|
10263
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10036
10264
|
"div",
|
|
10037
10265
|
{
|
|
10038
10266
|
className: "gantt-resourceTimeline-chartSurface",
|
|
10039
10267
|
style: { minWidth: `${gridWidth}px` },
|
|
10040
10268
|
children: [
|
|
10041
|
-
/* @__PURE__ */ (0,
|
|
10269
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10042
10270
|
"div",
|
|
10043
10271
|
{
|
|
10044
10272
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
10045
10273
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
10046
|
-
children: /* @__PURE__ */ (0,
|
|
10274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10047
10275
|
TimeScaleHeader_default,
|
|
10048
10276
|
{
|
|
10049
10277
|
days: dateRange,
|
|
@@ -10055,14 +10283,14 @@ function ResourceTimelineChart({
|
|
|
10055
10283
|
)
|
|
10056
10284
|
}
|
|
10057
10285
|
),
|
|
10058
|
-
/* @__PURE__ */ (0,
|
|
10286
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10059
10287
|
"div",
|
|
10060
10288
|
{
|
|
10061
10289
|
ref: gridRef,
|
|
10062
10290
|
className: "gantt-resourceTimeline-grid",
|
|
10063
10291
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
10064
10292
|
children: [
|
|
10065
|
-
/* @__PURE__ */ (0,
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10066
10294
|
GridBackground_default,
|
|
10067
10295
|
{
|
|
10068
10296
|
dateRange,
|
|
@@ -10072,8 +10300,8 @@ function ResourceTimelineChart({
|
|
|
10072
10300
|
isCustomWeekend: weekendPredicate
|
|
10073
10301
|
}
|
|
10074
10302
|
),
|
|
10075
|
-
todayInRange && /* @__PURE__ */ (0,
|
|
10076
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0,
|
|
10303
|
+
todayInRange && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TodayIndicator_default, { monthStart, dayWidth }),
|
|
10304
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10077
10305
|
"div",
|
|
10078
10306
|
{
|
|
10079
10307
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -10085,7 +10313,7 @@ function ResourceTimelineChart({
|
|
|
10085
10313
|
},
|
|
10086
10314
|
`group-row-${group.key}`
|
|
10087
10315
|
)),
|
|
10088
|
-
displayLayout.rows.map((row) => /* @__PURE__ */ (0,
|
|
10316
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10089
10317
|
"div",
|
|
10090
10318
|
{
|
|
10091
10319
|
className: "gantt-resourceTimeline-row",
|
|
@@ -10097,7 +10325,7 @@ function ResourceTimelineChart({
|
|
|
10097
10325
|
},
|
|
10098
10326
|
row.resourceId
|
|
10099
10327
|
)),
|
|
10100
|
-
canAddResource && /* @__PURE__ */ (0,
|
|
10328
|
+
canAddResource && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10101
10329
|
"div",
|
|
10102
10330
|
{
|
|
10103
10331
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10108,7 +10336,7 @@ function ResourceTimelineChart({
|
|
|
10108
10336
|
}
|
|
10109
10337
|
}
|
|
10110
10338
|
),
|
|
10111
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ (0,
|
|
10339
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10112
10340
|
"div",
|
|
10113
10341
|
{
|
|
10114
10342
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10179,7 +10407,7 @@ function ResourceTimelineChart({
|
|
|
10179
10407
|
const tooltipFirstLine = layoutItem.item.tooltip?.firstLine ?? layoutItem.item.title;
|
|
10180
10408
|
const tooltipSecondLine = resourceItemTooltipLines === 2 ? layoutItem.item.tooltip?.secondLine ?? layoutItem.item.subtitle : void 0;
|
|
10181
10409
|
const tooltipSecondLineIcon = layoutItem.item.tooltip?.secondLineIcon;
|
|
10182
|
-
return /* @__PURE__ */ (0,
|
|
10410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10183
10411
|
"div",
|
|
10184
10412
|
{
|
|
10185
10413
|
className,
|
|
@@ -10207,11 +10435,11 @@ function ResourceTimelineChart({
|
|
|
10207
10435
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
10208
10436
|
},
|
|
10209
10437
|
children: [
|
|
10210
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */ (0,
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
10212
|
-
/* @__PURE__ */ (0,
|
|
10438
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
10439
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
10440
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
10213
10441
|
] }),
|
|
10214
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ (0,
|
|
10442
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10215
10443
|
"span",
|
|
10216
10444
|
{
|
|
10217
10445
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -10223,7 +10451,7 @@ function ResourceTimelineChart({
|
|
|
10223
10451
|
},
|
|
10224
10452
|
`weekend-overlay-${index}`
|
|
10225
10453
|
)),
|
|
10226
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ (0,
|
|
10454
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10227
10455
|
"span",
|
|
10228
10456
|
{
|
|
10229
10457
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -10235,7 +10463,7 @@ function ResourceTimelineChart({
|
|
|
10235
10463
|
},
|
|
10236
10464
|
`conflict-overlay-${index}`
|
|
10237
10465
|
)),
|
|
10238
|
-
hasItemMenu && /* @__PURE__ */ (0,
|
|
10466
|
+
hasItemMenu && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10239
10467
|
"button",
|
|
10240
10468
|
{
|
|
10241
10469
|
type: "button",
|
|
@@ -10248,12 +10476,12 @@ function ResourceTimelineChart({
|
|
|
10248
10476
|
event.stopPropagation();
|
|
10249
10477
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
10250
10478
|
},
|
|
10251
|
-
children: /* @__PURE__ */ (0,
|
|
10479
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
10252
10480
|
}
|
|
10253
10481
|
),
|
|
10254
|
-
/* @__PURE__ */ (0,
|
|
10255
|
-
/* @__PURE__ */ (0,
|
|
10256
|
-
/* @__PURE__ */ (0,
|
|
10482
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "gantt-resourceTimeline-itemInner", children: renderItem ? renderItem(layoutItem.item, renderContext) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-defaultItemContent", children: [
|
|
10483
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10257
10485
|
"span",
|
|
10258
10486
|
{
|
|
10259
10487
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -10261,15 +10489,15 @@ function ResourceTimelineChart({
|
|
|
10261
10489
|
children: durationValue
|
|
10262
10490
|
}
|
|
10263
10491
|
),
|
|
10264
|
-
/* @__PURE__ */ (0,
|
|
10492
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
10265
10493
|
] }),
|
|
10266
|
-
layoutItem.item.subtitle && /* @__PURE__ */ (0,
|
|
10494
|
+
layoutItem.item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
10267
10495
|
] }) }),
|
|
10268
|
-
/* @__PURE__ */ (0,
|
|
10269
|
-
/* @__PURE__ */ (0,
|
|
10270
|
-
tooltipSecondLine && /* @__PURE__ */ (0,
|
|
10271
|
-
tooltipSecondLineIcon && /* @__PURE__ */ (0,
|
|
10272
|
-
/* @__PURE__ */ (0,
|
|
10496
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
10497
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
10498
|
+
tooltipSecondLine && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
10499
|
+
tooltipSecondLineIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
10500
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
10273
10501
|
] })
|
|
10274
10502
|
] })
|
|
10275
10503
|
]
|
|
@@ -10291,7 +10519,7 @@ function ResourceTimelineChart({
|
|
|
10291
10519
|
|
|
10292
10520
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
10293
10521
|
var import_react16 = require("react");
|
|
10294
|
-
var
|
|
10522
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
10295
10523
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
10296
10524
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
10297
10525
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
@@ -10491,9 +10719,9 @@ function TableMatrix({
|
|
|
10491
10719
|
return task ? { task, index } : null;
|
|
10492
10720
|
}).filter((entry) => entry !== null);
|
|
10493
10721
|
}, [tasks, visibleRowIndices]);
|
|
10494
|
-
return /* @__PURE__ */ (0,
|
|
10495
|
-
hasAutoWidthColumns && /* @__PURE__ */ (0,
|
|
10496
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0,
|
|
10722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
10723
|
+
hasAutoWidthColumns && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
10724
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10497
10725
|
"div",
|
|
10498
10726
|
{
|
|
10499
10727
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10502,7 +10730,7 @@ function TableMatrix({
|
|
|
10502
10730
|
},
|
|
10503
10731
|
`header:${column.id}`
|
|
10504
10732
|
)),
|
|
10505
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0,
|
|
10733
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10506
10734
|
"div",
|
|
10507
10735
|
{
|
|
10508
10736
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10512,8 +10740,8 @@ function TableMatrix({
|
|
|
10512
10740
|
`${task.id}:${column.id}`
|
|
10513
10741
|
)))
|
|
10514
10742
|
] }),
|
|
10515
|
-
/* @__PURE__ */ (0,
|
|
10516
|
-
hasGroupHeader && /* @__PURE__ */ (0,
|
|
10743
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
10744
|
+
hasGroupHeader && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10517
10745
|
"div",
|
|
10518
10746
|
{
|
|
10519
10747
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -10521,7 +10749,7 @@ function TableMatrix({
|
|
|
10521
10749
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
10522
10750
|
height: `${topRowHeight}px`
|
|
10523
10751
|
},
|
|
10524
|
-
children: headerSpans.map((span) => /* @__PURE__ */ (0,
|
|
10752
|
+
children: headerSpans.map((span) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10525
10753
|
"div",
|
|
10526
10754
|
{
|
|
10527
10755
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -10532,7 +10760,7 @@ function TableMatrix({
|
|
|
10532
10760
|
))
|
|
10533
10761
|
}
|
|
10534
10762
|
),
|
|
10535
|
-
/* @__PURE__ */ (0,
|
|
10763
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10536
10764
|
"div",
|
|
10537
10765
|
{
|
|
10538
10766
|
className: "gantt-mx-headerRow",
|
|
@@ -10540,7 +10768,7 @@ function TableMatrix({
|
|
|
10540
10768
|
children: columns.map((column) => {
|
|
10541
10769
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10542
10770
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10543
|
-
return /* @__PURE__ */ (0,
|
|
10771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10544
10772
|
"div",
|
|
10545
10773
|
{
|
|
10546
10774
|
className: joinClasses(
|
|
@@ -10549,7 +10777,7 @@ function TableMatrix({
|
|
|
10549
10777
|
),
|
|
10550
10778
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
10551
10779
|
children: [
|
|
10552
|
-
shouldRenderOverlayEdge && /* @__PURE__ */ (0,
|
|
10780
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10553
10781
|
"span",
|
|
10554
10782
|
{
|
|
10555
10783
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10559,7 +10787,7 @@ function TableMatrix({
|
|
|
10559
10787
|
}
|
|
10560
10788
|
}
|
|
10561
10789
|
),
|
|
10562
|
-
/* @__PURE__ */ (0,
|
|
10790
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
10563
10791
|
]
|
|
10564
10792
|
},
|
|
10565
10793
|
column.id
|
|
@@ -10568,7 +10796,7 @@ function TableMatrix({
|
|
|
10568
10796
|
}
|
|
10569
10797
|
)
|
|
10570
10798
|
] }),
|
|
10571
|
-
/* @__PURE__ */ (0,
|
|
10799
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10572
10800
|
"div",
|
|
10573
10801
|
{
|
|
10574
10802
|
className: "gantt-mx-body",
|
|
@@ -10582,7 +10810,7 @@ function TableMatrix({
|
|
|
10582
10810
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
10583
10811
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
10584
10812
|
const isTotal = Boolean(task.isTotal);
|
|
10585
|
-
return /* @__PURE__ */ (0,
|
|
10813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10586
10814
|
"div",
|
|
10587
10815
|
{
|
|
10588
10816
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10607,7 +10835,7 @@ function TableMatrix({
|
|
|
10607
10835
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10608
10836
|
const shouldRenderOverlay = overlayWidthPercent > 0 && (!dateOverlay || !dateOverlay.shouldRender || dateOverlay.shouldRender({ task, column, rowIndex: index, columnIndex }));
|
|
10609
10837
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10610
|
-
return /* @__PURE__ */ (0,
|
|
10838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10611
10839
|
"div",
|
|
10612
10840
|
{
|
|
10613
10841
|
className: joinClasses(
|
|
@@ -10622,7 +10850,7 @@ function TableMatrix({
|
|
|
10622
10850
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
10623
10851
|
},
|
|
10624
10852
|
children: [
|
|
10625
|
-
shouldRenderOverlay && /* @__PURE__ */ (0,
|
|
10853
|
+
shouldRenderOverlay && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10626
10854
|
"span",
|
|
10627
10855
|
{
|
|
10628
10856
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -10632,7 +10860,7 @@ function TableMatrix({
|
|
|
10632
10860
|
}
|
|
10633
10861
|
}
|
|
10634
10862
|
),
|
|
10635
|
-
shouldRenderOverlayEdge && /* @__PURE__ */ (0,
|
|
10863
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10636
10864
|
"span",
|
|
10637
10865
|
{
|
|
10638
10866
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10642,7 +10870,7 @@ function TableMatrix({
|
|
|
10642
10870
|
}
|
|
10643
10871
|
}
|
|
10644
10872
|
),
|
|
10645
|
-
/* @__PURE__ */ (0,
|
|
10873
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
10646
10874
|
]
|
|
10647
10875
|
},
|
|
10648
10876
|
`${task.id}:${column.id}`
|
|
@@ -10659,7 +10887,7 @@ function TableMatrix({
|
|
|
10659
10887
|
|
|
10660
10888
|
// src/components/PlanFactMatrix/PlanFactMatrix.tsx
|
|
10661
10889
|
var import_react17 = __toESM(require("react"));
|
|
10662
|
-
var
|
|
10890
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
10663
10891
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
10664
10892
|
function joinClasses2(...values) {
|
|
10665
10893
|
return values.filter(Boolean).join(" ");
|
|
@@ -10768,7 +10996,7 @@ function PlanFactCellEditor({
|
|
|
10768
10996
|
}
|
|
10769
10997
|
onCommit(parsed);
|
|
10770
10998
|
}, [draft, onCancel, onCommit]);
|
|
10771
|
-
return /* @__PURE__ */ (0,
|
|
10999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10772
11000
|
"input",
|
|
10773
11001
|
{
|
|
10774
11002
|
ref: inputRef,
|
|
@@ -10882,7 +11110,7 @@ function PlanFactRowInner({
|
|
|
10882
11110
|
showOverflowTooltip,
|
|
10883
11111
|
hideOverflowTooltip
|
|
10884
11112
|
}) {
|
|
10885
|
-
return /* @__PURE__ */ (0,
|
|
11113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10886
11114
|
"div",
|
|
10887
11115
|
{
|
|
10888
11116
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10920,7 +11148,7 @@ function PlanFactRowInner({
|
|
|
10920
11148
|
const isSelected = !isParent && isInRenderedRange;
|
|
10921
11149
|
const showFillHandle = !isParent && !isEditing && isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.toDateIndex && subrowIndex === renderedRangeBounds.toSubrowIndex;
|
|
10922
11150
|
const isRangeAnchor = !showFillHandle && !isParent && selectedRange?.anchor.taskId === task.id && selectedRange.anchor.dateIndex === dateIndex && selectedRange.anchor.kind === kind;
|
|
10923
|
-
return /* @__PURE__ */ (0,
|
|
11151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10924
11152
|
"div",
|
|
10925
11153
|
{
|
|
10926
11154
|
"data-plan-fact-task-id": task.id,
|
|
@@ -11017,7 +11245,7 @@ function PlanFactRowInner({
|
|
|
11017
11245
|
}
|
|
11018
11246
|
},
|
|
11019
11247
|
children: [
|
|
11020
|
-
isEditing ? /* @__PURE__ */ (0,
|
|
11248
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11021
11249
|
PlanFactCellEditor,
|
|
11022
11250
|
{
|
|
11023
11251
|
value,
|
|
@@ -11043,7 +11271,7 @@ function PlanFactRowInner({
|
|
|
11043
11271
|
focusCell(nextActiveCell);
|
|
11044
11272
|
}
|
|
11045
11273
|
}
|
|
11046
|
-
) : /* @__PURE__ */ (0,
|
|
11274
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11047
11275
|
"span",
|
|
11048
11276
|
{
|
|
11049
11277
|
className: "gantt-pf-cellValue",
|
|
@@ -11057,7 +11285,7 @@ function PlanFactRowInner({
|
|
|
11057
11285
|
children: isParent ? "" : formatValue(value)
|
|
11058
11286
|
}
|
|
11059
11287
|
),
|
|
11060
|
-
showFillHandle && /* @__PURE__ */ (0,
|
|
11288
|
+
showFillHandle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11061
11289
|
"span",
|
|
11062
11290
|
{
|
|
11063
11291
|
className: "gantt-pf-fillHandle",
|
|
@@ -11569,7 +11797,7 @@ function PlanFactMatrix({
|
|
|
11569
11797
|
document.removeEventListener("mousedown", handleMouseDown);
|
|
11570
11798
|
};
|
|
11571
11799
|
}, [clearSelection]);
|
|
11572
|
-
return /* @__PURE__ */ (0,
|
|
11800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
11573
11801
|
"div",
|
|
11574
11802
|
{
|
|
11575
11803
|
ref: rootRef,
|
|
@@ -11579,8 +11807,8 @@ function PlanFactMatrix({
|
|
|
11579
11807
|
["--gantt-pf-day-width"]: `${dayWidth}px`
|
|
11580
11808
|
},
|
|
11581
11809
|
children: [
|
|
11582
|
-
/* @__PURE__ */ (0,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
11810
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
11811
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11584
11812
|
"div",
|
|
11585
11813
|
{
|
|
11586
11814
|
className: "gantt-pf-dateWindow",
|
|
@@ -11588,7 +11816,7 @@ function PlanFactMatrix({
|
|
|
11588
11816
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11589
11817
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11590
11818
|
},
|
|
11591
|
-
children: /* @__PURE__ */ (0,
|
|
11819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11592
11820
|
TimeScaleHeader_default,
|
|
11593
11821
|
{
|
|
11594
11822
|
days: renderedDateWindow.days,
|
|
@@ -11600,7 +11828,7 @@ function PlanFactMatrix({
|
|
|
11600
11828
|
)
|
|
11601
11829
|
}
|
|
11602
11830
|
),
|
|
11603
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ (0,
|
|
11831
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11604
11832
|
"span",
|
|
11605
11833
|
{
|
|
11606
11834
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -11612,7 +11840,7 @@ function PlanFactMatrix({
|
|
|
11612
11840
|
}
|
|
11613
11841
|
)
|
|
11614
11842
|
] }),
|
|
11615
|
-
/* @__PURE__ */ (0,
|
|
11843
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "gantt-pf-monthSeparatorLayer", "aria-hidden": "true", children: monthSeparatorIndices.map((dateIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11616
11844
|
"span",
|
|
11617
11845
|
{
|
|
11618
11846
|
className: "gantt-pf-monthSeparator",
|
|
@@ -11623,7 +11851,7 @@ function PlanFactMatrix({
|
|
|
11623
11851
|
},
|
|
11624
11852
|
`month-separator-${dateIndex}`
|
|
11625
11853
|
)) }),
|
|
11626
|
-
/* @__PURE__ */ (0,
|
|
11854
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
11627
11855
|
"div",
|
|
11628
11856
|
{
|
|
11629
11857
|
ref: bodyRef,
|
|
@@ -11634,7 +11862,7 @@ function PlanFactMatrix({
|
|
|
11634
11862
|
width: `${totalWidth}px`
|
|
11635
11863
|
},
|
|
11636
11864
|
children: [
|
|
11637
|
-
/* @__PURE__ */ (0,
|
|
11865
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11638
11866
|
"div",
|
|
11639
11867
|
{
|
|
11640
11868
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -11642,7 +11870,7 @@ function PlanFactMatrix({
|
|
|
11642
11870
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11643
11871
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11644
11872
|
},
|
|
11645
|
-
children: /* @__PURE__ */ (0,
|
|
11873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11646
11874
|
GridBackground_default,
|
|
11647
11875
|
{
|
|
11648
11876
|
dateRange: renderedDateWindow.days,
|
|
@@ -11660,7 +11888,7 @@ function PlanFactMatrix({
|
|
|
11660
11888
|
if (!task) return null;
|
|
11661
11889
|
const isParent = parentTaskIds.has(task.id);
|
|
11662
11890
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
11663
|
-
return /* @__PURE__ */ (0,
|
|
11891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11664
11892
|
PlanFactRow,
|
|
11665
11893
|
{
|
|
11666
11894
|
task,
|
|
@@ -11705,7 +11933,7 @@ function PlanFactMatrix({
|
|
|
11705
11933
|
]
|
|
11706
11934
|
}
|
|
11707
11935
|
),
|
|
11708
|
-
overflowTooltip && /* @__PURE__ */ (0,
|
|
11936
|
+
overflowTooltip && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11709
11937
|
"div",
|
|
11710
11938
|
{
|
|
11711
11939
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -12131,7 +12359,7 @@ function createTaskPreviewPositionStore() {
|
|
|
12131
12359
|
}
|
|
12132
12360
|
|
|
12133
12361
|
// src/components/GanttChart/GanttChart.tsx
|
|
12134
|
-
var
|
|
12362
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
12135
12363
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
12136
12364
|
var TASK_ROW_OVERSCAN = 8;
|
|
12137
12365
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
@@ -12258,9 +12486,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
12258
12486
|
}
|
|
12259
12487
|
function GanttChartInner(props, ref) {
|
|
12260
12488
|
if (props.mode === "resource-planner") {
|
|
12261
|
-
return /* @__PURE__ */ (0,
|
|
12489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ResourceTimelineChart, { ...props });
|
|
12262
12490
|
}
|
|
12263
|
-
return /* @__PURE__ */ (0,
|
|
12491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
12264
12492
|
TaskGanttChart,
|
|
12265
12493
|
{
|
|
12266
12494
|
...props,
|
|
@@ -12296,6 +12524,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12296
12524
|
onDemoteTask,
|
|
12297
12525
|
onUngroupTask,
|
|
12298
12526
|
enableAddTask = true,
|
|
12527
|
+
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
12299
12528
|
defaultTaskDurationDays,
|
|
12300
12529
|
taskFilter,
|
|
12301
12530
|
filterMode = "highlight",
|
|
@@ -12352,6 +12581,162 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12352
12581
|
const [forceFullRenderForPrint, setForceFullRenderForPrint] = (0, import_react18.useState)(false);
|
|
12353
12582
|
const [planFactDateWindow, setPlanFactDateWindow] = (0, import_react18.useState)({ start: 0, end: 0 });
|
|
12354
12583
|
const [selectedChip, setSelectedChip] = (0, import_react18.useState)(null);
|
|
12584
|
+
const [dependencyCreationDrag, setDependencyCreationDrag] = (0, import_react18.useState)(null);
|
|
12585
|
+
const dependencyCreationRef = (0, import_react18.useRef)(null);
|
|
12586
|
+
const [dependencyCreationError, setDependencyCreationError] = (0, import_react18.useState)(null);
|
|
12587
|
+
const [dependencyLineMenu, setDependencyLineMenu] = (0, import_react18.useState)(null);
|
|
12588
|
+
const getDependencyPortPoint = (0, import_react18.useCallback)((element, chartRect) => {
|
|
12589
|
+
const rect = element.getBoundingClientRect();
|
|
12590
|
+
const side = element.getAttribute("data-port-side");
|
|
12591
|
+
return {
|
|
12592
|
+
// The port hit-area is deliberately outside the bar. Anchor the preview
|
|
12593
|
+
// to the actual bar boundary instead of the center of that outside zone.
|
|
12594
|
+
x: Math.round((side === "left" ? rect.right - 6 : rect.left + 6) - chartRect.left),
|
|
12595
|
+
y: Math.round(rect.top + rect.height / 2 - chartRect.top)
|
|
12596
|
+
};
|
|
12597
|
+
}, []);
|
|
12598
|
+
const getVisualDependencyType = (0, import_react18.useCallback)((sourceSide, targetSide) => {
|
|
12599
|
+
if (sourceSide === "right" && targetSide === "left") return "FS";
|
|
12600
|
+
if (sourceSide === "left" && targetSide === "left") return "SS";
|
|
12601
|
+
if (sourceSide === "right" && targetSide === "right") return "FF";
|
|
12602
|
+
return "SF";
|
|
12603
|
+
}, []);
|
|
12604
|
+
const handleDependencyPortPointerDown = (0, import_react18.useCallback)((sourceId, sourceSide, event) => {
|
|
12605
|
+
if (disableDependencyEditing || event.button !== 0) return;
|
|
12606
|
+
const chartElement = event.currentTarget.closest(".gantt-taskArea");
|
|
12607
|
+
if (!(chartElement instanceof HTMLElement)) return;
|
|
12608
|
+
event.preventDefault();
|
|
12609
|
+
event.stopPropagation();
|
|
12610
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
12611
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12612
|
+
const source = getDependencyPortPoint(event.currentTarget, chartRect);
|
|
12613
|
+
const nextDrag = { sourceId, sourceSide, source, current: source };
|
|
12614
|
+
dependencyCreationRef.current = nextDrag;
|
|
12615
|
+
setDependencyCreationDrag(nextDrag);
|
|
12616
|
+
}, [disableDependencyEditing, getDependencyPortPoint]);
|
|
12617
|
+
(0, import_react18.useEffect)(() => {
|
|
12618
|
+
if (!dependencyCreationDrag) return;
|
|
12619
|
+
const handlePointerMove = (event) => {
|
|
12620
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12621
|
+
const chartElement = scrollContentRef.current?.querySelector(".gantt-taskArea");
|
|
12622
|
+
if (!activeDrag || !(chartElement instanceof HTMLElement)) return;
|
|
12623
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12624
|
+
const targetElement = document.elementFromPoint(event.clientX, event.clientY)?.closest("[data-gantt-dependency-port]");
|
|
12625
|
+
const targetTaskId = targetElement?.getAttribute("data-task-id") ?? void 0;
|
|
12626
|
+
const targetSide = targetElement?.getAttribute("data-port-side");
|
|
12627
|
+
const target = targetTaskId && targetSide && targetTaskId !== activeDrag.sourceId ? { taskId: targetTaskId, side: targetSide } : void 0;
|
|
12628
|
+
const current = targetElement ? getDependencyPortPoint(targetElement, chartRect) : { x: Math.round(event.clientX - chartRect.left), y: Math.round(event.clientY - chartRect.top) };
|
|
12629
|
+
const nextDrag = {
|
|
12630
|
+
...activeDrag,
|
|
12631
|
+
current,
|
|
12632
|
+
target,
|
|
12633
|
+
linkType: target ? getVisualDependencyType(activeDrag.sourceSide, target.side) : void 0
|
|
12634
|
+
};
|
|
12635
|
+
dependencyCreationRef.current = nextDrag;
|
|
12636
|
+
setDependencyCreationDrag(nextDrag);
|
|
12637
|
+
};
|
|
12638
|
+
const handlePointerUp = () => {
|
|
12639
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12640
|
+
dependencyCreationRef.current = null;
|
|
12641
|
+
setDependencyCreationDrag(null);
|
|
12642
|
+
if (!activeDrag?.target || !activeDrag.linkType) return;
|
|
12643
|
+
const predecessorId = activeDrag.sourceId;
|
|
12644
|
+
const successorId = activeDrag.target.taskId;
|
|
12645
|
+
const successor = tasks.find((task) => task.id === successorId);
|
|
12646
|
+
if (!successor || areTasksHierarchicallyRelated(predecessorId, successorId, tasks)) {
|
|
12647
|
+
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");
|
|
12648
|
+
return;
|
|
12649
|
+
}
|
|
12650
|
+
const nextDependency = { taskId: predecessorId, type: activeDrag.linkType, lag: 0 };
|
|
12651
|
+
if ((successor.dependencies ?? []).some((dependency) => dependency.taskId === predecessorId && dependency.type === nextDependency.type)) return;
|
|
12652
|
+
const hypothetical = tasks.map((task) => task.id === successorId ? { ...task, dependencies: [...task.dependencies ?? [], nextDependency] } : task);
|
|
12653
|
+
const validation = validateDependencies(hypothetical);
|
|
12654
|
+
if (!validation.isValid) {
|
|
12655
|
+
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!");
|
|
12656
|
+
return;
|
|
12657
|
+
}
|
|
12658
|
+
const predecessor = tasks.find((task) => task.id === predecessorId);
|
|
12659
|
+
const updatedSuccessor = hypothetical.find((task) => task.id === successorId);
|
|
12660
|
+
if (!predecessor) {
|
|
12661
|
+
onTasksChange?.([updatedSuccessor]);
|
|
12662
|
+
return;
|
|
12663
|
+
}
|
|
12664
|
+
const constraintDate = calculateSuccessorDate(
|
|
12665
|
+
parseUTCDate(predecessor.startDate),
|
|
12666
|
+
parseUTCDate(predecessor.endDate),
|
|
12667
|
+
nextDependency.type,
|
|
12668
|
+
0,
|
|
12669
|
+
businessDays,
|
|
12670
|
+
isCustomWeekend
|
|
12671
|
+
);
|
|
12672
|
+
const duration = getTaskDuration(
|
|
12673
|
+
updatedSuccessor.startDate,
|
|
12674
|
+
updatedSuccessor.endDate,
|
|
12675
|
+
businessDays,
|
|
12676
|
+
isCustomWeekend
|
|
12677
|
+
);
|
|
12678
|
+
const range = nextDependency.type === "FS" || nextDependency.type === "SS" ? buildTaskRangeFromStart(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 })) : buildTaskRangeFromEnd(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }));
|
|
12679
|
+
onTasksChange?.([{
|
|
12680
|
+
...updatedSuccessor,
|
|
12681
|
+
startDate: range.start.toISOString().split("T")[0],
|
|
12682
|
+
endDate: range.end.toISOString().split("T")[0]
|
|
12683
|
+
}]);
|
|
12684
|
+
};
|
|
12685
|
+
const handleKeyDown = (event) => {
|
|
12686
|
+
if (event.key === "Escape") {
|
|
12687
|
+
dependencyCreationRef.current = null;
|
|
12688
|
+
setDependencyCreationDrag(null);
|
|
12689
|
+
}
|
|
12690
|
+
};
|
|
12691
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
12692
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
12693
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
12694
|
+
return () => {
|
|
12695
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12696
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
12697
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
12698
|
+
};
|
|
12699
|
+
}, [businessDays, customDays, dependencyCreationDrag !== null, getDependencyPortPoint, getVisualDependencyType, isWeekend3, onTasksChange, tasks]);
|
|
12700
|
+
(0, import_react18.useEffect)(() => {
|
|
12701
|
+
if (!dependencyCreationError) return;
|
|
12702
|
+
const timeout = window.setTimeout(() => setDependencyCreationError(null), 3e3);
|
|
12703
|
+
return () => window.clearTimeout(timeout);
|
|
12704
|
+
}, [dependencyCreationError]);
|
|
12705
|
+
(0, import_react18.useEffect)(() => {
|
|
12706
|
+
if (!dependencyLineMenu) return;
|
|
12707
|
+
const closeMenu = (event) => {
|
|
12708
|
+
const target = event.target;
|
|
12709
|
+
if (!target.closest(".gantt-dependencyLineMenu")) setDependencyLineMenu(null);
|
|
12710
|
+
};
|
|
12711
|
+
const closeOnEscape = (event) => {
|
|
12712
|
+
if (event.key === "Escape") setDependencyLineMenu(null);
|
|
12713
|
+
};
|
|
12714
|
+
document.addEventListener("mousedown", closeMenu, true);
|
|
12715
|
+
document.addEventListener("keydown", closeOnEscape);
|
|
12716
|
+
return () => {
|
|
12717
|
+
document.removeEventListener("mousedown", closeMenu, true);
|
|
12718
|
+
document.removeEventListener("keydown", closeOnEscape);
|
|
12719
|
+
};
|
|
12720
|
+
}, [dependencyLineMenu]);
|
|
12721
|
+
const handleDependencyLineClick = (0, import_react18.useCallback)((dependency) => {
|
|
12722
|
+
setSelectedChip({
|
|
12723
|
+
predecessorId: dependency.predecessorId,
|
|
12724
|
+
successorId: dependency.successorId,
|
|
12725
|
+
linkType: dependency.linkType
|
|
12726
|
+
});
|
|
12727
|
+
setDependencyLineMenu(dependency);
|
|
12728
|
+
}, []);
|
|
12729
|
+
const handleDependencyLineDelete = (0, import_react18.useCallback)(() => {
|
|
12730
|
+
if (!dependencyLineMenu) return;
|
|
12731
|
+
const successor = tasks.find((task) => task.id === dependencyLineMenu.successorId);
|
|
12732
|
+
if (!successor) return;
|
|
12733
|
+
onTasksChange?.([{
|
|
12734
|
+
...successor,
|
|
12735
|
+
dependencies: (successor.dependencies ?? []).filter((dependency) => !(dependency.taskId === dependencyLineMenu.predecessorId && dependency.type === dependencyLineMenu.linkType))
|
|
12736
|
+
}]);
|
|
12737
|
+
setSelectedChip(null);
|
|
12738
|
+
setDependencyLineMenu(null);
|
|
12739
|
+
}, [dependencyLineMenu, onTasksChange, tasks]);
|
|
12355
12740
|
const [activeTimelineTooltip, setActiveTimelineTooltip] = (0, import_react18.useState)(null);
|
|
12356
12741
|
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
12357
12742
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
@@ -13124,19 +13509,19 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13124
13509
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
13125
13510
|
};
|
|
13126
13511
|
}, []);
|
|
13127
|
-
return /* @__PURE__ */ (0,
|
|
13512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13128
13513
|
"div",
|
|
13129
13514
|
{
|
|
13130
13515
|
ref: containerRef,
|
|
13131
13516
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
13132
|
-
children: /* @__PURE__ */ (0,
|
|
13517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13133
13518
|
"div",
|
|
13134
13519
|
{
|
|
13135
13520
|
ref: scrollContainerRef,
|
|
13136
13521
|
className: "gantt-scrollContainer",
|
|
13137
13522
|
style: { height: containerHeight ?? "auto", cursor: "grab" },
|
|
13138
13523
|
onMouseDown: handlePanStart,
|
|
13139
|
-
children: /* @__PURE__ */ (0,
|
|
13524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13140
13525
|
"div",
|
|
13141
13526
|
{
|
|
13142
13527
|
ref: scrollContentRef,
|
|
@@ -13144,7 +13529,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13144
13529
|
onMouseOver: handleSharedRowHover,
|
|
13145
13530
|
onMouseLeave: clearHoveredRows,
|
|
13146
13531
|
children: [
|
|
13147
|
-
/* @__PURE__ */ (0,
|
|
13532
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13148
13533
|
TaskList,
|
|
13149
13534
|
{
|
|
13150
13535
|
tasks: normalizedTasks,
|
|
@@ -13159,7 +13544,10 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13159
13544
|
disableTaskNameEditing,
|
|
13160
13545
|
disableDependencyEditing,
|
|
13161
13546
|
onScrollToTask: scrollToTask,
|
|
13162
|
-
onSelectedChipChange: setSelectedChip
|
|
13547
|
+
onSelectedChipChange: (chip) => setSelectedChip(
|
|
13548
|
+
chip ? { ...chip, linkType: chip.linkType } : null
|
|
13549
|
+
),
|
|
13550
|
+
selectedChip,
|
|
13163
13551
|
onAdd,
|
|
13164
13552
|
onDelete: handleDelete,
|
|
13165
13553
|
onInsertAfter: handleInsertAfter,
|
|
@@ -13167,6 +13555,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13167
13555
|
disableTaskDrag: disableTaskDrag || disableTaskListReorder,
|
|
13168
13556
|
editingTaskId,
|
|
13169
13557
|
enableAddTask,
|
|
13558
|
+
addTaskLabel,
|
|
13170
13559
|
defaultTaskDurationDays,
|
|
13171
13560
|
collapsedParentIds,
|
|
13172
13561
|
onToggleCollapse: handleToggleCollapse,
|
|
@@ -13199,7 +13588,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13199
13588
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13200
13589
|
}
|
|
13201
13590
|
),
|
|
13202
|
-
/* @__PURE__ */ (0,
|
|
13591
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13203
13592
|
"div",
|
|
13204
13593
|
{
|
|
13205
13594
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
@@ -13209,7 +13598,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13209
13598
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
13210
13599
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
13211
13600
|
},
|
|
13212
|
-
children: isTableMatrixMode ? /* @__PURE__ */ (0,
|
|
13601
|
+
children: isTableMatrixMode ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13213
13602
|
TableMatrix,
|
|
13214
13603
|
{
|
|
13215
13604
|
tasks: visibleTasks,
|
|
@@ -13227,7 +13616,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13227
13616
|
filterMode,
|
|
13228
13617
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13229
13618
|
}
|
|
13230
|
-
) : isPlanFactMode ? /* @__PURE__ */ (0,
|
|
13619
|
+
) : isPlanFactMode ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13231
13620
|
PlanFactMatrix,
|
|
13232
13621
|
{
|
|
13233
13622
|
tasks: visibleTasks,
|
|
@@ -13248,14 +13637,14 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13248
13637
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
13249
13638
|
isCustomWeekend
|
|
13250
13639
|
}
|
|
13251
|
-
) : /* @__PURE__ */ (0,
|
|
13252
|
-
/* @__PURE__ */ (0,
|
|
13640
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
13641
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13253
13642
|
"div",
|
|
13254
13643
|
{
|
|
13255
13644
|
className: "gantt-stickyHeader",
|
|
13256
13645
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
13257
13646
|
children: [
|
|
13258
|
-
/* @__PURE__ */ (0,
|
|
13647
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13259
13648
|
TimeScaleHeader_default,
|
|
13260
13649
|
{
|
|
13261
13650
|
days: dateRange,
|
|
@@ -13268,7 +13657,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13268
13657
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13269
13658
|
}
|
|
13270
13659
|
),
|
|
13271
|
-
activeTimelineTooltip && /* @__PURE__ */ (0,
|
|
13660
|
+
activeTimelineTooltip && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13272
13661
|
"div",
|
|
13273
13662
|
{
|
|
13274
13663
|
className: "gantt-timelineTooltip",
|
|
@@ -13282,7 +13671,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13282
13671
|
]
|
|
13283
13672
|
}
|
|
13284
13673
|
),
|
|
13285
|
-
/* @__PURE__ */ (0,
|
|
13674
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13286
13675
|
"div",
|
|
13287
13676
|
{
|
|
13288
13677
|
className: "gantt-taskArea",
|
|
@@ -13292,7 +13681,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13292
13681
|
height: `${totalGridHeight}px`
|
|
13293
13682
|
},
|
|
13294
13683
|
children: [
|
|
13295
|
-
/* @__PURE__ */ (0,
|
|
13684
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13296
13685
|
GridBackground_default,
|
|
13297
13686
|
{
|
|
13298
13687
|
dateRange,
|
|
@@ -13302,7 +13691,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13302
13691
|
isCustomWeekend
|
|
13303
13692
|
}
|
|
13304
13693
|
),
|
|
13305
|
-
todayInRange && /* @__PURE__ */ (0,
|
|
13694
|
+
todayInRange && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13306
13695
|
TodayIndicator_default,
|
|
13307
13696
|
{
|
|
13308
13697
|
monthStart,
|
|
@@ -13311,7 +13700,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13311
13700
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13312
13701
|
}
|
|
13313
13702
|
),
|
|
13314
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ (0,
|
|
13703
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13315
13704
|
TimelineMarkers_default,
|
|
13316
13705
|
{
|
|
13317
13706
|
rangeStart: monthStart,
|
|
@@ -13322,7 +13711,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13322
13711
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13323
13712
|
}
|
|
13324
13713
|
),
|
|
13325
|
-
/* @__PURE__ */ (0,
|
|
13714
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13326
13715
|
DependencyLines_default,
|
|
13327
13716
|
{
|
|
13328
13717
|
tasks: renderedDependencyTasks,
|
|
@@ -13337,10 +13726,43 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13337
13726
|
dragOverrides: dependencyOverrides,
|
|
13338
13727
|
selectedDep: selectedChip,
|
|
13339
13728
|
businessDays,
|
|
13340
|
-
weekendPredicate: isCustomWeekend
|
|
13729
|
+
weekendPredicate: isCustomWeekend,
|
|
13730
|
+
onDependencyClick: handleDependencyLineClick
|
|
13731
|
+
}
|
|
13732
|
+
),
|
|
13733
|
+
dependencyLineMenu && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13734
|
+
"div",
|
|
13735
|
+
{
|
|
13736
|
+
className: "gantt-dependencyLineMenu",
|
|
13737
|
+
style: { left: `${dependencyLineMenu.x + 10}px`, top: `${dependencyLineMenu.y}px` },
|
|
13738
|
+
role: "dialog",
|
|
13739
|
+
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
13740
|
+
children: [
|
|
13741
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "gantt-dependencyLineMenuType", children: dependencyLineMenu.linkType === "FS" ? "\u041E\u041D" : dependencyLineMenu.linkType === "SS" ? "\u041D\u041D" : dependencyLineMenu.linkType === "FF" ? "\u041E\u041E" : "\u041D\u041E" }),
|
|
13742
|
+
!disableDependencyEditing && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13743
|
+
"button",
|
|
13744
|
+
{
|
|
13745
|
+
type: "button",
|
|
13746
|
+
className: "gantt-dependencyLineMenuDelete",
|
|
13747
|
+
"aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13748
|
+
title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13749
|
+
onClick: handleDependencyLineDelete,
|
|
13750
|
+
children: "\xD7"
|
|
13751
|
+
}
|
|
13752
|
+
)
|
|
13753
|
+
]
|
|
13754
|
+
}
|
|
13755
|
+
),
|
|
13756
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13757
|
+
DependencyCreationOverlay,
|
|
13758
|
+
{
|
|
13759
|
+
drag: dependencyCreationDrag,
|
|
13760
|
+
width: gridWidth,
|
|
13761
|
+
height: totalGridHeight
|
|
13341
13762
|
}
|
|
13342
13763
|
),
|
|
13343
|
-
|
|
13764
|
+
dependencyCreationError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
13765
|
+
dragGuideLines && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13344
13766
|
DragGuideLines_default,
|
|
13345
13767
|
{
|
|
13346
13768
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -13350,7 +13772,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13350
13772
|
totalHeight: totalGridHeight
|
|
13351
13773
|
}
|
|
13352
13774
|
),
|
|
13353
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ (0,
|
|
13775
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13354
13776
|
"div",
|
|
13355
13777
|
{
|
|
13356
13778
|
style: {
|
|
@@ -13360,7 +13782,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13360
13782
|
right: 0,
|
|
13361
13783
|
height: `${effectiveRowHeight}px`
|
|
13362
13784
|
},
|
|
13363
|
-
children: /* @__PURE__ */ (0,
|
|
13785
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13364
13786
|
TaskRow_default,
|
|
13365
13787
|
{
|
|
13366
13788
|
task,
|
|
@@ -13391,6 +13813,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13391
13813
|
customDays,
|
|
13392
13814
|
isWeekend: isWeekend3,
|
|
13393
13815
|
disableTaskDrag,
|
|
13816
|
+
disableDependencyEditing,
|
|
13817
|
+
onDependencyPortPointerDown: handleDependencyPortPointerDown,
|
|
13818
|
+
isDependencyDragActive: dependencyCreationDrag !== null,
|
|
13394
13819
|
viewMode
|
|
13395
13820
|
}
|
|
13396
13821
|
)
|
|
@@ -13417,7 +13842,7 @@ GanttChart.displayName = "GanttChart";
|
|
|
13417
13842
|
|
|
13418
13843
|
// src/components/ui/Button.tsx
|
|
13419
13844
|
var import_react19 = __toESM(require("react"));
|
|
13420
|
-
var
|
|
13845
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
13421
13846
|
var Button = import_react19.default.forwardRef(
|
|
13422
13847
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
13423
13848
|
const classes = [
|
|
@@ -13426,7 +13851,7 @@ var Button = import_react19.default.forwardRef(
|
|
|
13426
13851
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
13427
13852
|
className || ""
|
|
13428
13853
|
].filter(Boolean).join(" ");
|
|
13429
|
-
return /* @__PURE__ */ (0,
|
|
13854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { ref, className: classes, ...props, children });
|
|
13430
13855
|
}
|
|
13431
13856
|
);
|
|
13432
13857
|
Button.displayName = "Button";
|