pcm-shared-components 0.0.97 → 0.0.100

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.
@@ -220,9 +220,10 @@ export const GenericAppBar = props => {
220
220
  }), menu.displayDivider ? menu_divider : /*#__PURE__*/React.createElement("div", {
221
221
  className: ""
222
222
  })) : /*#__PURE__*/React.createElement("div", {
223
+ className: "h-full my-auto",
223
224
  key: `main_menu_item_${idx}`
224
225
  }, /*#__PURE__*/React.createElement("div", {
225
- className: "flex flex-row",
226
+ className: "flex flex-row h-full m-auto",
226
227
  key: `main_sub_items_${new Date()}`
227
228
  }, /*#__PURE__*/React.createElement(Tooltip, {
228
229
  title: menu.name
@@ -241,18 +242,7 @@ export const GenericAppBar = props => {
241
242
  onClick: () => {
242
243
  menu.onClick();
243
244
  }
244
- }, menu.icon)), menu.displayDivider ? /*#__PURE__*/React.createElement(Divider, {
245
- style: {
246
- marginRight: 24,
247
- marginLeft: 6
248
- },
249
- orientation: "vertical",
250
- flexItem: true
251
- }) : /*#__PURE__*/React.createElement("div", {
252
- style: {
253
- marginRight: 24
254
- }
255
- })))); //? ------------------------------------------------
245
+ }, menu.icon))))); //? ------------------------------------------------
256
246
  //! Mobile menu
257
247
  //? ------------------------------------------------
258
248
 
@@ -282,13 +272,25 @@ export const GenericAppBar = props => {
282
272
  //? ------------------------------------------------
283
273
 
284
274
  const MainItems = () => {
275
+ const menuItems = (appBarMenu.mainMenu || []).filter(mn => !(mn.hideMenu && mn.hideMenu === true));
285
276
  return /*#__PURE__*/React.createElement("div", {
286
277
  className: "flex flex-row"
287
- }, (appBarMenu.mainMenu || []).filter(mn => !(mn.hideMenu && mn.hideMenu === true)).map((menu, idx) => /*#__PURE__*/React.createElement(DesktopItemMenu, {
278
+ }, menuItems.map((menu, idx) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DesktopItemMenu, {
288
279
  key: `desktop_item_menu_${idx}`,
289
280
  menu: menu,
290
281
  idx: idx
291
- })));
282
+ }), idx < menuItems.length - 1 && /*#__PURE__*/React.createElement(React.Fragment, null, menu.displayDivider ? /*#__PURE__*/React.createElement(Divider, {
283
+ style: {
284
+ marginRight: 24,
285
+ marginLeft: 6
286
+ },
287
+ orientation: "vertical",
288
+ flexItem: true
289
+ }) : /*#__PURE__*/React.createElement("div", {
290
+ style: {
291
+ marginRight: 24
292
+ }
293
+ })))));
292
294
  }; // const MainItemMenu = () => (
293
295
  // <div className='flex flex-row'>
294
296
  // <MainItems key='main_item_id' />
@@ -114,7 +114,7 @@ export const GenericDialogWindow = props => {
114
114
  setOverrides();
115
115
  }, [onClickOverride]);
116
116
  useEffect(() => {
117
- if (appBarMenu && appBarMenu.mainMenu) {
117
+ if (appBarMenu && appBarMenu.mainMenu && appBarMenu.mainMenu.length > 0) {
118
118
  setManagedAppBarMenu({ ...appBarMenu,
119
119
  mainMenu: [...appBarMenu.mainMenu.map(mm => {
120
120
  if (mm.id === 'save') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.97",
3
+ "version": "0.0.100",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {