@m4l/components 9.2.58 → 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/index.d.ts +1 -1
- 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 +98 -94
- 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/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
|