gantt-lib 0.121.2 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +878 -459
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +958 -539
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +219 -4
- package/package.json +1 -1
package/dist/index.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" })
|
|
4754
|
+
}
|
|
4755
|
+
);
|
|
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
|
+
]
|
|
4642
4773
|
}
|
|
4643
4774
|
);
|
|
4644
|
-
var DragHandleIcon = () => /* @__PURE__ */ (0,
|
|
4645
|
-
/* @__PURE__ */ (0,
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4649
|
-
/* @__PURE__ */ (0,
|
|
4650
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
@@ -7560,13 +7717,27 @@ var TaskList = ({
|
|
|
7560
7717
|
const [typeMenuOpen, setTypeMenuOpen] = (0, import_react13.useState)(false);
|
|
7561
7718
|
const [dependencyError, setDependencyError] = (0, import_react13.useState)(null);
|
|
7562
7719
|
const overlayRef = (0, import_react13.useRef)(null);
|
|
7563
|
-
const [selectedChip, setSelectedChip] = (0, import_react13.useState)(null);
|
|
7720
|
+
const [selectedChip, setSelectedChip] = (0, import_react13.useState)(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7721
|
+
(0, import_react13.useEffect)(() => {
|
|
7722
|
+
if (controlledSelectedChip !== void 0) {
|
|
7723
|
+
setSelectedChip(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
7724
|
+
}
|
|
7725
|
+
}, [controlledSelectedChip]);
|
|
7564
7726
|
const handleChipSelect = (0, import_react13.useCallback)((chip) => {
|
|
7565
7727
|
setSelectedChip(chip);
|
|
7566
7728
|
onSelectedChipChange?.(chip);
|
|
7567
7729
|
}, [onSelectedChipChange]);
|
|
7568
7730
|
(0, import_react13.useEffect)(() => {
|
|
7569
7731
|
if (!selectingPredecessorFor && !selectedChip && !selectedTaskId && !activeCustomCell) return;
|
|
7732
|
+
const pendingCanvasMouseDownRef = {
|
|
7733
|
+
container: null,
|
|
7734
|
+
x: 0,
|
|
7735
|
+
y: 0,
|
|
7736
|
+
scrollLeft: 0,
|
|
7737
|
+
scrollTop: 0,
|
|
7738
|
+
moved: false,
|
|
7739
|
+
active: false
|
|
7740
|
+
};
|
|
7570
7741
|
const handleKeyDown = (e) => {
|
|
7571
7742
|
if (e.key === "Escape") {
|
|
7572
7743
|
setSelectingPredecessorFor(null);
|
|
@@ -7584,6 +7755,18 @@ var TaskList = ({
|
|
|
7584
7755
|
}
|
|
7585
7756
|
return;
|
|
7586
7757
|
}
|
|
7758
|
+
if (target.closest?.("[data-taskbar]")) return;
|
|
7759
|
+
if (target.closest?.(".gantt-scrollContainer")) {
|
|
7760
|
+
const canvas = target.closest(".gantt-scrollContainer");
|
|
7761
|
+
pendingCanvasMouseDownRef.container = canvas;
|
|
7762
|
+
pendingCanvasMouseDownRef.x = e.clientX;
|
|
7763
|
+
pendingCanvasMouseDownRef.y = e.clientY;
|
|
7764
|
+
pendingCanvasMouseDownRef.scrollLeft = canvas.scrollLeft;
|
|
7765
|
+
pendingCanvasMouseDownRef.scrollTop = canvas.scrollTop;
|
|
7766
|
+
pendingCanvasMouseDownRef.moved = false;
|
|
7767
|
+
pendingCanvasMouseDownRef.active = true;
|
|
7768
|
+
return;
|
|
7769
|
+
}
|
|
7587
7770
|
if (target.closest?.(".gantt-popover")) return;
|
|
7588
7771
|
setSelectingPredecessorFor(null);
|
|
7589
7772
|
setSelectedChip(null);
|
|
@@ -7591,11 +7774,52 @@ var TaskList = ({
|
|
|
7591
7774
|
onSelectedChipChange?.(null);
|
|
7592
7775
|
onTaskSelect?.(null);
|
|
7593
7776
|
};
|
|
7777
|
+
const handleCanvasMouseMove = (e) => {
|
|
7778
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7779
|
+
const distance = Math.hypot(
|
|
7780
|
+
e.clientX - pendingCanvasMouseDownRef.x,
|
|
7781
|
+
e.clientY - pendingCanvasMouseDownRef.y
|
|
7782
|
+
);
|
|
7783
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7784
|
+
const scrollChanged = canvas && (canvas.scrollLeft !== pendingCanvasMouseDownRef.scrollLeft || canvas.scrollTop !== pendingCanvasMouseDownRef.scrollTop);
|
|
7785
|
+
if (distance > 3 || scrollChanged) pendingCanvasMouseDownRef.moved = true;
|
|
7786
|
+
};
|
|
7787
|
+
const handleCanvasScroll = (e) => {
|
|
7788
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7789
|
+
const canvas = pendingCanvasMouseDownRef.container;
|
|
7790
|
+
if (canvas && e.target === canvas) pendingCanvasMouseDownRef.moved = true;
|
|
7791
|
+
};
|
|
7792
|
+
const handleCanvasWheel = (e) => {
|
|
7793
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7794
|
+
if (pendingCanvasMouseDownRef.container?.contains(e.target)) {
|
|
7795
|
+
pendingCanvasMouseDownRef.moved = true;
|
|
7796
|
+
}
|
|
7797
|
+
};
|
|
7798
|
+
const handleCanvasMouseUp = () => {
|
|
7799
|
+
if (!pendingCanvasMouseDownRef.active) return;
|
|
7800
|
+
const wasPan = pendingCanvasMouseDownRef.moved;
|
|
7801
|
+
pendingCanvasMouseDownRef.active = false;
|
|
7802
|
+
pendingCanvasMouseDownRef.container = null;
|
|
7803
|
+
if (wasPan) return;
|
|
7804
|
+
setSelectingPredecessorFor(null);
|
|
7805
|
+
setSelectedChip(null);
|
|
7806
|
+
setActiveCustomCell(null);
|
|
7807
|
+
onSelectedChipChange?.(null);
|
|
7808
|
+
onTaskSelect?.(null);
|
|
7809
|
+
};
|
|
7594
7810
|
document.addEventListener("keydown", handleKeyDown);
|
|
7595
7811
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
7812
|
+
document.addEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7813
|
+
document.addEventListener("scroll", handleCanvasScroll, true);
|
|
7814
|
+
document.addEventListener("wheel", handleCanvasWheel, true);
|
|
7815
|
+
document.addEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7596
7816
|
return () => {
|
|
7597
7817
|
document.removeEventListener("keydown", handleKeyDown);
|
|
7598
7818
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
7819
|
+
document.removeEventListener("mousemove", handleCanvasMouseMove, true);
|
|
7820
|
+
document.removeEventListener("scroll", handleCanvasScroll, true);
|
|
7821
|
+
document.removeEventListener("wheel", handleCanvasWheel, true);
|
|
7822
|
+
document.removeEventListener("mouseup", handleCanvasMouseUp, true);
|
|
7599
7823
|
};
|
|
7600
7824
|
}, [selectingPredecessorFor, selectedChip, selectedTaskId, activeCustomCell, onTaskSelect, onSelectedChipChange]);
|
|
7601
7825
|
const handleAddDependency = (0, import_react13.useCallback)((successorTaskId, predecessorTaskId, linkType) => {
|
|
@@ -8110,7 +8334,7 @@ var TaskList = ({
|
|
|
8110
8334
|
document.body.style.cursor = "col-resize";
|
|
8111
8335
|
document.body.style.userSelect = "none";
|
|
8112
8336
|
}, [resolvedColumns]);
|
|
8113
|
-
const renderResizeHandle = (0, import_react13.useCallback)((columnId) => /* @__PURE__ */ (0,
|
|
8337
|
+
const renderResizeHandle = (0, import_react13.useCallback)((columnId) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8114
8338
|
"button",
|
|
8115
8339
|
{
|
|
8116
8340
|
type: "button",
|
|
@@ -8124,7 +8348,7 @@ var TaskList = ({
|
|
|
8124
8348
|
}
|
|
8125
8349
|
}
|
|
8126
8350
|
), [startColumnResize]);
|
|
8127
|
-
return /* @__PURE__ */ (0,
|
|
8351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8128
8352
|
"div",
|
|
8129
8353
|
{
|
|
8130
8354
|
ref: overlayRef,
|
|
@@ -8133,17 +8357,17 @@ var TaskList = ({
|
|
|
8133
8357
|
"--tasklist-width": `${effectiveTaskListWidth}px`,
|
|
8134
8358
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
8135
8359
|
},
|
|
8136
|
-
children: /* @__PURE__ */ (0,
|
|
8137
|
-
/* @__PURE__ */ (0,
|
|
8360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "gantt-tl-table", children: [
|
|
8361
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "gantt-tl-header", style: { height: `${tableHeaderHeight}px` }, children: resolvedColumns.map((col) => {
|
|
8138
8362
|
if (col.id === "selection") {
|
|
8139
|
-
return /* @__PURE__ */ (0,
|
|
8363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8140
8364
|
"div",
|
|
8141
8365
|
{
|
|
8142
8366
|
className: "gantt-tl-headerCell gantt-tl-cell-selection",
|
|
8143
8367
|
"data-column-id": "selection",
|
|
8144
8368
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8145
8369
|
children: [
|
|
8146
|
-
/* @__PURE__ */ (0,
|
|
8370
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8147
8371
|
SelectAllCheckbox,
|
|
8148
8372
|
{
|
|
8149
8373
|
checked: areAllVisibleTasksSelected,
|
|
@@ -8158,15 +8382,15 @@ var TaskList = ({
|
|
|
8158
8382
|
);
|
|
8159
8383
|
}
|
|
8160
8384
|
if (col.id === "dependencies") {
|
|
8161
|
-
return /* @__PURE__ */ (0,
|
|
8385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8162
8386
|
"div",
|
|
8163
8387
|
{
|
|
8164
8388
|
className: "gantt-tl-headerCell gantt-tl-cell-deps",
|
|
8165
8389
|
"data-column-id": "dependencies",
|
|
8166
8390
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
8167
8391
|
children: [
|
|
8168
|
-
/* @__PURE__ */ (0,
|
|
8169
|
-
/* @__PURE__ */ (0,
|
|
8392
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
8393
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8170
8394
|
"button",
|
|
8171
8395
|
{
|
|
8172
8396
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -8179,7 +8403,7 @@ var TaskList = ({
|
|
|
8179
8403
|
]
|
|
8180
8404
|
}
|
|
8181
8405
|
) }),
|
|
8182
|
-
/* @__PURE__ */ (0,
|
|
8406
|
+
/* @__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
8407
|
"button",
|
|
8184
8408
|
{
|
|
8185
8409
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -8189,13 +8413,13 @@ var TaskList = ({
|
|
|
8189
8413
|
},
|
|
8190
8414
|
children: [
|
|
8191
8415
|
import_react13.default.createElement(LINK_TYPE_ICONS[lt]),
|
|
8192
|
-
/* @__PURE__ */ (0,
|
|
8416
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: LINK_TYPE_LABELS[lt] })
|
|
8193
8417
|
]
|
|
8194
8418
|
},
|
|
8195
8419
|
lt
|
|
8196
8420
|
)) }) })
|
|
8197
8421
|
] }),
|
|
8198
|
-
dependencyError && /* @__PURE__ */ (0,
|
|
8422
|
+
dependencyError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
8199
8423
|
renderResizeHandle(col.id)
|
|
8200
8424
|
]
|
|
8201
8425
|
},
|
|
@@ -8204,7 +8428,7 @@ var TaskList = ({
|
|
|
8204
8428
|
}
|
|
8205
8429
|
const builtInClass = BUILT_IN_CSS_CLASSES[col.id];
|
|
8206
8430
|
if (builtInClass !== void 0) {
|
|
8207
|
-
return /* @__PURE__ */ (0,
|
|
8431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8208
8432
|
"div",
|
|
8209
8433
|
{
|
|
8210
8434
|
className: `gantt-tl-headerCell ${builtInClass}`,
|
|
@@ -8218,7 +8442,7 @@ var TaskList = ({
|
|
|
8218
8442
|
col.id
|
|
8219
8443
|
);
|
|
8220
8444
|
}
|
|
8221
|
-
return /* @__PURE__ */ (0,
|
|
8445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8222
8446
|
"div",
|
|
8223
8447
|
{
|
|
8224
8448
|
className: `gantt-tl-headerCell gantt-tl-headerCell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -8233,7 +8457,7 @@ var TaskList = ({
|
|
|
8233
8457
|
col.id
|
|
8234
8458
|
);
|
|
8235
8459
|
}) }),
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8460
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8237
8461
|
"div",
|
|
8238
8462
|
{
|
|
8239
8463
|
className: "gantt-tl-body",
|
|
@@ -8243,7 +8467,7 @@ var TaskList = ({
|
|
|
8243
8467
|
position: "relative"
|
|
8244
8468
|
},
|
|
8245
8469
|
children: [
|
|
8246
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */ (0,
|
|
8470
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8247
8471
|
"div",
|
|
8248
8472
|
{
|
|
8249
8473
|
className: [
|
|
@@ -8260,7 +8484,7 @@ var TaskList = ({
|
|
|
8260
8484
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
8261
8485
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
8262
8486
|
const topOffset = index * rowHeight + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
8263
|
-
return /* @__PURE__ */ (0,
|
|
8487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8264
8488
|
"div",
|
|
8265
8489
|
{
|
|
8266
8490
|
style: {
|
|
@@ -8269,7 +8493,7 @@ var TaskList = ({
|
|
|
8269
8493
|
left: 0,
|
|
8270
8494
|
right: 0
|
|
8271
8495
|
},
|
|
8272
|
-
children: /* @__PURE__ */ (0,
|
|
8496
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8273
8497
|
TaskListRow,
|
|
8274
8498
|
{
|
|
8275
8499
|
task,
|
|
@@ -8342,7 +8566,7 @@ var TaskList = ({
|
|
|
8342
8566
|
task.id
|
|
8343
8567
|
);
|
|
8344
8568
|
}),
|
|
8345
|
-
hasVisiblePendingInsert && /* @__PURE__ */ (0,
|
|
8569
|
+
hasVisiblePendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8346
8570
|
"div",
|
|
8347
8571
|
{
|
|
8348
8572
|
style: {
|
|
@@ -8351,7 +8575,7 @@ var TaskList = ({
|
|
|
8351
8575
|
left: 0,
|
|
8352
8576
|
right: 0
|
|
8353
8577
|
},
|
|
8354
|
-
children: /* @__PURE__ */ (0,
|
|
8578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8355
8579
|
NewTaskRow,
|
|
8356
8580
|
{
|
|
8357
8581
|
rowHeight,
|
|
@@ -8365,7 +8589,7 @@ var TaskList = ({
|
|
|
8365
8589
|
]
|
|
8366
8590
|
}
|
|
8367
8591
|
),
|
|
8368
|
-
isCreating && !pendingInsert && /* @__PURE__ */ (0,
|
|
8592
|
+
isCreating && !pendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8369
8593
|
NewTaskRow,
|
|
8370
8594
|
{
|
|
8371
8595
|
rowHeight,
|
|
@@ -8374,7 +8598,7 @@ var TaskList = ({
|
|
|
8374
8598
|
nestingDepth: 0
|
|
8375
8599
|
}
|
|
8376
8600
|
),
|
|
8377
|
-
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ (0,
|
|
8601
|
+
enableAddTask && onAdd && !isCreating && !pendingInsert && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8378
8602
|
"button",
|
|
8379
8603
|
{
|
|
8380
8604
|
className: `gantt-tl-add-btn${!reorderDisabled && dragOverTarget?.index === visibleTasks.length ? " gantt-tl-add-btn-drag-over" : ""}`,
|
|
@@ -8865,7 +9089,7 @@ var useResourceItemDrag = ({
|
|
|
8865
9089
|
};
|
|
8866
9090
|
|
|
8867
9091
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
8868
|
-
var
|
|
9092
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8869
9093
|
var DEFAULT_DAY_WIDTH = 40;
|
|
8870
9094
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
8871
9095
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -9028,41 +9252,41 @@ var orderResourcesByType = (resources) => {
|
|
|
9028
9252
|
};
|
|
9029
9253
|
var ResourceTypeIcon = ({ type }) => {
|
|
9030
9254
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
9031
|
-
return /* @__PURE__ */ (0,
|
|
9032
|
-
/* @__PURE__ */ (0,
|
|
9033
|
-
/* @__PURE__ */ (0,
|
|
9034
|
-
/* @__PURE__ */ (0,
|
|
9035
|
-
/* @__PURE__ */ (0,
|
|
9255
|
+
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: [
|
|
9256
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
|
|
9258
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
9259
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
9036
9260
|
] });
|
|
9037
9261
|
}
|
|
9038
9262
|
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,
|
|
9263
|
+
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: [
|
|
9264
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
9265
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "m18 15 4-4" }),
|
|
9266
|
+
/* @__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
9267
|
] });
|
|
9044
9268
|
}
|
|
9045
9269
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
9046
|
-
return /* @__PURE__ */ (0,
|
|
9047
|
-
/* @__PURE__ */ (0,
|
|
9048
|
-
/* @__PURE__ */ (0,
|
|
9049
|
-
/* @__PURE__ */ (0,
|
|
9270
|
+
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: [
|
|
9271
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 22v-8" }),
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
9273
|
+
/* @__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
9274
|
] });
|
|
9051
9275
|
}
|
|
9052
|
-
return /* @__PURE__ */ (0,
|
|
9053
|
-
/* @__PURE__ */ (0,
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9055
|
-
/* @__PURE__ */ (0,
|
|
9276
|
+
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: [
|
|
9277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
9278
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 8v4" }),
|
|
9279
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 16h.01" })
|
|
9056
9280
|
] });
|
|
9057
9281
|
};
|
|
9058
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ (0,
|
|
9059
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */ (0,
|
|
9282
|
+
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" }) });
|
|
9283
|
+
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
9284
|
function isInactiveResourceStatus(status) {
|
|
9061
9285
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
9062
9286
|
}
|
|
9063
|
-
var ResourceStatusLockIcon = () => /* @__PURE__ */ (0,
|
|
9064
|
-
/* @__PURE__ */ (0,
|
|
9065
|
-
/* @__PURE__ */ (0,
|
|
9287
|
+
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: [
|
|
9288
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
9289
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
9066
9290
|
] });
|
|
9067
9291
|
var ResourceHeader = ({
|
|
9068
9292
|
resource,
|
|
@@ -9152,7 +9376,7 @@ var ResourceHeader = ({
|
|
|
9152
9376
|
handleNameCancel();
|
|
9153
9377
|
}
|
|
9154
9378
|
}, [applyResourcePatch, handleNameCancel, nameValue, resource.name]);
|
|
9155
|
-
return /* @__PURE__ */ (0,
|
|
9379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9156
9380
|
"div",
|
|
9157
9381
|
{
|
|
9158
9382
|
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
|
|
@@ -9163,10 +9387,10 @@ var ResourceHeader = ({
|
|
|
9163
9387
|
gridTemplateColumns: columnTemplate
|
|
9164
9388
|
},
|
|
9165
9389
|
children: [
|
|
9166
|
-
/* @__PURE__ */ (0,
|
|
9167
|
-
/* @__PURE__ */ (0,
|
|
9168
|
-
/* @__PURE__ */ (0,
|
|
9169
|
-
/* @__PURE__ */ (0,
|
|
9390
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
9391
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
9392
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
9393
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9170
9394
|
"button",
|
|
9171
9395
|
{
|
|
9172
9396
|
type: "button",
|
|
@@ -9179,12 +9403,12 @@ var ResourceHeader = ({
|
|
|
9179
9403
|
setTypeMenuOpen((open) => !open);
|
|
9180
9404
|
},
|
|
9181
9405
|
children: [
|
|
9182
|
-
/* @__PURE__ */ (0,
|
|
9183
|
-
/* @__PURE__ */ (0,
|
|
9406
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeIcon, { type }),
|
|
9407
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeDropdownIcon, {})
|
|
9184
9408
|
]
|
|
9185
9409
|
}
|
|
9186
9410
|
) }),
|
|
9187
|
-
/* @__PURE__ */ (0,
|
|
9411
|
+
/* @__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
9412
|
"button",
|
|
9189
9413
|
{
|
|
9190
9414
|
type: "button",
|
|
@@ -9195,14 +9419,14 @@ var ResourceHeader = ({
|
|
|
9195
9419
|
applyResourcePatch({ type: option });
|
|
9196
9420
|
},
|
|
9197
9421
|
children: [
|
|
9198
|
-
/* @__PURE__ */ (0,
|
|
9422
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceTypeIcon, { type: option }) }),
|
|
9199
9423
|
option
|
|
9200
9424
|
]
|
|
9201
9425
|
},
|
|
9202
9426
|
option
|
|
9203
9427
|
)) })
|
|
9204
9428
|
] }),
|
|
9205
|
-
editingName ? /* @__PURE__ */ (0,
|
|
9429
|
+
editingName ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9206
9430
|
Input,
|
|
9207
9431
|
{
|
|
9208
9432
|
ref: nameInputRef,
|
|
@@ -9214,7 +9438,7 @@ var ResourceHeader = ({
|
|
|
9214
9438
|
"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
9439
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
9216
9440
|
}
|
|
9217
|
-
) : /* @__PURE__ */ (0,
|
|
9441
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9218
9442
|
"button",
|
|
9219
9443
|
{
|
|
9220
9444
|
type: "button",
|
|
@@ -9226,23 +9450,23 @@ var ResourceHeader = ({
|
|
|
9226
9450
|
onResourceNameClick?.(resourceId);
|
|
9227
9451
|
},
|
|
9228
9452
|
onDoubleClick: handleNameDoubleClick,
|
|
9229
|
-
children: /* @__PURE__ */ (0,
|
|
9230
|
-
isInactive && /* @__PURE__ */ (0,
|
|
9453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
9454
|
+
isInactive && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9231
9455
|
"span",
|
|
9232
9456
|
{
|
|
9233
9457
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
9234
9458
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
9235
9459
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
9236
|
-
children: /* @__PURE__ */ (0,
|
|
9460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceStatusLockIcon, {})
|
|
9237
9461
|
}
|
|
9238
9462
|
),
|
|
9239
|
-
/* @__PURE__ */ (0,
|
|
9463
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
9240
9464
|
] })
|
|
9241
9465
|
}
|
|
9242
9466
|
)
|
|
9243
9467
|
] }),
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9245
|
-
/* @__PURE__ */ (0,
|
|
9468
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
9469
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9246
9470
|
"button",
|
|
9247
9471
|
{
|
|
9248
9472
|
type: "button",
|
|
@@ -9253,10 +9477,10 @@ var ResourceHeader = ({
|
|
|
9253
9477
|
event.stopPropagation();
|
|
9254
9478
|
setScopeMenuOpen((open) => !open);
|
|
9255
9479
|
},
|
|
9256
|
-
children: /* @__PURE__ */ (0,
|
|
9480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: scopeLabel })
|
|
9257
9481
|
}
|
|
9258
9482
|
) }),
|
|
9259
|
-
/* @__PURE__ */ (0,
|
|
9483
|
+
/* @__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
9484
|
"button",
|
|
9261
9485
|
{
|
|
9262
9486
|
type: "button",
|
|
@@ -9267,35 +9491,35 @@ var ResourceHeader = ({
|
|
|
9267
9491
|
applyResourcePatch({ scope: option });
|
|
9268
9492
|
},
|
|
9269
9493
|
children: [
|
|
9270
|
-
/* @__PURE__ */ (0,
|
|
9494
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
9271
9495
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
9272
9496
|
]
|
|
9273
9497
|
},
|
|
9274
9498
|
option
|
|
9275
9499
|
)) })
|
|
9276
9500
|
] }),
|
|
9277
|
-
/* @__PURE__ */ (0,
|
|
9501
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9278
9502
|
"span",
|
|
9279
9503
|
{
|
|
9280
9504
|
className: "gantt-resourceTimeline-resourceAssignments",
|
|
9281
9505
|
"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
9506
|
children: [
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9284
|
-
/* @__PURE__ */ (0,
|
|
9285
|
-
/* @__PURE__ */ (0,
|
|
9507
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
9508
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
9509
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
9286
9510
|
] }),
|
|
9287
|
-
/* @__PURE__ */ (0,
|
|
9288
|
-
/* @__PURE__ */ (0,
|
|
9289
|
-
assignmentCount > 0 && /* @__PURE__ */ (0,
|
|
9290
|
-
/* @__PURE__ */ (0,
|
|
9291
|
-
/* @__PURE__ */ (0,
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
9512
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
9513
|
+
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: [
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
9515
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
9292
9516
|
] })
|
|
9293
9517
|
] })
|
|
9294
9518
|
]
|
|
9295
9519
|
}
|
|
9296
9520
|
),
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
conflictCount > 0 && /* @__PURE__ */ (0,
|
|
9521
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
9522
|
+
conflictCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9299
9523
|
"button",
|
|
9300
9524
|
{
|
|
9301
9525
|
type: "button",
|
|
@@ -9309,8 +9533,8 @@ var ResourceHeader = ({
|
|
|
9309
9533
|
children: conflictCount
|
|
9310
9534
|
}
|
|
9311
9535
|
),
|
|
9312
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
9313
|
-
/* @__PURE__ */ (0,
|
|
9536
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
9537
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9314
9538
|
"button",
|
|
9315
9539
|
{
|
|
9316
9540
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -9320,10 +9544,10 @@ var ResourceHeader = ({
|
|
|
9320
9544
|
event.stopPropagation();
|
|
9321
9545
|
setMenuOpen((open) => !open);
|
|
9322
9546
|
},
|
|
9323
|
-
children: /* @__PURE__ */ (0,
|
|
9547
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
9324
9548
|
}
|
|
9325
9549
|
) }),
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9550
|
+
/* @__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
9551
|
"button",
|
|
9328
9552
|
{
|
|
9329
9553
|
type: "button",
|
|
@@ -9376,7 +9600,7 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9376
9600
|
handleConfirm();
|
|
9377
9601
|
}
|
|
9378
9602
|
};
|
|
9379
|
-
return /* @__PURE__ */ (0,
|
|
9603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9380
9604
|
"div",
|
|
9381
9605
|
{
|
|
9382
9606
|
className: "gantt-resourceTimeline-resourceHeader gantt-resourceTimeline-resourceHeaderNew",
|
|
@@ -9386,8 +9610,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
9386
9610
|
gridTemplateColumns: columnTemplate
|
|
9387
9611
|
},
|
|
9388
9612
|
children: [
|
|
9389
|
-
/* @__PURE__ */ (0,
|
|
9390
|
-
/* @__PURE__ */ (0,
|
|
9613
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
9614
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9391
9615
|
Input,
|
|
9392
9616
|
{
|
|
9393
9617
|
ref: inputRef,
|
|
@@ -9566,7 +9790,7 @@ function ResourceTimelineChart({
|
|
|
9566
9790
|
document.body.style.cursor = "col-resize";
|
|
9567
9791
|
document.body.style.userSelect = "none";
|
|
9568
9792
|
}, [resolvedResourceColumnWidths]);
|
|
9569
|
-
const renderResizeHandle = (0, import_react15.useCallback)((columnId) => /* @__PURE__ */ (0,
|
|
9793
|
+
const renderResizeHandle = (0, import_react15.useCallback)((columnId) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9570
9794
|
"button",
|
|
9571
9795
|
{
|
|
9572
9796
|
type: "button",
|
|
@@ -9877,7 +10101,7 @@ function ResourceTimelineChart({
|
|
|
9877
10101
|
}
|
|
9878
10102
|
};
|
|
9879
10103
|
}, []);
|
|
9880
|
-
return /* @__PURE__ */ (0,
|
|
10104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9881
10105
|
"div",
|
|
9882
10106
|
{
|
|
9883
10107
|
ref: scrollContainerRef,
|
|
@@ -9888,44 +10112,44 @@ function ResourceTimelineChart({
|
|
|
9888
10112
|
},
|
|
9889
10113
|
"data-allow-vertical-pan": allowVerticalPan ? "true" : "false",
|
|
9890
10114
|
onMouseDown: handlePanStart,
|
|
9891
|
-
children: /* @__PURE__ */ (0,
|
|
9892
|
-
/* @__PURE__ */ (0,
|
|
10115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-scrollContent", children: [
|
|
10116
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9893
10117
|
"div",
|
|
9894
10118
|
{
|
|
9895
10119
|
className: `gantt-resourceTimeline-resourceColumn${resourceColumnHasRightShadow ? " gantt-resourceTimeline-resourceColumnShadowed" : ""}`,
|
|
9896
10120
|
style: { width: `${effectiveRowHeaderWidth}px`, minWidth: `${effectiveRowHeaderWidth}px` },
|
|
9897
10121
|
children: [
|
|
9898
|
-
/* @__PURE__ */ (0,
|
|
10122
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9899
10123
|
"div",
|
|
9900
10124
|
{
|
|
9901
10125
|
className: "gantt-resourceTimeline-corner",
|
|
9902
10126
|
style: { height: `${timelineHeaderHeight}px`, gridTemplateColumns: resourceColumnTemplate },
|
|
9903
10127
|
children: [
|
|
9904
|
-
/* @__PURE__ */ (0,
|
|
10128
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderNumber", children: [
|
|
9905
10129
|
"#",
|
|
9906
10130
|
renderResizeHandle("number")
|
|
9907
10131
|
] }),
|
|
9908
|
-
/* @__PURE__ */ (0,
|
|
10132
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderName", children: [
|
|
9909
10133
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
9910
10134
|
renderResizeHandle("name")
|
|
9911
10135
|
] }),
|
|
9912
|
-
/* @__PURE__ */ (0,
|
|
9913
|
-
/* @__PURE__ */ (0,
|
|
10136
|
+
/* @__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") }),
|
|
10137
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
9914
10138
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
9915
10139
|
renderResizeHandle("assignments")
|
|
9916
10140
|
] }),
|
|
9917
|
-
/* @__PURE__ */ (0,
|
|
10141
|
+
/* @__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
10142
|
]
|
|
9919
10143
|
}
|
|
9920
10144
|
),
|
|
9921
|
-
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0,
|
|
9922
|
-
/* @__PURE__ */ (0,
|
|
10145
|
+
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react15.default.Fragment, { children: [
|
|
10146
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9923
10147
|
"div",
|
|
9924
10148
|
{
|
|
9925
10149
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
9926
10150
|
style: { height: `${group.height}px` },
|
|
9927
10151
|
children: [
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10152
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9929
10153
|
"button",
|
|
9930
10154
|
{
|
|
9931
10155
|
type: "button",
|
|
@@ -9936,12 +10160,12 @@ function ResourceTimelineChart({
|
|
|
9936
10160
|
event.stopPropagation();
|
|
9937
10161
|
toggleResourceGroupCollapsed(group.key);
|
|
9938
10162
|
},
|
|
9939
|
-
children: /* @__PURE__ */ (0,
|
|
10163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResourceGroupChevronIcon, {})
|
|
9940
10164
|
}
|
|
9941
10165
|
),
|
|
9942
|
-
/* @__PURE__ */ (0,
|
|
9943
|
-
/* @__PURE__ */ (0,
|
|
9944
|
-
canAddResource && /* @__PURE__ */ (0,
|
|
10166
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
10167
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
10168
|
+
canAddResource && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9945
10169
|
"button",
|
|
9946
10170
|
{
|
|
9947
10171
|
type: "button",
|
|
@@ -9960,7 +10184,7 @@ function ResourceTimelineChart({
|
|
|
9960
10184
|
),
|
|
9961
10185
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
9962
10186
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
9963
|
-
return /* @__PURE__ */ (0,
|
|
10187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9964
10188
|
ResourceHeader,
|
|
9965
10189
|
{
|
|
9966
10190
|
resource: row.resource,
|
|
@@ -9980,7 +10204,7 @@ function ResourceTimelineChart({
|
|
|
9980
10204
|
row.resourceId
|
|
9981
10205
|
);
|
|
9982
10206
|
}),
|
|
9983
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ (0,
|
|
10207
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9984
10208
|
NewResourceRow,
|
|
9985
10209
|
{
|
|
9986
10210
|
height: resourceAddRowHeight,
|
|
@@ -9989,7 +10213,7 @@ function ResourceTimelineChart({
|
|
|
9989
10213
|
columnTemplate: resourceColumnTemplate
|
|
9990
10214
|
}
|
|
9991
10215
|
)
|
|
9992
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ (0,
|
|
10216
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9993
10217
|
ResourceHeader,
|
|
9994
10218
|
{
|
|
9995
10219
|
resource: row.resource,
|
|
@@ -10008,7 +10232,7 @@ function ResourceTimelineChart({
|
|
|
10008
10232
|
},
|
|
10009
10233
|
row.resourceId
|
|
10010
10234
|
)),
|
|
10011
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */ (0,
|
|
10235
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10012
10236
|
NewResourceRow,
|
|
10013
10237
|
{
|
|
10014
10238
|
height: resourceAddRowHeight,
|
|
@@ -10016,7 +10240,7 @@ function ResourceTimelineChart({
|
|
|
10016
10240
|
onCancel: handleCancelNewResource,
|
|
10017
10241
|
columnTemplate: resourceColumnTemplate
|
|
10018
10242
|
}
|
|
10019
|
-
) : /* @__PURE__ */ (0,
|
|
10243
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10020
10244
|
"button",
|
|
10021
10245
|
{
|
|
10022
10246
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -10032,18 +10256,18 @@ function ResourceTimelineChart({
|
|
|
10032
10256
|
]
|
|
10033
10257
|
}
|
|
10034
10258
|
),
|
|
10035
|
-
/* @__PURE__ */ (0,
|
|
10259
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10036
10260
|
"div",
|
|
10037
10261
|
{
|
|
10038
10262
|
className: "gantt-resourceTimeline-chartSurface",
|
|
10039
10263
|
style: { minWidth: `${gridWidth}px` },
|
|
10040
10264
|
children: [
|
|
10041
|
-
/* @__PURE__ */ (0,
|
|
10265
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10042
10266
|
"div",
|
|
10043
10267
|
{
|
|
10044
10268
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
10045
10269
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
10046
|
-
children: /* @__PURE__ */ (0,
|
|
10270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10047
10271
|
TimeScaleHeader_default,
|
|
10048
10272
|
{
|
|
10049
10273
|
days: dateRange,
|
|
@@ -10055,14 +10279,14 @@ function ResourceTimelineChart({
|
|
|
10055
10279
|
)
|
|
10056
10280
|
}
|
|
10057
10281
|
),
|
|
10058
|
-
/* @__PURE__ */ (0,
|
|
10282
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10059
10283
|
"div",
|
|
10060
10284
|
{
|
|
10061
10285
|
ref: gridRef,
|
|
10062
10286
|
className: "gantt-resourceTimeline-grid",
|
|
10063
10287
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
10064
10288
|
children: [
|
|
10065
|
-
/* @__PURE__ */ (0,
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10066
10290
|
GridBackground_default,
|
|
10067
10291
|
{
|
|
10068
10292
|
dateRange,
|
|
@@ -10072,8 +10296,8 @@ function ResourceTimelineChart({
|
|
|
10072
10296
|
isCustomWeekend: weekendPredicate
|
|
10073
10297
|
}
|
|
10074
10298
|
),
|
|
10075
|
-
todayInRange && /* @__PURE__ */ (0,
|
|
10076
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0,
|
|
10299
|
+
todayInRange && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TodayIndicator_default, { monthStart, dayWidth }),
|
|
10300
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10077
10301
|
"div",
|
|
10078
10302
|
{
|
|
10079
10303
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -10085,7 +10309,7 @@ function ResourceTimelineChart({
|
|
|
10085
10309
|
},
|
|
10086
10310
|
`group-row-${group.key}`
|
|
10087
10311
|
)),
|
|
10088
|
-
displayLayout.rows.map((row) => /* @__PURE__ */ (0,
|
|
10312
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10089
10313
|
"div",
|
|
10090
10314
|
{
|
|
10091
10315
|
className: "gantt-resourceTimeline-row",
|
|
@@ -10097,7 +10321,7 @@ function ResourceTimelineChart({
|
|
|
10097
10321
|
},
|
|
10098
10322
|
row.resourceId
|
|
10099
10323
|
)),
|
|
10100
|
-
canAddResource && /* @__PURE__ */ (0,
|
|
10324
|
+
canAddResource && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10101
10325
|
"div",
|
|
10102
10326
|
{
|
|
10103
10327
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10108,7 +10332,7 @@ function ResourceTimelineChart({
|
|
|
10108
10332
|
}
|
|
10109
10333
|
}
|
|
10110
10334
|
),
|
|
10111
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ (0,
|
|
10335
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10112
10336
|
"div",
|
|
10113
10337
|
{
|
|
10114
10338
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -10179,7 +10403,7 @@ function ResourceTimelineChart({
|
|
|
10179
10403
|
const tooltipFirstLine = layoutItem.item.tooltip?.firstLine ?? layoutItem.item.title;
|
|
10180
10404
|
const tooltipSecondLine = resourceItemTooltipLines === 2 ? layoutItem.item.tooltip?.secondLine ?? layoutItem.item.subtitle : void 0;
|
|
10181
10405
|
const tooltipSecondLineIcon = layoutItem.item.tooltip?.secondLineIcon;
|
|
10182
|
-
return /* @__PURE__ */ (0,
|
|
10406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
10183
10407
|
"div",
|
|
10184
10408
|
{
|
|
10185
10409
|
className,
|
|
@@ -10207,11 +10431,11 @@ function ResourceTimelineChart({
|
|
|
10207
10431
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
10208
10432
|
},
|
|
10209
10433
|
children: [
|
|
10210
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */ (0,
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
10212
|
-
/* @__PURE__ */ (0,
|
|
10434
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
10435
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
10436
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
10213
10437
|
] }),
|
|
10214
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ (0,
|
|
10438
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10215
10439
|
"span",
|
|
10216
10440
|
{
|
|
10217
10441
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -10223,7 +10447,7 @@ function ResourceTimelineChart({
|
|
|
10223
10447
|
},
|
|
10224
10448
|
`weekend-overlay-${index}`
|
|
10225
10449
|
)),
|
|
10226
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ (0,
|
|
10450
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10227
10451
|
"span",
|
|
10228
10452
|
{
|
|
10229
10453
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -10235,7 +10459,7 @@ function ResourceTimelineChart({
|
|
|
10235
10459
|
},
|
|
10236
10460
|
`conflict-overlay-${index}`
|
|
10237
10461
|
)),
|
|
10238
|
-
hasItemMenu && /* @__PURE__ */ (0,
|
|
10462
|
+
hasItemMenu && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10239
10463
|
"button",
|
|
10240
10464
|
{
|
|
10241
10465
|
type: "button",
|
|
@@ -10248,12 +10472,12 @@ function ResourceTimelineChart({
|
|
|
10248
10472
|
event.stopPropagation();
|
|
10249
10473
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
10250
10474
|
},
|
|
10251
|
-
children: /* @__PURE__ */ (0,
|
|
10475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
10252
10476
|
}
|
|
10253
10477
|
),
|
|
10254
|
-
/* @__PURE__ */ (0,
|
|
10255
|
-
/* @__PURE__ */ (0,
|
|
10256
|
-
/* @__PURE__ */ (0,
|
|
10478
|
+
/* @__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: [
|
|
10479
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
10480
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
10257
10481
|
"span",
|
|
10258
10482
|
{
|
|
10259
10483
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -10261,15 +10485,15 @@ function ResourceTimelineChart({
|
|
|
10261
10485
|
children: durationValue
|
|
10262
10486
|
}
|
|
10263
10487
|
),
|
|
10264
|
-
/* @__PURE__ */ (0,
|
|
10488
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
10265
10489
|
] }),
|
|
10266
|
-
layoutItem.item.subtitle && /* @__PURE__ */ (0,
|
|
10490
|
+
layoutItem.item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
10267
10491
|
] }) }),
|
|
10268
|
-
/* @__PURE__ */ (0,
|
|
10269
|
-
/* @__PURE__ */ (0,
|
|
10270
|
-
tooltipSecondLine && /* @__PURE__ */ (0,
|
|
10271
|
-
tooltipSecondLineIcon && /* @__PURE__ */ (0,
|
|
10272
|
-
/* @__PURE__ */ (0,
|
|
10492
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
10493
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
10494
|
+
tooltipSecondLine && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
10495
|
+
tooltipSecondLineIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
10496
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
10273
10497
|
] })
|
|
10274
10498
|
] })
|
|
10275
10499
|
]
|
|
@@ -10291,7 +10515,7 @@ function ResourceTimelineChart({
|
|
|
10291
10515
|
|
|
10292
10516
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
10293
10517
|
var import_react16 = require("react");
|
|
10294
|
-
var
|
|
10518
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
10295
10519
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
10296
10520
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
10297
10521
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
@@ -10491,9 +10715,9 @@ function TableMatrix({
|
|
|
10491
10715
|
return task ? { task, index } : null;
|
|
10492
10716
|
}).filter((entry) => entry !== null);
|
|
10493
10717
|
}, [tasks, visibleRowIndices]);
|
|
10494
|
-
return /* @__PURE__ */ (0,
|
|
10495
|
-
hasAutoWidthColumns && /* @__PURE__ */ (0,
|
|
10496
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0,
|
|
10718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
10719
|
+
hasAutoWidthColumns && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
10720
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10497
10721
|
"div",
|
|
10498
10722
|
{
|
|
10499
10723
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10502,7 +10726,7 @@ function TableMatrix({
|
|
|
10502
10726
|
},
|
|
10503
10727
|
`header:${column.id}`
|
|
10504
10728
|
)),
|
|
10505
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0,
|
|
10729
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10506
10730
|
"div",
|
|
10507
10731
|
{
|
|
10508
10732
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -10512,8 +10736,8 @@ function TableMatrix({
|
|
|
10512
10736
|
`${task.id}:${column.id}`
|
|
10513
10737
|
)))
|
|
10514
10738
|
] }),
|
|
10515
|
-
/* @__PURE__ */ (0,
|
|
10516
|
-
hasGroupHeader && /* @__PURE__ */ (0,
|
|
10739
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
10740
|
+
hasGroupHeader && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10517
10741
|
"div",
|
|
10518
10742
|
{
|
|
10519
10743
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -10521,7 +10745,7 @@ function TableMatrix({
|
|
|
10521
10745
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
10522
10746
|
height: `${topRowHeight}px`
|
|
10523
10747
|
},
|
|
10524
|
-
children: headerSpans.map((span) => /* @__PURE__ */ (0,
|
|
10748
|
+
children: headerSpans.map((span) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10525
10749
|
"div",
|
|
10526
10750
|
{
|
|
10527
10751
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -10532,7 +10756,7 @@ function TableMatrix({
|
|
|
10532
10756
|
))
|
|
10533
10757
|
}
|
|
10534
10758
|
),
|
|
10535
|
-
/* @__PURE__ */ (0,
|
|
10759
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10536
10760
|
"div",
|
|
10537
10761
|
{
|
|
10538
10762
|
className: "gantt-mx-headerRow",
|
|
@@ -10540,7 +10764,7 @@ function TableMatrix({
|
|
|
10540
10764
|
children: columns.map((column) => {
|
|
10541
10765
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10542
10766
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10543
|
-
return /* @__PURE__ */ (0,
|
|
10767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10544
10768
|
"div",
|
|
10545
10769
|
{
|
|
10546
10770
|
className: joinClasses(
|
|
@@ -10549,7 +10773,7 @@ function TableMatrix({
|
|
|
10549
10773
|
),
|
|
10550
10774
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
10551
10775
|
children: [
|
|
10552
|
-
shouldRenderOverlayEdge && /* @__PURE__ */ (0,
|
|
10776
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10553
10777
|
"span",
|
|
10554
10778
|
{
|
|
10555
10779
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10559,7 +10783,7 @@ function TableMatrix({
|
|
|
10559
10783
|
}
|
|
10560
10784
|
}
|
|
10561
10785
|
),
|
|
10562
|
-
/* @__PURE__ */ (0,
|
|
10786
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
10563
10787
|
]
|
|
10564
10788
|
},
|
|
10565
10789
|
column.id
|
|
@@ -10568,7 +10792,7 @@ function TableMatrix({
|
|
|
10568
10792
|
}
|
|
10569
10793
|
)
|
|
10570
10794
|
] }),
|
|
10571
|
-
/* @__PURE__ */ (0,
|
|
10795
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10572
10796
|
"div",
|
|
10573
10797
|
{
|
|
10574
10798
|
className: "gantt-mx-body",
|
|
@@ -10582,7 +10806,7 @@ function TableMatrix({
|
|
|
10582
10806
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
10583
10807
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
10584
10808
|
const isTotal = Boolean(task.isTotal);
|
|
10585
|
-
return /* @__PURE__ */ (0,
|
|
10809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10586
10810
|
"div",
|
|
10587
10811
|
{
|
|
10588
10812
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10607,7 +10831,7 @@ function TableMatrix({
|
|
|
10607
10831
|
const overlayWidthPercent = getOverlayWidthPercent(column, overlayDateMs);
|
|
10608
10832
|
const shouldRenderOverlay = overlayWidthPercent > 0 && (!dateOverlay || !dateOverlay.shouldRender || dateOverlay.shouldRender({ task, column, rowIndex: index, columnIndex }));
|
|
10609
10833
|
const shouldRenderOverlayEdge = isOverlayDateInColumn(column, overlayDateMs);
|
|
10610
|
-
return /* @__PURE__ */ (0,
|
|
10834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10611
10835
|
"div",
|
|
10612
10836
|
{
|
|
10613
10837
|
className: joinClasses(
|
|
@@ -10622,7 +10846,7 @@ function TableMatrix({
|
|
|
10622
10846
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
10623
10847
|
},
|
|
10624
10848
|
children: [
|
|
10625
|
-
shouldRenderOverlay && /* @__PURE__ */ (0,
|
|
10849
|
+
shouldRenderOverlay && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10626
10850
|
"span",
|
|
10627
10851
|
{
|
|
10628
10852
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -10632,7 +10856,7 @@ function TableMatrix({
|
|
|
10632
10856
|
}
|
|
10633
10857
|
}
|
|
10634
10858
|
),
|
|
10635
|
-
shouldRenderOverlayEdge && /* @__PURE__ */ (0,
|
|
10859
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10636
10860
|
"span",
|
|
10637
10861
|
{
|
|
10638
10862
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -10642,7 +10866,7 @@ function TableMatrix({
|
|
|
10642
10866
|
}
|
|
10643
10867
|
}
|
|
10644
10868
|
),
|
|
10645
|
-
/* @__PURE__ */ (0,
|
|
10869
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
10646
10870
|
]
|
|
10647
10871
|
},
|
|
10648
10872
|
`${task.id}:${column.id}`
|
|
@@ -10659,7 +10883,7 @@ function TableMatrix({
|
|
|
10659
10883
|
|
|
10660
10884
|
// src/components/PlanFactMatrix/PlanFactMatrix.tsx
|
|
10661
10885
|
var import_react17 = __toESM(require("react"));
|
|
10662
|
-
var
|
|
10886
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
10663
10887
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
10664
10888
|
function joinClasses2(...values) {
|
|
10665
10889
|
return values.filter(Boolean).join(" ");
|
|
@@ -10768,7 +10992,7 @@ function PlanFactCellEditor({
|
|
|
10768
10992
|
}
|
|
10769
10993
|
onCommit(parsed);
|
|
10770
10994
|
}, [draft, onCancel, onCommit]);
|
|
10771
|
-
return /* @__PURE__ */ (0,
|
|
10995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10772
10996
|
"input",
|
|
10773
10997
|
{
|
|
10774
10998
|
ref: inputRef,
|
|
@@ -10882,7 +11106,7 @@ function PlanFactRowInner({
|
|
|
10882
11106
|
showOverflowTooltip,
|
|
10883
11107
|
hideOverflowTooltip
|
|
10884
11108
|
}) {
|
|
10885
|
-
return /* @__PURE__ */ (0,
|
|
11109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10886
11110
|
"div",
|
|
10887
11111
|
{
|
|
10888
11112
|
"data-gantt-task-row-id": task.id,
|
|
@@ -10920,7 +11144,7 @@ function PlanFactRowInner({
|
|
|
10920
11144
|
const isSelected = !isParent && isInRenderedRange;
|
|
10921
11145
|
const showFillHandle = !isParent && !isEditing && isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.toDateIndex && subrowIndex === renderedRangeBounds.toSubrowIndex;
|
|
10922
11146
|
const isRangeAnchor = !showFillHandle && !isParent && selectedRange?.anchor.taskId === task.id && selectedRange.anchor.dateIndex === dateIndex && selectedRange.anchor.kind === kind;
|
|
10923
|
-
return /* @__PURE__ */ (0,
|
|
11147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10924
11148
|
"div",
|
|
10925
11149
|
{
|
|
10926
11150
|
"data-plan-fact-task-id": task.id,
|
|
@@ -11017,7 +11241,7 @@ function PlanFactRowInner({
|
|
|
11017
11241
|
}
|
|
11018
11242
|
},
|
|
11019
11243
|
children: [
|
|
11020
|
-
isEditing ? /* @__PURE__ */ (0,
|
|
11244
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11021
11245
|
PlanFactCellEditor,
|
|
11022
11246
|
{
|
|
11023
11247
|
value,
|
|
@@ -11043,7 +11267,7 @@ function PlanFactRowInner({
|
|
|
11043
11267
|
focusCell(nextActiveCell);
|
|
11044
11268
|
}
|
|
11045
11269
|
}
|
|
11046
|
-
) : /* @__PURE__ */ (0,
|
|
11270
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11047
11271
|
"span",
|
|
11048
11272
|
{
|
|
11049
11273
|
className: "gantt-pf-cellValue",
|
|
@@ -11057,7 +11281,7 @@ function PlanFactRowInner({
|
|
|
11057
11281
|
children: isParent ? "" : formatValue(value)
|
|
11058
11282
|
}
|
|
11059
11283
|
),
|
|
11060
|
-
showFillHandle && /* @__PURE__ */ (0,
|
|
11284
|
+
showFillHandle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11061
11285
|
"span",
|
|
11062
11286
|
{
|
|
11063
11287
|
className: "gantt-pf-fillHandle",
|
|
@@ -11569,7 +11793,7 @@ function PlanFactMatrix({
|
|
|
11569
11793
|
document.removeEventListener("mousedown", handleMouseDown);
|
|
11570
11794
|
};
|
|
11571
11795
|
}, [clearSelection]);
|
|
11572
|
-
return /* @__PURE__ */ (0,
|
|
11796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
11573
11797
|
"div",
|
|
11574
11798
|
{
|
|
11575
11799
|
ref: rootRef,
|
|
@@ -11579,8 +11803,8 @@ function PlanFactMatrix({
|
|
|
11579
11803
|
["--gantt-pf-day-width"]: `${dayWidth}px`
|
|
11580
11804
|
},
|
|
11581
11805
|
children: [
|
|
11582
|
-
/* @__PURE__ */ (0,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
11806
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
11807
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11584
11808
|
"div",
|
|
11585
11809
|
{
|
|
11586
11810
|
className: "gantt-pf-dateWindow",
|
|
@@ -11588,7 +11812,7 @@ function PlanFactMatrix({
|
|
|
11588
11812
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11589
11813
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11590
11814
|
},
|
|
11591
|
-
children: /* @__PURE__ */ (0,
|
|
11815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11592
11816
|
TimeScaleHeader_default,
|
|
11593
11817
|
{
|
|
11594
11818
|
days: renderedDateWindow.days,
|
|
@@ -11600,7 +11824,7 @@ function PlanFactMatrix({
|
|
|
11600
11824
|
)
|
|
11601
11825
|
}
|
|
11602
11826
|
),
|
|
11603
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ (0,
|
|
11827
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11604
11828
|
"span",
|
|
11605
11829
|
{
|
|
11606
11830
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -11612,7 +11836,7 @@ function PlanFactMatrix({
|
|
|
11612
11836
|
}
|
|
11613
11837
|
)
|
|
11614
11838
|
] }),
|
|
11615
|
-
/* @__PURE__ */ (0,
|
|
11839
|
+
/* @__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
11840
|
"span",
|
|
11617
11841
|
{
|
|
11618
11842
|
className: "gantt-pf-monthSeparator",
|
|
@@ -11623,7 +11847,7 @@ function PlanFactMatrix({
|
|
|
11623
11847
|
},
|
|
11624
11848
|
`month-separator-${dateIndex}`
|
|
11625
11849
|
)) }),
|
|
11626
|
-
/* @__PURE__ */ (0,
|
|
11850
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
11627
11851
|
"div",
|
|
11628
11852
|
{
|
|
11629
11853
|
ref: bodyRef,
|
|
@@ -11634,7 +11858,7 @@ function PlanFactMatrix({
|
|
|
11634
11858
|
width: `${totalWidth}px`
|
|
11635
11859
|
},
|
|
11636
11860
|
children: [
|
|
11637
|
-
/* @__PURE__ */ (0,
|
|
11861
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11638
11862
|
"div",
|
|
11639
11863
|
{
|
|
11640
11864
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -11642,7 +11866,7 @@ function PlanFactMatrix({
|
|
|
11642
11866
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
11643
11867
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
11644
11868
|
},
|
|
11645
|
-
children: /* @__PURE__ */ (0,
|
|
11869
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11646
11870
|
GridBackground_default,
|
|
11647
11871
|
{
|
|
11648
11872
|
dateRange: renderedDateWindow.days,
|
|
@@ -11660,7 +11884,7 @@ function PlanFactMatrix({
|
|
|
11660
11884
|
if (!task) return null;
|
|
11661
11885
|
const isParent = parentTaskIds.has(task.id);
|
|
11662
11886
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
11663
|
-
return /* @__PURE__ */ (0,
|
|
11887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11664
11888
|
PlanFactRow,
|
|
11665
11889
|
{
|
|
11666
11890
|
task,
|
|
@@ -11705,7 +11929,7 @@ function PlanFactMatrix({
|
|
|
11705
11929
|
]
|
|
11706
11930
|
}
|
|
11707
11931
|
),
|
|
11708
|
-
overflowTooltip && /* @__PURE__ */ (0,
|
|
11932
|
+
overflowTooltip && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
11709
11933
|
"div",
|
|
11710
11934
|
{
|
|
11711
11935
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -12131,7 +12355,7 @@ function createTaskPreviewPositionStore() {
|
|
|
12131
12355
|
}
|
|
12132
12356
|
|
|
12133
12357
|
// src/components/GanttChart/GanttChart.tsx
|
|
12134
|
-
var
|
|
12358
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
12135
12359
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
12136
12360
|
var TASK_ROW_OVERSCAN = 8;
|
|
12137
12361
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
@@ -12258,9 +12482,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
12258
12482
|
}
|
|
12259
12483
|
function GanttChartInner(props, ref) {
|
|
12260
12484
|
if (props.mode === "resource-planner") {
|
|
12261
|
-
return /* @__PURE__ */ (0,
|
|
12485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ResourceTimelineChart, { ...props });
|
|
12262
12486
|
}
|
|
12263
|
-
return /* @__PURE__ */ (0,
|
|
12487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
12264
12488
|
TaskGanttChart,
|
|
12265
12489
|
{
|
|
12266
12490
|
...props,
|
|
@@ -12352,6 +12576,162 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12352
12576
|
const [forceFullRenderForPrint, setForceFullRenderForPrint] = (0, import_react18.useState)(false);
|
|
12353
12577
|
const [planFactDateWindow, setPlanFactDateWindow] = (0, import_react18.useState)({ start: 0, end: 0 });
|
|
12354
12578
|
const [selectedChip, setSelectedChip] = (0, import_react18.useState)(null);
|
|
12579
|
+
const [dependencyCreationDrag, setDependencyCreationDrag] = (0, import_react18.useState)(null);
|
|
12580
|
+
const dependencyCreationRef = (0, import_react18.useRef)(null);
|
|
12581
|
+
const [dependencyCreationError, setDependencyCreationError] = (0, import_react18.useState)(null);
|
|
12582
|
+
const [dependencyLineMenu, setDependencyLineMenu] = (0, import_react18.useState)(null);
|
|
12583
|
+
const getDependencyPortPoint = (0, import_react18.useCallback)((element, chartRect) => {
|
|
12584
|
+
const rect = element.getBoundingClientRect();
|
|
12585
|
+
const side = element.getAttribute("data-port-side");
|
|
12586
|
+
return {
|
|
12587
|
+
// The port hit-area is deliberately outside the bar. Anchor the preview
|
|
12588
|
+
// to the actual bar boundary instead of the center of that outside zone.
|
|
12589
|
+
x: Math.round((side === "left" ? rect.right - 6 : rect.left + 6) - chartRect.left),
|
|
12590
|
+
y: Math.round(rect.top + rect.height / 2 - chartRect.top)
|
|
12591
|
+
};
|
|
12592
|
+
}, []);
|
|
12593
|
+
const getVisualDependencyType = (0, import_react18.useCallback)((sourceSide, targetSide) => {
|
|
12594
|
+
if (sourceSide === "right" && targetSide === "left") return "FS";
|
|
12595
|
+
if (sourceSide === "left" && targetSide === "left") return "SS";
|
|
12596
|
+
if (sourceSide === "right" && targetSide === "right") return "FF";
|
|
12597
|
+
return "SF";
|
|
12598
|
+
}, []);
|
|
12599
|
+
const handleDependencyPortPointerDown = (0, import_react18.useCallback)((sourceId, sourceSide, event) => {
|
|
12600
|
+
if (disableDependencyEditing || event.button !== 0) return;
|
|
12601
|
+
const chartElement = event.currentTarget.closest(".gantt-taskArea");
|
|
12602
|
+
if (!(chartElement instanceof HTMLElement)) return;
|
|
12603
|
+
event.preventDefault();
|
|
12604
|
+
event.stopPropagation();
|
|
12605
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
12606
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12607
|
+
const source = getDependencyPortPoint(event.currentTarget, chartRect);
|
|
12608
|
+
const nextDrag = { sourceId, sourceSide, source, current: source };
|
|
12609
|
+
dependencyCreationRef.current = nextDrag;
|
|
12610
|
+
setDependencyCreationDrag(nextDrag);
|
|
12611
|
+
}, [disableDependencyEditing, getDependencyPortPoint]);
|
|
12612
|
+
(0, import_react18.useEffect)(() => {
|
|
12613
|
+
if (!dependencyCreationDrag) return;
|
|
12614
|
+
const handlePointerMove = (event) => {
|
|
12615
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12616
|
+
const chartElement = scrollContentRef.current?.querySelector(".gantt-taskArea");
|
|
12617
|
+
if (!activeDrag || !(chartElement instanceof HTMLElement)) return;
|
|
12618
|
+
const chartRect = chartElement.getBoundingClientRect();
|
|
12619
|
+
const targetElement = document.elementFromPoint(event.clientX, event.clientY)?.closest("[data-gantt-dependency-port]");
|
|
12620
|
+
const targetTaskId = targetElement?.getAttribute("data-task-id") ?? void 0;
|
|
12621
|
+
const targetSide = targetElement?.getAttribute("data-port-side");
|
|
12622
|
+
const target = targetTaskId && targetSide && targetTaskId !== activeDrag.sourceId ? { taskId: targetTaskId, side: targetSide } : void 0;
|
|
12623
|
+
const current = targetElement ? getDependencyPortPoint(targetElement, chartRect) : { x: Math.round(event.clientX - chartRect.left), y: Math.round(event.clientY - chartRect.top) };
|
|
12624
|
+
const nextDrag = {
|
|
12625
|
+
...activeDrag,
|
|
12626
|
+
current,
|
|
12627
|
+
target,
|
|
12628
|
+
linkType: target ? getVisualDependencyType(activeDrag.sourceSide, target.side) : void 0
|
|
12629
|
+
};
|
|
12630
|
+
dependencyCreationRef.current = nextDrag;
|
|
12631
|
+
setDependencyCreationDrag(nextDrag);
|
|
12632
|
+
};
|
|
12633
|
+
const handlePointerUp = () => {
|
|
12634
|
+
const activeDrag = dependencyCreationRef.current;
|
|
12635
|
+
dependencyCreationRef.current = null;
|
|
12636
|
+
setDependencyCreationDrag(null);
|
|
12637
|
+
if (!activeDrag?.target || !activeDrag.linkType) return;
|
|
12638
|
+
const predecessorId = activeDrag.sourceId;
|
|
12639
|
+
const successorId = activeDrag.target.taskId;
|
|
12640
|
+
const successor = tasks.find((task) => task.id === successorId);
|
|
12641
|
+
if (!successor || areTasksHierarchicallyRelated(predecessorId, successorId, tasks)) {
|
|
12642
|
+
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");
|
|
12643
|
+
return;
|
|
12644
|
+
}
|
|
12645
|
+
const nextDependency = { taskId: predecessorId, type: activeDrag.linkType, lag: 0 };
|
|
12646
|
+
if ((successor.dependencies ?? []).some((dependency) => dependency.taskId === predecessorId && dependency.type === nextDependency.type)) return;
|
|
12647
|
+
const hypothetical = tasks.map((task) => task.id === successorId ? { ...task, dependencies: [...task.dependencies ?? [], nextDependency] } : task);
|
|
12648
|
+
const validation = validateDependencies(hypothetical);
|
|
12649
|
+
if (!validation.isValid) {
|
|
12650
|
+
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!");
|
|
12651
|
+
return;
|
|
12652
|
+
}
|
|
12653
|
+
const predecessor = tasks.find((task) => task.id === predecessorId);
|
|
12654
|
+
const updatedSuccessor = hypothetical.find((task) => task.id === successorId);
|
|
12655
|
+
if (!predecessor) {
|
|
12656
|
+
onTasksChange?.([updatedSuccessor]);
|
|
12657
|
+
return;
|
|
12658
|
+
}
|
|
12659
|
+
const constraintDate = calculateSuccessorDate(
|
|
12660
|
+
parseUTCDate(predecessor.startDate),
|
|
12661
|
+
parseUTCDate(predecessor.endDate),
|
|
12662
|
+
nextDependency.type,
|
|
12663
|
+
0,
|
|
12664
|
+
businessDays,
|
|
12665
|
+
isCustomWeekend
|
|
12666
|
+
);
|
|
12667
|
+
const duration = getTaskDuration(
|
|
12668
|
+
updatedSuccessor.startDate,
|
|
12669
|
+
updatedSuccessor.endDate,
|
|
12670
|
+
businessDays,
|
|
12671
|
+
isCustomWeekend
|
|
12672
|
+
);
|
|
12673
|
+
const range = nextDependency.type === "FS" || nextDependency.type === "SS" ? buildTaskRangeFromStart(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 })) : buildTaskRangeFromEnd(constraintDate, duration, businessDays, createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }));
|
|
12674
|
+
onTasksChange?.([{
|
|
12675
|
+
...updatedSuccessor,
|
|
12676
|
+
startDate: range.start.toISOString().split("T")[0],
|
|
12677
|
+
endDate: range.end.toISOString().split("T")[0]
|
|
12678
|
+
}]);
|
|
12679
|
+
};
|
|
12680
|
+
const handleKeyDown = (event) => {
|
|
12681
|
+
if (event.key === "Escape") {
|
|
12682
|
+
dependencyCreationRef.current = null;
|
|
12683
|
+
setDependencyCreationDrag(null);
|
|
12684
|
+
}
|
|
12685
|
+
};
|
|
12686
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
12687
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
12688
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
12689
|
+
return () => {
|
|
12690
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12691
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
12692
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
12693
|
+
};
|
|
12694
|
+
}, [businessDays, customDays, dependencyCreationDrag !== null, getDependencyPortPoint, getVisualDependencyType, isWeekend3, onTasksChange, tasks]);
|
|
12695
|
+
(0, import_react18.useEffect)(() => {
|
|
12696
|
+
if (!dependencyCreationError) return;
|
|
12697
|
+
const timeout = window.setTimeout(() => setDependencyCreationError(null), 3e3);
|
|
12698
|
+
return () => window.clearTimeout(timeout);
|
|
12699
|
+
}, [dependencyCreationError]);
|
|
12700
|
+
(0, import_react18.useEffect)(() => {
|
|
12701
|
+
if (!dependencyLineMenu) return;
|
|
12702
|
+
const closeMenu = (event) => {
|
|
12703
|
+
const target = event.target;
|
|
12704
|
+
if (!target.closest(".gantt-dependencyLineMenu")) setDependencyLineMenu(null);
|
|
12705
|
+
};
|
|
12706
|
+
const closeOnEscape = (event) => {
|
|
12707
|
+
if (event.key === "Escape") setDependencyLineMenu(null);
|
|
12708
|
+
};
|
|
12709
|
+
document.addEventListener("mousedown", closeMenu, true);
|
|
12710
|
+
document.addEventListener("keydown", closeOnEscape);
|
|
12711
|
+
return () => {
|
|
12712
|
+
document.removeEventListener("mousedown", closeMenu, true);
|
|
12713
|
+
document.removeEventListener("keydown", closeOnEscape);
|
|
12714
|
+
};
|
|
12715
|
+
}, [dependencyLineMenu]);
|
|
12716
|
+
const handleDependencyLineClick = (0, import_react18.useCallback)((dependency) => {
|
|
12717
|
+
setSelectedChip({
|
|
12718
|
+
predecessorId: dependency.predecessorId,
|
|
12719
|
+
successorId: dependency.successorId,
|
|
12720
|
+
linkType: dependency.linkType
|
|
12721
|
+
});
|
|
12722
|
+
setDependencyLineMenu(dependency);
|
|
12723
|
+
}, []);
|
|
12724
|
+
const handleDependencyLineDelete = (0, import_react18.useCallback)(() => {
|
|
12725
|
+
if (!dependencyLineMenu) return;
|
|
12726
|
+
const successor = tasks.find((task) => task.id === dependencyLineMenu.successorId);
|
|
12727
|
+
if (!successor) return;
|
|
12728
|
+
onTasksChange?.([{
|
|
12729
|
+
...successor,
|
|
12730
|
+
dependencies: (successor.dependencies ?? []).filter((dependency) => !(dependency.taskId === dependencyLineMenu.predecessorId && dependency.type === dependencyLineMenu.linkType))
|
|
12731
|
+
}]);
|
|
12732
|
+
setSelectedChip(null);
|
|
12733
|
+
setDependencyLineMenu(null);
|
|
12734
|
+
}, [dependencyLineMenu, onTasksChange, tasks]);
|
|
12355
12735
|
const [activeTimelineTooltip, setActiveTimelineTooltip] = (0, import_react18.useState)(null);
|
|
12356
12736
|
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
12357
12737
|
const collapsedParentIds = externalCollapsedParentIds ?? internalCollapsedParentIds;
|
|
@@ -13124,19 +13504,19 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13124
13504
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
13125
13505
|
};
|
|
13126
13506
|
}, []);
|
|
13127
|
-
return /* @__PURE__ */ (0,
|
|
13507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13128
13508
|
"div",
|
|
13129
13509
|
{
|
|
13130
13510
|
ref: containerRef,
|
|
13131
13511
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
13132
|
-
children: /* @__PURE__ */ (0,
|
|
13512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13133
13513
|
"div",
|
|
13134
13514
|
{
|
|
13135
13515
|
ref: scrollContainerRef,
|
|
13136
13516
|
className: "gantt-scrollContainer",
|
|
13137
13517
|
style: { height: containerHeight ?? "auto", cursor: "grab" },
|
|
13138
13518
|
onMouseDown: handlePanStart,
|
|
13139
|
-
children: /* @__PURE__ */ (0,
|
|
13519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13140
13520
|
"div",
|
|
13141
13521
|
{
|
|
13142
13522
|
ref: scrollContentRef,
|
|
@@ -13144,7 +13524,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13144
13524
|
onMouseOver: handleSharedRowHover,
|
|
13145
13525
|
onMouseLeave: clearHoveredRows,
|
|
13146
13526
|
children: [
|
|
13147
|
-
/* @__PURE__ */ (0,
|
|
13527
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13148
13528
|
TaskList,
|
|
13149
13529
|
{
|
|
13150
13530
|
tasks: normalizedTasks,
|
|
@@ -13159,7 +13539,10 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13159
13539
|
disableTaskNameEditing,
|
|
13160
13540
|
disableDependencyEditing,
|
|
13161
13541
|
onScrollToTask: scrollToTask,
|
|
13162
|
-
onSelectedChipChange: setSelectedChip
|
|
13542
|
+
onSelectedChipChange: (chip) => setSelectedChip(
|
|
13543
|
+
chip ? { ...chip, linkType: chip.linkType } : null
|
|
13544
|
+
),
|
|
13545
|
+
selectedChip,
|
|
13163
13546
|
onAdd,
|
|
13164
13547
|
onDelete: handleDelete,
|
|
13165
13548
|
onInsertAfter: handleInsertAfter,
|
|
@@ -13199,7 +13582,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13199
13582
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13200
13583
|
}
|
|
13201
13584
|
),
|
|
13202
|
-
/* @__PURE__ */ (0,
|
|
13585
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13203
13586
|
"div",
|
|
13204
13587
|
{
|
|
13205
13588
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
@@ -13209,7 +13592,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13209
13592
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
13210
13593
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
13211
13594
|
},
|
|
13212
|
-
children: isTableMatrixMode ? /* @__PURE__ */ (0,
|
|
13595
|
+
children: isTableMatrixMode ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13213
13596
|
TableMatrix,
|
|
13214
13597
|
{
|
|
13215
13598
|
tasks: visibleTasks,
|
|
@@ -13227,7 +13610,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13227
13610
|
filterMode,
|
|
13228
13611
|
visibleRowIndices: visibleTaskWindowIndices
|
|
13229
13612
|
}
|
|
13230
|
-
) : isPlanFactMode ? /* @__PURE__ */ (0,
|
|
13613
|
+
) : isPlanFactMode ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13231
13614
|
PlanFactMatrix,
|
|
13232
13615
|
{
|
|
13233
13616
|
tasks: visibleTasks,
|
|
@@ -13248,14 +13631,14 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13248
13631
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
13249
13632
|
isCustomWeekend
|
|
13250
13633
|
}
|
|
13251
|
-
) : /* @__PURE__ */ (0,
|
|
13252
|
-
/* @__PURE__ */ (0,
|
|
13634
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
13635
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13253
13636
|
"div",
|
|
13254
13637
|
{
|
|
13255
13638
|
className: "gantt-stickyHeader",
|
|
13256
13639
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
13257
13640
|
children: [
|
|
13258
|
-
/* @__PURE__ */ (0,
|
|
13641
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13259
13642
|
TimeScaleHeader_default,
|
|
13260
13643
|
{
|
|
13261
13644
|
days: dateRange,
|
|
@@ -13268,7 +13651,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13268
13651
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13269
13652
|
}
|
|
13270
13653
|
),
|
|
13271
|
-
activeTimelineTooltip && /* @__PURE__ */ (0,
|
|
13654
|
+
activeTimelineTooltip && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13272
13655
|
"div",
|
|
13273
13656
|
{
|
|
13274
13657
|
className: "gantt-timelineTooltip",
|
|
@@ -13282,7 +13665,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13282
13665
|
]
|
|
13283
13666
|
}
|
|
13284
13667
|
),
|
|
13285
|
-
/* @__PURE__ */ (0,
|
|
13668
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13286
13669
|
"div",
|
|
13287
13670
|
{
|
|
13288
13671
|
className: "gantt-taskArea",
|
|
@@ -13292,7 +13675,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13292
13675
|
height: `${totalGridHeight}px`
|
|
13293
13676
|
},
|
|
13294
13677
|
children: [
|
|
13295
|
-
/* @__PURE__ */ (0,
|
|
13678
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13296
13679
|
GridBackground_default,
|
|
13297
13680
|
{
|
|
13298
13681
|
dateRange,
|
|
@@ -13302,7 +13685,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13302
13685
|
isCustomWeekend
|
|
13303
13686
|
}
|
|
13304
13687
|
),
|
|
13305
|
-
todayInRange && /* @__PURE__ */ (0,
|
|
13688
|
+
todayInRange && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13306
13689
|
TodayIndicator_default,
|
|
13307
13690
|
{
|
|
13308
13691
|
monthStart,
|
|
@@ -13311,7 +13694,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13311
13694
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13312
13695
|
}
|
|
13313
13696
|
),
|
|
13314
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ (0,
|
|
13697
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13315
13698
|
TimelineMarkers_default,
|
|
13316
13699
|
{
|
|
13317
13700
|
rangeStart: monthStart,
|
|
@@ -13322,7 +13705,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13322
13705
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
13323
13706
|
}
|
|
13324
13707
|
),
|
|
13325
|
-
/* @__PURE__ */ (0,
|
|
13708
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13326
13709
|
DependencyLines_default,
|
|
13327
13710
|
{
|
|
13328
13711
|
tasks: renderedDependencyTasks,
|
|
@@ -13337,10 +13720,43 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13337
13720
|
dragOverrides: dependencyOverrides,
|
|
13338
13721
|
selectedDep: selectedChip,
|
|
13339
13722
|
businessDays,
|
|
13340
|
-
weekendPredicate: isCustomWeekend
|
|
13723
|
+
weekendPredicate: isCustomWeekend,
|
|
13724
|
+
onDependencyClick: handleDependencyLineClick
|
|
13725
|
+
}
|
|
13726
|
+
),
|
|
13727
|
+
dependencyLineMenu && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13728
|
+
"div",
|
|
13729
|
+
{
|
|
13730
|
+
className: "gantt-dependencyLineMenu",
|
|
13731
|
+
style: { left: `${dependencyLineMenu.x + 10}px`, top: `${dependencyLineMenu.y}px` },
|
|
13732
|
+
role: "dialog",
|
|
13733
|
+
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
13734
|
+
children: [
|
|
13735
|
+
/* @__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" }),
|
|
13736
|
+
!disableDependencyEditing && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13737
|
+
"button",
|
|
13738
|
+
{
|
|
13739
|
+
type: "button",
|
|
13740
|
+
className: "gantt-dependencyLineMenuDelete",
|
|
13741
|
+
"aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13742
|
+
title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
13743
|
+
onClick: handleDependencyLineDelete,
|
|
13744
|
+
children: "\xD7"
|
|
13745
|
+
}
|
|
13746
|
+
)
|
|
13747
|
+
]
|
|
13748
|
+
}
|
|
13749
|
+
),
|
|
13750
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13751
|
+
DependencyCreationOverlay,
|
|
13752
|
+
{
|
|
13753
|
+
drag: dependencyCreationDrag,
|
|
13754
|
+
width: gridWidth,
|
|
13755
|
+
height: totalGridHeight
|
|
13341
13756
|
}
|
|
13342
13757
|
),
|
|
13343
|
-
|
|
13758
|
+
dependencyCreationError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
13759
|
+
dragGuideLines && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13344
13760
|
DragGuideLines_default,
|
|
13345
13761
|
{
|
|
13346
13762
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -13350,7 +13766,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13350
13766
|
totalHeight: totalGridHeight
|
|
13351
13767
|
}
|
|
13352
13768
|
),
|
|
13353
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ (0,
|
|
13769
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13354
13770
|
"div",
|
|
13355
13771
|
{
|
|
13356
13772
|
style: {
|
|
@@ -13360,7 +13776,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13360
13776
|
right: 0,
|
|
13361
13777
|
height: `${effectiveRowHeight}px`
|
|
13362
13778
|
},
|
|
13363
|
-
children: /* @__PURE__ */ (0,
|
|
13779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
13364
13780
|
TaskRow_default,
|
|
13365
13781
|
{
|
|
13366
13782
|
task,
|
|
@@ -13391,6 +13807,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13391
13807
|
customDays,
|
|
13392
13808
|
isWeekend: isWeekend3,
|
|
13393
13809
|
disableTaskDrag,
|
|
13810
|
+
disableDependencyEditing,
|
|
13811
|
+
onDependencyPortPointerDown: handleDependencyPortPointerDown,
|
|
13812
|
+
isDependencyDragActive: dependencyCreationDrag !== null,
|
|
13394
13813
|
viewMode
|
|
13395
13814
|
}
|
|
13396
13815
|
)
|
|
@@ -13417,7 +13836,7 @@ GanttChart.displayName = "GanttChart";
|
|
|
13417
13836
|
|
|
13418
13837
|
// src/components/ui/Button.tsx
|
|
13419
13838
|
var import_react19 = __toESM(require("react"));
|
|
13420
|
-
var
|
|
13839
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
13421
13840
|
var Button = import_react19.default.forwardRef(
|
|
13422
13841
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
13423
13842
|
const classes = [
|
|
@@ -13426,7 +13845,7 @@ var Button = import_react19.default.forwardRef(
|
|
|
13426
13845
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
13427
13846
|
className || ""
|
|
13428
13847
|
].filter(Boolean).join(" ");
|
|
13429
|
-
return /* @__PURE__ */ (0,
|
|
13848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { ref, className: classes, ...props, children });
|
|
13430
13849
|
}
|
|
13431
13850
|
);
|
|
13432
13851
|
Button.displayName = "Button";
|