@syncfusion/ej2-gantt 23.1.38 → 23.1.41

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.
@@ -13587,7 +13587,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13587
13587
  '.e-gantt-parent-taskbar, .e-gantt-milestone, .e-gantt-unscheduled-taskbar' +
13588
13588
  '.e-event-markers, .e-baseline-bar, .e-event-markers,' +
13589
13589
  '.e-connector-line-container, .e-indicator-span, .e-notes-info, .e-gantt-manualparent-milestone,' +
13590
- '.e-taskbar-left-resizer, .e-taskbar-right-resizer, .e-baseline-gantt-milestone, .e-gantt-manualparenttaskbar';
13590
+ '.e-taskbar-left-resizer, .e-taskbar-right-resizer, .e-baseline-gantt-milestone-container, .e-gantt-manualparenttaskbar';
13591
13591
  this.toolTipObj.position = 'BottomCenter';
13592
13592
  this.toolTipObj.openDelay = 700;
13593
13593
  this.toolTipObj.enableRtl = this.parent.enableRtl;
@@ -13655,7 +13655,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13655
13655
  parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args) : "";
13656
13656
  }
13657
13657
  else if (args.target.classList.contains('e-baseline-bar') ||
13658
- args.target.classList.contains('e-baseline-gantt-milestone')) {
13658
+ args.target.classList.contains('e-baseline-gantt-milestone-container')) {
13659
13659
  var baseLineTemplateNode = void 0;
13660
13660
  if ((parent.tooltipSettings.baseline)) {
13661
13661
  baseLineTemplateNode = parent.tooltipModule.templateCompiler(parent.tooltipSettings.baseline, parent, data, 'TooltipBaselineTemplate');
@@ -13826,7 +13826,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13826
13826
  case 'milestone':
13827
13827
  {
13828
13828
  var milestoneStartDate = void 0;
13829
- if (args.target.className.includes('e-baseline-gantt-milestone') && !isNullOrUndefined(data.baselineStartDate)) {
13829
+ if (args.target.className.includes('e-baseline-gantt-milestone-container') && !isNullOrUndefined(data.baselineStartDate)) {
13830
13830
  milestoneStartDate = data.baselineStartDate;
13831
13831
  }
13832
13832
  else if (!isNullOrUndefined(data.startDate)) {
@@ -22417,7 +22417,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22417
22417
  else {
22418
22418
  if (value === "") {
22419
22419
  this.parent.setRecordValue('duration', null, ganttProp, true);
22420
- if (ganttProp.endDate) {
22420
+ if (ganttProp.endDate && ganttProp.startDate) {
22421
22421
  this.parent.setRecordValue('endDate', null, ganttProp, true);
22422
22422
  }
22423
22423
  }
@@ -25237,6 +25237,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25237
25237
  if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
25238
25238
  ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
25239
25239
  }
25240
+ if ((ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate &&
25241
+ (ganttData.ganttProperties.baselineStartDate.getTime() > ganttData.ganttProperties.baselineEndDate.getTime())) ||
25242
+ ((!isNullOrUndefined(ganttData.ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttData.ganttProperties.startDate) && (ganttData.ganttProperties.baselineStartDate.getTime() === ganttData.ganttProperties.startDate.getTime()))
25243
+ && (!isNullOrUndefined(ganttData.ganttProperties.baselineEndDate) && !isNullOrUndefined(ganttData.ganttProperties.endDate) && (ganttData.ganttProperties.baselineEndDate.toLocaleDateString() === ganttData.ganttProperties.endDate.toLocaleDateString())) &&
25244
+ ganttData.ganttProperties.isMilestone)) {
25245
+ ganttData.ganttProperties.baselineEndDate = ganttData.ganttProperties.baselineStartDate;
25246
+ }
25240
25247
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
25241
25248
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
25242
25249
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -27738,8 +27745,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
27738
27745
  /* tslint:disable-next-line */
27739
27746
  var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
27740
27747
  var adaptor = data_2.adaptor;
27741
- var moduleName = adaptor.getModuleName();
27742
- if (!(moduleName == "WebApiAdaptor" || moduleName == "ODataAdaptor" || moduleName == "ODataV4Adaptor") || data_2.dataSource.batchUrl) {
27748
+ if (!(adaptor instanceof WebApiAdaptor || adaptor instanceof ODataAdaptor || adaptor instanceof ODataV4Adaptor) || data_2.dataSource.batchUrl) {
27743
27749
  /* tslint:disable-next-line */
27744
27750
  var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
27745
27751
  crud.then(function (e) {
@@ -31325,8 +31331,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31325
31331
  if (record.ganttProperties.progress < 100) {
31326
31332
  record.isCritical = true;
31327
31333
  record.ganttProperties.isCritical = true;
31328
- if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
31329
- criticalPathIds.push(parseInt(record.ganttProperties.taskId));
31334
+ if (criticalPathIds.indexOf(record.ganttProperties.taskId) == -1) {
31335
+ criticalPathIds.push(record.ganttProperties.taskId);
31330
31336
  }
31331
31337
  }
31332
31338
  }
@@ -31348,9 +31354,11 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31348
31354
  fromRecord.slack = record.slack;
31349
31355
  fromRecord.isCritical = record.ganttProperties.isCritical;
31350
31356
  fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
31351
- if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31357
+ if (criticalPathIds.indexOf(fromRecord.ganttProperties.taskId) === -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31352
31358
  this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
31353
- criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
31359
+ if (this.criticalTasks.indexOf(fromRecord) === -1) {
31360
+ this.criticalTasks.push(fromRecord);
31361
+ }
31354
31362
  }
31355
31363
  if (fromRecord.ganttProperties.predecessorsName) {
31356
31364
  this.updateCriticalTasks(fromRecord, criticalPathIds);
@@ -31435,7 +31443,9 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31435
31443
  if (flatRecords[index].ganttProperties.progress < 100) {
31436
31444
  flatRecords[index].isCritical = true;
31437
31445
  flatRecords[index].ganttProperties.isCritical = true;
31438
- this.criticalTasks.push(flatRecords[index]);
31446
+ if (this.criticalTasks.indexOf(flatRecords[index]) == -1) {
31447
+ this.criticalTasks.push(flatRecords[index]);
31448
+ }
31439
31449
  if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
31440
31450
  criticalPathIds.push(collection[x]['taskid']);
31441
31451
  }