@redsift/table 9.2.3-muiv5 → 9.2.3-patch.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -2
- package/index.js +84 -100
- package/index.js.map +1 -1
- package/package.json +6 -6
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 => {
|
|
@@ -17517,7 +17518,7 @@ const endsWithAnyOfOperator = {
|
|
|
17517
17518
|
label: 'ends with any of',
|
|
17518
17519
|
value: 'endsWithAnyOf',
|
|
17519
17520
|
getApplyFilterFn: filterItem => {
|
|
17520
|
-
if (!filterItem.
|
|
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.
|
|
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.
|
|
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.
|
|
17596
|
+
if (!filterItem.field || !filterItem.value || !filterItem.operator) {
|
|
17596
17597
|
return null;
|
|
17597
17598
|
}
|
|
17598
17599
|
return params => {
|
|
@@ -21886,7 +21887,7 @@ const Toolbar$2 = props => {
|
|
|
21886
21887
|
let {
|
|
21887
21888
|
apiRef
|
|
21888
21889
|
} = _ref;
|
|
21889
|
-
return
|
|
21890
|
+
return gridExpandedSortedRowIdsSelector(apiRef);
|
|
21890
21891
|
}
|
|
21891
21892
|
},
|
|
21892
21893
|
printOptions: {
|
|
@@ -24341,7 +24342,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
24341
24342
|
} : void 0;
|
|
24342
24343
|
var TablePagination$1 = TablePagination;
|
|
24343
24344
|
|
|
24344
|
-
const _excluded$1 = ["apiRef", "autoHeight", "className", "
|
|
24345
|
+
const _excluded$1 = ["apiRef", "autoHeight", "className", "slots", "slotProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "paginationModel", "onPaginationModelChange", "onRowSelectionModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx"];
|
|
24345
24346
|
const COMPONENT_NAME$1 = 'DataGrid';
|
|
24346
24347
|
const CLASSNAME$1 = 'redsift-datagrid';
|
|
24347
24348
|
const DEFAULT_PROPS = {
|
|
@@ -24370,11 +24371,9 @@ const ControlledPagination = _ref3 => {
|
|
|
24370
24371
|
displayPagination = false,
|
|
24371
24372
|
selectionStatus,
|
|
24372
24373
|
apiRef,
|
|
24373
|
-
|
|
24374
|
-
|
|
24375
|
-
|
|
24376
|
-
onPageSizeChange,
|
|
24377
|
-
rowsPerPageOptions,
|
|
24374
|
+
paginationModel,
|
|
24375
|
+
onPaginationModelChange,
|
|
24376
|
+
pageSizeOptions,
|
|
24378
24377
|
isRowSelectable,
|
|
24379
24378
|
paginationProps
|
|
24380
24379
|
} = _ref3;
|
|
@@ -24404,24 +24403,28 @@ const ControlledPagination = _ref3 => {
|
|
|
24404
24403
|
}, `${selectionStatus.numberOfSelectedRows} row${selectionStatus.numberOfSelectedRows > 1 ? 's' : ''} selected`) : /*#__PURE__*/React__default.createElement(Text, null)) : null, displayPagination ? /*#__PURE__*/React__default.createElement(TablePagination$1, _extends$2({
|
|
24405
24404
|
component: "div",
|
|
24406
24405
|
count: numberOfFilteredRowsInTable,
|
|
24407
|
-
page: page,
|
|
24408
|
-
onPageChange: (event,
|
|
24409
|
-
|
|
24410
|
-
|
|
24411
|
-
|
|
24412
|
-
|
|
24413
|
-
|
|
24406
|
+
page: paginationModel.page,
|
|
24407
|
+
onPageChange: (event, page) => onPaginationModelChange({
|
|
24408
|
+
page,
|
|
24409
|
+
pageSize: paginationModel.pageSize
|
|
24410
|
+
}),
|
|
24411
|
+
rowsPerPage: paginationModel.pageSize,
|
|
24412
|
+
onRowsPerPageChange: event => onPaginationModelChange({
|
|
24413
|
+
page: paginationModel.page,
|
|
24414
|
+
pageSize: parseInt(event.target.value, 10)
|
|
24415
|
+
}),
|
|
24416
|
+
rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
|
|
24414
24417
|
}, paginationProps)) : null);
|
|
24415
24418
|
};
|
|
24416
24419
|
const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24417
|
-
var _initialState$paginat, _initialState$paginat2;
|
|
24420
|
+
var _ref4, _ref5, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _pageSizeOptions$, _ref6, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6;
|
|
24418
24421
|
const datagridRef = ref || useRef();
|
|
24419
24422
|
const {
|
|
24420
24423
|
apiRef: propsApiRef,
|
|
24421
24424
|
autoHeight,
|
|
24422
24425
|
className,
|
|
24423
|
-
|
|
24424
|
-
|
|
24426
|
+
slots,
|
|
24427
|
+
slotProps,
|
|
24425
24428
|
filterModel: propsFilterModel,
|
|
24426
24429
|
height: propsHeight,
|
|
24427
24430
|
hideToolbar,
|
|
@@ -24429,22 +24432,20 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24429
24432
|
isRowSelectable,
|
|
24430
24433
|
license,
|
|
24431
24434
|
onFilterModelChange: propsOnFilterModelChange,
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
page: propsPage,
|
|
24436
|
-
pageSize: propsPageSize,
|
|
24435
|
+
paginationModel: propsPaginationModel,
|
|
24436
|
+
onPaginationModelChange: propsOnPaginationModelChange,
|
|
24437
|
+
onRowSelectionModelChange,
|
|
24437
24438
|
pagination,
|
|
24438
24439
|
paginationPlacement,
|
|
24439
24440
|
paginationProps,
|
|
24440
24441
|
rows,
|
|
24441
|
-
|
|
24442
|
+
pageSizeOptions,
|
|
24442
24443
|
sx
|
|
24443
24444
|
} = props,
|
|
24444
24445
|
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
24445
24446
|
const _apiRef = useGridApiRef();
|
|
24446
24447
|
const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
|
|
24447
|
-
const RenderedToolbar =
|
|
24448
|
+
const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar$2;
|
|
24448
24449
|
LicenseInfo.setLicenseKey(license);
|
|
24449
24450
|
const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
|
|
24450
24451
|
const selectionStatus = useRef({
|
|
@@ -24462,33 +24463,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24462
24463
|
setFilterModel(model);
|
|
24463
24464
|
}
|
|
24464
24465
|
};
|
|
24465
|
-
const [
|
|
24466
|
-
|
|
24467
|
-
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
|
|
24472
|
-
}
|
|
24473
|
-
};
|
|
24474
|
-
useEffect(() => {
|
|
24475
|
-
if (propsPage || propsPage === 0) {
|
|
24476
|
-
setPage(propsPage);
|
|
24477
|
-
}
|
|
24478
|
-
}, [propsPage]);
|
|
24479
|
-
const onPageSizeChange = pageSize => {
|
|
24480
|
-
onPageChange(0);
|
|
24481
|
-
if (propsOnPageSizeChange) {
|
|
24482
|
-
propsOnPageSizeChange(pageSize, undefined);
|
|
24466
|
+
const [paginationModel, setPaginationModel] = useState({
|
|
24467
|
+
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,
|
|
24468
|
+
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
|
|
24469
|
+
});
|
|
24470
|
+
const onPaginationModelChange = model => {
|
|
24471
|
+
if (propsOnPaginationModelChange) {
|
|
24472
|
+
propsOnPaginationModelChange(model, undefined);
|
|
24483
24473
|
} else {
|
|
24484
|
-
|
|
24474
|
+
setPaginationModel(model);
|
|
24485
24475
|
}
|
|
24486
24476
|
};
|
|
24487
24477
|
useEffect(() => {
|
|
24488
|
-
if (
|
|
24489
|
-
|
|
24478
|
+
if (propsPaginationModel) {
|
|
24479
|
+
setPaginationModel(propsPaginationModel);
|
|
24490
24480
|
}
|
|
24491
|
-
}, [
|
|
24481
|
+
}, [propsPaginationModel]);
|
|
24492
24482
|
if (!Array.isArray(rows)) {
|
|
24493
24483
|
return null;
|
|
24494
24484
|
}
|
|
@@ -24500,46 +24490,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24500
24490
|
apiRef: apiRef,
|
|
24501
24491
|
autoHeight: autoHeight,
|
|
24502
24492
|
checkboxSelectionVisibleOnly: Boolean(pagination),
|
|
24503
|
-
|
|
24504
|
-
BaseButton,
|
|
24505
|
-
BaseCheckbox,
|
|
24506
|
-
//
|
|
24507
|
-
BasePopper,
|
|
24508
|
-
|
|
24493
|
+
slots: _objectSpread2(_objectSpread2({
|
|
24494
|
+
baseButton: BaseButton,
|
|
24495
|
+
baseCheckbox: BaseCheckbox,
|
|
24496
|
+
// baseTextField,
|
|
24497
|
+
basePopper: BasePopper,
|
|
24498
|
+
columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24509
24499
|
displayName: "ColumnFilteredIcon"
|
|
24510
24500
|
})),
|
|
24511
|
-
|
|
24501
|
+
columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24512
24502
|
displayName: "ColumnSelectorIcon"
|
|
24513
24503
|
})),
|
|
24514
|
-
|
|
24504
|
+
columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24515
24505
|
displayName: "ColumnSortedAscendingIcon"
|
|
24516
24506
|
})),
|
|
24517
|
-
|
|
24507
|
+
columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24518
24508
|
displayName: "ColumnSortedDescendingIcon"
|
|
24519
24509
|
})),
|
|
24520
|
-
|
|
24510
|
+
densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24521
24511
|
displayName: "DensityCompactIcon"
|
|
24522
24512
|
})),
|
|
24523
|
-
|
|
24513
|
+
densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24524
24514
|
displayName: "DensityStandardIcon"
|
|
24525
24515
|
})),
|
|
24526
|
-
|
|
24516
|
+
densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24527
24517
|
displayName: "DensityComfortableIcon"
|
|
24528
24518
|
})),
|
|
24529
|
-
|
|
24519
|
+
detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24530
24520
|
displayName: "DetailPanelCollapseIcon"
|
|
24531
24521
|
})),
|
|
24532
|
-
|
|
24522
|
+
detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24533
24523
|
displayName: "DetailPanelExpandIcon"
|
|
24534
24524
|
})),
|
|
24535
|
-
|
|
24525
|
+
exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24536
24526
|
displayName: "ExportIcon"
|
|
24537
24527
|
})),
|
|
24538
|
-
|
|
24528
|
+
openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
|
|
24539
24529
|
displayName: "OpenFilterButtonIcon"
|
|
24540
24530
|
}, props))
|
|
24541
|
-
},
|
|
24542
|
-
|
|
24531
|
+
}, slots), {}, {
|
|
24532
|
+
toolbar: props => {
|
|
24543
24533
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
|
|
24544
24534
|
filterModel: filterModel,
|
|
24545
24535
|
onFilterModelChange: onFilterModelChange
|
|
@@ -24550,31 +24540,27 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24550
24540
|
selectionStatus: selectionStatus.current,
|
|
24551
24541
|
apiRef: apiRef,
|
|
24552
24542
|
isRowSelectable: isRowSelectable,
|
|
24553
|
-
|
|
24554
|
-
|
|
24555
|
-
|
|
24556
|
-
onPageSizeChange: onPageSizeChange,
|
|
24557
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24543
|
+
paginationModel: paginationModel,
|
|
24544
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24545
|
+
pageSizeOptions: pageSizeOptions,
|
|
24558
24546
|
paginationProps: paginationProps
|
|
24559
24547
|
}) : null);
|
|
24560
24548
|
},
|
|
24561
|
-
|
|
24549
|
+
pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
|
|
24562
24550
|
displaySelection: false,
|
|
24563
24551
|
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
24564
24552
|
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
24565
24553
|
selectionStatus: selectionStatus.current,
|
|
24566
24554
|
apiRef: apiRef,
|
|
24567
24555
|
isRowSelectable: isRowSelectable,
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
24571
|
-
onPageSizeChange: onPageSizeChange,
|
|
24572
|
-
rowsPerPageOptions: rowsPerPageOptions,
|
|
24556
|
+
paginationModel: paginationModel,
|
|
24557
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24558
|
+
pageSizeOptions: pageSizeOptions,
|
|
24573
24559
|
paginationProps: paginationProps
|
|
24574
24560
|
})) : null
|
|
24575
24561
|
}),
|
|
24576
|
-
|
|
24577
|
-
toolbar: _objectSpread2({},
|
|
24562
|
+
slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
|
|
24563
|
+
toolbar: _objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
|
|
24578
24564
|
}),
|
|
24579
24565
|
filterModel: filterModel,
|
|
24580
24566
|
initialState: initialState,
|
|
@@ -24582,40 +24568,38 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24582
24568
|
onFilterModelChange: onFilterModelChange,
|
|
24583
24569
|
pagination: pagination,
|
|
24584
24570
|
rows: rows,
|
|
24585
|
-
|
|
24586
|
-
|
|
24587
|
-
|
|
24588
|
-
|
|
24589
|
-
onPageSizeChange: onPageSizeChange,
|
|
24590
|
-
onSelectionModelChange: (newSelectionModel, details) => {
|
|
24571
|
+
pageSizeOptions: pageSizeOptions,
|
|
24572
|
+
paginationModel: paginationModel,
|
|
24573
|
+
onPaginationModelChange: onPaginationModelChange,
|
|
24574
|
+
onRowSelectionModelChange: (newSelectionModel, details) => {
|
|
24591
24575
|
if (pagination) {
|
|
24592
|
-
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(
|
|
24576
|
+
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref7 => {
|
|
24593
24577
|
var _props$isRowSelectabl;
|
|
24594
24578
|
let {
|
|
24595
24579
|
model
|
|
24596
|
-
} =
|
|
24580
|
+
} = _ref7;
|
|
24597
24581
|
return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
|
|
24598
24582
|
row: model
|
|
24599
24583
|
});
|
|
24600
|
-
}).map(
|
|
24584
|
+
}).map(_ref8 => {
|
|
24601
24585
|
let {
|
|
24602
24586
|
id
|
|
24603
|
-
} =
|
|
24587
|
+
} = _ref8;
|
|
24604
24588
|
return id;
|
|
24605
24589
|
}) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
24606
24590
|
const numberOfSelectableRowsInPage = selectableRowsInPage.length;
|
|
24607
|
-
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(
|
|
24591
|
+
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref9 => {
|
|
24608
24592
|
var _props$isRowSelectabl2;
|
|
24609
24593
|
let {
|
|
24610
24594
|
model
|
|
24611
|
-
} =
|
|
24595
|
+
} = _ref9;
|
|
24612
24596
|
return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
|
|
24613
24597
|
row: model
|
|
24614
24598
|
});
|
|
24615
|
-
}).map(
|
|
24599
|
+
}).map(_ref10 => {
|
|
24616
24600
|
let {
|
|
24617
24601
|
id
|
|
24618
|
-
} =
|
|
24602
|
+
} = _ref10;
|
|
24619
24603
|
return id;
|
|
24620
24604
|
}) : gridFilteredSortedRowIdsSelector(apiRef);
|
|
24621
24605
|
const numberOfSelectableRowsInTable = selectableRowsInTable.length;
|
|
@@ -24647,7 +24631,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24647
24631
|
};
|
|
24648
24632
|
}
|
|
24649
24633
|
}
|
|
24650
|
-
|
|
24634
|
+
onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
|
|
24651
24635
|
},
|
|
24652
24636
|
sx: _objectSpread2(_objectSpread2({}, sx), {}, {
|
|
24653
24637
|
'.MuiDataGrid-columnHeaders': {
|