@m4l/components 0.1.84 → 0.1.86

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 (109) hide show
  1. package/@types/export.d.ts +25 -4
  2. package/components/AccountPopover/{index.bbeb9142.js → index.09f33fee.js} +29 -30
  3. package/components/AppBar/{index.43f8b54f.js → index.4fac1368.js} +9 -8
  4. package/components/CommonActions/components/ActionCancel/{index.29517521.js → index.d995d986.js} +2 -2
  5. package/components/CommonActions/components/ActionFormCancel/{index.89f1ac8e.js → index.48e066b3.js} +17 -16
  6. package/components/CommonActions/components/ActionFormIntro/{index.bbc35e74.js → index.cc97ed0a.js} +2 -2
  7. package/components/CommonActions/components/ActionIntro/{index.a9420126.js → index.98eb4b3b.js} +2 -2
  8. package/components/CommonActions/components/Actions/{index.e70e8779.js → index.99a8e55e.js} +15 -14
  9. package/components/CommonActions/index.d.ts +1 -0
  10. package/components/DataGrid/{index.1d0a3dec.js → index.d38e3b49.js} +8 -7
  11. package/components/DataGrid/subcomponents/Actions/{index.a8fc9f6a.js → index.7015aadc.js} +22 -20
  12. package/components/DynamicFilter/classes/types.d.ts +1 -0
  13. package/components/DynamicFilter/contexts/DynamicFilterContext/index.d.ts +6 -2
  14. package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +4 -0
  15. package/components/DynamicFilter/{index.912679cc.js → index.fddefc23.js} +44 -31
  16. package/components/GridLayout/{index.c55f16eb.js → index.2383aaf9.js} +69 -10
  17. package/components/GridLayout/index.d.ts +1 -1
  18. package/components/GridLayout/subcomponents/Griditem/{index.6c68811f.js → index.58168132.js} +1 -1
  19. package/components/GridLayout/subcomponents/Responsive/{index.a6e33b8d.js → index.a6642437.js} +1 -1
  20. package/components/HelperText/{index.a47ff233.js → index.bbbe24c9.js} +9 -8
  21. package/components/Icon/{index.d1402200.js → index.435df215.js} +1 -1
  22. package/components/LanguagePopover/{index.807f5272.js → index.7d2ccfe4.js} +9 -8
  23. package/components/ModalDialog/{index.42e804cf.js → index.b66c43e7.js} +4 -4
  24. package/components/NavLink/{index.ff5a939c.js → index.abbcb9b2.js} +9 -8
  25. package/components/NoItemSelected/classes/constants.d.ts +1 -0
  26. package/components/NoItemSelected/classes/index.d.ts +6 -0
  27. package/components/NoItemSelected/classes/types.d.ts +6 -0
  28. package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
  29. package/components/NoItemSelected/index.d.ts +2 -1
  30. package/components/NoItemSelected/types.d.ts +4 -0
  31. package/components/ObjectLogs/{index.dc02715d.js → index.ad313913.js} +22 -19
  32. package/components/PaperForm/{index.249c2404.js → index.ad703ab6.js} +1 -1
  33. package/components/Period/{index.e129cdec.js → index.32d475b8.js} +16 -15
  34. package/components/PropertyValue/{index.93e40532.js → index.d52295d9.js} +1 -1
  35. package/components/ScrollBar/classes/constants.d.ts +1 -0
  36. package/components/ScrollBar/classes/index.d.ts +6 -0
  37. package/components/ScrollBar/classes/types.d.ts +6 -0
  38. package/components/ScrollBar/index.65bb2930.js +121 -0
  39. package/components/SideBar/{index.327679a6.js → index.387a2fa1.js} +111 -50
  40. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
  41. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  42. package/components/areas/components/AreasAdmin/classes/types.d.ts +2 -0
  43. package/components/areas/components/AreasAdmin/{index.8ab71eb9.js → index.23a09c81.js} +105 -56
  44. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  45. package/components/areas/components/AreasViewer/classes/types.d.ts +1 -1
  46. package/components/areas/components/AreasViewer/{index.933e506b.js → index.68eb0f6b.js} +72 -126
  47. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
  48. package/components/areas/components/index.296bc2a4.js +31 -0
  49. package/components/areas/contexts/AreasContext/helper.d.ts +3 -3
  50. package/components/areas/contexts/AreasContext/{index.230d1584.js → index.8af3058c.js} +91 -78
  51. package/components/areas/contexts/AreasContext/types.d.ts +20 -8
  52. package/components/areas/contexts/{index.f494e241.js → index.41c24465.js} +1 -1
  53. package/components/areas/hooks/useAreas/{index.b8449343.js → index.d1cf9820.js} +1 -1
  54. package/components/areas/{index.32db4fa7.js → index.fd46ec65.js} +13 -12
  55. package/components/formatters/BooleanFormatter/{index.b2f02bc4.js → index.14cfcbc7.js} +1 -1
  56. package/components/formatters/{index.f9ad88b4.js → index.b574dda9.js} +2 -2
  57. package/components/hook-form/RHFAutocomplete/{index.d5afb409.js → index.60c6f592.js} +10 -9
  58. package/components/hook-form/RHFAutocompleteAsync/{index.a4f00088.js → index.9a40fb06.js} +1 -1
  59. package/components/hook-form/RHFCheckbox/{index.9bf6edb0.js → index.da4ebb03.js} +10 -9
  60. package/components/hook-form/RHFDateTime/{index.a2c1ed2c.js → index.c56219ea.js} +10 -9
  61. package/components/hook-form/RHFPeriod/{index.b5204ce2.js → index.ee6a3d61.js} +2 -2
  62. package/components/hook-form/RHFTextField/{index.5a0fa776.js → index.413a74ca.js} +3 -3
  63. package/components/hook-form/RHFUpload/{index.b36539d6.js → index.03faa7f0.js} +10 -9
  64. package/components/modal/{WindowBase.37158e8d.js → WindowBase.0eea1a27.js} +27 -13
  65. package/components/modal/{WindowConfirm.a68aa0f1.js → WindowConfirm.6896f0aa.js} +25 -24
  66. package/components/modal/{index.6f281ef8.js → index.6cdf65c9.js} +17 -16
  67. package/components/modal/index.d.ts +1 -1
  68. package/components/mui_extended/Accordion/{index.46771196.js → index.d15e51bf.js} +3 -3
  69. package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
  70. package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
  71. package/components/mui_extended/Button/{index.40af964e.js → index.f79eb74e.js} +2 -1
  72. package/components/mui_extended/IconButton/{index.62aea582.js → index.d88a3f2e.js} +1 -1
  73. package/components/mui_extended/MenuActions/{index.2493b1b1.js → index.c53370f6.js} +7 -4
  74. package/components/mui_extended/MenuActions/types.d.ts +1 -0
  75. package/components/mui_extended/Pager/{index.a7f87c96.js → index.d6c87c44.js} +1 -1
  76. package/components/mui_extended/Stack/Stack.d.ts +3 -0
  77. package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
  78. package/components/mui_extended/Stack/classes/index.d.ts +6 -0
  79. package/components/mui_extended/Stack/classes/types.d.ts +6 -0
  80. package/components/mui_extended/Stack/index.0e53197c.js +39 -0
  81. package/components/mui_extended/Stack/index.d.ts +2 -0
  82. package/components/mui_extended/Stack/types.d.ts +2 -0
  83. package/components/mui_extended/Tab/{index.756fe693.js → index.97d04d6b.js} +42 -9
  84. package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
  85. package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
  86. package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
  87. package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
  88. package/components/mui_extended/Tabs/index.d.ts +1 -0
  89. package/components/mui_extended/{index.ba27649e.js → index.0d5b8e73.js} +9 -8
  90. package/components/mui_extended/index.d.ts +2 -0
  91. package/contexts/ModalContext/{index.51da83de.js → index.5c908fe3.js} +1 -1
  92. package/contexts/RHFormContext/dictionary.d.ts +3 -0
  93. package/contexts/RHFormContext/{index.b9266262.js → index.ea2758ed.js} +6 -2
  94. package/contexts/index.d.ts +1 -0
  95. package/hooks/index.d.ts +1 -0
  96. package/hooks/useFormAddEdit/dictionary.d.ts +1 -0
  97. package/hooks/useFormAddEdit/index.16475afe.js +111 -0
  98. package/hooks/useFormAddEdit/index.d.ts +1 -0
  99. package/hooks/useModal/{index.7611bf21.js → index.2387ea76.js} +1 -1
  100. package/index.js +71 -67
  101. package/package.json +1 -1
  102. package/{vendor.1af105d6.js → vendor.7751caf6.js} +62 -62
  103. package/components/GridLayout/subcomponents/SizeProvider/index.bfa05dfa.js +0 -62
  104. package/components/ScrollBar/index.d4410cb5.js +0 -72
  105. package/components/areas/components/index.9e48d8ff.js +0 -30
  106. package/hooks/useFormAddEdit/index.15de3ba8.js +0 -49
  107. /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
  108. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/index.d.ts +0 -0
  109. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/types.d.ts +0 -0
@@ -1,54 +1,57 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
3
  import { styled } from "@mui/material/styles";
4
- import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.1d0a3dec.js";
4
+ import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.d38e3b49.js";
5
5
  import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
8
8
  import { R as ReactJson } from "../../react-json-view.57125fcf.js";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { u as useModal } from "../../hooks/useModal/index.7611bf21.js";
11
- import { I as Icon } from "../Icon/index.d1402200.js";
10
+ import { u as useModal } from "../../hooks/useModal/index.2387ea76.js";
11
+ import { I as Icon } from "../Icon/index.435df215.js";
12
12
  import "../../react-draggable.7abb5d0a.js";
13
13
  import "../Resizeable/index.9a9c79a4.js";
14
- import "../modal/index.6f281ef8.js";
15
- import "../CommonActions/components/Actions/index.e70e8779.js";
14
+ import "../modal/index.6cdf65c9.js";
15
+ import "../CommonActions/components/Actions/index.99a8e55e.js";
16
16
  import "@mui/material/Button";
17
- import "../mui_extended/Button/index.40af964e.js";
17
+ import "../mui_extended/Button/index.f79eb74e.js";
18
18
  import "clsx";
19
19
  import "react-hook-form";
20
- import "../mui_extended/IconButton/index.62aea582.js";
20
+ import "../mui_extended/IconButton/index.d88a3f2e.js";
21
21
  import "zustand";
22
- import "../areas/contexts/AreasContext/index.230d1584.js";
23
- import "../areas/components/AreasAdmin/index.8ab71eb9.js";
22
+ import "../areas/contexts/AreasContext/index.8af3058c.js";
23
+ import "../areas/components/AreasAdmin/index.23a09c81.js";
24
24
  import "zustand/shallow";
25
- import "../ScrollBar/index.d4410cb5.js";
26
- import "../mui_extended/Accordion/index.46771196.js";
25
+ import "../ScrollBar/index.65bb2930.js";
26
+ import "../mui_extended/Accordion/index.d15e51bf.js";
27
27
  import "../mui_extended/Typography/index.443590d6.js";
28
28
  import "../mui_extended/Avatar/index.75e6ed57.js";
29
29
  import "react-router-dom";
30
30
  import "../mui_extended/CheckBox.38abccd8.js";
31
- import "../mui_extended/Badge/index.cad260fe.js";
31
+ import "../mui_extended/Badge/index.8c2b8b66.js";
32
32
  import "../Image/index.c18ebf5a.js";
33
33
  import "@mui/lab";
34
- import "../mui_extended/MenuActions/index.2493b1b1.js";
34
+ import "../mui_extended/MenuActions/index.c53370f6.js";
35
35
  import "../mui_extended/Popover/index.9f35d0eb.js";
36
- import "../mui_extended/Pager/index.a7f87c96.js";
37
- import "../mui_extended/Tab/index.756fe693.js";
36
+ import "../mui_extended/Stack/index.0e53197c.js";
37
+ import "../mui_extended/Tab/index.97d04d6b.js";
38
+ import "../mui_extended/Pager/index.d6c87c44.js";
38
39
  import "../mui_extended/Tooltip/index.5a795dcd.js";
39
- import "../areas/components/AreasViewer/index.933e506b.js";
40
+ import "../areas/components/AreasViewer/index.68eb0f6b.js";
40
41
  import "../LinearProgressIndeterminate/index.60dabc06.js";
41
42
  import "../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
42
43
  import "../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
43
- import { W as WindowBase } from "../modal/WindowBase.37158e8d.js";
44
- import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.912679cc.js";
44
+ import { W as WindowBase } from "../modal/WindowBase.0eea1a27.js";
45
+ import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.fddefc23.js";
45
46
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
46
47
  const Container$1 = styled("div")(() => ({
47
48
  height: "100%",
48
49
  width: "100%",
49
50
  display: "flex",
50
51
  flexDirection: "column",
51
- justifyContent: "flex-start"
52
+ justifyContent: "flex-start",
53
+ gap: "4px",
54
+ padding: "4px"
52
55
  }));
53
56
  const Actions = styled("div")(({
54
57
  theme
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
- import { I as Icon } from "../Icon/index.d1402200.js";
4
+ import { I as Icon } from "../Icon/index.435df215.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  const PaperFormRoot = styled("div")(({
@@ -1,38 +1,39 @@
1
1
  import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, generateUtilityClasses, generateUtilityClass, Autocomplete, TextField, Skeleton } from "@mui/material";
3
3
  import { useMemo } from "react";
4
- import { I as Icon } from "../Icon/index.d1402200.js";
5
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.e70e8779.js";
4
+ import { I as Icon } from "../Icon/index.435df215.js";
5
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.99a8e55e.js";
6
6
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
7
7
  import "@mui/material/Button";
8
- import "../mui_extended/Button/index.40af964e.js";
8
+ import "../mui_extended/Button/index.f79eb74e.js";
9
9
  import "clsx";
10
10
  import "react-hook-form";
11
- import "../../contexts/ModalContext/index.51da83de.js";
11
+ import "../../contexts/ModalContext/index.5c908fe3.js";
12
12
  import "../../react-draggable.7abb5d0a.js";
13
13
  import "../Resizeable/index.9a9c79a4.js";
14
14
  import "@m4l/graphics";
15
- import "../modal/index.6f281ef8.js";
15
+ import "../modal/index.6cdf65c9.js";
16
16
  import "../Image/index.c18ebf5a.js";
17
- import "../mui_extended/IconButton/index.62aea582.js";
18
- import "../mui_extended/Accordion/index.46771196.js";
17
+ import "../mui_extended/IconButton/index.d88a3f2e.js";
18
+ import "../mui_extended/Accordion/index.d15e51bf.js";
19
19
  import { T as Typography } from "../mui_extended/Typography/index.443590d6.js";
20
20
  import "../mui_extended/Avatar/index.75e6ed57.js";
21
21
  import "react-router-dom";
22
22
  import "../mui_extended/CheckBox.38abccd8.js";
23
- import "../mui_extended/Badge/index.cad260fe.js";
23
+ import "../mui_extended/Badge/index.8c2b8b66.js";
24
24
  import "@mui/lab";
25
- import "../mui_extended/MenuActions/index.2493b1b1.js";
25
+ import "../mui_extended/MenuActions/index.c53370f6.js";
26
26
  import "../mui_extended/Popover/index.9f35d0eb.js";
27
- import "../mui_extended/Pager/index.a7f87c96.js";
28
- import "../mui_extended/Tab/index.756fe693.js";
27
+ import "../mui_extended/Stack/index.0e53197c.js";
28
+ import "../mui_extended/Tab/index.97d04d6b.js";
29
+ import "../mui_extended/Pager/index.d6c87c44.js";
29
30
  import "../mui_extended/Tooltip/index.5a795dcd.js";
30
31
  import "zustand";
31
- import "../areas/contexts/AreasContext/index.230d1584.js";
32
- import "../areas/components/AreasAdmin/index.8ab71eb9.js";
32
+ import "../areas/contexts/AreasContext/index.8af3058c.js";
33
+ import "../areas/components/AreasAdmin/index.23a09c81.js";
33
34
  import "zustand/shallow";
34
- import "../ScrollBar/index.d4410cb5.js";
35
- import "../areas/components/AreasViewer/index.933e506b.js";
35
+ import "../ScrollBar/index.65bb2930.js";
36
+ import "../areas/components/AreasViewer/index.68eb0f6b.js";
36
37
  import "../LinearProgressIndeterminate/index.60dabc06.js";
37
38
  import "../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
38
39
  import "../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
3
3
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
4
- import { g as getNameDataTestId } from "../../vendor.1af105d6.js";
4
+ import { g as getNameDataTestId } from "../../vendor.7751caf6.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { useResponsiveDesktop } from "@m4l/graphics";
7
7
  import { useModuleSkeleton } from "@m4l/core";
@@ -0,0 +1 @@
1
+ export declare const componentName = "M4LScrollBar";
@@ -0,0 +1,6 @@
1
+ import { ScrollBarClassesType } from './types';
2
+ export declare const scrollBarClasses: ScrollBarClassesType;
3
+ export declare function getScrollBarUtilityClass(slot: string): string;
4
+ export declare const useScrollBarUtilityClasses: () => {
5
+ root: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { useScrollBarUtilityClasses } from ".";
2
+ export interface ScrollBarClassesType {
3
+ root: string;
4
+ }
5
+ export declare type StackClassesKey = keyof ScrollBarClassesType;
6
+ export declare type ScrollBarClasses = ReturnType<typeof useScrollBarUtilityClasses>;
@@ -0,0 +1,121 @@
1
+ import { generateUtilityClasses, generateUtilityClass, Box } from "@mui/material";
2
+ import { styled, alpha } from "@mui/material/styles";
3
+ import SimpleBarReact from "simplebar-react";
4
+ import simpleBarCss from "simplebar/dist/simplebar.min.css?used";
5
+ import { unstable_composeClasses } from "@mui/base";
6
+ import { jsx } from "react/jsx-runtime";
7
+ const RootStyle = styled("div")(({
8
+ theme
9
+ }) => ({
10
+ flexGrow: "1",
11
+ height: "100%",
12
+ overflow: "hidden",
13
+ ...theme.components?.M4LScrollBar?.styleOverrides
14
+ }));
15
+ const SimpleBarStyle = styled(SimpleBarReact)`
16
+ /* flex-grow: 1;
17
+ height: 100%;
18
+ overflow: hidden; */
19
+ ${simpleBarCss}
20
+ height: 100%;
21
+
22
+ .simplebar-scrollbar {
23
+
24
+ .simplebar-visible:before {
25
+ opacity: 1;
26
+ }
27
+ }
28
+ .simplebar-track.simplebar-vertical {
29
+ width: 30;
30
+ }
31
+ .simplebar-track.simplebar-horizontal .simplebar-scrollbar {
32
+ height: 6;
33
+ }
34
+
35
+ .simplebar-mask {
36
+ z-index: 'inherit';
37
+ }
38
+
39
+ .simplebar-content {
40
+ // display: 'flex',
41
+ // flexDirection: 'column',
42
+ // height: '100%',
43
+ }
44
+
45
+ .simplebar-content-wrapper[style*='overflow: hidden scroll;'] {
46
+ .simplebar-content {
47
+ margin-right: 16px;
48
+ }
49
+ }
50
+ `;
51
+ styled(SimpleBarReact)(({
52
+ theme
53
+ }) => ({
54
+ height: "100%",
55
+ "& .simplebar-scrollbar": {
56
+ "&:before": {
57
+ backgroundColor: alpha(theme.palette.grey[600], 0.48)
58
+ },
59
+ "&.simplebar-visible:before": {
60
+ opacity: 1
61
+ }
62
+ },
63
+ "& .simplebar-track.simplebar-vertical": {
64
+ width: 10
65
+ },
66
+ "& .simplebar-track.simplebar-horizontal .simplebar-scrollbar": {
67
+ height: 6
68
+ },
69
+ "& .simplebar-mask": {
70
+ zIndex: "inherit"
71
+ },
72
+ "& .simplebar-content": {},
73
+ '& .simplebar-content-wrapper[style*="overflow: hidden scroll;"] ': {
74
+ "& .simplebar-content": {
75
+ marginRight: "12px"
76
+ }
77
+ }
78
+ }));
79
+ const componentName = "M4LScrollBar";
80
+ generateUtilityClasses(componentName, [
81
+ "root"
82
+ ]);
83
+ function getScrollBarUtilityClass(slot) {
84
+ return generateUtilityClass(componentName, slot);
85
+ }
86
+ const useScrollBarUtilityClasses = () => {
87
+ const slots = {
88
+ root: ["root"]
89
+ };
90
+ const composedClasses = unstable_composeClasses(slots, getScrollBarUtilityClass, {});
91
+ return {
92
+ ...composedClasses
93
+ };
94
+ };
95
+ function ScrollBar({
96
+ children
97
+ }) {
98
+ const userAgent = typeof navigator === "undefined" ? "SSR" : navigator.userAgent;
99
+ const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
100
+ if (isMobile) {
101
+ return /* @__PURE__ */ jsx(Box, {
102
+ sx: {
103
+ overflowX: "auto",
104
+ width: "100%"
105
+ },
106
+ children
107
+ });
108
+ }
109
+ const classes = useScrollBarUtilityClasses();
110
+ return /* @__PURE__ */ jsx(RootStyle, {
111
+ id: "RootStyle",
112
+ className: classes.root,
113
+ children: /* @__PURE__ */ jsx(SimpleBarStyle, {
114
+ autoHide: false,
115
+ children
116
+ })
117
+ });
118
+ }
119
+ export {
120
+ ScrollBar as S
121
+ };
@@ -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.d88a3f2e.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.435df215.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.65bb2930.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;