@mui/x-data-grid 7.29.1 → 7.29.3
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 +92 -0
- package/DataGrid/useDataGridProps.js +6 -5
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +8 -3
- package/components/containers/GridRootStyles.js +16 -14
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/features/editing/useGridRowEditing.js +7 -6
- package/hooks/features/rowSelection/utils.js +1 -1
- package/index.js +1 -1
- package/locales/hyAM.d.ts +2 -0
- package/locales/hyAM.js +178 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/modern/DataGrid/useDataGridProps.js +6 -5
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +8 -3
- package/modern/components/containers/GridRootStyles.js +16 -14
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -6
- package/modern/hooks/features/rowSelection/utils.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locales/hyAM.js +178 -0
- package/modern/locales/index.js +1 -0
- package/node/DataGrid/useDataGridProps.js +5 -4
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +8 -3
- package/node/components/containers/GridRootStyles.js +16 -14
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +6 -5
- package/node/hooks/features/rowSelection/utils.js +1 -1
- package/node/index.js +1 -1
- package/node/locales/hyAM.js +184 -0
- package/node/locales/index.js +11 -0
- package/package.json +1 -1
|
@@ -12,16 +12,6 @@ function getBorderColor(theme) {
|
|
|
12
12
|
}
|
|
13
13
|
return darken(alpha(theme.palette.divider, 1), 0.68);
|
|
14
14
|
}
|
|
15
|
-
const columnHeaderStyles = {
|
|
16
|
-
[`& .${c.iconButtonContainer}`]: {
|
|
17
|
-
visibility: 'visible',
|
|
18
|
-
width: 'auto'
|
|
19
|
-
},
|
|
20
|
-
[`& .${c.menuIcon}`]: {
|
|
21
|
-
width: 'auto',
|
|
22
|
-
visibility: 'visible'
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
15
|
const columnSeparatorTargetSize = 10;
|
|
26
16
|
const columnSeparatorOffset = -5;
|
|
27
17
|
const focusOutlineWidth = 1;
|
|
@@ -439,7 +429,7 @@ export const GridRootStyles = styled('div', {
|
|
|
439
429
|
visibility: 'visible',
|
|
440
430
|
width: 'auto'
|
|
441
431
|
},
|
|
442
|
-
[`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}) .${c.
|
|
432
|
+
[`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}) .${c.sortButton}`]: {
|
|
443
433
|
opacity: 0,
|
|
444
434
|
transition: t.transitions.create(['opacity'], {
|
|
445
435
|
duration: t.transitions.duration.shorter
|
|
@@ -507,13 +497,25 @@ export const GridRootStyles = styled('div', {
|
|
|
507
497
|
width: 'var(--DataGrid-rowWidth)'
|
|
508
498
|
},
|
|
509
499
|
'@media (hover: hover)': {
|
|
510
|
-
[`& .${c.columnHeader}:hover`]:
|
|
511
|
-
|
|
500
|
+
[`& .${c.columnHeader}:hover`]: {
|
|
501
|
+
[`& .${c.menuIcon}`]: {
|
|
502
|
+
width: 'auto',
|
|
503
|
+
visibility: 'visible'
|
|
504
|
+
},
|
|
505
|
+
[`& .${c.iconButtonContainer}`]: {
|
|
506
|
+
visibility: 'visible',
|
|
507
|
+
width: 'auto'
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
[`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortButton}`]: {
|
|
512
511
|
opacity: 0.5
|
|
513
512
|
}
|
|
514
513
|
},
|
|
515
514
|
'@media (hover: none)': {
|
|
516
|
-
[`& .${c.columnHeader}`]:
|
|
515
|
+
[`& .${c.columnHeader} .${c.menuIcon}`]: {
|
|
516
|
+
width: 'auto',
|
|
517
|
+
visibility: 'visible'
|
|
518
|
+
},
|
|
517
519
|
[`& .${c.columnHeader}:focus,
|
|
518
520
|
& .${c['columnHeader--siblingFocused']}`]: {
|
|
519
521
|
[`.${c['columnSeparator--resizable']}`]: {
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -11,7 +11,7 @@ import { GridEditModes, GridRowModes } from "../../../models/gridEditRowModel.js
|
|
|
11
11
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
12
12
|
import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "./gridEditingSelectors.js";
|
|
13
13
|
import { isPrintableKey, isPasteShortcut } from "../../../utils/keyboardUtils.js";
|
|
14
|
-
import {
|
|
14
|
+
import { gridColumnDefinitionsSelector, gridVisibleColumnFieldsSelector } from "../columns/gridColumnsSelector.js";
|
|
15
15
|
import { gridRowsLookupSelector } from "../rows/gridRowsSelector.js";
|
|
16
16
|
import { deepClone } from "../../../utils/utils.js";
|
|
17
17
|
import { GridRowEditStopReasons, GridRowEditStartReasons } from "../../../models/params/gridRowParams.js";
|
|
@@ -313,8 +313,9 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
313
313
|
initialValue
|
|
314
314
|
} = params;
|
|
315
315
|
const row = apiRef.current.getRow(id);
|
|
316
|
-
const
|
|
317
|
-
const newProps =
|
|
316
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
317
|
+
const newProps = columns.reduce((acc, col) => {
|
|
318
|
+
const field = col.field;
|
|
318
319
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
319
320
|
if (!cellParams.isEditable) {
|
|
320
321
|
return acc;
|
|
@@ -331,7 +332,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
331
332
|
acc[field] = {
|
|
332
333
|
value: newValue,
|
|
333
334
|
error: false,
|
|
334
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
335
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
335
336
|
};
|
|
336
337
|
return acc;
|
|
337
338
|
}, {});
|
|
@@ -340,8 +341,8 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
340
341
|
if (fieldToFocus) {
|
|
341
342
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
-
const
|
|
344
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
345
|
+
const field = column.field;
|
|
345
346
|
const value = apiRef.current.getCellValue(id, field);
|
|
346
347
|
const newValue = deleteValue ? getDefaultCellValue(column) : initialValue ?? value;
|
|
347
348
|
Promise.resolve(column.preProcessEditCellProps({
|
|
@@ -97,7 +97,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
|
|
|
97
97
|
export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, selectedIds = new Set(gridRowSelectionStateSelector(apiRef.current.state))) => {
|
|
98
98
|
const filteredRows = gridFilteredRowsLookupSelector(apiRef);
|
|
99
99
|
const selectedDescendants = new Set([]);
|
|
100
|
-
if (!autoSelectDescendants && !autoSelectParents) {
|
|
100
|
+
if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
if (autoSelectDescendants) {
|
package/modern/index.js
CHANGED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { hyAM as hyAMCore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from "../utils/getGridLocalization.js";
|
|
3
|
+
const hyAMGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: 'Տվյալներ չկան',
|
|
6
|
+
noResultsOverlayLabel: 'Արդյունքներ չեն գտնվել։',
|
|
7
|
+
// Density selector toolbar button text
|
|
8
|
+
toolbarDensity: 'Խտություն',
|
|
9
|
+
toolbarDensityLabel: 'Խտություն',
|
|
10
|
+
toolbarDensityCompact: 'Կոմպակտ',
|
|
11
|
+
toolbarDensityStandard: 'Ստանդարտ',
|
|
12
|
+
toolbarDensityComfortable: 'Հարմարավետ',
|
|
13
|
+
// Columns selector toolbar button text
|
|
14
|
+
toolbarColumns: 'Սյունակներ',
|
|
15
|
+
toolbarColumnsLabel: 'Ընտրել սյունակներ',
|
|
16
|
+
// Filters toolbar button text
|
|
17
|
+
toolbarFilters: 'Զտիչներ',
|
|
18
|
+
toolbarFiltersLabel: 'Ցուցադրել զտիչները',
|
|
19
|
+
toolbarFiltersTooltipHide: 'Թաքցնել զտիչները',
|
|
20
|
+
toolbarFiltersTooltipShow: 'Ցուցադրել զտիչները',
|
|
21
|
+
toolbarFiltersTooltipActive: count => {
|
|
22
|
+
let pluralForm = 'ակտիվ զտիչ';
|
|
23
|
+
if (count === 1) {
|
|
24
|
+
pluralForm = 'ակտիվ զտիչ';
|
|
25
|
+
} else {
|
|
26
|
+
pluralForm = 'ակտիվ զտիչներ';
|
|
27
|
+
}
|
|
28
|
+
return `${count} ${pluralForm}`;
|
|
29
|
+
},
|
|
30
|
+
// Quick filter toolbar field
|
|
31
|
+
toolbarQuickFilterPlaceholder: 'Որոնել…',
|
|
32
|
+
toolbarQuickFilterLabel: 'Որոնել',
|
|
33
|
+
toolbarQuickFilterDeleteIconLabel: 'Մաքրել',
|
|
34
|
+
// Export selector toolbar button text
|
|
35
|
+
toolbarExport: 'Արտահանում',
|
|
36
|
+
toolbarExportLabel: 'Արտահանում',
|
|
37
|
+
toolbarExportCSV: 'Ներբեռնել CSV-ով',
|
|
38
|
+
toolbarExportPrint: 'Տպել',
|
|
39
|
+
toolbarExportExcel: 'Ներբեռնել Excel-ով',
|
|
40
|
+
// Columns management text
|
|
41
|
+
columnsManagementSearchTitle: 'Որոնել',
|
|
42
|
+
columnsManagementNoColumns: 'Սյունակներ չկան',
|
|
43
|
+
columnsManagementShowHideAllText: 'Ցուցադրել/Թաքցնել բոլորը',
|
|
44
|
+
columnsManagementReset: 'Վերակայել',
|
|
45
|
+
columnsManagementDeleteIconLabel: 'Հեռացնել',
|
|
46
|
+
// Filter panel text
|
|
47
|
+
filterPanelAddFilter: 'Ավելացնել զտիչ',
|
|
48
|
+
filterPanelRemoveAll: 'Հեռացնել բոլորը',
|
|
49
|
+
filterPanelDeleteIconLabel: 'Հեռացնել',
|
|
50
|
+
filterPanelLogicOperator: 'Տրամաբանական օպերատոր',
|
|
51
|
+
filterPanelOperator: 'Օպերատոր',
|
|
52
|
+
filterPanelOperatorAnd: 'Եվ',
|
|
53
|
+
filterPanelOperatorOr: 'Կամ',
|
|
54
|
+
filterPanelColumns: 'Սյունակներ',
|
|
55
|
+
filterPanelInputLabel: 'Արժեք',
|
|
56
|
+
filterPanelInputPlaceholder: 'Զտիչի արժեք',
|
|
57
|
+
// Filter operators text
|
|
58
|
+
filterOperatorContains: 'պարունակում է',
|
|
59
|
+
filterOperatorDoesNotContain: 'չի պարունակում',
|
|
60
|
+
filterOperatorEquals: 'հավասար է',
|
|
61
|
+
filterOperatorDoesNotEqual: 'հավասար չէ',
|
|
62
|
+
filterOperatorStartsWith: 'սկսվում է',
|
|
63
|
+
filterOperatorEndsWith: 'վերջանում է',
|
|
64
|
+
filterOperatorIs: 'է',
|
|
65
|
+
filterOperatorNot: 'չէ',
|
|
66
|
+
filterOperatorAfter: 'հետո է',
|
|
67
|
+
filterOperatorOnOrAfter: 'այդ օրը կամ հետո է',
|
|
68
|
+
filterOperatorBefore: 'մինչ է',
|
|
69
|
+
filterOperatorOnOrBefore: 'այդ օրը կամ առաջ է',
|
|
70
|
+
filterOperatorIsEmpty: 'դատարկ է',
|
|
71
|
+
filterOperatorIsNotEmpty: 'դատարկ չէ',
|
|
72
|
+
filterOperatorIsAnyOf: 'որևէ մեկը',
|
|
73
|
+
'filterOperator=': '=',
|
|
74
|
+
'filterOperator!=': '!=',
|
|
75
|
+
'filterOperator>': '>',
|
|
76
|
+
'filterOperator>=': '>=',
|
|
77
|
+
'filterOperator<': '<',
|
|
78
|
+
'filterOperator<=': '<=',
|
|
79
|
+
// Header filter operators text
|
|
80
|
+
headerFilterOperatorContains: 'Պարունակում է',
|
|
81
|
+
headerFilterOperatorDoesNotContain: 'Չի պարունակում',
|
|
82
|
+
headerFilterOperatorEquals: 'Հավասար է',
|
|
83
|
+
headerFilterOperatorDoesNotEqual: 'Հավասար չէ',
|
|
84
|
+
headerFilterOperatorStartsWith: 'Սկսվում է',
|
|
85
|
+
headerFilterOperatorEndsWith: 'Վերջանում է',
|
|
86
|
+
headerFilterOperatorIs: 'Է',
|
|
87
|
+
headerFilterOperatorNot: 'Չէ',
|
|
88
|
+
headerFilterOperatorAfter: 'Հետո է',
|
|
89
|
+
headerFilterOperatorOnOrAfter: 'Այդ օրը կամ հետո է',
|
|
90
|
+
headerFilterOperatorBefore: 'Մինչ է',
|
|
91
|
+
headerFilterOperatorOnOrBefore: 'Այդ օրը կամ առաջ է',
|
|
92
|
+
headerFilterOperatorIsEmpty: 'Դատարկ է',
|
|
93
|
+
headerFilterOperatorIsNotEmpty: 'Դատարկ չէ',
|
|
94
|
+
headerFilterOperatorIsAnyOf: 'Որևէ մեկը',
|
|
95
|
+
'headerFilterOperator=': 'Հավասար է',
|
|
96
|
+
'headerFilterOperator!=': 'Հավասար չէ',
|
|
97
|
+
'headerFilterOperator>': 'Ավելի մեծ է',
|
|
98
|
+
'headerFilterOperator>=': 'Ավելի մեծ կամ հավասար է',
|
|
99
|
+
'headerFilterOperator<': 'Ավելի փոքր է',
|
|
100
|
+
'headerFilterOperator<=': 'Ավելի փոքր կամ հավասար է',
|
|
101
|
+
// Filter values text
|
|
102
|
+
filterValueAny: 'ցանկացած',
|
|
103
|
+
filterValueTrue: 'այո',
|
|
104
|
+
filterValueFalse: 'ոչ',
|
|
105
|
+
// Column menu text
|
|
106
|
+
columnMenuLabel: 'Մենյու',
|
|
107
|
+
columnMenuAriaLabel: columnName => `${columnName} սյունակի մենյու`,
|
|
108
|
+
columnMenuShowColumns: 'Ցուցադրել սյունակները',
|
|
109
|
+
columnMenuManageColumns: 'Կառավարել սյունակները',
|
|
110
|
+
columnMenuFilter: 'Զտիչ',
|
|
111
|
+
columnMenuHideColumn: 'Թաքցնել',
|
|
112
|
+
columnMenuUnsort: 'Մաքրել դասավորումը',
|
|
113
|
+
columnMenuSortAsc: 'Աճման կարգով դասավորել',
|
|
114
|
+
columnMenuSortDesc: 'Նվազման կարգով դասավորել',
|
|
115
|
+
// Column header text
|
|
116
|
+
columnHeaderFiltersTooltipActive: count => {
|
|
117
|
+
let pluralForm = 'ակտիվ զտիչներ';
|
|
118
|
+
if (count === 1) {
|
|
119
|
+
pluralForm = 'ակտիվ զտիչ';
|
|
120
|
+
}
|
|
121
|
+
return `${count} ${pluralForm}`;
|
|
122
|
+
},
|
|
123
|
+
columnHeaderFiltersLabel: 'Ցուցադրել զտիչները',
|
|
124
|
+
columnHeaderSortIconLabel: 'Դասավորել',
|
|
125
|
+
// Rows selected footer text
|
|
126
|
+
footerRowSelected: count => {
|
|
127
|
+
let pluralForm = 'ընտրված տող';
|
|
128
|
+
if (count === 1) {
|
|
129
|
+
pluralForm = 'ընտրված տող';
|
|
130
|
+
} else {
|
|
131
|
+
pluralForm = 'ընտրված տողեր';
|
|
132
|
+
}
|
|
133
|
+
return `${count} ${pluralForm}`;
|
|
134
|
+
},
|
|
135
|
+
// Total row amount footer text
|
|
136
|
+
footerTotalRows: 'Ընդամենը տողեր:',
|
|
137
|
+
// Total visible row amount footer text
|
|
138
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => {
|
|
139
|
+
return `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`;
|
|
140
|
+
},
|
|
141
|
+
// Checkbox selection text
|
|
142
|
+
checkboxSelectionHeaderName: 'Տողի ընտրություն',
|
|
143
|
+
checkboxSelectionSelectAllRows: 'Ընտրել բոլոր տողերը',
|
|
144
|
+
checkboxSelectionUnselectAllRows: 'Չընտրել բոլոր տողերը',
|
|
145
|
+
checkboxSelectionSelectRow: 'Ընտրել տողը',
|
|
146
|
+
checkboxSelectionUnselectRow: 'Չընտրել տողը',
|
|
147
|
+
// Boolean cell text
|
|
148
|
+
booleanCellTrueLabel: 'այո',
|
|
149
|
+
booleanCellFalseLabel: 'ոչ',
|
|
150
|
+
// Actions cell more text
|
|
151
|
+
actionsCellMore: 'ավելին',
|
|
152
|
+
// Column pinning text
|
|
153
|
+
pinToLeft: 'Կցել ձախ',
|
|
154
|
+
pinToRight: 'Կցել աջ',
|
|
155
|
+
unpin: 'Անջատել',
|
|
156
|
+
// Tree Data
|
|
157
|
+
treeDataGroupingHeaderName: 'Խումբ',
|
|
158
|
+
treeDataExpand: 'Բացել ենթատողերը',
|
|
159
|
+
treeDataCollapse: 'Փակել ենթատողերը',
|
|
160
|
+
// Grouping columns
|
|
161
|
+
groupingColumnHeaderName: 'Խմբավորում',
|
|
162
|
+
groupColumn: name => `Խմբավորել ըստ ${name}`,
|
|
163
|
+
unGroupColumn: name => `Չխմբավորել ըստ ${name}`,
|
|
164
|
+
// Master/detail
|
|
165
|
+
detailPanelToggle: 'Փոխարկել մանրամասն տեսքը',
|
|
166
|
+
expandDetailPanel: 'Բացել',
|
|
167
|
+
collapseDetailPanel: 'Փակել',
|
|
168
|
+
// Row reordering text
|
|
169
|
+
rowReorderingHeaderName: 'Տողերի վերադասավորում',
|
|
170
|
+
// Aggregation
|
|
171
|
+
aggregationMenuItemHeader: 'Ագրեգացում',
|
|
172
|
+
aggregationFunctionLabelSum: 'գումար',
|
|
173
|
+
aggregationFunctionLabelAvg: 'միջին',
|
|
174
|
+
aggregationFunctionLabelMin: 'մինիմում',
|
|
175
|
+
aggregationFunctionLabelMax: 'մաքսիմում',
|
|
176
|
+
aggregationFunctionLabelSize: 'քանակ'
|
|
177
|
+
};
|
|
178
|
+
export const hyAM = getGridLocalization(hyAMGrid, hyAMCore);
|
package/modern/locales/index.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.useDataGridProps = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
|
+
var _system = require("@mui/system");
|
|
12
13
|
var _constants = require("../constants");
|
|
13
14
|
var _defaultGridSlotsComponents = require("../constants/defaultGridSlotsComponents");
|
|
14
15
|
var _utils = require("../internals/utils");
|
|
@@ -27,12 +28,12 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
27
28
|
};
|
|
28
29
|
const defaultSlots = _defaultGridSlotsComponents.DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
29
30
|
const useDataGridProps = inProps => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
(0, _styles.useThemeProps)({
|
|
31
|
+
const theme = (0, _styles.useTheme)();
|
|
32
|
+
const themedProps = (0, _utils.useProps)(React.useMemo(() => (0, _system.getThemeProps)({
|
|
33
33
|
props: inProps,
|
|
34
|
+
theme,
|
|
34
35
|
name: 'MuiDataGrid'
|
|
35
|
-
}));
|
|
36
|
+
}), [theme, inProps]));
|
|
36
37
|
const localeText = React.useMemo(() => (0, _extends2.default)({}, _constants.GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
37
38
|
const slots = React.useMemo(() => (0, _utils.computeSlots)({
|
|
38
39
|
defaultSlots,
|
|
@@ -11,17 +11,19 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
15
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
15
16
|
var _gridClasses = require("../../constants/gridClasses");
|
|
16
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
17
18
|
var _GridIconButtonContainer = require("./GridIconButtonContainer");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["direction", "index", "sortingOrder", "disabled"];
|
|
20
|
+
const _excluded = ["direction", "index", "sortingOrder", "disabled", "className"];
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
21
22
|
const {
|
|
22
23
|
classes
|
|
23
24
|
} = ownerState;
|
|
24
25
|
const slots = {
|
|
26
|
+
root: ['sortButton'],
|
|
25
27
|
icon: ['sortIcon']
|
|
26
28
|
};
|
|
27
29
|
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
@@ -47,7 +49,8 @@ function GridColumnHeaderSortIconRaw(props) {
|
|
|
47
49
|
direction,
|
|
48
50
|
index,
|
|
49
51
|
sortingOrder,
|
|
50
|
-
disabled
|
|
52
|
+
disabled,
|
|
53
|
+
className
|
|
51
54
|
} = props,
|
|
52
55
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
53
56
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
@@ -65,7 +68,8 @@ function GridColumnHeaderSortIconRaw(props) {
|
|
|
65
68
|
"aria-label": apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
|
|
66
69
|
title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
|
|
67
70
|
size: "small",
|
|
68
|
-
disabled: disabled
|
|
71
|
+
disabled: disabled,
|
|
72
|
+
className: (0, _clsx.default)(classes.root, className)
|
|
69
73
|
}, rootProps.slotProps?.baseIconButton, other, {
|
|
70
74
|
children: iconElement
|
|
71
75
|
}));
|
|
@@ -84,6 +88,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes =
|
|
|
84
88
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
85
89
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
86
90
|
// ----------------------------------------------------------------------
|
|
91
|
+
className: _propTypes.default.string,
|
|
87
92
|
direction: _propTypes.default.oneOf(['asc', 'desc']),
|
|
88
93
|
disabled: _propTypes.default.bool,
|
|
89
94
|
field: _propTypes.default.string.isRequired,
|
|
@@ -19,16 +19,6 @@ function getBorderColor(theme) {
|
|
|
19
19
|
}
|
|
20
20
|
return (0, _styles.darken)((0, _styles.alpha)(theme.palette.divider, 1), 0.68);
|
|
21
21
|
}
|
|
22
|
-
const columnHeaderStyles = {
|
|
23
|
-
[`& .${_gridClasses.gridClasses.iconButtonContainer}`]: {
|
|
24
|
-
visibility: 'visible',
|
|
25
|
-
width: 'auto'
|
|
26
|
-
},
|
|
27
|
-
[`& .${_gridClasses.gridClasses.menuIcon}`]: {
|
|
28
|
-
width: 'auto',
|
|
29
|
-
visibility: 'visible'
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
22
|
const columnSeparatorTargetSize = 10;
|
|
33
23
|
const columnSeparatorOffset = -5;
|
|
34
24
|
const focusOutlineWidth = 1;
|
|
@@ -446,7 +436,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
446
436
|
visibility: 'visible',
|
|
447
437
|
width: 'auto'
|
|
448
438
|
},
|
|
449
|
-
[`& .${_gridClasses.gridClasses.columnHeader}:not(.${_gridClasses.gridClasses['columnHeader--sorted']}) .${_gridClasses.gridClasses.
|
|
439
|
+
[`& .${_gridClasses.gridClasses.columnHeader}:not(.${_gridClasses.gridClasses['columnHeader--sorted']}) .${_gridClasses.gridClasses.sortButton}`]: {
|
|
450
440
|
opacity: 0,
|
|
451
441
|
transition: t.transitions.create(['opacity'], {
|
|
452
442
|
duration: t.transitions.duration.shorter
|
|
@@ -514,13 +504,25 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
514
504
|
width: 'var(--DataGrid-rowWidth)'
|
|
515
505
|
},
|
|
516
506
|
'@media (hover: hover)': {
|
|
517
|
-
[`& .${_gridClasses.gridClasses.columnHeader}:hover`]:
|
|
518
|
-
|
|
507
|
+
[`& .${_gridClasses.gridClasses.columnHeader}:hover`]: {
|
|
508
|
+
[`& .${_gridClasses.gridClasses.menuIcon}`]: {
|
|
509
|
+
width: 'auto',
|
|
510
|
+
visibility: 'visible'
|
|
511
|
+
},
|
|
512
|
+
[`& .${_gridClasses.gridClasses.iconButtonContainer}`]: {
|
|
513
|
+
visibility: 'visible',
|
|
514
|
+
width: 'auto'
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
[`& .${_gridClasses.gridClasses.columnHeader}:not(.${_gridClasses.gridClasses['columnHeader--sorted']}):hover .${_gridClasses.gridClasses.sortButton}`]: {
|
|
519
518
|
opacity: 0.5
|
|
520
519
|
}
|
|
521
520
|
},
|
|
522
521
|
'@media (hover: none)': {
|
|
523
|
-
[`& .${_gridClasses.gridClasses.columnHeader}`]:
|
|
522
|
+
[`& .${_gridClasses.gridClasses.columnHeader} .${_gridClasses.gridClasses.menuIcon}`]: {
|
|
523
|
+
width: 'auto',
|
|
524
|
+
visibility: 'visible'
|
|
525
|
+
},
|
|
524
526
|
[`& .${_gridClasses.gridClasses.columnHeader}:focus,
|
|
525
527
|
& .${_gridClasses.gridClasses['columnHeader--siblingFocused']}`]: {
|
|
526
528
|
[`.${_gridClasses.gridClasses['columnSeparator--resizable']}`]: {
|
|
@@ -9,4 +9,4 @@ var _utils = require("@mui/utils");
|
|
|
9
9
|
function getDataGridUtilityClass(slot) {
|
|
10
10
|
return (0, _utils.unstable_generateUtilityClass)('MuiDataGrid', slot);
|
|
11
11
|
}
|
|
12
|
-
const gridClasses = exports.gridClasses = (0, _utils.unstable_generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
12
|
+
const gridClasses = exports.gridClasses = (0, _utils.unstable_generateUtilityClasses)('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -321,8 +321,9 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
321
321
|
initialValue
|
|
322
322
|
} = params;
|
|
323
323
|
const row = apiRef.current.getRow(id);
|
|
324
|
-
const
|
|
325
|
-
const newProps =
|
|
324
|
+
const columns = (0, _gridColumnsSelector.gridColumnDefinitionsSelector)(apiRef);
|
|
325
|
+
const newProps = columns.reduce((acc, col) => {
|
|
326
|
+
const field = col.field;
|
|
326
327
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
327
328
|
if (!cellParams.isEditable) {
|
|
328
329
|
return acc;
|
|
@@ -339,7 +340,7 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
339
340
|
acc[field] = {
|
|
340
341
|
value: newValue,
|
|
341
342
|
error: false,
|
|
342
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
343
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
343
344
|
};
|
|
344
345
|
return acc;
|
|
345
346
|
}, {});
|
|
@@ -348,8 +349,8 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
348
349
|
if (fieldToFocus) {
|
|
349
350
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
-
const
|
|
352
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
353
|
+
const field = column.field;
|
|
353
354
|
const value = apiRef.current.getCellValue(id, field);
|
|
354
355
|
const newValue = deleteValue ? (0, _utils3.getDefaultCellValue)(column) : initialValue ?? value;
|
|
355
356
|
Promise.resolve(column.preProcessEditCellProps({
|
|
@@ -105,7 +105,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
|
|
|
105
105
|
const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, selectedIds = new Set((0, _gridRowSelectionSelector.gridRowSelectionStateSelector)(apiRef.current.state))) => {
|
|
106
106
|
const filteredRows = (0, _gridFilterSelector.gridFilteredRowsLookupSelector)(apiRef);
|
|
107
107
|
const selectedDescendants = new Set([]);
|
|
108
|
-
if (!autoSelectDescendants && !autoSelectParents) {
|
|
108
|
+
if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
if (autoSelectDescendants) {
|
package/node/index.js
CHANGED