@redsift/table 9.3.2-muiv5 → 9.3.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, GridFilterModel, GridToolbarExportProps, GridToolbarFilterButtonProps, 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, ComponentProps, RefObject } 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 => {
@@ -17515,7 +17516,7 @@ const containsAnyOfCIOperator = {
17515
17516
  label: 'contains any of (case insensitive)',
17516
17517
  value: 'containsAnyOf',
17517
17518
  getApplyFilterFn: filterItem => {
17518
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17519
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17519
17520
  return null;
17520
17521
  }
17521
17522
  return params => {
@@ -17542,7 +17543,7 @@ const endsWithAnyOfOperator = {
17542
17543
  label: 'ends with any of',
17543
17544
  value: 'endsWithAnyOf',
17544
17545
  getApplyFilterFn: filterItem => {
17545
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17546
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17546
17547
  return null;
17547
17548
  }
17548
17549
  return params => {
@@ -17569,7 +17570,7 @@ const isAnyOfOperator = {
17569
17570
  label: 'is any of',
17570
17571
  value: 'isAnyOf',
17571
17572
  getApplyFilterFn: filterItem => {
17572
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17573
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17573
17574
  return null;
17574
17575
  }
17575
17576
  return params => {
@@ -17593,7 +17594,7 @@ const isNotAnyOfOperator = {
17593
17594
  label: 'is not any of',
17594
17595
  value: 'isNotAnyOf',
17595
17596
  getApplyFilterFn: filterItem => {
17596
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17597
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17597
17598
  return null;
17598
17599
  }
17599
17600
  return params => {
@@ -17617,7 +17618,7 @@ const startsWithAnyOfOperator = {
17617
17618
  label: 'starts with any of',
17618
17619
  value: 'startsWithAnyOf',
17619
17620
  getApplyFilterFn: filterItem => {
17620
- if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
17621
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17621
17622
  return null;
17622
17623
  }
17623
17624
  return params => {
@@ -21884,7 +21885,7 @@ const Toolbar$2 = props => {
21884
21885
  let {
21885
21886
  apiRef
21886
21887
  } = _ref;
21887
- return gridVisibleSortedRowIdsSelector(apiRef);
21888
+ return gridExpandedSortedRowIdsSelector(apiRef);
21888
21889
  }
21889
21890
  },
21890
21891
  printOptions: {
@@ -24339,7 +24340,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
24339
24340
  } : void 0;
24340
24341
  var TablePagination$1 = TablePagination;
24341
24342
 
24342
- 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"];
24343
+ const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx"];
24343
24344
  const COMPONENT_NAME$1 = 'DataGrid';
24344
24345
  const CLASSNAME$1 = 'redsift-datagrid';
24345
24346
  const DEFAULT_PROPS = {
@@ -24368,11 +24369,9 @@ const ControlledPagination = _ref3 => {
24368
24369
  displayPagination = false,
24369
24370
  selectionStatus,
24370
24371
  apiRef,
24371
- page,
24372
- onPageChange,
24373
- pageSize,
24374
- onPageSizeChange,
24375
- rowsPerPageOptions,
24372
+ paginationModel,
24373
+ onPaginationModelChange,
24374
+ pageSizeOptions,
24376
24375
  isRowSelectable,
24377
24376
  paginationProps
24378
24377
  } = _ref3;
@@ -24402,24 +24401,28 @@ const ControlledPagination = _ref3 => {
24402
24401
  }, `${selectionStatus.numberOfSelectedRows} row${selectionStatus.numberOfSelectedRows > 1 ? 's' : ''} selected`) : /*#__PURE__*/React__default.createElement(Text, null)) : null, displayPagination ? /*#__PURE__*/React__default.createElement(TablePagination$1, _extends$2({
24403
24402
  component: "div",
24404
24403
  count: numberOfFilteredRowsInTable,
24405
- page: page,
24406
- onPageChange: (event, newPage) => onPageChange(newPage),
24407
- rowsPerPage: pageSize,
24408
- onRowsPerPageChange: event => {
24409
- onPageSizeChange(parseInt(event.target.value, 10));
24410
- },
24411
- rowsPerPageOptions: displayRowsPerPage ? rowsPerPageOptions : []
24404
+ page: paginationModel.page,
24405
+ onPageChange: (event, page) => onPaginationModelChange({
24406
+ page,
24407
+ pageSize: paginationModel.pageSize
24408
+ }),
24409
+ rowsPerPage: paginationModel.pageSize,
24410
+ onRowsPerPageChange: event => onPaginationModelChange({
24411
+ page: paginationModel.page,
24412
+ pageSize: parseInt(event.target.value, 10)
24413
+ }),
24414
+ rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
24412
24415
  }, paginationProps)) : null);
24413
24416
  };
24414
24417
  const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24415
- var _initialState$paginat, _initialState$paginat2;
24418
+ var _ref4, _ref5, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _pageSizeOptions$, _ref6, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6;
24416
24419
  const datagridRef = ref || useRef();
24417
24420
  const {
24418
24421
  apiRef: propsApiRef,
24419
24422
  autoHeight,
24420
24423
  className,
24421
- components,
24422
- componentsProps,
24424
+ slots,
24425
+ slotProps,
24423
24426
  filterModel: propsFilterModel,
24424
24427
  height: propsHeight,
24425
24428
  hideToolbar,
@@ -24427,22 +24430,20 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24427
24430
  isRowSelectable,
24428
24431
  license,
24429
24432
  onFilterModelChange: propsOnFilterModelChange,
24430
- onPageChange: propsOnPageChange,
24431
- onPageSizeChange: propsOnPageSizeChange,
24432
- onSelectionModelChange,
24433
- page: propsPage,
24434
- pageSize: propsPageSize,
24433
+ paginationModel: propsPaginationModel,
24434
+ onPaginationModelChange: propsOnPaginationModelChange,
24435
+ onRowSelectionModelChange,
24435
24436
  pagination,
24436
24437
  paginationPlacement,
24437
24438
  paginationProps,
24438
24439
  rows,
24439
- rowsPerPageOptions,
24440
+ pageSizeOptions,
24440
24441
  sx
24441
24442
  } = props,
24442
24443
  forwardedProps = _objectWithoutProperties(props, _excluded$1);
24443
24444
  const _apiRef = useGridApiRef();
24444
24445
  const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
24445
- const RenderedToolbar = components !== null && components !== void 0 && components.Toolbar ? components.Toolbar : Toolbar$2;
24446
+ const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
24446
24447
  LicenseInfo.setLicenseKey(license);
24447
24448
  const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
24448
24449
  const selectionStatus = useRef({
@@ -24460,33 +24461,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24460
24461
  setFilterModel(model);
24461
24462
  }
24462
24463
  };
24463
- 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);
24464
- 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);
24465
- const onPageChange = page => {
24466
- if (propsOnPageChange) {
24467
- propsOnPageChange(page, undefined);
24468
- } else {
24469
- setPage(page);
24470
- }
24471
- };
24472
- useEffect(() => {
24473
- if (propsPage || propsPage === 0) {
24474
- setPage(propsPage);
24475
- }
24476
- }, [propsPage]);
24477
- const onPageSizeChange = pageSize => {
24478
- onPageChange(0);
24479
- if (propsOnPageSizeChange) {
24480
- propsOnPageSizeChange(pageSize, undefined);
24464
+ const [paginationModel, setPaginationModel] = useState({
24465
+ 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,
24466
+ 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
24467
+ });
24468
+ const onPaginationModelChange = model => {
24469
+ if (propsOnPaginationModelChange) {
24470
+ propsOnPaginationModelChange(model, undefined);
24481
24471
  } else {
24482
- setPageSize(pageSize);
24472
+ setPaginationModel(model);
24483
24473
  }
24484
24474
  };
24485
24475
  useEffect(() => {
24486
- if (propsPageSize) {
24487
- setPageSize(propsPageSize);
24476
+ if (propsPaginationModel) {
24477
+ setPaginationModel(propsPaginationModel);
24488
24478
  }
24489
- }, [propsPageSize]);
24479
+ }, [propsPaginationModel]);
24490
24480
  if (!Array.isArray(rows)) {
24491
24481
  return null;
24492
24482
  }
@@ -24498,46 +24488,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24498
24488
  apiRef: apiRef,
24499
24489
  autoHeight: autoHeight,
24500
24490
  checkboxSelectionVisibleOnly: Boolean(pagination),
24501
- components: _objectSpread2(_objectSpread2({
24502
- BaseButton,
24503
- BaseCheckbox,
24504
- // BaseTextField,
24505
- BasePopper,
24506
- ColumnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24491
+ slots: _objectSpread2(_objectSpread2({
24492
+ baseButton: BaseButton,
24493
+ baseCheckbox: BaseCheckbox,
24494
+ // baseTextField,
24495
+ basePopper: BasePopper,
24496
+ columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24507
24497
  displayName: "ColumnFilteredIcon"
24508
24498
  })),
24509
- ColumnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24499
+ columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24510
24500
  displayName: "ColumnSelectorIcon"
24511
24501
  })),
24512
- ColumnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24502
+ columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24513
24503
  displayName: "ColumnSortedAscendingIcon"
24514
24504
  })),
24515
- ColumnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24505
+ columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24516
24506
  displayName: "ColumnSortedDescendingIcon"
24517
24507
  })),
24518
- DensityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24508
+ densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24519
24509
  displayName: "DensityCompactIcon"
24520
24510
  })),
24521
- DensityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24511
+ densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24522
24512
  displayName: "DensityStandardIcon"
24523
24513
  })),
24524
- DensityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24514
+ densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24525
24515
  displayName: "DensityComfortableIcon"
24526
24516
  })),
24527
- DetailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24517
+ detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24528
24518
  displayName: "DetailPanelCollapseIcon"
24529
24519
  })),
24530
- DetailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24520
+ detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24531
24521
  displayName: "DetailPanelExpandIcon"
24532
24522
  })),
24533
- ExportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24523
+ exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24534
24524
  displayName: "ExportIcon"
24535
24525
  })),
24536
- OpenFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24526
+ openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24537
24527
  displayName: "OpenFilterButtonIcon"
24538
24528
  }, props))
24539
- }, components), {}, {
24540
- Toolbar: props => {
24529
+ }, slots), {}, {
24530
+ toolbar: props => {
24541
24531
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
24542
24532
  filterModel: filterModel,
24543
24533
  onFilterModelChange: onFilterModelChange
@@ -24548,31 +24538,27 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24548
24538
  selectionStatus: selectionStatus.current,
24549
24539
  apiRef: apiRef,
24550
24540
  isRowSelectable: isRowSelectable,
24551
- page: page,
24552
- onPageChange: onPageChange,
24553
- pageSize: pageSize,
24554
- onPageSizeChange: onPageSizeChange,
24555
- rowsPerPageOptions: rowsPerPageOptions,
24541
+ paginationModel: paginationModel,
24542
+ onPaginationModelChange: onPaginationModelChange,
24543
+ pageSizeOptions: pageSizeOptions,
24556
24544
  paginationProps: paginationProps
24557
24545
  }) : null);
24558
24546
  },
24559
- Pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
24547
+ pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
24560
24548
  displaySelection: false,
24561
24549
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
24562
24550
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
24563
24551
  selectionStatus: selectionStatus.current,
24564
24552
  apiRef: apiRef,
24565
24553
  isRowSelectable: isRowSelectable,
24566
- page: page,
24567
- onPageChange: onPageChange,
24568
- pageSize: pageSize,
24569
- onPageSizeChange: onPageSizeChange,
24570
- rowsPerPageOptions: rowsPerPageOptions,
24554
+ paginationModel: paginationModel,
24555
+ onPaginationModelChange: onPaginationModelChange,
24556
+ pageSizeOptions: pageSizeOptions,
24571
24557
  paginationProps: paginationProps
24572
24558
  })) : null
24573
24559
  }),
24574
- componentsProps: _objectSpread2(_objectSpread2({}, componentsProps), {}, {
24575
- toolbar: _objectSpread2({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.toolbar)
24560
+ slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
24561
+ toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
24576
24562
  }),
24577
24563
  filterModel: filterModel,
24578
24564
  initialState: initialState,
@@ -24580,40 +24566,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24580
24566
  onFilterModelChange: onFilterModelChange,
24581
24567
  pagination: pagination,
24582
24568
  rows: rows,
24583
- rowsPerPageOptions: rowsPerPageOptions,
24584
- page: page,
24585
- onPageChange: onPageChange,
24586
- pageSize: pageSize,
24587
- onPageSizeChange: onPageSizeChange,
24588
- onSelectionModelChange: (newSelectionModel, details) => {
24569
+ pageSizeOptions: pageSizeOptions,
24570
+ paginationModel: paginationModel,
24571
+ onPaginationModelChange: onPaginationModelChange,
24572
+ onRowSelectionModelChange: (newSelectionModel, details) => {
24589
24573
  if (pagination) {
24590
- const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref4 => {
24574
+ const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref7 => {
24591
24575
  var _props$isRowSelectabl;
24592
24576
  let {
24593
24577
  model
24594
- } = _ref4;
24578
+ } = _ref7;
24595
24579
  return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
24596
24580
  row: model
24597
24581
  });
24598
- }).map(_ref5 => {
24582
+ }).map(_ref8 => {
24599
24583
  let {
24600
24584
  id
24601
- } = _ref5;
24585
+ } = _ref8;
24602
24586
  return id;
24603
24587
  }) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
24604
24588
  const numberOfSelectableRowsInPage = selectableRowsInPage.length;
24605
- const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref6 => {
24589
+ const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref9 => {
24606
24590
  var _props$isRowSelectabl2;
24607
24591
  let {
24608
24592
  model
24609
- } = _ref6;
24593
+ } = _ref9;
24610
24594
  return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
24611
24595
  row: model
24612
24596
  });
24613
- }).map(_ref7 => {
24597
+ }).map(_ref10 => {
24614
24598
  let {
24615
24599
  id
24616
- } = _ref7;
24600
+ } = _ref10;
24617
24601
  return id;
24618
24602
  }) : gridFilteredSortedRowIdsSelector(apiRef);
24619
24603
  const numberOfSelectableRowsInTable = selectableRowsInTable.length;
@@ -24645,7 +24629,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24645
24629
  };
24646
24630
  }
24647
24631
  }
24648
- onSelectionModelChange === null || onSelectionModelChange === void 0 ? void 0 : onSelectionModelChange(newSelectionModel, details);
24632
+ onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
24649
24633
  },
24650
24634
  sx: _objectSpread2(_objectSpread2({}, sx), {}, {
24651
24635
  '.MuiDataGrid-columnHeaders': {