@progress/kendo-angular-gantt 0.2.1-dev.202112101349 → 0.3.0-dev.202201190830

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -2
  2. package/dist/cdn/main.js +4 -4
  3. package/dist/es/common/touch-enabled.js +9 -0
  4. package/dist/es/dependencies/utils.js +40 -5
  5. package/dist/es/dragging/dependency-drag-create.directive.js +347 -0
  6. package/dist/es/dragging/drag-validation-tooltip.component.js +27 -0
  7. package/dist/es/editing/add-task.component.js +94 -0
  8. package/dist/es/editing/dependencies-table.component.js +131 -0
  9. package/dist/es/editing/edit-dialog.component.js +39 -8
  10. package/dist/es/editing/edit.service.js +92 -8
  11. package/dist/es/editing/task-fields.component.js +43 -0
  12. package/dist/es/editing/{util.js → utils.js} +0 -0
  13. package/dist/es/gantt.component.js +408 -56
  14. package/dist/es/gantt.module.js +37 -9
  15. package/dist/es/index.js +9 -0
  16. package/dist/es/localization/gantt-localization.service.js +26 -0
  17. package/dist/es/localization/messages.js +45 -1
  18. package/dist/es/main.js +1 -0
  19. package/dist/es/models/dependency-type.enum.js +16 -0
  20. package/dist/es/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
  21. package/dist/es/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
  22. package/dist/es/models/events/{remove-event.interface.js → task-delete-event.interface.js} +0 -0
  23. package/dist/es/models/models.js +1 -0
  24. package/dist/es/models/{toolbar-position.js → toolbar-settings.js} +0 -0
  25. package/dist/{es2015/models/events/add-event.interface.js → es/models/view-item.interface.js} +0 -0
  26. package/dist/{es2015/models/events/edit-event.interface.js → es/navigation/navigation-models.js} +0 -0
  27. package/dist/es/navigation/navigation.service.js +390 -0
  28. package/dist/es/navigation/utils.js +77 -0
  29. package/dist/es/package-metadata.js +1 -1
  30. package/dist/es/rendering/gantt-milestone-task.component.js +12 -6
  31. package/dist/es/rendering/gantt-summary-task.component.js +27 -6
  32. package/dist/es/rendering/gantt-task-base.js +84 -22
  33. package/dist/es/rendering/gantt-task.component.js +13 -8
  34. package/dist/es/rendering/gantt-tasks-table-body.component.js +13 -5
  35. package/dist/es/scrolling/drag-scroll-settings.js +20 -0
  36. package/dist/es/scrolling/timeline-scroll.directive.js +89 -0
  37. package/dist/es/scrolling/timeline-scroll.service.js +39 -0
  38. package/dist/es/scrolling/utils.js +80 -0
  39. package/dist/es/timeline/gantt-timeline.component.js +50 -4
  40. package/dist/es/toolbar/toolbar.component.js +20 -13
  41. package/dist/es/toolbar/view-selector.component.js +1 -1
  42. package/dist/es/utils.js +153 -12
  43. package/dist/es2015/common/touch-enabled.d.ts +9 -0
  44. package/dist/es2015/common/touch-enabled.js +9 -0
  45. package/dist/es2015/dependencies/utils.d.ts +15 -0
  46. package/dist/es2015/dependencies/utils.js +40 -5
  47. package/dist/es2015/dragging/dependency-drag-create.directive.d.ts +72 -0
  48. package/dist/es2015/dragging/dependency-drag-create.directive.js +324 -0
  49. package/dist/es2015/dragging/drag-validation-tooltip.component.d.ts +29 -0
  50. package/dist/es2015/dragging/drag-validation-tooltip.component.js +76 -0
  51. package/dist/es2015/editing/add-task.component.d.ts +45 -0
  52. package/dist/es2015/editing/add-task.component.js +102 -0
  53. package/dist/es2015/editing/dependencies-table.component.d.ts +39 -0
  54. package/dist/es2015/editing/dependencies-table.component.js +160 -0
  55. package/dist/es2015/editing/edit-dialog.component.d.ts +11 -4
  56. package/dist/es2015/editing/edit-dialog.component.js +66 -36
  57. package/dist/es2015/editing/edit.service.d.ts +24 -4
  58. package/dist/es2015/editing/edit.service.js +81 -11
  59. package/dist/es2015/editing/task-fields.component.d.ts +22 -0
  60. package/dist/es2015/editing/task-fields.component.js +67 -0
  61. package/dist/es2015/editing/{util.d.ts → utils.d.ts} +2 -2
  62. package/dist/es2015/editing/{util.js → utils.js} +0 -0
  63. package/dist/es2015/gantt.component.d.ts +134 -31
  64. package/dist/es2015/gantt.component.js +419 -61
  65. package/dist/es2015/gantt.module.js +37 -9
  66. package/dist/es2015/index.d.ts +9 -0
  67. package/dist/es2015/index.js +9 -0
  68. package/dist/es2015/index.metadata.json +1 -1
  69. package/dist/es2015/{models/events/edit-event.interface.d.ts → localization/gantt-localization.service.d.ts} +6 -10
  70. package/dist/es2015/localization/gantt-localization.service.js +25 -0
  71. package/dist/es2015/localization/messages.d.ts +46 -2
  72. package/dist/es2015/localization/messages.js +45 -1
  73. package/dist/es2015/main.d.ts +1 -0
  74. package/dist/es2015/main.js +1 -0
  75. package/dist/es2015/models/dependency-type.enum.d.ts +1 -1
  76. package/dist/es2015/models/dependency-type.enum.js +16 -0
  77. package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
  78. package/dist/es2015/models/events/{remove-event.interface.js → dependency-add-event.interface.js} +0 -0
  79. package/dist/es2015/models/events/task-add-event.interface.d.ts +31 -0
  80. package/dist/es2015/models/{toolbar-position.js → events/task-add-event.interface.js} +0 -0
  81. package/dist/es2015/models/events/task-click-event.interface.d.ts +3 -3
  82. package/dist/es2015/models/events/task-delete-event.interface.d.ts +21 -0
  83. package/dist/es2015/models/events/task-delete-event.interface.js +4 -0
  84. package/dist/es2015/models/events/task-edit-event.interface.d.ts +36 -6
  85. package/dist/es2015/models/models.d.ts +6 -3
  86. package/dist/es2015/models/models.js +1 -0
  87. package/dist/es2015/models/toolbar-settings.d.ts +29 -0
  88. package/dist/es2015/models/toolbar-settings.js +4 -0
  89. package/dist/es2015/models/view-item.interface.d.ts +35 -0
  90. package/dist/es2015/models/view-item.interface.js +4 -0
  91. package/dist/es2015/navigation/navigation-models.d.ts +34 -0
  92. package/dist/es2015/navigation/navigation-models.js +4 -0
  93. package/dist/es2015/navigation/navigation.service.d.ts +126 -0
  94. package/dist/es2015/navigation/navigation.service.js +355 -0
  95. package/dist/es2015/navigation/utils.d.ts +26 -0
  96. package/dist/es2015/navigation/utils.js +69 -0
  97. package/dist/es2015/package-metadata.js +1 -1
  98. package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +3 -1
  99. package/dist/es2015/rendering/gantt-milestone-task.component.js +35 -8
  100. package/dist/es2015/rendering/gantt-summary-task.component.d.ts +5 -1
  101. package/dist/es2015/rendering/gantt-summary-task.component.js +47 -8
  102. package/dist/es2015/rendering/gantt-task-base.d.ts +20 -6
  103. package/dist/es2015/rendering/gantt-task-base.js +75 -22
  104. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -2
  105. package/dist/es2015/rendering/gantt-task.component.js +47 -13
  106. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +6 -3
  107. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +27 -9
  108. package/dist/es2015/scrolling/drag-scroll-settings.d.ts +47 -0
  109. package/dist/es2015/scrolling/drag-scroll-settings.js +20 -0
  110. package/dist/es2015/scrolling/scroll-sync.service.d.ts +1 -1
  111. package/dist/es2015/scrolling/timeline-scroll.directive.d.ts +24 -0
  112. package/dist/es2015/scrolling/timeline-scroll.directive.js +78 -0
  113. package/dist/es2015/scrolling/timeline-scroll.service.d.ts +20 -0
  114. package/dist/es2015/scrolling/timeline-scroll.service.js +44 -0
  115. package/dist/es2015/scrolling/utils.d.ts +29 -0
  116. package/dist/es2015/scrolling/utils.js +80 -0
  117. package/dist/es2015/timeline/gantt-timeline.component.d.ts +29 -4
  118. package/dist/es2015/timeline/gantt-timeline.component.js +67 -5
  119. package/dist/es2015/toolbar/toolbar-template.directive.d.ts +1 -1
  120. package/dist/es2015/toolbar/toolbar.component.d.ts +6 -5
  121. package/dist/es2015/toolbar/toolbar.component.js +22 -13
  122. package/dist/es2015/toolbar/view-selector.component.js +3 -1
  123. package/dist/es2015/utils.d.ts +77 -8
  124. package/dist/es2015/utils.js +153 -12
  125. package/dist/fesm2015/index.js +5258 -3012
  126. package/dist/fesm5/index.js +2862 -733
  127. package/dist/npm/common/touch-enabled.js +11 -0
  128. package/dist/npm/dependencies/utils.js +40 -5
  129. package/dist/npm/dragging/dependency-drag-create.directive.js +349 -0
  130. package/dist/npm/dragging/drag-validation-tooltip.component.js +29 -0
  131. package/dist/npm/editing/add-task.component.js +96 -0
  132. package/dist/npm/editing/dependencies-table.component.js +133 -0
  133. package/dist/npm/editing/edit-dialog.component.js +38 -7
  134. package/dist/npm/editing/edit.service.js +91 -7
  135. package/dist/npm/editing/task-fields.component.js +45 -0
  136. package/dist/npm/editing/{util.js → utils.js} +0 -0
  137. package/dist/npm/gantt.component.js +409 -57
  138. package/dist/npm/gantt.module.js +35 -7
  139. package/dist/npm/index.js +18 -0
  140. package/dist/npm/localization/gantt-localization.service.js +28 -0
  141. package/dist/npm/localization/messages.js +45 -1
  142. package/dist/npm/main.js +2 -0
  143. package/dist/npm/models/dependency-type.enum.js +16 -0
  144. package/dist/npm/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
  145. package/dist/npm/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
  146. package/dist/npm/models/events/{remove-event.interface.js → task-delete-event.interface.js} +0 -0
  147. package/dist/npm/models/models.js +2 -0
  148. package/dist/npm/models/{toolbar-position.js → toolbar-settings.js} +0 -0
  149. package/dist/npm/models/view-item.interface.js +6 -0
  150. package/dist/npm/navigation/navigation-models.js +6 -0
  151. package/dist/npm/navigation/navigation.service.js +392 -0
  152. package/dist/npm/navigation/utils.js +79 -0
  153. package/dist/npm/package-metadata.js +1 -1
  154. package/dist/npm/rendering/gantt-milestone-task.component.js +11 -5
  155. package/dist/npm/rendering/gantt-summary-task.component.js +26 -5
  156. package/dist/npm/rendering/gantt-task-base.js +84 -22
  157. package/dist/npm/rendering/gantt-task.component.js +12 -7
  158. package/dist/npm/rendering/gantt-tasks-table-body.component.js +13 -5
  159. package/dist/npm/scrolling/drag-scroll-settings.js +22 -0
  160. package/dist/npm/scrolling/timeline-scroll.directive.js +91 -0
  161. package/dist/npm/scrolling/timeline-scroll.service.js +41 -0
  162. package/dist/npm/scrolling/utils.js +83 -0
  163. package/dist/npm/timeline/gantt-timeline.component.js +49 -3
  164. package/dist/npm/toolbar/toolbar.component.js +18 -11
  165. package/dist/npm/toolbar/view-selector.component.js +1 -1
  166. package/dist/npm/utils.js +153 -12
  167. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  168. package/package.json +7 -4
  169. package/dist/es2015/models/events/add-event.interface.d.ts +0 -16
  170. package/dist/es2015/models/events/remove-event.interface.d.ts +0 -16
  171. package/dist/es2015/models/toolbar-position.d.ts +0 -9
@@ -11,8 +11,11 @@ import { Subscription } from 'rxjs';
11
11
  import { validatePackage } from '@progress/kendo-licensing';
12
12
  import { packageMetadata } from './package-metadata';
13
13
  import { anyChanged, hasObservers } from '@progress/kendo-angular-common';
14
+ import { GanttTimelineComponent } from './timeline/gantt-timeline.component';
14
15
  import { GanttColumnBase } from './columns/columns';
15
16
  import { fetchChildren, hasChildren, isSelected, rowClassCallback, taskClassCallback } from './common/default-callbacks';
17
+ import { DependencyType } from './models/models';
18
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
16
19
  import { TimelineViewService } from './timeline/timeline-view.service';
17
20
  import { TimelineDayViewService } from './timeline/timeline-day-view.service';
18
21
  import { TimelineWeekViewService } from './timeline/timeline-week-view.service';
@@ -22,17 +25,25 @@ import { DependencyDomService } from './dependencies/dependency-dom.service';
22
25
  import { MappingService } from './common/mapping.service';
23
26
  import { OptionChangesService } from './common/option-changes.service';
24
27
  import { EditService } from './editing/edit.service';
25
- import { LocalizationService } from '@progress/kendo-angular-l10n';
26
- import { getClosestTaskIndex, isClearButton, isColumnGroup, isPresent, isTask, normalizeGanttData, scrollbarWidth } from './utils';
28
+ import { TimelineScrollService } from './scrolling/timeline-scroll.service';
29
+ import { GanttLocalizationService } from './localization/gantt-localization.service';
30
+ import { NavigationService } from './navigation/navigation.service';
31
+ import { areParentChild, getClosestTaskIndex, isClearButton, isColumnGroup, isPresent, isTask, normalizeGanttData, scrollbarWidth } from './utils';
27
32
  import { DEFAULT_TIMELINE_PANE_SETTINGS, DEFAULT_TREELIST_PANE_SETTINGS } from './models/splitter-pane-options.interface';
28
33
  import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
29
34
  import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
30
35
  import { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
31
36
  import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
32
37
  import { ViewBase } from './timeline/view-base';
33
- import { getEditItem } from './editing/util';
38
+ import { getEditItem } from './editing/utils';
34
39
  const TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
35
40
  const DEFAULT_VIEW = 'week';
41
+ const DEFAULT_DRAG_SCROLL_SETTINGS = {
42
+ enabled: true,
43
+ step: 3,
44
+ interval: 1,
45
+ threshold: 10
46
+ };
36
47
  /**
37
48
  * Represents the Kendo UI Gantt component for Angular.
38
49
  *
@@ -105,7 +116,7 @@ const DEFAULT_VIEW = 'week';
105
116
  * ```
106
117
  */
107
118
  let GanttComponent = GanttComponent_1 = class GanttComponent {
108
- constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
119
+ constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone, navigationService) {
109
120
  this.timelineViewService = timelineViewService;
110
121
  this.scrollSyncService = scrollSyncService;
111
122
  this.renderer = renderer;
@@ -116,13 +127,33 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
116
127
  this.localizationService = localizationService;
117
128
  this.hostElement = hostElement;
118
129
  this.zone = zone;
130
+ this.navigationService = navigationService;
131
+ /**
132
+ * @hidden
133
+ */
134
+ this.roleDescription = 'Gantt Chart';
135
+ /**
136
+ * @hidden
137
+ */
138
+ this.role = 'application';
119
139
  this.hostClasses = true;
120
140
  /**
121
- * Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
141
+ * Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
122
142
  *
123
143
  * > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
124
144
  */
125
145
  this.isSelected = isSelected;
146
+ /**
147
+ * Specifies a callback that determines if a new dependency is valid.
148
+ * Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
149
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
150
+ *
151
+ * By defalut, dependencies are deemed invalid when:
152
+ * - The two tasks are in a parent-child relationship.
153
+ * - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
154
+ * - The start or end times of the two tasks are incompatible with the attempted dependency type.
155
+ */
156
+ this.validateNewDependency = this.defaultValidateNewDependencyCallback.bind(this);
126
157
  /**
127
158
  * Fires when the Gantt selection is changed through user interaction.
128
159
  *
@@ -138,25 +169,6 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
138
169
  * > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
139
170
  */
140
171
  this.selectable = false;
141
- /**
142
- * The position of the toolbar.
143
- *
144
- * The possible values are:
145
- * - `top`—Positions the toolbar above the Gantt panes.
146
- * - `bottom`—Positions the toolbar below the Gantt panes.
147
- * - `both`—Displays two toolbar instances. Positions the first one above,
148
- * and the second one - below the Gantt panes.
149
- * - `none`—No toolbar is rendered.
150
- */
151
- this.toolbarPosition = 'top';
152
- /**
153
- * Gets or sets the callback function that retrieves the child items for a particular item.
154
- */
155
- this.fetchChildren = fetchChildren;
156
- /**
157
- * Gets or sets the callback function that indicates if a particular item has child items.
158
- */
159
- this.hasChildren = hasChildren;
160
172
  /**
161
173
  * Defines the dependencies that will be drawn between the rendered tasks.
162
174
  *
@@ -195,6 +207,12 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
195
207
  * The end of the work week (index based).
196
208
  */
197
209
  this.workWeekEnd = 5;
210
+ /**
211
+ * If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
212
+ * By default, navigation is disabled for the TreeList and Timeline parts of the component,
213
+ * ([see example]({% slug keyboard_navigation_gantt %})).
214
+ */
215
+ this.navigable = false;
198
216
  /**
199
217
  * Indicates whether the Gantt columns will be resized during initialization so that they fit their headers and row content.
200
218
  * Columns with autoSize set to false are excluded.
@@ -238,7 +256,8 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
238
256
  */
239
257
  this.cellClose = new EventEmitter();
240
258
  /**
241
- * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
259
+ * Fires when the end user clicks the `Delete` button in the task editing dialog,
260
+ * the task delete icon, or presses the `Delete` key on the keyboard when a task in the timeline is focused.
242
261
  * Use the event handler to open a confirmation dialog when necessary.
243
262
  */
244
263
  this.taskDelete = new EventEmitter();
@@ -258,6 +277,15 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
258
277
  * Fires when the user saves an edited task.
259
278
  */
260
279
  this.save = new EventEmitter();
280
+ /**
281
+ * Fires when the user adds a task.
282
+ */
283
+ this.taskAdd = new EventEmitter();
284
+ /**
285
+ * Fires when the user adds a dependency via dragging
286
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
287
+ */
288
+ this.dependencyAdd = new EventEmitter();
261
289
  /**
262
290
  * Fires when the sorting of the Gantt is changed.
263
291
  * You have to handle the event yourself and sort the data.
@@ -314,6 +342,15 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
314
342
  * Fires when a task is clicked.
315
343
  */
316
344
  this.taskClick = new EventEmitter();
345
+ /**
346
+ * @hidden
347
+ *
348
+ * Specifies whether the dependency drag clues will be rendered.
349
+ * Set internally by the dependency-drag-create directive.
350
+ *
351
+ * @default false
352
+ */
353
+ this.renderDependencyDragClues = false;
317
354
  /**
318
355
  * @hidden
319
356
  *
@@ -330,11 +367,19 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
330
367
  this.showConfirmationDialog = false;
331
368
  this._columns = new QueryList();
332
369
  this._data = [];
370
+ this._dragScrollSettings = Object.assign({}, DEFAULT_DRAG_SCROLL_SETTINGS);
333
371
  this._timelinePaneOptions = Object.assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
334
372
  this._treeListPaneOptions = Object.assign({}, DEFAULT_TREELIST_PANE_SETTINGS);
335
373
  this._rowClass = rowClassCallback;
336
374
  this._taskClass = taskClassCallback;
337
375
  this._activeView = DEFAULT_VIEW;
376
+ this._toolbarSettings = {
377
+ position: 'top',
378
+ addTaskTool: 'none',
379
+ viewSelectorTool: 'top'
380
+ };
381
+ this._fetchChildren = fetchChildren;
382
+ this._hasChildren = hasChildren;
338
383
  this.rtl = false;
339
384
  this.optionChangesSubscriptions = new Subscription();
340
385
  this.editServiceSubscription = new Subscription();
@@ -345,16 +390,33 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
345
390
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
346
391
  this.treeList.columns.notifyOnChanges();
347
392
  }));
393
+ this.editService.getSelectedItem = this.getFirstSelectedItem.bind(this);
348
394
  this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(show => this.showEditingDialog = show));
349
- this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(() => this.taskDelete.emit()));
395
+ this.editServiceSubscription.add(this.editService.taskDelete.subscribe(task => {
396
+ if (hasObservers(this.taskDelete)) {
397
+ this.zone.run(() => this.notifyTaskDelete(task));
398
+ }
399
+ }));
350
400
  this.editServiceSubscription.add(this.editService.editEvent.subscribe(args => {
351
401
  this[args.editResultType].emit({
352
- formGroup: args.formGroup,
402
+ taskFormGroup: args.taskFormGroup,
353
403
  item: getEditItem(args.dataItem, this.treeList.view.data, this.mapper),
404
+ dependencies: args.dependencies,
354
405
  sender: this
355
406
  });
356
407
  this.showConfirmationDialog = this.showEditingDialog = false;
357
- this.editService.dataItem = this.editService.formGroup = null;
408
+ this.editService.dataItem = this.editService.taskFormGroup = null;
409
+ this.updateView();
410
+ if (this.navigable) {
411
+ this.focus();
412
+ }
413
+ }));
414
+ this.editServiceSubscription.add(this.editService.addEvent.subscribe(args => {
415
+ const selectedItem = this.getFirstSelectedItem();
416
+ this.taskAdd.emit({
417
+ actionType: args.actionType,
418
+ selectedItem: selectedItem ? getEditItem(selectedItem, this.treeList.view.data, this.mapper) : null
419
+ });
358
420
  this.updateView();
359
421
  }));
360
422
  this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
@@ -371,6 +433,12 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
371
433
  set toolbarTemplate(customToolbarTemplate) {
372
434
  this._customToolbarTemplate = customToolbarTemplate;
373
435
  }
436
+ get hostRoleDescriptionAttr() {
437
+ return this.roleDescription;
438
+ }
439
+ get hostRoleAttr() {
440
+ return this.role;
441
+ }
374
442
  get dir() {
375
443
  return this.direction;
376
444
  }
@@ -430,6 +498,49 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
430
498
  get data() {
431
499
  return this._data;
432
500
  }
501
+ /**
502
+ * The toolbar configuration. Defines the position and content of the toolbar(s).
503
+ * The available properties are `position`, `addTaskTool`, and `viewSelectorTool`.
504
+ * All are optional and default to `top`.
505
+ *
506
+ * The possible values for each option are:
507
+ * - `top`—Positions the toolbar above the Gantt panes. Renders the respective tool in the top toolbar.
508
+ * - `bottom`—Positions the toolbar below the Gantt panes. Renders the respective tool in the bottom toolbar.
509
+ * - `both`—Displays two toolbar instances. Positions the first one above,
510
+ * and the second one - below the Gantt panes. Renders the respective tool in the both toolbars.
511
+ * - `none`—No toolbar is rendered when used for setting `position`.
512
+ * No add task or view selector tool is rendered when used for setting `addTaskTool` or `viewSelectorTool`.
513
+ */
514
+ set toolbarSettings(value) {
515
+ this._toolbarSettings = {
516
+ position: value.position || 'top',
517
+ addTaskTool: value.addTaskTool || 'none',
518
+ viewSelectorTool: value.viewSelectorTool || 'top'
519
+ };
520
+ }
521
+ get toolbarSettings() {
522
+ return this._toolbarSettings;
523
+ }
524
+ /**
525
+ * Gets or sets the callback function that retrieves the child items for a particular item.
526
+ */
527
+ set fetchChildren(fn) {
528
+ this._fetchChildren = fn;
529
+ this.editService.fetchChildren = fn;
530
+ }
531
+ get fetchChildren() {
532
+ return this._fetchChildren;
533
+ }
534
+ /**
535
+ * Gets or sets the callback function that indicates if a particular item has child items.
536
+ */
537
+ set hasChildren(fn) {
538
+ this._hasChildren = fn;
539
+ this.editService.hasChildren = fn;
540
+ }
541
+ get hasChildren() {
542
+ return this._hasChildren;
543
+ }
433
544
  /**
434
545
  * The options of the timeline splitter pane. By default the pane is `collapsible`,
435
546
  * `resizable`, not `collapsed`, and its `size` is `'50%'`.
@@ -485,6 +596,17 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
485
596
  get taskIdField() {
486
597
  return this.mapper.taskFields.id;
487
598
  }
599
+ /**
600
+ * Specifies the settings for auto-scrolling during dragging
601
+ * when the pointer moves outside of the container bounderies
602
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-auto-scrolling).
603
+ */
604
+ set dragScrollSettings(settings) {
605
+ this._dragScrollSettings = Object.assign({}, DEFAULT_DRAG_SCROLL_SETTINGS, settings);
606
+ }
607
+ get dragScrollSettings() {
608
+ return this._dragScrollSettings;
609
+ }
488
610
  /**
489
611
  * @hidden
490
612
  */
@@ -494,6 +616,15 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
494
616
  }
495
617
  return this.treeList.view.data.map(item => item.data);
496
618
  }
619
+ /**
620
+ * @hidden
621
+ */
622
+ get viewItems() {
623
+ if (!isPresent(this.treeList)) {
624
+ return [];
625
+ }
626
+ return this.treeList.view.data;
627
+ }
497
628
  /**
498
629
  * @hidden
499
630
  */
@@ -540,8 +671,8 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
540
671
  /**
541
672
  * @hidden
542
673
  */
543
- get editDialogFormGroup() {
544
- return this.editService.formGroup;
674
+ get isInEditMode() {
675
+ return this.showEditingDialog || this.showConfirmationDialog || this.treeList.isEditing();
545
676
  }
546
677
  ngOnChanges(changes) {
547
678
  if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
@@ -550,6 +681,14 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
550
681
  }
551
682
  ngAfterViewInit() {
552
683
  this.updateTreeListMargin();
684
+ if (this.navigable) {
685
+ this.navigationService.initialize({
686
+ gantt: this,
687
+ host: this.hostElement.nativeElement,
688
+ treeListElement: this.treeList.wrapper.nativeElement,
689
+ timelineElement: this.timeline.timelineContent.nativeElement
690
+ });
691
+ }
553
692
  const leftContainer = this.treeList.wrapper.nativeElement.querySelector('kendo-treelist-list > div');
554
693
  this.scrollSyncService.registerElement(leftContainer, 'treelist');
555
694
  }
@@ -567,6 +706,34 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
567
706
  this.localizationSubscription.unsubscribe();
568
707
  }
569
708
  }
709
+ /**
710
+ * Focuses the last active cell or task in the Gantt.
711
+ * If no item has previously been focused, the first cell of the TreeList part will receive focus,
712
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
713
+ */
714
+ focus() {
715
+ if (this.navigable) {
716
+ this.navigationService.focusLastActiveItem();
717
+ }
718
+ }
719
+ /**
720
+ * Focuses the targeted cell in the TreeList part of the component,
721
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
722
+ */
723
+ focusCell(rowIndex, colIndex) {
724
+ if (this.navigable) {
725
+ this.navigationService.focusCell(rowIndex, colIndex);
726
+ }
727
+ }
728
+ /**
729
+ * Focuses the targeted task in the Timeline part of the component,
730
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
731
+ */
732
+ focusTask(taskIndex) {
733
+ if (this.navigable) {
734
+ this.navigationService.focusTask(taskIndex);
735
+ }
736
+ }
570
737
  /**
571
738
  * Applies the minimum possible width for the specified column,
572
739
  * so that the whole text fits without wrapping. This method expects the Gantt
@@ -631,7 +798,10 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
631
798
  */
632
799
  editTask(dataItem, formGroup) {
633
800
  if (!this.showEditingDialog) {
634
- this.editService.createEditDialog(dataItem, formGroup);
801
+ const taskId = this.mapper.extractFromTask(dataItem, 'id');
802
+ const dependencies = this.dependencies.filter(item => this.mapper.extractFromDependency(item, 'toId') === taskId
803
+ || this.mapper.extractFromDependency(item, 'fromId') === taskId);
804
+ this.editService.createEditDialog(dataItem, formGroup, dependencies);
635
805
  }
636
806
  }
637
807
  /**
@@ -648,6 +818,15 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
648
818
  openConfirmationDialog() {
649
819
  this.showConfirmationDialog = true;
650
820
  }
821
+ /**
822
+ * @hidden
823
+ */
824
+ handleConfirmationDialogClose() {
825
+ this.showConfirmationDialog = false;
826
+ if (this.navigable) {
827
+ this.focus();
828
+ }
829
+ }
651
830
  /**
652
831
  * Opens a cell for editing.
653
832
  */
@@ -704,7 +883,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
704
883
  * @hidden
705
884
  */
706
885
  showToolbar(position) {
707
- return this.toolbarPosition !== 'none' && ([position, 'both'].indexOf(this.toolbarPosition) > -1);
886
+ return this.toolbarSettings.position !== 'none' && ([position, 'both'].indexOf(this.toolbarSettings.position) > -1);
708
887
  }
709
888
  /**
710
889
  * @hidden
@@ -732,7 +911,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
732
911
  if (hasObservers(this.taskClick)) {
733
912
  const taskIndex = getClosestTaskIndex(target, gantt);
734
913
  const task = this.renderedTreeListItems[taskIndex];
735
- this.zone.run(() => this.emitTaskClick(event, task, taskIndex));
914
+ this.zone.run(() => this.notifyTaskClick(event, task, taskIndex));
736
915
  }
737
916
  }
738
917
  /**
@@ -750,8 +929,8 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
750
929
  if ((hasObservers(this.selectionChange) && !this.isSameSelection(selectionAction, task)) ||
751
930
  hasObservers(this.taskClick)) {
752
931
  this.zone.run(() => {
753
- this.emitSelectionChange(task, selectionAction);
754
- this.emitTaskClick(event, task, taskIndex);
932
+ this.notifySelectionChange(task, selectionAction);
933
+ this.notifyTaskClick(event, task, taskIndex);
755
934
  });
756
935
  }
757
936
  }
@@ -788,7 +967,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
788
967
  }
789
968
  const task = event.items.map(item => item.dataItem)[0]; // single selection only currently available
790
969
  const action = event.action;
791
- this.emitSelectionChange(task, action);
970
+ this.notifySelectionChange(task, action);
792
971
  }
793
972
  /**
794
973
  * @hidden
@@ -839,7 +1018,7 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
839
1018
  dataItem: task,
840
1019
  originalEvent: event,
841
1020
  sender: this,
842
- rowIndex: taskIndex,
1021
+ index: taskIndex,
843
1022
  type: 'dblclick'
844
1023
  }));
845
1024
  }
@@ -850,16 +1029,35 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
850
1029
  getText(token) {
851
1030
  return this.localizationService.get(token);
852
1031
  }
853
- emitTaskClick(event, dataItem, itemIndex) {
1032
+ /**
1033
+ * @hidden
1034
+ */
1035
+ changeActiveView(view) {
1036
+ if (view !== this.activeView) {
1037
+ this.activeView = view;
1038
+ this.loadTimelineData();
1039
+ this.scrollSyncService.resetTimelineScrollLeft();
1040
+ this.activeViewChange.emit(view);
1041
+ }
1042
+ }
1043
+ /**
1044
+ * @hidden
1045
+ */
1046
+ notifyTaskClick(event, dataItem, itemIndex) {
1047
+ // simulates the TreeList `cellClick` event triggered by enter press (type: 'click')
1048
+ const type = event instanceof KeyboardEvent ? 'click' : event.type;
854
1049
  this.taskClick.emit({
855
1050
  originalEvent: event,
856
1051
  dataItem: dataItem,
857
- rowIndex: itemIndex,
858
- type: event.type,
1052
+ index: itemIndex,
1053
+ type: type,
859
1054
  sender: this
860
1055
  });
861
1056
  }
862
- emitSelectionChange(dataItem, action) {
1057
+ /**
1058
+ * @hidden
1059
+ */
1060
+ notifySelectionChange(dataItem, action) {
863
1061
  if (this.isSameSelection(action, dataItem)) {
864
1062
  return;
865
1063
  }
@@ -870,6 +1068,29 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
870
1068
  });
871
1069
  this.treeList.updateView();
872
1070
  }
1071
+ /**
1072
+ * @hidden
1073
+ */
1074
+ notifyTaskDelete(task) {
1075
+ this.editService.dataItem = task;
1076
+ this.taskDelete.emit({
1077
+ item: getEditItem(task, this.treeList.view.data, this.mapper),
1078
+ sender: this
1079
+ });
1080
+ }
1081
+ /**
1082
+ * @hidden
1083
+ */
1084
+ isSameSelection(action, dataItem) {
1085
+ return action === 'select' && this.isSelected(dataItem);
1086
+ }
1087
+ /**
1088
+ * @hidden
1089
+ */
1090
+ getSelectionAction({ ctrlKey, metaKey }, dataItem) {
1091
+ const shouldToggleSelection = ctrlKey || metaKey;
1092
+ return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
1093
+ }
873
1094
  updateTreeListGroupClass(columns = this.columns) {
874
1095
  if (!isPresent(this.treeList)) {
875
1096
  return;
@@ -896,18 +1117,65 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
896
1117
  }
897
1118
  return this.views.find(view => view.type === this.activeView);
898
1119
  }
899
- isSameSelection(action, dataItem) {
900
- return action === 'select' && this.isSelected(dataItem);
901
- }
902
- getSelectionAction({ ctrlKey, metaKey }, dataItem) {
903
- const shouldToggleSelection = ctrlKey || metaKey;
904
- return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
1120
+ getFirstSelectedItem() {
1121
+ const isSelectedCallback = this.isSelected || isSelected;
1122
+ const loadedItems = this.renderedTreeListItems || [];
1123
+ return loadedItems.find(isSelectedCallback);
1124
+ }
1125
+ defaultValidateNewDependencyCallback(dependency) {
1126
+ const fromTaskId = this.mapper.extractFromDependency(dependency, 'fromId');
1127
+ const toTaskId = this.mapper.extractFromDependency(dependency, 'toId');
1128
+ const fromTask = this.treeList.view.data.find(task => this.mapper.extractFromTask(task.data, 'id') === fromTaskId);
1129
+ const toTask = this.treeList.view.data.find(task => this.mapper.extractFromTask(task.data, 'id') === toTaskId);
1130
+ // mark as invalid if the attempted dependency is lacking valid from- and to-tasks
1131
+ // or when the from- and to-tasks are actually the same task
1132
+ if (!isPresent(fromTask) || !isPresent(fromTask.data) ||
1133
+ !isPresent(toTask) || !isPresent(toTask.data) ||
1134
+ fromTask.data === toTask.data) {
1135
+ return false;
1136
+ }
1137
+ const tasksDependentOnOneAnother = this.dependencies.some(current => {
1138
+ const currentFromId = this.mapper.extractFromDependency(current, 'fromId');
1139
+ const currentToId = this.mapper.extractFromDependency(current, 'toId');
1140
+ return (fromTaskId === currentFromId && toTaskId === currentToId) ||
1141
+ (toTaskId === currentFromId && fromTaskId === currentToId);
1142
+ });
1143
+ // mark as invalid if the attempted dependency is trying to connect already dependent tasks
1144
+ // mark as invalid if the two tasks are in parent-child relationship
1145
+ if (tasksDependentOnOneAnother || areParentChild(fromTask, toTask)) {
1146
+ return false;
1147
+ }
1148
+ const fromTaskStart = this.mapper.extractFromTask(fromTask.data, 'start');
1149
+ const fromTaskEnd = this.mapper.extractFromTask(fromTask.data, 'end');
1150
+ const toTaskStart = this.mapper.extractFromTask(toTask.data, 'start');
1151
+ const toTaskEnd = this.mapper.extractFromTask(toTask.data, 'end');
1152
+ // if the two tasks are available to be connected via a dependency,
1153
+ // check if their start and end time allow for the attempted dependency type
1154
+ switch (this.mapper.extractFromDependency(dependency, 'type')) {
1155
+ // finish to finish (FF) — the from-task ends before the to-task can end
1156
+ case DependencyType.FF:
1157
+ return fromTaskEnd <= toTaskEnd;
1158
+ // finish to start (FS) — the from-task ends before the to-task can begin
1159
+ case DependencyType.FS:
1160
+ return fromTaskEnd <= toTaskStart;
1161
+ // start to finish (SF) — the from-task begins before the to-task can end
1162
+ case DependencyType.SF:
1163
+ return fromTaskStart <= toTaskEnd;
1164
+ // start to start (SS) — the from-task begins before the to-task can begin
1165
+ case DependencyType.SS:
1166
+ return fromTaskStart <= toTaskStart;
1167
+ default: return false;
1168
+ }
905
1169
  }
906
1170
  };
907
1171
  tslib_1.__decorate([
908
1172
  ViewChild(TreeListComponent, { static: true }),
909
1173
  tslib_1.__metadata("design:type", TreeListComponent)
910
1174
  ], GanttComponent.prototype, "treeList", void 0);
1175
+ tslib_1.__decorate([
1176
+ ViewChild(GanttTimelineComponent, { static: false }),
1177
+ tslib_1.__metadata("design:type", GanttTimelineComponent)
1178
+ ], GanttComponent.prototype, "timeline", void 0);
911
1179
  tslib_1.__decorate([
912
1180
  ContentChild(GanttTaskContentTemplateDirective, { static: true }),
913
1181
  tslib_1.__metadata("design:type", GanttTaskContentTemplateDirective)
@@ -924,6 +1192,24 @@ tslib_1.__decorate([
924
1192
  ContentChildren(ToolbarTemplateDirective),
925
1193
  tslib_1.__metadata("design:type", QueryList)
926
1194
  ], GanttComponent.prototype, "toolbarTemplateChildren", void 0);
1195
+ tslib_1.__decorate([
1196
+ Input('aria-roledescription'),
1197
+ tslib_1.__metadata("design:type", String)
1198
+ ], GanttComponent.prototype, "roleDescription", void 0);
1199
+ tslib_1.__decorate([
1200
+ HostBinding('attr.aria-roledescription'),
1201
+ tslib_1.__metadata("design:type", String),
1202
+ tslib_1.__metadata("design:paramtypes", [])
1203
+ ], GanttComponent.prototype, "hostRoleDescriptionAttr", null);
1204
+ tslib_1.__decorate([
1205
+ Input('role'),
1206
+ tslib_1.__metadata("design:type", String)
1207
+ ], GanttComponent.prototype, "role", void 0);
1208
+ tslib_1.__decorate([
1209
+ HostBinding('attr.role'),
1210
+ tslib_1.__metadata("design:type", String),
1211
+ tslib_1.__metadata("design:paramtypes", [])
1212
+ ], GanttComponent.prototype, "hostRoleAttr", null);
927
1213
  tslib_1.__decorate([
928
1214
  HostBinding('class.k-gantt'),
929
1215
  tslib_1.__metadata("design:type", Boolean)
@@ -966,6 +1252,10 @@ tslib_1.__decorate([
966
1252
  Input(),
967
1253
  tslib_1.__metadata("design:type", Function)
968
1254
  ], GanttComponent.prototype, "isSelected", void 0);
1255
+ tslib_1.__decorate([
1256
+ Input(),
1257
+ tslib_1.__metadata("design:type", Function)
1258
+ ], GanttComponent.prototype, "validateNewDependency", void 0);
969
1259
  tslib_1.__decorate([
970
1260
  Output(),
971
1261
  tslib_1.__metadata("design:type", EventEmitter)
@@ -976,16 +1266,19 @@ tslib_1.__decorate([
976
1266
  ], GanttComponent.prototype, "selectable", void 0);
977
1267
  tslib_1.__decorate([
978
1268
  Input(),
979
- tslib_1.__metadata("design:type", String)
980
- ], GanttComponent.prototype, "toolbarPosition", void 0);
1269
+ tslib_1.__metadata("design:type", Object),
1270
+ tslib_1.__metadata("design:paramtypes", [Object])
1271
+ ], GanttComponent.prototype, "toolbarSettings", null);
981
1272
  tslib_1.__decorate([
982
1273
  Input(),
983
- tslib_1.__metadata("design:type", Function)
984
- ], GanttComponent.prototype, "fetchChildren", void 0);
1274
+ tslib_1.__metadata("design:type", Function),
1275
+ tslib_1.__metadata("design:paramtypes", [Function])
1276
+ ], GanttComponent.prototype, "fetchChildren", null);
985
1277
  tslib_1.__decorate([
986
1278
  Input(),
987
- tslib_1.__metadata("design:type", Function)
988
- ], GanttComponent.prototype, "hasChildren", void 0);
1279
+ tslib_1.__metadata("design:type", Function),
1280
+ tslib_1.__metadata("design:paramtypes", [Function])
1281
+ ], GanttComponent.prototype, "hasChildren", null);
989
1282
  tslib_1.__decorate([
990
1283
  Input(),
991
1284
  tslib_1.__metadata("design:type", Array)
@@ -1022,6 +1315,10 @@ tslib_1.__decorate([
1022
1315
  Input(),
1023
1316
  tslib_1.__metadata("design:type", Number)
1024
1317
  ], GanttComponent.prototype, "workWeekEnd", void 0);
1318
+ tslib_1.__decorate([
1319
+ Input(),
1320
+ tslib_1.__metadata("design:type", Boolean)
1321
+ ], GanttComponent.prototype, "navigable", void 0);
1025
1322
  tslib_1.__decorate([
1026
1323
  Input(),
1027
1324
  tslib_1.__metadata("design:type", Object),
@@ -1062,6 +1359,11 @@ tslib_1.__decorate([
1062
1359
  Input(),
1063
1360
  tslib_1.__metadata("design:type", Boolean)
1064
1361
  ], GanttComponent.prototype, "columnsResizable", void 0);
1362
+ tslib_1.__decorate([
1363
+ Input(),
1364
+ tslib_1.__metadata("design:type", Object),
1365
+ tslib_1.__metadata("design:paramtypes", [Object])
1366
+ ], GanttComponent.prototype, "dragScrollSettings", null);
1065
1367
  tslib_1.__decorate([
1066
1368
  Output(),
1067
1369
  tslib_1.__metadata("design:type", EventEmitter)
@@ -1098,6 +1400,14 @@ tslib_1.__decorate([
1098
1400
  Output(),
1099
1401
  tslib_1.__metadata("design:type", EventEmitter)
1100
1402
  ], GanttComponent.prototype, "save", void 0);
1403
+ tslib_1.__decorate([
1404
+ Output(),
1405
+ tslib_1.__metadata("design:type", EventEmitter)
1406
+ ], GanttComponent.prototype, "taskAdd", void 0);
1407
+ tslib_1.__decorate([
1408
+ Output(),
1409
+ tslib_1.__metadata("design:type", EventEmitter)
1410
+ ], GanttComponent.prototype, "dependencyAdd", void 0);
1101
1411
  tslib_1.__decorate([
1102
1412
  Output(),
1103
1413
  tslib_1.__metadata("design:type", EventEmitter)
@@ -1155,6 +1465,7 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1155
1465
  selector: 'kendo-gantt',
1156
1466
  exportAs: 'kendoGantt',
1157
1467
  providers: [
1468
+ GanttLocalizationService,
1158
1469
  LocalizationService,
1159
1470
  {
1160
1471
  provide: DataBoundTreeComponent,
@@ -1172,10 +1483,33 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1172
1483
  DependencyDomService,
1173
1484
  MappingService,
1174
1485
  OptionChangesService,
1175
- EditService
1486
+ EditService,
1487
+ TimelineScrollService,
1488
+ NavigationService
1176
1489
  ],
1177
1490
  template: `
1178
1491
  <ng-container kendoGanttLocalizedMessages
1492
+ i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
1493
+ taskEditingGeneralTabTitle="General"
1494
+
1495
+ i18n-taskEditingPredecessorsTabTitle="kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip"
1496
+ taskEditingPredecessorsTabTitle="Predecessors"
1497
+
1498
+ i18n-taskEditingSuccessorsTabTitle="kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip"
1499
+ taskEditingSuccessorsTabTitle="Successors"
1500
+
1501
+ i18n-taskEditingDependenciesAddButtonText="kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip"
1502
+ taskEditingDependenciesAddButtonText="Add"
1503
+
1504
+ i18n-taskEditingDependenciesRemoveButtonText="kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip"
1505
+ taskEditingDependenciesRemoveButtonText="Remove"
1506
+
1507
+ i18n-taskEditingDependenciesGridNameColumnTitle="kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip"
1508
+ taskEditingDependenciesGridNameColumnTitle="Task Title"
1509
+
1510
+ i18n-taskEditingDependenciesGridTypeColumnTitle="kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip"
1511
+ taskEditingDependenciesGridTypeColumnTitle="Type"
1512
+
1179
1513
  i18n-taskDeleteLabel="kendo.gantt.taskDeleteLabel|The label of the task delete icon"
1180
1514
  taskDeleteLabel="Delete"
1181
1515
 
@@ -1227,6 +1561,18 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1227
1561
  i18n-yearViewText-disabled="kendo.gantt.yearViewText|The text of the year view in the ViewSelector component"
1228
1562
  yearViewText="Year"
1229
1563
 
1564
+ i18n-addTaskText="kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component"
1565
+ addTaskText="Add Task"
1566
+
1567
+ i18n-addChildText="kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component"
1568
+ addChildText="Add Child"
1569
+
1570
+ i18n-addAboveText="kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component"
1571
+ addAboveText="Add Above"
1572
+
1573
+ i18n-addBelowText="kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component"
1574
+ addBelowText="Add Below"
1575
+
1230
1576
  i18n-noRecords="kendo.gantt.noRecords|The label visible in the TreeList when there are no records"
1231
1577
  noRecords="No records available."
1232
1578
 
@@ -1348,6 +1694,8 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1348
1694
  columnsReset="Reset"></ng-container>
1349
1695
  <kendo-gantt-toolbar
1350
1696
  *ngIf="showToolbar('top')"
1697
+ [showAddTask]="toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'"
1698
+ [showViewSelector]="toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'"
1351
1699
  class="k-gantt-header k-toolbar k-gantt-toolbar"
1352
1700
  position="top"></kendo-gantt-toolbar>
1353
1701
  <div class="k-gantt-content">
@@ -1364,6 +1712,7 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1364
1712
  [data]="data"
1365
1713
  [hasChildren]="hasChildren"
1366
1714
  [fetchChildren]="fetchChildren"
1715
+ [navigable]="navigable"
1367
1716
  [isExpanded]="isExpanded"
1368
1717
  [autoSize]="columnsAutoSize"
1369
1718
  [columnMenu]="columnMenu"
@@ -1452,7 +1801,9 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1452
1801
  [scrollable]="false">
1453
1802
  <kendo-gantt-timeline
1454
1803
  *ngIf="views && views.length"
1455
- [rows]="renderedTreeListItems"
1804
+ [renderDependencyDragClues]="renderDependencyDragClues"
1805
+ [dragScrollSettings]="dragScrollSettings"
1806
+ [rows]="viewItems"
1456
1807
  [slots]="timelineSlots"
1457
1808
  [groupSlots]="timelineGroupSlots"
1458
1809
  [tableWidth]="tableWidth"
@@ -1462,7 +1813,8 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1462
1813
  [summaryTaskTemplate]="summaryTaskTemplate?.templateRef"
1463
1814
  [taskClass]="taskClass"
1464
1815
  [dependencies]="dependencies"
1465
- [hasChildren]="hasChildren"
1816
+ [isExpanded]="isExpanded"
1817
+ [selectable]="selectable"
1466
1818
  [isTaskSelected]="isTaskSelected"
1467
1819
  [kendoEventsOutsideAngular]="{
1468
1820
  click: handleTimelineClick,
@@ -1477,20 +1829,25 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1477
1829
  </div>
1478
1830
  <kendo-gantt-toolbar
1479
1831
  *ngIf="showToolbar('bottom')"
1832
+ [showAddTask]="toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'"
1833
+ [showViewSelector]="toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'"
1480
1834
  class="k-gantt-footer k-toolbar k-gantt-toolbar"
1481
1835
  position="bottom"></kendo-gantt-toolbar>
1482
- <kendo-gantt-edit-dialog *ngIf="showEditingDialog" [formGroup]="editDialogFormGroup"></kendo-gantt-edit-dialog>
1836
+ <kendo-gantt-edit-dialog
1837
+ *ngIf="showEditingDialog"
1838
+ [data]="data">
1839
+ </kendo-gantt-edit-dialog>
1483
1840
  <kendo-dialog
1484
1841
  *ngIf="showConfirmationDialog"
1485
1842
  [width]="575"
1486
1843
  [height]="170"
1487
1844
  [title]="getText('confirmationDialogTitle')"
1488
- (close)="showConfirmationDialog = false;">
1489
- <span>{{getText('confirmationDialogContent')}}</span>
1845
+ (close)="handleConfirmationDialogClose()">
1846
+ <span>{{ getText('confirmationDialogContent') }}</span>
1490
1847
  <kendo-dialog-actions layout="normal">
1491
1848
  <kendo-treelist-spacer></kendo-treelist-spacer>
1492
1849
  <button kendoButton [primary]="true" (click)="handleDeleteConfirmation()">{{ getText('deleteButtonText') }}</button>
1493
- <button kendoButton (click)="showConfirmationDialog = false;">{{ getText('cancelButtonText') }}</button>
1850
+ <button kendoButton (click)="handleConfirmationDialogClose()">{{ getText('cancelButtonText') }}</button>
1494
1851
  </kendo-dialog-actions>
1495
1852
  </kendo-dialog>
1496
1853
  `
@@ -1504,6 +1861,7 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
1504
1861
  EditService,
1505
1862
  LocalizationService,
1506
1863
  ElementRef,
1507
- NgZone])
1864
+ NgZone,
1865
+ NavigationService])
1508
1866
  ], GanttComponent);
1509
1867
  export { GanttComponent };