@mui/x-data-grid 9.10.1 → 9.12.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 +283 -0
- package/DataGrid/DataGrid.js +3 -1
- package/DataGrid/DataGrid.mjs +3 -1
- package/DataGrid/useDataGridProps.d.mts +1 -1
- package/DataGrid/useDataGridProps.d.ts +1 -1
- package/README.md +1 -11
- package/components/cell/GridCell.js +14 -1
- package/components/cell/GridCell.mjs +14 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +4 -0
- package/components/columnHeaders/GridColumnHeaderItem.mjs +4 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.mts +7 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +7 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +5 -4
- package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +5 -4
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +18 -6
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +18 -6
- package/components/toolbarV8/Toolbar.js +2 -125
- package/components/toolbarV8/Toolbar.mjs +2 -125
- package/components/toolbarV8/ToolbarButton.js +11 -50
- package/components/toolbarV8/ToolbarButton.mjs +11 -50
- package/constants/gridClasses.d.mts +12 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/constants/gridClasses.mjs +1 -1
- package/constants/localeTextConstants.js +4 -0
- package/constants/localeTextConstants.mjs +4 -0
- package/hooks/core/useGridApiInitialization.js +5 -1
- package/hooks/core/useGridApiInitialization.mjs +5 -1
- package/hooks/core/useGridStateInitialization.js +3 -1
- package/hooks/core/useGridStateInitialization.mjs +3 -1
- package/hooks/core/useGridVirtualizer.js +3 -0
- package/hooks/core/useGridVirtualizer.mjs +3 -0
- package/hooks/features/columnResize/useGridColumnResize.js +5 -0
- package/hooks/features/columnResize/useGridColumnResize.mjs +5 -0
- package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/hooks/features/columns/gridColumnsUtils.mjs +2 -2
- package/hooks/features/dataSource/gridDataSourceSelector.js +6 -2
- package/hooks/features/dataSource/gridDataSourceSelector.mjs +6 -2
- package/hooks/features/dataSource/useGridDataSourceBase.js +47 -5
- package/hooks/features/dataSource/useGridDataSourceBase.mjs +47 -5
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.d.mts +9 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.d.ts +9 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.js +57 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.mjs +49 -0
- package/hooks/features/editing/useGridCellEditing.js +3 -1
- package/hooks/features/editing/useGridCellEditing.mjs +3 -1
- package/hooks/features/editing/useGridRowEditing.js +3 -1
- package/hooks/features/editing/useGridRowEditing.mjs +3 -1
- package/hooks/features/filter/gridFilterUtils.d.mts +13 -0
- package/hooks/features/filter/gridFilterUtils.d.ts +13 -0
- package/hooks/features/filter/gridFilterUtils.js +32 -1
- package/hooks/features/filter/gridFilterUtils.mjs +29 -1
- package/hooks/features/filter/useGridFilter.js +1 -21
- package/hooks/features/filter/useGridFilter.mjs +2 -22
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +1 -1
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.js +17 -1
- package/hooks/features/rows/gridRowsUtils.mjs +17 -1
- package/hooks/features/rows/useGridRowSpanning.js +5 -0
- package/hooks/features/rows/useGridRowSpanning.mjs +5 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.mts +1 -1
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/utils/useGridEvent.d.mts +2 -2
- package/hooks/utils/useGridEvent.d.ts +2 -2
- package/hooks/utils/useGridEvent.js +2 -0
- package/hooks/utils/useGridEvent.mjs +2 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +20 -0
- package/internals/index.mjs +2 -0
- package/locales/arSD.js +5 -0
- package/locales/arSD.mjs +5 -0
- package/locales/beBY.js +5 -0
- package/locales/beBY.mjs +5 -0
- package/locales/bgBG.js +5 -0
- package/locales/bgBG.mjs +5 -0
- package/locales/bnBD.js +5 -0
- package/locales/bnBD.mjs +5 -0
- package/locales/caES.js +5 -0
- package/locales/caES.mjs +5 -0
- package/locales/csCZ.js +5 -0
- package/locales/csCZ.mjs +5 -0
- package/locales/daDK.js +5 -0
- package/locales/daDK.mjs +5 -0
- package/locales/deDE.js +5 -0
- package/locales/deDE.mjs +5 -0
- package/locales/elGR.js +5 -0
- package/locales/elGR.mjs +5 -0
- package/locales/esES.js +5 -0
- package/locales/esES.mjs +5 -0
- package/locales/faIR.js +5 -0
- package/locales/faIR.mjs +5 -0
- package/locales/fiFI.js +5 -0
- package/locales/fiFI.mjs +5 -0
- package/locales/frFR.js +5 -0
- package/locales/frFR.mjs +5 -0
- package/locales/heIL.js +5 -0
- package/locales/heIL.mjs +5 -0
- package/locales/hrHR.js +5 -0
- package/locales/hrHR.mjs +5 -0
- package/locales/huHU.js +5 -0
- package/locales/huHU.mjs +5 -0
- package/locales/hyAM.js +5 -0
- package/locales/hyAM.mjs +5 -0
- package/locales/idID.js +5 -0
- package/locales/idID.mjs +5 -0
- package/locales/isIS.js +5 -0
- package/locales/isIS.mjs +5 -0
- package/locales/itIT.js +5 -0
- package/locales/itIT.mjs +5 -0
- package/locales/jaJP.js +5 -0
- package/locales/jaJP.mjs +5 -0
- package/locales/koKR.js +5 -0
- package/locales/koKR.mjs +5 -0
- package/locales/nbNO.js +5 -0
- package/locales/nbNO.mjs +5 -0
- package/locales/nlNL.js +5 -0
- package/locales/nlNL.mjs +5 -0
- package/locales/nnNO.js +5 -0
- package/locales/nnNO.mjs +5 -0
- package/locales/plPL.js +5 -0
- package/locales/plPL.mjs +5 -0
- package/locales/ptBR.js +5 -0
- package/locales/ptBR.mjs +5 -0
- package/locales/ptPT.js +5 -0
- package/locales/ptPT.mjs +5 -0
- package/locales/roRO.js +5 -0
- package/locales/roRO.mjs +5 -0
- package/locales/ruRU.js +5 -0
- package/locales/ruRU.mjs +5 -0
- package/locales/skSK.js +5 -0
- package/locales/skSK.mjs +5 -0
- package/locales/svSE.js +5 -0
- package/locales/svSE.mjs +5 -0
- package/locales/thTH.js +5 -0
- package/locales/thTH.mjs +5 -0
- package/locales/trTR.js +5 -0
- package/locales/trTR.mjs +5 -0
- package/locales/ukUA.js +5 -0
- package/locales/ukUA.mjs +5 -0
- package/locales/urPK.js +5 -0
- package/locales/urPK.mjs +5 -0
- package/locales/viVN.js +5 -0
- package/locales/viVN.mjs +5 -0
- package/locales/zhCN.js +5 -0
- package/locales/zhCN.mjs +5 -0
- package/locales/zhHK.js +5 -0
- package/locales/zhHK.mjs +5 -0
- package/locales/zhTW.js +5 -0
- package/locales/zhTW.mjs +5 -0
- package/models/api/gridApiCommon.d.mts +2 -2
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCallbackDetails.d.mts +11 -1
- package/models/api/gridCallbackDetails.d.ts +11 -1
- package/models/api/gridLocaleTextApi.d.mts +3 -0
- package/models/api/gridLocaleTextApi.d.ts +3 -0
- package/models/api/gridRowApi.d.mts +12 -0
- package/models/api/gridRowApi.d.ts +12 -0
- package/models/api/gridStateApi.d.mts +3 -2
- package/models/api/gridStateApi.d.ts +3 -2
- package/models/api/index.d.mts +1 -1
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.mts +5 -0
- package/models/colDef/gridColDef.d.ts +5 -0
- package/models/configuration/gridConfiguration.d.mts +13 -1
- package/models/configuration/gridConfiguration.d.ts +13 -1
- package/models/controlStateItem.d.mts +3 -2
- package/models/controlStateItem.d.ts +3 -2
- package/models/events/gridEventListener.d.mts +3 -2
- package/models/events/gridEventListener.d.ts +3 -2
- package/models/props/DataGridProps.d.mts +38 -35
- package/models/props/DataGridProps.d.ts +38 -35
- package/package.json +4 -4
- package/utils/domUtils.js +1 -1
- package/utils/domUtils.mjs +1 -1
- package/utils/getPublicApiRef.d.mts +2 -2
- package/utils/getPublicApiRef.d.ts +2 -2
- package/utils/getPublicApiRef.js +15 -3
- package/utils/getPublicApiRef.mjs +15 -3
- package/components/toolbarV8/ToolbarContext.d.mts +0 -11
- package/components/toolbarV8/ToolbarContext.d.ts +0 -11
- package/components/toolbarV8/ToolbarContext.js +0 -21
- package/components/toolbarV8/ToolbarContext.mjs +0 -13
- package/components/toolbarV8/utils.d.mts +0 -5
- package/components/toolbarV8/utils.d.ts +0 -5
- package/components/toolbarV8/utils.js +0 -23
- package/components/toolbarV8/utils.mjs +0 -17
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridCallbackDetails } from "./api/gridCallbackDetails.mjs";
|
|
3
|
+
import type { GridApiCommon } from "./api/gridApiCommon.mjs";
|
|
3
4
|
import type { GridEventLookup, GridControlledStateEventLookup } from "./events/index.mjs";
|
|
4
5
|
import type { OutputSelector } from "../utils/createSelector.mjs";
|
|
5
6
|
import type { GridStateCommunity } from "./gridStateCommunity.mjs";
|
|
6
|
-
export interface GridControlStateItem<State extends GridStateCommunity, Args, E extends keyof GridControlledStateEventLookup> {
|
|
7
|
+
export interface GridControlStateItem<State extends GridStateCommunity, Args, E extends keyof GridControlledStateEventLookup, Api extends GridApiCommon = GridApiCommon> {
|
|
7
8
|
stateId: string;
|
|
8
9
|
propModel?: GridEventLookup[E]['params'];
|
|
9
10
|
stateSelector: OutputSelector<State, Args, GridControlledStateEventLookup[E]['params']> | ((apiRef: RefObject<{
|
|
10
11
|
state: State;
|
|
11
12
|
}>) => GridControlledStateEventLookup[E]['params']);
|
|
12
|
-
propOnChange?: (model: GridControlledStateEventLookup[E]['params'], details: GridCallbackDetails) => void;
|
|
13
|
+
propOnChange?: (model: GridControlledStateEventLookup[E]['params'], details: GridCallbackDetails<any, Api>) => void;
|
|
13
14
|
changeEvent: E;
|
|
14
15
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridCallbackDetails } from "./api/gridCallbackDetails.js";
|
|
3
|
+
import type { GridApiCommon } from "./api/gridApiCommon.js";
|
|
3
4
|
import type { GridEventLookup, GridControlledStateEventLookup } from "./events/index.js";
|
|
4
5
|
import type { OutputSelector } from "../utils/createSelector.js";
|
|
5
6
|
import type { GridStateCommunity } from "./gridStateCommunity.js";
|
|
6
|
-
export interface GridControlStateItem<State extends GridStateCommunity, Args, E extends keyof GridControlledStateEventLookup> {
|
|
7
|
+
export interface GridControlStateItem<State extends GridStateCommunity, Args, E extends keyof GridControlledStateEventLookup, Api extends GridApiCommon = GridApiCommon> {
|
|
7
8
|
stateId: string;
|
|
8
9
|
propModel?: GridEventLookup[E]['params'];
|
|
9
10
|
stateSelector: OutputSelector<State, Args, GridControlledStateEventLookup[E]['params']> | ((apiRef: RefObject<{
|
|
10
11
|
state: State;
|
|
11
12
|
}>) => GridControlledStateEventLookup[E]['params']);
|
|
12
|
-
propOnChange?: (model: GridControlledStateEventLookup[E]['params'], details: GridCallbackDetails) => void;
|
|
13
|
+
propOnChange?: (model: GridControlledStateEventLookup[E]['params'], details: GridCallbackDetails<any, Api>) => void;
|
|
13
14
|
changeEvent: E;
|
|
14
15
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { MuiBaseEvent, MuiEvent } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridCallbackDetails } from "../api/gridCallbackDetails.mjs";
|
|
3
|
+
import type { GridApiCommon } from "../api/gridApiCommon.mjs";
|
|
3
4
|
import type { GridEventLookup, GridEvents } from "./gridEventLookup.mjs";
|
|
4
|
-
export type GridEventListener<E extends GridEvents> = (params: GridEventLookup[E] extends {
|
|
5
|
+
export type GridEventListener<E extends GridEvents, Api extends GridApiCommon = GridApiCommon> = (params: GridEventLookup[E] extends {
|
|
5
6
|
params: any;
|
|
6
7
|
} ? GridEventLookup[E]['params'] : undefined, event: GridEventLookup[E] extends {
|
|
7
8
|
event: MuiBaseEvent;
|
|
8
|
-
} ? MuiEvent<GridEventLookup[E]['event']> : MuiEvent<{}>, details: GridCallbackDetails) => void;
|
|
9
|
+
} ? MuiEvent<GridEventLookup[E]['event']> : MuiEvent<{}>, details: GridCallbackDetails<any, Api>) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { MuiBaseEvent, MuiEvent } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridCallbackDetails } from "../api/gridCallbackDetails.js";
|
|
3
|
+
import type { GridApiCommon } from "../api/gridApiCommon.js";
|
|
3
4
|
import type { GridEventLookup, GridEvents } from "./gridEventLookup.js";
|
|
4
|
-
export type GridEventListener<E extends GridEvents> = (params: GridEventLookup[E] extends {
|
|
5
|
+
export type GridEventListener<E extends GridEvents, Api extends GridApiCommon = GridApiCommon> = (params: GridEventLookup[E] extends {
|
|
5
6
|
params: any;
|
|
6
7
|
} ? GridEventLookup[E]['params'] : undefined, event: GridEventLookup[E] extends {
|
|
7
8
|
event: MuiBaseEvent;
|
|
8
|
-
} ? MuiEvent<GridEventLookup[E]['event']> : MuiEvent<{}>, details: GridCallbackDetails) => void;
|
|
9
|
+
} ? MuiEvent<GridEventLookup[E]['event']> : MuiEvent<{}>, details: GridCallbackDetails<any, Api>) => void;
|
|
@@ -12,6 +12,7 @@ import type { GridRowId, GridRowIdGetter, GridRowsProp, GridValidRowModel } from
|
|
|
12
12
|
import type { GridEventListener } from "../events/index.mjs";
|
|
13
13
|
import type { GridCallbackDetails, GridLocaleText } from "../api/index.mjs";
|
|
14
14
|
import type { GridApiCommunity } from "../api/gridApiCommunity.mjs";
|
|
15
|
+
import type { GridApiCommon } from "../api/gridApiCommon.mjs";
|
|
15
16
|
import type { GridColDef, GridListViewColDef, GridCheckboxSelectionColDef } from "../colDef/gridColDef.mjs";
|
|
16
17
|
import type { GridClasses } from "../../constants/gridClasses.mjs";
|
|
17
18
|
import type { GridRowHeightParams, GridRowHeightReturnValue, GridRowParams, GridRowSpacing, GridRowSpacingParams, GridRowClassNameParams } from "../params/index.mjs";
|
|
@@ -414,7 +415,7 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
414
415
|
/**
|
|
415
416
|
* The Data Grid props with no default value.
|
|
416
417
|
*/
|
|
417
|
-
export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends CommonProps {
|
|
418
|
+
export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel = any, Api extends GridApiCommon = GridApiCommunity> extends CommonProps {
|
|
418
419
|
/**
|
|
419
420
|
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
420
421
|
*/
|
|
@@ -513,13 +514,13 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
513
514
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
514
515
|
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
515
516
|
*/
|
|
516
|
-
onCellEditStart?: GridEventListener<'cellEditStart'>;
|
|
517
|
+
onCellEditStart?: GridEventListener<'cellEditStart', Api>;
|
|
517
518
|
/**
|
|
518
519
|
* Callback fired when the cell turns to view mode.
|
|
519
520
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
520
521
|
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
521
522
|
*/
|
|
522
|
-
onCellEditStop?: GridEventListener<'cellEditStop'>;
|
|
523
|
+
onCellEditStop?: GridEventListener<'cellEditStop', Api>;
|
|
523
524
|
/**
|
|
524
525
|
* Callback fired when a data source request fails.
|
|
525
526
|
* @param {GridGetRowsError | GridUpdateRowError} error The data source error object.
|
|
@@ -530,89 +531,89 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
530
531
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
531
532
|
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
532
533
|
*/
|
|
533
|
-
onRowEditStart?: GridEventListener<'rowEditStart'>;
|
|
534
|
+
onRowEditStart?: GridEventListener<'rowEditStart', Api>;
|
|
534
535
|
/**
|
|
535
536
|
* Callback fired when the row turns to view mode.
|
|
536
537
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
537
538
|
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
538
539
|
*/
|
|
539
|
-
onRowEditStop?: GridEventListener<'rowEditStop'>;
|
|
540
|
+
onRowEditStop?: GridEventListener<'rowEditStop', Api>;
|
|
540
541
|
/**
|
|
541
542
|
* Callback fired when any cell is clicked.
|
|
542
543
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
543
544
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
544
545
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
545
546
|
*/
|
|
546
|
-
onCellClick?: GridEventListener<'cellClick'>;
|
|
547
|
+
onCellClick?: GridEventListener<'cellClick', Api>;
|
|
547
548
|
/**
|
|
548
549
|
* Callback fired when a double click event comes from a cell element.
|
|
549
550
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
550
551
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
551
552
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
552
553
|
*/
|
|
553
|
-
onCellDoubleClick?: GridEventListener<'cellDoubleClick'>;
|
|
554
|
+
onCellDoubleClick?: GridEventListener<'cellDoubleClick', Api>;
|
|
554
555
|
/**
|
|
555
556
|
* Callback fired when a keydown event comes from a cell element.
|
|
556
557
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
557
558
|
* @param {MuiEvent<React.KeyboardEvent>} event The event object.
|
|
558
559
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
559
560
|
*/
|
|
560
|
-
onCellKeyDown?: GridEventListener<'cellKeyDown'>;
|
|
561
|
+
onCellKeyDown?: GridEventListener<'cellKeyDown', Api>;
|
|
561
562
|
/**
|
|
562
563
|
* Callback fired when a click event comes from a column header element.
|
|
563
564
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
564
565
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
565
566
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
566
567
|
*/
|
|
567
|
-
onColumnHeaderClick?: GridEventListener<'columnHeaderClick'>;
|
|
568
|
+
onColumnHeaderClick?: GridEventListener<'columnHeaderClick', Api>;
|
|
568
569
|
/**
|
|
569
570
|
* Callback fired when a contextmenu event comes from a column header element.
|
|
570
571
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
571
572
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
572
573
|
*/
|
|
573
|
-
onColumnHeaderContextMenu?: GridEventListener<'columnHeaderContextMenu'>;
|
|
574
|
+
onColumnHeaderContextMenu?: GridEventListener<'columnHeaderContextMenu', Api>;
|
|
574
575
|
/**
|
|
575
576
|
* Callback fired when a double click event comes from a column header element.
|
|
576
577
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
577
578
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
578
579
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
579
580
|
*/
|
|
580
|
-
onColumnHeaderDoubleClick?: GridEventListener<'columnHeaderDoubleClick'>;
|
|
581
|
+
onColumnHeaderDoubleClick?: GridEventListener<'columnHeaderDoubleClick', Api>;
|
|
581
582
|
/**
|
|
582
583
|
* Callback fired when a mouseover event comes from a column header element.
|
|
583
584
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
584
585
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
585
586
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
586
587
|
*/
|
|
587
|
-
onColumnHeaderOver?: GridEventListener<'columnHeaderOver'>;
|
|
588
|
+
onColumnHeaderOver?: GridEventListener<'columnHeaderOver', Api>;
|
|
588
589
|
/**
|
|
589
590
|
* Callback fired when a mouseout event comes from a column header element.
|
|
590
591
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
591
592
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
592
593
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
593
594
|
*/
|
|
594
|
-
onColumnHeaderOut?: GridEventListener<'columnHeaderOut'>;
|
|
595
|
+
onColumnHeaderOut?: GridEventListener<'columnHeaderOut', Api>;
|
|
595
596
|
/**
|
|
596
597
|
* Callback fired when a mouse enter event comes from a column header element.
|
|
597
598
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
598
599
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
599
600
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
600
601
|
*/
|
|
601
|
-
onColumnHeaderEnter?: GridEventListener<'columnHeaderEnter'>;
|
|
602
|
+
onColumnHeaderEnter?: GridEventListener<'columnHeaderEnter', Api>;
|
|
602
603
|
/**
|
|
603
604
|
* Callback fired when a mouse leave event comes from a column header element.
|
|
604
605
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
605
606
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
606
607
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
607
608
|
*/
|
|
608
|
-
onColumnHeaderLeave?: GridEventListener<'columnHeaderLeave'>;
|
|
609
|
+
onColumnHeaderLeave?: GridEventListener<'columnHeaderLeave', Api>;
|
|
609
610
|
/**
|
|
610
611
|
* Callback fired when a column is reordered.
|
|
611
612
|
* @param {GridColumnOrderChangeParams} params With all properties from [[GridColumnOrderChangeParams]].
|
|
612
613
|
* @param {MuiEvent<{}>} event The event object.
|
|
613
614
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
614
615
|
*/
|
|
615
|
-
onColumnOrderChange?: GridEventListener<'columnOrderChange'>;
|
|
616
|
+
onColumnOrderChange?: GridEventListener<'columnOrderChange', Api>;
|
|
616
617
|
/**
|
|
617
618
|
* Callback fired when the density changes.
|
|
618
619
|
* @param {GridDensity} density New density value.
|
|
@@ -625,21 +626,21 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
625
626
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
626
627
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
627
628
|
*/
|
|
628
|
-
onRowClick?: GridEventListener<'rowClick'>;
|
|
629
|
+
onRowClick?: GridEventListener<'rowClick', Api>;
|
|
629
630
|
/**
|
|
630
631
|
* Callback fired when a double click event comes from a row container element.
|
|
631
632
|
* @param {GridRowParams} params With all properties from [[RowParams]].
|
|
632
633
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
633
634
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
634
635
|
*/
|
|
635
|
-
onRowDoubleClick?: GridEventListener<'rowDoubleClick'>;
|
|
636
|
+
onRowDoubleClick?: GridEventListener<'rowDoubleClick', Api>;
|
|
636
637
|
/**
|
|
637
638
|
* Callback fired when the Data Grid is resized.
|
|
638
639
|
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
|
639
640
|
* @param {MuiEvent<{}>} event The event object.
|
|
640
641
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
641
642
|
*/
|
|
642
|
-
onResize?: GridEventListener<'debouncedResize'>;
|
|
643
|
+
onResize?: GridEventListener<'debouncedResize', Api>;
|
|
643
644
|
/**
|
|
644
645
|
* Callback fired when the state of the Data Grid is updated.
|
|
645
646
|
* @param {GridState} state The new state.
|
|
@@ -647,7 +648,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
647
648
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
648
649
|
* @ignore - do not document.
|
|
649
650
|
*/
|
|
650
|
-
onStateChange?: GridEventListener<'stateChange'>;
|
|
651
|
+
onStateChange?: GridEventListener<'stateChange', Api>;
|
|
651
652
|
/**
|
|
652
653
|
* The pagination model of type [[GridPaginationModel]] which refers to current `page` and `pageSize`.
|
|
653
654
|
*/
|
|
@@ -662,7 +663,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
662
663
|
* @param {GridPaginationModel} model Updated pagination model.
|
|
663
664
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
664
665
|
*/
|
|
665
|
-
onPaginationModelChange?: (model: GridPaginationModel, details: GridCallbackDetails<'pagination'>) => void;
|
|
666
|
+
onPaginationModelChange?: (model: GridPaginationModel, details: GridCallbackDetails<'pagination', Api>) => void;
|
|
666
667
|
/**
|
|
667
668
|
* Callback fired when the row count has changed.
|
|
668
669
|
* @param {number} count Updated row count.
|
|
@@ -679,28 +680,28 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
679
680
|
* @param {MuiEvent<{}>} event The event object.
|
|
680
681
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
681
682
|
*/
|
|
682
|
-
onPreferencePanelClose?: GridEventListener<'preferencePanelClose'>;
|
|
683
|
+
onPreferencePanelClose?: GridEventListener<'preferencePanelClose', Api>;
|
|
683
684
|
/**
|
|
684
685
|
* Callback fired when the preferences panel is opened.
|
|
685
686
|
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
686
687
|
* @param {MuiEvent<{}>} event The event object.
|
|
687
688
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
688
689
|
*/
|
|
689
|
-
onPreferencePanelOpen?: GridEventListener<'preferencePanelOpen'>;
|
|
690
|
+
onPreferencePanelOpen?: GridEventListener<'preferencePanelOpen', Api>;
|
|
690
691
|
/**
|
|
691
692
|
* Callback fired when the menu is opened.
|
|
692
693
|
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
693
694
|
* @param {MuiEvent<{}>} event The event object.
|
|
694
695
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
695
696
|
*/
|
|
696
|
-
onMenuOpen?: GridEventListener<'menuOpen'>;
|
|
697
|
+
onMenuOpen?: GridEventListener<'menuOpen', Api>;
|
|
697
698
|
/**
|
|
698
699
|
* Callback fired when the menu is closed.
|
|
699
700
|
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
700
701
|
* @param {MuiEvent<{}>} event The event object.
|
|
701
702
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
702
703
|
*/
|
|
703
|
-
onMenuClose?: GridEventListener<'menuClose'>;
|
|
704
|
+
onMenuClose?: GridEventListener<'menuClose', Api>;
|
|
704
705
|
/**
|
|
705
706
|
* Controls the modes of the cells.
|
|
706
707
|
*/
|
|
@@ -710,7 +711,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
710
711
|
* @param {GridCellModesModel} cellModesModel Object containing which cells are in "edit" mode.
|
|
711
712
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
712
713
|
*/
|
|
713
|
-
onCellModesModelChange?: (cellModesModel: GridCellModesModel, details: GridCallbackDetails) => void;
|
|
714
|
+
onCellModesModelChange?: (cellModesModel: GridCellModesModel, details: GridCallbackDetails<any, Api>) => void;
|
|
714
715
|
/**
|
|
715
716
|
* Controls the modes of the rows.
|
|
716
717
|
*/
|
|
@@ -720,7 +721,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
720
721
|
* @param {GridRowModesModel} rowModesModel Object containing which rows are in "edit" mode.
|
|
721
722
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
722
723
|
*/
|
|
723
|
-
onRowModesModelChange?: (rowModesModel: GridRowModesModel, details: GridCallbackDetails) => void;
|
|
724
|
+
onRowModesModelChange?: (rowModesModel: GridRowModesModel, details: GridCallbackDetails<any, Api>) => void;
|
|
724
725
|
/**
|
|
725
726
|
* Set the filter model of the Data Grid.
|
|
726
727
|
*/
|
|
@@ -730,7 +731,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
730
731
|
* @param {GridFilterModel} model With all properties from [[GridFilterModel]].
|
|
731
732
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
732
733
|
*/
|
|
733
|
-
onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter'>) => void;
|
|
734
|
+
onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter', Api>) => void;
|
|
734
735
|
/**
|
|
735
736
|
* Sets the row selection model of the Data Grid.
|
|
736
737
|
*/
|
|
@@ -740,7 +741,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
740
741
|
* @param {GridRowSelectionModel} rowSelectionModel With all the row ids [[GridSelectionModel]].
|
|
741
742
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
742
743
|
*/
|
|
743
|
-
onRowSelectionModelChange?: (rowSelectionModel: GridRowSelectionModel, details: GridCallbackDetails) => void;
|
|
744
|
+
onRowSelectionModelChange?: (rowSelectionModel: GridRowSelectionModel, details: GridCallbackDetails<any, Api>) => void;
|
|
744
745
|
/**
|
|
745
746
|
* Set the column visibility model of the Data Grid.
|
|
746
747
|
* If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
|
|
@@ -751,7 +752,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
751
752
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
752
753
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
753
754
|
*/
|
|
754
|
-
onColumnVisibilityModelChange?: (model: GridColumnVisibilityModel, details: GridCallbackDetails) => void;
|
|
755
|
+
onColumnVisibilityModelChange?: (model: GridColumnVisibilityModel, details: GridCallbackDetails<any, Api>) => void;
|
|
755
756
|
/**
|
|
756
757
|
* Set the sort model of the Data Grid.
|
|
757
758
|
*/
|
|
@@ -761,7 +762,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
761
762
|
* @param {GridSortModel} model With all properties from [[GridSortModel]].
|
|
762
763
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
763
764
|
*/
|
|
764
|
-
onSortModelChange?: (model: GridSortModel, details: GridCallbackDetails) => void;
|
|
765
|
+
onSortModelChange?: (model: GridSortModel, details: GridCallbackDetails<any, Api>) => void;
|
|
765
766
|
/**
|
|
766
767
|
* The `aria-label` of the Data Grid.
|
|
767
768
|
*/
|
|
@@ -835,7 +836,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
835
836
|
* Callback called when the data is copied to the clipboard.
|
|
836
837
|
* @param {string} data The data copied to the clipboard.
|
|
837
838
|
*/
|
|
838
|
-
onClipboardCopy?: GridEventListener<'clipboardCopy'>;
|
|
839
|
+
onClipboardCopy?: GridEventListener<'clipboardCopy', Api>;
|
|
839
840
|
/**
|
|
840
841
|
* The options for autosize when user-initiated.
|
|
841
842
|
*/
|
|
@@ -855,14 +856,14 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
855
856
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
856
857
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
857
858
|
*/
|
|
858
|
-
onColumnResize?: GridEventListener<'columnResize'>;
|
|
859
|
+
onColumnResize?: GridEventListener<'columnResize', Api>;
|
|
859
860
|
/**
|
|
860
861
|
* Callback fired when the width of a column is changed.
|
|
861
862
|
* @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
|
|
862
863
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
863
864
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
864
865
|
*/
|
|
865
|
-
onColumnWidthChange?: GridEventListener<'columnWidthChange'>;
|
|
866
|
+
onColumnWidthChange?: GridEventListener<'columnWidthChange', Api>;
|
|
866
867
|
}
|
|
867
868
|
export interface DataGridProSharedPropsWithDefaultValue {
|
|
868
869
|
/**
|
|
@@ -926,6 +927,8 @@ export interface DataGridPremiumSharedPropsWithDefaultValue {
|
|
|
926
927
|
}
|
|
927
928
|
/**
|
|
928
929
|
* The props of the Data Grid component after the pre-processing phase.
|
|
930
|
+
* `Api` defaults to `any` so that the internals, which are shared across packages,
|
|
931
|
+
* accept props typed with any of the three API types.
|
|
929
932
|
*/
|
|
930
|
-
export interface DataGridProcessedProps<R extends GridValidRowModel = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithoutDefaultValue<R>, DataGridProSharedPropsWithoutDefaultValue, Partial<DataGridProSharedPropsWithDefaultValue>, Partial<DataGridPremiumSharedPropsWithDefaultValue> {}
|
|
933
|
+
export interface DataGridProcessedProps<R extends GridValidRowModel = any, Api extends GridApiCommon = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithoutDefaultValue<R, Api>, DataGridProSharedPropsWithoutDefaultValue, Partial<DataGridProSharedPropsWithDefaultValue>, Partial<DataGridPremiumSharedPropsWithDefaultValue> {}
|
|
931
934
|
export {};
|