@syncfusion/ej2-gantt 20.4.53 → 20.4.54

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.53
3
+ * version : 20.4.54
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.4.52",
3
+ "_id": "@syncfusion/ej2-gantt@20.4.53",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-KvwRlrEJlDIcv9qTuUiYP5DnlS5KHEFCIk2hCjCdFQ7ioCjzRZkCpHCLqKUSQ6/KpcNOJNCl6cEmigiiLlmx6Q==",
5
+ "_integrity": "sha512-vytG1vjcERh3V5le6Fv0M1iA1RzCwX6QrrC5LXe4nQABltBF6xxPf1/pwL/s1hdBMUXOGi2BKtK0WYo7/SUPGw==",
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-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.4.52.tgz",
27
- "_shasum": "b2e013d4ecb0eb7bf9fa388a7ff3dd7fe01df6ae",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.4.53.tgz",
27
+ "_shasum": "bd1a810cc56f9c53e4d53fb40f5fd7d84118c78f",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
@@ -37,18 +37,18 @@
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~20.4.51",
39
39
  "@syncfusion/ej2-buttons": "~20.4.53",
40
- "@syncfusion/ej2-calendars": "~20.4.52",
40
+ "@syncfusion/ej2-calendars": "~20.4.54",
41
41
  "@syncfusion/ej2-data": "~20.4.48",
42
- "@syncfusion/ej2-dropdowns": "~20.4.53",
43
- "@syncfusion/ej2-grids": "~20.4.53",
44
- "@syncfusion/ej2-inputs": "~20.4.52",
42
+ "@syncfusion/ej2-dropdowns": "~20.4.54",
43
+ "@syncfusion/ej2-grids": "~20.4.54",
44
+ "@syncfusion/ej2-inputs": "~20.4.54",
45
45
  "@syncfusion/ej2-layouts": "~20.4.53",
46
46
  "@syncfusion/ej2-lists": "~20.4.50",
47
47
  "@syncfusion/ej2-navigations": "~20.4.53",
48
48
  "@syncfusion/ej2-notifications": "~20.4.48",
49
49
  "@syncfusion/ej2-popups": "~20.4.53",
50
50
  "@syncfusion/ej2-richtexteditor": "~20.4.53",
51
- "@syncfusion/ej2-treegrid": "~20.4.49"
51
+ "@syncfusion/ej2-treegrid": "~20.4.54"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "Essential JS 2 Gantt Component",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "20.4.53",
76
+ "version": "20.4.54",
77
77
  "sideEffects": false
78
78
  }
@@ -696,10 +696,10 @@ var CriticalPath = /** @class */ (function () {
696
696
  var _loop_2 = function (i) {
697
697
  var criticalData;
698
698
  if (this_2.parent.viewType === 'ProjectView') {
699
- criticalData = this_2.parent.currentViewData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
699
+ criticalData = this_2.parent.flatData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
700
700
  }
701
701
  else {
702
- var currentRecords = this_2.parent.currentViewData.filter(function (data) {
702
+ var currentRecords = this_2.parent.flatData.filter(function (data) {
703
703
  return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
704
704
  });
705
705
  for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
@@ -712,16 +712,18 @@ var CriticalPath = /** @class */ (function () {
712
712
  var element = this_2.parent.getRowByIndex(index);
713
713
  var taskClass = void 0;
714
714
  var columnFields = this_2.parent.taskFields;
715
- if (criticalData.parentItem) {
715
+ if (criticalData && criticalData.parentItem) {
716
716
  var parentRecord = this_2.parent.currentViewData.filter(function (data) {
717
717
  return criticalData.parentItem.uniqueID === data.uniqueID;
718
718
  });
719
- var parentIndex = this_2.parent.currentViewData.indexOf(parentRecord[0]);
719
+ var parentIndex = this_2.parent.flatData.indexOf(parentRecord[0]);
720
720
  var parentElement = this_2.parent.getRowByIndex(parentIndex);
721
- var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
722
- for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
723
- if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
724
- addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), cls.criticalChildTaskBarInnerDiv);
721
+ if (parentElement) {
722
+ var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
723
+ for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
724
+ if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
725
+ addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), cls.criticalChildTaskBarInnerDiv);
726
+ }
725
727
  }
726
728
  }
727
729
  }
@@ -839,7 +839,7 @@ var Edit = /** @class */ (function () {
839
839
  }
840
840
  this.parent.predecessorModule.isValidatedParentTaskID = '';
841
841
  /** validating predecessor for current edited records */
842
- if (ganttRecord.ganttProperties.predecessorsName) {
842
+ if (ganttRecord.ganttProperties.predecessor) {
843
843
  this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
844
844
  if (this.taskbarMoved) {
845
845
  this.parent.editedTaskBarItem = ganttRecord;
@@ -2881,11 +2881,11 @@ var Edit = /** @class */ (function () {
2881
2881
  };
2882
2882
  var prevID_1 = args.data.ganttProperties.taskId.toString();
2883
2883
  /* tslint:disable-next-line */
2884
- var query_2 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
2884
+ var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
2885
2885
  var adaptor = data_2.adaptor;
2886
2886
  if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_2.dataSource.batchUrl) {
2887
2887
  /* tslint:disable-next-line */
2888
- var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query_2);
2888
+ var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
2889
2889
  crud.then(function (e) {
2890
2890
  if (_this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][_this.parent.taskFields.id]) &&
2891
2891
  e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID_1) {
@@ -2907,9 +2907,8 @@ var Edit = /** @class */ (function () {
2907
2907
  }
2908
2908
  else {
2909
2909
  var addedRecords = 'addedRecords';
2910
- var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query_2);
2910
+ var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query);
2911
2911
  insertCrud.then(function (e) {
2912
- var changedRecords = 'changedRecords';
2913
2912
  var addedRecords;
2914
2913
  if (!isNullOrUndefined(e[0])) {
2915
2914
  addedRecords = e[0];
@@ -2917,26 +2916,7 @@ var Edit = /** @class */ (function () {
2917
2916
  else {
2918
2917
  addedRecords = updatedData_2['addedRecords'][0];
2919
2918
  }
2920
- /* tslint:disable-next-line */
2921
- var updateCrud = data_2.update(_this.parent.taskFields.id, updatedData_2[changedRecords], null, query_2);
2922
- updateCrud.then(function () {
2923
- if (_this.parent.taskFields.id && !isNullOrUndefined(addedRecords[_this.parent.taskFields.id]) &&
2924
- addedRecords[_this.parent.taskFields.id].toString() !== prevID_1) {
2925
- _this.parent.setRecordValue('taskId', addedRecords[_this.parent.taskFields.id], args.data.ganttProperties, true);
2926
- _this.parent.setRecordValue('taskData.' + _this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
2927
- _this.parent.setRecordValue(_this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
2928
- _this.parent.setRecordValue('rowUniqueID', addedRecords[_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
2929
- var idIndex = _this.parent.ids.indexOf(prevID_1);
2930
- if (idIndex !== -1) {
2931
- _this.parent.ids[idIndex] = addedRecords[_this.parent.taskFields.id].toString();
2932
- }
2933
- }
2934
- _this.updateNewRecord(cAddedRecord_1, args);
2935
- }).catch(function (e) {
2936
- _this.removeAddedRecord();
2937
- _this.dmFailure(e, args);
2938
- _this._resetProperties();
2939
- });
2919
+ _this.updateNewRecord(cAddedRecord_1, args);
2940
2920
  }).catch(function (e) {
2941
2921
  _this.removeAddedRecord();
2942
2922
  _this.dmFailure(e, args);
@@ -1491,6 +1491,7 @@ var Gantt = /** @class */ (function (_super) {
1491
1491
  case 'enableRtl':
1492
1492
  case 'readOnly':
1493
1493
  case 'viewType':
1494
+ case 'taskFields':
1494
1495
  if (prop === 'locale') {
1495
1496
  this.isLocaleChanged = true;
1496
1497
  }
@@ -2210,7 +2210,7 @@ var TaskProcessor = /** @class */ (function (_super) {
2210
2210
  }
2211
2211
  if (childGanttRecord.hasChildRecords) {
2212
2212
  setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
2213
- setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration, progressValues);
2213
+ setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration ? childGanttRecord.ganttProperties.totalDuration : 0, progressValues);
2214
2214
  }
2215
2215
  else {
2216
2216
  setValue('totalProgress', childGanttRecord.ganttProperties.progress * durationInDay, progressValues);
@@ -2284,10 +2284,8 @@ var TaskProcessor = /** @class */ (function (_super) {
2284
2284
  progressValues = this.getParentProgress(childData);
2285
2285
  totalProgress += getValue('totalProgress', progressValues);
2286
2286
  if (childData[this.parent.taskFields.duration] < 1) {
2287
- if (typeof (getValue('totalDuration', progressValues)) != 'object') {
2288
- totalDuration += getValue('totalDuration', progressValues);
2289
- totalDuration = Number(totalDuration.toFixed(4));
2290
- }
2287
+ totalDuration += getValue('totalDuration', progressValues);
2288
+ totalDuration = Number(totalDuration.toFixed(4));
2291
2289
  }
2292
2290
  else {
2293
2291
  totalDuration += getValue('totalDuration', progressValues);
@@ -437,6 +437,12 @@ var ExportHelper = /** @class */ (function () {
437
437
  cell.style.padding.bottom = padding - style.fontSize;
438
438
  cell.style.padding.left = 10;
439
439
  cell.style.padding.right = 10;
440
+ if (style.padding) {
441
+ cell.style.padding = style.padding;
442
+ }
443
+ if (style.borders) {
444
+ cell.style.borders = style.borders;
445
+ }
440
446
  };
441
447
  /**
442
448
  * @param {PdfDocument} pdfDoc .