@mui/x-data-grid 5.7.0 → 5.8.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 +74 -0
- package/DataGrid/DataGrid.d.ts +8 -3
- package/DataGrid/DataGrid.js +27 -4
- package/DataGrid/useDataGridComponent.js +2 -4
- package/DataGrid/useDataGridProps.d.ts +2 -1
- package/colDef/gridBooleanColDef.d.ts +1 -1
- package/colDef/gridBooleanOperators.d.ts +1 -1
- package/colDef/gridDateColDef.d.ts +5 -9
- package/colDef/gridDateColDef.js +2 -2
- package/colDef/gridDateOperators.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/colDef/gridNumericColDef.d.ts +1 -1
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridStringColDef.d.ts +1 -1
- package/colDef/gridStringOperators.d.ts +1 -1
- package/colDef/index.d.ts +1 -0
- package/colDef/index.js +2 -1
- package/components/GridRow.js +1 -1
- package/components/cell/GridCell.d.ts +4 -4
- package/components/cell/GridCell.js +2 -2
- package/components/cell/GridEditInputCell.js +2 -2
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +12 -0
- package/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -5
- package/components/columnHeaders/index.d.ts +1 -0
- package/components/columnHeaders/index.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/containers/GridRoot.js +29 -17
- package/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPreferencesPanel.js +1 -1
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +15 -3
- package/hooks/core/index.d.ts +1 -1
- package/hooks/core/{preProcessing/gridPreProcessingApi.d.ts → pipeProcessing/gridPipeProcessingApi.d.ts} +19 -18
- package/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/hooks/core/pipeProcessing/index.d.ts +3 -0
- package/hooks/core/pipeProcessing/index.js +3 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +27 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +74 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +7 -0
- package/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +27 -16
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/hooks/core/useGridInitialization.js +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +6 -6
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -3
- package/hooks/features/columns/gridColumnsUtils.js +49 -17
- package/hooks/features/columns/useGridColumns.js +36 -27
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +2 -1
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridCellEditing.new.js +22 -7
- package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridRowEditing.new.js +22 -7
- package/hooks/features/events/useGridEvents.d.ts +1 -1
- package/hooks/features/events/useGridEvents.js +2 -0
- package/hooks/features/filter/gridFilterSelector.d.ts +3 -9
- package/hooks/features/filter/useGridFilter.js +4 -4
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.d.ts +2 -5
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
- package/hooks/features/pagination/gridPaginationSelector.d.ts +1 -3
- package/hooks/features/pagination/useGridPage.js +9 -4
- package/hooks/features/pagination/useGridPageSize.js +3 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/hooks/features/rows/gridRowsSelector.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +8 -0
- package/hooks/features/rows/gridRowsUtils.js +11 -0
- package/hooks/features/rows/index.d.ts +1 -0
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.js +3 -3
- package/hooks/features/rows/useGridRowsMeta.js +3 -3
- package/hooks/features/scroll/useGridScroll.js +4 -13
- package/hooks/features/selection/gridSelectionSelector.d.ts +1 -3
- package/hooks/features/selection/useGridSelection.d.ts +4 -2
- package/hooks/features/selection/useGridSelection.js +72 -25
- package/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +1 -3
- package/hooks/features/sorting/gridSortingUtils.d.ts +1 -2
- package/hooks/features/sorting/useGridSorting.js +3 -3
- package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/hooks/utils/useGridRootProps.d.ts +1 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +3 -6
- package/internals/index.js +2 -3
- package/legacy/DataGrid/DataGrid.js +27 -4
- package/legacy/DataGrid/useDataGridComponent.js +2 -4
- package/legacy/colDef/gridDateColDef.js +2 -2
- package/legacy/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/legacy/colDef/index.js +2 -1
- package/legacy/components/GridRow.js +1 -1
- package/legacy/components/cell/GridCell.js +2 -2
- package/legacy/components/cell/GridEditInputCell.js +2 -2
- package/legacy/components/cell/GridEditSingleSelectCell.js +2 -2
- package/legacy/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -5
- package/legacy/components/columnHeaders/index.js +1 -0
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/legacy/components/containers/GridRoot.js +34 -17
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/legacy/components/panel/GridPreferencesPanel.js +1 -1
- package/legacy/constants/defaultGridSlotsComponents.js +2 -1
- package/legacy/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/legacy/hooks/core/pipeProcessing/index.js +3 -0
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +83 -0
- package/legacy/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/legacy/hooks/core/useGridInitialization.js +2 -2
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
- package/legacy/hooks/features/columns/gridColumnsUtils.js +49 -18
- package/legacy/hooks/features/columns/useGridColumns.js +36 -27
- package/legacy/hooks/features/dimensions/useGridDimensions.js +2 -1
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +22 -7
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +22 -7
- package/legacy/hooks/features/events/useGridEvents.js +2 -0
- package/legacy/hooks/features/filter/useGridFilter.js +4 -4
- package/legacy/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
- package/legacy/hooks/features/pagination/useGridPage.js +11 -4
- package/legacy/hooks/features/pagination/useGridPageSize.js +3 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/legacy/hooks/features/rows/gridRowsUtils.js +13 -0
- package/legacy/hooks/features/rows/index.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +5 -5
- package/legacy/hooks/features/rows/useGridRowsMeta.js +3 -3
- package/legacy/hooks/features/scroll/useGridScroll.js +4 -13
- package/legacy/hooks/features/selection/useGridSelection.js +74 -25
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +3 -3
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +2 -3
- package/legacy/locales/daDK.js +36 -32
- package/legacy/models/colDef/index.js +1 -2
- package/legacy/models/events/gridEvents.js +4 -2
- package/legacy/models/gridRows.js +1 -33
- package/legacy/models/index.js +2 -2
- package/{modern/hooks/core/preProcessing/gridPreProcessingApi.js → legacy/models/params/gridPreferencePanelParams.js} +0 -0
- package/legacy/models/params/index.js +2 -1
- package/locales/daDK.js +32 -32
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridEditingApi.d.ts +2 -2
- package/models/api/gridParamsApi.d.ts +5 -5
- package/models/api/gridRowApi.d.ts +2 -2
- package/models/colDef/gridColDef.d.ts +33 -28
- package/models/colDef/index.d.ts +0 -1
- package/models/colDef/index.js +1 -2
- package/models/events/gridEventLookup.d.ts +12 -6
- package/models/events/gridEvents.d.ts +11 -5
- package/models/events/gridEvents.js +4 -2
- package/models/gridCell.d.ts +1 -0
- package/models/gridEditRowModel.d.ts +1 -1
- package/models/gridFilterOperator.d.ts +3 -2
- package/models/gridRows.d.ts +10 -18
- package/models/gridRows.js +1 -31
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.ts +1 -0
- package/models/gridSortModel.d.ts +3 -4
- package/models/index.d.ts +1 -1
- package/models/index.js +2 -2
- package/models/params/gridCellParams.d.ts +14 -14
- package/models/params/gridColumnHeaderParams.d.ts +3 -2
- package/models/params/gridEditCellParams.d.ts +2 -3
- package/models/params/gridPreferencePanelParams.d.ts +3 -0
- package/models/params/gridPreferencePanelParams.js +1 -0
- package/models/params/gridRowParams.d.ts +7 -8
- package/models/params/gridValueOptionsParams.d.ts +3 -3
- package/models/params/index.d.ts +1 -0
- package/models/params/index.js +2 -1
- package/models/props/DataGridProps.d.ts +36 -16
- package/modern/DataGrid/DataGrid.js +27 -4
- package/modern/DataGrid/useDataGridComponent.js +2 -4
- package/modern/colDef/gridDateColDef.js +2 -2
- package/modern/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/modern/colDef/index.js +2 -1
- package/modern/components/GridRow.js +1 -1
- package/modern/components/cell/GridCell.js +2 -2
- package/modern/components/cell/GridEditInputCell.js +2 -2
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/modern/components/columnHeaders/index.js +1 -0
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/modern/components/panel/GridPreferencesPanel.js +1 -1
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/hooks/core/pipeProcessing/gridPipeProcessingApi.js +1 -0
- package/modern/hooks/core/pipeProcessing/index.js +3 -0
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +74 -0
- package/modern/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/modern/hooks/core/useGridInitialization.js +2 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +49 -17
- package/modern/hooks/features/columns/useGridColumns.js +36 -27
- package/modern/hooks/features/dimensions/useGridDimensions.js +2 -1
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +22 -7
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +22 -7
- package/modern/hooks/features/events/useGridEvents.js +2 -0
- package/modern/hooks/features/filter/useGridFilter.js +4 -4
- package/modern/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
- package/modern/hooks/features/pagination/useGridPage.js +9 -4
- package/modern/hooks/features/pagination/useGridPageSize.js +3 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/modern/hooks/features/rows/gridRowsUtils.js +11 -0
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +1 -1
- package/modern/hooks/features/rows/useGridRowsMeta.js +3 -3
- package/modern/hooks/features/scroll/useGridScroll.js +4 -9
- package/modern/hooks/features/selection/useGridSelection.js +72 -25
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/modern/hooks/features/sorting/useGridSorting.js +3 -3
- package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -3
- package/modern/locales/daDK.js +32 -32
- package/modern/models/colDef/index.js +1 -2
- package/modern/models/events/gridEvents.js +4 -2
- package/modern/models/gridRows.js +1 -31
- package/modern/models/index.js +2 -2
- package/modern/models/params/gridPreferencePanelParams.js +1 -0
- package/modern/models/params/index.js +2 -1
- package/node/DataGrid/DataGrid.js +27 -4
- package/node/DataGrid/useDataGridComponent.js +2 -5
- package/node/colDef/gridDateColDef.js +2 -2
- package/node/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/node/colDef/index.js +13 -0
- package/node/components/GridRow.js +1 -1
- package/node/components/cell/GridCell.js +2 -2
- package/node/components/cell/GridEditInputCell.js +2 -2
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +23 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -6
- package/node/components/columnHeaders/index.js +13 -0
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/node/components/containers/GridRoot.js +28 -17
- package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/node/components/panel/GridPreferencesPanel.js +1 -1
- package/node/constants/defaultGridSlotsComponents.js +1 -0
- package/node/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/node/hooks/core/pipeProcessing/index.js +44 -0
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +93 -0
- package/node/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +4 -4
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/node/hooks/core/useGridInitialization.js +2 -2
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
- package/node/hooks/features/columns/gridColumnsUtils.js +54 -21
- package/node/hooks/features/columns/useGridColumns.js +36 -27
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -1
- package/node/hooks/features/editRows/useGridCellEditing.new.js +24 -7
- package/node/hooks/features/editRows/useGridRowEditing.new.js +24 -7
- package/node/hooks/features/events/useGridEvents.js +2 -0
- package/node/hooks/features/filter/useGridFilter.js +4 -4
- package/node/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +29 -6
- package/node/hooks/features/pagination/useGridPage.js +8 -3
- package/node/hooks/features/pagination/useGridPageSize.js +3 -3
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +20 -5
- package/node/hooks/features/rows/gridRowsUtils.js +18 -0
- package/node/hooks/features/rows/index.js +15 -1
- package/node/hooks/features/rows/useGridRows.js +5 -5
- package/node/hooks/features/rows/useGridRowsMeta.js +3 -3
- package/node/hooks/features/scroll/useGridScroll.js +3 -13
- package/node/hooks/features/selection/useGridSelection.js +71 -24
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/node/hooks/features/sorting/useGridSorting.js +3 -3
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/index.js +4 -12
- package/node/locales/daDK.js +32 -32
- package/node/models/colDef/index.js +0 -13
- package/node/models/events/gridEvents.js +4 -2
- package/node/models/gridRows.js +1 -34
- package/node/models/index.js +13 -13
- package/node/models/params/gridPreferencePanelParams.js +5 -0
- package/node/models/params/index.js +13 -0
- package/package.json +1 -1
- package/components/columnHeaders/ColumnHeaderFilterIcon.d.ts +0 -5
- package/hooks/core/preProcessing/index.d.ts +0 -3
- package/hooks/core/preProcessing/index.js +0 -3
- package/hooks/core/preProcessing/useGridPreProcessing.d.ts +0 -6
- package/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
- package/hooks/core/preProcessing/useGridRegisterPreProcessor.d.ts +0 -7
- package/hooks/features/keyboard/useGridKeyboard.d.ts +0 -10
- package/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/legacy/hooks/core/preProcessing/index.js +0 -3
- package/legacy/hooks/core/preProcessing/useGridPreProcessing.js +0 -62
- package/legacy/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/modern/hooks/core/preProcessing/index.js +0 -3
- package/modern/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
- package/modern/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/node/hooks/core/preProcessing/index.js +0 -44
- package/node/hooks/core/preProcessing/useGridPreProcessing.js +0 -72
- package/node/hooks/features/keyboard/useGridKeyboard.js +0 -91
package/locales/daDK.js
CHANGED
|
@@ -6,7 +6,7 @@ const daDKGrid = {
|
|
|
6
6
|
noResultsOverlayLabel: 'Ingen resultater',
|
|
7
7
|
errorOverlayDefaultLabel: 'Der skete en fejl.',
|
|
8
8
|
// Density selector toolbar button text
|
|
9
|
-
|
|
9
|
+
toolbarDensity: 'Tæthed',
|
|
10
10
|
toolbarDensityLabel: 'Tæthed',
|
|
11
11
|
toolbarDensityCompact: 'Kompakt',
|
|
12
12
|
toolbarDensityStandard: 'Standard',
|
|
@@ -15,7 +15,7 @@ const daDKGrid = {
|
|
|
15
15
|
toolbarColumns: 'Kolonne',
|
|
16
16
|
toolbarColumnsLabel: 'Vælg kolonne',
|
|
17
17
|
// Filters toolbar button text
|
|
18
|
-
|
|
18
|
+
toolbarFilters: 'Filtre',
|
|
19
19
|
toolbarFiltersLabel: 'Vis filtre',
|
|
20
20
|
toolbarFiltersTooltipHide: 'Skjul filtre',
|
|
21
21
|
toolbarFiltersTooltipShow: 'Vis filtre',
|
|
@@ -24,7 +24,7 @@ const daDKGrid = {
|
|
|
24
24
|
// toolbarExport: 'Export',
|
|
25
25
|
toolbarExportLabel: 'Eksporter',
|
|
26
26
|
toolbarExportCSV: 'Download som CSV',
|
|
27
|
-
|
|
27
|
+
toolbarExportPrint: 'Print',
|
|
28
28
|
// Columns panel text
|
|
29
29
|
columnsPanelTextFieldLabel: 'Find kolonne',
|
|
30
30
|
columnsPanelTextFieldPlaceholder: 'Kolonne titel',
|
|
@@ -34,11 +34,11 @@ const daDKGrid = {
|
|
|
34
34
|
// Filter panel text
|
|
35
35
|
filterPanelAddFilter: 'Tilføj filter',
|
|
36
36
|
filterPanelDeleteIconLabel: 'Slet',
|
|
37
|
-
|
|
37
|
+
filterPanelLinkOperator: 'Logisk operator',
|
|
38
38
|
filterPanelOperators: 'Operatorer',
|
|
39
39
|
// TODO v6: rename to filterPanelOperator
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
filterPanelOperatorAnd: 'Og',
|
|
41
|
+
filterPanelOperatorOr: 'Eller',
|
|
42
42
|
filterPanelColumns: 'Kolonne',
|
|
43
43
|
filterPanelInputLabel: 'Værdi',
|
|
44
44
|
filterPanelInputPlaceholder: 'Filter værdi',
|
|
@@ -47,46 +47,46 @@ const daDKGrid = {
|
|
|
47
47
|
filterOperatorEquals: 'Lig med',
|
|
48
48
|
filterOperatorStartsWith: 'Begynder med',
|
|
49
49
|
filterOperatorEndsWith: 'Ender med',
|
|
50
|
-
filterOperatorIs: '
|
|
51
|
-
filterOperatorNot: '
|
|
50
|
+
filterOperatorIs: 'Er lig med',
|
|
51
|
+
filterOperatorNot: 'Er ikke lig med',
|
|
52
52
|
filterOperatorAfter: 'Efter',
|
|
53
53
|
filterOperatorOnOrAfter: 'På eller efter',
|
|
54
54
|
filterOperatorBefore: 'Før',
|
|
55
55
|
filterOperatorOnOrBefore: 'På eller før',
|
|
56
|
-
filterOperatorIsEmpty: 'Indeholder data',
|
|
57
|
-
filterOperatorIsNotEmpty: 'Indeholder
|
|
58
|
-
|
|
56
|
+
filterOperatorIsEmpty: 'Indeholder ikke data',
|
|
57
|
+
filterOperatorIsNotEmpty: 'Indeholder data',
|
|
58
|
+
filterOperatorIsAnyOf: 'indeholder en af',
|
|
59
59
|
// Filter values text
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
filterValueAny: 'hvilken som helst',
|
|
61
|
+
filterValueTrue: 'positiv',
|
|
62
|
+
filterValueFalse: 'negativ',
|
|
63
63
|
// Column menu text
|
|
64
|
-
|
|
64
|
+
columnMenuLabel: 'Menu',
|
|
65
65
|
columnMenuShowColumns: 'Vis Kolonner',
|
|
66
|
-
|
|
66
|
+
columnMenuFilter: 'Filtre',
|
|
67
67
|
columnMenuHideColumn: 'Skjul',
|
|
68
68
|
columnMenuUnsort: 'Fjern sortering',
|
|
69
69
|
columnMenuSortAsc: 'Sorter stigende',
|
|
70
70
|
columnMenuSortDesc: 'Sorter faldende',
|
|
71
71
|
// Column header text
|
|
72
|
-
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` :
|
|
72
|
+
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `Ét aktivt filter`,
|
|
73
73
|
columnHeaderFiltersLabel: 'Vis filtre',
|
|
74
74
|
columnHeaderSortIconLabel: 'Sorter',
|
|
75
75
|
// Rows selected footer text
|
|
76
|
-
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rækker valgt` :
|
|
76
|
+
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rækker valgt` : `Én række valgt`,
|
|
77
77
|
// Total row amount footer text
|
|
78
|
-
footerTotalRows: '
|
|
78
|
+
footerTotalRows: 'Antal rækker i alt:',
|
|
79
79
|
// Total visible row amount footer text
|
|
80
80
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} af ${totalCount.toLocaleString()}`,
|
|
81
81
|
// Checkbox selection text
|
|
82
82
|
checkboxSelectionHeaderName: 'Afkrydsningsvalg',
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
checkboxSelectionSelectAllRows: 'Vælg alle rækker',
|
|
84
|
+
checkboxSelectionUnselectAllRows: 'Fravælg alle rækker',
|
|
85
|
+
checkboxSelectionSelectRow: 'Vælg række',
|
|
86
|
+
checkboxSelectionUnselectRow: 'Fravælg række',
|
|
87
87
|
// Boolean cell text
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
booleanCellTrueLabel: 'ja',
|
|
89
|
+
booleanCellFalseLabel: 'nej',
|
|
90
90
|
// Actions cell more text
|
|
91
91
|
actionsCellMore: 'mere',
|
|
92
92
|
// Column pinning text
|
|
@@ -96,13 +96,13 @@ const daDKGrid = {
|
|
|
96
96
|
// Tree Data
|
|
97
97
|
treeDataGroupingHeaderName: 'Gruppering',
|
|
98
98
|
treeDataExpand: 'Vis underelementer',
|
|
99
|
-
treeDataCollapse: 'Skjul underelementer'
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
treeDataCollapse: 'Skjul underelementer',
|
|
100
|
+
// Grouping columns
|
|
101
|
+
groupingColumnHeaderName: 'Gruppér',
|
|
102
|
+
groupColumn: name => `Gruppér efter ${name}`,
|
|
103
|
+
unGroupColumn: name => `Fjern gruppéring efter ${name}`,
|
|
103
104
|
// Master/detail
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
expandDetailPanel: 'Udvid',
|
|
106
|
+
collapseDetailPanel: 'Kollaps'
|
|
107
107
|
};
|
|
108
108
|
export const daDK = getGridLocalization(daDKGrid, daDKCore);
|
|
@@ -20,7 +20,7 @@ import { GridStateApi } from './gridStateApi';
|
|
|
20
20
|
import { GridLoggerApi } from './gridLoggerApi';
|
|
21
21
|
import { GridScrollApi } from './gridScrollApi';
|
|
22
22
|
import { GridVirtualScrollerApi } from './gridVirtualScrollerApi';
|
|
23
|
-
import type {
|
|
23
|
+
import type { GridPipeProcessingApi } from '../../hooks/core/pipeProcessing';
|
|
24
24
|
import type { GridStrategyProcessingApi } from '../../hooks/core/strategyProcessing';
|
|
25
25
|
import type { GridDimensionsApi } from '../../hooks/features/dimensions';
|
|
26
26
|
import type { GridPaginationApi } from '../../hooks/features/pagination';
|
|
@@ -28,6 +28,6 @@ import type { GridStatePersistenceApi } from '../../hooks/features/statePersiste
|
|
|
28
28
|
declare type GridStateApiUntyped = {
|
|
29
29
|
[key in keyof (GridStateApi<any> & GridStatePersistenceApi<any>)]: any;
|
|
30
30
|
};
|
|
31
|
-
export interface GridApiCommon extends GridCoreApi, GridLoggerApi,
|
|
31
|
+
export interface GridApiCommon extends GridCoreApi, GridLoggerApi, GridPipeProcessingApi, GridStrategyProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridDisableVirtualizationApi, GridVirtualScrollerApi, GridLocaleTextApi, GridClipboardApi, GridScrollApi, GridStateApiUntyped {
|
|
32
32
|
}
|
|
33
33
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridCellMode, GridRowMode
|
|
1
|
+
import { GridCellMode, GridRowMode } from '../gridCell';
|
|
2
2
|
import { GridEditRowsModel, GridEditCellProps } from '../gridEditRowModel';
|
|
3
3
|
import { GridRowId } from '../gridRows';
|
|
4
4
|
import { GridCellParams } from '../params/gridCellParams';
|
|
@@ -46,7 +46,7 @@ export interface GridEditingSharedApi {
|
|
|
46
46
|
/**
|
|
47
47
|
* @ignore - do not document.
|
|
48
48
|
*/
|
|
49
|
-
unstable_parseValue: (id: GridRowId, field: string, value:
|
|
49
|
+
unstable_parseValue: (id: GridRowId, field: string, value: any) => any;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* The row editing API interface.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GridRowId } from '../gridRows';
|
|
1
|
+
import { GridValidRowModel, GridRowId } from '../gridRows';
|
|
3
2
|
import { GridCellParams } from '../params/gridCellParams';
|
|
4
3
|
import { GridColumnHeaderParams } from '../params/gridColumnHeaderParams';
|
|
5
4
|
import { GridRowParams } from '../params/gridRowParams';
|
|
6
5
|
export interface GridParamsApi {
|
|
7
6
|
/**
|
|
8
7
|
* Gets the value of a cell at the given `id` and `field`.
|
|
8
|
+
* @template V
|
|
9
9
|
* @param {GridRowId} id The id of the row.
|
|
10
10
|
* @param {string} field The column field.
|
|
11
|
-
* @returns {
|
|
11
|
+
* @returns {v} The cell value.
|
|
12
12
|
*/
|
|
13
|
-
getCellValue: (id: GridRowId, field: string) =>
|
|
13
|
+
getCellValue: <V extends any = any>(id: GridRowId, field: string) => V;
|
|
14
14
|
/**
|
|
15
15
|
* Gets the underlying DOM element for a cell at the given `id` and `field`.
|
|
16
16
|
* @param {GridRowId} id The id of the row.
|
|
@@ -24,7 +24,7 @@ export interface GridParamsApi {
|
|
|
24
24
|
* @param {string} field The column field.
|
|
25
25
|
* @returns {GridCellParams} The cell params.
|
|
26
26
|
*/
|
|
27
|
-
getCellParams: <V = any, R = any, F = V>(id: GridRowId, field: string) => GridCellParams<
|
|
27
|
+
getCellParams: <V = any, R extends GridValidRowModel = any, F = V>(id: GridRowId, field: string) => GridCellParams<R, V, F>;
|
|
28
28
|
/**
|
|
29
29
|
* Gets the [[GridRowParams]] object that is passed as argument in events.
|
|
30
30
|
* @param {GridRowId} id The id of the row.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridRowModel, GridRowId, GridRowModelUpdate, GridRowTreeNodeConfig } from '../gridRows';
|
|
1
|
+
import { GridRowModel, GridRowId, GridRowModelUpdate, GridRowTreeNodeConfig, GridValidRowModel } from '../gridRows';
|
|
2
2
|
/**
|
|
3
3
|
* The Row API interface that is available in the grid `apiRef`.
|
|
4
4
|
*/
|
|
@@ -33,7 +33,7 @@ export interface GridRowApi {
|
|
|
33
33
|
* @param {GridRowId} id The id of the row.
|
|
34
34
|
* @returns {GridRowModel} The row data.
|
|
35
35
|
*/
|
|
36
|
-
getRow: (id: GridRowId) =>
|
|
36
|
+
getRow: <R extends GridValidRowModel = any>(id: GridRowId) => R | null;
|
|
37
37
|
/**
|
|
38
38
|
* Gets the row node from the internal tree structure.
|
|
39
39
|
* @param {GridRowId} id The id of the row.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GridCellValue } from '../gridCell';
|
|
3
2
|
import { GridCellClassNamePropType } from '../gridCellClass';
|
|
4
3
|
import { GridColumnHeaderClassNamePropType } from '../gridColumnHeaderClass';
|
|
5
4
|
import { GridFilterOperator } from '../gridFilterOperator';
|
|
@@ -10,8 +9,8 @@ import { GridColType, GridNativeColTypes } from './gridColType';
|
|
|
10
9
|
import { GridRowParams } from '../params/gridRowParams';
|
|
11
10
|
import { GridValueOptionsParams } from '../params/gridValueOptionsParams';
|
|
12
11
|
import { GridActionsCellItemProps } from '../../components/cell/GridActionsCellItem';
|
|
13
|
-
import { GridRowModel } from '../gridRows';
|
|
14
12
|
import { GridEditCellProps } from '../gridEditRowModel';
|
|
13
|
+
import type { GridValidRowModel } from '../gridRows';
|
|
15
14
|
/**
|
|
16
15
|
* Alignment used in position elements in Cells.
|
|
17
16
|
*/
|
|
@@ -27,7 +26,7 @@ export declare type GridKeyValue = string | number | boolean;
|
|
|
27
26
|
/**
|
|
28
27
|
* Column Definition interface.
|
|
29
28
|
*/
|
|
30
|
-
export interface GridColDef {
|
|
29
|
+
export interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> {
|
|
31
30
|
/**
|
|
32
31
|
* The column identifier. It's used to map with [[GridRowModel]] values.
|
|
33
32
|
*/
|
|
@@ -103,7 +102,7 @@ export interface GridColDef {
|
|
|
103
102
|
/**
|
|
104
103
|
* A comparator function used to sort rows.
|
|
105
104
|
*/
|
|
106
|
-
sortComparator?: GridComparatorFn
|
|
105
|
+
sortComparator?: GridComparatorFn<V>;
|
|
107
106
|
/**
|
|
108
107
|
* Type allows to merge this object with a default definition [[GridColDef]].
|
|
109
108
|
* @default 'string'
|
|
@@ -112,53 +111,58 @@ export interface GridColDef {
|
|
|
112
111
|
/**
|
|
113
112
|
* To be used in combination with `type: 'singleSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
|
|
114
113
|
*/
|
|
115
|
-
valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams) => Array<ValueOptions>);
|
|
114
|
+
valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
|
|
116
115
|
/**
|
|
117
116
|
* Allows to align the column values in cells.
|
|
118
117
|
*/
|
|
119
118
|
align?: GridAlignment;
|
|
120
119
|
/**
|
|
121
120
|
* Function that allows to get a specific data instead of field to render in the cell.
|
|
122
|
-
* @
|
|
123
|
-
* @
|
|
121
|
+
* @template R, V
|
|
122
|
+
* @param {GridValueGetterParams<any, R>} params Object containing parameters for the getter.
|
|
123
|
+
* @returns {V} The cell value.
|
|
124
124
|
*/
|
|
125
|
-
valueGetter?: (params: GridValueGetterParams) =>
|
|
125
|
+
valueGetter?: (params: GridValueGetterParams<any, R>) => V;
|
|
126
126
|
/**
|
|
127
127
|
* Function that allows to customize how the entered value is stored in the row.
|
|
128
128
|
* It only works with cell/row editing.
|
|
129
|
-
* @
|
|
130
|
-
* @
|
|
129
|
+
* @template R, V
|
|
130
|
+
* @param {GridValueSetterParams<R, V>} params Object containing parameters for the setter.
|
|
131
|
+
* @returns {R} The row with the updated field.
|
|
131
132
|
*/
|
|
132
|
-
valueSetter?: (params: GridValueSetterParams) =>
|
|
133
|
+
valueSetter?: (params: GridValueSetterParams<R, V>) => R;
|
|
133
134
|
/**
|
|
134
135
|
* Function that allows to apply a formatter before rendering its value.
|
|
135
|
-
* @
|
|
136
|
-
* @
|
|
136
|
+
* @template V, F
|
|
137
|
+
* @param {GridValueFormatterParams<V>} params Object containing parameters for the formatter.
|
|
138
|
+
* @returns {F} The formatted value.
|
|
137
139
|
*/
|
|
138
|
-
valueFormatter?: (params: GridValueFormatterParams) =>
|
|
140
|
+
valueFormatter?: (params: GridValueFormatterParams<V>) => F;
|
|
139
141
|
/**
|
|
140
142
|
* Function that takes the user-entered value and converts it to a value used internally.
|
|
141
|
-
* @
|
|
142
|
-
* @param {
|
|
143
|
-
* @
|
|
143
|
+
* @template R, V, F
|
|
144
|
+
* @param {F | undefined} value The user-entered value.
|
|
145
|
+
* @param {GridCellParams<V, R, F>} params The params when called before saving the value.
|
|
146
|
+
* @returns {V} The converted value to use internally.
|
|
144
147
|
*/
|
|
145
|
-
valueParser?: (value:
|
|
148
|
+
valueParser?: (value: F | undefined, params?: GridCellParams<V, R, F>) => V;
|
|
146
149
|
/**
|
|
147
150
|
* Class name that will be added in cells for that column.
|
|
148
151
|
*/
|
|
149
152
|
cellClassName?: GridCellClassNamePropType;
|
|
150
153
|
/**
|
|
151
154
|
* Allows to override the component rendered as cell for this column.
|
|
152
|
-
* @
|
|
155
|
+
* @template R, V, F
|
|
156
|
+
* @param {GridRenderCellParams<V, R, F>} params Object containing parameters for the renderer.
|
|
153
157
|
* @returns {React.ReactNode} The element to be rendered.
|
|
154
158
|
*/
|
|
155
|
-
renderCell?: (params: GridRenderCellParams) => React.ReactNode;
|
|
159
|
+
renderCell?: (params: GridRenderCellParams<V, R, F>) => React.ReactNode;
|
|
156
160
|
/**
|
|
157
161
|
* Allows to override the component rendered in edit cell mode for this column.
|
|
158
162
|
* @param {GridRenderEditCellParams} params Object containing parameters for the renderer.
|
|
159
163
|
* @returns {React.ReactNode} The element to be rendered.
|
|
160
164
|
*/
|
|
161
|
-
renderEditCell?: (params: GridRenderEditCellParams) => React.ReactNode;
|
|
165
|
+
renderEditCell?: (params: GridRenderEditCellParams<V>) => React.ReactNode;
|
|
162
166
|
/**
|
|
163
167
|
* Callback fired when the edit props of the cell changes.
|
|
164
168
|
* It allows to process the props that saved into the state.
|
|
@@ -172,10 +176,11 @@ export interface GridColDef {
|
|
|
172
176
|
headerClassName?: GridColumnHeaderClassNamePropType;
|
|
173
177
|
/**
|
|
174
178
|
* Allows to render a component in the column header cell.
|
|
175
|
-
* @
|
|
179
|
+
* @template V, R, F
|
|
180
|
+
* @param {GridColumnHeaderParams<V, R, F>} params Object containing parameters for the renderer.
|
|
176
181
|
* @returns {React.ReactNode} The element to be rendered.
|
|
177
182
|
*/
|
|
178
|
-
renderHeader?: (params: GridColumnHeaderParams) => React.ReactNode;
|
|
183
|
+
renderHeader?: (params: GridColumnHeaderParams<V, R, F>) => React.ReactNode;
|
|
179
184
|
/**
|
|
180
185
|
* Header cell element alignment.
|
|
181
186
|
*/
|
|
@@ -198,7 +203,7 @@ export interface GridColDef {
|
|
|
198
203
|
/**
|
|
199
204
|
* Allows setting the filter operators for this column.
|
|
200
205
|
*/
|
|
201
|
-
filterOperators?: GridFilterOperator[];
|
|
206
|
+
filterOperators?: GridFilterOperator<R, V, F>[];
|
|
202
207
|
/**
|
|
203
208
|
* If `true`, this column cannot be reordered.
|
|
204
209
|
* @default false
|
|
@@ -223,12 +228,12 @@ export interface GridActionsColDef extends GridColDef {
|
|
|
223
228
|
*/
|
|
224
229
|
getActions: (params: GridRowParams) => React.ReactElement<GridActionsCellItemProps>[];
|
|
225
230
|
}
|
|
226
|
-
export declare type GridEnrichedColDef = GridColDef | GridActionsColDef;
|
|
227
|
-
export declare type GridColumns = GridEnrichedColDef[];
|
|
228
|
-
export declare type GridColTypeDef = Omit<GridColDef, 'field'> & {
|
|
231
|
+
export declare type GridEnrichedColDef<R extends GridValidRowModel = any, V = any, F = V> = GridColDef<R, V, F> | GridActionsColDef;
|
|
232
|
+
export declare type GridColumns<R extends GridValidRowModel = any> = GridEnrichedColDef<R>[];
|
|
233
|
+
export declare type GridColTypeDef<V = any, F = V> = Omit<GridColDef<V, any, F>, 'field'> & {
|
|
229
234
|
extendType?: GridNativeColTypes;
|
|
230
235
|
};
|
|
231
|
-
export declare type GridStateColDef = GridEnrichedColDef & {
|
|
236
|
+
export declare type GridStateColDef<R extends GridValidRowModel = any, V = any, F = V> = GridEnrichedColDef<R, V, F> & {
|
|
232
237
|
computedWidth: number;
|
|
233
238
|
/**
|
|
234
239
|
* If `true`, it means that at least one of the dimension's property of this column has been modified since the last time the column prop has changed.
|
package/models/colDef/index.d.ts
CHANGED
package/models/colDef/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { GridCellEditCommitParams, GridColumnHeaderParams, GridColumnOrderChangeParams, GridColumnResizeParams, GridColumnVisibilityChangeParams, GridEditCellPropsParams, GridHeaderSelectionCheckboxParams, GridRowParams, GridRowSelectionCheckboxParams, GridScrollParams } from '../params';
|
|
2
|
+
import type { GridCellEditCommitParams, GridColumnHeaderParams, GridColumnOrderChangeParams, GridColumnResizeParams, GridColumnVisibilityChangeParams, GridEditCellPropsParams, GridHeaderSelectionCheckboxParams, GridPreferencePanelParams, GridRowParams, GridRowSelectionCheckboxParams, GridScrollParams } from '../params';
|
|
3
3
|
import { GridCellEditStartParams, GridCellEditStopParams } from '../params/gridEditCellParams';
|
|
4
4
|
import { GridCellParams } from '../params/gridCellParams';
|
|
5
5
|
import type { GridFilterModel } from '../gridFilterModel';
|
|
@@ -9,7 +9,7 @@ import type { GridSelectionModel } from '../gridSelectionModel';
|
|
|
9
9
|
import type { ElementSize } from '../elementSize';
|
|
10
10
|
import type { MuiBaseEvent } from '../muiEvent';
|
|
11
11
|
import type { GridRowId, GridRowTreeNodeConfig } from '../gridRows';
|
|
12
|
-
import type {
|
|
12
|
+
import type { GridPipeProcessorGroup } from '../../hooks/core/pipeProcessing';
|
|
13
13
|
import type { GridColumnVisibilityModel } from '../../hooks/features/columns';
|
|
14
14
|
import type { GridStrategyProcessorName } from '../../hooks/core/strategyProcessing';
|
|
15
15
|
import { GridRowEditStartParams, GridRowEditStopParams } from '../params/gridRowParams';
|
|
@@ -162,11 +162,11 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
|
|
|
162
162
|
debouncedResize: {
|
|
163
163
|
params: ElementSize;
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
params:
|
|
165
|
+
pipeProcessorRegister: {
|
|
166
|
+
params: GridPipeProcessorGroup;
|
|
167
167
|
};
|
|
168
|
-
|
|
169
|
-
params:
|
|
168
|
+
pipeProcessorUnregister: {
|
|
169
|
+
params: GridPipeProcessorGroup;
|
|
170
170
|
};
|
|
171
171
|
activeStrategyProcessorChange: {
|
|
172
172
|
params: GridStrategyProcessorName;
|
|
@@ -261,4 +261,10 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
|
|
|
261
261
|
params: GridRowSelectionCheckboxParams;
|
|
262
262
|
event: React.ChangeEvent<HTMLElement>;
|
|
263
263
|
};
|
|
264
|
+
preferencePanelClose: {
|
|
265
|
+
params: GridPreferencePanelParams;
|
|
266
|
+
};
|
|
267
|
+
preferencePanelOpen: {
|
|
268
|
+
params: GridPreferencePanelParams;
|
|
269
|
+
};
|
|
264
270
|
}
|
|
@@ -275,16 +275,14 @@ declare enum GridEvents {
|
|
|
275
275
|
pinnedColumnsChange = "pinnedColumnsChange",
|
|
276
276
|
/**
|
|
277
277
|
* Fired when a pre-processor is registered.
|
|
278
|
-
* TODO: Rename `pipeProcessorRegister`
|
|
279
278
|
* @ignore - do not document.
|
|
280
279
|
*/
|
|
281
|
-
|
|
280
|
+
pipeProcessorRegister = "pipeProcessorRegister",
|
|
282
281
|
/**
|
|
283
282
|
* Fired when a pre-processor is unregistered.
|
|
284
|
-
* TODO: Rename `pipeProcessorUnregister`
|
|
285
283
|
* @ignore - do not document.
|
|
286
284
|
*/
|
|
287
|
-
|
|
285
|
+
pipeProcessorUnregister = "pipeProcessorUnregister",
|
|
288
286
|
/**
|
|
289
287
|
* Fired when a processor of the active strategy changes.
|
|
290
288
|
* @ignore - do not document.
|
|
@@ -322,7 +320,15 @@ declare enum GridEvents {
|
|
|
322
320
|
* Fired when the content size used by the `GridVirtualScroller` changes.
|
|
323
321
|
* @ignore - do not document.
|
|
324
322
|
*/
|
|
325
|
-
virtualScrollerContentSizeChange = "virtualScrollerContentSizeChange"
|
|
323
|
+
virtualScrollerContentSizeChange = "virtualScrollerContentSizeChange",
|
|
324
|
+
/**
|
|
325
|
+
* Fired when the preferences panel is closed.
|
|
326
|
+
*/
|
|
327
|
+
preferencePanelClose = "preferencePanelClose",
|
|
328
|
+
/**
|
|
329
|
+
* Fired when the preferences panel is opened.
|
|
330
|
+
*/
|
|
331
|
+
preferencePanelOpen = "preferencePanelOpen"
|
|
326
332
|
}
|
|
327
333
|
export declare type GridEventsStr = keyof GridEventLookup;
|
|
328
334
|
export { GridEvents };
|
|
@@ -63,8 +63,8 @@ var GridEvents;
|
|
|
63
63
|
GridEvents["columnsChange"] = "columnsChange";
|
|
64
64
|
GridEvents["detailPanelsExpandedRowIdsChange"] = "detailPanelsExpandedRowIdsChange";
|
|
65
65
|
GridEvents["pinnedColumnsChange"] = "pinnedColumnsChange";
|
|
66
|
-
GridEvents["
|
|
67
|
-
GridEvents["
|
|
66
|
+
GridEvents["pipeProcessorRegister"] = "pipeProcessorRegister";
|
|
67
|
+
GridEvents["pipeProcessorUnregister"] = "pipeProcessorUnregister";
|
|
68
68
|
GridEvents["activeStrategyProcessorChange"] = "activeStrategyProcessorChange";
|
|
69
69
|
GridEvents["strategyAvailabilityChange"] = "strategyAvailabilityChange";
|
|
70
70
|
GridEvents["sortModelChange"] = "sortModelChange";
|
|
@@ -73,6 +73,8 @@ var GridEvents;
|
|
|
73
73
|
GridEvents["stateChange"] = "stateChange";
|
|
74
74
|
GridEvents["columnVisibilityChange"] = "columnVisibilityChange";
|
|
75
75
|
GridEvents["virtualScrollerContentSizeChange"] = "virtualScrollerContentSizeChange";
|
|
76
|
+
GridEvents["preferencePanelClose"] = "preferencePanelClose";
|
|
77
|
+
GridEvents["preferencePanelOpen"] = "preferencePanelOpen";
|
|
76
78
|
})(GridEvents || (GridEvents = {}));
|
|
77
79
|
|
|
78
80
|
export { GridEvents };
|
package/models/gridCell.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare type GridCellMode = 'edit' | 'view';
|
|
|
8
8
|
export declare type GridRowMode = 'edit' | 'view';
|
|
9
9
|
/**
|
|
10
10
|
* The cell value type.
|
|
11
|
+
* @deprecated Use `any` or the V generic passed to most interfaces.
|
|
11
12
|
*/
|
|
12
13
|
export declare type GridCellValue = string | number | boolean | Date | null | undefined | object;
|
|
13
14
|
/**
|
|
@@ -5,10 +5,11 @@ import { GridFilterInputMultipleSingleSelectProps } from '../components/panel/fi
|
|
|
5
5
|
import { GridFilterItem } from './gridFilterItem';
|
|
6
6
|
import { GridCellParams } from './params/gridCellParams';
|
|
7
7
|
import type { GridStateColDef } from './colDef/gridColDef';
|
|
8
|
+
import type { GridValidRowModel } from './gridRows';
|
|
8
9
|
/**
|
|
9
10
|
* Filter operator definition interface.
|
|
10
11
|
*/
|
|
11
|
-
export interface GridFilterOperator {
|
|
12
|
+
export interface GridFilterOperator<R extends GridValidRowModel = any, V = any, F = V> {
|
|
12
13
|
/**
|
|
13
14
|
* The label of the filter operator.
|
|
14
15
|
*/
|
|
@@ -25,7 +26,7 @@ export interface GridFilterOperator {
|
|
|
25
26
|
* @param {GridStateColDef} column The column from which we want to filter the rows.
|
|
26
27
|
* @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row poss this filter item or not.
|
|
27
28
|
*/
|
|
28
|
-
getApplyFilterFn: (filterItem: GridFilterItem, column: GridStateColDef) => null | ((params: GridCellParams) => boolean);
|
|
29
|
+
getApplyFilterFn: (filterItem: GridFilterItem, column: GridStateColDef<R, V, F>) => null | ((params: GridCellParams<V, R, F>) => boolean);
|
|
29
30
|
/**
|
|
30
31
|
* The input component to render in the filter panel for this filter operator.
|
|
31
32
|
*/
|
package/models/gridRows.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { GridKeyValue } from './colDef/gridColDef';
|
|
2
|
-
export declare type
|
|
2
|
+
export declare type GridValidRowModel = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export declare type GridRowsProp<R = any> = Readonly<GridRowModel<R>[]>;
|
|
3
6
|
/**
|
|
4
7
|
* @deprecated prefer GridRowModel.
|
|
5
8
|
*/
|
|
6
|
-
export declare type GridRowData
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}> = T;
|
|
9
|
+
export declare type GridRowData = GridValidRowModel;
|
|
9
10
|
/**
|
|
10
11
|
* The key value object representing the data of a row.
|
|
11
12
|
*/
|
|
12
|
-
export declare type GridRowModel<
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}> = T;
|
|
13
|
+
export declare type GridRowModel<R extends GridValidRowModel = any> = R;
|
|
15
14
|
export declare type GridUpdateAction = 'delete';
|
|
16
15
|
export interface GridRowModelUpdate extends GridRowModel {
|
|
17
16
|
_action?: GridUpdateAction;
|
|
@@ -68,12 +67,12 @@ export interface GridRowsMeta {
|
|
|
68
67
|
positions: number[];
|
|
69
68
|
}
|
|
70
69
|
export declare type GridRowTreeConfig = Record<GridRowId, GridRowTreeNodeConfig>;
|
|
71
|
-
export declare type GridRowsLookup = Record<GridRowId,
|
|
70
|
+
export declare type GridRowsLookup<R extends GridValidRowModel = any> = Record<GridRowId, R>;
|
|
72
71
|
/**
|
|
73
72
|
* The type of Id supported by the grid.
|
|
74
73
|
*/
|
|
75
74
|
export declare type GridRowId = string | number;
|
|
76
|
-
export interface GridRowEntry {
|
|
75
|
+
export interface GridRowEntry<R extends GridValidRowModel = any> {
|
|
77
76
|
/**
|
|
78
77
|
* The row id.
|
|
79
78
|
*/
|
|
@@ -81,16 +80,9 @@ export interface GridRowEntry {
|
|
|
81
80
|
/**
|
|
82
81
|
* The row model.
|
|
83
82
|
*/
|
|
84
|
-
model:
|
|
83
|
+
model: R;
|
|
85
84
|
}
|
|
86
85
|
/**
|
|
87
86
|
* The function to retrieve the id of a [[GridRowModel]].
|
|
88
87
|
*/
|
|
89
|
-
export declare type GridRowIdGetter = (row:
|
|
90
|
-
/**
|
|
91
|
-
* An helper function to check if the id provided is valid.
|
|
92
|
-
* @param {GridRowId} id Id as [[GridRowId]].
|
|
93
|
-
* @param {GridRowModel | Partial<GridRowModel>} row Row as [[GridRowModel]].
|
|
94
|
-
* @param {string} detailErrorMessage A custom error message to display for invalid IDs
|
|
95
|
-
*/
|
|
96
|
-
export declare function checkGridRowIdIsValid(id: GridRowId, row: GridRowModel | Partial<GridRowModel>, detailErrorMessage?: string): void;
|
|
88
|
+
export declare type GridRowIdGetter<R extends GridValidRowModel = any> = (row: R) => GridRowId;
|
package/models/gridRows.js
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @deprecated prefer GridRowModel.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The key value object representing the data of a row.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The grid rows total height and row positions.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The type of Id supported by the grid.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The function to retrieve the id of a [[GridRowModel]].
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* An helper function to check if the id provided is valid.
|
|
23
|
-
* @param {GridRowId} id Id as [[GridRowId]].
|
|
24
|
-
* @param {GridRowModel | Partial<GridRowModel>} row Row as [[GridRowModel]].
|
|
25
|
-
* @param {string} detailErrorMessage A custom error message to display for invalid IDs
|
|
26
|
-
*/
|
|
27
|
-
export function checkGridRowIdIsValid(id, row, detailErrorMessage = 'A row was provided without id in the rows prop:') {
|
|
28
|
-
if (id == null) {
|
|
29
|
-
throw new Error(['MUI: The data grid component requires all rows to have a unique `id` property.', 'Alternatively, you can use the `getRowId` prop to specify a custom id for each row.', detailErrorMessage, JSON.stringify(row)].join('\n'));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
export {};
|
|
@@ -50,6 +50,11 @@ export interface GridSlotsComponent extends GridIconSlotsComponent {
|
|
|
50
50
|
* @default GridCell
|
|
51
51
|
*/
|
|
52
52
|
Cell: React.JSXElementConstructor<any>;
|
|
53
|
+
/**
|
|
54
|
+
* Filter icon component rendered in each column header.
|
|
55
|
+
* @default GridColumnHeaderFilterIconButton
|
|
56
|
+
*/
|
|
57
|
+
ColumnHeaderFilterIconButton: React.JSXElementConstructor<any>;
|
|
53
58
|
/**
|
|
54
59
|
* Column menu component rendered by clicking on the 3 dots "kebab" icon in column headers.
|
|
55
60
|
* @default GridColumnMenu
|