@m4l/components 9.2.62-B10072025beta.1 → 9.2.62-JT08072025.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.
Files changed (116) hide show
  1. package/components/AppBar/AppBar.js +10 -12
  2. package/components/AppBar/constants.d.ts +1 -1
  3. package/components/AppBar/constants.js +1 -1
  4. package/components/AppBar/slots/AppBarEnum.d.ts +5 -1
  5. package/components/AppBar/slots/AppBarEnum.js +4 -0
  6. package/components/AppBar/slots/AppBarSlots.d.ts +18 -4
  7. package/components/AppBar/slots/AppBarSlots.js +27 -3
  8. package/components/AppBar/styles.js +42 -0
  9. package/components/AppBar/types.d.ts +0 -8
  10. package/components/DataGrid/Datagrid.styles.js +12 -0
  11. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +2 -1
  12. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +6 -42
  13. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.d.ts +8 -0
  14. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.js +58 -0
  15. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.d.ts +7 -0
  16. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.js +19 -0
  17. package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +10 -3
  18. package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +2 -2
  19. package/components/DataGrid/slots/DataGridEnum.d.ts +3 -0
  20. package/components/DataGrid/slots/DataGridEnum.js +6 -1
  21. package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
  22. package/components/DataGrid/slots/DataGridSlot.js +24 -19
  23. package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
  24. package/components/DataGrid/subcomponents/HeaderActions/index.js +1 -1
  25. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Density/index.js +2 -1
  26. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
  27. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
  28. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
  29. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +2 -1
  30. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
  31. package/components/DataGrid/subcomponents/Table/index.js +1 -1
  32. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +1 -1
  33. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
  34. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  35. package/components/DataGrid/types.d.ts +3 -2
  36. package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
  37. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
  38. package/components/ObjectLogs/ObjectLogs.styles.js +2 -1
  39. package/components/ObjectLogs/slots/ObjectLogsEnum.d.ts +1 -0
  40. package/components/ObjectLogs/slots/ObjectLogsEnum.js +1 -0
  41. package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +3 -0
  42. package/components/ObjectLogs/slots/ObjectLogsSlots.js +7 -2
  43. package/components/SideBar/SideBar.js +2 -6
  44. package/components/SideBar/constants.d.ts +6 -7
  45. package/components/SideBar/constants.js +7 -7
  46. package/components/SideBar/context/sideBarContext/index.js +10 -9
  47. package/components/SideBar/context/sideBarContext/types.d.ts +10 -2
  48. package/components/SideBar/slots/SideBarEnum.d.ts +7 -7
  49. package/components/SideBar/slots/SideBarEnum.js +5 -5
  50. package/components/SideBar/slots/SideBarSlots.d.ts +9 -9
  51. package/components/SideBar/slots/SideBarSlots.js +28 -31
  52. package/components/SideBar/styles.js +3 -3
  53. package/components/SideBar/subcomponents/ContentComponent/index.js +68 -12
  54. package/components/SideBar/subcomponents/ContentComponent/style.js +103 -122
  55. package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +6 -0
  56. package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +2 -0
  57. package/components/SideBar/subcomponents/HeaderSidebar/styles.js +24 -0
  58. package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +5 -0
  59. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.d.ts +1 -1
  60. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.js +4 -4
  61. package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.js +2 -8
  62. package/components/SideBar/subcomponents/SideBarDesktop/index.js +3 -4
  63. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +32 -4
  64. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  65. package/components/SideBar/subcomponents/TreeGroupItems/index.js +3 -4
  66. package/components/SideBar/subcomponents/TreeGroupItems/styles.js +2 -90
  67. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +4 -6
  68. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -1
  69. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +3 -8
  70. package/components/SideBar/types.d.ts +7 -12
  71. package/components/areas/contexts/AreasContext/store.js +2 -2
  72. package/components/commercial/HamburgerMenu/HamburgerMenu.js +2 -1
  73. package/components/formatters/BooleanFormatter/BooleanFormatter.js +7 -4
  74. package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +9 -1
  75. package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.d.ts +2 -1
  76. package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.js +1 -0
  77. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +3 -0
  78. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +6 -1
  79. package/components/formatters/BooleanFormatter/types.d.ts +1 -1
  80. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
  81. package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +4 -5
  82. package/components/mui_extended/MenuItem/MenuItem.js +1 -1
  83. package/components/mui_extended/TabContent/TabContent.js +2 -2
  84. package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
  85. package/components/mui_extended/TabContent/types.d.ts +1 -1
  86. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
  87. package/package.json +3 -3
  88. package/storybook/components/DataGrid/DataGrid.stories.d.ts +4 -0
  89. package/storybook/components/DataGrid/helpers/icons.d.ts +6 -0
  90. package/storybook/components/DataGrid/helpers/types.d.ts +9 -0
  91. package/storybook/components/SideBar/SideBar.stories.d.ts +11 -5
  92. package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
  93. package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
  94. package/utils/getSizeStyles/getSizeStyles.d.ts +1 -1
  95. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +0 -5
  96. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +0 -37
  97. package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +0 -1
  98. package/components/SideBar/subcomponents/HeaderComponent/index.js +0 -1
  99. package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +0 -2
  100. package/components/SideBar/subcomponents/HeaderComponent/styles.js +0 -44
  101. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +0 -7
  102. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +0 -12
  103. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +0 -4
  104. package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +0 -4
  105. package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +0 -1
  106. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +0 -4
  107. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +0 -14
  108. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +0 -1
  109. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +0 -1
  110. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +0 -5
  111. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +0 -1
  112. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +0 -5
  113. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +0 -1
  114. /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.d.ts +0 -0
  115. /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/types.d.ts +0 -0
  116. /package/storybook/components/SideBar/subcomponents/{FooterComponentHost → FooterPromotion}/constants.d.ts +0 -0
@@ -5,7 +5,7 @@ const sideBarDesktopStyles = {
5
5
  * sin que se oculte por el overflow hidden que tiene el contenido del sidebar
6
6
  */
7
7
  containerDesktopContent: ({ theme, ownerState }) => {
8
- const width = ownerState?.anchored ? ownerState?.expandedWidth : ownerState?.variant === "host" ? 0 : theme.vars.size.baseSpacings.sp10;
8
+ const width = ownerState?.anchored ? ownerState?.expandedWidth : theme.vars.size.baseSpacings.sp4;
9
9
  return {
10
10
  height: "100%",
11
11
  position: "relative",
@@ -17,14 +17,42 @@ const sideBarDesktopStyles = {
17
17
  /**
18
18
  * Styles applied to the root element of the `SideBar` component in desktop mode.
19
19
  */
20
- containerDesktopRoot: ({ theme }) => ({
20
+ containerDesktopRoot: ({ ownerState, theme }) => ({
21
21
  height: "100%",
22
- width: "100%",
22
+ width: "fit-content",
23
23
  overflow: "visible",
24
- borderRight: `1px solid ${theme.vars.palette.border.secondary}`,
24
+ borderRight: `1px solid ${theme.vars.palette.border.default}`,
25
+ position: !ownerState?.anchored ? "absolute" : "relative",
25
26
  inset: 0,
26
27
  //add hover effect
27
28
  zIndex: 999
29
+ }),
30
+ /**
31
+ * Container button to achores the sidebar.
32
+ */
33
+ containerBtnAnchored: ({ theme, ownerState }) => ({
34
+ position: "absolute",
35
+ right: "-20px",
36
+ top: "20px",
37
+ zIndex: 1e3,
38
+ padding: `${theme.vars.size.baseSpacings.sp10} 10px`,
39
+ "& .MuiButtonBase-root": {
40
+ ...!ownerState?.anchored && {
41
+ "&:before": {
42
+ content: '""',
43
+ position: "absolute",
44
+ inset: 0,
45
+ backgroundColor: theme.vars.palette.background.default,
46
+ zIndex: -1
47
+ }
48
+ }
49
+ },
50
+ "&&& .M4LIconButton-root:hover": {
51
+ backgroundColor: theme.vars.palette.primary.enabled,
52
+ "& .M4LIcon-icon": {
53
+ backgroundColor: `${theme.vars.palette.primary.contrastText}!important`
54
+ }
55
+ }
28
56
  })
29
57
  };
30
58
  export {
@@ -4,7 +4,7 @@ import { u as useSideBar } from "../../hooks/useSideBar/index.js";
4
4
  import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
5
5
  import { g as getNameDataTestId } from "../../tests/utils.js";
6
6
  import { D as Drawer } from "./subcomponents/Drawer.js";
7
- import { e as ContainerSideBarMobileStyled } from "../../slots/SideBarSlots.js";
7
+ import { g as ContainerSideBarMobileStyled } from "../../slots/SideBarSlots.js";
8
8
  import { C as ContentComponent } from "../ContentComponent/index.js";
9
9
  const SideBarMobile = () => {
10
10
  const {
@@ -3,19 +3,18 @@ import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
3
3
  import { u as useSideBar } from "../../hooks/useSideBar/index.js";
4
4
  import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
5
5
  import { g as getNameDataTestId } from "../../tests/utils.js";
6
- import { f as ContainerTreeGroupItemsStyled, g as ContainerContentGroupsStyled, h as ContainerContentTitleStyled } from "../../slots/SideBarSlots.js";
6
+ import { h as ContainerTreeGroupItemsStyled, i as ContainerContentGroupsStyled, j as ContainerContentTitleStyled } from "../../slots/SideBarSlots.js";
7
7
  import { N as NodeMenuItemMain } from "./subcomponents/NodeMenuItemMain/NodeMenuItemMain.js";
8
8
  import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
9
9
  import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
10
10
  const TreeGroupItems = (contentGroupsProps) => {
11
- const { menuData, anchored } = useSideBar();
11
+ const { menuData } = useSideBar();
12
12
  const { getLabel } = useModuleDictionary();
13
13
  const { size } = contentGroupsProps;
14
14
  const { currentSize } = useComponentSize(size);
15
15
  const isSkeleton = useModuleSkeleton();
16
16
  const ownerState = {
17
- noItems: menuData.length === 0,
18
- anchored
17
+ noItems: menuData.length === 0
19
18
  };
20
19
  const renderItemsDisabled = () => {
21
20
  return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { ownerState: { disabled: true }, children: /* @__PURE__ */ jsx(
@@ -1,4 +1,3 @@
1
- import { g as getSizeStyles } from "../../../../utils/getSizeStyles/getSizeStyles.js";
2
1
  const contentGroupStyles = {
3
2
  /**
4
3
  * Container for the group items in the sidebar
@@ -10,17 +9,9 @@ const contentGroupStyles = {
10
9
  flex: 1,
11
10
  flexDirection: "column",
12
11
  overflowY: "auto",
12
+ padding: `${theme.vars.size.baseSpacings.sp3} 0px 0px 0px`,
13
13
  alignItems: "center",
14
- justifyContent: ownerState?.noItems ? "center" : "flex-start",
15
- transition: "all 0.5s",
16
- paddingTop: theme.vars.size.baseSpacings.sp3,
17
- paddingLeft: theme.vars.size.baseSpacings.sp4,
18
- paddingRight: theme.vars.size.baseSpacings.sp4,
19
- gap: theme.vars.size.baseSpacings.sp4,
20
- ...!ownerState?.anchored && !theme.generalSettings.isMobile && {
21
- transition: "all 0.5s",
22
- visibility: "hidden"
23
- }
14
+ justifyContent: ownerState?.noItems ? "center" : "flex-start"
24
15
  }),
25
16
  /**
26
17
  * Wrapper for every principal item group in the sidebar
@@ -37,7 +28,6 @@ const contentGroupStyles = {
37
28
  containerContentTitle: ({ theme, ownerState }) => ({
38
29
  padding: `${theme.vars.size.baseSpacings.sp3} ${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp1}`,
39
30
  color: theme.vars.palette.text.primary,
40
- width: "100%",
41
31
  textAlign: "left",
42
32
  "& .MuiTypography-root": {
43
33
  color: !ownerState?.disabled ? theme.vars.palette.text.primary : `${theme.vars.palette.text.primary} !important`
@@ -72,84 +62,6 @@ const contentGroupStyles = {
72
62
  alignSelf: "center",
73
63
  lineHeight: 0,
74
64
  marginLeft: "auto"
75
- }),
76
- /**
77
- * Styles applied to the container of the adornment icon in the header component
78
- */
79
- containerAdornmentIcon: ({ theme, ownerState }) => ({
80
- overflow: "hidden",
81
- borderRadius: theme.vars.size.borderRadius["r1-5"],
82
- display: "flex",
83
- justifyContent: "center",
84
- alignItems: "center",
85
- position: "relative",
86
- width: "fit-content",
87
- height: "fit-content",
88
- padding: "1px",
89
- "& .M4LIcon-root": {
90
- width: "fit-content",
91
- height: "fit-content",
92
- padding: theme.vars.size.baseSpacings["sp0-5"],
93
- "& .M4LIcon-icon": {
94
- ...getSizeStyles(
95
- theme,
96
- ownerState?.size || "medium",
97
- "case",
98
- (sizeValue) => ({
99
- width: `${sizeValue}!important`,
100
- height: `${sizeValue}!important`,
101
- minWidth: `${sizeValue}!important`,
102
- minHeight: `${sizeValue}!important`
103
- })
104
- )
105
- }
106
- },
107
- ...ownerState?.variant !== "itemActive" && ownerState?.variant !== "normal" && {
108
- "& .M4LIcon-icon": {
109
- backgroundColor: `${theme.vars.palette.chips.persianGreen.contained.colorTone}!important`
110
- }
111
- },
112
- ...ownerState?.variant === "normal" && {
113
- "& .M4LIcon-icon": {
114
- backgroundColor: `${theme.vars.palette.text.secondary}!important`
115
- }
116
- },
117
- ...ownerState?.variant === "main" && {
118
- backgroundColor: theme.vars.palette.chips.persianGreen.contained.backgroundColorTone
119
- },
120
- ...ownerState?.variant === "root" && {
121
- backgroundColor: theme.vars.palette.primary.enabled
122
- },
123
- ...ownerState?.variant === "itemActive" && {
124
- boxShadow: theme.vars.customShadows.primary2,
125
- background: `linear-gradient(to right,
126
- ${theme.vars.palette.primary.opacityGradient1},
127
- ${theme.vars.palette.primary.opacityGradient2})`,
128
- "& .M4LSideBar-backgroundAdornmentIcon": {
129
- background: theme.vars.palette.background.default
130
- },
131
- "&::before": {
132
- content: '""',
133
- position: "absolute",
134
- inset: "1.4px",
135
- background: theme.vars.palette.primary.enabledOpacity,
136
- borderRadius: "5px"
137
- },
138
- "& .M4LIcon-icon": {
139
- backgroundColor: `${theme.vars.palette.primary.enabled}!important`
140
- }
141
- }
142
- }),
143
- /**
144
- * Styles applied to the background of the adornment icon in the header component
145
- */
146
- backgroundAdornmentIcon: () => ({
147
- width: "100%",
148
- height: "100%",
149
- display: "flex",
150
- justifyContent: "center",
151
- alignItems: "center",
152
- borderRadius: "5px"
153
65
  })
154
66
  };
155
67
  export {
@@ -6,14 +6,13 @@ import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
6
6
  import { g as getNameDataTestId } from "../../../../tests/utils.js";
7
7
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
8
8
  import { l as ContainerNodeMenuItemStyled } from "../../../../slots/SideBarSlots.js";
9
- import { a as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, b as CLASS_NAME_HAS_CHILDREN, c as CLASS_NAME_ITEM_CLOSED } from "../../../../constants.js";
9
+ import { c as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, e as CLASS_NAME_HAS_CHILDREN } from "../../../../constants.js";
10
10
  import { useModuleSkeleton } from "@m4l/core";
11
- import { A as AdornmentIcon } from "../AdormentIcon/AdormentIcon.js";
12
11
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
13
12
  import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
14
13
  import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
15
14
  function NodeMenuItem(props) {
16
- const { item, size, defaultOpen = false, className, isLastSibling = false, isRoot = false } = props;
15
+ const { item, size, defaultOpen = false, className, isLastSibling = false } = props;
17
16
  const { urlIconPrefix, classes } = useSideBar();
18
17
  const { isOpen, handlerClick, hasChildren } = useCollapse(item, defaultOpen);
19
18
  const { currentSize } = useComponentSize(size);
@@ -41,12 +40,11 @@ function NodeMenuItem(props) {
41
40
  CLASS_NAME_ITEM_STATE,
42
41
  className,
43
42
  item.children && item.children.length > 0 && CLASS_NAME_HAS_CHILDREN,
44
- item.itemInTreeActive && CLASS_NAME_ITEM_IN_TREE_ACTIVE,
45
- !isOpen && CLASS_NAME_ITEM_CLOSED
43
+ item.itemInTreeActive && CLASS_NAME_ITEM_IN_TREE_ACTIVE
46
44
  ),
47
45
  label: item.title,
48
46
  selected: item.active,
49
- startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: isRoot && item.itemInTreeActive ? "root" : item.active ? "itemActive" : "normal" }),
47
+ startIcon: `${urlIconPrefix}${item.iconUrl}`,
50
48
  endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
51
49
  onClick: () => handlerClick(),
52
50
  size: currentSize
@@ -6,5 +6,4 @@ export type NodeMenuItemProps = {
6
6
  size: Extract<Sizes, 'small' | 'medium'>;
7
7
  className?: string;
8
8
  isLastSibling?: boolean;
9
- isRoot?: boolean;
10
9
  };
@@ -5,16 +5,13 @@ import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
5
5
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
6
6
  import { Collapse } from "@mui/material";
7
7
  import { N as NodeMenuItem } from "../NodeMenuItem/index.js";
8
- import { C as CLASS_NAME_IS_ROOT } from "../../../../constants.js";
8
+ import { b as CLASS_NAME_IS_ROOT } from "../../../../constants.js";
9
9
  import clsx from "clsx";
10
10
  import { useModuleSkeleton } from "@m4l/core";
11
- import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
12
- import { A as AdornmentIcon } from "../AdormentIcon/AdormentIcon.js";
13
11
  import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
14
12
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
15
13
  const NodeMenuItemMain = (props) => {
16
14
  const { item, size, defaultOpen = false } = props;
17
- const { urlIconPrefix } = useSideBar();
18
15
  const { currentSize } = useComponentSize(size);
19
16
  const { isOpen, handlerClick, hasChildren } = useCollapse(item, defaultOpen);
20
17
  const isSkeleton = useModuleSkeleton();
@@ -34,8 +31,7 @@ const NodeMenuItemMain = (props) => {
34
31
  MenuItemMainStyled,
35
32
  {
36
33
  label: item.title,
37
- startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: "main" }),
38
- endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
34
+ startIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
39
35
  onClick: () => handlerClick(),
40
36
  size: currentSize
41
37
  }
@@ -47,8 +43,7 @@ const NodeMenuItemMain = (props) => {
47
43
  size: currentSize,
48
44
  className: clsx(CLASS_NAME_IS_ROOT),
49
45
  defaultOpen: isSkeleton ? false : true,
50
- isLastSibling: item.children?.length === index + 1,
51
- isRoot: true
46
+ isLastSibling: item.children?.length === index + 1
52
47
  },
53
48
  child.title
54
49
  )) })
@@ -51,6 +51,10 @@ export interface SideBarProps {
51
51
  * Slogan de la empresa
52
52
  */
53
53
  companySlogan?: string;
54
+ /**
55
+ * Indica la variación de estilo del componente
56
+ */
57
+ variantStyle?: 'variantDefault' | 'variantComercial';
54
58
  moduleSelectedId?: string | undefined;
55
59
  onMenuItemClick: (item: MenuDataType) => void;
56
60
  /**
@@ -70,19 +74,10 @@ export interface SideBarProps {
70
74
  */
71
75
  urlIconPrefix?: string;
72
76
  /**
73
- * Variación del componente, puede ser uno de los valores definidos en 'variantDefault' , 'variantComercial'
74
- */
75
- variant?: SidebarVariants;
76
- /**
77
- * Componente que se renderiza en el encabezado del sidebar
78
- */
79
- headerComponent?: ReactElement;
80
- /**
81
- * Componente que se renderiza en el pie de página del sidebar
77
+ * Promoción del sidebar, se renderiza en el footer del sidebar
82
78
  */
83
- footerComponent?: ReactElement;
79
+ promotion?: ReactElement;
84
80
  }
85
- export type SidebarVariants = 'host' | 'microfrontend';
86
81
  /**
87
82
  * Interface que representa el estado de un elemento de menú en la barra lateral.
88
83
  */
@@ -101,7 +96,7 @@ export type SideBarOwnerState = Pick<IMenuDataWithState, 'active' | 'itemInTreeA
101
96
  export type SideBarStyles = M4LOverridesStyleRules<SideBarSlotsType, typeof SIDEBAR_KEY_COMPONENT, Theme>;
102
97
  export type SideBarDesktopStyles = M4LOverridesStyleRules<SideBarDesktopSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
103
98
  export type ContentGroupsStyles = M4LOverridesStyleRules<ContentGroupsSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
104
- export type HeaderComponentStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
99
+ export type HeaderSidebarStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
105
100
  export type SideBarFooterStyles = M4LOverridesStyleRules<SideBarFooterSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
106
101
  export type SideBarMobileStyles = M4LOverridesStyleRules<SideBarMobileSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
107
102
  export type ContentComponentStyles = M4LOverridesStyleRules<ContentComponentSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
441
441
  bounds: {
442
442
  left: MARGIN_GRIDLAYOUT,
443
443
  top: MARGIN_GRIDLAYOUT,
444
- right: -MARGIN_GRIDLAYOUT,
445
- bottom: -MARGIN_GRIDLAYOUT
444
+ right: -10,
445
+ bottom: -10
446
446
  }
447
447
  });
448
448
  }
@@ -44,7 +44,8 @@ const HamburgerMenu = (props) => {
44
44
  onToggleVisible: handlerOnVisible,
45
45
  anchored: false,
46
46
  companyLogoSmallUrl: "",
47
- companyName: ""
47
+ companyName: "",
48
+ variantStyle: "variantComercial"
48
49
  }
49
50
  )
50
51
  ]
@@ -6,7 +6,7 @@ import clsx from "clsx";
6
6
  import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
7
7
  import { B as BOOLEAN_FORMATTER_KEY_COMPONENT } from "./constants.js";
8
8
  import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
9
- import { B as BooleanFormatterRootStyled, a as BooleanFormatterIconStyled, b as BooleanFormatterChipStyled } from "./slots/BooleanFormatterSlots.js";
9
+ import { B as BooleanFormatterRootStyled, a as BooleanFormatterIconStyled, b as BooleanFormatterIconCheckFalseStyled, c as BooleanFormatterChipStyled } from "./slots/BooleanFormatterSlots.js";
10
10
  import { B as BooleanFormatterSlots } from "./slots/BooleanFormatterEnum.js";
11
11
  function getFormatBoolean(presentationType, value = false, getLabel) {
12
12
  if (presentationType === "string_yes_no") {
@@ -18,6 +18,9 @@ function getFormatBoolean(presentationType, value = false, getLabel) {
18
18
  if (presentationType === "chip_active_inactive") {
19
19
  return value ? getLabel(LABEL_BOOLEAN_ACTIVE) : getLabel(LABEL_BOOLEAN_INACTIVE);
20
20
  }
21
+ if (presentationType === "chip_yes_no") {
22
+ return value ? getLabel(LABEL_BOOLEAN_YES) : getLabel(LABEL_BOOLEAN_NO);
23
+ }
21
24
  return "";
22
25
  }
23
26
  function BooleanFormatter(props) {
@@ -29,8 +32,9 @@ function BooleanFormatter(props) {
29
32
  const ownerState = { value };
30
33
  const memoComponent = useMemo(() => {
31
34
  if (presentationType === "check") {
35
+ const IconComponent = value ? BooleanFormatterIconStyled : BooleanFormatterIconCheckFalseStyled;
32
36
  return /* @__PURE__ */ jsx(
33
- BooleanFormatterIconStyled,
37
+ IconComponent,
34
38
  {
35
39
  ownerState,
36
40
  src: value ? srcCheckTrue : srcCheckFalse,
@@ -38,14 +42,13 @@ function BooleanFormatter(props) {
38
42
  }
39
43
  );
40
44
  }
41
- if (presentationType === "chip_active_inactive") {
45
+ if (presentationType === "chip_active_inactive" || presentationType === "chip_yes_no") {
42
46
  return /* @__PURE__ */ jsx(
43
47
  BooleanFormatterChipStyled,
44
48
  {
45
49
  label: getFormatBoolean(presentationType, value, getLabel),
46
50
  ownerState,
47
51
  className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className),
48
- opacity: true,
49
52
  color: value ? "primary" : "default",
50
53
  variant: "contained"
51
54
  }
@@ -13,7 +13,15 @@ const booleanFormatterStyles = {
13
13
  */
14
14
  icon: ({ theme }) => ({
15
15
  "& .M4LIcon-icon": {
16
- backgroundColor: theme.vars.palette.chips.default.contained.backgroundColorTone
16
+ backgroundColor: theme.vars.palette.text.primary
17
+ }
18
+ }),
19
+ /**
20
+ * Estilos para el icono de false
21
+ */
22
+ iconCheckFalse: ({ theme }) => ({
23
+ "& .M4LIcon-icon": {
24
+ backgroundColor: theme.vars.palette.text.secondary
17
25
  }
18
26
  }),
19
27
  chip: {}
@@ -1,5 +1,6 @@
1
1
  export declare enum BooleanFormatterSlots {
2
2
  icon = "icon",
3
3
  root = "root",
4
- chip = "chip"
4
+ chip = "chip",
5
+ iconCheckFalse = "iconCheckFalse"
5
6
  }
@@ -2,6 +2,7 @@ var BooleanFormatterSlots = /* @__PURE__ */ ((BooleanFormatterSlots2) => {
2
2
  BooleanFormatterSlots2["icon"] = "icon";
3
3
  BooleanFormatterSlots2["root"] = "root";
4
4
  BooleanFormatterSlots2["chip"] = "chip";
5
+ BooleanFormatterSlots2["iconCheckFalse"] = "iconCheckFalse";
5
6
  return BooleanFormatterSlots2;
6
7
  })(BooleanFormatterSlots || {});
7
8
  export {
@@ -1,6 +1,9 @@
1
1
  export declare const BooleanFormatterIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').IconProps, keyof import('../../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
2
2
  ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
3
3
  }, {}, {}>;
4
+ export declare const BooleanFormatterIconCheckFalseStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').IconProps, keyof import('../../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
5
+ ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
6
+ }, {}, {}>;
4
7
  export declare const BooleanFormatterRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../mui_extended/Typography/types').TypographyProps, keyof import('../../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
5
8
  ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
6
9
  }, {}, {}>;
@@ -9,6 +9,10 @@ const BooleanFormatterIconStyled = styled(Icon, {
9
9
  name: BOOLEAN_FORMATTER_KEY_COMPONENT,
10
10
  slot: BooleanFormatterSlots.icon
11
11
  })(booleanFormatterStyles?.icon);
12
+ const BooleanFormatterIconCheckFalseStyled = styled(Icon, {
13
+ name: BOOLEAN_FORMATTER_KEY_COMPONENT,
14
+ slot: BooleanFormatterSlots.iconCheckFalse
15
+ })(booleanFormatterStyles?.iconCheckFalse);
12
16
  const BooleanFormatterRootStyled = styled(Typography, {
13
17
  name: BOOLEAN_FORMATTER_KEY_COMPONENT,
14
18
  slot: BooleanFormatterSlots.root
@@ -20,5 +24,6 @@ const BooleanFormatterChipStyled = styled(Chip, {
20
24
  export {
21
25
  BooleanFormatterRootStyled as B,
22
26
  BooleanFormatterIconStyled as a,
23
- BooleanFormatterChipStyled as b
27
+ BooleanFormatterIconCheckFalseStyled as b,
28
+ BooleanFormatterChipStyled as c
24
29
  };
@@ -8,7 +8,7 @@ import { Theme } from '@mui/material';
8
8
  * - `'string_true_false'`: Displays "True" for `true` and "False" for `false`.
9
9
  * - `'check'`: Displays an icon to represent the boolean value.
10
10
  */
11
- export type PresentationType = 'string_yes_no' | 'string_true_false' | 'check' | 'chip_active_inactive';
11
+ export type PresentationType = 'string_yes_no' | 'string_true_false' | 'check' | 'chip_active_inactive' | 'chip_yes_no';
12
12
  /**
13
13
  * Maps to the keys in `BooleanFormatterSlots`, defining slot-specific styling or customization.
14
14
  */
@@ -65,11 +65,6 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
65
65
  ...state,
66
66
  isOpen: false
67
67
  };
68
- // case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
69
- // return {
70
- // ...state,
71
- // selectedOptions: action.payload,
72
- // };
73
68
  default:
74
69
  return state;
75
70
  }
@@ -1,12 +1,11 @@
1
1
  import { g as getCommonActionsDictionary } from "../../../../CommonActions/dictionary.js";
2
- const DICTIONARY_KEY = "rhf_period";
3
2
  const dictionary = {
4
- LABEL_YEARS: `${DICTIONARY_KEY}.label_years`,
5
- LABEL_MONTHS: `${DICTIONARY_KEY}.label_months`,
6
- LABEL_DAYS: `${DICTIONARY_KEY}.label_days`
3
+ LABEL_YEARS: "period.label_years",
4
+ LABEL_MONTHS: "period.label_months",
5
+ LABEL_DAYS: "period.label_days"
7
6
  };
8
7
  function getPeriodComponetsDictionary() {
9
- return [DICTIONARY_KEY].concat(getCommonActionsDictionary());
8
+ return ["period"].concat(getCommonActionsDictionary());
10
9
  }
11
10
  export {
12
11
  dictionary as d,
@@ -94,7 +94,7 @@ const MenuItem = (props) => {
94
94
  disabled
95
95
  }
96
96
  ),
97
- /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, className: MENUITEM_CLASSES.menuItemContainer, children: [
97
+ /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, children: [
98
98
  renderIcon(startIcon, "MenuItemStartIcon", getComponentSlotRoot("MenuItemStartIcon")),
99
99
  /* @__PURE__ */ jsx(
100
100
  MenuItemTypographyStyled,
@@ -3,9 +3,9 @@ import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.j
3
3
  import { T as TAB_CONTENT_KEY_COMPONENT } from "./constants.js";
4
4
  import { T as TabContentRootStyled } from "./slots/TabContentSlots.js";
5
5
  const TabContent = (props) => {
6
- const { children, className, hasBackground = false, ...others } = props;
6
+ const { children, className, background = false, ...others } = props;
7
7
  const root = getComponentSlotRoot(TAB_CONTENT_KEY_COMPONENT);
8
- return /* @__PURE__ */ jsx(TabContentRootStyled, { className: root, ownerState: { hasBackground }, ...others, children });
8
+ return /* @__PURE__ */ jsx(TabContentRootStyled, { className: root, ownerState: { background }, ...others, children });
9
9
  };
10
10
  export {
11
11
  TabContent as T
@@ -20,7 +20,7 @@ const tabContentStyles = {
20
20
  boxSizing: "border-box",
21
21
  zIndex: "0",
22
22
  top: "-1px",
23
- ...ownerState?.hasBackground ? {
23
+ ...ownerState?.background ? {
24
24
  backgroundColor: theme.vars.palette.background.base,
25
25
  paddingLeft: theme.vars.size.baseSpacings.sp2,
26
26
  paddingRight: theme.vars.size.baseSpacings.sp2,
@@ -7,6 +7,6 @@ export interface TabContentProps extends Omit<React.HTMLAttributes<HTMLDivElemen
7
7
  children: React.ReactNode;
8
8
  style?: React.CSSProperties;
9
9
  key?: Key | null | undefined;
10
- hasBackground?: boolean;
10
+ background?: boolean;
11
11
  }
12
12
  export type TabContentStyles = M4LOverridesStyleRules<keyof typeof TabContentSlots, typeof TABS_KEY_COMPONENT, Theme>;
@@ -251,7 +251,7 @@ const useDynamicFilterAndSort = (props) => {
251
251
  name: sortApplied.columnKey,
252
252
  type: sort?.type || "string",
253
253
  urlIcon: sort?.urlIcon || "",
254
- label: sort?.label || sortApplied.columnKey
254
+ label: sortApplied.label
255
255
  },
256
256
  isSet: true,
257
257
  fixed: isFixed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.62-B10072025beta.1",
3
+ "version": "9.2.62-JT08072025.beta.1",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {
@@ -11,8 +11,8 @@
11
11
  "@googlemaps/js-api-loader": "^1.16.6",
12
12
  "@hookform/resolvers": "2.9.11",
13
13
  "@m4l/core": "^2.0.0",
14
- "@m4l/graphics": "7.1.2-B10072025beta.1",
15
- "@m4l/styles": "7.1.30-B10072025beta.1",
14
+ "@m4l/graphics": "^7.0.0",
15
+ "@m4l/styles": "^7.0.0",
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",
@@ -19,6 +19,10 @@ export declare const DataGridWithEventChangeUserColumn: Story;
19
19
  * DataGrid con columns formatters
20
20
  */
21
21
  export declare const DatagridWithFormatters: Story;
22
+ /**
23
+ * DataGrid con columns with actions
24
+ */
25
+ export declare const DatagridWithActions: Story;
22
26
  /**
23
27
  * DataGrid sin pager
24
28
  */
@@ -1,3 +1,9 @@
1
1
  export declare const icons: {
2
2
  roundRefreshIcon: string;
3
+ roundDeleteIcon: string;
4
+ addIcon: string;
5
+ editIcon: string;
6
+ printIcon: string;
7
+ activeIcon: string;
8
+ inactiveIcon: string;
3
9
  };
@@ -7,6 +7,7 @@ export interface SeedProps {
7
7
  withConcatenated?: boolean;
8
8
  withDate?: boolean;
9
9
  withIcon?: boolean;
10
+ withMultipleIcons?: boolean;
10
11
  withInteractiveCheck?: boolean;
11
12
  withNestedValue?: boolean;
12
13
  withPoints?: boolean;
@@ -15,6 +16,10 @@ export interface SeedProps {
15
16
  withSetCheck?: boolean;
16
17
  withCesar?: boolean;
17
18
  withChipStatus?: boolean;
19
+ withActions?: boolean;
20
+ withActionsUser?: boolean;
21
+ withBooleanStatus?: boolean;
22
+ withUserType?: boolean;
18
23
  }
19
24
  export type GetColumnsProps = Omit<SeedProps, 'quantity'>;
20
25
  export type ColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
@@ -48,6 +53,10 @@ export interface RowType {
48
53
  label: string;
49
54
  currentStatus: ChipStatusFormatterProps['status'];
50
55
  };
56
+ userType?: {
57
+ label: string;
58
+ currentStatus: 'superadmin' | 'admin' | 'user';
59
+ };
51
60
  }
52
61
  interface RangesUncertainty {
53
62
  cmcMin: number;