@syncfusion/ej2-schedule 20.1.61 → 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.
- package/CHANGELOG.md +31 -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 +257 -84
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +261 -83
- 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/helpers/e2e/index.js +9 -7
- package/helpers/e2e/recurrence-editor.js +41 -25
- package/helpers/e2e/schedule.js +44 -28
- package/package.json +15 -15
- package/src/recurrence-editor/recurrence-editor.js +4 -1
- package/src/schedule/actions/crud.d.ts +1 -0
- package/src/schedule/actions/crud.js +36 -9
- package/src/schedule/base/interface.d.ts +7 -1
- package/src/schedule/base/schedule.d.ts +8 -0
- package/src/schedule/base/schedule.js +75 -21
- package/src/schedule/event-renderer/agenda-base.js +6 -6
- package/src/schedule/event-renderer/event-base.d.ts +2 -0
- package/src/schedule/event-renderer/event-base.js +21 -5
- package/src/schedule/event-renderer/month.js +2 -3
- package/src/schedule/event-renderer/vertical-view.js +3 -3
- package/src/schedule/event-renderer/year.js +2 -2
- package/src/schedule/exports/calendar-export.d.ts +1 -0
- package/src/schedule/exports/calendar-export.js +6 -2
- package/src/schedule/exports/calendar-import.js +32 -18
- package/src/schedule/exports/excel-export.js +8 -4
- package/src/schedule/popups/event-window.js +3 -1
- package/src/schedule/popups/quick-popups.js +3 -3
- package/src/schedule/renderer/agenda.js +2 -2
- package/src/schedule/renderer/timeline-month.d.ts +1 -0
- package/src/schedule/renderer/timeline-month.js +9 -0
- package/src/schedule/renderer/timeline-view.d.ts +1 -0
- package/src/schedule/renderer/timeline-view.js +14 -0
- package/src/schedule/renderer/timeline-year.js +3 -0
- package/src/schedule/renderer/vertical-view.d.ts +1 -0
- package/src/schedule/renderer/vertical-view.js +21 -4
- package/src/schedule/renderer/view-base.d.ts +1 -0
- package/src/schedule/renderer/view-base.js +11 -0
- package/src/schedule/renderer/year.js +2 -1
- package/styles/bootstrap-dark.css +5 -1
- package/styles/bootstrap.css +5 -1
- package/styles/bootstrap4.css +5 -1
- package/styles/bootstrap5-dark.css +5 -1
- package/styles/bootstrap5.css +5 -1
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/fluent-dark.css +20 -16
- package/styles/fluent.css +7 -3
- package/styles/highcontrast-light.css +5 -1
- package/styles/highcontrast.css +5 -1
- package/styles/material-dark.css +5 -1
- package/styles/material.css +5 -1
- package/styles/recurrence-editor/_fusionnew-definition.scss +15 -0
- package/styles/recurrence-editor/_material3-definition.scss +15 -0
- package/styles/schedule/_fluent-definition.scss +1 -1
- package/styles/schedule/_fusionnew-definition.scss +224 -0
- package/styles/schedule/_layout.scss +6 -1
- package/styles/schedule/_material3-definition.scss +224 -0
- package/styles/schedule/bootstrap-dark.css +5 -1
- package/styles/schedule/bootstrap.css +5 -1
- package/styles/schedule/bootstrap4.css +5 -1
- package/styles/schedule/bootstrap5-dark.css +5 -1
- package/styles/schedule/bootstrap5.css +5 -1
- package/styles/schedule/fabric-dark.css +5 -1
- package/styles/schedule/fabric.css +5 -1
- package/styles/schedule/fluent-dark.css +20 -16
- package/styles/schedule/fluent.css +7 -3
- package/styles/schedule/highcontrast-light.css +5 -1
- package/styles/schedule/highcontrast.css +5 -1
- package/styles/schedule/icons/_fusionnew.scss +232 -0
- package/styles/schedule/icons/_material3.scss +232 -0
- package/styles/schedule/material-dark.css +5 -1
- package/styles/schedule/material.css +5 -1
- package/styles/schedule/tailwind-dark.css +5 -1
- package/styles/schedule/tailwind.css +5 -1
- package/styles/tailwind-dark.css +5 -1
- package/styles/tailwind.css +5 -1
|
@@ -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++) {
|
|
@@ -5666,7 +5666,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5666
5666
|
var selectedAppointments = this.getSelectedAppointments();
|
|
5667
5667
|
for (var _i = 0, selectedAppointments_1 = selectedAppointments; _i < selectedAppointments_1.length; _i++) {
|
|
5668
5668
|
var appointment = selectedAppointments_1[_i];
|
|
5669
|
-
appointment.setAttribute('aria-
|
|
5669
|
+
appointment.setAttribute('aria-pressed', 'false');
|
|
5670
5670
|
}
|
|
5671
5671
|
removeClass(selectedAppointments, APPOINTMENT_BORDER);
|
|
5672
5672
|
if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
|
|
@@ -5676,7 +5676,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5676
5676
|
EventBase.prototype.addSelectedAppointments = function (cells) {
|
|
5677
5677
|
for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
|
|
5678
5678
|
var cell = cells_1[_i];
|
|
5679
|
-
cell.setAttribute('aria-
|
|
5679
|
+
cell.setAttribute('aria-pressed', 'true');
|
|
5680
5680
|
}
|
|
5681
5681
|
if (this.parent.currentView !== 'MonthAgenda') {
|
|
5682
5682
|
this.parent.removeSelectedClass();
|
|
@@ -6024,7 +6024,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6024
6024
|
var exception = event[this.parent.eventFields.recurrenceException];
|
|
6025
6025
|
var maxCount;
|
|
6026
6026
|
if (this.parent.currentView !== 'Agenda' && isMaxCount) {
|
|
6027
|
-
maxCount = getDateCount(
|
|
6027
|
+
maxCount = getDateCount(viewDate, this.parent.activeView.endDate()) + 1;
|
|
6028
6028
|
}
|
|
6029
6029
|
var newTimezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
6030
6030
|
var firstDay = this.parent.activeViewOptions.firstDayOfWeek;
|
|
@@ -6047,6 +6047,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6047
6047
|
for (var _i = 0, dates_1 = dates; _i < dates_1.length; _i++) {
|
|
6048
6048
|
var date = dates_1[_i];
|
|
6049
6049
|
var clonedObject = extend({}, event, null, true);
|
|
6050
|
+
date = this.getDSTAdjustedTime(date, clonedObject);
|
|
6050
6051
|
clonedObject[this.parent.eventFields.startTime] = new Date(date);
|
|
6051
6052
|
clonedObject[this.parent.eventFields.endTime] = new Date(new Date(date).setMilliseconds(duration));
|
|
6052
6053
|
clonedObject[this.parent.eventFields.recurrenceID] = clonedObject[this.parent.eventFields.id];
|
|
@@ -6057,6 +6058,21 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6057
6058
|
}
|
|
6058
6059
|
return occurrenceCollection;
|
|
6059
6060
|
};
|
|
6061
|
+
EventBase.prototype.getDSTAdjustedTime = function (date, event) {
|
|
6062
|
+
var occurDate = date;
|
|
6063
|
+
if (this.parent.timezone &&
|
|
6064
|
+
(event[this.parent.eventFields.startTimezone] || event[this.parent.eventFields.endTimezone])) {
|
|
6065
|
+
var eventOffset = this.getDSTDiff(event[this.parent.eventFields.startTime], new Date(date), event[this.parent.eventFields.startTimezone]);
|
|
6066
|
+
var schOffset = this.getDSTDiff(event[this.parent.eventFields.startTime], new Date(date), this.parent.timezone);
|
|
6067
|
+
occurDate = (new Date(date).getTime() - (eventOffset - schOffset) * 60000);
|
|
6068
|
+
}
|
|
6069
|
+
return occurDate;
|
|
6070
|
+
};
|
|
6071
|
+
EventBase.prototype.getDSTDiff = function (startDate, occurDate, timezone) {
|
|
6072
|
+
var startOffset = this.parent.tzModule.offset(new Date(startDate), timezone);
|
|
6073
|
+
var occurOffset = this.parent.tzModule.offset(new Date(occurDate), timezone);
|
|
6074
|
+
return startOffset - occurOffset;
|
|
6075
|
+
};
|
|
6060
6076
|
EventBase.prototype.getParentEvent = function (eventObj, isParent) {
|
|
6061
6077
|
if (isParent === void 0) { isParent = false; }
|
|
6062
6078
|
var parentEvent;
|
|
@@ -6223,7 +6239,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6223
6239
|
className: BLOCK_APPOINTMENT_CLASS,
|
|
6224
6240
|
attrs: {
|
|
6225
6241
|
'data-id': 'Appointment_' + record[this.parent.eventFields.id],
|
|
6226
|
-
'aria-
|
|
6242
|
+
'aria-disabled': 'true', 'aria-pressed': 'false'
|
|
6227
6243
|
}
|
|
6228
6244
|
});
|
|
6229
6245
|
var templateElement;
|
|
@@ -6679,8 +6695,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6679
6695
|
'data-guid': record.Guid,
|
|
6680
6696
|
'role': 'button',
|
|
6681
6697
|
'tabindex': '0',
|
|
6682
|
-
'aria-
|
|
6683
|
-
'aria-
|
|
6698
|
+
'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
|
|
6699
|
+
'aria-pressed': 'false',
|
|
6684
6700
|
'aria-grabbed': 'true',
|
|
6685
6701
|
'aria-label': this.parent.getAnnouncementString(record)
|
|
6686
6702
|
}
|
|
@@ -6775,7 +6791,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6775
6791
|
});
|
|
6776
6792
|
var moreIndicatorElement = createElement('div', {
|
|
6777
6793
|
className: MORE_INDICATOR_CLASS,
|
|
6778
|
-
attrs: { 'tabindex': '0', '
|
|
6794
|
+
attrs: { 'tabindex': '0', 'data-index': index.toString(), 'data-count': '1' },
|
|
6779
6795
|
innerHTML: '+1 ' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more'))
|
|
6780
6796
|
});
|
|
6781
6797
|
innerCountWrap.appendChild(moreIndicatorElement);
|
|
@@ -7610,7 +7626,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7610
7626
|
var attrs = {
|
|
7611
7627
|
'data-id': 'Appointment_' + record[this.fields.id],
|
|
7612
7628
|
'role': 'button', 'tabindex': '0',
|
|
7613
|
-
'aria-
|
|
7629
|
+
'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false', 'aria-grabbed': 'true',
|
|
7614
7630
|
'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
|
|
7615
7631
|
};
|
|
7616
7632
|
if (!isCloneElement) {
|
|
@@ -7905,8 +7921,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7905
7921
|
'tabindex': '0',
|
|
7906
7922
|
'data-count': count.toString(),
|
|
7907
7923
|
'data-start-date': startDate.getTime().toString(),
|
|
7908
|
-
'data-end-date': endDate.getTime().toString()
|
|
7909
|
-
'role': 'list'
|
|
7924
|
+
'data-end-date': endDate.getTime().toString()
|
|
7910
7925
|
}
|
|
7911
7926
|
});
|
|
7912
7927
|
return moreIndicatorElement;
|
|
@@ -9105,8 +9120,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9105
9120
|
attrs: {
|
|
9106
9121
|
'data-id': '' + eventData[fields.id],
|
|
9107
9122
|
'data-guid': eventData.Guid, 'role': 'button', 'tabindex': '0',
|
|
9108
|
-
'aria-
|
|
9109
|
-
'aria-
|
|
9123
|
+
'aria-disabled': this_1.parent.eventBase.getReadonlyAttribute(eventData),
|
|
9124
|
+
'aria-pressed': 'false', 'aria-grabbed': 'true', 'aria-label': this_1.parent.getAnnouncementString(eventData)
|
|
9110
9125
|
}
|
|
9111
9126
|
});
|
|
9112
9127
|
var templateElement = void 0;
|
|
@@ -9202,7 +9217,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9202
9217
|
this.quickPopupHide();
|
|
9203
9218
|
return;
|
|
9204
9219
|
}
|
|
9205
|
-
var targetEle = args.event.target;
|
|
9220
|
+
var targetEle = !isNullOrUndefined(args.event) ? args.event.target : args.element;
|
|
9206
9221
|
if (this.parent.isAdaptive) {
|
|
9207
9222
|
this.quickPopupHide();
|
|
9208
9223
|
var newEventClone = this.parent.element.querySelector('.' + NEW_EVENT_CLASS);
|
|
@@ -10623,7 +10638,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
10623
10638
|
value: VALUEFIELD
|
|
10624
10639
|
},
|
|
10625
10640
|
placeholder: this.localeObj.getConstant(REPEAT),
|
|
10626
|
-
htmlAttributes: { 'title': this.localeObj.getConstant(REPEAT) },
|
|
10641
|
+
htmlAttributes: { 'title': this.localeObj.getConstant(REPEAT), role: 'option' },
|
|
10627
10642
|
change: function (args) {
|
|
10628
10643
|
self.setProperties({ selectedType: _this.frequencies.indexOf(args.value) }, false);
|
|
10629
10644
|
self.element.querySelector('.' + REPEATCONTENT).innerHTML =
|
|
@@ -10645,6 +10660,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
10645
10660
|
text: TEXTFIELD,
|
|
10646
10661
|
value: VALUEFIELD
|
|
10647
10662
|
},
|
|
10663
|
+
htmlAttributes: { role: 'option' },
|
|
10648
10664
|
change: function (args) {
|
|
10649
10665
|
self.freshOnEndForm();
|
|
10650
10666
|
self.updateEndOnForm(args.value);
|
|
@@ -10662,6 +10678,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
10662
10678
|
text: TEXTFIELD,
|
|
10663
10679
|
value: VALUEFIELD
|
|
10664
10680
|
},
|
|
10681
|
+
htmlAttributes: { role: 'option' },
|
|
10665
10682
|
index: 1,
|
|
10666
10683
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10667
10684
|
change: function (args) {
|
|
@@ -10681,6 +10698,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
10681
10698
|
text: TEXTFIELD,
|
|
10682
10699
|
value: VALUEFIELD
|
|
10683
10700
|
},
|
|
10701
|
+
htmlAttributes: { role: 'option' },
|
|
10684
10702
|
enableRtl: this.enableRtl,
|
|
10685
10703
|
index: 7,
|
|
10686
10704
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -11535,6 +11553,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11535
11553
|
EventWindow.prototype.setDialogContent = function () {
|
|
11536
11554
|
this.dialogObject.content = this.getEventWindowContent();
|
|
11537
11555
|
this.dialogObject.dataBind();
|
|
11556
|
+
this.applyFormValidation();
|
|
11538
11557
|
};
|
|
11539
11558
|
EventWindow.prototype.preventEventSave = function (e) {
|
|
11540
11559
|
if (this.parent && !this.parent.allowKeyboardInteraction && e.code === 'Enter') {
|
|
@@ -11796,6 +11815,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11796
11815
|
resourceData.colorField + '}"></div><div class="e-resource-text">${' + resourceData.textField + '}</div></div>';
|
|
11797
11816
|
if (resourceData.allowMultiple) {
|
|
11798
11817
|
var listObj = new MultiSelect({
|
|
11818
|
+
enableRtl: this.parent.enableRtl,
|
|
11799
11819
|
cssClass: this.parent.cssClass || '',
|
|
11800
11820
|
dataSource: resourceData.dataSource,
|
|
11801
11821
|
change: this.onMultiselectResourceChange.bind(this),
|
|
@@ -11854,7 +11874,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11854
11874
|
query = (e.text !== '') ? query.where('Text', 'contains', e.text, true) : query;
|
|
11855
11875
|
e.updateData(_this.parent.timezoneDataSource, query);
|
|
11856
11876
|
},
|
|
11857
|
-
htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName },
|
|
11877
|
+
htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName, role: 'option' },
|
|
11858
11878
|
floatLabelType: 'Always',
|
|
11859
11879
|
placeholder: this.getFieldLabel(value),
|
|
11860
11880
|
popupHeight: '230px'
|
|
@@ -13763,7 +13783,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
13763
13783
|
var resultData = extend([], args.result, null, true);
|
|
13764
13784
|
_this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
|
|
13765
13785
|
_this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
|
|
13766
|
-
_this.
|
|
13786
|
+
_this.refreshProcessedData();
|
|
13767
13787
|
if (_this.parent.dragAndDropModule && _this.parent.dragAndDropModule.actionObj.action === 'drag') {
|
|
13768
13788
|
_this.parent.dragAndDropModule.navigationWrapper();
|
|
13769
13789
|
}
|
|
@@ -13782,6 +13802,31 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
13782
13802
|
}
|
|
13783
13803
|
this.parent.trigger(actionFailure, { error: e }, function () { return _this.parent.hideSpinner(); });
|
|
13784
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
|
+
};
|
|
13785
13830
|
Crud.prototype.refreshData = function (args) {
|
|
13786
13831
|
var _this = this;
|
|
13787
13832
|
var actionArgs = {
|
|
@@ -14352,13 +14397,15 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14352
14397
|
else {
|
|
14353
14398
|
endDate = new Date(+followEvent[fields.startTime]);
|
|
14354
14399
|
var newRecurrenceRule = followEvent[fields.recurrenceRule];
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14400
|
+
if (newRecurrenceRule) {
|
|
14401
|
+
var startDate = parentEvent[fields.startTime];
|
|
14402
|
+
var ruleException = (this.parent.currentAction === 'DeleteFollowingEvents') ? followEvent[fields.recurrenceException] : null;
|
|
14403
|
+
var dateCollection = generate(startDate, newRecurrenceRule, ruleException, this.parent.activeViewOptions.firstDayOfWeek);
|
|
14404
|
+
var untilDate = new Date(dateCollection.slice(-1)[0]);
|
|
14405
|
+
untilDate.setHours(endDate.getHours(), endDate.getMinutes(), endDate.getSeconds());
|
|
14406
|
+
endDate.setHours(startDate.getHours(), startDate.getMinutes(), startDate.getSeconds());
|
|
14407
|
+
followEvent[fields.recurrenceRule] = this.getUpdatedRecurrenceRule(newRecurrenceRule, new Date(+untilDate), false);
|
|
14408
|
+
}
|
|
14362
14409
|
}
|
|
14363
14410
|
parentEvent[fields.recurrenceRule] = this.getUpdatedRecurrenceRule(recurrenceRule, addDays(new Date(endDate.getTime()), -1), true);
|
|
14364
14411
|
};
|
|
@@ -16497,7 +16544,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16497
16544
|
if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
|
|
16498
16545
|
this.uiStateValues = {
|
|
16499
16546
|
expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
|
|
16500
|
-
isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true,
|
|
16547
|
+
isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
|
|
16501
16548
|
};
|
|
16502
16549
|
}
|
|
16503
16550
|
this.activeCellsData = { startTime: this.getCurrentTime(), endTime: this.getCurrentTime(), isAllDay: false };
|
|
@@ -16959,11 +17006,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16959
17006
|
}
|
|
16960
17007
|
if (this.currentView === 'Month' || ((this.currentView !== 'Agenda' && this.currentView !== 'MonthAgenda')
|
|
16961
17008
|
&& !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
|
|
16962
|
-
this.uiStateValues.isResize = true;
|
|
16963
17009
|
this.activeView.resetColWidth();
|
|
16964
17010
|
this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
|
|
16965
17011
|
this.refreshEvents(false);
|
|
16966
|
-
this.uiStateValues.isResize = false;
|
|
16967
17012
|
}
|
|
16968
17013
|
else {
|
|
16969
17014
|
this.notify(contentReady, {});
|
|
@@ -18035,25 +18080,15 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18035
18080
|
this.crudModule.refreshDataManager();
|
|
18036
18081
|
}
|
|
18037
18082
|
else {
|
|
18038
|
-
if (this.
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
this.crudModule.crudObj.targetEvent[i].groupIndex) {
|
|
18047
|
-
templateNames.push('eventTemplate_' + this.crudModule.crudObj.targetEvent[i].groupIndex);
|
|
18048
|
-
}
|
|
18049
|
-
}
|
|
18050
|
-
}
|
|
18051
|
-
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;
|
|
18052
18091
|
}
|
|
18053
|
-
var eventsData = this.eventsData || [];
|
|
18054
|
-
var blockData = this.blockData || [];
|
|
18055
|
-
var data = eventsData.concat(blockData);
|
|
18056
|
-
this.notify(dataReady, { processedData: this.eventBase ? this.eventBase.processData(data) : [] });
|
|
18057
18092
|
}
|
|
18058
18093
|
};
|
|
18059
18094
|
/**
|
|
@@ -18239,6 +18274,72 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18239
18274
|
this.eventWindow.dialogClose();
|
|
18240
18275
|
}
|
|
18241
18276
|
};
|
|
18277
|
+
/**
|
|
18278
|
+
* To manually open the quick info popup based on cell or event details.
|
|
18279
|
+
*
|
|
18280
|
+
* @param {object} data Defines the cell or event data. If the data contains valid ID, it will open event quick info popup,
|
|
18281
|
+
* otherwise cell quick info popup displayed.
|
|
18282
|
+
* @returns {void}
|
|
18283
|
+
*/
|
|
18284
|
+
Schedule.prototype.openQuickInfoPopup = function (data) {
|
|
18285
|
+
var _this = this;
|
|
18286
|
+
if (this.currentView === 'Year' || isNullOrUndefined(data)) {
|
|
18287
|
+
return;
|
|
18288
|
+
}
|
|
18289
|
+
if (isNullOrUndefined(data[this.eventFields.id])) {
|
|
18290
|
+
if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda' || isNullOrUndefined(this.activeView)) {
|
|
18291
|
+
return;
|
|
18292
|
+
}
|
|
18293
|
+
var cellData = {
|
|
18294
|
+
startTime: this.activeCellsData.startTime = this.getDateTime(data[this.eventFields.startTime]),
|
|
18295
|
+
endTime: this.activeCellsData.endTime = this.getDateTime(data[this.eventFields.endTime]),
|
|
18296
|
+
isAllDay: this.activeCellsData.isAllDay =
|
|
18297
|
+
!isNullOrUndefined(data[this.eventFields.isAllDay]) ? data[this.eventFields.isAllDay] : false
|
|
18298
|
+
};
|
|
18299
|
+
var startTime = this.activeView.getAdjustedDate(new Date(cellData.startTime));
|
|
18300
|
+
if (startTime) {
|
|
18301
|
+
var query = '.' + WORK_CELLS_CLASS + '[data-date="' + startTime.getTime() + '"]';
|
|
18302
|
+
if (this.activeViewOptions.group.resources.length > 0 && !this.uiStateValues.isGroupAdaptive
|
|
18303
|
+
&& this.resourceBase && this.eventBase) {
|
|
18304
|
+
cellData.groupIndex = this.eventBase.getGroupIndexFromEvent(data);
|
|
18305
|
+
query = '.' + WORK_CELLS_CLASS + '[data-date="' + startTime.getTime() + '"][data-group-index="' + cellData.groupIndex + '"]';
|
|
18306
|
+
}
|
|
18307
|
+
var workCell = this.element.querySelector(query);
|
|
18308
|
+
if (workCell) {
|
|
18309
|
+
workCell.focus();
|
|
18310
|
+
cellData.element = workCell;
|
|
18311
|
+
this.notify(cellClick, cellData);
|
|
18312
|
+
}
|
|
18313
|
+
}
|
|
18314
|
+
}
|
|
18315
|
+
else {
|
|
18316
|
+
var app = this.getCurrentViewEvents().filter(function (item) {
|
|
18317
|
+
return data[_this.eventFields.id] === item[_this.eventFields.id];
|
|
18318
|
+
});
|
|
18319
|
+
if (app.length <= 0) {
|
|
18320
|
+
return;
|
|
18321
|
+
}
|
|
18322
|
+
var selectEvent = app[0];
|
|
18323
|
+
if (data[this.eventFields.recurrenceRule]) {
|
|
18324
|
+
var occurence = app.filter(function (x) {
|
|
18325
|
+
return x[_this.eventFields.startTime].getTime() === data[_this.eventFields.startTime].getTime();
|
|
18326
|
+
});
|
|
18327
|
+
if (occurence.length > 0) {
|
|
18328
|
+
selectEvent = occurence[0];
|
|
18329
|
+
}
|
|
18330
|
+
}
|
|
18331
|
+
var element = this.element.querySelector('div[data-guid="' + selectEvent.Guid + '"]');
|
|
18332
|
+
if (element) {
|
|
18333
|
+
this.eventBase.removeSelectedAppointmentClass();
|
|
18334
|
+
this.eventBase.addSelectedAppointments([element]);
|
|
18335
|
+
this.activeEventData = { event: selectEvent, element: element };
|
|
18336
|
+
if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda') {
|
|
18337
|
+
addClass([this.activeEventData.element], AGENDA_SELECTED_CELL);
|
|
18338
|
+
}
|
|
18339
|
+
this.notify(eventClick, this.activeEventData);
|
|
18340
|
+
}
|
|
18341
|
+
}
|
|
18342
|
+
};
|
|
18242
18343
|
/**
|
|
18243
18344
|
* To manually close the quick info popup
|
|
18244
18345
|
*
|
|
@@ -19735,7 +19836,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
19735
19836
|
}
|
|
19736
19837
|
};
|
|
19737
19838
|
YearEvent.prototype.timelineYearViewEvents = function () {
|
|
19738
|
-
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
19839
|
+
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
|
|
19739
19840
|
this.cellWidth = workCell.offsetWidth;
|
|
19740
19841
|
this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
|
|
19741
19842
|
var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
@@ -20020,7 +20121,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20020
20121
|
'data-id': 'Appointment_' + record[this.fields.id],
|
|
20021
20122
|
'data-guid': record.Guid,
|
|
20022
20123
|
'role': 'button', 'tabindex': '0',
|
|
20023
|
-
'aria-
|
|
20124
|
+
'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false', 'aria-grabbed': 'true',
|
|
20024
20125
|
'aria-label': this.parent.getAnnouncementString(record)
|
|
20025
20126
|
}
|
|
20026
20127
|
});
|
|
@@ -22005,6 +22106,17 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22005
22106
|
}
|
|
22006
22107
|
return endDate;
|
|
22007
22108
|
};
|
|
22109
|
+
ViewBase.prototype.getAdjustedDate = function (startTime) {
|
|
22110
|
+
if (!this.parent.activeViewOptions.timeScale.enable || this.parent.currentView === 'Month' ||
|
|
22111
|
+
(this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.group.resources.length === 0)) {
|
|
22112
|
+
return new Date(startTime.setHours(0, 0, 0, 0));
|
|
22113
|
+
}
|
|
22114
|
+
else if (this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
22115
|
+
startTime.setHours(0, 0, 0, 0);
|
|
22116
|
+
return new Date(startTime.setDate(1));
|
|
22117
|
+
}
|
|
22118
|
+
return null;
|
|
22119
|
+
};
|
|
22008
22120
|
ViewBase.prototype.destroy = function () {
|
|
22009
22121
|
if (this.element && this.element.parentNode) {
|
|
22010
22122
|
remove(this.element);
|
|
@@ -22524,12 +22636,11 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22524
22636
|
var wrap = createElement('div', { className: DATE_HEADER_WRAP_CLASS });
|
|
22525
22637
|
container.appendChild(wrap);
|
|
22526
22638
|
var tbl = this.createTableLayout();
|
|
22527
|
-
var trEle = createElement('tr');
|
|
22639
|
+
var trEle = createElement('tr', { className: HEADER_ROW_CLASS });
|
|
22528
22640
|
var rowCount = this.colLevels.length;
|
|
22529
22641
|
var lastLevel = this.colLevels[rowCount - 1];
|
|
22530
22642
|
for (var i = 0; i < rowCount; i++) {
|
|
22531
22643
|
var ntr = trEle.cloneNode();
|
|
22532
|
-
addClass([ntr], HEADER_ROW_CLASS);
|
|
22533
22644
|
var level = this.colLevels[i];
|
|
22534
22645
|
for (var j = 0; j < level.length; j++) {
|
|
22535
22646
|
ntr.appendChild(this.createTd(level[j]));
|
|
@@ -22542,13 +22653,13 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22542
22653
|
return container;
|
|
22543
22654
|
};
|
|
22544
22655
|
VerticalView.prototype.createAllDayRow = function (table, tdData) {
|
|
22545
|
-
var ntr = createElement('tr');
|
|
22546
|
-
addClass([ntr], ALLDAY_ROW_CLASS);
|
|
22656
|
+
var ntr = createElement('tr', { className: ALLDAY_ROW_CLASS });
|
|
22547
22657
|
for (var j = 0; j < tdData.length; j++) {
|
|
22548
22658
|
var td = extend({}, tdData[j]);
|
|
22549
22659
|
td.className = [ALLDAY_CELLS_CLASS];
|
|
22550
22660
|
td.type = 'alldayCells';
|
|
22551
22661
|
var ntd = this.createTd(td);
|
|
22662
|
+
ntd.setAttribute('role', 'gridcell');
|
|
22552
22663
|
ntd.setAttribute('data-date', td.date.getTime().toString());
|
|
22553
22664
|
if (!isNullOrUndefined(td.groupIndex)) {
|
|
22554
22665
|
ntd.setAttribute('data-group-index', '' + td.groupIndex);
|
|
@@ -22581,6 +22692,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22581
22692
|
}
|
|
22582
22693
|
if (td.type === 'dateHeader' && td.className.indexOf(HEADER_CELLS_CLASS) >= 0) {
|
|
22583
22694
|
tdEle.setAttribute('data-date', td.date.getTime().toString());
|
|
22695
|
+
tdEle.setAttribute('role', 'gridcell');
|
|
22584
22696
|
if (!isNullOrUndefined(td.groupIndex)) {
|
|
22585
22697
|
tdEle.setAttribute('data-group-index', '' + td.groupIndex);
|
|
22586
22698
|
}
|
|
@@ -22783,6 +22895,23 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22783
22895
|
}
|
|
22784
22896
|
return rows;
|
|
22785
22897
|
};
|
|
22898
|
+
VerticalView.prototype.getAdjustedDate = function (startTime) {
|
|
22899
|
+
if (!this.parent.activeViewOptions.timeScale.enable) {
|
|
22900
|
+
return new Date(startTime.setHours(0, 0, 0, 0));
|
|
22901
|
+
}
|
|
22902
|
+
else {
|
|
22903
|
+
var timeSlots = this.getTimeSlotRows();
|
|
22904
|
+
var startDate = new Date(new Date(timeSlots[0].date.getTime()).
|
|
22905
|
+
setHours(startTime.getHours(), startTime.getMinutes(), startTime.getMilliseconds()));
|
|
22906
|
+
for (var i = 0; i < timeSlots.length; i++) {
|
|
22907
|
+
if (timeSlots[i].date.getTime() > startDate.getTime()) {
|
|
22908
|
+
startTime.setHours(timeSlots[i - 1].date.getHours(), timeSlots[i - 1].date.getMinutes(), timeSlots[i - 1].date.getMilliseconds());
|
|
22909
|
+
return new Date(startTime);
|
|
22910
|
+
}
|
|
22911
|
+
}
|
|
22912
|
+
}
|
|
22913
|
+
return null;
|
|
22914
|
+
};
|
|
22786
22915
|
VerticalView.prototype.destroy = function () {
|
|
22787
22916
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
22788
22917
|
return;
|
|
@@ -23924,7 +24053,8 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
23924
24053
|
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek) : this.getStartDate();
|
|
23925
24054
|
};
|
|
23926
24055
|
Year.prototype.endDate = function () {
|
|
23927
|
-
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) :
|
|
24056
|
+
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) :
|
|
24057
|
+
addDays(this.getEndDate(), 1);
|
|
23928
24058
|
};
|
|
23929
24059
|
Year.prototype.getEndDateFromStartDate = function (start) {
|
|
23930
24060
|
var date = new Date(start.getTime());
|
|
@@ -24050,8 +24180,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24050
24180
|
'data-guid': listData[li].Guid,
|
|
24051
24181
|
'role': 'button',
|
|
24052
24182
|
'tabindex': '0',
|
|
24053
|
-
'aria-
|
|
24054
|
-
'aria-
|
|
24183
|
+
'aria-disabled': _this.parent.eventBase.getReadonlyAttribute(listData[li]),
|
|
24184
|
+
'aria-pressed': 'false',
|
|
24055
24185
|
'aria-grabbed': 'true',
|
|
24056
24186
|
'aria-label': _this.parent.getAnnouncementString(listData[li])
|
|
24057
24187
|
}
|
|
@@ -24319,8 +24449,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24319
24449
|
ntd.appendChild(this.createDateHeaderElement(tempData.date));
|
|
24320
24450
|
addClass([ntd], [AGENDA_CELLS_CLASS, AGENDA_DATE_CLASS, DATE_BORDER_CLASS]);
|
|
24321
24451
|
var daysCount = getDaysCount(this.parent.selectedDate.getTime(), tempData.date.getTime());
|
|
24322
|
-
ntr.setAttribute('
|
|
24323
|
-
if (this.parent.element.querySelector(".e-agenda-view tr[
|
|
24452
|
+
ntr.setAttribute('data-row-index', daysCount.toString());
|
|
24453
|
+
if (this.parent.element.querySelector(".e-agenda-view tr[data-row-index=\"" + daysCount + "\"]")) {
|
|
24324
24454
|
break;
|
|
24325
24455
|
}
|
|
24326
24456
|
ntr.insertBefore(ntd, ntr.childNodes[0]);
|
|
@@ -24356,13 +24486,13 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24356
24486
|
};
|
|
24357
24487
|
AgendaBase.prototype.createTableRowElement = function (date, type) {
|
|
24358
24488
|
var daysCount = getDaysCount(this.parent.selectedDate.getTime(), date.getTime());
|
|
24359
|
-
var tr = createElement('tr', { attrs: { 'role': 'row', '
|
|
24489
|
+
var tr = createElement('tr', { attrs: { 'role': 'row', 'data-row-index': daysCount.toString() } });
|
|
24360
24490
|
var td = createElement('td', {
|
|
24361
24491
|
attrs: {
|
|
24362
24492
|
'class': (type === 'monthHeader') ? MONTH_HEADER_CLASS : AGENDA_CELLS_CLASS,
|
|
24363
24493
|
'role': 'gridcell',
|
|
24364
24494
|
'aria-selected': 'false',
|
|
24365
|
-
'
|
|
24495
|
+
'data-column-index': daysCount.toString(),
|
|
24366
24496
|
'data-date': date.getTime().toString()
|
|
24367
24497
|
}
|
|
24368
24498
|
});
|
|
@@ -24547,7 +24677,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
24547
24677
|
for (var day = 0; day < this.parent.agendaDaysCount; day++) {
|
|
24548
24678
|
var filterData = this.appointmentFiltering(agendaDate);
|
|
24549
24679
|
var nTr = this.createTableRowElement(agendaDate, 'data');
|
|
24550
|
-
if (this.element.querySelector('tr[
|
|
24680
|
+
if (this.element.querySelector('tr[data-row-index="' + parseInt(nTr.getAttribute('data-row-index'), 10) + '"]')) {
|
|
24551
24681
|
agendaDate = addDays(agendaDate, 1);
|
|
24552
24682
|
continue;
|
|
24553
24683
|
}
|
|
@@ -24611,7 +24741,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
24611
24741
|
prepend([].slice.call(emptyTBody.childNodes), tBody);
|
|
24612
24742
|
this.wireEventActions();
|
|
24613
24743
|
for (var s = 0, element = tBody.children; s < element.length; s++) {
|
|
24614
|
-
if (element[s].getAttribute('
|
|
24744
|
+
if (element[s].getAttribute('data-row-index') === topElement.getAttribute('data-column-index')) {
|
|
24615
24745
|
var scrollToValue = element[s].offsetTop -
|
|
24616
24746
|
this.element.querySelector('.e-agenda-item').offsetHeight;
|
|
24617
24747
|
target.scrollTop = scrollToValue;
|
|
@@ -25362,6 +25492,20 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25362
25492
|
this.timelineAppointment.renderAppointments();
|
|
25363
25493
|
this.parent.notify(eventsLoaded, {});
|
|
25364
25494
|
};
|
|
25495
|
+
TimelineViews.prototype.getAdjustedDate = function (date) {
|
|
25496
|
+
if (!this.parent.activeViewOptions.timeScale.enable) {
|
|
25497
|
+
return new Date(date.setHours(0, 0, 0, 0));
|
|
25498
|
+
}
|
|
25499
|
+
else {
|
|
25500
|
+
var timeSlots = this.colLevels[this.colLevels.length - 1];
|
|
25501
|
+
for (var i = 0; i < timeSlots.length; i++) {
|
|
25502
|
+
if (timeSlots[i].date.getTime() > date.getTime()) {
|
|
25503
|
+
return timeSlots[i - 1].date;
|
|
25504
|
+
}
|
|
25505
|
+
}
|
|
25506
|
+
}
|
|
25507
|
+
return null;
|
|
25508
|
+
};
|
|
25365
25509
|
TimelineViews.prototype.destroy = function () {
|
|
25366
25510
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
25367
25511
|
return;
|
|
@@ -25520,6 +25664,15 @@ var TimelineMonth = /** @__PURE__ @class */ (function (_super) {
|
|
|
25520
25664
|
this.colLevels = colLevels;
|
|
25521
25665
|
return colLevels;
|
|
25522
25666
|
};
|
|
25667
|
+
TimelineMonth.prototype.getAdjustedDate = function (startTime) {
|
|
25668
|
+
var timeSlots = this.colLevels[this.colLevels.length - 1];
|
|
25669
|
+
for (var i = 0; i < timeSlots.length; i++) {
|
|
25670
|
+
if (timeSlots[i].date.getTime() > startTime.getTime()) {
|
|
25671
|
+
return timeSlots[i - 1].date;
|
|
25672
|
+
}
|
|
25673
|
+
}
|
|
25674
|
+
return null;
|
|
25675
|
+
};
|
|
25523
25676
|
TimelineMonth.prototype.destroy = function () {
|
|
25524
25677
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
25525
25678
|
return;
|
|
@@ -25807,6 +25960,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
25807
25960
|
else {
|
|
25808
25961
|
addClass([td], OTHERMONTH_CLASS);
|
|
25809
25962
|
}
|
|
25963
|
+
if (td.classList.contains(OTHERMONTH_CLASS)) {
|
|
25964
|
+
continue;
|
|
25965
|
+
}
|
|
25810
25966
|
td.appendChild(dateHeader);
|
|
25811
25967
|
if (isDateAvail) {
|
|
25812
25968
|
td.setAttribute('data-date', date.getTime().toString());
|
|
@@ -25984,6 +26140,10 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
25984
26140
|
this.parent = parent;
|
|
25985
26141
|
}
|
|
25986
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) {
|
|
25987
26147
|
var _this = this;
|
|
25988
26148
|
var eventsData = (customData) ? customData :
|
|
25989
26149
|
extend([], this.parent.eventsData, null, true);
|
|
@@ -25994,7 +26154,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
25994
26154
|
var timeZone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
25995
26155
|
var fields = this.parent.eventFields;
|
|
25996
26156
|
eventsData.forEach(function (eventObj) {
|
|
25997
|
-
var uId = _this.parent.eventBase.generateGuid();
|
|
26157
|
+
var uId = eventObj[fields.id] || eventObj.Guid || _this.parent.eventBase.generateGuid();
|
|
25998
26158
|
var editedExDate = [];
|
|
25999
26159
|
if (eventObj[fields.recurrenceID]) {
|
|
26000
26160
|
var filter = _this.filterEvents(filterCollection, fields.id, eventObj[fields.recurrenceID]);
|
|
@@ -26069,7 +26229,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26069
26229
|
'X-WR-TIMEZONE:' + timeZone
|
|
26070
26230
|
].join(SEPARATOR);
|
|
26071
26231
|
var icsString = iCalendar + SEPARATOR + iCalendarEvents.join(SEPARATOR) + SEPARATOR + 'END:VCALENDAR';
|
|
26072
|
-
|
|
26232
|
+
return icsString;
|
|
26073
26233
|
};
|
|
26074
26234
|
ICalendarExport.prototype.customFieldFilter = function (eventObj, fields) {
|
|
26075
26235
|
var defaultFields = Object.keys(fields).map(function (key) { return fields[key]; });
|
|
@@ -26198,8 +26358,16 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26198
26358
|
break;
|
|
26199
26359
|
case 'UID':
|
|
26200
26360
|
curEvent[uId] = value;
|
|
26201
|
-
|
|
26202
|
-
|
|
26361
|
+
if (typeof (id) == 'number') {
|
|
26362
|
+
curEvent[fields.id] = parseInt(value, 10);
|
|
26363
|
+
if (isNaN(curEvent[fields.id])) {
|
|
26364
|
+
curEvent[fields.id] = id + count;
|
|
26365
|
+
count++;
|
|
26366
|
+
}
|
|
26367
|
+
}
|
|
26368
|
+
else {
|
|
26369
|
+
curEvent[fields.id] = value;
|
|
26370
|
+
}
|
|
26203
26371
|
break;
|
|
26204
26372
|
case 'SUMMARY':
|
|
26205
26373
|
curEvent[fields.subject] = value;
|
|
@@ -26235,6 +26403,10 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26235
26403
|
var appoint = [];
|
|
26236
26404
|
var uId = 'UID';
|
|
26237
26405
|
var fields = this.parent.eventFields;
|
|
26406
|
+
var appointmentIds = [];
|
|
26407
|
+
this.parent.eventsData.forEach(function (eventObj) {
|
|
26408
|
+
appointmentIds.push(eventObj[fields.id]);
|
|
26409
|
+
});
|
|
26238
26410
|
app.forEach(function (eventObj) {
|
|
26239
26411
|
var parentObj;
|
|
26240
26412
|
var id;
|
|
@@ -26243,24 +26415,26 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26243
26415
|
parentObj = eventObj;
|
|
26244
26416
|
id = eventObj[fields.id];
|
|
26245
26417
|
}
|
|
26246
|
-
|
|
26247
|
-
|
|
26248
|
-
|
|
26249
|
-
|
|
26250
|
-
|
|
26251
|
-
|
|
26252
|
-
|
|
26253
|
-
|
|
26254
|
-
|
|
26255
|
-
|
|
26256
|
-
|
|
26418
|
+
if (appointmentIds.indexOf(eventObj[fields.id]) < 0) {
|
|
26419
|
+
var data = app.filter(function (data) { return data.UID === eventObj[uId]; });
|
|
26420
|
+
if (data.length > 1 && isNullOrUndefined(eventObj[fields.recurrenceID])) {
|
|
26421
|
+
for (var i = 0; i < data.length; i++) {
|
|
26422
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
26423
|
+
if (data[i].hasOwnProperty(fields.recurrenceID)) {
|
|
26424
|
+
var exdate = data[i][fields.recurrenceID];
|
|
26425
|
+
data[i][fields.recurrenceID] = id;
|
|
26426
|
+
data[i][fields.recurrenceException] = null;
|
|
26427
|
+
parentObj[fields.recurrenceException] = (isNullOrUndefined(parentObj[fields.recurrenceException])) ?
|
|
26428
|
+
exdate : parentObj[fields.recurrenceException] + ',' + exdate;
|
|
26429
|
+
appoint.push(data[i]);
|
|
26430
|
+
}
|
|
26257
26431
|
}
|
|
26432
|
+
appoint.push(parentObj);
|
|
26433
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
26434
|
+
}
|
|
26435
|
+
else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
|
|
26436
|
+
appoint.push(eventObj);
|
|
26258
26437
|
}
|
|
26259
|
-
appoint.push(parentObj);
|
|
26260
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
26261
|
-
}
|
|
26262
|
-
else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
|
|
26263
|
-
appoint.push(eventObj);
|
|
26264
26438
|
}
|
|
26265
26439
|
});
|
|
26266
26440
|
return appoint;
|
|
@@ -26320,6 +26494,10 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
26320
26494
|
var exportName = excelExportOptions.fileName || 'Schedule';
|
|
26321
26495
|
var exportType = excelExportOptions.exportType || 'xlsx';
|
|
26322
26496
|
var isIncludeOccurrences = excelExportOptions.includeOccurrences || false;
|
|
26497
|
+
var separator;
|
|
26498
|
+
if (!isNullOrUndefined(excelExportOptions.separator) && excelExportOptions.separator !== ',') {
|
|
26499
|
+
separator = excelExportOptions.separator;
|
|
26500
|
+
}
|
|
26323
26501
|
var eventCollection;
|
|
26324
26502
|
if (excelExportOptions.customData) {
|
|
26325
26503
|
eventCollection = !isIncludeOccurrences ? excelExportOptions.customData :
|
|
@@ -26328,9 +26506,9 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
26328
26506
|
else {
|
|
26329
26507
|
eventCollection = !isIncludeOccurrences ? this.parent.eventsData : this.parent.eventsProcessed;
|
|
26330
26508
|
}
|
|
26331
|
-
this.processWorkbook(exportColumns, exportName, exportType, eventCollection);
|
|
26509
|
+
this.processWorkbook(exportColumns, exportName, exportType, eventCollection, separator);
|
|
26332
26510
|
};
|
|
26333
|
-
ExcelExport.prototype.processWorkbook = function (fields, name, type, eventCollection) {
|
|
26511
|
+
ExcelExport.prototype.processWorkbook = function (fields, name, type, eventCollection, separator) {
|
|
26334
26512
|
var _this = this;
|
|
26335
26513
|
var columns = [];
|
|
26336
26514
|
var rows = [];
|
|
@@ -26352,7 +26530,7 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
26352
26530
|
rows.push({ index: i + 2, cells: columnData });
|
|
26353
26531
|
});
|
|
26354
26532
|
var workSheet = [{ columns: columns, rows: rows }];
|
|
26355
|
-
var book = new Workbook({ worksheets: workSheet }, type, this.parent.locale);
|
|
26533
|
+
var book = new Workbook({ worksheets: workSheet }, type, this.parent.locale, undefined, separator);
|
|
26356
26534
|
book.save(name + '.' + type);
|
|
26357
26535
|
};
|
|
26358
26536
|
ExcelExport.prototype.getExportColumns = function (exportOptions) {
|