1 |
|
2 | export declare enum ViewMode {
|
3 | Hour = "Hour",
|
4 | QuarterDay = "Quarter Day",
|
5 | HalfDay = "Half Day",
|
6 | Day = "Day",
|
7 |
|
8 | Week = "Week",
|
9 | Month = "Month",
|
10 | Year = "Year"
|
11 | }
|
12 | export declare type TaskType = "task" | "milestone" | "project";
|
13 | export interface Task {
|
14 | id: string;
|
15 | type: TaskType;
|
16 | name: string;
|
17 | start: Date;
|
18 | end: Date;
|
19 | |
20 |
|
21 |
|
22 | progress: number;
|
23 | styles?: {
|
24 | backgroundColor?: string;
|
25 | backgroundSelectedColor?: string;
|
26 | progressColor?: string;
|
27 | progressSelectedColor?: string;
|
28 | };
|
29 | isDisabled?: boolean;
|
30 | project?: string;
|
31 | dependencies?: string[];
|
32 | hideChildren?: boolean;
|
33 | displayOrder?: number;
|
34 | }
|
35 | export interface EventOption {
|
36 | |
37 |
|
38 |
|
39 | timeStep?: number;
|
40 | |
41 |
|
42 |
|
43 | onSelect?: (task: Task, isSelected: boolean) => void;
|
44 | |
45 |
|
46 |
|
47 | onDoubleClick?: (task: Task) => void;
|
48 | |
49 |
|
50 |
|
51 | onClick?: (task: Task) => void;
|
52 | |
53 |
|
54 |
|
55 | onDateChange?: (task: Task, children: Task[]) => void | boolean | Promise<void> | Promise<boolean>;
|
56 | |
57 |
|
58 |
|
59 | onProgressChange?: (task: Task, children: Task[]) => void | boolean | Promise<void> | Promise<boolean>;
|
60 | |
61 |
|
62 |
|
63 | onDelete?: (task: Task) => void | boolean | Promise<void> | Promise<boolean>;
|
64 | |
65 |
|
66 |
|
67 | onExpanderClick?: (task: Task) => void;
|
68 | }
|
69 | export interface DisplayOption {
|
70 | viewMode?: ViewMode;
|
71 | viewDate?: Date;
|
72 | preStepsCount?: number;
|
73 | |
74 |
|
75 |
|
76 | locale?: string;
|
77 | rtl?: boolean;
|
78 | }
|
79 | export interface StylingOption {
|
80 | headerHeight?: number;
|
81 | columnWidth?: number;
|
82 | listCellWidth?: string;
|
83 | rowHeight?: number;
|
84 | ganttHeight?: number;
|
85 | barCornerRadius?: number;
|
86 | handleWidth?: number;
|
87 | fontFamily?: string;
|
88 | fontSize?: string;
|
89 | |
90 |
|
91 |
|
92 |
|
93 | barFill?: number;
|
94 | barProgressColor?: string;
|
95 | barProgressSelectedColor?: string;
|
96 | barBackgroundColor?: string;
|
97 | barBackgroundSelectedColor?: string;
|
98 | projectProgressColor?: string;
|
99 | projectProgressSelectedColor?: string;
|
100 | projectBackgroundColor?: string;
|
101 | projectBackgroundSelectedColor?: string;
|
102 | milestoneBackgroundColor?: string;
|
103 | milestoneBackgroundSelectedColor?: string;
|
104 | arrowColor?: string;
|
105 | arrowIndent?: number;
|
106 | todayColor?: string;
|
107 | TooltipContent?: React.FC<{
|
108 | task: Task;
|
109 | fontSize: string;
|
110 | fontFamily: string;
|
111 | }>;
|
112 | TaskListHeader?: React.FC<{
|
113 | headerHeight: number;
|
114 | rowWidth: string;
|
115 | fontFamily: string;
|
116 | fontSize: string;
|
117 | }>;
|
118 | TaskListTable?: React.FC<{
|
119 | rowHeight: number;
|
120 | rowWidth: string;
|
121 | fontFamily: string;
|
122 | fontSize: string;
|
123 | locale: string;
|
124 | tasks: Task[];
|
125 | selectedTaskId: string;
|
126 | |
127 |
|
128 |
|
129 | setSelectedTask: (taskId: string) => void;
|
130 | onExpanderClick: (task: Task) => void;
|
131 | }>;
|
132 | }
|
133 | export interface GanttProps extends EventOption, DisplayOption, StylingOption {
|
134 | tasks: Task[];
|
135 | }
|