@mui/x-data-grid 8.15.0 → 8.17.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 +207 -0
- package/DataGrid/DataGrid.js +2 -0
- package/DataGrid/useDataGridComponent.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +0 -2
- package/components/GridColumnSortButton.d.ts +1 -1
- package/components/GridFooter.d.ts +2 -3
- package/components/GridFooter.js +0 -2
- package/components/GridHeader.d.ts +1 -2
- package/components/GridHeaders.d.ts +1 -2
- package/components/GridHeaders.js +0 -2
- package/components/GridNoColumnsOverlay.d.ts +2 -3
- package/components/GridNoColumnsOverlay.js +0 -2
- package/components/GridNoResultsOverlay.d.ts +2 -3
- package/components/GridNoResultsOverlay.js +0 -2
- package/components/GridNoRowsOverlay.d.ts +2 -3
- package/components/GridNoRowsOverlay.js +0 -2
- package/components/GridPagination.d.ts +1 -2
- package/components/GridScrollArea.d.ts +1 -2
- package/components/GridScrollShadows.d.ts +1 -2
- package/components/GridScrollbarFillerCell.d.ts +1 -2
- package/components/GridScrollbarFillerCell.js +0 -2
- package/components/base/GridFooterPlaceholder.d.ts +1 -2
- package/components/base/GridFooterPlaceholder.js +0 -2
- package/components/base/GridOverlays.d.ts +1 -1
- package/components/cell/GridActionsCell.d.ts +2 -3
- package/components/cell/GridActionsCell.js +2 -0
- package/components/cell/GridActionsCellItem.js +5 -18
- package/components/cell/GridBooleanCell.d.ts +1 -1
- package/components/cell/GridCell.js +8 -1
- package/components/cell/GridEditBooleanCell.d.ts +2 -2
- package/components/cell/GridEditDateCell.d.ts +2 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +0 -68
- package/components/cell/GridEditSingleSelectCell.d.ts +2 -3
- package/components/cell/GridSkeletonCell.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.d.ts +1 -2
- package/components/menu/GridMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -3
- package/components/menu/columnMenu/GridColumnMenu.js +0 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +1 -2
- package/components/panel/GridColumnsPanel.d.ts +1 -2
- package/components/panel/GridColumnsPanel.js +0 -2
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelContext.d.ts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.d.ts +1 -2
- package/components/panel/GridPreferencesPanel.js +0 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
- package/components/quickFilter/QuickFilter.d.ts +1 -1
- package/components/toolbar/GridToolbar.d.ts +1 -2
- package/components/toolbar/GridToolbar.js +0 -2
- package/components/toolbar/GridToolbarExport.d.ts +2 -2
- package/components/toolbar/GridToolbarQuickFilter.d.ts +1 -2
- package/components/toolbar/GridToolbarQuickFilter.js +0 -2
- package/components/toolbarV8/GridToolbar.d.ts +3 -3
- package/components/virtualization/GridBottomContainer.d.ts +1 -1
- package/components/virtualization/GridTopContainer.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerFiller.d.ts +1 -2
- package/context/GridContextProvider.d.ts +1 -1
- package/esm/DataGrid/DataGrid.js +2 -0
- package/esm/DataGrid/useDataGridComponent.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/esm/components/GridColumnSortButton.d.ts +1 -1
- package/esm/components/GridFooter.d.ts +2 -3
- package/esm/components/GridFooter.js +0 -1
- package/esm/components/GridHeader.d.ts +1 -2
- package/esm/components/GridHeaders.d.ts +1 -2
- package/esm/components/GridHeaders.js +0 -1
- package/esm/components/GridNoColumnsOverlay.d.ts +2 -3
- package/esm/components/GridNoColumnsOverlay.js +0 -1
- package/esm/components/GridNoResultsOverlay.d.ts +2 -3
- package/esm/components/GridNoResultsOverlay.js +0 -1
- package/esm/components/GridNoRowsOverlay.d.ts +2 -3
- package/esm/components/GridNoRowsOverlay.js +0 -1
- package/esm/components/GridPagination.d.ts +1 -2
- package/esm/components/GridScrollArea.d.ts +1 -2
- package/esm/components/GridScrollShadows.d.ts +1 -2
- package/esm/components/GridScrollbarFillerCell.d.ts +1 -2
- package/esm/components/GridScrollbarFillerCell.js +0 -1
- package/esm/components/base/GridFooterPlaceholder.d.ts +1 -2
- package/esm/components/base/GridFooterPlaceholder.js +0 -1
- package/esm/components/base/GridOverlays.d.ts +1 -1
- package/esm/components/cell/GridActionsCell.d.ts +2 -3
- package/esm/components/cell/GridActionsCell.js +2 -0
- package/esm/components/cell/GridActionsCellItem.js +4 -17
- package/esm/components/cell/GridBooleanCell.d.ts +1 -1
- package/esm/components/cell/GridCell.js +8 -1
- package/esm/components/cell/GridEditBooleanCell.d.ts +2 -2
- package/esm/components/cell/GridEditDateCell.d.ts +2 -2
- package/esm/components/cell/GridEditInputCell.d.ts +1 -1
- package/esm/components/cell/GridEditInputCell.js +0 -68
- package/esm/components/cell/GridEditSingleSelectCell.d.ts +2 -3
- package/esm/components/cell/GridSkeletonCell.d.ts +1 -1
- package/esm/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/esm/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.d.ts +1 -2
- package/esm/components/menu/GridMenu.d.ts +1 -1
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/esm/components/menu/columnMenu/GridColumnMenu.d.ts +2 -3
- package/esm/components/menu/columnMenu/GridColumnMenu.js +0 -1
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +1 -2
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +1 -2
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +1 -2
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +1 -2
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +1 -2
- package/esm/components/panel/GridColumnsPanel.d.ts +1 -2
- package/esm/components/panel/GridColumnsPanel.js +0 -1
- package/esm/components/panel/GridPanelContent.d.ts +1 -1
- package/esm/components/panel/GridPanelContext.d.ts +1 -1
- package/esm/components/panel/GridPanelFooter.d.ts +1 -1
- package/esm/components/panel/GridPanelHeader.d.ts +1 -1
- package/esm/components/panel/GridPreferencesPanel.d.ts +1 -2
- package/esm/components/panel/GridPreferencesPanel.js +0 -1
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
- package/esm/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -2
- package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
- package/esm/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
- package/esm/components/quickFilter/QuickFilter.d.ts +1 -1
- package/esm/components/toolbar/GridToolbar.d.ts +1 -2
- package/esm/components/toolbar/GridToolbar.js +0 -1
- package/esm/components/toolbar/GridToolbarExport.d.ts +2 -2
- package/esm/components/toolbar/GridToolbarQuickFilter.d.ts +1 -2
- package/esm/components/toolbar/GridToolbarQuickFilter.js +0 -1
- package/esm/components/toolbarV8/GridToolbar.d.ts +3 -3
- package/esm/components/virtualization/GridBottomContainer.d.ts +1 -1
- package/esm/components/virtualization/GridTopContainer.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScroller.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScrollerFiller.d.ts +1 -2
- package/esm/context/GridContextProvider.d.ts +1 -1
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -2
- package/esm/hooks/features/editing/useGridCellEditable.d.ts +5 -0
- package/esm/hooks/features/editing/useGridCellEditable.js +9 -0
- package/esm/hooks/features/editing/useGridEditing.d.ts +2 -1
- package/esm/hooks/features/editing/useGridEditing.js +4 -4
- package/esm/hooks/features/focus/useGridFocus.js +4 -2
- package/esm/hooks/features/pagination/useGridPaginationModel.js +5 -3
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +3 -1
- package/esm/index.js +1 -1
- package/esm/internals/demo/TailwindDemoContainer.d.ts +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/locales/arSD.js +12 -12
- package/esm/locales/caES.d.ts +2 -0
- package/esm/locales/caES.js +291 -0
- package/esm/locales/esES.js +109 -120
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/material/icons/index.d.ts +0 -1
- package/esm/material/icons/index.js +0 -1
- package/esm/models/configuration/gridCellEditableConfiguration.d.ts +19 -0
- package/esm/models/configuration/gridCellEditableConfiguration.js +1 -0
- package/esm/models/configuration/gridConfiguration.d.ts +2 -1
- package/esm/utils/css/context.d.ts +3 -3
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditable.d.ts +5 -0
- package/hooks/features/editing/useGridCellEditable.js +15 -0
- package/hooks/features/editing/useGridEditing.d.ts +2 -1
- package/hooks/features/editing/useGridEditing.js +4 -4
- package/hooks/features/focus/useGridFocus.js +4 -2
- package/hooks/features/pagination/useGridPaginationModel.js +5 -3
- package/hooks/features/rowSelection/useGridRowSelection.js +3 -1
- package/index.js +1 -1
- package/internals/demo/TailwindDemoContainer.d.ts +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +8 -0
- package/locales/arSD.js +12 -12
- package/locales/caES.d.ts +2 -0
- package/locales/caES.js +297 -0
- package/locales/esES.js +109 -120
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/material/icons/index.d.ts +0 -1
- package/material/icons/index.js +0 -2
- package/models/configuration/gridCellEditableConfiguration.d.ts +19 -0
- package/models/configuration/gridCellEditableConfiguration.js +5 -0
- package/models/configuration/gridConfiguration.d.ts +2 -1
- package/package.json +3 -3
- package/utils/css/context.d.ts +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { GridPanelWrapper } from "./GridPanelWrapper.js";
|
|
4
3
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelContent(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}):
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare namespace GridPanelContent {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
3
|
declare function GridPanelFooter(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}):
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare namespace GridPanelFooter {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}):
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare namespace GridPanelHeader {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GridPreferencesPanel(): React.JSX.Element;
|
|
1
|
+
export declare function GridPreferencesPanel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { gridColumnDefinitionsSelector } from "../../hooks/features/columns/gridColumnsSelector.js";
|
|
4
3
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
5
4
|
import { gridPreferencePanelStateSelector } from "../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TextFieldProps } from "../../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
3
|
export type GridFilterInputBooleanProps = GridFilterInputValueProps<TextFieldProps>;
|
|
5
|
-
declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps):
|
|
4
|
+
declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
declare namespace GridFilterInputBoolean {
|
|
7
6
|
var propTypes: any;
|
|
8
7
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
3
2
|
import { TextFieldProps } from "../../../models/gridBaseSlots.js";
|
|
4
3
|
export type GridFilterInputDateProps = GridFilterInputValueProps<TextFieldProps> & {
|
|
5
4
|
type?: 'date' | 'datetime-local';
|
|
6
5
|
};
|
|
7
|
-
declare function GridFilterInputDate(props: GridFilterInputDateProps):
|
|
6
|
+
declare function GridFilterInputDate(props: GridFilterInputDateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
declare namespace GridFilterInputDate {
|
|
9
8
|
var propTypes: any;
|
|
10
9
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
3
|
import type { ValueOptions } from "../../../models/colDef/gridColDef.js";
|
|
5
4
|
export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options'>> & {
|
|
6
5
|
type?: 'singleSelect';
|
|
7
6
|
};
|
|
8
|
-
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps):
|
|
7
|
+
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
8
|
declare namespace GridFilterInputMultipleSingleSelect {
|
|
10
9
|
var propTypes: any;
|
|
11
10
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
3
|
export type GridFilterInputMultipleValueProps = GridFilterInputValueProps<Omit<AutocompleteProps<string, true, false, true>, 'options'>> & {
|
|
5
4
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
6
5
|
};
|
|
7
|
-
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps):
|
|
6
|
+
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
declare namespace GridFilterInputMultipleValue {
|
|
9
8
|
var propTypes: any;
|
|
10
9
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TextFieldProps } from "../../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
3
|
export type GridFilterInputSingleSelectProps = GridFilterInputValueProps<TextFieldProps> & {
|
|
5
4
|
type?: 'singleSelect';
|
|
6
5
|
};
|
|
7
|
-
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps):
|
|
6
|
+
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
7
|
declare namespace GridFilterInputSingleSelect {
|
|
9
8
|
var propTypes: any;
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TextFieldProps } from "../../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
4
3
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
@@ -8,7 +7,7 @@ export type GridTypeFilterInputValueProps = GridFilterInputValueProps<TextFieldP
|
|
|
8
7
|
export type ItemPlusTag = GridFilterItem & {
|
|
9
8
|
fromInput?: string;
|
|
10
9
|
};
|
|
11
|
-
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps):
|
|
10
|
+
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
declare namespace GridFilterInputValue {
|
|
13
12
|
var propTypes: any;
|
|
14
13
|
}
|
|
@@ -57,7 +57,7 @@ export type QuickFilterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'class
|
|
|
57
57
|
*
|
|
58
58
|
* - [QuickFilter API](https://mui.com/x/api/data-grid/quick-filter/)
|
|
59
59
|
*/
|
|
60
|
-
declare function QuickFilter(props: QuickFilterProps):
|
|
60
|
+
declare function QuickFilter(props: QuickFilterProps): import("react/jsx-runtime").JSX.Element;
|
|
61
61
|
declare namespace QuickFilter {
|
|
62
62
|
var propTypes: any;
|
|
63
63
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { GridToolbarContainerProps } from "../containers/GridToolbarContainer.js";
|
|
3
2
|
import { GridToolbarExportProps } from "./GridToolbarExport.js";
|
|
4
3
|
import { GridToolbarQuickFilterProps } from "./GridToolbarQuickFilter.js";
|
|
@@ -16,5 +15,5 @@ export interface GridToolbarProps extends GridToolbarContainerProps, GridToolbar
|
|
|
16
15
|
/**
|
|
17
16
|
* @deprecated Use the `showToolbar` prop to show the default toolbar instead. This component will be removed in a future major release.
|
|
18
17
|
*/
|
|
19
|
-
declare const GridToolbar:
|
|
18
|
+
declare const GridToolbar: import("react").ForwardRefExoticComponent<GridToolbarProps> | import("react").ForwardRefExoticComponent<GridToolbarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
19
|
export { GridToolbar };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
6
|
import { GridToolbarContainer } from "../containers/GridToolbarContainer.js";
|
|
@@ -27,11 +27,11 @@ export interface GridToolbarExportProps {
|
|
|
27
27
|
};
|
|
28
28
|
[x: `data-${string}`]: string;
|
|
29
29
|
}
|
|
30
|
-
declare function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps):
|
|
30
|
+
declare function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
declare namespace GridCsvExportMenuItem {
|
|
32
32
|
var propTypes: any;
|
|
33
33
|
}
|
|
34
|
-
declare function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps):
|
|
34
|
+
declare function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
declare namespace GridPrintExportMenuItem {
|
|
36
36
|
var propTypes: any;
|
|
37
37
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TextFieldProps } from "../../models/gridBaseSlots.js";
|
|
3
2
|
import { GridFilterModel } from "../../models/gridFilterModel.js";
|
|
4
3
|
export type GridToolbarQuickFilterProps = {
|
|
@@ -31,7 +30,7 @@ export type GridToolbarQuickFilterProps = {
|
|
|
31
30
|
/**
|
|
32
31
|
* @deprecated Use the {@link https://mui.com/x/react-data-grid/components/quick-filter/ Quick Filter} component instead. This component will be removed in a future major release.
|
|
33
32
|
*/
|
|
34
|
-
declare function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps):
|
|
33
|
+
declare function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps): import("react/jsx-runtime").JSX.Element;
|
|
35
34
|
declare namespace GridToolbarQuickFilter {
|
|
36
35
|
var propTypes: any;
|
|
37
36
|
}
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["quickFilterParser", "quickFilterFormatter", "debounceMs", "className", "slotProps"],
|
|
4
4
|
_excluded2 = ["ref", "slotProps"];
|
|
5
|
-
import * as React from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
7
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
7
|
import { styled } from '@mui/system';
|
|
@@ -5,12 +5,12 @@ interface GridToolbarInternalProps {
|
|
|
5
5
|
additionalExportMenuItems?: (onMenuItemClick: () => void) => React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export type GridToolbarProps = GridSlotProps['toolbar'] & GridToolbarInternalProps;
|
|
8
|
-
declare function GridToolbarDivider(props: GridSlotProps['baseDivider']):
|
|
8
|
+
declare function GridToolbarDivider(props: GridSlotProps['baseDivider']): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare namespace GridToolbarDivider {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
12
|
-
declare function GridToolbarLabel(props: React.HTMLAttributes<HTMLSpanElement>):
|
|
13
|
-
declare function GridToolbar(props: GridToolbarProps):
|
|
12
|
+
declare function GridToolbarLabel(props: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function GridToolbar(props: GridToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
declare namespace GridToolbar {
|
|
15
15
|
var propTypes: any;
|
|
16
16
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type GridBottomContainerProps = React.PropsWithChildren;
|
|
3
|
-
export declare function GridBottomContainer(props: GridBottomContainerProps):
|
|
3
|
+
export declare function GridBottomContainer(props: GridBottomContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare function GridTopContainer(props: React.PropsWithChildren):
|
|
2
|
+
export declare function GridTopContainer(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
export interface GridVirtualScrollerProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
declare function GridVirtualScroller(props: GridVirtualScrollerProps):
|
|
5
|
+
declare function GridVirtualScroller(props: GridVirtualScrollerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { GridVirtualScroller };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
type Props = {
|
|
3
2
|
/** The number of rows */
|
|
4
3
|
rowsLength: number;
|
|
5
4
|
};
|
|
6
5
|
declare function GridVirtualScrollerFiller({
|
|
7
6
|
rowsLength
|
|
8
|
-
}: Props):
|
|
7
|
+
}: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
9
8
|
declare const Memoized: typeof GridVirtualScrollerFiller;
|
|
10
9
|
export { Memoized as GridVirtualScrollerFiller };
|
|
@@ -48,8 +48,8 @@ export declare const useGridColumnHeaders: (props: UseGridColumnHeadersProps) =>
|
|
|
48
48
|
};
|
|
49
49
|
visibleColumns: GridStateColDef[];
|
|
50
50
|
columnPositions: number[];
|
|
51
|
-
getFillers: (params: GetHeadersParams | undefined, children: React.ReactNode, leftOverflow: number, borderBottom?: boolean) =>
|
|
52
|
-
getColumnHeadersRow: () =>
|
|
51
|
+
getFillers: (params: GetHeadersParams | undefined, children: React.ReactNode, leftOverflow: number, borderBottom?: boolean) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
getColumnHeadersRow: () => import("react/jsx-runtime").JSX.Element;
|
|
53
53
|
getColumnsToRender: (params?: GetHeadersParams) => {
|
|
54
54
|
renderedColumns: GridStateColDef[];
|
|
55
55
|
firstColumnToRender: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { isAutogeneratedRowNode } from "../rows/gridRowsUtils.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation of the cell editable condition hook
|
|
8
|
+
*/
|
|
9
|
+
export const useIsCellEditable = () => React.useCallback(params => !isAutogeneratedRowNode(params.rowNode), []);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
3
3
|
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
4
|
+
import { GridConfiguration } from "../../../models/configuration/gridConfiguration.js";
|
|
4
5
|
import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
5
6
|
export declare const editingStateInitializer: GridStateInitializer;
|
|
6
|
-
export declare const useGridEditing: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "isCellEditable" | "editMode" | "processRowUpdate" | "dataSource" | "onDataSourceError"
|
|
7
|
+
export declare const useGridEditing: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "isCellEditable" | "editMode" | "processRowUpdate" | "dataSource" | "onDataSourceError">, configuration: GridConfiguration) => void;
|
|
@@ -7,19 +7,19 @@ import { useGridCellEditing } from "./useGridCellEditing.js";
|
|
|
7
7
|
import { GridCellModes, GridEditModes } from "../../../models/gridEditRowModel.js";
|
|
8
8
|
import { useGridRowEditing } from "./useGridRowEditing.js";
|
|
9
9
|
import { gridEditRowsStateSelector } from "./gridEditingSelectors.js";
|
|
10
|
-
import { isAutogeneratedRowNode } from "../rows/gridRowsUtils.js";
|
|
11
10
|
export const editingStateInitializer = state => _extends({}, state, {
|
|
12
11
|
editRows: {}
|
|
13
12
|
});
|
|
14
|
-
export const useGridEditing = (apiRef, props) => {
|
|
13
|
+
export const useGridEditing = (apiRef, props, configuration) => {
|
|
15
14
|
useGridCellEditing(apiRef, props);
|
|
16
15
|
useGridRowEditing(apiRef, props);
|
|
17
16
|
const debounceMap = React.useRef({});
|
|
18
17
|
const {
|
|
19
18
|
isCellEditable: isCellEditableProp
|
|
20
19
|
} = props;
|
|
20
|
+
const isCellEditableFn = configuration.hooks.useIsCellEditable(apiRef, props);
|
|
21
21
|
const isCellEditable = React.useCallback(params => {
|
|
22
|
-
if (
|
|
22
|
+
if (!isCellEditableFn(params)) {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
if (!params.colDef.editable) {
|
|
@@ -32,7 +32,7 @@ export const useGridEditing = (apiRef, props) => {
|
|
|
32
32
|
return isCellEditableProp(params);
|
|
33
33
|
}
|
|
34
34
|
return true;
|
|
35
|
-
}, [isCellEditableProp]);
|
|
35
|
+
}, [isCellEditableProp, isCellEditableFn]);
|
|
36
36
|
const maybeDebounce = (id, field, debounceMs, callback) => {
|
|
37
37
|
if (!debounceMs) {
|
|
38
38
|
callback();
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import debounce from '@mui/utils/debounce';
|
|
5
6
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
7
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
7
8
|
import { gridClasses } from "../../../constants/gridClasses.js";
|
|
@@ -318,7 +319,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
318
319
|
apiRef.current.setCellFocus(params.id, params.field);
|
|
319
320
|
}
|
|
320
321
|
}, [apiRef]);
|
|
321
|
-
const
|
|
322
|
+
const handleRowsSet = React.useCallback(() => {
|
|
322
323
|
const cell = gridFocusCellSelector(apiRef);
|
|
323
324
|
|
|
324
325
|
// If the focused cell is in a row which does not exist anymore,
|
|
@@ -349,6 +350,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
349
350
|
}));
|
|
350
351
|
}
|
|
351
352
|
}, [apiRef, props.pagination, props.paginationMode]);
|
|
353
|
+
const debouncedHandleRowsSet = React.useMemo(() => debounce(handleRowsSet, 0), [handleRowsSet]);
|
|
352
354
|
const handlePaginationModelChange = useEventCallback(() => {
|
|
353
355
|
const currentFocusedCell = gridFocusCellSelector(apiRef);
|
|
354
356
|
if (!currentFocusedCell) {
|
|
@@ -403,6 +405,6 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
403
405
|
useGridEvent(apiRef, 'cellModeChange', handleCellModeChange);
|
|
404
406
|
useGridEvent(apiRef, 'columnHeaderFocus', handleColumnHeaderFocus);
|
|
405
407
|
useGridEvent(apiRef, 'columnGroupHeaderFocus', handleColumnGroupHeaderFocus);
|
|
406
|
-
useGridEvent(apiRef, 'rowsSet',
|
|
408
|
+
useGridEvent(apiRef, 'rowsSet', debouncedHandleRowsSet);
|
|
407
409
|
useGridEvent(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
408
410
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import debounce from '@mui/utils/debounce';
|
|
5
6
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
7
|
import { gridFilterModelSelector, gridFilterActiveItemsSelector } from "../filter/gridFilterSelector.js";
|
|
7
8
|
import { gridDensityFactorSelector } from "../density/index.js";
|
|
@@ -174,6 +175,7 @@ export const useGridPaginationModel = (apiRef, props) => {
|
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
}, [apiRef]);
|
|
178
|
+
const debouncedNavigateToStart = React.useMemo(() => debounce(navigateToStart, 0), [navigateToStart]);
|
|
177
179
|
|
|
178
180
|
/**
|
|
179
181
|
* Resets the page only if the active items or quick filter has changed from the last time.
|
|
@@ -190,12 +192,12 @@ export const useGridPaginationModel = (apiRef, props) => {
|
|
|
190
192
|
return;
|
|
191
193
|
}
|
|
192
194
|
previousFilterModel.current = currentActiveFilters;
|
|
193
|
-
|
|
194
|
-
}, [apiRef,
|
|
195
|
+
debouncedNavigateToStart();
|
|
196
|
+
}, [apiRef, debouncedNavigateToStart]);
|
|
195
197
|
useGridEvent(apiRef, 'viewportInnerSizeChange', handleUpdateAutoPageSize);
|
|
196
198
|
useGridEvent(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
197
199
|
useGridEvent(apiRef, 'rowCountChange', handleRowCountChange);
|
|
198
|
-
useGridEvent(apiRef, 'sortModelChange',
|
|
200
|
+
useGridEvent(apiRef, 'sortModelChange', debouncedNavigateToStart);
|
|
199
201
|
useGridEvent(apiRef, 'filterModelChange', handleFilterModelChange);
|
|
200
202
|
|
|
201
203
|
/**
|
|
@@ -506,7 +506,9 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
506
506
|
}
|
|
507
507
|
if (String.fromCharCode(event.keyCode) === 'A' && (event.ctrlKey || event.metaKey)) {
|
|
508
508
|
event.preventDefault();
|
|
509
|
-
|
|
509
|
+
if (canHaveMultipleSelection) {
|
|
510
|
+
toggleAllRows(true);
|
|
511
|
+
}
|
|
510
512
|
}
|
|
511
513
|
}, [apiRef, canHaveMultipleSelection, handleSingleRowSelection, toggleAllRows]);
|
|
512
514
|
const syncControlledState = useEventCallback(() => {
|
package/esm/index.js
CHANGED
|
@@ -7,5 +7,5 @@ interface TailwindDemoContainerProps {
|
|
|
7
7
|
* WARNING: This is an internal component used in documentation to inject the Tailwind script.
|
|
8
8
|
* Please do not use it in your application.
|
|
9
9
|
*/
|
|
10
|
-
export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
10
|
+
export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
11
11
|
export {};
|
package/esm/internals/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
|
56
56
|
export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
57
57
|
export { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
|
|
58
58
|
export { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
|
|
59
|
+
export { useIsCellEditable } from "../hooks/features/editing/useGridCellEditable.js";
|
|
59
60
|
export { useGridRowsPreProcessors } from "../hooks/features/rows/useGridRowsPreProcessors.js";
|
|
60
61
|
export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
61
62
|
export { getTreeNodeDescendants, buildRootGroup } from "../hooks/features/rows/gridRowsUtils.js";
|
|
@@ -117,6 +118,7 @@ export type { Localization } from "../utils/getGridLocalization.js";
|
|
|
117
118
|
export * from "./demo/index.js";
|
|
118
119
|
export { GridSkeletonLoadingOverlayInner } from "../components/GridSkeletonLoadingOverlay.js";
|
|
119
120
|
export type { GridConfiguration } from "../models/configuration/gridConfiguration.js";
|
|
121
|
+
export type { CellEditableConditionFn } from "../models/configuration/gridCellEditableConfiguration.js";
|
|
120
122
|
export * from "../hooks/features/pivoting/index.js";
|
|
121
123
|
export { createSvgIcon } from "../material/icons/createSvgIcon.js";
|
|
122
124
|
export { useGridPanelContext } from "../components/panel/GridPanelContext.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
|
45
45
|
export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
46
46
|
export { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
|
|
47
47
|
export { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
|
|
48
|
+
export { useIsCellEditable } from "../hooks/features/editing/useGridCellEditable.js";
|
|
48
49
|
export { useGridRowsPreProcessors } from "../hooks/features/rows/useGridRowsPreProcessors.js";
|
|
49
50
|
export { getTreeNodeDescendants, buildRootGroup } from "../hooks/features/rows/gridRowsUtils.js";
|
|
50
51
|
export { useGridRowsMeta, rowsMetaStateInitializer } from "../hooks/features/rows/useGridRowsMeta.js";
|
package/esm/locales/arSD.js
CHANGED
|
@@ -160,18 +160,18 @@ const arSDGrid = {
|
|
|
160
160
|
collapseDetailPanel: 'طوي',
|
|
161
161
|
// Pagination
|
|
162
162
|
paginationRowsPerPage: 'عدد الصفوف في الصفحة:',
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
163
|
+
paginationDisplayedRows: ({
|
|
164
|
+
from,
|
|
165
|
+
to,
|
|
166
|
+
count,
|
|
167
|
+
estimated
|
|
168
|
+
}) => {
|
|
169
|
+
if (!estimated) {
|
|
170
|
+
return `\u200E${to}-${from}\u200E من ${count !== -1 ? count : `أكثر من ${to}`}`;
|
|
171
|
+
}
|
|
172
|
+
const estimatedLabel = estimated && estimated > to ? `حوالي ${estimated}` : `أكثر من ${to}`;
|
|
173
|
+
return `\u200E${to}-${from}\u200E من ${count !== -1 ? count : estimatedLabel}`;
|
|
174
|
+
},
|
|
175
175
|
paginationItemAriaLabel: type => {
|
|
176
176
|
if (type === 'first') {
|
|
177
177
|
return 'انتقل إلى الصفحة الأولى';
|