@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.38
3
+ * version : 20.2.40
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@20.2.36",
3
+ "_id": "@syncfusion/ej2-schedule@20.2.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-LvbKoK7n6mykYe9JbXXXshmU2sZVFJ0OJA22Ng55q2fBao9kgZt+AmwYZk9ffzyFZbzAYgIPKSiNrRF9+Ps3PA==",
5
+ "_integrity": "sha512-s+5eDIEW2jFb3ZdLOeIVeir04qKIG0GGm+FlC/TwA8n04MQIdr938y9+Zmd+EF2Mf4CFSPeDhFBiKTLYbrD6jA==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-schedule",
24
24
  "/@syncfusion/ej2-vue-schedule"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.2.36.tgz",
27
- "_shasum": "9714b4fa139a8afc99b3875e52350e177510889d",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.2.38.tgz",
27
+ "_shasum": "653052b4e14e1bbbc8b0efb5c9fe8894a334421e",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.2.38",
38
+ "@syncfusion/ej2-base": "~20.2.39",
39
39
  "@syncfusion/ej2-buttons": "~20.2.38",
40
- "@syncfusion/ej2-calendars": "~20.2.38",
40
+ "@syncfusion/ej2-calendars": "~20.2.40",
41
41
  "@syncfusion/ej2-data": "~20.2.38",
42
- "@syncfusion/ej2-dropdowns": "~20.2.38",
43
- "@syncfusion/ej2-excel-export": "~20.2.38",
42
+ "@syncfusion/ej2-dropdowns": "~20.2.40",
43
+ "@syncfusion/ej2-excel-export": "~20.2.39",
44
44
  "@syncfusion/ej2-inputs": "~20.2.38",
45
- "@syncfusion/ej2-lists": "~20.2.38",
46
- "@syncfusion/ej2-navigations": "~20.2.38",
47
- "@syncfusion/ej2-popups": "~20.2.38"
45
+ "@syncfusion/ej2-lists": "~20.2.39",
46
+ "@syncfusion/ej2-navigations": "~20.2.39",
47
+ "@syncfusion/ej2-popups": "~20.2.40"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "20.2.38",
84
+ "version": "20.2.40",
85
85
  "sideEffects": false
86
86
  }
@@ -13,6 +13,7 @@ export declare class Crud {
13
13
  refreshDataManager(): void;
14
14
  private dataManagerSuccess;
15
15
  dataManagerFailure(e: ReturnType): void;
16
+ refreshProcessedData(): void;
16
17
  private refreshData;
17
18
  addEvent(eventData: Record<string, any> | Record<string, any>[]): void;
18
19
  saveEvent(eventData: Record<string, any> | Record<string, any>[], action: CurrentAction): void;
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  /* eslint-disable max-len */
3
- import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';
3
+ import { isNullOrUndefined, extend, removeClass } from '@syncfusion/ej2-base';
4
4
  import { getRecurrenceStringFromDate, generate } from '../../recurrence-editor/date-generator';
5
5
  import * as events from '../base/constant';
6
6
  import * as util from '../base/util';
@@ -43,7 +43,7 @@ var Crud = /** @class */ (function () {
43
43
  var resultData = extend([], args.result, null, true);
44
44
  _this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
45
45
  _this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
46
- _this.parent.refreshEvents(false);
46
+ _this.refreshProcessedData();
47
47
  if (_this.parent.dragAndDropModule && _this.parent.dragAndDropModule.actionObj.action === 'drag') {
48
48
  _this.parent.dragAndDropModule.navigationWrapper();
49
49
  }
@@ -62,6 +62,31 @@ var Crud = /** @class */ (function () {
62
62
  }
63
63
  this.parent.trigger(events.actionFailure, { error: e }, function () { return _this.parent.hideSpinner(); });
64
64
  };
65
+ Crud.prototype.refreshProcessedData = function () {
66
+ if (this.parent.dragAndDropModule) {
67
+ this.parent.dragAndDropModule.actionObj.action = '';
68
+ removeClass([this.parent.element], 'e-event-action');
69
+ }
70
+ if (this.parent.activeViewOptions && this.parent.activeViewOptions.eventTemplate) {
71
+ var templateNames = ['eventTemplate'];
72
+ if (this.crudObj.isCrudAction &&
73
+ ['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.parent.currentView) === -1) {
74
+ templateNames = [];
75
+ for (var i = 0, len = this.crudObj.sourceEvent.length; i < len; i++) {
76
+ templateNames.push('eventTemplate_' + this.crudObj.sourceEvent[i].groupIndex);
77
+ if (this.crudObj.targetEvent[i] && this.crudObj.sourceEvent[i].groupIndex !==
78
+ this.crudObj.targetEvent[i].groupIndex) {
79
+ templateNames.push('eventTemplate_' + this.crudObj.targetEvent[i].groupIndex);
80
+ }
81
+ }
82
+ }
83
+ this.parent.resetTemplates(templateNames);
84
+ }
85
+ var eventsData = this.parent.eventsData || [];
86
+ var blockData = this.parent.blockData || [];
87
+ var data = eventsData.concat(blockData);
88
+ this.parent.notify(events.dataReady, { processedData: this.parent.eventBase ? this.parent.eventBase.processData(data) : [] });
89
+ };
65
90
  Crud.prototype.refreshData = function (args) {
66
91
  var _this = this;
67
92
  var actionArgs = {
@@ -492,7 +492,7 @@ export interface UIStateArgs {
492
492
  action?: boolean;
493
493
  isBlock?: boolean;
494
494
  isCustomMonth?: boolean;
495
- isResize?: boolean;
495
+ isPreventTimezone?: boolean;
496
496
  }
497
497
  /**
498
498
  * @private
@@ -657,7 +657,7 @@ var Schedule = /** @class */ (function (_super) {
657
657
  if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
658
658
  this.uiStateValues = {
659
659
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
660
- isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isResize: false
660
+ isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
661
661
  };
662
662
  }
663
663
  this.activeCellsData = { startTime: this.getCurrentTime(), endTime: this.getCurrentTime(), isAllDay: false };
@@ -1119,11 +1119,9 @@ var Schedule = /** @class */ (function (_super) {
1119
1119
  }
1120
1120
  if (this.currentView === 'Month' || ((this.currentView !== 'Agenda' && this.currentView !== 'MonthAgenda')
1121
1121
  && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
1122
- this.uiStateValues.isResize = true;
1123
1122
  this.activeView.resetColWidth();
1124
1123
  this.notify(events.scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
1125
1124
  this.refreshEvents(false);
1126
- this.uiStateValues.isResize = false;
1127
1125
  }
1128
1126
  else {
1129
1127
  this.notify(events.contentReady, {});
@@ -2195,25 +2193,15 @@ var Schedule = /** @class */ (function (_super) {
2195
2193
  this.crudModule.refreshDataManager();
2196
2194
  }
2197
2195
  else {
2198
- if (this.activeViewOptions && this.activeViewOptions.eventTemplate) {
2199
- var templateNames = ['eventTemplate'];
2200
- if (this.crudModule && this.crudModule.crudObj.isCrudAction &&
2201
- ['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.currentView) === -1) {
2202
- templateNames = [];
2203
- for (var i = 0, len = this.crudModule.crudObj.sourceEvent.length; i < len; i++) {
2204
- templateNames.push('eventTemplate_' + this.crudModule.crudObj.sourceEvent[i].groupIndex);
2205
- if (this.crudModule.crudObj.targetEvent[i] && this.crudModule.crudObj.sourceEvent[i].groupIndex !==
2206
- this.crudModule.crudObj.targetEvent[i].groupIndex) {
2207
- templateNames.push('eventTemplate_' + this.crudModule.crudObj.targetEvent[i].groupIndex);
2208
- }
2209
- }
2210
- }
2211
- this.resetTemplates(templateNames);
2196
+ if (this.uiStateValues) {
2197
+ this.uiStateValues.isPreventTimezone = true;
2198
+ }
2199
+ if (this.crudModule) {
2200
+ this.crudModule.refreshProcessedData();
2201
+ }
2202
+ if (this.uiStateValues) {
2203
+ this.uiStateValues.isPreventTimezone = false;
2212
2204
  }
2213
- var eventsData = this.eventsData || [];
2214
- var blockData = this.blockData || [];
2215
- var data = eventsData.concat(blockData);
2216
- this.notify(events.dataReady, { processedData: this.eventBase ? this.eventBase.processData(data) : [] });
2217
2205
  }
2218
2206
  };
2219
2207
  /**
@@ -41,7 +41,7 @@ var EventBase = /** @class */ (function () {
41
41
  if (timeZonePropChanged) {
42
42
  this_1.processTimezoneChange(event_1, oldTimezone);
43
43
  }
44
- else if (!this_1.parent.isPrinting && !this_1.parent.uiStateValues.isResize) {
44
+ else if (!this_1.parent.isPrinting && !this_1.parent.uiStateValues.isPreventTimezone) {
45
45
  event_1 = this_1.processTimezone(event_1);
46
46
  }
47
47
  for (var level = 0; level < resourceCollection.length; level++) {
@@ -6,6 +6,7 @@ export declare class ICalendarExport {
6
6
  private parent;
7
7
  constructor(parent: Schedule);
8
8
  initializeCalendarExport(fileName: string, customData: Record<string, any>[]): void;
9
+ getCalendarString(fileName?: string, customData?: Record<string, any>[]): string;
9
10
  private customFieldFilter;
10
11
  private convertDateToString;
11
12
  private download;
@@ -9,6 +9,10 @@ var ICalendarExport = /** @class */ (function () {
9
9
  this.parent = parent;
10
10
  }
11
11
  ICalendarExport.prototype.initializeCalendarExport = function (fileName, customData) {
12
+ var icsString = this.getCalendarString(fileName, customData);
13
+ this.download(icsString, fileName);
14
+ };
15
+ ICalendarExport.prototype.getCalendarString = function (fileName, customData) {
12
16
  var _this = this;
13
17
  var eventsData = (customData) ? customData :
14
18
  extend([], this.parent.eventsData, null, true);
@@ -94,7 +98,7 @@ var ICalendarExport = /** @class */ (function () {
94
98
  'X-WR-TIMEZONE:' + timeZone
95
99
  ].join(SEPARATOR);
96
100
  var icsString = iCalendar + SEPARATOR + iCalendarEvents.join(SEPARATOR) + SEPARATOR + 'END:VCALENDAR';
97
- this.download(icsString, fileName);
101
+ return icsString;
98
102
  };
99
103
  ICalendarExport.prototype.customFieldFilter = function (eventObj, fields) {
100
104
  var defaultFields = Object.keys(fields).map(function (key) { return fields[key]; });