@redsift/table 12.5.9-muiv7 → 12.5.9
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/BaseIconButton.js +126 -0
- package/_internal/BaseIconButton.js.map +1 -0
- package/_internal/DataGrid2.js +113 -70
- package/_internal/DataGrid2.js.map +1 -1
- package/_internal/GridToolbarFilterSemanticField2.js +1339 -2
- package/_internal/GridToolbarFilterSemanticField2.js.map +1 -1
- package/_internal/Pagination.js +1 -1
- package/_internal/ServerSideControlledPagination.js +70 -11710
- package/_internal/ServerSideControlledPagination.js.map +1 -1
- package/_internal/StatefulDataGrid.js +1 -1
- package/_internal/StatefulDataGrid2.js +944 -1689
- package/_internal/StatefulDataGrid2.js.map +1 -1
- package/_internal/Toolbar2.js +1 -1
- package/_internal/Toolbar2.js.map +1 -1
- package/_internal/ToolbarWrapper2.js.map +1 -1
- package/_internal/useControlledDatagridState.js +11 -1129
- package/_internal/useControlledDatagridState.js.map +1 -1
- package/index.d.ts +505 -212
- package/index.js +177 -143
- package/index.js.map +1 -1
- package/package.json +7 -8
- package/_internal/BasePopper.js +0 -2453
- package/_internal/BasePopper.js.map +0 -1
- package/_internal/Portal.js +0 -6563
- package/_internal/Portal.js.map +0 -1
- package/_internal/jsx-runtime.js +0 -1342
- package/_internal/jsx-runtime.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import React$1, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
|
|
1
|
+
import { GridColTypeDef, GridColType, GridColDef, GridFilterOperator, GridFilterInputSingleSelect, GridFilterInputMultipleSingleSelect, GridRowId, GridRowSelectionModel, DataGridPremiumProps, GridFilterModel, GridPaginationModel, GridSortModel, GridColumnVisibilityModel, GridPinnedColumnFields, GridInitialState, GridRowGroupingModel, GridAggregationModel, GridPivotModel, GridSlotsComponent, GridApiPremium, GridCallbackDetails, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-premium';
|
|
2
|
+
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-premium';
|
|
3
|
+
import * as _mui_x_data_grid from '@mui/x-data-grid';
|
|
4
|
+
import React$1, { Ref, ReactElement, ComponentProps, ReactNode, MutableRefObject, RefObject } from 'react';
|
|
6
5
|
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';
|
|
9
6
|
|
|
10
|
-
declare const DETAIL_PANEL_TOGGLE_COL_DEF:
|
|
7
|
+
declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid.GridColDef;
|
|
11
8
|
|
|
12
9
|
declare const getRsStringColumnType: () => GridColTypeDef;
|
|
13
10
|
declare const getRsNumberColumnType: () => GridColTypeDef;
|
|
@@ -57,153 +54,174 @@ type ColumnOptions<T extends ColumnType> = T extends 'string' ? StringColumnOpti
|
|
|
57
54
|
*/
|
|
58
55
|
declare function createColumn<T extends ColumnType>(type: T, options?: ColumnOptions<T>): Partial<GridColDef>;
|
|
59
56
|
|
|
60
|
-
declare const ARRAY_IS_EMPTY: GridFilterOperator<any, string | string[], any>;
|
|
61
|
-
declare const ARRAY_IS_NOT_EMPTY: GridFilterOperator<any, string | string[], any>;
|
|
57
|
+
declare const ARRAY_IS_EMPTY: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
58
|
+
declare const ARRAY_IS_NOT_EMPTY: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
62
59
|
|
|
63
|
-
declare const DATE_IS_BETWEEN: GridFilterOperator<any,
|
|
60
|
+
declare const DATE_IS_BETWEEN: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
64
61
|
|
|
65
62
|
declare const getGridDateOperatorsExtended: (showTime?: boolean) => GridFilterOperator[];
|
|
66
63
|
|
|
67
|
-
declare const IS_BETWEEN: GridFilterOperator<any, number, any>;
|
|
64
|
+
declare const IS_BETWEEN: GridFilterOperator<any, number, any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
68
65
|
|
|
69
66
|
declare const getGridNumericOperators: () => GridFilterOperator<any, unknown, any>[];
|
|
70
67
|
|
|
71
|
-
declare const DOES_NOT_CONTAIN: GridFilterOperator<any, string | string[], any>;
|
|
68
|
+
declare const DOES_NOT_CONTAIN: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
72
69
|
|
|
73
|
-
declare const DOES_NOT_END_WITH: GridFilterOperator<any, string | string[], any>;
|
|
70
|
+
declare const DOES_NOT_END_WITH: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
74
71
|
|
|
75
|
-
declare const DOES_NOT_EQUAL: GridFilterOperator<any, string | string[], any>;
|
|
72
|
+
declare const DOES_NOT_EQUAL: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
76
73
|
|
|
77
|
-
declare const DOES_NOT_HAVE: GridFilterOperator<any, string | string[], any>;
|
|
74
|
+
declare const DOES_NOT_HAVE: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
78
75
|
declare const DOES_NOT_HAVE_WITH_SELECT: {
|
|
79
76
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
80
77
|
label?: string;
|
|
81
78
|
headerLabel?: string;
|
|
82
|
-
value:
|
|
83
|
-
getApplyFilterFn:
|
|
84
|
-
InputComponentProps?:
|
|
85
|
-
getValueAsString?: (value:
|
|
79
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
86
83
|
requiresFilterValue?: boolean;
|
|
87
84
|
};
|
|
88
85
|
|
|
89
|
-
declare const DOES_NOT_START_WITH: GridFilterOperator<any, string | string[], any>;
|
|
86
|
+
declare const DOES_NOT_START_WITH: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
90
87
|
|
|
91
|
-
declare const HAS: GridFilterOperator<any, string | string[], any>;
|
|
88
|
+
declare const HAS: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
92
89
|
declare const HAS_WITH_SELECT: {
|
|
93
90
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
94
91
|
label?: string;
|
|
95
92
|
headerLabel?: string;
|
|
96
|
-
value:
|
|
97
|
-
getApplyFilterFn:
|
|
98
|
-
InputComponentProps?:
|
|
99
|
-
getValueAsString?: (value:
|
|
93
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
100
97
|
requiresFilterValue?: boolean;
|
|
101
98
|
};
|
|
102
99
|
|
|
103
|
-
declare const HAS_ONLY: GridFilterOperator<any, string | string[], any>;
|
|
100
|
+
declare const HAS_ONLY: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
104
101
|
declare const HAS_ONLY_WITH_SELECT: {
|
|
105
102
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
106
103
|
label?: string;
|
|
107
104
|
headerLabel?: string;
|
|
108
|
-
value:
|
|
109
|
-
getApplyFilterFn:
|
|
110
|
-
InputComponentProps?:
|
|
111
|
-
getValueAsString?: (value:
|
|
105
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
112
109
|
requiresFilterValue?: boolean;
|
|
113
110
|
};
|
|
114
111
|
|
|
115
|
-
declare const IS: GridFilterOperator<any, string | string[], any>;
|
|
112
|
+
declare const IS: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
116
113
|
declare const IS_WITH_SELECT: {
|
|
117
114
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
118
115
|
label?: string;
|
|
119
116
|
headerLabel?: string;
|
|
120
|
-
value:
|
|
121
|
-
getApplyFilterFn:
|
|
122
|
-
InputComponentProps?:
|
|
123
|
-
getValueAsString?: (value:
|
|
117
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
124
121
|
requiresFilterValue?: boolean;
|
|
125
122
|
};
|
|
126
123
|
|
|
127
|
-
declare const IS_NOT: GridFilterOperator<any, string | string[], any>;
|
|
124
|
+
declare const IS_NOT: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
128
125
|
declare const IS_NOT_WITH_SELECT: {
|
|
129
126
|
InputComponent: typeof GridFilterInputSingleSelect;
|
|
130
127
|
label?: string;
|
|
131
128
|
headerLabel?: string;
|
|
132
|
-
value:
|
|
133
|
-
getApplyFilterFn:
|
|
134
|
-
InputComponentProps?:
|
|
135
|
-
getValueAsString?: (value:
|
|
129
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
136
133
|
requiresFilterValue?: boolean;
|
|
137
134
|
};
|
|
138
135
|
|
|
139
136
|
declare const getGridStringOperators: () => GridFilterOperator<any, unknown, any>[];
|
|
140
137
|
|
|
141
|
-
declare const CONTAINS_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
138
|
+
declare const CONTAINS_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
142
139
|
|
|
143
|
-
declare const DOES_NOT_CONTAIN_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
140
|
+
declare const DOES_NOT_CONTAIN_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
144
141
|
|
|
145
|
-
declare const DOES_NOT_END_WITH_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
142
|
+
declare const DOES_NOT_END_WITH_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
146
143
|
|
|
147
|
-
declare const DOES_NOT_HAVE_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
148
|
-
declare const DOES_NOT_HAVE_ANY_OF_WITH_SELECT:
|
|
144
|
+
declare const DOES_NOT_HAVE_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
145
|
+
declare const DOES_NOT_HAVE_ANY_OF_WITH_SELECT: {
|
|
146
|
+
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
147
|
+
label?: string;
|
|
148
|
+
headerLabel?: string;
|
|
149
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
154
|
+
};
|
|
149
155
|
|
|
150
|
-
declare const DOES_NOT_START_WITH_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
156
|
+
declare const DOES_NOT_START_WITH_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
151
157
|
|
|
152
|
-
declare const ENDS_WITH_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
158
|
+
declare const ENDS_WITH_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
153
159
|
|
|
154
|
-
declare const HAS_ALL_OF: GridFilterOperator<any, string | string[], any>;
|
|
160
|
+
declare const HAS_ALL_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
155
161
|
declare const HAS_ALL_OF_WITH_SELECT: {
|
|
156
162
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
157
163
|
label?: string;
|
|
158
164
|
headerLabel?: string;
|
|
159
|
-
value:
|
|
160
|
-
getApplyFilterFn:
|
|
161
|
-
InputComponentProps?:
|
|
162
|
-
getValueAsString?: (value:
|
|
165
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
163
169
|
requiresFilterValue?: boolean;
|
|
164
170
|
};
|
|
165
171
|
|
|
166
|
-
declare const HAS_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
172
|
+
declare const HAS_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
167
173
|
declare const HAS_ANY_OF_WITH_SELECT: {
|
|
168
174
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
169
175
|
label?: string;
|
|
170
176
|
headerLabel?: string;
|
|
171
|
-
value:
|
|
172
|
-
getApplyFilterFn:
|
|
173
|
-
InputComponentProps?:
|
|
174
|
-
getValueAsString?: (value:
|
|
177
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
175
181
|
requiresFilterValue?: boolean;
|
|
176
182
|
};
|
|
177
183
|
|
|
178
|
-
declare const IS_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
184
|
+
declare const IS_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
179
185
|
declare const IS_ANY_OF_WITH_SELECT: {
|
|
180
186
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
181
187
|
label?: string;
|
|
182
188
|
headerLabel?: string;
|
|
183
|
-
value:
|
|
184
|
-
getApplyFilterFn:
|
|
185
|
-
InputComponentProps?:
|
|
186
|
-
getValueAsString?: (value:
|
|
189
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
declare const IS_ANY_OF_I: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
197
|
+
declare const IS_ANY_OF_I_WITH_SELECT: {
|
|
198
|
+
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
199
|
+
label?: string;
|
|
200
|
+
headerLabel?: string;
|
|
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;
|
|
187
205
|
requiresFilterValue?: boolean;
|
|
188
206
|
};
|
|
189
207
|
|
|
190
|
-
declare const IS_NOT_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
208
|
+
declare const IS_NOT_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
191
209
|
declare const IS_NOT_ANY_OF_WITH_SELECT: {
|
|
192
210
|
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
193
211
|
label?: string;
|
|
194
212
|
headerLabel?: string;
|
|
195
|
-
value:
|
|
196
|
-
getApplyFilterFn:
|
|
197
|
-
InputComponentProps?:
|
|
198
|
-
getValueAsString?: (value:
|
|
213
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
199
217
|
requiresFilterValue?: boolean;
|
|
200
218
|
};
|
|
201
219
|
|
|
202
|
-
declare const STARTS_WITH_ANY_OF: GridFilterOperator<any, string | string[], any>;
|
|
220
|
+
declare const STARTS_WITH_ANY_OF: GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps>;
|
|
203
221
|
|
|
204
|
-
declare const getGridStringArrayOperators: () => GridFilterOperator[];
|
|
205
|
-
declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator[];
|
|
206
|
-
declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator[];
|
|
222
|
+
declare const getGridStringArrayOperators: () => GridFilterOperator<any, unknown, any>[];
|
|
223
|
+
declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator<any, unknown, any>[];
|
|
224
|
+
declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator<any, unknown, any>[];
|
|
207
225
|
|
|
208
226
|
/**
|
|
209
227
|
* Wraps a filter operator's `getApplyFilterFn` to lowercase both the cell value
|
|
@@ -218,91 +236,93 @@ declare const wrapCaseInsensitive: (operator: GridFilterOperator) => GridFilterO
|
|
|
218
236
|
declare const makeCaseInsensitive: (operators: GridFilterOperator[]) => GridFilterOperator[];
|
|
219
237
|
|
|
220
238
|
declare const operatorList: {
|
|
221
|
-
string:
|
|
222
|
-
number:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
string: _mui_x_data_grid.GridFilterOperator<any, string | number | null, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
240
|
+
number: _mui_x_data_grid.GridFilterOperator<any, string | number | null, any, _mui_x_data_grid.GridFilterInputValueProps & {
|
|
241
|
+
type?: "number";
|
|
242
|
+
}>[];
|
|
243
|
+
boolean: _mui_x_data_grid.GridFilterOperator<any, boolean | null, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
244
|
+
date: _mui_x_data_grid.GridFilterOperator<any, Date, any, _mui_x_data_grid.GridFilterInputDateProps>[];
|
|
245
|
+
dateTime: _mui_x_data_grid.GridFilterOperator<any, Date, any, _mui_x_data_grid.GridFilterInputDateProps>[];
|
|
246
|
+
singleSelect: _mui_x_data_grid.GridFilterOperator<any, any, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
247
|
+
rsString: _mui_x_data_grid.GridFilterOperator<any, unknown, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
248
|
+
rsNumber: _mui_x_data_grid.GridFilterOperator<any, unknown, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
249
|
+
rsSingleSelect: (_mui_x_data_grid.GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps> | {
|
|
250
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputSingleSelect;
|
|
231
251
|
label?: string;
|
|
232
252
|
headerLabel?: string;
|
|
233
|
-
value:
|
|
234
|
-
getApplyFilterFn:
|
|
235
|
-
InputComponentProps?:
|
|
236
|
-
getValueAsString?: (value:
|
|
253
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
254
|
+
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
255
|
+
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
256
|
+
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
237
257
|
requiresFilterValue?: boolean;
|
|
238
258
|
} | {
|
|
239
|
-
InputComponent: typeof
|
|
259
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputMultipleSingleSelect;
|
|
240
260
|
label?: string;
|
|
241
261
|
headerLabel?: string;
|
|
242
|
-
value:
|
|
243
|
-
getApplyFilterFn:
|
|
244
|
-
InputComponentProps?:
|
|
245
|
-
getValueAsString?: (value:
|
|
262
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
246
266
|
requiresFilterValue?: boolean;
|
|
247
267
|
})[];
|
|
248
268
|
rsSingleSelectWithShortOperatorList: ({
|
|
249
|
-
InputComponent: typeof
|
|
269
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputSingleSelect;
|
|
250
270
|
label?: string;
|
|
251
271
|
headerLabel?: string;
|
|
252
|
-
value:
|
|
253
|
-
getApplyFilterFn:
|
|
254
|
-
InputComponentProps?:
|
|
255
|
-
getValueAsString?: (value:
|
|
272
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
256
276
|
requiresFilterValue?: boolean;
|
|
257
277
|
} | {
|
|
258
|
-
InputComponent: typeof
|
|
278
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputMultipleSingleSelect;
|
|
259
279
|
label?: string;
|
|
260
280
|
headerLabel?: string;
|
|
261
|
-
value:
|
|
262
|
-
getApplyFilterFn:
|
|
263
|
-
InputComponentProps?:
|
|
264
|
-
getValueAsString?: (value:
|
|
281
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
265
285
|
requiresFilterValue?: boolean;
|
|
266
286
|
})[];
|
|
267
|
-
rsMultipleSelect: (
|
|
268
|
-
InputComponent: typeof
|
|
287
|
+
rsMultipleSelect: (_mui_x_data_grid.GridFilterOperator<any, string | string[], any, _mui_x_data_grid.GridFilterInputValueProps> | {
|
|
288
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputSingleSelect;
|
|
269
289
|
label?: string;
|
|
270
290
|
headerLabel?: string;
|
|
271
|
-
value:
|
|
272
|
-
getApplyFilterFn:
|
|
273
|
-
InputComponentProps?:
|
|
274
|
-
getValueAsString?: (value:
|
|
291
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
275
295
|
requiresFilterValue?: boolean;
|
|
276
296
|
} | {
|
|
277
|
-
InputComponent: typeof
|
|
297
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputMultipleSingleSelect;
|
|
278
298
|
label?: string;
|
|
279
299
|
headerLabel?: string;
|
|
280
|
-
value:
|
|
281
|
-
getApplyFilterFn:
|
|
282
|
-
InputComponentProps?:
|
|
283
|
-
getValueAsString?: (value:
|
|
300
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
301
|
+
getApplyFilterFn: _mui_x_data_grid.GetApplyFilterFn<any, string | string[], any>;
|
|
302
|
+
InputComponentProps?: Partial<_mui_x_data_grid.GridFilterInputValueProps> | undefined;
|
|
303
|
+
getValueAsString?: (value: _mui_x_data_grid.GridFilterItem["value"]) => string;
|
|
284
304
|
requiresFilterValue?: boolean;
|
|
285
305
|
})[];
|
|
286
306
|
rsMultipleSelectWithShortOperatorList: ({
|
|
287
|
-
InputComponent: typeof
|
|
307
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputSingleSelect;
|
|
288
308
|
label?: string;
|
|
289
309
|
headerLabel?: string;
|
|
290
|
-
value:
|
|
291
|
-
getApplyFilterFn:
|
|
292
|
-
InputComponentProps?:
|
|
293
|
-
getValueAsString?: (value:
|
|
310
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
294
314
|
requiresFilterValue?: boolean;
|
|
295
315
|
} | {
|
|
296
|
-
InputComponent: typeof
|
|
316
|
+
InputComponent: typeof _mui_x_data_grid.GridFilterInputMultipleSingleSelect;
|
|
297
317
|
label?: string;
|
|
298
318
|
headerLabel?: string;
|
|
299
|
-
value:
|
|
300
|
-
getApplyFilterFn:
|
|
301
|
-
InputComponentProps?:
|
|
302
|
-
getValueAsString?: (value:
|
|
319
|
+
value: _mui_x_data_grid.GridFilterItem["operator"];
|
|
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;
|
|
303
323
|
requiresFilterValue?: boolean;
|
|
304
324
|
})[];
|
|
305
|
-
rsStringArray:
|
|
325
|
+
rsStringArray: _mui_x_data_grid.GridFilterOperator<any, unknown, any, _mui_x_data_grid.GridFilterInputValueProps>[];
|
|
306
326
|
};
|
|
307
327
|
|
|
308
328
|
declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
|
|
@@ -316,7 +336,13 @@ declare const DIMENSION_MODEL_KEY = "dimension";
|
|
|
316
336
|
declare const FILTER_SEARCH_KEY = "searchModel";
|
|
317
337
|
declare const DENSITY_MODEL_KEY = "densityModel";
|
|
318
338
|
declare const COLUMN_ORDER_MODEL_KEY = "columnOrderModel";
|
|
319
|
-
declare const
|
|
339
|
+
declare const ROW_GROUPING_MODEL_KEY = "rowGroupingModel";
|
|
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"];
|
|
320
346
|
type Category = (typeof CATEGORIES)[number];
|
|
321
347
|
/**
|
|
322
348
|
* Build the localStorage key for a specific grid state category.
|
|
@@ -324,7 +350,7 @@ type Category = (typeof CATEGORIES)[number];
|
|
|
324
350
|
*
|
|
325
351
|
* @example
|
|
326
352
|
* ```ts
|
|
327
|
-
* const key = buildStorageKey({ id: pathname, version: 2, category:
|
|
353
|
+
* const key = buildStorageKey({ id: pathname, version: 2, category: PIVOT_ACTIVE_KEY });
|
|
328
354
|
* localStorage.removeItem(key);
|
|
329
355
|
* ```
|
|
330
356
|
*/
|
|
@@ -332,7 +358,7 @@ declare const buildStorageKey: ({ id, version, category }: {
|
|
|
332
358
|
id: string;
|
|
333
359
|
version: number;
|
|
334
360
|
category: Category;
|
|
335
|
-
}) => `${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`;
|
|
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` | `${string}:${number}:rowGroupingModel` | `${string}:${number}:aggregationModel` | `${string}:${number}:pivotModel` | `${string}:${number}:pivotActive`;
|
|
336
362
|
declare const clearPreviousVersionStorage: (id: string, previousLocalStorageVersions: number[]) => void;
|
|
337
363
|
/**
|
|
338
364
|
* Clear localStorage keys for all versions from 0 to `maxVersion` (inclusive).
|
|
@@ -380,13 +406,14 @@ declare const resetStatefulDataGridState: ({ id, versions, search, historyReplac
|
|
|
380
406
|
* default (all columns visible). Clears the persisted `visibilityModel`
|
|
381
407
|
* localStorage entry for the given versions and strips the `_columnVisibility`
|
|
382
408
|
* param from the live URL, leaving every other piece of grid state (filters,
|
|
383
|
-
* sort, pagination, pinned columns, …) untouched.
|
|
409
|
+
* sort, pivot, pagination, pinned columns, …) untouched.
|
|
384
410
|
*
|
|
385
411
|
* This is the visibility-scoped counterpart to `resetStatefulDataGridState`.
|
|
386
|
-
* Reach for it at transition points
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
412
|
+
* Reach for it at transition points — for example drilling down from pivot
|
|
413
|
+
* mode to a flat record view — where a stale pivot-era visibility snapshot
|
|
414
|
+
* would otherwise re-seed and keep base columns hidden. Because it leaves the
|
|
415
|
+
* other params alone it will not clobber a filter the caller is writing in the
|
|
416
|
+
* same transition.
|
|
390
417
|
*
|
|
391
418
|
* Like `resetStatefulDataGridState`, the URL strip reads `window.location.search`
|
|
392
419
|
* directly so it operates on the live URL (the caller's captured snapshot may
|
|
@@ -413,7 +440,229 @@ declare const resetColumnVisibility: ({ id, versions, search, historyReplace, }:
|
|
|
413
440
|
}) => void;
|
|
414
441
|
}) => void;
|
|
415
442
|
|
|
416
|
-
|
|
443
|
+
/**
|
|
444
|
+
* Type for legacy array-based row selection (v7 and earlier)
|
|
445
|
+
*/
|
|
446
|
+
type LegacyRowSelectionModel = GridRowId[];
|
|
447
|
+
/**
|
|
448
|
+
* Type that accepts both legacy array format and new v8 object format
|
|
449
|
+
*/
|
|
450
|
+
type RowSelectionModelInput = LegacyRowSelectionModel | GridRowSelectionModel;
|
|
451
|
+
/**
|
|
452
|
+
* Default empty row selection model for MUI DataGrid v8+
|
|
453
|
+
* In v8, GridRowSelectionModel changed from GridRowId[] to { type: 'include' | 'exclude'; ids: Set<GridRowId> }
|
|
454
|
+
*/
|
|
455
|
+
declare const EMPTY_ROW_SELECTION_MODEL: GridRowSelectionModel;
|
|
456
|
+
/**
|
|
457
|
+
* Creates a new row selection model with the given ids
|
|
458
|
+
*/
|
|
459
|
+
declare const createRowSelectionModel: (ids: GridRowId[] | Set<GridRowId>) => GridRowSelectionModel;
|
|
460
|
+
/**
|
|
461
|
+
* Normalizes a row selection model input to the v8 GridRowSelectionModel format.
|
|
462
|
+
* Accepts both legacy array format (v7) and new object format (v8).
|
|
463
|
+
* This allows consumers to continue using arrays while internally using the v8 format.
|
|
464
|
+
*/
|
|
465
|
+
declare const normalizeRowSelectionModel: (input: RowSelectionModelInput | undefined | null) => GridRowSelectionModel;
|
|
466
|
+
/**
|
|
467
|
+
* Gets the size/count of selected rows from a selection model
|
|
468
|
+
*/
|
|
469
|
+
declare const getSelectionCount: (model: GridRowSelectionModel) => number;
|
|
470
|
+
/**
|
|
471
|
+
* Checks if a row is selected in the given selection model
|
|
472
|
+
*/
|
|
473
|
+
declare const isRowSelected: (model: GridRowSelectionModel, rowId: GridRowId) => boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Converts a selection model to an array of selected row IDs
|
|
476
|
+
* Note: For 'exclude' type, this only returns the ids that are explicitly excluded,
|
|
477
|
+
* not the actual selected rows (which would require knowing all row ids)
|
|
478
|
+
*/
|
|
479
|
+
declare const getSelectedIds: (model: GridRowSelectionModel) => GridRowId[];
|
|
480
|
+
|
|
481
|
+
/** Component Type. */
|
|
482
|
+
type Comp<P, T = HTMLElement> = {
|
|
483
|
+
(props: P & {
|
|
484
|
+
ref?: Ref<T>;
|
|
485
|
+
}): ReactElement | null;
|
|
486
|
+
/** React component type. */
|
|
487
|
+
readonly $$typeof?: symbol;
|
|
488
|
+
/** Component name. */
|
|
489
|
+
displayName?: string;
|
|
490
|
+
/** Component base class name. */
|
|
491
|
+
className?: string;
|
|
492
|
+
};
|
|
493
|
+
/** Get types of the values of a record. */
|
|
494
|
+
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Color palette.
|
|
498
|
+
*/
|
|
499
|
+
declare const Theme: {
|
|
500
|
+
readonly light: "light";
|
|
501
|
+
readonly dark: "dark";
|
|
502
|
+
};
|
|
503
|
+
type Theme = ValueOf<typeof Theme>;
|
|
504
|
+
declare const NotificationsColorPalette: {
|
|
505
|
+
readonly question: "question";
|
|
506
|
+
readonly 'no-data': "no-data";
|
|
507
|
+
readonly success: "success";
|
|
508
|
+
readonly warning: "warning";
|
|
509
|
+
readonly info: "info";
|
|
510
|
+
readonly primary: "primary";
|
|
511
|
+
readonly secondary: "secondary";
|
|
512
|
+
readonly error: "error";
|
|
513
|
+
};
|
|
514
|
+
type NotificationsColorPalette = ValueOf<typeof NotificationsColorPalette>;
|
|
515
|
+
declare const ProductColorPalette: {
|
|
516
|
+
readonly asm: "asm";
|
|
517
|
+
readonly 'brand-trust': "brand-trust";
|
|
518
|
+
readonly certificates: "certificates";
|
|
519
|
+
readonly ondmarc: "ondmarc";
|
|
520
|
+
readonly pulse: "pulse";
|
|
521
|
+
readonly radar: "radar";
|
|
522
|
+
readonly 'rojo-ds': "rojo-ds";
|
|
523
|
+
readonly 'vendor-secure': "vendor-secure";
|
|
524
|
+
readonly website: "website";
|
|
525
|
+
};
|
|
526
|
+
type ProductColorPalette = ValueOf<typeof ProductColorPalette>;
|
|
527
|
+
|
|
528
|
+
declare const AlignSelf: {
|
|
529
|
+
readonly auto: "auto";
|
|
530
|
+
readonly normal: "normal";
|
|
531
|
+
readonly start: "start";
|
|
532
|
+
readonly end: "end";
|
|
533
|
+
readonly center: "center";
|
|
534
|
+
readonly 'flex-start': "flex-start";
|
|
535
|
+
readonly 'flex-end': "flex-end";
|
|
536
|
+
readonly 'self-start': "self-start";
|
|
537
|
+
readonly 'self-end': "self-end";
|
|
538
|
+
readonly baseline: "baseline";
|
|
539
|
+
readonly stretch: "stretch";
|
|
540
|
+
};
|
|
541
|
+
type AlignSelf = ValueOf<typeof AlignSelf>;
|
|
542
|
+
interface LayoutProps {
|
|
543
|
+
/** 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>. */
|
|
544
|
+
flex?: string;
|
|
545
|
+
/** 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>. */
|
|
546
|
+
flexGrow?: number;
|
|
547
|
+
/** 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>. */
|
|
548
|
+
flexShrink?: number;
|
|
549
|
+
/** 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>. */
|
|
550
|
+
flexBasis?: string;
|
|
551
|
+
/** 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>. */
|
|
552
|
+
alignSelf?: AlignSelf;
|
|
553
|
+
/** 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>. */
|
|
554
|
+
justifySelf?: string;
|
|
555
|
+
/** 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>. */
|
|
556
|
+
order?: number;
|
|
557
|
+
/** 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>. */
|
|
558
|
+
gridArea?: string;
|
|
559
|
+
/** 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>. */
|
|
560
|
+
gridColumn?: string;
|
|
561
|
+
/** 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>. */
|
|
562
|
+
gridRow?: string;
|
|
563
|
+
/** 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>. */
|
|
564
|
+
gridColumnStart?: string;
|
|
565
|
+
/** 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>. */
|
|
566
|
+
gridColumnEnd?: string;
|
|
567
|
+
/** 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>. */
|
|
568
|
+
gridRowStart?: string;
|
|
569
|
+
/** 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>. */
|
|
570
|
+
gridRowEnd?: string;
|
|
571
|
+
}
|
|
572
|
+
interface SpacingProps {
|
|
573
|
+
/** The margin for all four sides of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin">MDN</a>. */
|
|
574
|
+
margin?: string;
|
|
575
|
+
/** 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>. */
|
|
576
|
+
marginBottom?: string;
|
|
577
|
+
/** 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>. */
|
|
578
|
+
marginLeft?: string;
|
|
579
|
+
/** 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>. */
|
|
580
|
+
marginRight?: string;
|
|
581
|
+
/** 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>. */
|
|
582
|
+
marginTop?: string;
|
|
583
|
+
}
|
|
584
|
+
interface PositioningProps {
|
|
585
|
+
/** Specifies how the element is positioned. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN</a>. */
|
|
586
|
+
position?: string;
|
|
587
|
+
/** The top position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/top">MDN</a>. */
|
|
588
|
+
top?: string;
|
|
589
|
+
/** The bottom position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/bottom">MDN</a>. */
|
|
590
|
+
bottom?: string;
|
|
591
|
+
/** 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. */
|
|
592
|
+
left?: string;
|
|
593
|
+
/** 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. */
|
|
594
|
+
right?: string;
|
|
595
|
+
/** The stacking order for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/z-index">MDN</a>. */
|
|
596
|
+
zIndex?: string;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Component size.
|
|
601
|
+
*/
|
|
602
|
+
declare const IconSize: {
|
|
603
|
+
readonly xsmall: "xsmall";
|
|
604
|
+
readonly small: "small";
|
|
605
|
+
readonly medium: "medium";
|
|
606
|
+
readonly large: "large";
|
|
607
|
+
readonly xlarge: "xlarge";
|
|
608
|
+
readonly xxlarge: "xxlarge";
|
|
609
|
+
};
|
|
610
|
+
type IconSize = ValueOf<typeof IconSize>;
|
|
611
|
+
type IconDimensions = {
|
|
612
|
+
width?: number;
|
|
613
|
+
height?: number;
|
|
614
|
+
fontSize?: number;
|
|
615
|
+
lineHeight?: number;
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* Component props.
|
|
619
|
+
*/
|
|
620
|
+
interface IconProps extends ComponentProps<'span'>, LayoutProps, SpacingProps, PositioningProps {
|
|
621
|
+
/** Indicates whether the element is exposed to an accessibility API. */
|
|
622
|
+
'aria-hidden'?: boolean | 'false' | 'true';
|
|
623
|
+
/** A screen reader only label for the Icon. */
|
|
624
|
+
'aria-label'?: string;
|
|
625
|
+
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
626
|
+
color?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
627
|
+
/** Whether the icon has a badge attached to it. */
|
|
628
|
+
badge?: ReactElement;
|
|
629
|
+
/**
|
|
630
|
+
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
631
|
+
* Can also be a ReactElement.
|
|
632
|
+
*/
|
|
633
|
+
icon: string | string[] | ReactElement;
|
|
634
|
+
/**
|
|
635
|
+
* Icon size.
|
|
636
|
+
* @default 'medium'
|
|
637
|
+
*/
|
|
638
|
+
size?: IconSize | IconDimensions;
|
|
639
|
+
/** Additional properties to forward to the SVG tag. */
|
|
640
|
+
svgProps?: ComponentProps<'svg'>;
|
|
641
|
+
/** Theme. */
|
|
642
|
+
theme?: Theme;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Component variant.
|
|
647
|
+
*/
|
|
648
|
+
declare const ShieldVariant: {
|
|
649
|
+
readonly success: "success";
|
|
650
|
+
readonly successLocked: "successLocked";
|
|
651
|
+
readonly successUnlocked: "successUnlocked";
|
|
652
|
+
readonly fail: "fail";
|
|
653
|
+
readonly failLocked: "failLocked";
|
|
654
|
+
readonly failUnlocked: "failUnlocked";
|
|
655
|
+
readonly warning: "warning";
|
|
656
|
+
readonly warningLocked: "warningLocked";
|
|
657
|
+
readonly warningUnlocked: "warningUnlocked";
|
|
658
|
+
readonly ignored: "ignored";
|
|
659
|
+
readonly noData: "noData";
|
|
660
|
+
readonly question: "question";
|
|
661
|
+
readonly email: "email";
|
|
662
|
+
};
|
|
663
|
+
type ShieldVariant = ValueOf<typeof ShieldVariant>;
|
|
664
|
+
|
|
665
|
+
interface DataGridProps extends Partial<Pick<DataGridPremiumProps, 'rows'>>, Omit<DataGridPremiumProps, 'rows'> {
|
|
417
666
|
/** License key for MUI Datagrid Pro. */
|
|
418
667
|
license?: string;
|
|
419
668
|
/**
|
|
@@ -673,7 +922,7 @@ declare const numberOperatorDecoder: Record<string, string>;
|
|
|
673
922
|
declare const isOperatorValueValid: (field: string, operator: OperatorValue, columns: DataGridProps["columns"]) => boolean;
|
|
674
923
|
declare const isValueValid: (value: OperatorValue, field: string, columns: DataGridProps["columns"], operator: OperatorValue) => boolean;
|
|
675
924
|
/** FILTERS */
|
|
676
|
-
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps["columns"]) => ExtendedGridFilterModel | "invalid";
|
|
925
|
+
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps["columns"], previousModel?: ExtendedGridFilterModel) => ExtendedGridFilterModel | "invalid";
|
|
677
926
|
/**
|
|
678
927
|
* Normalises a `date` / `dateTime` filter value to a canonical, URL-safe string
|
|
679
928
|
* before it is serialised into the URL.
|
|
@@ -689,14 +938,14 @@ declare const getFilterModelFromString: (searchString: string, columns: DataGrid
|
|
|
689
938
|
* - `dateTime` → `YYYY-MM-DDTHH:mm:ss` (local wall-clock, matching the
|
|
690
939
|
* datetime-local input)
|
|
691
940
|
* Non-date types, empty values, arrays of dates (e.g. `isBetween`) and
|
|
692
|
-
* unparseable values are handled so the existing string / number / list
|
|
941
|
+
* unparseable values are handled so the existing string / number / list / rating
|
|
693
942
|
* paths are untouched and invalid values still fall through to `isValueValid`.
|
|
694
943
|
*/
|
|
695
944
|
declare const normalizeDateValue: (value: unknown, type: string | undefined) => OperatorValue;
|
|
696
945
|
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
697
946
|
/** SORT */
|
|
698
947
|
declare const getSortingFromString: (searchString: string, columns: DataGridProps["columns"]) => GridSortModel | "invalid";
|
|
699
|
-
declare const getSearchParamsFromSorting: (sorting:
|
|
948
|
+
declare const getSearchParamsFromSorting: (sorting: GridSortModel) => URLSearchParams;
|
|
700
949
|
/** PAGINATION */
|
|
701
950
|
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | "invalid";
|
|
702
951
|
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
@@ -710,11 +959,36 @@ declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
|
710
959
|
type GridDensityValue = 'compact' | 'standard' | 'comfortable';
|
|
711
960
|
declare const getDensityFromString: (searchString: string) => GridDensityValue | "invalid";
|
|
712
961
|
declare const getSearchParamsFromDensity: (density: GridDensityValue) => URLSearchParams;
|
|
713
|
-
declare const getDensityModel: (search: string, localStorageDensity: string, setLocalStorageDensity: (density: string) => void, initialState:
|
|
962
|
+
declare const getDensityModel: (search: string, localStorageDensity: string, setLocalStorageDensity: (density: string) => void, initialState: GridInitialState | undefined, isNewVersion: boolean) => GridDensityValue;
|
|
714
963
|
/** COLUMN ORDER */
|
|
715
964
|
type ColumnOrderModel = string[];
|
|
716
965
|
declare const getColumnOrderFromString: (searchString: string) => ColumnOrderModel | "invalid";
|
|
717
966
|
declare const getSearchParamsFromColumnOrder: (columnOrder: ColumnOrderModel) => URLSearchParams;
|
|
967
|
+
/** ROW GROUPING */
|
|
968
|
+
declare const getRowGroupingFromString: (searchString: string) => GridRowGroupingModel | "invalid";
|
|
969
|
+
declare const getSearchParamsFromRowGrouping: (rowGrouping: GridRowGroupingModel) => URLSearchParams;
|
|
970
|
+
/** AGGREGATION */
|
|
971
|
+
declare const getAggregationFromString: (searchString: string) => GridAggregationModel | "invalid";
|
|
972
|
+
declare const getSearchParamsFromAggregation: (aggregation: GridAggregationModel) => URLSearchParams;
|
|
973
|
+
/** PIVOT */
|
|
974
|
+
interface PivotModel {
|
|
975
|
+
columns: string[];
|
|
976
|
+
rows: string[];
|
|
977
|
+
values: {
|
|
978
|
+
field: string;
|
|
979
|
+
aggFunc: string;
|
|
980
|
+
}[];
|
|
981
|
+
}
|
|
982
|
+
/** Convert MUI's GridPivotModel → our simplified PivotModel */
|
|
983
|
+
declare const fromGridPivotModel: (model: GridPivotModel) => PivotModel;
|
|
984
|
+
/**
|
|
985
|
+
* Pivot format: `cols:f1,f2;rows:f3;vals:f4.sum,f5.avg`
|
|
986
|
+
*/
|
|
987
|
+
declare const getPivotFromString: (searchString: string) => PivotModel | "invalid";
|
|
988
|
+
declare const getSearchParamsFromPivot: (pivot: PivotModel) => URLSearchParams;
|
|
989
|
+
/** PIVOT ACTIVE */
|
|
990
|
+
declare const getPivotActiveFromString: (searchString: string) => boolean | "invalid";
|
|
991
|
+
declare const getSearchParamsFromPivotActive: (active: boolean) => URLSearchParams;
|
|
718
992
|
/**
|
|
719
993
|
* Builds the `v=<version>` search param the grid uses to detect stale URLs.
|
|
720
994
|
*
|
|
@@ -743,10 +1017,14 @@ type FinalSearchInput = {
|
|
|
743
1017
|
density: GridDensityValue;
|
|
744
1018
|
columnOrderModel: ColumnOrderModel;
|
|
745
1019
|
defaultColumnOrder: ColumnOrderModel;
|
|
1020
|
+
rowGroupingModel: GridRowGroupingModel;
|
|
1021
|
+
aggregationModel: GridAggregationModel;
|
|
1022
|
+
pivotModel: PivotModel;
|
|
1023
|
+
pivotActive: boolean;
|
|
746
1024
|
search: string;
|
|
747
1025
|
columns: DataGridProps['columns'];
|
|
748
1026
|
};
|
|
749
|
-
declare const getFinalSearch: ({ search, localStorageVersion, filterModel, sortModel, paginationModel, columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder, columns, }: FinalSearchInput) => URLSearchParams;
|
|
1027
|
+
declare const getFinalSearch: ({ search, localStorageVersion, filterModel, sortModel, paginationModel, columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder, rowGroupingModel, aggregationModel, pivotModel, pivotActive, columns, }: FinalSearchInput) => URLSearchParams;
|
|
750
1028
|
type PinnedColumns = {
|
|
751
1029
|
left: string[];
|
|
752
1030
|
right: string[];
|
|
@@ -766,6 +1044,14 @@ type ModelsLocalStorage = {
|
|
|
766
1044
|
setLocalStorageDensity: (density: string) => void;
|
|
767
1045
|
localStorageColumnOrder: string;
|
|
768
1046
|
setLocalStorageColumnOrder: (value: string) => void;
|
|
1047
|
+
localStorageRowGrouping: string;
|
|
1048
|
+
setLocalStorageRowGrouping: (value: string) => void;
|
|
1049
|
+
localStorageAggregation: string;
|
|
1050
|
+
setLocalStorageAggregation: (value: string) => void;
|
|
1051
|
+
localStoragePivot: string;
|
|
1052
|
+
setLocalStoragePivot: (value: string) => void;
|
|
1053
|
+
localStoragePivotActive: string;
|
|
1054
|
+
setLocalStoragePivotActive: (value: string) => void;
|
|
769
1055
|
};
|
|
770
1056
|
type ModelsTable = {
|
|
771
1057
|
filterModel: GridFilterModel;
|
|
@@ -775,11 +1061,15 @@ type ModelsTable = {
|
|
|
775
1061
|
pinnedColumnsModel: PinnedColumns;
|
|
776
1062
|
density: GridDensityValue;
|
|
777
1063
|
columnOrderModel: ColumnOrderModel;
|
|
1064
|
+
rowGroupingModel: GridRowGroupingModel;
|
|
1065
|
+
aggregationModel: GridAggregationModel;
|
|
1066
|
+
pivotModel: PivotModel;
|
|
1067
|
+
pivotActive: boolean;
|
|
778
1068
|
/** The display-format search string the URL should have. Null if no update needed. */
|
|
779
1069
|
pendingSearch: string | null;
|
|
780
1070
|
};
|
|
781
1071
|
/** Return the state of the table given the URL and the local storage state */
|
|
782
|
-
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps["columns"], initialState:
|
|
1072
|
+
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps["columns"], initialState: GridInitialState | undefined, localStorage: ModelsLocalStorage, previousFilterModel?: ExtendedGridFilterModel) => ModelsTable;
|
|
783
1073
|
type DataGridModel = {
|
|
784
1074
|
filterModel: GridFilterModel;
|
|
785
1075
|
sortModel: GridSortModel;
|
|
@@ -789,10 +1079,71 @@ type DataGridModel = {
|
|
|
789
1079
|
density: GridDensityValue;
|
|
790
1080
|
columnOrderModel: ColumnOrderModel;
|
|
791
1081
|
defaultColumnOrder: ColumnOrderModel;
|
|
1082
|
+
rowGroupingModel: GridRowGroupingModel;
|
|
1083
|
+
aggregationModel: GridAggregationModel;
|
|
1084
|
+
pivotModel: PivotModel;
|
|
1085
|
+
pivotActive: boolean;
|
|
792
1086
|
};
|
|
793
|
-
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;
|
|
1087
|
+
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel, density, columnOrderModel, defaultColumnOrder, rowGroupingModel, aggregationModel, pivotModel, pivotActive, }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps["columns"]) => void;
|
|
794
1088
|
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
795
1089
|
|
|
1090
|
+
/**
|
|
1091
|
+
* A React Router v5 / connected-react-router adapter for `StatefulDataGrid.useRouter`.
|
|
1092
|
+
*
|
|
1093
|
+
* Defers `history.replace` via `queueMicrotask` to avoid the
|
|
1094
|
+
* "Cannot update during an existing state transition" warning
|
|
1095
|
+
* that connected-react-router triggers when the grid synchronises
|
|
1096
|
+
* URL state during render.
|
|
1097
|
+
*
|
|
1098
|
+
* Also coalesces multiple `historyReplace` calls within the same microtask
|
|
1099
|
+
* by computing per-call deltas against the captured `search` snapshot and
|
|
1100
|
+
* merging them into the live URL. This prevents handler stomping when the
|
|
1101
|
+
* grid fires several model-change handlers in the same render (e.g. a
|
|
1102
|
+
* pivot change re-emits a synthetic column-visibility change alongside a
|
|
1103
|
+
* filter change): without coalescing, each handler would compute a full
|
|
1104
|
+
* new search from the same captured snapshot, and the second
|
|
1105
|
+
* `history.replace` would clobber the first — dropping any keys (such as
|
|
1106
|
+
* the filter just typed) that the second handler didn't know about.
|
|
1107
|
+
*
|
|
1108
|
+
* Callers that need an authoritative full-URL replacement (e.g.
|
|
1109
|
+
* `resetStatefulDataGridState`, which must clear grid params even when the
|
|
1110
|
+
* parent component's captured search snapshot is stale relative to the live
|
|
1111
|
+
* URL) can pass `{ authoritative: true }` as the second argument to
|
|
1112
|
+
* `historyReplace`. Authoritative writes bypass the delta logic and write
|
|
1113
|
+
* synchronously to the live URL.
|
|
1114
|
+
*
|
|
1115
|
+
* @example
|
|
1116
|
+
* ```tsx
|
|
1117
|
+
* import { createReactRouterV5Adapter } from '@redsift/table';
|
|
1118
|
+
*
|
|
1119
|
+
* const useRouter = createReactRouterV5Adapter(history);
|
|
1120
|
+
*
|
|
1121
|
+
* <StatefulDataGrid useRouter={useRouter} … />
|
|
1122
|
+
* ```
|
|
1123
|
+
*/
|
|
1124
|
+
/** Minimal subset of React Router v5 `history` used by the adapter. */
|
|
1125
|
+
interface ReactRouterV5History {
|
|
1126
|
+
location: {
|
|
1127
|
+
pathname: string;
|
|
1128
|
+
search: string;
|
|
1129
|
+
};
|
|
1130
|
+
replace: (path: {
|
|
1131
|
+
pathname: string;
|
|
1132
|
+
search: string;
|
|
1133
|
+
}) => void;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* Create a `useRouter` hook compatible with `StatefulDataGrid` from a
|
|
1137
|
+
* React Router v5 `history` object.
|
|
1138
|
+
*/
|
|
1139
|
+
declare const createReactRouterV5Adapter: (history: ReactRouterV5History) => (() => {
|
|
1140
|
+
pathname: string;
|
|
1141
|
+
search: string;
|
|
1142
|
+
historyReplace: (newSearch: string, options?: {
|
|
1143
|
+
authoritative?: boolean;
|
|
1144
|
+
}) => void;
|
|
1145
|
+
});
|
|
1146
|
+
|
|
796
1147
|
interface UseLinkedFilterModelOptions {
|
|
797
1148
|
/** Starting filter model. Defaults to `{ items: [] }`. */
|
|
798
1149
|
initialFilterModel?: GridFilterModel;
|
|
@@ -853,63 +1204,6 @@ interface UseLinkedFilterModelReturn {
|
|
|
853
1204
|
*/
|
|
854
1205
|
declare function useLinkedFilterModel(options?: UseLinkedFilterModelOptions): UseLinkedFilterModelReturn;
|
|
855
1206
|
|
|
856
|
-
/**
|
|
857
|
-
* A React Router v5 / connected-react-router adapter for `StatefulDataGrid.useRouter`.
|
|
858
|
-
*
|
|
859
|
-
* Defers `history.replace` via `queueMicrotask` to avoid the
|
|
860
|
-
* "Cannot update during an existing state transition" warning
|
|
861
|
-
* that connected-react-router triggers when the grid synchronises
|
|
862
|
-
* URL state during render.
|
|
863
|
-
*
|
|
864
|
-
* Also coalesces multiple `historyReplace` calls within the same microtask
|
|
865
|
-
* by computing per-call deltas against the captured `search` snapshot and
|
|
866
|
-
* merging them into the live URL. This prevents handler stomping when the
|
|
867
|
-
* grid fires several model-change handlers in the same render (e.g. a
|
|
868
|
-
* pivot change re-emits a synthetic column-visibility change alongside a
|
|
869
|
-
* filter change): without coalescing, each handler would compute a full
|
|
870
|
-
* new search from the same captured snapshot, and the second
|
|
871
|
-
* `history.replace` would clobber the first — dropping any keys (such as
|
|
872
|
-
* the filter just typed) that the second handler didn't know about.
|
|
873
|
-
*
|
|
874
|
-
* Callers that need an authoritative full-URL replacement (e.g.
|
|
875
|
-
* `resetStatefulDataGridState`, which must clear grid params even when the
|
|
876
|
-
* parent component's captured search snapshot is stale relative to the live
|
|
877
|
-
* URL) can pass `{ authoritative: true }` as the second argument to
|
|
878
|
-
* `historyReplace`. Authoritative writes bypass the delta logic and write
|
|
879
|
-
* synchronously to the live URL.
|
|
880
|
-
*
|
|
881
|
-
* @example
|
|
882
|
-
* ```tsx
|
|
883
|
-
* import { createReactRouterV5Adapter } from '@redsift/table';
|
|
884
|
-
*
|
|
885
|
-
* const useRouter = createReactRouterV5Adapter(history);
|
|
886
|
-
*
|
|
887
|
-
* <StatefulDataGrid useRouter={useRouter} … />
|
|
888
|
-
* ```
|
|
889
|
-
*/
|
|
890
|
-
/** Minimal subset of React Router v5 `history` used by the adapter. */
|
|
891
|
-
interface ReactRouterV5History {
|
|
892
|
-
location: {
|
|
893
|
-
pathname: string;
|
|
894
|
-
search: string;
|
|
895
|
-
};
|
|
896
|
-
replace: (path: {
|
|
897
|
-
pathname: string;
|
|
898
|
-
search: string;
|
|
899
|
-
}) => void;
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* Create a `useRouter` hook compatible with `StatefulDataGrid` from a
|
|
903
|
-
* React Router v5 `history` object.
|
|
904
|
-
*/
|
|
905
|
-
declare const createReactRouterV5Adapter: (history: ReactRouterV5History) => (() => {
|
|
906
|
-
pathname: string;
|
|
907
|
-
search: string;
|
|
908
|
-
historyReplace: (newSearch: string, options?: {
|
|
909
|
-
authoritative?: boolean;
|
|
910
|
-
}) => void;
|
|
911
|
-
});
|
|
912
|
-
|
|
913
1207
|
declare const BaseButton: React$1.JSXElementConstructor<any>;
|
|
914
1208
|
|
|
915
1209
|
declare const BaseCheckbox: React$1.JSXElementConstructor<any>;
|
|
@@ -917,7 +1211,7 @@ declare const BaseCheckbox: React$1.JSXElementConstructor<any>;
|
|
|
917
1211
|
declare const muiIconToDSIcon: Partial<Record<keyof GridSlotsComponent, string>>;
|
|
918
1212
|
declare const BaseIcon: React$1.JSXElementConstructor<any>;
|
|
919
1213
|
|
|
920
|
-
declare const
|
|
1214
|
+
declare const BaseIconButton: React$1.JSXElementConstructor<any>;
|
|
921
1215
|
|
|
922
1216
|
declare const BaseTextField: React$1.JSXElementConstructor<any>;
|
|
923
1217
|
|
|
@@ -939,9 +1233,14 @@ interface LocaleText {
|
|
|
939
1233
|
powerTooltipContent?: string;
|
|
940
1234
|
errorText?: string;
|
|
941
1235
|
}
|
|
1236
|
+
interface FilterConfigColumn {
|
|
1237
|
+
field: string;
|
|
1238
|
+
type?: string;
|
|
1239
|
+
description?: string;
|
|
1240
|
+
}
|
|
942
1241
|
interface FilterConfig {
|
|
943
|
-
columns:
|
|
944
|
-
typeOperators:
|
|
1242
|
+
columns: FilterConfigColumn[];
|
|
1243
|
+
typeOperators: Record<string, string[]>;
|
|
945
1244
|
notes: string;
|
|
946
1245
|
openaiApiKey?: string;
|
|
947
1246
|
completionFunc?: (nlpFilterConfig: FilterConfig, prompt: string, model: string) => Promise<CompletionResponse>;
|
|
@@ -972,13 +1271,10 @@ type ControlledPaginationProps = {
|
|
|
972
1271
|
displayRowsPerPage?: boolean;
|
|
973
1272
|
displayPagination?: boolean;
|
|
974
1273
|
selectionStatus: SelectionStatus;
|
|
975
|
-
apiRef: MutableRefObject<
|
|
1274
|
+
apiRef: MutableRefObject<GridApiPremium | null>;
|
|
976
1275
|
paginationModel: GridPaginationModel;
|
|
977
1276
|
onPaginationModelChange: (model: GridPaginationModel, details: GridCallbackDetails<'pagination'>) => void;
|
|
978
|
-
pageSizeOptions?:
|
|
979
|
-
value: number;
|
|
980
|
-
label: string;
|
|
981
|
-
})[];
|
|
1277
|
+
pageSizeOptions?: number[];
|
|
982
1278
|
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
983
1279
|
paginationProps?: DataGridProps['paginationProps'];
|
|
984
1280
|
};
|
|
@@ -991,10 +1287,7 @@ type ServerSideControlledPaginationProps = {
|
|
|
991
1287
|
selectionStatus: SelectionStatus;
|
|
992
1288
|
paginationModel: GridPaginationModel;
|
|
993
1289
|
onPaginationModelChange: (model: GridPaginationModel, details: GridCallbackDetails<'pagination'>) => void;
|
|
994
|
-
pageSizeOptions?:
|
|
995
|
-
value: number;
|
|
996
|
-
label: string;
|
|
997
|
-
})[];
|
|
1290
|
+
pageSizeOptions?: number[];
|
|
998
1291
|
paginationProps?: DataGridProps['paginationProps'];
|
|
999
1292
|
rowCount: number;
|
|
1000
1293
|
loading?: boolean;
|
|
@@ -1002,7 +1295,7 @@ type ServerSideControlledPaginationProps = {
|
|
|
1002
1295
|
/**
|
|
1003
1296
|
* Get the IDs of all selectable rows currently loaded in the grid (i.e. the current page for server-side).
|
|
1004
1297
|
*/
|
|
1005
|
-
declare const getSelectableRowIdsInPage: (apiRef: React$1.MutableRefObject<
|
|
1298
|
+
declare const getSelectableRowIdsInPage: (apiRef: React$1.MutableRefObject<GridApiPremium>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined) => GridRowId[];
|
|
1006
1299
|
/**
|
|
1007
1300
|
* Intercept MUI's `onRowSelectionModelChange` for server-side pagination to fix the
|
|
1008
1301
|
* header checkbox behavior when cross-page selections exist.
|
|
@@ -1016,8 +1309,8 @@ declare const getSelectableRowIdsInPage: (apiRef: React$1.MutableRefObject<GridA
|
|
|
1016
1309
|
* selections with 0 selected on current page), we merge all current page rows with the
|
|
1017
1310
|
* existing cross-page selections instead.
|
|
1018
1311
|
*/
|
|
1019
|
-
declare const fixServerSideHeaderCheckboxSelection: (newSelectionModel: GridRowSelectionModel, previousSelectionModel: GridRowSelectionModel, selectionStatus: React$1.MutableRefObject<SelectionStatus>, apiRef: React$1.MutableRefObject<
|
|
1020
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridRowSelectionModel, apiRef: React$1.MutableRefObject<
|
|
1312
|
+
declare const fixServerSideHeaderCheckboxSelection: (newSelectionModel: GridRowSelectionModel, previousSelectionModel: GridRowSelectionModel, selectionStatus: React$1.MutableRefObject<SelectionStatus>, apiRef: React$1.MutableRefObject<GridApiPremium>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined) => GridRowSelectionModel;
|
|
1313
|
+
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridRowSelectionModel, apiRef: React$1.MutableRefObject<GridApiPremium | null>, selectionStatus: React$1.MutableRefObject<SelectionStatus>, forceUpdate: React$1.Dispatch<React$1.SetStateAction<number>>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
1021
1314
|
declare const ServerSideControlledPagination: React$1.FC<ServerSideControlledPaginationProps>;
|
|
1022
1315
|
|
|
1023
1316
|
interface TextCellProps extends ComponentProps<'div'> {
|
|
@@ -1129,4 +1422,4 @@ type ToolbarWrapperProps = {
|
|
|
1129
1422
|
*/
|
|
1130
1423
|
declare const ToolbarWrapper: React$1.FC<ToolbarWrapperProps>;
|
|
1131
1424
|
|
|
1132
|
-
export { ARRAY_IS_EMPTY, ARRAY_IS_NOT_EMPTY, BaseButton, BaseCheckbox, BaseIcon,
|
|
1425
|
+
export { AGGREGATION_MODEL_KEY, ARRAY_IS_EMPTY, ARRAY_IS_NOT_EMPTY, BaseButton, BaseCheckbox, BaseIcon, BaseIconButton, 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, EMPTY_ROW_SELECTION_MODEL, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, FilterConfigColumn, 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_I, IS_ANY_OF_I_WITH_SELECT, 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, LegacyRowSelectionModel, MultiSelectOperatorName, NumberOperatorName, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PIVOT_ACTIVE_KEY, PIVOT_MODEL_KEY, PinnedColumns, PivotModel, ROW_GROUPING_MODEL_KEY, ReactRouterV5History, RowSelectionModelInput, 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, createRowSelectionModel, customColumnTypes, decodeValue, encodeValue, fixServerSideHeaderCheckboxSelection, fromGridPivotModel, getAggregationFromString, getColumnOrderFromString, getColumnVisibilityFromString, getCompletion, getDecodedSearchFromUrl, getDensityFromString, getDensityModel, getFilterModelFromString, getFinalSearch, getGridDateOperatorsExtended, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getPivotActiveFromString, getPivotFromString, getRowGroupingFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromAggregation, getSearchParamsFromColumnOrder, getSearchParamsFromColumnVisibility, getSearchParamsFromDensity, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromPivot, getSearchParamsFromPivotActive, getSearchParamsFromRowGrouping, getSearchParamsFromSorting, getSearchParamsFromTab, getSearchParamsFromVersion, getSelectableRowIdsInPage, getSelectedIds, getSelectionCount, getSortingFromString, isOperatorValueValid, isRowSelected, isValueValid, makeCaseInsensitive, muiIconToDSIcon, normalizeDateValue, normalizeRowSelectionModel, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, resetColumnVisibility, resetStatefulDataGridState, updateUrl, urlSearchParamsToString, useLinkedFilterModel, wrapCaseInsensitive };
|