@redsift/table 9.2.3-patch.2 → 9.2.4-muiv5
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 +9 -4
- package/index.js +126 -85
- package/index.js.map +1 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
4
|
-
export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
3
|
+
export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
5
4
|
import { Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
|
|
6
5
|
import React, { ReactNode, RefObject, ComponentProps } from 'react';
|
|
7
6
|
import { TablePaginationProps } from '@mui/material';
|
|
@@ -11,7 +10,7 @@ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any,
|
|
|
11
10
|
declare const IS_BETWEEN: {
|
|
12
11
|
label: string;
|
|
13
12
|
value: string;
|
|
14
|
-
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams
|
|
13
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
15
14
|
InputComponent: (props: any) => JSX.Element;
|
|
16
15
|
};
|
|
17
16
|
|
|
@@ -25,6 +24,12 @@ declare const CONTAINS_ANY_OF: {
|
|
|
25
24
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
26
25
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
27
26
|
};
|
|
27
|
+
declare const CONTAINS_ANY_OF_I: {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
31
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
32
|
+
};
|
|
28
33
|
|
|
29
34
|
declare const ENDS_WITH_ANY_OF: {
|
|
30
35
|
label: string;
|
|
@@ -158,4 +163,4 @@ interface TextCellProps extends ComponentProps<'div'> {
|
|
|
158
163
|
*/
|
|
159
164
|
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
160
165
|
|
|
161
|
-
export { CONTAINS_ANY_OF, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, StyledDataGridProps, TextCell, Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
|
166
|
+
export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, StyledDataGridProps, TextCell, Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridNumericOperators as getGridNumericOperators$1, GridFilterInputMultipleValue, getGridStringOperators as getGridStringOperators$1, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport,
|
|
2
|
-
export * 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, gridVisibleSortedRowIdsSelector, useGridApiRef, DataGridPro, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector } from '@mui/x-data-grid-pro';
|
|
3
2
|
export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import React__default, { Children, isValidElement, cloneElement, useLayoutEffect, useEffect, useRef, forwardRef, useState, useCallback, createElement } from 'react';
|
|
@@ -17467,7 +17466,7 @@ const isBetweenOperator = {
|
|
|
17467
17466
|
label: 'is between',
|
|
17468
17467
|
value: 'isBetween',
|
|
17469
17468
|
getApplyFilterFn: filterItem => {
|
|
17470
|
-
if (!filterItem.
|
|
17469
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17471
17470
|
return null;
|
|
17472
17471
|
}
|
|
17473
17472
|
if (!Array.isArray(filterItem.value) || filterItem.value.length !== 2) {
|
|
@@ -17480,7 +17479,7 @@ const isBetweenOperator = {
|
|
|
17480
17479
|
return null;
|
|
17481
17480
|
}
|
|
17482
17481
|
return params => {
|
|
17483
|
-
return params.value !== null &&
|
|
17482
|
+
return params.value !== null && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
|
|
17484
17483
|
};
|
|
17485
17484
|
},
|
|
17486
17485
|
InputComponent: InputNumberInterval
|
|
@@ -17493,7 +17492,7 @@ const containsAnyOfOperator = {
|
|
|
17493
17492
|
label: 'contains any of',
|
|
17494
17493
|
value: 'containsAnyOf',
|
|
17495
17494
|
getApplyFilterFn: filterItem => {
|
|
17496
|
-
if (!filterItem.
|
|
17495
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17497
17496
|
return null;
|
|
17498
17497
|
}
|
|
17499
17498
|
return params => {
|
|
@@ -17512,13 +17511,38 @@ const containsAnyOfOperator = {
|
|
|
17512
17511
|
},
|
|
17513
17512
|
InputComponent: GridFilterInputMultipleValue
|
|
17514
17513
|
};
|
|
17514
|
+
const containsAnyOfCIOperator = {
|
|
17515
|
+
label: 'contains any of (case insensitive)',
|
|
17516
|
+
value: 'containsAnyOf',
|
|
17517
|
+
getApplyFilterFn: filterItem => {
|
|
17518
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17519
|
+
return null;
|
|
17520
|
+
}
|
|
17521
|
+
return params => {
|
|
17522
|
+
if (filterItem.value.length === 0) {
|
|
17523
|
+
return true;
|
|
17524
|
+
}
|
|
17525
|
+
const paramValues = Array.isArray(params.value) ? params.value : [params.value];
|
|
17526
|
+
const paramValuesLower = paramValues.map(item => item.toLowerCase());
|
|
17527
|
+
let match = false;
|
|
17528
|
+
filterItem.value.forEach(filteredValue => {
|
|
17529
|
+
if (paramValuesLower.indexOf(filteredValue.toLowerCase()) !== -1) {
|
|
17530
|
+
match = true;
|
|
17531
|
+
}
|
|
17532
|
+
});
|
|
17533
|
+
return match;
|
|
17534
|
+
};
|
|
17535
|
+
},
|
|
17536
|
+
InputComponent: GridFilterInputMultipleValue
|
|
17537
|
+
};
|
|
17515
17538
|
const CONTAINS_ANY_OF = containsAnyOfOperator;
|
|
17539
|
+
const CONTAINS_ANY_OF_I = containsAnyOfCIOperator;
|
|
17516
17540
|
|
|
17517
17541
|
const endsWithAnyOfOperator = {
|
|
17518
17542
|
label: 'ends with any of',
|
|
17519
17543
|
value: 'endsWithAnyOf',
|
|
17520
17544
|
getApplyFilterFn: filterItem => {
|
|
17521
|
-
if (!filterItem.
|
|
17545
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17522
17546
|
return null;
|
|
17523
17547
|
}
|
|
17524
17548
|
return params => {
|
|
@@ -17545,7 +17569,7 @@ const isAnyOfOperator = {
|
|
|
17545
17569
|
label: 'is any of',
|
|
17546
17570
|
value: 'isAnyOf',
|
|
17547
17571
|
getApplyFilterFn: filterItem => {
|
|
17548
|
-
if (!filterItem.
|
|
17572
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17549
17573
|
return null;
|
|
17550
17574
|
}
|
|
17551
17575
|
return params => {
|
|
@@ -17569,7 +17593,7 @@ const isNotAnyOfOperator = {
|
|
|
17569
17593
|
label: 'is not any of',
|
|
17570
17594
|
value: 'isNotAnyOf',
|
|
17571
17595
|
getApplyFilterFn: filterItem => {
|
|
17572
|
-
if (!filterItem.
|
|
17596
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17573
17597
|
return null;
|
|
17574
17598
|
}
|
|
17575
17599
|
return params => {
|
|
@@ -17593,7 +17617,7 @@ const startsWithAnyOfOperator = {
|
|
|
17593
17617
|
label: 'starts with any of',
|
|
17594
17618
|
value: 'startsWithAnyOf',
|
|
17595
17619
|
getApplyFilterFn: filterItem => {
|
|
17596
|
-
if (!filterItem.
|
|
17620
|
+
if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
|
|
17597
17621
|
return null;
|
|
17598
17622
|
}
|
|
17599
17623
|
return params => {
|
|
@@ -21887,7 +21911,7 @@ const Toolbar$2 = props => {
|
|
|
21887
21911
|
let {
|
|
21888
21912
|
apiRef
|
|
21889
21913
|
} = _ref;
|
|
21890
|
-
return
|
|
21914
|
+
return gridVisibleSortedRowIdsSelector(apiRef);
|
|
21891
21915
|
}
|
|
21892
21916
|
},
|
|
21893
21917
|
printOptions: {
|
|
@@ -24342,7 +24366,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
24342
24366
|
} : void 0;
|
|
24343
24367
|
var TablePagination$1 = TablePagination;
|
|
24344
24368
|
|
|
24345
|
-
const _excluded$1 = ["apiRef", "autoHeight", "className", "
|
|
24369
|
+
const _excluded$1 = ["apiRef", "autoHeight", "className", "components", "componentsProps", "filterModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "onFilterModelChange", "onPageChange", "onPageSizeChange", "onSelectionModelChange", "page", "pageSize", "pagination", "paginationPlacement", "paginationProps", "rows", "rowsPerPageOptions", "sx"];
|
|
24346
24370
|
const COMPONENT_NAME$1 = 'DataGrid';
|
|
24347
24371
|
const CLASSNAME$1 = 'redsift-datagrid';
|
|
24348
24372
|
const DEFAULT_PROPS = {
|
|
@@ -24371,9 +24395,11 @@ const ControlledPagination = _ref3 => {
|
|
|
24371
24395
|
displayPagination = false,
|
|
24372
24396
|
selectionStatus,
|
|
24373
24397
|
apiRef,
|
|
24374
|
-
|
|
24375
|
-
|
|
24376
|
-
|
|
24398
|
+
page,
|
|
24399
|
+
onPageChange,
|
|
24400
|
+
pageSize,
|
|
24401
|
+
onPageSizeChange,
|
|
24402
|
+
rowsPerPageOptions,
|
|
24377
24403
|
isRowSelectable,
|
|
24378
24404
|
paginationProps
|
|
24379
24405
|
} = _ref3;
|
|
@@ -24403,28 +24429,24 @@ const ControlledPagination = _ref3 => {
|
|
|
24403
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({
|
|
24404
24430
|
component: "div",
|
|
24405
24431
|
count: numberOfFilteredRowsInTable,
|
|
24406
|
-
page:
|
|
24407
|
-
onPageChange: (event,
|
|
24408
|
-
|
|
24409
|
-
|
|
24410
|
-
|
|
24411
|
-
|
|
24412
|
-
|
|
24413
|
-
page: paginationModel.page,
|
|
24414
|
-
pageSize: parseInt(event.target.value, 10)
|
|
24415
|
-
}),
|
|
24416
|
-
rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
|
|
24432
|
+
page: page,
|
|
24433
|
+
onPageChange: (event, newPage) => onPageChange(newPage),
|
|
24434
|
+
rowsPerPage: pageSize,
|
|
24435
|
+
onRowsPerPageChange: event => {
|
|
24436
|
+
onPageSizeChange(parseInt(event.target.value, 10));
|
|
24437
|
+
},
|
|
24438
|
+
rowsPerPageOptions: displayRowsPerPage ? rowsPerPageOptions : []
|
|
24417
24439
|
}, paginationProps)) : null);
|
|
24418
24440
|
};
|
|
24419
24441
|
const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24420
|
-
var
|
|
24442
|
+
var _initialState$paginat, _initialState$paginat2;
|
|
24421
24443
|
const datagridRef = ref || useRef();
|
|
24422
24444
|
const {
|
|
24423
24445
|
apiRef: propsApiRef,
|
|
24424
24446
|
autoHeight,
|
|
24425
24447
|
className,
|
|
24426
|
-
|
|
24427
|
-
|
|
24448
|
+
components,
|
|
24449
|
+
componentsProps,
|
|
24428
24450
|
filterModel: propsFilterModel,
|
|
24429
24451
|
height: propsHeight,
|
|
24430
24452
|
hideToolbar,
|
|
@@ -24432,20 +24454,22 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24432
24454
|
isRowSelectable,
|
|
24433
24455
|
license,
|
|
24434
24456
|
onFilterModelChange: propsOnFilterModelChange,
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24457
|
+
onPageChange: propsOnPageChange,
|
|
24458
|
+
onPageSizeChange: propsOnPageSizeChange,
|
|
24459
|
+
onSelectionModelChange,
|
|
24460
|
+
page: propsPage,
|
|
24461
|
+
pageSize: propsPageSize,
|
|
24438
24462
|
pagination,
|
|
24439
24463
|
paginationPlacement,
|
|
24440
24464
|
paginationProps,
|
|
24441
24465
|
rows,
|
|
24442
|
-
|
|
24466
|
+
rowsPerPageOptions,
|
|
24443
24467
|
sx
|
|
24444
24468
|
} = props,
|
|
24445
24469
|
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
24446
24470
|
const _apiRef = useGridApiRef();
|
|
24447
24471
|
const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
|
|
24448
|
-
const RenderedToolbar =
|
|
24472
|
+
const RenderedToolbar = components !== null && components !== void 0 && components.Toolbar ? components.Toolbar : Toolbar$2;
|
|
24449
24473
|
LicenseInfo.setLicenseKey(license);
|
|
24450
24474
|
const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
|
|
24451
24475
|
const selectionStatus = useRef({
|
|
@@ -24463,22 +24487,33 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24463
24487
|
setFilterModel(model);
|
|
24464
24488
|
}
|
|
24465
24489
|
};
|
|
24466
|
-
const [
|
|
24467
|
-
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
|
|
24472
|
-
|
|
24490
|
+
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);
|
|
24491
|
+
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);
|
|
24492
|
+
const onPageChange = page => {
|
|
24493
|
+
if (propsOnPageChange) {
|
|
24494
|
+
propsOnPageChange(page, undefined);
|
|
24495
|
+
} else {
|
|
24496
|
+
setPage(page);
|
|
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);
|
|
24473
24508
|
} else {
|
|
24474
|
-
|
|
24509
|
+
setPageSize(pageSize);
|
|
24475
24510
|
}
|
|
24476
24511
|
};
|
|
24477
24512
|
useEffect(() => {
|
|
24478
|
-
if (
|
|
24479
|
-
|
|
24513
|
+
if (propsPageSize) {
|
|
24514
|
+
setPageSize(propsPageSize);
|
|
24480
24515
|
}
|
|
24481
|
-
}, [
|
|
24516
|
+
}, [propsPageSize]);
|
|
24482
24517
|
if (!Array.isArray(rows)) {
|
|
24483
24518
|
return null;
|
|
24484
24519
|
}
|
|
@@ -24490,46 +24525,46 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24490
24525
|
apiRef: apiRef,
|
|
24491
24526
|
autoHeight: autoHeight,
|
|
24492
24527
|
checkboxSelectionVisibleOnly: Boolean(pagination),
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
//
|
|
24497
|
-
|
|
24498
|
-
|
|
24528
|
+
components: _objectSpread2(_objectSpread2({
|
|
24529
|
+
BaseButton,
|
|
24530
|
+
BaseCheckbox,
|
|
24531
|
+
// BaseTextField,
|
|
24532
|
+
BasePopper,
|
|
24533
|
+
ColumnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24499
24534
|
displayName: "ColumnFilteredIcon"
|
|
24500
24535
|
})),
|
|
24501
|
-
|
|
24536
|
+
ColumnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24502
24537
|
displayName: "ColumnSelectorIcon"
|
|
24503
24538
|
})),
|
|
24504
|
-
|
|
24539
|
+
ColumnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24505
24540
|
displayName: "ColumnSortedAscendingIcon"
|
|
24506
24541
|
})),
|
|
24507
|
-
|
|
24542
|
+
ColumnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24508
24543
|
displayName: "ColumnSortedDescendingIcon"
|
|
24509
24544
|
})),
|
|
24510
|
-
|
|
24545
|
+
DensityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24511
24546
|
displayName: "DensityCompactIcon"
|
|
24512
24547
|
})),
|
|
24513
|
-
|
|
24548
|
+
DensityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24514
24549
|
displayName: "DensityStandardIcon"
|
|
24515
24550
|
})),
|
|
24516
|
-
|
|
24551
|
+
DensityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24517
24552
|
displayName: "DensityComfortableIcon"
|
|
24518
24553
|
})),
|
|
24519
|
-
|
|
24554
|
+
DetailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24520
24555
|
displayName: "DetailPanelCollapseIcon"
|
|
24521
24556
|
})),
|
|
24522
|
-
|
|
24557
|
+
DetailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24523
24558
|
displayName: "DetailPanelExpandIcon"
|
|
24524
24559
|
})),
|
|
24525
|
-
|
|
24560
|
+
ExportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({}, props, {
|
|
24526
24561
|
displayName: "ExportIcon"
|
|
24527
24562
|
})),
|
|
24528
|
-
|
|
24563
|
+
OpenFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$2({
|
|
24529
24564
|
displayName: "OpenFilterButtonIcon"
|
|
24530
24565
|
}, props))
|
|
24531
|
-
},
|
|
24532
|
-
|
|
24566
|
+
}, components), {}, {
|
|
24567
|
+
Toolbar: props => {
|
|
24533
24568
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !hideToolbar ? /*#__PURE__*/React__default.createElement(RenderedToolbar, _extends$2({}, props, {
|
|
24534
24569
|
filterModel: filterModel,
|
|
24535
24570
|
onFilterModelChange: onFilterModelChange
|
|
@@ -24540,27 +24575,31 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24540
24575
|
selectionStatus: selectionStatus.current,
|
|
24541
24576
|
apiRef: apiRef,
|
|
24542
24577
|
isRowSelectable: isRowSelectable,
|
|
24543
|
-
|
|
24544
|
-
|
|
24545
|
-
|
|
24578
|
+
page: page,
|
|
24579
|
+
onPageChange: onPageChange,
|
|
24580
|
+
pageSize: pageSize,
|
|
24581
|
+
onPageSizeChange: onPageSizeChange,
|
|
24582
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
24546
24583
|
paginationProps: paginationProps
|
|
24547
24584
|
}) : null);
|
|
24548
24585
|
},
|
|
24549
|
-
|
|
24586
|
+
Pagination: props => pagination ? /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$2({}, props, {
|
|
24550
24587
|
displaySelection: false,
|
|
24551
24588
|
displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
|
|
24552
24589
|
displayPagination: ['bottom', 'both'].includes(paginationPlacement),
|
|
24553
24590
|
selectionStatus: selectionStatus.current,
|
|
24554
24591
|
apiRef: apiRef,
|
|
24555
24592
|
isRowSelectable: isRowSelectable,
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24593
|
+
page: page,
|
|
24594
|
+
onPageChange: onPageChange,
|
|
24595
|
+
pageSize: pageSize,
|
|
24596
|
+
onPageSizeChange: onPageSizeChange,
|
|
24597
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
24559
24598
|
paginationProps: paginationProps
|
|
24560
24599
|
})) : null
|
|
24561
24600
|
}),
|
|
24562
|
-
|
|
24563
|
-
toolbar: _objectSpread2({},
|
|
24601
|
+
componentsProps: _objectSpread2(_objectSpread2({}, componentsProps), {}, {
|
|
24602
|
+
toolbar: _objectSpread2({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.toolbar)
|
|
24564
24603
|
}),
|
|
24565
24604
|
filterModel: filterModel,
|
|
24566
24605
|
initialState: initialState,
|
|
@@ -24568,38 +24607,40 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24568
24607
|
onFilterModelChange: onFilterModelChange,
|
|
24569
24608
|
pagination: pagination,
|
|
24570
24609
|
rows: rows,
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
|
|
24610
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
24611
|
+
page: page,
|
|
24612
|
+
onPageChange: onPageChange,
|
|
24613
|
+
pageSize: pageSize,
|
|
24614
|
+
onPageSizeChange: onPageSizeChange,
|
|
24615
|
+
onSelectionModelChange: (newSelectionModel, details) => {
|
|
24575
24616
|
if (pagination) {
|
|
24576
|
-
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(
|
|
24617
|
+
const selectableRowsInPage = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref4 => {
|
|
24577
24618
|
var _props$isRowSelectabl;
|
|
24578
24619
|
let {
|
|
24579
24620
|
model
|
|
24580
|
-
} =
|
|
24621
|
+
} = _ref4;
|
|
24581
24622
|
return (_props$isRowSelectabl = props.isRowSelectable) === null || _props$isRowSelectabl === void 0 ? void 0 : _props$isRowSelectabl.call(props, {
|
|
24582
24623
|
row: model
|
|
24583
24624
|
});
|
|
24584
|
-
}).map(
|
|
24625
|
+
}).map(_ref5 => {
|
|
24585
24626
|
let {
|
|
24586
24627
|
id
|
|
24587
|
-
} =
|
|
24628
|
+
} = _ref5;
|
|
24588
24629
|
return id;
|
|
24589
24630
|
}) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
24590
24631
|
const numberOfSelectableRowsInPage = selectableRowsInPage.length;
|
|
24591
|
-
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(
|
|
24632
|
+
const selectableRowsInTable = props.isRowSelectable && typeof props.isRowSelectable === 'function' ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref6 => {
|
|
24592
24633
|
var _props$isRowSelectabl2;
|
|
24593
24634
|
let {
|
|
24594
24635
|
model
|
|
24595
|
-
} =
|
|
24636
|
+
} = _ref6;
|
|
24596
24637
|
return (_props$isRowSelectabl2 = props.isRowSelectable) === null || _props$isRowSelectabl2 === void 0 ? void 0 : _props$isRowSelectabl2.call(props, {
|
|
24597
24638
|
row: model
|
|
24598
24639
|
});
|
|
24599
|
-
}).map(
|
|
24640
|
+
}).map(_ref7 => {
|
|
24600
24641
|
let {
|
|
24601
24642
|
id
|
|
24602
|
-
} =
|
|
24643
|
+
} = _ref7;
|
|
24603
24644
|
return id;
|
|
24604
24645
|
}) : gridFilteredSortedRowIdsSelector(apiRef);
|
|
24605
24646
|
const numberOfSelectableRowsInTable = selectableRowsInTable.length;
|
|
@@ -24631,7 +24672,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24631
24672
|
};
|
|
24632
24673
|
}
|
|
24633
24674
|
}
|
|
24634
|
-
|
|
24675
|
+
onSelectionModelChange === null || onSelectionModelChange === void 0 ? void 0 : onSelectionModelChange(newSelectionModel, details);
|
|
24635
24676
|
},
|
|
24636
24677
|
sx: _objectSpread2(_objectSpread2({}, sx), {}, {
|
|
24637
24678
|
'.MuiDataGrid-columnHeaders': {
|
|
@@ -24706,5 +24747,5 @@ const TextCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24706
24747
|
TextCell.className = CLASSNAME;
|
|
24707
24748
|
TextCell.displayName = COMPONENT_NAME;
|
|
24708
24749
|
|
|
24709
|
-
export { CONTAINS_ANY_OF, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, TextCell, Toolbar$2 as Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
|
24750
|
+
export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, TextCell, Toolbar$2 as Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
|
24710
24751
|
//# sourceMappingURL=index.js.map
|