@syncfusion/ej2-schedule 20.3.47 → 20.3.50

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.
@@ -15540,7 +15540,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
15540
15540
  child: 'resourceChild'
15541
15541
  },
15542
15542
  nodeTemplate: this.parent.resourceHeaderTemplate,
15543
- nodeClicked: this.resourceClick.bind(this)
15543
+ nodeClicked: this.resourceClick.bind(this),
15544
+ created: this.resourceTreeCreated.bind(this)
15544
15545
  });
15545
15546
  this.treeViewObj.appendTo(resourceTree);
15546
15547
  this.treeViewObj.expandAll();
@@ -15557,6 +15558,12 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
15557
15558
  });
15558
15559
  this.parent.on(documentClick, this.documentClick, this);
15559
15560
  };
15561
+ ResourceBase.prototype.resourceTreeCreated = function () {
15562
+ if (this.parent.portals) {
15563
+ this.parent.portals = this.parent.portals.concat(this.treeViewObj.portals);
15564
+ this.parent.renderTemplates();
15565
+ }
15566
+ };
15560
15567
  ResourceBase.prototype.generateTreeData = function (isTimeLine) {
15561
15568
  var _this = this;
15562
15569
  var treeCollection = [];
@@ -16199,6 +16206,10 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
16199
16206
  ResourceBase.prototype.destroy = function () {
16200
16207
  this.parent.off(documentClick, this.documentClick);
16201
16208
  if (this.treeViewObj) {
16209
+ if (this.treeViewObj.portals && this.treeViewObj.portals.length > 0) {
16210
+ var treeViewTemplates = this.treeViewObj.portals.map(function (x) { return x.propName; });
16211
+ this.parent.resetTemplates(treeViewTemplates);
16212
+ }
16202
16213
  this.treeViewObj.destroy();
16203
16214
  this.treeViewObj = null;
16204
16215
  }
@@ -21104,7 +21115,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
21104
21115
  var eventDuration = eventObj[this.parent.eventFields.endTime].getTime() -
21105
21116
  eventObj[this.parent.eventFields.startTime].getTime();
21106
21117
  var td = closest(e.target, 'td');
21107
- if (this.parent.currentView === 'TimelineYear' && !td.classList.contains('e-work-cells')) {
21118
+ if (this.parent.currentView === 'TimelineYear' && (!td.classList.contains(WORK_CELLS_CLASS) || td.classList.contains(OTHERMONTH_CLASS))) {
21108
21119
  return;
21109
21120
  }
21110
21121
  var dragStart$$1 = this.parent.getDateFromElement(td);
@@ -26834,6 +26845,7 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
26834
26845
  this.parent.addEvent(this.processOccurrence(app));
26835
26846
  };
26836
26847
  ICalendarImport.prototype.processOccurrence = function (app) {
26848
+ var _this = this;
26837
26849
  var appoint = [];
26838
26850
  var uId = 'UID';
26839
26851
  var fields = this.parent.eventFields;
@@ -26856,17 +26868,21 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
26856
26868
  // eslint-disable-next-line no-prototype-builtins
26857
26869
  if (data[i].hasOwnProperty(fields.recurrenceID)) {
26858
26870
  var exdate = data[i][fields.recurrenceID];
26871
+ data[i][fields.id] = _this.parent.eventBase.generateGuid();
26859
26872
  data[i][fields.recurrenceID] = id;
26860
26873
  data[i][fields.recurrenceException] = null;
26861
26874
  parentObj[fields.recurrenceException] = (isNullOrUndefined(parentObj[fields.recurrenceException])) ?
26862
26875
  exdate : parentObj[fields.recurrenceException] + ',' + exdate;
26876
+ delete data[i][uId];
26863
26877
  appoint.push(data[i]);
26864
26878
  }
26865
26879
  }
26880
+ delete parentObj[uId];
26866
26881
  appoint.push(parentObj);
26867
26882
  // eslint-disable-next-line no-prototype-builtins
26868
26883
  }
26869
26884
  else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
26885
+ delete eventObj[uId];
26870
26886
  appoint.push(eventObj);
26871
26887
  }
26872
26888
  }