choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
84 lines (83 loc) • 2.58 kB
TypeScript
import React, { FunctionComponent, ReactElement } from 'react';
import { DraggableProps, DroppableProps, DragDropContextProps } from 'react-beautiful-dnd';
import { CardProps } from '../../../lib/card';
import { ViewMode, ViewField } from './enum';
import DataSet from '../data-set';
import { TableProps } from '../table/Table';
import Record from '../data-set/Record';
import { DataSetComponentProps, DataSetProps } from '../data-set/interface';
export declare const VIEWLISTDS = "__VIEWLISTDS__";
export interface BoardCardProps extends Omit<CardProps, 'onHeadClick' | 'onClick'> {
onHeadClick?: (e: MouseEvent, record: Record) => void;
onClick?: (e: MouseEvent, record: Record) => void;
}
export interface KanbanProps {
isDragDropDisabled: boolean;
allDsProps: DataSetProps;
columnDsProps: DataSetProps;
droppableProps: DroppableProps;
draggableProps: DraggableProps;
dragDropContext: DragDropContextProps;
}
export interface BoardProps extends DataSetComponentProps {
customized?: BoardCustomized | null;
customizable?: boolean;
customizedCode: string;
className?: string;
dataSet: DataSet;
tableProps: TableProps;
cardProps?: BoardCardProps;
kanbanProps?: KanbanProps;
viewMode?: ViewMode;
defaultViewMode: ViewMode;
defaultViewProps?: {
card?: any;
kanban?: any;
table?: any;
} | any;
queryFields?: {
[key: string]: ReactElement<any>;
};
onChange?: Function;
onConfigChange?: (props: {
config: any;
currentViewDS: DataSet;
}) => void;
renderCommand?: Function;
commandsLimit?: number;
renderButtons?: Function;
autoQuery?: boolean;
viewVisible?: {
card?: boolean;
kanban?: boolean;
table?: boolean;
} | boolean;
}
export interface BoardCustomized {
defaultFlag?: boolean;
dataJson?: object;
viewType: ViewMode;
viewName: string;
id: string;
}
export declare const DEFAULTVIEW: {
card: {
[ViewField.viewName]: string;
[ViewField.viewMode]: ViewMode;
[ViewField.id]: string;
};
kanban: {
[ViewField.viewName]: string;
[ViewField.viewMode]: ViewMode;
[ViewField.id]: string;
};
table: {
[ViewField.viewName]: string;
[ViewField.viewMode]: ViewMode;
[ViewField.id]: string;
};
};
declare const Board: FunctionComponent<BoardProps>;
export declare type ForwardBoardType = typeof Board;
declare const _default: React.FunctionComponent<BoardProps>;
export default _default;