@acvl/frontend-components 0.0.3 → 0.0.5
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 +3 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/datagrids/columns/index.d.ts +2 -2
- package/dist/cjs/types/src/components/v1/datagrids/index.d.ts +1 -0
- package/dist/cjs/types/src/components/v1/datagrids/wrappers/EditGridWrapper.d.ts +4 -1
- package/dist/cjs/types/src/components/v1/index.d.ts +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/datagrids/columns/index.d.ts +2 -2
- package/dist/esm/types/src/components/v1/datagrids/index.d.ts +1 -0
- package/dist/esm/types/src/components/v1/datagrids/wrappers/EditGridWrapper.d.ts +4 -1
- package/dist/esm/types/src/components/v1/index.d.ts +1 -0
- package/dist/index.d.ts +10 -7
- package/package.json +5 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as editColumn } from './editColumn';
|
|
2
|
-
export { default as deleteColumn } from './deleteColumn';
|
|
1
|
+
export { default as editColumn, EditGridColumnsProps } from './editColumn';
|
|
2
|
+
export { default as deleteColumn, DeleteGridColumnsProps } from './deleteColumn';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from "react";
|
|
2
2
|
import { GridColDefPropsOverrides } from "../types";
|
|
3
3
|
import { BaseGridProps } from "../Base";
|
|
4
|
-
import { EditGridColumnsProps } from "../columns
|
|
4
|
+
import { EditGridColumnsProps } from "../columns";
|
|
5
5
|
export interface EditGridAPIProps {
|
|
6
6
|
mutation: any;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -13,6 +13,8 @@ export interface EditGridAPIProps {
|
|
|
13
13
|
[key: string]: {
|
|
14
14
|
ignore?: boolean;
|
|
15
15
|
format?: string;
|
|
16
|
+
extra_validation?: (value: string) => boolean;
|
|
17
|
+
alter_key?: (key: string) => string;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
dnd?: {
|
|
@@ -21,6 +23,7 @@ export interface EditGridAPIProps {
|
|
|
21
23
|
[key: string]: any;
|
|
22
24
|
};
|
|
23
25
|
};
|
|
26
|
+
postAction?: (result: any) => void;
|
|
24
27
|
}
|
|
25
28
|
export interface EditGridWrapperProps extends Pick<BaseGridProps, 'dataGridProps'>, EditGridAPIProps {
|
|
26
29
|
permission: boolean;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
3
|
import { useTheme, useMediaQuery, Tooltip, IconButton, Button, Grid, FormGroup, FormHelperText as FormHelperText$1, Drawer, Box, Stack, CircularProgress, Typography as Typography$1, List as List$1, ListItem as ListItem$1, ListSubheader, styled as styled$1, LinearProgress, Autocomplete, Checkbox, Slider, Switch, InputAdornment as InputAdornment$1, ToggleButtonGroup, ToggleButton, Dialog, DialogTitle, DialogContent as DialogContent$1, DialogContentText, DialogActions as DialogActions$1, ButtonGroup, Menu, alpha as alpha$1, Link, Card, CardHeader, Avatar, CardContent, Divider as Divider$1, Popper, Grow as Grow$1, Paper, ClickAwayListener, Badge, TablePagination, NoSsr, tooltipClasses, Collapse, Fade as Fade$1, Slide, Zoom, Snackbar, lighten, createTheme as createTheme$1, responsiveFontSizes } from '@mui/material';
|
|
3
4
|
import EditIcon from '@mui/icons-material/Edit';
|
|
@@ -27696,6 +27697,8 @@ const EditGridWrapper = (props) => {
|
|
|
27696
27697
|
setErrors(prevState => produce(prevState, draft => {
|
|
27697
27698
|
delete draft[newRow.id];
|
|
27698
27699
|
}));
|
|
27700
|
+
if (props?.postAction)
|
|
27701
|
+
props.postAction(result);
|
|
27699
27702
|
notifications.show(`Información actualizada!`, { severity: 'success' });
|
|
27700
27703
|
return result.list;
|
|
27701
27704
|
}
|