@pdg/react-admin-layout 1.0.51 → 1.0.52

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/dist/index.esm.js CHANGED
@@ -93,8 +93,9 @@ function _unsupportedIterableToArray(r, a) {
93
93
  }
94
94
  }var _templateObject$4, _templateObject2$2;
95
95
  var StyledExpandMore = styled(ExpandMore)(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n margin-top: auto;\n margin-bottom: auto;\n @keyframes open {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(180deg);\n }\n }\n @keyframes close {\n 0% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n"])));
96
- var StyledListItemIcon = styled(ListItemIcon)(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n min-width: 30px;\n"])));var useChanged = function useChanged(value, callback) {
97
- var _React$useState = React.useState(value),
96
+ var StyledListItemIcon = styled(ListItemIcon)(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n min-width: 30px;\n"])));var useChange = function useChange(value, callback, t0) {
97
+ var skipFirst = t0 === undefined ? false : t0;
98
+ var _React$useState = React.useState(skipFirst ? false : "|||||skip|||||first|||||"),
98
99
  _React$useState2 = _slicedToArray(_React$useState, 2),
99
100
  _value = _React$useState2[0],
100
101
  _setValue = _React$useState2[1];
@@ -133,7 +134,7 @@ var StyledListItemIcon = styled(ListItemIcon)(_templateObject2$2 || (_templateOb
133
134
  } else {
134
135
  t1 = $[2];
135
136
  }
136
- useChanged(info, t1);
137
+ useChange(info, t1);
137
138
  var t2;
138
139
  if ($[3] !== info.items || $[4] !== info.uri || $[5] !== isExpand || $[6] !== isExpandable || $[7] !== location.pathname) {
139
140
  t2 = function t2() {
@@ -165,7 +166,7 @@ var StyledListItemIcon = styled(ListItemIcon)(_templateObject2$2 || (_templateOb
165
166
  } else {
166
167
  t2 = $[8];
167
168
  }
168
- useChanged(location.pathname, t2);
169
+ useChange(location.pathname, t2);
169
170
  var t3;
170
171
  if ($[9] !== badgeVariant || $[10] !== expandedBackgroundColor || $[11] !== info.badge || $[12] !== info.badgeVariant || $[13] !== info.depth || $[14] !== info.icon || $[15] !== info.items || $[16] !== info.name || $[17] !== info.uri || $[18] !== isExpand || $[19] !== isExpandable || $[20] !== location.pathname || $[21] !== navigate) {
171
172
  var t4;
@@ -361,7 +362,7 @@ var StyledList = styled(List)(_templateObject$3 || (_templateObject$3 = _taggedT
361
362
  var theme = useTheme();
362
363
  var t1;
363
364
  if ($[0] !== badgeVariant || $[1] !== list || $[2] !== theme.palette.action.selectedOpacity || $[3] !== theme.palette.primary.main) {
364
- var finalList = list.map(_temp2);
365
+ var finalList = list.map(_temp2$1);
365
366
  var expandedBackgroundColor = alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity / 2);
366
367
  t1 = /*#__PURE__*/React.createElement(StyledList, null, finalList.map(function (info, idx_0) {
367
368
  return /*#__PURE__*/React.createElement(_SideMenuListItem, {
@@ -385,7 +386,7 @@ var SideMenuList = /*#__PURE__*/React.memo(SideMenuList$1);
385
386
  function _temp$1(letter, idx) {
386
387
  return "".concat(idx > 0 ? "_" : "").concat(letter.toLowerCase());
387
388
  }
388
- function _temp2(item) {
389
+ function _temp2$1(item) {
389
390
  return Object.assign(Object.assign({}, item), {
390
391
  icon: item.icon ? item.icon.replace(/[A-Z]/g, _temp$1) : undefined
391
392
  });
@@ -451,7 +452,7 @@ var _getNextScreen = function _getNextScreen(screen) {
451
452
  if (screen === 'xs') return 'sm';else if (screen === 'sm') return 'md';else if (screen === 'md') return 'lg';else return 'xl';
452
453
  };
453
454
  var DefaultLayout = function DefaultLayout(t0) {
454
- var $ = c(95);
455
+ var $ = c(96);
455
456
  var children = t0.children,
456
457
  logo = t0.logo,
457
458
  badgeVariant = t0.badgeVariant,
@@ -460,75 +461,56 @@ var DefaultLayout = function DefaultLayout(t0) {
460
461
  appBarControl = t0.appBarControl;
461
462
  var menuHideScreen = t1 === undefined ? "sm" : t1;
462
463
  var location = useLocation();
464
+ var getMenuTitles = _temp;
463
465
  var _useState = useState(false),
464
466
  _useState2 = _slicedToArray(_useState, 2),
465
467
  isMobileOpen = _useState2[0],
466
468
  setIsMobileOpen = _useState2[1];
467
469
  var t2;
468
- if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
469
- t2 = {};
470
- $[0] = t2;
470
+ if ($[0] !== menu) {
471
+ t2 = getMenuTitles(menu);
472
+ $[0] = menu;
473
+ $[1] = t2;
471
474
  } else {
472
- t2 = $[0];
475
+ t2 = $[1];
473
476
  }
474
477
  var _useState3 = useState(t2),
475
478
  _useState4 = _slicedToArray(_useState3, 2),
476
- menuTitles = _useState4[0],
479
+ menuTitles_0 = _useState4[0],
477
480
  setMenuTitles = _useState4[1];
478
481
  var t3;
479
- if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
482
+ if ($[2] === Symbol["for"]("react.memo_cache_sentinel")) {
480
483
  t3 = function t3() {
481
- setIsMobileOpen(false);
484
+ return setIsMobileOpen(false);
482
485
  };
483
- $[1] = t3;
486
+ $[2] = t3;
484
487
  } else {
485
- t3 = $[1];
488
+ t3 = $[2];
486
489
  }
487
- useChanged(location.pathname, t3);
490
+ useChange(location.pathname, t3, true);
488
491
  var t4;
489
- if ($[2] !== menu) {
492
+ if ($[3] !== menu) {
490
493
  t4 = function t4() {
491
- var menuTitles_0 = {};
492
- if (menu) {
493
- menu.forEach(function (info) {
494
- if ((info.uri == null || info.uri === "") && info.items && info.items.length > 0) {
495
- info.items.map(function (subInfo) {
496
- menuTitles_0[subInfo.uri] = {
497
- name: subInfo.name,
498
- parentName: info.name,
499
- parentIcon: info.icon
500
- };
501
- });
502
- } else {
503
- if (info.uri) {
504
- menuTitles_0[info.uri] = {
505
- name: info.name,
506
- icon: info.icon
507
- };
508
- }
509
- }
510
- });
511
- }
512
- setMenuTitles(menuTitles_0);
494
+ return setMenuTitles(getMenuTitles(menu));
513
495
  };
514
- $[2] = menu;
515
- $[3] = t4;
496
+ $[3] = menu;
497
+ $[4] = t4;
516
498
  } else {
517
- t4 = $[3];
499
+ t4 = $[4];
518
500
  }
519
- useChanged(menu, t4);
501
+ useChange(menu, t4, true);
520
502
  var t5;
521
- if ($[4] === Symbol["for"]("react.memo_cache_sentinel")) {
503
+ if ($[5] === Symbol["for"]("react.memo_cache_sentinel")) {
522
504
  t5 = function t5() {
523
- setIsMobileOpen(_temp);
505
+ setIsMobileOpen(_temp2);
524
506
  };
525
- $[4] = t5;
507
+ $[5] = t5;
526
508
  } else {
527
- t5 = $[4];
509
+ t5 = $[5];
528
510
  }
529
511
  var toggleIsMobileOpen = t5;
530
512
  var t6;
531
- if ($[5] !== menuHideScreen) {
513
+ if ($[6] !== menuHideScreen) {
532
514
  t6 = SCREENS.reduce(function (acc, screen) {
533
515
  if (screen === menuHideScreen) {
534
516
  acc.found = true;
@@ -541,24 +523,24 @@ var DefaultLayout = function DefaultLayout(t0) {
541
523
  found: false,
542
524
  display: {}
543
525
  });
544
- $[5] = menuHideScreen;
545
- $[6] = t6;
526
+ $[6] = menuHideScreen;
527
+ $[7] = t6;
546
528
  } else {
547
- t6 = $[6];
529
+ t6 = $[7];
548
530
  }
549
531
  var t7;
550
- if ($[7] !== t6.display) {
532
+ if ($[8] !== t6.display) {
551
533
  t7 = {
552
534
  display: t6.display
553
535
  };
554
- $[7] = t6.display;
555
- $[8] = t7;
536
+ $[8] = t6.display;
537
+ $[9] = t7;
556
538
  } else {
557
- t7 = $[8];
539
+ t7 = $[9];
558
540
  }
559
541
  var sideMenuTemporaryDrawerSx = t7;
560
542
  var t8;
561
- if ($[9] !== menuHideScreen) {
543
+ if ($[10] !== menuHideScreen) {
562
544
  t8 = SCREENS.reduce(function (acc_0, screen_0) {
563
545
  if (screen_0 === menuHideScreen) {
564
546
  acc_0.found = true;
@@ -571,61 +553,61 @@ var DefaultLayout = function DefaultLayout(t0) {
571
553
  found: false,
572
554
  display: {}
573
555
  });
574
- $[9] = menuHideScreen;
575
- $[10] = t8;
556
+ $[10] = menuHideScreen;
557
+ $[11] = t8;
576
558
  } else {
577
- t8 = $[10];
559
+ t8 = $[11];
578
560
  }
579
561
  var t9;
580
- if ($[11] !== t8.display) {
562
+ if ($[12] !== t8.display) {
581
563
  t9 = {
582
564
  display: t8.display
583
565
  };
584
- $[11] = t8.display;
585
- $[12] = t9;
566
+ $[12] = t8.display;
567
+ $[13] = t9;
586
568
  } else {
587
- t9 = $[12];
569
+ t9 = $[13];
588
570
  }
589
571
  var sideMenuPermanentDrawerSx = t9;
590
572
  var nextMenuScreen = _getNextScreen(menuHideScreen);
591
573
  var t10;
592
- if ($[13] !== nextMenuScreen) {
574
+ if ($[14] !== nextMenuScreen) {
593
575
  t10 = {
594
576
  width: _defineProperty({}, nextMenuScreen, "calc(100% - ".concat(SIDE_MENU_WIDTH, "px)")),
595
577
  ml: _defineProperty({}, nextMenuScreen, "".concat(SIDE_MENU_WIDTH, "px"))
596
578
  };
597
- $[13] = nextMenuScreen;
598
- $[14] = t10;
579
+ $[14] = nextMenuScreen;
580
+ $[15] = t10;
599
581
  } else {
600
- t10 = $[14];
582
+ t10 = $[15];
601
583
  }
602
584
  var appBarSx = t10;
603
585
  var t11;
604
- if ($[15] !== nextMenuScreen) {
586
+ if ($[16] !== nextMenuScreen) {
605
587
  t11 = {
606
588
  mr: 2,
607
589
  display: _defineProperty({}, nextMenuScreen, "none")
608
590
  };
609
- $[15] = nextMenuScreen;
610
- $[16] = t11;
591
+ $[16] = nextMenuScreen;
592
+ $[17] = t11;
611
593
  } else {
612
- t11 = $[16];
594
+ t11 = $[17];
613
595
  }
614
596
  var appBarIconButtonSx = t11;
615
597
  var t12;
616
- if ($[17] !== nextMenuScreen) {
598
+ if ($[18] !== nextMenuScreen) {
617
599
  t12 = {
618
600
  width: _defineProperty({}, nextMenuScreen, SIDE_MENU_WIDTH),
619
601
  flexShrink: _defineProperty({}, nextMenuScreen, 0)
620
602
  };
621
- $[17] = nextMenuScreen;
622
- $[18] = t12;
603
+ $[18] = nextMenuScreen;
604
+ $[19] = t12;
623
605
  } else {
624
- t12 = $[18];
606
+ t12 = $[19];
625
607
  }
626
608
  var sideMenuContainerBoxSx = t12;
627
609
  var t13;
628
- if ($[19] !== nextMenuScreen) {
610
+ if ($[20] !== nextMenuScreen) {
629
611
  t13 = {
630
612
  width: _defineProperty({}, nextMenuScreen, "calc(100% - ".concat(SIDE_MENU_WIDTH, "px)")),
631
613
  flexGrow: 1,
@@ -634,39 +616,39 @@ var DefaultLayout = function DefaultLayout(t0) {
634
616
  flexDirection: "column",
635
617
  minHeight: "100vh"
636
618
  };
637
- $[19] = nextMenuScreen;
638
- $[20] = t13;
619
+ $[20] = nextMenuScreen;
620
+ $[21] = t13;
639
621
  } else {
640
- t13 = $[20];
622
+ t13 = $[21];
641
623
  }
642
624
  var mainBoxSx = t13;
643
- var titleData = menuTitles[location.pathname];
625
+ var titleData = menuTitles_0[location.pathname];
644
626
  var t14;
645
- if ($[21] !== appBarControl || $[22] !== appBarIconButtonSx || $[23] !== appBarSx || $[24] !== badgeVariant || $[25] !== children || $[26] !== isMobileOpen || $[27] !== logo || $[28] !== mainBoxSx || $[29] !== menu || $[30] !== sideMenuContainerBoxSx || $[31] !== sideMenuPermanentDrawerSx || $[32] !== sideMenuTemporaryDrawerSx || $[33] !== titleData) {
627
+ if ($[22] !== appBarControl || $[23] !== appBarIconButtonSx || $[24] !== appBarSx || $[25] !== badgeVariant || $[26] !== children || $[27] !== isMobileOpen || $[28] !== logo || $[29] !== mainBoxSx || $[30] !== menu || $[31] !== sideMenuContainerBoxSx || $[32] !== sideMenuPermanentDrawerSx || $[33] !== sideMenuTemporaryDrawerSx || $[34] !== titleData) {
646
628
  var t15;
647
- if ($[35] !== appBarControl || $[36] !== appBarIconButtonSx || $[37] !== appBarSx || $[38] !== titleData) {
629
+ if ($[36] !== appBarControl || $[37] !== appBarIconButtonSx || $[38] !== appBarSx || $[39] !== titleData) {
648
630
  var _t;
649
- if ($[40] !== appBarSx) {
631
+ if ($[41] !== appBarSx) {
650
632
  _t = {
651
633
  position: "fixed",
652
634
  elevation: 0,
653
635
  sx: appBarSx
654
636
  };
655
- $[40] = appBarSx;
656
- $[41] = _t;
637
+ $[41] = appBarSx;
638
+ $[42] = _t;
657
639
  } else {
658
- _t = $[41];
640
+ _t = $[42];
659
641
  }
660
642
  var _t2;
661
- if ($[42] !== appBarControl || $[43] !== appBarIconButtonSx || $[44] !== titleData) {
643
+ if ($[43] !== appBarControl || $[44] !== appBarIconButtonSx || $[45] !== titleData) {
662
644
  var t18;
663
- if ($[46] !== appBarIconButtonSx) {
645
+ if ($[47] !== appBarIconButtonSx) {
664
646
  var _t3;
665
- if ($[48] === Symbol["for"]("react.memo_cache_sentinel")) {
647
+ if ($[49] === Symbol["for"]("react.memo_cache_sentinel")) {
666
648
  _t3 = /*#__PURE__*/React.createElement(Menu, null);
667
- $[48] = _t3;
649
+ $[49] = _t3;
668
650
  } else {
669
- _t3 = $[48];
651
+ _t3 = $[49];
670
652
  }
671
653
  t18 = /*#__PURE__*/React.createElement(IconButton, {
672
654
  color: "inherit",
@@ -675,15 +657,15 @@ var DefaultLayout = function DefaultLayout(t0) {
675
657
  onClick: toggleIsMobileOpen,
676
658
  sx: appBarIconButtonSx
677
659
  }, _t3);
678
- $[46] = appBarIconButtonSx;
679
- $[47] = t18;
660
+ $[47] = appBarIconButtonSx;
661
+ $[48] = t18;
680
662
  } else {
681
- t18 = $[47];
663
+ t18 = $[48];
682
664
  }
683
665
  var t19;
684
- if ($[49] !== titleData) {
666
+ if ($[50] !== titleData) {
685
667
  var t20;
686
- if ($[51] === Symbol["for"]("react.memo_cache_sentinel")) {
668
+ if ($[52] === Symbol["for"]("react.memo_cache_sentinel")) {
687
669
  t20 = {
688
670
  variant: "h6",
689
671
  noWrap: true,
@@ -692,9 +674,9 @@ var DefaultLayout = function DefaultLayout(t0) {
692
674
  flexGrow: 1
693
675
  }
694
676
  };
695
- $[51] = t20;
677
+ $[52] = t20;
696
678
  } else {
697
- t20 = $[51];
679
+ t20 = $[52];
698
680
  }
699
681
  t19 = /*#__PURE__*/React.createElement(Typography, t20, titleData && /*#__PURE__*/React.createElement(Title, {
700
682
  title: titleData.name,
@@ -702,55 +684,55 @@ var DefaultLayout = function DefaultLayout(t0) {
702
684
  headTitle: titleData.parentName,
703
685
  headIcon: titleData.parentIcon
704
686
  }));
705
- $[49] = titleData;
706
- $[50] = t19;
687
+ $[50] = titleData;
688
+ $[51] = t19;
707
689
  } else {
708
- t19 = $[50];
690
+ t19 = $[51];
709
691
  }
710
692
  _t2 = /*#__PURE__*/React.createElement(Toolbar, null, t18, t19, appBarControl);
711
- $[42] = appBarControl;
712
- $[43] = appBarIconButtonSx;
713
- $[44] = titleData;
714
- $[45] = _t2;
693
+ $[43] = appBarControl;
694
+ $[44] = appBarIconButtonSx;
695
+ $[45] = titleData;
696
+ $[46] = _t2;
715
697
  } else {
716
- _t2 = $[45];
698
+ _t2 = $[46];
717
699
  }
718
700
  t15 = /*#__PURE__*/React.createElement(StyledAppBar, _t, _t2);
719
- $[35] = appBarControl;
720
- $[36] = appBarIconButtonSx;
721
- $[37] = appBarSx;
722
- $[38] = titleData;
723
- $[39] = t15;
701
+ $[36] = appBarControl;
702
+ $[37] = appBarIconButtonSx;
703
+ $[38] = appBarSx;
704
+ $[39] = titleData;
705
+ $[40] = t15;
724
706
  } else {
725
- t15 = $[39];
707
+ t15 = $[40];
726
708
  }
727
709
  var t16;
728
- if ($[52] !== badgeVariant || $[53] !== isMobileOpen || $[54] !== logo || $[55] !== menu || $[56] !== sideMenuContainerBoxSx || $[57] !== sideMenuPermanentDrawerSx || $[58] !== sideMenuTemporaryDrawerSx) {
710
+ if ($[53] !== badgeVariant || $[54] !== isMobileOpen || $[55] !== logo || $[56] !== menu || $[57] !== sideMenuContainerBoxSx || $[58] !== sideMenuPermanentDrawerSx || $[59] !== sideMenuTemporaryDrawerSx) {
729
711
  var _t4;
730
- if ($[60] !== sideMenuContainerBoxSx) {
712
+ if ($[61] !== sideMenuContainerBoxSx) {
731
713
  _t4 = {
732
714
  component: "nav",
733
715
  "aria-label": "mailbox folders",
734
716
  sx: sideMenuContainerBoxSx
735
717
  };
736
- $[60] = sideMenuContainerBoxSx;
737
- $[61] = _t4;
718
+ $[61] = sideMenuContainerBoxSx;
719
+ $[62] = _t4;
738
720
  } else {
739
- _t4 = $[61];
721
+ _t4 = $[62];
740
722
  }
741
723
  var _t5;
742
- if ($[62] !== badgeVariant || $[63] !== isMobileOpen || $[64] !== logo || $[65] !== menu || $[66] !== sideMenuTemporaryDrawerSx) {
724
+ if ($[63] !== badgeVariant || $[64] !== isMobileOpen || $[65] !== logo || $[66] !== menu || $[67] !== sideMenuTemporaryDrawerSx) {
743
725
  var _t6;
744
- if ($[68] === Symbol["for"]("react.memo_cache_sentinel")) {
726
+ if ($[69] === Symbol["for"]("react.memo_cache_sentinel")) {
745
727
  _t6 = {
746
728
  keepMounted: true
747
729
  };
748
- $[68] = _t6;
730
+ $[69] = _t6;
749
731
  } else {
750
- _t6 = $[68];
732
+ _t6 = $[69];
751
733
  }
752
734
  var _t7;
753
- if ($[69] !== isMobileOpen || $[70] !== sideMenuTemporaryDrawerSx) {
735
+ if ($[70] !== isMobileOpen || $[71] !== sideMenuTemporaryDrawerSx) {
754
736
  _t7 = {
755
737
  variant: "temporary",
756
738
  open: isMobileOpen,
@@ -758,137 +740,137 @@ var DefaultLayout = function DefaultLayout(t0) {
758
740
  sx: sideMenuTemporaryDrawerSx,
759
741
  ModalProps: _t6
760
742
  };
761
- $[69] = isMobileOpen;
762
- $[70] = sideMenuTemporaryDrawerSx;
763
- $[71] = _t7;
743
+ $[70] = isMobileOpen;
744
+ $[71] = sideMenuTemporaryDrawerSx;
745
+ $[72] = _t7;
764
746
  } else {
765
- _t7 = $[71];
747
+ _t7 = $[72];
766
748
  }
767
749
  var t21;
768
- if ($[72] !== badgeVariant || $[73] !== logo || $[74] !== menu) {
750
+ if ($[73] !== badgeVariant || $[74] !== logo || $[75] !== menu) {
769
751
  t21 = menu && /*#__PURE__*/React.createElement(SideMenu, {
770
752
  logo: logo,
771
753
  badgeVariant: badgeVariant,
772
754
  list: menu
773
755
  });
774
- $[72] = badgeVariant;
775
- $[73] = logo;
776
- $[74] = menu;
777
- $[75] = t21;
756
+ $[73] = badgeVariant;
757
+ $[74] = logo;
758
+ $[75] = menu;
759
+ $[76] = t21;
778
760
  } else {
779
- t21 = $[75];
761
+ t21 = $[76];
780
762
  }
781
763
  _t5 = /*#__PURE__*/React.createElement(StyledSideMenuTemporaryDrawer, _t7, t21);
782
- $[62] = badgeVariant;
783
- $[63] = isMobileOpen;
784
- $[64] = logo;
785
- $[65] = menu;
786
- $[66] = sideMenuTemporaryDrawerSx;
787
- $[67] = _t5;
764
+ $[63] = badgeVariant;
765
+ $[64] = isMobileOpen;
766
+ $[65] = logo;
767
+ $[66] = menu;
768
+ $[67] = sideMenuTemporaryDrawerSx;
769
+ $[68] = _t5;
788
770
  } else {
789
- _t5 = $[67];
771
+ _t5 = $[68];
790
772
  }
791
773
  var _t8;
792
- if ($[76] !== badgeVariant || $[77] !== logo || $[78] !== menu || $[79] !== sideMenuPermanentDrawerSx) {
774
+ if ($[77] !== badgeVariant || $[78] !== logo || $[79] !== menu || $[80] !== sideMenuPermanentDrawerSx) {
793
775
  var _t9;
794
- if ($[81] !== sideMenuPermanentDrawerSx) {
776
+ if ($[82] !== sideMenuPermanentDrawerSx) {
795
777
  _t9 = {
796
778
  variant: "permanent",
797
779
  open: true,
798
780
  sx: sideMenuPermanentDrawerSx
799
781
  };
800
- $[81] = sideMenuPermanentDrawerSx;
801
- $[82] = _t9;
782
+ $[82] = sideMenuPermanentDrawerSx;
783
+ $[83] = _t9;
802
784
  } else {
803
- _t9 = $[82];
785
+ _t9 = $[83];
804
786
  }
805
787
  var _t0;
806
- if ($[83] !== badgeVariant || $[84] !== logo || $[85] !== menu) {
788
+ if ($[84] !== badgeVariant || $[85] !== logo || $[86] !== menu) {
807
789
  _t0 = menu && /*#__PURE__*/React.createElement(SideMenu, {
808
790
  logo: logo,
809
791
  badgeVariant: badgeVariant,
810
792
  list: menu
811
793
  });
812
- $[83] = badgeVariant;
813
- $[84] = logo;
814
- $[85] = menu;
815
- $[86] = _t0;
794
+ $[84] = badgeVariant;
795
+ $[85] = logo;
796
+ $[86] = menu;
797
+ $[87] = _t0;
816
798
  } else {
817
- _t0 = $[86];
799
+ _t0 = $[87];
818
800
  }
819
801
  _t8 = /*#__PURE__*/React.createElement(StyledSideMenuPermanentDrawer, _t9, _t0);
820
- $[76] = badgeVariant;
821
- $[77] = logo;
822
- $[78] = menu;
823
- $[79] = sideMenuPermanentDrawerSx;
824
- $[80] = _t8;
802
+ $[77] = badgeVariant;
803
+ $[78] = logo;
804
+ $[79] = menu;
805
+ $[80] = sideMenuPermanentDrawerSx;
806
+ $[81] = _t8;
825
807
  } else {
826
- _t8 = $[80];
808
+ _t8 = $[81];
827
809
  }
828
810
  t16 = /*#__PURE__*/React.createElement(Box, _t4, _t5, _t8);
829
- $[52] = badgeVariant;
830
- $[53] = isMobileOpen;
831
- $[54] = logo;
832
- $[55] = menu;
833
- $[56] = sideMenuContainerBoxSx;
834
- $[57] = sideMenuPermanentDrawerSx;
835
- $[58] = sideMenuTemporaryDrawerSx;
836
- $[59] = t16;
811
+ $[53] = badgeVariant;
812
+ $[54] = isMobileOpen;
813
+ $[55] = logo;
814
+ $[56] = menu;
815
+ $[57] = sideMenuContainerBoxSx;
816
+ $[58] = sideMenuPermanentDrawerSx;
817
+ $[59] = sideMenuTemporaryDrawerSx;
818
+ $[60] = t16;
837
819
  } else {
838
- t16 = $[59];
820
+ t16 = $[60];
839
821
  }
840
822
  var t17;
841
- if ($[87] !== children || $[88] !== mainBoxSx) {
823
+ if ($[88] !== children || $[89] !== mainBoxSx) {
842
824
  var _t1;
843
- if ($[90] !== mainBoxSx) {
825
+ if ($[91] !== mainBoxSx) {
844
826
  _t1 = {
845
827
  component: "main",
846
828
  sx: mainBoxSx
847
829
  };
848
- $[90] = mainBoxSx;
849
- $[91] = _t1;
830
+ $[91] = mainBoxSx;
831
+ $[92] = _t1;
850
832
  } else {
851
- _t1 = $[91];
833
+ _t1 = $[92];
852
834
  }
853
835
  var _t10;
854
- if ($[92] === Symbol["for"]("react.memo_cache_sentinel")) {
836
+ if ($[93] === Symbol["for"]("react.memo_cache_sentinel")) {
855
837
  _t10 = /*#__PURE__*/React.createElement(Toolbar, null);
856
- $[92] = _t10;
838
+ $[93] = _t10;
857
839
  } else {
858
- _t10 = $[92];
840
+ _t10 = $[93];
859
841
  }
860
842
  var _t11;
861
- if ($[93] !== children) {
843
+ if ($[94] !== children) {
862
844
  _t11 = /*#__PURE__*/React.createElement(StyledMainContentDiv, null, children);
863
- $[93] = children;
864
- $[94] = _t11;
845
+ $[94] = children;
846
+ $[95] = _t11;
865
847
  } else {
866
- _t11 = $[94];
848
+ _t11 = $[95];
867
849
  }
868
850
  t17 = /*#__PURE__*/React.createElement(Box, _t1, _t10, _t11);
869
- $[87] = children;
870
- $[88] = mainBoxSx;
871
- $[89] = t17;
851
+ $[88] = children;
852
+ $[89] = mainBoxSx;
853
+ $[90] = t17;
872
854
  } else {
873
- t17 = $[89];
855
+ t17 = $[90];
874
856
  }
875
857
  t14 = /*#__PURE__*/React.createElement(StyledContainerBox, null, t15, t16, t17);
876
- $[21] = appBarControl;
877
- $[22] = appBarIconButtonSx;
878
- $[23] = appBarSx;
879
- $[24] = badgeVariant;
880
- $[25] = children;
881
- $[26] = isMobileOpen;
882
- $[27] = logo;
883
- $[28] = mainBoxSx;
884
- $[29] = menu;
885
- $[30] = sideMenuContainerBoxSx;
886
- $[31] = sideMenuPermanentDrawerSx;
887
- $[32] = sideMenuTemporaryDrawerSx;
888
- $[33] = titleData;
889
- $[34] = t14;
858
+ $[22] = appBarControl;
859
+ $[23] = appBarIconButtonSx;
860
+ $[24] = appBarSx;
861
+ $[25] = badgeVariant;
862
+ $[26] = children;
863
+ $[27] = isMobileOpen;
864
+ $[28] = logo;
865
+ $[29] = mainBoxSx;
866
+ $[30] = menu;
867
+ $[31] = sideMenuContainerBoxSx;
868
+ $[32] = sideMenuPermanentDrawerSx;
869
+ $[33] = sideMenuTemporaryDrawerSx;
870
+ $[34] = titleData;
871
+ $[35] = t14;
890
872
  } else {
891
- t14 = $[34];
873
+ t14 = $[35];
892
874
  }
893
875
  return t14;
894
876
  };
@@ -924,6 +906,30 @@ var StyledSideMenuPermanentDrawer = styled(Drawer)(function (_ref3) {
924
906
  });
925
907
  });
926
908
  var StyledMainContentDiv = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])));
927
- function _temp(isMobileOpen_0) {
909
+ function _temp(m) {
910
+ var menuTitles = {};
911
+ if (m) {
912
+ m.forEach(function (info) {
913
+ if ((info.uri == null || info.uri === "") && info.items && info.items.length > 0) {
914
+ info.items.map(function (subInfo) {
915
+ menuTitles[subInfo.uri] = {
916
+ name: subInfo.name,
917
+ parentName: info.name,
918
+ parentIcon: info.icon
919
+ };
920
+ });
921
+ } else {
922
+ if (info.uri) {
923
+ menuTitles[info.uri] = {
924
+ name: info.name,
925
+ icon: info.icon
926
+ };
927
+ }
928
+ }
929
+ });
930
+ }
931
+ return menuTitles;
932
+ }
933
+ function _temp2(isMobileOpen_0) {
928
934
  return !isMobileOpen_0;
929
935
  }export{CardLayout,DefaultLayout};