@mui/x-data-grid 5.9.0 → 5.10.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 +36 -0
- package/README.md +5 -3
- package/components/GridRow.js +5 -0
- package/components/containers/GridRootStyles.js +36 -1
- package/components/menu/GridMenu.js +1 -0
- package/constants/defaultGridSlotsComponents.js +3 -2
- package/constants/gridClasses.d.ts +20 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +3 -1
- package/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/rows/useGridRows.js +19 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +2 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +10 -0
- package/index.js +1 -1
- package/legacy/components/GridRow.js +5 -0
- package/legacy/components/containers/GridRootStyles.js +26 -5
- package/legacy/components/menu/GridMenu.js +1 -0
- package/legacy/constants/defaultGridSlotsComponents.js +3 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +3 -1
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/legacy/hooks/features/rows/useGridRows.js +25 -0
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +10 -0
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +3 -1
- package/legacy/locales/bgBG.js +3 -1
- package/legacy/locales/csCZ.js +2 -0
- package/legacy/locales/daDK.js +3 -1
- package/legacy/locales/deDE.js +3 -1
- package/legacy/locales/elGR.js +2 -0
- package/legacy/locales/esES.js +2 -0
- package/legacy/locales/faIR.js +3 -1
- package/legacy/locales/fiFI.js +2 -0
- package/legacy/locales/frFR.js +2 -0
- package/legacy/locales/heIL.js +3 -1
- package/legacy/locales/huHU.js +3 -1
- package/legacy/locales/itIT.js +2 -0
- package/legacy/locales/jaJP.js +2 -0
- package/legacy/locales/koKR.js +2 -0
- package/legacy/locales/nlNL.js +2 -0
- package/legacy/locales/plPL.js +3 -1
- package/legacy/locales/ptBR.js +3 -1
- package/legacy/locales/ruRU.js +2 -0
- package/legacy/locales/skSK.js +2 -0
- package/legacy/locales/trTR.js +3 -1
- package/legacy/locales/ukUA.js +2 -0
- package/legacy/locales/viVN.js +2 -0
- package/legacy/locales/zhCN.js +2 -0
- package/legacy/models/events/gridEvents.js +6 -0
- package/locales/arSD.js +3 -1
- package/locales/bgBG.js +3 -1
- package/locales/csCZ.js +2 -0
- package/locales/daDK.js +3 -1
- package/locales/deDE.js +3 -1
- package/locales/elGR.js +2 -0
- package/locales/esES.js +2 -0
- package/locales/faIR.js +3 -1
- package/locales/fiFI.js +2 -0
- package/locales/frFR.js +2 -0
- package/locales/heIL.js +3 -1
- package/locales/huHU.js +3 -1
- package/locales/itIT.js +2 -0
- package/locales/jaJP.js +2 -0
- package/locales/koKR.js +2 -0
- package/locales/nlNL.js +2 -0
- package/locales/plPL.js +3 -1
- package/locales/ptBR.js +3 -1
- package/locales/ruRU.js +2 -0
- package/locales/skSK.js +2 -0
- package/locales/trTR.js +3 -1
- package/locales/ukUA.js +2 -0
- package/locales/viVN.js +2 -0
- package/locales/zhCN.js +2 -0
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/api/gridRowApi.d.ts +6 -0
- package/models/events/gridEventLookup.d.ts +20 -0
- package/models/events/gridEvents.d.ts +32 -0
- package/models/events/gridEvents.js +6 -0
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/modern/components/GridRow.js +5 -0
- package/modern/components/containers/GridRootStyles.js +36 -1
- package/modern/components/menu/GridMenu.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +3 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +3 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/modern/hooks/features/rows/useGridRows.js +19 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +10 -0
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +3 -1
- package/modern/locales/bgBG.js +3 -1
- package/modern/locales/csCZ.js +2 -0
- package/modern/locales/daDK.js +3 -1
- package/modern/locales/deDE.js +3 -1
- package/modern/locales/elGR.js +2 -0
- package/modern/locales/esES.js +2 -0
- package/modern/locales/faIR.js +3 -1
- package/modern/locales/fiFI.js +2 -0
- package/modern/locales/frFR.js +2 -0
- package/modern/locales/heIL.js +3 -1
- package/modern/locales/huHU.js +3 -1
- package/modern/locales/itIT.js +2 -0
- package/modern/locales/jaJP.js +2 -0
- package/modern/locales/koKR.js +2 -0
- package/modern/locales/nlNL.js +2 -0
- package/modern/locales/plPL.js +3 -1
- package/modern/locales/ptBR.js +3 -1
- package/modern/locales/ruRU.js +2 -0
- package/modern/locales/skSK.js +2 -0
- package/modern/locales/trTR.js +3 -1
- package/modern/locales/ukUA.js +2 -0
- package/modern/locales/viVN.js +2 -0
- package/modern/locales/zhCN.js +2 -0
- package/modern/models/events/gridEvents.js +6 -0
- package/node/components/GridRow.js +5 -0
- package/node/components/containers/GridRootStyles.js +36 -1
- package/node/components/menu/GridMenu.js +1 -0
- package/node/constants/defaultGridSlotsComponents.js +2 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +3 -1
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/node/hooks/features/rows/useGridRows.js +19 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +10 -0
- package/node/index.js +1 -1
- package/node/locales/arSD.js +3 -1
- package/node/locales/bgBG.js +3 -1
- package/node/locales/csCZ.js +2 -0
- package/node/locales/daDK.js +3 -1
- package/node/locales/deDE.js +3 -1
- package/node/locales/elGR.js +2 -0
- package/node/locales/esES.js +2 -0
- package/node/locales/faIR.js +3 -1
- package/node/locales/fiFI.js +2 -0
- package/node/locales/frFR.js +2 -0
- package/node/locales/heIL.js +3 -1
- package/node/locales/huHU.js +3 -1
- package/node/locales/itIT.js +2 -0
- package/node/locales/jaJP.js +2 -0
- package/node/locales/koKR.js +2 -0
- package/node/locales/nlNL.js +2 -0
- package/node/locales/plPL.js +3 -1
- package/node/locales/ptBR.js +3 -1
- package/node/locales/ruRU.js +2 -0
- package/node/locales/skSK.js +2 -0
- package/node/locales/trTR.js +3 -1
- package/node/locales/ukUA.js +2 -0
- package/node/locales/viVN.js +2 -0
- package/node/locales/zhCN.js +2 -0
- package/node/models/events/gridEvents.js +6 -0
- package/package.json +2 -2
|
@@ -73,8 +73,16 @@ export const GridRootStyles = styled('div', {
|
|
|
73
73
|
[`& .${gridClasses['row--editable']}`]: styles['row--editable']
|
|
74
74
|
}, {
|
|
75
75
|
[`& .${gridClasses['row--editing']}`]: styles['row--editing']
|
|
76
|
+
}, {
|
|
77
|
+
[`& .${gridClasses['row--dragging']}`]: styles['row--dragging']
|
|
76
78
|
}, {
|
|
77
79
|
[`& .${gridClasses.row}`]: styles.row
|
|
80
|
+
}, {
|
|
81
|
+
[`& .${gridClasses.rowReorderCellPlaceholder}`]: styles.rowReorderCellPlaceholder
|
|
82
|
+
}, {
|
|
83
|
+
[`& .${gridClasses.rowReorderCell}`]: styles.rowReorderCell
|
|
84
|
+
}, {
|
|
85
|
+
[`& .${gridClasses['rowReorderCell--draggable']}`]: styles['rowReorderCell--draggable']
|
|
78
86
|
}, {
|
|
79
87
|
[`& .${gridClasses.sortIcon}`]: styles.sortIcon
|
|
80
88
|
}, {
|
|
@@ -309,6 +317,21 @@ export const GridRootStyles = styled('div', {
|
|
|
309
317
|
alignItems: 'center',
|
|
310
318
|
gridGap: theme.spacing(1)
|
|
311
319
|
},
|
|
320
|
+
[`& .${gridClasses.rowReorderCell}`]: {
|
|
321
|
+
display: 'inline-flex',
|
|
322
|
+
flex: 1,
|
|
323
|
+
alignItems: 'center',
|
|
324
|
+
justifyContent: 'center',
|
|
325
|
+
opacity: theme.palette.action.disabledOpacity
|
|
326
|
+
},
|
|
327
|
+
[`& .${gridClasses['rowReorderCell--draggable']}`]: {
|
|
328
|
+
cursor: 'move',
|
|
329
|
+
opacity: 1
|
|
330
|
+
},
|
|
331
|
+
[`& .${gridClasses.rowReorderCellContainer}`]: {
|
|
332
|
+
padding: 0,
|
|
333
|
+
alignItems: 'stretch'
|
|
334
|
+
},
|
|
312
335
|
[`& .${gridClasses.withBorder}`]: {
|
|
313
336
|
borderRight: `1px solid ${borderColor}`
|
|
314
337
|
},
|
|
@@ -325,12 +348,24 @@ export const GridRootStyles = styled('div', {
|
|
|
325
348
|
display: 'flex',
|
|
326
349
|
width: '100%'
|
|
327
350
|
},
|
|
328
|
-
[`& .${gridClasses
|
|
351
|
+
[`& .${gridClasses.rowReorderCellPlaceholder}`]: {
|
|
352
|
+
display: 'none'
|
|
353
|
+
},
|
|
354
|
+
[`& .${gridClasses['columnHeader--dragging']}, & .${gridClasses['row--dragging']}`]: {
|
|
329
355
|
background: theme.palette.background.paper,
|
|
330
356
|
padding: '0 12px',
|
|
331
357
|
borderRadius: theme.shape.borderRadius,
|
|
332
358
|
opacity: theme.palette.action.disabledOpacity
|
|
333
359
|
},
|
|
360
|
+
[`& .${gridClasses['row--dragging']}`]: {
|
|
361
|
+
background: theme.palette.background.paper,
|
|
362
|
+
padding: '0 12px',
|
|
363
|
+
borderRadius: theme.shape.borderRadius,
|
|
364
|
+
opacity: theme.palette.action.disabledOpacity,
|
|
365
|
+
[`& .${gridClasses.rowReorderCellPlaceholder}`]: {
|
|
366
|
+
display: 'flex'
|
|
367
|
+
}
|
|
368
|
+
},
|
|
334
369
|
[`& .${gridClasses.treeDataGroupingCell}`]: {
|
|
335
370
|
display: 'flex',
|
|
336
371
|
alignItems: 'center',
|
|
@@ -93,6 +93,7 @@ const GridMenu = props => {
|
|
|
93
93
|
placement
|
|
94
94
|
}) => /*#__PURE__*/_jsx(ClickAwayListener, {
|
|
95
95
|
onClickAway: onClickAway,
|
|
96
|
+
mouseEvent: "onMouseDown",
|
|
96
97
|
children: /*#__PURE__*/_jsx(Grow, _extends({}, TransitionProps, {
|
|
97
98
|
style: {
|
|
98
99
|
transformOrigin: transformOrigin[placement]
|
|
@@ -7,7 +7,7 @@ import MUISwitch from '@mui/material/Switch';
|
|
|
7
7
|
import MUIButton from '@mui/material/Button';
|
|
8
8
|
import MUITooltip from '@mui/material/Tooltip';
|
|
9
9
|
import MUIPopper from '@mui/material/Popper';
|
|
10
|
-
import { GridArrowDownwardIcon, GridArrowUpwardIcon, GridCell, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridColumnMenu, GridColumnsPanel, GridFilterAltIcon, GridFilterListIcon, GridFilterPanel, GridFooter, GridHeader, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridPreferencesPanel, GridRow, GridSaveAltIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridMoreVertIcon, GridExpandMoreIcon, GridKeyboardArrowRight, GridAddIcon, GridRemoveIcon, GridColumnHeaderFilterIconButton } from '../components';
|
|
10
|
+
import { GridArrowDownwardIcon, GridArrowUpwardIcon, GridCell, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridColumnMenu, GridColumnsPanel, GridFilterAltIcon, GridFilterListIcon, GridFilterPanel, GridFooter, GridHeader, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridPreferencesPanel, GridRow, GridSaveAltIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridMoreVertIcon, GridExpandMoreIcon, GridKeyboardArrowRight, GridAddIcon, GridRemoveIcon, GridDragIcon, GridColumnHeaderFilterIconButton } from '../components';
|
|
11
11
|
import { GridColumnUnsortedIcon } from '../components/columnHeaders/GridColumnUnsortedIcon';
|
|
12
12
|
import { ErrorOverlay } from '../components/ErrorOverlay';
|
|
13
13
|
import { GridNoResultsOverlay } from '../components/GridNoResultsOverlay';
|
|
@@ -33,7 +33,8 @@ const DEFAULT_GRID_ICON_SLOTS_COMPONENTS = {
|
|
|
33
33
|
GroupingCriteriaCollapseIcon: GridExpandMoreIcon,
|
|
34
34
|
GroupingCriteriaExpandIcon: GridKeyboardArrowRight,
|
|
35
35
|
DetailPanelExpandIcon: GridAddIcon,
|
|
36
|
-
DetailPanelCollapseIcon: GridRemoveIcon
|
|
36
|
+
DetailPanelCollapseIcon: GridRemoveIcon,
|
|
37
|
+
RowReorderIcon: GridDragIcon
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* TODO: Differentiate community and pro value and interface
|
|
@@ -2,4 +2,4 @@ import { generateUtilityClasses, generateUtilityClass } from '@mui/material';
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'row--editable', 'row--editing', 'row', 'row--
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle']);
|
|
@@ -103,5 +103,7 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
103
103
|
expandDetailPanel: 'Expand',
|
|
104
104
|
collapseDetailPanel: 'Collapse',
|
|
105
105
|
// Used core components translation keys
|
|
106
|
-
MuiTablePagination: {}
|
|
106
|
+
MuiTablePagination: {},
|
|
107
|
+
// Row reordering text
|
|
108
|
+
rowReorderingHeaderName: 'Row reordering'
|
|
107
109
|
};
|
|
@@ -79,5 +79,6 @@ export const useGridColumnMenu = apiRef => {
|
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
81
|
useGridApiEventHandler(apiRef, GridEvents.columnResizeStart, hideColumnMenu);
|
|
82
|
-
useGridApiEventHandler(apiRef, GridEvents.
|
|
82
|
+
useGridApiEventHandler(apiRef, GridEvents.virtualScrollerWheel, apiRef.current.hideColumnMenu);
|
|
83
|
+
useGridApiEventHandler(apiRef, GridEvents.virtualScrollerTouchMove, apiRef.current.hideColumnMenu);
|
|
83
84
|
};
|
|
@@ -225,12 +225,31 @@ export const useGridRows = (apiRef, props) => {
|
|
|
225
225
|
apiRef.current.publishEvent(GridEvents.rowExpansionChange, newNode);
|
|
226
226
|
}, [apiRef]);
|
|
227
227
|
const getRowNode = React.useCallback(id => gridRowTreeSelector(apiRef)[id] ?? null, [apiRef]);
|
|
228
|
+
const setRowIndex = React.useCallback((rowId, targetIndex) => {
|
|
229
|
+
const allRows = gridRowIdsSelector(apiRef);
|
|
230
|
+
const oldIndex = allRows.findIndex(row => row === rowId);
|
|
231
|
+
|
|
232
|
+
if (oldIndex === targetIndex) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
logger.debug(`Moving row ${rowId} to index ${targetIndex}`);
|
|
237
|
+
const updatedRows = [...allRows];
|
|
238
|
+
updatedRows.splice(targetIndex, 0, updatedRows.splice(oldIndex, 1)[0]);
|
|
239
|
+
apiRef.current.setState(state => _extends({}, state, {
|
|
240
|
+
rows: _extends({}, state.rows, {
|
|
241
|
+
ids: updatedRows
|
|
242
|
+
})
|
|
243
|
+
}));
|
|
244
|
+
apiRef.current.applySorting();
|
|
245
|
+
}, [apiRef, logger]);
|
|
228
246
|
const rowApi = {
|
|
229
247
|
getRow,
|
|
230
248
|
getRowModels,
|
|
231
249
|
getRowsCount,
|
|
232
250
|
getAllRowIds,
|
|
233
251
|
setRows,
|
|
252
|
+
setRowIndex,
|
|
234
253
|
updateRows,
|
|
235
254
|
setRowChildrenExpansion,
|
|
236
255
|
getRowNode,
|
|
@@ -214,6 +214,14 @@ export const useGridVirtualScroller = props => {
|
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
+
const handleWheel = event => {
|
|
218
|
+
apiRef.current.publishEvent(GridEvents.virtualScrollerWheel, {}, event);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const handleTouchMove = event => {
|
|
222
|
+
apiRef.current.publishEvent(GridEvents.virtualScrollerTouchMove, {}, event);
|
|
223
|
+
};
|
|
224
|
+
|
|
217
225
|
const getRows = (params = {
|
|
218
226
|
renderContext
|
|
219
227
|
}) => {
|
|
@@ -362,6 +370,8 @@ export const useGridVirtualScroller = props => {
|
|
|
362
370
|
return _extends({
|
|
363
371
|
ref: handleRef,
|
|
364
372
|
onScroll: handleScroll,
|
|
373
|
+
onWheel: handleWheel,
|
|
374
|
+
onTouchMove: handleTouchMove,
|
|
365
375
|
style: _extends({}, style, rootStyle)
|
|
366
376
|
}, other);
|
|
367
377
|
},
|
package/modern/index.js
CHANGED
package/modern/locales/arSD.js
CHANGED
|
@@ -103,6 +103,8 @@ const arSDGrid = {
|
|
|
103
103
|
unGroupColumn: name => `إيقاف التجميع حسب ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'توسيع',
|
|
106
|
-
collapseDetailPanel: 'طوي'
|
|
106
|
+
collapseDetailPanel: 'طوي' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const arSD = getGridLocalization(arSDGrid, arSDCore);
|
package/modern/locales/bgBG.js
CHANGED
|
@@ -103,6 +103,8 @@ const bgBGGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Спри групиране по ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Разгъване',
|
|
106
|
-
collapseDetailPanel: 'Свиване'
|
|
106
|
+
collapseDetailPanel: 'Свиване' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const bgBG = getGridLocalization(bgBGGrid, bgBGCore);
|
package/modern/locales/csCZ.js
CHANGED
|
@@ -138,6 +138,8 @@ const csCZGrid = {
|
|
|
138
138
|
unGroupColumn: name => `Přestat zoskupovat podle ${name}` // Master/detail
|
|
139
139
|
// expandDetailPanel: 'Expand',
|
|
140
140
|
// collapseDetailPanel: 'Collapse',
|
|
141
|
+
// Row reordering text
|
|
142
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
141
143
|
|
|
142
144
|
};
|
|
143
145
|
export const csCZ = getGridLocalization(csCZGrid, csCZCore);
|
package/modern/locales/daDK.js
CHANGED
|
@@ -103,6 +103,8 @@ const daDKGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Fjern gruppéring efter ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Udvid',
|
|
106
|
-
collapseDetailPanel: 'Kollaps'
|
|
106
|
+
collapseDetailPanel: 'Kollaps' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const daDK = getGridLocalization(daDKGrid, daDKCore);
|
package/modern/locales/deDE.js
CHANGED
|
@@ -103,6 +103,8 @@ const deDEGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Gruppierung nach ${name} aufheben`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Aufklappen',
|
|
106
|
-
collapseDetailPanel: 'Zuklappen'
|
|
106
|
+
collapseDetailPanel: 'Zuklappen' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const deDE = getGridLocalization(deDEGrid, deDECore);
|
package/modern/locales/elGR.js
CHANGED
|
@@ -102,6 +102,8 @@ const elGRGrid = {
|
|
|
102
102
|
// Master/detail
|
|
103
103
|
// expandDetailPanel: 'Expand',
|
|
104
104
|
// collapseDetailPanel: 'Collapse',
|
|
105
|
+
// Row reordering text
|
|
106
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
105
107
|
|
|
106
108
|
};
|
|
107
109
|
export const elGR = getGridLocalization(elGRGrid);
|
package/modern/locales/esES.js
CHANGED
|
@@ -103,6 +103,8 @@ const esESGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const esES = getGridLocalization(esESGrid, esESCore);
|
package/modern/locales/faIR.js
CHANGED
|
@@ -103,6 +103,8 @@ const faIRGrid = {
|
|
|
103
103
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
106
|
-
collapseDetailPanel: 'بستن پنل جزئیات'
|
|
106
|
+
collapseDetailPanel: 'بستن پنل جزئیات' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const faIR = getGridLocalization(faIRGrid, faIRCore);
|
package/modern/locales/fiFI.js
CHANGED
|
@@ -103,6 +103,8 @@ const fiFIGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const fiFI = getGridLocalization(fiFIGrid, fiFICore);
|
package/modern/locales/frFR.js
CHANGED
|
@@ -103,6 +103,8 @@ const frFRGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Arrêter de grouper par ${name}` // Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const frFR = getGridLocalization(frFRGrid, frFRCore);
|
package/modern/locales/heIL.js
CHANGED
|
@@ -103,6 +103,8 @@ const heILGrid = {
|
|
|
103
103
|
unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'הרחב',
|
|
106
|
-
collapseDetailPanel: 'כווץ'
|
|
106
|
+
collapseDetailPanel: 'כווץ' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const heIL = getGridLocalization(heILGrid, heILCore);
|
package/modern/locales/huHU.js
CHANGED
|
@@ -103,6 +103,8 @@ const huHUGrid = {
|
|
|
103
103
|
unGroupColumn: name => `${name} szerinti csoportosítás törlése`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Kibontás',
|
|
106
|
-
collapseDetailPanel: 'Összecsukás'
|
|
106
|
+
collapseDetailPanel: 'Összecsukás' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const huHU = getGridLocalization(huHUGrid, huHUCore);
|
package/modern/locales/itIT.js
CHANGED
|
@@ -103,6 +103,8 @@ const itITGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Annulla raggruppamento per ${name}` // Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const itIT = getGridLocalization(itITGrid, itITCore);
|
package/modern/locales/jaJP.js
CHANGED
|
@@ -103,6 +103,8 @@ const jaJPGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const jaJP = getGridLocalization(jaJPGrid, jaJPCore);
|
package/modern/locales/koKR.js
CHANGED
|
@@ -103,6 +103,8 @@ const koKRGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const koKR = getGridLocalization(koKRGrid, koKRCore);
|
package/modern/locales/nlNL.js
CHANGED
|
@@ -103,6 +103,8 @@ const nlNLGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Stop groeperen op ${name}` // Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const nlNL = getGridLocalization(nlNLGrid, nlNLCore);
|
package/modern/locales/plPL.js
CHANGED
|
@@ -103,6 +103,8 @@ const plPLGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Rozgrupuj ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Rozwiń',
|
|
106
|
-
collapseDetailPanel: 'Zwiń'
|
|
106
|
+
collapseDetailPanel: 'Zwiń' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const plPL = getGridLocalization(plPLGrid, plPLCore);
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -103,6 +103,8 @@ const ptBRGrid = {
|
|
|
103
103
|
unGroupColumn: name => `Parar agrupamento por ${name}`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Expandir',
|
|
106
|
-
collapseDetailPanel: 'Esconder'
|
|
106
|
+
collapseDetailPanel: 'Esconder' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const ptBR = getGridLocalization(ptBRGrid, ptBRCore);
|
package/modern/locales/ruRU.js
CHANGED
|
@@ -136,6 +136,8 @@ const ruRUGrid = {
|
|
|
136
136
|
unGroupColumn: name => `Разгруппировать по ${name}` // Master/detail
|
|
137
137
|
// expandDetailPanel: 'Expand',
|
|
138
138
|
// collapseDetailPanel: 'Collapse',
|
|
139
|
+
// Row reordering text
|
|
140
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
139
141
|
|
|
140
142
|
};
|
|
141
143
|
export const ruRU = getGridLocalization(ruRUGrid, ruRUCore);
|
package/modern/locales/skSK.js
CHANGED
|
@@ -138,6 +138,8 @@ const skSKGrid = {
|
|
|
138
138
|
unGroupColumn: name => `Prestať zoskupovať podľa ${name}` // Master/detail
|
|
139
139
|
// expandDetailPanel: 'Expand',
|
|
140
140
|
// collapseDetailPanel: 'Collapse',
|
|
141
|
+
// Row reordering text
|
|
142
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
141
143
|
|
|
142
144
|
};
|
|
143
145
|
export const skSK = getGridLocalization(skSKGrid, skSKCore);
|
package/modern/locales/trTR.js
CHANGED
|
@@ -103,6 +103,8 @@ const trTRGrid = {
|
|
|
103
103
|
unGroupColumn: name => `${name} için gruplamayı kaldır`,
|
|
104
104
|
// Master/detail
|
|
105
105
|
expandDetailPanel: 'Genişlet',
|
|
106
|
-
collapseDetailPanel: 'Gizle'
|
|
106
|
+
collapseDetailPanel: 'Gizle' // Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
108
|
+
|
|
107
109
|
};
|
|
108
110
|
export const trTR = getGridLocalization(trTRGrid, trTRCore);
|
package/modern/locales/ukUA.js
CHANGED
|
@@ -129,6 +129,8 @@ const ukUAGrid = {
|
|
|
129
129
|
// Master/detail
|
|
130
130
|
// expandDetailPanel: 'Expand',
|
|
131
131
|
// collapseDetailPanel: 'Collapse',
|
|
132
|
+
// Row reordering text
|
|
133
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
132
134
|
|
|
133
135
|
};
|
|
134
136
|
export const ukUA = getGridLocalization(ukUAGrid, ukUACore);
|
package/modern/locales/viVN.js
CHANGED
|
@@ -103,6 +103,8 @@ const viVNGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const viVN = getGridLocalization(viVNGrid, viVNCore);
|
package/modern/locales/zhCN.js
CHANGED
|
@@ -103,6 +103,8 @@ const zhCNGrid = {
|
|
|
103
103
|
// Master/detail
|
|
104
104
|
// expandDetailPanel: 'Expand',
|
|
105
105
|
// collapseDetailPanel: 'Collapse',
|
|
106
|
+
// Row reordering text
|
|
107
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
108
|
|
|
107
109
|
};
|
|
108
110
|
export const zhCN = getGridLocalization(zhCNGrid, zhCNCore);
|
|
@@ -29,6 +29,9 @@ var GridEvents;
|
|
|
29
29
|
GridEvents["rowMouseEnter"] = "rowMouseEnter";
|
|
30
30
|
GridEvents["rowMouseLeave"] = "rowMouseLeave";
|
|
31
31
|
GridEvents["editRowsModelChange"] = "editRowsModelChange";
|
|
32
|
+
GridEvents["rowDragStart"] = "rowDragStart";
|
|
33
|
+
GridEvents["rowDragOver"] = "rowDragOver";
|
|
34
|
+
GridEvents["rowDragEnd"] = "rowDragEnd";
|
|
32
35
|
GridEvents["columnHeaderBlur"] = "columnHeaderBlur";
|
|
33
36
|
GridEvents["columnHeaderFocus"] = "columnHeaderFocus";
|
|
34
37
|
GridEvents["columnHeaderNavigationKeyDown"] = "columnHeaderNavigationKeyDown";
|
|
@@ -57,6 +60,7 @@ var GridEvents;
|
|
|
57
60
|
GridEvents["columnResizeStart"] = "columnResizeStart";
|
|
58
61
|
GridEvents["columnResizeStop"] = "columnResizeStop";
|
|
59
62
|
GridEvents["columnOrderChange"] = "columnOrderChange";
|
|
63
|
+
GridEvents["rowOrderChange"] = "rowOrderChange";
|
|
60
64
|
GridEvents["rowsSet"] = "rowsSet";
|
|
61
65
|
GridEvents["rowExpansionChange"] = "rowExpansionChange";
|
|
62
66
|
GridEvents["sortedRowsSet"] = "sortedRowsSet";
|
|
@@ -72,6 +76,8 @@ var GridEvents;
|
|
|
72
76
|
GridEvents["stateChange"] = "stateChange";
|
|
73
77
|
GridEvents["columnVisibilityChange"] = "columnVisibilityChange";
|
|
74
78
|
GridEvents["virtualScrollerContentSizeChange"] = "virtualScrollerContentSizeChange";
|
|
79
|
+
GridEvents["virtualScrollerWheel"] = "virtualScrollerWheel";
|
|
80
|
+
GridEvents["virtualScrollerTouchMove"] = "virtualScrollerTouchMove";
|
|
75
81
|
GridEvents["preferencePanelClose"] = "preferencePanelClose";
|
|
76
82
|
GridEvents["preferencePanelOpen"] = "preferencePanelOpen";
|
|
77
83
|
})(GridEvents || (GridEvents = {}));
|
|
@@ -162,6 +162,11 @@ function GridRow(props) {
|
|
|
162
162
|
|
|
163
163
|
if (field === _gridDetailPanelToggleField.GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
164
164
|
return;
|
|
165
|
+
} // User reorders a row
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
if (field === '__reorder__') {
|
|
169
|
+
return;
|
|
165
170
|
} // User is editing a cell
|
|
166
171
|
|
|
167
172
|
|
|
@@ -85,8 +85,16 @@ const GridRootStyles = (0, _styles.styled)('div', {
|
|
|
85
85
|
[`& .${_gridClasses.gridClasses['row--editable']}`]: styles['row--editable']
|
|
86
86
|
}, {
|
|
87
87
|
[`& .${_gridClasses.gridClasses['row--editing']}`]: styles['row--editing']
|
|
88
|
+
}, {
|
|
89
|
+
[`& .${_gridClasses.gridClasses['row--dragging']}`]: styles['row--dragging']
|
|
88
90
|
}, {
|
|
89
91
|
[`& .${_gridClasses.gridClasses.row}`]: styles.row
|
|
92
|
+
}, {
|
|
93
|
+
[`& .${_gridClasses.gridClasses.rowReorderCellPlaceholder}`]: styles.rowReorderCellPlaceholder
|
|
94
|
+
}, {
|
|
95
|
+
[`& .${_gridClasses.gridClasses.rowReorderCell}`]: styles.rowReorderCell
|
|
96
|
+
}, {
|
|
97
|
+
[`& .${_gridClasses.gridClasses['rowReorderCell--draggable']}`]: styles['rowReorderCell--draggable']
|
|
90
98
|
}, {
|
|
91
99
|
[`& .${_gridClasses.gridClasses.sortIcon}`]: styles.sortIcon
|
|
92
100
|
}, {
|
|
@@ -320,6 +328,21 @@ const GridRootStyles = (0, _styles.styled)('div', {
|
|
|
320
328
|
alignItems: 'center',
|
|
321
329
|
gridGap: theme.spacing(1)
|
|
322
330
|
},
|
|
331
|
+
[`& .${_gridClasses.gridClasses.rowReorderCell}`]: {
|
|
332
|
+
display: 'inline-flex',
|
|
333
|
+
flex: 1,
|
|
334
|
+
alignItems: 'center',
|
|
335
|
+
justifyContent: 'center',
|
|
336
|
+
opacity: theme.palette.action.disabledOpacity
|
|
337
|
+
},
|
|
338
|
+
[`& .${_gridClasses.gridClasses['rowReorderCell--draggable']}`]: {
|
|
339
|
+
cursor: 'move',
|
|
340
|
+
opacity: 1
|
|
341
|
+
},
|
|
342
|
+
[`& .${_gridClasses.gridClasses.rowReorderCellContainer}`]: {
|
|
343
|
+
padding: 0,
|
|
344
|
+
alignItems: 'stretch'
|
|
345
|
+
},
|
|
323
346
|
[`& .${_gridClasses.gridClasses.withBorder}`]: {
|
|
324
347
|
borderRight: `1px solid ${borderColor}`
|
|
325
348
|
},
|
|
@@ -336,12 +359,24 @@ const GridRootStyles = (0, _styles.styled)('div', {
|
|
|
336
359
|
display: 'flex',
|
|
337
360
|
width: '100%'
|
|
338
361
|
},
|
|
339
|
-
[`& .${_gridClasses.gridClasses
|
|
362
|
+
[`& .${_gridClasses.gridClasses.rowReorderCellPlaceholder}`]: {
|
|
363
|
+
display: 'none'
|
|
364
|
+
},
|
|
365
|
+
[`& .${_gridClasses.gridClasses['columnHeader--dragging']}, & .${_gridClasses.gridClasses['row--dragging']}`]: {
|
|
340
366
|
background: theme.palette.background.paper,
|
|
341
367
|
padding: '0 12px',
|
|
342
368
|
borderRadius: theme.shape.borderRadius,
|
|
343
369
|
opacity: theme.palette.action.disabledOpacity
|
|
344
370
|
},
|
|
371
|
+
[`& .${_gridClasses.gridClasses['row--dragging']}`]: {
|
|
372
|
+
background: theme.palette.background.paper,
|
|
373
|
+
padding: '0 12px',
|
|
374
|
+
borderRadius: theme.shape.borderRadius,
|
|
375
|
+
opacity: theme.palette.action.disabledOpacity,
|
|
376
|
+
[`& .${_gridClasses.gridClasses.rowReorderCellPlaceholder}`]: {
|
|
377
|
+
display: 'flex'
|
|
378
|
+
}
|
|
379
|
+
},
|
|
345
380
|
[`& .${_gridClasses.gridClasses.treeDataGroupingCell}`]: {
|
|
346
381
|
display: 'flex',
|
|
347
382
|
alignItems: 'center',
|
|
@@ -122,6 +122,7 @@ const GridMenu = props => {
|
|
|
122
122
|
placement
|
|
123
123
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, {
|
|
124
124
|
onClickAway: onClickAway,
|
|
125
|
+
mouseEvent: "onMouseDown",
|
|
125
126
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grow.default, (0, _extends2.default)({}, TransitionProps, {
|
|
126
127
|
style: {
|
|
127
128
|
transformOrigin: transformOrigin[placement]
|
|
@@ -55,7 +55,8 @@ const DEFAULT_GRID_ICON_SLOTS_COMPONENTS = {
|
|
|
55
55
|
GroupingCriteriaCollapseIcon: _components.GridExpandMoreIcon,
|
|
56
56
|
GroupingCriteriaExpandIcon: _components.GridKeyboardArrowRight,
|
|
57
57
|
DetailPanelExpandIcon: _components.GridAddIcon,
|
|
58
|
-
DetailPanelCollapseIcon: _components.GridRemoveIcon
|
|
58
|
+
DetailPanelCollapseIcon: _components.GridRemoveIcon,
|
|
59
|
+
RowReorderIcon: _components.GridDragIcon
|
|
59
60
|
};
|
|
60
61
|
/**
|
|
61
62
|
* TODO: Differentiate community and pro value and interface
|
|
@@ -12,5 +12,5 @@ function getDataGridUtilityClass(slot) {
|
|
|
12
12
|
return (0, _material.generateUtilityClass)('MuiDataGrid', slot);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const gridClasses = (0, _material.generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'row--editable', 'row--editing', 'row', 'row--
|
|
15
|
+
const gridClasses = (0, _material.generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle']);
|
|
16
16
|
exports.gridClasses = gridClasses;
|
|
@@ -109,6 +109,8 @@ const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
109
109
|
expandDetailPanel: 'Expand',
|
|
110
110
|
collapseDetailPanel: 'Collapse',
|
|
111
111
|
// Used core components translation keys
|
|
112
|
-
MuiTablePagination: {}
|
|
112
|
+
MuiTablePagination: {},
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'Row reordering'
|
|
113
115
|
};
|
|
114
116
|
exports.GRID_DEFAULT_LOCALE_TEXT = GRID_DEFAULT_LOCALE_TEXT;
|
|
@@ -100,7 +100,8 @@ const useGridColumnMenu = apiRef => {
|
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
102
|
(0, _utils.useGridApiEventHandler)(apiRef, _events.GridEvents.columnResizeStart, hideColumnMenu);
|
|
103
|
-
(0, _utils.useGridApiEventHandler)(apiRef, _events.GridEvents.
|
|
103
|
+
(0, _utils.useGridApiEventHandler)(apiRef, _events.GridEvents.virtualScrollerWheel, apiRef.current.hideColumnMenu);
|
|
104
|
+
(0, _utils.useGridApiEventHandler)(apiRef, _events.GridEvents.virtualScrollerTouchMove, apiRef.current.hideColumnMenu);
|
|
104
105
|
};
|
|
105
106
|
|
|
106
107
|
exports.useGridColumnMenu = useGridColumnMenu;
|