@progress/kendo-angular-gantt 17.2.1-develop.2 → 17.3.0-develop.1
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.
- package/directives.d.ts +3 -1
- package/dragging/task-drag.directive.d.ts +29 -0
- package/dragging/task-drag.service.d.ts +49 -0
- package/esm2022/directives.mjs +5 -1
- package/esm2022/dragging/task-drag.directive.mjs +81 -0
- package/esm2022/dragging/task-drag.service.mjs +231 -0
- package/esm2022/gantt.component.mjs +49 -9
- package/esm2022/gantt.module.mjs +3 -1
- package/esm2022/index.mjs +2 -0
- package/esm2022/localization/messages.mjs +13 -1
- package/esm2022/models/events/{task-move-start-event.interface.mjs → index.mjs} +1 -1
- package/esm2022/models/models.mjs +2 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/gantt-task-base.mjs +9 -1
- package/esm2022/rendering/gantt-task.component.mjs +20 -7
- package/esm2022/rendering/gantt-tasks-table-body.component.mjs +35 -12
- package/esm2022/template-directives/task-tooltip-template.directive.mjs +49 -0
- package/esm2022/timeline/gantt-timeline.component.mjs +205 -13
- package/fesm2022/progress-kendo-angular-gantt.mjs +681 -66
- package/gantt.component.d.ts +18 -2
- package/gantt.module.d.ts +3 -1
- package/index.d.ts +2 -0
- package/localization/messages.d.ts +9 -1
- package/models/events/index.d.ts +21 -0
- package/models/events/task-drag-event.interface.d.ts +67 -0
- package/models/models.d.ts +4 -24
- package/models/tooltip-options.interface.d.ts +28 -0
- package/package.json +16 -15
- package/rendering/gantt-task-base.d.ts +7 -1
- package/rendering/gantt-task.component.d.ts +1 -0
- package/rendering/gantt-tasks-table-body.component.d.ts +7 -2
- package/schematics/ngAdd/index.js +7 -7
- package/template-directives/task-tooltip-template.directive.d.ts +38 -0
- package/timeline/gantt-timeline.component.d.ts +31 -6
- package/esm2022/models/events/task-resize-end-event.interface.mjs +0 -5
- package/esm2022/models/events/task-resize-event.interface.mjs +0 -5
- package/esm2022/models/events/task-resize-start-event.interface.mjs +0 -5
- package/models/events/task-move-end-event.interface.d.ts +0 -12
- package/models/events/task-move-event.interface.d.ts +0 -23
- package/models/events/task-move-start-event.interface.d.ts +0 -15
- package/models/events/task-resize-end-event.interface.d.ts +0 -12
- package/models/events/task-resize-event.interface.d.ts +0 -23
- package/models/events/task-resize-start-event.interface.d.ts +0 -15
- /package/esm2022/models/events/{task-move-end-event.interface.mjs → task-drag-event.interface.mjs} +0 -0
- /package/esm2022/models/{events/task-move-event.interface.mjs → tooltip-options.interface.mjs} +0 -0
package/directives.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ import { SelectableDirective } from "./selection/selectable.directive";
|
|
|
23
23
|
import { CustomMessagesComponent } from "./localization/custom-messages.component";
|
|
24
24
|
import { GanttAddTaskComponent } from "./editing/add-task.component";
|
|
25
25
|
import { ToolbarTemplateDirective } from "./toolbar/toolbar-template.directive";
|
|
26
|
+
import { TaskDragDirective } from "./dragging/task-drag.directive";
|
|
27
|
+
import { GanttTaskTooltipTemplateDirective } from "./template-directives/task-tooltip-template.directive";
|
|
26
28
|
/**
|
|
27
29
|
* Utility array that contains all `@progress/kendo-angular-gantt` related components and directives
|
|
28
30
|
*/
|
|
29
|
-
export declare const KENDO_GANTT: readonly [typeof GanttComponent, typeof GanttFlatBindingDirective, typeof GanttHierarchyBindingDirective, typeof GanttTaskContentTemplateDirective, typeof GanttTaskTemplateDirective, typeof GanttSummaryTaskTemplateDirective, typeof ToolbarTemplateDirective, typeof ViewSelectorComponent, typeof GanttColumnComponent, typeof GanttColumnGroupComponent, typeof GanttSpanColumnComponent, typeof FilterCellTemplateDirective, typeof FilterMenuTemplateDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof ColumnMenuTemplateDirective, typeof HeaderTemplateDirective, typeof FooterTemplateDirective, typeof GanttExpandableDirective, typeof DependencyDragCreateDirective, typeof TimelineDayViewComponent, typeof TimelineWeekViewComponent, typeof TimelineMonthViewComponent, typeof TimelineYearViewComponent, typeof SelectableDirective, typeof CustomMessagesComponent, typeof GanttAddTaskComponent];
|
|
31
|
+
export declare const KENDO_GANTT: readonly [typeof GanttComponent, typeof GanttFlatBindingDirective, typeof GanttHierarchyBindingDirective, typeof GanttTaskContentTemplateDirective, typeof GanttTaskTemplateDirective, typeof GanttSummaryTaskTemplateDirective, typeof ToolbarTemplateDirective, typeof ViewSelectorComponent, typeof GanttColumnComponent, typeof GanttColumnGroupComponent, typeof GanttSpanColumnComponent, typeof FilterCellTemplateDirective, typeof FilterMenuTemplateDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof ColumnMenuTemplateDirective, typeof HeaderTemplateDirective, typeof FooterTemplateDirective, typeof GanttExpandableDirective, typeof DependencyDragCreateDirective, typeof TimelineDayViewComponent, typeof TimelineWeekViewComponent, typeof TimelineMonthViewComponent, typeof TimelineYearViewComponent, typeof SelectableDirective, typeof CustomMessagesComponent, typeof GanttAddTaskComponent, typeof TaskDragDirective, typeof GanttTaskTooltipTemplateDirective];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { EventEmitter } from '@angular/core';
|
|
6
|
+
import { TaskDragService } from './task-drag.service';
|
|
7
|
+
import { DragTargetContainerDirective } from '@progress/kendo-angular-utils';
|
|
8
|
+
import { GanttComponent } from '../gantt.component';
|
|
9
|
+
import { TaskDragEvent } from '../models/events';
|
|
10
|
+
import { MappingService } from '../common/mapping.service';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "@progress/kendo-angular-utils";
|
|
13
|
+
export declare class TaskDragDirective {
|
|
14
|
+
/**
|
|
15
|
+
* Emitted while the end user is resizing or moving a task through dragging.
|
|
16
|
+
*/
|
|
17
|
+
taskDrag: EventEmitter<TaskDragEvent>;
|
|
18
|
+
/**
|
|
19
|
+
* Triggered when the dragging action associated with resizing or moving an event is finished.
|
|
20
|
+
* The event data contains all necessary information to update the task and all related tasks
|
|
21
|
+
* accordingly.
|
|
22
|
+
*/
|
|
23
|
+
taskDragEnd: EventEmitter<TaskDragEvent>;
|
|
24
|
+
private subs;
|
|
25
|
+
constructor(gantt: GanttComponent, mapper: MappingService, dragTargetContainer: DragTargetContainerDirective, taskDragService: TaskDragService);
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TaskDragDirective, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TaskDragDirective, "[kendoGanttTaskDrag]", never, {}, { "taskDrag": "taskDrag"; "taskDragEnd": "taskDragEnd"; }, never, never, true, [{ directive: typeof i1.DragTargetContainerDirective; inputs: {}; outputs: {}; }]>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NgZone } from '@angular/core';
|
|
6
|
+
import { DragTargetDragEndEvent, DragTargetDragEvent, DragTargetDragStartEvent } from '@progress/kendo-angular-utils';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import { MappingService } from '../common/mapping.service';
|
|
9
|
+
import { GanttTaskBase } from '../rendering/gantt-task-base';
|
|
10
|
+
import { InternalTaskDragEvent } from '../models/events/task-drag-event.interface';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare class TaskDragService {
|
|
16
|
+
private mapper;
|
|
17
|
+
private zone;
|
|
18
|
+
taskDraggable: boolean;
|
|
19
|
+
drag: Subject<InternalTaskDragEvent>;
|
|
20
|
+
dragEnd: Subject<InternalTaskDragEvent>;
|
|
21
|
+
dragStart: Subject<DragTargetDragStartEvent>;
|
|
22
|
+
tasksContainer: HTMLElement;
|
|
23
|
+
tasksContainerRect: DOMRect;
|
|
24
|
+
scrollableContainer: HTMLElement;
|
|
25
|
+
currentDragTask: GanttTaskBase;
|
|
26
|
+
currentDragTaskRect: DOMRect;
|
|
27
|
+
leftDragHandle: boolean;
|
|
28
|
+
rightDragHandle: boolean;
|
|
29
|
+
completionRatioHandle: boolean;
|
|
30
|
+
private tasks;
|
|
31
|
+
private editedProp;
|
|
32
|
+
private prevX;
|
|
33
|
+
private prevWidth;
|
|
34
|
+
private prevLeft;
|
|
35
|
+
private prevScrollLeft;
|
|
36
|
+
private newRange;
|
|
37
|
+
private offsetX;
|
|
38
|
+
private maxWidth;
|
|
39
|
+
private newCompletionRatio;
|
|
40
|
+
constructor(mapper: MappingService, zone: NgZone);
|
|
41
|
+
registerTask(task: GanttTaskBase): void;
|
|
42
|
+
onDragStart(args: DragTargetDragStartEvent): void;
|
|
43
|
+
onDrag(args: DragTargetDragEvent): void;
|
|
44
|
+
onDragEnd(args: DragTargetDragEndEvent): void;
|
|
45
|
+
private calculateMarquee;
|
|
46
|
+
private calculateStartEnd;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TaskDragService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TaskDragService>;
|
|
49
|
+
}
|
package/esm2022/directives.mjs
CHANGED
|
@@ -23,6 +23,8 @@ import { SelectableDirective } from "./selection/selectable.directive";
|
|
|
23
23
|
import { CustomMessagesComponent } from "./localization/custom-messages.component";
|
|
24
24
|
import { GanttAddTaskComponent } from "./editing/add-task.component";
|
|
25
25
|
import { ToolbarTemplateDirective } from "./toolbar/toolbar-template.directive";
|
|
26
|
+
import { TaskDragDirective } from "./dragging/task-drag.directive";
|
|
27
|
+
import { GanttTaskTooltipTemplateDirective } from "./template-directives/task-tooltip-template.directive";
|
|
26
28
|
/**
|
|
27
29
|
* Utility array that contains all `@progress/kendo-angular-gantt` related components and directives
|
|
28
30
|
*/
|
|
@@ -53,5 +55,7 @@ export const KENDO_GANTT = [
|
|
|
53
55
|
TimelineYearViewComponent,
|
|
54
56
|
SelectableDirective,
|
|
55
57
|
CustomMessagesComponent,
|
|
56
|
-
GanttAddTaskComponent
|
|
58
|
+
GanttAddTaskComponent,
|
|
59
|
+
TaskDragDirective,
|
|
60
|
+
GanttTaskTooltipTemplateDirective
|
|
57
61
|
];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, EventEmitter, Output } from '@angular/core';
|
|
6
|
+
import { TaskDragService } from './task-drag.service';
|
|
7
|
+
import { DragTargetContainerDirective } from '@progress/kendo-angular-utils';
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { GanttComponent } from '../gantt.component';
|
|
10
|
+
import { getEditItem } from '../editing/utils';
|
|
11
|
+
import { MappingService } from '../common/mapping.service';
|
|
12
|
+
import { hasObservers } from '@progress/kendo-angular-common';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
import * as i1 from "../gantt.component";
|
|
15
|
+
import * as i2 from "../common/mapping.service";
|
|
16
|
+
import * as i3 from "@progress/kendo-angular-utils";
|
|
17
|
+
import * as i4 from "./task-drag.service";
|
|
18
|
+
export class TaskDragDirective {
|
|
19
|
+
/**
|
|
20
|
+
* Emitted while the end user is resizing or moving a task through dragging.
|
|
21
|
+
*/
|
|
22
|
+
taskDrag = new EventEmitter();
|
|
23
|
+
/**
|
|
24
|
+
* Triggered when the dragging action associated with resizing or moving an event is finished.
|
|
25
|
+
* The event data contains all necessary information to update the task and all related tasks
|
|
26
|
+
* accordingly.
|
|
27
|
+
*/
|
|
28
|
+
taskDragEnd = new EventEmitter();
|
|
29
|
+
subs = new Subscription();
|
|
30
|
+
constructor(gantt, mapper, dragTargetContainer, taskDragService) {
|
|
31
|
+
dragTargetContainer.mode = 'manual';
|
|
32
|
+
dragTargetContainer.dragTargetFilter = '.k-resize-handle, .k-task, .k-task-draghandle';
|
|
33
|
+
dragTargetContainer.cursorStyle = null;
|
|
34
|
+
dragTargetContainer.threshold = 5;
|
|
35
|
+
this.subs.add(dragTargetContainer.onDragStart.subscribe((args) => {
|
|
36
|
+
taskDragService.onDragStart(args);
|
|
37
|
+
}));
|
|
38
|
+
this.subs.add(dragTargetContainer.onDrag.subscribe((args) => {
|
|
39
|
+
taskDragService.onDrag(args);
|
|
40
|
+
}));
|
|
41
|
+
this.subs.add(dragTargetContainer.onDragEnd.subscribe((args) => {
|
|
42
|
+
taskDragService.onDragEnd(args);
|
|
43
|
+
}));
|
|
44
|
+
this.subs.add(taskDragService.drag.subscribe((args) => {
|
|
45
|
+
hasObservers(this.taskDrag) && this.taskDrag.emit({
|
|
46
|
+
start: args.start,
|
|
47
|
+
end: args.end,
|
|
48
|
+
completionRatio: args.completionRatio,
|
|
49
|
+
item: getEditItem(args.item, gantt.treeList.view.data, mapper),
|
|
50
|
+
dragEvent: args.dragEvent
|
|
51
|
+
});
|
|
52
|
+
}));
|
|
53
|
+
this.subs.add(taskDragService.dragEnd.subscribe((args) => {
|
|
54
|
+
hasObservers(this.taskDragEnd) && this.taskDragEnd.emit({
|
|
55
|
+
start: args.start,
|
|
56
|
+
end: args.end,
|
|
57
|
+
completionRatio: args.completionRatio,
|
|
58
|
+
item: getEditItem(args.item, gantt.treeList.view.data, mapper),
|
|
59
|
+
dragEvent: args.dragEvent
|
|
60
|
+
});
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
ngOnDestroy() {
|
|
64
|
+
this.subs.unsubscribe();
|
|
65
|
+
}
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragDirective, deps: [{ token: i1.GanttComponent }, { token: i2.MappingService }, { token: i3.DragTargetContainerDirective }, { token: i4.TaskDragService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
67
|
+
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.DragTargetContainerDirective }], ngImport: i0 });
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragDirective, decorators: [{
|
|
70
|
+
type: Directive,
|
|
71
|
+
args: [{
|
|
72
|
+
selector: '[kendoGanttTaskDrag]',
|
|
73
|
+
standalone: true,
|
|
74
|
+
providers: [TaskDragService],
|
|
75
|
+
hostDirectives: [DragTargetContainerDirective]
|
|
76
|
+
}]
|
|
77
|
+
}], ctorParameters: function () { return [{ type: i1.GanttComponent }, { type: i2.MappingService }, { type: i3.DragTargetContainerDirective }, { type: i4.TaskDragService }]; }, propDecorators: { taskDrag: [{
|
|
78
|
+
type: Output
|
|
79
|
+
}], taskDragEnd: [{
|
|
80
|
+
type: Output
|
|
81
|
+
}] } });
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Injectable, NgZone } from '@angular/core';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { MappingService } from '../common/mapping.service';
|
|
8
|
+
import { isPresent } from '@progress/kendo-angular-common';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "../common/mapping.service";
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export class TaskDragService {
|
|
15
|
+
mapper;
|
|
16
|
+
zone;
|
|
17
|
+
taskDraggable;
|
|
18
|
+
drag = new Subject();
|
|
19
|
+
dragEnd = new Subject();
|
|
20
|
+
dragStart = new Subject();
|
|
21
|
+
tasksContainer;
|
|
22
|
+
tasksContainerRect;
|
|
23
|
+
scrollableContainer;
|
|
24
|
+
currentDragTask;
|
|
25
|
+
currentDragTaskRect;
|
|
26
|
+
leftDragHandle;
|
|
27
|
+
rightDragHandle;
|
|
28
|
+
completionRatioHandle;
|
|
29
|
+
tasks = [];
|
|
30
|
+
editedProp;
|
|
31
|
+
prevX;
|
|
32
|
+
prevWidth;
|
|
33
|
+
prevLeft;
|
|
34
|
+
prevScrollLeft;
|
|
35
|
+
newRange;
|
|
36
|
+
offsetX;
|
|
37
|
+
maxWidth;
|
|
38
|
+
newCompletionRatio;
|
|
39
|
+
constructor(mapper, zone) {
|
|
40
|
+
this.mapper = mapper;
|
|
41
|
+
this.zone = zone;
|
|
42
|
+
}
|
|
43
|
+
registerTask(task) {
|
|
44
|
+
if (!this.tasks.some(t => t === task)) {
|
|
45
|
+
this.tasks.push(task);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
onDragStart(args) {
|
|
49
|
+
this.tasksContainerRect = this.tasksContainer.getBoundingClientRect();
|
|
50
|
+
this.currentDragTask = this.tasks.find(t => t.taskElement.nativeElement.contains(args.dragTarget) || t.taskElement.nativeElement.nextElementSibling === args.dragTarget);
|
|
51
|
+
const taskEl = this.currentDragTask.taskElement.nativeElement;
|
|
52
|
+
this.currentDragTaskRect = taskEl.getBoundingClientRect();
|
|
53
|
+
this.completionRatioHandle = args.dragTarget.classList.contains('k-task-draghandle');
|
|
54
|
+
this.leftDragHandle = args.dragTarget.classList.contains('k-resize-w');
|
|
55
|
+
this.rightDragHandle = args.dragTarget.classList.contains('k-resize-e');
|
|
56
|
+
this.editedProp = this.leftDragHandle ? 'start' : this.rightDragHandle ? 'end' : 'both';
|
|
57
|
+
this.dragStart.next(args);
|
|
58
|
+
}
|
|
59
|
+
onDrag(args) {
|
|
60
|
+
if (this.completionRatioHandle) { // completion ratio handle drag
|
|
61
|
+
const taskWidth = this.currentDragTaskRect.width;
|
|
62
|
+
const scrollLeft = this.scrollableContainer?.scrollLeft;
|
|
63
|
+
const scrollDelta = isPresent(this.prevScrollLeft) ? this.prevScrollLeft - scrollLeft : 0;
|
|
64
|
+
const completionWidth = Math.min(Math.max(args.dragEvent.clientX - this.currentDragTaskRect.left - scrollDelta, 0), taskWidth);
|
|
65
|
+
const newCompletionRatio = completionWidth / taskWidth;
|
|
66
|
+
this.currentDragTask.draggedCompletionWidth = completionWidth;
|
|
67
|
+
!this.prevScrollLeft && (this.prevScrollLeft = scrollLeft);
|
|
68
|
+
this.newCompletionRatio = newCompletionRatio;
|
|
69
|
+
this.drag.next({
|
|
70
|
+
start: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start'),
|
|
71
|
+
end: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end'),
|
|
72
|
+
completionRatio: newCompletionRatio,
|
|
73
|
+
dragEvent: args,
|
|
74
|
+
item: this.currentDragTask.dataItem,
|
|
75
|
+
offset: this.prevX,
|
|
76
|
+
width: this.prevWidth
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else { // task resize or drag
|
|
80
|
+
const marquee = this.calculateMarquee(args, this.leftDragHandle, this.rightDragHandle);
|
|
81
|
+
if (!marquee) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const { left, width } = marquee;
|
|
85
|
+
this.newRange = this.calculateStartEnd(this.editedProp, width, left);
|
|
86
|
+
this.drag.next({
|
|
87
|
+
start: this.newRange.start,
|
|
88
|
+
end: this.newRange.end,
|
|
89
|
+
completionRatio: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'completionRatio'),
|
|
90
|
+
dragEvent: args,
|
|
91
|
+
item: this.currentDragTask.dataItem,
|
|
92
|
+
offset: left,
|
|
93
|
+
width
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
onDragEnd(args) {
|
|
98
|
+
if (this.completionRatioHandle) {
|
|
99
|
+
this.dragEnd.next({
|
|
100
|
+
start: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start'),
|
|
101
|
+
end: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end'),
|
|
102
|
+
completionRatio: this.newCompletionRatio,
|
|
103
|
+
dragEvent: args,
|
|
104
|
+
item: this.currentDragTask.dataItem,
|
|
105
|
+
offset: this.prevX,
|
|
106
|
+
width: this.prevWidth
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.dragEnd.next({
|
|
111
|
+
start: this.newRange.start,
|
|
112
|
+
end: this.newRange.end,
|
|
113
|
+
completionRatio: this.mapper.extractFromTask(this.currentDragTask.dataItem, 'completionRatio'),
|
|
114
|
+
dragEvent: args,
|
|
115
|
+
item: this.currentDragTask.dataItem,
|
|
116
|
+
offset: this.prevX,
|
|
117
|
+
width: this.prevWidth
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
this.prevWidth = this.prevX = this.prevLeft = this.prevScrollLeft = this.offsetX = this.maxWidth = this.newCompletionRatio = null;
|
|
121
|
+
this.currentDragTaskRect = this.currentDragTask = this.currentDragTask.draggedCompletionWidth = this.editedProp = this.newRange = null;
|
|
122
|
+
this.leftDragHandle = this.rightDragHandle = this.completionRatioHandle = false;
|
|
123
|
+
}
|
|
124
|
+
calculateMarquee(e, leftDragHandle, rightDragHandle) {
|
|
125
|
+
const clientX = e.dragEvent.clientX;
|
|
126
|
+
// Update container rect when dragging outside of it to avoid miscalculations
|
|
127
|
+
// coming from scrolling the whole page during dragging a task
|
|
128
|
+
if (clientX < this.tasksContainerRect.x || clientX > this.tasksContainerRect.right) {
|
|
129
|
+
this.zone.runOutsideAngular(() => {
|
|
130
|
+
this.tasksContainerRect = this.tasksContainer.getBoundingClientRect();
|
|
131
|
+
this.currentDragTaskRect = this.currentDragTask.taskElement.nativeElement.getBoundingClientRect();
|
|
132
|
+
});
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const scrollLeft = this.scrollableContainer?.scrollLeft;
|
|
136
|
+
const scrollDelta = isPresent(this.prevScrollLeft) ? this.prevScrollLeft - scrollLeft : 0;
|
|
137
|
+
let left, width;
|
|
138
|
+
if (leftDragHandle) {
|
|
139
|
+
if (!isPresent(this.maxWidth)) {
|
|
140
|
+
this.maxWidth = this.currentDragTaskRect.right - this.tasksContainerRect.x + scrollLeft;
|
|
141
|
+
}
|
|
142
|
+
left = Math.min(Math.max(clientX - this.tasksContainerRect.x - scrollDelta, 0), this.maxWidth);
|
|
143
|
+
width = Math.min(Math.max(this.currentDragTaskRect.right - clientX + scrollDelta, 0), this.maxWidth);
|
|
144
|
+
}
|
|
145
|
+
else if (rightDragHandle) {
|
|
146
|
+
if (!isPresent(this.maxWidth)) {
|
|
147
|
+
this.maxWidth = this.tasksContainerRect.right - this.currentDragTaskRect.x;
|
|
148
|
+
}
|
|
149
|
+
left = this.prevLeft ?? (this.currentDragTaskRect.x - this.tasksContainerRect.x);
|
|
150
|
+
width = Math.min(Math.max(clientX - this.tasksContainerRect.x - left - scrollDelta, 0), this.maxWidth);
|
|
151
|
+
}
|
|
152
|
+
else { // dragging the whole task
|
|
153
|
+
if (!isPresent(this.offsetX)) {
|
|
154
|
+
this.offsetX = e.dragEvent.offsetX;
|
|
155
|
+
}
|
|
156
|
+
left = Math.max(clientX - this.tasksContainerRect.x - this.offsetX - scrollDelta, 0);
|
|
157
|
+
}
|
|
158
|
+
const cursorLeft = clientX - this.tasksContainerRect.x;
|
|
159
|
+
// out of limits (0, max possible width) when dragging the left handle
|
|
160
|
+
if (this.leftDragHandle && (cursorLeft < 0 || this.maxWidth < cursorLeft)) {
|
|
161
|
+
return {
|
|
162
|
+
left: cursorLeft < 0 ? 0 : this.maxWidth,
|
|
163
|
+
width
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
// out of limits (0, max possible width) when dragging right handle
|
|
167
|
+
if (rightDragHandle && (clientX < this.currentDragTaskRect.x) || clientX > this.tasksContainerRect.right) {
|
|
168
|
+
return {
|
|
169
|
+
left,
|
|
170
|
+
width: clientX < this.currentDragTaskRect.x ? 0 : this.maxWidth
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
// out of limits (start < view start || end > view end) when dragging the whole task
|
|
174
|
+
if (!(this.leftDragHandle || this.rightDragHandle) && (left < 0 || (clientX + this.currentDragTaskRect.width - scrollDelta - this.offsetX > this.tasksContainerRect.right))) {
|
|
175
|
+
return {
|
|
176
|
+
left: Math.min(Math.max(left, 0), this.tasksContainerRect.width - this.currentDragTaskRect.width),
|
|
177
|
+
width: this.currentDragTaskRect.width
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
this.prevX = clientX;
|
|
181
|
+
this.prevLeft = left;
|
|
182
|
+
this.prevWidth = width;
|
|
183
|
+
!this.prevScrollLeft && (this.prevScrollLeft = scrollLeft);
|
|
184
|
+
return {
|
|
185
|
+
left,
|
|
186
|
+
width: width ?? this.currentDragTaskRect.width
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
calculateStartEnd(editedProp, width, left) {
|
|
190
|
+
const startDate = this.mapper.extractFromTask(this.currentDragTask.dataItem, 'start');
|
|
191
|
+
const endDate = this.mapper.extractFromTask(this.currentDragTask.dataItem, 'end');
|
|
192
|
+
const duration = endDate - startDate;
|
|
193
|
+
const delta = left - this.currentDragTaskRect.x + this.tasksContainerRect.x;
|
|
194
|
+
if (editedProp === 'both') {
|
|
195
|
+
if (duration) {
|
|
196
|
+
const delta = left - this.currentDragTaskRect.x + this.tasksContainerRect.left;
|
|
197
|
+
const coef = delta / this.currentDragTask.taskWidth;
|
|
198
|
+
const deltaMs = duration * coef;
|
|
199
|
+
const newStart = new Date(startDate.getTime() + deltaMs);
|
|
200
|
+
const newEnd = new Date(newStart.getTime() + duration);
|
|
201
|
+
return {
|
|
202
|
+
start: newStart,
|
|
203
|
+
end: newEnd
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
else { // milestone task
|
|
207
|
+
const initialOffset = this.currentDragTaskRect.x - this.tasksContainerRect.x;
|
|
208
|
+
const msPerPx = (startDate - this.currentDragTask.viewService.viewStart) / initialOffset;
|
|
209
|
+
const deltaMs = delta * msPerPx;
|
|
210
|
+
return {
|
|
211
|
+
start: new Date(startDate.getTime() + deltaMs),
|
|
212
|
+
end: new Date(startDate.getTime() + deltaMs)
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const coef = width / this.currentDragTask.taskWidth;
|
|
217
|
+
const newDuration = duration * coef;
|
|
218
|
+
const newPropDate = editedProp === 'start' ? new Date(endDate - newDuration) : new Date(startDate.getTime() + newDuration);
|
|
219
|
+
const newStart = editedProp === 'start' ? newPropDate : startDate;
|
|
220
|
+
const newEnd = editedProp === 'end' ? newPropDate : endDate;
|
|
221
|
+
return {
|
|
222
|
+
start: newStart,
|
|
223
|
+
end: newEnd
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService, deps: [{ token: i1.MappingService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService });
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDragService, decorators: [{
|
|
230
|
+
type: Injectable
|
|
231
|
+
}], ctorParameters: function () { return [{ type: i1.MappingService }, { type: i0.NgZone }]; } });
|
|
@@ -45,6 +45,7 @@ import { LocalizedMessagesDirective } from './localization/localized-messages.di
|
|
|
45
45
|
import { SplitterComponent, SplitterPaneComponent } from '@progress/kendo-angular-layout';
|
|
46
46
|
import { DialogActionsComponent, DialogComponent } from '@progress/kendo-angular-dialog';
|
|
47
47
|
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
48
|
+
import { GanttTaskTooltipTemplateDirective } from './template-directives/task-tooltip-template.directive';
|
|
48
49
|
import * as i0 from "@angular/core";
|
|
49
50
|
import * as i1 from "./timeline/timeline-view.service";
|
|
50
51
|
import * as i2 from "./scrolling/scroll-sync.service";
|
|
@@ -165,6 +166,14 @@ export class GanttComponent {
|
|
|
165
166
|
* Therefore the `static` property needs to be set to `false`.
|
|
166
167
|
*/
|
|
167
168
|
taskTemplate;
|
|
169
|
+
/**
|
|
170
|
+
* @hidden
|
|
171
|
+
*
|
|
172
|
+
* Queries the template for a task tooltip template declaration.
|
|
173
|
+
* In newer Angular versions the ngIf-ed value gets evaluated after the static query is resolved.
|
|
174
|
+
* Therefore the `static` property needs to be set to `false`.
|
|
175
|
+
*/
|
|
176
|
+
taskTooltipTemplate;
|
|
168
177
|
/**
|
|
169
178
|
* @hidden
|
|
170
179
|
*
|
|
@@ -505,6 +514,16 @@ export class GanttComponent {
|
|
|
505
514
|
get dragScrollSettings() {
|
|
506
515
|
return this._dragScrollSettings;
|
|
507
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* Allows setting the task tooltip `position`, `callout`, and `showAfter` options.
|
|
519
|
+
*
|
|
520
|
+
* @default { position: 'top', callout: true, showAfter: 100 }
|
|
521
|
+
*/
|
|
522
|
+
taskTooltipOptions = {
|
|
523
|
+
position: 'top',
|
|
524
|
+
callout: true,
|
|
525
|
+
showAfter: 100
|
|
526
|
+
};
|
|
508
527
|
/**
|
|
509
528
|
* Fires when an item is expanded.
|
|
510
529
|
*/
|
|
@@ -1396,7 +1415,7 @@ export class GanttComponent {
|
|
|
1396
1415
|
}
|
|
1397
1416
|
}
|
|
1398
1417
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, deps: [{ token: i1.TimelineViewService }, { token: i2.ScrollSyncService }, { token: i0.Renderer2 }, { token: i3.MappingService }, { token: i4.OptionChangesService }, { token: i5.DependencyDomService }, { token: i6.EditService }, { token: i7.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i8.NavigationService }, { token: i9.CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1399
|
-
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: [
|
|
1418
|
+
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: [
|
|
1400
1419
|
GanttLocalizationService,
|
|
1401
1420
|
LocalizationService,
|
|
1402
1421
|
{
|
|
@@ -1424,7 +1443,7 @@ export class GanttComponent {
|
|
|
1424
1443
|
TimelineScrollService,
|
|
1425
1444
|
NavigationService,
|
|
1426
1445
|
CurrentTimeMarkerService
|
|
1427
|
-
], 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: `
|
|
1446
|
+
], 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: `
|
|
1428
1447
|
<ng-container kendoGanttLocalizedMessages
|
|
1429
1448
|
i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
|
|
1430
1449
|
taskEditingGeneralTabTitle="General"
|
|
@@ -1622,7 +1641,13 @@ export class GanttComponent {
|
|
|
1622
1641
|
columnsApply="Apply"
|
|
1623
1642
|
|
|
1624
1643
|
i18n-columnsReset="kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
|
|
1625
|
-
columnsReset="Reset"
|
|
1644
|
+
columnsReset="Reset"
|
|
1645
|
+
|
|
1646
|
+
i18n-tooltipStartDateText="kendo.gantt.tooltipStartDateText|The text shown in the task tooltip before the task start date"
|
|
1647
|
+
tooltipStartDateText="Start"
|
|
1648
|
+
|
|
1649
|
+
i18n-tooltipEndDateText="kendo.gantt.tooltipEndDateText|The text shown in the task tooltip before the task end date"
|
|
1650
|
+
tooltipEndDateText="End"></ng-container>
|
|
1626
1651
|
<kendo-gantt-toolbar
|
|
1627
1652
|
*ngIf="showToolbar('top')"
|
|
1628
1653
|
[attr.aria-label]="toolbarAriaLabel"
|
|
@@ -1761,6 +1786,8 @@ export class GanttComponent {
|
|
|
1761
1786
|
dblclick: handleTimelineDblClick,
|
|
1762
1787
|
mousedown: handleTimelineMouseDown
|
|
1763
1788
|
}"
|
|
1789
|
+
[customTooltipTemplate]="taskTooltipTemplate"
|
|
1790
|
+
[tooltipOptions]="taskTooltipOptions"
|
|
1764
1791
|
[scope]="this"
|
|
1765
1792
|
></kendo-gantt-timeline>
|
|
1766
1793
|
</kendo-splitter-pane>
|
|
@@ -1796,7 +1823,7 @@ export class GanttComponent {
|
|
|
1796
1823
|
</kendo-dialog>
|
|
1797
1824
|
|
|
1798
1825
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
1799
|
-
`, 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, 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]" }] });
|
|
1826
|
+
`, 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, 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]" }] });
|
|
1800
1827
|
}
|
|
1801
1828
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttComponent, decorators: [{
|
|
1802
1829
|
type: Component,
|
|
@@ -2030,7 +2057,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2030
2057
|
columnsApply="Apply"
|
|
2031
2058
|
|
|
2032
2059
|
i18n-columnsReset="kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
|
|
2033
|
-
columnsReset="Reset"
|
|
2060
|
+
columnsReset="Reset"
|
|
2061
|
+
|
|
2062
|
+
i18n-tooltipStartDateText="kendo.gantt.tooltipStartDateText|The text shown in the task tooltip before the task start date"
|
|
2063
|
+
tooltipStartDateText="Start"
|
|
2064
|
+
|
|
2065
|
+
i18n-tooltipEndDateText="kendo.gantt.tooltipEndDateText|The text shown in the task tooltip before the task end date"
|
|
2066
|
+
tooltipEndDateText="End"></ng-container>
|
|
2034
2067
|
<kendo-gantt-toolbar
|
|
2035
2068
|
*ngIf="showToolbar('top')"
|
|
2036
2069
|
[attr.aria-label]="toolbarAriaLabel"
|
|
@@ -2169,6 +2202,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2169
2202
|
dblclick: handleTimelineDblClick,
|
|
2170
2203
|
mousedown: handleTimelineMouseDown
|
|
2171
2204
|
}"
|
|
2205
|
+
[customTooltipTemplate]="taskTooltipTemplate"
|
|
2206
|
+
[tooltipOptions]="taskTooltipOptions"
|
|
2172
2207
|
[scope]="this"
|
|
2173
2208
|
></kendo-gantt-timeline>
|
|
2174
2209
|
</kendo-splitter-pane>
|
|
@@ -2213,16 +2248,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2213
2248
|
args: [TreeListComponent, { static: true }]
|
|
2214
2249
|
}], timeline: [{
|
|
2215
2250
|
type: ViewChild,
|
|
2216
|
-
args: [GanttTimelineComponent
|
|
2251
|
+
args: [GanttTimelineComponent]
|
|
2217
2252
|
}], taskContentTemplate: [{
|
|
2218
2253
|
type: ContentChild,
|
|
2219
|
-
args: [GanttTaskContentTemplateDirective
|
|
2254
|
+
args: [GanttTaskContentTemplateDirective]
|
|
2220
2255
|
}], taskTemplate: [{
|
|
2221
2256
|
type: ContentChild,
|
|
2222
|
-
args: [GanttTaskTemplateDirective
|
|
2257
|
+
args: [GanttTaskTemplateDirective]
|
|
2258
|
+
}], taskTooltipTemplate: [{
|
|
2259
|
+
type: ContentChild,
|
|
2260
|
+
args: [GanttTaskTooltipTemplateDirective]
|
|
2223
2261
|
}], summaryTaskTemplate: [{
|
|
2224
2262
|
type: ContentChild,
|
|
2225
|
-
args: [GanttSummaryTaskTemplateDirective
|
|
2263
|
+
args: [GanttSummaryTaskTemplateDirective]
|
|
2226
2264
|
}], toolbarTemplateChildren: [{
|
|
2227
2265
|
type: ContentChildren,
|
|
2228
2266
|
args: [ToolbarTemplateDirective]
|
|
@@ -2316,6 +2354,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2316
2354
|
type: Input
|
|
2317
2355
|
}], dragScrollSettings: [{
|
|
2318
2356
|
type: Input
|
|
2357
|
+
}], taskTooltipOptions: [{
|
|
2358
|
+
type: Input
|
|
2319
2359
|
}], rowExpand: [{
|
|
2320
2360
|
type: Output
|
|
2321
2361
|
}], taskDblClick: [{
|
package/esm2022/gantt.module.mjs
CHANGED
|
@@ -39,6 +39,8 @@ import * as i24 from "./timeline/timeline-year-view.component";
|
|
|
39
39
|
import * as i25 from "./selection/selectable.directive";
|
|
40
40
|
import * as i26 from "./localization/custom-messages.component";
|
|
41
41
|
import * as i27 from "./editing/add-task.component";
|
|
42
|
+
import * as i28 from "./dragging/task-drag.directive";
|
|
43
|
+
import * as i29 from "./template-directives/task-tooltip-template.directive";
|
|
42
44
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
43
45
|
/**
|
|
44
46
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -73,7 +75,7 @@ import * as i27 from "./editing/add-task.component";
|
|
|
73
75
|
*/
|
|
74
76
|
export class GanttModule {
|
|
75
77
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
76
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, imports: [i1.GanttComponent, i2.GanttFlatBindingDirective, i3.GanttHierarchyBindingDirective, i4.GanttTaskContentTemplateDirective, i5.GanttTaskTemplateDirective, i6.GanttSummaryTaskTemplateDirective, i7.ToolbarTemplateDirective, i8.ViewSelectorComponent, i9.GanttColumnComponent, i10.GanttColumnGroupComponent, i11.GanttSpanColumnComponent, i12.FilterCellTemplateDirective, i13.FilterMenuTemplateDirective, i14.CellTemplateDirective, i15.EditTemplateDirective, i16.ColumnMenuTemplateDirective, i17.HeaderTemplateDirective, i18.FooterTemplateDirective, i19.GanttExpandableDirective, i20.DependencyDragCreateDirective, i21.TimelineDayViewComponent, i22.TimelineWeekViewComponent, i23.TimelineMonthViewComponent, i24.TimelineYearViewComponent, i25.SelectableDirective, i26.CustomMessagesComponent, i27.GanttAddTaskComponent], exports: [i1.GanttComponent, i2.GanttFlatBindingDirective, i3.GanttHierarchyBindingDirective, i4.GanttTaskContentTemplateDirective, i5.GanttTaskTemplateDirective, i6.GanttSummaryTaskTemplateDirective, i7.ToolbarTemplateDirective, i8.ViewSelectorComponent, i9.GanttColumnComponent, i10.GanttColumnGroupComponent, i11.GanttSpanColumnComponent, i12.FilterCellTemplateDirective, i13.FilterMenuTemplateDirective, i14.CellTemplateDirective, i15.EditTemplateDirective, i16.ColumnMenuTemplateDirective, i17.HeaderTemplateDirective, i18.FooterTemplateDirective, i19.GanttExpandableDirective, i20.DependencyDragCreateDirective, i21.TimelineDayViewComponent, i22.TimelineWeekViewComponent, i23.TimelineMonthViewComponent, i24.TimelineYearViewComponent, i25.SelectableDirective, i26.CustomMessagesComponent, i27.GanttAddTaskComponent] });
|
|
78
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, imports: [i1.GanttComponent, i2.GanttFlatBindingDirective, i3.GanttHierarchyBindingDirective, i4.GanttTaskContentTemplateDirective, i5.GanttTaskTemplateDirective, i6.GanttSummaryTaskTemplateDirective, i7.ToolbarTemplateDirective, i8.ViewSelectorComponent, i9.GanttColumnComponent, i10.GanttColumnGroupComponent, i11.GanttSpanColumnComponent, i12.FilterCellTemplateDirective, i13.FilterMenuTemplateDirective, i14.CellTemplateDirective, i15.EditTemplateDirective, i16.ColumnMenuTemplateDirective, i17.HeaderTemplateDirective, i18.FooterTemplateDirective, i19.GanttExpandableDirective, i20.DependencyDragCreateDirective, i21.TimelineDayViewComponent, i22.TimelineWeekViewComponent, i23.TimelineMonthViewComponent, i24.TimelineYearViewComponent, i25.SelectableDirective, i26.CustomMessagesComponent, i27.GanttAddTaskComponent, i28.TaskDragDirective, i29.GanttTaskTooltipTemplateDirective], exports: [i1.GanttComponent, i2.GanttFlatBindingDirective, i3.GanttHierarchyBindingDirective, i4.GanttTaskContentTemplateDirective, i5.GanttTaskTemplateDirective, i6.GanttSummaryTaskTemplateDirective, i7.ToolbarTemplateDirective, i8.ViewSelectorComponent, i9.GanttColumnComponent, i10.GanttColumnGroupComponent, i11.GanttSpanColumnComponent, i12.FilterCellTemplateDirective, i13.FilterMenuTemplateDirective, i14.CellTemplateDirective, i15.EditTemplateDirective, i16.ColumnMenuTemplateDirective, i17.HeaderTemplateDirective, i18.FooterTemplateDirective, i19.GanttExpandableDirective, i20.DependencyDragCreateDirective, i21.TimelineDayViewComponent, i22.TimelineWeekViewComponent, i23.TimelineMonthViewComponent, i24.TimelineYearViewComponent, i25.SelectableDirective, i26.CustomMessagesComponent, i27.GanttAddTaskComponent, i28.TaskDragDirective, i29.GanttTaskTooltipTemplateDirective] });
|
|
77
79
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GanttModule, providers: [{
|
|
78
80
|
provide: L10N_PREFIX,
|
|
79
81
|
useValue: 'kendo.gantt'
|
package/esm2022/index.mjs
CHANGED
|
@@ -34,6 +34,8 @@ export { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
|
|
|
34
34
|
export { SelectableDirective } from './selection/selectable.directive';
|
|
35
35
|
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
36
36
|
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
37
|
+
export { TaskDragDirective } from './dragging/task-drag.directive';
|
|
38
|
+
export { GanttTaskTooltipTemplateDirective } from './template-directives/task-tooltip-template.directive';
|
|
37
39
|
export * from './models/models';
|
|
38
40
|
export * from './columns/columns';
|
|
39
41
|
export * from './directives';
|