@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.14
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 +430 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridActionsColDef.js +1 -1
- package/colDef/gridBooleanColDef.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/components/GridFooter.js +1 -1
- package/components/GridHeader.js +1 -1
- package/components/GridPagination.js +5 -6
- package/components/GridRowCount.js +4 -5
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.js +5 -6
- package/components/GridShadowScrollArea.d.ts +8 -0
- package/components/GridShadowScrollArea.js +82 -0
- package/components/cell/GridEditInputCell.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/components/columnsManagement/GridColumnsManagement.js +60 -61
- package/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/components/columnsPanel/ColumnsPanelTrigger.js +209 -0
- package/components/columnsPanel/index.d.ts +1 -0
- package/components/columnsPanel/index.js +16 -0
- package/components/containers/GridOverlay.js +6 -8
- package/components/containers/GridRoot.js +4 -2
- package/components/containers/GridRootStyles.d.ts +1 -2
- package/components/containers/GridRootStyles.js +77 -100
- package/components/containers/GridToolbarContainer.js +5 -6
- package/components/export/ExportCsv.d.ts +30 -0
- package/components/export/ExportCsv.js +196 -0
- package/components/export/ExportPrint.d.ts +30 -0
- package/components/export/ExportPrint.js +196 -0
- package/components/export/index.d.ts +2 -0
- package/components/export/index.js +27 -0
- package/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/components/filterPanel/FilterPanelTrigger.js +212 -0
- package/components/filterPanel/index.d.ts +1 -0
- package/components/filterPanel/index.js +16 -0
- package/components/index.d.ts +6 -1
- package/components/index.js +60 -0
- package/components/menu/GridMenu.js +7 -6
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
- package/components/panel/GridPanel.js +18 -20
- package/components/panel/GridPanelContent.js +6 -8
- package/components/panel/GridPanelFooter.js +5 -6
- package/components/panel/GridPanelHeader.js +4 -5
- package/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
- package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/components/quickFilter/QuickFilter.d.ts +41 -0
- package/components/quickFilter/QuickFilter.js +110 -0
- package/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/components/quickFilter/QuickFilterClear.js +161 -0
- package/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/components/quickFilter/QuickFilterContext.js +17 -0
- package/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/components/quickFilter/QuickFilterControl.js +104 -0
- package/components/quickFilter/index.d.ts +3 -0
- package/components/quickFilter/index.js +38 -0
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +2 -2
- package/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +57 -97
- package/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/components/toolbarV8/GridToolbar.js +142 -0
- package/components/toolbarV8/Toolbar.d.ts +32 -0
- package/components/toolbarV8/Toolbar.js +132 -0
- package/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/components/toolbarV8/ToolbarButton.js +179 -0
- package/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/components/toolbarV8/ToolbarContext.js +17 -0
- package/components/toolbarV8/index.d.ts +2 -0
- package/components/toolbarV8/index.js +27 -0
- package/components/virtualization/GridVirtualScrollbar.js +15 -6
- package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/constants/cssVariables.d.ts +294 -0
- package/constants/cssVariables.js +168 -0
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +17 -0
- package/constants/gridClasses.js +1 -1
- package/context/GridContextProvider.js +4 -1
- package/esm/DataGrid/DataGrid.js +31 -22
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/colDef/gridActionsColDef.js +1 -1
- package/esm/colDef/gridBooleanColDef.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/esm/components/GridFooter.js +2 -2
- package/esm/components/GridHeader.js +1 -1
- package/esm/components/GridPagination.js +5 -6
- package/esm/components/GridRowCount.js +4 -5
- package/esm/components/GridScrollArea.js +2 -1
- package/esm/components/GridSelectedRowCount.js +5 -6
- package/esm/components/GridShadowScrollArea.d.ts +8 -0
- package/esm/components/GridShadowScrollArea.js +74 -0
- package/esm/components/cell/GridEditInputCell.js +2 -3
- package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/esm/components/columnsManagement/GridColumnsManagement.js +61 -62
- package/esm/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
- package/esm/components/columnsPanel/index.d.ts +1 -0
- package/esm/components/columnsPanel/index.js +1 -0
- package/esm/components/containers/GridOverlay.js +6 -8
- package/esm/components/containers/GridRoot.js +4 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -2
- package/esm/components/containers/GridRootStyles.js +78 -101
- package/esm/components/containers/GridToolbarContainer.js +5 -6
- package/esm/components/export/ExportCsv.d.ts +30 -0
- package/esm/components/export/ExportCsv.js +189 -0
- package/esm/components/export/ExportPrint.d.ts +30 -0
- package/esm/components/export/ExportPrint.js +189 -0
- package/esm/components/export/index.d.ts +2 -0
- package/esm/components/export/index.js +2 -0
- package/esm/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/esm/components/filterPanel/FilterPanelTrigger.js +205 -0
- package/esm/components/filterPanel/index.d.ts +1 -0
- package/esm/components/filterPanel/index.js +1 -0
- package/esm/components/index.d.ts +6 -1
- package/esm/components/index.js +6 -1
- package/esm/components/menu/GridMenu.js +7 -6
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/esm/components/panel/GridPanel.js +18 -20
- package/esm/components/panel/GridPanelContent.js +6 -8
- package/esm/components/panel/GridPanelFooter.js +5 -6
- package/esm/components/panel/GridPanelHeader.js +4 -5
- package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/esm/components/quickFilter/QuickFilter.d.ts +41 -0
- package/esm/components/quickFilter/QuickFilter.js +103 -0
- package/esm/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterClear.js +154 -0
- package/esm/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/esm/components/quickFilter/QuickFilterContext.js +9 -0
- package/esm/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterControl.js +97 -0
- package/esm/components/quickFilter/index.d.ts +3 -0
- package/esm/components/quickFilter/index.js +3 -0
- package/esm/components/toolbar/GridToolbar.d.ts +1 -1
- package/esm/components/toolbar/GridToolbar.js +2 -2
- package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +59 -97
- package/esm/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/esm/components/toolbarV8/GridToolbar.js +135 -0
- package/esm/components/toolbarV8/Toolbar.d.ts +32 -0
- package/esm/components/toolbarV8/Toolbar.js +125 -0
- package/esm/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/esm/components/toolbarV8/ToolbarButton.js +172 -0
- package/esm/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/esm/components/toolbarV8/ToolbarContext.js +9 -0
- package/esm/components/toolbarV8/index.d.ts +2 -0
- package/esm/components/toolbarV8/index.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollbar.js +10 -2
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/esm/constants/cssVariables.d.ts +294 -0
- package/esm/constants/cssVariables.js +161 -0
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/defaultGridSlotsComponents.js +2 -1
- package/esm/constants/gridClasses.d.ts +17 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/context/GridContextProvider.js +4 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/esm/hooks/features/columns/index.d.ts +1 -1
- package/esm/hooks/features/columns/index.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +4 -2
- package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/esm/hooks/features/dataSource/index.d.ts +2 -0
- package/esm/hooks/features/dataSource/index.js +2 -0
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
- package/esm/hooks/features/export/utils.js +4 -2
- package/esm/hooks/features/focus/useGridFocus.js +3 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
- package/esm/hooks/features/rowSelection/utils.js +11 -11
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
- package/esm/hooks/features/rows/useGridRows.js +7 -7
- package/esm/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
- package/esm/hooks/utils/index.d.ts +2 -1
- package/esm/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/esm/hooks/utils/useGridComponentRenderer.js +36 -0
- package/esm/hooks/utils/useGridSelector.js +4 -1
- package/esm/hooks/utils/useIsSSR.js +4 -1
- package/esm/index.js +1 -1
- package/esm/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/esm/internals/demo/TailwindDemoContainer.js +55 -0
- package/esm/internals/demo/index.d.ts +1 -0
- package/esm/internals/demo/index.js +1 -0
- package/esm/internals/index.d.ts +6 -1
- package/esm/internals/index.js +5 -1
- package/esm/internals/utils/propValidation.js +1 -1
- package/esm/locales/bnBD.d.ts +2 -0
- package/esm/locales/bnBD.js +167 -0
- package/esm/locales/deDE.js +3 -5
- package/esm/locales/huHU.js +10 -13
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/ruRU.js +17 -21
- package/esm/material/icons/index.d.ts +3 -3
- package/esm/material/icons/index.js +6 -6
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +167 -52
- package/esm/material/variables.d.ts +5 -0
- package/esm/material/variables.js +89 -0
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/api/gridSortApi.d.ts +1 -1
- package/esm/models/configuration/gridConfiguration.d.ts +7 -1
- package/esm/models/gridBaseSlots.d.ts +61 -7
- package/esm/models/gridDataSource.d.ts +9 -4
- package/esm/models/gridIconSlotsComponent.d.ts +1 -1
- package/esm/models/gridRowSelectionManager.d.ts +9 -0
- package/esm/models/gridRowSelectionManager.js +36 -0
- package/esm/models/gridRowSelectionModel.d.ts +4 -2
- package/esm/models/gridSlotsComponent.d.ts +7 -28
- package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
- package/esm/models/gridSortModel.d.ts +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -3
- package/esm/models/props/DataGridProps.d.ts +22 -17
- package/esm/utils/css/context.d.ts +14 -0
- package/esm/utils/css/context.js +54 -0
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +28 -27
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/hooks/features/columns/gridColumnsSelector.js +9 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/hooks/features/columns/index.d.ts +1 -1
- package/hooks/features/columns/index.js +94 -10
- package/hooks/features/columns/useGridColumns.js +4 -2
- package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/hooks/features/dataSource/gridDataSourceError.js +40 -0
- package/hooks/features/dataSource/index.d.ts +2 -0
- package/hooks/features/dataSource/index.js +25 -0
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/hooks/features/dimensions/useGridDimensions.js +19 -18
- package/hooks/features/editing/useGridCellEditing.js +10 -9
- package/hooks/features/editing/useGridRowEditing.js +11 -10
- package/hooks/features/export/utils.js +4 -2
- package/hooks/features/focus/useGridFocus.js +8 -7
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +11 -28
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
- package/hooks/features/rowSelection/utils.d.ts +2 -2
- package/hooks/features/rowSelection/utils.js +10 -10
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +10 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -8
- package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +21 -27
- package/hooks/utils/index.d.ts +2 -1
- package/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/hooks/utils/useGridComponentRenderer.js +44 -0
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/internals/demo/TailwindDemoContainer.js +63 -0
- package/internals/demo/index.d.ts +1 -0
- package/internals/demo/index.js +12 -0
- package/internals/index.d.ts +6 -1
- package/internals/index.js +43 -0
- package/internals/utils/propValidation.js +1 -1
- package/locales/bnBD.d.ts +2 -0
- package/locales/bnBD.js +173 -0
- package/locales/deDE.js +3 -5
- package/locales/huHU.js +10 -13
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/locales/ruRU.js +17 -21
- package/material/icons/index.d.ts +3 -3
- package/material/icons/index.js +7 -7
- package/material/index.d.ts +1 -0
- package/material/index.js +172 -51
- package/material/variables.d.ts +5 -0
- package/material/variables.js +95 -0
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/api/gridSortApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +61 -7
- package/models/gridDataSource.d.ts +9 -4
- package/models/gridIconSlotsComponent.d.ts +1 -1
- package/models/gridRowSelectionManager.d.ts +9 -0
- package/models/gridRowSelectionManager.js +43 -0
- package/models/gridRowSelectionModel.d.ts +4 -2
- package/models/gridSlotsComponent.d.ts +7 -28
- package/models/gridSlotsComponentsProps.d.ts +3 -11
- package/models/gridSortModel.d.ts +1 -1
- package/models/index.d.ts +2 -1
- package/models/index.js +34 -11
- package/models/props/DataGridProps.d.ts +22 -17
- package/modern/DataGrid/DataGrid.js +31 -22
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridActionsColDef.js +1 -1
- package/modern/colDef/gridBooleanColDef.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/modern/components/GridFooter.js +2 -2
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridPagination.js +5 -6
- package/modern/components/GridRowCount.js +4 -5
- package/modern/components/GridScrollArea.js +2 -1
- package/modern/components/GridSelectedRowCount.js +5 -6
- package/modern/components/GridShadowScrollArea.d.ts +8 -0
- package/modern/components/GridShadowScrollArea.js +74 -0
- package/modern/components/cell/GridEditInputCell.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/modern/components/columnsManagement/GridColumnsManagement.js +61 -62
- package/modern/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
- package/modern/components/columnsPanel/index.d.ts +1 -0
- package/modern/components/columnsPanel/index.js +1 -0
- package/modern/components/containers/GridOverlay.js +6 -8
- package/modern/components/containers/GridRoot.js +4 -2
- package/modern/components/containers/GridRootStyles.d.ts +1 -2
- package/modern/components/containers/GridRootStyles.js +78 -101
- package/modern/components/containers/GridToolbarContainer.js +5 -6
- package/modern/components/export/ExportCsv.d.ts +30 -0
- package/modern/components/export/ExportCsv.js +189 -0
- package/modern/components/export/ExportPrint.d.ts +30 -0
- package/modern/components/export/ExportPrint.js +189 -0
- package/modern/components/export/index.d.ts +2 -0
- package/modern/components/export/index.js +2 -0
- package/modern/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/modern/components/filterPanel/FilterPanelTrigger.js +205 -0
- package/modern/components/filterPanel/index.d.ts +1 -0
- package/modern/components/filterPanel/index.js +1 -0
- package/modern/components/index.d.ts +6 -1
- package/modern/components/index.js +6 -1
- package/modern/components/menu/GridMenu.js +7 -6
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/modern/components/panel/GridPanel.js +18 -20
- package/modern/components/panel/GridPanelContent.js +6 -8
- package/modern/components/panel/GridPanelFooter.js +5 -6
- package/modern/components/panel/GridPanelHeader.js +4 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/modern/components/quickFilter/QuickFilter.d.ts +41 -0
- package/modern/components/quickFilter/QuickFilter.js +103 -0
- package/modern/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterClear.js +154 -0
- package/modern/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/modern/components/quickFilter/QuickFilterContext.js +9 -0
- package/modern/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterControl.js +97 -0
- package/modern/components/quickFilter/index.d.ts +3 -0
- package/modern/components/quickFilter/index.js +3 -0
- package/modern/components/toolbar/GridToolbar.d.ts +1 -1
- package/modern/components/toolbar/GridToolbar.js +2 -2
- package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +59 -97
- package/modern/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/modern/components/toolbarV8/GridToolbar.js +135 -0
- package/modern/components/toolbarV8/Toolbar.d.ts +32 -0
- package/modern/components/toolbarV8/Toolbar.js +125 -0
- package/modern/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/modern/components/toolbarV8/ToolbarButton.js +172 -0
- package/modern/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/modern/components/toolbarV8/ToolbarContext.js +9 -0
- package/modern/components/toolbarV8/index.d.ts +2 -0
- package/modern/components/toolbarV8/index.js +2 -0
- package/modern/components/virtualization/GridVirtualScrollbar.js +10 -2
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/modern/constants/cssVariables.d.ts +294 -0
- package/modern/constants/cssVariables.js +161 -0
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/gridClasses.d.ts +17 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/context/GridContextProvider.js +4 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/modern/hooks/features/columns/index.d.ts +1 -1
- package/modern/hooks/features/columns/index.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +4 -2
- package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/modern/hooks/features/dataSource/index.d.ts +2 -0
- package/modern/hooks/features/dataSource/index.js +2 -0
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
- package/modern/hooks/features/export/utils.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.d.ts +1 -1
- package/modern/hooks/features/index.js +1 -1
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
- package/modern/hooks/features/rowSelection/utils.js +11 -11
- package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
- package/modern/hooks/utils/index.d.ts +2 -1
- package/modern/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/modern/hooks/utils/useGridComponentRenderer.js +36 -0
- package/modern/hooks/utils/useGridSelector.js +4 -1
- package/modern/hooks/utils/useIsSSR.js +4 -1
- package/modern/index.js +1 -1
- package/modern/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/modern/internals/demo/TailwindDemoContainer.js +55 -0
- package/modern/internals/demo/index.d.ts +1 -0
- package/modern/internals/demo/index.js +1 -0
- package/modern/internals/index.d.ts +6 -1
- package/modern/internals/index.js +5 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/bnBD.d.ts +2 -0
- package/modern/locales/bnBD.js +167 -0
- package/modern/locales/deDE.js +3 -5
- package/modern/locales/huHU.js +10 -13
- package/modern/locales/index.d.ts +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/ruRU.js +17 -21
- package/modern/material/icons/index.d.ts +3 -3
- package/modern/material/icons/index.js +6 -6
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +167 -52
- package/modern/material/variables.d.ts +5 -0
- package/modern/material/variables.js +89 -0
- package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
- package/modern/models/api/gridSortApi.d.ts +1 -1
- package/modern/models/configuration/gridConfiguration.d.ts +7 -1
- package/modern/models/gridBaseSlots.d.ts +61 -7
- package/modern/models/gridDataSource.d.ts +9 -4
- package/modern/models/gridIconSlotsComponent.d.ts +1 -1
- package/modern/models/gridRowSelectionManager.d.ts +9 -0
- package/modern/models/gridRowSelectionManager.js +36 -0
- package/modern/models/gridRowSelectionModel.d.ts +4 -2
- package/modern/models/gridSlotsComponent.d.ts +7 -28
- package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
- package/modern/models/gridSortModel.d.ts +1 -1
- package/modern/models/index.d.ts +2 -1
- package/modern/models/index.js +2 -3
- package/modern/models/props/DataGridProps.d.ts +22 -17
- package/modern/utils/css/context.d.ts +14 -0
- package/modern/utils/css/context.js +54 -0
- package/modern/utils/index.d.ts +2 -1
- package/modern/utils/index.js +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/css/context.d.ts +14 -0
- package/utils/css/context.js +64 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +8 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderProp } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
3
|
+
import { GridPrintExportOptions } from "../../models/gridExport.js";
|
|
4
|
+
import type { GridSlotProps } from '../../models';
|
|
5
|
+
export type ExportPrintProps = GridSlotProps['baseButton'] & {
|
|
6
|
+
/**
|
|
7
|
+
* A function to customize rendering of the component.
|
|
8
|
+
*/
|
|
9
|
+
render?: RenderProp<GridSlotProps['baseButton']>;
|
|
10
|
+
/**
|
|
11
|
+
* The options to apply on the Print export.
|
|
12
|
+
* @demos
|
|
13
|
+
* - [Print export](/x/react-data-grid/export/#print-export)
|
|
14
|
+
*/
|
|
15
|
+
options?: GridPrintExportOptions;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A button that triggers a print export.
|
|
19
|
+
* It renders the `baseButton` slot.
|
|
20
|
+
*
|
|
21
|
+
* Demos:
|
|
22
|
+
*
|
|
23
|
+
* - [Export](https://mui.com/x/react-data-grid/components/export/)
|
|
24
|
+
*
|
|
25
|
+
* API:
|
|
26
|
+
*
|
|
27
|
+
* - [ExportPrint API](https://mui.com/x/api/data-grid/export-print/)
|
|
28
|
+
*/
|
|
29
|
+
declare const ExportPrint: React.ForwardRefExoticComponent<ExportPrintProps> | React.ForwardRefExoticComponent<Omit<ExportPrintProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
export { ExportPrint };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["render", "options", "onClick"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
+
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
8
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
|
+
import { useGridComponentRenderer } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* A button that triggers a print export.
|
|
13
|
+
* It renders the `baseButton` slot.
|
|
14
|
+
*
|
|
15
|
+
* Demos:
|
|
16
|
+
*
|
|
17
|
+
* - [Export](https://mui.com/x/react-data-grid/components/export/)
|
|
18
|
+
*
|
|
19
|
+
* API:
|
|
20
|
+
*
|
|
21
|
+
* - [ExportPrint API](https://mui.com/x/api/data-grid/export-print/)
|
|
22
|
+
*/
|
|
23
|
+
const ExportPrint = forwardRef(function ExportPrint(props, ref) {
|
|
24
|
+
const {
|
|
25
|
+
render,
|
|
26
|
+
options,
|
|
27
|
+
onClick
|
|
28
|
+
} = props,
|
|
29
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
30
|
+
const rootProps = useGridRootProps();
|
|
31
|
+
const apiRef = useGridApiContext();
|
|
32
|
+
const handleClick = event => {
|
|
33
|
+
apiRef.current.exportDataAsPrint(options);
|
|
34
|
+
onClick?.(event);
|
|
35
|
+
};
|
|
36
|
+
const element = useGridComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {
|
|
37
|
+
onClick: handleClick
|
|
38
|
+
}, other, {
|
|
39
|
+
ref
|
|
40
|
+
}));
|
|
41
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
42
|
+
children: element
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
process.env.NODE_ENV !== "production" ? ExportPrint.propTypes = {
|
|
46
|
+
// ----------------------------- Warning --------------------------------
|
|
47
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
|
+
// ----------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* A ref for imperative actions.
|
|
52
|
+
* It currently only supports `focusVisible()` action.
|
|
53
|
+
*/
|
|
54
|
+
action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
55
|
+
current: PropTypes.shape({
|
|
56
|
+
focusVisible: PropTypes.func.isRequired
|
|
57
|
+
})
|
|
58
|
+
})]),
|
|
59
|
+
/**
|
|
60
|
+
* If `true`, the ripples are centered.
|
|
61
|
+
* They won't start at the cursor interaction position.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
centerRipple: PropTypes.bool,
|
|
65
|
+
className: PropTypes.string,
|
|
66
|
+
/**
|
|
67
|
+
* The color of the component.
|
|
68
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
69
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
70
|
+
* @default 'primary'
|
|
71
|
+
*/
|
|
72
|
+
color: PropTypes.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
73
|
+
component: PropTypes.elementType,
|
|
74
|
+
/**
|
|
75
|
+
* If `true`, the component is disabled.
|
|
76
|
+
*/
|
|
77
|
+
disabled: PropTypes.bool,
|
|
78
|
+
/**
|
|
79
|
+
* If `true`, no elevation is used.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
disableElevation: PropTypes.bool,
|
|
83
|
+
/**
|
|
84
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
disableFocusRipple: PropTypes.bool,
|
|
88
|
+
/**
|
|
89
|
+
* If `true`, the ripple effect is disabled.
|
|
90
|
+
*
|
|
91
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
92
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
disableRipple: PropTypes.bool,
|
|
96
|
+
/**
|
|
97
|
+
* If `true`, the touch ripple effect is disabled.
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
disableTouchRipple: PropTypes.bool,
|
|
101
|
+
/**
|
|
102
|
+
* Element placed after the children.
|
|
103
|
+
*/
|
|
104
|
+
endIcon: PropTypes.node,
|
|
105
|
+
/**
|
|
106
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
focusRipple: PropTypes.bool,
|
|
110
|
+
/**
|
|
111
|
+
* This prop can help identify which element has keyboard focus.
|
|
112
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
113
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
114
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
115
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
116
|
+
* if needed.
|
|
117
|
+
*/
|
|
118
|
+
focusVisibleClassName: PropTypes.string,
|
|
119
|
+
/**
|
|
120
|
+
* If `true`, the button will take up the full width of its container.
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
fullWidth: PropTypes.bool,
|
|
124
|
+
/**
|
|
125
|
+
* The URL to link to when the button is clicked.
|
|
126
|
+
* If defined, an `a` element will be used as the root node.
|
|
127
|
+
*/
|
|
128
|
+
href: PropTypes.string,
|
|
129
|
+
/**
|
|
130
|
+
* The component used to render a link when the `href` prop is provided.
|
|
131
|
+
* @default 'a'
|
|
132
|
+
*/
|
|
133
|
+
LinkComponent: PropTypes.elementType,
|
|
134
|
+
/**
|
|
135
|
+
* Callback fired when the component is focused with a keyboard.
|
|
136
|
+
* We trigger a `onFocus` callback too.
|
|
137
|
+
*/
|
|
138
|
+
onFocusVisible: PropTypes.func,
|
|
139
|
+
/**
|
|
140
|
+
* The options to apply on the Print export.
|
|
141
|
+
* @demos
|
|
142
|
+
* - [Print export](/x/react-data-grid/export/#print-export)
|
|
143
|
+
*/
|
|
144
|
+
options: PropTypes.shape({
|
|
145
|
+
allColumns: PropTypes.bool,
|
|
146
|
+
bodyClassName: PropTypes.string,
|
|
147
|
+
copyStyles: PropTypes.bool,
|
|
148
|
+
fields: PropTypes.arrayOf(PropTypes.string),
|
|
149
|
+
fileName: PropTypes.string,
|
|
150
|
+
getRowsToExport: PropTypes.func,
|
|
151
|
+
hideFooter: PropTypes.bool,
|
|
152
|
+
hideToolbar: PropTypes.bool,
|
|
153
|
+
includeCheckboxes: PropTypes.bool,
|
|
154
|
+
pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
155
|
+
}),
|
|
156
|
+
/**
|
|
157
|
+
* A function to customize rendering of the component.
|
|
158
|
+
*/
|
|
159
|
+
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
160
|
+
/**
|
|
161
|
+
* The size of the component.
|
|
162
|
+
* `small` is equivalent to the dense button styling.
|
|
163
|
+
*/
|
|
164
|
+
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
165
|
+
/**
|
|
166
|
+
* Element placed before the children.
|
|
167
|
+
*/
|
|
168
|
+
startIcon: PropTypes.node,
|
|
169
|
+
style: PropTypes.object,
|
|
170
|
+
/**
|
|
171
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
172
|
+
*/
|
|
173
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
174
|
+
tabIndex: PropTypes.number,
|
|
175
|
+
/**
|
|
176
|
+
* Props applied to the `TouchRipple` element.
|
|
177
|
+
*/
|
|
178
|
+
TouchRippleProps: PropTypes.object,
|
|
179
|
+
/**
|
|
180
|
+
* A ref that points to the `TouchRipple` element.
|
|
181
|
+
*/
|
|
182
|
+
touchRippleRef: PropTypes.any,
|
|
183
|
+
/**
|
|
184
|
+
* The variant to use.
|
|
185
|
+
* @default 'text'
|
|
186
|
+
*/
|
|
187
|
+
variant: PropTypes.oneOf(['contained', 'outlined', 'text'])
|
|
188
|
+
} : void 0;
|
|
189
|
+
export { ExportPrint };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderProp } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
3
|
+
import type { GridSlotProps } from '../../models';
|
|
4
|
+
export interface FilterPanelState {
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, the filter panel is open.
|
|
7
|
+
*/
|
|
8
|
+
open: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The number of active filters.
|
|
11
|
+
*/
|
|
12
|
+
filterCount: number;
|
|
13
|
+
}
|
|
14
|
+
export type FilterPanelTriggerProps = Omit<GridSlotProps['baseButton'], 'className'> & {
|
|
15
|
+
/**
|
|
16
|
+
* A function to customize rendering of the component.
|
|
17
|
+
*/
|
|
18
|
+
render?: RenderProp<GridSlotProps['baseButton'], FilterPanelState>;
|
|
19
|
+
/**
|
|
20
|
+
* A function to customize rendering of the component.
|
|
21
|
+
*/
|
|
22
|
+
className?: string | ((state: FilterPanelState) => string);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A button that opens and closes the filter panel.
|
|
26
|
+
* It renders the `baseButton` slot.
|
|
27
|
+
*
|
|
28
|
+
* Demos:
|
|
29
|
+
*
|
|
30
|
+
* - [Filter Panel](https://mui.com/x/react-data-grid/components/filter-panel/)
|
|
31
|
+
*
|
|
32
|
+
* API:
|
|
33
|
+
*
|
|
34
|
+
* - [FilterPanelTrigger API](https://mui.com/x/api/data-grid/filter-panel-trigger/)
|
|
35
|
+
*/
|
|
36
|
+
declare const FilterPanelTrigger: React.ForwardRefExoticComponent<FilterPanelTriggerProps> | React.ForwardRefExoticComponent<Omit<FilterPanelTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
export { FilterPanelTrigger };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["render", "className", "onClick", "onPointerUp"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import useId from '@mui/utils/useId';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
|
+
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
|
+
import { gridFilterActiveItemsSelector, gridPreferencePanelStateSelector, GridPreferencePanelsValue, useGridSelector } from "../../hooks/index.js";
|
|
10
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
|
+
import { useGridComponentRenderer } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* A button that opens and closes the filter panel.
|
|
15
|
+
* It renders the `baseButton` slot.
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Filter Panel](https://mui.com/x/react-data-grid/components/filter-panel/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [FilterPanelTrigger API](https://mui.com/x/api/data-grid/filter-panel-trigger/)
|
|
24
|
+
*/
|
|
25
|
+
const FilterPanelTrigger = forwardRef(function FilterPanelTrigger(props, ref) {
|
|
26
|
+
const {
|
|
27
|
+
render,
|
|
28
|
+
className,
|
|
29
|
+
onClick,
|
|
30
|
+
onPointerUp
|
|
31
|
+
} = props,
|
|
32
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
33
|
+
const rootProps = useGridRootProps();
|
|
34
|
+
const buttonId = useId();
|
|
35
|
+
const panelId = useId();
|
|
36
|
+
const apiRef = useGridApiContext();
|
|
37
|
+
const panelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
38
|
+
const open = panelState.open && panelState.openedPanelValue === GridPreferencePanelsValue.filters;
|
|
39
|
+
const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);
|
|
40
|
+
const filterCount = activeFilters.length;
|
|
41
|
+
const state = {
|
|
42
|
+
open,
|
|
43
|
+
filterCount
|
|
44
|
+
};
|
|
45
|
+
const resolvedClassName = typeof className === 'function' ? className(state) : className;
|
|
46
|
+
const handleClick = event => {
|
|
47
|
+
if (open) {
|
|
48
|
+
apiRef.current.hidePreferences();
|
|
49
|
+
} else {
|
|
50
|
+
apiRef.current.showPreferences(GridPreferencePanelsValue.filters, panelId, buttonId);
|
|
51
|
+
}
|
|
52
|
+
onClick?.(event);
|
|
53
|
+
};
|
|
54
|
+
const handlePointerUp = event => {
|
|
55
|
+
if (open) {
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
}
|
|
58
|
+
onPointerUp?.(event);
|
|
59
|
+
};
|
|
60
|
+
const element = useGridComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {
|
|
61
|
+
id: buttonId,
|
|
62
|
+
'aria-haspopup': 'true',
|
|
63
|
+
'aria-expanded': open ? 'true' : undefined,
|
|
64
|
+
'aria-controls': open ? panelId : undefined,
|
|
65
|
+
onClick: handleClick,
|
|
66
|
+
onPointerUp: handlePointerUp,
|
|
67
|
+
className: resolvedClassName
|
|
68
|
+
}, other, {
|
|
69
|
+
ref
|
|
70
|
+
}), state);
|
|
71
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
72
|
+
children: element
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
process.env.NODE_ENV !== "production" ? FilterPanelTrigger.propTypes = {
|
|
76
|
+
// ----------------------------- Warning --------------------------------
|
|
77
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
78
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
79
|
+
// ----------------------------------------------------------------------
|
|
80
|
+
/**
|
|
81
|
+
* A ref for imperative actions.
|
|
82
|
+
* It currently only supports `focusVisible()` action.
|
|
83
|
+
*/
|
|
84
|
+
action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
85
|
+
current: PropTypes.shape({
|
|
86
|
+
focusVisible: PropTypes.func.isRequired
|
|
87
|
+
})
|
|
88
|
+
})]),
|
|
89
|
+
/**
|
|
90
|
+
* If `true`, the ripples are centered.
|
|
91
|
+
* They won't start at the cursor interaction position.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
centerRipple: PropTypes.bool,
|
|
95
|
+
/**
|
|
96
|
+
* A function to customize rendering of the component.
|
|
97
|
+
*/
|
|
98
|
+
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
99
|
+
/**
|
|
100
|
+
* The color of the component.
|
|
101
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
102
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
103
|
+
* @default 'primary'
|
|
104
|
+
*/
|
|
105
|
+
color: PropTypes.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
106
|
+
component: PropTypes.elementType,
|
|
107
|
+
/**
|
|
108
|
+
* If `true`, the component is disabled.
|
|
109
|
+
*/
|
|
110
|
+
disabled: PropTypes.bool,
|
|
111
|
+
/**
|
|
112
|
+
* If `true`, no elevation is used.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
disableElevation: PropTypes.bool,
|
|
116
|
+
/**
|
|
117
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
disableFocusRipple: PropTypes.bool,
|
|
121
|
+
/**
|
|
122
|
+
* If `true`, the ripple effect is disabled.
|
|
123
|
+
*
|
|
124
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
125
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
disableRipple: PropTypes.bool,
|
|
129
|
+
/**
|
|
130
|
+
* If `true`, the touch ripple effect is disabled.
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
disableTouchRipple: PropTypes.bool,
|
|
134
|
+
/**
|
|
135
|
+
* Element placed after the children.
|
|
136
|
+
*/
|
|
137
|
+
endIcon: PropTypes.node,
|
|
138
|
+
/**
|
|
139
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
focusRipple: PropTypes.bool,
|
|
143
|
+
/**
|
|
144
|
+
* This prop can help identify which element has keyboard focus.
|
|
145
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
146
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
147
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
148
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
149
|
+
* if needed.
|
|
150
|
+
*/
|
|
151
|
+
focusVisibleClassName: PropTypes.string,
|
|
152
|
+
/**
|
|
153
|
+
* If `true`, the button will take up the full width of its container.
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
fullWidth: PropTypes.bool,
|
|
157
|
+
/**
|
|
158
|
+
* The URL to link to when the button is clicked.
|
|
159
|
+
* If defined, an `a` element will be used as the root node.
|
|
160
|
+
*/
|
|
161
|
+
href: PropTypes.string,
|
|
162
|
+
/**
|
|
163
|
+
* The component used to render a link when the `href` prop is provided.
|
|
164
|
+
* @default 'a'
|
|
165
|
+
*/
|
|
166
|
+
LinkComponent: PropTypes.elementType,
|
|
167
|
+
/**
|
|
168
|
+
* Callback fired when the component is focused with a keyboard.
|
|
169
|
+
* We trigger a `onFocus` callback too.
|
|
170
|
+
*/
|
|
171
|
+
onFocusVisible: PropTypes.func,
|
|
172
|
+
/**
|
|
173
|
+
* A function to customize rendering of the component.
|
|
174
|
+
*/
|
|
175
|
+
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
176
|
+
/**
|
|
177
|
+
* The size of the component.
|
|
178
|
+
* `small` is equivalent to the dense button styling.
|
|
179
|
+
*/
|
|
180
|
+
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
181
|
+
/**
|
|
182
|
+
* Element placed before the children.
|
|
183
|
+
*/
|
|
184
|
+
startIcon: PropTypes.node,
|
|
185
|
+
style: PropTypes.object,
|
|
186
|
+
/**
|
|
187
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
188
|
+
*/
|
|
189
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
190
|
+
tabIndex: PropTypes.number,
|
|
191
|
+
/**
|
|
192
|
+
* Props applied to the `TouchRipple` element.
|
|
193
|
+
*/
|
|
194
|
+
TouchRippleProps: PropTypes.object,
|
|
195
|
+
/**
|
|
196
|
+
* A ref that points to the `TouchRipple` element.
|
|
197
|
+
*/
|
|
198
|
+
touchRippleRef: PropTypes.any,
|
|
199
|
+
/**
|
|
200
|
+
* The variant to use.
|
|
201
|
+
* @default 'text'
|
|
202
|
+
*/
|
|
203
|
+
variant: PropTypes.oneOf(['contained', 'outlined', 'text'])
|
|
204
|
+
} : void 0;
|
|
205
|
+
export { FilterPanelTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FilterPanelTrigger.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FilterPanelTrigger.js";
|
|
@@ -17,4 +17,9 @@ export * from "./GridNoColumnsOverlay.js";
|
|
|
17
17
|
export { GridPagination } from "./GridPagination.js";
|
|
18
18
|
export * from "./GridRowCount.js";
|
|
19
19
|
export * from "./GridRow.js";
|
|
20
|
-
export * from "./GridSelectedRowCount.js";
|
|
20
|
+
export * from "./GridSelectedRowCount.js";
|
|
21
|
+
export * from "./columnsPanel/index.js";
|
|
22
|
+
export * from "./export/index.js";
|
|
23
|
+
export * from "./filterPanel/index.js";
|
|
24
|
+
export * from "./toolbarV8/index.js";
|
|
25
|
+
export * from "./quickFilter/index.js";
|
package/esm/components/index.js
CHANGED
|
@@ -17,4 +17,9 @@ export * from "./GridNoColumnsOverlay.js";
|
|
|
17
17
|
export { GridPagination } from "./GridPagination.js";
|
|
18
18
|
export * from "./GridRowCount.js";
|
|
19
19
|
export * from "./GridRow.js";
|
|
20
|
-
export * from "./GridSelectedRowCount.js";
|
|
20
|
+
export * from "./GridSelectedRowCount.js";
|
|
21
|
+
export * from "./columnsPanel/index.js";
|
|
22
|
+
export * from "./export/index.js";
|
|
23
|
+
export * from "./filterPanel/index.js";
|
|
24
|
+
export * from "./toolbarV8/index.js";
|
|
25
|
+
export * from "./quickFilter/index.js";
|
|
@@ -6,6 +6,8 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect, HTMLElementType } from '@mui/utils';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
+
import { vars } from "../../constants/cssVariables.js";
|
|
10
|
+
import { useCSSVariablesClass } from "../../utils/css/context.js";
|
|
9
11
|
import { getDataGridUtilityClass, gridClasses } from "../../constants/gridClasses.js";
|
|
10
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
13
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -23,14 +25,12 @@ const useUtilityClasses = ownerState => {
|
|
|
23
25
|
const GridMenuRoot = styled(NotRendered, {
|
|
24
26
|
name: 'MuiDataGrid',
|
|
25
27
|
slot: 'Menu'
|
|
26
|
-
})(
|
|
27
|
-
|
|
28
|
-
}) => ({
|
|
29
|
-
zIndex: theme.zIndex.modal,
|
|
28
|
+
})({
|
|
29
|
+
zIndex: vars.zIndex.menu,
|
|
30
30
|
[`& .${gridClasses.menuList}`]: {
|
|
31
31
|
outline: 0
|
|
32
32
|
}
|
|
33
|
-
})
|
|
33
|
+
});
|
|
34
34
|
function GridMenu(props) {
|
|
35
35
|
const {
|
|
36
36
|
open,
|
|
@@ -45,6 +45,7 @@ function GridMenu(props) {
|
|
|
45
45
|
const apiRef = useGridApiContext();
|
|
46
46
|
const rootProps = useGridRootProps();
|
|
47
47
|
const classes = useUtilityClasses(rootProps);
|
|
48
|
+
const variablesClass = useCSSVariablesClass();
|
|
48
49
|
const savedFocusRef = React.useRef(null);
|
|
49
50
|
useEnhancedEffect(() => {
|
|
50
51
|
if (open) {
|
|
@@ -69,7 +70,7 @@ function GridMenu(props) {
|
|
|
69
70
|
};
|
|
70
71
|
return /*#__PURE__*/_jsx(GridMenuRoot, _extends({
|
|
71
72
|
as: rootProps.slots.basePopper,
|
|
72
|
-
className: clsx(classes.root, className),
|
|
73
|
+
className: clsx(classes.root, className, variablesClass),
|
|
73
74
|
ownerState: rootProps,
|
|
74
75
|
open: open,
|
|
75
76
|
target: target,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
|
+
import HTMLElementType from '@mui/utils/HTMLElementType';
|
|
5
6
|
import { useGridApiContext } from "../../../hooks/utils/useGridApiContext.js";
|
|
6
7
|
import { GridMenu } from "../GridMenu.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -7,8 +7,9 @@ import clsx from 'clsx';
|
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
8
|
import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
9
9
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
10
|
-
import Paper from '@mui/material/Paper';
|
|
11
10
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
11
|
+
import { vars } from "../../constants/cssVariables.js";
|
|
12
|
+
import { useCSSVariablesClass } from "../../utils/css/context.js";
|
|
12
13
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
13
14
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
14
15
|
import { NotRendered } from "../../utils/assert.js";
|
|
@@ -16,25 +17,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
17
|
export const gridPanelClasses = generateUtilityClasses('MuiDataGrid', ['panel', 'paper']);
|
|
17
18
|
const GridPanelRoot = styled(NotRendered, {
|
|
18
19
|
name: 'MuiDataGrid',
|
|
19
|
-
slot: '
|
|
20
|
-
})(
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
}));
|
|
25
|
-
const GridPaperRoot = styled(Paper, {
|
|
20
|
+
slot: 'panel'
|
|
21
|
+
})({
|
|
22
|
+
zIndex: vars.zIndex.panel
|
|
23
|
+
});
|
|
24
|
+
const GridPanelContent = styled('div', {
|
|
26
25
|
name: 'MuiDataGrid',
|
|
27
|
-
slot: '
|
|
28
|
-
})(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
slot: 'panelContent'
|
|
27
|
+
})({
|
|
28
|
+
backgroundColor: vars.colors.background.overlay,
|
|
29
|
+
borderRadius: vars.radius.base,
|
|
30
|
+
boxShadow: vars.shadows.overlay,
|
|
32
31
|
minWidth: 300,
|
|
33
32
|
maxHeight: 450,
|
|
34
33
|
display: 'flex',
|
|
35
|
-
maxWidth: `calc(100vw - ${
|
|
34
|
+
maxWidth: `calc(100vw - ${vars.spacing(0.5)})`,
|
|
36
35
|
overflow: 'auto'
|
|
37
|
-
})
|
|
36
|
+
});
|
|
38
37
|
const GridPanel = forwardRef((props, ref) => {
|
|
39
38
|
const {
|
|
40
39
|
children,
|
|
@@ -45,6 +44,7 @@ const GridPanel = forwardRef((props, ref) => {
|
|
|
45
44
|
const rootProps = useGridRootProps();
|
|
46
45
|
const classes = gridPanelClasses;
|
|
47
46
|
const [isPlaced, setIsPlaced] = React.useState(false);
|
|
47
|
+
const variablesClass = useCSSVariablesClass();
|
|
48
48
|
const onDidShow = useEventCallback(() => setIsPlaced(true));
|
|
49
49
|
const onDidHide = useEventCallback(() => setIsPlaced(false));
|
|
50
50
|
const handleClickAway = useEventCallback(() => {
|
|
@@ -69,7 +69,7 @@ const GridPanel = forwardRef((props, ref) => {
|
|
|
69
69
|
as: rootProps.slots.basePopper,
|
|
70
70
|
ownerState: rootProps,
|
|
71
71
|
placement: "bottom-start",
|
|
72
|
-
className: clsx(classes.panel, className),
|
|
72
|
+
className: clsx(classes.panel, className, variablesClass),
|
|
73
73
|
target: target,
|
|
74
74
|
flip: true,
|
|
75
75
|
onDidShow: onDidShow,
|
|
@@ -77,14 +77,12 @@ const GridPanel = forwardRef((props, ref) => {
|
|
|
77
77
|
onClickAway: handleClickAway,
|
|
78
78
|
clickAwayMouseEvent: "onPointerUp",
|
|
79
79
|
clickAwayTouchEvent: false,
|
|
80
|
-
focusTrap: true
|
|
81
|
-
focusTrapEnabled: true
|
|
80
|
+
focusTrap: true
|
|
82
81
|
}, other, rootProps.slotProps?.basePopper, {
|
|
83
82
|
ref: ref,
|
|
84
|
-
children: /*#__PURE__*/_jsx(
|
|
83
|
+
children: /*#__PURE__*/_jsx(GridPanelContent, {
|
|
85
84
|
className: classes.paper,
|
|
86
85
|
ownerState: rootProps,
|
|
87
|
-
elevation: 8,
|
|
88
86
|
onKeyDown: handleKeyDown,
|
|
89
87
|
children: isPlaced && children
|
|
90
88
|
})
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import { vars } from "../../constants/cssVariables.js";
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -20,19 +21,16 @@ const useUtilityClasses = ownerState => {
|
|
|
20
21
|
};
|
|
21
22
|
const GridPanelContentRoot = styled('div', {
|
|
22
23
|
name: 'MuiDataGrid',
|
|
23
|
-
slot: 'PanelContent'
|
|
24
|
-
|
|
25
|
-
})(({
|
|
26
|
-
theme
|
|
27
|
-
}) => ({
|
|
24
|
+
slot: 'PanelContent'
|
|
25
|
+
})({
|
|
28
26
|
display: 'flex',
|
|
29
27
|
flexDirection: 'column',
|
|
30
28
|
overflow: 'auto',
|
|
31
29
|
flex: '1 1',
|
|
32
30
|
maxHeight: 400,
|
|
33
|
-
padding:
|
|
34
|
-
gap:
|
|
35
|
-
})
|
|
31
|
+
padding: vars.spacing(2.5, 1.5, 2, 1),
|
|
32
|
+
gap: vars.spacing(2.5)
|
|
33
|
+
});
|
|
36
34
|
function GridPanelContent(props) {
|
|
37
35
|
const {
|
|
38
36
|
className
|