@vuu-ui/vuu-context-menu 5.0.0-alpha.4 → 5.0.0-alpha.5
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.
- package/package.json +5 -5
- package/src/index.js +1 -0
- package/src/useHideContextMenu.js +9 -0
- package/types/index.d.ts +1 -0
- package/types/useHideContextMenu.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.0.0-alpha.
|
|
2
|
+
"version": "5.0.0-alpha.5",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"type": "module",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"type-defs": "node ../../scripts/build-type-defs.mjs"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@vuu-ui/vuu-data-types": "5.0.0-alpha.
|
|
13
|
-
"@vuu-ui/vuu-protocol-types": "5.0.0-alpha.
|
|
14
|
-
"@vuu-ui/vuu-table-types": "5.0.0-alpha.
|
|
12
|
+
"@vuu-ui/vuu-data-types": "5.0.0-alpha.5",
|
|
13
|
+
"@vuu-ui/vuu-protocol-types": "5.0.0-alpha.5",
|
|
14
|
+
"@vuu-ui/vuu-table-types": "5.0.0-alpha.5"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vuu-ui/vuu-utils": "5.0.0-alpha.
|
|
17
|
+
"@vuu-ui/vuu-utils": "5.0.0-alpha.5",
|
|
18
18
|
"@salt-ds/core": "1.74.0",
|
|
19
19
|
"@salt-ds/styles": "0.4.2",
|
|
20
20
|
"@salt-ds/window": "0.1.2"
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { ContextMenuProvider } from "./ContextMenuProvider.js";
|
|
2
2
|
export { hasShowNotificationAction, isGroupMenuItemDescriptor, isOpenBulkEditResponse } from "./menu-utils.js";
|
|
3
3
|
export { useContextMenu } from "./useContextMenu.js";
|
|
4
|
+
export { useHideContextMenu } from "./useHideContextMenu.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useCallback, useContext } from "react";
|
|
2
|
+
import { ContextMenuContext } from "./ContextMenuProvider.js";
|
|
3
|
+
const useHideContextMenu = ()=>{
|
|
4
|
+
const ctx = useContext(ContextMenuContext);
|
|
5
|
+
return useCallback(()=>ctx?.showContextMenu(null), [
|
|
6
|
+
ctx
|
|
7
|
+
]);
|
|
8
|
+
};
|
|
9
|
+
export { useHideContextMenu };
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { ContextMenuProvider, type MenuActionHandler, type MenuBuilder, } from "./ContextMenuProvider";
|
|
2
2
|
export { hasShowNotificationAction, isGroupMenuItemDescriptor, isOpenBulkEditResponse, type ContextMenuGroupItemDescriptor, type ContextMenuItemDescriptor, } from "./menu-utils";
|
|
3
3
|
export { useContextMenu } from "./useContextMenu";
|
|
4
|
+
export { useHideContextMenu } from "./useHideContextMenu";
|