@syncfusion/ej2-schedule 21.1.39 → 21.2.3
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 +13 -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 +45 -26
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +46 -27
- 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 +16 -19
- package/src/schedule/actions/action-base.js +7 -1
- package/src/schedule/actions/drag.js +6 -4
- package/src/schedule/base/resource.js +1 -1
- package/src/schedule/base/schedule.d.ts +4 -3
- package/src/schedule/base/schedule.js +8 -5
- package/src/schedule/event-renderer/agenda-base.js +2 -2
- package/src/schedule/event-renderer/event-base.js +1 -1
- package/src/schedule/event-renderer/month.js +2 -2
- package/src/schedule/event-renderer/vertical-view.js +2 -2
- package/src/schedule/popups/event-window.js +11 -3
- package/src/schedule/popups/quick-popups.js +5 -5
- package/src/schedule/renderer/renderer.js +1 -1
- package/src/schedule/renderer/view-base.js +1 -1
|
@@ -6358,7 +6358,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6358
6358
|
}
|
|
6359
6359
|
else {
|
|
6360
6360
|
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6361
|
-
|
|
6361
|
+
this.parent.sanitize(eventSubject, appointmentSubject);
|
|
6362
6362
|
templateElement = [appointmentSubject];
|
|
6363
6363
|
}
|
|
6364
6364
|
append(templateElement, appointmentWrapper);
|
|
@@ -6919,7 +6919,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6919
6919
|
}
|
|
6920
6920
|
else {
|
|
6921
6921
|
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6922
|
-
|
|
6922
|
+
this.parent.sanitize(recordSubject, appointmentSubject);
|
|
6923
6923
|
if (isAllDay) {
|
|
6924
6924
|
if (record[fieldMapping.isAllDay]) {
|
|
6925
6925
|
templateElement = [appointmentSubject];
|
|
@@ -6952,7 +6952,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6952
6952
|
innerHTML: timeStr
|
|
6953
6953
|
});
|
|
6954
6954
|
var appointmentLocation = createElement('div', { className: LOCATION_CLASS });
|
|
6955
|
-
|
|
6955
|
+
this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''), appointmentLocation);
|
|
6956
6956
|
templateElement = [appointmentSubject, appointmentTime, appointmentLocation];
|
|
6957
6957
|
}
|
|
6958
6958
|
}
|
|
@@ -7839,7 +7839,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7839
7839
|
else {
|
|
7840
7840
|
var eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
|
|
7841
7841
|
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
7842
|
-
|
|
7842
|
+
this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')), appointmentSubject);
|
|
7843
7843
|
var appointmentStartTime = createElement('div', {
|
|
7844
7844
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
|
|
7845
7845
|
innerHTML: this.parent.getTimeString(eventData[this.fields.startTime])
|
|
@@ -7883,7 +7883,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7883
7883
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''), innerHTML: timeString
|
|
7884
7884
|
});
|
|
7885
7885
|
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
7886
|
-
|
|
7886
|
+
this.parent.sanitize(eventLocation, appLocation);
|
|
7887
7887
|
innerElement = [appointmentSubject, appTime, appLocation];
|
|
7888
7888
|
}
|
|
7889
7889
|
var wrap = createElement('div', { className: 'e-inner-wrap' });
|
|
@@ -9337,7 +9337,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9337
9337
|
}
|
|
9338
9338
|
else {
|
|
9339
9339
|
appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS }));
|
|
9340
|
-
|
|
9340
|
+
this_1.parent.sanitize(eventText, appointmentElement.firstElementChild);
|
|
9341
9341
|
}
|
|
9342
9342
|
if (!isNullOrUndefined(groupIndex)) {
|
|
9343
9343
|
appointmentElement.setAttribute('data-group-index', groupIndex);
|
|
@@ -9597,7 +9597,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9597
9597
|
var templateWrapper = createElement('div', { innerHTML: header });
|
|
9598
9598
|
if (headerType === 'Event') {
|
|
9599
9599
|
var subjectText = templateWrapper.querySelector('.' + SUBJECT_CLASS);
|
|
9600
|
-
|
|
9600
|
+
this.parent.sanitize(args.eventSubject, subjectText);
|
|
9601
9601
|
}
|
|
9602
9602
|
append([].slice.call(templateWrapper.childNodes), headerTemplate);
|
|
9603
9603
|
}
|
|
@@ -9661,19 +9661,19 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9661
9661
|
if (data[this.parent.eventFields.location]) {
|
|
9662
9662
|
var locationDetails = templateWrapper.querySelector('.' + LOCATION_DETAILS_CLASS);
|
|
9663
9663
|
if (!isNullOrUndefined(locationDetails)) {
|
|
9664
|
-
|
|
9664
|
+
this.parent.sanitize(data[this.parent.eventFields.location], locationDetails);
|
|
9665
9665
|
}
|
|
9666
9666
|
}
|
|
9667
9667
|
if (data[this.parent.eventFields.description]) {
|
|
9668
9668
|
var descriptionDetails = templateWrapper.querySelector('.' + DESCRIPTION_DETAILS_CLASS);
|
|
9669
9669
|
if (!isNullOrUndefined(descriptionDetails)) {
|
|
9670
|
-
|
|
9670
|
+
this.parent.sanitize(data[this.parent.eventFields.description], descriptionDetails);
|
|
9671
9671
|
}
|
|
9672
9672
|
}
|
|
9673
9673
|
if (resourceText) {
|
|
9674
9674
|
var resourceDetails = templateWrapper.querySelector('.' + RESOURCE_DETAILS_CLASS);
|
|
9675
9675
|
if (!isNullOrUndefined(resourceDetails)) {
|
|
9676
|
-
|
|
9676
|
+
this.parent.sanitize(resourceText, resourceDetails);
|
|
9677
9677
|
}
|
|
9678
9678
|
}
|
|
9679
9679
|
append([].slice.call(templateWrapper.childNodes), contentTemplate);
|
|
@@ -11956,6 +11956,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11956
11956
|
var element = formElements_1[_i];
|
|
11957
11957
|
remove(element);
|
|
11958
11958
|
}
|
|
11959
|
+
this.parent.resetTemplates(['editorTemplate']);
|
|
11959
11960
|
}
|
|
11960
11961
|
var templateId = this.parent.element.id + '_editorTemplate';
|
|
11961
11962
|
var tempEle = [].slice.call(this.parent.getEditorTemplate()(args || {}, this.parent, 'editorTemplate', templateId, false));
|
|
@@ -12530,10 +12531,13 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12530
12531
|
}
|
|
12531
12532
|
};
|
|
12532
12533
|
EventWindow.prototype.applyFormValidation = function () {
|
|
12534
|
+
var form = this.element.querySelector('.' + FORM_CLASS);
|
|
12535
|
+
if (!form) {
|
|
12536
|
+
return;
|
|
12537
|
+
}
|
|
12533
12538
|
var getValidationRule = function (rules) {
|
|
12534
12539
|
return (rules && Object.keys(rules).length > 0) ? rules : undefined;
|
|
12535
12540
|
};
|
|
12536
|
-
var form = this.element.querySelector('.' + FORM_CLASS);
|
|
12537
12541
|
var rules = {};
|
|
12538
12542
|
var subjectRule = getValidationRule(this.parent.eventSettings.fields.subject.validation);
|
|
12539
12543
|
if (!isNullOrUndefined(subjectRule)) {
|
|
@@ -13364,7 +13368,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13364
13368
|
value = element.checked;
|
|
13365
13369
|
}
|
|
13366
13370
|
else {
|
|
13367
|
-
value = this.parent.
|
|
13371
|
+
value = this.parent.enableHtmlSanitizer ?
|
|
13372
|
+
SanitizeHtmlHelper.sanitize(element.value) : element.value;
|
|
13368
13373
|
}
|
|
13369
13374
|
}
|
|
13370
13375
|
return value;
|
|
@@ -13509,6 +13514,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13509
13514
|
else if (element.classList.contains('e-multiselect')) {
|
|
13510
13515
|
instance = element.ej2_instances;
|
|
13511
13516
|
}
|
|
13517
|
+
else if (element.classList.contains('e-numerictextbox')) {
|
|
13518
|
+
instance = element.ej2_instances;
|
|
13519
|
+
}
|
|
13512
13520
|
if (instance && instance[0]) {
|
|
13513
13521
|
instance[0].destroy();
|
|
13514
13522
|
}
|
|
@@ -14061,7 +14069,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
14061
14069
|
this.parent.virtualScrollModule.destroy();
|
|
14062
14070
|
this.parent.virtualScrollModule = null;
|
|
14063
14071
|
}
|
|
14064
|
-
if ((['Agenda', 'Year'].indexOf(this.parent.currentView) === -1 ||
|
|
14072
|
+
if ((['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.parent.currentView) === -1 ||
|
|
14065
14073
|
(this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.orientation === 'Vertical'))
|
|
14066
14074
|
&& this.parent.activeViewOptions.allowVirtualScrolling
|
|
14067
14075
|
&& this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
@@ -15887,7 +15895,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15887
15895
|
return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
|
|
15888
15896
|
});
|
|
15889
15897
|
var resourceName = createElement('div', { className: RESOURCE_NAME });
|
|
15890
|
-
|
|
15898
|
+
this_2.parent.sanitize(resourceText[0][resourceLevel.textField], resourceName);
|
|
15891
15899
|
headerCollection.push(resourceName);
|
|
15892
15900
|
var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });
|
|
15893
15901
|
headerCollection.push(levelIcon);
|
|
@@ -16692,17 +16700,20 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16692
16700
|
}
|
|
16693
16701
|
};
|
|
16694
16702
|
/**
|
|
16695
|
-
*
|
|
16703
|
+
* This method renders untrusted strings and scripts securely by sanitizing them first.
|
|
16696
16704
|
*
|
|
16697
16705
|
* @param {string} value - A string value representing the HTML string value to be sanitized.
|
|
16698
|
-
* @
|
|
16706
|
+
* @param {HTMLElement} element - An HTML element to which the sanitized or unsanitized HTML string will be assigned.
|
|
16707
|
+
* @returns {void}
|
|
16699
16708
|
* @private
|
|
16700
16709
|
*/
|
|
16701
|
-
Schedule.prototype.sanitize = function (value) {
|
|
16710
|
+
Schedule.prototype.sanitize = function (value, element) {
|
|
16702
16711
|
if (this.enableHtmlSanitizer) {
|
|
16703
|
-
|
|
16712
|
+
element.innerText = SanitizeHtmlHelper.sanitize(value);
|
|
16713
|
+
}
|
|
16714
|
+
else {
|
|
16715
|
+
element.innerHTML = value;
|
|
16704
16716
|
}
|
|
16705
|
-
return value;
|
|
16706
16717
|
};
|
|
16707
16718
|
Schedule.prototype.initializeResources = function (isSetModel) {
|
|
16708
16719
|
if (isSetModel === void 0) { isSetModel = false; }
|
|
@@ -19814,6 +19825,9 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19814
19825
|
};
|
|
19815
19826
|
ActionBase.prototype.dynamicYearlyEventsRendering = function (event, isResize) {
|
|
19816
19827
|
if (isResize === void 0) { isResize = false; }
|
|
19828
|
+
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
19829
|
+
return;
|
|
19830
|
+
}
|
|
19817
19831
|
var appWidth = this.actionObj.cellWidth - 7;
|
|
19818
19832
|
if (isResize && (this.resizeEdges.left || this.resizeEdges.right)) {
|
|
19819
19833
|
appWidth = this.actionObj.cellWidth * event.count;
|
|
@@ -19885,6 +19899,9 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19885
19899
|
};
|
|
19886
19900
|
ActionBase.prototype.dynamicEventsRendering = function (event) {
|
|
19887
19901
|
var _this = this;
|
|
19902
|
+
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
19903
|
+
return;
|
|
19904
|
+
}
|
|
19888
19905
|
var dateRender = this.parent.activeView.renderDates;
|
|
19889
19906
|
var workCells = [].slice.call(this.parent.element.querySelectorAll('.' + WORK_CELLS_CLASS));
|
|
19890
19907
|
var workDays = this.parent.activeViewOptions.workDays;
|
|
@@ -19921,7 +19938,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19921
19938
|
this.monthEvent.applyResourceColor(appointmentElement, event_1, 'backgroundColor', groupOrder);
|
|
19922
19939
|
setStyleAttribute(appointmentElement, { 'width': appWidth + 'px', 'border': '0px', 'pointer-events': 'none' });
|
|
19923
19940
|
var cellTd = workCells[parseInt(day.toString(), 10)];
|
|
19924
|
-
if (cellTd
|
|
19941
|
+
if (cellTd) {
|
|
19925
19942
|
this.monthEvent.renderElement(cellTd, appointmentElement, true);
|
|
19926
19943
|
this.actionObj.cloneElement.push(appointmentElement);
|
|
19927
19944
|
}
|
|
@@ -22096,10 +22113,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22096
22113
|
}
|
|
22097
22114
|
}
|
|
22098
22115
|
var event = this.getUpdatedEvent(this.actionObj.start, this.actionObj.end, this.actionObj.event);
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
var
|
|
22102
|
-
|
|
22116
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22117
|
+
var eventWrappers = [].slice.call(this.parent.element.querySelectorAll('.' + CLONE_ELEMENT_CLASS));
|
|
22118
|
+
for (var _i = 0, eventWrappers_1 = eventWrappers; _i < eventWrappers_1.length; _i++) {
|
|
22119
|
+
var wrapper = eventWrappers_1[_i];
|
|
22120
|
+
remove(wrapper);
|
|
22121
|
+
}
|
|
22103
22122
|
}
|
|
22104
22123
|
if (this.multiData && this.multiData.length > 0) {
|
|
22105
22124
|
var startTime = resetTime(new Date(event[this.parent.eventFields.startTime]));
|
|
@@ -22883,7 +22902,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22883
22902
|
}
|
|
22884
22903
|
else {
|
|
22885
22904
|
var resourceText = createElement('div', { className: className });
|
|
22886
|
-
|
|
22905
|
+
this.parent.sanitize(tdData.resourceData[tdData.resource.textField], resourceText);
|
|
22887
22906
|
tdElement.appendChild(resourceText);
|
|
22888
22907
|
}
|
|
22889
22908
|
};
|
|
@@ -25265,11 +25284,11 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
25265
25284
|
eventSubject += ',';
|
|
25266
25285
|
}
|
|
25267
25286
|
var appSubjectText = createElement('div', { className: SUBJECT_CLASS });
|
|
25268
|
-
|
|
25287
|
+
this.parent.sanitize(eventSubject, appSubjectText);
|
|
25269
25288
|
appSubjectWrap.appendChild(appSubjectText);
|
|
25270
25289
|
if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
|
|
25271
25290
|
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
25272
|
-
|
|
25291
|
+
this.parent.sanitize(eventLocation, appLocation);
|
|
25273
25292
|
appSubjectWrap.appendChild(appLocation);
|
|
25274
25293
|
}
|
|
25275
25294
|
if (!isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
|