@redsift/table 9.2.2-muiv5 → 9.2.2

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/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
2
  import { GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputMultipleValue, DataGridProProps, GridToolbarExportProps, GridToolbarFilterButtonProps, GridFilterModel, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
3
- export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
3
+ export * from '@mui/x-data-grid-pro';
4
+ export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
4
5
  import { Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
5
6
  import React, { ReactNode, RefObject, ComponentProps } from 'react';
6
7
  import { TablePaginationProps } from '@mui/material';
@@ -10,7 +11,7 @@ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any,
10
11
  declare const IS_BETWEEN: {
11
12
  label: string;
12
13
  value: string;
13
- getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
14
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
14
15
  InputComponent: (props: any) => JSX.Element;
15
16
  };
16
17
 
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
- import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridNumericOperators as getGridNumericOperators$1, GridFilterInputMultipleValue, getGridStringOperators as getGridStringOperators$1, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridVisibleSortedRowIdsSelector, useGridApiRef, DataGridPro, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector } from '@mui/x-data-grid-pro';
1
+ import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridNumericOperators as getGridNumericOperators$1, GridFilterInputMultipleValue, getGridStringOperators as getGridStringOperators$1, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridExpandedSortedRowIdsSelector, useGridApiRef, DataGridPro, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector } from '@mui/x-data-grid-pro';
2
+ export * from '@mui/x-data-grid-pro';
2
3
  export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
3
4
  import * as React from 'react';
4
5
  import React__default, { Children, isValidElement, cloneElement, useLayoutEffect, useEffect, useRef, forwardRef, useState, useCallback, createElement } from 'react';
@@ -17466,7 +17467,7 @@ const isBetweenOperator = {
17466
17467
  label: 'is between',
17467
17468
  value: 'isBetween',
17468
17469
  getApplyFilterFn: filterItem => {
17469
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17470
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17470
17471
  return null;
17471
17472
  }
17472
17473
  if (!Array.isArray(filterItem.value) || filterItem.value.length !== 2) {
@@ -17479,7 +17480,7 @@ const isBetweenOperator = {
17479
17480
  return null;
17480
17481
  }
17481
17482
  return params => {
17482
- return params.value !== null && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
17483
+ return params.value !== null && params.value !== undefined && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
17483
17484
  };
17484
17485
  },
17485
17486
  InputComponent: InputNumberInterval
@@ -17492,7 +17493,7 @@ const containsAnyOfOperator = {
17492
17493
  label: 'contains any of',
17493
17494
  value: 'containsAnyOf',
17494
17495
  getApplyFilterFn: filterItem => {
17495
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17496
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17496
17497
  return null;
17497
17498
  }
17498
17499
  return params => {
@@ -17517,7 +17518,7 @@ const endsWithAnyOfOperator = {
17517
17518
  label: 'ends with any of',
17518
17519
  value: 'endsWithAnyOf',
17519
17520
  getApplyFilterFn: filterItem => {
17520
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17521
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17521
17522
  return null;
17522
17523
  }
17523
17524
  return params => {
@@ -17544,7 +17545,7 @@ const isAnyOfOperator = {
17544
17545
  label: 'is any of',
17545
17546
  value: 'isAnyOf',
17546
17547
  getApplyFilterFn: filterItem => {
17547
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17548
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17548
17549
  return null;
17549
17550
  }
17550
17551
  return params => {
@@ -17568,7 +17569,7 @@ const isNotAnyOfOperator = {
17568
17569
  label: 'is not any of',
17569
17570
  value: 'isNotAnyOf',
17570
17571
  getApplyFilterFn: filterItem => {
17571
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17572
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17572
17573
  return null;
17573
17574
  }
17574
17575
  return params => {
@@ -17592,7 +17593,7 @@ const startsWithAnyOfOperator = {
17592
17593
  label: 'starts with any of',
17593
17594
  value: 'startsWithAnyOf',
17594
17595
  getApplyFilterFn: filterItem => {
17595
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17596
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17596
17597
  return null;
17597
17598
  }
17598
17599
  return params => {
@@ -21709,7 +21710,7 @@ const Toolbar$2 = props => {
21709
21710
  let {
21710
21711
  apiRef
21711
21712
  } = _ref;
21712
- return gridVisibleSortedRowIdsSelector(apiRef);
21713
+ return gridExpandedSortedRowIdsSelector(apiRef);
21713
21714
  }
21714
21715
  },
21715
21716
  printOptions: {
@@ -24164,7 +24165,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
24164
24165
  } : void 0;
24165
24166
  var TablePagination$1 = TablePagination;
24166
24167
 
24167
- const _excluded$1 = ["apiRef", "autoHeight", "className", "components", "componentsProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "onPageChange", "onPageSizeChange", "onSelectionModelChange", "page", "pageSize", "pagination", "paginationPlacement", "paginationProps", "rows", "rowsPerPageOptions", "sx"];
24168
+ const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx"];
24168
24169
  const COMPONENT_NAME$1 = 'DataGrid';
24169
24170
  const CLASSNAME$1 = 'redsift-datagrid';
24170
24171
  const DEFAULT_PROPS = {
@@ -24193,11 +24194,9 @@ const ControlledPagination = _ref3 => {
24193
24194
  displayPagination = false,
24194
24195
  selectionStatus,
24195
24196
  apiRef,
24196
- page,
24197
- onPageChange,
24198
- pageSize,
24199
- onPageSizeChange,
24200
- rowsPerPageOptions,
24197
+ paginationModel,
24198
+ onPaginationModelChange,
24199
+ pageSizeOptions,
24201
24200
  isRowSelectable,
24202
24201
  paginationProps
24203
24202
  } = _ref3;
@@ -24227,24 +24226,28 @@ const ControlledPagination = _ref3 => {
24227
24226
  }, `${selectionStatus.numberOfSelectedRows} row${selectionStatus.numberOfSelectedRows > 1 ? 's' : ''} selected`) : /*#__PURE__*/React__default.createElement(Text, null)) : null, displayPagination ? /*#__PURE__*/React__default.createElement(TablePagination$1, _extends$2({
24228
24227
  component: "div",
24229
24228
  count: numberOfFilteredRowsInTable,
24230
- page: page,
24231
- onPageChange: (event, newPage) => onPageChange(newPage),
24232
- rowsPerPage: pageSize,
24233
- onRowsPerPageChange: event => {
24234
- onPageSizeChange(parseInt(event.target.value, 10));
24235
- },
24236
- rowsPerPageOptions: displayRowsPerPage ? rowsPerPageOptions : []
24229
+ page: paginationModel.page,
24230
+ onPageChange: (event, page) => onPaginationModelChange({
24231
+ page,
24232
+ pageSize: paginationModel.pageSize
24233
+ }),
24234
+ rowsPerPage: paginationModel.pageSize,
24235
+ onRowsPerPageChange: event => onPaginationModelChange({
24236
+ page: paginationModel.page,
24237
+ pageSize: parseInt(event.target.value, 10)
24238
+ }),
24239
+ rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
24237
24240
  }, paginationProps)) : null);
24238
24241
  };
24239
24242
  const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24240
- var _initialState$paginat, _initialState$paginat2;
24243
+ var _ref4, _ref5, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _pageSizeOptions$, _ref6, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6;
24241
24244
  const datagridRef = ref || useRef();
24242
24245
  const {
24243
24246
  apiRef: propsApiRef,
24244
24247
  autoHeight,
24245
24248
  className,
24246
- components,
24247
- componentsProps,
24249
+ slots,
24250
+ slotProps,
24248
24251
  filterModel: propsFilterModel,
24249
24252
  height: propsHeight,
24250
24253
  hideToolbar,
@@ -24252,22 +24255,20 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24252
24255
  isRowSelectable,
24253
24256
  license,
24254
24257
  onFilterModelChange: propsOnFilterModelChange,
24255
- onPageChange: propsOnPageChange,
24256
- onPageSizeChange: propsOnPageSizeChange,
24257
- onSelectionModelChange,
24258
- page: propsPage,
24259
- pageSize: propsPageSize,
24258
+ paginationModel: propsPaginationModel,
24259
+ onPaginationModelChange: propsOnPaginationModelChange,
24260
+ onRowSelectionModelChange,
24260
24261
  pagination,
24261
24262
  paginationPlacement,
24262
24263
  paginationProps,
24263
24264
  rows,
24264
- rowsPerPageOptions,
24265
+ pageSizeOptions,
24265
24266
  sx
24266
24267
  } = props,
24267
24268
  forwardedProps = _objectWithoutProperties(props, _excluded$1);
24268
24269
  const _apiRef = useGridApiRef();
24269
24270
  const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
24270
- const RenderedToolbar = components !== null && components !== void 0 && components.Toolbar ? components.Toolbar : Toolbar$2;
24271
+ const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
24271
24272
  LicenseInfo.setLicenseKey(license);
24272
24273
  const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
24273
24274
  const selectionStatus = useRef({
@@ -24285,33 +24286,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24285
24286
  setFilterModel(model);
24286
24287
  }
24287
24288
  };
24288
- const [page, setPage] = React__default.useState((initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat = initialState.pagination) === null || _initialState$paginat === void 0 ? void 0 : _initialState$paginat.page) || propsPage || 0);
24289
- const [pageSize, setPageSize] = React__default.useState((initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat2 = initialState.pagination) === null || _initialState$paginat2 === void 0 ? void 0 : _initialState$paginat2.pageSize) || propsPageSize || (rowsPerPageOptions === null || rowsPerPageOptions === void 0 ? void 0 : rowsPerPageOptions[0]) || 100);
24290
- const onPageChange = page => {
24291
- if (propsOnPageChange) {
24292
- propsOnPageChange(page, undefined);
24293
- } else {
24294
- setPage(page);
24295
- }
24296
- };
24297
- useEffect(() => {
24298
- if (propsPage || propsPage === 0) {
24299
- setPage(propsPage);
24300
- }
24301
- }, [propsPage]);
24302
- const onPageSizeChange = pageSize => {
24303
- onPageChange(0);
24304
- if (propsOnPageSizeChange) {
24305
- propsOnPageSizeChange(pageSize, undefined);
24289
+ const [paginationModel, setPaginationModel] = useState({
24290
+ pageSize: (_ref4 = (_ref5 = (_initialState$paginat = initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat2 = initialState.pagination) === null || _initialState$paginat2 === void 0 ? void 0 : (_initialState$paginat3 = _initialState$paginat2.paginationModel) === null || _initialState$paginat3 === void 0 ? void 0 : _initialState$paginat3.pageSize) !== null && _initialState$paginat !== void 0 ? _initialState$paginat : propsPaginationModel === null || propsPaginationModel === void 0 ? void 0 : propsPaginationModel.pageSize) !== null && _ref5 !== void 0 ? _ref5 : typeof (pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : pageSizeOptions[0]) === 'number' ? pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : pageSizeOptions[0] : pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : (_pageSizeOptions$ = pageSizeOptions[0]) === null || _pageSizeOptions$ === void 0 ? void 0 : _pageSizeOptions$.value) !== null && _ref4 !== void 0 ? _ref4 : 100,
24291
+ page: (_ref6 = (_initialState$paginat4 = initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat5 = initialState.pagination) === null || _initialState$paginat5 === void 0 ? void 0 : (_initialState$paginat6 = _initialState$paginat5.paginationModel) === null || _initialState$paginat6 === void 0 ? void 0 : _initialState$paginat6.page) !== null && _initialState$paginat4 !== void 0 ? _initialState$paginat4 : propsPaginationModel === null || propsPaginationModel === void 0 ? void 0 : propsPaginationModel.page) !== null && _ref6 !== void 0 ? _ref6 : 0
24292
+ });
24293
+ const onPaginationModelChange = model => {
24294
+ if (propsOnPaginationModelChange) {
24295
+ propsOnPaginationModelChange(model, undefined);
24306
24296
  } else {
24307
- setPageSize(pageSize);
24297
+ setPaginationModel(model);
24308
24298
  }
24309
24299
  };
24310
24300
  useEffect(() => {
24311
- if (propsPageSize) {
24312
- setPageSize(propsPageSize);
24301
+ if (propsPaginationModel) {
24302
+ setPaginationModel(propsPaginationModel);
24313
24303
  }
24314
- }, [propsPageSize]);
24304
+ }, [propsPaginationModel]);
24315
24305
  if (!Array.isArray(rows)) {
24316
24306
  return null;
24317
24307
  }
@@ -24323,46 +24313,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24323
24313
  apiRef: apiRef,
24324
24314
  autoHeight: autoHeight,
24325
24315
  checkboxSelectionVisibleOnly: Boolean(pagination),
24326
- components: _objectSpread2(_objectSpread2({
24327
- BaseButton,
24328
- BaseCheckbox,
24329
- // BaseTextField,
24330
- BasePopper,
24331
- ColumnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24316
+ slots: _objectSpread2(_objectSpread2({
24317
+ baseButton: BaseButton,
24318
+ baseCheckbox: BaseCheckbox,
24319
+ // baseTextField,
24320
+ basePopper: BasePopper,
24321
+ columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24332
24322
  displayName: "ColumnFilteredIcon"
24333
24323
  })),
24334
- ColumnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24324
+ columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24335
24325
  displayName: "ColumnSelectorIcon"
24336
24326
  })),
24337
- ColumnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24327
+ columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24338
24328
  displayName: "ColumnSortedAscendingIcon"
24339
24329
  })),
24340
- ColumnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24330
+ columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24341
24331
  displayName: "ColumnSortedDescendingIcon"
24342
24332
  })),
24343
- DensityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24333
+ densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24344
24334
  displayName: "DensityCompactIcon"
24345
24335
  })),
24346
- DensityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24336
+ densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24347
24337
  displayName: "DensityStandardIcon"
24348
24338
  })),
24349
- DensityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24339
+ densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24350
24340
  displayName: "DensityComfortableIcon"
24351
24341
  })),
24352
- DetailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24342
+ detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24353
24343
  displayName: "DetailPanelCollapseIcon"
24354
24344
  })),
24355
- DetailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24345
+ detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24356
24346
  displayName: "DetailPanelExpandIcon"
24357
24347
  })),
24358
- ExportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24348
+ exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24359
24349
  displayName: "ExportIcon"
24360
24350
  })),
24361
- OpenFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24351
+ openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24362
24352
  displayName: "OpenFilterButtonIcon"
24363
24353
  }, props))
24364
- }, components), {}, {
24365
- Toolbar: props => {
24354
+ }, slots), {}, {
24355
+ toolbar: props => {
24366
24356
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
24367
24357
  filterModel: filterModel,
24368
24358
  onFilterModelChange: onFilterModelChange
@@ -24373,31 +24363,27 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24373
24363
  selectionStatus: selectionStatus.current,
24374
24364
  apiRef: apiRef,
24375
24365
  isRowSelectable: isRowSelectable,
24376
- page: page,
24377
- onPageChange: onPageChange,
24378
- pageSize: pageSize,
24379
- onPageSizeChange: onPageSizeChange,
24380
- rowsPerPageOptions: rowsPerPageOptions,
24366
+ paginationModel: paginationModel,
24367
+ onPaginationModelChange: onPaginationModelChange,
24368
+ pageSizeOptions: pageSizeOptions,
24381
24369
  paginationProps: paginationProps
24382
24370
  }) : null);
24383
24371
  },
24384
- Pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
24372
+ pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
24385
24373
  displaySelection: false,
24386
24374
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
24387
24375
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
24388
24376
  selectionStatus: selectionStatus.current,
24389
24377
  apiRef: apiRef,
24390
24378
  isRowSelectable: isRowSelectable,
24391
- page: page,
24392
- onPageChange: onPageChange,
24393
- pageSize: pageSize,
24394
- onPageSizeChange: onPageSizeChange,
24395
- rowsPerPageOptions: rowsPerPageOptions,
24379
+ paginationModel: paginationModel,
24380
+ onPaginationModelChange: onPaginationModelChange,
24381
+ pageSizeOptions: pageSizeOptions,
24396
24382
  paginationProps: paginationProps
24397
24383
  })) : null
24398
24384
  }),
24399
- componentsProps: _objectSpread2(_objectSpread2({}, componentsProps), {}, {
24400
- toolbar: _objectSpread2({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.toolbar)
24385
+ slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
24386
+ toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
24401
24387
  }),
24402
24388
  filterModel: filterModel,
24403
24389
  initialState: initialState,
@@ -24405,40 +24391,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24405
24391
  onFilterModelChange: onFilterModelChange,
24406
24392
  pagination: pagination,
24407
24393
  rows: rows,
24408
- rowsPerPageOptions: rowsPerPageOptions,
24409
- page: page,
24410
- onPageChange: onPageChange,
24411
- pageSize: pageSize,
24412
- onPageSizeChange: onPageSizeChange,
24413
- onSelectionModelChange: (newSelectionModel, details) => {
24394
+ pageSizeOptions: pageSizeOptions,
24395
+ paginationModel: paginationModel,
24396
+ onPaginationModelChange: onPaginationModelChange,
24397
+ onRowSelectionModelChange: (newSelectionModel, details) => {
24414
24398
  if (pagination) {
24415
- const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref4 => {
24399
+ const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref7 => {
24416
24400
  var _props$isRowSelectabl;
24417
24401
  let {
24418
24402
  model
24419
- } = _ref4;
24403
+ } = _ref7;
24420
24404
  return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
24421
24405
  row: model
24422
24406
  });
24423
- }).map(_ref5 => {
24407
+ }).map(_ref8 => {
24424
24408
  let {
24425
24409
  id
24426
- } = _ref5;
24410
+ } = _ref8;
24427
24411
  return id;
24428
24412
  }) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
24429
24413
  const numberOfSelectableRowsInPage = selectableRowsInPage.length;
24430
- const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref6 => {
24414
+ const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref9 => {
24431
24415
  var _props$isRowSelectabl2;
24432
24416
  let {
24433
24417
  model
24434
- } = _ref6;
24418
+ } = _ref9;
24435
24419
  return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
24436
24420
  row: model
24437
24421
  });
24438
- }).map(_ref7 => {
24422
+ }).map(_ref10 => {
24439
24423
  let {
24440
24424
  id
24441
- } = _ref7;
24425
+ } = _ref10;
24442
24426
  return id;
24443
24427
  }) : gridFilteredSortedRowIdsSelector(apiRef);
24444
24428
  const numberOfSelectableRowsInTable = selectableRowsInTable.length;
@@ -24470,7 +24454,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24470
24454
  };
24471
24455
  }
24472
24456
  }
24473
- onSelectionModelChange === null || onSelectionModelChange === void 0 ? void 0 : onSelectionModelChange(newSelectionModel, details);
24457
+ onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
24474
24458
  },
24475
24459
  sx: _objectSpread2(_objectSpread2({}, sx), {}, {
24476
24460
  '.MuiDataGrid-columnHeaders': {