@m4l/components 9.2.61 → 9.2.62-B07072025beta.2
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.styles.js +8 -13
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -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 +6 -7
- 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/PopoverMenuFields/PopoverMenuFields.js +4 -1
- 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/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/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/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/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- 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/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- 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/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/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/index.d.ts +1 -0
- package/index.js +16 -13
- package/package.json +5 -4
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +2 -2
- 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
|
@@ -5,7 +5,7 @@ import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilter
|
|
|
5
5
|
import { useModuleDictionary } from "@m4l/core";
|
|
6
6
|
import { a as DICCTIONARY } from "../../dictionary.js";
|
|
7
7
|
import { u as usePopoverContainer } from "../../../../hooks/usePopoverContainer/usePopoverContainer.js";
|
|
8
|
-
import {
|
|
8
|
+
import { j as PopoverMenuStyled } from "../../slots/dynamicFilterSlots.js";
|
|
9
9
|
function PopoverMenuFields(props) {
|
|
10
10
|
const { fields, selectFieldIndex } = props;
|
|
11
11
|
const { elementRef, handleOpenPopUpClickItem, handleClosePopover, getItemLabel, isOpenPopoverMenuFields } = usePopoverMenuFields();
|
|
@@ -21,6 +21,9 @@ function PopoverMenuFields(props) {
|
|
|
21
21
|
arrowType: "top-left",
|
|
22
22
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
23
23
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
24
|
+
sx: (theme) => ({
|
|
25
|
+
mt: theme.vars.size.baseSpacings.sp2
|
|
26
|
+
}),
|
|
24
27
|
open: !!isOpenPopoverMenuFields,
|
|
25
28
|
onClose: handleClosePopover,
|
|
26
29
|
anchorEl,
|
|
@@ -5,50 +5,55 @@ const dynamicSortStyles = {
|
|
|
5
5
|
/**
|
|
6
6
|
* Root: Estilos del contenedor principal del componente.
|
|
7
7
|
*/
|
|
8
|
-
root: () => ({
|
|
8
|
+
root: ({ theme, ownerState }) => ({
|
|
9
9
|
containerName: CONTAINER_QUERY_NAME,
|
|
10
10
|
containerType: "inline-size",
|
|
11
11
|
width: "100%",
|
|
12
12
|
height: "auto",
|
|
13
|
-
padding: 0
|
|
13
|
+
padding: 0,
|
|
14
|
+
...getSizeStyles(
|
|
15
|
+
theme,
|
|
16
|
+
ownerState?.size || "medium",
|
|
17
|
+
"container",
|
|
18
|
+
(size) => ({
|
|
19
|
+
height: size,
|
|
20
|
+
maxHeight: size,
|
|
21
|
+
minHeight: size
|
|
22
|
+
})
|
|
23
|
+
)
|
|
14
24
|
}),
|
|
15
25
|
/**
|
|
16
26
|
* innerContainer: Estilos del contenedor interno del componente.
|
|
17
27
|
*/
|
|
18
28
|
innerContainer: ({ theme, ownerState }) => ({
|
|
19
|
-
display: "
|
|
20
|
-
gridTemplateColumns: "auto 1fr auto",
|
|
21
|
-
gridTemplateAreas: '"input-sort applied-sorts actions-sort"',
|
|
29
|
+
display: "flex",
|
|
22
30
|
alignItems: "center",
|
|
23
31
|
justifyContent: "flex-start",
|
|
24
32
|
width: "100%",
|
|
25
33
|
height: "fit-content",
|
|
26
|
-
|
|
27
|
-
borderRadius: theme.vars.size.borderRadius.r1,
|
|
28
|
-
borderColor: ownerState?.isValid ? theme.vars.palette.border?.default : theme.vars.palette.error.enabled,
|
|
34
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
29
35
|
background: theme.vars.palette.background.default,
|
|
36
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.default}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`,
|
|
37
|
+
overflow: "hidden",
|
|
30
38
|
'&:has([aria-expanded="true"])': {
|
|
31
|
-
|
|
39
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1.3px ${theme.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`
|
|
32
40
|
}
|
|
33
41
|
}),
|
|
34
42
|
/**
|
|
35
43
|
* inputSort: Estilos del contenedor del campo de entrada de ordenamiento.
|
|
36
44
|
*/
|
|
37
45
|
inputSort: ({ theme, ownerState }) => ({
|
|
38
|
-
gridArea: "input-sort",
|
|
39
46
|
display: "flex",
|
|
40
47
|
flexDirection: "row",
|
|
41
|
-
paddingLeft: theme.vars.size.baseSpacings.
|
|
48
|
+
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
42
49
|
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
43
50
|
height: "100%",
|
|
44
51
|
overflow: "hidden",
|
|
45
|
-
maxWidth: "
|
|
52
|
+
maxWidth: "120px",
|
|
46
53
|
width: "100%",
|
|
47
54
|
alignItems: "center",
|
|
48
55
|
borderTopLeftRadius: theme.vars.size.borderRadius.r1,
|
|
49
56
|
borderBottomLeftRadius: theme.vars.size.borderRadius.r1,
|
|
50
|
-
borderRight: theme.vars.size.borderStroke.container,
|
|
51
|
-
borderColor: theme.vars.palette.border?.default,
|
|
52
57
|
...getSizeStyles(
|
|
53
58
|
theme,
|
|
54
59
|
ownerState?.size || "medium",
|
|
@@ -62,6 +67,8 @@ const dynamicSortStyles = {
|
|
|
62
67
|
* inputSortInput: Estilos del campo de entrada de ordenamiento.
|
|
63
68
|
*/
|
|
64
69
|
inputSortInput: ({ theme, ownerState }) => ({
|
|
70
|
+
width: "100%",
|
|
71
|
+
background: "#ffffff00",
|
|
65
72
|
...getSizeStyles(
|
|
66
73
|
theme,
|
|
67
74
|
ownerState?.size || "medium",
|
|
@@ -72,51 +79,57 @@ const dynamicSortStyles = {
|
|
|
72
79
|
maxHeight: size
|
|
73
80
|
})
|
|
74
81
|
),
|
|
82
|
+
fontFamily: "inherit",
|
|
75
83
|
...getTypographyStyles(
|
|
76
84
|
theme.generalSettings.isMobile,
|
|
77
85
|
ownerState?.size || "medium",
|
|
78
86
|
"body"
|
|
79
87
|
),
|
|
80
|
-
background: theme.vars.palette.background.default,
|
|
81
88
|
color: theme.vars.palette.text.secondary,
|
|
82
89
|
border: 0,
|
|
83
90
|
borderColor: "transparent",
|
|
84
91
|
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
85
92
|
paddingRight: theme.vars.size.baseSpacings.sp2,
|
|
86
|
-
width: "100%",
|
|
87
93
|
height: "100%",
|
|
88
94
|
"&::placeholder": {
|
|
89
95
|
color: theme.vars.palette.text.secondary
|
|
90
96
|
},
|
|
91
97
|
"&:focus-visible": {
|
|
92
98
|
color: theme.vars.palette.text.secondary,
|
|
93
|
-
border:
|
|
99
|
+
border: "unset",
|
|
94
100
|
borderColor: theme.vars.palette.primary.opacity,
|
|
95
|
-
background: theme.vars.palette.primary.opacity,
|
|
96
101
|
BorderRadius: theme.vars.size.borderRadius["r0-5"],
|
|
97
102
|
outline: "none!important"
|
|
98
|
-
},
|
|
99
|
-
"&:hover": {
|
|
100
|
-
borderColor: theme.vars.palette.primary?.toneOpacity,
|
|
101
|
-
background: theme.vars.palette.background?.hover
|
|
102
103
|
}
|
|
103
104
|
}),
|
|
104
105
|
/**
|
|
105
106
|
* appliedSorts: Estilos del contenedor de los campos de ordenamiento aplicados.
|
|
106
107
|
*/
|
|
107
|
-
appliedSorts: ({ theme }) => ({
|
|
108
|
-
gridArea: "applied-sorts",
|
|
108
|
+
appliedSorts: ({ theme, ownerState }) => ({
|
|
109
109
|
width: "100%",
|
|
110
110
|
height: "fit-content",
|
|
111
|
-
|
|
111
|
+
display: "flex",
|
|
112
|
+
alignItems: "center",
|
|
112
113
|
borderLeft: "none",
|
|
113
114
|
margin: "0px",
|
|
114
|
-
padding: `0px ${theme.vars.size.baseSpacings.sp1}
|
|
115
|
+
padding: `0px ${theme.vars.size.baseSpacings.sp1}`,
|
|
116
|
+
flex: 1,
|
|
117
|
+
overflow: "hidden",
|
|
118
|
+
...getSizeStyles(
|
|
119
|
+
theme,
|
|
120
|
+
ownerState?.size || "medium",
|
|
121
|
+
"container",
|
|
122
|
+
(size) => ({
|
|
123
|
+
height: size,
|
|
124
|
+
maxHeight: size,
|
|
125
|
+
minHeight: size
|
|
126
|
+
})
|
|
127
|
+
)
|
|
115
128
|
}),
|
|
116
129
|
/**
|
|
117
130
|
* appliedSortInnerContainer: Estilos del contenedor interno de los campos de ordenamiento aplicados.
|
|
118
131
|
*/
|
|
119
|
-
appliedSortInnerContainer: ({ theme }) => ({
|
|
132
|
+
appliedSortInnerContainer: ({ theme, ownerState }) => ({
|
|
120
133
|
padding: theme.vars.size.baseSpacings["sp0-5"],
|
|
121
134
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
122
135
|
height: "fit-content",
|
|
@@ -126,13 +139,30 @@ const dynamicSortStyles = {
|
|
|
126
139
|
justifyContent: "flex-start",
|
|
127
140
|
alignItems: "center",
|
|
128
141
|
overflow: "auto hidden",
|
|
129
|
-
position: "relative"
|
|
142
|
+
position: "relative",
|
|
143
|
+
"& .M4LChip-root": {
|
|
144
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
145
|
+
...getSizeStyles(
|
|
146
|
+
theme,
|
|
147
|
+
ownerState?.size || "medium",
|
|
148
|
+
"action",
|
|
149
|
+
(size) => ({
|
|
150
|
+
height: size
|
|
151
|
+
})
|
|
152
|
+
),
|
|
153
|
+
"& .M4LIconButton-styledMUIIconButton:hover": {
|
|
154
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundHover} !important`,
|
|
155
|
+
"& .M4LIcon-icon": {
|
|
156
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundColorTone} !important`
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
130
160
|
}),
|
|
131
161
|
/**
|
|
132
162
|
* actions: Estilos del contenedor de los botones de acción.
|
|
133
163
|
*/
|
|
134
164
|
actions: ({ theme, ownerState }) => ({
|
|
135
|
-
gridArea: "actions-
|
|
165
|
+
gridArea: "actions-filter",
|
|
136
166
|
overflow: "hidden",
|
|
137
167
|
display: "flex",
|
|
138
168
|
flexDirection: "row",
|
|
@@ -142,19 +172,33 @@ const dynamicSortStyles = {
|
|
|
142
172
|
alignItems: "center",
|
|
143
173
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
144
174
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
145
|
-
|
|
146
|
-
|
|
175
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.default}`,
|
|
176
|
+
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
177
|
+
display: "none"
|
|
178
|
+
},
|
|
179
|
+
...ownerState?.inEdition && ownerState?.isValid && {
|
|
180
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.main}`
|
|
181
|
+
},
|
|
182
|
+
...!ownerState?.isValid && {
|
|
183
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.error.enabled}`
|
|
184
|
+
}
|
|
185
|
+
}),
|
|
186
|
+
/**
|
|
187
|
+
* actionsClearButton: Estilos del botón de acción de limpiar.
|
|
188
|
+
*/
|
|
189
|
+
actionsClearButton: ({ theme }) => ({
|
|
190
|
+
visibility: "visible",
|
|
191
|
+
"&:hover": {
|
|
192
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundHover} !important`,
|
|
193
|
+
"& .M4LIcon-icon": {
|
|
194
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundColorTone} !important`
|
|
195
|
+
}
|
|
196
|
+
}
|
|
147
197
|
}),
|
|
148
|
-
actionsClearButton: {
|
|
149
|
-
visibility: "visible"
|
|
150
|
-
},
|
|
151
198
|
/**
|
|
152
199
|
* actionsSubmitButton: Estilos del botón de acción de envío de formulario.
|
|
153
200
|
*/
|
|
154
201
|
actionsSubmitButton: ({ theme, ownerState }) => ({
|
|
155
|
-
...ownerState?.isValid === false ? { border: `1px dashed ${theme.vars.palette.error.enabled}` } : {
|
|
156
|
-
visibility: "visible"
|
|
157
|
-
},
|
|
158
202
|
...ownerState?.isDirty ? {
|
|
159
203
|
animation: "changeBgColor 0.9s ease infinite",
|
|
160
204
|
"& .M4LIcon-icon": {
|
|
@@ -206,73 +250,31 @@ const dynamicSortStyles = {
|
|
|
206
250
|
minWidth: "220px",
|
|
207
251
|
maxWidth: "420px",
|
|
208
252
|
height: "fit-content"
|
|
253
|
+
},
|
|
254
|
+
"& .M4LWindowBase-root": {
|
|
255
|
+
border: "unset!important",
|
|
256
|
+
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
|
+
cursor: "unset"
|
|
258
|
+
}
|
|
209
259
|
}
|
|
210
260
|
}
|
|
211
261
|
}),
|
|
212
|
-
/**
|
|
213
|
-
* popoverSortHeader: Estilos del encabezado del menú emergente de ordenamiento.
|
|
214
|
-
*/
|
|
215
|
-
popoverSortHeader: ({ theme, ownerState }) => ({
|
|
216
|
-
display: "flex",
|
|
217
|
-
alignItems: "center",
|
|
218
|
-
gap: theme.vars.size.baseSpacings.sp2,
|
|
219
|
-
padding: theme.vars.size.baseSpacings.sp1,
|
|
220
|
-
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
221
|
-
borderTopLeftRadius: theme.vars.size.borderRadius.r1,
|
|
222
|
-
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
223
|
-
borderBottom: theme.vars.size.borderStroke.container,
|
|
224
|
-
borderColor: theme.vars.palette.border.secondary,
|
|
225
|
-
"& .MuiTypography-root": {
|
|
226
|
-
color: theme.vars.palette.primary.main
|
|
227
|
-
},
|
|
228
|
-
"& .M4LIcon-icon": {
|
|
229
|
-
backgroundColor: theme.vars.palette.primary.main
|
|
230
|
-
},
|
|
231
|
-
...getSizeStyles(
|
|
232
|
-
theme,
|
|
233
|
-
ownerState?.size || "medium",
|
|
234
|
-
"container",
|
|
235
|
-
(size) => ({
|
|
236
|
-
height: size
|
|
237
|
-
})
|
|
238
|
-
)
|
|
239
|
-
}),
|
|
240
|
-
/**
|
|
241
|
-
* popoverSortHeaderTitle: Estilos del título del menú emergente de ordenamiento.
|
|
242
|
-
*/
|
|
243
|
-
popoverSortHeaderTitle: ({ theme }) => ({
|
|
244
|
-
color: `${theme.vars.palette.primary.main} !important`
|
|
245
|
-
}),
|
|
246
262
|
/**
|
|
247
263
|
* popoverSortContainerFields: Estilos del contenedor de campos del menú emergente de ordenamiento.
|
|
248
264
|
*/
|
|
249
|
-
popoverSortContainerFields: () => ({
|
|
250
|
-
height: "fit-content",
|
|
251
|
-
"& > div": {
|
|
252
|
-
display: "flex",
|
|
253
|
-
height: "auto",
|
|
254
|
-
flexDirection: "column"
|
|
255
|
-
}
|
|
256
|
-
}),
|
|
257
|
-
/**
|
|
258
|
-
* contentSort: Estilos del contenedor entre el change sort y actions
|
|
259
|
-
*/
|
|
260
|
-
contentSort: ({ theme }) => ({
|
|
265
|
+
popoverSortContainerFields: ({ theme }) => ({
|
|
261
266
|
display: "flex",
|
|
262
267
|
flexDirection: "column",
|
|
263
|
-
|
|
264
|
-
gap: theme.vars.size.baseSpacings.sp3
|
|
268
|
+
gap: theme.vars.size.baseSpacings.sp4
|
|
265
269
|
}),
|
|
266
270
|
/**
|
|
267
271
|
* popoverSortActions: Estilos del contenedor de acciones del menú emergente de ordenamiento.
|
|
268
272
|
*/
|
|
269
|
-
popoverSortActions:
|
|
270
|
-
padding: `${theme.vars.size.baseSpacings.sp3} 0px`
|
|
271
|
-
}),
|
|
273
|
+
popoverSortActions: {},
|
|
272
274
|
/**
|
|
273
|
-
*
|
|
275
|
+
* inputSortSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
274
276
|
*/
|
|
275
|
-
|
|
277
|
+
inputSortSkeleton: ({ theme, ownerState }) => ({
|
|
276
278
|
width: "100%",
|
|
277
279
|
minWidth: "80px",
|
|
278
280
|
marginLeft: theme.vars.size.baseSpacings.sp2,
|
|
@@ -34,15 +34,6 @@ export declare const PopoverStyled: import('@emotion/styled').StyledComponent<Pi
|
|
|
34
34
|
export declare const PopoverContainerFieldsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
35
35
|
ownerState?: (Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>) | undefined;
|
|
36
36
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
37
|
-
export declare const PopoverHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
38
|
-
ownerState?: (Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>) | undefined;
|
|
39
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
40
|
-
export declare const ContentSortStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
41
|
-
ownerState?: (Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>) | undefined;
|
|
42
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
43
|
-
export declare const PopoverHeaderTitleStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
44
|
-
ownerState?: (Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>) | undefined;
|
|
45
|
-
}, {}, {}>;
|
|
46
37
|
export declare const PopoverHeaderActionsStyled: import('@emotion/styled').StyledComponent<Pick<import('../../CommonActions/components/ActionsContainer').ActionsContainerProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../CommonActions/components/ActionsContainer').ActionsContainerProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
47
38
|
ownerState?: (Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>) | undefined;
|
|
48
39
|
}, {}, {}>;
|
|
@@ -4,7 +4,6 @@ import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../constants.js";
|
|
|
4
4
|
import { D as DynamicSortSlots } from "./SlotsEnum.js";
|
|
5
5
|
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
6
6
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
7
|
-
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
8
7
|
import { A as ActionsContainer } from "../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
9
8
|
import { P as Popover } from "../../mui_extended/Popover/Popover.js";
|
|
10
9
|
const RootStyled = styled("div", {
|
|
@@ -55,29 +54,16 @@ const PopoverContainerFieldsStyled = styled("div", {
|
|
|
55
54
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
56
55
|
slot: DynamicSortSlots.popoverSortContainerFields
|
|
57
56
|
})(dynamicSortStyles?.popoverSortContainerFields);
|
|
58
|
-
const PopoverHeaderStyled = styled("div", {
|
|
59
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
60
|
-
slot: DynamicSortSlots.popoverSortHeader
|
|
61
|
-
})(dynamicSortStyles?.popoverSortHeader);
|
|
62
|
-
const ContentSortStyled = styled("div", {
|
|
63
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
64
|
-
slot: DynamicSortSlots.contentSort
|
|
65
|
-
})(dynamicSortStyles?.contentSort);
|
|
66
|
-
const PopoverHeaderTitleStyled = styled(Typography, {
|
|
67
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
68
|
-
slot: DynamicSortSlots.popoverSortHeaderTitle
|
|
69
|
-
})(dynamicSortStyles?.popoverSortHeaderTitle);
|
|
70
57
|
const PopoverHeaderActionsStyled = styled(ActionsContainer, {
|
|
71
58
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
72
59
|
slot: DynamicSortSlots.popoverSortActions
|
|
73
60
|
})(dynamicSortStyles?.popoverSortActions);
|
|
74
61
|
const InputSortInputSkeletonStyled = styled(Skeleton, {
|
|
75
62
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
76
|
-
slot: DynamicSortSlots.
|
|
77
|
-
})(dynamicSortStyles?.
|
|
63
|
+
slot: DynamicSortSlots.inputSortSkeleton
|
|
64
|
+
})(dynamicSortStyles?.inputSortSkeleton);
|
|
78
65
|
export {
|
|
79
66
|
AppliedSortsStyled as A,
|
|
80
|
-
ContentSortStyled as C,
|
|
81
67
|
InnerContainerStyled as I,
|
|
82
68
|
PopoverMenuStyled as P,
|
|
83
69
|
RootStyled as R,
|
|
@@ -86,11 +72,9 @@ export {
|
|
|
86
72
|
InputSortInputSkeletonStyled as c,
|
|
87
73
|
InputSortInputStyled as d,
|
|
88
74
|
PopoverStyled as e,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
ActionsClearButtonStyled as k,
|
|
95
|
-
ActionsSubmitButtonStyled as l
|
|
75
|
+
PopoverContainerFieldsStyled as f,
|
|
76
|
+
PopoverHeaderActionsStyled as g,
|
|
77
|
+
ActionsStyled as h,
|
|
78
|
+
ActionsClearButtonStyled as i,
|
|
79
|
+
ActionsSubmitButtonStyled as j
|
|
96
80
|
};
|
|
@@ -11,9 +11,6 @@ export declare enum DynamicSortSlots {
|
|
|
11
11
|
popoverMenu = "popoverMenu",
|
|
12
12
|
popoverSort = "popoverSort",
|
|
13
13
|
popoverSortContainerFields = "popoverSortContainerFields",
|
|
14
|
-
popoverSortHeader = "popoverSortHeader",
|
|
15
|
-
contentSort = "contentSort",
|
|
16
|
-
popoverSortHeaderTitle = "popoverSortHeaderTitle",
|
|
17
14
|
popoverSortActions = "popoverSortActions",
|
|
18
|
-
|
|
15
|
+
inputSortSkeleton = "inputSortSkeleton"
|
|
19
16
|
}
|
|
@@ -11,11 +11,8 @@ var DynamicSortSlots = /* @__PURE__ */ ((DynamicSortSlots2) => {
|
|
|
11
11
|
DynamicSortSlots2["popoverMenu"] = "popoverMenu";
|
|
12
12
|
DynamicSortSlots2["popoverSort"] = "popoverSort";
|
|
13
13
|
DynamicSortSlots2["popoverSortContainerFields"] = "popoverSortContainerFields";
|
|
14
|
-
DynamicSortSlots2["popoverSortHeader"] = "popoverSortHeader";
|
|
15
|
-
DynamicSortSlots2["contentSort"] = "contentSort";
|
|
16
|
-
DynamicSortSlots2["popoverSortHeaderTitle"] = "popoverSortHeaderTitle";
|
|
17
14
|
DynamicSortSlots2["popoverSortActions"] = "popoverSortActions";
|
|
18
|
-
DynamicSortSlots2["
|
|
15
|
+
DynamicSortSlots2["inputSortSkeleton"] = "inputSortSkeleton";
|
|
19
16
|
return DynamicSortSlots2;
|
|
20
17
|
})(DynamicSortSlots || {});
|
|
21
18
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { S as SORT_ICONS } from "../../../icons.js";
|
|
@@ -25,7 +25,7 @@ function StringSort() {
|
|
|
25
25
|
],
|
|
26
26
|
[getLabel, host_static_assets, environment_assets]
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
29
29
|
RHFSelect,
|
|
30
30
|
{
|
|
31
31
|
size,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I as Icon } from "../../../Icon/Icon.js";
|
|
3
2
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
4
3
|
import { D as DataTypeComponent } from "../FieldTypes/DataTypeComponent.js";
|
|
5
4
|
import { u as usePopoverSort } from "./usePopoverSort.js";
|
|
6
|
-
import { e as PopoverStyled, f as
|
|
5
|
+
import { e as PopoverStyled, f as PopoverContainerFieldsStyled, g as PopoverHeaderActionsStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
6
|
import { R as RHFormProvider } from "../../../hook-form/RHFormContext/index.js";
|
|
7
|
+
import { W as WindowBase } from "../../../WindowBase/WindowBase.js";
|
|
8
8
|
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
9
9
|
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
10
10
|
function PopoverSort() {
|
|
@@ -22,7 +22,7 @@ function PopoverSort() {
|
|
|
22
22
|
statusLoad,
|
|
23
23
|
canRender
|
|
24
24
|
} = usePopoverSort();
|
|
25
|
-
const {
|
|
25
|
+
const { size } = useDynamicSortBase();
|
|
26
26
|
if (!canRender) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -38,26 +38,31 @@ function PopoverSort() {
|
|
|
38
38
|
anchorEl,
|
|
39
39
|
onKeyDown: handleKeyDownPopper,
|
|
40
40
|
onClose: handleClosePopover,
|
|
41
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ jsx(
|
|
42
42
|
RHFormProvider,
|
|
43
43
|
{
|
|
44
44
|
onSubmit,
|
|
45
45
|
values: sortFormValue,
|
|
46
46
|
validationSchema: popupValidationSchema,
|
|
47
47
|
statusLoad,
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
children: /* @__PURE__ */ jsxs(
|
|
49
|
+
WindowBase,
|
|
50
|
+
{
|
|
51
|
+
title: labelField,
|
|
52
|
+
iconUrl: field.urlIcon,
|
|
53
|
+
variant: "text",
|
|
54
|
+
type: "popup",
|
|
55
|
+
selected: true,
|
|
56
|
+
draggable: false,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { children: /* @__PURE__ */ jsx(DataTypeComponent, { formSort, statusLoad }) }),
|
|
59
|
+
/* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { children: [
|
|
60
|
+
/* @__PURE__ */ jsx(ActionCancel, { size, onClick: onClose }),
|
|
61
|
+
/* @__PURE__ */ jsx(ActionIntro, { size, "aria-label": "applySort" })
|
|
62
|
+
] })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
61
66
|
}
|
|
62
67
|
)
|
|
63
68
|
}
|
|
@@ -3,7 +3,7 @@ import { useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { g as getDynamicSortDictionary, D as DICCTIONARY } from "../../dictionary.js";
|
|
4
4
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
5
5
|
import { u as useSortActions } from "./useSortActions.js";
|
|
6
|
-
import {
|
|
6
|
+
import { h as ActionsStyled, i as ActionsClearButtonStyled, j as ActionsSubmitButtonStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
7
|
function SortActions() {
|
|
8
8
|
const {
|
|
9
9
|
sortIconUrl,
|
|
@@ -16,7 +16,7 @@ function SortActions() {
|
|
|
16
16
|
} = useSortActions();
|
|
17
17
|
const { size, visibleRefresh, ownerState: { isDirty } } = useDynamicSortBase();
|
|
18
18
|
const { getLabel } = useModuleDictionary();
|
|
19
|
-
return /* @__PURE__ */ jsxs(ActionsStyled, { ownerState: { isDirty: canShowRemoveAction, visibleRefresh }, children: [
|
|
19
|
+
return /* @__PURE__ */ jsxs(ActionsStyled, { ownerState: { ...ownerState, isDirty: canShowRemoveAction, visibleRefresh }, children: [
|
|
20
20
|
canShowRemoveAction && /* @__PURE__ */ jsx(
|
|
21
21
|
ActionsClearButtonStyled,
|
|
22
22
|
{
|
|
@@ -9,6 +9,7 @@ function useSortActions() {
|
|
|
9
9
|
const isValid = useDynamicSortStore((state) => state.ownerState?.isValid);
|
|
10
10
|
const isDirty = useDynamicSortStore((state) => state.ownerState?.isDirty);
|
|
11
11
|
const appliedSorts = useDynamicSortStore((state) => state.appliedSorts);
|
|
12
|
+
const inEdition = useDynamicSortStore((state) => state.ownerState?.inEdition);
|
|
12
13
|
const { hidePopoverSort, clearSorts, fireOnChangeSorts } = useDynamicSortStore(
|
|
13
14
|
(state) => state.actions
|
|
14
15
|
);
|
|
@@ -31,7 +32,7 @@ function useSortActions() {
|
|
|
31
32
|
onClickClearSorts,
|
|
32
33
|
onClickSort: fireOnChangeSorts,
|
|
33
34
|
sortButtonDictionaryTooltip,
|
|
34
|
-
ownerState: { isValid }
|
|
35
|
+
ownerState: { isValid, isDirty, inEdition }
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
@@ -5,17 +5,16 @@ import { useEnvironment, useNetwork } from "@m4l/core";
|
|
|
5
5
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { I as Image } from "../Image/Image.js";
|
|
8
|
-
import { L as LanguagePopoverRootStyled, P as PaperStyled
|
|
8
|
+
import { L as LanguagePopoverRootStyled, P as PaperStyled } from "./slots/LanguagePopoverSlots.js";
|
|
9
9
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
import { L as LanguagePopoverSlots } from "./slots/LanguagePopoverEnum.js";
|
|
11
11
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
12
12
|
function LanguagePopover(props) {
|
|
13
13
|
const {
|
|
14
14
|
disabled,
|
|
15
|
-
size
|
|
15
|
+
size
|
|
16
16
|
} = props;
|
|
17
17
|
const { currentSize } = useComponentSize(size);
|
|
18
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
19
18
|
const isFirstRender = useFirstRender();
|
|
20
19
|
const { currentLocale, onChangeLocale } = useLocales();
|
|
21
20
|
const { domain_token } = useEnvironment();
|
|
@@ -68,11 +67,14 @@ function LanguagePopover(props) {
|
|
|
68
67
|
return /* @__PURE__ */ jsx(
|
|
69
68
|
LanguagePopoverRootStyled,
|
|
70
69
|
{
|
|
71
|
-
|
|
70
|
+
ownerState: {
|
|
71
|
+
size: currentSize
|
|
72
|
+
},
|
|
73
|
+
size: currentSize,
|
|
72
74
|
className: classRoot,
|
|
73
75
|
...getPropDataTestId(LANGUAGE_POPOVER_KEY_COMPONENT, LanguagePopoverSlots.root),
|
|
74
76
|
disabled,
|
|
75
|
-
icon: /* @__PURE__ */ jsx(
|
|
77
|
+
icon: /* @__PURE__ */ jsx(Image, { src: currentLocale?.urlIcon, enableIntersectionObserver: false }),
|
|
76
78
|
menuActions: getMenuActionsOptions(),
|
|
77
79
|
onOpen: handleMenuOpenChange,
|
|
78
80
|
slots: {
|
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
1
2
|
const languagePopoverStyles = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* Estilos del root
|
|
5
|
+
*/
|
|
6
|
+
root: ({ theme, ownerState }) => ({
|
|
7
|
+
"&": {
|
|
8
|
+
display: "flex",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
...getSizeStyles(
|
|
12
|
+
theme,
|
|
13
|
+
ownerState?.size || "medium",
|
|
14
|
+
"action",
|
|
15
|
+
(size) => ({
|
|
16
|
+
width: size,
|
|
17
|
+
height: size
|
|
18
|
+
})
|
|
19
|
+
),
|
|
20
|
+
"& .MuiButtonBase-root .M4LImage-root": {
|
|
21
|
+
...getSizeStyles(
|
|
22
|
+
theme,
|
|
23
|
+
ownerState?.size || "medium",
|
|
24
|
+
"base",
|
|
25
|
+
(size) => ({
|
|
26
|
+
width: `${size}!important`,
|
|
27
|
+
height: `${size}!important`
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
image: {},
|
|
6
34
|
/**
|
|
7
35
|
* Estilos del paper
|
|
8
36
|
*/
|