@mui/x-data-grid-pro 6.0.2 → 6.0.4
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 +119 -5
- package/components/DataGridProVirtualScroller.js +3 -3
- package/components/GridProColumnMenu.d.ts +6 -6
- package/components/GridProColumnMenu.js +6 -6
- package/components/reexports.d.ts +1 -1
- package/components/reexports.js +1 -1
- package/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -5
- package/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.js +2 -2
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/legacy/components/DataGridProVirtualScroller.js +3 -3
- package/legacy/components/GridProColumnMenu.js +6 -6
- package/legacy/components/reexports.js +1 -1
- package/legacy/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -5
- package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
- package/legacy/hooks/features/columnReorder/useGridColumnReorder.js +2 -2
- package/legacy/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
- package/legacy/index.js +2 -2
- package/legacy/utils/domUtils.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/components/DataGridProVirtualScroller.js +3 -3
- package/modern/components/GridProColumnMenu.js +6 -6
- package/modern/components/reexports.js +1 -1
- package/modern/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -5
- package/modern/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +2 -2
- package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
- package/modern/index.js +2 -2
- package/modern/utils/domUtils.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/components/DataGridProVirtualScroller.js +3 -3
- package/node/components/GridProColumnMenu.js +8 -8
- package/node/components/reexports.js +4 -4
- package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +6 -6
- package/node/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
- package/node/hooks/features/columnReorder/useGridColumnReorder.js +2 -2
- package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
- package/node/index.js +7 -7
- package/node/utils/domUtils.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/domUtils.js +1 -1
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,121 @@
|
|
|
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
|
+
## 6.0.4
|
|
7
|
+
|
|
8
|
+
_Mar 30, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
|
|
21
|
+
- [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
|
|
22
|
+
- [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
|
|
23
|
+
- [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
|
|
24
|
+
- [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
|
|
25
|
+
- [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
|
|
26
|
+
- [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
|
|
27
|
+
- [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
|
|
28
|
+
- [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
|
|
29
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
|
|
30
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
|
|
31
|
+
- [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
|
|
32
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
33
|
+
|
|
34
|
+
### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
|
|
35
|
+
|
|
36
|
+
#### Changes
|
|
37
|
+
|
|
38
|
+
- [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
|
|
39
|
+
- [fields] Clean the active date manager (#8370) @flaviendelangle
|
|
40
|
+
- [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
|
|
41
|
+
- [fields] Only add RTL characters when needed (#8325) @flaviendelangle
|
|
42
|
+
- [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
|
|
43
|
+
- [pickers] Allows non token characters in format (#8256) @alexfauquette
|
|
44
|
+
- [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
|
|
45
|
+
- [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
|
|
46
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
|
|
47
|
+
- [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
|
|
48
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
49
|
+
|
|
50
|
+
### `@mui/x-codemod@v6.0.4`
|
|
51
|
+
|
|
52
|
+
#### Changes
|
|
53
|
+
|
|
54
|
+
- [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
|
|
55
|
+
|
|
56
|
+
### Docs
|
|
57
|
+
|
|
58
|
+
- [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
|
|
59
|
+
- [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
|
|
60
|
+
- [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
|
|
61
|
+
- [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
|
|
62
|
+
|
|
63
|
+
### Core
|
|
64
|
+
|
|
65
|
+
- [charts] Work on typing (#8421) @flaviendelangle
|
|
66
|
+
|
|
67
|
+
## 6.0.3
|
|
68
|
+
|
|
69
|
+
_Mar 23, 2023_
|
|
70
|
+
|
|
71
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
72
|
+
|
|
73
|
+
- 🌍 Improve Bulgarian (bg-BG), Persian (fa-IR), Polish (pl-PL), and Dutch (nl-NL) locales
|
|
74
|
+
- 🐞 Bugfixes
|
|
75
|
+
- 📚 Documentation improvements
|
|
76
|
+
|
|
77
|
+
### `@mui/x-data-grid@v6.0.3` / `@mui/x-data-grid-pro@v6.0.3` / `@mui/x-data-grid-premium@v6.0.3`
|
|
78
|
+
|
|
79
|
+
#### Changes
|
|
80
|
+
|
|
81
|
+
- [DataGrid] Fix overflow calculation issue in column group headers (#8246) @MBilalShafi
|
|
82
|
+
- [DataGridPro] Fix column reorder glitches (#8335) @cherniavskii
|
|
83
|
+
- [l10n] Improve Bulgarian (bg-BG) locale (#8315) @todevmilen
|
|
84
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
85
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
86
|
+
|
|
87
|
+
### `@mui/x-date-pickers@v6.0.3` / `@mui/x-date-pickers-pro@v6.0.3`
|
|
88
|
+
|
|
89
|
+
#### Changes
|
|
90
|
+
|
|
91
|
+
- [fields] Allow to reset the value from the outside (#8287) @flaviendelangle
|
|
92
|
+
- [fields] Cleanup section order generation (#8290) @flaviendelangle
|
|
93
|
+
- [fields] Fix Safari input selection resetting regression (#8295) @LukasTy
|
|
94
|
+
- [fields] Fix editing when all sections are selected (#8330) @flaviendelangle
|
|
95
|
+
- [fields] Fix iOS browser scroll jumping when entering data (#8328) @LukasTy
|
|
96
|
+
- [fields] New prop `unstableFieldRef` to imperatively interact with the selected sections (#8235) @flaviendelangle
|
|
97
|
+
- [pickers] Align date calendar colors (#8318) @LukasTy
|
|
98
|
+
- [pickers] Support invalid dates from the field (#8298) @flaviendelangle
|
|
99
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
100
|
+
- [l10n] Improve Polish (pl-PL) locale (#8344) @drmats
|
|
101
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
102
|
+
|
|
103
|
+
### Docs
|
|
104
|
+
|
|
105
|
+
- [docs] Create examples of pickers with custom fields (#8034) @flaviendelangle
|
|
106
|
+
- [docs] Fix 301 redirections @oliviertassinari
|
|
107
|
+
- [docs] Fix link to React's docs @oliviertassinari
|
|
108
|
+
- [docs] Fix pro license links to point to the same page (#8303) @LukasTy
|
|
109
|
+
- [docs] Give an incentive to upgrade (#8269) @oliviertassinari
|
|
110
|
+
- [docs] Improve contrast on data grid navigation (#8239) @oliviertassinari
|
|
111
|
+
- [docs] Update shortcuts page to use slotProps (#8288) @dcorb
|
|
112
|
+
- [docs] Explain the `shouldDisableTime` migration in more depth (#8348) @LukasTy
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [core] Remove unused `visx` chart package (#8259) @LukasTy
|
|
117
|
+
- [core] Upgrade monorepo (#8331) @cherniavskii
|
|
118
|
+
- [charts] Project setup (#8308) @alexfauquette
|
|
119
|
+
- [test] Track visual regressions of column menu and filter/column panels (#8095) @cherniavskii
|
|
120
|
+
|
|
6
121
|
## 6.0.2
|
|
7
122
|
|
|
8
123
|
_Mar 16, 2023_
|
|
@@ -98,11 +213,9 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
98
213
|
|
|
99
214
|
_Mar 3, 2023_
|
|
100
215
|
|
|
101
|
-
We're
|
|
216
|
+
We're excited to [announce the first v6 stable release](https://mui.com/blog/mui-x-v6/)! 🎉🚀
|
|
102
217
|
|
|
103
218
|
This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
|
|
104
|
-
Head over to the [what's new](https://mui.com/x/whats-new/) page to check the highlighted new features.
|
|
105
|
-
|
|
106
219
|
Migration guides are available with a complete list of the breaking changes:
|
|
107
220
|
|
|
108
221
|
- [Data Grid](https://mui.com/x/migration/migration-data-grid-v5/)
|
|
@@ -119,6 +232,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
119
232
|
- experimentalFeatures={{ rowPinning: true }}
|
|
120
233
|
/>
|
|
121
234
|
```
|
|
235
|
+
|
|
122
236
|
- ⚡️ Improved grid performance by rows and cells memoization (#7846) @m4theushw
|
|
123
237
|
- ✨ Fields have a distinct visual state when empty (#8069) @LukasTy
|
|
124
238
|
- 🌍 Improve Czech (cs-CZ) locale (#8113) @BlastyCZ
|
|
@@ -556,14 +670,14 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
556
670
|
```
|
|
557
671
|
|
|
558
672
|
- The `error` and `onError` props were removed - the grid no longer catches errors during rendering.
|
|
559
|
-
To catch errors that happen during rendering use the [error boundary](https://
|
|
673
|
+
To catch errors that happen during rendering use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary).
|
|
560
674
|
|
|
561
675
|
- The `components.ErrorOverlay` slot was removed.
|
|
562
676
|
|
|
563
677
|
- The `GridErrorOverlay` component was removed.
|
|
564
678
|
|
|
565
679
|
- The `componentError` event was removed.
|
|
566
|
-
Use the [error boundary](https://
|
|
680
|
+
Use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) to catch errors thrown during rendering.
|
|
567
681
|
|
|
568
682
|
- The `apiRef.current.showError` method was removed.
|
|
569
683
|
The UI for errors is no longer handled by the grid.
|
|
@@ -110,11 +110,11 @@ const VirtualScrollerPinnedColumns = styled('div', {
|
|
|
110
110
|
borderLeftStyle: 'solid'
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
|
-
var PinnedRowsPosition
|
|
114
|
-
(function (PinnedRowsPosition) {
|
|
113
|
+
var PinnedRowsPosition = /*#__PURE__*/function (PinnedRowsPosition) {
|
|
115
114
|
PinnedRowsPosition["top"] = "top";
|
|
116
115
|
PinnedRowsPosition["bottom"] = "bottom";
|
|
117
|
-
|
|
116
|
+
return PinnedRowsPosition;
|
|
117
|
+
}(PinnedRowsPosition || {});
|
|
118
118
|
const VirtualScrollerPinnedRows = styled('div', {
|
|
119
119
|
name: 'MuiDataGrid',
|
|
120
120
|
slot: 'PinnedRows',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuProps } from '@mui/x-data-grid';
|
|
3
3
|
import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export declare const GRID_COLUMN_MENU_SLOTS_PRO: {
|
|
5
|
+
columnMenuPinningItem: typeof GridColumnMenuPinningItem;
|
|
6
|
+
columnMenuSortItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem").GridColumnMenuSortItem;
|
|
7
|
+
columnMenuFilterItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem").GridColumnMenuFilterItem;
|
|
8
|
+
columnMenuColumnsItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem").GridColumnMenuColumnsItem;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const GRID_COLUMN_MENU_SLOT_PROPS_PRO: {
|
|
11
11
|
columnMenuPinningItem: {
|
|
12
12
|
displayOrder: number;
|
|
13
13
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridGenericColumnMenu,
|
|
4
|
+
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
|
|
5
5
|
import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export const
|
|
8
|
-
|
|
7
|
+
export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
8
|
+
columnMenuPinningItem: GridColumnMenuPinningItem
|
|
9
9
|
});
|
|
10
|
-
export const
|
|
10
|
+
export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
11
11
|
columnMenuPinningItem: {
|
|
12
12
|
displayOrder: 15
|
|
13
13
|
}
|
|
@@ -16,8 +16,8 @@ const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMe
|
|
|
16
16
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
|
|
17
17
|
ref: ref
|
|
18
18
|
}, props, {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
|
|
20
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
|
|
21
21
|
}));
|
|
22
22
|
});
|
|
23
23
|
process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS, } from './GridProColumnMenu';
|
package/components/reexports.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var GridPinnedPosition
|
|
1
|
+
var GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
|
|
2
|
+
GridPinnedPosition["left"] = "left";
|
|
3
|
+
GridPinnedPosition["right"] = "right";
|
|
4
|
+
return GridPinnedPosition;
|
|
5
|
+
}(GridPinnedPosition || {});
|
|
2
6
|
/**
|
|
3
7
|
* The column pinning API interface that is available in the grid [[apiRef]].
|
|
4
8
|
*/
|
|
5
|
-
(function (GridPinnedPosition) {
|
|
6
|
-
GridPinnedPosition["left"] = "left";
|
|
7
|
-
GridPinnedPosition["right"] = "right";
|
|
8
|
-
})(GridPinnedPosition || (GridPinnedPosition = {}));
|
|
9
9
|
export { GridPinnedPosition };
|
|
@@ -118,7 +118,7 @@ export const useGridColumnPinning = (apiRef, props) => {
|
|
|
118
118
|
if (colDef.pinnable === false) {
|
|
119
119
|
return columnMenuItems;
|
|
120
120
|
}
|
|
121
|
-
return [...columnMenuItems, '
|
|
121
|
+
return [...columnMenuItems, 'columnMenuPinningItem'];
|
|
122
122
|
}, [props.disableColumnPinning]);
|
|
123
123
|
const checkIfCanBeReordered = React.useCallback((initialValue, {
|
|
124
124
|
targetIndex
|
|
@@ -154,8 +154,8 @@ export const useGridColumnReorder = (apiRef, props) => {
|
|
|
154
154
|
const visibleColumns = apiRef.current.getVisibleColumns();
|
|
155
155
|
const allColumns = apiRef.current.getAllColumns();
|
|
156
156
|
const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
|
|
157
|
-
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex;
|
|
158
|
-
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex;
|
|
157
|
+
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
|
|
158
|
+
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
|
|
159
159
|
if (hasMovedLeft || hasMovedRight) {
|
|
160
160
|
let canBeReordered;
|
|
161
161
|
let indexOffsetInHiddenColumns = 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { gridClasses } from '@mui/x-data-grid';
|
|
3
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
4
5
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
|
|
5
6
|
import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
|
|
@@ -35,7 +36,7 @@ export const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
|
|
|
35
36
|
if (!expandedRowIds.includes(id)) {
|
|
36
37
|
return classes;
|
|
37
38
|
}
|
|
38
|
-
return [...classes, '
|
|
39
|
+
return [...classes, gridClasses['row--detailPanelExpanded']];
|
|
39
40
|
}, [privateApiRef, props.getDetailPanelContent]);
|
|
40
41
|
useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
|
|
41
42
|
useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
|
package/index.d.ts
CHANGED
|
@@ -17,5 +17,5 @@ export * from './utils';
|
|
|
17
17
|
export type { DataGridProProps, GridExperimentalProFeatures } from './models/dataGridProProps';
|
|
18
18
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
19
19
|
export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
|
|
20
|
-
export { GridColumnMenu,
|
|
20
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS, } from './components/reexports';
|
|
21
21
|
export { GridColumnHeaders } from './components/GridColumnHeaders';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-pro v6.0.
|
|
2
|
+
* @mui/x-data-grid-pro v6.0.4
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -21,5 +21,5 @@ export * from './models';
|
|
|
21
21
|
export * from './components';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
24
|
-
export { GridColumnMenu,
|
|
24
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
|
|
25
25
|
export { GridColumnHeaders } from './components/GridColumnHeaders';
|
|
@@ -114,11 +114,11 @@ var VirtualScrollerPinnedColumns = styled('div', {
|
|
|
114
114
|
borderLeftStyle: 'solid'
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
|
-
var PinnedRowsPosition
|
|
118
|
-
(function (PinnedRowsPosition) {
|
|
117
|
+
var PinnedRowsPosition = /*#__PURE__*/function (PinnedRowsPosition) {
|
|
119
118
|
PinnedRowsPosition["top"] = "top";
|
|
120
119
|
PinnedRowsPosition["bottom"] = "bottom";
|
|
121
|
-
|
|
120
|
+
return PinnedRowsPosition;
|
|
121
|
+
}(PinnedRowsPosition || {});
|
|
122
122
|
var VirtualScrollerPinnedRows = styled('div', {
|
|
123
123
|
name: 'MuiDataGrid',
|
|
124
124
|
slot: 'PinnedRows',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridGenericColumnMenu,
|
|
4
|
+
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
|
|
5
5
|
import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export var
|
|
8
|
-
|
|
7
|
+
export var GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
8
|
+
columnMenuPinningItem: GridColumnMenuPinningItem
|
|
9
9
|
});
|
|
10
|
-
export var
|
|
10
|
+
export var GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
11
11
|
columnMenuPinningItem: {
|
|
12
12
|
displayOrder: 15
|
|
13
13
|
}
|
|
@@ -16,8 +16,8 @@ var GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu
|
|
|
16
16
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
|
|
17
17
|
ref: ref
|
|
18
18
|
}, props, {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
|
|
20
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
|
|
21
21
|
}));
|
|
22
22
|
});
|
|
23
23
|
process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var GridPinnedPosition
|
|
1
|
+
var GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
|
|
2
|
+
GridPinnedPosition["left"] = "left";
|
|
3
|
+
GridPinnedPosition["right"] = "right";
|
|
4
|
+
return GridPinnedPosition;
|
|
5
|
+
}(GridPinnedPosition || {});
|
|
2
6
|
/**
|
|
3
7
|
* The column pinning API interface that is available in the grid [[apiRef]].
|
|
4
8
|
*/
|
|
5
|
-
(function (GridPinnedPosition) {
|
|
6
|
-
GridPinnedPosition["left"] = "left";
|
|
7
|
-
GridPinnedPosition["right"] = "right";
|
|
8
|
-
})(GridPinnedPosition || (GridPinnedPosition = {}));
|
|
9
9
|
export { GridPinnedPosition };
|
|
@@ -128,7 +128,7 @@ export var useGridColumnPinning = function useGridColumnPinning(apiRef, props) {
|
|
|
128
128
|
if (colDef.pinnable === false) {
|
|
129
129
|
return columnMenuItems;
|
|
130
130
|
}
|
|
131
|
-
return [].concat(_toConsumableArray(columnMenuItems), ['
|
|
131
|
+
return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuPinningItem']);
|
|
132
132
|
}, [props.disableColumnPinning]);
|
|
133
133
|
var checkIfCanBeReordered = React.useCallback(function (initialValue, _ref) {
|
|
134
134
|
var targetIndex = _ref.targetIndex;
|
|
@@ -161,8 +161,8 @@ export var useGridColumnReorder = function useGridColumnReorder(apiRef, props) {
|
|
|
161
161
|
var visibleColumns = apiRef.current.getVisibleColumns();
|
|
162
162
|
var allColumns = apiRef.current.getAllColumns();
|
|
163
163
|
var cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
|
|
164
|
-
var hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex;
|
|
165
|
-
var hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex;
|
|
164
|
+
var hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
|
|
165
|
+
var hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
|
|
166
166
|
if (hasMovedLeft || hasMovedRight) {
|
|
167
167
|
var canBeReordered;
|
|
168
168
|
var indexOffsetInHiddenColumns = 0;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { gridClasses } from '@mui/x-data-grid';
|
|
4
5
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
5
6
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
|
|
6
7
|
import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
|
|
@@ -38,7 +39,7 @@ export var useGridDetailPanelPreProcessors = function useGridDetailPanelPreProce
|
|
|
38
39
|
if (!expandedRowIds.includes(id)) {
|
|
39
40
|
return classes;
|
|
40
41
|
}
|
|
41
|
-
return [].concat(_toConsumableArray(classes), ['
|
|
42
|
+
return [].concat(_toConsumableArray(classes), [gridClasses['row--detailPanelExpanded']]);
|
|
42
43
|
}, [privateApiRef, props.getDetailPanelContent]);
|
|
43
44
|
useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
|
|
44
45
|
useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-pro v6.0.
|
|
2
|
+
* @mui/x-data-grid-pro v6.0.4
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -21,5 +21,5 @@ export * from './models';
|
|
|
21
21
|
export * from './components';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
24
|
-
export { GridColumnMenu,
|
|
24
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
|
|
25
25
|
export { GridColumnHeaders } from './components/GridColumnHeaders';
|
package/legacy/utils/domUtils.js
CHANGED
|
@@ -11,7 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
|
|
|
11
11
|
return Array.from((_elem$querySelectorAl = elem.querySelectorAll("[data-fields*=\"|-".concat(field, "-|\"]"))) != null ? _elem$querySelectorAl : []);
|
|
12
12
|
}
|
|
13
13
|
export function findGridCellElementsFromCol(col, api) {
|
|
14
|
-
var root = findParentElementFromClassName(col,
|
|
14
|
+
var root = findParentElementFromClassName(col, gridClasses.root);
|
|
15
15
|
if (!root) {
|
|
16
16
|
throw new Error('MUI: The root element is not found.');
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY4MDEyNzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -108,11 +108,11 @@ const VirtualScrollerPinnedColumns = styled('div', {
|
|
|
108
108
|
borderLeftStyle: 'solid'
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
|
-
var PinnedRowsPosition
|
|
112
|
-
(function (PinnedRowsPosition) {
|
|
111
|
+
var PinnedRowsPosition = /*#__PURE__*/function (PinnedRowsPosition) {
|
|
113
112
|
PinnedRowsPosition["top"] = "top";
|
|
114
113
|
PinnedRowsPosition["bottom"] = "bottom";
|
|
115
|
-
|
|
114
|
+
return PinnedRowsPosition;
|
|
115
|
+
}(PinnedRowsPosition || {});
|
|
116
116
|
const VirtualScrollerPinnedRows = styled('div', {
|
|
117
117
|
name: 'MuiDataGrid',
|
|
118
118
|
slot: 'PinnedRows',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridGenericColumnMenu,
|
|
4
|
+
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
|
|
5
5
|
import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export const
|
|
8
|
-
|
|
7
|
+
export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
8
|
+
columnMenuPinningItem: GridColumnMenuPinningItem
|
|
9
9
|
});
|
|
10
|
-
export const
|
|
10
|
+
export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
11
11
|
columnMenuPinningItem: {
|
|
12
12
|
displayOrder: 15
|
|
13
13
|
}
|
|
@@ -16,8 +16,8 @@ const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMe
|
|
|
16
16
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
|
|
17
17
|
ref: ref
|
|
18
18
|
}, props, {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
|
|
20
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
|
|
21
21
|
}));
|
|
22
22
|
});
|
|
23
23
|
process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var GridPinnedPosition
|
|
1
|
+
var GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
|
|
2
|
+
GridPinnedPosition["left"] = "left";
|
|
3
|
+
GridPinnedPosition["right"] = "right";
|
|
4
|
+
return GridPinnedPosition;
|
|
5
|
+
}(GridPinnedPosition || {});
|
|
2
6
|
/**
|
|
3
7
|
* The column pinning API interface that is available in the grid [[apiRef]].
|
|
4
8
|
*/
|
|
5
|
-
(function (GridPinnedPosition) {
|
|
6
|
-
GridPinnedPosition["left"] = "left";
|
|
7
|
-
GridPinnedPosition["right"] = "right";
|
|
8
|
-
})(GridPinnedPosition || (GridPinnedPosition = {}));
|
|
9
9
|
export { GridPinnedPosition };
|
|
@@ -114,7 +114,7 @@ export const useGridColumnPinning = (apiRef, props) => {
|
|
|
114
114
|
if (colDef.pinnable === false) {
|
|
115
115
|
return columnMenuItems;
|
|
116
116
|
}
|
|
117
|
-
return [...columnMenuItems, '
|
|
117
|
+
return [...columnMenuItems, 'columnMenuPinningItem'];
|
|
118
118
|
}, [props.disableColumnPinning]);
|
|
119
119
|
const checkIfCanBeReordered = React.useCallback((initialValue, {
|
|
120
120
|
targetIndex
|
|
@@ -152,8 +152,8 @@ export const useGridColumnReorder = (apiRef, props) => {
|
|
|
152
152
|
const visibleColumns = apiRef.current.getVisibleColumns();
|
|
153
153
|
const allColumns = apiRef.current.getAllColumns();
|
|
154
154
|
const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
|
|
155
|
-
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex;
|
|
156
|
-
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex;
|
|
155
|
+
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
|
|
156
|
+
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
|
|
157
157
|
if (hasMovedLeft || hasMovedRight) {
|
|
158
158
|
let canBeReordered;
|
|
159
159
|
let indexOffsetInHiddenColumns = 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { gridClasses } from '@mui/x-data-grid';
|
|
3
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
4
5
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
|
|
5
6
|
import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
|
|
@@ -35,7 +36,7 @@ export const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
|
|
|
35
36
|
if (!expandedRowIds.includes(id)) {
|
|
36
37
|
return classes;
|
|
37
38
|
}
|
|
38
|
-
return [...classes, '
|
|
39
|
+
return [...classes, gridClasses['row--detailPanelExpanded']];
|
|
39
40
|
}, [privateApiRef, props.getDetailPanelContent]);
|
|
40
41
|
useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
|
|
41
42
|
useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-pro v6.0.
|
|
2
|
+
* @mui/x-data-grid-pro v6.0.4
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -21,5 +21,5 @@ export * from './models';
|
|
|
21
21
|
export * from './components';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
24
|
-
export { GridColumnMenu,
|
|
24
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
|
|
25
25
|
export { GridColumnHeaders } from './components/GridColumnHeaders';
|
package/modern/utils/domUtils.js
CHANGED
|
@@ -10,7 +10,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
|
|
|
10
10
|
return Array.from(elem.querySelectorAll(`[data-fields*="|-${field}-|"]`) ?? []);
|
|
11
11
|
}
|
|
12
12
|
export function findGridCellElementsFromCol(col, api) {
|
|
13
|
-
const root = findParentElementFromClassName(col,
|
|
13
|
+
const root = findParentElementFromClassName(col, gridClasses.root);
|
|
14
14
|
if (!root) {
|
|
15
15
|
throw new Error('MUI: The root element is not found.');
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY4MDEyNzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -117,11 +117,11 @@ const VirtualScrollerPinnedColumns = (0, _styles.styled)('div', {
|
|
|
117
117
|
borderLeftStyle: 'solid'
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
|
-
var PinnedRowsPosition
|
|
121
|
-
(function (PinnedRowsPosition) {
|
|
120
|
+
var PinnedRowsPosition = /*#__PURE__*/function (PinnedRowsPosition) {
|
|
122
121
|
PinnedRowsPosition["top"] = "top";
|
|
123
122
|
PinnedRowsPosition["bottom"] = "bottom";
|
|
124
|
-
|
|
123
|
+
return PinnedRowsPosition;
|
|
124
|
+
}(PinnedRowsPosition || {});
|
|
125
125
|
const VirtualScrollerPinnedRows = (0, _styles.styled)('div', {
|
|
126
126
|
name: 'MuiDataGrid',
|
|
127
127
|
slot: 'PinnedRows',
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.GridProColumnMenu = exports.
|
|
7
|
+
exports.GridProColumnMenu = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GRID_COLUMN_MENU_SLOTS_PRO = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -13,22 +13,22 @@ var _GridColumnMenuPinningItem = require("./GridColumnMenuPinningItem");
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
|
|
17
|
+
columnMenuPinningItem: _GridColumnMenuPinningItem.GridColumnMenuPinningItem
|
|
18
18
|
});
|
|
19
|
-
exports.
|
|
20
|
-
const
|
|
19
|
+
exports.GRID_COLUMN_MENU_SLOTS_PRO = GRID_COLUMN_MENU_SLOTS_PRO;
|
|
20
|
+
const GRID_COLUMN_MENU_SLOT_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
21
21
|
columnMenuPinningItem: {
|
|
22
22
|
displayOrder: 15
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
exports.
|
|
25
|
+
exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = GRID_COLUMN_MENU_SLOT_PROPS_PRO;
|
|
26
26
|
const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
|
|
27
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridGenericColumnMenu, (0, _extends2.default)({
|
|
28
28
|
ref: ref
|
|
29
29
|
}, props, {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
|
|
31
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
|
|
32
32
|
}));
|
|
33
33
|
});
|
|
34
34
|
exports.GridProColumnMenu = GridProColumnMenu;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return _GridProColumnMenu.
|
|
9
|
+
return _GridProColumnMenu.GRID_COLUMN_MENU_SLOTS_PRO;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _GridProColumnMenu.
|
|
15
|
+
return _GridProColumnMenu.GRID_COLUMN_MENU_SLOT_PROPS_PRO;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "GridColumnMenu", {
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.GridPinnedPosition = void 0;
|
|
7
|
-
var GridPinnedPosition
|
|
7
|
+
var GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
|
|
8
|
+
GridPinnedPosition["left"] = "left";
|
|
9
|
+
GridPinnedPosition["right"] = "right";
|
|
10
|
+
return GridPinnedPosition;
|
|
11
|
+
}(GridPinnedPosition || {});
|
|
8
12
|
/**
|
|
9
13
|
* The column pinning API interface that is available in the grid [[apiRef]].
|
|
10
14
|
*/
|
|
11
|
-
exports.GridPinnedPosition = GridPinnedPosition;
|
|
12
|
-
(function (GridPinnedPosition) {
|
|
13
|
-
GridPinnedPosition["left"] = "left";
|
|
14
|
-
GridPinnedPosition["right"] = "right";
|
|
15
|
-
})(GridPinnedPosition || (exports.GridPinnedPosition = GridPinnedPosition = {}));
|
|
15
|
+
exports.GridPinnedPosition = GridPinnedPosition;
|
|
@@ -124,7 +124,7 @@ const useGridColumnPinning = (apiRef, props) => {
|
|
|
124
124
|
if (colDef.pinnable === false) {
|
|
125
125
|
return columnMenuItems;
|
|
126
126
|
}
|
|
127
|
-
return [...columnMenuItems, '
|
|
127
|
+
return [...columnMenuItems, 'columnMenuPinningItem'];
|
|
128
128
|
}, [props.disableColumnPinning]);
|
|
129
129
|
const checkIfCanBeReordered = React.useCallback((initialValue, {
|
|
130
130
|
targetIndex
|
|
@@ -162,8 +162,8 @@ const useGridColumnReorder = (apiRef, props) => {
|
|
|
162
162
|
const visibleColumns = apiRef.current.getVisibleColumns();
|
|
163
163
|
const allColumns = apiRef.current.getAllColumns();
|
|
164
164
|
const cursorMoveDirectionX = getCursorMoveDirectionX(cursorPosition.current, coordinates);
|
|
165
|
-
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex;
|
|
166
|
-
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex;
|
|
165
|
+
const hasMovedLeft = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_LEFT && (theme.direction === 'rtl' ? dragColIndex < targetColIndex : targetColIndex < dragColIndex);
|
|
166
|
+
const hasMovedRight = cursorMoveDirectionX === CURSOR_MOVE_DIRECTION_RIGHT && (theme.direction === 'rtl' ? targetColIndex < dragColIndex : dragColIndex < targetColIndex);
|
|
167
167
|
if (hasMovedLeft || hasMovedRight) {
|
|
168
168
|
let canBeReordered;
|
|
169
169
|
let indexOffsetInHiddenColumns = 0;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useGridDetailPanelPreProcessors = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
10
11
|
var _internals = require("@mui/x-data-grid/internals");
|
|
11
12
|
var _gridDetailPanelToggleColDef = require("./gridDetailPanelToggleColDef");
|
|
12
13
|
var _gridDetailPanelSelector = require("./gridDetailPanelSelector");
|
|
@@ -44,7 +45,7 @@ const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
|
|
|
44
45
|
if (!expandedRowIds.includes(id)) {
|
|
45
46
|
return classes;
|
|
46
47
|
}
|
|
47
|
-
return [...classes, '
|
|
48
|
+
return [...classes, _xDataGrid.gridClasses['row--detailPanelExpanded']];
|
|
48
49
|
}, [privateApiRef, props.getDetailPanelContent]);
|
|
49
50
|
(0, _internals.useGridRegisterPipeProcessor)(privateApiRef, 'hydrateColumns', addToggleColumn);
|
|
50
51
|
(0, _internals.useGridRegisterPipeProcessor)(privateApiRef, 'rowClassName', addExpandedClassToRow);
|
package/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-pro v6.0.
|
|
2
|
+
* @mui/x-data-grid-pro v6.0.4
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -16,20 +16,20 @@ var _exportNames = {
|
|
|
16
16
|
useGridApiRef: true,
|
|
17
17
|
useGridRootProps: true,
|
|
18
18
|
GridColumnMenu: true,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
GRID_COLUMN_MENU_SLOTS: true,
|
|
20
|
+
GRID_COLUMN_MENU_SLOT_PROPS: true,
|
|
21
21
|
GridColumnHeaders: true
|
|
22
22
|
};
|
|
23
|
-
Object.defineProperty(exports, "
|
|
23
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
|
|
24
24
|
enumerable: true,
|
|
25
25
|
get: function () {
|
|
26
|
-
return _reexports2.
|
|
26
|
+
return _reexports2.GRID_COLUMN_MENU_SLOTS;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
Object.defineProperty(exports, "
|
|
29
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
|
|
30
30
|
enumerable: true,
|
|
31
31
|
get: function () {
|
|
32
|
-
return _reexports2.
|
|
32
|
+
return _reexports2.GRID_COLUMN_MENU_SLOT_PROPS;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "GridColumnHeaders", {
|
package/node/utils/domUtils.js
CHANGED
|
@@ -19,7 +19,7 @@ function findGroupHeaderElementsFromField(elem, field) {
|
|
|
19
19
|
return Array.from(elem.querySelectorAll(`[data-fields*="|-${field}-|"]`) ?? []);
|
|
20
20
|
}
|
|
21
21
|
function findGridCellElementsFromCol(col, api) {
|
|
22
|
-
const root = (0, _internals.findParentElementFromClassName)(col,
|
|
22
|
+
const root = (0, _internals.findParentElementFromClassName)(col, _xDataGrid.gridClasses.root);
|
|
23
23
|
if (!root) {
|
|
24
24
|
throw new Error('MUI: The root element is not found.');
|
|
25
25
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTY4MDEyNzIwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
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",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"directory": "packages/grid/x-data-grid-pro"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "^7.
|
|
34
|
+
"@babel/runtime": "^7.21.0",
|
|
35
35
|
"@mui/utils": "^5.11.13",
|
|
36
|
-
"@mui/x-data-grid": "6.0.
|
|
37
|
-
"@mui/x-license-pro": "6.0.
|
|
36
|
+
"@mui/x-data-grid": "6.0.4",
|
|
37
|
+
"@mui/x-license-pro": "6.0.3",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
package/utils/domUtils.js
CHANGED
|
@@ -11,7 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
|
|
|
11
11
|
return Array.from((_elem$querySelectorAl = elem.querySelectorAll(`[data-fields*="|-${field}-|"]`)) != null ? _elem$querySelectorAl : []);
|
|
12
12
|
}
|
|
13
13
|
export function findGridCellElementsFromCol(col, api) {
|
|
14
|
-
const root = findParentElementFromClassName(col,
|
|
14
|
+
const root = findParentElementFromClassName(col, gridClasses.root);
|
|
15
15
|
if (!root) {
|
|
16
16
|
throw new Error('MUI: The root element is not found.');
|
|
17
17
|
}
|
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 = "MTY4MDEyNzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|