@syncfusion/ej2-gantt 19.3.46 → 19.3.47

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 (56) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/ej2-gantt.umd.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-gantt.es2015.js +18 -10
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +18 -10
  7. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  8. package/dist/global/ej2-gantt.min.js +2 -2
  9. package/dist/global/ej2-gantt.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +13 -13
  12. package/src/gantt/actions/dialog-edit.js +6 -6
  13. package/src/gantt/actions/edit.js +3 -2
  14. package/src/gantt/base/date-processor.js +4 -1
  15. package/src/gantt/base/gantt.js +3 -0
  16. package/src/gantt/base/task-processor.js +1 -0
  17. package/src/gantt/base/utils.js +1 -1
  18. package/styles/bootstrap-dark.css +95 -99
  19. package/styles/bootstrap.css +95 -99
  20. package/styles/bootstrap4.css +95 -99
  21. package/styles/bootstrap5-dark.css +95 -99
  22. package/styles/bootstrap5.css +95 -99
  23. package/styles/fabric-dark.css +95 -99
  24. package/styles/fabric.css +95 -99
  25. package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
  26. package/styles/gantt/_bootstrap-definition.scss +0 -1
  27. package/styles/gantt/_bootstrap4-definition.scss +0 -1
  28. package/styles/gantt/_bootstrap5-definition.scss +0 -1
  29. package/styles/gantt/_fabric-dark-definition.scss +0 -1
  30. package/styles/gantt/_fabric-definition.scss +0 -1
  31. package/styles/gantt/_highcontrast-definition.scss +0 -1
  32. package/styles/gantt/_highcontrast-light-definition.scss +0 -1
  33. package/styles/gantt/_layout.scss +94 -93
  34. package/styles/gantt/_material-dark-definition.scss +0 -1
  35. package/styles/gantt/_material-definition.scss +0 -1
  36. package/styles/gantt/_tailwind-definition.scss +0 -1
  37. package/styles/gantt/_theme.scss +76 -81
  38. package/styles/gantt/bootstrap-dark.css +95 -99
  39. package/styles/gantt/bootstrap.css +95 -99
  40. package/styles/gantt/bootstrap4.css +95 -99
  41. package/styles/gantt/bootstrap5-dark.css +95 -99
  42. package/styles/gantt/bootstrap5.css +95 -99
  43. package/styles/gantt/fabric-dark.css +95 -99
  44. package/styles/gantt/fabric.css +95 -99
  45. package/styles/gantt/highcontrast-light.css +95 -99
  46. package/styles/gantt/highcontrast.css +95 -99
  47. package/styles/gantt/material-dark.css +95 -99
  48. package/styles/gantt/material.css +95 -99
  49. package/styles/gantt/tailwind-dark.css +95 -99
  50. package/styles/gantt/tailwind.css +95 -99
  51. package/styles/highcontrast-light.css +95 -99
  52. package/styles/highcontrast.css +95 -99
  53. package/styles/material-dark.css +95 -99
  54. package/styles/material.css +95 -99
  55. package/styles/tailwind-dark.css +95 -99
  56. package/styles/tailwind.css +95 -99
@@ -114,7 +114,7 @@ function getTaskData(records, isNotExtend, eventArgs, parent) {
114
114
  for (var i = 0; i < records.length; i++) {
115
115
  var data = void 0;
116
116
  if (!isNullOrUndefined(parent) && parent.timezone) {
117
- this.updateDates(records[i], parent);
117
+ updateDates(records[i], parent);
118
118
  }
119
119
  // eslint-disable-next-line
120
120
  data = isNotExtend ? (records[i].taskData) : extend({}, records[i].taskData, {}, true);
@@ -1208,7 +1208,10 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
1208
1208
  }
1209
1209
  };
1210
1210
  DateProcessor.prototype.remove = function (date, timezone) {
1211
- return this.reverse(date, timezone, date.getTimezoneOffset());
1211
+ if (!isNullOrUndefined(date)) {
1212
+ date = this.reverse(date, timezone, date.getTimezoneOffset());
1213
+ }
1214
+ return date;
1212
1215
  };
1213
1216
  DateProcessor.prototype.reverse = function (date, fromOffset, toOffset) {
1214
1217
  if (typeof fromOffset === 'string') {
@@ -2359,6 +2362,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2359
2362
  if (!isNullOrUndefined(ganttProperties.duration)) {
2360
2363
  this.parent.setRecordValue('duration', updatedDuration, ganttProperties, true);
2361
2364
  }
2365
+ this.parent.dataOperation.updateMappingData(ganttData, 'duration');
2362
2366
  }
2363
2367
  };
2364
2368
  /**
@@ -13430,6 +13434,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13430
13434
  if (this.keyboardModule) {
13431
13435
  this.keyboardModule.destroy();
13432
13436
  }
13437
+ if (this.editModule && this.editModule.dialogModule) {
13438
+ this.editModule.dialogModule.destroy();
13439
+ }
13433
13440
  _super.prototype.destroy.call(this);
13434
13441
  this.chartVerticalLineContainer = null;
13435
13442
  this.element.innerHTML = '';
@@ -18526,7 +18533,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18526
18533
  dialogModel.position = position;
18527
18534
  //dialogModel.width = '750px';
18528
18535
  dialogModel.height = this.parent.isAdaptive ? '100%' : 'auto';
18529
- dialogModel.target = this.parent.element;
18536
+ dialogModel.target = document.body;
18530
18537
  dialogModel.close = this.dialogClose.bind(this);
18531
18538
  dialogModel.closeOnEscape = true;
18532
18539
  dialogModel.open = function (args) {
@@ -18813,15 +18820,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18813
18820
  this.resourceSelection(id);
18814
18821
  }
18815
18822
  else if (id === ganttObj.element.id + 'NotesTabContainer') {
18816
- ganttObj.element.querySelector('#' + id).ej2_instances[0].refresh();
18823
+ document.getElementById(id).ej2_instances[0].refresh();
18817
18824
  }
18818
18825
  else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
18819
18826
  if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
18820
- ganttObj.element.querySelector('#' + id).ej2_instances[0]
18827
+ document.getElementById(id).ej2_instances[0]
18821
18828
  .enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], false);
18822
18829
  }
18823
18830
  else {
18824
- ganttObj.element.querySelector('#' + id).ej2_instances[0]
18831
+ document.getElementById(id).ej2_instances[0]
18825
18832
  .enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], true);
18826
18833
  }
18827
18834
  }
@@ -19781,7 +19788,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19781
19788
  DialogEdit.prototype.updateResourceCollection = function (args, resourceTreeGridId) {
19782
19789
  if (!isNullOrUndefined(args.data) && Object.keys(args.data).length) {
19783
19790
  var ganttObj = this.parent;
19784
- var treeGridId = ganttObj.element.querySelector('#' + resourceTreeGridId);
19791
+ var treeGridId = document.querySelector('#' + resourceTreeGridId);
19785
19792
  var resourceTreeGrid = treeGridId.ej2_instances[0];
19786
19793
  if (!isNullOrUndefined(resourceTreeGrid) && resourceTreeGrid.getSelectedRecords().length > 0) {
19787
19794
  var tempRecords = resourceTreeGrid.getSelectedRecords();
@@ -19856,7 +19863,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19856
19863
  };
19857
19864
  DialogEdit.prototype.resourceSelection = function (id) {
19858
19865
  var _this = this;
19859
- var resourceTreeGrid = this.parent.element.querySelector('#' + id).ej2_instances[0];
19866
+ var resourceTreeGrid = document.querySelector('#' + id).ej2_instances[0];
19860
19867
  var currentViewData = resourceTreeGrid.getCurrentViewRecords();
19861
19868
  var resources = this.ganttResources;
19862
19869
  if (resources && resources.length > 0) {
@@ -22263,6 +22270,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
22263
22270
  var eventArgs = {};
22264
22271
  eventArgs.requestType = 'beforeSave';
22265
22272
  eventArgs.data = args.data;
22273
+ eventArgs.cancel = false;
22266
22274
  eventArgs.modifiedRecords = this.parent.editedRecords;
22267
22275
  if (!isNullOrUndefined(args.target)) {
22268
22276
  eventArgs.target = args.target;
@@ -23093,13 +23101,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23093
23101
  changedRecords: eventArg.modifiedTaskData
23094
23102
  };
23095
23103
  var adaptor = data_1.adaptor;
23104
+ var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
23096
23105
  if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_1.dataSource.batchUrl) {
23097
- var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id);
23106
+ var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id, null, query_1);
23098
23107
  crud.then(function () { return _this.deleteSuccess(args); })
23099
23108
  .catch(function (e) { return _this.dmFailure(e, args); });
23100
23109
  }
23101
23110
  else {
23102
- var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
23103
23111
  var deletedRecords = 'deletedRecords';
23104
23112
  var deleteCrud = null;
23105
23113
  for (var i = 0; i < updatedData_1[deletedRecords].length; i++) {