@m4l/components 9.2.59 → 9.2.60-13062025.beta.1
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/.storybook/decorators/WithAppearanceContext/WithAppearanceContext.d.ts +1 -1
- package/.storybook/decorators/WithWindowsToolsAndParmsMFContexts/WithWindowsToolsAndParmsMFContexts.d.ts +5 -0
- package/components/DataGrid/Datagrid.styles.js +4 -12
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +4 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +87 -91
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
- package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
- package/components/DynamicFilter/store/DynamicFilterContext.js +5 -6
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +23 -18
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
- package/components/DynamicSort/DynamicSort.styles.js +86 -87
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
- package/components/DynamicSort/slots/DynamicSortSlots.js +5 -21
- package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
- package/components/DynamicSort/slots/SlotsEnum.js +1 -4
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +21 -17
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/PaperForm/styles.js +2 -1
- package/components/PropertyValue/PropertyValue.styles.js +2 -1
- package/components/SideBar/SideBar.js +4 -2
- package/components/SideBar/constants.d.ts +26 -2
- package/components/SideBar/constants.js +19 -7
- package/components/SideBar/context/sideBarContext/index.js +19 -5
- package/components/SideBar/context/sideBarContext/types.d.ts +22 -1
- package/components/SideBar/helpers/getMenuDataWithState/index.js +22 -8
- package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +9 -11
- package/components/SideBar/slots/SideBarSlots.d.ts +9 -3
- package/components/SideBar/slots/SideBarSlots.js +36 -28
- package/components/SideBar/styles.js +2 -4
- package/components/SideBar/subcomponents/ContentComponent/index.js +39 -19
- package/components/SideBar/subcomponents/ContentComponent/style.js +166 -22
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.js +8 -15
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.js +2 -2
- package/components/SideBar/subcomponents/Promotion/types.d.ts +5 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +10 -14
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/index.js +16 -18
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.js +5 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +53 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +8 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +55 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
- package/components/SideBar/types.d.ts +7 -3
- package/components/WindowBase/WindowBase.js +4 -1
- package/components/WindowBase/WindowBase.styles.js +48 -13
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +10 -0
- package/components/WindowBase/hooks/useDynamicMFParameters/index.js +2 -2
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
- package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +5 -3
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
- package/components/WindowBase/types.d.ts +11 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +17 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +8 -5
- package/components/areas/contexts/AreasContext/store.js +18 -2
- package/components/areas/contexts/AreasContext/types.d.ts +2 -0
- package/components/areas/hooks/index.d.ts +0 -1
- package/components/areas/types.d.ts +4 -0
- package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
- package/components/extended/React-resizable-panels/constants.d.ts +6 -0
- package/components/extended/React-resizable-panels/constants.js +5 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/components/mui_extended/Accordion/styles.js +1 -0
- package/components/mui_extended/Divider/index.d.ts +1 -0
- package/components/mui_extended/Divider/index.js +1 -0
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -2
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -1
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/index.js +67 -67
- package/package.json +19 -18
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +3 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
- package/.storybook/decorators/WithWindowsToolsContext/WithContextWindowTools.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
- package/components/areas/hooks/useSetWindowsTitle/index.d.ts +0 -1
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.d.ts +0 -6
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.js +0 -31
- package/storybook/components/WindowBase/subcomponents/WithContextWindowToolsProvider.d.ts +0 -5
- package/storybook/components/commonActions/components/ActionFormCancel/WindowToolsMFProvider.d.ts +0 -5
- /package/components/{areas/hooks/useSetWindowsTitle → SideBar/hooks/useCollapse}/index.js +0 -0
- /package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.60-13062025.beta.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@geoman-io/leaflet-geoman-free": "^2.14.2",
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
|
-
"@hookform/resolvers": "
|
|
12
|
+
"@hookform/resolvers": "2.9.11",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
|
-
"@m4l/graphics": "
|
|
15
|
-
"@m4l/styles": "
|
|
14
|
+
"@m4l/graphics": "7.1.2-13062025.beta.1",
|
|
15
|
+
"@m4l/styles": "7.1.29-13062025.beta.1",
|
|
16
16
|
"@microlink/react-json-view": "^1.23.3",
|
|
17
17
|
"@mui/lab": "5.0.0-alpha.173",
|
|
18
18
|
"@mui/material": "5.16.7",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"leaflet.markercluster": "^1.5.3",
|
|
32
32
|
"nprogress": "^0.2.0",
|
|
33
33
|
"qrcode.react": "^3.1.0",
|
|
34
|
-
"react": "
|
|
34
|
+
"react": "18.3.1",
|
|
35
35
|
"react-chartjs-2": "^5.2.0",
|
|
36
36
|
"react-color": "^2.19.3",
|
|
37
37
|
"react-data-grid": "7.0.0-beta.13",
|
|
38
38
|
"react-dnd": "^16.0.1",
|
|
39
39
|
"react-dnd-html5-backend": "^16.0.1",
|
|
40
|
-
"react-dom": "
|
|
40
|
+
"react-dom": "18.3.1",
|
|
41
41
|
"react-draggable": "^4.4.5",
|
|
42
42
|
"react-dropzone": "^14.2.2",
|
|
43
43
|
"react-helmet-async": "^2.0.5",
|
|
@@ -54,25 +54,26 @@
|
|
|
54
54
|
"react-window": "^1.8.11",
|
|
55
55
|
"simplebar-react": "3.2.6",
|
|
56
56
|
"storybook-multilevel-sort": "^2.0.1",
|
|
57
|
-
"yup": "
|
|
57
|
+
"yup": "0.32.11",
|
|
58
58
|
"zustand": "4.3.6"
|
|
59
59
|
},
|
|
60
60
|
"resolutions": {
|
|
61
|
-
"react": "
|
|
62
|
-
"@types/react": "
|
|
63
|
-
"@types/react-dom": "
|
|
64
|
-
"react-dom": "
|
|
65
|
-
"storybook": "^8.3.4",
|
|
61
|
+
"react": "18.3.1",
|
|
62
|
+
"@types/react": "18.3.23",
|
|
63
|
+
"@types/react-dom": "18.3.7",
|
|
64
|
+
"react-dom": "18.3.1",
|
|
66
65
|
"attr-accept": "2.2.2",
|
|
67
|
-
"@vitejs/plugin-react": "4.3.4"
|
|
66
|
+
"@vitejs/plugin-react": "4.3.4",
|
|
67
|
+
"storybook": "8.3.4",
|
|
68
|
+
"@storybook/react": "8.3.4"
|
|
68
69
|
},
|
|
69
70
|
"overrides": {
|
|
70
71
|
"glob": "^10.4.5",
|
|
71
|
-
"eslint": "
|
|
72
|
-
"react": "
|
|
73
|
-
"@types/react": "
|
|
74
|
-
"@types/react-dom": "
|
|
75
|
-
"react-dom": "
|
|
72
|
+
"eslint": "9.28.0",
|
|
73
|
+
"react": "18.3.1",
|
|
74
|
+
"@types/react": "18.3.23",
|
|
75
|
+
"@types/react-dom": "18.3.7",
|
|
76
|
+
"react-dom": "18.3.1",
|
|
76
77
|
"attr-accept": "2.2.2"
|
|
77
78
|
},
|
|
78
79
|
"files": [
|
|
@@ -8,26 +8,42 @@ type Story = StoryObj<typeof DynamicFilter>;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const Base: Story;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Filtro habilitado automático con filtros aplicados.
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const H001_EnabledAutomaticFiltersApplied: Story;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Filtro habilitado automático sin filtros aplicados.
|
|
16
|
+
*/
|
|
17
|
+
export declare const H002_EnabledAutomaticNoFiltersApplied: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Filtro habilitado automático sin filtros aplicados, con PopoverMenuFields abierto.
|
|
20
|
+
*/
|
|
21
|
+
export declare const H003_EnabledAutomaticNoFiltersAppliedPopoverMenuFieldsOpen: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Filtro habilitado automático sin filtros aplicados, con popoverFilter abierto.
|
|
16
24
|
*/
|
|
17
|
-
export declare const
|
|
25
|
+
export declare const H004_EnabledAutomaticNoFiltersAppliedPopoverFilterOpen: Story;
|
|
18
26
|
/**
|
|
19
|
-
*
|
|
27
|
+
* Filtro habilitado En formato manual con filtros aplicados, no dirty.
|
|
20
28
|
*/
|
|
21
|
-
export declare const
|
|
29
|
+
export declare const H005_EnabledManualFiltersAppliedNoDirty: Story;
|
|
22
30
|
/**
|
|
23
|
-
*
|
|
31
|
+
* Filtro habilitado En formato manual con filtros aplicados y en estado dirty.
|
|
32
|
+
*/
|
|
33
|
+
export declare const H006_EnabledManualFiltersAppliedDirty: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Filtro habilitado En formato manual sin filtros aplicados.
|
|
36
|
+
*/
|
|
37
|
+
export declare const H007_EnabledManualNoFiltersApplied: Story;
|
|
38
|
+
/**
|
|
39
|
+
* DynamicFilter With props `visibleRefresh=true`
|
|
24
40
|
*/
|
|
25
|
-
export declare const
|
|
41
|
+
export declare const H008_WithAutomaticVisibleRefreshFalse: Story;
|
|
26
42
|
/**
|
|
27
|
-
* DynamicFilter
|
|
43
|
+
* DynamicFilter con skeleton
|
|
28
44
|
*/
|
|
29
|
-
export declare const
|
|
45
|
+
export declare const H009_WithSkeleton: Story;
|
|
30
46
|
/**
|
|
31
47
|
* DynamicFilter with errors
|
|
32
48
|
*/
|
|
33
|
-
export declare const
|
|
49
|
+
export declare const H010_WithErrors: Story;
|
|
@@ -8,22 +8,38 @@ type Story = StoryObj<typeof DynamicSort>;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const Base: Story;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* sort habilitado automático con sorts aplicados.
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const H001_EnabledAutomaticSortsApplied: Story;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* sort habilitado automático sin sorts aplicados.
|
|
16
16
|
*/
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const H002_EnabledAutomaticNoSortsApplied: Story;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* sort habilitado automático sin sorts aplicados, con PopoverMenuFields abierto.
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const H003_EnabledAutomaticNoSortsAppliedPopoverMenuFieldsOpen: Story;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* sort habilitado automático sin sorts aplicados, con popoverSort abierto.
|
|
24
24
|
*/
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const H004_EnabledAutomaticNoSortsAppliedPopoverSortOpen: Story;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* sort habilitado En formato manual con sorts aplicados, no dirty.
|
|
28
28
|
*/
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const H005_EnabledManualSortsAppliedNoDirty: Story;
|
|
30
|
+
/**
|
|
31
|
+
* sort habilitado En formato manual con sorts aplicados y en estado dirty.
|
|
32
|
+
*/
|
|
33
|
+
export declare const H006_EnabledManualSortsAppliedDirty: Story;
|
|
34
|
+
/**
|
|
35
|
+
* sort habilitado En formato manual sin sorts aplicados.
|
|
36
|
+
*/
|
|
37
|
+
export declare const H007_EnabledManualNoSortsApplied: Story;
|
|
38
|
+
/**
|
|
39
|
+
* DynamicSort With props `visibleRefresh=true`
|
|
40
|
+
*/
|
|
41
|
+
export declare const H008_WithAutomaticVisibleRefreshFalse: Story;
|
|
42
|
+
/**
|
|
43
|
+
* DynamicSort con skeleton
|
|
44
|
+
*/
|
|
45
|
+
export declare const H009_WithSkeleton: Story;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const POWERBY_LABEL = "label_powerby";
|
|
2
|
+
export declare const IMAGE_ILLUSTRATION = "https://s3.us-east-1.amazonaws.com/static.assets.gclick/frontend/images/promotional/sidebar/assets/img/illustration.svg";
|
|
3
|
+
export declare const IMAGE_POWERBY = "https://s3.us-east-1.amazonaws.com/static.assets.gclick/frontend/images/promotional/sidebar/assets/img/powerby.svg";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FooterPromotion } from './FooterPromotion';
|
package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Collapse } from "@mui/material";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { useIsMobile } from "@m4l/graphics";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
|
|
7
|
-
import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
|
|
8
|
-
import { g as getNameDataTestId } from "../../../../tests/utils.js";
|
|
9
|
-
import { A as ArrowIcon } from "./subcomponents/ArrowIcon/index.js";
|
|
10
|
-
import { h as ContainerMenuItemsStyled } from "../../../../slots/SideBarSlots.js";
|
|
11
|
-
import { a as getComponentSlotRoot } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
12
|
-
import { I as ITEM_ACTIVE, b as ITEM_IN_TREE_ACTIVE, L as LIST_MENU_ITEM } from "../../../../constants.js";
|
|
13
|
-
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
14
|
-
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
15
|
-
function ContainerMenuItemsMain(props) {
|
|
16
|
-
const { item, size } = props;
|
|
17
|
-
const { onMenuItemClick, onToggleVisible, urlIconPrefix } = useSideBar();
|
|
18
|
-
const [openSub, setOpenSub] = useState(props.openSubItem ?? false);
|
|
19
|
-
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
20
|
-
const isMobile = useIsMobile();
|
|
21
|
-
const { currentSize } = useComponentSize(size);
|
|
22
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
23
|
-
const ownerState = {
|
|
24
|
-
active: item.active,
|
|
25
|
-
itemInTreeActive: item.itemInTreeActive,
|
|
26
|
-
sidebarSize: adjustedSize
|
|
27
|
-
};
|
|
28
|
-
const handlerClick = () => {
|
|
29
|
-
onMenuItemClick(item);
|
|
30
|
-
setOpenSub(!openSub);
|
|
31
|
-
if (isMobile && (!hasChildren || hasChildren === void 0)) {
|
|
32
|
-
onToggleVisible(true);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const classRoot = getComponentSlotRoot(LIST_MENU_ITEM);
|
|
36
|
-
return /* @__PURE__ */ jsxs(
|
|
37
|
-
ContainerMenuItemsStyled,
|
|
38
|
-
{
|
|
39
|
-
className: clsx(classRoot),
|
|
40
|
-
role: "listitem",
|
|
41
|
-
ownerState,
|
|
42
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("menuItems") } : {},
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
MenuItem,
|
|
46
|
-
{
|
|
47
|
-
className: clsx(item.active ? ITEM_ACTIVE : ITEM_IN_TREE_ACTIVE),
|
|
48
|
-
label: item.title,
|
|
49
|
-
selected: item.active || item.itemInTreeActive,
|
|
50
|
-
startIcon: `${urlIconPrefix}${item.iconUrl}`,
|
|
51
|
-
endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: openSub, active: item.active }) : null,
|
|
52
|
-
onClick: () => handlerClick(),
|
|
53
|
-
size: adjustedSize
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
hasChildren ? /* @__PURE__ */ jsx(Collapse, { in: openSub, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: child, size: adjustedSize }, child.title)) }) : null
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
ContainerMenuItemsMain as C
|
|
63
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { a as getHeightSizeStyles } from "../../../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
-
import { I as ITEM_ACTIVE, b as ITEM_IN_TREE_ACTIVE } from "../../../../constants.js";
|
|
3
|
-
const containerMenuItemsMainStyles = {
|
|
4
|
-
/**
|
|
5
|
-
* Style aplicado al contenedor de los items del menú
|
|
6
|
-
*/
|
|
7
|
-
containerMenuItems: ({ theme, ownerState }) => ({
|
|
8
|
-
marginLeft: theme.vars.size.baseSpacings.sp4,
|
|
9
|
-
display: "flex",
|
|
10
|
-
flexDirection: "column",
|
|
11
|
-
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
12
|
-
...getHeightSizeStyles(
|
|
13
|
-
theme.generalSettings.isMobile,
|
|
14
|
-
ownerState?.size || "medium",
|
|
15
|
-
"container",
|
|
16
|
-
(height) => {
|
|
17
|
-
return {
|
|
18
|
-
height: "auto",
|
|
19
|
-
minHeight: height
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
),
|
|
23
|
-
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"]`]: {
|
|
24
|
-
borderColor: theme.vars.palette.divider,
|
|
25
|
-
"& span": {
|
|
26
|
-
color: theme.vars.palette.text.primary
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
|
|
30
|
-
background: theme.vars.palette.text.primary
|
|
31
|
-
},
|
|
32
|
-
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_ACTIVE}"]`]: {
|
|
33
|
-
borderColor: theme.vars.palette.primary.enabled,
|
|
34
|
-
"& span": {
|
|
35
|
-
color: theme.vars.palette.primary.enabled
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"& .MuiCollapse-wrapperInner": {
|
|
39
|
-
display: "flex",
|
|
40
|
-
flexDirection: "column",
|
|
41
|
-
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
containerMenuItemsMainStyles as c
|
|
47
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { k as ContainerHeaderSidebarRootStyled, l as ContainerTitleSubtitleStyled } from "../../slots/SideBarSlots.js";
|
|
3
|
-
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
4
|
-
import { I as Image } from "../../../Image/Image.js";
|
|
5
|
-
const HeaderSidebar = ({ srcIcon, title, subtitle }) => {
|
|
6
|
-
return /* @__PURE__ */ jsxs(ContainerHeaderSidebarRootStyled, { role: "heading", children: [
|
|
7
|
-
/* @__PURE__ */ jsx(
|
|
8
|
-
Image,
|
|
9
|
-
{
|
|
10
|
-
width: "24px",
|
|
11
|
-
height: "24px",
|
|
12
|
-
src: srcIcon,
|
|
13
|
-
alt: "logo"
|
|
14
|
-
},
|
|
15
|
-
"Logo"
|
|
16
|
-
),
|
|
17
|
-
/* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { children: [
|
|
18
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitleDens", size: "medium", skeletonWidth: 120, children: title }),
|
|
19
|
-
/* @__PURE__ */ jsx(Typography, { variant: "paragraph", size: "medium", margin: 0, skeletonWidth: 150, children: subtitle })
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
HeaderSidebar as H
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useSetWindowsTitle';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { shallow } from "zustand/shallow";
|
|
3
|
-
import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { u as useWindowToolsMF } from "../../../WindowBase/hooks/useWindowToolsMF/index.js";
|
|
5
|
-
import { u as useDynamicMFParametersStore } from "../../../WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
6
|
-
const titleLabels = {
|
|
7
|
-
moduleName: "module_name",
|
|
8
|
-
moduleNameAdd: "module_name_add",
|
|
9
|
-
moduleNameEdit: "module_name_edit"
|
|
10
|
-
};
|
|
11
|
-
function useSetWindowsTitle({
|
|
12
|
-
isAddEditModule = false
|
|
13
|
-
} = {}) {
|
|
14
|
-
const isFlagPresent = useFlagsPresent([CommonFlags.FLAG_DICTIONARY_LOADED]);
|
|
15
|
-
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const { setWindowTitle } = useWindowToolsMF();
|
|
17
|
-
const id = useDynamicMFParametersStore(
|
|
18
|
-
// objectId or id puede ser el nombre del parametro del con el Id que se está editando en los modulos add/edit
|
|
19
|
-
(state) => state.dynamicMFParameters?.objectId || state.dynamicMFParameters?.id,
|
|
20
|
-
shallow
|
|
21
|
-
);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (isFlagPresent) {
|
|
24
|
-
const labelKey = isAddEditModule ? id ? titleLabels.moduleNameEdit : titleLabels.moduleNameAdd : titleLabels.moduleName;
|
|
25
|
-
setWindowTitle(getLabel(labelKey));
|
|
26
|
-
}
|
|
27
|
-
}, [getLabel, isFlagPresent]);
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
useSetWindowsTitle as u
|
|
31
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|