@mui/x-data-grid 7.11.1 → 7.12.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 +178 -4
- package/components/GridHeaders.js +1 -4
- package/components/GridPagination.js +2 -0
- package/components/GridRow.d.ts +1 -0
- package/components/GridRow.js +11 -28
- package/components/GridRowCount.js +1 -1
- package/components/GridSelectedRowCount.js +1 -1
- package/components/base/GridOverlays.js +1 -1
- package/components/cell/GridBooleanCell.js +3 -3
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnHeaders/GridIconButtonContainer.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 +4 -7
- package/components/containers/GridRootStyles.js +26 -6
- package/components/containers/GridToolbarContainer.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/virtualization/GridBottomContainer.js +1 -1
- package/components/virtualization/GridTopContainer.js +2 -13
- package/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/components/virtualization/GridVirtualScroller.js +1 -1
- package/components/virtualization/GridVirtualScrollerContent.js +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +1 -1
- package/constants/gridClasses.d.ts +10 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/useGridRefs.js +3 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/hooks/features/editing/useGridEditing.js +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +3 -2
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.js +3 -3
- package/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/index.js +1 -1
- package/internals/utils/useProps.js +1 -6
- package/locales/trTR.js +19 -21
- package/models/api/gridCoreApi.d.ts +1 -1
- package/modern/components/GridHeaders.js +1 -4
- package/modern/components/GridPagination.js +2 -0
- package/modern/components/GridRow.js +11 -28
- package/modern/components/GridRowCount.js +1 -1
- package/modern/components/GridSelectedRowCount.js +1 -1
- package/modern/components/base/GridOverlays.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +3 -3
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -1
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/modern/components/columnHeaders/GridIconButtonContainer.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 +4 -7
- package/modern/components/containers/GridRootStyles.js +26 -6
- package/modern/components/containers/GridToolbarContainer.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/virtualization/GridBottomContainer.js +1 -1
- package/modern/components/virtualization/GridTopContainer.js +2 -13
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/modern/components/virtualization/GridVirtualScroller.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollerContent.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +1 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/useGridRefs.js +3 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/modern/hooks/features/editing/useGridEditing.js +2 -2
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/modern/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +3 -2
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +3 -3
- package/modern/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/modern/index.js +1 -1
- package/modern/internals/utils/useProps.js +1 -6
- package/modern/locales/trTR.js +19 -21
- package/modern/utils/composeGridClasses.js +5 -0
- package/modern/utils/platform.js +2 -0
- package/node/components/GridHeaders.js +1 -4
- package/node/components/GridPagination.js +2 -0
- package/node/components/GridRow.js +9 -26
- package/node/components/GridRowCount.js +2 -2
- package/node/components/GridSelectedRowCount.js +2 -2
- package/node/components/base/GridOverlays.js +2 -2
- package/node/components/cell/GridBooleanCell.js +3 -3
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +2 -2
- package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +2 -2
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +2 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +2 -2
- package/node/components/columnSelection/GridHeaderCheckbox.js +4 -4
- package/node/components/columnsManagement/GridColumnsManagement.js +5 -5
- package/node/components/containers/GridFooterContainer.js +2 -2
- package/node/components/containers/GridOverlay.js +2 -2
- package/node/components/containers/GridRoot.js +4 -7
- package/node/components/containers/GridRootStyles.js +26 -6
- package/node/components/containers/GridToolbarContainer.js +2 -2
- package/node/components/panel/GridPanelContent.js +2 -2
- package/node/components/panel/GridPanelFooter.js +2 -2
- package/node/components/panel/GridPanelHeader.js +2 -2
- package/node/components/panel/GridPanelWrapper.js +2 -2
- package/node/components/virtualization/GridBottomContainer.js +2 -2
- package/node/components/virtualization/GridTopContainer.js +3 -14
- package/node/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/node/components/virtualization/GridVirtualScroller.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerContent.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -2
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/core/useGridRefs.js +3 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/node/hooks/features/editing/useGridEditing.js +1 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/node/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +2 -2
- package/node/hooks/features/rows/gridRowsUtils.js +6 -4
- package/node/hooks/features/rows/index.js +8 -1
- package/node/hooks/features/rows/useGridRows.js +2 -2
- package/node/hooks/features/sorting/gridSortingSelector.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/node/index.js +1 -1
- package/node/internals/utils/useProps.js +1 -7
- package/node/locales/trTR.js +19 -21
- package/node/utils/composeGridClasses.js +11 -0
- package/node/utils/platform.js +8 -0
- package/package.json +13 -3
- package/utils/composeGridClasses.d.ts +3 -0
- package/utils/composeGridClasses.js +5 -0
- package/utils/platform.d.ts +1 -0
- package/utils/platform.js +2 -0
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import FocusTrap from '@mui/material/Unstable_TrapFocus';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const useUtilityClasses = () => {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const useUtilityClasses = () => {
|
|
@@ -14,18 +14,7 @@ const useUtilityClasses = () => {
|
|
|
14
14
|
const Element = styled('div')({
|
|
15
15
|
position: 'sticky',
|
|
16
16
|
zIndex: 4,
|
|
17
|
-
top: 0
|
|
18
|
-
'&::after': {
|
|
19
|
-
content: '" "',
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
zIndex: 5,
|
|
22
|
-
bottom: 0,
|
|
23
|
-
left: 0,
|
|
24
|
-
right: 0,
|
|
25
|
-
height: 1,
|
|
26
|
-
width: 'var(--DataGrid-rowWidth)',
|
|
27
|
-
backgroundColor: 'var(--DataGrid-rowBorderColor)'
|
|
28
|
-
}
|
|
17
|
+
top: 0
|
|
29
18
|
});
|
|
30
19
|
export function GridTopContainer(props) {
|
|
31
20
|
const classes = useUtilityClasses();
|
|
@@ -126,6 +126,7 @@ const GridVirtualScrollbar = /*#__PURE__*/React.forwardRef(function GridVirtualS
|
|
|
126
126
|
ref: useForkRef(ref, scrollbarRef),
|
|
127
127
|
className: classes.root,
|
|
128
128
|
tabIndex: -1,
|
|
129
|
+
"aria-hidden": "true",
|
|
129
130
|
children: /*#__PURE__*/_jsx(Content, {
|
|
130
131
|
ref: contentRef,
|
|
131
132
|
className: classes.content
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { styled } from '@mui/system';
|
|
4
|
-
import
|
|
4
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { GridScrollArea } from '../GridScrollArea';
|
|
6
6
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
7
7
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
7
7
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/system';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
9
9
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
10
10
|
import { gridRowsMetaSelector } from '../../hooks/features/rows';
|
|
@@ -439,6 +439,11 @@ export interface GridClasses {
|
|
|
439
439
|
* Styles applied to the root element when user selection is disabled.
|
|
440
440
|
*/
|
|
441
441
|
'root--disableUserSelection': string;
|
|
442
|
+
/**
|
|
443
|
+
* Used to fix header outline border radius.
|
|
444
|
+
* @ignore - do not document.
|
|
445
|
+
*/
|
|
446
|
+
'root--noToolbar': string;
|
|
442
447
|
/**
|
|
443
448
|
* Styles applied to the row element if the row is editable.
|
|
444
449
|
*/
|
|
@@ -467,6 +472,11 @@ export interface GridClasses {
|
|
|
467
472
|
* Styles applied to the row if its detail panel is open.
|
|
468
473
|
*/
|
|
469
474
|
'row--detailPanelExpanded': string;
|
|
475
|
+
/**
|
|
476
|
+
* Styles applied to the row cells if the row needs a bottom border.
|
|
477
|
+
* @ignore - do not document.
|
|
478
|
+
*/
|
|
479
|
+
'row--borderBottom': string;
|
|
470
480
|
/**
|
|
471
481
|
* Styles applied to the row element.
|
|
472
482
|
*/
|
package/constants/gridClasses.js
CHANGED
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderTop', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderTop', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -3,11 +3,13 @@ export const useGridRefs = apiRef => {
|
|
|
3
3
|
const rootElementRef = React.useRef(null);
|
|
4
4
|
const mainElementRef = React.useRef(null);
|
|
5
5
|
const virtualScrollerRef = React.useRef(null);
|
|
6
|
+
const columnHeadersContainerRef = React.useRef(null);
|
|
6
7
|
apiRef.current.register('public', {
|
|
7
8
|
rootElementRef
|
|
8
9
|
});
|
|
9
10
|
apiRef.current.register('private', {
|
|
10
11
|
mainElementRef,
|
|
11
|
-
virtualScrollerRef
|
|
12
|
+
virtualScrollerRef,
|
|
13
|
+
columnHeadersContainerRef
|
|
12
14
|
});
|
|
13
15
|
};
|
|
@@ -12,6 +12,7 @@ import { gridRenderContextColumnsSelector, gridVirtualizationColumnEnabledSelect
|
|
|
12
12
|
import { computeOffsetLeft } from '../virtualization/useGridVirtualScroller';
|
|
13
13
|
import { GridColumnGroupHeader } from '../../../components/columnHeaders/GridColumnGroupHeader';
|
|
14
14
|
import { GridPinnedColumnPosition, gridColumnPositionsSelector, gridVisiblePinnedColumnDefinitionsSelector } from '../columns';
|
|
15
|
+
import { gridPinnedRowsSelector } from '../rows/gridRowsSelector';
|
|
15
16
|
import { gridColumnGroupsUnwrappedModelSelector } from '../columnGrouping/gridColumnGroupsSelector';
|
|
16
17
|
import { GridScrollbarFillerCell as ScrollbarFiller } from '../../../components/GridScrollbarFillerCell';
|
|
17
18
|
import { getPinnedCellOffset } from '../../../internals/utils/getPinnedCellOffset';
|
|
@@ -51,6 +52,7 @@ export const useGridColumnHeaders = props => {
|
|
|
51
52
|
const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
|
|
52
53
|
const renderContext = useGridSelector(apiRef, gridRenderContextColumnsSelector);
|
|
53
54
|
const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
|
|
55
|
+
const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
|
|
54
56
|
const offsetLeft = computeOffsetLeft(columnPositions, renderContext, theme.direction, pinnedColumns.left.length);
|
|
55
57
|
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
56
58
|
React.useEffect(() => {
|
|
@@ -179,6 +181,7 @@ export const useGridColumnHeaders = props => {
|
|
|
179
181
|
role: "row",
|
|
180
182
|
"aria-rowindex": headerGroupingMaxDepth + 1,
|
|
181
183
|
ownerState: rootProps,
|
|
184
|
+
className: pinnedRows.top.length === 0 ? gridClasses['row--borderBottom'] : undefined,
|
|
182
185
|
children: [leftRenderContext && getColumnHeaders({
|
|
183
186
|
position: GridPinnedColumnPosition.LEFT,
|
|
184
187
|
renderContext: leftRenderContext,
|
|
@@ -5,7 +5,7 @@ import { useGridCellEditing } from './useGridCellEditing';
|
|
|
5
5
|
import { GridCellModes, GridEditModes } from '../../../models/gridEditRowModel';
|
|
6
6
|
import { useGridRowEditing } from './useGridRowEditing';
|
|
7
7
|
import { gridEditRowsStateSelector } from './gridEditingSelectors';
|
|
8
|
-
import {
|
|
8
|
+
import { isAutogeneratedRowNode } from '../rows/gridRowsUtils';
|
|
9
9
|
export const editingStateInitializer = state => _extends({}, state, {
|
|
10
10
|
editRows: {}
|
|
11
11
|
});
|
|
@@ -17,7 +17,7 @@ export const useGridEditing = (apiRef, props) => {
|
|
|
17
17
|
isCellEditable: isCellEditableProp
|
|
18
18
|
} = props;
|
|
19
19
|
const isCellEditable = React.useCallback(params => {
|
|
20
|
-
if (
|
|
20
|
+
if (isAutogeneratedRowNode(params.rowNode)) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
23
|
if (!params.colDef.editable) {
|
|
@@ -272,11 +272,10 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
272
272
|
}
|
|
273
273
|
}, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
|
|
274
274
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
275
|
-
const
|
|
276
|
-
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
275
|
+
const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
277
276
|
const filterModel = gridFilterModelSelector(apiRef);
|
|
278
277
|
apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);
|
|
279
|
-
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
278
|
+
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
|
|
280
279
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
281
280
|
// Get the most recent cell mode because it may have been changed by another listener
|
|
282
281
|
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
|
|
5
5
|
import { getDataGridUtilityClass } from '../../../constants';
|
|
6
6
|
import { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_CHECKBOX_SELECTION_FIELD } from '../../../colDef';
|
|
@@ -24,7 +24,8 @@ export declare const getRowsStateFromCache: ({ apiRef, rowCountProp, loadingProp
|
|
|
24
24
|
rowCountProp: number | undefined;
|
|
25
25
|
loadingProp: boolean | undefined;
|
|
26
26
|
}) => GridRowsState;
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const isAutogeneratedRow: (row: GridRowModel) => boolean;
|
|
28
|
+
export declare const isAutogeneratedRowNode: (rowNode: GridTreeNode) => rowNode is GridFooterNode | GridSkeletonRowNode | GridAutoGeneratedGroupNode | GridAutoGeneratedPinnedRowNode;
|
|
28
29
|
export declare const getTreeNodeDescendants: (tree: GridRowTreeConfig, parentId: GridRowId, skipAutoGeneratedRows: boolean) => GridRowId[];
|
|
29
30
|
export declare const updateCacheWithNewRows: ({ previousCache, getRowId, updates, groupKeys, }: {
|
|
30
31
|
previousCache: GridRowsInternalCache;
|
|
@@ -123,7 +123,8 @@ export const getRowsStateFromCache = ({
|
|
|
123
123
|
groupsToFetch
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
export const
|
|
126
|
+
export const isAutogeneratedRow = row => GRID_ID_AUTOGENERATED in row;
|
|
127
|
+
export const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowNode.type === 'footer' || rowNode.type === 'group' && rowNode.isAutoGenerated || rowNode.type === 'pinnedRow' && rowNode.isAutoGenerated;
|
|
127
128
|
export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) => {
|
|
128
129
|
const node = tree[parentId];
|
|
129
130
|
if (node.type !== 'group') {
|
|
@@ -132,7 +133,7 @@ export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) =>
|
|
|
132
133
|
const validDescendants = [];
|
|
133
134
|
for (let i = 0; i < node.children.length; i += 1) {
|
|
134
135
|
const child = node.children[i];
|
|
135
|
-
if (!skipAutoGeneratedRows || !
|
|
136
|
+
if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[child])) {
|
|
136
137
|
validDescendants.push(child);
|
|
137
138
|
}
|
|
138
139
|
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
@@ -2,4 +2,4 @@ export * from './gridRowsMetaSelector';
|
|
|
2
2
|
export * from './gridRowsMetaState';
|
|
3
3
|
export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowsDataRowIdToIdLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, } from './gridRowsSelector';
|
|
4
4
|
export type { GridRowsState, GridRowIdToModelLookup } from './gridRowsInterfaces';
|
|
5
|
-
export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid } from './gridRowsUtils';
|
|
5
|
+
export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from './gridRowsUtils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './gridRowsMetaSelector';
|
|
2
2
|
export * from './gridRowsMetaState';
|
|
3
3
|
export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowsDataRowIdToIdLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector } from './gridRowsSelector';
|
|
4
|
-
export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid } from './gridRowsUtils';
|
|
4
|
+
export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from './gridRowsUtils';
|
|
@@ -8,7 +8,7 @@ import { GridSignature, useGridApiEventHandler } from '../../utils/useGridApiEve
|
|
|
8
8
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
9
9
|
import { gridSortedRowIdsSelector } from '../sorting/gridSortingSelector';
|
|
10
10
|
import { gridFilteredRowsLookupSelector } from '../filter/gridFilterSelector';
|
|
11
|
-
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache,
|
|
11
|
+
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutogeneratedRowNode, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel, computeRowsUpdates } from './gridRowsUtils';
|
|
12
12
|
import { useGridRegisterPipeApplier } from '../../core/pipeProcessing';
|
|
13
13
|
export const rowsStateInitializer = (state, props, apiRef) => {
|
|
14
14
|
const isDataSourceAvailable = !!props.unstable_dataSource;
|
|
@@ -48,7 +48,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
48
48
|
return model;
|
|
49
49
|
}
|
|
50
50
|
const node = apiRef.current.getRowNode(id);
|
|
51
|
-
if (node &&
|
|
51
|
+
if (node && isAutogeneratedRowNode(node)) {
|
|
52
52
|
return {
|
|
53
53
|
[GRID_ID_AUTOGENERATED]: id
|
|
54
54
|
};
|
|
@@ -212,7 +212,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
212
212
|
const startIndex = sortedRowIds.findIndex(id => id === groupId) + 1;
|
|
213
213
|
for (let index = startIndex; index < sortedRowIds.length && tree[sortedRowIds[index]].depth > groupNode.depth; index += 1) {
|
|
214
214
|
const id = sortedRowIds[index];
|
|
215
|
-
if (!skipAutoGeneratedRows || !
|
|
215
|
+
if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[id])) {
|
|
216
216
|
children.push(id);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSelector, createSelectorMemoized } from '../../../utils/createSelector';
|
|
2
2
|
import { gridRowTreeSelector, gridRowsLookupSelector } from '../rows/gridRowsSelector';
|
|
3
|
-
import { GRID_ID_AUTOGENERATED,
|
|
3
|
+
import { GRID_ID_AUTOGENERATED, isAutogeneratedRowNode } from '../rows/gridRowsUtils';
|
|
4
4
|
/**
|
|
5
5
|
* @category Sorting
|
|
6
6
|
* @ignore - do not document.
|
|
@@ -26,7 +26,7 @@ export const gridSortedRowEntriesSelector = createSelectorMemoized(gridSortedRow
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
const rowNode = rowTree[id];
|
|
29
|
-
if (rowNode &&
|
|
29
|
+
if (rowNode && isAutogeneratedRowNode(rowNode)) {
|
|
30
30
|
acc.push({
|
|
31
31
|
id,
|
|
32
32
|
model: {
|
|
@@ -17,12 +17,12 @@ export declare const useGridVirtualScroller: () => {
|
|
|
17
17
|
};
|
|
18
18
|
getScrollerProps: () => {
|
|
19
19
|
ref: React.RefObject<HTMLDivElement>;
|
|
20
|
-
tabIndex: number;
|
|
21
20
|
onScroll: (event: React.UIEvent) => void;
|
|
22
21
|
onWheel: (event: React.WheelEvent) => void;
|
|
23
22
|
onTouchMove: (event: React.TouchEvent) => void;
|
|
24
23
|
style: React.CSSProperties;
|
|
25
24
|
role: string;
|
|
25
|
+
tabIndex: number | undefined;
|
|
26
26
|
};
|
|
27
27
|
getContentProps: () => {
|
|
28
28
|
style: React.CSSProperties;
|
|
@@ -16,6 +16,7 @@ import { gridPinnedRowsSelector } from '../rows/gridRowsSelector';
|
|
|
16
16
|
import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
|
|
17
17
|
import { useGridVisibleRows, getVisibleRows } from '../../utils/useGridVisibleRows';
|
|
18
18
|
import { useGridApiEventHandler } from '../../utils';
|
|
19
|
+
import * as platform from '../../../utils/platform';
|
|
19
20
|
import { clamp, range } from '../../../utils/utils';
|
|
20
21
|
import { selectedIdsLookupSelector } from '../rowSelection/gridRowSelectionSelector';
|
|
21
22
|
import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
|
|
@@ -178,6 +179,8 @@ export const useGridVirtualScroller = () => {
|
|
|
178
179
|
const forceUpdateRenderContext = () => {
|
|
179
180
|
const inputs = inputsSelector(apiRef, rootProps, enabled, enabledForColumns);
|
|
180
181
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
182
|
+
// Reset the frozen context when the render context changes, see the illustration in https://github.com/mui/mui-x/pull/12353
|
|
183
|
+
frozenContext.current = undefined;
|
|
181
184
|
updateRenderContext(nextRenderContext);
|
|
182
185
|
};
|
|
183
186
|
const handleScroll = useEventCallback(event => {
|
|
@@ -257,6 +260,7 @@ export const useGridVirtualScroller = () => {
|
|
|
257
260
|
id,
|
|
258
261
|
model
|
|
259
262
|
} = rowModels[rowIndexInPage];
|
|
263
|
+
const rowIndex = (currentPage?.range?.firstRowIndex || 0) + rowIndexOffset + rowIndexInPage;
|
|
260
264
|
|
|
261
265
|
// NOTE: This is an expensive feature, the colSpan code could be optimized.
|
|
262
266
|
if (hasColSpan) {
|
|
@@ -298,6 +302,7 @@ export const useGridVirtualScroller = () => {
|
|
|
298
302
|
isFirstVisible = rowIndexInPage === 0;
|
|
299
303
|
}
|
|
300
304
|
let isLastVisible = false;
|
|
305
|
+
const isLastVisibleInSection = rowIndexInPage === rowModels.length - 1;
|
|
301
306
|
if (isLastSection) {
|
|
302
307
|
if (!isPinnedSection) {
|
|
303
308
|
const lastIndex = currentPage.rows.length - 1;
|
|
@@ -306,7 +311,7 @@ export const useGridVirtualScroller = () => {
|
|
|
306
311
|
isLastVisible = true;
|
|
307
312
|
}
|
|
308
313
|
} else {
|
|
309
|
-
isLastVisible =
|
|
314
|
+
isLastVisible = isLastVisibleInSection;
|
|
310
315
|
}
|
|
311
316
|
}
|
|
312
317
|
const isVirtualRow = rowIndexInPage === virtualRowIndex;
|
|
@@ -321,7 +326,7 @@ export const useGridVirtualScroller = () => {
|
|
|
321
326
|
currentRenderContext = frozenContext.current;
|
|
322
327
|
}
|
|
323
328
|
const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, theme.direction, pinnedColumns.left.length);
|
|
324
|
-
const
|
|
329
|
+
const showBottomBorder = isLastVisibleInSection && params.position === 'top';
|
|
325
330
|
rows.push( /*#__PURE__*/_jsx(rootProps.slots.row, _extends({
|
|
326
331
|
row: model,
|
|
327
332
|
rowId: id,
|
|
@@ -338,7 +343,8 @@ export const useGridVirtualScroller = () => {
|
|
|
338
343
|
focusedColumnIndex: hasFocus ? focusedCell.columnIndex : undefined,
|
|
339
344
|
isFirstVisible: isFirstVisible,
|
|
340
345
|
isLastVisible: isLastVisible,
|
|
341
|
-
isNotVisible: isNotVisible
|
|
346
|
+
isNotVisible: isNotVisible,
|
|
347
|
+
showBottomBorder: showBottomBorder
|
|
342
348
|
}, rowProps), id));
|
|
343
349
|
if (isNotVisible) {
|
|
344
350
|
return;
|
|
@@ -409,12 +415,14 @@ export const useGridVirtualScroller = () => {
|
|
|
409
415
|
}),
|
|
410
416
|
getScrollerProps: () => ({
|
|
411
417
|
ref: scrollerRef,
|
|
412
|
-
tabIndex: -1,
|
|
413
418
|
onScroll: handleScroll,
|
|
414
419
|
onWheel: handleWheel,
|
|
415
420
|
onTouchMove: handleTouchMove,
|
|
416
421
|
style: scrollerStyle,
|
|
417
|
-
role: 'presentation'
|
|
422
|
+
role: 'presentation',
|
|
423
|
+
// `tabIndex` shouldn't be used along role=presentation, but it fixes a Firefox bug
|
|
424
|
+
// https://github.com/mui/mui-x/pull/13891#discussion_r1683416024
|
|
425
|
+
tabIndex: platform.isFirefox ? -1 : undefined
|
|
418
426
|
}),
|
|
419
427
|
getContentProps: () => ({
|
|
420
428
|
style: contentSize,
|
package/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
1
|
import * as React from 'react';
|
|
4
2
|
|
|
5
3
|
/** Gathers props for the root element into a single `.forwardedProps` field */
|
|
@@ -22,8 +20,5 @@ function groupForwardedProps(props) {
|
|
|
22
20
|
return newProps;
|
|
23
21
|
}
|
|
24
22
|
export function useProps(allProps) {
|
|
25
|
-
return React.useMemo(() =>
|
|
26
|
-
const themedProps = _extends({}, (_objectDestructuringEmpty(allProps), allProps));
|
|
27
|
-
return groupForwardedProps(themedProps);
|
|
28
|
-
}, [allProps]);
|
|
23
|
+
return React.useMemo(() => groupForwardedProps(allProps), [allProps]);
|
|
29
24
|
}
|
package/locales/trTR.js
CHANGED
|
@@ -30,11 +30,10 @@ const trTRGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Yazdır',
|
|
31
31
|
toolbarExportExcel: 'Excel olarak aktar',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Arama',
|
|
34
|
+
columnsManagementNoColumns: 'Kolon yok',
|
|
35
|
+
columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
|
|
36
|
+
columnsManagementReset: 'Sıfırla',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Filtre Ekle',
|
|
40
39
|
filterPanelRemoveAll: 'Hepsini kaldır',
|
|
@@ -71,22 +70,21 @@ const trTRGrid = {
|
|
|
71
70
|
headerFilterOperatorEquals: 'Şuna eşittir',
|
|
72
71
|
headerFilterOperatorStartsWith: 'Şununla başlar',
|
|
73
72
|
headerFilterOperatorEndsWith: 'Şununla biter',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
headerFilterOperatorIs: 'Eşittir',
|
|
74
|
+
headerFilterOperatorNot: 'Eşit değil',
|
|
75
|
+
headerFilterOperatorAfter: 'Sonra',
|
|
76
|
+
headerFilterOperatorOnOrAfter: 'Sonra veya eşit',
|
|
77
|
+
headerFilterOperatorBefore: 'Önce',
|
|
78
|
+
headerFilterOperatorOnOrBefore: 'Önce veya eşit',
|
|
79
|
+
headerFilterOperatorIsEmpty: 'Boş',
|
|
80
|
+
headerFilterOperatorIsNotEmpty: 'Boş değil',
|
|
81
|
+
headerFilterOperatorIsAnyOf: 'Herhangi biri',
|
|
82
|
+
'headerFilterOperator=': 'Eşittir',
|
|
83
|
+
'headerFilterOperator!=': 'Eşit değil',
|
|
84
|
+
'headerFilterOperator>': 'Büyüktür',
|
|
85
|
+
'headerFilterOperator>=': 'Büyük veya eşit',
|
|
86
|
+
'headerFilterOperator<': 'Küçüktür',
|
|
87
|
+
'headerFilterOperator<=': 'Küçük veya eşit',
|
|
90
88
|
// Filter values text
|
|
91
89
|
filterValueAny: 'herhangi',
|
|
92
90
|
filterValueTrue: 'doğru',
|
|
@@ -67,7 +67,7 @@ export interface GridCorePrivateApi<GridPublicApi extends GridApiCommon, GridPri
|
|
|
67
67
|
/**
|
|
68
68
|
* The React ref of the grid column container virtualized div element.
|
|
69
69
|
*/
|
|
70
|
-
columnHeadersContainerRef
|
|
70
|
+
columnHeadersContainerRef: React.RefObject<HTMLDivElement>;
|
|
71
71
|
/**
|
|
72
72
|
* The React ref of the grid header filter row element.
|
|
73
73
|
*/
|
|
@@ -27,10 +27,7 @@ function GridHeaders() {
|
|
|
27
27
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
28
28
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
29
29
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
30
|
-
const columnsContainerRef =
|
|
31
|
-
apiRef.current.register('private', {
|
|
32
|
-
columnHeadersContainerRef: columnsContainerRef
|
|
33
|
-
});
|
|
30
|
+
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
34
31
|
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
35
32
|
ref: columnsContainerRef,
|
|
36
33
|
visibleColumns: visibleColumns,
|
|
@@ -11,6 +11,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
const GridPaginationRoot = styled(TablePagination)(({
|
|
12
12
|
theme
|
|
13
13
|
}) => ({
|
|
14
|
+
maxHeight: 'calc(100% + 1px)',
|
|
15
|
+
// border width
|
|
14
16
|
[`& .${tablePaginationClasses.selectLabel}`]: {
|
|
15
17
|
display: 'none',
|
|
16
18
|
[theme.breakpoints.up('sm')]: {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
3
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import {
|
|
7
|
+
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
8
|
import { fastMemo } from '../utils/fastMemo';
|
|
9
9
|
import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
|
|
10
10
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
11
|
-
import {
|
|
11
|
+
import { gridClasses } from '../constants/gridClasses';
|
|
12
|
+
import { composeGridClasses } from '../utils/composeGridClasses';
|
|
12
13
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
13
14
|
import { gridColumnPositionsSelector } from '../hooks/features/columns/gridColumnsSelector';
|
|
14
15
|
import { useGridSelector, objectShallowCompare } from '../hooks/utils/useGridSelector';
|
|
@@ -25,21 +26,6 @@ import { PinnedPosition, gridPinnedColumnPositionLookup } from './cell/GridCell'
|
|
|
25
26
|
import { GridScrollbarFillerCell as ScrollbarFiller } from './GridScrollbarFillerCell';
|
|
26
27
|
import { getPinnedCellOffset } from '../internals/utils/getPinnedCellOffset';
|
|
27
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
const useUtilityClasses = ownerState => {
|
|
29
|
-
const {
|
|
30
|
-
editable,
|
|
31
|
-
editing,
|
|
32
|
-
selected,
|
|
33
|
-
isFirstVisible,
|
|
34
|
-
isLastVisible,
|
|
35
|
-
rowHeight,
|
|
36
|
-
classes
|
|
37
|
-
} = ownerState;
|
|
38
|
-
const slots = {
|
|
39
|
-
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
40
|
-
};
|
|
41
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
42
|
-
};
|
|
43
29
|
function EmptyCell({
|
|
44
30
|
width
|
|
45
31
|
}) {
|
|
@@ -72,6 +58,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
72
58
|
isFirstVisible,
|
|
73
59
|
isLastVisible,
|
|
74
60
|
isNotVisible,
|
|
61
|
+
showBottomBorder,
|
|
75
62
|
onClick,
|
|
76
63
|
onDoubleClick,
|
|
77
64
|
onMouseEnter,
|
|
@@ -93,21 +80,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
93
80
|
const rowNode = apiRef.current.getRowNode(rowId);
|
|
94
81
|
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
95
82
|
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
83
|
+
const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
|
|
84
|
+
const editable = rootProps.editMode === GridEditModes.Row;
|
|
96
85
|
const hasFocusCell = focusedColumnIndex !== undefined;
|
|
97
86
|
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
|
|
98
87
|
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
|
|
99
88
|
const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
|
|
100
89
|
|
|
101
|
-
const
|
|
102
|
-
selected,
|
|
103
|
-
|
|
104
|
-
isLastVisible,
|
|
105
|
-
classes: rootProps.classes,
|
|
106
|
-
editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit,
|
|
107
|
-
editable: rootProps.editMode === GridEditModes.Row,
|
|
108
|
-
rowHeight
|
|
109
|
-
};
|
|
110
|
-
const classes = useUtilityClasses(ownerState);
|
|
90
|
+
const classes = composeGridClasses(rootProps.classes, {
|
|
91
|
+
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
92
|
+
});
|
|
111
93
|
React.useLayoutEffect(() => {
|
|
112
94
|
if (currentPage.range) {
|
|
113
95
|
// The index prop is relative to the rows from all pages. As example, the index prop of the
|
|
@@ -417,6 +399,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
417
399
|
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
|
|
418
400
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
419
401
|
selected: PropTypes.bool.isRequired,
|
|
402
|
+
showBottomBorder: PropTypes.bool.isRequired,
|
|
420
403
|
/**
|
|
421
404
|
* Determines which cell should be tabbable by having tabIndex=0.
|
|
422
405
|
* If `null`, no cell in this row is in the tab sequence.
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "rowCount", "visibleRowCount"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
10
10
|
import { getDataGridUtilityClass } from '../constants/gridClasses';
|