@syncfusion/ej2-gantt 19.3.55 → 19.4.40

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +131 -54
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +128 -51
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +18 -18
  13. package/src/gantt/actions/context-menu.js +36 -15
  14. package/src/gantt/actions/dialog-edit.js +5 -2
  15. package/src/gantt/actions/edit.js +5 -1
  16. package/src/gantt/actions/keyboard.js +2 -2
  17. package/src/gantt/actions/rowdragdrop.js +2 -0
  18. package/src/gantt/actions/taskbar-edit.d.ts +0 -15
  19. package/src/gantt/actions/taskbar-edit.js +6 -24
  20. package/src/gantt/base/gantt.d.ts +17 -0
  21. package/src/gantt/base/gantt.js +32 -3
  22. package/src/gantt/base/task-processor.js +20 -3
  23. package/src/gantt/base/tree-grid.js +3 -0
  24. package/src/gantt/renderer/timeline.js +17 -1
  25. package/styles/bootstrap5-dark.css +6 -4
  26. package/styles/bootstrap5.css +6 -4
  27. package/styles/fabric-dark.css +1 -1
  28. package/styles/gantt/_bootstrap4-definition.scss +1 -0
  29. package/styles/gantt/_bootstrap5-definition.scss +1 -1
  30. package/styles/gantt/_fabric-dark-definition.scss +2 -1
  31. package/styles/gantt/_fluent-definition.scss +163 -0
  32. package/styles/gantt/_layout.scss +7 -7
  33. package/styles/gantt/_material-dark-definition.scss +2 -1
  34. package/styles/gantt/_theme.scss +2 -1
  35. package/styles/gantt/bootstrap5-dark.css +6 -4
  36. package/styles/gantt/bootstrap5.css +6 -4
  37. package/styles/gantt/fabric-dark.css +1 -1
  38. package/styles/gantt/icons/_fluent.scss +112 -0
  39. package/styles/gantt/icons/_tailwind-dark.scss +112 -112
  40. package/styles/gantt/material-dark.css +1 -1
  41. package/styles/gantt/tailwind-dark.css +1 -1
  42. package/styles/gantt/tailwind.css +1 -1
  43. package/styles/material-dark.css +1 -1
  44. package/styles/tailwind-dark.css +1 -1
  45. 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 = this.getDateFromFormat(data[taskSettings.startDate], true);
2233
- var endDate = this.getDateFromFormat(data[taskSettings.endDate], true);
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.setRecordValue('taskData.' + mapping, value, task);
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 balanceDay = ((endDate.getTime() - scheduleWeeks.getTime()) / (1000 * 60 * 60 * 24));
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
  /**
@@ -6941,6 +6974,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6941
6974
  if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
6942
6975
  if (this.parent.selectedRowIndex != -1) {
6943
6976
  this.parent.selectRow(this.parent.selectedRowIndex);
6977
+ if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
6978
+ this.parent.selectedRowIndex = -1;
6979
+ }
6944
6980
  }
6945
6981
  else {
6946
6982
  this.parent.selectRow(0);
@@ -12196,9 +12232,9 @@ var FocusModule = /** @__PURE__ @class */ (function () {
12196
12232
  {
12197
12233
  if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
12198
12234
  e.preventDefault();
12199
- var focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
12200
- focussedElement.focus();
12201
12235
  ganttObj.addRecord();
12236
+ var focussedElement = ganttObj.element;
12237
+ focussedElement.focus();
12202
12238
  }
12203
12239
  break;
12204
12240
  }
@@ -12398,6 +12434,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12398
12434
  /** @hidden */
12399
12435
  _this.isExpandCollapseLevelMethod = false;
12400
12436
  /** @hidden */
12437
+ _this.isDynamicData = false;
12438
+ /** @hidden */
12401
12439
  _this.isConnectorLineUpdate = false;
12402
12440
  /** @hidden */
12403
12441
  _this.staticSelectedRowIndex = -1;
@@ -12555,6 +12593,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12555
12593
  return ganttDateFormat;
12556
12594
  }
12557
12595
  };
12596
+ /**
12597
+ * To get timezone offset.
12598
+ *
12599
+ * @returns {number} .
12600
+ * @private
12601
+ */
12602
+ Gantt.prototype.getDefaultTZOffset = function () {
12603
+ var janMonth = new Date(new Date().getFullYear(), 0, 1);
12604
+ var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
12605
+ return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
12606
+ };
12607
+ /**
12608
+ * To check whether the date is in DST.
12609
+ *
12610
+ * @param {Date} date .
12611
+ * @returns {boolean} .
12612
+ * @private
12613
+ */
12614
+ Gantt.prototype.isInDst = function (date) {
12615
+ return date.getTimezoneOffset() < this.getDefaultTZOffset();
12616
+ };
12558
12617
  /**
12559
12618
  * Method to map resource fields.
12560
12619
  *
@@ -12686,6 +12745,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12686
12745
  Gantt.prototype.renderGantt = function (isChange) {
12687
12746
  // predecessor calculation
12688
12747
  if (this.predecessorModule && this.taskFields.dependency) {
12748
+ this.predecessorModule['parentIds'] = [];
12749
+ this.predecessorModule['parentRecord'] = [];
12689
12750
  this.predecessorModule.updatePredecessors();
12690
12751
  if (this.isInPredecessorValidation && this.enableValidation) {
12691
12752
  this.predecessorModule.updatedRecordsDateByPredecessor();
@@ -12705,7 +12766,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12705
12766
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12706
12767
  }
12707
12768
  else {
12708
- this.treeGrid.dataSource = this.flatData.length > 0 ? this.flatData : [];
12769
+ this.treeGrid.dataSource = this.flatData;
12709
12770
  }
12710
12771
  }
12711
12772
  else {
@@ -14753,6 +14814,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14753
14814
  * @public
14754
14815
  */
14755
14816
  Gantt.prototype.updateDataSource = function (dataSource, args) {
14817
+ this.isDynamicData = true;
14756
14818
  if (!isNullOrUndefined(args)) {
14757
14819
  for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
14758
14820
  var prop = _a[_i];
@@ -14956,12 +15018,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14956
15018
  if (!isNullOrUndefined(rowData)) {
14957
15019
  var data = extend({}, {}, rowData.taskData, true);
14958
15020
  var taskfields = this.taskFields;
15021
+ if (data[taskfields.startDate]) {
15022
+ this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
15023
+ }
14959
15024
  if (!isNullOrUndefined(taskfields.duration)) {
14960
15025
  data[taskfields.duration] = 0;
14961
15026
  }
14962
15027
  else {
14963
- data[taskfields.startDate] = new Date(rowData.taskData[taskfields.startDate]);
14964
- data[taskfields.endDate] = new Date(rowData.taskData[taskfields.startDate]);
15028
+ data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
15029
+ data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
14965
15030
  }
14966
15031
  if (!isNullOrUndefined(taskfields.milestone)) {
14967
15032
  if (data[taskfields.milestone] === false) {
@@ -16772,8 +16837,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16772
16837
  if (this.isMouseDragged && this.taskBarEditAction) {
16773
16838
  var args = {
16774
16839
  cancel: false,
16775
- requestType: 'mergeSegment'
16840
+ requestType: 'taskbarediting'
16776
16841
  };
16842
+ if (this.segmentIndex !== -1) {
16843
+ args.requestType = 'mergeSegment';
16844
+ }
16777
16845
  this.parent.trigger('actionBegin', args, function (arg) {
16778
16846
  if (arg.cancel === false) {
16779
16847
  _this.taskBarEditingAction(event, false);
@@ -17600,36 +17668,15 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
17600
17668
  var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
17601
17669
  this.parent.timelineModule.bottomTier;
17602
17670
  if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
17603
- if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
17671
+ if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
17604
17672
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
17605
17673
  }
17606
- else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
17674
+ else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
17607
17675
  pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
17608
17676
  }
17609
17677
  }
17610
17678
  return pStartDate;
17611
17679
  };
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
17680
  /**
17634
17681
  * To set item position.
17635
17682
  *
@@ -19280,7 +19327,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19280
19327
  var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
19281
19328
  var value = args.rowData[args.column.field];
19282
19329
  setValue('value', value, datePickerModel);
19283
- var datePicker = new DatePicker(datePickerModel);
19330
+ var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
19284
19331
  datePicker.appendTo(args.element);
19285
19332
  },
19286
19333
  read: function (args) {
@@ -19355,7 +19402,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19355
19402
  inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
19356
19403
  .ej2_instances[0];
19357
19404
  }
19358
- if (inputValue.value !== tempValue.toString()) {
19405
+ if (inputValue.value.toString() !== tempValue.toString()) {
19359
19406
  inputValue.value = tempValue;
19360
19407
  inputValue.dataBind();
19361
19408
  }
@@ -20167,6 +20214,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20167
20214
  this.rowData.ganttProperties.segments = dataSource;
20168
20215
  this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
20169
20216
  this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
20217
+ if (dataSource.length <= 0) {
20218
+ this.validateDuration(this.rowData);
20219
+ }
20170
20220
  }
20171
20221
  };
20172
20222
  // eslint-disable-next-line
@@ -21978,7 +22028,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
21978
22028
  this.updateParentItemOnEditing();
21979
22029
  }
21980
22030
  /** Update parent up-to zeroth level */
21981
- if (ganttRecord.parentItem || this.parent.taskMode !== 'Auto') {
22031
+ if (ganttRecord.parentItem) {
21982
22032
  this.parent.dataOperation.updateParentItems(ganttRecord, true);
21983
22033
  }
21984
22034
  this.initiateSaveAction(args);
@@ -23612,6 +23662,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23612
23662
  var taskFields = this.parent.taskFields;
23613
23663
  var dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
23614
23664
  this.parent.dataSource;
23665
+ if (this.parent.dataSource instanceof DataManager) {
23666
+ dataSource = this.parent.dataSource.dataSource.json;
23667
+ }
23615
23668
  for (var i = 0; i < addedRecord.length; i++) {
23616
23669
  if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
23617
23670
  rowPosition = 'Top';
@@ -23684,6 +23737,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23684
23737
  Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
23685
23738
  var _this = this;
23686
23739
  if (this.parent.editModule && this.parent.editSettings.allowAdding) {
23740
+ this.parent.isDynamicData = true;
23687
23741
  var cAddedRecord_1 = [];
23688
23742
  if (isNullOrUndefined(data)) {
23689
23743
  this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord_1);
@@ -26461,6 +26515,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26461
26515
  position = this.item;
26462
26516
  data = extend({}, {}, this.rowData.taskData, true);
26463
26517
  taskfields = this.parent.taskFields;
26518
+ if (data[taskfields.startDate]) {
26519
+ this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
26520
+ }
26521
+ if (data[taskfields.endDate]) {
26522
+ this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
26523
+ }
26464
26524
  if (!isNullOrUndefined(taskfields.dependency)) {
26465
26525
  data[taskfields.dependency] = null;
26466
26526
  }
@@ -26654,7 +26714,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26654
26714
  var item = _a[_i];
26655
26715
  // let target: EventTarget = target;
26656
26716
  if (!item.separator) {
26657
- this.updateItemStatus(item, target, rowIndex);
26717
+ if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
26718
+ this.hideItems.push(item.text);
26719
+ }
26720
+ else {
26721
+ this.updateItemStatus(item, target, rowIndex);
26722
+ }
26658
26723
  }
26659
26724
  }
26660
26725
  args.rowData = this.rowData;
@@ -26766,24 +26831,34 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26766
26831
  break;
26767
26832
  case 'Indent':
26768
26833
  {
26769
- var index = this.parent.selectedRowIndex;
26770
- var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
26771
- this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
26772
- var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
26773
- if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
26774
- this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
26775
- this.updateItemVisibility(item.text);
26834
+ if (!this.parent.allowSelection) {
26835
+ this.hideItems.push(item.text);
26836
+ }
26837
+ else {
26838
+ var index = this.parent.selectedRowIndex;
26839
+ var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
26840
+ this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
26841
+ var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
26842
+ if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
26843
+ this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
26844
+ this.updateItemVisibility(item.text);
26845
+ }
26776
26846
  }
26777
26847
  break;
26778
26848
  }
26779
26849
  case 'Outdent':
26780
26850
  {
26781
- var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
26782
- var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
26783
- this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
26784
- if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
26785
- this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
26786
- this.updateItemVisibility(item.text);
26851
+ if (!this.parent.allowSelection) {
26852
+ this.hideItems.push(item.text);
26853
+ }
26854
+ else {
26855
+ var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
26856
+ var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
26857
+ this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
26858
+ if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
26859
+ this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
26860
+ this.updateItemVisibility(item.text);
26861
+ }
26787
26862
  }
26788
26863
  break;
26789
26864
  }
@@ -26846,7 +26921,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26846
26921
  };
26847
26922
  ContextMenu$$1.prototype.contextMenuOpen = function (args) {
26848
26923
  this.isOpen = true;
26849
- var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
26924
+ var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
26850
26925
  addClass([firstMenuItem], 'e-focused');
26851
26926
  };
26852
26927
  ContextMenu$$1.prototype.getMenuItems = function () {
@@ -27668,6 +27743,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27668
27743
  else {
27669
27744
  var level = 1;
27670
27745
  draggedRecord.level = droppedRecord.level + 1;
27746
+ this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
27671
27747
  this.updateChildRecordLevel(draggedRecord, level);
27672
27748
  }
27673
27749
  droppedRecord.expanded = true;
@@ -27752,6 +27828,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27752
27828
  parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
27753
27829
  }
27754
27830
  currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
27831
+ this.parent.setRecordValue('level', currentRecord.level, currentRecord);
27755
27832
  if (currentRecord.hasChildRecords) {
27756
27833
  level--;
27757
27834
  level = this.updateChildRecordLevel(currentRecord, level);