gantt-task-react-v 1.0.43 → 1.0.45
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.
|
@@ -4620,7 +4620,7 @@ const Tooltip = ({
|
|
|
4620
4620
|
left: tooltipX ?? 0,
|
|
4621
4621
|
width: "max-content",
|
|
4622
4622
|
fontFamily: "var(--gantt-font-family)",
|
|
4623
|
-
zIndex:
|
|
4623
|
+
zIndex: 9999
|
|
4624
4624
|
},
|
|
4625
4625
|
...getFloatingProps(),
|
|
4626
4626
|
children: /* @__PURE__ */ jsx(TooltipContent, { task })
|
|
@@ -17050,7 +17050,7 @@ function useRole(context, props) {
|
|
|
17050
17050
|
};
|
|
17051
17051
|
}, [enabled, role, ariaRole, open, floatingId, referenceId, isNested]);
|
|
17052
17052
|
}
|
|
17053
|
-
const useTaskTooltip = (changeInProgress) => {
|
|
17053
|
+
const useTaskTooltip = (changeInProgress, boundaryElement) => {
|
|
17054
17054
|
const [hoverTooltipTask, setHoverTooltipTask] = useState(null);
|
|
17055
17055
|
const [hoverTooltipEl, setHoverTooltipEl] = useState(null);
|
|
17056
17056
|
const tooltipTask = useMemo(() => {
|
|
@@ -17073,11 +17073,13 @@ const useTaskTooltip = (changeInProgress) => {
|
|
|
17073
17073
|
context
|
|
17074
17074
|
} = useFloating({
|
|
17075
17075
|
open: Boolean(tooltipTask),
|
|
17076
|
-
placement: "right",
|
|
17077
17076
|
middleware: [
|
|
17078
17077
|
offset(10),
|
|
17079
|
-
flip(
|
|
17080
|
-
shift(
|
|
17078
|
+
flip(),
|
|
17079
|
+
shift({
|
|
17080
|
+
boundary: (boundaryElement == null ? void 0 : boundaryElement.current) || void 0,
|
|
17081
|
+
padding: 8
|
|
17082
|
+
})
|
|
17081
17083
|
],
|
|
17082
17084
|
whileElementsMounted: autoUpdate,
|
|
17083
17085
|
strategy: "absolute"
|
|
@@ -19261,7 +19263,7 @@ const Gantt = (props) => {
|
|
|
19261
19263
|
setFloatingRef,
|
|
19262
19264
|
getFloatingProps,
|
|
19263
19265
|
onChangeTooltipTask
|
|
19264
|
-
} = useTaskTooltip(changeInProgress);
|
|
19266
|
+
} = useTaskTooltip(changeInProgress, verticalGanttContainerRef);
|
|
19265
19267
|
const handleDeleteTasks = useCallback(
|
|
19266
19268
|
(tasksForDelete) => {
|
|
19267
19269
|
onChangeTooltipTask(null, null);
|
|
@@ -4637,7 +4637,7 @@
|
|
|
4637
4637
|
left: tooltipX ?? 0,
|
|
4638
4638
|
width: "max-content",
|
|
4639
4639
|
fontFamily: "var(--gantt-font-family)",
|
|
4640
|
-
zIndex:
|
|
4640
|
+
zIndex: 9999
|
|
4641
4641
|
},
|
|
4642
4642
|
...getFloatingProps(),
|
|
4643
4643
|
children: /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { task })
|
|
@@ -17067,7 +17067,7 @@
|
|
|
17067
17067
|
};
|
|
17068
17068
|
}, [enabled, role, ariaRole, open, floatingId, referenceId, isNested]);
|
|
17069
17069
|
}
|
|
17070
|
-
const useTaskTooltip = (changeInProgress) => {
|
|
17070
|
+
const useTaskTooltip = (changeInProgress, boundaryElement) => {
|
|
17071
17071
|
const [hoverTooltipTask, setHoverTooltipTask] = React.useState(null);
|
|
17072
17072
|
const [hoverTooltipEl, setHoverTooltipEl] = React.useState(null);
|
|
17073
17073
|
const tooltipTask = React.useMemo(() => {
|
|
@@ -17090,11 +17090,13 @@
|
|
|
17090
17090
|
context
|
|
17091
17091
|
} = useFloating({
|
|
17092
17092
|
open: Boolean(tooltipTask),
|
|
17093
|
-
placement: "right",
|
|
17094
17093
|
middleware: [
|
|
17095
17094
|
offset(10),
|
|
17096
|
-
flip(
|
|
17097
|
-
shift(
|
|
17095
|
+
flip(),
|
|
17096
|
+
shift({
|
|
17097
|
+
boundary: (boundaryElement == null ? void 0 : boundaryElement.current) || void 0,
|
|
17098
|
+
padding: 8
|
|
17099
|
+
})
|
|
17098
17100
|
],
|
|
17099
17101
|
whileElementsMounted: autoUpdate,
|
|
17100
17102
|
strategy: "absolute"
|
|
@@ -19278,7 +19280,7 @@
|
|
|
19278
19280
|
setFloatingRef,
|
|
19279
19281
|
getFloatingProps,
|
|
19280
19282
|
onChangeTooltipTask
|
|
19281
|
-
} = useTaskTooltip(changeInProgress);
|
|
19283
|
+
} = useTaskTooltip(changeInProgress, verticalGanttContainerRef);
|
|
19282
19284
|
const handleDeleteTasks = React.useCallback(
|
|
19283
19285
|
(tasksForDelete) => {
|
|
19284
19286
|
onChangeTooltipTask(null, null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { RefObject } from "react";
|
|
2
2
|
import type { ChangeInProgress, Task } from "../types";
|
|
3
|
-
export declare const useTaskTooltip: (changeInProgress: ChangeInProgress | null) => {
|
|
3
|
+
export declare const useTaskTooltip: (changeInProgress: ChangeInProgress | null, boundaryElement?: RefObject<HTMLElement>) => {
|
|
4
4
|
tooltipTask: Task;
|
|
5
5
|
tooltipX: number;
|
|
6
6
|
tooltipY: number;
|
package/package.json
CHANGED