@syncfusion/ej2-schedule 20.2.38 → 20.2.45
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.
- package/CHANGELOG.md +16 -0
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +95 -35
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +95 -35
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/schedule/actions/crud.d.ts +1 -0
- package/src/schedule/actions/crud.js +27 -2
- package/src/schedule/base/interface.d.ts +1 -1
- package/src/schedule/base/schedule.js +9 -21
- package/src/schedule/event-renderer/event-base.js +1 -1
- package/src/schedule/exports/calendar-export.d.ts +1 -0
- package/src/schedule/exports/calendar-export.js +5 -1
- package/src/schedule/renderer/agenda.d.ts +1 -0
- package/src/schedule/renderer/agenda.js +14 -0
- package/src/schedule/renderer/timeline-view.js +14 -5
- package/src/schedule/renderer/timeline-year.js +18 -6
- package/src/schedule/renderer/year.d.ts +1 -0
- package/src/schedule/renderer/year.js +8 -0
|
@@ -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.
|
|
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.
|
|
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,
|
|
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.
|
|
18061
|
-
|
|
18062
|
-
|
|
18063
|
-
|
|
18064
|
-
|
|
18065
|
-
|
|
18066
|
-
|
|
18067
|
-
|
|
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
|
/**
|
|
@@ -24095,6 +24108,14 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24095
24108
|
EventHandler.add(element, 'scroll', this.onContentScroll, this);
|
|
24096
24109
|
}
|
|
24097
24110
|
};
|
|
24111
|
+
Year.prototype.scrollToDate = function (scrollDate) {
|
|
24112
|
+
var date = +new Date(resetTime(scrollDate));
|
|
24113
|
+
var element = this.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')[data-date="' + date + '"]');
|
|
24114
|
+
if (element) {
|
|
24115
|
+
element = closest(element, '.e-month-calendar');
|
|
24116
|
+
this.getContentAreaElement().scrollTop = element.offsetTop;
|
|
24117
|
+
}
|
|
24118
|
+
};
|
|
24098
24119
|
Year.prototype.destroy = function () {
|
|
24099
24120
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24100
24121
|
return;
|
|
@@ -24929,6 +24950,20 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
24929
24950
|
contentArea.style.height = formatUnit(this.parent.element.offsetHeight - headerHeight);
|
|
24930
24951
|
}
|
|
24931
24952
|
};
|
|
24953
|
+
Agenda.prototype.scrollToDate = function (scrollDate) {
|
|
24954
|
+
var date = new Date(+resetTime(scrollDate));
|
|
24955
|
+
if (this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
24956
|
+
if (!this.parent.hideEmptyAgendaDays || this.parent.getEvents(date, addDays(date, 1), true).length > 0) {
|
|
24957
|
+
this.parent.changeDate(date);
|
|
24958
|
+
}
|
|
24959
|
+
}
|
|
24960
|
+
else {
|
|
24961
|
+
var dateElement = this.element.querySelector('.' + AGENDA_CELLS_CLASS + '[data-date="' + date.getTime() + '"]');
|
|
24962
|
+
if (dateElement) {
|
|
24963
|
+
this.getContentAreaElement().scrollTop = dateElement.offsetTop;
|
|
24964
|
+
}
|
|
24965
|
+
}
|
|
24966
|
+
};
|
|
24932
24967
|
Agenda.prototype.destroy = function () {
|
|
24933
24968
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24934
24969
|
return;
|
|
@@ -25290,9 +25325,12 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25290
25325
|
if (scrollDate) {
|
|
25291
25326
|
index = this.parent.getIndexOfDate(this.renderDates, resetTime(scrollDate));
|
|
25292
25327
|
if (index >= 0) {
|
|
25293
|
-
|
|
25294
|
-
if (
|
|
25295
|
-
|
|
25328
|
+
date = scrollDate;
|
|
25329
|
+
if (!isNullOrUndefined(hour)) {
|
|
25330
|
+
var timeString = hour.split(':');
|
|
25331
|
+
if (timeString.length === 2) {
|
|
25332
|
+
date = new Date(scrollDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0));
|
|
25333
|
+
}
|
|
25296
25334
|
}
|
|
25297
25335
|
}
|
|
25298
25336
|
}
|
|
@@ -25300,8 +25338,14 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25300
25338
|
if (isNullOrUndefined(date)) {
|
|
25301
25339
|
return;
|
|
25302
25340
|
}
|
|
25303
|
-
var scrollLeft
|
|
25304
|
-
|
|
25341
|
+
var scrollLeft;
|
|
25342
|
+
if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
|
|
25343
|
+
scrollLeft = index * this.getWorkCellWidth();
|
|
25344
|
+
}
|
|
25345
|
+
else {
|
|
25346
|
+
scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
|
|
25347
|
+
this.getLeftFromDateTime([index], date);
|
|
25348
|
+
}
|
|
25305
25349
|
this.getScrollableElement().scrollLeft = !this.parent.enableRtl ? scrollLeft : -scrollLeft;
|
|
25306
25350
|
};
|
|
25307
25351
|
TimelineViews.prototype.generateColumnLevels = function () {
|
|
@@ -26098,13 +26142,25 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26098
26142
|
append(cellTemplate, td);
|
|
26099
26143
|
};
|
|
26100
26144
|
TimelineYear.prototype.scrollToDate = function (scrollDate) {
|
|
26101
|
-
|
|
26102
|
-
|
|
26103
|
-
|
|
26104
|
-
|
|
26105
|
-
|
|
26106
|
-
|
|
26145
|
+
var date;
|
|
26146
|
+
if (this.parent.activeViewOptions.group.resources !== null && this.parent.activeViewOptions.group.resources.length > 0 &&
|
|
26147
|
+
!this.parent.uiStateValues.isGroupAdaptive) {
|
|
26148
|
+
date = +new Date(resetTime(firstDateOfMonth(scrollDate)));
|
|
26149
|
+
}
|
|
26150
|
+
else {
|
|
26151
|
+
date = +new Date(resetTime(scrollDate));
|
|
26152
|
+
}
|
|
26153
|
+
var element = this.element.querySelector('[data-date="' + date + '"]');
|
|
26154
|
+
if (element) {
|
|
26155
|
+
var wrap = this.getScrollableElement();
|
|
26156
|
+
if (this.parent.enableRtl) {
|
|
26157
|
+
var conTable = this.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
26158
|
+
wrap.scrollLeft = -(conTable.offsetWidth - element.offsetLeft - element.offsetWidth);
|
|
26107
26159
|
}
|
|
26160
|
+
else {
|
|
26161
|
+
wrap.scrollLeft = element.offsetLeft;
|
|
26162
|
+
}
|
|
26163
|
+
wrap.scrollTop = element.offsetTop;
|
|
26108
26164
|
}
|
|
26109
26165
|
};
|
|
26110
26166
|
TimelineYear.prototype.getScrollableElement = function () {
|
|
@@ -26127,6 +26183,10 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26127
26183
|
this.parent = parent;
|
|
26128
26184
|
}
|
|
26129
26185
|
ICalendarExport.prototype.initializeCalendarExport = function (fileName, customData) {
|
|
26186
|
+
var icsString = this.getCalendarString(fileName, customData);
|
|
26187
|
+
this.download(icsString, fileName);
|
|
26188
|
+
};
|
|
26189
|
+
ICalendarExport.prototype.getCalendarString = function (fileName, customData) {
|
|
26130
26190
|
var _this = this;
|
|
26131
26191
|
var eventsData = (customData) ? customData :
|
|
26132
26192
|
extend([], this.parent.eventsData, null, true);
|
|
@@ -26212,7 +26272,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26212
26272
|
'X-WR-TIMEZONE:' + timeZone
|
|
26213
26273
|
].join(SEPARATOR);
|
|
26214
26274
|
var icsString = iCalendar + SEPARATOR + iCalendarEvents.join(SEPARATOR) + SEPARATOR + 'END:VCALENDAR';
|
|
26215
|
-
|
|
26275
|
+
return icsString;
|
|
26216
26276
|
};
|
|
26217
26277
|
ICalendarExport.prototype.customFieldFilter = function (eventObj, fields) {
|
|
26218
26278
|
var defaultFields = Object.keys(fields).map(function (key) { return fields[key]; });
|