@redsift/table 11.6.0-muiv5-alpha.5 → 11.6.0-muiv5-alpha.7
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 +3 -3
- package/_internal/BaseTextField.js +24 -13
- package/_internal/DataGrid.js +1 -5
- package/_internal/DataGrid2.js +329 -3
- package/_internal/GridToolbarFilterSemanticField.js +1 -4
- package/_internal/GridToolbarFilterSemanticField2.js +5575 -9
- package/_internal/Pagination.js +2 -7
- package/_internal/StatefulDataGrid.js +2 -6
- package/_internal/StatefulDataGrid2.js +1419 -16
- package/_internal/TextCell.js +1 -2
- package/_internal/TextCell2.js +59 -23
- package/_internal/Toolbar.js +1 -3
- package/_internal/Toolbar2.js +76 -47
- package/_internal/ToolbarWrapper.js +2 -6
- package/_internal/ToolbarWrapper2.js +56 -22
- package/index.d.ts +629 -0
- package/index.js +14 -401
- package/package.json +2 -2
- package/_internal/ServerSideControlledPagination.js +0 -39
- package/_internal/types.js +0 -35
- package/_internal/types2.js +0 -39
package/index.js
CHANGED
|
@@ -1,406 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export { D as DataGridProps, S as SelectionStatus, a as StyledDataGridProps } from './_internal/types.js';
|
|
9
|
-
import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
|
|
10
|
-
export { B as BaseButton, a as BaseCheckbox, b as BaseIcon, c as BasePopper, d as BaseTextField, m as muiIconToDSIcon } from './_internal/BaseTextField.js';
|
|
1
|
+
export { C as CONTAINS_ANY_OF, u as CONTAINS_ANY_OF_I, D as DOES_NOT_CONTAIN, i as DOES_NOT_EQUAL, j as DOES_NOT_HAVE, k as DOES_NOT_HAVE_WITH_SELECT, E as ENDS_WITH_ANY_OF, H as HAS, x as HAS_ANY_OF, y as HAS_ANY_OF_WITH_SELECT, m as HAS_ONLY, n as HAS_ONLY_WITH_SELECT, l as HAS_WITH_SELECT, p as IS, v as IS_ANY_OF, w as IS_ANY_OF_WITH_SELECT, I as IS_BETWEEN, r as IS_NOT, z as IS_NOT_ANY_OF, s as IS_NOT_WITH_SELECT, q as IS_WITH_SELECT, S as STARTS_WITH_ANY_OF, f as customColumnTypes, h as getGridNumericOperators, A as getGridStringArrayOperators, B as getGridStringArrayOperatorsWithSelect, F as getGridStringArrayOperatorsWithSelectOnStringArrayColumns, t as getGridStringOperators, d as getRsMultipleSelectColumnType, e as getRsMultipleSelectWithShortOperatorListColumnType, a as getRsNumberColumnType, b as getRsSingleSelectColumnType, c as getRsSingleSelectWithShortOperatorListColumnType, g as getRsStringColumnType, o as operatorList } from './_internal/useControlledDatagridState.js';
|
|
2
|
+
export { D as DEFAULT_OPERATORS, G as GridToolbarFilterSemanticField, g as getCompletion } from './_internal/GridToolbarFilterSemanticField2.js';
|
|
3
|
+
export { C as CATEGORIES, D as DIMENSION_MODEL_KEY, F as FILTER_MODEL_KEY, b as FILTER_SEARCH_KEY, P as PAGINATION_MODEL_KEY, a as PINNED_COLUMNS, S as SORT_MODEL_KEY, y as StatefulDataGrid, V as VISIBILITY_MODEL_KEY, x as areFilterModelsEquivalent, c as buildStorageKey, d as clearPreviousVersionStorage, e as decodeValue, f as encodeValue, p as getColumnVisibilityFromString, h as getFilterModelFromString, t as getFinalSearch, v as getModelsParsedOrUpdateLocalStorage, l as getPaginationFromString, q as getPinnedColumnsFromString, o as getSearchParamsFromColumnVisibility, i as getSearchParamsFromFilterModel, m as getSearchParamsFromPagination, r as getSearchParamsFromPinnedColumns, k as getSearchParamsFromSorting, s as getSearchParamsFromTab, j as getSortingFromString, g as numberOperatorDecoder, n as numberOperatorEncoder, w as updateUrl, u as urlSearchParamsToString } from './_internal/StatefulDataGrid2.js';
|
|
4
|
+
import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';
|
|
5
|
+
export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
6
|
+
export { B as BaseButton, a as BaseCheckbox, b as BaseIcon, c as BasePopper, m as muiIconToDSIcon } from './_internal/BasePopper.js';
|
|
7
|
+
export { B as BaseTextField } from './_internal/BaseTextField.js';
|
|
11
8
|
export { D as DataGrid } from './_internal/DataGrid2.js';
|
|
12
|
-
export {
|
|
13
|
-
export { C as CompletionResponse, F as FilterConfig, G as GridToolbarFilterSemanticFieldProps } from './_internal/types2.js';
|
|
14
|
-
export { a as ControlledPagination, C as ControlledPaginationProps, b as ServerSideControlledPagination, S as ServerSideControlledPaginationProps, o as onServerSideSelectionStatusChange } from './_internal/ServerSideControlledPagination.js';
|
|
15
|
-
export { S as StatefulDataGrid, a as StatefulDataGridProps } from './_internal/StatefulDataGrid2.js';
|
|
9
|
+
export { C as ControlledPagination, S as ServerSideControlledPagination, o as onServerSideSelectionStatusChange } from './_internal/ControlledPagination.js';
|
|
16
10
|
export { T as TextCell } from './_internal/TextCell2.js';
|
|
17
11
|
export { T as Toolbar } from './_internal/Toolbar2.js';
|
|
18
|
-
export {
|
|
19
|
-
import 'react';
|
|
20
|
-
import '@mui/material';
|
|
21
|
-
import '@redsift/design-system';
|
|
22
|
-
import '@mui/x-data-grid-pro/models/gridApiPro';
|
|
12
|
+
export { T as ToolbarWrapper } from './_internal/ToolbarWrapper2.js';
|
|
23
13
|
|
|
24
|
-
|
|
14
|
+
// Don't use a spread operator there or it will break the build due to MUI internal components
|
|
15
|
+
const DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
|
|
16
|
+
DETAIL_PANEL_TOGGLE_COL_DEF.type = 'actions';
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
29
|
-
};
|
|
30
|
-
declare const getRsNumberColumnType: () => {
|
|
31
|
-
extendType: GridNativeColTypes;
|
|
32
|
-
filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
33
|
-
};
|
|
34
|
-
declare const getRsSingleSelectColumnType: () => {
|
|
35
|
-
extendType: GridNativeColTypes;
|
|
36
|
-
filterOperators: ({
|
|
37
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
38
|
-
label: string;
|
|
39
|
-
value: string;
|
|
40
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
41
|
-
} | {
|
|
42
|
-
label: string;
|
|
43
|
-
value: string;
|
|
44
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
45
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
|
|
46
|
-
} | {
|
|
47
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
48
|
-
label: string;
|
|
49
|
-
value: string;
|
|
50
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
51
|
-
})[];
|
|
52
|
-
};
|
|
53
|
-
declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
|
|
54
|
-
extendType: GridNativeColTypes;
|
|
55
|
-
filterOperators: ({
|
|
56
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
57
|
-
label: string;
|
|
58
|
-
value: string;
|
|
59
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
60
|
-
} | {
|
|
61
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
62
|
-
label: string;
|
|
63
|
-
value: string;
|
|
64
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
65
|
-
})[];
|
|
66
|
-
};
|
|
67
|
-
declare const getRsMultipleSelectColumnType: () => {
|
|
68
|
-
extendType: GridNativeColTypes;
|
|
69
|
-
filterOperators: ({
|
|
70
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
71
|
-
label: string;
|
|
72
|
-
value: string;
|
|
73
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
74
|
-
} | {
|
|
75
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
79
|
-
})[];
|
|
80
|
-
};
|
|
81
|
-
declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
|
|
82
|
-
extendType: GridNativeColTypes;
|
|
83
|
-
filterOperators: ({
|
|
84
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
85
|
-
label: string;
|
|
86
|
-
value: string;
|
|
87
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
88
|
-
} | {
|
|
89
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
90
|
-
label: string;
|
|
91
|
-
value: string;
|
|
92
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
93
|
-
})[];
|
|
94
|
-
};
|
|
95
|
-
declare const customColumnTypes: GridColumnTypesRecord;
|
|
96
|
-
|
|
97
|
-
declare const IS_BETWEEN: {
|
|
98
|
-
label: string;
|
|
99
|
-
value: string;
|
|
100
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
101
|
-
InputComponent: (props: any) => JSX.Element;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
105
|
-
|
|
106
|
-
declare const DOES_NOT_CONTAIN: {
|
|
107
|
-
label: string;
|
|
108
|
-
value: string;
|
|
109
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
110
|
-
InputComponent: typeof GridFilterInputValue;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
declare const DOES_NOT_EQUAL: {
|
|
114
|
-
label: string;
|
|
115
|
-
value: string;
|
|
116
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
117
|
-
InputComponent: typeof GridFilterInputValue;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
declare const DOES_NOT_HAVE: {
|
|
121
|
-
label: string;
|
|
122
|
-
value: string;
|
|
123
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
124
|
-
InputComponent: typeof GridFilterInputValue;
|
|
125
|
-
};
|
|
126
|
-
declare const DOES_NOT_HAVE_WITH_SELECT: {
|
|
127
|
-
InputComponent: typeof GridFilterInputSingleSelect;
|
|
128
|
-
label: string;
|
|
129
|
-
value: string;
|
|
130
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
declare const HAS: {
|
|
134
|
-
label: string;
|
|
135
|
-
value: string;
|
|
136
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
137
|
-
InputComponent: typeof GridFilterInputValue;
|
|
138
|
-
};
|
|
139
|
-
declare const HAS_WITH_SELECT: {
|
|
140
|
-
InputComponent: typeof GridFilterInputSingleSelect;
|
|
141
|
-
label: string;
|
|
142
|
-
value: string;
|
|
143
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
declare const HAS_ONLY: {
|
|
147
|
-
label: string;
|
|
148
|
-
value: string;
|
|
149
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
150
|
-
InputComponent: typeof GridFilterInputValue;
|
|
151
|
-
};
|
|
152
|
-
declare const HAS_ONLY_WITH_SELECT: {
|
|
153
|
-
InputComponent: typeof GridFilterInputSingleSelect;
|
|
154
|
-
label: string;
|
|
155
|
-
value: string;
|
|
156
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
declare const IS: {
|
|
160
|
-
label: string;
|
|
161
|
-
value: string;
|
|
162
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
163
|
-
InputComponent: typeof GridFilterInputValue;
|
|
164
|
-
};
|
|
165
|
-
declare const IS_WITH_SELECT: {
|
|
166
|
-
InputComponent: typeof GridFilterInputSingleSelect;
|
|
167
|
-
label: string;
|
|
168
|
-
value: string;
|
|
169
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
declare const IS_NOT: {
|
|
173
|
-
label: string;
|
|
174
|
-
value: string;
|
|
175
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
176
|
-
InputComponent: typeof GridFilterInputValue;
|
|
177
|
-
};
|
|
178
|
-
declare const IS_NOT_WITH_SELECT: {
|
|
179
|
-
InputComponent: typeof GridFilterInputSingleSelect;
|
|
180
|
-
label: string;
|
|
181
|
-
value: string;
|
|
182
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
186
|
-
|
|
187
|
-
declare const CONTAINS_ANY_OF: {
|
|
188
|
-
label: string;
|
|
189
|
-
value: string;
|
|
190
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
191
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
192
|
-
};
|
|
193
|
-
declare const CONTAINS_ANY_OF_I: {
|
|
194
|
-
label: string;
|
|
195
|
-
value: string;
|
|
196
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
197
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
declare const ENDS_WITH_ANY_OF: {
|
|
201
|
-
label: string;
|
|
202
|
-
value: string;
|
|
203
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
204
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
declare const IS_ANY_OF: {
|
|
208
|
-
label: string;
|
|
209
|
-
value: string;
|
|
210
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
211
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
212
|
-
};
|
|
213
|
-
declare const IS_ANY_OF_WITH_SELECT: {
|
|
214
|
-
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
215
|
-
label: string;
|
|
216
|
-
value: string;
|
|
217
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
declare const HAS_ANY_OF: {
|
|
221
|
-
label: string;
|
|
222
|
-
value: string;
|
|
223
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
224
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
225
|
-
};
|
|
226
|
-
declare const HAS_ANY_OF_WITH_SELECT: {
|
|
227
|
-
InputComponent: typeof GridFilterInputMultipleSingleSelect;
|
|
228
|
-
label: string;
|
|
229
|
-
value: string;
|
|
230
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
declare const IS_NOT_ANY_OF: {
|
|
234
|
-
label: string;
|
|
235
|
-
value: string;
|
|
236
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
237
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
declare const STARTS_WITH_ANY_OF: {
|
|
241
|
-
label: string;
|
|
242
|
-
value: string;
|
|
243
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
244
|
-
InputComponent: typeof GridFilterInputMultipleValue;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
248
|
-
declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator<any, number | string | null, any>[];
|
|
249
|
-
declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator<any, number | string | null, any>[];
|
|
250
|
-
|
|
251
|
-
declare const operatorList: {
|
|
252
|
-
string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
253
|
-
number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
254
|
-
boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
|
|
255
|
-
date: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
256
|
-
dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
|
|
257
|
-
singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
|
|
258
|
-
rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
259
|
-
rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
260
|
-
rsSingleSelect: ({
|
|
261
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
262
|
-
label: string;
|
|
263
|
-
value: string;
|
|
264
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
265
|
-
} | {
|
|
266
|
-
label: string;
|
|
267
|
-
value: string;
|
|
268
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
269
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
|
|
270
|
-
} | {
|
|
271
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
272
|
-
label: string;
|
|
273
|
-
value: string;
|
|
274
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
275
|
-
})[];
|
|
276
|
-
rsSingleSelectWithShortOperatorList: ({
|
|
277
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
278
|
-
label: string;
|
|
279
|
-
value: string;
|
|
280
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
281
|
-
} | {
|
|
282
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
283
|
-
label: string;
|
|
284
|
-
value: string;
|
|
285
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
286
|
-
})[];
|
|
287
|
-
rsMultipleSelect: ({
|
|
288
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
289
|
-
label: string;
|
|
290
|
-
value: string;
|
|
291
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
292
|
-
} | {
|
|
293
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
294
|
-
label: string;
|
|
295
|
-
value: string;
|
|
296
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
297
|
-
})[];
|
|
298
|
-
rsMultipleSelectWithShortOperatorList: ({
|
|
299
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
|
|
300
|
-
label: string;
|
|
301
|
-
value: string;
|
|
302
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
303
|
-
} | {
|
|
304
|
-
InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
|
|
305
|
-
label: string;
|
|
306
|
-
value: string;
|
|
307
|
-
getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
|
|
308
|
-
})[];
|
|
309
|
-
rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
|
|
313
|
-
|
|
314
|
-
declare const PAGINATION_MODEL_KEY = "paginationModel";
|
|
315
|
-
declare const FILTER_MODEL_KEY = "filterModel";
|
|
316
|
-
declare const SORT_MODEL_KEY = "sortModel";
|
|
317
|
-
declare const VISIBILITY_MODEL_KEY = "visibilityModel";
|
|
318
|
-
declare const PINNED_COLUMNS = "pinnedColumns";
|
|
319
|
-
declare const DIMENSION_MODEL_KEY = "dimension";
|
|
320
|
-
declare const FILTER_SEARCH_KEY = "searchModel";
|
|
321
|
-
declare const CATEGORIES: readonly ["paginationModel", "filterModel", "sortModel", "visibilityModel", "dimension", "searchModel", "pinnedColumns"];
|
|
322
|
-
type Category = (typeof CATEGORIES)[number];
|
|
323
|
-
declare const buildStorageKey: ({ id, version, category }: {
|
|
324
|
-
id: string;
|
|
325
|
-
version: number;
|
|
326
|
-
category: Category;
|
|
327
|
-
}) => `${string}:${number}:paginationModel` | `${string}:${number}:filterModel` | `${string}:${number}:sortModel` | `${string}:${number}:visibilityModel` | `${string}:${number}:pinnedColumns` | `${string}:${number}:dimension` | `${string}:${number}:searchModel`;
|
|
328
|
-
declare const clearPreviousVersionStorage: (id: string, previousLocalStorageVersions: number[]) => void;
|
|
329
|
-
|
|
330
|
-
interface ExtendedGridFilterModel extends GridFilterModel {
|
|
331
|
-
quickFilterValues?: string[];
|
|
332
|
-
}
|
|
333
|
-
interface ExtendedGridPaginationModel {
|
|
334
|
-
page: number;
|
|
335
|
-
pageSize: number;
|
|
336
|
-
direction?: 'next' | 'back';
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
type OperatorValue = string | string[];
|
|
340
|
-
declare const decodeValue: (value: string) => OperatorValue;
|
|
341
|
-
declare const encodeValue: (value: string | undefined) => string;
|
|
342
|
-
declare const urlSearchParamsToString: (searchParams: URLSearchParams) => string;
|
|
343
|
-
declare const numberOperatorEncoder: Record<string, string>;
|
|
344
|
-
declare const numberOperatorDecoder: Record<string, string>;
|
|
345
|
-
/** FILTERS */
|
|
346
|
-
declare const getFilterModelFromString: (searchString: string, columns: DataGridProps['columns']) => ExtendedGridFilterModel | 'invalid';
|
|
347
|
-
declare const getSearchParamsFromFilterModel: (filterModel: ExtendedGridFilterModel) => URLSearchParams;
|
|
348
|
-
/** SORT */
|
|
349
|
-
declare const getSortingFromString: (searchString: string, columns: DataGridProps['columns']) => GridSortModel | 'invalid';
|
|
350
|
-
declare const getSearchParamsFromSorting: (sorting: GridSortItem[]) => URLSearchParams;
|
|
351
|
-
/** PAGINATION */
|
|
352
|
-
declare const getPaginationFromString: (searchString: string) => ExtendedGridPaginationModel | 'invalid';
|
|
353
|
-
declare const getSearchParamsFromPagination: (pagination: ExtendedGridPaginationModel) => URLSearchParams;
|
|
354
|
-
/** COLUMN VISIBILITY */
|
|
355
|
-
declare const getSearchParamsFromColumnVisibility: (columnVisibility: GridColumnVisibilityModel, columns: DataGridProps['columns']) => URLSearchParams;
|
|
356
|
-
declare const getColumnVisibilityFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => GridColumnVisibilityModel | 'invalid';
|
|
357
|
-
declare const getPinnedColumnsFromString: (notParsed: string, tableColumns: DataGridProps['columns']) => PinnedColumns | 'invalid';
|
|
358
|
-
declare const getSearchParamsFromPinnedColumns: (pinnedColumns: GridPinnedColumns) => URLSearchParams;
|
|
359
|
-
declare const getSearchParamsFromTab: (search: string) => URLSearchParams;
|
|
360
|
-
type FinalSearchInput = {
|
|
361
|
-
localStorageVersion: number;
|
|
362
|
-
filterModel: GridFilterModel;
|
|
363
|
-
sortModel: GridSortModel;
|
|
364
|
-
paginationModel: ExtendedGridPaginationModel;
|
|
365
|
-
columnsVisibilityModel: GridColumnVisibilityModel;
|
|
366
|
-
pinnedColumnsModel: GridPinnedColumns;
|
|
367
|
-
search: string;
|
|
368
|
-
columns: DataGridProps['columns'];
|
|
369
|
-
};
|
|
370
|
-
declare const getFinalSearch: ({ search, localStorageVersion, filterModel, sortModel, paginationModel, columnsVisibilityModel, pinnedColumnsModel, columns, }: FinalSearchInput) => URLSearchParams;
|
|
371
|
-
type PinnedColumns = {
|
|
372
|
-
left: string[];
|
|
373
|
-
right: string[];
|
|
374
|
-
};
|
|
375
|
-
type ModelsLocalStorage = {
|
|
376
|
-
localStorageFilters: string;
|
|
377
|
-
setLocalStorageFilters: (search: string) => void;
|
|
378
|
-
localStorageSorting: string;
|
|
379
|
-
setLocalStorageSorting: (search: string) => void;
|
|
380
|
-
localStoragePagination: string;
|
|
381
|
-
setLocalStoragePagination: (search: string) => void;
|
|
382
|
-
localStorageColumnsVisibility: string;
|
|
383
|
-
setLocalStorageColumnsVisibility: (search: string) => void;
|
|
384
|
-
localStoragePinnedColumns: string;
|
|
385
|
-
setLocalStoragePinnedColumns: (search: string) => void;
|
|
386
|
-
};
|
|
387
|
-
type ModelsTable = {
|
|
388
|
-
filterModel: GridFilterModel;
|
|
389
|
-
sortModel: GridSortModel;
|
|
390
|
-
paginationModel: ExtendedGridPaginationModel;
|
|
391
|
-
columnVisibilityModel: GridColumnVisibilityModel;
|
|
392
|
-
pinnedColumnsModel: PinnedColumns;
|
|
393
|
-
};
|
|
394
|
-
/** Return the state of the table given the URL and the local storage state */
|
|
395
|
-
declare const getModelsParsedOrUpdateLocalStorage: (search: string, localStorageVersion: number, columns: DataGridProps['columns'], historyReplace: (newSearch: string) => void, initialState: GridInitialStatePro | undefined, localStorage: ModelsLocalStorage) => ModelsTable;
|
|
396
|
-
type DataGridModel = {
|
|
397
|
-
filterModel: GridFilterModel;
|
|
398
|
-
sortModel: GridSortModel;
|
|
399
|
-
paginationModel: ExtendedGridPaginationModel;
|
|
400
|
-
columnsModel: GridColumnVisibilityModel;
|
|
401
|
-
pinnedColumnsModel: GridPinnedColumns;
|
|
402
|
-
};
|
|
403
|
-
declare const updateUrl: ({ filterModel, sortModel, paginationModel, columnsModel: columnsVisibilityModel, pinnedColumnsModel }: DataGridModel, search: string, localStorageVersion: number, historyReplace: (newSearch: string) => void, columns: DataGridProps['columns']) => void;
|
|
404
|
-
declare const areFilterModelsEquivalent: (filterModel: GridFilterModel, filterModelToMatch: GridFilterModel) => boolean;
|
|
405
|
-
|
|
406
|
-
export { CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGridModel, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF, IS_NOT_WITH_SELECT, IS_WITH_SELECT, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, numberOperatorDecoder, numberOperatorEncoder, operatorList, updateUrl, urlSearchParamsToString };
|
|
18
|
+
export { DETAIL_PANEL_TOGGLE_COL_DEF };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "yarn test:unit && yarn test:storybook"
|
|
31
31
|
},
|
|
32
32
|
"types": "types.d.ts",
|
|
33
|
-
"version": "11.6.0-muiv5-alpha.
|
|
33
|
+
"version": "11.6.0-muiv5-alpha.7",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.11.0",
|
|
36
36
|
"@emotion/styled": "^11.11.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"react-dom": ">=17",
|
|
93
93
|
"styled-components": "^5.3.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9b206bde87877e58682621cf219c341f7f7ad8e7"
|
|
96
96
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { MutableRefObject } from 'react';
|
|
2
|
-
import { S as SelectionStatus, D as DataGridProps } from './types.js';
|
|
3
|
-
import { GridApiPro } from '@mui/x-data-grid-pro/models/gridApiPro';
|
|
4
|
-
import { GridSelectionModel, GridRowParams } from '@mui/x-data-grid-pro';
|
|
5
|
-
|
|
6
|
-
type ControlledPaginationProps = {
|
|
7
|
-
displaySelection?: boolean;
|
|
8
|
-
displayRowsPerPage?: boolean;
|
|
9
|
-
displayPagination?: boolean;
|
|
10
|
-
selectionStatus: SelectionStatus;
|
|
11
|
-
apiRef: MutableRefObject<GridApiPro>;
|
|
12
|
-
page: number;
|
|
13
|
-
onPageChange: (page: number) => void;
|
|
14
|
-
pageSize: number;
|
|
15
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
16
|
-
rowsPerPageOptions?: number[];
|
|
17
|
-
isRowSelectable?: DataGridProps['isRowSelectable'];
|
|
18
|
-
paginationProps?: DataGridProps['paginationProps'];
|
|
19
|
-
};
|
|
20
|
-
declare const ControlledPagination: React.FC<ControlledPaginationProps>;
|
|
21
|
-
|
|
22
|
-
type ServerSideControlledPaginationProps = {
|
|
23
|
-
displaySelection?: boolean;
|
|
24
|
-
displayRowsPerPage?: boolean;
|
|
25
|
-
displayPagination?: boolean;
|
|
26
|
-
selectionStatus: SelectionStatus;
|
|
27
|
-
page: number;
|
|
28
|
-
onPageChange: (page: number) => void;
|
|
29
|
-
pageSize: number;
|
|
30
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
31
|
-
rowsPerPageOptions?: number[];
|
|
32
|
-
paginationProps?: DataGridProps['paginationProps'];
|
|
33
|
-
rowCount: number;
|
|
34
|
-
loading?: boolean;
|
|
35
|
-
};
|
|
36
|
-
declare const onServerSideSelectionStatusChange: (newSelectionModel: GridSelectionModel, apiRef: React.MutableRefObject<GridApiPro>, selectionStatus: React.MutableRefObject<SelectionStatus>, isRowSelectable: ((params: GridRowParams<any>) => boolean) | undefined, page: number, pageSize: number) => void;
|
|
37
|
-
declare const ServerSideControlledPagination: React.FC<ServerSideControlledPaginationProps>;
|
|
38
|
-
|
|
39
|
-
export { ControlledPaginationProps as C, ServerSideControlledPaginationProps as S, ControlledPagination as a, ServerSideControlledPagination as b, onServerSideSelectionStatusChange as o };
|
package/_internal/types.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DataGridProProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { TablePaginationProps } from '@mui/material';
|
|
4
|
-
import { Theme } from '@redsift/design-system';
|
|
5
|
-
|
|
6
|
-
interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
|
|
7
|
-
/** License key for MUI Datagrid Pro. */
|
|
8
|
-
license?: string;
|
|
9
|
-
/** Height. A default one is set to prevent rendering all rows. */
|
|
10
|
-
height?: string;
|
|
11
|
-
/** Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. */
|
|
12
|
-
toolbar?: ReactNode;
|
|
13
|
-
/** Whether the Toolbar is displayed or not. */
|
|
14
|
-
hideToolbar?: boolean;
|
|
15
|
-
/** Indicates how to display pagination. */
|
|
16
|
-
paginationPlacement?: 'top' | 'bottom' | 'both' | 'none';
|
|
17
|
-
/** Props to forward to the pagination component. */
|
|
18
|
-
paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
|
|
19
|
-
/** Theme. */
|
|
20
|
-
theme?: Theme;
|
|
21
|
-
}
|
|
22
|
-
type SelectionStatus = {
|
|
23
|
-
type: 'page' | 'table' | 'other' | 'none';
|
|
24
|
-
numberOfSelectedRows: number;
|
|
25
|
-
numberOfSelectedRowsInPage?: number;
|
|
26
|
-
page?: number;
|
|
27
|
-
pageSize?: number;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
type StyledDataGridProps = {
|
|
31
|
-
$height?: string;
|
|
32
|
-
$theme?: DataGridProps['theme'];
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export { DataGridProps as D, SelectionStatus as S, StyledDataGridProps as a };
|
package/_internal/types2.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { GridFilterModel } from '@mui/x-data-grid-pro';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
interface CompletionResponseItem {
|
|
5
|
-
columnField: string;
|
|
6
|
-
operatorValue: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
}
|
|
9
|
-
type CompletionResponse = {
|
|
10
|
-
linkOperator: 'and' | 'or';
|
|
11
|
-
items: CompletionResponseItem[];
|
|
12
|
-
};
|
|
13
|
-
interface LocaleText {
|
|
14
|
-
textLabel?: string;
|
|
15
|
-
textPlaceholder?: string;
|
|
16
|
-
buttonAriaLabel?: string;
|
|
17
|
-
buttonText?: string;
|
|
18
|
-
powerText?: string;
|
|
19
|
-
powerTooltipContent?: string;
|
|
20
|
-
errorText?: string;
|
|
21
|
-
}
|
|
22
|
-
interface FilterConfig {
|
|
23
|
-
columns: object[];
|
|
24
|
-
typeOperators: object;
|
|
25
|
-
notes: string;
|
|
26
|
-
openaiApiKey?: string;
|
|
27
|
-
completionFunc?: (nlpFilterConfig: FilterConfig, prompt: string, model: string) => Promise<CompletionResponse>;
|
|
28
|
-
}
|
|
29
|
-
interface GridToolbarFilterSemanticFieldProps extends ComponentProps<'form'> {
|
|
30
|
-
nlpFilterConfig: FilterConfig;
|
|
31
|
-
onFilterModelChange: (filterModel: GridFilterModel) => void;
|
|
32
|
-
dateFormat?: string;
|
|
33
|
-
defaultModel?: string;
|
|
34
|
-
defaultFilter?: CompletionResponse;
|
|
35
|
-
disablePower?: boolean;
|
|
36
|
-
localeText?: LocaleText;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { CompletionResponse as C, FilterConfig as F, GridToolbarFilterSemanticFieldProps as G };
|