@syncfusion/ej2-gantt 19.3.56 → 19.4.41
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 +39 -0
- 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 +135 -58
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +132 -55
- 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 +2 -2
- package/src/gantt/actions/rowdragdrop.js +2 -0
- package/src/gantt/actions/taskbar-edit.d.ts +0 -15
- package/src/gantt/actions/taskbar-edit.js +7 -24
- package/src/gantt/base/gantt.d.ts +17 -0
- package/src/gantt/base/gantt.js +32 -7
- package/src/gantt/base/task-processor.js +20 -3
- 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 +18 -1
- 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
|
@@ -2229,8 +2229,16 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2229
2229
|
var ganttProperties = ganttData.ganttProperties;
|
|
2230
2230
|
var duration = data[taskSettings.duration];
|
|
2231
2231
|
duration = isNullOrUndefined(duration) || duration === '' ? null : duration;
|
|
2232
|
-
var startDate
|
|
2233
|
-
var endDate
|
|
2232
|
+
var startDate;
|
|
2233
|
+
var endDate;
|
|
2234
|
+
if (ganttProperties.startDate && ganttProperties.endDate) {
|
|
2235
|
+
startDate = this.getDateFromFormat(ganttProperties.startDate, true);
|
|
2236
|
+
endDate = this.getDateFromFormat(ganttProperties.endDate, true);
|
|
2237
|
+
}
|
|
2238
|
+
else {
|
|
2239
|
+
startDate = this.getDateFromFormat(data[taskSettings.startDate], true);
|
|
2240
|
+
endDate = this.getDateFromFormat(data[taskSettings.endDate], true);
|
|
2241
|
+
}
|
|
2234
2242
|
var segments = taskSettings.segments ? (data[taskSettings.segments] ||
|
|
2235
2243
|
ganttData.taskData[taskSettings.segments]) : null;
|
|
2236
2244
|
var isMileStone = taskSettings.milestone ? data[taskSettings.milestone] ? true : false : false;
|
|
@@ -2832,7 +2840,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2832
2840
|
if (!isNullOrUndefined(value)) {
|
|
2833
2841
|
value = new Date(tempDate.getTime());
|
|
2834
2842
|
}
|
|
2835
|
-
this.parent.
|
|
2843
|
+
if (!this.parent.isLoad && !this.parent.isDynamicData) {
|
|
2844
|
+
this.parent.setRecordValue('taskData.' + mapping, value, task);
|
|
2845
|
+
}
|
|
2846
|
+
this.parent.isDynamicData = false;
|
|
2836
2847
|
};
|
|
2837
2848
|
TaskProcessor.prototype.getDurationInDay = function (duration, durationUnit) {
|
|
2838
2849
|
if (durationUnit === 'day') {
|
|
@@ -3654,7 +3665,13 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3654
3665
|
continue;
|
|
3655
3666
|
}
|
|
3656
3667
|
var startDate = this.getValidStartDate(childData.ganttProperties);
|
|
3668
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3669
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
3670
|
+
}
|
|
3657
3671
|
var endDate = this.getValidEndDate(childData.ganttProperties);
|
|
3672
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3673
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
3674
|
+
}
|
|
3658
3675
|
if (isNullOrUndefined(minStartDate)) {
|
|
3659
3676
|
minStartDate = this.getDateFromFormat(startDate);
|
|
3660
3677
|
}
|
|
@@ -6163,6 +6180,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6163
6180
|
lastDay.setMinutes(60);
|
|
6164
6181
|
lastDay.setSeconds(0);
|
|
6165
6182
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
|
|
6183
|
+
increment = this.checkDate(firstDay, lastDay, increment, count);
|
|
6166
6184
|
break;
|
|
6167
6185
|
case 'Minutes':
|
|
6168
6186
|
lastDay.setSeconds(60);
|
|
@@ -6171,6 +6189,21 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6171
6189
|
}
|
|
6172
6190
|
return increment;
|
|
6173
6191
|
};
|
|
6192
|
+
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
6193
|
+
var date = new Date(firstDay.getTime());
|
|
6194
|
+
date.setTime(date.getTime() + increment);
|
|
6195
|
+
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
6196
|
+
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
6197
|
+
if (!this.parent.isInDst(date)) {
|
|
6198
|
+
increment += (1000 * 60 * 60 * diffCount);
|
|
6199
|
+
}
|
|
6200
|
+
else if (this.parent.isInDst(date)) {
|
|
6201
|
+
increment -= (1000 * 60 * 60 * diffCount);
|
|
6202
|
+
}
|
|
6203
|
+
}
|
|
6204
|
+
return increment;
|
|
6205
|
+
};
|
|
6206
|
+
|
|
6174
6207
|
/**
|
|
6175
6208
|
* Method to find header cell was weekend or not
|
|
6176
6209
|
*
|
|
@@ -6252,7 +6285,8 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6252
6285
|
* @private
|
|
6253
6286
|
*/
|
|
6254
6287
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
6255
|
-
var
|
|
6288
|
+
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6289
|
+
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6256
6290
|
return balanceDay * this.parent.perDayWidth;
|
|
6257
6291
|
};
|
|
6258
6292
|
/**
|
|
@@ -6941,6 +6975,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6941
6975
|
if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
|
|
6942
6976
|
if (this.parent.selectedRowIndex != -1) {
|
|
6943
6977
|
this.parent.selectRow(this.parent.selectedRowIndex);
|
|
6978
|
+
if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
|
|
6979
|
+
this.parent.selectedRowIndex = -1;
|
|
6980
|
+
}
|
|
6944
6981
|
}
|
|
6945
6982
|
else {
|
|
6946
6983
|
this.parent.selectRow(0);
|
|
@@ -9312,6 +9349,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9312
9349
|
}
|
|
9313
9350
|
}
|
|
9314
9351
|
}
|
|
9352
|
+
this.parent.renderTemplates();
|
|
9315
9353
|
this.triggerQueryTaskbarInfo();
|
|
9316
9354
|
this.parent.modifiedRecords = [];
|
|
9317
9355
|
if (collapsedResourceRecord.length) {
|
|
@@ -9676,6 +9714,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9676
9714
|
else {
|
|
9677
9715
|
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
9678
9716
|
}
|
|
9717
|
+
this.parent.renderTemplates();
|
|
9679
9718
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
9680
9719
|
if (isValidateRange) {
|
|
9681
9720
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
@@ -12196,9 +12235,9 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12196
12235
|
{
|
|
12197
12236
|
if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
12198
12237
|
e.preventDefault();
|
|
12199
|
-
var focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
|
|
12200
|
-
focussedElement.focus();
|
|
12201
12238
|
ganttObj.addRecord();
|
|
12239
|
+
var focussedElement = ganttObj.element;
|
|
12240
|
+
focussedElement.focus();
|
|
12202
12241
|
}
|
|
12203
12242
|
break;
|
|
12204
12243
|
}
|
|
@@ -12398,6 +12437,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12398
12437
|
/** @hidden */
|
|
12399
12438
|
_this.isExpandCollapseLevelMethod = false;
|
|
12400
12439
|
/** @hidden */
|
|
12440
|
+
_this.isDynamicData = false;
|
|
12441
|
+
/** @hidden */
|
|
12401
12442
|
_this.isConnectorLineUpdate = false;
|
|
12402
12443
|
/** @hidden */
|
|
12403
12444
|
_this.staticSelectedRowIndex = -1;
|
|
@@ -12555,6 +12596,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12555
12596
|
return ganttDateFormat;
|
|
12556
12597
|
}
|
|
12557
12598
|
};
|
|
12599
|
+
/**
|
|
12600
|
+
* To get timezone offset.
|
|
12601
|
+
*
|
|
12602
|
+
* @returns {number} .
|
|
12603
|
+
* @private
|
|
12604
|
+
*/
|
|
12605
|
+
Gantt.prototype.getDefaultTZOffset = function () {
|
|
12606
|
+
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12607
|
+
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12608
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12609
|
+
};
|
|
12610
|
+
/**
|
|
12611
|
+
* To check whether the date is in DST.
|
|
12612
|
+
*
|
|
12613
|
+
* @param {Date} date .
|
|
12614
|
+
* @returns {boolean} .
|
|
12615
|
+
* @private
|
|
12616
|
+
*/
|
|
12617
|
+
Gantt.prototype.isInDst = function (date) {
|
|
12618
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12619
|
+
};
|
|
12558
12620
|
/**
|
|
12559
12621
|
* Method to map resource fields.
|
|
12560
12622
|
*
|
|
@@ -12707,7 +12769,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12707
12769
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12708
12770
|
}
|
|
12709
12771
|
else {
|
|
12710
|
-
this.treeGrid.dataSource = this.flatData
|
|
12772
|
+
this.treeGrid.dataSource = this.flatData;
|
|
12711
12773
|
}
|
|
12712
12774
|
}
|
|
12713
12775
|
else {
|
|
@@ -13269,10 +13331,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13269
13331
|
this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
|
|
13270
13332
|
this.treeGrid.grid.dataBind();
|
|
13271
13333
|
}
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
this.treeGrid.dataBind();
|
|
13275
|
-
}
|
|
13334
|
+
this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
|
|
13335
|
+
this.treeGrid.dataBind();
|
|
13276
13336
|
if (this.toolbarModule) {
|
|
13277
13337
|
this.toolbarModule.updateSearchTextBox();
|
|
13278
13338
|
}
|
|
@@ -14755,6 +14815,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14755
14815
|
* @public
|
|
14756
14816
|
*/
|
|
14757
14817
|
Gantt.prototype.updateDataSource = function (dataSource, args) {
|
|
14818
|
+
this.isDynamicData = true;
|
|
14758
14819
|
if (!isNullOrUndefined(args)) {
|
|
14759
14820
|
for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
|
|
14760
14821
|
var prop = _a[_i];
|
|
@@ -14958,12 +15019,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14958
15019
|
if (!isNullOrUndefined(rowData)) {
|
|
14959
15020
|
var data = extend({}, {}, rowData.taskData, true);
|
|
14960
15021
|
var taskfields = this.taskFields;
|
|
15022
|
+
if (data[taskfields.startDate]) {
|
|
15023
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
15024
|
+
}
|
|
14961
15025
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
14962
15026
|
data[taskfields.duration] = 0;
|
|
14963
15027
|
}
|
|
14964
15028
|
else {
|
|
14965
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
14966
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
15029
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
15030
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
14967
15031
|
}
|
|
14968
15032
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
14969
15033
|
if (data[taskfields.milestone] === false) {
|
|
@@ -16774,8 +16838,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16774
16838
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
16775
16839
|
var args = {
|
|
16776
16840
|
cancel: false,
|
|
16777
|
-
requestType: '
|
|
16841
|
+
requestType: 'taskbarediting'
|
|
16778
16842
|
};
|
|
16843
|
+
if (this.segmentIndex !== -1) {
|
|
16844
|
+
args.requestType = 'mergeSegment';
|
|
16845
|
+
}
|
|
16779
16846
|
this.parent.trigger('actionBegin', args, function (arg) {
|
|
16780
16847
|
if (arg.cancel === false) {
|
|
16781
16848
|
_this.taskBarEditingAction(event, false);
|
|
@@ -17602,36 +17669,15 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17602
17669
|
var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
17603
17670
|
this.parent.timelineModule.bottomTier;
|
|
17604
17671
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
17605
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
17672
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
17606
17673
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
17607
17674
|
}
|
|
17608
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
17675
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
17609
17676
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
17610
17677
|
}
|
|
17611
17678
|
}
|
|
17612
17679
|
return pStartDate;
|
|
17613
17680
|
};
|
|
17614
|
-
/**
|
|
17615
|
-
* To get timezone offset.
|
|
17616
|
-
*
|
|
17617
|
-
* @returns {number} .
|
|
17618
|
-
* @private
|
|
17619
|
-
*/
|
|
17620
|
-
TaskbarEdit.prototype.getDefaultTZOffset = function () {
|
|
17621
|
-
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
17622
|
-
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
17623
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
17624
|
-
};
|
|
17625
|
-
/**
|
|
17626
|
-
* To check whether the date is in DST.
|
|
17627
|
-
*
|
|
17628
|
-
* @param {Date} date .
|
|
17629
|
-
* @returns {boolean} .
|
|
17630
|
-
* @private
|
|
17631
|
-
*/
|
|
17632
|
-
TaskbarEdit.prototype.isInDst = function (date) {
|
|
17633
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
17634
|
-
};
|
|
17635
17681
|
/**
|
|
17636
17682
|
* To set item position.
|
|
17637
17683
|
*
|
|
@@ -17781,6 +17827,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17781
17827
|
this.isMouseDragged = false;
|
|
17782
17828
|
}
|
|
17783
17829
|
else {
|
|
17830
|
+
this.parent.isOnEdit = false;
|
|
17784
17831
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
17785
17832
|
}
|
|
17786
17833
|
}
|
|
@@ -18439,7 +18486,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18439
18486
|
tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
|
|
18440
18487
|
}
|
|
18441
18488
|
else if (columns[i].field === taskSettings.name) {
|
|
18442
|
-
tempData[field] = '
|
|
18489
|
+
tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
|
|
18443
18490
|
tempData.ganttProperties.taskName = tempData[field];
|
|
18444
18491
|
}
|
|
18445
18492
|
else if (columns[i].field === taskSettings.progress) {
|
|
@@ -19282,7 +19329,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19282
19329
|
var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
19283
19330
|
var value = args.rowData[args.column.field];
|
|
19284
19331
|
setValue('value', value, datePickerModel);
|
|
19285
|
-
var datePicker = new
|
|
19332
|
+
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
19286
19333
|
datePicker.appendTo(args.element);
|
|
19287
19334
|
},
|
|
19288
19335
|
read: function (args) {
|
|
@@ -19357,7 +19404,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19357
19404
|
inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
|
|
19358
19405
|
.ej2_instances[0];
|
|
19359
19406
|
}
|
|
19360
|
-
if (inputValue.value !== tempValue.toString()) {
|
|
19407
|
+
if (inputValue.value.toString() !== tempValue.toString()) {
|
|
19361
19408
|
inputValue.value = tempValue;
|
|
19362
19409
|
inputValue.dataBind();
|
|
19363
19410
|
}
|
|
@@ -20169,6 +20216,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20169
20216
|
this.rowData.ganttProperties.segments = dataSource;
|
|
20170
20217
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
20171
20218
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
20219
|
+
if (dataSource.length <= 0) {
|
|
20220
|
+
this.validateDuration(this.rowData);
|
|
20221
|
+
}
|
|
20172
20222
|
}
|
|
20173
20223
|
};
|
|
20174
20224
|
// eslint-disable-next-line
|
|
@@ -21980,7 +22030,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21980
22030
|
this.updateParentItemOnEditing();
|
|
21981
22031
|
}
|
|
21982
22032
|
/** Update parent up-to zeroth level */
|
|
21983
|
-
if (ganttRecord.parentItem
|
|
22033
|
+
if (ganttRecord.parentItem) {
|
|
21984
22034
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
21985
22035
|
}
|
|
21986
22036
|
this.initiateSaveAction(args);
|
|
@@ -23614,6 +23664,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23614
23664
|
var taskFields = this.parent.taskFields;
|
|
23615
23665
|
var dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
|
|
23616
23666
|
this.parent.dataSource;
|
|
23667
|
+
if (this.parent.dataSource instanceof DataManager) {
|
|
23668
|
+
dataSource = this.parent.dataSource.dataSource.json;
|
|
23669
|
+
}
|
|
23617
23670
|
for (var i = 0; i < addedRecord.length; i++) {
|
|
23618
23671
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
23619
23672
|
rowPosition = 'Top';
|
|
@@ -23686,6 +23739,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23686
23739
|
Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
23687
23740
|
var _this = this;
|
|
23688
23741
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23742
|
+
this.parent.isDynamicData = true;
|
|
23689
23743
|
var cAddedRecord_1 = [];
|
|
23690
23744
|
if (isNullOrUndefined(data)) {
|
|
23691
23745
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord_1);
|
|
@@ -26463,6 +26517,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26463
26517
|
position = this.item;
|
|
26464
26518
|
data = extend({}, {}, this.rowData.taskData, true);
|
|
26465
26519
|
taskfields = this.parent.taskFields;
|
|
26520
|
+
if (data[taskfields.startDate]) {
|
|
26521
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
26522
|
+
}
|
|
26523
|
+
if (data[taskfields.endDate]) {
|
|
26524
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
26525
|
+
}
|
|
26466
26526
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
26467
26527
|
data[taskfields.dependency] = null;
|
|
26468
26528
|
}
|
|
@@ -26656,7 +26716,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26656
26716
|
var item = _a[_i];
|
|
26657
26717
|
// let target: EventTarget = target;
|
|
26658
26718
|
if (!item.separator) {
|
|
26659
|
-
this.
|
|
26719
|
+
if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
|
|
26720
|
+
this.hideItems.push(item.text);
|
|
26721
|
+
}
|
|
26722
|
+
else {
|
|
26723
|
+
this.updateItemStatus(item, target, rowIndex);
|
|
26724
|
+
}
|
|
26660
26725
|
}
|
|
26661
26726
|
}
|
|
26662
26727
|
args.rowData = this.rowData;
|
|
@@ -26768,24 +26833,34 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26768
26833
|
break;
|
|
26769
26834
|
case 'Indent':
|
|
26770
26835
|
{
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
this.parent.
|
|
26777
|
-
|
|
26836
|
+
if (!this.parent.allowSelection) {
|
|
26837
|
+
this.hideItems.push(item.text);
|
|
26838
|
+
}
|
|
26839
|
+
else {
|
|
26840
|
+
var index = this.parent.selectedRowIndex;
|
|
26841
|
+
var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26842
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26843
|
+
var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
26844
|
+
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
26845
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
26846
|
+
this.updateItemVisibility(item.text);
|
|
26847
|
+
}
|
|
26778
26848
|
}
|
|
26779
26849
|
break;
|
|
26780
26850
|
}
|
|
26781
26851
|
case 'Outdent':
|
|
26782
26852
|
{
|
|
26783
|
-
|
|
26784
|
-
|
|
26785
|
-
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
this.
|
|
26853
|
+
if (!this.parent.allowSelection) {
|
|
26854
|
+
this.hideItems.push(item.text);
|
|
26855
|
+
}
|
|
26856
|
+
else {
|
|
26857
|
+
var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
|
|
26858
|
+
var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26859
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26860
|
+
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
26861
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
26862
|
+
this.updateItemVisibility(item.text);
|
|
26863
|
+
}
|
|
26789
26864
|
}
|
|
26790
26865
|
break;
|
|
26791
26866
|
}
|
|
@@ -27670,6 +27745,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27670
27745
|
else {
|
|
27671
27746
|
var level = 1;
|
|
27672
27747
|
draggedRecord.level = droppedRecord.level + 1;
|
|
27748
|
+
this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
|
|
27673
27749
|
this.updateChildRecordLevel(draggedRecord, level);
|
|
27674
27750
|
}
|
|
27675
27751
|
droppedRecord.expanded = true;
|
|
@@ -27754,6 +27830,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27754
27830
|
parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
|
|
27755
27831
|
}
|
|
27756
27832
|
currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
|
|
27833
|
+
this.parent.setRecordValue('level', currentRecord.level, currentRecord);
|
|
27757
27834
|
if (currentRecord.hasChildRecords) {
|
|
27758
27835
|
level--;
|
|
27759
27836
|
level = this.updateChildRecordLevel(currentRecord, level);
|