@bluemarble/bm-components 0.0.43 → 0.0.45
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.
|
@@ -28,5 +28,5 @@ interface GridProps {
|
|
|
28
28
|
onPageChange: (pageNumber: number) => void;
|
|
29
29
|
setRowsPerPage: (rows: number) => void;
|
|
30
30
|
}
|
|
31
|
-
export declare function
|
|
31
|
+
export declare function BaseGrid({ columns: columnsData, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, }: GridProps): JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -8,7 +8,9 @@ export { Switch } from "./Switch";
|
|
|
8
8
|
export { Radio } from "./Radio";
|
|
9
9
|
export { LargeButton } from "./LargeButton";
|
|
10
10
|
export { TabPanel, getTabProps, TabPanelProps } from "./TabPanel";
|
|
11
|
-
export { ColumnsProps,
|
|
11
|
+
export { ColumnsProps, BaseGrid } from "./BaseGrid";
|
|
12
12
|
export { useGrid } from "./hooks/useGrid";
|
|
13
13
|
export { FilterCompareType, FilterProps, createFilter, useFilter, } from "./hooks/useFilter";
|
|
14
14
|
export { useEvent } from "./hooks/useEvent";
|
|
15
|
+
export { useLoading } from "./hooks/useLoading";
|
|
16
|
+
export { Modal } from "./Modal";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React, { ReactNode, FC } from 'react';
|
|
3
|
-
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps, SxProps, PaperProps, TableProps, TableHeadProps, TableBodyProps } from '@mui/material';
|
|
3
|
+
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps, SxProps, PaperProps, TableProps, TableHeadProps, TableBodyProps, ModalProps as ModalProps$1 } from '@mui/material';
|
|
4
4
|
import IMask$1 from 'imask';
|
|
5
5
|
|
|
6
6
|
interface ColumnTitleProps {
|
|
@@ -32,7 +32,7 @@ interface GridProps$1<T> {
|
|
|
32
32
|
noFilters?: boolean;
|
|
33
33
|
primaryKey?: string;
|
|
34
34
|
}
|
|
35
|
-
declare const Grid
|
|
35
|
+
declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps$1<ObjectType>>) => JSX.Element;
|
|
36
36
|
|
|
37
37
|
declare function filterData<T>(filters: FilterProps$1[], defaultData: {
|
|
38
38
|
current: T[];
|
|
@@ -222,7 +222,7 @@ interface GridProps {
|
|
|
222
222
|
onPageChange: (pageNumber: number) => void;
|
|
223
223
|
setRowsPerPage: (rows: number) => void;
|
|
224
224
|
}
|
|
225
|
-
declare function
|
|
225
|
+
declare function BaseGrid({ columns: columnsData, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, }: GridProps): JSX.Element;
|
|
226
226
|
|
|
227
227
|
declare type FilterCompareType = "gte" | "lte" | "lt" | "gt" | "equal" | "in";
|
|
228
228
|
declare type FilterProps = {
|
|
@@ -265,4 +265,15 @@ declare function useGrid<T extends Record<string, any>>({ columns, filters, rows
|
|
|
265
265
|
|
|
266
266
|
declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
declare function useLoading<T = string>(): {
|
|
269
|
+
isLoading: (prop: T) => boolean;
|
|
270
|
+
setLoading: (prop: T, remove?: boolean) => void;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
declare type ModalProps = {
|
|
274
|
+
open: boolean;
|
|
275
|
+
onClose: () => void;
|
|
276
|
+
} & ModalProps$1;
|
|
277
|
+
declare const Modal: ({ open, onClose, ...rest }: ModalProps) => JSX.Element;
|
|
278
|
+
|
|
279
|
+
export { Autocomplete, BaseGrid, Checkbox, ColumnTitleProps, ColumnsProps, EditableTableCell, FilterCompareType, FilterProps, Grid, IFilter, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, TabPanelProps, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
|