@m4l/components 9.2.60-24062025.beta.1 → 9.2.60-J24062025.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +0 -8
- package/components/Chip/Chip.js +10 -9
- package/components/Chip/ChipStyles.js +2 -13
- package/components/Chip/constants.d.ts +0 -9
- package/components/Chip/constants.js +2 -6
- package/components/Chip/slots/ChipEnum.d.ts +0 -3
- package/components/Chip/slots/ChipEnum.js +1 -6
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/DataGrid.js +17 -3
- package/components/DataGrid/Datagrid.styles.js +66 -27
- 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 +5 -1
- package/components/DataGrid/slots/DataGridEnum.js +4 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +4 -0
- package/components/DataGrid/slots/DataGridSlot.js +22 -2
- 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/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 +90 -99
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +3 -0
- package/components/DynamicFilter/slots/SlotsEnum.js +3 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +9 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +19 -3
- package/components/DynamicFilter/store/DynamicFilterContext.js +67 -26
- 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 +0 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +1 -2
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +0 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +18 -23
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +1 -4
- package/components/DynamicFilter/types.d.ts +3 -0
- package/components/DynamicSort/DynamicSort.js +10 -6
- package/components/DynamicSort/DynamicSort.styles.js +88 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +9 -0
- package/components/DynamicSort/slots/DynamicSortSlots.js +21 -5
- package/components/DynamicSort/slots/SlotsEnum.d.ts +4 -1
- package/components/DynamicSort/slots/SlotsEnum.js +4 -1
- 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 +0 -2
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +17 -21
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +0 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +1 -2
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/LanguagePopover/LanguagePopover.js +6 -8
- package/components/LanguagePopover/LanguagePopover.styles.js +4 -25
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +3 -9
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +3 -1
- package/components/LanguagePopover/types.d.ts +1 -6
- package/components/PaperForm/styles.js +1 -2
- package/components/PropertyValue/PropertyValue.js +1 -2
- package/components/PropertyValue/PropertyValue.styles.js +4 -7
- package/components/PropertyValue/types.d.ts +0 -4
- package/components/SideBar/SideBar.js +2 -4
- package/components/SideBar/constants.d.ts +2 -26
- package/components/SideBar/constants.js +7 -19
- package/components/SideBar/context/sideBarContext/index.js +5 -19
- package/components/SideBar/context/sideBarContext/types.d.ts +1 -22
- package/components/SideBar/helpers/getMenuDataWithState/index.js +8 -25
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +11 -9
- package/components/SideBar/slots/SideBarSlots.d.ts +3 -9
- package/components/SideBar/slots/SideBarSlots.js +28 -36
- package/components/SideBar/styles.js +4 -2
- package/components/SideBar/subcomponents/ContentComponent/index.js +19 -39
- package/components/SideBar/subcomponents/ContentComponent/style.js +22 -171
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/index.js +18 -16
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.js +7 -5
- package/components/SideBar/subcomponents/{TreeGroupItems/subcomponents/NodeMenuItem → ContentGroups/subcomponents/ContainerMenuItemsMain}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +63 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +47 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.js +7 -10
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +4 -0
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.js +15 -8
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.js +2 -2
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +25 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +14 -10
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/types.d.ts +3 -7
- package/components/WindowBase/WindowBase.js +1 -4
- package/components/WindowBase/WindowBase.styles.js +13 -48
- package/components/WindowBase/constants.d.ts +0 -1
- package/components/WindowBase/constants.js +1 -5
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +1 -2
- package/components/WindowBase/slots/WindowBaseEnum.js +0 -1
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +0 -3
- package/components/WindowBase/slots/WindowBaseSlots.js +1 -6
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +4 -8
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +2 -4
- 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 +0 -5
- package/components/WindowBase/types.d.ts +0 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +0 -13
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +20 -21
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +3 -6
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +36 -78
- package/components/extended/React-resizable-panels/constants.d.ts +0 -6
- package/components/extended/React-resizable-panels/constants.js +1 -5
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +1 -2
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +0 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +0 -3
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +1 -7
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +0 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
- package/components/mui_extended/Accordion/styles.js +2 -10
- package/components/mui_extended/Button/Button.js +1 -3
- package/components/mui_extended/Button/ButtonStyles.js +1 -6
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
- package/components/mui_extended/NavLink/NavLink.js +1 -3
- package/components/mui_extended/NavLink/NavLink.styles.js +1 -2
- package/components/mui_extended/NavLink/types.d.ts +1 -3
- package/components/mui_extended/Tab/Tab.styles.js +1 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +8 -2
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +13 -15
- package/components/mui_extended/index.d.ts +0 -1
- 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 +0 -1
- package/index.js +20 -23
- package/package.json +5 -6
- 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 +11 -27
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +10 -26
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -1
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -1
- package/utils/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +0 -11
- package/components/SideBar/hooks/useCollapse/useCollapse.js +0 -23
- package/components/SideBar/subcomponents/Promotion/types.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +0 -69
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -9
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +0 -56
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +0 -1
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +0 -4
- package/components/mui_extended/Divider/index.d.ts +0 -1
- package/components/mui_extended/Divider/index.js +0 -1
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +0 -3
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +0 -1
- /package/components/{SideBar/hooks/useCollapse → DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick}/index.js +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/types.d.ts +0 -0
- /package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.d.ts +0 -0
|
@@ -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 {
|
|
7
|
+
import { o as ContainerSideBarMobileStyled } from "../../slots/SideBarSlots.js";
|
|
8
8
|
import { C as ContentComponent } from "../ContentComponent/index.js";
|
|
9
9
|
const SideBarMobile = () => {
|
|
10
10
|
const {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Sizes } from '@m4l/styles';
|
|
2
|
-
import { ContentComponentSlots, ContentGroupsSlots, HeaderSidebarSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots } from './slots/SideBarEnum';
|
|
2
|
+
import { ContainerMenuItemsMainSlots, 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';
|
|
7
6
|
/**
|
|
8
7
|
* define la estructura de datos para un elemento de menú en la barra lateral.
|
|
9
8
|
*/
|
|
@@ -73,10 +72,6 @@ export interface SideBarProps {
|
|
|
73
72
|
* Prefijo de la url de los iconos
|
|
74
73
|
*/
|
|
75
74
|
urlIconPrefix?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Promoción del sidebar, se renderiza en el footer del sidebar
|
|
78
|
-
*/
|
|
79
|
-
promotion?: ReactElement;
|
|
80
75
|
}
|
|
81
76
|
/**
|
|
82
77
|
* Interface que representa el estado de un elemento de menú en la barra lateral.
|
|
@@ -89,11 +84,12 @@ export interface IMenuDataWithState extends MenuDataType {
|
|
|
89
84
|
/**
|
|
90
85
|
* OwnerState con las propiedades de estado del sideBar
|
|
91
86
|
*/
|
|
92
|
-
export type SideBarSlotsType = SideBarDesktopSlots | ContentGroupsSlots | HeaderSidebarSlots | SideBarFooterSlots | SideBarMobileSlots | ContentComponentSlots;
|
|
87
|
+
export type SideBarSlotsType = ContainerMenuItemsMainSlots | SideBarDesktopSlots | ContentGroupsSlots | HeaderSidebarSlots | SideBarFooterSlots | SideBarMobileSlots | ContentComponentSlots;
|
|
93
88
|
export type SideBarOwnerState = Pick<IMenuDataWithState, 'active' | 'itemInTreeActive'> & {
|
|
94
89
|
[key: string]: any;
|
|
95
90
|
};
|
|
96
91
|
export type SideBarStyles = M4LOverridesStyleRules<SideBarSlotsType, typeof SIDEBAR_KEY_COMPONENT, Theme>;
|
|
92
|
+
export type ContainerMenuItemsMainStyles = M4LOverridesStyleRules<ContainerMenuItemsMainSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
|
|
97
93
|
export type SideBarDesktopStyles = M4LOverridesStyleRules<SideBarDesktopSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
|
|
98
94
|
export type ContentGroupsStyles = M4LOverridesStyleRules<ContentGroupsSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
|
|
99
95
|
export type HeaderSidebarStyles = M4LOverridesStyleRules<HeaderSidebarSlots, typeof SIDEBAR_KEY_COMPONENT, Theme>;
|
|
@@ -26,7 +26,6 @@ const WindowBase = (props) => {
|
|
|
26
26
|
onMouseDown,
|
|
27
27
|
editionInfo,
|
|
28
28
|
type = "layout",
|
|
29
|
-
collapsed,
|
|
30
29
|
...other
|
|
31
30
|
} = props;
|
|
32
31
|
const { currentSize } = useComponentSize(size);
|
|
@@ -36,8 +35,7 @@ const WindowBase = (props) => {
|
|
|
36
35
|
variant: computedVariant,
|
|
37
36
|
size: currentSize,
|
|
38
37
|
type,
|
|
39
|
-
maximized
|
|
40
|
-
collapsed
|
|
38
|
+
maximized
|
|
41
39
|
};
|
|
42
40
|
return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
|
|
43
41
|
WindowBaseStyled,
|
|
@@ -57,7 +55,6 @@ const WindowBase = (props) => {
|
|
|
57
55
|
variant,
|
|
58
56
|
selected,
|
|
59
57
|
maximized,
|
|
60
|
-
collapsed,
|
|
61
58
|
onClose,
|
|
62
59
|
type,
|
|
63
60
|
...other
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { alpha } from "@mui/material";
|
|
2
2
|
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
const windowBaseStyles = {
|
|
4
4
|
/**
|
|
@@ -64,10 +64,7 @@ const windowBaseStyles = {
|
|
|
64
64
|
overflow: "auto",
|
|
65
65
|
width: "100%",
|
|
66
66
|
height: "100%",
|
|
67
|
-
zIndex: 1
|
|
68
|
-
...ownerState?.collapsed && !ownerState?.maximized && {
|
|
69
|
-
display: "none"
|
|
70
|
-
}
|
|
67
|
+
zIndex: 1
|
|
71
68
|
}),
|
|
72
69
|
/**
|
|
73
70
|
* Styles for the header of the window base component.
|
|
@@ -102,8 +99,8 @@ const windowBaseStyles = {
|
|
|
102
99
|
)
|
|
103
100
|
},
|
|
104
101
|
borderBottom: "1px solid #ffffff00",
|
|
105
|
-
...ownerState?.selected && ownerState?.type === "layout" && ownerState?.variant === "outlined"
|
|
106
|
-
background: `linear-gradient(to right, ${theme.
|
|
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)});`,
|
|
107
104
|
"&::before": {
|
|
108
105
|
content: '""',
|
|
109
106
|
position: "absolute",
|
|
@@ -111,7 +108,7 @@ const windowBaseStyles = {
|
|
|
111
108
|
left: 0,
|
|
112
109
|
width: "100%",
|
|
113
110
|
height: "1px",
|
|
114
|
-
background: `linear-gradient(to left, ${theme.
|
|
111
|
+
background: `linear-gradient(to left, ${alpha(theme.palette.primary.opacity, 0.06)}, ${alpha(theme.palette.primary.opacity, 0)});`
|
|
115
112
|
}
|
|
116
113
|
} : {
|
|
117
114
|
background: "transparent",
|
|
@@ -148,16 +145,7 @@ const windowBaseStyles = {
|
|
|
148
145
|
textOverflow: "ellipsis",
|
|
149
146
|
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
150
147
|
userSelect: "none",
|
|
151
|
-
cursor: "all-scroll"
|
|
152
|
-
...ownerState?.maximized && {
|
|
153
|
-
"&&&": {
|
|
154
|
-
...getTypographyStyles(
|
|
155
|
-
theme.generalSettings.isMobile,
|
|
156
|
-
ownerState?.size || "small",
|
|
157
|
-
"paragraphDens"
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
}
|
|
148
|
+
cursor: "all-scroll"
|
|
161
149
|
}),
|
|
162
150
|
/**
|
|
163
151
|
* Styles for the subtitle container of the header of the window base component.
|
|
@@ -244,9 +232,6 @@ const windowBaseStyles = {
|
|
|
244
232
|
marginRight: theme.vars.size.baseSpacings.sp1,
|
|
245
233
|
marginBottom: ownerState?.type === "layout" ? "auto!important" : "unset!important",
|
|
246
234
|
"&.collapse-toggle": {
|
|
247
|
-
...ownerState?.maximized && {
|
|
248
|
-
display: "none"
|
|
249
|
-
},
|
|
250
235
|
"&:hover": {
|
|
251
236
|
backgroundColor: `${theme.vars.palette.chips.orange.contained.backgroundColor} !important`,
|
|
252
237
|
"& .M4LIcon-icon": {
|
|
@@ -261,19 +246,16 @@ const windowBaseStyles = {
|
|
|
261
246
|
}
|
|
262
247
|
},
|
|
263
248
|
"&.expand-toggle": {
|
|
264
|
-
...ownerState?.collapsed && {
|
|
265
|
-
display: "none"
|
|
266
|
-
},
|
|
267
249
|
"&:hover": {
|
|
268
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
250
|
+
backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColor} !important`,
|
|
269
251
|
"& .M4LIcon-icon": {
|
|
270
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
252
|
+
backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColorTone} !important`
|
|
271
253
|
}
|
|
272
254
|
},
|
|
273
255
|
"&:active": {
|
|
274
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
256
|
+
backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundHover} !important`,
|
|
275
257
|
"& .M4LIcon-icon": {
|
|
276
|
-
backgroundColor: `${theme.vars.palette.chips.
|
|
258
|
+
backgroundColor: `${theme.vars.palette.chips.info.contained.backgroundColorTone} !important`
|
|
277
259
|
}
|
|
278
260
|
}
|
|
279
261
|
},
|
|
@@ -296,7 +278,7 @@ const windowBaseStyles = {
|
|
|
296
278
|
}
|
|
297
279
|
},
|
|
298
280
|
"& .window-actions:first-child": {
|
|
299
|
-
marginLeft: `${theme.vars.size.baseSpacings.
|
|
281
|
+
marginLeft: `${theme.vars.size.baseSpacings.sp2} !important`
|
|
300
282
|
}
|
|
301
283
|
}),
|
|
302
284
|
/**
|
|
@@ -328,9 +310,6 @@ const windowBaseStyles = {
|
|
|
328
310
|
)
|
|
329
311
|
} : {
|
|
330
312
|
height: "auto!important"
|
|
331
|
-
},
|
|
332
|
-
...ownerState?.collapsed && {
|
|
333
|
-
display: "none"
|
|
334
313
|
}
|
|
335
314
|
}),
|
|
336
315
|
/**
|
|
@@ -347,15 +326,11 @@ const windowBaseStyles = {
|
|
|
347
326
|
display: "flex",
|
|
348
327
|
alignItems: "center",
|
|
349
328
|
flexDirection: "row",
|
|
350
|
-
justifyContent: "flex-
|
|
329
|
+
justifyContent: "flex-end",
|
|
351
330
|
alignSelf: "stretch",
|
|
352
331
|
gap: theme.vars.size.baseSpacings.sp2,
|
|
332
|
+
paddingRight: theme.vars.size.baseSpacings.sp3,
|
|
353
333
|
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,
|
|
359
334
|
"& > span": {
|
|
360
335
|
whiteSpace: "nowrap",
|
|
361
336
|
overflow: "hidden",
|
|
@@ -380,16 +355,6 @@ const windowBaseStyles = {
|
|
|
380
355
|
top: "20px !important",
|
|
381
356
|
right: "24px !important"
|
|
382
357
|
}
|
|
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
|
-
}
|
|
393
358
|
})
|
|
394
359
|
};
|
|
395
360
|
export {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
|
|
3
1
|
const WINDOW_BASE_KEY_COMPONENT = "M4LWindowBase";
|
|
4
|
-
const WINDOW_BASE_CLASSES = getComponentClasses(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots);
|
|
5
2
|
export {
|
|
6
|
-
WINDOW_BASE_KEY_COMPONENT as W
|
|
7
|
-
WINDOW_BASE_CLASSES as a
|
|
3
|
+
WINDOW_BASE_KEY_COMPONENT as W
|
|
8
4
|
};
|
|
@@ -13,6 +13,5 @@ export declare enum WindowBaseSlots {
|
|
|
13
13
|
linearProgressIndeterminate = "linearProgressIndeterminate",
|
|
14
14
|
contentEditionInfo = "contentEditionInfo",
|
|
15
15
|
windowContainerComponent = "windowContainerComponent",
|
|
16
|
-
toastContainer = "toastContainer"
|
|
17
|
-
containerLeftActions = "containerLeftActions"
|
|
16
|
+
toastContainer = "toastContainer"
|
|
18
17
|
}
|
|
@@ -14,7 +14,6 @@ var WindowBaseSlots = /* @__PURE__ */ ((WindowBaseSlots2) => {
|
|
|
14
14
|
WindowBaseSlots2["contentEditionInfo"] = "contentEditionInfo";
|
|
15
15
|
WindowBaseSlots2["windowContainerComponent"] = "windowContainerComponent";
|
|
16
16
|
WindowBaseSlots2["toastContainer"] = "toastContainer";
|
|
17
|
-
WindowBaseSlots2["containerLeftActions"] = "containerLeftActions";
|
|
18
17
|
return WindowBaseSlots2;
|
|
19
18
|
})(WindowBaseSlots || {});
|
|
20
19
|
export {
|
|
@@ -80,6 +80,3 @@ 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,10 +67,6 @@ 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);
|
|
74
70
|
export {
|
|
75
71
|
ContentWindowStyled as C,
|
|
76
72
|
HeaderWindowComponentStyled as H,
|
|
@@ -86,6 +82,5 @@ export {
|
|
|
86
82
|
HeaderContentStyled as c,
|
|
87
83
|
ContainerTitleSubtitleStyled as d,
|
|
88
84
|
TitleWindowStyled as e,
|
|
89
|
-
IconsWrapperStyled as f
|
|
90
|
-
ContainerLeftActionsStyled as g
|
|
85
|
+
IconsWrapperStyled as f
|
|
91
86
|
};
|
|
@@ -7,9 +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,
|
|
11
|
-
import { a as WINDOW_BASE_CLASSES } from "../../constants.js";
|
|
12
|
-
import clsx from "clsx";
|
|
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";
|
|
13
11
|
const HeaderWindowBase = (props) => {
|
|
14
12
|
const {
|
|
15
13
|
title,
|
|
@@ -23,7 +21,6 @@ const HeaderWindowBase = (props) => {
|
|
|
23
21
|
buildTime,
|
|
24
22
|
variant,
|
|
25
23
|
actions = [],
|
|
26
|
-
collapsed,
|
|
27
24
|
type
|
|
28
25
|
} = props;
|
|
29
26
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -102,12 +99,11 @@ const HeaderWindowBase = (props) => {
|
|
|
102
99
|
maximized,
|
|
103
100
|
variant,
|
|
104
101
|
size,
|
|
105
|
-
type
|
|
106
|
-
collapsed
|
|
102
|
+
type
|
|
107
103
|
};
|
|
108
104
|
const IconButtonLeftActions = useButtonActions(leftActions);
|
|
109
105
|
const IconButtonRightActions = useButtonActions(rightActions);
|
|
110
|
-
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className:
|
|
106
|
+
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: dragResizeWindowRNDClasses.draggableHandle, ownerState, children: [
|
|
111
107
|
/* @__PURE__ */ jsxs(HeaderContentStyled, { ownerState, children: [
|
|
112
108
|
iconUrl && /* @__PURE__ */ jsx(IconWindowStyled, { size, ownerState, src: iconUrl, "aria-label": "main icon" }),
|
|
113
109
|
/* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { size, ownerState, children: [
|
|
@@ -130,7 +126,7 @@ const HeaderWindowBase = (props) => {
|
|
|
130
126
|
className: dragResizeWindowRNDClasses.draggableCancel,
|
|
131
127
|
ownerState,
|
|
132
128
|
children: [
|
|
133
|
-
|
|
129
|
+
IconButtonLeftActions,
|
|
134
130
|
menuActions.length > 0 && /* @__PURE__ */ jsx(
|
|
135
131
|
MenuActionsWindowsStyled,
|
|
136
132
|
{
|
|
@@ -14,8 +14,7 @@ const useButtonActions = (actions) => {
|
|
|
14
14
|
onClick: groupAction.onClick || (() => {
|
|
15
15
|
}),
|
|
16
16
|
color: groupAction.color,
|
|
17
|
-
className: action.className
|
|
18
|
-
placement: action.placement
|
|
17
|
+
className: action.className
|
|
19
18
|
},
|
|
20
19
|
groupAction.key
|
|
21
20
|
)) }, action.key);
|
|
@@ -28,8 +27,7 @@ const useButtonActions = (actions) => {
|
|
|
28
27
|
disabled: action.disabled,
|
|
29
28
|
onClick: action.onClick || (() => {
|
|
30
29
|
}),
|
|
31
|
-
className: action.className
|
|
32
|
-
placement: action.placement
|
|
30
|
+
className: action.className
|
|
33
31
|
},
|
|
34
32
|
action.key
|
|
35
33
|
);
|
|
@@ -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
|
|
9
|
+
declare const MemoizedIconButton: React.MemoExoticComponent<({ iconUrl, label, disabled, onClick, color, className, selected }: 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
|
|
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 })
|
|
6
6
|
);
|
|
7
7
|
export {
|
|
8
8
|
MemoizedIconButton as M
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TooltipProps } from '../../../mui_extended/Tooltip/types';
|
|
2
1
|
import { IconButtonProps } from '../../../mui_extended/IconButton/types';
|
|
3
2
|
/**
|
|
4
3
|
* Props for the `MemoizedIconButton` component.
|
|
@@ -32,8 +31,4 @@ export interface MemoizedIconButtonProps {
|
|
|
32
31
|
* Whether the button is selected.
|
|
33
32
|
*/
|
|
34
33
|
selected?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Whether the button is collapsed.
|
|
37
|
-
*/
|
|
38
|
-
placement?: TooltipProps['placement'];
|
|
39
34
|
}
|
|
@@ -6,7 +6,6 @@ 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';
|
|
10
9
|
/**
|
|
11
10
|
* Opciones para la ventana.
|
|
12
11
|
*/
|
|
@@ -79,10 +78,6 @@ export type WindowBaseModuleAction = Omit<ModuleActionMenuItem, 'visibility'> |
|
|
|
79
78
|
export type WindowBaseAction = WindowBaseModuleAction & {
|
|
80
79
|
place: 'left' | 'right' | 'inside';
|
|
81
80
|
className?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Placement of the tooltip.
|
|
84
|
-
*/
|
|
85
|
-
placement?: TooltipProps['placement'];
|
|
86
81
|
};
|
|
87
82
|
/**
|
|
88
83
|
* Interface representing the main properties of the `WindowBase` component.
|
|
@@ -127,11 +122,6 @@ export interface WindowBaseProps {
|
|
|
127
122
|
* When `true`, the window may display a visual indicator to denote selection.
|
|
128
123
|
*/
|
|
129
124
|
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;
|
|
135
125
|
/**
|
|
136
126
|
* Indicates if the window is maximized.
|
|
137
127
|
* When `true`, the window may display a visual indicator to denote maximization.
|
|
@@ -208,7 +198,6 @@ export type WindowBaseType = keyof typeof WindowBaseSlots;
|
|
|
208
198
|
*/
|
|
209
199
|
export type WindowBaseOwnerState = Pick<WindowBaseProps, 'size'> & {
|
|
210
200
|
selected?: WindowBaseProps['selected'];
|
|
211
|
-
collapsed?: WindowBaseProps['collapsed'];
|
|
212
201
|
maximized?: WindowBaseProps['maximized'];
|
|
213
202
|
variant?: WindowBaseProps['variant'];
|
|
214
203
|
size?: WindowBaseProps['size'];
|
package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js
CHANGED
|
@@ -36,18 +36,6 @@ 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
|
-
);
|
|
51
39
|
if (status === void 0) {
|
|
52
40
|
return null;
|
|
53
41
|
}
|
|
@@ -68,7 +56,6 @@ const Window = (props) => {
|
|
|
68
56
|
maximized: !!maximizedId,
|
|
69
57
|
onMouseDown: onTouch,
|
|
70
58
|
type: emergeType,
|
|
71
|
-
collapsed,
|
|
72
59
|
...process.env.NODE_ENV !== "production" ? {
|
|
73
60
|
[TEST_PROP_ID]: getNameDataTestId(
|
|
74
61
|
AREAS_VIEWER_CLASS_NAME,
|
|
@@ -31,46 +31,45 @@ const useRightActions = ({
|
|
|
31
31
|
const actions = [];
|
|
32
32
|
actions.push({
|
|
33
33
|
place: "right",
|
|
34
|
-
key: "
|
|
35
|
-
iconUrl:
|
|
36
|
-
label:
|
|
34
|
+
key: "maximize",
|
|
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
|
+
label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
|
|
37
37
|
/**
|
|
38
|
-
* Acción de
|
|
38
|
+
* Acción de maximize/normalize.
|
|
39
39
|
*/
|
|
40
40
|
onClick: () => {
|
|
41
41
|
if (areaId) {
|
|
42
|
-
if (
|
|
43
|
-
|
|
42
|
+
if (maximizedId) {
|
|
43
|
+
normalizeLayouts(areaId);
|
|
44
44
|
} else {
|
|
45
|
-
|
|
45
|
+
maximizeLayout(areaId, windowId);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
disabled:
|
|
50
|
-
color: "
|
|
51
|
-
className: "
|
|
49
|
+
disabled: false,
|
|
50
|
+
color: "info",
|
|
51
|
+
className: "expand-toggle window-actions"
|
|
52
52
|
});
|
|
53
53
|
actions.push({
|
|
54
54
|
place: "right",
|
|
55
|
-
key: "
|
|
56
|
-
iconUrl:
|
|
57
|
-
label:
|
|
58
|
-
placement: "bottom-end",
|
|
55
|
+
key: "collapseToggle",
|
|
56
|
+
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}`,
|
|
57
|
+
label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
|
|
59
58
|
/**
|
|
60
|
-
* Acción de
|
|
59
|
+
* Acción de collapse/expand.
|
|
61
60
|
*/
|
|
62
61
|
onClick: () => {
|
|
63
62
|
if (areaId) {
|
|
64
|
-
if (
|
|
65
|
-
|
|
63
|
+
if (collapsed) {
|
|
64
|
+
unColapseLayoutItem(areaId, windowId);
|
|
66
65
|
} else {
|
|
67
|
-
|
|
66
|
+
colapseLayoutItem(areaId, windowId);
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
|
-
disabled:
|
|
72
|
-
color: "
|
|
73
|
-
className: "
|
|
70
|
+
disabled: !(maximizedId === void 0),
|
|
71
|
+
color: "warning",
|
|
72
|
+
className: "collapse-toggle window-actions"
|
|
74
73
|
});
|
|
75
74
|
return actions;
|
|
76
75
|
}, [
|
|
@@ -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.
|
|
9
|
+
borderColor: theme.palette.border.default,
|
|
10
10
|
borderRadius: "0%",
|
|
11
11
|
backgroundImage: "none",
|
|
12
12
|
position: "absolute",
|
|
@@ -2,14 +2,12 @@ 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
|
|
5
|
+
import { S as SPLIT_LAYOUT_KEY_COMPONENT } 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
|
|
8
|
-
import { useEnvironment } from "@m4l/core";
|
|
7
|
+
import { S as SplitLayoutRootStyled, a as SplitMasterStyled, b as SplitResizeHandleStyled, c as SplitDetailStyled } from "./slots/SplitLayoutSlots.js";
|
|
9
8
|
const SplitLayout = (props) => {
|
|
10
9
|
const { firstPart, secondPart, splitPosition, dataTestId, defaultMasterSize = 50, defaultDetailSize = 50 } = props;
|
|
11
10
|
const classes = getComponentClasses(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots);
|
|
12
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
11
|
const firstPartMemo = useMemo(() => {
|
|
14
12
|
return typeof firstPart === "function" ? firstPart() : firstPart;
|
|
15
13
|
}, [firstPart]);
|
|
@@ -40,8 +38,7 @@ const SplitLayout = (props) => {
|
|
|
40
38
|
SplitResizeHandleStyled,
|
|
41
39
|
{
|
|
42
40
|
className: `${classes.splitResizeHandle}-${splitPosition}`,
|
|
43
|
-
ownerState
|
|
44
|
-
children: /* @__PURE__ */ jsx(SplitResizeHandleIconStyled, { src: `${host_static_assets}/${environment_assets}/${SPLIT_LAYOUT_ICONS.handleIcon}` })
|
|
41
|
+
ownerState
|
|
45
42
|
}
|
|
46
43
|
),
|
|
47
44
|
/* @__PURE__ */ jsx(
|