@m4l/components 9.2.60-24062025.beta.1 → 9.2.60-J18062025.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 +67 -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 +6 -0
- package/components/DataGrid/icons.js +7 -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 +259 -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 +42 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +136 -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/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 +7 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +300 -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/DataGridRenderWithExternalFiltersAndSorts.d.ts +16 -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
|
@@ -15,14 +15,40 @@ import { g as getPurgedCookie } from "./helpers.js";
|
|
|
15
15
|
import { u as useWindowToolsMF } from "../../components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
16
16
|
import { a as DICCTIONARY } from "../../components/DynamicFilter/dictionary.js";
|
|
17
17
|
const useDynamicFilterAndSort = (props) => {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
fields,
|
|
20
|
+
sorts,
|
|
21
|
+
onChangeFilterSort,
|
|
22
|
+
dataTestId,
|
|
23
|
+
withAllField,
|
|
24
|
+
rightActions,
|
|
25
|
+
initialFilterToggleed = true,
|
|
26
|
+
initialSortToggleed = true,
|
|
27
|
+
prefixCookie,
|
|
28
|
+
setCookie,
|
|
29
|
+
getCookie,
|
|
30
|
+
filterSortAutomatic = true,
|
|
31
|
+
visibleRefresh = false,
|
|
32
|
+
withExternalRefresh
|
|
33
|
+
} = props;
|
|
19
34
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
20
|
-
const [togglesLeftActions, setTogglesLeftActions] = useState(() => ({
|
|
35
|
+
const [togglesLeftActions, setTogglesLeftActions] = useState(() => ({
|
|
36
|
+
filter: initialFilterToggleed,
|
|
37
|
+
sort: initialSortToggleed
|
|
38
|
+
}));
|
|
21
39
|
const [initialAppliedFilters] = useState(() => {
|
|
22
|
-
return getPurgedCookie(
|
|
40
|
+
return getPurgedCookie(
|
|
41
|
+
getCookie?.(
|
|
42
|
+
prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_FILTERS}` : COOKIE_APPLIED_FILTERS
|
|
43
|
+
)
|
|
44
|
+
);
|
|
23
45
|
});
|
|
24
46
|
const [initialAppliedSorts] = useState(() => {
|
|
25
|
-
return getPurgedCookie(
|
|
47
|
+
return getPurgedCookie(
|
|
48
|
+
getCookie?.(
|
|
49
|
+
prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_SORTS}` : COOKIE_APPLIED_SORTS
|
|
50
|
+
)
|
|
51
|
+
);
|
|
26
52
|
});
|
|
27
53
|
const refOnChangeFilterSort = useRef(0);
|
|
28
54
|
const fireOnChangeFilterRef = useRef(null);
|
|
@@ -33,7 +59,10 @@ const useDynamicFilterAndSort = (props) => {
|
|
|
33
59
|
filter: initialAppliedFilters?.length === 0,
|
|
34
60
|
sort: initialAppliedSorts?.length === 0
|
|
35
61
|
}));
|
|
36
|
-
const visibleCustomHeader = useMemo(
|
|
62
|
+
const visibleCustomHeader = useMemo(
|
|
63
|
+
() => togglesLeftActions.filter || togglesLeftActions.sort,
|
|
64
|
+
[togglesLeftActions]
|
|
65
|
+
);
|
|
37
66
|
const refreshIconUrl = `${host_static_assets}/${environment_assets}/${ASSETS.refresh}`;
|
|
38
67
|
const eventRefs = useRef({
|
|
39
68
|
eventFilters: { filters: initialAppliedFilters, rawFilters: [] },
|
|
@@ -49,35 +78,55 @@ const useDynamicFilterAndSort = (props) => {
|
|
|
49
78
|
}
|
|
50
79
|
return true;
|
|
51
80
|
}, [eventRefs, fields]);
|
|
52
|
-
const handleChangeFilters = useCallback(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
setCookie?.(prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_SORTS}` : COOKIE_APPLIED_SORTS, "window", newSorts);
|
|
70
|
-
}
|
|
71
|
-
eventRefs.current = {
|
|
72
|
-
...eventRefs.current,
|
|
73
|
-
eventSorts: { sorts: newSorts, rawSorts }
|
|
74
|
-
};
|
|
75
|
-
if (isValidFilters()) {
|
|
76
|
-
onChangeFilterSort(eventRefs.current);
|
|
77
|
-
} else {
|
|
81
|
+
const handleChangeFilters = useCallback(
|
|
82
|
+
(filters, rawFilters) => {
|
|
83
|
+
setInvisibleBadge((prev) => ({ ...prev, filter: filters.length === 0 }));
|
|
84
|
+
if (eventRefs.current?.eventFilters?.filters && !deepEqual(eventRefs.current?.eventFilters?.filters, filters)) {
|
|
85
|
+
setCookie?.(
|
|
86
|
+
prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_FILTERS}` : COOKIE_APPLIED_FILTERS,
|
|
87
|
+
"window",
|
|
88
|
+
filters
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
eventRefs.current = {
|
|
92
|
+
...eventRefs.current,
|
|
93
|
+
eventFilters: { filters, rawFilters }
|
|
94
|
+
};
|
|
95
|
+
if (refOnChangeFilterSort.current > 0 || refOnChangeFilterSort.current === 0 && !sorts) {
|
|
96
|
+
onChangeFilterSort(eventRefs.current);
|
|
97
|
+
}
|
|
78
98
|
refOnChangeFilterSort.current++;
|
|
79
|
-
}
|
|
80
|
-
|
|
99
|
+
},
|
|
100
|
+
[onChangeFilterSort, prefixCookie, setCookie, setInvisibleBadge, sorts]
|
|
101
|
+
);
|
|
102
|
+
const handleChangeSorts = useCallback(
|
|
103
|
+
(newSorts, rawSorts) => {
|
|
104
|
+
setInvisibleBadge((prev) => ({ ...prev, sort: newSorts.length === 0 }));
|
|
105
|
+
if (eventRefs.current?.eventSorts?.sorts && !deepEqual(eventRefs.current?.eventSorts?.sorts, newSorts)) {
|
|
106
|
+
setCookie?.(
|
|
107
|
+
prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_SORTS}` : COOKIE_APPLIED_SORTS,
|
|
108
|
+
"window",
|
|
109
|
+
newSorts
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
eventRefs.current = {
|
|
113
|
+
...eventRefs.current,
|
|
114
|
+
eventSorts: { sorts: newSorts, rawSorts }
|
|
115
|
+
};
|
|
116
|
+
if (isValidFilters()) {
|
|
117
|
+
onChangeFilterSort(eventRefs.current);
|
|
118
|
+
} else {
|
|
119
|
+
refOnChangeFilterSort.current++;
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
[
|
|
123
|
+
onChangeFilterSort,
|
|
124
|
+
prefixCookie,
|
|
125
|
+
setCookie,
|
|
126
|
+
setInvisibleBadge,
|
|
127
|
+
isValidFilters
|
|
128
|
+
]
|
|
129
|
+
);
|
|
81
130
|
const onRefresh = useCallback(() => {
|
|
82
131
|
if (!filterSortAutomatic) {
|
|
83
132
|
if (fireOnChangeFilterRef.current) {
|
|
@@ -90,73 +139,236 @@ const useDynamicFilterAndSort = (props) => {
|
|
|
90
139
|
if (isValidFilters()) {
|
|
91
140
|
onChangeFilterSort(eventRefs.current);
|
|
92
141
|
} else {
|
|
93
|
-
toast(
|
|
142
|
+
toast(
|
|
143
|
+
{ title: getLabel(DICCTIONARY.error_invalid_filters_before) },
|
|
144
|
+
{ type: "error" }
|
|
145
|
+
);
|
|
94
146
|
}
|
|
95
147
|
}
|
|
96
|
-
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
108
|
-
IconButton,
|
|
109
|
-
{
|
|
110
|
-
icon: refreshIconUrl,
|
|
111
|
-
"aria-label": "refresh",
|
|
112
|
-
onClick: onRefresh,
|
|
113
|
-
variant: "outline"
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
rightActions
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
), [dataTestId, rightActions, refreshIconUrl, onRefresh]);
|
|
120
|
-
const dynamicsFiltersSorts = useMemo(() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
-
/* @__PURE__ */ jsx(
|
|
122
|
-
DynamicFilter,
|
|
148
|
+
}, [
|
|
149
|
+
filterSortAutomatic,
|
|
150
|
+
getLabel,
|
|
151
|
+
isValidFilters,
|
|
152
|
+
onChangeFilterSort,
|
|
153
|
+
toast
|
|
154
|
+
]);
|
|
155
|
+
const leftActions = useMemo(
|
|
156
|
+
() => /* @__PURE__ */ jsxs(
|
|
157
|
+
StackLeftActionsStyled,
|
|
123
158
|
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
159
|
+
direction: "row",
|
|
160
|
+
...getPropDataTestId(
|
|
161
|
+
M4LDYNAMIC_KEY_FILTER_AND_SORT,
|
|
162
|
+
DynamicFilterAndSortSlots.stackLeftActions,
|
|
163
|
+
dataTestId
|
|
164
|
+
),
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
ToggleIconButton,
|
|
168
|
+
{
|
|
169
|
+
badgeProps: {
|
|
170
|
+
variant: "dot",
|
|
171
|
+
invisible: invisibleBadge.filter,
|
|
172
|
+
color: "primary"
|
|
173
|
+
},
|
|
174
|
+
icon: `${host_static_assets}/${environment_assets}/${ICON_PATH_FILTER}`,
|
|
175
|
+
isToggled: togglesLeftActions.filter,
|
|
176
|
+
onToggle: () => handleToggles("filter")
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
/* @__PURE__ */ jsx(
|
|
180
|
+
ToggleIconButton,
|
|
181
|
+
{
|
|
182
|
+
badgeProps: {
|
|
183
|
+
variant: "dot",
|
|
184
|
+
invisible: invisibleBadge.sort,
|
|
185
|
+
color: "primary"
|
|
186
|
+
},
|
|
187
|
+
icon: `${host_static_assets}/${environment_assets}/${ICON_PATH_SORT}`,
|
|
188
|
+
isToggled: togglesLeftActions.sort,
|
|
189
|
+
onToggle: () => handleToggles("sort")
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
]
|
|
131
193
|
}
|
|
132
194
|
),
|
|
133
|
-
|
|
134
|
-
|
|
195
|
+
[
|
|
196
|
+
togglesLeftActions,
|
|
197
|
+
invisibleBadge,
|
|
198
|
+
host_static_assets,
|
|
199
|
+
environment_assets,
|
|
200
|
+
dataTestId
|
|
201
|
+
]
|
|
202
|
+
);
|
|
203
|
+
const finalRightActions = useMemo(
|
|
204
|
+
() => /* @__PURE__ */ jsxs(
|
|
205
|
+
StackRightActionsStyled,
|
|
135
206
|
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
207
|
+
direction: "row",
|
|
208
|
+
...getPropDataTestId(
|
|
209
|
+
M4LDYNAMIC_KEY_FILTER_AND_SORT,
|
|
210
|
+
DynamicFilterAndSortSlots.stackRightActions,
|
|
211
|
+
dataTestId
|
|
212
|
+
),
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsx(
|
|
215
|
+
IconButton,
|
|
216
|
+
{
|
|
217
|
+
icon: refreshIconUrl,
|
|
218
|
+
"aria-label": "refresh",
|
|
219
|
+
onClick: onRefresh,
|
|
220
|
+
variant: "outline"
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
rightActions
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
[dataTestId, rightActions, refreshIconUrl, onRefresh]
|
|
228
|
+
);
|
|
229
|
+
const getCurrentSorts = useCallback(() => {
|
|
230
|
+
if (fireOnChangeSortRef.current) {
|
|
231
|
+
return fireOnChangeSortRef.current.getCurrentSorts();
|
|
232
|
+
}
|
|
233
|
+
return [];
|
|
234
|
+
}, [fireOnChangeSortRef]);
|
|
235
|
+
const handleChangeSortExternal = useCallback(
|
|
236
|
+
(sortApplied) => {
|
|
237
|
+
if (fireOnChangeSortRef.current) {
|
|
238
|
+
const sort = sorts?.find((sort2) => sort2.name === sortApplied.columnKey);
|
|
239
|
+
const isFixed = sort?.presence === "fixed";
|
|
240
|
+
switch (sortApplied.action) {
|
|
241
|
+
case "add":
|
|
242
|
+
const newSort = {
|
|
243
|
+
id: fireOnChangeSortRef.current.getNewId(),
|
|
244
|
+
field: {
|
|
245
|
+
name: sortApplied.columnKey,
|
|
246
|
+
type: sort?.type || "string",
|
|
247
|
+
urlIcon: sort?.urlIcon || "",
|
|
248
|
+
label: sort?.label || sortApplied.columnKey
|
|
249
|
+
},
|
|
250
|
+
isSet: true,
|
|
251
|
+
fixed: isFixed,
|
|
252
|
+
fieldType: sort?.type || "string",
|
|
253
|
+
operator: sortApplied.direction
|
|
254
|
+
};
|
|
255
|
+
setTogglesLeftActions((prev) => ({ ...prev, sort: true }));
|
|
256
|
+
fireOnChangeSortRef.current.addExternalSort(newSort);
|
|
257
|
+
break;
|
|
258
|
+
case "remove":
|
|
259
|
+
if (!isFixed) {
|
|
260
|
+
fireOnChangeSortRef.current.removeExternalSort(
|
|
261
|
+
sortApplied.columnKey
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
[fireOnChangeSortRef, sorts]
|
|
269
|
+
);
|
|
270
|
+
const handleChangeFilterExternal = useCallback(
|
|
271
|
+
(event) => {
|
|
272
|
+
if (fireOnChangeFilterRef.current) {
|
|
273
|
+
switch (event.action) {
|
|
274
|
+
case "add":
|
|
275
|
+
setTogglesLeftActions((prev) => ({ ...prev, filter: true }));
|
|
276
|
+
fireOnChangeFilterRef.current.addExternalFilter(event.columnKey);
|
|
277
|
+
break;
|
|
278
|
+
case "openPopoverMenuFields":
|
|
279
|
+
setTogglesLeftActions((prev) => ({ ...prev, filter: true }));
|
|
280
|
+
fireOnChangeFilterRef.current.openPopoverMenuFields();
|
|
281
|
+
break;
|
|
282
|
+
default:
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
142
285
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
direction: "row",
|
|
150
|
-
ownerState: { showDynamicFilter: togglesLeftActions.filter, showDynamicSort: togglesLeftActions.sort },
|
|
151
|
-
...getPropDataTestId(M4LDYNAMIC_KEY_FILTER_AND_SORT, DynamicFilterAndSortSlots.stackCustomHeader, dataTestId),
|
|
152
|
-
children: dynamicsFiltersSorts
|
|
286
|
+
},
|
|
287
|
+
[fireOnChangeFilterRef]
|
|
288
|
+
);
|
|
289
|
+
const getCurrentFilters = useCallback(() => {
|
|
290
|
+
if (fireOnChangeFilterRef.current) {
|
|
291
|
+
return fireOnChangeFilterRef.current.getCurrentFilters();
|
|
153
292
|
}
|
|
154
|
-
|
|
293
|
+
return [];
|
|
294
|
+
}, [fireOnChangeFilterRef]);
|
|
295
|
+
const dynamicsFiltersSorts = useMemo(
|
|
296
|
+
() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
297
|
+
/* @__PURE__ */ jsx(
|
|
298
|
+
DynamicFilter,
|
|
299
|
+
{
|
|
300
|
+
ref: fireOnChangeFilterRef,
|
|
301
|
+
visibleRefresh,
|
|
302
|
+
automatic: filterSortAutomatic,
|
|
303
|
+
fields,
|
|
304
|
+
initialAppliedFilters,
|
|
305
|
+
onChangeFilters: handleChangeFilters,
|
|
306
|
+
withAllField
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
sorts ? /* @__PURE__ */ jsx(
|
|
310
|
+
DynamicSort,
|
|
311
|
+
{
|
|
312
|
+
ref: fireOnChangeSortRef,
|
|
313
|
+
visibleRefresh,
|
|
314
|
+
automatic: filterSortAutomatic,
|
|
315
|
+
fields: sorts,
|
|
316
|
+
initialAppliedSorts,
|
|
317
|
+
onChangeSorts: handleChangeSorts
|
|
318
|
+
}
|
|
319
|
+
) : null,
|
|
320
|
+
withExternalRefresh && /* @__PURE__ */ jsx(
|
|
321
|
+
IconButton,
|
|
322
|
+
{
|
|
323
|
+
icon: refreshIconUrl,
|
|
324
|
+
"aria-label": "refresh",
|
|
325
|
+
onClick: onRefresh
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
] }),
|
|
329
|
+
[
|
|
330
|
+
visibleRefresh,
|
|
331
|
+
filterSortAutomatic,
|
|
332
|
+
fields,
|
|
333
|
+
initialAppliedFilters,
|
|
334
|
+
handleChangeFilters,
|
|
335
|
+
withAllField,
|
|
336
|
+
sorts,
|
|
337
|
+
initialAppliedSorts,
|
|
338
|
+
handleChangeSorts,
|
|
339
|
+
withExternalRefresh,
|
|
340
|
+
refreshIconUrl,
|
|
341
|
+
onRefresh
|
|
342
|
+
]
|
|
343
|
+
);
|
|
344
|
+
const customHeaderComponent = useMemo(
|
|
345
|
+
() => /* @__PURE__ */ jsx(
|
|
346
|
+
StackCustomHeaderStyled,
|
|
347
|
+
{
|
|
348
|
+
direction: "row",
|
|
349
|
+
ownerState: {
|
|
350
|
+
showDynamicFilter: togglesLeftActions.filter,
|
|
351
|
+
showDynamicSort: togglesLeftActions.sort
|
|
352
|
+
},
|
|
353
|
+
...getPropDataTestId(
|
|
354
|
+
M4LDYNAMIC_KEY_FILTER_AND_SORT,
|
|
355
|
+
DynamicFilterAndSortSlots.stackCustomHeader,
|
|
356
|
+
dataTestId
|
|
357
|
+
),
|
|
358
|
+
children: dynamicsFiltersSorts
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
[togglesLeftActions, dataTestId, dynamicsFiltersSorts]
|
|
362
|
+
);
|
|
155
363
|
return {
|
|
156
364
|
leftActions,
|
|
157
365
|
rightActions: finalRightActions,
|
|
158
366
|
visibleCustomHeader,
|
|
159
|
-
customHeaderComponent
|
|
367
|
+
customHeaderComponent,
|
|
368
|
+
getCurrentSorts,
|
|
369
|
+
handleChangeSortExternal,
|
|
370
|
+
handleChangeFilterExternal,
|
|
371
|
+
getCurrentFilters
|
|
160
372
|
};
|
|
161
373
|
};
|
|
162
374
|
export {
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { D as D2 } from "./components/DataGrid/DataGrid.js";
|
|
|
33
33
|
import { g as g5 } from "./components/DataGrid/dictionary.js";
|
|
34
34
|
import { N, T as T2 } from "./components/DataGrid/subcomponents/editors/TextEditor/index.js";
|
|
35
35
|
import { g as g6 } from "./components/DataGrid/utils/getDataGridRowsFromSet.js";
|
|
36
|
-
import { b as b3, a as a4,
|
|
36
|
+
import { b as b3, a as a4, e } from "./components/DataGrid/constants.js";
|
|
37
37
|
import { C as C2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js";
|
|
38
38
|
import { u as u2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.js";
|
|
39
39
|
import { C as C3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js";
|
|
@@ -56,7 +56,7 @@ import { u as u10 } from "./components/DataGrid/formatters/ColumnUncertaintyForm
|
|
|
56
56
|
import { C as C12 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js";
|
|
57
57
|
import { u as u11 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js";
|
|
58
58
|
import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
|
|
59
|
-
import { d as
|
|
59
|
+
import { d as d2 } from "./components/DragResizeWindowRND/classes/index.js";
|
|
60
60
|
import { g as g7 } from "./components/DynamicFilter/dictionary.js";
|
|
61
61
|
import { a as a5, g as g8 } from "./components/DynamicFilter/helpers/frontEndHelpers.js";
|
|
62
62
|
import { g as g9 } from "./components/DynamicFilter/helpers/getRawFiltersForNetwork.js";
|
|
@@ -106,9 +106,8 @@ import { T as T15 } from "./components/mui_extended/ToggleIconButton/slots/Toggl
|
|
|
106
106
|
import { T as T16 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.js";
|
|
107
107
|
import { N as N2 } from "./components/mui_extended/NavLink/NavLink.js";
|
|
108
108
|
import { D as D6 } from "./components/mui_extended/Dialog/Dialog.js";
|
|
109
|
-
import { D as D7 } from "./components/mui_extended/Divider/Divider.js";
|
|
110
109
|
import { B as B6 } from "./components/formatters/BooleanFormatter/BooleanFormatter.js";
|
|
111
|
-
import { D as
|
|
110
|
+
import { D as D7, g as g12 } from "./components/formatters/DateFormatter/DateFormatter.js";
|
|
112
111
|
import { U, g as g13 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
113
112
|
import { P as P3, g as g14 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
|
|
114
113
|
import { C as C15, g as g15 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
@@ -116,11 +115,11 @@ import { P as P4, u as u12 } from "./components/formatters/PeriodFormatter/Perio
|
|
|
116
115
|
import { P as P5, g as g16 } from "./components/formatters/PriceFormatter/PriceFormatter.js";
|
|
117
116
|
import { C as C16 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
|
|
118
117
|
import { g as g17 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
|
|
119
|
-
import { D as
|
|
118
|
+
import { D as D8 } from "./components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js";
|
|
120
119
|
import { g as g18 } from "./components/formatters/dictionary.js";
|
|
121
120
|
import { G } from "./components/GridLayout/GridLayout.js";
|
|
122
121
|
import { R as R3 } from "./components/GridLayout/subcomponents/Responsive/index.js";
|
|
123
|
-
import { c as c2, e, d as
|
|
122
|
+
import { c as c2, e as e2, d as d3 } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
124
123
|
import { i, k } from "./components/GridLayout/utils.js";
|
|
125
124
|
import { w } from "./components/GridLayout/subcomponents/withSizeProvider/index.js";
|
|
126
125
|
import { H as H2 } from "./components/HelmetPage/index.js";
|
|
@@ -180,7 +179,7 @@ import { u as u14 } from "./components/WindowBase/hooks/useWindowToolsMF/index.j
|
|
|
180
179
|
import { u as u15, a as a11 } from "./components/WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
181
180
|
import { M as M6, W as W2, a as a12 } from "./components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js";
|
|
182
181
|
import { c as c3 } from "./components/WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
183
|
-
import { D as
|
|
182
|
+
import { D as D9, a as a13, M as M7 } from "./components/WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js";
|
|
184
183
|
import { W as W3 } from "./components/WindowConfirm/WindowConfirm.js";
|
|
185
184
|
import { a as a14, g as g27 } from "./components/ModalDialog/dictionary.js";
|
|
186
185
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
@@ -210,12 +209,12 @@ import { g as g30 } from "./utils/getComponentUtilityClass.js";
|
|
|
210
209
|
import { g as g31 } from "./utils/getPaletteColor.js";
|
|
211
210
|
import { g as g32 } from "./utils/getTypographyStyles.js";
|
|
212
211
|
import { g as g33 } from "./utils/getIconColor.js";
|
|
213
|
-
import { a as a16
|
|
212
|
+
import { a as a16 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
214
213
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
215
|
-
import { g as
|
|
214
|
+
import { g as g34, a as a17 } from "./utils/getComponentSlotRoot.js";
|
|
216
215
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
217
|
-
import { g as
|
|
218
|
-
import { g as
|
|
216
|
+
import { g as g35 } from "./utils/getValidDate.js";
|
|
217
|
+
import { g as g36 } from "./utils/getNullGuard.js";
|
|
219
218
|
export {
|
|
220
219
|
A7 as AREAS_DICCTIONARY,
|
|
221
220
|
a3 as AREAS_DICTIONARY_ID,
|
|
@@ -259,16 +258,15 @@ export {
|
|
|
259
258
|
C15 as ConcatenatedFormatter,
|
|
260
259
|
b3 as DATAGRID_ROW_HEADER_HEIGHTS,
|
|
261
260
|
a4 as DATAGRID_ROW_HEIGHTS,
|
|
262
|
-
|
|
261
|
+
e as DATAGRID_SEMANTIC_WIDTHS,
|
|
263
262
|
D as DICTIONARY,
|
|
264
263
|
D2 as DataGrid,
|
|
265
|
-
|
|
264
|
+
D7 as DateFormatter,
|
|
266
265
|
D6 as Dialog,
|
|
267
|
-
|
|
268
|
-
D7 as Divider,
|
|
266
|
+
D8 as DistanceToNowFormatter,
|
|
269
267
|
D3 as DragResizeWindowRND,
|
|
270
268
|
D4 as DynamicFilter,
|
|
271
|
-
|
|
269
|
+
D9 as DynamicMFParmsContext,
|
|
272
270
|
a13 as DynamicMFParmsProvider,
|
|
273
271
|
D5 as DynamicSort,
|
|
274
272
|
F as FixedSizeList,
|
|
@@ -381,20 +379,20 @@ export {
|
|
|
381
379
|
W2 as WindowToolsMFContext,
|
|
382
380
|
a12 as WindowToolsMFProvider,
|
|
383
381
|
c2 as addLayoutItemToBreakPointIfNoExists,
|
|
384
|
-
|
|
382
|
+
e2 as addLayoutItemToBreakPoints,
|
|
385
383
|
c4 as capitalizeFirstLetter,
|
|
386
|
-
|
|
384
|
+
d3 as cloneLayouts,
|
|
387
385
|
c3 as createDynamicMFStore,
|
|
388
386
|
c as createToaster,
|
|
389
387
|
d as defaultCommonActionsDictionary,
|
|
390
|
-
|
|
388
|
+
d2 as dragResizeWindowRNDClasses,
|
|
391
389
|
f as formatDistanceToNow,
|
|
392
390
|
g as getAccountPopoverDictionary,
|
|
393
391
|
g2 as getAppBarDictionary,
|
|
394
392
|
b2 as getAreasComponentsDictionary,
|
|
395
393
|
g3 as getAreasDictionary,
|
|
396
394
|
g4 as getCommonActionsDictionary,
|
|
397
|
-
|
|
395
|
+
g34 as getComponentClasses,
|
|
398
396
|
a17 as getComponentSlotRoot,
|
|
399
397
|
g30 as getComponentUtilityClass,
|
|
400
398
|
g5 as getDataGridComponentsDictionary,
|
|
@@ -418,7 +416,7 @@ export {
|
|
|
418
416
|
a14 as getModalDialogComponentsDictionary,
|
|
419
417
|
g27 as getModalDictionary,
|
|
420
418
|
g25 as getNoItemSelectedComponentsDictionary,
|
|
421
|
-
|
|
419
|
+
g36 as getNullGuard,
|
|
422
420
|
g26 as getObjectLogsComponentsDictionary,
|
|
423
421
|
g11 as getPagerComponentsDictionary,
|
|
424
422
|
g31 as getPaletteColor,
|
|
@@ -427,10 +425,9 @@ export {
|
|
|
427
425
|
g19 as getRHFAutocompleteComponentsDictionary,
|
|
428
426
|
g9 as getRawFiltersForNetwork,
|
|
429
427
|
g10 as getRawSortsForNetwork,
|
|
430
|
-
g34 as getSizeStyles,
|
|
431
428
|
g32 as getTypographyStyles,
|
|
432
429
|
g13 as getUncertaintyFormat,
|
|
433
|
-
|
|
430
|
+
g35 as getValidDate,
|
|
434
431
|
g29 as getformAddEditDictionary,
|
|
435
432
|
i as isEqualLayout,
|
|
436
433
|
k as isEqualLayouts,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.60-
|
|
3
|
+
"version": "9.2.60-J18062025.beta.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
12
|
"@hookform/resolvers": "2.9.11",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
|
-
"@m4l/graphics": "7.
|
|
15
|
-
"@m4l/styles": "7.
|
|
14
|
+
"@m4l/graphics": "^7.0.0",
|
|
15
|
+
"@m4l/styles": "^7.0.0",
|
|
16
16
|
"@microlink/react-json-view": "^1.23.3",
|
|
17
17
|
"@mui/lab": "5.0.0-alpha.173",
|
|
18
18
|
"@mui/material": "5.16.7",
|
|
@@ -62,10 +62,9 @@
|
|
|
62
62
|
"@types/react": "18.3.23",
|
|
63
63
|
"@types/react-dom": "18.3.7",
|
|
64
64
|
"react-dom": "18.3.1",
|
|
65
|
+
"storybook": "^8.3.4",
|
|
65
66
|
"attr-accept": "2.2.2",
|
|
66
|
-
"@vitejs/plugin-react": "4.3.4"
|
|
67
|
-
"storybook": "8.3.4",
|
|
68
|
-
"@storybook/react": "8.3.4"
|
|
67
|
+
"@vitejs/plugin-react": "4.3.4"
|
|
69
68
|
},
|
|
70
69
|
"overrides": {
|
|
71
70
|
"glob": "^10.4.5",
|
|
@@ -49,5 +49,27 @@ export declare const RowMenuActions: Story;
|
|
|
49
49
|
* Filter y Sort en busqueda manual
|
|
50
50
|
*/
|
|
51
51
|
export declare const CustomHeaderFilterSortManual: Story;
|
|
52
|
+
/**
|
|
53
|
+
* DataGrid con leftActions, rightActions y
|
|
54
|
+
* Filter y Sort en busqueda automatica
|
|
55
|
+
*/
|
|
56
|
+
export declare const CustomHeaderAutomaticWithExternalFiltersAndSorts: Story;
|
|
57
|
+
/**
|
|
58
|
+
* DataGrid con leftActions, rightActions y
|
|
59
|
+
* Filter y Sort en busqueda manual
|
|
60
|
+
*/
|
|
61
|
+
export declare const CustomHeaderManualWithExternalFiltersAndSorts: Story;
|
|
52
62
|
export declare const DynamicColumns: Story;
|
|
63
|
+
/**
|
|
64
|
+
* Menú de columna con botón de remover sort deshabilitado
|
|
65
|
+
*/
|
|
66
|
+
export declare const HeaderRenderClickRemoveExternalSortDisabled: Story;
|
|
67
|
+
/**
|
|
68
|
+
* Menú de columna con botón de agregar filtro deshabilitado
|
|
69
|
+
*/
|
|
70
|
+
export declare const HeaderRenderClickAddFilterDisabled: Story;
|
|
71
|
+
/**
|
|
72
|
+
* Demostración completa: aplica sort DESC en 'phone', agrega filtro 'email contains 5' y cambia sort DESC en 'name'
|
|
73
|
+
*/
|
|
74
|
+
export declare const HeaderRenderClickFullActions: Story;
|
|
53
75
|
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mswHandles: import('msw').HttpHandler[];
|
|
@@ -3,3 +3,7 @@ import { RowType, SeedProps } from './types';
|
|
|
3
3
|
* Función para generar las filas para el DataGrid de Storybook
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRows: (props: SeedProps) => RowType[];
|
|
6
|
+
/**
|
|
7
|
+
* Función para generar filas con nombres duplicados para probar ordenamiento múltiple
|
|
8
|
+
*/
|
|
9
|
+
export declare const getRowsForMultiSort: (props: SeedProps) => RowType[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RowType } from './types';
|
|
2
|
+
import { RawFilterFieldApply } from '../../../../src/components/DynamicFilter/types';
|
|
3
|
+
import { RawSortFieldApply } from '../../../../src/components/DynamicSort/types';
|
|
4
|
+
/**
|
|
5
|
+
* Función que simula el comportamiento del backend
|
|
6
|
+
* Recibe exactamente los mismos parámetros que se enviarían al backend real
|
|
7
|
+
*/
|
|
8
|
+
export declare function getRowsWithBackendSimulation(originalRows: RowType[], f: Omit<RawFilterFieldApply, 'ft'>[] | undefined, // filtros en formato snake_case (sin ft)
|
|
9
|
+
s: RawSortFieldApply[] | undefined): RowType[];
|