@redsift/table 9.2.1-muiv5 → 9.2.1

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
 
@@ -9,7 +10,7 @@ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any,
9
10
  declare const IS_BETWEEN: {
10
11
  label: string;
11
12
  value: string;
12
- getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
13
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
13
14
  InputComponent: (props: any) => JSX.Element;
14
15
  };
15
16
 
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: {
@@ -24165,7 +24166,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
24165
24166
  } : void 0;
24166
24167
  var TablePagination$1 = TablePagination;
24167
24168
 
24168
- const _excluded$1 = ["apiRef", "autoHeight", "className", "components", "componentsProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "onPageChange", "onPageSizeChange", "onSelectionModelChange", "page", "pageSize", "pagination", "paginationPlacement", "rows", "rowsPerPageOptions", "sx"];
24169
+ const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "rows", "pageSizeOptions", "sx"];
24169
24170
  const COMPONENT_NAME$1 = 'DataGrid';
24170
24171
  const CLASSNAME$1 = 'redsift-datagrid';
24171
24172
  const DEFAULT_PROPS = {
@@ -24194,11 +24195,9 @@ const Pagination = _ref3 => {
24194
24195
  displayPagination = false,
24195
24196
  selectionStatus,
24196
24197
  apiRef,
24197
- page,
24198
- onPageChange,
24199
- pageSize,
24200
- onPageSizeChange,
24201
- rowsPerPageOptions,
24198
+ paginationModel,
24199
+ onPaginationModelChange,
24200
+ pageSizeOptions,
24202
24201
  isRowSelectable
24203
24202
  } = _ref3;
24204
24203
  const filteredRowsInTable = getSelectableRowsInTable(apiRef);
@@ -24227,24 +24226,28 @@ const Pagination = _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, {
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
  }) : null);
24238
24241
  };
24239
24242
  const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24240
- var _initialState$paginat, _initialState$paginat2;
24243
+ var _initialState$paginat, _initialState$paginat2, _ref4, _ref5, _initialState$paginat3, _initialState$paginat4, _initialState$paginat5, _pageSizeOptions$;
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,21 +24255,19 @@ 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
  rows,
24263
- rowsPerPageOptions,
24264
+ pageSizeOptions,
24264
24265
  sx
24265
24266
  } = props,
24266
24267
  forwardedProps = _objectWithoutProperties(props, _excluded$1);
24267
24268
  const _apiRef = useGridApiRef();
24268
24269
  const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
24269
- const RenderedToolbar = components !== null && components !== void 0 && components.Toolbar ? components.Toolbar : Toolbar$2;
24270
+ const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
24270
24271
  LicenseInfo.setLicenseKey(license);
24271
24272
  const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
24272
24273
  const selectionStatus = useRef({
@@ -24284,28 +24285,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24284
24285
  setFilterModel(model);
24285
24286
  }
24286
24287
  };
24287
- 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);
24288
- 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);
24289
- const onPageChange = page => {
24290
- if (propsOnPageChange) {
24291
- propsOnPageChange(page, undefined);
24292
- } else {
24293
- setPage(page);
24294
- }
24295
- };
24296
- const onPageSizeChange = pageSize => {
24297
- onPageChange(0);
24298
- if (propsOnPageSizeChange) {
24299
- propsOnPageSizeChange(pageSize, undefined);
24288
+ const [paginationModel, setPaginationModel] = useState({
24289
+ pageSize: (initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat = initialState.pagination) === null || _initialState$paginat === void 0 ? void 0 : (_initialState$paginat2 = _initialState$paginat.paginationModel) === null || _initialState$paginat2 === void 0 ? void 0 : _initialState$paginat2.pageSize) || (propsPaginationModel === null || propsPaginationModel === void 0 ? void 0 : propsPaginationModel.pageSize) || 100,
24290
+ page: (_ref4 = (_ref5 = (_initialState$paginat3 = initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat4 = initialState.pagination) === null || _initialState$paginat4 === void 0 ? void 0 : (_initialState$paginat5 = _initialState$paginat4.paginationModel) === null || _initialState$paginat5 === void 0 ? void 0 : _initialState$paginat5.page) !== null && _initialState$paginat3 !== void 0 ? _initialState$paginat3 : propsPaginationModel === null || propsPaginationModel === void 0 ? void 0 : propsPaginationModel.page) !== 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 : 0
24291
+ });
24292
+ const onPaginationModelChange = model => {
24293
+ if (propsOnPaginationModelChange) {
24294
+ propsOnPaginationModelChange(model, undefined);
24300
24295
  } else {
24301
- setPageSize(pageSize);
24296
+ setPaginationModel(model);
24302
24297
  }
24303
24298
  };
24304
24299
  useEffect(() => {
24305
- if (propsPageSize) {
24306
- setPageSize(propsPageSize);
24300
+ if (propsPaginationModel) {
24301
+ setPaginationModel(propsPaginationModel);
24307
24302
  }
24308
- }, [propsPageSize]);
24303
+ }, [propsPaginationModel]);
24309
24304
  if (!Array.isArray(rows)) {
24310
24305
  return null;
24311
24306
  }
@@ -24317,47 +24312,47 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24317
24312
  apiRef: apiRef,
24318
24313
  autoHeight: autoHeight,
24319
24314
  checkboxSelectionVisibleOnly: Boolean(pagination),
24320
- components: _objectSpread2(_objectSpread2({
24321
- BaseButton,
24322
- BaseCheckbox,
24323
- // BaseTextField,
24324
- BasePopper,
24325
- ColumnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24315
+ slots: _objectSpread2(_objectSpread2({
24316
+ baseButton: BaseButton,
24317
+ baseCheckbox: BaseCheckbox,
24318
+ // baseTextField,
24319
+ basePopper: BasePopper,
24320
+ columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24326
24321
  displayName: "ColumnFilteredIcon"
24327
24322
  })),
24328
- ColumnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24323
+ columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24329
24324
  displayName: "ColumnSelectorIcon"
24330
24325
  })),
24331
- ColumnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24326
+ columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24332
24327
  displayName: "ColumnSortedAscendingIcon"
24333
24328
  })),
24334
- ColumnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24329
+ columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24335
24330
  displayName: "ColumnSortedDescendingIcon"
24336
24331
  })),
24337
- DensityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24332
+ densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24338
24333
  displayName: "DensityCompactIcon"
24339
24334
  })),
24340
- DensityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24335
+ densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24341
24336
  displayName: "DensityStandardIcon"
24342
24337
  })),
24343
- DensityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24338
+ densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24344
24339
  displayName: "DensityComfortableIcon"
24345
24340
  })),
24346
- DetailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24341
+ detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24347
24342
  displayName: "DetailPanelCollapseIcon"
24348
24343
  })),
24349
- DetailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24344
+ detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24350
24345
  displayName: "DetailPanelExpandIcon"
24351
24346
  })),
24352
- ExportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24347
+ exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
24353
24348
  displayName: "ExportIcon"
24354
24349
  })),
24355
- OpenFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24350
+ openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
24356
24351
  displayName: "OpenFilterButtonIcon",
24357
24352
  fontSize: "medium"
24358
24353
  }, props))
24359
- }, components), {}, {
24360
- Toolbar: props => {
24354
+ }, slots), {}, {
24355
+ toolbar: props => {
24361
24356
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
24362
24357
  filterModel: filterModel,
24363
24358
  onFilterModelChange: onFilterModelChange
@@ -24367,30 +24362,26 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24367
24362
  displayPagination: ['top', 'both'].includes(paginationPlacement),
24368
24363
  selectionStatus: selectionStatus.current,
24369
24364
  apiRef: apiRef,
24370
- page: page,
24371
- onPageChange: onPageChange,
24372
- pageSize: pageSize,
24373
- onPageSizeChange: onPageSizeChange,
24374
- rowsPerPageOptions: rowsPerPageOptions,
24365
+ paginationModel: paginationModel,
24366
+ onPaginationModelChange: onPaginationModelChange,
24367
+ pageSizeOptions: pageSizeOptions,
24375
24368
  isRowSelectable: isRowSelectable
24376
24369
  }) : null);
24377
24370
  },
24378
- Pagination: props => pagination ? /*#__PURE__*/React__default.createElement(Pagination, _extends$2({}, props, {
24371
+ pagination: props => pagination ? /*#__PURE__*/React__default.createElement(Pagination, _extends$2({}, props, {
24379
24372
  displaySelection: false,
24380
24373
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
24381
24374
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
24382
24375
  selectionStatus: selectionStatus.current,
24383
24376
  apiRef: apiRef,
24384
- page: page,
24385
- onPageChange: onPageChange,
24386
- pageSize: pageSize,
24387
- onPageSizeChange: onPageSizeChange,
24388
- rowsPerPageOptions: rowsPerPageOptions,
24377
+ paginationModel: paginationModel,
24378
+ onPaginationModelChange: onPaginationModelChange,
24379
+ pageSizeOptions: pageSizeOptions,
24389
24380
  isRowSelectable: isRowSelectable
24390
24381
  })) : null
24391
24382
  }),
24392
- componentsProps: _objectSpread2(_objectSpread2({}, componentsProps), {}, {
24393
- toolbar: _objectSpread2({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.toolbar)
24383
+ slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
24384
+ toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
24394
24385
  }),
24395
24386
  filterModel: filterModel,
24396
24387
  initialState: initialState,
@@ -24398,40 +24389,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24398
24389
  onFilterModelChange: onFilterModelChange,
24399
24390
  pagination: pagination,
24400
24391
  rows: rows,
24401
- rowsPerPageOptions: rowsPerPageOptions,
24402
- page: page,
24403
- onPageChange: onPageChange,
24404
- pageSize: pageSize,
24405
- onPageSizeChange: onPageSizeChange,
24406
- onSelectionModelChange: (newSelectionModel, details) => {
24392
+ pageSizeOptions: pageSizeOptions,
24393
+ paginationModel: paginationModel,
24394
+ onPaginationModelChange: onPaginationModelChange,
24395
+ onRowSelectionModelChange: (newSelectionModel, details) => {
24407
24396
  if (pagination) {
24408
- const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref4 => {
24397
+ const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref6 => {
24409
24398
  var _props$isRowSelectabl;
24410
24399
  let {
24411
24400
  model
24412
- } = _ref4;
24401
+ } = _ref6;
24413
24402
  return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
24414
24403
  row: model
24415
24404
  });
24416
- }).map(_ref5 => {
24405
+ }).map(_ref7 => {
24417
24406
  let {
24418
24407
  id
24419
- } = _ref5;
24408
+ } = _ref7;
24420
24409
  return id;
24421
24410
  }) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
24422
24411
  const numberOfSelectableRowsInPage = selectableRowsInPage.length;
24423
- const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref6 => {
24412
+ const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref8 => {
24424
24413
  var _props$isRowSelectabl2;
24425
24414
  let {
24426
24415
  model
24427
- } = _ref6;
24416
+ } = _ref8;
24428
24417
  return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
24429
24418
  row: model
24430
24419
  });
24431
- }).map(_ref7 => {
24420
+ }).map(_ref9 => {
24432
24421
  let {
24433
24422
  id
24434
- } = _ref7;
24423
+ } = _ref9;
24435
24424
  return id;
24436
24425
  }) : gridFilteredSortedRowIdsSelector(apiRef);
24437
24426
  const numberOfSelectableRowsInTable = selectableRowsInTable.length;
@@ -24463,7 +24452,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
24463
24452
  };
24464
24453
  }
24465
24454
  }
24466
- onSelectionModelChange === null || onSelectionModelChange === void 0 ? void 0 : onSelectionModelChange(newSelectionModel, details);
24455
+ onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
24467
24456
  },
24468
24457
  sx: _objectSpread2(_objectSpread2({}, sx), {}, {
24469
24458
  '.MuiDataGrid-columnHeaders': {