import React from 'react'; import { GridProps, Columns } from '../grid'; export declare enum Fields { Input = "Input", InputNumber = "InputNumber", InputUrl = "InputUrl", InputTelePhone = "InputTelePhone", InputCellPhone = "InputCellPhone", InputEmail = "InputEmail", InputLanguage = "InputLanguage", InputMoney = "InputMoney", TextArea = "TextArea", DatePicker = "DatePicker", Selector = "Selector", LocationSelector = "LocationSelector" } export interface CustomColumnProps extends Columns { componentType?: Fields | React.ReactElement; } export interface ColumnConfig { fieldName: string; fixed?: 'left' | 'right'; sort?: string; width?: number | string; hidden?: boolean; } export interface PanelConfig { columnFields: ColumnConfig[]; } export interface ViewConfig { viewId: string; name: string; version: string; panelConfig: PanelConfig; } export interface SchemaProp { supportColumnFields: CustomColumnProps[]; systemViews: ViewConfig[]; } export interface ViewListProps { systemViews: ViewConfig[]; customViews: ViewConfig[]; } export declare type GantGridProps = Omit>, 'columns'>; export interface SmartGridProps extends GantGridProps { schema: SchemaProp | CustomColumnProps[]; title?: string | React.ReactElement; headerRight?: React.ReactElement; headerProps?: object; viewSchema?: ViewConfig; initView?: ViewConfig; onViewChange?: (viewSchema: any) => void; emptyDescription?: string; prefixCls?: string; customViews?: ViewConfig[]; companyViews?: ViewConfig[]; lastViewKey?: string; onCustomViewsChange?: (views: ViewConfig[]) => void; onCompanyViewsChange?: (views: ViewConfig[]) => void; userId?: string; companyViewAuth?: boolean; getCustomViews?: (gridKey: string) => Promise; getCompanyViews?: (gridKey: string) => Promise; setCustomViews?: (gridKey: string, views: ViewConfig[]) => void; setCompanyViews?: (gridKey: string, views: ViewConfig[]) => void; bindKeys?: any; onReload?: () => void; withoutAnimation?: boolean; showDisplayConfig?: boolean; hideHeader?: boolean; height?: number | string; style?: object; smartGridViewName?: string; } /** 兼容旧写法 */ export declare type SmartTableProps = SmartGridProps; export interface SmartGridType { (props: SmartGridProps): React.ReactElement; setFields?: (field: Object) => void; setProps?: (props: Object) => void; } export declare enum langEnum { 'zh-CN' = "zh-CN", 'en-US' = "en-US" } export interface LocalWrapperProps extends SmartGridProps { locale?: any; i18n?: langEnum; }