@bluemarble/bm-components 0.0.50 → 0.0.52
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/esm/index.js +131 -117
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Autocomplete/index.d.ts +3 -3
- package/dist/esm/types/components/BaseGrid/Pagination/index.d.ts +1 -1
- package/dist/esm/types/components/BaseGrid/index.d.ts +4 -4
- package/dist/esm/types/components/Checkbox/index.d.ts +3 -3
- package/dist/esm/types/components/Dialog/index.d.ts +16 -0
- package/dist/esm/types/components/EditableGrid/GridCell.d.ts +3 -3
- package/dist/esm/types/components/EditableGrid/GridInput/index.d.ts +4 -4
- package/dist/esm/types/components/EditableGrid/GridInputAutocomplete/index.d.ts +1 -1
- package/dist/esm/types/components/EditableGrid/GridInputText/index.d.ts +2 -2
- package/dist/esm/types/components/EditableGrid/GridSelect/index.d.ts +1 -1
- package/dist/esm/types/components/EditableGrid/NewRow/index.d.ts +2 -2
- package/dist/esm/types/components/EditableGrid/index.d.ts +7 -7
- package/dist/esm/types/components/Grid/AutoCreatedRows.d.ts +2 -2
- package/dist/esm/types/components/Grid/EditableTableCell/DefaultInput.d.ts +3 -3
- package/dist/esm/types/components/Grid/EditableTableCell/InputMask.d.ts +3 -3
- package/dist/esm/types/components/Grid/EditableTableCell/index.d.ts +2 -2
- package/dist/esm/types/components/Grid/Filters.d.ts +1 -1
- package/dist/esm/types/components/Grid/Grid.d.ts +3 -3
- package/dist/esm/types/components/Grid/Header.d.ts +3 -3
- package/dist/esm/types/components/Grid/Td.d.ts +2 -2
- package/dist/esm/types/components/Grid/Tr.d.ts +3 -3
- package/dist/esm/types/components/Grid/index.d.ts +6 -6
- package/dist/esm/types/components/Grid/utils.d.ts +1 -1
- package/dist/esm/types/components/Input/index.d.ts +2 -2
- package/dist/esm/types/components/InputMask/index.d.ts +2 -2
- package/dist/esm/types/components/LargeButton/index.d.ts +2 -2
- package/dist/esm/types/components/Modal/index.d.ts +1 -1
- package/dist/esm/types/components/Radio/index.d.ts +3 -3
- package/dist/esm/types/components/Select/index.d.ts +3 -3
- package/dist/esm/types/components/Switch/index.d.ts +3 -3
- package/dist/esm/types/components/TabPanel/index.d.ts +2 -2
- package/dist/esm/types/components/hooks/useEditableGrid.d.ts +1 -1
- package/dist/esm/types/components/hooks/useFilter.d.ts +1 -1
- package/dist/esm/types/components/hooks/useGrid.d.ts +12 -11
- package/dist/esm/types/components/index.d.ts +18 -17
- package/dist/esm/types/components/utils/DateFormat.d.ts +269 -0
- package/dist/esm/types/components/utils/GetInputLabel.d.ts +1 -1
- package/dist/esm/types/components/utils/RouteHelper.d.ts +13 -0
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/index.d.ts +36 -21
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { AutocompleteProps as MuiAutocompleteProps, AutocompleteRenderInputParams } from
|
|
3
|
-
declare type MuiAutocompleteBaseProps<T> = Omit<MuiAutocompleteProps<T, boolean, undefined, boolean>,
|
|
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
4
|
interface AutocompleteWithoutProps<T> extends MuiAutocompleteBaseProps<T> {
|
|
5
5
|
name?: never;
|
|
6
6
|
withFormik: false;
|
|
@@ -8,5 +8,5 @@ declare type GridPaginationProps = {
|
|
|
8
8
|
onPageChange: (prop: number) => void;
|
|
9
9
|
setRowsPerPage: (prop: number) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const GridPagination: ({ currentPage, totalNumberOfPages, onPageChange, rowsPerPageOptions, setRowsPerPage, rowsPerPage, dense
|
|
11
|
+
export declare const GridPagination: ({ currentPage, totalNumberOfPages, onPageChange, rowsPerPageOptions, setRowsPerPage, rowsPerPage, dense }: GridPaginationProps) => JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { PaperProps, SxProps, TableBodyProps, TableHeadProps, TableProps } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PaperProps, SxProps, TableBodyProps, TableHeadProps, TableProps } from '@mui/material';
|
|
3
3
|
export interface ColumnsProps {
|
|
4
4
|
label: string;
|
|
5
5
|
name?: string;
|
|
@@ -12,7 +12,7 @@ interface GridProps {
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
fixedColumns?: boolean;
|
|
14
14
|
sortedBy: string;
|
|
15
|
-
sortedDirection:
|
|
15
|
+
sortedDirection: 'asc' | 'desc';
|
|
16
16
|
dense?: boolean;
|
|
17
17
|
onSortBy: (prop: string) => void;
|
|
18
18
|
paperProps?: PaperProps;
|
|
@@ -28,5 +28,5 @@ interface GridProps {
|
|
|
28
28
|
onPageChange: (pageNumber: number) => void;
|
|
29
29
|
setRowsPerPage: (rows: number) => void;
|
|
30
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
|
|
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
32
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CheckboxProps as MuiCheckboxProps, FormControlLabelProps } from
|
|
2
|
+
import { CheckboxProps as MuiCheckboxProps, FormControlLabelProps } from '@mui/material';
|
|
3
3
|
declare type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
|
|
4
4
|
interface CheckboxWithFormik extends MuiCheckboxProps {
|
|
5
5
|
name: string;
|
|
@@ -14,6 +14,6 @@ interface CheckboxWithoutFormik extends MuiCheckboxProps {
|
|
|
14
14
|
FormControlLabelProps?: Partial<FormControlLabelProps>;
|
|
15
15
|
}
|
|
16
16
|
export declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => JSX.Element;
|
|
17
|
-
export declare const BaseCheckbox: ({ label, FormControlLabelProps, ...props }: Omit<CheckboxWithoutFormik,
|
|
18
|
-
export declare const FormikCheckbox: ({ label, name, FormControlLabelProps, ...props }: Omit<CheckboxWithFormik,
|
|
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
19
|
export {};
|
|
@@ -0,0 +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,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableCellProps } from
|
|
3
|
-
import { ColumnsProps } from
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
3
|
+
import { ColumnsProps } from '.';
|
|
4
4
|
interface GridCellProps {
|
|
5
5
|
focusedIndex: {
|
|
6
6
|
x: number;
|
|
@@ -20,5 +20,5 @@ interface GridCellProps {
|
|
|
20
20
|
validationErrors?: string[];
|
|
21
21
|
column: ColumnsProps<any>;
|
|
22
22
|
}
|
|
23
|
-
export declare const GridCell: ({ value, focusedIndex, canEditTable, columnIndex, rowIndex, isEditing, onInputChange, bordered, onClick, onDoubleClick, setCanSave, tableCellProps, validationErrors, column
|
|
23
|
+
export declare const GridCell: ({ value, focusedIndex, canEditTable, columnIndex, rowIndex, isEditing, onInputChange, bordered, onClick, onDoubleClick, setCanSave, tableCellProps, validationErrors, column }: GridCellProps) => JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseTextFieldProps } from
|
|
3
|
-
import { InputSelectCellProps } from
|
|
2
|
+
import { BaseTextFieldProps } from '@mui/material';
|
|
3
|
+
import { InputSelectCellProps } from '../GridSelect';
|
|
4
4
|
export interface GridInputProps extends BaseTextFieldProps {
|
|
5
5
|
onDefaultValue?: (value: string) => string;
|
|
6
6
|
}
|
|
@@ -8,8 +8,8 @@ export interface InputCellProps {
|
|
|
8
8
|
currentValue: string;
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
inputProps?: GridInputProps;
|
|
11
|
-
type?: GridInputProps[
|
|
12
|
-
select?: Omit<InputSelectCellProps,
|
|
11
|
+
type?: GridInputProps['type'] | 'select';
|
|
12
|
+
select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
|
|
13
13
|
onInputChange: (value: string) => void;
|
|
14
14
|
setCanSave: (value: boolean) => void;
|
|
15
15
|
}
|
|
@@ -8,4 +8,4 @@ export interface InputAutocompleteCellProps {
|
|
|
8
8
|
currentValue?: string;
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const InputAutocompleteCell: ({ options, label, value, onInputChange, currentValue, defaultValue: ExternalDefaultValue
|
|
11
|
+
export declare const InputAutocompleteCell: ({ options, label, value, onInputChange, currentValue, defaultValue: ExternalDefaultValue }: InputAutocompleteCellProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InputCellProps } from
|
|
3
|
-
export declare const InputTextCell: ({ defaultValue, currentValue, inputProps, onInputChange
|
|
2
|
+
import { InputCellProps } from '../GridInput';
|
|
3
|
+
export declare const InputTextCell: ({ defaultValue, currentValue, inputProps, onInputChange }: InputCellProps) => JSX.Element;
|
|
@@ -7,4 +7,4 @@ export interface InputSelectCellProps {
|
|
|
7
7
|
onInputChange: (value: string) => void;
|
|
8
8
|
currentValue?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const InputSelectCell: ({ options, label, value, setCanSave, onInputChange, currentValue
|
|
10
|
+
export declare const InputSelectCell: ({ options, label, value, setCanSave, onInputChange, currentValue }: InputSelectCellProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnsProps } from
|
|
2
|
+
import { ColumnsProps } from '..';
|
|
3
3
|
interface NewRowProps {
|
|
4
4
|
columns: ColumnsProps<any>[];
|
|
5
5
|
hasCheckbox: boolean;
|
|
@@ -9,5 +9,5 @@ interface NewRowProps {
|
|
|
9
9
|
};
|
|
10
10
|
onSaveNewRow?: (prop: any) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const NewRow: ({ columns, hasCheckbox, maxPositions, onSaveNewRow
|
|
12
|
+
export declare const NewRow: ({ columns, hasCheckbox, maxPositions, onSaveNewRow }: NewRowProps) => JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableCellProps } from
|
|
3
|
-
import { GridInputProps } from
|
|
4
|
-
import { InputSelectCellProps } from
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
3
|
+
import { GridInputProps } from './GridInput';
|
|
4
|
+
import { InputSelectCellProps } from './GridSelect';
|
|
5
5
|
export interface onSaveOptions<T> {
|
|
6
6
|
prop: keyof T;
|
|
7
7
|
newValue: string;
|
|
@@ -9,12 +9,12 @@ export interface onSaveOptions<T> {
|
|
|
9
9
|
}
|
|
10
10
|
export interface ColumnsProps<T> {
|
|
11
11
|
id?: string | number;
|
|
12
|
-
name: keyof T |
|
|
12
|
+
name: keyof T | '';
|
|
13
13
|
label: string;
|
|
14
14
|
visible?: boolean;
|
|
15
|
-
type?: GridInputProps[
|
|
15
|
+
type?: GridInputProps['type'] | 'select' | 'autocomplete';
|
|
16
16
|
inputProps?: GridInputProps;
|
|
17
|
-
select?: Omit<InputSelectCellProps,
|
|
17
|
+
select?: Omit<InputSelectCellProps, 'setCanSave' | 'onInputChange'>;
|
|
18
18
|
formatLabelValue?: (value: string) => string;
|
|
19
19
|
required?: boolean;
|
|
20
20
|
TableCellProps?: TableCellProps;
|
|
@@ -48,5 +48,5 @@ interface EditableGridProps<T> {
|
|
|
48
48
|
canInsertNewRow: boolean;
|
|
49
49
|
setCanInsertNewRow: (value: boolean) => void;
|
|
50
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
|
|
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
52
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnTitleProps } from
|
|
2
|
+
import { ColumnTitleProps } from './Grid';
|
|
3
3
|
interface AutoCreatedRows {
|
|
4
4
|
columns: ColumnTitleProps[];
|
|
5
5
|
tableData: any[];
|
|
6
6
|
primaryKey: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const AutoCreatedRows: ({ tableData, columns, primaryKey
|
|
8
|
+
export declare const AutoCreatedRows: ({ tableData, columns, primaryKey }: AutoCreatedRows) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextFieldProps } from
|
|
3
|
-
import { OnSaveProps } from
|
|
2
|
+
import { TextFieldProps } from '@mui/material';
|
|
3
|
+
import { OnSaveProps } from '.';
|
|
4
4
|
export interface DefaultInputProps {
|
|
5
5
|
name: string;
|
|
6
6
|
rowData: Record<string, any>;
|
|
7
7
|
isEditing: boolean;
|
|
8
8
|
fullWidth?: boolean;
|
|
9
9
|
TextFieldProps?: TextFieldProps;
|
|
10
|
-
type?: TextFieldProps[
|
|
10
|
+
type?: TextFieldProps['type'];
|
|
11
11
|
formatInputDefautvalue?: (value: string) => string;
|
|
12
12
|
setIsEditing(value: boolean): void;
|
|
13
13
|
onUpdateValue: (value: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DefaultInputProps } from
|
|
3
|
-
import IMask from
|
|
4
|
-
interface InputMaskProps extends Omit<DefaultInputProps,
|
|
2
|
+
import { DefaultInputProps } from './DefaultInput';
|
|
3
|
+
import IMask from 'imask';
|
|
4
|
+
interface InputMaskProps extends Omit<DefaultInputProps, 'onUpdateValue'> {
|
|
5
5
|
mask: IMask.AnyMaskedOptions;
|
|
6
6
|
}
|
|
7
7
|
export declare const InputMask: (allProps: InputMaskProps) => JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableCellProps, TextFieldProps } from
|
|
2
|
+
import { TableCellProps, TextFieldProps } from '@mui/material';
|
|
3
3
|
interface EditableTableCellProps extends TableCellProps {
|
|
4
4
|
name: string;
|
|
5
5
|
TextFieldProps?: TextFieldProps;
|
|
6
|
-
type?: TextFieldProps[
|
|
6
|
+
type?: TextFieldProps['type'];
|
|
7
7
|
fullWidth?: boolean;
|
|
8
8
|
rowData?: Record<string, any>;
|
|
9
9
|
mask?: IMask.AnyMaskedOptions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { PropsWithChildren, ReactNode } from
|
|
2
|
-
import { TableCellProps } from
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
3
3
|
export interface ColumnTitleProps {
|
|
4
4
|
name: string;
|
|
5
5
|
label: string;
|
|
6
6
|
transformer?: (value: string | number | Date) => string;
|
|
7
|
-
sx?: TableCellProps[
|
|
7
|
+
sx?: TableCellProps['sx'];
|
|
8
8
|
}
|
|
9
9
|
export interface FilterProps {
|
|
10
10
|
column: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnTitleProps } from
|
|
2
|
+
import { ColumnTitleProps } from './Grid';
|
|
3
3
|
interface GridHeaderProps {
|
|
4
4
|
titles?: ColumnTitleProps[];
|
|
5
5
|
orderBy: string;
|
|
6
|
-
order:
|
|
6
|
+
order: 'desc' | 'asc' | undefined;
|
|
7
7
|
setOrder(value: string | undefined): void;
|
|
8
8
|
setOrderBy(value: string): void;
|
|
9
9
|
}
|
|
10
|
-
export declare const GridHeader: ({ setOrder, setOrderBy, order, orderBy, titles
|
|
10
|
+
export declare const GridHeader: ({ setOrder, setOrderBy, order, orderBy, titles }: GridHeaderProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TableCellProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
3
3
|
export declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => JSX.Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TableRowProps } from
|
|
3
|
-
import { OnSaveProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableRowProps } from '@mui/material';
|
|
3
|
+
import { OnSaveProps } from './EditableTableCell';
|
|
4
4
|
interface CustomTableRowProps extends TableRowProps {
|
|
5
5
|
striped?: boolean;
|
|
6
6
|
bordered?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default } from
|
|
2
|
-
export { ColumnTitleProps, IFilter, FilterProps } from
|
|
3
|
-
export { filterData } from
|
|
4
|
-
export { Tr } from
|
|
5
|
-
export { Td } from
|
|
6
|
-
export { EditableTableCell } from
|
|
1
|
+
export { default } from './Grid';
|
|
2
|
+
export { ColumnTitleProps, IFilter, FilterProps } from './Grid';
|
|
3
|
+
export { filterData } from './utils';
|
|
4
|
+
export { Tr } from './Tr';
|
|
5
|
+
export { Td } from './Td';
|
|
6
|
+
export { EditableTableCell } from './EditableTableCell';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import IMask from
|
|
3
|
-
import { StandardTextFieldProps } from
|
|
2
|
+
import IMask from 'imask';
|
|
3
|
+
import { StandardTextFieldProps } from '@mui/material';
|
|
4
4
|
interface InputMaskProps extends Partial<StandardTextFieldProps> {
|
|
5
5
|
name: string;
|
|
6
6
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ButtonProps, CircularProgressProps } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, CircularProgressProps } from '@mui/material';
|
|
3
3
|
interface LargeButtonProps extends ButtonProps {
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RadioGroupProps } from
|
|
2
|
+
import { RadioGroupProps } from '@mui/material';
|
|
3
3
|
declare type RadioOptionProps = {
|
|
4
4
|
value: string | number | boolean;
|
|
5
5
|
label: string;
|
|
@@ -18,6 +18,6 @@ interface RadioWithoutFormik extends RadioGroupProps {
|
|
|
18
18
|
withFormik: false;
|
|
19
19
|
}
|
|
20
20
|
export declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => JSX.Element;
|
|
21
|
-
export declare const BaseRadio: ({ label, options, ...rest }: Omit<RadioWithoutFormik,
|
|
22
|
-
export declare const FormikRadio: ({ label, name, options, ...rest }: Omit<RadioWithFormik,
|
|
21
|
+
export declare const BaseRadio: ({ label, options, ...rest }: Omit<RadioWithoutFormik, 'withFormik'>) => JSX.Element;
|
|
22
|
+
export declare const FormikRadio: ({ label, name, options, ...rest }: Omit<RadioWithFormik, 'withFormik'>) => JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { FormControlProps, InputLabelProps, SelectProps as MuiSelectProps } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormControlProps, InputLabelProps, SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
3
|
interface CustomInputLabelProps extends InputLabelProps {
|
|
4
|
-
size?:
|
|
4
|
+
size?: 'small';
|
|
5
5
|
}
|
|
6
6
|
interface SelectProps extends MuiSelectProps {
|
|
7
7
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SwitchProps as MuiSwitchProps, FormControlLabelProps } from
|
|
2
|
+
import { SwitchProps as MuiSwitchProps, FormControlLabelProps } from '@mui/material';
|
|
3
3
|
declare type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
|
|
4
4
|
interface SwitchWithFormik extends MuiSwitchProps {
|
|
5
5
|
name: string;
|
|
@@ -14,6 +14,6 @@ interface SwitchWithoutFormik extends MuiSwitchProps {
|
|
|
14
14
|
FormControlLabelProps?: Partial<FormControlLabelProps>;
|
|
15
15
|
}
|
|
16
16
|
export declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => JSX.Element;
|
|
17
|
-
export declare const BaseSwitch: ({ label, FormControlLabelProps, ...props }: Omit<SwitchWithoutFormik,
|
|
18
|
-
export declare const FormikSwitch: ({ label, name, FormControlLabelProps, ...props }: Omit<SwitchWithFormik,
|
|
17
|
+
export declare const BaseSwitch: ({ label, FormControlLabelProps, ...props }: Omit<SwitchWithoutFormik, 'withFormik'>) => JSX.Element;
|
|
18
|
+
export declare const FormikSwitch: ({ label, name, FormControlLabelProps, ...props }: Omit<SwitchWithFormik, 'withFormik'>) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { ColumnsProps } from
|
|
2
|
-
import { FilterProps } from
|
|
3
|
-
|
|
1
|
+
import { ColumnsProps } from '../BaseGrid';
|
|
2
|
+
import { FilterProps } from './useFilter';
|
|
3
|
+
declare type UseGridProps = {
|
|
4
4
|
columns: ColumnsProps[];
|
|
5
5
|
filters?: FilterProps[];
|
|
6
6
|
rowsPerPageOptions?: number[];
|
|
7
|
-
}
|
|
8
|
-
export declare
|
|
9
|
-
data:
|
|
10
|
-
set: (data: T[]) => void;
|
|
11
|
-
onSortBy: (prop: string) => void;
|
|
12
|
-
sortedBy: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type UseGridResponseProps<T> = {
|
|
9
|
+
data: T[];
|
|
13
10
|
defaultData: T[];
|
|
14
|
-
|
|
11
|
+
set: (data: T[]) => void;
|
|
15
12
|
columns: ColumnsProps[];
|
|
13
|
+
sortedBy: string;
|
|
14
|
+
sortedDirection: string;
|
|
15
|
+
onSortBy: (prop: string) => void;
|
|
16
16
|
currentPage: number;
|
|
17
17
|
totalNumberOfPages: number;
|
|
18
18
|
onPageChange: (pageNumber: number) => void;
|
|
19
|
-
setRowsPerPage: (
|
|
19
|
+
setRowsPerPage: (rowsPerPage: number) => void;
|
|
20
20
|
rowsPerPageOptions: number[];
|
|
21
21
|
rowsPerPage: number;
|
|
22
22
|
};
|
|
23
|
+
export declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): UseGridResponseProps<T>;
|
|
23
24
|
export {};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
export { default as Grid, IFilter, ColumnTitleProps, filterData, Tr, Td, EditableTableCell
|
|
2
|
-
export { Input } from
|
|
3
|
-
export { InputMask } from
|
|
4
|
-
export { Select } from
|
|
5
|
-
export { Autocomplete } from
|
|
6
|
-
export { Checkbox } from
|
|
7
|
-
export { Switch } from
|
|
8
|
-
export { Radio } from
|
|
9
|
-
export { LargeButton } from
|
|
10
|
-
export { TabPanel, getTabProps, TabPanelProps } from
|
|
11
|
-
export { ColumnsProps, BaseGrid } from
|
|
12
|
-
export { useGrid } from
|
|
13
|
-
export { FilterCompareType, FilterProps, createFilter, useFilter
|
|
14
|
-
export { useEvent } from
|
|
15
|
-
export { useLoading } from
|
|
16
|
-
export { Modal } from
|
|
17
|
-
export { GetInputLabel } from
|
|
1
|
+
export { default as Grid, IFilter, ColumnTitleProps, filterData, Tr, Td, EditableTableCell } from './Grid';
|
|
2
|
+
export { Input } from './Input';
|
|
3
|
+
export { InputMask } from './InputMask';
|
|
4
|
+
export { Select } from './Select';
|
|
5
|
+
export { Autocomplete } from './Autocomplete';
|
|
6
|
+
export { Checkbox } from './Checkbox';
|
|
7
|
+
export { Switch } from './Switch';
|
|
8
|
+
export { Radio } from './Radio';
|
|
9
|
+
export { LargeButton } from './LargeButton';
|
|
10
|
+
export { TabPanel, getTabProps, TabPanelProps } from './TabPanel';
|
|
11
|
+
export { ColumnsProps, BaseGrid } from './BaseGrid';
|
|
12
|
+
export { useGrid } from './hooks/useGrid';
|
|
13
|
+
export { FilterCompareType, FilterProps, createFilter, useFilter } from './hooks/useFilter';
|
|
14
|
+
export { useEvent } from './hooks/useEvent';
|
|
15
|
+
export { useLoading } from './hooks/useLoading';
|
|
16
|
+
export { Modal } from './Modal';
|
|
17
|
+
export { GetInputLabel } from './utils/GetInputLabel';
|
|
18
|
+
export { Dialog } from './Dialog';
|