@syncfusion/ej2-gantt 20.4.53 → 21.1.35
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/CHANGELOG.md +27 -0
- package/README.md +1 -1
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +1104 -450
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1084 -430
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +20 -20
- package/src/gantt/actions/cell-edit.js +8 -6
- package/src/gantt/actions/chart-scroll.d.ts +1 -0
- package/src/gantt/actions/chart-scroll.js +15 -4
- package/src/gantt/actions/connector-line-edit.js +39 -28
- package/src/gantt/actions/context-menu.js +5 -5
- package/src/gantt/actions/critical-path.js +10 -8
- package/src/gantt/actions/dependency.js +28 -12
- package/src/gantt/actions/dialog-edit.js +41 -21
- package/src/gantt/actions/edit.js +56 -55
- package/src/gantt/actions/filter.d.ts +2 -1
- package/src/gantt/actions/filter.js +88 -2
- package/src/gantt/actions/keyboard.js +0 -1
- package/src/gantt/actions/pdf-export.d.ts +3 -1
- package/src/gantt/actions/pdf-export.js +12 -6
- package/src/gantt/actions/rowdragdrop.js +2 -2
- package/src/gantt/actions/selection.js +5 -2
- package/src/gantt/actions/taskbar-edit.d.ts +5 -0
- package/src/gantt/actions/taskbar-edit.js +114 -10
- package/src/gantt/base/date-processor.js +78 -52
- package/src/gantt/base/gantt-chart.js +20 -4
- package/src/gantt/base/gantt-model.d.ts +43 -0
- package/src/gantt/base/gantt.d.ts +39 -1
- package/src/gantt/base/gantt.js +79 -33
- package/src/gantt/base/interface.d.ts +2 -0
- package/src/gantt/base/task-processor.js +133 -98
- package/src/gantt/base/tree-grid.js +31 -1
- package/src/gantt/base/utils.js +1 -1
- package/src/gantt/export/export-helper.js +6 -0
- package/src/gantt/renderer/chart-rows.d.ts +2 -0
- package/src/gantt/renderer/chart-rows.js +156 -24
- package/src/gantt/renderer/connector-line.js +50 -20
- package/src/gantt/renderer/edit-tooltip.js +0 -3
- package/src/gantt/renderer/event-marker.js +4 -1
- package/src/gantt/renderer/nonworking-day.js +4 -1
- package/src/gantt/renderer/timeline.js +3 -3
- package/src/gantt/renderer/tooltip.js +101 -33
- package/styles/bootstrap-dark.css +33 -10
- package/styles/bootstrap.css +31 -10
- package/styles/bootstrap4.css +28 -7
- package/styles/bootstrap5-dark.css +30 -9
- package/styles/bootstrap5.css +30 -9
- package/styles/fabric-dark.css +28 -7
- package/styles/fabric.css +28 -7
- package/styles/fluent-dark.css +56 -29
- package/styles/fluent.css +56 -29
- package/styles/gantt/_bootstrap-dark-definition.scss +5 -4
- package/styles/gantt/_bootstrap-definition.scss +5 -4
- package/styles/gantt/_bootstrap4-definition.scss +3 -2
- package/styles/gantt/_bootstrap5-definition.scss +15 -14
- package/styles/gantt/_fabric-dark-definition.scss +3 -2
- package/styles/gantt/_fabric-definition.scss +3 -2
- package/styles/gantt/_fluent-definition.scss +18 -17
- package/styles/gantt/_fusionnew-definition.scss +5 -4
- package/styles/gantt/_highcontrast-definition.scss +3 -2
- package/styles/gantt/_highcontrast-light-definition.scss +3 -2
- package/styles/gantt/_layout.scss +45 -13
- package/styles/gantt/_material-dark-definition.scss +3 -2
- package/styles/gantt/_material-definition.scss +3 -2
- package/styles/gantt/_tailwind-definition.scss +9 -8
- package/styles/gantt/_theme.scss +25 -6
- package/styles/gantt/bootstrap-dark.css +33 -10
- package/styles/gantt/bootstrap.css +31 -10
- package/styles/gantt/bootstrap4.css +28 -7
- package/styles/gantt/bootstrap5-dark.css +30 -9
- package/styles/gantt/bootstrap5.css +30 -9
- package/styles/gantt/fabric-dark.css +28 -7
- package/styles/gantt/fabric.css +28 -7
- package/styles/gantt/fluent-dark.css +56 -29
- package/styles/gantt/fluent.css +56 -29
- package/styles/gantt/highcontrast-light.css +28 -9
- package/styles/gantt/highcontrast.css +28 -7
- package/styles/gantt/material-dark.css +31 -14
- package/styles/gantt/material.css +28 -7
- package/styles/gantt/tailwind-dark.css +28 -7
- package/styles/gantt/tailwind.css +28 -7
- package/styles/highcontrast-light.css +28 -9
- package/styles/highcontrast.css +28 -7
- package/styles/material-dark.css +31 -14
- package/styles/material.css +28 -7
- package/styles/tailwind-dark.css +28 -7
- package/styles/tailwind.css +28 -7
- package/styles/gantt/_material3-definition.scss +0 -218
|
@@ -303,9 +303,16 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
303
303
|
* @private
|
|
304
304
|
*/
|
|
305
305
|
ConnectorLine.prototype.getHeightValue = function (data) {
|
|
306
|
-
|
|
307
|
-
(
|
|
308
|
-
|
|
306
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
307
|
+
return (data.parentIndex * this.parent.rowHeight) > (data.childIndex * this.parent.rowHeight) ?
|
|
308
|
+
((data.parentIndex * this.parent.rowHeight) - (data.childIndex * this.parent.rowHeight)) :
|
|
309
|
+
((data.childIndex * this.parent.rowHeight) - (data.parentIndex * this.parent.rowHeight));
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
|
|
313
|
+
((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
|
|
314
|
+
((data.childIndex * data.rowHeight) - (data.parentIndex * data.rowHeight));
|
|
315
|
+
}
|
|
309
316
|
};
|
|
310
317
|
/**
|
|
311
318
|
* To get sstype2 inner element width.
|
|
@@ -382,7 +389,30 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
382
389
|
var heightValue = isVirtual ? connectorLine.height : (height + isMilestoneValue);
|
|
383
390
|
var borderTopWidth = 0;
|
|
384
391
|
var addTop = 0;
|
|
385
|
-
|
|
392
|
+
var parentOverlapTopValue = 0;
|
|
393
|
+
var childOverlapTopValue = 0;
|
|
394
|
+
var count = 0;
|
|
395
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
396
|
+
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
397
|
+
if (this.parent.getRowByIndex(i).style.display != 'none') {
|
|
398
|
+
if (count < data.parentIndex) {
|
|
399
|
+
count++;
|
|
400
|
+
parentOverlapTopValue = parentOverlapTopValue + this.parent.getRowByIndex(i).offsetHeight;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
count = 0;
|
|
405
|
+
for (var j = 0; j < this.parent.currentViewData.length; j++) {
|
|
406
|
+
if (this.parent.getRowByIndex(j).style.display != 'none') {
|
|
407
|
+
if (count < data.childIndex) {
|
|
408
|
+
count++;
|
|
409
|
+
childOverlapTopValue = childOverlapTopValue + this.parent.getRowByIndex(j).offsetHeight;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
|
|
414
|
+
}
|
|
415
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
|
|
386
416
|
var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
387
417
|
var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
388
418
|
var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
@@ -475,7 +505,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
475
505
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
476
506
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
477
507
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
478
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
508
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
479
509
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
480
510
|
div = div + eLine;
|
|
481
511
|
div = div + direction + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -495,7 +525,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
495
525
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
496
526
|
}
|
|
497
527
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
498
|
-
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
528
|
+
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine.top : ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
499
529
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
500
530
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
501
531
|
div = div + eLine;
|
|
@@ -527,7 +557,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
527
557
|
}
|
|
528
558
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
529
559
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
530
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
560
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
531
561
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
532
562
|
div = div + rightArrow;
|
|
533
563
|
div = div + direction + '10px;' + this.getBorderStyles((this.parent.enableRtl ? 'right' : 'left'), 10) +
|
|
@@ -557,7 +587,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
557
587
|
}
|
|
558
588
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
559
589
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
560
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
590
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
561
591
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
562
592
|
div = div + rightArrow;
|
|
563
593
|
div = div + direction + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -583,7 +613,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
583
613
|
}
|
|
584
614
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
585
615
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
586
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
616
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
587
617
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
588
618
|
div = div + rightArrow;
|
|
589
619
|
div = div + direction + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -596,7 +626,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
596
626
|
}
|
|
597
627
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
598
628
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
599
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
629
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
600
630
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
601
631
|
div = div + rightArrow;
|
|
602
632
|
div = div + direction + '10px;' + duplicateStingTwo;
|
|
@@ -609,7 +639,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
609
639
|
}
|
|
610
640
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
611
641
|
div = div + direction + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
612
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
642
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
613
643
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
614
644
|
div = div + eLine;
|
|
615
645
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
@@ -629,7 +659,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
629
659
|
}
|
|
630
660
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
631
661
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
632
|
-
((data.parentIndex * data.rowHeight) + addTop +
|
|
662
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
633
663
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
634
664
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
635
665
|
div = div + eLine;
|
|
@@ -647,7 +677,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
647
677
|
}
|
|
648
678
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
649
679
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
650
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
680
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
651
681
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
652
682
|
div = div + eLine;
|
|
653
683
|
div = div + direction + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -671,7 +701,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
671
701
|
}
|
|
672
702
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
673
703
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
674
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
704
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
675
705
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
676
706
|
div = div + eLine;
|
|
677
707
|
div = div + (isMilestoneParent ? direction + '-1px;' : '') + 'width:' +
|
|
@@ -697,7 +727,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
697
727
|
}
|
|
698
728
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
699
729
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
700
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
730
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
701
731
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
702
732
|
div = div + duplicateStingOne;
|
|
703
733
|
div = div + eLine;
|
|
@@ -720,7 +750,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
720
750
|
}
|
|
721
751
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
722
752
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
723
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
753
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
724
754
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
725
755
|
div = div + leftArrow;
|
|
726
756
|
div = div + (direction + ((data.childLeft + data.childWidth) -
|
|
@@ -749,7 +779,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
749
779
|
}
|
|
750
780
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
751
781
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
752
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
782
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
753
783
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
754
784
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
755
785
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -777,7 +807,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
777
807
|
}
|
|
778
808
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
779
809
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
780
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
810
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
781
811
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
782
812
|
div = div + duplicateStingOne;
|
|
783
813
|
div = div + eLine;
|
|
@@ -795,7 +825,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
795
825
|
}
|
|
796
826
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
797
827
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
798
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
828
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
799
829
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
800
830
|
div = div + eLine;
|
|
801
831
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -820,7 +850,7 @@ var ConnectorLine = /** @class */ (function () {
|
|
|
820
850
|
}
|
|
821
851
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
822
852
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine.top :
|
|
823
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
853
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
824
854
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
825
855
|
div = div + eLine;
|
|
826
856
|
div = div + direction + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -73,15 +73,12 @@ var EditTooltip = /** @class */ (function () {
|
|
|
73
73
|
this.parent.tooltipModule.toolTipObj.close();
|
|
74
74
|
this.updateTooltip(segmentIndex);
|
|
75
75
|
if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointLeftDrag') {
|
|
76
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
77
76
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + cls.connectorPointLeft));
|
|
78
77
|
}
|
|
79
78
|
else if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointRightDrag') {
|
|
80
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
81
79
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + cls.connectorPointRight));
|
|
82
80
|
}
|
|
83
81
|
else {
|
|
84
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
85
82
|
this.toolTipObj.open(this.taskbarEdit.taskBarEditElement);
|
|
86
83
|
}
|
|
87
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement, formatUnit, remove, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
1
|
+
import { createElement, formatUnit, remove, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
2
2
|
import * as cls from '../base/css-constants';
|
|
3
3
|
var EventMarker = /** @class */ (function () {
|
|
4
4
|
function EventMarker(gantt) {
|
|
@@ -65,6 +65,9 @@ var EventMarker = /** @class */ (function () {
|
|
|
65
65
|
});
|
|
66
66
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
67
67
|
spanElement[property] = this.parent.eventMarkers[i].label;
|
|
68
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
69
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
70
|
+
}
|
|
68
71
|
if (this.parent.enableRtl) {
|
|
69
72
|
spanElement.style.right = '5px';
|
|
70
73
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement, formatUnit, remove } from '@syncfusion/ej2-base';
|
|
1
|
+
import { createElement, formatUnit, remove, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
2
2
|
import * as cls from '../base/css-constants';
|
|
3
3
|
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
4
4
|
var NonWorkingDay = /** @class */ (function () {
|
|
@@ -91,6 +91,9 @@ var NonWorkingDay = /** @class */ (function () {
|
|
|
91
91
|
});
|
|
92
92
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
93
93
|
spanElement[property] = this.parent.holidays[i].label ? this.parent.holidays[i].label : '';
|
|
94
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
95
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
96
|
+
}
|
|
94
97
|
holidayDiv.appendChild(spanElement);
|
|
95
98
|
if (this.parent.holidays[i].cssClass) {
|
|
96
99
|
holidayDiv.classList.add(this.parent.holidays[i].cssClass);
|
|
@@ -170,7 +170,7 @@ var Timeline = /** @class */ (function () {
|
|
|
170
170
|
else {
|
|
171
171
|
var value = property === 'topTier' ? 'bottomTier' : 'topTier';
|
|
172
172
|
var assignValue = 'bottomTier';
|
|
173
|
-
if (newTimeline[assignValue].unit != "None") {
|
|
173
|
+
if (newTimeline["" + assignValue].unit != "None") {
|
|
174
174
|
_this.customTimelineSettings[value] = __assign({}, newTimeline[assignValue]);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -473,7 +473,7 @@ var Timeline = /** @class */ (function () {
|
|
|
473
473
|
else {
|
|
474
474
|
secondValue = sortedUnitLevels[i + 1];
|
|
475
475
|
}
|
|
476
|
-
if (count >= firstValue[tier].count) {
|
|
476
|
+
if (count >= firstValue["" + tier].count) {
|
|
477
477
|
currentZoomCollection = sortedUnitLevels[i];
|
|
478
478
|
checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
|
|
479
479
|
if (tier === "bottomTier") {
|
|
@@ -491,7 +491,7 @@ var Timeline = /** @class */ (function () {
|
|
|
491
491
|
}
|
|
492
492
|
break;
|
|
493
493
|
}
|
|
494
|
-
else if (count < firstValue[tier].count && count > secondValue[tier].count) {
|
|
494
|
+
else if (count < firstValue["" + tier].count && count > secondValue["" + tier].count) {
|
|
495
495
|
currentZoomCollection = sortedUnitLevels[i + 1];
|
|
496
496
|
checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
|
|
497
497
|
if (tier === "bottomTier") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tooltip as TooltipComponent } from '@syncfusion/ej2-popups';
|
|
2
2
|
import { parentsUntil } from '../base/utils';
|
|
3
3
|
import * as cls from '../base/css-constants';
|
|
4
|
-
import { extend, isNullOrUndefined, getValue, EventHandler, closest } from '@syncfusion/ej2-base';
|
|
4
|
+
import { extend, isNullOrUndefined, getValue, EventHandler, closest, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
5
5
|
import { Deferred } from '@syncfusion/ej2-data';
|
|
6
6
|
/**
|
|
7
7
|
* File for handling tooltip in Gantt.
|
|
@@ -28,7 +28,7 @@ var Tooltip = /** @class */ (function () {
|
|
|
28
28
|
this.toolTipObj.position = 'BottomCenter';
|
|
29
29
|
this.toolTipObj.openDelay = 700;
|
|
30
30
|
this.toolTipObj.enableRtl = this.parent.enableRtl;
|
|
31
|
-
this.toolTipObj.enableHtmlSanitizer =
|
|
31
|
+
this.toolTipObj.enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
|
|
32
32
|
this.toolTipObj.cssClass = cls.ganttTooltip;
|
|
33
33
|
this.toolTipObj.animation = { open: { effect: 'None', delay: 0 }, close: { effect: 'None', delay: 0 } };
|
|
34
34
|
this.toolTipObj.afterOpen = this.updateTooltipPosition.bind(this);
|
|
@@ -241,8 +241,12 @@ var Tooltip = /** @class */ (function () {
|
|
|
241
241
|
var taskName;
|
|
242
242
|
if (ganttData) {
|
|
243
243
|
data = ganttData.ganttProperties;
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
var taskNameValue = data.taskName;
|
|
245
|
+
if (this.parent.enableHtmlSanitizer && typeof (taskNameValue) === 'string') {
|
|
246
|
+
taskNameValue = SanitizeHtmlHelper.sanitize(taskNameValue);
|
|
247
|
+
}
|
|
248
|
+
taskName = !isNullOrUndefined(taskNameValue) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
|
|
249
|
+
(this.parent.disableHtmlEncode ? taskNameValue.replace(/</g, "<").replace(/>/g, ">") : taskNameValue) + '</td></tr>' : '';
|
|
246
250
|
}
|
|
247
251
|
switch (elementType) {
|
|
248
252
|
case 'milestone':
|
|
@@ -254,9 +258,13 @@ var Tooltip = /** @class */ (function () {
|
|
|
254
258
|
else if (!isNullOrUndefined(data.startDate)) {
|
|
255
259
|
milestoneStartDate = data.startDate;
|
|
256
260
|
}
|
|
261
|
+
var sDateValue = this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat());
|
|
262
|
+
if (this.parent.enableHtmlSanitizer && typeof (sDateValue) === 'string') {
|
|
263
|
+
sDateValue = SanitizeHtmlHelper.sanitize(sDateValue);
|
|
264
|
+
}
|
|
257
265
|
var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
258
266
|
'<td class = "e-gantt-tooltip-value">' +
|
|
259
|
-
|
|
267
|
+
sDateValue + '</td></tr>' : '';
|
|
260
268
|
content = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
261
269
|
taskName + sDate + '</tbody></table>';
|
|
262
270
|
break;
|
|
@@ -264,20 +272,28 @@ var Tooltip = /** @class */ (function () {
|
|
|
264
272
|
case 'taskbar':
|
|
265
273
|
{
|
|
266
274
|
var scheduledTask = !ganttData.hasChildRecords || data.isAutoSchedule ? true : false;
|
|
275
|
+
var startDateValue = this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat());
|
|
276
|
+
var endDateValue = this.parent.getFormatedDate(scheduledTask ? data.endDate : data.autoEndDate, this.parent.getDateFormat());
|
|
277
|
+
var durationValue = this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit);
|
|
278
|
+
var progressValue = data.progress;
|
|
279
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
280
|
+
startDateValue = typeof (startDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(startDateValue) : startDateValue;
|
|
281
|
+
endDateValue = typeof (endDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(endDateValue) : endDateValue;
|
|
282
|
+
durationValue = typeof (durationValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationValue) : durationValue;
|
|
283
|
+
progressValue = typeof (progressValue) === 'string' ? SanitizeHtmlHelper.sanitize(progressValue) : progressValue;
|
|
284
|
+
}
|
|
267
285
|
var startDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
268
286
|
this.parent.localeObj.getConstant(scheduledTask ? 'startDate' : 'subTasksStartDate') +
|
|
269
|
-
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
270
|
-
this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat()) +
|
|
271
|
-
'</td></tr>' : '';
|
|
287
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' + startDateValue + '</td></tr>' : '';
|
|
272
288
|
var endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
273
289
|
this.parent.localeObj.getConstant(scheduledTask ? 'endDate' : 'subTasksEndDate') +
|
|
274
|
-
'</td><td>:</td
|
|
290
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' + endDateValue + '</td></tr>' : '';
|
|
275
291
|
var duration = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
276
292
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
277
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
293
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationValue +
|
|
278
294
|
'</td></tr>' : '';
|
|
279
295
|
var progress = !isNullOrUndefined(data.progress) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
280
|
-
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' +
|
|
296
|
+
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + progressValue +
|
|
281
297
|
'</td></tr>' : '';
|
|
282
298
|
content = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
283
299
|
taskName + startDate + endDate + duration + progress + '</tbody></table>';
|
|
@@ -285,82 +301,131 @@ var Tooltip = /** @class */ (function () {
|
|
|
285
301
|
}
|
|
286
302
|
case 'baseline':
|
|
287
303
|
{
|
|
304
|
+
var baselineStartDateValue = this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat());
|
|
305
|
+
var baselineEndDateValue = this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat());
|
|
306
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
307
|
+
baselineStartDateValue = typeof (baselineStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineStartDateValue) : baselineStartDateValue;
|
|
308
|
+
baselineEndDateValue = typeof (baselineEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineEndDateValue) : baselineEndDateValue;
|
|
309
|
+
}
|
|
288
310
|
content = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
289
311
|
taskName + '<tr><td class = "e-gantt-tooltip-label">' +
|
|
290
312
|
this.parent.localeObj.getConstant('baselineStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
291
|
-
|
|
313
|
+
baselineStartDateValue + '</td></tr><tr>' +
|
|
292
314
|
'<td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('baselineEndDate') +
|
|
293
315
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
294
|
-
|
|
316
|
+
baselineEndDateValue + '</td></tr></tbody></table>';
|
|
295
317
|
break;
|
|
296
318
|
}
|
|
297
319
|
case 'marker':
|
|
298
320
|
{
|
|
299
321
|
var markerTooltipElement = parent.tooltipModule.getMarkerTooltipData(args);
|
|
322
|
+
var markerTooltipElementValue = this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat());
|
|
300
323
|
var markerLabel = markerTooltipElement.label ? markerTooltipElement.label : '';
|
|
324
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
325
|
+
markerLabel = typeof (markerLabel) === 'string' ? SanitizeHtmlHelper.sanitize(markerLabel) : markerLabel;
|
|
326
|
+
markerTooltipElementValue = typeof (markerTooltipElementValue) === 'string' ? SanitizeHtmlHelper.sanitize(markerTooltipElementValue) : markerTooltipElementValue;
|
|
327
|
+
}
|
|
301
328
|
content = '<table class = "e-gantt-tooltiptable"><tbody><tr><td>' +
|
|
302
|
-
|
|
303
|
-
'</td></tr><tr><td>' +
|
|
304
|
-
markerLabel + '</td></tr></tbody></table>';
|
|
329
|
+
markerTooltipElementValue + '</td></tr><tr><td>' + (this.parent.disableHtmlEncode ? markerLabel.replace(/</g, "<").replace(/>/g, ">") : markerLabel) + '</td></tr></tbody></table>';
|
|
305
330
|
break;
|
|
306
331
|
}
|
|
307
332
|
case 'connectorLine':
|
|
308
333
|
{
|
|
334
|
+
var fromNameValue = parent.tooltipModule.predecessorTooltipData.fromName;
|
|
335
|
+
var fromIdValue = parent.tooltipModule.predecessorTooltipData.fromId;
|
|
336
|
+
var toNameValue = parent.tooltipModule.predecessorTooltipData.toName;
|
|
337
|
+
var toIdValue = parent.tooltipModule.predecessorTooltipData.toId;
|
|
338
|
+
var linkTextValue = parent.tooltipModule.predecessorTooltipData.linkText;
|
|
339
|
+
var offsetStringValue = parent.tooltipModule.predecessorTooltipData.offsetString;
|
|
340
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
341
|
+
fromNameValue = typeof (fromNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromNameValue) : fromNameValue;
|
|
342
|
+
fromIdValue = typeof (fromIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromIdValue) : fromIdValue;
|
|
343
|
+
toNameValue = typeof (toNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(toNameValue) : toNameValue;
|
|
344
|
+
toIdValue = typeof (toIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(toIdValue) : toIdValue;
|
|
345
|
+
linkTextValue = typeof (linkTextValue) === 'string' ? SanitizeHtmlHelper.sanitize(linkTextValue) : linkTextValue;
|
|
346
|
+
offsetStringValue = typeof (offsetStringValue) === 'string' ? SanitizeHtmlHelper.sanitize(offsetStringValue) : offsetStringValue;
|
|
347
|
+
}
|
|
309
348
|
content = '<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">' +
|
|
310
349
|
this.parent.localeObj.getConstant('from') + '</td><td>:</td>' +
|
|
311
|
-
'<td class = "e-gantt-tooltip-value">' + parent.
|
|
312
|
-
parent.
|
|
350
|
+
'<td class = "e-gantt-tooltip-value">' + (this.parent.disableHtmlEncode ? fromNameValue.replace(/</g, "<").replace(/>/g, ">") : fromNameValue) + ' (' +
|
|
351
|
+
(this.parent.disableHtmlEncode ? (typeof (fromIdValue) === 'string' ? fromIdValue.replace(/</g, "<").replace(/>/g, ">") : fromIdValue) : fromIdValue) + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' +
|
|
313
352
|
this.parent.localeObj.getConstant('to') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
314
|
-
parent.
|
|
315
|
-
'
|
|
316
|
-
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
317
|
-
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + parent.tooltipModule.predecessorTooltipData.linkText +
|
|
353
|
+
(this.parent.disableHtmlEncode ? toNameValue.replace(/</g, "<").replace(/>/g, ">") : toNameValue) + ' (' + toIdValue + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
354
|
+
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + linkTextValue +
|
|
318
355
|
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('lag') +
|
|
319
356
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
320
|
-
|
|
357
|
+
offsetStringValue + '</td></tr></tbody></table>';
|
|
321
358
|
break;
|
|
322
359
|
}
|
|
323
360
|
case 'indicator':
|
|
324
361
|
if (args.target.title.length) {
|
|
325
|
-
|
|
362
|
+
var titleValue = args.target.title;
|
|
363
|
+
if (this.parent.enableHtmlSanitizer && typeof (titleValue) === 'string') {
|
|
364
|
+
titleValue = SanitizeHtmlHelper.sanitize(titleValue);
|
|
365
|
+
}
|
|
366
|
+
content = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + titleValue + '</tr></tbody></table>';
|
|
326
367
|
}
|
|
327
368
|
break;
|
|
328
369
|
case 'timeline':
|
|
329
|
-
|
|
370
|
+
var timlineTitleValue = args.target.title;
|
|
371
|
+
if (this.parent.enableHtmlSanitizer && typeof (timlineTitleValue) === 'string') {
|
|
372
|
+
timlineTitleValue = SanitizeHtmlHelper.sanitize(timlineTitleValue);
|
|
373
|
+
}
|
|
374
|
+
content = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + timlineTitleValue + '</tr></tbody></table>';
|
|
330
375
|
break;
|
|
331
376
|
case 'manualtaskbar':
|
|
332
377
|
{
|
|
378
|
+
var autoStartDateValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
379
|
+
var autoEndDateValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
380
|
+
var durationUnitValue = this.parent.getDurationString(data.duration, data.durationUnit);
|
|
381
|
+
var manualStartDateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
382
|
+
var manualEndDateValue = this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat());
|
|
383
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
384
|
+
autoStartDateValue = typeof (autoStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartDateValue) : autoStartDateValue;
|
|
385
|
+
autoEndDateValue = typeof (autoEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndDateValue) : autoEndDateValue;
|
|
386
|
+
durationUnitValue = typeof (durationUnitValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationUnitValue) : durationUnitValue;
|
|
387
|
+
manualStartDateValue = typeof (manualStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualStartDateValue) : manualStartDateValue;
|
|
388
|
+
manualEndDateValue = typeof (manualEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualEndDateValue) : manualEndDateValue;
|
|
389
|
+
}
|
|
333
390
|
var autoStartDate = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
334
391
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
335
|
-
|
|
392
|
+
autoStartDateValue + '</td></tr>' : '';
|
|
336
393
|
var autoEndDate = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
337
394
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
338
|
-
|
|
395
|
+
autoEndDateValue + '</td></tr>' : '';
|
|
339
396
|
var durationValue = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
340
397
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
341
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
398
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationUnitValue +
|
|
342
399
|
'</td></tr>' : '';
|
|
343
400
|
var manualStartDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
344
401
|
this.parent.localeObj.getConstant('startDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
345
|
-
|
|
402
|
+
manualStartDateValue + '</td></tr>' : '';
|
|
346
403
|
var manualEndDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
347
404
|
this.parent.localeObj.getConstant('endDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
348
|
-
|
|
405
|
+
manualEndDateValue + '</td></tr>' : '';
|
|
349
406
|
content = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
350
407
|
taskName + manualStartDate + autoStartDate + manualEndDate + autoEndDate + durationValue + '</tbody></table>';
|
|
351
408
|
break;
|
|
352
409
|
}
|
|
353
410
|
case 'manualmilestone':
|
|
354
411
|
{
|
|
412
|
+
var autoStartValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
413
|
+
var autoEndValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
414
|
+
var dateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
415
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
416
|
+
autoStartValue = typeof (autoStartValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartValue) : autoStartValue;
|
|
417
|
+
autoEndValue = typeof (autoEndValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndValue) : autoEndValue;
|
|
418
|
+
dateValue = typeof (dateValue) === 'string' ? SanitizeHtmlHelper.sanitize(dateValue) : dateValue;
|
|
419
|
+
}
|
|
355
420
|
var autoStart = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
356
421
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
357
|
-
|
|
422
|
+
autoStartValue + '</td></tr>' : '';
|
|
358
423
|
var autoEnd = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
359
424
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
360
|
-
|
|
425
|
+
autoEndValue + '</td></tr>' : '';
|
|
361
426
|
var date = '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
362
427
|
'<td class = "e-gantt-tooltip-value">' +
|
|
363
|
-
|
|
428
|
+
dateValue + '</tr>';
|
|
364
429
|
content = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
365
430
|
taskName + date + autoStart + autoEnd + '</tbody></table>';
|
|
366
431
|
break;
|
|
@@ -389,6 +454,9 @@ var Tooltip = /** @class */ (function () {
|
|
|
389
454
|
*/
|
|
390
455
|
Tooltip.prototype.getPredecessorTooltipData = function (args) {
|
|
391
456
|
var predeceesorParent = args.target.parentElement.id;
|
|
457
|
+
if (this.parent.enableHtmlSanitizer && typeof (predeceesorParent) === 'string') {
|
|
458
|
+
predeceesorParent = SanitizeHtmlHelper.sanitize(predeceesorParent);
|
|
459
|
+
}
|
|
392
460
|
var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
393
461
|
taskIds.shift();
|
|
394
462
|
var fromTask;
|