@mui/x-data-grid 7.5.0 → 7.6.0
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 +148 -5418
- package/DataGrid/DataGrid.js +2 -2
- 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 +2 -2
- 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/columnHeaders/GridGenericColumnHeaderItem.js +0 -7
- 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/columnResize/useGridColumnResize.js +5 -26
- package/hooks/features/columns/gridColumnsUtils.js +18 -13
- package/hooks/features/columns/useGridColumnSpanning.js +5 -5
- 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/hooks/features/virtualization/useGridVirtualScroller.js +8 -1
- package/index.d.ts +1 -0
- package/index.js +1 -2
- package/locales/faIR.js +4 -4
- package/locales/fiFI.js +4 -5
- package/models/api/gridColumnSpanning.d.ts +2 -0
- package/models/gridExport.d.ts +7 -0
- package/models/gridSlotsComponent.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +2 -2
- 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 +2 -2
- 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/columnHeaders/GridGenericColumnHeaderItem.js +0 -7
- 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/columnResize/useGridColumnResize.js +5 -26
- package/modern/hooks/features/columns/gridColumnsUtils.js +18 -13
- package/modern/hooks/features/columns/useGridColumnSpanning.js +5 -5
- package/modern/hooks/features/export/serializers/csvSerializer.js +28 -32
- package/modern/hooks/features/export/useGridCsvExport.js +8 -5
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +8 -1
- package/modern/index.js +1 -2
- package/modern/locales/faIR.js +4 -4
- package/modern/locales/fiFI.js +4 -5
- package/modern/utils/domUtils.js +1 -2
- package/node/DataGrid/DataGrid.js +2 -2
- 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 +2 -2
- 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/columnHeaders/GridGenericColumnHeaderItem.js +0 -7
- 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/columnResize/useGridColumnResize.js +5 -26
- package/node/hooks/features/columns/gridColumnsUtils.js +18 -13
- package/node/hooks/features/columns/useGridColumnSpanning.js +5 -5
- package/node/hooks/features/export/serializers/csvSerializer.js +28 -32
- package/node/hooks/features/export/useGridCsvExport.js +8 -5
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +8 -1
- package/node/index.js +1 -1
- package/node/locales/faIR.js +4 -4
- package/node/locales/fiFI.js +4 -5
- package/node/utils/domUtils.js +1 -2
- package/package.json +4 -3
- package/utils/domUtils.js +1 -2
|
@@ -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
|
}
|
|
@@ -13,27 +13,6 @@ import { clamp } from '../../../utils/utils';
|
|
|
13
13
|
import { useTimeout } from '../../utils/useTimeout';
|
|
14
14
|
import { GridPinnedColumnPosition } from '../columns/gridColumnsInterfaces';
|
|
15
15
|
import { gridColumnsStateSelector } from '../columns';
|
|
16
|
-
// TODO: remove support for Safari < 13.
|
|
17
|
-
// https://caniuse.com/#search=touch-action
|
|
18
|
-
//
|
|
19
|
-
// Safari, on iOS, supports touch action since v13.
|
|
20
|
-
// Over 80% of the iOS phones are compatible
|
|
21
|
-
// in August 2020.
|
|
22
|
-
// Utilizing the CSS.supports method to check if touch-action is supported.
|
|
23
|
-
// Since CSS.supports is supported on all but Edge@12 and IE and touch-action
|
|
24
|
-
// is supported on both Edge@12 and IE if CSS.supports is not available that means that
|
|
25
|
-
// touch-action will be supported
|
|
26
|
-
let cachedSupportsTouchActionNone = false;
|
|
27
|
-
function doesSupportTouchActionNone() {
|
|
28
|
-
if (cachedSupportsTouchActionNone === undefined) {
|
|
29
|
-
if (typeof CSS !== 'undefined' && typeof CSS.supports === 'function') {
|
|
30
|
-
cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none');
|
|
31
|
-
} else {
|
|
32
|
-
cachedSupportsTouchActionNone = true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return cachedSupportsTouchActionNone;
|
|
36
|
-
}
|
|
37
16
|
function trackFinger(event, currentTouchId) {
|
|
38
17
|
if (currentTouchId !== undefined && event.changedTouches) {
|
|
39
18
|
for (let i = 0; i < event.changedTouches.length; i += 1) {
|
|
@@ -294,6 +273,10 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
294
273
|
if (refs.colDef) {
|
|
295
274
|
apiRef.current.setColumnWidth(refs.colDef.field, refs.colDef.width);
|
|
296
275
|
logger.debug(`Updating col ${refs.colDef.field} with new width: ${refs.colDef.width}`);
|
|
276
|
+
|
|
277
|
+
// Since during resizing we update the columns width outside of React, React is unable to
|
|
278
|
+
// reapply the right style properties. We need to sync the state manually.
|
|
279
|
+
// So we reapply the same logic as in https://github.com/mui/mui-x/blob/0511bf65543ca05d2602a5a3e0a6156f2fc8e759/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx#L405
|
|
297
280
|
const columnsState = gridColumnsStateSelector(apiRef.current.state);
|
|
298
281
|
refs.groupHeaderElements.forEach(element => {
|
|
299
282
|
const fields = getFieldsFromGroupHeaderElem(element);
|
|
@@ -387,10 +370,6 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
387
370
|
if (!cellSeparator) {
|
|
388
371
|
return;
|
|
389
372
|
}
|
|
390
|
-
// If touch-action: none; is not supported we need to prevent the scroll manually.
|
|
391
|
-
if (!doesSupportTouchActionNone()) {
|
|
392
|
-
event.preventDefault();
|
|
393
|
-
}
|
|
394
373
|
const touch = event.changedTouches[0];
|
|
395
374
|
if (touch != null) {
|
|
396
375
|
// A number that uniquely identifies the current finger in the touch session.
|
|
@@ -562,7 +541,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
562
541
|
}
|
|
563
542
|
});
|
|
564
543
|
useGridNativeEventListener(apiRef, () => apiRef.current.columnHeadersContainerRef?.current, 'touchstart', handleTouchStart, {
|
|
565
|
-
passive:
|
|
544
|
+
passive: true
|
|
566
545
|
});
|
|
567
546
|
useGridApiMethod(apiRef, {
|
|
568
547
|
autosizeColumns
|
|
@@ -117,24 +117,29 @@ export const hydrateColumnsWidth = (rawState, dimensions) => {
|
|
|
117
117
|
const flexColumns = [];
|
|
118
118
|
|
|
119
119
|
// For the non-flex columns, compute their width
|
|
120
|
-
// For the flex columns, compute
|
|
120
|
+
// For the flex columns, compute their minimum width and how much width must be allocated during the flex allocation
|
|
121
121
|
rawState.orderedFields.forEach(columnField => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
computedWidth = 0;
|
|
130
|
-
flexColumns.push(newColumn);
|
|
122
|
+
let column = rawState.lookup[columnField];
|
|
123
|
+
let computedWidth = 0;
|
|
124
|
+
let isFlex = false;
|
|
125
|
+
if (rawState.columnVisibilityModel[columnField] !== false) {
|
|
126
|
+
if (column.flex && column.flex > 0) {
|
|
127
|
+
totalFlexUnits += column.flex;
|
|
128
|
+
isFlex = true;
|
|
131
129
|
} else {
|
|
132
|
-
computedWidth = clamp(
|
|
130
|
+
computedWidth = clamp(column.width || GRID_STRING_COL_DEF.width, column.minWidth || GRID_STRING_COL_DEF.minWidth, column.maxWidth || GRID_STRING_COL_DEF.maxWidth);
|
|
133
131
|
}
|
|
134
132
|
widthAllocatedBeforeFlex += computedWidth;
|
|
135
|
-
newColumn.computedWidth = computedWidth;
|
|
136
133
|
}
|
|
137
|
-
|
|
134
|
+
if (column.computedWidth !== computedWidth) {
|
|
135
|
+
column = _extends({}, column, {
|
|
136
|
+
computedWidth
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (isFlex) {
|
|
140
|
+
flexColumns.push(column);
|
|
141
|
+
}
|
|
142
|
+
columnsLookup[columnField] = column;
|
|
138
143
|
});
|
|
139
144
|
const availableWidth = dimensions === undefined ? 0 : dimensions.viewportOuterSize.width - (dimensions.hasScrollY ? dimensions.scrollbarSize : 0);
|
|
140
145
|
const initialFreeSpace = Math.max(availableWidth - widthAllocatedBeforeFlex, 0);
|
|
@@ -10,6 +10,9 @@ export const useGridColumnSpanning = apiRef => {
|
|
|
10
10
|
const getCellColSpanInfo = (rowId, columnIndex) => {
|
|
11
11
|
return lookup.current[rowId]?.[columnIndex];
|
|
12
12
|
};
|
|
13
|
+
const resetColSpan = () => {
|
|
14
|
+
lookup.current = {};
|
|
15
|
+
};
|
|
13
16
|
|
|
14
17
|
// Calculate `colSpan` for each cell in the row
|
|
15
18
|
const calculateColSpan = React.useCallback(({
|
|
@@ -37,15 +40,12 @@ export const useGridColumnSpanning = apiRef => {
|
|
|
37
40
|
unstable_getCellColSpanInfo: getCellColSpanInfo
|
|
38
41
|
};
|
|
39
42
|
const columnSpanningPrivateApi = {
|
|
43
|
+
resetColSpan,
|
|
40
44
|
calculateColSpan
|
|
41
45
|
};
|
|
42
46
|
useGridApiMethod(apiRef, columnSpanningPublicApi, 'public');
|
|
43
47
|
useGridApiMethod(apiRef, columnSpanningPrivateApi, 'private');
|
|
44
|
-
|
|
45
|
-
// `colSpan` needs to be recalculated after column reordering
|
|
46
|
-
lookup.current = {};
|
|
47
|
-
}, []);
|
|
48
|
-
useGridApiEventHandler(apiRef, 'columnOrderChange', handleColumnReorderChange);
|
|
48
|
+
useGridApiEventHandler(apiRef, 'columnOrderChange', resetColSpan);
|
|
49
49
|
};
|
|
50
50
|
function calculateCellColSpan(params) {
|
|
51
51
|
const {
|
|
@@ -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 => {
|
|
@@ -42,7 +42,14 @@ const createScrollCache = (mode, rowBufferPx, columnBufferPx, verticalBuffer, ho
|
|
|
42
42
|
direction: ScrollDirection.NONE,
|
|
43
43
|
buffer: bufferForDirection(mode, ScrollDirection.NONE, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer)
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
let isJSDOM = false;
|
|
46
|
+
try {
|
|
47
|
+
if (typeof window !== 'undefined') {
|
|
48
|
+
isJSDOM = /jsdom/.test(window.navigator.userAgent);
|
|
49
|
+
}
|
|
50
|
+
} catch (_) {
|
|
51
|
+
/* ignore */
|
|
52
|
+
}
|
|
46
53
|
export const useGridVirtualScroller = () => {
|
|
47
54
|
const apiRef = useGridPrivateApiContext();
|
|
48
55
|
const rootProps = useGridRootProps();
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid v7.
|
|
2
|
+
* @mui/x-data-grid v7.6.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -17,7 +17,6 @@ export * from './context';
|
|
|
17
17
|
export * from './colDef';
|
|
18
18
|
export * from './utils';
|
|
19
19
|
export { GridColumnHeaders } from './components/GridColumnHeaders';
|
|
20
|
-
|
|
21
20
|
/**
|
|
22
21
|
* Reexportable components.
|
|
23
22
|
*/
|
package/modern/locales/faIR.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getGridLocalization } from '../utils/getGridLocalization';
|
|
|
3
3
|
const faIRGrid = {
|
|
4
4
|
// Root
|
|
5
5
|
noRowsLabel: 'بدون سطر',
|
|
6
|
-
noResultsOverlayLabel: '
|
|
6
|
+
noResultsOverlayLabel: 'نتیجهای پیدا نشد.',
|
|
7
7
|
// Density selector toolbar button text
|
|
8
8
|
toolbarDensity: 'تراکم',
|
|
9
9
|
toolbarDensityLabel: 'تراکم',
|
|
@@ -97,12 +97,12 @@ const faIRGrid = {
|
|
|
97
97
|
columnMenuFilter: 'فیلتر',
|
|
98
98
|
columnMenuHideColumn: 'مخفی',
|
|
99
99
|
columnMenuUnsort: 'نامرتبکردن',
|
|
100
|
-
columnMenuSortAsc: '
|
|
101
|
-
columnMenuSortDesc: '
|
|
100
|
+
columnMenuSortAsc: 'مرتبسازی صعودی',
|
|
101
|
+
columnMenuSortDesc: 'مرتبسازی نزولی',
|
|
102
102
|
// Column header text
|
|
103
103
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
|
104
104
|
columnHeaderFiltersLabel: 'نمایش فیلترها',
|
|
105
|
-
columnHeaderSortIconLabel: '
|
|
105
|
+
columnHeaderSortIconLabel: 'مرتبسازی',
|
|
106
106
|
// Rows selected footer text
|
|
107
107
|
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} سطرهای انتخاب شده` : `${count.toLocaleString()} سطر انتخاب شده`,
|
|
108
108
|
// Total row amount footer text
|
package/modern/locales/fiFI.js
CHANGED
|
@@ -30,11 +30,10 @@ const fiFIGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Tulosta',
|
|
31
31
|
toolbarExportExcel: 'Lataa Excel-muodossa',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Hae',
|
|
34
|
+
columnsManagementNoColumns: 'Ei sarakkeita näytettäväksi',
|
|
35
|
+
columnsManagementShowHideAllText: 'Näytä/Piilota kaikki',
|
|
36
|
+
columnsManagementReset: 'Palauta',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
40
39
|
filterPanelRemoveAll: 'Poista kaikki',
|
package/modern/utils/domUtils.js
CHANGED
|
@@ -54,8 +54,7 @@ export function findHeaderElementFromField(elem, field) {
|
|
|
54
54
|
return elem.querySelector(`[data-field="${field}"]`);
|
|
55
55
|
}
|
|
56
56
|
export function getFieldsFromGroupHeaderElem(colCellEl) {
|
|
57
|
-
|
|
58
|
-
return fieldsString?.startsWith('|-') ? fieldsString.slice(2, -2).split('-|-') : [];
|
|
57
|
+
return colCellEl.getAttribute('data-fields').slice(2, -2).split('-|-');
|
|
59
58
|
}
|
|
60
59
|
export function findGroupHeaderElementsFromField(elem, field) {
|
|
61
60
|
return Array.from(elem.querySelectorAll(`[data-fields*="|-${field}-|"]`) ?? []);
|
|
@@ -53,7 +53,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
|
53
53
|
DataGridRaw.propTypes = {
|
|
54
54
|
// ----------------------------- Warning --------------------------------
|
|
55
55
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
|
-
// | To update them edit the TypeScript types and run "
|
|
56
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
57
57
|
// ----------------------------------------------------------------------
|
|
58
58
|
/**
|
|
59
59
|
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
@@ -70,7 +70,7 @@ DataGridRaw.propTypes = {
|
|
|
70
70
|
*/
|
|
71
71
|
'aria-labelledby': _propTypes.default.string,
|
|
72
72
|
/**
|
|
73
|
-
* If `true`, the Data Grid height is dynamic and
|
|
73
|
+
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
74
74
|
* @default false
|
|
75
75
|
*/
|
|
76
76
|
autoHeight: _propTypes.default.bool,
|
|
@@ -59,7 +59,7 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
|
|
|
59
59
|
process.env.NODE_ENV !== "production" ? GridColumnHeaders.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
|
columnGroupHeaderFocus: _propTypes.default.shape({
|
|
65
65
|
depth: _propTypes.default.number.isRequired,
|
|
@@ -42,7 +42,7 @@ const GridFooter = exports.GridFooter = /*#__PURE__*/React.forwardRef(function G
|
|
|
42
42
|
process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
|
|
43
43
|
// ----------------------------- Warning --------------------------------
|
|
44
44
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
45
|
-
// | To update them edit the TypeScript types and run "
|
|
45
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
46
46
|
// ----------------------------------------------------------------------
|
|
47
47
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
48
48
|
} : void 0;
|
|
@@ -23,7 +23,7 @@ const GridLoadingOverlay = exports.GridLoadingOverlay = /*#__PURE__*/React.forwa
|
|
|
23
23
|
process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
24
24
|
// ----------------------------- Warning --------------------------------
|
|
25
25
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
26
|
-
// | To update them edit the TypeScript types and run "
|
|
26
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
27
27
|
// ----------------------------------------------------------------------
|
|
28
28
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
29
29
|
} : void 0;
|
|
@@ -25,7 +25,7 @@ const GridNoRowsOverlay = exports.GridNoRowsOverlay = /*#__PURE__*/React.forward
|
|
|
25
25
|
process.env.NODE_ENV !== "production" ? GridNoRowsOverlay.propTypes = {
|
|
26
26
|
// ----------------------------- Warning --------------------------------
|
|
27
27
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
28
|
-
// | To update them edit the TypeScript types and run "
|
|
28
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
29
29
|
// ----------------------------------------------------------------------
|
|
30
30
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
31
31
|
} : void 0;
|
|
@@ -144,7 +144,7 @@ const GridPagination = exports.GridPagination = /*#__PURE__*/React.forwardRef(fu
|
|
|
144
144
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
145
145
|
// ----------------------------- Warning --------------------------------
|
|
146
146
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
147
|
-
// | To update them edit the TypeScript types and run "
|
|
147
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
148
148
|
// ----------------------------------------------------------------------
|
|
149
149
|
component: _propTypes.default.elementType
|
|
150
150
|
} : void 0;
|
|
@@ -363,7 +363,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
363
363
|
process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
364
364
|
// ----------------------------- Warning --------------------------------
|
|
365
365
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
366
|
-
// | To update them edit the TypeScript types and run "
|
|
366
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
367
367
|
// ----------------------------------------------------------------------
|
|
368
368
|
dimensions: _propTypes.default.shape({
|
|
369
369
|
bottomContainerHeight: _propTypes.default.number.isRequired,
|
|
@@ -64,7 +64,7 @@ const GridRowCount = exports.GridRowCount = /*#__PURE__*/React.forwardRef(functi
|
|
|
64
64
|
process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
|
|
65
65
|
// ----------------------------- Warning --------------------------------
|
|
66
66
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
67
|
-
// | To update them edit the TypeScript types and run "
|
|
67
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
68
68
|
// ----------------------------------------------------------------------
|
|
69
69
|
rowCount: _propTypes.default.number.isRequired,
|
|
70
70
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GridScrollArea = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
10
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
11
|
var _utils = require("@mui/utils");
|
|
13
12
|
var _system = require("@mui/system");
|
|
@@ -148,11 +147,4 @@ function GridScrollAreaRaw(props) {
|
|
|
148
147
|
style: style
|
|
149
148
|
});
|
|
150
149
|
}
|
|
151
|
-
process.env.NODE_ENV !== "production" ? GridScrollAreaRaw.propTypes = {
|
|
152
|
-
// ----------------------------- Warning --------------------------------
|
|
153
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
154
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
155
|
-
// ----------------------------------------------------------------------
|
|
156
|
-
scrollDirection: _propTypes.default.oneOf(['left', 'right']).isRequired
|
|
157
|
-
} : void 0;
|
|
158
150
|
const GridScrollArea = exports.GridScrollArea = (0, _fastMemo.fastMemo)(GridScrollAreaRaw);
|
|
@@ -68,7 +68,7 @@ const GridSelectedRowCount = exports.GridSelectedRowCount = /*#__PURE__*/React.f
|
|
|
68
68
|
process.env.NODE_ENV !== "production" ? GridSelectedRowCount.propTypes = {
|
|
69
69
|
// ----------------------------- Warning --------------------------------
|
|
70
70
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
71
|
-
// | To update them edit the TypeScript types and run "
|
|
71
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
72
72
|
// ----------------------------------------------------------------------
|
|
73
73
|
selectedRowCount: _propTypes.default.number.isRequired,
|
|
74
74
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
@@ -85,7 +85,7 @@ function GridOverlayWrapper(props) {
|
|
|
85
85
|
process.env.NODE_ENV !== "production" ? GridOverlayWrapper.propTypes = {
|
|
86
86
|
// ----------------------------- Warning --------------------------------
|
|
87
87
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
88
|
-
// | To update them edit the TypeScript types and run "
|
|
88
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
89
89
|
// ----------------------------------------------------------------------
|
|
90
90
|
overlayType: _propTypes.default.string.isRequired
|
|
91
91
|
} : void 0;
|
|
@@ -200,7 +200,7 @@ function GridActionsCell(props) {
|
|
|
200
200
|
process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
|
|
201
201
|
// ----------------------------- Warning --------------------------------
|
|
202
202
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
203
|
-
// | To update them edit the TypeScript types and run "
|
|
203
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
204
204
|
// ----------------------------------------------------------------------
|
|
205
205
|
api: _propTypes.default.object,
|
|
206
206
|
/**
|
|
@@ -68,7 +68,7 @@ const GridActionsCellItem = exports.GridActionsCellItem = /*#__PURE__*/React.for
|
|
|
68
68
|
process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
|
|
69
69
|
// ----------------------------- Warning --------------------------------
|
|
70
70
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
71
|
-
// | To update them edit the TypeScript types and run "
|
|
71
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
72
72
|
// ----------------------------------------------------------------------
|
|
73
73
|
/**
|
|
74
74
|
* from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
|