/** * @license * Copyright 2022 Aglyn LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type BoxProps, type LinearProgressProps as MuiLinearProgressProps } from '@mui/material'; import { type DataGridProps as MuiDataGridProps, type GridColDef as MuiGridColDef } from '@mui/x-data-grid'; import { type ReactNode } from 'react'; type LoadingOverlayViewProps = { LinearProgressProps?: MuiLinearProgressProps; }; export interface DataTableProps extends Partial { rows?: MuiDataGridProps['rows']; columns?: MuiDataGridProps['columns']; loading?: MuiDataGridProps['loading']; RootBoxProps?: Partial; LoadingOverlayViewProps?: LoadingOverlayViewProps; noRowsLabel?: string; /** * The empty state's second line and its way OUT (AGL-1152). * * `EmptyStateComponent` has drawn a description and an action since AGL-2501; * this grid only ever handed it a label, so every list built on it — layouts, * components, templates — showed an illustration and a dead end, while the * screens list (which is not a grid) grew its own empty state WITH buttons * and no illustration. Same product, same moment, two different answers, and * neither one complete. */ noRowsDescription?: ReactNode; /** The create button an empty list should offer. */ noRowsAction?: ReactNode; children?: JSX.Children; } /** * Adds a small help affordance to the header of every column that declares a * `description` (AGL-601). Columns with their own `renderHeader` are left * untouched. Also usable directly by call sites that render MUI `DataGrid` * themselves instead of `DataTableComponent`. */ export declare function withColumnHelp(columns: readonly MuiGridColDef[]): MuiGridColDef[]; declare const DataTableComponent: import("react").ForwardRefExoticComponent>; export { DataTableComponent }; export default DataTableComponent;