@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,33 +1,33 @@
1
- import React, { PropsWithChildren, ReactNode } from 'react';
2
- import { TableCellProps } from '@mui/material';
3
- export interface ColumnTitleProps {
4
- name: string;
5
- label: string;
6
- transformer?: (value: string | number | Date) => string;
7
- sx?: TableCellProps['sx'];
8
- }
9
- export interface FilterProps {
10
- column: string;
11
- value: string;
12
- transformer?: (value: string | number | Date) => string;
13
- }
14
- export declare type IFilter = FilterProps;
15
- export interface GridProps<T> {
16
- columnTitles: ColumnTitleProps[];
17
- defaultData: T[];
18
- tableData: T[];
19
- selectedFilters: FilterProps[];
20
- setSelectedFilters(value: FilterProps[]): void;
21
- setTableData(value: T[]): void;
22
- updateFilters(value: Record<string, any>[]): void;
23
- rowOptions?: number[];
24
- footer?: ReactNode;
25
- customButtons?: ReactNode;
26
- isLoading?: boolean;
27
- noFilterButtons?: boolean;
28
- noPagination?: boolean;
29
- noFilters?: boolean;
30
- primaryKey?: string;
31
- }
32
- declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps<ObjectType>>) => JSX.Element;
33
- export default Grid;
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
2
+ import { TableCellProps } from '@mui/material';
3
+ export interface ColumnTitleProps {
4
+ name: string;
5
+ label: string;
6
+ transformer?: (value: string | number | Date) => string;
7
+ sx?: TableCellProps['sx'];
8
+ }
9
+ export interface FilterProps {
10
+ column: string;
11
+ value: string;
12
+ transformer?: (value: string | number | Date) => string;
13
+ }
14
+ export declare type IFilter = FilterProps;
15
+ export interface GridProps<T> {
16
+ columnTitles: ColumnTitleProps[];
17
+ defaultData: T[];
18
+ tableData: T[];
19
+ selectedFilters: FilterProps[];
20
+ setSelectedFilters(value: FilterProps[]): void;
21
+ setTableData(value: T[]): void;
22
+ updateFilters(value: Record<string, any>[]): void;
23
+ rowOptions?: number[];
24
+ footer?: ReactNode;
25
+ customButtons?: ReactNode;
26
+ isLoading?: boolean;
27
+ noFilterButtons?: boolean;
28
+ noPagination?: boolean;
29
+ noFilters?: boolean;
30
+ primaryKey?: string;
31
+ }
32
+ declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps<ObjectType>>) => JSX.Element;
33
+ export default Grid;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import { ColumnTitleProps } from './Grid';
3
- interface GridHeaderProps {
4
- titles?: ColumnTitleProps[];
5
- orderBy: string;
6
- order: 'desc' | 'asc' | undefined;
7
- setOrder(value: string | undefined): void;
8
- setOrderBy(value: string): void;
9
- }
10
- export declare const GridHeader: ({ setOrder, setOrderBy, order, orderBy, titles }: GridHeaderProps) => JSX.Element;
11
- export {};
1
+ /// <reference types="react" />
2
+ import { ColumnTitleProps } from './Grid';
3
+ interface GridHeaderProps {
4
+ titles?: ColumnTitleProps[];
5
+ orderBy: string;
6
+ order: 'desc' | 'asc' | undefined;
7
+ setOrder(value: string | undefined): void;
8
+ setOrderBy(value: string): void;
9
+ }
10
+ export declare const GridHeader: ({ setOrder, setOrderBy, order, orderBy, titles }: GridHeaderProps) => JSX.Element;
11
+ export {};
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { TableCellProps } from '@mui/material';
3
- export declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => JSX.Element>;
1
+ import React from 'react';
2
+ import { TableCellProps } from '@mui/material';
3
+ export declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => JSX.Element>;
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { TableRowProps } from '@mui/material';
3
- import { OnSaveProps } from './EditableTableCell';
4
- interface CustomTableRowProps extends TableRowProps {
5
- striped?: boolean;
6
- bordered?: boolean;
7
- index?: number;
8
- rowData?: Record<string, any>;
9
- onSave?: (props: OnSaveProps) => void;
10
- children: React.ReactNode;
11
- }
12
- export declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => JSX.Element>;
13
- export {};
1
+ import React from 'react';
2
+ import { TableRowProps } from '@mui/material';
3
+ import { OnSaveProps } from './EditableTableCell';
4
+ interface CustomTableRowProps extends TableRowProps {
5
+ striped?: boolean;
6
+ bordered?: boolean;
7
+ index?: number;
8
+ rowData?: Record<string, any>;
9
+ onSave?: (props: OnSaveProps) => void;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => JSX.Element>;
13
+ export {};
@@ -1,6 +1,6 @@
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
+ 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,5 +1,5 @@
1
- import { FilterProps } from './Grid';
2
- export declare function filterData<T>(filters: FilterProps[], defaultData: {
3
- current: T[];
4
- }): T[];
5
- export declare function getPropertyValue(obj: Record<string, any>, property: string): string;
1
+ import { FilterProps } from './Grid';
2
+ export declare function filterData<T>(filters: FilterProps[], defaultData: {
3
+ current: T[];
4
+ }): T[];
5
+ export declare function getPropertyValue(obj: Record<string, any>, property: string): string;
@@ -1,12 +1,12 @@
1
- import { FC } from 'react';
2
- import { StandardTextFieldProps } from '@mui/material';
3
- interface InputProps extends StandardTextFieldProps {
4
- name: string;
5
- label: string;
6
- shrink?: boolean;
7
- withFormik?: boolean;
8
- }
9
- export declare const Input: FC<InputProps>;
10
- export declare const BaseInput: (props: InputProps) => JSX.Element;
11
- export declare const FormikInput: FC<InputProps>;
12
- export {};
1
+ import { FC } from 'react';
2
+ import { StandardTextFieldProps } from '@mui/material';
3
+ interface InputProps extends StandardTextFieldProps {
4
+ name: string;
5
+ label: string;
6
+ shrink?: boolean;
7
+ withFormik?: boolean;
8
+ }
9
+ export declare const Input: FC<InputProps>;
10
+ export declare const BaseInput: (props: InputProps) => JSX.Element;
11
+ export declare const FormikInput: FC<InputProps>;
12
+ export {};
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import IMask from 'imask';
3
- import { StandardTextFieldProps } from '@mui/material';
4
- interface InputMaskProps extends Partial<StandardTextFieldProps> {
5
- name: string;
6
- label: string;
7
- withFormik?: boolean;
8
- mask: IMask.AnyMaskedOptions;
9
- onChangeValue?: (value: string, unmaskedValue: string) => void;
10
- }
11
- export declare function InputMask({ withFormik, ...rest }: InputMaskProps): JSX.Element;
12
- export declare function FormikInputMask({ mask, defaultValue, name, ...rest }: InputMaskProps): JSX.Element;
13
- export {};
1
+ /// <reference types="react" />
2
+ import IMask from 'imask';
3
+ import { StandardTextFieldProps } from '@mui/material';
4
+ interface InputMaskProps extends Partial<StandardTextFieldProps> {
5
+ name: string;
6
+ label: string;
7
+ withFormik?: boolean;
8
+ mask: IMask.AnyMaskedOptions;
9
+ onChangeValue?: (value: string, unmaskedValue: string) => void;
10
+ }
11
+ export declare function InputMask({ withFormik, ...rest }: InputMaskProps): JSX.Element;
12
+ export declare function FormikInputMask({ mask, defaultValue, name, ...rest }: InputMaskProps): JSX.Element;
13
+ export {};
@@ -1,9 +1,9 @@
1
- import { ReactNode } from 'react';
2
- import { ButtonProps, CircularProgressProps } from '@mui/material';
3
- interface LargeButtonProps extends ButtonProps {
4
- loading?: boolean;
5
- children: ReactNode;
6
- CircularProgressProps?: CircularProgressProps;
7
- }
8
- export declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
9
- export {};
1
+ import { ReactNode } from 'react';
2
+ import { ButtonProps, CircularProgressProps } from '@mui/material';
3
+ interface LargeButtonProps extends ButtonProps {
4
+ loading?: boolean;
5
+ children: ReactNode;
6
+ CircularProgressProps?: CircularProgressProps;
7
+ }
8
+ export declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
9
+ export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { ModalProps as MuiModalProps } from '@mui/material';
3
- declare type ModalProps = {
4
- open: boolean;
5
- onClose: () => void;
6
- } & MuiModalProps;
7
- export declare const Modal: ({ open, onClose, ...rest }: ModalProps) => JSX.Element;
8
- export {};
1
+ /// <reference types="react" />
2
+ import { ModalProps as MuiModalProps } from '@mui/material';
3
+ declare type ModalProps = {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ } & MuiModalProps;
7
+ export declare const Modal: ({ open, onClose, ...rest }: ModalProps) => JSX.Element;
8
+ export {};
@@ -1,23 +1,23 @@
1
- /// <reference types="react" />
2
- import { RadioGroupProps } from '@mui/material';
3
- declare type RadioOptionProps = {
4
- value: string | number | boolean;
5
- label: string;
6
- };
7
- declare type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
8
- interface RadioWithFormik extends RadioGroupProps {
9
- name: string;
10
- label?: string;
11
- options: RadioOptionProps[];
12
- withFormik?: true;
13
- }
14
- interface RadioWithoutFormik extends RadioGroupProps {
15
- name?: never;
16
- label?: string;
17
- options: RadioOptionProps[];
18
- withFormik: false;
19
- }
20
- export declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => JSX.Element;
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
- export {};
1
+ /// <reference types="react" />
2
+ import { RadioGroupProps } from '@mui/material';
3
+ declare type RadioOptionProps = {
4
+ value: string | number | boolean;
5
+ label: string;
6
+ };
7
+ declare type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
8
+ interface RadioWithFormik extends RadioGroupProps {
9
+ name: string;
10
+ label?: string;
11
+ options: RadioOptionProps[];
12
+ withFormik?: true;
13
+ }
14
+ interface RadioWithoutFormik extends RadioGroupProps {
15
+ name?: never;
16
+ label?: string;
17
+ options: RadioOptionProps[];
18
+ withFormik: false;
19
+ }
20
+ export declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => JSX.Element;
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
+ export {};
@@ -1,17 +1,17 @@
1
- import { FC } from 'react';
2
- import { FormControlProps, InputLabelProps, SelectProps as MuiSelectProps } from '@mui/material';
3
- interface CustomInputLabelProps extends InputLabelProps {
4
- size?: 'small';
5
- }
6
- interface SelectProps extends MuiSelectProps {
7
- name: string;
8
- label: string;
9
- defaultValue?: string;
10
- withFormik?: boolean;
11
- FormControlProps?: Partial<FormControlProps>;
12
- InputLabelProps?: Partial<CustomInputLabelProps>;
13
- }
14
- export declare const Select: FC<SelectProps>;
15
- export declare const BaseSelect: FC<SelectProps>;
16
- export declare const FormikSelect: FC<SelectProps>;
17
- export {};
1
+ import { FC } from 'react';
2
+ import { FormControlProps, InputLabelProps, SelectProps as MuiSelectProps } from '@mui/material';
3
+ interface CustomInputLabelProps extends InputLabelProps {
4
+ size?: 'small';
5
+ }
6
+ interface SelectProps extends MuiSelectProps {
7
+ name: string;
8
+ label: string;
9
+ defaultValue?: string;
10
+ withFormik?: boolean;
11
+ FormControlProps?: Partial<FormControlProps>;
12
+ InputLabelProps?: Partial<CustomInputLabelProps>;
13
+ }
14
+ export declare const Select: FC<SelectProps>;
15
+ export declare const BaseSelect: FC<SelectProps>;
16
+ export declare const FormikSelect: FC<SelectProps>;
17
+ export {};
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
2
- import { SwitchProps as MuiSwitchProps, FormControlLabelProps } from '@mui/material';
3
- declare type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
4
- interface SwitchWithFormik extends MuiSwitchProps {
5
- name: string;
6
- label?: string;
7
- withFormik?: true;
8
- FormControlLabelProps?: Partial<FormControlLabelProps>;
9
- }
10
- interface SwitchWithoutFormik extends MuiSwitchProps {
11
- name?: never;
12
- label?: string;
13
- withFormik: false;
14
- FormControlLabelProps?: Partial<FormControlLabelProps>;
15
- }
16
- export declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => JSX.Element;
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
- export {};
1
+ /// <reference types="react" />
2
+ import { SwitchProps as MuiSwitchProps, FormControlLabelProps } from '@mui/material';
3
+ declare type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
4
+ interface SwitchWithFormik extends MuiSwitchProps {
5
+ name: string;
6
+ label?: string;
7
+ withFormik?: true;
8
+ FormControlLabelProps?: Partial<FormControlLabelProps>;
9
+ }
10
+ interface SwitchWithoutFormik extends MuiSwitchProps {
11
+ name?: never;
12
+ label?: string;
13
+ withFormik: false;
14
+ FormControlLabelProps?: Partial<FormControlLabelProps>;
15
+ }
16
+ export declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => JSX.Element;
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
+ export {};
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- export declare function getTabProps(index: string): {
3
- id: string;
4
- 'aria-controls': string;
5
- };
6
- export interface TabPanelProps {
7
- children: React.ReactNode;
8
- value: number;
9
- index: number;
10
- }
11
- export declare const TabPanel: (props: TabPanelProps) => JSX.Element;
1
+ import React from 'react';
2
+ export declare function getTabProps(index: string): {
3
+ id: string;
4
+ 'aria-controls': string;
5
+ };
6
+ export interface TabPanelProps {
7
+ children: React.ReactNode;
8
+ value: number;
9
+ index: number;
10
+ }
11
+ export declare const TabPanel: (props: TabPanelProps) => JSX.Element;
@@ -1,23 +1,23 @@
1
- import { onSaveOptions } from '../EditableGrid';
2
- export declare type useEditableGridResponseProps<T> = {
3
- data: Array<T>;
4
- focusedIndex: {
5
- x: number;
6
- y: number;
7
- };
8
- isEditing: boolean;
9
- setData: (props: Array<T>) => void;
10
- setIsEditing: (value: boolean) => void;
11
- setFocusedIndex: (props: {
12
- x: number;
13
- y: number;
14
- }) => void;
15
- onSave: (newItem: T, props: onSaveOptions<T>) => void;
16
- canEditTable: boolean;
17
- setCanEditTable: (value: boolean) => void;
18
- selectedRows: number[];
19
- setSelectedRows: (value: number[]) => void;
20
- canInsertNewRow: boolean;
21
- setCanInsertNewRow: (value: boolean) => void;
22
- };
23
- export declare function useEditableGrid<T>(): useEditableGridResponseProps<T>;
1
+ import { onSaveOptions } from '../EditableGrid';
2
+ export declare type useEditableGridResponseProps<T> = {
3
+ data: Array<T>;
4
+ focusedIndex: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ isEditing: boolean;
9
+ setData: (props: Array<T>) => void;
10
+ setIsEditing: (value: boolean) => void;
11
+ setFocusedIndex: (props: {
12
+ x: number;
13
+ y: number;
14
+ }) => void;
15
+ onSave: (newItem: T, props: onSaveOptions<T>) => void;
16
+ canEditTable: boolean;
17
+ setCanEditTable: (value: boolean) => void;
18
+ selectedRows: number[];
19
+ setSelectedRows: (value: number[]) => void;
20
+ canInsertNewRow: boolean;
21
+ setCanInsertNewRow: (value: boolean) => void;
22
+ };
23
+ export declare function useEditableGrid<T>(): useEditableGridResponseProps<T>;
@@ -1 +1 @@
1
- export declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
1
+ export declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
@@ -1,17 +1,17 @@
1
- export declare type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in';
2
- export declare type FilterProps = {
3
- id?: string;
4
- prop: string;
5
- value: unknown;
6
- compareType: FilterCompareType;
7
- };
8
- export declare function useFilter(): {
9
- filters: FilterProps[];
10
- filterBy: (newFilter: FilterProps) => void;
11
- removeFilter: (prop: string) => void;
12
- createFilter: typeof createFilter;
13
- clearAllFilters: () => void;
14
- };
15
- export declare function createFilter<T extends Record<string, any>>(filters: FilterProps[]): {
16
- apply: (item: T) => boolean;
17
- };
1
+ export declare type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in';
2
+ export declare type FilterProps = {
3
+ id?: string;
4
+ prop: string;
5
+ value: unknown;
6
+ compareType: FilterCompareType;
7
+ };
8
+ export declare function useFilter(): {
9
+ filters: FilterProps[];
10
+ filterBy: (newFilter: FilterProps) => void;
11
+ removeFilter: (prop: string) => void;
12
+ createFilter: typeof createFilter;
13
+ clearAllFilters: () => void;
14
+ };
15
+ export declare function createFilter<T extends Record<string, any>>(filters: FilterProps[]): {
16
+ apply: (item: T) => boolean;
17
+ };
@@ -1,23 +1,23 @@
1
- import { ColumnsProps } from '../BaseGrid';
2
- import { FilterProps } from './useFilter';
3
- interface UseGridProps {
4
- columns: ColumnsProps[];
5
- filters?: FilterProps[];
6
- rowsPerPageOptions?: number[];
7
- }
8
- export declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
9
- data: any[];
10
- set: (data: T[]) => void;
11
- onSortBy: (prop: string) => void;
12
- sortedBy: string;
13
- defaultData: T[];
14
- sortedDirection: "desc" | "asc";
15
- columns: ColumnsProps[];
16
- currentPage: number;
17
- totalNumberOfPages: number;
18
- onPageChange: (pageNumber: number) => void;
19
- setRowsPerPage: (rows: number) => void;
20
- rowsPerPageOptions: number[];
21
- rowsPerPage: number;
22
- };
23
- export {};
1
+ import { ColumnsProps } from '../BaseGrid';
2
+ import { FilterProps } from './useFilter';
3
+ interface UseGridProps {
4
+ columns: ColumnsProps[];
5
+ filters?: FilterProps[];
6
+ rowsPerPageOptions?: number[];
7
+ }
8
+ export declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
9
+ data: any[];
10
+ set: (data: T[]) => void;
11
+ onSortBy: (prop: string) => void;
12
+ sortedBy: string;
13
+ defaultData: T[];
14
+ sortedDirection: "desc" | "asc";
15
+ columns: ColumnsProps[];
16
+ currentPage: number;
17
+ totalNumberOfPages: number;
18
+ onPageChange: (pageNumber: number) => void;
19
+ setRowsPerPage: (rows: number) => void;
20
+ rowsPerPageOptions: number[];
21
+ rowsPerPage: number;
22
+ };
23
+ export {};
@@ -1,4 +1,4 @@
1
- export declare function useLoading<T = string>(): {
2
- isLoading: (prop: T) => boolean;
3
- setLoading: (prop: T, remove?: boolean) => void;
4
- };
1
+ export declare function useLoading<T = string>(): {
2
+ isLoading: (prop: T) => boolean;
3
+ setLoading: (prop: T, remove?: boolean) => void;
4
+ };
@@ -1,18 +1,18 @@
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';
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';
@@ -1,4 +1,4 @@
1
- export declare function GetInputLabel<T, K extends T[number]['name']>(columns: T): (columnName: K) => {
2
- label: any;
3
- name: any;
4
- };
1
+ export declare function GetInputLabel<T, K extends T[number]['name']>(columns: T): (columnName: K) => {
2
+ label: any;
3
+ name: any;
4
+ };
@@ -1 +1 @@
1
- export * from './components';
1
+ export * from './components';