@progress/kendo-angular-gantt 0.3.0-dev.202201111723 → 1.0.0

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 (138) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -2
  2. package/dist/cdn/main.js +1 -29
  3. package/dist/es/common/touch-enabled.js +9 -0
  4. package/dist/es/dependencies/utils.js +34 -0
  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/dependencies-table.component.js +1 -1
  8. package/dist/es/editing/edit-dialog.component.js +3 -3
  9. package/dist/es/editing/edit.service.js +4 -2
  10. package/dist/es/editing/task-fields.component.js +1 -1
  11. package/dist/es/editing/{util.js → utils.js} +0 -0
  12. package/dist/es/gantt.component.js +313 -28
  13. package/dist/es/gantt.module.js +23 -6
  14. package/dist/es/index.js +5 -0
  15. package/dist/es/main.js +1 -0
  16. package/dist/es/models/events/dependency-add-event.interface.js +4 -0
  17. package/dist/es/models/events/task-delete-event.interface.js +4 -0
  18. package/dist/es/models/view-item.interface.js +4 -0
  19. package/dist/es/navigation/navigation-models.js +4 -0
  20. package/dist/es/navigation/navigation.service.js +390 -0
  21. package/dist/es/navigation/utils.js +77 -0
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es/rendering/gantt-milestone-task.component.js +12 -6
  24. package/dist/es/rendering/gantt-summary-task.component.js +27 -6
  25. package/dist/es/rendering/gantt-task-base.js +84 -22
  26. package/dist/es/rendering/gantt-task.component.js +13 -8
  27. package/dist/es/rendering/gantt-tasks-table-body.component.js +13 -5
  28. package/dist/es/scrolling/drag-scroll-settings.js +20 -0
  29. package/dist/es/scrolling/timeline-scroll.directive.js +89 -0
  30. package/dist/es/scrolling/timeline-scroll.service.js +39 -0
  31. package/dist/es/scrolling/utils.js +80 -0
  32. package/dist/es/timeline/gantt-timeline.component.js +50 -4
  33. package/dist/es/toolbar/toolbar.component.js +12 -13
  34. package/dist/es/toolbar/view-selector.component.js +1 -1
  35. package/dist/es/utils.js +153 -12
  36. package/dist/es2015/common/touch-enabled.d.ts +9 -0
  37. package/dist/es2015/common/touch-enabled.js +9 -0
  38. package/dist/es2015/dependencies/utils.d.ts +15 -0
  39. package/dist/es2015/dependencies/utils.js +34 -0
  40. package/dist/es2015/dragging/dependency-drag-create.directive.d.ts +72 -0
  41. package/dist/es2015/dragging/dependency-drag-create.directive.js +324 -0
  42. package/dist/es2015/dragging/drag-validation-tooltip.component.d.ts +29 -0
  43. package/dist/es2015/dragging/drag-validation-tooltip.component.js +76 -0
  44. package/dist/es2015/editing/dependencies-table.component.js +1 -1
  45. package/dist/es2015/editing/edit-dialog.component.d.ts +1 -1
  46. package/dist/es2015/editing/edit-dialog.component.js +12 -4
  47. package/dist/es2015/editing/edit.service.d.ts +2 -3
  48. package/dist/es2015/editing/edit.service.js +4 -2
  49. package/dist/es2015/editing/task-fields.component.js +1 -1
  50. package/dist/es2015/editing/{util.d.ts → utils.d.ts} +2 -2
  51. package/dist/es2015/editing/{util.js → utils.js} +0 -0
  52. package/dist/es2015/gantt.component.d.ts +112 -17
  53. package/dist/es2015/gantt.component.js +292 -30
  54. package/dist/es2015/gantt.module.js +23 -6
  55. package/dist/es2015/index.d.ts +5 -0
  56. package/dist/es2015/index.js +5 -0
  57. package/dist/es2015/index.metadata.json +1 -1
  58. package/dist/es2015/main.d.ts +1 -0
  59. package/dist/es2015/main.js +1 -0
  60. package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
  61. package/dist/es2015/models/events/dependency-add-event.interface.js +4 -0
  62. package/dist/es2015/models/events/task-click-event.interface.d.ts +3 -3
  63. package/dist/es2015/models/events/task-delete-event.interface.d.ts +21 -0
  64. package/dist/es2015/models/events/task-delete-event.interface.js +4 -0
  65. package/dist/es2015/models/events/task-edit-event.interface.d.ts +27 -10
  66. package/dist/es2015/models/models.d.ts +4 -0
  67. package/dist/es2015/models/view-item.interface.d.ts +35 -0
  68. package/dist/es2015/models/view-item.interface.js +4 -0
  69. package/dist/es2015/navigation/navigation-models.d.ts +34 -0
  70. package/dist/es2015/navigation/navigation-models.js +4 -0
  71. package/dist/es2015/navigation/navigation.service.d.ts +126 -0
  72. package/dist/es2015/navigation/navigation.service.js +355 -0
  73. package/dist/es2015/navigation/utils.d.ts +26 -0
  74. package/dist/es2015/navigation/utils.js +69 -0
  75. package/dist/es2015/package-metadata.js +1 -1
  76. package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +3 -1
  77. package/dist/es2015/rendering/gantt-milestone-task.component.js +35 -8
  78. package/dist/es2015/rendering/gantt-summary-task.component.d.ts +5 -1
  79. package/dist/es2015/rendering/gantt-summary-task.component.js +47 -8
  80. package/dist/es2015/rendering/gantt-task-base.d.ts +20 -6
  81. package/dist/es2015/rendering/gantt-task-base.js +75 -22
  82. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -2
  83. package/dist/es2015/rendering/gantt-task.component.js +47 -13
  84. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +6 -3
  85. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +27 -9
  86. package/dist/es2015/scrolling/drag-scroll-settings.d.ts +47 -0
  87. package/dist/es2015/scrolling/drag-scroll-settings.js +20 -0
  88. package/dist/es2015/scrolling/scroll-sync.service.d.ts +1 -1
  89. package/dist/es2015/scrolling/timeline-scroll.directive.d.ts +24 -0
  90. package/dist/es2015/scrolling/timeline-scroll.directive.js +78 -0
  91. package/dist/es2015/scrolling/timeline-scroll.service.d.ts +20 -0
  92. package/dist/es2015/scrolling/timeline-scroll.service.js +44 -0
  93. package/dist/es2015/scrolling/utils.d.ts +29 -0
  94. package/dist/es2015/scrolling/utils.js +80 -0
  95. package/dist/es2015/timeline/gantt-timeline.component.d.ts +29 -4
  96. package/dist/es2015/timeline/gantt-timeline.component.js +67 -5
  97. package/dist/es2015/toolbar/toolbar.component.d.ts +4 -5
  98. package/dist/es2015/toolbar/toolbar.component.js +12 -13
  99. package/dist/es2015/toolbar/view-selector.component.js +3 -1
  100. package/dist/es2015/utils.d.ts +77 -8
  101. package/dist/es2015/utils.js +153 -12
  102. package/dist/fesm2015/index.js +3033 -1367
  103. package/dist/fesm5/index.js +2447 -830
  104. package/dist/npm/common/touch-enabled.js +11 -0
  105. package/dist/npm/dependencies/utils.js +34 -0
  106. package/dist/npm/dragging/dependency-drag-create.directive.js +349 -0
  107. package/dist/npm/dragging/drag-validation-tooltip.component.js +29 -0
  108. package/dist/npm/editing/dependencies-table.component.js +1 -1
  109. package/dist/npm/editing/edit-dialog.component.js +3 -3
  110. package/dist/npm/editing/edit.service.js +4 -2
  111. package/dist/npm/editing/task-fields.component.js +1 -1
  112. package/dist/npm/editing/{util.js → utils.js} +0 -0
  113. package/dist/npm/gantt.component.js +315 -30
  114. package/dist/npm/gantt.module.js +22 -5
  115. package/dist/npm/index.js +10 -0
  116. package/dist/npm/main.js +2 -0
  117. package/dist/npm/models/events/dependency-add-event.interface.js +6 -0
  118. package/dist/npm/models/events/task-delete-event.interface.js +6 -0
  119. package/dist/npm/models/view-item.interface.js +6 -0
  120. package/dist/npm/navigation/navigation-models.js +6 -0
  121. package/dist/npm/navigation/navigation.service.js +392 -0
  122. package/dist/npm/navigation/utils.js +79 -0
  123. package/dist/npm/package-metadata.js +1 -1
  124. package/dist/npm/rendering/gantt-milestone-task.component.js +11 -5
  125. package/dist/npm/rendering/gantt-summary-task.component.js +26 -5
  126. package/dist/npm/rendering/gantt-task-base.js +84 -22
  127. package/dist/npm/rendering/gantt-task.component.js +12 -7
  128. package/dist/npm/rendering/gantt-tasks-table-body.component.js +13 -5
  129. package/dist/npm/scrolling/drag-scroll-settings.js +22 -0
  130. package/dist/npm/scrolling/timeline-scroll.directive.js +91 -0
  131. package/dist/npm/scrolling/timeline-scroll.service.js +41 -0
  132. package/dist/npm/scrolling/utils.js +83 -0
  133. package/dist/npm/timeline/gantt-timeline.component.js +49 -3
  134. package/dist/npm/toolbar/toolbar.component.js +10 -11
  135. package/dist/npm/toolbar/view-selector.component.js +1 -1
  136. package/dist/npm/utils.js +153 -12
  137. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  138. package/package.json +23 -21
@@ -2,40 +2,734 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { __extends, __decorate, __metadata, __param, __assign } from 'tslib';
6
- import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, QueryList, ContentChildren, ContentChild, Component, forwardRef, SkipSelf, Host, Injector, NgZone, isDevMode, ViewChild, HostBinding, Output, Renderer2, ElementRef, ChangeDetectorRef, NgModule } from '@angular/core';
5
+ import { __decorate, __metadata, __assign, __extends, __param } from 'tslib';
6
+ import { Injectable, NgZone, ViewChild, ElementRef, ViewContainerRef, HostBinding, Input, TemplateRef, Output, EventEmitter, Component, Renderer2, Directive, Optional, QueryList, ContentChildren, ContentChild, forwardRef, SkipSelf, Host, Injector, isDevMode, InjectionToken, Inject, ChangeDetectorRef, NgModule } from '@angular/core';
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
8
8
  import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqual, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
9
- import { of, fromEvent, Subject, Subscription, forkJoin, EMPTY, isObservable } from 'rxjs';
9
+ import { fromEvent, Subject, Subscription, of, forkJoin, EMPTY, isObservable } from 'rxjs';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
- import { isDocumentAvailable, closestInScope, matchesClasses, anyChanged, hasObservers, EventsModule } from '@progress/kendo-angular-common';
11
+ import { closestInScope, matchesClasses, isDocumentAvailable, Keys, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
12
+ import { map, distinctUntilChanged, take, filter, switchMap, expand, reduce } from 'rxjs/operators';
13
+ import { getter, touchEnabled } from '@progress/kendo-common';
14
+ import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
15
  import { IntlService } from '@progress/kendo-angular-intl';
13
16
  import { orderBy } from '@progress/kendo-data-query';
14
- import { getter } from '@progress/kendo-common';
15
- import { map, distinctUntilChanged, take, expand, reduce, filter, switchMap } from 'rxjs/operators';
16
- import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
17
17
  import { CommonModule } from '@angular/common';
18
+ import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule } from '@angular/forms';
18
19
  import { SplitterModule, TabStripModule } from '@progress/kendo-angular-layout';
19
20
  import { ButtonsModule } from '@progress/kendo-angular-buttons';
20
21
  import { DialogModule } from '@progress/kendo-angular-dialog';
21
- import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule } from '@angular/forms';
22
22
  import { LabelModule } from '@progress/kendo-angular-label';
23
23
  import { InputsModule } from '@progress/kendo-angular-inputs';
24
24
  import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
25
+ import { PopupService, PopupModule } from '@progress/kendo-angular-popup';
25
26
  import { GridModule } from '@progress/kendo-angular-grid';
26
27
  import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
27
28
 
28
29
  /**
29
30
  * @hidden
30
31
  */
31
- var packageMetadata = {
32
- name: '@progress/kendo-angular-gantt',
33
- productName: 'Kendo UI for Angular',
34
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
35
- publishDate: 1641921322,
36
- version: '',
37
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
38
- };
32
+ var packageMetadata = {
33
+ name: '@progress/kendo-angular-gantt',
34
+ productName: 'Kendo UI for Angular',
35
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
36
+ publishDate: 1642606888,
37
+ version: '',
38
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
39
+ };
40
+
41
+ /**
42
+ * @hidden
43
+ */
44
+ var ScrollSyncService = /** @class */ (function () {
45
+ function ScrollSyncService(ngZone) {
46
+ var _this = this;
47
+ this.ngZone = ngZone;
48
+ this.changes = new Subject();
49
+ this.elements = [];
50
+ this.subscriptions = new Subscription();
51
+ this.subscriptions.add(this.changes.subscribe(function (args) {
52
+ _this.scroll(args);
53
+ }));
54
+ }
55
+ ScrollSyncService.prototype.registerElement = function (el, sourceType) {
56
+ var _this = this;
57
+ this.elements.push({ element: el, sourceType: sourceType });
58
+ if (sourceType === "timeline" || sourceType === "treelist") {
59
+ this.ngZone.runOutsideAngular(function () {
60
+ var obs = fromEvent(el, 'scroll').pipe(map(function (_a) {
61
+ var _b = _a.target, scrollTop = _b.scrollTop, scrollLeft = _b.scrollLeft;
62
+ return ({
63
+ scrollTop: scrollTop,
64
+ scrollLeft: scrollLeft,
65
+ sourceType: sourceType
66
+ });
67
+ }));
68
+ var comparisonFn = sourceType === 'timeline' ?
69
+ function (x, y) { return (x.scrollTop === y.scrollTop) && (x.scrollLeft === y.scrollLeft); } :
70
+ function (x, y) { return (x.scrollTop === y.scrollTop); };
71
+ _this.subscriptions.add(obs.pipe(distinctUntilChanged(comparisonFn))
72
+ .subscribe(function (event) { return _this.changes.next(event); }));
73
+ });
74
+ }
75
+ };
76
+ ScrollSyncService.prototype.ngOnDestroy = function () {
77
+ this.subscriptions.unsubscribe();
78
+ this.elements = null;
79
+ };
80
+ ScrollSyncService.prototype.syncScrollTop = function (sourceType, targetType) {
81
+ var source = this.elements.find(function (element) { return element.sourceType === sourceType; });
82
+ var target = this.elements.find(function (element) { return element.sourceType === targetType; });
83
+ // Need to wait for the splitter pane's content to be rendered
84
+ this.ngZone.onStable.pipe(take(1)).subscribe(function () { return target.element.scrollTop = source.element.scrollTop; });
85
+ };
86
+ ScrollSyncService.prototype.resetTimelineScrollLeft = function () {
87
+ var source = this.elements.find(function (element) { return element.sourceType === 'timeline'; });
88
+ source.element.scrollLeft = 0;
89
+ };
90
+ ScrollSyncService.prototype.scroll = function (_a) {
91
+ var _this = this;
92
+ var scrollTop = _a.scrollTop, scrollLeft = _a.scrollLeft, sourceType = _a.sourceType;
93
+ this.ngZone.runOutsideAngular(function () {
94
+ if (sourceType === 'timeline') {
95
+ var header = _this.elements.find(function (element) { return element.sourceType === 'header'; }).element;
96
+ header.scrollLeft = scrollLeft;
97
+ if (!_this.syncingTimeline) {
98
+ _this.syncingTreeList = true;
99
+ var treelist = _this.elements.find(function (element) { return element.sourceType === 'treelist'; }).element;
100
+ treelist.scrollTop = scrollTop;
101
+ }
102
+ _this.syncingTimeline = false;
103
+ }
104
+ if (sourceType === 'treelist') {
105
+ if (!_this.syncingTreeList) {
106
+ _this.syncingTimeline = true;
107
+ var timeline = _this.elements.find(function (element) { return element.sourceType === 'timeline'; }).element;
108
+ timeline.scrollTop = scrollTop;
109
+ }
110
+ _this.syncingTreeList = false;
111
+ }
112
+ });
113
+ };
114
+ ScrollSyncService = __decorate([
115
+ Injectable(),
116
+ __metadata("design:paramtypes", [NgZone])
117
+ ], ScrollSyncService);
118
+ return ScrollSyncService;
119
+ }());
120
+
121
+ /**
122
+ * @hidden
123
+ */
124
+ var DEFAULT_DEPENDENCY_MODEL_FIELDS = Object.freeze({
125
+ toId: 'toId',
126
+ fromId: 'fromId',
127
+ id: 'id',
128
+ type: 'type'
129
+ });
130
+
131
+ /**
132
+ * @hidden
133
+ */
134
+ var DEFAULT_TASK_MODEL_FIELDS = Object.freeze({
135
+ id: 'id',
136
+ start: 'start',
137
+ end: 'end',
138
+ title: 'title',
139
+ completionRatio: 'completionRatio',
140
+ children: 'children'
141
+ });
142
+
143
+ /**
144
+ * The dependency type when two tasks are connected.
145
+ *
146
+ * The supported values are:
147
+ * * `FF`—from 'finish' to 'finish'
148
+ * * `FS`—from 'finish' to 'start'
149
+ * * `SS`—from 'start' to 'start'
150
+ * * `SF`—from 'start' to 'finish'
151
+ */
152
+ var DependencyType;
153
+ (function (DependencyType) {
154
+ DependencyType[DependencyType["FF"] = 0] = "FF";
155
+ DependencyType[DependencyType["FS"] = 1] = "FS";
156
+ DependencyType[DependencyType["SF"] = 2] = "SF";
157
+ DependencyType[DependencyType["SS"] = 3] = "SS"; // task B can't start before task A starts
158
+ })(DependencyType || (DependencyType = {}));
159
+
160
+ /**
161
+ * @hidden
162
+ */
163
+ var isWorkDay = function (date, start, end) {
164
+ return date.getDay() >= start && date.getDay() <= end;
165
+ };
166
+ /**
167
+ * @hidden
168
+ */
169
+ var isWorkHour = function (date, start, end) {
170
+ return date.getHours() >= start && date.getHours() <= end;
171
+ };
172
+ /**
173
+ * @hidden
174
+ */
175
+ var isPresent = function (item) { return item !== null && item !== undefined; };
176
+ /**
177
+ * @hidden
178
+ *
179
+ * Normalized the data to an array in case a falsy value is passed
180
+ * or a TreeListDataResult object (applicable for the data-binding directives).
181
+ */
182
+ var normalizeGanttData = function (data) {
183
+ if (!isPresent(data)) {
184
+ return [];
185
+ }
186
+ else if (Array.isArray(data.data)) {
187
+ return data.data;
188
+ }
189
+ else {
190
+ return data;
191
+ }
192
+ };
193
+ /**
194
+ * @hidden
195
+ *
196
+ * Returns a new date with the specified hours, minutes, seconds and millliseconds set.
197
+ * Only the hours are required, the rest of the params are set to `0` by default.
198
+ */
199
+ var setTime = function (date, hours, minutes, seconds, milliseconds) {
200
+ if (minutes === void 0) { minutes = 0; }
201
+ if (seconds === void 0) { seconds = 0; }
202
+ if (milliseconds === void 0) { milliseconds = 0; }
203
+ if (!isPresent(date)) {
204
+ return null;
205
+ }
206
+ var result = cloneDate(date);
207
+ result.setHours(hours);
208
+ result.setMinutes(minutes);
209
+ result.setSeconds(seconds);
210
+ result.setMilliseconds(milliseconds);
211
+ return result;
212
+ };
213
+ /**
214
+ * @hidden
215
+ *
216
+ * Returns the last day of a week.
217
+ * @param standingPoint - Any day of the target week.
218
+ * @param firstWeekDay - The week's starting day (e.g. Monday, Tuesday, etc.)
219
+ */
220
+ var lastDayOfWeek = function (standingPoint, firstWeekDay) {
221
+ var followingWeek = addWeeks(standingPoint, 1);
222
+ var firstDayOfFollowingWeek = firstDayInWeek(followingWeek, firstWeekDay);
223
+ var lastDayOfTargetWeek = addDays(firstDayOfFollowingWeek, -1);
224
+ return lastDayOfTargetWeek;
225
+ };
226
+ /**
227
+ * Persists the intially resolved scrollbar width value.
228
+ */
229
+ var SCROLLBAR_WIDTH;
230
+ /**
231
+ * @hidden
232
+ *
233
+ * Gets the default scrollbar width accoring to the current environment.
234
+ */
235
+ var scrollbarWidth = function () {
236
+ if (!isDocumentAvailable()) {
237
+ return;
238
+ }
239
+ // calculate scrollbar width only once, then return the cached value
240
+ if (isNaN(SCROLLBAR_WIDTH)) {
241
+ var div = document.createElement('div');
242
+ div.style.cssText = 'overflow: scroll; overflow-x: hidden; zoom: 1; clear: both; display: block;';
243
+ div.innerHTML = '&nbsp;';
244
+ document.body.appendChild(div);
245
+ SCROLLBAR_WIDTH = div.offsetWidth - div.scrollWidth;
246
+ document.body.removeChild(div);
247
+ }
248
+ return SCROLLBAR_WIDTH;
249
+ };
250
+ /**
251
+ * @hidden
252
+ */
253
+ var isColumnGroup = function (column) { return column.isColumnGroup; };
254
+ /**
255
+ * @hidden
256
+ */
257
+ var isNumber = function (contender) { return typeof contender === 'number' && !isNaN(contender); };
258
+ /**
259
+ * @hidden
260
+ */
261
+ var isString = function (contender) { return typeof contender === 'string'; };
262
+ /**
263
+ * @hidden
264
+ *
265
+ * Gets the closest timeline task wrapper element from an event target.
266
+ * Restricts the search up to the provided parent element from the second param.
267
+ */
268
+ var getClosestTaskWrapper = function (element, parentScope) {
269
+ return closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
270
+ };
271
+ /**
272
+ * @hidden
273
+ *
274
+ * Checks whether the queried item or its parent items has a `k-task-wrap` selector.
275
+ * Restricts the search up to the provided parent element from the second param.
276
+ */
277
+ var isTaskWrapper = function (contender, parentScope) {
278
+ var taskWrapper = closestInScope(contender, matchesClasses('k-task-wrap'), parentScope);
279
+ return isPresent(taskWrapper);
280
+ };
281
+ /**
282
+ * @hidden
283
+ *
284
+ * Gets the closest timeline task element index from an event target.
285
+ * Uses the `data-task-index` attribute assigned to each task.
286
+ * Restricts the search up to the provided parent element from the second param.
287
+ */
288
+ var getClosestTaskIndex = function (element, parentScope) {
289
+ var task = closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
290
+ if (!isPresent(task)) {
291
+ return null;
292
+ }
293
+ return Number(task.getAttribute('data-task-index'));
294
+ };
295
+ /**
296
+ * @hidden
297
+ *
298
+ * Checks whether the queried item or its parent items has a `k-task` selector.
299
+ * Restricts the search up to the provided parent element from the second param.
300
+ */
301
+ var isTask = function (contender, parentScope) {
302
+ var task = closestInScope(contender, matchesClasses('k-task'), parentScope);
303
+ return isPresent(task);
304
+ };
305
+ /**
306
+ * @hidden
307
+ *
308
+ * Checks whether the queried item or its parent items has a `k-toolbar` selector.
309
+ * Restricts the search up to the provided parent element from the second param.
310
+ */
311
+ var isToolbar = function (contender, parentScope) {
312
+ var toolbar = closestInScope(contender, matchesClasses('k-gantt-toolbar'), parentScope);
313
+ return isPresent(toolbar);
314
+ };
315
+ /**
316
+ * @hidden
317
+ *
318
+ * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
319
+ * Restricts the search up to the provided parent element from the second param.
320
+ */
321
+ var isClearButton = function (contender, parentScope) {
322
+ var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), parentScope);
323
+ return isPresent(clearButtonContainer);
324
+ };
325
+ /**
326
+ * @hidden
327
+ *
328
+ * Checks whether the queried item has a `k-task-dot` selector - used for the dependency drag clues.
329
+ */
330
+ var isDependencyDragClue = function (element) {
331
+ if (!isPresent(element)) {
332
+ return false;
333
+ }
334
+ return element.classList.contains('k-task-dot');
335
+ };
336
+ /**
337
+ * @hidden
338
+ *
339
+ * Checks whether the queried item has a `k-task-dot` & `k-task-start` selector - used for the dependency drag start clues.
340
+ */
341
+ var isDependencyDragStartClue = function (element) {
342
+ if (!isPresent(element)) {
343
+ return false;
344
+ }
345
+ return element.classList.contains('k-task-dot') && element.classList.contains('k-task-start');
346
+ };
347
+ /**
348
+ * @hidden
349
+ *
350
+ * Gets the `DependencyType` for an attempted dependency create from the provided two elements.
351
+ * The two linked drag clue HTML elements are used to extract this data (via their CSS classes).
352
+ */
353
+ var getDependencyTypeFromTargetTasks = function (fromTaskClue, toTaskClue) {
354
+ if (!isDependencyDragClue(fromTaskClue) || !isDependencyDragClue(toTaskClue)) {
355
+ return null;
356
+ }
357
+ var fromTaskType = isDependencyDragStartClue(fromTaskClue) ? 'S' : 'F';
358
+ var toTaskType = isDependencyDragStartClue(toTaskClue) ? 'S' : 'F';
359
+ var dependencyTypeName = "" + fromTaskType + toTaskType;
360
+ switch (dependencyTypeName) {
361
+ case 'FF': return DependencyType.FF;
362
+ case 'FS': return DependencyType.FS;
363
+ case 'SF': return DependencyType.SF;
364
+ case 'SS': return DependencyType.SS;
365
+ default: return null;
366
+ }
367
+ };
368
+ /**
369
+ * @hidden
370
+ *
371
+ * Checks whether the two provided drag clues belong to the same task element.
372
+ */
373
+ var sameTaskClues = function (fromTaskClue, toTaskClue, parentScope) {
374
+ if (!isPresent(fromTaskClue) || !isPresent(toTaskClue)) {
375
+ return false;
376
+ }
377
+ var fromTaskWrapper = getClosestTaskWrapper(fromTaskClue, parentScope);
378
+ var toTaskWrapper = getClosestTaskWrapper(toTaskClue, parentScope);
379
+ return fromTaskWrapper === toTaskWrapper;
380
+ };
381
+ /**
382
+ * @hidden
383
+ *
384
+ * Fits a contender number between a min and max range.
385
+ * If the contender is below the min value, the min value is returned.
386
+ * If the contender is above the max value, the max value is returned.
387
+ */
388
+ var fitToRange = function (contender, min, max) {
389
+ if (!isPresent(contender) || contender < min) {
390
+ return min;
391
+ }
392
+ else if (contender > max) {
393
+ return max;
394
+ }
395
+ else {
396
+ return contender;
397
+ }
398
+ };
399
+ /**
400
+ * @hidden
401
+ *
402
+ * Checks whether either of the two provided tasks is a parent of the other.
403
+ */
404
+ var areParentChild = function (taskA, taskB) {
405
+ var parentChildRelationship = false;
406
+ var taskAParent = taskA;
407
+ while (isPresent(taskAParent) && isPresent(taskAParent.data)) {
408
+ if (taskAParent.data === taskB.data) {
409
+ parentChildRelationship = true;
410
+ break;
411
+ }
412
+ taskAParent = taskAParent.parent;
413
+ }
414
+ var taskBParent = taskB;
415
+ while (!parentChildRelationship && isPresent(taskBParent) && isPresent(taskBParent.data)) {
416
+ if (taskBParent.data === taskA.data) {
417
+ parentChildRelationship = true;
418
+ break;
419
+ }
420
+ taskBParent = taskBParent.parent;
421
+ }
422
+ return parentChildRelationship;
423
+ };
424
+ /**
425
+ * @hidden
426
+ *
427
+ * Extracts an element from the provided client coords.
428
+ * Using the `event.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead.
429
+ */
430
+ var elementFromPoint = function (clientX, clientY) {
431
+ if (!isDocumentAvailable()) {
432
+ return null;
433
+ }
434
+ return document.elementFromPoint(clientX, clientY);
435
+ };
436
+
437
+ /**
438
+ * @hidden
439
+ */
440
+ var MappingService = /** @class */ (function () {
441
+ function MappingService() {
442
+ this._taskFields = __assign({}, DEFAULT_TASK_MODEL_FIELDS);
443
+ this._dependencyFields = __assign({}, DEFAULT_DEPENDENCY_MODEL_FIELDS);
444
+ }
445
+ Object.defineProperty(MappingService.prototype, "taskFields", {
446
+ get: function () {
447
+ return this._taskFields;
448
+ },
449
+ /**
450
+ * Gets or sets the model fields for the task data items.
451
+ * Uses the default values for fields which are not specified.
452
+ */
453
+ set: function (fields) {
454
+ this._taskFields = __assign({}, DEFAULT_TASK_MODEL_FIELDS, fields);
455
+ },
456
+ enumerable: true,
457
+ configurable: true
458
+ });
459
+ Object.defineProperty(MappingService.prototype, "dependencyFields", {
460
+ get: function () {
461
+ return this._dependencyFields;
462
+ },
463
+ /**
464
+ * Gets or sets the model fields for the depenency data items.
465
+ * Uses the default values for fields which are not specified.
466
+ */
467
+ set: function (fields) {
468
+ this._dependencyFields = __assign({}, DEFAULT_DEPENDENCY_MODEL_FIELDS, fields);
469
+ },
470
+ enumerable: true,
471
+ configurable: true
472
+ });
473
+ /**
474
+ * Retrieves the value for the specified task field.
475
+ * Supports nested fields as well (e.g. 'manager.id').
476
+ */
477
+ MappingService.prototype.extractFromTask = function (dataItem, field) {
478
+ if (!isPresent(this.taskFields)) {
479
+ return null;
480
+ }
481
+ return getter(this.taskFields[field])(dataItem);
482
+ };
483
+ /**
484
+ * Retrieves the value for the specified dependency field.
485
+ * Supports nested fields as well (e.g. 'manager.id').
486
+ */
487
+ MappingService.prototype.extractFromDependency = function (dataItem, field) {
488
+ if (!isPresent(this.dependencyFields)) {
489
+ return null;
490
+ }
491
+ return getter(this.dependencyFields[field])(dataItem);
492
+ };
493
+ MappingService = __decorate([
494
+ Injectable()
495
+ ], MappingService);
496
+ return MappingService;
497
+ }());
498
+
499
+ /**
500
+ * @hidden
501
+ */
502
+ var DependencyDomService = /** @class */ (function () {
503
+ function DependencyDomService(mapper) {
504
+ this.mapper = mapper;
505
+ this.notifier = new Subject();
506
+ /**
507
+ * Maps each rendered task to its HTML element.
508
+ * Uses the task ID field value as key.
509
+ */
510
+ this.tasks = new Map();
511
+ }
512
+ Object.defineProperty(DependencyDomService.prototype, "taskChanges", {
513
+ /**
514
+ * Emits each time some of the tasks or the view have changed.
515
+ * Fires also on the first change of the table rows and the parent container.
516
+ */
517
+ get: function () {
518
+ return this.notifier.asObservable();
519
+ },
520
+ enumerable: true,
521
+ configurable: true
522
+ });
523
+ Object.defineProperty(DependencyDomService.prototype, "dependencyDomArgs", {
524
+ get: function () {
525
+ return {
526
+ tasks: this.tasks,
527
+ contentContainer: this.contentContainer,
528
+ timelineRow: this.timelineRow
529
+ };
530
+ },
531
+ enumerable: true,
532
+ configurable: true
533
+ });
534
+ DependencyDomService.prototype.ngOnDestroy = function () {
535
+ this.tasks.clear();
536
+ this.tasks = null;
537
+ this.contentContainer = null;
538
+ };
539
+ DependencyDomService.prototype.registerTimelineRow = function (timelineRow) {
540
+ this.timelineRow = timelineRow;
541
+ this.notifyChanges();
542
+ };
543
+ DependencyDomService.prototype.registerContentContainer = function (contentContainer) {
544
+ this.contentContainer = contentContainer;
545
+ this.notifyChanges();
546
+ };
547
+ DependencyDomService.prototype.registerTask = function (task, element) {
548
+ var id = this.mapper.extractFromTask(task, 'id');
549
+ this.tasks.set(id, element);
550
+ this.notifyChanges();
551
+ };
552
+ DependencyDomService.prototype.unregisterTask = function (task) {
553
+ var id = this.mapper.extractFromTask(task, 'id');
554
+ this.tasks.delete(id);
555
+ this.notifyChanges();
556
+ };
557
+ /**
558
+ * Notifies all dependency directives that a change in one of the elements has occured.
559
+ */
560
+ DependencyDomService.prototype.notifyChanges = function () {
561
+ this.notifier.next(this.dependencyDomArgs);
562
+ };
563
+ DependencyDomService = __decorate([
564
+ Injectable(),
565
+ __metadata("design:paramtypes", [MappingService])
566
+ ], DependencyDomService);
567
+ return DependencyDomService;
568
+ }());
569
+
570
+ /**
571
+ * @hidden
572
+ */
573
+ var GanttTimelineComponent = /** @class */ (function () {
574
+ function GanttTimelineComponent(scrollSyncService, dependencyDomService, renderer, zone) {
575
+ var _this = this;
576
+ this.scrollSyncService = scrollSyncService;
577
+ this.dependencyDomService = dependencyDomService;
578
+ this.renderer = renderer;
579
+ this.zone = zone;
580
+ this.hostClass = true;
581
+ this.dependencies = [];
582
+ // as all drag-and-drop operations are on the timeline container, use a single draggable instance
583
+ this.timelineContainerPress = new EventEmitter();
584
+ this.timelineContainerDrag = new EventEmitter();
585
+ this.timelineContainerRelease = new EventEmitter();
586
+ this.subscriptions = new Subscription();
587
+ this.subscriptions.add(
588
+ // task changes indicates change in row content, number, height, etc.
589
+ this.dependencyDomService.taskChanges
590
+ .pipe(filter(function (args) { return isPresent(args.timelineRow); }), switchMap(function (args) { return _this.zone.onStable.pipe(take(1), map(function () { return args; })); }) // ensure the content is rendered
591
+ )
592
+ .subscribe(function (_a) {
593
+ var timelineRow = _a.timelineRow;
594
+ var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
595
+ _this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
596
+ }));
597
+ }
598
+ Object.defineProperty(GanttTimelineComponent.prototype, "draggableEnabled", {
599
+ /**
600
+ * Specifies whether the draggable will attach or detach its pointer event listeners.
601
+ */
602
+ get: function () {
603
+ return this.renderDependencyDragClues;
604
+ },
605
+ enumerable: true,
606
+ configurable: true
607
+ });
608
+ GanttTimelineComponent.prototype.ngAfterViewInit = function () {
609
+ var timelineHeader = this.timelineHeaderWrap.nativeElement;
610
+ var rightContainer = this.timelineContent.nativeElement;
611
+ this.scrollSyncService.registerElement(rightContainer, 'timeline');
612
+ this.scrollSyncService.registerElement(timelineHeader, 'header');
613
+ this.dependencyDomService.registerContentContainer(this.tasksContainer.nativeElement);
614
+ };
615
+ GanttTimelineComponent.prototype.ngOnDestroy = function () {
616
+ this.subscriptions.unsubscribe();
617
+ };
618
+ GanttTimelineComponent.prototype.isNonWorking = function (item) {
619
+ return item.hasOwnProperty('isWorking') && !item.isWorking;
620
+ };
621
+ __decorate([
622
+ ViewChild('timelineContent', { static: true }),
623
+ __metadata("design:type", ElementRef)
624
+ ], GanttTimelineComponent.prototype, "timelineContent", void 0);
625
+ __decorate([
626
+ ViewChild('timelineColumns', { static: true }),
627
+ __metadata("design:type", ElementRef)
628
+ ], GanttTimelineComponent.prototype, "timelineColumns", void 0);
629
+ __decorate([
630
+ ViewChild('timelineHeaderWrap', { static: true }),
631
+ __metadata("design:type", ElementRef)
632
+ ], GanttTimelineComponent.prototype, "timelineHeaderWrap", void 0);
633
+ __decorate([
634
+ ViewChild('tasksContainer', { static: true }),
635
+ __metadata("design:type", ElementRef)
636
+ ], GanttTimelineComponent.prototype, "tasksContainer", void 0);
637
+ __decorate([
638
+ ViewChild('dragPopupContainer', { static: false, read: ViewContainerRef }),
639
+ __metadata("design:type", ViewContainerRef)
640
+ ], GanttTimelineComponent.prototype, "dragPopupContainer", void 0);
641
+ __decorate([
642
+ ViewChild('dependencyDragCreatePolyline', { static: false }),
643
+ __metadata("design:type", ElementRef)
644
+ ], GanttTimelineComponent.prototype, "dependencyDragCreatePolyline", void 0);
645
+ __decorate([
646
+ HostBinding('class.k-gantt-timeline'),
647
+ __metadata("design:type", Boolean)
648
+ ], GanttTimelineComponent.prototype, "hostClass", void 0);
649
+ __decorate([
650
+ Input(),
651
+ __metadata("design:type", Array)
652
+ ], GanttTimelineComponent.prototype, "rows", void 0);
653
+ __decorate([
654
+ Input(),
655
+ __metadata("design:type", Array)
656
+ ], GanttTimelineComponent.prototype, "slots", void 0);
657
+ __decorate([
658
+ Input(),
659
+ __metadata("design:type", Array)
660
+ ], GanttTimelineComponent.prototype, "groupSlots", void 0);
661
+ __decorate([
662
+ Input(),
663
+ __metadata("design:type", Number)
664
+ ], GanttTimelineComponent.prototype, "tableWidth", void 0);
665
+ __decorate([
666
+ Input(),
667
+ __metadata("design:type", String)
668
+ ], GanttTimelineComponent.prototype, "activeView", void 0);
669
+ __decorate([
670
+ Input(),
671
+ __metadata("design:type", TemplateRef)
672
+ ], GanttTimelineComponent.prototype, "taskContentTemplate", void 0);
673
+ __decorate([
674
+ Input(),
675
+ __metadata("design:type", TemplateRef)
676
+ ], GanttTimelineComponent.prototype, "taskTemplate", void 0);
677
+ __decorate([
678
+ Input(),
679
+ __metadata("design:type", TemplateRef)
680
+ ], GanttTimelineComponent.prototype, "summaryTaskTemplate", void 0);
681
+ __decorate([
682
+ Input(),
683
+ __metadata("design:type", Function)
684
+ ], GanttTimelineComponent.prototype, "taskClass", void 0);
685
+ __decorate([
686
+ Input(),
687
+ __metadata("design:type", Boolean)
688
+ ], GanttTimelineComponent.prototype, "renderDependencyDragClues", void 0);
689
+ __decorate([
690
+ Input(),
691
+ __metadata("design:type", Object)
692
+ ], GanttTimelineComponent.prototype, "dragScrollSettings", void 0);
693
+ __decorate([
694
+ Input(),
695
+ __metadata("design:type", Boolean)
696
+ ], GanttTimelineComponent.prototype, "selectable", void 0);
697
+ __decorate([
698
+ Input(),
699
+ __metadata("design:type", Function)
700
+ ], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
701
+ __decorate([
702
+ Input(),
703
+ __metadata("design:type", Function)
704
+ ], GanttTimelineComponent.prototype, "isExpanded", void 0);
705
+ __decorate([
706
+ Input(),
707
+ __metadata("design:type", Array)
708
+ ], GanttTimelineComponent.prototype, "dependencies", void 0);
709
+ __decorate([
710
+ Output(),
711
+ __metadata("design:type", EventEmitter)
712
+ ], GanttTimelineComponent.prototype, "timelineContainerPress", void 0);
713
+ __decorate([
714
+ Output(),
715
+ __metadata("design:type", EventEmitter)
716
+ ], GanttTimelineComponent.prototype, "timelineContainerDrag", void 0);
717
+ __decorate([
718
+ Output(),
719
+ __metadata("design:type", EventEmitter)
720
+ ], GanttTimelineComponent.prototype, "timelineContainerRelease", void 0);
721
+ GanttTimelineComponent = __decorate([
722
+ Component({
723
+ selector: 'kendo-gantt-timeline',
724
+ template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <!-- tabindex=\"-1\" required for https://bugzilla.mozilla.org/show_bug.cgi?id=1069739 -->\n <div\n #timelineContent\n class=\"k-grid-content\"\n tabindex=\"-1\"\n role=\"tree\"\n aria-roledescription=\"Timeline\"\n kendoGanttTimelineScrollable\n [scrollSettings]=\"dragScrollSettings\"\n kendoDraggable\n [enableDrag]=\"draggableEnabled\"\n (kendoPress)=\"timelineContainerPress.emit($event)\"\n (kendoDrag)=\"timelineContainerDrag.emit($event)\"\n (kendoRelease)=\"timelineContainerRelease.emit($event)\"\n >\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [isExpanded]=\"isExpanded\"\n [selectable]=\"selectable\"\n [isTaskSelected]=\"isTaskSelected\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n <polyline #dependencyDragCreatePolyline />\n </svg>\n\n <!-- placeholder for the dependency drag popup; its position is not arbitrary - the popup is intended to be absolutely positioned inside the .k-grid-content element -->\n <ng-container #dragPopupContainer></ng-container>\n </div>\n </div>\n "
725
+ }),
726
+ __metadata("design:paramtypes", [ScrollSyncService,
727
+ DependencyDomService,
728
+ Renderer2,
729
+ NgZone])
730
+ ], GanttTimelineComponent);
731
+ return GanttTimelineComponent;
732
+ }());
39
733
 
40
734
  /**
41
735
  * The base class for the column components of the Gantt.
@@ -626,170 +1320,74 @@ var GanttSpanColumnComponent = /** @class */ (function (_super) {
626
1320
  }
627
1321
  ]
628
1322
  }),
629
- __param(1, SkipSelf()), __param(1, Host()), __param(1, Optional()),
630
- __metadata("design:paramtypes", [OptionChangesService,
631
- GanttColumnBase])
632
- ], GanttSpanColumnComponent);
633
- return GanttSpanColumnComponent;
634
- }(SpanColumnComponent));
635
-
636
- /**
637
- * @hidden
638
- */
639
- var hasChildren = function () { return false; };
640
- /**
641
- * @hidden
642
- */
643
- var fetchChildren = function () { return of([]); };
644
- /**
645
- * @hidden
646
- */
647
- var rowClassCallback = function () { return null; };
648
- /**
649
- * @hidden
650
- */
651
- var taskClassCallback = function () { return null; };
652
- /**
653
- * @hidden
654
- */
655
- var isSelected = function () { return false; };
1323
+ __param(1, SkipSelf()), __param(1, Host()), __param(1, Optional()),
1324
+ __metadata("design:paramtypes", [OptionChangesService,
1325
+ GanttColumnBase])
1326
+ ], GanttSpanColumnComponent);
1327
+ return GanttSpanColumnComponent;
1328
+ }(SpanColumnComponent));
656
1329
 
657
1330
  /**
658
1331
  * @hidden
659
1332
  */
660
- var isWorkDay = function (date, start, end) {
661
- return date.getDay() >= start && date.getDay() <= end;
662
- };
663
- /**
664
- * @hidden
665
- */
666
- var isWorkHour = function (date, start, end) {
667
- return date.getHours() >= start && date.getHours() <= end;
668
- };
1333
+ var hasChildren = function () { return false; };
669
1334
  /**
670
1335
  * @hidden
671
1336
  */
672
- var isPresent = function (item) { return item !== null && item !== undefined; };
1337
+ var fetchChildren = function () { return of([]); };
673
1338
  /**
674
1339
  * @hidden
675
- *
676
- * Normalized the data to an array in case a falsy value is passed
677
- * or a TreeListDataResult object (applicable for the data-binding directives).
678
1340
  */
679
- var normalizeGanttData = function (data) {
680
- if (!isPresent(data)) {
681
- return [];
682
- }
683
- else if (Array.isArray(data.data)) {
684
- return data.data;
685
- }
686
- else {
687
- return data;
688
- }
689
- };
1341
+ var rowClassCallback = function () { return null; };
690
1342
  /**
691
1343
  * @hidden
692
- *
693
- * Returns a new date with the specified hours, minutes, seconds and millliseconds set.
694
- * Only the hours are required, the rest of the params are set to `0` by default.
695
1344
  */
696
- var setTime = function (date, hours, minutes, seconds, milliseconds) {
697
- if (minutes === void 0) { minutes = 0; }
698
- if (seconds === void 0) { seconds = 0; }
699
- if (milliseconds === void 0) { milliseconds = 0; }
700
- if (!isPresent(date)) {
701
- return null;
702
- }
703
- var result = cloneDate(date);
704
- result.setHours(hours);
705
- result.setMinutes(minutes);
706
- result.setSeconds(seconds);
707
- result.setMilliseconds(milliseconds);
708
- return result;
709
- };
1345
+ var taskClassCallback = function () { return null; };
710
1346
  /**
711
1347
  * @hidden
712
- *
713
- * Returns the last day of a week.
714
- * @param standingPoint - Any day of the target week.
715
- * @param firstWeekDay - The week's starting day (e.g. Monday, Tuesday, etc.)
716
- */
717
- var lastDayOfWeek = function (standingPoint, firstWeekDay) {
718
- var followingWeek = addWeeks(standingPoint, 1);
719
- var firstDayOfFollowingWeek = firstDayInWeek(followingWeek, firstWeekDay);
720
- var lastDayOfTargetWeek = addDays(firstDayOfFollowingWeek, -1);
721
- return lastDayOfTargetWeek;
722
- };
723
- /**
724
- * Persists the intially resolved scrollbar width value.
725
1348
  */
726
- var SCROLLBAR_WIDTH;
1349
+ var isSelected = function () { return false; };
1350
+
727
1351
  /**
728
1352
  * @hidden
729
- *
730
- * Gets the default scrollbar width accoring to the current environment.
731
1353
  */
732
- var scrollbarWidth = function () {
733
- if (!isDocumentAvailable()) {
734
- return;
735
- }
736
- // calculate scrollbar width only once, then return the cached value
737
- if (isNaN(SCROLLBAR_WIDTH)) {
738
- var div = document.createElement('div');
739
- div.style.cssText = 'overflow: scroll; overflow-x: hidden; zoom: 1; clear: both; display: block;';
740
- div.innerHTML = '&nbsp;';
741
- document.body.appendChild(div);
742
- SCROLLBAR_WIDTH = div.offsetWidth - div.scrollWidth;
743
- document.body.removeChild(div);
1354
+ var PreventableEvent = /** @class */ (function () {
1355
+ function PreventableEvent() {
1356
+ this.prevented = false;
744
1357
  }
745
- return SCROLLBAR_WIDTH;
746
- };
747
- /**
748
- * @hidden
749
- */
750
- var isColumnGroup = function (column) { return column.isColumnGroup; };
751
- /**
752
- * @hidden
753
- */
754
- var isNumber = function (contender) { return typeof contender === 'number' && !isNaN(contender); };
755
- /**
756
- * @hidden
757
- */
758
- var isString = function (contender) { return typeof contender === 'string'; };
1358
+ /**
1359
+ * Prevents the default action for a specified event.
1360
+ * In this way, the source component suppresses
1361
+ * the built-in behavior that follows the event.
1362
+ */
1363
+ PreventableEvent.prototype.preventDefault = function () {
1364
+ this.prevented = true;
1365
+ };
1366
+ /**
1367
+ * Returns `true` if the event was prevented
1368
+ * by any of its subscribers.
1369
+ *
1370
+ * @returns `true` if the default action was prevented.
1371
+ * Otherwise, returns `false`.
1372
+ */
1373
+ PreventableEvent.prototype.isDefaultPrevented = function () {
1374
+ return this.prevented;
1375
+ };
1376
+ return PreventableEvent;
1377
+ }());
1378
+
759
1379
  /**
760
- * @hidden
761
- *
762
- * Gets the closest timeline task element index from an event target.
763
- * Uses the `data-task-index` attribute assigned to each task.
764
- * Restricts the search up to the provided gantt element from the second param.
1380
+ * Called every time a user leaves an edited cell.
765
1381
  */
766
- var getClosestTaskIndex = function (element, gantt) {
767
- var task = closestInScope(element, matchesClasses('k-task'), gantt);
768
- if (!isPresent(task)) {
769
- return null;
1382
+ var CellCloseEvent = /** @class */ (function (_super) {
1383
+ __extends(CellCloseEvent, _super);
1384
+ function CellCloseEvent(options) {
1385
+ var _this = _super.call(this) || this;
1386
+ Object.assign(_this, options);
1387
+ return _this;
770
1388
  }
771
- return Number(task.getAttribute('data-task-index'));
772
- };
773
- /**
774
- * @hidden
775
- *
776
- * Checks whether the queried item or its parent items has a `k-task` selector.
777
- * Restricts the search up to the provided gantt element from the second param.
778
- */
779
- var isTask = function (contender, gantt) {
780
- var task = closestInScope(contender, matchesClasses('k-task'), gantt);
781
- return isPresent(task);
782
- };
783
- /**
784
- * @hidden
785
- *
786
- * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
787
- * Restricts the search up to the provided gantt element from the second param.
788
- */
789
- var isClearButton = function (contender, gantt) {
790
- var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), gantt);
791
- return isPresent(clearButtonContainer);
792
- };
1389
+ return CellCloseEvent;
1390
+ }(PreventableEvent));
793
1391
 
794
1392
  /**
795
1393
  * @hidden
@@ -909,129 +1507,45 @@ var TimelineBaseViewService = /** @class */ (function () {
909
1507
  var lastWeekDay = lastDayOfWeek(startDay, weekStart);
910
1508
  var slotEnd = lastWeekDay > endDay ? endDay : lastWeekDay;
911
1509
  var daySlots = this.getDays(startDay, slotEnd);
912
- var span = daySlots.length;
913
- var firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), DAY_FORMAT);
914
- var lastDay = this.intlService.formatDate(addDays(slotEnd, -1), DAY_FORMAT);
915
- if (span > 0) {
916
- slots.push({
917
- start: daySlots[0].start,
918
- end: daySlots[span - 1].end,
919
- text: firstDay + " - " + lastDay,
920
- span: span
921
- });
922
- }
923
- startDay = firstDayInWeek(addWeeks(slotEnd, 1));
924
- }
925
- return slots;
926
- };
927
- TimelineBaseViewService.prototype.getMonths = function (start, end) {
928
- var slots = [];
929
- var startDay = new Date(start);
930
- var endDay = new Date(end);
931
- while (startDay < endDay) {
932
- var endMonth = lastDayOfMonth(startDay);
933
- var slotEnd = endDay < endMonth ? endDay : endMonth;
934
- var daySlots = this.getDays(startDay, slotEnd);
935
- var span = daySlots.length;
936
- var monthStart = firstDayOfMonth(getDate(startDay));
937
- var shortText = this.intlService.formatDate(monthStart, MONTH_FORMAT);
938
- if (span > 0) {
939
- slots.push({
940
- start: daySlots[0].start,
941
- end: daySlots[span - 1].end,
942
- span: span,
943
- text: shortText
944
- });
945
- }
946
- startDay = firstDayOfMonth(addMonths(slotEnd, 1));
947
- }
948
- return slots;
949
- };
950
- return TimelineBaseViewService;
951
- }());
952
-
953
- /**
954
- * @hidden
955
- */
956
- var DEFAULT_DEPENDENCY_MODEL_FIELDS = Object.freeze({
957
- toId: 'toId',
958
- fromId: 'fromId',
959
- id: 'id',
960
- type: 'type'
961
- });
962
-
963
- /**
964
- * @hidden
965
- */
966
- var DEFAULT_TASK_MODEL_FIELDS = Object.freeze({
967
- id: 'id',
968
- start: 'start',
969
- end: 'end',
970
- title: 'title',
971
- completionRatio: 'completionRatio',
972
- children: 'children'
973
- });
974
-
975
- /**
976
- * @hidden
977
- */
978
- var MappingService = /** @class */ (function () {
979
- function MappingService() {
980
- this._taskFields = __assign({}, DEFAULT_TASK_MODEL_FIELDS);
981
- this._dependencyFields = __assign({}, DEFAULT_DEPENDENCY_MODEL_FIELDS);
982
- }
983
- Object.defineProperty(MappingService.prototype, "taskFields", {
984
- get: function () {
985
- return this._taskFields;
986
- },
987
- /**
988
- * Gets or sets the model fields for the task data items.
989
- * Uses the default values for fields which are not specified.
990
- */
991
- set: function (fields) {
992
- this._taskFields = __assign({}, DEFAULT_TASK_MODEL_FIELDS, fields);
993
- },
994
- enumerable: true,
995
- configurable: true
996
- });
997
- Object.defineProperty(MappingService.prototype, "dependencyFields", {
998
- get: function () {
999
- return this._dependencyFields;
1000
- },
1001
- /**
1002
- * Gets or sets the model fields for the depenency data items.
1003
- * Uses the default values for fields which are not specified.
1004
- */
1005
- set: function (fields) {
1006
- this._dependencyFields = __assign({}, DEFAULT_DEPENDENCY_MODEL_FIELDS, fields);
1007
- },
1008
- enumerable: true,
1009
- configurable: true
1010
- });
1011
- /**
1012
- * Retrieves the value for the specified task field.
1013
- * Supports nested fields as well (e.g. 'manager.id').
1014
- */
1015
- MappingService.prototype.extractFromTask = function (dataItem, field) {
1016
- if (!isPresent(this.taskFields)) {
1017
- return null;
1510
+ var span = daySlots.length;
1511
+ var firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), DAY_FORMAT);
1512
+ var lastDay = this.intlService.formatDate(addDays(slotEnd, -1), DAY_FORMAT);
1513
+ if (span > 0) {
1514
+ slots.push({
1515
+ start: daySlots[0].start,
1516
+ end: daySlots[span - 1].end,
1517
+ text: firstDay + " - " + lastDay,
1518
+ span: span
1519
+ });
1520
+ }
1521
+ startDay = firstDayInWeek(addWeeks(slotEnd, 1));
1018
1522
  }
1019
- return getter(this.taskFields[field])(dataItem);
1523
+ return slots;
1020
1524
  };
1021
- /**
1022
- * Retrieves the value for the specified dependency field.
1023
- * Supports nested fields as well (e.g. 'manager.id').
1024
- */
1025
- MappingService.prototype.extractFromDependency = function (dataItem, field) {
1026
- if (!isPresent(this.dependencyFields)) {
1027
- return null;
1525
+ TimelineBaseViewService.prototype.getMonths = function (start, end) {
1526
+ var slots = [];
1527
+ var startDay = new Date(start);
1528
+ var endDay = new Date(end);
1529
+ while (startDay < endDay) {
1530
+ var endMonth = lastDayOfMonth(startDay);
1531
+ var slotEnd = endDay < endMonth ? endDay : endMonth;
1532
+ var daySlots = this.getDays(startDay, slotEnd);
1533
+ var span = daySlots.length;
1534
+ var monthStart = firstDayOfMonth(getDate(startDay));
1535
+ var shortText = this.intlService.formatDate(monthStart, MONTH_FORMAT);
1536
+ if (span > 0) {
1537
+ slots.push({
1538
+ start: daySlots[0].start,
1539
+ end: daySlots[span - 1].end,
1540
+ span: span,
1541
+ text: shortText
1542
+ });
1543
+ }
1544
+ startDay = firstDayOfMonth(addMonths(slotEnd, 1));
1028
1545
  }
1029
- return getter(this.dependencyFields[field])(dataItem);
1546
+ return slots;
1030
1547
  };
1031
- MappingService = __decorate([
1032
- Injectable()
1033
- ], MappingService);
1034
- return MappingService;
1548
+ return TimelineBaseViewService;
1035
1549
  }());
1036
1550
 
1037
1551
  /**
@@ -1146,236 +1660,85 @@ var TimelineMonthViewService = /** @class */ (function (_super) {
1146
1660
  __metadata("design:paramtypes", [IntlService, MappingService])
1147
1661
  ], TimelineMonthViewService);
1148
1662
  return TimelineMonthViewService;
1149
- }(TimelineBaseViewService));
1150
-
1151
- /**
1152
- * @hidden
1153
- */
1154
- var TimelineWeekViewService = /** @class */ (function (_super) {
1155
- __extends(TimelineWeekViewService, _super);
1156
- function TimelineWeekViewService(intlService, mapper) {
1157
- return _super.call(this, intlService, mapper) || this;
1158
- }
1159
- /**
1160
- * Gets a date a day before the first task start with hours, minutes, seconds, milliseconds cleared.
1161
- */
1162
- TimelineWeekViewService.prototype.getStartOffset = function (rangeStart) {
1163
- return addDays(getDate(rangeStart), -1);
1164
- };
1165
- /**
1166
- * Gets a date a day after the last task start with hours, minutes, seconds, milliseconds cleared.
1167
- */
1168
- TimelineWeekViewService.prototype.getEndOffset = function (rangeEnd) {
1169
- return addDays(getDate(rangeEnd), 1);
1170
- };
1171
- /**
1172
- *
1173
- * @param tasks - The tasks which are going to be rendered in the table
1174
- * @returns {number}
1175
- */
1176
- TimelineWeekViewService.prototype.getTableWidth = function (tasks) {
1177
- var timeSlots = this.getSlots(tasks)[1];
1178
- var slotWidth = this.options.slotWidth;
1179
- return Math.round(timeSlots.length * slotWidth);
1180
- };
1181
- /**
1182
- *
1183
- * @param tasks - The tasks which are going to be rendered in the table
1184
- * @returns {Array<Object>} - A collection containing the day and hours slots
1185
- * Used to render the number of columns and the header
1186
- */
1187
- TimelineWeekViewService.prototype.getSlots = function (tasks) {
1188
- // will return the header rows slots
1189
- var slots = [];
1190
- var _a = this.getRange(tasks), start = _a.start, end = _a.end;
1191
- var weeks = this.getWeeks(start, end);
1192
- var days = this.getDays(start, end);
1193
- slots.push(weeks, days);
1194
- return slots;
1195
- };
1196
- TimelineWeekViewService = __decorate([
1197
- Injectable(),
1198
- __metadata("design:paramtypes", [IntlService, MappingService])
1199
- ], TimelineWeekViewService);
1200
- return TimelineWeekViewService;
1201
- }(TimelineBaseViewService));
1202
-
1203
- /**
1204
- * @hidden
1205
- */
1206
- var services = {
1207
- day: TimelineDayViewService,
1208
- week: TimelineWeekViewService,
1209
- month: TimelineMonthViewService
1210
- };
1211
- /**
1212
- * @hidden
1213
- */
1214
- var TimelineViewService = /** @class */ (function () {
1215
- function TimelineViewService(injector) {
1216
- this.injector = injector;
1217
- this.viewChange = new EventEmitter();
1218
- }
1219
- TimelineViewService.prototype.service = function (view) {
1220
- var serviceType = services[view];
1221
- return serviceType ? this.injector.get(serviceType) : null;
1222
- };
1223
- TimelineViewService = __decorate([
1224
- Injectable(),
1225
- __metadata("design:paramtypes", [Injector])
1226
- ], TimelineViewService);
1227
- return TimelineViewService;
1228
- }());
1229
-
1230
- /**
1231
- * @hidden
1232
- */
1233
- var ScrollSyncService = /** @class */ (function () {
1234
- function ScrollSyncService(ngZone) {
1235
- var _this = this;
1236
- this.ngZone = ngZone;
1237
- this.changes = new Subject();
1238
- this.elements = [];
1239
- this.subscriptions = new Subscription();
1240
- this.subscriptions.add(this.changes.subscribe(function (args) {
1241
- _this.scroll(args);
1242
- }));
1243
- }
1244
- ScrollSyncService.prototype.registerElement = function (el, sourceType) {
1245
- var _this = this;
1246
- this.elements.push({ element: el, sourceType: sourceType });
1247
- if (sourceType === "timeline" || sourceType === "treelist") {
1248
- this.ngZone.runOutsideAngular(function () {
1249
- var obs = fromEvent(el, 'scroll').pipe(map(function (_a) {
1250
- var _b = _a.target, scrollTop = _b.scrollTop, scrollLeft = _b.scrollLeft;
1251
- return ({
1252
- scrollTop: scrollTop,
1253
- scrollLeft: scrollLeft,
1254
- sourceType: sourceType
1255
- });
1256
- }));
1257
- var comparisonFn = sourceType === 'timeline' ?
1258
- function (x, y) { return (x.scrollTop === y.scrollTop) && (x.scrollLeft === y.scrollLeft); } :
1259
- function (x, y) { return (x.scrollTop === y.scrollTop); };
1260
- _this.subscriptions.add(obs.pipe(distinctUntilChanged(comparisonFn))
1261
- .subscribe(function (event) { return _this.changes.next(event); }));
1262
- });
1263
- }
1264
- };
1265
- ScrollSyncService.prototype.ngOnDestroy = function () {
1266
- this.subscriptions.unsubscribe();
1267
- this.elements = null;
1268
- };
1269
- ScrollSyncService.prototype.syncScrollTop = function (sourceType, targetType) {
1270
- var source = this.elements.find(function (element) { return element.sourceType === sourceType; });
1271
- var target = this.elements.find(function (element) { return element.sourceType === targetType; });
1272
- // Need to wait for the splitter pane's content to be rendered
1273
- this.ngZone.onStable.pipe(take(1)).subscribe(function () { return target.element.scrollTop = source.element.scrollTop; });
1274
- };
1275
- ScrollSyncService.prototype.resetTimelineScrollLeft = function () {
1276
- var source = this.elements.find(function (element) { return element.sourceType === 'timeline'; });
1277
- source.element.scrollLeft = 0;
1278
- };
1279
- ScrollSyncService.prototype.scroll = function (_a) {
1280
- var _this = this;
1281
- var scrollTop = _a.scrollTop, scrollLeft = _a.scrollLeft, sourceType = _a.sourceType;
1282
- this.ngZone.runOutsideAngular(function () {
1283
- if (sourceType === 'timeline') {
1284
- var header = _this.elements.find(function (element) { return element.sourceType === 'header'; }).element;
1285
- header.scrollLeft = scrollLeft;
1286
- if (!_this.syncingTimeline) {
1287
- _this.syncingTreeList = true;
1288
- var treelist = _this.elements.find(function (element) { return element.sourceType === 'treelist'; }).element;
1289
- treelist.scrollTop = scrollTop;
1290
- }
1291
- _this.syncingTimeline = false;
1292
- }
1293
- if (sourceType === 'treelist') {
1294
- if (!_this.syncingTreeList) {
1295
- _this.syncingTimeline = true;
1296
- var timeline = _this.elements.find(function (element) { return element.sourceType === 'timeline'; }).element;
1297
- timeline.scrollTop = scrollTop;
1298
- }
1299
- _this.syncingTreeList = false;
1300
- }
1301
- });
1302
- };
1303
- ScrollSyncService = __decorate([
1304
- Injectable(),
1305
- __metadata("design:paramtypes", [NgZone])
1306
- ], ScrollSyncService);
1307
- return ScrollSyncService;
1308
- }());
1309
-
1310
- /**
1311
- * @hidden
1312
- */
1313
- var DependencyDomService = /** @class */ (function () {
1314
- function DependencyDomService(mapper) {
1315
- this.mapper = mapper;
1316
- this.notifier = new Subject();
1317
- /**
1318
- * Maps each rendered task to its HTML element.
1319
- * Uses the task ID field value as key.
1320
- */
1321
- this.tasks = new Map();
1322
- }
1323
- Object.defineProperty(DependencyDomService.prototype, "taskChanges", {
1324
- /**
1325
- * Emits each time some of the tasks or the view have changed.
1326
- * Fires also on the first change of the table rows and the parent container.
1327
- */
1328
- get: function () {
1329
- return this.notifier.asObservable();
1330
- },
1331
- enumerable: true,
1332
- configurable: true
1333
- });
1334
- Object.defineProperty(DependencyDomService.prototype, "dependencyDomArgs", {
1335
- get: function () {
1336
- return {
1337
- tasks: this.tasks,
1338
- contentContainer: this.contentContainer,
1339
- timelineRow: this.timelineRow
1340
- };
1341
- },
1342
- enumerable: true,
1343
- configurable: true
1344
- });
1345
- DependencyDomService.prototype.ngOnDestroy = function () {
1346
- this.tasks.clear();
1347
- this.tasks = null;
1348
- this.contentContainer = null;
1349
- };
1350
- DependencyDomService.prototype.registerTimelineRow = function (timelineRow) {
1351
- this.timelineRow = timelineRow;
1352
- this.notifyChanges();
1353
- };
1354
- DependencyDomService.prototype.registerContentContainer = function (contentContainer) {
1355
- this.contentContainer = contentContainer;
1356
- this.notifyChanges();
1663
+ }(TimelineBaseViewService));
1664
+
1665
+ /**
1666
+ * @hidden
1667
+ */
1668
+ var TimelineWeekViewService = /** @class */ (function (_super) {
1669
+ __extends(TimelineWeekViewService, _super);
1670
+ function TimelineWeekViewService(intlService, mapper) {
1671
+ return _super.call(this, intlService, mapper) || this;
1672
+ }
1673
+ /**
1674
+ * Gets a date a day before the first task start with hours, minutes, seconds, milliseconds cleared.
1675
+ */
1676
+ TimelineWeekViewService.prototype.getStartOffset = function (rangeStart) {
1677
+ return addDays(getDate(rangeStart), -1);
1357
1678
  };
1358
- DependencyDomService.prototype.registerTask = function (task, element) {
1359
- var id = this.mapper.extractFromTask(task, 'id');
1360
- this.tasks.set(id, element);
1361
- this.notifyChanges();
1679
+ /**
1680
+ * Gets a date a day after the last task start with hours, minutes, seconds, milliseconds cleared.
1681
+ */
1682
+ TimelineWeekViewService.prototype.getEndOffset = function (rangeEnd) {
1683
+ return addDays(getDate(rangeEnd), 1);
1362
1684
  };
1363
- DependencyDomService.prototype.unregisterTask = function (task) {
1364
- var id = this.mapper.extractFromTask(task, 'id');
1365
- this.tasks.delete(id);
1366
- this.notifyChanges();
1685
+ /**
1686
+ *
1687
+ * @param tasks - The tasks which are going to be rendered in the table
1688
+ * @returns {number}
1689
+ */
1690
+ TimelineWeekViewService.prototype.getTableWidth = function (tasks) {
1691
+ var timeSlots = this.getSlots(tasks)[1];
1692
+ var slotWidth = this.options.slotWidth;
1693
+ return Math.round(timeSlots.length * slotWidth);
1367
1694
  };
1368
1695
  /**
1369
- * Notifies all dependency directives that a change in one of the elements has occured.
1696
+ *
1697
+ * @param tasks - The tasks which are going to be rendered in the table
1698
+ * @returns {Array<Object>} - A collection containing the day and hours slots
1699
+ * Used to render the number of columns and the header
1370
1700
  */
1371
- DependencyDomService.prototype.notifyChanges = function () {
1372
- this.notifier.next(this.dependencyDomArgs);
1701
+ TimelineWeekViewService.prototype.getSlots = function (tasks) {
1702
+ // will return the header rows slots
1703
+ var slots = [];
1704
+ var _a = this.getRange(tasks), start = _a.start, end = _a.end;
1705
+ var weeks = this.getWeeks(start, end);
1706
+ var days = this.getDays(start, end);
1707
+ slots.push(weeks, days);
1708
+ return slots;
1373
1709
  };
1374
- DependencyDomService = __decorate([
1710
+ TimelineWeekViewService = __decorate([
1375
1711
  Injectable(),
1376
- __metadata("design:paramtypes", [MappingService])
1377
- ], DependencyDomService);
1378
- return DependencyDomService;
1712
+ __metadata("design:paramtypes", [IntlService, MappingService])
1713
+ ], TimelineWeekViewService);
1714
+ return TimelineWeekViewService;
1715
+ }(TimelineBaseViewService));
1716
+
1717
+ /**
1718
+ * @hidden
1719
+ */
1720
+ var services = {
1721
+ day: TimelineDayViewService,
1722
+ week: TimelineWeekViewService,
1723
+ month: TimelineMonthViewService
1724
+ };
1725
+ /**
1726
+ * @hidden
1727
+ */
1728
+ var TimelineViewService = /** @class */ (function () {
1729
+ function TimelineViewService(injector) {
1730
+ this.injector = injector;
1731
+ this.viewChange = new EventEmitter();
1732
+ }
1733
+ TimelineViewService.prototype.service = function (view) {
1734
+ var serviceType = services[view];
1735
+ return serviceType ? this.injector.get(serviceType) : null;
1736
+ };
1737
+ TimelineViewService = __decorate([
1738
+ Injectable(),
1739
+ __metadata("design:paramtypes", [Injector])
1740
+ ], TimelineViewService);
1741
+ return TimelineViewService;
1379
1742
  }());
1380
1743
 
1381
1744
  /**
@@ -1386,9 +1749,11 @@ var EditService = /** @class */ (function () {
1386
1749
  var _this = this;
1387
1750
  this.mapper = mapper;
1388
1751
  this.showEditingDialog = new Subject();
1389
- this.showConfirmationDialog = new Subject();
1752
+ this.taskDelete = new Subject();
1390
1753
  this.editEvent = new Subject();
1391
1754
  this.addEvent = new Subject();
1755
+ this.predecessors = [];
1756
+ this.successors = [];
1392
1757
  this.updatedItems = [];
1393
1758
  this.deletedItems = [];
1394
1759
  this.itemIndex = function (item, data) {
@@ -1435,58 +1800,561 @@ var EditService = /** @class */ (function () {
1435
1800
  editResultType: editResultType
1436
1801
  });
1437
1802
  };
1438
- EditService.prototype.updateDependencies = function (item) {
1439
- if (!this.isNew(item)) {
1440
- // update
1441
- var index = this.itemIndex(item, this.updatedItems);
1442
- if (index !== -1) {
1443
- this.updatedItems.splice(index, 1, item);
1444
- }
1445
- else {
1446
- this.updatedItems.push(item);
1447
- }
1803
+ EditService.prototype.updateDependencies = function (item) {
1804
+ if (!this.isNew(item)) {
1805
+ // update
1806
+ var index = this.itemIndex(item, this.updatedItems);
1807
+ if (index !== -1) {
1808
+ this.updatedItems.splice(index, 1, item);
1809
+ }
1810
+ else {
1811
+ this.updatedItems.push(item);
1812
+ }
1813
+ }
1814
+ };
1815
+ EditService.prototype.getCreatedDependencies = function () {
1816
+ var _this = this;
1817
+ return this.dependencies.filter(function (item) { return _this.mapper.extractFromDependency(item, 'id') === null; });
1818
+ };
1819
+ EditService.prototype.deleteDependency = function (item) {
1820
+ var updatedIndex = this.itemIndex(item, this.updatedItems);
1821
+ if (updatedIndex !== -1) {
1822
+ this.updatedItems.splice(updatedIndex, 1);
1823
+ }
1824
+ if (!this.isNew(item)) {
1825
+ this.deletedItems.push(item);
1826
+ }
1827
+ };
1828
+ EditService.prototype.loadTasks = function (initialValues, isInitializer) {
1829
+ var _this = this;
1830
+ if (isInitializer === void 0) { isInitializer = true; }
1831
+ return forkJoin(initialValues.map(function (v) { return _this.getElementById(v); })).pipe(map(function (value) {
1832
+ return value.reduce(function (acc, item) { return acc = acc.concat(normalizeGanttData(item)); }, []);
1833
+ }), expand(function (values) {
1834
+ if (values.some(function (el) { return _this.hasChildren(el); })) {
1835
+ return _this.loadTasks(values, false);
1836
+ }
1837
+ return EMPTY;
1838
+ }), reduce(function (acc, values) { return acc.concat(values); }, isInitializer ? initialValues.slice() : []));
1839
+ };
1840
+ EditService.prototype.getElementById = function (item) {
1841
+ var children = this.fetchChildren(item);
1842
+ if (isObservable(children)) {
1843
+ return children;
1844
+ }
1845
+ return of(children);
1846
+ };
1847
+ EditService.prototype.isNew = function (item) {
1848
+ return !isPresent(this.mapper.extractFromDependency(item, 'id'));
1849
+ };
1850
+ EditService = __decorate([
1851
+ Injectable(),
1852
+ __metadata("design:paramtypes", [MappingService])
1853
+ ], EditService);
1854
+ return EditService;
1855
+ }());
1856
+
1857
+ /**
1858
+ * @hidden
1859
+ *
1860
+ * Notifies the timeline-scroll.directive to scroll into view to requested coordinates.
1861
+ * The scrolling is performed based on client (viewport) coordinates.
1862
+ */
1863
+ var TimelineScrollService = /** @class */ (function () {
1864
+ function TimelineScrollService() {
1865
+ this.horizontalScroll = new Subject();
1866
+ this.verticalScroll = new Subject();
1867
+ this.scrollCancel = new Subject();
1868
+ }
1869
+ TimelineScrollService.prototype.ngOnDestroy = function () {
1870
+ this.horizontalScroll.complete();
1871
+ this.verticalScroll.complete();
1872
+ this.scrollCancel.complete();
1873
+ };
1874
+ TimelineScrollService.prototype.requestHorizontalScroll = function (clientTop) {
1875
+ this.horizontalScroll.next(clientTop);
1876
+ };
1877
+ TimelineScrollService.prototype.requestVerticalScroll = function (clientLeft) {
1878
+ this.verticalScroll.next(clientLeft);
1879
+ };
1880
+ TimelineScrollService.prototype.requestScrollCancel = function () {
1881
+ this.scrollCancel.next();
1882
+ };
1883
+ TimelineScrollService = __decorate([
1884
+ Injectable()
1885
+ ], TimelineScrollService);
1886
+ return TimelineScrollService;
1887
+ }());
1888
+
1889
+ /**
1890
+ * @hidden
1891
+ *
1892
+ * Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
1893
+ */
1894
+ var GanttLocalizationService = /** @class */ (function () {
1895
+ function GanttLocalizationService(localizationService) {
1896
+ this.localizationService = localizationService;
1897
+ }
1898
+ GanttLocalizationService.prototype.get = function (token) {
1899
+ return this.localizationService.get(token);
1900
+ };
1901
+ GanttLocalizationService = __decorate([
1902
+ Injectable(),
1903
+ __metadata("design:paramtypes", [LocalizationService])
1904
+ ], GanttLocalizationService);
1905
+ return GanttLocalizationService;
1906
+ }());
1907
+
1908
+ // TODO: add those keys to `import { Keys } from '@progress/kendo-angular-common';`
1909
+ var NumpadKeys;
1910
+ (function (NumpadKeys) {
1911
+ NumpadKeys[NumpadKeys["Digit1"] = 97] = "Digit1";
1912
+ NumpadKeys[NumpadKeys["Digit2"] = 98] = "Digit2";
1913
+ NumpadKeys[NumpadKeys["Digit3"] = 99] = "Digit3";
1914
+ NumpadKeys[NumpadKeys["Digit4"] = 100] = "Digit4";
1915
+ })(NumpadKeys || (NumpadKeys = {}));
1916
+ /**
1917
+ * @hidden
1918
+ */
1919
+ var isArrowUpDownKey = function (keyCode) { return [
1920
+ Keys.ArrowUp,
1921
+ Keys.ArrowDown
1922
+ ].some(function (arrowKeyCode) {
1923
+ return keyCode === arrowKeyCode;
1924
+ }); };
1925
+ /**
1926
+ * @hidden
1927
+ */
1928
+ var isNavigationKey = function (keyCode) { return [
1929
+ Keys.ArrowUp,
1930
+ Keys.ArrowDown,
1931
+ Keys.Home,
1932
+ Keys.End
1933
+ ].some(function (navigationKeyCode) {
1934
+ return keyCode === navigationKeyCode;
1935
+ }); };
1936
+ /**
1937
+ * @hidden
1938
+ */
1939
+ var isExpandCollapseKey = function (keyCode, altKey) {
1940
+ return altKey && [
1941
+ Keys.ArrowLeft,
1942
+ Keys.ArrowRight
1943
+ ].some(function (navigationKeyCode) {
1944
+ return keyCode === navigationKeyCode;
1945
+ });
1946
+ };
1947
+ /**
1948
+ * @hidden
1949
+ */
1950
+ var isViewDigitKey = function (keyCode) { return [
1951
+ Keys.Digit1,
1952
+ NumpadKeys.Digit1,
1953
+ Keys.Digit2,
1954
+ NumpadKeys.Digit2,
1955
+ Keys.Digit3,
1956
+ NumpadKeys.Digit3,
1957
+ Keys.Digit4,
1958
+ NumpadKeys.Digit4
1959
+ ].some(function (digitKeyCode) {
1960
+ return keyCode === digitKeyCode;
1961
+ }); };
1962
+ /**
1963
+ * @hidden
1964
+ *
1965
+ * Returns the corresponding view index for the pressed digit key (Digit 1 => 0, Digit 2 => 1, etc.).
1966
+ */
1967
+ var getIndexFromViewDigitKeyCode = function (keyCode) {
1968
+ switch (keyCode) {
1969
+ case NumpadKeys.Digit1:
1970
+ case Keys.Digit1: return 0;
1971
+ case NumpadKeys.Digit2:
1972
+ case Keys.Digit2: return 1;
1973
+ case NumpadKeys.Digit3:
1974
+ case Keys.Digit3: return 2;
1975
+ case NumpadKeys.Digit4:
1976
+ case Keys.Digit4: return 3;
1977
+ default: return null;
1978
+ }
1979
+ };
1980
+
1981
+ /**
1982
+ * @hidden
1983
+ */
1984
+ var NavigationService = /** @class */ (function () {
1985
+ function NavigationService(zone, renderer, scrollSyncService) {
1986
+ this.zone = zone;
1987
+ this.renderer = renderer;
1988
+ this.scrollSyncService = scrollSyncService;
1989
+ /**
1990
+ * Notifies when the tasks' focused and interactive (tabindex) state has changed.
1991
+ *
1992
+ * All tasks are rendered with tabindex="-1".
1993
+ * When one is clicked, or when some navigation key keyboard key is pressed, it should be focused, assigned the focus class, and its tabindex updated to 0.
1994
+ * All other tasks should get -1 tabindex and have the focus class removed from them.
1995
+ */
1996
+ this.taskStatusChanges = new Subject();
1997
+ /**
1998
+ * Keeps track of whether the Timeline part is focused.
1999
+ * Used when the index of the task elements change (tasks are changed, pushed to, spliced from, etc.)
2000
+ * and their status should be updated accordingly.
2001
+ */
2002
+ this.isTimelineFocused = false;
2003
+ /**
2004
+ * Keeps track of which part has last been focused.
2005
+ * Used when calling `gantt.focus()` to determine which part of the component should receive focus.
2006
+ */
2007
+ this.treeListLastActive = false;
2008
+ /**
2009
+ * Keeps track of which part has last been focused.
2010
+ * Used when calling `gantt.focus()` to determine which part of the component should receive focus.
2011
+ */
2012
+ this.timelineLastActive = false;
2013
+ this._enabled = false;
2014
+ this._activeTimelineIndex = 0;
2015
+ this._activeTreeListCell = { rowIndex: 0, colIndex: 0 };
2016
+ }
2017
+ Object.defineProperty(NavigationService.prototype, "enabled", {
2018
+ /**
2019
+ * Specifies whether navigation is enabled.
2020
+ */
2021
+ get: function () {
2022
+ return this._enabled;
2023
+ },
2024
+ enumerable: true,
2025
+ configurable: true
2026
+ });
2027
+ Object.defineProperty(NavigationService.prototype, "activeTask", {
2028
+ /**
2029
+ * Used to retrieve read-only data about the currently active task.
2030
+ */
2031
+ get: function () {
2032
+ return {
2033
+ activeIndex: this.activeTimelineIndex,
2034
+ isFocused: this.isTimelineFocused
2035
+ };
2036
+ },
2037
+ enumerable: true,
2038
+ configurable: true
2039
+ });
2040
+ Object.defineProperty(NavigationService.prototype, "activeTreeListCell", {
2041
+ get: function () {
2042
+ var firstAvailableIndex = 0;
2043
+ var lastAvailableRowIndex = this.treeListHeaderRowsCount + this.gantt.treeList.view.data.length - 1;
2044
+ var rowIndex = fitToRange(this._activeTreeListCell.rowIndex, firstAvailableIndex, lastAvailableRowIndex);
2045
+ var lastAvailableColIndex = this.gantt.columns.length;
2046
+ var colIndex = fitToRange(this._activeTreeListCell.colIndex, firstAvailableIndex, lastAvailableColIndex);
2047
+ return { rowIndex: rowIndex, colIndex: colIndex };
2048
+ },
2049
+ /**
2050
+ * Persists the expected TreeList focused cell coords.
2051
+ * When the tasks in the Timeline are navigated through, the expected TreeList focus target should also change,
2052
+ * in order to allow back-tabbing from the Timeline to the same row in the TreeList.
2053
+ */
2054
+ set: function (cell) {
2055
+ this._activeTreeListCell = cell;
2056
+ },
2057
+ enumerable: true,
2058
+ configurable: true
2059
+ });
2060
+ Object.defineProperty(NavigationService.prototype, "activeTimelineIndex", {
2061
+ get: function () {
2062
+ var firstAvailableIndex = 0;
2063
+ var lastAvailableIndex = this.gantt.treeList.view.data.length - 1;
2064
+ return fitToRange(this._activeTimelineIndex, firstAvailableIndex, lastAvailableIndex);
2065
+ },
2066
+ /**
2067
+ * Persists the expected Timeline focused task index.
2068
+ * When the cells in the TreeList are navigated through, the expected Timeline focus target should also change,
2069
+ * in order to allow tabbing from the TreeList to the same row in the Timeline.
2070
+ */
2071
+ set: function (index) {
2072
+ this._activeTimelineIndex = index;
2073
+ },
2074
+ enumerable: true,
2075
+ configurable: true
2076
+ });
2077
+ Object.defineProperty(NavigationService.prototype, "treeListHeaderRowsCount", {
2078
+ /**
2079
+ * The TreeList row index takes into account the header and filter rows.
2080
+ * Used when translating Timeline task indices to TreeList row indices.
2081
+ */
2082
+ get: function () {
2083
+ // captures nested group header rows + filter row if we start supporting it at some point
2084
+ return this.treeListElement.querySelectorAll('.k-grid-header tr').length;
2085
+ },
2086
+ enumerable: true,
2087
+ configurable: true
2088
+ });
2089
+ NavigationService.prototype.initialize = function (_a) {
2090
+ var _this = this;
2091
+ var gantt = _a.gantt, host = _a.host, treeListElement = _a.treeListElement, timelineElement = _a.timelineElement;
2092
+ // no private property setters in TypeScript, so use a getter and a poorly named private prop for this value
2093
+ this._enabled = true;
2094
+ this.gantt = gantt;
2095
+ this.host = host;
2096
+ this.treeListElement = treeListElement;
2097
+ this.timelineElement = timelineElement;
2098
+ // TODO: fix in the splitter package and remove
2099
+ // move the splitbar HTML element between the two panes to keep the visial tabbing order in tact
2100
+ var splitbar = this.host.querySelector('.k-splitbar');
2101
+ if (isPresent(splitbar) && isPresent(splitbar.previousElementSibling) && isPresent(splitbar.after)) {
2102
+ splitbar.after(splitbar.previousElementSibling);
2103
+ }
2104
+ this.zone.runOutsideAngular(function () {
2105
+ _this.eventListenerDisposers = [
2106
+ _this.renderer.listen(_this.host, 'keydown', _this.handleKeydown.bind(_this)),
2107
+ _this.renderer.listen(_this.treeListElement, 'mousedown', _this.focusTreeList.bind(_this)),
2108
+ _this.renderer.listen(_this.treeListElement, 'focusin', _this.handleTreeListFocusIn.bind(_this)),
2109
+ _this.renderer.listen(_this.timelineElement, 'mousedown', _this.handleTimelineMousedown.bind(_this)),
2110
+ _this.renderer.listen(_this.timelineElement, 'focusin', _this.handleTimelineFocusIn.bind(_this)),
2111
+ _this.renderer.listen(_this.timelineElement, 'focusout', _this.handleTimelineFocusOut.bind(_this))
2112
+ ];
2113
+ });
2114
+ };
2115
+ NavigationService.prototype.ngOnDestroy = function () {
2116
+ if (isPresent(this.eventListenerDisposers)) {
2117
+ this.eventListenerDisposers.forEach(function (removeListener) { return removeListener(); });
2118
+ this.eventListenerDisposers = null;
1448
2119
  }
2120
+ this.gantt = null;
2121
+ this.host = null;
2122
+ this.treeListElement = null;
2123
+ this.timelineElement = null;
1449
2124
  };
1450
- EditService.prototype.getCreatedDependencies = function () {
1451
- var _this = this;
1452
- return this.dependencies.filter(function (item) { return _this.mapper.extractFromDependency(item, 'id') === null; });
2125
+ /**
2126
+ * Focuses either the last active TreeList cell, or the last active Timeline task,
2127
+ * dependening on which of the two last held focus.
2128
+ *
2129
+ * Focuses the first TreeList cell by default.
2130
+ */
2131
+ NavigationService.prototype.focusLastActiveItem = function () {
2132
+ if (this.gantt.data.length === 0 || (!this.treeListLastActive && !this.timelineLastActive)) {
2133
+ this.focusCell(0, 0);
2134
+ }
2135
+ else if (this.treeListLastActive) {
2136
+ var _a = this.activeTreeListCell, rowIndex = _a.rowIndex, colIndex = _a.colIndex;
2137
+ this.gantt.treeList.focusCell(rowIndex, colIndex);
2138
+ }
2139
+ else if (this.timelineLastActive) {
2140
+ this.focusTask(this.activeTimelineIndex);
2141
+ }
1453
2142
  };
1454
- EditService.prototype.deleteDependency = function (item) {
1455
- var updatedIndex = this.itemIndex(item, this.updatedItems);
1456
- if (updatedIndex !== -1) {
1457
- this.updatedItems.splice(updatedIndex, 1);
2143
+ /**
2144
+ * Focuses the targeted TreeList cell regardless of the last peresisted target.
2145
+ */
2146
+ NavigationService.prototype.focusCell = function (rowIndex, colIndex) {
2147
+ this.activeTreeListCell = { rowIndex: rowIndex, colIndex: colIndex };
2148
+ this.activeTimelineIndex = rowIndex - this.treeListHeaderRowsCount;
2149
+ this.gantt.treeList.focusCell(this.activeTreeListCell.rowIndex, this.activeTreeListCell.colIndex);
2150
+ };
2151
+ /**
2152
+ * Focuses the targeted Timeline task regardless of the last peresisted target.
2153
+ */
2154
+ NavigationService.prototype.focusTask = function (index) {
2155
+ this.activeTimelineIndex = index;
2156
+ this.isTimelineFocused = true;
2157
+ this.activeTreeListCell = {
2158
+ rowIndex: index + this.treeListHeaderRowsCount,
2159
+ colIndex: this.activeTreeListCell.colIndex
2160
+ };
2161
+ this.notifyTaskStatusChange();
2162
+ };
2163
+ /**
2164
+ * Updates the focus target flags and notifies the active task to update its focused state.
2165
+ */
2166
+ NavigationService.prototype.handleTimelineFocusIn = function (_a) {
2167
+ var target = _a.target;
2168
+ this.treeListLastActive = false;
2169
+ this.timelineLastActive = true;
2170
+ this.isTimelineFocused = true;
2171
+ if (isTask(target, this.timelineElement)) {
2172
+ this.notifyTaskStatusChange();
1458
2173
  }
1459
- if (!this.isNew(item)) {
1460
- this.deletedItems.push(item);
2174
+ };
2175
+ /**
2176
+ * Updates the timeline focus state flag and notifies the active task to update its focused state.
2177
+ */
2178
+ NavigationService.prototype.handleTimelineFocusOut = function (_a) {
2179
+ var relatedTarget = _a.relatedTarget;
2180
+ this.isTimelineFocused = this.timelineElement.contains(relatedTarget);
2181
+ // update the task element only if the new focus target is not in the Timeline - focus change between tasks is handled in the focusin handler
2182
+ if (!isTask(relatedTarget, this.timelineElement)) {
2183
+ this.notifyTaskStatusChange();
1461
2184
  }
1462
2185
  };
1463
- EditService.prototype.loadTasks = function (initialValues, isInitializer) {
2186
+ /**
2187
+ * Updates the focus target flags and corrects the TreeList focus target if needed.
2188
+ * As the TreeList will keep its last focused cell with tabindex="0",
2189
+ * this methods forcefully focuses the correct cell,
2190
+ * when navigating in the Timeline has updated the expected TreeList focus target.
2191
+ */
2192
+ NavigationService.prototype.handleTreeListFocusIn = function (event) {
2193
+ this.treeListLastActive = true;
2194
+ this.timelineLastActive = false;
2195
+ // if the previous focus target was in the TreeList, rely on its component navigation and just record the focused item index
2196
+ if (this.treeListElement.contains(event.relatedTarget)) {
2197
+ var _a = this.gantt.treeList.activeCell, colIndex = _a.colIndex, rowIndex = _a.rowIndex;
2198
+ this.activeTreeListCell = { colIndex: colIndex, rowIndex: rowIndex };
2199
+ }
2200
+ else {
2201
+ // if the previous focus target was outside the TreeList, ensure the expected focus coords are used
2202
+ var _b = this.activeTreeListCell, rowIndex = _b.rowIndex, colIndex = _b.colIndex;
2203
+ this.gantt.treeList.focusCell(rowIndex, colIndex); // activates the target cell even if it has tabindex="-1"
2204
+ }
2205
+ this.activeTimelineIndex = this.gantt.treeList.activeCell.dataRowIndex;
2206
+ this.notifyTaskStatusChange();
2207
+ if (this.gantt.treeList.activeCell.dataRowIndex >= 0) {
2208
+ this.scrollHorizontallyToTask(this.activeTimelineIndex);
2209
+ this.scrollSyncService.syncScrollTop('treelist', 'timeline');
2210
+ }
2211
+ };
2212
+ NavigationService.prototype.handleKeydown = function (event) {
1464
2213
  var _this = this;
1465
- if (isInitializer === void 0) { isInitializer = true; }
1466
- return forkJoin(initialValues.map(function (v) { return _this.getElementById(v); })).pipe(map(function (value) {
1467
- return value.reduce(function (acc, item) { return acc = acc.concat(normalizeGanttData(item)); }, []);
1468
- }), expand(function (values) {
1469
- if (values.some(function (el) { return _this.hasChildren(el); })) {
1470
- return _this.loadTasks(values, false);
2214
+ var _a = event, keyCode = _a.keyCode, target = _a.target, altKey = _a.altKey;
2215
+ var isTimelineActive = this.timelineElement.contains(target);
2216
+ if (isTimelineActive) {
2217
+ if (isArrowUpDownKey(keyCode)) {
2218
+ var direction = keyCode === Keys.ArrowUp ? -1 : 1;
2219
+ this.activeTimelineIndex = this.activeTimelineIndex + direction;
2220
+ this.activeTreeListCell = {
2221
+ rowIndex: this.activeTimelineIndex + this.treeListHeaderRowsCount,
2222
+ colIndex: this.activeTreeListCell.colIndex
2223
+ };
1471
2224
  }
1472
- return EMPTY;
1473
- }), reduce(function (acc, values) { return acc.concat(values); }, isInitializer ? initialValues.slice() : []));
2225
+ else if (keyCode === Keys.Home) {
2226
+ this.activeTimelineIndex = 0;
2227
+ this.activeTreeListCell = {
2228
+ rowIndex: this.activeTimelineIndex + this.treeListHeaderRowsCount,
2229
+ colIndex: this.activeTreeListCell.colIndex
2230
+ };
2231
+ }
2232
+ else if (keyCode === Keys.End) {
2233
+ var lastAvailableIndex = this.gantt.treeList.view.data.length - 1;
2234
+ this.activeTimelineIndex = lastAvailableIndex;
2235
+ this.activeTreeListCell = {
2236
+ rowIndex: this.activeTimelineIndex + this.treeListHeaderRowsCount,
2237
+ colIndex: this.activeTreeListCell.colIndex
2238
+ };
2239
+ }
2240
+ if (isNavigationKey(keyCode)) {
2241
+ this.scrollHorizontallyToTask(this.activeTimelineIndex);
2242
+ this.scrollSyncService.syncScrollTop('timeline', 'treelist');
2243
+ this.notifyTaskStatusChange();
2244
+ event.preventDefault();
2245
+ }
2246
+ if (keyCode === Keys.Space && hasObservers(this.gantt.selectionChange)) {
2247
+ var task_1 = this.gantt.renderedTreeListItems[this.activeTimelineIndex];
2248
+ var selectionAction_1 = this.gantt.getSelectionAction(event, task_1);
2249
+ if (isPresent(task_1) && !this.gantt.isSameSelection(selectionAction_1, task_1)) {
2250
+ this.zone.run(function () {
2251
+ return _this.gantt.notifySelectionChange(task_1, selectionAction_1);
2252
+ });
2253
+ }
2254
+ event.preventDefault();
2255
+ }
2256
+ if (keyCode === Keys.Enter && hasObservers(this.gantt.taskClick)) {
2257
+ var task_2 = this.gantt.renderedTreeListItems[this.activeTimelineIndex];
2258
+ if (isPresent(task_2)) {
2259
+ this.zone.run(function () {
2260
+ return _this.gantt.notifyTaskClick(event, task_2, _this.activeTimelineIndex);
2261
+ });
2262
+ }
2263
+ event.preventDefault();
2264
+ }
2265
+ if (isExpandCollapseKey(keyCode, altKey)) {
2266
+ var task_3 = this.gantt.renderedTreeListItems[this.activeTimelineIndex];
2267
+ if (isPresent(task_3) && this.gantt.hasChildren(task_3)) {
2268
+ var shouldExpand_1 = keyCode === Keys.ArrowRight;
2269
+ var isExpanded = this.gantt.isExpanded(task_3);
2270
+ var sameState = shouldExpand_1 === isExpanded;
2271
+ if (!sameState) {
2272
+ this.zone.run(function () {
2273
+ var expandEvent = { dataItem: task_3 };
2274
+ // order is not arbitrary
2275
+ // the TreeList emits the individual events first, then the combined `expandStateChange` event
2276
+ var individualEmitter = shouldExpand_1 ? _this.gantt.rowExpand : _this.gantt.rowCollapse;
2277
+ individualEmitter.emit(expandEvent);
2278
+ _this.gantt.expandStateChange.emit(__assign({}, expandEvent, { expand: shouldExpand_1 }));
2279
+ _this.gantt.updateView();
2280
+ _this.scrollHorizontallyToTask(_this.activeTimelineIndex);
2281
+ });
2282
+ }
2283
+ }
2284
+ event.preventDefault();
2285
+ }
2286
+ }
2287
+ var isTreeListActive = this.treeListElement.contains(target);
2288
+ if (keyCode === Keys.Delete && (isTimelineActive || isTreeListActive) && hasObservers(this.gantt.taskDelete)) {
2289
+ var taskIndex = isTreeListActive ?
2290
+ this.gantt.treeList.activeCell.dataRowIndex :
2291
+ this.activeTimelineIndex;
2292
+ var task_4 = this.gantt.renderedTreeListItems[taskIndex];
2293
+ if (isPresent(task_4)) {
2294
+ this.zone.run(function () {
2295
+ return _this.gantt.notifyTaskDelete(task_4);
2296
+ });
2297
+ }
2298
+ }
2299
+ if (isViewDigitKey(keyCode) && !isToolbar(target, this.host) && !this.gantt.isInEditMode) {
2300
+ var targetViewIndex = getIndexFromViewDigitKeyCode(keyCode);
2301
+ var availableViews = this.gantt.views.toArray();
2302
+ var targetView_1 = availableViews[targetViewIndex];
2303
+ if (isPresent(targetView_1) && targetView_1.type !== this.gantt.activeView) {
2304
+ this.zone.run(function () {
2305
+ return _this.gantt.changeActiveView(targetView_1.type);
2306
+ });
2307
+ }
2308
+ }
1474
2309
  };
1475
- EditService.prototype.getElementById = function (item) {
1476
- var children = this.fetchChildren(item);
1477
- if (isObservable(children)) {
1478
- return children;
2310
+ /**
2311
+ * Filters for task mousedown in the Timeline.
2312
+ */
2313
+ NavigationService.prototype.handleTimelineMousedown = function (_a) {
2314
+ var target = _a.target;
2315
+ if (isTask(target, this.host) && !isClearButton(target, this.host)) {
2316
+ var taskIndex = getClosestTaskIndex(target, this.host);
2317
+ this.focusTask(taskIndex);
1479
2318
  }
1480
- return of(children);
1481
2319
  };
1482
- EditService.prototype.isNew = function (item) {
1483
- return !isPresent(this.mapper.extractFromDependency(item, 'id'));
2320
+ /**
2321
+ * Scrolls horizontally to the beginning of the target task if the beginning of its content is not in the viewport.
2322
+ */
2323
+ NavigationService.prototype.scrollHorizontallyToTask = function (index) {
2324
+ var task = this.timelineElement.querySelectorAll('.k-task-wrap').item(index);
2325
+ if (!isPresent(task)) {
2326
+ return;
2327
+ }
2328
+ // scroll horizontally to the item if less than 200px from the beginning of its content are visible
2329
+ var targetVisibleWidth = 200;
2330
+ var isScrollBeforeTask = (this.timelineElement.clientWidth + this.timelineElement.scrollLeft) < (task.offsetLeft + targetVisibleWidth);
2331
+ var isScrollAfterTask = this.timelineElement.scrollLeft > task.offsetLeft;
2332
+ if (isScrollBeforeTask || isScrollAfterTask) {
2333
+ this.timelineElement.scrollLeft = task.offsetLeft;
2334
+ }
1484
2335
  };
1485
- EditService = __decorate([
2336
+ /**
2337
+ * Focus the TreeList on TreeList mousedown.
2338
+ * A nasty hack to trick `handleTreeListFocusIn` into regarding the previous focus target as again the TreeList.
2339
+ * Otherwise cell clicks are wrongly overwritten in `handleTreeListFocusIn` and the click focus target is not respected.
2340
+ */
2341
+ NavigationService.prototype.focusTreeList = function () {
2342
+ this.gantt.treeList.focus();
2343
+ };
2344
+ /**
2345
+ * Fires the `taskStatusChanges` event with active and focused status retrieved from
2346
+ * `this.activeTimelineIndex` and `this.isTimelineFocused`.
2347
+ */
2348
+ NavigationService.prototype.notifyTaskStatusChange = function () {
2349
+ this.taskStatusChanges.next(this.activeTask);
2350
+ };
2351
+ NavigationService = __decorate([
1486
2352
  Injectable(),
1487
- __metadata("design:paramtypes", [MappingService])
1488
- ], EditService);
1489
- return EditService;
2353
+ __metadata("design:paramtypes", [NgZone,
2354
+ Renderer2,
2355
+ ScrollSyncService])
2356
+ ], NavigationService);
2357
+ return NavigationService;
1490
2358
  }());
1491
2359
 
1492
2360
  /**
@@ -1797,27 +2665,14 @@ var mapPath = function (item) { return ({
1797
2665
  parent: item.parent.data ? mapPath(item.parent) : null
1798
2666
  }); };
1799
2667
 
1800
- /**
1801
- * @hidden
1802
- *
1803
- * Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
1804
- */
1805
- var GanttLocalizationService = /** @class */ (function () {
1806
- function GanttLocalizationService(localizationService) {
1807
- this.localizationService = localizationService;
1808
- }
1809
- GanttLocalizationService.prototype.get = function (token) {
1810
- return this.localizationService.get(token);
1811
- };
1812
- GanttLocalizationService = __decorate([
1813
- Injectable(),
1814
- __metadata("design:paramtypes", [LocalizationService])
1815
- ], GanttLocalizationService);
1816
- return GanttLocalizationService;
1817
- }());
1818
-
1819
2668
  var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
1820
2669
  var DEFAULT_VIEW = 'week';
2670
+ var DEFAULT_DRAG_SCROLL_SETTINGS = {
2671
+ enabled: true,
2672
+ step: 3,
2673
+ interval: 1,
2674
+ threshold: 10
2675
+ };
1821
2676
  /**
1822
2677
  * Represents the Kendo UI Gantt component for Angular.
1823
2678
  *
@@ -1890,7 +2745,7 @@ var DEFAULT_VIEW = 'week';
1890
2745
  * ```
1891
2746
  */
1892
2747
  var GanttComponent = /** @class */ (function () {
1893
- function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
2748
+ function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone, navigationService) {
1894
2749
  var _this = this;
1895
2750
  this.timelineViewService = timelineViewService;
1896
2751
  this.scrollSyncService = scrollSyncService;
@@ -1902,13 +2757,33 @@ var GanttComponent = /** @class */ (function () {
1902
2757
  this.localizationService = localizationService;
1903
2758
  this.hostElement = hostElement;
1904
2759
  this.zone = zone;
2760
+ this.navigationService = navigationService;
2761
+ /**
2762
+ * @hidden
2763
+ */
2764
+ this.roleDescription = 'Gantt Chart';
2765
+ /**
2766
+ * @hidden
2767
+ */
2768
+ this.role = 'application';
1905
2769
  this.hostClasses = true;
1906
2770
  /**
1907
- * Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
2771
+ * Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
1908
2772
  *
1909
2773
  * > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
1910
2774
  */
1911
2775
  this.isSelected = isSelected;
2776
+ /**
2777
+ * Specifies a callback that determines if a new dependency is valid.
2778
+ * Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
2779
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
2780
+ *
2781
+ * By defalut, dependencies are deemed invalid when:
2782
+ * - The two tasks are in a parent-child relationship.
2783
+ * - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
2784
+ * - The start or end times of the two tasks are incompatible with the attempted dependency type.
2785
+ */
2786
+ this.validateNewDependency = this.defaultValidateNewDependencyCallback.bind(this);
1912
2787
  /**
1913
2788
  * Fires when the Gantt selection is changed through user interaction.
1914
2789
  *
@@ -1962,6 +2837,12 @@ var GanttComponent = /** @class */ (function () {
1962
2837
  * The end of the work week (index based).
1963
2838
  */
1964
2839
  this.workWeekEnd = 5;
2840
+ /**
2841
+ * If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
2842
+ * By default, navigation is disabled for the TreeList and Timeline parts of the component,
2843
+ * ([see example]({% slug keyboard_navigation_gantt %})).
2844
+ */
2845
+ this.navigable = false;
1965
2846
  /**
1966
2847
  * Indicates whether the Gantt columns will be resized during initialization so that they fit their headers and row content.
1967
2848
  * Columns with autoSize set to false are excluded.
@@ -2005,7 +2886,8 @@ var GanttComponent = /** @class */ (function () {
2005
2886
  */
2006
2887
  this.cellClose = new EventEmitter();
2007
2888
  /**
2008
- * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
2889
+ * Fires when the end user clicks the `Delete` button in the task editing dialog,
2890
+ * the task delete icon, or presses the `Delete` key on the keyboard when a task in the timeline is focused.
2009
2891
  * Use the event handler to open a confirmation dialog when necessary.
2010
2892
  */
2011
2893
  this.taskDelete = new EventEmitter();
@@ -2029,6 +2911,11 @@ var GanttComponent = /** @class */ (function () {
2029
2911
  * Fires when the user adds a task.
2030
2912
  */
2031
2913
  this.taskAdd = new EventEmitter();
2914
+ /**
2915
+ * Fires when the user adds a dependency via dragging
2916
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
2917
+ */
2918
+ this.dependencyAdd = new EventEmitter();
2032
2919
  /**
2033
2920
  * Fires when the sorting of the Gantt is changed.
2034
2921
  * You have to handle the event yourself and sort the data.
@@ -2085,6 +2972,15 @@ var GanttComponent = /** @class */ (function () {
2085
2972
  * Fires when a task is clicked.
2086
2973
  */
2087
2974
  this.taskClick = new EventEmitter();
2975
+ /**
2976
+ * @hidden
2977
+ *
2978
+ * Specifies whether the dependency drag clues will be rendered.
2979
+ * Set internally by the dependency-drag-create directive.
2980
+ *
2981
+ * @default false
2982
+ */
2983
+ this.renderDependencyDragClues = false;
2088
2984
  /**
2089
2985
  * @hidden
2090
2986
  *
@@ -2101,6 +2997,7 @@ var GanttComponent = /** @class */ (function () {
2101
2997
  this.showConfirmationDialog = false;
2102
2998
  this._columns = new QueryList();
2103
2999
  this._data = [];
3000
+ this._dragScrollSettings = __assign({}, DEFAULT_DRAG_SCROLL_SETTINGS);
2104
3001
  this._timelinePaneOptions = __assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
2105
3002
  this._treeListPaneOptions = __assign({}, DEFAULT_TREELIST_PANE_SETTINGS);
2106
3003
  this._rowClass = rowClassCallback;
@@ -2125,7 +3022,13 @@ var GanttComponent = /** @class */ (function () {
2125
3022
  }));
2126
3023
  this.editService.getSelectedItem = this.getFirstSelectedItem.bind(this);
2127
3024
  this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(function (show) { return _this.showEditingDialog = show; }));
2128
- this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(function () { return _this.taskDelete.emit(); }));
3025
+ this.editServiceSubscription.add(this.editService.taskDelete.subscribe(function (task) {
3026
+ if (hasObservers(_this.taskDelete)) {
3027
+ _this.zone.run(function () {
3028
+ return _this.notifyTaskDelete(task);
3029
+ });
3030
+ }
3031
+ }));
2129
3032
  this.editServiceSubscription.add(this.editService.editEvent.subscribe(function (args) {
2130
3033
  _this[args.editResultType].emit({
2131
3034
  taskFormGroup: args.taskFormGroup,
@@ -2136,6 +3039,9 @@ var GanttComponent = /** @class */ (function () {
2136
3039
  _this.showConfirmationDialog = _this.showEditingDialog = false;
2137
3040
  _this.editService.dataItem = _this.editService.taskFormGroup = null;
2138
3041
  _this.updateView();
3042
+ if (_this.navigable) {
3043
+ _this.focus();
3044
+ }
2139
3045
  }));
2140
3046
  this.editServiceSubscription.add(this.editService.addEvent.subscribe(function (args) {
2141
3047
  var selectedItem = _this.getFirstSelectedItem();
@@ -2165,6 +3071,20 @@ var GanttComponent = /** @class */ (function () {
2165
3071
  enumerable: true,
2166
3072
  configurable: true
2167
3073
  });
3074
+ Object.defineProperty(GanttComponent.prototype, "hostRoleDescriptionAttr", {
3075
+ get: function () {
3076
+ return this.roleDescription;
3077
+ },
3078
+ enumerable: true,
3079
+ configurable: true
3080
+ });
3081
+ Object.defineProperty(GanttComponent.prototype, "hostRoleAttr", {
3082
+ get: function () {
3083
+ return this.role;
3084
+ },
3085
+ enumerable: true,
3086
+ configurable: true
3087
+ });
2168
3088
  Object.defineProperty(GanttComponent.prototype, "dir", {
2169
3089
  get: function () {
2170
3090
  return this.direction;
@@ -2379,6 +3299,21 @@ var GanttComponent = /** @class */ (function () {
2379
3299
  enumerable: true,
2380
3300
  configurable: true
2381
3301
  });
3302
+ Object.defineProperty(GanttComponent.prototype, "dragScrollSettings", {
3303
+ get: function () {
3304
+ return this._dragScrollSettings;
3305
+ },
3306
+ /**
3307
+ * Specifies the settings for auto-scrolling during dragging
3308
+ * when the pointer moves outside of the container bounderies
3309
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-auto-scrolling).
3310
+ */
3311
+ set: function (settings) {
3312
+ this._dragScrollSettings = __assign({}, DEFAULT_DRAG_SCROLL_SETTINGS, settings);
3313
+ },
3314
+ enumerable: true,
3315
+ configurable: true
3316
+ });
2382
3317
  Object.defineProperty(GanttComponent.prototype, "renderedTreeListItems", {
2383
3318
  /**
2384
3319
  * @hidden
@@ -2392,6 +3327,19 @@ var GanttComponent = /** @class */ (function () {
2392
3327
  enumerable: true,
2393
3328
  configurable: true
2394
3329
  });
3330
+ Object.defineProperty(GanttComponent.prototype, "viewItems", {
3331
+ /**
3332
+ * @hidden
3333
+ */
3334
+ get: function () {
3335
+ if (!isPresent(this.treeList)) {
3336
+ return [];
3337
+ }
3338
+ return this.treeList.view.data;
3339
+ },
3340
+ enumerable: true,
3341
+ configurable: true
3342
+ });
2395
3343
  Object.defineProperty(GanttComponent.prototype, "filterMenu", {
2396
3344
  /**
2397
3345
  * @hidden
@@ -2455,6 +3403,16 @@ var GanttComponent = /** @class */ (function () {
2455
3403
  enumerable: true,
2456
3404
  configurable: true
2457
3405
  });
3406
+ Object.defineProperty(GanttComponent.prototype, "isInEditMode", {
3407
+ /**
3408
+ * @hidden
3409
+ */
3410
+ get: function () {
3411
+ return this.showEditingDialog || this.showConfirmationDialog || this.treeList.isEditing();
3412
+ },
3413
+ enumerable: true,
3414
+ configurable: true
3415
+ });
2458
3416
  GanttComponent.prototype.ngOnChanges = function (changes) {
2459
3417
  if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
2460
3418
  this.loadTimelineData();
@@ -2462,6 +3420,14 @@ var GanttComponent = /** @class */ (function () {
2462
3420
  };
2463
3421
  GanttComponent.prototype.ngAfterViewInit = function () {
2464
3422
  this.updateTreeListMargin();
3423
+ if (this.navigable) {
3424
+ this.navigationService.initialize({
3425
+ gantt: this,
3426
+ host: this.hostElement.nativeElement,
3427
+ treeListElement: this.treeList.wrapper.nativeElement,
3428
+ timelineElement: this.timeline.timelineContent.nativeElement
3429
+ });
3430
+ }
2465
3431
  var leftContainer = this.treeList.wrapper.nativeElement.querySelector('kendo-treelist-list > div');
2466
3432
  this.scrollSyncService.registerElement(leftContainer, 'treelist');
2467
3433
  };
@@ -2479,6 +3445,34 @@ var GanttComponent = /** @class */ (function () {
2479
3445
  this.localizationSubscription.unsubscribe();
2480
3446
  }
2481
3447
  };
3448
+ /**
3449
+ * Focuses the last active cell or task in the Gantt.
3450
+ * If no item has previously been focused, the first cell of the TreeList part will receive focus,
3451
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
3452
+ */
3453
+ GanttComponent.prototype.focus = function () {
3454
+ if (this.navigable) {
3455
+ this.navigationService.focusLastActiveItem();
3456
+ }
3457
+ };
3458
+ /**
3459
+ * Focuses the targeted cell in the TreeList part of the component,
3460
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
3461
+ */
3462
+ GanttComponent.prototype.focusCell = function (rowIndex, colIndex) {
3463
+ if (this.navigable) {
3464
+ this.navigationService.focusCell(rowIndex, colIndex);
3465
+ }
3466
+ };
3467
+ /**
3468
+ * Focuses the targeted task in the Timeline part of the component,
3469
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
3470
+ */
3471
+ GanttComponent.prototype.focusTask = function (taskIndex) {
3472
+ if (this.navigable) {
3473
+ this.navigationService.focusTask(taskIndex);
3474
+ }
3475
+ };
2482
3476
  /**
2483
3477
  * Applies the minimum possible width for the specified column,
2484
3478
  * so that the whole text fits without wrapping. This method expects the Gantt
@@ -2568,6 +3562,15 @@ var GanttComponent = /** @class */ (function () {
2568
3562
  GanttComponent.prototype.openConfirmationDialog = function () {
2569
3563
  this.showConfirmationDialog = true;
2570
3564
  };
3565
+ /**
3566
+ * @hidden
3567
+ */
3568
+ GanttComponent.prototype.handleConfirmationDialogClose = function () {
3569
+ this.showConfirmationDialog = false;
3570
+ if (this.navigable) {
3571
+ this.focus();
3572
+ }
3573
+ };
2571
3574
  /**
2572
3575
  * Opens a cell for editing.
2573
3576
  */
@@ -2653,7 +3656,7 @@ var GanttComponent = /** @class */ (function () {
2653
3656
  if (hasObservers(this.taskClick)) {
2654
3657
  var taskIndex_1 = getClosestTaskIndex(target, gantt);
2655
3658
  var task_1 = this.renderedTreeListItems[taskIndex_1];
2656
- this.zone.run(function () { return _this.emitTaskClick(event, task_1, taskIndex_1); });
3659
+ this.zone.run(function () { return _this.notifyTaskClick(event, task_1, taskIndex_1); });
2657
3660
  }
2658
3661
  };
2659
3662
  /**
@@ -2672,8 +3675,8 @@ var GanttComponent = /** @class */ (function () {
2672
3675
  if ((hasObservers(this.selectionChange) && !this.isSameSelection(selectionAction, task)) ||
2673
3676
  hasObservers(this.taskClick)) {
2674
3677
  this.zone.run(function () {
2675
- _this.emitSelectionChange(task, selectionAction);
2676
- _this.emitTaskClick(event, task, taskIndex);
3678
+ _this.notifySelectionChange(task, selectionAction);
3679
+ _this.notifyTaskClick(event, task, taskIndex);
2677
3680
  });
2678
3681
  }
2679
3682
  };
@@ -2711,7 +3714,7 @@ var GanttComponent = /** @class */ (function () {
2711
3714
  }
2712
3715
  var task = event.items.map(function (item) { return item.dataItem; })[0]; // single selection only currently available
2713
3716
  var action = event.action;
2714
- this.emitSelectionChange(task, action);
3717
+ this.notifySelectionChange(task, action);
2715
3718
  };
2716
3719
  /**
2717
3720
  * @hidden
@@ -2763,7 +3766,7 @@ var GanttComponent = /** @class */ (function () {
2763
3766
  dataItem: task_2,
2764
3767
  originalEvent: event,
2765
3768
  sender: _this,
2766
- rowIndex: taskIndex_2,
3769
+ index: taskIndex_2,
2767
3770
  type: 'dblclick'
2768
3771
  }); });
2769
3772
  }
@@ -2774,16 +3777,35 @@ var GanttComponent = /** @class */ (function () {
2774
3777
  GanttComponent.prototype.getText = function (token) {
2775
3778
  return this.localizationService.get(token);
2776
3779
  };
2777
- GanttComponent.prototype.emitTaskClick = function (event, dataItem, itemIndex) {
3780
+ /**
3781
+ * @hidden
3782
+ */
3783
+ GanttComponent.prototype.changeActiveView = function (view) {
3784
+ if (view !== this.activeView) {
3785
+ this.activeView = view;
3786
+ this.loadTimelineData();
3787
+ this.scrollSyncService.resetTimelineScrollLeft();
3788
+ this.activeViewChange.emit(view);
3789
+ }
3790
+ };
3791
+ /**
3792
+ * @hidden
3793
+ */
3794
+ GanttComponent.prototype.notifyTaskClick = function (event, dataItem, itemIndex) {
3795
+ // simulates the TreeList `cellClick` event triggered by enter press (type: 'click')
3796
+ var type = event instanceof KeyboardEvent ? 'click' : event.type;
2778
3797
  this.taskClick.emit({
2779
3798
  originalEvent: event,
2780
3799
  dataItem: dataItem,
2781
- rowIndex: itemIndex,
2782
- type: event.type,
3800
+ index: itemIndex,
3801
+ type: type,
2783
3802
  sender: this
2784
3803
  });
2785
3804
  };
2786
- GanttComponent.prototype.emitSelectionChange = function (dataItem, action) {
3805
+ /**
3806
+ * @hidden
3807
+ */
3808
+ GanttComponent.prototype.notifySelectionChange = function (dataItem, action) {
2787
3809
  if (this.isSameSelection(action, dataItem)) {
2788
3810
  return;
2789
3811
  }
@@ -2794,6 +3816,30 @@ var GanttComponent = /** @class */ (function () {
2794
3816
  });
2795
3817
  this.treeList.updateView();
2796
3818
  };
3819
+ /**
3820
+ * @hidden
3821
+ */
3822
+ GanttComponent.prototype.notifyTaskDelete = function (task) {
3823
+ this.editService.dataItem = task;
3824
+ this.taskDelete.emit({
3825
+ item: getEditItem(task, this.treeList.view.data, this.mapper),
3826
+ sender: this
3827
+ });
3828
+ };
3829
+ /**
3830
+ * @hidden
3831
+ */
3832
+ GanttComponent.prototype.isSameSelection = function (action, dataItem) {
3833
+ return action === 'select' && this.isSelected(dataItem);
3834
+ };
3835
+ /**
3836
+ * @hidden
3837
+ */
3838
+ GanttComponent.prototype.getSelectionAction = function (_a, dataItem) {
3839
+ var ctrlKey = _a.ctrlKey, metaKey = _a.metaKey;
3840
+ var shouldToggleSelection = ctrlKey || metaKey;
3841
+ return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
3842
+ };
2797
3843
  GanttComponent.prototype.updateTreeListGroupClass = function (columns) {
2798
3844
  if (columns === void 0) { columns = this.columns; }
2799
3845
  if (!isPresent(this.treeList)) {
@@ -2824,24 +3870,70 @@ var GanttComponent = /** @class */ (function () {
2824
3870
  }
2825
3871
  return this.views.find(function (view) { return view.type === _this.activeView; });
2826
3872
  };
2827
- GanttComponent.prototype.isSameSelection = function (action, dataItem) {
2828
- return action === 'select' && this.isSelected(dataItem);
2829
- };
2830
- GanttComponent.prototype.getSelectionAction = function (_a, dataItem) {
2831
- var ctrlKey = _a.ctrlKey, metaKey = _a.metaKey;
2832
- var shouldToggleSelection = ctrlKey || metaKey;
2833
- return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
2834
- };
2835
3873
  GanttComponent.prototype.getFirstSelectedItem = function () {
2836
3874
  var isSelectedCallback = this.isSelected || isSelected;
2837
3875
  var loadedItems = this.renderedTreeListItems || [];
2838
3876
  return loadedItems.find(isSelectedCallback);
2839
3877
  };
3878
+ GanttComponent.prototype.defaultValidateNewDependencyCallback = function (dependency) {
3879
+ var _this = this;
3880
+ var fromTaskId = this.mapper.extractFromDependency(dependency, 'fromId');
3881
+ var toTaskId = this.mapper.extractFromDependency(dependency, 'toId');
3882
+ var fromTask = this.treeList.view.data.find(function (task) {
3883
+ return _this.mapper.extractFromTask(task.data, 'id') === fromTaskId;
3884
+ });
3885
+ var toTask = this.treeList.view.data.find(function (task) {
3886
+ return _this.mapper.extractFromTask(task.data, 'id') === toTaskId;
3887
+ });
3888
+ // mark as invalid if the attempted dependency is lacking valid from- and to-tasks
3889
+ // or when the from- and to-tasks are actually the same task
3890
+ if (!isPresent(fromTask) || !isPresent(fromTask.data) ||
3891
+ !isPresent(toTask) || !isPresent(toTask.data) ||
3892
+ fromTask.data === toTask.data) {
3893
+ return false;
3894
+ }
3895
+ var tasksDependentOnOneAnother = this.dependencies.some(function (current) {
3896
+ var currentFromId = _this.mapper.extractFromDependency(current, 'fromId');
3897
+ var currentToId = _this.mapper.extractFromDependency(current, 'toId');
3898
+ return (fromTaskId === currentFromId && toTaskId === currentToId) ||
3899
+ (toTaskId === currentFromId && fromTaskId === currentToId);
3900
+ });
3901
+ // mark as invalid if the attempted dependency is trying to connect already dependent tasks
3902
+ // mark as invalid if the two tasks are in parent-child relationship
3903
+ if (tasksDependentOnOneAnother || areParentChild(fromTask, toTask)) {
3904
+ return false;
3905
+ }
3906
+ var fromTaskStart = this.mapper.extractFromTask(fromTask.data, 'start');
3907
+ var fromTaskEnd = this.mapper.extractFromTask(fromTask.data, 'end');
3908
+ var toTaskStart = this.mapper.extractFromTask(toTask.data, 'start');
3909
+ var toTaskEnd = this.mapper.extractFromTask(toTask.data, 'end');
3910
+ // if the two tasks are available to be connected via a dependency,
3911
+ // check if their start and end time allow for the attempted dependency type
3912
+ switch (this.mapper.extractFromDependency(dependency, 'type')) {
3913
+ // finish to finish (FF) — the from-task ends before the to-task can end
3914
+ case DependencyType.FF:
3915
+ return fromTaskEnd <= toTaskEnd;
3916
+ // finish to start (FS) — the from-task ends before the to-task can begin
3917
+ case DependencyType.FS:
3918
+ return fromTaskEnd <= toTaskStart;
3919
+ // start to finish (SF) — the from-task begins before the to-task can end
3920
+ case DependencyType.SF:
3921
+ return fromTaskStart <= toTaskEnd;
3922
+ // start to start (SS) — the from-task begins before the to-task can begin
3923
+ case DependencyType.SS:
3924
+ return fromTaskStart <= toTaskStart;
3925
+ default: return false;
3926
+ }
3927
+ };
2840
3928
  var GanttComponent_1;
2841
3929
  __decorate([
2842
3930
  ViewChild(TreeListComponent, { static: true }),
2843
3931
  __metadata("design:type", TreeListComponent)
2844
3932
  ], GanttComponent.prototype, "treeList", void 0);
3933
+ __decorate([
3934
+ ViewChild(GanttTimelineComponent, { static: false }),
3935
+ __metadata("design:type", GanttTimelineComponent)
3936
+ ], GanttComponent.prototype, "timeline", void 0);
2845
3937
  __decorate([
2846
3938
  ContentChild(GanttTaskContentTemplateDirective, { static: true }),
2847
3939
  __metadata("design:type", GanttTaskContentTemplateDirective)
@@ -2855,9 +3947,27 @@ var GanttComponent = /** @class */ (function () {
2855
3947
  __metadata("design:type", GanttSummaryTaskTemplateDirective)
2856
3948
  ], GanttComponent.prototype, "summaryTaskTemplate", void 0);
2857
3949
  __decorate([
2858
- ContentChildren(ToolbarTemplateDirective),
2859
- __metadata("design:type", QueryList)
2860
- ], GanttComponent.prototype, "toolbarTemplateChildren", void 0);
3950
+ ContentChildren(ToolbarTemplateDirective),
3951
+ __metadata("design:type", QueryList)
3952
+ ], GanttComponent.prototype, "toolbarTemplateChildren", void 0);
3953
+ __decorate([
3954
+ Input('aria-roledescription'),
3955
+ __metadata("design:type", String)
3956
+ ], GanttComponent.prototype, "roleDescription", void 0);
3957
+ __decorate([
3958
+ HostBinding('attr.aria-roledescription'),
3959
+ __metadata("design:type", String),
3960
+ __metadata("design:paramtypes", [])
3961
+ ], GanttComponent.prototype, "hostRoleDescriptionAttr", null);
3962
+ __decorate([
3963
+ Input('role'),
3964
+ __metadata("design:type", String)
3965
+ ], GanttComponent.prototype, "role", void 0);
3966
+ __decorate([
3967
+ HostBinding('attr.role'),
3968
+ __metadata("design:type", String),
3969
+ __metadata("design:paramtypes", [])
3970
+ ], GanttComponent.prototype, "hostRoleAttr", null);
2861
3971
  __decorate([
2862
3972
  HostBinding('class.k-gantt'),
2863
3973
  __metadata("design:type", Boolean)
@@ -2900,6 +4010,10 @@ var GanttComponent = /** @class */ (function () {
2900
4010
  Input(),
2901
4011
  __metadata("design:type", Function)
2902
4012
  ], GanttComponent.prototype, "isSelected", void 0);
4013
+ __decorate([
4014
+ Input(),
4015
+ __metadata("design:type", Function)
4016
+ ], GanttComponent.prototype, "validateNewDependency", void 0);
2903
4017
  __decorate([
2904
4018
  Output(),
2905
4019
  __metadata("design:type", EventEmitter)
@@ -2959,6 +4073,10 @@ var GanttComponent = /** @class */ (function () {
2959
4073
  Input(),
2960
4074
  __metadata("design:type", Number)
2961
4075
  ], GanttComponent.prototype, "workWeekEnd", void 0);
4076
+ __decorate([
4077
+ Input(),
4078
+ __metadata("design:type", Boolean)
4079
+ ], GanttComponent.prototype, "navigable", void 0);
2962
4080
  __decorate([
2963
4081
  Input(),
2964
4082
  __metadata("design:type", Object),
@@ -2999,6 +4117,11 @@ var GanttComponent = /** @class */ (function () {
2999
4117
  Input(),
3000
4118
  __metadata("design:type", Boolean)
3001
4119
  ], GanttComponent.prototype, "columnsResizable", void 0);
4120
+ __decorate([
4121
+ Input(),
4122
+ __metadata("design:type", Object),
4123
+ __metadata("design:paramtypes", [Object])
4124
+ ], GanttComponent.prototype, "dragScrollSettings", null);
3002
4125
  __decorate([
3003
4126
  Output(),
3004
4127
  __metadata("design:type", EventEmitter)
@@ -3039,6 +4162,10 @@ var GanttComponent = /** @class */ (function () {
3039
4162
  Output(),
3040
4163
  __metadata("design:type", EventEmitter)
3041
4164
  ], GanttComponent.prototype, "taskAdd", void 0);
4165
+ __decorate([
4166
+ Output(),
4167
+ __metadata("design:type", EventEmitter)
4168
+ ], GanttComponent.prototype, "dependencyAdd", void 0);
3042
4169
  __decorate([
3043
4170
  Output(),
3044
4171
  __metadata("design:type", EventEmitter)
@@ -3114,9 +4241,11 @@ var GanttComponent = /** @class */ (function () {
3114
4241
  DependencyDomService,
3115
4242
  MappingService,
3116
4243
  OptionChangesService,
3117
- EditService
4244
+ EditService,
4245
+ TimelineScrollService,
4246
+ NavigationService
3118
4247
  ],
3119
- template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskEditingGeneralTabTitle=\"kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip\"\n taskEditingGeneralTabTitle=\"General\"\n\n i18n-taskEditingPredecessorsTabTitle=\"kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip\"\n taskEditingPredecessorsTabTitle=\"Predecessors\"\n\n i18n-taskEditingSuccessorsTabTitle=\"kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip\"\n taskEditingSuccessorsTabTitle=\"Successors\"\n\n i18n-taskEditingDependenciesAddButtonText=\"kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesAddButtonText=\"Add\"\n\n i18n-taskEditingDependenciesRemoveButtonText=\"kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesRemoveButtonText=\"Remove\"\n\n i18n-taskEditingDependenciesGridNameColumnTitle=\"kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridNameColumnTitle=\"Task Title\"\n\n i18n-taskEditingDependenciesGridTypeColumnTitle=\"kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridTypeColumnTitle=\"Type\"\n\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-addTaskText=\"kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component\"\n addTaskText=\"Add Task\"\n\n i18n-addChildText=\"kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component\"\n addChildText=\"Add Child\"\n\n i18n-addAboveText=\"kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component\"\n addAboveText=\"Add Above\"\n\n i18n-addBelowText=\"kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component\"\n addBelowText=\"Add Below\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [isSelected]=\"isSelected\"\n [selectable]=\"selectable\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (selectionChange)=\"handleTreeListSelectionChange($event)\"\n (cellClick)=\"handleTreeListCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTreeListDoubleClick\n }\"\n [scope]=\"this\"\n >\n <kendo-treelist-messages\n [noRecords]=\"getText('noRecords')\"\n [filter]=\"getText('filter')\"\n [filterEqOperator]=\"getText('filterEqOperator')\"\n [filterNotEqOperator]=\"getText('filterNotEqOperator')\"\n [filterIsNullOperator]=\"getText('filterIsNullOperator')\"\n [filterIsNotNullOperator]=\"getText('filterIsNotNullOperator')\"\n [filterIsEmptyOperator]=\"getText('filterIsEmptyOperator')\"\n [filterIsNotEmptyOperator]=\"getText('filterIsNotEmptyOperator')\"\n [filterStartsWithOperator]=\"getText('filterStartsWithOperator')\"\n [filterContainsOperator]=\"getText('filterContainsOperator')\"\n [filterNotContainsOperator]=\"getText('filterNotContainsOperator')\"\n [filterEndsWithOperator]=\"getText('filterEndsWithOperator')\"\n [filterGteOperator]=\"getText('filterGteOperator')\"\n [filterGtOperator]=\"getText('filterGtOperator')\"\n [filterLteOperator]=\"getText('filterLteOperator')\"\n [filterLtOperator]=\"getText('filterLtOperator')\"\n [filterIsTrue]=\"getText('filterIsTrue')\"\n [filterIsFalse]=\"getText('filterIsFalse')\"\n [filterBooleanAll]=\"getText('filterBooleanAll')\"\n [filterAfterOrEqualOperator]=\"getText('filterAfterOrEqualOperator')\"\n [filterAfterOperator]=\"getText('filterAfterOperator')\"\n [filterBeforeOperator]=\"getText('filterBeforeOperator')\"\n [filterBeforeOrEqualOperator]=\"getText('filterBeforeOrEqualOperator')\"\n [filterFilterButton]=\"getText('filterFilterButton')\"\n [filterClearButton]=\"getText('filterClearButton')\"\n [filterAndLogic]=\"getText('filterAndLogic')\"\n [filterOrLogic]=\"getText('filterOrLogic')\"\n [loading]=\"getText('loading')\"\n [columnMenu]=\"getText('columnMenu')\"\n [columns]=\"getText('columns')\"\n [sortable]=\"getText('sortable')\"\n [sortAscending]=\"getText('sortAscending')\"\n [sortDescending]=\"getText('sortDescending')\"\n [sortedAscending]=\"getText('sortedAscending')\"\n [sortedDescending]=\"getText('sortedDescending')\"\n [sortedDefault]=\"getText('sortedDefault')\"\n [columnsApply]=\"getText('columnsApply')\"\n [columnsReset]=\"getText('columnsReset')\"\n >\n </kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTimelineClick,\n contextmenu: handleTimelineRightClick,\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n [scope]=\"this\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog\n *ngIf=\"showEditingDialog\"\n [data]=\"data\">\n </kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"showConfirmationDialog = false;\">\n <span>{{ getText('confirmationDialogContent') }}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"showConfirmationDialog = false;\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
4248
+ template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskEditingGeneralTabTitle=\"kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip\"\n taskEditingGeneralTabTitle=\"General\"\n\n i18n-taskEditingPredecessorsTabTitle=\"kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip\"\n taskEditingPredecessorsTabTitle=\"Predecessors\"\n\n i18n-taskEditingSuccessorsTabTitle=\"kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip\"\n taskEditingSuccessorsTabTitle=\"Successors\"\n\n i18n-taskEditingDependenciesAddButtonText=\"kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesAddButtonText=\"Add\"\n\n i18n-taskEditingDependenciesRemoveButtonText=\"kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesRemoveButtonText=\"Remove\"\n\n i18n-taskEditingDependenciesGridNameColumnTitle=\"kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridNameColumnTitle=\"Task Title\"\n\n i18n-taskEditingDependenciesGridTypeColumnTitle=\"kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridTypeColumnTitle=\"Type\"\n\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-addTaskText=\"kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component\"\n addTaskText=\"Add Task\"\n\n i18n-addChildText=\"kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component\"\n addChildText=\"Add Child\"\n\n i18n-addAboveText=\"kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component\"\n addAboveText=\"Add Above\"\n\n i18n-addBelowText=\"kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component\"\n addBelowText=\"Add Below\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [navigable]=\"navigable\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [isSelected]=\"isSelected\"\n [selectable]=\"selectable\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (selectionChange)=\"handleTreeListSelectionChange($event)\"\n (cellClick)=\"handleTreeListCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTreeListDoubleClick\n }\"\n [scope]=\"this\"\n >\n <kendo-treelist-messages\n [noRecords]=\"getText('noRecords')\"\n [filter]=\"getText('filter')\"\n [filterEqOperator]=\"getText('filterEqOperator')\"\n [filterNotEqOperator]=\"getText('filterNotEqOperator')\"\n [filterIsNullOperator]=\"getText('filterIsNullOperator')\"\n [filterIsNotNullOperator]=\"getText('filterIsNotNullOperator')\"\n [filterIsEmptyOperator]=\"getText('filterIsEmptyOperator')\"\n [filterIsNotEmptyOperator]=\"getText('filterIsNotEmptyOperator')\"\n [filterStartsWithOperator]=\"getText('filterStartsWithOperator')\"\n [filterContainsOperator]=\"getText('filterContainsOperator')\"\n [filterNotContainsOperator]=\"getText('filterNotContainsOperator')\"\n [filterEndsWithOperator]=\"getText('filterEndsWithOperator')\"\n [filterGteOperator]=\"getText('filterGteOperator')\"\n [filterGtOperator]=\"getText('filterGtOperator')\"\n [filterLteOperator]=\"getText('filterLteOperator')\"\n [filterLtOperator]=\"getText('filterLtOperator')\"\n [filterIsTrue]=\"getText('filterIsTrue')\"\n [filterIsFalse]=\"getText('filterIsFalse')\"\n [filterBooleanAll]=\"getText('filterBooleanAll')\"\n [filterAfterOrEqualOperator]=\"getText('filterAfterOrEqualOperator')\"\n [filterAfterOperator]=\"getText('filterAfterOperator')\"\n [filterBeforeOperator]=\"getText('filterBeforeOperator')\"\n [filterBeforeOrEqualOperator]=\"getText('filterBeforeOrEqualOperator')\"\n [filterFilterButton]=\"getText('filterFilterButton')\"\n [filterClearButton]=\"getText('filterClearButton')\"\n [filterAndLogic]=\"getText('filterAndLogic')\"\n [filterOrLogic]=\"getText('filterOrLogic')\"\n [loading]=\"getText('loading')\"\n [columnMenu]=\"getText('columnMenu')\"\n [columns]=\"getText('columns')\"\n [sortable]=\"getText('sortable')\"\n [sortAscending]=\"getText('sortAscending')\"\n [sortDescending]=\"getText('sortDescending')\"\n [sortedAscending]=\"getText('sortedAscending')\"\n [sortedDescending]=\"getText('sortedDescending')\"\n [sortedDefault]=\"getText('sortedDefault')\"\n [columnsApply]=\"getText('columnsApply')\"\n [columnsReset]=\"getText('columnsReset')\"\n >\n </kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n [dragScrollSettings]=\"dragScrollSettings\"\n [rows]=\"viewItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [isExpanded]=\"isExpanded\"\n [selectable]=\"selectable\"\n [isTaskSelected]=\"isTaskSelected\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTimelineClick,\n contextmenu: handleTimelineRightClick,\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n [scope]=\"this\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog\n *ngIf=\"showEditingDialog\"\n [data]=\"data\">\n </kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"handleConfirmationDialogClose()\">\n <span>{{ getText('confirmationDialogContent') }}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"handleConfirmationDialogClose()\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
3120
4249
  }),
3121
4250
  __metadata("design:paramtypes", [TimelineViewService,
3122
4251
  ScrollSyncService,
@@ -3127,7 +4256,8 @@ var GanttComponent = /** @class */ (function () {
3127
4256
  EditService,
3128
4257
  LocalizationService,
3129
4258
  ElementRef,
3130
- NgZone])
4259
+ NgZone,
4260
+ NavigationService])
3131
4261
  ], GanttComponent);
3132
4262
  return GanttComponent;
3133
4263
  }());
@@ -3135,120 +4265,7 @@ var GanttComponent = /** @class */ (function () {
3135
4265
  /**
3136
4266
  * @hidden
3137
4267
  */
3138
- var GanttTimelineComponent = /** @class */ (function () {
3139
- function GanttTimelineComponent(scrollSyncService, dependencyDomService, renderer, zone) {
3140
- var _this = this;
3141
- this.scrollSyncService = scrollSyncService;
3142
- this.dependencyDomService = dependencyDomService;
3143
- this.renderer = renderer;
3144
- this.zone = zone;
3145
- this.hostClass = true;
3146
- this.dependencies = [];
3147
- this.subscriptions = new Subscription();
3148
- this.subscriptions.add(
3149
- // task changes indicates change in row content, number, height, etc.
3150
- this.dependencyDomService.taskChanges
3151
- .pipe(filter(function (args) { return isPresent(args.timelineRow); }), switchMap(function (args) { return _this.zone.onStable.pipe(take(1), map(function () { return args; })); }) // ensure the content is rendered
3152
- )
3153
- .subscribe(function (_a) {
3154
- var timelineRow = _a.timelineRow;
3155
- var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
3156
- _this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
3157
- }));
3158
- }
3159
- GanttTimelineComponent.prototype.ngAfterViewInit = function () {
3160
- var timelineHeader = this.timelineHeaderWrap.nativeElement;
3161
- var rightContainer = this.timelineContent.nativeElement;
3162
- this.scrollSyncService.registerElement(rightContainer, 'timeline');
3163
- this.scrollSyncService.registerElement(timelineHeader, 'header');
3164
- this.dependencyDomService.registerContentContainer(this.tasksContainer.nativeElement);
3165
- };
3166
- GanttTimelineComponent.prototype.ngOnDestroy = function () {
3167
- this.subscriptions.unsubscribe();
3168
- };
3169
- GanttTimelineComponent.prototype.isNonWorking = function (item) {
3170
- return item.hasOwnProperty('isWorking') && !item.isWorking;
3171
- };
3172
- __decorate([
3173
- ViewChild('timelineContent', { static: true }),
3174
- __metadata("design:type", ElementRef)
3175
- ], GanttTimelineComponent.prototype, "timelineContent", void 0);
3176
- __decorate([
3177
- ViewChild('timelineColumns', { static: true }),
3178
- __metadata("design:type", ElementRef)
3179
- ], GanttTimelineComponent.prototype, "timelineColumns", void 0);
3180
- __decorate([
3181
- ViewChild('timelineHeaderWrap', { static: true }),
3182
- __metadata("design:type", ElementRef)
3183
- ], GanttTimelineComponent.prototype, "timelineHeaderWrap", void 0);
3184
- __decorate([
3185
- ViewChild('tasksContainer', { static: true }),
3186
- __metadata("design:type", ElementRef)
3187
- ], GanttTimelineComponent.prototype, "tasksContainer", void 0);
3188
- __decorate([
3189
- HostBinding('class.k-gantt-timeline'),
3190
- __metadata("design:type", Boolean)
3191
- ], GanttTimelineComponent.prototype, "hostClass", void 0);
3192
- __decorate([
3193
- Input(),
3194
- __metadata("design:type", Array)
3195
- ], GanttTimelineComponent.prototype, "rows", void 0);
3196
- __decorate([
3197
- Input(),
3198
- __metadata("design:type", Array)
3199
- ], GanttTimelineComponent.prototype, "slots", void 0);
3200
- __decorate([
3201
- Input(),
3202
- __metadata("design:type", Array)
3203
- ], GanttTimelineComponent.prototype, "groupSlots", void 0);
3204
- __decorate([
3205
- Input(),
3206
- __metadata("design:type", Number)
3207
- ], GanttTimelineComponent.prototype, "tableWidth", void 0);
3208
- __decorate([
3209
- Input(),
3210
- __metadata("design:type", String)
3211
- ], GanttTimelineComponent.prototype, "activeView", void 0);
3212
- __decorate([
3213
- Input(),
3214
- __metadata("design:type", TemplateRef)
3215
- ], GanttTimelineComponent.prototype, "taskContentTemplate", void 0);
3216
- __decorate([
3217
- Input(),
3218
- __metadata("design:type", TemplateRef)
3219
- ], GanttTimelineComponent.prototype, "taskTemplate", void 0);
3220
- __decorate([
3221
- Input(),
3222
- __metadata("design:type", TemplateRef)
3223
- ], GanttTimelineComponent.prototype, "summaryTaskTemplate", void 0);
3224
- __decorate([
3225
- Input(),
3226
- __metadata("design:type", Function)
3227
- ], GanttTimelineComponent.prototype, "taskClass", void 0);
3228
- __decorate([
3229
- Input(),
3230
- __metadata("design:type", Function)
3231
- ], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
3232
- __decorate([
3233
- Input(),
3234
- __metadata("design:type", Function)
3235
- ], GanttTimelineComponent.prototype, "hasChildren", void 0);
3236
- __decorate([
3237
- Input(),
3238
- __metadata("design:type", Array)
3239
- ], GanttTimelineComponent.prototype, "dependencies", void 0);
3240
- GanttTimelineComponent = __decorate([
3241
- Component({
3242
- selector: 'kendo-gantt-timeline',
3243
- template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <div #timelineContent class=\"k-grid-content\">\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n </svg>\n </div>\n </div>\n "
3244
- }),
3245
- __metadata("design:paramtypes", [ScrollSyncService,
3246
- DependencyDomService,
3247
- Renderer2,
3248
- NgZone])
3249
- ], GanttTimelineComponent);
3250
- return GanttTimelineComponent;
3251
- }());
4268
+ var TOUCH_ENABLED = new InjectionToken('gantt-touch-enabled');
3252
4269
 
3253
4270
  /**
3254
4271
  * @hidden
@@ -3269,14 +4286,18 @@ var GanttTasksTableBodyComponent = /** @class */ (function () {
3269
4286
  enumerable: true,
3270
4287
  configurable: true
3271
4288
  });
3272
- GanttTasksTableBodyComponent.prototype.isMileStone = function (task) {
3273
- return !this.hasChildren(task) && isEqual(this.mapper.extractFromTask(task, 'start'), this.mapper.extractFromTask(task, 'end'));
4289
+ GanttTasksTableBodyComponent.prototype.isMileStone = function (item) {
4290
+ return !item.hasChildren && isEqual(this.mapper.extractFromTask(item.data, 'start'), this.mapper.extractFromTask(item.data, 'end'));
3274
4291
  };
3275
4292
  __decorate([
3276
4293
  ViewChild('timelineRow', { static: false }),
3277
4294
  __metadata("design:type", ElementRef),
3278
4295
  __metadata("design:paramtypes", [ElementRef])
3279
4296
  ], GanttTasksTableBodyComponent.prototype, "timelineRow", null);
4297
+ __decorate([
4298
+ Input(),
4299
+ __metadata("design:type", Boolean)
4300
+ ], GanttTasksTableBodyComponent.prototype, "selectable", void 0);
3280
4301
  __decorate([
3281
4302
  Input(),
3282
4303
  __metadata("design:type", Array)
@@ -3304,15 +4325,19 @@ var GanttTasksTableBodyComponent = /** @class */ (function () {
3304
4325
  __decorate([
3305
4326
  Input(),
3306
4327
  __metadata("design:type", Function)
3307
- ], GanttTasksTableBodyComponent.prototype, "hasChildren", void 0);
4328
+ ], GanttTasksTableBodyComponent.prototype, "isExpanded", void 0);
3308
4329
  __decorate([
3309
4330
  Input(),
3310
4331
  __metadata("design:type", Function)
3311
4332
  ], GanttTasksTableBodyComponent.prototype, "isTaskSelected", void 0);
4333
+ __decorate([
4334
+ Input(),
4335
+ __metadata("design:type", Boolean)
4336
+ ], GanttTasksTableBodyComponent.prototype, "renderDependencyDragClues", void 0);
3312
4337
  GanttTasksTableBodyComponent = __decorate([
3313
4338
  Component({
3314
4339
  selector: '[kendoGanttTasksTableBody]',
3315
- template: "\n <tr #timelineRow *ngFor=\"let item of rows; let index = index\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"hasChildren(item)\"\n [dataItem]=\"item\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!hasChildren(item)\"\n [dataItem]=\"item\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
4340
+ template: "\n <tr #timelineRow *ngFor=\"let item of rows; let index = index\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item.data\"\n [level]=\"item.level\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [selectable]=\"selectable\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"item.hasChildren\"\n [dataItem]=\"item.data\"\n [level]=\"item.level\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [selectable]=\"selectable\"\n [isSelected]=\"isTaskSelected\"\n [isExpanded]=\"isExpanded\"\n [index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!item.hasChildren\"\n [dataItem]=\"item.data\"\n [level]=\"item.level\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [selectable]=\"selectable\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
3316
4341
  }),
3317
4342
  __metadata("design:paramtypes", [DependencyDomService,
3318
4343
  MappingService])
@@ -3348,24 +4373,42 @@ var slotUnitDuration = {
3348
4373
  week: MS_PER_DAY,
3349
4374
  month: MS_PER_DAY * 7
3350
4375
  };
4376
+ var FOCUSED_CLASS = 'k-focus';
3351
4377
  /**
3352
4378
  * @hidden
3353
4379
  */
3354
4380
  var GanttTaskBase = /** @class */ (function () {
3355
4381
  function GanttTaskBase(mapper, // left public to be available for usage in the templates
3356
- timelineViewService, dependencyDomService, optionChangesService, cdr) {
4382
+ timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
3357
4383
  var _this = this;
3358
4384
  this.mapper = mapper;
3359
4385
  this.timelineViewService = timelineViewService;
3360
4386
  this.dependencyDomService = dependencyDomService;
3361
4387
  this.optionChangesService = optionChangesService;
3362
4388
  this.cdr = cdr;
4389
+ this.navigationService = navigationService;
3363
4390
  this.wrapperClass = true;
3364
- this.viewChangesSubscription = new Subscription();
3365
- this.viewChangesSubscription.add(this.optionChangesService.viewChanges.subscribe(function () {
3366
- _this.cdr.markForCheck();
3367
- }));
4391
+ this.subscriptions = new Subscription();
4392
+ this.subscriptions.add(this.optionChangesService.viewChanges
4393
+ .subscribe(function () { return _this.cdr.markForCheck(); }));
4394
+ this.subscriptions.add(this.navigationService.taskStatusChanges
4395
+ .subscribe(this.updateActiveState.bind(this)));
3368
4396
  }
4397
+ Object.defineProperty(GanttTaskBase.prototype, "taskIndexAttribute", {
4398
+ get: function () {
4399
+ return this.index;
4400
+ },
4401
+ enumerable: true,
4402
+ configurable: true
4403
+ });
4404
+ Object.defineProperty(GanttTaskBase.prototype, "ariaSelected", {
4405
+ get: function () {
4406
+ // assinging null will not render the attribute at all (desired in selectable="false" mode)
4407
+ return this.selectable ? String(this.isSelected(this.dataItem)) : null;
4408
+ },
4409
+ enumerable: true,
4410
+ configurable: true
4411
+ });
3369
4412
  Object.defineProperty(GanttTaskBase.prototype, "slotUnitDuration", {
3370
4413
  get: function () {
3371
4414
  return slotUnitDuration[this.activeView];
@@ -3387,23 +4430,6 @@ var GanttTaskBase = /** @class */ (function () {
3387
4430
  enumerable: true,
3388
4431
  configurable: true
3389
4432
  });
3390
- GanttTaskBase.prototype.ngOnChanges = function (changes) {
3391
- if (isPresent(changes.dataItem)) {
3392
- if (isPresent(changes.dataItem.previousValue)) {
3393
- this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
3394
- }
3395
- this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
3396
- }
3397
- else if (isPresent(changes.activeView)) {
3398
- this.dependencyDomService.notifyChanges();
3399
- }
3400
- };
3401
- GanttTaskBase.prototype.ngOnDestroy = function () {
3402
- if (isPresent(this.dataItem)) {
3403
- this.dependencyDomService.unregisterTask(this.dataItem);
3404
- }
3405
- this.viewChangesSubscription.unsubscribe();
3406
- };
3407
4433
  Object.defineProperty(GanttTaskBase.prototype, "taskWidth", {
3408
4434
  get: function () {
3409
4435
  var itemDuration = this.mapper.extractFromTask(this.dataItem, 'end') - this.mapper.extractFromTask(this.dataItem, 'start');
@@ -3415,6 +4441,12 @@ var GanttTaskBase = /** @class */ (function () {
3415
4441
  configurable: true
3416
4442
  });
3417
4443
  Object.defineProperty(GanttTaskBase.prototype, "taskOffset", {
4444
+ /**
4445
+ * The `left` style prop has to be applied to the host element (.k-task-wrap), as the drag clue elements are displayed on .k-task-wrap hover.
4446
+ * Applying the `left` offset to the inner .k-task element leaves the .k-task-wrap element rendered with an offset of 0 somewhere on the left
4447
+ * and hovering just the .k-task element doesn't expose the drag clues.
4448
+ * Additionally, positioning the entire container takes care of positioning the hints as well.
4449
+ */
3418
4450
  get: function () {
3419
4451
  var timeAfterViewStart = this.mapper.extractFromTask(this.dataItem, 'start') - this.viewService.viewStart;
3420
4452
  var offsetInSlotUnits = timeAfterViewStart / this.slotUnitDuration;
@@ -3433,10 +4465,48 @@ var GanttTaskBase = /** @class */ (function () {
3433
4465
  enumerable: true,
3434
4466
  configurable: true
3435
4467
  });
4468
+ GanttTaskBase.prototype.ngOnChanges = function (changes) {
4469
+ if (isPresent(changes.dataItem)) {
4470
+ if (isPresent(changes.dataItem.previousValue)) {
4471
+ this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
4472
+ }
4473
+ this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
4474
+ }
4475
+ else if (isPresent(changes.activeView)) {
4476
+ this.dependencyDomService.notifyChanges();
4477
+ }
4478
+ if (this.navigationService.enabled && isPresent(changes.index)) {
4479
+ this.updateActiveState(this.navigationService.activeTask);
4480
+ }
4481
+ };
4482
+ GanttTaskBase.prototype.ngOnDestroy = function () {
4483
+ if (isPresent(this.dataItem)) {
4484
+ this.dependencyDomService.unregisterTask(this.dataItem);
4485
+ }
4486
+ this.subscriptions.unsubscribe();
4487
+ };
4488
+ GanttTaskBase.prototype.updateActiveState = function (_a) {
4489
+ var activeIndex = _a.activeIndex, isFocused = _a.isFocused;
4490
+ var isActive = activeIndex === this.index;
4491
+ var tabindex = isActive ? '0' : '-1';
4492
+ this.taskElement.nativeElement.setAttribute('tabindex', tabindex);
4493
+ if (isActive && isFocused) {
4494
+ this.taskElement.nativeElement.focus();
4495
+ this.taskElement.nativeElement.classList.add(FOCUSED_CLASS);
4496
+ }
4497
+ else {
4498
+ this.taskElement.nativeElement.classList.remove(FOCUSED_CLASS);
4499
+ }
4500
+ };
3436
4501
  __decorate([
3437
4502
  HostBinding('class.k-task-wrap'),
3438
4503
  __metadata("design:type", Boolean)
3439
4504
  ], GanttTaskBase.prototype, "wrapperClass", void 0);
4505
+ __decorate([
4506
+ HostBinding('attr.data-task-index'),
4507
+ __metadata("design:type", Number),
4508
+ __metadata("design:paramtypes", [])
4509
+ ], GanttTaskBase.prototype, "taskIndexAttribute", null);
3440
4510
  __decorate([
3441
4511
  ViewChild('task', { static: true }),
3442
4512
  __metadata("design:type", ElementRef)
@@ -3449,6 +4519,18 @@ var GanttTaskBase = /** @class */ (function () {
3449
4519
  Input(),
3450
4520
  __metadata("design:type", Number)
3451
4521
  ], GanttTaskBase.prototype, "index", void 0);
4522
+ __decorate([
4523
+ Input(),
4524
+ __metadata("design:type", Number)
4525
+ ], GanttTaskBase.prototype, "level", void 0);
4526
+ __decorate([
4527
+ Input(),
4528
+ __metadata("design:type", Boolean)
4529
+ ], GanttTaskBase.prototype, "renderDependencyDragClues", void 0);
4530
+ __decorate([
4531
+ Input(),
4532
+ __metadata("design:type", Boolean)
4533
+ ], GanttTaskBase.prototype, "selectable", void 0);
3452
4534
  __decorate([
3453
4535
  Input(),
3454
4536
  __metadata("design:type", Function)
@@ -3461,6 +4543,11 @@ var GanttTaskBase = /** @class */ (function () {
3461
4543
  Input(),
3462
4544
  __metadata("design:type", Function)
3463
4545
  ], GanttTaskBase.prototype, "taskClass", void 0);
4546
+ __decorate([
4547
+ HostBinding('style.left.px'),
4548
+ __metadata("design:type", Number),
4549
+ __metadata("design:paramtypes", [])
4550
+ ], GanttTaskBase.prototype, "taskOffset", null);
3464
4551
  return GanttTaskBase;
3465
4552
  }());
3466
4553
 
@@ -3469,15 +4556,16 @@ var GanttTaskBase = /** @class */ (function () {
3469
4556
  */
3470
4557
  var GanttTaskComponent = /** @class */ (function (_super) {
3471
4558
  __extends(GanttTaskComponent, _super);
3472
- function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, editService) {
3473
- var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
4559
+ function GanttTaskComponent(editService, touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
4560
+ var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) || this;
3474
4561
  _this.editService = editService;
4562
+ _this.touchEnabled = touchEnabled$$1;
3475
4563
  return _this;
3476
4564
  }
3477
4565
  GanttTaskComponent_1 = GanttTaskComponent;
3478
4566
  GanttTaskComponent.prototype.onTaskDelete = function () {
3479
4567
  this.editService.dataItem = this.dataItem;
3480
- this.editService.showConfirmationDialog.next();
4568
+ this.editService.taskDelete.next(this.dataItem);
3481
4569
  };
3482
4570
  var GanttTaskComponent_1;
3483
4571
  __decorate([
@@ -3497,14 +4585,16 @@ var GanttTaskComponent = /** @class */ (function (_super) {
3497
4585
  useExisting: forwardRef(function () { return GanttTaskComponent_1; })
3498
4586
  }
3499
4587
  ],
3500
- template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [attr.data-task-index]=\"index\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <ng-container *ngIf=\"!taskTemplate\">\n <div\n class=\"k-task-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n <div class=\"k-task-content\">\n <div class=\"k-task-template\">\n <ng-container *ngIf=\"!taskContentTemplate; else taskContent\">\n {{ mapper.extractFromTask(dataItem, 'title') }}\n </ng-container>\n <ng-template\n #taskContent\n [ngTemplateOutlet]=\"taskContentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"\n >\n </ng-template>\n </div>\n <span class=\"k-task-actions\">\n <span\n (click)=\"onTaskDelete()\"\n class=\"k-link k-task-delete\">\n <span class=\"k-icon k-i-close\"></span>\n </span>\n </span>\n </div>\n </ng-container>\n <ng-template\n *ngIf=\"taskTemplate\"\n [ngTemplateOutlet]=\"taskTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
4588
+ template: "\n <div\n #task\n class=\"k-task k-task-single\"\n role=\"treeitem\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n [attr.aria-selected]=\"ariaSelected\"\n [attr.aria-level]=\"level + 1\"\n >\n <ng-container *ngIf=\"!taskTemplate\">\n <div\n class=\"k-task-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n aria-hidden=\"true\"\n >\n </div>\n <div class=\"k-task-content\">\n <div class=\"k-task-template\">\n <ng-container *ngIf=\"!taskContentTemplate; else taskContent\">\n {{ mapper.extractFromTask(dataItem, 'title') }}\n </ng-container>\n <ng-template\n #taskContent\n [ngTemplateOutlet]=\"taskContentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"\n >\n </ng-template>\n </div>\n <span\n class=\"k-task-actions\"\n aria-hidden=\"true\"\n >\n <span\n class=\"k-link k-task-delete\"\n [kendoEventsOutsideAngular]=\"{\n click: onTaskDelete\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-icon k-i-close\"></span>\n </span>\n </span>\n </div>\n </ng-container>\n <ng-template\n *ngIf=\"taskTemplate\"\n [ngTemplateOutlet]=\"taskTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n ",
4589
+ styles: ["\n .k-task.k-focus {\n box-shadow: 0 0 4px 3px grey;\n outline: none;\n }\n .k-task.k-focus.k-state-selected {\n box-shadow: 0 0 4px 3px #ffaea8;\n }\n "]
3501
4590
  }),
3502
- __metadata("design:paramtypes", [MappingService,
4591
+ __param(1, Inject(TOUCH_ENABLED)),
4592
+ __metadata("design:paramtypes", [EditService, Boolean, MappingService,
3503
4593
  TimelineViewService,
3504
4594
  DependencyDomService,
3505
4595
  OptionChangesService,
3506
4596
  ChangeDetectorRef,
3507
- EditService])
4597
+ NavigationService])
3508
4598
  ], GanttTaskComponent);
3509
4599
  return GanttTaskComponent;
3510
4600
  }(GanttTaskBase));
@@ -3514,12 +4604,23 @@ var GanttTaskComponent = /** @class */ (function (_super) {
3514
4604
  */
3515
4605
  var GanttSummaryTaskComponent = /** @class */ (function (_super) {
3516
4606
  __extends(GanttSummaryTaskComponent, _super);
3517
- function GanttSummaryTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
3518
- var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
4607
+ function GanttSummaryTaskComponent(touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
4608
+ var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) || this;
4609
+ _this.touchEnabled = touchEnabled$$1;
3519
4610
  _this.summaryWrapperClass = true;
3520
4611
  return _this;
3521
4612
  }
3522
4613
  GanttSummaryTaskComponent_1 = GanttSummaryTaskComponent;
4614
+ Object.defineProperty(GanttSummaryTaskComponent.prototype, "ariaExpanded", {
4615
+ get: function () {
4616
+ // if no callback is provided, all child items are displayed and the item is regarded as expanded
4617
+ // replicates the TreeList aria-expanded behavior
4618
+ var isExpanded = !isPresent(this.isExpanded) || this.isExpanded(this.dataItem);
4619
+ return String(isExpanded);
4620
+ },
4621
+ enumerable: true,
4622
+ configurable: true
4623
+ });
3523
4624
  var GanttSummaryTaskComponent_1;
3524
4625
  __decorate([
3525
4626
  HostBinding('class.k-summary-wrap'),
@@ -3529,6 +4630,10 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
3529
4630
  Input(),
3530
4631
  __metadata("design:type", TemplateRef)
3531
4632
  ], GanttSummaryTaskComponent.prototype, "template", void 0);
4633
+ __decorate([
4634
+ Input(),
4635
+ __metadata("design:type", Function)
4636
+ ], GanttSummaryTaskComponent.prototype, "isExpanded", void 0);
3532
4637
  GanttSummaryTaskComponent = GanttSummaryTaskComponent_1 = __decorate([
3533
4638
  Component({
3534
4639
  selector: 'kendo-gantt-summary-task',
@@ -3538,13 +4643,16 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
3538
4643
  useExisting: forwardRef(function () { return GanttSummaryTaskComponent_1; })
3539
4644
  }
3540
4645
  ],
3541
- template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [attr.data-task-index]=\"index\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <div *ngIf=\"!template; else summaryTemplate\"\n class=\"k-task-summary-progress\"\n [style.width.px]=\"taskWidth\">\n <div\n class=\"k-task-summary-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n </div>\n <ng-template\n #summaryTemplate\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
4646
+ template: "\n <div\n #task\n role=\"treeitem\"\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n [attr.aria-selected]=\"ariaSelected\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-level]=\"level + 1\"\n >\n <div *ngIf=\"!template; else summaryTemplate\"\n class=\"k-task-summary-progress\"\n [style.width.px]=\"taskWidth\">\n <div\n class=\"k-task-summary-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n </div>\n <ng-template\n #summaryTemplate\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n ",
4647
+ styles: ["\n .k-task.k-focus {\n box-shadow: 0 0 4px 3px grey;\n outline: none;\n }\n .k-task.k-focus.k-state-selected {\n box-shadow: 0 0 4px 3px #ffaea8;\n }\n "]
3542
4648
  }),
3543
- __metadata("design:paramtypes", [MappingService,
4649
+ __param(0, Inject(TOUCH_ENABLED)),
4650
+ __metadata("design:paramtypes", [Boolean, MappingService,
3544
4651
  TimelineViewService,
3545
4652
  DependencyDomService,
3546
4653
  OptionChangesService,
3547
- ChangeDetectorRef])
4654
+ ChangeDetectorRef,
4655
+ NavigationService])
3548
4656
  ], GanttSummaryTaskComponent);
3549
4657
  return GanttSummaryTaskComponent;
3550
4658
  }(GanttTaskBase));
@@ -3554,8 +4662,9 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
3554
4662
  */
3555
4663
  var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
3556
4664
  __extends(GanttMilestoneTaskComponent, _super);
3557
- function GanttMilestoneTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
3558
- var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
4665
+ function GanttMilestoneTaskComponent(touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
4666
+ var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) || this;
4667
+ _this.touchEnabled = touchEnabled$$1;
3559
4668
  _this.milestoneWrapperClass = true;
3560
4669
  return _this;
3561
4670
  }
@@ -3574,13 +4683,16 @@ var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
3574
4683
  useExisting: forwardRef(function () { return GanttMilestoneTaskComponent_1; })
3575
4684
  }
3576
4685
  ],
3577
- template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n [attr.data-task-index]=\"index\"\n >\n </div>\n "
4686
+ template: "\n <div\n #task\n role=\"treeitem\"\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n [attr.aria-selected]=\"ariaSelected\"\n [attr.aria-level]=\"level + 1\"\n >\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n ",
4687
+ styles: ["\n .k-task.k-focus {\n box-shadow: 0 0 4px 3px grey;\n outline: none;\n }\n .k-task.k-focus.k-state-selected {\n box-shadow: 0 0 4px 3px #ffaea8;\n }\n "]
3578
4688
  }),
3579
- __metadata("design:paramtypes", [MappingService,
4689
+ __param(0, Inject(TOUCH_ENABLED)),
4690
+ __metadata("design:paramtypes", [Boolean, MappingService,
3580
4691
  TimelineViewService,
3581
4692
  DependencyDomService,
3582
4693
  OptionChangesService,
3583
- ChangeDetectorRef])
4694
+ ChangeDetectorRef,
4695
+ NavigationService])
3584
4696
  ], GanttMilestoneTaskComponent);
3585
4697
  return GanttMilestoneTaskComponent;
3586
4698
  }(GanttTaskBase));
@@ -3798,10 +4910,10 @@ var SelectableDirective = /** @class */ (function () {
3798
4910
  * @hidden
3799
4911
  */
3800
4912
  var ToolbarComponent = /** @class */ (function () {
3801
- function ToolbarComponent(gantt, scrollSyncService) {
4913
+ function ToolbarComponent(gantt) {
3802
4914
  this.gantt = gantt;
3803
- this.scrollSyncService = scrollSyncService;
3804
4915
  this.context = {};
4916
+ this.role = 'toolbar';
3805
4917
  }
3806
4918
  Object.defineProperty(ToolbarComponent.prototype, "position", {
3807
4919
  get: function () {
@@ -3829,12 +4941,13 @@ var ToolbarComponent = /** @class */ (function () {
3829
4941
  enumerable: true,
3830
4942
  configurable: true
3831
4943
  });
3832
- ToolbarComponent.prototype.onViewChange = function (e) {
3833
- this.gantt.activeView = e; // TODO: may be load the timeline data directly in an activeView setter?
3834
- this.gantt.loadTimelineData();
3835
- this.gantt.activeViewChange.emit(e);
3836
- this.scrollSyncService.resetTimelineScrollLeft();
4944
+ ToolbarComponent.prototype.handleViewChange = function (view) {
4945
+ this.gantt.changeActiveView(view);
3837
4946
  };
4947
+ __decorate([
4948
+ HostBinding('attr.role'),
4949
+ __metadata("design:type", String)
4950
+ ], ToolbarComponent.prototype, "role", void 0);
3838
4951
  __decorate([
3839
4952
  Input(),
3840
4953
  __metadata("design:type", Boolean)
@@ -3851,10 +4964,9 @@ var ToolbarComponent = /** @class */ (function () {
3851
4964
  ToolbarComponent = __decorate([
3852
4965
  Component({
3853
4966
  selector: 'kendo-gantt-toolbar',
3854
- template: "\n <ng-container *ngIf=\"!renderTemplate\">\n <kendo-gantt-add-task *ngIf=\"showAddTask\"></kendo-gantt-add-task>\n <span class=\"k-spacer k-toolbar-spacer\"></span>\n <kendo-gantt-view-selector\n *ngIf=\"showViewSelector\"\n [views]=\"gantt.viewTypes\"\n [activeView]=\"gantt.activeView\"\n (activeViewChange)=\"onViewChange($event)\"></kendo-gantt-view-selector>\n </ng-container>\n <ng-template\n *ngIf=\"renderTemplate\"\n [ngTemplateOutlet]=\"toolbarTemplateRef\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-template>\n "
4967
+ template: "\n <ng-container *ngIf=\"!renderTemplate\">\n <kendo-gantt-add-task *ngIf=\"showAddTask\"></kendo-gantt-add-task>\n <span class=\"k-spacer k-toolbar-spacer\"></span>\n <kendo-gantt-view-selector\n *ngIf=\"showViewSelector\"\n [views]=\"gantt.viewTypes\"\n [activeView]=\"gantt.activeView\"\n (activeViewChange)=\"handleViewChange($event)\"></kendo-gantt-view-selector>\n </ng-container>\n <ng-template\n *ngIf=\"renderTemplate\"\n [ngTemplateOutlet]=\"toolbarTemplateRef\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-template>\n "
3855
4968
  }),
3856
- __metadata("design:paramtypes", [GanttComponent,
3857
- ScrollSyncService])
4969
+ __metadata("design:paramtypes", [GanttComponent])
3858
4970
  ], ToolbarComponent);
3859
4971
  return ToolbarComponent;
3860
4972
  }());
@@ -3900,38 +5012,21 @@ var ViewSelectorComponent = /** @class */ (function () {
3900
5012
  ], ViewSelectorComponent.prototype, "views", void 0);
3901
5013
  __decorate([
3902
5014
  Input(),
3903
- __metadata("design:type", String)
3904
- ], ViewSelectorComponent.prototype, "activeView", void 0);
3905
- __decorate([
3906
- Output(),
3907
- __metadata("design:type", EventEmitter)
3908
- ], ViewSelectorComponent.prototype, "activeViewChange", void 0);
3909
- ViewSelectorComponent = __decorate([
3910
- Component({
3911
- selector: 'kendo-gantt-view-selector',
3912
- template: "\n <select class=\"k-dropdown k-views-dropdown\"\n [value]=\"activeView\"\n (change)=\"activeViewChange.emit($event.target.value)\">\n <option *ngFor=\"let view of views\" [value]=\"view\">{{getViewTypeText(view)}}</option>\n </select>\n <kendo-buttongroup class=\"k-gantt-views\" selection=\"single\">\n <button *ngFor=\"let view of views\"\n kendoButton\n type=\"button\"\n [selected]=\"view === activeView\"\n (click)=\"onClick(view)\">{{getViewTypeText(view)}}</button>\n </kendo-buttongroup>\n "
3913
- }),
3914
- __metadata("design:paramtypes", [LocalizationService])
3915
- ], ViewSelectorComponent);
3916
- return ViewSelectorComponent;
3917
- }());
3918
-
3919
- /**
3920
- * The dependency type when two tasks are connected.
3921
- *
3922
- * The supported values are:
3923
- * * `FF`&mdash;from 'finish' to 'finish'
3924
- * * `FS`&mdash;from 'finish' to 'start'
3925
- * * `SS`&mdash;from 'start' to 'start'
3926
- * * `SF`&mdash;from 'start' to 'finish'
3927
- */
3928
- var DependencyType;
3929
- (function (DependencyType) {
3930
- DependencyType[DependencyType["FF"] = 0] = "FF";
3931
- DependencyType[DependencyType["FS"] = 1] = "FS";
3932
- DependencyType[DependencyType["SF"] = 2] = "SF";
3933
- DependencyType[DependencyType["SS"] = 3] = "SS"; // task B can't start before task A starts
3934
- })(DependencyType || (DependencyType = {}));
5015
+ __metadata("design:type", String)
5016
+ ], ViewSelectorComponent.prototype, "activeView", void 0);
5017
+ __decorate([
5018
+ Output(),
5019
+ __metadata("design:type", EventEmitter)
5020
+ ], ViewSelectorComponent.prototype, "activeViewChange", void 0);
5021
+ ViewSelectorComponent = __decorate([
5022
+ Component({
5023
+ selector: 'kendo-gantt-view-selector',
5024
+ template: "\n <select\n class=\"k-dropdownlist k-picker k-rounded-md k-views-dropdown\"\n aria-label=\"View Selector\"\n [value]=\"activeView\"\n (change)=\"activeViewChange.emit($event.target.value)\">\n <option *ngFor=\"let view of views\" [value]=\"view\">{{getViewTypeText(view)}}</option>\n </select>\n <kendo-buttongroup class=\"k-gantt-views\" selection=\"single\">\n <button *ngFor=\"let view of views\"\n kendoButton\n type=\"button\"\n [selected]=\"view === activeView\"\n (click)=\"onClick(view)\">{{getViewTypeText(view)}}</button>\n </kendo-buttongroup>\n "
5025
+ }),
5026
+ __metadata("design:paramtypes", [LocalizationService])
5027
+ ], ViewSelectorComponent);
5028
+ return ViewSelectorComponent;
5029
+ }());
3935
5030
 
3936
5031
  /**
3937
5032
  * @hidden
@@ -3943,6 +5038,9 @@ var getOffsetRelativeToParent = function (element, targetParent) {
3943
5038
  top: 0,
3944
5039
  left: 0
3945
5040
  };
5041
+ if (!targetParent.contains(element)) {
5042
+ return offset;
5043
+ }
3946
5044
  var offsetParent = element;
3947
5045
  while (offsetParent && offsetParent !== targetParent) {
3948
5046
  offset.top += offsetParent.offsetTop;
@@ -4089,6 +5187,37 @@ var getArrowEast = function (top, left, arrowSize) {
4089
5187
  });
4090
5188
  return points;
4091
5189
  };
5190
+ /**
5191
+ * @hidden
5192
+ *
5193
+ * Translates the provided client `left` and `top` coords to coords relative to the provided container.
5194
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
5195
+ */
5196
+ var clientToOffsetCoords = function (clientLeft, clientTop, offsetContainer) {
5197
+ // client (viewport) coordinates of the target container
5198
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
5199
+ var offsetContainerClientRect = offsetContainer.getBoundingClientRect();
5200
+ return {
5201
+ left: clientLeft - offsetContainerClientRect.left + offsetContainer.scrollLeft,
5202
+ top: clientTop - offsetContainerClientRect.top + offsetContainer.scrollTop
5203
+ };
5204
+ };
5205
+ /**
5206
+ * @hidden
5207
+ *
5208
+ * Retrieves the `left` and `top` values of the center of the provided element.
5209
+ * The retrieved values are relative to the current viewport (client values).
5210
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
5211
+ */
5212
+ var getElementClientCenterCoords = function (element) {
5213
+ // client (viewport) coordinates of the targeted element
5214
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
5215
+ var _a = element.getBoundingClientRect(), left = _a.left, top = _a.top, width = _a.width, height = _a.height;
5216
+ return {
5217
+ left: left + (width / 2),
5218
+ top: top + (height / 2)
5219
+ };
5220
+ };
4092
5221
 
4093
5222
  /**
4094
5223
  * Defines the size of the arrow that will be drawn at the end of each Gantt dependency.
@@ -4171,6 +5300,525 @@ var GanttDependencyDirective = /** @class */ (function () {
4171
5300
  return GanttDependencyDirective;
4172
5301
  }());
4173
5302
 
5303
+ /**
5304
+ * @hidden
5305
+ */
5306
+ var DragValidationTooltipComponent = /** @class */ (function () {
5307
+ function DragValidationTooltipComponent() {
5308
+ /**
5309
+ * Sets the status class of the attempted operation.
5310
+ * Note that the status will be ignored and the `neutral` status class will be rendered,
5311
+ * if the any of the fromTaskName or toTaskName are not populated.
5312
+ */
5313
+ this.isValid = false;
5314
+ }
5315
+ DragValidationTooltipComponent = __decorate([
5316
+ Component({
5317
+ template: "\n <div\n class=\"k-tooltip k-gantt-tooltip-validation\"\n [class.k-gantt-tooltip-valid]=\"showValidityStatus && isValid\"\n [class.k-gantt-tooltip-invalid]=\"showValidityStatus && !isValid\"\n >\n <div class=\"k-gantt-tooltip-validation-row\">\n <span class=\"k-gantt-tooltip-validation-label\">From:</span>\n <span class=\"k-gantt-tooltip-validation-value\">{{ fromTaskName }}</span>\n </div>\n <div class=\"k-gantt-tooltip-validation-row\">\n <span class=\"k-gantt-tooltip-validation-label\">To:</span>\n <span class=\"k-gantt-tooltip-validation-value\">{{ toTaskName }}</span>\n </div>\n </div>\n ",
5318
+ styles: ["\n .k-gantt-tooltip-validation {\n max-width: 200px;\n display: block;\n }\n .k-gantt-tooltip-validation::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 4px;\n height: 100%;\n background: #656565;\n }\n .k-gantt-tooltip-validation.k-gantt-tooltip-valid::before {\n background: #37B400;\n }\n .k-gantt-tooltip-validation.k-gantt-tooltip-invalid::before {\n background: #F31700;\n }\n .k-gantt-tooltip-validation-row {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .k-gantt-tooltip-validation-label {\n display: inline-flex;\n width: 50px;\n }\n .k-gantt-tooltip-validation-value {\n font-weight: bold;\n }\n "]
5319
+ })
5320
+ ], DragValidationTooltipComponent);
5321
+ return DragValidationTooltipComponent;
5322
+ }());
5323
+
5324
+ /**
5325
+ * When added to the .k-task-dot, the element will be kept with hover styles.
5326
+ * Used for the drag clue from which the dragging has started.
5327
+ */
5328
+ var DRAG_CLUE_HOVER_CLASS = 'k-state-hover';
5329
+ /**
5330
+ * Add the selection disabling class to the enitre container.
5331
+ * Otherwise existing selection on a given task text prevents dragging the clue even if the clue has `user-select: none` styles.
5332
+ */
5333
+ var USER_SELECT_NONE_CLASS = 'k-user-select-none';
5334
+ /**
5335
+ * When added to the .k-task-wrap, the containing .k-task-dot elements will be kept visible even when not hovered.
5336
+ * Used for the drag clue from which the dragging has started.
5337
+ */
5338
+ var TASK_WRAPPER_DRAG_CLASS = 'k-origin';
5339
+ /**
5340
+ * Use 20px margin between the pointer and the popup.
5341
+ * Could be made user-configurable if there's demand.
5342
+ */
5343
+ var DEFAULT_POPUP_VERTICAL_MARGIN = 20;
5344
+ /**
5345
+ * A directive which enables the creation of new dependencies via dragging.
5346
+ */
5347
+ var DependencyDragCreateDirective = /** @class */ (function () {
5348
+ function DependencyDragCreateDirective(gantt, zone, renderer, mapper, popupService, timelineScrollService) {
5349
+ this.gantt = gantt;
5350
+ this.zone = zone;
5351
+ this.renderer = renderer;
5352
+ this.mapper = mapper;
5353
+ this.popupService = popupService;
5354
+ this.timelineScrollService = timelineScrollService;
5355
+ /**
5356
+ * Specifies whether the validation tooltip will be displayed during drag operations.
5357
+ *
5358
+ * @default true
5359
+ */
5360
+ this.displayValidationTooltip = true;
5361
+ this.gantt.renderDependencyDragClues = true;
5362
+ }
5363
+ Object.defineProperty(DependencyDragCreateDirective.prototype, "container", {
5364
+ get: function () {
5365
+ if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.timelineContent)) {
5366
+ return null;
5367
+ }
5368
+ return this.gantt.timeline.timelineContent.nativeElement;
5369
+ },
5370
+ enumerable: true,
5371
+ configurable: true
5372
+ });
5373
+ Object.defineProperty(DependencyDragCreateDirective.prototype, "polyline", {
5374
+ get: function () {
5375
+ if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dependencyDragCreatePolyline)) {
5376
+ return null;
5377
+ }
5378
+ return this.gantt.timeline.dependencyDragCreatePolyline.nativeElement;
5379
+ },
5380
+ enumerable: true,
5381
+ configurable: true
5382
+ });
5383
+ Object.defineProperty(DependencyDragCreateDirective.prototype, "popupContainer", {
5384
+ get: function () {
5385
+ if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dragPopupContainer)) {
5386
+ return null;
5387
+ }
5388
+ return this.gantt.timeline.dragPopupContainer;
5389
+ },
5390
+ enumerable: true,
5391
+ configurable: true
5392
+ });
5393
+ DependencyDragCreateDirective.prototype.ngAfterViewInit = function () {
5394
+ this.subscribeDraggable();
5395
+ this.addScrollListener();
5396
+ };
5397
+ DependencyDragCreateDirective.prototype.ngOnDestroy = function () {
5398
+ this.unsubscribeDraggable();
5399
+ this.removeScrollListener();
5400
+ this.fromTaskClue = null;
5401
+ this.cancelScroll();
5402
+ this.closeDragPopup();
5403
+ };
5404
+ DependencyDragCreateDirective.prototype.subscribeDraggable = function () {
5405
+ this.dragSubscriptions = this.gantt.timeline.timelineContainerPress
5406
+ .subscribe(this.handlePress.bind(this));
5407
+ this.dragSubscriptions.add(this.gantt.timeline.timelineContainerDrag
5408
+ .subscribe(this.handleDrag.bind(this)));
5409
+ this.dragSubscriptions.add(this.gantt.timeline.timelineContainerRelease
5410
+ .subscribe(this.handleRelease.bind(this)));
5411
+ };
5412
+ DependencyDragCreateDirective.prototype.unsubscribeDraggable = function () {
5413
+ if (isPresent(this.dragSubscriptions)) {
5414
+ this.dragSubscriptions.unsubscribe();
5415
+ this.dragSubscriptions = null;
5416
+ }
5417
+ };
5418
+ DependencyDragCreateDirective.prototype.handlePress = function (_a) {
5419
+ var clientX = _a.clientX, clientY = _a.clientY;
5420
+ // using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
5421
+ var target = elementFromPoint(clientX, clientY);
5422
+ if (isDependencyDragClue(target)) {
5423
+ this.fromTaskClue = target;
5424
+ this.assignDragStartClasses(this.fromTaskClue);
5425
+ // use the center of the target clue as polyline starting point
5426
+ var dragClueCenterCoords = getElementClientCenterCoords(this.fromTaskClue);
5427
+ // the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
5428
+ this.polylineStartCoords = clientToOffsetCoords(dragClueCenterCoords.left, dragClueCenterCoords.top, this.container);
5429
+ }
5430
+ };
5431
+ DependencyDragCreateDirective.prototype.handleDrag = function (_a) {
5432
+ var clientX = _a.clientX, clientY = _a.clientY;
5433
+ if (isPresent(this.fromTaskClue)) {
5434
+ // the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
5435
+ var pointerOffsetCoords = clientToOffsetCoords(clientX, clientY, this.container);
5436
+ // the start coords are calculated just once per drag session in handlePress
5437
+ // use the current drag coords as polyline end coords
5438
+ this.updatePolyline(this.polylineStartCoords, pointerOffsetCoords);
5439
+ this.currentPointerClientCoords = { left: clientX, top: clientY };
5440
+ if (this.gantt.dragScrollSettings.enabled) {
5441
+ // use client coordinates for scroll trigger
5442
+ this.scrollPointIntoView(this.currentPointerClientCoords);
5443
+ }
5444
+ if (this.displayValidationTooltip) {
5445
+ this.updateDragPopup(pointerOffsetCoords);
5446
+ }
5447
+ }
5448
+ };
5449
+ DependencyDragCreateDirective.prototype.handleRelease = function (_a) {
5450
+ var _this = this;
5451
+ var clientX = _a.clientX, clientY = _a.clientY;
5452
+ if (!isPresent(this.fromTaskClue)) {
5453
+ return;
5454
+ }
5455
+ // using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
5456
+ var target = elementFromPoint(clientX, clientY);
5457
+ if (isDependencyDragClue(target) && !sameTaskClues(this.fromTaskClue, target, this.container)) {
5458
+ this.zone.run(function () {
5459
+ var _a;
5460
+ var fromTaskClue = _this.fromTaskClue;
5461
+ var toTaskClue = target;
5462
+ var fromTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(fromTaskClue, _this.container)];
5463
+ var toTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(toTaskClue, _this.container)];
5464
+ var dependencyType = getDependencyTypeFromTargetTasks(fromTaskClue, toTaskClue);
5465
+ var _b = _this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
5466
+ _this.gantt.dependencyAdd.emit({
5467
+ fromTask: fromTask,
5468
+ toTask: toTask,
5469
+ type: dependencyType,
5470
+ isValid: _this.gantt.validateNewDependency((_a = {},
5471
+ _a[fromId] = _this.mapper.extractFromTask(fromTask, 'id'),
5472
+ _a[toId] = _this.mapper.extractFromTask(toTask, 'id'),
5473
+ _a[type] = dependencyType,
5474
+ _a))
5475
+ });
5476
+ });
5477
+ }
5478
+ this.clearPolyline();
5479
+ this.removeDragStartClasses(this.fromTaskClue);
5480
+ this.fromTaskClue = null;
5481
+ this.cancelScroll();
5482
+ this.closeDragPopup();
5483
+ };
5484
+ DependencyDragCreateDirective.prototype.updatePolyline = function (start, end) {
5485
+ var points = start.left + "," + start.top + " " + end.left + "," + end.top;
5486
+ this.renderer.setAttribute(this.polyline, 'points', points);
5487
+ };
5488
+ DependencyDragCreateDirective.prototype.clearPolyline = function () {
5489
+ this.renderer.removeAttribute(this.polyline, 'points');
5490
+ };
5491
+ DependencyDragCreateDirective.prototype.assignDragStartClasses = function (dragClue) {
5492
+ if (!isPresent(dragClue)) {
5493
+ return;
5494
+ }
5495
+ this.renderer.addClass(this.container, USER_SELECT_NONE_CLASS);
5496
+ this.renderer.addClass(dragClue, DRAG_CLUE_HOVER_CLASS);
5497
+ var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
5498
+ if (isPresent(taskWrapper)) {
5499
+ this.renderer.addClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
5500
+ }
5501
+ };
5502
+ DependencyDragCreateDirective.prototype.removeDragStartClasses = function (dragClue) {
5503
+ if (!isPresent(dragClue)) {
5504
+ return;
5505
+ }
5506
+ this.renderer.removeClass(this.container, USER_SELECT_NONE_CLASS);
5507
+ this.renderer.removeClass(dragClue, DRAG_CLUE_HOVER_CLASS);
5508
+ var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
5509
+ if (isPresent(taskWrapper)) {
5510
+ this.renderer.removeClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
5511
+ }
5512
+ };
5513
+ DependencyDragCreateDirective.prototype.scrollPointIntoView = function (_a) {
5514
+ var left = _a.left, top = _a.top;
5515
+ this.timelineScrollService.requestScrollCancel();
5516
+ this.timelineScrollService.requestHorizontalScroll(left);
5517
+ this.timelineScrollService.requestVerticalScroll(top);
5518
+ };
5519
+ DependencyDragCreateDirective.prototype.cancelScroll = function () {
5520
+ this.timelineScrollService.requestScrollCancel();
5521
+ };
5522
+ DependencyDragCreateDirective.prototype.addScrollListener = function () {
5523
+ var _this = this;
5524
+ if (!isDocumentAvailable()) {
5525
+ return;
5526
+ }
5527
+ this.zone.runOutsideAngular(function () {
5528
+ return _this.scrollListenerDisposer = _this.renderer.listen(_this.container, 'scroll', function () {
5529
+ // update the polyline only if we're currently dragging
5530
+ if (isPresent(_this.fromTaskClue) && isPresent(_this.currentPointerClientCoords)) {
5531
+ var _a = _this.currentPointerClientCoords, left = _a.left, top_1 = _a.top;
5532
+ var pointerOffsetCoords = clientToOffsetCoords(left, top_1, _this.container);
5533
+ _this.updatePolyline(_this.polylineStartCoords, pointerOffsetCoords);
5534
+ if (_this.displayValidationTooltip) {
5535
+ _this.updateDragPopup(pointerOffsetCoords);
5536
+ }
5537
+ }
5538
+ });
5539
+ });
5540
+ };
5541
+ DependencyDragCreateDirective.prototype.removeScrollListener = function () {
5542
+ if (isPresent(this.scrollListenerDisposer)) {
5543
+ this.scrollListenerDisposer();
5544
+ this.scrollListenerDisposer = null;
5545
+ }
5546
+ };
5547
+ DependencyDragCreateDirective.prototype.openDragPopup = function () {
5548
+ if (isPresent(this.dragPopup)) {
5549
+ this.closeDragPopup();
5550
+ }
5551
+ this.dragPopup = this.popupService.open({
5552
+ animate: false,
5553
+ content: DragValidationTooltipComponent,
5554
+ appendTo: this.popupContainer,
5555
+ positionMode: 'absolute',
5556
+ popupClass: 'k-popup-transparent'
5557
+ });
5558
+ };
5559
+ DependencyDragCreateDirective.prototype.updateDragPopup = function (pointerOffsetPosition) {
5560
+ if (!isPresent(this.dragPopup)) {
5561
+ this.openDragPopup();
5562
+ }
5563
+ var tooltip = this.dragPopup.content.instance;
5564
+ var _a = this.getTooltipContext(), fromTaskName = _a.fromTaskName, toTaskName = _a.toTaskName, isValid = _a.isValid, showValidityStatus = _a.showValidityStatus;
5565
+ if (tooltip.fromTaskName !== fromTaskName ||
5566
+ tooltip.toTaskName !== toTaskName ||
5567
+ tooltip.isValid !== isValid ||
5568
+ tooltip.showValidityStatus !== showValidityStatus) {
5569
+ tooltip.fromTaskName = fromTaskName;
5570
+ tooltip.toTaskName = toTaskName;
5571
+ tooltip.isValid = isValid;
5572
+ tooltip.showValidityStatus = showValidityStatus;
5573
+ this.dragPopup.content.changeDetectorRef.detectChanges();
5574
+ }
5575
+ this.dragPopup.popup.instance.offset = this.normalizePopupPosition(pointerOffsetPosition);
5576
+ this.dragPopup.popup.changeDetectorRef.detectChanges();
5577
+ };
5578
+ DependencyDragCreateDirective.prototype.closeDragPopup = function () {
5579
+ if (isPresent(this.dragPopup)) {
5580
+ this.dragPopup.close();
5581
+ this.dragPopup = null;
5582
+ }
5583
+ };
5584
+ DependencyDragCreateDirective.prototype.extractTaskName = function (target) {
5585
+ if (!isTaskWrapper(target, this.container)) {
5586
+ return null;
5587
+ }
5588
+ var taskIndex = getClosestTaskIndex(target, this.container);
5589
+ var task = this.gantt.renderedTreeListItems[taskIndex];
5590
+ var taskName = this.mapper.extractFromTask(task, 'title');
5591
+ return taskName;
5592
+ };
5593
+ DependencyDragCreateDirective.prototype.getTooltipContext = function () {
5594
+ var _a;
5595
+ var fromTaskName = this.extractTaskName(this.fromTaskClue);
5596
+ var currentPointerTarget = elementFromPoint(this.currentPointerClientCoords.left, this.currentPointerClientCoords.top);
5597
+ var toTaskName = isTaskWrapper(currentPointerTarget, this.container) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container) ?
5598
+ this.extractTaskName(currentPointerTarget) :
5599
+ '';
5600
+ var showValidityStatus = isDependencyDragClue(currentPointerTarget) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container);
5601
+ var _b = this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
5602
+ return {
5603
+ fromTaskName: fromTaskName,
5604
+ toTaskName: toTaskName,
5605
+ showValidityStatus: showValidityStatus,
5606
+ isValid: showValidityStatus && this.gantt.validateNewDependency((_a = {},
5607
+ _a[fromId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(this.fromTaskClue, this.container)], 'id'),
5608
+ _a[toId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(currentPointerTarget, this.container)], 'id'),
5609
+ _a[type] = getDependencyTypeFromTargetTasks(this.fromTaskClue, currentPointerTarget),
5610
+ _a))
5611
+ };
5612
+ };
5613
+ /**
5614
+ * Restricts the popup position to not go below the scroll height or width of the container.
5615
+ * Flips the position of the popup when there's not enough vertical space in the visible part of the container to render the popup.
5616
+ */
5617
+ DependencyDragCreateDirective.prototype.normalizePopupPosition = function (pointerOffsetPosition) {
5618
+ var top = pointerOffsetPosition.top + DEFAULT_POPUP_VERTICAL_MARGIN;
5619
+ var containerClientBottom = this.container.clientHeight + this.container.scrollTop;
5620
+ var popupHeight = this.dragPopup.popupElement.querySelector('.k-tooltip').clientHeight;
5621
+ var enoughSpaceToRender = top < containerClientBottom - popupHeight;
5622
+ // flip the popup above the pointer if there's not enough space in the bottom of the container
5623
+ if (!enoughSpaceToRender) {
5624
+ // margin * 2 to account for the already applied margin
5625
+ top -= popupHeight + (DEFAULT_POPUP_VERTICAL_MARGIN * 2);
5626
+ }
5627
+ // center the popup horizontally according to the pointer position
5628
+ var popupWidth = this.dragPopup.popupElement.querySelector('.k-tooltip').clientWidth;
5629
+ var left = pointerOffsetPosition.left - popupWidth / 2;
5630
+ // don't allow the popup to be cut out of the viewport
5631
+ var minLeftTop = 0;
5632
+ // restrict the popup from being positioned beyond or before the available scrollable space
5633
+ return {
5634
+ left: fitToRange(left, minLeftTop, this.container.scrollWidth - popupWidth),
5635
+ top: fitToRange(top, minLeftTop, this.container.scrollHeight - popupHeight)
5636
+ };
5637
+ };
5638
+ __decorate([
5639
+ Input(),
5640
+ __metadata("design:type", Boolean)
5641
+ ], DependencyDragCreateDirective.prototype, "displayValidationTooltip", void 0);
5642
+ DependencyDragCreateDirective = __decorate([
5643
+ Directive({
5644
+ selector: '[kendoGanttDependencyDragCreate]'
5645
+ }),
5646
+ __metadata("design:paramtypes", [GanttComponent,
5647
+ NgZone,
5648
+ Renderer2,
5649
+ MappingService,
5650
+ PopupService,
5651
+ TimelineScrollService])
5652
+ ], DependencyDragCreateDirective);
5653
+ return DependencyDragCreateDirective;
5654
+ }());
5655
+
5656
+ /**
5657
+ * @hidden
5658
+ */
5659
+ var ScrollDirection;
5660
+ (function (ScrollDirection) {
5661
+ ScrollDirection[ScrollDirection["Backwards"] = -1] = "Backwards";
5662
+ ScrollDirection[ScrollDirection["Forward"] = 1] = "Forward";
5663
+ })(ScrollDirection || (ScrollDirection = {}));
5664
+ /**
5665
+ * @hidden
5666
+ */
5667
+ var ScrollAxis;
5668
+ (function (ScrollAxis) {
5669
+ ScrollAxis["Vertical"] = "scrollTop";
5670
+ ScrollAxis["Horizontal"] = "scrollLeft";
5671
+ })(ScrollAxis || (ScrollAxis = {}));
5672
+
5673
+ /**
5674
+ * @hidden
5675
+ *
5676
+ * Checks if the beginning of the scrollable element is reached (top/left).
5677
+ * Floors the top value.
5678
+ */
5679
+ var isUpperLimitReached = function (element, axis) { return Math.floor(element[axis]) <= 0; };
5680
+ /**
5681
+ * @hidden
5682
+ *
5683
+ * Checks if the end of the scrollable element is reached (bottom/right).
5684
+ * Ceils the top value.
5685
+ */
5686
+ var isBottomLimitReached = function (element, axis) {
5687
+ var elementSize = axis === ScrollAxis.Horizontal ?
5688
+ element.scrollWidth - element.clientWidth :
5689
+ element.scrollHeight - element.clientHeight;
5690
+ return Math.ceil(element[axis]) >= elementSize;
5691
+ };
5692
+ /**
5693
+ * @hidden
5694
+ *
5695
+ * Scrolls the element in the given direction by the provided step in the provided scroll axis.
5696
+ *
5697
+ * If the targeted scroll incrementation doesn't yield any result due to device pixel ratio issues (https://github.com/dimitar-pechev/RenderingIndependentScrollOffsets#readme),
5698
+ * increments the step with 1px and again attempts to change the scrollTop of the element, until the content is actually scrolled.
5699
+ *
5700
+ * Cuts the operation short after 20 unsuccessful attempts to prevent infinite loops in possible corner-case scenarios.
5701
+ */
5702
+ var scrollElement = function (element, step, direction, scrollAxis) {
5703
+ if (!(isPresent(element) && isDocumentAvailable())) {
5704
+ return;
5705
+ }
5706
+ var initialScrollPosition = element[scrollAxis];
5707
+ var currentStep = step;
5708
+ var iterations = 0;
5709
+ while (initialScrollPosition === element[scrollAxis] &&
5710
+ !(direction === ScrollDirection.Backwards && isUpperLimitReached(element, scrollAxis)) &&
5711
+ !(direction === ScrollDirection.Forward && isBottomLimitReached(element, scrollAxis)) &&
5712
+ iterations < 20 // cut the operation short in 20 attempts - in case of a wild corner case
5713
+ ) {
5714
+ element[scrollAxis] += (currentStep * direction);
5715
+ // try with a larger step if the current one doesn't update the scroll position successfully
5716
+ currentStep += 1;
5717
+ iterations += 1;
5718
+ }
5719
+ };
5720
+ /**
5721
+ * @hidden
5722
+ *
5723
+ * As client coordinates are not restricted to the range 0px - {viewportSize}px, but can have negative starting values or ending values greater than the viewport size,
5724
+ * this function extracts the visible boundaries of the provided element - fall-backing to 0 when the top/left are below 0,
5725
+ * and fall-backing to the actual visible size of the container for bottom/right.
5726
+ */
5727
+ var getViewportBoundaries = function (element) {
5728
+ var elementRect = element.getBoundingClientRect();
5729
+ // if the beginning of the scrollable container is above/before the current viewport, fall-back to 0
5730
+ var topLimit = Math.max(elementRect.top, 0);
5731
+ var leftLimit = Math.max(elementRect.left, 0);
5732
+ // if the end of the scrollable container is beneath/after the current viewport, fall-back to its client height
5733
+ // add the distance from the start of the viewport to the beginning of the container to ensure scrolling bottom begins when the actual end of the container is reached
5734
+ var bottomLimit = topLimit + Math.min(elementRect.bottom, element.clientHeight);
5735
+ var rightLimit = leftLimit + Math.min(elementRect.right, element.clientWidth);
5736
+ return {
5737
+ top: topLimit,
5738
+ bottom: bottomLimit,
5739
+ left: leftLimit,
5740
+ right: rightLimit
5741
+ };
5742
+ };
5743
+
5744
+ /**
5745
+ * @hidden
5746
+ */
5747
+ var TimelineScrollableDirective = /** @class */ (function () {
5748
+ function TimelineScrollableDirective(timelineScrollableContainer, scrollService, zone) {
5749
+ this.timelineScrollableContainer = timelineScrollableContainer;
5750
+ this.scrollService = scrollService;
5751
+ this.zone = zone;
5752
+ this.subscriptions = new Subscription();
5753
+ this.subscriptions.add(this.scrollService.horizontalScroll
5754
+ .subscribe(this.scrollHorizontallyTo.bind(this)));
5755
+ this.subscriptions.add(this.scrollService.verticalScroll
5756
+ .subscribe(this.scrollVerticallyTo.bind(this)));
5757
+ this.subscriptions.add(this.scrollService.scrollCancel
5758
+ .subscribe(this.cancelScroll.bind(this)));
5759
+ }
5760
+ TimelineScrollableDirective.prototype.ngOnDestroy = function () {
5761
+ this.subscriptions.unsubscribe();
5762
+ };
5763
+ TimelineScrollableDirective.prototype.scrollHorizontallyTo = function (left) {
5764
+ var _this = this;
5765
+ this.zone.runOutsideAngular(function () {
5766
+ var container = _this.timelineScrollableContainer.nativeElement;
5767
+ var visibleBoundaries = getViewportBoundaries(container);
5768
+ if (left < visibleBoundaries.left + _this.scrollSettings.threshold) {
5769
+ _this.horizontalScrollInterval = setInterval(function () {
5770
+ return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Horizontal);
5771
+ }, _this.scrollSettings.interval);
5772
+ }
5773
+ else if (left > visibleBoundaries.right - _this.scrollSettings.threshold) {
5774
+ _this.horizontalScrollInterval = setInterval(function () {
5775
+ return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Horizontal);
5776
+ }, _this.scrollSettings.interval);
5777
+ }
5778
+ });
5779
+ };
5780
+ TimelineScrollableDirective.prototype.scrollVerticallyTo = function (top) {
5781
+ var _this = this;
5782
+ this.zone.runOutsideAngular(function () {
5783
+ var container = _this.timelineScrollableContainer.nativeElement;
5784
+ var visibleBoundaries = getViewportBoundaries(container);
5785
+ if (top < visibleBoundaries.top + _this.scrollSettings.threshold) {
5786
+ _this.verticalScrollInterval = setInterval(function () {
5787
+ return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Vertical);
5788
+ }, _this.scrollSettings.interval);
5789
+ }
5790
+ else if (top > visibleBoundaries.bottom - _this.scrollSettings.threshold) {
5791
+ _this.verticalScrollInterval = setInterval(function () {
5792
+ return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Vertical);
5793
+ }, _this.scrollSettings.interval);
5794
+ }
5795
+ });
5796
+ };
5797
+ TimelineScrollableDirective.prototype.cancelScroll = function () {
5798
+ if (isPresent(this.verticalScrollInterval)) {
5799
+ clearInterval(this.verticalScrollInterval);
5800
+ this.verticalScrollInterval = null;
5801
+ }
5802
+ if (isPresent(this.horizontalScrollInterval)) {
5803
+ clearInterval(this.horizontalScrollInterval);
5804
+ this.horizontalScrollInterval = null;
5805
+ }
5806
+ };
5807
+ __decorate([
5808
+ Input(),
5809
+ __metadata("design:type", Object)
5810
+ ], TimelineScrollableDirective.prototype, "scrollSettings", void 0);
5811
+ TimelineScrollableDirective = __decorate([
5812
+ Directive({
5813
+ selector: '[kendoGanttTimelineScrollable]'
5814
+ }),
5815
+ __metadata("design:paramtypes", [ElementRef,
5816
+ TimelineScrollService,
5817
+ NgZone])
5818
+ ], TimelineScrollableDirective);
5819
+ return TimelineScrollableDirective;
5820
+ }());
5821
+
4174
5822
  var TimelineDayViewComponent = /** @class */ (function (_super) {
4175
5823
  __extends(TimelineDayViewComponent, _super);
4176
5824
  function TimelineDayViewComponent(optionChangesService, dependencyDomService) {
@@ -4300,8 +5948,8 @@ var EditDialogComponent = /** @class */ (function () {
4300
5948
  EditDialogComponent.prototype.handleEditingResult = function (editResultType) {
4301
5949
  this.editService.triggerEditEvent(editResultType);
4302
5950
  };
4303
- EditDialogComponent.prototype.onTaskDelete = function () {
4304
- this.editService.showConfirmationDialog.next();
5951
+ EditDialogComponent.prototype.handleTaskDelete = function () {
5952
+ this.editService.taskDelete.next(this.editService.dataItem);
4305
5953
  };
4306
5954
  __decorate([
4307
5955
  Input(),
@@ -4310,7 +5958,7 @@ var EditDialogComponent = /** @class */ (function () {
4310
5958
  EditDialogComponent = __decorate([
4311
5959
  Component({
4312
5960
  selector: 'kendo-gantt-edit-dialog',
4313
- template: "\n <kendo-dialog\n [title]=\"getText('taskEditingDialogTitle')\"\n [width]=\"575\"\n [height]=\"470\"\n (close)=\"handleEditingResult('cancel')\">\n <kendo-dialog-messages\n [closeTitle]=\"getText('taskEditingDialogCloseTitle')\"></kendo-dialog-messages>\n\n <kendo-tabstrip [keepTabContent]=\"true\">\n <kendo-tabstrip-tab [title]=\"getText('taskEditingGeneralTabTitle')\" [selected]=\"true\">\n <ng-template kendoTabContent>\n <kendo-gantt-task-fields></kendo-gantt-task-fields>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingPredecessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"predecessors\"\n dependencyType=\"predecessor\"\n >\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingSuccessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"successors\"\n dependencyType=\"successor\">\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n </kendo-tabstrip>\n\n <kendo-dialog-actions layout=\"normal\">\n <button kendoButton (click)=\"onTaskDelete()\">{{ getText('deleteButtonText') }}</button>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleEditingResult('save')\">{{ getText('saveButtonText') }}</button>\n <button kendoButton (click)=\"handleEditingResult('cancel')\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
5961
+ template: "\n <kendo-dialog\n [title]=\"getText('taskEditingDialogTitle')\"\n [width]=\"575\"\n [height]=\"470\"\n (close)=\"handleEditingResult('cancel')\">\n <kendo-dialog-messages\n [closeTitle]=\"getText('taskEditingDialogCloseTitle')\"></kendo-dialog-messages>\n\n <kendo-tabstrip [keepTabContent]=\"true\" style=\"height: 345px;\">\n <kendo-tabstrip-tab [title]=\"getText('taskEditingGeneralTabTitle')\" [selected]=\"true\">\n <ng-template kendoTabContent>\n <kendo-gantt-task-fields></kendo-gantt-task-fields>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingPredecessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"predecessors\"\n dependencyType=\"predecessor\"\n >\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingSuccessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"successors\"\n dependencyType=\"successor\">\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n </kendo-tabstrip>\n\n <kendo-dialog-actions layout=\"normal\">\n <button\n kendoButton\n [kendoEventsOutsideAngular]=\"{\n click: handleTaskDelete\n }\"\n [scope]=\"this\"\n >\n {{ getText('deleteButtonText') }}\n </button>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleEditingResult('save')\">{{ getText('saveButtonText') }}</button>\n <button kendoButton (click)=\"handleEditingResult('cancel')\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
4314
5962
  }),
4315
5963
  __metadata("design:paramtypes", [MappingService,
4316
5964
  EditService,
@@ -4863,7 +6511,7 @@ var DependenciesTableComponent = /** @class */ (function () {
4863
6511
  DependenciesTableComponent = __decorate([
4864
6512
  Component({
4865
6513
  selector: 'kendo-gantt-dependencies-table',
4866
- template: "\n <kendo-grid\n [data]=\"dependencies\"\n [selectable]=\"{ mode: 'single' }\"\n [(selectedKeys)]=\"selectedKeys\"\n kendoGridSelectBy\n [height]=\"295\"\n >\n <ng-template kendoGridToolbarTemplate>\n <button kendoButton (click)=\"addHandler()\">\n {{ getText('taskEditingDependenciesAddButtonText') }}\n </button>\n <button kendoButton (click)=\"removeHandler()\" [disabled]=\"selectedKeys.length === 0\">\n {{ getText('taskEditingDependenciesRemoveButtonText') }}\n </button>\n </ng-template>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridNameColumnTitle')\" [field]=\"dependencyIdField\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"tasks\"\n textField=\"title\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridTypeColumnTitle')\" field=\"type\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"dependencyTypes\"\n textField=\"type\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n </kendo-grid>\n "
6514
+ template: "\n <kendo-grid\n [data]=\"dependencies\"\n [selectable]=\"{ mode: 'single' }\"\n [(selectedKeys)]=\"selectedKeys\"\n kendoGridSelectBy\n [height]=\"275\"\n >\n <ng-template kendoGridToolbarTemplate>\n <button kendoButton (click)=\"addHandler()\">\n {{ getText('taskEditingDependenciesAddButtonText') }}\n </button>\n <button kendoButton (click)=\"removeHandler()\" [disabled]=\"selectedKeys.length === 0\">\n {{ getText('taskEditingDependenciesRemoveButtonText') }}\n </button>\n </ng-template>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridNameColumnTitle')\" [field]=\"dependencyIdField\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"tasks\"\n textField=\"title\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridTypeColumnTitle')\" field=\"type\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"dependencyTypes\"\n textField=\"type\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n </kendo-grid>\n "
4867
6515
  }),
4868
6516
  __metadata("design:paramtypes", [MappingService,
4869
6517
  EditService,
@@ -4897,7 +6545,7 @@ var TaskFieldsComponent = /** @class */ (function () {
4897
6545
  TaskFieldsComponent = __decorate([
4898
6546
  Component({
4899
6547
  selector: 'kendo-gantt-task-fields',
4900
- template: "\n <form class=\"k-form\" [formGroup]=\"formGroup\">\n <kendo-formfield *ngIf=\"formGroup.contains(mapper.taskFields.title)\">\n <kendo-label [for]=\"mapper.taskFields.title\" [text]=\"getText('titleFieldInputLabel')\"></kendo-label>\n <input class=\"k-textbox\" [formControlName]=\"mapper.taskFields.title\" />\n </kendo-formfield>\n <div class=\"k-hstack\">\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.start)\">\n <kendo-label [for]=\"mapper.taskFields.start\" [text]=\"getText('startFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.start\"></kendo-datetimepicker>\n </kendo-formfield>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.end)\">\n <kendo-label [for]=\"mapper.taskFields.end\" [text]=\"getText('endFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.end\"></kendo-datetimepicker>\n </kendo-formfield>\n </div>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.completionRatio)\">\n <kendo-label [for]=\"mapper.taskFields.completionRatio\" [text]=\"getText('completionRatioFieldInputLabel')\"></kendo-label>\n <kendo-numerictextbox\n [formControlName]=\"mapper.taskFields.completionRatio\"\n [min]=\"0\"\n [max]=\"1\"\n [decimals]=\"2\"\n format=\"p2\"\n [step]=\"0.01\"\n ></kendo-numerictextbox>\n </kendo-formfield>\n </form>\n "
6548
+ template: "\n <form class=\"k-form\" [formGroup]=\"formGroup\">\n <kendo-formfield *ngIf=\"formGroup.contains(mapper.taskFields.title)\">\n <kendo-label [for]=\"mapper.taskFields.title\" [text]=\"getText('titleFieldInputLabel')\"></kendo-label>\n <input kendoTextBox [formControlName]=\"mapper.taskFields.title\" />\n </kendo-formfield>\n <div class=\"k-hstack\">\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.start)\">\n <kendo-label [for]=\"mapper.taskFields.start\" [text]=\"getText('startFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.start\"></kendo-datetimepicker>\n </kendo-formfield>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.end)\">\n <kendo-label [for]=\"mapper.taskFields.end\" [text]=\"getText('endFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.end\"></kendo-datetimepicker>\n </kendo-formfield>\n </div>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.completionRatio)\">\n <kendo-label [for]=\"mapper.taskFields.completionRatio\" [text]=\"getText('completionRatioFieldInputLabel')\"></kendo-label>\n <kendo-numerictextbox\n [formControlName]=\"mapper.taskFields.completionRatio\"\n [min]=\"0\"\n [max]=\"1\"\n [decimals]=\"2\"\n format=\"p2\"\n [step]=\"0.01\"\n ></kendo-numerictextbox>\n </kendo-formfield>\n </form>\n "
4901
6549
  }),
4902
6550
  __metadata("design:paramtypes", [MappingService,
4903
6551
  EditService,
@@ -4918,6 +6566,8 @@ var IMPORTED_MODULES = [
4918
6566
  ButtonsModule,
4919
6567
  DialogModule,
4920
6568
  EventsModule,
6569
+ PopupModule,
6570
+ DraggableModule,
4921
6571
  TabStripModule,
4922
6572
  GridModule,
4923
6573
  DropDownsModule
@@ -4950,6 +6600,7 @@ var DECLARATIONS = [
4950
6600
  FooterTemplateDirective,
4951
6601
  GanttExpandableDirective,
4952
6602
  GanttDependencyDirective,
6603
+ DependencyDragCreateDirective,
4953
6604
  TimelineDayViewComponent,
4954
6605
  TimelineWeekViewComponent,
4955
6606
  TimelineMonthViewComponent,
@@ -4958,9 +6609,12 @@ var DECLARATIONS = [
4958
6609
  CustomMessagesComponent,
4959
6610
  LocalizedMessagesDirective,
4960
6611
  GanttAddTaskComponent,
6612
+ DragValidationTooltipComponent,
6613
+ TimelineScrollableDirective,
4961
6614
  DependenciesTableComponent,
4962
6615
  TaskFieldsComponent
4963
6616
  ];
6617
+ var ɵ0$3 = touchEnabled;
4964
6618
  /**
4965
6619
  * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
4966
6620
  * definition for the Gantt component.
@@ -5000,58 +6654,21 @@ var GanttModule = /** @class */ (function () {
5000
6654
  imports: IMPORTED_MODULES.slice(),
5001
6655
  declarations: DECLARATIONS.slice(),
5002
6656
  exports: DECLARATIONS.slice(),
6657
+ entryComponents: [DragValidationTooltipComponent],
5003
6658
  providers: [{
5004
6659
  provide: L10N_PREFIX,
5005
6660
  useValue: 'kendo.gantt'
6661
+ }, {
6662
+ provide: TOUCH_ENABLED,
6663
+ useValue: ɵ0$3
5006
6664
  }]
5007
6665
  })
5008
6666
  ], GanttModule);
5009
6667
  return GanttModule;
5010
6668
  }());
5011
6669
 
5012
- /**
5013
- * @hidden
5014
- */
5015
- var PreventableEvent = /** @class */ (function () {
5016
- function PreventableEvent() {
5017
- this.prevented = false;
5018
- }
5019
- /**
5020
- * Prevents the default action for a specified event.
5021
- * In this way, the source component suppresses
5022
- * the built-in behavior that follows the event.
5023
- */
5024
- PreventableEvent.prototype.preventDefault = function () {
5025
- this.prevented = true;
5026
- };
5027
- /**
5028
- * Returns `true` if the event was prevented
5029
- * by any of its subscribers.
5030
- *
5031
- * @returns `true` if the default action was prevented.
5032
- * Otherwise, returns `false`.
5033
- */
5034
- PreventableEvent.prototype.isDefaultPrevented = function () {
5035
- return this.prevented;
5036
- };
5037
- return PreventableEvent;
5038
- }());
5039
-
5040
- /**
5041
- * Called every time a user leaves an edited cell.
5042
- */
5043
- var CellCloseEvent = /** @class */ (function (_super) {
5044
- __extends(CellCloseEvent, _super);
5045
- function CellCloseEvent(options) {
5046
- var _this = _super.call(this) || this;
5047
- Object.assign(_this, options);
5048
- return _this;
5049
- }
5050
- return CellCloseEvent;
5051
- }(PreventableEvent));
5052
-
5053
6670
  /**
5054
6671
  * Generated bundle index. Do not edit.
5055
6672
  */
5056
6673
 
5057
- export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttAddTaskComponent, DependenciesTableComponent, EditDialogComponent, EditService, TaskFieldsComponent, CustomMessagesComponent, GanttLocalizationService, LocalizedMessagesDirective, Messages, PreventableEvent, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, DependencyType, CellCloseEvent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };
6674
+ export { MappingService, OptionChangesService, TOUCH_ENABLED, DependencyDomService, GanttDependencyDirective, DragValidationTooltipComponent, GanttAddTaskComponent, DependenciesTableComponent, EditDialogComponent, EditService, TaskFieldsComponent, CustomMessagesComponent, GanttLocalizationService, LocalizedMessagesDirective, Messages, PreventableEvent, NavigationService, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, TimelineScrollableDirective, TimelineScrollService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, DependencyDragCreateDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, DependencyType, CellCloseEvent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };