@syncfusion/ej2-gantt 20.4.38 → 20.4.42

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.38
3
+ * version : 20.4.42
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-gantt@*",
3
- "_id": "@syncfusion/ej2-gantt@20.15.5",
3
+ "_id": "@syncfusion/ej2-gantt@20.4.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-8nxolLMuBdFBnZtSPWBRdiHp0cZzFYElVPtPP/YgzzEs+T4RA0CtROz8JIWe5TQDAMoFtHCwWcOcT7GgG0IwDA==",
5
+ "_integrity": "sha512-gHDE1AaHulcoFWykplaK7TaEyMlx6eEyGjBMHQYI49gc3TJMCF9ruq1dj4e2APbA6YmV4jgO7EBa3+HJHv73gQ==",
6
6
  "_location": "/@syncfusion/ej2-gantt",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-gantt",
24
24
  "/@syncfusion/ej2-vue-gantt"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-gantt/-/ej2-gantt-20.15.5.tgz",
27
- "_shasum": "227225e240e8cf836cb9fac39c980c2a145f85dd",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.4.40.tgz",
27
+ "_shasum": "c5f2b6d0f703865e3c0bb43566cfbb8a5fc9dedc",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
@@ -35,37 +35,34 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.4.38",
39
- "@syncfusion/ej2-buttons": "~20.4.38",
40
- "@syncfusion/ej2-calendars": "~20.4.38",
41
- "@syncfusion/ej2-data": "~20.4.38",
42
- "@syncfusion/ej2-dropdowns": "~20.4.38",
43
- "@syncfusion/ej2-grids": "~20.4.38",
44
- "@syncfusion/ej2-inputs": "~20.4.38",
45
- "@syncfusion/ej2-layouts": "~20.4.38",
46
- "@syncfusion/ej2-lists": "~20.4.38",
47
- "@syncfusion/ej2-navigations": "~20.4.38",
48
- "@syncfusion/ej2-notifications": "~20.4.38",
49
- "@syncfusion/ej2-popups": "~20.4.38",
50
- "@syncfusion/ej2-richtexteditor": "~20.4.38",
51
- "@syncfusion/ej2-treegrid": "~20.4.38"
38
+ "@syncfusion/ej2-base": "~20.4.42",
39
+ "@syncfusion/ej2-buttons": "~20.4.42",
40
+ "@syncfusion/ej2-calendars": "~20.4.42",
41
+ "@syncfusion/ej2-data": "~20.4.42",
42
+ "@syncfusion/ej2-dropdowns": "~20.4.42",
43
+ "@syncfusion/ej2-grids": "~20.4.42",
44
+ "@syncfusion/ej2-inputs": "~20.4.42",
45
+ "@syncfusion/ej2-layouts": "~20.4.42",
46
+ "@syncfusion/ej2-lists": "~20.4.42",
47
+ "@syncfusion/ej2-navigations": "~20.4.42",
48
+ "@syncfusion/ej2-notifications": "~20.4.42",
49
+ "@syncfusion/ej2-popups": "~20.4.42",
50
+ "@syncfusion/ej2-richtexteditor": "~20.4.42",
51
+ "@syncfusion/ej2-treegrid": "~20.4.42"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "Essential JS 2 Gantt Component",
55
55
  "devDependencies": {},
56
56
  "es2015": "./dist/es6/ej2-gantt.es5.js",
57
- "homepage": "https://github.com/syncfusion/ej2-gantt#readme",
57
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls",
58
58
  "keywords": [
59
59
  "ej2",
60
60
  "syncfusion",
61
- "ej2-gantt",
62
- "web-components",
63
61
  "JavaScript",
64
62
  "TypeScript",
65
63
  "gantt",
66
- "ganttChart",
67
64
  "gantt-chart",
68
- "taskbar"
65
+ "project-management"
69
66
  ],
70
67
  "license": "SEE LICENSE IN license",
71
68
  "main": "./dist/ej2-gantt.umd.min.js",
@@ -76,6 +73,6 @@
76
73
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
77
74
  },
78
75
  "typings": "index.d.ts",
79
- "version": "20.4.38",
76
+ "version": "20.4.42",
80
77
  "sideEffects": false
81
78
  }
@@ -370,9 +370,9 @@ var Dependency = /** @class */ (function () {
370
370
  var flatData = this.parent.flatData;
371
371
  var totLength = this.parent.flatData.length;
372
372
  for (var count = 0; count < totLength; count++) {
373
- if (flatData[count].ganttProperties.predecessor) {
373
+ if (flatData[count].ganttProperties.predecessorsName) {
374
374
  this.validatePredecessorDates(flatData[count]);
375
- if (flatData[count].hasChildRecords && this.parent.editModule) {
375
+ if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks) {
376
376
  this.parent.editModule['updateChildItems'](flatData[count]);
377
377
  }
378
378
  }
@@ -384,6 +384,9 @@ var Dependency = /** @class */ (function () {
384
384
  for (var i = parentPredecessorLength - 1; i >= 0; i--) {
385
385
  var item = this.parentPredecessors[i];
386
386
  this.validatePredecessorDates(item);
387
+ if (item.ganttProperties.startDate) {
388
+ this.parent.editModule['updateChildItems'](item);
389
+ }
387
390
  }
388
391
  }
389
392
  };
@@ -479,7 +479,9 @@ var Edit = /** @class */ (function () {
479
479
  if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
480
480
  (ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
481
481
  ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
482
- ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
482
+ if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
483
+ ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
484
+ }
483
485
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
484
486
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
485
487
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -2812,6 +2814,12 @@ var Edit = /** @class */ (function () {
2812
2814
  else {
2813
2815
  _this.parent.showSpinner();
2814
2816
  }
2817
+ var tasks = _this.parent.taskFields;
2818
+ var ganttData = _this.parent.viewType === 'ResourceView' ?
2819
+ _this.parent.flatData[_this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : _this.parent.getRecordByID(args.data[tasks.id]);
2820
+ if (!isNullOrUndefined(ganttData)) {
2821
+ _this.validateUpdateValues(args.newTaskData, ganttData, true);
2822
+ }
2815
2823
  if (!isNullOrUndefined(args.data[tempTaskID])) {
2816
2824
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
2817
2825
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
@@ -2316,18 +2316,24 @@ var Gantt = /** @class */ (function (_super) {
2316
2316
  */
2317
2317
  /* eslint-disable-next-line */
2318
2318
  Gantt.prototype.setRecordValue = function (field, value, record, isTaskData) {
2319
+ value = isUndefined(value) ? null : value;
2319
2320
  if (this.isOnEdit || this.isOnDelete) {
2320
2321
  this.makeCloneData(field, record, isTaskData);
2321
- var id = isTaskData ? record.rowUniqueID : record.ganttProperties.rowUniqueID;
2322
+ var ganttData = isTaskData ? record : record.ganttProperties;
2323
+ var id = ganttData.rowUniqueID;
2322
2324
  var task = this.getRecordByID(id);
2323
- if (task && this.editedRecords.indexOf(task) === -1) {
2325
+ var isValid = false;
2326
+ if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
2327
+ ganttData[field].getTime() : ganttData[field] !== value))) {
2328
+ isValid = true;
2329
+ }
2330
+ if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
2324
2331
  this.editedRecords.push(task);
2325
2332
  if (this.enableImmutableMode) {
2326
2333
  this.modifiedRecords.push(task);
2327
2334
  }
2328
2335
  }
2329
2336
  }
2330
- value = isUndefined(value) ? null : value;
2331
2337
  setValue(field, value, record);
2332
2338
  };
2333
2339
  Gantt.prototype.makeCloneData = function (field, record, isTaskData) {
@@ -1058,7 +1058,7 @@ var TaskProcessor = /** @class */ (function (_super) {
1058
1058
  }
1059
1059
  else if (endDate) {
1060
1060
  sDate = new Date(endDate.getTime());
1061
- milestone = true;
1061
+ milestone = isNullOrUndefined(startDate) && this.parent.allowUnscheduledTasks ? false : true;
1062
1062
  }
1063
1063
  else {
1064
1064
  sDate = this.getValidStartDate(ganttProp);
@@ -1181,6 +1181,9 @@ var TaskProcessor = /** @class */ (function (_super) {
1181
1181
  else if (isMilestone && this.getSecondsInDecimal(date) === this.parent.defaultEndTime) {
1182
1182
  date.setHours(24);
1183
1183
  }
1184
+ else if (this.getSecondsInDecimal(date) === this.parent.defaultEndTime && this.parent.allowUnscheduledTasks) {
1185
+ date.setHours(22);
1186
+ }
1184
1187
  }
1185
1188
  var timelineStartDate = this.parent.timelineModule.timelineStartDate;
1186
1189
  if (timelineStartDate) {
@@ -2161,7 +2164,12 @@ var TaskProcessor = /** @class */ (function (_super) {
2161
2164
  durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
2162
2165
  break;
2163
2166
  default:
2164
- durationInDay = childGanttRecord.ganttProperties.duration;
2167
+ if (childGanttRecord.ganttProperties.duration < 1) {
2168
+ durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
2169
+ }
2170
+ else {
2171
+ durationInDay = childGanttRecord.ganttProperties.duration;
2172
+ }
2165
2173
  }
2166
2174
  if (childGanttRecord.hasChildRecords) {
2167
2175
  setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
@@ -2238,7 +2246,13 @@ var TaskProcessor = /** @class */ (function (_super) {
2238
2246
  if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
2239
2247
  progressValues = this.getParentProgress(childData);
2240
2248
  totalProgress += getValue('totalProgress', progressValues);
2241
- totalDuration += getValue('totalDuration', progressValues);
2249
+ if (childData[this.parent.taskFields.duration] < 1) {
2250
+ totalDuration += getValue('totalDuration', progressValues);
2251
+ totalDuration = Number(totalDuration.toFixed(4));
2252
+ }
2253
+ else {
2254
+ totalDuration += getValue('totalDuration', progressValues);
2255
+ }
2242
2256
  }
2243
2257
  else {
2244
2258
  milestoneCount++;
@@ -473,7 +473,7 @@ var ChartRows = /** @class */ (function (_super) {
473
473
  var splitStartDate = this.parent.dataOperation.checkStartDate(splitDate, ganttProp, false);
474
474
  if (splitStartDate.getTime() !== ganttProp.startDate.getTime()) {
475
475
  if (ganttProp.isAutoSchedule) {
476
- if (!isNullOrUndefined(segments)) {
476
+ if (!isNullOrUndefined(segments) && segments.length > 0) {
477
477
  segmentIndex = this.getSegmentIndex(splitStartDate, splitRecord);
478
478
  }
479
479
  //check atleast one day difference is there to split
@@ -792,11 +792,11 @@ var ChartRows = /** @class */ (function (_super) {
792
792
  'width:' + data.ganttProperties.width + 'px;' +
793
793
  'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
794
794
  data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
795
- (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
795
+ (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + ((taskbarHeight / 5) + 8) + 'px;border-left-width:' + taskbarHeight / 5 +
796
796
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
797
797
  '<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
798
- (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
799
- (taskbarHeight) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
798
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - Math.floor(((taskbarHeight / 5) + 8) / 5)) + 'px;height:' +
799
+ ((taskbarHeight / 5) + 8) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
800
800
  taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
801
801
  var milestoneTemplate = '<div class="' + cls.manualParentMilestone + '" style="position:absolute;' +
802
802
  (this.parent.enableRtl ? 'right:' : 'left:') +
@@ -860,7 +860,8 @@ var ChartRows = /** @class */ (function (_super) {
860
860
  }
861
861
  if (isNaN(parseInt(labelString))) {
862
862
  labelDiv = '<span class="' + cls.taskLabel + '" style="line-height:' +
863
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
863
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) +
864
+ 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
864
865
  'display:' + 'inline-block;' +
865
866
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
866
867
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -868,7 +869,8 @@ var ChartRows = /** @class */ (function (_super) {
868
869
  else {
869
870
  labelDiv = '<span class="' +
870
871
  cls.taskLabel + '" style="line-height:' +
871
- (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
872
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) + 'px;' +
873
+ (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
872
874
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
873
875
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
874
876
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
@@ -1284,6 +1286,7 @@ var ChartRows = /** @class */ (function (_super) {
1284
1286
  }
1285
1287
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
1286
1288
  }
1289
+ this.parent.ganttChartModule.updateLastRowBottomWidth();
1287
1290
  };
1288
1291
  /**
1289
1292
  * To render taskbars.
@@ -1392,9 +1395,9 @@ var ChartRows = /** @class */ (function (_super) {
1392
1395
  }
1393
1396
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1394
1397
  this.templateData.ganttProperties.baselineEndDate) {
1395
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1398
+ 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()))
1396
1399
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1397
- this.templateData.ganttProperties.isMilestone)
1400
+ this.templateData.ganttProperties.isMilestone))
1398
1401
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1399
1402
  }
1400
1403
  }
@@ -1405,9 +1408,9 @@ var ChartRows = /** @class */ (function (_super) {
1405
1408
  }
1406
1409
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1407
1410
  this.templateData.ganttProperties.baselineEndDate) {
1408
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1411
+ 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()))
1409
1412
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1410
- this.templateData.ganttProperties.isMilestone)
1413
+ this.templateData.ganttProperties.isMilestone))
1411
1414
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1412
1415
  }
1413
1416
  }
@@ -1453,9 +1456,9 @@ var ChartRows = /** @class */ (function (_super) {
1453
1456
  }
1454
1457
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1455
1458
  this.templateData.ganttProperties.baselineEndDate) {
1456
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1459
+ 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()))
1457
1460
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1458
- this.templateData.ganttProperties.isMilestone)
1461
+ this.templateData.ganttProperties.isMilestone))
1459
1462
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1460
1463
  }
1461
1464
  }
@@ -1555,6 +1558,10 @@ var ChartRows = /** @class */ (function (_super) {
1555
1558
  var taskbarElement = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ? trElement :
1556
1559
  trElement.querySelector('.' + cls.taskBarMainContainer);
1557
1560
  var rowElement;
1561
+ var segmentRowElement;
1562
+ if (data.ganttProperties.segments && data.ganttProperties.segments.length > 0) {
1563
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
1564
+ }
1558
1565
  var triggerTaskbarElement;
1559
1566
  var args = {
1560
1567
  data: data,
@@ -1567,7 +1574,8 @@ var ChartRows = /** @class */ (function (_super) {
1567
1574
  args.milestoneColor = taskbarElement.querySelector(classCollections[0]) ?
1568
1575
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor : null;
1569
1576
  args.baselineColor = trElement.querySelector(classCollections[1]) ?
1570
- getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor : null;
1577
+ getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
1578
+ (trElement.querySelector('.' + cls.baselineBar) ? getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null);
1571
1579
  }
1572
1580
  else {
1573
1581
  var childTask = taskbarElement.querySelector(classCollections[0]);
@@ -1584,17 +1592,33 @@ var ChartRows = /** @class */ (function (_super) {
1584
1592
  getComputedStyle(taskbarElement.querySelector(classCollections[1])).backgroundColor;
1585
1593
  // args.progressBarBorderColor = taskbarElement.querySelector(progressBarClass) ?
1586
1594
  // getComputedStyle(taskbarElement.querySelector(progressBarClass)).borderColor : null;
1587
- args.baselineColor = trElement.querySelector('.' + cls.baselineBar) ?
1588
- getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1595
+ if (segmentRowElement) {
1596
+ args.baselineColor = segmentRowElement.querySelector('.' + cls.baselineBar) ?
1597
+ getComputedStyle(segmentRowElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1598
+ }
1599
+ else {
1600
+ args.baselineColor = trElement.querySelector('.' + cls.baselineBar) ?
1601
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1602
+ }
1589
1603
  args.taskLabelColor = taskbarElement.querySelector('.' + cls.taskLabel) ?
1590
1604
  getComputedStyle(taskbarElement.querySelector('.' + cls.taskLabel)).color : null;
1591
1605
  }
1592
- args.rightLabelColor = trElement.querySelector('.' + cls.rightLabelContainer) &&
1593
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1594
- getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1595
- args.leftLabelColor = trElement.querySelector('.' + cls.leftLabelContainer) &&
1596
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1597
- getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1606
+ if (segmentRowElement) {
1607
+ args.rightLabelColor = segmentRowElement.querySelector('.' + cls.rightLabelContainer) &&
1608
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1609
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1610
+ args.leftLabelColor = segmentRowElement.querySelector('.' + cls.leftLabelContainer) &&
1611
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1612
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1613
+ }
1614
+ else {
1615
+ args.rightLabelColor = trElement.querySelector('.' + cls.rightLabelContainer) &&
1616
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1617
+ getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1618
+ args.leftLabelColor = trElement.querySelector('.' + cls.leftLabelContainer) &&
1619
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1620
+ getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1621
+ }
1598
1622
  this.parent.trigger('queryTaskbarInfo', args, function (taskbarArgs) {
1599
1623
  _this.updateQueryTaskbarInfoArgs(taskbarArgs, rowElement, triggerTaskbarElement);
1600
1624
  });
@@ -1612,6 +1636,10 @@ var ChartRows = /** @class */ (function (_super) {
1612
1636
  var trElement = args.rowElement;
1613
1637
  var taskbarElement = args.taskbarElement;
1614
1638
  var classCollections = this.getClassName(args);
1639
+ var segmentRowElement;
1640
+ if (args.data.ganttProperties.segments && args.data.ganttProperties.segments.length > 0) {
1641
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
1642
+ }
1615
1643
  if (args.taskbarType === 'Milestone') {
1616
1644
  if (taskbarElement.querySelector(classCollections[0]) &&
1617
1645
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor !== args.milestoneColor) {
@@ -1623,6 +1651,10 @@ var ChartRows = /** @class */ (function (_super) {
1623
1651
  trElement.querySelector(classCollections[1]).style.borderBottomColor = args.baselineColor;
1624
1652
  trElement.querySelector('.' + cls.baselineMilestoneBottom).style.borderTopColor = args.baselineColor;
1625
1653
  }
1654
+ if (trElement.querySelector('.' + cls.baselineBar) &&
1655
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).borderTopColor !== args.baselineColor) {
1656
+ trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1657
+ }
1626
1658
  }
1627
1659
  else {
1628
1660
  if (taskbarElement.querySelector(classCollections[0]) &&
@@ -1657,20 +1689,42 @@ var ChartRows = /** @class */ (function (_super) {
1657
1689
  getComputedStyle(taskbarElement.querySelector('.' + cls.taskLabel)).color !== args.taskLabelColor) {
1658
1690
  taskbarElement.querySelector('.' + cls.taskLabel).style.color = args.taskLabelColor;
1659
1691
  }
1660
- if (trElement.querySelector('.' + cls.baselineBar) &&
1661
- getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1662
- trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1692
+ if (segmentRowElement) {
1693
+ if (segmentRowElement.querySelector('.' + cls.baselineBar) &&
1694
+ getComputedStyle(segmentRowElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1695
+ segmentRowElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1696
+ }
1697
+ }
1698
+ else {
1699
+ if (trElement.querySelector('.' + cls.baselineBar) &&
1700
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1701
+ trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1702
+ }
1663
1703
  }
1664
1704
  }
1665
- if (trElement.querySelector('.' + cls.leftLabelContainer) &&
1666
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1667
- getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1668
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1705
+ if (segmentRowElement) {
1706
+ if (segmentRowElement.querySelector('.' + cls.leftLabelContainer) &&
1707
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1708
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1709
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1710
+ }
1711
+ if (segmentRowElement.querySelector('.' + cls.rightLabelContainer) &&
1712
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1713
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1714
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1715
+ }
1669
1716
  }
1670
- if (trElement.querySelector('.' + cls.rightLabelContainer) &&
1671
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1672
- getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1673
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1717
+ else {
1718
+ if (trElement.querySelector('.' + cls.leftLabelContainer) &&
1719
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1720
+ getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1721
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1722
+ }
1723
+ if (trElement.querySelector('.' + cls.rightLabelContainer) &&
1724
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1725
+ getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1726
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1727
+ }
1674
1728
  }
1675
1729
  };
1676
1730
  ChartRows.prototype.getClassName = function (args) {
@@ -37,7 +37,7 @@ var Timeline = /** @class */ (function () {
37
37
  this.totalTimelineWidth = 0;
38
38
  this.customTimelineSettings = null;
39
39
  this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
40
- if (this.parent.enablePersistence) {
40
+ if (this.parent.enablePersistence && this.parent.isLoad) {
41
41
  this.parent.timelineSettings = this.parent.currentZoomingLevel;
42
42
  }
43
43
  };