@syncfusion/ej2-gantt 19.3.57 → 19.4.42
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 -1
- package/README.md +1 -1
- 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 +149 -74
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +146 -71
- 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 +35 -14
- package/src/gantt/actions/dialog-edit.js +6 -3
- package/src/gantt/actions/edit.js +5 -1
- package/src/gantt/actions/keyboard.js +6 -2
- package/src/gantt/actions/rowdragdrop.js +2 -0
- package/src/gantt/actions/taskbar-edit.js +5 -1
- package/src/gantt/base/date-processor.js +8 -1
- package/src/gantt/base/gantt-chart.js +0 -2
- package/src/gantt/base/gantt.d.ts +15 -13
- package/src/gantt/base/gantt.js +32 -28
- package/src/gantt/base/task-processor.js +26 -4
- package/src/gantt/base/tree-grid.js +3 -0
- package/src/gantt/renderer/chart-rows.js +2 -0
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +16 -15
- package/styles/bootstrap5-dark.css +6 -5
- package/styles/bootstrap5.css +6 -5
- package/styles/fabric-dark.css +1 -1
- package/styles/gantt/_bootstrap4-definition.scss +1 -0
- package/styles/gantt/_bootstrap5-definition.scss +1 -1
- package/styles/gantt/_fabric-dark-definition.scss +2 -1
- package/styles/gantt/_fluent-definition.scss +163 -0
- package/styles/gantt/_layout.scss +7 -7
- package/styles/gantt/_material-dark-definition.scss +2 -1
- package/styles/gantt/_theme.scss +2 -1
- package/styles/gantt/bootstrap5-dark.css +6 -5
- package/styles/gantt/bootstrap5.css +6 -5
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/icons/_fluent.scss +112 -0
- package/styles/gantt/icons/_tailwind-dark.scss +112 -112
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -483,7 +483,14 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
483
483
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
484
484
|
}
|
|
485
485
|
else {
|
|
486
|
-
|
|
486
|
+
// eslint-disable-next-line
|
|
487
|
+
if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
488
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
|
|
489
|
+
tDuration = 1;
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
tDuration = this.getDuration(ganttProperties.startDate, ganttProperties.endDate, ganttProperties.durationUnit, ganttProperties.isAutoSchedule, ganttProperties.isMilestone);
|
|
493
|
+
}
|
|
487
494
|
}
|
|
488
495
|
this.parent.setRecordValue('duration', tDuration, ganttProperties, true);
|
|
489
496
|
var col = this.parent.columnByField[this.parent.columnMapping.duration];
|
|
@@ -2229,8 +2236,16 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2229
2236
|
var ganttProperties = ganttData.ganttProperties;
|
|
2230
2237
|
var duration = data[taskSettings.duration];
|
|
2231
2238
|
duration = isNullOrUndefined(duration) || duration === '' ? null : duration;
|
|
2232
|
-
var startDate
|
|
2233
|
-
var endDate
|
|
2239
|
+
var startDate;
|
|
2240
|
+
var endDate;
|
|
2241
|
+
if (ganttProperties.startDate && ganttProperties.endDate) {
|
|
2242
|
+
startDate = this.getDateFromFormat(ganttProperties.startDate, true);
|
|
2243
|
+
endDate = this.getDateFromFormat(ganttProperties.endDate, true);
|
|
2244
|
+
}
|
|
2245
|
+
else {
|
|
2246
|
+
startDate = this.getDateFromFormat(data[taskSettings.startDate], true);
|
|
2247
|
+
endDate = this.getDateFromFormat(data[taskSettings.endDate], true);
|
|
2248
|
+
}
|
|
2234
2249
|
var segments = taskSettings.segments ? (data[taskSettings.segments] ||
|
|
2235
2250
|
ganttData.taskData[taskSettings.segments]) : null;
|
|
2236
2251
|
var isMileStone = taskSettings.milestone ? data[taskSettings.milestone] ? true : false : false;
|
|
@@ -2620,7 +2635,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2620
2635
|
eDate.setHours(0, 0, 0, 0);
|
|
2621
2636
|
}
|
|
2622
2637
|
}
|
|
2623
|
-
|
|
2638
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
2639
|
+
return (this.parent.perDayWidth);
|
|
2640
|
+
}
|
|
2641
|
+
else {
|
|
2642
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2643
|
+
}
|
|
2624
2644
|
};
|
|
2625
2645
|
/**
|
|
2626
2646
|
* Get task left value
|
|
@@ -2832,7 +2852,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2832
2852
|
if (!isNullOrUndefined(value)) {
|
|
2833
2853
|
value = new Date(tempDate.getTime());
|
|
2834
2854
|
}
|
|
2835
|
-
this.parent.
|
|
2855
|
+
if (!this.parent.isLoad && !this.parent.isDynamicData) {
|
|
2856
|
+
this.parent.setRecordValue('taskData.' + mapping, value, task);
|
|
2857
|
+
}
|
|
2858
|
+
this.parent.isDynamicData = false;
|
|
2836
2859
|
};
|
|
2837
2860
|
TaskProcessor.prototype.getDurationInDay = function (duration, durationUnit) {
|
|
2838
2861
|
if (durationUnit === 'day') {
|
|
@@ -3654,7 +3677,13 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3654
3677
|
continue;
|
|
3655
3678
|
}
|
|
3656
3679
|
var startDate = this.getValidStartDate(childData.ganttProperties);
|
|
3680
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3681
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
3682
|
+
}
|
|
3657
3683
|
var endDate = this.getValidEndDate(childData.ganttProperties);
|
|
3684
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3685
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
3686
|
+
}
|
|
3658
3687
|
if (isNullOrUndefined(minStartDate)) {
|
|
3659
3688
|
minStartDate = this.getDateFromFormat(startDate);
|
|
3660
3689
|
}
|
|
@@ -4856,8 +4885,6 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4856
4885
|
this.parent.treeGrid.collapseAll();
|
|
4857
4886
|
}
|
|
4858
4887
|
this.isExpandAll = false;
|
|
4859
|
-
var focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
4860
|
-
focussedElement.focus();
|
|
4861
4888
|
};
|
|
4862
4889
|
/**
|
|
4863
4890
|
* Public method to expand particular level of rows.
|
|
@@ -6090,9 +6117,6 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6090
6117
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
|
|
6091
6118
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6092
6119
|
increment = this.getIncrement(startDate, count, mode);
|
|
6093
|
-
if (this.parent.isInDst(startDate)) {
|
|
6094
|
-
increment = increment + (1000 * 60 * 60);
|
|
6095
|
-
}
|
|
6096
6120
|
newTime = startDate.getTime() + increment;
|
|
6097
6121
|
startDate.setTime(newTime);
|
|
6098
6122
|
if (startDate >= endDate) {
|
|
@@ -6156,24 +6180,17 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6156
6180
|
dayIntervel - 1 : dayIntervel : dayIntervel;
|
|
6157
6181
|
lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
|
|
6158
6182
|
increment = lastDay.getTime() - firstDay.getTime();
|
|
6159
|
-
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6160
|
-
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6161
|
-
increment = increment - (1000 * 60 * 60);
|
|
6162
|
-
}
|
|
6163
6183
|
break;
|
|
6164
6184
|
}
|
|
6165
6185
|
case 'Day':
|
|
6166
6186
|
lastDay.setHours(24, 0, 0, 0);
|
|
6167
6187
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
|
|
6168
|
-
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6169
|
-
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6170
|
-
increment -= (1000 * 60 * 60);
|
|
6171
|
-
}
|
|
6172
6188
|
break;
|
|
6173
6189
|
case 'Hour':
|
|
6174
6190
|
lastDay.setMinutes(60);
|
|
6175
6191
|
lastDay.setSeconds(0);
|
|
6176
6192
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
|
|
6193
|
+
increment = this.checkDate(firstDay, lastDay, increment, count);
|
|
6177
6194
|
break;
|
|
6178
6195
|
case 'Minutes':
|
|
6179
6196
|
lastDay.setSeconds(60);
|
|
@@ -6182,6 +6199,21 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6182
6199
|
}
|
|
6183
6200
|
return increment;
|
|
6184
6201
|
};
|
|
6202
|
+
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
6203
|
+
var date = new Date(firstDay.getTime());
|
|
6204
|
+
date.setTime(date.getTime() + increment);
|
|
6205
|
+
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
6206
|
+
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
6207
|
+
if (!this.parent.isInDst(date)) {
|
|
6208
|
+
increment += (1000 * 60 * 60 * diffCount);
|
|
6209
|
+
}
|
|
6210
|
+
else if (this.parent.isInDst(date)) {
|
|
6211
|
+
increment -= (1000 * 60 * 60 * diffCount);
|
|
6212
|
+
}
|
|
6213
|
+
}
|
|
6214
|
+
return increment;
|
|
6215
|
+
};
|
|
6216
|
+
|
|
6185
6217
|
/**
|
|
6186
6218
|
* Method to find header cell was weekend or not
|
|
6187
6219
|
*
|
|
@@ -6264,10 +6296,6 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6264
6296
|
*/
|
|
6265
6297
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
6266
6298
|
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6267
|
-
if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
|
|
6268
|
-
(!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
|
|
6269
|
-
timeDifference = timeDifference - (1000 * 60 * 60);
|
|
6270
|
-
}
|
|
6271
6299
|
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6272
6300
|
return balanceDay * this.parent.perDayWidth;
|
|
6273
6301
|
};
|
|
@@ -6957,6 +6985,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6957
6985
|
if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
|
|
6958
6986
|
if (this.parent.selectedRowIndex != -1) {
|
|
6959
6987
|
this.parent.selectRow(this.parent.selectedRowIndex);
|
|
6988
|
+
if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
|
|
6989
|
+
this.parent.selectedRowIndex = -1;
|
|
6990
|
+
}
|
|
6960
6991
|
}
|
|
6961
6992
|
else {
|
|
6962
6993
|
this.parent.selectRow(0);
|
|
@@ -9328,6 +9359,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9328
9359
|
}
|
|
9329
9360
|
}
|
|
9330
9361
|
}
|
|
9362
|
+
this.parent.renderTemplates();
|
|
9331
9363
|
this.triggerQueryTaskbarInfo();
|
|
9332
9364
|
this.parent.modifiedRecords = [];
|
|
9333
9365
|
if (collapsedResourceRecord.length) {
|
|
@@ -9692,6 +9724,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9692
9724
|
else {
|
|
9693
9725
|
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
9694
9726
|
}
|
|
9727
|
+
this.parent.renderTemplates();
|
|
9695
9728
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
9696
9729
|
if (isValidateRange) {
|
|
9697
9730
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
@@ -12100,6 +12133,10 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12100
12133
|
FocusModule.prototype.onKeyPress = function (e) {
|
|
12101
12134
|
var ganttObj = this.parent;
|
|
12102
12135
|
var expandedRecords = ganttObj.getExpandedRecords(ganttObj.currentViewData);
|
|
12136
|
+
if (isNullOrUndefined(this.parent.focusModule.getActiveElement()) && (e.action === 'expandAll' || e.action === 'collapseAll')) {
|
|
12137
|
+
var focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
12138
|
+
focussedElement.focus();
|
|
12139
|
+
}
|
|
12103
12140
|
var targetElement = this.parent.focusModule.getActiveElement();
|
|
12104
12141
|
if (e.action === 'home' || e.action === 'end' || e.action === 'downArrow' || e.action === 'upArrow' || e.action === 'delete' ||
|
|
12105
12142
|
e.action === 'rightArrow' || e.action === 'leftArrow' || e.action === 'focusTask' || e.action === 'focusSearch' ||
|
|
@@ -12212,9 +12249,9 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12212
12249
|
{
|
|
12213
12250
|
if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
12214
12251
|
e.preventDefault();
|
|
12215
|
-
var focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
|
|
12216
|
-
focussedElement.focus();
|
|
12217
12252
|
ganttObj.addRecord();
|
|
12253
|
+
var focussedElement = ganttObj.element;
|
|
12254
|
+
focussedElement.focus();
|
|
12218
12255
|
}
|
|
12219
12256
|
break;
|
|
12220
12257
|
}
|
|
@@ -12414,6 +12451,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12414
12451
|
/** @hidden */
|
|
12415
12452
|
_this.isExpandCollapseLevelMethod = false;
|
|
12416
12453
|
/** @hidden */
|
|
12454
|
+
_this.isDynamicData = false;
|
|
12455
|
+
/** @hidden */
|
|
12417
12456
|
_this.isConnectorLineUpdate = false;
|
|
12418
12457
|
/** @hidden */
|
|
12419
12458
|
_this.staticSelectedRowIndex = -1;
|
|
@@ -12453,27 +12492,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12453
12492
|
Gantt.prototype.getModuleName = function () {
|
|
12454
12493
|
return 'gantt';
|
|
12455
12494
|
};
|
|
12456
|
-
/**
|
|
12457
|
-
* To get timezone offset.
|
|
12458
|
-
*
|
|
12459
|
-
* @returns {number} .
|
|
12460
|
-
* @private
|
|
12461
|
-
*/
|
|
12462
|
-
Gantt.prototype.getDefaultTZOffset = function () {
|
|
12463
|
-
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12464
|
-
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12465
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12466
|
-
};
|
|
12467
|
-
/**
|
|
12468
|
-
* To check whether the date is in DST.
|
|
12469
|
-
*
|
|
12470
|
-
* @param {Date} date .
|
|
12471
|
-
* @returns {boolean} .
|
|
12472
|
-
* @private
|
|
12473
|
-
*/
|
|
12474
|
-
Gantt.prototype.isInDst = function (date) {
|
|
12475
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12476
|
-
};
|
|
12477
12495
|
/**
|
|
12478
12496
|
* For internal use only - Initialize the event handler
|
|
12479
12497
|
*
|
|
@@ -12592,6 +12610,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12592
12610
|
return ganttDateFormat;
|
|
12593
12611
|
}
|
|
12594
12612
|
};
|
|
12613
|
+
/**
|
|
12614
|
+
* To get timezone offset.
|
|
12615
|
+
*
|
|
12616
|
+
* @returns {number} .
|
|
12617
|
+
* @private
|
|
12618
|
+
*/
|
|
12619
|
+
Gantt.prototype.getDefaultTZOffset = function () {
|
|
12620
|
+
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12621
|
+
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12622
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12623
|
+
};
|
|
12624
|
+
/**
|
|
12625
|
+
* To check whether the date is in DST.
|
|
12626
|
+
*
|
|
12627
|
+
* @param {Date} date .
|
|
12628
|
+
* @returns {boolean} .
|
|
12629
|
+
* @private
|
|
12630
|
+
*/
|
|
12631
|
+
Gantt.prototype.isInDst = function (date) {
|
|
12632
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12633
|
+
};
|
|
12595
12634
|
/**
|
|
12596
12635
|
* Method to map resource fields.
|
|
12597
12636
|
*
|
|
@@ -12744,7 +12783,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12744
12783
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12745
12784
|
}
|
|
12746
12785
|
else {
|
|
12747
|
-
this.treeGrid.dataSource = this.flatData
|
|
12786
|
+
this.treeGrid.dataSource = this.flatData;
|
|
12748
12787
|
}
|
|
12749
12788
|
}
|
|
12750
12789
|
else {
|
|
@@ -13306,10 +13345,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13306
13345
|
this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
|
|
13307
13346
|
this.treeGrid.grid.dataBind();
|
|
13308
13347
|
}
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
this.treeGrid.dataBind();
|
|
13312
|
-
}
|
|
13348
|
+
this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
|
|
13349
|
+
this.treeGrid.dataBind();
|
|
13313
13350
|
if (this.toolbarModule) {
|
|
13314
13351
|
this.toolbarModule.updateSearchTextBox();
|
|
13315
13352
|
}
|
|
@@ -14792,6 +14829,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14792
14829
|
* @public
|
|
14793
14830
|
*/
|
|
14794
14831
|
Gantt.prototype.updateDataSource = function (dataSource, args) {
|
|
14832
|
+
this.isDynamicData = true;
|
|
14795
14833
|
if (!isNullOrUndefined(args)) {
|
|
14796
14834
|
for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
|
|
14797
14835
|
var prop = _a[_i];
|
|
@@ -14995,12 +15033,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14995
15033
|
if (!isNullOrUndefined(rowData)) {
|
|
14996
15034
|
var data = extend({}, {}, rowData.taskData, true);
|
|
14997
15035
|
var taskfields = this.taskFields;
|
|
15036
|
+
if (data[taskfields.startDate]) {
|
|
15037
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
15038
|
+
}
|
|
14998
15039
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
14999
15040
|
data[taskfields.duration] = 0;
|
|
15000
15041
|
}
|
|
15001
15042
|
else {
|
|
15002
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
15003
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
15043
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
15044
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
15004
15045
|
}
|
|
15005
15046
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
15006
15047
|
if (data[taskfields.milestone] === false) {
|
|
@@ -16811,8 +16852,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16811
16852
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
16812
16853
|
var args = {
|
|
16813
16854
|
cancel: false,
|
|
16814
|
-
requestType: '
|
|
16855
|
+
requestType: 'taskbarediting'
|
|
16815
16856
|
};
|
|
16857
|
+
if (this.segmentIndex !== -1) {
|
|
16858
|
+
args.requestType = 'mergeSegment';
|
|
16859
|
+
}
|
|
16816
16860
|
this.parent.trigger('actionBegin', args, function (arg) {
|
|
16817
16861
|
if (arg.cancel === false) {
|
|
16818
16862
|
_this.taskBarEditingAction(event, false);
|
|
@@ -17797,6 +17841,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17797
17841
|
this.isMouseDragged = false;
|
|
17798
17842
|
}
|
|
17799
17843
|
else {
|
|
17844
|
+
this.parent.isOnEdit = false;
|
|
17800
17845
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
17801
17846
|
}
|
|
17802
17847
|
}
|
|
@@ -18455,7 +18500,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18455
18500
|
tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
|
|
18456
18501
|
}
|
|
18457
18502
|
else if (columns[i].field === taskSettings.name) {
|
|
18458
|
-
tempData[field] = '
|
|
18503
|
+
tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
|
|
18459
18504
|
tempData.ganttProperties.taskName = tempData[field];
|
|
18460
18505
|
}
|
|
18461
18506
|
else if (columns[i].field === taskSettings.progress) {
|
|
@@ -19298,7 +19343,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19298
19343
|
var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
19299
19344
|
var value = args.rowData[args.column.field];
|
|
19300
19345
|
setValue('value', value, datePickerModel);
|
|
19301
|
-
var datePicker = new
|
|
19346
|
+
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
19302
19347
|
datePicker.appendTo(args.element);
|
|
19303
19348
|
},
|
|
19304
19349
|
read: function (args) {
|
|
@@ -19373,7 +19418,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19373
19418
|
inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
|
|
19374
19419
|
.ej2_instances[0];
|
|
19375
19420
|
}
|
|
19376
|
-
if (inputValue.value !== tempValue.toString()) {
|
|
19421
|
+
if (inputValue.value.toString() !== tempValue.toString()) {
|
|
19377
19422
|
inputValue.value = tempValue;
|
|
19378
19423
|
inputValue.dataBind();
|
|
19379
19424
|
}
|
|
@@ -20185,6 +20230,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20185
20230
|
this.rowData.ganttProperties.segments = dataSource;
|
|
20186
20231
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
20187
20232
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
20233
|
+
if (dataSource.length <= 0) {
|
|
20234
|
+
this.validateDuration(this.rowData);
|
|
20235
|
+
}
|
|
20188
20236
|
}
|
|
20189
20237
|
};
|
|
20190
20238
|
// eslint-disable-next-line
|
|
@@ -21996,7 +22044,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21996
22044
|
this.updateParentItemOnEditing();
|
|
21997
22045
|
}
|
|
21998
22046
|
/** Update parent up-to zeroth level */
|
|
21999
|
-
if (ganttRecord.parentItem
|
|
22047
|
+
if (ganttRecord.parentItem) {
|
|
22000
22048
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
22001
22049
|
}
|
|
22002
22050
|
this.initiateSaveAction(args);
|
|
@@ -23630,6 +23678,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23630
23678
|
var taskFields = this.parent.taskFields;
|
|
23631
23679
|
var dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
|
|
23632
23680
|
this.parent.dataSource;
|
|
23681
|
+
if (this.parent.dataSource instanceof DataManager) {
|
|
23682
|
+
dataSource = this.parent.dataSource.dataSource.json;
|
|
23683
|
+
}
|
|
23633
23684
|
for (var i = 0; i < addedRecord.length; i++) {
|
|
23634
23685
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
23635
23686
|
rowPosition = 'Top';
|
|
@@ -23702,6 +23753,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23702
23753
|
Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
23703
23754
|
var _this = this;
|
|
23704
23755
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23756
|
+
this.parent.isDynamicData = true;
|
|
23705
23757
|
var cAddedRecord_1 = [];
|
|
23706
23758
|
if (isNullOrUndefined(data)) {
|
|
23707
23759
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord_1);
|
|
@@ -26479,6 +26531,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26479
26531
|
position = this.item;
|
|
26480
26532
|
data = extend({}, {}, this.rowData.taskData, true);
|
|
26481
26533
|
taskfields = this.parent.taskFields;
|
|
26534
|
+
if (data[taskfields.startDate]) {
|
|
26535
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
26536
|
+
}
|
|
26537
|
+
if (data[taskfields.endDate]) {
|
|
26538
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
26539
|
+
}
|
|
26482
26540
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
26483
26541
|
data[taskfields.dependency] = null;
|
|
26484
26542
|
}
|
|
@@ -26672,7 +26730,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26672
26730
|
var item = _a[_i];
|
|
26673
26731
|
// let target: EventTarget = target;
|
|
26674
26732
|
if (!item.separator) {
|
|
26675
|
-
this.
|
|
26733
|
+
if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
|
|
26734
|
+
this.hideItems.push(item.text);
|
|
26735
|
+
}
|
|
26736
|
+
else {
|
|
26737
|
+
this.updateItemStatus(item, target, rowIndex);
|
|
26738
|
+
}
|
|
26676
26739
|
}
|
|
26677
26740
|
}
|
|
26678
26741
|
args.rowData = this.rowData;
|
|
@@ -26784,24 +26847,34 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26784
26847
|
break;
|
|
26785
26848
|
case 'Indent':
|
|
26786
26849
|
{
|
|
26787
|
-
|
|
26788
|
-
|
|
26789
|
-
|
|
26790
|
-
|
|
26791
|
-
|
|
26792
|
-
this.parent.
|
|
26793
|
-
|
|
26850
|
+
if (!this.parent.allowSelection) {
|
|
26851
|
+
this.hideItems.push(item.text);
|
|
26852
|
+
}
|
|
26853
|
+
else {
|
|
26854
|
+
var index = this.parent.selectedRowIndex;
|
|
26855
|
+
var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26856
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26857
|
+
var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
26858
|
+
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
26859
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
26860
|
+
this.updateItemVisibility(item.text);
|
|
26861
|
+
}
|
|
26794
26862
|
}
|
|
26795
26863
|
break;
|
|
26796
26864
|
}
|
|
26797
26865
|
case 'Outdent':
|
|
26798
26866
|
{
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
this.
|
|
26867
|
+
if (!this.parent.allowSelection) {
|
|
26868
|
+
this.hideItems.push(item.text);
|
|
26869
|
+
}
|
|
26870
|
+
else {
|
|
26871
|
+
var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
|
|
26872
|
+
var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26873
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26874
|
+
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
26875
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
26876
|
+
this.updateItemVisibility(item.text);
|
|
26877
|
+
}
|
|
26805
26878
|
}
|
|
26806
26879
|
break;
|
|
26807
26880
|
}
|
|
@@ -27686,6 +27759,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27686
27759
|
else {
|
|
27687
27760
|
var level = 1;
|
|
27688
27761
|
draggedRecord.level = droppedRecord.level + 1;
|
|
27762
|
+
this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
|
|
27689
27763
|
this.updateChildRecordLevel(draggedRecord, level);
|
|
27690
27764
|
}
|
|
27691
27765
|
droppedRecord.expanded = true;
|
|
@@ -27770,6 +27844,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27770
27844
|
parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
|
|
27771
27845
|
}
|
|
27772
27846
|
currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
|
|
27847
|
+
this.parent.setRecordValue('level', currentRecord.level, currentRecord);
|
|
27773
27848
|
if (currentRecord.hasChildRecords) {
|
|
27774
27849
|
level--;
|
|
27775
27850
|
level = this.updateChildRecordLevel(currentRecord, level);
|