@redsift/table 11.3.0-muiv5 → 11.3.0
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/index.d.ts +26 -32
- package/index.js +288 -394
- package/index.js.map +1 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
|
|
2
|
-
import {
|
|
3
|
-
export { GridAlignment, GridColDef,
|
|
2
|
+
import { GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputMultipleValue, DataGridProProps, GridPaginationModel, GridFilterModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridRowSelectionModel, GridApiPro as GridApiPro$1, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
|
|
3
|
+
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
5
5
|
import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
6
6
|
import { TablePaginationProps } from '@mui/material';
|
|
@@ -10,19 +10,19 @@ import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
|
10
10
|
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
|
|
11
11
|
|
|
12
12
|
declare const getRsStringColumnType: () => {
|
|
13
|
-
|
|
13
|
+
type: string;
|
|
14
14
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
15
15
|
};
|
|
16
16
|
declare const getRsNumberColumnType: () => {
|
|
17
|
-
|
|
17
|
+
type: string;
|
|
18
18
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
19
19
|
};
|
|
20
|
-
declare const customColumnTypes: GridColumnTypesRecord
|
|
20
|
+
declare const customColumnTypes: Partial<GridColumnTypesRecord>;
|
|
21
21
|
|
|
22
22
|
declare const IS_BETWEEN: {
|
|
23
23
|
label: string;
|
|
24
24
|
value: string;
|
|
25
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
25
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
|
|
26
26
|
InputComponent: (props: any) => JSX.Element;
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -91,8 +91,8 @@ declare const operatorList: {
|
|
|
91
91
|
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
92
92
|
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
93
93
|
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
94
|
-
date: _mui_x_data_grid_pro.GridFilterOperator<any,
|
|
95
|
-
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any,
|
|
94
|
+
date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
95
|
+
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
96
96
|
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
97
97
|
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
98
98
|
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
@@ -163,9 +163,7 @@ interface StatefulDataGridProps extends DataGridProps {
|
|
|
163
163
|
|
|
164
164
|
declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
165
165
|
|
|
166
|
-
interface ExtendedGridPaginationModel {
|
|
167
|
-
page: number;
|
|
168
|
-
pageSize: number;
|
|
166
|
+
interface ExtendedGridPaginationModel extends GridPaginationModel {
|
|
169
167
|
direction?: 'next' | 'back';
|
|
170
168
|
}
|
|
171
169
|
|
|
@@ -175,6 +173,8 @@ declare const encodeValue: (value: string | undefined) => string;
|
|
|
175
173
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
176
174
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
177
175
|
declare const numberOperatorDecoder: Record<string, string>;
|
|
176
|
+
declare const isOperatorValueValid: (field: string, operator: OperatorValue, columns: DataGridProps['columns']) => boolean;
|
|
177
|
+
declare const isValueValid: (value: OperatorValue, field: string, columns: DataGridProps['columns'], operator: OperatorValue) => boolean;
|
|
178
178
|
/** FILTERS */
|
|
179
179
|
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps['columns']) => GridFilterModel | 'invalid';
|
|
180
180
|
declare const getSearchParamsFromFilterModel: (filterModel: GridFilterModel) => URLSearchParams;
|
|
@@ -185,8 +185,8 @@ declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearch
|
|
|
185
185
|
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | 'invalid';
|
|
186
186
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
187
187
|
/** COLUMN VISIBILITY */
|
|
188
|
+
declare const getColumnVisibilityFromString: (searchString: string, columns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
188
189
|
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps['columns']) => URLSearchParams;
|
|
189
|
-
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
190
190
|
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => PinnedColumns | 'invalid';
|
|
191
191
|
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
192
192
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
@@ -248,12 +248,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
248
248
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
249
249
|
|
|
250
250
|
interface CompletionResponseItem {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
field: string;
|
|
252
|
+
operator: string;
|
|
253
253
|
value?: string;
|
|
254
254
|
}
|
|
255
255
|
type CompletionResponse = {
|
|
256
|
-
|
|
256
|
+
logicOperator: 'and' | 'or';
|
|
257
257
|
items: CompletionResponseItem[];
|
|
258
258
|
};
|
|
259
259
|
interface LocaleText {
|
|
@@ -299,11 +299,9 @@ type ControlledPaginationProps = {
|
|
|
299
299
|
displayPagination?: boolean;
|
|
300
300
|
selectionStatus: SelectionStatus;
|
|
301
301
|
apiRef: MutableRefObject<GridApiPro>;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
306
|
-
rowsPerPageOptions?: number[];
|
|
302
|
+
paginationModel: GridPaginationModel;
|
|
303
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
304
|
+
pageSizeOptions?: number[];
|
|
307
305
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
308
306
|
paginationProps?: DataGridProps['paginationProps'];
|
|
309
307
|
};
|
|
@@ -314,16 +312,14 @@ type ServerSideControlledPaginationProps = {
|
|
|
314
312
|
displayRowsPerPage?: boolean;
|
|
315
313
|
displayPagination?: boolean;
|
|
316
314
|
selectionStatus: SelectionStatus;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
321
|
-
rowsPerPageOptions?: number[];
|
|
315
|
+
paginationModel: GridPaginationModel;
|
|
316
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
317
|
+
pageSizeOptions?: number[];
|
|
322
318
|
paginationProps?: DataGridProps['paginationProps'];
|
|
323
319
|
rowCount: number;
|
|
324
320
|
loading?: boolean;
|
|
325
321
|
};
|
|
326
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel:
|
|
322
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridRowSelectionModel, apiRef: React.MutableRefObject<GridApiPro$1>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
327
323
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
328
324
|
|
|
329
325
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -411,15 +407,13 @@ type ToolbarWrapperProps = {
|
|
|
411
407
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
412
408
|
apiRef: DataGridProps['apiRef'];
|
|
413
409
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
418
|
-
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
410
|
+
paginationModel: DataGridProps['paginationModel'];
|
|
411
|
+
onPaginationModelChange: DataGridProps['onPaginationModelChange'];
|
|
412
|
+
pageSizeOptions: DataGridProps['pageSizeOptions'];
|
|
419
413
|
paginationProps: DataGridProps['paginationProps'];
|
|
420
414
|
paginationMode?: DataGridProps['paginationMode'];
|
|
421
415
|
rowCount?: DataGridProps['rowCount'];
|
|
422
416
|
};
|
|
423
417
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
424
418
|
|
|
425
|
-
export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, CompletionResponse, ControlledPagination, ControlledPaginationProps, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, StatefulDataGrid, StatefulDataGridProps, StyledDataGridProps, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsNumberColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
|
|
419
|
+
export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, CompletionResponse, ControlledPagination, ControlledPaginationProps, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, StatefulDataGrid, StatefulDataGridProps, StyledDataGridProps, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsNumberColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, isOperatorValueValid, isValueValid, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
|