@smart-factor/gem-ui-components 0.0.51 → 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/{Drawer-CUGuhZ-V.js → Drawer-Bn6zM0s6.js} +919 -821
- package/dist/{Stack-eW3BwJUw.js → Stack-dIR9-9Sw.js} +1306 -1405
- package/dist/Tree-DPMcYDgW.js +3200 -0
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Grid/Grid.d.ts +4 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/types.d.ts +40 -0
- package/dist/components/Grid/useGridInitialState.d.ts +6 -0
- package/dist/components/TableComponents/TableCustomToolbar/TableCustomToolbar.d.ts +10 -0
- package/dist/components/TableComponents/TableCustomToolbar/index.d.ts +1 -0
- package/dist/components/TableComponents/TableWithPagination/TableWithPagination.d.ts +1 -1
- package/dist/components/TableComponents/TableWithPagination/types.d.ts +1 -3
- package/dist/components/Tree/index.js +1 -1
- package/dist/hooks/useDataGridInitialState.d.ts +6 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4506 -4423
- package/package.json +1 -1
- package/dist/Tree-HLw4EiLA.js +0 -2958
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { TableWithPaginationProps } from './types';
|
|
3
|
+
|
|
4
|
+
export declare const Grid: <T extends GridValidRowModel>({ rowsData, isLoading, gridApiRef, exportDataAsExcel, slotProps: propsSlotProps, ...tableProps }: TableWithPaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DataGridProProps, GridApiPro, GridColDef, GridColumnPinningState, GridSlotProps, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
|
|
3
|
+
interface SortObject {
|
|
4
|
+
sorted?: boolean;
|
|
5
|
+
unsorted?: boolean;
|
|
6
|
+
empty?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface PageableObject {
|
|
9
|
+
offset?: number;
|
|
10
|
+
sort?: SortObject;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
pageNumber?: number;
|
|
13
|
+
paged?: boolean;
|
|
14
|
+
unpaged?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface GenericPageDataDto<T> {
|
|
17
|
+
total_elements?: number;
|
|
18
|
+
total_pages?: number;
|
|
19
|
+
size?: number;
|
|
20
|
+
content?: T[];
|
|
21
|
+
number?: number;
|
|
22
|
+
sort?: SortObject;
|
|
23
|
+
pageable?: PageableObject;
|
|
24
|
+
first?: boolean;
|
|
25
|
+
last?: boolean;
|
|
26
|
+
number_of_elements?: number;
|
|
27
|
+
empty?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface TableWithPaginationProps<T extends GridValidRowModel> extends DataGridProProps {
|
|
30
|
+
rowsData: GenericPageDataDto<T> | undefined;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
columns: GridColDef<T>[];
|
|
33
|
+
offset?: number;
|
|
34
|
+
pinnedColumns?: GridColumnPinningState;
|
|
35
|
+
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
36
|
+
onGridApiRef?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
37
|
+
slotProps?: Partial<GridSlotProps>;
|
|
38
|
+
gridApiRef: React.MutableRefObject<GridApiPro>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { GridApi } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
4
|
+
|
|
5
|
+
export declare const useGridInitialState: (tableKey: string, apiRef: MutableRefObject<GridApi>) => GridInitialStatePro | undefined;
|
|
6
|
+
export declare function getGridInitialStateFromStorage(tableKey: string): GridInitialStatePro;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GridApiPro } from '@mui/x-data-grid-pro';
|
|
3
|
+
|
|
4
|
+
interface TableCustomToolbarProps {
|
|
5
|
+
gridApiRef: React.MutableRefObject<GridApiPro>;
|
|
6
|
+
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
7
|
+
isFilterActive: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TableCustomToolbar: FC<TableCustomToolbarProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableCustomToolbar } from './TableCustomToolbar';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
2
|
import { TableWithPaginationProps } from './types';
|
|
3
3
|
|
|
4
|
-
export declare const TableWithPagination: <T extends GridValidRowModel>({ rowsData, paginationAndSortState, setPaginationAndSortState, isLoading, columns, offset, tableKey, filterModel, onFilterModelChange, pinnedColumns, exportDataAsExcel, showPaginationFirstAndLastButtons,
|
|
4
|
+
export declare const TableWithPagination: <T extends GridValidRowModel>({ rowsData, paginationAndSortState, setPaginationAndSortState, isLoading, columns, offset, tableKey, filterModel, onFilterModelChange, pinnedColumns, exportDataAsExcel, showPaginationFirstAndLastButtons, }: TableWithPaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { GridApiPro,
|
|
2
|
+
import { GridApiPro, GridCallbackDetails, GridColDef, GridColumnPinningState, GridFilterModel, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
3
3
|
|
|
4
4
|
interface SortState {
|
|
5
5
|
field: string;
|
|
@@ -49,7 +49,5 @@ export interface TableWithPaginationProps<T extends GridValidRowModel> {
|
|
|
49
49
|
onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter'>) => void;
|
|
50
50
|
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
51
51
|
showPaginationFirstAndLastButtons?: boolean;
|
|
52
|
-
autosizeOptions?: GridAutosizeOptions;
|
|
53
|
-
onGridApiRef?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
54
52
|
}
|
|
55
53
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { GridApi } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
4
|
+
|
|
5
|
+
export declare const useDataGridInitialState: (tableKey: string, apiRef: MutableRefObject<GridApi>) => GridInitialStatePro | undefined;
|
|
6
|
+
export declare function getGridStateFromStorage(tableKey: string): GridInitialStatePro;
|
package/dist/main.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './components/Dropzone';
|
|
|
8
8
|
export * from './components/ElementsPicker';
|
|
9
9
|
export { FixedActionsBottomPanel } from './components/FixedActionsBottomPanel/FixedActionsBottomPanel';
|
|
10
10
|
export * from './components/FormComponents';
|
|
11
|
+
export { Grid, GridInitialState } from './components/Grid';
|
|
11
12
|
export { LoadingBackdrop } from './components/LoadingBackdrop/LoadingBackdrop';
|
|
12
13
|
export { ResizableWrapper } from './components/ResizableWrapper/ResizableWrapper';
|
|
13
14
|
export { SimpleAutocomplete } from './components/SimpleAutocomplete';
|