gantt-task-react-v 1.1.20 → 1.2.1

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.
@@ -7456,11 +7456,11 @@ const defaultScrollIntent = {
7456
7456
  function useScrollIntent(_ref2) {
7457
7457
  let {
7458
7458
  delta,
7459
- disabled
7459
+ disabled: disabled2
7460
7460
  } = _ref2;
7461
7461
  const previousDelta = usePrevious(delta);
7462
7462
  return useLazyMemo((previousIntent) => {
7463
- if (disabled || !previousDelta || !previousIntent) {
7463
+ if (disabled2 || !previousDelta || !previousIntent) {
7464
7464
  return defaultScrollIntent;
7465
7465
  }
7466
7466
  const direction = {
@@ -7477,7 +7477,7 @@ function useScrollIntent(_ref2) {
7477
7477
  [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1
7478
7478
  }
7479
7479
  };
7480
- }, [disabled, delta, previousDelta]);
7480
+ }, [disabled2, delta, previousDelta]);
7481
7481
  }
7482
7482
  function useCachedNode(draggableNodes, id) {
7483
7483
  const draggableNode = id !== null ? draggableNodes.get(id) : void 0;
@@ -7526,8 +7526,8 @@ function useDroppableMeasuring(containers, _ref) {
7526
7526
  strategy
7527
7527
  } = config;
7528
7528
  const containersRef = useRef(containers);
7529
- const disabled = isDisabled();
7530
- const disabledRef = useLatestValue(disabled);
7529
+ const disabled2 = isDisabled();
7530
+ const disabledRef = useLatestValue(disabled2);
7531
7531
  const measureDroppableContainers = useCallback(function(ids2) {
7532
7532
  if (ids2 === void 0) {
7533
7533
  ids2 = [];
@@ -7544,7 +7544,7 @@ function useDroppableMeasuring(containers, _ref) {
7544
7544
  }, [disabledRef]);
7545
7545
  const timeoutId = useRef(null);
7546
7546
  const droppableRects = useLazyMemo((previousValue) => {
7547
- if (disabled && !dragging2) {
7547
+ if (disabled2 && !dragging2) {
7548
7548
  return defaultValue;
7549
7549
  }
7550
7550
  if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {
@@ -7567,19 +7567,19 @@ function useDroppableMeasuring(containers, _ref) {
7567
7567
  return map;
7568
7568
  }
7569
7569
  return previousValue;
7570
- }, [containers, queue, dragging2, disabled, measure]);
7570
+ }, [containers, queue, dragging2, disabled2, measure]);
7571
7571
  useEffect(() => {
7572
7572
  containersRef.current = containers;
7573
7573
  }, [containers]);
7574
7574
  useEffect(
7575
7575
  () => {
7576
- if (disabled) {
7576
+ if (disabled2) {
7577
7577
  return;
7578
7578
  }
7579
7579
  measureDroppableContainers();
7580
7580
  },
7581
7581
  // eslint-disable-next-line react-hooks/exhaustive-deps
7582
- [dragging2, disabled]
7582
+ [dragging2, disabled2]
7583
7583
  );
7584
7584
  useEffect(
7585
7585
  () => {
@@ -7592,7 +7592,7 @@ function useDroppableMeasuring(containers, _ref) {
7592
7592
  );
7593
7593
  useEffect(
7594
7594
  () => {
7595
- if (disabled || typeof frequency !== "number" || timeoutId.current !== null) {
7595
+ if (disabled2 || typeof frequency !== "number" || timeoutId.current !== null) {
7596
7596
  return;
7597
7597
  }
7598
7598
  timeoutId.current = setTimeout(() => {
@@ -7601,7 +7601,7 @@ function useDroppableMeasuring(containers, _ref) {
7601
7601
  }, frequency);
7602
7602
  },
7603
7603
  // eslint-disable-next-line react-hooks/exhaustive-deps
7604
- [frequency, disabled, measureDroppableContainers, ...dependencies]
7604
+ [frequency, disabled2, measureDroppableContainers, ...dependencies]
7605
7605
  );
7606
7606
  return {
7607
7607
  droppableRects,
@@ -7636,18 +7636,18 @@ function useInitialRect(node, measure) {
7636
7636
  function useMutationObserver(_ref) {
7637
7637
  let {
7638
7638
  callback,
7639
- disabled
7639
+ disabled: disabled2
7640
7640
  } = _ref;
7641
7641
  const handleMutations = useEvent(callback);
7642
7642
  const mutationObserver = useMemo(() => {
7643
- if (disabled || typeof window === "undefined" || typeof window.MutationObserver === "undefined") {
7643
+ if (disabled2 || typeof window === "undefined" || typeof window.MutationObserver === "undefined") {
7644
7644
  return void 0;
7645
7645
  }
7646
7646
  const {
7647
7647
  MutationObserver
7648
7648
  } = window;
7649
7649
  return new MutationObserver(handleMutations);
7650
- }, [handleMutations, disabled]);
7650
+ }, [handleMutations, disabled2]);
7651
7651
  useEffect(() => {
7652
7652
  return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();
7653
7653
  }, [mutationObserver]);
@@ -7656,12 +7656,12 @@ function useMutationObserver(_ref) {
7656
7656
  function useResizeObserver(_ref) {
7657
7657
  let {
7658
7658
  callback,
7659
- disabled
7659
+ disabled: disabled2
7660
7660
  } = _ref;
7661
7661
  const handleResize = useEvent(callback);
7662
7662
  const resizeObserver = useMemo(
7663
7663
  () => {
7664
- if (disabled || typeof window === "undefined" || typeof window.ResizeObserver === "undefined") {
7664
+ if (disabled2 || typeof window === "undefined" || typeof window.ResizeObserver === "undefined") {
7665
7665
  return void 0;
7666
7666
  }
7667
7667
  const {
@@ -7670,7 +7670,7 @@ function useResizeObserver(_ref) {
7670
7670
  return new ResizeObserver2(handleResize);
7671
7671
  },
7672
7672
  // eslint-disable-next-line react-hooks/exhaustive-deps
7673
- [disabled]
7673
+ [disabled2]
7674
7674
  );
7675
7675
  useEffect(() => {
7676
7676
  return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();
@@ -7988,9 +7988,9 @@ class DroppableContainersMap extends Map {
7988
7988
  getEnabled() {
7989
7989
  return this.toArray().filter((_ref) => {
7990
7990
  let {
7991
- disabled
7991
+ disabled: disabled2
7992
7992
  } = _ref;
7993
- return !disabled;
7993
+ return !disabled2;
7994
7994
  });
7995
7995
  }
7996
7996
  getNodeFor(id) {
@@ -8120,7 +8120,7 @@ function reducer(state, action) {
8120
8120
  const {
8121
8121
  id,
8122
8122
  key: key2,
8123
- disabled
8123
+ disabled: disabled2
8124
8124
  } = action;
8125
8125
  const element = state.droppable.containers.get(id);
8126
8126
  if (!element || key2 !== element.key) {
@@ -8129,7 +8129,7 @@ function reducer(state, action) {
8129
8129
  const containers = new DroppableContainersMap(state.droppable.containers);
8130
8130
  containers.set(id, {
8131
8131
  ...element,
8132
- disabled
8132
+ disabled: disabled2
8133
8133
  });
8134
8134
  return {
8135
8135
  ...state,
@@ -8165,7 +8165,7 @@ function reducer(state, action) {
8165
8165
  }
8166
8166
  function RestoreFocus(_ref) {
8167
8167
  let {
8168
- disabled
8168
+ disabled: disabled2
8169
8169
  } = _ref;
8170
8170
  const {
8171
8171
  active,
@@ -8175,7 +8175,7 @@ function RestoreFocus(_ref) {
8175
8175
  const previousActivatorEvent = usePrevious(activatorEvent);
8176
8176
  const previousActiveId = usePrevious(active == null ? void 0 : active.id);
8177
8177
  useEffect(() => {
8178
- if (disabled) {
8178
+ if (disabled2) {
8179
8179
  return;
8180
8180
  }
8181
8181
  if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {
@@ -8209,7 +8209,7 @@ function RestoreFocus(_ref) {
8209
8209
  }
8210
8210
  });
8211
8211
  }
8212
- }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);
8212
+ }, [activatorEvent, disabled2, draggableNodes, previousActiveId, previousActivatorEvent]);
8213
8213
  return null;
8214
8214
  }
8215
8215
  function applyModifiers(modifiers, _ref) {
@@ -8260,8 +8260,8 @@ function useLayoutShiftScrollCompensation(_ref) {
8260
8260
  y: config
8261
8261
  } : config;
8262
8262
  useIsomorphicLayoutEffect(() => {
8263
- const disabled = !x && !y;
8264
- if (disabled || !activeNode) {
8263
+ const disabled2 = !x && !y;
8264
+ if (disabled2 || !activeNode) {
8265
8265
  initialized.current = false;
8266
8266
  return;
8267
8267
  }
@@ -8768,7 +8768,7 @@ function useDraggable(_ref) {
8768
8768
  let {
8769
8769
  id,
8770
8770
  data,
8771
- disabled = false,
8771
+ disabled: disabled2 = false,
8772
8772
  attributes
8773
8773
  } = _ref;
8774
8774
  const key2 = useUniqueId(ID_PREFIX$1);
@@ -8814,18 +8814,18 @@ function useDraggable(_ref) {
8814
8814
  const memoizedAttributes = useMemo(() => ({
8815
8815
  role,
8816
8816
  tabIndex,
8817
- "aria-disabled": disabled,
8817
+ "aria-disabled": disabled2,
8818
8818
  "aria-pressed": isDragging && role === defaultRole ? true : void 0,
8819
8819
  "aria-roledescription": roleDescription,
8820
8820
  "aria-describedby": ariaDescribedById.draggable
8821
- }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);
8821
+ }), [disabled2, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);
8822
8822
  return {
8823
8823
  active,
8824
8824
  activatorEvent,
8825
8825
  activeNodeRect,
8826
8826
  attributes: memoizedAttributes,
8827
8827
  isDragging,
8828
- listeners: disabled ? void 0 : listeners,
8828
+ listeners: disabled2 ? void 0 : listeners,
8829
8829
  node,
8830
8830
  over,
8831
8831
  setNodeRef,
@@ -8843,7 +8843,7 @@ const defaultResizeObserverConfig = {
8843
8843
  function useDroppable(_ref) {
8844
8844
  let {
8845
8845
  data,
8846
- disabled = false,
8846
+ disabled: disabled2 = false,
8847
8847
  id,
8848
8848
  resizeObserverConfig
8849
8849
  } = _ref;
@@ -8855,7 +8855,7 @@ function useDroppable(_ref) {
8855
8855
  measureDroppableContainers
8856
8856
  } = useContext(InternalContext);
8857
8857
  const previous = useRef({
8858
- disabled
8858
+ disabled: disabled2
8859
8859
  });
8860
8860
  const resizeObserverConnected = useRef(false);
8861
8861
  const rect = useRef(null);
@@ -8919,7 +8919,7 @@ function useDroppable(_ref) {
8919
8919
  element: {
8920
8920
  id,
8921
8921
  key: key2,
8922
- disabled,
8922
+ disabled: disabled2,
8923
8923
  node: nodeRef,
8924
8924
  rect,
8925
8925
  data: dataRef
@@ -8935,16 +8935,16 @@ function useDroppable(_ref) {
8935
8935
  [id]
8936
8936
  );
8937
8937
  useEffect(() => {
8938
- if (disabled !== previous.current.disabled) {
8938
+ if (disabled2 !== previous.current.disabled) {
8939
8939
  dispatch({
8940
8940
  type: Action.SetDroppableDisabled,
8941
8941
  id,
8942
8942
  key: key2,
8943
- disabled
8943
+ disabled: disabled2
8944
8944
  });
8945
- previous.current.disabled = disabled;
8945
+ previous.current.disabled = disabled2;
8946
8946
  }
8947
- }, [id, key2, disabled, dispatch]);
8947
+ }, [id, key2, disabled2, dispatch]);
8948
8948
  return {
8949
8949
  active,
8950
8950
  rect,
@@ -9335,14 +9335,14 @@ function itemsEqual(a, b) {
9335
9335
  }
9336
9336
  return true;
9337
9337
  }
9338
- function normalizeDisabled(disabled) {
9339
- if (typeof disabled === "boolean") {
9338
+ function normalizeDisabled(disabled2) {
9339
+ if (typeof disabled2 === "boolean") {
9340
9340
  return {
9341
- draggable: disabled,
9342
- droppable: disabled
9341
+ draggable: disabled2,
9342
+ droppable: disabled2
9343
9343
  };
9344
9344
  }
9345
- return disabled;
9345
+ return disabled2;
9346
9346
  }
9347
9347
  const rectSortingStrategy = (_ref) => {
9348
9348
  let {
@@ -9464,7 +9464,7 @@ function SortableContext(_ref) {
9464
9464
  const previousItemsRef = useRef(items);
9465
9465
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
9466
9466
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
9467
- const disabled = normalizeDisabled(disabledProp);
9467
+ const disabled2 = normalizeDisabled(disabledProp);
9468
9468
  useIsomorphicLayoutEffect(() => {
9469
9469
  if (itemsHaveChanged && isDragging) {
9470
9470
  measureDroppableContainers(items);
@@ -9477,7 +9477,7 @@ function SortableContext(_ref) {
9477
9477
  () => ({
9478
9478
  activeIndex,
9479
9479
  containerId,
9480
- disabled,
9480
+ disabled: disabled2,
9481
9481
  disableTransforms,
9482
9482
  items,
9483
9483
  overIndex,
@@ -9486,7 +9486,7 @@ function SortableContext(_ref) {
9486
9486
  strategy
9487
9487
  }),
9488
9488
  // eslint-disable-next-line react-hooks/exhaustive-deps
9489
- [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]
9489
+ [activeIndex, containerId, disabled2.draggable, disabled2.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]
9490
9490
  );
9491
9491
  return React__default.createElement(Context.Provider, {
9492
9492
  value: contextValue
@@ -9539,7 +9539,7 @@ const defaultAttributes = {
9539
9539
  };
9540
9540
  function useDerivedTransform(_ref) {
9541
9541
  let {
9542
- disabled,
9542
+ disabled: disabled2,
9543
9543
  index: index2,
9544
9544
  node,
9545
9545
  rect
@@ -9547,7 +9547,7 @@ function useDerivedTransform(_ref) {
9547
9547
  const [derivedTransform, setDerivedtransform] = useState(null);
9548
9548
  const previousIndex = useRef(index2);
9549
9549
  useIsomorphicLayoutEffect(() => {
9550
- if (!disabled && index2 !== previousIndex.current && node.current) {
9550
+ if (!disabled2 && index2 !== previousIndex.current && node.current) {
9551
9551
  const initial = rect.current;
9552
9552
  if (initial) {
9553
9553
  const current = getClientRect(node.current, {
@@ -9567,7 +9567,7 @@ function useDerivedTransform(_ref) {
9567
9567
  if (index2 !== previousIndex.current) {
9568
9568
  previousIndex.current = index2;
9569
9569
  }
9570
- }, [disabled, index2, node, rect]);
9570
+ }, [disabled2, index2, node, rect]);
9571
9571
  useEffect(() => {
9572
9572
  if (derivedTransform) {
9573
9573
  setDerivedtransform(null);
@@ -9598,7 +9598,7 @@ function useSortable(_ref) {
9598
9598
  useDragOverlay,
9599
9599
  strategy: globalStrategy
9600
9600
  } = useContext(Context);
9601
- const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
9601
+ const disabled2 = normalizeLocalDisabled(localDisabled, globalDisabled);
9602
9602
  const index2 = items.indexOf(id);
9603
9603
  const data = useMemo(() => ({
9604
9604
  sortable: {
@@ -9617,7 +9617,7 @@ function useSortable(_ref) {
9617
9617
  } = useDroppable({
9618
9618
  id,
9619
9619
  data,
9620
- disabled: disabled.droppable,
9620
+ disabled: disabled2.droppable,
9621
9621
  resizeObserverConfig: {
9622
9622
  updateMeasurementsFor: itemsAfterCurrentSortable,
9623
9623
  ...resizeObserverConfig
@@ -9641,7 +9641,7 @@ function useSortable(_ref) {
9641
9641
  ...defaultAttributes,
9642
9642
  ...userDefinedAttributes
9643
9643
  },
9644
- disabled: disabled.draggable
9644
+ disabled: disabled2.draggable
9645
9645
  });
9646
9646
  const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
9647
9647
  const isSorting = Boolean(active);
@@ -10637,25 +10637,25 @@ const TaskListTableDefaultInner = ({
10637
10637
  );
10638
10638
  };
10639
10639
  const TaskListTable = memo(TaskListTableDefaultInner);
10640
- const taskListRoot = "_taskListRoot_6kpxi_1";
10641
- const taskListHorizontalScroll = "_taskListHorizontalScroll_6kpxi_19";
10642
- const taskListResizer = "_taskListResizer_6kpxi_81";
10643
- const horizontalContainer$1 = "_horizontalContainer_6kpxi_145";
10644
- const tableWrapper = "_tableWrapper_6kpxi_159";
10645
- const loadingOverlayBody$1 = "_loadingOverlayBody_6kpxi_173";
10646
- const scrollToTop = "_scrollToTop_6kpxi_195";
10647
- const scrollToBottom = "_scrollToBottom_6kpxi_211";
10648
- const hidden = "_hidden_6kpxi_227";
10640
+ const taskListRoot = "_taskListRoot_yadug_1";
10641
+ const taskListHorizontalScroll = "_taskListHorizontalScroll_yadug_19";
10642
+ const taskListResizer = "_taskListResizer_yadug_81";
10643
+ const horizontalContainer$1 = "_horizontalContainer_yadug_145";
10644
+ const tableWrapper = "_tableWrapper_yadug_159";
10645
+ const scrollToTop = "_scrollToTop_yadug_173";
10646
+ const scrollToBottom = "_scrollToBottom_yadug_189";
10647
+ const hidden = "_hidden_yadug_205";
10648
+ const disabled$1 = "_disabled_yadug_213";
10649
10649
  const styles$d = {
10650
10650
  taskListRoot,
10651
10651
  taskListHorizontalScroll,
10652
10652
  taskListResizer,
10653
10653
  horizontalContainer: horizontalContainer$1,
10654
10654
  tableWrapper,
10655
- loadingOverlayBody: loadingOverlayBody$1,
10656
10655
  scrollToTop,
10657
10656
  scrollToBottom,
10658
- hidden
10657
+ hidden,
10658
+ disabled: disabled$1
10659
10659
  };
10660
10660
  const checkHasChildren = (task, childTasksMap) => {
10661
10661
  const { id, comparisonLevel = 1 } = task;
@@ -10702,10 +10702,10 @@ const TaskListInner = ({
10702
10702
  taskListHorizontalScrollRef,
10703
10703
  taskListRef,
10704
10704
  tasks,
10705
- isLoading = false,
10706
10705
  onResizeColumn,
10707
10706
  canReorderTasks,
10708
- tableBottom
10707
+ tableBottom,
10708
+ isLoading = false
10709
10709
  }) => {
10710
10710
  const [
10711
10711
  columns,
@@ -10758,8 +10758,7 @@ const TaskListInner = ({
10758
10758
  onClick,
10759
10759
  onExpanderClick,
10760
10760
  scrollToTask,
10761
- selectTaskOnMouseDown: isLoading ? () => {
10762
- } : selectTaskOnMouseDown,
10761
+ selectTaskOnMouseDown,
10763
10762
  task,
10764
10763
  depth
10765
10764
  };
@@ -10784,7 +10783,6 @@ const TaskListInner = ({
10784
10783
  onExpanderClick,
10785
10784
  scrollToTask,
10786
10785
  selectTaskOnMouseDown,
10787
- isLoading,
10788
10786
  selectedIdsMirror
10789
10787
  ]
10790
10788
  );
@@ -10809,91 +10807,89 @@ const TaskListInner = ({
10809
10807
  canResizeColumns
10810
10808
  }
10811
10809
  ),
10812
- /* @__PURE__ */ jsxs("div", { className: styles$d.tableWrapper, children: [
10813
- (isLoading || false) && /* @__PURE__ */ jsx(
10814
- "div",
10815
- {
10816
- className: styles$d.loadingOverlayBody,
10817
- "data-testid": "tasklist-loading-overlay"
10818
- }
10819
- ),
10820
- /* @__PURE__ */ jsx(
10821
- "div",
10822
- {
10823
- ref: taskListContainerRef,
10824
- className: styles$d.horizontalContainer,
10825
- style: {
10826
- height: Math.max(
10827
- ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
10828
- distances.minimumRowDisplayed * distances.rowHeight
10829
- ),
10830
- width: taskListWidth
10831
- },
10832
- children: /* @__PURE__ */ jsx(
10810
+ /* @__PURE__ */ jsxs(
10811
+ "div",
10812
+ {
10813
+ className: `${styles$d.tableWrapper} ${isLoading ? styles$d.disabled : ""}`,
10814
+ children: [
10815
+ /* @__PURE__ */ jsx(
10833
10816
  "div",
10834
10817
  {
10818
+ ref: taskListContainerRef,
10819
+ className: styles$d.horizontalContainer,
10835
10820
  style: {
10836
10821
  height: Math.max(
10837
- ganttFullHeight,
10822
+ ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
10838
10823
  distances.minimumRowDisplayed * distances.rowHeight
10839
10824
  ),
10840
- backgroundSize: `100% ${fullRowHeight * 2}px`,
10841
- backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
10825
+ width: taskListWidth
10842
10826
  },
10843
10827
  children: /* @__PURE__ */ jsx(
10844
- RenderTaskListTable,
10828
+ "div",
10845
10829
  {
10846
- ganttRef,
10847
- getTableRowProps,
10848
- canMoveTasks: canReorderTasks,
10849
- allowMoveTask: allowReorderTask,
10850
- childTasksMap,
10851
- columns,
10852
- cutIdsMirror,
10853
- dateSetup,
10854
- dependencyMap,
10855
- distances,
10856
- fullRowHeight,
10857
- ganttFullHeight,
10858
- getTaskCurrentState,
10859
- handleAddTask,
10860
- handleDeleteTasks,
10861
- handleEditTask,
10862
- handleMoveTaskBefore,
10863
- handleMoveTaskAfter,
10864
- handleMoveTasksInside,
10865
- handleOpenContextMenu: isLoading ? () => {
10866
- } : handleOpenContextMenu,
10867
- icons,
10868
- isShowTaskNumbers,
10869
- mapTaskToNestedIndex,
10870
- onClick,
10871
- onExpanderClick,
10872
- renderedIndexes,
10873
- scrollToTask,
10874
- selectTaskOnMouseDown,
10875
- selectedIdsMirror,
10876
- taskListWidth,
10877
- tasks
10830
+ style: {
10831
+ height: Math.max(
10832
+ ganttFullHeight,
10833
+ distances.minimumRowDisplayed * distances.rowHeight
10834
+ ),
10835
+ backgroundSize: `100% ${fullRowHeight * 2}px`,
10836
+ backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
10837
+ },
10838
+ children: /* @__PURE__ */ jsx(
10839
+ RenderTaskListTable,
10840
+ {
10841
+ ganttRef,
10842
+ getTableRowProps,
10843
+ canMoveTasks: canReorderTasks,
10844
+ allowMoveTask: allowReorderTask,
10845
+ childTasksMap,
10846
+ columns,
10847
+ cutIdsMirror,
10848
+ dateSetup,
10849
+ dependencyMap,
10850
+ distances,
10851
+ fullRowHeight,
10852
+ ganttFullHeight,
10853
+ getTaskCurrentState,
10854
+ handleAddTask,
10855
+ handleDeleteTasks,
10856
+ handleEditTask,
10857
+ handleMoveTaskBefore,
10858
+ handleMoveTaskAfter,
10859
+ handleMoveTasksInside,
10860
+ handleOpenContextMenu,
10861
+ icons,
10862
+ isShowTaskNumbers,
10863
+ mapTaskToNestedIndex,
10864
+ onClick,
10865
+ onExpanderClick,
10866
+ renderedIndexes,
10867
+ scrollToTask,
10868
+ selectTaskOnMouseDown,
10869
+ selectedIdsMirror,
10870
+ taskListWidth,
10871
+ tasks
10872
+ }
10873
+ )
10878
10874
  }
10879
10875
  )
10880
10876
  }
10877
+ ),
10878
+ /* @__PURE__ */ jsx(
10879
+ "div",
10880
+ {
10881
+ className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
10882
+ }
10883
+ ),
10884
+ /* @__PURE__ */ jsx(
10885
+ "div",
10886
+ {
10887
+ className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
10888
+ }
10881
10889
  )
10882
- }
10883
- ),
10884
- /* @__PURE__ */ jsx(
10885
- "div",
10886
- {
10887
- className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
10888
- }
10889
- ),
10890
- /* @__PURE__ */ jsx(
10891
- "div",
10892
- {
10893
- className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
10894
- }
10895
- )
10896
- ] }),
10890
+ ]
10891
+ }
10892
+ ),
10897
10893
  (tableBottom == null ? void 0 : tableBottom.renderContent) && (tableBottom == null ? void 0 : tableBottom.height) && /* @__PURE__ */ jsx("div", { style: { height: tableBottom.height, width: "100%" }, children: tableBottom.renderContent() })
10898
10894
  ]
10899
10895
  }
@@ -12983,7 +12979,6 @@ const TaskGanttContentInner = (props) => {
12983
12979
  selectTaskOnMouseDown,
12984
12980
  selectedIdsMirror,
12985
12981
  onTooltipTask,
12986
- isLoading = false,
12987
12982
  startColumnIndex,
12988
12983
  taskYOffset,
12989
12984
  taskHeight,
@@ -13112,17 +13107,17 @@ const TaskGanttContentInner = (props) => {
13112
13107
  distances,
13113
13108
  taskHeight,
13114
13109
  taskHalfHeight,
13115
- isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks && !isLoading,
13110
+ isProgressChangeable: (t) => isProgressChangeable(t) && !waitCommitTasks,
13116
13111
  isDateChangeable: (t) => isDateChangeable(t) && !waitCommitTasks,
13117
- isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks && !isLoading,
13112
+ isRelationChangeable: (t) => isRelationChangeable(t) && !waitCommitTasks,
13118
13113
  authorizedRelations,
13119
13114
  ganttRelationEvent,
13120
- canDelete: !task.isDisabled && !waitCommitTasks && !isLoading,
13121
- onDoubleClick: isLoading ? void 0 : onDoubleClick,
13122
- onClick: isLoading ? void 0 : onClick,
13123
- onEventStart: isLoading ? void 0 : onTaskBarDragStart,
13115
+ canDelete: !task.isDisabled && !waitCommitTasks,
13116
+ onDoubleClick,
13117
+ onClick,
13118
+ onEventStart: onTaskBarDragStart,
13124
13119
  onTooltipTask,
13125
- onRelationStart: isLoading ? void 0 : onTaskBarRelationStart,
13120
+ onRelationStart: onTaskBarRelationStart,
13126
13121
  isSelected: Boolean(selectedIdsMirror[taskId]),
13127
13122
  isCritical,
13128
13123
  rtl,
@@ -13342,8 +13337,7 @@ const TaskGanttContentInner = (props) => {
13342
13337
  visibleTasksMirror,
13343
13338
  onArrowDoubleClick,
13344
13339
  showProgress,
13345
- progressColor,
13346
- isLoading
13340
+ progressColor
13347
13341
  ]);
13348
13342
  return /* @__PURE__ */ jsxs("g", { className: "content", children: [
13349
13343
  renderedSelectedTasks,
@@ -13378,19 +13372,17 @@ const TaskGanttContentInner = (props) => {
13378
13372
  ] });
13379
13373
  };
13380
13374
  const TaskGanttContent = memo(TaskGanttContentInner);
13381
- const ganttVerticalContainer = "_ganttVerticalContainer_19ply_1";
13382
- const horizontalContainer = "_horizontalContainer_19ply_73";
13383
- const wrapper = "_wrapper_19ply_93";
13384
- const calendarDragging = "_calendarDragging_19ply_117";
13385
- const loadingOverlay = "_loadingOverlay_19ply_125";
13386
- const loadingOverlayBody = "_loadingOverlayBody_19ply_141";
13375
+ const ganttVerticalContainer = "_ganttVerticalContainer_1czjq_1";
13376
+ const horizontalContainer = "_horizontalContainer_1czjq_73";
13377
+ const wrapper = "_wrapper_1czjq_85";
13378
+ const calendarDragging = "_calendarDragging_1czjq_109";
13379
+ const disabled = "_disabled_1czjq_117";
13387
13380
  const styles$2 = {
13388
13381
  ganttVerticalContainer,
13389
13382
  horizontalContainer,
13390
13383
  wrapper,
13391
13384
  calendarDragging,
13392
- loadingOverlay,
13393
- loadingOverlayBody
13385
+ disabled
13394
13386
  };
13395
13387
  const TaskGanttInner = (props) => {
13396
13388
  const {
@@ -13410,7 +13402,8 @@ const TaskGanttInner = (props) => {
13410
13402
  onVerticalScrollbarScrollX,
13411
13403
  verticalGanttContainerRef,
13412
13404
  verticalScrollbarRef,
13413
- onOpenGanttContextMenu
13405
+ onOpenGanttContextMenu,
13406
+ isLoading = false
13414
13407
  } = props;
13415
13408
  const contentRef = React__default.useRef(null);
13416
13409
  const moveStateVertRef = useRef(null);
@@ -13445,7 +13438,7 @@ const TaskGanttInner = (props) => {
13445
13438
  ]
13446
13439
  );
13447
13440
  useEffect(() => {
13448
- if (!contentRef.current || barProps.isLoading) {
13441
+ if (!contentRef.current) {
13449
13442
  return () => {
13450
13443
  };
13451
13444
  }
@@ -13515,12 +13508,7 @@ const TaskGanttInner = (props) => {
13515
13508
  contentContainer.removeEventListener("mouseup", onScrollEnd);
13516
13509
  contentContainer.removeEventListener("mouseout", onScrollEnd);
13517
13510
  };
13518
- }, [
13519
- verticalScrollbarRef,
13520
- horizontalContainerRef,
13521
- verticalGanttContainerRef,
13522
- barProps.isLoading
13523
- ]);
13511
+ }, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
13524
13512
  return /* @__PURE__ */ jsxs(
13525
13513
  "div",
13526
13514
  {
@@ -13539,50 +13527,41 @@ const TaskGanttInner = (props) => {
13539
13527
  children: /* @__PURE__ */ jsx(Calendar, { scrollRef: verticalGanttContainerRef, ...calendarProps })
13540
13528
  }
13541
13529
  ),
13542
- /* @__PURE__ */ jsxs(
13530
+ /* @__PURE__ */ jsx(
13543
13531
  "div",
13544
13532
  {
13545
13533
  ref: horizontalContainerRef,
13546
- className: styles$2.horizontalContainer,
13534
+ className: `${styles$2.horizontalContainer} ${isLoading ? styles$2.disabled : ""}`,
13547
13535
  style: containerStyle,
13548
- children: [
13549
- barProps.isLoading && /* @__PURE__ */ jsx(
13550
- "div",
13551
- {
13552
- className: styles$2.loadingOverlayBody,
13553
- "data-testid": "gantt-loading-overlay-body"
13554
- }
13555
- ),
13556
- /* @__PURE__ */ jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxs(
13557
- "svg",
13558
- {
13559
- xmlns: "http://www.w3.org/2000/svg",
13560
- width: fullSvgWidth,
13561
- height: ganttFullHeight,
13562
- fontFamily: "var(--gantt-font-family)",
13563
- ref: ganttSVGRef,
13564
- onContextMenu: (event) => {
13565
- event.preventDefault();
13566
- if (onOpenGanttContextMenu) {
13567
- onOpenGanttContextMenu(event.clientX, event.clientY);
13536
+ children: /* @__PURE__ */ jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxs(
13537
+ "svg",
13538
+ {
13539
+ xmlns: "http://www.w3.org/2000/svg",
13540
+ width: fullSvgWidth,
13541
+ height: ganttFullHeight,
13542
+ fontFamily: "var(--gantt-font-family)",
13543
+ ref: ganttSVGRef,
13544
+ onContextMenu: (event) => {
13545
+ event.preventDefault();
13546
+ if (onOpenGanttContextMenu) {
13547
+ onOpenGanttContextMenu(event.clientX, event.clientY);
13548
+ }
13549
+ },
13550
+ children: [
13551
+ /* @__PURE__ */ jsx(GanttToday, { ...ganttTodayProps }),
13552
+ /* @__PURE__ */ jsx(
13553
+ "rect",
13554
+ {
13555
+ ref: contentRef,
13556
+ width: "100%",
13557
+ height: "100%",
13558
+ fill: "transparent"
13568
13559
  }
13569
- },
13570
- children: [
13571
- /* @__PURE__ */ jsx(GanttToday, { ...ganttTodayProps }),
13572
- /* @__PURE__ */ jsx(
13573
- "rect",
13574
- {
13575
- ref: contentRef,
13576
- width: "100%",
13577
- height: "100%",
13578
- fill: "transparent"
13579
- }
13580
- ),
13581
- /* @__PURE__ */ jsx(TaskGanttContent, { ...barProps })
13582
- ]
13583
- }
13584
- ) })
13585
- ]
13560
+ ),
13561
+ /* @__PURE__ */ jsx(TaskGanttContent, { ...barProps })
13562
+ ]
13563
+ }
13564
+ ) })
13586
13565
  }
13587
13566
  )
13588
13567
  ]
@@ -18052,7 +18031,7 @@ function MenuOption(props) {
18052
18031
  },
18053
18032
  handleAction,
18054
18033
  option,
18055
- option: { icon: icon2, label: label2, disabled, children }
18034
+ option: { icon: icon2, label: label2, disabled: disabled2, children }
18056
18035
  } = props;
18057
18036
  const [hovered, setHovered] = useState(false);
18058
18037
  const [coords, setCoords] = useState(null);
@@ -18062,7 +18041,7 @@ function MenuOption(props) {
18062
18041
  const onClick = useCallback(
18063
18042
  (e) => {
18064
18043
  e.preventDefault();
18065
- if (disabled) {
18044
+ if (disabled2) {
18066
18045
  return;
18067
18046
  }
18068
18047
  if (children && children.length > 0) {
@@ -18072,7 +18051,7 @@ function MenuOption(props) {
18072
18051
  handleAction(option);
18073
18052
  onClose == null ? void 0 : onClose();
18074
18053
  },
18075
- [onClose, handleAction, option, disabled, children]
18054
+ [onClose, handleAction, option, disabled2, children]
18076
18055
  );
18077
18056
  useEffect(() => {
18078
18057
  if (!hovered || !nestedRef.current)
@@ -18132,8 +18111,8 @@ function MenuOption(props) {
18132
18111
  "button",
18133
18112
  {
18134
18113
  className: styles$1.menuOption,
18135
- "aria-disabled": disabled,
18136
- disabled,
18114
+ "aria-disabled": disabled2,
18115
+ disabled: disabled2,
18137
18116
  style: {
18138
18117
  height: contextMenuOptionHeight,
18139
18118
  paddingLeft: contextMenuSidePadding,
@@ -18150,7 +18129,7 @@ function MenuOption(props) {
18150
18129
  style: {
18151
18130
  width: contextMenuIconWidth,
18152
18131
  color: "var(--gantt-context-menu-text-color)",
18153
- opacity: disabled ? 0.3 : 0.5
18132
+ opacity: disabled2 ? 0.3 : 0.5
18154
18133
  },
18155
18134
  children: icon2
18156
18135
  }
@@ -19017,9 +18996,9 @@ const Gantt = (props) => {
19017
18996
  todayLabel = "Today",
19018
18997
  dataDateLabel = "Data Date",
19019
18998
  showProgress = true,
19020
- progressColor
18999
+ progressColor,
19000
+ isLoading = false
19021
19001
  } = props;
19022
- const { isLoading = false } = props;
19023
19002
  const ganttSVGRef = useRef(null);
19024
19003
  const wrapperRef = useRef(null);
19025
19004
  const taskListRef = useRef(null);
@@ -19334,9 +19313,6 @@ const Gantt = (props) => {
19334
19313
  });
19335
19314
  const handleOpenGanttContextMenu = useCallback(
19336
19315
  (task, clientX, clientY) => {
19337
- if (isLoading) {
19338
- return;
19339
- }
19340
19316
  const wrapperNode = wrapperRef.current;
19341
19317
  if (!wrapperNode) {
19342
19318
  return;
@@ -19349,7 +19325,7 @@ const Gantt = (props) => {
19349
19325
  y: clientY - top
19350
19326
  });
19351
19327
  },
19352
- [wrapperRef, isLoading]
19328
+ [wrapperRef]
19353
19329
  );
19354
19330
  const handleCloseGanttContextMenu = useCallback(() => {
19355
19331
  setGanttContextMenu({
@@ -19483,10 +19459,6 @@ const Gantt = (props) => {
19483
19459
  horizontalContainerRef
19484
19460
  ]);
19485
19461
  const handleKeyDown = (event) => {
19486
- if (isLoading) {
19487
- event.preventDefault();
19488
- return;
19489
- }
19490
19462
  const { columnWidth, rowHeight: rowHeight2 } = distances;
19491
19463
  let newScrollY = scrollY;
19492
19464
  let newScrollX = scrollX;
@@ -20152,9 +20124,6 @@ const Gantt = (props) => {
20152
20124
  }, [taskList.contextMenuOptions, locale]);
20153
20125
  const handleOpenContextMenuForRow = useCallback(
20154
20126
  (task, clientX, clientY) => {
20155
- if (isLoading) {
20156
- return;
20157
- }
20158
20127
  try {
20159
20128
  if (onRowContextMenu && task) {
20160
20129
  onRowContextMenu(task);
@@ -20172,8 +20141,7 @@ const Gantt = (props) => {
20172
20141
  handleOpenContextMenu,
20173
20142
  selectTask,
20174
20143
  contextMenuOptions,
20175
- selectedIdsMirror,
20176
- isLoading
20144
+ selectedIdsMirror
20177
20145
  ]
20178
20146
  );
20179
20147
  const ganttContextMenuOptions = useMemo(() => {
@@ -20307,7 +20275,6 @@ const Gantt = (props) => {
20307
20275
  onDeleteTask: (taskForDelete) => handleDeleteTasks([taskForDelete]),
20308
20276
  onTaskBarDragStart: handleTaskDragStart,
20309
20277
  onTooltipTask: onChangeTooltipTask,
20310
- isLoading,
20311
20278
  mapGlobalRowIndexToTask,
20312
20279
  onArrowDoubleClick,
20313
20280
  renderedRowIndexes,
@@ -20360,8 +20327,7 @@ const Gantt = (props) => {
20360
20327
  changeInProgress == null ? void 0 : changeInProgress.action,
20361
20328
  handleDeleteTasks,
20362
20329
  showProgress,
20363
- progressColor,
20364
- isLoading
20330
+ progressColor
20365
20331
  ]
20366
20332
  );
20367
20333
  const renderTaskListProps = useMemo(
@@ -20423,9 +20389,9 @@ const Gantt = (props) => {
20423
20389
  selectTaskOnMouseDown,
20424
20390
  selectedIdsMirror,
20425
20391
  taskList,
20426
- isLoading,
20427
20392
  taskListContainerRef,
20428
- visibleTasks
20393
+ visibleTasks,
20394
+ isLoading
20429
20395
  ]
20430
20396
  );
20431
20397
  return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
@@ -20463,7 +20429,8 @@ const Gantt = (props) => {
20463
20429
  verticalGanttContainerRef,
20464
20430
  onOpenGanttContextMenu: (clientX, clientY) => {
20465
20431
  handleOpenGanttContextMenu(null, clientX, clientY);
20466
- }
20432
+ },
20433
+ isLoading
20467
20434
  }
20468
20435
  ),
20469
20436
  tooltipTaskFromMap && /* @__PURE__ */ jsx(