@redsift/table 9.2.4-muiv5 → 9.2.4
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 -4
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 => {
|
|
@@ -21911,7 +21912,7 @@ const Toolbar$2 = props => {
|
|
|
21911
21912
|
let {
|
|
21912
21913
|
apiRef
|
|
21913
21914
|
} = _ref;
|
|
21914
|
-
return
|
|
21915
|
+
return gridExpandedSortedRowIdsSelector(apiRef);
|
|
21915
21916
|
}
|
|
21916
21917
|
},
|
|
21917
21918
|
printOptions: {
|
|
@@ -24366,7 +24367,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
24366
24367
|
} : void 0;
|
|
24367
24368
|
var TablePagination$1 = TablePagination;
|
|
24368
24369
|
|
|
24369
|
-
const _excluded$1 = ["apiRef", "autoHeight", "className", "
|
|
24370
|
+
const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx"];
|
|
24370
24371
|
const COMPONENT_NAME$1 = 'DataGrid';
|
|
24371
24372
|
const CLASSNAME$1 = 'redsift-datagrid';
|
|
24372
24373
|
const DEFAULT_PROPS = {
|
|
@@ -24395,11 +24396,9 @@ const ControlledPagination = _ref3 => {
|
|
|
24395
24396
|
displayPagination = false,
|
|
24396
24397
|
selectionStatus,
|
|
24397
24398
|
apiRef,
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
onPageSizeChange,
|
|
24402
|
-
rowsPerPageOptions,
|
|
24399
|
+
paginationModel,
|
|
24400
|
+
onPaginationModelChange,
|
|
24401
|
+
pageSizeOptions,
|
|
24403
24402
|
isRowSelectable,
|
|
24404
24403
|
paginationProps
|
|
24405
24404
|
} = _ref3;
|
|
@@ -24429,24 +24428,28 @@ const ControlledPagination = _ref3 => {
|
|
|
24429
24428
|
}, `${selectionStatus.numberOfSelectedRows} row${selectionStatus.numberOfSelectedRows > 1 ? 's' : ''} selected`) : /*#__PURE__*/React__default.createElement(Text, null)) : null, displayPagination ? /*#__PURE__*/React__default.createElement(TablePagination$1, _extends$2({
|
|
24430
24429
|
component: "div",
|
|
24431
24430
|
count: numberOfFilteredRowsInTable,
|
|
24432
|
-
page: page,
|
|
24433
|
-
onPageChange: (event,
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24431
|
+
page: paginationModel.page,
|
|
24432
|
+
onPageChange: (event, page) => onPaginationModelChange({
|
|
24433
|
+
page,
|
|
24434
|
+
pageSize: paginationModel.pageSize
|
|
24435
|
+
}),
|
|
24436
|
+
rowsPerPage: paginationModel.pageSize,
|
|
24437
|
+
onRowsPerPageChange: event => onPaginationModelChange({
|
|
24438
|
+
page: paginationModel.page,
|
|
24439
|
+
pageSize: parseInt(event.target.value, 10)
|
|
24440
|
+
}),
|
|
24441
|
+
rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
|
|
24439
24442
|
}, paginationProps)) : null);
|
|
24440
24443
|
};
|
|
24441
24444
|
const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24442
|
-
var _initialState$paginat, _initialState$paginat2;
|
|
24445
|
+
var _ref4, _ref5, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _pageSizeOptions$, _ref6, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6;
|
|
24443
24446
|
const datagridRef = ref || useRef();
|
|
24444
24447
|
const {
|
|
24445
24448
|
apiRef: propsApiRef,
|
|
24446
24449
|
autoHeight,
|
|
24447
24450
|
className,
|
|
24448
|
-
|
|
24449
|
-
|
|
24451
|
+
slots,
|
|
24452
|
+
slotProps,
|
|
24450
24453
|
filterModel: propsFilterModel,
|
|
24451
24454
|
height: propsHeight,
|
|
24452
24455
|
hideToolbar,
|
|
@@ -24454,22 +24457,20 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24454
24457
|
isRowSelectable,
|
|
24455
24458
|
license,
|
|
24456
24459
|
onFilterModelChange: propsOnFilterModelChange,
|
|
24457
|
-
|
|
24458
|
-
|
|
24459
|
-
|
|
24460
|
-
page: propsPage,
|
|
24461
|
-
pageSize: propsPageSize,
|
|
24460
|
+
paginationModel: propsPaginationModel,
|
|
24461
|
+
onPaginationModelChange: propsOnPaginationModelChange,
|
|
24462
|
+
onRowSelectionModelChange,
|
|
24462
24463
|
pagination,
|
|
24463
24464
|
paginationPlacement,
|
|
24464
24465
|
paginationProps,
|
|
24465
24466
|
rows,
|
|
24466
|
-
|
|
24467
|
+
pageSizeOptions,
|
|
24467
24468
|
sx
|
|
24468
24469
|
} = props,
|
|
24469
24470
|
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
24470
24471
|
const _apiRef = useGridApiRef();
|
|
24471
24472
|
const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
|
|
24472
|
-
const RenderedToolbar =
|
|
24473
|
+
const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
|
|
24473
24474
|
LicenseInfo.setLicenseKey(license);
|
|
24474
24475
|
const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
|
|
24475
24476
|
const selectionStatus = useRef({
|
|
@@ -24487,33 +24488,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24487
24488
|
setFilterModel(model);
|
|
24488
24489
|
}
|
|
24489
24490
|
};
|
|
24490
|
-
const [
|
|
24491
|
-
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
}
|
|
24498
|
-
};
|
|
24499
|
-
useEffect(() => {
|
|
24500
|
-
if (propsPage || propsPage === 0) {
|
|
24501
|
-
setPage(propsPage);
|
|
24502
|
-
}
|
|
24503
|
-
}, [propsPage]);
|
|
24504
|
-
const onPageSizeChange = pageSize => {
|
|
24505
|
-
onPageChange(0);
|
|
24506
|
-
if (propsOnPageSizeChange) {
|
|
24507
|
-
propsOnPageSizeChange(pageSize, undefined);
|
|
24491
|
+
const [paginationModel, setPaginationModel] = useState({
|
|
24492
|
+
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,
|
|
24493
|
+
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
|
|
24494
|
+
});
|
|
24495
|
+
const onPaginationModelChange = model => {
|
|
24496
|
+
if (propsOnPaginationModelChange) {
|
|
24497
|
+
propsOnPaginationModelChange(model, undefined);
|
|
24508
24498
|
} else {
|
|
24509
|
-
|
|
24499
|
+
setPaginationModel(model);
|
|
24510
24500
|
}
|
|
24511
24501
|
};
|
|
24512
24502
|
useEffect(() => {
|
|
24513
|
-
if (
|
|
24514
|
-
|
|
24503
|
+
if (propsPaginationModel) {
|
|
24504
|
+
setPaginationModel(propsPaginationModel);
|
|
24515
24505
|
}
|
|
24516
|
-
}, [
|
|
24506
|
+
}, [propsPaginationModel]);
|
|
24517
24507
|
if (!Array.isArray(rows)) {
|
|
24518
24508
|
return null;
|
|
24519
24509
|
}
|
|
@@ -24525,46 +24515,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24525
24515
|
apiRef: apiRef,
|
|
24526
24516
|
autoHeight: autoHeight,
|
|
24527
24517
|
checkboxSelectionVisibleOnly: Boolean(pagination),
|
|
24528
|
-
|
|
24529
|
-
BaseButton,
|
|
24530
|
-
BaseCheckbox,
|
|
24531
|
-
//
|
|
24532
|
-
BasePopper,
|
|
24533
|
-
|
|
24518
|
+
slots: _objectSpread2(_objectSpread2({
|
|
24519
|
+
baseButton: BaseButton,
|
|
24520
|
+
baseCheckbox: BaseCheckbox,
|
|
24521
|
+
// baseTextField,
|
|
24522
|
+
basePopper: BasePopper,
|
|
24523
|
+
columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24534
24524
|
displayName: "ColumnFilteredIcon"
|
|
24535
24525
|
})),
|
|
24536
|
-
|
|
24526
|
+
columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24537
24527
|
displayName: "ColumnSelectorIcon"
|
|
24538
24528
|
})),
|
|
24539
|
-
|
|
24529
|
+
columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24540
24530
|
displayName: "ColumnSortedAscendingIcon"
|
|
24541
24531
|
})),
|
|
24542
|
-
|
|
24532
|
+
columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24543
24533
|
displayName: "ColumnSortedDescendingIcon"
|
|
24544
24534
|
})),
|
|
24545
|
-
|
|
24535
|
+
densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24546
24536
|
displayName: "DensityCompactIcon"
|
|
24547
24537
|
})),
|
|
24548
|
-
|
|
24538
|
+
densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24549
24539
|
displayName: "DensityStandardIcon"
|
|
24550
24540
|
})),
|
|
24551
|
-
|
|
24541
|
+
densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24552
24542
|
displayName: "DensityComfortableIcon"
|
|
24553
24543
|
})),
|
|
24554
|
-
|
|
24544
|
+
detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24555
24545
|
displayName: "DetailPanelCollapseIcon"
|
|
24556
24546
|
})),
|
|
24557
|
-
|
|
24547
|
+
detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24558
24548
|
displayName: "DetailPanelExpandIcon"
|
|
24559
24549
|
})),
|
|
24560
|
-
|
|
24550
|
+
exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24561
24551
|
displayName: "ExportIcon"
|
|
24562
24552
|
})),
|
|
24563
|
-
|
|
24553
|
+
openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
|
|
24564
24554
|
displayName: "OpenFilterButtonIcon"
|
|
24565
24555
|
}, props))
|
|
24566
|
-
},
|
|
24567
|
-
|
|
24556
|
+
}, slots), {}, {
|
|
24557
|
+
toolbar: props => {
|
|
24568
24558
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
|
|
24569
24559
|
filterModel: filterModel,
|
|
24570
24560
|
onFilterModelChange: onFilterModelChange
|
|
@@ -24575,31 +24565,27 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24575
24565
|
selectionStatus: selectionStatus.current,
|
|
24576
24566
|
apiRef: apiRef,
|
|
24577
24567
|
isRowSelectable: isRowSelectable,
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
onPageSizeChange: onPageSizeChange,
|
|
24582
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24568
|
+
paginationModel: paginationModel,
|
|
24569
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24570
|
+
pageSizeOptions: pageSizeOptions,
|
|
24583
24571
|
paginationProps: paginationProps
|
|
24584
24572
|
}) : null);
|
|
24585
24573
|
},
|
|
24586
|
-
|
|
24574
|
+
pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
|
|
24587
24575
|
displaySelection: false,
|
|
24588
24576
|
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
24589
24577
|
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
24590
24578
|
selectionStatus: selectionStatus.current,
|
|
24591
24579
|
apiRef: apiRef,
|
|
24592
24580
|
isRowSelectable: isRowSelectable,
|
|
24593
|
-
|
|
24594
|
-
|
|
24595
|
-
|
|
24596
|
-
onPageSizeChange: onPageSizeChange,
|
|
24597
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24581
|
+
paginationModel: paginationModel,
|
|
24582
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24583
|
+
pageSizeOptions: pageSizeOptions,
|
|
24598
24584
|
paginationProps: paginationProps
|
|
24599
24585
|
})) : null
|
|
24600
24586
|
}),
|
|
24601
|
-
|
|
24602
|
-
toolbar: _objectSpread2({},
|
|
24587
|
+
slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
|
|
24588
|
+
toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
|
|
24603
24589
|
}),
|
|
24604
24590
|
filterModel: filterModel,
|
|
24605
24591
|
initialState: initialState,
|
|
@@ -24607,40 +24593,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24607
24593
|
onFilterModelChange: onFilterModelChange,
|
|
24608
24594
|
pagination: pagination,
|
|
24609
24595
|
rows: rows,
|
|
24610
|
-
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
24614
|
-
onPageSizeChange: onPageSizeChange,
|
|
24615
|
-
onSelectionModelChange: (newSelectionModel, details) => {
|
|
24596
|
+
pageSizeOptions: pageSizeOptions,
|
|
24597
|
+
paginationModel: paginationModel,
|
|
24598
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24599
|
+
onRowSelectionModelChange: (newSelectionModel, details) => {
|
|
24616
24600
|
if (pagination) {
|
|
24617
|
-
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(
|
|
24601
|
+
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref7 => {
|
|
24618
24602
|
var _props$isRowSelectabl;
|
|
24619
24603
|
let {
|
|
24620
24604
|
model
|
|
24621
|
-
} =
|
|
24605
|
+
} = _ref7;
|
|
24622
24606
|
return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
|
|
24623
24607
|
row: model
|
|
24624
24608
|
});
|
|
24625
|
-
}).map(
|
|
24609
|
+
}).map(_ref8 => {
|
|
24626
24610
|
let {
|
|
24627
24611
|
id
|
|
24628
|
-
} =
|
|
24612
|
+
} = _ref8;
|
|
24629
24613
|
return id;
|
|
24630
24614
|
}) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
24631
24615
|
const numberOfSelectableRowsInPage = selectableRowsInPage.length;
|
|
24632
|
-
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(
|
|
24616
|
+
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref9 => {
|
|
24633
24617
|
var _props$isRowSelectabl2;
|
|
24634
24618
|
let {
|
|
24635
24619
|
model
|
|
24636
|
-
} =
|
|
24620
|
+
} = _ref9;
|
|
24637
24621
|
return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
|
|
24638
24622
|
row: model
|
|
24639
24623
|
});
|
|
24640
|
-
}).map(
|
|
24624
|
+
}).map(_ref10 => {
|
|
24641
24625
|
let {
|
|
24642
24626
|
id
|
|
24643
|
-
} =
|
|
24627
|
+
} = _ref10;
|
|
24644
24628
|
return id;
|
|
24645
24629
|
}) : gridFilteredSortedRowIdsSelector(apiRef);
|
|
24646
24630
|
const numberOfSelectableRowsInTable = selectableRowsInTable.length;
|
|
@@ -24672,7 +24656,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24672
24656
|
};
|
|
24673
24657
|
}
|
|
24674
24658
|
}
|
|
24675
|
-
|
|
24659
|
+
onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
|
|
24676
24660
|
},
|
|
24677
24661
|
sx: _objectSpread2(_objectSpread2({}, sx), {}, {
|
|
24678
24662
|
'.MuiDataGrid-columnHeaders': {
|