neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
@@ -0,0 +1,103 @@
import type { GridCellMode } from "../gridCell.mjs";
import type { GridRowId, GridRowModel, GridTreeNode, GridTreeNodeWithRender, GridValidRowModel } from "../gridRows.mjs";
import type { GridStateColDef } from "../colDef/gridColDef.mjs";
import type { GridEditCellProps } from "../gridEditRowModel.mjs";
import type { GridApiCommunity } from "../api/gridApiCommunity.mjs";
/**
* Object passed as parameter in the column [[GridColDef]] cell renderer.
*/
export interface GridCellParams<R extends GridValidRowModel = any, V = unknown, F = V, N extends GridTreeNode = GridTreeNode> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The column field of the cell that triggered the event.
*/
field: string;
/**
* The cell value.
* If the column has `valueGetter`, use `params.row` to directly access the fields.
*/
value?: V | undefined;
/**
* The cell value formatted with the column valueFormatter.
*/
formattedValue?: F | undefined;
/**
* The row model of the row that the current cell belongs to.
*/
row: GridRowModel<R>;
/**
* The node of the row that the current cell belongs to.
*/
rowNode: N;
/**
* The column of the row that the current cell belongs to.
*/
colDef: GridStateColDef;
/**
* If true, the cell is editable.
*/
isEditable?: boolean;
/**
* The mode of the cell.
*/
cellMode: GridCellMode;
/**
* If true, the cell is the active element.
*/
hasFocus: boolean;
/**
* the tabIndex value.
*/
tabIndex: 0 | -1;
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* GridCellParams containing api.
*/
export interface GridRenderCellParams<R extends GridValidRowModel = any, V = any, F = V, N extends GridTreeNodeWithRender = GridTreeNodeWithRender> extends GridCellParams<R, V, F, N> {
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* GridEditCellProps containing api.
*/
export interface GridRenderEditCellParams<R extends GridValidRowModel = any, V = any, F = V, N extends GridTreeNodeWithRender = GridTreeNodeWithRender> extends GridCellParams<R, V, F, N>, GridEditCellProps<V> {
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* Object passed as parameter in the column [[GridColDef]] edit cell props change callback.
*/
export interface GridPreProcessEditCellProps<V = any, R extends GridValidRowModel = any> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The row that is being edited.
*/
row: GridRowModel<R>;
/**
* The edit cell props.
*/
props: GridEditCellProps<V>;
/**
* Whether the new value is different from the stored value or not.
*/
hasChanged?: boolean;
/**
* Object containing the props of the other fields.
* Only available for row editing and when using the new editing API.
*/
otherFieldsProps?: Record<string, GridEditCellProps<V>>;
}
+103
View File
@@ -0,0 +1,103 @@
import type { GridCellMode } from "../gridCell.js";
import type { GridRowId, GridRowModel, GridTreeNode, GridTreeNodeWithRender, GridValidRowModel } from "../gridRows.js";
import type { GridStateColDef } from "../colDef/gridColDef.js";
import type { GridEditCellProps } from "../gridEditRowModel.js";
import type { GridApiCommunity } from "../api/gridApiCommunity.js";
/**
* Object passed as parameter in the column [[GridColDef]] cell renderer.
*/
export interface GridCellParams<R extends GridValidRowModel = any, V = unknown, F = V, N extends GridTreeNode = GridTreeNode> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The column field of the cell that triggered the event.
*/
field: string;
/**
* The cell value.
* If the column has `valueGetter`, use `params.row` to directly access the fields.
*/
value?: V | undefined;
/**
* The cell value formatted with the column valueFormatter.
*/
formattedValue?: F | undefined;
/**
* The row model of the row that the current cell belongs to.
*/
row: GridRowModel<R>;
/**
* The node of the row that the current cell belongs to.
*/
rowNode: N;
/**
* The column of the row that the current cell belongs to.
*/
colDef: GridStateColDef;
/**
* If true, the cell is editable.
*/
isEditable?: boolean;
/**
* The mode of the cell.
*/
cellMode: GridCellMode;
/**
* If true, the cell is the active element.
*/
hasFocus: boolean;
/**
* the tabIndex value.
*/
tabIndex: 0 | -1;
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* GridCellParams containing api.
*/
export interface GridRenderCellParams<R extends GridValidRowModel = any, V = any, F = V, N extends GridTreeNodeWithRender = GridTreeNodeWithRender> extends GridCellParams<R, V, F, N> {
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* GridEditCellProps containing api.
*/
export interface GridRenderEditCellParams<R extends GridValidRowModel = any, V = any, F = V, N extends GridTreeNodeWithRender = GridTreeNodeWithRender> extends GridCellParams<R, V, F, N>, GridEditCellProps<V> {
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommunity;
}
/**
* Object passed as parameter in the column [[GridColDef]] edit cell props change callback.
*/
export interface GridPreProcessEditCellProps<V = any, R extends GridValidRowModel = any> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The row that is being edited.
*/
row: GridRowModel<R>;
/**
* The edit cell props.
*/
props: GridEditCellProps<V>;
/**
* Whether the new value is different from the stored value or not.
*/
hasChanged?: boolean;
/**
* Object containing the props of the other fields.
* Only available for row editing and when using the new editing API.
*/
otherFieldsProps?: Record<string, GridEditCellProps<V>>;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,30 @@
import type { GridColumnGroup } from "../gridColumnGrouping.mjs";
/**
* Object passed as parameter in the column group header renderer.
*/
export interface GridColumnGroupHeaderParams extends Pick<GridColumnGroup, 'headerName' | 'description'> {
/**
* A unique string identifying the group.
*/
groupId: GridColumnGroup['groupId'] | null;
/**
* The number parent the group have.
*/
depth: number;
/**
* The maximal depth among visible columns.
*/
maxDepth: number;
/**
* The column fields included in the group (including nested ones).
*/
fields: string[];
/**
* The column index (0 based).
*/
colIndex: number;
/**
* Indicate if the group is the last one for the given depth.
*/
isLastColumn: boolean;
}
@@ -0,0 +1,30 @@
import type { GridColumnGroup } from "../gridColumnGrouping.js";
/**
* Object passed as parameter in the column group header renderer.
*/
export interface GridColumnGroupHeaderParams extends Pick<GridColumnGroup, 'headerName' | 'description'> {
/**
* A unique string identifying the group.
*/
groupId: GridColumnGroup['groupId'] | null;
/**
* The number parent the group have.
*/
depth: number;
/**
* The maximal depth among visible columns.
*/
maxDepth: number;
/**
* The column fields included in the group (including nested ones).
*/
fields: string[];
/**
* The column index (0 based).
*/
colIndex: number;
/**
* Indicate if the group is the last one for the given depth.
*/
isLastColumn: boolean;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,15 @@
import type { GridStateColDef } from "../colDef/gridColDef.mjs";
import type { GridValidRowModel } from "../gridRows.mjs";
/**
* Object passed as parameter in the column [[GridColDef]] header renderer.
*/
export interface GridColumnHeaderParams<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> {
/**
* The column field of the column that triggered the event
*/
field: string;
/**
* The column of the current header component.
*/
colDef: GridStateColDef<R, V, F>;
}
@@ -0,0 +1,15 @@
import type { GridStateColDef } from "../colDef/gridColDef.js";
import type { GridValidRowModel } from "../gridRows.js";
/**
* Object passed as parameter in the column [[GridColDef]] header renderer.
*/
export interface GridColumnHeaderParams<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> {
/**
* The column field of the column that triggered the event
*/
field: string;
/**
* The column of the current header component.
*/
colDef: GridStateColDef<R, V, F>;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,18 @@
import type { GridColDef } from "../colDef/gridColDef.mjs";
/**
* Object passed as parameter of the column order change event.
*/
export interface GridColumnOrderChangeParams {
/**
* The column of the current header component.
*/
column: GridColDef;
/**
* The target column index.
*/
targetIndex: number;
/**
* The old column index.
*/
oldIndex: number;
}
@@ -0,0 +1,18 @@
import type { GridColDef } from "../colDef/gridColDef.js";
/**
* Object passed as parameter of the column order change event.
*/
export interface GridColumnOrderChangeParams {
/**
* The column of the current header component.
*/
column: GridColDef;
/**
* The target column index.
*/
targetIndex: number;
/**
* The old column index.
*/
oldIndex: number;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,18 @@
import type { GridStateColDef } from "../colDef/gridColDef.mjs";
/**
* Object passed as parameter of the column resize event.
*/
export interface GridColumnResizeParams {
/**
* The HTMLElement column header element.
*/
element?: HTMLElement | null;
/**
* The column of the current header component.
*/
colDef: GridStateColDef;
/**
* The width of the column.
*/
width: number;
}
@@ -0,0 +1,18 @@
import type { GridStateColDef } from "../colDef/gridColDef.js";
/**
* Object passed as parameter of the column resize event.
*/
export interface GridColumnResizeParams {
/**
* The HTMLElement column header element.
*/
element?: HTMLElement | null;
/**
* The column of the current header component.
*/
colDef: GridStateColDef;
/**
* The width of the column.
*/
width: number;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,65 @@
import type { GridRowId, GridValidRowModel } from "../gridRows.mjs";
import type { GridCellParams } from "./gridCellParams.mjs";
/**
* Params passed to `apiRef.current.setEditCellValue`.
*/
export interface GridEditCellValueParams {
/**
* The row id.
*/
id: GridRowId;
/**
* The field.
*/
field: string;
/**
* The new value for the cell.
*/
value: any;
/**
* The debounce time in milliseconds.
*/
debounceMs?: number;
/**
* TBD
*/
unstable_skipValueParser?: boolean;
}
declare enum GridCellEditStartReasons {
enterKeyDown = "enterKeyDown",
cellDoubleClick = "cellDoubleClick",
printableKeyDown = "printableKeyDown",
deleteKeyDown = "deleteKeyDown",
pasteKeyDown = "pasteKeyDown",
}
/**
* Params passed to the `cellEditStart` event.
*/
export interface GridCellEditStartParams<R extends GridValidRowModel = any, V = any, F = V> extends GridCellParams<R, V, F> {
/**
* The reason for this event to be triggered.
*/
reason?: GridCellEditStartReasons;
/**
* If the reason is related to a keyboard event, it contains which key was pressed.
* @deprecated No longer needed.
*/
key?: string;
}
declare enum GridCellEditStopReasons {
cellFocusOut = "cellFocusOut",
escapeKeyDown = "escapeKeyDown",
enterKeyDown = "enterKeyDown",
tabKeyDown = "tabKeyDown",
shiftTabKeyDown = "shiftTabKeyDown",
}
/**
* Params passed to the `cellEditStop event.
*/
export interface GridCellEditStopParams<R extends GridValidRowModel = any, V = any, F = V> extends GridCellParams<R, V, F> {
/**
* The reason for this event to be triggered.
*/
reason?: GridCellEditStopReasons;
}
export { GridCellEditStartReasons, GridCellEditStopReasons };
@@ -0,0 +1,65 @@
import type { GridRowId, GridValidRowModel } from "../gridRows.js";
import type { GridCellParams } from "./gridCellParams.js";
/**
* Params passed to `apiRef.current.setEditCellValue`.
*/
export interface GridEditCellValueParams {
/**
* The row id.
*/
id: GridRowId;
/**
* The field.
*/
field: string;
/**
* The new value for the cell.
*/
value: any;
/**
* The debounce time in milliseconds.
*/
debounceMs?: number;
/**
* TBD
*/
unstable_skipValueParser?: boolean;
}
declare enum GridCellEditStartReasons {
enterKeyDown = "enterKeyDown",
cellDoubleClick = "cellDoubleClick",
printableKeyDown = "printableKeyDown",
deleteKeyDown = "deleteKeyDown",
pasteKeyDown = "pasteKeyDown",
}
/**
* Params passed to the `cellEditStart` event.
*/
export interface GridCellEditStartParams<R extends GridValidRowModel = any, V = any, F = V> extends GridCellParams<R, V, F> {
/**
* The reason for this event to be triggered.
*/
reason?: GridCellEditStartReasons;
/**
* If the reason is related to a keyboard event, it contains which key was pressed.
* @deprecated No longer needed.
*/
key?: string;
}
declare enum GridCellEditStopReasons {
cellFocusOut = "cellFocusOut",
escapeKeyDown = "escapeKeyDown",
enterKeyDown = "enterKeyDown",
tabKeyDown = "tabKeyDown",
shiftTabKeyDown = "shiftTabKeyDown",
}
/**
* Params passed to the `cellEditStop event.
*/
export interface GridCellEditStopParams<R extends GridValidRowModel = any, V = any, F = V> extends GridCellParams<R, V, F> {
/**
* The reason for this event to be triggered.
*/
reason?: GridCellEditStopReasons;
}
export { GridCellEditStartReasons, GridCellEditStopReasons };
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GridCellEditStopReasons = exports.GridCellEditStartReasons = void 0;
/**
* Params passed to `apiRef.current.setEditCellValue`.
*/
var GridCellEditStartReasons = exports.GridCellEditStartReasons = /*#__PURE__*/function (GridCellEditStartReasons) {
GridCellEditStartReasons["enterKeyDown"] = "enterKeyDown";
GridCellEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
GridCellEditStartReasons["printableKeyDown"] = "printableKeyDown";
GridCellEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
GridCellEditStartReasons["pasteKeyDown"] = "pasteKeyDown";
return GridCellEditStartReasons;
}(GridCellEditStartReasons || {});
/**
* Params passed to the `cellEditStart` event.
*/
var GridCellEditStopReasons = exports.GridCellEditStopReasons = /*#__PURE__*/function (GridCellEditStopReasons) {
GridCellEditStopReasons["cellFocusOut"] = "cellFocusOut";
GridCellEditStopReasons["escapeKeyDown"] = "escapeKeyDown";
GridCellEditStopReasons["enterKeyDown"] = "enterKeyDown";
GridCellEditStopReasons["tabKeyDown"] = "tabKeyDown";
GridCellEditStopReasons["shiftTabKeyDown"] = "shiftTabKeyDown";
return GridCellEditStopReasons;
}(GridCellEditStopReasons || {});
/**
* Params passed to the `cellEditStop event.
*/
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
@@ -0,0 +1,27 @@
/**
* Params passed to `apiRef.current.setEditCellValue`.
*/
var GridCellEditStartReasons = /*#__PURE__*/function (GridCellEditStartReasons) {
GridCellEditStartReasons["enterKeyDown"] = "enterKeyDown";
GridCellEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
GridCellEditStartReasons["printableKeyDown"] = "printableKeyDown";
GridCellEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
GridCellEditStartReasons["pasteKeyDown"] = "pasteKeyDown";
return GridCellEditStartReasons;
}(GridCellEditStartReasons || {});
/**
* Params passed to the `cellEditStart` event.
*/
var GridCellEditStopReasons = /*#__PURE__*/function (GridCellEditStopReasons) {
GridCellEditStopReasons["cellFocusOut"] = "cellFocusOut";
GridCellEditStopReasons["escapeKeyDown"] = "escapeKeyDown";
GridCellEditStopReasons["enterKeyDown"] = "enterKeyDown";
GridCellEditStopReasons["tabKeyDown"] = "tabKeyDown";
GridCellEditStopReasons["shiftTabKeyDown"] = "shiftTabKeyDown";
return GridCellEditStopReasons;
}(GridCellEditStopReasons || {});
/**
* Params passed to the `cellEditStop event.
*/
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
export { GridCellEditStartReasons, GridCellEditStopReasons };
@@ -0,0 +1,3 @@
export interface GridHeaderSelectionCheckboxParams {
value: boolean;
}
@@ -0,0 +1,3 @@
export interface GridHeaderSelectionCheckboxParams {
value: boolean;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,6 @@
export interface GridMenuParams {
/**
* The element that opens the menu.
*/
target: HTMLElement | null;
}
@@ -0,0 +1,6 @@
export interface GridMenuParams {
/**
* The element that opens the menu.
*/
target: HTMLElement | null;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,2 @@
import type { GridPreferencePanelState } from "../../hooks/features/preferencesPanel/gridPreferencePanelState.mjs";
export interface GridPreferencePanelParams extends Omit<GridPreferencePanelState, 'open'> {}
@@ -0,0 +1,2 @@
import type { GridPreferencePanelState } from "../../hooks/features/preferencesPanel/gridPreferencePanelState.js";
export interface GridPreferencePanelParams extends Omit<GridPreferencePanelState, 'open'> {}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
+109
View File
@@ -0,0 +1,109 @@
import type { GridValidRowModel, GridRowEntry, GridRowId } from "../gridRows.mjs";
import type { GridColDef } from "../colDef/gridColDef.mjs";
/**
* Object passed as parameter in the row callbacks.
* @demos
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
*/
export interface GridRowParams<R extends GridValidRowModel = any> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The row model of the row that the current cell belongs to.
*/
row: R;
/**
* All grid columns.
*/
columns: GridColDef[];
}
interface GridRowVisibilityParams {
/**
* Whether this row is the first visible or not.
*/
isFirstVisible: boolean;
/**
* Whether this row is the last visible or not.
*/
isLastVisible: boolean;
/**
* Index of the row in the current page.
* If the pagination is disabled, it will be the index relative to all filtered rows.
*/
indexRelativeToCurrentPage: number;
}
/**
* Object passed as parameter in the row `getRowClassName` callback prop.
* @demos
* - [Styling rows](/x/react-data-grid/style/#styling-rows)
*/
export interface GridRowClassNameParams<R extends GridValidRowModel = any> extends GridRowParams<R>, GridRowVisibilityParams {}
/**
* Object passed as parameter in the row `getRowHeight` callback prop.
*/
export interface GridRowHeightParams extends GridRowEntry {
/**
* The grid current density factor.
*/
densityFactor: number;
}
/**
* The getRowHeight return value.
*/
export type GridRowHeightReturnValue = number | null | undefined | 'auto';
declare enum GridRowEditStartReasons {
enterKeyDown = "enterKeyDown",
cellDoubleClick = "cellDoubleClick",
printableKeyDown = "printableKeyDown",
deleteKeyDown = "deleteKeyDown",
}
/**
* Params passed to the `rowEditStart` event.
*/
export interface GridRowEditStartParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
/**
* Which field triggered this event.
*/
field?: string;
/**
* The reason for this event to be triggered.
*/
reason?: GridRowEditStartReasons;
/**
* If the reason is related to a keyboard event, it contains which key was pressed.
*/
key?: string;
}
declare enum GridRowEditStopReasons {
rowFocusOut = "rowFocusOut",
escapeKeyDown = "escapeKeyDown",
enterKeyDown = "enterKeyDown",
tabKeyDown = "tabKeyDown",
shiftTabKeyDown = "shiftTabKeyDown",
}
export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
/**
* Which field triggered this event.
*/
field?: string;
/**
* The reason for this event to be triggered.
*/
reason?: GridRowEditStopReasons;
}
/**
* Object passed as parameter in the row `getRowSpacing` callback prop.
* @demos
* - [Row spacing](/x/react-data-grid/row-height/#row-spacing)
*/
export interface GridRowSpacingParams extends GridRowEntry, GridRowVisibilityParams {}
/**
* The getRowSpacing return value.
*/
export interface GridRowSpacing {
top?: number;
bottom?: number;
}
export { GridRowEditStartReasons, GridRowEditStopReasons };
+109
View File
@@ -0,0 +1,109 @@
import type { GridValidRowModel, GridRowEntry, GridRowId } from "../gridRows.js";
import type { GridColDef } from "../colDef/gridColDef.js";
/**
* Object passed as parameter in the row callbacks.
* @demos
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
*/
export interface GridRowParams<R extends GridValidRowModel = any> {
/**
* The grid row id.
*/
id: GridRowId;
/**
* The row model of the row that the current cell belongs to.
*/
row: R;
/**
* All grid columns.
*/
columns: GridColDef[];
}
interface GridRowVisibilityParams {
/**
* Whether this row is the first visible or not.
*/
isFirstVisible: boolean;
/**
* Whether this row is the last visible or not.
*/
isLastVisible: boolean;
/**
* Index of the row in the current page.
* If the pagination is disabled, it will be the index relative to all filtered rows.
*/
indexRelativeToCurrentPage: number;
}
/**
* Object passed as parameter in the row `getRowClassName` callback prop.
* @demos
* - [Styling rows](/x/react-data-grid/style/#styling-rows)
*/
export interface GridRowClassNameParams<R extends GridValidRowModel = any> extends GridRowParams<R>, GridRowVisibilityParams {}
/**
* Object passed as parameter in the row `getRowHeight` callback prop.
*/
export interface GridRowHeightParams extends GridRowEntry {
/**
* The grid current density factor.
*/
densityFactor: number;
}
/**
* The getRowHeight return value.
*/
export type GridRowHeightReturnValue = number | null | undefined | 'auto';
declare enum GridRowEditStartReasons {
enterKeyDown = "enterKeyDown",
cellDoubleClick = "cellDoubleClick",
printableKeyDown = "printableKeyDown",
deleteKeyDown = "deleteKeyDown",
}
/**
* Params passed to the `rowEditStart` event.
*/
export interface GridRowEditStartParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
/**
* Which field triggered this event.
*/
field?: string;
/**
* The reason for this event to be triggered.
*/
reason?: GridRowEditStartReasons;
/**
* If the reason is related to a keyboard event, it contains which key was pressed.
*/
key?: string;
}
declare enum GridRowEditStopReasons {
rowFocusOut = "rowFocusOut",
escapeKeyDown = "escapeKeyDown",
enterKeyDown = "enterKeyDown",
tabKeyDown = "tabKeyDown",
shiftTabKeyDown = "shiftTabKeyDown",
}
export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
/**
* Which field triggered this event.
*/
field?: string;
/**
* The reason for this event to be triggered.
*/
reason?: GridRowEditStopReasons;
}
/**
* Object passed as parameter in the row `getRowSpacing` callback prop.
* @demos
* - [Row spacing](/x/react-data-grid/row-height/#row-spacing)
*/
export interface GridRowSpacingParams extends GridRowEntry, GridRowVisibilityParams {}
/**
* The getRowSpacing return value.
*/
export interface GridRowSpacing {
top?: number;
bottom?: number;
}
export { GridRowEditStartReasons, GridRowEditStopReasons };
+49
View File
@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GridRowEditStopReasons = exports.GridRowEditStartReasons = void 0;
/**
* Object passed as parameter in the row callbacks.
* @demos
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
*/
/**
* Object passed as parameter in the row `getRowClassName` callback prop.
* @demos
* - [Styling rows](/x/react-data-grid/style/#styling-rows)
*/
/**
* Object passed as parameter in the row `getRowHeight` callback prop.
*/
/**
* The getRowHeight return value.
*/
var GridRowEditStartReasons = exports.GridRowEditStartReasons = /*#__PURE__*/function (GridRowEditStartReasons) {
GridRowEditStartReasons["enterKeyDown"] = "enterKeyDown";
GridRowEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
GridRowEditStartReasons["printableKeyDown"] = "printableKeyDown";
GridRowEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
return GridRowEditStartReasons;
}(GridRowEditStartReasons || {});
/**
* Params passed to the `rowEditStart` event.
*/
var GridRowEditStopReasons = exports.GridRowEditStopReasons = /*#__PURE__*/function (GridRowEditStopReasons) {
GridRowEditStopReasons["rowFocusOut"] = "rowFocusOut";
GridRowEditStopReasons["escapeKeyDown"] = "escapeKeyDown";
GridRowEditStopReasons["enterKeyDown"] = "enterKeyDown";
GridRowEditStopReasons["tabKeyDown"] = "tabKeyDown";
GridRowEditStopReasons["shiftTabKeyDown"] = "shiftTabKeyDown";
return GridRowEditStopReasons;
}(GridRowEditStopReasons || {});
/**
* Object passed as parameter in the row `getRowSpacing` callback prop.
* @demos
* - [Row spacing](/x/react-data-grid/row-height/#row-spacing)
*/
/**
* The getRowSpacing return value.
*/
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
+44
View File
@@ -0,0 +1,44 @@
/**
* Object passed as parameter in the row callbacks.
* @demos
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
*/
/**
* Object passed as parameter in the row `getRowClassName` callback prop.
* @demos
* - [Styling rows](/x/react-data-grid/style/#styling-rows)
*/
/**
* Object passed as parameter in the row `getRowHeight` callback prop.
*/
/**
* The getRowHeight return value.
*/
var GridRowEditStartReasons = /*#__PURE__*/function (GridRowEditStartReasons) {
GridRowEditStartReasons["enterKeyDown"] = "enterKeyDown";
GridRowEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
GridRowEditStartReasons["printableKeyDown"] = "printableKeyDown";
GridRowEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
return GridRowEditStartReasons;
}(GridRowEditStartReasons || {});
/**
* Params passed to the `rowEditStart` event.
*/
var GridRowEditStopReasons = /*#__PURE__*/function (GridRowEditStopReasons) {
GridRowEditStopReasons["rowFocusOut"] = "rowFocusOut";
GridRowEditStopReasons["escapeKeyDown"] = "escapeKeyDown";
GridRowEditStopReasons["enterKeyDown"] = "enterKeyDown";
GridRowEditStopReasons["tabKeyDown"] = "tabKeyDown";
GridRowEditStopReasons["shiftTabKeyDown"] = "shiftTabKeyDown";
return GridRowEditStopReasons;
}(GridRowEditStopReasons || {});
/**
* Object passed as parameter in the row `getRowSpacing` callback prop.
* @demos
* - [Row spacing](/x/react-data-grid/row-height/#row-spacing)
*/
/**
* The getRowSpacing return value.
*/
// https://github.com/mui/mui-x/pull/3738#discussion_r798504277
export { GridRowEditStartReasons, GridRowEditStopReasons };
@@ -0,0 +1,5 @@
import type { GridRowId } from "../gridRows.mjs";
export interface GridRowSelectionCheckboxParams {
value: boolean;
id: GridRowId;
}
@@ -0,0 +1,5 @@
import type { GridRowId } from "../gridRows.js";
export interface GridRowSelectionCheckboxParams {
value: boolean;
id: GridRowId;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,18 @@
export interface GridColumnsRenderContext {
firstColumnIndex: number;
lastColumnIndex: number;
}
/**
* Provides the current render context range for rows and columns.
* End index is exclusive - [firstRowIndex, lastRowIndex) and [firstColumnIndex, lastColumnIndex)
*/
export interface GridRenderContext extends GridColumnsRenderContext {
firstRowIndex: number;
lastRowIndex: number;
}
export interface GridScrollParams {
left: number;
top: number;
renderContext?: GridRenderContext;
}
export type GridScrollFn = (v: GridScrollParams) => void;
@@ -0,0 +1,18 @@
export interface GridColumnsRenderContext {
firstColumnIndex: number;
lastColumnIndex: number;
}
/**
* Provides the current render context range for rows and columns.
* End index is exclusive - [firstRowIndex, lastRowIndex) and [firstColumnIndex, lastColumnIndex)
*/
export interface GridRenderContext extends GridColumnsRenderContext {
firstRowIndex: number;
lastRowIndex: number;
}
export interface GridScrollParams {
left: number;
top: number;
renderContext?: GridRenderContext;
}
export type GridScrollFn = (v: GridScrollParams) => void;
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,18 @@
import type { GridRowId, GridValidRowModel } from "../gridRows.mjs";
/**
* Object passed as parameter of the valueOptions function for singleSelect column.
*/
export interface GridValueOptionsParams<R extends GridValidRowModel = any> {
/**
* The field of the column to which options will be provided
*/
field: string;
/**
* The grid row id.
*/
id?: GridRowId;
/**
* The row model of the row that the current cell belongs to.
*/
row?: R;
}
@@ -0,0 +1,18 @@
import type { GridRowId, GridValidRowModel } from "../gridRows.js";
/**
* Object passed as parameter of the valueOptions function for singleSelect column.
*/
export interface GridValueOptionsParams<R extends GridValidRowModel = any> {
/**
* The field of the column to which options will be provided
*/
field: string;
/**
* The grid row id.
*/
id?: GridRowId;
/**
* The row model of the row that the current cell belongs to.
*/
row?: R;
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
export {};
+13
View File
@@ -0,0 +1,13 @@
export * from "./gridColumnHeaderParams.mjs";
export * from "./gridColumnGroupHeaderParams.mjs";
export * from "./gridColumnOrderChangeParams.mjs";
export * from "./gridColumnResizeParams.mjs";
export * from "./gridEditCellParams.mjs";
export * from "./gridRowParams.mjs";
export * from "./gridScrollParams.mjs";
export * from "./gridRowSelectionCheckboxParams.mjs";
export * from "./gridHeaderSelectionCheckboxParams.mjs";
export * from "./gridValueOptionsParams.mjs";
export * from "./gridCellParams.mjs";
export * from "./gridPreferencePanelParams.mjs";
export * from "./gridMenuParams.mjs";
+13
View File
@@ -0,0 +1,13 @@
export * from "./gridColumnHeaderParams.js";
export * from "./gridColumnGroupHeaderParams.js";
export * from "./gridColumnOrderChangeParams.js";
export * from "./gridColumnResizeParams.js";
export * from "./gridEditCellParams.js";
export * from "./gridRowParams.js";
export * from "./gridScrollParams.js";
export * from "./gridRowSelectionCheckboxParams.js";
export * from "./gridHeaderSelectionCheckboxParams.js";
export * from "./gridValueOptionsParams.js";
export * from "./gridCellParams.js";
export * from "./gridPreferencePanelParams.js";
export * from "./gridMenuParams.js";
+148
View File
@@ -0,0 +1,148 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _gridColumnHeaderParams = require("./gridColumnHeaderParams");
Object.keys(_gridColumnHeaderParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridColumnHeaderParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridColumnHeaderParams[key];
}
});
});
var _gridColumnGroupHeaderParams = require("./gridColumnGroupHeaderParams");
Object.keys(_gridColumnGroupHeaderParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridColumnGroupHeaderParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridColumnGroupHeaderParams[key];
}
});
});
var _gridColumnOrderChangeParams = require("./gridColumnOrderChangeParams");
Object.keys(_gridColumnOrderChangeParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridColumnOrderChangeParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridColumnOrderChangeParams[key];
}
});
});
var _gridColumnResizeParams = require("./gridColumnResizeParams");
Object.keys(_gridColumnResizeParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridColumnResizeParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridColumnResizeParams[key];
}
});
});
var _gridEditCellParams = require("./gridEditCellParams");
Object.keys(_gridEditCellParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridEditCellParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridEditCellParams[key];
}
});
});
var _gridRowParams = require("./gridRowParams");
Object.keys(_gridRowParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridRowParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridRowParams[key];
}
});
});
var _gridScrollParams = require("./gridScrollParams");
Object.keys(_gridScrollParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridScrollParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridScrollParams[key];
}
});
});
var _gridRowSelectionCheckboxParams = require("./gridRowSelectionCheckboxParams");
Object.keys(_gridRowSelectionCheckboxParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridRowSelectionCheckboxParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridRowSelectionCheckboxParams[key];
}
});
});
var _gridHeaderSelectionCheckboxParams = require("./gridHeaderSelectionCheckboxParams");
Object.keys(_gridHeaderSelectionCheckboxParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridHeaderSelectionCheckboxParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridHeaderSelectionCheckboxParams[key];
}
});
});
var _gridValueOptionsParams = require("./gridValueOptionsParams");
Object.keys(_gridValueOptionsParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridValueOptionsParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridValueOptionsParams[key];
}
});
});
var _gridCellParams = require("./gridCellParams");
Object.keys(_gridCellParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridCellParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridCellParams[key];
}
});
});
var _gridPreferencePanelParams = require("./gridPreferencePanelParams");
Object.keys(_gridPreferencePanelParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridPreferencePanelParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridPreferencePanelParams[key];
}
});
});
var _gridMenuParams = require("./gridMenuParams");
Object.keys(_gridMenuParams).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridMenuParams[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridMenuParams[key];
}
});
});
+13
View File
@@ -0,0 +1,13 @@
export * from "./gridColumnHeaderParams.mjs";
export * from "./gridColumnGroupHeaderParams.mjs";
export * from "./gridColumnOrderChangeParams.mjs";
export * from "./gridColumnResizeParams.mjs";
export * from "./gridEditCellParams.mjs";
export * from "./gridRowParams.mjs";
export * from "./gridScrollParams.mjs";
export * from "./gridRowSelectionCheckboxParams.mjs";
export * from "./gridHeaderSelectionCheckboxParams.mjs";
export * from "./gridValueOptionsParams.mjs";
export * from "./gridCellParams.mjs";
export * from "./gridPreferencePanelParams.mjs";
export * from "./gridMenuParams.mjs";