gantt-task-react-v 1.2.0 → 1.2.2

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.
@@ -18,5 +18,6 @@ export interface TaskGanttProps extends GanttTaskBarActions {
18
18
  onVerticalScrollbarScrollX: (event: SyntheticEvent<HTMLDivElement>) => void;
19
19
  verticalGanttContainerRef: RefObject<HTMLDivElement>;
20
20
  onOpenGanttContextMenu?: (clientX: number, clientY: number) => void;
21
+ isLoading?: boolean;
21
22
  }
22
23
  export declare const TaskGantt: React.NamedExoticComponent<TaskGanttProps>;
@@ -40,5 +40,6 @@ export type TaskListProps = {
40
40
  tasks: readonly RenderTask[];
41
41
  onResizeColumn?: OnResizeColumn;
42
42
  tableBottom?: TableRenderBottomProps;
43
+ isLoading?: boolean;
43
44
  };
44
45
  export declare const TaskList: React.NamedExoticComponent<TaskListProps>;
@@ -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,14 +10637,16 @@ const TaskListTableDefaultInner = ({
10637
10637
  );
10638
10638
  };
10639
10639
  const TaskListTable = memo(TaskListTableDefaultInner);
10640
- const taskListRoot = "_taskListRoot_yoz76_1";
10641
- const taskListHorizontalScroll = "_taskListHorizontalScroll_yoz76_19";
10642
- const taskListResizer = "_taskListResizer_yoz76_81";
10643
- const horizontalContainer$1 = "_horizontalContainer_yoz76_145";
10644
- const tableWrapper = "_tableWrapper_yoz76_159";
10645
- const scrollToTop = "_scrollToTop_yoz76_173";
10646
- const scrollToBottom = "_scrollToBottom_yoz76_189";
10647
- const hidden = "_hidden_yoz76_205";
10640
+ const taskListRoot = "_taskListRoot_cyzwo_1";
10641
+ const taskListHorizontalScroll = "_taskListHorizontalScroll_cyzwo_19";
10642
+ const taskListResizer = "_taskListResizer_cyzwo_81";
10643
+ const horizontalContainer$1 = "_horizontalContainer_cyzwo_145";
10644
+ const tableWrapper = "_tableWrapper_cyzwo_159";
10645
+ const scrollToTop = "_scrollToTop_cyzwo_173";
10646
+ const scrollToBottom = "_scrollToBottom_cyzwo_189";
10647
+ const hidden = "_hidden_cyzwo_205";
10648
+ const disabled$1 = "_disabled_cyzwo_213";
10649
+ const disabledOverlay$1 = "_disabledOverlay_cyzwo_221";
10648
10650
  const styles$d = {
10649
10651
  taskListRoot,
10650
10652
  taskListHorizontalScroll,
@@ -10653,7 +10655,9 @@ const styles$d = {
10653
10655
  tableWrapper,
10654
10656
  scrollToTop,
10655
10657
  scrollToBottom,
10656
- hidden
10658
+ hidden,
10659
+ disabled: disabled$1,
10660
+ disabledOverlay: disabledOverlay$1
10657
10661
  };
10658
10662
  const checkHasChildren = (task, childTasksMap) => {
10659
10663
  const { id, comparisonLevel = 1 } = task;
@@ -10702,7 +10706,8 @@ const TaskListInner = ({
10702
10706
  tasks,
10703
10707
  onResizeColumn,
10704
10708
  canReorderTasks,
10705
- tableBottom
10709
+ tableBottom,
10710
+ isLoading = false
10706
10711
  }) => {
10707
10712
  const [
10708
10713
  columns,
@@ -10879,7 +10884,8 @@ const TaskListInner = ({
10879
10884
  {
10880
10885
  className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
10881
10886
  }
10882
- )
10887
+ ),
10888
+ isLoading && /* @__PURE__ */ jsx("div", { className: styles$d.disabledOverlay })
10883
10889
  ] }),
10884
10890
  (tableBottom == null ? void 0 : tableBottom.renderContent) && (tableBottom == null ? void 0 : tableBottom.height) && /* @__PURE__ */ jsx("div", { style: { height: tableBottom.height, width: "100%" }, children: tableBottom.renderContent() })
10885
10891
  ]
@@ -13363,15 +13369,19 @@ const TaskGanttContentInner = (props) => {
13363
13369
  ] });
13364
13370
  };
13365
13371
  const TaskGanttContent = memo(TaskGanttContentInner);
13366
- const ganttVerticalContainer = "_ganttVerticalContainer_1wr55_1";
13367
- const horizontalContainer = "_horizontalContainer_1wr55_73";
13368
- const wrapper = "_wrapper_1wr55_85";
13369
- const calendarDragging = "_calendarDragging_1wr55_109";
13372
+ const ganttVerticalContainer = "_ganttVerticalContainer_15ld3_1";
13373
+ const horizontalContainer = "_horizontalContainer_15ld3_73";
13374
+ const wrapper = "_wrapper_15ld3_85";
13375
+ const calendarDragging = "_calendarDragging_15ld3_109";
13376
+ const disabled = "_disabled_15ld3_117";
13377
+ const disabledOverlay = "_disabledOverlay_15ld3_125";
13370
13378
  const styles$2 = {
13371
13379
  ganttVerticalContainer,
13372
13380
  horizontalContainer,
13373
13381
  wrapper,
13374
- calendarDragging
13382
+ calendarDragging,
13383
+ disabled,
13384
+ disabledOverlay
13375
13385
  };
13376
13386
  const TaskGanttInner = (props) => {
13377
13387
  const {
@@ -13391,7 +13401,8 @@ const TaskGanttInner = (props) => {
13391
13401
  onVerticalScrollbarScrollX,
13392
13402
  verticalGanttContainerRef,
13393
13403
  verticalScrollbarRef,
13394
- onOpenGanttContextMenu
13404
+ onOpenGanttContextMenu,
13405
+ isLoading = false
13395
13406
  } = props;
13396
13407
  const contentRef = React__default.useRef(null);
13397
13408
  const moveStateVertRef = useRef(null);
@@ -13515,41 +13526,44 @@ const TaskGanttInner = (props) => {
13515
13526
  children: /* @__PURE__ */ jsx(Calendar, { scrollRef: verticalGanttContainerRef, ...calendarProps })
13516
13527
  }
13517
13528
  ),
13518
- /* @__PURE__ */ jsx(
13529
+ /* @__PURE__ */ jsxs(
13519
13530
  "div",
13520
13531
  {
13521
13532
  ref: horizontalContainerRef,
13522
13533
  className: styles$2.horizontalContainer,
13523
13534
  style: containerStyle,
13524
- children: /* @__PURE__ */ jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxs(
13525
- "svg",
13526
- {
13527
- xmlns: "http://www.w3.org/2000/svg",
13528
- width: fullSvgWidth,
13529
- height: ganttFullHeight,
13530
- fontFamily: "var(--gantt-font-family)",
13531
- ref: ganttSVGRef,
13532
- onContextMenu: (event) => {
13533
- event.preventDefault();
13534
- if (onOpenGanttContextMenu) {
13535
- onOpenGanttContextMenu(event.clientX, event.clientY);
13536
- }
13537
- },
13538
- children: [
13539
- /* @__PURE__ */ jsx(GanttToday, { ...ganttTodayProps }),
13540
- /* @__PURE__ */ jsx(
13541
- "rect",
13542
- {
13543
- ref: contentRef,
13544
- width: "100%",
13545
- height: "100%",
13546
- fill: "transparent"
13535
+ children: [
13536
+ /* @__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);
13547
13548
  }
13548
- ),
13549
- /* @__PURE__ */ jsx(TaskGanttContent, { ...barProps })
13550
- ]
13551
- }
13552
- ) })
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"
13559
+ }
13560
+ ),
13561
+ /* @__PURE__ */ jsx(TaskGanttContent, { ...barProps })
13562
+ ]
13563
+ }
13564
+ ) }),
13565
+ isLoading && /* @__PURE__ */ jsx("div", { className: styles$2.disabledOverlay })
13566
+ ]
13553
13567
  }
13554
13568
  )
13555
13569
  ]
@@ -18019,7 +18033,7 @@ function MenuOption(props) {
18019
18033
  },
18020
18034
  handleAction,
18021
18035
  option,
18022
- option: { icon: icon2, label: label2, disabled, children }
18036
+ option: { icon: icon2, label: label2, disabled: disabled2, children }
18023
18037
  } = props;
18024
18038
  const [hovered, setHovered] = useState(false);
18025
18039
  const [coords, setCoords] = useState(null);
@@ -18029,7 +18043,7 @@ function MenuOption(props) {
18029
18043
  const onClick = useCallback(
18030
18044
  (e) => {
18031
18045
  e.preventDefault();
18032
- if (disabled) {
18046
+ if (disabled2) {
18033
18047
  return;
18034
18048
  }
18035
18049
  if (children && children.length > 0) {
@@ -18039,7 +18053,7 @@ function MenuOption(props) {
18039
18053
  handleAction(option);
18040
18054
  onClose == null ? void 0 : onClose();
18041
18055
  },
18042
- [onClose, handleAction, option, disabled, children]
18056
+ [onClose, handleAction, option, disabled2, children]
18043
18057
  );
18044
18058
  useEffect(() => {
18045
18059
  if (!hovered || !nestedRef.current)
@@ -18099,8 +18113,8 @@ function MenuOption(props) {
18099
18113
  "button",
18100
18114
  {
18101
18115
  className: styles$1.menuOption,
18102
- "aria-disabled": disabled,
18103
- disabled,
18116
+ "aria-disabled": disabled2,
18117
+ disabled: disabled2,
18104
18118
  style: {
18105
18119
  height: contextMenuOptionHeight,
18106
18120
  paddingLeft: contextMenuSidePadding,
@@ -18117,7 +18131,7 @@ function MenuOption(props) {
18117
18131
  style: {
18118
18132
  width: contextMenuIconWidth,
18119
18133
  color: "var(--gantt-context-menu-text-color)",
18120
- opacity: disabled ? 0.3 : 0.5
18134
+ opacity: disabled2 ? 0.3 : 0.5
18121
18135
  },
18122
18136
  children: icon2
18123
18137
  }
@@ -18984,7 +18998,8 @@ const Gantt = (props) => {
18984
18998
  todayLabel = "Today",
18985
18999
  dataDateLabel = "Data Date",
18986
19000
  showProgress = true,
18987
- progressColor
19001
+ progressColor,
19002
+ isLoading = false
18988
19003
  } = props;
18989
19004
  const ganttSVGRef = useRef(null);
18990
19005
  const wrapperRef = useRef(null);
@@ -20347,7 +20362,8 @@ const Gantt = (props) => {
20347
20362
  taskListContainerRef,
20348
20363
  taskListRef,
20349
20364
  tasks: visibleTasks,
20350
- ganttRef: wrapperRef
20365
+ ganttRef: wrapperRef,
20366
+ isLoading
20351
20367
  }),
20352
20368
  [
20353
20369
  childTasksMap,
@@ -20376,7 +20392,8 @@ const Gantt = (props) => {
20376
20392
  selectedIdsMirror,
20377
20393
  taskList,
20378
20394
  taskListContainerRef,
20379
- visibleTasks
20395
+ visibleTasks,
20396
+ isLoading
20380
20397
  ]
20381
20398
  );
20382
20399
  return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
@@ -20414,7 +20431,8 @@ const Gantt = (props) => {
20414
20431
  verticalGanttContainerRef,
20415
20432
  onOpenGanttContextMenu: (clientX, clientY) => {
20416
20433
  handleOpenGanttContextMenu(null, clientX, clientY);
20417
- }
20434
+ },
20435
+ isLoading
20418
20436
  }
20419
20437
  ),
20420
20438
  tooltipTaskFromMap && /* @__PURE__ */ jsx(