@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
|
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
+
var _utils = require("@mui/material/utils");
|
|
15
|
+
|
|
14
16
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
15
17
|
|
|
16
18
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
@@ -62,86 +64,86 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
62
64
|
const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef, props);
|
|
63
65
|
const hydrateRowsMeta = React.useCallback(() => {
|
|
64
66
|
hasRowWithAutoHeight.current = false;
|
|
65
|
-
apiRef.current.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
needsFirstMeasurement: true // Assume all rows will need to be measured by default
|
|
79
|
-
|
|
80
|
-
};
|
|
81
|
-
}
|
|
67
|
+
const densityFactor = (0, _densitySelector.gridDensityFactorSelector)(apiRef.current.state, apiRef.current.instanceId);
|
|
68
|
+
const positions = [];
|
|
69
|
+
const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {
|
|
70
|
+
positions.push(acc);
|
|
71
|
+
|
|
72
|
+
if (!rowsHeightLookup.current[row.id]) {
|
|
73
|
+
rowsHeightLookup.current[row.id] = {
|
|
74
|
+
sizes: {
|
|
75
|
+
base: rowHeightFromDensity
|
|
76
|
+
},
|
|
77
|
+
isResized: false,
|
|
78
|
+
autoHeight: false,
|
|
79
|
+
needsFirstMeasurement: true // Assume all rows will need to be measured by default
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
hasRowWithAutoHeight.current = true;
|
|
111
|
-
rowsHeightLookup.current[row.id].autoHeight = true;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const {
|
|
85
|
+
isResized,
|
|
86
|
+
needsFirstMeasurement,
|
|
87
|
+
sizes
|
|
88
|
+
} = rowsHeightLookup.current[row.id];
|
|
89
|
+
let baseRowHeight = rowHeightFromDensity;
|
|
90
|
+
const existingBaseRowHeight = sizes.base;
|
|
91
|
+
|
|
92
|
+
if (isResized) {
|
|
93
|
+
// Do not recalculate resized row height and use the value from the lookup
|
|
94
|
+
baseRowHeight = existingBaseRowHeight;
|
|
95
|
+
} else if (getRowHeightProp) {
|
|
96
|
+
const rowHeightFromUser = getRowHeightProp((0, _extends2.default)({}, row, {
|
|
97
|
+
densityFactor
|
|
98
|
+
}));
|
|
99
|
+
|
|
100
|
+
if (rowHeightFromUser === 'auto') {
|
|
101
|
+
if (needsFirstMeasurement) {
|
|
102
|
+
const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight((0, _extends2.default)({}, row, {
|
|
103
|
+
densityFactor
|
|
104
|
+
})) : rowHeightFromDensity; // If the row was not measured yet use the estimated row height
|
|
105
|
+
|
|
106
|
+
baseRowHeight = estimatedRowHeight != null ? estimatedRowHeight : rowHeightFromDensity;
|
|
112
107
|
} else {
|
|
113
|
-
|
|
114
|
-
baseRowHeight = rowHeightFromUser != null ? rowHeightFromUser : rowHeightFromDensity;
|
|
115
|
-
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
116
|
-
rowsHeightLookup.current[row.id].autoHeight = false;
|
|
108
|
+
baseRowHeight = existingBaseRowHeight;
|
|
117
109
|
}
|
|
110
|
+
|
|
111
|
+
hasRowWithAutoHeight.current = true;
|
|
112
|
+
rowsHeightLookup.current[row.id].autoHeight = true;
|
|
118
113
|
} else {
|
|
114
|
+
// Default back to base rowHeight if getRowHeight returns null or undefined.
|
|
115
|
+
baseRowHeight = rowHeightFromUser != null ? rowHeightFromUser : rowHeightFromDensity;
|
|
119
116
|
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const initialHeights = {
|
|
124
|
-
base: baseRowHeight
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
if (getRowSpacing) {
|
|
128
|
-
var _spacing$top, _spacing$bottom;
|
|
129
|
-
|
|
130
|
-
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
|
131
|
-
const spacing = getRowSpacing((0, _extends2.default)({}, row, {
|
|
132
|
-
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
133
|
-
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
134
|
-
indexRelativeToCurrentPage
|
|
135
|
-
}));
|
|
136
|
-
initialHeights.spacingTop = (_spacing$top = spacing.top) != null ? _spacing$top : 0;
|
|
137
|
-
initialHeights.spacingBottom = (_spacing$bottom = spacing.bottom) != null ? _spacing$bottom : 0;
|
|
117
|
+
rowsHeightLookup.current[row.id].autoHeight = false;
|
|
138
118
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
119
|
+
} else {
|
|
120
|
+
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
|
121
|
+
} // We use an object to make simple to check if a height is already added or not
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
const initialHeights = {
|
|
125
|
+
base: baseRowHeight
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
if (getRowSpacing) {
|
|
129
|
+
var _spacing$top, _spacing$bottom;
|
|
130
|
+
|
|
131
|
+
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
|
132
|
+
const spacing = getRowSpacing((0, _extends2.default)({}, row, {
|
|
133
|
+
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
134
|
+
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
135
|
+
indexRelativeToCurrentPage
|
|
136
|
+
}));
|
|
137
|
+
initialHeights.spacingTop = (_spacing$top = spacing.top) != null ? _spacing$top : 0;
|
|
138
|
+
initialHeights.spacingBottom = (_spacing$bottom = spacing.bottom) != null ? _spacing$bottom : 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const processedSizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);
|
|
142
|
+
rowsHeightLookup.current[row.id].sizes = processedSizes;
|
|
143
|
+
const finalRowHeight = Object.values(processedSizes).reduce((acc2, value) => acc2 + value, 0);
|
|
144
|
+
return acc + finalRowHeight;
|
|
145
|
+
}, 0);
|
|
146
|
+
apiRef.current.setState(state => {
|
|
145
147
|
return (0, _extends2.default)({}, state, {
|
|
146
148
|
rowsMeta: {
|
|
147
149
|
currentPageTotalHeight,
|
|
@@ -174,6 +176,7 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
174
176
|
rowsHeightLookup.current[id].needsFirstMeasurement = false;
|
|
175
177
|
hydrateRowsMeta();
|
|
176
178
|
}, [hydrateRowsMeta]);
|
|
179
|
+
const debouncedHydrateRowsMeta = React.useMemo(() => (0, _utils.debounce)(hydrateRowsMeta), [hydrateRowsMeta]);
|
|
177
180
|
const storeMeasuredRowHeight = React.useCallback((id, height) => {
|
|
178
181
|
if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {
|
|
179
182
|
return;
|
|
@@ -185,9 +188,9 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
185
188
|
rowsHeightLookup.current[id].sizes.base = height;
|
|
186
189
|
|
|
187
190
|
if (needsHydration) {
|
|
188
|
-
|
|
191
|
+
debouncedHydrateRowsMeta();
|
|
189
192
|
}
|
|
190
|
-
}, [
|
|
193
|
+
}, [debouncedHydrateRowsMeta]);
|
|
191
194
|
const rowHasAutoHeight = React.useCallback(id => {
|
|
192
195
|
var _rowsHeightLookup$cur2;
|
|
193
196
|
|
|
@@ -197,7 +200,7 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
197
200
|
return lastMeasuredRowIndex.current;
|
|
198
201
|
}, []);
|
|
199
202
|
const setLastMeasuredRowIndex = React.useCallback(index => {
|
|
200
|
-
if (hasRowWithAutoHeight.current) {
|
|
203
|
+
if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {
|
|
201
204
|
lastMeasuredRowIndex.current = index;
|
|
202
205
|
}
|
|
203
206
|
}, []); // The effect is used to build the rows meta data - currentPageTotalHeight and positions.
|
|
@@ -80,7 +80,7 @@ const useGridSelection = (apiRef, props) => {
|
|
|
80
80
|
return getSelectionModelPropValue(props.selectionModel, (0, _gridSelectionSelector.gridSelectionStateSelector)(apiRef.current.state));
|
|
81
81
|
}, [apiRef, props.selectionModel]);
|
|
82
82
|
const lastRowToggled = React.useRef(null);
|
|
83
|
-
apiRef.current.
|
|
83
|
+
apiRef.current.unstable_registerControlState({
|
|
84
84
|
stateId: 'selection',
|
|
85
85
|
propModel: propSelectionModel,
|
|
86
86
|
propOnChange: props.onSelectionModelChange,
|
|
@@ -48,14 +48,16 @@ const useGridSelectionPreProcessors = (apiRef, props) => {
|
|
|
48
48
|
headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')
|
|
49
49
|
});
|
|
50
50
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
51
|
-
const haveSelectionColumn = columnsState.lookup[
|
|
51
|
+
const haveSelectionColumn = columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
52
52
|
|
|
53
53
|
if (shouldHaveSelectionColumn && !haveSelectionColumn) {
|
|
54
|
-
columnsState.lookup[
|
|
55
|
-
columnsState.all = [
|
|
54
|
+
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
55
|
+
columnsState.all = [_colDef.GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.all];
|
|
56
56
|
} else if (!shouldHaveSelectionColumn && haveSelectionColumn) {
|
|
57
|
-
delete columnsState.lookup[
|
|
58
|
-
columnsState.all = columnsState.all.filter(field => field !==
|
|
57
|
+
delete columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD];
|
|
58
|
+
columnsState.all = columnsState.all.filter(field => field !== _colDef.GRID_CHECKBOX_SELECTION_FIELD);
|
|
59
|
+
} else if (shouldHaveSelectionColumn && haveSelectionColumn) {
|
|
60
|
+
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = (0, _extends2.default)({}, selectionColumn, columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD]);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
return columnsState;
|
|
@@ -60,7 +60,7 @@ exports.sortingStateInitializer = sortingStateInitializer;
|
|
|
60
60
|
|
|
61
61
|
const useGridSorting = (apiRef, props) => {
|
|
62
62
|
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useGridSorting');
|
|
63
|
-
apiRef.current.
|
|
63
|
+
apiRef.current.unstable_registerControlState({
|
|
64
64
|
stateId: 'sortModel',
|
|
65
65
|
propModel: props.sortModel,
|
|
66
66
|
propOnChange: props.onSortModelChange,
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.binarySearch = binarySearch;
|
|
9
9
|
exports.useGridVirtualScroller = exports.getRenderableIndexes = void 0;
|
|
10
10
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
@@ -53,7 +53,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
53
53
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
54
54
|
|
|
55
55
|
// Uses binary search to avoid looping through all possible positions
|
|
56
|
-
function
|
|
56
|
+
function binarySearch(offset, positions, sliceStart = 0, sliceEnd = positions.length) {
|
|
57
57
|
if (positions.length <= 0) {
|
|
58
58
|
return -1;
|
|
59
59
|
}
|
|
@@ -64,7 +64,18 @@ function getIndexFromScroll(offset, positions, sliceStart = 0, sliceEnd = positi
|
|
|
64
64
|
|
|
65
65
|
const pivot = sliceStart + Math.floor((sliceEnd - sliceStart) / 2);
|
|
66
66
|
const itemOffset = positions[pivot];
|
|
67
|
-
return offset <= itemOffset ?
|
|
67
|
+
return offset <= itemOffset ? binarySearch(offset, positions, sliceStart, pivot) : binarySearch(offset, positions, pivot + 1, sliceEnd);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function exponentialSearch(offset, positions, index) {
|
|
71
|
+
let interval = 1;
|
|
72
|
+
|
|
73
|
+
while (index < positions.length && positions[index] < offset) {
|
|
74
|
+
index += interval;
|
|
75
|
+
interval *= 2;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return binarySearch(offset, positions, Math.floor(index / 2), Math.min(index, positions.length));
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
const getRenderableIndexes = ({
|
|
@@ -111,6 +122,22 @@ const useGridVirtualScroller = props => {
|
|
|
111
122
|
});
|
|
112
123
|
const [containerWidth, setContainerWidth] = React.useState(null);
|
|
113
124
|
const prevTotalWidth = React.useRef(columnsTotalWidth);
|
|
125
|
+
const getNearestIndexToRender = React.useCallback(offset => {
|
|
126
|
+
const lastMeasuredIndex = Math.max(0, apiRef.current.unstable_getLastMeasuredRowIndex());
|
|
127
|
+
const allRowsMeasured = lastMeasuredIndex === Infinity;
|
|
128
|
+
|
|
129
|
+
if (allRowsMeasured || rowsMeta.positions[lastMeasuredIndex] >= offset) {
|
|
130
|
+
// If all rows were measured (when no row has "auto" as height) or all rows before the offset
|
|
131
|
+
// were measured, then use a binary search because it's faster.
|
|
132
|
+
return binarySearch(offset, rowsMeta.positions);
|
|
133
|
+
} // Otherwise, use an exponential search.
|
|
134
|
+
// If rows have "auto" as height, their positions will be based on estimated heights.
|
|
135
|
+
// In this case, we can skip several steps until we find a position higher than the offset.
|
|
136
|
+
// Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
return exponentialSearch(offset, rowsMeta.positions, lastMeasuredIndex);
|
|
140
|
+
}, [apiRef, rowsMeta.positions]);
|
|
114
141
|
const computeRenderContext = React.useCallback(() => {
|
|
115
142
|
if (disableVirtualization) {
|
|
116
143
|
return {
|
|
@@ -124,9 +151,11 @@ const useGridVirtualScroller = props => {
|
|
|
124
151
|
const {
|
|
125
152
|
top,
|
|
126
153
|
left
|
|
127
|
-
} = scrollPosition.current;
|
|
128
|
-
|
|
129
|
-
|
|
154
|
+
} = scrollPosition.current; // Clamp the value because the search may return an index out of bounds.
|
|
155
|
+
// In the last index, this is not needed because Array.slice doesn't include it.
|
|
156
|
+
|
|
157
|
+
const firstRowIndex = Math.min(getNearestIndexToRender(top), rowsMeta.positions.length - 1);
|
|
158
|
+
const lastRowIndex = rootProps.autoHeight ? firstRowIndex + currentPage.rows.length : getNearestIndexToRender(top + rootRef.current.clientHeight);
|
|
130
159
|
let hasRowWithAutoHeight = false;
|
|
131
160
|
let firstColumnIndex = 0;
|
|
132
161
|
let lastColumnIndex = columnPositions.length;
|
|
@@ -144,8 +173,8 @@ const useGridVirtualScroller = props => {
|
|
|
144
173
|
}
|
|
145
174
|
|
|
146
175
|
if (!hasRowWithAutoHeight) {
|
|
147
|
-
firstColumnIndex =
|
|
148
|
-
lastColumnIndex =
|
|
176
|
+
firstColumnIndex = binarySearch(left, columnPositions);
|
|
177
|
+
lastColumnIndex = binarySearch(left + containerWidth, columnPositions);
|
|
149
178
|
}
|
|
150
179
|
|
|
151
180
|
return {
|
|
@@ -154,7 +183,7 @@ const useGridVirtualScroller = props => {
|
|
|
154
183
|
firstColumnIndex,
|
|
155
184
|
lastColumnIndex
|
|
156
185
|
};
|
|
157
|
-
}, [disableVirtualization, rowsMeta.positions, rootProps.autoHeight, rootProps.rowBuffer, currentPage.rows, columnPositions, visibleColumns.length, apiRef, containerWidth]);
|
|
186
|
+
}, [disableVirtualization, getNearestIndexToRender, rowsMeta.positions.length, rootProps.autoHeight, rootProps.rowBuffer, currentPage.rows, columnPositions, visibleColumns.length, apiRef, containerWidth]);
|
|
158
187
|
React.useEffect(() => {
|
|
159
188
|
if (disableVirtualization) {
|
|
160
189
|
renderZoneRef.current.style.transform = `translate3d(0px, 0px, 0px)`;
|
|
@@ -412,6 +441,10 @@ const useGridVirtualScroller = props => {
|
|
|
412
441
|
rootStyle.overflowX = 'hidden';
|
|
413
442
|
}
|
|
414
443
|
|
|
444
|
+
if (rootProps.autoHeight) {
|
|
445
|
+
rootStyle.overflowY = 'hidden';
|
|
446
|
+
}
|
|
447
|
+
|
|
415
448
|
const getRenderContext = React.useCallback(() => {
|
|
416
449
|
return prevRenderContext.current;
|
|
417
450
|
}, []);
|
package/node/index.js
CHANGED
package/node/locales/arSD.js
CHANGED
|
@@ -116,6 +116,7 @@ const arSDGrid = {
|
|
|
116
116
|
groupColumn: name => `تجميع حسب ${name}`,
|
|
117
117
|
unGroupColumn: name => `إيقاف التجميع حسب ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'توسيع',
|
|
120
121
|
collapseDetailPanel: 'طوي' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/bgBG.js
CHANGED
|
@@ -116,6 +116,7 @@ const bgBGGrid = {
|
|
|
116
116
|
groupColumn: name => `Групирай по ${name}`,
|
|
117
117
|
unGroupColumn: name => `Спри групиране по ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Разгъване',
|
|
120
121
|
collapseDetailPanel: 'Свиване' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/csCZ.js
CHANGED
|
@@ -150,6 +150,7 @@ const csCZGrid = {
|
|
|
150
150
|
groupingColumnHeaderName: 'Skupina',
|
|
151
151
|
groupColumn: name => `Zoskupit podle ${name}`,
|
|
152
152
|
unGroupColumn: name => `Přestat zoskupovat podle ${name}` // Master/detail
|
|
153
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
153
154
|
// expandDetailPanel: 'Expand',
|
|
154
155
|
// collapseDetailPanel: 'Collapse',
|
|
155
156
|
// Row reordering text
|
package/node/locales/daDK.js
CHANGED
|
@@ -116,6 +116,7 @@ const daDKGrid = {
|
|
|
116
116
|
groupColumn: name => `Gruppér efter ${name}`,
|
|
117
117
|
unGroupColumn: name => `Fjern gruppéring efter ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Udvid',
|
|
120
121
|
collapseDetailPanel: 'Kollaps' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/deDE.js
CHANGED
|
@@ -116,6 +116,7 @@ const deDEGrid = {
|
|
|
116
116
|
groupColumn: name => `Gruppieren nach ${name}`,
|
|
117
117
|
unGroupColumn: name => `Gruppierung nach ${name} aufheben`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Aufklappen',
|
|
120
121
|
collapseDetailPanel: 'Zuklappen',
|
|
121
122
|
// Row reordering text
|
package/node/locales/elGR.js
CHANGED
|
@@ -113,6 +113,7 @@ const elGRGrid = {
|
|
|
113
113
|
// groupColumn: name => `Group by ${name}`,
|
|
114
114
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
115
115
|
// Master/detail
|
|
116
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
116
117
|
// expandDetailPanel: 'Expand',
|
|
117
118
|
// collapseDetailPanel: 'Collapse',
|
|
118
119
|
// Row reordering text
|
package/node/locales/esES.js
CHANGED
|
@@ -115,6 +115,7 @@ const esESGrid = {
|
|
|
115
115
|
// groupColumn: name => `Group by ${name}`,
|
|
116
116
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
117
117
|
// Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/faIR.js
CHANGED
|
@@ -116,6 +116,7 @@ const faIRGrid = {
|
|
|
116
116
|
groupColumn: name => `گروهبندی براساس ${name}`,
|
|
117
117
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
120
121
|
collapseDetailPanel: 'بستن پنل جزئیات' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/fiFI.js
CHANGED
|
@@ -115,6 +115,7 @@ const fiFIGrid = {
|
|
|
115
115
|
// groupColumn: name => `Group by ${name}`,
|
|
116
116
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
117
117
|
// Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/frFR.js
CHANGED
|
@@ -115,6 +115,7 @@ const frFRGrid = {
|
|
|
115
115
|
groupingColumnHeaderName: 'Groupe',
|
|
116
116
|
groupColumn: name => `Grouper par ${name}`,
|
|
117
117
|
unGroupColumn: name => `Arrêter de grouper par ${name}` // Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/heIL.js
CHANGED
|
@@ -116,6 +116,7 @@ const heILGrid = {
|
|
|
116
116
|
groupColumn: name => `קבץ לפי ${name}`,
|
|
117
117
|
unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'הרחב',
|
|
120
121
|
collapseDetailPanel: 'כווץ',
|
|
121
122
|
// Row reordering text
|
package/node/locales/huHU.js
CHANGED
|
@@ -116,6 +116,7 @@ const huHUGrid = {
|
|
|
116
116
|
groupColumn: name => `Csoportosítás ${name} szerint`,
|
|
117
117
|
unGroupColumn: name => `${name} szerinti csoportosítás törlése`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Kibontás',
|
|
120
121
|
collapseDetailPanel: 'Összecsukás' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/index.js
CHANGED
|
@@ -277,6 +277,19 @@ Object.keys(_skSK).forEach(function (key) {
|
|
|
277
277
|
});
|
|
278
278
|
});
|
|
279
279
|
|
|
280
|
+
var _svSE = require("./svSE");
|
|
281
|
+
|
|
282
|
+
Object.keys(_svSE).forEach(function (key) {
|
|
283
|
+
if (key === "default" || key === "__esModule") return;
|
|
284
|
+
if (key in exports && exports[key] === _svSE[key]) return;
|
|
285
|
+
Object.defineProperty(exports, key, {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
get: function () {
|
|
288
|
+
return _svSE[key];
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
|
|
280
293
|
var _trTR = require("./trTR");
|
|
281
294
|
|
|
282
295
|
Object.keys(_trTR).forEach(function (key) {
|
package/node/locales/itIT.js
CHANGED
|
@@ -115,6 +115,7 @@ const itITGrid = {
|
|
|
115
115
|
groupingColumnHeaderName: 'Gruppo',
|
|
116
116
|
groupColumn: name => `Raggruppa per ${name}`,
|
|
117
117
|
unGroupColumn: name => `Annulla raggruppamento per ${name}` // Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/jaJP.js
CHANGED
|
@@ -30,15 +30,15 @@ const jaJPGrid = {
|
|
|
30
30
|
toolbarFiltersTooltipShow: 'フィルター表示',
|
|
31
31
|
toolbarFiltersTooltipActive: count => `${count}件のフィルターを適用中`,
|
|
32
32
|
// Quick filter toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
toolbarQuickFilterPlaceholder: '検索...',
|
|
34
|
+
toolbarQuickFilterLabel: '検索',
|
|
35
|
+
toolbarQuickFilterDeleteIconLabel: 'クリア',
|
|
36
36
|
// Export selector toolbar button text
|
|
37
37
|
toolbarExport: 'エクスポート',
|
|
38
38
|
toolbarExportLabel: 'エクスポート',
|
|
39
39
|
toolbarExportCSV: 'CSVダウンロード',
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
toolbarExportPrint: '印刷',
|
|
41
|
+
toolbarExportExcel: 'Excelダウンロード',
|
|
42
42
|
// Columns panel text
|
|
43
43
|
columnsPanelTextFieldLabel: '列検索',
|
|
44
44
|
columnsPanelTextFieldPlaceholder: '検索クエリを入力...',
|
|
@@ -69,7 +69,7 @@ const jaJPGrid = {
|
|
|
69
69
|
filterOperatorOnOrBefore: '...以前',
|
|
70
70
|
filterOperatorIsEmpty: '...空である',
|
|
71
71
|
filterOperatorIsNotEmpty: '...空でない',
|
|
72
|
-
|
|
72
|
+
filterOperatorIsAnyOf: '...のいずれか',
|
|
73
73
|
// Filter values text
|
|
74
74
|
// filterValueAny: 'any',
|
|
75
75
|
// filterValueTrue: 'true',
|
|
@@ -94,32 +94,33 @@ const jaJPGrid = {
|
|
|
94
94
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
95
95
|
// Checkbox selection text
|
|
96
96
|
checkboxSelectionHeaderName: 'チェックボックス',
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
checkboxSelectionSelectAllRows: 'すべての行を選択',
|
|
98
|
+
checkboxSelectionUnselectAllRows: 'すべての行選択を解除',
|
|
99
|
+
checkboxSelectionSelectRow: '行を選択',
|
|
100
|
+
checkboxSelectionUnselectRow: '行選択を解除',
|
|
101
101
|
// Boolean cell text
|
|
102
102
|
booleanCellTrueLabel: '真',
|
|
103
|
-
booleanCellFalseLabel: '偽'
|
|
103
|
+
booleanCellFalseLabel: '偽',
|
|
104
|
+
// Actions cell more text
|
|
104
105
|
// actionsCellMore: 'more',
|
|
105
106
|
// Column pinning text
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
pinToLeft: '左側に固定',
|
|
108
|
+
pinToRight: '右側に固定',
|
|
109
|
+
unpin: '固定解除',
|
|
109
110
|
// Tree Data
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
treeDataGroupingHeaderName: 'グループ',
|
|
112
|
+
treeDataExpand: '展開',
|
|
113
|
+
treeDataCollapse: '折りたたみ',
|
|
113
114
|
// Grouping columns
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
groupingColumnHeaderName: 'グループ',
|
|
116
|
+
groupColumn: name => `${name}でグループ化`,
|
|
117
|
+
unGroupColumn: name => `${name}のグループを解除`,
|
|
117
118
|
// Master/detail
|
|
118
|
-
//
|
|
119
|
-
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
120
|
+
expandDetailPanel: '展開',
|
|
121
|
+
collapseDetailPanel: '折りたたみ',
|
|
120
122
|
// Row reordering text
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
rowReorderingHeaderName: '行並び替え'
|
|
123
124
|
};
|
|
124
125
|
const jaJP = (0, _getGridLocalization.getGridLocalization)(jaJPGrid, _locale.jaJP);
|
|
125
126
|
exports.jaJP = jaJP;
|
package/node/locales/koKR.js
CHANGED
|
@@ -115,6 +115,7 @@ const koKRGrid = {
|
|
|
115
115
|
// groupColumn: name => `Group by ${name}`,
|
|
116
116
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
117
117
|
// Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/nbNO.js
CHANGED
|
@@ -116,6 +116,7 @@ const nbNOGrid = {
|
|
|
116
116
|
groupColumn: name => `Grupper på ${name}`,
|
|
117
117
|
unGroupColumn: name => `Stopp å grupper på ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Utvid',
|
|
120
121
|
collapseDetailPanel: 'Kollaps',
|
|
121
122
|
// Row reordering text
|
package/node/locales/nlNL.js
CHANGED
|
@@ -115,6 +115,7 @@ const nlNLGrid = {
|
|
|
115
115
|
groupingColumnHeaderName: 'Groep',
|
|
116
116
|
groupColumn: name => `Groepeer op ${name}`,
|
|
117
117
|
unGroupColumn: name => `Stop groeperen op ${name}` // Master/detail
|
|
118
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
118
119
|
// expandDetailPanel: 'Expand',
|
|
119
120
|
// collapseDetailPanel: 'Collapse',
|
|
120
121
|
// Row reordering text
|
package/node/locales/plPL.js
CHANGED
|
@@ -116,6 +116,7 @@ const plPLGrid = {
|
|
|
116
116
|
groupColumn: name => `Grupuj według ${name}`,
|
|
117
117
|
unGroupColumn: name => `Rozgrupuj ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
119
120
|
expandDetailPanel: 'Rozwiń',
|
|
120
121
|
collapseDetailPanel: 'Zwiń' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|
package/node/locales/ptBR.js
CHANGED
|
@@ -116,6 +116,7 @@ const ptBRGrid = {
|
|
|
116
116
|
groupColumn: name => `Agrupar por ${name}`,
|
|
117
117
|
unGroupColumn: name => `Parar agrupamento por ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
+
detailPanelToggle: 'Painel de detalhes',
|
|
119
120
|
expandDetailPanel: 'Expandir',
|
|
120
121
|
collapseDetailPanel: 'Esconder' // Row reordering text
|
|
121
122
|
// rowReorderingHeaderName: 'Row reordering',
|