@syncfusion/ej2-gantt 19.3.46 → 19.3.55
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 +41 -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 +53 -12
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +103 -53
- 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 +5 -0
- package/src/gantt/actions/dialog-edit.js +9 -7
- package/src/gantt/actions/edit.js +3 -2
- package/src/gantt/actions/rowdragdrop.js +74 -41
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/date-processor.js +4 -1
- package/src/gantt/base/gantt.js +3 -0
- package/src/gantt/base/task-processor.js +1 -0
- package/src/gantt/base/utils.js +1 -1
- package/styles/bootstrap-dark.css +96 -100
- package/styles/bootstrap.css +96 -100
- package/styles/bootstrap4.css +96 -100
- package/styles/bootstrap5-dark.css +97 -100
- package/styles/bootstrap5.css +97 -100
- package/styles/fabric-dark.css +96 -100
- package/styles/fabric.css +96 -100
- package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
- package/styles/gantt/_bootstrap-definition.scss +0 -1
- package/styles/gantt/_bootstrap4-definition.scss +0 -1
- package/styles/gantt/_bootstrap5-definition.scss +0 -1
- package/styles/gantt/_fabric-dark-definition.scss +0 -1
- package/styles/gantt/_fabric-definition.scss +0 -1
- package/styles/gantt/_highcontrast-definition.scss +0 -1
- package/styles/gantt/_highcontrast-light-definition.scss +0 -1
- package/styles/gantt/_layout.scss +95 -94
- package/styles/gantt/_material-dark-definition.scss +0 -1
- package/styles/gantt/_material-definition.scss +0 -1
- package/styles/gantt/_tailwind-definition.scss +0 -1
- package/styles/gantt/_theme.scss +76 -81
- package/styles/gantt/bootstrap-dark.css +96 -100
- package/styles/gantt/bootstrap.css +96 -100
- package/styles/gantt/bootstrap4.css +96 -100
- package/styles/gantt/bootstrap5-dark.css +97 -100
- package/styles/gantt/bootstrap5.css +97 -100
- package/styles/gantt/fabric-dark.css +96 -100
- package/styles/gantt/fabric.css +96 -100
- package/styles/gantt/highcontrast-light.css +96 -100
- package/styles/gantt/highcontrast.css +96 -100
- package/styles/gantt/material-dark.css +96 -100
- package/styles/gantt/material.css +96 -100
- package/styles/gantt/tailwind-dark.css +96 -100
- package/styles/gantt/tailwind.css +96 -100
- package/styles/highcontrast-light.css +96 -100
- package/styles/highcontrast.css +96 -100
- package/styles/material-dark.css +96 -100
- package/styles/material.css +96 -100
- package/styles/tailwind-dark.css +96 -100
- package/styles/tailwind.css +96 -100
|
@@ -113,7 +113,7 @@ function getTaskData(records, isNotExtend, eventArgs, parent) {
|
|
|
113
113
|
for (let i = 0; i < records.length; i++) {
|
|
114
114
|
let data;
|
|
115
115
|
if (!isNullOrUndefined(parent) && parent.timezone) {
|
|
116
|
-
|
|
116
|
+
updateDates(records[i], parent);
|
|
117
117
|
}
|
|
118
118
|
// eslint-disable-next-line
|
|
119
119
|
data = isNotExtend ? (records[i].taskData) : extend({}, records[i].taskData, {}, true);
|
|
@@ -1207,7 +1207,10 @@ class DateProcessor {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
1209
|
remove(date, timezone) {
|
|
1210
|
-
|
|
1210
|
+
if (!isNullOrUndefined(date)) {
|
|
1211
|
+
date = this.reverse(date, timezone, date.getTimezoneOffset());
|
|
1212
|
+
}
|
|
1213
|
+
return date;
|
|
1211
1214
|
}
|
|
1212
1215
|
reverse(date, fromOffset, toOffset) {
|
|
1213
1216
|
if (typeof fromOffset === 'string') {
|
|
@@ -2320,6 +2323,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2320
2323
|
if (!isNullOrUndefined(ganttProperties.duration)) {
|
|
2321
2324
|
this.parent.setRecordValue('duration', updatedDuration, ganttProperties, true);
|
|
2322
2325
|
}
|
|
2326
|
+
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
2323
2327
|
}
|
|
2324
2328
|
}
|
|
2325
2329
|
/**
|
|
@@ -13014,6 +13018,9 @@ let Gantt = class Gantt extends Component {
|
|
|
13014
13018
|
if (this.keyboardModule) {
|
|
13015
13019
|
this.keyboardModule.destroy();
|
|
13016
13020
|
}
|
|
13021
|
+
if (this.editModule && this.editModule.dialogModule) {
|
|
13022
|
+
this.editModule.dialogModule.destroy();
|
|
13023
|
+
}
|
|
13017
13024
|
super.destroy();
|
|
13018
13025
|
this.chartVerticalLineContainer = null;
|
|
13019
13026
|
this.element.innerHTML = '';
|
|
@@ -16132,6 +16139,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16132
16139
|
showHideTaskBarEditingElements(element, secondElement, fadeConnectorLine) {
|
|
16133
16140
|
secondElement = secondElement ? secondElement : this.editElement;
|
|
16134
16141
|
let isShowProgressResizer = this.parent.taskFields.progress ? true : false;
|
|
16142
|
+
let isShowConnectorPoints = true;
|
|
16135
16143
|
if (this.parent.readOnly) {
|
|
16136
16144
|
return;
|
|
16137
16145
|
}
|
|
@@ -16141,6 +16149,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16141
16149
|
if (!isNullOrUndefined(parentRecord)) {
|
|
16142
16150
|
if (!parentRecord.expanded) {
|
|
16143
16151
|
isShowProgressResizer = false;
|
|
16152
|
+
isShowConnectorPoints = false;
|
|
16144
16153
|
}
|
|
16145
16154
|
}
|
|
16146
16155
|
}
|
|
@@ -16167,7 +16176,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16167
16176
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
16168
16177
|
&& (element.querySelector('.' + connectorPointLeft)
|
|
16169
16178
|
|| element.parentElement.querySelector('.' + connectorPointLeft))
|
|
16170
|
-
&&
|
|
16179
|
+
&& isShowConnectorPoints) {
|
|
16171
16180
|
const connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
16172
16181
|
element : element.parentElement;
|
|
16173
16182
|
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
@@ -17764,7 +17773,8 @@ class DialogEdit {
|
|
|
17764
17773
|
datetimepickeredit: DateTimePicker,
|
|
17765
17774
|
maskededit: MaskedTextBox,
|
|
17766
17775
|
numericedit: NumericTextBox,
|
|
17767
|
-
stringedit: TextBox
|
|
17776
|
+
stringedit: TextBox,
|
|
17777
|
+
defaultedit: TextBox
|
|
17768
17778
|
};
|
|
17769
17779
|
this.processDialogFields();
|
|
17770
17780
|
this.wireEvents();
|
|
@@ -18069,7 +18079,7 @@ class DialogEdit {
|
|
|
18069
18079
|
dialogModel.position = position;
|
|
18070
18080
|
//dialogModel.width = '750px';
|
|
18071
18081
|
dialogModel.height = this.parent.isAdaptive ? '100%' : 'auto';
|
|
18072
|
-
dialogModel.target =
|
|
18082
|
+
dialogModel.target = document.body;
|
|
18073
18083
|
dialogModel.close = this.dialogClose.bind(this);
|
|
18074
18084
|
dialogModel.closeOnEscape = true;
|
|
18075
18085
|
dialogModel.open = (args) => {
|
|
@@ -18355,15 +18365,15 @@ class DialogEdit {
|
|
|
18355
18365
|
this.resourceSelection(id);
|
|
18356
18366
|
}
|
|
18357
18367
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
18358
|
-
|
|
18368
|
+
document.getElementById(id).ej2_instances[0].refresh();
|
|
18359
18369
|
}
|
|
18360
18370
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
18361
18371
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
18362
|
-
|
|
18372
|
+
document.getElementById(id).ej2_instances[0]
|
|
18363
18373
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], false);
|
|
18364
18374
|
}
|
|
18365
18375
|
else {
|
|
18366
|
-
|
|
18376
|
+
document.getElementById(id).ej2_instances[0]
|
|
18367
18377
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], true);
|
|
18368
18378
|
}
|
|
18369
18379
|
}
|
|
@@ -18416,6 +18426,7 @@ class DialogEdit {
|
|
|
18416
18426
|
fieldsModel[column.field] = checkboxModel;
|
|
18417
18427
|
break;
|
|
18418
18428
|
}
|
|
18429
|
+
case 'defaultedit':
|
|
18419
18430
|
case 'stringedit':
|
|
18420
18431
|
{
|
|
18421
18432
|
const textBox = common;
|
|
@@ -19310,7 +19321,7 @@ class DialogEdit {
|
|
|
19310
19321
|
updateResourceCollection(args, resourceTreeGridId) {
|
|
19311
19322
|
if (!isNullOrUndefined(args.data) && Object.keys(args.data).length) {
|
|
19312
19323
|
const ganttObj = this.parent;
|
|
19313
|
-
const treeGridId =
|
|
19324
|
+
const treeGridId = document.querySelector('#' + resourceTreeGridId);
|
|
19314
19325
|
const resourceTreeGrid = treeGridId.ej2_instances[0];
|
|
19315
19326
|
if (!isNullOrUndefined(resourceTreeGrid) && resourceTreeGrid.getSelectedRecords().length > 0) {
|
|
19316
19327
|
const tempRecords = resourceTreeGrid.getSelectedRecords();
|
|
@@ -19383,7 +19394,7 @@ class DialogEdit {
|
|
|
19383
19394
|
return divElement;
|
|
19384
19395
|
}
|
|
19385
19396
|
resourceSelection(id) {
|
|
19386
|
-
const resourceTreeGrid =
|
|
19397
|
+
const resourceTreeGrid = document.querySelector('#' + id).ej2_instances[0];
|
|
19387
19398
|
let currentViewData = resourceTreeGrid.getCurrentViewRecords();
|
|
19388
19399
|
let resources = this.ganttResources;
|
|
19389
19400
|
if (resources && resources.length > 0) {
|
|
@@ -21758,6 +21769,7 @@ class Edit$2 {
|
|
|
21758
21769
|
let eventArgs = {};
|
|
21759
21770
|
eventArgs.requestType = 'beforeSave';
|
|
21760
21771
|
eventArgs.data = args.data;
|
|
21772
|
+
eventArgs.cancel = false;
|
|
21761
21773
|
eventArgs.modifiedRecords = this.parent.editedRecords;
|
|
21762
21774
|
if (!isNullOrUndefined(args.target)) {
|
|
21763
21775
|
eventArgs.target = args.target;
|
|
@@ -22587,13 +22599,13 @@ class Edit$2 {
|
|
|
22587
22599
|
changedRecords: eventArg.modifiedTaskData
|
|
22588
22600
|
};
|
|
22589
22601
|
const adaptor = data.adaptor;
|
|
22602
|
+
const query = this.parent.query instanceof Query ? this.parent.query : new Query();
|
|
22590
22603
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data.dataSource.batchUrl) {
|
|
22591
|
-
const crud = data.saveChanges(updatedData, this.parent.taskFields.id);
|
|
22604
|
+
const crud = data.saveChanges(updatedData, this.parent.taskFields.id, null, query);
|
|
22592
22605
|
crud.then(() => this.deleteSuccess(args))
|
|
22593
22606
|
.catch((e) => this.dmFailure(e, args));
|
|
22594
22607
|
}
|
|
22595
22608
|
else {
|
|
22596
|
-
const query = this.parent.query instanceof Query ? this.parent.query : new Query();
|
|
22597
22609
|
const deletedRecords = 'deletedRecords';
|
|
22598
22610
|
let deleteCrud = null;
|
|
22599
22611
|
for (let i = 0; i < updatedData[deletedRecords].length; i++) {
|
|
@@ -26051,6 +26063,11 @@ class ContextMenu$2 {
|
|
|
26051
26063
|
const target = args.event ? args.event.target :
|
|
26052
26064
|
!this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
|
|
26053
26065
|
this.parent.ganttChartModule.targetElement;
|
|
26066
|
+
// Closed edited cell before opening context menu
|
|
26067
|
+
// eslint-disable-next-line
|
|
26068
|
+
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
26069
|
+
this.parent.treeGrid.closeEdit();
|
|
26070
|
+
}
|
|
26054
26071
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|
|
26055
26072
|
this.clickedPosition = getValue('event', args).clientX;
|
|
26056
26073
|
}
|
|
@@ -26810,6 +26827,30 @@ class RowDD$1 {
|
|
|
26810
26827
|
this.updateParentRecords.push(draggedRecord.parentItem);
|
|
26811
26828
|
}
|
|
26812
26829
|
}
|
|
26830
|
+
if (!this.parent.enableVirtualization) {
|
|
26831
|
+
let data = gObj.flatData;
|
|
26832
|
+
let startIndex;
|
|
26833
|
+
let endIndex;
|
|
26834
|
+
if (draggedRecord.index < droppedRecord.index) {
|
|
26835
|
+
startIndex = draggedRecord.index;
|
|
26836
|
+
endIndex = droppedRecord.index;
|
|
26837
|
+
}
|
|
26838
|
+
else {
|
|
26839
|
+
startIndex = droppedRecord.index;
|
|
26840
|
+
endIndex = draggedRecord.index;
|
|
26841
|
+
}
|
|
26842
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
26843
|
+
if (!isNullOrUndefined(data[i])) {
|
|
26844
|
+
data[i].index = i;
|
|
26845
|
+
if (!isNullOrUndefined(data[i].parentItem)) {
|
|
26846
|
+
let updatedParent = data.filter((e) => {
|
|
26847
|
+
return e.uniqueID === data[i].parentUniqueID;
|
|
26848
|
+
})[0];
|
|
26849
|
+
data[i].parentItem.index = updatedParent.index;
|
|
26850
|
+
}
|
|
26851
|
+
}
|
|
26852
|
+
}
|
|
26853
|
+
}
|
|
26813
26854
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
26814
26855
|
}
|
|
26815
26856
|
if (this.dropPosition === 'middleSegment') {
|