@progress/kendo-angular-gantt 0.2.1-dev.202112091741 → 0.3.0-dev.202201131518
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 +37 -6
- package/dist/es/editing/edit.service.js +89 -7
- package/dist/es/editing/task-fields.component.js +43 -0
- package/dist/es/editing/{util.js → utils.js} +0 -0
- package/dist/es/expanded-state/expandable.directive.js +4 -6
- package/dist/es/gantt.component.js +230 -45
- package/dist/es/gantt.module.js +36 -10
- package/dist/es/index.js +8 -1
- 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/models.js +1 -0
- package/dist/es/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
- package/dist/es/models/{toolbar-position.js → view-item.interface.js} +0 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/gantt-milestone-task.component.js +7 -4
- package/dist/es/rendering/gantt-summary-task.component.js +7 -4
- package/dist/es/rendering/gantt-task-base.js +30 -19
- package/dist/es/rendering/gantt-task.component.js +8 -6
- package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
- 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 +45 -3
- package/dist/es/toolbar/toolbar.component.js +9 -1
- package/dist/es/utils.js +143 -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 +10 -3
- package/dist/es2015/editing/edit-dialog.component.js +55 -33
- package/dist/es2015/editing/edit.service.d.ts +24 -3
- package/dist/es2015/editing/edit.service.js +78 -10
- 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} +0 -0
- package/dist/es2015/editing/{util.js → utils.js} +0 -0
- package/dist/es2015/expanded-state/expandable.directive.d.ts +1 -2
- package/dist/es2015/expanded-state/expandable.directive.js +2 -7
- package/dist/es2015/gantt.component.d.ts +62 -18
- package/dist/es2015/gantt.component.js +290 -43
- package/dist/es2015/gantt.module.js +36 -10
- package/dist/es2015/index.d.ts +8 -1
- package/dist/es2015/index.js +8 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/{treelist-messages.directive.d.ts → gantt-localization.service.d.ts} +4 -3
- 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/{add-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/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
- package/dist/es2015/models/events/task-edit-event.interface.d.ts +17 -4
- package/dist/es2015/models/models.d.ts +4 -3
- package/dist/es2015/models/models.js +1 -0
- package/dist/es2015/models/toolbar-settings.d.ts +29 -0
- package/dist/es2015/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
- package/dist/es2015/models/view-item.interface.d.ts +35 -0
- package/dist/es2015/models/{toolbar-position.js → view-item.interface.js} +0 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +2 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.js +18 -5
- package/dist/es2015/rendering/gantt-summary-task.component.d.ts +2 -1
- package/dist/es2015/rendering/gantt-summary-task.component.js +18 -5
- package/dist/es2015/rendering/gantt-task-base.d.ts +11 -5
- package/dist/es2015/rendering/gantt-task-base.js +30 -19
- package/dist/es2015/rendering/gantt-task.component.d.ts +2 -1
- package/dist/es2015/rendering/gantt-task.component.js +19 -7
- package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
- package/dist/es2015/rendering/gantt-tasks-table-body.component.js +10 -3
- 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/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 +25 -2
- package/dist/es2015/timeline/gantt-timeline.component.js +56 -3
- package/dist/es2015/toolbar/toolbar-template.directive.d.ts +1 -1
- package/dist/es2015/toolbar/toolbar.component.d.ts +2 -0
- package/dist/es2015/toolbar/toolbar.component.js +10 -0
- package/dist/es2015/utils.d.ts +70 -8
- package/dist/es2015/utils.js +143 -12
- package/dist/fesm2015/index.js +1981 -424
- package/dist/fesm5/index.js +1784 -391
- 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 +36 -5
- package/dist/npm/editing/edit.service.js +88 -6
- package/dist/npm/editing/task-fields.component.js +45 -0
- package/dist/npm/editing/{util.js → utils.js} +0 -0
- package/dist/npm/expanded-state/expandable.directive.js +3 -5
- package/dist/npm/gantt.component.js +231 -46
- package/dist/npm/gantt.module.js +34 -8
- package/dist/npm/index.js +16 -2
- 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/models.js +2 -0
- package/dist/npm/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
- package/dist/npm/models/{toolbar-position.js → view-item.interface.js} +0 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/gantt-milestone-task.component.js +6 -3
- package/dist/npm/rendering/gantt-summary-task.component.js +6 -3
- package/dist/npm/rendering/gantt-task-base.js +30 -19
- package/dist/npm/rendering/gantt-task.component.js +7 -5
- package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
- 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 +44 -2
- package/dist/npm/toolbar/toolbar.component.js +9 -1
- package/dist/npm/utils.js +143 -12
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +9 -6
- package/dist/es/localization/treelist-messages.directive.js +0 -31
- package/dist/es2015/localization/treelist-messages.directive.js +0 -29
- package/dist/es2015/models/events/add-event.interface.d.ts +0 -16
- package/dist/es2015/models/events/edit-event.interface.d.ts +0 -19
- package/dist/es2015/models/events/remove-event.interface.d.ts +0 -16
- package/dist/es2015/models/toolbar-position.d.ts +0 -9
- package/dist/npm/localization/treelist-messages.directive.js +0 -33
package/dist/es/index.js
CHANGED
|
@@ -8,14 +8,19 @@
|
|
|
8
8
|
export * from './main';
|
|
9
9
|
export { MappingService } from './common/mapping.service';
|
|
10
10
|
export { OptionChangesService } from './common/option-changes.service';
|
|
11
|
+
export { TOUCH_ENABLED } from './common/touch-enabled';
|
|
11
12
|
export { DependencyDomService } from './dependencies/dependency-dom.service';
|
|
12
13
|
export { GanttDependencyDirective } from './dependencies/gantt-dependency.directive';
|
|
14
|
+
export { DragValidationTooltipComponent } from './dragging/drag-validation-tooltip.component';
|
|
15
|
+
export { GanttAddTaskComponent } from './editing/add-task.component';
|
|
16
|
+
export { DependenciesTableComponent } from './editing/dependencies-table.component';
|
|
13
17
|
export { EditDialogComponent } from './editing/edit-dialog.component';
|
|
14
18
|
export { EditService } from './editing/edit.service';
|
|
19
|
+
export { TaskFieldsComponent } from './editing/task-fields.component';
|
|
15
20
|
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
21
|
+
export { GanttLocalizationService } from './localization/gantt-localization.service';
|
|
16
22
|
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
17
23
|
export { Messages } from './localization/messages';
|
|
18
|
-
export { GanttTreeListMessagesDirective } from './localization/treelist-messages.directive';
|
|
19
24
|
export { PreventableEvent } from './models/events/preventable-event';
|
|
20
25
|
export { GanttHeaderTableBodyComponent } from './rendering/gantt-header-table-body.component';
|
|
21
26
|
export { GanttMilestoneTaskComponent } from './rendering/gantt-milestone-task.component';
|
|
@@ -24,6 +29,8 @@ export { GanttTaskBase } from './rendering/gantt-task-base';
|
|
|
24
29
|
export { GanttTaskComponent } from './rendering/gantt-task.component';
|
|
25
30
|
export { GanttTasksTableBodyComponent } from './rendering/gantt-tasks-table-body.component';
|
|
26
31
|
export { ScrollSyncService } from './scrolling/scroll-sync.service';
|
|
32
|
+
export { TimelineScrollableDirective } from './scrolling/timeline-scroll.directive';
|
|
33
|
+
export { TimelineScrollService } from './scrolling/timeline-scroll.service';
|
|
27
34
|
export { GanttTimelineComponent } from './timeline/gantt-timeline.component';
|
|
28
35
|
export { TimelineBaseViewService } from './timeline/timeline-base-view.service';
|
|
29
36
|
export { TimelineDayViewComponent } from './timeline/timeline-day-view.component';
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*
|
|
11
|
+
* Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
|
|
12
|
+
*/
|
|
13
|
+
var GanttLocalizationService = /** @class */ (function () {
|
|
14
|
+
function GanttLocalizationService(localizationService) {
|
|
15
|
+
this.localizationService = localizationService;
|
|
16
|
+
}
|
|
17
|
+
GanttLocalizationService.prototype.get = function (token) {
|
|
18
|
+
return this.localizationService.get(token);
|
|
19
|
+
};
|
|
20
|
+
GanttLocalizationService = tslib_1.__decorate([
|
|
21
|
+
Injectable(),
|
|
22
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
23
|
+
], GanttLocalizationService);
|
|
24
|
+
return GanttLocalizationService;
|
|
25
|
+
}());
|
|
26
|
+
export { GanttLocalizationService };
|
|
@@ -13,6 +13,38 @@ var Messages = /** @class */ (function (_super) {
|
|
|
13
13
|
function Messages() {
|
|
14
14
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
15
|
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
Input(),
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
19
|
+
], Messages.prototype, "taskEditingGeneralTabTitle", void 0);
|
|
20
|
+
tslib_1.__decorate([
|
|
21
|
+
Input(),
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
23
|
+
], Messages.prototype, "taskEditingPredecessorsTabTitle", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
Input(),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], Messages.prototype, "taskEditingSuccessorsTabTitle", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
Input(),
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
|
+
], Messages.prototype, "taskEditingDependenciesAddButtonText", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
Input(),
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
35
|
+
], Messages.prototype, "taskEditingDependenciesRemoveButtonText", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
Input(),
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
39
|
+
], Messages.prototype, "taskEditingDependenciesGridNameColumnTitle", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
Input(),
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
43
|
+
], Messages.prototype, "taskEditingDependenciesGridTypeColumnTitle", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
Input(),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], Messages.prototype, "deleteButtonText", void 0);
|
|
16
48
|
tslib_1.__decorate([
|
|
17
49
|
Input(),
|
|
18
50
|
tslib_1.__metadata("design:type", String)
|
|
@@ -36,7 +68,19 @@ var Messages = /** @class */ (function (_super) {
|
|
|
36
68
|
tslib_1.__decorate([
|
|
37
69
|
Input(),
|
|
38
70
|
tslib_1.__metadata("design:type", String)
|
|
39
|
-
], Messages.prototype, "
|
|
71
|
+
], Messages.prototype, "addTaskText", void 0);
|
|
72
|
+
tslib_1.__decorate([
|
|
73
|
+
Input(),
|
|
74
|
+
tslib_1.__metadata("design:type", String)
|
|
75
|
+
], Messages.prototype, "addChildText", void 0);
|
|
76
|
+
tslib_1.__decorate([
|
|
77
|
+
Input(),
|
|
78
|
+
tslib_1.__metadata("design:type", String)
|
|
79
|
+
], Messages.prototype, "addAboveText", void 0);
|
|
80
|
+
tslib_1.__decorate([
|
|
81
|
+
Input(),
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
83
|
+
], Messages.prototype, "addBelowText", void 0);
|
|
40
84
|
tslib_1.__decorate([
|
|
41
85
|
Input(),
|
|
42
86
|
tslib_1.__metadata("design:type", String)
|
package/dist/es/main.js
CHANGED
|
@@ -7,6 +7,7 @@ export { GanttModule } from './gantt.module';
|
|
|
7
7
|
export { GanttHierarchyBindingDirective } from './binding-directives/hierarchy-binding.directive';
|
|
8
8
|
export { GanttFlatBindingDirective } from './binding-directives/flat-binding.directive';
|
|
9
9
|
export { GanttExpandableDirective } from './expanded-state/expandable.directive';
|
|
10
|
+
export { DependencyDragCreateDirective } from './dragging/dependency-drag-create.directive';
|
|
10
11
|
export { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
|
|
11
12
|
export { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
|
|
12
13
|
export { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
|
|
@@ -2,3 +2,19 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* The dependency type when two tasks are connected.
|
|
7
|
+
*
|
|
8
|
+
* The supported values are:
|
|
9
|
+
* * `FF`—from 'finish' to 'finish'
|
|
10
|
+
* * `FS`—from 'finish' to 'start'
|
|
11
|
+
* * `SS`—from 'start' to 'start'
|
|
12
|
+
* * `SF`—from 'start' to 'finish'
|
|
13
|
+
*/
|
|
14
|
+
export var DependencyType;
|
|
15
|
+
(function (DependencyType) {
|
|
16
|
+
DependencyType[DependencyType["FF"] = 0] = "FF";
|
|
17
|
+
DependencyType[DependencyType["FS"] = 1] = "FS";
|
|
18
|
+
DependencyType[DependencyType["SF"] = 2] = "SF";
|
|
19
|
+
DependencyType[DependencyType["SS"] = 3] = "SS"; // task B can't start before task A starts
|
|
20
|
+
})(DependencyType || (DependencyType = {}));
|
|
File without changes
|
|
File without changes
|
package/dist/es/models/models.js
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export { DependencyType } from './dependency-type.enum';
|
|
5
6
|
export { CellCloseEvent } from './events/cell-close-event.interface';
|
|
File without changes
|
|
File without changes
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-gantt',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642086647,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, forwardRef, HostBinding, ChangeDetectorRef } from '@angular/core';
|
|
6
|
+
import { Component, forwardRef, HostBinding, ChangeDetectorRef, Inject } from '@angular/core';
|
|
7
7
|
import { MappingService } from '../common/mapping.service';
|
|
8
|
+
import { TOUCH_ENABLED } from '../common/touch-enabled';
|
|
8
9
|
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
9
10
|
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
11
|
import { TimelineViewService } from './../timeline/timeline-view.service';
|
|
@@ -14,8 +15,9 @@ import { GanttTaskBase } from './gantt-task-base';
|
|
|
14
15
|
*/
|
|
15
16
|
var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
|
|
16
17
|
tslib_1.__extends(GanttMilestoneTaskComponent, _super);
|
|
17
|
-
function GanttMilestoneTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
18
|
+
function GanttMilestoneTaskComponent(touchEnabled, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
18
19
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
20
|
+
_this.touchEnabled = touchEnabled;
|
|
19
21
|
_this.milestoneWrapperClass = true;
|
|
20
22
|
return _this;
|
|
21
23
|
}
|
|
@@ -34,9 +36,10 @@ var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
|
|
|
34
36
|
useExisting: forwardRef(function () { return GanttMilestoneTaskComponent_1; })
|
|
35
37
|
}
|
|
36
38
|
],
|
|
37
|
-
template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [
|
|
39
|
+
template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n "
|
|
38
40
|
}),
|
|
39
|
-
tslib_1.
|
|
41
|
+
tslib_1.__param(0, Inject(TOUCH_ENABLED)),
|
|
42
|
+
tslib_1.__metadata("design:paramtypes", [Boolean, MappingService,
|
|
40
43
|
TimelineViewService,
|
|
41
44
|
DependencyDomService,
|
|
42
45
|
OptionChangesService,
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { ChangeDetectorRef, Component, forwardRef, HostBinding, Input, TemplateRef } from '@angular/core';
|
|
6
|
+
import { ChangeDetectorRef, Component, forwardRef, HostBinding, Inject, Input, TemplateRef } from '@angular/core';
|
|
7
7
|
import { MappingService } from '../common/mapping.service';
|
|
8
|
+
import { TOUCH_ENABLED } from '../common/touch-enabled';
|
|
8
9
|
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
9
10
|
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
11
|
import { TimelineViewService } from './../timeline/timeline-view.service';
|
|
@@ -14,8 +15,9 @@ import { GanttTaskBase } from './gantt-task-base';
|
|
|
14
15
|
*/
|
|
15
16
|
var GanttSummaryTaskComponent = /** @class */ (function (_super) {
|
|
16
17
|
tslib_1.__extends(GanttSummaryTaskComponent, _super);
|
|
17
|
-
function GanttSummaryTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
18
|
+
function GanttSummaryTaskComponent(touchEnabled, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
18
19
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
20
|
+
_this.touchEnabled = touchEnabled;
|
|
19
21
|
_this.summaryWrapperClass = true;
|
|
20
22
|
return _this;
|
|
21
23
|
}
|
|
@@ -38,9 +40,10 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
|
|
|
38
40
|
useExisting: forwardRef(function () { return GanttSummaryTaskComponent_1; })
|
|
39
41
|
}
|
|
40
42
|
],
|
|
41
|
-
template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [
|
|
43
|
+
template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <div *ngIf=\"!template; else summaryTemplate\"\n class=\"k-task-summary-progress\"\n [style.width.px]=\"taskWidth\">\n <div\n class=\"k-task-summary-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n </div>\n <ng-template\n #summaryTemplate\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n "
|
|
42
44
|
}),
|
|
43
|
-
tslib_1.
|
|
45
|
+
tslib_1.__param(0, Inject(TOUCH_ENABLED)),
|
|
46
|
+
tslib_1.__metadata("design:paramtypes", [Boolean, MappingService,
|
|
44
47
|
TimelineViewService,
|
|
45
48
|
DependencyDomService,
|
|
46
49
|
OptionChangesService,
|
|
@@ -51,23 +51,6 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
51
51
|
enumerable: true,
|
|
52
52
|
configurable: true
|
|
53
53
|
});
|
|
54
|
-
GanttTaskBase.prototype.ngOnChanges = function (changes) {
|
|
55
|
-
if (isPresent(changes.dataItem)) {
|
|
56
|
-
if (isPresent(changes.dataItem.previousValue)) {
|
|
57
|
-
this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
|
|
58
|
-
}
|
|
59
|
-
this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
|
|
60
|
-
}
|
|
61
|
-
else if (isPresent(changes.activeView)) {
|
|
62
|
-
this.dependencyDomService.notifyChanges();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
GanttTaskBase.prototype.ngOnDestroy = function () {
|
|
66
|
-
if (isPresent(this.dataItem)) {
|
|
67
|
-
this.dependencyDomService.unregisterTask(this.dataItem);
|
|
68
|
-
}
|
|
69
|
-
this.viewChangesSubscription.unsubscribe();
|
|
70
|
-
};
|
|
71
54
|
Object.defineProperty(GanttTaskBase.prototype, "taskWidth", {
|
|
72
55
|
get: function () {
|
|
73
56
|
var itemDuration = this.mapper.extractFromTask(this.dataItem, 'end') - this.mapper.extractFromTask(this.dataItem, 'start');
|
|
@@ -79,6 +62,12 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
79
62
|
configurable: true
|
|
80
63
|
});
|
|
81
64
|
Object.defineProperty(GanttTaskBase.prototype, "taskOffset", {
|
|
65
|
+
/**
|
|
66
|
+
* The `left` style prop has to be applied to the host element (.k-task-wrap), as the drag clue elements are displayed on .k-task-wrap hover.
|
|
67
|
+
* Applying the `left` offset to the inner .k-task element leaves the .k-task-wrap element rendered with an offset of 0 somewhere on the left
|
|
68
|
+
* and hovering just the .k-task element doesn't expose the drag clues.
|
|
69
|
+
* Additionally, positioning the entire container takes care of positioning the hints as well.
|
|
70
|
+
*/
|
|
82
71
|
get: function () {
|
|
83
72
|
var timeAfterViewStart = this.mapper.extractFromTask(this.dataItem, 'start') - this.viewService.viewStart;
|
|
84
73
|
var offsetInSlotUnits = timeAfterViewStart / this.slotUnitDuration;
|
|
@@ -97,6 +86,23 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
97
86
|
enumerable: true,
|
|
98
87
|
configurable: true
|
|
99
88
|
});
|
|
89
|
+
GanttTaskBase.prototype.ngOnChanges = function (changes) {
|
|
90
|
+
if (isPresent(changes.dataItem)) {
|
|
91
|
+
if (isPresent(changes.dataItem.previousValue)) {
|
|
92
|
+
this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
|
|
93
|
+
}
|
|
94
|
+
this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
|
|
95
|
+
}
|
|
96
|
+
else if (isPresent(changes.activeView)) {
|
|
97
|
+
this.dependencyDomService.notifyChanges();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
GanttTaskBase.prototype.ngOnDestroy = function () {
|
|
101
|
+
if (isPresent(this.dataItem)) {
|
|
102
|
+
this.dependencyDomService.unregisterTask(this.dataItem);
|
|
103
|
+
}
|
|
104
|
+
this.viewChangesSubscription.unsubscribe();
|
|
105
|
+
};
|
|
100
106
|
tslib_1.__decorate([
|
|
101
107
|
HostBinding('class.k-task-wrap'),
|
|
102
108
|
tslib_1.__metadata("design:type", Boolean)
|
|
@@ -111,8 +117,8 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
111
117
|
], GanttTaskBase.prototype, "dataItem", void 0);
|
|
112
118
|
tslib_1.__decorate([
|
|
113
119
|
Input(),
|
|
114
|
-
tslib_1.__metadata("design:type",
|
|
115
|
-
], GanttTaskBase.prototype, "
|
|
120
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
121
|
+
], GanttTaskBase.prototype, "renderDependencyDragClues", void 0);
|
|
116
122
|
tslib_1.__decorate([
|
|
117
123
|
Input(),
|
|
118
124
|
tslib_1.__metadata("design:type", Function)
|
|
@@ -125,6 +131,11 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
125
131
|
Input(),
|
|
126
132
|
tslib_1.__metadata("design:type", Function)
|
|
127
133
|
], GanttTaskBase.prototype, "taskClass", void 0);
|
|
134
|
+
tslib_1.__decorate([
|
|
135
|
+
HostBinding('style.left.px'),
|
|
136
|
+
tslib_1.__metadata("design:type", Number),
|
|
137
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
138
|
+
], GanttTaskBase.prototype, "taskOffset", null);
|
|
128
139
|
return GanttTaskBase;
|
|
129
140
|
}());
|
|
130
141
|
export { GanttTaskBase };
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { ChangeDetectorRef, Component, forwardRef, Input, TemplateRef } from '@angular/core';
|
|
6
|
+
import { ChangeDetectorRef, Component, forwardRef, Inject, Input, TemplateRef } from '@angular/core';
|
|
7
7
|
import { MappingService } from '../common/mapping.service';
|
|
8
|
+
import { TOUCH_ENABLED } from '../common/touch-enabled';
|
|
8
9
|
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
9
10
|
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
11
|
import { TimelineViewService } from './../timeline/timeline-view.service';
|
|
@@ -15,9 +16,10 @@ import { EditService } from '../editing/edit.service';
|
|
|
15
16
|
*/
|
|
16
17
|
var GanttTaskComponent = /** @class */ (function (_super) {
|
|
17
18
|
tslib_1.__extends(GanttTaskComponent, _super);
|
|
18
|
-
function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr
|
|
19
|
+
function GanttTaskComponent(editService, touchEnabled, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
19
20
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
20
21
|
_this.editService = editService;
|
|
22
|
+
_this.touchEnabled = touchEnabled;
|
|
21
23
|
return _this;
|
|
22
24
|
}
|
|
23
25
|
GanttTaskComponent_1 = GanttTaskComponent;
|
|
@@ -43,14 +45,14 @@ var GanttTaskComponent = /** @class */ (function (_super) {
|
|
|
43
45
|
useExisting: forwardRef(function () { return GanttTaskComponent_1; })
|
|
44
46
|
}
|
|
45
47
|
],
|
|
46
|
-
template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [
|
|
48
|
+
template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <ng-container *ngIf=\"!taskTemplate\">\n <div\n class=\"k-task-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n <div class=\"k-task-content\">\n <div class=\"k-task-template\">\n <ng-container *ngIf=\"!taskContentTemplate; else taskContent\">\n {{ mapper.extractFromTask(dataItem, 'title') }}\n </ng-container>\n <ng-template\n #taskContent\n [ngTemplateOutlet]=\"taskContentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"\n >\n </ng-template>\n </div>\n <span class=\"k-task-actions\">\n <span\n (click)=\"onTaskDelete()\"\n class=\"k-link k-task-delete\">\n <span class=\"k-icon k-i-close\"></span>\n </span>\n </span>\n </div>\n </ng-container>\n <ng-template\n *ngIf=\"taskTemplate\"\n [ngTemplateOutlet]=\"taskTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n <ng-container *ngIf=\"renderDependencyDragClues\">\n <div\n class=\"k-task-dot k-task-start k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n <div\n class=\"k-task-dot k-task-end k-touch-action-none\"\n [class.k-display-block]=\"touchEnabled\"\n >\n </div>\n </ng-container>\n "
|
|
47
49
|
}),
|
|
48
|
-
tslib_1.
|
|
50
|
+
tslib_1.__param(1, Inject(TOUCH_ENABLED)),
|
|
51
|
+
tslib_1.__metadata("design:paramtypes", [EditService, Boolean, MappingService,
|
|
49
52
|
TimelineViewService,
|
|
50
53
|
DependencyDomService,
|
|
51
54
|
OptionChangesService,
|
|
52
|
-
ChangeDetectorRef
|
|
53
|
-
EditService])
|
|
55
|
+
ChangeDetectorRef])
|
|
54
56
|
], GanttTaskComponent);
|
|
55
57
|
return GanttTaskComponent;
|
|
56
58
|
}(GanttTaskBase));
|
|
@@ -67,10 +67,14 @@ var GanttTasksTableBodyComponent = /** @class */ (function () {
|
|
|
67
67
|
Input(),
|
|
68
68
|
tslib_1.__metadata("design:type", Function)
|
|
69
69
|
], GanttTasksTableBodyComponent.prototype, "isTaskSelected", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
Input(),
|
|
72
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
73
|
+
], GanttTasksTableBodyComponent.prototype, "renderDependencyDragClues", void 0);
|
|
70
74
|
GanttTasksTableBodyComponent = tslib_1.__decorate([
|
|
71
75
|
Component({
|
|
72
76
|
selector: '[kendoGanttTasksTableBody]',
|
|
73
|
-
template: "\n <tr #timelineRow *ngFor=\"let item of rows; let index = index\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"hasChildren(item)\"\n [dataItem]=\"item\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!hasChildren(item)\"\n [dataItem]=\"item\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
|
|
77
|
+
template: "\n <tr #timelineRow *ngFor=\"let item of rows; let index = index\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [attr.data-task-index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"hasChildren(item)\"\n [dataItem]=\"item\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [attr.data-task-index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!hasChildren(item)\"\n [dataItem]=\"item\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [attr.data-task-index]=\"index\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
|
|
74
78
|
}),
|
|
75
79
|
tslib_1.__metadata("design:paramtypes", [DependencyDomService,
|
|
76
80
|
MappingService])
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export var ScrollDirection;
|
|
9
|
+
(function (ScrollDirection) {
|
|
10
|
+
ScrollDirection[ScrollDirection["Backwards"] = -1] = "Backwards";
|
|
11
|
+
ScrollDirection[ScrollDirection["Forward"] = 1] = "Forward";
|
|
12
|
+
})(ScrollDirection || (ScrollDirection = {}));
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export var ScrollAxis;
|
|
17
|
+
(function (ScrollAxis) {
|
|
18
|
+
ScrollAxis["Vertical"] = "scrollTop";
|
|
19
|
+
ScrollAxis["Horizontal"] = "scrollLeft";
|
|
20
|
+
})(ScrollAxis || (ScrollAxis = {}));
|
|
@@ -0,0 +1,89 @@
|
|
|
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, ElementRef, Input, NgZone } from '@angular/core';
|
|
7
|
+
import { Subscription } from 'rxjs';
|
|
8
|
+
import { isPresent } from '../utils';
|
|
9
|
+
import { ScrollAxis, ScrollDirection } from './drag-scroll-settings';
|
|
10
|
+
import { TimelineScrollService } from './timeline-scroll.service';
|
|
11
|
+
import { getViewportBoundaries, scrollElement } from './utils';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
var TimelineScrollableDirective = /** @class */ (function () {
|
|
16
|
+
function TimelineScrollableDirective(timelineScrollableContainer, scrollService, zone) {
|
|
17
|
+
this.timelineScrollableContainer = timelineScrollableContainer;
|
|
18
|
+
this.scrollService = scrollService;
|
|
19
|
+
this.zone = zone;
|
|
20
|
+
this.subscriptions = new Subscription();
|
|
21
|
+
this.subscriptions.add(this.scrollService.horizontalScroll
|
|
22
|
+
.subscribe(this.scrollHorizontallyTo.bind(this)));
|
|
23
|
+
this.subscriptions.add(this.scrollService.verticalScroll
|
|
24
|
+
.subscribe(this.scrollVerticallyTo.bind(this)));
|
|
25
|
+
this.subscriptions.add(this.scrollService.scrollCancel
|
|
26
|
+
.subscribe(this.cancelScroll.bind(this)));
|
|
27
|
+
}
|
|
28
|
+
TimelineScrollableDirective.prototype.ngOnDestroy = function () {
|
|
29
|
+
this.subscriptions.unsubscribe();
|
|
30
|
+
};
|
|
31
|
+
TimelineScrollableDirective.prototype.scrollHorizontallyTo = function (left) {
|
|
32
|
+
var _this = this;
|
|
33
|
+
this.zone.runOutsideAngular(function () {
|
|
34
|
+
var container = _this.timelineScrollableContainer.nativeElement;
|
|
35
|
+
var visibleBoundaries = getViewportBoundaries(container);
|
|
36
|
+
if (left < visibleBoundaries.left + _this.scrollSettings.threshold) {
|
|
37
|
+
_this.horizontalScrollInterval = setInterval(function () {
|
|
38
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Horizontal);
|
|
39
|
+
}, _this.scrollSettings.interval);
|
|
40
|
+
}
|
|
41
|
+
else if (left > visibleBoundaries.right - _this.scrollSettings.threshold) {
|
|
42
|
+
_this.horizontalScrollInterval = setInterval(function () {
|
|
43
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Horizontal);
|
|
44
|
+
}, _this.scrollSettings.interval);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
TimelineScrollableDirective.prototype.scrollVerticallyTo = function (top) {
|
|
49
|
+
var _this = this;
|
|
50
|
+
this.zone.runOutsideAngular(function () {
|
|
51
|
+
var container = _this.timelineScrollableContainer.nativeElement;
|
|
52
|
+
var visibleBoundaries = getViewportBoundaries(container);
|
|
53
|
+
if (top < visibleBoundaries.top + _this.scrollSettings.threshold) {
|
|
54
|
+
_this.verticalScrollInterval = setInterval(function () {
|
|
55
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Vertical);
|
|
56
|
+
}, _this.scrollSettings.interval);
|
|
57
|
+
}
|
|
58
|
+
else if (top > visibleBoundaries.bottom - _this.scrollSettings.threshold) {
|
|
59
|
+
_this.verticalScrollInterval = setInterval(function () {
|
|
60
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Vertical);
|
|
61
|
+
}, _this.scrollSettings.interval);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
TimelineScrollableDirective.prototype.cancelScroll = function () {
|
|
66
|
+
if (isPresent(this.verticalScrollInterval)) {
|
|
67
|
+
clearInterval(this.verticalScrollInterval);
|
|
68
|
+
this.verticalScrollInterval = null;
|
|
69
|
+
}
|
|
70
|
+
if (isPresent(this.horizontalScrollInterval)) {
|
|
71
|
+
clearInterval(this.horizontalScrollInterval);
|
|
72
|
+
this.horizontalScrollInterval = null;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
Input(),
|
|
77
|
+
tslib_1.__metadata("design:type", Object)
|
|
78
|
+
], TimelineScrollableDirective.prototype, "scrollSettings", void 0);
|
|
79
|
+
TimelineScrollableDirective = tslib_1.__decorate([
|
|
80
|
+
Directive({
|
|
81
|
+
selector: '[kendoGanttTimelineScrollable]'
|
|
82
|
+
}),
|
|
83
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
84
|
+
TimelineScrollService,
|
|
85
|
+
NgZone])
|
|
86
|
+
], TimelineScrollableDirective);
|
|
87
|
+
return TimelineScrollableDirective;
|
|
88
|
+
}());
|
|
89
|
+
export { TimelineScrollableDirective };
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*
|
|
11
|
+
* Notifies the timeline-scroll.directive to scroll into view to requested coordinates.
|
|
12
|
+
* The scrolling is performed based on client (viewport) coordinates.
|
|
13
|
+
*/
|
|
14
|
+
var TimelineScrollService = /** @class */ (function () {
|
|
15
|
+
function TimelineScrollService() {
|
|
16
|
+
this.horizontalScroll = new Subject();
|
|
17
|
+
this.verticalScroll = new Subject();
|
|
18
|
+
this.scrollCancel = new Subject();
|
|
19
|
+
}
|
|
20
|
+
TimelineScrollService.prototype.ngOnDestroy = function () {
|
|
21
|
+
this.horizontalScroll.complete();
|
|
22
|
+
this.verticalScroll.complete();
|
|
23
|
+
this.scrollCancel.complete();
|
|
24
|
+
};
|
|
25
|
+
TimelineScrollService.prototype.requestHorizontalScroll = function (clientTop) {
|
|
26
|
+
this.horizontalScroll.next(clientTop);
|
|
27
|
+
};
|
|
28
|
+
TimelineScrollService.prototype.requestVerticalScroll = function (clientLeft) {
|
|
29
|
+
this.verticalScroll.next(clientLeft);
|
|
30
|
+
};
|
|
31
|
+
TimelineScrollService.prototype.requestScrollCancel = function () {
|
|
32
|
+
this.scrollCancel.next();
|
|
33
|
+
};
|
|
34
|
+
TimelineScrollService = tslib_1.__decorate([
|
|
35
|
+
Injectable()
|
|
36
|
+
], TimelineScrollService);
|
|
37
|
+
return TimelineScrollService;
|
|
38
|
+
}());
|
|
39
|
+
export { TimelineScrollService };
|