UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

73 lines (72 loc) 3.18 kB
import React, { Component, CSSProperties, MouseEventHandler, ReactNode, RefObject } from 'react'; import PropTypes from 'prop-types'; import { DraggableProvided } from 'react-beautiful-dnd'; import { ColumnProps } from './Column'; import Record from '../data-set/Record'; import { ElementProps } from '../core/ViewComponent'; import { FormFieldProps, Renderer } from '../field/FormField'; import { ColumnAlign, ColumnLock, TableCommandType } from './enum'; import { ButtonProps } from '../button/Button'; import { Commands } from './Table'; import TableEditor from './TableEditor'; export interface TableCellProps extends ElementProps { column: ColumnProps; record: Record; colSpan?: number; isDragging: boolean; lock?: ColumnLock | boolean; provided?: DraggableProvided; intersectionRef?: RefObject<any> | ((node?: Element | null) => void); inView: boolean; } export default class TableCell extends Component<TableCellProps> { static displayName: string; static propTypes: { column: PropTypes.Validator<object>; record: PropTypes.Validator<Record>; }; static contextType: React.Context<{ tableStore: import("./TableStore").default; }>; element?: HTMLSpanElement | null; nextFrameActionId?: number; overflow?: boolean; get cellEditor(): React.ReactElement<FormFieldProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined; get cellEditorInCell(): boolean; get hasEditor(): boolean | undefined; get canFocus(): boolean; get currentEditor(): TableEditor | undefined; get isInnerColumn(): boolean; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; saveOutput(node: any): void; connect(): void; disconnect(): void; handleResize(): void; handleOutputChange({ record, name }: { record: any; name: any; }): void; syncSize(): void; computeOverFlow(): boolean; handleEditorKeyDown(e: any): void; handleFocus(e: any): void; handleCommandEdit(): void; handleCommandDelete(): void; handleCommandSave(): Promise<void>; handleCommandCancel(): void; getButtonProps(type: TableCommandType, record: Record): (ButtonProps & { onClick: MouseEventHandler<any>; children?: ReactNode; }) | undefined; renderCommand(): JSX.Element[] | undefined; renderEditor(): React.ReactElement<FormFieldProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined; getCheckBox(): JSX.Element | undefined; getCommand(): Commands[] | undefined; getCellRenderer(command?: Commands[]): Renderer | undefined; getInnerSimple(prefixCls: any): JSX.Element; getInnerNode(prefixCls: any, command?: Commands[], textAlign?: ColumnAlign, onCellStyle?: CSSProperties): {}; render(): JSX.Element; showEditor(cell: any, lock?: ColumnLock | boolean): void; }