@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.
- package/CHANGELOG.md +10 -0
- 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 +32 -1
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +82 -42
- 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 +11 -11
- package/src/gantt/actions/context-menu.js +5 -0
- package/src/gantt/actions/rowdragdrop.js +74 -41
- package/src/gantt/actions/taskbar-edit.js +3 -1
|
@@ -16590,6 +16590,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16590
16590
|
TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
|
|
16591
16591
|
secondElement = secondElement ? secondElement : this.editElement;
|
|
16592
16592
|
var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
|
|
16593
|
+
var isShowConnectorPoints = true;
|
|
16593
16594
|
if (this.parent.readOnly) {
|
|
16594
16595
|
return;
|
|
16595
16596
|
}
|
|
@@ -16599,6 +16600,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16599
16600
|
if (!isNullOrUndefined(parentRecord)) {
|
|
16600
16601
|
if (!parentRecord.expanded) {
|
|
16601
16602
|
isShowProgressResizer = false;
|
|
16603
|
+
isShowConnectorPoints = false;
|
|
16602
16604
|
}
|
|
16603
16605
|
}
|
|
16604
16606
|
}
|
|
@@ -16625,7 +16627,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16625
16627
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
16626
16628
|
&& (element.querySelector('.' + connectorPointLeft)
|
|
16627
16629
|
|| element.parentElement.querySelector('.' + connectorPointLeft))
|
|
16628
|
-
&&
|
|
16630
|
+
&& isShowConnectorPoints) {
|
|
16629
16631
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
16630
16632
|
element : element.parentElement;
|
|
16631
16633
|
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
@@ -26597,6 +26599,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26597
26599
|
var target = args.event ? args.event.target :
|
|
26598
26600
|
!this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
|
|
26599
26601
|
this.parent.ganttChartModule.targetElement;
|
|
26602
|
+
// Closed edited cell before opening context menu
|
|
26603
|
+
// eslint-disable-next-line
|
|
26604
|
+
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
26605
|
+
this.parent.treeGrid.closeEdit();
|
|
26606
|
+
}
|
|
26600
26607
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|
|
26601
26608
|
this.clickedPosition = getValue('event', args).clientX;
|
|
26602
26609
|
}
|
|
@@ -27290,80 +27297,113 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27290
27297
|
}
|
|
27291
27298
|
var count = 0;
|
|
27292
27299
|
var dragLength = dragRecords.length;
|
|
27293
|
-
|
|
27294
|
-
|
|
27300
|
+
var _loop_1 = function (i) {
|
|
27301
|
+
this_1.parent.isOnEdit = true;
|
|
27295
27302
|
draggedRecord = dragRecords[i];
|
|
27296
|
-
|
|
27297
|
-
if (
|
|
27298
|
-
if (
|
|
27299
|
-
|
|
27300
|
-
|
|
27303
|
+
this_1.draggedRecord = draggedRecord;
|
|
27304
|
+
if (this_1.dropPosition !== 'Invalid') {
|
|
27305
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27306
|
+
this_1.checkisSharedTask();
|
|
27307
|
+
this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
|
|
27301
27308
|
}
|
|
27302
|
-
if (
|
|
27303
|
-
return;
|
|
27309
|
+
if (this_1.isSharedTask) {
|
|
27310
|
+
return { value: void 0 };
|
|
27304
27311
|
}
|
|
27305
27312
|
if (isByMethod) {
|
|
27306
|
-
|
|
27313
|
+
this_1.deleteDragRow();
|
|
27307
27314
|
}
|
|
27308
|
-
var recordIndex1 =
|
|
27309
|
-
if (
|
|
27310
|
-
|
|
27315
|
+
var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
|
|
27316
|
+
if (this_1.dropPosition === 'topSegment') {
|
|
27317
|
+
this_1.dropAtTop(recordIndex1);
|
|
27311
27318
|
}
|
|
27312
|
-
if (
|
|
27313
|
-
if (!
|
|
27319
|
+
if (this_1.dropPosition === 'bottomSegment') {
|
|
27320
|
+
if (!this_1.isSharedTask) {
|
|
27314
27321
|
if (!droppedRecord.hasChildRecords) {
|
|
27315
|
-
if (
|
|
27316
|
-
|
|
27322
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27323
|
+
this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
|
|
27317
27324
|
}
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
|
-
if (
|
|
27321
|
-
var taskId =
|
|
27322
|
-
|
|
27325
|
+
this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
|
|
27326
|
+
this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27327
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27328
|
+
var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27329
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
|
|
27323
27330
|
}
|
|
27324
27331
|
}
|
|
27325
27332
|
else {
|
|
27326
|
-
count =
|
|
27327
|
-
if (
|
|
27328
|
-
|
|
27333
|
+
count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
|
|
27334
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27335
|
+
this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
|
|
27329
27336
|
}
|
|
27330
|
-
|
|
27337
|
+
this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
|
|
27331
27338
|
/* eslint-disable-next-line */
|
|
27332
|
-
|
|
27333
|
-
if (
|
|
27334
|
-
var spliceId =
|
|
27335
|
-
|
|
27339
|
+
this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27340
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27341
|
+
var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27342
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
|
|
27336
27343
|
}
|
|
27337
27344
|
}
|
|
27338
|
-
|
|
27339
|
-
|
|
27340
|
-
|
|
27345
|
+
this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
|
|
27346
|
+
this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
|
|
27347
|
+
this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
|
|
27341
27348
|
if (draggedRecord.hasChildRecords) {
|
|
27342
27349
|
var level = 1;
|
|
27343
|
-
|
|
27344
|
-
|
|
27350
|
+
this_1.updateChildRecordLevel(draggedRecord, level);
|
|
27351
|
+
this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
|
|
27345
27352
|
}
|
|
27346
27353
|
if (droppedRecord.parentItem) {
|
|
27347
|
-
var rec =
|
|
27354
|
+
var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
|
|
27348
27355
|
var childRecords = rec;
|
|
27349
27356
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
27350
27357
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord);
|
|
27351
27358
|
}
|
|
27352
27359
|
}
|
|
27353
27360
|
}
|
|
27354
|
-
if (
|
|
27355
|
-
|
|
27361
|
+
if (this_1.dropPosition === 'middleSegment') {
|
|
27362
|
+
this_1.dropMiddle(recordIndex1);
|
|
27356
27363
|
if (droppedRecord.childRecords.length > 0) {
|
|
27357
27364
|
delete droppedRecord.ganttProperties.segments;
|
|
27358
|
-
delete droppedRecord.taskData[
|
|
27365
|
+
delete droppedRecord.taskData[this_1.parent.taskFields.segments];
|
|
27359
27366
|
}
|
|
27360
27367
|
}
|
|
27361
27368
|
// eslint-disable-next-line
|
|
27362
|
-
if (!isNullOrUndefined(draggedRecord.parentItem &&
|
|
27363
|
-
|
|
27369
|
+
if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
|
|
27370
|
+
this_1.updateParentRecords.push(draggedRecord.parentItem);
|
|
27371
|
+
}
|
|
27372
|
+
}
|
|
27373
|
+
if (!this_1.parent.enableVirtualization) {
|
|
27374
|
+
var data_1 = gObj.flatData;
|
|
27375
|
+
var startIndex = void 0;
|
|
27376
|
+
var endIndex = void 0;
|
|
27377
|
+
if (draggedRecord.index < droppedRecord.index) {
|
|
27378
|
+
startIndex = draggedRecord.index;
|
|
27379
|
+
endIndex = droppedRecord.index;
|
|
27380
|
+
}
|
|
27381
|
+
else {
|
|
27382
|
+
startIndex = droppedRecord.index;
|
|
27383
|
+
endIndex = draggedRecord.index;
|
|
27384
|
+
}
|
|
27385
|
+
var _loop_2 = function (i_1) {
|
|
27386
|
+
if (!isNullOrUndefined(data_1[i_1])) {
|
|
27387
|
+
data_1[i_1].index = i_1;
|
|
27388
|
+
if (!isNullOrUndefined(data_1[i_1].parentItem)) {
|
|
27389
|
+
var updatedParent = data_1.filter(function (e) {
|
|
27390
|
+
return e.uniqueID === data_1[i_1].parentUniqueID;
|
|
27391
|
+
})[0];
|
|
27392
|
+
data_1[i_1].parentItem.index = updatedParent.index;
|
|
27393
|
+
}
|
|
27394
|
+
}
|
|
27395
|
+
};
|
|
27396
|
+
for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
|
|
27397
|
+
_loop_2(i_1);
|
|
27364
27398
|
}
|
|
27365
27399
|
}
|
|
27366
27400
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
27401
|
+
};
|
|
27402
|
+
var this_1 = this;
|
|
27403
|
+
for (var i = 0; i < dragLength; i++) {
|
|
27404
|
+
var state_1 = _loop_1(i);
|
|
27405
|
+
if (typeof state_1 === "object")
|
|
27406
|
+
return state_1.value;
|
|
27367
27407
|
}
|
|
27368
27408
|
if (this.dropPosition === 'middleSegment') {
|
|
27369
27409
|
if (droppedRecord.ganttProperties.predecessor) {
|