@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.
@@ -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,3 +1,4 @@
1
1
  export { default as Base } from './Base';
2
2
  export * from './cells';
3
3
  export * from './columns';
4
+ export { GridColDefPropsOverrides } from './types';
@@ -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/editColumn";
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;
@@ -9,4 +9,5 @@ export * from './lib';
9
9
  export * from './menus';
10
10
  export * from './snacks';
11
11
  export * from './drawers';
12
+ export * from './types';
12
13
  export { default as theme } from './theme';
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
  }