dhtmlxgantt.d.ts
65.1 KB
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
// Type definitions for dhtmlxGantt 7.0.11
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
type GanttCallback = (...args: any[]) => any;
export type GanttEventName = "onAfterAutoSchedule"|"onAfterBatchUpdate"|"onAfterBranchLoading"|"onAfterLightbox"|"onAfterLinkAdd"|"onAfterLinkDelete"|"onAfterLinkUpdate"|"onAfterQuickInfo"|"onAfterRedo"|"onAfterSort"|"onAfterTaskAdd"|"onAfterTaskAutoSchedule"|"onAfterTaskDelete"|"onAfterTaskDrag"|"onAfterTaskMove"|"onAfterTaskUpdate"|"onAfterUndo"|"onAjaxError"|"onAutoScheduleCircularLink"|"onBeforeAutoSchedule"|"onBeforeBatchUpdate"|"onBeforeBranchLoading"|"onBeforeCollapse"|"onBeforeDataRender"|"onBeforeExpand"|"onBeforeGanttReady"|"onBeforeGanttRender"|"onBeforeLightbox"|"onBeforeLinkAdd"|"onBeforeLinkDelete"|"onBeforeLinkDisplay"|"onBeforeLinkUpdate"|"onBeforeMultiSelect"|"onBeforeParse"|"onBeforeRedo"|"onBeforeRedoStack"|"onBeforeRowDragEnd"|"onBeforeRowDragMove"|"onBeforeTaskAdd"|"onBeforeTaskAutoSchedule"|"onBeforeTaskChanged"|"onBeforeTaskDelete"|"onBeforeTaskDisplay"|"onBeforeTaskDrag"|"onBeforeTaskMove"|"onBeforeTaskMultiSelect"|"onBeforeTaskSelected"|"onBeforeTaskUpdate"|"onBeforeUndo"|"onBeforeUndoStack"|"onCircularLinkError"|"onClear"|"onCollapse"|"onColumnResize"|"onColumnResizeEnd"|"onColumnResizeStart"|"onContextMenu"|"onDataProcessorReady"|"onDataRender"|"onDestroy"|"onEmptyClick"|"onError"|"onExpand"|"onGanttLayoutReady"|"onGanttReady"|"onGanttRender"|"onGanttScroll"|"onGridHeaderClick"|"onGridResize"|"onGridResizeEnd"|"onGridResizeStart"|"onLightbox"|"onLightboxButton"|"onLightboxCancel"|"onLightboxChange"|"onLightboxDelete"|"onLightboxSave"|"onLinkClick"|"onLinkCreated"|"onLinkDblClick"|"onLinkIdChange"|"onLinkValidation"|"onLoadEnd"|"onLoadStart"|"onMouseMove"|"onMultiSelect"|"onOptionsLoad"|"onParse"|"onQuickInfo"|"onRowDragEnd"|"onRowDragStart"|"onScaleAdjusted"|"onScaleClick"|"onTaskClick"|"onTaskClosed"|"onTaskCreated"|"onTaskDblClick"|"onTaskDrag"|"onTaskIdChange"|"onTaskLoading"|"onTaskMultiSelect"|"onTaskOpened"|"onTaskRowClick"|"onTaskSelected"|"onTaskUnselected"|"onTemplatesReady";
export interface GanttTemplates {
/**
* specifies the content of start date or end date columns 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: any, 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;
/**
* 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: any): string;
/**
* specifies the format of dates in the "Start time" column
* @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: any): string;
/**
* specifies the icon of parent items in the tree column
* @param task the task object
*/
grid_folder(task: any): 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;
/**
* specifies the indent of the child items in a branch (in the tree column)
* @param task the task object
*/
grid_indent(task: any): string;
/**
* specifies the icon of the open/close sign in the tree column
* @param task the task object
*/
grid_open(task: any): 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: any): string;
/**
* 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
*/
histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: any[]): 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
*/
histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: any[]): 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
*/
histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): 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
*/
histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: any[]): void;
/**
* specifies the CSS class that will be applied to a link
* @param link the link object
*/
link_class(link: any): string;
/**
* 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: any): string;
/**
* 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: any): 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: any): 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: any): 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: any): string;
/**
* 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
*/
resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): string;
/**
* 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
*/
resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: any[]): string;
/**
* 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;
/**
* specifies the CSS class that will be applied to the time scale
* @param scale the scale's configuration object
*/
scale_row_class(scale: any): string;
/**
* 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: any): string;
/**
* 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: any): string;
/**
* specifies the text in the task bars and the header of the lightbox
* @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_text(start: Date, end: Date, task: any): string;
/**
* specifies the date period in the header of the lightbox
* @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_time(start: Date, end: Date, task: any): string;
/**
* specifies the dates of unscheduled tasks
* @param task the task object
*/
task_unscheduled_time(task: any): void;
/**
* specifies the format of the drop-down time selector in the lightbox
* @param date the date which needs formatting
*/
time_picker(date: Date): string;
/**
* specifies the CSS class that will be applied to the cells of the timeline area
* @param item the task object assigned to the row
* @param date the date of a cell
*/
timeline_cell_class(item: any, date: Date): string;
/**
* specifies the format of start and end dates displayed in the tooltip
* @param date the date which needs formatting
*/
tooltip_date_format(date: Date): string;
/**
* specifies the text of tooltips
* @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
*/
tooltip_text(start: Date, end: Date, task: any): string;
/**
* a string from an XML file is converted into a date object in conformity with this template
* @param date the date which needs formatting
*/
xml_date(date: Date): string;
/**
* a date object is converted into a string in conformity with this template. Used to send data back to the server
* @param date the date which needs formatting
*/
xml_format(date: Date): string;
/**
* specifies the text assigned to tasks bars on the right side
* @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
*/
rightside_text(start: Date, end: Date, task: any): string;
/**
* specifies the text assigned to tasks bars on the left side
* @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
*/
leftside_text(start: Date, end: Date, task: any): string;
/**
* specifies the lightbox's header
* @param start_date the date when a task is scheduled to begin
* @param end_date the date when a task is scheduled to be completed
* @param task the task's object
*/
lightbox_header(start_date: Date, end_date: Date, task: any): string;
}
export interface GanttConfigOptions {
/**
* enables auto scheduling
*/
auto_scheduling: boolean;
/**
* disables usage of time contraints for tasks
*/
auto_scheduling_compatibility: boolean;
/**
* allows or forbids creating links from parent tasks (projects) to their children
*/
auto_scheduling_descendant_links: boolean;
/**
* defines whether gantt will do autoscheduling on data loading/parsing
*/
auto_scheduling_initial: boolean;
/**
* defines whether the whole project will be moved (see the details below)
*/
auto_scheduling_move_projects: boolean;
/**
* enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date
*/
auto_scheduling_strict: boolean;
/**
* automatically converts tasks with subtasks to projects and projects without subtasks back to tasks
*/
auto_types: boolean;
/**
* enables automatic adjusting of the grid's columns to the grid's width
*/
autofit: boolean;
/**
* enables autoscrolling while dragging a task or link out of the current browser screen
*/
autoscroll: boolean;
/**
* defines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen
*/
autoscroll_speed: number;
/**
* forces the Gantt chart to automatically change its size to show all tasks without scrolling
*/
autosize: boolean|string;
/**
* sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode
*/
autosize_min_width: number;
/**
* enables dynamic loading in the Gantt chart
*/
branch_loading: boolean;
/**
* specifies that the task has children that are not yet loaded from the backend
*/
branch_loading_property: string;
/**
* stores a collection of buttons resided in the left bottom corner of the lightbox
*/
buttons_left: any[];
/**
* stores a collection of buttons resided in the right bottom corner of the lightbox
*/
buttons_right: any[];
/**
* changes the name of the property that affects binding of a calendar to a task/group of tasks
*/
calendar_property: string;
/**
* enables cascade deleting of nested tasks and links
*/
cascade_delete: boolean;
/**
* enables advanced drag-n-drop
*/
click_drag: any;
/**
* configures the columns of the table
*/
columns: any[];
/**
* contains all available constraint types
*/
constraint_types: any;
/**
* enables adjusting the task's start and end dates to the work time (while dragging)
*/
correct_work_time: boolean;
/**
* defines internal implementation of the code of date formatting methods
*/
csp: boolean|string;
/**
* sets the date format that is used to parse data from a data set and to send dates back to the server
*/
date_format: string;
/**
* sets the format of dates in the "Start time" column of the table
*/
date_grid: string;
/**
* sets the format of the time scale (X-Axis)
*/
date_scale: string;
/**
* 'says' to open the lightbox while creating new events by clicking the '+' button
*/
details_on_create: boolean;
/**
* 'says' to open the lightbox after double clicking on a task
*/
details_on_dblclick: boolean;
/**
* enables the possibility to drag the lightbox by the header
*/
drag_lightbox: boolean;
/**
* enables creating dependency links by drag-and-drop
*/
drag_links: boolean;
/**
* stores the types of available drag-and-drop modes
*/
drag_mode: any;
/**
* enables the possibility to move tasks by drag-and-drop
*/
drag_move: boolean;
/**
* enables the possibility to drag several selected tasks at once
*/
drag_multiple: boolean;
/**
* enables the possibility to change the task progress by dragging the progress knob
*/
drag_progress: boolean;
/**
* enables drag and drop of items of the project type
*/
drag_project: boolean;
/**
* enables the possibility to resize tasks by drag-and-drop
*/
drag_resize: boolean;
/**
* configures the behavior of the drag_timeline extension
*/
drag_timeline: any;
/**
* sets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property.
*/
duration_step: number;
/**
* sets the duration unit
*/
duration_unit: string;
/**
* enables automatic merging of multiple resource calendars into one
*/
dynamic_resource_calendars: boolean;
/**
* changes the name of a property that affects the editing ability of tasks/links in the read-only Gantt chart
*/
editable_property: string;
/**
* an object that contains definitions of inline editors
*/
editor_types: any;
/**
* sets the end value of the time scale
*/
end_date: Date;
/**
* 'says' the Gantt chart to automatically extend the time scale in order to fit all displayed tasks
*/
fit_tasks: boolean;
/**
* adjusts the width of columns inside a scrollable grid
*/
grid_elastic_columns: boolean;
/**
* makes the grid resizable by dragging the right grid's border
*/
grid_resize: boolean;
/**
* sets the name of the attribute of the grid resizer's DOM element
*/
grid_resizer_attribute: string;
/**
* sets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index
*/
grid_resizer_column_attribute: string;
/**
* sets the width of the grid
*/
grid_width: number;
/**
* shows the critical path in the chart
*/
highlight_critical_path: boolean;
/**
* enables/disables horizontal scroll by the Shift|Alt|Meta key + mouse wheel movement
*/
horizontal_scroll_key: string|boolean;
/**
* defines whether tasks should inherit work calendars from their summary parents
*/
inherit_calendar: boolean;
/**
* specifies whether sub-scales shall use the scale_cell_class template by default
*/
inherit_scale_class: boolean;
/**
* sets whether the timeline area will be initially scrolled to display the earliest task
*/
initial_scroll: boolean;
/**
* keeps the duration of a task unchanged during editing of the start/end of a task
*/
inline_editors_date_processing: string;
/**
* 'says' to preserve the initial grid's width while resizing columns within
*/
keep_grid_width: boolean;
/**
* enables keyboard navigation in gantt
*/
keyboard_navigation: boolean;
/**
* enables keyboard navigation by cells
*/
keyboard_navigation_cells: boolean;
/**
* sets the name of the attribute of the task layer's DOM element
*/
layer_attribute: string;
/**
* specifies the layout object
*/
layout: any;
/**
* specifies the lightbox object
*/
lightbox: any;
/**
* increases the height of the lightbox
*/
lightbox_additional_height: number;
/**
* sets the size of the link arrow
*/
link_arrow_size: number;
/**
* sets the name of the attribute that will specify the id of the link's HTML element
*/
link_attribute: string;
/**
* sets the width of dependency links in the timeline area
*/
link_line_width: number;
/**
* sets the width of the area (over the link) sensitive to clicks
*/
link_wrapper_width: number;
/**
* stores the types of links dependencies
*/
links: any;
/**
* sets the minimum width for a column in the timeline area
*/
min_column_width: number;
/**
* sets the minimum duration (in milliseconds) that can be set for a task during resizing.
*/
min_duration: number;
/**
* sets the minumum width for the grid (in pixels) while being resized
*/
min_grid_column_width: number;
/**
* enables/disables multi-task selection in the Gantt chart
*/
multiselect: boolean;
/**
* specifies whether multi-task selection will be available within one or any level
*/
multiselect_one_level: boolean;
/**
* enables the possibility to expand/collapse split tasks by clicking the +/- button
*/
open_split_tasks: boolean;
/**
* openes all branches initially
*/
open_tree_initially: boolean;
/**
* activates the 'branch' mode that allows vertically reordering tasks within the same tree level
*/
order_branch: string|boolean;
/**
* activates the 'branch' mode that allows reordering tasks within the whole gantt
*/
order_branch_free: boolean;
/**
* adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard
*/
placeholder_task: boolean;
/**
* preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart
*/
preserve_scroll: boolean;
/**
* specifies whether the gantt container should block the mousewheel event, or should it be propagated up to the window element
*/
prevent_default_scroll: boolean;
/**
* specifies the end date of a project
*/
project_end: Date;
/**
* specifies the start date of a project
*/
project_start: Date;
/**
* defines whether the task form will appear from the left/right side of the screen or near the selected task
*/
quick_info_detached: boolean;
/**
* stores a collection of buttons resided in the pop-up task's details form
*/
quickinfo_buttons: any[];
/**
* activates the read-only mode for the Gantt chart
*/
readonly: boolean;
/**
* changes the name of a property that affects the read-only behaviour of tasks/links
*/
readonly_property: string;
/**
* enables the Redo functionality for the gantt
*/
redo: boolean;
/**
* enables the possibility to reorder grid columns by drag and drop
*/
reorder_grid_columns: boolean;
/**
* changes the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to
*/
resource_attribute: string;
/**
* defines a set of working calendars that can be assigned to a specific resource, e.g. a user
*/
resource_calendars: any;
/**
* defines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram/Calendar
*/
resource_property: string;
/**
* tells the resource timeline to render elements and call templates for non-allocated cells
*/
resource_render_empty_cells: boolean;
/**
* specifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views
*/
resource_store: string;
/**
* sets the id of the virtual root element
*/
root_id: string|number;
/**
* enables rounding the task's start and end dates to the nearest scale marks
*/
round_dnd_dates: boolean;
/**
* sets the default height for rows of the table
*/
row_height: number;
/**
* switches gantt to the right-to-left mode
*/
rtl: boolean;
/**
* sets the height of the time scale and the header of the grid
*/
scale_height: number;
/**
* sets the minimal scale unit (in case multiple scales are used) as the interval of the leading/closing empty space
*/
scale_offset_minimal: boolean;
/**
* sets the unit of the time scale (X-Axis)
*/
scale_unit: string;
/**
* defines configuration settings of the time scale
*/
scales: any[];
/**
* enables backward scheduling
*/
schedule_from_end: boolean;
/**
* specifies whether the timeline area shall be scrolled while selecting to display the selected task
*/
scroll_on_click: boolean;
/**
* set the sizes of the vertical (width) and horizontal (height) scrolls
*/
scroll_size: number;
/**
* enables selection of tasks in the Gantt chart
*/
select_task: boolean;
/**
* enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server
*/
server_utc: boolean;
/**
* shows the chart (timeline) area of the Gantt chart
*/
show_chart: boolean;
/**
* enables showing error alerts in case of unexpected behavior
*/
show_errors: boolean;
/**
* shows the grid area of the Gantt chart
*/
show_grid: boolean;
/**
* enables/disables displaying links in the Gantt chart
*/
show_links: boolean;
/**
* shows/hides markers on the page
*/
show_markers: boolean;
/**
* enables displaying of the progress inside the task bars
*/
show_progress: boolean;
/**
* activates/disables the 'quick_info' extension (pop-up task's details form)
*/
show_quick_info: boolean;
/**
* enables/disables displaying column borders in the chart area
*/
show_task_cells: boolean;
/**
* enables showing tasks that are outside the specified date range in the Gantt chart
*/
show_tasks_outside_timescale: boolean;
/**
* enables showing unscheduled tasks
*/
show_unscheduled: boolean;
/**
* hides non-working time from the time scale
*/
skip_off_time: boolean;
/**
* enables the smart rendering mode for gantt's tasks and links rendering
*/
smart_rendering: boolean;
/**
* specifies that only visible part of the time scale is rendered on the screen
*/
smart_scales: boolean;
/**
* enables sorting in the table
*/
sort: boolean;
/**
* sets the start value of the time scale
*/
start_date: Date;
/**
* sets the starting day of the week
*/
start_on_monday: boolean;
/**
* generates a background image for the timeline area instead of rendering actual columns' and rows' lines
*/
static_background: boolean;
/**
* enables rendering of highlighted cells in the static_background mode
*/
static_background_cells: boolean;
/**
* sets the step of the time scale (X-Axis)
*/
step: number;
/**
* specifies the second time scale(s) (deprecated)
*/
subscales: any[];
/**
* sets the name of the attribute that will specify the id of the task's HTML element
*/
task_attribute: string;
/**
* sets the format of the date label in the 'Time period' section of the lightbox
*/
task_date: string;
/**
* sets the height of task bars in the timeline area
*/
task_height: number|string;
/**
* sets the offset (in pixels) of the nearest task from the left border in the timeline
*/
task_scroll_offset: number;
/**
* sets the format of the time drop-down selector in the lightbox
*/
time_picker: string;
/**
* sets the minimum step (in minutes) for the task's time values
*/
time_step: number;
/**
* sets the length of time, in milliseconds, before the tooltip hides
*/
tooltip_hide_timeout: number;
/**
* sets the right (if positive) offset of the tooltip's position
*/
tooltip_offset_x: number;
/**
* sets the top (if positive) offset of the tooltip's position
*/
tooltip_offset_y: number;
/**
* sets the timeout in milliseconds before the tooltip is displayed for a task
*/
tooltip_timeout: number;
/**
* enables/disables the touch support for the Gantt chart
*/
touch: boolean|string;
/**
* defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture
*/
touch_drag: number|boolean;
/**
* returns vibration feedback before/after drag and drop on touch devices
*/
touch_feedback: boolean;
/**
* defines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds)
*/
touch_feedback_duration: number;
/**
* redefines functions responsible for displaying different types of tasks
*/
type_renderers: any;
/**
* stores the names of lightbox's structures (used for different types of tasks)
*/
types: any;
/**
* enables the Undo functionality for the gantt
*/
undo: boolean;
/**
* sets the actions that the Undo operation will revert
*/
undo_actions: any;
/**
* sets the number of steps that should be reverted by the undo method
*/
undo_steps: number;
/**
* sets the types of entities for which the Undo operation will be applied
*/
undo_types: any;
/**
* enables WAI-ARIA support to make the component recognizable for screen readers
*/
wai_aria_attributes: boolean;
/**
* sets both the section and its label on the same line
*/
wide_form: boolean;
/**
* enables calculating the duration of tasks in working time instead of calendar time
*/
work_time: boolean;
/**
* defines date formats that are used to parse data from a data set and to send data to a server
*/
xml_date: string;
}
export interface GanttDateHelpers {
add(origin: Date, count: number, unit: string): Date;
copy(origin: Date): Date;
date_part(origin: Date): Date;
time_part(origin: Date): Date;
day_start(origin: Date): Date;
month_start(origin: Date): Date;
week_start(origin: Date): Date;
year_start(origin: Date): Date;
getISOWeek(origin: Date): number;
getUTCISOWeek(origin: Date): number;
date_to_str(format: string): any;
str_to_date(format: string): any;
convert_to_utc(origin: Date): Date;
to_fixed(value: number): string;
}
export interface GanttHotkeys {
edit_save: number;
edit_cancel: number;
}
export type MonthLabelList = [string, string, string, string, string, string, string, string, string, string, string, string];
export type WeekDayLabelList = [string, string, string, string, string, string, string];
export interface GanttLocaleDate {
month_full: MonthLabelList;
month_short: MonthLabelList;
day_full: WeekDayLabelList;
day_short: WeekDayLabelList;
}
export interface GanttLocaleLabels {
new_task: string;
icon_save: string;
icon_cancel: string;
icon_details: string;
icon_edit: string;
icon_delete: string;
confirm_closing: string;
confirm_deleting: string;
section_description: string;
section_time: string;
section_type: string;
/* grid columns */
column_wbs: string;
column_text: string;
column_start_date: string;
column_duration: string;
column_add: string;
/* link confirmation */
link: string;
confirm_link_deleting: string;
link_start: string;
link_end: string;
type_task: string;
type_project: string;
type_milestone: string;
minutes: string;
hours: string;
days: string;
weeks: string;
months: string;
years: string;
/* message popup */
message_ok: string;
message_cancel: string;
/* constraints */
section_constraint: string;
constraint_type: string;
constraint_date: string;
asap: string;
alap: string;
snet: string;
snlt: string;
fnet: string;
fnlt: string;
mso: string;
mfo: string;
/* resource control */
resources_filter_placeholder: string;
resources_filter_label: string;
}
export interface GanttLocale {
date: GanttLocaleDate;
labels: GanttLocaleLabels;
}
export interface GanttPlugins {
auto_scheduling?: boolean;
click_drag?: boolean;
critical_path?: boolean;
drag_timeline?: boolean;
fullscreen?: boolean;
keyboard_navigation?: boolean;
quick_info?: boolean;
tooltip?: boolean;
undo?: boolean;
grouping?: boolean;
marker?: boolean;
multiselect?: boolean;
overlay?: boolean;
}
export interface GanttInitializationConfig {
container?: string|HTMLElement;
config?: any;
templates?: any;
events?: any;
data?: any;
plugins?: GanttPlugins;
locale?: any;
}
export interface GanttInternationalization {
setLocale(locale: any): void;
getLocale(language?: string): GanttLocale;
addLocale(language: string, locale: GanttLocale): void;
}
export type GanttPlugin = (gantt: GanttStatic) => void;
export interface GanttEnterprise {
plugin(plugin: GanttPlugin): void;
getGanttInstance(settings?: GanttInitializationConfig) : GanttStatic;
}
export interface GanttStatic {
/**
* redefines the default click behavior for buttons of the Gantt chart
*/
$click: any;
/**
* gantt ajax module
*/
ajax: any;
/**
* the interface of the working calendar object
*/
calendar: any;
/**
* defines configuration options for dates, scale, controls
*/
config: GanttConfigOptions;
/**
* stores various constants to reduce the use of magic numbers in the code
*/
constants: any;
/**
* a set of date formatting methods
*/
date: GanttDateHelpers;
/**
* a set of flags which describe current environment
*/
env: any;
/**
* an object that stores various extensions
*/
ext: any;
/**
* a set of methods for Gantt chart localization
*/
i18n: GanttInternationalization;
/**
* specifies JSON serialization and parsing
*/
json: any;
/**
* defines the hot keys for the Gantt chart
*/
keys: GanttHotkeys;
/**
* returns the license name of dhtmlxGantt
*/
license: any;
/**
* the current locale object (region-specific labels) of the Gantt chart
*/
locale: GanttLocale;
/**
* specifies serialization and parsing in the XML format of dhtmlxGantt 1.0
*/
oldxml: any;
/**
* returns the current skin of the Gantt chart
*/
skin: string;
/**
* returns objects of the available skins
*/
skins: any;
/**
* defines formatting templates for dates, titles, tooltips in the Gantt chart
*/
templates: GanttTemplates;
/**
* various helper modules
*/
utils: any;
/**
* returns the version of dhtmlxGantt
*/
version: string;
/**
* specifies XML serialization and parsing
*/
xml: any;
/**
* Promise object constructor
* @param executor a callback used to initialize the promise
*/
Promise: new (executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void) => Promise<unknown>;
/**
* adds a calendar into Gantt
* @param calendar an object with configuration of the calendar
*/
addCalendar(calendar: any): number;
/**
* adds a new dependency link
* @param link the link object
*/
addLink(link: any): string|number;
/**
* displays an additional layer with custom elements for a link in the timeline area
* @param func a render function or a config object
*/
addLinkLayer(func: any): string;
/**
* adds a marker to the timeline area
* @param marker the marker's configuration object
*/
addMarker(marker: any): string;
/**
* adds a new keyboard shortcut
* @param shortcut the key name or the name of keys combination for a shortcut (<a href="desktop/keyboard_navigation.md#shortcutsyntax">shortcut syntax</a>)
* @param handler the handler of the shortcut call
* @param scope the name of the context element to attach the handler function to (<a href="desktop/keyboard_navigation.md#scopes">list of scopes</a>)
*/
addShortcut(shortcut: string, handler: GanttCallback, scope: string): void;
/**
* adds a new task
* @param task the task object
* @param parent optional, optional, the parent's id
* @param index optional, optional, the position the task will be added into (0 or greater)
*/
addTask(task: any, parent?: string|number, index?: number): string|number;
/**
* displays an additional layer with custom elements for a task in the timeline area
* @param func a render function or a config object
*/
addTaskLayer(func: any): string;
/**
* calls an alert message box
* @param config the alert box's configuration
*/
alert(config: any): HTMLElement;
/**
* if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen
* @param expression true to assert the expression, false - if assertion fails
* @param errorMessage an error message that will be shown in the red popup
*/
assert(expression: boolean, errorMessage: string): void;
/**
* attaches the handler to an inner event of dhtmlxGantt
* @param name the event's name, case-insensitive
* @param handler the handler function
* @param settings optional, an <a href="#propertiesofsettingsobject">object with settings</a> for the event handler
*/
attachEvent(name: GanttEventName, handler: GanttCallback, settings: any): string;
/**
* recalculates the schedule of the project
* @param taskId optional, optional, the task id
*/
autoSchedule(taskId?: string|number): void;
/**
* updates multiple tasks/links at once
* @param callback the callback function
*/
batchUpdate(callback: GanttCallback): void;
/**
* creates a new function that, when called, has its <i>this</i> keyword set to the provided value
* @param method the target function
* @param thisArg the value to be passed as the <i>this</i> parameter to the target function when the bound function is called
*/
bind(method: GanttCallback, thisArg: any): GanttCallback;
/**
* calculates the duration of a task
* @param config the <a href="#configurationobjectproperties">configuration object</a> of a time span
*/
calculateDuration(config: any): number;
/**
* calculates the end date of a task
* @param config the <a href="#configurationobjectproperties">configuration object</a> of a time span
*/
calculateEndDate(config: any): Date;
/**
* calculates the level of nesting of a task
* @param task the task's object
*/
calculateTaskLevel(task: any): number;
/**
* calls an inner event
* @param name the event's name, case-insensitive
* @param params an array of the event-related data
*/
callEvent(name: string, params: any[]): boolean;
/**
* repaints the lighbox for the task according to its type
* @param type the task type
*/
changeLightboxType(type: string): void;
/**
* changes the link's id
* @param id the current link's id
* @param new_id the new link's id
*/
changeLinkId(id: string|number, new_id: string|number): void;
/**
* changes the task's id
* @param id the current task's id
* @param new_id the new task's id
*/
changeTaskId(id: string|number, new_id: string|number): void;
/**
* checks whether an event has some handler(s) specified
* @param name the event's name
*/
checkEvent(name: GanttEventName): boolean;
/**
* removes all tasks and additional elements (including markers) from the Gantt chart
*/
clearAll(): void;
/**
* clears the stack of stored redo commands
*/
clearRedoStack(): void;
/**
* clears the stack of stored undo commands
*/
clearUndoStack(): void;
/**
* closes the branch with the specified id
* @param id the branch id
*/
close(id: string|number): void;
/**
* collapses gantt from the full screen mode to the normal mode
*/
collapse(): void;
/**
* returns the index of the column by the date
* @param date a date object
*/
columnIndexByDate(date: Date): number;
/**
* calls a confirm message box
* @param config the confirm box's configuration
*/
confirm(config: any): HTMLElement;
/**
* creates a deep copy of provided object
* @param task the object that needs to be copied
*/
copy(task: any): any;
/**
* recalculates the task duration in the work time
* @param task the task's object
*/
correctTaskWorkTime(task: any): void;
/**
* creates a working calendar
* @param parentCalendar optional, (optional) an existing calendar that is used for creating a new one on the base of it
*/
createCalendar(parentCalendar?: any): void;
/**
* creates a new dataProcessor instance and attaches it to gantt
* @param config dataProcessor configuration object
*/
createDataProcessor(config: any): any;
/**
* creates a datastore according to the provided configuration
* @param config a configuration object of a datastore
*/
createDatastore(config: any): void;
/**
* adds a new task and opens the lightbox to confirm
* @param task the task object
* @param parent the parent's id
* @param index optional, optional, the position the task will be added into (0 or greater)
*/
createTask(task: any, parent: string, index?: number): string|number;
/**
* dataProcessor constructor
* @param url url to the data feed
*/
dataProcessor(url: string): void;
/**
* gets the date of the specified horizontal position in the chart area
* @param pos the relative horizontal position you want to know the date of
*/
dateFromPos(pos: number): Date;
/**
* returns false if the provided argument is undefined, otherwise true
* @param task the object that should be checked
*/
defined(task: any): boolean;
/**
* deletes a task calendar by its id
* @param id the id of the calendar
*/
deleteCalendar(id: string|number): void;
/**
* deletes the specified dependency link
* @param id the dependency link's id
*/
deleteLink(id: string|number): void;
/**
* deletes the specified marker
* @param markerId the marker's id
*/
deleteMarker(markerId: string): void;
/**
* deletes the specified task
* @param id the task's id
*/
deleteTask(id: string|number): void;
/**
* destroys the gantt instance
*/
destructor(): void;
/**
* detaches all events from dhtmlxGantt (both custom and inner ones)
*/
detachAllEvents(): void;
/**
* detaches a handler from an event (which was attached before by the attachEvent() method)
* @param id the event's id
*/
detachEvent(id: string): void;
/**
* iterates over all parent tasks of the specified task in the Gantt chart
* @param code a function that will iterate over tasks. Takes a task object as a parameter
* @param startTask the id of the item the parent tasks of which should be iterated over
* @param master optional, the object, that 'this' will refer to
*/
eachParent(code: GanttCallback, startTask: string|number, master?: any): void;
/**
* iterates over all selected tasks in the Gantt chart
* @param code a function that will iterate over tasks. Takes a task id as a parameter
*/
eachSelectedTask(code: GanttCallback): void;
/**
* iterates over all child tasks of a specific task or the of whole Gantt chart
* @param code a function that will iterate over tasks. Takes a task object as a parameter
* @param parent optional, the parent id. If specified, the function will iterate over children of the <br> specified parent
* @param master optional, the object, that 'this' will refer to
*/
eachTask(code: GanttCallback, parent?: string|number, master?: any): void;
/**
* attaches an event handler to an HTML element
* @param node the HTML node or its id
* @param event the name of an HTML event (without the 'on' prefix)
* @param handler the event handler
* @param options optional, optional, the value of either the <i>useCapture</i> or <i>options</i> parameter. <a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener">Read details</a>
*/
event(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void;
/**
* removes an event handler from an HTML element
* @param node the HTML node or its id
* @param event the name of an HTML event (without the 'on' prefix)
* @param handler the event handler
* @param options optional, optional, the value of either the <i>useCapture</i> or <i>options</i> parameter. <a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener">Read details</a>
*/
eventRemove(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void;
/**
* expands gantt to the full screen mode
*/
expand(): void;
/**
* exports data from the Gantt chart to an Excel document
* @param _export_ an object with export settings (see the details)
*/
exportToExcel(_export_: any): void;
/**
* exports data from the Gantt chart to an iCal string
* @param _export_ an object with export settings (see the details)
*/
exportToICal(_export_: any): void;
/**
* exports the structure and data of a Gantt chart into a JSON object
* @param config an object with Gantt configuration
*/
exportToJSON(config: any): void;
/**
* exports data from the Gantt chart to MS Project
* @param _export_ an object with export settings (see the details)
*/
exportToMSProject(_export_: any): void;
/**
* exports a Gantt chart into the PDF format
* @param _export_ an object with export settings (see the details)
*/
exportToPDF(_export_: any): void;
/**
* exports a Gantt chart into the PNG format
* @param _export_ an object with export settings (see the details)
*/
exportToPNG(_export_: any): void;
/**
* exports data from the Gantt chart to Primavera P6
* @param _export_ an object with export settings (see the details)
*/
exportToPrimaveraP6(_export_: any): void;
/**
* returns all dependency loops in the chart
*/
findCycles(): any[];
/**
* sets focus on the gantt
*/
focus(): void;
/**
* gets worktime calendar by id
* @param calendarId the id of the global calendar or "global"
*/
getCalendar(calendarId: string|number): any;
/**
* gets all the calendars added into Gantt
*/
getCalendars(): any[];
/**
* returns the 1st-level child tasks of the specified parent branch
* @param id the parent branch's id
*/
getChildren(id: string|number): any[];
/**
* returns the closest working time
* @param config the configuration object
*/
getClosestWorkTime(config: any): Date;
/**
* returns the index of the column by its name
* @param name the name of the column
*/
getColumnIndex(name: string): number;
/**
* returns all tasks and links that a task is connected with
* @param id optional, optional, the id of a task
*/
getConnectedGroup(id?: string|number): any;
/**
* returns the earliest and latest dates allowed by the constraint applied to a task
* @param task a task object
*/
getConstraintLimitations(task: any): void;
/**
* returns the constraint type applied to the task
* @param task a task object
*/
getConstraintType(task: any): string;
/**
* returns the configuration object of a datastore
* @param name the name of the datastore
*/
getDatastore(name: string): any;
/**
* returns the free slack of a task
* @param task the object of a task
*/
getFreeSlack(task: any): number;
/**
* gets the index of a task in the tree
* @param id the task id
*/
getGlobalTaskIndex(id: string|number): number;
/**
* gets the configuration object of a column
* @param name the column's name
*/
getGridColumn(name: string): any;
/**
* gets columns of the Gantt chart
*/
getGridColumns(): any[];
/**
* gets the label of a select control in the lightbox
* @param property the name of a data property that the control is mapped to
* @param key the option's id. This parameter is compared with the task's data property to <br> assign the select's option to the task
*/
getLabel(property: string, key: string|number): string;
/**
* returns the id of the last selected task
*/
getLastSelectedTask(): string|number;
/**
* gets the lightbox's HTML object element
*/
getLightbox(): HTMLElement;
/**
* returns the object of the lightbox's section
* @param name the name of the section
*/
getLightboxSection(name: string): any;
/**
* returns the name of the active lighbox's structure
*/
getLightboxType(): string;
/**
* returns values of the lightbox's sections
*/
getLightboxValues(): any;
/**
* returns the dependency link object by the specified id
* @param id the link id
*/
getLink(id: string|number): any;
/**
* returns the number of all dependency links presented in the Gantt chart
*/
getLinkCount(): number;
/**
* returns the HTML element of the specified dependency link
* @param id the link id
*/
getLinkNode(id: string|number): HTMLElement;
/**
* returns all links presented in the Gantt chart
*/
getLinks(): any[];
/**
* gets the marker's object
* @param markerId the marker's id
*/
getMarker(markerId: string): any;
/**
* returns the id of the next item (no matter what the level of nesting is: the same or different)
* @param id the task id
*/
getNext(id: string|number): string|number;
/**
* returns the id of the next task of the same level
* @param id the task id
*/
getNextSibling(id: string|number): string|number;
/**
* returns the id of the parent task
* @param id the task id
*/
getParent(id: string|number): string|number;
/**
* returns the id of the previous item (no matter what the level of nesting is: the same or different)
* @param id the task id
*/
getPrev(id: string|number): string|number;
/**
* returns the id of the previous task of the same level
* @param id the task id
*/
getPrevSibling(id: string|number): string|number;
/**
* returns the stack of stored redo user actions
*/
getRedoStack(): any[];
/**
* returns all tasks assigned to the resource
* @param resourceId the id of the resource
*/
getResourceAssignments(resourceId: string|number): any[];
/**
* returns a calendar which the resource is assigned to
* @param resource the id or object of the resource
*/
getResourceCalendar(resource: any): any;
/**
* returns the configuration of the time scale
*/
getScale(): any;
/**
* returns the scroll position
*/
getScrollState(): any;
/**
* returns the id of the selected task
*/
getSelectedId(): string;
/**
* returns an array of the currently selected tasks
*/
getSelectedTasks(): any[];
/**
* gets a key navigation shortcut handler
* @param shortcut the key name or the name of keys combination for a shortcut (<a href="desktop/keyboard_navigation.md#shortcutsyntax">shortcut syntax</a>)
* @param scope the name of the context element to attach the handler function to (<a href="desktop/keyboard_navigation.md#scopes">list of scopes</a>)
*/
getShortcutHandler(shortcut: string, scope: string): GanttCallback;
/**
* returns siblings of the specified task (including itself)
* @param id the task id
*/
getSiblings(id: string|number): any[];
/**
* checks how much time (in the current duration unit) a task has before it starts to affect other tasks
* @param task1 the object of the 1st task to check the slack for
* @param task2 the object of the 2nd task to check the slack for
*/
getSlack(task1: any, task2: any): number|string;
/**
* gets the current state of the Gantt chart
*/
getState(): any;
/**
* calculates the combined start/end dates of tasks nested in a project or another task
* @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified
*/
getSubtaskDates(task_id?: string|number): any;
/**
* calculates the combined duration of tasks nested in a project or another task.
* @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified
*/
getSubtaskDuration(task_id?: string|number): number;
/**
* returns the task object
* @param id the task id
*/
getTask(id: string|number): any;
/**
* finds a task by the specified criteria
* @param propertyName the name of the property to match, or a filter function
* @param propertyValue the property value
*/
getTaskBy(propertyName: string|GanttCallback, propertyValue: any): any[];
/**
* returns a task by its global task index
* @param index the task index in the tree (zero-based numbering)
*/
getTaskByIndex(index: number): any;
/**
* returns a collection of tasks which occur during the specified period
* @param from optional, the start date of the period
* @param to optional, the end date of the period
*/
getTaskByTime(from?: Date, to?: Date): any[];
/**
* returns a task by its WBS code
* @param code the WBS code of the task
*/
getTaskByWBSCode(code: string): any;
/**
* gets a calendar assigned to the specified task (a task level calendar)
* @param task the id or object of a task
*/
getTaskCalendar(task: any): any;
/**
* gets the number of tasks that are currently loaded in the gantt
*/
getTaskCount(): number;
/**
* returns the visible height of a task
*/
getTaskHeight(): number;
/**
* gets the index of a task in the branch
* @param id the task id
*/
getTaskIndex(id: string|number): number;
/**
* returns the HTML element of the task bar
* @param id the task id
*/
getTaskNode(id: string|number): HTMLElement;
/**
* calculates the position and size of the task's DOM element in the timeline area
* @param task the task object
* @param from the start date of the item
* @param to the end date of the item
*/
getTaskPosition(task: any, from: Date, to: Date): any;
/**
* returns the HTML element of the task row in the table
* @param id the task id
*/
getTaskRowNode(id: string|number): HTMLElement;
/**
* gets the top position of the task's DOM element in the timeline area
* @param id the task's id
*/
getTaskTop(id: number|string): number;
/**
* returns the type of a task
* @param task the task object
*/
getTaskType(task: any): string;
/**
* returns the total slack of a task
* @param task the object of a task
*/
getTotalSlack(task: any): number;
/**
* returns the stack of stored undo user actions
*/
getUndoStack(): any[];
/**
* gets the number of tasks visible on the screen (those that are not collapsed)
*/
getVisibleTaskCount(): number;
/**
* returns the WBS code (the outline number) of a task
* @param task the object of a task
*/
getWBSCode(task: any): string;
/**
* returns the working hours of the specified date
* @param date a date to check
*/
getWorkHours(date: Date): any[];
/**
* groups tasks by the specified task's attribute
* @param config the grouping configuration object, or false to ungroup tasks
*/
groupBy(config: any): void;
/**
* checks whether the specified item has child tasks
* @param id the task id
*/
hasChild(id: string|number): boolean;
/**
* hides the lightbox modal overlay that blocks interactions with the remaining screen
* @param box optional, an element to hide
*/
hideCover(box?: HTMLElement): void;
/**
* closes the lightbox if it's currently active
*/
hideLightbox(): void;
/**
* hides the pop-up task form (if it's currently active)
*/
hideQuickInfo(): void;
/**
* converts an Excel file to JSON
* @param config an object with configuration properties of an imported file
*/
importFromExcel(config: any): void;
/**
* converts an XML or MPP MS Project file to JSON
* @param config an object with configuration properties of an imported file
*/
importFromMSProject(config: any): void;
/**
* converts an XML or XAR Primavera P6 file to JSON
* @param config an object with configuration properties of an imported file
*/
importFromPrimaveraP6(config: any): void;
/**
* initializes a dhtmlxGantt inside a container
* @param container an HTML container (or its id) where a dhtmlxGantt object will be initialized
* @param from optional, the start value of the time scale (X–Axis)
* @param to optional, the end value of the time scale (X–Axis)
*/
init(container: string|HTMLElement, from?: Date, to?: Date): void;
/**
* checks whether a task is a child of a different task
* @param childId the id of a task that you want to check as a child
* @param parentId the id of a task that you want to check as a parent
*/
isChildOf(childId: string|number, parentId: string|number): boolean;
/**
* checks whether the link is circular
* @param link the link object
*/
isCircularLink(link: any): boolean;
/**
* checks whether the specified link is critical
* @param link the link's object
*/
isCriticalLink(link: any): boolean;
/**
* checks whether the specified task is critical
* @param task the task's object
*/
isCriticalTask(task: any): boolean;
/**
* checks whether the specified link is correct
* @param link the link object
*/
isLinkAllowed(link: any): boolean;
/**
* checks whether the specified link exists
* @param id the link id
*/
isLinkExists(id: string|number): boolean;
/**
* checks whether the specified task or link is read-only
* @param id the task/link id
*/
isReadonly(id: string|number): boolean;
/**
* checks whether the specified task is currently selected
* @param task the task's id
*/
isSelectedTask(task: string|number): boolean;
/**
* checks whether the specified task is split
* @param task the object of a task
*/
isSplitTask(task: any): boolean;
/**
* checks whether the specified task is summary
* @param task the object of a task
*/
isSummaryTask(task: any): boolean;
/**
* checks whether the specified task exists
* @param id the task id
*/
isTaskExists(id: string|number): boolean;
/**
* checks whether the specifies task is currently rendered in the Gantt chart
* @param id the task's id
*/
isTaskVisible(id: string|number): boolean;
/**
* checks if the task is unscheduled
* @param task the task's object
*/
isUnscheduledTask(task: any): boolean;
/**
* checks whether the specified date is working or not
* @param config the configuration object of a time span
*/
isWorkTime(config: any): boolean;
/**
* loads data to the gantt from an external data source
* @param url the server-side url (may be a static file or a server side script that outputs data)
* @param type optional, <i>('json', 'xml', 'oldxml')</i> the data type. The default value - <i>'json'</i>
* @param callback optional, the callback function
*/
load(url: string, type?: string, callback?: GanttCallback): any;
/**
* gets the id of a task from the specified HTML event
* @param e a native event
*/
locate(e: Event): string|number;
/**
* merges several working calendars into one
* @param calendars an array of calendars' objects
*/
mergeCalendars(calendars: any[]): void;
/**
* calls a message box of the specified type
* @param config the message box's configuration
*/
message(config: any): HTMLElement;
/**
* adds properties of the 'source' object into the 'target' object
* @param target the target object
* @param source the source object
* @param force if true, properties of the 'source' will overwrite matching properties of the 'target', if there are any. If false, properties that already exist in the 'target' will be omitted
*/
mixin(target: any, source: any, force: boolean): void;
/**
* calls a modalbox
* @param config the modal box's configuration
*/
modalbox(config: any): HTMLElement;
/**
* moves a task to a new position
* @param sid the id of the task to move
* @param tindex the index of the position that the task will be moved to <br> (the index within a branch)
* @param parent optional, the parent id. If specified, the <b>tindex</b> will refer to the index in the <br> <b>'parent'</b> branch
*/
moveTask(sid: string|number, tindex: number, parent?: string|number): boolean;
/**
* opens the branch with the specified id
* @param id the branch id
*/
open(id: string|number): void;
/**
* loads data from a client-side resource
* @param url a string or object which represents data
* @param type optional, optional, (<i>'json', 'xml'</i>) the data type. The default value - <i>'json'</i>
*/
parse(url: any, type?: string): void;
/**
* activates specified extensions
* @param ext extensions that need to be activated
*/
plugins(ext: any): void;
/**
* gets the relative horizontal position of the specified date in the chart area
* @param date a date you want to know the position of
*/
posFromDate(date: Date): number;
/**
* applies the reverted changes to the gantt once again
*/
redo(): void;
/**
* refreshes data in the Gantt chart
*/
refreshData(): void;
/**
* refreshes the specifies link
* @param id the link id
*/
refreshLink(id: string|number): void;
/**
* refreshes the task and its related links
* @param id the task id
* @param refresh_links optional, optional, defines whether links related to the task should be refreshed, <em>true</em> by default
*/
refreshTask(id: string|number, refresh_links?: boolean): void;
/**
* removes the specified layer related to a link
* @param layerId a DOM element that will be displayed in the layer
*/
removeLinkLayer(layerId: string): void;
/**
* removes a keyboard shortcut
* @param shortcut the key name or the name of keys combination for a shortcut (<a href="desktop/keyboard_navigation.md#shortcutsyntax">shortcut syntax</a>)
* @param scope the element to which the shortcut is attached (<a href="desktop/keyboard_navigation.md#scopes">list of scopes</a>)
*/
removeShortcut(shortcut: string, scope: any): void;
/**
* removes the specified layer related to a task
* @param layerId a DOM element that will be displayed in the layer
*/
removeTaskLayer(layerId: string): void;
/**
* renders the whole Gantt chart
*/
render(): void;
/**
* updates all markers on the page
*/
renderMarkers(): void;
/**
* rebuilds the Gantt layout using the current value of the layout config
*/
resetLayout(): void;
/**
* removes the current lightbox's HTML object element
*/
resetLightbox(): void;
/**
* re-calculates the duration of a project task depending on the dates of its children
* @param task the task's object
*/
resetProjectDates(task: any): void;
/**
* re-calculates the skin's settings from the related attached skin CSS file
*/
resetSkin(): void;
/**
* forces the lightbox to resize
*/
resizeLightbox(): void;
/**
* rounds the specified date to the nearest date in the time scale
* @param date the Date object to round
*/
roundDate(date: Date): Date;
/**
* rounds the start and end task's dates to the nearest dates in the time scale
* @param task the task object
*/
roundTaskDates(task: any): void;
/**
* scrolls the Gantt container to the specified position
* @param x value of horizontal scroll or 'null' (if the scroll position shouldn't be changed)
* @param y value of vertical scroll or 'null' (if the scroll position shouldn't be changed)
*/
scrollTo(x: number|null, y: number|null): void;
/**
* selects the specified task
* @param id the task id
*/
selectTask(id: string|number): string|number;
/**
* serializes the data into JSON or XML format
* @param type optional, the format that the data will be serialized into. <br> Possible values: 'json' (<i>default</i> ), 'xml'.
*/
serialize(type?: string): any;
/**
* returns a list of options
* @param list_name the name of a list
* @param options optional, an array of options
*/
serverList(list_name: string, options?: any[]): any[];
/**
* set the parent for a task
* @param task the task id
* @param pid the parent task id
*/
setParent(task: number|string, pid: number|string): void;
/**
* resizes the Gantt chart
*/
setSizes(): void;
/**
* sets the working time for the Gantt chart
* @param config the configuration object of a time span
*/
setWorkTime(config: any): void;
/**
* shows the lightbox modal overlay that blocks interactions with the remaining screen
* @param box optional, an element to hide
*/
showCover(box?: HTMLElement): void;
/**
* scrolls the chart area to makes the specified date visible
* @param date the date to show in the chart
*/
showDate(date: Date): void;
/**
* opens the lightbox for the specified task
* @param id the task id
*/
showLightbox(id: string|number): void;
/**
* displays the pop-up task form for the specified task
* @param id the task id
*/
showQuickInfo(id: string|number): void;
/**
* makes the specified task visible on the screen
* @param id the task id
*/
showTask(id: string|number): void;
/**
* makes all code inside it not to trigger internal events or server-side calls
* @param callback the callback function
*/
silent(callback: GanttCallback): void;
/**
* sorts tasks in the grid
* @param field the name of the column that the grid will be sorted by or a custom sorting function
* @param desc optional, specifies the sorting direction: <i>true</i> - descending sort and <i>false</i> - ascending<br> sort. By default, <i>false</i>
* @param parent optional, the id of the parent task. Specify the parameter if you want to sort tasks only in the branch of the specified parent.
* @param silent optional, specifies whether rendering should be invoked after reordering items
*/
sort(field: string|GanttCallback, desc?: boolean, parent?: string|number, silent?: boolean): void;
/**
* selects the specified task if it was unselected and vice versa
* @param task the task's id
*/
toggleTaskSelection(task: string|number): void;
/**
* returns a unique id
*/
uid(): number;
/**
* reverts the changes made in the gantt
*/
undo(): void;
/**
* removes selection from the selected task
* @param id optional, optional, the id of the task to remove selection from, see details
*/
unselectTask(id?: string|number): void;
/**
* unsets a working time in the Gantt Chart
* @param config the configuration object of a time span
*/
unsetWorkTime(config: any): void;
/**
* updates the specified collection with new options
* @param collection the name of the collection to update
* @param options the new values of the collection
*/
updateCollection(collection: string, options: any[]): boolean;
/**
* updates the specified dependency link
* @param id the task id
*/
updateLink(id: string): void;
/**
* updates the specified marker
* @param markerId the marker's id
*/
updateMarker(markerId: string): void;
/**
* updates the specified task
* @param id the task id
* @param newState the new values of the task
*/
updateTask(id: string, newState: any): void;
}
declare var gantt: GanttStatic;
declare var Gantt: GanttEnterprise;
export {gantt, Gantt};