@progress/kendo-angular-gantt 0.3.0-dev.202201111723 → 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 -10
- 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/{util.js → utils.js} +0 -0
- package/dist/es/gantt.component.js +125 -7
- package/dist/es/gantt.module.js +23 -6
- package/dist/es/index.js +4 -0
- package/dist/es/main.js +1 -0
- package/dist/es/models/events/dependency-add-event.interface.js +4 -0
- package/dist/es/models/view-item.interface.js +4 -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/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 +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/{util.d.ts → utils.d.ts} +0 -0
- package/dist/es2015/editing/{util.js → utils.js} +0 -0
- package/dist/es2015/gantt.component.d.ts +39 -3
- package/dist/es2015/gantt.component.js +117 -6
- package/dist/es2015/gantt.module.js +23 -6
- package/dist/es2015/index.d.ts +4 -0
- package/dist/es2015/index.js +4 -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/models.d.ts +2 -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/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/utils.d.ts +70 -8
- package/dist/es2015/utils.js +143 -12
- package/dist/fesm2015/index.js +1337 -372
- package/dist/fesm5/index.js +1206 -298
- 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/{util.js → utils.js} +0 -0
- package/dist/npm/gantt.component.js +127 -9
- package/dist/npm/gantt.module.js +22 -5
- package/dist/npm/index.js +8 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/models/events/dependency-add-event.interface.js +6 -0
- package/dist/npm/models/view-item.interface.js +6 -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/utils.js +143 -12
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +5 -4
package/dist/fesm5/index.js
CHANGED
|
@@ -3,25 +3,26 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { __extends, __decorate, __metadata, __param, __assign } from 'tslib';
|
|
6
|
-
import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, QueryList, ContentChildren, ContentChild, Component, forwardRef, SkipSelf, Host, Injector, NgZone,
|
|
6
|
+
import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, QueryList, ContentChildren, ContentChild, Component, forwardRef, SkipSelf, Host, Injector, NgZone, ViewChild, ElementRef, ViewContainerRef, HostBinding, Output, Renderer2, isDevMode, InjectionToken, Inject, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
7
7
|
import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
|
|
8
8
|
import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqual, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
|
|
9
9
|
import { of, fromEvent, Subject, Subscription, forkJoin, EMPTY, isObservable } from 'rxjs';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
-
import {
|
|
11
|
+
import { closestInScope, matchesClasses, isDocumentAvailable, anyChanged, hasObservers, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
|
|
12
|
+
import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
12
13
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
13
14
|
import { orderBy } from '@progress/kendo-data-query';
|
|
14
|
-
import { getter } from '@progress/kendo-common';
|
|
15
|
+
import { getter, touchEnabled } from '@progress/kendo-common';
|
|
15
16
|
import { map, distinctUntilChanged, take, expand, reduce, filter, switchMap } from 'rxjs/operators';
|
|
16
|
-
import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
|
+
import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule } from '@angular/forms';
|
|
18
19
|
import { SplitterModule, TabStripModule } from '@progress/kendo-angular-layout';
|
|
19
20
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
20
21
|
import { DialogModule } from '@progress/kendo-angular-dialog';
|
|
21
|
-
import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule } from '@angular/forms';
|
|
22
22
|
import { LabelModule } from '@progress/kendo-angular-label';
|
|
23
23
|
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
24
24
|
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
25
|
+
import { PopupService, PopupModule } from '@progress/kendo-angular-popup';
|
|
25
26
|
import { GridModule } from '@progress/kendo-angular-grid';
|
|
26
27
|
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
27
28
|
|
|
@@ -32,7 +33,7 @@ var packageMetadata = {
|
|
|
32
33
|
name: '@progress/kendo-angular-gantt',
|
|
33
34
|
productName: 'Kendo UI for Angular',
|
|
34
35
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
35
|
-
publishDate:
|
|
36
|
+
publishDate: 1642086647,
|
|
36
37
|
version: '',
|
|
37
38
|
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'
|
|
38
39
|
};
|
|
@@ -654,6 +655,64 @@ var taskClassCallback = function () { return null; };
|
|
|
654
655
|
*/
|
|
655
656
|
var isSelected = function () { return false; };
|
|
656
657
|
|
|
658
|
+
/**
|
|
659
|
+
* The dependency type when two tasks are connected.
|
|
660
|
+
*
|
|
661
|
+
* The supported values are:
|
|
662
|
+
* * `FF`—from 'finish' to 'finish'
|
|
663
|
+
* * `FS`—from 'finish' to 'start'
|
|
664
|
+
* * `SS`—from 'start' to 'start'
|
|
665
|
+
* * `SF`—from 'start' to 'finish'
|
|
666
|
+
*/
|
|
667
|
+
var DependencyType;
|
|
668
|
+
(function (DependencyType) {
|
|
669
|
+
DependencyType[DependencyType["FF"] = 0] = "FF";
|
|
670
|
+
DependencyType[DependencyType["FS"] = 1] = "FS";
|
|
671
|
+
DependencyType[DependencyType["SF"] = 2] = "SF";
|
|
672
|
+
DependencyType[DependencyType["SS"] = 3] = "SS"; // task B can't start before task A starts
|
|
673
|
+
})(DependencyType || (DependencyType = {}));
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* @hidden
|
|
677
|
+
*/
|
|
678
|
+
var PreventableEvent = /** @class */ (function () {
|
|
679
|
+
function PreventableEvent() {
|
|
680
|
+
this.prevented = false;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Prevents the default action for a specified event.
|
|
684
|
+
* In this way, the source component suppresses
|
|
685
|
+
* the built-in behavior that follows the event.
|
|
686
|
+
*/
|
|
687
|
+
PreventableEvent.prototype.preventDefault = function () {
|
|
688
|
+
this.prevented = true;
|
|
689
|
+
};
|
|
690
|
+
/**
|
|
691
|
+
* Returns `true` if the event was prevented
|
|
692
|
+
* by any of its subscribers.
|
|
693
|
+
*
|
|
694
|
+
* @returns `true` if the default action was prevented.
|
|
695
|
+
* Otherwise, returns `false`.
|
|
696
|
+
*/
|
|
697
|
+
PreventableEvent.prototype.isDefaultPrevented = function () {
|
|
698
|
+
return this.prevented;
|
|
699
|
+
};
|
|
700
|
+
return PreventableEvent;
|
|
701
|
+
}());
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Called every time a user leaves an edited cell.
|
|
705
|
+
*/
|
|
706
|
+
var CellCloseEvent = /** @class */ (function (_super) {
|
|
707
|
+
__extends(CellCloseEvent, _super);
|
|
708
|
+
function CellCloseEvent(options) {
|
|
709
|
+
var _this = _super.call(this) || this;
|
|
710
|
+
Object.assign(_this, options);
|
|
711
|
+
return _this;
|
|
712
|
+
}
|
|
713
|
+
return CellCloseEvent;
|
|
714
|
+
}(PreventableEvent));
|
|
715
|
+
|
|
657
716
|
/**
|
|
658
717
|
* @hidden
|
|
659
718
|
*/
|
|
@@ -756,15 +815,34 @@ var isNumber = function (contender) { return typeof contender === 'number' && !i
|
|
|
756
815
|
* @hidden
|
|
757
816
|
*/
|
|
758
817
|
var isString = function (contender) { return typeof contender === 'string'; };
|
|
818
|
+
/**
|
|
819
|
+
* @hidden
|
|
820
|
+
*
|
|
821
|
+
* Gets the closest timeline task wrapper element from an event target.
|
|
822
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
823
|
+
*/
|
|
824
|
+
var getClosestTaskWrapper = function (element, parentScope) {
|
|
825
|
+
return closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* @hidden
|
|
829
|
+
*
|
|
830
|
+
* Checks whether the queried item or its parent items has a `k-task-wrap` selector.
|
|
831
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
832
|
+
*/
|
|
833
|
+
var isTaskWrapper = function (contender, parentScope) {
|
|
834
|
+
var taskWrapper = closestInScope(contender, matchesClasses('k-task-wrap'), parentScope);
|
|
835
|
+
return isPresent(taskWrapper);
|
|
836
|
+
};
|
|
759
837
|
/**
|
|
760
838
|
* @hidden
|
|
761
839
|
*
|
|
762
840
|
* Gets the closest timeline task element index from an event target.
|
|
763
841
|
* Uses the `data-task-index` attribute assigned to each task.
|
|
764
|
-
* Restricts the search up to the provided
|
|
842
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
765
843
|
*/
|
|
766
|
-
var getClosestTaskIndex = function (element,
|
|
767
|
-
var task = closestInScope(element, matchesClasses('k-task'),
|
|
844
|
+
var getClosestTaskIndex = function (element, parentScope) {
|
|
845
|
+
var task = closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
|
|
768
846
|
if (!isPresent(task)) {
|
|
769
847
|
return null;
|
|
770
848
|
}
|
|
@@ -774,22 +852,133 @@ var getClosestTaskIndex = function (element, gantt) {
|
|
|
774
852
|
* @hidden
|
|
775
853
|
*
|
|
776
854
|
* Checks whether the queried item or its parent items has a `k-task` selector.
|
|
777
|
-
* Restricts the search up to the provided
|
|
855
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
778
856
|
*/
|
|
779
|
-
var isTask = function (contender,
|
|
780
|
-
var task = closestInScope(contender, matchesClasses('k-task'),
|
|
857
|
+
var isTask = function (contender, parentScope) {
|
|
858
|
+
var task = closestInScope(contender, matchesClasses('k-task'), parentScope);
|
|
781
859
|
return isPresent(task);
|
|
782
860
|
};
|
|
783
861
|
/**
|
|
784
862
|
* @hidden
|
|
785
863
|
*
|
|
786
864
|
* Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
|
|
787
|
-
* Restricts the search up to the provided
|
|
865
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
788
866
|
*/
|
|
789
|
-
var isClearButton = function (contender,
|
|
790
|
-
var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'),
|
|
867
|
+
var isClearButton = function (contender, parentScope) {
|
|
868
|
+
var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), parentScope);
|
|
791
869
|
return isPresent(clearButtonContainer);
|
|
792
870
|
};
|
|
871
|
+
/**
|
|
872
|
+
* @hidden
|
|
873
|
+
*
|
|
874
|
+
* Checks whether the queried item has a `k-task-dot` selector - used for the dependency drag clues.
|
|
875
|
+
*/
|
|
876
|
+
var isDependencyDragClue = function (element) {
|
|
877
|
+
if (!isPresent(element)) {
|
|
878
|
+
return false;
|
|
879
|
+
}
|
|
880
|
+
return element.classList.contains('k-task-dot');
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* @hidden
|
|
884
|
+
*
|
|
885
|
+
* Checks whether the queried item has a `k-task-dot` & `k-task-start` selector - used for the dependency drag start clues.
|
|
886
|
+
*/
|
|
887
|
+
var isDependencyDragStartClue = function (element) {
|
|
888
|
+
if (!isPresent(element)) {
|
|
889
|
+
return false;
|
|
890
|
+
}
|
|
891
|
+
return element.classList.contains('k-task-dot') && element.classList.contains('k-task-start');
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* @hidden
|
|
895
|
+
*
|
|
896
|
+
* Gets the `DependencyType` for an attempted dependency create from the provided two elements.
|
|
897
|
+
* The two linked drag clue HTML elements are used to extract this data (via their CSS classes).
|
|
898
|
+
*/
|
|
899
|
+
var getDependencyTypeFromTargetTasks = function (fromTaskClue, toTaskClue) {
|
|
900
|
+
if (!isDependencyDragClue(fromTaskClue) || !isDependencyDragClue(toTaskClue)) {
|
|
901
|
+
return null;
|
|
902
|
+
}
|
|
903
|
+
var fromTaskType = isDependencyDragStartClue(fromTaskClue) ? 'S' : 'F';
|
|
904
|
+
var toTaskType = isDependencyDragStartClue(toTaskClue) ? 'S' : 'F';
|
|
905
|
+
var dependencyTypeName = "" + fromTaskType + toTaskType;
|
|
906
|
+
switch (dependencyTypeName) {
|
|
907
|
+
case 'FF': return DependencyType.FF;
|
|
908
|
+
case 'FS': return DependencyType.FS;
|
|
909
|
+
case 'SF': return DependencyType.SF;
|
|
910
|
+
case 'SS': return DependencyType.SS;
|
|
911
|
+
default: return null;
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* @hidden
|
|
916
|
+
*
|
|
917
|
+
* Checks whether the two provided drag clues belong to the same task element.
|
|
918
|
+
*/
|
|
919
|
+
var sameTaskClues = function (fromTaskClue, toTaskClue, parentScope) {
|
|
920
|
+
if (!isPresent(fromTaskClue) || !isPresent(toTaskClue)) {
|
|
921
|
+
return false;
|
|
922
|
+
}
|
|
923
|
+
var fromTaskWrapper = getClosestTaskWrapper(fromTaskClue, parentScope);
|
|
924
|
+
var toTaskWrapper = getClosestTaskWrapper(toTaskClue, parentScope);
|
|
925
|
+
return fromTaskWrapper === toTaskWrapper;
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* @hidden
|
|
929
|
+
*
|
|
930
|
+
* Fits a contender number between a min and max range.
|
|
931
|
+
* If the contender is below the min value, the min value is returned.
|
|
932
|
+
* If the contender is above the max value, the max value is returned.
|
|
933
|
+
*/
|
|
934
|
+
var fitToRange = function (contender, min, max) {
|
|
935
|
+
if (contender > max) {
|
|
936
|
+
return max;
|
|
937
|
+
}
|
|
938
|
+
else if (contender < min) {
|
|
939
|
+
return min;
|
|
940
|
+
}
|
|
941
|
+
else {
|
|
942
|
+
return contender;
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* @hidden
|
|
947
|
+
*
|
|
948
|
+
* Checks whether either of the two provided tasks is a parent of the other.
|
|
949
|
+
*/
|
|
950
|
+
var areParentChild = function (taskA, taskB) {
|
|
951
|
+
var parentChildRelationship = false;
|
|
952
|
+
var taskAParent = taskA;
|
|
953
|
+
while (isPresent(taskAParent) && isPresent(taskAParent.data)) {
|
|
954
|
+
if (taskAParent.data === taskB.data) {
|
|
955
|
+
parentChildRelationship = true;
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
taskAParent = taskAParent.parent;
|
|
959
|
+
}
|
|
960
|
+
var taskBParent = taskB;
|
|
961
|
+
while (!parentChildRelationship && isPresent(taskBParent) && isPresent(taskBParent.data)) {
|
|
962
|
+
if (taskBParent.data === taskA.data) {
|
|
963
|
+
parentChildRelationship = true;
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
taskBParent = taskBParent.parent;
|
|
967
|
+
}
|
|
968
|
+
return parentChildRelationship;
|
|
969
|
+
};
|
|
970
|
+
/**
|
|
971
|
+
* @hidden
|
|
972
|
+
*
|
|
973
|
+
* Extracts an element from the provided client coords.
|
|
974
|
+
* Using the `event.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead.
|
|
975
|
+
*/
|
|
976
|
+
var elementFromPoint = function (clientX, clientY) {
|
|
977
|
+
if (!isDocumentAvailable()) {
|
|
978
|
+
return null;
|
|
979
|
+
}
|
|
980
|
+
return document.elementFromPoint(clientX, clientY);
|
|
981
|
+
};
|
|
793
982
|
|
|
794
983
|
/**
|
|
795
984
|
* @hidden
|
|
@@ -1489,6 +1678,57 @@ var EditService = /** @class */ (function () {
|
|
|
1489
1678
|
return EditService;
|
|
1490
1679
|
}());
|
|
1491
1680
|
|
|
1681
|
+
/**
|
|
1682
|
+
* @hidden
|
|
1683
|
+
*
|
|
1684
|
+
* Notifies the timeline-scroll.directive to scroll into view to requested coordinates.
|
|
1685
|
+
* The scrolling is performed based on client (viewport) coordinates.
|
|
1686
|
+
*/
|
|
1687
|
+
var TimelineScrollService = /** @class */ (function () {
|
|
1688
|
+
function TimelineScrollService() {
|
|
1689
|
+
this.horizontalScroll = new Subject();
|
|
1690
|
+
this.verticalScroll = new Subject();
|
|
1691
|
+
this.scrollCancel = new Subject();
|
|
1692
|
+
}
|
|
1693
|
+
TimelineScrollService.prototype.ngOnDestroy = function () {
|
|
1694
|
+
this.horizontalScroll.complete();
|
|
1695
|
+
this.verticalScroll.complete();
|
|
1696
|
+
this.scrollCancel.complete();
|
|
1697
|
+
};
|
|
1698
|
+
TimelineScrollService.prototype.requestHorizontalScroll = function (clientTop) {
|
|
1699
|
+
this.horizontalScroll.next(clientTop);
|
|
1700
|
+
};
|
|
1701
|
+
TimelineScrollService.prototype.requestVerticalScroll = function (clientLeft) {
|
|
1702
|
+
this.verticalScroll.next(clientLeft);
|
|
1703
|
+
};
|
|
1704
|
+
TimelineScrollService.prototype.requestScrollCancel = function () {
|
|
1705
|
+
this.scrollCancel.next();
|
|
1706
|
+
};
|
|
1707
|
+
TimelineScrollService = __decorate([
|
|
1708
|
+
Injectable()
|
|
1709
|
+
], TimelineScrollService);
|
|
1710
|
+
return TimelineScrollService;
|
|
1711
|
+
}());
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* @hidden
|
|
1715
|
+
*
|
|
1716
|
+
* Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
|
|
1717
|
+
*/
|
|
1718
|
+
var GanttLocalizationService = /** @class */ (function () {
|
|
1719
|
+
function GanttLocalizationService(localizationService) {
|
|
1720
|
+
this.localizationService = localizationService;
|
|
1721
|
+
}
|
|
1722
|
+
GanttLocalizationService.prototype.get = function (token) {
|
|
1723
|
+
return this.localizationService.get(token);
|
|
1724
|
+
};
|
|
1725
|
+
GanttLocalizationService = __decorate([
|
|
1726
|
+
Injectable(),
|
|
1727
|
+
__metadata("design:paramtypes", [LocalizationService])
|
|
1728
|
+
], GanttLocalizationService);
|
|
1729
|
+
return GanttLocalizationService;
|
|
1730
|
+
}());
|
|
1731
|
+
|
|
1492
1732
|
/**
|
|
1493
1733
|
* @hidden
|
|
1494
1734
|
*/
|
|
@@ -1755,69 +1995,216 @@ var ToolbarTemplateDirective = /** @class */ (function () {
|
|
|
1755
1995
|
}());
|
|
1756
1996
|
|
|
1757
1997
|
/**
|
|
1758
|
-
*
|
|
1998
|
+
* @hidden
|
|
1759
1999
|
*/
|
|
1760
|
-
var
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
*/
|
|
1765
|
-
function ViewBase(optionChangesService, dependencyDomService) {
|
|
1766
|
-
this.optionChangesService = optionChangesService;
|
|
2000
|
+
var GanttTimelineComponent = /** @class */ (function () {
|
|
2001
|
+
function GanttTimelineComponent(scrollSyncService, dependencyDomService, renderer, zone) {
|
|
2002
|
+
var _this = this;
|
|
2003
|
+
this.scrollSyncService = scrollSyncService;
|
|
1767
2004
|
this.dependencyDomService = dependencyDomService;
|
|
2005
|
+
this.renderer = renderer;
|
|
2006
|
+
this.zone = zone;
|
|
2007
|
+
this.hostClass = true;
|
|
2008
|
+
this.dependencies = [];
|
|
2009
|
+
// as all drag-and-drop operations are on the timeline container, use a single draggable instance
|
|
2010
|
+
this.timelineContainerPress = new EventEmitter();
|
|
2011
|
+
this.timelineContainerDrag = new EventEmitter();
|
|
2012
|
+
this.timelineContainerRelease = new EventEmitter();
|
|
2013
|
+
this.subscriptions = new Subscription();
|
|
2014
|
+
this.subscriptions.add(
|
|
2015
|
+
// task changes indicates change in row content, number, height, etc.
|
|
2016
|
+
this.dependencyDomService.taskChanges
|
|
2017
|
+
.pipe(filter(function (args) { return isPresent(args.timelineRow); }), switchMap(function (args) { return _this.zone.onStable.pipe(take(1), map(function () { return args; })); }) // ensure the content is rendered
|
|
2018
|
+
)
|
|
2019
|
+
.subscribe(function (_a) {
|
|
2020
|
+
var timelineRow = _a.timelineRow;
|
|
2021
|
+
var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
|
|
2022
|
+
_this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
|
|
2023
|
+
}));
|
|
2024
|
+
}
|
|
2025
|
+
Object.defineProperty(GanttTimelineComponent.prototype, "draggableEnabled", {
|
|
1768
2026
|
/**
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
* @default 100
|
|
2027
|
+
* Specifies whether the draggable will attach or detach its pointer event listeners.
|
|
1772
2028
|
*/
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
2029
|
+
get: function () {
|
|
2030
|
+
return this.renderDependencyDragClues;
|
|
2031
|
+
},
|
|
2032
|
+
enumerable: true,
|
|
2033
|
+
configurable: true
|
|
2034
|
+
});
|
|
2035
|
+
GanttTimelineComponent.prototype.ngAfterViewInit = function () {
|
|
2036
|
+
var timelineHeader = this.timelineHeaderWrap.nativeElement;
|
|
2037
|
+
var rightContainer = this.timelineContent.nativeElement;
|
|
2038
|
+
this.scrollSyncService.registerElement(rightContainer, 'timeline');
|
|
2039
|
+
this.scrollSyncService.registerElement(timelineHeader, 'header');
|
|
2040
|
+
this.dependencyDomService.registerContentContainer(this.tasksContainer.nativeElement);
|
|
2041
|
+
};
|
|
2042
|
+
GanttTimelineComponent.prototype.ngOnDestroy = function () {
|
|
2043
|
+
this.subscriptions.unsubscribe();
|
|
1780
2044
|
};
|
|
2045
|
+
GanttTimelineComponent.prototype.isNonWorking = function (item) {
|
|
2046
|
+
return item.hasOwnProperty('isWorking') && !item.isWorking;
|
|
2047
|
+
};
|
|
2048
|
+
__decorate([
|
|
2049
|
+
ViewChild('timelineContent', { static: true }),
|
|
2050
|
+
__metadata("design:type", ElementRef)
|
|
2051
|
+
], GanttTimelineComponent.prototype, "timelineContent", void 0);
|
|
2052
|
+
__decorate([
|
|
2053
|
+
ViewChild('timelineColumns', { static: true }),
|
|
2054
|
+
__metadata("design:type", ElementRef)
|
|
2055
|
+
], GanttTimelineComponent.prototype, "timelineColumns", void 0);
|
|
2056
|
+
__decorate([
|
|
2057
|
+
ViewChild('timelineHeaderWrap', { static: true }),
|
|
2058
|
+
__metadata("design:type", ElementRef)
|
|
2059
|
+
], GanttTimelineComponent.prototype, "timelineHeaderWrap", void 0);
|
|
2060
|
+
__decorate([
|
|
2061
|
+
ViewChild('tasksContainer', { static: true }),
|
|
2062
|
+
__metadata("design:type", ElementRef)
|
|
2063
|
+
], GanttTimelineComponent.prototype, "tasksContainer", void 0);
|
|
2064
|
+
__decorate([
|
|
2065
|
+
ViewChild('dragPopupContainer', { static: false, read: ViewContainerRef }),
|
|
2066
|
+
__metadata("design:type", ViewContainerRef)
|
|
2067
|
+
], GanttTimelineComponent.prototype, "dragPopupContainer", void 0);
|
|
2068
|
+
__decorate([
|
|
2069
|
+
ViewChild('dependencyDragCreatePolyline', { static: false }),
|
|
2070
|
+
__metadata("design:type", ElementRef)
|
|
2071
|
+
], GanttTimelineComponent.prototype, "dependencyDragCreatePolyline", void 0);
|
|
2072
|
+
__decorate([
|
|
2073
|
+
HostBinding('class.k-gantt-timeline'),
|
|
2074
|
+
__metadata("design:type", Boolean)
|
|
2075
|
+
], GanttTimelineComponent.prototype, "hostClass", void 0);
|
|
2076
|
+
__decorate([
|
|
2077
|
+
Input(),
|
|
2078
|
+
__metadata("design:type", Array)
|
|
2079
|
+
], GanttTimelineComponent.prototype, "rows", void 0);
|
|
2080
|
+
__decorate([
|
|
2081
|
+
Input(),
|
|
2082
|
+
__metadata("design:type", Array)
|
|
2083
|
+
], GanttTimelineComponent.prototype, "slots", void 0);
|
|
2084
|
+
__decorate([
|
|
2085
|
+
Input(),
|
|
2086
|
+
__metadata("design:type", Array)
|
|
2087
|
+
], GanttTimelineComponent.prototype, "groupSlots", void 0);
|
|
1781
2088
|
__decorate([
|
|
1782
2089
|
Input(),
|
|
1783
2090
|
__metadata("design:type", Number)
|
|
1784
|
-
],
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
2091
|
+
], GanttTimelineComponent.prototype, "tableWidth", void 0);
|
|
2092
|
+
__decorate([
|
|
2093
|
+
Input(),
|
|
2094
|
+
__metadata("design:type", String)
|
|
2095
|
+
], GanttTimelineComponent.prototype, "activeView", void 0);
|
|
2096
|
+
__decorate([
|
|
2097
|
+
Input(),
|
|
2098
|
+
__metadata("design:type", TemplateRef)
|
|
2099
|
+
], GanttTimelineComponent.prototype, "taskContentTemplate", void 0);
|
|
2100
|
+
__decorate([
|
|
2101
|
+
Input(),
|
|
2102
|
+
__metadata("design:type", TemplateRef)
|
|
2103
|
+
], GanttTimelineComponent.prototype, "taskTemplate", void 0);
|
|
2104
|
+
__decorate([
|
|
2105
|
+
Input(),
|
|
2106
|
+
__metadata("design:type", TemplateRef)
|
|
2107
|
+
], GanttTimelineComponent.prototype, "summaryTaskTemplate", void 0);
|
|
2108
|
+
__decorate([
|
|
2109
|
+
Input(),
|
|
2110
|
+
__metadata("design:type", Function)
|
|
2111
|
+
], GanttTimelineComponent.prototype, "taskClass", void 0);
|
|
2112
|
+
__decorate([
|
|
2113
|
+
Input(),
|
|
2114
|
+
__metadata("design:type", Function)
|
|
2115
|
+
], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
|
|
2116
|
+
__decorate([
|
|
2117
|
+
Input(),
|
|
2118
|
+
__metadata("design:type", Boolean)
|
|
2119
|
+
], GanttTimelineComponent.prototype, "renderDependencyDragClues", void 0);
|
|
2120
|
+
__decorate([
|
|
2121
|
+
Input(),
|
|
2122
|
+
__metadata("design:type", Object)
|
|
2123
|
+
], GanttTimelineComponent.prototype, "dragScrollSettings", void 0);
|
|
2124
|
+
__decorate([
|
|
2125
|
+
Input(),
|
|
2126
|
+
__metadata("design:type", Function)
|
|
2127
|
+
], GanttTimelineComponent.prototype, "hasChildren", void 0);
|
|
2128
|
+
__decorate([
|
|
2129
|
+
Input(),
|
|
2130
|
+
__metadata("design:type", Array)
|
|
2131
|
+
], GanttTimelineComponent.prototype, "dependencies", void 0);
|
|
2132
|
+
__decorate([
|
|
2133
|
+
Output(),
|
|
2134
|
+
__metadata("design:type", EventEmitter)
|
|
2135
|
+
], GanttTimelineComponent.prototype, "timelineContainerPress", void 0);
|
|
2136
|
+
__decorate([
|
|
2137
|
+
Output(),
|
|
2138
|
+
__metadata("design:type", EventEmitter)
|
|
2139
|
+
], GanttTimelineComponent.prototype, "timelineContainerDrag", void 0);
|
|
2140
|
+
__decorate([
|
|
2141
|
+
Output(),
|
|
2142
|
+
__metadata("design:type", EventEmitter)
|
|
2143
|
+
], GanttTimelineComponent.prototype, "timelineContainerRelease", void 0);
|
|
2144
|
+
GanttTimelineComponent = __decorate([
|
|
2145
|
+
Component({
|
|
2146
|
+
selector: 'kendo-gantt-timeline',
|
|
2147
|
+
template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <div\n #timelineContent\n class=\"k-grid-content\"\n kendoGanttTimelineScrollable\n [scrollSettings]=\"dragScrollSettings\"\n kendoDraggable\n [enableDrag]=\"draggableEnabled\"\n (kendoPress)=\"timelineContainerPress.emit($event)\"\n (kendoDrag)=\"timelineContainerDrag.emit($event)\"\n (kendoRelease)=\"timelineContainerRelease.emit($event)\"\n >\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n <polyline #dependencyDragCreatePolyline />\n </svg>\n\n <!-- placeholder for the dependency drag popup; its position is not arbitrary - the popup is intended to be absolutely positioned inside the .k-grid-content element -->\n <ng-container #dragPopupContainer></ng-container>\n </div>\n </div>\n "
|
|
2148
|
+
}),
|
|
2149
|
+
__metadata("design:paramtypes", [ScrollSyncService,
|
|
2150
|
+
DependencyDomService,
|
|
2151
|
+
Renderer2,
|
|
2152
|
+
NgZone])
|
|
2153
|
+
], GanttTimelineComponent);
|
|
2154
|
+
return GanttTimelineComponent;
|
|
2155
|
+
}());
|
|
1799
2156
|
|
|
1800
2157
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
* Needed to keep the Gantt's LocalizationService reference and be able to use it component's inside the TabStrip
|
|
2158
|
+
* The base class for the column components of the Gantt.
|
|
1804
2159
|
*/
|
|
1805
|
-
var
|
|
1806
|
-
|
|
1807
|
-
|
|
2160
|
+
var ViewBase = /** @class */ (function () {
|
|
2161
|
+
/**
|
|
2162
|
+
*
|
|
2163
|
+
* @hidden
|
|
2164
|
+
*/
|
|
2165
|
+
function ViewBase(optionChangesService, dependencyDomService) {
|
|
2166
|
+
this.optionChangesService = optionChangesService;
|
|
2167
|
+
this.dependencyDomService = dependencyDomService;
|
|
2168
|
+
/**
|
|
2169
|
+
* The width of the time slot headers. Values are treated as pixels.
|
|
2170
|
+
*
|
|
2171
|
+
* @default 100
|
|
2172
|
+
*/
|
|
2173
|
+
this.slotWidth = 100;
|
|
1808
2174
|
}
|
|
1809
|
-
|
|
1810
|
-
|
|
2175
|
+
ViewBase.prototype.ngOnChanges = function (changes) {
|
|
2176
|
+
if (anyChanged(['slotWidth'], changes)) {
|
|
2177
|
+
this.optionChangesService.notifyColumnChanges();
|
|
2178
|
+
this.dependencyDomService.notifyChanges();
|
|
2179
|
+
}
|
|
1811
2180
|
};
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
__metadata("design:
|
|
1815
|
-
],
|
|
1816
|
-
return
|
|
2181
|
+
__decorate([
|
|
2182
|
+
Input(),
|
|
2183
|
+
__metadata("design:type", Number)
|
|
2184
|
+
], ViewBase.prototype, "slotWidth", void 0);
|
|
2185
|
+
return ViewBase;
|
|
1817
2186
|
}());
|
|
1818
2187
|
|
|
2188
|
+
/**
|
|
2189
|
+
* @hidden
|
|
2190
|
+
*/
|
|
2191
|
+
var getEditItem = function (dataItem, data, mapper) {
|
|
2192
|
+
var treeListDataItem = data.find(function (item) { return mapper.extractFromTask(item.data, 'id') === mapper.extractFromTask(dataItem, 'id'); });
|
|
2193
|
+
return mapPath(treeListDataItem);
|
|
2194
|
+
};
|
|
2195
|
+
var mapPath = function (item) { return ({
|
|
2196
|
+
dataItem: item.data,
|
|
2197
|
+
parent: item.parent.data ? mapPath(item.parent) : null
|
|
2198
|
+
}); };
|
|
2199
|
+
|
|
1819
2200
|
var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
|
|
1820
2201
|
var DEFAULT_VIEW = 'week';
|
|
2202
|
+
var DEFAULT_DRAG_SCROLL_SETTINGS = {
|
|
2203
|
+
enabled: true,
|
|
2204
|
+
step: 3,
|
|
2205
|
+
interval: 1,
|
|
2206
|
+
threshold: 10
|
|
2207
|
+
};
|
|
1821
2208
|
/**
|
|
1822
2209
|
* Represents the Kendo UI Gantt component for Angular.
|
|
1823
2210
|
*
|
|
@@ -1904,11 +2291,22 @@ var GanttComponent = /** @class */ (function () {
|
|
|
1904
2291
|
this.zone = zone;
|
|
1905
2292
|
this.hostClasses = true;
|
|
1906
2293
|
/**
|
|
1907
|
-
*
|
|
2294
|
+
* Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
1908
2295
|
*
|
|
1909
2296
|
* > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
1910
2297
|
*/
|
|
1911
2298
|
this.isSelected = isSelected;
|
|
2299
|
+
/**
|
|
2300
|
+
* Specifies a callback that determines if a new dependency is valid.
|
|
2301
|
+
* Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
|
|
2302
|
+
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
|
|
2303
|
+
*
|
|
2304
|
+
* By defalut, dependencies are deemed invalid when:
|
|
2305
|
+
* - The two tasks are in a parent-child relationship.
|
|
2306
|
+
* - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
|
|
2307
|
+
* - The start or end times of the two tasks are incompatible with the attempted dependency type.
|
|
2308
|
+
*/
|
|
2309
|
+
this.validateNewDependency = this.defaultValidateNewDependencyCallback.bind(this);
|
|
1912
2310
|
/**
|
|
1913
2311
|
* Fires when the Gantt selection is changed through user interaction.
|
|
1914
2312
|
*
|
|
@@ -2029,6 +2427,11 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2029
2427
|
* Fires when the user adds a task.
|
|
2030
2428
|
*/
|
|
2031
2429
|
this.taskAdd = new EventEmitter();
|
|
2430
|
+
/**
|
|
2431
|
+
* Fires when the user adds a dependency via dragging
|
|
2432
|
+
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
|
|
2433
|
+
*/
|
|
2434
|
+
this.dependencyAdd = new EventEmitter();
|
|
2032
2435
|
/**
|
|
2033
2436
|
* Fires when the sorting of the Gantt is changed.
|
|
2034
2437
|
* You have to handle the event yourself and sort the data.
|
|
@@ -2085,6 +2488,15 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2085
2488
|
* Fires when a task is clicked.
|
|
2086
2489
|
*/
|
|
2087
2490
|
this.taskClick = new EventEmitter();
|
|
2491
|
+
/**
|
|
2492
|
+
* @hidden
|
|
2493
|
+
*
|
|
2494
|
+
* Specifies whether the dependency drag clues will be rendered.
|
|
2495
|
+
* Set internally by the dependency-drag-create directive.
|
|
2496
|
+
*
|
|
2497
|
+
* @default false
|
|
2498
|
+
*/
|
|
2499
|
+
this.renderDependencyDragClues = false;
|
|
2088
2500
|
/**
|
|
2089
2501
|
* @hidden
|
|
2090
2502
|
*
|
|
@@ -2101,6 +2513,7 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2101
2513
|
this.showConfirmationDialog = false;
|
|
2102
2514
|
this._columns = new QueryList();
|
|
2103
2515
|
this._data = [];
|
|
2516
|
+
this._dragScrollSettings = __assign({}, DEFAULT_DRAG_SCROLL_SETTINGS);
|
|
2104
2517
|
this._timelinePaneOptions = __assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
|
|
2105
2518
|
this._treeListPaneOptions = __assign({}, DEFAULT_TREELIST_PANE_SETTINGS);
|
|
2106
2519
|
this._rowClass = rowClassCallback;
|
|
@@ -2379,6 +2792,21 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2379
2792
|
enumerable: true,
|
|
2380
2793
|
configurable: true
|
|
2381
2794
|
});
|
|
2795
|
+
Object.defineProperty(GanttComponent.prototype, "dragScrollSettings", {
|
|
2796
|
+
get: function () {
|
|
2797
|
+
return this._dragScrollSettings;
|
|
2798
|
+
},
|
|
2799
|
+
/**
|
|
2800
|
+
* Specifies the settings for auto-scrolling during dragging
|
|
2801
|
+
* when the pointer moves outside of the container bounderies
|
|
2802
|
+
* [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-auto-scrolling).
|
|
2803
|
+
*/
|
|
2804
|
+
set: function (settings) {
|
|
2805
|
+
this._dragScrollSettings = __assign({}, DEFAULT_DRAG_SCROLL_SETTINGS, settings);
|
|
2806
|
+
},
|
|
2807
|
+
enumerable: true,
|
|
2808
|
+
configurable: true
|
|
2809
|
+
});
|
|
2382
2810
|
Object.defineProperty(GanttComponent.prototype, "renderedTreeListItems", {
|
|
2383
2811
|
/**
|
|
2384
2812
|
* @hidden
|
|
@@ -2837,11 +3265,65 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2837
3265
|
var loadedItems = this.renderedTreeListItems || [];
|
|
2838
3266
|
return loadedItems.find(isSelectedCallback);
|
|
2839
3267
|
};
|
|
3268
|
+
GanttComponent.prototype.defaultValidateNewDependencyCallback = function (dependency) {
|
|
3269
|
+
var _this = this;
|
|
3270
|
+
var fromTaskId = this.mapper.extractFromDependency(dependency, 'fromId');
|
|
3271
|
+
var toTaskId = this.mapper.extractFromDependency(dependency, 'toId');
|
|
3272
|
+
var fromTask = this.treeList.view.data.find(function (task) {
|
|
3273
|
+
return _this.mapper.extractFromTask(task.data, 'id') === fromTaskId;
|
|
3274
|
+
});
|
|
3275
|
+
var toTask = this.treeList.view.data.find(function (task) {
|
|
3276
|
+
return _this.mapper.extractFromTask(task.data, 'id') === toTaskId;
|
|
3277
|
+
});
|
|
3278
|
+
// mark as invalid if the attempted dependency is lacking valid from- and to-tasks
|
|
3279
|
+
// or when the from- and to-tasks are actually the same task
|
|
3280
|
+
if (!isPresent(fromTask) || !isPresent(fromTask.data) ||
|
|
3281
|
+
!isPresent(toTask) || !isPresent(toTask.data) ||
|
|
3282
|
+
fromTask.data === toTask.data) {
|
|
3283
|
+
return false;
|
|
3284
|
+
}
|
|
3285
|
+
var tasksDependentOnOneAnother = this.dependencies.some(function (current) {
|
|
3286
|
+
var currentFromId = _this.mapper.extractFromDependency(current, 'fromId');
|
|
3287
|
+
var currentToId = _this.mapper.extractFromDependency(current, 'toId');
|
|
3288
|
+
return (fromTaskId === currentFromId && toTaskId === currentToId) ||
|
|
3289
|
+
(toTaskId === currentFromId && fromTaskId === currentToId);
|
|
3290
|
+
});
|
|
3291
|
+
// mark as invalid if the attempted dependency is trying to connect already dependent tasks
|
|
3292
|
+
// mark as invalid if the two tasks are in parent-child relationship
|
|
3293
|
+
if (tasksDependentOnOneAnother || areParentChild(fromTask, toTask)) {
|
|
3294
|
+
return false;
|
|
3295
|
+
}
|
|
3296
|
+
var fromTaskStart = this.mapper.extractFromTask(fromTask.data, 'start');
|
|
3297
|
+
var fromTaskEnd = this.mapper.extractFromTask(fromTask.data, 'end');
|
|
3298
|
+
var toTaskStart = this.mapper.extractFromTask(toTask.data, 'start');
|
|
3299
|
+
var toTaskEnd = this.mapper.extractFromTask(toTask.data, 'end');
|
|
3300
|
+
// if the two tasks are available to be connected via a dependency,
|
|
3301
|
+
// check if their start and end time allow for the attempted dependency type
|
|
3302
|
+
switch (this.mapper.extractFromDependency(dependency, 'type')) {
|
|
3303
|
+
// finish to finish (FF) — the from-task ends before the to-task can end
|
|
3304
|
+
case DependencyType.FF:
|
|
3305
|
+
return fromTaskEnd <= toTaskEnd;
|
|
3306
|
+
// finish to start (FS) — the from-task ends before the to-task can begin
|
|
3307
|
+
case DependencyType.FS:
|
|
3308
|
+
return fromTaskEnd <= toTaskStart;
|
|
3309
|
+
// start to finish (SF) — the from-task begins before the to-task can end
|
|
3310
|
+
case DependencyType.SF:
|
|
3311
|
+
return fromTaskStart <= toTaskEnd;
|
|
3312
|
+
// start to start (SS) — the from-task begins before the to-task can begin
|
|
3313
|
+
case DependencyType.SS:
|
|
3314
|
+
return fromTaskStart <= toTaskStart;
|
|
3315
|
+
default: return false;
|
|
3316
|
+
}
|
|
3317
|
+
};
|
|
2840
3318
|
var GanttComponent_1;
|
|
2841
3319
|
__decorate([
|
|
2842
3320
|
ViewChild(TreeListComponent, { static: true }),
|
|
2843
3321
|
__metadata("design:type", TreeListComponent)
|
|
2844
3322
|
], GanttComponent.prototype, "treeList", void 0);
|
|
3323
|
+
__decorate([
|
|
3324
|
+
ViewChild(GanttTimelineComponent, { static: false }),
|
|
3325
|
+
__metadata("design:type", GanttTimelineComponent)
|
|
3326
|
+
], GanttComponent.prototype, "timeline", void 0);
|
|
2845
3327
|
__decorate([
|
|
2846
3328
|
ContentChild(GanttTaskContentTemplateDirective, { static: true }),
|
|
2847
3329
|
__metadata("design:type", GanttTaskContentTemplateDirective)
|
|
@@ -2900,6 +3382,10 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2900
3382
|
Input(),
|
|
2901
3383
|
__metadata("design:type", Function)
|
|
2902
3384
|
], GanttComponent.prototype, "isSelected", void 0);
|
|
3385
|
+
__decorate([
|
|
3386
|
+
Input(),
|
|
3387
|
+
__metadata("design:type", Function)
|
|
3388
|
+
], GanttComponent.prototype, "validateNewDependency", void 0);
|
|
2903
3389
|
__decorate([
|
|
2904
3390
|
Output(),
|
|
2905
3391
|
__metadata("design:type", EventEmitter)
|
|
@@ -2999,6 +3485,11 @@ var GanttComponent = /** @class */ (function () {
|
|
|
2999
3485
|
Input(),
|
|
3000
3486
|
__metadata("design:type", Boolean)
|
|
3001
3487
|
], GanttComponent.prototype, "columnsResizable", void 0);
|
|
3488
|
+
__decorate([
|
|
3489
|
+
Input(),
|
|
3490
|
+
__metadata("design:type", Object),
|
|
3491
|
+
__metadata("design:paramtypes", [Object])
|
|
3492
|
+
], GanttComponent.prototype, "dragScrollSettings", null);
|
|
3002
3493
|
__decorate([
|
|
3003
3494
|
Output(),
|
|
3004
3495
|
__metadata("design:type", EventEmitter)
|
|
@@ -3039,6 +3530,10 @@ var GanttComponent = /** @class */ (function () {
|
|
|
3039
3530
|
Output(),
|
|
3040
3531
|
__metadata("design:type", EventEmitter)
|
|
3041
3532
|
], GanttComponent.prototype, "taskAdd", void 0);
|
|
3533
|
+
__decorate([
|
|
3534
|
+
Output(),
|
|
3535
|
+
__metadata("design:type", EventEmitter)
|
|
3536
|
+
], GanttComponent.prototype, "dependencyAdd", void 0);
|
|
3042
3537
|
__decorate([
|
|
3043
3538
|
Output(),
|
|
3044
3539
|
__metadata("design:type", EventEmitter)
|
|
@@ -3114,9 +3609,10 @@ var GanttComponent = /** @class */ (function () {
|
|
|
3114
3609
|
DependencyDomService,
|
|
3115
3610
|
MappingService,
|
|
3116
3611
|
OptionChangesService,
|
|
3117
|
-
EditService
|
|
3612
|
+
EditService,
|
|
3613
|
+
TimelineScrollService
|
|
3118
3614
|
],
|
|
3119
|
-
template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskEditingGeneralTabTitle=\"kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip\"\n taskEditingGeneralTabTitle=\"General\"\n\n i18n-taskEditingPredecessorsTabTitle=\"kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip\"\n taskEditingPredecessorsTabTitle=\"Predecessors\"\n\n i18n-taskEditingSuccessorsTabTitle=\"kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip\"\n taskEditingSuccessorsTabTitle=\"Successors\"\n\n i18n-taskEditingDependenciesAddButtonText=\"kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesAddButtonText=\"Add\"\n\n i18n-taskEditingDependenciesRemoveButtonText=\"kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesRemoveButtonText=\"Remove\"\n\n i18n-taskEditingDependenciesGridNameColumnTitle=\"kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridNameColumnTitle=\"Task Title\"\n\n i18n-taskEditingDependenciesGridTypeColumnTitle=\"kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridTypeColumnTitle=\"Type\"\n\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-addTaskText=\"kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component\"\n addTaskText=\"Add Task\"\n\n i18n-addChildText=\"kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component\"\n addChildText=\"Add Child\"\n\n i18n-addAboveText=\"kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component\"\n addAboveText=\"Add Above\"\n\n i18n-addBelowText=\"kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component\"\n addBelowText=\"Add Below\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [isSelected]=\"isSelected\"\n [selectable]=\"selectable\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (selectionChange)=\"handleTreeListSelectionChange($event)\"\n (cellClick)=\"handleTreeListCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTreeListDoubleClick\n }\"\n [scope]=\"this\"\n >\n <kendo-treelist-messages\n [noRecords]=\"getText('noRecords')\"\n [filter]=\"getText('filter')\"\n [filterEqOperator]=\"getText('filterEqOperator')\"\n [filterNotEqOperator]=\"getText('filterNotEqOperator')\"\n [filterIsNullOperator]=\"getText('filterIsNullOperator')\"\n [filterIsNotNullOperator]=\"getText('filterIsNotNullOperator')\"\n [filterIsEmptyOperator]=\"getText('filterIsEmptyOperator')\"\n [filterIsNotEmptyOperator]=\"getText('filterIsNotEmptyOperator')\"\n [filterStartsWithOperator]=\"getText('filterStartsWithOperator')\"\n [filterContainsOperator]=\"getText('filterContainsOperator')\"\n [filterNotContainsOperator]=\"getText('filterNotContainsOperator')\"\n [filterEndsWithOperator]=\"getText('filterEndsWithOperator')\"\n [filterGteOperator]=\"getText('filterGteOperator')\"\n [filterGtOperator]=\"getText('filterGtOperator')\"\n [filterLteOperator]=\"getText('filterLteOperator')\"\n [filterLtOperator]=\"getText('filterLtOperator')\"\n [filterIsTrue]=\"getText('filterIsTrue')\"\n [filterIsFalse]=\"getText('filterIsFalse')\"\n [filterBooleanAll]=\"getText('filterBooleanAll')\"\n [filterAfterOrEqualOperator]=\"getText('filterAfterOrEqualOperator')\"\n [filterAfterOperator]=\"getText('filterAfterOperator')\"\n [filterBeforeOperator]=\"getText('filterBeforeOperator')\"\n [filterBeforeOrEqualOperator]=\"getText('filterBeforeOrEqualOperator')\"\n [filterFilterButton]=\"getText('filterFilterButton')\"\n [filterClearButton]=\"getText('filterClearButton')\"\n [filterAndLogic]=\"getText('filterAndLogic')\"\n [filterOrLogic]=\"getText('filterOrLogic')\"\n [loading]=\"getText('loading')\"\n [columnMenu]=\"getText('columnMenu')\"\n [columns]=\"getText('columns')\"\n [sortable]=\"getText('sortable')\"\n [sortAscending]=\"getText('sortAscending')\"\n [sortDescending]=\"getText('sortDescending')\"\n [sortedAscending]=\"getText('sortedAscending')\"\n [sortedDescending]=\"getText('sortedDescending')\"\n [sortedDefault]=\"getText('sortedDefault')\"\n [columnsApply]=\"getText('columnsApply')\"\n [columnsReset]=\"getText('columnsReset')\"\n >\n </kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTimelineClick,\n contextmenu: handleTimelineRightClick,\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n [scope]=\"this\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog\n *ngIf=\"showEditingDialog\"\n [data]=\"data\">\n </kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"showConfirmationDialog = false;\">\n <span>{{ getText('confirmationDialogContent') }}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"showConfirmationDialog = false;\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
|
|
3615
|
+
template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskEditingGeneralTabTitle=\"kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip\"\n taskEditingGeneralTabTitle=\"General\"\n\n i18n-taskEditingPredecessorsTabTitle=\"kendo.gantt.taskEditingPredecessorsTabTitle|The title of the 'Predecessors' dependencies tab of the editing dialog TabStrip\"\n taskEditingPredecessorsTabTitle=\"Predecessors\"\n\n i18n-taskEditingSuccessorsTabTitle=\"kendo.gantt.taskEditingSuccessorsTabTitle|The title of the 'Successors' dependencies tab of the editing dialog TabStrip\"\n taskEditingSuccessorsTabTitle=\"Successors\"\n\n i18n-taskEditingDependenciesAddButtonText=\"kendo.gantt.taskEditingDependenciesAddButtonText|The text of the 'Add' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesAddButtonText=\"Add\"\n\n i18n-taskEditingDependenciesRemoveButtonText=\"kendo.gantt.taskEditingDependenciesRemoveButtonText|The text of the 'Remove' button in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesRemoveButtonText=\"Remove\"\n\n i18n-taskEditingDependenciesGridNameColumnTitle=\"kendo.gantt.taskEditingDependenciesGridNameColumnTitle|The title of the 'Task Title' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridNameColumnTitle=\"Task Title\"\n\n i18n-taskEditingDependenciesGridTypeColumnTitle=\"kendo.gantt.taskEditingDependenciesGridTypeColumnTitle|The title of the 'Type' Grid column in the dependencies tabs of the editing dialog TabStrip\"\n taskEditingDependenciesGridTypeColumnTitle=\"Type\"\n\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-addTaskText=\"kendo.gantt.addTaskText|The text of the DropDownButton in the AddTask component\"\n addTaskText=\"Add Task\"\n\n i18n-addChildText=\"kendo.gantt.addChildText|The text of the 'Add Child' option in the AddTask component\"\n addChildText=\"Add Child\"\n\n i18n-addAboveText=\"kendo.gantt.addAboveText|The text of the 'Add Above' option in the AddTask component\"\n addAboveText=\"Add Above\"\n\n i18n-addBelowText=\"kendo.gantt.addBelowText|The text of the 'Add Below' option in the AddTask component\"\n addBelowText=\"Add Below\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'top' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'top' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [isSelected]=\"isSelected\"\n [selectable]=\"selectable\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (selectionChange)=\"handleTreeListSelectionChange($event)\"\n (cellClick)=\"handleTreeListCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTreeListDoubleClick\n }\"\n [scope]=\"this\"\n >\n <kendo-treelist-messages\n [noRecords]=\"getText('noRecords')\"\n [filter]=\"getText('filter')\"\n [filterEqOperator]=\"getText('filterEqOperator')\"\n [filterNotEqOperator]=\"getText('filterNotEqOperator')\"\n [filterIsNullOperator]=\"getText('filterIsNullOperator')\"\n [filterIsNotNullOperator]=\"getText('filterIsNotNullOperator')\"\n [filterIsEmptyOperator]=\"getText('filterIsEmptyOperator')\"\n [filterIsNotEmptyOperator]=\"getText('filterIsNotEmptyOperator')\"\n [filterStartsWithOperator]=\"getText('filterStartsWithOperator')\"\n [filterContainsOperator]=\"getText('filterContainsOperator')\"\n [filterNotContainsOperator]=\"getText('filterNotContainsOperator')\"\n [filterEndsWithOperator]=\"getText('filterEndsWithOperator')\"\n [filterGteOperator]=\"getText('filterGteOperator')\"\n [filterGtOperator]=\"getText('filterGtOperator')\"\n [filterLteOperator]=\"getText('filterLteOperator')\"\n [filterLtOperator]=\"getText('filterLtOperator')\"\n [filterIsTrue]=\"getText('filterIsTrue')\"\n [filterIsFalse]=\"getText('filterIsFalse')\"\n [filterBooleanAll]=\"getText('filterBooleanAll')\"\n [filterAfterOrEqualOperator]=\"getText('filterAfterOrEqualOperator')\"\n [filterAfterOperator]=\"getText('filterAfterOperator')\"\n [filterBeforeOperator]=\"getText('filterBeforeOperator')\"\n [filterBeforeOrEqualOperator]=\"getText('filterBeforeOrEqualOperator')\"\n [filterFilterButton]=\"getText('filterFilterButton')\"\n [filterClearButton]=\"getText('filterClearButton')\"\n [filterAndLogic]=\"getText('filterAndLogic')\"\n [filterOrLogic]=\"getText('filterOrLogic')\"\n [loading]=\"getText('loading')\"\n [columnMenu]=\"getText('columnMenu')\"\n [columns]=\"getText('columns')\"\n [sortable]=\"getText('sortable')\"\n [sortAscending]=\"getText('sortAscending')\"\n [sortDescending]=\"getText('sortDescending')\"\n [sortedAscending]=\"getText('sortedAscending')\"\n [sortedDescending]=\"getText('sortedDescending')\"\n [sortedDefault]=\"getText('sortedDefault')\"\n [columnsApply]=\"getText('columnsApply')\"\n [columnsReset]=\"getText('columnsReset')\"\n >\n </kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [renderDependencyDragClues]=\"renderDependencyDragClues\"\n [dragScrollSettings]=\"dragScrollSettings\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTimelineClick,\n contextmenu: handleTimelineRightClick,\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n [scope]=\"this\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n [showAddTask]=\"toolbarSettings.addTaskTool === 'bottom' || toolbarSettings.addTaskTool === 'both'\"\n [showViewSelector]=\"toolbarSettings.viewSelectorTool === 'bottom' || toolbarSettings.viewSelectorTool === 'both'\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog\n *ngIf=\"showEditingDialog\"\n [data]=\"data\">\n </kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"showConfirmationDialog = false;\">\n <span>{{ getText('confirmationDialogContent') }}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"showConfirmationDialog = false;\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
|
|
3120
3616
|
}),
|
|
3121
3617
|
__metadata("design:paramtypes", [TimelineViewService,
|
|
3122
3618
|
ScrollSyncService,
|
|
@@ -3135,184 +3631,75 @@ var GanttComponent = /** @class */ (function () {
|
|
|
3135
3631
|
/**
|
|
3136
3632
|
* @hidden
|
|
3137
3633
|
*/
|
|
3138
|
-
var
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3634
|
+
var TOUCH_ENABLED = new InjectionToken('gantt-touch-enabled');
|
|
3635
|
+
|
|
3636
|
+
/**
|
|
3637
|
+
* @hidden
|
|
3638
|
+
*/
|
|
3639
|
+
var GanttTasksTableBodyComponent = /** @class */ (function () {
|
|
3640
|
+
function GanttTasksTableBodyComponent(dependencyDomService, mapper) {
|
|
3142
3641
|
this.dependencyDomService = dependencyDomService;
|
|
3143
|
-
this.
|
|
3144
|
-
this.zone = zone;
|
|
3145
|
-
this.hostClass = true;
|
|
3146
|
-
this.dependencies = [];
|
|
3147
|
-
this.subscriptions = new Subscription();
|
|
3148
|
-
this.subscriptions.add(
|
|
3149
|
-
// task changes indicates change in row content, number, height, etc.
|
|
3150
|
-
this.dependencyDomService.taskChanges
|
|
3151
|
-
.pipe(filter(function (args) { return isPresent(args.timelineRow); }), switchMap(function (args) { return _this.zone.onStable.pipe(take(1), map(function () { return args; })); }) // ensure the content is rendered
|
|
3152
|
-
)
|
|
3153
|
-
.subscribe(function (_a) {
|
|
3154
|
-
var timelineRow = _a.timelineRow;
|
|
3155
|
-
var timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
|
|
3156
|
-
_this.renderer.setStyle(_this.timelineColumns.nativeElement, 'height', (_this.rows || []).length * timelineRowHeight + "px");
|
|
3157
|
-
}));
|
|
3642
|
+
this.mapper = mapper;
|
|
3158
3643
|
}
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3644
|
+
Object.defineProperty(GanttTasksTableBodyComponent.prototype, "timelineRow", {
|
|
3645
|
+
set: function (timelineRow) {
|
|
3646
|
+
// register the row value only when the first row is rendered
|
|
3647
|
+
// with server-side data-binding, the rows rendering could be delayed
|
|
3648
|
+
if (isPresent(timelineRow)) {
|
|
3649
|
+
this.dependencyDomService.registerTimelineRow(timelineRow.nativeElement);
|
|
3650
|
+
}
|
|
3651
|
+
},
|
|
3652
|
+
enumerable: true,
|
|
3653
|
+
configurable: true
|
|
3654
|
+
});
|
|
3655
|
+
GanttTasksTableBodyComponent.prototype.isMileStone = function (task) {
|
|
3656
|
+
return !this.hasChildren(task) && isEqual(this.mapper.extractFromTask(task, 'start'), this.mapper.extractFromTask(task, 'end'));
|
|
3171
3657
|
};
|
|
3172
3658
|
__decorate([
|
|
3173
|
-
ViewChild('
|
|
3174
|
-
__metadata("design:type", ElementRef)
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
ViewChild('timelineColumns', { static: true }),
|
|
3178
|
-
__metadata("design:type", ElementRef)
|
|
3179
|
-
], GanttTimelineComponent.prototype, "timelineColumns", void 0);
|
|
3180
|
-
__decorate([
|
|
3181
|
-
ViewChild('timelineHeaderWrap', { static: true }),
|
|
3182
|
-
__metadata("design:type", ElementRef)
|
|
3183
|
-
], GanttTimelineComponent.prototype, "timelineHeaderWrap", void 0);
|
|
3184
|
-
__decorate([
|
|
3185
|
-
ViewChild('tasksContainer', { static: true }),
|
|
3186
|
-
__metadata("design:type", ElementRef)
|
|
3187
|
-
], GanttTimelineComponent.prototype, "tasksContainer", void 0);
|
|
3188
|
-
__decorate([
|
|
3189
|
-
HostBinding('class.k-gantt-timeline'),
|
|
3190
|
-
__metadata("design:type", Boolean)
|
|
3191
|
-
], GanttTimelineComponent.prototype, "hostClass", void 0);
|
|
3192
|
-
__decorate([
|
|
3193
|
-
Input(),
|
|
3194
|
-
__metadata("design:type", Array)
|
|
3195
|
-
], GanttTimelineComponent.prototype, "rows", void 0);
|
|
3196
|
-
__decorate([
|
|
3197
|
-
Input(),
|
|
3198
|
-
__metadata("design:type", Array)
|
|
3199
|
-
], GanttTimelineComponent.prototype, "slots", void 0);
|
|
3659
|
+
ViewChild('timelineRow', { static: false }),
|
|
3660
|
+
__metadata("design:type", ElementRef),
|
|
3661
|
+
__metadata("design:paramtypes", [ElementRef])
|
|
3662
|
+
], GanttTasksTableBodyComponent.prototype, "timelineRow", null);
|
|
3200
3663
|
__decorate([
|
|
3201
3664
|
Input(),
|
|
3202
3665
|
__metadata("design:type", Array)
|
|
3203
|
-
],
|
|
3204
|
-
__decorate([
|
|
3205
|
-
Input(),
|
|
3206
|
-
__metadata("design:type", Number)
|
|
3207
|
-
], GanttTimelineComponent.prototype, "tableWidth", void 0);
|
|
3666
|
+
], GanttTasksTableBodyComponent.prototype, "rows", void 0);
|
|
3208
3667
|
__decorate([
|
|
3209
3668
|
Input(),
|
|
3210
3669
|
__metadata("design:type", String)
|
|
3211
|
-
],
|
|
3670
|
+
], GanttTasksTableBodyComponent.prototype, "activeView", void 0);
|
|
3212
3671
|
__decorate([
|
|
3213
3672
|
Input(),
|
|
3214
3673
|
__metadata("design:type", TemplateRef)
|
|
3215
|
-
],
|
|
3674
|
+
], GanttTasksTableBodyComponent.prototype, "taskContentTemplate", void 0);
|
|
3216
3675
|
__decorate([
|
|
3217
3676
|
Input(),
|
|
3218
3677
|
__metadata("design:type", TemplateRef)
|
|
3219
|
-
],
|
|
3678
|
+
], GanttTasksTableBodyComponent.prototype, "taskTemplate", void 0);
|
|
3220
3679
|
__decorate([
|
|
3221
3680
|
Input(),
|
|
3222
3681
|
__metadata("design:type", TemplateRef)
|
|
3223
|
-
],
|
|
3682
|
+
], GanttTasksTableBodyComponent.prototype, "summaryTaskTemplate", void 0);
|
|
3224
3683
|
__decorate([
|
|
3225
3684
|
Input(),
|
|
3226
3685
|
__metadata("design:type", Function)
|
|
3227
|
-
],
|
|
3686
|
+
], GanttTasksTableBodyComponent.prototype, "taskClass", void 0);
|
|
3228
3687
|
__decorate([
|
|
3229
3688
|
Input(),
|
|
3230
3689
|
__metadata("design:type", Function)
|
|
3231
|
-
],
|
|
3690
|
+
], GanttTasksTableBodyComponent.prototype, "hasChildren", void 0);
|
|
3232
3691
|
__decorate([
|
|
3233
3692
|
Input(),
|
|
3234
3693
|
__metadata("design:type", Function)
|
|
3235
|
-
],
|
|
3694
|
+
], GanttTasksTableBodyComponent.prototype, "isTaskSelected", void 0);
|
|
3236
3695
|
__decorate([
|
|
3237
3696
|
Input(),
|
|
3238
|
-
__metadata("design:type",
|
|
3239
|
-
],
|
|
3240
|
-
GanttTimelineComponent = __decorate([
|
|
3241
|
-
Component({
|
|
3242
|
-
selector: 'kendo-gantt-timeline',
|
|
3243
|
-
template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <div #timelineContent class=\"k-grid-content\">\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n </svg>\n </div>\n </div>\n "
|
|
3244
|
-
}),
|
|
3245
|
-
__metadata("design:paramtypes", [ScrollSyncService,
|
|
3246
|
-
DependencyDomService,
|
|
3247
|
-
Renderer2,
|
|
3248
|
-
NgZone])
|
|
3249
|
-
], GanttTimelineComponent);
|
|
3250
|
-
return GanttTimelineComponent;
|
|
3251
|
-
}());
|
|
3252
|
-
|
|
3253
|
-
/**
|
|
3254
|
-
* @hidden
|
|
3255
|
-
*/
|
|
3256
|
-
var GanttTasksTableBodyComponent = /** @class */ (function () {
|
|
3257
|
-
function GanttTasksTableBodyComponent(dependencyDomService, mapper) {
|
|
3258
|
-
this.dependencyDomService = dependencyDomService;
|
|
3259
|
-
this.mapper = mapper;
|
|
3260
|
-
}
|
|
3261
|
-
Object.defineProperty(GanttTasksTableBodyComponent.prototype, "timelineRow", {
|
|
3262
|
-
set: function (timelineRow) {
|
|
3263
|
-
// register the row value only when the first row is rendered
|
|
3264
|
-
// with server-side data-binding, the rows rendering could be delayed
|
|
3265
|
-
if (isPresent(timelineRow)) {
|
|
3266
|
-
this.dependencyDomService.registerTimelineRow(timelineRow.nativeElement);
|
|
3267
|
-
}
|
|
3268
|
-
},
|
|
3269
|
-
enumerable: true,
|
|
3270
|
-
configurable: true
|
|
3271
|
-
});
|
|
3272
|
-
GanttTasksTableBodyComponent.prototype.isMileStone = function (task) {
|
|
3273
|
-
return !this.hasChildren(task) && isEqual(this.mapper.extractFromTask(task, 'start'), this.mapper.extractFromTask(task, 'end'));
|
|
3274
|
-
};
|
|
3275
|
-
__decorate([
|
|
3276
|
-
ViewChild('timelineRow', { static: false }),
|
|
3277
|
-
__metadata("design:type", ElementRef),
|
|
3278
|
-
__metadata("design:paramtypes", [ElementRef])
|
|
3279
|
-
], GanttTasksTableBodyComponent.prototype, "timelineRow", null);
|
|
3280
|
-
__decorate([
|
|
3281
|
-
Input(),
|
|
3282
|
-
__metadata("design:type", Array)
|
|
3283
|
-
], GanttTasksTableBodyComponent.prototype, "rows", void 0);
|
|
3284
|
-
__decorate([
|
|
3285
|
-
Input(),
|
|
3286
|
-
__metadata("design:type", String)
|
|
3287
|
-
], GanttTasksTableBodyComponent.prototype, "activeView", void 0);
|
|
3288
|
-
__decorate([
|
|
3289
|
-
Input(),
|
|
3290
|
-
__metadata("design:type", TemplateRef)
|
|
3291
|
-
], GanttTasksTableBodyComponent.prototype, "taskContentTemplate", void 0);
|
|
3292
|
-
__decorate([
|
|
3293
|
-
Input(),
|
|
3294
|
-
__metadata("design:type", TemplateRef)
|
|
3295
|
-
], GanttTasksTableBodyComponent.prototype, "taskTemplate", void 0);
|
|
3296
|
-
__decorate([
|
|
3297
|
-
Input(),
|
|
3298
|
-
__metadata("design:type", TemplateRef)
|
|
3299
|
-
], GanttTasksTableBodyComponent.prototype, "summaryTaskTemplate", void 0);
|
|
3300
|
-
__decorate([
|
|
3301
|
-
Input(),
|
|
3302
|
-
__metadata("design:type", Function)
|
|
3303
|
-
], GanttTasksTableBodyComponent.prototype, "taskClass", void 0);
|
|
3304
|
-
__decorate([
|
|
3305
|
-
Input(),
|
|
3306
|
-
__metadata("design:type", Function)
|
|
3307
|
-
], GanttTasksTableBodyComponent.prototype, "hasChildren", void 0);
|
|
3308
|
-
__decorate([
|
|
3309
|
-
Input(),
|
|
3310
|
-
__metadata("design:type", Function)
|
|
3311
|
-
], GanttTasksTableBodyComponent.prototype, "isTaskSelected", void 0);
|
|
3697
|
+
__metadata("design:type", Boolean)
|
|
3698
|
+
], GanttTasksTableBodyComponent.prototype, "renderDependencyDragClues", void 0);
|
|
3312
3699
|
GanttTasksTableBodyComponent = __decorate([
|
|
3313
3700
|
Component({
|
|
3314
3701
|
selector: '[kendoGanttTasksTableBody]',
|
|
3315
|
-
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 "
|
|
3702
|
+
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 "
|
|
3316
3703
|
}),
|
|
3317
3704
|
__metadata("design:paramtypes", [DependencyDomService,
|
|
3318
3705
|
MappingService])
|
|
@@ -3387,23 +3774,6 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3387
3774
|
enumerable: true,
|
|
3388
3775
|
configurable: true
|
|
3389
3776
|
});
|
|
3390
|
-
GanttTaskBase.prototype.ngOnChanges = function (changes) {
|
|
3391
|
-
if (isPresent(changes.dataItem)) {
|
|
3392
|
-
if (isPresent(changes.dataItem.previousValue)) {
|
|
3393
|
-
this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
|
|
3394
|
-
}
|
|
3395
|
-
this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
|
|
3396
|
-
}
|
|
3397
|
-
else if (isPresent(changes.activeView)) {
|
|
3398
|
-
this.dependencyDomService.notifyChanges();
|
|
3399
|
-
}
|
|
3400
|
-
};
|
|
3401
|
-
GanttTaskBase.prototype.ngOnDestroy = function () {
|
|
3402
|
-
if (isPresent(this.dataItem)) {
|
|
3403
|
-
this.dependencyDomService.unregisterTask(this.dataItem);
|
|
3404
|
-
}
|
|
3405
|
-
this.viewChangesSubscription.unsubscribe();
|
|
3406
|
-
};
|
|
3407
3777
|
Object.defineProperty(GanttTaskBase.prototype, "taskWidth", {
|
|
3408
3778
|
get: function () {
|
|
3409
3779
|
var itemDuration = this.mapper.extractFromTask(this.dataItem, 'end') - this.mapper.extractFromTask(this.dataItem, 'start');
|
|
@@ -3415,6 +3785,12 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3415
3785
|
configurable: true
|
|
3416
3786
|
});
|
|
3417
3787
|
Object.defineProperty(GanttTaskBase.prototype, "taskOffset", {
|
|
3788
|
+
/**
|
|
3789
|
+
* 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.
|
|
3790
|
+
* 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
|
|
3791
|
+
* and hovering just the .k-task element doesn't expose the drag clues.
|
|
3792
|
+
* Additionally, positioning the entire container takes care of positioning the hints as well.
|
|
3793
|
+
*/
|
|
3418
3794
|
get: function () {
|
|
3419
3795
|
var timeAfterViewStart = this.mapper.extractFromTask(this.dataItem, 'start') - this.viewService.viewStart;
|
|
3420
3796
|
var offsetInSlotUnits = timeAfterViewStart / this.slotUnitDuration;
|
|
@@ -3433,6 +3809,23 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3433
3809
|
enumerable: true,
|
|
3434
3810
|
configurable: true
|
|
3435
3811
|
});
|
|
3812
|
+
GanttTaskBase.prototype.ngOnChanges = function (changes) {
|
|
3813
|
+
if (isPresent(changes.dataItem)) {
|
|
3814
|
+
if (isPresent(changes.dataItem.previousValue)) {
|
|
3815
|
+
this.dependencyDomService.unregisterTask(changes.dataItem.previousValue);
|
|
3816
|
+
}
|
|
3817
|
+
this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
|
|
3818
|
+
}
|
|
3819
|
+
else if (isPresent(changes.activeView)) {
|
|
3820
|
+
this.dependencyDomService.notifyChanges();
|
|
3821
|
+
}
|
|
3822
|
+
};
|
|
3823
|
+
GanttTaskBase.prototype.ngOnDestroy = function () {
|
|
3824
|
+
if (isPresent(this.dataItem)) {
|
|
3825
|
+
this.dependencyDomService.unregisterTask(this.dataItem);
|
|
3826
|
+
}
|
|
3827
|
+
this.viewChangesSubscription.unsubscribe();
|
|
3828
|
+
};
|
|
3436
3829
|
__decorate([
|
|
3437
3830
|
HostBinding('class.k-task-wrap'),
|
|
3438
3831
|
__metadata("design:type", Boolean)
|
|
@@ -3447,8 +3840,8 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3447
3840
|
], GanttTaskBase.prototype, "dataItem", void 0);
|
|
3448
3841
|
__decorate([
|
|
3449
3842
|
Input(),
|
|
3450
|
-
__metadata("design:type",
|
|
3451
|
-
], GanttTaskBase.prototype, "
|
|
3843
|
+
__metadata("design:type", Boolean)
|
|
3844
|
+
], GanttTaskBase.prototype, "renderDependencyDragClues", void 0);
|
|
3452
3845
|
__decorate([
|
|
3453
3846
|
Input(),
|
|
3454
3847
|
__metadata("design:type", Function)
|
|
@@ -3461,6 +3854,11 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3461
3854
|
Input(),
|
|
3462
3855
|
__metadata("design:type", Function)
|
|
3463
3856
|
], GanttTaskBase.prototype, "taskClass", void 0);
|
|
3857
|
+
__decorate([
|
|
3858
|
+
HostBinding('style.left.px'),
|
|
3859
|
+
__metadata("design:type", Number),
|
|
3860
|
+
__metadata("design:paramtypes", [])
|
|
3861
|
+
], GanttTaskBase.prototype, "taskOffset", null);
|
|
3464
3862
|
return GanttTaskBase;
|
|
3465
3863
|
}());
|
|
3466
3864
|
|
|
@@ -3469,9 +3867,10 @@ var GanttTaskBase = /** @class */ (function () {
|
|
|
3469
3867
|
*/
|
|
3470
3868
|
var GanttTaskComponent = /** @class */ (function (_super) {
|
|
3471
3869
|
__extends(GanttTaskComponent, _super);
|
|
3472
|
-
function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr
|
|
3870
|
+
function GanttTaskComponent(editService, touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
3473
3871
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
3474
3872
|
_this.editService = editService;
|
|
3873
|
+
_this.touchEnabled = touchEnabled$$1;
|
|
3475
3874
|
return _this;
|
|
3476
3875
|
}
|
|
3477
3876
|
GanttTaskComponent_1 = GanttTaskComponent;
|
|
@@ -3497,14 +3896,14 @@ var GanttTaskComponent = /** @class */ (function (_super) {
|
|
|
3497
3896
|
useExisting: forwardRef(function () { return GanttTaskComponent_1; })
|
|
3498
3897
|
}
|
|
3499
3898
|
],
|
|
3500
|
-
template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [
|
|
3899
|
+
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 "
|
|
3501
3900
|
}),
|
|
3502
|
-
|
|
3901
|
+
__param(1, Inject(TOUCH_ENABLED)),
|
|
3902
|
+
__metadata("design:paramtypes", [EditService, Boolean, MappingService,
|
|
3503
3903
|
TimelineViewService,
|
|
3504
3904
|
DependencyDomService,
|
|
3505
3905
|
OptionChangesService,
|
|
3506
|
-
ChangeDetectorRef
|
|
3507
|
-
EditService])
|
|
3906
|
+
ChangeDetectorRef])
|
|
3508
3907
|
], GanttTaskComponent);
|
|
3509
3908
|
return GanttTaskComponent;
|
|
3510
3909
|
}(GanttTaskBase));
|
|
@@ -3514,8 +3913,9 @@ var GanttTaskComponent = /** @class */ (function (_super) {
|
|
|
3514
3913
|
*/
|
|
3515
3914
|
var GanttSummaryTaskComponent = /** @class */ (function (_super) {
|
|
3516
3915
|
__extends(GanttSummaryTaskComponent, _super);
|
|
3517
|
-
function GanttSummaryTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
3916
|
+
function GanttSummaryTaskComponent(touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
3518
3917
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
3918
|
+
_this.touchEnabled = touchEnabled$$1;
|
|
3519
3919
|
_this.summaryWrapperClass = true;
|
|
3520
3920
|
return _this;
|
|
3521
3921
|
}
|
|
@@ -3538,9 +3938,10 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
|
|
|
3538
3938
|
useExisting: forwardRef(function () { return GanttSummaryTaskComponent_1; })
|
|
3539
3939
|
}
|
|
3540
3940
|
],
|
|
3541
|
-
template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [
|
|
3941
|
+
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 "
|
|
3542
3942
|
}),
|
|
3543
|
-
|
|
3943
|
+
__param(0, Inject(TOUCH_ENABLED)),
|
|
3944
|
+
__metadata("design:paramtypes", [Boolean, MappingService,
|
|
3544
3945
|
TimelineViewService,
|
|
3545
3946
|
DependencyDomService,
|
|
3546
3947
|
OptionChangesService,
|
|
@@ -3554,8 +3955,9 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
|
|
|
3554
3955
|
*/
|
|
3555
3956
|
var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
|
|
3556
3957
|
__extends(GanttMilestoneTaskComponent, _super);
|
|
3557
|
-
function GanttMilestoneTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
3958
|
+
function GanttMilestoneTaskComponent(touchEnabled$$1, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
|
|
3558
3959
|
var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
|
|
3960
|
+
_this.touchEnabled = touchEnabled$$1;
|
|
3559
3961
|
_this.milestoneWrapperClass = true;
|
|
3560
3962
|
return _this;
|
|
3561
3963
|
}
|
|
@@ -3574,9 +3976,10 @@ var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
|
|
|
3574
3976
|
useExisting: forwardRef(function () { return GanttMilestoneTaskComponent_1; })
|
|
3575
3977
|
}
|
|
3576
3978
|
],
|
|
3577
|
-
template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [
|
|
3979
|
+
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 "
|
|
3578
3980
|
}),
|
|
3579
|
-
|
|
3981
|
+
__param(0, Inject(TOUCH_ENABLED)),
|
|
3982
|
+
__metadata("design:paramtypes", [Boolean, MappingService,
|
|
3580
3983
|
TimelineViewService,
|
|
3581
3984
|
DependencyDomService,
|
|
3582
3985
|
OptionChangesService,
|
|
@@ -3916,23 +4319,6 @@ var ViewSelectorComponent = /** @class */ (function () {
|
|
|
3916
4319
|
return ViewSelectorComponent;
|
|
3917
4320
|
}());
|
|
3918
4321
|
|
|
3919
|
-
/**
|
|
3920
|
-
* The dependency type when two tasks are connected.
|
|
3921
|
-
*
|
|
3922
|
-
* The supported values are:
|
|
3923
|
-
* * `FF`—from 'finish' to 'finish'
|
|
3924
|
-
* * `FS`—from 'finish' to 'start'
|
|
3925
|
-
* * `SS`—from 'start' to 'start'
|
|
3926
|
-
* * `SF`—from 'start' to 'finish'
|
|
3927
|
-
*/
|
|
3928
|
-
var DependencyType;
|
|
3929
|
-
(function (DependencyType) {
|
|
3930
|
-
DependencyType[DependencyType["FF"] = 0] = "FF";
|
|
3931
|
-
DependencyType[DependencyType["FS"] = 1] = "FS";
|
|
3932
|
-
DependencyType[DependencyType["SF"] = 2] = "SF";
|
|
3933
|
-
DependencyType[DependencyType["SS"] = 3] = "SS"; // task B can't start before task A starts
|
|
3934
|
-
})(DependencyType || (DependencyType = {}));
|
|
3935
|
-
|
|
3936
4322
|
/**
|
|
3937
4323
|
* @hidden
|
|
3938
4324
|
*
|
|
@@ -3943,6 +4329,9 @@ var getOffsetRelativeToParent = function (element, targetParent) {
|
|
|
3943
4329
|
top: 0,
|
|
3944
4330
|
left: 0
|
|
3945
4331
|
};
|
|
4332
|
+
if (!targetParent.contains(element)) {
|
|
4333
|
+
return offset;
|
|
4334
|
+
}
|
|
3946
4335
|
var offsetParent = element;
|
|
3947
4336
|
while (offsetParent && offsetParent !== targetParent) {
|
|
3948
4337
|
offset.top += offsetParent.offsetTop;
|
|
@@ -4089,6 +4478,37 @@ var getArrowEast = function (top, left, arrowSize) {
|
|
|
4089
4478
|
});
|
|
4090
4479
|
return points;
|
|
4091
4480
|
};
|
|
4481
|
+
/**
|
|
4482
|
+
* @hidden
|
|
4483
|
+
*
|
|
4484
|
+
* Translates the provided client `left` and `top` coords to coords relative to the provided container.
|
|
4485
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
4486
|
+
*/
|
|
4487
|
+
var clientToOffsetCoords = function (clientLeft, clientTop, offsetContainer) {
|
|
4488
|
+
// client (viewport) coordinates of the target container
|
|
4489
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
4490
|
+
var offsetContainerClientRect = offsetContainer.getBoundingClientRect();
|
|
4491
|
+
return {
|
|
4492
|
+
left: clientLeft - offsetContainerClientRect.left + offsetContainer.scrollLeft,
|
|
4493
|
+
top: clientTop - offsetContainerClientRect.top + offsetContainer.scrollTop
|
|
4494
|
+
};
|
|
4495
|
+
};
|
|
4496
|
+
/**
|
|
4497
|
+
* @hidden
|
|
4498
|
+
*
|
|
4499
|
+
* Retrieves the `left` and `top` values of the center of the provided element.
|
|
4500
|
+
* The retrieved values are relative to the current viewport (client values).
|
|
4501
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems#standard_cssom_coordinate_systems
|
|
4502
|
+
*/
|
|
4503
|
+
var getElementClientCenterCoords = function (element) {
|
|
4504
|
+
// client (viewport) coordinates of the targeted element
|
|
4505
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#value
|
|
4506
|
+
var _a = element.getBoundingClientRect(), left = _a.left, top = _a.top, width = _a.width, height = _a.height;
|
|
4507
|
+
return {
|
|
4508
|
+
left: left + (width / 2),
|
|
4509
|
+
top: top + (height / 2)
|
|
4510
|
+
};
|
|
4511
|
+
};
|
|
4092
4512
|
|
|
4093
4513
|
/**
|
|
4094
4514
|
* Defines the size of the arrow that will be drawn at the end of each Gantt dependency.
|
|
@@ -4171,6 +4591,525 @@ var GanttDependencyDirective = /** @class */ (function () {
|
|
|
4171
4591
|
return GanttDependencyDirective;
|
|
4172
4592
|
}());
|
|
4173
4593
|
|
|
4594
|
+
/**
|
|
4595
|
+
* @hidden
|
|
4596
|
+
*/
|
|
4597
|
+
var DragValidationTooltipComponent = /** @class */ (function () {
|
|
4598
|
+
function DragValidationTooltipComponent() {
|
|
4599
|
+
/**
|
|
4600
|
+
* Sets the status class of the attempted operation.
|
|
4601
|
+
* Note that the status will be ignored and the `neutral` status class will be rendered,
|
|
4602
|
+
* if the any of the fromTaskName or toTaskName are not populated.
|
|
4603
|
+
*/
|
|
4604
|
+
this.isValid = false;
|
|
4605
|
+
}
|
|
4606
|
+
DragValidationTooltipComponent = __decorate([
|
|
4607
|
+
Component({
|
|
4608
|
+
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 ",
|
|
4609
|
+
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 "]
|
|
4610
|
+
})
|
|
4611
|
+
], DragValidationTooltipComponent);
|
|
4612
|
+
return DragValidationTooltipComponent;
|
|
4613
|
+
}());
|
|
4614
|
+
|
|
4615
|
+
/**
|
|
4616
|
+
* When added to the .k-task-dot, the element will be kept with hover styles.
|
|
4617
|
+
* Used for the drag clue from which the dragging has started.
|
|
4618
|
+
*/
|
|
4619
|
+
var DRAG_CLUE_HOVER_CLASS = 'k-state-hover';
|
|
4620
|
+
/**
|
|
4621
|
+
* Add the selection disabling class to the enitre container.
|
|
4622
|
+
* Otherwise existing selection on a given task text prevents dragging the clue even if the clue has `user-select: none` styles.
|
|
4623
|
+
*/
|
|
4624
|
+
var USER_SELECT_NONE_CLASS = 'k-user-select-none';
|
|
4625
|
+
/**
|
|
4626
|
+
* When added to the .k-task-wrap, the containing .k-task-dot elements will be kept visible even when not hovered.
|
|
4627
|
+
* Used for the drag clue from which the dragging has started.
|
|
4628
|
+
*/
|
|
4629
|
+
var TASK_WRAPPER_DRAG_CLASS = 'k-origin';
|
|
4630
|
+
/**
|
|
4631
|
+
* Use 20px margin between the pointer and the popup.
|
|
4632
|
+
* Could be made user-configurable if there's demand.
|
|
4633
|
+
*/
|
|
4634
|
+
var DEFAULT_POPUP_VERTICAL_MARGIN = 20;
|
|
4635
|
+
/**
|
|
4636
|
+
* A directive which enables the creation of new dependencies via dragging.
|
|
4637
|
+
*/
|
|
4638
|
+
var DependencyDragCreateDirective = /** @class */ (function () {
|
|
4639
|
+
function DependencyDragCreateDirective(gantt, zone, renderer, mapper, popupService, timelineScrollService) {
|
|
4640
|
+
this.gantt = gantt;
|
|
4641
|
+
this.zone = zone;
|
|
4642
|
+
this.renderer = renderer;
|
|
4643
|
+
this.mapper = mapper;
|
|
4644
|
+
this.popupService = popupService;
|
|
4645
|
+
this.timelineScrollService = timelineScrollService;
|
|
4646
|
+
/**
|
|
4647
|
+
* Specifies whether the validation tooltip will be displayed during drag operations.
|
|
4648
|
+
*
|
|
4649
|
+
* @default true
|
|
4650
|
+
*/
|
|
4651
|
+
this.displayValidationTooltip = true;
|
|
4652
|
+
this.gantt.renderDependencyDragClues = true;
|
|
4653
|
+
}
|
|
4654
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "container", {
|
|
4655
|
+
get: function () {
|
|
4656
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.timelineContent)) {
|
|
4657
|
+
return null;
|
|
4658
|
+
}
|
|
4659
|
+
return this.gantt.timeline.timelineContent.nativeElement;
|
|
4660
|
+
},
|
|
4661
|
+
enumerable: true,
|
|
4662
|
+
configurable: true
|
|
4663
|
+
});
|
|
4664
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "polyline", {
|
|
4665
|
+
get: function () {
|
|
4666
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dependencyDragCreatePolyline)) {
|
|
4667
|
+
return null;
|
|
4668
|
+
}
|
|
4669
|
+
return this.gantt.timeline.dependencyDragCreatePolyline.nativeElement;
|
|
4670
|
+
},
|
|
4671
|
+
enumerable: true,
|
|
4672
|
+
configurable: true
|
|
4673
|
+
});
|
|
4674
|
+
Object.defineProperty(DependencyDragCreateDirective.prototype, "popupContainer", {
|
|
4675
|
+
get: function () {
|
|
4676
|
+
if (!isPresent(this.gantt.timeline) || !isPresent(this.gantt.timeline.dragPopupContainer)) {
|
|
4677
|
+
return null;
|
|
4678
|
+
}
|
|
4679
|
+
return this.gantt.timeline.dragPopupContainer;
|
|
4680
|
+
},
|
|
4681
|
+
enumerable: true,
|
|
4682
|
+
configurable: true
|
|
4683
|
+
});
|
|
4684
|
+
DependencyDragCreateDirective.prototype.ngAfterViewInit = function () {
|
|
4685
|
+
this.subscribeDraggable();
|
|
4686
|
+
this.addScrollListener();
|
|
4687
|
+
};
|
|
4688
|
+
DependencyDragCreateDirective.prototype.ngOnDestroy = function () {
|
|
4689
|
+
this.unsubscribeDraggable();
|
|
4690
|
+
this.removeScrollListener();
|
|
4691
|
+
this.fromTaskClue = null;
|
|
4692
|
+
this.cancelScroll();
|
|
4693
|
+
this.closeDragPopup();
|
|
4694
|
+
};
|
|
4695
|
+
DependencyDragCreateDirective.prototype.subscribeDraggable = function () {
|
|
4696
|
+
this.dragSubscriptions = this.gantt.timeline.timelineContainerPress
|
|
4697
|
+
.subscribe(this.handlePress.bind(this));
|
|
4698
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerDrag
|
|
4699
|
+
.subscribe(this.handleDrag.bind(this)));
|
|
4700
|
+
this.dragSubscriptions.add(this.gantt.timeline.timelineContainerRelease
|
|
4701
|
+
.subscribe(this.handleRelease.bind(this)));
|
|
4702
|
+
};
|
|
4703
|
+
DependencyDragCreateDirective.prototype.unsubscribeDraggable = function () {
|
|
4704
|
+
if (isPresent(this.dragSubscriptions)) {
|
|
4705
|
+
this.dragSubscriptions.unsubscribe();
|
|
4706
|
+
this.dragSubscriptions = null;
|
|
4707
|
+
}
|
|
4708
|
+
};
|
|
4709
|
+
DependencyDragCreateDirective.prototype.handlePress = function (_a) {
|
|
4710
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
4711
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
4712
|
+
var target = elementFromPoint(clientX, clientY);
|
|
4713
|
+
if (isDependencyDragClue(target)) {
|
|
4714
|
+
this.fromTaskClue = target;
|
|
4715
|
+
this.assignDragStartClasses(this.fromTaskClue);
|
|
4716
|
+
// use the center of the target clue as polyline starting point
|
|
4717
|
+
var dragClueCenterCoords = getElementClientCenterCoords(this.fromTaskClue);
|
|
4718
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
4719
|
+
this.polylineStartCoords = clientToOffsetCoords(dragClueCenterCoords.left, dragClueCenterCoords.top, this.container);
|
|
4720
|
+
}
|
|
4721
|
+
};
|
|
4722
|
+
DependencyDragCreateDirective.prototype.handleDrag = function (_a) {
|
|
4723
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
4724
|
+
if (isPresent(this.fromTaskClue)) {
|
|
4725
|
+
// the polyline uses `position: aboslute`, so translate the client coordinates to offset coordinates (`left` and `top` relative to the timeline container)
|
|
4726
|
+
var pointerOffsetCoords = clientToOffsetCoords(clientX, clientY, this.container);
|
|
4727
|
+
// the start coords are calculated just once per drag session in handlePress
|
|
4728
|
+
// use the current drag coords as polyline end coords
|
|
4729
|
+
this.updatePolyline(this.polylineStartCoords, pointerOffsetCoords);
|
|
4730
|
+
this.currentPointerClientCoords = { left: clientX, top: clientY };
|
|
4731
|
+
if (this.gantt.dragScrollSettings.enabled) {
|
|
4732
|
+
// use client coordinates for scroll trigger
|
|
4733
|
+
this.scrollPointIntoView(this.currentPointerClientCoords);
|
|
4734
|
+
}
|
|
4735
|
+
if (this.displayValidationTooltip) {
|
|
4736
|
+
this.updateDragPopup(pointerOffsetCoords);
|
|
4737
|
+
}
|
|
4738
|
+
}
|
|
4739
|
+
};
|
|
4740
|
+
DependencyDragCreateDirective.prototype.handleRelease = function (_a) {
|
|
4741
|
+
var _this = this;
|
|
4742
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
4743
|
+
if (!isPresent(this.fromTaskClue)) {
|
|
4744
|
+
return;
|
|
4745
|
+
}
|
|
4746
|
+
// using `originalEvent.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead
|
|
4747
|
+
var target = elementFromPoint(clientX, clientY);
|
|
4748
|
+
if (isDependencyDragClue(target) && !sameTaskClues(this.fromTaskClue, target, this.container)) {
|
|
4749
|
+
this.zone.run(function () {
|
|
4750
|
+
var _a;
|
|
4751
|
+
var fromTaskClue = _this.fromTaskClue;
|
|
4752
|
+
var toTaskClue = target;
|
|
4753
|
+
var fromTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(fromTaskClue, _this.container)];
|
|
4754
|
+
var toTask = _this.gantt.renderedTreeListItems[getClosestTaskIndex(toTaskClue, _this.container)];
|
|
4755
|
+
var dependencyType = getDependencyTypeFromTargetTasks(fromTaskClue, toTaskClue);
|
|
4756
|
+
var _b = _this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
4757
|
+
_this.gantt.dependencyAdd.emit({
|
|
4758
|
+
fromTask: fromTask,
|
|
4759
|
+
toTask: toTask,
|
|
4760
|
+
type: dependencyType,
|
|
4761
|
+
isValid: _this.gantt.validateNewDependency((_a = {},
|
|
4762
|
+
_a[fromId] = _this.mapper.extractFromTask(fromTask, 'id'),
|
|
4763
|
+
_a[toId] = _this.mapper.extractFromTask(toTask, 'id'),
|
|
4764
|
+
_a[type] = dependencyType,
|
|
4765
|
+
_a))
|
|
4766
|
+
});
|
|
4767
|
+
});
|
|
4768
|
+
}
|
|
4769
|
+
this.clearPolyline();
|
|
4770
|
+
this.removeDragStartClasses(this.fromTaskClue);
|
|
4771
|
+
this.fromTaskClue = null;
|
|
4772
|
+
this.cancelScroll();
|
|
4773
|
+
this.closeDragPopup();
|
|
4774
|
+
};
|
|
4775
|
+
DependencyDragCreateDirective.prototype.updatePolyline = function (start, end) {
|
|
4776
|
+
var points = start.left + "," + start.top + " " + end.left + "," + end.top;
|
|
4777
|
+
this.renderer.setAttribute(this.polyline, 'points', points);
|
|
4778
|
+
};
|
|
4779
|
+
DependencyDragCreateDirective.prototype.clearPolyline = function () {
|
|
4780
|
+
this.renderer.removeAttribute(this.polyline, 'points');
|
|
4781
|
+
};
|
|
4782
|
+
DependencyDragCreateDirective.prototype.assignDragStartClasses = function (dragClue) {
|
|
4783
|
+
if (!isPresent(dragClue)) {
|
|
4784
|
+
return;
|
|
4785
|
+
}
|
|
4786
|
+
this.renderer.addClass(this.container, USER_SELECT_NONE_CLASS);
|
|
4787
|
+
this.renderer.addClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
4788
|
+
var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
|
|
4789
|
+
if (isPresent(taskWrapper)) {
|
|
4790
|
+
this.renderer.addClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
4791
|
+
}
|
|
4792
|
+
};
|
|
4793
|
+
DependencyDragCreateDirective.prototype.removeDragStartClasses = function (dragClue) {
|
|
4794
|
+
if (!isPresent(dragClue)) {
|
|
4795
|
+
return;
|
|
4796
|
+
}
|
|
4797
|
+
this.renderer.removeClass(this.container, USER_SELECT_NONE_CLASS);
|
|
4798
|
+
this.renderer.removeClass(dragClue, DRAG_CLUE_HOVER_CLASS);
|
|
4799
|
+
var taskWrapper = getClosestTaskWrapper(dragClue, this.container);
|
|
4800
|
+
if (isPresent(taskWrapper)) {
|
|
4801
|
+
this.renderer.removeClass(taskWrapper, TASK_WRAPPER_DRAG_CLASS);
|
|
4802
|
+
}
|
|
4803
|
+
};
|
|
4804
|
+
DependencyDragCreateDirective.prototype.scrollPointIntoView = function (_a) {
|
|
4805
|
+
var left = _a.left, top = _a.top;
|
|
4806
|
+
this.timelineScrollService.requestScrollCancel();
|
|
4807
|
+
this.timelineScrollService.requestHorizontalScroll(left);
|
|
4808
|
+
this.timelineScrollService.requestVerticalScroll(top);
|
|
4809
|
+
};
|
|
4810
|
+
DependencyDragCreateDirective.prototype.cancelScroll = function () {
|
|
4811
|
+
this.timelineScrollService.requestScrollCancel();
|
|
4812
|
+
};
|
|
4813
|
+
DependencyDragCreateDirective.prototype.addScrollListener = function () {
|
|
4814
|
+
var _this = this;
|
|
4815
|
+
if (!isDocumentAvailable()) {
|
|
4816
|
+
return;
|
|
4817
|
+
}
|
|
4818
|
+
this.zone.runOutsideAngular(function () {
|
|
4819
|
+
return _this.scrollListenerDisposer = _this.renderer.listen(_this.container, 'scroll', function () {
|
|
4820
|
+
// update the polyline only if we're currently dragging
|
|
4821
|
+
if (isPresent(_this.fromTaskClue) && isPresent(_this.currentPointerClientCoords)) {
|
|
4822
|
+
var _a = _this.currentPointerClientCoords, left = _a.left, top_1 = _a.top;
|
|
4823
|
+
var pointerOffsetCoords = clientToOffsetCoords(left, top_1, _this.container);
|
|
4824
|
+
_this.updatePolyline(_this.polylineStartCoords, pointerOffsetCoords);
|
|
4825
|
+
if (_this.displayValidationTooltip) {
|
|
4826
|
+
_this.updateDragPopup(pointerOffsetCoords);
|
|
4827
|
+
}
|
|
4828
|
+
}
|
|
4829
|
+
});
|
|
4830
|
+
});
|
|
4831
|
+
};
|
|
4832
|
+
DependencyDragCreateDirective.prototype.removeScrollListener = function () {
|
|
4833
|
+
if (isPresent(this.scrollListenerDisposer)) {
|
|
4834
|
+
this.scrollListenerDisposer();
|
|
4835
|
+
this.scrollListenerDisposer = null;
|
|
4836
|
+
}
|
|
4837
|
+
};
|
|
4838
|
+
DependencyDragCreateDirective.prototype.openDragPopup = function () {
|
|
4839
|
+
if (isPresent(this.dragPopup)) {
|
|
4840
|
+
this.closeDragPopup();
|
|
4841
|
+
}
|
|
4842
|
+
this.dragPopup = this.popupService.open({
|
|
4843
|
+
animate: false,
|
|
4844
|
+
content: DragValidationTooltipComponent,
|
|
4845
|
+
appendTo: this.popupContainer,
|
|
4846
|
+
positionMode: 'absolute',
|
|
4847
|
+
popupClass: 'k-popup-transparent'
|
|
4848
|
+
});
|
|
4849
|
+
};
|
|
4850
|
+
DependencyDragCreateDirective.prototype.updateDragPopup = function (pointerOffsetPosition) {
|
|
4851
|
+
if (!isPresent(this.dragPopup)) {
|
|
4852
|
+
this.openDragPopup();
|
|
4853
|
+
}
|
|
4854
|
+
var tooltip = this.dragPopup.content.instance;
|
|
4855
|
+
var _a = this.getTooltipContext(), fromTaskName = _a.fromTaskName, toTaskName = _a.toTaskName, isValid = _a.isValid, showValidityStatus = _a.showValidityStatus;
|
|
4856
|
+
if (tooltip.fromTaskName !== fromTaskName ||
|
|
4857
|
+
tooltip.toTaskName !== toTaskName ||
|
|
4858
|
+
tooltip.isValid !== isValid ||
|
|
4859
|
+
tooltip.showValidityStatus !== showValidityStatus) {
|
|
4860
|
+
tooltip.fromTaskName = fromTaskName;
|
|
4861
|
+
tooltip.toTaskName = toTaskName;
|
|
4862
|
+
tooltip.isValid = isValid;
|
|
4863
|
+
tooltip.showValidityStatus = showValidityStatus;
|
|
4864
|
+
this.dragPopup.content.changeDetectorRef.detectChanges();
|
|
4865
|
+
}
|
|
4866
|
+
this.dragPopup.popup.instance.offset = this.normalizePopupPosition(pointerOffsetPosition);
|
|
4867
|
+
this.dragPopup.popup.changeDetectorRef.detectChanges();
|
|
4868
|
+
};
|
|
4869
|
+
DependencyDragCreateDirective.prototype.closeDragPopup = function () {
|
|
4870
|
+
if (isPresent(this.dragPopup)) {
|
|
4871
|
+
this.dragPopup.close();
|
|
4872
|
+
this.dragPopup = null;
|
|
4873
|
+
}
|
|
4874
|
+
};
|
|
4875
|
+
DependencyDragCreateDirective.prototype.extractTaskName = function (target) {
|
|
4876
|
+
if (!isTaskWrapper(target, this.container)) {
|
|
4877
|
+
return null;
|
|
4878
|
+
}
|
|
4879
|
+
var taskIndex = getClosestTaskIndex(target, this.container);
|
|
4880
|
+
var task = this.gantt.renderedTreeListItems[taskIndex];
|
|
4881
|
+
var taskName = this.mapper.extractFromTask(task, 'title');
|
|
4882
|
+
return taskName;
|
|
4883
|
+
};
|
|
4884
|
+
DependencyDragCreateDirective.prototype.getTooltipContext = function () {
|
|
4885
|
+
var _a;
|
|
4886
|
+
var fromTaskName = this.extractTaskName(this.fromTaskClue);
|
|
4887
|
+
var currentPointerTarget = elementFromPoint(this.currentPointerClientCoords.left, this.currentPointerClientCoords.top);
|
|
4888
|
+
var toTaskName = isTaskWrapper(currentPointerTarget, this.container) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container) ?
|
|
4889
|
+
this.extractTaskName(currentPointerTarget) :
|
|
4890
|
+
'';
|
|
4891
|
+
var showValidityStatus = isDependencyDragClue(currentPointerTarget) && !sameTaskClues(this.fromTaskClue, currentPointerTarget, this.container);
|
|
4892
|
+
var _b = this.mapper.dependencyFields, fromId = _b.fromId, toId = _b.toId, type = _b.type;
|
|
4893
|
+
return {
|
|
4894
|
+
fromTaskName: fromTaskName,
|
|
4895
|
+
toTaskName: toTaskName,
|
|
4896
|
+
showValidityStatus: showValidityStatus,
|
|
4897
|
+
isValid: showValidityStatus && this.gantt.validateNewDependency((_a = {},
|
|
4898
|
+
_a[fromId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(this.fromTaskClue, this.container)], 'id'),
|
|
4899
|
+
_a[toId] = this.mapper.extractFromTask(this.gantt.renderedTreeListItems[getClosestTaskIndex(currentPointerTarget, this.container)], 'id'),
|
|
4900
|
+
_a[type] = getDependencyTypeFromTargetTasks(this.fromTaskClue, currentPointerTarget),
|
|
4901
|
+
_a))
|
|
4902
|
+
};
|
|
4903
|
+
};
|
|
4904
|
+
/**
|
|
4905
|
+
* Restricts the popup position to not go below the scroll height or width of the container.
|
|
4906
|
+
* Flips the position of the popup when there's not enough vertical space in the visible part of the container to render the popup.
|
|
4907
|
+
*/
|
|
4908
|
+
DependencyDragCreateDirective.prototype.normalizePopupPosition = function (pointerOffsetPosition) {
|
|
4909
|
+
var top = pointerOffsetPosition.top + DEFAULT_POPUP_VERTICAL_MARGIN;
|
|
4910
|
+
var containerClientBottom = this.container.clientHeight + this.container.scrollTop;
|
|
4911
|
+
var popupHeight = this.dragPopup.popupElement.querySelector('.k-tooltip').clientHeight;
|
|
4912
|
+
var enoughSpaceToRender = top < containerClientBottom - popupHeight;
|
|
4913
|
+
// flip the popup above the pointer if there's not enough space in the bottom of the container
|
|
4914
|
+
if (!enoughSpaceToRender) {
|
|
4915
|
+
// margin * 2 to account for the already applied margin
|
|
4916
|
+
top -= popupHeight + (DEFAULT_POPUP_VERTICAL_MARGIN * 2);
|
|
4917
|
+
}
|
|
4918
|
+
// center the popup horizontally according to the pointer position
|
|
4919
|
+
var popupWidth = this.dragPopup.popupElement.querySelector('.k-tooltip').clientWidth;
|
|
4920
|
+
var left = pointerOffsetPosition.left - popupWidth / 2;
|
|
4921
|
+
// don't allow the popup to be cut out of the viewport
|
|
4922
|
+
var minLeftTop = 0;
|
|
4923
|
+
// restrict the popup from being positioned beyond or before the available scrollable space
|
|
4924
|
+
return {
|
|
4925
|
+
left: fitToRange(left, minLeftTop, this.container.scrollWidth - popupWidth),
|
|
4926
|
+
top: fitToRange(top, minLeftTop, this.container.scrollHeight - popupHeight)
|
|
4927
|
+
};
|
|
4928
|
+
};
|
|
4929
|
+
__decorate([
|
|
4930
|
+
Input(),
|
|
4931
|
+
__metadata("design:type", Boolean)
|
|
4932
|
+
], DependencyDragCreateDirective.prototype, "displayValidationTooltip", void 0);
|
|
4933
|
+
DependencyDragCreateDirective = __decorate([
|
|
4934
|
+
Directive({
|
|
4935
|
+
selector: '[kendoGanttDependencyDragCreate]'
|
|
4936
|
+
}),
|
|
4937
|
+
__metadata("design:paramtypes", [GanttComponent,
|
|
4938
|
+
NgZone,
|
|
4939
|
+
Renderer2,
|
|
4940
|
+
MappingService,
|
|
4941
|
+
PopupService,
|
|
4942
|
+
TimelineScrollService])
|
|
4943
|
+
], DependencyDragCreateDirective);
|
|
4944
|
+
return DependencyDragCreateDirective;
|
|
4945
|
+
}());
|
|
4946
|
+
|
|
4947
|
+
/**
|
|
4948
|
+
* @hidden
|
|
4949
|
+
*/
|
|
4950
|
+
var ScrollDirection;
|
|
4951
|
+
(function (ScrollDirection) {
|
|
4952
|
+
ScrollDirection[ScrollDirection["Backwards"] = -1] = "Backwards";
|
|
4953
|
+
ScrollDirection[ScrollDirection["Forward"] = 1] = "Forward";
|
|
4954
|
+
})(ScrollDirection || (ScrollDirection = {}));
|
|
4955
|
+
/**
|
|
4956
|
+
* @hidden
|
|
4957
|
+
*/
|
|
4958
|
+
var ScrollAxis;
|
|
4959
|
+
(function (ScrollAxis) {
|
|
4960
|
+
ScrollAxis["Vertical"] = "scrollTop";
|
|
4961
|
+
ScrollAxis["Horizontal"] = "scrollLeft";
|
|
4962
|
+
})(ScrollAxis || (ScrollAxis = {}));
|
|
4963
|
+
|
|
4964
|
+
/**
|
|
4965
|
+
* @hidden
|
|
4966
|
+
*
|
|
4967
|
+
* Checks if the beginning of the scrollable element is reached (top/left).
|
|
4968
|
+
* Floors the top value.
|
|
4969
|
+
*/
|
|
4970
|
+
var isUpperLimitReached = function (element, axis) { return Math.floor(element[axis]) <= 0; };
|
|
4971
|
+
/**
|
|
4972
|
+
* @hidden
|
|
4973
|
+
*
|
|
4974
|
+
* Checks if the end of the scrollable element is reached (bottom/right).
|
|
4975
|
+
* Ceils the top value.
|
|
4976
|
+
*/
|
|
4977
|
+
var isBottomLimitReached = function (element, axis) {
|
|
4978
|
+
var elementSize = axis === ScrollAxis.Horizontal ?
|
|
4979
|
+
element.scrollWidth - element.clientWidth :
|
|
4980
|
+
element.scrollHeight - element.clientHeight;
|
|
4981
|
+
return Math.ceil(element[axis]) >= elementSize;
|
|
4982
|
+
};
|
|
4983
|
+
/**
|
|
4984
|
+
* @hidden
|
|
4985
|
+
*
|
|
4986
|
+
* Scrolls the element in the given direction by the provided step in the provided scroll axis.
|
|
4987
|
+
*
|
|
4988
|
+
* If the targeted scroll incrementation doesn't yield any result due to device pixel ratio issues (https://github.com/dimitar-pechev/RenderingIndependentScrollOffsets#readme),
|
|
4989
|
+
* increments the step with 1px and again attempts to change the scrollTop of the element, until the content is actually scrolled.
|
|
4990
|
+
*
|
|
4991
|
+
* Cuts the operation short after 20 unsuccessful attempts to prevent infinite loops in possible corner-case scenarios.
|
|
4992
|
+
*/
|
|
4993
|
+
var scrollElement = function (element, step, direction, scrollAxis) {
|
|
4994
|
+
if (!(isPresent(element) && isDocumentAvailable())) {
|
|
4995
|
+
return;
|
|
4996
|
+
}
|
|
4997
|
+
var initialScrollPosition = element[scrollAxis];
|
|
4998
|
+
var currentStep = step;
|
|
4999
|
+
var iterations = 0;
|
|
5000
|
+
while (initialScrollPosition === element[scrollAxis] &&
|
|
5001
|
+
!(direction === ScrollDirection.Backwards && isUpperLimitReached(element, scrollAxis)) &&
|
|
5002
|
+
!(direction === ScrollDirection.Forward && isBottomLimitReached(element, scrollAxis)) &&
|
|
5003
|
+
iterations < 20 // cut the operation short in 20 attempts - in case of a wild corner case
|
|
5004
|
+
) {
|
|
5005
|
+
element[scrollAxis] += (currentStep * direction);
|
|
5006
|
+
// try with a larger step if the current one doesn't update the scroll position successfully
|
|
5007
|
+
currentStep += 1;
|
|
5008
|
+
iterations += 1;
|
|
5009
|
+
}
|
|
5010
|
+
};
|
|
5011
|
+
/**
|
|
5012
|
+
* @hidden
|
|
5013
|
+
*
|
|
5014
|
+
* As client coordinates are not restricted to the range 0px - {viewportSize}px, but can have negative starting values or ending values greater than the viewport size,
|
|
5015
|
+
* this function extracts the visible boundaries of the provided element - fall-backing to 0 when the top/left are below 0,
|
|
5016
|
+
* and fall-backing to the actual visible size of the container for bottom/right.
|
|
5017
|
+
*/
|
|
5018
|
+
var getViewportBoundaries = function (element) {
|
|
5019
|
+
var elementRect = element.getBoundingClientRect();
|
|
5020
|
+
// if the beginning of the scrollable container is above/before the current viewport, fall-back to 0
|
|
5021
|
+
var topLimit = Math.max(elementRect.top, 0);
|
|
5022
|
+
var leftLimit = Math.max(elementRect.left, 0);
|
|
5023
|
+
// if the end of the scrollable container is beneath/after the current viewport, fall-back to its client height
|
|
5024
|
+
// add the distance from the start of the viewport to the beginning of the container to ensure scrolling bottom begins when the actual end of the container is reached
|
|
5025
|
+
var bottomLimit = topLimit + Math.min(elementRect.bottom, element.clientHeight);
|
|
5026
|
+
var rightLimit = leftLimit + Math.min(elementRect.right, element.clientWidth);
|
|
5027
|
+
return {
|
|
5028
|
+
top: topLimit,
|
|
5029
|
+
bottom: bottomLimit,
|
|
5030
|
+
left: leftLimit,
|
|
5031
|
+
right: rightLimit
|
|
5032
|
+
};
|
|
5033
|
+
};
|
|
5034
|
+
|
|
5035
|
+
/**
|
|
5036
|
+
* @hidden
|
|
5037
|
+
*/
|
|
5038
|
+
var TimelineScrollableDirective = /** @class */ (function () {
|
|
5039
|
+
function TimelineScrollableDirective(timelineScrollableContainer, scrollService, zone) {
|
|
5040
|
+
this.timelineScrollableContainer = timelineScrollableContainer;
|
|
5041
|
+
this.scrollService = scrollService;
|
|
5042
|
+
this.zone = zone;
|
|
5043
|
+
this.subscriptions = new Subscription();
|
|
5044
|
+
this.subscriptions.add(this.scrollService.horizontalScroll
|
|
5045
|
+
.subscribe(this.scrollHorizontallyTo.bind(this)));
|
|
5046
|
+
this.subscriptions.add(this.scrollService.verticalScroll
|
|
5047
|
+
.subscribe(this.scrollVerticallyTo.bind(this)));
|
|
5048
|
+
this.subscriptions.add(this.scrollService.scrollCancel
|
|
5049
|
+
.subscribe(this.cancelScroll.bind(this)));
|
|
5050
|
+
}
|
|
5051
|
+
TimelineScrollableDirective.prototype.ngOnDestroy = function () {
|
|
5052
|
+
this.subscriptions.unsubscribe();
|
|
5053
|
+
};
|
|
5054
|
+
TimelineScrollableDirective.prototype.scrollHorizontallyTo = function (left) {
|
|
5055
|
+
var _this = this;
|
|
5056
|
+
this.zone.runOutsideAngular(function () {
|
|
5057
|
+
var container = _this.timelineScrollableContainer.nativeElement;
|
|
5058
|
+
var visibleBoundaries = getViewportBoundaries(container);
|
|
5059
|
+
if (left < visibleBoundaries.left + _this.scrollSettings.threshold) {
|
|
5060
|
+
_this.horizontalScrollInterval = setInterval(function () {
|
|
5061
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Horizontal);
|
|
5062
|
+
}, _this.scrollSettings.interval);
|
|
5063
|
+
}
|
|
5064
|
+
else if (left > visibleBoundaries.right - _this.scrollSettings.threshold) {
|
|
5065
|
+
_this.horizontalScrollInterval = setInterval(function () {
|
|
5066
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Horizontal);
|
|
5067
|
+
}, _this.scrollSettings.interval);
|
|
5068
|
+
}
|
|
5069
|
+
});
|
|
5070
|
+
};
|
|
5071
|
+
TimelineScrollableDirective.prototype.scrollVerticallyTo = function (top) {
|
|
5072
|
+
var _this = this;
|
|
5073
|
+
this.zone.runOutsideAngular(function () {
|
|
5074
|
+
var container = _this.timelineScrollableContainer.nativeElement;
|
|
5075
|
+
var visibleBoundaries = getViewportBoundaries(container);
|
|
5076
|
+
if (top < visibleBoundaries.top + _this.scrollSettings.threshold) {
|
|
5077
|
+
_this.verticalScrollInterval = setInterval(function () {
|
|
5078
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Backwards, ScrollAxis.Vertical);
|
|
5079
|
+
}, _this.scrollSettings.interval);
|
|
5080
|
+
}
|
|
5081
|
+
else if (top > visibleBoundaries.bottom - _this.scrollSettings.threshold) {
|
|
5082
|
+
_this.verticalScrollInterval = setInterval(function () {
|
|
5083
|
+
return scrollElement(container, _this.scrollSettings.step, ScrollDirection.Forward, ScrollAxis.Vertical);
|
|
5084
|
+
}, _this.scrollSettings.interval);
|
|
5085
|
+
}
|
|
5086
|
+
});
|
|
5087
|
+
};
|
|
5088
|
+
TimelineScrollableDirective.prototype.cancelScroll = function () {
|
|
5089
|
+
if (isPresent(this.verticalScrollInterval)) {
|
|
5090
|
+
clearInterval(this.verticalScrollInterval);
|
|
5091
|
+
this.verticalScrollInterval = null;
|
|
5092
|
+
}
|
|
5093
|
+
if (isPresent(this.horizontalScrollInterval)) {
|
|
5094
|
+
clearInterval(this.horizontalScrollInterval);
|
|
5095
|
+
this.horizontalScrollInterval = null;
|
|
5096
|
+
}
|
|
5097
|
+
};
|
|
5098
|
+
__decorate([
|
|
5099
|
+
Input(),
|
|
5100
|
+
__metadata("design:type", Object)
|
|
5101
|
+
], TimelineScrollableDirective.prototype, "scrollSettings", void 0);
|
|
5102
|
+
TimelineScrollableDirective = __decorate([
|
|
5103
|
+
Directive({
|
|
5104
|
+
selector: '[kendoGanttTimelineScrollable]'
|
|
5105
|
+
}),
|
|
5106
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
5107
|
+
TimelineScrollService,
|
|
5108
|
+
NgZone])
|
|
5109
|
+
], TimelineScrollableDirective);
|
|
5110
|
+
return TimelineScrollableDirective;
|
|
5111
|
+
}());
|
|
5112
|
+
|
|
4174
5113
|
var TimelineDayViewComponent = /** @class */ (function (_super) {
|
|
4175
5114
|
__extends(TimelineDayViewComponent, _super);
|
|
4176
5115
|
function TimelineDayViewComponent(optionChangesService, dependencyDomService) {
|
|
@@ -4918,6 +5857,8 @@ var IMPORTED_MODULES = [
|
|
|
4918
5857
|
ButtonsModule,
|
|
4919
5858
|
DialogModule,
|
|
4920
5859
|
EventsModule,
|
|
5860
|
+
PopupModule,
|
|
5861
|
+
DraggableModule,
|
|
4921
5862
|
TabStripModule,
|
|
4922
5863
|
GridModule,
|
|
4923
5864
|
DropDownsModule
|
|
@@ -4950,6 +5891,7 @@ var DECLARATIONS = [
|
|
|
4950
5891
|
FooterTemplateDirective,
|
|
4951
5892
|
GanttExpandableDirective,
|
|
4952
5893
|
GanttDependencyDirective,
|
|
5894
|
+
DependencyDragCreateDirective,
|
|
4953
5895
|
TimelineDayViewComponent,
|
|
4954
5896
|
TimelineWeekViewComponent,
|
|
4955
5897
|
TimelineMonthViewComponent,
|
|
@@ -4958,9 +5900,12 @@ var DECLARATIONS = [
|
|
|
4958
5900
|
CustomMessagesComponent,
|
|
4959
5901
|
LocalizedMessagesDirective,
|
|
4960
5902
|
GanttAddTaskComponent,
|
|
5903
|
+
DragValidationTooltipComponent,
|
|
5904
|
+
TimelineScrollableDirective,
|
|
4961
5905
|
DependenciesTableComponent,
|
|
4962
5906
|
TaskFieldsComponent
|
|
4963
5907
|
];
|
|
5908
|
+
var ɵ0$3 = touchEnabled;
|
|
4964
5909
|
/**
|
|
4965
5910
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
4966
5911
|
* definition for the Gantt component.
|
|
@@ -5000,58 +5945,21 @@ var GanttModule = /** @class */ (function () {
|
|
|
5000
5945
|
imports: IMPORTED_MODULES.slice(),
|
|
5001
5946
|
declarations: DECLARATIONS.slice(),
|
|
5002
5947
|
exports: DECLARATIONS.slice(),
|
|
5948
|
+
entryComponents: [DragValidationTooltipComponent],
|
|
5003
5949
|
providers: [{
|
|
5004
5950
|
provide: L10N_PREFIX,
|
|
5005
5951
|
useValue: 'kendo.gantt'
|
|
5952
|
+
}, {
|
|
5953
|
+
provide: TOUCH_ENABLED,
|
|
5954
|
+
useValue: ɵ0$3
|
|
5006
5955
|
}]
|
|
5007
5956
|
})
|
|
5008
5957
|
], GanttModule);
|
|
5009
5958
|
return GanttModule;
|
|
5010
5959
|
}());
|
|
5011
5960
|
|
|
5012
|
-
/**
|
|
5013
|
-
* @hidden
|
|
5014
|
-
*/
|
|
5015
|
-
var PreventableEvent = /** @class */ (function () {
|
|
5016
|
-
function PreventableEvent() {
|
|
5017
|
-
this.prevented = false;
|
|
5018
|
-
}
|
|
5019
|
-
/**
|
|
5020
|
-
* Prevents the default action for a specified event.
|
|
5021
|
-
* In this way, the source component suppresses
|
|
5022
|
-
* the built-in behavior that follows the event.
|
|
5023
|
-
*/
|
|
5024
|
-
PreventableEvent.prototype.preventDefault = function () {
|
|
5025
|
-
this.prevented = true;
|
|
5026
|
-
};
|
|
5027
|
-
/**
|
|
5028
|
-
* Returns `true` if the event was prevented
|
|
5029
|
-
* by any of its subscribers.
|
|
5030
|
-
*
|
|
5031
|
-
* @returns `true` if the default action was prevented.
|
|
5032
|
-
* Otherwise, returns `false`.
|
|
5033
|
-
*/
|
|
5034
|
-
PreventableEvent.prototype.isDefaultPrevented = function () {
|
|
5035
|
-
return this.prevented;
|
|
5036
|
-
};
|
|
5037
|
-
return PreventableEvent;
|
|
5038
|
-
}());
|
|
5039
|
-
|
|
5040
|
-
/**
|
|
5041
|
-
* Called every time a user leaves an edited cell.
|
|
5042
|
-
*/
|
|
5043
|
-
var CellCloseEvent = /** @class */ (function (_super) {
|
|
5044
|
-
__extends(CellCloseEvent, _super);
|
|
5045
|
-
function CellCloseEvent(options) {
|
|
5046
|
-
var _this = _super.call(this) || this;
|
|
5047
|
-
Object.assign(_this, options);
|
|
5048
|
-
return _this;
|
|
5049
|
-
}
|
|
5050
|
-
return CellCloseEvent;
|
|
5051
|
-
}(PreventableEvent));
|
|
5052
|
-
|
|
5053
5961
|
/**
|
|
5054
5962
|
* Generated bundle index. Do not edit.
|
|
5055
5963
|
*/
|
|
5056
5964
|
|
|
5057
|
-
export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttAddTaskComponent, DependenciesTableComponent, EditDialogComponent, EditService, TaskFieldsComponent, CustomMessagesComponent, GanttLocalizationService, LocalizedMessagesDirective, Messages, PreventableEvent, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, DependencyType, CellCloseEvent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };
|
|
5965
|
+
export { MappingService, OptionChangesService, TOUCH_ENABLED, DependencyDomService, GanttDependencyDirective, DragValidationTooltipComponent, GanttAddTaskComponent, DependenciesTableComponent, EditDialogComponent, EditService, TaskFieldsComponent, CustomMessagesComponent, GanttLocalizationService, LocalizedMessagesDirective, Messages, PreventableEvent, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, TimelineScrollableDirective, TimelineScrollService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, DependencyDragCreateDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, DependencyType, CellCloseEvent, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };
|