@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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { B as BaseButton, a as BaseCheckbox, b as BaseIcon, c as BasePopper,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export { B as BaseButton, a as BaseCheckbox, b as BaseIcon, c as BasePopper, m as muiIconToDSIcon } from './BasePopper.js';
|
|
2
|
+
export { B as BaseTextField } from './BaseTextField.js';
|
|
3
|
+
//# sourceMappingURL=BaseComponents.js.map
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React__default, { forwardRef } from 'react';
|
|
2
|
+
import { TextField } from '@redsift/design-system';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const BaseTextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5
|
+
const {
|
|
6
|
+
label,
|
|
7
|
+
id,
|
|
8
|
+
value,
|
|
9
|
+
onChange,
|
|
10
|
+
placeholder
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/React__default.createElement(TextField, {
|
|
13
|
+
marginTop: "6px",
|
|
14
|
+
inputRef: ref,
|
|
15
|
+
label: label,
|
|
16
|
+
id: id,
|
|
17
|
+
value: value,
|
|
18
|
+
variant: "underline",
|
|
19
|
+
onChange: (value, name, event) => onChange(event),
|
|
20
|
+
autoFocus: true,
|
|
21
|
+
placeholder: placeholder
|
|
22
|
+
});
|
|
23
|
+
});
|
|
5
24
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const muiIconToDSIcon: Partial<Record<keyof GridSlotsComponent, string>>;
|
|
9
|
-
declare const BaseIcon: React.JSXElementConstructor<any>;
|
|
10
|
-
|
|
11
|
-
declare const BasePopper: React.JSXElementConstructor<any>;
|
|
12
|
-
|
|
13
|
-
declare const BaseTextField: React.JSXElementConstructor<any>;
|
|
14
|
-
|
|
15
|
-
export { BaseButton as B, BaseCheckbox as a, BaseIcon as b, BasePopper as c, BaseTextField as d, muiIconToDSIcon as m };
|
|
25
|
+
export { BaseTextField as B };
|
|
26
|
+
//# sourceMappingURL=BaseTextField.js.map
|
package/_internal/DataGrid.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export { D as DataGrid } from './DataGrid2.js';
|
|
2
|
-
|
|
3
|
-
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel } from '@mui/x-data-grid-pro';
|
|
4
|
-
import '@redsift/design-system';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '@mui/material';
|
|
2
|
+
//# sourceMappingURL=DataGrid.js.map
|
package/_internal/DataGrid2.js
CHANGED
|
@@ -1,6 +1,332 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, a as _extends, _ as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useRef, useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useTheme, ThemeProvider, RedsiftColorBlueN, RedsiftColorNeutralXDarkGrey, RedsiftColorNeutralWhite } from '@redsift/design-system';
|
|
5
|
+
import { useGridApiRef, DataGridPro, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector } from '@mui/x-data-grid-pro';
|
|
6
|
+
import { L as LicenseInfo, G as useControlledDatagridState, T as ThemeProvider$1, J as StyledDataGrid, f as customColumnTypes } from './useControlledDatagridState.js';
|
|
7
|
+
import { T as Toolbar } from './Toolbar2.js';
|
|
8
|
+
import { o as onServerSideSelectionStatusChange, S as ServerSideControlledPagination, C as ControlledPagination } from './ControlledPagination.js';
|
|
9
|
+
import { g as createTheme } from './Portal.js';
|
|
10
|
+
import { B as BaseButton, a as BaseCheckbox, c as BasePopper, b as BaseIcon } from './BasePopper.js';
|
|
11
|
+
import { T as ToolbarWrapper } from './ToolbarWrapper2.js';
|
|
3
12
|
|
|
4
|
-
|
|
13
|
+
const _excluded = ["apiRef", "autoHeight", "className", "columnTypes", "components", "componentsProps", "filterModel", "columnVisibilityModel", "pinnedColumns", "sortModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "onPageChange", "onPageSizeChange", "onColumnVisibilityModelChange", "onPinnedColumnsChange", "onSortModelChange", "selectionModel", "onSelectionModelChange", "page", "pageSize", "pagination", "paginationPlacement", "paginationProps", "rows", "rowsPerPageOptions", "sx", "theme", "paginationMode", "rowCount"];
|
|
14
|
+
const COMPONENT_NAME = 'DataGrid';
|
|
15
|
+
const CLASSNAME = 'redsift-datagrid';
|
|
16
|
+
const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
|
+
const datagridRef = ref || useRef();
|
|
18
|
+
const {
|
|
19
|
+
apiRef: propsApiRef,
|
|
20
|
+
autoHeight,
|
|
21
|
+
className,
|
|
22
|
+
columnTypes: propsColumnTypes,
|
|
23
|
+
components,
|
|
24
|
+
componentsProps,
|
|
25
|
+
filterModel: propsFilterModel,
|
|
26
|
+
columnVisibilityModel: propsColumnVisibilityModel,
|
|
27
|
+
pinnedColumns: propsPinnedColumns,
|
|
28
|
+
sortModel: propsSortModel,
|
|
29
|
+
height: propsHeight,
|
|
30
|
+
hideToolbar,
|
|
31
|
+
initialState,
|
|
32
|
+
isRowSelectable,
|
|
33
|
+
license = process.env.MUI_LICENSE_KEY,
|
|
34
|
+
onFilterModelChange: propsOnFilterModelChange,
|
|
35
|
+
onPageChange: propsOnPageChange,
|
|
36
|
+
onPageSizeChange: propsOnPageSizeChange,
|
|
37
|
+
onColumnVisibilityModelChange: propsOnColumnVisibilityModelChange,
|
|
38
|
+
onPinnedColumnsChange: propsOnPinnedColumnsChange,
|
|
39
|
+
onSortModelChange: propsOnSortModelChange,
|
|
40
|
+
selectionModel: propsSelectionModel,
|
|
41
|
+
onSelectionModelChange: propsOnSelectionModelChange,
|
|
42
|
+
page: propsPage,
|
|
43
|
+
pageSize: propsPageSize,
|
|
44
|
+
pagination,
|
|
45
|
+
paginationPlacement = 'both',
|
|
46
|
+
paginationProps,
|
|
47
|
+
rows,
|
|
48
|
+
rowsPerPageOptions,
|
|
49
|
+
sx,
|
|
50
|
+
theme: propsTheme,
|
|
51
|
+
paginationMode = 'client',
|
|
52
|
+
rowCount
|
|
53
|
+
} = props,
|
|
54
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
55
|
+
const theme = useTheme(propsTheme);
|
|
56
|
+
const _apiRef = useGridApiRef();
|
|
57
|
+
const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
|
|
58
|
+
const RenderedToolbar = components !== null && components !== void 0 && components.Toolbar ? components.Toolbar : Toolbar;
|
|
59
|
+
LicenseInfo.setLicenseKey(license);
|
|
60
|
+
const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
|
|
61
|
+
const {
|
|
62
|
+
columnVisibilityModel,
|
|
63
|
+
filterModel,
|
|
64
|
+
onColumnVisibilityModelChange,
|
|
65
|
+
onFilterModelChange,
|
|
66
|
+
onPageChange,
|
|
67
|
+
onPageSizeChange,
|
|
68
|
+
onPinnedColumnsChange,
|
|
69
|
+
onSortModelChange,
|
|
70
|
+
page,
|
|
71
|
+
pageSize,
|
|
72
|
+
pinnedColumns,
|
|
73
|
+
sortModel
|
|
74
|
+
} = useControlledDatagridState({
|
|
75
|
+
initialState,
|
|
76
|
+
rowsPerPageOptions,
|
|
77
|
+
propsColumnVisibilityModel,
|
|
78
|
+
propsFilterModel,
|
|
79
|
+
propsOnColumnVisibilityModelChange,
|
|
80
|
+
propsOnFilterModelChange,
|
|
81
|
+
propsOnPinnedColumnsChange,
|
|
82
|
+
propsOnSortModelChange,
|
|
83
|
+
propsPage,
|
|
84
|
+
propsPageSize,
|
|
85
|
+
propsPinnedColumns,
|
|
86
|
+
propsSortModel,
|
|
87
|
+
propsOnPageChange,
|
|
88
|
+
propsOnPageSizeChange
|
|
89
|
+
});
|
|
90
|
+
const [selectionModel, setSelectionModel] = useState(propsSelectionModel !== null && propsSelectionModel !== void 0 ? propsSelectionModel : []);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
setSelectionModel(propsSelectionModel !== null && propsSelectionModel !== void 0 ? propsSelectionModel : []);
|
|
93
|
+
}, [propsSelectionModel]);
|
|
94
|
+
const onSelectionModelChange = (selectionModel, details) => {
|
|
95
|
+
if (propsOnSelectionModelChange) {
|
|
96
|
+
propsOnSelectionModelChange(selectionModel, details);
|
|
97
|
+
} else {
|
|
98
|
+
setSelectionModel(selectionModel);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const selectionStatus = useRef({
|
|
102
|
+
type: 'none',
|
|
103
|
+
numberOfSelectedRows: 0,
|
|
104
|
+
numberOfSelectedRowsInPage: 0,
|
|
105
|
+
page,
|
|
106
|
+
pageSize
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// in server-side pagination we want to update the selection status
|
|
110
|
+
// every time we navigate between pages, resize our page or select something
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (paginationMode == 'server') {
|
|
113
|
+
onServerSideSelectionStatusChange(Array.isArray(selectionModel) ? selectionModel : [selectionModel], apiRef, selectionStatus, isRowSelectable, page, pageSize);
|
|
114
|
+
}
|
|
115
|
+
}, [selectionModel, page, pageSize]);
|
|
116
|
+
if (!Array.isArray(rows)) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const muiTheme = useMemo(() => createTheme({
|
|
120
|
+
palette: {
|
|
121
|
+
mode: theme,
|
|
122
|
+
primary: {
|
|
123
|
+
main: RedsiftColorBlueN
|
|
124
|
+
},
|
|
125
|
+
background: {
|
|
126
|
+
default: theme === 'dark' ? RedsiftColorNeutralXDarkGrey : RedsiftColorNeutralWhite,
|
|
127
|
+
paper: theme === 'dark' ? RedsiftColorNeutralXDarkGrey : RedsiftColorNeutralWhite
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}), [theme]);
|
|
131
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
132
|
+
value: {
|
|
133
|
+
theme
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/React__default.createElement(ThemeProvider$1, {
|
|
136
|
+
theme: muiTheme
|
|
137
|
+
}, /*#__PURE__*/React__default.createElement(StyledDataGrid, {
|
|
138
|
+
ref: datagridRef,
|
|
139
|
+
className: classNames(DataGrid.className, className),
|
|
140
|
+
$height: height
|
|
141
|
+
}, /*#__PURE__*/React__default.createElement(DataGridPro, _extends({}, forwardedProps, {
|
|
142
|
+
rowCount: rowCount,
|
|
143
|
+
apiRef: apiRef,
|
|
144
|
+
autoHeight: autoHeight,
|
|
145
|
+
checkboxSelectionVisibleOnly: Boolean(pagination),
|
|
146
|
+
columnTypes: _objectSpread2(_objectSpread2({}, customColumnTypes), propsColumnTypes),
|
|
147
|
+
components: _objectSpread2(_objectSpread2({
|
|
148
|
+
BaseButton,
|
|
149
|
+
BaseCheckbox,
|
|
150
|
+
// BaseTextField,
|
|
151
|
+
BasePopper,
|
|
152
|
+
ColumnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
153
|
+
displayName: "ColumnFilteredIcon"
|
|
154
|
+
})),
|
|
155
|
+
ColumnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
156
|
+
displayName: "ColumnSelectorIcon"
|
|
157
|
+
})),
|
|
158
|
+
ColumnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
159
|
+
displayName: "ColumnSortedAscendingIcon"
|
|
160
|
+
})),
|
|
161
|
+
ColumnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
162
|
+
displayName: "ColumnSortedDescendingIcon"
|
|
163
|
+
})),
|
|
164
|
+
DensityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
165
|
+
displayName: "DensityCompactIcon"
|
|
166
|
+
})),
|
|
167
|
+
DensityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
168
|
+
displayName: "DensityStandardIcon"
|
|
169
|
+
})),
|
|
170
|
+
DensityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
171
|
+
displayName: "DensityComfortableIcon"
|
|
172
|
+
})),
|
|
173
|
+
DetailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
174
|
+
displayName: "DetailPanelCollapseIcon"
|
|
175
|
+
})),
|
|
176
|
+
DetailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
177
|
+
displayName: "DetailPanelExpandIcon"
|
|
178
|
+
})),
|
|
179
|
+
ExportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
|
|
180
|
+
displayName: "ExportIcon"
|
|
181
|
+
})),
|
|
182
|
+
OpenFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({
|
|
183
|
+
displayName: "OpenFilterButtonIcon"
|
|
184
|
+
}, props))
|
|
185
|
+
}, components), {}, {
|
|
186
|
+
Toolbar: ToolbarWrapper,
|
|
187
|
+
Pagination: props => pagination ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, _extends({}, props, {
|
|
188
|
+
displaySelection: false,
|
|
189
|
+
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
190
|
+
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
191
|
+
selectionStatus: selectionStatus.current,
|
|
192
|
+
page: page,
|
|
193
|
+
onPageChange: onPageChange,
|
|
194
|
+
pageSize: pageSize,
|
|
195
|
+
onPageSizeChange: onPageSizeChange,
|
|
196
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
197
|
+
paginationProps: paginationProps,
|
|
198
|
+
paginationMode: paginationMode,
|
|
199
|
+
rowCount: rowCount
|
|
200
|
+
})) : /*#__PURE__*/React__default.createElement(ControlledPagination, _extends({}, props, {
|
|
201
|
+
displaySelection: false,
|
|
202
|
+
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
203
|
+
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
204
|
+
selectionStatus: selectionStatus.current,
|
|
205
|
+
apiRef: apiRef,
|
|
206
|
+
isRowSelectable: isRowSelectable,
|
|
207
|
+
page: page,
|
|
208
|
+
onPageChange: onPageChange,
|
|
209
|
+
pageSize: pageSize,
|
|
210
|
+
onPageSizeChange: onPageSizeChange,
|
|
211
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
212
|
+
paginationProps: paginationProps,
|
|
213
|
+
paginationMode: paginationMode
|
|
214
|
+
})) : null
|
|
215
|
+
}),
|
|
216
|
+
componentsProps: _objectSpread2(_objectSpread2({}, componentsProps), {}, {
|
|
217
|
+
toolbar: _objectSpread2({
|
|
218
|
+
hideToolbar,
|
|
219
|
+
RenderedToolbar,
|
|
220
|
+
filterModel,
|
|
221
|
+
onFilterModelChange,
|
|
222
|
+
pagination,
|
|
223
|
+
paginationPlacement,
|
|
224
|
+
selectionStatus,
|
|
225
|
+
apiRef,
|
|
226
|
+
isRowSelectable,
|
|
227
|
+
page,
|
|
228
|
+
onPageChange,
|
|
229
|
+
pageSize,
|
|
230
|
+
onPageSizeChange,
|
|
231
|
+
rowsPerPageOptions,
|
|
232
|
+
paginationProps,
|
|
233
|
+
paginationMode,
|
|
234
|
+
rowCount
|
|
235
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.toolbar)
|
|
236
|
+
}),
|
|
237
|
+
filterModel: filterModel,
|
|
238
|
+
columnVisibilityModel: columnVisibilityModel,
|
|
239
|
+
pinnedColumns: pinnedColumns,
|
|
240
|
+
sortModel: sortModel,
|
|
241
|
+
initialState: initialState,
|
|
242
|
+
isRowSelectable: isRowSelectable,
|
|
243
|
+
onFilterModelChange: onFilterModelChange,
|
|
244
|
+
onColumnVisibilityModelChange: onColumnVisibilityModelChange,
|
|
245
|
+
onPinnedColumnsChange: onPinnedColumnsChange,
|
|
246
|
+
onSortModelChange: onSortModelChange,
|
|
247
|
+
pagination: pagination,
|
|
248
|
+
paginationMode: paginationMode,
|
|
249
|
+
keepNonExistentRowsSelected: paginationMode == 'server',
|
|
250
|
+
rows: rows,
|
|
251
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
252
|
+
page: page,
|
|
253
|
+
onPageChange: onPageChange,
|
|
254
|
+
pageSize: pageSize,
|
|
255
|
+
onPageSizeChange: onPageSizeChange,
|
|
256
|
+
selectionModel: selectionModel,
|
|
257
|
+
onSelectionModelChange: (newSelectionModel, details) => {
|
|
258
|
+
if (pagination && paginationMode != 'server') {
|
|
259
|
+
const selectableRowsInPage = isRowSelectable ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref => {
|
|
260
|
+
let {
|
|
261
|
+
model
|
|
262
|
+
} = _ref;
|
|
263
|
+
return isRowSelectable({
|
|
264
|
+
row: model
|
|
265
|
+
});
|
|
266
|
+
}).map(_ref2 => {
|
|
267
|
+
let {
|
|
268
|
+
id
|
|
269
|
+
} = _ref2;
|
|
270
|
+
return id;
|
|
271
|
+
}) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
272
|
+
const numberOfSelectableRowsInPage = selectableRowsInPage.length;
|
|
273
|
+
const selectableRowsInTable = isRowSelectable ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref3 => {
|
|
274
|
+
let {
|
|
275
|
+
model
|
|
276
|
+
} = _ref3;
|
|
277
|
+
return isRowSelectable({
|
|
278
|
+
row: model
|
|
279
|
+
});
|
|
280
|
+
}).map(_ref4 => {
|
|
281
|
+
let {
|
|
282
|
+
id
|
|
283
|
+
} = _ref4;
|
|
284
|
+
return id;
|
|
285
|
+
}) : gridFilteredSortedRowIdsSelector(apiRef);
|
|
286
|
+
const numberOfSelectableRowsInTable = selectableRowsInTable.length;
|
|
287
|
+
const numberOfSelectedRows = newSelectionModel.length;
|
|
288
|
+
if (selectionStatus.current.type === 'table' && numberOfSelectedRows === numberOfSelectableRowsInTable - numberOfSelectableRowsInPage || selectionStatus.current.type === 'table' && numberOfSelectedRows === numberOfSelectableRowsInTable || selectionStatus.current.type === 'page' && numberOfSelectedRows === numberOfSelectableRowsInPage) {
|
|
289
|
+
setTimeout(() => {
|
|
290
|
+
apiRef.current.selectRows([], true, true);
|
|
291
|
+
}, 0);
|
|
292
|
+
}
|
|
293
|
+
if (numberOfSelectedRows === numberOfSelectableRowsInPage && numberOfSelectableRowsInPage < numberOfSelectableRowsInTable) {
|
|
294
|
+
selectionStatus.current = {
|
|
295
|
+
type: 'page',
|
|
296
|
+
numberOfSelectedRows
|
|
297
|
+
};
|
|
298
|
+
} else if (numberOfSelectedRows === numberOfSelectableRowsInTable && numberOfSelectableRowsInPage < numberOfSelectableRowsInTable) {
|
|
299
|
+
selectionStatus.current = {
|
|
300
|
+
type: 'table',
|
|
301
|
+
numberOfSelectedRows
|
|
302
|
+
};
|
|
303
|
+
} else if (numberOfSelectedRows > 0) {
|
|
304
|
+
selectionStatus.current = {
|
|
305
|
+
type: 'other',
|
|
306
|
+
numberOfSelectedRows
|
|
307
|
+
};
|
|
308
|
+
} else {
|
|
309
|
+
selectionStatus.current = {
|
|
310
|
+
type: 'none',
|
|
311
|
+
numberOfSelectedRows
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
onSelectionModelChange === null || onSelectionModelChange === void 0 ? void 0 : onSelectionModelChange(newSelectionModel, details);
|
|
316
|
+
},
|
|
317
|
+
sx: _objectSpread2(_objectSpread2({}, sx), {}, {
|
|
318
|
+
'.MuiDataGrid-columnHeaders': {
|
|
319
|
+
flexDirection: 'column',
|
|
320
|
+
alignItems: 'normal'
|
|
321
|
+
},
|
|
322
|
+
'.MuiDataGrid-selectedRowCount': {
|
|
323
|
+
margin: 'none'
|
|
324
|
+
}
|
|
325
|
+
})
|
|
326
|
+
})))));
|
|
327
|
+
});
|
|
328
|
+
DataGrid.className = CLASSNAME;
|
|
329
|
+
DataGrid.displayName = COMPONENT_NAME;
|
|
5
330
|
|
|
6
331
|
export { DataGrid as D };
|
|
332
|
+
//# sourceMappingURL=DataGrid2.js.map
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
export { D as DEFAULT_OPERATORS, G as GridToolbarFilterSemanticField } from './GridToolbarFilterSemanticField2.js';
|
|
2
|
-
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import '@mui/x-data-grid-pro';
|
|
5
|
-
import 'react';
|
|
2
|
+
//# sourceMappingURL=GridToolbarFilterSemanticField.js.map
|