@mui/x-data-grid 7.4.0 → 7.5.1
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/CHANGELOG.md +132 -5395
- package/DataGrid/DataGrid.js +10 -5
- package/components/GridColumnHeaders.js +1 -1
- package/components/GridFooter.js +1 -1
- package/components/GridLoadingOverlay.js +1 -1
- package/components/GridNoRowsOverlay.js +1 -1
- package/components/GridPagination.js +1 -1
- package/components/GridRow.js +1 -1
- package/components/GridRowCount.js +1 -1
- package/components/GridScrollArea.d.ts +2 -5
- package/components/GridScrollArea.js +1 -10
- package/components/GridSelectedRowCount.js +1 -1
- package/components/base/GridOverlays.js +1 -1
- package/components/cell/GridActionsCell.js +1 -1
- package/components/cell/GridActionsCellItem.js +1 -1
- package/components/cell/GridBooleanCell.js +1 -1
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridEditBooleanCell.js +1 -1
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.js +1 -1
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/cell/GridSkeletonCell.js +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/containers/GridFooterContainer.js +1 -1
- package/components/containers/GridOverlay.js +1 -1
- package/components/containers/GridRoot.js +1 -1
- package/components/containers/GridToolbarContainer.js +1 -1
- package/components/menu/GridMenu.js +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/components/panel/GridColumnsPanel.js +1 -1
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/GridPanelContent.js +1 -1
- package/components/panel/GridPanelFooter.js +1 -1
- package/components/panel/GridPanelHeader.js +1 -1
- package/components/panel/GridPanelWrapper.js +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/toolbar/GridToolbar.js +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExport.js +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +8 -5
- package/hooks/features/editing/useGridRowEditing.js +5 -1
- package/hooks/features/export/serializers/csvSerializer.d.ts +3 -6
- package/hooks/features/export/serializers/csvSerializer.js +28 -32
- package/hooks/features/export/useGridCsvExport.js +8 -5
- package/index.js +1 -1
- package/internals/utils/propValidation.d.ts +2 -2
- package/internals/utils/propValidation.js +6 -9
- package/locales/esES.js +4 -4
- package/locales/nbNO.js +4 -5
- package/models/gridExport.d.ts +7 -0
- package/modern/DataGrid/DataGrid.js +10 -5
- package/modern/components/GridColumnHeaders.js +1 -1
- package/modern/components/GridFooter.js +1 -1
- package/modern/components/GridLoadingOverlay.js +1 -1
- package/modern/components/GridNoRowsOverlay.js +1 -1
- package/modern/components/GridPagination.js +1 -1
- package/modern/components/GridRow.js +1 -1
- package/modern/components/GridRowCount.js +1 -1
- package/modern/components/GridScrollArea.js +1 -10
- package/modern/components/GridSelectedRowCount.js +1 -1
- package/modern/components/base/GridOverlays.js +1 -1
- package/modern/components/cell/GridActionsCell.js +1 -1
- package/modern/components/cell/GridActionsCellItem.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +1 -1
- package/modern/components/cell/GridCell.js +1 -1
- package/modern/components/cell/GridEditBooleanCell.js +1 -1
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +1 -1
- package/modern/components/cell/GridEditSingleSelectCell.js +1 -1
- package/modern/components/cell/GridSkeletonCell.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/modern/components/containers/GridFooterContainer.js +1 -1
- package/modern/components/containers/GridOverlay.js +1 -1
- package/modern/components/containers/GridRoot.js +1 -1
- package/modern/components/containers/GridToolbarContainer.js +1 -1
- package/modern/components/menu/GridMenu.js +1 -1
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/modern/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/modern/components/panel/GridColumnsPanel.js +1 -1
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/GridPanelContent.js +1 -1
- package/modern/components/panel/GridPanelFooter.js +1 -1
- package/modern/components/panel/GridPanelHeader.js +1 -1
- package/modern/components/panel/GridPanelWrapper.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/toolbar/GridToolbar.js +1 -1
- package/modern/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExport.js +1 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +8 -5
- package/modern/hooks/features/editing/useGridRowEditing.js +5 -1
- package/modern/hooks/features/export/serializers/csvSerializer.js +28 -32
- package/modern/hooks/features/export/useGridCsvExport.js +8 -5
- package/modern/index.js +1 -1
- package/modern/internals/utils/propValidation.js +6 -9
- package/modern/locales/esES.js +4 -4
- package/modern/locales/nbNO.js +4 -5
- package/node/DataGrid/DataGrid.js +10 -5
- package/node/components/GridColumnHeaders.js +1 -1
- package/node/components/GridFooter.js +1 -1
- package/node/components/GridLoadingOverlay.js +1 -1
- package/node/components/GridNoRowsOverlay.js +1 -1
- package/node/components/GridPagination.js +1 -1
- package/node/components/GridRow.js +1 -1
- package/node/components/GridRowCount.js +1 -1
- package/node/components/GridScrollArea.js +0 -8
- package/node/components/GridSelectedRowCount.js +1 -1
- package/node/components/base/GridOverlays.js +1 -1
- package/node/components/cell/GridActionsCell.js +1 -1
- package/node/components/cell/GridActionsCellItem.js +1 -1
- package/node/components/cell/GridBooleanCell.js +1 -1
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/cell/GridEditBooleanCell.js +1 -1
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +1 -1
- package/node/components/cell/GridEditSingleSelectCell.js +1 -1
- package/node/components/cell/GridSkeletonCell.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/node/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/node/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/node/components/containers/GridFooterContainer.js +1 -1
- package/node/components/containers/GridOverlay.js +1 -1
- package/node/components/containers/GridRoot.js +1 -1
- package/node/components/containers/GridToolbarContainer.js +1 -1
- package/node/components/menu/GridMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +1 -1
- package/node/components/panel/GridPanel.js +1 -1
- package/node/components/panel/GridPanelContent.js +1 -1
- package/node/components/panel/GridPanelFooter.js +1 -1
- package/node/components/panel/GridPanelHeader.js +1 -1
- package/node/components/panel/GridPanelWrapper.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/node/components/toolbar/GridToolbar.js +1 -1
- package/node/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/node/components/toolbar/GridToolbarExport.js +1 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +8 -5
- package/node/hooks/features/editing/useGridRowEditing.js +5 -1
- package/node/hooks/features/export/serializers/csvSerializer.js +28 -32
- package/node/hooks/features/export/useGridCsvExport.js +8 -5
- package/node/index.js +1 -1
- package/node/internals/utils/propValidation.js +9 -12
- package/node/locales/esES.js +4 -4
- package/node/locales/nbNO.js +4 -5
- package/package.json +2 -2
|
@@ -123,7 +123,7 @@ function GridFilterInputSingleSelect(props) {
|
|
|
123
123
|
process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes = {
|
|
124
124
|
// ----------------------------- Warning --------------------------------
|
|
125
125
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
126
|
-
// | To update them edit the TypeScript types and run "
|
|
126
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
127
127
|
// ----------------------------------------------------------------------
|
|
128
128
|
apiRef: PropTypes.shape({
|
|
129
129
|
current: PropTypes.object.isRequired
|
|
@@ -76,7 +76,7 @@ function GridFilterInputValue(props) {
|
|
|
76
76
|
process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
|
|
77
77
|
// ----------------------------- Warning --------------------------------
|
|
78
78
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
79
|
-
// | To update them edit the TypeScript types and run "
|
|
79
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
80
80
|
// ----------------------------------------------------------------------
|
|
81
81
|
apiRef: PropTypes.shape({
|
|
82
82
|
current: PropTypes.object.isRequired
|
|
@@ -187,7 +187,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
187
187
|
process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
188
188
|
// ----------------------------- Warning --------------------------------
|
|
189
189
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
190
|
-
// | To update them edit the TypeScript types and run "
|
|
190
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
191
191
|
// ----------------------------------------------------------------------
|
|
192
192
|
/**
|
|
193
193
|
* @ignore - do not document.
|
|
@@ -46,7 +46,7 @@ const GridToolbar = /*#__PURE__*/React.forwardRef(function GridToolbar(props, re
|
|
|
46
46
|
process.env.NODE_ENV !== "production" ? GridToolbar.propTypes = {
|
|
47
47
|
// ----------------------------- Warning --------------------------------
|
|
48
48
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
49
|
-
// | To update them edit the TypeScript types and run "
|
|
49
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
50
50
|
// ----------------------------------------------------------------------
|
|
51
51
|
/**
|
|
52
52
|
* Props passed to the quick filter component.
|
|
@@ -56,7 +56,7 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
56
56
|
process.env.NODE_ENV !== "production" ? GridToolbarColumnsButton.propTypes = {
|
|
57
57
|
// ----------------------------- Warning --------------------------------
|
|
58
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
59
|
-
// | To update them edit the TypeScript types and run "
|
|
59
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
60
60
|
// ----------------------------------------------------------------------
|
|
61
61
|
/**
|
|
62
62
|
* The props used for each slot inside.
|
|
@@ -119,7 +119,7 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
119
119
|
process.env.NODE_ENV !== "production" ? GridToolbarDensitySelector.propTypes = {
|
|
120
120
|
// ----------------------------- Warning --------------------------------
|
|
121
121
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
122
|
-
// | To update them edit the TypeScript types and run "
|
|
122
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
123
123
|
// ----------------------------------------------------------------------
|
|
124
124
|
/**
|
|
125
125
|
* The props used for each slot inside.
|
|
@@ -67,7 +67,7 @@ const GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExpo
|
|
|
67
67
|
process.env.NODE_ENV !== "production" ? GridToolbarExport.propTypes = {
|
|
68
68
|
// ----------------------------- Warning --------------------------------
|
|
69
69
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
70
|
-
// | To update them edit the TypeScript types and run "
|
|
70
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
71
71
|
// ----------------------------------------------------------------------
|
|
72
72
|
csvOptions: PropTypes.object,
|
|
73
73
|
printOptions: PropTypes.object,
|
|
@@ -84,7 +84,7 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
84
84
|
process.env.NODE_ENV !== "production" ? GridToolbarExportContainer.propTypes = {
|
|
85
85
|
// ----------------------------- Warning --------------------------------
|
|
86
86
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
87
|
-
// | To update them edit the TypeScript types and run "
|
|
87
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
88
88
|
// ----------------------------------------------------------------------
|
|
89
89
|
/**
|
|
90
90
|
* The props used for each slot inside.
|
|
@@ -119,7 +119,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
119
119
|
process.env.NODE_ENV !== "production" ? GridToolbarFilterButton.propTypes = {
|
|
120
120
|
// ----------------------------- Warning --------------------------------
|
|
121
121
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
122
|
-
// | To update them edit the TypeScript types and run "
|
|
122
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
123
123
|
// ----------------------------------------------------------------------
|
|
124
124
|
/**
|
|
125
125
|
* The props used for each slot inside.
|
|
@@ -127,7 +127,7 @@ function GridToolbarQuickFilter(props) {
|
|
|
127
127
|
process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
128
128
|
// ----------------------------- Warning --------------------------------
|
|
129
129
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
130
|
-
// | To update them edit the TypeScript types and run "
|
|
130
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
131
131
|
// ----------------------------------------------------------------------
|
|
132
132
|
/**
|
|
133
133
|
* The debounce time in milliseconds.
|
|
@@ -66,18 +66,21 @@ export const useGridClipboard = (apiRef, props) => {
|
|
|
66
66
|
if (selectedRows.size > 0) {
|
|
67
67
|
textToCopy = apiRef.current.getDataAsCsv({
|
|
68
68
|
includeHeaders: false,
|
|
69
|
-
// TODO: make it configurable
|
|
70
69
|
delimiter: clipboardCopyCellDelimiter,
|
|
71
|
-
shouldAppendQuotes: false
|
|
70
|
+
shouldAppendQuotes: false,
|
|
71
|
+
escapeFormulas: false
|
|
72
72
|
});
|
|
73
73
|
} else {
|
|
74
74
|
const focusedCell = gridFocusCellSelector(apiRef);
|
|
75
75
|
if (focusedCell) {
|
|
76
76
|
const cellParams = apiRef.current.getCellParams(focusedCell.id, focusedCell.field);
|
|
77
77
|
textToCopy = serializeCellValue(cellParams, {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
csvOptions: {
|
|
79
|
+
delimiter: clipboardCopyCellDelimiter,
|
|
80
|
+
shouldAppendQuotes: false,
|
|
81
|
+
escapeFormulas: false
|
|
82
|
+
},
|
|
83
|
+
ignoreValueFormatter
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
86
|
}
|
|
@@ -550,7 +550,11 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
550
550
|
const copyOfPrevRowModesModel = prevRowModesModel.current;
|
|
551
551
|
prevRowModesModel.current = deepClone(rowModesModel); // Do a deep-clone because the attributes might be changed later
|
|
552
552
|
|
|
553
|
-
Object.
|
|
553
|
+
const ids = new Set([...Object.keys(rowModesModel), ...Object.keys(copyOfPrevRowModesModel)]);
|
|
554
|
+
Array.from(ids).forEach(id => {
|
|
555
|
+
const params = rowModesModel[id] ?? {
|
|
556
|
+
mode: GridRowModes.View
|
|
557
|
+
};
|
|
554
558
|
const prevMode = copyOfPrevRowModesModel[id]?.mode || GridRowModes.View;
|
|
555
559
|
const originalId = idToIdLookup[id] ?? id;
|
|
556
560
|
if (params.mode === GridRowModes.Edit && prevMode === GridRowModes.View) {
|
|
@@ -4,19 +4,16 @@ import type { GridCellParams } from '../../../../models/params/gridCellParams';
|
|
|
4
4
|
import type { GridStateColDef } from '../../../../models/colDef/gridColDef';
|
|
5
5
|
import type { GridApiCommunity } from '../../../../models/api/gridApiCommunity';
|
|
6
6
|
export declare const serializeCellValue: (cellParams: GridCellParams, options: {
|
|
7
|
-
|
|
7
|
+
csvOptions: CSVOptions;
|
|
8
8
|
ignoreValueFormatter: boolean;
|
|
9
|
-
shouldAppendQuotes: boolean;
|
|
10
9
|
}) => any;
|
|
10
|
+
type CSVOptions = Required<Pick<GridCsvExportOptions, 'delimiter' | 'shouldAppendQuotes' | 'escapeFormulas'>>;
|
|
11
11
|
interface BuildCSVOptions {
|
|
12
12
|
columns: GridStateColDef[];
|
|
13
13
|
rowIds: GridRowId[];
|
|
14
|
-
|
|
15
|
-
includeHeaders: NonNullable<GridCsvExportOptions['includeHeaders']>;
|
|
16
|
-
includeColumnGroupsHeaders: NonNullable<GridCsvExportOptions['includeColumnGroupsHeaders']>;
|
|
14
|
+
csvOptions: Required<Pick<GridCsvExportOptions, 'delimiter' | 'includeColumnGroupsHeaders' | 'includeHeaders' | 'shouldAppendQuotes' | 'escapeFormulas'>>;
|
|
17
15
|
ignoreValueFormatter: boolean;
|
|
18
16
|
apiRef: React.MutableRefObject<GridApiCommunity>;
|
|
19
|
-
shouldAppendQuotes: boolean;
|
|
20
17
|
}
|
|
21
18
|
export declare function buildCSV(options: BuildCSVOptions): string;
|
|
22
19
|
export {};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../../../../colDef';
|
|
2
2
|
import { buildWarning } from '../../../../utils/warning';
|
|
3
|
-
function sanitizeCellValue(value,
|
|
3
|
+
function sanitizeCellValue(value, csvOptions) {
|
|
4
4
|
if (typeof value === 'string') {
|
|
5
|
-
if (shouldAppendQuotes) {
|
|
5
|
+
if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) {
|
|
6
6
|
const escapedValue = value.replace(/"/g, '""');
|
|
7
|
-
// Make sure value containing delimiter or line break won't be split into multiple
|
|
8
|
-
if ([
|
|
7
|
+
// Make sure value containing delimiter or line break won't be split into multiple cells
|
|
8
|
+
if ([csvOptions.delimiter, '\n', '\r', '"'].some(delimiter => value.includes(delimiter))) {
|
|
9
9
|
return `"${escapedValue}"`;
|
|
10
10
|
}
|
|
11
|
+
if (csvOptions.escapeFormulas) {
|
|
12
|
+
// See https://owasp.org/www-community/attacks/CSV_Injection
|
|
13
|
+
if (['=', '+', '-', '@', '\t', '\r'].includes(escapedValue[0])) {
|
|
14
|
+
return `'${escapedValue}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
11
17
|
return escapedValue;
|
|
12
18
|
}
|
|
13
19
|
return value;
|
|
@@ -16,9 +22,8 @@ function sanitizeCellValue(value, delimiterCharacter, shouldAppendQuotes) {
|
|
|
16
22
|
}
|
|
17
23
|
export const serializeCellValue = (cellParams, options) => {
|
|
18
24
|
const {
|
|
19
|
-
|
|
20
|
-
ignoreValueFormatter
|
|
21
|
-
shouldAppendQuotes
|
|
25
|
+
csvOptions,
|
|
26
|
+
ignoreValueFormatter
|
|
22
27
|
} = options;
|
|
23
28
|
let value;
|
|
24
29
|
if (ignoreValueFormatter) {
|
|
@@ -35,7 +40,7 @@ export const serializeCellValue = (cellParams, options) => {
|
|
|
35
40
|
} else {
|
|
36
41
|
value = cellParams.formattedValue;
|
|
37
42
|
}
|
|
38
|
-
return sanitizeCellValue(value,
|
|
43
|
+
return sanitizeCellValue(value, csvOptions);
|
|
39
44
|
};
|
|
40
45
|
const objectFormattedValueWarning = buildWarning(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
|
|
41
46
|
class CSVRow {
|
|
@@ -47,12 +52,12 @@ class CSVRow {
|
|
|
47
52
|
}
|
|
48
53
|
addValue(value) {
|
|
49
54
|
if (!this.isEmpty) {
|
|
50
|
-
this.rowString += this.options.
|
|
55
|
+
this.rowString += this.options.csvOptions.delimiter;
|
|
51
56
|
}
|
|
52
57
|
if (value === null || value === undefined) {
|
|
53
58
|
this.rowString += '';
|
|
54
59
|
} else if (typeof this.options.sanitizeCellValue === 'function') {
|
|
55
|
-
this.rowString += this.options.sanitizeCellValue(value, this.options.
|
|
60
|
+
this.rowString += this.options.sanitizeCellValue(value, this.options.csvOptions);
|
|
56
61
|
} else {
|
|
57
62
|
this.rowString += value;
|
|
58
63
|
}
|
|
@@ -66,13 +71,11 @@ const serializeRow = ({
|
|
|
66
71
|
id,
|
|
67
72
|
columns,
|
|
68
73
|
getCellParams,
|
|
69
|
-
|
|
70
|
-
ignoreValueFormatter
|
|
71
|
-
shouldAppendQuotes
|
|
74
|
+
csvOptions,
|
|
75
|
+
ignoreValueFormatter
|
|
72
76
|
}) => {
|
|
73
77
|
const row = new CSVRow({
|
|
74
|
-
|
|
75
|
-
shouldAppendQuotes
|
|
78
|
+
csvOptions
|
|
76
79
|
});
|
|
77
80
|
columns.forEach(column => {
|
|
78
81
|
const cellParams = getCellParams(id, column.field);
|
|
@@ -82,9 +85,8 @@ const serializeRow = ({
|
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
87
|
row.addValue(serializeCellValue(cellParams, {
|
|
85
|
-
delimiterCharacter,
|
|
86
88
|
ignoreValueFormatter,
|
|
87
|
-
|
|
89
|
+
csvOptions
|
|
88
90
|
}));
|
|
89
91
|
});
|
|
90
92
|
return row.getRowString();
|
|
@@ -93,27 +95,23 @@ export function buildCSV(options) {
|
|
|
93
95
|
const {
|
|
94
96
|
columns,
|
|
95
97
|
rowIds,
|
|
96
|
-
|
|
97
|
-
includeHeaders,
|
|
98
|
-
includeColumnGroupsHeaders,
|
|
98
|
+
csvOptions,
|
|
99
99
|
ignoreValueFormatter,
|
|
100
|
-
apiRef
|
|
101
|
-
shouldAppendQuotes
|
|
100
|
+
apiRef
|
|
102
101
|
} = options;
|
|
103
102
|
const CSVBody = rowIds.reduce((acc, id) => `${acc}${serializeRow({
|
|
104
103
|
id,
|
|
105
104
|
columns,
|
|
106
105
|
getCellParams: apiRef.current.getCellParams,
|
|
107
|
-
delimiterCharacter,
|
|
108
106
|
ignoreValueFormatter,
|
|
109
|
-
|
|
107
|
+
csvOptions
|
|
110
108
|
})}\r\n`, '').trim();
|
|
111
|
-
if (!includeHeaders) {
|
|
109
|
+
if (!csvOptions.includeHeaders) {
|
|
112
110
|
return CSVBody;
|
|
113
111
|
}
|
|
114
112
|
const filteredColumns = columns.filter(column => column.field !== GRID_CHECKBOX_SELECTION_COL_DEF.field);
|
|
115
113
|
const headerRows = [];
|
|
116
|
-
if (includeColumnGroupsHeaders) {
|
|
114
|
+
if (csvOptions.includeColumnGroupsHeaders) {
|
|
117
115
|
const columnGroupLookup = apiRef.current.getAllGroupDetails();
|
|
118
116
|
let maxColumnGroupsDepth = 0;
|
|
119
117
|
const columnGroupPathsLookup = filteredColumns.reduce((acc, column) => {
|
|
@@ -124,9 +122,8 @@ export function buildCSV(options) {
|
|
|
124
122
|
}, {});
|
|
125
123
|
for (let i = 0; i < maxColumnGroupsDepth; i += 1) {
|
|
126
124
|
const headerGroupRow = new CSVRow({
|
|
127
|
-
|
|
128
|
-
sanitizeCellValue
|
|
129
|
-
shouldAppendQuotes
|
|
125
|
+
csvOptions,
|
|
126
|
+
sanitizeCellValue
|
|
130
127
|
});
|
|
131
128
|
headerRows.push(headerGroupRow);
|
|
132
129
|
filteredColumns.forEach(column => {
|
|
@@ -137,9 +134,8 @@ export function buildCSV(options) {
|
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
136
|
const mainHeaderRow = new CSVRow({
|
|
140
|
-
|
|
141
|
-
sanitizeCellValue
|
|
142
|
-
shouldAppendQuotes
|
|
137
|
+
csvOptions,
|
|
138
|
+
sanitizeCellValue
|
|
143
139
|
});
|
|
144
140
|
filteredColumns.forEach(column => {
|
|
145
141
|
mainHeaderRow.addValue(column.headerName || column.field);
|
|
@@ -31,12 +31,15 @@ export const useGridCsvExport = (apiRef, props) => {
|
|
|
31
31
|
return buildCSV({
|
|
32
32
|
columns: exportedColumns,
|
|
33
33
|
rowIds: exportedRowIds,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
csvOptions: {
|
|
35
|
+
delimiter: options.delimiter || ',',
|
|
36
|
+
shouldAppendQuotes: options.shouldAppendQuotes ?? true,
|
|
37
|
+
includeHeaders: options.includeHeaders ?? true,
|
|
38
|
+
includeColumnGroupsHeaders: options.includeColumnGroupsHeaders ?? true,
|
|
39
|
+
escapeFormulas: options.escapeFormulas ?? true
|
|
40
|
+
},
|
|
37
41
|
ignoreValueFormatter,
|
|
38
|
-
apiRef
|
|
39
|
-
shouldAppendQuotes: options.shouldAppendQuotes ?? true
|
|
42
|
+
apiRef
|
|
40
43
|
});
|
|
41
44
|
}, [logger, apiRef, ignoreValueFormatter]);
|
|
42
45
|
const exportDataAsCsv = React.useCallback(options => {
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataGridProcessedProps } from '../../models/props/DataGridProps';
|
|
2
2
|
export type PropValidator<TProps> = (props: TProps) => string | undefined;
|
|
3
3
|
export declare const propValidatorsDataGrid: PropValidator<DataGridProcessedProps>[];
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
4
|
+
export declare function validateProps<TProps>(props: TProps, validators: PropValidator<TProps>[]): void;
|
|
5
|
+
export declare function clearWarningsCache(): void;
|
|
@@ -2,23 +2,20 @@ import { isNumber } from '../../utils/utils';
|
|
|
2
2
|
import { GridSignature } from '../../hooks/utils/useGridApiEventHandler';
|
|
3
3
|
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
4
4
|
const warnedOnceCache = new Set();
|
|
5
|
-
|
|
5
|
+
function warnOnce(message) {
|
|
6
6
|
if (!warnedOnceCache.has(message)) {
|
|
7
7
|
console.error(message);
|
|
8
8
|
warnedOnceCache.add(message);
|
|
9
9
|
}
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
if (process.env.NODE_ENV === 'production') {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export function validateProps(props, validators) {
|
|
15
12
|
validators.forEach(validator => {
|
|
16
13
|
const warning = validator(props);
|
|
17
14
|
if (warning) {
|
|
18
15
|
warnOnce(warning);
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
|
-
}
|
|
22
|
-
export
|
|
18
|
+
}
|
|
19
|
+
export function clearWarningsCache() {
|
|
23
20
|
warnedOnceCache.clear();
|
|
24
|
-
}
|
|
21
|
+
}
|
package/locales/esES.js
CHANGED
|
@@ -140,10 +140,10 @@ const esESGrid = {
|
|
|
140
140
|
rowReorderingHeaderName: 'Reordenar filas',
|
|
141
141
|
// Aggregation
|
|
142
142
|
aggregationMenuItemHeader: 'Agregación',
|
|
143
|
-
aggregationFunctionLabelSum: '
|
|
144
|
-
aggregationFunctionLabelAvg: '
|
|
145
|
-
aggregationFunctionLabelMin: '
|
|
146
|
-
aggregationFunctionLabelMax: '
|
|
143
|
+
aggregationFunctionLabelSum: 'suma',
|
|
144
|
+
aggregationFunctionLabelAvg: 'promedio',
|
|
145
|
+
aggregationFunctionLabelMin: 'mínimo',
|
|
146
|
+
aggregationFunctionLabelMax: 'máximo',
|
|
147
147
|
aggregationFunctionLabelSize: 'tamaño'
|
|
148
148
|
};
|
|
149
149
|
export const esES = getGridLocalization(esESGrid, esESCore);
|
package/locales/nbNO.js
CHANGED
|
@@ -30,11 +30,10 @@ const nbNOGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Skriv ut',
|
|
31
31
|
toolbarExportExcel: 'Last ned som Excel',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Søk',
|
|
34
|
+
columnsManagementNoColumns: 'Ingen kolonner',
|
|
35
|
+
columnsManagementShowHideAllText: 'Vis/skjul alle',
|
|
36
|
+
columnsManagementReset: 'Nullstill',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Legg til filter',
|
|
40
39
|
filterPanelRemoveAll: 'Fjern alle',
|
package/models/gridExport.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export interface GridFileExportOptions<Api extends GridApiCommon = GridApiCommun
|
|
|
37
37
|
* @returns {GridRowId[]} The list of row ids to export.
|
|
38
38
|
*/
|
|
39
39
|
getRowsToExport?: (params: GridGetRowsToExportParams<Api>) => GridRowId[];
|
|
40
|
+
/**
|
|
41
|
+
* If `false`, the formulas in the cells will not be escaped.
|
|
42
|
+
* It is not recommended to disable this option as it exposes the user to potential CSV injection attacks.
|
|
43
|
+
* See https://owasp.org/www-community/attacks/CSV_Injection for more information.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
escapeFormulas?: boolean;
|
|
40
47
|
}
|
|
41
48
|
export interface GridGetRowsToExportParams<Api extends GridApiCommon = GridApiCommunity> {
|
|
42
49
|
/**
|
|
@@ -9,13 +9,18 @@ import { useDataGridComponent } from './useDataGridComponent';
|
|
|
9
9
|
import { useDataGridProps } from './useDataGridProps';
|
|
10
10
|
import { propValidatorsDataGrid, validateProps } from '../internals/utils/propValidation';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
let propValidators;
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
propValidators = [...propValidatorsDataGrid,
|
|
15
|
+
// Only validate in MIT version
|
|
16
|
+
props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
|
|
17
|
+
}
|
|
15
18
|
const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
|
|
16
19
|
const props = useDataGridProps(inProps);
|
|
17
20
|
const privateApiRef = useDataGridComponent(props.apiRef, props);
|
|
18
|
-
|
|
21
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
+
validateProps(props, propValidators);
|
|
23
|
+
}
|
|
19
24
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
20
25
|
privateApiRef: privateApiRef,
|
|
21
26
|
props: props,
|
|
@@ -40,7 +45,7 @@ export const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
|
40
45
|
DataGridRaw.propTypes = {
|
|
41
46
|
// ----------------------------- Warning --------------------------------
|
|
42
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
43
|
-
// | To update them edit the TypeScript types and run "
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
44
49
|
// ----------------------------------------------------------------------
|
|
45
50
|
/**
|
|
46
51
|
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
@@ -50,7 +50,7 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
|
|
|
50
50
|
process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
|
|
51
51
|
// ----------------------------- Warning --------------------------------
|
|
52
52
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
-
// | To update them edit the TypeScript types and run "
|
|
53
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
54
54
|
// ----------------------------------------------------------------------
|
|
55
55
|
columnGroupHeaderFocus: PropTypes.shape({
|
|
56
56
|
depth: PropTypes.number.isRequired,
|
|
@@ -33,7 +33,7 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
|
|
|
33
33
|
process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
|
|
34
34
|
// ----------------------------- Warning --------------------------------
|
|
35
35
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
36
|
-
// | To update them edit the TypeScript types and run "
|
|
36
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
37
37
|
// ----------------------------------------------------------------------
|
|
38
38
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
39
39
|
} : void 0;
|
|
@@ -14,7 +14,7 @@ const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOve
|
|
|
14
14
|
process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
15
15
|
// ----------------------------- Warning --------------------------------
|
|
16
16
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
17
|
-
// | To update them edit the TypeScript types and run "
|
|
17
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
18
18
|
// ----------------------------------------------------------------------
|
|
19
19
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
20
20
|
} : void 0;
|
|
@@ -16,7 +16,7 @@ const GridNoRowsOverlay = /*#__PURE__*/React.forwardRef(function GridNoRowsOverl
|
|
|
16
16
|
process.env.NODE_ENV !== "production" ? GridNoRowsOverlay.propTypes = {
|
|
17
17
|
// ----------------------------- Warning --------------------------------
|
|
18
18
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
19
|
-
// | To update them edit the TypeScript types and run "
|
|
19
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
20
20
|
// ----------------------------------------------------------------------
|
|
21
21
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
22
22
|
} : void 0;
|
|
@@ -135,7 +135,7 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
135
135
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
136
136
|
// ----------------------------- Warning --------------------------------
|
|
137
137
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
138
|
-
// | To update them edit the TypeScript types and run "
|
|
138
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
139
139
|
// ----------------------------------------------------------------------
|
|
140
140
|
component: PropTypes.elementType
|
|
141
141
|
} : void 0;
|
|
@@ -354,7 +354,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
354
354
|
process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
355
355
|
// ----------------------------- Warning --------------------------------
|
|
356
356
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
357
|
-
// | To update them edit the TypeScript types and run "
|
|
357
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
358
358
|
// ----------------------------------------------------------------------
|
|
359
359
|
dimensions: PropTypes.shape({
|
|
360
360
|
bottomContainerHeight: PropTypes.number.isRequired,
|
|
@@ -55,7 +55,7 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
|
|
|
55
55
|
process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
|
|
56
56
|
// ----------------------------- Warning --------------------------------
|
|
57
57
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
58
|
-
// | To update them edit the TypeScript types and run "
|
|
58
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
59
59
|
// ----------------------------------------------------------------------
|
|
60
60
|
rowCount: PropTypes.number.isRequired,
|
|
61
61
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
6
5
|
import { styled } from '@mui/system';
|
|
@@ -139,12 +138,4 @@ function GridScrollAreaRaw(props) {
|
|
|
139
138
|
style: style
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
|
-
|
|
143
|
-
// ----------------------------- Warning --------------------------------
|
|
144
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
145
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
146
|
-
// ----------------------------------------------------------------------
|
|
147
|
-
scrollDirection: PropTypes.oneOf(['left', 'right']).isRequired
|
|
148
|
-
} : void 0;
|
|
149
|
-
const GridScrollArea = fastMemo(GridScrollAreaRaw);
|
|
150
|
-
export { GridScrollArea };
|
|
141
|
+
export const GridScrollArea = fastMemo(GridScrollAreaRaw);
|
|
@@ -59,7 +59,7 @@ const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelected
|
|
|
59
59
|
process.env.NODE_ENV !== "production" ? GridSelectedRowCount.propTypes = {
|
|
60
60
|
// ----------------------------- Warning --------------------------------
|
|
61
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
62
|
-
// | To update them edit the TypeScript types and run "
|
|
62
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
63
63
|
// ----------------------------------------------------------------------
|
|
64
64
|
selectedRowCount: PropTypes.number.isRequired,
|
|
65
65
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
@@ -76,7 +76,7 @@ function GridOverlayWrapper(props) {
|
|
|
76
76
|
process.env.NODE_ENV !== "production" ? GridOverlayWrapper.propTypes = {
|
|
77
77
|
// ----------------------------- Warning --------------------------------
|
|
78
78
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
79
|
-
// | To update them edit the TypeScript types and run "
|
|
79
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
80
80
|
// ----------------------------------------------------------------------
|
|
81
81
|
overlayType: PropTypes.string.isRequired
|
|
82
82
|
} : void 0;
|
|
@@ -190,7 +190,7 @@ function GridActionsCell(props) {
|
|
|
190
190
|
process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
|
|
191
191
|
// ----------------------------- Warning --------------------------------
|
|
192
192
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
193
|
-
// | To update them edit the TypeScript types and run "
|
|
193
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
194
194
|
// ----------------------------------------------------------------------
|
|
195
195
|
api: PropTypes.object,
|
|
196
196
|
/**
|
|
@@ -59,7 +59,7 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
59
59
|
process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
|
|
60
60
|
// ----------------------------- Warning --------------------------------
|
|
61
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
62
|
-
// | To update them edit the TypeScript types and run "
|
|
62
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
63
63
|
// ----------------------------------------------------------------------
|
|
64
64
|
/**
|
|
65
65
|
* from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
|
|
@@ -40,7 +40,7 @@ function GridBooleanCellRaw(props) {
|
|
|
40
40
|
process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
|
|
41
41
|
// ----------------------------- Warning --------------------------------
|
|
42
42
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
43
|
-
// | To update them edit the TypeScript types and run "
|
|
43
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
44
44
|
// ----------------------------------------------------------------------
|
|
45
45
|
/**
|
|
46
46
|
* GridApi that let you manipulate the grid.
|
|
@@ -316,7 +316,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
316
316
|
process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
317
317
|
// ----------------------------- Warning --------------------------------
|
|
318
318
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
319
|
-
// | To update them edit the TypeScript types and run "
|
|
319
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
320
320
|
// ----------------------------------------------------------------------
|
|
321
321
|
align: PropTypes.oneOf(['center', 'left', 'right']).isRequired,
|
|
322
322
|
className: PropTypes.string,
|