@syncfusion/ej2-gantt 19.3.53 → 19.4.38
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 +31 -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 +127 -51
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +124 -48
- 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 +36 -15
- package/src/gantt/actions/dialog-edit.js +7 -2
- package/src/gantt/actions/edit.js +4 -0
- 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 +6 -24
- package/src/gantt/base/gantt.d.ts +17 -0
- package/src/gantt/base/gantt.js +32 -3
- package/src/gantt/base/task-processor.js +20 -3
- package/src/gantt/renderer/timeline.js +17 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +7 -6
- package/styles/bootstrap5.css +7 -6
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/gantt/_bootstrap4-definition.scss +1 -0
- package/styles/gantt/_bootstrap5-definition.scss +1 -1
- package/styles/gantt/_fluent-definition.scss +163 -0
- package/styles/gantt/_layout.scss +2 -7
- package/styles/gantt/_theme.scss +2 -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 +7 -6
- package/styles/gantt/bootstrap5.css +7 -6
- 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/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/material.css +1 -1
- package/styles/gantt/tailwind-dark.css +2 -2
- package/styles/gantt/tailwind.css +2 -2
- 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 +2 -2
- package/styles/tailwind.css +2 -2
|
@@ -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
|
}
|
|
@@ -6090,6 +6107,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6090
6107
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
|
|
6091
6108
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6092
6109
|
increment = this.getIncrement(startDate, count, mode);
|
|
6110
|
+
if (this.parent.isInDst(startDate)) {
|
|
6111
|
+
increment = increment + (1000 * 60 * 60);
|
|
6112
|
+
}
|
|
6093
6113
|
newTime = startDate.getTime() + increment;
|
|
6094
6114
|
startDate.setTime(newTime);
|
|
6095
6115
|
if (startDate >= endDate) {
|
|
@@ -6153,11 +6173,19 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6153
6173
|
dayIntervel - 1 : dayIntervel : dayIntervel;
|
|
6154
6174
|
lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
|
|
6155
6175
|
increment = lastDay.getTime() - firstDay.getTime();
|
|
6176
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6177
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6178
|
+
increment = increment - (1000 * 60 * 60);
|
|
6179
|
+
}
|
|
6156
6180
|
break;
|
|
6157
6181
|
}
|
|
6158
6182
|
case 'Day':
|
|
6159
6183
|
lastDay.setHours(24, 0, 0, 0);
|
|
6160
6184
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
|
|
6185
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6186
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6187
|
+
increment -= (1000 * 60 * 60);
|
|
6188
|
+
}
|
|
6161
6189
|
break;
|
|
6162
6190
|
case 'Hour':
|
|
6163
6191
|
lastDay.setMinutes(60);
|
|
@@ -6252,7 +6280,12 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6252
6280
|
* @private
|
|
6253
6281
|
*/
|
|
6254
6282
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
6255
|
-
var
|
|
6283
|
+
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6284
|
+
if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
|
|
6285
|
+
(!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
|
|
6286
|
+
timeDifference = timeDifference - (1000 * 60 * 60);
|
|
6287
|
+
}
|
|
6288
|
+
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6256
6289
|
return balanceDay * this.parent.perDayWidth;
|
|
6257
6290
|
};
|
|
6258
6291
|
/**
|
|
@@ -12398,6 +12431,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12398
12431
|
/** @hidden */
|
|
12399
12432
|
_this.isExpandCollapseLevelMethod = false;
|
|
12400
12433
|
/** @hidden */
|
|
12434
|
+
_this.isDynamicData = false;
|
|
12435
|
+
/** @hidden */
|
|
12401
12436
|
_this.isConnectorLineUpdate = false;
|
|
12402
12437
|
/** @hidden */
|
|
12403
12438
|
_this.staticSelectedRowIndex = -1;
|
|
@@ -12555,6 +12590,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12555
12590
|
return ganttDateFormat;
|
|
12556
12591
|
}
|
|
12557
12592
|
};
|
|
12593
|
+
/**
|
|
12594
|
+
* To get timezone offset.
|
|
12595
|
+
*
|
|
12596
|
+
* @returns {number} .
|
|
12597
|
+
* @private
|
|
12598
|
+
*/
|
|
12599
|
+
Gantt.prototype.getDefaultTZOffset = function () {
|
|
12600
|
+
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12601
|
+
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12602
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12603
|
+
};
|
|
12604
|
+
/**
|
|
12605
|
+
* To check whether the date is in DST.
|
|
12606
|
+
*
|
|
12607
|
+
* @param {Date} date .
|
|
12608
|
+
* @returns {boolean} .
|
|
12609
|
+
* @private
|
|
12610
|
+
*/
|
|
12611
|
+
Gantt.prototype.isInDst = function (date) {
|
|
12612
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12613
|
+
};
|
|
12558
12614
|
/**
|
|
12559
12615
|
* Method to map resource fields.
|
|
12560
12616
|
*
|
|
@@ -12686,6 +12742,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12686
12742
|
Gantt.prototype.renderGantt = function (isChange) {
|
|
12687
12743
|
// predecessor calculation
|
|
12688
12744
|
if (this.predecessorModule && this.taskFields.dependency) {
|
|
12745
|
+
this.predecessorModule['parentIds'] = [];
|
|
12746
|
+
this.predecessorModule['parentRecord'] = [];
|
|
12689
12747
|
this.predecessorModule.updatePredecessors();
|
|
12690
12748
|
if (this.isInPredecessorValidation && this.enableValidation) {
|
|
12691
12749
|
this.predecessorModule.updatedRecordsDateByPredecessor();
|
|
@@ -12705,7 +12763,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12705
12763
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12706
12764
|
}
|
|
12707
12765
|
else {
|
|
12708
|
-
this.treeGrid.dataSource = this.flatData
|
|
12766
|
+
this.treeGrid.dataSource = this.flatData;
|
|
12709
12767
|
}
|
|
12710
12768
|
}
|
|
12711
12769
|
else {
|
|
@@ -14753,6 +14811,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14753
14811
|
* @public
|
|
14754
14812
|
*/
|
|
14755
14813
|
Gantt.prototype.updateDataSource = function (dataSource, args) {
|
|
14814
|
+
this.isDynamicData = true;
|
|
14756
14815
|
if (!isNullOrUndefined(args)) {
|
|
14757
14816
|
for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
|
|
14758
14817
|
var prop = _a[_i];
|
|
@@ -14956,12 +15015,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14956
15015
|
if (!isNullOrUndefined(rowData)) {
|
|
14957
15016
|
var data = extend({}, {}, rowData.taskData, true);
|
|
14958
15017
|
var taskfields = this.taskFields;
|
|
15018
|
+
if (data[taskfields.startDate]) {
|
|
15019
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
15020
|
+
}
|
|
14959
15021
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
14960
15022
|
data[taskfields.duration] = 0;
|
|
14961
15023
|
}
|
|
14962
15024
|
else {
|
|
14963
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
14964
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
15025
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
15026
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
14965
15027
|
}
|
|
14966
15028
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
14967
15029
|
if (data[taskfields.milestone] === false) {
|
|
@@ -16772,8 +16834,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16772
16834
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
16773
16835
|
var args = {
|
|
16774
16836
|
cancel: false,
|
|
16775
|
-
requestType: '
|
|
16837
|
+
requestType: 'taskbarediting'
|
|
16776
16838
|
};
|
|
16839
|
+
if (this.segmentIndex !== -1) {
|
|
16840
|
+
args.requestType = 'mergeSegment';
|
|
16841
|
+
}
|
|
16777
16842
|
this.parent.trigger('actionBegin', args, function (arg) {
|
|
16778
16843
|
if (arg.cancel === false) {
|
|
16779
16844
|
_this.taskBarEditingAction(event, false);
|
|
@@ -17600,36 +17665,15 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17600
17665
|
var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
17601
17666
|
this.parent.timelineModule.bottomTier;
|
|
17602
17667
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
17603
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
17668
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
17604
17669
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
17605
17670
|
}
|
|
17606
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
17671
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
17607
17672
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
17608
17673
|
}
|
|
17609
17674
|
}
|
|
17610
17675
|
return pStartDate;
|
|
17611
17676
|
};
|
|
17612
|
-
/**
|
|
17613
|
-
* To get timezone offset.
|
|
17614
|
-
*
|
|
17615
|
-
* @returns {number} .
|
|
17616
|
-
* @private
|
|
17617
|
-
*/
|
|
17618
|
-
TaskbarEdit.prototype.getDefaultTZOffset = function () {
|
|
17619
|
-
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
17620
|
-
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
17621
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
17622
|
-
};
|
|
17623
|
-
/**
|
|
17624
|
-
* To check whether the date is in DST.
|
|
17625
|
-
*
|
|
17626
|
-
* @param {Date} date .
|
|
17627
|
-
* @returns {boolean} .
|
|
17628
|
-
* @private
|
|
17629
|
-
*/
|
|
17630
|
-
TaskbarEdit.prototype.isInDst = function (date) {
|
|
17631
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
17632
|
-
};
|
|
17633
17677
|
/**
|
|
17634
17678
|
* To set item position.
|
|
17635
17679
|
*
|
|
@@ -18228,7 +18272,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18228
18272
|
datetimepickeredit: DateTimePicker,
|
|
18229
18273
|
maskededit: MaskedTextBox,
|
|
18230
18274
|
numericedit: NumericTextBox,
|
|
18231
|
-
stringedit: TextBox
|
|
18275
|
+
stringedit: TextBox,
|
|
18276
|
+
defaultedit: TextBox
|
|
18232
18277
|
};
|
|
18233
18278
|
this.processDialogFields();
|
|
18234
18279
|
this.wireEvents();
|
|
@@ -18884,6 +18929,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18884
18929
|
fieldsModel[column.field] = checkboxModel;
|
|
18885
18930
|
break;
|
|
18886
18931
|
}
|
|
18932
|
+
case 'defaultedit':
|
|
18887
18933
|
case 'stringedit':
|
|
18888
18934
|
{
|
|
18889
18935
|
var textBox = common;
|
|
@@ -19278,7 +19324,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19278
19324
|
var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
19279
19325
|
var value = args.rowData[args.column.field];
|
|
19280
19326
|
setValue('value', value, datePickerModel);
|
|
19281
|
-
var datePicker = new
|
|
19327
|
+
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
19282
19328
|
datePicker.appendTo(args.element);
|
|
19283
19329
|
},
|
|
19284
19330
|
read: function (args) {
|
|
@@ -20165,6 +20211,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20165
20211
|
this.rowData.ganttProperties.segments = dataSource;
|
|
20166
20212
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
20167
20213
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
20214
|
+
if (dataSource.length <= 0) {
|
|
20215
|
+
this.validateDuration(this.rowData);
|
|
20216
|
+
}
|
|
20168
20217
|
}
|
|
20169
20218
|
};
|
|
20170
20219
|
// eslint-disable-next-line
|
|
@@ -23610,6 +23659,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23610
23659
|
var taskFields = this.parent.taskFields;
|
|
23611
23660
|
var dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
|
|
23612
23661
|
this.parent.dataSource;
|
|
23662
|
+
if (this.parent.dataSource instanceof DataManager) {
|
|
23663
|
+
dataSource = this.parent.dataSource.dataSource.json;
|
|
23664
|
+
}
|
|
23613
23665
|
for (var i = 0; i < addedRecord.length; i++) {
|
|
23614
23666
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
23615
23667
|
rowPosition = 'Top';
|
|
@@ -23682,6 +23734,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23682
23734
|
Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
23683
23735
|
var _this = this;
|
|
23684
23736
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23737
|
+
this.parent.isDynamicData = true;
|
|
23685
23738
|
var cAddedRecord_1 = [];
|
|
23686
23739
|
if (isNullOrUndefined(data)) {
|
|
23687
23740
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord_1);
|
|
@@ -26459,6 +26512,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26459
26512
|
position = this.item;
|
|
26460
26513
|
data = extend({}, {}, this.rowData.taskData, true);
|
|
26461
26514
|
taskfields = this.parent.taskFields;
|
|
26515
|
+
if (data[taskfields.startDate]) {
|
|
26516
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
26517
|
+
}
|
|
26518
|
+
if (data[taskfields.endDate]) {
|
|
26519
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
26520
|
+
}
|
|
26462
26521
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
26463
26522
|
data[taskfields.dependency] = null;
|
|
26464
26523
|
}
|
|
@@ -26652,7 +26711,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26652
26711
|
var item = _a[_i];
|
|
26653
26712
|
// let target: EventTarget = target;
|
|
26654
26713
|
if (!item.separator) {
|
|
26655
|
-
this.
|
|
26714
|
+
if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
|
|
26715
|
+
this.hideItems.push(item.text);
|
|
26716
|
+
}
|
|
26717
|
+
else {
|
|
26718
|
+
this.updateItemStatus(item, target, rowIndex);
|
|
26719
|
+
}
|
|
26656
26720
|
}
|
|
26657
26721
|
}
|
|
26658
26722
|
args.rowData = this.rowData;
|
|
@@ -26764,24 +26828,34 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26764
26828
|
break;
|
|
26765
26829
|
case 'Indent':
|
|
26766
26830
|
{
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
this.parent.
|
|
26773
|
-
|
|
26831
|
+
if (!this.parent.allowSelection) {
|
|
26832
|
+
this.hideItems.push(item.text);
|
|
26833
|
+
}
|
|
26834
|
+
else {
|
|
26835
|
+
var index = this.parent.selectedRowIndex;
|
|
26836
|
+
var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26837
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26838
|
+
var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
26839
|
+
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
26840
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
26841
|
+
this.updateItemVisibility(item.text);
|
|
26842
|
+
}
|
|
26774
26843
|
}
|
|
26775
26844
|
break;
|
|
26776
26845
|
}
|
|
26777
26846
|
case 'Outdent':
|
|
26778
26847
|
{
|
|
26779
|
-
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26783
|
-
|
|
26784
|
-
this.
|
|
26848
|
+
if (!this.parent.allowSelection) {
|
|
26849
|
+
this.hideItems.push(item.text);
|
|
26850
|
+
}
|
|
26851
|
+
else {
|
|
26852
|
+
var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
|
|
26853
|
+
var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26854
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26855
|
+
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
26856
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
26857
|
+
this.updateItemVisibility(item.text);
|
|
26858
|
+
}
|
|
26785
26859
|
}
|
|
26786
26860
|
break;
|
|
26787
26861
|
}
|
|
@@ -26844,7 +26918,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26844
26918
|
};
|
|
26845
26919
|
ContextMenu$$1.prototype.contextMenuOpen = function (args) {
|
|
26846
26920
|
this.isOpen = true;
|
|
26847
|
-
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
|
|
26921
|
+
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
26848
26922
|
addClass([firstMenuItem], 'e-focused');
|
|
26849
26923
|
};
|
|
26850
26924
|
ContextMenu$$1.prototype.getMenuItems = function () {
|
|
@@ -27666,6 +27740,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27666
27740
|
else {
|
|
27667
27741
|
var level = 1;
|
|
27668
27742
|
draggedRecord.level = droppedRecord.level + 1;
|
|
27743
|
+
this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
|
|
27669
27744
|
this.updateChildRecordLevel(draggedRecord, level);
|
|
27670
27745
|
}
|
|
27671
27746
|
droppedRecord.expanded = true;
|
|
@@ -27750,6 +27825,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27750
27825
|
parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
|
|
27751
27826
|
}
|
|
27752
27827
|
currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
|
|
27828
|
+
this.parent.setRecordValue('level', currentRecord.level, currentRecord);
|
|
27753
27829
|
if (currentRecord.hasChildRecords) {
|
|
27754
27830
|
level--;
|
|
27755
27831
|
level = this.updateChildRecordLevel(currentRecord, level);
|