@progress/kendo-angular-gantt 0.3.0-dev.202201111723 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-gantt.js +2 -2
- package/dist/cdn/main.js +1 -29
- package/dist/es/common/touch-enabled.js +9 -0
- package/dist/es/dependencies/utils.js +34 -0
- package/dist/es/dragging/dependency-drag-create.directive.js +347 -0
- package/dist/es/dragging/drag-validation-tooltip.component.js +27 -0
- package/dist/es/editing/dependencies-table.component.js +1 -1
- package/dist/es/editing/edit-dialog.component.js +3 -3
- package/dist/es/editing/edit.service.js +4 -2
- package/dist/es/editing/task-fields.component.js +1 -1
- package/dist/es/editing/{util.js → utils.js} +0 -0
- package/dist/es/gantt.component.js +313 -28
- package/dist/es/gantt.module.js +23 -6
- package/dist/es/index.js +5 -0
- package/dist/es/main.js +1 -0
- package/dist/es/models/events/dependency-add-event.interface.js +4 -0
- package/dist/es/models/events/task-delete-event.interface.js +4 -0
- package/dist/es/models/view-item.interface.js +4 -0
- package/dist/es/navigation/navigation-models.js +4 -0
- package/dist/es/navigation/navigation.service.js +390 -0
- package/dist/es/navigation/utils.js +77 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/gantt-milestone-task.component.js +12 -6
- package/dist/es/rendering/gantt-summary-task.component.js +27 -6
- package/dist/es/rendering/gantt-task-base.js +84 -22
- package/dist/es/rendering/gantt-task.component.js +13 -8
- package/dist/es/rendering/gantt-tasks-table-body.component.js +13 -5
- package/dist/es/scrolling/drag-scroll-settings.js +20 -0
- package/dist/es/scrolling/timeline-scroll.directive.js +89 -0
- package/dist/es/scrolling/timeline-scroll.service.js +39 -0
- package/dist/es/scrolling/utils.js +80 -0
- package/dist/es/timeline/gantt-timeline.component.js +50 -4
- package/dist/es/toolbar/toolbar.component.js +12 -13
- package/dist/es/toolbar/view-selector.component.js +1 -1
- package/dist/es/utils.js +153 -12
- package/dist/es2015/common/touch-enabled.d.ts +9 -0
- package/dist/es2015/common/touch-enabled.js +9 -0
- package/dist/es2015/dependencies/utils.d.ts +15 -0
- package/dist/es2015/dependencies/utils.js +34 -0
- package/dist/es2015/dragging/dependency-drag-create.directive.d.ts +72 -0
- package/dist/es2015/dragging/dependency-drag-create.directive.js +324 -0
- package/dist/es2015/dragging/drag-validation-tooltip.component.d.ts +29 -0
- package/dist/es2015/dragging/drag-validation-tooltip.component.js +76 -0
- package/dist/es2015/editing/dependencies-table.component.js +1 -1
- package/dist/es2015/editing/edit-dialog.component.d.ts +1 -1
- package/dist/es2015/editing/edit-dialog.component.js +12 -4
- package/dist/es2015/editing/edit.service.d.ts +2 -3
- package/dist/es2015/editing/edit.service.js +4 -2
- package/dist/es2015/editing/task-fields.component.js +1 -1
- package/dist/es2015/editing/{util.d.ts → utils.d.ts} +2 -2
- package/dist/es2015/editing/{util.js → utils.js} +0 -0
- package/dist/es2015/gantt.component.d.ts +112 -17
- package/dist/es2015/gantt.component.js +292 -30
- package/dist/es2015/gantt.module.js +23 -6
- package/dist/es2015/index.d.ts +5 -0
- package/dist/es2015/index.js +5 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +1 -0
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
- package/dist/es2015/models/events/dependency-add-event.interface.js +4 -0
- package/dist/es2015/models/events/task-click-event.interface.d.ts +3 -3
- package/dist/es2015/models/events/task-delete-event.interface.d.ts +21 -0
- package/dist/es2015/models/events/task-delete-event.interface.js +4 -0
- package/dist/es2015/models/events/task-edit-event.interface.d.ts +27 -10
- package/dist/es2015/models/models.d.ts +4 -0
- package/dist/es2015/models/view-item.interface.d.ts +35 -0
- package/dist/es2015/models/view-item.interface.js +4 -0
- package/dist/es2015/navigation/navigation-models.d.ts +34 -0
- package/dist/es2015/navigation/navigation-models.js +4 -0
- package/dist/es2015/navigation/navigation.service.d.ts +126 -0
- package/dist/es2015/navigation/navigation.service.js +355 -0
- package/dist/es2015/navigation/utils.d.ts +26 -0
- package/dist/es2015/navigation/utils.js +69 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +3 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.js +35 -8
- package/dist/es2015/rendering/gantt-summary-task.component.d.ts +5 -1
- package/dist/es2015/rendering/gantt-summary-task.component.js +47 -8
- package/dist/es2015/rendering/gantt-task-base.d.ts +20 -6
- package/dist/es2015/rendering/gantt-task-base.js +75 -22
- package/dist/es2015/rendering/gantt-task.component.d.ts +4 -2
- package/dist/es2015/rendering/gantt-task.component.js +47 -13
- package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +6 -3
- package/dist/es2015/rendering/gantt-tasks-table-body.component.js +27 -9
- package/dist/es2015/scrolling/drag-scroll-settings.d.ts +47 -0
- package/dist/es2015/scrolling/drag-scroll-settings.js +20 -0
- package/dist/es2015/scrolling/scroll-sync.service.d.ts +1 -1
- package/dist/es2015/scrolling/timeline-scroll.directive.d.ts +24 -0
- package/dist/es2015/scrolling/timeline-scroll.directive.js +78 -0
- package/dist/es2015/scrolling/timeline-scroll.service.d.ts +20 -0
- package/dist/es2015/scrolling/timeline-scroll.service.js +44 -0
- package/dist/es2015/scrolling/utils.d.ts +29 -0
- package/dist/es2015/scrolling/utils.js +80 -0
- package/dist/es2015/timeline/gantt-timeline.component.d.ts +29 -4
- package/dist/es2015/timeline/gantt-timeline.component.js +67 -5
- package/dist/es2015/toolbar/toolbar.component.d.ts +4 -5
- package/dist/es2015/toolbar/toolbar.component.js +12 -13
- package/dist/es2015/toolbar/view-selector.component.js +3 -1
- package/dist/es2015/utils.d.ts +77 -8
- package/dist/es2015/utils.js +153 -12
- package/dist/fesm2015/index.js +3033 -1367
- package/dist/fesm5/index.js +2447 -830
- package/dist/npm/common/touch-enabled.js +11 -0
- package/dist/npm/dependencies/utils.js +34 -0
- package/dist/npm/dragging/dependency-drag-create.directive.js +349 -0
- package/dist/npm/dragging/drag-validation-tooltip.component.js +29 -0
- package/dist/npm/editing/dependencies-table.component.js +1 -1
- package/dist/npm/editing/edit-dialog.component.js +3 -3
- package/dist/npm/editing/edit.service.js +4 -2
- package/dist/npm/editing/task-fields.component.js +1 -1
- package/dist/npm/editing/{util.js → utils.js} +0 -0
- package/dist/npm/gantt.component.js +315 -30
- package/dist/npm/gantt.module.js +22 -5
- package/dist/npm/index.js +10 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/models/events/dependency-add-event.interface.js +6 -0
- package/dist/npm/models/events/task-delete-event.interface.js +6 -0
- package/dist/npm/models/view-item.interface.js +6 -0
- package/dist/npm/navigation/navigation-models.js +6 -0
- package/dist/npm/navigation/navigation.service.js +392 -0
- package/dist/npm/navigation/utils.js +79 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/gantt-milestone-task.component.js +11 -5
- package/dist/npm/rendering/gantt-summary-task.component.js +26 -5
- package/dist/npm/rendering/gantt-task-base.js +84 -22
- package/dist/npm/rendering/gantt-task.component.js +12 -7
- package/dist/npm/rendering/gantt-tasks-table-body.component.js +13 -5
- package/dist/npm/scrolling/drag-scroll-settings.js +22 -0
- package/dist/npm/scrolling/timeline-scroll.directive.js +91 -0
- package/dist/npm/scrolling/timeline-scroll.service.js +41 -0
- package/dist/npm/scrolling/utils.js +83 -0
- package/dist/npm/timeline/gantt-timeline.component.js +49 -3
- package/dist/npm/toolbar/toolbar.component.js +10 -11
- package/dist/npm/toolbar/view-selector.component.js +1 -1
- package/dist/npm/utils.js +153 -12
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +23 -21
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { InjectionToken } from '@angular/core';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export var TOUCH_ENABLED = new InjectionToken('gantt-touch-enabled');
|
|
@@ -13,6 +13,9 @@ export var getOffsetRelativeToParent = function (element, targetParent) {
|
|
|
13
13
|
top: 0,
|
|
14
14
|
left: 0
|
|
15
15
|
};
|
|
16
|
+
if (!targetParent.contains(element)) {
|
|
17
|
+
return offset;
|
|
18
|
+
}
|
|
16
19
|
var offsetParent = element;
|
|
17
20
|
while (offsetParent && offsetParent !== targetParent) {
|
|
18
21
|
offset.top += offsetParent.offsetTop;
|
|
@@ -162,4 +165,35 @@ var getArrowEast = function (top, left, arrowSize) {
|
|
|
162
165
|
return points;
|
|
163
166
|
};
|
|
164
167
|
var ɵ2 = getArrowEast;
|
|
168
|
+
/**
|
|
169
|
+
* @hidden
|
|
170
|
+
*
|
|
171
|
+
* Translates the provided client `left` and `top` coords to coords relative to the provided container.
|
|
172
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
173
|
+
*/
|
|
174
|
+
export var clientToOffsetCoords = function (clientLeft, clientTop, offsetContainer) {
|
|
175
|
+
// client (viewport) coordinates of the target container
|
|
176
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
177
|
+
var offsetContainerClientRect = offsetContainer.getBoundingClientRect();
|
|
178
|
+
return {
|
|
179
|
+
left: clientLeft - offsetContainerClientRect.left + offsetContainer.scrollLeft,
|
|
180
|
+
top: clientTop - offsetContainerClientRect.top + offsetContainer.scrollTop
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* @hidden
|
|
185
|
+
*
|
|
186
|
+
* Retrieves the `left` and `top` values of the center of the provided element.
|
|
187
|
+
* The retrieved values are relative to the current viewport (client values).
|
|
188
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
189
|
+
*/
|
|
190
|
+
export var getElementClientCenterCoords = function (element) {
|
|
191
|
+
// client (viewport) coordinates of the targeted element
|
|
192
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
193
|
+
var _a = element.getBoundingClientRect(), left = _a.left, top = _a.top, width = _a.width, height = _a.height;
|
|
194
|
+
return {
|
|
195
|
+
left: left + (width / 2),
|
|
196
|
+
top: top + (height / 2)
|
|
197
|
+
};
|
|
198
|
+
};
|
|
165
199
|
export { ɵ0, ɵ1, ɵ2 };
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Directive, Input, NgZone, Renderer2 } from '@angular/core';
|
|
7
|
+
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
8
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
|
9
|
+
import { GanttComponent } from '../gantt.component';
|
|
10
|
+
import { MappingService } from '../common/mapping.service';
|
|
11
|
+
import { TimelineScrollService } from '../scrolling/timeline-scroll.service';
|
|
12
|
+
import { DragValidationTooltipComponent } from './drag-validation-tooltip.component';
|
|
13
|
+
import { clientToOffsetCoords, getElementClientCenterCoords } from '../dependencies/utils';
|
|
14
|
+
import { isPresent, isDependencyDragClue, getClosestTaskWrapper, getDependencyTypeFromTargetTasks, getClosestTaskIndex, sameTaskClues, isTaskWrapper, fitToRange } from '../utils';
|
|
15
|
+
import { elementFromPoint } from '../utils';
|
|
16
|
+
/**
|
|
17
|
+
* When added to the .k-task-dot, the element will be kept with hover styles.
|
|
18
|
+
* Used for the drag clue from which the dragging has started.
|
|
19
|
+
*/
|
|
20
|
+
var DRAG_CLUE_HOVER_CLASS = 'k-state-hover';
|
|
21
|
+
/**
|
|
22
|
+
* Add the selection disabling class to the enitre container.
|
|
23
|
+
* Otherwise existing selection on a given task text prevents dragging the clue even if the clue has `user-select: none` styles.
|
|
24
|
+
*/
|
|
25
|
+
var USER_SELECT_NONE_CLASS = 'k-user-select-none';
|
|
26
|
+
/**
|
|
27
|
+
* When added to the .k-task-wrap, the containing .k-task-dot elements will be kept visible even when not hovered.
|
|
28
|
+
* Used for the drag clue from which the dragging has started.
|
|
29
|
+
*/
|
|
30
|
+
var TASK_WRAPPER_DRAG_CLASS = 'k-origin';
|
|
31
|
+
/**
|
|
32
|
+
* Use 20px margin between the pointer and the popup.
|
|
33
|
+
* Could be made user-configurable if there's demand.
|
|
34
|
+
*/
|
|
35
|
+
var DEFAULT_POPUP_VERTICAL_MARGIN = 20;
|
|
36
|
+
/**
|
|
37
|
+
* A directive which enables the creation of new dependencies via dragging.
|
|
38
|
+
*/
|
|
39
|
+
var DependencyDragCreateDirective = /** @class */ (function () {
|
|
40
|
+
function DependencyDragCreateDirective(gantt, zone, renderer, mapper, popupService, timelineScrollService) {
|
|
41
|
+
this.gantt = gantt;
|
|
42
|
+
this.zone = zone;
|
|
43
|
+
this.renderer = renderer;
|
|
44
|
+
this.mapper = mapper;
|
|
45
|
+
this.popupService = popupService;
|
|
46
|
+
this.timelineScrollService = timelineScrollService;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies whether the validation tooltip will be displayed during drag operations.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
this.displayValidationTooltip = true;
|
|
53
|
+
this.gantt.renderDependencyDragClues = true;
|
|
54
|
+
}
|
|
55
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "container", {
|
|
56
|
+
get: function () {
|
|
57
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.timelineContent)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return this.gantt.timeline.timelineContent.nativeElement;
|
|
61
|
+
},
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "polyline", {
|
|
66
|
+
get: function () {
|
|
67
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dependencyDragCreatePolyline)) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return this.gantt.timeline.dependencyDragCreatePolyline.nativeElement;
|
|
71
|
+
},
|
|
72
|
+
enumerable: true,
|
|
73
|
+
configurable: true
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "popupContainer", {
|
|
76
|
+
get: function () {
|
|
77
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dragPopupContainer)) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return this.gantt.timeline.dragPopupContainer;
|
|
81
|
+
},
|
|
82
|
+
enumerable: true,
|
|
83
|
+
configurable: true
|
|
84
|
+
});
|
|
85
|
+
DependencyDragCreateDirective.prototype.ngAfterViewInit = function () {
|
|
86
|
+
this.subscribeDraggable();
|
|
87
|
+
this.addScrollListener();
|
|
88
|
+
};
|
|
89
|
+
DependencyDragCreateDirective.prototype.ngOnDestroy = function () {
|
|
90
|
+
this.unsubscribeDraggable();
|
|
91
|
+
this.removeScrollListener();
|
|
92
|
+
this.fromTaskClue = null;
|
|
93
|
+
this.cancelScroll();
|
|
94
|
+
this.closeDragPopup();
|
|
95
|
+
};
|
|
96
|
+
DependencyDragCreateDirective.prototype.subscribeDraggable = function () {
|
|
97
|
+
this.dragSubscriptions = this.gantt.timeline.timelineContainerPress
|
|
98
|
+
.subscribe(this.handlePress.bind(this));
|
|
99
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerDrag
|
|
100
|
+
.subscribe(this.handleDrag.bind(this)));
|
|
101
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerRelease
|
|
102
|
+
.subscribe(this.handleRelease.bind(this)));
|
|
103
|
+
};
|
|
104
|
+
DependencyDragCreateDirective.prototype.unsubscribeDraggable = function () {
|
|
105
|
+
if (isPresent(this.dragSubscriptions)) {
|
|
106
|
+
this.dragSubscriptions.unsubscribe();
|
|
107
|
+
this.dragSubscriptions = null;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
DependencyDragCreateDirective.prototype.handlePress = function (_a) {
|
|
111
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
112
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
113
|
+
var target = elementFromPoint(clientX, clientY);
|
|
114
|
+
if (isDependencyDragClue(target)) {
|
|
115
|
+
this.fromTaskClue = target;
|
|
116
|
+
this.assignDragStartClasses(this.fromTaskClue);
|
|
117
|
+
// use the center of the target clue as polyline starting point
|
|
118
|
+
var dragClueCenterCoords = getElementClientCenterCoords(this.fromTaskClue);
|
|
119
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
120
|
+
this.polylineStartCoords = clientToOffsetCoords(dragClueCenterCoords.left, dragClueCenterCoords.top, this.container);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
DependencyDragCreateDirective.prototype.handleDrag = function (_a) {
|
|
124
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
125
|
+
if (isPresent(this.fromTaskClue)) {
|
|
126
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
127
|
+
var pointerOffsetCoords = clientToOffsetCoords(clientX, clientY, this.container);
|
|
128
|
+
// the start coords are calculated just once per drag session in handlePress
|
|
129
|
+
// use the current drag coords as polyline end coords
|
|
130
|
+
this.updatePolyline(this.polylineStartCoords, pointerOffsetCoords);
|
|
131
|
+
this.currentPointerClientCoords = { left: clientX, top: clientY };
|
|
132
|
+
if (this.gantt.dragScrollSettings.enabled) {
|
|
133
|
+
// use client coordinates for scroll trigger
|
|
134
|
+
this.scrollPointIntoView(this.currentPointerClientCoords);
|
|
135
|
+
}
|
|
136
|
+
if (this.displayValidationTooltip) {
|
|
137
|
+
this.updateDragPopup(pointerOffsetCoords);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
DependencyDragCreateDirective.prototype.handleRelease = function (_a) {
|
|
142
|
+
var _this = this;
|
|
143
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
144
|
+
if (!isPresent(this.fromTaskClue)) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
148
|
+
var target = elementFromPoint(clientX, clientY);
|
|
149
|
+
if (isDependencyDragClue(target) && !sameTaskClues(this.fromTaskClue, target, this.container)) {
|
|
150
|
+
this.zone.run(function () {
|
|
151
|
+
var _a;
|
|
152
|
+
var fromTaskClue = _this.fromTaskClue;
|
|
153
|
+
var toTaskClue = target;
|
|
154
|
+
var fromTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(fromTaskClue, _this.container)];
|
|
155
|
+
var toTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(toTaskClue, _this.container)];
|
|
156
|
+
var dependencyType = getDependencyTypeFromTargetTasks(fromTaskClue, toTaskClue);
|
|
157
|
+
var _b = _this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
158
|
+
_this.gantt.dependencyAdd.emit({
|
|
159
|
+
fromTask: fromTask,
|
|
160
|
+
toTask: toTask,
|
|
161
|
+
type: dependencyType,
|
|
162
|
+
isValid: _this.gantt.validateNewDependency((_a = {},
|
|
163
|
+
_a[fromId] = _this.mapper.extractFromTask(fromTask, 'id'),
|
|
164
|
+
_a[toId] = _this.mapper.extractFromTask(toTask, 'id'),
|
|
165
|
+
_a[type] = dependencyType,
|
|
166
|
+
_a))
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
this.clearPolyline();
|
|
171
|
+
this.removeDragStartClasses(this.fromTaskClue);
|
|
172
|
+
this.fromTaskClue = null;
|
|
173
|
+
this.cancelScroll();
|
|
174
|
+
this.closeDragPopup();
|
|
175
|
+
};
|
|
176
|
+
DependencyDragCreateDirective.prototype.updatePolyline = function (start, end) {
|
|
177
|
+
var points = start.left + "," + start.top + " " + end.left + "," + end.top;
|
|
178
|
+
this.renderer.setAttribute(this.polyline, 'points', points);
|
|
179
|
+
};
|
|
180
|
+
DependencyDragCreateDirective.prototype.clearPolyline = function () {
|
|
181
|
+
this.renderer.removeAttribute(this.polyline, 'points');
|
|
182
|
+
};
|
|
183
|
+
DependencyDragCreateDirective.prototype.assignDragStartClasses = function (dragClue) {
|
|
184
|
+
if (!isPresent(dragClue)) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
this.renderer.addClass(this.container, USER_SELECT_NONE_CLASS);
|
|
188
|
+
this.renderer.addClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
189
|
+
var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
|
|
190
|
+
if (isPresent(taskWrapper)) {
|
|
191
|
+
this.renderer.addClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
DependencyDragCreateDirective.prototype.removeDragStartClasses = function (dragClue) {
|
|
195
|
+
if (!isPresent(dragClue)) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
this.renderer.removeClass(this.container, USER_SELECT_NONE_CLASS);
|
|
199
|
+
this.renderer.removeClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
200
|
+
var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
|
|
201
|
+
if (isPresent(taskWrapper)) {
|
|
202
|
+
this.renderer.removeClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
DependencyDragCreateDirective.prototype.scrollPointIntoView = function (_a) {
|
|
206
|
+
var left = _a.left, top = _a.top;
|
|
207
|
+
this.timelineScrollService.requestScrollCancel();
|
|
208
|
+
this.timelineScrollService.requestHorizontalScroll(left);
|
|
209
|
+
this.timelineScrollService.requestVerticalScroll(top);
|
|
210
|
+
};
|
|
211
|
+
DependencyDragCreateDirective.prototype.cancelScroll = function () {
|
|
212
|
+
this.timelineScrollService.requestScrollCancel();
|
|
213
|
+
};
|
|
214
|
+
DependencyDragCreateDirective.prototype.addScrollListener = function () {
|
|
215
|
+
var _this = this;
|
|
216
|
+
if (!isDocumentAvailable()) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.zone.runOutsideAngular(function () {
|
|
220
|
+
return _this.scrollListenerDisposer = _this.renderer.listen(_this.container, 'scroll', function () {
|
|
221
|
+
// update the polyline only if we're currently dragging
|
|
222
|
+
if (isPresent(_this.fromTaskClue) && isPresent(_this.currentPointerClientCoords)) {
|
|
223
|
+
var _a = _this.currentPointerClientCoords, left = _a.left, top_1 = _a.top;
|
|
224
|
+
var pointerOffsetCoords = clientToOffsetCoords(left, top_1, _this.container);
|
|
225
|
+
_this.updatePolyline(_this.polylineStartCoords, pointerOffsetCoords);
|
|
226
|
+
if (_this.displayValidationTooltip) {
|
|
227
|
+
_this.updateDragPopup(pointerOffsetCoords);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
DependencyDragCreateDirective.prototype.removeScrollListener = function () {
|
|
234
|
+
if (isPresent(this.scrollListenerDisposer)) {
|
|
235
|
+
this.scrollListenerDisposer();
|
|
236
|
+
this.scrollListenerDisposer = null;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
DependencyDragCreateDirective.prototype.openDragPopup = function () {
|
|
240
|
+
if (isPresent(this.dragPopup)) {
|
|
241
|
+
this.closeDragPopup();
|
|
242
|
+
}
|
|
243
|
+
this.dragPopup = this.popupService.open({
|
|
244
|
+
animate: false,
|
|
245
|
+
content: DragValidationTooltipComponent,
|
|
246
|
+
appendTo: this.popupContainer,
|
|
247
|
+
positionMode: 'absolute',
|
|
248
|
+
popupClass: 'k-popup-transparent'
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
DependencyDragCreateDirective.prototype.updateDragPopup = function (pointerOffsetPosition) {
|
|
252
|
+
if (!isPresent(this.dragPopup)) {
|
|
253
|
+
this.openDragPopup();
|
|
254
|
+
}
|
|
255
|
+
var tooltip = this.dragPopup.content.instance;
|
|
256
|
+
var _a = this.getTooltipContext(), fromTaskName = _a.fromTaskName, toTaskName = _a.toTaskName, isValid = _a.isValid, showValidityStatus = _a.showValidityStatus;
|
|
257
|
+
if (tooltip.fromTaskName !== fromTaskName ||
|
|
258
|
+
tooltip.toTaskName !== toTaskName ||
|
|
259
|
+
tooltip.isValid !== isValid ||
|
|
260
|
+
tooltip.showValidityStatus !== showValidityStatus) {
|
|
261
|
+
tooltip.fromTaskName = fromTaskName;
|
|
262
|
+
tooltip.toTaskName = toTaskName;
|
|
263
|
+
tooltip.isValid = isValid;
|
|
264
|
+
tooltip.showValidityStatus = showValidityStatus;
|
|
265
|
+
this.dragPopup.content.changeDetectorRef.detectChanges();
|
|
266
|
+
}
|
|
267
|
+
this.dragPopup.popup.instance.offset = this.normalizePopupPosition(pointerOffsetPosition);
|
|
268
|
+
this.dragPopup.popup.changeDetectorRef.detectChanges();
|
|
269
|
+
};
|
|
270
|
+
DependencyDragCreateDirective.prototype.closeDragPopup = function () {
|
|
271
|
+
if (isPresent(this.dragPopup)) {
|
|
272
|
+
this.dragPopup.close();
|
|
273
|
+
this.dragPopup = null;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
DependencyDragCreateDirective.prototype.extractTaskName = function (target) {
|
|
277
|
+
if (!isTaskWrapper(target, this.container)) {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
var taskIndex = getClosestTaskIndex(target, this.container);
|
|
281
|
+
var task = this.gantt.renderedTreeListItems[taskIndex];
|
|
282
|
+
var taskName = this.mapper.extractFromTask(task, 'title');
|
|
283
|
+
return taskName;
|
|
284
|
+
};
|
|
285
|
+
DependencyDragCreateDirective.prototype.getTooltipContext = function () {
|
|
286
|
+
var _a;
|
|
287
|
+
var fromTaskName = this.extractTaskName(this.fromTaskClue);
|
|
288
|
+
var currentPointerTarget = elementFromPoint(this.currentPointerClientCoords.left, this.currentPointerClientCoords.top);
|
|
289
|
+
var toTaskName = isTaskWrapper(currentPointerTarget, this.container) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container) ?
|
|
290
|
+
this.extractTaskName(currentPointerTarget) :
|
|
291
|
+
'';
|
|
292
|
+
var showValidityStatus = isDependencyDragClue(currentPointerTarget) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container);
|
|
293
|
+
var _b = this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
294
|
+
return {
|
|
295
|
+
fromTaskName: fromTaskName,
|
|
296
|
+
toTaskName: toTaskName,
|
|
297
|
+
showValidityStatus: showValidityStatus,
|
|
298
|
+
isValid: showValidityStatus && this.gantt.validateNewDependency((_a = {},
|
|
299
|
+
_a[fromId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(this.fromTaskClue, this.container)], 'id'),
|
|
300
|
+
_a[toId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(currentPointerTarget, this.container)], 'id'),
|
|
301
|
+
_a[type] = getDependencyTypeFromTargetTasks(this.fromTaskClue, currentPointerTarget),
|
|
302
|
+
_a))
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Restricts the popup position to not go below the scroll height or width of the container.
|
|
307
|
+
* Flips the position of the popup when there's not enough vertical space in the visible part of the container to render the popup.
|
|
308
|
+
*/
|
|
309
|
+
DependencyDragCreateDirective.prototype.normalizePopupPosition = function (pointerOffsetPosition) {
|
|
310
|
+
var top = pointerOffsetPosition.top + DEFAULT_POPUP_VERTICAL_MARGIN;
|
|
311
|
+
var containerClientBottom = this.container.clientHeight + this.container.scrollTop;
|
|
312
|
+
var popupHeight = this.dragPopup.popupElement.querySelector('.k-tooltip').clientHeight;
|
|
313
|
+
var enoughSpaceToRender = top < containerClientBottom - popupHeight;
|
|
314
|
+
// flip the popup above the pointer if there's not enough space in the bottom of the container
|
|
315
|
+
if (!enoughSpaceToRender) {
|
|
316
|
+
// margin * 2 to account for the already applied margin
|
|
317
|
+
top -= popupHeight + (DEFAULT_POPUP_VERTICAL_MARGIN * 2);
|
|
318
|
+
}
|
|
319
|
+
// center the popup horizontally according to the pointer position
|
|
320
|
+
var popupWidth = this.dragPopup.popupElement.querySelector('.k-tooltip').clientWidth;
|
|
321
|
+
var left = pointerOffsetPosition.left - popupWidth / 2;
|
|
322
|
+
// don't allow the popup to be cut out of the viewport
|
|
323
|
+
var minLeftTop = 0;
|
|
324
|
+
// restrict the popup from being positioned beyond or before the available scrollable space
|
|
325
|
+
return {
|
|
326
|
+
left: fitToRange(left, minLeftTop, this.container.scrollWidth - popupWidth),
|
|
327
|
+
top: fitToRange(top, minLeftTop, this.container.scrollHeight - popupHeight)
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
tslib_1.__decorate([
|
|
331
|
+
Input(),
|
|
332
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
333
|
+
], DependencyDragCreateDirective.prototype, "displayValidationTooltip", void 0);
|
|
334
|
+
DependencyDragCreateDirective = tslib_1.__decorate([
|
|
335
|
+
Directive({
|
|
336
|
+
selector: '[kendoGanttDependencyDragCreate]'
|
|
337
|
+
}),
|
|
338
|
+
tslib_1.__metadata("design:paramtypes", [GanttComponent,
|
|
339
|
+
NgZone,
|
|
340
|
+
Renderer2,
|
|
341
|
+
MappingService,
|
|
342
|
+
PopupService,
|
|
343
|
+
TimelineScrollService])
|
|
344
|
+
], DependencyDragCreateDirective);
|
|
345
|
+
return DependencyDragCreateDirective;
|
|
346
|
+
}());
|
|
347
|
+
export { DependencyDragCreateDirective };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Component } from '@angular/core';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
var DragValidationTooltipComponent = /** @class */ (function () {
|
|
11
|
+
function DragValidationTooltipComponent() {
|
|
12
|
+
/**
|
|
13
|
+
* Sets the status class of the attempted operation.
|
|
14
|
+
* Note that the status will be ignored and the `neutral` status class will be rendered,
|
|
15
|
+
* if the any of the fromTaskName or toTaskName are not populated.
|
|
16
|
+
*/
|
|
17
|
+
this.isValid = false;
|
|
18
|
+
}
|
|
19
|
+
DragValidationTooltipComponent = tslib_1.__decorate([
|
|
20
|
+
Component({
|
|
21
|
+
template: "\n <div\n class=\"k-tooltip k-gantt-tooltip-validation\"\n [class.k-gantt-tooltip-valid]=\"showValidityStatus && isValid\"\n [class.k-gantt-tooltip-invalid]=\"showValidityStatus && !isValid\"\n >\n <div class=\"k-gantt-tooltip-validation-row\">\n <span class=\"k-gantt-tooltip-validation-label\">From:</span>\n <span class=\"k-gantt-tooltip-validation-value\">{{ fromTaskName }}</span>\n </div>\n <div class=\"k-gantt-tooltip-validation-row\">\n <span class=\"k-gantt-tooltip-validation-label\">To:</span>\n <span class=\"k-gantt-tooltip-validation-value\">{{ toTaskName }}</span>\n </div>\n </div>\n ",
|
|
22
|
+
styles: ["\n .k-gantt-tooltip-validation {\n max-width: 200px;\n display: block;\n }\n .k-gantt-tooltip-validation::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 4px;\n height: 100%;\n background: #656565;\n }\n .k-gantt-tooltip-validation.k-gantt-tooltip-valid::before {\n background: #37B400;\n }\n .k-gantt-tooltip-validation.k-gantt-tooltip-invalid::before {\n background: #F31700;\n }\n .k-gantt-tooltip-validation-row {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .k-gantt-tooltip-validation-label {\n display: inline-flex;\n width: 50px;\n }\n .k-gantt-tooltip-validation-value {\n font-weight: bold;\n }\n "]
|
|
23
|
+
})
|
|
24
|
+
], DragValidationTooltipComponent);
|
|
25
|
+
return DragValidationTooltipComponent;
|
|
26
|
+
}());
|
|
27
|
+
export { DragValidationTooltipComponent };
|
|
@@ -120,7 +120,7 @@ var DependenciesTableComponent = /** @class */ (function () {
|
|
|
120
120
|
DependenciesTableComponent = tslib_1.__decorate([
|
|
121
121
|
Component({
|
|
122
122
|
selector: 'kendo-gantt-dependencies-table',
|
|
123
|
-
template: "\n <kendo-grid\n [data]=\"dependencies\"\n [selectable]=\"{ mode: 'single' }\"\n [(selectedKeys)]=\"selectedKeys\"\n kendoGridSelectBy\n [height]=\"
|
|
123
|
+
template: "\n <kendo-grid\n [data]=\"dependencies\"\n [selectable]=\"{ mode: 'single' }\"\n [(selectedKeys)]=\"selectedKeys\"\n kendoGridSelectBy\n [height]=\"275\"\n >\n <ng-template kendoGridToolbarTemplate>\n <button kendoButton (click)=\"addHandler()\">\n {{ getText('taskEditingDependenciesAddButtonText') }}\n </button>\n <button kendoButton (click)=\"removeHandler()\" [disabled]=\"selectedKeys.length === 0\">\n {{ getText('taskEditingDependenciesRemoveButtonText') }}\n </button>\n </ng-template>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridNameColumnTitle')\" [field]=\"dependencyIdField\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"tasks\"\n textField=\"title\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n <kendo-grid-column [title]=\"getText('taskEditingDependenciesGridTypeColumnTitle')\" field=\"type\">\n <ng-template kendoGridCellTemplate let-dataItem=\"dataItem\" let-column=\"column\" let-rowIndex=\"rowIndex\">\n <kendo-dropdownlist\n [data]=\"dependencyTypes\"\n textField=\"type\"\n valueField=\"id\"\n [valuePrimitive]=\"true\"\n [formControl]=\"getFormControl(rowIndex, column.field)\"\n >\n </kendo-dropdownlist>\n </ng-template>\n </kendo-grid-column>\n </kendo-grid>\n "
|
|
124
124
|
}),
|
|
125
125
|
tslib_1.__metadata("design:paramtypes", [MappingService,
|
|
126
126
|
EditService,
|
|
@@ -53,8 +53,8 @@ var EditDialogComponent = /** @class */ (function () {
|
|
|
53
53
|
EditDialogComponent.prototype.handleEditingResult = function (editResultType) {
|
|
54
54
|
this.editService.triggerEditEvent(editResultType);
|
|
55
55
|
};
|
|
56
|
-
EditDialogComponent.prototype.
|
|
57
|
-
this.editService.
|
|
56
|
+
EditDialogComponent.prototype.handleTaskDelete = function () {
|
|
57
|
+
this.editService.taskDelete.next(this.editService.dataItem);
|
|
58
58
|
};
|
|
59
59
|
tslib_1.__decorate([
|
|
60
60
|
Input(),
|
|
@@ -63,7 +63,7 @@ var EditDialogComponent = /** @class */ (function () {
|
|
|
63
63
|
EditDialogComponent = tslib_1.__decorate([
|
|
64
64
|
Component({
|
|
65
65
|
selector: 'kendo-gantt-edit-dialog',
|
|
66
|
-
template: "\n <kendo-dialog\n [title]=\"getText('taskEditingDialogTitle')\"\n [width]=\"575\"\n [height]=\"470\"\n (close)=\"handleEditingResult('cancel')\">\n <kendo-dialog-messages\n [closeTitle]=\"getText('taskEditingDialogCloseTitle')\"></kendo-dialog-messages>\n\n <kendo-tabstrip [keepTabContent]=\"true\">\n <kendo-tabstrip-tab [title]=\"getText('taskEditingGeneralTabTitle')\" [selected]=\"true\">\n <ng-template kendoTabContent>\n <kendo-gantt-task-fields></kendo-gantt-task-fields>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingPredecessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"predecessors\"\n dependencyType=\"predecessor\"\n >\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingSuccessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"successors\"\n dependencyType=\"successor\">\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n </kendo-tabstrip>\n\n <kendo-dialog-actions layout=\"normal\">\n <button
|
|
66
|
+
template: "\n <kendo-dialog\n [title]=\"getText('taskEditingDialogTitle')\"\n [width]=\"575\"\n [height]=\"470\"\n (close)=\"handleEditingResult('cancel')\">\n <kendo-dialog-messages\n [closeTitle]=\"getText('taskEditingDialogCloseTitle')\"></kendo-dialog-messages>\n\n <kendo-tabstrip [keepTabContent]=\"true\" style=\"height: 345px;\">\n <kendo-tabstrip-tab [title]=\"getText('taskEditingGeneralTabTitle')\" [selected]=\"true\">\n <ng-template kendoTabContent>\n <kendo-gantt-task-fields></kendo-gantt-task-fields>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingPredecessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"predecessors\"\n dependencyType=\"predecessor\"\n >\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n <kendo-tabstrip-tab [title]=\"getText('taskEditingSuccessorsTabTitle')\">\n <ng-template kendoTabContent>\n <kendo-gantt-dependencies-table\n [tasks]=\"loadedTasks\"\n [(dependencies)]=\"successors\"\n dependencyType=\"successor\">\n </kendo-gantt-dependencies-table>\n </ng-template>\n </kendo-tabstrip-tab>\n </kendo-tabstrip>\n\n <kendo-dialog-actions layout=\"normal\">\n <button\n kendoButton\n [kendoEventsOutsideAngular]=\"{\n click: handleTaskDelete\n }\"\n [scope]=\"this\"\n >\n {{ getText('deleteButtonText') }}\n </button>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleEditingResult('save')\">{{ getText('saveButtonText') }}</button>\n <button kendoButton (click)=\"handleEditingResult('cancel')\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
|
|
67
67
|
}),
|
|
68
68
|
tslib_1.__metadata("design:paramtypes", [MappingService,
|
|
69
69
|
EditService,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import { Injectable } from '@angular/core';
|
|
7
7
|
import { EMPTY, forkJoin, isObservable, of, Subject } from 'rxjs';
|
|
8
|
-
import { MappingService } from '../common/mapping.service';
|
|
9
8
|
import { map, expand, reduce } from 'rxjs/operators';
|
|
9
|
+
import { MappingService } from '../common/mapping.service';
|
|
10
10
|
import { isPresent, normalizeGanttData } from '../utils';
|
|
11
11
|
/**
|
|
12
12
|
* @hidden
|
|
@@ -16,9 +16,11 @@ var EditService = /** @class */ (function () {
|
|
|
16
16
|
var _this = this;
|
|
17
17
|
this.mapper = mapper;
|
|
18
18
|
this.showEditingDialog = new Subject();
|
|
19
|
-
this.
|
|
19
|
+
this.taskDelete = new Subject();
|
|
20
20
|
this.editEvent = new Subject();
|
|
21
21
|
this.addEvent = new Subject();
|
|
22
|
+
this.predecessors = [];
|
|
23
|
+
this.successors = [];
|
|
22
24
|
this.updatedItems = [];
|
|
23
25
|
this.deletedItems = [];
|
|
24
26
|
this.itemIndex = function (item, data) {
|
|
@@ -32,7 +32,7 @@ var TaskFieldsComponent = /** @class */ (function () {
|
|
|
32
32
|
TaskFieldsComponent = tslib_1.__decorate([
|
|
33
33
|
Component({
|
|
34
34
|
selector: 'kendo-gantt-task-fields',
|
|
35
|
-
template: "\n <form class=\"k-form\" [formGroup]=\"formGroup\">\n <kendo-formfield *ngIf=\"formGroup.contains(mapper.taskFields.title)\">\n <kendo-label [for]=\"mapper.taskFields.title\" [text]=\"getText('titleFieldInputLabel')\"></kendo-label>\n <input
|
|
35
|
+
template: "\n <form class=\"k-form\" [formGroup]=\"formGroup\">\n <kendo-formfield *ngIf=\"formGroup.contains(mapper.taskFields.title)\">\n <kendo-label [for]=\"mapper.taskFields.title\" [text]=\"getText('titleFieldInputLabel')\"></kendo-label>\n <input kendoTextBox [formControlName]=\"mapper.taskFields.title\" />\n </kendo-formfield>\n <div class=\"k-hstack\">\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.start)\">\n <kendo-label [for]=\"mapper.taskFields.start\" [text]=\"getText('startFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.start\"></kendo-datetimepicker>\n </kendo-formfield>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.end)\">\n <kendo-label [for]=\"mapper.taskFields.end\" [text]=\"getText('endFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.end\"></kendo-datetimepicker>\n </kendo-formfield>\n </div>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.completionRatio)\">\n <kendo-label [for]=\"mapper.taskFields.completionRatio\" [text]=\"getText('completionRatioFieldInputLabel')\"></kendo-label>\n <kendo-numerictextbox\n [formControlName]=\"mapper.taskFields.completionRatio\"\n [min]=\"0\"\n [max]=\"1\"\n [decimals]=\"2\"\n format=\"p2\"\n [step]=\"0.01\"\n ></kendo-numerictextbox>\n </kendo-formfield>\n </form>\n "
|
|
36
36
|
}),
|
|
37
37
|
tslib_1.__metadata("design:paramtypes", [MappingService,
|
|
38
38
|
EditService,
|
|
File without changes
|