gantt-task-react-v 1.1.19 → 1.2.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.
|
@@ -30,10 +30,6 @@ export interface TaskGanttContentProps extends GanttTaskBarActions {
|
|
|
30
30
|
selectTaskOnMouseDown: (taskId: string, event: MouseEvent) => void;
|
|
31
31
|
selectedIdsMirror: Readonly<Record<string, true>>;
|
|
32
32
|
onTooltipTask: (task: Task | null, element: Element | null) => void;
|
|
33
|
-
/**
|
|
34
|
-
* When true, disable interactive behaviors for task bars (drag, click, relations)
|
|
35
|
-
*/
|
|
36
|
-
isLoading?: boolean;
|
|
37
33
|
startColumnIndex: number;
|
|
38
34
|
taskYOffset: number;
|
|
39
35
|
visibleTasksMirror: Readonly<Record<string, true>>;
|
|
@@ -38,10 +38,6 @@ export type TaskListProps = {
|
|
|
38
38
|
taskListContainerRef: RefObject<HTMLDivElement>;
|
|
39
39
|
taskListRef: RefObject<HTMLDivElement>;
|
|
40
40
|
tasks: readonly RenderTask[];
|
|
41
|
-
/**
|
|
42
|
-
* When true, disable user interactions on the task list (clicks, context menu)
|
|
43
|
-
*/
|
|
44
|
-
isLoading?: boolean;
|
|
45
41
|
onResizeColumn?: OnResizeColumn;
|
|
46
42
|
tableBottom?: TableRenderBottomProps;
|
|
47
43
|
};
|
|
@@ -10700,7 +10700,6 @@ const TaskListInner = ({
|
|
|
10700
10700
|
taskListHorizontalScrollRef,
|
|
10701
10701
|
taskListRef,
|
|
10702
10702
|
tasks,
|
|
10703
|
-
isLoading = false,
|
|
10704
10703
|
onResizeColumn,
|
|
10705
10704
|
canReorderTasks,
|
|
10706
10705
|
tableBottom
|
|
@@ -10756,8 +10755,7 @@ const TaskListInner = ({
|
|
|
10756
10755
|
onClick,
|
|
10757
10756
|
onExpanderClick,
|
|
10758
10757
|
scrollToTask,
|
|
10759
|
-
selectTaskOnMouseDown
|
|
10760
|
-
} : selectTaskOnMouseDown,
|
|
10758
|
+
selectTaskOnMouseDown,
|
|
10761
10759
|
task,
|
|
10762
10760
|
depth
|
|
10763
10761
|
};
|
|
@@ -10782,7 +10780,6 @@ const TaskListInner = ({
|
|
|
10782
10780
|
onExpanderClick,
|
|
10783
10781
|
scrollToTask,
|
|
10784
10782
|
selectTaskOnMouseDown,
|
|
10785
|
-
isLoading,
|
|
10786
10783
|
selectedIdsMirror
|
|
10787
10784
|
]
|
|
10788
10785
|
);
|
|
@@ -10853,8 +10850,7 @@ const TaskListInner = ({
|
|
|
10853
10850
|
handleMoveTaskBefore,
|
|
10854
10851
|
handleMoveTaskAfter,
|
|
10855
10852
|
handleMoveTasksInside,
|
|
10856
|
-
handleOpenContextMenu
|
|
10857
|
-
} : handleOpenContextMenu,
|
|
10853
|
+
handleOpenContextMenu,
|
|
10858
10854
|
icons,
|
|
10859
10855
|
isShowTaskNumbers,
|
|
10860
10856
|
mapTaskToNestedIndex,
|
|
@@ -12974,7 +12970,6 @@ const TaskGanttContentInner = (props) => {
|
|
|
12974
12970
|
selectTaskOnMouseDown,
|
|
12975
12971
|
selectedIdsMirror,
|
|
12976
12972
|
onTooltipTask,
|
|
12977
|
-
isLoading = false,
|
|
12978
12973
|
startColumnIndex,
|
|
12979
12974
|
taskYOffset,
|
|
12980
12975
|
taskHeight,
|
|
@@ -13103,17 +13098,17 @@ const TaskGanttContentInner = (props) => {
|
|
|
13103
13098
|
distances,
|
|
13104
13099
|
taskHeight,
|
|
13105
13100
|
taskHalfHeight,
|
|
13106
|
-
isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks
|
|
13101
|
+
isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks,
|
|
13107
13102
|
isDateChangeable: (t) => isDateChangeable(t) && !waitCommitTasks,
|
|
13108
|
-
isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks
|
|
13103
|
+
isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks,
|
|
13109
13104
|
authorizedRelations,
|
|
13110
13105
|
ganttRelationEvent,
|
|
13111
|
-
canDelete: !task.isDisabled && !waitCommitTasks
|
|
13112
|
-
onDoubleClick
|
|
13113
|
-
onClick
|
|
13114
|
-
onEventStart:
|
|
13106
|
+
canDelete: !task.isDisabled && !waitCommitTasks,
|
|
13107
|
+
onDoubleClick,
|
|
13108
|
+
onClick,
|
|
13109
|
+
onEventStart: onTaskBarDragStart,
|
|
13115
13110
|
onTooltipTask,
|
|
13116
|
-
onRelationStart:
|
|
13111
|
+
onRelationStart: onTaskBarRelationStart,
|
|
13117
13112
|
isSelected: Boolean(selectedIdsMirror[taskId]),
|
|
13118
13113
|
isCritical,
|
|
13119
13114
|
rtl,
|
|
@@ -13333,8 +13328,7 @@ const TaskGanttContentInner = (props) => {
|
|
|
13333
13328
|
visibleTasksMirror,
|
|
13334
13329
|
onArrowDoubleClick,
|
|
13335
13330
|
showProgress,
|
|
13336
|
-
progressColor
|
|
13337
|
-
isLoading
|
|
13331
|
+
progressColor
|
|
13338
13332
|
]);
|
|
13339
13333
|
return /* @__PURE__ */ jsxs("g", { className: "content", children: [
|
|
13340
13334
|
renderedSelectedTasks,
|
|
@@ -13369,17 +13363,15 @@ const TaskGanttContentInner = (props) => {
|
|
|
13369
13363
|
] });
|
|
13370
13364
|
};
|
|
13371
13365
|
const TaskGanttContent = memo(TaskGanttContentInner);
|
|
13372
|
-
const ganttVerticalContainer = "
|
|
13373
|
-
const horizontalContainer = "
|
|
13374
|
-
const wrapper = "
|
|
13375
|
-
const calendarDragging = "
|
|
13376
|
-
const loadingOverlay = "_loadingOverlay_te0hs_117";
|
|
13366
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_1wr55_1";
|
|
13367
|
+
const horizontalContainer = "_horizontalContainer_1wr55_73";
|
|
13368
|
+
const wrapper = "_wrapper_1wr55_85";
|
|
13369
|
+
const calendarDragging = "_calendarDragging_1wr55_109";
|
|
13377
13370
|
const styles$2 = {
|
|
13378
13371
|
ganttVerticalContainer,
|
|
13379
13372
|
horizontalContainer,
|
|
13380
13373
|
wrapper,
|
|
13381
|
-
calendarDragging
|
|
13382
|
-
loadingOverlay
|
|
13374
|
+
calendarDragging
|
|
13383
13375
|
};
|
|
13384
13376
|
const TaskGanttInner = (props) => {
|
|
13385
13377
|
const {
|
|
@@ -13434,7 +13426,7 @@ const TaskGanttInner = (props) => {
|
|
|
13434
13426
|
]
|
|
13435
13427
|
);
|
|
13436
13428
|
useEffect(() => {
|
|
13437
|
-
if (!contentRef.current
|
|
13429
|
+
if (!contentRef.current) {
|
|
13438
13430
|
return () => {
|
|
13439
13431
|
};
|
|
13440
13432
|
}
|
|
@@ -13504,12 +13496,7 @@ const TaskGanttInner = (props) => {
|
|
|
13504
13496
|
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13505
13497
|
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13506
13498
|
};
|
|
13507
|
-
}, [
|
|
13508
|
-
verticalScrollbarRef,
|
|
13509
|
-
horizontalContainerRef,
|
|
13510
|
-
verticalGanttContainerRef,
|
|
13511
|
-
barProps.isLoading
|
|
13512
|
-
]);
|
|
13499
|
+
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13513
13500
|
return /* @__PURE__ */ jsxs(
|
|
13514
13501
|
"div",
|
|
13515
13502
|
{
|
|
@@ -18999,7 +18986,6 @@ const Gantt = (props) => {
|
|
|
18999
18986
|
showProgress = true,
|
|
19000
18987
|
progressColor
|
|
19001
18988
|
} = props;
|
|
19002
|
-
const { isLoading = false } = props;
|
|
19003
18989
|
const ganttSVGRef = useRef(null);
|
|
19004
18990
|
const wrapperRef = useRef(null);
|
|
19005
18991
|
const taskListRef = useRef(null);
|
|
@@ -19314,9 +19300,6 @@ const Gantt = (props) => {
|
|
|
19314
19300
|
});
|
|
19315
19301
|
const handleOpenGanttContextMenu = useCallback(
|
|
19316
19302
|
(task, clientX, clientY) => {
|
|
19317
|
-
if (isLoading) {
|
|
19318
|
-
return;
|
|
19319
|
-
}
|
|
19320
19303
|
const wrapperNode = wrapperRef.current;
|
|
19321
19304
|
if (!wrapperNode) {
|
|
19322
19305
|
return;
|
|
@@ -19329,7 +19312,7 @@ const Gantt = (props) => {
|
|
|
19329
19312
|
y: clientY - top
|
|
19330
19313
|
});
|
|
19331
19314
|
},
|
|
19332
|
-
[wrapperRef
|
|
19315
|
+
[wrapperRef]
|
|
19333
19316
|
);
|
|
19334
19317
|
const handleCloseGanttContextMenu = useCallback(() => {
|
|
19335
19318
|
setGanttContextMenu({
|
|
@@ -19463,10 +19446,6 @@ const Gantt = (props) => {
|
|
|
19463
19446
|
horizontalContainerRef
|
|
19464
19447
|
]);
|
|
19465
19448
|
const handleKeyDown = (event) => {
|
|
19466
|
-
if (isLoading) {
|
|
19467
|
-
event.preventDefault();
|
|
19468
|
-
return;
|
|
19469
|
-
}
|
|
19470
19449
|
const { columnWidth, rowHeight: rowHeight2 } = distances;
|
|
19471
19450
|
let newScrollY = scrollY;
|
|
19472
19451
|
let newScrollX = scrollX;
|
|
@@ -20132,9 +20111,6 @@ const Gantt = (props) => {
|
|
|
20132
20111
|
}, [taskList.contextMenuOptions, locale]);
|
|
20133
20112
|
const handleOpenContextMenuForRow = useCallback(
|
|
20134
20113
|
(task, clientX, clientY) => {
|
|
20135
|
-
if (isLoading) {
|
|
20136
|
-
return;
|
|
20137
|
-
}
|
|
20138
20114
|
try {
|
|
20139
20115
|
if (onRowContextMenu && task) {
|
|
20140
20116
|
onRowContextMenu(task);
|
|
@@ -20152,8 +20128,7 @@ const Gantt = (props) => {
|
|
|
20152
20128
|
handleOpenContextMenu,
|
|
20153
20129
|
selectTask,
|
|
20154
20130
|
contextMenuOptions,
|
|
20155
|
-
selectedIdsMirror
|
|
20156
|
-
isLoading
|
|
20131
|
+
selectedIdsMirror
|
|
20157
20132
|
]
|
|
20158
20133
|
);
|
|
20159
20134
|
const ganttContextMenuOptions = useMemo(() => {
|
|
@@ -20287,7 +20262,6 @@ const Gantt = (props) => {
|
|
|
20287
20262
|
onDeleteTask: (taskForDelete) => handleDeleteTasks([taskForDelete]),
|
|
20288
20263
|
onTaskBarDragStart: handleTaskDragStart,
|
|
20289
20264
|
onTooltipTask: onChangeTooltipTask,
|
|
20290
|
-
isLoading,
|
|
20291
20265
|
mapGlobalRowIndexToTask,
|
|
20292
20266
|
onArrowDoubleClick,
|
|
20293
20267
|
renderedRowIndexes,
|
|
@@ -20340,8 +20314,7 @@ const Gantt = (props) => {
|
|
|
20340
20314
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
20341
20315
|
handleDeleteTasks,
|
|
20342
20316
|
showProgress,
|
|
20343
|
-
progressColor
|
|
20344
|
-
isLoading
|
|
20317
|
+
progressColor
|
|
20345
20318
|
]
|
|
20346
20319
|
);
|
|
20347
20320
|
const renderTaskListProps = useMemo(
|
|
@@ -20374,8 +20347,7 @@ const Gantt = (props) => {
|
|
|
20374
20347
|
taskListContainerRef,
|
|
20375
20348
|
taskListRef,
|
|
20376
20349
|
tasks: visibleTasks,
|
|
20377
|
-
ganttRef: wrapperRef
|
|
20378
|
-
isLoading
|
|
20350
|
+
ganttRef: wrapperRef
|
|
20379
20351
|
}),
|
|
20380
20352
|
[
|
|
20381
20353
|
childTasksMap,
|
|
@@ -20403,7 +20375,6 @@ const Gantt = (props) => {
|
|
|
20403
20375
|
selectTaskOnMouseDown,
|
|
20404
20376
|
selectedIdsMirror,
|
|
20405
20377
|
taskList,
|
|
20406
|
-
isLoading,
|
|
20407
20378
|
taskListContainerRef,
|
|
20408
20379
|
visibleTasks
|
|
20409
20380
|
]
|
|
@@ -20418,22 +20389,13 @@ const Gantt = (props) => {
|
|
|
20418
20389
|
ref: wrapperRef,
|
|
20419
20390
|
"data-testid": "gantt",
|
|
20420
20391
|
children: [
|
|
20421
|
-
(!columnsProp || columnsProp.length > 0) && /* @__PURE__ */
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
),
|
|
20429
|
-
/* @__PURE__ */ jsx(
|
|
20430
|
-
TaskList,
|
|
20431
|
-
{
|
|
20432
|
-
...renderTaskListProps,
|
|
20433
|
-
taskListHorizontalScrollRef
|
|
20434
|
-
}
|
|
20435
|
-
)
|
|
20436
|
-
] }),
|
|
20392
|
+
(!columnsProp || columnsProp.length > 0) && /* @__PURE__ */ jsx(
|
|
20393
|
+
TaskList,
|
|
20394
|
+
{
|
|
20395
|
+
...renderTaskListProps,
|
|
20396
|
+
taskListHorizontalScrollRef
|
|
20397
|
+
}
|
|
20398
|
+
),
|
|
20437
20399
|
/* @__PURE__ */ jsx(
|
|
20438
20400
|
TaskGantt,
|
|
20439
20401
|
{
|
|
@@ -10717,7 +10717,6 @@
|
|
|
10717
10717
|
taskListHorizontalScrollRef,
|
|
10718
10718
|
taskListRef,
|
|
10719
10719
|
tasks,
|
|
10720
|
-
isLoading = false,
|
|
10721
10720
|
onResizeColumn,
|
|
10722
10721
|
canReorderTasks,
|
|
10723
10722
|
tableBottom
|
|
@@ -10773,8 +10772,7 @@
|
|
|
10773
10772
|
onClick,
|
|
10774
10773
|
onExpanderClick,
|
|
10775
10774
|
scrollToTask,
|
|
10776
|
-
selectTaskOnMouseDown
|
|
10777
|
-
} : selectTaskOnMouseDown,
|
|
10775
|
+
selectTaskOnMouseDown,
|
|
10778
10776
|
task,
|
|
10779
10777
|
depth
|
|
10780
10778
|
};
|
|
@@ -10799,7 +10797,6 @@
|
|
|
10799
10797
|
onExpanderClick,
|
|
10800
10798
|
scrollToTask,
|
|
10801
10799
|
selectTaskOnMouseDown,
|
|
10802
|
-
isLoading,
|
|
10803
10800
|
selectedIdsMirror
|
|
10804
10801
|
]
|
|
10805
10802
|
);
|
|
@@ -10870,8 +10867,7 @@
|
|
|
10870
10867
|
handleMoveTaskBefore,
|
|
10871
10868
|
handleMoveTaskAfter,
|
|
10872
10869
|
handleMoveTasksInside,
|
|
10873
|
-
handleOpenContextMenu
|
|
10874
|
-
} : handleOpenContextMenu,
|
|
10870
|
+
handleOpenContextMenu,
|
|
10875
10871
|
icons,
|
|
10876
10872
|
isShowTaskNumbers,
|
|
10877
10873
|
mapTaskToNestedIndex,
|
|
@@ -12991,7 +12987,6 @@
|
|
|
12991
12987
|
selectTaskOnMouseDown,
|
|
12992
12988
|
selectedIdsMirror,
|
|
12993
12989
|
onTooltipTask,
|
|
12994
|
-
isLoading = false,
|
|
12995
12990
|
startColumnIndex,
|
|
12996
12991
|
taskYOffset,
|
|
12997
12992
|
taskHeight,
|
|
@@ -13120,17 +13115,17 @@
|
|
|
13120
13115
|
distances,
|
|
13121
13116
|
taskHeight,
|
|
13122
13117
|
taskHalfHeight,
|
|
13123
|
-
isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks
|
|
13118
|
+
isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks,
|
|
13124
13119
|
isDateChangeable: (t) => isDateChangeable(t) && !waitCommitTasks,
|
|
13125
|
-
isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks
|
|
13120
|
+
isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks,
|
|
13126
13121
|
authorizedRelations,
|
|
13127
13122
|
ganttRelationEvent,
|
|
13128
|
-
canDelete: !task.isDisabled && !waitCommitTasks
|
|
13129
|
-
onDoubleClick
|
|
13130
|
-
onClick
|
|
13131
|
-
onEventStart:
|
|
13123
|
+
canDelete: !task.isDisabled && !waitCommitTasks,
|
|
13124
|
+
onDoubleClick,
|
|
13125
|
+
onClick,
|
|
13126
|
+
onEventStart: onTaskBarDragStart,
|
|
13132
13127
|
onTooltipTask,
|
|
13133
|
-
onRelationStart:
|
|
13128
|
+
onRelationStart: onTaskBarRelationStart,
|
|
13134
13129
|
isSelected: Boolean(selectedIdsMirror[taskId]),
|
|
13135
13130
|
isCritical,
|
|
13136
13131
|
rtl,
|
|
@@ -13350,8 +13345,7 @@
|
|
|
13350
13345
|
visibleTasksMirror,
|
|
13351
13346
|
onArrowDoubleClick,
|
|
13352
13347
|
showProgress,
|
|
13353
|
-
progressColor
|
|
13354
|
-
isLoading
|
|
13348
|
+
progressColor
|
|
13355
13349
|
]);
|
|
13356
13350
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", children: [
|
|
13357
13351
|
renderedSelectedTasks,
|
|
@@ -13386,17 +13380,15 @@
|
|
|
13386
13380
|
] });
|
|
13387
13381
|
};
|
|
13388
13382
|
const TaskGanttContent = React.memo(TaskGanttContentInner);
|
|
13389
|
-
const ganttVerticalContainer = "
|
|
13390
|
-
const horizontalContainer = "
|
|
13391
|
-
const wrapper = "
|
|
13392
|
-
const calendarDragging = "
|
|
13393
|
-
const loadingOverlay = "_loadingOverlay_te0hs_117";
|
|
13383
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_1wr55_1";
|
|
13384
|
+
const horizontalContainer = "_horizontalContainer_1wr55_73";
|
|
13385
|
+
const wrapper = "_wrapper_1wr55_85";
|
|
13386
|
+
const calendarDragging = "_calendarDragging_1wr55_109";
|
|
13394
13387
|
const styles$2 = {
|
|
13395
13388
|
ganttVerticalContainer,
|
|
13396
13389
|
horizontalContainer,
|
|
13397
13390
|
wrapper,
|
|
13398
|
-
calendarDragging
|
|
13399
|
-
loadingOverlay
|
|
13391
|
+
calendarDragging
|
|
13400
13392
|
};
|
|
13401
13393
|
const TaskGanttInner = (props) => {
|
|
13402
13394
|
const {
|
|
@@ -13451,7 +13443,7 @@
|
|
|
13451
13443
|
]
|
|
13452
13444
|
);
|
|
13453
13445
|
React.useEffect(() => {
|
|
13454
|
-
if (!contentRef.current
|
|
13446
|
+
if (!contentRef.current) {
|
|
13455
13447
|
return () => {
|
|
13456
13448
|
};
|
|
13457
13449
|
}
|
|
@@ -13521,12 +13513,7 @@
|
|
|
13521
13513
|
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13522
13514
|
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13523
13515
|
};
|
|
13524
|
-
}, [
|
|
13525
|
-
verticalScrollbarRef,
|
|
13526
|
-
horizontalContainerRef,
|
|
13527
|
-
verticalGanttContainerRef,
|
|
13528
|
-
barProps.isLoading
|
|
13529
|
-
]);
|
|
13516
|
+
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13530
13517
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13531
13518
|
"div",
|
|
13532
13519
|
{
|
|
@@ -19016,7 +19003,6 @@
|
|
|
19016
19003
|
showProgress = true,
|
|
19017
19004
|
progressColor
|
|
19018
19005
|
} = props;
|
|
19019
|
-
const { isLoading = false } = props;
|
|
19020
19006
|
const ganttSVGRef = React.useRef(null);
|
|
19021
19007
|
const wrapperRef = React.useRef(null);
|
|
19022
19008
|
const taskListRef = React.useRef(null);
|
|
@@ -19331,9 +19317,6 @@
|
|
|
19331
19317
|
});
|
|
19332
19318
|
const handleOpenGanttContextMenu = React.useCallback(
|
|
19333
19319
|
(task, clientX, clientY) => {
|
|
19334
|
-
if (isLoading) {
|
|
19335
|
-
return;
|
|
19336
|
-
}
|
|
19337
19320
|
const wrapperNode = wrapperRef.current;
|
|
19338
19321
|
if (!wrapperNode) {
|
|
19339
19322
|
return;
|
|
@@ -19346,7 +19329,7 @@
|
|
|
19346
19329
|
y: clientY - top
|
|
19347
19330
|
});
|
|
19348
19331
|
},
|
|
19349
|
-
[wrapperRef
|
|
19332
|
+
[wrapperRef]
|
|
19350
19333
|
);
|
|
19351
19334
|
const handleCloseGanttContextMenu = React.useCallback(() => {
|
|
19352
19335
|
setGanttContextMenu({
|
|
@@ -19480,10 +19463,6 @@
|
|
|
19480
19463
|
horizontalContainerRef
|
|
19481
19464
|
]);
|
|
19482
19465
|
const handleKeyDown = (event) => {
|
|
19483
|
-
if (isLoading) {
|
|
19484
|
-
event.preventDefault();
|
|
19485
|
-
return;
|
|
19486
|
-
}
|
|
19487
19466
|
const { columnWidth, rowHeight: rowHeight2 } = distances;
|
|
19488
19467
|
let newScrollY = scrollY;
|
|
19489
19468
|
let newScrollX = scrollX;
|
|
@@ -20149,9 +20128,6 @@
|
|
|
20149
20128
|
}, [taskList.contextMenuOptions, locale]);
|
|
20150
20129
|
const handleOpenContextMenuForRow = React.useCallback(
|
|
20151
20130
|
(task, clientX, clientY) => {
|
|
20152
|
-
if (isLoading) {
|
|
20153
|
-
return;
|
|
20154
|
-
}
|
|
20155
20131
|
try {
|
|
20156
20132
|
if (onRowContextMenu && task) {
|
|
20157
20133
|
onRowContextMenu(task);
|
|
@@ -20169,8 +20145,7 @@
|
|
|
20169
20145
|
handleOpenContextMenu,
|
|
20170
20146
|
selectTask,
|
|
20171
20147
|
contextMenuOptions,
|
|
20172
|
-
selectedIdsMirror
|
|
20173
|
-
isLoading
|
|
20148
|
+
selectedIdsMirror
|
|
20174
20149
|
]
|
|
20175
20150
|
);
|
|
20176
20151
|
const ganttContextMenuOptions = React.useMemo(() => {
|
|
@@ -20304,7 +20279,6 @@
|
|
|
20304
20279
|
onDeleteTask: (taskForDelete) => handleDeleteTasks([taskForDelete]),
|
|
20305
20280
|
onTaskBarDragStart: handleTaskDragStart,
|
|
20306
20281
|
onTooltipTask: onChangeTooltipTask,
|
|
20307
|
-
isLoading,
|
|
20308
20282
|
mapGlobalRowIndexToTask,
|
|
20309
20283
|
onArrowDoubleClick,
|
|
20310
20284
|
renderedRowIndexes,
|
|
@@ -20357,8 +20331,7 @@
|
|
|
20357
20331
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
20358
20332
|
handleDeleteTasks,
|
|
20359
20333
|
showProgress,
|
|
20360
|
-
progressColor
|
|
20361
|
-
isLoading
|
|
20334
|
+
progressColor
|
|
20362
20335
|
]
|
|
20363
20336
|
);
|
|
20364
20337
|
const renderTaskListProps = React.useMemo(
|
|
@@ -20391,8 +20364,7 @@
|
|
|
20391
20364
|
taskListContainerRef,
|
|
20392
20365
|
taskListRef,
|
|
20393
20366
|
tasks: visibleTasks,
|
|
20394
|
-
ganttRef: wrapperRef
|
|
20395
|
-
isLoading
|
|
20367
|
+
ganttRef: wrapperRef
|
|
20396
20368
|
}),
|
|
20397
20369
|
[
|
|
20398
20370
|
childTasksMap,
|
|
@@ -20420,7 +20392,6 @@
|
|
|
20420
20392
|
selectTaskOnMouseDown,
|
|
20421
20393
|
selectedIdsMirror,
|
|
20422
20394
|
taskList,
|
|
20423
|
-
isLoading,
|
|
20424
20395
|
taskListContainerRef,
|
|
20425
20396
|
visibleTasks
|
|
20426
20397
|
]
|
|
@@ -20435,22 +20406,13 @@
|
|
|
20435
20406
|
ref: wrapperRef,
|
|
20436
20407
|
"data-testid": "gantt",
|
|
20437
20408
|
children: [
|
|
20438
|
-
(!columnsProp || columnsProp.length > 0) && /* @__PURE__ */ jsxRuntime.
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
),
|
|
20446
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20447
|
-
TaskList,
|
|
20448
|
-
{
|
|
20449
|
-
...renderTaskListProps,
|
|
20450
|
-
taskListHorizontalScrollRef
|
|
20451
|
-
}
|
|
20452
|
-
)
|
|
20453
|
-
] }),
|
|
20409
|
+
(!columnsProp || columnsProp.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
20410
|
+
TaskList,
|
|
20411
|
+
{
|
|
20412
|
+
...renderTaskListProps,
|
|
20413
|
+
taskListHorizontalScrollRef
|
|
20414
|
+
}
|
|
20415
|
+
),
|
|
20454
20416
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20455
20417
|
TaskGantt,
|
|
20456
20418
|
{
|
package/dist/style.css
CHANGED
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
user-select: none;
|
|
579
579
|
stroke-width: 0;
|
|
580
580
|
}
|
|
581
|
-
.
|
|
581
|
+
._ganttVerticalContainer_1wr55_1 {
|
|
582
582
|
overflow-x: scroll;
|
|
583
583
|
overflow-y: hidden;
|
|
584
584
|
font-size: 0;
|
|
@@ -590,16 +590,16 @@
|
|
|
590
590
|
height: 100%;
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
.
|
|
593
|
+
._ganttVerticalContainer_1wr55_1::-webkit-scrollbar {
|
|
594
594
|
width: 1rem;
|
|
595
595
|
height: 1rem;
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
.
|
|
598
|
+
._ganttVerticalContainer_1wr55_1::-webkit-scrollbar-corner {
|
|
599
599
|
background: transparent;
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
.
|
|
602
|
+
._ganttVerticalContainer_1wr55_1::-webkit-scrollbar-thumb {
|
|
603
603
|
border: 4px solid transparent;
|
|
604
604
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
605
605
|
background: var(--gantt-scrollbar-thumb-color);
|
|
@@ -607,20 +607,20 @@
|
|
|
607
607
|
background-clip: padding-box;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
.
|
|
610
|
+
._ganttVerticalContainer_1wr55_1::-webkit-scrollbar-thumb:hover {
|
|
611
611
|
border: 2px solid transparent;
|
|
612
612
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
613
613
|
background: var(--gantt-scrollbar-thumb-color);
|
|
614
614
|
background-clip: padding-box;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
.
|
|
617
|
+
._horizontalContainer_1wr55_73 {
|
|
618
618
|
margin: 0;
|
|
619
619
|
padding: 0;
|
|
620
620
|
overflow: hidden;
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
-
.
|
|
623
|
+
._wrapper_1wr55_85 {
|
|
624
624
|
display: flex;
|
|
625
625
|
padding: 0;
|
|
626
626
|
margin: 0;
|
|
@@ -632,17 +632,9 @@
|
|
|
632
632
|
border-bottom: 1px solid var(--gantt-divider-color);
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
.
|
|
635
|
+
._calendarDragging_1wr55_109 {
|
|
636
636
|
cursor: grabbing;
|
|
637
637
|
}
|
|
638
|
-
|
|
639
|
-
._loadingOverlay_te0hs_117 {
|
|
640
|
-
position: absolute;
|
|
641
|
-
inset: 0;
|
|
642
|
-
background: rgba(255, 255, 255, 0.6);
|
|
643
|
-
z-index: 9999;
|
|
644
|
-
pointer-events: auto;
|
|
645
|
-
}
|
|
646
638
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
647
639
|
._menuOption_1c3e3_3 {
|
|
648
640
|
display: flex;
|
|
@@ -368,12 +368,6 @@ export interface GanttProps {
|
|
|
368
368
|
* Custom color for progress bars. If not provided, theme progress colors are used.
|
|
369
369
|
*/
|
|
370
370
|
progressColor?: string;
|
|
371
|
-
/**
|
|
372
|
-
* When true, disables user interactions with the gantt and task list and
|
|
373
|
-
* shows a loading/disabled state. Useful while external updates are in
|
|
374
|
-
* progress to prevent rapid user actions.
|
|
375
|
-
*/
|
|
376
|
-
isLoading?: boolean;
|
|
377
371
|
}
|
|
378
372
|
export interface GanttTaskBarActions {
|
|
379
373
|
allowMoveTaskBar?: (action: TaskBarMoveAction, task: RenderTask) => boolean;
|
package/package.json
CHANGED