@redsift/table 11.10.0-muiv6 → 11.11.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 +33 -53
- 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 +595 -1993
- 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 +93 -56
- package/index.js +3 -48
- package/index.js.map +1 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipl
|
|
|
2
2
|
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
3
3
|
import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
|
|
4
4
|
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';
|
|
5
|
+
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';
|
|
6
|
+
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
8
8
|
import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
9
9
|
import { TablePaginationProps } from '@mui/material';
|
|
@@ -13,80 +13,80 @@ import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
|
13
13
|
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
|
|
14
14
|
|
|
15
15
|
declare const getRsStringColumnType: () => {
|
|
16
|
-
|
|
16
|
+
extendType: GridNativeColTypes;
|
|
17
17
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
18
18
|
};
|
|
19
19
|
declare const getRsNumberColumnType: () => {
|
|
20
|
-
|
|
20
|
+
extendType: GridNativeColTypes;
|
|
21
21
|
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
22
22
|
};
|
|
23
23
|
declare const getRsSingleSelectColumnType: () => {
|
|
24
|
-
|
|
24
|
+
extendType: GridNativeColTypes;
|
|
25
25
|
filterOperators: ({
|
|
26
26
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
27
27
|
label: string;
|
|
28
28
|
value: string;
|
|
29
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
29
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
30
30
|
} | {
|
|
31
31
|
label: string;
|
|
32
32
|
value: string;
|
|
33
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
33
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
34
34
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
|
|
35
35
|
} | {
|
|
36
36
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
37
37
|
label: string;
|
|
38
38
|
value: string;
|
|
39
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
39
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
40
40
|
})[];
|
|
41
41
|
};
|
|
42
42
|
declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
|
|
43
|
-
|
|
43
|
+
extendType: GridNativeColTypes;
|
|
44
44
|
filterOperators: ({
|
|
45
45
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
46
46
|
label: string;
|
|
47
47
|
value: string;
|
|
48
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
48
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
49
49
|
} | {
|
|
50
50
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
51
51
|
label: string;
|
|
52
52
|
value: string;
|
|
53
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
53
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
54
54
|
})[];
|
|
55
55
|
};
|
|
56
56
|
declare const getRsMultipleSelectColumnType: () => {
|
|
57
|
-
|
|
57
|
+
extendType: GridNativeColTypes;
|
|
58
58
|
filterOperators: ({
|
|
59
59
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
60
60
|
label: string;
|
|
61
61
|
value: string;
|
|
62
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
62
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
63
63
|
} | {
|
|
64
64
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
65
65
|
label: string;
|
|
66
66
|
value: string;
|
|
67
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
67
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
68
68
|
})[];
|
|
69
69
|
};
|
|
70
70
|
declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
|
|
71
|
-
|
|
71
|
+
extendType: GridNativeColTypes;
|
|
72
72
|
filterOperators: ({
|
|
73
73
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
74
74
|
label: string;
|
|
75
75
|
value: string;
|
|
76
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
76
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
77
77
|
} | {
|
|
78
78
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
79
79
|
label: string;
|
|
80
80
|
value: string;
|
|
81
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
81
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
82
82
|
})[];
|
|
83
83
|
};
|
|
84
|
-
declare const customColumnTypes:
|
|
84
|
+
declare const customColumnTypes: GridColumnTypesRecord;
|
|
85
85
|
|
|
86
86
|
declare const IS_BETWEEN: {
|
|
87
87
|
label: string;
|
|
88
88
|
value: string;
|
|
89
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams
|
|
89
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
90
90
|
InputComponent: (props: any) => JSX.Element;
|
|
91
91
|
};
|
|
92
92
|
|
|
@@ -251,12 +251,6 @@ declare const IS_NOT_ANY_OF: {
|
|
|
251
251
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
252
252
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
253
253
|
};
|
|
254
|
-
declare const IS_NOT_ANY_OF_WITH_SELECT: {
|
|
255
|
-
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
256
|
-
label: string;
|
|
257
|
-
value: string;
|
|
258
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
259
|
-
};
|
|
260
254
|
|
|
261
255
|
declare const STARTS_WITH_ANY_OF: {
|
|
262
256
|
label: string;
|
|
@@ -273,8 +267,8 @@ declare const operatorList: {
|
|
|
273
267
|
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
274
268
|
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
275
269
|
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
276
|
-
date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
277
|
-
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
270
|
+
date: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
271
|
+
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
278
272
|
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
279
273
|
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
280
274
|
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
@@ -282,50 +276,50 @@ declare const operatorList: {
|
|
|
282
276
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
283
277
|
label: string;
|
|
284
278
|
value: string;
|
|
285
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
279
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
286
280
|
} | {
|
|
287
281
|
label: string;
|
|
288
282
|
value: string;
|
|
289
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
283
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
290
284
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
|
|
291
285
|
} | {
|
|
292
286
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
293
287
|
label: string;
|
|
294
288
|
value: string;
|
|
295
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
289
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
296
290
|
})[];
|
|
297
291
|
rsSingleSelectWithShortOperatorList: ({
|
|
298
292
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
299
293
|
label: string;
|
|
300
294
|
value: string;
|
|
301
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
295
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
302
296
|
} | {
|
|
303
297
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
304
298
|
label: string;
|
|
305
299
|
value: string;
|
|
306
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
300
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
307
301
|
})[];
|
|
308
302
|
rsMultipleSelect: ({
|
|
309
303
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
310
304
|
label: string;
|
|
311
305
|
value: string;
|
|
312
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
306
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
313
307
|
} | {
|
|
314
308
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
315
309
|
label: string;
|
|
316
310
|
value: string;
|
|
317
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
311
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
318
312
|
})[];
|
|
319
313
|
rsMultipleSelectWithShortOperatorList: ({
|
|
320
314
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
321
315
|
label: string;
|
|
322
316
|
value: string;
|
|
323
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
317
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
324
318
|
} | {
|
|
325
319
|
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
326
320
|
label: string;
|
|
327
321
|
value: string;
|
|
328
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any,
|
|
322
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
329
323
|
})[];
|
|
330
324
|
rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
331
325
|
};
|
|
@@ -397,18 +391,55 @@ declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
|
397
391
|
interface ExtendedGridFilterModel extends GridFilterModel {
|
|
398
392
|
quickFilterValues?: string[];
|
|
399
393
|
}
|
|
400
|
-
interface ExtendedGridPaginationModel
|
|
394
|
+
interface ExtendedGridPaginationModel {
|
|
395
|
+
page: number;
|
|
396
|
+
pageSize: number;
|
|
401
397
|
direction?: 'next' | 'back';
|
|
402
398
|
}
|
|
403
399
|
|
|
404
|
-
type OperatorValue = string | string[];
|
|
400
|
+
type OperatorValue = string | string[] | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Converts internal bracket notation to display-friendly dot notation.
|
|
403
|
+
*
|
|
404
|
+
* Display format (CloudFront-safe, no brackets):
|
|
405
|
+
* - `field[operator]=value` → `field.operator=value` (value URL-encoded if needed)
|
|
406
|
+
* - `field[isAnyOf]=list[a,b,c]` → `field.isAnyOf=a,b,c` (comma-separated, values URL-encoded)
|
|
407
|
+
* - `_sortColumn=[field,desc]` → `_sortColumn=field.desc`
|
|
408
|
+
* - `_pagination=[0,25,next]` → `_pagination=0.25.next`
|
|
409
|
+
* - `_pinnedColumnsLeft=[a,b,c]` → `_pinnedColumnsLeft=a,b,c` (comma-separated)
|
|
410
|
+
* - `_columnVisibility=[a,b,c]` → `_columnVisibility=a,b,c` (comma-separated)
|
|
411
|
+
*/
|
|
412
|
+
declare const convertToDisplayFormat: (search: string) => string;
|
|
413
|
+
/**
|
|
414
|
+
* Converts display-friendly dot notation back to internal bracket notation.
|
|
415
|
+
*
|
|
416
|
+
* Internal format (server-side compatible):
|
|
417
|
+
* - `field.operator=value` → `_field[operator,type]=value`
|
|
418
|
+
* - `field.isAnyOf=a,b,c` → `_field[isAnyOf,type]=list[a,b,c]`
|
|
419
|
+
* - `_sortColumn=field.desc` → `_sortColumn=[field,desc]`
|
|
420
|
+
* - `_pagination=0.25.next` → `_pagination=[0,25,next]`
|
|
421
|
+
* - `_pinnedColumnsLeft=a,b,c` → `_pinnedColumnsLeft=[a,b,c]`
|
|
422
|
+
* - `_columnVisibility=a,b,c` → `_columnVisibility=[a,b,c]`
|
|
423
|
+
*/
|
|
424
|
+
declare const convertFromDisplayFormat: (search: string, columns: DataGridProps['columns']) => string;
|
|
425
|
+
/**
|
|
426
|
+
* Detects if search string is in display format and converts it to internal format.
|
|
427
|
+
*/
|
|
428
|
+
declare const getDecodedSearchFromUrl: (search: string, columns: DataGridProps['columns']) => string;
|
|
429
|
+
/**
|
|
430
|
+
* Builds a display-format query string from internal format.
|
|
431
|
+
*/
|
|
432
|
+
declare const buildQueryParamsString: (search: string) => string;
|
|
433
|
+
/**
|
|
434
|
+
* Compares two search strings for equality, ignoring parameter order.
|
|
435
|
+
* This prevents infinite update loops when the same parameters appear in different order.
|
|
436
|
+
*/
|
|
437
|
+
declare const areSearchStringsEqual: (search1: string, search2: string) => boolean;
|
|
405
438
|
declare const decodeValue: (value: string) => OperatorValue;
|
|
406
|
-
declare const encodeValue: (value: string | undefined) => string;
|
|
439
|
+
declare const encodeValue: (value: string | string[] | undefined) => string;
|
|
407
440
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
408
441
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
409
442
|
declare const numberOperatorDecoder: Record<string, string>;
|
|
410
|
-
declare const isOperatorValueValid: (field: string, operator: OperatorValue, columns: DataGridProps['columns']) => boolean;
|
|
411
|
-
declare const isValueValid: (value: OperatorValue, field: string, columns: DataGridProps['columns'], operator: OperatorValue) => boolean;
|
|
412
443
|
/** FILTERS */
|
|
413
444
|
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps['columns']) => ExtendedGridFilterModel | 'invalid';
|
|
414
445
|
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
@@ -419,8 +450,8 @@ declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearch
|
|
|
419
450
|
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | 'invalid';
|
|
420
451
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
421
452
|
/** COLUMN VISIBILITY */
|
|
422
|
-
declare const getColumnVisibilityFromString: (searchString: string, columns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
423
453
|
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps['columns']) => URLSearchParams;
|
|
454
|
+
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
424
455
|
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => PinnedColumns | 'invalid';
|
|
425
456
|
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
426
457
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
@@ -482,12 +513,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
482
513
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
483
514
|
|
|
484
515
|
interface CompletionResponseItem {
|
|
485
|
-
|
|
486
|
-
|
|
516
|
+
columnField: string;
|
|
517
|
+
operatorValue: string;
|
|
487
518
|
value?: string;
|
|
488
519
|
}
|
|
489
520
|
type CompletionResponse = {
|
|
490
|
-
|
|
521
|
+
linkOperator: 'and' | 'or';
|
|
491
522
|
items: CompletionResponseItem[];
|
|
492
523
|
};
|
|
493
524
|
interface LocaleText {
|
|
@@ -533,9 +564,11 @@ type ControlledPaginationProps = {
|
|
|
533
564
|
displayPagination?: boolean;
|
|
534
565
|
selectionStatus: SelectionStatus;
|
|
535
566
|
apiRef: MutableRefObject<GridApiPro>;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
567
|
+
page: number;
|
|
568
|
+
onPageChange: (page: number) => void;
|
|
569
|
+
pageSize: number;
|
|
570
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
571
|
+
rowsPerPageOptions?: number[];
|
|
539
572
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
540
573
|
paginationProps?: DataGridProps['paginationProps'];
|
|
541
574
|
};
|
|
@@ -546,14 +579,16 @@ type ServerSideControlledPaginationProps = {
|
|
|
546
579
|
displayRowsPerPage?: boolean;
|
|
547
580
|
displayPagination?: boolean;
|
|
548
581
|
selectionStatus: SelectionStatus;
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
582
|
+
page: number;
|
|
583
|
+
onPageChange: (page: number) => void;
|
|
584
|
+
pageSize: number;
|
|
585
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
586
|
+
rowsPerPageOptions?: number[];
|
|
552
587
|
paginationProps?: DataGridProps['paginationProps'];
|
|
553
588
|
rowCount: number;
|
|
554
589
|
loading?: boolean;
|
|
555
590
|
};
|
|
556
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel:
|
|
591
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
557
592
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
558
593
|
|
|
559
594
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -643,13 +678,15 @@ type ToolbarWrapperProps = {
|
|
|
643
678
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
644
679
|
apiRef: DataGridProps['apiRef'];
|
|
645
680
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
681
|
+
page: DataGridProps['page'];
|
|
682
|
+
onPageChange: DataGridProps['onPageChange'];
|
|
683
|
+
pageSize: DataGridProps['pageSize'];
|
|
684
|
+
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
685
|
+
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
649
686
|
paginationProps: DataGridProps['paginationProps'];
|
|
650
687
|
paginationMode?: DataGridProps['paginationMode'];
|
|
651
688
|
rowCount?: DataGridProps['rowCount'];
|
|
652
689
|
};
|
|
653
690
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
654
691
|
|
|
655
|
-
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_ANY_OF, DOES_NOT_HAVE_ANY_OF_WITH_SELECT, 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,
|
|
692
|
+
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_ANY_OF, DOES_NOT_HAVE_ANY_OF_WITH_SELECT, 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, areSearchStringsEqual, buildQueryParamsString, buildStorageKey, clearPreviousVersionStorage, convertFromDisplayFormat, convertToDisplayFormat, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getDecodedSearchFromUrl, 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 { L as CATEGORIES, C as CONTAINS_ANY_OF, m as CONTAINS_ANY_OF_I, J as DIMENSION_MODEL_KEY, D as DOES_NOT_CONTAIN, a as DOES_NOT_EQUAL, b as DOES_NOT_HAVE, n as DOES_NOT_HAVE_ANY_OF, p as DOES_NOT_HAVE_ANY_OF_WITH_SELECT, c as DOES_NOT_HAVE_WITH_SELECT, E as ENDS_WITH_ANY_OF, F as FILTER_MODEL_KEY, K as FILTER_SEARCH_KEY, H as HAS, u as HAS_ANY_OF, v as HAS_ANY_OF_WITH_SELECT, e as HAS_ONLY, f as HAS_ONLY_WITH_SELECT, d as HAS_WITH_SELECT, h as IS, q as IS_ANY_OF, s as IS_ANY_OF_I, t as IS_ANY_OF_I_WITH_SELECT, r as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, j as IS_NOT, w as IS_NOT_ANY_OF, x as IS_NOT_ANY_OF_WITH_SELECT, k as IS_NOT_WITH_SELECT, i as IS_WITH_SELECT, P as PAGINATION_MODEL_KEY, G as PINNED_COLUMNS, B as SORT_MODEL_KEY, S as STARTS_WITH_ANY_OF, ab as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, aa as areFilterModelsEquivalent, M as buildStorageKey, N as clearPreviousVersionStorage, O as decodeValue, Q as encodeValue, a2 as getColumnVisibilityFromString, Y as getFilterModelFromString, a7 as getFinalSearch, g as getGridNumericOperators, y as getGridStringArrayOperators, z as getGridStringArrayOperatorsWithSelect, A as getGridStringArrayOperatorsWithSelectOnStringArrayColumns, l as getGridStringOperators, a8 as getModelsParsedOrUpdateLocalStorage, a0 as getPaginationFromString, a4 as getPinnedColumnsFromString, a3 as getSearchParamsFromColumnVisibility, Z as getSearchParamsFromFilterModel, a1 as getSearchParamsFromPagination, a5 as getSearchParamsFromPinnedColumns, $ as getSearchParamsFromSorting, a6 as getSearchParamsFromTab, _ as getSortingFromString, W as isOperatorValueValid, X as isValueValid, U as numberOperatorDecoder, T as numberOperatorEncoder, o as operatorList, a9 as updateUrl, R 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, v as DOES_NOT_HAVE_ANY_OF, w as DOES_NOT_HAVE_ANY_OF_WITH_SELECT, k as DOES_NOT_HAVE_WITH_SELECT, E as ENDS_WITH_ANY_OF, H as HAS, B as HAS_ANY_OF, F as HAS_ANY_OF_WITH_SELECT, m as HAS_ONLY, n as HAS_ONLY_WITH_SELECT, l as HAS_WITH_SELECT, p as IS, x as IS_ANY_OF, z as IS_ANY_OF_I, A as IS_ANY_OF_I_WITH_SELECT, y as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, r as IS_NOT, G 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, J as getGridStringArrayOperators, K as getGridStringArrayOperatorsWithSelect, L 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, G as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, E as areFilterModelsEquivalent, i as areSearchStringsEqual, h as buildQueryParamsString, c as buildStorageKey, d as clearPreviousVersionStorage, f as convertFromDisplayFormat, e as convertToDisplayFormat, j as decodeValue, k as encodeValue, v as getColumnVisibilityFromString, g as getDecodedSearchFromUrl, m as getFilterModelFromString, z as getFinalSearch, A as getModelsParsedOrUpdateLocalStorage, r as getPaginationFromString, w as getPinnedColumnsFromString, t as getSearchParamsFromColumnVisibility, o as getSearchParamsFromFilterModel, s as getSearchParamsFromPagination, x as getSearchParamsFromPinnedColumns, q as getSearchParamsFromSorting, y as getSearchParamsFromTab, p as getSortingFromString, l as numberOperatorDecoder, n as numberOperatorEncoder, B 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.11.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.11.0-0",
|
|
90
|
+
"@redsift/icons": "^11.11.0-0",
|
|
91
91
|
"react": ">=17",
|
|
92
92
|
"react-dom": ">=17",
|
|
93
93
|
"styled-components": "^5.3.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "0716dc6dc4b6924b71e4cda8d31cf063ca6ae036"
|
|
96
96
|
}
|