@mui/x-data-grid 7.23.1 → 7.23.2
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 +81 -0
- package/components/panel/GridColumnsPanel.js +1 -2
- package/hooks/features/overlays/useGridOverlays.js +3 -1
- package/hooks/features/sorting/gridSortingSelector.d.ts +7 -2
- package/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/locales/roRO.js +9 -10
- package/locales/trTR.js +3 -4
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/hooks/features/overlays/useGridOverlays.js +3 -1
- package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/locales/roRO.js +9 -10
- package/modern/locales/trTR.js +3 -4
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/hooks/features/overlays/useGridOverlays.js +3 -1
- package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/index.js +1 -1
- package/node/internals/index.js +8 -0
- package/node/locales/roRO.js +9 -10
- package/node/locales/trTR.js +3 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,87 @@
|
|
|
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
|
+
## 7.23.2
|
|
7
|
+
|
|
8
|
+
_Dec 12, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Improve Romanian and Turkish locales on the Data Grid
|
|
13
|
+
- 🌍 Improve Romanian locale on the Pickers
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@ihsanberkozcan, @k-rajat19, @lhilgert9, @nusr, @rares985.
|
|
19
|
+
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid@7.23.2`
|
|
28
|
+
|
|
29
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15851) @nusr
|
|
30
|
+
- [DataGrid] Use `columnsManagement` slot (#15821) @k-rajat19
|
|
31
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
32
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15748) @ihsanberkozcan
|
|
33
|
+
|
|
34
|
+
#### `@mui/x-data-grid-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
35
|
+
|
|
36
|
+
Same changes as in `@mui/x-data-grid@7.23.2`, plus:
|
|
37
|
+
|
|
38
|
+
- [DataGridPro] Make Row reordering work with pagination (#15782) @k-rajat19
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@7.23.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.2`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15754) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@7.23.2`
|
|
49
|
+
|
|
50
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@7.23.2`.
|
|
55
|
+
|
|
56
|
+
### Charts
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts@7.23.2`
|
|
59
|
+
|
|
60
|
+
- [charts] Fix key generation for the ChartsGrid (#15864) @alexfauquette
|
|
61
|
+
- [charts] Fix scatter dataset with missing data (#15804) @alexfauquette
|
|
62
|
+
|
|
63
|
+
#### `@mui/x-charts-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
64
|
+
|
|
65
|
+
Same changes as in `@mui/x-charts@7.23.2`.
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-tree-view@v7.23.2`
|
|
68
|
+
|
|
69
|
+
No changes, releasing to keep the versions in sync.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-tree-view-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Releasing to benefit from license package fix (#15818).
|
|
74
|
+
|
|
75
|
+
### Docs
|
|
76
|
+
|
|
77
|
+
- [docs] Fix typo in charts axis documentation (#15746) @JCQuintas
|
|
78
|
+
- [docs] Improve Pickers accessible DOM structure description (#15752) @LukasTy
|
|
79
|
+
- [docs] Use `updateRows` method for list view demos (#15824) @KenanYusuf
|
|
80
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15767) @LukasTy
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
85
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15818) @arminmeh
|
|
86
|
+
|
|
6
87
|
## 7.23.1
|
|
7
88
|
|
|
8
89
|
_Dec 5, 2024_
|
|
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { GridPanelWrapper } from "./GridPanelWrapper.js";
|
|
5
|
-
import { GridColumnsManagement } from "../columnsManagement/index.js";
|
|
6
5
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
function GridColumnsPanel(props) {
|
|
9
8
|
const rootProps = useGridRootProps();
|
|
10
9
|
return /*#__PURE__*/_jsx(GridPanelWrapper, _extends({}, props, {
|
|
11
|
-
children: /*#__PURE__*/_jsx(
|
|
10
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))
|
|
12
11
|
}));
|
|
13
12
|
}
|
|
14
13
|
process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
@@ -3,6 +3,7 @@ import { useGridApiContext } from "../../utils/useGridApiContext.js";
|
|
|
3
3
|
import { useGridRootProps } from "../../utils/useGridRootProps.js";
|
|
4
4
|
import { gridExpandedRowCountSelector } from "../filter/index.js";
|
|
5
5
|
import { gridRowCountSelector, gridRowsLoadingSelector } from "../rows/index.js";
|
|
6
|
+
import { gridPinnedRowsCountSelector } from "../rows/gridRowsSelector.js";
|
|
6
7
|
/**
|
|
7
8
|
* Uses the grid state to determine which overlay to display.
|
|
8
9
|
* Returns the active overlay type and the active loading overlay variant.
|
|
@@ -12,7 +13,8 @@ export const useGridOverlays = () => {
|
|
|
12
13
|
const rootProps = useGridRootProps();
|
|
13
14
|
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
14
15
|
const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);
|
|
15
|
-
const
|
|
16
|
+
const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
|
|
17
|
+
const noRows = totalRowCount === 0 && pinnedRowsCount === 0;
|
|
16
18
|
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
|
17
19
|
const showNoRowsOverlay = !loading && noRows;
|
|
18
20
|
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { GridSortDirection, GridSortModel } from '../../../models/gridSortModel';
|
|
2
2
|
import type { GridStateCommunity } from '../../../models/gridStateCommunity';
|
|
3
|
-
import type { GridValidRowModel, GridRowEntry } from '../../../models/gridRows';
|
|
3
|
+
import type { GridValidRowModel, GridRowEntry, GridRowId } from '../../../models/gridRows';
|
|
4
4
|
/**
|
|
5
5
|
* Get the id of the rows after the sorting process.
|
|
6
6
|
* @category Sorting
|
|
7
7
|
*/
|
|
8
|
-
export declare const gridSortedRowIdsSelector: import("../../..").OutputSelector<GridStateCommunity,
|
|
8
|
+
export declare const gridSortedRowIdsSelector: import("../../..").OutputSelector<GridStateCommunity, GridRowId[]>;
|
|
9
9
|
/**
|
|
10
10
|
* Get the id and the model of the rows after the sorting process.
|
|
11
11
|
* @category Sorting
|
|
@@ -25,3 +25,8 @@ export type GridSortColumnLookup = Record<string, {
|
|
|
25
25
|
* @ignore - do not document.
|
|
26
26
|
*/
|
|
27
27
|
export declare const gridSortColumnLookupSelector: import("../../..").OutputSelector<GridStateCommunity, GridSortColumnLookup>;
|
|
28
|
+
/**
|
|
29
|
+
* @category Sorting
|
|
30
|
+
* @ignore - do not document.
|
|
31
|
+
*/
|
|
32
|
+
export declare const gridSortedRowIndexLookupSelector: import("../../..").OutputSelector<GridStateCommunity, Record<GridRowId, number>>;
|
|
@@ -55,4 +55,15 @@ export const gridSortColumnLookupSelector = createSelectorMemoized(gridSortModel
|
|
|
55
55
|
return res;
|
|
56
56
|
}, {});
|
|
57
57
|
return result;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @category Sorting
|
|
62
|
+
* @ignore - do not document.
|
|
63
|
+
*/
|
|
64
|
+
export const gridSortedRowIndexLookupSelector = createSelectorMemoized(gridSortedRowIdsSelector, sortedIds => {
|
|
65
|
+
return sortedIds.reduce((acc, id, index) => {
|
|
66
|
+
acc[id] = index;
|
|
67
|
+
return acc;
|
|
68
|
+
}, Object.create(null));
|
|
58
69
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { gridSortedRowIdsSelector, gridSortedRowEntriesSelector, gridSortModelSelector, gridSortColumnLookupSelector, } from './gridSortingSelector';
|
|
2
|
+
export type { GridSortColumnLookup } from './gridSortingSelector';
|
|
2
3
|
export type { GridSortingState, GridSortingInitialState } from './gridSortingState';
|
|
3
4
|
export { gridDateComparator, gridNumberComparator, gridStringOrNumberComparator, } from './gridSortingUtils';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { gridSortedRowIdsSelector, gridSortedRowEntriesSelector, gridSortModelSelector, gridSortColumnLookupSelector } from "./gridSortingSelector.js";
|
|
2
2
|
export { gridDateComparator, gridNumberComparator, gridStringOrNumberComparator } from "./gridSortingUtils.js";
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export { useGridRowSelection, rowSelectionStateInitializer, } from '../hooks/fea
|
|
|
57
57
|
export { useGridRowSelectionPreProcessors } from '../hooks/features/rowSelection/useGridRowSelectionPreProcessors';
|
|
58
58
|
export { useGridSorting, sortingStateInitializer } from '../hooks/features/sorting/useGridSorting';
|
|
59
59
|
export type { GridSortingModelApplier } from '../hooks/features/sorting/gridSortingState';
|
|
60
|
+
export { gridSortedRowIndexLookupSelector } from '../hooks/features/sorting/gridSortingSelector';
|
|
60
61
|
export { useGridScroll } from '../hooks/features/scroll/useGridScroll';
|
|
61
62
|
export { useGridEvents } from '../hooks/features/events/useGridEvents';
|
|
62
63
|
export { dimensionsStateInitializer, useGridDimensions, } from '../hooks/features/dimensions/useGridDimensions';
|
package/internals/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export { calculatePinnedRowsHeight } from "../hooks/features/rows/gridRowsUtils.
|
|
|
46
46
|
export { useGridRowSelection, rowSelectionStateInitializer } from "../hooks/features/rowSelection/useGridRowSelection.js";
|
|
47
47
|
export { useGridRowSelectionPreProcessors } from "../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js";
|
|
48
48
|
export { useGridSorting, sortingStateInitializer } from "../hooks/features/sorting/useGridSorting.js";
|
|
49
|
+
export { gridSortedRowIndexLookupSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
49
50
|
export { useGridScroll } from "../hooks/features/scroll/useGridScroll.js";
|
|
50
51
|
export { useGridEvents } from "../hooks/features/events/useGridEvents.js";
|
|
51
52
|
export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features/dimensions/useGridDimensions.js";
|
package/locales/roRO.js
CHANGED
|
@@ -30,12 +30,11 @@ const roROGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Printare',
|
|
31
31
|
toolbarExportExcel: 'Download în format Excel',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Caută',
|
|
34
|
+
columnsManagementNoColumns: 'Nicio coloană',
|
|
35
|
+
columnsManagementShowHideAllText: 'Arată/Ascunde tot',
|
|
36
|
+
columnsManagementReset: 'Resetează',
|
|
37
|
+
columnsManagementDeleteIconLabel: 'Șterge',
|
|
39
38
|
// Filter panel text
|
|
40
39
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
41
40
|
filterPanelRemoveAll: 'Șterge tot',
|
|
@@ -49,9 +48,9 @@ const roROGrid = {
|
|
|
49
48
|
filterPanelInputPlaceholder: 'Filtrare valoare',
|
|
50
49
|
// Filter operators text
|
|
51
50
|
filterOperatorContains: 'conține',
|
|
52
|
-
|
|
51
|
+
filterOperatorDoesNotContain: 'nu conține',
|
|
53
52
|
filterOperatorEquals: 'este egal cu',
|
|
54
|
-
|
|
53
|
+
filterOperatorDoesNotEqual: 'nu este egal cu',
|
|
55
54
|
filterOperatorStartsWith: 'începe cu',
|
|
56
55
|
filterOperatorEndsWith: 'se termină cu',
|
|
57
56
|
filterOperatorIs: 'este',
|
|
@@ -71,9 +70,9 @@ const roROGrid = {
|
|
|
71
70
|
'filterOperator<=': '<=',
|
|
72
71
|
// Header filter operators text
|
|
73
72
|
headerFilterOperatorContains: 'Conține',
|
|
74
|
-
|
|
73
|
+
headerFilterOperatorDoesNotContain: 'Nu conține',
|
|
75
74
|
headerFilterOperatorEquals: 'Egal cu',
|
|
76
|
-
|
|
75
|
+
headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
|
|
77
76
|
headerFilterOperatorStartsWith: 'Începe cu',
|
|
78
77
|
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
79
78
|
headerFilterOperatorIs: 'Este',
|
package/locales/trTR.js
CHANGED
|
@@ -34,8 +34,7 @@ const trTRGrid = {
|
|
|
34
34
|
columnsManagementNoColumns: 'Kolon yok',
|
|
35
35
|
columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
|
|
36
36
|
columnsManagementReset: 'Sıfırla',
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
columnsManagementDeleteIconLabel: 'Temizle',
|
|
39
38
|
// Filter panel text
|
|
40
39
|
filterPanelAddFilter: 'Filtre Ekle',
|
|
41
40
|
filterPanelRemoveAll: 'Hepsini kaldır',
|
|
@@ -49,9 +48,9 @@ const trTRGrid = {
|
|
|
49
48
|
filterPanelInputPlaceholder: 'Filtre değeri',
|
|
50
49
|
// Filter operators text
|
|
51
50
|
filterOperatorContains: 'içerir',
|
|
52
|
-
|
|
51
|
+
filterOperatorDoesNotContain: 'içermiyor',
|
|
53
52
|
filterOperatorEquals: 'eşittir',
|
|
54
|
-
|
|
53
|
+
filterOperatorDoesNotEqual: 'eşit değil',
|
|
55
54
|
filterOperatorStartsWith: 'ile başlar',
|
|
56
55
|
filterOperatorEndsWith: 'ile biter',
|
|
57
56
|
filterOperatorIs: 'eşittir',
|
|
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { GridPanelWrapper } from "./GridPanelWrapper.js";
|
|
5
|
-
import { GridColumnsManagement } from "../columnsManagement/index.js";
|
|
6
5
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
function GridColumnsPanel(props) {
|
|
9
8
|
const rootProps = useGridRootProps();
|
|
10
9
|
return /*#__PURE__*/_jsx(GridPanelWrapper, _extends({}, props, {
|
|
11
|
-
children: /*#__PURE__*/_jsx(
|
|
10
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.columnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))
|
|
12
11
|
}));
|
|
13
12
|
}
|
|
14
13
|
process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
@@ -3,6 +3,7 @@ import { useGridApiContext } from "../../utils/useGridApiContext.js";
|
|
|
3
3
|
import { useGridRootProps } from "../../utils/useGridRootProps.js";
|
|
4
4
|
import { gridExpandedRowCountSelector } from "../filter/index.js";
|
|
5
5
|
import { gridRowCountSelector, gridRowsLoadingSelector } from "../rows/index.js";
|
|
6
|
+
import { gridPinnedRowsCountSelector } from "../rows/gridRowsSelector.js";
|
|
6
7
|
/**
|
|
7
8
|
* Uses the grid state to determine which overlay to display.
|
|
8
9
|
* Returns the active overlay type and the active loading overlay variant.
|
|
@@ -12,7 +13,8 @@ export const useGridOverlays = () => {
|
|
|
12
13
|
const rootProps = useGridRootProps();
|
|
13
14
|
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
14
15
|
const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);
|
|
15
|
-
const
|
|
16
|
+
const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
|
|
17
|
+
const noRows = totalRowCount === 0 && pinnedRowsCount === 0;
|
|
16
18
|
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
|
17
19
|
const showNoRowsOverlay = !loading && noRows;
|
|
18
20
|
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
|
@@ -55,4 +55,15 @@ export const gridSortColumnLookupSelector = createSelectorMemoized(gridSortModel
|
|
|
55
55
|
return res;
|
|
56
56
|
}, {});
|
|
57
57
|
return result;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @category Sorting
|
|
62
|
+
* @ignore - do not document.
|
|
63
|
+
*/
|
|
64
|
+
export const gridSortedRowIndexLookupSelector = createSelectorMemoized(gridSortedRowIdsSelector, sortedIds => {
|
|
65
|
+
return sortedIds.reduce((acc, id, index) => {
|
|
66
|
+
acc[id] = index;
|
|
67
|
+
return acc;
|
|
68
|
+
}, Object.create(null));
|
|
58
69
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { gridSortedRowIdsSelector, gridSortedRowEntriesSelector, gridSortModelSelector, gridSortColumnLookupSelector } from "./gridSortingSelector.js";
|
|
2
2
|
export { gridDateComparator, gridNumberComparator, gridStringOrNumberComparator } from "./gridSortingUtils.js";
|
package/modern/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export { calculatePinnedRowsHeight } from "../hooks/features/rows/gridRowsUtils.
|
|
|
46
46
|
export { useGridRowSelection, rowSelectionStateInitializer } from "../hooks/features/rowSelection/useGridRowSelection.js";
|
|
47
47
|
export { useGridRowSelectionPreProcessors } from "../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js";
|
|
48
48
|
export { useGridSorting, sortingStateInitializer } from "../hooks/features/sorting/useGridSorting.js";
|
|
49
|
+
export { gridSortedRowIndexLookupSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
49
50
|
export { useGridScroll } from "../hooks/features/scroll/useGridScroll.js";
|
|
50
51
|
export { useGridEvents } from "../hooks/features/events/useGridEvents.js";
|
|
51
52
|
export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features/dimensions/useGridDimensions.js";
|
package/modern/locales/roRO.js
CHANGED
|
@@ -30,12 +30,11 @@ const roROGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Printare',
|
|
31
31
|
toolbarExportExcel: 'Download în format Excel',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Caută',
|
|
34
|
+
columnsManagementNoColumns: 'Nicio coloană',
|
|
35
|
+
columnsManagementShowHideAllText: 'Arată/Ascunde tot',
|
|
36
|
+
columnsManagementReset: 'Resetează',
|
|
37
|
+
columnsManagementDeleteIconLabel: 'Șterge',
|
|
39
38
|
// Filter panel text
|
|
40
39
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
41
40
|
filterPanelRemoveAll: 'Șterge tot',
|
|
@@ -49,9 +48,9 @@ const roROGrid = {
|
|
|
49
48
|
filterPanelInputPlaceholder: 'Filtrare valoare',
|
|
50
49
|
// Filter operators text
|
|
51
50
|
filterOperatorContains: 'conține',
|
|
52
|
-
|
|
51
|
+
filterOperatorDoesNotContain: 'nu conține',
|
|
53
52
|
filterOperatorEquals: 'este egal cu',
|
|
54
|
-
|
|
53
|
+
filterOperatorDoesNotEqual: 'nu este egal cu',
|
|
55
54
|
filterOperatorStartsWith: 'începe cu',
|
|
56
55
|
filterOperatorEndsWith: 'se termină cu',
|
|
57
56
|
filterOperatorIs: 'este',
|
|
@@ -71,9 +70,9 @@ const roROGrid = {
|
|
|
71
70
|
'filterOperator<=': '<=',
|
|
72
71
|
// Header filter operators text
|
|
73
72
|
headerFilterOperatorContains: 'Conține',
|
|
74
|
-
|
|
73
|
+
headerFilterOperatorDoesNotContain: 'Nu conține',
|
|
75
74
|
headerFilterOperatorEquals: 'Egal cu',
|
|
76
|
-
|
|
75
|
+
headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
|
|
77
76
|
headerFilterOperatorStartsWith: 'Începe cu',
|
|
78
77
|
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
79
78
|
headerFilterOperatorIs: 'Este',
|
package/modern/locales/trTR.js
CHANGED
|
@@ -34,8 +34,7 @@ const trTRGrid = {
|
|
|
34
34
|
columnsManagementNoColumns: 'Kolon yok',
|
|
35
35
|
columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
|
|
36
36
|
columnsManagementReset: 'Sıfırla',
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
columnsManagementDeleteIconLabel: 'Temizle',
|
|
39
38
|
// Filter panel text
|
|
40
39
|
filterPanelAddFilter: 'Filtre Ekle',
|
|
41
40
|
filterPanelRemoveAll: 'Hepsini kaldır',
|
|
@@ -49,9 +48,9 @@ const trTRGrid = {
|
|
|
49
48
|
filterPanelInputPlaceholder: 'Filtre değeri',
|
|
50
49
|
// Filter operators text
|
|
51
50
|
filterOperatorContains: 'içerir',
|
|
52
|
-
|
|
51
|
+
filterOperatorDoesNotContain: 'içermiyor',
|
|
53
52
|
filterOperatorEquals: 'eşittir',
|
|
54
|
-
|
|
53
|
+
filterOperatorDoesNotEqual: 'eşit değil',
|
|
55
54
|
filterOperatorStartsWith: 'ile başlar',
|
|
56
55
|
filterOperatorEndsWith: 'ile biter',
|
|
57
56
|
filterOperatorIs: 'eşittir',
|
|
@@ -10,13 +10,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _GridPanelWrapper = require("./GridPanelWrapper");
|
|
13
|
-
var _columnsManagement = require("../columnsManagement");
|
|
14
13
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function GridColumnsPanel(props) {
|
|
17
16
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
18
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPanelWrapper.GridPanelWrapper, (0, _extends2.default)({}, props, {
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnsManagement, (0, _extends2.default)({}, rootProps.slotProps?.columnsManagement))
|
|
20
19
|
}));
|
|
21
20
|
}
|
|
22
21
|
process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
@@ -9,6 +9,7 @@ var _useGridApiContext = require("../../utils/useGridApiContext");
|
|
|
9
9
|
var _useGridRootProps = require("../../utils/useGridRootProps");
|
|
10
10
|
var _filter = require("../filter");
|
|
11
11
|
var _rows = require("../rows");
|
|
12
|
+
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
12
13
|
/**
|
|
13
14
|
* Uses the grid state to determine which overlay to display.
|
|
14
15
|
* Returns the active overlay type and the active loading overlay variant.
|
|
@@ -18,7 +19,8 @@ const useGridOverlays = () => {
|
|
|
18
19
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
19
20
|
const totalRowCount = (0, _utils.useGridSelector)(apiRef, _rows.gridRowCountSelector);
|
|
20
21
|
const visibleRowCount = (0, _utils.useGridSelector)(apiRef, _filter.gridExpandedRowCountSelector);
|
|
21
|
-
const
|
|
22
|
+
const pinnedRowsCount = (0, _utils.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsCountSelector);
|
|
23
|
+
const noRows = totalRowCount === 0 && pinnedRowsCount === 0;
|
|
22
24
|
const loading = (0, _utils.useGridSelector)(apiRef, _rows.gridRowsLoadingSelector);
|
|
23
25
|
const showNoRowsOverlay = !loading && noRows;
|
|
24
26
|
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridSortedRowIdsSelector = exports.gridSortedRowEntriesSelector = exports.gridSortModelSelector = exports.gridSortColumnLookupSelector = void 0;
|
|
6
|
+
exports.gridSortedRowIndexLookupSelector = exports.gridSortedRowIdsSelector = exports.gridSortedRowEntriesSelector = exports.gridSortModelSelector = exports.gridSortColumnLookupSelector = void 0;
|
|
7
7
|
var _createSelector = require("../../../utils/createSelector");
|
|
8
8
|
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
9
9
|
var _gridRowsUtils = require("../rows/gridRowsUtils");
|
|
@@ -61,4 +61,15 @@ const gridSortColumnLookupSelector = exports.gridSortColumnLookupSelector = (0,
|
|
|
61
61
|
return res;
|
|
62
62
|
}, {});
|
|
63
63
|
return result;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @category Sorting
|
|
68
|
+
* @ignore - do not document.
|
|
69
|
+
*/
|
|
70
|
+
const gridSortedRowIndexLookupSelector = exports.gridSortedRowIndexLookupSelector = (0, _createSelector.createSelectorMemoized)(gridSortedRowIdsSelector, sortedIds => {
|
|
71
|
+
return sortedIds.reduce((acc, id, index) => {
|
|
72
|
+
acc[id] = index;
|
|
73
|
+
return acc;
|
|
74
|
+
}, Object.create(null));
|
|
64
75
|
});
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
gridDateComparator: true,
|
|
8
|
-
gridNumberComparator: true,
|
|
9
|
-
gridStringOrNumberComparator: true
|
|
10
|
-
};
|
|
11
6
|
Object.defineProperty(exports, "gridDateComparator", {
|
|
12
7
|
enumerable: true,
|
|
13
8
|
get: function () {
|
|
@@ -20,6 +15,30 @@ Object.defineProperty(exports, "gridNumberComparator", {
|
|
|
20
15
|
return _gridSortingUtils.gridNumberComparator;
|
|
21
16
|
}
|
|
22
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "gridSortColumnLookupSelector", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _gridSortingSelector.gridSortColumnLookupSelector;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "gridSortModelSelector", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _gridSortingSelector.gridSortModelSelector;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "gridSortedRowEntriesSelector", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _gridSortingSelector.gridSortedRowEntriesSelector;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "gridSortedRowIdsSelector", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _gridSortingSelector.gridSortedRowIdsSelector;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
23
42
|
Object.defineProperty(exports, "gridStringOrNumberComparator", {
|
|
24
43
|
enumerable: true,
|
|
25
44
|
get: function () {
|
|
@@ -27,15 +46,4 @@ Object.defineProperty(exports, "gridStringOrNumberComparator", {
|
|
|
27
46
|
}
|
|
28
47
|
});
|
|
29
48
|
var _gridSortingSelector = require("./gridSortingSelector");
|
|
30
|
-
Object.keys(_gridSortingSelector).forEach(function (key) {
|
|
31
|
-
if (key === "default" || key === "__esModule") return;
|
|
32
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
33
|
-
if (key in exports && exports[key] === _gridSortingSelector[key]) return;
|
|
34
|
-
Object.defineProperty(exports, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function () {
|
|
37
|
-
return _gridSortingSelector[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
49
|
var _gridSortingUtils = require("./gridSortingUtils");
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -71,6 +71,7 @@ var _exportNames = {
|
|
|
71
71
|
useGridRowSelectionPreProcessors: true,
|
|
72
72
|
useGridSorting: true,
|
|
73
73
|
sortingStateInitializer: true,
|
|
74
|
+
gridSortedRowIndexLookupSelector: true,
|
|
74
75
|
useGridScroll: true,
|
|
75
76
|
useGridEvents: true,
|
|
76
77
|
dimensionsStateInitializer: true,
|
|
@@ -356,6 +357,12 @@ Object.defineProperty(exports, "gridRowGroupsToFetchSelector", {
|
|
|
356
357
|
return _gridRowsSelector.gridRowGroupsToFetchSelector;
|
|
357
358
|
}
|
|
358
359
|
});
|
|
360
|
+
Object.defineProperty(exports, "gridSortedRowIndexLookupSelector", {
|
|
361
|
+
enumerable: true,
|
|
362
|
+
get: function () {
|
|
363
|
+
return _gridSortingSelector.gridSortedRowIndexLookupSelector;
|
|
364
|
+
}
|
|
365
|
+
});
|
|
359
366
|
Object.defineProperty(exports, "headerFilteringStateInitializer", {
|
|
360
367
|
enumerable: true,
|
|
361
368
|
get: function () {
|
|
@@ -777,6 +784,7 @@ var _useGridHeaderFiltering = require("../hooks/features/headerFiltering/useGrid
|
|
|
777
784
|
var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
|
|
778
785
|
var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
|
|
779
786
|
var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
|
|
787
|
+
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
780
788
|
var _useGridScroll = require("../hooks/features/scroll/useGridScroll");
|
|
781
789
|
var _useGridEvents = require("../hooks/features/events/useGridEvents");
|
|
782
790
|
var _useGridDimensions = require("../hooks/features/dimensions/useGridDimensions");
|
package/node/locales/roRO.js
CHANGED
|
@@ -36,12 +36,11 @@ const roROGrid = {
|
|
|
36
36
|
toolbarExportPrint: 'Printare',
|
|
37
37
|
toolbarExportExcel: 'Download în format Excel',
|
|
38
38
|
// Columns management text
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
columnsManagementSearchTitle: 'Caută',
|
|
40
|
+
columnsManagementNoColumns: 'Nicio coloană',
|
|
41
|
+
columnsManagementShowHideAllText: 'Arată/Ascunde tot',
|
|
42
|
+
columnsManagementReset: 'Resetează',
|
|
43
|
+
columnsManagementDeleteIconLabel: 'Șterge',
|
|
45
44
|
// Filter panel text
|
|
46
45
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
47
46
|
filterPanelRemoveAll: 'Șterge tot',
|
|
@@ -55,9 +54,9 @@ const roROGrid = {
|
|
|
55
54
|
filterPanelInputPlaceholder: 'Filtrare valoare',
|
|
56
55
|
// Filter operators text
|
|
57
56
|
filterOperatorContains: 'conține',
|
|
58
|
-
|
|
57
|
+
filterOperatorDoesNotContain: 'nu conține',
|
|
59
58
|
filterOperatorEquals: 'este egal cu',
|
|
60
|
-
|
|
59
|
+
filterOperatorDoesNotEqual: 'nu este egal cu',
|
|
61
60
|
filterOperatorStartsWith: 'începe cu',
|
|
62
61
|
filterOperatorEndsWith: 'se termină cu',
|
|
63
62
|
filterOperatorIs: 'este',
|
|
@@ -77,9 +76,9 @@ const roROGrid = {
|
|
|
77
76
|
'filterOperator<=': '<=',
|
|
78
77
|
// Header filter operators text
|
|
79
78
|
headerFilterOperatorContains: 'Conține',
|
|
80
|
-
|
|
79
|
+
headerFilterOperatorDoesNotContain: 'Nu conține',
|
|
81
80
|
headerFilterOperatorEquals: 'Egal cu',
|
|
82
|
-
|
|
81
|
+
headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
|
|
83
82
|
headerFilterOperatorStartsWith: 'Începe cu',
|
|
84
83
|
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
85
84
|
headerFilterOperatorIs: 'Este',
|
package/node/locales/trTR.js
CHANGED
|
@@ -40,8 +40,7 @@ const trTRGrid = {
|
|
|
40
40
|
columnsManagementNoColumns: 'Kolon yok',
|
|
41
41
|
columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
|
|
42
42
|
columnsManagementReset: 'Sıfırla',
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
columnsManagementDeleteIconLabel: 'Temizle',
|
|
45
44
|
// Filter panel text
|
|
46
45
|
filterPanelAddFilter: 'Filtre Ekle',
|
|
47
46
|
filterPanelRemoveAll: 'Hepsini kaldır',
|
|
@@ -55,9 +54,9 @@ const trTRGrid = {
|
|
|
55
54
|
filterPanelInputPlaceholder: 'Filtre değeri',
|
|
56
55
|
// Filter operators text
|
|
57
56
|
filterOperatorContains: 'içerir',
|
|
58
|
-
|
|
57
|
+
filterOperatorDoesNotContain: 'içermiyor',
|
|
59
58
|
filterOperatorEquals: 'eşittir',
|
|
60
|
-
|
|
59
|
+
filterOperatorDoesNotEqual: 'eşit değil',
|
|
61
60
|
filterOperatorStartsWith: 'ile başlar',
|
|
62
61
|
filterOperatorEndsWith: 'ile biter',
|
|
63
62
|
filterOperatorIs: 'eşittir',
|