@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
@@ -6024,6 +6024,9 @@ class Timeline {
6024
6024
  parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
6025
6025
  scheduleDateCollection.push(new Date(startDate.toString()));
6026
6026
  increment = this.getIncrement(startDate, count, mode);
6027
+ if (this.parent.isInDst(startDate)) {
6028
+ increment = increment + (1000 * 60 * 60);
6029
+ }
6027
6030
  newTime = startDate.getTime() + increment;
6028
6031
  startDate.setTime(newTime);
6029
6032
  if (startDate >= endDate) {
@@ -6087,11 +6090,19 @@ class Timeline {
6087
6090
  dayIntervel - 1 : dayIntervel : dayIntervel;
6088
6091
  lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
6089
6092
  increment = lastDay.getTime() - firstDay.getTime();
6093
+ if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
6094
+ (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
6095
+ increment = increment - (1000 * 60 * 60);
6096
+ }
6090
6097
  break;
6091
6098
  }
6092
6099
  case 'Day':
6093
6100
  lastDay.setHours(24, 0, 0, 0);
6094
6101
  increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
6102
+ if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
6103
+ (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
6104
+ increment -= (1000 * 60 * 60);
6105
+ }
6095
6106
  break;
6096
6107
  case 'Hour':
6097
6108
  lastDay.setMinutes(60);
@@ -6186,7 +6197,12 @@ class Timeline {
6186
6197
  * @private
6187
6198
  */
6188
6199
  calculateWidthBetweenTwoDate(mode, scheduleWeeks, endDate) {
6189
- const balanceDay = ((endDate.getTime() - scheduleWeeks.getTime()) / (1000 * 60 * 60 * 24));
6200
+ let timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
6201
+ if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
6202
+ (!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
6203
+ timeDifference = timeDifference - (1000 * 60 * 60);
6204
+ }
6205
+ const balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
6190
6206
  return balanceDay * this.parent.perDayWidth;
6191
6207
  }
6192
6208
  /**
@@ -12023,6 +12039,27 @@ let Gantt = class Gantt extends Component {
12023
12039
  getModuleName() {
12024
12040
  return 'gantt';
12025
12041
  }
12042
+ /**
12043
+ * To get timezone offset.
12044
+ *
12045
+ * @returns {number} .
12046
+ * @private
12047
+ */
12048
+ getDefaultTZOffset() {
12049
+ const janMonth = new Date(new Date().getFullYear(), 0, 1);
12050
+ const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
12051
+ return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
12052
+ }
12053
+ /**
12054
+ * To check whether the date is in DST.
12055
+ *
12056
+ * @param {Date} date .
12057
+ * @returns {boolean} .
12058
+ * @private
12059
+ */
12060
+ isInDst(date) {
12061
+ return date.getTimezoneOffset() < this.getDefaultTZOffset();
12062
+ }
12026
12063
  /**
12027
12064
  * For internal use only - Initialize the event handler
12028
12065
  *
@@ -12272,6 +12309,8 @@ let Gantt = class Gantt extends Component {
12272
12309
  renderGantt(isChange) {
12273
12310
  // predecessor calculation
12274
12311
  if (this.predecessorModule && this.taskFields.dependency) {
12312
+ this.predecessorModule['parentIds'] = [];
12313
+ this.predecessorModule['parentRecord'] = [];
12275
12314
  this.predecessorModule.updatePredecessors();
12276
12315
  if (this.isInPredecessorValidation && this.enableValidation) {
12277
12316
  this.predecessorModule.updatedRecordsDateByPredecessor();
@@ -17146,36 +17185,15 @@ class TaskbarEdit extends DateProcessor {
17146
17185
  const tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
17147
17186
  this.parent.timelineModule.bottomTier;
17148
17187
  if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
17149
- if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
17188
+ if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
17150
17189
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
17151
17190
  }
17152
- else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
17191
+ else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
17153
17192
  pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
17154
17193
  }
17155
17194
  }
17156
17195
  return pStartDate;
17157
17196
  }
17158
- /**
17159
- * To get timezone offset.
17160
- *
17161
- * @returns {number} .
17162
- * @private
17163
- */
17164
- getDefaultTZOffset() {
17165
- const janMonth = new Date(new Date().getFullYear(), 0, 1);
17166
- const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
17167
- return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
17168
- }
17169
- /**
17170
- * To check whether the date is in DST.
17171
- *
17172
- * @param {Date} date .
17173
- * @returns {boolean} .
17174
- * @private
17175
- */
17176
- isInDst(date) {
17177
- return date.getTimezoneOffset() < this.getDefaultTZOffset();
17178
- }
17179
17197
  /**
17180
17198
  * To set item position.
17181
17199
  *
@@ -17773,7 +17791,8 @@ class DialogEdit {
17773
17791
  datetimepickeredit: DateTimePicker,
17774
17792
  maskededit: MaskedTextBox,
17775
17793
  numericedit: NumericTextBox,
17776
- stringedit: TextBox
17794
+ stringedit: TextBox,
17795
+ defaultedit: TextBox
17777
17796
  };
17778
17797
  this.processDialogFields();
17779
17798
  this.wireEvents();
@@ -18425,6 +18444,7 @@ class DialogEdit {
18425
18444
  fieldsModel[column.field] = checkboxModel;
18426
18445
  break;
18427
18446
  }
18447
+ case 'defaultedit':
18428
18448
  case 'stringedit':
18429
18449
  {
18430
18450
  const textBox = common;
@@ -26305,7 +26325,7 @@ class ContextMenu$2 {
26305
26325
  }
26306
26326
  contextMenuOpen(args) {
26307
26327
  this.isOpen = true;
26308
- const firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
26328
+ const firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
26309
26329
  addClass([firstMenuItem], 'e-focused');
26310
26330
  }
26311
26331
  getMenuItems() {