@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
package/modern/locales/skSK.js
CHANGED
|
@@ -141,6 +141,7 @@ const skSKGrid = {
|
|
|
141
141
|
groupingColumnHeaderName: 'Skupina',
|
|
142
142
|
groupColumn: name => `Zoskupiť podľa ${name}`,
|
|
143
143
|
unGroupColumn: name => `Prestať zoskupovať podľa ${name}` // Master/detail
|
|
144
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
144
145
|
// expandDetailPanel: 'Expand',
|
|
145
146
|
// collapseDetailPanel: 'Collapse',
|
|
146
147
|
// Row reordering text
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { svSE as svSECore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
const svSEGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: 'Inga rader',
|
|
6
|
+
noResultsOverlayLabel: 'Inga resultat funna.',
|
|
7
|
+
errorOverlayDefaultLabel: 'Ett fel uppstod.',
|
|
8
|
+
// Density selector toolbar button text
|
|
9
|
+
toolbarDensity: 'Densitet',
|
|
10
|
+
toolbarDensityLabel: 'Densitet',
|
|
11
|
+
toolbarDensityCompact: 'Kompakt',
|
|
12
|
+
toolbarDensityStandard: 'Standard',
|
|
13
|
+
toolbarDensityComfortable: 'Bekväm',
|
|
14
|
+
// Columns selector toolbar button text
|
|
15
|
+
toolbarColumns: 'Kolumner',
|
|
16
|
+
toolbarColumnsLabel: 'Välj kolumner',
|
|
17
|
+
// Filters toolbar button text
|
|
18
|
+
toolbarFilters: 'Filter',
|
|
19
|
+
toolbarFiltersLabel: 'Visa filter',
|
|
20
|
+
toolbarFiltersTooltipHide: 'Dölj filter',
|
|
21
|
+
toolbarFiltersTooltipShow: 'Visa filter',
|
|
22
|
+
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Sök...',
|
|
25
|
+
toolbarQuickFilterLabel: 'Sök',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Rensa',
|
|
27
|
+
// Export selector toolbar button text
|
|
28
|
+
toolbarExport: 'Exportera',
|
|
29
|
+
toolbarExportLabel: 'Exportera',
|
|
30
|
+
toolbarExportCSV: 'Ladda ner som CSV',
|
|
31
|
+
toolbarExportPrint: 'Skriv ut',
|
|
32
|
+
toolbarExportExcel: 'Ladda ner som Excel',
|
|
33
|
+
// Columns panel text
|
|
34
|
+
columnsPanelTextFieldLabel: 'Hitta kolumn',
|
|
35
|
+
columnsPanelTextFieldPlaceholder: 'Kolumntitel',
|
|
36
|
+
columnsPanelDragIconLabel: 'Ordna om kolumnen',
|
|
37
|
+
columnsPanelShowAllButton: 'Visa alla',
|
|
38
|
+
columnsPanelHideAllButton: 'Dölj alla',
|
|
39
|
+
// Filter panel text
|
|
40
|
+
filterPanelAddFilter: 'Lägg till filter',
|
|
41
|
+
filterPanelDeleteIconLabel: 'Ta bort',
|
|
42
|
+
filterPanelLinkOperator: 'Logisk operatör',
|
|
43
|
+
filterPanelOperators: 'Operatör',
|
|
44
|
+
// TODO v6: rename to filterPanelOperator
|
|
45
|
+
filterPanelOperatorAnd: 'Och',
|
|
46
|
+
filterPanelOperatorOr: 'Eller',
|
|
47
|
+
filterPanelColumns: 'Kolumner',
|
|
48
|
+
filterPanelInputLabel: 'Värde',
|
|
49
|
+
filterPanelInputPlaceholder: 'Filtervärde',
|
|
50
|
+
// Filter operators text
|
|
51
|
+
filterOperatorContains: 'innehåller',
|
|
52
|
+
filterOperatorEquals: 'är lika med',
|
|
53
|
+
filterOperatorStartsWith: 'börjar med',
|
|
54
|
+
filterOperatorEndsWith: 'slutar med',
|
|
55
|
+
filterOperatorIs: 'är',
|
|
56
|
+
filterOperatorNot: 'är inte',
|
|
57
|
+
filterOperatorAfter: 'är efter',
|
|
58
|
+
filterOperatorOnOrAfter: 'är på eller efter',
|
|
59
|
+
filterOperatorBefore: 'är innan',
|
|
60
|
+
filterOperatorOnOrBefore: 'är på eller innan',
|
|
61
|
+
filterOperatorIsEmpty: 'är tom',
|
|
62
|
+
filterOperatorIsNotEmpty: 'är inte tom',
|
|
63
|
+
filterOperatorIsAnyOf: 'är någon av',
|
|
64
|
+
// Filter values text
|
|
65
|
+
filterValueAny: 'något',
|
|
66
|
+
filterValueTrue: 'sant',
|
|
67
|
+
filterValueFalse: 'falskt',
|
|
68
|
+
// Column menu text
|
|
69
|
+
columnMenuLabel: 'Meny',
|
|
70
|
+
columnMenuShowColumns: 'Visa kolumner',
|
|
71
|
+
columnMenuFilter: 'Filtrera',
|
|
72
|
+
columnMenuHideColumn: 'Dölj',
|
|
73
|
+
columnMenuUnsort: 'Osortera',
|
|
74
|
+
columnMenuSortAsc: 'Sortera stigande',
|
|
75
|
+
columnMenuSortDesc: 'Sortera fallande',
|
|
76
|
+
// Column header text
|
|
77
|
+
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
|
78
|
+
columnHeaderFiltersLabel: 'Visa filter',
|
|
79
|
+
columnHeaderSortIconLabel: 'Sortera',
|
|
80
|
+
// Rows selected footer text
|
|
81
|
+
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rader markerade` : `${count.toLocaleString()} rad markerad`,
|
|
82
|
+
// Total row amount footer text
|
|
83
|
+
footerTotalRows: 'Totalt antal rader:',
|
|
84
|
+
// Total visible row amount footer text
|
|
85
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
|
86
|
+
// Checkbox selection text
|
|
87
|
+
checkboxSelectionHeaderName: 'Markering med kryssruta',
|
|
88
|
+
checkboxSelectionSelectAllRows: 'Markera alla rader',
|
|
89
|
+
checkboxSelectionUnselectAllRows: 'Avmarkera alla rader',
|
|
90
|
+
checkboxSelectionSelectRow: 'Markera rad',
|
|
91
|
+
checkboxSelectionUnselectRow: 'Avmarkera rad',
|
|
92
|
+
// Boolean cell text
|
|
93
|
+
booleanCellTrueLabel: 'ja',
|
|
94
|
+
booleanCellFalseLabel: 'nej',
|
|
95
|
+
// Actions cell more text
|
|
96
|
+
actionsCellMore: 'mer',
|
|
97
|
+
// Column pinning text
|
|
98
|
+
pinToLeft: 'Fäst till vänster',
|
|
99
|
+
pinToRight: 'Fäst till höger',
|
|
100
|
+
unpin: 'Ta bort fäste',
|
|
101
|
+
// Tree Data
|
|
102
|
+
treeDataGroupingHeaderName: 'Grupp',
|
|
103
|
+
treeDataExpand: 'visa underordnade',
|
|
104
|
+
treeDataCollapse: 'dölj underordnade',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: 'Grupp',
|
|
107
|
+
groupColumn: name => `Gruppera efter ${name}`,
|
|
108
|
+
unGroupColumn: name => `Sluta gruppera efter ${name}`,
|
|
109
|
+
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
111
|
+
expandDetailPanel: 'Expandera',
|
|
112
|
+
collapseDetailPanel: 'Kollapsa',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'Ordna om rader'
|
|
115
|
+
};
|
|
116
|
+
export const svSE = getGridLocalization(svSEGrid, svSECore);
|
package/modern/locales/trTR.js
CHANGED
|
@@ -107,6 +107,7 @@ const trTRGrid = {
|
|
|
107
107
|
groupColumn: name => `${name} için grupla`,
|
|
108
108
|
unGroupColumn: name => `${name} için gruplamayı kaldır`,
|
|
109
109
|
// Master/detail
|
|
110
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
110
111
|
expandDetailPanel: 'Genişlet',
|
|
111
112
|
collapseDetailPanel: 'Gizle' // Row reordering text
|
|
112
113
|
// rowReorderingHeaderName: 'Row reordering',
|
package/modern/locales/ukUA.js
CHANGED
|
@@ -132,6 +132,7 @@ const ukUAGrid = {
|
|
|
132
132
|
// groupColumn: name => `Group by ${name}`,
|
|
133
133
|
// unGroupColumn: name => `Stop grouping by ${name}`,
|
|
134
134
|
// Master/detail
|
|
135
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
135
136
|
// expandDetailPanel: 'Expand',
|
|
136
137
|
// collapseDetailPanel: 'Collapse',
|
|
137
138
|
// Row reordering text
|
package/modern/locales/viVN.js
CHANGED
|
@@ -106,6 +106,7 @@ const viVNGrid = {
|
|
|
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/zhCN.js
CHANGED
|
@@ -106,6 +106,7 @@ const zhCNGrid = {
|
|
|
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
|
|
@@ -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.GRID_CHECKBOX_SELECTION_COL_DEF = void 0;
|
|
8
|
+
exports.GRID_CHECKBOX_SELECTION_FIELD = exports.GRID_CHECKBOX_SELECTION_COL_DEF = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -25,8 +25,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
29
|
+
exports.GRID_CHECKBOX_SELECTION_FIELD = GRID_CHECKBOX_SELECTION_FIELD;
|
|
28
30
|
const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanColDef.GRID_BOOLEAN_COL_DEF, {
|
|
29
|
-
field:
|
|
31
|
+
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
30
32
|
type: 'checkboxSelection',
|
|
31
33
|
width: 50,
|
|
32
34
|
resizable: false,
|
|
@@ -25,7 +25,7 @@ const GRID_NUMERIC_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
25
25
|
valueParser: value => value === '' ? null : Number(value),
|
|
26
26
|
valueFormatter: ({
|
|
27
27
|
value
|
|
28
|
-
}) =>
|
|
28
|
+
}) => (0, _utils.isNumber)(value) ? value.toLocaleString() : value || '',
|
|
29
29
|
filterOperators: (0, _gridNumericOperators.getGridNumericOperators)(),
|
|
30
30
|
getApplyQuickFilterFn: _gridNumericOperators.getGridNumericQuickFilterFn
|
|
31
31
|
});
|
|
@@ -19,6 +19,8 @@ var _gridClasses = require("../../constants/gridClasses");
|
|
|
19
19
|
|
|
20
20
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
21
21
|
|
|
22
|
+
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
23
|
+
|
|
22
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
25
|
|
|
24
26
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex", "getValue"];
|
|
@@ -39,10 +41,10 @@ const useUtilityClasses = ownerState => {
|
|
|
39
41
|
|
|
40
42
|
const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
41
43
|
const {
|
|
42
|
-
value
|
|
43
|
-
api
|
|
44
|
+
value
|
|
44
45
|
} = props,
|
|
45
46
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
47
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
46
48
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
47
49
|
const ownerState = {
|
|
48
50
|
classes: rootProps.classes
|
|
@@ -52,7 +54,7 @@ const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
|
52
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, (0, _extends2.default)({
|
|
53
55
|
fontSize: "small",
|
|
54
56
|
className: classes.root,
|
|
55
|
-
titleAccess:
|
|
57
|
+
titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
|
|
56
58
|
"data-value": Boolean(value)
|
|
57
59
|
}, other));
|
|
58
60
|
});
|
|
@@ -26,6 +26,8 @@ var _gridClasses = require("../../constants/gridClasses");
|
|
|
26
26
|
|
|
27
27
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
28
28
|
|
|
29
|
+
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
30
|
+
|
|
29
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
32
|
|
|
31
33
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "getValue", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange"];
|
|
@@ -50,13 +52,13 @@ function GridEditBooleanCell(props) {
|
|
|
50
52
|
const {
|
|
51
53
|
id: idProp,
|
|
52
54
|
value,
|
|
53
|
-
api,
|
|
54
55
|
field,
|
|
55
56
|
className,
|
|
56
57
|
hasFocus,
|
|
57
58
|
onValueChange
|
|
58
59
|
} = props,
|
|
59
60
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
61
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
60
62
|
const inputRef = React.useRef(null);
|
|
61
63
|
const id = (0, _utils.unstable_useId)();
|
|
62
64
|
const [valueState, setValueState] = React.useState(value);
|
|
@@ -73,12 +75,12 @@ function GridEditBooleanCell(props) {
|
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
setValueState(newValue);
|
|
76
|
-
await
|
|
78
|
+
await apiRef.current.setEditCellValue({
|
|
77
79
|
id: idProp,
|
|
78
80
|
field,
|
|
79
81
|
value: newValue
|
|
80
82
|
}, event);
|
|
81
|
-
}, [
|
|
83
|
+
}, [apiRef, field, idProp, onValueChange]);
|
|
82
84
|
React.useEffect(() => {
|
|
83
85
|
setValueState(value);
|
|
84
86
|
}, [value]);
|
|
@@ -26,6 +26,8 @@ var _gridClasses = require("../../constants/gridClasses");
|
|
|
26
26
|
|
|
27
27
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
28
28
|
|
|
29
|
+
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
30
|
+
|
|
29
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
32
|
|
|
31
33
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "getValue", "inputProps", "isValidating", "isProcessingProps", "onValueChange"];
|
|
@@ -48,7 +50,6 @@ function GridEditDateCell(props) {
|
|
|
48
50
|
const {
|
|
49
51
|
id,
|
|
50
52
|
value: valueProp,
|
|
51
|
-
api,
|
|
52
53
|
field,
|
|
53
54
|
colDef,
|
|
54
55
|
hasFocus,
|
|
@@ -57,6 +58,7 @@ function GridEditDateCell(props) {
|
|
|
57
58
|
} = props,
|
|
58
59
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
59
60
|
const isDateTime = colDef.type === 'dateTime';
|
|
61
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
60
62
|
const inputRef = React.useRef();
|
|
61
63
|
const valueTransformed = React.useMemo(() => {
|
|
62
64
|
let parsedDate;
|
|
@@ -116,12 +118,12 @@ function GridEditDateCell(props) {
|
|
|
116
118
|
parsed: newParsedDate,
|
|
117
119
|
formatted: newFormattedDate
|
|
118
120
|
});
|
|
119
|
-
|
|
121
|
+
apiRef.current.setEditCellValue({
|
|
120
122
|
id,
|
|
121
123
|
field,
|
|
122
124
|
value: newParsedDate
|
|
123
125
|
}, event);
|
|
124
|
-
}, [
|
|
126
|
+
}, [apiRef, field, id, onValueChange]);
|
|
125
127
|
React.useEffect(() => {
|
|
126
128
|
setValueState(state => {
|
|
127
129
|
var _valueTransformed$par, _state$parsed;
|
|
@@ -32,6 +32,8 @@ var _index = require("../icons/index");
|
|
|
32
32
|
|
|
33
33
|
var _GridFilterInputValue = require("../panel/filterPanel/GridFilterInputValue");
|
|
34
34
|
|
|
35
|
+
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
36
|
+
|
|
35
37
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
36
38
|
|
|
37
39
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "getValue", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
|
|
@@ -71,7 +73,6 @@ function GridEditInputCell(props) {
|
|
|
71
73
|
const {
|
|
72
74
|
id,
|
|
73
75
|
value,
|
|
74
|
-
api,
|
|
75
76
|
field,
|
|
76
77
|
colDef,
|
|
77
78
|
hasFocus,
|
|
@@ -80,6 +81,7 @@ function GridEditInputCell(props) {
|
|
|
80
81
|
onValueChange
|
|
81
82
|
} = props,
|
|
82
83
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
84
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
83
85
|
const inputRef = React.useRef();
|
|
84
86
|
const [valueState, setValueState] = React.useState(value);
|
|
85
87
|
const ownerState = {
|
|
@@ -94,13 +96,13 @@ function GridEditInputCell(props) {
|
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
setValueState(newValue);
|
|
97
|
-
|
|
99
|
+
apiRef.current.setEditCellValue({
|
|
98
100
|
id,
|
|
99
101
|
field,
|
|
100
102
|
value: newValue,
|
|
101
103
|
debounceMs
|
|
102
104
|
}, event);
|
|
103
|
-
}, [
|
|
105
|
+
}, [apiRef, debounceMs, field, id, onValueChange]);
|
|
104
106
|
React.useEffect(() => {
|
|
105
107
|
setValueState(value);
|
|
106
108
|
}, [value]);
|
|
@@ -28,6 +28,8 @@ var _gridEditRowModel = require("../../models/gridEditRowModel");
|
|
|
28
28
|
|
|
29
29
|
var _filterPanelUtils = require("../panel/filterPanel/filterPanelUtils");
|
|
30
30
|
|
|
31
|
+
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
32
|
+
|
|
31
33
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
34
|
|
|
33
35
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "getValue", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange"];
|
|
@@ -62,6 +64,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
62
64
|
onValueChange
|
|
63
65
|
} = props,
|
|
64
66
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
67
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
65
68
|
const ref = React.useRef();
|
|
66
69
|
const inputRef = React.useRef();
|
|
67
70
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
@@ -110,7 +113,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
110
113
|
await onValueChange(event, formattedTargetValue);
|
|
111
114
|
}
|
|
112
115
|
|
|
113
|
-
const isValid = await
|
|
116
|
+
const isValid = await apiRef.current.setEditCellValue({
|
|
114
117
|
id,
|
|
115
118
|
field,
|
|
116
119
|
value: formattedTargetValue
|
|
@@ -125,18 +128,18 @@ function GridEditSingleSelectCell(props) {
|
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
130
|
|
|
128
|
-
const canCommit = await Promise.resolve(
|
|
131
|
+
const canCommit = await Promise.resolve(apiRef.current.commitCellChange({
|
|
129
132
|
id,
|
|
130
133
|
field
|
|
131
134
|
}, event));
|
|
132
135
|
|
|
133
136
|
if (canCommit) {
|
|
134
|
-
|
|
137
|
+
apiRef.current.setCellMode(id, field, 'view');
|
|
135
138
|
|
|
136
139
|
if (event.key) {
|
|
137
140
|
// TODO v6: remove once we stop ignoring events fired from portals
|
|
138
|
-
const params =
|
|
139
|
-
|
|
141
|
+
const params = apiRef.current.getCellParams(id, field);
|
|
142
|
+
apiRef.current.publishEvent('cellNavigationKeyDown', params, event);
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
};
|
|
@@ -151,13 +154,13 @@ function GridEditSingleSelectCell(props) {
|
|
|
151
154
|
var _rootProps$experiment2;
|
|
152
155
|
|
|
153
156
|
if ((_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.newEditingApi) {
|
|
154
|
-
|
|
157
|
+
apiRef.current.stopCellEditMode({
|
|
155
158
|
id,
|
|
156
159
|
field,
|
|
157
160
|
ignoreModifications: true
|
|
158
161
|
});
|
|
159
162
|
} else {
|
|
160
|
-
|
|
163
|
+
apiRef.current.setCellMode(id, field, 'view');
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
};
|
|
@@ -187,6 +187,7 @@ function GridColumnHeaderItem(props) {
|
|
|
187
187
|
field: column.field,
|
|
188
188
|
colDef: column
|
|
189
189
|
}) : column.headerClassName;
|
|
190
|
+
const label = (_column$headerName = column.headerName) != null ? _column$headerName : column.field;
|
|
190
191
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
191
192
|
ref: headerCellRef,
|
|
192
193
|
className: (0, _clsx.default)(classes.root, headerClassName),
|
|
@@ -199,7 +200,8 @@ function GridColumnHeaderItem(props) {
|
|
|
199
200
|
role: "columnheader",
|
|
200
201
|
tabIndex: tabIndex,
|
|
201
202
|
"aria-colindex": colIndex + 1,
|
|
202
|
-
"aria-sort": ariaSort
|
|
203
|
+
"aria-sort": ariaSort,
|
|
204
|
+
"aria-label": column.renderHeader && headerComponent == null ? label : undefined
|
|
203
205
|
}, mouseEventsHandlers, {
|
|
204
206
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
205
207
|
className: classes.draggableContainer,
|
|
@@ -209,8 +211,8 @@ function GridColumnHeaderItem(props) {
|
|
|
209
211
|
className: classes.titleContainer,
|
|
210
212
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
211
213
|
className: classes.titleContainerContent,
|
|
212
|
-
children: headerComponent
|
|
213
|
-
label:
|
|
214
|
+
children: column.renderHeader ? headerComponent : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderTitle.GridColumnHeaderTitle, {
|
|
215
|
+
label: label,
|
|
214
216
|
description: column.description,
|
|
215
217
|
columnWidth: width
|
|
216
218
|
})
|
|
@@ -176,7 +176,7 @@ const GridRootStyles = (0, _styles.styled)('div', {
|
|
|
176
176
|
minWidth: 0,
|
|
177
177
|
flex: 1,
|
|
178
178
|
whiteSpace: 'nowrap',
|
|
179
|
-
|
|
179
|
+
overflowX: 'hidden'
|
|
180
180
|
},
|
|
181
181
|
[`& .${_gridClasses.gridClasses.columnHeaderTitleContainerContent}`]: {
|
|
182
182
|
overflow: 'hidden',
|
|
@@ -232,6 +232,9 @@ const GridRootStyles = (0, _styles.styled)('div', {
|
|
|
232
232
|
},
|
|
233
233
|
[`&.${_gridClasses.gridClasses['columnSeparator--resizing']}`]: {
|
|
234
234
|
color: theme.palette.text.primary
|
|
235
|
+
},
|
|
236
|
+
'& svg': {
|
|
237
|
+
pointerEvents: 'none'
|
|
235
238
|
}
|
|
236
239
|
},
|
|
237
240
|
[`& .${_gridClasses.gridClasses.iconSeparator}`]: {
|
|
@@ -112,7 +112,7 @@ function GridColumnsPanel(props) {
|
|
|
112
112
|
return apiRef.current.setColumnVisibilityModel({});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.map(col => [col.field, false])));
|
|
115
|
+
return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.filter(col => col.hideable !== false).map(col => [col.field, false])));
|
|
116
116
|
} // TODO v6: Remove
|
|
117
117
|
|
|
118
118
|
|
|
@@ -166,7 +166,6 @@ function GridColumnsPanel(props) {
|
|
|
166
166
|
checked: columnVisibilityModel[column.field] !== false,
|
|
167
167
|
onClick: toggleColumn,
|
|
168
168
|
name: column.field,
|
|
169
|
-
color: "primary",
|
|
170
169
|
size: "small"
|
|
171
170
|
}, (_rootProps$components2 = rootProps.componentsProps) == null ? void 0 : _rootProps$components2.baseSwitch)),
|
|
172
171
|
label: column.headerName || column.field
|
|
@@ -183,13 +182,11 @@ function GridColumnsPanel(props) {
|
|
|
183
182
|
})
|
|
184
183
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridPanelFooter.GridPanelFooter, {
|
|
185
184
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
186
|
-
onClick: () => toggleAllColumns(false)
|
|
187
|
-
color: "primary"
|
|
185
|
+
onClick: () => toggleAllColumns(false)
|
|
188
186
|
}, (_rootProps$components3 = rootProps.componentsProps) == null ? void 0 : _rootProps$components3.baseButton, {
|
|
189
187
|
children: apiRef.current.getLocaleText('columnsPanelHideAllButton')
|
|
190
188
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
191
|
-
onClick: () => toggleAllColumns(true)
|
|
192
|
-
color: "primary"
|
|
189
|
+
onClick: () => toggleAllColumns(true)
|
|
193
190
|
}, (_rootProps$components4 = rootProps.componentsProps) == null ? void 0 : _rootProps$components4.baseButton, {
|
|
194
191
|
children: apiRef.current.getLocaleText('columnsPanelShowAllButton')
|
|
195
192
|
}))]
|
|
@@ -48,9 +48,17 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
48
48
|
const id = (0, _utils.unstable_useId)();
|
|
49
49
|
const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
|
|
50
50
|
const resolvedValueOptions = React.useMemo(() => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
51
|
+
if (!(resolvedColumn != null && resolvedColumn.valueOptions)) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (typeof resolvedColumn.valueOptions === 'function') {
|
|
56
|
+
return resolvedColumn.valueOptions({
|
|
57
|
+
field: resolvedColumn.field
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return resolvedColumn.valueOptions;
|
|
54
62
|
}, [resolvedColumn]);
|
|
55
63
|
const resolvedFormattedValueOptions = React.useMemo(() => {
|
|
56
64
|
return resolvedValueOptions == null ? void 0 : resolvedValueOptions.map(_filterPanelUtils.getValueFromOption);
|
|
@@ -107,8 +115,7 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
107
115
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
|
|
108
116
|
multiple: true,
|
|
109
117
|
limitTags: 1,
|
|
110
|
-
options: resolvedValueOptions
|
|
111
|
-
,
|
|
118
|
+
options: resolvedValueOptions,
|
|
112
119
|
isOptionEqualToValue: isOptionEqualToValue,
|
|
113
120
|
filterOptions: filter,
|
|
114
121
|
id: id,
|
|
@@ -99,9 +99,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
apiRef.current.
|
|
103
|
-
items: [...items, defaultItem]
|
|
104
|
-
}));
|
|
102
|
+
apiRef.current.upsertFilterItems([...items, defaultItem]);
|
|
105
103
|
};
|
|
106
104
|
|
|
107
105
|
const deleteFilter = React.useCallback(item => {
|
|
@@ -142,8 +140,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
142
140
|
}), !rootProps.disableMultipleColumnsFiltering && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPanelFooter.GridPanelFooter, {
|
|
143
141
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
144
142
|
onClick: addNewFilter,
|
|
145
|
-
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridAddIcon, {})
|
|
146
|
-
color: "primary"
|
|
143
|
+
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridAddIcon, {})
|
|
147
144
|
}, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseButton, {
|
|
148
145
|
children: apiRef.current.getLocaleText('filterPanelAddFilter')
|
|
149
146
|
}))
|
|
@@ -63,7 +63,6 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
63
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
64
64
|
ref: ref,
|
|
65
65
|
size: "small",
|
|
66
|
-
color: "primary",
|
|
67
66
|
"aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
68
67
|
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.ColumnSelectorIcon, {})
|
|
69
68
|
}, other, {
|
|
@@ -123,7 +123,6 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
123
123
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
124
124
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
125
125
|
ref: handleRef,
|
|
126
|
-
color: "primary",
|
|
127
126
|
size: "small",
|
|
128
127
|
startIcon: startIcon,
|
|
129
128
|
"aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),
|
|
@@ -75,7 +75,6 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
75
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
76
76
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
77
77
|
ref: handleRef,
|
|
78
|
-
color: "primary",
|
|
79
78
|
size: "small",
|
|
80
79
|
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.ExportIcon, {}),
|
|
81
80
|
"aria-expanded": open ? 'true' : undefined,
|
|
@@ -136,7 +136,6 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
136
136
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
|
|
137
137
|
ref: ref,
|
|
138
138
|
size: "small",
|
|
139
|
-
color: "primary",
|
|
140
139
|
"aria-label": apiRef.current.getLocaleText('toolbarFiltersLabel'),
|
|
141
140
|
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
142
141
|
badgeContent: activeFilters.length,
|