@syncfusion/ej2-gantt 20.4.54 → 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 +14 -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 +1086 -419
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1064 -397
- 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/dependency.js +28 -12
- package/src/gantt/actions/dialog-edit.js +41 -21
- package/src/gantt/actions/edit.js +51 -30
- 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 +78 -33
- package/src/gantt/base/interface.d.ts +2 -0
- package/src/gantt/base/task-processor.js +135 -98
- package/src/gantt/base/tree-grid.js +31 -1
- package/src/gantt/base/utils.js +1 -1
- 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
|
@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
11
11
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
|
-
import { createElement, isNullOrUndefined, extend, compile, getValue, setValue } from '@syncfusion/ej2-base';
|
|
14
|
+
import { createElement, isNullOrUndefined, extend, compile, getValue, setValue, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
15
15
|
import { formatUnit, addClass } from '@syncfusion/ej2-base';
|
|
16
16
|
import { isScheduledTask } from '../base/utils';
|
|
17
17
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
@@ -178,8 +178,12 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
|
-
|
|
181
|
+
var field = this.parent.labelSettings.taskLabel;
|
|
182
|
+
labelString = this.getTaskLabel(field);
|
|
182
183
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
184
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
185
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
186
|
+
}
|
|
183
187
|
}
|
|
184
188
|
if (labelString.indexOf('null') === -1) {
|
|
185
189
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -191,7 +195,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
191
195
|
(this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
192
196
|
'display:' + 'inline-block;' +
|
|
193
197
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
194
|
-
this.taskBarHeight + 'px;"
|
|
198
|
+
this.taskBarHeight + 'px;"></span>';
|
|
195
199
|
}
|
|
196
200
|
else {
|
|
197
201
|
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
@@ -199,7 +203,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
199
203
|
(this.parent.enableRtl ? 'right;' : 'left;')) : '') +
|
|
200
204
|
+(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
201
205
|
+(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
202
|
-
this.taskBarHeight + 'px;"
|
|
206
|
+
this.taskBarHeight + 'px;"></span>';
|
|
203
207
|
}
|
|
204
208
|
}
|
|
205
209
|
var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
@@ -225,6 +229,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
225
229
|
data.ganttProperties.segments.length === 0))) {
|
|
226
230
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
227
231
|
var templateElement = this.createDivElement(template)[0];
|
|
232
|
+
templateElement.innerText = labelString;
|
|
228
233
|
var childLabel = this.parent.labelSettings.taskLabel;
|
|
229
234
|
if (childLabel && childLabel['elementRef'])
|
|
230
235
|
templateElement.appendChild(tempDiv);
|
|
@@ -707,6 +712,11 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
707
712
|
if (labelString) {
|
|
708
713
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
709
714
|
leftLabelTemplateNode = this.getLableText(labelString, cls.leftLabelInnerDiv);
|
|
715
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
716
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
717
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
718
|
+
leftLabelTemplateNode = this.getLableText(labelString, cls.leftLabelInnerDiv);
|
|
719
|
+
}
|
|
710
720
|
}
|
|
711
721
|
}
|
|
712
722
|
if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
|
|
@@ -757,6 +767,11 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
757
767
|
if (labelString) {
|
|
758
768
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
759
769
|
rightLabelTemplateNode = this.getLableText(labelString, cls.rightLabelInnerDiv);
|
|
770
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
771
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
772
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
773
|
+
rightLabelTemplateNode = this.getLableText(labelString, cls.rightLabelInnerDiv);
|
|
774
|
+
}
|
|
760
775
|
}
|
|
761
776
|
}
|
|
762
777
|
if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
|
|
@@ -808,7 +823,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
808
823
|
'<div class="' + cls.manualParentMilestoneBottom + '" style="top:' +
|
|
809
824
|
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
810
825
|
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
811
|
-
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : template);
|
|
826
|
+
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : !data.ganttProperties.isMilestone ? template : null);
|
|
812
827
|
};
|
|
813
828
|
/**
|
|
814
829
|
* To get parent taskbar node.
|
|
@@ -852,6 +867,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
852
867
|
else {
|
|
853
868
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
854
869
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
870
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
871
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
872
|
+
}
|
|
855
873
|
}
|
|
856
874
|
if (labelString.indexOf('null') === -1) {
|
|
857
875
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -864,7 +882,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
864
882
|
'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
865
883
|
'display:' + 'inline-block;' +
|
|
866
884
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
867
|
-
this.taskBarHeight + 'px;"
|
|
885
|
+
this.taskBarHeight + 'px;"></span>';
|
|
868
886
|
}
|
|
869
887
|
else {
|
|
870
888
|
labelDiv = '<span class="' +
|
|
@@ -874,9 +892,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
874
892
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
875
893
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
876
894
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
877
|
-
this.taskBarHeight + 'px;"
|
|
895
|
+
this.taskBarHeight + 'px;"></span>';
|
|
878
896
|
}
|
|
879
897
|
var labelElement = this.createDivElement(labelDiv)[0];
|
|
898
|
+
labelElement.innerText = labelString;
|
|
880
899
|
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
881
900
|
if (parentLabel && parentLabel['elementRef'])
|
|
882
901
|
labelElement.appendChild(div);
|
|
@@ -1043,7 +1062,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1043
1062
|
var mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
1044
1063
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
1045
1064
|
var marginTop;
|
|
1046
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
1065
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
1047
1066
|
marginTop = '';
|
|
1048
1067
|
}
|
|
1049
1068
|
else {
|
|
@@ -1062,7 +1081,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1062
1081
|
var pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
1063
1082
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
1064
1083
|
var marginTop;
|
|
1065
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
1084
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
1066
1085
|
marginTop = '';
|
|
1067
1086
|
}
|
|
1068
1087
|
else {
|
|
@@ -1351,6 +1370,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1351
1370
|
this.parent.renderTemplates();
|
|
1352
1371
|
this.triggerQueryTaskbarInfo();
|
|
1353
1372
|
this.parent.modifiedRecords = [];
|
|
1373
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
|
|
1374
|
+
this.updateOverlapped();
|
|
1375
|
+
}
|
|
1354
1376
|
if (collapsedResourceRecord.length) {
|
|
1355
1377
|
for (var j = 0; j < collapsedResourceRecord.length; j++) {
|
|
1356
1378
|
if (collapsedResourceRecord[j].hasChildRecords) {
|
|
@@ -1377,22 +1399,37 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1377
1399
|
var taskbarContainerNode = this.taskbarContainer();
|
|
1378
1400
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
1379
1401
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
1380
|
-
var connectorLineLeftNode
|
|
1381
|
-
if (
|
|
1382
|
-
|
|
1402
|
+
var connectorLineLeftNode;
|
|
1403
|
+
if (!this.templateData.hasChildRecords && !this.parent.allowParentDependency) {
|
|
1404
|
+
var connectorLineLeftNode_1 = this.getLeftPointNode();
|
|
1405
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode_1)[0]);
|
|
1406
|
+
}
|
|
1407
|
+
else if (this.parent.allowParentDependency) {
|
|
1408
|
+
connectorLineLeftNode = this.getLeftPointNode();
|
|
1409
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
1410
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
1411
|
+
}
|
|
1383
1412
|
}
|
|
1384
1413
|
if (this.templateData.hasChildRecords) {
|
|
1385
1414
|
var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
1415
|
+
var milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
|
|
1386
1416
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
1387
1417
|
var manualTaskbar = this.getManualTaskbar();
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1418
|
+
if (!isNullOrUndefined(manualTaskbar[0])) {
|
|
1419
|
+
if (this.parent.allowParentDependency) {
|
|
1420
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
1421
|
+
var connectorLineRightNode_1 = this.getRightPointNode();
|
|
1422
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode_1)[0]);
|
|
1423
|
+
}
|
|
1424
|
+
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
1425
|
+
}
|
|
1392
1426
|
}
|
|
1393
1427
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
1394
1428
|
taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
|
|
1395
1429
|
}
|
|
1430
|
+
else if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
|
|
1431
|
+
taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
|
|
1432
|
+
}
|
|
1396
1433
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
1397
1434
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
1398
1435
|
taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
@@ -1462,8 +1499,13 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1462
1499
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
1463
1500
|
}
|
|
1464
1501
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1502
|
+
var connectorLineRightNode;
|
|
1503
|
+
if (this.parent.allowParentDependency && ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords)) {
|
|
1504
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
1505
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
1506
|
+
}
|
|
1507
|
+
else if (!this.parent.allowParentDependency) {
|
|
1508
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
1467
1509
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
1468
1510
|
}
|
|
1469
1511
|
var rightLabelNode = this.getRightLabelNode(i);
|
|
@@ -1484,6 +1526,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1484
1526
|
else {
|
|
1485
1527
|
var text = createElement('Text');
|
|
1486
1528
|
text.innerHTML = indicators[indicatorIndex].name;
|
|
1529
|
+
if (this.parent.enableHtmlSanitizer && typeof (indicators[indicatorIndex].name) === 'string') {
|
|
1530
|
+
indicators[indicatorIndex].name = SanitizeHtmlHelper.sanitize(indicators[indicatorIndex].name);
|
|
1531
|
+
text.innerText = indicators[indicatorIndex].name;
|
|
1532
|
+
}
|
|
1487
1533
|
taskIndicatorTextNode = text.childNodes;
|
|
1488
1534
|
}
|
|
1489
1535
|
taskIndicatorNode[0].appendChild([].slice.call(taskIndicatorTextNode)[0]);
|
|
@@ -1577,7 +1623,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1577
1623
|
getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
|
|
1578
1624
|
(trElement.querySelector('.' + cls.baselineBar) ? getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null);
|
|
1579
1625
|
}
|
|
1580
|
-
else {
|
|
1626
|
+
else if (taskbarElement) {
|
|
1581
1627
|
var childTask = taskbarElement.querySelector(classCollections[0]);
|
|
1582
1628
|
var progressTask = taskbarElement.querySelector(classCollections[1]);
|
|
1583
1629
|
args.taskbarBgColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(cls.traceChildTaskBar) ?
|
|
@@ -1656,7 +1702,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1656
1702
|
trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
|
|
1657
1703
|
}
|
|
1658
1704
|
}
|
|
1659
|
-
else {
|
|
1705
|
+
else if (taskbarElement) {
|
|
1660
1706
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
1661
1707
|
getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
|
|
1662
1708
|
taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
|
|
@@ -1758,6 +1804,78 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1758
1804
|
}
|
|
1759
1805
|
return null;
|
|
1760
1806
|
};
|
|
1807
|
+
// to update the eOverlapped property
|
|
1808
|
+
ChartRows.prototype.updateOverlapped = function () {
|
|
1809
|
+
for (var k = 0; k < this.parent.treeGrid.parentData.length; k++) {
|
|
1810
|
+
var childRecords = this.parent.treeGrid.parentData[k].childRecords;
|
|
1811
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
1812
|
+
if (childRecords[i + 1]) {
|
|
1813
|
+
childRecords[i].ganttProperties.eOverlapped = undefined;
|
|
1814
|
+
}
|
|
1815
|
+
for (var j = i + 1; j < childRecords.length; j++) {
|
|
1816
|
+
childRecords[j].ganttProperties.eOverlapped = undefined;
|
|
1817
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
1818
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
1819
|
+
childRecords[j].ganttProperties.eOverlapped = true;
|
|
1820
|
+
childRecords[i].ganttProperties.eOverlapped = true;
|
|
1821
|
+
}
|
|
1822
|
+
else {
|
|
1823
|
+
if (isNullOrUndefined(childRecords[j].ganttProperties.eOverlapped)) {
|
|
1824
|
+
childRecords[j].ganttProperties.eOverlapped = false;
|
|
1825
|
+
}
|
|
1826
|
+
if (isNullOrUndefined(childRecords[i].ganttProperties.eOverlapped)) {
|
|
1827
|
+
childRecords[i].ganttProperties.eOverlapped = false;
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
// To update the row height when allow overallocation set to false
|
|
1835
|
+
ChartRows.prototype.updateDragDropRecords = function (data, tr) {
|
|
1836
|
+
var childRecords = data.childRecords;
|
|
1837
|
+
var rowIndex = this.parent.currentViewData.indexOf(data);
|
|
1838
|
+
var treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
1839
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
1840
|
+
if (!tr) {
|
|
1841
|
+
tr = this.ganttChartTableBody.childNodes[rowIndex];
|
|
1842
|
+
}
|
|
1843
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
|
|
1844
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
1845
|
+
var rowIDs = [];
|
|
1846
|
+
var rowCounts = 0;
|
|
1847
|
+
if (data) {
|
|
1848
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
1849
|
+
for (var j = i + 1; j < childRecords.length; j++) {
|
|
1850
|
+
var taskbarContainer = tr.getElementsByClassName('e-taskbar-main-container');
|
|
1851
|
+
for (var k = 0; k < taskbarContainer.length; k++) {
|
|
1852
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
1853
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
1854
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
1855
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1) {
|
|
1856
|
+
rowIDs.push(childRecords[j]['rowUniqueID']);
|
|
1857
|
+
rowCounts++;
|
|
1858
|
+
tr.children[0]['style'].verticalAlign = 'baseline';
|
|
1859
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
|
|
1860
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
else {
|
|
1864
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
1865
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1 && this.parent.rowDragAndDropModule &&
|
|
1866
|
+
this.parent.rowDragAndDropModule['draggedRecord'] && taskbarContainer[k].getAttribute('rowuniqueid') ===
|
|
1867
|
+
this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] && this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] === childRecords[j]['rowUniqueID']) {
|
|
1868
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop =
|
|
1869
|
+
this.parent.editModule.taskbarEditModule.draggedRecordMarginTop;
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
1876
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
1877
|
+
}
|
|
1878
|
+
};
|
|
1761
1879
|
/**
|
|
1762
1880
|
* To refresh edited TR
|
|
1763
1881
|
*
|
|
@@ -1771,14 +1889,22 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1771
1889
|
var selectedItem = this.parent.currentViewData[index];
|
|
1772
1890
|
if (index !== -1 && selectedItem) {
|
|
1773
1891
|
var data = selectedItem;
|
|
1892
|
+
if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
|
|
1893
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
|
|
1894
|
+
}
|
|
1774
1895
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
|
|
1775
1896
|
tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
|
|
1776
1897
|
}
|
|
1777
1898
|
else {
|
|
1778
|
-
|
|
1899
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && !data.expanded) {
|
|
1900
|
+
tr.replaceWith(this.getGanttChartRow(index, data));
|
|
1901
|
+
}
|
|
1902
|
+
else {
|
|
1903
|
+
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
1904
|
+
}
|
|
1779
1905
|
}
|
|
1780
1906
|
this.parent.renderTemplates();
|
|
1781
|
-
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
1907
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && this.parent.allowTaskbarOverlap) {
|
|
1782
1908
|
if (isValidateRange) {
|
|
1783
1909
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
1784
1910
|
}
|
|
@@ -1800,6 +1926,12 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1800
1926
|
}
|
|
1801
1927
|
var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
1802
1928
|
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
1929
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
|
|
1930
|
+
this.updateDragDropRecords(selectedItem, tr);
|
|
1931
|
+
}
|
|
1932
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
1933
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
1934
|
+
}
|
|
1803
1935
|
var nextEditableElement = this.parent.ganttChartModule.tempNextElement;
|
|
1804
1936
|
if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
|
|
1805
1937
|
this.parent.treeGrid.grid.focusModule.focus();
|
|
@@ -1813,7 +1945,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1813
1945
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
1814
1946
|
var chartRows = this.parent.ganttChartModule.getChartRows();
|
|
1815
1947
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
1816
|
-
if (this.parent.initialChartRowElements) {
|
|
1948
|
+
if (this.parent.initialChartRowElements && (!this.parent.allowTaskbarDragAndDrop && this.parent.allowTaskbarOverlap)) {
|
|
1817
1949
|
for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
|
|
1818
1950
|
if (!isNullOrUndefined(chartRows[j])) {
|
|
1819
1951
|
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
@@ -1841,7 +1973,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1841
1973
|
var id = chartRows[i].querySelector('.' + cls.taskBarMainContainer).getAttribute('rowUniqueId');
|
|
1842
1974
|
var ganttData = this.parent.getRecordByID(id);
|
|
1843
1975
|
var zIndex = "";
|
|
1844
|
-
if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
|
|
1976
|
+
if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
|
|
1845
1977
|
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
1846
1978
|
}
|
|
1847
1979
|
var cloneChildElement = cloneElement.cloneNode(true);
|
|
@@ -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);
|