@mui/x-data-grid 7.6.1 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +147 -0
- package/components/GridRow.js +0 -6
- package/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +16 -8
- package/components/toolbar/GridToolbarQuickFilter.js +0 -7
- package/hooks/features/dimensions/useGridDimensions.js +11 -12
- package/hooks/features/filter/gridFilterUtils.js +1 -3
- package/hooks/features/filter/useGridFilter.js +16 -8
- package/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -0
- package/index.js +1 -1
- package/locales/beBY.js +8 -8
- package/locales/faIR.js +1 -2
- package/locales/ptBR.js +1 -2
- package/locales/ruRU.js +26 -30
- package/locales/ukUA.js +6 -5
- package/models/api/gridFilterApi.d.ts +7 -0
- package/modern/components/GridRow.js +0 -6
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +16 -8
- package/modern/components/toolbar/GridToolbarQuickFilter.js +0 -7
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -12
- package/modern/hooks/features/filter/gridFilterUtils.js +1 -3
- package/modern/hooks/features/filter/useGridFilter.js +16 -8
- package/modern/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -0
- package/modern/index.js +1 -1
- package/modern/locales/beBY.js +8 -8
- package/modern/locales/faIR.js +1 -2
- package/modern/locales/ptBR.js +1 -2
- package/modern/locales/ruRU.js +26 -30
- package/modern/locales/ukUA.js +6 -5
- package/modern/utils/domUtils.js +3 -0
- package/modern/utils/fastObjectShallowCompare.js +0 -4
- package/node/components/GridRow.js +0 -6
- package/node/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +16 -8
- package/node/components/toolbar/GridToolbarQuickFilter.js +0 -7
- package/node/hooks/features/dimensions/useGridDimensions.js +11 -12
- package/node/hooks/features/filter/gridFilterUtils.js +1 -3
- package/node/hooks/features/filter/useGridFilter.js +16 -8
- package/node/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -0
- package/node/index.js +1 -1
- package/node/locales/beBY.js +8 -8
- package/node/locales/faIR.js +1 -2
- package/node/locales/ptBR.js +1 -2
- package/node/locales/ruRU.js +26 -30
- package/node/locales/ukUA.js +6 -5
- package/node/utils/domUtils.js +3 -0
- package/node/utils/fastObjectShallowCompare.js +0 -4
- package/package.json +2 -2
- package/utils/domUtils.js +3 -0
- package/utils/fastObjectShallowCompare.js +0 -4
package/node/locales/ruRU.js
CHANGED
|
@@ -6,6 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ruRU = void 0;
|
|
7
7
|
var _locale = require("@mui/material/locale");
|
|
8
8
|
var _getGridLocalization = require("../utils/getGridLocalization");
|
|
9
|
+
function getPluralForm(count, options) {
|
|
10
|
+
const penultimateDigit = Math.floor(count / 10) % 10;
|
|
11
|
+
const lastDigit = count % 10;
|
|
12
|
+
let pluralForm = options.many;
|
|
13
|
+
if (penultimateDigit !== 1 && lastDigit > 1 && lastDigit < 5) {
|
|
14
|
+
pluralForm = options.few;
|
|
15
|
+
} else if (penultimateDigit !== 1 && lastDigit === 1) {
|
|
16
|
+
pluralForm = options.one;
|
|
17
|
+
}
|
|
18
|
+
return `${count} ${pluralForm}`;
|
|
19
|
+
}
|
|
9
20
|
const ruRUGrid = {
|
|
10
21
|
// Root
|
|
11
22
|
noRowsLabel: 'Нет строк',
|
|
@@ -24,16 +35,11 @@ const ruRUGrid = {
|
|
|
24
35
|
toolbarFiltersLabel: 'Показать фильтры',
|
|
25
36
|
toolbarFiltersTooltipHide: 'Скрыть фильтры',
|
|
26
37
|
toolbarFiltersTooltipShow: 'Показать фильтры',
|
|
27
|
-
toolbarFiltersTooltipActive: count => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} else if (lastDigit === 1) {
|
|
33
|
-
pluralForm = 'активный фильтр';
|
|
34
|
-
}
|
|
35
|
-
return `${count} ${pluralForm}`;
|
|
36
|
-
},
|
|
38
|
+
toolbarFiltersTooltipActive: count => getPluralForm(count, {
|
|
39
|
+
one: 'активный фильтр',
|
|
40
|
+
few: 'активных фильтра',
|
|
41
|
+
many: 'активных фильтров'
|
|
42
|
+
}),
|
|
37
43
|
// Quick filter toolbar field
|
|
38
44
|
toolbarQuickFilterPlaceholder: 'Поиск…',
|
|
39
45
|
toolbarQuickFilterLabel: 'Поиск',
|
|
@@ -115,29 +121,19 @@ const ruRUGrid = {
|
|
|
115
121
|
columnMenuSortAsc: 'Сортировать по возрастанию',
|
|
116
122
|
columnMenuSortDesc: 'Сортировать по убыванию',
|
|
117
123
|
// Column header text
|
|
118
|
-
columnHeaderFiltersTooltipActive: count => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} else if (lastDigit === 1) {
|
|
124
|
-
pluralForm = 'активный фильтр';
|
|
125
|
-
}
|
|
126
|
-
return `${count} ${pluralForm}`;
|
|
127
|
-
},
|
|
124
|
+
columnHeaderFiltersTooltipActive: count => getPluralForm(count, {
|
|
125
|
+
one: 'активный фильтр',
|
|
126
|
+
few: 'активных фильтра',
|
|
127
|
+
many: 'активных фильтров'
|
|
128
|
+
}),
|
|
128
129
|
columnHeaderFiltersLabel: 'Показать фильтры',
|
|
129
130
|
columnHeaderSortIconLabel: 'Сортировать',
|
|
130
131
|
// Rows selected footer text
|
|
131
|
-
footerRowSelected: count => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
} else if (lastDigit === 1) {
|
|
137
|
-
pluralForm = 'строка выбрана';
|
|
138
|
-
}
|
|
139
|
-
return `${count} ${pluralForm}`;
|
|
140
|
-
},
|
|
132
|
+
footerRowSelected: count => getPluralForm(count, {
|
|
133
|
+
one: 'строка выбрана',
|
|
134
|
+
few: 'строки выбраны',
|
|
135
|
+
many: 'строк выбрано'
|
|
136
|
+
}),
|
|
141
137
|
// Total row amount footer text
|
|
142
138
|
footerTotalRows: 'Всего строк:',
|
|
143
139
|
// Total visible row amount footer text
|
package/node/locales/ukUA.js
CHANGED
|
@@ -6,16 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ukUA = void 0;
|
|
7
7
|
var _locale = require("@mui/material/locale");
|
|
8
8
|
var _getGridLocalization = require("../utils/getGridLocalization");
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
function getPluralForm(count, options) {
|
|
10
|
+
const penultimateDigit = Math.floor(count / 10) % 10;
|
|
11
11
|
const lastDigit = count % 10;
|
|
12
|
-
|
|
12
|
+
let pluralForm = options.many;
|
|
13
|
+
if (penultimateDigit !== 1 && lastDigit > 1 && lastDigit < 5) {
|
|
13
14
|
pluralForm = options.few;
|
|
14
|
-
} else if (lastDigit === 1) {
|
|
15
|
+
} else if (penultimateDigit !== 1 && lastDigit === 1) {
|
|
15
16
|
pluralForm = options.one;
|
|
16
17
|
}
|
|
17
18
|
return `${count} ${pluralForm}`;
|
|
18
|
-
}
|
|
19
|
+
}
|
|
19
20
|
const ukUAGrid = {
|
|
20
21
|
// Root
|
|
21
22
|
noRowsLabel: 'Немає рядків',
|
package/node/utils/domUtils.js
CHANGED
|
@@ -30,6 +30,9 @@ function isOverflown(element) {
|
|
|
30
30
|
function findParentElementFromClassName(elem, className) {
|
|
31
31
|
return elem.closest(`.${className}`);
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
// TODO, eventually replaces this function with CSS.escape, once available in jsdom, either added manually or built in
|
|
35
|
+
// https://github.com/jsdom/jsdom/issues/1550#issuecomment-236734471
|
|
33
36
|
function escapeOperandAttributeSelector(operand) {
|
|
34
37
|
return operand.replace(/["\\]/g, '\\$&');
|
|
35
38
|
}
|
|
@@ -15,7 +15,6 @@ function fastObjectShallowCompare(a, b) {
|
|
|
15
15
|
let aLength = 0;
|
|
16
16
|
let bLength = 0;
|
|
17
17
|
|
|
18
|
-
/* eslint-disable no-restricted-syntax */
|
|
19
18
|
/* eslint-disable guard-for-in */
|
|
20
19
|
for (const key in a) {
|
|
21
20
|
aLength += 1;
|
|
@@ -31,8 +30,5 @@ function fastObjectShallowCompare(a, b) {
|
|
|
31
30
|
for (const _ in b) {
|
|
32
31
|
bLength += 1;
|
|
33
32
|
}
|
|
34
|
-
/* eslint-enable no-restricted-syntax */
|
|
35
|
-
/* eslint-enable guard-for-in */
|
|
36
|
-
|
|
37
33
|
return aLength === bLength;
|
|
38
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.0",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"directory": "packages/x-data-grid"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/runtime": "^7.24.
|
|
40
|
+
"@babel/runtime": "^7.24.7",
|
|
41
41
|
"@mui/system": "^5.15.15",
|
|
42
42
|
"@mui/utils": "^5.15.14",
|
|
43
43
|
"clsx": "^2.1.1",
|
package/utils/domUtils.js
CHANGED
|
@@ -5,6 +5,9 @@ export function isOverflown(element) {
|
|
|
5
5
|
export function findParentElementFromClassName(elem, className) {
|
|
6
6
|
return elem.closest(`.${className}`);
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
// TODO, eventually replaces this function with CSS.escape, once available in jsdom, either added manually or built in
|
|
10
|
+
// https://github.com/jsdom/jsdom/issues/1550#issuecomment-236734471
|
|
8
11
|
export function escapeOperandAttributeSelector(operand) {
|
|
9
12
|
return operand.replace(/["\\]/g, '\\$&');
|
|
10
13
|
}
|
|
@@ -9,7 +9,6 @@ export function fastObjectShallowCompare(a, b) {
|
|
|
9
9
|
let aLength = 0;
|
|
10
10
|
let bLength = 0;
|
|
11
11
|
|
|
12
|
-
/* eslint-disable no-restricted-syntax */
|
|
13
12
|
/* eslint-disable guard-for-in */
|
|
14
13
|
for (const key in a) {
|
|
15
14
|
aLength += 1;
|
|
@@ -25,8 +24,5 @@ export function fastObjectShallowCompare(a, b) {
|
|
|
25
24
|
for (const _ in b) {
|
|
26
25
|
bLength += 1;
|
|
27
26
|
}
|
|
28
|
-
/* eslint-enable no-restricted-syntax */
|
|
29
|
-
/* eslint-enable guard-for-in */
|
|
30
|
-
|
|
31
27
|
return aLength === bLength;
|
|
32
28
|
}
|