import type React from "react"; import type { FixedSizeGridProps, GridChildComponentProps } from "react-window"; import type { DataGridFooterProps } from "../components/DataGridFooter.js"; import type { DataGridHeaderProps } from "../components/DataGridHeader.js"; import type { GridRowId, GridValidRowModel } from "../internal.js"; import type { DataGridViewStyle } from "./dataGridViewStyle.js"; export interface RenderCardParams extends GridChildComponentProps { row: R; columnIndex: number; rowIndex: number; style: React.CSSProperties; isScrolling?: boolean | undefined; } interface GalleryProps { /** * Props of `react-window`'s `FixedSizeGrid` */ virtualScrollerProps?: Partial>; itemWidth: `${number}%` | number; itemHeight: `${number}%` | number; renderCard: (params: RenderCardParams) => React.ReactElement | null; slotProps?: { galleryContainer?: { /** * Additional inline styles applied to `react-windows`'s `FixedSizeGrid` inner container. Useful for adjusting the container's spacing. * * @default { position: 'relative', margin: '0 auto' } */ style: React.CSSProperties; }; }; } declare module "@mui/x-data-grid/models/gridSlotsComponentsProps" { interface FooterPropsOverrides extends Partial, Record { } interface ToolbarPropsOverrides extends Partial, Record { } } declare module "@mui/x-data-grid-pro/models/gridGroupingColDefOverride" { interface GridGroupingColDefOverride { fullWidth?: boolean; } } declare module "@mui/x-data-grid-premium/models/dataGridPremiumProps" { interface DataGridPremiumProps { /** * Display rows with alternating background colors? * * @default false */ stripedRows?: boolean; /** * The style in which data will be displayed, can be either 'table' or 'gallery'. * @note 'gallery' view requires 'galleryProps' to be defined * * @default "table" */ viewStyle?: DataGridViewStyle; /** * A callback that will be called when the view style is changed using the toolbar buttons * * @default undefined */ onViewStyleChange?: (newViewStyle: "table" | "gallery") => void; /** * Should the toolbar be hidden? * * @default false */ hideToolbar?: boolean; /** * Props used to define the visual presentation of the gallery view. * * @default undefined */ galleryProps?: GalleryProps; /** * Should custom row reordering be enabled? * * @default false */ customRowReordering?: boolean | "sorted"; /** * Should a row reorder be allowed to take place? * * @default undefined */ isRowReorderable?: (source: GridRowId, target: GridRowId) => boolean; /** * Should the row be updated when reparented through reordering? * * @default false */ updateRowWhenReparented?: boolean; /** * @default column */ filter?: "column" | "operator"; } interface DataGridPremiumPropsWithDefaultValue { /** * Display rows with alternating background colors? * * @default false */ stripedRows?: boolean; /** * The style in which data will be displayed, can be either 'table' or 'gallery'. * @note 'gallery' view requires 'galleryProps' to be defined * * @default "table" */ viewStyle?: DataGridViewStyle; /** * A callback that will be called when the view style is changed using the toolbar buttons * * @default undefined */ onViewStyleChange?: (newViewStyle: "table" | "gallery") => void; /** * Should the toolbar be hidden? * * @default false */ hideToolbar?: boolean; /** * Props used to define the visual presentation of the gallery view. * * @default undefined */ galleryProps?: GalleryProps; /** * Should custom row reordering be enabled? * * @default false */ customRowReordering?: boolean | "sorted"; /** * Should a row reorder be allowed to take place? * * @default undefined */ isRowReorderable?: (source: GridRowId, target: GridRowId) => boolean; /** * Should the row be updated when reparented through reordering? * * @default false */ updateRowWhenReparented?: boolean; /** * @default column */ filter: "column" | "operator"; } } export {};