@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.
Files changed (131) hide show
  1. package/.storybook/decorators/WithAppearanceContext/WithAppearanceContext.d.ts +1 -1
  2. package/.storybook/decorators/WithWindowsToolsAndParmsMFContexts/WithWindowsToolsAndParmsMFContexts.d.ts +5 -0
  3. package/components/DataGrid/Datagrid.styles.js +4 -12
  4. package/components/DataGrid/contexts/DataGridContext/types.d.ts +4 -0
  5. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
  6. package/components/DynamicFilter/DynamicFilter.styles.js +87 -91
  7. package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
  8. package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
  9. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
  10. package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
  11. package/components/DynamicFilter/store/DynamicFilterContext.js +5 -6
  12. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
  13. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
  14. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
  15. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
  16. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +23 -18
  17. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
  18. package/components/DynamicSort/DynamicSort.styles.js +86 -87
  19. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
  20. package/components/DynamicSort/slots/DynamicSortSlots.js +5 -21
  21. package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
  22. package/components/DynamicSort/slots/SlotsEnum.js +1 -4
  23. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
  24. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +21 -17
  25. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
  26. package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
  27. package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
  28. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
  29. package/components/PaperForm/styles.js +2 -1
  30. package/components/PropertyValue/PropertyValue.styles.js +2 -1
  31. package/components/SideBar/SideBar.js +4 -2
  32. package/components/SideBar/constants.d.ts +26 -2
  33. package/components/SideBar/constants.js +19 -7
  34. package/components/SideBar/context/sideBarContext/index.js +19 -5
  35. package/components/SideBar/context/sideBarContext/types.d.ts +22 -1
  36. package/components/SideBar/helpers/getMenuDataWithState/index.js +22 -8
  37. package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
  38. package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
  39. package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
  40. package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
  41. package/components/SideBar/slots/SideBarEnum.js +9 -11
  42. package/components/SideBar/slots/SideBarSlots.d.ts +9 -3
  43. package/components/SideBar/slots/SideBarSlots.js +36 -28
  44. package/components/SideBar/styles.js +2 -4
  45. package/components/SideBar/subcomponents/ContentComponent/index.js +39 -19
  46. package/components/SideBar/subcomponents/ContentComponent/style.js +166 -22
  47. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.d.ts +2 -2
  48. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.js +8 -15
  49. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.js +2 -2
  50. package/components/SideBar/subcomponents/Promotion/types.d.ts +5 -0
  51. package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
  52. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +10 -14
  53. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  54. package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
  55. package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/index.js +16 -18
  56. package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.js +5 -7
  57. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
  58. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
  59. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +53 -0
  60. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +8 -0
  61. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
  62. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +55 -0
  63. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
  64. package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
  65. package/components/SideBar/types.d.ts +7 -3
  66. package/components/WindowBase/WindowBase.js +4 -1
  67. package/components/WindowBase/WindowBase.styles.js +48 -13
  68. package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +10 -0
  69. package/components/WindowBase/hooks/useDynamicMFParameters/index.js +2 -2
  70. package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
  71. package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
  72. package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
  73. package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
  74. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +5 -3
  75. package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
  76. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
  77. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
  78. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
  79. package/components/WindowBase/types.d.ts +11 -0
  80. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +17 -0
  81. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +1 -0
  82. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +2 -0
  83. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +8 -5
  84. package/components/areas/contexts/AreasContext/store.js +18 -2
  85. package/components/areas/contexts/AreasContext/types.d.ts +2 -0
  86. package/components/areas/hooks/index.d.ts +0 -1
  87. package/components/areas/types.d.ts +4 -0
  88. package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
  89. package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
  90. package/components/extended/React-resizable-panels/constants.d.ts +6 -0
  91. package/components/extended/React-resizable-panels/constants.js +5 -1
  92. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
  93. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
  94. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
  95. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
  96. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
  97. package/components/mui_extended/Accordion/styles.js +1 -0
  98. package/components/mui_extended/Divider/index.d.ts +1 -0
  99. package/components/mui_extended/Divider/index.js +1 -0
  100. package/components/mui_extended/TabContent/TabContent.styles.js +2 -2
  101. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  102. package/components/mui_extended/index.d.ts +1 -0
  103. package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -1
  104. package/hooks/useDynamicFilterAndSort/styles.js +1 -1
  105. package/index.js +67 -67
  106. package/package.json +19 -18
  107. package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
  108. package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
  109. package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
  110. package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +3 -0
  111. package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
  112. package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
  113. package/.storybook/decorators/WithWindowsToolsContext/WithContextWindowTools.d.ts +0 -5
  114. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
  115. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
  116. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
  117. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
  118. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
  119. package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
  120. package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
  121. package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
  122. package/components/areas/hooks/useSetWindowsTitle/index.d.ts +0 -1
  123. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.d.ts +0 -6
  124. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.js +0 -31
  125. package/storybook/components/WindowBase/subcomponents/WithContextWindowToolsProvider.d.ts +0 -5
  126. package/storybook/components/commonActions/components/ActionFormCancel/WindowToolsMFProvider.d.ts +0 -5
  127. /package/components/{areas/hooks/useSetWindowsTitle → SideBar/hooks/useCollapse}/index.js +0 -0
  128. /package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.d.ts +0 -0
  129. /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
  130. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
  131. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
@@ -1,8 +1,9 @@
1
1
  import { Sizes } from '@m4l/styles';
2
- import { ContainerMenuItemsMainSlots, ContentComponentSlots, ContentGroupsSlots, HeaderSidebarSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots } from './slots/SideBarEnum';
2
+ import { ContentComponentSlots, ContentGroupsSlots, HeaderSidebarSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots } from './slots/SideBarEnum';
3
3
  import { SIDEBAR_KEY_COMPONENT } from './constants';
4
4
  import { Theme } from '@mui/material/styles';
5
5
  import { M4LOverridesStyleRules } from '../../@types/augmentations';
6
+ import { ReactElement } from 'react';
6
7
  /**
7
8
  * define la estructura de datos para un elemento de menú en la barra lateral.
8
9
  */
@@ -72,6 +73,10 @@ export interface SideBarProps {
72
73
  * Prefijo de la url de los iconos
73
74
  */
74
75
  urlIconPrefix?: string;
76
+ /**
77
+ * Promoción del sidebar, se renderiza en el footer del sidebar
78
+ */
79
+ promotion?: ReactElement;
75
80
  }
76
81
  /**
77
82
  * Interface que representa el estado de un elemento de menú en la barra lateral.
@@ -84,12 +89,11 @@ export interface IMenuDataWithState extends MenuDataType {
84
89
  /**
85
90
  * OwnerState con las propiedades de estado del sideBar
86
91
  */
87
- export type SideBarSlotsType = ContainerMenuItemsMainSlots | SideBarDesktopSlots | ContentGroupsSlots | HeaderSidebarSlots | SideBarFooterSlots | SideBarMobileSlots | ContentComponentSlots;
92
+ export type SideBarSlotsType = SideBarDesktopSlots | ContentGroupsSlots | HeaderSidebarSlots | SideBarFooterSlots | SideBarMobileSlots | ContentComponentSlots;
88
93
  export type SideBarOwnerState = Pick<IMenuDataWithState, 'active' | 'itemInTreeActive'> & {
89
94
  [key: string]: any;
90
95
  };
91
96
  export type SideBarStyles = M4LOverridesStyleRules<SideBarSlotsType, typeof SIDEBAR_KEY_COMPONENT, Theme>;
92
- export type ContainerMenuItemsMainStyles = M4LOverridesStyleRules<ContainerMenuItemsMainSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
93
97
  export type SideBarDesktopStyles = M4LOverridesStyleRules<SideBarDesktopSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
94
98
  export type ContentGroupsStyles = M4LOverridesStyleRules<ContentGroupsSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
95
99
  export type HeaderSidebarStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
@@ -26,6 +26,7 @@ const WindowBase = (props) => {
26
26
  onMouseDown,
27
27
  editionInfo,
28
28
  type = "layout",
29
+ collapsed,
29
30
  ...other
30
31
  } = props;
31
32
  const { currentSize } = useComponentSize(size);
@@ -35,7 +36,8 @@ const WindowBase = (props) => {
35
36
  variant: computedVariant,
36
37
  size: currentSize,
37
38
  type,
38
- maximized
39
+ maximized,
40
+ collapsed
39
41
  };
40
42
  return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
41
43
  WindowBaseStyled,
@@ -55,6 +57,7 @@ const WindowBase = (props) => {
55
57
  variant,
56
58
  selected,
57
59
  maximized,
60
+ collapsed,
58
61
  onClose,
59
62
  type,
60
63
  ...other
@@ -1,4 +1,4 @@
1
- import { alpha } from "@mui/material";
1
+ import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
2
2
  import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
3
3
  const windowBaseStyles = {
4
4
  /**
@@ -64,7 +64,10 @@ const windowBaseStyles = {
64
64
  overflow: "auto",
65
65
  width: "100%",
66
66
  height: "100%",
67
- zIndex: 1
67
+ zIndex: 1,
68
+ ...ownerState?.collapsed && !ownerState?.maximized && {
69
+ display: "none"
70
+ }
68
71
  }),
69
72
  /**
70
73
  * Styles for the header of the window base component.
@@ -99,8 +102,8 @@ const windowBaseStyles = {
99
102
  )
100
103
  },
101
104
  borderBottom: "1px solid #ffffff00",
102
- ...ownerState?.selected && ownerState?.type === "layout" && ownerState?.variant === "outlined" ? {
103
- background: `linear-gradient(to right, ${alpha(theme.palette.primary.opacity, 0.04)}, ${alpha(theme.palette.primary.opacity, 0)});`,
105
+ ...ownerState?.selected && ownerState?.type === "layout" && ownerState?.variant === "outlined" && !ownerState?.maximized ? {
106
+ background: `linear-gradient(to right, ${theme.vars.palette.primary.opacity}, #ffffff00);`,
104
107
  "&::before": {
105
108
  content: '""',
106
109
  position: "absolute",
@@ -108,7 +111,7 @@ const windowBaseStyles = {
108
111
  left: 0,
109
112
  width: "100%",
110
113
  height: "1px",
111
- background: `linear-gradient(to left, ${alpha(theme.palette.primary.opacity, 0.06)}, ${alpha(theme.palette.primary.opacity, 0)});`
114
+ background: `linear-gradient(to left, ${theme.vars.palette.primary.opacityGradient2}, #ffffff00);`
112
115
  }
113
116
  } : {
114
117
  background: "transparent",
@@ -145,7 +148,16 @@ const windowBaseStyles = {
145
148
  textOverflow: "ellipsis",
146
149
  paddingLeft: theme.vars.size.baseSpacings.sp2,
147
150
  userSelect: "none",
148
- cursor: "all-scroll"
151
+ cursor: "all-scroll",
152
+ ...ownerState?.maximized && {
153
+ "&&&": {
154
+ ...getTypographyStyles(
155
+ theme.generalSettings.isMobile,
156
+ ownerState?.size || "small",
157
+ "paragraphDens"
158
+ )
159
+ }
160
+ }
149
161
  }),
150
162
  /**
151
163
  * Styles for the subtitle container of the header of the window base component.
@@ -232,6 +244,9 @@ const windowBaseStyles = {
232
244
  marginRight: theme.vars.size.baseSpacings.sp1,
233
245
  marginBottom: ownerState?.type === "layout" ? "auto!important" : "unset!important",
234
246
  "&.collapse-toggle": {
247
+ ...ownerState?.maximized && {
248
+ display: "none"
249
+ },
235
250
  "&:hover": {
236
251
  backgroundColor: `${theme.vars.palette.chips.orange.contained.backgroundColor} !important`,
237
252
  "& .M4LIcon-icon": {
@@ -246,16 +261,19 @@ const windowBaseStyles = {
246
261
  }
247
262
  },
248
263
  "&.expand-toggle": {
264
+ ...ownerState?.collapsed && {
265
+ display: "none"
266
+ },
249
267
  "&:hover": {
250
- backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColor} !important`,
268
+ backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundColor} !important`,
251
269
  "& .M4LIcon-icon": {
252
- backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColorTone} !important`
270
+ backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundColorTone} !important`
253
271
  }
254
272
  },
255
273
  "&:active": {
256
- backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundHover} !important`,
274
+ backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundHover} !important`,
257
275
  "& .M4LIcon-icon": {
258
- backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColorTone} !important`
276
+ backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundColorTone} !important`
259
277
  }
260
278
  }
261
279
  },
@@ -278,7 +296,7 @@ const windowBaseStyles = {
278
296
  }
279
297
  },
280
298
  "& .window-actions:first-child": {
281
- marginLeft: `${theme.vars.size.baseSpacings.sp2} !important`
299
+ marginLeft: `${theme.vars.size.baseSpacings.sp4} !important`
282
300
  }
283
301
  }),
284
302
  /**
@@ -310,6 +328,9 @@ const windowBaseStyles = {
310
328
  )
311
329
  } : {
312
330
  height: "auto!important"
331
+ },
332
+ ...ownerState?.collapsed && {
333
+ display: "none"
313
334
  }
314
335
  }),
315
336
  /**
@@ -326,11 +347,15 @@ const windowBaseStyles = {
326
347
  display: "flex",
327
348
  alignItems: "center",
328
349
  flexDirection: "row",
329
- justifyContent: "flex-end",
350
+ justifyContent: "flex-start",
330
351
  alignSelf: "stretch",
331
352
  gap: theme.vars.size.baseSpacings.sp2,
332
- paddingRight: theme.vars.size.baseSpacings.sp3,
333
353
  color: theme.vars.palette.text.secondary,
354
+ zIndex: 1,
355
+ paddingTop: theme.vars.size.baseSpacings.sp5,
356
+ paddingBottom: 0,
357
+ paddingLeft: theme.vars.size.baseSpacings.sp5,
358
+ paddingRight: theme.vars.size.baseSpacings.sp5,
334
359
  "& > span": {
335
360
  whiteSpace: "nowrap",
336
361
  overflow: "hidden",
@@ -355,6 +380,16 @@ const windowBaseStyles = {
355
380
  top: "20px !important",
356
381
  right: "24px !important"
357
382
  }
383
+ }),
384
+ /**
385
+ * Styles for the container of the left actions of the window base component.
386
+ */
387
+ containerLeftActions: ({ theme, ownerState }) => ({
388
+ display: "flex",
389
+ gap: theme.vars.size.baseSpacings.sp1,
390
+ ...ownerState?.collapsed && {
391
+ display: "none"
392
+ }
358
393
  })
359
394
  };
360
395
  export {
@@ -64,6 +64,16 @@ export interface WindowToolsMF {
64
64
  * @param {string} title Titulo que se visulizará en la ventana del módulo
65
65
  */
66
66
  setWindowTitle: (title: string) => void;
67
+ /**
68
+ * Método para setear el subtitulo de la ventana y que pueda cambiar de idioma
69
+ * @param {string} subtitle Subtitulo que se visulizará en la ventana del módulo
70
+ */
71
+ setWindowSubTitle: (subtitle: string) => void;
72
+ /**
73
+ * Método para setear la información de edición de la ventana y que pueda cambiar de idioma
74
+ * @param {string} editionInfo Información de edición que se visulizará en la ventana del módulo
75
+ */
76
+ setWindowEditionInfo: (editionInfo: string) => void;
67
77
  }
68
78
  /**
69
79
  * Props del componente WindowToolsMFProvider que incluyen las herramientas de ventana proporcionadas por la interfaz WindowToolsMF.
@@ -16,6 +16,6 @@ function useDynamicMFParametersStore(selector, equalityFn) {
16
16
  return useStore(store, selector, equalityFn);
17
17
  }
18
18
  export {
19
- useDynamicMFParameters as a,
20
- useDynamicMFParametersStore as u
19
+ useDynamicMFParametersStore as a,
20
+ useDynamicMFParameters as u
21
21
  };
@@ -13,5 +13,6 @@ export declare enum WindowBaseSlots {
13
13
  linearProgressIndeterminate = "linearProgressIndeterminate",
14
14
  contentEditionInfo = "contentEditionInfo",
15
15
  windowContainerComponent = "windowContainerComponent",
16
- toastContainer = "toastContainer"
16
+ toastContainer = "toastContainer",
17
+ containerLeftActions = "containerLeftActions"
17
18
  }
@@ -14,6 +14,7 @@ var WindowBaseSlots = /* @__PURE__ */ ((WindowBaseSlots2) => {
14
14
  WindowBaseSlots2["contentEditionInfo"] = "contentEditionInfo";
15
15
  WindowBaseSlots2["windowContainerComponent"] = "windowContainerComponent";
16
16
  WindowBaseSlots2["toastContainer"] = "toastContainer";
17
+ WindowBaseSlots2["containerLeftActions"] = "containerLeftActions";
17
18
  return WindowBaseSlots2;
18
19
  })(WindowBaseSlots || {});
19
20
  export {
@@ -80,3 +80,6 @@ export declare const WindowContainerComponentStyled: import('@emotion/styled').S
80
80
  export declare const ToastContainerStyled: import('@emotion/styled').StyledComponent<Pick<import('../../ToastContainer/types').ToastContainerProps, keyof import('../../ToastContainer/types').ToastContainerProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
81
81
  ownerState?: any;
82
82
  }, {}, {}>;
83
+ export declare const ContainerLeftActionsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
84
+ ownerState?: any;
85
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -67,6 +67,10 @@ const ToastContainerStyled = styled(ToastContainer, {
67
67
  name: WINDOW_BASE_KEY_COMPONENT,
68
68
  slot: WindowBaseSlots.toastContainer
69
69
  })(windowBaseStyles?.toastContainer);
70
+ const ContainerLeftActionsStyled = styled("div", {
71
+ name: WINDOW_BASE_KEY_COMPONENT,
72
+ slot: WindowBaseSlots.containerLeftActions
73
+ })(windowBaseStyles?.containerLeftActions);
70
74
  export {
71
75
  ContentWindowStyled as C,
72
76
  HeaderWindowComponentStyled as H,
@@ -82,5 +86,6 @@ export {
82
86
  HeaderContentStyled as c,
83
87
  ContainerTitleSubtitleStyled as d,
84
88
  TitleWindowStyled as e,
85
- IconsWrapperStyled as f
89
+ IconsWrapperStyled as f,
90
+ ContainerLeftActionsStyled as g
86
91
  };
@@ -7,7 +7,7 @@ import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js"
7
7
  import { deepEqual } from "fast-equals";
8
8
  import { useFormatter } from "@m4l/graphics";
9
9
  import { u as useButtonActions } from "./useButtonActions.js";
10
- import { H as HeaderWindowComponentStyled, c as HeaderContentStyled, I as IconWindowStyled, d as ContainerTitleSubtitleStyled, e as TitleWindowStyled, P as PointIconStyled, S as SubtitleWindowStyled, f as IconsWrapperStyled, M as MenuActionsWindowsStyled } from "../../slots/WindowBaseSlots.js";
10
+ import { H as HeaderWindowComponentStyled, c as HeaderContentStyled, I as IconWindowStyled, d as ContainerTitleSubtitleStyled, e as TitleWindowStyled, P as PointIconStyled, S as SubtitleWindowStyled, f as IconsWrapperStyled, g as ContainerLeftActionsStyled, M as MenuActionsWindowsStyled } from "../../slots/WindowBaseSlots.js";
11
11
  const HeaderWindowBase = (props) => {
12
12
  const {
13
13
  title,
@@ -21,6 +21,7 @@ const HeaderWindowBase = (props) => {
21
21
  buildTime,
22
22
  variant,
23
23
  actions = [],
24
+ collapsed,
24
25
  type
25
26
  } = props;
26
27
  const { host_static_assets, environment_assets } = useEnvironment();
@@ -99,7 +100,8 @@ const HeaderWindowBase = (props) => {
99
100
  maximized,
100
101
  variant,
101
102
  size,
102
- type
103
+ type,
104
+ collapsed
103
105
  };
104
106
  const IconButtonLeftActions = useButtonActions(leftActions);
105
107
  const IconButtonRightActions = useButtonActions(rightActions);
@@ -126,7 +128,7 @@ const HeaderWindowBase = (props) => {
126
128
  className: dragResizeWindowRNDClasses.draggableCancel,
127
129
  ownerState,
128
130
  children: [
129
- IconButtonLeftActions,
131
+ /* @__PURE__ */ jsx(ContainerLeftActionsStyled, { ownerState: { collapsed }, children: IconButtonLeftActions }),
130
132
  menuActions.length > 0 && /* @__PURE__ */ jsx(
131
133
  MenuActionsWindowsStyled,
132
134
  {
@@ -14,7 +14,8 @@ const useButtonActions = (actions) => {
14
14
  onClick: groupAction.onClick || (() => {
15
15
  }),
16
16
  color: groupAction.color,
17
- className: action.className
17
+ className: action.className,
18
+ placement: action.placement
18
19
  },
19
20
  groupAction.key
20
21
  )) }, action.key);
@@ -27,7 +28,8 @@ const useButtonActions = (actions) => {
27
28
  disabled: action.disabled,
28
29
  onClick: action.onClick || (() => {
29
30
  }),
30
- className: action.className
31
+ className: action.className,
32
+ placement: action.placement
31
33
  },
32
34
  action.key
33
35
  );
@@ -6,5 +6,5 @@ import { MemoizedIconButtonProps } from './types';
6
6
  * This component renders an `IconButton` with an icon and tooltip.
7
7
  * It is memoized to avoid unnecessary re-renders when the props do not change.
8
8
  */
9
- declare const MemoizedIconButton: React.MemoExoticComponent<({ iconUrl, label, disabled, onClick, color, className, selected }: MemoizedIconButtonProps) => import("react/jsx-runtime").JSX.Element>;
9
+ declare const MemoizedIconButton: React.MemoExoticComponent<({ iconUrl, label, disabled, onClick, color, className, selected, placement }: MemoizedIconButtonProps) => import("react/jsx-runtime").JSX.Element>;
10
10
  export default MemoizedIconButton;
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
4
4
  const MemoizedIconButton = React.memo(
5
- ({ iconUrl, label, disabled, onClick, color, className, selected }) => /* @__PURE__ */ jsx(IconButton, { role: "button", "aria-label": label, tooltip: label, icon: iconUrl, disabled, onClick, color, className, selected })
5
+ ({ iconUrl, label, disabled, onClick, color, className, selected, placement }) => /* @__PURE__ */ jsx(IconButton, { role: "button", "aria-label": label, tooltip: label, icon: iconUrl, disabled, onClick, color, className, selected, placement })
6
6
  );
7
7
  export {
8
8
  MemoizedIconButton as M
@@ -1,3 +1,4 @@
1
+ import { TooltipProps } from '../../../mui_extended/Tooltip/types';
1
2
  import { IconButtonProps } from '../../../mui_extended/IconButton/types';
2
3
  /**
3
4
  * Props for the `MemoizedIconButton` component.
@@ -31,4 +32,8 @@ export interface MemoizedIconButtonProps {
31
32
  * Whether the button is selected.
32
33
  */
33
34
  selected?: boolean;
35
+ /**
36
+ * Whether the button is collapsed.
37
+ */
38
+ placement?: TooltipProps['placement'];
34
39
  }
@@ -6,6 +6,7 @@ import { Sizes } from '@m4l/styles';
6
6
  import { MenuItemAction } from '../MenuActions/types';
7
7
  import { M4LOverridesStyleRules } from '../../@types/augmentations';
8
8
  import { EmergeType } from '../areas/types';
9
+ import { TooltipProps } from '../mui_extended/Tooltip/types';
9
10
  /**
10
11
  * Opciones para la ventana.
11
12
  */
@@ -78,6 +79,10 @@ export type WindowBaseModuleAction = Omit<ModuleActionMenuItem, 'visibility'> |
78
79
  export type WindowBaseAction = WindowBaseModuleAction & {
79
80
  place: 'left' | 'right' | 'inside';
80
81
  className?: string;
82
+ /**
83
+ * Placement of the tooltip.
84
+ */
85
+ placement?: TooltipProps['placement'];
81
86
  };
82
87
  /**
83
88
  * Interface representing the main properties of the `WindowBase` component.
@@ -122,6 +127,11 @@ export interface WindowBaseProps {
122
127
  * When `true`, the window may display a visual indicator to denote selection.
123
128
  */
124
129
  selected?: boolean;
130
+ /**
131
+ * Indicates if the window is collapsed.
132
+ * When `true`, the window may display a visual indicator to denote collapse.
133
+ */
134
+ collapsed?: boolean;
125
135
  /**
126
136
  * Indicates if the window is maximized.
127
137
  * When `true`, the window may display a visual indicator to denote maximization.
@@ -198,6 +208,7 @@ export type WindowBaseType = keyof typeof WindowBaseSlots;
198
208
  */
199
209
  export type WindowBaseOwnerState = Pick<WindowBaseProps, 'size'> & {
200
210
  selected?: WindowBaseProps['selected'];
211
+ collapsed?: WindowBaseProps['collapsed'];
201
212
  maximized?: WindowBaseProps['maximized'];
202
213
  variant?: WindowBaseProps['variant'];
203
214
  size?: WindowBaseProps['size'];
@@ -16,6 +16,8 @@ const Window = (props) => {
16
16
  moduleId,
17
17
  winType,
18
18
  title,
19
+ subTitle,
20
+ editionInfo,
19
21
  iconUrl,
20
22
  version,
21
23
  buildTime,
@@ -34,6 +36,18 @@ const Window = (props) => {
34
36
  (state) => areaId ? state.hashAreas[areaId]?.maximizedId : void 0,
35
37
  shallow
36
38
  );
39
+ const collapsed = useAreasStore(
40
+ (state) => {
41
+ const area = areaId ? state.hashAreas[areaId] : void 0;
42
+ if (area && area.currentBreakpoint && area.layouts && area.layouts[area.currentBreakpoint]) {
43
+ return area.layouts[area.currentBreakpoint].find(
44
+ (li) => li.i === windowId
45
+ )?.colapsed || false;
46
+ }
47
+ return false;
48
+ },
49
+ shallow
50
+ );
37
51
  if (status === void 0) {
38
52
  return null;
39
53
  }
@@ -41,6 +55,8 @@ const Window = (props) => {
41
55
  WindowBaseStyled,
42
56
  {
43
57
  title: `${title}${moduleCount ? `:${moduleCount}` : ""}`,
58
+ subTitle,
59
+ editionInfo,
44
60
  iconUrl,
45
61
  isLoading: loading,
46
62
  onClose: () => windowTools.close(),
@@ -52,6 +68,7 @@ const Window = (props) => {
52
68
  maximized: !!maximizedId,
53
69
  onMouseDown: onTouch,
54
70
  type: emergeType,
71
+ collapsed,
55
72
  ...process.env.NODE_ENV !== "production" ? {
56
73
  [TEST_PROP_ID]: getNameDataTestId(
57
74
  AREAS_VIEWER_CLASS_NAME,
@@ -34,6 +34,7 @@ const useRightActions = ({
34
34
  key: "maximize",
35
35
  iconUrl: maximizedId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`,
36
36
  label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
37
+ placement: "bottom-end",
37
38
  /**
38
39
  * Acción de maximize/normalize.
39
40
  */
@@ -14,6 +14,8 @@ export declare const useWindow: (windowId: string, areaId?: string) => {
14
14
  moduleId: string;
15
15
  winType: "component" | "microfrontend";
16
16
  title: string;
17
+ subTitle: string | undefined;
18
+ editionInfo: string | undefined;
17
19
  iconUrl: string;
18
20
  version: string | undefined;
19
21
  buildTime: string | undefined;
@@ -5,7 +5,7 @@ import { u as useHeaderActions } from "./useHeaderActions.js";
5
5
  import { u as usePopupsStore } from "../../../../../../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
6
6
  import { c as createToaster } from "../../../../../../../../ToastContainer/helpers/toaster.js";
7
7
  const useWindow = (windowId, areaId) => {
8
- const [emergeType, moduleId, winType, title, iconUrl, version, buildTime, moduleCount, selected, loading, status, dynamicMFStore] = useAreasStore((state) => {
8
+ const [emergeType, moduleId, winType, title, subTitle, editionInfo, iconUrl, version, buildTime, moduleCount, selected, loading, status, dynamicMFStore] = useAreasStore((state) => {
9
9
  const window = state.hashWindows[windowId];
10
10
  const selected2 = areaId ? state.hashAreas[areaId]?.currentLayoutId === windowId : false;
11
11
  return [
@@ -13,6 +13,8 @@ const useWindow = (windowId, areaId) => {
13
13
  window?.moduleId,
14
14
  window?.winType,
15
15
  window?.title,
16
+ window?.subTitle,
17
+ window?.editionInfo,
16
18
  window?.iconUrl,
17
19
  window?.version,
18
20
  window?.buildTime,
@@ -28,7 +30,7 @@ const useWindow = (windowId, areaId) => {
28
30
  (state) => state.hashWindows[windowId]?.component,
29
31
  shallow
30
32
  );
31
- const { setActions, getCookie, getCookies, setCookie, close, startProgress, stopProgress, setFnQueryClose, setWindowTitle, loadCookiesFromApi } = useAreasStore((state) => state.windowActions, shallow);
33
+ const { setActions, getCookie, getCookies, setCookie, close, startProgress, stopProgress, setFnQueryClose, setWindowTitle, setWindowSubTitle, setWindowEditionInfo, loadCookiesFromApi } = useAreasStore((state) => state.windowActions, shallow);
32
34
  const { selectLayout } = useAreasStore((state) => state.areaActions, shallow);
33
35
  const { setSelectedPopupId } = usePopupsStore((state) => state.popupsActions, shallow);
34
36
  const onTouch = () => {
@@ -55,9 +57,8 @@ const useWindow = (windowId, areaId) => {
55
57
  setFnQueryClose: (fnQueryClose) => setFnQueryClose(windowId, fnQueryClose),
56
58
  toast: createToaster(windowId),
57
59
  setWindowTitle: (newTitle) => setWindowTitle(windowId, newTitle),
58
- setEditionInfo: (editionInfo) => {
59
- throw new Error(`setEditionInfo not implemented: ${editionInfo}`);
60
- },
60
+ setWindowSubTitle: (newSubtitle) => setWindowSubTitle(windowId, newSubtitle),
61
+ setWindowEditionInfo: (newEditionInfo) => setWindowEditionInfo(windowId, newEditionInfo),
61
62
  hide: () => {
62
63
  throw new Error("hide not implemented");
63
64
  },
@@ -84,6 +85,8 @@ const useWindow = (windowId, areaId) => {
84
85
  moduleId,
85
86
  winType,
86
87
  title,
88
+ subTitle,
89
+ editionInfo,
87
90
  iconUrl,
88
91
  version,
89
92
  buildTime,
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
441
441
  bounds: {
442
442
  left: MARGIN_GRIDLAYOUT,
443
443
  top: MARGIN_GRIDLAYOUT,
444
- right: -10,
445
- bottom: -10
444
+ right: -MARGIN_GRIDLAYOUT,
445
+ bottom: -MARGIN_GRIDLAYOUT
446
446
  }
447
447
  });
448
448
  }
@@ -841,6 +841,22 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
841
841
  set((state) => {
842
842
  state.hashWindows[windowId].title = title;
843
843
  });
844
+ },
845
+ /**
846
+ * setWindowSubtitle
847
+ */
848
+ setWindowSubTitle: (windowId, subTitle) => {
849
+ set((state) => {
850
+ state.hashWindows[windowId].subTitle = subTitle;
851
+ });
852
+ },
853
+ /**
854
+ * setWindowEditionInfo
855
+ */
856
+ setWindowEditionInfo: (windowId, editionInfo) => {
857
+ set((state) => {
858
+ state.hashWindows[windowId].editionInfo = editionInfo;
859
+ });
844
860
  }
845
861
  }
846
862
  })),
@@ -293,6 +293,8 @@ export interface AreasStoreStateWithActions extends AreasStoreState {
293
293
  resetModuleCookies: (windowId: string) => void;
294
294
  setFnQueryClose: (windowId: string, fnQueryClose: () => void) => void;
295
295
  setWindowTitle: (windowId: string, title: string) => void;
296
+ setWindowSubTitle: (windowId: string, subTitle: string) => void;
297
+ setWindowEditionInfo: (windowId: string, editionInfo: string) => void;
296
298
  };
297
299
  }
298
300
  export type DefaultAreasStoreProps = Omit<AreasStoreState, 'currentArea'>;
@@ -1,2 +1 @@
1
- export { useSetWindowsTitle } from './useSetWindowsTitle';
2
1
  export { useAreasStore } from './useAreas';
@@ -99,6 +99,10 @@ export interface EmmitNewWindowBase {
99
99
  * Subtítulo de la ventana.
100
100
  */
101
101
  subTitle?: string;
102
+ /**
103
+ * Información de edición de la ventana.
104
+ */
105
+ editionInfo?: string;
102
106
  /**
103
107
  * Opciones de la ventana. Son acciones que permiten persistir las cookies de la ventana a nivel de módulo, para que aunque se cierre esta,
104
108
  * Cuando se abra de nuevo venga con las cookies guardadas.
@@ -2,12 +2,14 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
4
4
  import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
5
- import { S as SPLIT_LAYOUT_KEY_COMPONENT } from "./constants.js";
5
+ import { S as SPLIT_LAYOUT_KEY_COMPONENT, a as SPLIT_LAYOUT_ICONS } from "./constants.js";
6
6
  import { S as SplitLayoutSlots } from "./slots/SplitLayoutEnum.js";
7
- import { S as SplitLayoutRootStyled, a as SplitMasterStyled, b as SplitResizeHandleStyled, c as SplitDetailStyled } from "./slots/SplitLayoutSlots.js";
7
+ import { S as SplitLayoutRootStyled, a as SplitMasterStyled, b as SplitResizeHandleStyled, c as SplitResizeHandleIconStyled, d as SplitDetailStyled } from "./slots/SplitLayoutSlots.js";
8
+ import { useEnvironment } from "@m4l/core";
8
9
  const SplitLayout = (props) => {
9
10
  const { firstPart, secondPart, splitPosition, dataTestId, defaultMasterSize = 50, defaultDetailSize = 50 } = props;
10
11
  const classes = getComponentClasses(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots);
12
+ const { host_static_assets, environment_assets } = useEnvironment();
11
13
  const firstPartMemo = useMemo(() => {
12
14
  return typeof firstPart === "function" ? firstPart() : firstPart;
13
15
  }, [firstPart]);
@@ -38,7 +40,8 @@ const SplitLayout = (props) => {
38
40
  SplitResizeHandleStyled,
39
41
  {
40
42
  className: `${classes.splitResizeHandle}-${splitPosition}`,
41
- ownerState
43
+ ownerState,
44
+ children: /* @__PURE__ */ jsx(SplitResizeHandleIconStyled, { src: `${host_static_assets}/${environment_assets}/${SPLIT_LAYOUT_ICONS.handleIcon}` })
42
45
  }
43
46
  ),
44
47
  /* @__PURE__ */ jsx(