import * as React from 'react'; import { StandardProps } from '../../common'; import { InteractiveSurface } from '../InteractiveSurface'; import { Grid } from '../Grid'; import { GridArea } from '../GridArea'; export interface DashboardTile { /** * Id of the tile, must be unique. */ id: string; /** * The column placement for the tile. By default auto. * @default auto */ column?: number; /** * The row placement for the tile. By default auto. * @default auto */ row?: number; /** * The number of columns spanned by the tile. By default 1. * @default 1 */ colSpan?: number; /** * The number of rows spanned by the tile. By default 1. * @default 1 */ rowSpan?: number; /** * Determines whether the tile is hidden or not. * @default false */ hidden?: boolean; } export interface DashboardChangeEvent { /** * The tile that originated the change. */ tile: DashboardTile; /** * The reconstructed dashboard layout. */ tiles: Array; } export interface DashboardProps extends StandardProps { /** * The number of rows in the dashboard grid. By default flexible. * @default auto */ rowCount?: number; /** * The height per row in pixel. By default auto. * @default auto */ rowHeight?: number; /** * The number of columns in the dashboard grid. By default 5. * @default 5 */ columnCount?: number; /** * The height per row in pixel. By default auto. * @default auto */ columnWidth?: number; /** * The spacing between the grid cells in pixel. By default 10. * @default 10 */ spacing?: number; /** * The default tile arrangement to use. Only managed mode exist. Setting * this property later will reset the tile layout to the given one. */ defaultTiles: Array; /** * Fired when the dashboard layout is changed. */ onChange?(e: DashboardChangeEvent): void; /** * Disables the ability to change the layout. By default false. * @default false */ disabled?: boolean; /** * Enables the live preview during the tile drag with a standard * or custom element. */ preview?: React.ReactChild | boolean; /** * By providing the show tile property, the dashboard will render * the unused tiles. */ emptyTiles?: boolean; /** * The content to consider for the dashboard. */ children?: React.ReactNode; /** * Gets the reference to the underlying HTML DOM element. */ innerRef?(instance: HTMLElement | null): void; } export interface DashboardState { tiles: Array; live?: Array; } /** * Dashboard component. */ export declare class Dashboard extends React.Component { private setters; private layout; private activeTile; constructor(props: DashboardProps); UNSAFE_componentWillReceiveProps(nextProps: DashboardProps): void; private finishDrag; private dragTile; private previewDrag; private getTargetPosition; private setActiveTile; private setLayout; render(): JSX.Element; static inner: { readonly InteractiveSurface: typeof InteractiveSurface; readonly Grid: typeof Grid; readonly GridArea: typeof GridArea; }; }