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