@redsift/table 11.2.0 → 11.2.1-muiv5
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 +35 -31
- package/index.js +383 -316
- package/index.js.map +1 -1
- package/package.json +6 -6
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 { GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputMultipleValue, DataGridProProps,
|
|
3
|
-
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridNativeColTypes, GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputMultipleValue, DataGridProProps, GridFilterModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridSelectionModel, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
|
|
3
|
+
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, 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
|
+
extendType: GridNativeColTypes;
|
|
14
14
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
15
15
|
};
|
|
16
16
|
declare const getRsNumberColumnType: () => {
|
|
17
|
-
|
|
17
|
+
extendType: GridNativeColTypes;
|
|
18
18
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
19
19
|
};
|
|
20
|
-
declare const customColumnTypes:
|
|
20
|
+
declare const customColumnTypes: GridColumnTypesRecord;
|
|
21
21
|
|
|
22
22
|
declare const IS_BETWEEN: {
|
|
23
23
|
label: string;
|
|
24
24
|
value: string;
|
|
25
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams
|
|
25
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => 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, Date, any>[];
|
|
95
|
-
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
94
|
+
date: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
95
|
+
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, string | 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>[];
|
|
@@ -155,15 +155,15 @@ interface StatefulDataGridProps extends DataGridProps {
|
|
|
155
155
|
search: string;
|
|
156
156
|
historyReplace: (newSearch: string) => void;
|
|
157
157
|
};
|
|
158
|
-
/** Pinned custom columns. */
|
|
159
|
-
pinnedCustomColumns?: Required<GridPinnedColumns>;
|
|
160
158
|
/** Local Storage version, to upgrade when we want to force a clean out. */
|
|
161
159
|
localStorageVersion?: number;
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
165
163
|
|
|
166
|
-
interface ExtendedGridPaginationModel
|
|
164
|
+
interface ExtendedGridPaginationModel {
|
|
165
|
+
page: number;
|
|
166
|
+
pageSize: number;
|
|
167
167
|
direction?: 'next' | 'back';
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -173,21 +173,19 @@ declare const encodeValue: (value: string | undefined) => string;
|
|
|
173
173
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
174
174
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
175
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
176
|
/** FILTERS */
|
|
179
177
|
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps['columns']) => GridFilterModel | 'invalid';
|
|
180
178
|
declare const getSearchParamsFromFilterModel: (filterModel: GridFilterModel) => URLSearchParams;
|
|
181
179
|
/** SORT */
|
|
182
|
-
declare const getSortingFromString: (searchString: string, columns: DataGridProps['columns']) => GridSortModel |
|
|
180
|
+
declare const getSortingFromString: (searchString: string, columns: DataGridProps['columns']) => GridSortModel | 'invalid';
|
|
183
181
|
declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearchParams;
|
|
184
182
|
/** PAGINATION */
|
|
185
|
-
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel |
|
|
183
|
+
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | 'invalid';
|
|
186
184
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
187
185
|
/** COLUMN VISIBILITY */
|
|
188
186
|
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps['columns']) => URLSearchParams;
|
|
189
|
-
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => GridColumnVisibilityModel |
|
|
190
|
-
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => PinnedColumns |
|
|
187
|
+
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
188
|
+
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => PinnedColumns | 'invalid';
|
|
191
189
|
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
192
190
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
193
191
|
type FinalSearchInput = {
|
|
@@ -247,12 +245,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
247
245
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
248
246
|
|
|
249
247
|
interface CompletionResponseItem {
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
columnField: string;
|
|
249
|
+
operatorValue: string;
|
|
252
250
|
value?: string;
|
|
253
251
|
}
|
|
254
252
|
type CompletionResponse = {
|
|
255
|
-
|
|
253
|
+
linkOperator: 'and' | 'or';
|
|
256
254
|
items: CompletionResponseItem[];
|
|
257
255
|
};
|
|
258
256
|
interface LocaleText {
|
|
@@ -298,9 +296,11 @@ type ControlledPaginationProps = {
|
|
|
298
296
|
displayPagination?: boolean;
|
|
299
297
|
selectionStatus: SelectionStatus;
|
|
300
298
|
apiRef: MutableRefObject<GridApiPro>;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
299
|
+
page: number;
|
|
300
|
+
onPageChange: (page: number) => void;
|
|
301
|
+
pageSize: number;
|
|
302
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
303
|
+
rowsPerPageOptions?: number[];
|
|
304
304
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
305
305
|
paginationProps?: DataGridProps['paginationProps'];
|
|
306
306
|
};
|
|
@@ -311,14 +311,16 @@ type ServerSideControlledPaginationProps = {
|
|
|
311
311
|
displayRowsPerPage?: boolean;
|
|
312
312
|
displayPagination?: boolean;
|
|
313
313
|
selectionStatus: SelectionStatus;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
page: number;
|
|
315
|
+
onPageChange: (page: number) => void;
|
|
316
|
+
pageSize: number;
|
|
317
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
318
|
+
rowsPerPageOptions?: number[];
|
|
317
319
|
paginationProps?: DataGridProps['paginationProps'];
|
|
318
320
|
rowCount: number;
|
|
319
321
|
loading?: boolean;
|
|
320
322
|
};
|
|
321
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel:
|
|
323
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
322
324
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
323
325
|
|
|
324
326
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -406,13 +408,15 @@ type ToolbarWrapperProps = {
|
|
|
406
408
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
407
409
|
apiRef: DataGridProps['apiRef'];
|
|
408
410
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
411
|
+
page: DataGridProps['page'];
|
|
412
|
+
onPageChange: DataGridProps['onPageChange'];
|
|
413
|
+
pageSize: DataGridProps['pageSize'];
|
|
414
|
+
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
415
|
+
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
412
416
|
paginationProps: DataGridProps['paginationProps'];
|
|
413
417
|
paginationMode?: DataGridProps['paginationMode'];
|
|
414
418
|
rowCount?: DataGridProps['rowCount'];
|
|
415
419
|
};
|
|
416
420
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
417
421
|
|
|
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,
|
|
422
|
+
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 };
|