1
- // Type definitions for dhtmlxGantt 7.1.0
1
+ // Type definitions for dhtmlxGantt 7.1.1
2
2
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
3
3
4
4
type GanttCallback = ( ...args : any [ ] ) => any ;
5
5
6
6
7
- 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" ;
7
+ export type GanttEventName = "onAfterAutoSchedule" | "onAfterBatchUpdate" | "onAfterBranchLoading" | "onAfterLightbox" | "onAfterLinkAdd" | "onAfterLinkDelete" | "onAfterLinkUpdate" | "onAfterQuickInfo" | "onAfterRedo" | "onAfterRowResize" | "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" | "onBeforeRowResize" | "onBeforeRowResizeEnd" | "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" | "onRowResize" | "onScaleAdjusted" | "onScaleClick" | "onTaskClick" | "onTaskClosed" | "onTaskCreated" | "onTaskDblClick" | "onTaskDrag" | "onTaskIdChange" | "onTaskLoading" | "onTaskMultiSelect" | "onTaskOpened" | "onTaskRowClick" | "onTaskSelected" | "onTaskUnselected" | "onTemplatesReady" ;
8
8
9
9
10
10
export interface GanttTemplates {
@@ -99,35 +99,39 @@ export interface GanttTemplates {
99
99
* @param end_date end date of the scale cell
100
100
* @param resource the resource object
101
101
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
102
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
102
103
*/
103
- histogram_cell_allocated ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : void ;
104
+ histogram_cell_allocated ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : void ;
104
105
105
106
/**
106
107
* specifies the height of the line that defines the available capacity of the resource
107
108
* @param start_date start date of the scale cell
108
109
* @param end_date end date of the scale cell
109
110
* @param resource the resource object
110
111
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
112
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
111
113
*/
112
- histogram_cell_capacity ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : void ;
114
+ histogram_cell_capacity ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : void ;
113
115
114
116
/**
115
117
* defines the CSS class which is applied to a cell of the resource panel
116
118
* @param start_date start date of the scale cell
117
119
* @param end_date end date of the scale cell
118
120
* @param resource the resource object
119
121
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
122
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
120
123
*/
121
- histogram_cell_class ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : void ;
124
+ histogram_cell_class ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : void ;
122
125
123
126
/**
124
127
* defines the label inside a cell
125
128
* @param start_date start date of the scale cell
126
129
* @param end_date end date of the scale cell
127
130
* @param resource the resource object
128
131
* @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
132
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
129
133
*/
130
- histogram_cell_label ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : void ;
134
+ histogram_cell_label ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : void ;
131
135
132
136
/**
133
137
* specifies the CSS class that will be applied to a link
@@ -193,17 +197,19 @@ export interface GanttTemplates {
193
197
* @param end_date end date of the scale cell
194
198
* @param resource the resource object
195
199
* @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
200
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
196
201
*/
197
- resource_cell_class ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : string ;
202
+ resource_cell_class ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : string ;
198
203
199
204
/**
200
205
* defines the HTML content of resource timeline cells
201
206
* @param start_date start date of the scale cell
202
207
* @param end_date end date of the scale cell
203
208
* @param resource the resource object
204
209
* @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
210
+ * @param assignments resource assignments that are assigned to the specified start/end dates of the task
205
211
*/
206
- resource_cell_value ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] ) : string ;
212
+ resource_cell_value ( start_date : Date , end_date : Date , resource : any , tasks : any [ ] , assignments : any [ ] ) : string ;
207
213
208
214
/**
209
215
* specifies the CSS class that will be applied to cells of the time scale of the timeline area
@@ -329,6 +335,8 @@ export interface GanttTemplates {
329
335
* @param task the task's object
330
336
*/
331
337
lightbox_header ( start_date : Date , end_date : Date , task : any ) : string ;
338
+
339
+ [ customTemplate : string ] : any ;
332
340
}
333
341
334
342
export interface GanttConfigOptions {
@@ -393,6 +401,11 @@ export interface GanttConfigOptions {
393
401
*/
394
402
autosize_min_width : number ;
395
403
404
+ /**
405
+ * sets the height of task bars in the timeline area
406
+ */
407
+ bar_height : number | string ;
408
+
396
409
/**
397
410
* enables dynamic loading in the Gantt chart
398
411
*/
@@ -438,6 +451,11 @@ export interface GanttConfigOptions {
438
451
*/
439
452
constraint_types : any ;
440
453
454
+ /**
455
+ * specifies the delay (in milliseconds) before redrawing the gantt when resizing the container
456
+ */
457
+ container_resize_timeout : number ;
458
+
441
459
/**
442
460
* enables adjusting the task's start and end dates to the work time (while dragging)
443
461
*/
@@ -463,6 +481,11 @@ export interface GanttConfigOptions {
463
481
*/
464
482
date_scale : string ;
465
483
484
+ /**
485
+ * defines whether gantt will perform a deep copy of data objects passed into the gantt.parse() method
486
+ */
487
+ deepcopy_on_parse : boolean ;
488
+
466
489
/**
467
490
* 'says' to open the lightbox while creating new events by clicking the '+' button
468
491
*/
@@ -548,6 +571,11 @@ export interface GanttConfigOptions {
548
571
*/
549
572
end_date : Date ;
550
573
574
+ /**
575
+ * renders an external component into the DOM
576
+ */
577
+ external_render : any ;
578
+
551
579
/**
552
580
* 'says' the Gantt chart to automatically extend the time scale in order to fit all displayed tasks
553
581
*/
@@ -683,6 +711,11 @@ export interface GanttConfigOptions {
683
711
*/
684
712
min_grid_column_width : number ;
685
713
714
+ /**
715
+ * sets the minimal row height that can be set for a task during resizing
716
+ */
717
+ min_task_grid_row_height : number ;
718
+
686
719
/**
687
720
* enables/disables multi-task selection in the Gantt chart
688
721
*/
@@ -728,6 +761,11 @@ export interface GanttConfigOptions {
728
761
*/
729
762
prevent_default_scroll : boolean ;
730
763
764
+ /**
765
+ * enables/disables parsing of the resource assignments
766
+ */
767
+ process_resource_assignments : boolean ;
768
+
731
769
/**
732
770
* specifies the end date of a project
733
771
*/
@@ -768,6 +806,16 @@ export interface GanttConfigOptions {
768
806
*/
769
807
reorder_grid_columns : boolean ;
770
808
809
+ /**
810
+ * enables the ability to adjust the row height by drag-and-drop
811
+ */
812
+ resize_rows : boolean ;
813
+
814
+ /**
815
+ * specifies the name of the dataStore which stores resource assignments
816
+ */
817
+ resource_assignment_store : string ;
818
+
771
819
/**
772
820
* changes the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to
773
821
*/
@@ -968,6 +1016,11 @@ export interface GanttConfigOptions {
968
1016
*/
969
1017
task_date : string ;
970
1018
1019
+ /**
1020
+ *
1021
+ */
1022
+ task_grid_row_resizer_attribute : any ;
1023
+
971
1024
/**
972
1025
* sets the height of task bars in the timeline area
973
1026
*/
@@ -1063,6 +1116,11 @@ export interface GanttConfigOptions {
1063
1116
*/
1064
1117
wai_aria_attributes : boolean ;
1065
1118
1119
+ /**
1120
+ * specifies the speed of scrolling the gantt by the mouse wheel
1121
+ */
1122
+ wheel_scroll_sensitivity : any ;
1123
+
1066
1124
/**
1067
1125
* sets both the section and its label on the same line
1068
1126
*/
@@ -1077,6 +1135,8 @@ export interface GanttConfigOptions {
1077
1135
* defines date formats that are used to parse data from a data set and to send data to a server
1078
1136
*/
1079
1137
xml_date : string ;
1138
+
1139
+ [ customConfig : string ] : any ;
1080
1140
}
1081
1141
1082
1142
export interface GanttDateHelpers {
@@ -1094,6 +1154,7 @@ export interface GanttDateHelpers {
1094
1154
str_to_date ( format : string ) : any ;
1095
1155
convert_to_utc ( origin : Date ) : Date ;
1096
1156
to_fixed ( value : number ) : string ;
1157
+ [ customMethod : string ] : any ;
1097
1158
}
1098
1159
1099
1160
export interface GanttHotkeys {
@@ -1168,6 +1229,8 @@ export interface GanttLocaleLabels {
1168
1229
/* resource control */
1169
1230
resources_filter_placeholder : string ;
1170
1231
resources_filter_label : string ;
1232
+
1233
+ [ customLabel : string ] : any ;
1171
1234
}
1172
1235
1173
1236
export interface GanttLocale {
@@ -1241,6 +1304,11 @@ export interface GanttStatic {
1241
1304
*/
1242
1305
constants : any ;
1243
1306
1307
+ /**
1308
+ * a set of datastore methods
1309
+ */
1310
+ datastore : any ;
1311
+
1244
1312
/**
1245
1313
* a set of date formatting methods
1246
1314
*/
@@ -1301,6 +1369,11 @@ export interface GanttStatic {
1301
1369
*/
1302
1370
templates : GanttTemplates ;
1303
1371
1372
+ /**
1373
+ * a set of treeDatastore methods
1374
+ */
1375
+ treeDatastore : any ;
1376
+
1304
1377
/**
1305
1378
* various helper modules
1306
1379
*/
@@ -1716,8 +1789,9 @@ export interface GanttStatic {
1716
1789
/**
1717
1790
* returns the index of the column by its name
1718
1791
* @param name the name of the column
1792
+ * @param excludeHidden optional, skips indexes of the hidden columns
1719
1793
*/
1720
- getColumnIndex ( name : string ) : number ;
1794
+ getColumnIndex ( name : string , excludeHidden ?: boolean ) : number ;
1721
1795
1722
1796
/**
1723
1797
* returns all tasks and links that a task is connected with
@@ -1937,6 +2011,18 @@ export interface GanttStatic {
1937
2011
*/
1938
2012
getTask ( id : string | number ) : any ;
1939
2013
2014
+ /**
2015
+ * returns the parsed resource assignments of a specific task from the datastore
2016
+ * @param taskId the task id
2017
+ */
2018
+ getTaskAssignments ( taskId : string | number ) : any [ ] ;
2019
+
2020
+ /**
2021
+ * returns the height (in pixels) of the DOM element of the task
2022
+ * @param taskId the task's id
2023
+ */
2024
+ getTaskBarHeight ( taskId : number | string ) : number ;
2025
+
1940
2026
/**
1941
2027
* finds a task by the specified criteria
1942
2028
* @param propertyName the name of the property to match, or a filter function
@@ -2240,10 +2326,10 @@ export interface GanttStatic {
2240
2326
2241
2327
/**
2242
2328
* loads data from a client-side resource
2243
- * @param url a string or object which represents data
2329
+ * @param data a string or object which represents data
2244
2330
* @param type optional, optional, (<i>'json', 'xml'</i>) the data type. The default value - <i>'json'</i>
2245
2331
*/
2246
- parse ( url : any , type ?: string ) : void ;
2332
+ parse ( data : any , type ?: string ) : void ;
2247
2333
2248
2334
/**
2249
2335
* activates specified extensions
@@ -2489,6 +2575,12 @@ export interface GanttStatic {
2489
2575
* @param newState the new values of the task
2490
2576
*/
2491
2577
updateTask ( id : string , newState : any ) : void ;
2578
+
2579
+ /**
2580
+ * updates the resource property of the task object with the values of the resource assignments from the datastore
2581
+ * @param taskId the task id
2582
+ */
2583
+ updateTaskAssignments ( taskId : number | string ) : void ;
2492
2584
}
2493
2585
2494
2586
declare var gantt : GanttStatic ;
0 commit comments