@syncfusion/ej2-schedule
Advanced tools
Comparing version 22.2.11 to 22.2.12
/*! | ||
* filename: index.d.ts | ||
* version : 22.2.11 | ||
* version : 22.2.12 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-schedule@*", | ||
"_id": "@syncfusion/ej2-schedule@22.2.8", | ||
"_id": "@syncfusion/ej2-schedule@22.2.11", | ||
"_inBundle": false, | ||
"_integrity": "sha512-Kx0CfzH9nk0XZaYgJGZpQXWGCWARyl7WB9pF2s8F7U749gjOQ/9T/+jYXY/9ViAcoH0YKgy1LsvCy1fl2Pa6cQ==", | ||
"_integrity": "sha512-f2u5jsuLDc7QiGNWzKJgamDYPya3eP8kUqK3cMWRxg6Kae0ye9vz0UeB5H9dzuGJ9HnuiFMjYAQnPlqBgIjcMQ==", | ||
"_location": "/@syncfusion/ej2-schedule", | ||
@@ -26,4 +26,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-22.2.8.tgz", | ||
"_shasum": "d4abd42dfb2c617501dbb6a65a870fd9e915774e", | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-22.2.11.tgz", | ||
"_shasum": "c9ed2e7b2272b7c886b7dfd771a7bb7fd0e910e1", | ||
"_spec": "@syncfusion/ej2-schedule@*", | ||
@@ -39,9 +39,9 @@ "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~22.2.10", | ||
"@syncfusion/ej2-base": "~22.2.12", | ||
"@syncfusion/ej2-buttons": "~22.2.9", | ||
"@syncfusion/ej2-calendars": "~22.2.11", | ||
"@syncfusion/ej2-calendars": "~22.2.12", | ||
"@syncfusion/ej2-data": "~22.2.5", | ||
"@syncfusion/ej2-dropdowns": "~22.2.11", | ||
"@syncfusion/ej2-dropdowns": "~22.2.12", | ||
"@syncfusion/ej2-excel-export": "~22.2.5", | ||
"@syncfusion/ej2-inputs": "~22.2.9", | ||
"@syncfusion/ej2-inputs": "~22.2.12", | ||
"@syncfusion/ej2-lists": "~22.2.11", | ||
@@ -78,4 +78,4 @@ "@syncfusion/ej2-navigations": "~22.2.11", | ||
"typings": "index.d.ts", | ||
"version": "22.2.11", | ||
"version": "22.2.12", | ||
"sideEffects": false | ||
} |
@@ -26,7 +26,6 @@ import { L10n } from '@syncfusion/ej2-base'; | ||
* @param {CalendarType} calendarMode Accepts the calendar type | ||
* @param {string} oldTimezone Accepts the timezone name | ||
* @param {string} newTimezone Accepts the timezone name | ||
* @returns {number[]} Returns the collection of dates | ||
*/ | ||
export declare function generate(startDate: Date, rule: string, excludeDate: string, startDayOfWeek: number, maximumCount?: number, viewDate?: Date, calendarMode?: CalendarType, oldTimezone?: string, newTimezone?: string): number[]; | ||
export declare function generate(startDate: Date, rule: string, excludeDate: string, startDayOfWeek: number, maximumCount?: number, viewDate?: Date, calendarMode?: CalendarType, newTimezone?: string): number[]; | ||
/** | ||
@@ -33,0 +32,0 @@ * Generate date object from given date string |
@@ -232,3 +232,3 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base'; | ||
* ``` | ||
*/ | ||
*/ | ||
export declare type EndType = 'never' | 'until' | 'count'; |
@@ -341,3 +341,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
var args = { | ||
requestType: action === 'EditOccurrence' ? 'eventChange' : 'eventRemove', cancel: false, | ||
requestType: action === 'EditOccurrence' ? 'eventChange' : 'eventRemove', | ||
cancel: false, | ||
addedRecords: [], changedRecords: updateEvents, deletedRecords: [] | ||
@@ -653,2 +654,6 @@ }; | ||
Crud.prototype.excludeDateCheck = function (eventStartTime, exceptionDateList) { | ||
var timezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName(); | ||
if (timezone) { | ||
eventStartTime = this.parent.tzModule.remove(new Date(+eventStartTime.getTime()), timezone); | ||
} | ||
var exDate = getRecurrenceStringFromDate(eventStartTime); | ||
@@ -655,0 +660,0 @@ if (!isNullOrUndefined(exceptionDateList)) { |
@@ -214,2 +214,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
var target = closest(e.target, queryStr); | ||
var selectedCells = this.parent.getSelectedCells(); | ||
if (this.parent.activeViewOptions.group.resources.length > 0 && selectedCells.length > 0 && | ||
selectedCells[0].getAttribute('data-group-index') !== target.getAttribute('data-group-index')) { | ||
target = selectedCells[selectedCells.length - 1]; | ||
} | ||
if (this.parent.currentView === 'TimelineYear' && target.classList.contains(cls.OTHERMONTH_CLASS)) { | ||
@@ -223,3 +228,2 @@ return; | ||
} | ||
var selectedCells = this.parent.getSelectedCells(); | ||
var args = { | ||
@@ -226,0 +230,0 @@ data: cellData, element: this.parent.activeCellsData.element, event: e, |
@@ -179,2 +179,3 @@ /** | ||
* @private | ||
* @returns {void} | ||
*/ | ||
@@ -181,0 +182,0 @@ export declare function resetScrollbarWidth(): void; |
@@ -303,2 +303,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
* @private | ||
* @returns {void} | ||
*/ | ||
@@ -305,0 +306,0 @@ export function resetScrollbarWidth() { |
@@ -61,3 +61,3 @@ import { Predicate } from '@syncfusion/ej2-data'; | ||
private activeEventData; | ||
generateOccurrence(event: Record<string, any>, viewDate?: Date, oldTimezone?: string, isMaxCount?: boolean): Record<string, any>[]; | ||
generateOccurrence(event: Record<string, any>, viewDate?: Date, isMaxCount?: boolean): Record<string, any>[]; | ||
private getDSTAdjustedTime; | ||
@@ -64,0 +64,0 @@ private getDSTDiff; |
@@ -11,5 +11,6 @@ import { Schedule } from '../base/schedule'; | ||
private iCalendarParser; | ||
private updateEventData; | ||
private processOccurrence; | ||
private getExcludeDateString; | ||
private getDateString; | ||
private getFormattedString; | ||
private dateParsing; | ||
@@ -16,0 +17,0 @@ protected getModuleName(): string; |
@@ -27,112 +27,140 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
ICalendarImport.prototype.iCalendarParser = function (iCalString) { | ||
var _this = this; | ||
var fields = this.parent.eventFields; | ||
var events = []; | ||
var uId = 'UID'; | ||
var calArray = iCalString.replace(new RegExp('\\r', 'g'), '').split('\n'); | ||
var descriptionIndex = calArray.findIndex(function (line) { return line.startsWith('DESCRIPTION:'); }); | ||
if (descriptionIndex !== -1) { | ||
var description = calArray[descriptionIndex].substring('DESCRIPTION:'.length); | ||
for (var i = descriptionIndex + 1; i < calArray.length; i++) { | ||
if (calArray[i].startsWith(' ') || !(/[A-Z]{3}:/.test(calArray[i]))) { | ||
description += calArray[i]; | ||
var iCalData = { | ||
isEvent: false, | ||
curEvent: null, | ||
id: this.parent.eventBase.getEventMaxID(), | ||
count: 0, | ||
events: [], | ||
key: null | ||
}; | ||
var iStringLength = iCalString.length; | ||
var lastPosition = iCalString.search(/[^ \t]/); | ||
var position = lastPosition; | ||
var iString; | ||
var newlineOffset; | ||
do { | ||
position = iCalString.indexOf('\n', lastPosition) + 1; | ||
if (position === 0) { | ||
position = iStringLength; | ||
newlineOffset = 0; | ||
} | ||
else if (position > 1 && iCalString[position - 2] === '\r') { | ||
newlineOffset = 2; | ||
} | ||
else { | ||
newlineOffset = 1; | ||
} | ||
// eslint-disable-next-line security/detect-object-injection | ||
var firstChar = iCalString[lastPosition]; | ||
if (firstChar === ' ' || firstChar === '\n' || firstChar === '\t') { | ||
iString += iCalString.slice(lastPosition + 1, position - newlineOffset); | ||
} | ||
else { | ||
if (iString) { | ||
iCalData = this.updateEventData(iString, iCalData); | ||
} | ||
else { | ||
calArray[descriptionIndex] = 'DESCRIPTION:' + description; | ||
break; | ||
} | ||
iString = iCalString.slice(lastPosition, position - newlineOffset); | ||
} | ||
lastPosition = position; | ||
} while (position !== iStringLength); | ||
iString = iString.trim(); | ||
if (iString.length) { | ||
iCalData = this.updateEventData(iString, iCalData); | ||
} | ||
var isEvent = false; | ||
var curEvent; | ||
// eslint-disable-next-line prefer-const | ||
var id = this.parent.eventBase.getEventMaxID(); | ||
var count = 0; | ||
calArray.forEach(function (element) { | ||
var index; | ||
var type; | ||
var value; | ||
if (!isEvent && element === 'BEGIN:VEVENT') { | ||
isEvent = true; | ||
curEvent = {}; | ||
var app = extend([], iCalData.events, null, true); | ||
this.parent.addEvent(this.processOccurrence(app, iCalData.id)); | ||
}; | ||
ICalendarImport.prototype.updateEventData = function (iString, iCalData) { | ||
var fields = this.parent.eventFields; | ||
var SEPARATOR = '\r\n'; | ||
var id = iCalData.id; | ||
var events = iCalData.events; | ||
var isEvent = iCalData.isEvent; | ||
var count = iCalData.count; | ||
var curEvent = iCalData.curEvent; | ||
var key = iCalData.key; | ||
if (!isEvent && iString === 'BEGIN:VEVENT') { | ||
isEvent = true; | ||
curEvent = {}; | ||
} | ||
if (isEvent && iString === 'END:VEVENT') { | ||
isEvent = false; | ||
events.push(curEvent); | ||
curEvent = null; | ||
} | ||
if (isEvent) { | ||
var index = iString.indexOf(':'); | ||
var type_1 = iString.substring(0, index).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); | ||
var value = iString.substring(index + 1, iString.length).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); | ||
if (iString.indexOf('SUMMARY') !== -1) { | ||
type_1 = 'SUMMARY'; | ||
} | ||
if (isEvent && element === 'END:VEVENT') { | ||
isEvent = false; | ||
events.push(curEvent); | ||
curEvent = null; | ||
if (iString.indexOf('DTSTART') !== -1) { | ||
curEvent[fields.startTime] = this.dateParsing(iString); | ||
curEvent[fields.isAllDay] = this.allDay; | ||
this.allDay = false; | ||
} | ||
if (isEvent) { | ||
index = element.indexOf(':'); | ||
type = element.substr(0, index).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); | ||
value = element.substr(index + 1, element.length - (index + 1)).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); | ||
if (element.indexOf('SUMMARY') !== -1) { | ||
type = 'SUMMARY'; | ||
} | ||
if (element.indexOf('DTSTART') !== -1) { | ||
curEvent[fields.startTime] = _this.dateParsing(element); | ||
curEvent[fields.isAllDay] = _this.allDay; | ||
_this.allDay = false; | ||
} | ||
else if (element.indexOf('DTEND') !== -1) { | ||
curEvent[fields.endTime] = _this.dateParsing(element); | ||
} | ||
else if (element.indexOf('EXDATE') !== -1) { | ||
value = getRecurrenceStringFromDate(_this.dateParsing(element)); | ||
curEvent[fields.recurrenceException] = (isNullOrUndefined(curEvent[fields.recurrenceException])) ? | ||
value : curEvent[fields.recurrenceException] + ',' + value; | ||
} | ||
else if (element.indexOf('RECURRENCE-ID') !== -1) { | ||
value = getRecurrenceStringFromDate(_this.dateParsing(element)); | ||
curEvent[fields.recurrenceException] = value; | ||
curEvent[fields.recurrenceID] = value; | ||
} | ||
else { | ||
switch (type) { | ||
case 'BEGIN': | ||
break; | ||
case 'UID': | ||
curEvent["" + uId] = value; | ||
if (typeof (id) == 'number') { | ||
curEvent[fields.id] = parseInt(value, 10); | ||
if (isNaN(curEvent[fields.id])) { | ||
curEvent[fields.id] = id + count; | ||
count++; | ||
} | ||
else if (iString.indexOf('DTEND') !== -1) { | ||
curEvent[fields.endTime] = this.dateParsing(iString); | ||
} | ||
else if (iString.indexOf('EXDATE') !== -1) { | ||
value = getRecurrenceStringFromDate(this.dateParsing(iString)); | ||
curEvent[fields.recurrenceException] = isNullOrUndefined(curEvent[fields.recurrenceException]) ? | ||
value : curEvent[fields.recurrenceException] + ',' + value; | ||
} | ||
else if (iString.indexOf('RECURRENCE-ID') !== -1) { | ||
value = getRecurrenceStringFromDate(this.dateParsing(iString)); | ||
curEvent[fields.recurrenceException] = value; | ||
curEvent[fields.recurrenceID] = value; | ||
} | ||
else { | ||
key = type_1 || key; | ||
switch (key) { | ||
case 'BEGIN': | ||
break; | ||
case 'UID': | ||
curEvent["" + type_1] = value; | ||
if (typeof (id) == 'number') { | ||
curEvent[fields.id] = parseInt(value, 10); | ||
if (isNaN(curEvent[fields.id])) { | ||
curEvent[fields.id] = id + count; | ||
count++; | ||
} | ||
else { | ||
curEvent[fields.id] = value; | ||
} | ||
break; | ||
case 'SUMMARY': | ||
curEvent[fields.subject] = value; | ||
break; | ||
case 'LOCATION': | ||
curEvent[fields.location] = value; | ||
break; | ||
case 'DESCRIPTION': | ||
if (!(curEvent[fields.description])) { | ||
curEvent[fields.description] = value.replace(/\\,/g, ',') | ||
.replace(/\\n/g, '\n'); | ||
} | ||
break; | ||
case 'ISREADONLY': | ||
curEvent[fields.isReadonly] = (value.indexOf('true') > -1); | ||
break; | ||
case 'RRULE': | ||
curEvent[fields.recurrenceRule] = value; | ||
break; | ||
default: | ||
if (_this.parent.resourceCollection.length > 0) { | ||
var resData = _this.parent.resourceCollection.filter(function (data) { return data.field === type; }); | ||
curEvent["" + type] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value; | ||
} | ||
else { | ||
curEvent["" + type] = value; | ||
} | ||
} | ||
} | ||
else { | ||
curEvent[fields.id] = value; | ||
} | ||
break; | ||
case 'SUMMARY': | ||
curEvent[fields.subject] = this.getFormattedString(value); | ||
break; | ||
case 'LOCATION': | ||
curEvent[fields.location] = this.getFormattedString(value); | ||
break; | ||
case 'DESCRIPTION': | ||
if (curEvent[fields.description]) { | ||
curEvent[fields.description] = this.getFormattedString(curEvent[fields.description] + SEPARATOR + value); | ||
} | ||
else { | ||
curEvent[fields.description] = this.getFormattedString(value); | ||
} | ||
break; | ||
case 'ISREADONLY': | ||
curEvent[fields.isReadonly] = (value.indexOf('true') > -1); | ||
break; | ||
case 'RRULE': | ||
curEvent[fields.recurrenceRule] = value; | ||
break; | ||
default: | ||
if (this.parent.resourceCollection.length > 0) { | ||
var resData = this.parent.resourceCollection.filter(function (data) { return data.field === type_1; }); | ||
curEvent["" + type_1] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value; | ||
} | ||
else { | ||
curEvent["" + type_1] = value; | ||
} | ||
} | ||
} | ||
}); | ||
var app = extend([], events, null, true); | ||
this.parent.addEvent(this.processOccurrence(app, id)); | ||
} | ||
return { isEvent: isEvent, curEvent: curEvent, id: id, count: count, events: events, key: key }; | ||
}; | ||
@@ -202,3 +230,3 @@ ICalendarImport.prototype.processOccurrence = function (app, maxId) { | ||
}; | ||
ICalendarImport.prototype.getDateString = function (value) { | ||
ICalendarImport.prototype.getFormattedString = function (value) { | ||
value = value || ''; | ||
@@ -211,3 +239,3 @@ // eslint-disable-next-line no-useless-escape | ||
var value = split[split.length - 1]; | ||
var newDate = new Date(this.getDateString(value)); | ||
var newDate = new Date(this.getFormattedString(value)); | ||
if (element && (element.indexOf('VALUE=DATE') > -1 || element.indexOf('RECURRENCE-ID;TZID') > -1)) { | ||
@@ -214,0 +242,0 @@ var data_1 = /^(\d{4})(\d{2})(\d{2})$/.exec(value); |
@@ -158,4 +158,7 @@ var __extends = (this && this.__extends) || (function () { | ||
if (currentDateIndex[0] !== 0) { | ||
if (this.parent.activeView.colLevels[0] && this.parent.activeView.colLevels[0][0].colSpan) { | ||
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[0][0].colSpan * this.getWorkCellWidth(); | ||
var index = this.parent.activeView.colLevels.findIndex(function (level) { return level[0].type === 'dateHeader'; }); | ||
if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] && | ||
this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) { | ||
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan * | ||
this.getWorkCellWidth(); | ||
} | ||
@@ -162,0 +165,0 @@ else { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21638160
251856