@bluemarble/bm-components 0.0.71 → 0.0.72

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.
Files changed (42) hide show
  1. package/dist/esm/index.js +823 -823
  2. package/dist/esm/types/components/Autocomplete/index.d.ts +27 -27
  3. package/dist/esm/types/components/BaseGrid/Pagination/index.d.ts +12 -12
  4. package/dist/esm/types/components/BaseGrid/index.d.ts +32 -32
  5. package/dist/esm/types/components/Checkbox/index.d.ts +19 -19
  6. package/dist/esm/types/components/Dialog/index.d.ts +16 -16
  7. package/dist/esm/types/components/EditableGrid/GridCell.d.ts +24 -24
  8. package/dist/esm/types/components/EditableGrid/GridInput/index.d.ts +16 -16
  9. package/dist/esm/types/components/EditableGrid/GridInputAutocomplete/index.d.ts +11 -11
  10. package/dist/esm/types/components/EditableGrid/GridInputText/index.d.ts +3 -3
  11. package/dist/esm/types/components/EditableGrid/GridSelect/index.d.ts +10 -10
  12. package/dist/esm/types/components/EditableGrid/NewRow/index.d.ts +13 -13
  13. package/dist/esm/types/components/EditableGrid/index.d.ts +52 -52
  14. package/dist/esm/types/components/Grid/AutoCreatedRows.d.ts +9 -9
  15. package/dist/esm/types/components/Grid/EditableTableCell/DefaultInput.d.ts +17 -17
  16. package/dist/esm/types/components/Grid/EditableTableCell/InputMask.d.ts +8 -8
  17. package/dist/esm/types/components/Grid/EditableTableCell/index.d.ts +24 -24
  18. package/dist/esm/types/components/Grid/Filters.d.ts +13 -13
  19. package/dist/esm/types/components/Grid/Grid.d.ts +33 -33
  20. package/dist/esm/types/components/Grid/Header.d.ts +11 -11
  21. package/dist/esm/types/components/Grid/Td.d.ts +3 -3
  22. package/dist/esm/types/components/Grid/Tr.d.ts +13 -13
  23. package/dist/esm/types/components/Grid/index.d.ts +6 -6
  24. package/dist/esm/types/components/Grid/utils.d.ts +5 -5
  25. package/dist/esm/types/components/Input/index.d.ts +12 -12
  26. package/dist/esm/types/components/InputMask/index.d.ts +13 -13
  27. package/dist/esm/types/components/LargeButton/index.d.ts +9 -9
  28. package/dist/esm/types/components/Modal/index.d.ts +8 -8
  29. package/dist/esm/types/components/Radio/index.d.ts +23 -23
  30. package/dist/esm/types/components/Select/index.d.ts +17 -17
  31. package/dist/esm/types/components/Switch/index.d.ts +19 -19
  32. package/dist/esm/types/components/TabPanel/index.d.ts +11 -11
  33. package/dist/esm/types/components/hooks/useEditableGrid.d.ts +23 -23
  34. package/dist/esm/types/components/hooks/useEvent.d.ts +1 -1
  35. package/dist/esm/types/components/hooks/useFilter.d.ts +17 -17
  36. package/dist/esm/types/components/hooks/useGrid.d.ts +23 -23
  37. package/dist/esm/types/components/hooks/useLoading.d.ts +4 -4
  38. package/dist/esm/types/components/index.d.ts +18 -18
  39. package/dist/esm/types/components/utils/GetInputLabel.d.ts +4 -4
  40. package/dist/esm/types/index.d.ts +1 -1
  41. package/dist/index.d.ts +248 -248
  42. package/package.json +45 -45
@@ -1,27 +1,27 @@
1
- import { ReactNode } from 'react';
2
- import { AutocompleteProps as MuiAutocompleteProps, AutocompleteRenderInputParams } from '@mui/material';
3
- declare type MuiAutocompleteBaseProps<T> = Omit<MuiAutocompleteProps<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
4
- interface AutocompleteWithoutProps<T> extends MuiAutocompleteBaseProps<T> {
5
- name?: never;
6
- withFormik: false;
7
- getOptionValue?: never;
8
- label?: string;
9
- getOptionLabel: (option: T) => string;
10
- renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
11
- }
12
- interface AutocompleteWithFormikProps<T> extends MuiAutocompleteBaseProps<T> {
13
- name: string;
14
- withFormik?: true;
15
- label?: string;
16
- option?: {
17
- label?: keyof T;
18
- value?: keyof T;
19
- key?: string;
20
- };
21
- renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
22
- getOptionLabel?: (option: T) => string;
23
- getOptionValue?: (option: T) => string | number;
24
- }
25
- declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
26
- export declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
27
- export {};
1
+ import { ReactNode } from 'react';
2
+ import { AutocompleteProps as MuiAutocompleteProps, AutocompleteRenderInputParams } from '@mui/material';
3
+ declare type MuiAutocompleteBaseProps<T> = Omit<MuiAutocompleteProps<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
4
+ interface AutocompleteWithoutProps<T> extends MuiAutocompleteBaseProps<T> {
5
+ name?: never;
6
+ withFormik: false;
7
+ getOptionValue?: never;
8
+ label?: string;
9
+ getOptionLabel: (option: T) => string;
10
+ renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
11
+ }
12
+ interface AutocompleteWithFormikProps<T> extends MuiAutocompleteBaseProps<T> {
13
+ name: string;
14
+ withFormik?: true;
15
+ label?: string;
16
+ option?: {
17
+ label?: keyof T;
18
+ value?: keyof T;
19
+ key?: string;
20
+ };
21
+ renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
22
+ getOptionLabel?: (option: T) => string;
23
+ getOptionValue?: (option: T) => string | number;
24
+ }
25
+ declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
26
+ export declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
27
+ export {};
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- declare type GridPaginationProps = {
3
- dense: boolean;
4
- currentPage: number;
5
- totalNumberOfPages: number;
6
- rowsPerPageOptions: number[];
7
- rowsPerPage: number;
8
- onPageChange: (prop: number) => void;
9
- setRowsPerPage: (prop: number) => void;
10
- };
11
- export declare const GridPagination: ({ currentPage, totalNumberOfPages, onPageChange, rowsPerPageOptions, setRowsPerPage, rowsPerPage, dense }: GridPaginationProps) => JSX.Element;
12
- export {};
1
+ /// <reference types="react" />
2
+ declare type GridPaginationProps = {
3
+ dense: boolean;
4
+ currentPage: number;
5
+ totalNumberOfPages: number;
6
+ rowsPerPageOptions: number[];
7
+ rowsPerPage: number;
8
+ onPageChange: (prop: number) => void;
9
+ setRowsPerPage: (prop: number) => void;
10
+ };
11
+ export declare const GridPagination: ({ currentPage, totalNumberOfPages, onPageChange, rowsPerPageOptions, setRowsPerPage, rowsPerPage, dense }: GridPaginationProps) => JSX.Element;
12
+ export {};
@@ -1,32 +1,32 @@
1
- import { ReactNode } from 'react';
2
- import { PaperProps, SxProps, TableBodyProps, TableHeadProps, TableProps } from '@mui/material';
3
- export interface ColumnsProps {
4
- label: string;
5
- name?: string;
6
- width?: number;
7
- sx?: SxProps;
8
- canSort?: boolean;
9
- }
10
- interface GridProps {
11
- columns: ColumnsProps[];
12
- children: ReactNode;
13
- fixedColumns?: boolean;
14
- sortedBy: string;
15
- sortedDirection: 'asc' | 'desc';
16
- dense?: boolean;
17
- onSortBy: (prop: string) => void;
18
- paperProps?: PaperProps;
19
- tableProps?: TableProps;
20
- tableHeadProps?: TableHeadProps;
21
- tableBodyProps?: TableBodyProps;
22
- striped?: boolean;
23
- bordered?: boolean;
24
- currentPage: number;
25
- totalNumberOfPages: number;
26
- rowsPerPageOptions: number[];
27
- rowsPerPage: number;
28
- onPageChange: (pageNumber: number) => void;
29
- setRowsPerPage: (rows: number) => void;
30
- }
31
- export declare function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions }: GridProps): JSX.Element;
32
- export {};
1
+ import { ReactNode } from 'react';
2
+ import { PaperProps, SxProps, TableBodyProps, TableHeadProps, TableProps } from '@mui/material';
3
+ export interface ColumnsProps {
4
+ label: string;
5
+ name?: string;
6
+ width?: number;
7
+ sx?: SxProps;
8
+ canSort?: boolean;
9
+ }
10
+ interface GridProps {
11
+ columns: ColumnsProps[];
12
+ children: ReactNode;
13
+ fixedColumns?: boolean;
14
+ sortedBy: string;
15
+ sortedDirection: 'asc' | 'desc';
16
+ dense?: boolean;
17
+ onSortBy: (prop: string) => void;
18
+ paperProps?: PaperProps;
19
+ tableProps?: TableProps;
20
+ tableHeadProps?: TableHeadProps;
21
+ tableBodyProps?: TableBodyProps;
22
+ striped?: boolean;
23
+ bordered?: boolean;
24
+ currentPage: number;
25
+ totalNumberOfPages: number;
26
+ rowsPerPageOptions: number[];
27
+ rowsPerPage: number;
28
+ onPageChange: (pageNumber: number) => void;
29
+ setRowsPerPage: (rows: number) => void;
30
+ }
31
+ export declare function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions }: GridProps): JSX.Element;
32
+ export {};
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
2
- import { CheckboxProps as MuiCheckboxProps, FormControlLabelProps } from '@mui/material';
3
- declare type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
4
- interface CheckboxWithFormik extends MuiCheckboxProps {
5
- name: string;
6
- label?: string;
7
- withFormik?: true;
8
- FormControlLabelProps?: Partial<FormControlLabelProps>;
9
- }
10
- interface CheckboxWithoutFormik extends MuiCheckboxProps {
11
- name?: never;
12
- label?: string;
13
- withFormik: false;
14
- FormControlLabelProps?: Partial<FormControlLabelProps>;
15
- }
16
- export declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => JSX.Element;
17
- export declare const BaseCheckbox: ({ label, FormControlLabelProps, ...props }: Omit<CheckboxWithoutFormik, 'withFormik'>) => JSX.Element;
18
- export declare const FormikCheckbox: ({ label, name, FormControlLabelProps, ...props }: Omit<CheckboxWithFormik, 'withFormik'>) => JSX.Element;
19
- export {};
1
+ /// <reference types="react" />
2
+ import { CheckboxProps as MuiCheckboxProps, FormControlLabelProps } from '@mui/material';
3
+ declare type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
4
+ interface CheckboxWithFormik extends MuiCheckboxProps {
5
+ name: string;
6
+ label?: string;
7
+ withFormik?: true;
8
+ FormControlLabelProps?: Partial<FormControlLabelProps>;
9
+ }
10
+ interface CheckboxWithoutFormik extends MuiCheckboxProps {
11
+ name?: never;
12
+ label?: string;
13
+ withFormik: false;
14
+ FormControlLabelProps?: Partial<FormControlLabelProps>;
15
+ }
16
+ export declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => JSX.Element;
17
+ export declare const BaseCheckbox: ({ label, FormControlLabelProps, ...props }: Omit<CheckboxWithoutFormik, 'withFormik'>) => JSX.Element;
18
+ export declare const FormikCheckbox: ({ label, name, FormControlLabelProps, ...props }: Omit<CheckboxWithFormik, 'withFormik'>) => JSX.Element;
19
+ export {};
@@ -1,16 +1,16 @@
1
- /// <reference types="react" />
2
- import { DialogProps } from "@mui/material";
3
- interface DialogOptionsProps {
4
- label: string;
5
- focus?: boolean;
6
- cb(label: string): void;
7
- }
8
- interface DialogCustomProps extends DialogProps {
9
- open: boolean;
10
- title: string;
11
- body: string;
12
- options: DialogOptionsProps[];
13
- loading: boolean;
14
- }
15
- declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => JSX.Element;
16
- export { Dialog };
1
+ /// <reference types="react" />
2
+ import { DialogProps } from "@mui/material";
3
+ interface DialogOptionsProps {
4
+ label: string;
5
+ focus?: boolean;
6
+ cb(label: string): void;
7
+ }
8
+ interface DialogCustomProps extends DialogProps {
9
+ open: boolean;
10
+ title: string;
11
+ body: string;
12
+ options: DialogOptionsProps[];
13
+ loading: boolean;
14
+ }
15
+ declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => JSX.Element;
16
+ export { Dialog };
@@ -1,24 +1,24 @@
1
- /// <reference types="react" />
2
- import { TableCellProps } from '@mui/material';
3
- import { ColumnsProps } from '.';
4
- interface GridCellProps {
5
- focusedIndex: {
6
- x: number;
7
- y: number;
8
- };
9
- rowIndex: number;
10
- columnIndex: number;
11
- isEditing: boolean;
12
- value: any;
13
- bordered?: boolean;
14
- onClick: () => void;
15
- onDoubleClick: () => void;
16
- onInputChange: (value: string) => void;
17
- setCanSave: (value: boolean) => void;
18
- canEditTable: boolean;
19
- tableCellProps?: TableCellProps;
20
- validationErrors?: string[];
21
- column: ColumnsProps<any>;
22
- }
23
- export declare const GridCell: ({ value, focusedIndex, canEditTable, columnIndex, rowIndex, isEditing, onInputChange, bordered, onClick, onDoubleClick, setCanSave, tableCellProps, validationErrors, column }: GridCellProps) => JSX.Element;
24
- export {};
1
+ /// <reference types="react" />
2
+ import { TableCellProps } from '@mui/material';
3
+ import { ColumnsProps } from '.';
4
+ interface GridCellProps {
5
+ focusedIndex: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ rowIndex: number;
10
+ columnIndex: number;
11
+ isEditing: boolean;
12
+ value: any;
13
+ bordered?: boolean;
14
+ onClick: () => void;
15
+ onDoubleClick: () => void;
16
+ onInputChange: (value: string) => void;
17
+ setCanSave: (value: boolean) => void;
18
+ canEditTable: boolean;
19
+ tableCellProps?: TableCellProps;
20
+ validationErrors?: string[];
21
+ column: ColumnsProps<any>;
22
+ }
23
+ export declare const GridCell: ({ value, focusedIndex, canEditTable, columnIndex, rowIndex, isEditing, onInputChange, bordered, onClick, onDoubleClick, setCanSave, tableCellProps, validationErrors, column }: GridCellProps) => JSX.Element;
24
+ export {};
@@ -1,16 +1,16 @@
1
- /// <reference types="react" />
2
- import { BaseTextFieldProps } from '@mui/material';
3
- import { InputSelectCellProps } from '../GridSelect';
4
- export interface GridInputProps extends BaseTextFieldProps {
5
- onDefaultValue?: (value: string) => string;
6
- }
7
- export interface InputCellProps {
8
- currentValue: string;
9
- defaultValue?: string;
10
- inputProps?: GridInputProps;
11
- type?: GridInputProps['type'] | 'select';
12
- select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
13
- onInputChange: (value: string) => void;
14
- setCanSave: (value: boolean) => void;
15
- }
16
- export declare const InputCell: (props: InputCellProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { BaseTextFieldProps } from '@mui/material';
3
+ import { InputSelectCellProps } from '../GridSelect';
4
+ export interface GridInputProps extends BaseTextFieldProps {
5
+ onDefaultValue?: (value: string) => string;
6
+ }
7
+ export interface InputCellProps {
8
+ currentValue: string;
9
+ defaultValue?: string;
10
+ inputProps?: GridInputProps;
11
+ type?: GridInputProps['type'] | 'select';
12
+ select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
13
+ onInputChange: (value: string) => void;
14
+ setCanSave: (value: boolean) => void;
15
+ }
16
+ export declare const InputCell: (props: InputCellProps) => JSX.Element;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- export interface InputAutocompleteCellProps {
3
- options: any[];
4
- label: string;
5
- value: string;
6
- setCanSave: (value: boolean) => void;
7
- onInputChange: (value: string) => void;
8
- currentValue?: string;
9
- defaultValue?: string;
10
- }
11
- export declare const InputAutocompleteCell: ({ options, label, value, onInputChange, currentValue, defaultValue: ExternalDefaultValue }: InputAutocompleteCellProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ export interface InputAutocompleteCellProps {
3
+ options: any[];
4
+ label: string;
5
+ value: string;
6
+ setCanSave: (value: boolean) => void;
7
+ onInputChange: (value: string) => void;
8
+ currentValue?: string;
9
+ defaultValue?: string;
10
+ }
11
+ export declare const InputAutocompleteCell: ({ options, label, value, onInputChange, currentValue, defaultValue: ExternalDefaultValue }: InputAutocompleteCellProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { InputCellProps } from '../GridInput';
3
- export declare const InputTextCell: ({ defaultValue, currentValue, inputProps, onInputChange }: InputCellProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { InputCellProps } from '../GridInput';
3
+ export declare const InputTextCell: ({ defaultValue, currentValue, inputProps, onInputChange }: InputCellProps) => JSX.Element;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- export interface InputSelectCellProps {
3
- options: any[];
4
- label: string;
5
- value: string;
6
- setCanSave: (value: boolean) => void;
7
- onInputChange: (value: string) => void;
8
- currentValue?: string;
9
- }
10
- export declare const InputSelectCell: ({ options, label, value, setCanSave, onInputChange, currentValue }: InputSelectCellProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ export interface InputSelectCellProps {
3
+ options: any[];
4
+ label: string;
5
+ value: string;
6
+ setCanSave: (value: boolean) => void;
7
+ onInputChange: (value: string) => void;
8
+ currentValue?: string;
9
+ }
10
+ export declare const InputSelectCell: ({ options, label, value, setCanSave, onInputChange, currentValue }: InputSelectCellProps) => JSX.Element;
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { ColumnsProps } from '..';
3
- interface NewRowProps {
4
- columns: ColumnsProps<any>[];
5
- hasCheckbox: boolean;
6
- maxPositions: {
7
- x: number;
8
- y: number;
9
- };
10
- onSaveNewRow?: (prop: any) => void;
11
- }
12
- export declare const NewRow: ({ columns, hasCheckbox, maxPositions, onSaveNewRow }: NewRowProps) => JSX.Element;
13
- export {};
1
+ /// <reference types="react" />
2
+ import { ColumnsProps } from '..';
3
+ interface NewRowProps {
4
+ columns: ColumnsProps<any>[];
5
+ hasCheckbox: boolean;
6
+ maxPositions: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ onSaveNewRow?: (prop: any) => void;
11
+ }
12
+ export declare const NewRow: ({ columns, hasCheckbox, maxPositions, onSaveNewRow }: NewRowProps) => JSX.Element;
13
+ export {};
@@ -1,52 +1,52 @@
1
- /// <reference types="react" />
2
- import { TableCellProps } from '@mui/material';
3
- import { GridInputProps } from './GridInput';
4
- import { InputSelectCellProps } from './GridSelect';
5
- export interface onSaveOptions<T> {
6
- prop: keyof T;
7
- newValue: string;
8
- index: number;
9
- }
10
- export interface ColumnsProps<T> {
11
- id?: string | number;
12
- name: keyof T | '';
13
- label: string;
14
- visible?: boolean;
15
- type?: GridInputProps['type'] | 'select' | 'autocomplete';
16
- inputProps?: GridInputProps;
17
- select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
18
- formatLabelValue?: (value: string) => string;
19
- required?: boolean;
20
- TableCellProps?: TableCellProps;
21
- newRow?: {
22
- defaultValue?: string;
23
- };
24
- }
25
- interface EditableGridProps<T> {
26
- columns: ColumnsProps<T>[];
27
- data: Array<T>;
28
- primaryKey: keyof T;
29
- focusedIndex: {
30
- x: number;
31
- y: number;
32
- };
33
- isEditing: boolean;
34
- bordered?: boolean;
35
- onSave: (item: T, options: onSaveOptions<T>) => void;
36
- setFocusedIndex: (props: {
37
- x: number;
38
- y: number;
39
- }) => void;
40
- setIsEditing: (value: boolean) => void;
41
- canEditTable: boolean;
42
- setCanEditTable: (value: boolean) => void;
43
- selectedRows: number[];
44
- setSelectedRows: (value: number[]) => void;
45
- checkbox?: boolean;
46
- checkMultiple?: boolean;
47
- onSaveNewRow?: (newRow: T) => void;
48
- canInsertNewRow: boolean;
49
- setCanInsertNewRow: (value: boolean) => void;
50
- }
51
- export declare function EditableGrid<T extends Record<string, any>>({ columns, data, primaryKey, onSave, setFocusedIndex, setIsEditing, focusedIndex, isEditing, bordered, canEditTable, setCanEditTable, selectedRows, setSelectedRows, checkbox, checkMultiple, onSaveNewRow, canInsertNewRow }: EditableGridProps<T>): JSX.Element;
52
- export {};
1
+ /// <reference types="react" />
2
+ import { TableCellProps } from '@mui/material';
3
+ import { GridInputProps } from './GridInput';
4
+ import { InputSelectCellProps } from './GridSelect';
5
+ export interface onSaveOptions<T> {
6
+ prop: keyof T;
7
+ newValue: string;
8
+ index: number;
9
+ }
10
+ export interface ColumnsProps<T> {
11
+ id?: string | number;
12
+ name: keyof T | '';
13
+ label: string;
14
+ visible?: boolean;
15
+ type?: GridInputProps['type'] | 'select' | 'autocomplete';
16
+ inputProps?: GridInputProps;
17
+ select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
18
+ formatLabelValue?: (value: string) => string;
19
+ required?: boolean;
20
+ TableCellProps?: TableCellProps;
21
+ newRow?: {
22
+ defaultValue?: string;
23
+ };
24
+ }
25
+ interface EditableGridProps<T> {
26
+ columns: ColumnsProps<T>[];
27
+ data: Array<T>;
28
+ primaryKey: keyof T;
29
+ focusedIndex: {
30
+ x: number;
31
+ y: number;
32
+ };
33
+ isEditing: boolean;
34
+ bordered?: boolean;
35
+ onSave: (item: T, options: onSaveOptions<T>) => void;
36
+ setFocusedIndex: (props: {
37
+ x: number;
38
+ y: number;
39
+ }) => void;
40
+ setIsEditing: (value: boolean) => void;
41
+ canEditTable: boolean;
42
+ setCanEditTable: (value: boolean) => void;
43
+ selectedRows: number[];
44
+ setSelectedRows: (value: number[]) => void;
45
+ checkbox?: boolean;
46
+ checkMultiple?: boolean;
47
+ onSaveNewRow?: (newRow: T) => void;
48
+ canInsertNewRow: boolean;
49
+ setCanInsertNewRow: (value: boolean) => void;
50
+ }
51
+ export declare function EditableGrid<T extends Record<string, any>>({ columns, data, primaryKey, onSave, setFocusedIndex, setIsEditing, focusedIndex, isEditing, bordered, canEditTable, setCanEditTable, selectedRows, setSelectedRows, checkbox, checkMultiple, onSaveNewRow, canInsertNewRow }: EditableGridProps<T>): JSX.Element;
52
+ export {};
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import { ColumnTitleProps } from './Grid';
3
- interface AutoCreatedRows {
4
- columns: ColumnTitleProps[];
5
- tableData: any[];
6
- primaryKey: string;
7
- }
8
- export declare const AutoCreatedRows: ({ tableData, columns, primaryKey }: AutoCreatedRows) => JSX.Element;
9
- export {};
1
+ /// <reference types="react" />
2
+ import { ColumnTitleProps } from './Grid';
3
+ interface AutoCreatedRows {
4
+ columns: ColumnTitleProps[];
5
+ tableData: any[];
6
+ primaryKey: string;
7
+ }
8
+ export declare const AutoCreatedRows: ({ tableData, columns, primaryKey }: AutoCreatedRows) => JSX.Element;
9
+ export {};
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
- import { TextFieldProps } from '@mui/material';
3
- import { OnSaveProps } from '.';
4
- export interface DefaultInputProps {
5
- name: string;
6
- rowData: Record<string, any>;
7
- isEditing: boolean;
8
- fullWidth?: boolean;
9
- TextFieldProps?: TextFieldProps;
10
- type?: TextFieldProps['type'];
11
- formatInputDefautvalue?: (value: string) => string;
12
- setIsEditing(value: boolean): void;
13
- onUpdateValue: (value: string) => void;
14
- onSave: (props: OnSaveProps) => void;
15
- handleCancelEditing: () => void;
16
- }
17
- export declare const DefaultInput: (allProps: DefaultInputProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from '@mui/material';
3
+ import { OnSaveProps } from '.';
4
+ export interface DefaultInputProps {
5
+ name: string;
6
+ rowData: Record<string, any>;
7
+ isEditing: boolean;
8
+ fullWidth?: boolean;
9
+ TextFieldProps?: TextFieldProps;
10
+ type?: TextFieldProps['type'];
11
+ formatInputDefautvalue?: (value: string) => string;
12
+ setIsEditing(value: boolean): void;
13
+ onUpdateValue: (value: string) => void;
14
+ onSave: (props: OnSaveProps) => void;
15
+ handleCancelEditing: () => void;
16
+ }
17
+ export declare const DefaultInput: (allProps: DefaultInputProps) => JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { DefaultInputProps } from './DefaultInput';
3
- import IMask from 'imask';
4
- interface InputMaskProps extends Omit<DefaultInputProps, 'onUpdateValue'> {
5
- mask: IMask.AnyMaskedOptions;
6
- }
7
- export declare const InputMask: (allProps: InputMaskProps) => JSX.Element;
8
- export {};
1
+ /// <reference types="react" />
2
+ import { DefaultInputProps } from './DefaultInput';
3
+ import IMask from 'imask';
4
+ interface InputMaskProps extends Omit<DefaultInputProps, 'onUpdateValue'> {
5
+ mask: IMask.AnyMaskedOptions;
6
+ }
7
+ export declare const InputMask: (allProps: InputMaskProps) => JSX.Element;
8
+ export {};
@@ -1,24 +1,24 @@
1
- /// <reference types="react" />
2
- import { TableCellProps, TextFieldProps } from '@mui/material';
3
- interface EditableTableCellProps extends TableCellProps {
4
- name: string;
5
- TextFieldProps?: TextFieldProps;
6
- type?: TextFieldProps['type'];
7
- fullWidth?: boolean;
8
- rowData?: Record<string, any>;
9
- mask?: IMask.AnyMaskedOptions;
10
- bordered?: boolean;
11
- rowIndex?: string | number;
12
- formatCellValue?: (value: string) => string;
13
- formatInputDefautvalue?: (value: string) => string;
14
- onSave?: (props: OnSaveProps) => void;
15
- onCancel?: () => void;
16
- }
17
- export interface OnSaveProps {
18
- name: string;
19
- event: FocusEvent;
20
- value: string;
21
- data: Record<string, any>;
22
- }
23
- export declare const EditableTableCell: (allProps: EditableTableCellProps) => JSX.Element;
24
- export {};
1
+ /// <reference types="react" />
2
+ import { TableCellProps, TextFieldProps } from '@mui/material';
3
+ interface EditableTableCellProps extends TableCellProps {
4
+ name: string;
5
+ TextFieldProps?: TextFieldProps;
6
+ type?: TextFieldProps['type'];
7
+ fullWidth?: boolean;
8
+ rowData?: Record<string, any>;
9
+ mask?: IMask.AnyMaskedOptions;
10
+ bordered?: boolean;
11
+ rowIndex?: string | number;
12
+ formatCellValue?: (value: string) => string;
13
+ formatInputDefautvalue?: (value: string) => string;
14
+ onSave?: (props: OnSaveProps) => void;
15
+ onCancel?: () => void;
16
+ }
17
+ export interface OnSaveProps {
18
+ name: string;
19
+ event: FocusEvent;
20
+ value: string;
21
+ data: Record<string, any>;
22
+ }
23
+ export declare const EditableTableCell: (allProps: EditableTableCellProps) => JSX.Element;
24
+ export {};
@@ -1,13 +1,13 @@
1
- import { FC, MutableRefObject, ReactNode } from 'react';
2
- interface FiltersProps {
3
- noFilters?: boolean;
4
- selectedFilters: Record<string, any>[];
5
- handleCloseFilter: (item: any) => void;
6
- customButtons: ReactNode;
7
- noFilterButtons?: boolean;
8
- searchAnchorEl: MutableRefObject<HTMLElement | null>;
9
- setOpenSearch: (value: boolean) => void;
10
- setAnchorEl: (item: HTMLElement) => void;
11
- }
12
- export declare const FiltersBar: FC<FiltersProps>;
13
- export {};
1
+ import { FC, MutableRefObject, ReactNode } from 'react';
2
+ interface FiltersProps {
3
+ noFilters?: boolean;
4
+ selectedFilters: Record<string, any>[];
5
+ handleCloseFilter: (item: any) => void;
6
+ customButtons: ReactNode;
7
+ noFilterButtons?: boolean;
8
+ searchAnchorEl: MutableRefObject<HTMLElement | null>;
9
+ setOpenSearch: (value: boolean) => void;
10
+ setAnchorEl: (item: HTMLElement) => void;
11
+ }
12
+ export declare const FiltersBar: FC<FiltersProps>;
13
+ export {};