@m4l/components 9.1.142 → 9.1.144
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/.storybook/utils/getStylesColorsByMode.d.ts +48 -48
- package/@types/types.d.ts +17 -0
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +7 -7
- package/components/AppBar/slots/AppBarSlots.d.ts +6 -6
- package/components/AppBar/slots/AppBarSlots.js +1 -1
- package/components/Chip/slots/ChipSlots.d.ts +2 -2
- package/components/Color/slots/ColorSlots.d.ts +2 -2
- package/components/Color/slots/ColorSlots.js +1 -1
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/DataGrid/DataGrid.d.ts +9 -0
- package/components/DataGrid/DataGrid.js +95 -0
- package/components/DataGrid/contexts/DataGridContext/index.js +2 -2
- package/components/DataGrid/contexts/FilterContext/index.js +2 -2
- package/components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.js +6 -2
- package/components/DataGrid/hooks/useDataGrid.js +1 -1
- package/components/DataGrid/hooks/useFilters.js +1 -1
- package/components/DataGrid/index.d.ts +8 -9
- package/components/DataGrid/index.js +1 -89
- package/components/DataGrid/slots/DataGridEnum.d.ts +2 -1
- package/components/DataGrid/slots/DataGridEnum.js +1 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +19 -18
- package/components/DataGrid/slots/DataGridSlot.js +13 -8
- package/components/DataGrid/styles.js +10 -8
- package/components/DataGrid/subcomponents/Actions/index.js +15 -12
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +1 -1
- package/components/DataGrid/subcomponents/Actions/types.d.ts +2 -0
- package/components/DataGrid/subcomponents/Table/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +1 -1
- package/components/DataGrid/types.d.ts +8 -12
- package/components/DragResizeWindow/slots/DragResizeWindowSlots.d.ts +2 -2
- package/components/DynamicFilter/__tests__/fronEndHelpers.test.d.ts +1 -0
- package/components/DynamicFilter/helpers/frontEndHelpers.d.ts +12 -0
- package/components/DynamicFilter/helpers/frontEndHelpers.js +213 -0
- package/components/DynamicFilter/index.d.ts +1 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +15 -15
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +1 -1
- package/components/DynamicFilter/store/DynamicFilterContext.d.ts +1 -1
- package/components/DynamicFilter/store/DynamicFilterStore.d.ts +1 -1
- package/components/DynamicFilter/store/DynamicFilterStore.js +5 -2
- package/components/DynamicFilter/store/{DynamicFilterStoreTypes.d.ts → types.d.ts} +4 -5
- package/components/DynamicFilter/store/useDynamicFilterStore.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.js +2 -4
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +4 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.js +2 -1
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +0 -1
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.js +1 -3
- package/components/DynamicFilter/types.d.ts +2 -2
- package/components/DynamicSort/DynamicSort.styles.js +3 -0
- package/components/DynamicSort/constants.d.ts +3 -3
- package/components/DynamicSort/constants.js +5 -3
- package/components/DynamicSort/dictionary.js +3 -2
- package/components/DynamicSort/helpers/formatToRowSort.js +3 -2
- package/components/DynamicSort/helpers/frontEndHelpers.d.ts +7 -0
- package/components/DynamicSort/helpers/frontEndHelpers.js +38 -0
- package/components/DynamicSort/helpers/getPurgedInitialSortApplyed.js +2 -2
- package/components/DynamicSort/index.d.ts +2 -1
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +29 -29
- package/components/DynamicSort/store/DynamicSortContext.d.ts +3 -3
- package/components/DynamicSort/store/DynamicSortContext.js +5 -14
- package/components/DynamicSort/store/DynamicSortStore.d.ts +2 -2
- package/components/DynamicSort/store/DynamicSortStore.js +30 -21
- package/components/DynamicSort/store/{type.d.ts → types.d.ts} +19 -22
- package/components/DynamicSort/store/useDynamicSortStore.d.ts +1 -1
- package/components/DynamicSort/store/useDynamicSortStore.js +1 -1
- package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.d.ts +1 -1
- package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.js +3 -4
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +2 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -0
- package/components/DynamicSort/subcomponents/FieldTypes/DataTypeComponent.js +2 -2
- package/components/DynamicSort/subcomponents/FieldTypes/FieldTypeInterface.d.ts +4 -4
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.d.ts +4 -4
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.js +4 -4
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +1 -1
- package/components/DynamicSort/subcomponents/FieldTypes/fieldFactory.d.ts +2 -3
- package/components/DynamicSort/subcomponents/FieldTypes/fieldFactory.js +4 -4
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +11 -2
- package/components/DynamicSort/subcomponents/InputSort/useInputSort.d.ts +13 -1
- package/components/DynamicSort/subcomponents/InputSort/useInputSort.js +26 -16
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +5 -4
- package/components/DynamicSort/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +2 -1
- package/components/DynamicSort/subcomponents/PopoverMenuFields/usePopoverMenuFields.js +6 -5
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -2
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.js +8 -6
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +1 -1
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +4 -4
- package/components/DynamicSort/tests/fronEndHelpers.test.d.ts +1 -0
- package/components/DynamicSort/types.d.ts +36 -46
- package/components/Icon/slots/IconSlots.d.ts +2 -2
- package/components/Label/slots/LabelSlots.d.ts +1 -1
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
- package/components/LoadingError/slots/LoadingErrorSlots.d.ts +8 -8
- package/components/MenuActions/MenuActions.js +1 -1
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +6 -6
- package/components/MenuActions/types.d.ts +4 -7
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
- package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +3 -3
- package/components/NumberInput/slots/NumberInputSlots.d.ts +5 -5
- package/components/ObjectLogs/index.js +1 -1
- package/components/PDFViewer/slots/PDFViewerSlots.d.ts +1 -1
- package/components/Pager/Pager.js +4 -1
- package/components/Pager/slots/PagerSlots.d.ts +4 -4
- package/components/PaperForm/slots/PaperFormSlots.d.ts +3 -3
- package/components/PropertyValue/slots/PropertyValueSlots.d.ts +3 -3
- package/components/ScrollBar/slots/ScrollBarSlots.d.ts +1 -1
- package/components/SideBar/slots/SideBarSlots.d.ts +15 -15
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +7 -7
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +8 -8
- package/components/WindowBase/subcomponents/Header/types.d.ts +2 -4
- package/components/WindowConfirm/slots/WindowConfirmSlots.d.ts +8 -8
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +17 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +5 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/index.js +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/types.d.ts +1 -0
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +1 -1
- package/components/areas/types.d.ts +2 -4
- package/components/extended/React-Spinners/PropagateLoaderSpinner/slots/PropagateLoaderSpinnerSlots.d.ts +1 -1
- package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.d.ts +3 -3
- package/components/extended/React-Window/FixedSizeList/slots/FixedSizeListSlots.js +1 -1
- package/components/extended/React-Window/VariableSizeList/VariableSizeList.js +1 -1
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +3 -3
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +1 -1
- package/components/hook-form/RHFDateTime/slots/RHFDateTimeSlots.d.ts +1 -1
- package/components/hook-form/RHFNumberInput/slots/RHFNumberInputSlots.d.ts +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +4 -4
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +2 -2
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +2 -2
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +3 -3
- package/components/hook-form/RHFTimePicker/slots/RHFTimePickerSlots.d.ts +1 -1
- package/components/index.d.ts +27 -33
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +5 -5
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +1 -1
- package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +2 -2
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
- package/components/mui_extended/Dialog/slots/DialogSlots.d.ts +2 -2
- package/components/mui_extended/Divider/slots/DividerSlots.d.ts +2 -2
- package/components/mui_extended/IconButton/IconButton.js +2 -2
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +2 -2
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +2 -2
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
- package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +1 -1
- package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +3 -3
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
- package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +3 -3
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/mui_extended/Tooltip/slots/TooltipSlots.d.ts +1 -1
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +2 -2
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +6 -13
- package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.js +1 -1
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +5 -5
- package/hooks/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/constants.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/constants.js +4 -0
- package/hooks/useDynamicFilterAndSort/icons.d.ts +6 -0
- package/hooks/useDynamicFilterAndSort/icons.js +11 -0
- package/hooks/useDynamicFilterAndSort/index.d.ts +2 -0
- package/hooks/useDynamicFilterAndSort/index.js +1 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.d.ts +5 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.js +9 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +9 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.js +22 -0
- package/hooks/useDynamicFilterAndSort/styles.d.ts +2 -0
- package/hooks/useDynamicFilterAndSort/styles.js +43 -0
- package/hooks/useDynamicFilterAndSort/types.d.ts +34 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +10 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +90 -0
- package/index.js +304 -295
- package/package.json +1 -1
- package/utils/getValidDate.d.ts +4 -0
- package/utils/getValidDate.js +17 -0
- package/utils/index.d.ts +1 -0
- package/vendor.js +2 -2
- package/not_recognized/index.js +0 -23261
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { g as getValidDate } from "../../../utils/getValidDate.js";
|
|
2
|
+
import { getPropertyByString } from "@m4l/core";
|
|
3
|
+
const isInBooleanFilter = (objectData, field) => {
|
|
4
|
+
const objectDataValue = getPropertyByString(objectData, field.n, void 0);
|
|
5
|
+
if (objectDataValue !== void 0) {
|
|
6
|
+
if (field.o === "e") {
|
|
7
|
+
if (objectDataValue === field.o1) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
} else if (field.o === "ne") {
|
|
11
|
+
if (objectDataValue !== field.o1) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return true;
|
|
18
|
+
};
|
|
19
|
+
const isInStringFilter = (objectData, field) => {
|
|
20
|
+
const objectDataValue = getPropertyByString(objectData, field.n, void 0);
|
|
21
|
+
if (typeof field.o1 !== "string") {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
if (objectDataValue !== void 0) {
|
|
25
|
+
if (field.o === "e") {
|
|
26
|
+
if (objectDataValue === field.o1) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
} else if (field.o === "ne") {
|
|
30
|
+
if (objectDataValue !== field.o1) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
} else if (field.o === "c") {
|
|
34
|
+
if (objectDataValue.includes(field.o1)) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
} else if (field.o === "nc") {
|
|
38
|
+
if (!objectDataValue.includes(field.o1)) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
const isInNumberFilter = (objectData, field) => {
|
|
47
|
+
const objectDataValue = getPropertyByString(objectData, field.n, void 0);
|
|
48
|
+
if (typeof field.o1 !== "number") {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
if (objectDataValue !== void 0) {
|
|
52
|
+
if (field.o === "e") {
|
|
53
|
+
if (objectDataValue === field.o1) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
} else if (field.o === "ne") {
|
|
57
|
+
if (objectDataValue !== field.o1) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
} else if (field.o === "b") {
|
|
61
|
+
if (typeof field.o2 !== "number") {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
if (objectDataValue >= field.o1 && objectDataValue <= field.o2) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
} else if (field.o === "gt") {
|
|
68
|
+
if (objectDataValue > field.o1) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
} else if (field.o === "lt") {
|
|
72
|
+
if (objectDataValue < field.o1) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
} else if (field.o === "gte") {
|
|
76
|
+
if (objectDataValue >= field.o1) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
} else if (field.o === "lte") {
|
|
80
|
+
if (objectDataValue <= field.o1) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
};
|
|
88
|
+
const isInDateTimeFilter = (objectData, field) => {
|
|
89
|
+
const objectDataValueString = getPropertyByString(objectData, field.n, void 0);
|
|
90
|
+
if (objectDataValueString === void 0) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
const objectDataValue = getValidDate(objectDataValueString);
|
|
94
|
+
if (objectDataValue === null) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
const o1 = getValidDate(field.o1);
|
|
98
|
+
if (o1 === null) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
if (field.o === "e") {
|
|
102
|
+
if (objectDataValue.getTime() === o1.getTime()) {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
} else if (field.o === "ne") {
|
|
106
|
+
if (objectDataValue.getTime() !== o1.getTime()) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
} else if (field.o === "b") {
|
|
110
|
+
const o2 = getValidDate(field.o2);
|
|
111
|
+
if (o2 === null) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
if (objectDataValue.getTime() >= o1.getTime() && objectDataValue.getTime() <= o2.getTime()) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
} else if (field.o === "gt") {
|
|
118
|
+
if (objectDataValue.getTime() > o1.getTime()) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
} else if (field.o === "lt") {
|
|
122
|
+
if (objectDataValue.getTime() < o1.getTime()) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
} else if (field.o === "gte") {
|
|
126
|
+
if (objectDataValue.getTime() >= o1.getTime()) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
} else if (field.o === "lte") {
|
|
130
|
+
if (objectDataValue.getTime() <= o1.getTime()) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
};
|
|
136
|
+
const isInSelectAsyncFilter = (objectData, field) => {
|
|
137
|
+
const objectDataValue = getPropertyByString(objectData, field.n, void 0);
|
|
138
|
+
if (objectDataValue === void 0) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
if (!(typeof objectDataValue === "string" || typeof objectDataValue === "number")) {
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
if (!field.oa) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
if (field.o === "in") {
|
|
148
|
+
return field.oa.includes(objectDataValue);
|
|
149
|
+
} else if (field.o === "nin") {
|
|
150
|
+
return !field.oa.includes(objectDataValue);
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
};
|
|
154
|
+
const isInSelectFilter = (objectData, field) => {
|
|
155
|
+
const objectDataValue = getPropertyByString(objectData, field.n, void 0);
|
|
156
|
+
if (objectDataValue === void 0) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
if (!(typeof objectDataValue === "string" || typeof objectDataValue === "number")) {
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
if (!field.oa) {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
if (field.o === "in") {
|
|
166
|
+
return field.oa.includes(objectDataValue);
|
|
167
|
+
} else if (field.o === "nin") {
|
|
168
|
+
return !field.oa.includes(objectDataValue);
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
171
|
+
};
|
|
172
|
+
const getIsIfInDynamicFilter = (objectData, groupedFields) => {
|
|
173
|
+
let InAllFilters = true;
|
|
174
|
+
for (const fieldName of Object.keys(groupedFields)) {
|
|
175
|
+
const fieldGroup = groupedFields[fieldName];
|
|
176
|
+
let inFilter = false;
|
|
177
|
+
fieldGroup.forEach((field) => {
|
|
178
|
+
if (field.ft === "boolean") {
|
|
179
|
+
inFilter = inFilter || isInBooleanFilter(objectData, field);
|
|
180
|
+
} else if (field.ft === "string") {
|
|
181
|
+
inFilter = inFilter || isInStringFilter(objectData, field);
|
|
182
|
+
} else if (field.ft === "number") {
|
|
183
|
+
inFilter = inFilter || isInNumberFilter(objectData, field);
|
|
184
|
+
} else if (field.ft === "datetime") {
|
|
185
|
+
inFilter = inFilter || isInDateTimeFilter(objectData, field);
|
|
186
|
+
} else if (field.ft === "select") {
|
|
187
|
+
inFilter = inFilter || isInSelectFilter(objectData, field);
|
|
188
|
+
} else if (field.ft === "selectAsync") {
|
|
189
|
+
inFilter = inFilter || isInSelectAsyncFilter(objectData, field);
|
|
190
|
+
} else {
|
|
191
|
+
inFilter = true;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
if (!inFilter) {
|
|
195
|
+
InAllFilters = false;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return InAllFilters;
|
|
200
|
+
};
|
|
201
|
+
function getFilterGroupFieldsByName(fields) {
|
|
202
|
+
return fields.reduce((acc, field) => {
|
|
203
|
+
if (!acc[field.n]) {
|
|
204
|
+
acc[field.n] = [];
|
|
205
|
+
}
|
|
206
|
+
acc[field.n].push(field);
|
|
207
|
+
return acc;
|
|
208
|
+
}, {});
|
|
209
|
+
}
|
|
210
|
+
export {
|
|
211
|
+
getFilterGroupFieldsByName as a,
|
|
212
|
+
getIsIfInDynamicFilter as g
|
|
213
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './DynamicFilter';
|
|
2
2
|
export { getDynamicFilterComponentsDictionary } from './dictionary';
|
|
3
3
|
export type { FilterFieldApplied as FilterFieldApply, RawFilterFieldApply, InitialFilterApplied, FilterField, } from './types';
|
|
4
|
+
export { getIsIfInDynamicFilter, getFilterGroupFieldsByName } from './helpers/frontEndHelpers';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
2
2
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
3
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
4
|
export declare const InnerContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
5
5
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
6
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
7
|
export declare const InputFilterStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
8
8
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
9
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
9
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
10
|
export declare const InputFilterInputStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
11
11
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
12
12
|
}, Pick<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import('react').ClassAttributes<HTMLInputElement> | keyof import('react').InputHTMLAttributes<HTMLInputElement>>, {}>;
|
|
@@ -15,14 +15,14 @@ export declare const InputFilterIconStyled: import('@emotion/styled').StyledComp
|
|
|
15
15
|
}, {}, {}>;
|
|
16
16
|
export declare const AppliedFiltersStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
17
17
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
18
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
18
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
19
19
|
export declare const AppliedFilterInnerContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
20
20
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
21
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
21
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
22
22
|
export declare const AppliedFilterChipStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
23
23
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
24
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
25
|
-
export declare const AppliedFilterChipIconStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "
|
|
24
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
25
|
+
export declare const AppliedFilterChipIconStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "rotationAngle" | "placement" | "tooltipContent" | "componentPaletteColor" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeContent" | "dictionaryTooltipId" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
26
26
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
27
27
|
}, {}, {}>;
|
|
28
28
|
export declare const AppliedFilterChipInfoStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
@@ -37,19 +37,19 @@ export declare const AppliedFilterChipInfoOperatorStyled: import('@emotion/style
|
|
|
37
37
|
export declare const AppliedFilterChipInfoOperandsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
38
38
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
39
39
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
40
|
-
export declare const AppliedFilterChipRemoveButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "
|
|
40
|
+
export declare const AppliedFilterChipRemoveButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "rotationAngle" | "placement" | "tooltipContent" | "componentPaletteColor" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeContent" | "dictionaryTooltipId" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
41
41
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
42
42
|
}, {}, {}>;
|
|
43
43
|
export declare const ActionsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
44
44
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
45
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
45
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
46
46
|
export declare const ActionsSkeletonButtonStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
47
47
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
48
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
49
|
-
export declare const ActionsClearButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "
|
|
48
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
49
|
+
export declare const ActionsClearButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "rotationAngle" | "placement" | "tooltipContent" | "componentPaletteColor" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeContent" | "dictionaryTooltipId" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
50
50
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
51
51
|
}, {}, {}>;
|
|
52
|
-
export declare const ActionsSubmitButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "
|
|
52
|
+
export declare const ActionsSubmitButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "rotationAngle" | "placement" | "tooltipContent" | "componentPaletteColor" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeContent" | "dictionaryTooltipId" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
53
53
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
54
54
|
}, {}, {}>;
|
|
55
55
|
export declare const PopoverMenuStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
@@ -63,16 +63,16 @@ export declare const PopoverMenuItemIconStyled: import('@emotion/styled').Styled
|
|
|
63
63
|
}, {}, {}>;
|
|
64
64
|
export declare const PopoverMenuItemLabelStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
65
65
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
66
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
66
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
67
67
|
export declare const PopoverStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
68
68
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
69
69
|
}, {}, {}>;
|
|
70
70
|
export declare const PopoverContainerFieldsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
71
71
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
72
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
72
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
73
73
|
export declare const PopoverHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
74
74
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
75
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').
|
|
75
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
76
76
|
export declare const PopoverHeaderIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
77
77
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
78
78
|
}, {}, {}>;
|
|
@@ -3,10 +3,10 @@ import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../constants.js";
|
|
|
3
3
|
import { D as DynamicFilterSlots } from "./SlotsEnum.js";
|
|
4
4
|
import { d as dynamicFilterStyles } from "../DynamicFIlter.styles.js";
|
|
5
5
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
6
|
+
import { P as Popover } from "../../mui_extended/Popover/Popover.js";
|
|
6
7
|
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
7
8
|
import { A as ActionsContainer } from "../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
8
9
|
import { I as Icon } from "../../Icon/Icon.js";
|
|
9
|
-
import { P as Popover } from "../../mui_extended/Popover/Popover.js";
|
|
10
10
|
import { M as MenuItem } from "../../mui_extended/MenuItem/MenuItem.js";
|
|
11
11
|
const RootStyled = styled("div", { name: DYNAMIC_FILTER_KEY_COMPONENT, slot: DynamicFilterSlots.root })(
|
|
12
12
|
dynamicFilterStyles?.root
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DynamicFilterProps } from '../types';
|
|
3
|
-
declare const DynamicFilterContext: import('react').Context<import('zustand').StoreApi<import('./
|
|
3
|
+
declare const DynamicFilterContext: import('react').Context<import('zustand').StoreApi<import('./types').DynamicFilterStateWithActions> | null>;
|
|
4
4
|
interface DynamicFilterContextProps extends DynamicFilterProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicFilterStateWithActions, InitialStoreProps } from './
|
|
1
|
+
import { DynamicFilterStateWithActions, InitialStoreProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Crea el store de zustand para el componente DynamicFilter
|
|
4
4
|
* @param initProps Variables iniciales que necesita store
|
|
@@ -32,7 +32,6 @@ const createDevtools = (immerMiddlewere, config) => {
|
|
|
32
32
|
};
|
|
33
33
|
const createDynamicFilterStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
34
34
|
const startProps = {
|
|
35
|
-
elementRef: null,
|
|
36
35
|
countOnChangeFiltersApplied: 0,
|
|
37
36
|
appliedFilters: [],
|
|
38
37
|
availableFields: [],
|
|
@@ -41,6 +40,7 @@ const createDynamicFilterStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
41
40
|
inputData: "",
|
|
42
41
|
...initProps
|
|
43
42
|
};
|
|
43
|
+
let elementRef = null;
|
|
44
44
|
return createStore(
|
|
45
45
|
createDevtools(
|
|
46
46
|
immer((set, get) => ({
|
|
@@ -64,7 +64,10 @@ const createDynamicFilterStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
64
64
|
* Actualiza la referencia del elemento (inputFilter) desde donde se desprende el listado de campos
|
|
65
65
|
*/
|
|
66
66
|
setElementRef: (ref) => {
|
|
67
|
-
|
|
67
|
+
elementRef = ref;
|
|
68
|
+
},
|
|
69
|
+
getElementRef: () => {
|
|
70
|
+
return elementRef;
|
|
68
71
|
},
|
|
69
72
|
/**
|
|
70
73
|
* TODO: Documentar
|
|
@@ -2,7 +2,6 @@ import { MutableRefObject } from 'react';
|
|
|
2
2
|
import { GetLabelType } from '@m4l/core';
|
|
3
3
|
import { FilterField, FilterFieldApplied, FilterToEditApply, InitialFilterApplied, OwnerState } from '../types';
|
|
4
4
|
export type OpenFor = 'add' | 'edit';
|
|
5
|
-
export type FnAnchorEL = () => Element;
|
|
6
5
|
export interface PopoverFilterDataBase {
|
|
7
6
|
/**
|
|
8
7
|
* Motivo de apertura del popup
|
|
@@ -60,10 +59,6 @@ export interface DynamicFilterState {
|
|
|
60
59
|
* "automatic" Configura si el filtro se ejecuta automaticamente cuando se agrega o se modifica un filtro
|
|
61
60
|
*/
|
|
62
61
|
automatic: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* "elementRef" referencia al elemento (inputFilter) desde donde se desprende el listado de campos
|
|
65
|
-
*/
|
|
66
|
-
elementRef: MutableRefObject<HTMLElement | null> | null;
|
|
67
62
|
/**
|
|
68
63
|
* "isOpenPopoverMenuFields" determina si se debe abrir el menú de campos
|
|
69
64
|
*/
|
|
@@ -112,6 +107,10 @@ export interface DynamicFilterStateWithActions extends DynamicFilterState {
|
|
|
112
107
|
* "setElementRef" establece la referencia al elemento (inputFilter) desde donde se desprende el listado de campos
|
|
113
108
|
*/
|
|
114
109
|
setElementRef: (ref: MutableRefObject<HTMLElement | null>) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Obtiene la referencia al elemento (inputFilter) desde donde se desprende el listado de campos
|
|
112
|
+
*/
|
|
113
|
+
getElementRef: () => MutableRefObject<HTMLElement | null> | null;
|
|
115
114
|
/**
|
|
116
115
|
* Obtiene el Campo dado el nombre
|
|
117
116
|
* @param name
|
|
@@ -5,7 +5,7 @@ import { FilterFieldApplied } from '../../types';
|
|
|
5
5
|
*/
|
|
6
6
|
declare function useAppliedFilterChip(filter: FilterFieldApplied): {
|
|
7
7
|
onDelete: () => void;
|
|
8
|
-
onEditFilter: (
|
|
8
|
+
onEditFilter: (_event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
9
|
removeIconUrl: string;
|
|
10
10
|
iconFieldUrl: string;
|
|
11
11
|
labels: import('../../types').DataTypeFilerLabels;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo } from "react";
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useFormatter } from "@m4l/graphics";
|
|
4
4
|
import { u as useDynamicFilterStore } from "../../store/useDynamicFilterStore.js";
|
|
@@ -10,7 +10,6 @@ function useAppliedFilterChip(filter) {
|
|
|
10
10
|
const { hidePopoverFilter, removeFilter, showPopoverFilterForEdit } = useDynamicFilterStore(
|
|
11
11
|
(state) => state.actions
|
|
12
12
|
);
|
|
13
|
-
const elementRef = useRef(null);
|
|
14
13
|
const removeIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/clear.svg`;
|
|
15
14
|
const labels = useMemo(() => {
|
|
16
15
|
return fieldFactory(filter.field.type).getLabels(filter, getLabel, formatters, filter.field);
|
|
@@ -19,9 +18,8 @@ function useAppliedFilterChip(filter) {
|
|
|
19
18
|
hidePopoverFilter(false);
|
|
20
19
|
removeFilter(filter.id);
|
|
21
20
|
}
|
|
22
|
-
function onEditFilter(
|
|
21
|
+
function onEditFilter(_event) {
|
|
23
22
|
hidePopoverFilter(false);
|
|
24
|
-
elementRef.current = event.currentTarget;
|
|
25
23
|
setTimeout(() => showPopoverFilterForEdit(filter), 10);
|
|
26
24
|
}
|
|
27
25
|
return {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
|
|
3
3
|
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
4
|
+
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
5
|
+
import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../../constants.js";
|
|
4
6
|
import { R as RootStyled, I as InnerContainerStyled } from "../../slots/dynamicFilterSlots.js";
|
|
5
7
|
import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
|
|
6
8
|
import { I as InputFilter } from "../InputFilter/InputFilter.js";
|
|
@@ -9,9 +11,11 @@ import { F as FilterActions } from "../FilterActions/FilterActions.js";
|
|
|
9
11
|
import { P as PopoverFilter } from "../PopoverFilter/PopoverFilter.js";
|
|
10
12
|
function DynamicFilterBase() {
|
|
11
13
|
const { ownerState, dataTestId } = useDynamicFilterBase();
|
|
14
|
+
const classRoot = getComponentSlotRoot(DYNAMIC_FILTER_KEY_COMPONENT);
|
|
12
15
|
return /* @__PURE__ */ jsx(
|
|
13
16
|
RootStyled,
|
|
14
17
|
{
|
|
18
|
+
className: classRoot,
|
|
15
19
|
ownerState: { ...ownerState },
|
|
16
20
|
...getPropDataTestId(dataTestId, DynamicFilterSlots.root),
|
|
17
21
|
children: /* @__PURE__ */ jsxs(
|