import { Dayjs } from 'dayjs'; import React from 'react'; import { GanttContext } from './context'; import './Gantt.less'; import { DefaultRecordType, Gantt } from './types'; export interface GanttProps { data: Gantt.Record[]; columns: Gantt.Column[]; dependencies?: Gantt.Dependence[]; onUpdate: (record: Gantt.Record, startDate: string, endDate: string) => Promise; startDateKey?: string; endDateKey?: string; isRestDay?: (date: string) => boolean; unit?: Gantt.Sight; rowHeight?: number; columnsWidth?: number; innerRef?: React.MutableRefObject; getBarColor?: GanttContext['getBarColor']; showBackToday?: GanttContext['showBackToday']; showUnitSwitch?: GanttContext['showUnitSwitch']; onRow?: GanttContext['onRow']; tableIndent?: GanttContext['tableIndent']; expandIcon?: GanttContext['expandIcon']; renderBar?: GanttContext['renderBar']; renderGroupBar?: GanttContext['renderGroupBar']; renderInvalidBar?: GanttContext['renderInvalidBar']; renderBarThumb?: GanttContext['renderBarThumb']; onBarClick?: GanttContext['onBarClick']; tableCollapseAble?: GanttContext['tableCollapseAble']; scrollTop?: GanttContext['scrollTop']; disabled?: boolean; alwaysShowTaskBar?: boolean; renderLeftText?: GanttContext['renderLeftText']; renderRightText?: GanttContext['renderLeftText']; onExpand?: GanttContext['onExpand']; /** * 自定义日期筛选维度 */ customSights?: Gantt.SightConfig[]; locale?: GanttLocale; /** * 隐藏左侧表格 */ hideTable?: boolean; } export interface GanttRef { backToday: () => void; getWidthByDate: (startDate: Dayjs, endDate: Dayjs) => number; } export interface GanttLocale { today: string; day: string; days: string; week: string; month: string; quarter: string; halfYear: string; firstHalf: string; secondHalf: string; majorFormat: { day: string; week: string; month: string; quarter: string; halfYear: string; }; minorFormat: { day: string; week: string; month: string; quarter: string; halfYear: string; }; } export declare const defaultLocale: GanttLocale; declare const GanttComponent: (props: GanttProps) => React.JSX.Element; export default GanttComponent;