@m4l/components 9.2.48 → 9.2.50-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 +8 -1
- package/components/Chip/ChipStyles.js +1 -1
- package/components/Chip/types.d.ts +2 -1
- package/components/DataGrid/contexts/DataGridContext/index.js +1 -1
- package/components/DataGrid/contexts/FilterContext/index.js +1 -1
- package/components/DataGrid/dictionary.js +0 -3
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js +4 -3
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/types.d.ts +4 -3
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js +4 -4
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +2 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js +4 -3
- package/components/DataGrid/slots/DataGridEnum.js +2 -2
- package/components/DataGrid/slots/DataGridSlot.js +1 -1
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +2 -2
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +0 -1
- package/components/DynamicFilter/DynamicFilter.styles.js +0 -1
- package/components/DynamicFilter/constants.d.ts +5 -2
- package/components/DynamicFilter/constants.js +9 -3
- package/components/DynamicFilter/dictionary.d.ts +40 -38
- package/components/DynamicFilter/dictionary.js +33 -39
- package/components/DynamicFilter/helpers/formatToInitialFilters.d.ts +3 -1
- package/components/DynamicFilter/helpers/formatToInitialFilters.js +30 -20
- package/components/DynamicFilter/helpers/formatToRowFilter.js +15 -6
- package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied.js +1 -1
- package/components/DynamicFilter/store/DynamicFilterContext.js +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.js +4 -3
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +10 -3
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.js +7 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +11 -8
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +7 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +10 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.js +17 -9
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +13 -9
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.d.ts +7 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.js +121 -46
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +13 -11
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +8 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.js +127 -46
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +11 -9
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.js +11 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +10 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +2 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -4
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.js +2 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +28 -14
- package/components/DynamicFilter/types.d.ts +60 -18
- package/components/DynamicSort/dictionary.d.ts +1 -0
- package/components/DynamicSort/dictionary.js +1 -5
- package/components/DynamicSort/slots/DynamicSortSlots.js +1 -1
- package/components/DynamicSort/store/DynamicSortContext.js +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +28 -14
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/GridLayout/GridLayout.js +1 -1
- package/components/GridLayout/styles.js +1 -1
- package/components/GridLayout/subcomponents/GridItem/index.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/helper.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/index.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils.js +3 -3
- package/components/GridLayout/subcomponents/withSizeProvider/index.js +1 -1
- package/components/Icon/Icon.js +1 -1
- package/components/Icon/constants.js +2 -2
- package/components/Icon/slots/IconSlots.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Image/constant.js +2 -2
- package/components/Image/slots/ImageSlots.js +1 -1
- package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
- package/components/LanguagePopover/LanguagePopover.js +1 -1
- package/components/LoadingError/LoadingError.js +1 -1
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/MFIsolationApp/MFIsolationApp.js +2 -2
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +1 -1
- package/components/NoItemSelected/NoItemSelected.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/NumberInputReducer.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +5 -3
- package/components/ObjectLogs/dictionary.js +1 -1
- package/components/Pager/Pager.styles.js +0 -8
- package/components/Pager/dicctionary.js +0 -5
- package/components/PrintingSystem/subcomponents/ChartNode/index.js +1 -1
- package/components/PropertyValue/PropertyValue.js +3 -3
- package/components/PropertyValue/PropertyValue.styles.js +4 -2
- package/components/PropertyValue/index.d.ts +1 -0
- package/components/PropertyValue/types.d.ts +0 -2
- package/components/ScrollBar/ScrollBar.js +1 -1
- package/components/SideBar/slots/SideBarEnum.js +4 -4
- package/components/SideBar/slots/SideBarSlots.js +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -1
- package/components/ToastContainer/ToastContainer.js +1 -1
- package/components/WindowBase/slots/WindowBaseSlots.js +1 -1
- package/components/animate/variants/bounce.js +1 -1
- package/components/animate/variants/fade.js +1 -1
- package/components/animate/variants/transition.js +2 -2
- package/components/areas/components/AreasAdmin/AreasAdmin.js +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +14 -14
- package/components/areas/contexts/AreasContext/store.js +5 -5
- package/components/areas/icons.js +0 -8
- package/components/commercial/HamburgerMenu/classes/index.js +1 -1
- package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.d.ts +9 -3
- package/components/extended/React-resizable-panels/SplitLayout.js +25 -5
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +20 -6
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +12 -4
- package/components/extended/React-resizable-panels/types.d.ts +7 -0
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +3 -3
- package/components/formatters/ChipStatusFormatter/types.d.ts +3 -2
- package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.js +2 -2
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +1 -1
- package/components/hook-form/RHFNumberInput/index.d.ts +1 -0
- package/components/hook-form/RHFNumberInput/index.js +1 -0
- package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.styles.js +1 -3
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +1 -1
- package/components/hook-form/RHFormContext/classes/index.js +1 -1
- package/components/hook-form/RHFormContext/index.js +1 -1
- package/components/hook-form/index.d.ts +1 -1
- package/components/index.d.ts +1 -1
- package/components/mui_extended/Accordion/Accordion.js +1 -1
- package/components/mui_extended/Accordion/slots/AccordionSlots.js +2 -2
- package/components/mui_extended/Accordion/styles.js +1 -0
- package/components/mui_extended/Autocomplete/Autocomplete.js +25 -12
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +1 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +3 -3
- package/components/mui_extended/CheckBox/CheckBox.js +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.js +2 -2
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.js +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.js +1 -1
- package/components/mui_extended/ImageButton/utils/Clases/index.js +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
- package/components/mui_extended/NavLink/NavLink.js +1 -1
- package/components/mui_extended/NavLink/constants.js +2 -2
- package/components/mui_extended/NavLink/slots/NavLinkSlots.js +1 -1
- package/components/mui_extended/Popover/Popover.js +1 -1
- package/components/mui_extended/Popover/Popover.styles.js +1 -5
- package/components/mui_extended/Popover/constants.js +2 -2
- package/components/mui_extended/Select/Select.js +1 -1
- package/components/mui_extended/Select/Select.styles.js +1 -1
- package/components/mui_extended/Select/constants.js +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/Tab/Tab.js +1 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -1
- package/components/mui_extended/TextField/constants.js +1 -1
- package/components/mui_extended/Tooltip/Tooltip.js +2 -2
- package/components/mui_extended/Tooltip/slots/TooltipSlots.js +2 -2
- package/components/mui_extended/Typography/Typography.js +1 -1
- package/components/mui_extended/Typography/constants.js +3 -3
- package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
- package/components/popups/components/PopupsViewer/icons.js +0 -1
- package/hooks/useDataGridPersistence/constants.js +2 -2
- package/hooks/useDataGridPersistence/useDataGridPersistence.js +1 -1
- package/hooks/useDynamicFilterAndSort/styles.js +2 -0
- package/hooks/useDynamicFilterAndSort/types.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +56 -12
- package/hooks/useSvgColor/constants.js +2 -2
- package/hooks/useSvgColor/helpers.js +1 -1
- package/hooks/useSvgColor/useSvgColor.js +1 -1
- package/index.js +109 -109
- package/mockServiceWorker.js +1 -1
- package/package.json +1 -6
- package/components/PropertyValue/styles.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from "yup";
|
|
2
|
-
import { S as
|
|
3
|
-
import { g as getDynamicFilterDictionary } from "../../../dictionary.js";
|
|
2
|
+
import { S as SELECT_ASYNC_OPERATORS_MULTIPLE, c as SELECT_ASYNC_OPERATORS_SINGLE } from "../../../constants.js";
|
|
4
3
|
import { S as SelectAsyncFilter } from "./index.js";
|
|
4
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
5
5
|
function filterValidOperandsArraySelectAsync(operandsArray, field) {
|
|
6
6
|
const operandsArrayFormatted = Array.isArray(operandsArray) ? operandsArray : [operandsArray];
|
|
7
7
|
const getOptionId = field?.selectAsyncOptions?.getOptionId;
|
|
@@ -17,64 +17,120 @@ class SelectAsyncFilterHelpers {
|
|
|
17
17
|
/**
|
|
18
18
|
* getDefaultFilter devuelve un filtro por defecto para un campo de selección asíncrona.
|
|
19
19
|
*/
|
|
20
|
-
getDefaultFilter(
|
|
21
|
-
const
|
|
22
|
-
const
|
|
20
|
+
getDefaultFilter(fieldSelectAsync, fixed) {
|
|
21
|
+
const field = fieldSelectAsync;
|
|
22
|
+
const defaultOperandsArray = field.defaultOperandsArray ?? [];
|
|
23
|
+
const defaultOperand1 = field.defaultOperand1;
|
|
24
|
+
const isMultiple = field?.selectAsyncOptions?.multiple ?? false;
|
|
25
|
+
let dOperator;
|
|
26
|
+
let isSet = false;
|
|
27
|
+
let operandsArray = [];
|
|
28
|
+
if (isMultiple) {
|
|
29
|
+
dOperator = field.defaultOperator ?? "in";
|
|
30
|
+
isSet = fixed ? defaultOperandsArray !== null && defaultOperandsArray.length > 0 ? true : false : false;
|
|
31
|
+
if (field.defaultOperandsArray !== void 0 && Array.isArray(field.defaultOperandsArray)) {
|
|
32
|
+
operandsArray = filterValidOperandsArraySelectAsync(field.defaultOperandsArray, field);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
dOperator = field.defaultOperator ?? "e";
|
|
36
|
+
isSet = fixed ? defaultOperand1 ? true : false : false;
|
|
37
|
+
}
|
|
38
|
+
const defaultCommonFilter = {
|
|
23
39
|
id: 0,
|
|
24
40
|
fieldType: "selectAsync",
|
|
25
41
|
field,
|
|
26
42
|
fixed,
|
|
27
|
-
isSet
|
|
28
|
-
operator:
|
|
29
|
-
operandsArray: []
|
|
43
|
+
isSet,
|
|
44
|
+
operator: dOperator
|
|
30
45
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
const defaultFilterMultiple = {
|
|
47
|
+
...defaultCommonFilter,
|
|
48
|
+
multiple: true,
|
|
49
|
+
operandsArray
|
|
50
|
+
};
|
|
51
|
+
const defaultFilterSingle = {
|
|
52
|
+
...defaultCommonFilter,
|
|
53
|
+
multiple: false,
|
|
54
|
+
operand1: defaultOperand1
|
|
55
|
+
};
|
|
56
|
+
return isMultiple ? defaultFilterMultiple : defaultFilterSingle;
|
|
36
57
|
}
|
|
37
58
|
/**
|
|
38
59
|
* getFormValue convierte un valor de filtro en un valor de formulario.
|
|
39
60
|
*/
|
|
40
|
-
getFormValue(
|
|
41
|
-
const
|
|
61
|
+
getFormValue(fieldSelectAsync, getLabel, filterValueSelectAsync) {
|
|
62
|
+
const field = fieldSelectAsync;
|
|
63
|
+
const filterValue = filterValueSelectAsync ?? void 0;
|
|
42
64
|
const isMultiple = field?.selectAsyncOptions?.multiple ?? false;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
65
|
+
let formValueOperandsArray = void 0;
|
|
66
|
+
let formValueOperand1 = void 0;
|
|
67
|
+
let operator;
|
|
68
|
+
if (isMultiple) {
|
|
69
|
+
operator = filterValue ? filterValue.operator : field.defaultOperator ?? "in";
|
|
70
|
+
formValueOperandsArray = filterValueSelectAsync?.operandsArray;
|
|
71
|
+
} else {
|
|
72
|
+
operator = filterValue ? filterValue.operator : field.defaultOperator ?? "e";
|
|
73
|
+
formValueOperand1 = filterValueSelectAsync?.operand1;
|
|
74
|
+
}
|
|
75
|
+
const formCommon = {
|
|
46
76
|
fieldType: "selectAsync",
|
|
47
77
|
formValueOperator: {
|
|
48
78
|
id: operator,
|
|
49
|
-
label: getLabel(
|
|
50
|
-
}
|
|
79
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${operator}`)
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const formMultiple = {
|
|
83
|
+
...formCommon,
|
|
84
|
+
multiple: true,
|
|
51
85
|
formValueOperandsArray
|
|
52
86
|
};
|
|
87
|
+
const formSingle = {
|
|
88
|
+
...formCommon,
|
|
89
|
+
multiple: false,
|
|
90
|
+
formValueOperand1
|
|
91
|
+
};
|
|
92
|
+
return isMultiple ? formMultiple : formSingle;
|
|
53
93
|
}
|
|
54
94
|
/**
|
|
55
95
|
* getFilterFromFormValue convierte un valor de formulario en un valor de filtro.
|
|
56
96
|
*/
|
|
57
97
|
getFilterFromFormValue(formFilterValue) {
|
|
58
98
|
const operator = formFilterValue.formValueOperator.id;
|
|
59
|
-
const
|
|
60
|
-
|
|
99
|
+
const isMultiple = formFilterValue.multiple;
|
|
100
|
+
const filterCommon = {
|
|
61
101
|
fieldType: "selectAsync",
|
|
62
|
-
operator
|
|
63
|
-
|
|
102
|
+
operator
|
|
103
|
+
};
|
|
104
|
+
const filterMultiple = {
|
|
105
|
+
...filterCommon,
|
|
106
|
+
multiple: true,
|
|
107
|
+
operandsArray: formFilterValue.formValueOperandsArray
|
|
108
|
+
};
|
|
109
|
+
const filterSingle = {
|
|
110
|
+
...filterCommon,
|
|
111
|
+
operand1: formFilterValue.formValueOperand1
|
|
64
112
|
};
|
|
113
|
+
return isMultiple ? filterMultiple : filterSingle;
|
|
65
114
|
}
|
|
66
115
|
/**
|
|
67
116
|
* getLabels devuelve las etiquetas para el campo, operador y operandos.
|
|
68
117
|
*/
|
|
69
|
-
getLabels(filter, getLabel, _formatters,
|
|
118
|
+
getLabels(filter, getLabel, _formatters, fieldSelectAsync) {
|
|
119
|
+
const field = fieldSelectAsync;
|
|
120
|
+
const isMultiple = field?.selectAsyncOptions?.multiple ?? false;
|
|
70
121
|
const operandsArray = filter.operandsArray;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
122
|
+
let labelOperands = "";
|
|
123
|
+
if (isMultiple) {
|
|
124
|
+
labelOperands = operandsArray?.reduce?.((label, operand) => {
|
|
125
|
+
const textLabel = field.selectAsyncOptions?.getOptionLabel?.(operand) || "";
|
|
126
|
+
return label ? `${label} | ${textLabel}` : textLabel;
|
|
127
|
+
}, "")?.toString() || "?";
|
|
128
|
+
} else {
|
|
129
|
+
labelOperands = (field.selectAsyncOptions?.getOptionLabel?.(filter.operand1) ?? "?") + "";
|
|
130
|
+
}
|
|
75
131
|
return {
|
|
76
132
|
labelField: filter.field.label ?? getLabel(filter.field.dictionaryId),
|
|
77
|
-
labelOperator: getLabel(
|
|
133
|
+
labelOperator: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`),
|
|
78
134
|
labelOperands
|
|
79
135
|
};
|
|
80
136
|
}
|
|
@@ -83,34 +139,53 @@ class SelectAsyncFilterHelpers {
|
|
|
83
139
|
*/
|
|
84
140
|
getSchema(getLabel) {
|
|
85
141
|
return Yup.object({
|
|
86
|
-
formValueOperator: Yup.object().nullable().required(getLabel(
|
|
87
|
-
formValueOperandsArray: Yup.
|
|
88
|
-
|
|
142
|
+
formValueOperator: Yup.object().nullable().required(getLabel(DICCTIONARY.error_operator_required)),
|
|
143
|
+
formValueOperandsArray: Yup.mixed().when(["multiple"], {
|
|
144
|
+
is: true,
|
|
145
|
+
then: Yup.array().min(1, getLabel(DICCTIONARY.error_operand_required)).required(getLabel(DICCTIONARY.error_operand_required))
|
|
146
|
+
}),
|
|
147
|
+
formValueOperand1: Yup.mixed().when(["multiple"], {
|
|
148
|
+
is: false,
|
|
149
|
+
then: Yup.object().nullable().required(getLabel(DICCTIONARY.error_operand_required))
|
|
89
150
|
})
|
|
90
151
|
});
|
|
91
152
|
}
|
|
92
153
|
/**
|
|
93
154
|
* verifyFilter verifica si el filtro es válido.
|
|
94
155
|
*/
|
|
95
|
-
verifyFilter(filter,
|
|
156
|
+
verifyFilter(filter, fieldSelectAsync) {
|
|
157
|
+
const field = fieldSelectAsync;
|
|
158
|
+
const isMultiple = field?.selectAsyncOptions?.multiple ?? false;
|
|
96
159
|
if (typeof filter.operator !== "string") {
|
|
97
160
|
return false;
|
|
98
161
|
}
|
|
99
162
|
if (!field) {
|
|
100
163
|
return false;
|
|
101
164
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
filter.operandsArray
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
165
|
+
if (isMultiple) {
|
|
166
|
+
if (SELECT_ASYNC_OPERATORS_MULTIPLE.findIndex((f) => f === filter.operator) === -1) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
if (!filter.operandsArray || typeof filter.operandsArray !== "object") {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if (Array.isArray(filter.operandsArray) && filter.operandsArray.length === 0) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
const validOperandsArray = filterValidOperandsArraySelectAsync(
|
|
176
|
+
filter.operandsArray,
|
|
177
|
+
field
|
|
178
|
+
);
|
|
179
|
+
if (!validOperandsArray || validOperandsArray?.length === 0) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
} else {
|
|
183
|
+
if (SELECT_ASYNC_OPERATORS_SINGLE.findIndex((f) => f === filter.operator) === -1) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (!filter.operand1 || typeof filter.operand1 !== "object") {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
114
189
|
}
|
|
115
190
|
return true;
|
|
116
191
|
}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import { S as
|
|
5
|
-
import {
|
|
4
|
+
import { S as SELECT_ASYNC_OPERATORS_MULTIPLE, c as SELECT_ASYNC_OPERATORS_SINGLE } from "../../../constants.js";
|
|
5
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
6
6
|
import { u as useDynamicFilterStore } from "../../../store/useDynamicFilterStore.js";
|
|
7
7
|
import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/RHFAutocomplete.js";
|
|
8
8
|
import { R as RHFAutocompleteAsync } from "../../../../hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js";
|
|
9
9
|
function SelectAsyncFilter() {
|
|
10
10
|
const { getLabel } = useModuleDictionary();
|
|
11
11
|
const field = useDynamicFilterStore((state) => state.popoverFilterData?.field);
|
|
12
|
+
const selectAsyncProps = field?.selectAsyncOptions;
|
|
13
|
+
const isMultiple = selectAsyncProps?.multiple ?? false;
|
|
14
|
+
const restritcOperatorsTo = field?.restritcOperatorsTo;
|
|
12
15
|
if (!field?.selectAsyncOptions?.endPoint) {
|
|
13
16
|
throw new Error("El filtro tipo Select requiere la configuración del Endpoint");
|
|
14
17
|
}
|
|
15
|
-
const autocompleteProps = field?.selectAsyncOptions;
|
|
16
18
|
const operators = useMemo(
|
|
17
|
-
() =>
|
|
19
|
+
() => (isMultiple ? SELECT_ASYNC_OPERATORS_MULTIPLE : SELECT_ASYNC_OPERATORS_SINGLE).map((o) => ({
|
|
18
20
|
id: o,
|
|
19
|
-
label: getLabel(
|
|
20
|
-
})),
|
|
21
|
-
[getLabel]
|
|
21
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${o}`)
|
|
22
|
+
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
23
|
+
[getLabel, isMultiple, restritcOperatorsTo]
|
|
22
24
|
);
|
|
23
25
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
24
26
|
/* @__PURE__ */ jsx(
|
|
@@ -30,16 +32,16 @@ function SelectAsyncFilter() {
|
|
|
30
32
|
options: operators,
|
|
31
33
|
getOptionLabel: (option) => option.label,
|
|
32
34
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
33
|
-
label: getLabel(
|
|
35
|
+
label: getLabel(DICCTIONARY.label_select_operator)
|
|
34
36
|
}
|
|
35
37
|
),
|
|
36
38
|
/* @__PURE__ */ jsx(
|
|
37
39
|
RHFAutocompleteAsync,
|
|
38
40
|
{
|
|
39
|
-
...
|
|
40
|
-
name: "formValueOperandsArray",
|
|
41
|
+
...selectAsyncProps,
|
|
42
|
+
name: isMultiple ? "formValueOperandsArray" : "formValueOperand1",
|
|
41
43
|
autoComplete: "off",
|
|
42
|
-
label: getLabel(
|
|
44
|
+
label: isMultiple ? getLabel(DICCTIONARY.label_select_async_operands_array) : getLabel(DICCTIONARY.label_select_async_operand1)
|
|
43
45
|
}
|
|
44
46
|
)
|
|
45
47
|
] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetLabelType } from '@m4l/core';
|
|
2
2
|
import { Formatters } from '@m4l/graphics';
|
|
3
|
-
import { DataTypeFilerLabels, FilterField, FilterFieldApplied, FilterValue, FormFilterValueSelect,
|
|
3
|
+
import { DataTypeFilerLabels, FilterField, FilterFieldApplied, FilterValue, FilterValueSelect, FormFilterValueSelect, OperandSelect, InitialFilterApplied } from '../../../types';
|
|
4
4
|
import { IFieldType, YupSchema } from '../FieldTypeInterface';
|
|
5
5
|
import { SelectFilter } from './index';
|
|
6
6
|
/**
|
|
@@ -9,7 +9,7 @@ import { SelectFilter } from './index';
|
|
|
9
9
|
* @param field Propiedades del field
|
|
10
10
|
* @returns FormOperandSelect[] operandArray filtrado con valores validados
|
|
11
11
|
*/
|
|
12
|
-
export declare function filterValidOperandsArraySelect(operandsArray:
|
|
12
|
+
export declare function filterValidOperandsArraySelect(operandsArray: OperandSelect[] | OperandSelect, _field: FilterField): (string | number)[];
|
|
13
13
|
/**
|
|
14
14
|
* SelectFilterHelpers es una clase que implementa la interfaz IFieldType
|
|
15
15
|
*/
|
|
@@ -17,20 +17,21 @@ export declare class SelectFilterHelpers implements IFieldType<FormFilterValueSe
|
|
|
17
17
|
getComponent(): typeof SelectFilter;
|
|
18
18
|
/**
|
|
19
19
|
* getDefaultFilter devuelve un filtro por defecto para un campo de selección.
|
|
20
|
+
* Cuando es initialized o fixed
|
|
20
21
|
*/
|
|
21
|
-
getDefaultFilter(
|
|
22
|
+
getDefaultFilter(fieldSelect: FilterField, fixed: boolean): FilterFieldApplied;
|
|
22
23
|
/**
|
|
23
24
|
* Función para obtener el valor en terminos de HookForm desde los ids de los values.
|
|
24
25
|
*/
|
|
25
|
-
getFormValue(
|
|
26
|
+
getFormValue(fieldSelect: FilterField, getLabel: GetLabelType, filterValueSelect?: FilterValue): FormFilterValueSelect;
|
|
26
27
|
/**
|
|
27
28
|
* getFilterFromFormValue convierte un valor de formulario en un valor de filtro.
|
|
28
29
|
*/
|
|
29
|
-
getFilterFromFormValue(formFilterValue: FormFilterValueSelect):
|
|
30
|
+
getFilterFromFormValue(formFilterValue: FormFilterValueSelect): FilterValueSelect;
|
|
30
31
|
/**
|
|
31
32
|
* getLabels devuelve las etiquetas para el filtro de selección.
|
|
32
33
|
*/
|
|
33
|
-
getLabels(filter: FilterFieldApplied, getLabel: GetLabelType, _formatters: Formatters,
|
|
34
|
+
getLabels(filter: FilterFieldApplied, getLabel: GetLabelType, _formatters: Formatters, fieldSelect: FilterField): DataTypeFilerLabels;
|
|
34
35
|
/**
|
|
35
36
|
* getSchema devuelve el esquema de validación de Yup para un filtro de selección.
|
|
36
37
|
*/
|
|
@@ -38,5 +39,5 @@ export declare class SelectFilterHelpers implements IFieldType<FormFilterValueSe
|
|
|
38
39
|
/**
|
|
39
40
|
* TODO: Documentar
|
|
40
41
|
*/
|
|
41
|
-
verifyFilter(filter: InitialFilterApplied,
|
|
42
|
+
verifyFilter(filter: InitialFilterApplied, fieldSelect?: FilterField): boolean;
|
|
42
43
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from "yup";
|
|
2
|
-
import {
|
|
3
|
-
import { g as getDynamicFilterDictionary } from "../../../dictionary.js";
|
|
2
|
+
import { d as SELECT_OPERATORS_MULTIPLE, e as SELECT_OPERATORS_SINGLE } from "../../../constants.js";
|
|
4
3
|
import { S as SelectFilter } from "./index.js";
|
|
4
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
5
5
|
function filterValidOperandsArraySelect(operandsArray, _field) {
|
|
6
6
|
const operandsArrayFormatted = Array.isArray(operandsArray) ? operandsArray : [operandsArray];
|
|
7
7
|
return operandsArrayFormatted?.filter((operand) => {
|
|
@@ -14,65 +14,124 @@ class SelectFilterHelpers {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* getDefaultFilter devuelve un filtro por defecto para un campo de selección.
|
|
17
|
+
* Cuando es initialized o fixed
|
|
17
18
|
*/
|
|
18
|
-
getDefaultFilter(
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
getDefaultFilter(fieldSelect, fixed) {
|
|
20
|
+
const field = fieldSelect;
|
|
21
|
+
const defaultOperandsArray = field.defaultOperandsArray ?? [];
|
|
22
|
+
const defaultOperand1 = field.defaultOperand1;
|
|
23
|
+
const isMultiple = field?.selectOptions?.multiple ?? false;
|
|
24
|
+
let dOperator;
|
|
25
|
+
let isSet = false;
|
|
26
|
+
let operandsArray = [];
|
|
27
|
+
if (isMultiple) {
|
|
28
|
+
dOperator = field.defaultOperator ?? "in";
|
|
29
|
+
isSet = fixed ? defaultOperandsArray !== null && defaultOperandsArray.length > 0 ? true : false : false;
|
|
30
|
+
if (field.defaultOperandsArray !== void 0 && Array.isArray(field.defaultOperandsArray)) {
|
|
31
|
+
operandsArray = filterValidOperandsArraySelect(field.defaultOperandsArray);
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
dOperator = field.defaultOperator ?? "e";
|
|
35
|
+
isSet = fixed ? defaultOperand1 !== null ? true : false : false;
|
|
36
|
+
}
|
|
37
|
+
const defaultCommonFilter = {
|
|
21
38
|
id: 0,
|
|
22
39
|
fieldType: "select",
|
|
23
40
|
field,
|
|
24
41
|
fixed,
|
|
25
|
-
isSet
|
|
26
|
-
operator:
|
|
27
|
-
operandsArray: []
|
|
42
|
+
isSet,
|
|
43
|
+
operator: dOperator
|
|
28
44
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
const defaultFilterMultiple = {
|
|
46
|
+
...defaultCommonFilter,
|
|
47
|
+
fieldType: "select",
|
|
48
|
+
multiple: true,
|
|
49
|
+
operandsArray
|
|
50
|
+
};
|
|
51
|
+
const defaultFilterSingle = {
|
|
52
|
+
...defaultCommonFilter,
|
|
53
|
+
fieldType: "select",
|
|
54
|
+
multiple: false,
|
|
55
|
+
operand1: defaultOperand1
|
|
56
|
+
};
|
|
57
|
+
return isMultiple ? defaultFilterMultiple : defaultFilterSingle;
|
|
34
58
|
}
|
|
35
59
|
/**
|
|
36
60
|
* Función para obtener el valor en terminos de HookForm desde los ids de los values.
|
|
37
61
|
*/
|
|
38
|
-
getFormValue(
|
|
39
|
-
const
|
|
62
|
+
getFormValue(fieldSelect, getLabel, filterValueSelect) {
|
|
63
|
+
const field = fieldSelect;
|
|
64
|
+
const filterValue = filterValueSelect ?? void 0;
|
|
40
65
|
const isMultiple = field?.selectOptions?.multiple ?? false;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
66
|
+
let formValueOperandsArray = void 0;
|
|
67
|
+
let formValueOperand1 = void 0;
|
|
68
|
+
let operator;
|
|
69
|
+
if (isMultiple) {
|
|
70
|
+
operator = filterValue ? filterValue.operator : field.defaultOperator ?? "in";
|
|
71
|
+
formValueOperandsArray = filterValueSelect?.operandsArray;
|
|
72
|
+
} else {
|
|
73
|
+
operator = filterValue ? filterValue.operator : field.defaultOperator ?? "e";
|
|
74
|
+
formValueOperand1 = filterValueSelect?.operand1;
|
|
75
|
+
}
|
|
76
|
+
const formCommon = {
|
|
44
77
|
fieldType: "select",
|
|
45
78
|
formValueOperator: {
|
|
46
79
|
id: operator,
|
|
47
|
-
label: getLabel(
|
|
48
|
-
}
|
|
80
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${operator}`)
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const formMultiple = {
|
|
84
|
+
...formCommon,
|
|
85
|
+
multiple: true,
|
|
49
86
|
formValueOperandsArray
|
|
50
87
|
};
|
|
88
|
+
const formSingle = {
|
|
89
|
+
...formCommon,
|
|
90
|
+
multiple: false,
|
|
91
|
+
formValueOperand1
|
|
92
|
+
};
|
|
93
|
+
return isMultiple ? formMultiple : formSingle;
|
|
51
94
|
}
|
|
52
95
|
/**
|
|
53
96
|
* getFilterFromFormValue convierte un valor de formulario en un valor de filtro.
|
|
54
97
|
*/
|
|
55
98
|
getFilterFromFormValue(formFilterValue) {
|
|
56
99
|
const operator = formFilterValue.formValueOperator.id;
|
|
57
|
-
const
|
|
58
|
-
|
|
100
|
+
const isMultiple = formFilterValue.multiple;
|
|
101
|
+
const filterCommon = {
|
|
59
102
|
fieldType: "select",
|
|
60
|
-
operator
|
|
61
|
-
|
|
103
|
+
operator
|
|
104
|
+
};
|
|
105
|
+
const filterMultiple = {
|
|
106
|
+
...filterCommon,
|
|
107
|
+
multiple: true,
|
|
108
|
+
operandsArray: formFilterValue.formValueOperandsArray
|
|
62
109
|
};
|
|
110
|
+
const filterSingle = {
|
|
111
|
+
...filterCommon,
|
|
112
|
+
operand1: formFilterValue.formValueOperand1
|
|
113
|
+
};
|
|
114
|
+
return isMultiple ? filterMultiple : filterSingle;
|
|
63
115
|
}
|
|
64
116
|
/**
|
|
65
117
|
* getLabels devuelve las etiquetas para el filtro de selección.
|
|
66
118
|
*/
|
|
67
|
-
getLabels(filter, getLabel, _formatters,
|
|
119
|
+
getLabels(filter, getLabel, _formatters, fieldSelect) {
|
|
120
|
+
const field = fieldSelect;
|
|
121
|
+
const isMultiple = field?.selectOptions?.multiple ?? false;
|
|
68
122
|
const operandsArray = filter.operandsArray;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
123
|
+
let labelOperands = "";
|
|
124
|
+
if (isMultiple) {
|
|
125
|
+
labelOperands = operandsArray?.reduce?.((label, operand) => {
|
|
126
|
+
const textLabel = field.selectOptions?.options.find((option) => option.id === operand)?.label || "";
|
|
127
|
+
return label ? `${label} | ${textLabel}` : textLabel;
|
|
128
|
+
}, "")?.toString() || "?";
|
|
129
|
+
} else {
|
|
130
|
+
labelOperands = (filter.operand1 ?? "?") + "";
|
|
131
|
+
}
|
|
73
132
|
return {
|
|
74
133
|
labelField: filter.field.label ?? getLabel(filter.field.dictionaryId),
|
|
75
|
-
labelOperator: getLabel(
|
|
134
|
+
labelOperator: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`),
|
|
76
135
|
labelOperands
|
|
77
136
|
};
|
|
78
137
|
}
|
|
@@ -81,37 +140,59 @@ class SelectFilterHelpers {
|
|
|
81
140
|
*/
|
|
82
141
|
getSchema(getLabel) {
|
|
83
142
|
return Yup.object({
|
|
84
|
-
formValueOperator: Yup.object().nullable().required(getLabel(
|
|
85
|
-
formValueOperandsArray: Yup.
|
|
86
|
-
|
|
143
|
+
formValueOperator: Yup.object().nullable().required(getLabel(DICCTIONARY.error_operator_required)),
|
|
144
|
+
formValueOperandsArray: Yup.mixed().when(["multiple"], {
|
|
145
|
+
is: true,
|
|
146
|
+
then: Yup.array().min(1, getLabel(DICCTIONARY.error_operand_required)).required(getLabel(DICCTIONARY.error_operand_required))
|
|
147
|
+
}),
|
|
148
|
+
formValueOperand1: Yup.mixed().when(["multiple"], {
|
|
149
|
+
is: false,
|
|
150
|
+
then: Yup.mixed().test("is-string-or-number", getLabel(DICCTIONARY.error_operand_required), (value) => {
|
|
151
|
+
return typeof value === "string" || typeof value === "number";
|
|
152
|
+
}).required(getLabel(DICCTIONARY.error_operand_required))
|
|
87
153
|
})
|
|
88
154
|
});
|
|
89
155
|
}
|
|
90
156
|
/**
|
|
91
157
|
* TODO: Documentar
|
|
92
158
|
*/
|
|
93
|
-
verifyFilter(filter,
|
|
159
|
+
verifyFilter(filter, fieldSelect) {
|
|
160
|
+
const field = fieldSelect;
|
|
161
|
+
const isMultiple = field?.selectOptions?.multiple ?? false;
|
|
94
162
|
if (typeof filter.operator !== "string") {
|
|
95
163
|
return false;
|
|
96
164
|
}
|
|
97
165
|
if (!field) {
|
|
98
166
|
return false;
|
|
99
167
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
filter.operandsArray
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
168
|
+
if (isMultiple) {
|
|
169
|
+
if (SELECT_OPERATORS_MULTIPLE.findIndex((f) => f === filter.operator) === -1) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if (!filter.operandsArray || typeof filter.operandsArray !== "object") {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (Array.isArray(filter.operandsArray) && filter.operandsArray.length === 0) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
const validOperandsArray = filterValidOperandsArraySelect(
|
|
179
|
+
filter.operandsArray
|
|
180
|
+
);
|
|
181
|
+
if (!validOperandsArray || validOperandsArray?.length === 0) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
if (SELECT_OPERATORS_SINGLE.findIndex((f) => f === filter.operator) === -1) {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
if (!filter.operand1 || typeof filter.operand1 !== "string" && typeof filter.operand1 !== "number") {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
111
191
|
}
|
|
112
192
|
return true;
|
|
113
193
|
}
|
|
114
194
|
}
|
|
115
195
|
export {
|
|
116
|
-
SelectFilterHelpers as S
|
|
196
|
+
SelectFilterHelpers as S,
|
|
197
|
+
filterValidOperandsArraySelect as f
|
|
117
198
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { d as SELECT_OPERATORS_MULTIPLE, e as SELECT_OPERATORS_SINGLE } from "../../../constants.js";
|
|
5
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
6
6
|
import { u as useDynamicFilterStore } from "../../../store/useDynamicFilterStore.js";
|
|
7
7
|
import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/RHFAutocomplete.js";
|
|
8
8
|
import { R as RHFSelect } from "../../../../hook-form/RHFSelect/RHFSelect.js";
|
|
@@ -10,12 +10,14 @@ function SelectFilter() {
|
|
|
10
10
|
const { getLabel } = useModuleDictionary();
|
|
11
11
|
const field = useDynamicFilterStore((state) => state.popoverFilterData?.field);
|
|
12
12
|
const selectProps = field?.selectOptions;
|
|
13
|
+
const isMultiple = selectProps?.multiple ?? false;
|
|
14
|
+
const restritcOperatorsTo = field?.restritcOperatorsTo;
|
|
13
15
|
const operators = useMemo(
|
|
14
|
-
() =>
|
|
16
|
+
() => (isMultiple ? SELECT_OPERATORS_MULTIPLE : SELECT_OPERATORS_SINGLE).map((o) => ({
|
|
15
17
|
id: o,
|
|
16
|
-
label: getLabel(
|
|
17
|
-
})),
|
|
18
|
-
[getLabel]
|
|
18
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${o}`)
|
|
19
|
+
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
20
|
+
[getLabel, isMultiple, restritcOperatorsTo]
|
|
19
21
|
);
|
|
20
22
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
21
23
|
/* @__PURE__ */ jsx(
|
|
@@ -27,7 +29,7 @@ function SelectFilter() {
|
|
|
27
29
|
options: operators,
|
|
28
30
|
getOptionLabel: (option) => option.label,
|
|
29
31
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
30
|
-
label: getLabel(
|
|
32
|
+
label: getLabel(DICCTIONARY.label_select_operator)
|
|
31
33
|
}
|
|
32
34
|
),
|
|
33
35
|
/* @__PURE__ */ jsx(
|
|
@@ -35,8 +37,8 @@ function SelectFilter() {
|
|
|
35
37
|
{
|
|
36
38
|
...selectProps,
|
|
37
39
|
options: field?.selectOptions?.options || [],
|
|
38
|
-
name: "formValueOperandsArray",
|
|
39
|
-
label: getLabel(
|
|
40
|
+
name: isMultiple ? "formValueOperandsArray" : "formValueOperand1",
|
|
41
|
+
label: isMultiple ? getLabel(DICCTIONARY.label_select_operands_array) : getLabel(DICCTIONARY.label_select_operand1)
|
|
40
42
|
}
|
|
41
43
|
)
|
|
42
44
|
] });
|