@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
|
@@ -2,50 +2,59 @@ import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
|
2
2
|
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
const CONTAINER_QUERY_NAME = "dynamic";
|
|
4
4
|
const dynamicFilterStyles = {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* root: Estilos del contenedor principal del componente.
|
|
7
|
+
*/
|
|
8
|
+
root: ({ theme, ownerState }) => ({
|
|
6
9
|
containerName: CONTAINER_QUERY_NAME,
|
|
7
10
|
containerType: "inline-size",
|
|
8
11
|
width: "100%",
|
|
9
12
|
height: "auto",
|
|
10
|
-
padding: 0
|
|
11
|
-
|
|
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
|
+
)
|
|
24
|
+
}),
|
|
12
25
|
/**
|
|
13
26
|
* innerContainer: Estilos del contenedor interno del componente.
|
|
14
27
|
*/
|
|
15
28
|
innerContainer: ({ theme, ownerState }) => ({
|
|
16
|
-
display: "
|
|
17
|
-
gridTemplateColumns: "auto 1fr auto",
|
|
18
|
-
gridTemplateAreas: '"input-filter applied-filters actions-filter"',
|
|
29
|
+
display: "flex",
|
|
19
30
|
alignItems: "center",
|
|
20
31
|
justifyContent: "flex-start",
|
|
21
32
|
width: "100%",
|
|
22
33
|
height: "fit-content",
|
|
23
|
-
|
|
24
|
-
borderRadius: theme.vars.size.borderRadius.r1,
|
|
25
|
-
borderColor: ownerState?.isValid ? theme.vars.palette.border?.default : theme.vars.palette.error.enabled,
|
|
34
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
26
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",
|
|
27
38
|
'&:has([aria-expanded="true"])': {
|
|
28
|
-
|
|
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}`
|
|
29
40
|
}
|
|
30
41
|
}),
|
|
31
42
|
/**
|
|
32
43
|
* inputFilter: Estilos del contenedor del campo de entrada de filtrado.
|
|
33
44
|
*/
|
|
34
45
|
inputFilter: ({ theme, ownerState }) => ({
|
|
35
|
-
gridArea: "input-filter",
|
|
36
46
|
display: "flex",
|
|
37
47
|
flexDirection: "row",
|
|
38
|
-
paddingLeft: theme.vars.size.baseSpacings.
|
|
48
|
+
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
39
49
|
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
40
50
|
height: "100%",
|
|
41
51
|
overflow: "hidden",
|
|
42
|
-
maxWidth: "
|
|
52
|
+
maxWidth: "120px",
|
|
43
53
|
width: "100%",
|
|
44
54
|
alignItems: "center",
|
|
45
55
|
borderTopLeftRadius: theme.vars.size.borderRadius.r1,
|
|
46
56
|
borderBottomLeftRadius: theme.vars.size.borderRadius.r1,
|
|
47
|
-
|
|
48
|
-
borderColor: theme.vars.palette.border?.default,
|
|
57
|
+
background: "#ffffff00",
|
|
49
58
|
...getSizeStyles(
|
|
50
59
|
theme,
|
|
51
60
|
ownerState?.size || "medium",
|
|
@@ -59,6 +68,8 @@ const dynamicFilterStyles = {
|
|
|
59
68
|
* inputFilterInput: Estilos del campo de entrada de filtrado.
|
|
60
69
|
*/
|
|
61
70
|
inputFilterInput: ({ theme, ownerState }) => ({
|
|
71
|
+
width: "100%",
|
|
72
|
+
background: "#ffffff00",
|
|
62
73
|
...getSizeStyles(
|
|
63
74
|
theme,
|
|
64
75
|
ownerState?.size || "medium",
|
|
@@ -69,12 +80,12 @@ const dynamicFilterStyles = {
|
|
|
69
80
|
maxHeight: size
|
|
70
81
|
})
|
|
71
82
|
),
|
|
83
|
+
fontFamily: "inherit",
|
|
72
84
|
...getTypographyStyles(
|
|
73
85
|
theme.generalSettings.isMobile,
|
|
74
86
|
ownerState?.size || "medium",
|
|
75
87
|
"body"
|
|
76
88
|
),
|
|
77
|
-
background: theme.vars.palette.background.default,
|
|
78
89
|
color: theme.vars.palette.text.secondary,
|
|
79
90
|
border: 0,
|
|
80
91
|
borderColor: "transparent",
|
|
@@ -86,33 +97,40 @@ const dynamicFilterStyles = {
|
|
|
86
97
|
},
|
|
87
98
|
"&:focus-visible": {
|
|
88
99
|
color: theme.vars.palette.text.secondary,
|
|
89
|
-
border:
|
|
100
|
+
border: "unset",
|
|
90
101
|
borderColor: theme.vars.palette.primary.opacity,
|
|
91
|
-
background: theme.vars.palette.primary.opacity,
|
|
92
102
|
BorderRadius: theme.vars.size.borderRadius["r0-5"],
|
|
93
103
|
outline: "none!important"
|
|
94
|
-
},
|
|
95
|
-
"&:hover": {
|
|
96
|
-
borderColor: theme.vars.palette.primary?.toneOpacity,
|
|
97
|
-
background: theme.vars.palette.background?.hover
|
|
98
104
|
}
|
|
99
105
|
}),
|
|
100
106
|
/**
|
|
101
107
|
* appliedFilters: Estilos del contenedor de los filtros aplicados.
|
|
102
108
|
*/
|
|
103
|
-
appliedFilters: ({ theme }) => ({
|
|
104
|
-
gridArea: "applied-filters",
|
|
109
|
+
appliedFilters: ({ theme, ownerState }) => ({
|
|
105
110
|
width: "100%",
|
|
106
111
|
height: "fit-content",
|
|
107
|
-
|
|
112
|
+
display: "flex",
|
|
113
|
+
alignItems: "center",
|
|
108
114
|
borderLeft: "none",
|
|
109
115
|
margin: "0px",
|
|
110
|
-
padding: `0px ${theme.vars.size.baseSpacings.sp1}
|
|
116
|
+
padding: `0px ${theme.vars.size.baseSpacings.sp1}`,
|
|
117
|
+
flex: 1,
|
|
118
|
+
overflow: "hidden",
|
|
119
|
+
...getSizeStyles(
|
|
120
|
+
theme,
|
|
121
|
+
ownerState?.size || "medium",
|
|
122
|
+
"container",
|
|
123
|
+
(size) => ({
|
|
124
|
+
height: size,
|
|
125
|
+
maxHeight: size,
|
|
126
|
+
minHeight: size
|
|
127
|
+
})
|
|
128
|
+
)
|
|
111
129
|
}),
|
|
112
130
|
/**
|
|
113
131
|
* appliedFilterInnerContainer: Estilos del contenedor interno de los filtros aplicados.
|
|
114
132
|
*/
|
|
115
|
-
appliedFilterInnerContainer: ({ theme }) => ({
|
|
133
|
+
appliedFilterInnerContainer: ({ theme, ownerState }) => ({
|
|
116
134
|
padding: theme.vars.size.baseSpacings["sp0-5"],
|
|
117
135
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
118
136
|
height: "fit-content",
|
|
@@ -122,7 +140,24 @@ const dynamicFilterStyles = {
|
|
|
122
140
|
justifyContent: "flex-start",
|
|
123
141
|
alignItems: "center",
|
|
124
142
|
overflow: "auto hidden",
|
|
125
|
-
position: "relative"
|
|
143
|
+
position: "relative",
|
|
144
|
+
"& .M4LChip-root": {
|
|
145
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
146
|
+
...getSizeStyles(
|
|
147
|
+
theme,
|
|
148
|
+
ownerState?.size || "medium",
|
|
149
|
+
"action",
|
|
150
|
+
(size) => ({
|
|
151
|
+
height: size
|
|
152
|
+
})
|
|
153
|
+
),
|
|
154
|
+
"& .M4LIconButton-styledMUIIconButton:hover": {
|
|
155
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundHover} !important`,
|
|
156
|
+
"& .M4LIcon-icon": {
|
|
157
|
+
backgroundColor: `${theme.vars.palette.chips.error.contained.backgroundColorTone} !important`
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
126
161
|
}),
|
|
127
162
|
/**
|
|
128
163
|
* actions: Estilos del contenedor de los botones de acción.
|
|
@@ -138,19 +173,32 @@ const dynamicFilterStyles = {
|
|
|
138
173
|
alignItems: "center",
|
|
139
174
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
140
175
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
141
|
-
|
|
142
|
-
|
|
176
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.default}`,
|
|
177
|
+
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
178
|
+
display: "none"
|
|
179
|
+
},
|
|
180
|
+
...ownerState?.inEdition && ownerState?.isValid && {
|
|
181
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.main}`
|
|
182
|
+
},
|
|
183
|
+
...!ownerState?.isValid && {
|
|
184
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.error.enabled}`
|
|
185
|
+
}
|
|
186
|
+
}),
|
|
187
|
+
/**
|
|
188
|
+
* actionsClearButton: Estilos del botón de acción de limpiar.
|
|
189
|
+
*/
|
|
190
|
+
actionsClearButton: ({ theme }) => ({
|
|
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
|
+
}
|
|
143
197
|
}),
|
|
144
|
-
actionsClearButton: {
|
|
145
|
-
visibility: "visible"
|
|
146
|
-
},
|
|
147
198
|
/**
|
|
148
199
|
* actionsSubmitButton: Estilos del botón de acción de filtrado.
|
|
149
200
|
*/
|
|
150
201
|
actionsSubmitButton: ({ theme, ownerState }) => ({
|
|
151
|
-
...ownerState?.isValid === false ? { border: `1px dashed ${theme.vars.palette.error.enabled}` } : {
|
|
152
|
-
visibility: "visible"
|
|
153
|
-
},
|
|
154
202
|
...ownerState?.isDirty ? {
|
|
155
203
|
animation: "changeBgColor 0.9s ease infinite",
|
|
156
204
|
"& .M4LIcon-icon": {
|
|
@@ -202,66 +250,19 @@ const dynamicFilterStyles = {
|
|
|
202
250
|
minWidth: "220px",
|
|
203
251
|
maxWidth: "420px",
|
|
204
252
|
height: "fit-content"
|
|
253
|
+
},
|
|
254
|
+
"& .M4LWindowBase-root": {
|
|
255
|
+
border: "unset!important",
|
|
256
|
+
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
|
+
cursor: "unset"
|
|
258
|
+
}
|
|
205
259
|
}
|
|
206
260
|
}
|
|
207
261
|
}),
|
|
208
|
-
/**
|
|
209
|
-
* popoverFilterHeader: Estilos del encabezado del menú emergente de filtro.
|
|
210
|
-
*/
|
|
211
|
-
popoverFilterHeader: ({ theme, ownerState }) => ({
|
|
212
|
-
display: "flex",
|
|
213
|
-
alignItems: "center",
|
|
214
|
-
gap: theme.vars.size.baseSpacings.sp2,
|
|
215
|
-
padding: theme.vars.size.baseSpacings.sp1,
|
|
216
|
-
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
217
|
-
borderTopLeftRadius: theme.vars.size.borderRadius.r1,
|
|
218
|
-
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
219
|
-
borderBottom: theme.vars.size.borderStroke.container,
|
|
220
|
-
borderColor: theme.vars.palette.border.secondary,
|
|
221
|
-
"& .M4LIcon-icon": {
|
|
222
|
-
backgroundColor: theme.vars.palette.primary.main
|
|
223
|
-
},
|
|
224
|
-
...getSizeStyles(
|
|
225
|
-
theme,
|
|
226
|
-
ownerState?.size || "medium",
|
|
227
|
-
"container",
|
|
228
|
-
(size) => ({
|
|
229
|
-
height: size
|
|
230
|
-
})
|
|
231
|
-
)
|
|
232
|
-
}),
|
|
233
|
-
/**
|
|
234
|
-
* popoverFilterHeaderTitle: Estilos del título del menú emergente de filtro.
|
|
235
|
-
*/
|
|
236
|
-
popoverFilterHeaderTitle: ({ theme }) => ({
|
|
237
|
-
color: `${theme.vars.palette.primary.main} !important`
|
|
238
|
-
}),
|
|
239
|
-
/**
|
|
240
|
-
* popoverFilterContainerFields: Estilos del contenedor de campos del menú emergente de filtro.
|
|
241
|
-
*/
|
|
242
|
-
popoverFilterContainerFields: ({ theme }) => ({
|
|
243
|
-
height: "fit-content",
|
|
244
|
-
"& > div": {
|
|
245
|
-
display: "flex",
|
|
246
|
-
flexDirection: "column",
|
|
247
|
-
gap: theme.vars.size.baseSpacings.sp2
|
|
248
|
-
}
|
|
249
|
-
}),
|
|
250
|
-
/**
|
|
251
|
-
* contentFilter: Estilos del contenedor entre el change filter y actions
|
|
252
|
-
*/
|
|
253
|
-
contentFilter: ({ theme }) => ({
|
|
254
|
-
display: "flex",
|
|
255
|
-
flexDirection: "column",
|
|
256
|
-
padding: theme.vars.size.baseSpacings.sp3,
|
|
257
|
-
gap: theme.vars.size.baseSpacings.sp3
|
|
258
|
-
}),
|
|
259
262
|
/**
|
|
260
263
|
* popoverFilterActions: Estilos del contenedor de acciones del menú emergente de filtro.
|
|
261
264
|
*/
|
|
262
|
-
popoverFilterActions:
|
|
263
|
-
padding: `${theme.vars.size.baseSpacings.sp3} 0px`
|
|
264
|
-
}),
|
|
265
|
+
popoverFilterActions: {},
|
|
265
266
|
/**
|
|
266
267
|
* inputSortInputSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
267
268
|
*/
|
|
@@ -280,6 +281,14 @@ const dynamicFilterStyles = {
|
|
|
280
281
|
maxHeight: size
|
|
281
282
|
})
|
|
282
283
|
)
|
|
284
|
+
}),
|
|
285
|
+
/**
|
|
286
|
+
* popoverFilterContainerFields: Estilos del contenedor de los campos del menú emergente de filtro.
|
|
287
|
+
*/
|
|
288
|
+
popoverFilterContainerFields: ({ theme }) => ({
|
|
289
|
+
display: "flex",
|
|
290
|
+
flexDirection: "column",
|
|
291
|
+
gap: theme.vars.size.baseSpacings.sp4
|
|
283
292
|
})
|
|
284
293
|
};
|
|
285
294
|
export {
|
|
@@ -11,9 +11,6 @@ export declare enum DynamicFilterSlots {
|
|
|
11
11
|
popoverMenu = "popoverMenu",
|
|
12
12
|
popoverFilter = "popoverFilter",
|
|
13
13
|
popoverFilterContainerFields = "popoverFilterContainerFields",
|
|
14
|
-
popoverFilterHeader = "popoverFilterHeader",
|
|
15
|
-
contentFilter = "contentFilter",
|
|
16
|
-
popoverFilterHeaderTitle = "popoverFilterHeaderTitle",
|
|
17
14
|
popoverFilterActions = "popoverFilterActions",
|
|
18
15
|
inputFilterInputSkeleton = "inputFilterInputSkeleton"
|
|
19
16
|
}
|
|
@@ -11,9 +11,6 @@ var DynamicFilterSlots = /* @__PURE__ */ ((DynamicFilterSlots2) => {
|
|
|
11
11
|
DynamicFilterSlots2["popoverMenu"] = "popoverMenu";
|
|
12
12
|
DynamicFilterSlots2["popoverFilter"] = "popoverFilter";
|
|
13
13
|
DynamicFilterSlots2["popoverFilterContainerFields"] = "popoverFilterContainerFields";
|
|
14
|
-
DynamicFilterSlots2["popoverFilterHeader"] = "popoverFilterHeader";
|
|
15
|
-
DynamicFilterSlots2["contentFilter"] = "contentFilter";
|
|
16
|
-
DynamicFilterSlots2["popoverFilterHeaderTitle"] = "popoverFilterHeaderTitle";
|
|
17
14
|
DynamicFilterSlots2["popoverFilterActions"] = "popoverFilterActions";
|
|
18
15
|
DynamicFilterSlots2["inputFilterInputSkeleton"] = "inputFilterInputSkeleton";
|
|
19
16
|
return DynamicFilterSlots2;
|
|
@@ -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').DynamicFilterOwnerState> & 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').DynamicFilterOwnerState> & 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 ContentFilterStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
41
|
-
ownerState?: (Partial<import('../types').DynamicFilterOwnerState> & 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').DynamicFilterOwnerState> & 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').DynamicFilterOwnerState> & Record<string, unknown>) | undefined;
|
|
48
39
|
}, {}, {}>;
|
|
@@ -4,7 +4,6 @@ import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../constants.js";
|
|
|
4
4
|
import { d as dynamicFilterStyles } from "../DynamicFilter.styles.js";
|
|
5
5
|
import { D as DynamicFilterSlots } from "./SlotsEnum.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,18 +54,6 @@ const PopoverContainerFieldsStyled = styled("div", {
|
|
|
55
54
|
name: DYNAMIC_FILTER_KEY_COMPONENT,
|
|
56
55
|
slot: DynamicFilterSlots.popoverFilterContainerFields
|
|
57
56
|
})(dynamicFilterStyles?.popoverFilterContainerFields);
|
|
58
|
-
const PopoverHeaderStyled = styled("div", {
|
|
59
|
-
name: DYNAMIC_FILTER_KEY_COMPONENT,
|
|
60
|
-
slot: DynamicFilterSlots.popoverFilterHeader
|
|
61
|
-
})(dynamicFilterStyles?.popoverFilterHeader);
|
|
62
|
-
const ContentFilterStyled = styled("div", {
|
|
63
|
-
name: DYNAMIC_FILTER_KEY_COMPONENT,
|
|
64
|
-
slot: DynamicFilterSlots.contentFilter
|
|
65
|
-
})(dynamicFilterStyles?.contentFilter);
|
|
66
|
-
const PopoverHeaderTitleStyled = styled(Typography, {
|
|
67
|
-
name: DYNAMIC_FILTER_KEY_COMPONENT,
|
|
68
|
-
slot: DynamicFilterSlots.popoverFilterHeaderTitle
|
|
69
|
-
})(dynamicFilterStyles?.popoverFilterHeaderTitle);
|
|
70
57
|
const PopoverHeaderActionsStyled = styled(ActionsContainer, {
|
|
71
58
|
name: DYNAMIC_FILTER_KEY_COMPONENT,
|
|
72
59
|
slot: DynamicFilterSlots.popoverFilterActions
|
|
@@ -77,7 +64,6 @@ const InputFilterInputSkeletonStyled = styled(Skeleton, {
|
|
|
77
64
|
})(dynamicFilterStyles?.inputFilterInputSkeleton);
|
|
78
65
|
export {
|
|
79
66
|
AppliedFiltersStyled as A,
|
|
80
|
-
ContentFilterStyled as C,
|
|
81
67
|
InnerContainerStyled as I,
|
|
82
68
|
PopoverStyled as P,
|
|
83
69
|
RootStyled as R,
|
|
@@ -88,9 +74,7 @@ export {
|
|
|
88
74
|
InputFilterStyled as e,
|
|
89
75
|
InputFilterInputSkeletonStyled as f,
|
|
90
76
|
InputFilterInputStyled as g,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
PopoverHeaderActionsStyled as k,
|
|
95
|
-
PopoverMenuStyled as l
|
|
77
|
+
PopoverContainerFieldsStyled as h,
|
|
78
|
+
PopoverHeaderActionsStyled as i,
|
|
79
|
+
PopoverMenuStyled as j
|
|
96
80
|
};
|
|
@@ -18,14 +18,13 @@ const DynamicFilterProvider = forwardRef((props, ref) => {
|
|
|
18
18
|
initialAppliedFilters = [],
|
|
19
19
|
onChangeFilters,
|
|
20
20
|
dataTestId = "",
|
|
21
|
-
size
|
|
21
|
+
size,
|
|
22
22
|
children,
|
|
23
23
|
storeId,
|
|
24
24
|
storeDevtoolsEnabled = false,
|
|
25
25
|
visibleRefresh = true
|
|
26
26
|
} = props;
|
|
27
27
|
const { currentSize } = useComponentSize(size);
|
|
28
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
29
28
|
const { getLabel } = useModuleDictionary();
|
|
30
29
|
const dynamicFilterStoreRef = useRef();
|
|
31
30
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -44,7 +43,7 @@ const DynamicFilterProvider = forwardRef((props, ref) => {
|
|
|
44
43
|
automatic,
|
|
45
44
|
getLabel,
|
|
46
45
|
dataTestId,
|
|
47
|
-
size,
|
|
46
|
+
size: currentSize,
|
|
48
47
|
storeId,
|
|
49
48
|
visibleRefresh,
|
|
50
49
|
ownerState: {
|
|
@@ -54,7 +53,7 @@ const DynamicFilterProvider = forwardRef((props, ref) => {
|
|
|
54
53
|
isValid: true,
|
|
55
54
|
isMobile: !isDesktop,
|
|
56
55
|
isEmpty: true,
|
|
57
|
-
size
|
|
56
|
+
size: currentSize
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
storeDevtoolsEnabled
|
|
@@ -136,13 +135,13 @@ const DynamicFilterProvider = forwardRef((props, ref) => {
|
|
|
136
135
|
}
|
|
137
136
|
}, []);
|
|
138
137
|
useEffect(() => {
|
|
139
|
-
if (dynamicFilterStoreRef.current?.getState().size !==
|
|
140
|
-
dynamicFilterStoreRef.current?.getState().actions.setSize(
|
|
138
|
+
if (dynamicFilterStoreRef.current?.getState().size !== currentSize) {
|
|
139
|
+
dynamicFilterStoreRef.current?.getState().actions.setSize(currentSize);
|
|
141
140
|
}
|
|
142
141
|
if (dynamicFilterStoreRef.current?.getState().visibleRefresh !== visibleRefresh) {
|
|
143
142
|
dynamicFilterStoreRef.current?.getState().actions.setVisibleRefresh(visibleRefresh);
|
|
144
143
|
}
|
|
145
|
-
}, [
|
|
144
|
+
}, [currentSize, visibleRefresh]);
|
|
146
145
|
return /* @__PURE__ */ jsx(DynamicFilterContext.Provider, { value: dynamicFilterStoreRef.current, children });
|
|
147
146
|
});
|
|
148
147
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { B as BOOLEAN_OPERATORS } from "../../../constants.js";
|
|
@@ -29,7 +29,7 @@ function BooleanFilter() {
|
|
|
29
29
|
],
|
|
30
30
|
[getLabel]
|
|
31
31
|
);
|
|
32
|
-
return /* @__PURE__ */ jsxs(
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ jsx(
|
|
34
34
|
RHFAutocomplete,
|
|
35
35
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
@@ -23,7 +23,7 @@ function DateTimeFilter() {
|
|
|
23
23
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
24
24
|
[getLabel, restritcOperatorsTo]
|
|
25
25
|
);
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
27
|
/* @__PURE__ */ jsx(
|
|
28
28
|
RHFAutocomplete,
|
|
29
29
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
@@ -24,7 +24,7 @@ function NumberFilter() {
|
|
|
24
24
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
25
25
|
[getLabel, restritcOperatorsTo]
|
|
26
26
|
);
|
|
27
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
28
|
/* @__PURE__ */ jsx(
|
|
29
29
|
RHFAutocomplete,
|
|
30
30
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { S as SELECT_ASYNC_OPERATORS_MULTIPLE, c as SELECT_ASYNC_OPERATORS_SINGLE } from "../../../constants.js";
|
|
@@ -22,7 +22,7 @@ function SelectAsyncFilter() {
|
|
|
22
22
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
23
23
|
[getLabel, isMultiple, restritcOperatorsTo]
|
|
24
24
|
);
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
25
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
26
|
/* @__PURE__ */ jsx(
|
|
27
27
|
RHFAutocomplete,
|
|
28
28
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { d as SELECT_OPERATORS_MULTIPLE, e as SELECT_OPERATORS_SINGLE } from "../../../constants.js";
|
|
@@ -19,7 +19,7 @@ function SelectFilter() {
|
|
|
19
19
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
20
20
|
[getLabel, isMultiple, restritcOperatorsTo]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
23
|
/* @__PURE__ */ jsx(
|
|
24
24
|
RHFAutocomplete,
|
|
25
25
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { f as STRING_OPERATORS } from "../../../constants.js";
|
|
@@ -17,7 +17,7 @@ function StringFilter() {
|
|
|
17
17
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
18
18
|
[getLabel, restritcOperatorsTo]
|
|
19
19
|
);
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
21
|
/* @__PURE__ */ jsx(
|
|
22
22
|
RHFAutocomplete,
|
|
23
23
|
{
|
|
@@ -16,7 +16,7 @@ function FilterActions() {
|
|
|
16
16
|
} = useFilterActions();
|
|
17
17
|
const { size, ownerState: { isDirty }, visibleRefresh } = useDynamicFilterBase();
|
|
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
|
{
|
|
@@ -15,6 +15,7 @@ declare function useFilterActions(): {
|
|
|
15
15
|
filterButtonDictionaryTooltip: "dynamic_filter.filter_tooltip_refresh" | "dynamic_filter.filter_tooltip_dirty" | "dynamic_filter.filter_tooltip_invalid";
|
|
16
16
|
ownerState: {
|
|
17
17
|
isValid: boolean;
|
|
18
|
+
inEdition: boolean;
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
export default useFilterActions;
|
|
@@ -11,6 +11,7 @@ function useFilterActions() {
|
|
|
11
11
|
const automatic = useDynamicFilterStore((state) => state.automatic);
|
|
12
12
|
const isValid = useDynamicFilterStore((state) => state.ownerState?.isValid);
|
|
13
13
|
const isDirty = useDynamicFilterStore((state) => state.ownerState?.isDirty);
|
|
14
|
+
const inEdition = useDynamicFilterStore((state) => state.ownerState?.inEdition);
|
|
14
15
|
const appliedFilters = useDynamicFilterStore((state) => state.appliedFilters);
|
|
15
16
|
const { clearFilters, fireOnChangeFilters } = useDynamicFilterStore(
|
|
16
17
|
(state) => state.actions
|
|
@@ -29,7 +30,7 @@ function useFilterActions() {
|
|
|
29
30
|
onClickClearFilters,
|
|
30
31
|
onClickFilter: fireOnChangeFilters,
|
|
31
32
|
filterButtonDictionaryTooltip,
|
|
32
|
-
ownerState: { isValid }
|
|
33
|
+
ownerState: { isValid, inEdition }
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I as Icon } from "../../../Icon/Icon.js";
|
|
3
|
-
import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
|
|
4
2
|
import { D as DataTypeComponent } from "../FieldTypes/DataTypeComponent.js";
|
|
5
3
|
import { u as usePopoverFilter } from "./usePopoverFilter.js";
|
|
6
|
-
import { P as PopoverStyled, h as
|
|
4
|
+
import { P as PopoverStyled, h as PopoverContainerFieldsStyled, i as PopoverHeaderActionsStyled } from "../../slots/dynamicFilterSlots.js";
|
|
7
5
|
import { R as RHFormProvider } from "../../../hook-form/RHFormContext/index.js";
|
|
6
|
+
import { W as WindowBase } from "../../../WindowBase/WindowBase.js";
|
|
8
7
|
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
9
8
|
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
10
9
|
function PopoverFilter() {
|
|
@@ -22,7 +21,6 @@ function PopoverFilter() {
|
|
|
22
21
|
statusLoad,
|
|
23
22
|
canRender
|
|
24
23
|
} = usePopoverFilter();
|
|
25
|
-
const { ownerState } = useDynamicFilterBase();
|
|
26
24
|
if (!canRender) {
|
|
27
25
|
return null;
|
|
28
26
|
}
|
|
@@ -34,30 +32,38 @@ function PopoverFilter() {
|
|
|
34
32
|
transitionDuration: 0,
|
|
35
33
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
36
34
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
35
|
+
sx: (theme) => ({
|
|
36
|
+
mt: theme.vars.size.baseSpacings.sp2
|
|
37
|
+
}),
|
|
37
38
|
arrowType: "top-left",
|
|
38
39
|
anchorEl,
|
|
39
40
|
onKeyDown: handleKeyDownPopper,
|
|
40
41
|
onClose: handleClosePopover,
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ jsx(
|
|
42
43
|
RHFormProvider,
|
|
43
44
|
{
|
|
44
45
|
onSubmit,
|
|
45
46
|
values: filterFormValue,
|
|
46
47
|
validationSchema: popupValidationSchema,
|
|
47
48
|
statusLoad,
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
children: /* @__PURE__ */ jsxs(
|
|
50
|
+
WindowBase,
|
|
51
|
+
{
|
|
52
|
+
title: labelField,
|
|
53
|
+
iconUrl: field.urlIcon,
|
|
54
|
+
variant: "text",
|
|
55
|
+
type: "popup",
|
|
56
|
+
selected: true,
|
|
57
|
+
draggable: false,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { children: /* @__PURE__ */ jsx(DataTypeComponent, { formFilter, statusLoad }) }),
|
|
60
|
+
/* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(ActionCancel, { onClick: onClose, skeletonWidth: "68px" }),
|
|
62
|
+
/* @__PURE__ */ jsx(ActionIntro, { skeletonWidth: "64px", "aria-label": "applyFilter" })
|
|
63
|
+
] })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
)
|
|
61
67
|
}
|
|
62
68
|
)
|
|
63
69
|
}
|