/// import * as React from 'react'; import { PanelItemContext, PanelItemProp, PanelItemProps, PanelItemTemplate, PanelRenderProps, PanelTemplateProps } from './Panel'; /** * a row context only knows about its row number * NOTE: the inherited index always has the same value as the row */ export interface GridRowContext extends PanelItemContext { row: number; } /** * a column context knows both its row number and column number * the index represents the index of the panel item being rendered */ export interface GridColumnContext extends GridRowContext { column: number; } /** * a layout element represents props for a component that helps define * the grid layout (i.e. GridRowDefinitions and RowDefinition) */ export interface GridLayoutElementProps extends PanelItemProps, PanelTemplateProps, PanelRenderProps { } /** * a row layout element with a height prop */ export interface RowDefinitionProps extends GridLayoutElementProps { height?: number; } /** * a component to define a grid row, optionally with a static height value * if height is omitted, height will auto stretch to consume available space */ export declare class RowDefinition extends React.Component { } /** * a row collection layout element to define row layout elements as children */ export interface GridRowDefinitionsProps extends GridLayoutElementProps { children?: React.ReactElement> | Array>>; } /** * a component to define the row layout component collection */ export declare class GridRowDefinitions extends React.Component { } /** * a column layout element with a width prop * width can be a ratio represented as a string (i.e., '1*' for 1 unit) * NOTE: if using multiple stretch columns, the number of units used * becomes the divisor (i.e., '1*', '2*', '4*' to denote 1/7, 2/7, 4/7) */ export interface ColumnDefinitionProps extends GridLayoutElementProps { width?: number | string; } /** * a component to define a grid column, optionally with a width value * if width is omitted, width will auto stretch to consume '1*' of space */ export declare class ColumnDefinition extends React.Component { static defaultProps: Partial; } /** * a column collection layout element to define column layout elements as children */ export interface GridColumnDefinitionsProps extends GridLayoutElementProps { children?: React.ReactElement> | Array>>; } /** * a component to define the column layout component collection */ export declare class GridColumnDefinitions extends React.Component { } export declare type GridLayoutDefinitionGroupElement = React.ReactElement | GridColumnDefinitionsProps>; export declare type GridLayoutDefinitionElement = React.ReactElement | ColumnDefinitionProps>; /** * this class is used internally to compute the grid layout metadata */ export declare class GridLayoutDefinition { static generateKey(row: number, column?: number): string; readonly amount: number | undefined; readonly stretch: boolean; readonly itemClassName: PanelItemProp | undefined; readonly itemStyle: PanelItemProp | undefined; readonly itemProps: PanelItemProp<{}, GridRowContext | GridColumnContext> | undefined; readonly compact: boolean | undefined; readonly itemTemplate: PanelItemTemplate | undefined; constructor(definition?: GridLayoutDefinitionElement, definitionGroup?: GridLayoutDefinitionGroupElement); protected getAmountAndStretch(val: string | number | undefined): { amount: number; stretch: boolean; } | { amount: undefined; stretch: boolean; }; protected getLayoutParam(definition?: GridLayoutDefinitionElement): { val: string | number | undefined; type: string | React.ComponentClass & ColumnDefinitionProps<{}>> | React.StatelessComponent & ColumnDefinitionProps<{}>>; } | { val: undefined; type: undefined; }; }