@m4l/components 9.3.13-JT010925.beta.1 → 9.3.13-JT02092025.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/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/Stepper/Stepper.styles.js +9 -16
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/package.json +1 -1
|
@@ -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 {
|
|
@@ -56,9 +56,11 @@ const useNumberInput = (parameters) => {
|
|
|
56
56
|
(event, field, fieldValue, reason) => {
|
|
57
57
|
if (field === "value" && typeof fieldValue !== "string") {
|
|
58
58
|
switch (reason) {
|
|
59
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
59
60
|
case "numberInput:inputChange":
|
|
60
61
|
onChange?.(event, fieldValue);
|
|
61
62
|
break;
|
|
63
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
62
64
|
case "numberInput:clamp":
|
|
63
65
|
onChange?.(event, fieldValue);
|
|
64
66
|
break;
|
|
@@ -8,7 +8,7 @@ const stepperStyles = {
|
|
|
8
8
|
display: "flex",
|
|
9
9
|
flexDirection: "column",
|
|
10
10
|
justifyContent: ownerState?.stepperFooterSticky ? "flex-start" : "space-between",
|
|
11
|
-
background:
|
|
11
|
+
background: "red",
|
|
12
12
|
width: "100%",
|
|
13
13
|
height: "100%",
|
|
14
14
|
borderRadius: theme.vars.size.borderRadius.r1
|
|
@@ -138,33 +138,26 @@ const stepperStyles = {
|
|
|
138
138
|
const isLastStep = step === totalSteps - 1;
|
|
139
139
|
const isValidStep = ownerState?.stepValidationStatus?.[step] ?? true;
|
|
140
140
|
return {
|
|
141
|
-
...ownerState?.orientation === "horizontal" && {
|
|
142
|
-
marginTop: theme.generalSettings.isMobile ? "6px" : theme.vars.size.baseSpacings.sp1
|
|
143
|
-
},
|
|
144
|
-
display: "flex",
|
|
145
|
-
alignItems: "center",
|
|
146
|
-
justifyContent: "center",
|
|
147
|
-
order: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? 0 : 1,
|
|
148
141
|
...getSizeStyles(theme, ownerState?.size || "medium", "case", (size) => {
|
|
149
142
|
return {
|
|
150
143
|
width: size,
|
|
151
144
|
height: size
|
|
152
145
|
};
|
|
153
146
|
}),
|
|
147
|
+
...ownerState?.orientation === "horizontal" ? {
|
|
148
|
+
marginTop: theme.generalSettings.isMobile ? "6px" : theme.vars.size.baseSpacings.sp1
|
|
149
|
+
} : {},
|
|
150
|
+
display: "flex",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center",
|
|
153
|
+
flexShrink: 0,
|
|
154
|
+
order: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? 0 : 1,
|
|
154
155
|
background: isCompleted ? ownerState?.indicatorType === "dot" || theme.generalSettings.isMobile ? theme.vars.palette.background.default : theme.vars.palette.primary.toneOpacity : !isValidStep ? theme.vars.palette.error.enabled : ownerState?.indicatorType === "dot" || theme.generalSettings.isMobile ? theme.vars.palette.background.default : isCurrent ? theme.vars.palette.primary.enabled : theme.vars.palette.default.enabled,
|
|
155
156
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
156
157
|
...ownerState?.indicatorType === "number" && !theme.generalSettings.isMobile && {
|
|
157
158
|
boxShadow: isCurrent ? "0 2px 8px 0 rgb(0, 100, 255, 0.16)" : "none"
|
|
158
159
|
},
|
|
159
160
|
position: "relative",
|
|
160
|
-
zIndex: 1,
|
|
161
|
-
textAlign: "center",
|
|
162
|
-
"& > div": {
|
|
163
|
-
position: "absolute",
|
|
164
|
-
top: "50%",
|
|
165
|
-
left: "50%",
|
|
166
|
-
transform: "translate(-50%, -50%)"
|
|
167
|
-
},
|
|
168
161
|
...!isLastStep && ownerState?.orientation === "horizontal" && !theme.generalSettings.isMobile && {
|
|
169
162
|
"&::after": {
|
|
170
163
|
content: '""',
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -MARGIN_GRIDLAYOUT,
|
|
445
|
+
bottom: -MARGIN_GRIDLAYOUT
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -65,6 +65,11 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
|
|
|
65
65
|
...state,
|
|
66
66
|
isOpen: false
|
|
67
67
|
};
|
|
68
|
+
// case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
|
|
69
|
+
// return {
|
|
70
|
+
// ...state,
|
|
71
|
+
// selectedOptions: action.payload,
|
|
72
|
+
// };
|
|
68
73
|
default:
|
|
69
74
|
return state;
|
|
70
75
|
}
|