@mui/x-data-grid-pro 5.17.24 → 5.17.26
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 +42 -0
- package/components/DataGridProColumnHeaders.js +9 -8
- package/components/DataGridProVirtualScroller.js +29 -27
- package/components/GridDetailPanel.js +4 -0
- package/index.js +1 -1
- package/legacy/components/DataGridProColumnHeaders.js +8 -8
- package/legacy/components/DataGridProVirtualScroller.js +29 -27
- package/legacy/components/GridDetailPanel.js +4 -0
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/components/DataGridProColumnHeaders.js +9 -8
- package/modern/components/DataGridProVirtualScroller.js +29 -27
- package/modern/components/GridDetailPanel.js +4 -0
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/components/DataGridProColumnHeaders.js +7 -8
- package/node/components/DataGridProVirtualScroller.js +29 -27
- package/node/components/GridDetailPanel.js +5 -0
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +2 -2
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 5.17.26
|
|
7
|
+
|
|
8
|
+
_Mar 3, 2023_
|
|
9
|
+
|
|
10
|
+
We're happy to announce the [v6 stable](https://github.com/mui/mui-x/releases/tag/v6.0.0) is finally available! 🎉
|
|
11
|
+
Support, new features, and non-critical bug fixes will only be shipped in v6.
|
|
12
|
+
v5 is now officially in **long-term support**. This means it's the last v5 weekly release, and new versions will only be released for critical fixes; to provide security updates and support for regressions.
|
|
13
|
+
|
|
14
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
15
|
+
|
|
16
|
+
- 🌍 Improve Czech, Arabic, and Spanish locales
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
|
|
19
|
+
### `@mui/x-data-grid@v5.17.26` / `@mui/x-data-grid-pro@v5.17.26` / `@mui/x-data-grid-premium@v5.17.26`
|
|
20
|
+
|
|
21
|
+
#### Changes
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Register `getLocaleText` synchronously (#8073) @m4theushw
|
|
24
|
+
- [l10n] Import Czech (cs-CZ) locale (#8114) @BlastyCZ
|
|
25
|
+
- [l10n] Improve Arabic (ar-SD) locale for `DataGrid` (#8094) @atf98
|
|
26
|
+
- [l10n] Improve Spanish (es-ES) locale (#8030) @RadamesRamirez0
|
|
27
|
+
|
|
28
|
+
## 5.17.25
|
|
29
|
+
|
|
30
|
+
_Feb 23, 2023_
|
|
31
|
+
|
|
32
|
+
We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
|
|
33
|
+
|
|
34
|
+
- 🐞 Bugfixes
|
|
35
|
+
|
|
36
|
+
### `@mui/x-data-grid@v5.17.25` / `@mui/x-data-grid-pro@v5.17.25` / `@mui/x-data-grid-premium@v5.17.25`
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
|
|
40
|
+
- [DataGrid] Fix `ownerState` being `undefined` in theme style overrides (#7757) @lolaignatova
|
|
41
|
+
|
|
42
|
+
### `@mui/x-date-pickers@v5.0.20` / `@mui/x-date-pickers-pro@v5.0.20`
|
|
43
|
+
|
|
44
|
+
#### Changes
|
|
45
|
+
|
|
46
|
+
- [DateTimePicker] Ensure toolbar `viewType` is correctly updated (#7942) @LukasTy
|
|
47
|
+
|
|
6
48
|
## 5.17.24
|
|
7
49
|
|
|
8
50
|
_Feb 16, 2023_
|
|
@@ -104,11 +104,12 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
104
104
|
innerRef,
|
|
105
105
|
minColumnIndex: leftPinnedColumns.length
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
|
|
108
|
+
const ownerState = _extends({}, rootProps, {
|
|
108
109
|
leftPinnedColumns,
|
|
109
|
-
rightPinnedColumns
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
rightPinnedColumns
|
|
111
|
+
});
|
|
112
|
+
|
|
112
113
|
const classes = useUtilityClasses(ownerState);
|
|
113
114
|
const leftRenderContext = renderContext && leftPinnedColumns.length ? _extends({}, renderContext, {
|
|
114
115
|
firstColumnIndex: 0,
|
|
@@ -128,9 +129,9 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
128
129
|
}, getRootProps(other), {
|
|
129
130
|
children: [leftRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
130
131
|
className: classes.leftPinnedColumns,
|
|
131
|
-
ownerState: {
|
|
132
|
+
ownerState: _extends({}, ownerState, {
|
|
132
133
|
side: GridPinnedPosition.left
|
|
133
|
-
}
|
|
134
|
+
})
|
|
134
135
|
}, pinnedColumnHeadersProps, {
|
|
135
136
|
children: [getColumnGroupHeaders({
|
|
136
137
|
renderContext: leftRenderContext,
|
|
@@ -156,9 +157,9 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
156
157
|
maxLastColumn: visibleColumnFields.length - rightPinnedColumns.length
|
|
157
158
|
})]
|
|
158
159
|
})), rightRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
159
|
-
ownerState: {
|
|
160
|
+
ownerState: _extends({}, ownerState, {
|
|
160
161
|
side: GridPinnedPosition.right
|
|
161
|
-
},
|
|
162
|
+
}),
|
|
162
163
|
className: classes.rightPinnedColumns,
|
|
163
164
|
style: {
|
|
164
165
|
paddingRight: scrollbarSize
|
|
@@ -111,6 +111,13 @@ const VirtualScrollerPinnedColumns = styled('div', {
|
|
|
111
111
|
boxShadow: `-2px 0px 4px -2px ${boxShadowColor}`
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
|
+
var PinnedRowsPosition;
|
|
115
|
+
|
|
116
|
+
(function (PinnedRowsPosition) {
|
|
117
|
+
PinnedRowsPosition["top"] = "top";
|
|
118
|
+
PinnedRowsPosition["bottom"] = "bottom";
|
|
119
|
+
})(PinnedRowsPosition || (PinnedRowsPosition = {}));
|
|
120
|
+
|
|
114
121
|
const VirtualScrollerPinnedRows = styled('div', {
|
|
115
122
|
name: 'MuiDataGrid',
|
|
116
123
|
slot: 'PinnedRows',
|
|
@@ -131,10 +138,10 @@ const VirtualScrollerPinnedRows = styled('div', {
|
|
|
131
138
|
backgroundColor: theme.palette.background.default
|
|
132
139
|
}, theme.palette.mode === 'dark' && {
|
|
133
140
|
backgroundImage: darkModeBackgroundImage
|
|
134
|
-
}, ownerState.position ===
|
|
141
|
+
}, ownerState.position === PinnedRowsPosition.top && {
|
|
135
142
|
top: 0,
|
|
136
143
|
boxShadow: `0px 3px 4px -2px ${boxShadowColor}`
|
|
137
|
-
}, ownerState.position ===
|
|
144
|
+
}, ownerState.position === PinnedRowsPosition.bottom && {
|
|
138
145
|
boxShadow: `0px -3px 4px -2px ${boxShadowColor}`,
|
|
139
146
|
bottom: 0
|
|
140
147
|
});
|
|
@@ -194,13 +201,7 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
194
201
|
const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
|
|
195
202
|
const topPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.top) || [], [pinnedRows == null ? void 0 : pinnedRows.top]);
|
|
196
203
|
const bottomPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.bottom) || [], [pinnedRows == null ? void 0 : pinnedRows.bottom]);
|
|
197
|
-
const ownerState =
|
|
198
|
-
classes: rootProps.classes,
|
|
199
|
-
leftPinnedColumns,
|
|
200
|
-
rightPinnedColumns,
|
|
201
|
-
topPinnedRowsCount: topPinnedRowsData.length,
|
|
202
|
-
bottomPinnedRowsCount: bottomPinnedRowsData.length
|
|
203
|
-
};
|
|
204
|
+
const ownerState = rootProps;
|
|
204
205
|
const classes = useUtilityClasses(ownerState);
|
|
205
206
|
const {
|
|
206
207
|
renderContext,
|
|
@@ -301,9 +302,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
301
302
|
return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({}, getRootProps(other), {
|
|
302
303
|
children: [topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
303
304
|
className: classes.topPinnedRows,
|
|
304
|
-
ownerState: {
|
|
305
|
-
position:
|
|
306
|
-
},
|
|
305
|
+
ownerState: _extends({}, ownerState, {
|
|
306
|
+
position: PinnedRowsPosition.top
|
|
307
|
+
}),
|
|
307
308
|
style: {
|
|
308
309
|
width: contentProps.style.width,
|
|
309
310
|
height: pinnedRowsHeight.top
|
|
@@ -311,9 +312,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
311
312
|
role: "rowgroup",
|
|
312
313
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
313
314
|
className: classes.leftPinnedColumns,
|
|
314
|
-
ownerState: {
|
|
315
|
+
ownerState: _extends({}, ownerState, {
|
|
315
316
|
side: GridPinnedPosition.left
|
|
316
|
-
},
|
|
317
|
+
}),
|
|
317
318
|
children: getRows({
|
|
318
319
|
renderContext: leftRenderContext,
|
|
319
320
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -329,9 +330,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
329
330
|
children: topPinnedRows
|
|
330
331
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
331
332
|
className: classes.rightPinnedColumns,
|
|
332
|
-
ownerState: {
|
|
333
|
+
ownerState: _extends({}, ownerState, {
|
|
333
334
|
side: GridPinnedPosition.right
|
|
334
|
-
},
|
|
335
|
+
}),
|
|
335
336
|
children: getRows({
|
|
336
337
|
renderContext: rightRenderContext,
|
|
337
338
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -345,9 +346,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
345
346
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
346
347
|
ref: leftColumns,
|
|
347
348
|
className: classes.leftPinnedColumns,
|
|
348
|
-
ownerState: {
|
|
349
|
+
ownerState: _extends({}, ownerState, {
|
|
349
350
|
side: GridPinnedPosition.left
|
|
350
|
-
},
|
|
351
|
+
}),
|
|
351
352
|
style: pinnedColumnsStyle,
|
|
352
353
|
children: getRows({
|
|
353
354
|
renderContext: leftRenderContext,
|
|
@@ -361,9 +362,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
361
362
|
children: mainRows
|
|
362
363
|
})), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
363
364
|
ref: rightColumns,
|
|
364
|
-
ownerState: {
|
|
365
|
+
ownerState: _extends({}, ownerState, {
|
|
365
366
|
side: GridPinnedPosition.right
|
|
366
|
-
},
|
|
367
|
+
}),
|
|
367
368
|
className: classes.rightPinnedColumns,
|
|
368
369
|
style: pinnedColumnsStyle,
|
|
369
370
|
children: getRows({
|
|
@@ -376,13 +377,14 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
376
377
|
})
|
|
377
378
|
}), detailPanels.length > 0 && /*#__PURE__*/_jsx(VirtualScrollerDetailPanels, {
|
|
378
379
|
className: classes.detailPanels,
|
|
380
|
+
ownerState: ownerState,
|
|
379
381
|
children: detailPanels
|
|
380
382
|
})]
|
|
381
383
|
})), bottomPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
382
384
|
className: classes.bottomPinnedRows,
|
|
383
|
-
ownerState: {
|
|
384
|
-
position:
|
|
385
|
-
},
|
|
385
|
+
ownerState: _extends({}, ownerState, {
|
|
386
|
+
position: PinnedRowsPosition.bottom
|
|
387
|
+
}),
|
|
386
388
|
style: {
|
|
387
389
|
width: contentProps.style.width,
|
|
388
390
|
height: pinnedRowsHeight.bottom
|
|
@@ -390,9 +392,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
390
392
|
role: "rowgroup",
|
|
391
393
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
392
394
|
className: classes.leftPinnedColumns,
|
|
393
|
-
ownerState: {
|
|
395
|
+
ownerState: _extends({}, ownerState, {
|
|
394
396
|
side: GridPinnedPosition.left
|
|
395
|
-
},
|
|
397
|
+
}),
|
|
396
398
|
children: getRows({
|
|
397
399
|
renderContext: leftRenderContext,
|
|
398
400
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -409,9 +411,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
409
411
|
children: bottomPinnedRows
|
|
410
412
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
411
413
|
className: classes.rightPinnedColumns,
|
|
412
|
-
ownerState: {
|
|
414
|
+
ownerState: _extends({}, ownerState, {
|
|
413
415
|
side: GridPinnedPosition.right
|
|
414
|
-
},
|
|
416
|
+
}),
|
|
415
417
|
children: getRows({
|
|
416
418
|
renderContext: rightRenderContext,
|
|
417
419
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import Box from '@mui/material/Box';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
7
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
8
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const DetailPanel = styled(Box, {
|
|
10
11
|
name: 'MuiDataGrid',
|
|
@@ -30,6 +31,8 @@ const GridDetailPanel = props => {
|
|
|
30
31
|
|
|
31
32
|
const apiRef = useGridApiContext();
|
|
32
33
|
const ref = React.useRef();
|
|
34
|
+
const rootProps = useGridRootProps();
|
|
35
|
+
const ownerState = rootProps;
|
|
33
36
|
React.useLayoutEffect(() => {
|
|
34
37
|
if (height === 'auto' && ref.current && typeof ResizeObserver === 'undefined') {
|
|
35
38
|
// Fallback for IE
|
|
@@ -58,6 +61,7 @@ const GridDetailPanel = props => {
|
|
|
58
61
|
|
|
59
62
|
return /*#__PURE__*/_jsx(DetailPanel, _extends({
|
|
60
63
|
ref: ref,
|
|
64
|
+
ownerState: ownerState,
|
|
61
65
|
style: style
|
|
62
66
|
}, other));
|
|
63
67
|
};
|
package/index.js
CHANGED
|
@@ -112,11 +112,11 @@ export var DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function Dat
|
|
|
112
112
|
getColumnHeaders = _useGridColumnHeaders.getColumnHeaders,
|
|
113
113
|
getColumnGroupHeaders = _useGridColumnHeaders.getColumnGroupHeaders;
|
|
114
114
|
|
|
115
|
-
var ownerState = {
|
|
115
|
+
var ownerState = _extends({}, rootProps, {
|
|
116
116
|
leftPinnedColumns: leftPinnedColumns,
|
|
117
|
-
rightPinnedColumns: rightPinnedColumns
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
rightPinnedColumns: rightPinnedColumns
|
|
118
|
+
});
|
|
119
|
+
|
|
120
120
|
var classes = useUtilityClasses(ownerState);
|
|
121
121
|
var leftRenderContext = renderContext && leftPinnedColumns.length ? _extends({}, renderContext, {
|
|
122
122
|
firstColumnIndex: 0,
|
|
@@ -136,9 +136,9 @@ export var DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function Dat
|
|
|
136
136
|
}, getRootProps(other), {
|
|
137
137
|
children: [leftRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
138
138
|
className: classes.leftPinnedColumns,
|
|
139
|
-
ownerState: {
|
|
139
|
+
ownerState: _extends({}, ownerState, {
|
|
140
140
|
side: GridPinnedPosition.left
|
|
141
|
-
}
|
|
141
|
+
})
|
|
142
142
|
}, pinnedColumnHeadersProps, {
|
|
143
143
|
children: [getColumnGroupHeaders({
|
|
144
144
|
renderContext: leftRenderContext,
|
|
@@ -164,9 +164,9 @@ export var DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function Dat
|
|
|
164
164
|
maxLastColumn: visibleColumnFields.length - rightPinnedColumns.length
|
|
165
165
|
})]
|
|
166
166
|
})), rightRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
167
|
-
ownerState: {
|
|
167
|
+
ownerState: _extends({}, ownerState, {
|
|
168
168
|
side: GridPinnedPosition.right
|
|
169
|
-
},
|
|
169
|
+
}),
|
|
170
170
|
className: classes.rightPinnedColumns,
|
|
171
171
|
style: {
|
|
172
172
|
paddingRight: scrollbarSize
|
|
@@ -115,6 +115,13 @@ var VirtualScrollerPinnedColumns = styled('div', {
|
|
|
115
115
|
boxShadow: "-2px 0px 4px -2px ".concat(boxShadowColor)
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
|
+
var PinnedRowsPosition;
|
|
119
|
+
|
|
120
|
+
(function (PinnedRowsPosition) {
|
|
121
|
+
PinnedRowsPosition["top"] = "top";
|
|
122
|
+
PinnedRowsPosition["bottom"] = "bottom";
|
|
123
|
+
})(PinnedRowsPosition || (PinnedRowsPosition = {}));
|
|
124
|
+
|
|
118
125
|
var VirtualScrollerPinnedRows = styled('div', {
|
|
119
126
|
name: 'MuiDataGrid',
|
|
120
127
|
slot: 'PinnedRows',
|
|
@@ -132,10 +139,10 @@ var VirtualScrollerPinnedRows = styled('div', {
|
|
|
132
139
|
backgroundColor: theme.palette.background.default
|
|
133
140
|
}, theme.palette.mode === 'dark' && {
|
|
134
141
|
backgroundImage: darkModeBackgroundImage
|
|
135
|
-
}, ownerState.position ===
|
|
142
|
+
}, ownerState.position === PinnedRowsPosition.top && {
|
|
136
143
|
top: 0,
|
|
137
144
|
boxShadow: "0px 3px 4px -2px ".concat(boxShadowColor)
|
|
138
|
-
}, ownerState.position ===
|
|
145
|
+
}, ownerState.position === PinnedRowsPosition.bottom && {
|
|
139
146
|
boxShadow: "0px -3px 4px -2px ".concat(boxShadowColor),
|
|
140
147
|
bottom: 0
|
|
141
148
|
});
|
|
@@ -206,13 +213,7 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
206
213
|
var bottomPinnedRowsData = React.useMemo(function () {
|
|
207
214
|
return (pinnedRows == null ? void 0 : pinnedRows.bottom) || [];
|
|
208
215
|
}, [pinnedRows == null ? void 0 : pinnedRows.bottom]);
|
|
209
|
-
var ownerState =
|
|
210
|
-
classes: rootProps.classes,
|
|
211
|
-
leftPinnedColumns: leftPinnedColumns,
|
|
212
|
-
rightPinnedColumns: rightPinnedColumns,
|
|
213
|
-
topPinnedRowsCount: topPinnedRowsData.length,
|
|
214
|
-
bottomPinnedRowsCount: bottomPinnedRowsData.length
|
|
215
|
-
};
|
|
216
|
+
var ownerState = rootProps;
|
|
216
217
|
var classes = useUtilityClasses(ownerState);
|
|
217
218
|
|
|
218
219
|
var _useGridVirtualScroll = useGridVirtualScroller(_extends({
|
|
@@ -314,9 +315,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
314
315
|
return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({}, getRootProps(other), {
|
|
315
316
|
children: [topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
316
317
|
className: classes.topPinnedRows,
|
|
317
|
-
ownerState: {
|
|
318
|
-
position:
|
|
319
|
-
},
|
|
318
|
+
ownerState: _extends({}, ownerState, {
|
|
319
|
+
position: PinnedRowsPosition.top
|
|
320
|
+
}),
|
|
320
321
|
style: {
|
|
321
322
|
width: contentProps.style.width,
|
|
322
323
|
height: pinnedRowsHeight.top
|
|
@@ -324,9 +325,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
324
325
|
role: "rowgroup",
|
|
325
326
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
326
327
|
className: classes.leftPinnedColumns,
|
|
327
|
-
ownerState: {
|
|
328
|
+
ownerState: _extends({}, ownerState, {
|
|
328
329
|
side: GridPinnedPosition.left
|
|
329
|
-
},
|
|
330
|
+
}),
|
|
330
331
|
children: getRows({
|
|
331
332
|
renderContext: leftRenderContext,
|
|
332
333
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -342,9 +343,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
342
343
|
children: topPinnedRows
|
|
343
344
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
344
345
|
className: classes.rightPinnedColumns,
|
|
345
|
-
ownerState: {
|
|
346
|
+
ownerState: _extends({}, ownerState, {
|
|
346
347
|
side: GridPinnedPosition.right
|
|
347
|
-
},
|
|
348
|
+
}),
|
|
348
349
|
children: getRows({
|
|
349
350
|
renderContext: rightRenderContext,
|
|
350
351
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -358,9 +359,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
358
359
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
359
360
|
ref: leftColumns,
|
|
360
361
|
className: classes.leftPinnedColumns,
|
|
361
|
-
ownerState: {
|
|
362
|
+
ownerState: _extends({}, ownerState, {
|
|
362
363
|
side: GridPinnedPosition.left
|
|
363
|
-
},
|
|
364
|
+
}),
|
|
364
365
|
style: pinnedColumnsStyle,
|
|
365
366
|
children: getRows({
|
|
366
367
|
renderContext: leftRenderContext,
|
|
@@ -374,9 +375,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
374
375
|
children: mainRows
|
|
375
376
|
})), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
376
377
|
ref: rightColumns,
|
|
377
|
-
ownerState: {
|
|
378
|
+
ownerState: _extends({}, ownerState, {
|
|
378
379
|
side: GridPinnedPosition.right
|
|
379
|
-
},
|
|
380
|
+
}),
|
|
380
381
|
className: classes.rightPinnedColumns,
|
|
381
382
|
style: pinnedColumnsStyle,
|
|
382
383
|
children: getRows({
|
|
@@ -389,13 +390,14 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
389
390
|
})
|
|
390
391
|
}), detailPanels.length > 0 && /*#__PURE__*/_jsx(VirtualScrollerDetailPanels, {
|
|
391
392
|
className: classes.detailPanels,
|
|
393
|
+
ownerState: ownerState,
|
|
392
394
|
children: detailPanels
|
|
393
395
|
})]
|
|
394
396
|
})), bottomPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
395
397
|
className: classes.bottomPinnedRows,
|
|
396
|
-
ownerState: {
|
|
397
|
-
position:
|
|
398
|
-
},
|
|
398
|
+
ownerState: _extends({}, ownerState, {
|
|
399
|
+
position: PinnedRowsPosition.bottom
|
|
400
|
+
}),
|
|
399
401
|
style: {
|
|
400
402
|
width: contentProps.style.width,
|
|
401
403
|
height: pinnedRowsHeight.bottom
|
|
@@ -403,9 +405,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
403
405
|
role: "rowgroup",
|
|
404
406
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
405
407
|
className: classes.leftPinnedColumns,
|
|
406
|
-
ownerState: {
|
|
408
|
+
ownerState: _extends({}, ownerState, {
|
|
407
409
|
side: GridPinnedPosition.left
|
|
408
|
-
},
|
|
410
|
+
}),
|
|
409
411
|
children: getRows({
|
|
410
412
|
renderContext: leftRenderContext,
|
|
411
413
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -422,9 +424,9 @@ var DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
422
424
|
children: bottomPinnedRows
|
|
423
425
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
424
426
|
className: classes.rightPinnedColumns,
|
|
425
|
-
ownerState: {
|
|
427
|
+
ownerState: _extends({}, ownerState, {
|
|
426
428
|
side: GridPinnedPosition.right
|
|
427
|
-
},
|
|
429
|
+
}),
|
|
428
430
|
children: getRows({
|
|
429
431
|
renderContext: rightRenderContext,
|
|
430
432
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import Box from '@mui/material/Box';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
8
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
9
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
var DetailPanel = styled(Box, {
|
|
11
12
|
name: 'MuiDataGrid',
|
|
@@ -33,6 +34,8 @@ var GridDetailPanel = function GridDetailPanel(props) {
|
|
|
33
34
|
|
|
34
35
|
var apiRef = useGridApiContext();
|
|
35
36
|
var ref = React.useRef();
|
|
37
|
+
var rootProps = useGridRootProps();
|
|
38
|
+
var ownerState = rootProps;
|
|
36
39
|
React.useLayoutEffect(function () {
|
|
37
40
|
if (height === 'auto' && ref.current && typeof ResizeObserver === 'undefined') {
|
|
38
41
|
// Fallback for IE
|
|
@@ -65,6 +68,7 @@ var GridDetailPanel = function GridDetailPanel(props) {
|
|
|
65
68
|
|
|
66
69
|
return /*#__PURE__*/_jsx(DetailPanel, _extends({
|
|
67
70
|
ref: ref,
|
|
71
|
+
ownerState: ownerState,
|
|
68
72
|
style: style
|
|
69
73
|
}, other));
|
|
70
74
|
};
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY3Nzc5ODAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -104,11 +104,12 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
104
104
|
innerRef,
|
|
105
105
|
minColumnIndex: leftPinnedColumns.length
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
|
|
108
|
+
const ownerState = _extends({}, rootProps, {
|
|
108
109
|
leftPinnedColumns,
|
|
109
|
-
rightPinnedColumns
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
rightPinnedColumns
|
|
111
|
+
});
|
|
112
|
+
|
|
112
113
|
const classes = useUtilityClasses(ownerState);
|
|
113
114
|
const leftRenderContext = renderContext && leftPinnedColumns.length ? _extends({}, renderContext, {
|
|
114
115
|
firstColumnIndex: 0,
|
|
@@ -128,9 +129,9 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
128
129
|
}, getRootProps(other), {
|
|
129
130
|
children: [leftRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
130
131
|
className: classes.leftPinnedColumns,
|
|
131
|
-
ownerState: {
|
|
132
|
+
ownerState: _extends({}, ownerState, {
|
|
132
133
|
side: GridPinnedPosition.left
|
|
133
|
-
}
|
|
134
|
+
})
|
|
134
135
|
}, pinnedColumnHeadersProps, {
|
|
135
136
|
children: [getColumnGroupHeaders({
|
|
136
137
|
renderContext: leftRenderContext,
|
|
@@ -156,9 +157,9 @@ export const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function D
|
|
|
156
157
|
maxLastColumn: visibleColumnFields.length - rightPinnedColumns.length
|
|
157
158
|
})]
|
|
158
159
|
})), rightRenderContext && /*#__PURE__*/_jsxs(GridColumnHeadersPinnedColumnHeaders, _extends({
|
|
159
|
-
ownerState: {
|
|
160
|
+
ownerState: _extends({}, ownerState, {
|
|
160
161
|
side: GridPinnedPosition.right
|
|
161
|
-
},
|
|
162
|
+
}),
|
|
162
163
|
className: classes.rightPinnedColumns,
|
|
163
164
|
style: {
|
|
164
165
|
paddingRight: scrollbarSize
|
|
@@ -109,6 +109,13 @@ const VirtualScrollerPinnedColumns = styled('div', {
|
|
|
109
109
|
boxShadow: `-2px 0px 4px -2px ${boxShadowColor}`
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
+
var PinnedRowsPosition;
|
|
113
|
+
|
|
114
|
+
(function (PinnedRowsPosition) {
|
|
115
|
+
PinnedRowsPosition["top"] = "top";
|
|
116
|
+
PinnedRowsPosition["bottom"] = "bottom";
|
|
117
|
+
})(PinnedRowsPosition || (PinnedRowsPosition = {}));
|
|
118
|
+
|
|
112
119
|
const VirtualScrollerPinnedRows = styled('div', {
|
|
113
120
|
name: 'MuiDataGrid',
|
|
114
121
|
slot: 'PinnedRows',
|
|
@@ -129,10 +136,10 @@ const VirtualScrollerPinnedRows = styled('div', {
|
|
|
129
136
|
backgroundColor: theme.palette.background.default
|
|
130
137
|
}, theme.palette.mode === 'dark' && {
|
|
131
138
|
backgroundImage: darkModeBackgroundImage
|
|
132
|
-
}, ownerState.position ===
|
|
139
|
+
}, ownerState.position === PinnedRowsPosition.top && {
|
|
133
140
|
top: 0,
|
|
134
141
|
boxShadow: `0px 3px 4px -2px ${boxShadowColor}`
|
|
135
|
-
}, ownerState.position ===
|
|
142
|
+
}, ownerState.position === PinnedRowsPosition.bottom && {
|
|
136
143
|
boxShadow: `0px -3px 4px -2px ${boxShadowColor}`,
|
|
137
144
|
bottom: 0
|
|
138
145
|
});
|
|
@@ -192,13 +199,7 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
192
199
|
const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
|
|
193
200
|
const topPinnedRowsData = React.useMemo(() => pinnedRows?.top || [], [pinnedRows?.top]);
|
|
194
201
|
const bottomPinnedRowsData = React.useMemo(() => pinnedRows?.bottom || [], [pinnedRows?.bottom]);
|
|
195
|
-
const ownerState =
|
|
196
|
-
classes: rootProps.classes,
|
|
197
|
-
leftPinnedColumns,
|
|
198
|
-
rightPinnedColumns,
|
|
199
|
-
topPinnedRowsCount: topPinnedRowsData.length,
|
|
200
|
-
bottomPinnedRowsCount: bottomPinnedRowsData.length
|
|
201
|
-
};
|
|
202
|
+
const ownerState = rootProps;
|
|
202
203
|
const classes = useUtilityClasses(ownerState);
|
|
203
204
|
const {
|
|
204
205
|
renderContext,
|
|
@@ -299,9 +300,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
299
300
|
return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({}, getRootProps(other), {
|
|
300
301
|
children: [topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
301
302
|
className: classes.topPinnedRows,
|
|
302
|
-
ownerState: {
|
|
303
|
-
position:
|
|
304
|
-
},
|
|
303
|
+
ownerState: _extends({}, ownerState, {
|
|
304
|
+
position: PinnedRowsPosition.top
|
|
305
|
+
}),
|
|
305
306
|
style: {
|
|
306
307
|
width: contentProps.style.width,
|
|
307
308
|
height: pinnedRowsHeight.top
|
|
@@ -309,9 +310,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
309
310
|
role: "rowgroup",
|
|
310
311
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
311
312
|
className: classes.leftPinnedColumns,
|
|
312
|
-
ownerState: {
|
|
313
|
+
ownerState: _extends({}, ownerState, {
|
|
313
314
|
side: GridPinnedPosition.left
|
|
314
|
-
},
|
|
315
|
+
}),
|
|
315
316
|
children: getRows({
|
|
316
317
|
renderContext: leftRenderContext,
|
|
317
318
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -327,9 +328,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
327
328
|
children: topPinnedRows
|
|
328
329
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
329
330
|
className: classes.rightPinnedColumns,
|
|
330
|
-
ownerState: {
|
|
331
|
+
ownerState: _extends({}, ownerState, {
|
|
331
332
|
side: GridPinnedPosition.right
|
|
332
|
-
},
|
|
333
|
+
}),
|
|
333
334
|
children: getRows({
|
|
334
335
|
renderContext: rightRenderContext,
|
|
335
336
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -343,9 +344,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
343
344
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
344
345
|
ref: leftColumns,
|
|
345
346
|
className: classes.leftPinnedColumns,
|
|
346
|
-
ownerState: {
|
|
347
|
+
ownerState: _extends({}, ownerState, {
|
|
347
348
|
side: GridPinnedPosition.left
|
|
348
|
-
},
|
|
349
|
+
}),
|
|
349
350
|
style: pinnedColumnsStyle,
|
|
350
351
|
children: getRows({
|
|
351
352
|
renderContext: leftRenderContext,
|
|
@@ -359,9 +360,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
359
360
|
children: mainRows
|
|
360
361
|
})), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
361
362
|
ref: rightColumns,
|
|
362
|
-
ownerState: {
|
|
363
|
+
ownerState: _extends({}, ownerState, {
|
|
363
364
|
side: GridPinnedPosition.right
|
|
364
|
-
},
|
|
365
|
+
}),
|
|
365
366
|
className: classes.rightPinnedColumns,
|
|
366
367
|
style: pinnedColumnsStyle,
|
|
367
368
|
children: getRows({
|
|
@@ -374,13 +375,14 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
374
375
|
})
|
|
375
376
|
}), detailPanels.length > 0 && /*#__PURE__*/_jsx(VirtualScrollerDetailPanels, {
|
|
376
377
|
className: classes.detailPanels,
|
|
378
|
+
ownerState: ownerState,
|
|
377
379
|
children: detailPanels
|
|
378
380
|
})]
|
|
379
381
|
})), bottomPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
380
382
|
className: classes.bottomPinnedRows,
|
|
381
|
-
ownerState: {
|
|
382
|
-
position:
|
|
383
|
-
},
|
|
383
|
+
ownerState: _extends({}, ownerState, {
|
|
384
|
+
position: PinnedRowsPosition.bottom
|
|
385
|
+
}),
|
|
384
386
|
style: {
|
|
385
387
|
width: contentProps.style.width,
|
|
386
388
|
height: pinnedRowsHeight.bottom
|
|
@@ -388,9 +390,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
388
390
|
role: "rowgroup",
|
|
389
391
|
children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
390
392
|
className: classes.leftPinnedColumns,
|
|
391
|
-
ownerState: {
|
|
393
|
+
ownerState: _extends({}, ownerState, {
|
|
392
394
|
side: GridPinnedPosition.left
|
|
393
|
-
},
|
|
395
|
+
}),
|
|
394
396
|
children: getRows({
|
|
395
397
|
renderContext: leftRenderContext,
|
|
396
398
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -407,9 +409,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
407
409
|
children: bottomPinnedRows
|
|
408
410
|
}), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
|
|
409
411
|
className: classes.rightPinnedColumns,
|
|
410
|
-
ownerState: {
|
|
412
|
+
ownerState: _extends({}, ownerState, {
|
|
411
413
|
side: GridPinnedPosition.right
|
|
412
|
-
},
|
|
414
|
+
}),
|
|
413
415
|
children: getRows({
|
|
414
416
|
renderContext: rightRenderContext,
|
|
415
417
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import Box from '@mui/material/Box';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
7
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
8
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const DetailPanel = styled(Box, {
|
|
10
11
|
name: 'MuiDataGrid',
|
|
@@ -30,6 +31,8 @@ const GridDetailPanel = props => {
|
|
|
30
31
|
|
|
31
32
|
const apiRef = useGridApiContext();
|
|
32
33
|
const ref = React.useRef();
|
|
34
|
+
const rootProps = useGridRootProps();
|
|
35
|
+
const ownerState = rootProps;
|
|
33
36
|
React.useLayoutEffect(() => {
|
|
34
37
|
if (height === 'auto' && ref.current && typeof ResizeObserver === 'undefined') {
|
|
35
38
|
// Fallback for IE
|
|
@@ -58,6 +61,7 @@ const GridDetailPanel = props => {
|
|
|
58
61
|
|
|
59
62
|
return /*#__PURE__*/_jsx(DetailPanel, _extends({
|
|
60
63
|
ref: ref,
|
|
64
|
+
ownerState: ownerState,
|
|
61
65
|
style: style
|
|
62
66
|
}, other));
|
|
63
67
|
};
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY3Nzc5ODAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -129,11 +129,10 @@ const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
129
129
|
innerRef,
|
|
130
130
|
minColumnIndex: leftPinnedColumns.length
|
|
131
131
|
});
|
|
132
|
-
const ownerState = {
|
|
132
|
+
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
133
133
|
leftPinnedColumns,
|
|
134
|
-
rightPinnedColumns
|
|
135
|
-
|
|
136
|
-
};
|
|
134
|
+
rightPinnedColumns
|
|
135
|
+
});
|
|
137
136
|
const classes = useUtilityClasses(ownerState);
|
|
138
137
|
const leftRenderContext = renderContext && leftPinnedColumns.length ? (0, _extends2.default)({}, renderContext, {
|
|
139
138
|
firstColumnIndex: 0,
|
|
@@ -153,9 +152,9 @@ const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
153
152
|
}, getRootProps(other), {
|
|
154
153
|
children: [leftRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridColumnHeadersPinnedColumnHeaders, (0, _extends2.default)({
|
|
155
154
|
className: classes.leftPinnedColumns,
|
|
156
|
-
ownerState: {
|
|
155
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
157
156
|
side: _columnPinning.GridPinnedPosition.left
|
|
158
|
-
}
|
|
157
|
+
})
|
|
159
158
|
}, pinnedColumnHeadersProps, {
|
|
160
159
|
children: [getColumnGroupHeaders({
|
|
161
160
|
renderContext: leftRenderContext,
|
|
@@ -181,9 +180,9 @@ const DataGridProColumnHeaders = /*#__PURE__*/React.forwardRef(function DataGrid
|
|
|
181
180
|
maxLastColumn: visibleColumnFields.length - rightPinnedColumns.length
|
|
182
181
|
})]
|
|
183
182
|
})), rightRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridColumnHeadersPinnedColumnHeaders, (0, _extends2.default)({
|
|
184
|
-
ownerState: {
|
|
183
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
185
184
|
side: _columnPinning.GridPinnedPosition.right
|
|
186
|
-
},
|
|
185
|
+
}),
|
|
187
186
|
className: classes.rightPinnedColumns,
|
|
188
187
|
style: {
|
|
189
188
|
paddingRight: scrollbarSize
|
|
@@ -140,6 +140,13 @@ const VirtualScrollerPinnedColumns = (0, _styles.styled)('div', {
|
|
|
140
140
|
boxShadow: `-2px 0px 4px -2px ${boxShadowColor}`
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
|
+
var PinnedRowsPosition;
|
|
144
|
+
|
|
145
|
+
(function (PinnedRowsPosition) {
|
|
146
|
+
PinnedRowsPosition["top"] = "top";
|
|
147
|
+
PinnedRowsPosition["bottom"] = "bottom";
|
|
148
|
+
})(PinnedRowsPosition || (PinnedRowsPosition = {}));
|
|
149
|
+
|
|
143
150
|
const VirtualScrollerPinnedRows = (0, _styles.styled)('div', {
|
|
144
151
|
name: 'MuiDataGrid',
|
|
145
152
|
slot: 'PinnedRows',
|
|
@@ -160,10 +167,10 @@ const VirtualScrollerPinnedRows = (0, _styles.styled)('div', {
|
|
|
160
167
|
backgroundColor: theme.palette.background.default
|
|
161
168
|
}, theme.palette.mode === 'dark' && {
|
|
162
169
|
backgroundImage: darkModeBackgroundImage
|
|
163
|
-
}, ownerState.position ===
|
|
170
|
+
}, ownerState.position === PinnedRowsPosition.top && {
|
|
164
171
|
top: 0,
|
|
165
172
|
boxShadow: `0px 3px 4px -2px ${boxShadowColor}`
|
|
166
|
-
}, ownerState.position ===
|
|
173
|
+
}, ownerState.position === PinnedRowsPosition.bottom && {
|
|
167
174
|
boxShadow: `0px -3px 4px -2px ${boxShadowColor}`,
|
|
168
175
|
bottom: 0
|
|
169
176
|
});
|
|
@@ -222,13 +229,7 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
222
229
|
const pinnedRows = (0, _xDataGrid.useGridSelector)(apiRef, _gridRowPinningSelector.gridPinnedRowsSelector);
|
|
223
230
|
const topPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.top) || [], [pinnedRows == null ? void 0 : pinnedRows.top]);
|
|
224
231
|
const bottomPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.bottom) || [], [pinnedRows == null ? void 0 : pinnedRows.bottom]);
|
|
225
|
-
const ownerState =
|
|
226
|
-
classes: rootProps.classes,
|
|
227
|
-
leftPinnedColumns,
|
|
228
|
-
rightPinnedColumns,
|
|
229
|
-
topPinnedRowsCount: topPinnedRowsData.length,
|
|
230
|
-
bottomPinnedRowsCount: bottomPinnedRowsData.length
|
|
231
|
-
};
|
|
232
|
+
const ownerState = rootProps;
|
|
232
233
|
const classes = useUtilityClasses(ownerState);
|
|
233
234
|
const {
|
|
234
235
|
renderContext,
|
|
@@ -329,9 +330,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
329
330
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.GridVirtualScroller, (0, _extends2.default)({}, getRootProps(other), {
|
|
330
331
|
children: [topPinnedRowsData.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(VirtualScrollerPinnedRows, {
|
|
331
332
|
className: classes.topPinnedRows,
|
|
332
|
-
ownerState: {
|
|
333
|
-
position:
|
|
334
|
-
},
|
|
333
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
334
|
+
position: PinnedRowsPosition.top
|
|
335
|
+
}),
|
|
335
336
|
style: {
|
|
336
337
|
width: contentProps.style.width,
|
|
337
338
|
height: pinnedRowsHeight.top
|
|
@@ -339,9 +340,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
339
340
|
role: "rowgroup",
|
|
340
341
|
children: [leftRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
341
342
|
className: classes.leftPinnedColumns,
|
|
342
|
-
ownerState: {
|
|
343
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
343
344
|
side: _columnPinning.GridPinnedPosition.left
|
|
344
|
-
},
|
|
345
|
+
}),
|
|
345
346
|
children: getRows({
|
|
346
347
|
renderContext: leftRenderContext,
|
|
347
348
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -357,9 +358,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
357
358
|
children: topPinnedRows
|
|
358
359
|
}), rightRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
359
360
|
className: classes.rightPinnedColumns,
|
|
360
|
-
ownerState: {
|
|
361
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
361
362
|
side: _columnPinning.GridPinnedPosition.right
|
|
362
|
-
},
|
|
363
|
+
}),
|
|
363
364
|
children: getRows({
|
|
364
365
|
renderContext: rightRenderContext,
|
|
365
366
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -373,9 +374,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
373
374
|
children: [leftRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
374
375
|
ref: leftColumns,
|
|
375
376
|
className: classes.leftPinnedColumns,
|
|
376
|
-
ownerState: {
|
|
377
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
377
378
|
side: _columnPinning.GridPinnedPosition.left
|
|
378
|
-
},
|
|
379
|
+
}),
|
|
379
380
|
style: pinnedColumnsStyle,
|
|
380
381
|
children: getRows({
|
|
381
382
|
renderContext: leftRenderContext,
|
|
@@ -389,9 +390,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
389
390
|
children: mainRows
|
|
390
391
|
})), rightRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
391
392
|
ref: rightColumns,
|
|
392
|
-
ownerState: {
|
|
393
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
393
394
|
side: _columnPinning.GridPinnedPosition.right
|
|
394
|
-
},
|
|
395
|
+
}),
|
|
395
396
|
className: classes.rightPinnedColumns,
|
|
396
397
|
style: pinnedColumnsStyle,
|
|
397
398
|
children: getRows({
|
|
@@ -404,13 +405,14 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
404
405
|
})
|
|
405
406
|
}), detailPanels.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerDetailPanels, {
|
|
406
407
|
className: classes.detailPanels,
|
|
408
|
+
ownerState: ownerState,
|
|
407
409
|
children: detailPanels
|
|
408
410
|
})]
|
|
409
411
|
})), bottomPinnedRowsData.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(VirtualScrollerPinnedRows, {
|
|
410
412
|
className: classes.bottomPinnedRows,
|
|
411
|
-
ownerState: {
|
|
412
|
-
position:
|
|
413
|
-
},
|
|
413
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
414
|
+
position: PinnedRowsPosition.bottom
|
|
415
|
+
}),
|
|
414
416
|
style: {
|
|
415
417
|
width: contentProps.style.width,
|
|
416
418
|
height: pinnedRowsHeight.bottom
|
|
@@ -418,9 +420,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
418
420
|
role: "rowgroup",
|
|
419
421
|
children: [leftRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
420
422
|
className: classes.leftPinnedColumns,
|
|
421
|
-
ownerState: {
|
|
423
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
422
424
|
side: _columnPinning.GridPinnedPosition.left
|
|
423
|
-
},
|
|
425
|
+
}),
|
|
424
426
|
children: getRows({
|
|
425
427
|
renderContext: leftRenderContext,
|
|
426
428
|
minFirstColumn: leftRenderContext.firstColumnIndex,
|
|
@@ -437,9 +439,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
437
439
|
children: bottomPinnedRows
|
|
438
440
|
}), rightRenderContext && /*#__PURE__*/(0, _jsxRuntime.jsx)(VirtualScrollerPinnedColumns, {
|
|
439
441
|
className: classes.rightPinnedColumns,
|
|
440
|
-
ownerState: {
|
|
442
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
441
443
|
side: _columnPinning.GridPinnedPosition.right
|
|
442
|
-
},
|
|
444
|
+
}),
|
|
443
445
|
children: getRows({
|
|
444
446
|
renderContext: rightRenderContext,
|
|
445
447
|
minFirstColumn: rightRenderContext.firstColumnIndex,
|
|
@@ -19,6 +19,8 @@ var _styles = require("@mui/material/styles");
|
|
|
19
19
|
|
|
20
20
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
21
21
|
|
|
22
|
+
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
23
|
+
|
|
22
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
25
|
|
|
24
26
|
const _excluded = ["rowId", "height", "style"];
|
|
@@ -50,6 +52,8 @@ const GridDetailPanel = props => {
|
|
|
50
52
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
51
53
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
52
54
|
const ref = React.useRef();
|
|
55
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
56
|
+
const ownerState = rootProps;
|
|
53
57
|
React.useLayoutEffect(() => {
|
|
54
58
|
if (height === 'auto' && ref.current && typeof ResizeObserver === 'undefined') {
|
|
55
59
|
// Fallback for IE
|
|
@@ -76,6 +80,7 @@ const GridDetailPanel = props => {
|
|
|
76
80
|
});
|
|
77
81
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DetailPanel, (0, _extends2.default)({
|
|
78
82
|
ref: ref,
|
|
83
|
+
ownerState: ownerState,
|
|
79
84
|
style: style
|
|
80
85
|
}, other));
|
|
81
86
|
};
|
package/node/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
|
|
|
8
8
|
var _utils = require("@mui/utils");
|
|
9
9
|
|
|
10
10
|
const getReleaseInfo = () => {
|
|
11
|
-
const releaseInfo = "
|
|
11
|
+
const releaseInfo = "MTY3Nzc5ODAwMDAwMA==";
|
|
12
12
|
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
// A simple hack to set the value in the test environment (has no build step).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.26",
|
|
4
4
|
"description": "The Pro plan edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.18.9",
|
|
35
35
|
"@mui/utils": "^5.10.3",
|
|
36
|
-
"@mui/x-data-grid": "5.17.
|
|
36
|
+
"@mui/x-data-grid": "5.17.26",
|
|
37
37
|
"@mui/x-license-pro": "5.17.12",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY3Nzc5ODAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|