@acvl/frontend-components 0.0.26 → 0.0.27
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/dist/cjs/index.js +19 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +19 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -127,8 +127,10 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
127
127
|
const NormalOrIcon = (props) => {
|
|
128
128
|
const theme = material.useTheme();
|
|
129
129
|
const belowLG = material.useMediaQuery(theme.breakpoints.down("lg"));
|
|
130
|
-
if ((belowLG && !(props.type == "button")) || props.type == "icon")
|
|
131
|
-
|
|
130
|
+
if ((belowLG && !(props.type == "button")) || props.type == "icon") {
|
|
131
|
+
const { startIcon, ...others } = props.buttonProps;
|
|
132
|
+
return (jsxRuntime.jsx(material.Tooltip, { title: props.buttonProps.children, children: jsxRuntime.jsx(material.IconButton, { ...others, children: startIcon }) }));
|
|
133
|
+
}
|
|
132
134
|
return jsxRuntime.jsx(material.Button, { ...props.buttonProps });
|
|
133
135
|
};
|
|
134
136
|
|
|
@@ -27365,11 +27367,12 @@ const EditGridWrapper = (props) => {
|
|
|
27365
27367
|
}
|
|
27366
27368
|
catch (e) {
|
|
27367
27369
|
setErrors((prevState) => immer.produce(prevState, (draft) => {
|
|
27368
|
-
draft[newRow.id] = lodash.get(e, "data");
|
|
27370
|
+
draft[newRow.id] = lodash.get(e, "data.invalid_params");
|
|
27369
27371
|
}));
|
|
27370
27372
|
notifications.show("Error actualizando información!", { severity: "error" });
|
|
27371
27373
|
}
|
|
27372
27374
|
};
|
|
27375
|
+
const handleProcessRowUpdateError = () => { };
|
|
27373
27376
|
// ===== || KEYDOWN || ===== //
|
|
27374
27377
|
const handleKeyPress = React.useCallback((event) => {
|
|
27375
27378
|
if (props.permission) {
|
|
@@ -27450,6 +27453,7 @@ const EditGridWrapper = (props) => {
|
|
|
27450
27453
|
rowModesModel: rowModesModel,
|
|
27451
27454
|
onRowModesModelChange: setRowModesModel,
|
|
27452
27455
|
processRowUpdate: processRowUpdate,
|
|
27456
|
+
onProcessRowUpdateError: handleProcessRowUpdateError,
|
|
27453
27457
|
loadingParams: [loadingMutation],
|
|
27454
27458
|
}, props.dataGridProps);
|
|
27455
27459
|
const renderEditGrid = () => (jsxRuntime.jsx(core$1.DndContext, { sensors: sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, modifiers: [modifiers.restrictToVerticalAxis, modifiers.restrictToWindowEdges, modifiers.restrictToParentElement], autoScroll: false, children: jsxRuntime.jsx(sortable.SortableContext, { items: rows ? rows.map((row) => row.id.toString()) : [], strategy: sortable.verticalListSortingStrategy, children: props.renderFunction({
|
|
@@ -27940,7 +27944,7 @@ const MyGridEditSingleSelect = (props) => {
|
|
|
27940
27944
|
} }));
|
|
27941
27945
|
};
|
|
27942
27946
|
|
|
27943
|
-
const StyledTooltip = material.styled(({ className, ...props }) => (jsxRuntime.jsx(material.Tooltip, { ...props, placement:
|
|
27947
|
+
const StyledTooltip = material.styled(({ className, ...props }) => (jsxRuntime.jsx(material.Tooltip, { ...props, placement: "top", classes: { popper: className } })))(({ theme }) => ({
|
|
27944
27948
|
[`& .${material.tooltipClasses.tooltip}`]: {
|
|
27945
27949
|
backgroundColor: theme.palette.error.main,
|
|
27946
27950
|
color: theme.palette.error.contrastText,
|
|
@@ -27950,27 +27954,29 @@ const EditCellWithErrorTooltip = (props) => {
|
|
|
27950
27954
|
const { error } = props;
|
|
27951
27955
|
const renderCell = () => {
|
|
27952
27956
|
switch (props.colDef.type) {
|
|
27953
|
-
case
|
|
27957
|
+
case "boolean":
|
|
27954
27958
|
return jsxRuntime.jsx(xDataGrid.GridEditBooleanCell, { ...props });
|
|
27955
|
-
case
|
|
27959
|
+
case "singleSelect":
|
|
27956
27960
|
return jsxRuntime.jsx(MyGridEditSingleSelect, { ...props });
|
|
27957
27961
|
default:
|
|
27958
|
-
return jsxRuntime.jsx(xDataGrid.GridEditInputCell, { ...props, slotProps: {
|
|
27962
|
+
return (jsxRuntime.jsx(xDataGrid.GridEditInputCell, { ...props, slotProps: {
|
|
27959
27963
|
root: {
|
|
27960
27964
|
onFocus: (e) => {
|
|
27961
|
-
if (props.field ==
|
|
27965
|
+
if (props.field == "cotizacion__total")
|
|
27962
27966
|
return e.target.select();
|
|
27963
27967
|
},
|
|
27964
|
-
}
|
|
27965
|
-
} });
|
|
27968
|
+
},
|
|
27969
|
+
} }));
|
|
27966
27970
|
}
|
|
27967
27971
|
};
|
|
27968
|
-
return (jsxRuntime.jsx(StyledTooltip, { open: !!error, title: error, children: renderCell() }));
|
|
27972
|
+
return (jsxRuntime.jsx(StyledTooltip, { open: !!error, title: error?.reason.join(", "), children: jsxRuntime.jsx("div", { style: { display: "flex" }, children: renderCell() }) }));
|
|
27969
27973
|
};
|
|
27970
27974
|
|
|
27971
27975
|
function renderEditCellWithErrorTooltip(params, mutationErrors, path) {
|
|
27972
|
-
const
|
|
27973
|
-
|
|
27976
|
+
const error = lodash.find(lodash.get(mutationErrors, params.id), function (e) {
|
|
27977
|
+
return e.name == (path || params.field);
|
|
27978
|
+
});
|
|
27979
|
+
return jsxRuntime.jsx(EditCellWithErrorTooltip, { ...params, error: error });
|
|
27974
27980
|
}
|
|
27975
27981
|
|
|
27976
27982
|
const CoverPage = (props) => {
|
|
@@ -28502,7 +28508,6 @@ function SlideTransition(props) {
|
|
|
28502
28508
|
return jsxRuntime.jsx(material.Slide, { ...props, direction: "left" });
|
|
28503
28509
|
}
|
|
28504
28510
|
const BaseProgressSnack = (props) => {
|
|
28505
|
-
console.log(props);
|
|
28506
28511
|
const dispatch = reactRedux.useDispatch();
|
|
28507
28512
|
const handleClose = (e) => {
|
|
28508
28513
|
if (e?.defaultMuiPrevented)
|