@m4l/components 9.1.17 → 9.1.18
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/components/SideBar/constants.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/index.js +5 -2
- package/components/SideBar/subcomponents/ContentGroups/styles.js +11 -9
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +9 -3
- package/package.json +3 -2
|
@@ -3,4 +3,3 @@ export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
|
3
3
|
export declare const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
4
|
export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
5
5
|
export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
6
|
-
export declare const ITEM_DEFAULT = "No Items";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Renderiza el contenido de los grupos
|
|
3
3
|
* @author Andrés Quintero - automatic
|
|
4
4
|
* @createdAt 2024-11-05 17:43:01 - automatic
|
|
5
|
-
* @updatedAt 2024-12-
|
|
5
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
6
6
|
* @updatedUser Andrés Quintero - automatic
|
|
7
7
|
*/
|
|
8
8
|
export declare const ContentGroups: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,9 @@ import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
|
|
|
10
10
|
const ContentGroups = () => {
|
|
11
11
|
const { menuData } = useSideBar();
|
|
12
12
|
const { getLabel } = useModuleDictionary();
|
|
13
|
+
const ownerState = {
|
|
14
|
+
noItems: menuData.length === 0
|
|
15
|
+
};
|
|
13
16
|
const renderTitle = (title) => {
|
|
14
17
|
return /* @__PURE__ */ jsx(ContainerContentTitleTitleStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(Typography, { variant: "bodyDens", skeletonWidth: "100px", children: title }) });
|
|
15
18
|
};
|
|
@@ -17,7 +20,7 @@ const ContentGroups = () => {
|
|
|
17
20
|
return /* @__PURE__ */ jsx(ContainerContentNavItemsStyled, { ownerState: {}, children: item?.map((list, id) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: list, openSubItem: true }, id)) });
|
|
18
21
|
};
|
|
19
22
|
const renderItemsDisabled = () => {
|
|
20
|
-
return /* @__PURE__ */ jsx(ContainerContentTitleTitleStyled, { ownerState: {}, children: Array.from({ length:
|
|
23
|
+
return /* @__PURE__ */ jsx(ContainerContentTitleTitleStyled, { ownerState: {}, children: Array.from({ length: 1 }).map((_, index) => /* @__PURE__ */ jsx(
|
|
21
24
|
MenuItem,
|
|
22
25
|
{
|
|
23
26
|
disabled: true,
|
|
@@ -29,7 +32,7 @@ const ContentGroups = () => {
|
|
|
29
32
|
return /* @__PURE__ */ jsx(
|
|
30
33
|
ContainerContentGroupsRootStyled,
|
|
31
34
|
{
|
|
32
|
-
ownerState
|
|
35
|
+
ownerState,
|
|
33
36
|
role: "bodysidebar",
|
|
34
37
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("content-groups") } : {},
|
|
35
38
|
children: menuData.length > 0 ? menuData.map((itemGroup) => (
|
|
@@ -3,23 +3,24 @@ const contentGroupStyles = {
|
|
|
3
3
|
* Container for the group items in the sidebar
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-11-05 17:37:29 - automatic
|
|
6
|
-
* @updatedAt 2024-
|
|
6
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
|
-
containerContentGroupsRoot: ({ theme }) => ({
|
|
9
|
+
containerContentGroupsRoot: ({ theme, ownerState }) => ({
|
|
10
10
|
display: "flex",
|
|
11
11
|
width: "100%",
|
|
12
12
|
height: "100%",
|
|
13
13
|
flexDirection: "column",
|
|
14
14
|
overflowY: "auto",
|
|
15
15
|
padding: `${theme.vars.size.baseSpacings.sp3} 0px 0px 0px`,
|
|
16
|
-
alignItems: "center"
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
justifyContent: ownerState.noItems ? "center" : "flex-start"
|
|
17
18
|
}),
|
|
18
19
|
/**
|
|
19
20
|
* Wrapper for every principal item group in the sidebar
|
|
20
21
|
* @author Andrés Quintero - automatic
|
|
21
22
|
* @createdAt 2024-11-05 17:37:29 - automatic
|
|
22
|
-
* @updatedAt 2024-
|
|
23
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
23
24
|
* @updatedUser Andrés Quintero - automatic
|
|
24
25
|
*/
|
|
25
26
|
containerContentGroups: ({ theme }) => ({
|
|
@@ -32,7 +33,7 @@ const contentGroupStyles = {
|
|
|
32
33
|
* Title wrapper for every principal item group in the sidebar
|
|
33
34
|
* @author Andrés Quintero - automatic
|
|
34
35
|
* @createdAt 2024-11-05 17:37:29 - automatic
|
|
35
|
-
* @updatedAt 2024-
|
|
36
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
36
37
|
* @updatedUser Andrés Quintero - automatic
|
|
37
38
|
*/
|
|
38
39
|
containerContentTitle: ({ theme }) => ({
|
|
@@ -44,18 +45,19 @@ const contentGroupStyles = {
|
|
|
44
45
|
* Navigation wrapper for every principal item group in the sidebar
|
|
45
46
|
* @author Andrés Quintero - automatic
|
|
46
47
|
* @createdAt 2024-11-05 17:37:29 - automatic
|
|
47
|
-
* @updatedAt 2024-
|
|
48
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
48
49
|
* @updatedUser Andrés Quintero - automatic
|
|
49
50
|
*/
|
|
50
|
-
containerContentNavItems: () => ({
|
|
51
|
+
containerContentNavItems: ({ theme }) => ({
|
|
51
52
|
display: "flex",
|
|
52
|
-
flexDirection: "column"
|
|
53
|
+
flexDirection: "column",
|
|
54
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
53
55
|
}),
|
|
54
56
|
/**
|
|
55
57
|
*Container for the items in the sidebar group
|
|
56
58
|
* @author Andrés Quintero - automatic
|
|
57
59
|
* @createdAt 2024-11-05 17:37:29 - automatic
|
|
58
|
-
* @updatedAt 2024-
|
|
60
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
59
61
|
* @updatedUser Andrés Quintero - automatic
|
|
60
62
|
*/
|
|
61
63
|
containerContentItem: ({ theme }) => ({
|
|
@@ -3,14 +3,15 @@ const containerMenuItemsMainStyles = {
|
|
|
3
3
|
* Style aplicado al contenedor de los items del menú
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-11-19 20:54:12 - automatic
|
|
6
|
-
* @updatedAt 2024-12-
|
|
6
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
9
|
containerMenuItems: ({ theme }) => ({
|
|
10
10
|
marginLeft: theme.vars.size.baseSpacings.sp4,
|
|
11
|
-
padding: `${theme.vars.size.baseSpacings[
|
|
11
|
+
/* padding: `${theme.vars.size.baseSpacings['sp0-5']} 0`, */
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "column",
|
|
14
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
14
15
|
'&.M4LListMenuItem-root > [class*="inTreeActive"]': {
|
|
15
16
|
justifyContent: "space-between",
|
|
16
17
|
borderColor: theme.vars.palette.divider,
|
|
@@ -24,13 +25,18 @@ const containerMenuItemsMainStyles = {
|
|
|
24
25
|
"& span": {
|
|
25
26
|
color: theme.vars.palette.primary.main
|
|
26
27
|
}
|
|
28
|
+
},
|
|
29
|
+
"& .MuiCollapse-wrapperInner": {
|
|
30
|
+
display: "flex",
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
27
33
|
}
|
|
28
34
|
}),
|
|
29
35
|
/**
|
|
30
36
|
*Style para el contenedor del icono de flecha que indica si el item está colapsado o descolapsado para los items padres
|
|
31
37
|
* @author Andrés Quintero - automatic
|
|
32
38
|
* @createdAt 2024-11-19 20:54:12 - automatic
|
|
33
|
-
* @updatedAt 2024-12-
|
|
39
|
+
* @updatedAt 2024-12-10 11:21:21 - automatic
|
|
34
40
|
* @updatedUser Andrés Quintero - automatic
|
|
35
41
|
*/
|
|
36
42
|
containerArrowIconRoot: () => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.18",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"lint-staged": {
|
|
6
6
|
"*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
11
11
|
"@hookform/resolvers": "^2.9.5",
|
|
12
12
|
"@microlink/react-json-view": "^1.23.3",
|
|
13
|
+
"@types/lodash-es": "^4.17.12",
|
|
13
14
|
"atmosphere.js": "^4.0.0",
|
|
14
15
|
"chart.js": "^4.4.0",
|
|
15
16
|
"chartjs-chart-error-bars": "^4.3.3",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"leaflet": "^1.9.4",
|
|
25
26
|
"leaflet-polylinedecorator": "^1.6.0",
|
|
26
27
|
"leaflet.markercluster": "^1.5.3",
|
|
27
|
-
"lodash-es": "^4.
|
|
28
|
+
"lodash-es": "^4.17.21",
|
|
28
29
|
"nprogress": "^0.2.0",
|
|
29
30
|
"qrcode.react": "^3.1.0",
|
|
30
31
|
"qs": "^6.0.0",
|