@syncfusion/ej2-gantt 19.3.47 → 19.3.56
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 +35 -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 +38 -3
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +88 -44
- 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 +18 -18
- package/src/gantt/actions/context-menu.js +6 -1
- package/src/gantt/actions/dialog-edit.js +3 -1
- package/src/gantt/actions/rowdragdrop.js +74 -41
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/gantt.js +2 -0
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +2 -1
- package/styles/bootstrap5.css +2 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/gantt/_layout.scss +1 -1
- package/styles/gantt/bootstrap-dark.css +1 -1
- package/styles/gantt/bootstrap.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap5-dark.css +2 -1
- package/styles/gantt/bootstrap5.css +2 -1
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.css +1 -1
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/material.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -12686,6 +12686,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12686
12686
|
Gantt.prototype.renderGantt = function (isChange) {
|
|
12687
12687
|
// predecessor calculation
|
|
12688
12688
|
if (this.predecessorModule && this.taskFields.dependency) {
|
|
12689
|
+
this.predecessorModule['parentIds'] = [];
|
|
12690
|
+
this.predecessorModule['parentRecord'] = [];
|
|
12689
12691
|
this.predecessorModule.updatePredecessors();
|
|
12690
12692
|
if (this.isInPredecessorValidation && this.enableValidation) {
|
|
12691
12693
|
this.predecessorModule.updatedRecordsDateByPredecessor();
|
|
@@ -16590,6 +16592,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16590
16592
|
TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
|
|
16591
16593
|
secondElement = secondElement ? secondElement : this.editElement;
|
|
16592
16594
|
var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
|
|
16595
|
+
var isShowConnectorPoints = true;
|
|
16593
16596
|
if (this.parent.readOnly) {
|
|
16594
16597
|
return;
|
|
16595
16598
|
}
|
|
@@ -16599,6 +16602,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16599
16602
|
if (!isNullOrUndefined(parentRecord)) {
|
|
16600
16603
|
if (!parentRecord.expanded) {
|
|
16601
16604
|
isShowProgressResizer = false;
|
|
16605
|
+
isShowConnectorPoints = false;
|
|
16602
16606
|
}
|
|
16603
16607
|
}
|
|
16604
16608
|
}
|
|
@@ -16625,7 +16629,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16625
16629
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
16626
16630
|
&& (element.querySelector('.' + connectorPointLeft)
|
|
16627
16631
|
|| element.parentElement.querySelector('.' + connectorPointLeft))
|
|
16628
|
-
&&
|
|
16632
|
+
&& isShowConnectorPoints) {
|
|
16629
16633
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
16630
16634
|
element : element.parentElement;
|
|
16631
16635
|
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
@@ -18226,7 +18230,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18226
18230
|
datetimepickeredit: DateTimePicker,
|
|
18227
18231
|
maskededit: MaskedTextBox,
|
|
18228
18232
|
numericedit: NumericTextBox,
|
|
18229
|
-
stringedit: TextBox
|
|
18233
|
+
stringedit: TextBox,
|
|
18234
|
+
defaultedit: TextBox
|
|
18230
18235
|
};
|
|
18231
18236
|
this.processDialogFields();
|
|
18232
18237
|
this.wireEvents();
|
|
@@ -18882,6 +18887,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18882
18887
|
fieldsModel[column.field] = checkboxModel;
|
|
18883
18888
|
break;
|
|
18884
18889
|
}
|
|
18890
|
+
case 'defaultedit':
|
|
18885
18891
|
case 'stringedit':
|
|
18886
18892
|
{
|
|
18887
18893
|
var textBox = common;
|
|
@@ -26597,6 +26603,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26597
26603
|
var target = args.event ? args.event.target :
|
|
26598
26604
|
!this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
|
|
26599
26605
|
this.parent.ganttChartModule.targetElement;
|
|
26606
|
+
// Closed edited cell before opening context menu
|
|
26607
|
+
// eslint-disable-next-line
|
|
26608
|
+
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
26609
|
+
this.parent.treeGrid.closeEdit();
|
|
26610
|
+
}
|
|
26600
26611
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|
|
26601
26612
|
this.clickedPosition = getValue('event', args).clientX;
|
|
26602
26613
|
}
|
|
@@ -26837,7 +26848,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26837
26848
|
};
|
|
26838
26849
|
ContextMenu$$1.prototype.contextMenuOpen = function (args) {
|
|
26839
26850
|
this.isOpen = true;
|
|
26840
|
-
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
|
|
26851
|
+
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
26841
26852
|
addClass([firstMenuItem], 'e-focused');
|
|
26842
26853
|
};
|
|
26843
26854
|
ContextMenu$$1.prototype.getMenuItems = function () {
|
|
@@ -27290,80 +27301,113 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27290
27301
|
}
|
|
27291
27302
|
var count = 0;
|
|
27292
27303
|
var dragLength = dragRecords.length;
|
|
27293
|
-
|
|
27294
|
-
|
|
27304
|
+
var _loop_1 = function (i) {
|
|
27305
|
+
this_1.parent.isOnEdit = true;
|
|
27295
27306
|
draggedRecord = dragRecords[i];
|
|
27296
|
-
|
|
27297
|
-
if (
|
|
27298
|
-
if (
|
|
27299
|
-
|
|
27300
|
-
|
|
27307
|
+
this_1.draggedRecord = draggedRecord;
|
|
27308
|
+
if (this_1.dropPosition !== 'Invalid') {
|
|
27309
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27310
|
+
this_1.checkisSharedTask();
|
|
27311
|
+
this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
|
|
27301
27312
|
}
|
|
27302
|
-
if (
|
|
27303
|
-
return;
|
|
27313
|
+
if (this_1.isSharedTask) {
|
|
27314
|
+
return { value: void 0 };
|
|
27304
27315
|
}
|
|
27305
27316
|
if (isByMethod) {
|
|
27306
|
-
|
|
27317
|
+
this_1.deleteDragRow();
|
|
27307
27318
|
}
|
|
27308
|
-
var recordIndex1 =
|
|
27309
|
-
if (
|
|
27310
|
-
|
|
27319
|
+
var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
|
|
27320
|
+
if (this_1.dropPosition === 'topSegment') {
|
|
27321
|
+
this_1.dropAtTop(recordIndex1);
|
|
27311
27322
|
}
|
|
27312
|
-
if (
|
|
27313
|
-
if (!
|
|
27323
|
+
if (this_1.dropPosition === 'bottomSegment') {
|
|
27324
|
+
if (!this_1.isSharedTask) {
|
|
27314
27325
|
if (!droppedRecord.hasChildRecords) {
|
|
27315
|
-
if (
|
|
27316
|
-
|
|
27326
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27327
|
+
this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
|
|
27317
27328
|
}
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
|
-
if (
|
|
27321
|
-
var taskId =
|
|
27322
|
-
|
|
27329
|
+
this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
|
|
27330
|
+
this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27331
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27332
|
+
var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27333
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
|
|
27323
27334
|
}
|
|
27324
27335
|
}
|
|
27325
27336
|
else {
|
|
27326
|
-
count =
|
|
27327
|
-
if (
|
|
27328
|
-
|
|
27337
|
+
count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
|
|
27338
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27339
|
+
this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
|
|
27329
27340
|
}
|
|
27330
|
-
|
|
27341
|
+
this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
|
|
27331
27342
|
/* eslint-disable-next-line */
|
|
27332
|
-
|
|
27333
|
-
if (
|
|
27334
|
-
var spliceId =
|
|
27335
|
-
|
|
27343
|
+
this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27344
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27345
|
+
var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27346
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
|
|
27336
27347
|
}
|
|
27337
27348
|
}
|
|
27338
|
-
|
|
27339
|
-
|
|
27340
|
-
|
|
27349
|
+
this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
|
|
27350
|
+
this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
|
|
27351
|
+
this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
|
|
27341
27352
|
if (draggedRecord.hasChildRecords) {
|
|
27342
27353
|
var level = 1;
|
|
27343
|
-
|
|
27344
|
-
|
|
27354
|
+
this_1.updateChildRecordLevel(draggedRecord, level);
|
|
27355
|
+
this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
|
|
27345
27356
|
}
|
|
27346
27357
|
if (droppedRecord.parentItem) {
|
|
27347
|
-
var rec =
|
|
27358
|
+
var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
|
|
27348
27359
|
var childRecords = rec;
|
|
27349
27360
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
27350
27361
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord);
|
|
27351
27362
|
}
|
|
27352
27363
|
}
|
|
27353
27364
|
}
|
|
27354
|
-
if (
|
|
27355
|
-
|
|
27365
|
+
if (this_1.dropPosition === 'middleSegment') {
|
|
27366
|
+
this_1.dropMiddle(recordIndex1);
|
|
27356
27367
|
if (droppedRecord.childRecords.length > 0) {
|
|
27357
27368
|
delete droppedRecord.ganttProperties.segments;
|
|
27358
|
-
delete droppedRecord.taskData[
|
|
27369
|
+
delete droppedRecord.taskData[this_1.parent.taskFields.segments];
|
|
27359
27370
|
}
|
|
27360
27371
|
}
|
|
27361
27372
|
// eslint-disable-next-line
|
|
27362
|
-
if (!isNullOrUndefined(draggedRecord.parentItem &&
|
|
27363
|
-
|
|
27373
|
+
if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
|
|
27374
|
+
this_1.updateParentRecords.push(draggedRecord.parentItem);
|
|
27375
|
+
}
|
|
27376
|
+
}
|
|
27377
|
+
if (!this_1.parent.enableVirtualization) {
|
|
27378
|
+
var data_1 = gObj.flatData;
|
|
27379
|
+
var startIndex = void 0;
|
|
27380
|
+
var endIndex = void 0;
|
|
27381
|
+
if (draggedRecord.index < droppedRecord.index) {
|
|
27382
|
+
startIndex = draggedRecord.index;
|
|
27383
|
+
endIndex = droppedRecord.index;
|
|
27384
|
+
}
|
|
27385
|
+
else {
|
|
27386
|
+
startIndex = droppedRecord.index;
|
|
27387
|
+
endIndex = draggedRecord.index;
|
|
27388
|
+
}
|
|
27389
|
+
var _loop_2 = function (i_1) {
|
|
27390
|
+
if (!isNullOrUndefined(data_1[i_1])) {
|
|
27391
|
+
data_1[i_1].index = i_1;
|
|
27392
|
+
if (!isNullOrUndefined(data_1[i_1].parentItem)) {
|
|
27393
|
+
var updatedParent = data_1.filter(function (e) {
|
|
27394
|
+
return e.uniqueID === data_1[i_1].parentUniqueID;
|
|
27395
|
+
})[0];
|
|
27396
|
+
data_1[i_1].parentItem.index = updatedParent.index;
|
|
27397
|
+
}
|
|
27398
|
+
}
|
|
27399
|
+
};
|
|
27400
|
+
for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
|
|
27401
|
+
_loop_2(i_1);
|
|
27364
27402
|
}
|
|
27365
27403
|
}
|
|
27366
27404
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
27405
|
+
};
|
|
27406
|
+
var this_1 = this;
|
|
27407
|
+
for (var i = 0; i < dragLength; i++) {
|
|
27408
|
+
var state_1 = _loop_1(i);
|
|
27409
|
+
if (typeof state_1 === "object")
|
|
27410
|
+
return state_1.value;
|
|
27367
27411
|
}
|
|
27368
27412
|
if (this.dropPosition === 'middleSegment') {
|
|
27369
27413
|
if (droppedRecord.ganttProperties.predecessor) {
|