@progress/kendo-angular-gantt 17.2.1-develop.2 → 17.3.0-develop.2

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 (45) hide show
  1. package/directives.d.ts +3 -1
  2. package/dragging/task-drag.directive.d.ts +29 -0
  3. package/dragging/task-drag.service.d.ts +49 -0
  4. package/esm2022/directives.mjs +5 -1
  5. package/esm2022/dragging/task-drag.directive.mjs +81 -0
  6. package/esm2022/dragging/task-drag.service.mjs +231 -0
  7. package/esm2022/gantt.component.mjs +49 -9
  8. package/esm2022/gantt.module.mjs +3 -1
  9. package/esm2022/index.mjs +2 -0
  10. package/esm2022/localization/messages.mjs +13 -1
  11. package/esm2022/models/events/{task-move-start-event.interface.mjs → index.mjs} +1 -1
  12. package/esm2022/models/models.mjs +2 -1
  13. package/esm2022/package-metadata.mjs +2 -2
  14. package/esm2022/rendering/gantt-task-base.mjs +9 -1
  15. package/esm2022/rendering/gantt-task.component.mjs +20 -7
  16. package/esm2022/rendering/gantt-tasks-table-body.component.mjs +35 -12
  17. package/esm2022/template-directives/task-tooltip-template.directive.mjs +49 -0
  18. package/esm2022/timeline/gantt-timeline.component.mjs +205 -13
  19. package/fesm2022/progress-kendo-angular-gantt.mjs +681 -66
  20. package/gantt.component.d.ts +18 -2
  21. package/gantt.module.d.ts +3 -1
  22. package/index.d.ts +2 -0
  23. package/localization/messages.d.ts +9 -1
  24. package/models/events/index.d.ts +21 -0
  25. package/models/events/task-drag-event.interface.d.ts +67 -0
  26. package/models/models.d.ts +4 -24
  27. package/models/tooltip-options.interface.d.ts +28 -0
  28. package/package.json +16 -15
  29. package/rendering/gantt-task-base.d.ts +7 -1
  30. package/rendering/gantt-task.component.d.ts +1 -0
  31. package/rendering/gantt-tasks-table-body.component.d.ts +7 -2
  32. package/schematics/ngAdd/index.js +7 -7
  33. package/template-directives/task-tooltip-template.directive.d.ts +38 -0
  34. package/timeline/gantt-timeline.component.d.ts +31 -6
  35. package/esm2022/models/events/task-resize-end-event.interface.mjs +0 -5
  36. package/esm2022/models/events/task-resize-event.interface.mjs +0 -5
  37. package/esm2022/models/events/task-resize-start-event.interface.mjs +0 -5
  38. package/models/events/task-move-end-event.interface.d.ts +0 -12
  39. package/models/events/task-move-event.interface.d.ts +0 -23
  40. package/models/events/task-move-start-event.interface.d.ts +0 -15
  41. package/models/events/task-resize-end-event.interface.d.ts +0 -12
  42. package/models/events/task-resize-event.interface.d.ts +0 -23
  43. package/models/events/task-resize-start-event.interface.d.ts +0 -15
  44. /package/esm2022/models/events/{task-move-end-event.interface.mjs → task-drag-event.interface.mjs} +0 -0
  45. /package/esm2022/models/{events/task-move-event.interface.mjs → tooltip-options.interface.mjs} +0 -0
@@ -3,21 +3,23 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, Directive, Input, EventEmitter, Inject, LOCALE_ID, isDevMode, HostBinding, ViewChild, forwardRef, Component, ViewContainerRef, Output, Optional, QueryList, SkipSelf, Host, ContentChildren, ContentChild, HostListener, NgModule } from '@angular/core';
6
+ import { Injectable, Directive, Input, EventEmitter, Inject, LOCALE_ID, inject, isDevMode, HostBinding, ViewChild, forwardRef, Component, Output, Optional, ViewContainerRef, ViewEncapsulation, QueryList, SkipSelf, Host, ContentChildren, ContentChild, HostListener, NgModule } from '@angular/core';
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListSpacerComponent, DataBoundTreeComponent, ExpandableTreeComponent, TreeListComponent, CustomMessagesComponent as CustomMessagesComponent$2, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, ColumnResizingService } from '@progress/kendo-angular-treelist';
8
8
  import { cloneDate, addWeeks, firstDayInWeek, addDays, lastDayOfMonth, getDate, firstDayOfMonth, addMonths, lastMonthOfYear, MS_PER_HOUR, MS_PER_DAY, isEqual } from '@progress/kendo-date-math';
9
9
  import { Subject, Subscription, fromEvent, forkJoin, EMPTY, isObservable, of } from 'rxjs';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
- import { Keys, isDocumentAvailable, closestInScope, matchesClasses, EventsOutsideAngularDirective, DraggableDirective, PreventableEvent, anyChanged, closest, isFocusable, focusableSelector, isVisible, shouldShowValidationUI, hasObservers, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
11
+ import { Keys, isDocumentAvailable, closestInScope, matchesClasses, isPresent as isPresent$1, EventsOutsideAngularDirective, DraggableDirective, PreventableEvent, anyChanged, closest, isFocusable, focusableSelector, isVisible, shouldShowValidationUI, hasObservers, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
12
12
  import { map, distinctUntilChanged, take, switchMap, expand, reduce, filter } from 'rxjs/operators';
13
13
  import { getter, touchEnabled } from '@progress/kendo-common';
14
14
  import * as i1 from '@progress/kendo-angular-intl';
15
- import { IntlService } from '@progress/kendo-angular-intl';
15
+ import { IntlService, DatePipe, NumberPipe } from '@progress/kendo-angular-intl';
16
16
  import { __decorate, __param, __metadata } from 'tslib';
17
17
  import { orderBy } from '@progress/kendo-data-query';
18
18
  import { xIcon, plusIcon, minusIcon, saveIcon, cancelOutlineIcon, trashIcon } from '@progress/kendo-svg-icons';
19
19
  import { NgClass, NgIf, NgTemplateOutlet, NgFor } from '@angular/common';
20
20
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
21
+ import * as i6 from '@progress/kendo-angular-tooltip';
22
+ import { TooltipDirective, KENDO_TOOLTIP } from '@progress/kendo-angular-tooltip';
21
23
  import * as i1$1 from '@progress/kendo-angular-l10n';
22
24
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
23
25
  import * as i4 from '@angular/forms';
@@ -32,6 +34,8 @@ import { DialogComponent, CustomMessagesComponent as CustomMessagesComponent$1,
32
34
  import { TabStripComponent, TabStripTabComponent, TabContentDirective, SplitterComponent, SplitterPaneComponent } from '@progress/kendo-angular-layout';
33
35
  import * as i3 from '@progress/kendo-angular-popup';
34
36
  import { PopupService } from '@progress/kendo-angular-popup';
37
+ import * as i3$1 from '@progress/kendo-angular-utils';
38
+ import { DragTargetContainerDirective } from '@progress/kendo-angular-utils';
35
39
 
36
40
  /**
37
41
  * @hidden
@@ -40,8 +44,8 @@ const packageMetadata = {
40
44
  name: '@progress/kendo-angular-gantt',
41
45
  productName: 'Kendo UI for Angular',
42
46
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
43
- publishDate: 1736177768,
44
- version: '17.2.1-develop.2',
47
+ publishDate: 1736180932,
48
+ version: '17.3.0-develop.2',
45
49
  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'
46
50
  };
47
51
 
@@ -1860,6 +1864,228 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1860
1864
  type: Injectable
1861
1865
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1862
1866
 
1867
+ /**
1868
+ * @hidden
1869
+ */
1870
+ class TaskDragService {
1871
+ mapper;
1872
+ zone;
1873
+ taskDraggable;
1874
+ drag = new Subject();
1875
+ dragEnd = new Subject();
1876
+ dragStart = new Subject();
1877
+ tasksContainer;
1878
+ tasksContainerRect;
1879
+ scrollableContainer;
1880
+ currentDragTask;
1881
+ currentDragTaskRect;
1882
+ leftDragHandle;
1883
+ rightDragHandle;
1884
+ completionRatioHandle;
1885
+ tasks = [];
1886
+ editedProp;
1887
+ prevX;
1888
+ prevWidth;
1889
+ prevLeft;
1890
+ prevScrollLeft;
1891
+ newRange;
1892
+ offsetX;
1893
+ maxWidth;
1894
+ newCompletionRatio;
1895
+ constructor(mapper, zone) {
1896
+ this.mapper = mapper;
1897
+ this.zone = zone;
1898
+ }
1899
+ registerTask(task) {
1900
+ if (!this.tasks.some(t => t === task)) {
1901
+ this.tasks.push(task);
1902
+ }
1903
+ }
1904
+ onDragStart(args) {
1905
+ this.tasksContainerRect = this.tasksContainer.getBoundingClientRect();
1906
+ this.currentDragTask = this.tasks.find(t => t.taskElement.nativeElement.contains(args.dragTarget) || t.taskElement.nativeElement.nextElementSibling === args.dragTarget);
1907
+ const taskEl = this.currentDragTask.taskElement.nativeElement;
1908
+ this.currentDragTaskRect = taskEl.getBoundingClientRect();
1909
+ this.completionRatioHandle = args.dragTarget.classList.contains('k-task-draghandle');
1910
+ this.leftDragHandle = args.dragTarget.classList.contains('k-resize-w');
1911
+ this.rightDragHandle = args.dragTarget.classList.contains('k-resize-e');
1912
+ this.editedProp = this.leftDragHandle ? 'start' : this.rightDragHandle ? 'end' : 'both';
1913
+ this.dragStart.next(args);
1914
+ }
1915
+ onDrag(args) {
1916
+ if (this.completionRatioHandle) { // completion ratio handle drag
1917
+ const taskWidth = this.currentDragTaskRect.width;
1918
+ const scrollLeft = this.scrollableContainer?.scrollLeft;
1919
+ const scrollDelta = isPresent$1(this.prevScrollLeft) ? this.prevScrollLeft - scrollLeft : 0;
1920
+ const completionWidth = Math.min(Math.max(args.dragEvent.clientX - this.currentDragTaskRect.left - scrollDelta, 0), taskWidth);
1921
+ const newCompletionRatio = completionWidth / taskWidth;
1922
+ this.currentDragTask.draggedCompletionWidth = completionWidth;
1923
+ !this.prevScrollLeft && (this.prevScrollLeft = scrollLeft);
1924
+ this.newCompletionRatio = newCompletionRatio;
1925
+ this.drag.next({
1926
+ start: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start'),
1927
+ end: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end'),
1928
+ completionRatio: newCompletionRatio,
1929
+ dragEvent: args,
1930
+ item: this.currentDragTask.dataItem,
1931
+ offset: this.prevX,
1932
+ width: this.prevWidth
1933
+ });
1934
+ }
1935
+ else { // task resize or drag
1936
+ const marquee = this.calculateMarquee(args, this.leftDragHandle, this.rightDragHandle);
1937
+ if (!marquee) {
1938
+ return;
1939
+ }
1940
+ const { left, width } = marquee;
1941
+ this.newRange = this.calculateStartEnd(this.editedProp, width, left);
1942
+ this.drag.next({
1943
+ start: this.newRange.start,
1944
+ end: this.newRange.end,
1945
+ completionRatio: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'completionRatio'),
1946
+ dragEvent: args,
1947
+ item: this.currentDragTask.dataItem,
1948
+ offset: left,
1949
+ width
1950
+ });
1951
+ }
1952
+ }
1953
+ onDragEnd(args) {
1954
+ if (this.completionRatioHandle) {
1955
+ this.dragEnd.next({
1956
+ start: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start'),
1957
+ end: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end'),
1958
+ completionRatio: this.newCompletionRatio,
1959
+ dragEvent: args,
1960
+ item: this.currentDragTask.dataItem,
1961
+ offset: this.prevX,
1962
+ width: this.prevWidth
1963
+ });
1964
+ }
1965
+ else {
1966
+ this.dragEnd.next({
1967
+ start: this.newRange.start,
1968
+ end: this.newRange.end,
1969
+ completionRatio: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'completionRatio'),
1970
+ dragEvent: args,
1971
+ item: this.currentDragTask.dataItem,
1972
+ offset: this.prevX,
1973
+ width: this.prevWidth
1974
+ });
1975
+ }
1976
+ this.prevWidth = this.prevX = this.prevLeft = this.prevScrollLeft = this.offsetX = this.maxWidth = this.newCompletionRatio = null;
1977
+ this.currentDragTaskRect = this.currentDragTask = this.currentDragTask.draggedCompletionWidth = this.editedProp = this.newRange = null;
1978
+ this.leftDragHandle = this.rightDragHandle = this.completionRatioHandle = false;
1979
+ }
1980
+ calculateMarquee(e, leftDragHandle, rightDragHandle) {
1981
+ const clientX = e.dragEvent.clientX;
1982
+ // Update container rect when dragging outside of it to avoid miscalculations
1983
+ // coming from scrolling the whole page during dragging a task
1984
+ if (clientX < this.tasksContainerRect.x || clientX > this.tasksContainerRect.right) {
1985
+ this.zone.runOutsideAngular(() => {
1986
+ this.tasksContainerRect = this.tasksContainer.getBoundingClientRect();
1987
+ this.currentDragTaskRect = this.currentDragTask.taskElement.nativeElement.getBoundingClientRect();
1988
+ });
1989
+ return;
1990
+ }
1991
+ const scrollLeft = this.scrollableContainer?.scrollLeft;
1992
+ const scrollDelta = isPresent$1(this.prevScrollLeft) ? this.prevScrollLeft - scrollLeft : 0;
1993
+ let left, width;
1994
+ if (leftDragHandle) {
1995
+ if (!isPresent$1(this.maxWidth)) {
1996
+ this.maxWidth = this.currentDragTaskRect.right - this.tasksContainerRect.x + scrollLeft;
1997
+ }
1998
+ left = Math.min(Math.max(clientX - this.tasksContainerRect.x - scrollDelta, 0), this.maxWidth);
1999
+ width = Math.min(Math.max(this.currentDragTaskRect.right - clientX + scrollDelta, 0), this.maxWidth);
2000
+ }
2001
+ else if (rightDragHandle) {
2002
+ if (!isPresent$1(this.maxWidth)) {
2003
+ this.maxWidth = this.tasksContainerRect.right - this.currentDragTaskRect.x;
2004
+ }
2005
+ left = this.prevLeft ?? (this.currentDragTaskRect.x - this.tasksContainerRect.x);
2006
+ width = Math.min(Math.max(clientX - this.tasksContainerRect.x - left - scrollDelta, 0), this.maxWidth);
2007
+ }
2008
+ else { // dragging the whole task
2009
+ if (!isPresent$1(this.offsetX)) {
2010
+ this.offsetX = e.dragEvent.offsetX;
2011
+ }
2012
+ left = Math.max(clientX - this.tasksContainerRect.x - this.offsetX - scrollDelta, 0);
2013
+ }
2014
+ const cursorLeft = clientX - this.tasksContainerRect.x;
2015
+ // out of limits (0, max possible width) when dragging the left handle
2016
+ if (this.leftDragHandle && (cursorLeft < 0 || this.maxWidth < cursorLeft)) {
2017
+ return {
2018
+ left: cursorLeft < 0 ? 0 : this.maxWidth,
2019
+ width
2020
+ };
2021
+ }
2022
+ // out of limits (0, max possible width) when dragging right handle
2023
+ if (rightDragHandle && (clientX < this.currentDragTaskRect.x) || clientX > this.tasksContainerRect.right) {
2024
+ return {
2025
+ left,
2026
+ width: clientX < this.currentDragTaskRect.x ? 0 : this.maxWidth
2027
+ };
2028
+ }
2029
+ // out of limits (start < view start || end > view end) when dragging the whole task
2030
+ if (!(this.leftDragHandle || this.rightDragHandle) && (left < 0 || (clientX + this.currentDragTaskRect.width - scrollDelta - this.offsetX > this.tasksContainerRect.right))) {
2031
+ return {
2032
+ left: Math.min(Math.max(left, 0), this.tasksContainerRect.width - this.currentDragTaskRect.width),
2033
+ width: this.currentDragTaskRect.width
2034
+ };
2035
+ }
2036
+ this.prevX = clientX;
2037
+ this.prevLeft = left;
2038
+ this.prevWidth = width;
2039
+ !this.prevScrollLeft && (this.prevScrollLeft = scrollLeft);
2040
+ return {
2041
+ left,
2042
+ width: width ?? this.currentDragTaskRect.width
2043
+ };
2044
+ }
2045
+ calculateStartEnd(editedProp, width, left) {
2046
+ const startDate = this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start');
2047
+ const endDate = this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end');
2048
+ const duration = endDate - startDate;
2049
+ const delta = left - this.currentDragTaskRect.x + this.tasksContainerRect.x;
2050
+ if (editedProp === 'both') {
2051
+ if (duration) {
2052
+ const delta = left - this.currentDragTaskRect.x + this.tasksContainerRect.left;
2053
+ const coef = delta / this.currentDragTask.taskWidth;
2054
+ const deltaMs = duration * coef;
2055
+ const newStart = new Date(startDate.getTime() + deltaMs);
2056
+ const newEnd = new Date(newStart.getTime() + duration);
2057
+ return {
2058
+ start: newStart,
2059
+ end: newEnd
2060
+ };
2061
+ }
2062
+ else { // milestone task
2063
+ const initialOffset = this.currentDragTaskRect.x - this.tasksContainerRect.x;
2064
+ const msPerPx = (startDate - this.currentDragTask.viewService.viewStart) / initialOffset;
2065
+ const deltaMs = delta * msPerPx;
2066
+ return {
2067
+ start: new Date(startDate.getTime() + deltaMs),
2068
+ end: new Date(startDate.getTime() + deltaMs)
2069
+ };
2070
+ }
2071
+ }
2072
+ const coef = width / this.currentDragTask.taskWidth;
2073
+ const newDuration = duration * coef;
2074
+ const newPropDate = editedProp === 'start' ? new Date(endDate - newDuration) : new Date(startDate.getTime() + newDuration);
2075
+ const newStart = editedProp === 'start' ? newPropDate : startDate;
2076
+ const newEnd = editedProp === 'end' ? newPropDate : endDate;
2077
+ return {
2078
+ start: newStart,
2079
+ end: newEnd
2080
+ };
2081
+ }
2082
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService, deps: [{ token: MappingService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
2083
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService });
2084
+ }
2085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService, decorators: [{
2086
+ type: Injectable
2087
+ }], ctorParameters: function () { return [{ type: MappingService }, { type: i0.NgZone }]; } });
2088
+
1863
2089
  const slotUnitDuration = {
1864
2090
  day: MS_PER_HOUR,
1865
2091
  week: MS_PER_DAY,
@@ -1959,6 +2185,9 @@ class GanttTaskBase {
1959
2185
  // fall-back to 0 in case no completionRatio is provided
1960
2186
  return isNumber(overlayWidth) ? overlayWidth : 0;
1961
2187
  }
2188
+ draggedCompletionWidth;
2189
+ taskDragService;
2190
+ completionDragResult;
1962
2191
  subscriptions = new Subscription();
1963
2192
  constructor(mapper, // left public to be available for usage in the templates
1964
2193
  timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
@@ -1968,6 +2197,7 @@ class GanttTaskBase {
1968
2197
  this.optionChangesService = optionChangesService;
1969
2198
  this.cdr = cdr;
1970
2199
  this.navigationService = navigationService;
2200
+ this.taskDragService = inject(TaskDragService, { optional: true });
1971
2201
  this.subscriptions.add(this.optionChangesService.viewChanges
1972
2202
  .subscribe(() => this.cdr.markForCheck()));
1973
2203
  this.subscriptions.add(this.navigationService.taskStatusChanges
@@ -1986,6 +2216,9 @@ class GanttTaskBase {
1986
2216
  }
1987
2217
  }
1988
2218
  }
2219
+ ngAfterViewInit() {
2220
+ this.taskDragService?.registerTask(this);
2221
+ }
1989
2222
  ngOnChanges(changes) {
1990
2223
  if (isPresent(changes['dataItem'])) {
1991
2224
  if (isPresent(changes['dataItem'].previousValue)) {
@@ -2066,6 +2299,9 @@ class GanttTaskComponent extends GanttTaskBase {
2066
2299
  taskTemplate;
2067
2300
  xIcon = xIcon;
2068
2301
  touchEnabled = touchEnabled;
2302
+ get showDragHandles() {
2303
+ return isPresent$1(this.taskDragService);
2304
+ }
2069
2305
  constructor(editService, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
2070
2306
  super(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService);
2071
2307
  this.editService = editService;
@@ -2095,7 +2331,7 @@ class GanttTaskComponent extends GanttTaskBase {
2095
2331
  <ng-container *ngIf="!taskTemplate">
2096
2332
  <div
2097
2333
  class="k-task-complete"
2098
- [style.width.px]="completionOverlayWidth"
2334
+ [style.width.px]="draggedCompletionWidth ?? completionOverlayWidth"
2099
2335
  aria-hidden="true"
2100
2336
  >
2101
2337
  </div>
@@ -2127,6 +2363,10 @@ class GanttTaskComponent extends GanttTaskBase {
2127
2363
  [svgIcon]="xIcon"></kendo-icon-wrapper>
2128
2364
  </span>
2129
2365
  </span>
2366
+ <ng-container *ngIf="showDragHandles">
2367
+ <span class="k-resize-handle k-resize-w"></span>
2368
+ <span class="k-resize-handle k-resize-e"></span>
2369
+ </ng-container>
2130
2370
  </div>
2131
2371
  </ng-container>
2132
2372
  <ng-template
@@ -2136,9 +2376,10 @@ class GanttTaskComponent extends GanttTaskBase {
2136
2376
  $implicit: dataItem,
2137
2377
  elementWidth: taskWidth
2138
2378
  }"
2139
- >
2140
- </ng-template>
2379
+ ></ng-template>
2141
2380
  </div>
2381
+ <div class="k-task-draghandle" *ngIf="showDragHandles"
2382
+ [style.left.px]="draggedCompletionWidth ?? completionOverlayWidth"></div>
2142
2383
  <ng-container *ngIf="renderDependencyDragClues">
2143
2384
  <div
2144
2385
  class="k-task-dot k-task-start k-touch-action-none"
@@ -2178,7 +2419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2178
2419
  <ng-container *ngIf="!taskTemplate">
2179
2420
  <div
2180
2421
  class="k-task-complete"
2181
- [style.width.px]="completionOverlayWidth"
2422
+ [style.width.px]="draggedCompletionWidth ?? completionOverlayWidth"
2182
2423
  aria-hidden="true"
2183
2424
  >
2184
2425
  </div>
@@ -2210,6 +2451,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2210
2451
  [svgIcon]="xIcon"></kendo-icon-wrapper>
2211
2452
  </span>
2212
2453
  </span>
2454
+ <ng-container *ngIf="showDragHandles">
2455
+ <span class="k-resize-handle k-resize-w"></span>
2456
+ <span class="k-resize-handle k-resize-e"></span>
2457
+ </ng-container>
2213
2458
  </div>
2214
2459
  </ng-container>
2215
2460
  <ng-template
@@ -2219,9 +2464,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2219
2464
  $implicit: dataItem,
2220
2465
  elementWidth: taskWidth
2221
2466
  }"
2222
- >
2223
- </ng-template>
2467
+ ></ng-template>
2224
2468
  </div>
2469
+ <div class="k-task-draghandle" *ngIf="showDragHandles"
2470
+ [style.left.px]="draggedCompletionWidth ?? completionOverlayWidth"></div>
2225
2471
  <ng-container *ngIf="renderDependencyDragClues">
2226
2472
  <div
2227
2473
  class="k-task-dot k-task-start k-touch-action-none"
@@ -2487,16 +2733,27 @@ class GanttTasksTableBodyComponent {
2487
2733
  isExpanded;
2488
2734
  isTaskSelected;
2489
2735
  renderDependencyDragClues;
2736
+ taskPointerEnter = new EventEmitter();
2737
+ taskPointerLeave = new EventEmitter();
2490
2738
  constructor(dependencyDomService, mapper) {
2491
2739
  this.dependencyDomService = dependencyDomService;
2492
2740
  this.mapper = mapper;
2493
2741
  }
2742
+ trackBy = (_, item) => this.mapper.extractFromTask(item, 'id');
2494
2743
  isMileStone(item) {
2495
2744
  return !item.hasChildren && isEqual(this.mapper.extractFromTask(item.data, 'start'), this.mapper.extractFromTask(item.data, 'end'));
2496
2745
  }
2746
+ mapItemToTask(item) {
2747
+ const mappedItem = ['id', 'title', 'completionRatio', 'start', 'end']
2748
+ .reduce((acc, curr) => {
2749
+ acc[curr] = this.mapper.extractFromTask(item.data, curr);
2750
+ return acc;
2751
+ }, {});
2752
+ return mappedItem;
2753
+ }
2497
2754
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTasksTableBodyComponent, deps: [{ token: DependencyDomService }, { token: MappingService }], target: i0.ɵɵFactoryTarget.Component });
2498
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttTasksTableBodyComponent, isStandalone: true, selector: "[kendoGanttTasksTableBody]", inputs: { selectable: "selectable", rows: "rows", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", isExpanded: "isExpanded", isTaskSelected: "isTaskSelected", renderDependencyDragClues: "renderDependencyDragClues" }, viewQueries: [{ propertyName: "timelineRow", first: true, predicate: ["timelineRow"], descendants: true }], ngImport: i0, template: `
2499
- <tr class="k-table-row" #timelineRow *ngFor="let item of rows; let index = index">
2755
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttTasksTableBodyComponent, isStandalone: true, selector: "[kendoGanttTasksTableBody]", inputs: { selectable: "selectable", rows: "rows", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", isExpanded: "isExpanded", isTaskSelected: "isTaskSelected", renderDependencyDragClues: "renderDependencyDragClues" }, outputs: { taskPointerEnter: "taskPointerEnter", taskPointerLeave: "taskPointerLeave" }, viewQueries: [{ propertyName: "timelineRow", first: true, predicate: ["timelineRow"], descendants: true }], ngImport: i0, template: `
2756
+ <tr class="k-table-row" #timelineRow *ngFor="let item of rows; let index = index; trackBy: trackBy ">
2500
2757
  <td class="k-table-td">
2501
2758
  <kendo-gantt-milestone-task
2502
2759
  *ngIf="isMileStone(item); else task"
@@ -2508,6 +2765,8 @@ class GanttTasksTableBodyComponent {
2508
2765
  [isSelected]="isTaskSelected"
2509
2766
  [index]="index"
2510
2767
  [renderDependencyDragClues]="renderDependencyDragClues"
2768
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2769
+ (pointerleave)="taskPointerLeave.emit()"
2511
2770
  >
2512
2771
  </kendo-gantt-milestone-task>
2513
2772
  <ng-template #task>
@@ -2523,8 +2782,9 @@ class GanttTasksTableBodyComponent {
2523
2782
  [isExpanded]="isExpanded"
2524
2783
  [index]="index"
2525
2784
  [renderDependencyDragClues]="renderDependencyDragClues"
2526
- >
2527
- </kendo-gantt-summary-task>
2785
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2786
+ (pointerleave)="taskPointerLeave.emit()"
2787
+ ></kendo-gantt-summary-task>
2528
2788
  <kendo-gantt-task
2529
2789
  *ngIf="!item.hasChildren"
2530
2790
  [dataItem]="item.data"
@@ -2537,8 +2797,9 @@ class GanttTasksTableBodyComponent {
2537
2797
  [isSelected]="isTaskSelected"
2538
2798
  [index]="index"
2539
2799
  [renderDependencyDragClues]="renderDependencyDragClues"
2540
- >
2541
- </kendo-gantt-task>
2800
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2801
+ (pointerleave)="taskPointerLeave.emit()"
2802
+ ></kendo-gantt-task>
2542
2803
  </ng-template>
2543
2804
  </td>
2544
2805
  </tr>
@@ -2550,7 +2811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2550
2811
  // eslint-disable-next-line @angular-eslint/component-selector
2551
2812
  selector: '[kendoGanttTasksTableBody]',
2552
2813
  template: `
2553
- <tr class="k-table-row" #timelineRow *ngFor="let item of rows; let index = index">
2814
+ <tr class="k-table-row" #timelineRow *ngFor="let item of rows; let index = index; trackBy: trackBy ">
2554
2815
  <td class="k-table-td">
2555
2816
  <kendo-gantt-milestone-task
2556
2817
  *ngIf="isMileStone(item); else task"
@@ -2562,6 +2823,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2562
2823
  [isSelected]="isTaskSelected"
2563
2824
  [index]="index"
2564
2825
  [renderDependencyDragClues]="renderDependencyDragClues"
2826
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2827
+ (pointerleave)="taskPointerLeave.emit()"
2565
2828
  >
2566
2829
  </kendo-gantt-milestone-task>
2567
2830
  <ng-template #task>
@@ -2577,8 +2840,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2577
2840
  [isExpanded]="isExpanded"
2578
2841
  [index]="index"
2579
2842
  [renderDependencyDragClues]="renderDependencyDragClues"
2580
- >
2581
- </kendo-gantt-summary-task>
2843
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2844
+ (pointerleave)="taskPointerLeave.emit()"
2845
+ ></kendo-gantt-summary-task>
2582
2846
  <kendo-gantt-task
2583
2847
  *ngIf="!item.hasChildren"
2584
2848
  [dataItem]="item.data"
@@ -2591,8 +2855,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2591
2855
  [isSelected]="isTaskSelected"
2592
2856
  [index]="index"
2593
2857
  [renderDependencyDragClues]="renderDependencyDragClues"
2594
- >
2595
- </kendo-gantt-task>
2858
+ (pointerenter)="taskPointerEnter.emit(mapItemToTask(item))"
2859
+ (pointerleave)="taskPointerLeave.emit()"
2860
+ ></kendo-gantt-task>
2596
2861
  </ng-template>
2597
2862
  </td>
2598
2863
  </tr>
@@ -2623,6 +2888,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2623
2888
  type: Input
2624
2889
  }], renderDependencyDragClues: [{
2625
2890
  type: Input
2891
+ }], taskPointerEnter: [{
2892
+ type: Output
2893
+ }], taskPointerLeave: [{
2894
+ type: Output
2626
2895
  }] } });
2627
2896
 
2628
2897
  /**
@@ -2860,6 +3129,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2860
3129
  type: Input
2861
3130
  }] } });
2862
3131
 
3132
+ /**
3133
+ * Represents a template that defines the whole content of the Task tooltip.
3134
+ * To define the template, nest an `<ng-template>` tag
3135
+ * with the `kendoGanttTaskTooltipTemplate` directive inside the `<kendo-gantt>` tag.
3136
+ *
3137
+ * The template context is set to the respective data item.
3138
+ *
3139
+ * @example
3140
+ * ```ts-preview
3141
+ * _@Component({
3142
+ * selector: 'my-app',
3143
+ * template: `
3144
+ * <kendo-gantt [kendoGanttHierarchyBinding]="data">
3145
+ * <ng-template kendoGanttTaskTooltipTemplate let-dataItem>
3146
+ * <div [style]="'color: white; font-size: 8px;'">
3147
+ * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete;
3148
+ * </div>
3149
+ * </ng-template>
3150
+ * </kendo-gantt>
3151
+ * `
3152
+ * })
3153
+ * class AppComponent {
3154
+ * public data: any[] = sampleTasks;
3155
+ * }
3156
+ * ```
3157
+ */
3158
+ class GanttTaskTooltipTemplateDirective {
3159
+ templateRef;
3160
+ constructor(templateRef) {
3161
+ this.templateRef = templateRef;
3162
+ }
3163
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTaskTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3164
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GanttTaskTooltipTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskTooltipTemplate]", ngImport: i0 });
3165
+ }
3166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTaskTooltipTemplateDirective, decorators: [{
3167
+ type: Directive,
3168
+ args: [{
3169
+ selector: '[kendoGanttTaskTooltipTemplate]',
3170
+ standalone: true
3171
+ }]
3172
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
3173
+ type: Optional
3174
+ }] }]; } });
3175
+
3176
+ /**
3177
+ * @hidden
3178
+ *
3179
+ * Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
3180
+ */
3181
+ class GanttLocalizationService {
3182
+ localizationService;
3183
+ constructor(localizationService) {
3184
+ this.localizationService = localizationService;
3185
+ }
3186
+ get(token) {
3187
+ return this.localizationService.get(token);
3188
+ }
3189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
3190
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService });
3191
+ }
3192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService, decorators: [{
3193
+ type: Injectable
3194
+ }], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
3195
+
2863
3196
  /**
2864
3197
  * @hidden
2865
3198
  */
@@ -2869,6 +3202,8 @@ class GanttTimelineComponent {
2869
3202
  renderer;
2870
3203
  zone;
2871
3204
  currentTimeMarkerService;
3205
+ localization;
3206
+ taskDragService;
2872
3207
  /**
2873
3208
  * Represents the scrollable container of the timeline content.
2874
3209
  * Used externally by the DependencyDragCreateDirective.
@@ -2877,6 +3212,7 @@ class GanttTimelineComponent {
2877
3212
  timelineColumns;
2878
3213
  timelineHeaderWrap;
2879
3214
  tasksContainer;
3215
+ tooltip;
2880
3216
  /**
2881
3217
  * Represents the view container ref used for rendering the dependency drag popop.
2882
3218
  * Used externally by the DependencyDragCreateDirective.
@@ -2899,6 +3235,8 @@ class GanttTimelineComponent {
2899
3235
  renderDependencyDragClues;
2900
3236
  dragScrollSettings;
2901
3237
  currentTimeMarker;
3238
+ customTooltipTemplate;
3239
+ tooltipOptions;
2902
3240
  selectable;
2903
3241
  isTaskSelected;
2904
3242
  isExpanded;
@@ -2913,13 +3251,26 @@ class GanttTimelineComponent {
2913
3251
  get draggableEnabled() {
2914
3252
  return this.renderDependencyDragClues;
2915
3253
  }
3254
+ task;
3255
+ dragResult;
3256
+ dragging = false;
3257
+ completion = false;
3258
+ marquee = {
3259
+ show: false,
3260
+ left: 0,
3261
+ width: 0
3262
+ };
3263
+ dragOffset;
2916
3264
  subscriptions = new Subscription();
2917
- constructor(scrollSyncService, dependencyDomService, renderer, zone, currentTimeMarkerService) {
3265
+ popupRef;
3266
+ constructor(scrollSyncService, dependencyDomService, renderer, zone, currentTimeMarkerService, localization, taskDragService) {
2918
3267
  this.scrollSyncService = scrollSyncService;
2919
3268
  this.dependencyDomService = dependencyDomService;
2920
3269
  this.renderer = renderer;
2921
3270
  this.zone = zone;
2922
3271
  this.currentTimeMarkerService = currentTimeMarkerService;
3272
+ this.localization = localization;
3273
+ this.taskDragService = taskDragService;
2923
3274
  this.subscriptions.add(
2924
3275
  // task changes indicates change in row content, number, height, etc.
2925
3276
  this.dependencyDomService.taskChanges
@@ -2935,6 +3286,73 @@ class GanttTimelineComponent {
2935
3286
  this.createTimeMarker();
2936
3287
  this.renderer.setStyle(this.timelineColumns.nativeElement, 'height', `${(this.rows || []).length * timelineRowHeight}px`);
2937
3288
  }));
3289
+ if (!taskDragService) {
3290
+ return;
3291
+ }
3292
+ this.subscriptions.add(taskDragService.dragStart.subscribe((e) => {
3293
+ if (e.dragTarget.classList.contains('k-task-draghandle')) {
3294
+ this.completion = true;
3295
+ const taskRect = this.taskDragService.currentDragTaskRect;
3296
+ this.tooltip.position = 'top';
3297
+ this.tooltip.callout = true;
3298
+ this.tooltip.offset = taskRect.height + 6;
3299
+ this.tooltip.collision = {
3300
+ horizontal: 'fit',
3301
+ vertical: 'fit'
3302
+ };
3303
+ }
3304
+ else {
3305
+ this.dragging = true;
3306
+ }
3307
+ }));
3308
+ this.subscriptions.add(taskDragService.drag.subscribe((e) => {
3309
+ this.dragResult = {
3310
+ start: e.start,
3311
+ end: e.end,
3312
+ completionRatio: e.completionRatio
3313
+ };
3314
+ if (this.completion) {
3315
+ const dragHandle = e.dragEvent.dragTarget;
3316
+ this.tooltip.show(dragHandle);
3317
+ }
3318
+ else {
3319
+ this.marquee.show = true;
3320
+ this.marquee.left = e.offset;
3321
+ this.marquee.width = e.width;
3322
+ const taskEl = this.taskDragService.currentDragTask.taskElement;
3323
+ const taskRect = this.taskDragService.currentDragTaskRect;
3324
+ this.tooltip.hide();
3325
+ this.tooltip.position = this.taskDragService.rightDragHandle ? 'right' : 'left';
3326
+ this.tooltip.collision = {
3327
+ horizontal: 'fit',
3328
+ vertical: 'fit'
3329
+ };
3330
+ this.tooltip.show(taskEl);
3331
+ this.popupRef = this.tooltip.popupRef;
3332
+ const popup = this.popupRef?.popup.instance;
3333
+ const popupEl = popup?.container.nativeElement;
3334
+ const popupHeight = popupEl?.offsetHeight ?? 0;
3335
+ const popupWidth = popupEl?.offsetWidth ?? 0;
3336
+ const taskMove = !(this.taskDragService.leftDragHandle || this.taskDragService.rightDragHandle);
3337
+ this.popupRef && (this.popupRef.popupElement.style.zIndex += 1000000);
3338
+ this.popupRef && (popup.margin = {
3339
+ horizontal: taskMove ? taskRect.left - e.offset - this.taskDragService.tasksContainerRect.left - popupWidth / 2 : e.width - taskEl.nativeElement.clientWidth - popupWidth / 2,
3340
+ vertical: (taskEl.nativeElement.clientHeight + popupHeight) / 2
3341
+ });
3342
+ }
3343
+ }));
3344
+ this.subscriptions.add(taskDragService.dragEnd.subscribe(() => {
3345
+ this.marquee = {
3346
+ show: false,
3347
+ left: 0,
3348
+ width: 0
3349
+ };
3350
+ this.dragging = this.completion = false;
3351
+ this.tooltip.hide();
3352
+ this.dragResult = null;
3353
+ this.tooltip.position = this.tooltipOptions.position;
3354
+ this.tooltip.offset = 6;
3355
+ }));
2938
3356
  }
2939
3357
  ngOnChanges(changes) {
2940
3358
  if (changes['currentTimeMarker']) {
@@ -2950,6 +3368,13 @@ class GanttTimelineComponent {
2950
3368
  this.scrollSyncService.registerElement(rightContainer, 'timeline');
2951
3369
  this.scrollSyncService.registerElement(timelineHeader, 'header');
2952
3370
  this.dependencyDomService.registerContentContainer(this.tasksContainer.nativeElement);
3371
+ if (this.taskDragService) {
3372
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
3373
+ this.taskDragService.tasksContainer = this.tasksContainer.nativeElement;
3374
+ this.taskDragService.scrollableContainer = this.tasksContainer.nativeElement.closest('.k-grid-content');
3375
+ this.taskDragService.tasksContainerRect = this.tasksContainer.nativeElement.getBoundingClientRect();
3376
+ });
3377
+ }
2953
3378
  }
2954
3379
  ngOnDestroy() {
2955
3380
  this.subscriptions.unsubscribe();
@@ -2957,6 +3382,9 @@ class GanttTimelineComponent {
2957
3382
  isNonWorking(item) {
2958
3383
  return item.hasOwnProperty('isWorking') && !item.isWorking;
2959
3384
  }
3385
+ messageFor(token) {
3386
+ return this.localization.get(token);
3387
+ }
2960
3388
  createTimeMarker() {
2961
3389
  this.zone.runOutsideAngular(() => {
2962
3390
  this.currentTimeMarkerService.removeTimeMarker();
@@ -2965,8 +3393,8 @@ class GanttTimelineComponent {
2965
3393
  }
2966
3394
  });
2967
3395
  }
2968
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTimelineComponent, deps: [{ token: ScrollSyncService }, { token: DependencyDomService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
2969
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttTimelineComponent, isStandalone: true, selector: "kendo-gantt-timeline", inputs: { rows: "rows", slots: "slots", groupSlots: "groupSlots", tableWidth: "tableWidth", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", renderDependencyDragClues: "renderDependencyDragClues", dragScrollSettings: "dragScrollSettings", currentTimeMarker: "currentTimeMarker", selectable: "selectable", isTaskSelected: "isTaskSelected", isExpanded: "isExpanded", dependencies: "dependencies" }, outputs: { timelineContainerPress: "timelineContainerPress", timelineContainerDrag: "timelineContainerDrag", timelineContainerRelease: "timelineContainerRelease" }, viewQueries: [{ propertyName: "timelineContent", first: true, predicate: ["timelineContent"], descendants: true, static: true }, { propertyName: "timelineColumns", first: true, predicate: ["timelineColumns"], descendants: true, static: true }, { propertyName: "timelineHeaderWrap", first: true, predicate: ["timelineHeaderWrap"], descendants: true, static: true }, { propertyName: "tasksContainer", first: true, predicate: ["tasksContainer"], descendants: true, static: true }, { propertyName: "dragPopupContainer", first: true, predicate: ["dragPopupContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dependencyDragCreatePolyline", first: true, predicate: ["dependencyDragCreatePolyline"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
3396
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTimelineComponent, deps: [{ token: ScrollSyncService }, { token: DependencyDomService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: CurrentTimeMarkerService }, { token: GanttLocalizationService }, { token: TaskDragService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
3397
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttTimelineComponent, isStandalone: true, selector: "kendo-gantt-timeline", inputs: { rows: "rows", slots: "slots", groupSlots: "groupSlots", tableWidth: "tableWidth", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", renderDependencyDragClues: "renderDependencyDragClues", dragScrollSettings: "dragScrollSettings", currentTimeMarker: "currentTimeMarker", customTooltipTemplate: "customTooltipTemplate", tooltipOptions: "tooltipOptions", selectable: "selectable", isTaskSelected: "isTaskSelected", isExpanded: "isExpanded", dependencies: "dependencies" }, outputs: { timelineContainerPress: "timelineContainerPress", timelineContainerDrag: "timelineContainerDrag", timelineContainerRelease: "timelineContainerRelease" }, viewQueries: [{ propertyName: "timelineContent", first: true, predicate: ["timelineContent"], descendants: true, static: true }, { propertyName: "timelineColumns", first: true, predicate: ["timelineColumns"], descendants: true, static: true }, { propertyName: "timelineHeaderWrap", first: true, predicate: ["timelineHeaderWrap"], descendants: true, static: true }, { propertyName: "tasksContainer", first: true, predicate: ["tasksContainer"], descendants: true, static: true }, { propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }, { propertyName: "dragPopupContainer", first: true, predicate: ["dragPopupContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dependencyDragCreatePolyline", first: true, predicate: ["dependencyDragCreatePolyline"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
2970
3398
  <div class="k-gantt-timeline k-grid k-grid-md">
2971
3399
  <div class="k-grid-header">
2972
3400
  <div #timelineHeaderWrap class="k-grid-header-wrap">
@@ -3032,7 +3460,14 @@ class GanttTimelineComponent {
3032
3460
  </tbody>
3033
3461
  </table>
3034
3462
 
3035
- <table
3463
+ <table kendoTooltip
3464
+ #tooltip="kendoTooltip"
3465
+ [tooltipTemplate]="completion ? completionRatioTooltip : dragging ? resizingTooltip : customTooltipTemplate ? customTooltip : tooltipTemplate"
3466
+ [position]="tooltipOptions.position"
3467
+ [callout]="!dragging"
3468
+ [tooltipClass]="dragging ? 'k-gantt-resize-hint' : undefined"
3469
+ filter=".k-task"
3470
+ [showOn]="dragging || completion ? 'none' : 'hover'"
3036
3471
  #tasksContainer
3037
3472
  class="k-table k-table-md k-gantt-tasks"
3038
3473
  role="presentation"
@@ -3052,10 +3487,39 @@ class GanttTimelineComponent {
3052
3487
  [selectable]="selectable"
3053
3488
  [isTaskSelected]="isTaskSelected"
3054
3489
  [renderDependencyDragClues]="renderDependencyDragClues"
3490
+ (taskPointerEnter)="task = $event"
3491
+ (taskPointerLeave)="task = null"
3055
3492
  >
3056
3493
  </tbody>
3057
3494
  </table>
3058
3495
  </div>
3496
+ <ng-template #tooltipTemplate>
3497
+ <div class="k-task-content">
3498
+ <div class="k-task-details">
3499
+ <strong>{{task?.title}}</strong>
3500
+ <div class="k-task-pct">{{task?.completionRatio | kendoNumber: 'p'}}</div>
3501
+ <ul class="k-reset">
3502
+ <li>{{messageFor('tooltipStartDateText')}}: {{task?.start | kendoDate: 'HH:mm a EEE, MMM d'}}</li>
3503
+ <li>{{messageFor('tooltipEndDateText')}}: {{task?.end | kendoDate: 'HH:mm a EEE, MMM d'}}</li>
3504
+ </ul>
3505
+ </div>
3506
+ </div>
3507
+ </ng-template>
3508
+ <ng-template #customTooltip>
3509
+ <ng-container *ngTemplateOutlet="customTooltipTemplate.templateRef; context: { $implicit: task, task }"></ng-container>
3510
+ </ng-template>
3511
+ <ng-template #resizingTooltip>
3512
+ <div class="k-tooltip-content">
3513
+ <div>{{messageFor('tooltipStartDateText')}}: {{dragResult?.start | kendoDate: 'HH:mm a EEE, MMM d'}}</div>
3514
+ <div>{{messageFor('tooltipEndDateText')}}: {{dragResult?.end | kendoDate: 'HH:mm a EEE, MMM d'}}</div>
3515
+ </div>
3516
+ </ng-template>
3517
+ <ng-template #completionRatioTooltip>
3518
+ <div class="k-tooltip-content">
3519
+ <div>{{dragResult?.completionRatio | kendoNumber: 'p'}}</div>
3520
+ </div>
3521
+ </ng-template>
3522
+
3059
3523
  <svg class="k-gantt-dependencies-svg">
3060
3524
  <polyline
3061
3525
  *ngFor="let dependency of dependencies"
@@ -3064,12 +3528,15 @@ class GanttTimelineComponent {
3064
3528
  />
3065
3529
  <polyline #dependencyDragCreatePolyline />
3066
3530
  </svg>
3067
-
3531
+ <div class="k-marquee k-gantt-marquee" *ngIf="marquee.show" style="top: 0px; height: {{tasksContainer.offsetHeight}}px; left: {{marquee.left}}px; width: {{marquee.width}}px;">
3532
+ <div class="k-marquee-color"></div>
3533
+ </div>
3068
3534
  <!-- 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 -->
3069
3535
  <ng-container #dragPopupContainer></ng-container>
3070
3536
  </div>
3071
3537
  </div>
3072
- `, isInline: true, dependencies: [{ kind: "component", type: GanttHeaderTableBodyComponent, selector: "[kendoGanttHeaderTableBody]", inputs: ["groupSlots", "slots"] }, { kind: "directive", type: TimelineScrollableDirective, selector: "[kendoGanttTimelineScrollable]", inputs: ["scrollSettings"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: GanttTasksTableBodyComponent, selector: "[kendoGanttTasksTableBody]", inputs: ["selectable", "rows", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "isExpanded", "isTaskSelected", "renderDependencyDragClues"] }, { kind: "directive", type: GanttDependencyDirective, selector: "[kendoGanttDependency]", inputs: ["dependency"] }] });
3538
+
3539
+ `, isInline: true, dependencies: [{ kind: "component", type: GanttHeaderTableBodyComponent, selector: "[kendoGanttHeaderTableBody]", inputs: ["groupSlots", "slots"] }, { kind: "directive", type: TimelineScrollableDirective, selector: "[kendoGanttTimelineScrollable]", inputs: ["scrollSettings"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: GanttTasksTableBodyComponent, selector: "[kendoGanttTasksTableBody]", inputs: ["selectable", "rows", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "isExpanded", "isTaskSelected", "renderDependencyDragClues"], outputs: ["taskPointerEnter", "taskPointerLeave"] }, { kind: "directive", type: GanttDependencyDirective, selector: "[kendoGanttDependency]", inputs: ["dependency"] }, { kind: "directive", type: i6.TooltipDirective, selector: "[kendoTooltip]", inputs: ["filter", "position", "titleTemplate", "showOn", "showAfter", "callout", "closable", "offset", "tooltipWidth", "tooltipHeight", "tooltipClass", "tooltipContentClass", "collision", "closeTitle", "tooltipTemplate"], exportAs: ["kendoTooltip"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "kendoDate" }, { kind: "pipe", type: NumberPipe, name: "kendoNumber" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
3073
3540
  }
3074
3541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttTimelineComponent, decorators: [{
3075
3542
  type: Component,
@@ -3141,7 +3608,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3141
3608
  </tbody>
3142
3609
  </table>
3143
3610
 
3144
- <table
3611
+ <table kendoTooltip
3612
+ #tooltip="kendoTooltip"
3613
+ [tooltipTemplate]="completion ? completionRatioTooltip : dragging ? resizingTooltip : customTooltipTemplate ? customTooltip : tooltipTemplate"
3614
+ [position]="tooltipOptions.position"
3615
+ [callout]="!dragging"
3616
+ [tooltipClass]="dragging ? 'k-gantt-resize-hint' : undefined"
3617
+ filter=".k-task"
3618
+ [showOn]="dragging || completion ? 'none' : 'hover'"
3145
3619
  #tasksContainer
3146
3620
  class="k-table k-table-md k-gantt-tasks"
3147
3621
  role="presentation"
@@ -3161,10 +3635,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3161
3635
  [selectable]="selectable"
3162
3636
  [isTaskSelected]="isTaskSelected"
3163
3637
  [renderDependencyDragClues]="renderDependencyDragClues"
3638
+ (taskPointerEnter)="task = $event"
3639
+ (taskPointerLeave)="task = null"
3164
3640
  >
3165
3641
  </tbody>
3166
3642
  </table>
3167
3643
  </div>
3644
+ <ng-template #tooltipTemplate>
3645
+ <div class="k-task-content">
3646
+ <div class="k-task-details">
3647
+ <strong>{{task?.title}}</strong>
3648
+ <div class="k-task-pct">{{task?.completionRatio | kendoNumber: 'p'}}</div>
3649
+ <ul class="k-reset">
3650
+ <li>{{messageFor('tooltipStartDateText')}}: {{task?.start | kendoDate: 'HH:mm a EEE, MMM d'}}</li>
3651
+ <li>{{messageFor('tooltipEndDateText')}}: {{task?.end | kendoDate: 'HH:mm a EEE, MMM d'}}</li>
3652
+ </ul>
3653
+ </div>
3654
+ </div>
3655
+ </ng-template>
3656
+ <ng-template #customTooltip>
3657
+ <ng-container *ngTemplateOutlet="customTooltipTemplate.templateRef; context: { $implicit: task, task }"></ng-container>
3658
+ </ng-template>
3659
+ <ng-template #resizingTooltip>
3660
+ <div class="k-tooltip-content">
3661
+ <div>{{messageFor('tooltipStartDateText')}}: {{dragResult?.start | kendoDate: 'HH:mm a EEE, MMM d'}}</div>
3662
+ <div>{{messageFor('tooltipEndDateText')}}: {{dragResult?.end | kendoDate: 'HH:mm a EEE, MMM d'}}</div>
3663
+ </div>
3664
+ </ng-template>
3665
+ <ng-template #completionRatioTooltip>
3666
+ <div class="k-tooltip-content">
3667
+ <div>{{dragResult?.completionRatio | kendoNumber: 'p'}}</div>
3668
+ </div>
3669
+ </ng-template>
3670
+
3168
3671
  <svg class="k-gantt-dependencies-svg">
3169
3672
  <polyline
3170
3673
  *ngFor="let dependency of dependencies"
@@ -3173,16 +3676,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3173
3676
  />
3174
3677
  <polyline #dependencyDragCreatePolyline />
3175
3678
  </svg>
3176
-
3679
+ <div class="k-marquee k-gantt-marquee" *ngIf="marquee.show" style="top: 0px; height: {{tasksContainer.offsetHeight}}px; left: {{marquee.left}}px; width: {{marquee.width}}px;">
3680
+ <div class="k-marquee-color"></div>
3681
+ </div>
3177
3682
  <!-- 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 -->
3178
3683
  <ng-container #dragPopupContainer></ng-container>
3179
3684
  </div>
3180
3685
  </div>
3686
+
3181
3687
  `,
3182
3688
  standalone: true,
3183
- imports: [GanttHeaderTableBodyComponent, TimelineScrollableDirective, DraggableDirective, NgFor, GanttTasksTableBodyComponent, GanttDependencyDirective]
3689
+ encapsulation: ViewEncapsulation.None,
3690
+ imports: [GanttHeaderTableBodyComponent, TimelineScrollableDirective, DraggableDirective, NgFor, GanttTasksTableBodyComponent,
3691
+ GanttDependencyDirective, KENDO_TOOLTIP, NgIf, DatePipe, NumberPipe, NgTemplateOutlet],
3184
3692
  }]
3185
- }], ctorParameters: function () { return [{ type: ScrollSyncService }, { type: DependencyDomService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: CurrentTimeMarkerService }]; }, propDecorators: { timelineContent: [{
3693
+ }], ctorParameters: function () { return [{ type: ScrollSyncService }, { type: DependencyDomService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: CurrentTimeMarkerService }, { type: GanttLocalizationService }, { type: TaskDragService, decorators: [{
3694
+ type: Optional
3695
+ }] }]; }, propDecorators: { timelineContent: [{
3186
3696
  type: ViewChild,
3187
3697
  args: ['timelineContent', { static: true }]
3188
3698
  }], timelineColumns: [{
@@ -3194,12 +3704,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3194
3704
  }], tasksContainer: [{
3195
3705
  type: ViewChild,
3196
3706
  args: ['tasksContainer', { static: true }]
3707
+ }], tooltip: [{
3708
+ type: ViewChild,
3709
+ args: [TooltipDirective]
3197
3710
  }], dragPopupContainer: [{
3198
3711
  type: ViewChild,
3199
3712
  args: ['dragPopupContainer', { static: false, read: ViewContainerRef }]
3200
3713
  }], dependencyDragCreatePolyline: [{
3201
3714
  type: ViewChild,
3202
- args: ['dependencyDragCreatePolyline', { static: false }]
3715
+ args: ['dependencyDragCreatePolyline']
3203
3716
  }], rows: [{
3204
3717
  type: Input
3205
3718
  }], slots: [{
@@ -3224,6 +3737,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3224
3737
  type: Input
3225
3738
  }], currentTimeMarker: [{
3226
3739
  type: Input
3740
+ }], customTooltipTemplate: [{
3741
+ type: Input
3742
+ }], tooltipOptions: [{
3743
+ type: Input
3227
3744
  }], selectable: [{
3228
3745
  type: Input
3229
3746
  }], isTaskSelected: [{
@@ -3726,26 +4243,6 @@ class CellCloseEvent extends PreventableEvent {
3726
4243
  }
3727
4244
  }
3728
4245
 
3729
- /**
3730
- * @hidden
3731
- *
3732
- * Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
3733
- */
3734
- class GanttLocalizationService {
3735
- localizationService;
3736
- constructor(localizationService) {
3737
- this.localizationService = localizationService;
3738
- }
3739
- get(token) {
3740
- return this.localizationService.get(token);
3741
- }
3742
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
3743
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService });
3744
- }
3745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttLocalizationService, decorators: [{
3746
- type: Injectable
3747
- }], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
3748
-
3749
4246
  /**
3750
4247
  * @hidden
3751
4248
  */
@@ -5276,8 +5773,16 @@ class Messages extends ComponentMessages {
5276
5773
  * for the **Reset** button of the columns.
5277
5774
  */
5278
5775
  columnsReset;
5776
+ /**
5777
+ * The text shown in the task tooltip before the task start date.
5778
+ */
5779
+ tooltipStartDateText;
5780
+ /**
5781
+ * The text shown in the task tooltip before the task end date.
5782
+ */
5783
+ tooltipEndDateText;
5279
5784
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5280
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendo-gantt-messages-base", inputs: { taskEditingGeneralTabTitle: "taskEditingGeneralTabTitle", taskEditingPredecessorsTabTitle: "taskEditingPredecessorsTabTitle", taskEditingSuccessorsTabTitle: "taskEditingSuccessorsTabTitle", taskEditingDependenciesAddButtonText: "taskEditingDependenciesAddButtonText", taskEditingDependenciesRemoveButtonText: "taskEditingDependenciesRemoveButtonText", taskEditingDependenciesGridNameColumnTitle: "taskEditingDependenciesGridNameColumnTitle", taskEditingDependenciesGridTypeColumnTitle: "taskEditingDependenciesGridTypeColumnTitle", deleteButtonText: "deleteButtonText", taskDeleteLabel: "taskDeleteLabel", taskEditingDialogTitle: "taskEditingDialogTitle", taskEditingDialogCloseTitle: "taskEditingDialogCloseTitle", confirmationDialogCloseTitle: "confirmationDialogCloseTitle", confirmationDialogTitle: "confirmationDialogTitle", addTaskText: "addTaskText", addChildText: "addChildText", addAboveText: "addAboveText", addBelowText: "addBelowText", cancelButtonText: "cancelButtonText", saveButtonText: "saveButtonText", titleFieldInputLabel: "titleFieldInputLabel", startFieldInputLabel: "startFieldInputLabel", endFieldInputLabel: "endFieldInputLabel", completionRatioFieldInputLabel: "completionRatioFieldInputLabel", confirmationDialogContent: "confirmationDialogContent", dayViewText: "dayViewText", weekViewText: "weekViewText", monthViewText: "monthViewText", yearViewText: "yearViewText", noRecords: "noRecords", filter: "filter", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", columnMenu: "columnMenu", columns: "columns", lock: "lock", unlock: "unlock", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset" }, usesInheritance: true, ngImport: i0 });
5785
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendo-gantt-messages-base", inputs: { taskEditingGeneralTabTitle: "taskEditingGeneralTabTitle", taskEditingPredecessorsTabTitle: "taskEditingPredecessorsTabTitle", taskEditingSuccessorsTabTitle: "taskEditingSuccessorsTabTitle", taskEditingDependenciesAddButtonText: "taskEditingDependenciesAddButtonText", taskEditingDependenciesRemoveButtonText: "taskEditingDependenciesRemoveButtonText", taskEditingDependenciesGridNameColumnTitle: "taskEditingDependenciesGridNameColumnTitle", taskEditingDependenciesGridTypeColumnTitle: "taskEditingDependenciesGridTypeColumnTitle", deleteButtonText: "deleteButtonText", taskDeleteLabel: "taskDeleteLabel", taskEditingDialogTitle: "taskEditingDialogTitle", taskEditingDialogCloseTitle: "taskEditingDialogCloseTitle", confirmationDialogCloseTitle: "confirmationDialogCloseTitle", confirmationDialogTitle: "confirmationDialogTitle", addTaskText: "addTaskText", addChildText: "addChildText", addAboveText: "addAboveText", addBelowText: "addBelowText", cancelButtonText: "cancelButtonText", saveButtonText: "saveButtonText", titleFieldInputLabel: "titleFieldInputLabel", startFieldInputLabel: "startFieldInputLabel", endFieldInputLabel: "endFieldInputLabel", completionRatioFieldInputLabel: "completionRatioFieldInputLabel", confirmationDialogContent: "confirmationDialogContent", dayViewText: "dayViewText", weekViewText: "weekViewText", monthViewText: "monthViewText", yearViewText: "yearViewText", noRecords: "noRecords", filter: "filter", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", loading: "loading", columnMenu: "columnMenu", columns: "columns", lock: "lock", unlock: "unlock", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", columnsApply: "columnsApply", columnsReset: "columnsReset", tooltipStartDateText: "tooltipStartDateText", tooltipEndDateText: "tooltipEndDateText" }, usesInheritance: true, ngImport: i0 });
5281
5786
  }
5282
5787
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
5283
5788
  type: Directive,
@@ -5421,6 +5926,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5421
5926
  type: Input
5422
5927
  }], columnsReset: [{
5423
5928
  type: Input
5929
+ }], tooltipStartDateText: [{
5930
+ type: Input
5931
+ }], tooltipEndDateText: [{
5932
+ type: Input
5424
5933
  }] } });
5425
5934
 
5426
5935
  /**
@@ -5564,6 +6073,14 @@ class GanttComponent {
5564
6073
  * Therefore the `static` property needs to be set to `false`.
5565
6074
  */
5566
6075
  taskTemplate;
6076
+ /**
6077
+ * @hidden
6078
+ *
6079
+ * Queries the template for a task tooltip template declaration.
6080
+ * In newer Angular versions the ngIf-ed value gets evaluated after the static query is resolved.
6081
+ * Therefore the `static` property needs to be set to `false`.
6082
+ */
6083
+ taskTooltipTemplate;
5567
6084
  /**
5568
6085
  * @hidden
5569
6086
  *
@@ -5904,6 +6421,16 @@ class GanttComponent {
5904
6421
  get dragScrollSettings() {
5905
6422
  return this._dragScrollSettings;
5906
6423
  }
6424
+ /**
6425
+ * Allows setting the task tooltip `position`, `callout`, and `showAfter` options.
6426
+ *
6427
+ * @default { position: 'top', callout: true, showAfter: 100 }
6428
+ */
6429
+ taskTooltipOptions = {
6430
+ position: 'top',
6431
+ callout: true,
6432
+ showAfter: 100
6433
+ };
5907
6434
  /**
5908
6435
  * Fires when an item is expanded.
5909
6436
  */
@@ -6795,7 +7322,7 @@ class GanttComponent {
6795
7322
  }
6796
7323
  }
6797
7324
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, deps: [{ token: TimelineViewService }, { token: ScrollSyncService }, { token: i0.Renderer2 }, { token: MappingService }, { token: OptionChangesService }, { token: DependencyDomService }, { token: EditService }, { token: i1$1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: NavigationService }, { token: CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
6798
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttComponent, isStandalone: true, selector: "kendo-gantt", inputs: { roleDescription: ["aria-roledescription", "roleDescription"], role: "role", taskModelFields: "taskModelFields", dependencyModelFields: "dependencyModelFields", activeView: "activeView", data: "data", isSelected: "isSelected", validateNewDependency: "validateNewDependency", selectable: "selectable", toolbarSettings: "toolbarSettings", toolbarAriaLabel: "toolbarAriaLabel", fetchChildren: "fetchChildren", hasChildren: "hasChildren", dependencies: "dependencies", sortable: "sortable", sort: "sort", filterable: "filterable", filter: "filter", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", navigable: "navigable", timelinePaneOptions: "timelinePaneOptions", treeListPaneOptions: "treeListPaneOptions", taskClass: "taskClass", rowClass: "rowClass", isExpanded: "isExpanded", columnsAutoSize: "columnsAutoSize", currentTimeMarker: "currentTimeMarker", columnMenu: "columnMenu", columnsReorderable: "columnsReorderable", columnsResizable: "columnsResizable", dragScrollSettings: "dragScrollSettings" }, outputs: { selectionChange: "selectionChange", rowExpand: "rowExpand", taskDblClick: "taskDblClick", cellDblClick: "cellDblClick", cellClose: "cellClose", taskDelete: "taskDelete", rowCollapse: "rowCollapse", remove: "remove", cancel: "cancel", save: "save", taskAdd: "taskAdd", dependencyAdd: "dependencyAdd", sortChange: "sortChange", filterChange: "filterChange", dataStateChange: "dataStateChange", treeListPaneCollapsedChange: "treeListPaneCollapsedChange", timelinePaneCollapsedChange: "timelinePaneCollapsedChange", timelinePaneSizeChange: "timelinePaneSizeChange", activeViewChange: "activeViewChange", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", cellClick: "cellClick", taskClick: "taskClick" }, host: { properties: { "attr.aria-roledescription": "this.hostRoleDescriptionAttr", "attr.role": "this.hostRoleAttr", "class.k-gantt": "this.hostClasses", "attr.dir": "this.dir" } }, providers: [
7325
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GanttComponent, isStandalone: true, selector: "kendo-gantt", inputs: { roleDescription: ["aria-roledescription", "roleDescription"], role: "role", taskModelFields: "taskModelFields", dependencyModelFields: "dependencyModelFields", activeView: "activeView", data: "data", isSelected: "isSelected", validateNewDependency: "validateNewDependency", selectable: "selectable", toolbarSettings: "toolbarSettings", toolbarAriaLabel: "toolbarAriaLabel", fetchChildren: "fetchChildren", hasChildren: "hasChildren", dependencies: "dependencies", sortable: "sortable", sort: "sort", filterable: "filterable", filter: "filter", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", navigable: "navigable", timelinePaneOptions: "timelinePaneOptions", treeListPaneOptions: "treeListPaneOptions", taskClass: "taskClass", rowClass: "rowClass", isExpanded: "isExpanded", columnsAutoSize: "columnsAutoSize", currentTimeMarker: "currentTimeMarker", columnMenu: "columnMenu", columnsReorderable: "columnsReorderable", columnsResizable: "columnsResizable", dragScrollSettings: "dragScrollSettings", taskTooltipOptions: "taskTooltipOptions" }, outputs: { selectionChange: "selectionChange", rowExpand: "rowExpand", taskDblClick: "taskDblClick", cellDblClick: "cellDblClick", cellClose: "cellClose", taskDelete: "taskDelete", rowCollapse: "rowCollapse", remove: "remove", cancel: "cancel", save: "save", taskAdd: "taskAdd", dependencyAdd: "dependencyAdd", sortChange: "sortChange", filterChange: "filterChange", dataStateChange: "dataStateChange", treeListPaneCollapsedChange: "treeListPaneCollapsedChange", timelinePaneCollapsedChange: "timelinePaneCollapsedChange", timelinePaneSizeChange: "timelinePaneSizeChange", activeViewChange: "activeViewChange", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", cellClick: "cellClick", taskClick: "taskClick" }, host: { properties: { "attr.aria-roledescription": "this.hostRoleDescriptionAttr", "attr.role": "this.hostRoleAttr", "class.k-gantt": "this.hostClasses", "attr.dir": "this.dir" } }, providers: [
6799
7326
  GanttLocalizationService,
6800
7327
  LocalizationService,
6801
7328
  {
@@ -6823,7 +7350,7 @@ class GanttComponent {
6823
7350
  TimelineScrollService,
6824
7351
  NavigationService,
6825
7352
  CurrentTimeMarkerService
6826
- ], queries: [{ propertyName: "taskContentTemplate", first: true, predicate: GanttTaskContentTemplateDirective, descendants: true }, { propertyName: "taskTemplate", first: true, predicate: GanttTaskTemplateDirective, descendants: true }, { propertyName: "summaryTaskTemplate", first: true, predicate: GanttSummaryTaskTemplateDirective, descendants: true }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columns", predicate: GanttColumnBase }, { propertyName: "views", predicate: ViewBase }], viewQueries: [{ propertyName: "treeList", first: true, predicate: TreeListComponent, descendants: true, static: true }, { propertyName: "timeline", first: true, predicate: GanttTimelineComponent, descendants: true }], exportAs: ["kendoGantt"], usesOnChanges: true, ngImport: i0, template: `
7353
+ ], queries: [{ propertyName: "taskContentTemplate", first: true, predicate: GanttTaskContentTemplateDirective, descendants: true }, { propertyName: "taskTemplate", first: true, predicate: GanttTaskTemplateDirective, descendants: true }, { propertyName: "taskTooltipTemplate", first: true, predicate: GanttTaskTooltipTemplateDirective, descendants: true }, { propertyName: "summaryTaskTemplate", first: true, predicate: GanttSummaryTaskTemplateDirective, descendants: true }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columns", predicate: GanttColumnBase }, { propertyName: "views", predicate: ViewBase }], viewQueries: [{ propertyName: "treeList", first: true, predicate: TreeListComponent, descendants: true, static: true }, { propertyName: "timeline", first: true, predicate: GanttTimelineComponent, descendants: true }], exportAs: ["kendoGantt"], usesOnChanges: true, ngImport: i0, template: `
6827
7354
  <ng-container kendoGanttLocalizedMessages
6828
7355
  i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
6829
7356
  taskEditingGeneralTabTitle="General"
@@ -7021,7 +7548,13 @@ class GanttComponent {
7021
7548
  columnsApply="Apply"
7022
7549
 
7023
7550
  i18n-columnsReset="kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
7024
- columnsReset="Reset"></ng-container>
7551
+ columnsReset="Reset"
7552
+
7553
+ i18n-tooltipStartDateText="kendo.gantt.tooltipStartDateText|The text shown in the task tooltip before the task start date"
7554
+ tooltipStartDateText="Start"
7555
+
7556
+ i18n-tooltipEndDateText="kendo.gantt.tooltipEndDateText|The text shown in the task tooltip before the task end date"
7557
+ tooltipEndDateText="End"></ng-container>
7025
7558
  <kendo-gantt-toolbar
7026
7559
  *ngIf="showToolbar('top')"
7027
7560
  [attr.aria-label]="toolbarAriaLabel"
@@ -7160,6 +7693,8 @@ class GanttComponent {
7160
7693
  dblclick: handleTimelineDblClick,
7161
7694
  mousedown: handleTimelineMouseDown
7162
7695
  }"
7696
+ [customTooltipTemplate]="taskTooltipTemplate"
7697
+ [tooltipOptions]="taskTooltipOptions"
7163
7698
  [scope]="this"
7164
7699
  ></kendo-gantt-timeline>
7165
7700
  </kendo-splitter-pane>
@@ -7195,7 +7730,7 @@ class GanttComponent {
7195
7730
  </kendo-dialog>
7196
7731
 
7197
7732
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
7198
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { kind: "component", type: SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "splitbarWidth", "resizeStep", "splitterBarClass"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { kind: "component", type: SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "splitterBarAttributes", "splitterBarClass", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { kind: "component", type: TreeListComponent, selector: "kendo-treelist", inputs: ["aria-label", "data", "pageSize", "height", "rowHeight", "skip", "scrollable", "sort", "trackBy", "filter", "virtualColumns", "filterable", "sortable", "pageable", "navigable", "navigatable", "autoSize", "rowClass", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "idField", "selectable", "isSelected", "rowReorderable", "columns", "fetchChildren", "hasChildren", "isExpanded"], outputs: ["selectionChange", "filterChange", "pageChange", "sortChange", "dataStateChange", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "scrollBottom", "contentScroll", "expand", "collapse", "expandStateChange", "rowReorder"], exportAs: ["kendoTreeList"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: CustomMessagesComponent$2, selector: "kendo-treelist-messages" }, { kind: "component", type: GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: ["rows", "slots", "groupSlots", "tableWidth", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "renderDependencyDragClues", "dragScrollSettings", "currentTimeMarker", "selectable", "isTaskSelected", "isExpanded", "dependencies"], outputs: ["timelineContainerPress", "timelineContainerDrag", "timelineContainerRelease"] }, { kind: "component", type: EditDialogComponent, selector: "kendo-gantt-edit-dialog", inputs: ["data"] }, { kind: "component", type: DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: TreeListSpacerComponent, selector: "kendo-treelist-spacer", inputs: ["width"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
7733
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { kind: "component", type: SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "splitbarWidth", "resizeStep", "splitterBarClass"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { kind: "component", type: SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "splitterBarAttributes", "splitterBarClass", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { kind: "component", type: TreeListComponent, selector: "kendo-treelist", inputs: ["aria-label", "data", "pageSize", "height", "rowHeight", "skip", "scrollable", "sort", "trackBy", "filter", "virtualColumns", "filterable", "sortable", "pageable", "navigable", "navigatable", "autoSize", "rowClass", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "idField", "selectable", "isSelected", "rowReorderable", "columns", "fetchChildren", "hasChildren", "isExpanded"], outputs: ["selectionChange", "filterChange", "pageChange", "sortChange", "dataStateChange", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "scrollBottom", "contentScroll", "expand", "collapse", "expandStateChange", "rowReorder"], exportAs: ["kendoTreeList"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: CustomMessagesComponent$2, selector: "kendo-treelist-messages" }, { kind: "component", type: GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: ["rows", "slots", "groupSlots", "tableWidth", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "renderDependencyDragClues", "dragScrollSettings", "currentTimeMarker", "customTooltipTemplate", "tooltipOptions", "selectable", "isTaskSelected", "isExpanded", "dependencies"], outputs: ["timelineContainerPress", "timelineContainerDrag", "timelineContainerRelease"] }, { kind: "component", type: EditDialogComponent, selector: "kendo-gantt-edit-dialog", inputs: ["data"] }, { kind: "component", type: DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: TreeListSpacerComponent, selector: "kendo-treelist-spacer", inputs: ["width"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
7199
7734
  }
7200
7735
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, decorators: [{
7201
7736
  type: Component,
@@ -7429,7 +7964,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
7429
7964
  columnsApply="Apply"
7430
7965
 
7431
7966
  i18n-columnsReset="kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
7432
- columnsReset="Reset"></ng-container>
7967
+ columnsReset="Reset"
7968
+
7969
+ i18n-tooltipStartDateText="kendo.gantt.tooltipStartDateText|The text shown in the task tooltip before the task start date"
7970
+ tooltipStartDateText="Start"
7971
+
7972
+ i18n-tooltipEndDateText="kendo.gantt.tooltipEndDateText|The text shown in the task tooltip before the task end date"
7973
+ tooltipEndDateText="End"></ng-container>
7433
7974
  <kendo-gantt-toolbar
7434
7975
  *ngIf="showToolbar('top')"
7435
7976
  [attr.aria-label]="toolbarAriaLabel"
@@ -7568,6 +8109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
7568
8109
  dblclick: handleTimelineDblClick,
7569
8110
  mousedown: handleTimelineMouseDown
7570
8111
  }"
8112
+ [customTooltipTemplate]="taskTooltipTemplate"
8113
+ [tooltipOptions]="taskTooltipOptions"
7571
8114
  [scope]="this"
7572
8115
  ></kendo-gantt-timeline>
7573
8116
  </kendo-splitter-pane>
@@ -7612,16 +8155,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
7612
8155
  args: [TreeListComponent, { static: true }]
7613
8156
  }], timeline: [{
7614
8157
  type: ViewChild,
7615
- args: [GanttTimelineComponent, { static: false }]
8158
+ args: [GanttTimelineComponent]
7616
8159
  }], taskContentTemplate: [{
7617
8160
  type: ContentChild,
7618
- args: [GanttTaskContentTemplateDirective, { static: false }]
8161
+ args: [GanttTaskContentTemplateDirective]
7619
8162
  }], taskTemplate: [{
7620
8163
  type: ContentChild,
7621
- args: [GanttTaskTemplateDirective, { static: false }]
8164
+ args: [GanttTaskTemplateDirective]
8165
+ }], taskTooltipTemplate: [{
8166
+ type: ContentChild,
8167
+ args: [GanttTaskTooltipTemplateDirective]
7622
8168
  }], summaryTaskTemplate: [{
7623
8169
  type: ContentChild,
7624
- args: [GanttSummaryTaskTemplateDirective, { static: false }]
8170
+ args: [GanttSummaryTaskTemplateDirective]
7625
8171
  }], toolbarTemplateChildren: [{
7626
8172
  type: ContentChildren,
7627
8173
  args: [ToolbarTemplateDirective]
@@ -7715,6 +8261,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
7715
8261
  type: Input
7716
8262
  }], dragScrollSettings: [{
7717
8263
  type: Input
8264
+ }], taskTooltipOptions: [{
8265
+ type: Input
7718
8266
  }], rowExpand: [{
7719
8267
  type: Output
7720
8268
  }], taskDblClick: [{
@@ -8528,6 +9076,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
8528
9076
  }]
8529
9077
  }], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
8530
9078
 
9079
+ class TaskDragDirective {
9080
+ /**
9081
+ * Emitted while the end user is resizing or moving a task through dragging.
9082
+ */
9083
+ taskDrag = new EventEmitter();
9084
+ /**
9085
+ * Triggered when the dragging action associated with resizing or moving an event is finished.
9086
+ * The event data contains all necessary information to update the task and all related tasks
9087
+ * accordingly.
9088
+ */
9089
+ taskDragEnd = new EventEmitter();
9090
+ subs = new Subscription();
9091
+ constructor(gantt, mapper, dragTargetContainer, taskDragService) {
9092
+ dragTargetContainer.mode = 'manual';
9093
+ dragTargetContainer.dragTargetFilter = '.k-resize-handle, .k-task, .k-task-draghandle';
9094
+ dragTargetContainer.cursorStyle = null;
9095
+ dragTargetContainer.threshold = 5;
9096
+ this.subs.add(dragTargetContainer.onDragStart.subscribe((args) => {
9097
+ taskDragService.onDragStart(args);
9098
+ }));
9099
+ this.subs.add(dragTargetContainer.onDrag.subscribe((args) => {
9100
+ taskDragService.onDrag(args);
9101
+ }));
9102
+ this.subs.add(dragTargetContainer.onDragEnd.subscribe((args) => {
9103
+ taskDragService.onDragEnd(args);
9104
+ }));
9105
+ this.subs.add(taskDragService.drag.subscribe((args) => {
9106
+ hasObservers(this.taskDrag) && this.taskDrag.emit({
9107
+ start: args.start,
9108
+ end: args.end,
9109
+ completionRatio: args.completionRatio,
9110
+ item: getEditItem(args.item, gantt.treeList.view.data, mapper),
9111
+ dragEvent: args.dragEvent
9112
+ });
9113
+ }));
9114
+ this.subs.add(taskDragService.dragEnd.subscribe((args) => {
9115
+ hasObservers(this.taskDragEnd) && this.taskDragEnd.emit({
9116
+ start: args.start,
9117
+ end: args.end,
9118
+ completionRatio: args.completionRatio,
9119
+ item: getEditItem(args.item, gantt.treeList.view.data, mapper),
9120
+ dragEvent: args.dragEvent
9121
+ });
9122
+ }));
9123
+ }
9124
+ ngOnDestroy() {
9125
+ this.subs.unsubscribe();
9126
+ }
9127
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragDirective, deps: [{ token: GanttComponent }, { token: MappingService }, { token: i3$1.DragTargetContainerDirective }, { token: TaskDragService }], target: i0.ɵɵFactoryTarget.Directive });
9128
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TaskDragDirective, isStandalone: true, selector: "[kendoGanttTaskDrag]", outputs: { taskDrag: "taskDrag", taskDragEnd: "taskDragEnd" }, providers: [TaskDragService], hostDirectives: [{ directive: i3$1.DragTargetContainerDirective }], ngImport: i0 });
9129
+ }
9130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragDirective, decorators: [{
9131
+ type: Directive,
9132
+ args: [{
9133
+ selector: '[kendoGanttTaskDrag]',
9134
+ standalone: true,
9135
+ providers: [TaskDragService],
9136
+ hostDirectives: [DragTargetContainerDirective]
9137
+ }]
9138
+ }], ctorParameters: function () { return [{ type: GanttComponent }, { type: MappingService }, { type: i3$1.DragTargetContainerDirective }, { type: TaskDragService }]; }, propDecorators: { taskDrag: [{
9139
+ type: Output
9140
+ }], taskDragEnd: [{
9141
+ type: Output
9142
+ }] } });
9143
+
8531
9144
  /**
8532
9145
  * Utility array that contains all `@progress/kendo-angular-gantt` related components and directives
8533
9146
  */
@@ -8558,7 +9171,9 @@ const KENDO_GANTT = [
8558
9171
  TimelineYearViewComponent,
8559
9172
  SelectableDirective,
8560
9173
  CustomMessagesComponent,
8561
- GanttAddTaskComponent
9174
+ GanttAddTaskComponent,
9175
+ TaskDragDirective,
9176
+ GanttTaskTooltipTemplateDirective
8562
9177
  ];
8563
9178
 
8564
9179
  // IMPORTANT: NgModule export kept for backwards compatibility
@@ -8595,7 +9210,7 @@ const KENDO_GANTT = [
8595
9210
  */
8596
9211
  class GanttModule {
8597
9212
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8598
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, imports: [GanttComponent, GanttFlatBindingDirective, GanttHierarchyBindingDirective, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, ViewSelectorComponent, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterCellTemplateDirective, FilterMenuTemplateDirective, CellTemplateDirective, EditTemplateDirective, ColumnMenuTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, GanttExpandableDirective, DependencyDragCreateDirective, TimelineDayViewComponent, TimelineWeekViewComponent, TimelineMonthViewComponent, TimelineYearViewComponent, SelectableDirective, CustomMessagesComponent, GanttAddTaskComponent], exports: [GanttComponent, GanttFlatBindingDirective, GanttHierarchyBindingDirective, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, ViewSelectorComponent, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterCellTemplateDirective, FilterMenuTemplateDirective, CellTemplateDirective, EditTemplateDirective, ColumnMenuTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, GanttExpandableDirective, DependencyDragCreateDirective, TimelineDayViewComponent, TimelineWeekViewComponent, TimelineMonthViewComponent, TimelineYearViewComponent, SelectableDirective, CustomMessagesComponent, GanttAddTaskComponent] });
9213
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, imports: [GanttComponent, GanttFlatBindingDirective, GanttHierarchyBindingDirective, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, ViewSelectorComponent, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterCellTemplateDirective, FilterMenuTemplateDirective, CellTemplateDirective, EditTemplateDirective, ColumnMenuTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, GanttExpandableDirective, DependencyDragCreateDirective, TimelineDayViewComponent, TimelineWeekViewComponent, TimelineMonthViewComponent, TimelineYearViewComponent, SelectableDirective, CustomMessagesComponent, GanttAddTaskComponent, TaskDragDirective, GanttTaskTooltipTemplateDirective], exports: [GanttComponent, GanttFlatBindingDirective, GanttHierarchyBindingDirective, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, ViewSelectorComponent, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterCellTemplateDirective, FilterMenuTemplateDirective, CellTemplateDirective, EditTemplateDirective, ColumnMenuTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, GanttExpandableDirective, DependencyDragCreateDirective, TimelineDayViewComponent, TimelineWeekViewComponent, TimelineMonthViewComponent, TimelineYearViewComponent, SelectableDirective, CustomMessagesComponent, GanttAddTaskComponent, TaskDragDirective, GanttTaskTooltipTemplateDirective] });
8599
9214
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, providers: [{
8600
9215
  provide: L10N_PREFIX,
8601
9216
  useValue: 'kendo.gantt'
@@ -8665,5 +9280,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
8665
9280
  * Generated bundle index. Do not edit.
8666
9281
  */
8667
9282
 
8668
- export { CellCloseEvent, CellTemplateDirective, ColumnMenuTemplateDirective, CustomMessagesComponent, DependenciesTableComponent, DependencyDragCreateDirective, DependencyType, DragValidationTooltipComponent, EditDialogComponent, EditTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, FooterTemplateDirective, GanttAddTaskComponent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttComponent, GanttDependencyDirective, GanttExpandableDirective, GanttFlatBindingDirective, GanttHeaderTableBodyComponent, GanttHierarchyBindingDirective, GanttMilestoneTaskComponent, GanttModule, GanttSpanColumnComponent, GanttSummaryTaskComponent, GanttSummaryTaskTemplateDirective, GanttTaskComponent, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttTasksTableBodyComponent, GanttTimelineComponent, HeaderTemplateDirective, KENDO_GANTT, LocalizedMessagesDirective, SelectableDirective, TaskFieldsComponent, TimelineDayViewComponent, TimelineMonthViewComponent, TimelineScrollableDirective, TimelineWeekViewComponent, TimelineYearViewComponent, ToolbarComponent, ToolbarTemplateDirective, ViewSelectorComponent };
9283
+ export { CellCloseEvent, CellTemplateDirective, ColumnMenuTemplateDirective, CustomMessagesComponent, DependenciesTableComponent, DependencyDragCreateDirective, DependencyType, DragValidationTooltipComponent, EditDialogComponent, EditTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, FooterTemplateDirective, GanttAddTaskComponent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttComponent, GanttDependencyDirective, GanttExpandableDirective, GanttFlatBindingDirective, GanttHeaderTableBodyComponent, GanttHierarchyBindingDirective, GanttMilestoneTaskComponent, GanttModule, GanttSpanColumnComponent, GanttSummaryTaskComponent, GanttSummaryTaskTemplateDirective, GanttTaskComponent, GanttTaskContentTemplateDirective, GanttTaskTemplateDirective, GanttTaskTooltipTemplateDirective, GanttTasksTableBodyComponent, GanttTimelineComponent, HeaderTemplateDirective, KENDO_GANTT, LocalizedMessagesDirective, SelectableDirective, TaskDragDirective, TaskFieldsComponent, TimelineDayViewComponent, TimelineMonthViewComponent, TimelineScrollableDirective, TimelineWeekViewComponent, TimelineYearViewComponent, ToolbarComponent, ToolbarTemplateDirective, ViewSelectorComponent };
8669
9284