@redsift/table 11.7.0 → 11.8.0-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/_internal/BasePopper.js +2 -2
- package/_internal/ControlledPagination.js +24 -32
- package/_internal/ControlledPagination.js.map +1 -1
- package/_internal/DataGrid2.js +80 -64
- package/_internal/DataGrid2.js.map +1 -1
- package/_internal/GridToolbarFilterSemanticField2.js +12 -12
- package/_internal/GridToolbarFilterSemanticField2.js.map +1 -1
- package/_internal/Portal.js +1 -1
- package/_internal/StatefulDataGrid.js +1 -1
- package/_internal/StatefulDataGrid2.js +238 -1932
- package/_internal/StatefulDataGrid2.js.map +1 -1
- package/_internal/TextCell2.js +1 -1
- package/_internal/Toolbar2.js +3 -3
- package/_internal/Toolbar2.js.map +1 -1
- package/_internal/ToolbarWrapper2.js +17 -11
- package/_internal/ToolbarWrapper2.js.map +1 -1
- package/_internal/_rollupPluginBabelHelpers.js +1 -1
- package/_internal/useControlledDatagridState.js +1859 -24
- package/_internal/useControlledDatagridState.js.map +1 -1
- package/index.d.ts +79 -82
- package/index.js +3 -48
- package/index.js.map +1 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect';
|
|
2
|
-
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
3
|
-
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
|
|
4
1
|
import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
|
|
5
|
-
import { GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, DataGridProProps, GridFilterModel,
|
|
6
|
-
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridNativeColTypes, GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, 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';
|
|
7
4
|
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
8
5
|
import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
9
6
|
import { TablePaginationProps } from '@mui/material';
|
|
@@ -13,80 +10,80 @@ import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
|
13
10
|
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
|
|
14
11
|
|
|
15
12
|
declare const getRsStringColumnType: () => {
|
|
16
|
-
|
|
13
|
+
extendType: GridNativeColTypes;
|
|
17
14
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
18
15
|
};
|
|
19
16
|
declare const getRsNumberColumnType: () => {
|
|
20
|
-
|
|
17
|
+
extendType: GridNativeColTypes;
|
|
21
18
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
22
19
|
};
|
|
23
20
|
declare const getRsSingleSelectColumnType: () => {
|
|
24
|
-
|
|
21
|
+
extendType: GridNativeColTypes;
|
|
25
22
|
filterOperators: ({
|
|
26
|
-
InputComponent: typeof
|
|
23
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
27
24
|
label: string;
|
|
28
25
|
value: string;
|
|
29
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
26
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
30
27
|
} | {
|
|
31
28
|
label: string;
|
|
32
29
|
value: string;
|
|
33
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
34
|
-
InputComponent: typeof
|
|
30
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
31
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleValue;
|
|
35
32
|
} | {
|
|
36
|
-
InputComponent: typeof
|
|
33
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
37
34
|
label: string;
|
|
38
35
|
value: string;
|
|
39
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
36
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
40
37
|
})[];
|
|
41
38
|
};
|
|
42
39
|
declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
|
|
43
|
-
|
|
40
|
+
extendType: GridNativeColTypes;
|
|
44
41
|
filterOperators: ({
|
|
45
|
-
InputComponent: typeof
|
|
42
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
46
43
|
label: string;
|
|
47
44
|
value: string;
|
|
48
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
45
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
49
46
|
} | {
|
|
50
|
-
InputComponent: typeof
|
|
47
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
51
48
|
label: string;
|
|
52
49
|
value: string;
|
|
53
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
50
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
54
51
|
})[];
|
|
55
52
|
};
|
|
56
53
|
declare const getRsMultipleSelectColumnType: () => {
|
|
57
|
-
|
|
54
|
+
extendType: GridNativeColTypes;
|
|
58
55
|
filterOperators: ({
|
|
59
|
-
InputComponent: typeof
|
|
56
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
60
57
|
label: string;
|
|
61
58
|
value: string;
|
|
62
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
59
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
63
60
|
} | {
|
|
64
|
-
InputComponent: typeof
|
|
61
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
65
62
|
label: string;
|
|
66
63
|
value: string;
|
|
67
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
64
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
68
65
|
})[];
|
|
69
66
|
};
|
|
70
67
|
declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
|
|
71
|
-
|
|
68
|
+
extendType: GridNativeColTypes;
|
|
72
69
|
filterOperators: ({
|
|
73
|
-
InputComponent: typeof
|
|
70
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
74
71
|
label: string;
|
|
75
72
|
value: string;
|
|
76
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
73
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
77
74
|
} | {
|
|
78
|
-
InputComponent: typeof
|
|
75
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
79
76
|
label: string;
|
|
80
77
|
value: string;
|
|
81
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
78
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
82
79
|
})[];
|
|
83
80
|
};
|
|
84
|
-
declare const customColumnTypes:
|
|
81
|
+
declare const customColumnTypes: GridColumnTypesRecord;
|
|
85
82
|
|
|
86
83
|
declare const IS_BETWEEN: {
|
|
87
84
|
label: string;
|
|
88
85
|
value: string;
|
|
89
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams
|
|
86
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
90
87
|
InputComponent: (props: any) => JSX.Element;
|
|
91
88
|
};
|
|
92
89
|
|
|
@@ -238,12 +235,6 @@ declare const IS_NOT_ANY_OF: {
|
|
|
238
235
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
239
236
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
240
237
|
};
|
|
241
|
-
declare const IS_NOT_ANY_OF_WITH_SELECT: {
|
|
242
|
-
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
243
|
-
label: string;
|
|
244
|
-
value: string;
|
|
245
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
246
|
-
};
|
|
247
238
|
|
|
248
239
|
declare const STARTS_WITH_ANY_OF: {
|
|
249
240
|
label: string;
|
|
@@ -260,59 +251,59 @@ declare const operatorList: {
|
|
|
260
251
|
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
261
252
|
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
262
253
|
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
263
|
-
date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
264
|
-
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
254
|
+
date: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
255
|
+
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
265
256
|
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
266
257
|
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
267
258
|
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
268
259
|
rsSingleSelect: ({
|
|
269
|
-
InputComponent: typeof
|
|
260
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
270
261
|
label: string;
|
|
271
262
|
value: string;
|
|
272
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
263
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
273
264
|
} | {
|
|
274
265
|
label: string;
|
|
275
266
|
value: string;
|
|
276
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
277
|
-
InputComponent: typeof
|
|
267
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
268
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleValue;
|
|
278
269
|
} | {
|
|
279
|
-
InputComponent: typeof
|
|
270
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
280
271
|
label: string;
|
|
281
272
|
value: string;
|
|
282
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
273
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
283
274
|
})[];
|
|
284
275
|
rsSingleSelectWithShortOperatorList: ({
|
|
285
|
-
InputComponent: typeof
|
|
276
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
286
277
|
label: string;
|
|
287
278
|
value: string;
|
|
288
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
279
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
289
280
|
} | {
|
|
290
|
-
InputComponent: typeof
|
|
281
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
291
282
|
label: string;
|
|
292
283
|
value: string;
|
|
293
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
284
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
294
285
|
})[];
|
|
295
286
|
rsMultipleSelect: ({
|
|
296
|
-
InputComponent: typeof
|
|
287
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
297
288
|
label: string;
|
|
298
289
|
value: string;
|
|
299
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
290
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
300
291
|
} | {
|
|
301
|
-
InputComponent: typeof
|
|
292
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
302
293
|
label: string;
|
|
303
294
|
value: string;
|
|
304
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
295
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
305
296
|
})[];
|
|
306
297
|
rsMultipleSelectWithShortOperatorList: ({
|
|
307
|
-
InputComponent: typeof
|
|
298
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
308
299
|
label: string;
|
|
309
300
|
value: string;
|
|
310
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
301
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
311
302
|
} | {
|
|
312
|
-
InputComponent: typeof
|
|
303
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
313
304
|
label: string;
|
|
314
305
|
value: string;
|
|
315
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
306
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
316
307
|
})[];
|
|
317
308
|
rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
318
309
|
};
|
|
@@ -384,7 +375,9 @@ declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
|
384
375
|
interface ExtendedGridFilterModel extends GridFilterModel {
|
|
385
376
|
quickFilterValues?: string[];
|
|
386
377
|
}
|
|
387
|
-
interface ExtendedGridPaginationModel
|
|
378
|
+
interface ExtendedGridPaginationModel {
|
|
379
|
+
page: number;
|
|
380
|
+
pageSize: number;
|
|
388
381
|
direction?: 'next' | 'back';
|
|
389
382
|
}
|
|
390
383
|
|
|
@@ -394,21 +387,19 @@ declare const encodeValue: (value: string | undefined) => string;
|
|
|
394
387
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
395
388
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
396
389
|
declare const numberOperatorDecoder: Record<string, string>;
|
|
397
|
-
declare const isOperatorValueValid: (field: string, operator: OperatorValue, columns: DataGridProps['columns']) => boolean;
|
|
398
|
-
declare const isValueValid: (value: OperatorValue, field: string, columns: DataGridProps['columns'], operator: OperatorValue) => boolean;
|
|
399
390
|
/** FILTERS */
|
|
400
|
-
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps[
|
|
391
|
+
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps["columns"]) => ExtendedGridFilterModel | "invalid";
|
|
401
392
|
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
402
393
|
/** SORT */
|
|
403
|
-
declare const getSortingFromString: (searchString: string, columns: DataGridProps[
|
|
394
|
+
declare const getSortingFromString: (searchString: string, columns: DataGridProps["columns"]) => GridSortModel | "invalid";
|
|
404
395
|
declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearchParams;
|
|
405
396
|
/** PAGINATION */
|
|
406
|
-
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel |
|
|
397
|
+
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | "invalid";
|
|
407
398
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
408
399
|
/** COLUMN VISIBILITY */
|
|
409
|
-
declare const
|
|
410
|
-
declare const
|
|
411
|
-
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps[
|
|
400
|
+
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps["columns"]) => URLSearchParams;
|
|
401
|
+
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps["columns"]) => GridColumnVisibilityModel | "invalid";
|
|
402
|
+
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps["columns"]) => PinnedColumns | "invalid";
|
|
412
403
|
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
413
404
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
414
405
|
type FinalSearchInput = {
|
|
@@ -446,7 +437,7 @@ type ModelsTable = {
|
|
|
446
437
|
pinnedColumnsModel: PinnedColumns;
|
|
447
438
|
};
|
|
448
439
|
/** Return the state of the table given the URL and the local storage state */
|
|
449
|
-
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps[
|
|
440
|
+
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps["columns"], historyReplace: (newSearch: string) => void, initialState: GridInitialStatePro | undefined, localStorage: ModelsLocalStorage) => ModelsTable;
|
|
450
441
|
type DataGridModel = {
|
|
451
442
|
filterModel: GridFilterModel;
|
|
452
443
|
sortModel: GridSortModel;
|
|
@@ -454,7 +445,7 @@ type DataGridModel = {
|
|
|
454
445
|
columnsModel: GridColumnVisibilityModel;
|
|
455
446
|
pinnedColumnsModel: GridPinnedColumns;
|
|
456
447
|
};
|
|
457
|
-
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps[
|
|
448
|
+
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps["columns"]) => void;
|
|
458
449
|
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
459
450
|
|
|
460
451
|
declare const BaseButton: React.JSXElementConstructor<any>;
|
|
@@ -469,12 +460,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
469
460
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
470
461
|
|
|
471
462
|
interface CompletionResponseItem {
|
|
472
|
-
|
|
473
|
-
|
|
463
|
+
columnField: string;
|
|
464
|
+
operatorValue: string;
|
|
474
465
|
value?: string;
|
|
475
466
|
}
|
|
476
467
|
type CompletionResponse = {
|
|
477
|
-
|
|
468
|
+
linkOperator: 'and' | 'or';
|
|
478
469
|
items: CompletionResponseItem[];
|
|
479
470
|
};
|
|
480
471
|
interface LocaleText {
|
|
@@ -520,9 +511,11 @@ type ControlledPaginationProps = {
|
|
|
520
511
|
displayPagination?: boolean;
|
|
521
512
|
selectionStatus: SelectionStatus;
|
|
522
513
|
apiRef: MutableRefObject<GridApiPro>;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
514
|
+
page: number;
|
|
515
|
+
onPageChange: (page: number) => void;
|
|
516
|
+
pageSize: number;
|
|
517
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
518
|
+
rowsPerPageOptions?: number[];
|
|
526
519
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
527
520
|
paginationProps?: DataGridProps['paginationProps'];
|
|
528
521
|
};
|
|
@@ -533,14 +526,16 @@ type ServerSideControlledPaginationProps = {
|
|
|
533
526
|
displayRowsPerPage?: boolean;
|
|
534
527
|
displayPagination?: boolean;
|
|
535
528
|
selectionStatus: SelectionStatus;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
529
|
+
page: number;
|
|
530
|
+
onPageChange: (page: number) => void;
|
|
531
|
+
pageSize: number;
|
|
532
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
533
|
+
rowsPerPageOptions?: number[];
|
|
539
534
|
paginationProps?: DataGridProps['paginationProps'];
|
|
540
535
|
rowCount: number;
|
|
541
536
|
loading?: boolean;
|
|
542
537
|
};
|
|
543
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel:
|
|
538
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
544
539
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
545
540
|
|
|
546
541
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -630,13 +625,15 @@ type ToolbarWrapperProps = {
|
|
|
630
625
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
631
626
|
apiRef: DataGridProps['apiRef'];
|
|
632
627
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
628
|
+
page: DataGridProps['page'];
|
|
629
|
+
onPageChange: DataGridProps['onPageChange'];
|
|
630
|
+
pageSize: DataGridProps['pageSize'];
|
|
631
|
+
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
632
|
+
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
636
633
|
paginationProps: DataGridProps['paginationProps'];
|
|
637
634
|
paginationMode?: DataGridProps['paginationMode'];
|
|
638
635
|
rowCount?: DataGridProps['rowCount'];
|
|
639
636
|
};
|
|
640
637
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
641
638
|
|
|
642
|
-
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, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_I, IS_ANY_OF_I_WITH_SELECT, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF,
|
|
639
|
+
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, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_I, IS_ANY_OF_I_WITH_SELECT, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF, IS_NOT_WITH_SELECT, IS_WITH_SELECT, 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, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export { J as CATEGORIES, C as CONTAINS_ANY_OF, m as CONTAINS_ANY_OF_I, B as DIMENSION_MODEL_KEY, D as DOES_NOT_CONTAIN, a as DOES_NOT_EQUAL, b as DOES_NOT_HAVE, c as DOES_NOT_HAVE_WITH_SELECT, E as ENDS_WITH_ANY_OF, F as FILTER_MODEL_KEY, G as FILTER_SEARCH_KEY, H as HAS, s as HAS_ANY_OF, t as HAS_ANY_OF_WITH_SELECT, e as HAS_ONLY, f as HAS_ONLY_WITH_SELECT, d as HAS_WITH_SELECT, h as IS, n as IS_ANY_OF, q as IS_ANY_OF_I, r as IS_ANY_OF_I_WITH_SELECT, p as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, j as IS_NOT, u as IS_NOT_ANY_OF, v as IS_NOT_ANY_OF_WITH_SELECT, k as IS_NOT_WITH_SELECT, i as IS_WITH_SELECT, P as PAGINATION_MODEL_KEY, A as PINNED_COLUMNS, z as SORT_MODEL_KEY, S as STARTS_WITH_ANY_OF, a9 as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, a8 as areFilterModelsEquivalent, K as buildStorageKey, L as clearPreviousVersionStorage, M as decodeValue, N as encodeValue, a0 as getColumnVisibilityFromString, W as getFilterModelFromString, a5 as getFinalSearch, g as getGridNumericOperators, w as getGridStringArrayOperators, x as getGridStringArrayOperatorsWithSelect, y as getGridStringArrayOperatorsWithSelectOnStringArrayColumns, l as getGridStringOperators, a6 as getModelsParsedOrUpdateLocalStorage, _ as getPaginationFromString, a2 as getPinnedColumnsFromString, a1 as getSearchParamsFromColumnVisibility, X as getSearchParamsFromFilterModel, $ as getSearchParamsFromPagination, a3 as getSearchParamsFromPinnedColumns, Z as getSearchParamsFromSorting, a4 as getSearchParamsFromTab, Y as getSortingFromString, T as isOperatorValueValid, U as isValueValid, R as numberOperatorDecoder, Q as numberOperatorEncoder, o as operatorList, a7 as updateUrl, O as urlSearchParamsToString } from './_internal/StatefulDataGrid2.js';
|
|
1
|
+
export { C as CONTAINS_ANY_OF, u as CONTAINS_ANY_OF_I, D as DOES_NOT_CONTAIN, i as DOES_NOT_EQUAL, j as DOES_NOT_HAVE, k as DOES_NOT_HAVE_WITH_SELECT, E as ENDS_WITH_ANY_OF, H as HAS, z as HAS_ANY_OF, A as HAS_ANY_OF_WITH_SELECT, m as HAS_ONLY, n as HAS_ONLY_WITH_SELECT, l as HAS_WITH_SELECT, p as IS, v as IS_ANY_OF, x as IS_ANY_OF_I, y as IS_ANY_OF_I_WITH_SELECT, w as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, r as IS_NOT, B as IS_NOT_ANY_OF, s as IS_NOT_WITH_SELECT, q as IS_WITH_SELECT, S as STARTS_WITH_ANY_OF, f as customColumnTypes, h as getGridNumericOperators, F as getGridStringArrayOperators, G as getGridStringArrayOperatorsWithSelect, J as getGridStringArrayOperatorsWithSelectOnStringArrayColumns, t as getGridStringOperators, d as getRsMultipleSelectColumnType, e as getRsMultipleSelectWithShortOperatorListColumnType, a as getRsNumberColumnType, b as getRsSingleSelectColumnType, c as getRsSingleSelectWithShortOperatorListColumnType, g as getRsStringColumnType, o as operatorList } from './_internal/useControlledDatagridState.js';
|
|
3
2
|
export { D as DEFAULT_OPERATORS, G as GridToolbarFilterSemanticField, g as getCompletion } from './_internal/GridToolbarFilterSemanticField2.js';
|
|
3
|
+
export { C as CATEGORIES, D as DIMENSION_MODEL_KEY, F as FILTER_MODEL_KEY, b as FILTER_SEARCH_KEY, P as PAGINATION_MODEL_KEY, a as PINNED_COLUMNS, S as SORT_MODEL_KEY, y as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, x as areFilterModelsEquivalent, c as buildStorageKey, d as clearPreviousVersionStorage, e as decodeValue, f as encodeValue, p as getColumnVisibilityFromString, h as getFilterModelFromString, t as getFinalSearch, v as getModelsParsedOrUpdateLocalStorage, l as getPaginationFromString, q as getPinnedColumnsFromString, o as getSearchParamsFromColumnVisibility, i as getSearchParamsFromFilterModel, m as getSearchParamsFromPagination, r as getSearchParamsFromPinnedColumns, k as getSearchParamsFromSorting, s as getSearchParamsFromTab, j as getSortingFromString, g as numberOperatorDecoder, n as numberOperatorEncoder, w as updateUrl, u as urlSearchParamsToString } from './_internal/StatefulDataGrid2.js';
|
|
4
4
|
import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';
|
|
5
5
|
export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
6
6
|
export { B as BaseButton, a as BaseCheckbox, b as BaseIcon, c as BasePopper, m as muiIconToDSIcon } from './_internal/BasePopper.js';
|
|
@@ -15,50 +15,5 @@ export { T as ToolbarWrapper } from './_internal/ToolbarWrapper2.js';
|
|
|
15
15
|
const DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
|
|
16
16
|
DETAIL_PANEL_TOGGLE_COL_DEF.type = 'actions';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
type: 'string',
|
|
21
|
-
filterOperators: operatorList.rsString
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const getRsNumberColumnType = () => {
|
|
25
|
-
return {
|
|
26
|
-
type: 'number',
|
|
27
|
-
filterOperators: operatorList.rsNumber
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
const getRsSingleSelectColumnType = () => {
|
|
31
|
-
return {
|
|
32
|
-
type: 'singleSelect',
|
|
33
|
-
filterOperators: operatorList.rsSingleSelect
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
const getRsSingleSelectWithShortOperatorListColumnType = () => {
|
|
37
|
-
return {
|
|
38
|
-
type: 'singleSelect',
|
|
39
|
-
filterOperators: operatorList.rsSingleSelectWithShortOperatorList
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
const getRsMultipleSelectColumnType = () => {
|
|
43
|
-
return {
|
|
44
|
-
type: 'singleSelect',
|
|
45
|
-
filterOperators: operatorList.rsMultipleSelect
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
const getRsMultipleSelectWithShortOperatorListColumnType = () => {
|
|
49
|
-
return {
|
|
50
|
-
type: 'singleSelect',
|
|
51
|
-
filterOperators: operatorList.rsMultipleSelectWithShortOperatorList
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
const customColumnTypes = {
|
|
55
|
-
rsString: getRsStringColumnType(),
|
|
56
|
-
rsNumber: getRsNumberColumnType(),
|
|
57
|
-
rsSingleSelect: getRsSingleSelectColumnType(),
|
|
58
|
-
rsSingleSelectWithShortOperatorList: getRsSingleSelectWithShortOperatorListColumnType(),
|
|
59
|
-
rsMultipleSelect: getRsMultipleSelectColumnType(),
|
|
60
|
-
rsMultipleSelectWithShortOperatorList: getRsMultipleSelectWithShortOperatorListColumnType()
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export { DETAIL_PANEL_TOGGLE_COL_DEF, customColumnTypes, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType };
|
|
18
|
+
export { DETAIL_PANEL_TOGGLE_COL_DEF };
|
|
64
19
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/utils/columns/detailPanelToggleColDef.ts"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/columns/detailPanelToggleColDef.ts"],"sourcesContent":["import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';\n\n// Don't use a spread operator there or it will break the build due to MUI internal components\nconst DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;\nDETAIL_PANEL_TOGGLE_COL_DEF.type = 'actions';\n\nexport { DETAIL_PANEL_TOGGLE_COL_DEF };\n"],"names":["DETAIL_PANEL_TOGGLE_COL_DEF","GRID_DETAIL_PANEL_TOGGLE_COL_DEF","type"],"mappings":";;;;;;;;;;;;;AAEA;AACMA,MAAAA,2BAA2B,GAAGC,iCAAgC;AACpED,2BAA2B,CAACE,IAAI,GAAG,SAAS;;;;"}
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "yarn test:unit && yarn test:storybook"
|
|
31
31
|
},
|
|
32
32
|
"types": "types.d.ts",
|
|
33
|
-
"version": "11.
|
|
33
|
+
"version": "11.8.0-muiv5",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.11.0",
|
|
36
36
|
"@emotion/styled": "^11.11.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@babel/preset-env": "^7.17.10",
|
|
51
51
|
"@babel/preset-react": "^7.17.12",
|
|
52
52
|
"@babel/preset-typescript": "^7.16.7",
|
|
53
|
-
"@mui/x-data-grid-pro": "^
|
|
53
|
+
"@mui/x-data-grid-pro": "^5.17.17",
|
|
54
54
|
"@mui/x-license-pro": "^6.6.0",
|
|
55
55
|
"@rollup/plugin-babel": "^6.0.2",
|
|
56
56
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"ts-jest": "^28.0.3"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@mui/x-data-grid-pro": ">=
|
|
89
|
-
"@redsift/design-system": "^11.
|
|
90
|
-
"@redsift/icons": "^11.
|
|
88
|
+
"@mui/x-data-grid-pro": ">=5.10.0",
|
|
89
|
+
"@redsift/design-system": "^11.8.0-0",
|
|
90
|
+
"@redsift/icons": "^11.8.0-0",
|
|
91
91
|
"react": ">=17",
|
|
92
92
|
"react-dom": ">=17",
|
|
93
93
|
"styled-components": "^5.3.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "4d72dda8248fb141155edd280b214969508d6c03"
|
|
96
96
|
}
|