@m4l/components 9.2.52 → 9.2.53
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/components/Chip/Chip.js +3 -1
- package/components/Chip/ChipStyles.js +1 -1
- package/components/Chip/types.d.ts +4 -0
- package/components/DataGrid/constants.d.ts +21 -0
- package/components/DataGrid/constants.js +24 -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/index.d.ts +1 -0
- 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/ActionsColumn.js +2 -2
- 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/dictionary.js +0 -12
- package/components/DynamicFilter/store/DynamicFilterContext.js +1 -1
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/types.d.ts +2 -2
- package/components/DynamicSort/dictionary.js +0 -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/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/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 +2 -0
- package/components/ObjectLogs/dictionary.js +0 -3
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +1 -1
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +2 -2
- 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 +2 -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/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +3 -3
- package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.js +2 -2
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +30 -19
- package/components/hook-form/RHFAutocomplete/tests/common.d.ts +37 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +3 -8
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +32 -5
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +49 -84
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.d.ts +2 -2
- package/components/hook-form/RHFAutocompleteAsync/hooks/useFetchOptions.d.ts +5 -0
- package/components/hook-form/RHFAutocompleteAsync/hooks/useFetchOptions.js +64 -0
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.d.ts +14 -0
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +79 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/tests/OnChangFilterParmsDefined.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/OnChangFilterParmsUndefined.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/RHFAutocompleteReducer.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/common.d.ts +41 -0
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +120 -4
- package/components/hook-form/RHFAutocompleteAsync/types.js +38 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +1 -1
- package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +3 -2
- 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/mui_extended/Accordion/Accordion.js +1 -1
- package/components/mui_extended/Accordion/slots/AccordionSlots.js +2 -2
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +7 -0
- package/components/mui_extended/Autocomplete/Autocomplete.js +59 -196
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +27 -16
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.d.ts +14 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +47 -0
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.d.ts +21 -0
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.js +31 -0
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.d.ts +23 -0
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +135 -0
- package/components/mui_extended/Autocomplete/icons.d.ts +4 -0
- package/components/mui_extended/Autocomplete/icons.js +7 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +7 -2
- package/components/mui_extended/Autocomplete/renderOptions/index.js +7 -6
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +10 -11
- package/components/mui_extended/Autocomplete/types.d.ts +2 -0
- 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/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/useDynamicFilterAndSort.js +13 -10
- package/hooks/useSvgColor/constants.js +2 -2
- package/hooks/useSvgColor/helpers.js +1 -1
- package/hooks/useSvgColor/useSvgColor.js +1 -1
- package/index.js +14 -12
- package/mockServiceWorker.js +1 -1
- package/package.json +1 -1
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +1 -0
- package/storybook/hook-form/RHFAutocomplete/RHFAutocomplete.stories.d.ts +8 -6
- package/storybook/hook-form/RHFAutocomplete/constants.d.ts +23 -0
- package/storybook/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.stories.d.ts +11 -4
- package/storybook/hook-form/RHFAutocompleteAsync/constants.d.ts +10 -1
- package/storybook/hook-form/RHFAutocompleteAsync/handlers.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/oldTypes.d.ts +0 -43
- /package/components/hook-form/RHFAutocomplete/{RHFAutocomplete.test.d.ts → tests/RHFAutocomplete.test.d.ts} +0 -0
package/components/Chip/Chip.js
CHANGED
|
@@ -22,6 +22,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
22
22
|
iconButtonProps,
|
|
23
23
|
className,
|
|
24
24
|
dataTestId,
|
|
25
|
+
disabledDeleteButton,
|
|
25
26
|
...others
|
|
26
27
|
} = props;
|
|
27
28
|
const { currentSize } = useComponentSize(size);
|
|
@@ -93,7 +94,8 @@ const Chip = forwardRef((props, ref) => {
|
|
|
93
94
|
src: iconClose,
|
|
94
95
|
size: adjustedSize,
|
|
95
96
|
ownerState: { ...ownerState },
|
|
96
|
-
onClick: handleDelete
|
|
97
|
+
onClick: handleDelete,
|
|
98
|
+
disabled: disabledDeleteButton
|
|
97
99
|
}
|
|
98
100
|
)
|
|
99
101
|
]
|
|
@@ -74,6 +74,10 @@ export interface ChipProps {
|
|
|
74
74
|
* Test id for the `Chip`.
|
|
75
75
|
*/
|
|
76
76
|
dataTestId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* If the `Chip` delete button is disabled.
|
|
79
|
+
*/
|
|
80
|
+
disabledDeleteButton?: boolean;
|
|
77
81
|
}
|
|
78
82
|
/**
|
|
79
83
|
* Owner state of the `Chip` used to define internal style and behavior properties.
|
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
export declare const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
2
2
|
export declare const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
3
3
|
export declare const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
4
|
+
export declare enum DATAGRID_SEMANTIC_WIDTHS {
|
|
5
|
+
actions = 40,
|
|
6
|
+
bigChip = 190,
|
|
7
|
+
bigDescription = 350,
|
|
8
|
+
bigId = 200,
|
|
9
|
+
bigName = 290,
|
|
10
|
+
bigNumber = 150,
|
|
11
|
+
date = 180,
|
|
12
|
+
email = 300,
|
|
13
|
+
mediumChip = 140,
|
|
14
|
+
mediumDescription = 280,
|
|
15
|
+
mediumId = 130,
|
|
16
|
+
mediumName = 180,
|
|
17
|
+
mediumNumber = 150,
|
|
18
|
+
percentNumber = 90,
|
|
19
|
+
smallChip = 70,
|
|
20
|
+
smallDescription = 130,
|
|
21
|
+
smallId = 50,
|
|
22
|
+
smallName = 90,
|
|
23
|
+
smallNumber = 60
|
|
24
|
+
}
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
2
2
|
const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
3
3
|
const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
4
|
+
var DATAGRID_SEMANTIC_WIDTHS = /* @__PURE__ */ ((DATAGRID_SEMANTIC_WIDTHS2) => {
|
|
5
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["actions"] = 40] = "actions";
|
|
6
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigChip"] = 190] = "bigChip";
|
|
7
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigDescription"] = 350] = "bigDescription";
|
|
8
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigId"] = 200] = "bigId";
|
|
9
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigName"] = 290] = "bigName";
|
|
10
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigNumber"] = 150] = "bigNumber";
|
|
11
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["date"] = 180] = "date";
|
|
12
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["email"] = 300] = "email";
|
|
13
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["mediumChip"] = 140] = "mediumChip";
|
|
14
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["mediumDescription"] = 280] = "mediumDescription";
|
|
15
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["mediumId"] = 130] = "mediumId";
|
|
16
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["mediumName"] = 180] = "mediumName";
|
|
17
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["mediumNumber"] = 150] = "mediumNumber";
|
|
18
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["percentNumber"] = 90] = "percentNumber";
|
|
19
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["smallChip"] = 70] = "smallChip";
|
|
20
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["smallDescription"] = 130] = "smallDescription";
|
|
21
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["smallId"] = 50] = "smallId";
|
|
22
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["smallName"] = 90] = "smallName";
|
|
23
|
+
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["smallNumber"] = 60] = "smallNumber";
|
|
24
|
+
return DATAGRID_SEMANTIC_WIDTHS2;
|
|
25
|
+
})(DATAGRID_SEMANTIC_WIDTHS || {});
|
|
4
26
|
export {
|
|
5
27
|
DATAGRID_PREFIX_NAME as D,
|
|
6
28
|
DATAGRID_SELECT_COLUMN_KEY as a,
|
|
7
|
-
|
|
29
|
+
DATAGRID_SEMANTIC_WIDTHS as b,
|
|
30
|
+
DATAGRID_ACTIONS_COLUMN_KEY as c
|
|
8
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState, useMemo, useEffect, useCallback, createContext } from "react";
|
|
3
3
|
import { c as castMapColumnsWidthToRecord } from "../../helpers/castMapColumnsWidthToRecord.js";
|
|
4
4
|
import { useFirstRender } from "@m4l/graphics";
|
|
5
5
|
const DataGridContext = createContext(null);
|
|
@@ -5,9 +5,6 @@ function getDataGridComponentsDictionary() {
|
|
|
5
5
|
return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getMenuActionsComponentsDictionary()).concat(getModalDictionary());
|
|
6
6
|
}
|
|
7
7
|
const dictionary = {
|
|
8
|
-
LABEL_ACTIONS: "actions",
|
|
9
|
-
LABEL_ROWS_PER_PAGE: "pager.rows_per_page",
|
|
10
|
-
LABEL_OF: "pager.of",
|
|
11
8
|
DENSITY_COMPACT: `${getDataGridComponentsDictionary()[0]}.density_compact`,
|
|
12
9
|
DENSITY_STANDARD: `${getDataGridComponentsDictionary()[0]}.density_standard`,
|
|
13
10
|
DENSITY_CONFORTABLE: `${getDataGridComponentsDictionary()[0]}.density_confortable`,
|
|
@@ -6,3 +6,4 @@ export { getDataGridComponentsDictionary } from './dictionary';
|
|
|
6
6
|
export { TextEditor, NumberEditor } from './subcomponents/editors/TextEditor';
|
|
7
7
|
export { getDataGridRowsFromSet } from './utils/getDataGridRowsFromSet';
|
|
8
8
|
export type { IGridConfig, BaseConfigColumn } from './contexts/DataGridContext/types';
|
|
9
|
+
export { DATAGRID_SEMANTIC_WIDTHS } from './constants';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { InputBase } from "@mui/material";
|
|
3
3
|
import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
|
|
4
|
-
import { D as DataGridSlots,
|
|
4
|
+
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, a as TableSlots, R as RowsCountSlots, C as ColumnsConfigSlots } from "./DataGridEnum.js";
|
|
5
5
|
import { d as dataGridStyles } from "../styles.js";
|
|
6
6
|
const DataGridRootStyled = styled("div", {
|
|
7
7
|
name: DATAGRID_PREFIX_NAME,
|
|
@@ -17,6 +17,7 @@ function getComparator(columns, sortColumn) {
|
|
|
17
17
|
return column.customSort;
|
|
18
18
|
}
|
|
19
19
|
switch (typeOrder) {
|
|
20
|
+
//Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
|
|
20
21
|
case "number":
|
|
21
22
|
return (a, b) => {
|
|
22
23
|
try {
|
|
@@ -25,6 +26,7 @@ function getComparator(columns, sortColumn) {
|
|
|
25
26
|
return -1;
|
|
26
27
|
}
|
|
27
28
|
};
|
|
29
|
+
//Por defecto retorna una función de ordenamiento de string
|
|
28
30
|
default:
|
|
29
31
|
return (a, b) => {
|
|
30
32
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
|
|
3
3
|
import { useTheme } from "@mui/material";
|
|
4
|
-
import { b as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../constants.js";
|
|
4
|
+
import { b as DATAGRID_SEMANTIC_WIDTHS, c as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../constants.js";
|
|
5
5
|
import { M as MenuActions } from "../../../../MenuActions/MenuActions.js";
|
|
6
6
|
function ActionsFormatter(props) {
|
|
7
7
|
const { rowActionsGetter } = useDataGrid();
|
|
@@ -27,7 +27,7 @@ const ActionsColumn = {
|
|
|
27
27
|
key: DATAGRID_ACTIONS_COLUMN_KEY,
|
|
28
28
|
// name: getLabel(dictionary.LABEL_ACTIONS),
|
|
29
29
|
name: getActionLabel(),
|
|
30
|
-
width:
|
|
30
|
+
width: DATAGRID_SEMANTIC_WIDTHS.actions,
|
|
31
31
|
minWidth: 32,
|
|
32
32
|
isDraggable: false,
|
|
33
33
|
withFilter: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as CheckboxIndeterminateIcon, a as CheckboxCheckedIcon, b as CheckboxIcon } from "./CustomIcons.js";
|
|
4
4
|
import { Checkbox } from "@mui/material";
|
|
5
5
|
const CheckboxFormatter = forwardRef(
|
|
6
6
|
function CheckboxFormatter2({ onChange, checked, ...props }, _ref) {
|
|
@@ -10,7 +10,7 @@ function CheckboxIndeterminateIcon(props) {
|
|
|
10
10
|
return /* @__PURE__ */ jsx(SvgIcon, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z" }) });
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
CheckboxIndeterminateIcon as C,
|
|
14
14
|
CheckboxCheckedIcon as a,
|
|
15
|
-
|
|
15
|
+
CheckboxIcon as b
|
|
16
16
|
};
|
|
@@ -14,17 +14,6 @@ const DICCTIONARY = {
|
|
|
14
14
|
filter_tooltip_dirty: `${DYNAMIC_FILTER_DICTIONARY_ID}.filter_tooltip_dirty`,
|
|
15
15
|
filter_tooltip_invalid: `${DYNAMIC_FILTER_DICTIONARY_ID}.filter_tooltip_invalid`,
|
|
16
16
|
tooltip_clear_filters: `${DYNAMIC_FILTER_DICTIONARY_ID}.tooltip_clear_filters`,
|
|
17
|
-
operator_b: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_b`,
|
|
18
|
-
operator_e: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_e`,
|
|
19
|
-
operator_ne: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_ne`,
|
|
20
|
-
operator_gt: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_gt`,
|
|
21
|
-
operator_gte: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_gte`,
|
|
22
|
-
operator_lt: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_lt`,
|
|
23
|
-
operator_lte: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_lte`,
|
|
24
|
-
operator_c: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_c`,
|
|
25
|
-
operator_nc: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_nc`,
|
|
26
|
-
operator_in: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_in`,
|
|
27
|
-
operator_nin: `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_nin`,
|
|
28
17
|
//Labels de los formularios de los filtros
|
|
29
18
|
label_boolean_operator: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_boolean_operator`,
|
|
30
19
|
label_boolean_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_boolean_operand1`,
|
|
@@ -39,7 +28,6 @@ const DICCTIONARY = {
|
|
|
39
28
|
label_select_operator: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operator`,
|
|
40
29
|
label_select_operands_array: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operands_array`,
|
|
41
30
|
label_select_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operand1`,
|
|
42
|
-
label_select_operand2: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operand2`,
|
|
43
31
|
label_select_async_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_async_operand1`,
|
|
44
32
|
label_select_async_operands_array: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_async_operands_array`,
|
|
45
33
|
label_no_fields_available: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_no_fields_available`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { forwardRef, useRef, useImperativeHandle, useEffect, createContext } from "react";
|
|
3
3
|
import { useStore } from "zustand";
|
|
4
4
|
import { shallow } from "zustand/shallow";
|
|
5
5
|
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
@@ -4,11 +4,11 @@ import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoo
|
|
|
4
4
|
import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../../constants.js";
|
|
5
5
|
import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
|
|
6
6
|
import { R as RootStyled, I as InnerContainerStyled } from "../../slots/dynamicFilterSlots.js";
|
|
7
|
-
import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
|
|
8
7
|
import { I as InputFilter } from "../InputFilter/InputFilter.js";
|
|
9
8
|
import { A as AppliedFilters } from "../AppliedFilters/AppliedFilters.js";
|
|
10
9
|
import { F as FilterActions } from "../FilterActions/FilterActions.js";
|
|
11
10
|
import { P as PopoverFilter } from "../PopoverFilter/PopoverFilter.js";
|
|
11
|
+
import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
|
|
12
12
|
function DynamicFilterBase() {
|
|
13
13
|
const { ownerState, dataTestId } = useDynamicFilterBase();
|
|
14
14
|
const classRoot = getComponentSlotRoot(DYNAMIC_FILTER_KEY_COMPONENT);
|
|
@@ -2,6 +2,7 @@ import * as Yup from "yup";
|
|
|
2
2
|
import { b as DATE_TIME_OPERATORS } from "../../../constants.js";
|
|
3
3
|
import { D as DYNAMIC_FILTER_DICTIONARY_ID, a as DICCTIONARY } from "../../../dictionary.js";
|
|
4
4
|
import { D as DateTimeFilter } from "./index.js";
|
|
5
|
+
import { startOfDay, endOfDay } from "date-fns";
|
|
5
6
|
import { i as isValidDate } from "../../../../../utils/isValidDate.js";
|
|
6
7
|
class DateTimeFilterHelpers {
|
|
7
8
|
getComponent() {
|
|
@@ -34,8 +35,8 @@ class DateTimeFilterHelpers {
|
|
|
34
35
|
getFormValue(field, getLabel, filterValueDateTime) {
|
|
35
36
|
const filterValue = filterValueDateTime;
|
|
36
37
|
const operator = filterValue ? filterValue.operator : field.defaultOperator ?? "b";
|
|
37
|
-
const defaultStartDate = /* @__PURE__ */ new Date();
|
|
38
|
-
const defaultEndDate = /* @__PURE__ */ new Date();
|
|
38
|
+
const defaultStartDate = startOfDay(/* @__PURE__ */ new Date());
|
|
39
|
+
const defaultEndDate = endOfDay(/* @__PURE__ */ new Date());
|
|
39
40
|
const defaultOperand1 = field.defaultOperand1 && field.defaultOperand1 instanceof Date ? field.defaultOperand1 : defaultStartDate;
|
|
40
41
|
const defaultOperand2 = field.defaultOperand2 && field.defaultOperand2 instanceof Date ? field.defaultOperand2 : defaultEndDate;
|
|
41
42
|
const formValueOperand1 = filterValue ? filterValue.operand1 : defaultOperand1;
|
|
@@ -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
|
};
|
|
@@ -2,7 +2,7 @@ import { Maybe } from '@m4l/core';
|
|
|
2
2
|
import { Sizes } from '@m4l/styles';
|
|
3
3
|
import { Theme } from '@mui/material/styles';
|
|
4
4
|
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
5
|
-
import {
|
|
5
|
+
import { RHFAutocompleteAsyncProps } from '../hook-form/RHFAutocompleteAsync/types';
|
|
6
6
|
import { RHFSelectProps } from '../hook-form/RHFSelect';
|
|
7
7
|
import { DynamicFilterSlots } from './slots';
|
|
8
8
|
export type FieldType = 'number' | 'string' | 'boolean' | 'datetime' | 'select' | 'selectAsync';
|
|
@@ -27,7 +27,7 @@ export type OperandsSelectArray = Array<OperandSelect>;
|
|
|
27
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
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
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;
|
|
30
|
-
type SelectAsyncOptions<TOption = any> = Pick<
|
|
30
|
+
type SelectAsyncOptions<TOption = any> = Pick<RHFAutocompleteAsyncProps<TOption>, 'type' | 'endPoint' | 'responseToCamelCase' | 'multiple' | 'autoComplete' | 'autoCapitalize' | 'parms' | 'timeout'> & {
|
|
31
31
|
getOptionLabel: (option: TOption) => string;
|
|
32
32
|
isOptionEqualToValue: (options: TOption | TOption[], value: TOption) => boolean;
|
|
33
33
|
getOptionId: (option: TOption) => string | number;
|
|
@@ -8,15 +8,10 @@ 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
|
-
operator_asc: "operator_asc",
|
|
18
|
-
operator_desc: "operator_desc",
|
|
19
|
-
label_boolean_operand1: "label_boolean_operand1",
|
|
20
15
|
label_no_fields_available: "label_no_fields_available"
|
|
21
16
|
};
|
|
22
17
|
const getDynamicSortDictionary = (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);
|
|
@@ -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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as cloneLayout, a as cloneLayoutItem, d as compact, l as correctBounds } from "../../utils.js";
|
|
2
2
|
function getBreakpointFromWidth(breakpoints, width) {
|
|
3
3
|
const sorted = sortBreakpoints(breakpoints);
|
|
4
4
|
let matching = sorted[0];
|
|
@@ -143,8 +143,8 @@ export {
|
|
|
143
143
|
getColsFromBreakpoint as a,
|
|
144
144
|
getIndentationValue as b,
|
|
145
145
|
addLayoutItemToBreakPointIfNoExists as c,
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
cloneLayouts as d,
|
|
147
|
+
addLayoutItemToBreakPoints as e,
|
|
148
148
|
findOrGenerateResponsiveLayout as f,
|
|
149
149
|
getBreakpointFromWidth as g
|
|
150
150
|
};
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useRef, useState, useMemo, useCallback, useEffect } from "r
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import throttle from "lodash-es/throttle";
|
|
5
5
|
import { useResizeObserver } from "@m4l/graphics";
|
|
6
|
-
import {
|
|
6
|
+
import { f as DEFAULT_CONTAINER_HEIGHT, e as DEFAULT_CONTAINER_WIDTH, T as THROTTLE_RESIZE_TIMEOUT, C as COMPONENT_CLASS_NAME } from "../../constants.js";
|
|
7
7
|
function withSizeProvider(ComposedComponent) {
|
|
8
8
|
const WithSizeProvider = forwardRef((props, ref) => {
|
|
9
9
|
const { measureBeforeMount = true, ...rest } = props;
|
package/components/Icon/Icon.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
5
|
-
import { I as
|
|
5
|
+
import { I as ICON_PREFIX, a as ICON_KEY_COMPONENT } from "./constants.js";
|
|
6
6
|
import { g as getComponentClasses, a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
8
8
|
import { I as IconSlots } from "./slots/IconEnum.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { I as IconSlots } from "./IconEnum.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as ICON_KEY_COMPONENT } from "../constants.js";
|
|
4
4
|
import { i as iconStyles } from "../Icon.styles.js";
|
|
5
5
|
import { T as Tooltip } from "../../mui_extended/Tooltip/Tooltip.js";
|
|
6
6
|
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
@@ -5,7 +5,7 @@ import clsx from "clsx";
|
|
|
5
5
|
import { L as LazyLoadComponent } from "./subcomponents/LazyLoadComponent/index.js";
|
|
6
6
|
import { D as DivContainerSkeletonStyled, I as ImgSkeleton, a as ImgStyled } from "./slots/ImageSlots.js";
|
|
7
7
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
8
|
-
import { s as svgDataUriSkeleton, I as
|
|
8
|
+
import { s as svgDataUriSkeleton, I as IMAGE_CLASSES, a as IMAGE_KEY_COMPONENT } from "./constant.js";
|
|
9
9
|
import { I as ImageSlots } from "./slots/ImageEnum.js";
|
|
10
10
|
function Image(props) {
|
|
11
11
|
const {
|
|
@@ -4,7 +4,7 @@ const IMAGE_KEY_COMPONENT = "M4LImage";
|
|
|
4
4
|
const svgDataUriSkeleton = `data:image/svg+xml,%3Csvg width='36' height='37' viewBox='0 0 36 37' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Union'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M25.0001 14.7416C24.26 15.2361 23.39 15.5 22.5 15.5C21.3065 15.5 20.1619 15.0259 19.318 14.182C18.4741 13.3381 18 12.1935 18 11C18 10.11 18.2639 9.23996 18.7584 8.49994C19.2529 7.75992 19.9557 7.18314 20.7779 6.84254C21.6002 6.50195 22.505 6.41283 23.3779 6.58647C24.2508 6.7601 25.0526 7.18868 25.682 7.81802C26.3113 8.44736 26.7399 9.24918 26.9135 10.1221C27.0872 10.995 26.9981 11.8998 26.6575 12.7221C26.3169 13.5443 25.7401 14.2471 25.0001 14.7416ZM23.3334 9.7528C23.0867 9.58798 22.7967 9.5 22.5 9.5C22.1022 9.5 21.7206 9.65804 21.4393 9.93934C21.158 10.2206 21 10.6022 21 11C21 11.2967 21.088 11.5867 21.2528 11.8334C21.4176 12.08 21.6519 12.2723 21.926 12.3858C22.2001 12.4994 22.5017 12.5291 22.7926 12.4712C23.0836 12.4133 23.3509 12.2704 23.5607 12.0607C23.7704 11.8509 23.9133 11.5836 23.9712 11.2926C24.0291 11.0017 23.9994 10.7001 23.8858 10.426C23.7723 10.1519 23.58 9.91762 23.3334 9.7528Z' fill='%23091E42' fill-opacity='0.08'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 0.5H33C33.7957 0.5 34.5587 0.81607 35.1213 1.37868C35.6839 1.94129 36 2.70435 36 3.5V33.5C36 34.2957 35.6839 35.0587 35.1213 35.6213C34.5587 36.1839 33.7957 36.5 33 36.5H3C2.20435 36.5 1.44129 36.1839 0.87868 35.6213C0.31607 35.0587 0 34.2957 0 33.5V3.5C0 2.70435 0.31607 1.94129 0.87868 1.37868C1.44129 0.81607 2.20435 0.5 3 0.5ZM3 24.5V33.5H33V30.5L25.5 23L23.115 25.385C22.5529 25.9438 21.7926 26.2574 21 26.2574C20.2074 26.2574 19.4471 25.9438 18.885 25.385L10.5 17L3 24.5ZM27.615 20.87L33 26.255V3.5H3V20.255L8.385 14.87C8.94709 14.3112 9.70744 13.9976 10.5 13.9976C11.2926 13.9976 12.0529 14.3112 12.615 14.87L21 23.255L23.385 20.87C23.9471 20.3112 24.7074 19.9976 25.5 19.9976C26.2926 19.9976 27.0529 20.3112 27.615 20.87Z' fill='%23091E42' fill-opacity='0.08'/%3E%3C/g%3E%3C/svg%3E%0A`;
|
|
5
5
|
const IMAGE_CLASSES = getComponentClasses(IMAGE_KEY_COMPONENT, ImageSlots);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
IMAGE_CLASSES as I,
|
|
8
|
+
IMAGE_KEY_COMPONENT as a,
|
|
9
9
|
svgDataUriSkeleton as s
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import {
|
|
2
|
+
import { a as IMAGE_KEY_COMPONENT } from "../constant.js";
|
|
3
3
|
import { I as ImageSlots } from "./ImageEnum.js";
|
|
4
4
|
import { i as imageStyles } from "../image.styles.js";
|
|
5
5
|
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef, useState, useRef, useImperativeHandle, useEffect } from "react";
|
|
3
3
|
import { b as IntersectComponentStyled } from "../../slots/ImageSlots.js";
|
|
4
4
|
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as IMAGE_KEY_COMPONENT } from "../../constant.js";
|
|
6
6
|
import { I as ImageSlots } from "../../slots/ImageEnum.js";
|
|
7
7
|
const checkIntersections = (entries) => {
|
|
8
8
|
entries.forEach((entry) => {
|
|
@@ -5,7 +5,7 @@ import { useEnvironment, useNetwork } from "@m4l/core";
|
|
|
5
5
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { I as Image } from "../Image/Image.js";
|
|
8
|
-
import { L as LanguagePopoverRootStyled,
|
|
8
|
+
import { L as LanguagePopoverRootStyled, P as PaperStyled, I as ImageStyled } from "./slots/LanguagePopoverSlots.js";
|
|
9
9
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
import { L as LanguagePopoverSlots } from "./slots/LanguagePopoverEnum.js";
|
|
11
11
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
@@ -8,8 +8,8 @@ import clsx from "clsx";
|
|
|
8
8
|
import { d as dictionary } from "./dictionary.js";
|
|
9
9
|
import { useRef, useState, useEffect } from "react";
|
|
10
10
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
11
|
-
import { L as LoadingErrorSlots } from "./slots/LoadingErrorEnum.js";
|
|
12
11
|
import { T as Typography } from "../mui_extended/Typography/Typography.js";
|
|
12
|
+
import { L as LoadingErrorSlots } from "./slots/LoadingErrorEnum.js";
|
|
13
13
|
import { B as Button } from "../mui_extended/Button/Button.js";
|
|
14
14
|
const LoadingError = (props) => {
|
|
15
15
|
const { status, action, title, description, recommendation, introMessage, errorIcon, className, dataTestId, size = "medium" } = props;
|