@syncfusion/ej2-gantt 24.2.3 → 24.2.5

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 : 24.2.3
3
+ * version : 24.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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@24.1.47",
3
+ "_id": "@syncfusion/ej2-gantt@24.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-aHFD/Y9k33Z6sCbDuptKxMmfGdbJej9yp4ABSvk20uPxEQxYRLMm8bcNJM7G6q/TMGLcAHqteBUBSRGO/pf2UQ==",
5
+ "_integrity": "sha512-zBq1EoBD9qxBJHhqiMGTURxPF7gGDARajdF0yINlOPLaX0CBd7LPDtjRNHWySTl+OkRTlodGvZ29/Xuqom/BmA==",
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-24.1.47.tgz",
27
- "_shasum": "83f0370855b39c1c307949bbf6759ae121de6166",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-24.2.4.tgz",
27
+ "_shasum": "568b2aad12f8ddf36a5dc4399070ce00d265be7a",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
30
30
  "author": {
@@ -35,21 +35,21 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~24.2.3",
39
- "@syncfusion/ej2-buttons": "~24.2.3",
40
- "@syncfusion/ej2-calendars": "~24.2.3",
38
+ "@syncfusion/ej2-base": "~24.2.5",
39
+ "@syncfusion/ej2-buttons": "~24.2.5",
40
+ "@syncfusion/ej2-calendars": "~24.2.5",
41
41
  "@syncfusion/ej2-data": "~24.2.3",
42
- "@syncfusion/ej2-dropdowns": "~24.2.3",
43
- "@syncfusion/ej2-grids": "~24.2.3",
44
- "@syncfusion/ej2-inputs": "~24.2.3",
45
- "@syncfusion/ej2-layouts": "~24.2.3",
46
- "@syncfusion/ej2-lists": "~24.2.3",
47
- "@syncfusion/ej2-navigations": "~24.2.3",
48
- "@syncfusion/ej2-notifications": "~24.2.3",
49
- "@syncfusion/ej2-popups": "~24.2.3",
50
- "@syncfusion/ej2-richtexteditor": "~24.2.3",
42
+ "@syncfusion/ej2-dropdowns": "~24.2.5",
43
+ "@syncfusion/ej2-grids": "~24.2.5",
44
+ "@syncfusion/ej2-inputs": "~24.2.5",
45
+ "@syncfusion/ej2-layouts": "~24.2.4",
46
+ "@syncfusion/ej2-lists": "~24.2.4",
47
+ "@syncfusion/ej2-navigations": "~24.2.4",
48
+ "@syncfusion/ej2-notifications": "~24.2.4",
49
+ "@syncfusion/ej2-popups": "~24.2.5",
50
+ "@syncfusion/ej2-richtexteditor": "~24.2.4",
51
51
  "@syncfusion/ej2-svg-base": "~24.2.3",
52
- "@syncfusion/ej2-treegrid": "~24.2.3"
52
+ "@syncfusion/ej2-treegrid": "~24.2.5"
53
53
  },
54
54
  "deprecated": false,
55
55
  "description": "Essential JS 2 Gantt Component",
@@ -74,6 +74,6 @@
74
74
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
75
75
  },
76
76
  "typings": "index.d.ts",
77
- "version": "24.2.3",
77
+ "version": "24.2.5",
78
78
  "sideEffects": false
79
79
  }
@@ -135,6 +135,7 @@ export declare class ConnectorLineEdit {
135
135
  * @private
136
136
  */
137
137
  applyPredecessorOption(): void;
138
+ private processPredecessors;
138
139
  private checkChildRecords;
139
140
  private calculateOffset;
140
141
  /**
@@ -658,10 +658,34 @@ var ConnectorLineEdit = /** @class */ (function () {
658
658
  this.parent.editModule.updateEditedTask(args.editEventArgs);
659
659
  }
660
660
  else if (args.validateMode.preserveLinkWithEditing) {
661
+ var connectedTaskId_1;
661
662
  if (this.parent.UpdateOffsetOnTaskbarEdit) {
662
663
  this.calculateOffset(ganttRecord);
664
+ var taskId_1 = ganttRecord.ganttProperties.taskId;
665
+ ganttRecord.ganttProperties.predecessor.forEach(function (predecessor) {
666
+ if (taskId_1 == predecessor.from) {
667
+ connectedTaskId_1 = predecessor.to;
668
+ return;
669
+ }
670
+ });
663
671
  }
664
672
  this.parent.editModule.updateEditedTask(args.editEventArgs);
673
+ this.processPredecessors(connectedTaskId_1);
674
+ }
675
+ };
676
+ ConnectorLineEdit.prototype.processPredecessors = function (parentId) {
677
+ var _this = this;
678
+ if (parentId) {
679
+ var record_1 = this.parent.getRecordByID(parentId);
680
+ this.calculateOffset(record_1);
681
+ if (record_1 && record_1.ganttProperties && record_1.ganttProperties.predecessor) {
682
+ var predecessors = record_1.ganttProperties.predecessor;
683
+ predecessors.forEach(function (predecessor) {
684
+ if (record_1.ganttProperties.taskId == predecessor.from) {
685
+ _this.processPredecessors(predecessor.to);
686
+ }
687
+ });
688
+ }
665
689
  }
666
690
  };
667
691
  ConnectorLineEdit.prototype.checkChildRecords = function (ganttRecord) {
@@ -191,6 +191,7 @@ export declare class DialogEdit {
191
191
  private getResourcesModel;
192
192
  private getNotesModel;
193
193
  private createDivElement;
194
+ private createFormElement;
194
195
  private createInputElement;
195
196
  private renderTabItems;
196
197
  private segmentGridActionBegin;
@@ -1886,6 +1886,9 @@ var DialogEdit = /** @class */ (function () {
1886
1886
  DialogEdit.prototype.createDivElement = function (className, id) {
1887
1887
  return createElement('div', { className: className, id: id });
1888
1888
  };
1889
+ DialogEdit.prototype.createFormElement = function (className, id) {
1890
+ return createElement('form', { className: className, id: id });
1891
+ };
1889
1892
  DialogEdit.prototype.createInputElement = function (className, id, fieldName, type) {
1890
1893
  return createElement(type || 'input', {
1891
1894
  className: className, attrs: {
@@ -2000,7 +2003,7 @@ var DialogEdit = /** @class */ (function () {
2000
2003
  DialogEdit.prototype.renderGeneralTab = function (itemName) {
2001
2004
  var ganttObj = this.parent;
2002
2005
  var itemModel = this.beforeOpenArgs[itemName];
2003
- var divElement = this.createDivElement('e-edit-form-row', ganttObj.element.id
2006
+ var divElement = this.createFormElement('e-edit-form-row', ganttObj.element.id
2004
2007
  + '' + itemName + 'TabContainer');
2005
2008
  for (var _i = 0, _a = Object.keys(itemModel); _i < _a.length; _i++) {
2006
2009
  var key = _a[_i];
@@ -611,7 +611,7 @@ var GanttChart = /** @class */ (function () {
611
611
  */
612
612
  GanttChart.prototype.ganttChartMove = function (e) {
613
613
  if (this.parent.editSettings.allowTaskbarEditing) {
614
- if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0) {
614
+ if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0 && !this.parent.enableRtl) {
615
615
  var xValue = void 0;
616
616
  if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
617
617
  xValue = e['changedTouches'][0].pageX;
@@ -1095,21 +1095,39 @@ var GanttChart = /** @class */ (function () {
1095
1095
  var mouseUp = Browser.touchEndEvent;
1096
1096
  var mouseMove = Browser.touchMoveEvent;
1097
1097
  var cancel = isIE11Pointer ? 'pointerleave' : 'mouseleave';
1098
- EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, mouseDown, this.ganttChartMouseDown);
1099
- EventHandler.remove(this.parent.chartPane, cancel, this.ganttChartLeave);
1100
- EventHandler.remove(this.parent.chartPane, mouseMove, this.ganttChartMove);
1098
+ if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
1099
+ EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, mouseDown, this.ganttChartMouseDown);
1100
+ }
1101
+ if (!isNullOrUndefined(this.parent.chartPane)) {
1102
+ EventHandler.remove(this.parent.chartPane, cancel, this.ganttChartLeave);
1103
+ EventHandler.remove(this.parent.chartPane, mouseMove, this.ganttChartMove);
1104
+ }
1101
1105
  if (this.parent.isAdaptive) {
1102
- EventHandler.remove(this.parent.chartPane, click, this.ganttChartMouseClick);
1103
- EventHandler.remove(this.parent.chartPane, mouseUp, this.ganttChartMouseUp);
1106
+ if (!isNullOrUndefined(this.parent.chartPane)) {
1107
+ EventHandler.remove(this.parent.chartPane, click, this.ganttChartMouseClick);
1108
+ EventHandler.remove(this.parent.chartPane, mouseUp, this.ganttChartMouseUp);
1109
+ }
1104
1110
  }
1105
1111
  if (!this.parent.isAdaptive) {
1106
- EventHandler.remove(this.parent.element, mouseUp, this.documentMouseUp);
1107
- EventHandler.remove(document, mouseUp, this.mouseUp);
1112
+ if (!isNullOrUndefined(this.parent.element)) {
1113
+ EventHandler.remove(this.parent.element, mouseUp, this.documentMouseUp);
1114
+ }
1115
+ if (!isNullOrUndefined(document)) {
1116
+ EventHandler.remove(document, mouseUp, this.mouseUp);
1117
+ }
1118
+ }
1119
+ if (!isNullOrUndefined(this.parent.element)) {
1120
+ EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
1121
+ }
1122
+ if (!isNullOrUndefined(document)) {
1123
+ EventHandler.remove(document, 'mouseup', this.contextClick);
1124
+ if (!isNullOrUndefined(document.body)) {
1125
+ EventHandler.remove(document.body, 'contextmenu', this.contextClick);
1126
+ }
1127
+ }
1128
+ if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
1129
+ EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
1108
1130
  }
1109
- EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
1110
- EventHandler.remove(document.body, 'contextmenu', this.contextClick);
1111
- EventHandler.remove(document, 'mouseup', this.contextClick);
1112
- EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
1113
1131
  };
1114
1132
  /**
1115
1133
  * To get record by taskbar element.
@@ -1598,8 +1616,10 @@ var GanttChart = /** @class */ (function () {
1598
1616
  GanttChart.prototype.destroy = function () {
1599
1617
  this.removeEventListener();
1600
1618
  this.unWireEvents();
1601
- this.scrollObject.destroy();
1602
- this.scrollObject = null;
1619
+ if (!isNullOrUndefined(this.scrollObject)) {
1620
+ this.scrollObject.destroy();
1621
+ this.scrollObject = null;
1622
+ }
1603
1623
  };
1604
1624
  return GanttChart;
1605
1625
  }());
@@ -229,9 +229,6 @@ var Gantt = /** @class */ (function (_super) {
229
229
  if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
230
230
  this.setProperties({ resourceFields: { unit: 'unit' } }, true);
231
231
  }
232
- if (!isNullOrUndefined(this.taskFields.work)) {
233
- this.setProperties({ taskType: 'FixedWork' }, true);
234
- }
235
232
  this.taskIds = [];
236
233
  };
237
234
  /**
@@ -63,6 +63,12 @@ var PdfTreeGridCell = /** @class */ (function () {
63
63
  if (typeof this.value === 'string') {
64
64
  /* eslint-disable-next-line */
65
65
  var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
66
+ if (this.row.isParentRow) {
67
+ font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
68
+ }
69
+ else {
70
+ font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
71
+ }
66
72
  if (this.row.treegrid.ganttStyle.font) {
67
73
  font = this.row.treegrid.ganttStyle.font;
68
74
  }
@@ -98,13 +104,24 @@ var PdfTreeGridCell = /** @class */ (function () {
98
104
  currentValue = !(isNullOrUndefined(this.remainingString) || this.remainingString === '') ? this.remainingString : this.value;
99
105
  }
100
106
  /* eslint-disable */
101
- var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
107
+ var font = null;
108
+ if (this.row.isParentRow) {
109
+ font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
110
+ }
111
+ else {
112
+ font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
113
+ }
102
114
  if (this.row.treegrid.ganttStyle.font) {
103
115
  font = this.row.treegrid.ganttStyle.font;
104
116
  }
105
117
  /* eslint-disable */
106
118
  var slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
107
- height += slr.actualSize.height;
119
+ if (currentValue.length > 80) {
120
+ height += slr.actualSize.height + 20;
121
+ }
122
+ else {
123
+ height += slr.actualSize.height;
124
+ }
108
125
  height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
109
126
  }
110
127
  height += this.row.treegrid.style.cellPadding.top + this.row.treegrid.style.cellPadding.bottom;
@@ -196,7 +213,7 @@ var PdfTreeGridCell = /** @class */ (function () {
196
213
  if (this.finishedDrawingCell) {
197
214
  temp = (this.remainingString === '') ? this.remainingString : this.value;
198
215
  /* eslint-disable-next-line */
199
- graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
216
+ graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y - 3, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
200
217
  }
201
218
  else {
202
219
  /* eslint-disable-next-line */
@@ -96,6 +96,8 @@ var Timeline = /** @class */ (function () {
96
96
  */
97
97
  Timeline.prototype.updateChartByNewTimeline = function () {
98
98
  this.parent.chartRowsModule.refreshChartByTimeline();
99
+ var currentScrollLeft = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
100
+ this.parent.element.getElementsByClassName('e-timeline-header-container')[0].scrollLeft = currentScrollLeft;
99
101
  this.parent.notify('refreshDayMarkers', {});
100
102
  };
101
103
  /**