gantt-task-react-v 1.1.5 → 1.1.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement } from "react";
|
|
1
|
+
import type { ReactElement, RefObject } from "react";
|
|
2
2
|
import type { ActionMetaType, ContextMenuOptionType, ContextMenuType, Distances, RenderTask } from "../../types";
|
|
3
3
|
type ContextMenuProps = {
|
|
4
4
|
checkHasCopyTasks: () => boolean;
|
|
@@ -8,6 +8,8 @@ type ContextMenuProps = {
|
|
|
8
8
|
handleAction: (task: RenderTask, action: (meta: ActionMetaType) => void) => void;
|
|
9
9
|
handleCloseContextMenu: () => void;
|
|
10
10
|
options: ContextMenuOptionType[];
|
|
11
|
+
/** Optional boundary element to contain the context menu (like tooltips) */
|
|
12
|
+
boundaryElement?: RefObject<HTMLElement>;
|
|
11
13
|
};
|
|
12
14
|
export declare function ContextMenu(props: ContextMenuProps): ReactElement;
|
|
13
15
|
export {};
|
|
@@ -18054,6 +18054,7 @@ function MenuOption(props) {
|
|
|
18054
18054
|
);
|
|
18055
18055
|
}
|
|
18056
18056
|
function ContextMenu(props) {
|
|
18057
|
+
var _a;
|
|
18057
18058
|
const {
|
|
18058
18059
|
checkHasCopyTasks,
|
|
18059
18060
|
checkHasCutTasks,
|
|
@@ -18104,7 +18105,13 @@ function ContextMenu(props) {
|
|
|
18104
18105
|
},
|
|
18105
18106
|
strategy: "absolute",
|
|
18106
18107
|
placement: "bottom-start",
|
|
18107
|
-
middleware: [
|
|
18108
|
+
middleware: [
|
|
18109
|
+
flip(),
|
|
18110
|
+
shift({
|
|
18111
|
+
boundary: ((_a = props.boundaryElement) == null ? void 0 : _a.current) || void 0,
|
|
18112
|
+
padding: 8
|
|
18113
|
+
})
|
|
18114
|
+
],
|
|
18108
18115
|
whileElementsMounted: autoUpdate
|
|
18109
18116
|
});
|
|
18110
18117
|
const { setFloating, setReference } = refs;
|
|
@@ -20225,7 +20232,8 @@ const Gantt = (props) => {
|
|
|
20225
20232
|
distances,
|
|
20226
20233
|
handleAction,
|
|
20227
20234
|
handleCloseContextMenu,
|
|
20228
|
-
options: contextMenuOptions
|
|
20235
|
+
options: contextMenuOptions,
|
|
20236
|
+
boundaryElement: taskListContainerRef
|
|
20229
20237
|
}
|
|
20230
20238
|
),
|
|
20231
20239
|
ganttContextMenu.task && !waitCommitTasks && /* @__PURE__ */ jsx(
|
|
@@ -20237,7 +20245,8 @@ const Gantt = (props) => {
|
|
|
20237
20245
|
distances,
|
|
20238
20246
|
handleAction,
|
|
20239
20247
|
handleCloseContextMenu: handleCloseGanttContextMenu,
|
|
20240
|
-
options: ganttContextMenuOptions
|
|
20248
|
+
options: ganttContextMenuOptions,
|
|
20249
|
+
boundaryElement: verticalGanttContainerRef
|
|
20241
20250
|
}
|
|
20242
20251
|
),
|
|
20243
20252
|
/* @__PURE__ */ jsx(GanttLoader, { loading: waitCommitTasks })
|
|
@@ -18071,6 +18071,7 @@
|
|
|
18071
18071
|
);
|
|
18072
18072
|
}
|
|
18073
18073
|
function ContextMenu(props) {
|
|
18074
|
+
var _a;
|
|
18074
18075
|
const {
|
|
18075
18076
|
checkHasCopyTasks,
|
|
18076
18077
|
checkHasCutTasks,
|
|
@@ -18121,7 +18122,13 @@
|
|
|
18121
18122
|
},
|
|
18122
18123
|
strategy: "absolute",
|
|
18123
18124
|
placement: "bottom-start",
|
|
18124
|
-
middleware: [
|
|
18125
|
+
middleware: [
|
|
18126
|
+
flip(),
|
|
18127
|
+
shift({
|
|
18128
|
+
boundary: ((_a = props.boundaryElement) == null ? void 0 : _a.current) || void 0,
|
|
18129
|
+
padding: 8
|
|
18130
|
+
})
|
|
18131
|
+
],
|
|
18125
18132
|
whileElementsMounted: autoUpdate
|
|
18126
18133
|
});
|
|
18127
18134
|
const { setFloating, setReference } = refs;
|
|
@@ -20242,7 +20249,8 @@
|
|
|
20242
20249
|
distances,
|
|
20243
20250
|
handleAction,
|
|
20244
20251
|
handleCloseContextMenu,
|
|
20245
|
-
options: contextMenuOptions
|
|
20252
|
+
options: contextMenuOptions,
|
|
20253
|
+
boundaryElement: taskListContainerRef
|
|
20246
20254
|
}
|
|
20247
20255
|
),
|
|
20248
20256
|
ganttContextMenu.task && !waitCommitTasks && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20254,7 +20262,8 @@
|
|
|
20254
20262
|
distances,
|
|
20255
20263
|
handleAction,
|
|
20256
20264
|
handleCloseContextMenu: handleCloseGanttContextMenu,
|
|
20257
|
-
options: ganttContextMenuOptions
|
|
20265
|
+
options: ganttContextMenuOptions,
|
|
20266
|
+
boundaryElement: verticalGanttContainerRef
|
|
20258
20267
|
}
|
|
20259
20268
|
),
|
|
20260
20269
|
/* @__PURE__ */ jsxRuntime.jsx(GanttLoader, { loading: waitCommitTasks })
|
package/package.json
CHANGED