import * as React from 'react'; import { GridContext } from './Grid'; import { IBindableEditorProps, IEditorContainerProps } from '../PropTypes'; import { Model } from '@singularsystems/neo-core'; import ComponentBase from '../ComponentBase'; import { INeoCommonColumnProps } from './ColumnHelper'; export interface INeoColumnProps extends INeoCommonColumnProps, IEditorContainerProps { /** * Convenient way to set width. Equivalent to specifying a style object with width property. * Numeric value will be interpreted as pixels. */ width?: number | string; /** * Convenient way to set max width. * Set `truncateText` to disable text wrapping and truncate the text with an ellipsis if it overflows. * Numeric value will be interpreted as pixels. */ maxWidth?: number | string; /** Tooltip to show in header. If you want the tooltip to show on the cells as well, use 'data-tip'. */ headerTooltip?: string; /** Tooltip to show in cells. If you want the tooltip to show on the headers as well, use 'data-tip'. */ cellTooltip?: string; /** Allows you to override the default allow sorting setting of the datasource, or make clicking a column heading sort a specific property. */ sort?: Model.IPropertyInstance | boolean; /** If true, will invert the sort icon. May be necessary when a different property is used as the sort value. */ invertSortIcon?: boolean; /** True if this column must have a total cell. */ sum?: boolean; /** Content callback to show in the footer. The filtered list of the grid is passed into the callback. */ footerContent?: (data: []) => any; /** Class name to apply to the header cell. */ headerClassName?: string; /** Class name to apply to body cells. */ cellClassName?: string; onHeaderClick?: (e: React.MouseEvent) => void; children?: React.ReactNode | (() => React.ReactNode); /** * If true, keeps each cell's text on one line and cuts it off with an ellipsis (…) when it doesn't fit. * Use in conjunction with the `maxWidth` property. */ truncateText?: boolean; } export default class Column extends ComponentBase> { static isColumnComponent: boolean; static contextType: React.Context>; context: React.ContextType; isHeader: boolean; isFooter: boolean; private stateObserver; private numFormatState; private controlType; private checkboxType; private suppressSort; private static getHeaderText; protected onFirstRender(): void; private getSortProperty; private headerClick; refreshStateObserver(props: IBindableEditorProps): void; componentWillUnmount(): void; render(): React.JSX.Element | null; private renderHeader; private renderBody; private renderFooter; }