@syncfusion/ej2-schedule 22.2.11 → 22.2.12
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 +10 -0
- package/dist/ej2-schedule.min.js +2 -2
- 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 +159 -118
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +158 -119
- 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 +9 -9
- package/src/recurrence-editor/date-generator.d.ts +1 -2
- package/src/recurrence-editor/date-generator.js +3 -5
- package/src/recurrence-editor/recurrence-editor.d.ts +1 -1
- package/src/schedule/actions/crud.js +6 -1
- package/src/schedule/actions/keyboard.js +5 -1
- package/src/schedule/base/util.d.ts +1 -0
- package/src/schedule/base/util.js +1 -0
- package/src/schedule/event-renderer/event-base.d.ts +1 -1
- package/src/schedule/event-renderer/event-base.js +4 -4
- package/src/schedule/exports/calendar-import.d.ts +2 -1
- package/src/schedule/exports/calendar-import.js +134 -106
- package/src/schedule/renderer/timeline-view.js +5 -2
- package/styles/material-dark.css +1 -1
- package/styles/recurrence-editor/material-dark.css +1 -1
- package/styles/schedule/material-dark.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.12
|
|
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@22.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-schedule@22.2.11",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-f2u5jsuLDc7QiGNWzKJgamDYPya3eP8kUqK3cMWRxg6Kae0ye9vz0UeB5H9dzuGJ9HnuiFMjYAQnPlqBgIjcMQ==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-22.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-22.2.11.tgz",
|
|
27
|
+
"_shasum": "c9ed2e7b2272b7c886b7dfd771a7bb7fd0e910e1",
|
|
28
28
|
"_spec": "@syncfusion/ej2-schedule@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~22.2.
|
|
38
|
+
"@syncfusion/ej2-base": "~22.2.12",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~22.2.9",
|
|
40
|
-
"@syncfusion/ej2-calendars": "~22.2.
|
|
40
|
+
"@syncfusion/ej2-calendars": "~22.2.12",
|
|
41
41
|
"@syncfusion/ej2-data": "~22.2.5",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~22.2.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~22.2.12",
|
|
43
43
|
"@syncfusion/ej2-excel-export": "~22.2.5",
|
|
44
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
44
|
+
"@syncfusion/ej2-inputs": "~22.2.12",
|
|
45
45
|
"@syncfusion/ej2-lists": "~22.2.11",
|
|
46
46
|
"@syncfusion/ej2-navigations": "~22.2.11",
|
|
47
47
|
"@syncfusion/ej2-popups": "~22.2.11"
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "22.2.
|
|
76
|
+
"version": "22.2.12",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -23,11 +23,10 @@ export declare function generateSummary(rule: string, localeObject: L10n, locale
|
|
|
23
23
|
* @param {number} maximumCount Accepts the maximum number count to generate date collections
|
|
24
24
|
* @param {Date} viewDate Accepts the current date instead of start date
|
|
25
25
|
* @param {CalendarType} calendarMode Accepts the calendar type
|
|
26
|
-
* @param {string} oldTimezone Accepts the timezone name
|
|
27
26
|
* @param {string} newTimezone Accepts the timezone name
|
|
28
27
|
* @returns {number[]} Returns the collection of dates
|
|
29
28
|
*/
|
|
30
|
-
export declare function generate(startDate: Date, rule: string, excludeDate: string, startDayOfWeek: number, maximumCount?: number, viewDate?: Date, calendarMode?: CalendarType,
|
|
29
|
+
export declare function generate(startDate: Date, rule: string, excludeDate: string, startDayOfWeek: number, maximumCount?: number, viewDate?: Date, calendarMode?: CalendarType, newTimezone?: string): number[];
|
|
31
30
|
/**
|
|
32
31
|
* Generate date object from given date string
|
|
33
32
|
*
|
|
@@ -103,15 +103,13 @@ function getMonthSummary(ruleObject, cldrObj, localeObj) {
|
|
|
103
103
|
* @param {number} maximumCount Accepts the maximum number count to generate date collections
|
|
104
104
|
* @param {Date} viewDate Accepts the current date instead of start date
|
|
105
105
|
* @param {CalendarType} calendarMode Accepts the calendar type
|
|
106
|
-
* @param {string} oldTimezone Accepts the timezone name
|
|
107
106
|
* @param {string} newTimezone Accepts the timezone name
|
|
108
107
|
* @returns {number[]} Returns the collection of dates
|
|
109
108
|
*/
|
|
110
|
-
export function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCount, viewDate, calendarMode,
|
|
109
|
+
export function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCount, viewDate, calendarMode, newTimezone) {
|
|
111
110
|
if (maximumCount === void 0) { maximumCount = MAXOCCURRENCE; }
|
|
112
111
|
if (viewDate === void 0) { viewDate = null; }
|
|
113
112
|
if (calendarMode === void 0) { calendarMode = 'Gregorian'; }
|
|
114
|
-
if (oldTimezone === void 0) { oldTimezone = null; }
|
|
115
113
|
if (newTimezone === void 0) { newTimezone = null; }
|
|
116
114
|
var ruleObject = extractObjectFromRule(rule);
|
|
117
115
|
var cacheDate;
|
|
@@ -123,8 +121,8 @@ export function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCo
|
|
|
123
121
|
var tz = new Timezone();
|
|
124
122
|
tempDate.forEach(function (content) {
|
|
125
123
|
var parsedDate = getDateFromRecurrenceDateString(content);
|
|
126
|
-
if (
|
|
127
|
-
parsedDate = tz.
|
|
124
|
+
if (newTimezone) {
|
|
125
|
+
parsedDate = tz.add(new Date(parsedDate.getTime()), newTimezone);
|
|
128
126
|
}
|
|
129
127
|
tempExcludeDate.push(new Date(parsedDate.getTime()).setHours(0, 0, 0, 0));
|
|
130
128
|
});
|
|
@@ -229,5 +229,5 @@ export declare type RepeatType = 'none' | 'daily' | 'weekly' | 'monthly' | 'year
|
|
|
229
229
|
* until :- Denotes that the recurrence ends on a specified date.
|
|
230
230
|
* count :- Denotes that the recurrence ends after a specified number of occurrences.
|
|
231
231
|
* ```
|
|
232
|
-
*/
|
|
232
|
+
*/
|
|
233
233
|
export declare type EndType = 'never' | 'until' | 'count';
|
|
@@ -338,7 +338,8 @@ var Crud = /** @class */ (function () {
|
|
|
338
338
|
}
|
|
339
339
|
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
340
340
|
var args = {
|
|
341
|
-
requestType: action === 'EditOccurrence' ? 'eventChange' : 'eventRemove',
|
|
341
|
+
requestType: action === 'EditOccurrence' ? 'eventChange' : 'eventRemove',
|
|
342
|
+
cancel: false,
|
|
342
343
|
addedRecords: [], changedRecords: updateEvents, deletedRecords: []
|
|
343
344
|
};
|
|
344
345
|
args.data = occurrenceData;
|
|
@@ -649,6 +650,10 @@ var Crud = /** @class */ (function () {
|
|
|
649
650
|
return parentEvent;
|
|
650
651
|
};
|
|
651
652
|
Crud.prototype.excludeDateCheck = function (eventStartTime, exceptionDateList) {
|
|
653
|
+
var timezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
654
|
+
if (timezone) {
|
|
655
|
+
eventStartTime = this.parent.tzModule.remove(new Date(+eventStartTime.getTime()), timezone);
|
|
656
|
+
}
|
|
652
657
|
var exDate = getRecurrenceStringFromDate(eventStartTime);
|
|
653
658
|
if (!isNullOrUndefined(exceptionDateList)) {
|
|
654
659
|
if (exceptionDateList.indexOf(exDate) === -1) {
|
|
@@ -211,6 +211,11 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
211
211
|
}
|
|
212
212
|
var queryStr = '.' + cls.WORK_CELLS_CLASS + ',.' + cls.ALLDAY_CELLS_CLASS + ',.' + cls.HEADER_CELLS_CLASS;
|
|
213
213
|
var target = closest(e.target, queryStr);
|
|
214
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
215
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && selectedCells.length > 0 &&
|
|
216
|
+
selectedCells[0].getAttribute('data-group-index') !== target.getAttribute('data-group-index')) {
|
|
217
|
+
target = selectedCells[selectedCells.length - 1];
|
|
218
|
+
}
|
|
214
219
|
if (this.parent.currentView === 'TimelineYear' && target.classList.contains(cls.OTHERMONTH_CLASS)) {
|
|
215
220
|
return;
|
|
216
221
|
}
|
|
@@ -219,7 +224,6 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
219
224
|
if (this.parent.eventWindow) {
|
|
220
225
|
this.parent.eventWindow.convertToEventData(this.parent.activeCellsData, cellData);
|
|
221
226
|
}
|
|
222
|
-
var selectedCells = this.parent.getSelectedCells();
|
|
223
227
|
var args = {
|
|
224
228
|
data: cellData, element: this.parent.activeCellsData.element, event: e,
|
|
225
229
|
requestType: cellSelect, showQuickPopup: false
|
|
@@ -300,6 +300,7 @@ export function getScrollBarWidth() {
|
|
|
300
300
|
* Method to reset scrollbar width
|
|
301
301
|
*
|
|
302
302
|
* @private
|
|
303
|
+
* @returns {void}
|
|
303
304
|
*/
|
|
304
305
|
export function resetScrollbarWidth() {
|
|
305
306
|
var zoomPixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
|
|
@@ -58,7 +58,7 @@ export declare class EventBase {
|
|
|
58
58
|
getEventIDType(): string;
|
|
59
59
|
getEventMaxID(resourceId?: number): number | string;
|
|
60
60
|
private activeEventData;
|
|
61
|
-
generateOccurrence(event: Record<string, any>, viewDate?: Date,
|
|
61
|
+
generateOccurrence(event: Record<string, any>, viewDate?: Date, isMaxCount?: boolean): Record<string, any>[];
|
|
62
62
|
private getDSTAdjustedTime;
|
|
63
63
|
private getDSTDiff;
|
|
64
64
|
getParentEvent(eventObj: Record<string, any>, isParent?: boolean): Record<string, any>;
|
|
@@ -54,12 +54,12 @@ var EventBase = /** @class */ (function () {
|
|
|
54
54
|
}
|
|
55
55
|
if (!isNullOrUndefined(event_1[fields.recurrenceRule]) && isNullOrUndefined(event_1[fields.recurrenceID]) &&
|
|
56
56
|
!(this_1.parent.crudModule && this_1.parent.crudModule.crudObj.isCrudAction)) {
|
|
57
|
-
processed = processed.concat(this_1.generateOccurrence(event_1, null,
|
|
57
|
+
processed = processed.concat(this_1.generateOccurrence(event_1, null, true));
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
if (this_1.parent.crudModule && this_1.parent.crudModule.crudObj.isCrudAction) {
|
|
61
61
|
if (!isNullOrUndefined(event_1[fields.recurrenceRule]) && isNullOrUndefined(event_1[fields.recurrenceID])) {
|
|
62
|
-
var recurrenceEvent = this_1.generateOccurrence(event_1, null,
|
|
62
|
+
var recurrenceEvent = this_1.generateOccurrence(event_1, null, true);
|
|
63
63
|
var _loop_2 = function (occurrence) {
|
|
64
64
|
var app = this_1.parent.eventsProcessed.filter(function (data) {
|
|
65
65
|
return data[fields.startTime].getTime() - occurrence[fields.startTime].getTime() === 0 &&
|
|
@@ -879,7 +879,7 @@ var EventBase = /** @class */ (function () {
|
|
|
879
879
|
}
|
|
880
880
|
this.parent.activeEventData = { event: eventObject, element: target };
|
|
881
881
|
};
|
|
882
|
-
EventBase.prototype.generateOccurrence = function (event, viewDate,
|
|
882
|
+
EventBase.prototype.generateOccurrence = function (event, viewDate, isMaxCount) {
|
|
883
883
|
var startDate = event[this.parent.eventFields.startTime];
|
|
884
884
|
var endDate = event[this.parent.eventFields.endTime];
|
|
885
885
|
var eventRule = event[this.parent.eventFields.recurrenceRule];
|
|
@@ -894,7 +894,7 @@ var EventBase = /** @class */ (function () {
|
|
|
894
894
|
var newTimezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
895
895
|
var firstDay = this.parent.activeViewOptions.firstDayOfWeek;
|
|
896
896
|
var calendarMode = this.parent.calendarMode;
|
|
897
|
-
var dates = generate(startDate, eventRule, exception, firstDay, maxCount, viewDate, calendarMode,
|
|
897
|
+
var dates = generate(startDate, eventRule, exception, firstDay, maxCount, viewDate, calendarMode, newTimezone);
|
|
898
898
|
if (this.parent.currentView === 'Agenda' && eventRule.indexOf('COUNT') === -1 && eventRule.indexOf('UNTIL') === -1) {
|
|
899
899
|
if (isNullOrUndefined(event.generatedDates)) {
|
|
900
900
|
event.generatedDates = { start: new Date(dates[0]), end: new Date(dates[dates.length - 1]) };
|
|
@@ -8,9 +8,10 @@ export declare class ICalendarImport {
|
|
|
8
8
|
constructor(parent: Schedule);
|
|
9
9
|
initializeCalendarImport(fileContent: Blob | string): void;
|
|
10
10
|
private iCalendarParser;
|
|
11
|
+
private updateEventData;
|
|
11
12
|
private processOccurrence;
|
|
12
13
|
private getExcludeDateString;
|
|
13
|
-
private
|
|
14
|
+
private getFormattedString;
|
|
14
15
|
private dateParsing;
|
|
15
16
|
protected getModuleName(): string;
|
|
16
17
|
destroy(): void;
|
|
@@ -24,116 +24,144 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
ICalendarImport.prototype.iCalendarParser = function (iCalString) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
var iCalData = {
|
|
28
|
+
isEvent: false,
|
|
29
|
+
curEvent: null,
|
|
30
|
+
id: this.parent.eventBase.getEventMaxID(),
|
|
31
|
+
count: 0,
|
|
32
|
+
events: [],
|
|
33
|
+
key: null
|
|
34
|
+
};
|
|
35
|
+
var iStringLength = iCalString.length;
|
|
36
|
+
var lastPosition = iCalString.search(/[^ \t]/);
|
|
37
|
+
var position = lastPosition;
|
|
38
|
+
var iString;
|
|
39
|
+
var newlineOffset;
|
|
40
|
+
do {
|
|
41
|
+
position = iCalString.indexOf('\n', lastPosition) + 1;
|
|
42
|
+
if (position === 0) {
|
|
43
|
+
position = iStringLength;
|
|
44
|
+
newlineOffset = 0;
|
|
45
|
+
}
|
|
46
|
+
else if (position > 1 && iCalString[position - 2] === '\r') {
|
|
47
|
+
newlineOffset = 2;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
newlineOffset = 1;
|
|
51
|
+
}
|
|
52
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
53
|
+
var firstChar = iCalString[lastPosition];
|
|
54
|
+
if (firstChar === ' ' || firstChar === '\n' || firstChar === '\t') {
|
|
55
|
+
iString += iCalString.slice(lastPosition + 1, position - newlineOffset);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (iString) {
|
|
59
|
+
iCalData = this.updateEventData(iString, iCalData);
|
|
42
60
|
}
|
|
61
|
+
iString = iCalString.slice(lastPosition, position - newlineOffset);
|
|
43
62
|
}
|
|
63
|
+
lastPosition = position;
|
|
64
|
+
} while (position !== iStringLength);
|
|
65
|
+
iString = iString.trim();
|
|
66
|
+
if (iString.length) {
|
|
67
|
+
iCalData = this.updateEventData(iString, iCalData);
|
|
44
68
|
}
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
value
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
105
|
-
case 'SUMMARY':
|
|
106
|
-
curEvent[fields.subject] = value;
|
|
107
|
-
break;
|
|
108
|
-
case 'LOCATION':
|
|
109
|
-
curEvent[fields.location] = value;
|
|
110
|
-
break;
|
|
111
|
-
case 'DESCRIPTION':
|
|
112
|
-
if (!(curEvent[fields.description])) {
|
|
113
|
-
curEvent[fields.description] = value.replace(/\\,/g, ',')
|
|
114
|
-
.replace(/\\n/g, '\n');
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
case 'ISREADONLY':
|
|
118
|
-
curEvent[fields.isReadonly] = (value.indexOf('true') > -1);
|
|
119
|
-
break;
|
|
120
|
-
case 'RRULE':
|
|
121
|
-
curEvent[fields.recurrenceRule] = value;
|
|
122
|
-
break;
|
|
123
|
-
default:
|
|
124
|
-
if (_this.parent.resourceCollection.length > 0) {
|
|
125
|
-
var resData = _this.parent.resourceCollection.filter(function (data) { return data.field === type; });
|
|
126
|
-
curEvent["" + type] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
curEvent["" + type] = value;
|
|
69
|
+
var app = extend([], iCalData.events, null, true);
|
|
70
|
+
this.parent.addEvent(this.processOccurrence(app, iCalData.id));
|
|
71
|
+
};
|
|
72
|
+
ICalendarImport.prototype.updateEventData = function (iString, iCalData) {
|
|
73
|
+
var fields = this.parent.eventFields;
|
|
74
|
+
var SEPARATOR = '\r\n';
|
|
75
|
+
var id = iCalData.id;
|
|
76
|
+
var events = iCalData.events;
|
|
77
|
+
var isEvent = iCalData.isEvent;
|
|
78
|
+
var count = iCalData.count;
|
|
79
|
+
var curEvent = iCalData.curEvent;
|
|
80
|
+
var key = iCalData.key;
|
|
81
|
+
if (!isEvent && iString === 'BEGIN:VEVENT') {
|
|
82
|
+
isEvent = true;
|
|
83
|
+
curEvent = {};
|
|
84
|
+
}
|
|
85
|
+
if (isEvent && iString === 'END:VEVENT') {
|
|
86
|
+
isEvent = false;
|
|
87
|
+
events.push(curEvent);
|
|
88
|
+
curEvent = null;
|
|
89
|
+
}
|
|
90
|
+
if (isEvent) {
|
|
91
|
+
var index = iString.indexOf(':');
|
|
92
|
+
var type_1 = iString.substring(0, index).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
|
93
|
+
var value = iString.substring(index + 1, iString.length).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
|
94
|
+
if (iString.indexOf('SUMMARY') !== -1) {
|
|
95
|
+
type_1 = 'SUMMARY';
|
|
96
|
+
}
|
|
97
|
+
if (iString.indexOf('DTSTART') !== -1) {
|
|
98
|
+
curEvent[fields.startTime] = this.dateParsing(iString);
|
|
99
|
+
curEvent[fields.isAllDay] = this.allDay;
|
|
100
|
+
this.allDay = false;
|
|
101
|
+
}
|
|
102
|
+
else if (iString.indexOf('DTEND') !== -1) {
|
|
103
|
+
curEvent[fields.endTime] = this.dateParsing(iString);
|
|
104
|
+
}
|
|
105
|
+
else if (iString.indexOf('EXDATE') !== -1) {
|
|
106
|
+
value = getRecurrenceStringFromDate(this.dateParsing(iString));
|
|
107
|
+
curEvent[fields.recurrenceException] = isNullOrUndefined(curEvent[fields.recurrenceException]) ?
|
|
108
|
+
value : curEvent[fields.recurrenceException] + ',' + value;
|
|
109
|
+
}
|
|
110
|
+
else if (iString.indexOf('RECURRENCE-ID') !== -1) {
|
|
111
|
+
value = getRecurrenceStringFromDate(this.dateParsing(iString));
|
|
112
|
+
curEvent[fields.recurrenceException] = value;
|
|
113
|
+
curEvent[fields.recurrenceID] = value;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
key = type_1 || key;
|
|
117
|
+
switch (key) {
|
|
118
|
+
case 'BEGIN':
|
|
119
|
+
break;
|
|
120
|
+
case 'UID':
|
|
121
|
+
curEvent["" + type_1] = value;
|
|
122
|
+
if (typeof (id) == 'number') {
|
|
123
|
+
curEvent[fields.id] = parseInt(value, 10);
|
|
124
|
+
if (isNaN(curEvent[fields.id])) {
|
|
125
|
+
curEvent[fields.id] = id + count;
|
|
126
|
+
count++;
|
|
130
127
|
}
|
|
131
|
-
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
curEvent[fields.id] = value;
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case 'SUMMARY':
|
|
134
|
+
curEvent[fields.subject] = this.getFormattedString(value);
|
|
135
|
+
break;
|
|
136
|
+
case 'LOCATION':
|
|
137
|
+
curEvent[fields.location] = this.getFormattedString(value);
|
|
138
|
+
break;
|
|
139
|
+
case 'DESCRIPTION':
|
|
140
|
+
if (curEvent[fields.description]) {
|
|
141
|
+
curEvent[fields.description] = this.getFormattedString(curEvent[fields.description] + SEPARATOR + value);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
curEvent[fields.description] = this.getFormattedString(value);
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
case 'ISREADONLY':
|
|
148
|
+
curEvent[fields.isReadonly] = (value.indexOf('true') > -1);
|
|
149
|
+
break;
|
|
150
|
+
case 'RRULE':
|
|
151
|
+
curEvent[fields.recurrenceRule] = value;
|
|
152
|
+
break;
|
|
153
|
+
default:
|
|
154
|
+
if (this.parent.resourceCollection.length > 0) {
|
|
155
|
+
var resData = this.parent.resourceCollection.filter(function (data) { return data.field === type_1; });
|
|
156
|
+
curEvent["" + type_1] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
curEvent["" + type_1] = value;
|
|
160
|
+
}
|
|
132
161
|
}
|
|
133
162
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
this.parent.addEvent(this.processOccurrence(app, id));
|
|
163
|
+
}
|
|
164
|
+
return { isEvent: isEvent, curEvent: curEvent, id: id, count: count, events: events, key: key };
|
|
137
165
|
};
|
|
138
166
|
ICalendarImport.prototype.processOccurrence = function (app, maxId) {
|
|
139
167
|
var _this = this;
|
|
@@ -198,7 +226,7 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
198
226
|
}
|
|
199
227
|
return parentException + ',' + occurrenceException;
|
|
200
228
|
};
|
|
201
|
-
ICalendarImport.prototype.
|
|
229
|
+
ICalendarImport.prototype.getFormattedString = function (value) {
|
|
202
230
|
value = value || '';
|
|
203
231
|
// eslint-disable-next-line no-useless-escape
|
|
204
232
|
return (value.replace(/\\\,/g, ',').replace(/\\\;/g, ';').replace(/\\[nN]/g, '\n').replace(/\\\\/g, '\\'));
|
|
@@ -206,7 +234,7 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
206
234
|
ICalendarImport.prototype.dateParsing = function (element) {
|
|
207
235
|
var split = element.split(':');
|
|
208
236
|
var value = split[split.length - 1];
|
|
209
|
-
var newDate = new Date(this.
|
|
237
|
+
var newDate = new Date(this.getFormattedString(value));
|
|
210
238
|
if (element && (element.indexOf('VALUE=DATE') > -1 || element.indexOf('RECURRENCE-ID;TZID') > -1)) {
|
|
211
239
|
var data_1 = /^(\d{4})(\d{2})(\d{2})$/.exec(value);
|
|
212
240
|
if (data_1 !== null) {
|
|
@@ -155,8 +155,11 @@ var TimelineViews = /** @class */ (function (_super) {
|
|
|
155
155
|
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
156
156
|
if (!isNullOrUndefined(currentDateIndex)) {
|
|
157
157
|
if (currentDateIndex[0] !== 0) {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
var index = this.parent.activeView.colLevels.findIndex(function (level) { return level[0].type === 'dateHeader'; });
|
|
159
|
+
if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
|
|
160
|
+
this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
|
|
161
|
+
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
|
|
162
|
+
this.getWorkCellWidth();
|
|
160
163
|
}
|
|
161
164
|
else {
|
|
162
165
|
var endHour = this.getEndHour();
|
package/styles/material-dark.css
CHANGED