@syncfusion/ej2-gantt 19.3.47 → 19.3.48

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 : 19.3.47
3
+ * version : 19.3.48
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@19.3.46",
3
+ "_id": "@syncfusion/ej2-gantt@19.3.47",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-E/4pHUh2BdforxCyJq6+UmjxAmNtyRcbLJB8IU2lGdxlsiIVhRgb9CQaEH0cQTEyf23MuUYWsUC56jbwtrqEeA==",
5
+ "_integrity": "sha512-b5c1uwQz2aT9zbAfjmIPH9ZNpkUpz0+60BYgSupiKRI7ZElmoC1C3NBchWs9OtTueumyUrk/oivtPzsmgvDvcw==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-gantt/-/ej2-gantt-19.3.46.tgz",
27
- "_shasum": "b508ab10a85377c57b07e8c73c7aac56c20386d3",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-gantt/-/ej2-gantt-19.3.47.tgz",
27
+ "_shasum": "5dba8136915f2bdf188c72cd173b8bf82ebf8ea1",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -39,15 +39,15 @@
39
39
  "@syncfusion/ej2-buttons": "~19.3.44",
40
40
  "@syncfusion/ej2-calendars": "~19.3.46",
41
41
  "@syncfusion/ej2-data": "~19.3.47",
42
- "@syncfusion/ej2-dropdowns": "~19.3.47",
43
- "@syncfusion/ej2-grids": "~19.3.47",
44
- "@syncfusion/ej2-inputs": "~19.3.47",
45
- "@syncfusion/ej2-layouts": "~19.3.44",
46
- "@syncfusion/ej2-lists": "~19.3.45",
42
+ "@syncfusion/ej2-dropdowns": "~19.3.48",
43
+ "@syncfusion/ej2-grids": "~19.3.48",
44
+ "@syncfusion/ej2-inputs": "~19.3.48",
45
+ "@syncfusion/ej2-layouts": "~19.3.48",
46
+ "@syncfusion/ej2-lists": "~19.3.48",
47
47
  "@syncfusion/ej2-navigations": "~19.3.46",
48
48
  "@syncfusion/ej2-popups": "~19.3.47",
49
49
  "@syncfusion/ej2-richtexteditor": "~19.3.47",
50
- "@syncfusion/ej2-treegrid": "~19.3.47"
50
+ "@syncfusion/ej2-treegrid": "~19.3.48"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 Gantt Component",
@@ -75,6 +75,6 @@
75
75
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
76
76
  },
77
77
  "typings": "index.d.ts",
78
- "version": "19.3.47",
78
+ "version": "19.3.48",
79
79
  "sideEffects": false
80
80
  }
@@ -248,6 +248,11 @@ var ContextMenu = /** @class */ (function () {
248
248
  var target = args.event ? args.event.target :
249
249
  !this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
250
250
  this.parent.ganttChartModule.targetElement;
251
+ // Closed edited cell before opening context menu
252
+ // eslint-disable-next-line
253
+ if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
254
+ this.parent.treeGrid.closeEdit();
255
+ }
251
256
  if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
252
257
  this.clickedPosition = getValue('event', args).clientX;
253
258
  }
@@ -172,80 +172,113 @@ var RowDD = /** @class */ (function () {
172
172
  }
173
173
  var count = 0;
174
174
  var dragLength = dragRecords.length;
175
- for (var i = 0; i < dragLength; i++) {
176
- this.parent.isOnEdit = true;
175
+ var _loop_1 = function (i) {
176
+ this_1.parent.isOnEdit = true;
177
177
  draggedRecord = dragRecords[i];
178
- this.draggedRecord = draggedRecord;
179
- if (this.dropPosition !== 'Invalid') {
180
- if (this.parent.viewType === 'ResourceView') {
181
- this.checkisSharedTask();
182
- this.previousParent = this.draggedRecord.parentItem.uniqueID;
178
+ this_1.draggedRecord = draggedRecord;
179
+ if (this_1.dropPosition !== 'Invalid') {
180
+ if (this_1.parent.viewType === 'ResourceView') {
181
+ this_1.checkisSharedTask();
182
+ this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
183
183
  }
184
- if (this.isSharedTask) {
185
- return;
184
+ if (this_1.isSharedTask) {
185
+ return { value: void 0 };
186
186
  }
187
187
  if (isByMethod) {
188
- this.deleteDragRow();
188
+ this_1.deleteDragRow();
189
189
  }
190
- var recordIndex1 = this.treeGridData.indexOf(droppedRecord);
191
- if (this.dropPosition === 'topSegment') {
192
- this.dropAtTop(recordIndex1);
190
+ var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
191
+ if (this_1.dropPosition === 'topSegment') {
192
+ this_1.dropAtTop(recordIndex1);
193
193
  }
194
- if (this.dropPosition === 'bottomSegment') {
195
- if (!this.isSharedTask) {
194
+ if (this_1.dropPosition === 'bottomSegment') {
195
+ if (!this_1.isSharedTask) {
196
196
  if (!droppedRecord.hasChildRecords) {
197
- if (this.parent.taskFields.parentID && this.ganttData.length > 0) {
198
- this.ganttData.splice(recordIndex1 + 1, 0, this.draggedRecord.taskData);
197
+ if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
198
+ this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
199
199
  }
200
- this.treeGridData.splice(recordIndex1 + 1, 0, this.draggedRecord);
201
- this.parent.ids.splice(recordIndex1 + 1, 0, this.draggedRecord.ganttProperties.rowUniqueID.toString());
202
- if (this.parent.viewType === 'ResourceView') {
203
- var taskId = this.draggedRecord.level === 0 ? 'R' + this.draggedRecord.ganttProperties.taskId : 'T' + this.draggedRecord.ganttProperties.taskId;
204
- this.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
200
+ this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
201
+ this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
202
+ if (this_1.parent.viewType === 'ResourceView') {
203
+ var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
204
+ this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
205
205
  }
206
206
  }
207
207
  else {
208
- count = this.parent.editModule.getChildCount(droppedRecord, 0);
209
- if (this.parent.taskFields.parentID && this.ganttData.length > 0) {
210
- this.ganttData.splice(recordIndex1 + count + 1, 0, this.draggedRecord.taskData);
208
+ count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
209
+ if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
210
+ this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
211
211
  }
212
- this.treeGridData.splice(recordIndex1 + count + 1, 0, this.draggedRecord);
212
+ this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
213
213
  /* eslint-disable-next-line */
214
- this.parent.ids.splice(recordIndex1 + count + 1, 0, this.draggedRecord.ganttProperties.rowUniqueID.toString());
215
- if (this.parent.viewType === 'ResourceView') {
216
- var spliceId = this.draggedRecord.level === 0 ? 'R' + this.draggedRecord.ganttProperties.taskId : 'T' + this.draggedRecord.ganttProperties.taskId;
217
- this.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
214
+ this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
215
+ if (this_1.parent.viewType === 'ResourceView') {
216
+ var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
217
+ this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
218
218
  }
219
219
  }
220
- this.parent.setRecordValue('parentItem', this.treeGridData[recordIndex1].parentItem, draggedRecord);
221
- this.parent.setRecordValue('parentUniqueID', this.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
222
- this.parent.setRecordValue('level', this.treeGridData[recordIndex1].level, draggedRecord);
220
+ this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
221
+ this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
222
+ this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
223
223
  if (draggedRecord.hasChildRecords) {
224
224
  var level = 1;
225
- this.updateChildRecordLevel(draggedRecord, level);
226
- this.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
225
+ this_1.updateChildRecordLevel(draggedRecord, level);
226
+ this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
227
227
  }
228
228
  if (droppedRecord.parentItem) {
229
- var rec = this.parent.getParentTask(droppedRecord.parentItem).childRecords;
229
+ var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
230
230
  var childRecords = rec;
231
231
  var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
232
232
  childRecords.splice(droppedRecordIndex, 0, draggedRecord);
233
233
  }
234
234
  }
235
235
  }
236
- if (this.dropPosition === 'middleSegment') {
237
- this.dropMiddle(recordIndex1);
236
+ if (this_1.dropPosition === 'middleSegment') {
237
+ this_1.dropMiddle(recordIndex1);
238
238
  if (droppedRecord.childRecords.length > 0) {
239
239
  delete droppedRecord.ganttProperties.segments;
240
- delete droppedRecord.taskData[this.parent.taskFields.segments];
240
+ delete droppedRecord.taskData[this_1.parent.taskFields.segments];
241
241
  }
242
242
  }
243
243
  // eslint-disable-next-line
244
- if (!isNullOrUndefined(draggedRecord.parentItem && this.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
245
- this.updateParentRecords.push(draggedRecord.parentItem);
244
+ if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
245
+ this_1.updateParentRecords.push(draggedRecord.parentItem);
246
+ }
247
+ }
248
+ if (!this_1.parent.enableVirtualization) {
249
+ var data_1 = gObj.flatData;
250
+ var startIndex = void 0;
251
+ var endIndex = void 0;
252
+ if (draggedRecord.index < droppedRecord.index) {
253
+ startIndex = draggedRecord.index;
254
+ endIndex = droppedRecord.index;
255
+ }
256
+ else {
257
+ startIndex = droppedRecord.index;
258
+ endIndex = draggedRecord.index;
259
+ }
260
+ var _loop_2 = function (i_1) {
261
+ if (!isNullOrUndefined(data_1[i_1])) {
262
+ data_1[i_1].index = i_1;
263
+ if (!isNullOrUndefined(data_1[i_1].parentItem)) {
264
+ var updatedParent = data_1.filter(function (e) {
265
+ return e.uniqueID === data_1[i_1].parentUniqueID;
266
+ })[0];
267
+ data_1[i_1].parentItem.index = updatedParent.index;
268
+ }
269
+ }
270
+ };
271
+ for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
272
+ _loop_2(i_1);
246
273
  }
247
274
  }
248
275
  gObj.rowDragAndDropModule.refreshDataSource();
276
+ };
277
+ var this_1 = this;
278
+ for (var i = 0; i < dragLength; i++) {
279
+ var state_1 = _loop_1(i);
280
+ if (typeof state_1 === "object")
281
+ return state_1.value;
249
282
  }
250
283
  if (this.dropPosition === 'middleSegment') {
251
284
  if (droppedRecord.ganttProperties.predecessor) {
@@ -311,6 +311,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
311
311
  TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
312
312
  secondElement = secondElement ? secondElement : this.editElement;
313
313
  var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
314
+ var isShowConnectorPoints = true;
314
315
  if (this.parent.readOnly) {
315
316
  return;
316
317
  }
@@ -320,6 +321,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
320
321
  if (!isNullOrUndefined(parentRecord)) {
321
322
  if (!parentRecord.expanded) {
322
323
  isShowProgressResizer = false;
324
+ isShowConnectorPoints = false;
323
325
  }
324
326
  }
325
327
  }
@@ -346,7 +348,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
346
348
  if (!isNullOrUndefined(this.parent.taskFields.dependency)
347
349
  && (element.querySelector('.' + cls.connectorPointLeft)
348
350
  || element.parentElement.querySelector('.' + cls.connectorPointLeft))
349
- && isShowProgressResizer) {
351
+ && isShowConnectorPoints) {
350
352
  var connectorElement = !isNullOrUndefined(element.querySelector('.' + cls.connectorPointLeft)) ?
351
353
  element : element.parentElement;
352
354
  addClass([connectorElement.querySelector('.' + cls.connectorPointLeft)], [cls.connectorPointLeftHover]);