pcm-shared-components 0.0.93 → 0.0.96

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.
@@ -9,7 +9,8 @@ import Switch from "@mui/material/Switch";
9
9
  const GenericSubMenu = ({
10
10
  menu,
11
11
  full_menu = true,
12
- handleParentMenuClose = undefined
12
+ handleParentMenuClose = undefined,
13
+ onClose
13
14
  }) => {
14
15
  const [anchorSubMenu, setAnchorSubMenu] = useState(false);
15
16
  const [isSubMenuOpen, setSubMenuOpen] = useState(false);
@@ -61,8 +62,9 @@ const GenericSubMenu = ({
61
62
 
62
63
  if (handleParentMenuClose) {
63
64
  handleParentMenuClose();
64
- } // handleMobileMenuClose();
65
+ }
65
66
 
67
+ onClose();
66
68
  };
67
69
 
68
70
  useEffect(() => {
@@ -1,5 +1,6 @@
1
1
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
+ import React from 'react';
3
4
  import withStyles from "@mui/styles/withStyles";
4
5
  import Menu from "@mui/material/Menu";
5
6
  import MenuItem from "@mui/material/MenuItem";
@@ -48,7 +49,7 @@ const ReusableMenu = props => {
48
49
  keepMounted: keepMounted,
49
50
  open: Boolean(menuAnchor),
50
51
  onClose: handleClose
51
- }, menuData.map((menu, idx) => /*#__PURE__*/React.createElement("div", {
52
+ }, menuData.filter(mn => !(mn.hideMenu && mn.hideMenu === true)).map((menu, idx) => /*#__PURE__*/React.createElement("div", {
52
53
  key: `ReusableMenu_${idx}`
53
54
  }, menu.name && /*#__PURE__*/React.createElement(React.Fragment, null, menu.subMenu ? /*#__PURE__*/React.createElement("div", {
54
55
  className: "flex flex-row",
@@ -57,7 +58,8 @@ const ReusableMenu = props => {
57
58
  key: `common_grid_app_bar_sub_desktop_${idx}`,
58
59
  menu: menu,
59
60
  full_menu: true,
60
- classes: classes
61
+ classes: classes,
62
+ onClose: handleClose
61
63
  })) : /*#__PURE__*/React.createElement(StyledMenuItem, {
62
64
  onClick: menu.onClick,
63
65
  key: `reusable_menu_item_${idx}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.93",
3
+ "version": "0.0.96",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {