@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,6 +1,6 @@
|
|
|
1
1
|
import * as Yup from "yup";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { f as STRING_OPERATORS } from "../../../constants.js";
|
|
3
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
4
4
|
import { S as StringFilter } from "./index.js";
|
|
5
5
|
class StringFilterHelpers {
|
|
6
6
|
getComponent() {
|
|
@@ -11,12 +11,16 @@ class StringFilterHelpers {
|
|
|
11
11
|
*/
|
|
12
12
|
getDefaultFilter(field, fixed) {
|
|
13
13
|
const defaultOperand1 = field.defaultOperand1;
|
|
14
|
+
let isSet = false;
|
|
15
|
+
if (fixed) {
|
|
16
|
+
isSet = defaultOperand1 !== null ? true : false;
|
|
17
|
+
}
|
|
14
18
|
const defaultFilter = {
|
|
15
19
|
id: 0,
|
|
16
20
|
fieldType: "string",
|
|
17
21
|
field,
|
|
18
22
|
fixed,
|
|
19
|
-
isSet
|
|
23
|
+
isSet,
|
|
20
24
|
operator: "c",
|
|
21
25
|
operand1: ""
|
|
22
26
|
};
|
|
@@ -48,7 +52,7 @@ class StringFilterHelpers {
|
|
|
48
52
|
fieldType: "string",
|
|
49
53
|
formValueOperator: {
|
|
50
54
|
id: operator,
|
|
51
|
-
label: getLabel(
|
|
55
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${operator}`)
|
|
52
56
|
},
|
|
53
57
|
formValueOperand1
|
|
54
58
|
};
|
|
@@ -60,7 +64,7 @@ class StringFilterHelpers {
|
|
|
60
64
|
const labelOperands = filter.operand1 !== void 0 ? filter.operand1 + "" : "";
|
|
61
65
|
return {
|
|
62
66
|
labelField: filter.field.label ?? getLabel(filter.field.dictionaryId),
|
|
63
|
-
labelOperator: getLabel(
|
|
67
|
+
labelOperator: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`),
|
|
64
68
|
labelOperands
|
|
65
69
|
};
|
|
66
70
|
}
|
|
@@ -69,9 +73,9 @@ class StringFilterHelpers {
|
|
|
69
73
|
*/
|
|
70
74
|
getSchema(getLabel) {
|
|
71
75
|
return Yup.object({
|
|
72
|
-
formValueOperator: Yup.object().nullable().required(getLabel(
|
|
76
|
+
formValueOperator: Yup.object().nullable().required(getLabel(DICCTIONARY.error_operator_required)),
|
|
73
77
|
formValueOperand1: Yup.string().required(
|
|
74
|
-
getLabel(
|
|
78
|
+
getLabel(DICCTIONARY.error_operand_required)
|
|
75
79
|
)
|
|
76
80
|
});
|
|
77
81
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
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 { f as STRING_OPERATORS } from "../../../constants.js";
|
|
5
|
+
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
6
|
+
import { u as useDynamicFilterStore } from "../../../store/useDynamicFilterStore.js";
|
|
6
7
|
import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/RHFAutocomplete.js";
|
|
7
8
|
import { R as RHFTextField } from "../../../../hook-form/RHFTextField/RHFTextField.js";
|
|
8
9
|
function StringFilter() {
|
|
9
10
|
const { getLabel } = useModuleDictionary();
|
|
11
|
+
const field = useDynamicFilterStore((state) => state.popoverFilterData?.field);
|
|
12
|
+
const restritcOperatorsTo = field?.restritcOperatorsTo;
|
|
10
13
|
const operators = useMemo(
|
|
11
14
|
() => STRING_OPERATORS.map((o) => ({
|
|
12
15
|
id: o,
|
|
13
|
-
label: getLabel(
|
|
14
|
-
})),
|
|
15
|
-
[getLabel]
|
|
16
|
+
label: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${o}`)
|
|
17
|
+
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
18
|
+
[getLabel, restritcOperatorsTo]
|
|
16
19
|
);
|
|
17
20
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
18
21
|
/* @__PURE__ */ jsx(
|
|
@@ -24,14 +27,14 @@ function StringFilter() {
|
|
|
24
27
|
options: operators,
|
|
25
28
|
getOptionLabel: (option) => option.label,
|
|
26
29
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
27
|
-
label: getLabel(
|
|
30
|
+
label: getLabel(DICCTIONARY.label_operator_string)
|
|
28
31
|
}
|
|
29
32
|
),
|
|
30
33
|
/* @__PURE__ */ jsx(
|
|
31
34
|
RHFTextField,
|
|
32
35
|
{
|
|
33
36
|
name: "formValueOperand1",
|
|
34
|
-
label: getLabel(
|
|
37
|
+
label: getLabel(DICCTIONARY.label_operand1_string)
|
|
35
38
|
}
|
|
36
39
|
)
|
|
37
40
|
] });
|
|
@@ -8,4 +8,4 @@ import { StringFilterHelpers } from './StringFilter/helpers';
|
|
|
8
8
|
/**
|
|
9
9
|
* fieldFactory es una función que devuelve un helper para un tipo de campo específico.
|
|
10
10
|
*/
|
|
11
|
-
export declare function fieldFactory(type: FieldType): SelectAsyncFilterHelpers | BooleanFilterHelpers | DateTimeFilterHelpers | NumberFilterHelpers |
|
|
11
|
+
export declare function fieldFactory(type: FieldType): SelectAsyncFilterHelpers | SelectFilterHelpers | BooleanFilterHelpers | DateTimeFilterHelpers | NumberFilterHelpers | StringFilterHelpers;
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
|
|
4
4
|
import { u as useFilterActions } from "./useFilterActions.js";
|
|
5
|
+
import { a as DICCTIONARY } from "../../dictionary.js";
|
|
5
6
|
import { b as ActionsStyled, c as ActionsClearButtonStyled, d as ActionsSubmitButtonStyled } from "../../slots/dynamicFilterSlots.js";
|
|
6
7
|
function FilterActions() {
|
|
7
8
|
const {
|
|
@@ -22,7 +23,7 @@ function FilterActions() {
|
|
|
22
23
|
icon: clearIconUrl,
|
|
23
24
|
size,
|
|
24
25
|
onClick: onClickClearFilters,
|
|
25
|
-
tooltip: getLabel(
|
|
26
|
+
tooltip: getLabel(DICCTIONARY.tooltip_clear_filters),
|
|
26
27
|
ownerState: {}
|
|
27
28
|
}
|
|
28
29
|
),
|
|
@@ -12,7 +12,7 @@ declare function useFilterActions(): {
|
|
|
12
12
|
canShowRemoveAction: boolean;
|
|
13
13
|
onClickClearFilters: () => void;
|
|
14
14
|
onClickFilter: VoidFunction;
|
|
15
|
-
filterButtonDictionaryTooltip:
|
|
15
|
+
filterButtonDictionaryTooltip: "dynamic_filter.filter_tooltip_refresh" | "dynamic_filter.filter_tooltip_dirty" | "dynamic_filter.filter_tooltip_invalid";
|
|
16
16
|
ownerState: {
|
|
17
17
|
isValid: boolean;
|
|
18
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEnvironment } from "@m4l/core";
|
|
2
|
-
import {
|
|
2
|
+
import { a as DICCTIONARY } from "../../dictionary.js";
|
|
3
3
|
import { u as useDynamicFilterStore } from "../../store/useDynamicFilterStore.js";
|
|
4
4
|
const ASSETS_URL = "frontend/components/dynamic_filter/assets/icons";
|
|
5
5
|
const ASSETS = {
|
|
@@ -21,9 +21,7 @@ function useFilterActions() {
|
|
|
21
21
|
const filterIconUrl = `${host_static_assets}/${environment_assets}/${ASSETS_URL}/${automatic ? ASSETS.refresh : ASSETS.search}`;
|
|
22
22
|
const clearIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/close.svg`;
|
|
23
23
|
const canShowRemoveAction = appliedFilters.findIndex((f) => !f.fixed) > -1;
|
|
24
|
-
const filterButtonDictionaryTooltip =
|
|
25
|
-
isValid ? isDirty ? DICCTIONARY.filter_tooltip_dirty : DICCTIONARY.filter_tooltip_refresh : DICCTIONARY.filter_tooltip_invalid
|
|
26
|
-
);
|
|
24
|
+
const filterButtonDictionaryTooltip = isValid ? isDirty ? DICCTIONARY.filter_tooltip_dirty : DICCTIONARY.filter_tooltip_refresh : DICCTIONARY.filter_tooltip_invalid;
|
|
27
25
|
return {
|
|
28
26
|
filterIconUrl,
|
|
29
27
|
clearIconUrl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { A as ALL_FIELD } from "../../constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as DICCTIONARY } from "../../dictionary.js";
|
|
5
5
|
import { u as useDynamicFilterStore } from "../../store/useDynamicFilterStore.js";
|
|
6
6
|
function useInputFilter() {
|
|
7
7
|
const [selectedFieldIndex, setSelectedFieldIndex] = useState(-1);
|
|
@@ -123,7 +123,7 @@ function useInputFilter() {
|
|
|
123
123
|
/**
|
|
124
124
|
* Texto de placeholder del inputFilter
|
|
125
125
|
*/
|
|
126
|
-
inputPlaceHolder: getLabel(
|
|
126
|
+
inputPlaceHolder: getLabel(DICCTIONARY.input_placeholder),
|
|
127
127
|
/**
|
|
128
128
|
* Texto del inputFilter
|
|
129
129
|
*/
|
|
@@ -17,11 +17,11 @@ declare function usePopoverFilter(): {
|
|
|
17
17
|
filterFormValue: FormFilterValue;
|
|
18
18
|
formFilter: FormFilterFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
|
|
3
3
|
import { u as usePopoverMenuFields } from "./usePopoverMenuFields.js";
|
|
4
4
|
import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
|
|
5
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
6
|
+
import { a as DICCTIONARY } from "../../dictionary.js";
|
|
5
7
|
import { u as usePopoverContainer } from "../../../../hooks/usePopoverContainer/usePopoverContainer.js";
|
|
6
8
|
import { l as PopoverMenuStyled } from "../../slots/dynamicFilterSlots.js";
|
|
7
9
|
function PopoverMenuFields(props) {
|
|
8
10
|
const { fields, selectFieldIndex } = props;
|
|
9
11
|
const { elementRef, handleOpenPopUpClickItem, handleClosePopover, getItemLabel, isOpenPopoverMenuFields } = usePopoverMenuFields();
|
|
10
12
|
const anchorEl = elementRef?.current;
|
|
13
|
+
const { getLabel } = useModuleDictionary();
|
|
11
14
|
const popoverContainerRef = usePopoverContainer();
|
|
12
15
|
const { size } = useDynamicFilterBase();
|
|
13
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
14
17
|
PopoverMenuStyled,
|
|
15
18
|
{
|
|
16
19
|
disableAutoFocus: true,
|
|
@@ -23,18 +26,29 @@ function PopoverMenuFields(props) {
|
|
|
23
26
|
anchorEl,
|
|
24
27
|
ownerState: {},
|
|
25
28
|
container: popoverContainerRef.current,
|
|
26
|
-
children:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
children: [
|
|
30
|
+
isOpenPopoverMenuFields && fields.map((field, index) => /* @__PURE__ */ jsx(
|
|
31
|
+
MenuItem,
|
|
32
|
+
{
|
|
33
|
+
dense: true,
|
|
34
|
+
size,
|
|
35
|
+
selected: index === selectFieldIndex,
|
|
36
|
+
onClick: (event) => handleOpenPopUpClickItem(event, field),
|
|
37
|
+
startIcon: field.urlIcon,
|
|
38
|
+
label: getItemLabel(field)
|
|
39
|
+
},
|
|
40
|
+
`menu_action_${getItemLabel(field)}`
|
|
41
|
+
)),
|
|
42
|
+
isOpenPopoverMenuFields && fields.length === 0 && /* @__PURE__ */ jsx(
|
|
43
|
+
MenuItem,
|
|
44
|
+
{
|
|
45
|
+
dense: true,
|
|
46
|
+
size,
|
|
47
|
+
label: getLabel(DICCTIONARY.label_no_fields_available),
|
|
48
|
+
disabled: true
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
38
52
|
}
|
|
39
53
|
);
|
|
40
54
|
}
|
|
@@ -14,17 +14,19 @@ export type StringOperator = 'c' | 'nc';
|
|
|
14
14
|
export type NumberOperator = OperatorB | 'e' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
15
15
|
export type BooleanOperator = 'e' | 'ne';
|
|
16
16
|
export type DateTimeOperator = OperatorB | 'e' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
17
|
-
export type SelectOperator = 'in' | 'nin';
|
|
17
|
+
export type SelectOperator = 'in' | 'nin' | 'e' | 'ne';
|
|
18
|
+
export type SelectOperatorAsync = 'in' | 'nin' | 'e' | 'ne';
|
|
18
19
|
export type FieldPresence = 'initialized' | 'fixed' | 'optional';
|
|
19
|
-
export type
|
|
20
|
-
export type
|
|
20
|
+
export type OperandSelectAsync = Record<string, any>;
|
|
21
|
+
export type OperandSelect = string | number;
|
|
21
22
|
/**
|
|
22
23
|
* Posibles valores para el operandsArray para el caso del select o otros fields
|
|
23
24
|
*/
|
|
24
|
-
export type
|
|
25
|
-
export type
|
|
26
|
-
export type FieldTypeOperator<T extends FieldType> = T extends 'boolean' ? BooleanOperator : T extends 'datetime' ? DateTimeOperator : T extends 'number' ? NumberOperator : T extends 'select' ? SelectOperator : T extends 'string' ? StringOperator : T;
|
|
27
|
-
export type FieldTypeOperand<T extends FieldType> = T extends 'boolean' ? boolean : T extends 'datetime' ? Date : T extends 'number' ? number : T extends 'string' ? string : T extends 'select' ?
|
|
25
|
+
export type OperandsArraySelectAsync = Array<OperandSelectAsync>;
|
|
26
|
+
export type OperandsSelectArray = Array<OperandSelect>;
|
|
27
|
+
export type FieldTypeOperator<T extends FieldType> = T extends 'boolean' ? BooleanOperator : T extends 'datetime' ? DateTimeOperator : T extends 'number' ? NumberOperator : T extends 'select' ? SelectOperator : T extends 'selectAsync' ? SelectOperatorAsync : T extends 'string' ? StringOperator : T;
|
|
28
|
+
export type FieldTypeOperand<T extends FieldType> = T extends 'boolean' ? boolean : T extends 'datetime' ? Date : T extends 'number' ? number : T extends 'string' ? string : T extends 'select' ? OperandSelect : T extends 'selectAsync' ? OperandSelectAsync : FieldType;
|
|
29
|
+
export type FieldTypeOperandsArray<T extends FieldType> = T extends 'boolean' ? never : T extends 'datetime' ? never : T extends 'number' ? never : T extends 'string' ? never : T extends 'select' ? OperandsSelectArray : T extends 'selectAsync' ? OperandsArraySelectAsync : never;
|
|
28
30
|
type SelectAsyncOptions<TOption = any> = Pick<RHFAutocompleteAsyncBaseProps<TOption>, 'type' | 'endPoint' | 'responseToCamelCase' | 'multiple' | 'autoComplete' | 'autoCapitalize' | 'parms' | 'timeout'> & {
|
|
29
31
|
getOptionLabel: (option: TOption) => string;
|
|
30
32
|
isOptionEqualToValue: (options: TOption | TOption[], value: TOption) => boolean;
|
|
@@ -36,11 +38,12 @@ export interface FieldBase<T extends FieldType = FieldType, TOption = any> {
|
|
|
36
38
|
type: T;
|
|
37
39
|
multiple?: boolean;
|
|
38
40
|
presence?: FieldPresence;
|
|
41
|
+
restritcOperatorsTo?: Maybe<FieldTypeOperator<T>[]>;
|
|
39
42
|
urlIcon: string;
|
|
40
43
|
defaultOperator?: Maybe<FieldTypeOperator<T>>;
|
|
41
44
|
defaultOperand1?: Maybe<FieldTypeOperand<T>>;
|
|
42
45
|
defaultOperand2?: Maybe<FieldTypeOperand<T>>;
|
|
43
|
-
defaultOperandsArray?: Maybe<
|
|
46
|
+
defaultOperandsArray?: Maybe<FieldTypeOperandsArray<T>>;
|
|
44
47
|
selectOptions?: SelectOptions;
|
|
45
48
|
selectAsyncOptions?: SelectAsyncOptions<TOption>;
|
|
46
49
|
}
|
|
@@ -73,7 +76,7 @@ export interface FilterValueBase<T extends FieldType = FieldType> {
|
|
|
73
76
|
operator: Operator;
|
|
74
77
|
operand1?: Maybe<OperandType>;
|
|
75
78
|
operand2?: Maybe<OperandType>;
|
|
76
|
-
operandsArray?: T extends 'selectAsync' ?
|
|
79
|
+
operandsArray?: T extends 'selectAsync' ? OperandsArraySelectAsync : T extends 'select' ? OperandsSelectArray : never;
|
|
77
80
|
}
|
|
78
81
|
export interface FilterValueBoolean extends FilterValueBase<'boolean'> {
|
|
79
82
|
fieldType: 'boolean';
|
|
@@ -109,16 +112,35 @@ export interface FilterValueString extends FilterValueBase<'string'> {
|
|
|
109
112
|
operator: StringOperator;
|
|
110
113
|
operand1: string;
|
|
111
114
|
}
|
|
112
|
-
export interface
|
|
115
|
+
export interface FilterValueSelectMultipleAsync extends FilterValueBase<'selectAsync'> {
|
|
113
116
|
fieldType: 'selectAsync';
|
|
117
|
+
multiple: true;
|
|
114
118
|
operator: SelectOperator;
|
|
115
|
-
|
|
119
|
+
operand1: never;
|
|
120
|
+
operandsArray: OperandsArraySelectAsync;
|
|
116
121
|
}
|
|
117
|
-
export interface
|
|
122
|
+
export interface FilterValueSelectSingleAsync extends FilterValueBase<'selectAsync'> {
|
|
123
|
+
fieldType: 'selectAsync';
|
|
124
|
+
operator: SelectOperator;
|
|
125
|
+
operand1: OperandSelectAsync;
|
|
126
|
+
operandsArray: never;
|
|
127
|
+
}
|
|
128
|
+
export type FilterValueSelectAsync = FilterValueSelectMultipleAsync | FilterValueSelectSingleAsync;
|
|
129
|
+
export interface FilterValueSelectSingle extends FilterValueBase<'select'> {
|
|
130
|
+
fieldType: 'select';
|
|
131
|
+
multiple: false;
|
|
132
|
+
operator: SelectOperator;
|
|
133
|
+
operand1: OperandSelect;
|
|
134
|
+
operandsArray: never;
|
|
135
|
+
}
|
|
136
|
+
export interface FilterValueSelectMultiple extends FilterValueBase<'select'> {
|
|
118
137
|
fieldType: 'select';
|
|
138
|
+
multiple: true;
|
|
119
139
|
operator: SelectOperator;
|
|
120
|
-
|
|
140
|
+
operand1: never;
|
|
141
|
+
operandsArray: OperandsSelectArray;
|
|
121
142
|
}
|
|
143
|
+
export type FilterValueSelect = FilterValueSelectSingle | FilterValueSelectMultiple;
|
|
122
144
|
/**
|
|
123
145
|
* Valor de un filtro sobrecargado para cada tipo de dato
|
|
124
146
|
*/
|
|
@@ -165,7 +187,7 @@ export type FormOperandBoolean = {
|
|
|
165
187
|
export type FormOperandDateTime = Date;
|
|
166
188
|
export type FormOperandNumber = number;
|
|
167
189
|
export type FormOperandString = string;
|
|
168
|
-
export type FormOperand = FormOperandBoolean | FormOperandDateTime | FormOperandNumber | FormOperandString |
|
|
190
|
+
export type FormOperand = FormOperandBoolean | FormOperandDateTime | FormOperandNumber | FormOperandString | OperandSelectAsync | OperandSelect;
|
|
169
191
|
/**
|
|
170
192
|
* Base para el tipado de overloading de los valor de un filtro
|
|
171
193
|
*/
|
|
@@ -195,16 +217,36 @@ export interface FormFilterValueString extends FormFilterValueBase {
|
|
|
195
217
|
formValueOperator: FormOperator<StringOperator>;
|
|
196
218
|
formValueOperand1: string;
|
|
197
219
|
}
|
|
198
|
-
export interface
|
|
220
|
+
export interface FormFilterValueSelectAsyncMultiple extends FormFilterValueBase {
|
|
221
|
+
fieldType: 'selectAsync';
|
|
222
|
+
multiple: true;
|
|
223
|
+
formValueOperator: FormOperator<SelectOperatorAsync>;
|
|
224
|
+
formValueOperandsArray: OperandsArraySelectAsync;
|
|
225
|
+
formValueOperand1: never;
|
|
226
|
+
}
|
|
227
|
+
export interface FormFilterValueSelectAsyncSingle extends FormFilterValueBase {
|
|
199
228
|
fieldType: 'selectAsync';
|
|
229
|
+
multiple: false;
|
|
230
|
+
formValueOperator: FormOperator<SelectOperatorAsync>;
|
|
231
|
+
formValueOperand1: OperandSelectAsync;
|
|
232
|
+
formValueOperandsArray: never;
|
|
233
|
+
}
|
|
234
|
+
export type FormFilterValueSelectAsync = FormFilterValueSelectAsyncMultiple | FormFilterValueSelectAsyncSingle;
|
|
235
|
+
export interface FormFilterValueSelectMultiple extends FormFilterValueBase {
|
|
236
|
+
fieldType: 'select';
|
|
237
|
+
multiple: true;
|
|
200
238
|
formValueOperator: FormOperator<SelectOperator>;
|
|
201
|
-
|
|
239
|
+
formValueOperand1: never;
|
|
240
|
+
formValueOperandsArray: Array<OperandSelect> | OperandSelect;
|
|
202
241
|
}
|
|
203
|
-
export interface
|
|
242
|
+
export interface FormFilterValueSelectSingle extends FormFilterValueBase {
|
|
204
243
|
fieldType: 'select';
|
|
244
|
+
multiple: false;
|
|
205
245
|
formValueOperator: FormOperator<SelectOperator>;
|
|
206
|
-
|
|
246
|
+
formValueOperand1: OperandSelect;
|
|
247
|
+
formValueOperandsArray: never;
|
|
207
248
|
}
|
|
249
|
+
export type FormFilterValueSelect = FormFilterValueSelectMultiple | FormFilterValueSelectSingle;
|
|
208
250
|
/**
|
|
209
251
|
* Valor de un filtro sobrecargado para cada tipo de dato
|
|
210
252
|
*/
|
|
@@ -15,6 +15,7 @@ export declare const DICCTIONARY: {
|
|
|
15
15
|
readonly operator_asc: "operator_asc";
|
|
16
16
|
readonly operator_desc: "operator_desc";
|
|
17
17
|
readonly label_boolean_operand1: "label_boolean_operand1";
|
|
18
|
+
readonly label_no_fields_available: "label_no_fields_available";
|
|
18
19
|
};
|
|
19
20
|
export type TypeDictionary = typeof DICCTIONARY;
|
|
20
21
|
/**
|
|
@@ -8,15 +8,11 @@ function getDynamicSortComponentsDictionary() {
|
|
|
8
8
|
}
|
|
9
9
|
const DICCTIONARY = {
|
|
10
10
|
input_placeholder: "input_placeholder",
|
|
11
|
-
label_ascending: "Ascending",
|
|
12
|
-
label_descending: "Descending",
|
|
13
11
|
sort_tooltip_refresh: "sort_tooltip_refresh",
|
|
14
12
|
sort_tooltip_dirty: "sort_tooltip_dirty",
|
|
15
13
|
sort_tooltip_invalid: "sort_tooltip_invalid",
|
|
16
14
|
tooltip_clear_sort: "tooltip_clear_sort",
|
|
17
|
-
|
|
18
|
-
operator_desc: "operator_desc",
|
|
19
|
-
label_boolean_operand1: "label_boolean_operand1"
|
|
15
|
+
label_no_fields_available: "label_no_fields_available"
|
|
20
16
|
};
|
|
21
17
|
const getDynamicSortDictionary = (key) => {
|
|
22
18
|
return `${DYNAMICSORT_DICTIONARY_ID}.${key}`;
|
|
@@ -2,10 +2,10 @@ import { styled } from "@mui/material/styles";
|
|
|
2
2
|
import { d as dynamicSortStyles } from "../DynamicSort.styles.js";
|
|
3
3
|
import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../constants.js";
|
|
4
4
|
import { D as DynamicSortSlots } from "./SlotsEnum.js";
|
|
5
|
+
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
5
6
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.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
|
-
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
9
9
|
import { P as Popover } from "../../mui_extended/Popover/Popover.js";
|
|
10
10
|
const RootStyled = styled("div", {
|
|
11
11
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef, useRef, useImperativeHandle, useEffect, createContext } from "react";
|
|
4
4
|
import { useStore } from "zustand";
|
|
5
5
|
import { shallow } from "zustand/shallow";
|
|
6
6
|
import { f as formatToInitialSorts } from "../helpers/formatToInitialSorts.js";
|
|
@@ -4,11 +4,11 @@ import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoo
|
|
|
4
4
|
import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../../constants.js";
|
|
5
5
|
import { u as useDynamicSortBase } from "./useDynamicSortBase.js";
|
|
6
6
|
import { R as RootStyled, I as InnerContainerStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
|
-
import { D as DynamicSortSlots } from "../../slots/SlotsEnum.js";
|
|
8
7
|
import { I as InputSort } from "../InputSort/InputSort.js";
|
|
9
8
|
import { A as AppliedSorts } from "../AppliedSorts/AppliedSorts.js";
|
|
10
9
|
import { S as SortActions } from "../SortActions/SortActions.js";
|
|
11
10
|
import { P as PopoverSort } from "../PopoverSort/PopoverSort.js";
|
|
11
|
+
import { D as DynamicSortSlots } from "../../slots/SlotsEnum.js";
|
|
12
12
|
function DynamicSortBase() {
|
|
13
13
|
const { ownerState, dataTestId } = useDynamicSortBase();
|
|
14
14
|
const classRoot = getComponentSlotRoot(DYNAMIC_SORT_KEY_COMPONENT);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
3
3
|
import { u as usePopoverMenuFields } from "./usePopoverMenuFields.js";
|
|
4
4
|
import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
|
|
5
5
|
import { I as Icon } from "../../../Icon/Icon.js";
|
|
6
|
+
import { D as DICCTIONARY } from "../../dictionary.js";
|
|
7
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
6
8
|
import { P as PopoverMenuStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
9
|
import { u as usePopoverContainer } from "../../../../hooks/usePopoverContainer/usePopoverContainer.js";
|
|
8
10
|
function PopoverMenuFields(props) {
|
|
@@ -10,8 +12,9 @@ function PopoverMenuFields(props) {
|
|
|
10
12
|
const { elementRef, handleOpenPopUpClickItem, handleClosePopover, getItemLabel, isOpenPopoverMenuFields } = usePopoverMenuFields();
|
|
11
13
|
const { size } = useDynamicSortBase();
|
|
12
14
|
const anchorEl = elementRef?.current;
|
|
15
|
+
const { getLabel } = useModuleDictionary();
|
|
13
16
|
const popoverContainerRef = usePopoverContainer();
|
|
14
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
15
18
|
PopoverMenuStyled,
|
|
16
19
|
{
|
|
17
20
|
disableAutoFocus: true,
|
|
@@ -24,18 +27,29 @@ function PopoverMenuFields(props) {
|
|
|
24
27
|
anchorEl,
|
|
25
28
|
ownerState: {},
|
|
26
29
|
container: popoverContainerRef.current,
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
children: [
|
|
31
|
+
isOpenPopoverMenuFields && fields.map((field, index) => /* @__PURE__ */ jsx(
|
|
32
|
+
MenuItem,
|
|
33
|
+
{
|
|
34
|
+
startIcon: /* @__PURE__ */ jsx(Icon, { size, src: field.urlIcon }),
|
|
35
|
+
label: getItemLabel(field),
|
|
36
|
+
dense: true,
|
|
37
|
+
size,
|
|
38
|
+
selected: index === selectFieldIndex,
|
|
39
|
+
onClick: (event) => handleOpenPopUpClickItem(event, field)
|
|
40
|
+
},
|
|
41
|
+
`menu_action_${getItemLabel(field)}`
|
|
42
|
+
)),
|
|
43
|
+
isOpenPopoverMenuFields && fields.length === 0 && /* @__PURE__ */ jsx(
|
|
44
|
+
MenuItem,
|
|
45
|
+
{
|
|
46
|
+
dense: true,
|
|
47
|
+
size,
|
|
48
|
+
label: getLabel(DICCTIONARY.label_no_fields_available),
|
|
49
|
+
disabled: true
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
39
53
|
}
|
|
40
54
|
);
|
|
41
55
|
}
|
|
@@ -17,11 +17,11 @@ declare function usePopoverSort(): {
|
|
|
17
17
|
sortFormValue: import('../../types').FormSortValueBase;
|
|
18
18
|
formSort: FormSortFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useMemo, useState, useRef, useEffect, useCallback } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { i as isEqualLayout, c as cloneLayout, g as getLayoutItem, a as cloneLayoutItem, b as getLayoutItemH, m as moveElement, d as compact, w as withLayoutItem, e as bottom,
|
|
4
|
+
import { n as noop, i as isEqualLayout, c as cloneLayout, g as getLayoutItem, a as cloneLayoutItem, b as getLayoutItemH, m as moveElement, d as compact, w as withLayoutItem, e as bottom, f as getAllCollisions } from "./utils.js";
|
|
5
5
|
import { M as MemonizedGridItem } from "./subcomponents/GridItem/index.js";
|
|
6
6
|
import { G as GridLayoutRoot } from "./styles.js";
|
|
7
7
|
import { D as DEFAULT_COLS, a as DEFAULT_CONTAINER_PADDING, b as DEFAULT_MARGIN, c as DEFAULT_ROW_HEIGHT, d as DEFAULT_COLAPSED_HEIGHT, e as DEFAULT_CONTAINER_WIDTH, f as DEFAULT_CONTAINER_HEIGHT, g as DEFAULT_TRANSFORM_SCALE } from "./constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { useRef, useEffect, useState, useCallback, useMemo } from "react";
|
|
3
3
|
import { DraggableCore } from "react-draggable";
|
|
4
|
-
import { h as getH,
|
|
4
|
+
import { h as getH, s as setTransform, j as setTopLeft, p as perc } from "../../utils.js";
|
|
5
5
|
import { c as calcXY, a as calcGridItemWHPx, b as calcGridColWidth, d as calcWH, e as clamp, f as calcGridItemPosition } from "../../calculateUtils.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { deepEqual } from "fast-equals";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as DEFAULT_ROW_HEIGHT, h as DEFAULT_RESPONSIVE_BREAKPOINTS, a as DEFAULT_CONTAINER_PADDING, b as DEFAULT_MARGIN, i as DEFAULT_RESPONSIVE_COLS, d as DEFAULT_COLAPSED_HEIGHT } from "../../constants.js";
|
|
2
2
|
import { i as isEqualLayout } from "../../utils.js";
|
|
3
3
|
import { g as getBreakpointFromWidth, a as getColsFromBreakpoint, f as findOrGenerateResponsiveLayout, b as getIndentationValue } from "./responsiveUtils.js";
|
|
4
4
|
function generateInitialState(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { n as noop, k as isEqualLayouts, c as cloneLayout } from "../../utils.js";
|
|
3
3
|
import { g as getBreakpointFromWidth, a as getColsFromBreakpoint, b as getIndentationValue, f as findOrGenerateResponsiveLayout } from "./responsiveUtils.js";
|
|
4
4
|
import { forwardRef, useState, useRef, useEffect, useCallback } from "react";
|
|
5
5
|
import { useFirstRender } from "@m4l/graphics";
|