@syncfusion/ej2-schedule 20.4.53 → 21.1.37
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 +18 -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 +339 -144
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +374 -165
- 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 -16
- package/src/common/calendar-util.d.ts +7 -0
- package/src/recurrence-editor/recurrence-editor.d.ts +10 -0
- package/src/schedule/actions/action-base.js +5 -0
- package/src/schedule/actions/crud.js +1 -0
- package/src/schedule/actions/data.d.ts +14 -2
- package/src/schedule/actions/data.js +26 -2
- package/src/schedule/actions/keyboard.js +15 -14
- package/src/schedule/base/interface.d.ts +23 -23
- package/src/schedule/base/resource.js +5 -6
- package/src/schedule/base/schedule-model.d.ts +34 -27
- package/src/schedule/base/schedule.d.ts +50 -27
- package/src/schedule/base/schedule.js +44 -8
- package/src/schedule/base/type.d.ts +66 -1
- package/src/schedule/event-renderer/agenda-base.js +6 -2
- package/src/schedule/event-renderer/event-base.d.ts +2 -1
- package/src/schedule/event-renderer/event-base.js +34 -13
- package/src/schedule/event-renderer/month.js +4 -5
- package/src/schedule/event-renderer/vertical-view.d.ts +0 -1
- package/src/schedule/event-renderer/vertical-view.js +6 -30
- package/src/schedule/event-renderer/year.d.ts +1 -0
- package/src/schedule/event-renderer/year.js +135 -54
- package/src/schedule/models/event-settings-model.d.ts +11 -2
- package/src/schedule/models/event-settings.d.ts +10 -2
- package/src/schedule/models/event-settings.js +3 -0
- package/src/schedule/models/fields-model.d.ts +4 -2
- package/src/schedule/models/fields.d.ts +6 -4
- package/src/schedule/models/fields.js +2 -2
- package/src/schedule/models/header-rows-model.d.ts +5 -5
- package/src/schedule/models/header-rows.d.ts +5 -5
- package/src/schedule/models/quick-info-templates-model.d.ts +3 -3
- package/src/schedule/models/quick-info-templates.d.ts +3 -3
- package/src/schedule/models/views-model.d.ts +16 -15
- package/src/schedule/models/views.d.ts +16 -15
- package/src/schedule/popups/event-tooltip.js +2 -1
- package/src/schedule/popups/event-window.js +26 -5
- package/src/schedule/popups/quick-popups.js +32 -10
- package/src/schedule/renderer/header-renderer.js +1 -0
- package/src/schedule/renderer/month-agenda.d.ts +3 -2
- package/src/schedule/renderer/month-agenda.js +5 -0
- package/src/schedule/renderer/month.d.ts +1 -0
- package/src/schedule/renderer/month.js +5 -3
- package/src/schedule/renderer/timeline-year.js +12 -8
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/view-base.js +3 -4
- package/src/schedule/renderer/year.js +5 -1
- package/styles/bootstrap-dark.css +99 -89
- package/styles/bootstrap.css +99 -89
- package/styles/bootstrap4.css +99 -89
- package/styles/bootstrap5-dark.css +110 -100
- package/styles/bootstrap5.css +110 -100
- package/styles/fabric-dark.css +98 -88
- package/styles/fabric.css +98 -88
- package/styles/fluent-dark.css +109 -99
- package/styles/fluent.css +109 -99
- package/styles/highcontrast-light.css +98 -88
- package/styles/highcontrast.css +98 -88
- package/styles/material-dark.css +98 -88
- package/styles/material.css +98 -88
- package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -1
- package/styles/recurrence-editor/_fluent-definition.scss +1 -1
- package/styles/recurrence-editor/_tailwind-definition.scss +1 -1
- package/styles/schedule/_bootstrap-dark-definition.scss +8 -1
- package/styles/schedule/_bootstrap-definition.scss +8 -1
- package/styles/schedule/_bootstrap4-definition.scss +7 -0
- package/styles/schedule/_bootstrap5-definition.scss +17 -10
- package/styles/schedule/_fabric-dark-definition.scss +7 -0
- package/styles/schedule/_fabric-definition.scss +7 -0
- package/styles/schedule/_fluent-definition.scss +15 -8
- package/styles/schedule/_fusionnew-definition.scss +7 -0
- package/styles/schedule/_highcontrast-definition.scss +7 -0
- package/styles/schedule/_highcontrast-light-definition.scss +7 -0
- package/styles/schedule/_layout.scss +63 -48
- package/styles/schedule/_material-dark-definition.scss +7 -0
- package/styles/schedule/_material-definition.scss +7 -0
- package/styles/schedule/_tailwind-definition.scss +17 -10
- package/styles/schedule/_theme.scss +40 -41
- package/styles/schedule/bootstrap-dark.css +99 -89
- package/styles/schedule/bootstrap.css +99 -89
- package/styles/schedule/bootstrap4.css +99 -89
- package/styles/schedule/bootstrap5-dark.css +110 -100
- package/styles/schedule/bootstrap5.css +110 -100
- package/styles/schedule/fabric-dark.css +98 -88
- package/styles/schedule/fabric.css +98 -88
- package/styles/schedule/fluent-dark.css +109 -99
- package/styles/schedule/fluent.css +109 -99
- package/styles/schedule/highcontrast-light.css +98 -88
- package/styles/schedule/highcontrast.css +98 -88
- package/styles/schedule/material-dark.css +98 -88
- package/styles/schedule/material.css +98 -88
- package/styles/schedule/tailwind-dark.css +106 -96
- package/styles/schedule/tailwind.css +106 -96
- package/styles/tailwind-dark.css +106 -96
- package/styles/tailwind.css +106 -96
- package/styles/recurrence-editor/_material3-definition.scss +0 -13
- package/styles/schedule/_material3-definition.scss +0 -283
|
@@ -1023,6 +1023,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
|
|
|
1023
1023
|
overflowMode: 'Popup',
|
|
1024
1024
|
clicked: _this.toolbarClickHandler.bind(_this),
|
|
1025
1025
|
enableRtl: _this.parent.enableRtl,
|
|
1026
|
+
enableHtmlSanitizer: _this.parent.enableHtmlSanitizer,
|
|
1026
1027
|
locale: _this.parent.locale
|
|
1027
1028
|
});
|
|
1028
1029
|
_this.toolbarObj.appendTo(_this.parent.element.querySelector('.' + HEADER_TOOLBAR));
|
|
@@ -2285,15 +2286,16 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2285
2286
|
var args = {
|
|
2286
2287
|
element: target, requestType: cellSelect
|
|
2287
2288
|
};
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2289
|
+
// activeCellsData is not reset on schedule property changed(group properties)
|
|
2290
|
+
// const cellData: Record<string, any> = {};
|
|
2291
|
+
// const cellDetails: CellClickEventArgs = this.parent.getCellDetails(target);
|
|
2292
|
+
// if (this.parent.eventWindow && cellDetails) {
|
|
2293
|
+
// if (this.parent.activeCellsData.element !== cellDetails.element) {
|
|
2294
|
+
// this.parent.activeCellsData = cellDetails;
|
|
2295
|
+
// }
|
|
2296
|
+
// this.parent.eventWindow.convertToEventData(this.parent.activeCellsData as unknown as Record<string, any>, cellData);
|
|
2297
|
+
// args.data = cellData;
|
|
2298
|
+
// }
|
|
2297
2299
|
this.parent.trigger(select, args, function () {
|
|
2298
2300
|
_this.initialTarget = target;
|
|
2299
2301
|
_this.selectedCells = [target];
|
|
@@ -2316,7 +2318,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2316
2318
|
nextAppEle = isReverse ? appointments[appointments.length - 1] : appointments[0];
|
|
2317
2319
|
}
|
|
2318
2320
|
if (nextAppEle) {
|
|
2319
|
-
this.parent.eventBase.addSelectedAppointments([nextAppEle]);
|
|
2321
|
+
this.parent.eventBase.addSelectedAppointments([nextAppEle], true);
|
|
2320
2322
|
nextAppEle.focus();
|
|
2321
2323
|
addClass([nextAppEle], AGENDA_SELECTED_CELL);
|
|
2322
2324
|
}
|
|
@@ -2343,7 +2345,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2343
2345
|
if (filteredElements_1.length > 0) {
|
|
2344
2346
|
var selectedElement = isReverse ? filteredElements_1[filteredElements_1.length - 1] : filteredElements_1[0];
|
|
2345
2347
|
var focusElements = this.getAppointmentElementsByGuid(selectedElement.getAttribute('data-guid'));
|
|
2346
|
-
this.parent.eventBase.addSelectedAppointments(focusElements);
|
|
2348
|
+
this.parent.eventBase.addSelectedAppointments(focusElements, true);
|
|
2347
2349
|
(focusElements[focusElements.length - 1]).focus();
|
|
2348
2350
|
}
|
|
2349
2351
|
}
|
|
@@ -2802,7 +2804,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2802
2804
|
if (appElements.length > 0) {
|
|
2803
2805
|
this.parent.eventBase.removeSelectedAppointmentClass();
|
|
2804
2806
|
var focusAppointment = isReverse ? appElements.slice(-1)[0] : appElements[0];
|
|
2805
|
-
this.parent.eventBase.addSelectedAppointments([focusAppointment]);
|
|
2807
|
+
this.parent.eventBase.addSelectedAppointments([focusAppointment], true);
|
|
2806
2808
|
focusAppointment.focus();
|
|
2807
2809
|
e.preventDefault();
|
|
2808
2810
|
}
|
|
@@ -2904,7 +2906,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2904
2906
|
var nextAppEle = eventEle[0];
|
|
2905
2907
|
if (nextAppEle) {
|
|
2906
2908
|
this.parent.eventBase.removeSelectedAppointmentClass();
|
|
2907
|
-
this.parent.eventBase.addSelectedAppointments([nextAppEle]);
|
|
2909
|
+
this.parent.eventBase.addSelectedAppointments([nextAppEle], true);
|
|
2908
2910
|
nextAppEle.focus();
|
|
2909
2911
|
}
|
|
2910
2912
|
}
|
|
@@ -2916,7 +2918,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2916
2918
|
if (appElements.length > 0) {
|
|
2917
2919
|
this.parent.eventBase.removeSelectedAppointmentClass();
|
|
2918
2920
|
var focusAppointment = appElements[0];
|
|
2919
|
-
this.parent.eventBase.addSelectedAppointments([focusAppointment]);
|
|
2921
|
+
this.parent.eventBase.addSelectedAppointments([focusAppointment], true);
|
|
2920
2922
|
focusAppointment.focus();
|
|
2921
2923
|
e.preventDefault();
|
|
2922
2924
|
}
|
|
@@ -2997,11 +2999,13 @@ var Data = /** @__PURE__ @class */ (function () {
|
|
|
2997
2999
|
/**
|
|
2998
3000
|
* Constructor for data module
|
|
2999
3001
|
*
|
|
3002
|
+
* @param {Schedule} parent Accepts the schedule element instance
|
|
3000
3003
|
* @param {Object | DataManager} dataSource Accepts the datasource as JSON objects or DataManager
|
|
3001
3004
|
* @param {Query} query Accepts the query to process the data
|
|
3002
3005
|
* @private
|
|
3003
3006
|
*/
|
|
3004
|
-
function Data(dataSource, query) {
|
|
3007
|
+
function Data(parent, dataSource, query) {
|
|
3008
|
+
this.parent = parent;
|
|
3005
3009
|
this.initDataManager(dataSource, query);
|
|
3006
3010
|
}
|
|
3007
3011
|
/**
|
|
@@ -3026,6 +3030,11 @@ var Data = /** @__PURE__ @class */ (function () {
|
|
|
3026
3030
|
*/
|
|
3027
3031
|
Data.prototype.generateQuery = function (startDate, endDate) {
|
|
3028
3032
|
var query = this.query.clone();
|
|
3033
|
+
if (this.parent && this.parent.eventSettings.includeFiltersInQuery && startDate && endDate) {
|
|
3034
|
+
var dateQuery = this.getStartEndQuery(startDate, endDate);
|
|
3035
|
+
var recurrenceQuery = new Predicate(this.parent.eventFields.recurrenceRule, 'notequal', null).and(new Predicate(this.parent.eventFields.recurrenceRule, 'notequal', ''));
|
|
3036
|
+
return query.where(dateQuery.or(recurrenceQuery));
|
|
3037
|
+
}
|
|
3029
3038
|
if (startDate) {
|
|
3030
3039
|
query.addParams('StartDate', startDate.toISOString());
|
|
3031
3040
|
}
|
|
@@ -3034,6 +3043,23 @@ var Data = /** @__PURE__ @class */ (function () {
|
|
|
3034
3043
|
}
|
|
3035
3044
|
return query;
|
|
3036
3045
|
};
|
|
3046
|
+
/**
|
|
3047
|
+
* The function used to generate updated Query from schedule model
|
|
3048
|
+
*
|
|
3049
|
+
* @param {Date} startDate Accepts the start date
|
|
3050
|
+
* @param {Date} endDate Accepts the end date
|
|
3051
|
+
* @returns {void}
|
|
3052
|
+
* @private
|
|
3053
|
+
*/
|
|
3054
|
+
Data.prototype.getStartEndQuery = function (startDate, endDate) {
|
|
3055
|
+
var fieldMapping = this.parent.eventFields;
|
|
3056
|
+
var dateQuery = new Predicate(fieldMapping.startTime, 'greaterthanorequal', startDate)
|
|
3057
|
+
.and(new Predicate(fieldMapping.endTime, 'greaterthanorequal', startDate))
|
|
3058
|
+
.and(new Predicate(fieldMapping.startTime, 'lessthan', endDate))
|
|
3059
|
+
.or(new Predicate(fieldMapping.startTime, 'lessthanorequal', startDate)
|
|
3060
|
+
.and(new Predicate(fieldMapping.endTime, 'greaterthan', startDate)));
|
|
3061
|
+
return dateQuery;
|
|
3062
|
+
};
|
|
3037
3063
|
/**
|
|
3038
3064
|
* The function used to get dataSource by executing given Query
|
|
3039
3065
|
*
|
|
@@ -5450,12 +5476,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5450
5476
|
};
|
|
5451
5477
|
EventBase.prototype.filterEvents = function (startDate, endDate, appointments, resourceTdData) {
|
|
5452
5478
|
if (appointments === void 0) { appointments = this.parent.eventsProcessed; }
|
|
5453
|
-
var
|
|
5454
|
-
var predicate = new Predicate(fieldMapping.startTime, 'greaterthanorequal', startDate).
|
|
5455
|
-
and(new Predicate(fieldMapping.endTime, 'greaterthanorequal', startDate)).
|
|
5456
|
-
and(new Predicate(fieldMapping.startTime, 'lessthan', endDate)).
|
|
5457
|
-
or(new Predicate(fieldMapping.startTime, 'lessthanorequal', startDate).
|
|
5458
|
-
and(new Predicate(fieldMapping.endTime, 'greaterthan', startDate)));
|
|
5479
|
+
var predicate = this.parent.dataModule.getStartEndQuery(startDate, endDate);
|
|
5459
5480
|
var filter = new DataManager({ json: appointments }).executeLocal(new Query().where(predicate));
|
|
5460
5481
|
if (resourceTdData) {
|
|
5461
5482
|
filter = this.filterEventsByResource(resourceTdData, filter);
|
|
@@ -5725,7 +5746,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5725
5746
|
}
|
|
5726
5747
|
}
|
|
5727
5748
|
if (target && this.parent.selectedElements.length > 0) {
|
|
5728
|
-
this.addSelectedAppointments(this.parent.selectedElements);
|
|
5749
|
+
this.addSelectedAppointments(this.parent.selectedElements, false);
|
|
5729
5750
|
}
|
|
5730
5751
|
return this.parent.selectedElements;
|
|
5731
5752
|
};
|
|
@@ -5755,12 +5776,12 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5755
5776
|
removeClass(selectedAppointments, AGENDA_SELECTED_CELL);
|
|
5756
5777
|
}
|
|
5757
5778
|
};
|
|
5758
|
-
EventBase.prototype.addSelectedAppointments = function (cells) {
|
|
5779
|
+
EventBase.prototype.addSelectedAppointments = function (cells, preventFocus) {
|
|
5759
5780
|
if (this.parent.currentView !== 'MonthAgenda') {
|
|
5760
5781
|
this.parent.removeSelectedClass();
|
|
5761
5782
|
}
|
|
5762
5783
|
addClass(cells, APPOINTMENT_BORDER);
|
|
5763
|
-
if (cells.length > 0) {
|
|
5784
|
+
if (cells.length > 0 && !preventFocus) {
|
|
5764
5785
|
cells[cells.length - 1].focus();
|
|
5765
5786
|
}
|
|
5766
5787
|
};
|
|
@@ -5784,6 +5805,10 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5784
5805
|
}
|
|
5785
5806
|
var selectedAppointments = this.getSelectedAppointments();
|
|
5786
5807
|
if (selectedAppointments.length > 0) {
|
|
5808
|
+
if (this.parent.activeEventData && this.parent.activeEventData.element && selectedAppointments.indexOf(this.parent.activeEventData.element) > -1) {
|
|
5809
|
+
this.parent.activeEventData.element.focus();
|
|
5810
|
+
return;
|
|
5811
|
+
}
|
|
5787
5812
|
selectedAppointments[selectedAppointments.length - 1].focus();
|
|
5788
5813
|
return;
|
|
5789
5814
|
}
|
|
@@ -6083,7 +6108,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6083
6108
|
var target = closest(eventData.target, '.' + APPOINTMENT_CLASS);
|
|
6084
6109
|
var guid = target.getAttribute('data-guid');
|
|
6085
6110
|
if (isMultiple) {
|
|
6086
|
-
this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]')));
|
|
6111
|
+
this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]')), true);
|
|
6087
6112
|
target.focus();
|
|
6088
6113
|
}
|
|
6089
6114
|
var eventObject = this.getEventByGuid(guid);
|
|
@@ -6332,9 +6357,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6332
6357
|
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
6333
6358
|
}
|
|
6334
6359
|
else {
|
|
6335
|
-
var appointmentSubject = createElement('div', {
|
|
6336
|
-
|
|
6337
|
-
});
|
|
6360
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6361
|
+
appointmentSubject.innerText = this.parent.sanitize(eventSubject);
|
|
6338
6362
|
templateElement = [appointmentSubject];
|
|
6339
6363
|
}
|
|
6340
6364
|
append(templateElement, appointmentWrapper);
|
|
@@ -6517,6 +6541,29 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6517
6541
|
return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] :
|
|
6518
6542
|
eventArgs || e;
|
|
6519
6543
|
};
|
|
6544
|
+
EventBase.prototype.renderSpannedIcon = function (element, spanEvent) {
|
|
6545
|
+
var iconElement = createElement('div', { className: EVENT_INDICATOR_CLASS + ' ' + ICON });
|
|
6546
|
+
if (spanEvent.isLeft) {
|
|
6547
|
+
var iconLeft = iconElement.cloneNode();
|
|
6548
|
+
addClass([iconLeft], EVENT_ICON_LEFT_CLASS);
|
|
6549
|
+
prepend([iconLeft], element);
|
|
6550
|
+
}
|
|
6551
|
+
if (spanEvent.isRight) {
|
|
6552
|
+
var iconRight = iconElement.cloneNode();
|
|
6553
|
+
addClass([iconRight], EVENT_ICON_RIGHT_CLASS);
|
|
6554
|
+
append([iconRight], element);
|
|
6555
|
+
}
|
|
6556
|
+
if (spanEvent.isTop) {
|
|
6557
|
+
var iconTop = iconElement.cloneNode();
|
|
6558
|
+
addClass([iconTop], EVENT_ICON_UP_CLASS);
|
|
6559
|
+
prepend([iconTop], element);
|
|
6560
|
+
}
|
|
6561
|
+
if (spanEvent.isBottom) {
|
|
6562
|
+
var iconBottom = iconElement.cloneNode();
|
|
6563
|
+
addClass([iconBottom], EVENT_ICON_DOWN_CLASS);
|
|
6564
|
+
append([iconBottom], element);
|
|
6565
|
+
}
|
|
6566
|
+
};
|
|
6520
6567
|
EventBase.prototype.unWireEvents = function () {
|
|
6521
6568
|
var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
6522
6569
|
for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
|
|
@@ -6871,7 +6918,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6871
6918
|
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
6872
6919
|
}
|
|
6873
6920
|
else {
|
|
6874
|
-
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS
|
|
6921
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6922
|
+
appointmentSubject.innerText = this.parent.sanitize(recordSubject);
|
|
6875
6923
|
if (isAllDay) {
|
|
6876
6924
|
if (record[fieldMapping.isAllDay]) {
|
|
6877
6925
|
templateElement = [appointmentSubject];
|
|
@@ -6903,10 +6951,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6903
6951
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
|
|
6904
6952
|
innerHTML: timeStr
|
|
6905
6953
|
});
|
|
6906
|
-
var appointmentLocation = createElement('div', {
|
|
6907
|
-
|
|
6908
|
-
innerHTML: (record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || '')
|
|
6909
|
-
});
|
|
6954
|
+
var appointmentLocation = createElement('div', { className: LOCATION_CLASS });
|
|
6955
|
+
appointmentLocation.innerText = this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''));
|
|
6910
6956
|
templateElement = [appointmentSubject, appointmentTime, appointmentLocation];
|
|
6911
6957
|
}
|
|
6912
6958
|
}
|
|
@@ -6923,7 +6969,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6923
6969
|
appointmentWrapper.appendChild(recurrenceIcon);
|
|
6924
6970
|
}
|
|
6925
6971
|
}
|
|
6926
|
-
this.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
|
|
6972
|
+
this.parent.eventBase.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
|
|
6927
6973
|
if (!isNullOrUndefined(this.cssClass)) {
|
|
6928
6974
|
addClass([appointmentWrapper], this.cssClass);
|
|
6929
6975
|
}
|
|
@@ -6955,29 +7001,6 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6955
7001
|
countCell.innerHTML = '+' + this.parent.globalize.formatNumber(moreCount) + ' ' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more'));
|
|
6956
7002
|
}
|
|
6957
7003
|
};
|
|
6958
|
-
VerticalEvent.prototype.renderSpannedIcon = function (element, spanEvent) {
|
|
6959
|
-
var iconElement = createElement('div', { className: EVENT_INDICATOR_CLASS + ' ' + ICON });
|
|
6960
|
-
if (spanEvent.isLeft) {
|
|
6961
|
-
var iconLeft = iconElement.cloneNode();
|
|
6962
|
-
addClass([iconLeft], EVENT_ICON_LEFT_CLASS);
|
|
6963
|
-
prepend([iconLeft], element);
|
|
6964
|
-
}
|
|
6965
|
-
if (spanEvent.isRight) {
|
|
6966
|
-
var iconRight = iconElement.cloneNode();
|
|
6967
|
-
addClass([iconRight], EVENT_ICON_RIGHT_CLASS);
|
|
6968
|
-
append([iconRight], element);
|
|
6969
|
-
}
|
|
6970
|
-
if (spanEvent.isTop) {
|
|
6971
|
-
var iconTop = iconElement.cloneNode();
|
|
6972
|
-
addClass([iconTop], EVENT_ICON_UP_CLASS);
|
|
6973
|
-
prepend([iconTop], element);
|
|
6974
|
-
}
|
|
6975
|
-
if (spanEvent.isBottom) {
|
|
6976
|
-
var iconBottom = iconElement.cloneNode();
|
|
6977
|
-
addClass([iconBottom], EVENT_ICON_DOWN_CLASS);
|
|
6978
|
-
append([iconBottom], element);
|
|
6979
|
-
}
|
|
6980
|
-
};
|
|
6981
7004
|
VerticalEvent.prototype.isSpannedEvent = function (record, day, resource) {
|
|
6982
7005
|
var currentDate = resetTime(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)]);
|
|
6983
7006
|
var renderedDate = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) || [currentDate];
|
|
@@ -7821,10 +7844,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7821
7844
|
}
|
|
7822
7845
|
else {
|
|
7823
7846
|
var eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
|
|
7824
|
-
var appointmentSubject = createElement('div', {
|
|
7825
|
-
|
|
7826
|
-
innerHTML: (eventSubject + (eventLocation ? '; ' + eventLocation : ''))
|
|
7827
|
-
});
|
|
7847
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
7848
|
+
appointmentSubject.innerText = this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')));
|
|
7828
7849
|
var appointmentStartTime = createElement('div', {
|
|
7829
7850
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
|
|
7830
7851
|
innerHTML: this.parent.getTimeString(eventData[this.fields.startTime])
|
|
@@ -7867,7 +7888,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7867
7888
|
var appTime = createElement('div', {
|
|
7868
7889
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''), innerHTML: timeString
|
|
7869
7890
|
});
|
|
7870
|
-
var appLocation = createElement('div', { className: LOCATION_CLASS
|
|
7891
|
+
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
7892
|
+
appLocation.innerText = this.parent.sanitize(eventLocation);
|
|
7871
7893
|
innerElement = [appointmentSubject, appTime, appLocation];
|
|
7872
7894
|
}
|
|
7873
7895
|
var wrap = createElement('div', { className: 'e-inner-wrap' });
|
|
@@ -9099,6 +9121,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9099
9121
|
cssClass: QUICK_DIALOG_CLASS,
|
|
9100
9122
|
closeOnEscape: true,
|
|
9101
9123
|
enableRtl: this.parent.enableRtl,
|
|
9124
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
9102
9125
|
beforeClose: this.beforeQuickDialogClose.bind(this),
|
|
9103
9126
|
isModal: true,
|
|
9104
9127
|
position: { X: 'center', Y: 'center' },
|
|
@@ -9130,6 +9153,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9130
9153
|
cssClass: className,
|
|
9131
9154
|
disabled: isDisabled,
|
|
9132
9155
|
enableRtl: this.parent.enableRtl,
|
|
9156
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
9133
9157
|
iconCss: iconName
|
|
9134
9158
|
});
|
|
9135
9159
|
buttonObj.appendTo(element);
|
|
@@ -9325,7 +9349,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9325
9349
|
append(templateElement, appointmentElement);
|
|
9326
9350
|
}
|
|
9327
9351
|
else {
|
|
9328
|
-
appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS
|
|
9352
|
+
appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS }));
|
|
9353
|
+
appointmentElement.firstElementChild.innerText = this_1.parent.sanitize(eventText);
|
|
9329
9354
|
}
|
|
9330
9355
|
if (!isNullOrUndefined(groupIndex)) {
|
|
9331
9356
|
appointmentElement.setAttribute('data-group-index', groupIndex);
|
|
@@ -9579,10 +9604,14 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9579
9604
|
("<button class=\"" + (DELETE_CLASS + ' ' + ICON) + "\" title=\"" + this.l10n.getConstant('delete') + "\"></button>") +
|
|
9580
9605
|
("<button class=\"" + CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") +
|
|
9581
9606
|
("<div class=\"" + SUBJECT_WRAP + "\"><div class=\"" + SUBJECT_CLASS + " " + TEXT_ELLIPSIS + "\" ") +
|
|
9582
|
-
("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\"
|
|
9607
|
+
("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\"></div></div >");
|
|
9583
9608
|
break;
|
|
9584
9609
|
}
|
|
9585
9610
|
var templateWrapper = createElement('div', { innerHTML: header });
|
|
9611
|
+
if (headerType === 'Event') {
|
|
9612
|
+
var subjectText = templateWrapper.querySelector('.' + SUBJECT_CLASS);
|
|
9613
|
+
subjectText.innerText = this.parent.sanitize(args.eventSubject);
|
|
9614
|
+
}
|
|
9586
9615
|
append([].slice.call(templateWrapper.childNodes), headerTemplate);
|
|
9587
9616
|
}
|
|
9588
9617
|
return headerTemplate;
|
|
@@ -9610,7 +9639,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9610
9639
|
(TEXT_ELLIPSIS + "\">" + cellDetails.details + "</div></div>") +
|
|
9611
9640
|
((this.parent.activeViewOptions.group.resources.length > 0 ? "<div class=\"" + RESOURCE_CLASS + "\">" +
|
|
9612
9641
|
("<div class=\"" + RESOURCE_ICON_CLASS + " " + ICON + " \"></div><div class=\"" + RESOURCE_DETAILS_CLASS + " ") +
|
|
9613
|
-
(TEXT_ELLIPSIS + "\"
|
|
9642
|
+
(TEXT_ELLIPSIS + "\"></div></div>") : '') + "</td></tr></tbody></table>");
|
|
9614
9643
|
break;
|
|
9615
9644
|
case 'Event':
|
|
9616
9645
|
argsData = this.getFormattedString(data);
|
|
@@ -9624,8 +9653,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9624
9653
|
content += '</div></div>';
|
|
9625
9654
|
if (data[this.parent.eventFields.location]) {
|
|
9626
9655
|
content += '<div class="' + LOCATION_CLASS + '"><div class="' + LOCATION_ICON_CLASS + ' ' +
|
|
9627
|
-
ICON + '"></div><div class="' + LOCATION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '">'
|
|
9628
|
-
data[this.parent.eventFields.location] + '</div></div>';
|
|
9656
|
+
ICON + '"></div><div class="' + LOCATION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9629
9657
|
}
|
|
9630
9658
|
if (data[this.parent.eventFields.startTimezone] || data[this.parent.eventFields.endTimezone]) {
|
|
9631
9659
|
content += '<div class="' + TIME_ZONE_CLASS + '"><div class="' + TIME_ZONE_ICON_CLASS + ' ' + ICON +
|
|
@@ -9634,17 +9662,33 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9634
9662
|
}
|
|
9635
9663
|
if (data[this.parent.eventFields.description]) {
|
|
9636
9664
|
content += '<div class="' + DESCRIPTION_CLASS + '"><div class="' + DESCRIPTION_ICON_CLASS + ' ' + ICON +
|
|
9637
|
-
'"></div><div class="' + DESCRIPTION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '">'
|
|
9638
|
-
data[this.parent.eventFields.description] + '</div></div>';
|
|
9665
|
+
'"></div><div class="' + DESCRIPTION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9639
9666
|
}
|
|
9640
9667
|
if (this.parent.resourceCollection.length > 0) {
|
|
9641
9668
|
content += '<div class="' + RESOURCE_CLASS + '"><div class="' + RESOURCE_ICON_CLASS + ' ' + ICON +
|
|
9642
|
-
'"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '">'
|
|
9643
|
-
resourceText + '</div></div>';
|
|
9669
|
+
'"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9644
9670
|
}
|
|
9645
9671
|
break;
|
|
9646
9672
|
}
|
|
9647
9673
|
var templateWrapper = createElement('div', { innerHTML: content });
|
|
9674
|
+
if (data[this.parent.eventFields.location]) {
|
|
9675
|
+
var locationDetails = templateWrapper.querySelector('.' + LOCATION_DETAILS_CLASS);
|
|
9676
|
+
if (!isNullOrUndefined(locationDetails)) {
|
|
9677
|
+
locationDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.location]);
|
|
9678
|
+
}
|
|
9679
|
+
}
|
|
9680
|
+
if (data[this.parent.eventFields.description]) {
|
|
9681
|
+
var descriptionDetails = templateWrapper.querySelector('.' + DESCRIPTION_DETAILS_CLASS);
|
|
9682
|
+
if (!isNullOrUndefined(descriptionDetails)) {
|
|
9683
|
+
descriptionDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.description]);
|
|
9684
|
+
}
|
|
9685
|
+
}
|
|
9686
|
+
if (resourceText) {
|
|
9687
|
+
var resourceDetails = templateWrapper.querySelector('.' + RESOURCE_DETAILS_CLASS);
|
|
9688
|
+
if (!isNullOrUndefined(resourceDetails)) {
|
|
9689
|
+
resourceDetails.innerText = this.parent.sanitize(resourceText);
|
|
9690
|
+
}
|
|
9691
|
+
}
|
|
9648
9692
|
append([].slice.call(templateWrapper.childNodes), contentTemplate);
|
|
9649
9693
|
}
|
|
9650
9694
|
return contentTemplate;
|
|
@@ -10182,7 +10226,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
10182
10226
|
};
|
|
10183
10227
|
QuickPopups.prototype.quickPopupClose = function () {
|
|
10184
10228
|
this.parent.eventBase.focusElement();
|
|
10185
|
-
this.quickPopup.relateTo = WORK_CELLS_CLASS;
|
|
10229
|
+
this.quickPopup.relateTo = '.' + WORK_CELLS_CLASS;
|
|
10186
10230
|
this.fieldValidator.destroyToolTip();
|
|
10187
10231
|
if (this.quickPopup.element.querySelectorAll('.e-formvalidator').length) {
|
|
10188
10232
|
this.fieldValidator.destroy();
|
|
@@ -10402,7 +10446,8 @@ var EventTooltip = /** @__PURE__ @class */ (function () {
|
|
|
10402
10446
|
target: this.getTargets(),
|
|
10403
10447
|
beforeRender: this.onBeforeRender.bind(this),
|
|
10404
10448
|
beforeClose: this.onBeforeClose.bind(this),
|
|
10405
|
-
enableRtl: this.parent.enableRtl
|
|
10449
|
+
enableRtl: this.parent.enableRtl,
|
|
10450
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer
|
|
10406
10451
|
});
|
|
10407
10452
|
this.tooltipObj.appendTo(this.parent.element);
|
|
10408
10453
|
}
|
|
@@ -11699,6 +11744,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11699
11744
|
content: this.getEventWindowContent(),
|
|
11700
11745
|
cssClass: EVENT_WINDOW_DIALOG_CLASS,
|
|
11701
11746
|
enableRtl: this.parent.enableRtl,
|
|
11747
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
11702
11748
|
height: this.parent.isAdaptive ? '100%' : 'auto',
|
|
11703
11749
|
minHeight: '300px',
|
|
11704
11750
|
isModal: true,
|
|
@@ -11909,6 +11955,10 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11909
11955
|
var _this = this;
|
|
11910
11956
|
if (!isNullOrUndefined(this.parent.editorTemplate)) {
|
|
11911
11957
|
if (args) {
|
|
11958
|
+
if (this.fieldValidator) {
|
|
11959
|
+
this.fieldValidator.destroy();
|
|
11960
|
+
this.fieldValidator = null;
|
|
11961
|
+
}
|
|
11912
11962
|
if (this.recurrenceEditor) {
|
|
11913
11963
|
this.recurrenceEditor.destroy();
|
|
11914
11964
|
this.recurrenceEditor = null;
|
|
@@ -12084,6 +12134,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12084
12134
|
if (resourceData.allowMultiple) {
|
|
12085
12135
|
var listObj = new MultiSelect({
|
|
12086
12136
|
enableRtl: this.parent.enableRtl,
|
|
12137
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12087
12138
|
cssClass: this.parent.cssClass || '',
|
|
12088
12139
|
dataSource: resourceData.dataSource,
|
|
12089
12140
|
change: this.onMultiselectResourceChange.bind(this),
|
|
@@ -12230,6 +12281,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12230
12281
|
change: this.onChange.bind(this),
|
|
12231
12282
|
cssClass: value + ' ' + this.parent.cssClass,
|
|
12232
12283
|
enableRtl: this.parent.enableRtl,
|
|
12284
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12233
12285
|
label: this.getFieldLabel(value)
|
|
12234
12286
|
});
|
|
12235
12287
|
checkBox.appendTo(checkBoxInput);
|
|
@@ -12356,6 +12408,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12356
12408
|
target: this.element,
|
|
12357
12409
|
animationSettings: { effect: 'Zoom' },
|
|
12358
12410
|
enableRtl: this.parent.enableRtl,
|
|
12411
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12359
12412
|
isModal: true,
|
|
12360
12413
|
cssClass: REPEAT_DIALOG_CLASS,
|
|
12361
12414
|
open: this.repeatOpenDialog.bind(this)
|
|
@@ -12423,6 +12476,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12423
12476
|
if (!this.parent.eventSettings.allowAdding) {
|
|
12424
12477
|
return;
|
|
12425
12478
|
}
|
|
12479
|
+
if (this.parent.isAdaptive && repeatType && !this.repeatDialogObject) {
|
|
12480
|
+
this.renderRepeatDialog();
|
|
12481
|
+
}
|
|
12426
12482
|
this.element.querySelector('.' + FORM_CLASS).removeAttribute('data-id');
|
|
12427
12483
|
this.element.querySelector('.' + EVENT_WINDOW_TITLE_TEXT_CLASS).innerHTML = this.l10n.getConstant('newEvent');
|
|
12428
12484
|
eventObj.Timezone = false;
|
|
@@ -12452,10 +12508,18 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12452
12508
|
selectedType: !isNullOrUndefined(repeatType) ? repeatType : !isNullOrUndefined(eventObj[this.fields.recurrenceRule]) ?
|
|
12453
12509
|
this.recurrenceEditor.selectedType : 0
|
|
12454
12510
|
});
|
|
12511
|
+
this.repeatRule = this.recurrenceEditor.value;
|
|
12455
12512
|
}
|
|
12456
12513
|
if (this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
|
|
12457
12514
|
var element = this.element.querySelector('.' + REPEAT_CONTAINER_CLASS);
|
|
12458
|
-
|
|
12515
|
+
if (eventObj[this.fields.recurrenceRule] || repeatType) {
|
|
12516
|
+
removeClass([element], HIDE_STYLE_CLASS);
|
|
12517
|
+
this.repeatStatus.setProperties({ checked: true });
|
|
12518
|
+
}
|
|
12519
|
+
else {
|
|
12520
|
+
addClass([element], HIDE_STYLE_CLASS);
|
|
12521
|
+
this.repeatStatus.setProperties({ checked: false });
|
|
12522
|
+
}
|
|
12459
12523
|
this.updateRepeatLabel(this.repeatRule);
|
|
12460
12524
|
}
|
|
12461
12525
|
else {
|
|
@@ -13110,9 +13174,11 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13110
13174
|
}
|
|
13111
13175
|
var currentStartTime = new Date(+currentData[this.fields.startTime]);
|
|
13112
13176
|
var currentEndTime = new Date(+currentData[this.fields.endTime]);
|
|
13177
|
+
var nextStartTime;
|
|
13178
|
+
var nextEndTime;
|
|
13113
13179
|
if (index !== recurColl.length - 1) {
|
|
13114
|
-
|
|
13115
|
-
|
|
13180
|
+
nextStartTime = new Date(+recurColl[index + 1][this.fields.startTime]);
|
|
13181
|
+
nextEndTime = new Date(+recurColl[index + 1][this.fields.endTime]);
|
|
13116
13182
|
}
|
|
13117
13183
|
var lastEndTime = new Date(+recurColl[recurColl.length - 1][this.fields.endTime]);
|
|
13118
13184
|
if (index === 0) {
|
|
@@ -13311,7 +13377,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13311
13377
|
value = element.checked;
|
|
13312
13378
|
}
|
|
13313
13379
|
else {
|
|
13314
|
-
value =
|
|
13380
|
+
value = this.parent.sanitize(element.value);
|
|
13315
13381
|
}
|
|
13316
13382
|
}
|
|
13317
13383
|
return value;
|
|
@@ -14418,6 +14484,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14418
14484
|
if (this.parent.currentAction !== 'EditFollowingEvents' && !this.isBlockEvent(eventData)
|
|
14419
14485
|
&& this.parent.eventBase.isBlockRange(eventData)) {
|
|
14420
14486
|
this.parent.quickPopup.openValidationError('blockAlert', eventData);
|
|
14487
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
14421
14488
|
return;
|
|
14422
14489
|
}
|
|
14423
14490
|
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
@@ -15135,8 +15202,8 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
15135
15202
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15136
15203
|
};
|
|
15137
15204
|
/**
|
|
15138
|
-
* A
|
|
15139
|
-
* fields along with its available configuration settings. Each field in it accepts both string and
|
|
15205
|
+
* A class that holds the collection of event fields that requires to be mapped with the dataSource
|
|
15206
|
+
* fields along with its available configuration settings. Each field in it accepts both string and object
|
|
15140
15207
|
* data type. When each of the field is assigned with simple `string` value, it is assumed that the dataSource field
|
|
15141
15208
|
* name is mapped with it. If the `object` type is defined on each fields, then the validation related settings and mapping of
|
|
15142
15209
|
* those fields with dataSource can be given altogether within it.
|
|
@@ -15273,6 +15340,9 @@ var EventSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
15273
15340
|
__decorate$6([
|
|
15274
15341
|
Property()
|
|
15275
15342
|
], EventSettings.prototype, "sortComparer", void 0);
|
|
15343
|
+
__decorate$6([
|
|
15344
|
+
Property()
|
|
15345
|
+
], EventSettings.prototype, "includeFiltersInQuery", void 0);
|
|
15276
15346
|
return EventSettings;
|
|
15277
15347
|
}(ChildProperty));
|
|
15278
15348
|
|
|
@@ -15593,7 +15663,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15593
15663
|
classList(target, [RESOURCE_COLLAPSE_CLASS], [RESOURCE_EXPAND_CLASS]);
|
|
15594
15664
|
hide = false;
|
|
15595
15665
|
}
|
|
15596
|
-
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
15666
|
+
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS + ',.' + MORE_INDICATOR_CLASS));
|
|
15597
15667
|
for (var _i = 0, eventElements_1 = eventElements; _i < eventElements_1.length; _i++) {
|
|
15598
15668
|
var element = eventElements_1[_i];
|
|
15599
15669
|
remove(element);
|
|
@@ -15723,6 +15793,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15723
15793
|
this.treeViewObj = new TreeView({
|
|
15724
15794
|
cssClass: this.parent.cssClass,
|
|
15725
15795
|
enableRtl: this.parent.enableRtl,
|
|
15796
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
15726
15797
|
fields: {
|
|
15727
15798
|
dataSource: [].slice.call(this.generateTreeData()),
|
|
15728
15799
|
id: 'resourceId',
|
|
@@ -15827,10 +15898,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15827
15898
|
var resourceText = resourceLevel.dataSource.filter(function (resData) {
|
|
15828
15899
|
return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
|
|
15829
15900
|
});
|
|
15830
|
-
var resourceName = createElement('div', {
|
|
15831
|
-
|
|
15832
|
-
innerHTML: resourceText[0][resourceLevel.textField]
|
|
15833
|
-
});
|
|
15901
|
+
var resourceName = createElement('div', { className: RESOURCE_NAME });
|
|
15902
|
+
resourceName.innerText = this_2.parent.sanitize(resourceText[0][resourceLevel.textField]);
|
|
15834
15903
|
headerCollection.push(resourceName);
|
|
15835
15904
|
var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });
|
|
15836
15905
|
headerCollection.push(levelIcon);
|
|
@@ -15910,7 +15979,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15910
15979
|
var promises = [];
|
|
15911
15980
|
for (var _i = 0, _a = this.parent.resources; _i < _a.length; _i++) {
|
|
15912
15981
|
var resource = _a[_i];
|
|
15913
|
-
var dataModule = new Data(resource.dataSource, resource.query);
|
|
15982
|
+
var dataModule = new Data(this.parent, resource.dataSource, resource.query);
|
|
15914
15983
|
promises.push(dataModule.getData(dataModule.generateQuery()));
|
|
15915
15984
|
}
|
|
15916
15985
|
Promise.all(promises).then(function (e) { return _this.dataManagerSuccess(e, isSetModel); })
|
|
@@ -16610,7 +16679,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16610
16679
|
/**
|
|
16611
16680
|
* Method to render react templates
|
|
16612
16681
|
*
|
|
16613
|
-
* @param {Function}
|
|
16682
|
+
* @param {Function} callback - Specifies the callBack method
|
|
16614
16683
|
* @returns {void}
|
|
16615
16684
|
* @private
|
|
16616
16685
|
*/
|
|
@@ -16634,6 +16703,19 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16634
16703
|
this.clearTemplate(templates);
|
|
16635
16704
|
}
|
|
16636
16705
|
};
|
|
16706
|
+
/**
|
|
16707
|
+
* Method to sanitize any suspected untrusted strings and scripts before rendering them.
|
|
16708
|
+
*
|
|
16709
|
+
* @param {string} value - A string value representing the HTML string value to be sanitized.
|
|
16710
|
+
* @returns {string} A sanitized Html string.
|
|
16711
|
+
* @private
|
|
16712
|
+
*/
|
|
16713
|
+
Schedule.prototype.sanitize = function (value) {
|
|
16714
|
+
if (this.enableHtmlSanitizer) {
|
|
16715
|
+
return SanitizeHtmlHelper.sanitize(value);
|
|
16716
|
+
}
|
|
16717
|
+
return value;
|
|
16718
|
+
};
|
|
16637
16719
|
Schedule.prototype.initializeResources = function (isSetModel) {
|
|
16638
16720
|
if (isSetModel === void 0) { isSetModel = false; }
|
|
16639
16721
|
if (this.resources.length > 0) {
|
|
@@ -16847,7 +16929,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16847
16929
|
followingID: this.eventSettings.fields.followingID
|
|
16848
16930
|
};
|
|
16849
16931
|
this.setEditorTitles();
|
|
16850
|
-
this.dataModule = new Data(this.eventSettings.dataSource, this.eventSettings.query);
|
|
16932
|
+
this.dataModule = new Data(this, this.eventSettings.dataSource, this.eventSettings.query);
|
|
16851
16933
|
this.crudModule = new Crud(this);
|
|
16852
16934
|
};
|
|
16853
16935
|
Schedule.prototype.setEditorTitles = function () {
|
|
@@ -17048,6 +17130,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17048
17130
|
if (_this.headerModule) {
|
|
17049
17131
|
_this.headerModule.setCalendarDate(navigationArgs.currentDate);
|
|
17050
17132
|
}
|
|
17133
|
+
if (_this.currentView === 'MonthAgenda' && _this.monthAgendaModule) {
|
|
17134
|
+
_this.monthAgendaModule.monthAgendaDate = new Date('' + _this.selectedDate);
|
|
17135
|
+
}
|
|
17051
17136
|
_this.initializeView(_this.currentView);
|
|
17052
17137
|
_this.animateLayout();
|
|
17053
17138
|
args = { requestType: 'dateNavigate', cancel: false, event: event };
|
|
@@ -17267,7 +17352,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17267
17352
|
var selectedCells = this.getSelectedCells();
|
|
17268
17353
|
for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
|
|
17269
17354
|
var cell = selectedCells_1[_i];
|
|
17270
|
-
|
|
17355
|
+
if (this.currentView !== 'Year') {
|
|
17356
|
+
cell.setAttribute('aria-selected', 'false');
|
|
17357
|
+
}
|
|
17271
17358
|
cell.removeAttribute('tabindex');
|
|
17272
17359
|
}
|
|
17273
17360
|
removeClass(selectedCells, SELECTED_CELL_CLASS);
|
|
@@ -17285,9 +17372,11 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17285
17372
|
* @private
|
|
17286
17373
|
*/
|
|
17287
17374
|
Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {
|
|
17288
|
-
|
|
17289
|
-
var
|
|
17290
|
-
|
|
17375
|
+
if (this.currentView !== 'Year') {
|
|
17376
|
+
for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
|
|
17377
|
+
var cell = cells_1[_i];
|
|
17378
|
+
cell.setAttribute('aria-selected', 'true');
|
|
17379
|
+
}
|
|
17291
17380
|
}
|
|
17292
17381
|
addClass(cells, SELECTED_CELL_CLASS);
|
|
17293
17382
|
if (focusCell) {
|
|
@@ -17945,6 +18034,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17945
18034
|
this.changeDate(this.selectedDate);
|
|
17946
18035
|
}
|
|
17947
18036
|
else if (state.isLayout) {
|
|
18037
|
+
this.activeCellsData = null;
|
|
17948
18038
|
this.initializeView(this.currentView);
|
|
17949
18039
|
}
|
|
17950
18040
|
else if (state.isDataManager && this.crudModule) {
|
|
@@ -18120,6 +18210,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18120
18210
|
case 'dataSource':
|
|
18121
18211
|
case 'query':
|
|
18122
18212
|
case 'fields':
|
|
18213
|
+
case 'includeFiltersInQuery':
|
|
18123
18214
|
this.initializeDataModule();
|
|
18124
18215
|
state.isDataManager = true;
|
|
18125
18216
|
break;
|
|
@@ -18522,6 +18613,17 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18522
18613
|
Schedule.prototype.addEvent = function (data) {
|
|
18523
18614
|
this.crudModule.addEvent(data);
|
|
18524
18615
|
};
|
|
18616
|
+
/**
|
|
18617
|
+
* Generates the occurrences of a single recurrence event based on the provided event.
|
|
18618
|
+
*
|
|
18619
|
+
* @function generateEventOccurrences
|
|
18620
|
+
* @param {Object} event Accepts the parent recurrence event from which the occurrences are generated.
|
|
18621
|
+
* @param {Date} startDate Accepts the start date for the event occurrences. If not provided, the event's start date will be used.
|
|
18622
|
+
* @returns {Object[]} Returns the collection of occurrence event objects.
|
|
18623
|
+
*/
|
|
18624
|
+
Schedule.prototype.generateEventOccurrences = function (event, startDate) {
|
|
18625
|
+
return (this.eventBase) ? this.eventBase.generateOccurrence(event, startDate) : [];
|
|
18626
|
+
};
|
|
18525
18627
|
/**
|
|
18526
18628
|
* Allows the Scheduler events data to be exported as an Excel file either in .xlsx or .csv file formats.
|
|
18527
18629
|
* By default, the whole event collection bound to the Scheduler gets exported as an Excel file.
|
|
@@ -18983,7 +19085,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18983
19085
|
var element = this.element.querySelector('div[data-guid="' + selectEvent.Guid + '"]');
|
|
18984
19086
|
if (element) {
|
|
18985
19087
|
this.eventBase.removeSelectedAppointmentClass();
|
|
18986
|
-
this.eventBase.addSelectedAppointments([element]);
|
|
19088
|
+
this.eventBase.addSelectedAppointments([element], false);
|
|
18987
19089
|
this.activeEventData = { event: selectEvent, element: element };
|
|
18988
19090
|
if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda') {
|
|
18989
19091
|
addClass([this.activeEventData.element], AGENDA_SELECTED_CELL);
|
|
@@ -19197,6 +19299,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19197
19299
|
__decorate([
|
|
19198
19300
|
Property(null)
|
|
19199
19301
|
], Schedule.prototype, "timeFormat", void 0);
|
|
19302
|
+
__decorate([
|
|
19303
|
+
Property(true)
|
|
19304
|
+
], Schedule.prototype, "enableHtmlSanitizer", void 0);
|
|
19200
19305
|
__decorate([
|
|
19201
19306
|
Property(false)
|
|
19202
19307
|
], Schedule.prototype, "enableAllDayScroll", void 0);
|
|
@@ -19450,6 +19555,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19450
19555
|
parseInt(this.actionObj.element.getAttribute('data-group-index'), 10) === this.actionObj.groupIndex : true;
|
|
19451
19556
|
if (+eventObj[this.parent.eventFields.startTime] === +this.actionObj.event[this.parent.eventFields.startTime] &&
|
|
19452
19557
|
+eventObj[this.parent.eventFields.endTime] === +this.actionObj.event[this.parent.eventFields.endTime] && isSameResource) {
|
|
19558
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
19453
19559
|
return;
|
|
19454
19560
|
}
|
|
19455
19561
|
if (eventObj[this.parent.eventFields.recurrenceRule]) {
|
|
@@ -19731,6 +19837,10 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19731
19837
|
}
|
|
19732
19838
|
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
19733
19839
|
}
|
|
19840
|
+
if (!isResize && this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length !== 0) {
|
|
19841
|
+
var eventObj = this.yearEvent.isSpannedEvent(event, event[this.parent.eventFields.startTime]);
|
|
19842
|
+
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
19843
|
+
}
|
|
19734
19844
|
var appointmentElement = this.createAppointmentElement(this.actionObj.groupIndex, event[this.parent.eventFields.subject]);
|
|
19735
19845
|
appointmentElement.setAttribute('drag', 'true');
|
|
19736
19846
|
addClass([appointmentElement], CLONE_ELEMENT_CLASS);
|
|
@@ -20514,8 +20624,9 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20514
20624
|
}
|
|
20515
20625
|
};
|
|
20516
20626
|
YearEvent.prototype.timelineYearViewEvents = function () {
|
|
20627
|
+
var _this = this;
|
|
20517
20628
|
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
|
|
20518
|
-
this.cellWidth = workCell.
|
|
20629
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
20519
20630
|
this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
|
|
20520
20631
|
var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20521
20632
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20541,10 +20652,10 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20541
20652
|
if (this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20542
20653
|
var wrapper_1 = wrapperCollection[parseInt(dayIndex.toString(), 10)];
|
|
20543
20654
|
td = dayIndex + 1;
|
|
20544
|
-
|
|
20545
|
-
if (!
|
|
20546
|
-
|
|
20547
|
-
wrapper_1.appendChild(
|
|
20655
|
+
eventWrapper = wrapper_1.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
|
|
20656
|
+
if (!eventWrapper) {
|
|
20657
|
+
eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
20658
|
+
wrapper_1.appendChild(eventWrapper);
|
|
20548
20659
|
}
|
|
20549
20660
|
if (this.parent.enableRtl) {
|
|
20550
20661
|
rightValue = row * this.cellWidth;
|
|
@@ -20597,8 +20708,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20597
20708
|
return "continue";
|
|
20598
20709
|
}
|
|
20599
20710
|
}
|
|
20600
|
-
|
|
20601
|
-
if (isRowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
20711
|
+
if (this_1.parent.rowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
20602
20712
|
this_1.renderEvent(eventWrapper, eventData, row, leftValue, rightValue, monthStart, dayIndex);
|
|
20603
20713
|
this_1.updateCellHeight(rowTd, availedHeight);
|
|
20604
20714
|
isSpannedCollection.push(eventData);
|
|
@@ -20624,6 +20734,19 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20624
20734
|
}
|
|
20625
20735
|
}
|
|
20626
20736
|
}
|
|
20737
|
+
if (this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20738
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
20739
|
+
var tr_1 = [].slice.call(this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
|
|
20740
|
+
appContainer.forEach(function (ele, index) {
|
|
20741
|
+
var app = [].slice.call(ele.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
20742
|
+
var appTop = tr_1[parseInt(index.toString(), 10)].offsetTop + _this.cellHeader + EVENT_GAP$2;
|
|
20743
|
+
app.forEach(function (app) {
|
|
20744
|
+
var overlap = parseInt(app.getAttribute('data-index'), 10);
|
|
20745
|
+
app.style.top = appTop + (overlap * _this.eventHeight) + 'px';
|
|
20746
|
+
app.removeAttribute('data-index');
|
|
20747
|
+
});
|
|
20748
|
+
});
|
|
20749
|
+
}
|
|
20627
20750
|
};
|
|
20628
20751
|
YearEvent.prototype.updateSpannedEvents = function (eventObj, dayStart, dayEnd) {
|
|
20629
20752
|
var isLeftRightResize = (this.isResource && this.parent.activeViewOptions.orientation === 'Vertical') ||
|
|
@@ -20638,7 +20761,8 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20638
20761
|
}
|
|
20639
20762
|
}
|
|
20640
20763
|
if ((dayEnd.getTime() >= eventObj[this.fields.endTime].getTime()) || (isLeftRightResize && !this.isResource &&
|
|
20641
|
-
addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth())
|
|
20764
|
+
addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth()) ||
|
|
20765
|
+
(isLeftRightResize && this.isResource && (dayEnd.getTime() <= eventObj[this.fields.endTime].getTime()))) {
|
|
20642
20766
|
if (isLeftRightResize) {
|
|
20643
20767
|
data.isRight = false;
|
|
20644
20768
|
}
|
|
@@ -20649,8 +20773,11 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20649
20773
|
eventObj.data = data;
|
|
20650
20774
|
};
|
|
20651
20775
|
YearEvent.prototype.timelineResourceEvents = function () {
|
|
20776
|
+
var _this = this;
|
|
20777
|
+
var contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
20778
|
+
var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
|
|
20652
20779
|
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
20653
|
-
this.cellWidth = workCell.
|
|
20780
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
20654
20781
|
this.cellHeader = 0;
|
|
20655
20782
|
var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20656
20783
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20678,6 +20805,39 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20678
20805
|
}
|
|
20679
20806
|
}
|
|
20680
20807
|
}
|
|
20808
|
+
if (this.parent.rowAutoHeight && !isVerticalScrollbarAvail && contentTable.offsetWidth > contentTable.clientWidth) {
|
|
20809
|
+
var appointments = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
20810
|
+
appointments.forEach(function (ele) {
|
|
20811
|
+
ele.style.removeProperty('left');
|
|
20812
|
+
ele.style.removeProperty('right');
|
|
20813
|
+
});
|
|
20814
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
20815
|
+
var conTable_1 = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
20816
|
+
var tr_2 = [].slice.call(conTable_1.querySelectorAll('tbody tr'));
|
|
20817
|
+
appContainer.forEach(function (ele, index) {
|
|
20818
|
+
var appWrapper = [].slice.call(ele.children);
|
|
20819
|
+
var row = tr_2[parseInt(index.toString(), 10)];
|
|
20820
|
+
appWrapper.forEach(function (appWrap, cellIndex) {
|
|
20821
|
+
var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
|
|
20822
|
+
var app = [].slice.call(appWrap.children);
|
|
20823
|
+
var width = td.getBoundingClientRect().width;
|
|
20824
|
+
var left = td.offsetLeft;
|
|
20825
|
+
if (_this.parent.enableRtl) {
|
|
20826
|
+
var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
|
|
20827
|
+
app.forEach(function (app) {
|
|
20828
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
20829
|
+
app.style.right = right_1 + 'px';
|
|
20830
|
+
});
|
|
20831
|
+
}
|
|
20832
|
+
else {
|
|
20833
|
+
app.forEach(function (app) {
|
|
20834
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
20835
|
+
app.style.left = left + 'px';
|
|
20836
|
+
});
|
|
20837
|
+
}
|
|
20838
|
+
});
|
|
20839
|
+
});
|
|
20840
|
+
}
|
|
20681
20841
|
};
|
|
20682
20842
|
YearEvent.prototype.renderResourceEvent = function (wrapper, resource, month, index, monthStart) {
|
|
20683
20843
|
var eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
@@ -20688,39 +20848,60 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20688
20848
|
var td = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + (rowIndex + 1) + ") td");
|
|
20689
20849
|
this.cellHeight = td.offsetHeight;
|
|
20690
20850
|
this.groupOrder = resource.groupOrder;
|
|
20691
|
-
|
|
20851
|
+
var isSpannedCollection = [];
|
|
20852
|
+
var _loop_2 = function (a) {
|
|
20692
20853
|
var data = eventDatas[parseInt(a.toString(), 10)];
|
|
20693
20854
|
var overlapIndex = void 0;
|
|
20694
20855
|
var eventData = extend({}, data, null, true);
|
|
20695
|
-
if (
|
|
20696
|
-
var eventObj =
|
|
20697
|
-
overlapIndex =
|
|
20856
|
+
if (this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
20857
|
+
var eventObj = this_2.isSpannedEvent(eventData, monthStart);
|
|
20858
|
+
overlapIndex = this_2.getIndex(eventObj[this_2.fields.startTime]);
|
|
20698
20859
|
eventData.Index = overlapIndex;
|
|
20699
20860
|
}
|
|
20700
20861
|
else {
|
|
20701
|
-
overlapIndex =
|
|
20862
|
+
overlapIndex = this_2.getIndex(eventData[this_2.fields.startTime]);
|
|
20702
20863
|
eventData.Index = overlapIndex;
|
|
20703
20864
|
}
|
|
20704
|
-
var availedHeight =
|
|
20705
|
-
var leftValue = (
|
|
20706
|
-
month *
|
|
20707
|
-
if (!
|
|
20708
|
-
return;
|
|
20865
|
+
var availedHeight = this_2.cellHeader + (this_2.eventHeight * (a + 1)) + EVENT_GAP$2 + this_2.moreIndicatorHeight;
|
|
20866
|
+
var leftValue = (this_2.parent.activeViewOptions.orientation === 'Vertical') ?
|
|
20867
|
+
month * this_2.cellWidth : index * this_2.cellWidth;
|
|
20868
|
+
if (!this_2.parent.isMinMaxDate(eventData[this_2.fields.startTime])) {
|
|
20869
|
+
return { value: void 0 };
|
|
20709
20870
|
}
|
|
20710
|
-
if (
|
|
20711
|
-
|
|
20712
|
-
|
|
20871
|
+
if (this_2.parent.activeViewOptions.orientation === 'Vertical' && this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
20872
|
+
var isRendered = this_2.renderedEvents.filter(function (eventObj) {
|
|
20873
|
+
return eventObj.Guid === eventData.Guid;
|
|
20874
|
+
});
|
|
20875
|
+
var isSpanned = isSpannedCollection.filter(function (eventObj) {
|
|
20876
|
+
return eventObj.Guid === eventData.Guid;
|
|
20877
|
+
});
|
|
20878
|
+
if (isRendered.length > 0 || isSpanned.length > 0) {
|
|
20879
|
+
return "continue";
|
|
20880
|
+
}
|
|
20881
|
+
}
|
|
20882
|
+
if (this_2.parent.rowAutoHeight || this_2.cellHeight > availedHeight) {
|
|
20883
|
+
this_2.renderEvent(eventWrapper, eventData, month, leftValue, leftValue, monthStart, index);
|
|
20884
|
+
this_2.updateCellHeight(td, availedHeight);
|
|
20885
|
+
isSpannedCollection.push(eventData);
|
|
20713
20886
|
}
|
|
20714
20887
|
else {
|
|
20715
|
-
var moreIndex =
|
|
20716
|
-
|
|
20717
|
-
if (
|
|
20888
|
+
var moreIndex = this_2.parent.activeViewOptions.orientation === 'Horizontal' ? month : index;
|
|
20889
|
+
this_2.renderMoreIndicator(eventWrapper, eventDatas.length - a, monthStart, moreIndex, leftValue, leftValue, index);
|
|
20890
|
+
if (this_2.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
20718
20891
|
for (var i = index; i < eventDatas.length; i++) {
|
|
20719
|
-
|
|
20892
|
+
this_2.renderedEvents.push(extend({}, eventDatas[parseInt(i.toString(), 10)], { Index: overlapIndex + i }, true));
|
|
20720
20893
|
}
|
|
20721
20894
|
}
|
|
20722
|
-
break;
|
|
20895
|
+
return "break";
|
|
20723
20896
|
}
|
|
20897
|
+
};
|
|
20898
|
+
var this_2 = this;
|
|
20899
|
+
for (var a = 0; a < eventDatas.length; a++) {
|
|
20900
|
+
var state_1 = _loop_2(a);
|
|
20901
|
+
if (typeof state_1 === "object")
|
|
20902
|
+
return state_1.value;
|
|
20903
|
+
if (state_1 === "break")
|
|
20904
|
+
break;
|
|
20724
20905
|
}
|
|
20725
20906
|
};
|
|
20726
20907
|
// eslint-disable-next-line max-len
|
|
@@ -20746,13 +20927,16 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20746
20927
|
}
|
|
20747
20928
|
else {
|
|
20748
20929
|
index = rowIndex + 1;
|
|
20749
|
-
width = this.cellWidth;
|
|
20930
|
+
width = this.isResource ? eventObj.isSpanned.count * this.cellWidth : this.cellWidth;
|
|
20750
20931
|
}
|
|
20751
20932
|
var rowTd = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + index + ") td");
|
|
20752
20933
|
var top = rowTd.offsetTop + this.cellHeader + (this.eventHeight * eventObj.Index) + EVENT_GAP$2;
|
|
20753
20934
|
setStyleAttribute(wrap, {
|
|
20754
20935
|
'width': width + 'px', 'height': this.eventHeight + 'px', 'left': left + 'px', 'right': right + 'px', 'top': top + 'px'
|
|
20755
20936
|
});
|
|
20937
|
+
if (!this.isResource && this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20938
|
+
wrap.setAttribute('data-index', eventObj.Index.toString());
|
|
20939
|
+
}
|
|
20756
20940
|
var args = { data: eventObj, element: wrap, cancel: false, type: 'event' };
|
|
20757
20941
|
this.parent.trigger(eventRendered, args, function (eventArgs) {
|
|
20758
20942
|
if (!eventArgs.cancel) {
|
|
@@ -20858,6 +21042,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20858
21042
|
var appointmentDetails = createElement('div', { className: APPOINTMENT_DETAILS });
|
|
20859
21043
|
append(templateElement, appointmentDetails);
|
|
20860
21044
|
eventWrapper.appendChild(appointmentDetails);
|
|
21045
|
+
this.parent.eventBase.renderSpannedIcon(eventWrapper, record.isSpanned);
|
|
20861
21046
|
this.renderResizeHandler(eventWrapper, record.data, record[this.fields.isReadonly]);
|
|
20862
21047
|
this.applyResourceColor(eventWrapper, eventObj, 'backgroundColor', this.groupOrder);
|
|
20863
21048
|
return eventWrapper;
|
|
@@ -20869,24 +21054,28 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20869
21054
|
var eventStart = eventData[this.fields.startTime];
|
|
20870
21055
|
var eventEnd = eventData[this.fields.endTime];
|
|
20871
21056
|
var isSpanned = { isLeft: false, isRight: false, count: 1 };
|
|
21057
|
+
var yearStart = new Date(this.parent.selectedDate.getFullYear(), this.parent.firstMonthOfYear, 1);
|
|
21058
|
+
var yearEnd = addMonths(yearStart, this.parent.monthsCount);
|
|
20872
21059
|
if (this.isResource) {
|
|
20873
21060
|
this.updateSpannedEvents(eventObj, monthStart, monthEnd);
|
|
20874
21061
|
}
|
|
20875
|
-
if (
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
isSpanned.isRight = true;
|
|
21062
|
+
if (this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21063
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, yearStart, yearEnd, eventData, isSpanned);
|
|
21064
|
+
var originalStartTime = eventData[this.fields.startTime];
|
|
21065
|
+
var originalEndTime = new Date(eventData[this.fields.endTime] - 1);
|
|
21066
|
+
isSpanned.count = (originalEndTime.getMonth() - originalStartTime.getMonth()) +
|
|
21067
|
+
(this.parent.monthsCount * (originalEndTime.getFullYear() - originalStartTime.getFullYear())) + 1;
|
|
20882
21068
|
}
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
21069
|
+
else {
|
|
21070
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, monthStart, monthEnd, eventData, isSpanned);
|
|
21071
|
+
if (this.parent.activeViewOptions.group.resources.length === 0 || this.parent.uiStateValues.isGroupAdaptive) {
|
|
21072
|
+
var end = resetTime(eventData[this.fields.endTime]).getTime();
|
|
21073
|
+
var start = resetTime(eventData[this.fields.startTime]).getTime();
|
|
21074
|
+
if (eventObj[this.fields.isAllDay] && end === eventObj[this.fields.endTime].getTime() || isSpanned.isRight) {
|
|
21075
|
+
end = addDays(new Date(end), -1).getTime();
|
|
21076
|
+
}
|
|
21077
|
+
isSpanned.count = Math.ceil((end - start) / MS_PER_DAY) + 1;
|
|
20888
21078
|
}
|
|
20889
|
-
isSpanned.count = Math.ceil((end - start) / MS_PER_DAY) + 1;
|
|
20890
21079
|
}
|
|
20891
21080
|
eventData.isSpanned = isSpanned;
|
|
20892
21081
|
if (resetTime(eventStart).getTime() < resetTime(this.parent.minDate).getTime()) {
|
|
@@ -20897,6 +21086,16 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20897
21086
|
}
|
|
20898
21087
|
return eventData;
|
|
20899
21088
|
};
|
|
21089
|
+
YearEvent.prototype.updateSpannedEventDetails = function (eventStart, eventEnd, viewStart, viewEnd, eventObj, isSpanned) {
|
|
21090
|
+
if (eventStart.getTime() < viewStart.getTime()) {
|
|
21091
|
+
eventObj[this.fields.startTime] = viewStart;
|
|
21092
|
+
isSpanned.isLeft = true;
|
|
21093
|
+
}
|
|
21094
|
+
if (eventEnd.getTime() > viewEnd.getTime()) {
|
|
21095
|
+
eventObj[this.fields.endTime] = viewEnd;
|
|
21096
|
+
isSpanned.isRight = true;
|
|
21097
|
+
}
|
|
21098
|
+
};
|
|
20900
21099
|
YearEvent.prototype.getOverlapEvents = function (date, appointments) {
|
|
20901
21100
|
var appointmentsList = [];
|
|
20902
21101
|
var dateStart;
|
|
@@ -20920,19 +21119,11 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20920
21119
|
var app = appointments_1[_i];
|
|
20921
21120
|
var appStart = new Date(app[this.fields.startTime].getTime());
|
|
20922
21121
|
var appEnd = new Date(app[this.fields.endTime].getTime());
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
}
|
|
20929
|
-
else {
|
|
20930
|
-
var timeCondition = app[this.fields.isAllDay] ? resetTime(appEnd).getTime() > dateStart :
|
|
20931
|
-
resetTime(appEnd).getTime() >= dateStart;
|
|
20932
|
-
if (((resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
20933
|
-
(resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
|
|
20934
|
-
appointmentsList.push(app);
|
|
20935
|
-
}
|
|
21122
|
+
var timeCondition = app[this.fields.isAllDay] ? resetTime(appEnd).getTime() > dateStart :
|
|
21123
|
+
resetTime(appEnd).getTime() >= dateStart;
|
|
21124
|
+
if (((resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
21125
|
+
(resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
|
|
21126
|
+
appointmentsList.push(app);
|
|
20936
21127
|
}
|
|
20937
21128
|
}
|
|
20938
21129
|
return appointmentsList;
|
|
@@ -22702,9 +22893,9 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22702
22893
|
append(quickTemplate, tdElement);
|
|
22703
22894
|
}
|
|
22704
22895
|
else {
|
|
22705
|
-
|
|
22706
|
-
|
|
22707
|
-
|
|
22896
|
+
var resourceText = createElement('div', { className: className });
|
|
22897
|
+
resourceText.innerText = this.parent.sanitize(tdData.resourceData[tdData.resource.textField]);
|
|
22898
|
+
tdElement.appendChild(resourceText);
|
|
22708
22899
|
}
|
|
22709
22900
|
};
|
|
22710
22901
|
ViewBase.prototype.renderResourceMobileLayout = function () {
|
|
@@ -22728,7 +22919,6 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22728
22919
|
var colElements = this.getColElements();
|
|
22729
22920
|
var contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
22730
22921
|
var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
|
|
22731
|
-
colElements.forEach(function (col) { return setStyleAttribute(col, { 'width': formatUnit(colWidth_1) }); });
|
|
22732
22922
|
if (content.offsetHeight !== content.clientHeight) {
|
|
22733
22923
|
var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
22734
22924
|
if (!isNullOrUndefined(resourceColumn)) {
|
|
@@ -22958,8 +23148,8 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22958
23148
|
var content = this.getScrollableElement();
|
|
22959
23149
|
var header = this.getDatesHeaderElement();
|
|
22960
23150
|
var scrollerHeight = this.parent.element.offsetHeight - headerBarHeight - header.offsetHeight;
|
|
22961
|
-
this.setColWidth(content);
|
|
22962
23151
|
this.setContentHeight(content, timeCells, scrollerHeight);
|
|
23152
|
+
this.setColWidth(content);
|
|
22963
23153
|
var scrollBarWidth = getScrollBarWidth();
|
|
22964
23154
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22965
23155
|
header.firstElementChild.style[args.cssProperties.rtlBorder] = '';
|
|
@@ -24270,9 +24460,11 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
24270
24460
|
if (!this.parent.isMinMaxDate(data.date)) {
|
|
24271
24461
|
data.className.push(DISABLE_DATES);
|
|
24272
24462
|
}
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24463
|
+
this.updateSelectedCellClass(data);
|
|
24464
|
+
};
|
|
24465
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24466
|
+
Month.prototype.updateSelectedCellClass = function (data) {
|
|
24467
|
+
return;
|
|
24276
24468
|
};
|
|
24277
24469
|
Month.prototype.isOtherMonth = function (date) {
|
|
24278
24470
|
return date.getTime() < this.monthDates.start.getTime() || date.getTime() > this.monthDates.end.getTime();
|
|
@@ -24620,6 +24812,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24620
24812
|
calendarElement.appendChild(this.renderCalendarContent(currentMonth));
|
|
24621
24813
|
calendarWrapper.appendChild(calendarElement);
|
|
24622
24814
|
}
|
|
24815
|
+
this.renderDates.splice(0, 1);
|
|
24623
24816
|
};
|
|
24624
24817
|
Year.prototype.renderCalendarHeader = function (currentDate) {
|
|
24625
24818
|
var headerWrapper = createElement('div', { className: 'e-header e-month' });
|
|
@@ -24679,7 +24872,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24679
24872
|
var date = weekDates_1[_i];
|
|
24680
24873
|
var td = createElement('td', {
|
|
24681
24874
|
className: 'e-cell ' + WORK_CELLS_CLASS,
|
|
24682
|
-
attrs: { '
|
|
24875
|
+
attrs: { 'data-date': date.getTime().toString() }
|
|
24683
24876
|
});
|
|
24684
24877
|
if (this.parent.activeViewOptions.cellHeaderTemplate) {
|
|
24685
24878
|
var args = { date: date, type: 'monthCells' };
|
|
@@ -24707,6 +24900,9 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24707
24900
|
addClass([td], classList$$1);
|
|
24708
24901
|
}
|
|
24709
24902
|
tr_1.appendChild(td);
|
|
24903
|
+
if (currentDate.getMonth() === date.getMonth()) {
|
|
24904
|
+
this.renderDates.push(new Date(date));
|
|
24905
|
+
}
|
|
24710
24906
|
if (!this.parent.isMinMaxDate(date)) {
|
|
24711
24907
|
addClass([td], DISABLE_DATES);
|
|
24712
24908
|
}
|
|
@@ -25078,9 +25274,13 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
25078
25274
|
if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
|
|
25079
25275
|
eventSubject += ',';
|
|
25080
25276
|
}
|
|
25081
|
-
|
|
25277
|
+
var appSubjectText = createElement('div', { className: SUBJECT_CLASS });
|
|
25278
|
+
appSubjectText.innerText = this.parent.sanitize(eventSubject);
|
|
25279
|
+
appSubjectWrap.appendChild(appSubjectText);
|
|
25082
25280
|
if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
|
|
25083
|
-
|
|
25281
|
+
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
25282
|
+
appLocation.innerText = this.parent.sanitize(eventLocation);
|
|
25283
|
+
appSubjectWrap.appendChild(appLocation);
|
|
25084
25284
|
}
|
|
25085
25285
|
if (!isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
|
|
25086
25286
|
var iconClass = (event[fieldMapping.id] === event[fieldMapping.recurrenceID]) ?
|
|
@@ -25863,6 +26063,11 @@ var MonthAgenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25863
26063
|
}
|
|
25864
26064
|
return 'abbreviated';
|
|
25865
26065
|
};
|
|
26066
|
+
MonthAgenda.prototype.updateSelectedCellClass = function (data) {
|
|
26067
|
+
if (resetTime(data.date).getTime() === resetTime(this.monthAgendaDate).getTime()) {
|
|
26068
|
+
data.className.push(SELECTED_CELL_CLASS);
|
|
26069
|
+
}
|
|
26070
|
+
};
|
|
25866
26071
|
MonthAgenda.prototype.setEventWrapperHeight = function () {
|
|
25867
26072
|
var headerHeight = (this.parent.headerModule ? this.parent.headerModule.getHeaderElement().offsetHeight : 0) + 2;
|
|
25868
26073
|
var resourceWrapper = this.parent.element.querySelector('.' + RESOURCE_HEADER_TOOLBAR);
|
|
@@ -26735,15 +26940,15 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26735
26940
|
this.parent.virtualScrollModule.renderVirtualTrack(content);
|
|
26736
26941
|
}
|
|
26737
26942
|
var contentTBody = contentTable.querySelector('tbody');
|
|
26738
|
-
if (this.parent.
|
|
26739
|
-
|
|
26740
|
-
|
|
26741
|
-
|
|
26742
|
-
|
|
26743
|
-
addClassTable.push(monthHeader);
|
|
26744
|
-
}
|
|
26745
|
-
addClass(addClassTable, AUTO_HEIGHT);
|
|
26943
|
+
if (this.parent.rowAutoHeight) {
|
|
26944
|
+
var addClassTable = [contentTable];
|
|
26945
|
+
var monthHeader = this.parent.element.querySelector('.' + MONTH_HEADER_WRAPPER + ' .' + SCHEDULE_TABLE_CLASS);
|
|
26946
|
+
if (monthHeader) {
|
|
26947
|
+
addClassTable.push(monthHeader);
|
|
26746
26948
|
}
|
|
26949
|
+
addClass(addClassTable, AUTO_HEIGHT);
|
|
26950
|
+
}
|
|
26951
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
26747
26952
|
var colCount = this.parent.activeViewOptions.orientation === 'Horizontal' ? this.colLevels.slice(-1)[0].length : this.columnCount;
|
|
26748
26953
|
contentTable.appendChild(this.createTableColGroup(colCount));
|
|
26749
26954
|
this.renderResourceContent(eventWrapper, monthTBody, contentTBody);
|
|
@@ -26845,6 +27050,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26845
27050
|
if (td.classList.contains(OTHERMONTH_CLASS)) {
|
|
26846
27051
|
continue;
|
|
26847
27052
|
}
|
|
27053
|
+
else {
|
|
27054
|
+
this.renderDates.push(new Date(date));
|
|
27055
|
+
}
|
|
26848
27056
|
td.appendChild(dateHeader);
|
|
26849
27057
|
if (isDateAvail) {
|
|
26850
27058
|
td.setAttribute('data-date', date.getTime().toString());
|
|
@@ -26859,6 +27067,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26859
27067
|
}
|
|
26860
27068
|
}
|
|
26861
27069
|
}
|
|
27070
|
+
this.renderDates.splice(0, 1);
|
|
26862
27071
|
};
|
|
26863
27072
|
TimelineYear.prototype.getContentRows = function () {
|
|
26864
27073
|
var tRow = [];
|