gantt-task-react-v 1.2.0 → 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 (
|
|
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
|
-
}, [
|
|
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
|
|
7530
|
-
const disabledRef = useLatestValue(
|
|
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 (
|
|
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,
|
|
7570
|
+
}, [containers, queue, dragging2, disabled2, measure]);
|
|
7571
7571
|
useEffect(() => {
|
|
7572
7572
|
containersRef.current = containers;
|
|
7573
7573
|
}, [containers]);
|
|
7574
7574
|
useEffect(
|
|
7575
7575
|
() => {
|
|
7576
|
-
if (
|
|
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,
|
|
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 (
|
|
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,
|
|
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 (
|
|
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,
|
|
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 (
|
|
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
|
-
[
|
|
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 !
|
|
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 (
|
|
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,
|
|
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
|
|
8264
|
-
if (
|
|
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":
|
|
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
|
-
}), [
|
|
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:
|
|
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 (
|
|
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 =
|
|
8945
|
+
previous.current.disabled = disabled2;
|
|
8946
8946
|
}
|
|
8947
|
-
}, [id, key2,
|
|
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(
|
|
9339
|
-
if (typeof
|
|
9338
|
+
function normalizeDisabled(disabled2) {
|
|
9339
|
+
if (typeof disabled2 === "boolean") {
|
|
9340
9340
|
return {
|
|
9341
|
-
draggable:
|
|
9342
|
-
droppable:
|
|
9341
|
+
draggable: disabled2,
|
|
9342
|
+
droppable: disabled2
|
|
9343
9343
|
};
|
|
9344
9344
|
}
|
|
9345
|
-
return
|
|
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
|
|
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,
|
|
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 (!
|
|
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
|
-
}, [
|
|
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
|
|
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:
|
|
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:
|
|
9644
|
+
disabled: disabled2.draggable
|
|
9645
9645
|
});
|
|
9646
9646
|
const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
|
|
9647
9647
|
const isSorting = Boolean(active);
|
|
@@ -10637,14 +10637,15 @@ const TaskListTableDefaultInner = ({
|
|
|
10637
10637
|
);
|
|
10638
10638
|
};
|
|
10639
10639
|
const TaskListTable = memo(TaskListTableDefaultInner);
|
|
10640
|
-
const taskListRoot = "
|
|
10641
|
-
const taskListHorizontalScroll = "
|
|
10642
|
-
const taskListResizer = "
|
|
10643
|
-
const horizontalContainer$1 = "
|
|
10644
|
-
const tableWrapper = "
|
|
10645
|
-
const scrollToTop = "
|
|
10646
|
-
const scrollToBottom = "
|
|
10647
|
-
const hidden = "
|
|
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";
|
|
10648
10649
|
const styles$d = {
|
|
10649
10650
|
taskListRoot,
|
|
10650
10651
|
taskListHorizontalScroll,
|
|
@@ -10653,7 +10654,8 @@ const styles$d = {
|
|
|
10653
10654
|
tableWrapper,
|
|
10654
10655
|
scrollToTop,
|
|
10655
10656
|
scrollToBottom,
|
|
10656
|
-
hidden
|
|
10657
|
+
hidden,
|
|
10658
|
+
disabled: disabled$1
|
|
10657
10659
|
};
|
|
10658
10660
|
const checkHasChildren = (task, childTasksMap) => {
|
|
10659
10661
|
const { id, comparisonLevel = 1 } = task;
|
|
@@ -10702,7 +10704,8 @@ const TaskListInner = ({
|
|
|
10702
10704
|
tasks,
|
|
10703
10705
|
onResizeColumn,
|
|
10704
10706
|
canReorderTasks,
|
|
10705
|
-
tableBottom
|
|
10707
|
+
tableBottom,
|
|
10708
|
+
isLoading = false
|
|
10706
10709
|
}) => {
|
|
10707
10710
|
const [
|
|
10708
10711
|
columns,
|
|
@@ -10804,83 +10807,89 @@ const TaskListInner = ({
|
|
|
10804
10807
|
canResizeColumns
|
|
10805
10808
|
}
|
|
10806
10809
|
),
|
|
10807
|
-
/* @__PURE__ */ jsxs(
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
{
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
style: {
|
|
10814
|
-
height: Math.max(
|
|
10815
|
-
ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
|
|
10816
|
-
distances.minimumRowDisplayed * distances.rowHeight
|
|
10817
|
-
),
|
|
10818
|
-
width: taskListWidth
|
|
10819
|
-
},
|
|
10820
|
-
children: /* @__PURE__ */ jsx(
|
|
10810
|
+
/* @__PURE__ */ jsxs(
|
|
10811
|
+
"div",
|
|
10812
|
+
{
|
|
10813
|
+
className: `${styles$d.tableWrapper} ${isLoading ? styles$d.disabled : ""}`,
|
|
10814
|
+
children: [
|
|
10815
|
+
/* @__PURE__ */ jsx(
|
|
10821
10816
|
"div",
|
|
10822
10817
|
{
|
|
10818
|
+
ref: taskListContainerRef,
|
|
10819
|
+
className: styles$d.horizontalContainer,
|
|
10823
10820
|
style: {
|
|
10824
10821
|
height: Math.max(
|
|
10825
|
-
|
|
10822
|
+
ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
|
|
10826
10823
|
distances.minimumRowDisplayed * distances.rowHeight
|
|
10827
10824
|
),
|
|
10828
|
-
|
|
10829
|
-
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
|
|
10825
|
+
width: taskListWidth
|
|
10830
10826
|
},
|
|
10831
10827
|
children: /* @__PURE__ */ jsx(
|
|
10832
|
-
|
|
10828
|
+
"div",
|
|
10833
10829
|
{
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
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
|
+
)
|
|
10865
10874
|
}
|
|
10866
10875
|
)
|
|
10867
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
|
+
}
|
|
10868
10889
|
)
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
"div",
|
|
10873
|
-
{
|
|
10874
|
-
className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
|
|
10875
|
-
}
|
|
10876
|
-
),
|
|
10877
|
-
/* @__PURE__ */ jsx(
|
|
10878
|
-
"div",
|
|
10879
|
-
{
|
|
10880
|
-
className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
|
|
10881
|
-
}
|
|
10882
|
-
)
|
|
10883
|
-
] }),
|
|
10890
|
+
]
|
|
10891
|
+
}
|
|
10892
|
+
),
|
|
10884
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() })
|
|
10885
10894
|
]
|
|
10886
10895
|
}
|
|
@@ -13363,15 +13372,17 @@ const TaskGanttContentInner = (props) => {
|
|
|
13363
13372
|
] });
|
|
13364
13373
|
};
|
|
13365
13374
|
const TaskGanttContent = memo(TaskGanttContentInner);
|
|
13366
|
-
const ganttVerticalContainer = "
|
|
13367
|
-
const horizontalContainer = "
|
|
13368
|
-
const wrapper = "
|
|
13369
|
-
const calendarDragging = "
|
|
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";
|
|
13370
13380
|
const styles$2 = {
|
|
13371
13381
|
ganttVerticalContainer,
|
|
13372
13382
|
horizontalContainer,
|
|
13373
13383
|
wrapper,
|
|
13374
|
-
calendarDragging
|
|
13384
|
+
calendarDragging,
|
|
13385
|
+
disabled
|
|
13375
13386
|
};
|
|
13376
13387
|
const TaskGanttInner = (props) => {
|
|
13377
13388
|
const {
|
|
@@ -13391,7 +13402,8 @@ const TaskGanttInner = (props) => {
|
|
|
13391
13402
|
onVerticalScrollbarScrollX,
|
|
13392
13403
|
verticalGanttContainerRef,
|
|
13393
13404
|
verticalScrollbarRef,
|
|
13394
|
-
onOpenGanttContextMenu
|
|
13405
|
+
onOpenGanttContextMenu,
|
|
13406
|
+
isLoading = false
|
|
13395
13407
|
} = props;
|
|
13396
13408
|
const contentRef = React__default.useRef(null);
|
|
13397
13409
|
const moveStateVertRef = useRef(null);
|
|
@@ -13519,7 +13531,7 @@ const TaskGanttInner = (props) => {
|
|
|
13519
13531
|
"div",
|
|
13520
13532
|
{
|
|
13521
13533
|
ref: horizontalContainerRef,
|
|
13522
|
-
className: styles$2.horizontalContainer
|
|
13534
|
+
className: `${styles$2.horizontalContainer} ${isLoading ? styles$2.disabled : ""}`,
|
|
13523
13535
|
style: containerStyle,
|
|
13524
13536
|
children: /* @__PURE__ */ jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxs(
|
|
13525
13537
|
"svg",
|
|
@@ -18019,7 +18031,7 @@ function MenuOption(props) {
|
|
|
18019
18031
|
},
|
|
18020
18032
|
handleAction,
|
|
18021
18033
|
option,
|
|
18022
|
-
option: { icon: icon2, label: label2, disabled, children }
|
|
18034
|
+
option: { icon: icon2, label: label2, disabled: disabled2, children }
|
|
18023
18035
|
} = props;
|
|
18024
18036
|
const [hovered, setHovered] = useState(false);
|
|
18025
18037
|
const [coords, setCoords] = useState(null);
|
|
@@ -18029,7 +18041,7 @@ function MenuOption(props) {
|
|
|
18029
18041
|
const onClick = useCallback(
|
|
18030
18042
|
(e) => {
|
|
18031
18043
|
e.preventDefault();
|
|
18032
|
-
if (
|
|
18044
|
+
if (disabled2) {
|
|
18033
18045
|
return;
|
|
18034
18046
|
}
|
|
18035
18047
|
if (children && children.length > 0) {
|
|
@@ -18039,7 +18051,7 @@ function MenuOption(props) {
|
|
|
18039
18051
|
handleAction(option);
|
|
18040
18052
|
onClose == null ? void 0 : onClose();
|
|
18041
18053
|
},
|
|
18042
|
-
[onClose, handleAction, option,
|
|
18054
|
+
[onClose, handleAction, option, disabled2, children]
|
|
18043
18055
|
);
|
|
18044
18056
|
useEffect(() => {
|
|
18045
18057
|
if (!hovered || !nestedRef.current)
|
|
@@ -18099,8 +18111,8 @@ function MenuOption(props) {
|
|
|
18099
18111
|
"button",
|
|
18100
18112
|
{
|
|
18101
18113
|
className: styles$1.menuOption,
|
|
18102
|
-
"aria-disabled":
|
|
18103
|
-
disabled,
|
|
18114
|
+
"aria-disabled": disabled2,
|
|
18115
|
+
disabled: disabled2,
|
|
18104
18116
|
style: {
|
|
18105
18117
|
height: contextMenuOptionHeight,
|
|
18106
18118
|
paddingLeft: contextMenuSidePadding,
|
|
@@ -18117,7 +18129,7 @@ function MenuOption(props) {
|
|
|
18117
18129
|
style: {
|
|
18118
18130
|
width: contextMenuIconWidth,
|
|
18119
18131
|
color: "var(--gantt-context-menu-text-color)",
|
|
18120
|
-
opacity:
|
|
18132
|
+
opacity: disabled2 ? 0.3 : 0.5
|
|
18121
18133
|
},
|
|
18122
18134
|
children: icon2
|
|
18123
18135
|
}
|
|
@@ -18984,7 +18996,8 @@ const Gantt = (props) => {
|
|
|
18984
18996
|
todayLabel = "Today",
|
|
18985
18997
|
dataDateLabel = "Data Date",
|
|
18986
18998
|
showProgress = true,
|
|
18987
|
-
progressColor
|
|
18999
|
+
progressColor,
|
|
19000
|
+
isLoading = false
|
|
18988
19001
|
} = props;
|
|
18989
19002
|
const ganttSVGRef = useRef(null);
|
|
18990
19003
|
const wrapperRef = useRef(null);
|
|
@@ -20347,7 +20360,8 @@ const Gantt = (props) => {
|
|
|
20347
20360
|
taskListContainerRef,
|
|
20348
20361
|
taskListRef,
|
|
20349
20362
|
tasks: visibleTasks,
|
|
20350
|
-
ganttRef: wrapperRef
|
|
20363
|
+
ganttRef: wrapperRef,
|
|
20364
|
+
isLoading
|
|
20351
20365
|
}),
|
|
20352
20366
|
[
|
|
20353
20367
|
childTasksMap,
|
|
@@ -20376,7 +20390,8 @@ const Gantt = (props) => {
|
|
|
20376
20390
|
selectedIdsMirror,
|
|
20377
20391
|
taskList,
|
|
20378
20392
|
taskListContainerRef,
|
|
20379
|
-
visibleTasks
|
|
20393
|
+
visibleTasks,
|
|
20394
|
+
isLoading
|
|
20380
20395
|
]
|
|
20381
20396
|
);
|
|
20382
20397
|
return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
|
|
@@ -20414,7 +20429,8 @@ const Gantt = (props) => {
|
|
|
20414
20429
|
verticalGanttContainerRef,
|
|
20415
20430
|
onOpenGanttContextMenu: (clientX, clientY) => {
|
|
20416
20431
|
handleOpenGanttContextMenu(null, clientX, clientY);
|
|
20417
|
-
}
|
|
20432
|
+
},
|
|
20433
|
+
isLoading
|
|
20418
20434
|
}
|
|
20419
20435
|
),
|
|
20420
20436
|
tooltipTaskFromMap && /* @__PURE__ */ jsx(
|