@syncfusion/ej2-gantt 19.3.48 → 19.3.57

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 +33 -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 +46 -26
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +46 -26
  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 +18 -18
  12. package/src/gantt/actions/context-menu.js +1 -1
  13. package/src/gantt/actions/dialog-edit.js +3 -1
  14. package/src/gantt/actions/taskbar-edit.d.ts +0 -15
  15. package/src/gantt/actions/taskbar-edit.js +2 -23
  16. package/src/gantt/base/gantt.d.ts +15 -0
  17. package/src/gantt/base/gantt.js +23 -0
  18. package/src/gantt/renderer/timeline.js +17 -1
  19. package/styles/bootstrap-dark.css +1 -1
  20. package/styles/bootstrap.css +1 -1
  21. package/styles/bootstrap4.css +1 -1
  22. package/styles/bootstrap5-dark.css +2 -1
  23. package/styles/bootstrap5.css +2 -1
  24. package/styles/fabric-dark.css +1 -1
  25. package/styles/fabric.css +1 -1
  26. package/styles/gantt/_layout.scss +1 -1
  27. package/styles/gantt/bootstrap-dark.css +1 -1
  28. package/styles/gantt/bootstrap.css +1 -1
  29. package/styles/gantt/bootstrap4.css +1 -1
  30. package/styles/gantt/bootstrap5-dark.css +2 -1
  31. package/styles/gantt/bootstrap5.css +2 -1
  32. package/styles/gantt/fabric-dark.css +1 -1
  33. package/styles/gantt/fabric.css +1 -1
  34. package/styles/gantt/highcontrast-light.css +1 -1
  35. package/styles/gantt/highcontrast.css +1 -1
  36. package/styles/gantt/material-dark.css +1 -1
  37. package/styles/gantt/material.css +1 -1
  38. package/styles/gantt/tailwind-dark.css +1 -1
  39. package/styles/gantt/tailwind.css +1 -1
  40. package/styles/highcontrast-light.css +1 -1
  41. package/styles/highcontrast.css +1 -1
  42. package/styles/material-dark.css +1 -1
  43. package/styles/material.css +1 -1
  44. package/styles/tailwind-dark.css +1 -1
  45. package/styles/tailwind.css +1 -1
@@ -6090,6 +6090,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
6090
6090
  parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
6091
6091
  scheduleDateCollection.push(new Date(startDate.toString()));
6092
6092
  increment = this.getIncrement(startDate, count, mode);
6093
+ if (this.parent.isInDst(startDate)) {
6094
+ increment = increment + (1000 * 60 * 60);
6095
+ }
6093
6096
  newTime = startDate.getTime() + increment;
6094
6097
  startDate.setTime(newTime);
6095
6098
  if (startDate >= endDate) {
@@ -6153,11 +6156,19 @@ var Timeline = /** @__PURE__ @class */ (function () {
6153
6156
  dayIntervel - 1 : dayIntervel : dayIntervel;
6154
6157
  lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
6155
6158
  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
+ }
6156
6163
  break;
6157
6164
  }
6158
6165
  case 'Day':
6159
6166
  lastDay.setHours(24, 0, 0, 0);
6160
6167
  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
+ }
6161
6172
  break;
6162
6173
  case 'Hour':
6163
6174
  lastDay.setMinutes(60);
@@ -6252,7 +6263,12 @@ var Timeline = /** @__PURE__ @class */ (function () {
6252
6263
  * @private
6253
6264
  */
6254
6265
  Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
6255
- var balanceDay = ((endDate.getTime() - scheduleWeeks.getTime()) / (1000 * 60 * 60 * 24));
6266
+ 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
+ var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
6256
6272
  return balanceDay * this.parent.perDayWidth;
6257
6273
  };
6258
6274
  /**
@@ -12437,6 +12453,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12437
12453
  Gantt.prototype.getModuleName = function () {
12438
12454
  return 'gantt';
12439
12455
  };
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
+ };
12440
12477
  /**
12441
12478
  * For internal use only - Initialize the event handler
12442
12479
  *
@@ -12686,6 +12723,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12686
12723
  Gantt.prototype.renderGantt = function (isChange) {
12687
12724
  // predecessor calculation
12688
12725
  if (this.predecessorModule && this.taskFields.dependency) {
12726
+ this.predecessorModule['parentIds'] = [];
12727
+ this.predecessorModule['parentRecord'] = [];
12689
12728
  this.predecessorModule.updatePredecessors();
12690
12729
  if (this.isInPredecessorValidation && this.enableValidation) {
12691
12730
  this.predecessorModule.updatedRecordsDateByPredecessor();
@@ -17600,36 +17639,15 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
17600
17639
  var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
17601
17640
  this.parent.timelineModule.bottomTier;
17602
17641
  if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
17603
- if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
17642
+ if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
17604
17643
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
17605
17644
  }
17606
- else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
17645
+ else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
17607
17646
  pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
17608
17647
  }
17609
17648
  }
17610
17649
  return pStartDate;
17611
17650
  };
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
17651
  /**
17634
17652
  * To set item position.
17635
17653
  *
@@ -18228,7 +18246,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18228
18246
  datetimepickeredit: DateTimePicker,
18229
18247
  maskededit: MaskedTextBox,
18230
18248
  numericedit: NumericTextBox,
18231
- stringedit: TextBox
18249
+ stringedit: TextBox,
18250
+ defaultedit: TextBox
18232
18251
  };
18233
18252
  this.processDialogFields();
18234
18253
  this.wireEvents();
@@ -18884,6 +18903,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18884
18903
  fieldsModel[column.field] = checkboxModel;
18885
18904
  break;
18886
18905
  }
18906
+ case 'defaultedit':
18887
18907
  case 'stringedit':
18888
18908
  {
18889
18909
  var textBox = common;
@@ -26844,7 +26864,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26844
26864
  };
26845
26865
  ContextMenu$$1.prototype.contextMenuOpen = function (args) {
26846
26866
  this.isOpen = true;
26847
- var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
26867
+ var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
26848
26868
  addClass([firstMenuItem], 'e-focused');
26849
26869
  };
26850
26870
  ContextMenu$$1.prototype.getMenuItems = function () {