@progress/kendo-angular-gantt 0.2.1-dev.202112101349 → 0.3.0-dev.202201190830
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-gantt.js +2 -2
- package/dist/cdn/main.js +4 -4
- package/dist/es/common/touch-enabled.js +9 -0
- package/dist/es/dependencies/utils.js +40 -5
- 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/add-task.component.js +94 -0
- package/dist/es/editing/dependencies-table.component.js +131 -0
- package/dist/es/editing/edit-dialog.component.js +39 -8
- package/dist/es/editing/edit.service.js +92 -8
- package/dist/es/editing/task-fields.component.js +43 -0
- package/dist/es/editing/{util.js → utils.js} +0 -0
- package/dist/es/gantt.component.js +408 -56
- package/dist/es/gantt.module.js +37 -9
- package/dist/es/index.js +9 -0
- package/dist/es/localization/gantt-localization.service.js +26 -0
- package/dist/es/localization/messages.js +45 -1
- package/dist/es/main.js +1 -0
- package/dist/es/models/dependency-type.enum.js +16 -0
- package/dist/es/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
- package/dist/es/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/es/models/events/{remove-event.interface.js → task-delete-event.interface.js} +0 -0
- package/dist/es/models/models.js +1 -0
- package/dist/es/models/{toolbar-position.js → toolbar-settings.js} +0 -0
- package/dist/{es2015/models/events/add-event.interface.js → es/models/view-item.interface.js} +0 -0
- package/dist/{es2015/models/events/edit-event.interface.js → es/navigation/navigation-models.js} +0 -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 +20 -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 +40 -5
- 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/add-task.component.d.ts +45 -0
- package/dist/es2015/editing/add-task.component.js +102 -0
- package/dist/es2015/editing/dependencies-table.component.d.ts +39 -0
- package/dist/es2015/editing/dependencies-table.component.js +160 -0
- package/dist/es2015/editing/edit-dialog.component.d.ts +11 -4
- package/dist/es2015/editing/edit-dialog.component.js +66 -36
- package/dist/es2015/editing/edit.service.d.ts +24 -4
- package/dist/es2015/editing/edit.service.js +81 -11
- package/dist/es2015/editing/task-fields.component.d.ts +22 -0
- package/dist/es2015/editing/task-fields.component.js +67 -0
- 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 +134 -31
- package/dist/es2015/gantt.component.js +419 -61
- package/dist/es2015/gantt.module.js +37 -9
- package/dist/es2015/index.d.ts +9 -0
- package/dist/es2015/index.js +9 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/{models/events/edit-event.interface.d.ts → localization/gantt-localization.service.d.ts} +6 -10
- package/dist/es2015/localization/gantt-localization.service.js +25 -0
- package/dist/es2015/localization/messages.d.ts +46 -2
- package/dist/es2015/localization/messages.js +45 -1
- package/dist/es2015/main.d.ts +1 -0
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/models/dependency-type.enum.d.ts +1 -1
- package/dist/es2015/models/dependency-type.enum.js +16 -0
- package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
- package/dist/es2015/models/events/{remove-event.interface.js → dependency-add-event.interface.js} +0 -0
- package/dist/es2015/models/events/task-add-event.interface.d.ts +31 -0
- package/dist/es2015/models/{toolbar-position.js → events/task-add-event.interface.js} +0 -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 +36 -6
- package/dist/es2015/models/models.d.ts +6 -3
- package/dist/es2015/models/models.js +1 -0
- package/dist/es2015/models/toolbar-settings.d.ts +29 -0
- package/dist/es2015/models/toolbar-settings.js +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-template.directive.d.ts +1 -1
- package/dist/es2015/toolbar/toolbar.component.d.ts +6 -5
- package/dist/es2015/toolbar/toolbar.component.js +22 -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 +5258 -3012
- package/dist/fesm5/index.js +2862 -733
- package/dist/npm/common/touch-enabled.js +11 -0
- package/dist/npm/dependencies/utils.js +40 -5
- 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/add-task.component.js +96 -0
- package/dist/npm/editing/dependencies-table.component.js +133 -0
- package/dist/npm/editing/edit-dialog.component.js +38 -7
- package/dist/npm/editing/edit.service.js +91 -7
- package/dist/npm/editing/task-fields.component.js +45 -0
- package/dist/npm/editing/{util.js → utils.js} +0 -0
- package/dist/npm/gantt.component.js +409 -57
- package/dist/npm/gantt.module.js +35 -7
- package/dist/npm/index.js +18 -0
- package/dist/npm/localization/gantt-localization.service.js +28 -0
- package/dist/npm/localization/messages.js +45 -1
- package/dist/npm/main.js +2 -0
- package/dist/npm/models/dependency-type.enum.js +16 -0
- package/dist/npm/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
- package/dist/npm/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/npm/models/events/{remove-event.interface.js → task-delete-event.interface.js} +0 -0
- package/dist/npm/models/models.js +2 -0
- package/dist/npm/models/{toolbar-position.js → toolbar-settings.js} +0 -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 +18 -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 +7 -4
- package/dist/es2015/models/events/add-event.interface.d.ts +0 -16
- package/dist/es2015/models/events/remove-event.interface.d.ts +0 -16
- package/dist/es2015/models/toolbar-position.d.ts +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var core_1 = require("@angular/core");
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
exports.TOUCH_ENABLED = new core_1.InjectionToken('gantt-touch-enabled');
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
"use strict";
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var dependency_type_enum_1 = require("../models/dependency-type.enum");
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
9
10
|
*
|
|
@@ -14,6 +15,9 @@ exports.getOffsetRelativeToParent = function (element, targetParent) {
|
|
|
14
15
|
top: 0,
|
|
15
16
|
left: 0
|
|
16
17
|
};
|
|
18
|
+
if (!targetParent.contains(element)) {
|
|
19
|
+
return offset;
|
|
20
|
+
}
|
|
17
21
|
var offsetParent = element;
|
|
18
22
|
while (offsetParent && offsetParent !== targetParent) {
|
|
19
23
|
offset.top += offsetParent.offsetTop;
|
|
@@ -47,9 +51,9 @@ exports.dependencyCoordinates = function (from, to, rowHeight, type, minDistance
|
|
|
47
51
|
| |
|
|
48
52
|
[[[]]]- -[[[]]]
|
|
49
53
|
*/
|
|
50
|
-
if (type ===
|
|
54
|
+
if (type === dependency_type_enum_1.DependencyType.FF || type === dependency_type_enum_1.DependencyType.SS) {
|
|
51
55
|
// polyline start from first task
|
|
52
|
-
var dir = type ===
|
|
56
|
+
var dir = type === dependency_type_enum_1.DependencyType.SS ? 'left' : 'right';
|
|
53
57
|
top = from.top;
|
|
54
58
|
left = from[dir];
|
|
55
59
|
points.push({ top: top, left: left });
|
|
@@ -75,9 +79,9 @@ exports.dependencyCoordinates = function (from, to, rowHeight, type, minDistance
|
|
|
75
79
|
|
|
|
76
80
|
-[[[]]]
|
|
77
81
|
*/
|
|
78
|
-
var startDir = type ===
|
|
79
|
-
var endDir = type ===
|
|
80
|
-
var additionalTurn = type ===
|
|
82
|
+
var startDir = type === dependency_type_enum_1.DependencyType.SF ? 'left' : 'right';
|
|
83
|
+
var endDir = type === dependency_type_enum_1.DependencyType.SF ? 'right' : 'left';
|
|
84
|
+
var additionalTurn = type === dependency_type_enum_1.DependencyType.SF
|
|
81
85
|
? from[startDir] - minDistanceBeforeTurn * 2 < to[endDir]
|
|
82
86
|
: from[startDir] + minDistanceBeforeTurn * 2 > to[endDir];
|
|
83
87
|
// polyline start from first task
|
|
@@ -166,3 +170,34 @@ var getArrowEast = function (top, left, arrowSize) {
|
|
|
166
170
|
};
|
|
167
171
|
var ɵ2 = getArrowEast;
|
|
168
172
|
exports.ɵ2 = ɵ2;
|
|
173
|
+
/**
|
|
174
|
+
* @hidden
|
|
175
|
+
*
|
|
176
|
+
* Translates the provided client `left` and `top` coords to coords relative to the provided container.
|
|
177
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
178
|
+
*/
|
|
179
|
+
exports.clientToOffsetCoords = function (clientLeft, clientTop, offsetContainer) {
|
|
180
|
+
// client (viewport) coordinates of the target container
|
|
181
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
182
|
+
var offsetContainerClientRect = offsetContainer.getBoundingClientRect();
|
|
183
|
+
return {
|
|
184
|
+
left: clientLeft - offsetContainerClientRect.left + offsetContainer.scrollLeft,
|
|
185
|
+
top: clientTop - offsetContainerClientRect.top + offsetContainer.scrollTop
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* @hidden
|
|
190
|
+
*
|
|
191
|
+
* Retrieves the `left` and `top` values of the center of the provided element.
|
|
192
|
+
* The retrieved values are relative to the current viewport (client values).
|
|
193
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
194
|
+
*/
|
|
195
|
+
exports.getElementClientCenterCoords = function (element) {
|
|
196
|
+
// client (viewport) coordinates of the targeted element
|
|
197
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
198
|
+
var _a = element.getBoundingClientRect(), left = _a.left, top = _a.top, width = _a.width, height = _a.height;
|
|
199
|
+
return {
|
|
200
|
+
left: left + (width / 2),
|
|
201
|
+
top: top + (height / 2)
|
|
202
|
+
};
|
|
203
|
+
};
|
|
@@ -0,0 +1,349 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var core_1 = require("@angular/core");
|
|
9
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
|
+
var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
|
|
11
|
+
var gantt_component_1 = require("../gantt.component");
|
|
12
|
+
var mapping_service_1 = require("../common/mapping.service");
|
|
13
|
+
var timeline_scroll_service_1 = require("../scrolling/timeline-scroll.service");
|
|
14
|
+
var drag_validation_tooltip_component_1 = require("./drag-validation-tooltip.component");
|
|
15
|
+
var utils_1 = require("../dependencies/utils");
|
|
16
|
+
var utils_2 = require("../utils");
|
|
17
|
+
var utils_3 = require("../utils");
|
|
18
|
+
/**
|
|
19
|
+
* When added to the .k-task-dot, the element will be kept with hover styles.
|
|
20
|
+
* Used for the drag clue from which the dragging has started.
|
|
21
|
+
*/
|
|
22
|
+
var DRAG_CLUE_HOVER_CLASS = 'k-state-hover';
|
|
23
|
+
/**
|
|
24
|
+
* Add the selection disabling class to the enitre container.
|
|
25
|
+
* Otherwise existing selection on a given task text prevents dragging the clue even if the clue has `user-select: none` styles.
|
|
26
|
+
*/
|
|
27
|
+
var USER_SELECT_NONE_CLASS = 'k-user-select-none';
|
|
28
|
+
/**
|
|
29
|
+
* When added to the .k-task-wrap, the containing .k-task-dot elements will be kept visible even when not hovered.
|
|
30
|
+
* Used for the drag clue from which the dragging has started.
|
|
31
|
+
*/
|
|
32
|
+
var TASK_WRAPPER_DRAG_CLASS = 'k-origin';
|
|
33
|
+
/**
|
|
34
|
+
* Use 20px margin between the pointer and the popup.
|
|
35
|
+
* Could be made user-configurable if there's demand.
|
|
36
|
+
*/
|
|
37
|
+
var DEFAULT_POPUP_VERTICAL_MARGIN = 20;
|
|
38
|
+
/**
|
|
39
|
+
* A directive which enables the creation of new dependencies via dragging.
|
|
40
|
+
*/
|
|
41
|
+
var DependencyDragCreateDirective = /** @class */ (function () {
|
|
42
|
+
function DependencyDragCreateDirective(gantt, zone, renderer, mapper, popupService, timelineScrollService) {
|
|
43
|
+
this.gantt = gantt;
|
|
44
|
+
this.zone = zone;
|
|
45
|
+
this.renderer = renderer;
|
|
46
|
+
this.mapper = mapper;
|
|
47
|
+
this.popupService = popupService;
|
|
48
|
+
this.timelineScrollService = timelineScrollService;
|
|
49
|
+
/**
|
|
50
|
+
* Specifies whether the validation tooltip will be displayed during drag operations.
|
|
51
|
+
*
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
this.displayValidationTooltip = true;
|
|
55
|
+
this.gantt.renderDependencyDragClues = true;
|
|
56
|
+
}
|
|
57
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "container", {
|
|
58
|
+
get: function () {
|
|
59
|
+
if (!utils_2.isPresent(this.gantt.timeline) || !utils_2.isPresent(this.gantt.timeline.timelineContent)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return this.gantt.timeline.timelineContent.nativeElement;
|
|
63
|
+
},
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "polyline", {
|
|
68
|
+
get: function () {
|
|
69
|
+
if (!utils_2.isPresent(this.gantt.timeline) || !utils_2.isPresent(this.gantt.timeline.dependencyDragCreatePolyline)) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return this.gantt.timeline.dependencyDragCreatePolyline.nativeElement;
|
|
73
|
+
},
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "popupContainer", {
|
|
78
|
+
get: function () {
|
|
79
|
+
if (!utils_2.isPresent(this.gantt.timeline) || !utils_2.isPresent(this.gantt.timeline.dragPopupContainer)) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
return this.gantt.timeline.dragPopupContainer;
|
|
83
|
+
},
|
|
84
|
+
enumerable: true,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
87
|
+
DependencyDragCreateDirective.prototype.ngAfterViewInit = function () {
|
|
88
|
+
this.subscribeDraggable();
|
|
89
|
+
this.addScrollListener();
|
|
90
|
+
};
|
|
91
|
+
DependencyDragCreateDirective.prototype.ngOnDestroy = function () {
|
|
92
|
+
this.unsubscribeDraggable();
|
|
93
|
+
this.removeScrollListener();
|
|
94
|
+
this.fromTaskClue = null;
|
|
95
|
+
this.cancelScroll();
|
|
96
|
+
this.closeDragPopup();
|
|
97
|
+
};
|
|
98
|
+
DependencyDragCreateDirective.prototype.subscribeDraggable = function () {
|
|
99
|
+
this.dragSubscriptions = this.gantt.timeline.timelineContainerPress
|
|
100
|
+
.subscribe(this.handlePress.bind(this));
|
|
101
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerDrag
|
|
102
|
+
.subscribe(this.handleDrag.bind(this)));
|
|
103
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerRelease
|
|
104
|
+
.subscribe(this.handleRelease.bind(this)));
|
|
105
|
+
};
|
|
106
|
+
DependencyDragCreateDirective.prototype.unsubscribeDraggable = function () {
|
|
107
|
+
if (utils_2.isPresent(this.dragSubscriptions)) {
|
|
108
|
+
this.dragSubscriptions.unsubscribe();
|
|
109
|
+
this.dragSubscriptions = null;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
DependencyDragCreateDirective.prototype.handlePress = function (_a) {
|
|
113
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
114
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
115
|
+
var target = utils_3.elementFromPoint(clientX, clientY);
|
|
116
|
+
if (utils_2.isDependencyDragClue(target)) {
|
|
117
|
+
this.fromTaskClue = target;
|
|
118
|
+
this.assignDragStartClasses(this.fromTaskClue);
|
|
119
|
+
// use the center of the target clue as polyline starting point
|
|
120
|
+
var dragClueCenterCoords = utils_1.getElementClientCenterCoords(this.fromTaskClue);
|
|
121
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
122
|
+
this.polylineStartCoords = utils_1.clientToOffsetCoords(dragClueCenterCoords.left, dragClueCenterCoords.top, this.container);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
DependencyDragCreateDirective.prototype.handleDrag = function (_a) {
|
|
126
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
127
|
+
if (utils_2.isPresent(this.fromTaskClue)) {
|
|
128
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
129
|
+
var pointerOffsetCoords = utils_1.clientToOffsetCoords(clientX, clientY, this.container);
|
|
130
|
+
// the start coords are calculated just once per drag session in handlePress
|
|
131
|
+
// use the current drag coords as polyline end coords
|
|
132
|
+
this.updatePolyline(this.polylineStartCoords, pointerOffsetCoords);
|
|
133
|
+
this.currentPointerClientCoords = { left: clientX, top: clientY };
|
|
134
|
+
if (this.gantt.dragScrollSettings.enabled) {
|
|
135
|
+
// use client coordinates for scroll trigger
|
|
136
|
+
this.scrollPointIntoView(this.currentPointerClientCoords);
|
|
137
|
+
}
|
|
138
|
+
if (this.displayValidationTooltip) {
|
|
139
|
+
this.updateDragPopup(pointerOffsetCoords);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
DependencyDragCreateDirective.prototype.handleRelease = function (_a) {
|
|
144
|
+
var _this = this;
|
|
145
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
146
|
+
if (!utils_2.isPresent(this.fromTaskClue)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
150
|
+
var target = utils_3.elementFromPoint(clientX, clientY);
|
|
151
|
+
if (utils_2.isDependencyDragClue(target) && !utils_2.sameTaskClues(this.fromTaskClue, target, this.container)) {
|
|
152
|
+
this.zone.run(function () {
|
|
153
|
+
var _a;
|
|
154
|
+
var fromTaskClue = _this.fromTaskClue;
|
|
155
|
+
var toTaskClue = target;
|
|
156
|
+
var fromTask = _this.gantt.renderedTreeListItems[utils_2.getClosestTaskIndex(fromTaskClue, _this.container)];
|
|
157
|
+
var toTask = _this.gantt.renderedTreeListItems[utils_2.getClosestTaskIndex(toTaskClue, _this.container)];
|
|
158
|
+
var dependencyType = utils_2.getDependencyTypeFromTargetTasks(fromTaskClue, toTaskClue);
|
|
159
|
+
var _b = _this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
160
|
+
_this.gantt.dependencyAdd.emit({
|
|
161
|
+
fromTask: fromTask,
|
|
162
|
+
toTask: toTask,
|
|
163
|
+
type: dependencyType,
|
|
164
|
+
isValid: _this.gantt.validateNewDependency((_a = {},
|
|
165
|
+
_a[fromId] = _this.mapper.extractFromTask(fromTask, 'id'),
|
|
166
|
+
_a[toId] = _this.mapper.extractFromTask(toTask, 'id'),
|
|
167
|
+
_a[type] = dependencyType,
|
|
168
|
+
_a))
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
this.clearPolyline();
|
|
173
|
+
this.removeDragStartClasses(this.fromTaskClue);
|
|
174
|
+
this.fromTaskClue = null;
|
|
175
|
+
this.cancelScroll();
|
|
176
|
+
this.closeDragPopup();
|
|
177
|
+
};
|
|
178
|
+
DependencyDragCreateDirective.prototype.updatePolyline = function (start, end) {
|
|
179
|
+
var points = start.left + "," + start.top + " " + end.left + "," + end.top;
|
|
180
|
+
this.renderer.setAttribute(this.polyline, 'points', points);
|
|
181
|
+
};
|
|
182
|
+
DependencyDragCreateDirective.prototype.clearPolyline = function () {
|
|
183
|
+
this.renderer.removeAttribute(this.polyline, 'points');
|
|
184
|
+
};
|
|
185
|
+
DependencyDragCreateDirective.prototype.assignDragStartClasses = function (dragClue) {
|
|
186
|
+
if (!utils_2.isPresent(dragClue)) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.renderer.addClass(this.container, USER_SELECT_NONE_CLASS);
|
|
190
|
+
this.renderer.addClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
191
|
+
var taskWrapper = utils_2.getClosestTaskWrapper(dragClue, this.container);
|
|
192
|
+
if (utils_2.isPresent(taskWrapper)) {
|
|
193
|
+
this.renderer.addClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
DependencyDragCreateDirective.prototype.removeDragStartClasses = function (dragClue) {
|
|
197
|
+
if (!utils_2.isPresent(dragClue)) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.renderer.removeClass(this.container, USER_SELECT_NONE_CLASS);
|
|
201
|
+
this.renderer.removeClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
202
|
+
var taskWrapper = utils_2.getClosestTaskWrapper(dragClue, this.container);
|
|
203
|
+
if (utils_2.isPresent(taskWrapper)) {
|
|
204
|
+
this.renderer.removeClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
DependencyDragCreateDirective.prototype.scrollPointIntoView = function (_a) {
|
|
208
|
+
var left = _a.left, top = _a.top;
|
|
209
|
+
this.timelineScrollService.requestScrollCancel();
|
|
210
|
+
this.timelineScrollService.requestHorizontalScroll(left);
|
|
211
|
+
this.timelineScrollService.requestVerticalScroll(top);
|
|
212
|
+
};
|
|
213
|
+
DependencyDragCreateDirective.prototype.cancelScroll = function () {
|
|
214
|
+
this.timelineScrollService.requestScrollCancel();
|
|
215
|
+
};
|
|
216
|
+
DependencyDragCreateDirective.prototype.addScrollListener = function () {
|
|
217
|
+
var _this = this;
|
|
218
|
+
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
this.zone.runOutsideAngular(function () {
|
|
222
|
+
return _this.scrollListenerDisposer = _this.renderer.listen(_this.container, 'scroll', function () {
|
|
223
|
+
// update the polyline only if we're currently dragging
|
|
224
|
+
if (utils_2.isPresent(_this.fromTaskClue) && utils_2.isPresent(_this.currentPointerClientCoords)) {
|
|
225
|
+
var _a = _this.currentPointerClientCoords, left = _a.left, top_1 = _a.top;
|
|
226
|
+
var pointerOffsetCoords = utils_1.clientToOffsetCoords(left, top_1, _this.container);
|
|
227
|
+
_this.updatePolyline(_this.polylineStartCoords, pointerOffsetCoords);
|
|
228
|
+
if (_this.displayValidationTooltip) {
|
|
229
|
+
_this.updateDragPopup(pointerOffsetCoords);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
DependencyDragCreateDirective.prototype.removeScrollListener = function () {
|
|
236
|
+
if (utils_2.isPresent(this.scrollListenerDisposer)) {
|
|
237
|
+
this.scrollListenerDisposer();
|
|
238
|
+
this.scrollListenerDisposer = null;
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
DependencyDragCreateDirective.prototype.openDragPopup = function () {
|
|
242
|
+
if (utils_2.isPresent(this.dragPopup)) {
|
|
243
|
+
this.closeDragPopup();
|
|
244
|
+
}
|
|
245
|
+
this.dragPopup = this.popupService.open({
|
|
246
|
+
animate: false,
|
|
247
|
+
content: drag_validation_tooltip_component_1.DragValidationTooltipComponent,
|
|
248
|
+
appendTo: this.popupContainer,
|
|
249
|
+
positionMode: 'absolute',
|
|
250
|
+
popupClass: 'k-popup-transparent'
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
DependencyDragCreateDirective.prototype.updateDragPopup = function (pointerOffsetPosition) {
|
|
254
|
+
if (!utils_2.isPresent(this.dragPopup)) {
|
|
255
|
+
this.openDragPopup();
|
|
256
|
+
}
|
|
257
|
+
var tooltip = this.dragPopup.content.instance;
|
|
258
|
+
var _a = this.getTooltipContext(), fromTaskName = _a.fromTaskName, toTaskName = _a.toTaskName, isValid = _a.isValid, showValidityStatus = _a.showValidityStatus;
|
|
259
|
+
if (tooltip.fromTaskName !== fromTaskName ||
|
|
260
|
+
tooltip.toTaskName !== toTaskName ||
|
|
261
|
+
tooltip.isValid !== isValid ||
|
|
262
|
+
tooltip.showValidityStatus !== showValidityStatus) {
|
|
263
|
+
tooltip.fromTaskName = fromTaskName;
|
|
264
|
+
tooltip.toTaskName = toTaskName;
|
|
265
|
+
tooltip.isValid = isValid;
|
|
266
|
+
tooltip.showValidityStatus = showValidityStatus;
|
|
267
|
+
this.dragPopup.content.changeDetectorRef.detectChanges();
|
|
268
|
+
}
|
|
269
|
+
this.dragPopup.popup.instance.offset = this.normalizePopupPosition(pointerOffsetPosition);
|
|
270
|
+
this.dragPopup.popup.changeDetectorRef.detectChanges();
|
|
271
|
+
};
|
|
272
|
+
DependencyDragCreateDirective.prototype.closeDragPopup = function () {
|
|
273
|
+
if (utils_2.isPresent(this.dragPopup)) {
|
|
274
|
+
this.dragPopup.close();
|
|
275
|
+
this.dragPopup = null;
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
DependencyDragCreateDirective.prototype.extractTaskName = function (target) {
|
|
279
|
+
if (!utils_2.isTaskWrapper(target, this.container)) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
var taskIndex = utils_2.getClosestTaskIndex(target, this.container);
|
|
283
|
+
var task = this.gantt.renderedTreeListItems[taskIndex];
|
|
284
|
+
var taskName = this.mapper.extractFromTask(task, 'title');
|
|
285
|
+
return taskName;
|
|
286
|
+
};
|
|
287
|
+
DependencyDragCreateDirective.prototype.getTooltipContext = function () {
|
|
288
|
+
var _a;
|
|
289
|
+
var fromTaskName = this.extractTaskName(this.fromTaskClue);
|
|
290
|
+
var currentPointerTarget = utils_3.elementFromPoint(this.currentPointerClientCoords.left, this.currentPointerClientCoords.top);
|
|
291
|
+
var toTaskName = utils_2.isTaskWrapper(currentPointerTarget, this.container) && !utils_2.sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container) ?
|
|
292
|
+
this.extractTaskName(currentPointerTarget) :
|
|
293
|
+
'';
|
|
294
|
+
var showValidityStatus = utils_2.isDependencyDragClue(currentPointerTarget) && !utils_2.sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container);
|
|
295
|
+
var _b = this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
296
|
+
return {
|
|
297
|
+
fromTaskName: fromTaskName,
|
|
298
|
+
toTaskName: toTaskName,
|
|
299
|
+
showValidityStatus: showValidityStatus,
|
|
300
|
+
isValid: showValidityStatus && this.gantt.validateNewDependency((_a = {},
|
|
301
|
+
_a[fromId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[utils_2.getClosestTaskIndex(this.fromTaskClue, this.container)], 'id'),
|
|
302
|
+
_a[toId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[utils_2.getClosestTaskIndex(currentPointerTarget, this.container)], 'id'),
|
|
303
|
+
_a[type] = utils_2.getDependencyTypeFromTargetTasks(this.fromTaskClue, currentPointerTarget),
|
|
304
|
+
_a))
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Restricts the popup position to not go below the scroll height or width of the container.
|
|
309
|
+
* Flips the position of the popup when there's not enough vertical space in the visible part of the container to render the popup.
|
|
310
|
+
*/
|
|
311
|
+
DependencyDragCreateDirective.prototype.normalizePopupPosition = function (pointerOffsetPosition) {
|
|
312
|
+
var top = pointerOffsetPosition.top + DEFAULT_POPUP_VERTICAL_MARGIN;
|
|
313
|
+
var containerClientBottom = this.container.clientHeight + this.container.scrollTop;
|
|
314
|
+
var popupHeight = this.dragPopup.popupElement.querySelector('.k-tooltip').clientHeight;
|
|
315
|
+
var enoughSpaceToRender = top < containerClientBottom - popupHeight;
|
|
316
|
+
// flip the popup above the pointer if there's not enough space in the bottom of the container
|
|
317
|
+
if (!enoughSpaceToRender) {
|
|
318
|
+
// margin * 2 to account for the already applied margin
|
|
319
|
+
top -= popupHeight + (DEFAULT_POPUP_VERTICAL_MARGIN * 2);
|
|
320
|
+
}
|
|
321
|
+
// center the popup horizontally according to the pointer position
|
|
322
|
+
var popupWidth = this.dragPopup.popupElement.querySelector('.k-tooltip').clientWidth;
|
|
323
|
+
var left = pointerOffsetPosition.left - popupWidth / 2;
|
|
324
|
+
// don't allow the popup to be cut out of the viewport
|
|
325
|
+
var minLeftTop = 0;
|
|
326
|
+
// restrict the popup from being positioned beyond or before the available scrollable space
|
|
327
|
+
return {
|
|
328
|
+
left: utils_2.fitToRange(left, minLeftTop, this.container.scrollWidth - popupWidth),
|
|
329
|
+
top: utils_2.fitToRange(top, minLeftTop, this.container.scrollHeight - popupHeight)
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
tslib_1.__decorate([
|
|
333
|
+
core_1.Input(),
|
|
334
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
335
|
+
], DependencyDragCreateDirective.prototype, "displayValidationTooltip", void 0);
|
|
336
|
+
DependencyDragCreateDirective = tslib_1.__decorate([
|
|
337
|
+
core_1.Directive({
|
|
338
|
+
selector: '[kendoGanttDependencyDragCreate]'
|
|
339
|
+
}),
|
|
340
|
+
tslib_1.__metadata("design:paramtypes", [gantt_component_1.GanttComponent,
|
|
341
|
+
core_1.NgZone,
|
|
342
|
+
core_1.Renderer2,
|
|
343
|
+
mapping_service_1.MappingService,
|
|
344
|
+
kendo_angular_popup_1.PopupService,
|
|
345
|
+
timeline_scroll_service_1.TimelineScrollService])
|
|
346
|
+
], DependencyDragCreateDirective);
|
|
347
|
+
return DependencyDragCreateDirective;
|
|
348
|
+
}());
|
|
349
|
+
exports.DependencyDragCreateDirective = DependencyDragCreateDirective;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var core_1 = require("@angular/core");
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
var DragValidationTooltipComponent = /** @class */ (function () {
|
|
13
|
+
function DragValidationTooltipComponent() {
|
|
14
|
+
/**
|
|
15
|
+
* Sets the status class of the attempted operation.
|
|
16
|
+
* Note that the status will be ignored and the `neutral` status class will be rendered,
|
|
17
|
+
* if the any of the fromTaskName or toTaskName are not populated.
|
|
18
|
+
*/
|
|
19
|
+
this.isValid = false;
|
|
20
|
+
}
|
|
21
|
+
DragValidationTooltipComponent = tslib_1.__decorate([
|
|
22
|
+
core_1.Component({
|
|
23
|
+
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 ",
|
|
24
|
+
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 "]
|
|
25
|
+
})
|
|
26
|
+
], DragValidationTooltipComponent);
|
|
27
|
+
return DragValidationTooltipComponent;
|
|
28
|
+
}());
|
|
29
|
+
exports.DragValidationTooltipComponent = DragValidationTooltipComponent;
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var core_1 = require("@angular/core");
|
|
9
|
+
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
10
|
+
var edit_service_1 = require("./edit.service");
|
|
11
|
+
/**
|
|
12
|
+
* The UI for adding new items to the Gantt.
|
|
13
|
+
* Use it within a toolbar template to provide a custom icon or list of options.
|
|
14
|
+
*/
|
|
15
|
+
var GanttAddTaskComponent = /** @class */ (function () {
|
|
16
|
+
function GanttAddTaskComponent(localizationService, editService, ngZone) {
|
|
17
|
+
this.localizationService = localizationService;
|
|
18
|
+
this.editService = editService;
|
|
19
|
+
this.ngZone = ngZone;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the data of the DropDownButton.
|
|
22
|
+
* > The data has to be provided in an array-like list.
|
|
23
|
+
*/
|
|
24
|
+
this.data = [{
|
|
25
|
+
text: this.getText('addChildText'),
|
|
26
|
+
type: 'addChild'
|
|
27
|
+
}, {
|
|
28
|
+
text: this.getText('addAboveText'),
|
|
29
|
+
type: 'addAbove'
|
|
30
|
+
}, {
|
|
31
|
+
text: this.getText('addBelowText'),
|
|
32
|
+
type: 'addBelow'
|
|
33
|
+
}];
|
|
34
|
+
/**
|
|
35
|
+
* Defines the name of an existing icon in a Kendo UI theme.
|
|
36
|
+
* @default 'plus'
|
|
37
|
+
*/
|
|
38
|
+
this.icon = 'plus';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
GanttAddTaskComponent.prototype.getText = function (message) {
|
|
44
|
+
return this.localizationService.get(message);
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
GanttAddTaskComponent.prototype.handleOpen = function (e) {
|
|
50
|
+
if (!this.editService.getSelectedItem()) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
GanttAddTaskComponent.prototype.handleMouseClick = function () {
|
|
58
|
+
var _this = this;
|
|
59
|
+
if (!this.editService.getSelectedItem()) {
|
|
60
|
+
this.ngZone.run(function () {
|
|
61
|
+
_this.editService.addEvent.next({
|
|
62
|
+
selectedItem: null,
|
|
63
|
+
actionType: 'addTask'
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
GanttAddTaskComponent.prototype.handleItemClick = function (e) {
|
|
72
|
+
this.editService.addEvent.next({
|
|
73
|
+
actionType: e.type,
|
|
74
|
+
selectedItem: null
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
core_1.Input(),
|
|
79
|
+
tslib_1.__metadata("design:type", Array)
|
|
80
|
+
], GanttAddTaskComponent.prototype, "data", void 0);
|
|
81
|
+
tslib_1.__decorate([
|
|
82
|
+
core_1.Input(),
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
84
|
+
], GanttAddTaskComponent.prototype, "icon", void 0);
|
|
85
|
+
GanttAddTaskComponent = tslib_1.__decorate([
|
|
86
|
+
core_1.Component({
|
|
87
|
+
selector: 'kendo-gantt-add-task',
|
|
88
|
+
template: "\n <kendo-dropdownbutton\n [data]=\"data\"\n [icon]=\"icon\"\n [kendoEventsOutsideAngular]=\"{ click: handleMouseClick }\"\n [scope]=\"this\"\n (itemClick)=\"handleItemClick($event)\"\n (open)=\"handleOpen($event)\">\n {{ getText('addTaskText') }}\n </kendo-dropdownbutton>\n "
|
|
89
|
+
}),
|
|
90
|
+
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService,
|
|
91
|
+
edit_service_1.EditService,
|
|
92
|
+
core_1.NgZone])
|
|
93
|
+
], GanttAddTaskComponent);
|
|
94
|
+
return GanttAddTaskComponent;
|
|
95
|
+
}());
|
|
96
|
+
exports.GanttAddTaskComponent = GanttAddTaskComponent;
|