@mui/x-data-grid 8.0.0-beta.2 → 8.0.0-beta.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 +141 -0
- package/DataGrid/DataGrid.js +8 -2
- package/DataGrid/useDataGridProps.js +1 -1
- package/components/GridScrollArea.js +4 -4
- package/components/GridSkeletonLoadingOverlay.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +24 -13
- package/components/cell/GridActionsCellItem.js +5 -2
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/components/export/ExportCsv.js +4 -129
- package/components/export/ExportPrint.js +4 -129
- package/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/quickFilter/QuickFilterClear.js +3 -100
- package/components/quickFilter/QuickFilterControl.js +0 -2
- package/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/components/toolbar/GridToolbar.js +4 -1
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/components/toolbarV8/GridToolbar.js +64 -9
- package/components/toolbarV8/Toolbar.js +2 -0
- package/components/toolbarV8/ToolbarButton.js +3 -100
- package/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/constants/cssVariables.d.ts +3 -0
- package/constants/cssVariables.js +2 -1
- package/constants/gridClasses.d.ts +8 -0
- package/constants/gridClasses.js +1 -1
- package/esm/DataGrid/DataGrid.js +8 -2
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/components/GridScrollArea.js +4 -4
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
- package/esm/components/cell/GridActionsCellItem.d.ts +24 -13
- package/esm/components/cell/GridActionsCellItem.js +4 -3
- package/esm/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/esm/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/esm/components/export/ExportCsv.js +4 -129
- package/esm/components/export/ExportPrint.js +4 -129
- package/esm/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/esm/components/panel/GridPanel.d.ts +2 -2
- package/esm/components/panel/GridPanel.js +1 -1
- package/esm/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +3 -100
- package/esm/components/quickFilter/QuickFilterControl.js +0 -2
- package/esm/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/esm/components/toolbar/GridToolbar.js +4 -1
- package/esm/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/esm/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/esm/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/esm/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/esm/components/toolbarV8/GridToolbar.js +62 -9
- package/esm/components/toolbarV8/Toolbar.js +2 -0
- package/esm/components/toolbarV8/ToolbarButton.js +3 -100
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +2 -2
- package/esm/constants/cssVariables.d.ts +3 -0
- package/esm/constants/cssVariables.js +2 -1
- package/esm/constants/gridClasses.d.ts +8 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/core/gridCoreSelector.d.ts +1 -1
- package/esm/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/esm/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/esm/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/esm/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +2 -2
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/esm/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/esm/hooks/features/density/densitySelector.d.ts +2 -2
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/esm/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/esm/hooks/features/editing/useGridCellEditing.js +8 -8
- package/esm/hooks/features/editing/useGridRowEditing.js +9 -9
- package/esm/hooks/features/events/useGridEvents.js +18 -18
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/esm/hooks/features/filter/useGridFilter.js +6 -6
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/esm/hooks/features/focus/useGridFocus.js +10 -10
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/esm/hooks/features/listView/useGridListView.d.ts +4 -4
- package/esm/hooks/features/listView/useGridListView.js +9 -9
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/esm/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -2
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/esm/hooks/features/rowSelection/utils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/esm/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/esm/hooks/features/rows/gridRowsSelector.js +7 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -2
- package/esm/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/esm/hooks/features/rows/useGridRows.js +5 -5
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -2
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/esm/hooks/features/sorting/useGridSorting.js +6 -6
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useGridAriaAttributes.js +6 -0
- package/esm/hooks/utils/{useGridApiEventHandler.d.ts → useGridEvent.d.ts} +2 -2
- package/{modern/hooks/utils/useGridApiEventHandler.js → esm/hooks/utils/useGridEvent.js} +3 -3
- package/esm/hooks/utils/useGridNativeEventListener.js +2 -2
- package/esm/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/esm/index.js +1 -1
- package/esm/material/augmentation.d.ts +74 -0
- package/esm/material/augmentation.js +1 -0
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +262 -141
- package/esm/material/variables.js +2 -0
- package/esm/models/colDef/gridColDef.d.ts +1 -1
- package/esm/models/colDef/index.d.ts +1 -1
- package/esm/models/gridBaseSlots.d.ts +25 -36
- package/esm/models/gridSlotsComponentsProps.d.ts +1 -19
- package/esm/models/props/DataGridProps.d.ts +14 -8
- package/hooks/core/gridCoreSelector.d.ts +1 -1
- package/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/hooks/features/columns/useGridColumns.js +2 -2
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/hooks/features/dataSource/useGridDataSource.js +2 -2
- package/hooks/features/density/densitySelector.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/hooks/features/editing/useGridCellEditing.js +8 -8
- package/hooks/features/editing/useGridRowEditing.js +9 -9
- package/hooks/features/events/useGridEvents.js +18 -18
- package/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/hooks/features/filter/useGridFilter.js +6 -6
- package/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/hooks/features/focus/useGridFocus.js +10 -10
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/hooks/features/listView/useGridListView.d.ts +4 -4
- package/hooks/features/listView/useGridListView.js +9 -9
- package/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/hooks/features/pagination/useGridPaginationModel.js +5 -5
- package/hooks/features/pagination/useGridRowCount.js +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/hooks/features/rowSelection/utils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/hooks/features/rows/gridRowsSelector.js +8 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/hooks/features/rows/useGridRows.js +4 -4
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +6 -6
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -8
- package/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{modern/hooks/utils/useGridApiEventHandler.d.ts → hooks/utils/useGridEvent.d.ts} +2 -2
- package/hooks/utils/{useGridApiEventHandler.js → useGridEvent.js} +5 -5
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/index.js +1 -1
- package/material/augmentation.d.ts +74 -0
- package/material/augmentation.js +5 -0
- package/material/index.d.ts +1 -0
- package/material/index.js +261 -141
- package/material/variables.js +2 -0
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/colDef/index.d.ts +1 -1
- package/models/gridBaseSlots.d.ts +25 -36
- package/models/gridSlotsComponentsProps.d.ts +1 -19
- package/models/props/DataGridProps.d.ts +14 -8
- package/modern/DataGrid/DataGrid.js +8 -2
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/components/GridScrollArea.js +4 -4
- package/modern/components/GridSkeletonLoadingOverlay.js +2 -2
- package/modern/components/cell/GridActionsCellItem.d.ts +24 -13
- package/modern/components/cell/GridActionsCellItem.js +4 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/modern/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/modern/components/export/ExportCsv.js +4 -129
- package/modern/components/export/ExportPrint.js +4 -129
- package/modern/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/modern/components/panel/GridPanel.d.ts +2 -2
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/modern/components/quickFilter/QuickFilterClear.js +3 -100
- package/modern/components/quickFilter/QuickFilterControl.js +0 -2
- package/modern/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/modern/components/toolbar/GridToolbar.js +4 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/modern/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/modern/components/toolbarV8/GridToolbar.js +62 -9
- package/modern/components/toolbarV8/Toolbar.js +2 -0
- package/modern/components/toolbarV8/ToolbarButton.js +3 -100
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/constants/cssVariables.d.ts +3 -0
- package/modern/constants/cssVariables.js +2 -1
- package/modern/constants/gridClasses.d.ts +8 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/gridCoreSelector.d.ts +1 -1
- package/modern/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/modern/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/modern/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/modern/hooks/features/columns/useGridColumns.js +2 -2
- package/modern/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/modern/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/modern/hooks/features/density/densitySelector.d.ts +2 -2
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/modern/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -8
- package/modern/hooks/features/editing/useGridRowEditing.js +9 -9
- package/modern/hooks/features/events/useGridEvents.js +18 -18
- package/modern/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/modern/hooks/features/filter/useGridFilter.js +6 -6
- package/modern/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/modern/hooks/features/focus/useGridFocus.js +10 -10
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/modern/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/modern/hooks/features/listView/useGridListView.d.ts +4 -4
- package/modern/hooks/features/listView/useGridListView.js +9 -9
- package/modern/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/modern/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/modern/hooks/features/pagination/useGridRowCount.js +2 -2
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/modern/hooks/features/rowSelection/utils.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/modern/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/modern/hooks/features/rows/gridRowsSelector.js +7 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -2
- package/modern/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/modern/hooks/features/rows/useGridRows.js +5 -5
- package/modern/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/modern/hooks/features/scroll/useGridScroll.js +2 -2
- package/modern/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/modern/hooks/features/sorting/useGridSorting.js +6 -6
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/modern/hooks/utils/index.d.ts +1 -1
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{hooks/utils/useGridApiEventHandler.d.ts → modern/hooks/utils/useGridEvent.d.ts} +2 -2
- package/{esm/hooks/utils/useGridApiEventHandler.js → modern/hooks/utils/useGridEvent.js} +3 -3
- package/modern/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/modern/index.js +1 -1
- package/modern/material/augmentation.d.ts +74 -0
- package/modern/material/augmentation.js +1 -0
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +262 -141
- package/modern/material/variables.js +2 -0
- package/modern/models/colDef/gridColDef.d.ts +1 -1
- package/modern/models/colDef/index.d.ts +1 -1
- package/modern/models/gridBaseSlots.d.ts +25 -36
- package/modern/models/gridSlotsComponentsProps.d.ts +1 -19
- package/modern/models/props/DataGridProps.d.ts +14 -8
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
package/hooks/utils/index.js
CHANGED
|
@@ -4,27 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
useGridEvent: true,
|
|
8
|
+
useGridEventPriority: true,
|
|
9
9
|
unstable_resetCleanupTracking: true,
|
|
10
10
|
useGridSelector: true
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "unstable_resetCleanupTracking", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _useGridEvent.unstable_resetCleanupTracking;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "useGridEvent", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _useGridEvent.useGridEvent;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "useGridEventPriority", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _useGridEvent.useGridEventPriority;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useGridSelector", {
|
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "useGridSelector", {
|
|
|
33
33
|
return _useGridSelector.useGridSelector;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
var
|
|
36
|
+
var _useGridEvent = require("./useGridEvent");
|
|
37
37
|
var _useGridApiMethod = require("./useGridApiMethod");
|
|
38
38
|
Object.keys(_useGridApiMethod).forEach(function (key) {
|
|
39
39
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -19,8 +19,14 @@ const useGridAriaAttributes = () => {
|
|
|
19
19
|
const accessibleRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridExpandedRowCountSelector);
|
|
20
20
|
const headerGroupingMaxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsHeaderMaxDepthSelector);
|
|
21
21
|
const pinnedRowsCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsCountSelector);
|
|
22
|
+
const ariaLabel = rootProps['aria-label'];
|
|
23
|
+
const ariaLabelledby = rootProps['aria-labelledby'];
|
|
24
|
+
// `aria-label` and `aria-labelledby` should take precedence over `label`
|
|
25
|
+
const shouldUseLabelAsAriaLabel = !ariaLabel && !ariaLabelledby && rootProps.label;
|
|
22
26
|
return {
|
|
23
27
|
role: 'grid',
|
|
28
|
+
'aria-label': shouldUseLabelAsAriaLabel ? rootProps.label : ariaLabel,
|
|
29
|
+
'aria-labelledby': ariaLabelledby,
|
|
24
30
|
'aria-colcount': visibleColumns.length,
|
|
25
31
|
'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount + accessibleRowCount,
|
|
26
32
|
'aria-multiselectable': (0, _utils.isMultipleRowSelectionEnabled)(rootProps)
|
|
@@ -4,8 +4,8 @@ import { GridEventListener, GridEvents } from "../../models/events/index.js";
|
|
|
4
4
|
import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.js";
|
|
5
5
|
import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js";
|
|
6
6
|
import type { GridApiCommon } from '../../models';
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
7
|
+
export declare function useGridEvent<Api extends GridApiCommon, E extends GridEvents>(apiRef: RefObject<Api>, eventName: E, handler?: GridEventListener<E>, options?: EventListenerOptions): void;
|
|
8
|
+
export declare function useGridEventPriority<Api extends GridApiCommon, E extends GridEvents>(apiRef: RefObject<Api>, eventName: E, handler?: GridEventListener<E>): void;
|
|
9
9
|
export declare function unstable_resetCleanupTracking(): void;
|
|
10
10
|
export declare const internal_registryContainer: {
|
|
11
11
|
current: TimerBasedCleanupTracking | FinalizationRegistryBasedCleanupTracking;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.internal_registryContainer = void 0;
|
|
8
8
|
exports.unstable_resetCleanupTracking = unstable_resetCleanupTracking;
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
9
|
+
exports.useGridEvent = useGridEvent;
|
|
10
|
+
exports.useGridEventPriority = useGridEventPriority;
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _TimerBasedCleanupTracking = require("../../utils/cleanupTracking/TimerBasedCleanupTracking");
|
|
13
13
|
var _FinalizationRegistryBasedCleanupTracking = require("../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking");
|
|
@@ -24,7 +24,7 @@ const registryContainer = {
|
|
|
24
24
|
current: createRegistry()
|
|
25
25
|
};
|
|
26
26
|
let cleanupTokensCounter = 0;
|
|
27
|
-
function
|
|
27
|
+
function useGridEvent(apiRef, eventName, handler, options) {
|
|
28
28
|
const objectRetainedByReact = React.useState(ObjectToBeRetainedByReact.create)[0];
|
|
29
29
|
const subscription = React.useRef(null);
|
|
30
30
|
const handlerRef = React.useRef(null);
|
|
@@ -80,8 +80,8 @@ function useGridApiEventHandler(apiRef, eventName, handler, options) {
|
|
|
80
80
|
const OPTIONS_IS_FIRST = {
|
|
81
81
|
isFirst: true
|
|
82
82
|
};
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function useGridEventPriority(apiRef, eventName, handler) {
|
|
84
|
+
useGridEvent(apiRef, eventName, handler, OPTIONS_IS_FIRST);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// TODO: move to @mui/x-data-grid/internals
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useGridNativeEventListener = void 0;
|
|
7
7
|
var _useGridLogger = require("./useGridLogger");
|
|
8
|
-
var
|
|
8
|
+
var _useGridEvent = require("./useGridEvent");
|
|
9
9
|
const useGridNativeEventListener = (apiRef, ref, eventName, handler, options) => {
|
|
10
10
|
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useNativeEventListener');
|
|
11
|
-
(0,
|
|
11
|
+
(0, _useGridEvent.useGridEventPriority)(apiRef, 'rootMount', () => {
|
|
12
12
|
const targetElement = ref();
|
|
13
13
|
if (!targetElement || !eventName) {
|
|
14
14
|
return undefined;
|
|
@@ -2,12 +2,12 @@ import { RefObject } from '@mui/x-internals/types';
|
|
|
2
2
|
import { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
|
|
3
3
|
import type { GridApiCommon } from '../../models';
|
|
4
4
|
export declare const getVisibleRows: <Api extends GridApiCommon>(apiRef: RefObject<Api>, props?: Pick<DataGridProcessedProps, "pagination" | "paginationMode">) => {
|
|
5
|
-
rows: import("
|
|
5
|
+
rows: import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
6
6
|
range: {
|
|
7
7
|
firstRowIndex: number;
|
|
8
8
|
lastRowIndex: number;
|
|
9
9
|
} | null;
|
|
10
|
-
rowIdToIndexMap: Map<import("
|
|
10
|
+
rowIdToIndexMap: Map<import("@mui/x-data-grid").GridRowId, number>;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Computes the list of rows that are reachable by scroll.
|
|
@@ -17,10 +17,10 @@ export declare const getVisibleRows: <Api extends GridApiCommon>(apiRef: RefObje
|
|
|
17
17
|
* - If the row tree is flat, it only contains up to `state.pageSize` rows.
|
|
18
18
|
*/
|
|
19
19
|
export declare const useGridVisibleRows: <Api extends GridApiCommon>(apiRef: RefObject<Api>, props?: Pick<DataGridProcessedProps, "pagination" | "paginationMode">) => {
|
|
20
|
-
rows: import("
|
|
20
|
+
rows: import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
21
21
|
range: {
|
|
22
22
|
firstRowIndex: number;
|
|
23
23
|
lastRowIndex: number;
|
|
24
24
|
} | null;
|
|
25
|
-
rowIdToIndexMap: Map<import("
|
|
25
|
+
rowIdToIndexMap: Map<import("@mui/x-data-grid").GridRowId, number>;
|
|
26
26
|
};
|
package/index.js
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
2
|
+
import type { BadgeProps } from '@mui/material/Badge';
|
|
3
|
+
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
4
|
+
import type { CircularProgressProps } from '@mui/material/CircularProgress';
|
|
5
|
+
import type { DividerProps } from '@mui/material/Divider';
|
|
6
|
+
import type { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
7
|
+
import type { MenuListProps } from '@mui/material/MenuList';
|
|
8
|
+
import type { MenuItemProps } from '@mui/material/MenuItem';
|
|
9
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
10
|
+
import type { SwitchProps } from '@mui/material/Switch';
|
|
11
|
+
import type { ButtonProps } from '@mui/material/Button';
|
|
12
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
13
|
+
import type { TablePaginationProps } from '@mui/material/TablePagination';
|
|
14
|
+
import type { PopperProps } from '@mui/material/Popper';
|
|
15
|
+
import type { TooltipProps } from '@mui/material/Tooltip';
|
|
16
|
+
import type { InputProps } from '@mui/material/Input';
|
|
17
|
+
import type { SelectProps } from '@mui/material/Select';
|
|
18
|
+
import type { SkeletonProps } from '@mui/material/Skeleton';
|
|
19
|
+
declare module '@mui/x-data-grid' {
|
|
20
|
+
interface BaseAutocompletePropsOverrides {
|
|
21
|
+
material?: Partial<AutocompleteProps<string, true, false, true>>;
|
|
22
|
+
}
|
|
23
|
+
interface BaseBadgePropsOverrides {
|
|
24
|
+
material?: Partial<BadgeProps>;
|
|
25
|
+
}
|
|
26
|
+
interface BaseCheckboxPropsOverrides {
|
|
27
|
+
material?: Partial<CheckboxProps>;
|
|
28
|
+
}
|
|
29
|
+
interface BaseCircularProgressPropsOverrides {
|
|
30
|
+
material?: Partial<CircularProgressProps>;
|
|
31
|
+
}
|
|
32
|
+
interface BaseDividerPropsOverrides {
|
|
33
|
+
material?: Partial<DividerProps>;
|
|
34
|
+
}
|
|
35
|
+
interface BaseLinearProgressPropsOverrides {
|
|
36
|
+
material?: Partial<LinearProgressProps>;
|
|
37
|
+
}
|
|
38
|
+
interface BaseMenuListPropsOverrides {
|
|
39
|
+
material?: Partial<MenuListProps>;
|
|
40
|
+
}
|
|
41
|
+
interface BaseMenuItemPropsOverrides {
|
|
42
|
+
material?: Partial<MenuItemProps>;
|
|
43
|
+
}
|
|
44
|
+
interface BaseTextFieldPropsOverrides {
|
|
45
|
+
material?: Partial<TextFieldProps>;
|
|
46
|
+
}
|
|
47
|
+
interface BaseSwitchPropsOverrides {
|
|
48
|
+
material?: Partial<SwitchProps>;
|
|
49
|
+
}
|
|
50
|
+
interface BaseButtonPropsOverrides {
|
|
51
|
+
material?: Partial<ButtonProps>;
|
|
52
|
+
}
|
|
53
|
+
interface BaseIconButtonPropsOverrides {
|
|
54
|
+
material?: Partial<IconButtonProps>;
|
|
55
|
+
}
|
|
56
|
+
interface BasePaginationPropsOverrides {
|
|
57
|
+
material?: Partial<TablePaginationProps>;
|
|
58
|
+
}
|
|
59
|
+
interface BasePopperPropsOverrides {
|
|
60
|
+
material?: Partial<PopperProps>;
|
|
61
|
+
}
|
|
62
|
+
interface BaseTooltipPropsOverrides {
|
|
63
|
+
material?: Partial<TooltipProps>;
|
|
64
|
+
}
|
|
65
|
+
interface BaseInputPropsOverrides {
|
|
66
|
+
material?: Partial<InputProps>;
|
|
67
|
+
}
|
|
68
|
+
interface BaseSelectPropsOverrides {
|
|
69
|
+
material?: Partial<SelectProps>;
|
|
70
|
+
}
|
|
71
|
+
interface BaseSkeletonPropsOverrides {
|
|
72
|
+
material?: Partial<SkeletonProps>;
|
|
73
|
+
}
|
|
74
|
+
}
|
package/material/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GridIconSlotsComponent } from '../models';
|
|
2
2
|
import type { GridBaseSlots } from '../models/gridSlotsComponent';
|
|
3
|
+
import "./augmentation.js";
|
|
3
4
|
export { useMaterialCSSVariables } from "./variables.js";
|
|
4
5
|
declare const materialSlots: GridBaseSlots & GridIconSlotsComponent;
|
|
5
6
|
export default materialSlots;
|