@redsift/table 11.2.0-muiv5 → 11.2.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 +25 -41
- package/index.js +256 -334
- 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, GridPinnedColumns, GridPaginationModel, GridFilterModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, 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>[];
|
|
@@ -132,16 +132,6 @@ interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<Da
|
|
|
132
132
|
paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
|
|
133
133
|
/** Theme. */
|
|
134
134
|
theme?: Theme;
|
|
135
|
-
/** If set, the DataGrid configuration will be stored and synced in the URL and the local storage. useRouter prop should be defined. */
|
|
136
|
-
isStateful?: boolean;
|
|
137
|
-
/** Hook returning pathname, search params and a method to update query params. Used in stateful mode only. */
|
|
138
|
-
useRouter?: () => {
|
|
139
|
-
pathname: string;
|
|
140
|
-
search: string;
|
|
141
|
-
historyReplace: (newSearch: string) => void;
|
|
142
|
-
};
|
|
143
|
-
/** Pinned custom columns. */
|
|
144
|
-
pinnedCustomColumns?: Required<GridPinnedColumns>;
|
|
145
135
|
}
|
|
146
136
|
type SelectionStatus = {
|
|
147
137
|
type: 'page' | 'table' | 'other' | 'none';
|
|
@@ -173,9 +163,7 @@ interface StatefulDataGridProps extends DataGridProps {
|
|
|
173
163
|
|
|
174
164
|
declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
175
165
|
|
|
176
|
-
interface ExtendedGridPaginationModel {
|
|
177
|
-
page: number;
|
|
178
|
-
pageSize: number;
|
|
166
|
+
interface ExtendedGridPaginationModel extends GridPaginationModel {
|
|
179
167
|
direction?: 'next' | 'back';
|
|
180
168
|
}
|
|
181
169
|
|
|
@@ -185,6 +173,8 @@ declare const encodeValue: (value: string | undefined) => string;
|
|
|
185
173
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
186
174
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
187
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;
|
|
188
178
|
/** FILTERS */
|
|
189
179
|
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps['columns']) => GridFilterModel | 'invalid';
|
|
190
180
|
declare const getSearchParamsFromFilterModel: (filterModel: GridFilterModel) => URLSearchParams;
|
|
@@ -257,12 +247,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
257
247
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
258
248
|
|
|
259
249
|
interface CompletionResponseItem {
|
|
260
|
-
|
|
261
|
-
|
|
250
|
+
field: string;
|
|
251
|
+
operator: string;
|
|
262
252
|
value?: string;
|
|
263
253
|
}
|
|
264
254
|
type CompletionResponse = {
|
|
265
|
-
|
|
255
|
+
logicOperator: 'and' | 'or';
|
|
266
256
|
items: CompletionResponseItem[];
|
|
267
257
|
};
|
|
268
258
|
interface LocaleText {
|
|
@@ -308,11 +298,9 @@ type ControlledPaginationProps = {
|
|
|
308
298
|
displayPagination?: boolean;
|
|
309
299
|
selectionStatus: SelectionStatus;
|
|
310
300
|
apiRef: MutableRefObject<GridApiPro>;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
315
|
-
rowsPerPageOptions?: number[];
|
|
301
|
+
paginationModel: GridPaginationModel;
|
|
302
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
303
|
+
pageSizeOptions?: number[];
|
|
316
304
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
317
305
|
paginationProps?: DataGridProps['paginationProps'];
|
|
318
306
|
};
|
|
@@ -323,16 +311,14 @@ type ServerSideControlledPaginationProps = {
|
|
|
323
311
|
displayRowsPerPage?: boolean;
|
|
324
312
|
displayPagination?: boolean;
|
|
325
313
|
selectionStatus: SelectionStatus;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
330
|
-
rowsPerPageOptions?: number[];
|
|
314
|
+
paginationModel: GridPaginationModel;
|
|
315
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
316
|
+
pageSizeOptions?: number[];
|
|
331
317
|
paginationProps?: DataGridProps['paginationProps'];
|
|
332
318
|
rowCount: number;
|
|
333
319
|
loading?: boolean;
|
|
334
320
|
};
|
|
335
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel:
|
|
321
|
+
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;
|
|
336
322
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
337
323
|
|
|
338
324
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -420,15 +406,13 @@ type ToolbarWrapperProps = {
|
|
|
420
406
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
421
407
|
apiRef: DataGridProps['apiRef'];
|
|
422
408
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
427
|
-
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
409
|
+
paginationModel: DataGridProps['paginationModel'];
|
|
410
|
+
onPaginationModelChange: DataGridProps['onPaginationModelChange'];
|
|
411
|
+
pageSizeOptions: DataGridProps['pageSizeOptions'];
|
|
428
412
|
paginationProps: DataGridProps['paginationProps'];
|
|
429
413
|
paginationMode?: DataGridProps['paginationMode'];
|
|
430
414
|
rowCount?: DataGridProps['rowCount'];
|
|
431
415
|
};
|
|
432
416
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
433
417
|
|
|
434
|
-
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 };
|
|
418
|
+
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 };
|