@redsift/table 11.6.0 → 11.7.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 -1904
- 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 +90 -80
- 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
|
|
|
@@ -206,32 +203,39 @@ declare const IS_ANY_OF_WITH_SELECT: {
|
|
|
206
203
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
207
204
|
};
|
|
208
205
|
|
|
209
|
-
declare const
|
|
206
|
+
declare const IS_ANY_OF_I: {
|
|
210
207
|
label: string;
|
|
211
208
|
value: string;
|
|
212
209
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
213
210
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
214
211
|
};
|
|
215
|
-
declare const
|
|
212
|
+
declare const IS_ANY_OF_I_WITH_SELECT: {
|
|
216
213
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
217
214
|
label: string;
|
|
218
215
|
value: string;
|
|
219
216
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
220
217
|
};
|
|
221
218
|
|
|
222
|
-
declare const
|
|
219
|
+
declare const HAS_ANY_OF: {
|
|
223
220
|
label: string;
|
|
224
221
|
value: string;
|
|
225
222
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
226
223
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
227
224
|
};
|
|
228
|
-
declare const
|
|
225
|
+
declare const HAS_ANY_OF_WITH_SELECT: {
|
|
229
226
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
230
227
|
label: string;
|
|
231
228
|
value: string;
|
|
232
229
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
233
230
|
};
|
|
234
231
|
|
|
232
|
+
declare const IS_NOT_ANY_OF: {
|
|
233
|
+
label: string;
|
|
234
|
+
value: string;
|
|
235
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
236
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
237
|
+
};
|
|
238
|
+
|
|
235
239
|
declare const STARTS_WITH_ANY_OF: {
|
|
236
240
|
label: string;
|
|
237
241
|
value: string;
|
|
@@ -247,59 +251,59 @@ declare const operatorList: {
|
|
|
247
251
|
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
248
252
|
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
249
253
|
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
250
|
-
date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
251
|
-
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>[];
|
|
252
256
|
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
253
257
|
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
254
258
|
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
255
259
|
rsSingleSelect: ({
|
|
256
|
-
InputComponent: typeof
|
|
260
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
257
261
|
label: string;
|
|
258
262
|
value: string;
|
|
259
|
-
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;
|
|
260
264
|
} | {
|
|
261
265
|
label: string;
|
|
262
266
|
value: string;
|
|
263
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams
|
|
264
|
-
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;
|
|
265
269
|
} | {
|
|
266
|
-
InputComponent: typeof
|
|
270
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
267
271
|
label: string;
|
|
268
272
|
value: string;
|
|
269
|
-
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;
|
|
270
274
|
})[];
|
|
271
275
|
rsSingleSelectWithShortOperatorList: ({
|
|
272
|
-
InputComponent: typeof
|
|
276
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
273
277
|
label: string;
|
|
274
278
|
value: string;
|
|
275
|
-
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;
|
|
276
280
|
} | {
|
|
277
|
-
InputComponent: typeof
|
|
281
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
278
282
|
label: string;
|
|
279
283
|
value: string;
|
|
280
|
-
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;
|
|
281
285
|
})[];
|
|
282
286
|
rsMultipleSelect: ({
|
|
283
|
-
InputComponent: typeof
|
|
287
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
284
288
|
label: string;
|
|
285
289
|
value: string;
|
|
286
|
-
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;
|
|
287
291
|
} | {
|
|
288
|
-
InputComponent: typeof
|
|
292
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
289
293
|
label: string;
|
|
290
294
|
value: string;
|
|
291
|
-
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;
|
|
292
296
|
})[];
|
|
293
297
|
rsMultipleSelectWithShortOperatorList: ({
|
|
294
|
-
InputComponent: typeof
|
|
298
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
295
299
|
label: string;
|
|
296
300
|
value: string;
|
|
297
|
-
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;
|
|
298
302
|
} | {
|
|
299
|
-
InputComponent: typeof
|
|
303
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
300
304
|
label: string;
|
|
301
305
|
value: string;
|
|
302
|
-
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;
|
|
303
307
|
})[];
|
|
304
308
|
rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
305
309
|
};
|
|
@@ -371,7 +375,9 @@ declare const StatefulDataGrid: Comp<StatefulDataGridProps, HTMLDivElement>;
|
|
|
371
375
|
interface ExtendedGridFilterModel extends GridFilterModel {
|
|
372
376
|
quickFilterValues?: string[];
|
|
373
377
|
}
|
|
374
|
-
interface ExtendedGridPaginationModel
|
|
378
|
+
interface ExtendedGridPaginationModel {
|
|
379
|
+
page: number;
|
|
380
|
+
pageSize: number;
|
|
375
381
|
direction?: 'next' | 'back';
|
|
376
382
|
}
|
|
377
383
|
|
|
@@ -381,21 +387,19 @@ declare const encodeValue: (value: string | undefined) => string;
|
|
|
381
387
|
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
382
388
|
declare const numberOperatorEncoder: Record<string, string>;
|
|
383
389
|
declare const numberOperatorDecoder: Record<string, string>;
|
|
384
|
-
declare const isOperatorValueValid: (field: string, operator: OperatorValue, columns: DataGridProps['columns']) => boolean;
|
|
385
|
-
declare const isValueValid: (value: OperatorValue, field: string, columns: DataGridProps['columns'], operator: OperatorValue) => boolean;
|
|
386
390
|
/** FILTERS */
|
|
387
|
-
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps[
|
|
391
|
+
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps["columns"]) => ExtendedGridFilterModel | "invalid";
|
|
388
392
|
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
389
393
|
/** SORT */
|
|
390
|
-
declare const getSortingFromString: (searchString: string, columns: DataGridProps[
|
|
394
|
+
declare const getSortingFromString: (searchString: string, columns: DataGridProps["columns"]) => GridSortModel | "invalid";
|
|
391
395
|
declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearchParams;
|
|
392
396
|
/** PAGINATION */
|
|
393
|
-
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel |
|
|
397
|
+
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | "invalid";
|
|
394
398
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
395
399
|
/** COLUMN VISIBILITY */
|
|
396
|
-
declare const
|
|
397
|
-
declare const
|
|
398
|
-
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";
|
|
399
403
|
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
400
404
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
401
405
|
type FinalSearchInput = {
|
|
@@ -433,7 +437,7 @@ type ModelsTable = {
|
|
|
433
437
|
pinnedColumnsModel: PinnedColumns;
|
|
434
438
|
};
|
|
435
439
|
/** Return the state of the table given the URL and the local storage state */
|
|
436
|
-
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;
|
|
437
441
|
type DataGridModel = {
|
|
438
442
|
filterModel: GridFilterModel;
|
|
439
443
|
sortModel: GridSortModel;
|
|
@@ -441,7 +445,7 @@ type DataGridModel = {
|
|
|
441
445
|
columnsModel: GridColumnVisibilityModel;
|
|
442
446
|
pinnedColumnsModel: GridPinnedColumns;
|
|
443
447
|
};
|
|
444
|
-
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;
|
|
445
449
|
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
446
450
|
|
|
447
451
|
declare const BaseButton: React.JSXElementConstructor<any>;
|
|
@@ -456,12 +460,12 @@ declare const BasePopper: React.JSXElementConstructor<any>;
|
|
|
456
460
|
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
457
461
|
|
|
458
462
|
interface CompletionResponseItem {
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
columnField: string;
|
|
464
|
+
operatorValue: string;
|
|
461
465
|
value?: string;
|
|
462
466
|
}
|
|
463
467
|
type CompletionResponse = {
|
|
464
|
-
|
|
468
|
+
linkOperator: 'and' | 'or';
|
|
465
469
|
items: CompletionResponseItem[];
|
|
466
470
|
};
|
|
467
471
|
interface LocaleText {
|
|
@@ -507,9 +511,11 @@ type ControlledPaginationProps = {
|
|
|
507
511
|
displayPagination?: boolean;
|
|
508
512
|
selectionStatus: SelectionStatus;
|
|
509
513
|
apiRef: MutableRefObject<GridApiPro>;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
514
|
+
page: number;
|
|
515
|
+
onPageChange: (page: number) => void;
|
|
516
|
+
pageSize: number;
|
|
517
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
518
|
+
rowsPerPageOptions?: number[];
|
|
513
519
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
514
520
|
paginationProps?: DataGridProps['paginationProps'];
|
|
515
521
|
};
|
|
@@ -520,14 +526,16 @@ type ServerSideControlledPaginationProps = {
|
|
|
520
526
|
displayRowsPerPage?: boolean;
|
|
521
527
|
displayPagination?: boolean;
|
|
522
528
|
selectionStatus: SelectionStatus;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
529
|
+
page: number;
|
|
530
|
+
onPageChange: (page: number) => void;
|
|
531
|
+
pageSize: number;
|
|
532
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
533
|
+
rowsPerPageOptions?: number[];
|
|
526
534
|
paginationProps?: DataGridProps['paginationProps'];
|
|
527
535
|
rowCount: number;
|
|
528
536
|
loading?: boolean;
|
|
529
537
|
};
|
|
530
|
-
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;
|
|
531
539
|
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
532
540
|
|
|
533
541
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -617,13 +625,15 @@ type ToolbarWrapperProps = {
|
|
|
617
625
|
selectionStatus: React.MutableRefObject<SelectionStatus>;
|
|
618
626
|
apiRef: DataGridProps['apiRef'];
|
|
619
627
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
628
|
+
page: DataGridProps['page'];
|
|
629
|
+
onPageChange: DataGridProps['onPageChange'];
|
|
630
|
+
pageSize: DataGridProps['pageSize'];
|
|
631
|
+
onPageSizeChange: DataGridProps['onPageSizeChange'];
|
|
632
|
+
rowsPerPageOptions: DataGridProps['rowsPerPageOptions'];
|
|
623
633
|
paginationProps: DataGridProps['paginationProps'];
|
|
624
634
|
paginationMode?: DataGridProps['paginationMode'];
|
|
625
635
|
rowCount?: DataGridProps['rowCount'];
|
|
626
636
|
};
|
|
627
637
|
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
628
638
|
|
|
629
|
-
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_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 { B as CATEGORIES, C as CONTAINS_ANY_OF, m as CONTAINS_ANY_OF_I, z 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, A as FILTER_SEARCH_KEY, H as HAS, q as HAS_ANY_OF, r 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, p as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, j as IS_NOT, s as IS_NOT_ANY_OF, t as IS_NOT_ANY_OF_WITH_SELECT, k as IS_NOT_WITH_SELECT, i as IS_WITH_SELECT, P as PAGINATION_MODEL_KEY, y as PINNED_COLUMNS, x as SORT_MODEL_KEY, S as STARTS_WITH_ANY_OF, a7 as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, a6 as areFilterModelsEquivalent, G as buildStorageKey, J as clearPreviousVersionStorage, K as decodeValue, L as encodeValue, _ as getColumnVisibilityFromString, T as getFilterModelFromString, a3 as getFinalSearch, g as getGridNumericOperators, u as getGridStringArrayOperators, v as getGridStringArrayOperatorsWithSelect, w as getGridStringArrayOperatorsWithSelectOnStringArrayColumns, l as getGridStringOperators, a4 as getModelsParsedOrUpdateLocalStorage, Y as getPaginationFromString, a0 as getPinnedColumnsFromString, $ as getSearchParamsFromColumnVisibility, U as getSearchParamsFromFilterModel, Z as getSearchParamsFromPagination, a1 as getSearchParamsFromPinnedColumns, X as getSearchParamsFromSorting, a2 as getSearchParamsFromTab, W as getSortingFromString, Q as isOperatorValueValid, R as isValueValid, O as numberOperatorDecoder, N as numberOperatorEncoder, o as operatorList, a5 as updateUrl, M 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.7.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.7.0-0",
|
|
90
|
+
"@redsift/icons": "^11.7.0-0",
|
|
91
91
|
"react": ">=17",
|
|
92
92
|
"react-dom": ">=17",
|
|
93
93
|
"styled-components": "^5.3.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "e856e8e96da93e98c9fe870a76a502616d8fe65c"
|
|
96
96
|
}
|