gantt-task-react-v 1.5.9 → 1.5.10

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.
@@ -29,7 +29,6 @@ export type TaskListProps = {
29
29
  isShowTaskNumbers?: boolean;
30
30
  mapTaskToNestedIndex: MapTaskToNestedIndex;
31
31
  onClick?: (task: RenderTask) => void;
32
- onDoubleClick?: (task: RenderTask) => void;
33
32
  onExpanderClick: (task: Task) => void;
34
33
  scrollToBottomStep: () => void;
35
34
  scrollToTask: (task: Task) => void;
@@ -10204,7 +10204,6 @@ const TaskListTableRowInner = forwardRef(
10204
10204
  isDragging,
10205
10205
  isShowTaskNumbers,
10206
10206
  onClick,
10207
- onDoubleClick,
10208
10207
  onExpanderClick,
10209
10208
  scrollToTask,
10210
10209
  selectTaskOnMouseDown,
@@ -10215,27 +10214,12 @@ const TaskListTableRowInner = forwardRef(
10215
10214
  moveOverPosition
10216
10215
  } = props;
10217
10216
  const { id, comparisonLevel = 1 } = task;
10218
- const onRowDoubleClick = useCallback(
10219
- (event) => {
10220
- event.preventDefault();
10221
- if (task.type !== "empty") {
10222
- scrollToTask(task);
10223
- }
10224
- if (onDoubleClick) {
10225
- onDoubleClick(task);
10226
- }
10227
- },
10228
- [onDoubleClick, scrollToTask, task]
10229
- );
10230
10217
  const onRootMouseDown = useCallback(
10231
10218
  (event) => {
10232
10219
  event.preventDefault();
10233
10220
  if (event.button !== 0) {
10234
10221
  return;
10235
10222
  }
10236
- if (event.detail >= 2) {
10237
- return;
10238
- }
10239
10223
  if (task.type !== "empty") {
10240
10224
  scrollToTask(task);
10241
10225
  }
@@ -10362,7 +10346,6 @@ const TaskListTableRowInner = forwardRef(
10362
10346
  ref,
10363
10347
  className: rowClassName,
10364
10348
  onMouseDown: onRootMouseDown,
10365
- onDoubleClick: onRowDoubleClick,
10366
10349
  style: {
10367
10350
  height: fullRowHeight,
10368
10351
  backgroundColor,
@@ -10936,7 +10919,6 @@ const TaskListInner = ({
10936
10919
  mapTaskToNestedIndex,
10937
10920
  onExpanderClick,
10938
10921
  onClick,
10939
- onDoubleClick,
10940
10922
  scrollToTask,
10941
10923
  selectTaskOnMouseDown,
10942
10924
  selectedIdsMirror,
@@ -11004,7 +10986,6 @@ const TaskListInner = ({
11004
10986
  isSelected: selectedIdsMirror[id],
11005
10987
  isShowTaskNumbers,
11006
10988
  onClick,
11007
- onDoubleClick,
11008
10989
  onExpanderClick,
11009
10990
  scrollToTask,
11010
10991
  selectTaskOnMouseDown,
@@ -11029,7 +11010,6 @@ const TaskListInner = ({
11029
11010
  isShowTaskNumbers,
11030
11011
  mapTaskToNestedIndex,
11031
11012
  onClick,
11032
- onDoubleClick,
11033
11013
  onExpanderClick,
11034
11014
  scrollToTask,
11035
11015
  selectTaskOnMouseDown,
@@ -20853,20 +20833,6 @@ const Gantt = (props) => {
20853
20833
  setActiveArrowKey(null);
20854
20834
  setActiveTaskId(null);
20855
20835
  }, []);
20856
- const handleTableRowDoubleClick = useCallback(
20857
- (task) => {
20858
- selectTask(task.id);
20859
- if (enableDrawer && taskList.enableTableRowDoubleClick) {
20860
- setActiveArrowKey(null);
20861
- setActiveTaskId(task.id);
20862
- setDrawerData({ type: "task", task });
20863
- }
20864
- if (taskList.onTableRowDoubleClick) {
20865
- taskList.onTableRowDoubleClick(task);
20866
- }
20867
- },
20868
- [enableDrawer, selectTask, taskList]
20869
- );
20870
20836
  const handleGoToTask = useCallback(
20871
20837
  (taskId) => {
20872
20838
  for (const [comparisonLevel, levelMap] of tasksMap) {
@@ -21207,7 +21173,6 @@ const Gantt = (props) => {
21207
21173
  handleOpenContextMenu: handleOpenContextMenuForRow,
21208
21174
  mapTaskToNestedIndex,
21209
21175
  onExpanderClick,
21210
- onDoubleClick: handleTableRowDoubleClick,
21211
21176
  scrollToBottomStep,
21212
21177
  scrollToTopStep,
21213
21178
  selectTaskOnMouseDown,
@@ -21245,8 +21210,7 @@ const Gantt = (props) => {
21245
21210
  selectedIdsMirror,
21246
21211
  taskList,
21247
21212
  taskListContainerRef,
21248
- visibleTasks,
21249
- handleTableRowDoubleClick
21213
+ visibleTasks
21250
21214
  ]
21251
21215
  );
21252
21216
  return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
@@ -10221,7 +10221,6 @@
10221
10221
  isDragging,
10222
10222
  isShowTaskNumbers,
10223
10223
  onClick,
10224
- onDoubleClick,
10225
10224
  onExpanderClick,
10226
10225
  scrollToTask,
10227
10226
  selectTaskOnMouseDown,
@@ -10232,27 +10231,12 @@
10232
10231
  moveOverPosition
10233
10232
  } = props;
10234
10233
  const { id, comparisonLevel = 1 } = task;
10235
- const onRowDoubleClick = React.useCallback(
10236
- (event) => {
10237
- event.preventDefault();
10238
- if (task.type !== "empty") {
10239
- scrollToTask(task);
10240
- }
10241
- if (onDoubleClick) {
10242
- onDoubleClick(task);
10243
- }
10244
- },
10245
- [onDoubleClick, scrollToTask, task]
10246
- );
10247
10234
  const onRootMouseDown = React.useCallback(
10248
10235
  (event) => {
10249
10236
  event.preventDefault();
10250
10237
  if (event.button !== 0) {
10251
10238
  return;
10252
10239
  }
10253
- if (event.detail >= 2) {
10254
- return;
10255
- }
10256
10240
  if (task.type !== "empty") {
10257
10241
  scrollToTask(task);
10258
10242
  }
@@ -10379,7 +10363,6 @@
10379
10363
  ref,
10380
10364
  className: rowClassName,
10381
10365
  onMouseDown: onRootMouseDown,
10382
- onDoubleClick: onRowDoubleClick,
10383
10366
  style: {
10384
10367
  height: fullRowHeight,
10385
10368
  backgroundColor,
@@ -10953,7 +10936,6 @@
10953
10936
  mapTaskToNestedIndex,
10954
10937
  onExpanderClick,
10955
10938
  onClick,
10956
- onDoubleClick,
10957
10939
  scrollToTask,
10958
10940
  selectTaskOnMouseDown,
10959
10941
  selectedIdsMirror,
@@ -11021,7 +11003,6 @@
11021
11003
  isSelected: selectedIdsMirror[id],
11022
11004
  isShowTaskNumbers,
11023
11005
  onClick,
11024
- onDoubleClick,
11025
11006
  onExpanderClick,
11026
11007
  scrollToTask,
11027
11008
  selectTaskOnMouseDown,
@@ -11046,7 +11027,6 @@
11046
11027
  isShowTaskNumbers,
11047
11028
  mapTaskToNestedIndex,
11048
11029
  onClick,
11049
- onDoubleClick,
11050
11030
  onExpanderClick,
11051
11031
  scrollToTask,
11052
11032
  selectTaskOnMouseDown,
@@ -20870,20 +20850,6 @@
20870
20850
  setActiveArrowKey(null);
20871
20851
  setActiveTaskId(null);
20872
20852
  }, []);
20873
- const handleTableRowDoubleClick = React.useCallback(
20874
- (task) => {
20875
- selectTask(task.id);
20876
- if (enableDrawer && taskList.enableTableRowDoubleClick) {
20877
- setActiveArrowKey(null);
20878
- setActiveTaskId(task.id);
20879
- setDrawerData({ type: "task", task });
20880
- }
20881
- if (taskList.onTableRowDoubleClick) {
20882
- taskList.onTableRowDoubleClick(task);
20883
- }
20884
- },
20885
- [enableDrawer, selectTask, taskList]
20886
- );
20887
20853
  const handleGoToTask = React.useCallback(
20888
20854
  (taskId) => {
20889
20855
  for (const [comparisonLevel, levelMap] of tasksMap) {
@@ -21224,7 +21190,6 @@
21224
21190
  handleOpenContextMenu: handleOpenContextMenuForRow,
21225
21191
  mapTaskToNestedIndex,
21226
21192
  onExpanderClick,
21227
- onDoubleClick: handleTableRowDoubleClick,
21228
21193
  scrollToBottomStep,
21229
21194
  scrollToTopStep,
21230
21195
  selectTaskOnMouseDown,
@@ -21262,8 +21227,7 @@
21262
21227
  selectedIdsMirror,
21263
21228
  taskList,
21264
21229
  taskListContainerRef,
21265
- visibleTasks,
21266
- handleTableRowDoubleClick
21230
+ visibleTasks
21267
21231
  ]
21268
21232
  );
21269
21233
  return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -184,7 +184,6 @@ export type TaskListTableRowProps = {
184
184
  isSelected: boolean;
185
185
  isShowTaskNumbers: boolean;
186
186
  onClick: (task: RenderTask) => void;
187
- onDoubleClick?: (task: RenderTask) => void;
188
187
  onExpanderClick: (task: Task) => void;
189
188
  scrollToTask: (task: Task) => void;
190
189
  selectTaskOnMouseDown: (taskId: string, event: MouseEvent) => void;
@@ -184,16 +184,6 @@ export interface GanttTaskListProps {
184
184
  * Render bottom table content
185
185
  */
186
186
  tableBottom?: TableRenderBottomProps;
187
- /**
188
- * Enable double-click on task table rows to open the drawer.
189
- * Requires `drawer.enableDrawer` to be true for the drawer to open.
190
- */
191
- enableTableRowDoubleClick?: boolean;
192
- /**
193
- * Callback invoked when a task table row is double-clicked.
194
- * Called regardless of `enableTableRowDoubleClick`; use it to open a custom drawer or panel.
195
- */
196
- onTableRowDoubleClick?: (task: RenderTask) => void;
197
187
  }
198
188
  export interface TableRenderBottomProps {
199
189
  height?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "Interactive Gantt Chart for React with TypeScript.",
5
5
  "author": "aguilanbon",
6
6
  "homepage": "https://github.com/aguilanbon/gantt-task-react-v",