@redsift/table 9.3.0-muiv5 → 9.3.0
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 +3 -2
- package/index.js +85 -101
- package/index.js.map +1 -1
- package/package.json +4 -5
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
|
|
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,
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
17621
|
+
if (!filterItem.field || !filterItem.value || !filterItem.operator) {
|
|
17621
17622
|
return null;
|
|
17622
17623
|
}
|
|
17623
17624
|
return params => {
|
|
@@ -21878,7 +21879,7 @@ const Toolbar$2 = props => {
|
|
|
21878
21879
|
let {
|
|
21879
21880
|
apiRef
|
|
21880
21881
|
} = _ref;
|
|
21881
|
-
return
|
|
21882
|
+
return gridExpandedSortedRowIdsSelector(apiRef);
|
|
21882
21883
|
}
|
|
21883
21884
|
},
|
|
21884
21885
|
printOptions: {
|
|
@@ -24333,7 +24334,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
24333
24334
|
} : void 0;
|
|
24334
24335
|
var TablePagination$1 = TablePagination;
|
|
24335
24336
|
|
|
24336
|
-
const _excluded$1 = ["apiRef", "autoHeight", "className", "
|
|
24337
|
+
const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx"];
|
|
24337
24338
|
const COMPONENT_NAME$1 = 'DataGrid';
|
|
24338
24339
|
const CLASSNAME$1 = 'redsift-datagrid';
|
|
24339
24340
|
const DEFAULT_PROPS = {
|
|
@@ -24362,11 +24363,9 @@ const ControlledPagination = _ref3 => {
|
|
|
24362
24363
|
displayPagination = false,
|
|
24363
24364
|
selectionStatus,
|
|
24364
24365
|
apiRef,
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
onPageSizeChange,
|
|
24369
|
-
rowsPerPageOptions,
|
|
24366
|
+
paginationModel,
|
|
24367
|
+
onPaginationModelChange,
|
|
24368
|
+
pageSizeOptions,
|
|
24370
24369
|
isRowSelectable,
|
|
24371
24370
|
paginationProps
|
|
24372
24371
|
} = _ref3;
|
|
@@ -24396,24 +24395,28 @@ const ControlledPagination = _ref3 => {
|
|
|
24396
24395
|
}, `${selectionStatus.numberOfSelectedRows} row${selectionStatus.numberOfSelectedRows > 1 ? 's' : ''} selected`) : /*#__PURE__*/React__default.createElement(Text, null)) : null, displayPagination ? /*#__PURE__*/React__default.createElement(TablePagination$1, _extends$2({
|
|
24397
24396
|
component: "div",
|
|
24398
24397
|
count: numberOfFilteredRowsInTable,
|
|
24399
|
-
page: page,
|
|
24400
|
-
onPageChange: (event,
|
|
24401
|
-
|
|
24402
|
-
|
|
24403
|
-
|
|
24404
|
-
|
|
24405
|
-
|
|
24398
|
+
page: paginationModel.page,
|
|
24399
|
+
onPageChange: (event, page) => onPaginationModelChange({
|
|
24400
|
+
page,
|
|
24401
|
+
pageSize: paginationModel.pageSize
|
|
24402
|
+
}),
|
|
24403
|
+
rowsPerPage: paginationModel.pageSize,
|
|
24404
|
+
onRowsPerPageChange: event => onPaginationModelChange({
|
|
24405
|
+
page: paginationModel.page,
|
|
24406
|
+
pageSize: parseInt(event.target.value, 10)
|
|
24407
|
+
}),
|
|
24408
|
+
rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
|
|
24406
24409
|
}, paginationProps)) : null);
|
|
24407
24410
|
};
|
|
24408
24411
|
const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24409
|
-
var _initialState$paginat, _initialState$paginat2;
|
|
24412
|
+
var _ref4, _ref5, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _pageSizeOptions$, _ref6, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6;
|
|
24410
24413
|
const datagridRef = ref || useRef();
|
|
24411
24414
|
const {
|
|
24412
24415
|
apiRef: propsApiRef,
|
|
24413
24416
|
autoHeight,
|
|
24414
24417
|
className,
|
|
24415
|
-
|
|
24416
|
-
|
|
24418
|
+
slots,
|
|
24419
|
+
slotProps,
|
|
24417
24420
|
filterModel: propsFilterModel,
|
|
24418
24421
|
height: propsHeight,
|
|
24419
24422
|
hideToolbar,
|
|
@@ -24421,22 +24424,20 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24421
24424
|
isRowSelectable,
|
|
24422
24425
|
license,
|
|
24423
24426
|
onFilterModelChange: propsOnFilterModelChange,
|
|
24424
|
-
|
|
24425
|
-
|
|
24426
|
-
|
|
24427
|
-
page: propsPage,
|
|
24428
|
-
pageSize: propsPageSize,
|
|
24427
|
+
paginationModel: propsPaginationModel,
|
|
24428
|
+
onPaginationModelChange: propsOnPaginationModelChange,
|
|
24429
|
+
onRowSelectionModelChange,
|
|
24429
24430
|
pagination,
|
|
24430
24431
|
paginationPlacement,
|
|
24431
24432
|
paginationProps,
|
|
24432
24433
|
rows,
|
|
24433
|
-
|
|
24434
|
+
pageSizeOptions,
|
|
24434
24435
|
sx
|
|
24435
24436
|
} = props,
|
|
24436
24437
|
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
24437
24438
|
const _apiRef = useGridApiRef();
|
|
24438
24439
|
const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
|
|
24439
|
-
const RenderedToolbar =
|
|
24440
|
+
const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
|
|
24440
24441
|
LicenseInfo.setLicenseKey(license);
|
|
24441
24442
|
const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
|
|
24442
24443
|
const selectionStatus = useRef({
|
|
@@ -24454,33 +24455,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24454
24455
|
setFilterModel(model);
|
|
24455
24456
|
}
|
|
24456
24457
|
};
|
|
24457
|
-
const [
|
|
24458
|
-
|
|
24459
|
-
|
|
24460
|
-
|
|
24461
|
-
|
|
24462
|
-
|
|
24463
|
-
|
|
24464
|
-
}
|
|
24465
|
-
};
|
|
24466
|
-
useEffect(() => {
|
|
24467
|
-
if (propsPage || propsPage === 0) {
|
|
24468
|
-
setPage(propsPage);
|
|
24469
|
-
}
|
|
24470
|
-
}, [propsPage]);
|
|
24471
|
-
const onPageSizeChange = pageSize => {
|
|
24472
|
-
onPageChange(0);
|
|
24473
|
-
if (propsOnPageSizeChange) {
|
|
24474
|
-
propsOnPageSizeChange(pageSize, undefined);
|
|
24458
|
+
const [paginationModel, setPaginationModel] = useState({
|
|
24459
|
+
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,
|
|
24460
|
+
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
|
|
24461
|
+
});
|
|
24462
|
+
const onPaginationModelChange = model => {
|
|
24463
|
+
if (propsOnPaginationModelChange) {
|
|
24464
|
+
propsOnPaginationModelChange(model, undefined);
|
|
24475
24465
|
} else {
|
|
24476
|
-
|
|
24466
|
+
setPaginationModel(model);
|
|
24477
24467
|
}
|
|
24478
24468
|
};
|
|
24479
24469
|
useEffect(() => {
|
|
24480
|
-
if (
|
|
24481
|
-
|
|
24470
|
+
if (propsPaginationModel) {
|
|
24471
|
+
setPaginationModel(propsPaginationModel);
|
|
24482
24472
|
}
|
|
24483
|
-
}, [
|
|
24473
|
+
}, [propsPaginationModel]);
|
|
24484
24474
|
if (!Array.isArray(rows)) {
|
|
24485
24475
|
return null;
|
|
24486
24476
|
}
|
|
@@ -24492,46 +24482,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24492
24482
|
apiRef: apiRef,
|
|
24493
24483
|
autoHeight: autoHeight,
|
|
24494
24484
|
checkboxSelectionVisibleOnly: Boolean(pagination),
|
|
24495
|
-
|
|
24496
|
-
BaseButton,
|
|
24497
|
-
BaseCheckbox,
|
|
24498
|
-
//
|
|
24499
|
-
BasePopper,
|
|
24500
|
-
|
|
24485
|
+
slots: _objectSpread2(_objectSpread2({
|
|
24486
|
+
baseButton: BaseButton,
|
|
24487
|
+
baseCheckbox: BaseCheckbox,
|
|
24488
|
+
// baseTextField,
|
|
24489
|
+
basePopper: BasePopper,
|
|
24490
|
+
columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24501
24491
|
displayName: "ColumnFilteredIcon"
|
|
24502
24492
|
})),
|
|
24503
|
-
|
|
24493
|
+
columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24504
24494
|
displayName: "ColumnSelectorIcon"
|
|
24505
24495
|
})),
|
|
24506
|
-
|
|
24496
|
+
columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24507
24497
|
displayName: "ColumnSortedAscendingIcon"
|
|
24508
24498
|
})),
|
|
24509
|
-
|
|
24499
|
+
columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24510
24500
|
displayName: "ColumnSortedDescendingIcon"
|
|
24511
24501
|
})),
|
|
24512
|
-
|
|
24502
|
+
densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24513
24503
|
displayName: "DensityCompactIcon"
|
|
24514
24504
|
})),
|
|
24515
|
-
|
|
24505
|
+
densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24516
24506
|
displayName: "DensityStandardIcon"
|
|
24517
24507
|
})),
|
|
24518
|
-
|
|
24508
|
+
densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24519
24509
|
displayName: "DensityComfortableIcon"
|
|
24520
24510
|
})),
|
|
24521
|
-
|
|
24511
|
+
detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24522
24512
|
displayName: "DetailPanelCollapseIcon"
|
|
24523
24513
|
})),
|
|
24524
|
-
|
|
24514
|
+
detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24525
24515
|
displayName: "DetailPanelExpandIcon"
|
|
24526
24516
|
})),
|
|
24527
|
-
|
|
24517
|
+
exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24528
24518
|
displayName: "ExportIcon"
|
|
24529
24519
|
})),
|
|
24530
|
-
|
|
24520
|
+
openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
|
|
24531
24521
|
displayName: "OpenFilterButtonIcon"
|
|
24532
24522
|
}, props))
|
|
24533
|
-
},
|
|
24534
|
-
|
|
24523
|
+
}, slots), {}, {
|
|
24524
|
+
toolbar: props => {
|
|
24535
24525
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
|
|
24536
24526
|
filterModel: filterModel,
|
|
24537
24527
|
onFilterModelChange: onFilterModelChange
|
|
@@ -24542,31 +24532,27 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24542
24532
|
selectionStatus: selectionStatus.current,
|
|
24543
24533
|
apiRef: apiRef,
|
|
24544
24534
|
isRowSelectable: isRowSelectable,
|
|
24545
|
-
|
|
24546
|
-
|
|
24547
|
-
|
|
24548
|
-
onPageSizeChange: onPageSizeChange,
|
|
24549
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24535
|
+
paginationModel: paginationModel,
|
|
24536
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24537
|
+
pageSizeOptions: pageSizeOptions,
|
|
24550
24538
|
paginationProps: paginationProps
|
|
24551
24539
|
}) : null);
|
|
24552
24540
|
},
|
|
24553
|
-
|
|
24541
|
+
pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
|
|
24554
24542
|
displaySelection: false,
|
|
24555
24543
|
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
24556
24544
|
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
24557
24545
|
selectionStatus: selectionStatus.current,
|
|
24558
24546
|
apiRef: apiRef,
|
|
24559
24547
|
isRowSelectable: isRowSelectable,
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
onPageSizeChange: onPageSizeChange,
|
|
24564
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24548
|
+
paginationModel: paginationModel,
|
|
24549
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24550
|
+
pageSizeOptions: pageSizeOptions,
|
|
24565
24551
|
paginationProps: paginationProps
|
|
24566
24552
|
})) : null
|
|
24567
24553
|
}),
|
|
24568
|
-
|
|
24569
|
-
toolbar: _objectSpread2({},
|
|
24554
|
+
slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
|
|
24555
|
+
toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
|
|
24570
24556
|
}),
|
|
24571
24557
|
filterModel: filterModel,
|
|
24572
24558
|
initialState: initialState,
|
|
@@ -24574,40 +24560,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24574
24560
|
onFilterModelChange: onFilterModelChange,
|
|
24575
24561
|
pagination: pagination,
|
|
24576
24562
|
rows: rows,
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
onPageSizeChange: onPageSizeChange,
|
|
24582
|
-
onSelectionModelChange: (newSelectionModel, details) => {
|
|
24563
|
+
pageSizeOptions: pageSizeOptions,
|
|
24564
|
+
paginationModel: paginationModel,
|
|
24565
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24566
|
+
onRowSelectionModelChange: (newSelectionModel, details) => {
|
|
24583
24567
|
if (pagination) {
|
|
24584
|
-
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(
|
|
24568
|
+
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref7 => {
|
|
24585
24569
|
var _props$isRowSelectabl;
|
|
24586
24570
|
let {
|
|
24587
24571
|
model
|
|
24588
|
-
} =
|
|
24572
|
+
} = _ref7;
|
|
24589
24573
|
return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
|
|
24590
24574
|
row: model
|
|
24591
24575
|
});
|
|
24592
|
-
}).map(
|
|
24576
|
+
}).map(_ref8 => {
|
|
24593
24577
|
let {
|
|
24594
24578
|
id
|
|
24595
|
-
} =
|
|
24579
|
+
} = _ref8;
|
|
24596
24580
|
return id;
|
|
24597
24581
|
}) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
24598
24582
|
const numberOfSelectableRowsInPage = selectableRowsInPage.length;
|
|
24599
|
-
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(
|
|
24583
|
+
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref9 => {
|
|
24600
24584
|
var _props$isRowSelectabl2;
|
|
24601
24585
|
let {
|
|
24602
24586
|
model
|
|
24603
|
-
} =
|
|
24587
|
+
} = _ref9;
|
|
24604
24588
|
return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
|
|
24605
24589
|
row: model
|
|
24606
24590
|
});
|
|
24607
|
-
}).map(
|
|
24591
|
+
}).map(_ref10 => {
|
|
24608
24592
|
let {
|
|
24609
24593
|
id
|
|
24610
|
-
} =
|
|
24594
|
+
} = _ref10;
|
|
24611
24595
|
return id;
|
|
24612
24596
|
}) : gridFilteredSortedRowIdsSelector(apiRef);
|
|
24613
24597
|
const numberOfSelectableRowsInTable = selectableRowsInTable.length;
|
|
@@ -24639,7 +24623,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24639
24623
|
};
|
|
24640
24624
|
}
|
|
24641
24625
|
}
|
|
24642
|
-
|
|
24626
|
+
onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
|
|
24643
24627
|
},
|
|
24644
24628
|
sx: _objectSpread2(_objectSpread2({}, sx), {}, {
|
|
24645
24629
|
'.MuiDataGrid-columnHeaders': {
|