@m4l/components 9.2.60 → 9.2.62-B07072025beta.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/@types/types.d.ts +8 -0
- package/components/AppBar/AppBar.js +12 -10
- package/components/AppBar/slots/AppBarEnum.d.ts +1 -5
- package/components/AppBar/slots/AppBarEnum.js +0 -4
- package/components/AppBar/slots/AppBarSlots.d.ts +4 -18
- package/components/AppBar/slots/AppBarSlots.js +3 -27
- package/components/AppBar/styles.js +0 -42
- package/components/AppBar/types.d.ts +8 -0
- package/components/Chip/Chip.js +9 -10
- package/components/Chip/ChipStyles.js +13 -2
- package/components/Chip/constants.d.ts +9 -0
- package/components/Chip/constants.js +6 -2
- package/components/Chip/slots/ChipEnum.d.ts +3 -0
- package/components/Chip/slots/ChipEnum.js +6 -1
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/DataGrid.js +17 -3
- package/components/DataGrid/Datagrid.styles.js +80 -33
- package/components/DataGrid/constants.d.ts +2 -0
- package/components/DataGrid/constants.js +7 -3
- package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
- package/components/DataGrid/dictionary.d.ts +8 -0
- package/components/DataGrid/dictionary.js +26 -17
- package/components/DataGrid/icons.d.ts +7 -0
- package/components/DataGrid/icons.js +8 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +7 -1
- package/components/DataGrid/slots/DataGridEnum.js +6 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
- package/components/DataGrid/slots/DataGridSlot.js +35 -5
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +262 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
- package/components/DataGrid/subcomponents/Table/index.js +97 -34
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +79 -4
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +146 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.js +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
- package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
- package/components/DataGrid/types.d.ts +53 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
- 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 +67 -28
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- 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 +24 -18
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
- package/components/DynamicFilter/types.d.ts +3 -0
- package/components/DynamicSort/DynamicSort.js +10 -6
- package/components/DynamicSort/DynamicSort.styles.js +92 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
- package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
- package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
- package/components/DynamicSort/slots/SlotsEnum.js +1 -4
- package/components/DynamicSort/store/DynamicSortContext.js +96 -67
- package/components/DynamicSort/store/DynamicSortStore.js +53 -4
- package/components/DynamicSort/store/types.d.ts +11 -0
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- 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/DynamicSort/types.d.ts +4 -0
- package/components/LanguagePopover/LanguagePopover.js +7 -5
- package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
- package/components/LanguagePopover/types.d.ts +6 -1
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/PaperForm/styles.js +2 -1
- package/components/PropertyValue/PropertyValue.js +2 -1
- package/components/PropertyValue/PropertyValue.styles.js +7 -4
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/SideBar/SideBar.js +8 -2
- package/components/SideBar/constants.d.ts +26 -2
- package/components/SideBar/constants.js +20 -10
- package/components/SideBar/context/sideBarContext/index.js +17 -4
- package/components/SideBar/context/sideBarContext/types.d.ts +14 -1
- package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
- package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
- package/components/SideBar/hooks/useCollapse/index.js +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 +11 -11
- package/components/SideBar/slots/SideBarEnum.js +13 -15
- package/components/SideBar/slots/SideBarSlots.d.ts +15 -9
- package/components/SideBar/slots/SideBarSlots.js +50 -39
- package/components/SideBar/styles.js +4 -6
- package/components/SideBar/subcomponents/ContentComponent/index.js +13 -49
- package/components/SideBar/subcomponents/ContentComponent/style.js +148 -23
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.js +8 -15
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/styles.js +8 -2
- package/components/SideBar/subcomponents/FooterComponent/types.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +37 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.js +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.js +43 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +4 -3
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +3 -35
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/index.js +51 -0
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +146 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +7 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +12 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +4 -0
- 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 +70 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +10 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +61 -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 +17 -8
- package/components/WindowBase/WindowBase.js +7 -1
- package/components/WindowBase/WindowBase.styles.js +50 -15
- package/components/WindowBase/constants.d.ts +1 -0
- package/components/WindowBase/constants.js +5 -1
- 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 +11 -5
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- 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 +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/commercial/HamburgerMenu/HamburgerMenu.js +1 -2
- package/components/extended/React-Resizable/helpers.js +1 -1
- 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/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +5 -4
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/mui_extended/Accordion/styles.js +10 -2
- package/components/mui_extended/Button/Button.js +3 -1
- package/components/mui_extended/Button/ButtonStyles.js +6 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
- package/components/mui_extended/Divider/index.d.ts +1 -0
- package/components/mui_extended/Divider/index.js +1 -0
- package/components/mui_extended/NavLink/NavLink.js +3 -1
- package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
- package/components/mui_extended/NavLink/types.d.ts +3 -1
- package/components/mui_extended/Tab/Tab.styles.js +2 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +20 -18
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +3 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +334 -88
- package/index.d.ts +1 -0
- package/index.js +23 -20
- package/package.json +5 -4
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
- package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
- package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/SideBar/SideBar.stories.d.ts +5 -11
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/constants.d.ts +3 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +14 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +1 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/index.js +0 -52
- package/components/SideBar/subcomponents/ContentGroups/styles.js +0 -71
- 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.d.ts +0 -6
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
- package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/HeaderSidebar/styles.js +0 -24
- package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +0 -5
- /package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 && {
|
|
69
|
+
display: "none"
|
|
70
|
+
}
|
|
68
71
|
}),
|
|
69
72
|
/**
|
|
70
73
|
* Styles for the header of the window base component.
|
|
@@ -78,7 +81,7 @@ const windowBaseStyles = {
|
|
|
78
81
|
justifyContent: "space-between",
|
|
79
82
|
flexShrink: 0,
|
|
80
83
|
alignSelf: "stretch",
|
|
81
|
-
cursor: "all-scroll",
|
|
84
|
+
cursor: ownerState?.draggable ? "all-scroll" : "default",
|
|
82
85
|
position: "relative",
|
|
83
86
|
...ownerState?.type === "layout" || ownerState?.type === "modal" ? getSizeStyles(
|
|
84
87
|
theme,
|
|
@@ -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, ${
|
|
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, ${
|
|
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: ownerState?.draggable ? "all-scroll" : "default",
|
|
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.
|
|
@@ -177,7 +189,7 @@ const windowBaseStyles = {
|
|
|
177
189
|
overflow: "hidden",
|
|
178
190
|
textOverflow: "ellipsis",
|
|
179
191
|
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
180
|
-
cursor: "all-scroll"
|
|
192
|
+
cursor: ownerState?.draggable ? "all-scroll" : "default"
|
|
181
193
|
}),
|
|
182
194
|
/**
|
|
183
195
|
* Styles for the icon 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.
|
|
268
|
+
backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundColor} !important`,
|
|
251
269
|
"& .M4LIcon-icon": {
|
|
252
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
270
|
+
backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundColorTone} !important`
|
|
253
271
|
}
|
|
254
272
|
},
|
|
255
273
|
"&:active": {
|
|
256
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
274
|
+
backgroundColor: `${theme.vars.palette.chips.forest.contained.backgroundHover} !important`,
|
|
257
275
|
"& .M4LIcon-icon": {
|
|
258
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
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.
|
|
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-
|
|
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 {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
|
|
1
3
|
const WINDOW_BASE_KEY_COMPONENT = "M4LWindowBase";
|
|
4
|
+
const WINDOW_BASE_CLASSES = getComponentClasses(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots);
|
|
2
5
|
export {
|
|
3
|
-
WINDOW_BASE_KEY_COMPONENT as W
|
|
6
|
+
WINDOW_BASE_KEY_COMPONENT as W,
|
|
7
|
+
WINDOW_BASE_CLASSES as a
|
|
4
8
|
};
|
|
@@ -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,9 @@ 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
|
+
import { a as WINDOW_BASE_CLASSES } from "../../constants.js";
|
|
12
|
+
import clsx from "clsx";
|
|
11
13
|
const HeaderWindowBase = (props) => {
|
|
12
14
|
const {
|
|
13
15
|
title,
|
|
@@ -21,7 +23,9 @@ const HeaderWindowBase = (props) => {
|
|
|
21
23
|
buildTime,
|
|
22
24
|
variant,
|
|
23
25
|
actions = [],
|
|
24
|
-
|
|
26
|
+
collapsed,
|
|
27
|
+
type,
|
|
28
|
+
draggable
|
|
25
29
|
} = props;
|
|
26
30
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
27
31
|
const { dateFormatter } = useFormatter();
|
|
@@ -99,11 +103,13 @@ const HeaderWindowBase = (props) => {
|
|
|
99
103
|
maximized,
|
|
100
104
|
variant,
|
|
101
105
|
size,
|
|
102
|
-
type
|
|
106
|
+
type,
|
|
107
|
+
collapsed,
|
|
108
|
+
draggable
|
|
103
109
|
};
|
|
104
110
|
const IconButtonLeftActions = useButtonActions(leftActions);
|
|
105
111
|
const IconButtonRightActions = useButtonActions(rightActions);
|
|
106
|
-
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: dragResizeWindowRNDClasses.draggableHandle, ownerState, children: [
|
|
112
|
+
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: clsx(draggable && dragResizeWindowRNDClasses.draggableHandle, WINDOW_BASE_CLASSES.headerWindowComponent), ownerState, children: [
|
|
107
113
|
/* @__PURE__ */ jsxs(HeaderContentStyled, { ownerState, children: [
|
|
108
114
|
iconUrl && /* @__PURE__ */ jsx(IconWindowStyled, { size, ownerState, src: iconUrl, "aria-label": "main icon" }),
|
|
109
115
|
/* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { size, ownerState, children: [
|
|
@@ -126,7 +132,7 @@ const HeaderWindowBase = (props) => {
|
|
|
126
132
|
className: dragResizeWindowRNDClasses.draggableCancel,
|
|
127
133
|
ownerState,
|
|
128
134
|
children: [
|
|
129
|
-
IconButtonLeftActions,
|
|
135
|
+
/* @__PURE__ */ jsx(ContainerLeftActionsStyled, { ownerState: { collapsed }, children: IconButtonLeftActions }),
|
|
130
136
|
menuActions.length > 0 && /* @__PURE__ */ jsx(
|
|
131
137
|
MenuActionsWindowsStyled,
|
|
132
138
|
{
|
|
@@ -32,7 +32,7 @@ import { WindowBaseAction, WindowBaseProps } from '../../types';
|
|
|
32
32
|
* - `selected` modifies the visual appearance to indicate the selected state.
|
|
33
33
|
* @see WindowBaseProps - General properties for the window base.
|
|
34
34
|
*/
|
|
35
|
-
export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'type' | 'buildTime' | 'maximized'> & {
|
|
35
|
+
export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'type' | 'buildTime' | 'maximized' | 'draggable'> & {
|
|
36
36
|
actions?: WindowBaseAction[];
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -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
|
+
tooltipProps: action.tooltipProps
|
|
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
|
+
tooltipProps: action.tooltipProps
|
|
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, tooltipProps }: 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, tooltipProps }) => /* @__PURE__ */ jsx(IconButton, { role: "button", "aria-label": label, tooltip: label, icon: iconUrl, disabled, onClick, color, className, selected, placement: tooltipProps?.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
|
+
tooltipProps?: Omit<TooltipProps, 'sx' | 'children' | 'title'>;
|
|
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
|
+
* Props for the tooltip.
|
|
84
|
+
*/
|
|
85
|
+
tooltipProps?: Omit<TooltipProps, 'sx' | 'children' | 'title'>;
|
|
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.
|
|
@@ -180,6 +190,10 @@ export interface WindowBaseProps {
|
|
|
180
190
|
* Default is `'window'` if not specified.
|
|
181
191
|
*/
|
|
182
192
|
type?: EmergeType;
|
|
193
|
+
/**
|
|
194
|
+
* Indicates if the window is draggable.
|
|
195
|
+
*/
|
|
196
|
+
draggable?: boolean;
|
|
183
197
|
}
|
|
184
198
|
/**
|
|
185
199
|
* Type representing the possible values of `WindowBaseSlots`.
|
|
@@ -198,10 +212,12 @@ export type WindowBaseType = keyof typeof WindowBaseSlots;
|
|
|
198
212
|
*/
|
|
199
213
|
export type WindowBaseOwnerState = Pick<WindowBaseProps, 'size'> & {
|
|
200
214
|
selected?: WindowBaseProps['selected'];
|
|
215
|
+
collapsed?: WindowBaseProps['collapsed'];
|
|
201
216
|
maximized?: WindowBaseProps['maximized'];
|
|
202
217
|
variant?: WindowBaseProps['variant'];
|
|
203
218
|
size?: WindowBaseProps['size'];
|
|
204
219
|
type?: WindowBaseProps['type'];
|
|
220
|
+
draggable?: WindowBaseProps['draggable'];
|
|
205
221
|
};
|
|
206
222
|
/**
|
|
207
223
|
* Type for defining custom styles for the `WindowBase` component.
|
package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js
CHANGED
|
@@ -36,6 +36,18 @@ const Window = (props) => {
|
|
|
36
36
|
(state) => areaId ? state.hashAreas[areaId]?.maximizedId : void 0,
|
|
37
37
|
shallow
|
|
38
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
|
+
);
|
|
39
51
|
if (status === void 0) {
|
|
40
52
|
return null;
|
|
41
53
|
}
|
|
@@ -56,6 +68,7 @@ const Window = (props) => {
|
|
|
56
68
|
maximized: !!maximizedId,
|
|
57
69
|
onMouseDown: onTouch,
|
|
58
70
|
type: emergeType,
|
|
71
|
+
collapsed,
|
|
59
72
|
...process.env.NODE_ENV !== "production" ? {
|
|
60
73
|
[TEST_PROP_ID]: getNameDataTestId(
|
|
61
74
|
AREAS_VIEWER_CLASS_NAME,
|
|
@@ -31,45 +31,51 @@ const useRightActions = ({
|
|
|
31
31
|
const actions = [];
|
|
32
32
|
actions.push({
|
|
33
33
|
place: "right",
|
|
34
|
-
key: "
|
|
35
|
-
iconUrl:
|
|
36
|
-
label:
|
|
34
|
+
key: "collapseToggle",
|
|
35
|
+
iconUrl: !collapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLLPASE}`,
|
|
36
|
+
label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
|
|
37
|
+
tooltipProps: {
|
|
38
|
+
placement: "bottom-end"
|
|
39
|
+
},
|
|
37
40
|
/**
|
|
38
|
-
* Acción de
|
|
41
|
+
* Acción de collapse/expand.
|
|
39
42
|
*/
|
|
40
43
|
onClick: () => {
|
|
41
44
|
if (areaId) {
|
|
42
|
-
if (
|
|
43
|
-
|
|
45
|
+
if (collapsed) {
|
|
46
|
+
unColapseLayoutItem(areaId, windowId);
|
|
44
47
|
} else {
|
|
45
|
-
|
|
48
|
+
colapseLayoutItem(areaId, windowId);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
},
|
|
49
|
-
disabled:
|
|
50
|
-
color: "
|
|
51
|
-
className: "
|
|
52
|
+
disabled: !(maximizedId === void 0),
|
|
53
|
+
color: "warning",
|
|
54
|
+
className: "collapse-toggle window-actions"
|
|
52
55
|
});
|
|
53
56
|
actions.push({
|
|
54
57
|
place: "right",
|
|
55
|
-
key: "
|
|
56
|
-
iconUrl:
|
|
57
|
-
label:
|
|
58
|
+
key: "maximize",
|
|
59
|
+
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}`,
|
|
60
|
+
label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
|
|
61
|
+
tooltipProps: {
|
|
62
|
+
placement: "bottom-end"
|
|
63
|
+
},
|
|
58
64
|
/**
|
|
59
|
-
* Acción de
|
|
65
|
+
* Acción de maximize/normalize.
|
|
60
66
|
*/
|
|
61
67
|
onClick: () => {
|
|
62
68
|
if (areaId) {
|
|
63
|
-
if (
|
|
64
|
-
|
|
69
|
+
if (maximizedId) {
|
|
70
|
+
normalizeLayouts(areaId);
|
|
65
71
|
} else {
|
|
66
|
-
|
|
72
|
+
maximizeLayout(areaId, windowId);
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
},
|
|
70
|
-
disabled:
|
|
71
|
-
color: "
|
|
72
|
-
className: "
|
|
76
|
+
disabled: false,
|
|
77
|
+
color: "info",
|
|
78
|
+
className: "expand-toggle window-actions"
|
|
73
79
|
});
|
|
74
80
|
return actions;
|
|
75
81
|
}, [
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -MARGIN_GRIDLAYOUT,
|
|
445
|
+
bottom: -MARGIN_GRIDLAYOUT
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -6,7 +6,7 @@ const getReactResizableStyles = (theme, ownerState) => {
|
|
|
6
6
|
borderStyle: "solid",
|
|
7
7
|
borderWidth: `${borderWith}px`,
|
|
8
8
|
display: ownerState?.disabled ? "none" : "block",
|
|
9
|
-
borderColor: theme.palette.border.default,
|
|
9
|
+
borderColor: theme.vars.palette.border.default,
|
|
10
10
|
borderRadius: "0%",
|
|
11
11
|
backgroundImage: "none",
|
|
12
12
|
position: "absolute",
|
|
@@ -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(
|