@syncfusion/ej2-schedule 20.2.38 → 20.2.40

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.
@@ -5185,7 +5185,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
5185
5185
  if (timeZonePropChanged) {
5186
5186
  this_1.processTimezoneChange(event_1, oldTimezone);
5187
5187
  }
5188
- else if (!this_1.parent.isPrinting && !this_1.parent.uiStateValues.isResize) {
5188
+ else if (!this_1.parent.isPrinting && !this_1.parent.uiStateValues.isPreventTimezone) {
5189
5189
  event_1 = this_1.processTimezone(event_1);
5190
5190
  }
5191
5191
  for (var level = 0; level < resourceCollection.length; level++) {
@@ -13783,7 +13783,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13783
13783
  var resultData = extend([], args.result, null, true);
13784
13784
  _this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
13785
13785
  _this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
13786
- _this.parent.refreshEvents(false);
13786
+ _this.refreshProcessedData();
13787
13787
  if (_this.parent.dragAndDropModule && _this.parent.dragAndDropModule.actionObj.action === 'drag') {
13788
13788
  _this.parent.dragAndDropModule.navigationWrapper();
13789
13789
  }
@@ -13802,6 +13802,31 @@ var Crud = /** @__PURE__ @class */ (function () {
13802
13802
  }
13803
13803
  this.parent.trigger(actionFailure, { error: e }, function () { return _this.parent.hideSpinner(); });
13804
13804
  };
13805
+ Crud.prototype.refreshProcessedData = function () {
13806
+ if (this.parent.dragAndDropModule) {
13807
+ this.parent.dragAndDropModule.actionObj.action = '';
13808
+ removeClass([this.parent.element], 'e-event-action');
13809
+ }
13810
+ if (this.parent.activeViewOptions && this.parent.activeViewOptions.eventTemplate) {
13811
+ var templateNames = ['eventTemplate'];
13812
+ if (this.crudObj.isCrudAction &&
13813
+ ['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.parent.currentView) === -1) {
13814
+ templateNames = [];
13815
+ for (var i = 0, len = this.crudObj.sourceEvent.length; i < len; i++) {
13816
+ templateNames.push('eventTemplate_' + this.crudObj.sourceEvent[i].groupIndex);
13817
+ if (this.crudObj.targetEvent[i] && this.crudObj.sourceEvent[i].groupIndex !==
13818
+ this.crudObj.targetEvent[i].groupIndex) {
13819
+ templateNames.push('eventTemplate_' + this.crudObj.targetEvent[i].groupIndex);
13820
+ }
13821
+ }
13822
+ }
13823
+ this.parent.resetTemplates(templateNames);
13824
+ }
13825
+ var eventsData = this.parent.eventsData || [];
13826
+ var blockData = this.parent.blockData || [];
13827
+ var data = eventsData.concat(blockData);
13828
+ this.parent.notify(dataReady, { processedData: this.parent.eventBase ? this.parent.eventBase.processData(data) : [] });
13829
+ };
13805
13830
  Crud.prototype.refreshData = function (args) {
13806
13831
  var _this = this;
13807
13832
  var actionArgs = {
@@ -16519,7 +16544,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16519
16544
  if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
16520
16545
  this.uiStateValues = {
16521
16546
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
16522
- isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isResize: false
16547
+ isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
16523
16548
  };
16524
16549
  }
16525
16550
  this.activeCellsData = { startTime: this.getCurrentTime(), endTime: this.getCurrentTime(), isAllDay: false };
@@ -16981,11 +17006,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16981
17006
  }
16982
17007
  if (this.currentView === 'Month' || ((this.currentView !== 'Agenda' && this.currentView !== 'MonthAgenda')
16983
17008
  && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
16984
- this.uiStateValues.isResize = true;
16985
17009
  this.activeView.resetColWidth();
16986
17010
  this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
16987
17011
  this.refreshEvents(false);
16988
- this.uiStateValues.isResize = false;
16989
17012
  }
16990
17013
  else {
16991
17014
  this.notify(contentReady, {});
@@ -18057,25 +18080,15 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18057
18080
  this.crudModule.refreshDataManager();
18058
18081
  }
18059
18082
  else {
18060
- if (this.activeViewOptions && this.activeViewOptions.eventTemplate) {
18061
- var templateNames = ['eventTemplate'];
18062
- if (this.crudModule && this.crudModule.crudObj.isCrudAction &&
18063
- ['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.currentView) === -1) {
18064
- templateNames = [];
18065
- for (var i = 0, len = this.crudModule.crudObj.sourceEvent.length; i < len; i++) {
18066
- templateNames.push('eventTemplate_' + this.crudModule.crudObj.sourceEvent[i].groupIndex);
18067
- if (this.crudModule.crudObj.targetEvent[i] && this.crudModule.crudObj.sourceEvent[i].groupIndex !==
18068
- this.crudModule.crudObj.targetEvent[i].groupIndex) {
18069
- templateNames.push('eventTemplate_' + this.crudModule.crudObj.targetEvent[i].groupIndex);
18070
- }
18071
- }
18072
- }
18073
- this.resetTemplates(templateNames);
18083
+ if (this.uiStateValues) {
18084
+ this.uiStateValues.isPreventTimezone = true;
18085
+ }
18086
+ if (this.crudModule) {
18087
+ this.crudModule.refreshProcessedData();
18088
+ }
18089
+ if (this.uiStateValues) {
18090
+ this.uiStateValues.isPreventTimezone = false;
18074
18091
  }
18075
- var eventsData = this.eventsData || [];
18076
- var blockData = this.blockData || [];
18077
- var data = eventsData.concat(blockData);
18078
- this.notify(dataReady, { processedData: this.eventBase ? this.eventBase.processData(data) : [] });
18079
18092
  }
18080
18093
  };
18081
18094
  /**
@@ -26127,6 +26140,10 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
26127
26140
  this.parent = parent;
26128
26141
  }
26129
26142
  ICalendarExport.prototype.initializeCalendarExport = function (fileName, customData) {
26143
+ var icsString = this.getCalendarString(fileName, customData);
26144
+ this.download(icsString, fileName);
26145
+ };
26146
+ ICalendarExport.prototype.getCalendarString = function (fileName, customData) {
26130
26147
  var _this = this;
26131
26148
  var eventsData = (customData) ? customData :
26132
26149
  extend([], this.parent.eventsData, null, true);
@@ -26212,7 +26229,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
26212
26229
  'X-WR-TIMEZONE:' + timeZone
26213
26230
  ].join(SEPARATOR);
26214
26231
  var icsString = iCalendar + SEPARATOR + iCalendarEvents.join(SEPARATOR) + SEPARATOR + 'END:VCALENDAR';
26215
- this.download(icsString, fileName);
26232
+ return icsString;
26216
26233
  };
26217
26234
  ICalendarExport.prototype.customFieldFilter = function (eventObj, fields) {
26218
26235
  var defaultFields = Object.keys(fields).map(function (key) { return fields[key]; });