@mui/x-data-grid 5.12.0 → 5.12.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 +160 -7
- package/colDef/gridCheckboxSelectionColDef.d.ts +1 -0
- package/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/colDef/gridDateOperators.d.ts +1 -1
- package/colDef/gridNumericColDef.js +1 -1
- package/components/cell/GridBooleanCell.js +4 -3
- package/components/cell/GridEditBooleanCell.js +4 -3
- package/components/cell/GridEditDateCell.js +4 -3
- package/components/cell/GridEditInputCell.js +4 -3
- package/components/cell/GridEditSingleSelectCell.js +9 -7
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/components/containers/GridRootStyles.js +4 -1
- package/components/panel/GridColumnsPanel.js +3 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +7 -0
- package/components/toolbar/GridToolbarQuickFilter.js +57 -4
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/localeTextConstants.js +1 -0
- package/hooks/core/useGridStateInitialization.js +19 -6
- package/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +5 -0
- package/hooks/features/filter/gridFilterSelector.js +6 -0
- package/hooks/features/filter/gridFilterState.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.js +10 -9
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +24 -7
- package/hooks/features/pagination/useGridPage.js +1 -1
- package/hooks/features/pagination/useGridPageSize.js +1 -1
- package/hooks/features/rows/useGridRows.js +15 -2
- package/hooks/features/rows/useGridRowsMeta.js +79 -77
- package/hooks/features/selection/useGridSelection.js +1 -1
- package/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/index.js +1 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/legacy/colDef/gridNumericColDef.js +1 -1
- package/legacy/components/cell/GridBooleanCell.js +3 -1
- package/legacy/components/cell/GridEditBooleanCell.js +4 -2
- package/legacy/components/cell/GridEditDateCell.js +4 -2
- package/legacy/components/cell/GridEditInputCell.js +4 -2
- package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/legacy/components/containers/GridRootStyles.js +7 -5
- package/legacy/components/panel/GridColumnsPanel.js +5 -6
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +3 -6
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +67 -6
- package/legacy/constants/defaultGridSlotsComponents.js +2 -1
- package/legacy/constants/localeTextConstants.js +1 -0
- package/legacy/hooks/core/useGridStateInitialization.js +18 -6
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/legacy/hooks/features/columns/useGridColumns.js +1 -1
- package/legacy/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/legacy/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/legacy/hooks/features/filter/gridFilterSelector.js +8 -0
- package/legacy/hooks/features/filter/gridFilterUtils.js +11 -10
- package/legacy/hooks/features/filter/useGridFilter.js +28 -7
- package/legacy/hooks/features/pagination/useGridPage.js +1 -1
- package/legacy/hooks/features/pagination/useGridPageSize.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +17 -2
- package/legacy/hooks/features/rows/useGridRowsMeta.js +81 -77
- package/legacy/hooks/features/selection/useGridSelection.js +1 -1
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +1 -0
- package/legacy/locales/bgBG.js +1 -0
- package/legacy/locales/csCZ.js +1 -0
- package/legacy/locales/daDK.js +1 -0
- package/legacy/locales/deDE.js +1 -0
- package/legacy/locales/elGR.js +1 -0
- package/legacy/locales/esES.js +1 -0
- package/legacy/locales/faIR.js +1 -0
- package/legacy/locales/fiFI.js +1 -0
- package/legacy/locales/frFR.js +1 -0
- package/legacy/locales/heIL.js +1 -0
- package/legacy/locales/huHU.js +1 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/itIT.js +1 -0
- package/legacy/locales/jaJP.js +29 -24
- package/legacy/locales/koKR.js +1 -0
- package/legacy/locales/nbNO.js +1 -0
- package/legacy/locales/nlNL.js +1 -0
- package/legacy/locales/plPL.js +1 -0
- package/legacy/locales/ptBR.js +1 -0
- package/legacy/locales/ruRU.js +7 -6
- package/legacy/locales/skSK.js +1 -0
- package/legacy/locales/svSE.js +128 -0
- package/legacy/locales/trTR.js +1 -0
- package/legacy/locales/ukUA.js +1 -0
- package/legacy/locales/viVN.js +1 -0
- package/legacy/locales/zhCN.js +1 -0
- package/locales/arSD.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.js +25 -24
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ruRU.js +7 -6
- package/locales/skSK.js +1 -0
- package/locales/svSE.d.ts +2 -0
- package/locales/svSE.js +116 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/models/api/gridCallbackDetails.d.ts +6 -1
- package/models/api/gridFilterApi.d.ts +8 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/api/gridStateApi.d.ts +14 -3
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/events/gridEventLookup.d.ts +3 -0
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/modern/colDef/gridNumericColDef.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +4 -3
- package/modern/components/cell/GridEditBooleanCell.js +4 -3
- package/modern/components/cell/GridEditDateCell.js +4 -3
- package/modern/components/cell/GridEditInputCell.js +4 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/modern/components/containers/GridRootStyles.js +4 -1
- package/modern/components/panel/GridColumnsPanel.js +3 -6
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/modern/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +57 -4
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/localeTextConstants.js +1 -0
- package/modern/hooks/core/useGridStateInitialization.js +19 -6
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +1 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/modern/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +10 -9
- package/modern/hooks/features/filter/useGridFilter.js +24 -7
- package/modern/hooks/features/pagination/useGridPage.js +1 -1
- package/modern/hooks/features/pagination/useGridPageSize.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +15 -2
- package/modern/hooks/features/rows/useGridRowsMeta.js +77 -75
- package/modern/hooks/features/selection/useGridSelection.js +1 -1
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/csCZ.js +1 -0
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.js +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/esES.js +1 -0
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.js +25 -24
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/ruRU.js +7 -6
- package/modern/locales/skSK.js +1 -0
- package/modern/locales/svSE.js +116 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/node/colDef/gridCheckboxSelectionColDef.js +4 -2
- package/node/colDef/gridNumericColDef.js +1 -1
- package/node/components/cell/GridBooleanCell.js +5 -3
- package/node/components/cell/GridEditBooleanCell.js +5 -3
- package/node/components/cell/GridEditDateCell.js +5 -3
- package/node/components/cell/GridEditInputCell.js +5 -3
- package/node/components/cell/GridEditSingleSelectCell.js +10 -7
- package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/node/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/node/components/containers/GridRootStyles.js +4 -1
- package/node/components/panel/GridColumnsPanel.js +3 -6
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/node/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +61 -4
- package/node/constants/defaultGridSlotsComponents.js +2 -1
- package/node/constants/localeTextConstants.js +1 -0
- package/node/hooks/core/useGridStateInitialization.js +19 -6
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +23 -0
- package/node/hooks/features/columns/useGridColumnSpanning.js +11 -16
- package/node/hooks/features/columns/useGridColumns.js +1 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/node/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +9 -2
- package/node/hooks/features/filter/gridFilterUtils.js +9 -8
- package/node/hooks/features/filter/useGridFilter.js +24 -7
- package/node/hooks/features/pagination/useGridPage.js +1 -1
- package/node/hooks/features/pagination/useGridPageSize.js +1 -1
- package/node/hooks/features/rows/useGridRows.js +15 -2
- package/node/hooks/features/rows/useGridRowsMeta.js +80 -77
- package/node/hooks/features/selection/useGridSelection.js +1 -1
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +7 -5
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -9
- package/node/index.js +1 -1
- package/node/locales/arSD.js +1 -0
- package/node/locales/bgBG.js +1 -0
- package/node/locales/csCZ.js +1 -0
- package/node/locales/daDK.js +1 -0
- package/node/locales/deDE.js +1 -0
- package/node/locales/elGR.js +1 -0
- package/node/locales/esES.js +1 -0
- package/node/locales/faIR.js +1 -0
- package/node/locales/fiFI.js +1 -0
- package/node/locales/frFR.js +1 -0
- package/node/locales/heIL.js +1 -0
- package/node/locales/huHU.js +1 -0
- package/node/locales/index.js +13 -0
- package/node/locales/itIT.js +1 -0
- package/node/locales/jaJP.js +25 -24
- package/node/locales/koKR.js +1 -0
- package/node/locales/nbNO.js +1 -0
- package/node/locales/nlNL.js +1 -0
- package/node/locales/plPL.js +1 -0
- package/node/locales/ptBR.js +1 -0
- package/node/locales/ruRU.js +7 -6
- package/node/locales/skSK.js +1 -0
- package/node/locales/svSE.js +126 -0
- package/node/locales/trTR.js +1 -0
- package/node/locales/ukUA.js +1 -0
- package/node/locales/viVN.js +1 -0
- package/node/locales/zhCN.js +1 -0
- package/package.json +4 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { debounce } from '@mui/material/utils';
|
|
3
4
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
4
5
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
5
6
|
import { useGridSelector } from '../../utils/useGridSelector';
|
|
@@ -36,84 +37,84 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
36
37
|
const currentPage = useGridVisibleRows(apiRef, props);
|
|
37
38
|
const hydrateRowsMeta = React.useCallback(() => {
|
|
38
39
|
hasRowWithAutoHeight.current = false;
|
|
39
|
-
apiRef.current.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
needsFirstMeasurement: true // Assume all rows will need to be measured by default
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
}
|
|
40
|
+
const densityFactor = gridDensityFactorSelector(apiRef.current.state, apiRef.current.instanceId);
|
|
41
|
+
const positions = [];
|
|
42
|
+
const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {
|
|
43
|
+
positions.push(acc);
|
|
44
|
+
|
|
45
|
+
if (!rowsHeightLookup.current[row.id]) {
|
|
46
|
+
rowsHeightLookup.current[row.id] = {
|
|
47
|
+
sizes: {
|
|
48
|
+
base: rowHeightFromDensity
|
|
49
|
+
},
|
|
50
|
+
isResized: false,
|
|
51
|
+
autoHeight: false,
|
|
52
|
+
needsFirstMeasurement: true // Assume all rows will need to be measured by default
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
hasRowWithAutoHeight.current = true;
|
|
85
|
-
rowsHeightLookup.current[row.id].autoHeight = true;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const {
|
|
58
|
+
isResized,
|
|
59
|
+
needsFirstMeasurement,
|
|
60
|
+
sizes
|
|
61
|
+
} = rowsHeightLookup.current[row.id];
|
|
62
|
+
let baseRowHeight = rowHeightFromDensity;
|
|
63
|
+
const existingBaseRowHeight = sizes.base;
|
|
64
|
+
|
|
65
|
+
if (isResized) {
|
|
66
|
+
// Do not recalculate resized row height and use the value from the lookup
|
|
67
|
+
baseRowHeight = existingBaseRowHeight;
|
|
68
|
+
} else if (getRowHeightProp) {
|
|
69
|
+
const rowHeightFromUser = getRowHeightProp(_extends({}, row, {
|
|
70
|
+
densityFactor
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
if (rowHeightFromUser === 'auto') {
|
|
74
|
+
if (needsFirstMeasurement) {
|
|
75
|
+
const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(_extends({}, row, {
|
|
76
|
+
densityFactor
|
|
77
|
+
})) : rowHeightFromDensity; // If the row was not measured yet use the estimated row height
|
|
78
|
+
|
|
79
|
+
baseRowHeight = estimatedRowHeight ?? rowHeightFromDensity;
|
|
86
80
|
} else {
|
|
87
|
-
|
|
88
|
-
baseRowHeight = rowHeightFromUser ?? rowHeightFromDensity;
|
|
89
|
-
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
90
|
-
rowsHeightLookup.current[row.id].autoHeight = false;
|
|
81
|
+
baseRowHeight = existingBaseRowHeight;
|
|
91
82
|
}
|
|
83
|
+
|
|
84
|
+
hasRowWithAutoHeight.current = true;
|
|
85
|
+
rowsHeightLookup.current[row.id].autoHeight = true;
|
|
92
86
|
} else {
|
|
87
|
+
// Default back to base rowHeight if getRowHeight returns null or undefined.
|
|
88
|
+
baseRowHeight = rowHeightFromUser ?? rowHeightFromDensity;
|
|
93
89
|
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const initialHeights = {
|
|
98
|
-
base: baseRowHeight
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
if (getRowSpacing) {
|
|
102
|
-
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
|
103
|
-
const spacing = getRowSpacing(_extends({}, row, {
|
|
104
|
-
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
105
|
-
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
106
|
-
indexRelativeToCurrentPage
|
|
107
|
-
}));
|
|
108
|
-
initialHeights.spacingTop = spacing.top ?? 0;
|
|
109
|
-
initialHeights.spacingBottom = spacing.bottom ?? 0;
|
|
90
|
+
rowsHeightLookup.current[row.id].autoHeight = false;
|
|
110
91
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
92
|
+
} else {
|
|
93
|
+
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
94
|
+
} // We use an object to make simple to check if a height is already added or not
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
const initialHeights = {
|
|
98
|
+
base: baseRowHeight
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
if (getRowSpacing) {
|
|
102
|
+
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
|
103
|
+
const spacing = getRowSpacing(_extends({}, row, {
|
|
104
|
+
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
105
|
+
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
106
|
+
indexRelativeToCurrentPage
|
|
107
|
+
}));
|
|
108
|
+
initialHeights.spacingTop = spacing.top ?? 0;
|
|
109
|
+
initialHeights.spacingBottom = spacing.bottom ?? 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const processedSizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);
|
|
113
|
+
rowsHeightLookup.current[row.id].sizes = processedSizes;
|
|
114
|
+
const finalRowHeight = Object.values(processedSizes).reduce((acc2, value) => acc2 + value, 0);
|
|
115
|
+
return acc + finalRowHeight;
|
|
116
|
+
}, 0);
|
|
117
|
+
apiRef.current.setState(state => {
|
|
117
118
|
return _extends({}, state, {
|
|
118
119
|
rowsMeta: {
|
|
119
120
|
currentPageTotalHeight,
|
|
@@ -142,6 +143,7 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
142
143
|
rowsHeightLookup.current[id].needsFirstMeasurement = false;
|
|
143
144
|
hydrateRowsMeta();
|
|
144
145
|
}, [hydrateRowsMeta]);
|
|
146
|
+
const debouncedHydrateRowsMeta = React.useMemo(() => debounce(hydrateRowsMeta), [hydrateRowsMeta]);
|
|
145
147
|
const storeMeasuredRowHeight = React.useCallback((id, height) => {
|
|
146
148
|
if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {
|
|
147
149
|
return;
|
|
@@ -153,9 +155,9 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
153
155
|
rowsHeightLookup.current[id].sizes.base = height;
|
|
154
156
|
|
|
155
157
|
if (needsHydration) {
|
|
156
|
-
|
|
158
|
+
debouncedHydrateRowsMeta();
|
|
157
159
|
}
|
|
158
|
-
}, [
|
|
160
|
+
}, [debouncedHydrateRowsMeta]);
|
|
159
161
|
const rowHasAutoHeight = React.useCallback(id => {
|
|
160
162
|
return rowsHeightLookup.current[id]?.autoHeight || false;
|
|
161
163
|
}, []);
|
|
@@ -163,7 +165,7 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
163
165
|
return lastMeasuredRowIndex.current;
|
|
164
166
|
}, []);
|
|
165
167
|
const setLastMeasuredRowIndex = React.useCallback(index => {
|
|
166
|
-
if (hasRowWithAutoHeight.current) {
|
|
168
|
+
if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {
|
|
167
169
|
lastMeasuredRowIndex.current = index;
|
|
168
170
|
}
|
|
169
171
|
}, []); // The effect is used to build the rows meta data - currentPageTotalHeight and positions.
|
|
@@ -46,7 +46,7 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
46
46
|
return getSelectionModelPropValue(props.selectionModel, gridSelectionStateSelector(apiRef.current.state));
|
|
47
47
|
}, [apiRef, props.selectionModel]);
|
|
48
48
|
const lastRowToggled = React.useRef(null);
|
|
49
|
-
apiRef.current.
|
|
49
|
+
apiRef.current.unstable_registerControlState({
|
|
50
50
|
stateId: 'selection',
|
|
51
51
|
propModel: propSelectionModel,
|
|
52
52
|
propOnChange: props.onSelectionModelChange,
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
|
|
5
5
|
import { getDataGridUtilityClass } from '../../../constants';
|
|
6
|
-
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../../../colDef';
|
|
6
|
+
import { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_CHECKBOX_SELECTION_FIELD } from '../../../colDef';
|
|
7
7
|
|
|
8
8
|
const useUtilityClasses = ownerState => {
|
|
9
9
|
const {
|
|
@@ -31,14 +31,16 @@ export const useGridSelectionPreProcessors = (apiRef, props) => {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
34
|
-
const haveSelectionColumn = columnsState.lookup[
|
|
34
|
+
const haveSelectionColumn = columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
35
35
|
|
|
36
36
|
if (shouldHaveSelectionColumn && !haveSelectionColumn) {
|
|
37
|
-
columnsState.lookup[
|
|
38
|
-
columnsState.all = [
|
|
37
|
+
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
38
|
+
columnsState.all = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.all];
|
|
39
39
|
} else if (!shouldHaveSelectionColumn && haveSelectionColumn) {
|
|
40
|
-
delete columnsState.lookup[
|
|
41
|
-
columnsState.all = columnsState.all.filter(field => field !==
|
|
40
|
+
delete columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD];
|
|
41
|
+
columnsState.all = columnsState.all.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD);
|
|
42
|
+
} else if (shouldHaveSelectionColumn && haveSelectionColumn) {
|
|
43
|
+
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = _extends({}, selectionColumn, columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD]);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
return columnsState;
|
|
@@ -28,7 +28,7 @@ export const sortingStateInitializer = (state, props) => {
|
|
|
28
28
|
|
|
29
29
|
export const useGridSorting = (apiRef, props) => {
|
|
30
30
|
const logger = useGridLogger(apiRef, 'useGridSorting');
|
|
31
|
-
apiRef.current.
|
|
31
|
+
apiRef.current.unstable_registerControlState({
|
|
32
32
|
stateId: 'sortModel',
|
|
33
33
|
propModel: props.sortModel,
|
|
34
34
|
propOnChange: props.onSortModelChange,
|
|
@@ -19,7 +19,7 @@ import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
|
|
|
19
19
|
import { getFirstNonSpannedColumnToRender } from '../columns/gridColumnsUtils'; // Uses binary search to avoid looping through all possible positions
|
|
20
20
|
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
export function
|
|
22
|
+
export function binarySearch(offset, positions, sliceStart = 0, sliceEnd = positions.length) {
|
|
23
23
|
if (positions.length <= 0) {
|
|
24
24
|
return -1;
|
|
25
25
|
}
|
|
@@ -30,8 +30,20 @@ export function getIndexFromScroll(offset, positions, sliceStart = 0, sliceEnd =
|
|
|
30
30
|
|
|
31
31
|
const pivot = sliceStart + Math.floor((sliceEnd - sliceStart) / 2);
|
|
32
32
|
const itemOffset = positions[pivot];
|
|
33
|
-
return offset <= itemOffset ?
|
|
33
|
+
return offset <= itemOffset ? binarySearch(offset, positions, sliceStart, pivot) : binarySearch(offset, positions, pivot + 1, sliceEnd);
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
function exponentialSearch(offset, positions, index) {
|
|
37
|
+
let interval = 1;
|
|
38
|
+
|
|
39
|
+
while (index < positions.length && positions[index] < offset) {
|
|
40
|
+
index += interval;
|
|
41
|
+
interval *= 2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return binarySearch(offset, positions, Math.floor(index / 2), Math.min(index, positions.length));
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
export const getRenderableIndexes = ({
|
|
36
48
|
firstIndex,
|
|
37
49
|
lastIndex,
|
|
@@ -73,6 +85,22 @@ export const useGridVirtualScroller = props => {
|
|
|
73
85
|
});
|
|
74
86
|
const [containerWidth, setContainerWidth] = React.useState(null);
|
|
75
87
|
const prevTotalWidth = React.useRef(columnsTotalWidth);
|
|
88
|
+
const getNearestIndexToRender = React.useCallback(offset => {
|
|
89
|
+
const lastMeasuredIndex = Math.max(0, apiRef.current.unstable_getLastMeasuredRowIndex());
|
|
90
|
+
const allRowsMeasured = lastMeasuredIndex === Infinity;
|
|
91
|
+
|
|
92
|
+
if (allRowsMeasured || rowsMeta.positions[lastMeasuredIndex] >= offset) {
|
|
93
|
+
// If all rows were measured (when no row has "auto" as height) or all rows before the offset
|
|
94
|
+
// were measured, then use a binary search because it's faster.
|
|
95
|
+
return binarySearch(offset, rowsMeta.positions);
|
|
96
|
+
} // Otherwise, use an exponential search.
|
|
97
|
+
// If rows have "auto" as height, their positions will be based on estimated heights.
|
|
98
|
+
// In this case, we can skip several steps until we find a position higher than the offset.
|
|
99
|
+
// Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
return exponentialSearch(offset, rowsMeta.positions, lastMeasuredIndex);
|
|
103
|
+
}, [apiRef, rowsMeta.positions]);
|
|
76
104
|
const computeRenderContext = React.useCallback(() => {
|
|
77
105
|
if (disableVirtualization) {
|
|
78
106
|
return {
|
|
@@ -86,9 +114,11 @@ export const useGridVirtualScroller = props => {
|
|
|
86
114
|
const {
|
|
87
115
|
top,
|
|
88
116
|
left
|
|
89
|
-
} = scrollPosition.current;
|
|
90
|
-
|
|
91
|
-
|
|
117
|
+
} = scrollPosition.current; // Clamp the value because the search may return an index out of bounds.
|
|
118
|
+
// In the last index, this is not needed because Array.slice doesn't include it.
|
|
119
|
+
|
|
120
|
+
const firstRowIndex = Math.min(getNearestIndexToRender(top), rowsMeta.positions.length - 1);
|
|
121
|
+
const lastRowIndex = rootProps.autoHeight ? firstRowIndex + currentPage.rows.length : getNearestIndexToRender(top + rootRef.current.clientHeight);
|
|
92
122
|
let hasRowWithAutoHeight = false;
|
|
93
123
|
let firstColumnIndex = 0;
|
|
94
124
|
let lastColumnIndex = columnPositions.length;
|
|
@@ -106,8 +136,8 @@ export const useGridVirtualScroller = props => {
|
|
|
106
136
|
}
|
|
107
137
|
|
|
108
138
|
if (!hasRowWithAutoHeight) {
|
|
109
|
-
firstColumnIndex =
|
|
110
|
-
lastColumnIndex =
|
|
139
|
+
firstColumnIndex = binarySearch(left, columnPositions);
|
|
140
|
+
lastColumnIndex = binarySearch(left + containerWidth, columnPositions);
|
|
111
141
|
}
|
|
112
142
|
|
|
113
143
|
return {
|
|
@@ -116,7 +146,7 @@ export const useGridVirtualScroller = props => {
|
|
|
116
146
|
firstColumnIndex,
|
|
117
147
|
lastColumnIndex
|
|
118
148
|
};
|
|
119
|
-
}, [disableVirtualization, rowsMeta.positions, rootProps.autoHeight, rootProps.rowBuffer, currentPage.rows, columnPositions, visibleColumns.length, apiRef, containerWidth]);
|
|
149
|
+
}, [disableVirtualization, getNearestIndexToRender, rowsMeta.positions.length, rootProps.autoHeight, rootProps.rowBuffer, currentPage.rows, columnPositions, visibleColumns.length, apiRef, containerWidth]);
|
|
120
150
|
React.useEffect(() => {
|
|
121
151
|
if (disableVirtualization) {
|
|
122
152
|
renderZoneRef.current.style.transform = `translate3d(0px, 0px, 0px)`;
|
|
@@ -372,6 +402,10 @@ export const useGridVirtualScroller = props => {
|
|
|
372
402
|
rootStyle.overflowX = 'hidden';
|
|
373
403
|
}
|
|
374
404
|
|
|
405
|
+
if (rootProps.autoHeight) {
|
|
406
|
+
rootStyle.overflowY = 'hidden';
|
|
407
|
+
}
|
|
408
|
+
|
|
375
409
|
const getRenderContext = React.useCallback(() => {
|
|
376
410
|
return prevRenderContext.current;
|
|
377
411
|
}, []);
|
package/modern/index.js
CHANGED
package/modern/locales/arSD.js
CHANGED
|
@@ -107,6 +107,7 @@ const arSDGrid = {
|
|
|
107
107
|
groupColumn: name => `تجميع حسب ${name}`,
|
|
108
108
|
unGroupColumn: name => `إيقاف التجميع حسب ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'توسيع',
|
|
111
112
|
collapseDetailPanel: 'طوي' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/bgBG.js
CHANGED
|
@@ -107,6 +107,7 @@ const bgBGGrid = {
|
|
|
107
107
|
groupColumn: name => `Групирай по ${name}`,
|
|
108
108
|
unGroupColumn: name => `Спри групиране по ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Разгъване',
|
|
111
112
|
collapseDetailPanel: 'Свиване' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/csCZ.js
CHANGED
|
@@ -141,6 +141,7 @@ const csCZGrid = {
|
|
|
141
141
|
groupingColumnHeaderName: 'Skupina',
|
|
142
142
|
groupColumn: name => `Zoskupit podle ${name}`,
|
|
143
143
|
unGroupColumn: name => `Přestat zoskupovat podle ${name}` // Master/detail
|
|
144
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
144
145
|
// expandDetailPanel: 'Expand',
|
|
145
146
|
// collapseDetailPanel: 'Collapse',
|
|
146
147
|
// Row reordering text
|
package/modern/locales/daDK.js
CHANGED
|
@@ -107,6 +107,7 @@ const daDKGrid = {
|
|
|
107
107
|
groupColumn: name => `Gruppér efter ${name}`,
|
|
108
108
|
unGroupColumn: name => `Fjern gruppéring efter ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Udvid',
|
|
111
112
|
collapseDetailPanel: 'Kollaps' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/deDE.js
CHANGED
|
@@ -107,6 +107,7 @@ const deDEGrid = {
|
|
|
107
107
|
groupColumn: name => `Gruppieren nach ${name}`,
|
|
108
108
|
unGroupColumn: name => `Gruppierung nach ${name} aufheben`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Aufklappen',
|
|
111
112
|
collapseDetailPanel: 'Zuklappen',
|
|
112
113
|
// Row reordering text
|
package/modern/locales/elGR.js
CHANGED
|
@@ -105,6 +105,7 @@ const elGRGrid = {
|
|
|
105
105
|
// groupColumn: name => `Group by ${name}`,
|
|
106
106
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
107
107
|
// Master/detail
|
|
108
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
108
109
|
// expandDetailPanel: 'Expand',
|
|
109
110
|
// collapseDetailPanel: 'Collapse',
|
|
110
111
|
// Row reordering text
|
package/modern/locales/esES.js
CHANGED
|
@@ -106,6 +106,7 @@ const esESGrid = {
|
|
|
106
106
|
// groupColumn: name => `Group by ${name}`,
|
|
107
107
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
108
108
|
// Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/faIR.js
CHANGED
|
@@ -107,6 +107,7 @@ const faIRGrid = {
|
|
|
107
107
|
groupColumn: name => `گروهبندی براساس ${name}`,
|
|
108
108
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
111
112
|
collapseDetailPanel: 'بستن پنل جزئیات' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/fiFI.js
CHANGED
|
@@ -106,6 +106,7 @@ const fiFIGrid = {
|
|
|
106
106
|
// groupColumn: name => `Group by ${name}`,
|
|
107
107
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
108
108
|
// Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/frFR.js
CHANGED
|
@@ -106,6 +106,7 @@ const frFRGrid = {
|
|
|
106
106
|
groupingColumnHeaderName: 'Groupe',
|
|
107
107
|
groupColumn: name => `Grouper par ${name}`,
|
|
108
108
|
unGroupColumn: name => `Arrêter de grouper par ${name}` // Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/heIL.js
CHANGED
|
@@ -107,6 +107,7 @@ const heILGrid = {
|
|
|
107
107
|
groupColumn: name => `קבץ לפי ${name}`,
|
|
108
108
|
unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'הרחב',
|
|
111
112
|
collapseDetailPanel: 'כווץ',
|
|
112
113
|
// Row reordering text
|
package/modern/locales/huHU.js
CHANGED
|
@@ -107,6 +107,7 @@ const huHUGrid = {
|
|
|
107
107
|
groupColumn: name => `Csoportosítás ${name} szerint`,
|
|
108
108
|
unGroupColumn: name => `${name} szerinti csoportosítás törlése`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Kibontás',
|
|
111
112
|
collapseDetailPanel: 'Összecsukás' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/index.js
CHANGED
package/modern/locales/itIT.js
CHANGED
|
@@ -106,6 +106,7 @@ const itITGrid = {
|
|
|
106
106
|
groupingColumnHeaderName: 'Gruppo',
|
|
107
107
|
groupColumn: name => `Raggruppa per ${name}`,
|
|
108
108
|
unGroupColumn: name => `Annulla raggruppamento per ${name}` // Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/jaJP.js
CHANGED
|
@@ -21,15 +21,15 @@ const jaJPGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'フィルター表示',
|
|
22
22
|
toolbarFiltersTooltipActive: count => `${count}件のフィルターを適用中`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: '検索...',
|
|
25
|
+
toolbarQuickFilterLabel: '検索',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'クリア',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'エクスポート',
|
|
29
29
|
toolbarExportLabel: 'エクスポート',
|
|
30
30
|
toolbarExportCSV: 'CSVダウンロード',
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
toolbarExportPrint: '印刷',
|
|
32
|
+
toolbarExportExcel: 'Excelダウンロード',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: '列検索',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: '検索クエリを入力...',
|
|
@@ -60,7 +60,7 @@ const jaJPGrid = {
|
|
|
60
60
|
filterOperatorOnOrBefore: '...以前',
|
|
61
61
|
filterOperatorIsEmpty: '...空である',
|
|
62
62
|
filterOperatorIsNotEmpty: '...空でない',
|
|
63
|
-
|
|
63
|
+
filterOperatorIsAnyOf: '...のいずれか',
|
|
64
64
|
// Filter values text
|
|
65
65
|
// filterValueAny: 'any',
|
|
66
66
|
// filterValueTrue: 'true',
|
|
@@ -85,31 +85,32 @@ const jaJPGrid = {
|
|
|
85
85
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
86
|
// Checkbox selection text
|
|
87
87
|
checkboxSelectionHeaderName: 'チェックボックス',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
checkboxSelectionSelectAllRows: 'すべての行を選択',
|
|
89
|
+
checkboxSelectionUnselectAllRows: 'すべての行選択を解除',
|
|
90
|
+
checkboxSelectionSelectRow: '行を選択',
|
|
91
|
+
checkboxSelectionUnselectRow: '行選択を解除',
|
|
92
92
|
// Boolean cell text
|
|
93
93
|
booleanCellTrueLabel: '真',
|
|
94
|
-
booleanCellFalseLabel: '偽'
|
|
94
|
+
booleanCellFalseLabel: '偽',
|
|
95
|
+
// Actions cell more text
|
|
95
96
|
// actionsCellMore: 'more',
|
|
96
97
|
// Column pinning text
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
pinToLeft: '左側に固定',
|
|
99
|
+
pinToRight: '右側に固定',
|
|
100
|
+
unpin: '固定解除',
|
|
100
101
|
// Tree Data
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
treeDataGroupingHeaderName: 'グループ',
|
|
103
|
+
treeDataExpand: '展開',
|
|
104
|
+
treeDataCollapse: '折りたたみ',
|
|
104
105
|
// Grouping columns
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
groupingColumnHeaderName: 'グループ',
|
|
107
|
+
groupColumn: name => `${name}でグループ化`,
|
|
108
|
+
unGroupColumn: name => `${name}のグループを解除`,
|
|
108
109
|
// Master/detail
|
|
109
|
-
//
|
|
110
|
-
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
111
|
+
expandDetailPanel: '展開',
|
|
112
|
+
collapseDetailPanel: '折りたたみ',
|
|
111
113
|
// Row reordering text
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
rowReorderingHeaderName: '行並び替え'
|
|
114
115
|
};
|
|
115
116
|
export const jaJP = getGridLocalization(jaJPGrid, jaJPCore);
|
package/modern/locales/koKR.js
CHANGED
|
@@ -106,6 +106,7 @@ const koKRGrid = {
|
|
|
106
106
|
// groupColumn: name => `Group by ${name}`,
|
|
107
107
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
108
108
|
// Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/nbNO.js
CHANGED
|
@@ -107,6 +107,7 @@ const nbNOGrid = {
|
|
|
107
107
|
groupColumn: name => `Grupper på ${name}`,
|
|
108
108
|
unGroupColumn: name => `Stopp å grupper på ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Utvid',
|
|
111
112
|
collapseDetailPanel: 'Kollaps',
|
|
112
113
|
// Row reordering text
|
package/modern/locales/nlNL.js
CHANGED
|
@@ -106,6 +106,7 @@ const nlNLGrid = {
|
|
|
106
106
|
groupingColumnHeaderName: 'Groep',
|
|
107
107
|
groupColumn: name => `Groepeer op ${name}`,
|
|
108
108
|
unGroupColumn: name => `Stop groeperen op ${name}` // Master/detail
|
|
109
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
109
110
|
// expandDetailPanel: 'Expand',
|
|
110
111
|
// collapseDetailPanel: 'Collapse',
|
|
111
112
|
// Row reordering text
|
package/modern/locales/plPL.js
CHANGED
|
@@ -107,6 +107,7 @@ const plPLGrid = {
|
|
|
107
107
|
groupColumn: name => `Grupuj według ${name}`,
|
|
108
108
|
unGroupColumn: name => `Rozgrupuj ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Rozwiń',
|
|
111
112
|
collapseDetailPanel: 'Zwiń' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -107,6 +107,7 @@ const ptBRGrid = {
|
|
|
107
107
|
groupColumn: name => `Agrupar por ${name}`,
|
|
108
108
|
unGroupColumn: name => `Parar agrupamento por ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
detailPanelToggle: 'Painel de detalhes',
|
|
110
111
|
expandDetailPanel: 'Expandir',
|
|
111
112
|
collapseDetailPanel: 'Esconder' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/ruRU.js
CHANGED
|
@@ -40,7 +40,7 @@ const ruRUGrid = {
|
|
|
40
40
|
toolbarExportLabel: 'Экспорт',
|
|
41
41
|
toolbarExportCSV: 'Скачать в формате CSV',
|
|
42
42
|
toolbarExportPrint: 'Печать',
|
|
43
|
-
|
|
43
|
+
toolbarExportExcel: 'Скачать в формате Excel',
|
|
44
44
|
// Columns panel text
|
|
45
45
|
columnsPanelTextFieldLabel: 'Найти столбец',
|
|
46
46
|
columnsPanelTextFieldPlaceholder: 'Заголовок столбца',
|
|
@@ -71,7 +71,7 @@ const ruRUGrid = {
|
|
|
71
71
|
filterOperatorOnOrBefore: 'меньше или равно',
|
|
72
72
|
filterOperatorIsEmpty: 'пустой',
|
|
73
73
|
filterOperatorIsNotEmpty: 'не пустой',
|
|
74
|
-
|
|
74
|
+
filterOperatorIsAnyOf: 'любой из',
|
|
75
75
|
// Filter values text
|
|
76
76
|
filterValueAny: 'любой',
|
|
77
77
|
filterValueTrue: 'истина',
|
|
@@ -138,10 +138,11 @@ const ruRUGrid = {
|
|
|
138
138
|
// Grouping columns
|
|
139
139
|
groupingColumnHeaderName: 'Группа',
|
|
140
140
|
groupColumn: name => `Сгруппировать по ${name}`,
|
|
141
|
-
unGroupColumn: name => `Разгруппировать по ${name}
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
|
|
141
|
+
unGroupColumn: name => `Разгруппировать по ${name}`,
|
|
142
|
+
// Master/detail
|
|
143
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
144
|
+
expandDetailPanel: 'Развернуть',
|
|
145
|
+
collapseDetailPanel: 'Свернуть' // Row reordering text
|
|
145
146
|
// rowReorderingHeaderName: 'Row reordering',
|
|
146
147
|
|
|
147
148
|
};
|