@mui/x-data-grid 6.0.3 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -0
- package/components/GridAutoSizer.js +3 -0
- package/components/GridPagination.d.ts +6 -6
- package/components/GridRow.js +4 -2
- package/components/cell/GridActionsCellItem.d.ts +2 -2
- package/components/cell/GridEditDateCell.js +37 -16
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +20 -16
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +5 -5
- package/components/menu/columnMenu/GridColumnMenu.js +30 -30
- package/components/menu/columnMenu/GridColumnMenuProps.d.ts +1 -1
- package/components/panel/GridColumnsPanel.d.ts +8 -0
- package/components/panel/GridColumnsPanel.js +18 -6
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/reexportable.d.ts +1 -1
- package/components/reexportable.js +1 -1
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/hooks/core/useGridApiInitialization.js +3 -3
- package/hooks/features/columnMenu/columnMenuInterfaces.d.ts +11 -11
- package/hooks/features/columnMenu/{useGridColumnMenuComponents.d.ts → useGridColumnMenuSlots.d.ts} +4 -4
- package/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
- package/hooks/features/columns/gridColumnsSelector.d.ts +3 -3
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/editing/useGridCellEditing.js +5 -1
- package/hooks/features/editing/useGridEditing.js +1 -3
- package/hooks/features/editing/useGridRowEditing.js +5 -1
- package/hooks/features/filter/gridFilterState.js +6 -1
- package/hooks/features/filter/useGridFilter.js +6 -1
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +10 -2
- package/legacy/components/GridAutoSizer.js +3 -0
- package/legacy/components/GridRow.js +5 -2
- package/legacy/components/cell/GridEditBooleanCell.js +19 -21
- package/legacy/components/cell/GridEditDateCell.js +69 -39
- package/legacy/components/cell/GridEditInputCell.js +25 -27
- package/legacy/components/cell/GridEditSingleSelectCell.js +26 -28
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +20 -16
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +32 -32
- package/legacy/components/panel/GridColumnsPanel.js +19 -6
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/legacy/components/reexportable.js +1 -1
- package/legacy/hooks/core/useGridApiInitialization.js +3 -3
- package/legacy/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +25 -30
- package/legacy/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/legacy/hooks/features/columns/useGridColumns.js +1 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +120 -120
- package/legacy/hooks/features/editing/useGridEditing.js +17 -21
- package/legacy/hooks/features/editing/useGridRowEditing.js +5 -1
- package/legacy/hooks/features/export/useGridPrintExport.js +45 -47
- package/legacy/hooks/features/filter/gridFilterState.js +6 -1
- package/legacy/hooks/features/filter/useGridFilter.js +6 -1
- package/legacy/hooks/features/rows/gridRowsUtils.js +2 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/legacy/index.js +10 -2
- package/legacy/locales/coreLocales.js +0 -1
- package/legacy/locales/daDK.js +16 -21
- package/legacy/locales/esES.js +1 -1
- package/legacy/locales/huHU.js +15 -20
- package/legacy/locales/jaJP.js +1 -1
- package/legacy/locales/nbNO.js +10 -12
- package/legacy/locales/nlNL.js +3 -3
- package/legacy/locales/ptBR.js +7 -9
- package/legacy/locales/ruRU.js +1 -1
- package/legacy/locales/svSE.js +2 -2
- package/legacy/models/gridColumnGrouping.js +4 -0
- package/legacy/models/params/gridRowParams.js +8 -0
- package/legacy/utils/createSelector.js +14 -22
- package/locales/coreLocales.js +0 -1
- package/locales/daDK.js +16 -21
- package/locales/esES.js +1 -1
- package/locales/huHU.js +15 -20
- package/locales/jaJP.js +1 -1
- package/locales/nbNO.js +10 -12
- package/locales/nlNL.js +3 -3
- package/locales/ptBR.js +7 -9
- package/locales/ruRU.js +1 -1
- package/locales/svSE.js +2 -2
- package/models/api/gridCoreApi.d.ts +3 -1
- package/models/api/gridEditingApi.d.ts +4 -0
- package/models/gridColumnGrouping.js +4 -0
- package/models/params/gridRowParams.js +8 -0
- package/modern/components/GridAutoSizer.js +3 -0
- package/modern/components/GridRow.js +4 -2
- package/modern/components/cell/GridEditDateCell.js +37 -16
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +19 -15
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +30 -30
- package/modern/components/panel/GridColumnsPanel.js +18 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/reexportable.js +1 -1
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
- package/modern/hooks/features/columns/useGridColumns.js +1 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +5 -1
- package/modern/hooks/features/editing/useGridEditing.js +1 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +5 -1
- package/modern/hooks/features/filter/gridFilterState.js +6 -1
- package/modern/hooks/features/filter/useGridFilter.js +6 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/modern/index.js +10 -2
- package/modern/locales/coreLocales.js +0 -1
- package/modern/locales/daDK.js +16 -21
- package/modern/locales/esES.js +1 -1
- package/modern/locales/huHU.js +15 -20
- package/modern/locales/jaJP.js +1 -1
- package/modern/locales/nbNO.js +10 -12
- package/modern/locales/nlNL.js +3 -3
- package/modern/locales/ptBR.js +7 -9
- package/modern/locales/ruRU.js +1 -1
- package/modern/locales/svSE.js +2 -2
- package/modern/models/gridColumnGrouping.js +4 -0
- package/modern/models/params/gridRowParams.js +8 -0
- package/modern/utils/createSelector.js +12 -22
- package/node/components/GridAutoSizer.js +3 -1
- package/node/components/GridRow.js +4 -2
- package/node/components/cell/GridCell.js +1 -0
- package/node/components/cell/GridEditDateCell.js +37 -16
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +19 -15
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +33 -33
- package/node/components/panel/GridColumnsPanel.js +18 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/node/components/reexportable.js +4 -4
- package/node/hooks/core/useGridApiInitialization.js +3 -3
- package/node/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +22 -27
- package/node/hooks/features/columns/useGridColumns.js +1 -1
- package/node/hooks/features/editing/useGridCellEditing.js +5 -1
- package/node/hooks/features/editing/useGridEditing.js +1 -3
- package/node/hooks/features/editing/useGridRowEditing.js +5 -1
- package/node/hooks/features/filter/gridFilterState.js +5 -0
- package/node/hooks/features/filter/useGridFilter.js +6 -1
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/node/index.js +7 -7
- package/node/locales/daDK.js +16 -21
- package/node/locales/esES.js +1 -1
- package/node/locales/huHU.js +15 -20
- package/node/locales/jaJP.js +1 -1
- package/node/locales/nbNO.js +10 -12
- package/node/locales/nlNL.js +3 -3
- package/node/locales/ptBR.js +7 -9
- package/node/locales/ruRU.js +1 -1
- package/node/locales/svSE.js +2 -2
- package/node/models/gridColumnGrouping.js +4 -0
- package/node/models/params/gridEditCellParams.js +1 -0
- package/node/models/params/gridRowParams.js +9 -0
- package/node/utils/createSelector.js +12 -22
- package/package.json +1 -1
- package/utils/createSelector.d.ts +4 -4
- package/utils/createSelector.js +14 -22
|
@@ -436,7 +436,7 @@ const useGridVirtualScroller = props => {
|
|
|
436
436
|
prevRootRowStyle.current = rootRowStyle;
|
|
437
437
|
return rows;
|
|
438
438
|
};
|
|
439
|
-
const needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth
|
|
439
|
+
const needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth >= containerDimensions.width;
|
|
440
440
|
const contentSize = React.useMemo(() => {
|
|
441
441
|
// In cases where the columns exceed the available width,
|
|
442
442
|
// the horizontal scrollbar should be shown even when there're no rows.
|
package/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid v6.0
|
|
2
|
+
* @mui/x-data-grid v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -16,19 +16,19 @@ var _exportNames = {
|
|
|
16
16
|
useGridRootProps: true,
|
|
17
17
|
GridColumnHeaders: true,
|
|
18
18
|
GridColumnMenu: true,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
GRID_COLUMN_MENU_SLOTS: true,
|
|
20
|
+
GRID_COLUMN_MENU_SLOT_PROPS: true
|
|
21
21
|
};
|
|
22
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
|
|
23
23
|
enumerable: true,
|
|
24
24
|
get: function () {
|
|
25
|
-
return _reexportable.
|
|
25
|
+
return _reexportable.GRID_COLUMN_MENU_SLOTS;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
Object.defineProperty(exports, "
|
|
28
|
+
Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
|
|
29
29
|
enumerable: true,
|
|
30
30
|
get: function () {
|
|
31
|
-
return _reexportable.
|
|
31
|
+
return _reexportable.GRID_COLUMN_MENU_SLOT_PROPS;
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "GridColumnHeaders", {
|
package/node/locales/daDK.js
CHANGED
|
@@ -26,17 +26,15 @@ const daDKGrid = {
|
|
|
26
26
|
toolbarFiltersTooltipShow: 'Vis filtre',
|
|
27
27
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `${count} aktivt filter`,
|
|
28
28
|
// Quick filter toolbar field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
toolbarQuickFilterPlaceholder: 'Søg…',
|
|
30
|
+
toolbarQuickFilterLabel: 'Søg',
|
|
31
|
+
toolbarQuickFilterDeleteIconLabel: 'Ryd',
|
|
33
32
|
// Export selector toolbar button text
|
|
34
|
-
|
|
33
|
+
toolbarExport: 'Eksport',
|
|
35
34
|
toolbarExportLabel: 'Eksporter',
|
|
36
35
|
toolbarExportCSV: 'Download som CSV',
|
|
37
36
|
toolbarExportPrint: 'Print',
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
toolbarExportExcel: 'Download som Excel',
|
|
40
38
|
// Columns panel text
|
|
41
39
|
columnsPanelTextFieldLabel: 'Find kolonne',
|
|
42
40
|
columnsPanelTextFieldPlaceholder: 'Kolonne titel',
|
|
@@ -45,7 +43,7 @@ const daDKGrid = {
|
|
|
45
43
|
columnsPanelHideAllButton: 'Skjul alle',
|
|
46
44
|
// Filter panel text
|
|
47
45
|
filterPanelAddFilter: 'Tilføj filter',
|
|
48
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Fjern alle',
|
|
49
47
|
filterPanelDeleteIconLabel: 'Slet',
|
|
50
48
|
filterPanelLogicOperator: 'Logisk operator',
|
|
51
49
|
filterPanelOperator: 'Operatorer',
|
|
@@ -75,7 +73,7 @@ const daDKGrid = {
|
|
|
75
73
|
// Column menu text
|
|
76
74
|
columnMenuLabel: 'Menu',
|
|
77
75
|
columnMenuShowColumns: 'Vis Kolonner',
|
|
78
|
-
|
|
76
|
+
columnMenuManageColumns: 'Administrer kolonner',
|
|
79
77
|
columnMenuFilter: 'Filtre',
|
|
80
78
|
columnMenuHideColumn: 'Skjul',
|
|
81
79
|
columnMenuUnsort: 'Fjern sortering',
|
|
@@ -115,21 +113,18 @@ const daDKGrid = {
|
|
|
115
113
|
groupColumn: name => `Gruppér efter ${name}`,
|
|
116
114
|
unGroupColumn: name => `Fjern gruppéring efter ${name}`,
|
|
117
115
|
// Master/detail
|
|
118
|
-
|
|
116
|
+
detailPanelToggle: 'Udvid/kollaps detaljepanel',
|
|
119
117
|
expandDetailPanel: 'Udvid',
|
|
120
|
-
collapseDetailPanel: 'Kollaps'
|
|
121
|
-
|
|
118
|
+
collapseDetailPanel: 'Kollaps',
|
|
122
119
|
// Row reordering text
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
rowReorderingHeaderName: 'Omarrangering af rækker',
|
|
125
121
|
// Aggregation
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
aggregationMenuItemHeader: 'Aggregation',
|
|
123
|
+
aggregationFunctionLabelSum: 'sum',
|
|
124
|
+
aggregationFunctionLabelAvg: 'gns',
|
|
125
|
+
aggregationFunctionLabelMin: 'min',
|
|
126
|
+
aggregationFunctionLabelMax: 'max',
|
|
127
|
+
aggregationFunctionLabelSize: 'størrelse'
|
|
132
128
|
};
|
|
133
|
-
|
|
134
129
|
const daDK = (0, _getGridLocalization.getGridLocalization)(daDKGrid, _locale.daDK);
|
|
135
130
|
exports.daDK = daDK;
|
package/node/locales/esES.js
CHANGED
|
@@ -73,7 +73,7 @@ const esESGrid = {
|
|
|
73
73
|
// Column menu text
|
|
74
74
|
columnMenuLabel: 'Menú',
|
|
75
75
|
columnMenuShowColumns: 'Mostrar columnas',
|
|
76
|
-
|
|
76
|
+
columnMenuManageColumns: 'Administrar columnas',
|
|
77
77
|
columnMenuFilter: 'Filtro',
|
|
78
78
|
columnMenuHideColumn: 'Ocultar',
|
|
79
79
|
columnMenuUnsort: 'Desordenar',
|
package/node/locales/huHU.js
CHANGED
|
@@ -26,17 +26,15 @@ const huHUGrid = {
|
|
|
26
26
|
toolbarFiltersTooltipShow: 'Szűrők megjelenítése',
|
|
27
27
|
toolbarFiltersTooltipActive: count => `${count} aktív szűrő`,
|
|
28
28
|
// Quick filter toolbar field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
toolbarQuickFilterPlaceholder: 'Keresés…',
|
|
30
|
+
toolbarQuickFilterLabel: 'Keresés',
|
|
31
|
+
toolbarQuickFilterDeleteIconLabel: 'Törlés',
|
|
33
32
|
// Export selector toolbar button text
|
|
34
33
|
toolbarExport: 'Exportálás',
|
|
35
34
|
toolbarExportLabel: 'Exportálás',
|
|
36
35
|
toolbarExportCSV: 'Mentés CSV fájlként',
|
|
37
36
|
toolbarExportPrint: 'Nyomtatás',
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
toolbarExportExcel: 'Mentés Excel fájlként',
|
|
40
38
|
// Columns panel text
|
|
41
39
|
columnsPanelTextFieldLabel: 'Oszlop keresése',
|
|
42
40
|
columnsPanelTextFieldPlaceholder: 'Oszlop neve',
|
|
@@ -45,7 +43,7 @@ const huHUGrid = {
|
|
|
45
43
|
columnsPanelHideAllButton: 'Összes elrejtése',
|
|
46
44
|
// Filter panel text
|
|
47
45
|
filterPanelAddFilter: 'Szűrő hozzáadása',
|
|
48
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Összes törlése',
|
|
49
47
|
filterPanelDeleteIconLabel: 'Törlés',
|
|
50
48
|
filterPanelLogicOperator: 'Logikai operátor',
|
|
51
49
|
filterPanelOperator: 'Operátorok',
|
|
@@ -75,7 +73,7 @@ const huHUGrid = {
|
|
|
75
73
|
// Column menu text
|
|
76
74
|
columnMenuLabel: 'Menü',
|
|
77
75
|
columnMenuShowColumns: 'Oszlopok megjelenítése',
|
|
78
|
-
|
|
76
|
+
columnMenuManageColumns: 'Oszlopok kezelése',
|
|
79
77
|
columnMenuFilter: 'Szűrők',
|
|
80
78
|
columnMenuHideColumn: 'Elrejtés',
|
|
81
79
|
columnMenuUnsort: 'Sorrend visszaállítása',
|
|
@@ -115,21 +113,18 @@ const huHUGrid = {
|
|
|
115
113
|
groupColumn: name => `Csoportosítás ${name} szerint`,
|
|
116
114
|
unGroupColumn: name => `${name} szerinti csoportosítás törlése`,
|
|
117
115
|
// Master/detail
|
|
118
|
-
|
|
116
|
+
detailPanelToggle: 'Részletek panel váltása',
|
|
119
117
|
expandDetailPanel: 'Kibontás',
|
|
120
|
-
collapseDetailPanel: 'Összecsukás'
|
|
121
|
-
|
|
118
|
+
collapseDetailPanel: 'Összecsukás',
|
|
122
119
|
// Row reordering text
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
rowReorderingHeaderName: 'Sorok újrarendezése',
|
|
125
121
|
// Aggregation
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
aggregationMenuItemHeader: 'Összesítés',
|
|
123
|
+
aggregationFunctionLabelSum: 'Összeg',
|
|
124
|
+
aggregationFunctionLabelAvg: 'Átlag',
|
|
125
|
+
aggregationFunctionLabelMin: 'Minimum',
|
|
126
|
+
aggregationFunctionLabelMax: 'Maximum',
|
|
127
|
+
aggregationFunctionLabelSize: 'Darabszám'
|
|
132
128
|
};
|
|
133
|
-
|
|
134
129
|
const huHU = (0, _getGridLocalization.getGridLocalization)(huHUGrid, _locale.huHU);
|
|
135
130
|
exports.huHU = huHU;
|
package/node/locales/jaJP.js
CHANGED
|
@@ -43,7 +43,7 @@ const jaJPGrid = {
|
|
|
43
43
|
columnsPanelHideAllButton: 'すべて非表示',
|
|
44
44
|
// Filter panel text
|
|
45
45
|
filterPanelAddFilter: 'フィルター追加',
|
|
46
|
-
|
|
46
|
+
filterPanelRemoveAll: 'すべて削除',
|
|
47
47
|
filterPanelDeleteIconLabel: '削除',
|
|
48
48
|
filterPanelLogicOperator: '論理演算子',
|
|
49
49
|
filterPanelOperator: '演算子',
|
package/node/locales/nbNO.js
CHANGED
|
@@ -43,7 +43,7 @@ const nbNOGrid = {
|
|
|
43
43
|
columnsPanelHideAllButton: 'Skjul alle',
|
|
44
44
|
// Filter panel text
|
|
45
45
|
filterPanelAddFilter: 'Legg til filter',
|
|
46
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Fjern alle',
|
|
47
47
|
filterPanelDeleteIconLabel: 'Slett',
|
|
48
48
|
filterPanelLogicOperator: 'Logisk operator',
|
|
49
49
|
filterPanelOperator: 'Operatører',
|
|
@@ -73,7 +73,7 @@ const nbNOGrid = {
|
|
|
73
73
|
// Column menu text
|
|
74
74
|
columnMenuLabel: 'Meny',
|
|
75
75
|
columnMenuShowColumns: 'Vis kolonner',
|
|
76
|
-
|
|
76
|
+
columnMenuManageColumns: 'Administrer kolonner',
|
|
77
77
|
columnMenuFilter: 'Filter',
|
|
78
78
|
columnMenuHideColumn: 'Skjul',
|
|
79
79
|
columnMenuUnsort: 'Usorter',
|
|
@@ -113,20 +113,18 @@ const nbNOGrid = {
|
|
|
113
113
|
groupColumn: name => `Grupper på ${name}`,
|
|
114
114
|
unGroupColumn: name => `Stopp å grupper på ${name}`,
|
|
115
115
|
// Master/detail
|
|
116
|
-
|
|
116
|
+
detailPanelToggle: 'Utvid/kollaps detalj panel',
|
|
117
117
|
expandDetailPanel: 'Utvid',
|
|
118
118
|
collapseDetailPanel: 'Kollaps',
|
|
119
119
|
// Row reordering text
|
|
120
|
-
rowReorderingHeaderName: 'Rad reorganisering'
|
|
121
|
-
|
|
120
|
+
rowReorderingHeaderName: 'Rad reorganisering',
|
|
122
121
|
// Aggregation
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
aggregationMenuItemHeader: 'Aggregering',
|
|
123
|
+
aggregationFunctionLabelSum: 'sum',
|
|
124
|
+
aggregationFunctionLabelAvg: 'snitt',
|
|
125
|
+
aggregationFunctionLabelMin: 'min',
|
|
126
|
+
aggregationFunctionLabelMax: 'maks',
|
|
127
|
+
aggregationFunctionLabelSize: 'størrelse'
|
|
129
128
|
};
|
|
130
|
-
|
|
131
129
|
const nbNO = (0, _getGridLocalization.getGridLocalization)(nbNOGrid, _locale.nbNO);
|
|
132
130
|
exports.nbNO = nbNO;
|
package/node/locales/nlNL.js
CHANGED
|
@@ -43,7 +43,7 @@ const nlNLGrid = {
|
|
|
43
43
|
columnsPanelHideAllButton: 'Alles verbergen',
|
|
44
44
|
// Filter panel text
|
|
45
45
|
filterPanelAddFilter: 'Filter toevoegen',
|
|
46
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Alles verwijderen',
|
|
47
47
|
filterPanelDeleteIconLabel: 'Verwijderen',
|
|
48
48
|
filterPanelLogicOperator: 'Logische operator',
|
|
49
49
|
filterPanelOperator: 'Operatoren',
|
|
@@ -73,7 +73,7 @@ const nlNLGrid = {
|
|
|
73
73
|
// Column menu text
|
|
74
74
|
columnMenuLabel: 'Menu',
|
|
75
75
|
columnMenuShowColumns: 'Toon kolommen',
|
|
76
|
-
|
|
76
|
+
columnMenuManageColumns: 'Kolommen beheren',
|
|
77
77
|
columnMenuFilter: 'Filteren',
|
|
78
78
|
columnMenuHideColumn: 'Verbergen',
|
|
79
79
|
columnMenuUnsort: 'Annuleer sortering',
|
|
@@ -113,7 +113,7 @@ const nlNLGrid = {
|
|
|
113
113
|
groupColumn: name => `Groepeer op ${name}`,
|
|
114
114
|
unGroupColumn: name => `Stop groeperen op ${name}`,
|
|
115
115
|
// Master/detail
|
|
116
|
-
|
|
116
|
+
detailPanelToggle: 'Detailmenu in- of uitklappen',
|
|
117
117
|
expandDetailPanel: 'Uitklappen',
|
|
118
118
|
collapseDetailPanel: 'Inklappen',
|
|
119
119
|
// Row reordering text
|
package/node/locales/ptBR.js
CHANGED
|
@@ -117,16 +117,14 @@ const ptBRGrid = {
|
|
|
117
117
|
expandDetailPanel: 'Expandir',
|
|
118
118
|
collapseDetailPanel: 'Esconder',
|
|
119
119
|
// Row reordering text
|
|
120
|
-
rowReorderingHeaderName: 'Reorganizar linhas'
|
|
121
|
-
|
|
120
|
+
rowReorderingHeaderName: 'Reorganizar linhas',
|
|
122
121
|
// Aggregation
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
aggregationMenuItemHeader: 'Agrupar',
|
|
123
|
+
aggregationFunctionLabelSum: 'soma',
|
|
124
|
+
aggregationFunctionLabelAvg: 'média',
|
|
125
|
+
aggregationFunctionLabelMin: 'mín',
|
|
126
|
+
aggregationFunctionLabelMax: 'máx',
|
|
127
|
+
aggregationFunctionLabelSize: 'tamanho'
|
|
129
128
|
};
|
|
130
|
-
|
|
131
129
|
const ptBR = (0, _getGridLocalization.getGridLocalization)(ptBRGrid, _locale.ptBR);
|
|
132
130
|
exports.ptBR = ptBR;
|
package/node/locales/ruRU.js
CHANGED
|
@@ -82,7 +82,7 @@ const ruRUGrid = {
|
|
|
82
82
|
// Column menu text
|
|
83
83
|
columnMenuLabel: 'Меню',
|
|
84
84
|
columnMenuShowColumns: 'Показать столбцы',
|
|
85
|
-
|
|
85
|
+
columnMenuManageColumns: 'Управление колонками',
|
|
86
86
|
columnMenuFilter: 'Фильтр',
|
|
87
87
|
columnMenuHideColumn: 'Скрыть',
|
|
88
88
|
columnMenuUnsort: 'Отменить сортировку',
|
package/node/locales/svSE.js
CHANGED
|
@@ -43,7 +43,7 @@ const svSEGrid = {
|
|
|
43
43
|
columnsPanelHideAllButton: 'Dölj alla',
|
|
44
44
|
// Filter panel text
|
|
45
45
|
filterPanelAddFilter: 'Lägg till filter',
|
|
46
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Ta bort alla',
|
|
47
47
|
filterPanelDeleteIconLabel: 'Ta bort',
|
|
48
48
|
filterPanelLogicOperator: 'Logisk operatör',
|
|
49
49
|
filterPanelOperator: 'Operatör',
|
|
@@ -73,7 +73,7 @@ const svSEGrid = {
|
|
|
73
73
|
// Column menu text
|
|
74
74
|
columnMenuLabel: 'Meny',
|
|
75
75
|
columnMenuShowColumns: 'Visa kolumner',
|
|
76
|
-
|
|
76
|
+
columnMenuManageColumns: 'Hantera kolumner',
|
|
77
77
|
columnMenuFilter: 'Filtrera',
|
|
78
78
|
columnMenuHideColumn: 'Dölj',
|
|
79
79
|
columnMenuUnsort: 'Osortera',
|
|
@@ -29,4 +29,5 @@ var GridCellEditStopReasons = /*#__PURE__*/function (GridCellEditStopReasons) {
|
|
|
29
29
|
/**
|
|
30
30
|
* Params passed to the `cellEditStop event.
|
|
31
31
|
*/
|
|
32
|
+
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
|
|
32
33
|
exports.GridCellEditStopReasons = GridCellEditStopReasons;
|
|
@@ -39,4 +39,13 @@ var GridRowEditStopReasons = /*#__PURE__*/function (GridRowEditStopReasons) {
|
|
|
39
39
|
GridRowEditStopReasons["shiftTabKeyDown"] = "shiftTabKeyDown";
|
|
40
40
|
return GridRowEditStopReasons;
|
|
41
41
|
}(GridRowEditStopReasons || {});
|
|
42
|
+
/**
|
|
43
|
+
* Object passed as parameter in the row `getRowSpacing` callback prop.
|
|
44
|
+
* @demos
|
|
45
|
+
* - [Row spacing](/x/react-data-grid/row-height/#row-spacing)
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* The getRowSpacing return value.
|
|
49
|
+
*/
|
|
50
|
+
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
|
|
42
51
|
exports.GridRowEditStopReasons = GridRowEditStopReasons;
|
|
@@ -7,39 +7,35 @@ exports.unstable_resetCreateSelectorCache = exports.createSelector = void 0;
|
|
|
7
7
|
var _reselect = require("reselect");
|
|
8
8
|
var _warning = require("./warning");
|
|
9
9
|
const cacheContainer = {
|
|
10
|
-
cache:
|
|
10
|
+
cache: new WeakMap()
|
|
11
11
|
};
|
|
12
12
|
const missingInstanceIdWarning = (0, _warning.buildWarning)(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`.']);
|
|
13
13
|
const createSelector = (...args) => {
|
|
14
|
-
if (cacheContainer.cache === null) {
|
|
15
|
-
cacheContainer.cache = {};
|
|
16
|
-
}
|
|
17
14
|
const selector = (...selectorArgs) => {
|
|
18
15
|
const [stateOrApiRef, instanceId] = selectorArgs;
|
|
19
16
|
const isApiRef = !!stateOrApiRef.current;
|
|
20
|
-
const cacheKey = isApiRef ? stateOrApiRef.current.instanceId : instanceId ??
|
|
17
|
+
const cacheKey = isApiRef ? stateOrApiRef.current.instanceId : instanceId ?? {
|
|
18
|
+
id: 'default'
|
|
19
|
+
};
|
|
21
20
|
const state = isApiRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
22
21
|
if (process.env.NODE_ENV !== 'production') {
|
|
23
|
-
if (cacheKey === 'default') {
|
|
22
|
+
if (cacheKey.id === 'default') {
|
|
24
23
|
missingInstanceIdWarning();
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
if (cacheContainer.cache === null) {
|
|
28
|
-
cacheContainer.cache = {};
|
|
29
|
-
}
|
|
30
26
|
const {
|
|
31
27
|
cache
|
|
32
28
|
} = cacheContainer;
|
|
33
|
-
if (cache
|
|
29
|
+
if (cache.get(cacheKey) && cache.get(cacheKey)?.get(args)) {
|
|
34
30
|
// We pass the cache key because the called selector might have as
|
|
35
31
|
// dependency another selector created with this `createSelector`.
|
|
36
|
-
return cache
|
|
32
|
+
return cache.get(cacheKey)?.get(args)(state, cacheKey);
|
|
37
33
|
}
|
|
38
34
|
const newSelector = (0, _reselect.createSelector)(...args);
|
|
39
|
-
if (!cache
|
|
40
|
-
cache
|
|
35
|
+
if (!cache.get(cacheKey)) {
|
|
36
|
+
cache.set(cacheKey, new Map());
|
|
41
37
|
}
|
|
42
|
-
cache
|
|
38
|
+
cache.get(cacheKey)?.set(args, newSelector);
|
|
43
39
|
return newSelector(state, cacheKey);
|
|
44
40
|
};
|
|
45
41
|
|
|
@@ -51,13 +47,7 @@ const createSelector = (...args) => {
|
|
|
51
47
|
|
|
52
48
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
53
49
|
exports.createSelector = createSelector;
|
|
54
|
-
const unstable_resetCreateSelectorCache =
|
|
55
|
-
|
|
56
|
-
if (cacheContainer.cache && cacheContainer.cache[cacheKey]) {
|
|
57
|
-
delete cacheContainer.cache[cacheKey];
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
cacheContainer.cache = null;
|
|
61
|
-
}
|
|
50
|
+
const unstable_resetCreateSelectorCache = () => {
|
|
51
|
+
cacheContainer.cache = new WeakMap();
|
|
62
52
|
};
|
|
63
53
|
exports.unstable_resetCreateSelectorCache = unstable_resetCreateSelectorCache;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Selector, SelectorResultArray } from 'reselect';
|
|
3
|
-
type
|
|
3
|
+
import type { GridCoreApi } from '../models/api/gridCoreApi';
|
|
4
4
|
export interface OutputSelector<State, Result> {
|
|
5
5
|
(apiRef: React.MutableRefObject<{
|
|
6
6
|
state: State;
|
|
7
|
-
instanceId:
|
|
7
|
+
instanceId: GridCoreApi['instanceId'];
|
|
8
8
|
}>): Result;
|
|
9
|
-
(state: State, instanceId?:
|
|
9
|
+
(state: State, instanceId?: GridCoreApi['instanceId']): Result;
|
|
10
10
|
acceptsApiRef: boolean;
|
|
11
11
|
}
|
|
12
12
|
type StateFromSelector<T> = T extends (first: infer F, ...args: any[]) => any ? F extends {
|
|
@@ -19,5 +19,5 @@ type StateFromSelectorList<Selectors extends readonly any[]> = Selectors extends
|
|
|
19
19
|
type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Result> = [selectors: [...Selectors], combiner: (...args: SelectorResultArray<Selectors>) => Result] | [...Selectors, (...args: SelectorResultArray<Selectors>) => Result];
|
|
20
20
|
type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Result>(...items: SelectorArgs<Selectors, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Result>;
|
|
21
21
|
export declare const createSelector: CreateSelectorFunction;
|
|
22
|
-
export declare const unstable_resetCreateSelectorCache: (
|
|
22
|
+
export declare const unstable_resetCreateSelectorCache: () => void;
|
|
23
23
|
export {};
|
package/utils/createSelector.js
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { createSelector as reselectCreateSelector } from 'reselect';
|
|
2
2
|
import { buildWarning } from './warning';
|
|
3
3
|
const cacheContainer = {
|
|
4
|
-
cache:
|
|
4
|
+
cache: new WeakMap()
|
|
5
5
|
};
|
|
6
6
|
const missingInstanceIdWarning = buildWarning(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`.']);
|
|
7
7
|
export const createSelector = (...args) => {
|
|
8
|
-
if (cacheContainer.cache === null) {
|
|
9
|
-
cacheContainer.cache = {};
|
|
10
|
-
}
|
|
11
8
|
const selector = (...selectorArgs) => {
|
|
9
|
+
var _cache$get, _cache$get3;
|
|
12
10
|
const [stateOrApiRef, instanceId] = selectorArgs;
|
|
13
11
|
const isApiRef = !!stateOrApiRef.current;
|
|
14
|
-
const cacheKey = isApiRef ? stateOrApiRef.current.instanceId : instanceId != null ? instanceId :
|
|
12
|
+
const cacheKey = isApiRef ? stateOrApiRef.current.instanceId : instanceId != null ? instanceId : {
|
|
13
|
+
id: 'default'
|
|
14
|
+
};
|
|
15
15
|
const state = isApiRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
16
16
|
if (process.env.NODE_ENV !== 'production') {
|
|
17
|
-
if (cacheKey === 'default') {
|
|
17
|
+
if (cacheKey.id === 'default') {
|
|
18
18
|
missingInstanceIdWarning();
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
if (cacheContainer.cache === null) {
|
|
22
|
-
cacheContainer.cache = {};
|
|
23
|
-
}
|
|
24
21
|
const {
|
|
25
22
|
cache
|
|
26
23
|
} = cacheContainer;
|
|
27
|
-
if (cache
|
|
24
|
+
if (cache.get(cacheKey) && (_cache$get = cache.get(cacheKey)) != null && _cache$get.get(args)) {
|
|
25
|
+
var _cache$get2;
|
|
28
26
|
// We pass the cache key because the called selector might have as
|
|
29
27
|
// dependency another selector created with this `createSelector`.
|
|
30
|
-
return cache
|
|
28
|
+
return (_cache$get2 = cache.get(cacheKey)) == null ? void 0 : _cache$get2.get(args)(state, cacheKey);
|
|
31
29
|
}
|
|
32
30
|
const newSelector = reselectCreateSelector(...args);
|
|
33
|
-
if (!cache
|
|
34
|
-
cache
|
|
31
|
+
if (!cache.get(cacheKey)) {
|
|
32
|
+
cache.set(cacheKey, new Map());
|
|
35
33
|
}
|
|
36
|
-
cache
|
|
34
|
+
(_cache$get3 = cache.get(cacheKey)) == null ? void 0 : _cache$get3.set(args, newSelector);
|
|
37
35
|
return newSelector(state, cacheKey);
|
|
38
36
|
};
|
|
39
37
|
|
|
@@ -44,12 +42,6 @@ export const createSelector = (...args) => {
|
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
47
|
-
export const unstable_resetCreateSelectorCache =
|
|
48
|
-
|
|
49
|
-
if (cacheContainer.cache && cacheContainer.cache[cacheKey]) {
|
|
50
|
-
delete cacheContainer.cache[cacheKey];
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
cacheContainer.cache = null;
|
|
54
|
-
}
|
|
45
|
+
export const unstable_resetCreateSelectorCache = () => {
|
|
46
|
+
cacheContainer.cache = new WeakMap();
|
|
55
47
|
};
|