-
Notifications
You must be signed in to change notification settings - Fork 334
/
Copy pathdhtmlxgantt.d.ts
7177 lines (6026 loc) · 203 KB
/
dhtmlxgantt.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for dhtmlxGantt 9.0.3
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
type GanttCallback = (...args: any[]) => any;
export interface GanttEventCallback {
/**
* fires when autoscheduling is done
* @param taskId the root task id
* @param updatedTasks an array with the ids of rescheduled tasks
*/
"onAfterAutoSchedule"(taskId: string | number, updatedTasks: any[]): void;
/**
* fires after the api/gantt_batchupdate.md method was called
*/
"onAfterBatchUpdate"(): void;
/**
* if dynamic loading is enabled, fires after the task branch was loaded to the page
* @param settings an object which contains the task id and request URL
*/
"onAfterBranchLoading"(settings: any): void;
/**
* fires after the user has closed the lightbox (edit form)
*/
"onAfterLightbox"(): void;
/**
* fires after a new link is added to the Gantt chart
* @param id the link id
* @param link the link object
*/
"onAfterLinkAdd"(id: string | number, link: Link): void;
/**
* fires after the user deletes a link
* @param id the link id
* @param link the link object
*/
"onAfterLinkDelete"(id: string | number, link: Link): void;
/**
* fires after the user updates a link
* @param id the link id
* @param link the link object
*/
"onAfterLinkUpdate"(id: string | number, link: Link): void;
/**
* fires after the pop-up edit form is closed
* @param taskId the task id
*/
"onAfterQuickInfo"(taskId: string | number): void;
/**
* fires after the redo() method was called
* @param action a user action as an array of command objects
*/
"onAfterRedo"(action: any[]): void;
/**
* fires after resizing of the row height is finished
* @param id the task id
* @param task the item object
* @param oldHeight the old height of the row
* @param newHeight the new height of the row
*/
"onAfterRowResize"(id: string | number, task: Task, oldHeight: number, newHeight: number): void;
/**
* fires after tasks are sorted in the grid
* @param field the name of the column that the grid was sorted by or a custom sorting function
* @param desc optional, the sorting direction: <i>true</i> - descending, <i>false</i> - ascending<br>
* @param parent optional, the id of the parent task, if the tasks were sorted only in the branch of the specified parent
*/
"onAfterSort"(field: string | GanttCallback, desc?: boolean, parent?: string | number): void;
/**
* fires after the user adds a task to the Gantt chart
* @param id the task id
* @param task the task object
*/
"onAfterTaskAdd"(id: string | number, task: Task): void;
/**
* fires for each task which has been autoscheduled
* @param task the task object
* @param start a new start date
* @param link the link object that creates the constraint
* @param predecessor the predecessor task object
*/
"onAfterTaskAutoSchedule"(task: Task, start: Date, link: Link, predecessor: Task): void;
/**
* fires after the user deletes a task
* @param id the task id
* @param task the task object
*/
"onAfterTaskDelete"(id: string | number, task: Task): void;
/**
* fires after the user has finished to drag and released the mouse button
* @param id the task id
* @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore")
* @param e a native event object
*/
"onAfterTaskDrag"(id: string | number, mode: string, e: Event): void;
/**
* fires after a task was moved to a new vertical position
* @param id the id of the task to move
* @param parent the parent id
* @param tindex the index of the position in the parent branch that the task will be moved to
*/
"onAfterTaskMove"(id: string | number, parent: string | number, tindex: number): void;
/**
* fires after the user updates a task
* @param id the task id
* @param task the task object
*/
"onAfterTaskUpdate"(id: string | number, task: Task): void;
/**
* fires after the undo() method was called
* @param action an array of command objects
*/
"onAfterUndo"(action: any[]): void;
/**
* fires if the server returns an error
* @param request XML HTTP request object
*/
"onAjaxError"(request: any): boolean;
/**
* fires if some dependency loops were found during auto scheduling
* @param groups an array of dependency loops found in gantt
*/
"onAutoScheduleCircularLink"(groups: any[]): void;
/**
* fires before auto scheduling
* @param taskId the root task id
*/
"onBeforeAutoSchedule"(taskId: string | number): boolean;
/**
* fires before the api/gantt_batchupdate.md method is called
*/
"onBeforeBatchUpdate"(): void;
/**
* if dynamic loading is enabled, fires after a user expands the task branch but before loading starts
* @param settings an object which contains the task id and request URL
*/
"onBeforeBranchLoading"(settings: any): boolean;
/**
* before gantt exits the fullscreen mode and goes back to normal mode
*/
"onBeforeCollapse"(): boolean;
/**
* fires before data is rendered on the page
*/
"onBeforeDataRender"(): void;
/**
* fires before gantt is expanded to full screen
*/
"onBeforeExpand"(): boolean;
/**
* fires before the dhtmlxGantt initialization is started
*/
"onBeforeGanttReady"(): void;
/**
* fires before the Gantt chart is rendered on the page
*/
"onBeforeGanttRender"(): void;
/**
* fires immediately before the user opens the lightbox (edit form)
* @param id the task id
*/
"onBeforeLightbox"(id: string | number): boolean;
/**
* fires before a new link is added to the Gantt chart
* @param id the link id
* @param link the link object
*/
"onBeforeLinkAdd"(id: string | number, link: Link): boolean;
/**
* fires before the user deletes a link
* @param id the link id
* @param link the link object
*/
"onBeforeLinkDelete"(id: string | number, link: Link): boolean;
/**
* fires after the links have been loaded to the Gantt chart but before they are displayed
* @param id the link id
* @param link the link object
*/
"onBeforeLinkDisplay"(id: string | number, link: Link): boolean;
/**
* fires before a link is updated
* @param id the link id
* @param new_link the new (updated) object of the link
*/
"onBeforeLinkUpdate"(id: string | number, new_link: Link): boolean;
/**
* fires before selecting a task or a range of tasks
* @param e a native event object
*/
"onBeforeMultiSelect"(e: Event): void;
/**
* fires before data started to be parsed
*/
"onBeforeParse"(): void;
/**
* fires before the redo() method is called
* @param action a user action as an array of command objects
*/
"onBeforeRedo"(action: any[]): boolean;
/**
* fires before an action is added into the redo stack
* @param action a user action as an array of command objects
*/
"onBeforeRedoStack"(action: UndoRedoAction): boolean;
/**
* fires before the rollup task is displayed on its parent project
* @param taskId the rollup task id
* @param task the rollup task object
* @param parentId the id of the parent (project) task
*/
"onBeforeRollupTaskDisplay"(taskId: number | string, task: Task, parentId: number | string): boolean;
/**
* fires when a user drops a row in the grid
* @param sid the id of the task to move
* @param parent the parent id. If specified, the <b>tindex</b> will refer to the index in the <br> <b>'parent'</b> branch
* @param tindex the index of the position that the task will be moved from <br> (the index in the whole tree)
*/
"onBeforeRowDragEnd"(sid: string | number, parent: string | number, tindex: number): boolean;
/**
* fires before a row of the grid is dragged vertically to a different position
* @param id the id of the task to move in the grid
* @param parent the parent id
* @param tindex the index of the position in the parent branch that the task will be moved to
*/
"onBeforeRowDragMove"(id: string | number, parent: string | number, tindex: number): boolean;
/**
* fires before the user starts to resize the row height by drag-and-drop
* @param task the task object
*/
"onBeforeRowResize"(task: Task): boolean;
/**
* fires before resizing of the row height is completed
* @param id the task id
* @param task the task object
* @param newHeight the new height of the row
*/
"onBeforeRowResizeEnd"(id: number | string, task: Task, newHeight: number): boolean;
/**
* fires before a part of the split task is displayed on the Gantt chart
* @param id the id of the subtask
* @param task the object of the subtask
* @param parent the object of the parent task
*/
"onBeforeSplitTaskDisplay"(id: number | string, task: Task, parent: any): boolean;
/**
* fires before a new task is added to the Gantt chart
* @param id the task id
* @param task the task object
*/
"onBeforeTaskAdd"(id: string | number, task: Task): boolean;
/**
* fires for each task which is rescheduled
* @param task the task object
* @param start a new start date
* @param link the link object that creates the constraint
* @param predecessor the predecessor task object
*/
"onBeforeTaskAutoSchedule"(task: Task, start: Date, link: Link, predecessor: Task): boolean;
/**
* fires after the user has finished dragging and released the mouse button but before the changes are applied
* @param id the task id
* @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore")
* @param task the copy of the task object in its original state (before drag and drop)
*/
"onBeforeTaskChanged"(id: string | number, mode: string, task: Task): boolean;
/**
* fires before the user deletes a task
* @param id the task id
* @param task the task object
*/
"onBeforeTaskDelete"(id: string | number, task: Task): boolean;
/**
* fires after the tasks have been loaded to the Gantt chart, but before they are displayed
* @param id the task id
* @param task the task object
*/
"onBeforeTaskDisplay"(id: string | number, task: Task): boolean;
/**
* fires after the user has pressed the mouse button and started dragging, but before dhtmlxGantt starts the drag-and-drop operation
* @param id the task id
* @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore")
* @param e a native event object
*/
"onBeforeTaskDrag"(id: string | number, mode: string, e: Event): boolean;
/**
* fires before a task is moved to a new vertical position
* @param id the id of the task to move
* @param parent the parent id
* @param tindex the index of the position in the parent branch that the task will be moved to
*/
"onBeforeTaskMove"(id: string | number, parent: string | number, tindex: number): boolean;
/**
* fires before the task selection state is being changed (the task is being selected or unselected)
* @param id the id of a task
* @param state true if the task is going to be selected, false - if unselected
* @param e a native event object
*/
"onBeforeTaskMultiSelect"(id: string | number, state: boolean, e: Event | null): void;
/**
* fires before the user selects a task
* @param id the task id
*/
"onBeforeTaskSelected"(id: string | number): boolean;
/**
* fires before the user updates a task
* @param id the task id
* @param new_task the new (updated) object of the task
*/
"onBeforeTaskUpdate"(id: string | number, new_task: Task): void;
/**
* fires before the undo() method is called
* @param action an array of command objects
*/
"onBeforeUndo"(action: any[]): boolean;
/**
* fires before an action is added into the undo stack
* @param action a user action as an array of command objects
*/
"onBeforeUndoStack"(action: UndoRedoAction): boolean;
/**
* fires when the circular reference has been detected and auto scheduling is not possible
* @param link the link object
* @param group a group of tasks and links connected in a loop
*/
"onCircularLinkError"(link: Link, group: any): void;
/**
* fires after all tasks were removed from the Gantt chart by the api/gantt_clearall.md method
*/
"onClear"(): void;
/**
* fires when gantt went back to normal mode from the full screen mode
*/
"onCollapse"(): void;
/**
* fires when the user is dragging the column's border to resize the column
* @param index the column index
* @param column the column object
* @param new_width the new column's width
*/
"onColumnResize"(index: number, column: GridColumn, new_width: number): void;
/**
* fires after the user finished dragging the column's border to resize the column
* @param index the column index
* @param column the column object
* @param new_width the new column's width
*/
"onColumnResizeEnd"(index: number, column: GridColumn, new_width: number): boolean;
/**
* fires before the user starts to drag the column's border to resize the column
* @param index the column index
* @param column the column object
*/
"onColumnResizeStart"(index: number, column: GridColumn): boolean;
/**
* fires when a user clicks the right mouse button inside the Gantt chart (see the details)
* @param taskId the task id
* @param linkId the link id
* @param e a native event object
*/
"onContextMenu"(taskId: string | number, linkId: string | number, e: Event): void;
/**
* fires on the `dp.init(gantt)` call
* @param DataProcessor the DataProcessor object
*/
"onDataProcessorReady"(DataProcessor: any): void;
/**
* fires after data has been rendered on the page
*/
"onDataRender"(): void;
/**
* called after gantt has been cleared by the api/gantt_destructor.md method
*/
"onDestroy"(): void;
/**
* fires when the user clicks on an empty space in the Gantt chart (not on tasks)
* @param e a native event object
*/
"onEmptyClick"(e: Event): void;
/**
* fires when api/gantt_assert.md receives 'false' value, i.e. when assertion fails
* @param errorMessage a string with an error from the api/gantt_assert.md method
*/
"onError"(errorMessage: string): boolean;
/**
* fires when gantt is expanded to full screen
*/
"onExpand"(): void;
/**
* fires after the Gantt layout is ready, but before it is rendered
*/
"onGanttLayoutReady"(): void;
/**
* fires after the dhtmlxGantt initialization is complete but the Gantt chart is not rendered on the page yet
*/
"onGanttReady"(): void;
/**
* fires after the Gantt chart was rendered on the page
*/
"onGanttRender"(): void;
/**
* fires when the Gantt chart is scrolled to a particular point
* @param left the position of horizontal scroll
* @param top the position of vertical scroll
*/
"onGanttScroll"(left: number, top: number): void;
/**
* fires when the user clicks on the grid's header
* @param name the name attribute of the column which header the user clicks on
* @param e a native event object
*/
"onGridHeaderClick"(name: string, e: Event): boolean;
/**
* fires when the user is dragging the grid's border to resize the grid
* @param old_width the initial grid's width
* @param new_width the new grid's width
*/
"onGridResize"(old_width: number, new_width: number): void;
/**
* fires after the user finished dragging the grid's border to resize the grid
* @param old_width the initial grid's width
* @param new_width the new grid's width
*/
"onGridResizeEnd"(old_width: number, new_width: number): boolean;
/**
* fires before the user starts to drag the grid's border to resize the grid
* @param old_width the initial grid's width
*/
"onGridResizeStart"(old_width: number): boolean;
/**
* fires after the user has opened the lightbox (edit form)
* @param task_id the id of the task opened in the lightbox
*/
"onLightbox"(task_id: string | number): void;
/**
* fires when the user clicks on a custom button in the lightbox
* @param css the name of the CSS class applied to the button
* @param node an HTML element of the clicked button
* @param e a native 'click' event object
*/
"onLightboxButton"(css: string, node: HTMLElement, e: Event): void;
/**
* fires when the user clicks on the 'Cancel' button in the lightbox
* @param id the task id ( the task opened in the lightbox)
*/
"onLightboxCancel"(id: string | number): void;
/**
* fires when the structure of the lightbox is changed
* @param old_type the name of the initial lighbox's structure
* @param new_type the name of the new lighbox's structure
*/
"onLightboxChange"(old_type: string, new_type: string): void;
/**
* fires when the user clicks on the 'Delete' button in the lightbox
* @param id the task id (the task opened in the lightbox)
*/
"onLightboxDelete"(id: string | number): boolean;
/**
* fires when the user clicks on the 'Save' button in the lightbox
* @param id the id of unmodified task. Note, at this stage the lightbox values aren't applied to the task object yet and you can access the initial task using gantt.getTask(id)
* @param task the modified task object
* @param is_new specifies whether the user opens the lightbox to create a new task (<i>true</i>)<br> or update an existing one (<i>false</i>)
*/
"onLightboxSave"(id: string | number, task: Task, is_new: boolean): boolean;
/**
* fires when the user clicks on a link
* @param id the id of the clicked link
* @param e optional, a native event object
*/
"onLinkClick"(id: string | number, e?: Event): void;
/**
* fires when a user creates a new link between tasks
* @param link the object of a new link
*/
"onLinkCreated"(link: Link): boolean;
/**
* fires when the user double clicks on a link
* @param id the id of the clicked link
* @param e optional, a native event object
*/
"onLinkDblClick"(id: string | number, e?: Event): boolean;
/**
* fires when the id of a link is changed
* @param id the current link id
* @param new_id the new link id
*/
"onLinkIdChange"(id: string | number, new_id: string | number): void;
/**
* fires when the user adds a new link and dhtmlxGantt checks whether the link is valid
* @param link the link object
*/
"onLinkValidation"(link: Link): boolean;
/**
* fires after loading data from the data source has been completed
* @param url the server-side url (may be a static file or a server side script that outputs data)
* @param type ('json', 'xml', 'oldxml') the data type
*/
"onLoadEnd"(url: string, type: string): void;
/**
* fires immediately before loading data from the data source has been started
* @param url the server-side url (may be a static file or a server side script that outputs data)
* @param type ('json', 'xml', 'oldxml') the data type
*/
"onLoadStart"(url: string, type: string): void;
/**
* fires when the mouse is moved over the gantt container
* @param id the id of the task that the mouse is moved over
* @param e a native event object
*/
"onMouseMove"(id: string | number, e: Event): void;
/**
* fires after selection of a task or a range of tasks has been completed
* @param e a native event object
*/
"onMultiSelect"(e: Event): void;
/**
* fires after a collection of options has been loaded from the server, but isn't parsed yet
*/
"onOptionsLoad"(): void;
/**
* fires after data was parsed (became available for API) but before it was rendered in the Gantt chart
*/
"onParse"(): void;
/**
* fires when the pop-up edit form appears
* @param taskId the task id
*/
"onQuickInfo"(taskId: string | number): void;
/**
* fires after the user drops a vertically reordered row in the grid
* @param id the id of the task that the user has dragged vertically in the grid
* @param target the id of the task which place the dragged row has occupied
*/
"onRowDragEnd"(id: string | number, target: string | number): void;
/**
* fires before the user drags a row of the grid to vertically reorder it
* @param id the id of the task that the user drags in the grid
* @param target an HTML element of the task that the user drags
* @param e a native event object
*/
"onRowDragStart"(id: string | number, target: HTMLElement, e: Event): boolean;
/**
* fires when the user is dragging the border of the row to resize the row height
* @param id the task id
* @param task the task object
* @param currentHeight the current height of the row
*/
"onRowResize"(id: string | number, task: Task, currentHeight: number): void;
/**
* fires when the scale is re-rendered in order to display all tasks completely
*/
"onScaleAdjusted"(): void;
/**
* fires when the user clicks on the cell in the time scale
* @param e a native event object
* @param date the date of the clicked cell
*/
"onScaleClick"(e: Event, date: Date): void;
/**
* fires when the user clicks on a task row in the grid area (including the 'expand/collapse' and 'add task' buttons) or on a task bar in the timeline area
* @param id the id of the clicked task
* @param e optional, a native event object
*/
"onTaskClick"(id: string | number, e?: Event): boolean;
/**
* fires when a branch has been closed
* @param id the branch id
*/
"onTaskClosed"(id: string | number): void;
/**
* fires when a user creates a new task by pressing the'+' button in a grid, or when the api/gantt_createtask.md method is called
* @param task the object of a new task
*/
"onTaskCreated"(task: Task): boolean;
/**
* fires when the user double clicks on a task
* @param id the id of the double clicked task
* @param e a native event object
*/
"onTaskDblClick"(id: string, e?: Event): boolean;
/**
* fires when the user drags a task
* @param id the task id
* @param mode the drag mode ("resize", "progress", "move", "ignore")
* @param task the current (dragged) task object
* @param original the original(initial) task object
* @param e a native event object
*/
"onTaskDrag"(id: string | number, mode: string, task: Task, original: Task, e: Event): void;
/**
* fires when the id of a task is changed
* @param id the current task's id
* @param new_id the new task's id
*/
"onTaskIdChange"(id: string | number, new_id: string | number): void;
/**
* fires when a task is being loaded from the data source
* @param task the object of a task
*/
"onTaskLoading"(task: Task): boolean;
/**
* fires after the task selection state has changed (the task has been selected/unselected)
* @param id the id of a task
* @param state true if the task has been selected, false - if unselected
* @param e a native event object
*/
"onTaskMultiSelect"(id: string | number, state: boolean, e: Event): void;
/**
* fires when a branch has been opened
* @param id the branch id
*/
"onTaskOpened"(id: string | number): void;
/**
* fires when the user clicks on a row in the table
* @param id the task id
* @param row an HTML element of the clicked row
*/
"onTaskRowClick"(id: string | number, row: HTMLElement): void;
/**
* fires when the user selects a task
* @param id the task id
*/
"onTaskSelected"(id: string | number): void;
/**
* fires when the user unselects a task by selecting some other task
* @param id the task id (of the unselected task)
*/
"onTaskUnselected"(id: string | number): void;
/**
* fires when the dhtmlxGantt templates are initialized
*/
"onTemplatesReady"(): void;
}
export interface GanttTemplates {
/**
* specifies the text displayed inside the baseline element
* @param task the task object associated with the baseline
* @param baseline the baseline object
* @param index the index of the baseline in the task's baselines array
*/
baseline_text(task: Task, baseline: Baseline, index: number): string | number | void;
/**
* specifies the content of columns that show dates (return `Date` values) in grid
* @param date the date which needs formatting
* @param task the task object
* @param column the name of the column that called the template
*/
date_grid(date: Date, task: Task, column: string): string;
/**
* specifies the text of tooltips that are displayed when the user creates a new dependency link
* @param from the id of the source task
* @param from_start <i>true</i>, if the link is being dragged from the start of the source task, <i>false</i> - if <br> from the end of the task
* @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet)
* @param to_start <i>true</i>, if the link is being dragged to the start of the target task, <i>false</i> - if <br> to the end of the task
*/
drag_link(from: string | number, from_start: boolean, to: string | number, to_start: boolean): string;
/**
* specifies the CSS class that will be applied to the pop-up that appears when a user drags a link
* @param from the id of the source task
* @param from_start <i>true</i>, if the link is being dragged from the start of the source task, <i>false</i> - if <br> from the end of the task
* @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet)
* @param to_start <i>true</i>, if the link is being dragged to the start of the target task, <i>false</i> - if <br> to the end of the task
*/
drag_link_class(from: string | number, from_start: boolean, to: string | number, to_start: boolean): string | void;
/**
* converts a date object to a date string. Used to send data back to the server
* @param date the date which needs formatting
*/
format_date(date: Date): string;
/**
* specifies the custom content inserted before the labels of child items in the tree column
* @param task the task object
*/
grid_blank(task: Task): string;
/**
* specifies the format of dates for the columns that show dates (return the `Date` values)
* @param date the date which needs formatting
* @param column the name of the column that called the template
*/
grid_date_format(date: Date, column?: string): string;
/**
* specifies the icon of child items in the tree column
* @param task the task object
*/
grid_file(task: Task): string;
/**
* specifies the icon of parent items in the tree column
* @param task the task object
*/
grid_folder(task: Task): string;
/**
* specifies the CSS class that will be applied to the headers of the table's columns
* @param columnName the column's name (as specified in the "name" property of the column object)
* @param column column object (as specified in the <i>gantt.config.columns</i> config)
*/
grid_header_class(columnName: string, column: any): string | void;
/**
* specifies the indent of the child items in a branch (in the tree column)
* @param task the task object
*/
grid_indent(task: Task): string;
/**
* specifies the icon of the open/close sign in the tree column
* @param task the task object
*/
grid_open(task: Task): string;
/**
* specifies the CSS class that will be applied to a grid row
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
grid_row_class(start: Date, end: Date, task: Task): string | void;
/**
* defines the height of the filled area in the resourceHistogram
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): number | void;
/**
* specifies the height of the line that defines the available capacity of the resource
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): number | void;
/**
* defines the CSS class which is applied to a cell of the resource panel
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): string | void;
/**
* defines the label inside a cell
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): string | number | void;
/**
* specifies the CSS class that will be applied to a link
* @param link the link object
*/
link_class(link: Link): string | void;
/**
* specifies the text in the header of the link's "delete" confirm window
* @param link the link object
*/
link_description(link: any): string;
/**
* converts date string into a Date object
* @param date the string which need to be parsed
*/
parse_date(date: string): Date;
/**
* specifies the text in the completed part of the task bar
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
progress_text(start: Date, end: Date, task: Task): string | number | void;
/**
* specifies the CSS class that will be applied to the pop-up edit form
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
quick_info_class(start: Date, end: Date, task: Task): string | void;
/**
* specifies the content of the pop-up edit form
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
quick_info_content(start: Date, end: Date, task: Task): string;
/**
* specifies the date of the pop-up edit form
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
quick_info_date(start: Date, end: Date, task: Task): string;
/**
* specifies the title of the pop-up edit form
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
quick_info_title(start: Date, end: Date, task: Task): string | number | void;
/**
* defines the CSS class names of cells in the resource timeline cells
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): string | void;
/**
* defines the HTML content of resource timeline cells
* @param start_date start date of the scale cell
* @param end_date end date of the scale cell
* @param resource the resource object
* @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
* @param assignments resource assignments that are assigned to the specified start/end dates of the task
*/
resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]): string | number | void;
/**
* specifies the CSS class that will be applied to cells of the time scale of the timeline area
* @param date the date of a cell
*/
scale_cell_class(date: Date): string | void;
/**
* specifies the CSS class that will be applied to the time scale
* @param scale the scale's configuration object
*/
scale_row_class(scale: Scale): string | void;
/**
* specifies the CSS class that will be applied to task bars
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
task_class(start: Date, end: Date, task: Task): string | void;
/**
* specifies the date format of the label in the 'Time period' section of the lightbox
* @param date the date which needs formatting
*/
task_date(date: Date): string;
/**
* specifies the format for the end dates of tasks in the lightbox
* @param date the date which needs formatting
*/
task_end_date(date: Date): string;
/**
* specifies the CSS class that will be applied to the row of the timeline area
* @param start the date when a task is scheduled to begin
* @param end the date when a task is scheduled to be completed
* @param task the task object
*/
task_row_class(start: Date, end: Date, task: Task): string | void;