gantt-lib 0.144.1 → 0.145.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/README.md +38 -0
- package/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +78 -420
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -420
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7590,40 +7590,6 @@ var getEndDateFromDuration = (startDate, durationDays) => {
|
|
|
7590
7590
|
const start = parseUTCDate(startDate);
|
|
7591
7591
|
return new Date(start.getTime() + (durationDays - 1) * DAY_MS4).toISOString().split("T")[0];
|
|
7592
7592
|
};
|
|
7593
|
-
var TrashIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7594
|
-
"svg",
|
|
7595
|
-
{
|
|
7596
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7597
|
-
width: "12",
|
|
7598
|
-
height: "12",
|
|
7599
|
-
viewBox: "0 0 24 24",
|
|
7600
|
-
fill: "none",
|
|
7601
|
-
stroke: "currentColor",
|
|
7602
|
-
strokeWidth: "2",
|
|
7603
|
-
strokeLinecap: "round",
|
|
7604
|
-
strokeLinejoin: "round",
|
|
7605
|
-
children: [
|
|
7606
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
7607
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M3 6h18" }),
|
|
7608
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
7609
|
-
]
|
|
7610
|
-
}
|
|
7611
|
-
);
|
|
7612
|
-
var PlusIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7613
|
-
"svg",
|
|
7614
|
-
{
|
|
7615
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7616
|
-
width: "14",
|
|
7617
|
-
height: "14",
|
|
7618
|
-
viewBox: "0 0 24 24",
|
|
7619
|
-
fill: "none",
|
|
7620
|
-
stroke: "currentColor",
|
|
7621
|
-
strokeWidth: "2",
|
|
7622
|
-
strokeLinecap: "round",
|
|
7623
|
-
strokeLinejoin: "round",
|
|
7624
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M12 5v14M5 12h14" })
|
|
7625
|
-
}
|
|
7626
|
-
);
|
|
7627
7593
|
var DepEditIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7628
7594
|
"svg",
|
|
7629
7595
|
{
|
|
@@ -7666,67 +7632,6 @@ var VerticalDotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
|
7666
7632
|
]
|
|
7667
7633
|
}
|
|
7668
7634
|
);
|
|
7669
|
-
var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7670
|
-
"svg",
|
|
7671
|
-
{
|
|
7672
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7673
|
-
width: "16",
|
|
7674
|
-
height: "16",
|
|
7675
|
-
viewBox: "0 0 24 24",
|
|
7676
|
-
fill: "none",
|
|
7677
|
-
stroke: "currentColor",
|
|
7678
|
-
strokeWidth: "2",
|
|
7679
|
-
strokeLinecap: "round",
|
|
7680
|
-
strokeLinejoin: "round",
|
|
7681
|
-
children: [
|
|
7682
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
7683
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
7684
|
-
]
|
|
7685
|
-
}
|
|
7686
|
-
);
|
|
7687
|
-
var UngroupIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7688
|
-
"svg",
|
|
7689
|
-
{
|
|
7690
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7691
|
-
width: "16",
|
|
7692
|
-
height: "16",
|
|
7693
|
-
viewBox: "0 0 24 24",
|
|
7694
|
-
fill: "none",
|
|
7695
|
-
stroke: "currentColor",
|
|
7696
|
-
strokeWidth: "2",
|
|
7697
|
-
strokeLinecap: "round",
|
|
7698
|
-
strokeLinejoin: "round",
|
|
7699
|
-
children: [
|
|
7700
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M3 12h10" }),
|
|
7701
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "m6 9-3 3 3 3" }),
|
|
7702
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M13 6h8" }),
|
|
7703
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M13 18h8" })
|
|
7704
|
-
]
|
|
7705
|
-
}
|
|
7706
|
-
);
|
|
7707
|
-
var TASK_COLOR_PALETTE = [
|
|
7708
|
-
// { label: "Палисандр", value: "#A61E4D" },
|
|
7709
|
-
// { label: "Киноварь", value: "#E8590C" },
|
|
7710
|
-
// { label: "Жёлт", value: "#eec45c" },
|
|
7711
|
-
{ label: "\u041A\u0438\u043D\u043E\u0432\u0430\u0440\u044C2", value: "#fe724e" },
|
|
7712
|
-
// { label: "Оранжевый", value: "#F08C00" },
|
|
7713
|
-
{ label: "\u041E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u04392", value: "#ff991f" },
|
|
7714
|
-
{ label: "\u0417\u043E\u043B\u043E\u0442\u043E\u0439", value: "#e5c800" },
|
|
7715
|
-
{ label: "\u0411\u0438\u0440\u044E\u0437\u0430", value: "#58d8a3" },
|
|
7716
|
-
{ label: "\u041F\u0430\u043B\u0438\u0441\u0430\u043D\u0434\u0440", value: "#d64a7b" },
|
|
7717
|
-
{ label: "\u041F\u0435\u0441\u043E\u0447\u043D\u044B\u0439", value: "#997B10" },
|
|
7718
|
-
{ label: "\u0428\u0430\u0440\u0442\u0440\u0435\u0437", value: "#A3BE00" },
|
|
7719
|
-
{ label: "\u0413\u043E\u043B\u0443\u0431\u043E\u0439", value: "#03c7e6" },
|
|
7720
|
-
{ label: "\u0412\u0438\u043D\u043E\u0433\u0440\u0430\u04342", value: "#8678d9" },
|
|
7721
|
-
{ label: "\u0421\u0435\u0440\u044B\u04392", value: "#6b778c" },
|
|
7722
|
-
{ label: "\u041B\u0435\u0441\u043D\u043E\u0439", value: "#2B8A3E" }
|
|
7723
|
-
// { label: "Лесной3", value: "#60b838" },
|
|
7724
|
-
// { label: "Бирюза", value: "#0B7285" },
|
|
7725
|
-
// { label: "Серый", value: "#495057" },
|
|
7726
|
-
// { label: "Океан", value: "#5244ff" },
|
|
7727
|
-
// { label: "Океан2", value: "#0626ba" },
|
|
7728
|
-
// { label: "Виноград", value: "#AE3EC9" },
|
|
7729
|
-
];
|
|
7730
7635
|
var ChevronRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7731
7636
|
"svg",
|
|
7732
7637
|
{
|
|
@@ -7756,81 +7661,6 @@ function formatDependencyPrintLabel(dep, predecessorTaskNumber, lag) {
|
|
|
7756
7661
|
const lagSuffix = effectiveLag === 0 ? "" : effectiveLag > 0 ? `+${effectiveLag}` : String(effectiveLag);
|
|
7757
7662
|
return `[${predecessorTaskNumber ?? dep.taskId}]${LINK_TYPE_LABELS_RU2[dep.type]}${lagSuffix}`;
|
|
7758
7663
|
}
|
|
7759
|
-
var ArrowLeft = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7760
|
-
"svg",
|
|
7761
|
-
{
|
|
7762
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7763
|
-
width: "16",
|
|
7764
|
-
height: "16",
|
|
7765
|
-
viewBox: "0 0 24 24",
|
|
7766
|
-
fill: "none",
|
|
7767
|
-
stroke: "currentColor",
|
|
7768
|
-
strokeWidth: "2",
|
|
7769
|
-
strokeLinecap: "round",
|
|
7770
|
-
strokeLinejoin: "round",
|
|
7771
|
-
children: [
|
|
7772
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "m12 19-7-7 7-7" }),
|
|
7773
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M19 12H5" })
|
|
7774
|
-
]
|
|
7775
|
-
}
|
|
7776
|
-
);
|
|
7777
|
-
var ArrowRight = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7778
|
-
"svg",
|
|
7779
|
-
{
|
|
7780
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7781
|
-
width: "16",
|
|
7782
|
-
height: "16",
|
|
7783
|
-
viewBox: "0 0 24 24",
|
|
7784
|
-
fill: "none",
|
|
7785
|
-
stroke: "currentColor",
|
|
7786
|
-
strokeWidth: "2",
|
|
7787
|
-
strokeLinecap: "round",
|
|
7788
|
-
strokeLinejoin: "round",
|
|
7789
|
-
children: [
|
|
7790
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M5 12h14" }),
|
|
7791
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "m12 5 7 7-7 7" })
|
|
7792
|
-
]
|
|
7793
|
-
}
|
|
7794
|
-
);
|
|
7795
|
-
var HierarchyButton = ({
|
|
7796
|
-
isChild,
|
|
7797
|
-
rowIndex: _rowIndex,
|
|
7798
|
-
canDemote,
|
|
7799
|
-
onPromote,
|
|
7800
|
-
onDemote
|
|
7801
|
-
}) => {
|
|
7802
|
-
const canPromote = isChild && onPromote;
|
|
7803
|
-
const showDemote = canDemote && !!onDemote;
|
|
7804
|
-
if (!canPromote && !showDemote) return null;
|
|
7805
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
7806
|
-
canPromote && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7807
|
-
"button",
|
|
7808
|
-
{
|
|
7809
|
-
type: "button",
|
|
7810
|
-
className: "gantt-tl-name-action-btn gantt-tl-action-hierarchy",
|
|
7811
|
-
onClick: (e) => {
|
|
7812
|
-
e.stopPropagation();
|
|
7813
|
-
onPromote(e);
|
|
7814
|
-
},
|
|
7815
|
-
title: "\u041F\u043E\u0432\u044B\u0441\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
7816
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, {})
|
|
7817
|
-
}
|
|
7818
|
-
),
|
|
7819
|
-
showDemote && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7820
|
-
"button",
|
|
7821
|
-
{
|
|
7822
|
-
type: "button",
|
|
7823
|
-
className: "gantt-tl-name-action-btn gantt-tl-action-hierarchy",
|
|
7824
|
-
onClick: (e) => {
|
|
7825
|
-
e.stopPropagation();
|
|
7826
|
-
onDemote(e);
|
|
7827
|
-
},
|
|
7828
|
-
title: "\u041F\u043E\u043D\u0438\u0437\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
7829
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowRight, {})
|
|
7830
|
-
}
|
|
7831
|
-
)
|
|
7832
|
-
] });
|
|
7833
|
-
};
|
|
7834
7664
|
var DepChip = ({
|
|
7835
7665
|
lag,
|
|
7836
7666
|
dep,
|
|
@@ -8167,7 +7997,7 @@ var areTaskListRowPropsEqual = (prevProps, nextProps) => {
|
|
|
8167
7997
|
const nextPickingTask = nextProps.selectingPredecessorFor === nextTask.id;
|
|
8168
7998
|
const prevAnyPicking = prevProps.selectingPredecessorFor != null;
|
|
8169
7999
|
const nextAnyPicking = nextProps.selectingPredecessorFor != null;
|
|
8170
|
-
return prevTaskUnchanged && prevProps.rowIndex === nextProps.rowIndex && prevProps.taskNumber === nextProps.taskNumber && prevProps.taskNumberMap === nextProps.taskNumberMap && prevProps.rowHeight === nextProps.rowHeight && prevIsSelected === nextIsSelected && prevProps.disableTaskNameEditing === nextProps.disableTaskNameEditing && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.allTasks === nextProps.allTasks && prevProps.activeLinkType === nextProps.activeLinkType && prevProps.dependencyPickMode === nextProps.dependencyPickMode && prevPickingTask === nextPickingTask && prevAnyPicking === nextAnyPicking && resolveSelectedChipRole(prevProps) === resolveSelectedChipRole(nextProps) && prevIsEditingTask === nextIsEditingTask && prevProps.isDragging === nextProps.isDragging && prevProps.isDragOver === nextProps.isDragOver && prevProps.dragOverPlacement === nextProps.dragOverPlacement && prevProps.isNestedDropTarget === nextProps.isNestedDropTarget && prevProps.isDirectChildDropTarget === nextProps.isDirectChildDropTarget && prevCollapsed === nextCollapsed && prevProps.canDemoteTask === nextProps.canDemoteTask && prevProps.isLastChild === nextProps.isLastChild && prevProps.nestingDepth === nextProps.nestingDepth && prevProps.hasVisibleChildren === nextProps.hasVisibleChildren && prevProps.ancestorLineModes === nextProps.ancestorLineModes && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.fillParentRow === nextProps.fillParentRow && prevProps.businessDays === nextProps.businessDays && prevProps.defaultTaskDurationDays === nextProps.defaultTaskDurationDays && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.isFilterHideMode === nextProps.isFilterHideMode && prevProps.resolvedColumns === nextProps.resolvedColumns && prevProps.isTaskSelected === nextProps.isTaskSelected && resolveActiveCustomCellForRow(prevProps) === resolveActiveCustomCellForRow(nextProps) && prevProps.taskListMenuCommands === nextProps.taskListMenuCommands && prevProps.hideTaskListRowActions === nextProps.hideTaskListRowActions && prevProps.rowClassName === nextProps.rowClassName && prevProps.getTaskListNamePrefixIcon === nextProps.getTaskListNamePrefixIcon && prevProps.taskDateChangeMode === nextProps.taskDateChangeMode && prevProps.printDependencyLabels === nextProps.printDependencyLabels;
|
|
8000
|
+
return prevTaskUnchanged && prevProps.rowIndex === nextProps.rowIndex && prevProps.taskNumber === nextProps.taskNumber && prevProps.taskNumberMap === nextProps.taskNumberMap && prevProps.rowHeight === nextProps.rowHeight && prevIsSelected === nextIsSelected && prevProps.disableTaskNameEditing === nextProps.disableTaskNameEditing && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.allTasks === nextProps.allTasks && prevProps.activeLinkType === nextProps.activeLinkType && prevProps.dependencyPickMode === nextProps.dependencyPickMode && prevPickingTask === nextPickingTask && prevAnyPicking === nextAnyPicking && resolveSelectedChipRole(prevProps) === resolveSelectedChipRole(nextProps) && prevIsEditingTask === nextIsEditingTask && prevProps.isDragging === nextProps.isDragging && prevProps.isDragOver === nextProps.isDragOver && prevProps.dragOverPlacement === nextProps.dragOverPlacement && prevProps.isNestedDropTarget === nextProps.isNestedDropTarget && prevProps.isDirectChildDropTarget === nextProps.isDirectChildDropTarget && prevCollapsed === nextCollapsed && prevProps.canDemoteTask === nextProps.canDemoteTask && prevProps.isLastChild === nextProps.isLastChild && prevProps.nestingDepth === nextProps.nestingDepth && prevProps.hasVisibleChildren === nextProps.hasVisibleChildren && prevProps.ancestorLineModes === nextProps.ancestorLineModes && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.fillParentRow === nextProps.fillParentRow && prevProps.businessDays === nextProps.businessDays && prevProps.defaultTaskDurationDays === nextProps.defaultTaskDurationDays && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.isFilterHideMode === nextProps.isFilterHideMode && prevProps.resolvedColumns === nextProps.resolvedColumns && prevProps.isTaskSelected === nextProps.isTaskSelected && resolveActiveCustomCellForRow(prevProps) === resolveActiveCustomCellForRow(nextProps) && prevProps.taskListMenuCommands === nextProps.taskListMenuCommands && prevProps.onInsertAfter === nextProps.onInsertAfter && prevProps.onPromoteTask === nextProps.onPromoteTask && prevProps.onDemoteTask === nextProps.onDemoteTask && prevProps.onDuplicateTask === nextProps.onDuplicateTask && prevProps.onDelete === nextProps.onDelete && prevProps.onUngroupTask === nextProps.onUngroupTask && prevProps.renderTaskListActions === nextProps.renderTaskListActions && prevProps.renderTaskListMenu === nextProps.renderTaskListMenu && prevProps.hideTaskListRowActions === nextProps.hideTaskListRowActions && prevProps.rowClassName === nextProps.rowClassName && prevProps.getTaskListNamePrefixIcon === nextProps.getTaskListNamePrefixIcon && prevProps.taskDateChangeMode === nextProps.taskDateChangeMode && prevProps.printDependencyLabels === nextProps.printDependencyLabels;
|
|
8171
8001
|
};
|
|
8172
8002
|
var TaskListRow = import_react12.default.memo(
|
|
8173
8003
|
({
|
|
@@ -8231,6 +8061,8 @@ var TaskListRow = import_react12.default.memo(
|
|
|
8231
8061
|
activeCustomCell,
|
|
8232
8062
|
onActiveCustomCellChange,
|
|
8233
8063
|
taskListMenuCommands = [],
|
|
8064
|
+
renderTaskListActions,
|
|
8065
|
+
renderTaskListMenu,
|
|
8234
8066
|
hideTaskListRowActions = false,
|
|
8235
8067
|
rowClassName,
|
|
8236
8068
|
compositeParentColor,
|
|
@@ -8283,7 +8115,6 @@ var TaskListRow = import_react12.default.memo(
|
|
|
8283
8115
|
const progressInputRef = (0, import_react12.useRef)(null);
|
|
8284
8116
|
const [overflowOpen, setOverflowOpen] = (0, import_react12.useState)(false);
|
|
8285
8117
|
const [contextMenuOpen, setContextMenuOpen] = (0, import_react12.useState)(false);
|
|
8286
|
-
const [colorMenuOpen, setColorMenuOpen] = (0, import_react12.useState)(false);
|
|
8287
8118
|
const nameConfirmedRef = (0, import_react12.useRef)(false);
|
|
8288
8119
|
const durationConfirmedRef = (0, import_react12.useRef)(false);
|
|
8289
8120
|
const progressConfirmedRef = (0, import_react12.useRef)(false);
|
|
@@ -8800,47 +8631,6 @@ var TaskListRow = import_react12.default.memo(
|
|
|
8800
8631
|
},
|
|
8801
8632
|
[task.id, onToggleCollapse]
|
|
8802
8633
|
);
|
|
8803
|
-
const handlePromote = (0, import_react12.useCallback)(
|
|
8804
|
-
(e) => {
|
|
8805
|
-
e.stopPropagation();
|
|
8806
|
-
onPromoteTask?.(task.id);
|
|
8807
|
-
},
|
|
8808
|
-
[task.id, onPromoteTask]
|
|
8809
|
-
);
|
|
8810
|
-
const handleDemote = (0, import_react12.useCallback)(
|
|
8811
|
-
(e) => {
|
|
8812
|
-
e.stopPropagation();
|
|
8813
|
-
onDemoteTask?.(task.id, "");
|
|
8814
|
-
},
|
|
8815
|
-
[task.id, onDemoteTask]
|
|
8816
|
-
);
|
|
8817
|
-
const closeColorMenu = (0, import_react12.useCallback)(() => {
|
|
8818
|
-
setColorMenuOpen(false);
|
|
8819
|
-
}, []);
|
|
8820
|
-
const handleApplyColor = (0, import_react12.useCallback)(
|
|
8821
|
-
(color) => {
|
|
8822
|
-
if (!onTasksChange) return;
|
|
8823
|
-
const descendantIds = new Set(
|
|
8824
|
-
isParent ? getAllDescendants(task.id, allTasks).map((descendant) => descendant.id) : []
|
|
8825
|
-
);
|
|
8826
|
-
const updatedTasks = [
|
|
8827
|
-
{ ...task, color },
|
|
8828
|
-
...allTasks.filter((candidate) => descendantIds.has(candidate.id)).map((candidate) => ({ ...candidate, color }))
|
|
8829
|
-
];
|
|
8830
|
-
onTasksChange(updatedTasks);
|
|
8831
|
-
closeColorMenu();
|
|
8832
|
-
setContextMenuOpen(false);
|
|
8833
|
-
},
|
|
8834
|
-
[allTasks, closeColorMenu, isParent, onTasksChange, task]
|
|
8835
|
-
);
|
|
8836
|
-
const handleUngroup = (0, import_react12.useCallback)(
|
|
8837
|
-
(e) => {
|
|
8838
|
-
e.stopPropagation();
|
|
8839
|
-
setContextMenuOpen(false);
|
|
8840
|
-
onUngroupTask?.(task.id);
|
|
8841
|
-
},
|
|
8842
|
-
[onUngroupTask, task.id]
|
|
8843
|
-
);
|
|
8844
8634
|
const visibleCustomMenuCommands = (0, import_react12.useMemo)(
|
|
8845
8635
|
() => taskListMenuCommands.filter(
|
|
8846
8636
|
(command) => {
|
|
@@ -8853,18 +8643,50 @@ var TaskListRow = import_react12.default.memo(
|
|
|
8853
8643
|
),
|
|
8854
8644
|
[taskListMenuCommands, task, isParent, isMilestoneRow]
|
|
8855
8645
|
);
|
|
8856
|
-
const
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8646
|
+
const actionContext = {
|
|
8647
|
+
task,
|
|
8648
|
+
isParent,
|
|
8649
|
+
canPromote: isChild && !!onPromoteTask,
|
|
8650
|
+
canDemote: canDemoteTask && !!onDemoteTask,
|
|
8651
|
+
insertAfter: onInsertAfter ? () => {
|
|
8652
|
+
const range = buildDefaultTaskDateRange(getTodayISODate(), {
|
|
8653
|
+
businessDays,
|
|
8654
|
+
defaultTaskDurationDays,
|
|
8655
|
+
weekendPredicate
|
|
8656
|
+
});
|
|
8657
|
+
onInsertAfter(task.id, { id: crypto.randomUUID(), name: "\u041D\u043E\u0432\u0430\u044F \u0440\u0430\u0431\u043E\u0442\u0430", ...range, parentId: task.parentId });
|
|
8658
|
+
} : void 0,
|
|
8659
|
+
promote: isChild && onPromoteTask ? () => onPromoteTask(task.id) : void 0,
|
|
8660
|
+
demote: canDemoteTask && onDemoteTask ? () => onDemoteTask(task.id, "") : void 0,
|
|
8661
|
+
duplicate: onDuplicateTask ? () => onDuplicateTask(task.id) : void 0,
|
|
8662
|
+
delete: onDelete ? () => onDelete(task.id) : void 0,
|
|
8663
|
+
ungroup: isParent && onUngroupTask ? () => onUngroupTask(task.id) : void 0,
|
|
8664
|
+
closeMenu: () => setContextMenuOpen(false)
|
|
8665
|
+
};
|
|
8666
|
+
const commandContent = visibleCustomMenuCommands.length ? visibleCustomMenuCommands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react12.default.Fragment, { children: [
|
|
8667
|
+
command.divider === "top" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { className: "gantt-tl-context-menu-divider" }),
|
|
8668
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
8669
|
+
"button",
|
|
8670
|
+
{
|
|
8671
|
+
type: "button",
|
|
8672
|
+
className: `gantt-tl-context-menu-item${command.danger ? " gantt-tl-context-menu-item-danger" : ""}`,
|
|
8673
|
+
disabled: command.isDisabled?.(task) ?? false,
|
|
8674
|
+
onClick: (event) => {
|
|
8675
|
+
event.stopPropagation();
|
|
8676
|
+
if (command.closeOnSelect !== false) actionContext.closeMenu();
|
|
8677
|
+
command.onSelect(task);
|
|
8678
|
+
},
|
|
8679
|
+
children: [
|
|
8680
|
+
command.icon,
|
|
8681
|
+
command.label
|
|
8682
|
+
]
|
|
8863
8683
|
}
|
|
8864
|
-
|
|
8865
|
-
}
|
|
8866
|
-
|
|
8867
|
-
);
|
|
8684
|
+
),
|
|
8685
|
+
command.divider === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { className: "gantt-tl-context-menu-divider" })
|
|
8686
|
+
] }, command.id)) : null;
|
|
8687
|
+
const menuContent = hideTaskListRowActions ? null : renderTaskListMenu ? renderTaskListMenu(actionContext, commandContent) : commandContent;
|
|
8688
|
+
const actionContent = hideTaskListRowActions ? null : renderTaskListActions?.(actionContext);
|
|
8689
|
+
const hasContextMenu = menuContent !== null && menuContent !== void 0 && menuContent !== false;
|
|
8868
8690
|
const handleAddClick = (0, import_react12.useCallback)(
|
|
8869
8691
|
(e) => {
|
|
8870
8692
|
e.stopPropagation();
|
|
@@ -9339,197 +9161,25 @@ var TaskListRow = import_react12.default.memo(
|
|
|
9339
9161
|
"aria-hidden": "true"
|
|
9340
9162
|
}
|
|
9341
9163
|
),
|
|
9342
|
-
!editingName && !hideTaskListRowActions && (
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
{
|
|
9346
|
-
type: "button",
|
|
9347
|
-
className: "gantt-tl-name-action-btn gantt-tl-action-insert",
|
|
9348
|
-
onClick: (e) => {
|
|
9349
|
-
e.stopPropagation();
|
|
9350
|
-
const range = buildDefaultTaskDateRange(getTodayISODate(), {
|
|
9351
|
-
businessDays,
|
|
9352
|
-
defaultTaskDurationDays,
|
|
9353
|
-
weekendPredicate
|
|
9354
|
-
});
|
|
9355
|
-
const newTask = {
|
|
9356
|
-
id: crypto.randomUUID(),
|
|
9357
|
-
name: "\u041D\u043E\u0432\u0430\u044F \u0440\u0430\u0431\u043E\u0442\u0430",
|
|
9358
|
-
startDate: range.startDate,
|
|
9359
|
-
endDate: range.endDate,
|
|
9360
|
-
parentId: task.parentId
|
|
9361
|
-
};
|
|
9362
|
-
onInsertAfter(task.id, newTask);
|
|
9363
|
-
},
|
|
9364
|
-
"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",
|
|
9365
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PlusIcon, {})
|
|
9366
|
-
}
|
|
9367
|
-
),
|
|
9368
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9369
|
-
HierarchyButton,
|
|
9370
|
-
{
|
|
9371
|
-
isChild,
|
|
9372
|
-
rowIndex,
|
|
9373
|
-
canDemote: canDemoteTask,
|
|
9374
|
-
onPromote: onPromoteTask ? handlePromote : void 0,
|
|
9375
|
-
onDemote: onDemoteTask ? handleDemote : void 0
|
|
9376
|
-
}
|
|
9377
|
-
),
|
|
9378
|
-
hasContextMenu && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Popover, { open: contextMenuOpen, onOpenChange: (open) => {
|
|
9379
|
-
setContextMenuOpen(open);
|
|
9380
|
-
if (!open) closeColorMenu();
|
|
9381
|
-
}, children: [
|
|
9164
|
+
!editingName && !hideTaskListRowActions && (actionContent || hasContextMenu) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `gantt-tl-name-actions${contextMenuOpen ? " gantt-tl-name-actions-open" : ""}`, onClick: (event) => event.stopPropagation(), children: [
|
|
9165
|
+
actionContent,
|
|
9166
|
+
hasContextMenu ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Popover, { open: contextMenuOpen, onOpenChange: setContextMenuOpen, children: [
|
|
9382
9167
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9383
9168
|
"button",
|
|
9384
9169
|
{
|
|
9385
9170
|
type: "button",
|
|
9386
9171
|
className: "gantt-tl-name-action-btn gantt-tl-action-context",
|
|
9387
|
-
onClick: (
|
|
9388
|
-
|
|
9389
|
-
setContextMenuOpen((
|
|
9172
|
+
onClick: (event) => {
|
|
9173
|
+
event.stopPropagation();
|
|
9174
|
+
setContextMenuOpen((value) => !value);
|
|
9390
9175
|
},
|
|
9391
9176
|
"aria-label": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
9392
9177
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VerticalDotsIcon, {})
|
|
9393
9178
|
}
|
|
9394
9179
|
) }),
|
|
9395
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
{
|
|
9399
|
-
className: "gantt-tl-context-menu-section gantt-tl-context-submenu-wrap",
|
|
9400
|
-
onMouseLeave: (e) => {
|
|
9401
|
-
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
9402
|
-
closeColorMenu();
|
|
9403
|
-
}
|
|
9404
|
-
},
|
|
9405
|
-
onBlur: (e) => {
|
|
9406
|
-
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
9407
|
-
closeColorMenu();
|
|
9408
|
-
}
|
|
9409
|
-
},
|
|
9410
|
-
children: [
|
|
9411
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9412
|
-
"button",
|
|
9413
|
-
{
|
|
9414
|
-
type: "button",
|
|
9415
|
-
className: "gantt-tl-context-menu-item gantt-tl-context-menu-item-toggle",
|
|
9416
|
-
onMouseEnter: () => setColorMenuOpen(true),
|
|
9417
|
-
"aria-expanded": colorMenuOpen,
|
|
9418
|
-
"aria-haspopup": "menu",
|
|
9419
|
-
children: [
|
|
9420
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "gantt-tl-context-menu-item-main", children: [
|
|
9421
|
-
task.color && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9422
|
-
"span",
|
|
9423
|
-
{
|
|
9424
|
-
className: "gantt-tl-color-swatch gantt-tl-color-swatch-inline",
|
|
9425
|
-
style: { backgroundColor: task.color },
|
|
9426
|
-
"aria-hidden": "true"
|
|
9427
|
-
}
|
|
9428
|
-
),
|
|
9429
|
-
"\u0426\u0432\u0435\u0442"
|
|
9430
|
-
] }),
|
|
9431
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, {})
|
|
9432
|
-
]
|
|
9433
|
-
}
|
|
9434
|
-
),
|
|
9435
|
-
colorMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime15.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_runtime15.jsxs)("div", { className: "gantt-tl-color-grid", children: [
|
|
9436
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9437
|
-
"button",
|
|
9438
|
-
{
|
|
9439
|
-
type: "button",
|
|
9440
|
-
className: `gantt-tl-color-swatch gantt-tl-color-swatch-clear${!task.color ? " is-selected" : ""}`,
|
|
9441
|
-
onClick: (e) => {
|
|
9442
|
-
e.stopPropagation();
|
|
9443
|
-
handleApplyColor(void 0);
|
|
9444
|
-
},
|
|
9445
|
-
"aria-label": "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
9446
|
-
title: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
9447
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "gantt-tl-color-swatch-clear-line" })
|
|
9448
|
-
}
|
|
9449
|
-
),
|
|
9450
|
-
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9451
|
-
"button",
|
|
9452
|
-
{
|
|
9453
|
-
type: "button",
|
|
9454
|
-
className: `gantt-tl-color-swatch${task.color === paletteColor.value ? " is-selected" : ""}`,
|
|
9455
|
-
style: { backgroundColor: paletteColor.value },
|
|
9456
|
-
onClick: (e) => {
|
|
9457
|
-
e.stopPropagation();
|
|
9458
|
-
handleApplyColor(paletteColor.value);
|
|
9459
|
-
},
|
|
9460
|
-
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0446\u0432\u0435\u0442 ${paletteColor.label}`,
|
|
9461
|
-
title: paletteColor.label
|
|
9462
|
-
},
|
|
9463
|
-
paletteColor.value
|
|
9464
|
-
))
|
|
9465
|
-
] }) })
|
|
9466
|
-
]
|
|
9467
|
-
}
|
|
9468
|
-
),
|
|
9469
|
-
onDuplicateTask && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9470
|
-
"button",
|
|
9471
|
-
{
|
|
9472
|
-
type: "button",
|
|
9473
|
-
className: "gantt-tl-context-menu-item",
|
|
9474
|
-
onClick: (e) => {
|
|
9475
|
-
e.stopPropagation();
|
|
9476
|
-
setContextMenuOpen(false);
|
|
9477
|
-
onDuplicateTask(task.id);
|
|
9478
|
-
},
|
|
9479
|
-
children: [
|
|
9480
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CopyIcon, {}),
|
|
9481
|
-
"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
9482
|
-
]
|
|
9483
|
-
}
|
|
9484
|
-
),
|
|
9485
|
-
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react12.default.Fragment, { children: [
|
|
9486
|
-
command.divider === "top" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { className: "gantt-tl-context-menu-divider" }),
|
|
9487
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9488
|
-
"button",
|
|
9489
|
-
{
|
|
9490
|
-
type: "button",
|
|
9491
|
-
className: `gantt-tl-context-menu-item${command.danger ? " gantt-tl-context-menu-item-danger" : ""}`,
|
|
9492
|
-
onClick: handleCustomMenuCommandClick(command),
|
|
9493
|
-
disabled: command.isDisabled?.(task) ?? false,
|
|
9494
|
-
children: [
|
|
9495
|
-
command.icon,
|
|
9496
|
-
command.label
|
|
9497
|
-
]
|
|
9498
|
-
}
|
|
9499
|
-
),
|
|
9500
|
-
command.divider === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { className: "gantt-tl-context-menu-divider" })
|
|
9501
|
-
] }, command.id)),
|
|
9502
|
-
isParent && onUngroupTask && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9503
|
-
"button",
|
|
9504
|
-
{
|
|
9505
|
-
type: "button",
|
|
9506
|
-
className: "gantt-tl-context-menu-item",
|
|
9507
|
-
onClick: handleUngroup,
|
|
9508
|
-
children: [
|
|
9509
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UngroupIcon, {}),
|
|
9510
|
-
"\u0420\u0430\u0437\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
9511
|
-
]
|
|
9512
|
-
}
|
|
9513
|
-
),
|
|
9514
|
-
onDelete && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9515
|
-
"button",
|
|
9516
|
-
{
|
|
9517
|
-
type: "button",
|
|
9518
|
-
className: "gantt-tl-context-menu-item gantt-tl-context-menu-item-danger",
|
|
9519
|
-
onClick: (e) => {
|
|
9520
|
-
e.stopPropagation();
|
|
9521
|
-
setContextMenuOpen(false);
|
|
9522
|
-
onDelete(task.id);
|
|
9523
|
-
},
|
|
9524
|
-
children: [
|
|
9525
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TrashIcon, {}),
|
|
9526
|
-
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
9527
|
-
]
|
|
9528
|
-
}
|
|
9529
|
-
)
|
|
9530
|
-
] })
|
|
9531
|
-
] })
|
|
9532
|
-
] })
|
|
9180
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverContent, { className: "gantt-tl-context-menu", portal: true, align: "end", children: menuContent })
|
|
9181
|
+
] }) : null
|
|
9182
|
+
] }) : null
|
|
9533
9183
|
] });
|
|
9534
9184
|
const startDateCell = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9535
9185
|
"div",
|
|
@@ -10379,7 +10029,7 @@ var BUILT_IN_CSS_CLASSES = {
|
|
|
10379
10029
|
duration: "gantt-tl-cell-duration",
|
|
10380
10030
|
progress: "gantt-tl-cell-progress"
|
|
10381
10031
|
};
|
|
10382
|
-
function
|
|
10032
|
+
function getAllDescendants3(parentId, tasks) {
|
|
10383
10033
|
const descendants = [];
|
|
10384
10034
|
const visited = /* @__PURE__ */ new Set();
|
|
10385
10035
|
function collectChildren(taskId) {
|
|
@@ -10397,7 +10047,7 @@ function getAllDescendants2(parentId, tasks) {
|
|
|
10397
10047
|
function duplicateTaskSubtree(anchorTaskId, orderedTasks) {
|
|
10398
10048
|
const anchorTask = orderedTasks.find((task) => task.id === anchorTaskId);
|
|
10399
10049
|
if (!anchorTask) return orderedTasks;
|
|
10400
|
-
const descendants =
|
|
10050
|
+
const descendants = getAllDescendants3(anchorTaskId, orderedTasks);
|
|
10401
10051
|
const sourceIds = /* @__PURE__ */ new Set([anchorTaskId, ...descendants.map((task) => task.id)]);
|
|
10402
10052
|
const sourceSubtree = orderedTasks.filter((task) => sourceIds.has(task.id));
|
|
10403
10053
|
const cloneIdMap = new Map(sourceSubtree.map((task) => [task.id, crypto.randomUUID()]));
|
|
@@ -10506,7 +10156,7 @@ var TaskList = ({
|
|
|
10506
10156
|
disableTaskDrag = false,
|
|
10507
10157
|
disableTaskListReorder = false,
|
|
10508
10158
|
editingTaskId: propEditingTaskId,
|
|
10509
|
-
enableAddTask =
|
|
10159
|
+
enableAddTask = false,
|
|
10510
10160
|
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
10511
10161
|
defaultTaskDurationDays = DEFAULT_TASK_DURATION_DAYS,
|
|
10512
10162
|
collapsedParentIds: externalCollapsedParentIds,
|
|
@@ -10532,6 +10182,8 @@ var TaskList = ({
|
|
|
10532
10182
|
taskListColumnWidths,
|
|
10533
10183
|
onTaskListColumnWidthsChange,
|
|
10534
10184
|
taskListMenuCommands,
|
|
10185
|
+
renderTaskListActions,
|
|
10186
|
+
renderTaskListMenu,
|
|
10535
10187
|
hideTaskListRowActions = false,
|
|
10536
10188
|
getTaskListRowClassName,
|
|
10537
10189
|
getTaskListNamePrefixIcon,
|
|
@@ -10962,7 +10614,7 @@ var TaskList = ({
|
|
|
10962
10614
|
}
|
|
10963
10615
|
const draggedTask = orderedTasks.find((t) => t.id === draggedTaskId);
|
|
10964
10616
|
if (!draggedTask) return true;
|
|
10965
|
-
const descendants =
|
|
10617
|
+
const descendants = getAllDescendants3(draggedTaskId, orderedTasks);
|
|
10966
10618
|
const descendantIds = new Set(descendants.map((d) => d.id));
|
|
10967
10619
|
if (descendantIds.has(dropTarget.id)) {
|
|
10968
10620
|
return false;
|
|
@@ -10979,7 +10631,7 @@ var TaskList = ({
|
|
|
10979
10631
|
if (target.placement !== "before" || target.index <= 0 || target.index >= visibleTasks.length) {
|
|
10980
10632
|
return target;
|
|
10981
10633
|
}
|
|
10982
|
-
const descendantIds = new Set(
|
|
10634
|
+
const descendantIds = new Set(getAllDescendants3(movedTaskId, orderedTasks).map((task) => task.id));
|
|
10983
10635
|
const movedIds = /* @__PURE__ */ new Set([movedTaskId, ...descendantIds]);
|
|
10984
10636
|
const targetTask = visibleTasks[target.index];
|
|
10985
10637
|
if (targetTask?.id === movedTaskId) {
|
|
@@ -11102,7 +10754,7 @@ var TaskList = ({
|
|
|
11102
10754
|
let subtree;
|
|
11103
10755
|
let subtreeCount;
|
|
11104
10756
|
if (hasChildren) {
|
|
11105
|
-
const descendants =
|
|
10757
|
+
const descendants = getAllDescendants3(moved.id, orderedTasks);
|
|
11106
10758
|
subtree = [moved, ...descendants];
|
|
11107
10759
|
subtreeCount = subtree.length;
|
|
11108
10760
|
} else {
|
|
@@ -11120,7 +10772,7 @@ var TaskList = ({
|
|
|
11120
10772
|
const handleBeforeFirstDragOver = (0, import_react15.useCallback)((e) => {
|
|
11121
10773
|
const draggedTaskId = dragTaskIdRef.current;
|
|
11122
10774
|
const firstTask = visibleTasks[0];
|
|
11123
|
-
const descendantIds = draggedTaskId ? new Set(
|
|
10775
|
+
const descendantIds = draggedTaskId ? new Set(getAllDescendants3(draggedTaskId, orderedTasks).map((task) => task.id)) : /* @__PURE__ */ new Set();
|
|
11124
10776
|
const isValidBeforeFirstDrop = !!draggedTaskId && !!firstTask && firstTask.id !== draggedTaskId && !descendantIds.has(firstTask.id) && isValidParentDrop(draggedTaskId, 0);
|
|
11125
10777
|
setIsBeforeFirstDropZoneActive(isValidBeforeFirstDrop);
|
|
11126
10778
|
handleDragOver(0, e, "before");
|
|
@@ -11658,7 +11310,7 @@ var TaskList = ({
|
|
|
11658
11310
|
onScrollToTask,
|
|
11659
11311
|
onDelete,
|
|
11660
11312
|
onAdd,
|
|
11661
|
-
onInsertAfter: handleStartInsertAfter,
|
|
11313
|
+
onInsertAfter: onInsertAfter ? handleStartInsertAfter : void 0,
|
|
11662
11314
|
editingTaskId: propEditingTaskId,
|
|
11663
11315
|
isDragging: !reorderDisabled && draggingIndex === index,
|
|
11664
11316
|
isDragOver: !reorderDisabled && dragOverTarget?.index === index,
|
|
@@ -11693,6 +11345,8 @@ var TaskList = ({
|
|
|
11693
11345
|
activeCustomCell,
|
|
11694
11346
|
onActiveCustomCellChange: setActiveCustomCell,
|
|
11695
11347
|
taskListMenuCommands,
|
|
11348
|
+
renderTaskListActions,
|
|
11349
|
+
renderTaskListMenu,
|
|
11696
11350
|
hideTaskListRowActions,
|
|
11697
11351
|
rowClassName: [
|
|
11698
11352
|
task.parentId && compositeParentIds.has(task.parentId) ? "gantt-tl-row-composite-detail" : "",
|
|
@@ -15622,7 +15276,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15622
15276
|
onPromoteTask,
|
|
15623
15277
|
onDemoteTask,
|
|
15624
15278
|
onUngroupTask,
|
|
15625
|
-
enableAddTask =
|
|
15279
|
+
enableAddTask = false,
|
|
15626
15280
|
addTaskLabel = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443",
|
|
15627
15281
|
defaultTaskDurationDays,
|
|
15628
15282
|
taskFilter,
|
|
@@ -15655,6 +15309,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15655
15309
|
taskListColumnWidths,
|
|
15656
15310
|
onTaskListColumnWidthsChange,
|
|
15657
15311
|
taskListMenuCommands,
|
|
15312
|
+
renderTaskListActions,
|
|
15313
|
+
renderTaskListMenu,
|
|
15658
15314
|
hideTaskListRowActions = false,
|
|
15659
15315
|
getTaskListRowClassName,
|
|
15660
15316
|
getTaskListNamePrefixIcon,
|
|
@@ -16981,9 +16637,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16981
16637
|
),
|
|
16982
16638
|
selectedChip,
|
|
16983
16639
|
onAdd,
|
|
16984
|
-
onDelete: handleDelete,
|
|
16985
|
-
onInsertAfter: handleInsertAfter,
|
|
16986
|
-
onReorder: handleReorder,
|
|
16640
|
+
onDelete: onDelete ? handleDelete : void 0,
|
|
16641
|
+
onInsertAfter: onInsertAfter ? handleInsertAfter : void 0,
|
|
16642
|
+
onReorder: onReorder || onTasksChange ? handleReorder : void 0,
|
|
16987
16643
|
disableTaskDrag: disableTaskDrag || disableTaskListReorder,
|
|
16988
16644
|
editingTaskId,
|
|
16989
16645
|
enableAddTask,
|
|
@@ -16991,9 +16647,9 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16991
16647
|
defaultTaskDurationDays,
|
|
16992
16648
|
collapsedParentIds,
|
|
16993
16649
|
onToggleCollapse: handleToggleCollapse,
|
|
16994
|
-
onPromoteTask: onPromoteTask ?? handlePromoteTask,
|
|
16995
|
-
onDemoteTask: onDemoteTask ?? handleDemoteTask,
|
|
16996
|
-
onUngroupTask: onUngroupTask ?? handleUngroupTask,
|
|
16650
|
+
onPromoteTask: onPromoteTask ?? (onTasksChange ? handlePromoteTask : void 0),
|
|
16651
|
+
onDemoteTask: onDemoteTask ?? (onTasksChange ? handleDemoteTask : void 0),
|
|
16652
|
+
onUngroupTask: onUngroupTask ?? (onTasksChange ? handleUngroupTask : void 0),
|
|
16997
16653
|
highlightedTaskIds: taskListHighlightedTaskIds,
|
|
16998
16654
|
fillParentRows: shouldFillParentRowsInTaskList,
|
|
16999
16655
|
enableTaskMultiSelect,
|
|
@@ -17012,6 +16668,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
17012
16668
|
taskListColumnWidths,
|
|
17013
16669
|
onTaskListColumnWidthsChange,
|
|
17014
16670
|
taskListMenuCommands,
|
|
16671
|
+
renderTaskListActions,
|
|
16672
|
+
renderTaskListMenu,
|
|
17015
16673
|
hideTaskListRowActions,
|
|
17016
16674
|
getTaskListRowClassName,
|
|
17017
16675
|
getTaskListNamePrefixIcon,
|