@redsift/table 12.5.5-alpha.2 → 12.5.5-muiv6
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/BaseComponents.js +1 -1
- package/_internal/BasePopper.js +2469 -0
- package/_internal/BasePopper.js.map +1 -0
- package/_internal/ControlledPagination.js +11004 -0
- package/_internal/ControlledPagination.js.map +1 -0
- package/_internal/DataGrid2.js +87 -116
- package/_internal/DataGrid2.js.map +1 -1
- package/_internal/GridToolbarFilterSemanticField2.js +3 -1340
- package/_internal/GridToolbarFilterSemanticField2.js.map +1 -1
- package/_internal/Pagination.js +1 -1
- package/_internal/Portal.js +6538 -0
- package/_internal/Portal.js.map +1 -0
- package/_internal/StatefulDataGrid.js +1 -1
- package/_internal/StatefulDataGrid2.js +1683 -1063
- package/_internal/StatefulDataGrid2.js.map +1 -1
- package/_internal/Toolbar2.js +6 -23
- package/_internal/Toolbar2.js.map +1 -1
- package/_internal/ToolbarWrapper2.js +27 -11
- package/_internal/ToolbarWrapper2.js.map +1 -1
- package/_internal/jsx-runtime.js +1342 -0
- package/_internal/jsx-runtime.js.map +1 -0
- package/_internal/useControlledDatagridState.js +287 -13
- package/_internal/useControlledDatagridState.js.map +1 -1
- package/index.d.ts +464 -515
- package/index.js +40 -47
- package/index.js.map +1 -1
- package/package.json +10 -9
- package/_internal/BaseIconButton.js +0 -126
- package/_internal/BaseIconButton.js.map +0 -1
- package/_internal/ServerSideControlledPagination.js +0 -324
- package/_internal/ServerSideControlledPagination.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,18 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
1
|
+
import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridColumnTypesRecord, GridColDef, GridFilterOperator, GridFilterItem, GridCellParams, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, DataGridProProps, GridFilterModel, GridPaginationModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridApiPro as GridApiPro$1, GridRowParams, GridRowSelectionModel, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
|
|
3
|
+
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
4
|
+
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
5
|
+
import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
5
6
|
import { TablePaginationProps } from '@mui/material';
|
|
7
|
+
import { Theme, Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
|
|
8
|
+
import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
6
9
|
|
|
7
|
-
declare const DETAIL_PANEL_TOGGLE_COL_DEF:
|
|
10
|
+
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef;
|
|
8
11
|
|
|
9
|
-
declare const getRsStringColumnType: () =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
declare const
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
declare const getRsStringColumnType: () => {
|
|
13
|
+
type: string;
|
|
14
|
+
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
15
|
+
};
|
|
16
|
+
declare const getRsNumberColumnType: () => {
|
|
17
|
+
type: string;
|
|
18
|
+
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
19
|
+
};
|
|
20
|
+
declare const getRsSingleSelectColumnType: () => {
|
|
21
|
+
type: string;
|
|
22
|
+
filterOperators: ({
|
|
23
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
27
|
+
} | {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
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;
|
|
32
|
+
} | {
|
|
33
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
|
|
40
|
+
type: string;
|
|
41
|
+
filterOperators: ({
|
|
42
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
46
|
+
} | {
|
|
47
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
48
|
+
label: string;
|
|
49
|
+
value: string;
|
|
50
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
53
|
+
declare const getRsMultipleSelectColumnType: () => {
|
|
54
|
+
type: string;
|
|
55
|
+
filterOperators: ({
|
|
56
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
57
|
+
label: string;
|
|
58
|
+
value: string;
|
|
59
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
60
|
+
} | {
|
|
61
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
62
|
+
label: string;
|
|
63
|
+
value: string;
|
|
64
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
65
|
+
} | {
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
getApplyFilterFn: (_filterItem: _mui_x_data_grid_pro.GridFilterItem) => (params: _mui_x_data_grid_pro.GridCellParams) => boolean;
|
|
69
|
+
requiresFilterValue: boolean;
|
|
70
|
+
})[];
|
|
71
|
+
};
|
|
72
|
+
declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
|
|
73
|
+
type: string;
|
|
74
|
+
filterOperators: ({
|
|
75
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
76
|
+
label: string;
|
|
77
|
+
value: string;
|
|
78
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
79
|
+
} | {
|
|
80
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
81
|
+
label: string;
|
|
82
|
+
value: string;
|
|
83
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
84
|
+
})[];
|
|
85
|
+
};
|
|
86
|
+
declare const customColumnTypes: Partial<GridColumnTypesRecord>;
|
|
16
87
|
|
|
17
88
|
type StringOperatorName = 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'doesNotStartWith' | 'endsWith' | 'doesNotEndWith' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | 'isNotAnyOf' | 'containsAnyOf' | 'doesNotContainAnyOf' | 'startsWithAnyOf' | 'doesNotStartWithAnyOf' | 'endsWithAnyOf' | 'doesNotEndWithAnyOf';
|
|
18
89
|
type NumberOperatorName = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'isEmpty' | 'isNotEmpty' | 'isBetween';
|
|
@@ -54,174 +125,242 @@ type ColumnOptions<T extends ColumnType> = T extends 'string' ? StringColumnOpti
|
|
|
54
125
|
*/
|
|
55
126
|
declare function createColumn<T extends ColumnType>(type: T, options?: ColumnOptions<T>): Partial<GridColDef>;
|
|
56
127
|
|
|
57
|
-
declare const ARRAY_IS_EMPTY:
|
|
58
|
-
|
|
128
|
+
declare const ARRAY_IS_EMPTY: {
|
|
129
|
+
label: string;
|
|
130
|
+
value: string;
|
|
131
|
+
getApplyFilterFn: (_filterItem: GridFilterItem) => (params: GridCellParams) => boolean;
|
|
132
|
+
requiresFilterValue: boolean;
|
|
133
|
+
};
|
|
134
|
+
declare const ARRAY_IS_NOT_EMPTY: {
|
|
135
|
+
label: string;
|
|
136
|
+
value: string;
|
|
137
|
+
getApplyFilterFn: (_filterItem: GridFilterItem) => (params: GridCellParams) => boolean;
|
|
138
|
+
requiresFilterValue: boolean;
|
|
139
|
+
};
|
|
59
140
|
|
|
60
|
-
declare const DATE_IS_BETWEEN:
|
|
141
|
+
declare const DATE_IS_BETWEEN: {
|
|
142
|
+
label: string;
|
|
143
|
+
value: string;
|
|
144
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
|
|
145
|
+
InputComponent: (props: any) => JSX.Element;
|
|
146
|
+
};
|
|
61
147
|
|
|
62
148
|
declare const getGridDateOperatorsExtended: (showTime?: boolean) => GridFilterOperator[];
|
|
63
149
|
|
|
64
|
-
declare const IS_BETWEEN:
|
|
150
|
+
declare const IS_BETWEEN: {
|
|
151
|
+
label: string;
|
|
152
|
+
value: string;
|
|
153
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
|
|
154
|
+
InputComponent: (props: any) => JSX.Element;
|
|
155
|
+
};
|
|
65
156
|
|
|
66
|
-
declare const getGridNumericOperators: () => GridFilterOperator<any,
|
|
157
|
+
declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
67
158
|
|
|
68
|
-
declare const DOES_NOT_CONTAIN:
|
|
159
|
+
declare const DOES_NOT_CONTAIN: {
|
|
160
|
+
label: string;
|
|
161
|
+
value: string;
|
|
162
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
163
|
+
InputComponent: typeof GridFilterInputValue;
|
|
164
|
+
};
|
|
69
165
|
|
|
70
|
-
declare const DOES_NOT_END_WITH:
|
|
166
|
+
declare const DOES_NOT_END_WITH: {
|
|
167
|
+
label: string;
|
|
168
|
+
value: string;
|
|
169
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
170
|
+
InputComponent: typeof GridFilterInputValue;
|
|
171
|
+
};
|
|
71
172
|
|
|
72
|
-
declare const DOES_NOT_EQUAL:
|
|
173
|
+
declare const DOES_NOT_EQUAL: {
|
|
174
|
+
label: string;
|
|
175
|
+
value: string;
|
|
176
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
177
|
+
InputComponent: typeof GridFilterInputValue;
|
|
178
|
+
};
|
|
73
179
|
|
|
74
|
-
declare const DOES_NOT_HAVE:
|
|
180
|
+
declare const DOES_NOT_HAVE: {
|
|
181
|
+
label: string;
|
|
182
|
+
value: string;
|
|
183
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
184
|
+
InputComponent: typeof GridFilterInputValue;
|
|
185
|
+
};
|
|
75
186
|
declare const DOES_NOT_HAVE_WITH_SELECT: {
|
|
76
187
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
77
|
-
label
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
81
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
82
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
83
|
-
requiresFilterValue?: boolean;
|
|
188
|
+
label: string;
|
|
189
|
+
value: string;
|
|
190
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
84
191
|
};
|
|
85
192
|
|
|
86
|
-
declare const DOES_NOT_START_WITH:
|
|
193
|
+
declare const DOES_NOT_START_WITH: {
|
|
194
|
+
label: string;
|
|
195
|
+
value: string;
|
|
196
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
197
|
+
InputComponent: typeof GridFilterInputValue;
|
|
198
|
+
};
|
|
87
199
|
|
|
88
|
-
declare const HAS:
|
|
200
|
+
declare const HAS: {
|
|
201
|
+
label: string;
|
|
202
|
+
value: string;
|
|
203
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
204
|
+
InputComponent: typeof GridFilterInputValue;
|
|
205
|
+
};
|
|
89
206
|
declare const HAS_WITH_SELECT: {
|
|
90
207
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
91
|
-
label
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
95
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
96
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
97
|
-
requiresFilterValue?: boolean;
|
|
208
|
+
label: string;
|
|
209
|
+
value: string;
|
|
210
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
98
211
|
};
|
|
99
212
|
|
|
100
|
-
declare const HAS_ONLY:
|
|
213
|
+
declare const HAS_ONLY: {
|
|
214
|
+
label: string;
|
|
215
|
+
value: string;
|
|
216
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
217
|
+
InputComponent: typeof GridFilterInputValue;
|
|
218
|
+
};
|
|
101
219
|
declare const HAS_ONLY_WITH_SELECT: {
|
|
102
220
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
103
|
-
label
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
107
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
108
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
109
|
-
requiresFilterValue?: boolean;
|
|
221
|
+
label: string;
|
|
222
|
+
value: string;
|
|
223
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
110
224
|
};
|
|
111
225
|
|
|
112
|
-
declare const IS:
|
|
226
|
+
declare const IS: {
|
|
227
|
+
label: string;
|
|
228
|
+
value: string;
|
|
229
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
230
|
+
InputComponent: typeof GridFilterInputValue;
|
|
231
|
+
};
|
|
113
232
|
declare const IS_WITH_SELECT: {
|
|
114
233
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
115
|
-
label
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
119
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
120
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
121
|
-
requiresFilterValue?: boolean;
|
|
234
|
+
label: string;
|
|
235
|
+
value: string;
|
|
236
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
122
237
|
};
|
|
123
238
|
|
|
124
|
-
declare const IS_NOT:
|
|
239
|
+
declare const IS_NOT: {
|
|
240
|
+
label: string;
|
|
241
|
+
value: string;
|
|
242
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
243
|
+
InputComponent: typeof GridFilterInputValue;
|
|
244
|
+
};
|
|
125
245
|
declare const IS_NOT_WITH_SELECT: {
|
|
126
246
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
127
|
-
label
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
131
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
132
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
133
|
-
requiresFilterValue?: boolean;
|
|
247
|
+
label: string;
|
|
248
|
+
value: string;
|
|
249
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
134
250
|
};
|
|
135
251
|
|
|
136
|
-
declare const getGridStringOperators: () => GridFilterOperator<any,
|
|
252
|
+
declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
137
253
|
|
|
138
|
-
declare const CONTAINS_ANY_OF:
|
|
254
|
+
declare const CONTAINS_ANY_OF: {
|
|
255
|
+
label: string;
|
|
256
|
+
value: string;
|
|
257
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
258
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
259
|
+
};
|
|
139
260
|
|
|
140
|
-
declare const DOES_NOT_CONTAIN_ANY_OF:
|
|
261
|
+
declare const DOES_NOT_CONTAIN_ANY_OF: {
|
|
262
|
+
label: string;
|
|
263
|
+
value: string;
|
|
264
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
265
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
266
|
+
};
|
|
141
267
|
|
|
142
|
-
declare const DOES_NOT_END_WITH_ANY_OF:
|
|
268
|
+
declare const DOES_NOT_END_WITH_ANY_OF: {
|
|
269
|
+
label: string;
|
|
270
|
+
value: string;
|
|
271
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
272
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
273
|
+
};
|
|
143
274
|
|
|
144
|
-
declare const DOES_NOT_HAVE_ANY_OF:
|
|
275
|
+
declare const DOES_NOT_HAVE_ANY_OF: {
|
|
276
|
+
label: string;
|
|
277
|
+
value: string;
|
|
278
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
279
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
280
|
+
};
|
|
145
281
|
declare const DOES_NOT_HAVE_ANY_OF_WITH_SELECT: {
|
|
146
282
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
147
|
-
label
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
151
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
152
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
153
|
-
requiresFilterValue?: boolean;
|
|
283
|
+
label: string;
|
|
284
|
+
value: string;
|
|
285
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
154
286
|
};
|
|
155
287
|
|
|
156
|
-
declare const DOES_NOT_START_WITH_ANY_OF:
|
|
288
|
+
declare const DOES_NOT_START_WITH_ANY_OF: {
|
|
289
|
+
label: string;
|
|
290
|
+
value: string;
|
|
291
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
292
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
293
|
+
};
|
|
157
294
|
|
|
158
|
-
declare const ENDS_WITH_ANY_OF:
|
|
295
|
+
declare const ENDS_WITH_ANY_OF: {
|
|
296
|
+
label: string;
|
|
297
|
+
value: string;
|
|
298
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
299
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
300
|
+
};
|
|
159
301
|
|
|
160
|
-
declare const HAS_ALL_OF:
|
|
302
|
+
declare const HAS_ALL_OF: {
|
|
303
|
+
label: string;
|
|
304
|
+
value: string;
|
|
305
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
306
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
307
|
+
};
|
|
161
308
|
declare const HAS_ALL_OF_WITH_SELECT: {
|
|
162
309
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
163
|
-
label
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
167
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
168
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
169
|
-
requiresFilterValue?: boolean;
|
|
310
|
+
label: string;
|
|
311
|
+
value: string;
|
|
312
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
170
313
|
};
|
|
171
314
|
|
|
172
|
-
declare const HAS_ANY_OF:
|
|
315
|
+
declare const HAS_ANY_OF: {
|
|
316
|
+
label: string;
|
|
317
|
+
value: string;
|
|
318
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
319
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
320
|
+
};
|
|
173
321
|
declare const HAS_ANY_OF_WITH_SELECT: {
|
|
174
322
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
175
|
-
label
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
179
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
180
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
181
|
-
requiresFilterValue?: boolean;
|
|
323
|
+
label: string;
|
|
324
|
+
value: string;
|
|
325
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
182
326
|
};
|
|
183
327
|
|
|
184
|
-
declare const IS_ANY_OF:
|
|
328
|
+
declare const IS_ANY_OF: {
|
|
329
|
+
label: string;
|
|
330
|
+
value: string;
|
|
331
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
332
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
333
|
+
};
|
|
185
334
|
declare const IS_ANY_OF_WITH_SELECT: {
|
|
186
335
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
187
|
-
label
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
191
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
192
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
193
|
-
requiresFilterValue?: boolean;
|
|
336
|
+
label: string;
|
|
337
|
+
value: string;
|
|
338
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
194
339
|
};
|
|
195
340
|
|
|
196
|
-
declare const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
202
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
203
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
204
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
205
|
-
requiresFilterValue?: boolean;
|
|
341
|
+
declare const IS_NOT_ANY_OF: {
|
|
342
|
+
label: string;
|
|
343
|
+
value: string;
|
|
344
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
345
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
206
346
|
};
|
|
207
|
-
|
|
208
|
-
declare const IS_NOT_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
209
347
|
declare const IS_NOT_ANY_OF_WITH_SELECT: {
|
|
210
348
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
211
|
-
label
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
215
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
216
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
217
|
-
requiresFilterValue?: boolean;
|
|
349
|
+
label: string;
|
|
350
|
+
value: string;
|
|
351
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
218
352
|
};
|
|
219
353
|
|
|
220
|
-
declare const STARTS_WITH_ANY_OF:
|
|
354
|
+
declare const STARTS_WITH_ANY_OF: {
|
|
355
|
+
label: string;
|
|
356
|
+
value: string;
|
|
357
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
358
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
359
|
+
};
|
|
221
360
|
|
|
222
|
-
declare const getGridStringArrayOperators: () => GridFilterOperator<any,
|
|
223
|
-
declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator<any,
|
|
224
|
-
declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator<any,
|
|
361
|
+
declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
362
|
+
declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator<any, number | string | null, any>[];
|
|
363
|
+
declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator<any, number | string | null, any>[];
|
|
225
364
|
|
|
226
365
|
/**
|
|
227
366
|
* Wraps a filter operator's `getApplyFilterFn` to lowercase both the cell value
|
|
@@ -236,93 +375,69 @@ declare const wrapCaseInsensitive: (operator: GridFilterOperator) => GridFilterO
|
|
|
236
375
|
declare const makeCaseInsensitive: (operators: GridFilterOperator[]) => GridFilterOperator[];
|
|
237
376
|
|
|
238
377
|
declare const operatorList: {
|
|
239
|
-
string:
|
|
240
|
-
number:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
requiresFilterValue?: boolean;
|
|
378
|
+
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
379
|
+
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
380
|
+
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
381
|
+
date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
382
|
+
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
|
|
383
|
+
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
384
|
+
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
385
|
+
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
386
|
+
rsSingleSelect: ({
|
|
387
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
388
|
+
label: string;
|
|
389
|
+
value: string;
|
|
390
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
391
|
+
} | {
|
|
392
|
+
label: string;
|
|
393
|
+
value: string;
|
|
394
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
395
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleValue;
|
|
258
396
|
} | {
|
|
259
|
-
InputComponent: typeof
|
|
260
|
-
label
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
264
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
265
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
266
|
-
requiresFilterValue?: boolean;
|
|
397
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
398
|
+
label: string;
|
|
399
|
+
value: string;
|
|
400
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
267
401
|
})[];
|
|
268
402
|
rsSingleSelectWithShortOperatorList: ({
|
|
269
|
-
InputComponent: typeof
|
|
270
|
-
label
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
274
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
275
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
276
|
-
requiresFilterValue?: boolean;
|
|
403
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
404
|
+
label: string;
|
|
405
|
+
value: string;
|
|
406
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
277
407
|
} | {
|
|
278
|
-
InputComponent: typeof
|
|
279
|
-
label
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
283
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
284
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
285
|
-
requiresFilterValue?: boolean;
|
|
408
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
409
|
+
label: string;
|
|
410
|
+
value: string;
|
|
411
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
286
412
|
})[];
|
|
287
|
-
rsMultipleSelect: (
|
|
288
|
-
InputComponent: typeof
|
|
289
|
-
label
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
293
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
294
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
295
|
-
requiresFilterValue?: boolean;
|
|
413
|
+
rsMultipleSelect: ({
|
|
414
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
415
|
+
label: string;
|
|
416
|
+
value: string;
|
|
417
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
296
418
|
} | {
|
|
297
|
-
InputComponent: typeof
|
|
298
|
-
label
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
419
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
420
|
+
label: string;
|
|
421
|
+
value: string;
|
|
422
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
423
|
+
} | {
|
|
424
|
+
label: string;
|
|
425
|
+
value: string;
|
|
426
|
+
getApplyFilterFn: (_filterItem: _mui_x_data_grid_pro.GridFilterItem) => (params: _mui_x_data_grid_pro.GridCellParams) => boolean;
|
|
427
|
+
requiresFilterValue: boolean;
|
|
305
428
|
})[];
|
|
306
429
|
rsMultipleSelectWithShortOperatorList: ({
|
|
307
|
-
InputComponent: typeof
|
|
308
|
-
label
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
312
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
313
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
314
|
-
requiresFilterValue?: boolean;
|
|
430
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputSingleSelect;
|
|
431
|
+
label: string;
|
|
432
|
+
value: string;
|
|
433
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
315
434
|
} | {
|
|
316
|
-
InputComponent: typeof
|
|
317
|
-
label
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
321
|
-
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
322
|
-
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
323
|
-
requiresFilterValue?: boolean;
|
|
435
|
+
InputComponent: typeof _mui_x_data_grid_pro.GridFilterInputMultipleSingleSelect;
|
|
436
|
+
label: string;
|
|
437
|
+
value: string;
|
|
438
|
+
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams) => boolean) | null;
|
|
324
439
|
})[];
|
|
325
|
-
rsStringArray:
|
|
440
|
+
rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
326
441
|
};
|
|
327
442
|
|
|
328
443
|
declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
|
|
@@ -336,13 +451,7 @@ declare const DIMENSION_MODEL_KEY = "dimension";
|
|
|
336
451
|
declare const FILTER_SEARCH_KEY = "searchModel";
|
|
337
452
|
declare const DENSITY_MODEL_KEY = "densityModel";
|
|
338
453
|
declare const COLUMN_ORDER_MODEL_KEY = "columnOrderModel";
|
|
339
|
-
declare const
|
|
340
|
-
declare const AGGREGATION_MODEL_KEY = "aggregationModel";
|
|
341
|
-
/** Storage category key for the pivot column/row/value configuration. Consumer interop — use with `buildStorageKey`. */
|
|
342
|
-
declare const PIVOT_MODEL_KEY = "pivotModel";
|
|
343
|
-
/** Storage category key for whether pivoting is active. Consumer interop — use with `buildStorageKey`. */
|
|
344
|
-
declare const PIVOT_ACTIVE_KEY = "pivotActive";
|
|
345
|
-
declare const CATEGORIES: readonly ["paginationModel", "filterModel", "sortModel", "visibilityModel", "dimension", "searchModel", "pinnedColumns", "densityModel", "columnOrderModel", "rowGroupingModel", "aggregationModel", "pivotModel", "pivotActive"];
|
|
454
|
+
declare const CATEGORIES: readonly ["paginationModel", "filterModel", "sortModel", "visibilityModel", "dimension", "searchModel", "pinnedColumns", "densityModel", "columnOrderModel"];
|
|
346
455
|
type Category = (typeof CATEGORIES)[number];
|
|
347
456
|
/**
|
|
348
457
|
* Build the localStorage key for a specific grid state category.
|
|
@@ -350,7 +459,7 @@ type Category = (typeof CATEGORIES)[number];
|
|
|
350
459
|
*
|
|
351
460
|
* @example
|
|
352
461
|
* ```ts
|
|
353
|
-
* const key = buildStorageKey({ id: pathname, version: 2, category:
|
|
462
|
+
* const key = buildStorageKey({ id: pathname, version: 2, category: 'filterModel' });
|
|
354
463
|
* localStorage.removeItem(key);
|
|
355
464
|
* ```
|
|
356
465
|
*/
|
|
@@ -358,7 +467,7 @@ declare const buildStorageKey: ({ id, version, category }: {
|
|
|
358
467
|
id: string;
|
|
359
468
|
version: number;
|
|
360
469
|
category: Category;
|
|
361
|
-
}) => `${string}:${number}:paginationModel` | `${string}:${number}:filterModel` | `${string}:${number}:sortModel` | `${string}:${number}:visibilityModel` | `${string}:${number}:pinnedColumns` | `${string}:${number}:dimension` | `${string}:${number}:searchModel` | `${string}:${number}:densityModel` | `${string}:${number}:columnOrderModel
|
|
470
|
+
}) => `${string}:${number}:paginationModel` | `${string}:${number}:filterModel` | `${string}:${number}:sortModel` | `${string}:${number}:visibilityModel` | `${string}:${number}:pinnedColumns` | `${string}:${number}:dimension` | `${string}:${number}:searchModel` | `${string}:${number}:densityModel` | `${string}:${number}:columnOrderModel`;
|
|
362
471
|
declare const clearPreviousVersionStorage: (id: string, previousLocalStorageVersions: number[]) => void;
|
|
363
472
|
/**
|
|
364
473
|
* Clear localStorage keys for all versions from 0 to `maxVersion` (inclusive).
|
|
@@ -369,6 +478,19 @@ declare const clearAllVersionStorage: (id: string, maxVersion: number) => void;
|
|
|
369
478
|
* Fully reset a `StatefulDataGrid` — clear localStorage for the given versions
|
|
370
479
|
* and strip all grid-owned URL params (`_*` and `v=`), preserving any non-grid params.
|
|
371
480
|
*
|
|
481
|
+
* The function reads `window.location.search` directly so the strip always
|
|
482
|
+
* operates on the live URL. This matters because consumers typically call this
|
|
483
|
+
* from a component whose captured `search` snapshot may be stale — for example
|
|
484
|
+
* when the grid has just written its own keys to the URL via the router adapter
|
|
485
|
+
* but the parent hasn't re-rendered yet. Falling back to the supplied `search`
|
|
486
|
+
* is only used in non-browser environments (SSR, unit tests without jsdom).
|
|
487
|
+
*
|
|
488
|
+
* The write is performed via `historyReplace(newSearch, { authoritative: true })`.
|
|
489
|
+
* Adapters with delta/coalescing logic (e.g. `createReactRouterV5Adapter`)
|
|
490
|
+
* recognise the `authoritative` flag and bypass the delta computation, which
|
|
491
|
+
* would otherwise drop keys that grew into the URL after the parent's last
|
|
492
|
+
* captured snapshot. Adapters without delta logic simply ignore the flag.
|
|
493
|
+
*
|
|
372
494
|
* Call from within a component where the router values are available:
|
|
373
495
|
* ```ts
|
|
374
496
|
* const { search, historyReplace } = useMyRouter();
|
|
@@ -378,233 +500,55 @@ declare const clearAllVersionStorage: (id: string, maxVersion: number) => void;
|
|
|
378
500
|
declare const resetStatefulDataGridState: ({ id, versions, search, historyReplace, }: {
|
|
379
501
|
id: string;
|
|
380
502
|
versions: number[];
|
|
503
|
+
/**
|
|
504
|
+
* Fallback search string used only when `window.location.search` is
|
|
505
|
+
* unavailable (SSR, non-jsdom tests). In a browser the live URL is used
|
|
506
|
+
* regardless of this value.
|
|
507
|
+
*/
|
|
381
508
|
search: string;
|
|
382
|
-
historyReplace: (newSearch: string
|
|
509
|
+
historyReplace: (newSearch: string, options?: {
|
|
510
|
+
authoritative?: boolean;
|
|
511
|
+
}) => void;
|
|
383
512
|
}) => void;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Type for legacy array-based row selection (v7 and earlier)
|
|
387
|
-
*/
|
|
388
|
-
type LegacyRowSelectionModel = GridRowId[];
|
|
389
|
-
/**
|
|
390
|
-
* Type that accepts both legacy array format and new v8 object format
|
|
391
|
-
*/
|
|
392
|
-
type RowSelectionModelInput = LegacyRowSelectionModel | GridRowSelectionModel;
|
|
393
513
|
/**
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
*
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
*
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
*
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Converts a selection model to an array of selected row IDs
|
|
418
|
-
* Note: For 'exclude' type, this only returns the ids that are explicitly excluded,
|
|
419
|
-
* not the actual selected rows (which would require knowing all row ids)
|
|
420
|
-
*/
|
|
421
|
-
declare const getSelectedIds: (model: GridRowSelectionModel) => GridRowId[];
|
|
422
|
-
|
|
423
|
-
/** Component Type. */
|
|
424
|
-
type Comp<P, T = HTMLElement> = {
|
|
425
|
-
(props: P & {
|
|
426
|
-
ref?: Ref<T>;
|
|
427
|
-
}): ReactElement | null;
|
|
428
|
-
/** React component type. */
|
|
429
|
-
readonly $$typeof?: symbol;
|
|
430
|
-
/** Component name. */
|
|
431
|
-
displayName?: string;
|
|
432
|
-
/** Component base class name. */
|
|
433
|
-
className?: string;
|
|
434
|
-
};
|
|
435
|
-
/** Get types of the values of a record. */
|
|
436
|
-
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Color palette.
|
|
440
|
-
*/
|
|
441
|
-
declare const Theme: {
|
|
442
|
-
readonly light: "light";
|
|
443
|
-
readonly dark: "dark";
|
|
444
|
-
};
|
|
445
|
-
type Theme = ValueOf<typeof Theme>;
|
|
446
|
-
declare const NotificationsColorPalette: {
|
|
447
|
-
readonly question: "question";
|
|
448
|
-
readonly 'no-data': "no-data";
|
|
449
|
-
readonly success: "success";
|
|
450
|
-
readonly warning: "warning";
|
|
451
|
-
readonly info: "info";
|
|
452
|
-
readonly primary: "primary";
|
|
453
|
-
readonly secondary: "secondary";
|
|
454
|
-
readonly error: "error";
|
|
455
|
-
};
|
|
456
|
-
type NotificationsColorPalette = ValueOf<typeof NotificationsColorPalette>;
|
|
457
|
-
declare const ProductColorPalette: {
|
|
458
|
-
readonly asm: "asm";
|
|
459
|
-
readonly 'brand-trust': "brand-trust";
|
|
460
|
-
readonly certificates: "certificates";
|
|
461
|
-
readonly ondmarc: "ondmarc";
|
|
462
|
-
readonly pulse: "pulse";
|
|
463
|
-
readonly radar: "radar";
|
|
464
|
-
readonly 'rojo-ds': "rojo-ds";
|
|
465
|
-
readonly 'vendor-secure': "vendor-secure";
|
|
466
|
-
readonly website: "website";
|
|
467
|
-
};
|
|
468
|
-
type ProductColorPalette = ValueOf<typeof ProductColorPalette>;
|
|
469
|
-
|
|
470
|
-
declare const AlignSelf: {
|
|
471
|
-
readonly auto: "auto";
|
|
472
|
-
readonly normal: "normal";
|
|
473
|
-
readonly start: "start";
|
|
474
|
-
readonly end: "end";
|
|
475
|
-
readonly center: "center";
|
|
476
|
-
readonly 'flex-start': "flex-start";
|
|
477
|
-
readonly 'flex-end': "flex-end";
|
|
478
|
-
readonly 'self-start': "self-start";
|
|
479
|
-
readonly 'self-end': "self-end";
|
|
480
|
-
readonly baseline: "baseline";
|
|
481
|
-
readonly stretch: "stretch";
|
|
482
|
-
};
|
|
483
|
-
type AlignSelf = ValueOf<typeof AlignSelf>;
|
|
484
|
-
interface LayoutProps {
|
|
485
|
-
/** When used in a flex layout, specifies how the element will grow or shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex">MDN</a>. */
|
|
486
|
-
flex?: string;
|
|
487
|
-
/** When used in a flex layout, specifies how the element will grow to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow">MDN</a>. */
|
|
488
|
-
flexGrow?: number;
|
|
489
|
-
/** When used in a flex layout, specifies how the element will shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink">MDN</a>. */
|
|
490
|
-
flexShrink?: number;
|
|
491
|
-
/** When used in a flex layout, specifies the initial main size of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex_basis">MDN</a>. */
|
|
492
|
-
flexBasis?: string;
|
|
493
|
-
/** Overrides the alignItems property of a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-self">MDN</a>. */
|
|
494
|
-
alignSelf?: AlignSelf;
|
|
495
|
-
/** Specifies how the element is justified inside a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self">MDN</a>. */
|
|
496
|
-
justifySelf?: string;
|
|
497
|
-
/** The layout order for the element within a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/order">MDN</a>. */
|
|
498
|
-
order?: number;
|
|
499
|
-
/** When used in a grid layout, specifies the named grid area that the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area">MDN</a>. */
|
|
500
|
-
gridArea?: string;
|
|
501
|
-
/** When used in a grid layout, specifies the column the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column">MDN</a>. */
|
|
502
|
-
gridColumn?: string;
|
|
503
|
-
/** When used in a grid layout, specifies the row the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row">MDN</a>. */
|
|
504
|
-
gridRow?: string;
|
|
505
|
-
/** When used in a grid layout, specifies the starting column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start">MDN</a>. */
|
|
506
|
-
gridColumnStart?: string;
|
|
507
|
-
/** When used in a grid layout, specifies the ending column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end">MDN</a>. */
|
|
508
|
-
gridColumnEnd?: string;
|
|
509
|
-
/** When used in a grid layout, specifies the starting row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start">MDN</a>. */
|
|
510
|
-
gridRowStart?: string;
|
|
511
|
-
/** When used in a grid layout, specifies the ending row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end">MDN</a>. */
|
|
512
|
-
gridRowEnd?: string;
|
|
513
|
-
}
|
|
514
|
-
interface SpacingProps {
|
|
515
|
-
/** The margin for all four sides of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin">MDN</a>. */
|
|
516
|
-
margin?: string;
|
|
517
|
-
/** The margin for the bottom side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom">MDN</a>. */
|
|
518
|
-
marginBottom?: string;
|
|
519
|
-
/** The margin for the left side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left">MDN</a>. */
|
|
520
|
-
marginLeft?: string;
|
|
521
|
-
/** The margin for the right side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right">MDN</a>. */
|
|
522
|
-
marginRight?: string;
|
|
523
|
-
/** The margin for the top side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top">MDN</a>. */
|
|
524
|
-
marginTop?: string;
|
|
525
|
-
}
|
|
526
|
-
interface PositioningProps {
|
|
527
|
-
/** Specifies how the element is positioned. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN</a>. */
|
|
528
|
-
position?: string;
|
|
529
|
-
/** The top position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/top">MDN</a>. */
|
|
530
|
-
top?: string;
|
|
531
|
-
/** The bottom position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/bottom">MDN</a>. */
|
|
532
|
-
bottom?: string;
|
|
533
|
-
/** The left position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/left">MDN</a>. Consider using start instead for RTL support. */
|
|
534
|
-
left?: string;
|
|
535
|
-
/** The right position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/right">MDN</a>. Consider using start instead for RTL support. */
|
|
536
|
-
right?: string;
|
|
537
|
-
/** The stacking order for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/z-index">MDN</a>. */
|
|
538
|
-
zIndex?: string;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Component size.
|
|
543
|
-
*/
|
|
544
|
-
declare const IconSize: {
|
|
545
|
-
readonly xsmall: "xsmall";
|
|
546
|
-
readonly small: "small";
|
|
547
|
-
readonly medium: "medium";
|
|
548
|
-
readonly large: "large";
|
|
549
|
-
readonly xlarge: "xlarge";
|
|
550
|
-
readonly xxlarge: "xxlarge";
|
|
551
|
-
};
|
|
552
|
-
type IconSize = ValueOf<typeof IconSize>;
|
|
553
|
-
type IconDimensions = {
|
|
554
|
-
width?: number;
|
|
555
|
-
height?: number;
|
|
556
|
-
fontSize?: number;
|
|
557
|
-
lineHeight?: number;
|
|
558
|
-
};
|
|
559
|
-
/**
|
|
560
|
-
* Component props.
|
|
514
|
+
* Reset only the column-visibility state of a `StatefulDataGrid` back to its
|
|
515
|
+
* default (all columns visible). Clears the persisted `visibilityModel`
|
|
516
|
+
* localStorage entry for the given versions and strips the `_columnVisibility`
|
|
517
|
+
* param from the live URL, leaving every other piece of grid state (filters,
|
|
518
|
+
* sort, pagination, pinned columns, …) untouched.
|
|
519
|
+
*
|
|
520
|
+
* This is the visibility-scoped counterpart to `resetStatefulDataGridState`.
|
|
521
|
+
* Reach for it at transition points where a stale visibility snapshot would
|
|
522
|
+
* otherwise re-seed and keep base columns hidden. Because it leaves the other
|
|
523
|
+
* params alone it will not clobber a filter the caller is writing in the same
|
|
524
|
+
* transition.
|
|
525
|
+
*
|
|
526
|
+
* Like `resetStatefulDataGridState`, the URL strip reads `window.location.search`
|
|
527
|
+
* directly so it operates on the live URL (the caller's captured snapshot may
|
|
528
|
+
* be stale), and writes via `historyReplace(newSearch, { authoritative: true })`.
|
|
529
|
+
*
|
|
530
|
+
* This clears the *persisted* state only. The caller is responsible for
|
|
531
|
+
* resetting the *live* grid in the same tick:
|
|
532
|
+
* ```ts
|
|
533
|
+
* resetColumnVisibility({ id: pathname, versions: [0, 1], search, historyReplace });
|
|
534
|
+
* apiRef.current?.setColumnVisibilityModel?.({});
|
|
535
|
+
* ```
|
|
561
536
|
*/
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
/** A screen reader only label for the Icon. */
|
|
566
|
-
'aria-label'?: string;
|
|
567
|
-
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
568
|
-
color?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
569
|
-
/** Whether the icon has a badge attached to it. */
|
|
570
|
-
badge?: ReactElement;
|
|
571
|
-
/**
|
|
572
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
573
|
-
* Can also be a ReactElement.
|
|
574
|
-
*/
|
|
575
|
-
icon: string | string[] | ReactElement;
|
|
537
|
+
declare const resetColumnVisibility: ({ id, versions, search, historyReplace, }: {
|
|
538
|
+
id: string;
|
|
539
|
+
versions: number[];
|
|
576
540
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
541
|
+
* Fallback search string used only when `window.location.search` is
|
|
542
|
+
* unavailable (SSR, non-jsdom tests). In a browser the live URL is used
|
|
543
|
+
* regardless of this value.
|
|
579
544
|
*/
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Component variant.
|
|
589
|
-
*/
|
|
590
|
-
declare const ShieldVariant: {
|
|
591
|
-
readonly success: "success";
|
|
592
|
-
readonly successLocked: "successLocked";
|
|
593
|
-
readonly successUnlocked: "successUnlocked";
|
|
594
|
-
readonly fail: "fail";
|
|
595
|
-
readonly failLocked: "failLocked";
|
|
596
|
-
readonly failUnlocked: "failUnlocked";
|
|
597
|
-
readonly warning: "warning";
|
|
598
|
-
readonly warningLocked: "warningLocked";
|
|
599
|
-
readonly warningUnlocked: "warningUnlocked";
|
|
600
|
-
readonly ignored: "ignored";
|
|
601
|
-
readonly noData: "noData";
|
|
602
|
-
readonly question: "question";
|
|
603
|
-
readonly email: "email";
|
|
604
|
-
};
|
|
605
|
-
type ShieldVariant = ValueOf<typeof ShieldVariant>;
|
|
545
|
+
search: string;
|
|
546
|
+
historyReplace: (newSearch: string, options?: {
|
|
547
|
+
authoritative?: boolean;
|
|
548
|
+
}) => void;
|
|
549
|
+
}) => void;
|
|
606
550
|
|
|
607
|
-
interface DataGridProps extends Partial<Pick<
|
|
551
|
+
interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
|
|
608
552
|
/** License key for MUI Datagrid Pro. */
|
|
609
553
|
license?: string;
|
|
610
554
|
/**
|
|
@@ -617,10 +561,32 @@ interface DataGridProps extends Partial<Pick<DataGridPremiumProps, 'rows'>>, Omi
|
|
|
617
561
|
/** Whether the Toolbar is displayed or not. */
|
|
618
562
|
hideToolbar?: boolean;
|
|
619
563
|
/**
|
|
620
|
-
* Indicates
|
|
564
|
+
* Indicates where to render the pagination controls (the "Rows per page" + page
|
|
565
|
+
* navigation bar). Independent of `selectionBannerPlacement`.
|
|
566
|
+
*
|
|
567
|
+
* - `'top'` / `'bottom'` / `'both'` — above / below / both sides of the grid body.
|
|
568
|
+
* - `'none'` — no pager controls.
|
|
569
|
+
* - `'belowToolbar'` — in a row directly below the toolbar (right-aligned). Pair
|
|
570
|
+
* with `selectionBannerPlacement="belowToolbar"` to get the banner on the left
|
|
571
|
+
* and the pager on the right in the same row. Only applies when `pagination` is enabled.
|
|
621
572
|
* @default 'both'
|
|
622
573
|
*/
|
|
623
|
-
paginationPlacement?: 'top' | 'bottom' | 'both' | 'none';
|
|
574
|
+
paginationPlacement?: 'top' | 'bottom' | 'both' | 'none' | 'belowToolbar';
|
|
575
|
+
/**
|
|
576
|
+
* Where to render the row-selection banner (the "All N rows on this page are
|
|
577
|
+
* selected…" line). Independent of `paginationPlacement` — the latter only
|
|
578
|
+
* controls the pager controls.
|
|
579
|
+
*
|
|
580
|
+
* - `'top'` — above the toolbar (default, current behaviour).
|
|
581
|
+
* - `'bottom'` — in the footer, alongside the bottom pager.
|
|
582
|
+
* - `'belowToolbar'` — between the toolbar and the grid body. Rendered via
|
|
583
|
+
* the toolbar slot, so the toolbar slot is forced to render even when
|
|
584
|
+
* `hideToolbar` is set (the toolbar itself stays hidden, only the banner shows).
|
|
585
|
+
* Combine with `paginationPlacement="belowToolbar"` for a banner-left / pager-right
|
|
586
|
+
* row. Only applies when `pagination` is enabled.
|
|
587
|
+
* @default 'top'
|
|
588
|
+
*/
|
|
589
|
+
selectionBannerPlacement?: 'top' | 'bottom' | 'belowToolbar';
|
|
624
590
|
/** Props to forward to the pagination component. */
|
|
625
591
|
paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
|
|
626
592
|
/** Theme. */
|
|
@@ -717,7 +683,19 @@ interface StatefulDataGridProps extends DataGridProps {
|
|
|
717
683
|
useRouter: () => {
|
|
718
684
|
pathname: string;
|
|
719
685
|
search: string;
|
|
720
|
-
|
|
686
|
+
/**
|
|
687
|
+
* Replace the URL's query string.
|
|
688
|
+
*
|
|
689
|
+
* Adapters that perform delta computation against a captured search snapshot
|
|
690
|
+
* (e.g. `createReactRouterV5Adapter`) should treat `options.authoritative === true`
|
|
691
|
+
* as a directive to bypass any delta/coalescing logic and write `newSearch`
|
|
692
|
+
* directly to the live URL. Authoritative writes are used by resetting
|
|
693
|
+
* APIs such as `resetStatefulDataGridState` and `resetColumnVisibility`
|
|
694
|
+
* where the caller's view of the URL may be stale.
|
|
695
|
+
*/
|
|
696
|
+
historyReplace: (newSearch: string, options?: {
|
|
697
|
+
authoritative?: boolean;
|
|
698
|
+
}) => void;
|
|
721
699
|
};
|
|
722
700
|
/** Local Storage version, to upgrade when we want to force a clean out. */
|
|
723
701
|
localStorageVersion?: number;
|
|
@@ -834,7 +812,7 @@ declare const getFilterModelFromString: (searchString: string, columns: DataGrid
|
|
|
834
812
|
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
835
813
|
/** SORT */
|
|
836
814
|
declare const getSortingFromString: (searchString: string, columns: DataGridProps["columns"]) => GridSortModel | "invalid";
|
|
837
|
-
declare const getSearchParamsFromSorting: (sorting:
|
|
815
|
+
declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearchParams;
|
|
838
816
|
/** PAGINATION */
|
|
839
817
|
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | "invalid";
|
|
840
818
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
@@ -842,42 +820,16 @@ declare const getSearchParamsFromPagination: (pagination: ExtendedGridPagination
|
|
|
842
820
|
declare const getColumnVisibilityFromString: (searchString: string, columns: DataGridProps["columns"]) => GridColumnVisibilityModel | "invalid";
|
|
843
821
|
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps["columns"]) => URLSearchParams;
|
|
844
822
|
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps["columns"]) => PinnedColumns | "invalid";
|
|
845
|
-
declare const getSearchParamsFromPinnedColumns: (pinnedColumns:
|
|
823
|
+
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
846
824
|
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
847
825
|
/** DENSITY */
|
|
848
826
|
type GridDensityValue = 'compact' | 'standard' | 'comfortable';
|
|
849
827
|
declare const getDensityFromString: (searchString: string) => GridDensityValue | "invalid";
|
|
850
828
|
declare const getSearchParamsFromDensity: (density: GridDensityValue) => URLSearchParams;
|
|
851
|
-
declare const getDensityModel: (search: string, localStorageDensity: string, setLocalStorageDensity: (density: string) => void, initialState: GridInitialState | undefined, isNewVersion: boolean) => GridDensityValue;
|
|
852
829
|
/** COLUMN ORDER */
|
|
853
830
|
type ColumnOrderModel = string[];
|
|
854
831
|
declare const getColumnOrderFromString: (searchString: string) => ColumnOrderModel | "invalid";
|
|
855
832
|
declare const getSearchParamsFromColumnOrder: (columnOrder: ColumnOrderModel) => URLSearchParams;
|
|
856
|
-
/** ROW GROUPING */
|
|
857
|
-
declare const getRowGroupingFromString: (searchString: string) => GridRowGroupingModel | "invalid";
|
|
858
|
-
declare const getSearchParamsFromRowGrouping: (rowGrouping: GridRowGroupingModel) => URLSearchParams;
|
|
859
|
-
/** AGGREGATION */
|
|
860
|
-
declare const getAggregationFromString: (searchString: string) => GridAggregationModel | "invalid";
|
|
861
|
-
declare const getSearchParamsFromAggregation: (aggregation: GridAggregationModel) => URLSearchParams;
|
|
862
|
-
/** PIVOT */
|
|
863
|
-
interface PivotModel {
|
|
864
|
-
columns: string[];
|
|
865
|
-
rows: string[];
|
|
866
|
-
values: {
|
|
867
|
-
field: string;
|
|
868
|
-
aggFunc: string;
|
|
869
|
-
}[];
|
|
870
|
-
}
|
|
871
|
-
/** Convert MUI's GridPivotModel → our simplified PivotModel */
|
|
872
|
-
declare const fromGridPivotModel: (model: GridPivotModel) => PivotModel;
|
|
873
|
-
/**
|
|
874
|
-
* Pivot format: `cols:f1,f2;rows:f3;vals:f4.sum,f5.avg`
|
|
875
|
-
*/
|
|
876
|
-
declare const getPivotFromString: (searchString: string) => PivotModel | "invalid";
|
|
877
|
-
declare const getSearchParamsFromPivot: (pivot: PivotModel) => URLSearchParams;
|
|
878
|
-
/** PIVOT ACTIVE */
|
|
879
|
-
declare const getPivotActiveFromString: (searchString: string) => boolean | "invalid";
|
|
880
|
-
declare const getSearchParamsFromPivotActive: (active: boolean) => URLSearchParams;
|
|
881
833
|
/**
|
|
882
834
|
* Builds the `v=<version>` search param the grid uses to detect stale URLs.
|
|
883
835
|
*
|
|
@@ -902,18 +854,14 @@ type FinalSearchInput = {
|
|
|
902
854
|
sortModel: GridSortModel;
|
|
903
855
|
paginationModel: ExtendedGridPaginationModel;
|
|
904
856
|
columnsVisibilityModel: GridColumnVisibilityModel;
|
|
905
|
-
pinnedColumnsModel:
|
|
857
|
+
pinnedColumnsModel: GridPinnedColumns;
|
|
906
858
|
density: GridDensityValue;
|
|
907
859
|
columnOrderModel: ColumnOrderModel;
|
|
908
860
|
defaultColumnOrder: ColumnOrderModel;
|
|
909
|
-
rowGroupingModel: GridRowGroupingModel;
|
|
910
|
-
aggregationModel: GridAggregationModel;
|
|
911
|
-
pivotModel: PivotModel;
|
|
912
|
-
pivotActive: boolean;
|
|
913
861
|
search: string;
|
|
914
862
|
columns: DataGridProps['columns'];
|
|
915
863
|
};
|
|
916
|
-
declare const getFinalSearch: ({ search, localStorageVersion, filterModel, sortModel, paginationModel, columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder,
|
|
864
|
+
declare const getFinalSearch: ({ search, localStorageVersion, filterModel, sortModel, paginationModel, columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder, columns, }: FinalSearchInput) => URLSearchParams;
|
|
917
865
|
type PinnedColumns = {
|
|
918
866
|
left: string[];
|
|
919
867
|
right: string[];
|
|
@@ -933,14 +881,6 @@ type ModelsLocalStorage = {
|
|
|
933
881
|
setLocalStorageDensity: (density: string) => void;
|
|
934
882
|
localStorageColumnOrder: string;
|
|
935
883
|
setLocalStorageColumnOrder: (value: string) => void;
|
|
936
|
-
localStorageRowGrouping: string;
|
|
937
|
-
setLocalStorageRowGrouping: (value: string) => void;
|
|
938
|
-
localStorageAggregation: string;
|
|
939
|
-
setLocalStorageAggregation: (value: string) => void;
|
|
940
|
-
localStoragePivot: string;
|
|
941
|
-
setLocalStoragePivot: (value: string) => void;
|
|
942
|
-
localStoragePivotActive: string;
|
|
943
|
-
setLocalStoragePivotActive: (value: string) => void;
|
|
944
884
|
};
|
|
945
885
|
type ModelsTable = {
|
|
946
886
|
filterModel: GridFilterModel;
|
|
@@ -950,30 +890,22 @@ type ModelsTable = {
|
|
|
950
890
|
pinnedColumnsModel: PinnedColumns;
|
|
951
891
|
density: GridDensityValue;
|
|
952
892
|
columnOrderModel: ColumnOrderModel;
|
|
953
|
-
rowGroupingModel: GridRowGroupingModel;
|
|
954
|
-
aggregationModel: GridAggregationModel;
|
|
955
|
-
pivotModel: PivotModel;
|
|
956
|
-
pivotActive: boolean;
|
|
957
893
|
/** The display-format search string the URL should have. Null if no update needed. */
|
|
958
894
|
pendingSearch: string | null;
|
|
959
895
|
};
|
|
960
896
|
/** Return the state of the table given the URL and the local storage state */
|
|
961
|
-
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps["columns"], initialState:
|
|
897
|
+
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps["columns"], initialState: GridInitialStatePro | undefined, localStorage: ModelsLocalStorage) => ModelsTable;
|
|
962
898
|
type DataGridModel = {
|
|
963
899
|
filterModel: GridFilterModel;
|
|
964
900
|
sortModel: GridSortModel;
|
|
965
901
|
paginationModel: ExtendedGridPaginationModel;
|
|
966
902
|
columnsModel: GridColumnVisibilityModel;
|
|
967
|
-
pinnedColumnsModel:
|
|
903
|
+
pinnedColumnsModel: GridPinnedColumns;
|
|
968
904
|
density: GridDensityValue;
|
|
969
905
|
columnOrderModel: ColumnOrderModel;
|
|
970
906
|
defaultColumnOrder: ColumnOrderModel;
|
|
971
|
-
rowGroupingModel: GridRowGroupingModel;
|
|
972
|
-
aggregationModel: GridAggregationModel;
|
|
973
|
-
pivotModel: PivotModel;
|
|
974
|
-
pivotActive: boolean;
|
|
975
907
|
};
|
|
976
|
-
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder,
|
|
908
|
+
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder, }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps["columns"]) => void;
|
|
977
909
|
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
978
910
|
|
|
979
911
|
/**
|
|
@@ -994,6 +926,13 @@ declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterMo
|
|
|
994
926
|
* `history.replace` would clobber the first — dropping any keys (such as
|
|
995
927
|
* the filter just typed) that the second handler didn't know about.
|
|
996
928
|
*
|
|
929
|
+
* Callers that need an authoritative full-URL replacement (e.g.
|
|
930
|
+
* `resetStatefulDataGridState`, which must clear grid params even when the
|
|
931
|
+
* parent component's captured search snapshot is stale relative to the live
|
|
932
|
+
* URL) can pass `{ authoritative: true }` as the second argument to
|
|
933
|
+
* `historyReplace`. Authoritative writes bypass the delta logic and write
|
|
934
|
+
* synchronously to the live URL.
|
|
935
|
+
*
|
|
997
936
|
* @example
|
|
998
937
|
* ```tsx
|
|
999
938
|
* import { createReactRouterV5Adapter } from '@redsift/table';
|
|
@@ -1021,7 +960,9 @@ interface ReactRouterV5History {
|
|
|
1021
960
|
declare const createReactRouterV5Adapter: (history: ReactRouterV5History) => (() => {
|
|
1022
961
|
pathname: string;
|
|
1023
962
|
search: string;
|
|
1024
|
-
historyReplace: (newSearch: string
|
|
963
|
+
historyReplace: (newSearch: string, options?: {
|
|
964
|
+
authoritative?: boolean;
|
|
965
|
+
}) => void;
|
|
1025
966
|
});
|
|
1026
967
|
|
|
1027
968
|
interface UseLinkedFilterModelOptions {
|
|
@@ -1084,16 +1025,16 @@ interface UseLinkedFilterModelReturn {
|
|
|
1084
1025
|
*/
|
|
1085
1026
|
declare function useLinkedFilterModel(options?: UseLinkedFilterModelOptions): UseLinkedFilterModelReturn;
|
|
1086
1027
|
|
|
1087
|
-
declare const BaseButton: React
|
|
1028
|
+
declare const BaseButton: React.JSXElementConstructor<any>;
|
|
1088
1029
|
|
|
1089
|
-
declare const BaseCheckbox: React
|
|
1030
|
+
declare const BaseCheckbox: React.JSXElementConstructor<any>;
|
|
1090
1031
|
|
|
1091
1032
|
declare const muiIconToDSIcon: Partial<Record<keyof GridSlotsComponent, string>>;
|
|
1092
|
-
declare const BaseIcon: React
|
|
1033
|
+
declare const BaseIcon: React.JSXElementConstructor<any>;
|
|
1093
1034
|
|
|
1094
|
-
declare const
|
|
1035
|
+
declare const BasePopper: React.JSXElementConstructor<any>;
|
|
1095
1036
|
|
|
1096
|
-
declare const BaseTextField: React
|
|
1037
|
+
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
1097
1038
|
|
|
1098
1039
|
interface CompletionResponseItem {
|
|
1099
1040
|
field: string;
|
|
@@ -1113,21 +1054,16 @@ interface LocaleText {
|
|
|
1113
1054
|
powerTooltipContent?: string;
|
|
1114
1055
|
errorText?: string;
|
|
1115
1056
|
}
|
|
1116
|
-
interface FilterConfigColumn {
|
|
1117
|
-
field: string;
|
|
1118
|
-
type?: string;
|
|
1119
|
-
description?: string;
|
|
1120
|
-
}
|
|
1121
1057
|
interface FilterConfig {
|
|
1122
|
-
columns:
|
|
1123
|
-
typeOperators:
|
|
1058
|
+
columns: object[];
|
|
1059
|
+
typeOperators: object;
|
|
1124
1060
|
notes: string;
|
|
1125
1061
|
openaiApiKey?: string;
|
|
1126
1062
|
completionFunc?: (nlpFilterConfig: FilterConfig, prompt: string, model: string) => Promise<CompletionResponse>;
|
|
1127
1063
|
}
|
|
1128
1064
|
interface GridToolbarFilterSemanticFieldProps extends ComponentProps<'form'> {
|
|
1129
1065
|
nlpFilterConfig: FilterConfig;
|
|
1130
|
-
onFilterModelChange
|
|
1066
|
+
onFilterModelChange: (filterModel: GridFilterModel) => void;
|
|
1131
1067
|
dateFormat?: string;
|
|
1132
1068
|
defaultModel?: string;
|
|
1133
1069
|
defaultFilter?: CompletionResponse;
|
|
@@ -1151,14 +1087,14 @@ type ControlledPaginationProps = {
|
|
|
1151
1087
|
displayRowsPerPage?: boolean;
|
|
1152
1088
|
displayPagination?: boolean;
|
|
1153
1089
|
selectionStatus: SelectionStatus;
|
|
1154
|
-
apiRef: MutableRefObject<
|
|
1090
|
+
apiRef: MutableRefObject<GridApiPro>;
|
|
1155
1091
|
paginationModel: GridPaginationModel;
|
|
1156
|
-
onPaginationModelChange: (model: GridPaginationModel
|
|
1092
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
1157
1093
|
pageSizeOptions?: number[];
|
|
1158
1094
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
1159
1095
|
paginationProps?: DataGridProps['paginationProps'];
|
|
1160
1096
|
};
|
|
1161
|
-
declare const ControlledPagination: React
|
|
1097
|
+
declare const ControlledPagination: React.FC<ControlledPaginationProps>;
|
|
1162
1098
|
|
|
1163
1099
|
type ServerSideControlledPaginationProps = {
|
|
1164
1100
|
displaySelection?: boolean;
|
|
@@ -1166,7 +1102,7 @@ type ServerSideControlledPaginationProps = {
|
|
|
1166
1102
|
displayPagination?: boolean;
|
|
1167
1103
|
selectionStatus: SelectionStatus;
|
|
1168
1104
|
paginationModel: GridPaginationModel;
|
|
1169
|
-
onPaginationModelChange: (model: GridPaginationModel
|
|
1105
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
1170
1106
|
pageSizeOptions?: number[];
|
|
1171
1107
|
paginationProps?: DataGridProps['paginationProps'];
|
|
1172
1108
|
rowCount: number;
|
|
@@ -1175,7 +1111,7 @@ type ServerSideControlledPaginationProps = {
|
|
|
1175
1111
|
/**
|
|
1176
1112
|
* Get the IDs of all selectable rows currently loaded in the grid (i.e. the current page for server-side).
|
|
1177
1113
|
*/
|
|
1178
|
-
declare const getSelectableRowIdsInPage: (apiRef: React
|
|
1114
|
+
declare const getSelectableRowIdsInPage: (apiRef: React.MutableRefObject<GridApiPro$1>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined) => GridRowSelectionModel;
|
|
1179
1115
|
/**
|
|
1180
1116
|
* Intercept MUI's `onRowSelectionModelChange` for server-side pagination to fix the
|
|
1181
1117
|
* header checkbox behavior when cross-page selections exist.
|
|
@@ -1189,9 +1125,9 @@ declare const getSelectableRowIdsInPage: (apiRef: React$1.MutableRefObject<GridA
|
|
|
1189
1125
|
* selections with 0 selected on current page), we merge all current page rows with the
|
|
1190
1126
|
* existing cross-page selections instead.
|
|
1191
1127
|
*/
|
|
1192
|
-
declare const fixServerSideHeaderCheckboxSelection: (newSelectionModel: GridRowSelectionModel, previousSelectionModel: GridRowSelectionModel, selectionStatus: React
|
|
1193
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridRowSelectionModel, apiRef: React
|
|
1194
|
-
declare const ServerSideControlledPagination: React
|
|
1128
|
+
declare const fixServerSideHeaderCheckboxSelection: (newSelectionModel: GridRowSelectionModel, previousSelectionModel: GridRowSelectionModel, selectionStatus: React.MutableRefObject<SelectionStatus>, apiRef: React.MutableRefObject<GridApiPro$1>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined) => GridRowSelectionModel;
|
|
1129
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridRowSelectionModel, apiRef: React.MutableRefObject<GridApiPro$1>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
1130
|
+
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
1195
1131
|
|
|
1196
1132
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
1197
1133
|
/** Including Badge Component. */
|
|
@@ -1219,16 +1155,16 @@ interface TextCellProps extends ComponentProps<'div'> {
|
|
|
1219
1155
|
*/
|
|
1220
1156
|
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
1221
1157
|
|
|
1222
|
-
type
|
|
1223
|
-
type
|
|
1158
|
+
type GridToolbarColumnsProps = Omit<typeof GridToolbarColumnsButton, 'ref'>;
|
|
1159
|
+
type GridToolbarDensityProps = Omit<typeof GridToolbarDensitySelector, 'ref'>;
|
|
1224
1160
|
type GridToolbarFilterSemanticProps = Omit<GridToolbarFilterSemanticFieldProps, 'ref'>;
|
|
1225
1161
|
interface ToolbarProps {
|
|
1226
1162
|
/** Props to forward to the column button. */
|
|
1227
|
-
columnsButtonProps?:
|
|
1163
|
+
columnsButtonProps?: GridToolbarColumnsProps;
|
|
1228
1164
|
/** Column button ref. */
|
|
1229
1165
|
columnsButtonRef?: RefObject<HTMLButtonElement>;
|
|
1230
1166
|
/** Props to forward to the density button. */
|
|
1231
|
-
densityButtonProps?:
|
|
1167
|
+
densityButtonProps?: GridToolbarDensityProps;
|
|
1232
1168
|
/** Density button ref. */
|
|
1233
1169
|
densityButtonRef?: RefObject<HTMLButtonElement>;
|
|
1234
1170
|
/** Props to forward to the export button. */
|
|
@@ -1268,15 +1204,20 @@ declare global {
|
|
|
1268
1204
|
}
|
|
1269
1205
|
}
|
|
1270
1206
|
/** ------ */
|
|
1271
|
-
declare const Toolbar: React
|
|
1207
|
+
declare const Toolbar: React.FC<ToolbarProps>;
|
|
1272
1208
|
|
|
1273
1209
|
type ToolbarWrapperProps = {
|
|
1274
1210
|
hideToolbar: DataGridProps['hideToolbar'];
|
|
1275
|
-
RenderedToolbar: React
|
|
1211
|
+
RenderedToolbar: React.JSXElementConstructor<any>;
|
|
1276
1212
|
filterModel: DataGridProps['filterModel'];
|
|
1277
1213
|
onFilterModelChange: DataGridProps['onFilterModelChange'];
|
|
1278
1214
|
pagination: DataGridProps['pagination'];
|
|
1279
|
-
|
|
1215
|
+
/** Show the selection banner (left). */
|
|
1216
|
+
displaySelection?: boolean;
|
|
1217
|
+
/** Show the pager controls (right). */
|
|
1218
|
+
displayPagination?: boolean;
|
|
1219
|
+
/** Show the rows-per-page selector within the pager. */
|
|
1220
|
+
displayRowsPerPage?: boolean;
|
|
1280
1221
|
selectionStatus: SelectionStatus;
|
|
1281
1222
|
apiRef: DataGridProps['apiRef'];
|
|
1282
1223
|
isRowSelectable: DataGridProps['isRowSelectable'];
|
|
@@ -1287,6 +1228,14 @@ type ToolbarWrapperProps = {
|
|
|
1287
1228
|
paginationMode?: DataGridProps['paginationMode'];
|
|
1288
1229
|
rowCount?: DataGridProps['rowCount'];
|
|
1289
1230
|
};
|
|
1290
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* Renders a toolbar followed by a row that can contain the selection banner (left)
|
|
1233
|
+
* and/or the pager controls (right), so they sit between the toolbar and the grid body
|
|
1234
|
+
* (`selectionBannerPlacement="belowToolbar"` and/or `paginationPlacement="belowToolbar"`).
|
|
1235
|
+
* The banner/pager visibility is driven by `displaySelection` / `displayPagination`.
|
|
1236
|
+
* The row gets a top margin matching the banner's built-in bottom margin so the spacing
|
|
1237
|
+
* above and below it is symmetric.
|
|
1238
|
+
*/
|
|
1239
|
+
declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
|
|
1291
1240
|
|
|
1292
|
-
export {
|
|
1241
|
+
export { ARRAY_IS_EMPTY, ARRAY_IS_NOT_EMPTY, BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, COLUMN_ORDER_MODEL_KEY, CONTAINS_ANY_OF, Category, ColumnOptions, ColumnOrderModel, ColumnType, CompletionResponse, ControlledPagination, ControlledPaginationProps, DATE_IS_BETWEEN, DEFAULT_OPERATORS, DENSITY_MODEL_KEY, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_CONTAIN_ANY_OF, DOES_NOT_END_WITH, DOES_NOT_END_WITH_ANY_OF, DOES_NOT_EQUAL, DOES_NOT_HAVE, DOES_NOT_HAVE_ANY_OF, DOES_NOT_HAVE_ANY_OF_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, DOES_NOT_START_WITH, DOES_NOT_START_WITH_ANY_OF, DataGrid, DataGridModel, DataGridProps, DateOperatorName, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridDensityValue, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, HAS, HAS_ALL_OF, HAS_ALL_OF_WITH_SELECT, 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, IS_NOT_ANY_OF_WITH_SELECT, IS_NOT_WITH_SELECT, IS_WITH_SELECT, MultiSelectOperatorName, NumberOperatorName, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, ReactRouterV5History, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, SingleSelectOperatorName, StatefulDataGrid, StatefulDataGridProps, StringOperatorName, StyledDataGridProps, TagsOperatorName, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, UseLinkedFilterModelOptions, UseLinkedFilterModelReturn, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, areSearchStringsEqual, buildQueryParamsString, buildStorageKey, clearAllVersionStorage, clearPreviousVersionStorage, convertFromDisplayFormat, convertToDisplayFormat, createColumn, createReactRouterV5Adapter, customColumnTypes, decodeValue, encodeValue, fixServerSideHeaderCheckboxSelection, getColumnOrderFromString, getColumnVisibilityFromString, getCompletion, getDecodedSearchFromUrl, getDensityFromString, getFilterModelFromString, getFinalSearch, getGridDateOperatorsExtended, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnOrder, getSearchParamsFromColumnVisibility, getSearchParamsFromDensity, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSearchParamsFromVersion, getSelectableRowIdsInPage, getSortingFromString, isOperatorValueValid, isValueValid, makeCaseInsensitive, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, resetColumnVisibility, resetStatefulDataGridState, updateUrl, urlSearchParamsToString, useLinkedFilterModel, wrapCaseInsensitive };
|