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.
|
@@ -7473,11 +7473,11 @@
|
|
|
7473
7473
|
function useScrollIntent(_ref2) {
|
|
7474
7474
|
let {
|
|
7475
7475
|
delta,
|
|
7476
|
-
disabled
|
|
7476
|
+
disabled: disabled2
|
|
7477
7477
|
} = _ref2;
|
|
7478
7478
|
const previousDelta = usePrevious(delta);
|
|
7479
7479
|
return useLazyMemo((previousIntent) => {
|
|
7480
|
-
if (
|
|
7480
|
+
if (disabled2 || !previousDelta || !previousIntent) {
|
|
7481
7481
|
return defaultScrollIntent;
|
|
7482
7482
|
}
|
|
7483
7483
|
const direction = {
|
|
@@ -7494,7 +7494,7 @@
|
|
|
7494
7494
|
[Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1
|
|
7495
7495
|
}
|
|
7496
7496
|
};
|
|
7497
|
-
}, [
|
|
7497
|
+
}, [disabled2, delta, previousDelta]);
|
|
7498
7498
|
}
|
|
7499
7499
|
function useCachedNode(draggableNodes, id) {
|
|
7500
7500
|
const draggableNode = id !== null ? draggableNodes.get(id) : void 0;
|
|
@@ -7543,8 +7543,8 @@
|
|
|
7543
7543
|
strategy
|
|
7544
7544
|
} = config;
|
|
7545
7545
|
const containersRef = React.useRef(containers);
|
|
7546
|
-
const
|
|
7547
|
-
const disabledRef = useLatestValue(
|
|
7546
|
+
const disabled2 = isDisabled();
|
|
7547
|
+
const disabledRef = useLatestValue(disabled2);
|
|
7548
7548
|
const measureDroppableContainers = React.useCallback(function(ids2) {
|
|
7549
7549
|
if (ids2 === void 0) {
|
|
7550
7550
|
ids2 = [];
|
|
@@ -7561,7 +7561,7 @@
|
|
|
7561
7561
|
}, [disabledRef]);
|
|
7562
7562
|
const timeoutId = React.useRef(null);
|
|
7563
7563
|
const droppableRects = useLazyMemo((previousValue) => {
|
|
7564
|
-
if (
|
|
7564
|
+
if (disabled2 && !dragging2) {
|
|
7565
7565
|
return defaultValue;
|
|
7566
7566
|
}
|
|
7567
7567
|
if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {
|
|
@@ -7584,19 +7584,19 @@
|
|
|
7584
7584
|
return map;
|
|
7585
7585
|
}
|
|
7586
7586
|
return previousValue;
|
|
7587
|
-
}, [containers, queue, dragging2,
|
|
7587
|
+
}, [containers, queue, dragging2, disabled2, measure]);
|
|
7588
7588
|
React.useEffect(() => {
|
|
7589
7589
|
containersRef.current = containers;
|
|
7590
7590
|
}, [containers]);
|
|
7591
7591
|
React.useEffect(
|
|
7592
7592
|
() => {
|
|
7593
|
-
if (
|
|
7593
|
+
if (disabled2) {
|
|
7594
7594
|
return;
|
|
7595
7595
|
}
|
|
7596
7596
|
measureDroppableContainers();
|
|
7597
7597
|
},
|
|
7598
7598
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7599
|
-
[dragging2,
|
|
7599
|
+
[dragging2, disabled2]
|
|
7600
7600
|
);
|
|
7601
7601
|
React.useEffect(
|
|
7602
7602
|
() => {
|
|
@@ -7609,7 +7609,7 @@
|
|
|
7609
7609
|
);
|
|
7610
7610
|
React.useEffect(
|
|
7611
7611
|
() => {
|
|
7612
|
-
if (
|
|
7612
|
+
if (disabled2 || typeof frequency !== "number" || timeoutId.current !== null) {
|
|
7613
7613
|
return;
|
|
7614
7614
|
}
|
|
7615
7615
|
timeoutId.current = setTimeout(() => {
|
|
@@ -7618,7 +7618,7 @@
|
|
|
7618
7618
|
}, frequency);
|
|
7619
7619
|
},
|
|
7620
7620
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7621
|
-
[frequency,
|
|
7621
|
+
[frequency, disabled2, measureDroppableContainers, ...dependencies]
|
|
7622
7622
|
);
|
|
7623
7623
|
return {
|
|
7624
7624
|
droppableRects,
|
|
@@ -7653,18 +7653,18 @@
|
|
|
7653
7653
|
function useMutationObserver(_ref) {
|
|
7654
7654
|
let {
|
|
7655
7655
|
callback,
|
|
7656
|
-
disabled
|
|
7656
|
+
disabled: disabled2
|
|
7657
7657
|
} = _ref;
|
|
7658
7658
|
const handleMutations = useEvent(callback);
|
|
7659
7659
|
const mutationObserver = React.useMemo(() => {
|
|
7660
|
-
if (
|
|
7660
|
+
if (disabled2 || typeof window === "undefined" || typeof window.MutationObserver === "undefined") {
|
|
7661
7661
|
return void 0;
|
|
7662
7662
|
}
|
|
7663
7663
|
const {
|
|
7664
7664
|
MutationObserver
|
|
7665
7665
|
} = window;
|
|
7666
7666
|
return new MutationObserver(handleMutations);
|
|
7667
|
-
}, [handleMutations,
|
|
7667
|
+
}, [handleMutations, disabled2]);
|
|
7668
7668
|
React.useEffect(() => {
|
|
7669
7669
|
return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
7670
7670
|
}, [mutationObserver]);
|
|
@@ -7673,12 +7673,12 @@
|
|
|
7673
7673
|
function useResizeObserver(_ref) {
|
|
7674
7674
|
let {
|
|
7675
7675
|
callback,
|
|
7676
|
-
disabled
|
|
7676
|
+
disabled: disabled2
|
|
7677
7677
|
} = _ref;
|
|
7678
7678
|
const handleResize = useEvent(callback);
|
|
7679
7679
|
const resizeObserver = React.useMemo(
|
|
7680
7680
|
() => {
|
|
7681
|
-
if (
|
|
7681
|
+
if (disabled2 || typeof window === "undefined" || typeof window.ResizeObserver === "undefined") {
|
|
7682
7682
|
return void 0;
|
|
7683
7683
|
}
|
|
7684
7684
|
const {
|
|
@@ -7687,7 +7687,7 @@
|
|
|
7687
7687
|
return new ResizeObserver2(handleResize);
|
|
7688
7688
|
},
|
|
7689
7689
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7690
|
-
[
|
|
7690
|
+
[disabled2]
|
|
7691
7691
|
);
|
|
7692
7692
|
React.useEffect(() => {
|
|
7693
7693
|
return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
@@ -8005,9 +8005,9 @@
|
|
|
8005
8005
|
getEnabled() {
|
|
8006
8006
|
return this.toArray().filter((_ref) => {
|
|
8007
8007
|
let {
|
|
8008
|
-
disabled
|
|
8008
|
+
disabled: disabled2
|
|
8009
8009
|
} = _ref;
|
|
8010
|
-
return !
|
|
8010
|
+
return !disabled2;
|
|
8011
8011
|
});
|
|
8012
8012
|
}
|
|
8013
8013
|
getNodeFor(id) {
|
|
@@ -8137,7 +8137,7 @@
|
|
|
8137
8137
|
const {
|
|
8138
8138
|
id,
|
|
8139
8139
|
key: key2,
|
|
8140
|
-
disabled
|
|
8140
|
+
disabled: disabled2
|
|
8141
8141
|
} = action;
|
|
8142
8142
|
const element = state.droppable.containers.get(id);
|
|
8143
8143
|
if (!element || key2 !== element.key) {
|
|
@@ -8146,7 +8146,7 @@
|
|
|
8146
8146
|
const containers = new DroppableContainersMap(state.droppable.containers);
|
|
8147
8147
|
containers.set(id, {
|
|
8148
8148
|
...element,
|
|
8149
|
-
disabled
|
|
8149
|
+
disabled: disabled2
|
|
8150
8150
|
});
|
|
8151
8151
|
return {
|
|
8152
8152
|
...state,
|
|
@@ -8182,7 +8182,7 @@
|
|
|
8182
8182
|
}
|
|
8183
8183
|
function RestoreFocus(_ref) {
|
|
8184
8184
|
let {
|
|
8185
|
-
disabled
|
|
8185
|
+
disabled: disabled2
|
|
8186
8186
|
} = _ref;
|
|
8187
8187
|
const {
|
|
8188
8188
|
active,
|
|
@@ -8192,7 +8192,7 @@
|
|
|
8192
8192
|
const previousActivatorEvent = usePrevious(activatorEvent);
|
|
8193
8193
|
const previousActiveId = usePrevious(active == null ? void 0 : active.id);
|
|
8194
8194
|
React.useEffect(() => {
|
|
8195
|
-
if (
|
|
8195
|
+
if (disabled2) {
|
|
8196
8196
|
return;
|
|
8197
8197
|
}
|
|
8198
8198
|
if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {
|
|
@@ -8226,7 +8226,7 @@
|
|
|
8226
8226
|
}
|
|
8227
8227
|
});
|
|
8228
8228
|
}
|
|
8229
|
-
}, [activatorEvent,
|
|
8229
|
+
}, [activatorEvent, disabled2, draggableNodes, previousActiveId, previousActivatorEvent]);
|
|
8230
8230
|
return null;
|
|
8231
8231
|
}
|
|
8232
8232
|
function applyModifiers(modifiers, _ref) {
|
|
@@ -8277,8 +8277,8 @@
|
|
|
8277
8277
|
y: config
|
|
8278
8278
|
} : config;
|
|
8279
8279
|
useIsomorphicLayoutEffect(() => {
|
|
8280
|
-
const
|
|
8281
|
-
if (
|
|
8280
|
+
const disabled2 = !x && !y;
|
|
8281
|
+
if (disabled2 || !activeNode) {
|
|
8282
8282
|
initialized.current = false;
|
|
8283
8283
|
return;
|
|
8284
8284
|
}
|
|
@@ -8785,7 +8785,7 @@
|
|
|
8785
8785
|
let {
|
|
8786
8786
|
id,
|
|
8787
8787
|
data,
|
|
8788
|
-
disabled = false,
|
|
8788
|
+
disabled: disabled2 = false,
|
|
8789
8789
|
attributes
|
|
8790
8790
|
} = _ref;
|
|
8791
8791
|
const key2 = useUniqueId(ID_PREFIX$1);
|
|
@@ -8831,18 +8831,18 @@
|
|
|
8831
8831
|
const memoizedAttributes = React.useMemo(() => ({
|
|
8832
8832
|
role,
|
|
8833
8833
|
tabIndex,
|
|
8834
|
-
"aria-disabled":
|
|
8834
|
+
"aria-disabled": disabled2,
|
|
8835
8835
|
"aria-pressed": isDragging && role === defaultRole ? true : void 0,
|
|
8836
8836
|
"aria-roledescription": roleDescription,
|
|
8837
8837
|
"aria-describedby": ariaDescribedById.draggable
|
|
8838
|
-
}), [
|
|
8838
|
+
}), [disabled2, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);
|
|
8839
8839
|
return {
|
|
8840
8840
|
active,
|
|
8841
8841
|
activatorEvent,
|
|
8842
8842
|
activeNodeRect,
|
|
8843
8843
|
attributes: memoizedAttributes,
|
|
8844
8844
|
isDragging,
|
|
8845
|
-
listeners:
|
|
8845
|
+
listeners: disabled2 ? void 0 : listeners,
|
|
8846
8846
|
node,
|
|
8847
8847
|
over,
|
|
8848
8848
|
setNodeRef,
|
|
@@ -8860,7 +8860,7 @@
|
|
|
8860
8860
|
function useDroppable(_ref) {
|
|
8861
8861
|
let {
|
|
8862
8862
|
data,
|
|
8863
|
-
disabled = false,
|
|
8863
|
+
disabled: disabled2 = false,
|
|
8864
8864
|
id,
|
|
8865
8865
|
resizeObserverConfig
|
|
8866
8866
|
} = _ref;
|
|
@@ -8872,7 +8872,7 @@
|
|
|
8872
8872
|
measureDroppableContainers
|
|
8873
8873
|
} = React.useContext(InternalContext);
|
|
8874
8874
|
const previous = React.useRef({
|
|
8875
|
-
disabled
|
|
8875
|
+
disabled: disabled2
|
|
8876
8876
|
});
|
|
8877
8877
|
const resizeObserverConnected = React.useRef(false);
|
|
8878
8878
|
const rect = React.useRef(null);
|
|
@@ -8936,7 +8936,7 @@
|
|
|
8936
8936
|
element: {
|
|
8937
8937
|
id,
|
|
8938
8938
|
key: key2,
|
|
8939
|
-
disabled,
|
|
8939
|
+
disabled: disabled2,
|
|
8940
8940
|
node: nodeRef,
|
|
8941
8941
|
rect,
|
|
8942
8942
|
data: dataRef
|
|
@@ -8952,16 +8952,16 @@
|
|
|
8952
8952
|
[id]
|
|
8953
8953
|
);
|
|
8954
8954
|
React.useEffect(() => {
|
|
8955
|
-
if (
|
|
8955
|
+
if (disabled2 !== previous.current.disabled) {
|
|
8956
8956
|
dispatch({
|
|
8957
8957
|
type: Action.SetDroppableDisabled,
|
|
8958
8958
|
id,
|
|
8959
8959
|
key: key2,
|
|
8960
|
-
disabled
|
|
8960
|
+
disabled: disabled2
|
|
8961
8961
|
});
|
|
8962
|
-
previous.current.disabled =
|
|
8962
|
+
previous.current.disabled = disabled2;
|
|
8963
8963
|
}
|
|
8964
|
-
}, [id, key2,
|
|
8964
|
+
}, [id, key2, disabled2, dispatch]);
|
|
8965
8965
|
return {
|
|
8966
8966
|
active,
|
|
8967
8967
|
rect,
|
|
@@ -9352,14 +9352,14 @@
|
|
|
9352
9352
|
}
|
|
9353
9353
|
return true;
|
|
9354
9354
|
}
|
|
9355
|
-
function normalizeDisabled(
|
|
9356
|
-
if (typeof
|
|
9355
|
+
function normalizeDisabled(disabled2) {
|
|
9356
|
+
if (typeof disabled2 === "boolean") {
|
|
9357
9357
|
return {
|
|
9358
|
-
draggable:
|
|
9359
|
-
droppable:
|
|
9358
|
+
draggable: disabled2,
|
|
9359
|
+
droppable: disabled2
|
|
9360
9360
|
};
|
|
9361
9361
|
}
|
|
9362
|
-
return
|
|
9362
|
+
return disabled2;
|
|
9363
9363
|
}
|
|
9364
9364
|
const rectSortingStrategy = (_ref) => {
|
|
9365
9365
|
let {
|
|
@@ -9481,7 +9481,7 @@
|
|
|
9481
9481
|
const previousItemsRef = React.useRef(items);
|
|
9482
9482
|
const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
|
|
9483
9483
|
const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
|
|
9484
|
-
const
|
|
9484
|
+
const disabled2 = normalizeDisabled(disabledProp);
|
|
9485
9485
|
useIsomorphicLayoutEffect(() => {
|
|
9486
9486
|
if (itemsHaveChanged && isDragging) {
|
|
9487
9487
|
measureDroppableContainers(items);
|
|
@@ -9494,7 +9494,7 @@
|
|
|
9494
9494
|
() => ({
|
|
9495
9495
|
activeIndex,
|
|
9496
9496
|
containerId,
|
|
9497
|
-
disabled,
|
|
9497
|
+
disabled: disabled2,
|
|
9498
9498
|
disableTransforms,
|
|
9499
9499
|
items,
|
|
9500
9500
|
overIndex,
|
|
@@ -9503,7 +9503,7 @@
|
|
|
9503
9503
|
strategy
|
|
9504
9504
|
}),
|
|
9505
9505
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9506
|
-
[activeIndex, containerId,
|
|
9506
|
+
[activeIndex, containerId, disabled2.draggable, disabled2.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]
|
|
9507
9507
|
);
|
|
9508
9508
|
return React.createElement(Context.Provider, {
|
|
9509
9509
|
value: contextValue
|
|
@@ -9556,7 +9556,7 @@
|
|
|
9556
9556
|
};
|
|
9557
9557
|
function useDerivedTransform(_ref) {
|
|
9558
9558
|
let {
|
|
9559
|
-
disabled,
|
|
9559
|
+
disabled: disabled2,
|
|
9560
9560
|
index: index2,
|
|
9561
9561
|
node,
|
|
9562
9562
|
rect
|
|
@@ -9564,7 +9564,7 @@
|
|
|
9564
9564
|
const [derivedTransform, setDerivedtransform] = React.useState(null);
|
|
9565
9565
|
const previousIndex = React.useRef(index2);
|
|
9566
9566
|
useIsomorphicLayoutEffect(() => {
|
|
9567
|
-
if (!
|
|
9567
|
+
if (!disabled2 && index2 !== previousIndex.current && node.current) {
|
|
9568
9568
|
const initial = rect.current;
|
|
9569
9569
|
if (initial) {
|
|
9570
9570
|
const current = getClientRect(node.current, {
|
|
@@ -9584,7 +9584,7 @@
|
|
|
9584
9584
|
if (index2 !== previousIndex.current) {
|
|
9585
9585
|
previousIndex.current = index2;
|
|
9586
9586
|
}
|
|
9587
|
-
}, [
|
|
9587
|
+
}, [disabled2, index2, node, rect]);
|
|
9588
9588
|
React.useEffect(() => {
|
|
9589
9589
|
if (derivedTransform) {
|
|
9590
9590
|
setDerivedtransform(null);
|
|
@@ -9615,7 +9615,7 @@
|
|
|
9615
9615
|
useDragOverlay,
|
|
9616
9616
|
strategy: globalStrategy
|
|
9617
9617
|
} = React.useContext(Context);
|
|
9618
|
-
const
|
|
9618
|
+
const disabled2 = normalizeLocalDisabled(localDisabled, globalDisabled);
|
|
9619
9619
|
const index2 = items.indexOf(id);
|
|
9620
9620
|
const data = React.useMemo(() => ({
|
|
9621
9621
|
sortable: {
|
|
@@ -9634,7 +9634,7 @@
|
|
|
9634
9634
|
} = useDroppable({
|
|
9635
9635
|
id,
|
|
9636
9636
|
data,
|
|
9637
|
-
disabled:
|
|
9637
|
+
disabled: disabled2.droppable,
|
|
9638
9638
|
resizeObserverConfig: {
|
|
9639
9639
|
updateMeasurementsFor: itemsAfterCurrentSortable,
|
|
9640
9640
|
...resizeObserverConfig
|
|
@@ -9658,7 +9658,7 @@
|
|
|
9658
9658
|
...defaultAttributes,
|
|
9659
9659
|
...userDefinedAttributes
|
|
9660
9660
|
},
|
|
9661
|
-
disabled:
|
|
9661
|
+
disabled: disabled2.draggable
|
|
9662
9662
|
});
|
|
9663
9663
|
const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
|
|
9664
9664
|
const isSorting = Boolean(active);
|
|
@@ -10654,14 +10654,15 @@
|
|
|
10654
10654
|
);
|
|
10655
10655
|
};
|
|
10656
10656
|
const TaskListTable = React.memo(TaskListTableDefaultInner);
|
|
10657
|
-
const taskListRoot = "
|
|
10658
|
-
const taskListHorizontalScroll = "
|
|
10659
|
-
const taskListResizer = "
|
|
10660
|
-
const horizontalContainer$1 = "
|
|
10661
|
-
const tableWrapper = "
|
|
10662
|
-
const scrollToTop = "
|
|
10663
|
-
const scrollToBottom = "
|
|
10664
|
-
const hidden = "
|
|
10657
|
+
const taskListRoot = "_taskListRoot_yadug_1";
|
|
10658
|
+
const taskListHorizontalScroll = "_taskListHorizontalScroll_yadug_19";
|
|
10659
|
+
const taskListResizer = "_taskListResizer_yadug_81";
|
|
10660
|
+
const horizontalContainer$1 = "_horizontalContainer_yadug_145";
|
|
10661
|
+
const tableWrapper = "_tableWrapper_yadug_159";
|
|
10662
|
+
const scrollToTop = "_scrollToTop_yadug_173";
|
|
10663
|
+
const scrollToBottom = "_scrollToBottom_yadug_189";
|
|
10664
|
+
const hidden = "_hidden_yadug_205";
|
|
10665
|
+
const disabled$1 = "_disabled_yadug_213";
|
|
10665
10666
|
const styles$d = {
|
|
10666
10667
|
taskListRoot,
|
|
10667
10668
|
taskListHorizontalScroll,
|
|
@@ -10670,7 +10671,8 @@
|
|
|
10670
10671
|
tableWrapper,
|
|
10671
10672
|
scrollToTop,
|
|
10672
10673
|
scrollToBottom,
|
|
10673
|
-
hidden
|
|
10674
|
+
hidden,
|
|
10675
|
+
disabled: disabled$1
|
|
10674
10676
|
};
|
|
10675
10677
|
const checkHasChildren = (task, childTasksMap) => {
|
|
10676
10678
|
const { id, comparisonLevel = 1 } = task;
|
|
@@ -10719,7 +10721,8 @@
|
|
|
10719
10721
|
tasks,
|
|
10720
10722
|
onResizeColumn,
|
|
10721
10723
|
canReorderTasks,
|
|
10722
|
-
tableBottom
|
|
10724
|
+
tableBottom,
|
|
10725
|
+
isLoading = false
|
|
10723
10726
|
}) => {
|
|
10724
10727
|
const [
|
|
10725
10728
|
columns,
|
|
@@ -10821,83 +10824,89 @@
|
|
|
10821
10824
|
canResizeColumns
|
|
10822
10825
|
}
|
|
10823
10826
|
),
|
|
10824
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
{
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
style: {
|
|
10831
|
-
height: Math.max(
|
|
10832
|
-
ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
|
|
10833
|
-
distances.minimumRowDisplayed * distances.rowHeight
|
|
10834
|
-
),
|
|
10835
|
-
width: taskListWidth
|
|
10836
|
-
},
|
|
10837
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10827
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10828
|
+
"div",
|
|
10829
|
+
{
|
|
10830
|
+
className: `${styles$d.tableWrapper} ${isLoading ? styles$d.disabled : ""}`,
|
|
10831
|
+
children: [
|
|
10832
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10838
10833
|
"div",
|
|
10839
10834
|
{
|
|
10835
|
+
ref: taskListContainerRef,
|
|
10836
|
+
className: styles$d.horizontalContainer,
|
|
10840
10837
|
style: {
|
|
10841
10838
|
height: Math.max(
|
|
10842
|
-
|
|
10839
|
+
ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
|
|
10843
10840
|
distances.minimumRowDisplayed * distances.rowHeight
|
|
10844
10841
|
),
|
|
10845
|
-
|
|
10846
|
-
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
|
|
10842
|
+
width: taskListWidth
|
|
10847
10843
|
},
|
|
10848
10844
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10849
|
-
|
|
10845
|
+
"div",
|
|
10850
10846
|
{
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10847
|
+
style: {
|
|
10848
|
+
height: Math.max(
|
|
10849
|
+
ganttFullHeight,
|
|
10850
|
+
distances.minimumRowDisplayed * distances.rowHeight
|
|
10851
|
+
),
|
|
10852
|
+
backgroundSize: `100% ${fullRowHeight * 2}px`,
|
|
10853
|
+
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
|
|
10854
|
+
},
|
|
10855
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10856
|
+
RenderTaskListTable,
|
|
10857
|
+
{
|
|
10858
|
+
ganttRef,
|
|
10859
|
+
getTableRowProps,
|
|
10860
|
+
canMoveTasks: canReorderTasks,
|
|
10861
|
+
allowMoveTask: allowReorderTask,
|
|
10862
|
+
childTasksMap,
|
|
10863
|
+
columns,
|
|
10864
|
+
cutIdsMirror,
|
|
10865
|
+
dateSetup,
|
|
10866
|
+
dependencyMap,
|
|
10867
|
+
distances,
|
|
10868
|
+
fullRowHeight,
|
|
10869
|
+
ganttFullHeight,
|
|
10870
|
+
getTaskCurrentState,
|
|
10871
|
+
handleAddTask,
|
|
10872
|
+
handleDeleteTasks,
|
|
10873
|
+
handleEditTask,
|
|
10874
|
+
handleMoveTaskBefore,
|
|
10875
|
+
handleMoveTaskAfter,
|
|
10876
|
+
handleMoveTasksInside,
|
|
10877
|
+
handleOpenContextMenu,
|
|
10878
|
+
icons,
|
|
10879
|
+
isShowTaskNumbers,
|
|
10880
|
+
mapTaskToNestedIndex,
|
|
10881
|
+
onClick,
|
|
10882
|
+
onExpanderClick,
|
|
10883
|
+
renderedIndexes,
|
|
10884
|
+
scrollToTask,
|
|
10885
|
+
selectTaskOnMouseDown,
|
|
10886
|
+
selectedIdsMirror,
|
|
10887
|
+
taskListWidth,
|
|
10888
|
+
tasks
|
|
10889
|
+
}
|
|
10890
|
+
)
|
|
10882
10891
|
}
|
|
10883
10892
|
)
|
|
10884
10893
|
}
|
|
10894
|
+
),
|
|
10895
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10896
|
+
"div",
|
|
10897
|
+
{
|
|
10898
|
+
className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
|
|
10899
|
+
}
|
|
10900
|
+
),
|
|
10901
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10902
|
+
"div",
|
|
10903
|
+
{
|
|
10904
|
+
className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
|
|
10905
|
+
}
|
|
10885
10906
|
)
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
"div",
|
|
10890
|
-
{
|
|
10891
|
-
className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
|
|
10892
|
-
}
|
|
10893
|
-
),
|
|
10894
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10895
|
-
"div",
|
|
10896
|
-
{
|
|
10897
|
-
className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
|
|
10898
|
-
}
|
|
10899
|
-
)
|
|
10900
|
-
] }),
|
|
10907
|
+
]
|
|
10908
|
+
}
|
|
10909
|
+
),
|
|
10901
10910
|
(tableBottom == null ? void 0 : tableBottom.renderContent) && (tableBottom == null ? void 0 : tableBottom.height) && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: tableBottom.height, width: "100%" }, children: tableBottom.renderContent() })
|
|
10902
10911
|
]
|
|
10903
10912
|
}
|
|
@@ -13380,15 +13389,17 @@
|
|
|
13380
13389
|
] });
|
|
13381
13390
|
};
|
|
13382
13391
|
const TaskGanttContent = React.memo(TaskGanttContentInner);
|
|
13383
|
-
const ganttVerticalContainer = "
|
|
13384
|
-
const horizontalContainer = "
|
|
13385
|
-
const wrapper = "
|
|
13386
|
-
const calendarDragging = "
|
|
13392
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_1czjq_1";
|
|
13393
|
+
const horizontalContainer = "_horizontalContainer_1czjq_73";
|
|
13394
|
+
const wrapper = "_wrapper_1czjq_85";
|
|
13395
|
+
const calendarDragging = "_calendarDragging_1czjq_109";
|
|
13396
|
+
const disabled = "_disabled_1czjq_117";
|
|
13387
13397
|
const styles$2 = {
|
|
13388
13398
|
ganttVerticalContainer,
|
|
13389
13399
|
horizontalContainer,
|
|
13390
13400
|
wrapper,
|
|
13391
|
-
calendarDragging
|
|
13401
|
+
calendarDragging,
|
|
13402
|
+
disabled
|
|
13392
13403
|
};
|
|
13393
13404
|
const TaskGanttInner = (props) => {
|
|
13394
13405
|
const {
|
|
@@ -13408,7 +13419,8 @@
|
|
|
13408
13419
|
onVerticalScrollbarScrollX,
|
|
13409
13420
|
verticalGanttContainerRef,
|
|
13410
13421
|
verticalScrollbarRef,
|
|
13411
|
-
onOpenGanttContextMenu
|
|
13422
|
+
onOpenGanttContextMenu,
|
|
13423
|
+
isLoading = false
|
|
13412
13424
|
} = props;
|
|
13413
13425
|
const contentRef = React.useRef(null);
|
|
13414
13426
|
const moveStateVertRef = React.useRef(null);
|
|
@@ -13536,7 +13548,7 @@
|
|
|
13536
13548
|
"div",
|
|
13537
13549
|
{
|
|
13538
13550
|
ref: horizontalContainerRef,
|
|
13539
|
-
className: styles$2.horizontalContainer
|
|
13551
|
+
className: `${styles$2.horizontalContainer} ${isLoading ? styles$2.disabled : ""}`,
|
|
13540
13552
|
style: containerStyle,
|
|
13541
13553
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13542
13554
|
"svg",
|
|
@@ -18036,7 +18048,7 @@
|
|
|
18036
18048
|
},
|
|
18037
18049
|
handleAction,
|
|
18038
18050
|
option,
|
|
18039
|
-
option: { icon: icon2, label: label2, disabled, children }
|
|
18051
|
+
option: { icon: icon2, label: label2, disabled: disabled2, children }
|
|
18040
18052
|
} = props;
|
|
18041
18053
|
const [hovered, setHovered] = React.useState(false);
|
|
18042
18054
|
const [coords, setCoords] = React.useState(null);
|
|
@@ -18046,7 +18058,7 @@
|
|
|
18046
18058
|
const onClick = React.useCallback(
|
|
18047
18059
|
(e) => {
|
|
18048
18060
|
e.preventDefault();
|
|
18049
|
-
if (
|
|
18061
|
+
if (disabled2) {
|
|
18050
18062
|
return;
|
|
18051
18063
|
}
|
|
18052
18064
|
if (children && children.length > 0) {
|
|
@@ -18056,7 +18068,7 @@
|
|
|
18056
18068
|
handleAction(option);
|
|
18057
18069
|
onClose == null ? void 0 : onClose();
|
|
18058
18070
|
},
|
|
18059
|
-
[onClose, handleAction, option,
|
|
18071
|
+
[onClose, handleAction, option, disabled2, children]
|
|
18060
18072
|
);
|
|
18061
18073
|
React.useEffect(() => {
|
|
18062
18074
|
if (!hovered || !nestedRef.current)
|
|
@@ -18116,8 +18128,8 @@
|
|
|
18116
18128
|
"button",
|
|
18117
18129
|
{
|
|
18118
18130
|
className: styles$1.menuOption,
|
|
18119
|
-
"aria-disabled":
|
|
18120
|
-
disabled,
|
|
18131
|
+
"aria-disabled": disabled2,
|
|
18132
|
+
disabled: disabled2,
|
|
18121
18133
|
style: {
|
|
18122
18134
|
height: contextMenuOptionHeight,
|
|
18123
18135
|
paddingLeft: contextMenuSidePadding,
|
|
@@ -18134,7 +18146,7 @@
|
|
|
18134
18146
|
style: {
|
|
18135
18147
|
width: contextMenuIconWidth,
|
|
18136
18148
|
color: "var(--gantt-context-menu-text-color)",
|
|
18137
|
-
opacity:
|
|
18149
|
+
opacity: disabled2 ? 0.3 : 0.5
|
|
18138
18150
|
},
|
|
18139
18151
|
children: icon2
|
|
18140
18152
|
}
|
|
@@ -19001,7 +19013,8 @@
|
|
|
19001
19013
|
todayLabel = "Today",
|
|
19002
19014
|
dataDateLabel = "Data Date",
|
|
19003
19015
|
showProgress = true,
|
|
19004
|
-
progressColor
|
|
19016
|
+
progressColor,
|
|
19017
|
+
isLoading = false
|
|
19005
19018
|
} = props;
|
|
19006
19019
|
const ganttSVGRef = React.useRef(null);
|
|
19007
19020
|
const wrapperRef = React.useRef(null);
|
|
@@ -20364,7 +20377,8 @@
|
|
|
20364
20377
|
taskListContainerRef,
|
|
20365
20378
|
taskListRef,
|
|
20366
20379
|
tasks: visibleTasks,
|
|
20367
|
-
ganttRef: wrapperRef
|
|
20380
|
+
ganttRef: wrapperRef,
|
|
20381
|
+
isLoading
|
|
20368
20382
|
}),
|
|
20369
20383
|
[
|
|
20370
20384
|
childTasksMap,
|
|
@@ -20393,7 +20407,8 @@
|
|
|
20393
20407
|
selectedIdsMirror,
|
|
20394
20408
|
taskList,
|
|
20395
20409
|
taskListContainerRef,
|
|
20396
|
-
visibleTasks
|
|
20410
|
+
visibleTasks,
|
|
20411
|
+
isLoading
|
|
20397
20412
|
]
|
|
20398
20413
|
);
|
|
20399
20414
|
return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -20431,7 +20446,8 @@
|
|
|
20431
20446
|
verticalGanttContainerRef,
|
|
20432
20447
|
onOpenGanttContextMenu: (clientX, clientY) => {
|
|
20433
20448
|
handleOpenGanttContextMenu(null, clientX, clientY);
|
|
20434
|
-
}
|
|
20449
|
+
},
|
|
20450
|
+
isLoading
|
|
20435
20451
|
}
|
|
20436
20452
|
),
|
|
20437
20453
|
tooltipTaskFromMap && /* @__PURE__ */ jsxRuntime.jsx(
|