@m4l/components 0.1.84 → 0.1.85

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.
Files changed (91) hide show
  1. package/@types/export.d.ts +25 -4
  2. package/components/AccountPopover/{index.bbeb9142.js → index.35c29a55.js} +23 -19
  3. package/components/AppBar/{index.43f8b54f.js → index.291da9fd.js} +8 -7
  4. package/components/CommonActions/components/ActionCancel/{index.29517521.js → index.67b91376.js} +1 -1
  5. package/components/CommonActions/components/ActionFormCancel/{index.89f1ac8e.js → index.d4503410.js} +16 -15
  6. package/components/CommonActions/components/ActionFormIntro/{index.bbc35e74.js → index.01ed67de.js} +1 -1
  7. package/components/CommonActions/components/ActionIntro/{index.a9420126.js → index.53e7fe2b.js} +1 -1
  8. package/components/CommonActions/components/Actions/{index.e70e8779.js → index.c91c27f9.js} +14 -13
  9. package/components/DataGrid/{index.1d0a3dec.js → index.37e14e83.js} +8 -7
  10. package/components/DataGrid/subcomponents/Actions/{index.a8fc9f6a.js → index.155c63af.js} +19 -18
  11. package/components/DynamicFilter/{index.912679cc.js → index.a8c2609c.js} +28 -27
  12. package/components/GridLayout/{index.c55f16eb.js → index.2383aaf9.js} +69 -10
  13. package/components/GridLayout/index.d.ts +1 -1
  14. package/components/GridLayout/subcomponents/Griditem/{index.6c68811f.js → index.58168132.js} +1 -1
  15. package/components/GridLayout/subcomponents/Responsive/{index.a6e33b8d.js → index.a6642437.js} +1 -1
  16. package/components/HelperText/{index.a47ff233.js → index.8b5911d1.js} +8 -7
  17. package/components/Icon/{index.d1402200.js → index.c3a579e7.js} +1 -1
  18. package/components/LanguagePopover/{index.807f5272.js → index.7681b08e.js} +8 -7
  19. package/components/ModalDialog/{index.42e804cf.js → index.b85ee3cb.js} +4 -4
  20. package/components/NavLink/{index.ff5a939c.js → index.bb879650.js} +8 -7
  21. package/components/NoItemSelected/classes/constants.d.ts +1 -0
  22. package/components/NoItemSelected/classes/index.d.ts +6 -0
  23. package/components/NoItemSelected/classes/types.d.ts +6 -0
  24. package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
  25. package/components/NoItemSelected/index.d.ts +2 -1
  26. package/components/NoItemSelected/types.d.ts +4 -0
  27. package/components/ObjectLogs/{index.dc02715d.js → index.2ed38a84.js} +21 -18
  28. package/components/PaperForm/{index.249c2404.js → index.989377a5.js} +1 -1
  29. package/components/Period/{index.e129cdec.js → index.061c9b2f.js} +15 -14
  30. package/components/PropertyValue/{index.93e40532.js → index.ac46f441.js} +1 -1
  31. package/components/ScrollBar/{index.d4410cb5.js → index.1247c1c5.js} +38 -9
  32. package/components/SideBar/{index.327679a6.js → index.e0587639.js} +111 -50
  33. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
  34. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  35. package/components/areas/components/AreasAdmin/classes/types.d.ts +2 -0
  36. package/components/areas/components/AreasAdmin/{index.8ab71eb9.js → index.f505897a.js} +102 -53
  37. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  38. package/components/areas/components/AreasViewer/classes/types.d.ts +1 -1
  39. package/components/areas/components/AreasViewer/{index.933e506b.js → index.cacec884.js} +71 -125
  40. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
  41. package/components/areas/components/{index.9e48d8ff.js → index.6d5dfeec.js} +12 -11
  42. package/components/areas/contexts/AreasContext/helper.d.ts +3 -3
  43. package/components/areas/contexts/AreasContext/{index.230d1584.js → index.6f56b1da.js} +91 -78
  44. package/components/areas/contexts/AreasContext/types.d.ts +20 -8
  45. package/components/areas/contexts/{index.f494e241.js → index.999e8b1e.js} +1 -1
  46. package/components/areas/hooks/useAreas/{index.b8449343.js → index.4baec91c.js} +1 -1
  47. package/components/areas/{index.32db4fa7.js → index.3088f99e.js} +12 -11
  48. package/components/formatters/BooleanFormatter/{index.b2f02bc4.js → index.e7f0b76a.js} +1 -1
  49. package/components/formatters/{index.f9ad88b4.js → index.d911949d.js} +2 -2
  50. package/components/hook-form/RHFAutocomplete/{index.d5afb409.js → index.aca6984f.js} +9 -8
  51. package/components/hook-form/RHFAutocompleteAsync/{index.a4f00088.js → index.8511bcf8.js} +1 -1
  52. package/components/hook-form/RHFCheckbox/{index.9bf6edb0.js → index.0f45e6b0.js} +9 -8
  53. package/components/hook-form/RHFDateTime/{index.a2c1ed2c.js → index.07412ef0.js} +9 -8
  54. package/components/hook-form/RHFPeriod/{index.b5204ce2.js → index.15b8f11e.js} +2 -2
  55. package/components/hook-form/RHFTextField/{index.5a0fa776.js → index.94c8c59b.js} +3 -3
  56. package/components/hook-form/RHFUpload/{index.b36539d6.js → index.7ef1e124.js} +9 -8
  57. package/components/modal/{WindowBase.37158e8d.js → WindowBase.d485315d.js} +10 -9
  58. package/components/modal/{WindowConfirm.a68aa0f1.js → WindowConfirm.3d9cd6e1.js} +17 -16
  59. package/components/modal/{index.6f281ef8.js → index.c7e4beba.js} +14 -13
  60. package/components/mui_extended/Accordion/{index.46771196.js → index.854f4c90.js} +3 -3
  61. package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
  62. package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
  63. package/components/mui_extended/IconButton/{index.62aea582.js → index.be111a34.js} +1 -1
  64. package/components/mui_extended/MenuActions/{index.2493b1b1.js → index.b16e84c1.js} +7 -4
  65. package/components/mui_extended/MenuActions/types.d.ts +1 -0
  66. package/components/mui_extended/Pager/{index.a7f87c96.js → index.5b77fa4c.js} +1 -1
  67. package/components/mui_extended/Stack/Stack.d.ts +3 -0
  68. package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
  69. package/components/mui_extended/Stack/classes/index.d.ts +6 -0
  70. package/components/mui_extended/Stack/classes/types.d.ts +6 -0
  71. package/components/mui_extended/Stack/index.0e53197c.js +39 -0
  72. package/components/mui_extended/Stack/index.d.ts +2 -0
  73. package/components/mui_extended/Stack/types.d.ts +2 -0
  74. package/components/mui_extended/Tab/{index.756fe693.js → index.c1dc7bbf.js} +42 -9
  75. package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
  76. package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
  77. package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
  78. package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
  79. package/components/mui_extended/Tabs/index.d.ts +1 -0
  80. package/components/mui_extended/index.d.ts +2 -0
  81. package/components/mui_extended/{index.ba27649e.js → index.d1ee9a6a.js} +8 -7
  82. package/contexts/ModalContext/{index.51da83de.js → index.1ea79d7e.js} +1 -1
  83. package/contexts/RHFormContext/{index.b9266262.js → index.e019f87d.js} +1 -1
  84. package/hooks/useModal/{index.7611bf21.js → index.c906706c.js} +1 -1
  85. package/index.js +67 -65
  86. package/package.json +1 -1
  87. package/{vendor.1af105d6.js → vendor.f27b86c9.js} +50 -50
  88. package/components/GridLayout/subcomponents/SizeProvider/index.bfa05dfa.js +0 -62
  89. /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
  90. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/index.d.ts +0 -0
  91. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/types.d.ts +0 -0
@@ -3,18 +3,50 @@ import { styled, alpha } from "@mui/material/styles";
3
3
  import SimpleBarReact from "simplebar-react";
4
4
  import simpleBarCss from "simplebar/dist/simplebar.min.css?used";
5
5
  import { jsx } from "react/jsx-runtime";
6
- styled("div")`
7
- flex-grow: 1;
6
+ const SimpleBarStyle = styled(SimpleBarReact)`
7
+ /* flex-grow: 1;
8
8
  height: 100%;
9
- overflow: hidden;
9
+ overflow: hidden; */
10
10
  ${simpleBarCss}
11
+ height: 100%;
12
+
13
+ .simplebar-scrollbar {
14
+ :before: {
15
+ background-color: ${(props) => alpha(props.theme.palette.grey[600], 0.48)};
16
+ }
17
+ .simplebar-visible:before {
18
+ opacity: 1;
19
+ }
20
+ }
21
+ .simplebar-track.simplebar-vertical {
22
+ width: 30;
23
+ }
24
+ .simplebar-track.simplebar-horizontal .simplebar-scrollbar {
25
+ height: 6;
26
+ }
27
+
28
+ .simplebar-mask {
29
+ z-index: 'inherit';
30
+ }
31
+
32
+ .simplebar-content {
33
+ // display: 'flex',
34
+ // flexDirection: 'column',
35
+ // height: '100%',
36
+ }
37
+
38
+ .simplebar-content-wrapper[style*='overflow: hidden scroll;'] {
39
+ .simplebar-content {
40
+ margin-right: 16px;
41
+ }
42
+ }
11
43
  `;
12
44
  const RootStyle = styled("div")(() => ({
13
45
  flexGrow: 1,
14
46
  height: "100%",
15
47
  overflow: "hidden"
16
48
  }));
17
- const SimpleBarStyle = styled(SimpleBarReact)(({
49
+ styled(SimpleBarReact)(({
18
50
  theme
19
51
  }) => ({
20
52
  height: "100%",
@@ -35,13 +67,10 @@ const SimpleBarStyle = styled(SimpleBarReact)(({
35
67
  "& .simplebar-mask": {
36
68
  zIndex: "inherit"
37
69
  },
38
- "& .simplebar-content": {
39
- display: "flex",
40
- height: "100%"
41
- },
70
+ "& .simplebar-content": {},
42
71
  '& .simplebar-content-wrapper[style*="overflow: hidden scroll;"] ': {
43
72
  "& .simplebar-content": {
44
- marginRight: "20px"
73
+ marginRight: "12px"
45
74
  }
46
75
  }
47
76
  }));
@@ -1,16 +1,17 @@
1
1
  import { useResponsiveDesktop } from "@m4l/graphics";
2
- import { useEnvironment } from "@m4l/core";
3
- import { createContext, useContext, useState } from "react";
2
+ import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
3
+ import { createContext, useContext, useState, useEffect } from "react";
4
4
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
5
5
  import { I as Image } from "../Image/index.c18ebf5a.js";
6
- import { I as IconButton } from "../mui_extended/IconButton/index.62aea582.js";
6
+ import { I as IconButton } from "../mui_extended/IconButton/index.be111a34.js";
7
7
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
8
8
  import { styled as styled$1, generateUtilityClasses, ListItemText, ListItemButton, Collapse, useTheme, Skeleton, Drawer as Drawer$1 } from "@mui/material";
9
- import { I as Icon, A as ArrowIcon } from "../Icon/index.d1402200.js";
9
+ import { I as Icon, A as ArrowIcon } from "../Icon/index.c3a579e7.js";
10
10
  import { T as Typography } from "../mui_extended/Typography/index.443590d6.js";
11
11
  import clsx from "clsx";
12
+ import { useLocation } from "react-router-dom";
12
13
  import { P as Popover } from "../mui_extended/Popover/index.9f35d0eb.js";
13
- import { S as ScrollBar } from "../ScrollBar/index.d4410cb5.js";
14
+ import { S as ScrollBar } from "../ScrollBar/index.1247c1c5.js";
14
15
  import { styled, alpha } from "@mui/material/styles";
15
16
  import { unstable_composeClasses } from "@mui/base";
16
17
  import { g as getComponentUtilityClass } from "../../utils/index.c43a95f4.js";
@@ -498,30 +499,57 @@ function NavListSubItem(props) {
498
499
  }
499
500
  } = props;
500
501
  const {
501
- classes
502
+ setAncestorActive
503
+ } = useBase();
504
+ const [internalItemActive, setInternalItemActive] = useState(false);
505
+ const {
506
+ classes,
507
+ isItemActive
502
508
  } = useSideBar();
509
+ const active = isItemActive(list);
503
510
  const [openSub, setOpenSub] = useState(false);
504
511
  const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
512
+ const location = useLocation();
513
+ useEffect(() => {
514
+ let mounted = true;
515
+ if (mounted) {
516
+ if (active || internalItemActive) {
517
+ setAncestorActive(true);
518
+ } else {
519
+ setAncestorActive(false);
520
+ }
521
+ }
522
+ return function cleanUp() {
523
+ setAncestorActive(false);
524
+ mounted = false;
525
+ };
526
+ }, [active, internalItemActive, location.search]);
505
527
  return /* @__PURE__ */ jsx(NavListSubItemRoot, {
506
- className: classes.navListSubItemRoot,
528
+ className: clsx(classes.navListSubItemRoot, active || internalItemActive ? classes.subItemActive : null),
507
529
  ...process.env.NODE_ENV !== "production" ? {
508
530
  [TEST_PROP_ID]: getNameDataTestId("navListSubItemRoot")
509
531
  } : {},
510
- children: hasChildren ? /* @__PURE__ */ jsxs(Fragment, {
511
- children: [/* @__PURE__ */ jsx(NavSubItem, {
512
- item: list,
513
- openSub,
514
- setOpenSub,
515
- closePopover
516
- }), /* @__PURE__ */ jsx(Collapse, {
517
- in: openSub,
518
- timeout: "auto",
519
- unmountOnExit: true,
520
- children: (list.children || []).map((item) => /* @__PURE__ */ jsx(NavListSubItem, {
521
- item,
532
+ children: hasChildren ? /* @__PURE__ */ jsx(BaseProvider, {
533
+ value: {
534
+ ancestorActive: internalItemActive,
535
+ setAncestorActive: setInternalItemActive
536
+ },
537
+ children: /* @__PURE__ */ jsxs(Fragment, {
538
+ children: [/* @__PURE__ */ jsx(NavSubItem, {
539
+ item: list,
540
+ openSub,
541
+ setOpenSub,
522
542
  closePopover
523
- }, item.title))
524
- })]
543
+ }), /* @__PURE__ */ jsx(Collapse, {
544
+ in: openSub,
545
+ timeout: "auto",
546
+ unmountOnExit: true,
547
+ children: (list.children || []).map((item) => /* @__PURE__ */ jsx(NavListSubItem, {
548
+ item,
549
+ closePopover
550
+ }, item.title))
551
+ })]
552
+ })
525
553
  }) : /* @__PURE__ */ jsx(NavSubItem, {
526
554
  item: list,
527
555
  openSub,
@@ -627,53 +655,86 @@ const ContainerListSubItem = styled$1("div")(({
627
655
  }));
628
656
  function ItemListMain(props) {
629
657
  const {
630
- list,
631
- setItemMainActive,
632
- itemMainActive,
633
- id
658
+ list
634
659
  } = props;
635
660
  const {
636
661
  collapsed: isSideBarCollapsed,
637
662
  isItemActive,
638
663
  classes
639
664
  } = useSideBar();
640
- const active = isItemActive(list);
641
- const [open, setOpen] = useState(active);
665
+ const location = useLocation();
666
+ const [internalItemActive, setInternalItemActive] = useState(false);
667
+ const [active, setActive] = useState(false);
668
+ const childrens = [];
669
+ const findChildren = (list2) => {
670
+ const moduleId = list2.children ? list2.children[0].module_id : void 0;
671
+ if (moduleId) {
672
+ childrens.push(moduleId);
673
+ list2.children && findChildren(list2.children[0]);
674
+ }
675
+ };
676
+ useEffect(() => {
677
+ let mounted = true;
678
+ if (mounted) {
679
+ setActive(false);
680
+ setActive(isItemActive(list));
681
+ if (mounted && !active) {
682
+ findChildren(list);
683
+ for (let i = 0; i < childrens.length; i++) {
684
+ if (isItemActive({
685
+ title: "",
686
+ module_id: childrens[i]
687
+ })) {
688
+ setActive(true);
689
+ break;
690
+ }
691
+ }
692
+ }
693
+ }
694
+ return function cleanUp() {
695
+ mounted = false;
696
+ };
697
+ }, [location.search]);
698
+ const [open, setOpen] = useState(true);
642
699
  const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
643
700
  if (hasChildren) {
644
- return /* @__PURE__ */ jsxs("div", {
701
+ return /* @__PURE__ */ jsx("div", {
645
702
  role: "presentation",
646
- className: clsx(classes.itemListMainRoot, itemMainActive === id && classes.itemMainActive),
703
+ className: clsx(classes.itemListMainRoot, active || internalItemActive ? classes.itemMainActive : null),
647
704
  ...process.env.NODE_ENV !== "production" ? {
648
705
  [TEST_PROP_ID]: getNameDataTestId("itemListMainRoot")
649
706
  } : {},
650
- onClick: () => setItemMainActive(id),
651
- children: [/* @__PURE__ */ jsx(NavItemMain, {
652
- item: list,
653
- open,
654
- setOpen
655
- }), !isSideBarCollapsed && /* @__PURE__ */ jsx(Collapse, {
656
- in: open,
657
- timeout: "auto",
658
- unmountOnExit: true,
659
- children: (list.children || []).map((item) => /* @__PURE__ */ jsx(ContainerListSubItem, {
660
- className: classes.containerListSubItem,
661
- ...process.env.NODE_ENV !== "production" ? {
662
- [TEST_PROP_ID]: getNameDataTestId("containerListSubItem")
663
- } : {},
664
- children: /* @__PURE__ */ jsx(NavListSubItem, {
665
- item
666
- }, item.title)
667
- }, item.title))
668
- })]
707
+ children: /* @__PURE__ */ jsxs(BaseProvider, {
708
+ value: {
709
+ ancestorActive: internalItemActive,
710
+ setAncestorActive: setInternalItemActive
711
+ },
712
+ children: [/* @__PURE__ */ jsx(NavItemMain, {
713
+ item: list,
714
+ open,
715
+ setOpen
716
+ }), !isSideBarCollapsed && /* @__PURE__ */ jsx(Collapse, {
717
+ in: open,
718
+ timeout: "auto",
719
+ unmountOnExit: true,
720
+ children: (list.children || []).map((item) => /* @__PURE__ */ jsx(ContainerListSubItem, {
721
+ className: classes.containerListSubItem,
722
+ ...process.env.NODE_ENV !== "production" ? {
723
+ [TEST_PROP_ID]: getNameDataTestId("containerListSubItem")
724
+ } : {},
725
+ children: /* @__PURE__ */ jsx(NavListSubItem, {
726
+ item
727
+ }, item.title)
728
+ }, item.title))
729
+ })]
730
+ })
669
731
  });
670
732
  }
671
733
  return /* @__PURE__ */ jsx("div", {
672
- className: clsx(classes.itemListMainRoot, itemMainActive === id && classes.itemMainActive),
734
+ className: clsx(classes.itemListMainRoot, active ? classes.itemMainActive : null),
673
735
  ...process.env.NODE_ENV !== "production" ? {
674
736
  [TEST_PROP_ID]: getNameDataTestId("itemListMainRoot")
675
737
  } : {},
676
- onClick: () => setItemMainActive(id),
677
738
  children: /* @__PURE__ */ jsx(NavItemMain, {
678
739
  item: list,
679
740
  open,
@@ -1,5 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { MenuDataType } from "../../../../../../types";
2
3
  import { OpenStateItem } from "../../types";
4
+ export interface AncestorItem {
5
+ ancestorActive: boolean;
6
+ setAncestorActive: React.Dispatch<React.SetStateAction<boolean>>;
7
+ }
3
8
  export declare type NavListProps = MenuDataType;
4
9
  export interface NavItemRootProps extends OpenStateItem {
5
10
  item: NavListProps;
@@ -1,5 +1,5 @@
1
1
  import { AreasAdmninClasses } from './types';
2
2
  import { OwnerState } from '../../../contexts/AreasContext/types';
3
3
  export declare const areasAdminClasses: AreasAdmninClasses;
4
- export declare const useAreasAdminUtilityClasses: (ownerState: OwnerState) => Record<"root" | "areaChipRoot" | "areaIconLayer" | "areaContainerChipsIcon" | "areaContainerChips" | "areaContainerContentChips" | "areaEditPopover" | "areaChipMobileRoot" | "areaChipMobileIconContainer" | "areaChipTitle" | "areaContainerChipEditButton" | "areaChipDeleteButton" | "areaChipEditButton" | "areasAddButton" | "areasPopoverMobileOptions" | "areasPopoverListWindows", string>;
4
+ export declare const useAreasAdminUtilityClasses: (ownerState: OwnerState) => Record<"root" | "rootContent" | "areaChipRoot" | "areaIconLayer" | "areaContainerChipsIcon" | "areaContainerChips" | "areaContainerContentChips" | "areaEditPopover" | "areaChipMobileRoot" | "areaChipMobileIconContainer" | "areaChipTitle" | "areaContainerChipEditButton" | "areaChipDeleteButton" | "areaChipEditButton" | "areasAddButton" | "areasPopoverMobileOptions" | "areasPopoverListWindows" | "areasPopoverListWindowsIcon", string>;
5
5
  export declare type AdminClasses = ReturnType<typeof useAreasAdminUtilityClasses>;
@@ -1,5 +1,6 @@
1
1
  export interface AreasAdmninClasses {
2
2
  root: string;
3
+ rootContent: string;
3
4
  areaChipRoot: string;
4
5
  areaChipTitle: string;
5
6
  areaContainerChips: string;
@@ -16,6 +17,7 @@ export interface AreasAdmninClasses {
16
17
  areasAddButton: string;
17
18
  areasPopoverMobileOptions: string;
18
19
  areasPopoverListWindows: string;
20
+ areasPopoverListWindowsIcon: string;
19
21
  selected: string;
20
22
  isMobile: string;
21
23
  disabled: string;
@@ -1,11 +1,11 @@
1
- import { I as IconButton } from "../../../mui_extended/IconButton/index.62aea582.js";
2
- import { u as useAreasStore } from "../../hooks/useAreas/index.b8449343.js";
1
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.be111a34.js";
2
+ import { u as useAreasStore } from "../../hooks/useAreas/index.4baec91c.js";
3
3
  import { useEnvironment, useModuleDictionary } from "@m4l/core";
4
4
  import { useState, useRef, useMemo } from "react";
5
5
  import * as Yup from "yup";
6
6
  import { generateUtilityClasses, useTheme } from "@mui/material";
7
- import "../../../mui_extended/Accordion/index.46771196.js";
8
- import { I as Icon } from "../../../Icon/index.d1402200.js";
7
+ import "../../../mui_extended/Accordion/index.854f4c90.js";
8
+ import { I as Icon } from "../../../Icon/index.c3a579e7.js";
9
9
  import clsx from "clsx";
10
10
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
11
11
  import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
@@ -14,55 +14,57 @@ import "react-router-dom";
14
14
  import "@mui/material/Button";
15
15
  import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
16
16
  import "../../../mui_extended/CheckBox.38abccd8.js";
17
- import "../../../mui_extended/Badge/index.cad260fe.js";
17
+ import "../../../mui_extended/Badge/index.8c2b8b66.js";
18
18
  import "../../../Image/index.c18ebf5a.js";
19
19
  import "@mui/lab";
20
- import { M as MenuActions } from "../../../mui_extended/MenuActions/index.2493b1b1.js";
20
+ import { M as MenuActions } from "../../../mui_extended/MenuActions/index.b16e84c1.js";
21
21
  import { P as Popover } from "../../../mui_extended/Popover/index.9f35d0eb.js";
22
- import "../../../mui_extended/Pager/index.a7f87c96.js";
22
+ import "../../../mui_extended/Stack/index.0e53197c.js";
23
+ import "../../../mui_extended/Tab/index.c1dc7bbf.js";
24
+ import "../../../mui_extended/Pager/index.5b77fa4c.js";
23
25
  import { useResponsiveDesktop } from "@m4l/graphics";
24
- import "../../../mui_extended/Tab/index.756fe693.js";
25
26
  import "../../../mui_extended/Tooltip/index.5a795dcd.js";
26
27
  import { unstable_composeClasses } from "@mui/base";
27
28
  import { g as getComponentUtilityClass } from "../../../../utils/index.c43a95f4.js";
28
29
  import { A as AREAS_ADMIN_CLASS_NAME } from "../../constants.66529246.js";
29
30
  import { I as ICONS } from "../../icons.8266ccc8.js";
30
31
  import "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
31
- import "../../../../contexts/ModalContext/index.51da83de.js";
32
- import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.b9266262.js";
32
+ import "../../../../contexts/ModalContext/index.1ea79d7e.js";
33
+ import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.e019f87d.js";
33
34
  import "react-hook-form";
34
- import "../../../hook-form/RHFAutocomplete/index.d5afb409.js";
35
- import "../../../HelperText/index.a47ff233.js";
35
+ import "../../../hook-form/RHFAutocomplete/index.aca6984f.js";
36
+ import "../../../HelperText/index.8b5911d1.js";
36
37
  import "lodash/debounce";
37
- import "../../../hook-form/RHFAutocompleteAsync/index.a4f00088.js";
38
- import "../../../hook-form/RHFCheckbox/index.9bf6edb0.js";
38
+ import "../../../hook-form/RHFAutocompleteAsync/index.8511bcf8.js";
39
+ import "../../../hook-form/RHFCheckbox/index.0f45e6b0.js";
39
40
  import "@mui/x-date-pickers";
40
- import "../../../hook-form/RHFDateTime/index.a2c1ed2c.js";
41
- import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.5a0fa776.js";
42
- import "../../../hook-form/RHFPeriod/index.b5204ce2.js";
43
- import "../../../Period/index.e129cdec.js";
44
- import { A as Actions } from "../../../CommonActions/components/Actions/index.e70e8779.js";
45
- import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.29517521.js";
46
- import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.a9420126.js";
41
+ import "../../../hook-form/RHFDateTime/index.07412ef0.js";
42
+ import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.94c8c59b.js";
43
+ import "../../../hook-form/RHFPeriod/index.15b8f11e.js";
44
+ import "../../../Period/index.061c9b2f.js";
45
+ import { A as Actions } from "../../../CommonActions/components/Actions/index.c91c27f9.js";
46
+ import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.67b91376.js";
47
+ import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.53e7fe2b.js";
47
48
  import "../../../../react-draggable.7abb5d0a.js";
48
49
  import "../../../Resizeable/index.9a9c79a4.js";
49
- import "../../../modal/index.6f281ef8.js";
50
+ import "../../../modal/index.c7e4beba.js";
50
51
  import { shallow } from "zustand/shallow";
51
52
  import { styled } from "@mui/material/styles";
52
- import { S as ScrollBar } from "../../../ScrollBar/index.d4410cb5.js";
53
+ import { S as ScrollBar } from "../../../ScrollBar/index.1247c1c5.js";
53
54
  import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
54
55
  import TouchRipple from "@mui/material/ButtonBase/TouchRipple";
55
- import "../AreasViewer/index.933e506b.js";
56
+ import "../AreasViewer/index.cacec884.js";
56
57
  import "../../../LinearProgressIndeterminate/index.60dabc06.js";
57
- import "../../contexts/AreasContext/index.230d1584.js";
58
+ import "../../contexts/AreasContext/index.6f56b1da.js";
58
59
  import "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
59
60
  import "zustand";
60
61
  import "lodash/isString";
61
62
  import "react-dropzone";
62
- import "../../../hook-form/RHFUpload/index.b36539d6.js";
63
- import { u as useOnClickOutside } from "../../index.32db4fa7.js";
63
+ import "../../../hook-form/RHFUpload/index.7ef1e124.js";
64
+ import { u as useOnClickOutside } from "../../index.3088f99e.js";
64
65
  const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
65
66
  "root",
67
+ "rootContent",
66
68
  "areaChipRoot",
67
69
  "areaChipTitle",
68
70
  "areaChipDeleteButton",
@@ -79,6 +81,7 @@ const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
79
81
  "areaChipEditButton",
80
82
  "areasPopoverMobileOptions",
81
83
  "areasPopoverListWindows",
84
+ "areasPopoverListWindowsIcon",
82
85
  "selected",
83
86
  "isMobile",
84
87
  "disabled",
@@ -87,6 +90,7 @@ const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
87
90
  const useAreasAdminUtilityClasses = (ownerState) => {
88
91
  const slots = {
89
92
  root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton", ownerState.focus && "isFocus"],
93
+ rootContent: ["rootContent"],
90
94
  areaChipRoot: ["areaChipRoot"],
91
95
  areaIconLayer: ["areaIconLayer"],
92
96
  areaContainerChipsIcon: ["areaContainerChipsIcon"],
@@ -101,7 +105,8 @@ const useAreasAdminUtilityClasses = (ownerState) => {
101
105
  areaChipEditButton: ["areaChipEditButton"],
102
106
  areasAddButton: ["areasAddButton"],
103
107
  areasPopoverMobileOptions: ["areasPopoverMobileOptions"],
104
- areasPopoverListWindows: ["areasPopoverListWindows"]
108
+ areasPopoverListWindows: ["areasPopoverListWindows"],
109
+ areasPopoverListWindowsIcon: ["areasPopoverListWindowsIcon"]
105
110
  };
106
111
  return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
107
112
  };
@@ -145,7 +150,7 @@ const ChipActionsMobile = (props) => {
145
150
  const {
146
151
  setFocus
147
152
  } = useAreasStore((state) => state.areaAdminActions, shallow);
148
- const listAreas = useAreasStore((state) => state.areas, shallow);
153
+ const listAreas = useAreasStore((state) => state.areasIds, shallow);
149
154
  const {
150
155
  host_static_assets,
151
156
  environment_assets
@@ -204,7 +209,7 @@ const AreaChip = (props) => {
204
209
  setFocus
205
210
  } = useAreasStore((state) => state.areaAdminActions);
206
211
  const areaName = useAreasStore((state) => state.hashAreas[areaId].name, shallow);
207
- const listAreas = useAreasStore((state) => state.areas, shallow);
212
+ const listAreas = useAreasStore((state) => state.areasIds, shallow);
208
213
  const [open, setOpen] = useState(false);
209
214
  const {
210
215
  getLabel
@@ -388,7 +393,7 @@ const ChipMobile = (props) => {
388
393
  setFocus
389
394
  } = useAreasStore((state) => state.areaAdminActions);
390
395
  const areaName = useAreasStore((state) => state.hashAreas[areaId].name, shallow);
391
- const listAreas = useAreasStore((state) => state.areas, shallow);
396
+ const listAreas = useAreasStore((state) => state.areasIds, shallow);
392
397
  const [open, setOpen] = useState(false);
393
398
  const {
394
399
  getLabel
@@ -478,6 +483,7 @@ const ChipMobile = (props) => {
478
483
  areaId,
479
484
  handlerOpenPopoverEditArea
480
485
  }), /* @__PURE__ */ jsx("div", {
486
+ role: "presentation",
481
487
  onClick: (e) => {
482
488
  e.stopPropagation();
483
489
  },
@@ -543,7 +549,7 @@ const ChipMobile = (props) => {
543
549
  };
544
550
  ChipMobile.displayName = "AreaButtons";
545
551
  const AreaChipMobile = () => {
546
- const areas = useAreasStore((state) => state.areas.map((a) => ({
552
+ const areas = useAreasStore((state) => state.areasIds.map((a) => ({
547
553
  id: a,
548
554
  name: state.hashAreas[a].name
549
555
  })), shallow);
@@ -628,19 +634,72 @@ const AreaChipMobile = () => {
628
634
  })
629
635
  });
630
636
  };
637
+ const PanelWindowPopUp = (props) => {
638
+ const {
639
+ currentAreaId
640
+ } = props;
641
+ const {
642
+ host_static_assets,
643
+ environment_assets
644
+ } = useEnvironment();
645
+ const windowsLayouts = useAreasStore((state) => state.hashAreas[currentAreaId].layoutItemsIds.filter((li) => state.hashWindows[li].emergeType === "layout").map((lim) => {
646
+ const w = state.hashWindows[lim];
647
+ return {
648
+ i: w.windowId,
649
+ url_icon: w.url_icon,
650
+ title: w.title
651
+ };
652
+ }), shallow);
653
+ const theme = useTheme();
654
+ const {
655
+ maximizeLayout
656
+ } = useAreasStore((state) => state.areaActions);
657
+ const onTouched = (layoutId) => {
658
+ maximizeLayout(currentAreaId, layoutId);
659
+ };
660
+ const menuActions = windowsLayouts.map((element) => {
661
+ return {
662
+ onClick: () => onTouched(element.i),
663
+ label: element.title,
664
+ urlIcon: element.url_icon
665
+ };
666
+ });
667
+ return /* @__PURE__ */ jsx(Fragment, {
668
+ children: menuActions.length > 0 ? /* @__PURE__ */ jsx(MenuActions, {
669
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`,
670
+ arrowType: "no-arrow",
671
+ marginTop: "12px!important",
672
+ marginLeft: "14px!important",
673
+ anchorOrigin: {
674
+ vertical: "bottom",
675
+ horizontal: "right"
676
+ },
677
+ transformOrigin: {
678
+ vertical: "top",
679
+ horizontal: "right"
680
+ },
681
+ menuActions,
682
+ className: areasAdminClasses.areasPopoverListWindows,
683
+ iconButtonClassName: areasAdminClasses.areasPopoverListWindowsIcon,
684
+ menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides
685
+ }) : null
686
+ });
687
+ };
631
688
  function AreasAdmin() {
632
- const areas = useAreasStore((state) => state.areas, shallow);
689
+ const areas = useAreasStore((state) => state.areasIds, shallow);
633
690
  const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
634
691
  const status = useAreasStore((state) => state.ownerState.status);
635
692
  const {
636
693
  setFocus
637
694
  } = useAreasStore((state) => state.areaAdminActions, shallow);
638
695
  const classesRoot = useAreasStore((state) => state.adminClasses.root);
639
- const areasLength = useAreasStore((state) => state.areas.length);
696
+ const areasLength = useAreasStore((state) => state.areasIds.length);
640
697
  const isDesktop = useResponsiveDesktop();
641
698
  const {
642
699
  addArea
643
700
  } = useAreasStore((state) => state.areasActions, shallow);
701
+ const maximizedId = useAreasStore((state) => state.hashAreas[currentArea] ? state.hashAreas[currentArea].maximizedId : false, shallow);
702
+ console.log("currentArea test", currentArea);
644
703
  const {
645
704
  host_static_assets,
646
705
  environment_assets
@@ -665,30 +724,18 @@ function AreasAdmin() {
665
724
  if (status !== "loaded") {
666
725
  return null;
667
726
  }
668
- return /* @__PURE__ */ jsx("div", {
727
+ return /* @__PURE__ */ jsx(AreasAdminRoot, {
669
728
  ref: divRefOut,
670
- style: {
671
- width: "100%",
672
- height: "100%",
673
- position: "static"
674
- },
675
729
  onMouseDown: onRippleStart,
676
730
  onMouseUp: onRippleStop,
677
- children: /* @__PURE__ */ jsxs(AreasAdminRoot, {
731
+ className: classesRoot,
732
+ children: /* @__PURE__ */ jsxs("div", {
678
733
  ref: divRef,
679
- className: classesRoot,
734
+ className: areasAdminClasses.rootContent,
680
735
  onClick: () => setFocus(true),
681
- children: [/* @__PURE__ */ jsxs("div", {
736
+ children: [/* @__PURE__ */ jsx("div", {
682
737
  className: areasAdminClasses.areaContainerChipsIcon,
683
- children: [isDesktop ? /* @__PURE__ */ jsx("div", {
684
- className: areasAdminClasses.areaIconLayer,
685
- children: /* @__PURE__ */ jsx("div", {
686
- className: areasAdminClasses.areaIconLayerContent,
687
- children: /* @__PURE__ */ jsx(Icon, {
688
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`
689
- })
690
- })
691
- }) : null, /* @__PURE__ */ jsx("div", {
738
+ children: /* @__PURE__ */ jsx("div", {
692
739
  className: areasAdminClasses.areaContainerChips,
693
740
  children: /* @__PURE__ */ jsx("div", {
694
741
  className: areasAdminClasses.areaContainerContentChips,
@@ -702,12 +749,14 @@ function AreasAdmin() {
702
749
  })
703
750
  }) : /* @__PURE__ */ jsx(AreaChipMobile, {})
704
751
  })
705
- })]
752
+ })
706
753
  }), isDesktop ? /* @__PURE__ */ jsx(IconButton, {
707
754
  className: areasAdminClasses.areasAddButton,
708
755
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
709
756
  size: "small",
710
757
  onClick: addArea
758
+ }) : null, !isDesktop && maximizedId ? /* @__PURE__ */ jsx(PanelWindowPopUp, {
759
+ currentAreaId: currentArea
711
760
  }) : null]
712
761
  })
713
762
  });
@@ -1,5 +1,5 @@
1
1
  import { AreasViewerClasses } from './types';
2
2
  import { OwnerState } from '../../../contexts/AreasContext/types';
3
3
  export declare const areasViewerClasses: AreasViewerClasses;
4
- export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "windowLinearProgressBar" | "areasPopoverListWindows" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowContent" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "windowToastiesContainer" | "windowToastiesContainerTostys" | "windowToastyMeesageButtonsContainer" | "windowToastyMessage" | "windowToastyButtonsContainer" | "windowToastyPin" | "windowToastyClose" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "windowToastyContainer", string>;
4
+ export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "resizeHandle" | "windowLinearProgressBar" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowContent" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "windowToastiesContainer" | "windowToastiesContainerTostys" | "windowToastyMeesageButtonsContainer" | "windowToastyMessage" | "windowToastyButtonsContainer" | "windowToastyPin" | "windowToastyClose" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "windowToastyContainer", string>;
5
5
  export declare type ViwerClasses = ReturnType<typeof useAreasViewerUtilityClasses>;
@@ -35,7 +35,7 @@ export interface AreasViewerClasses {
35
35
  windowToastyClose: string;
36
36
  panelWindowsRoot: string;
37
37
  panelWindowsButtonContainer: string;
38
- areasPopoverListWindows: string;
38
+ resizeHandle: string;
39
39
  selected: string;
40
40
  selectedWindow: string;
41
41
  colapsed: string;