@syncfusion/ej2-schedule 20.4.53 → 21.1.35
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 +15 -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 +321 -134
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +356 -155
- 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 +10 -9
- 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 +39 -7
- 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 +1 -0
- package/src/schedule/event-renderer/event-base.js +26 -9
- 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 +2 -1
- 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];
|
|
@@ -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);
|
|
@@ -6332,9 +6353,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6332
6353
|
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
6333
6354
|
}
|
|
6334
6355
|
else {
|
|
6335
|
-
var appointmentSubject = createElement('div', {
|
|
6336
|
-
|
|
6337
|
-
});
|
|
6356
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6357
|
+
appointmentSubject.innerText = this.parent.sanitize(eventSubject);
|
|
6338
6358
|
templateElement = [appointmentSubject];
|
|
6339
6359
|
}
|
|
6340
6360
|
append(templateElement, appointmentWrapper);
|
|
@@ -6517,6 +6537,29 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6517
6537
|
return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] :
|
|
6518
6538
|
eventArgs || e;
|
|
6519
6539
|
};
|
|
6540
|
+
EventBase.prototype.renderSpannedIcon = function (element, spanEvent) {
|
|
6541
|
+
var iconElement = createElement('div', { className: EVENT_INDICATOR_CLASS + ' ' + ICON });
|
|
6542
|
+
if (spanEvent.isLeft) {
|
|
6543
|
+
var iconLeft = iconElement.cloneNode();
|
|
6544
|
+
addClass([iconLeft], EVENT_ICON_LEFT_CLASS);
|
|
6545
|
+
prepend([iconLeft], element);
|
|
6546
|
+
}
|
|
6547
|
+
if (spanEvent.isRight) {
|
|
6548
|
+
var iconRight = iconElement.cloneNode();
|
|
6549
|
+
addClass([iconRight], EVENT_ICON_RIGHT_CLASS);
|
|
6550
|
+
append([iconRight], element);
|
|
6551
|
+
}
|
|
6552
|
+
if (spanEvent.isTop) {
|
|
6553
|
+
var iconTop = iconElement.cloneNode();
|
|
6554
|
+
addClass([iconTop], EVENT_ICON_UP_CLASS);
|
|
6555
|
+
prepend([iconTop], element);
|
|
6556
|
+
}
|
|
6557
|
+
if (spanEvent.isBottom) {
|
|
6558
|
+
var iconBottom = iconElement.cloneNode();
|
|
6559
|
+
addClass([iconBottom], EVENT_ICON_DOWN_CLASS);
|
|
6560
|
+
append([iconBottom], element);
|
|
6561
|
+
}
|
|
6562
|
+
};
|
|
6520
6563
|
EventBase.prototype.unWireEvents = function () {
|
|
6521
6564
|
var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
6522
6565
|
for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
|
|
@@ -6871,7 +6914,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6871
6914
|
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
6872
6915
|
}
|
|
6873
6916
|
else {
|
|
6874
|
-
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS
|
|
6917
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
6918
|
+
appointmentSubject.innerText = this.parent.sanitize(recordSubject);
|
|
6875
6919
|
if (isAllDay) {
|
|
6876
6920
|
if (record[fieldMapping.isAllDay]) {
|
|
6877
6921
|
templateElement = [appointmentSubject];
|
|
@@ -6903,10 +6947,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6903
6947
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
|
|
6904
6948
|
innerHTML: timeStr
|
|
6905
6949
|
});
|
|
6906
|
-
var appointmentLocation = createElement('div', {
|
|
6907
|
-
|
|
6908
|
-
innerHTML: (record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || '')
|
|
6909
|
-
});
|
|
6950
|
+
var appointmentLocation = createElement('div', { className: LOCATION_CLASS });
|
|
6951
|
+
appointmentLocation.innerText = this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''));
|
|
6910
6952
|
templateElement = [appointmentSubject, appointmentTime, appointmentLocation];
|
|
6911
6953
|
}
|
|
6912
6954
|
}
|
|
@@ -6923,7 +6965,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6923
6965
|
appointmentWrapper.appendChild(recurrenceIcon);
|
|
6924
6966
|
}
|
|
6925
6967
|
}
|
|
6926
|
-
this.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
|
|
6968
|
+
this.parent.eventBase.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
|
|
6927
6969
|
if (!isNullOrUndefined(this.cssClass)) {
|
|
6928
6970
|
addClass([appointmentWrapper], this.cssClass);
|
|
6929
6971
|
}
|
|
@@ -6955,29 +6997,6 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6955
6997
|
countCell.innerHTML = '+' + this.parent.globalize.formatNumber(moreCount) + ' ' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more'));
|
|
6956
6998
|
}
|
|
6957
6999
|
};
|
|
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
7000
|
VerticalEvent.prototype.isSpannedEvent = function (record, day, resource) {
|
|
6982
7001
|
var currentDate = resetTime(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)]);
|
|
6983
7002
|
var renderedDate = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) || [currentDate];
|
|
@@ -7821,10 +7840,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7821
7840
|
}
|
|
7822
7841
|
else {
|
|
7823
7842
|
var eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
|
|
7824
|
-
var appointmentSubject = createElement('div', {
|
|
7825
|
-
|
|
7826
|
-
innerHTML: (eventSubject + (eventLocation ? '; ' + eventLocation : ''))
|
|
7827
|
-
});
|
|
7843
|
+
var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
7844
|
+
appointmentSubject.innerText = this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')));
|
|
7828
7845
|
var appointmentStartTime = createElement('div', {
|
|
7829
7846
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
|
|
7830
7847
|
innerHTML: this.parent.getTimeString(eventData[this.fields.startTime])
|
|
@@ -7867,7 +7884,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7867
7884
|
var appTime = createElement('div', {
|
|
7868
7885
|
className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''), innerHTML: timeString
|
|
7869
7886
|
});
|
|
7870
|
-
var appLocation = createElement('div', { className: LOCATION_CLASS
|
|
7887
|
+
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
7888
|
+
appLocation.innerText = this.parent.sanitize(eventLocation);
|
|
7871
7889
|
innerElement = [appointmentSubject, appTime, appLocation];
|
|
7872
7890
|
}
|
|
7873
7891
|
var wrap = createElement('div', { className: 'e-inner-wrap' });
|
|
@@ -9099,6 +9117,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9099
9117
|
cssClass: QUICK_DIALOG_CLASS,
|
|
9100
9118
|
closeOnEscape: true,
|
|
9101
9119
|
enableRtl: this.parent.enableRtl,
|
|
9120
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
9102
9121
|
beforeClose: this.beforeQuickDialogClose.bind(this),
|
|
9103
9122
|
isModal: true,
|
|
9104
9123
|
position: { X: 'center', Y: 'center' },
|
|
@@ -9130,6 +9149,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9130
9149
|
cssClass: className,
|
|
9131
9150
|
disabled: isDisabled,
|
|
9132
9151
|
enableRtl: this.parent.enableRtl,
|
|
9152
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
9133
9153
|
iconCss: iconName
|
|
9134
9154
|
});
|
|
9135
9155
|
buttonObj.appendTo(element);
|
|
@@ -9325,7 +9345,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9325
9345
|
append(templateElement, appointmentElement);
|
|
9326
9346
|
}
|
|
9327
9347
|
else {
|
|
9328
|
-
appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS
|
|
9348
|
+
appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS }));
|
|
9349
|
+
appointmentElement.firstElementChild.innerText = this_1.parent.sanitize(eventText);
|
|
9329
9350
|
}
|
|
9330
9351
|
if (!isNullOrUndefined(groupIndex)) {
|
|
9331
9352
|
appointmentElement.setAttribute('data-group-index', groupIndex);
|
|
@@ -9579,10 +9600,14 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9579
9600
|
("<button class=\"" + (DELETE_CLASS + ' ' + ICON) + "\" title=\"" + this.l10n.getConstant('delete') + "\"></button>") +
|
|
9580
9601
|
("<button class=\"" + CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") +
|
|
9581
9602
|
("<div class=\"" + SUBJECT_WRAP + "\"><div class=\"" + SUBJECT_CLASS + " " + TEXT_ELLIPSIS + "\" ") +
|
|
9582
|
-
("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\"
|
|
9603
|
+
("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\"></div></div >");
|
|
9583
9604
|
break;
|
|
9584
9605
|
}
|
|
9585
9606
|
var templateWrapper = createElement('div', { innerHTML: header });
|
|
9607
|
+
if (headerType === 'Event') {
|
|
9608
|
+
var subjectText = templateWrapper.querySelector('.' + SUBJECT_CLASS);
|
|
9609
|
+
subjectText.innerText = this.parent.sanitize(args.eventSubject);
|
|
9610
|
+
}
|
|
9586
9611
|
append([].slice.call(templateWrapper.childNodes), headerTemplate);
|
|
9587
9612
|
}
|
|
9588
9613
|
return headerTemplate;
|
|
@@ -9610,7 +9635,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9610
9635
|
(TEXT_ELLIPSIS + "\">" + cellDetails.details + "</div></div>") +
|
|
9611
9636
|
((this.parent.activeViewOptions.group.resources.length > 0 ? "<div class=\"" + RESOURCE_CLASS + "\">" +
|
|
9612
9637
|
("<div class=\"" + RESOURCE_ICON_CLASS + " " + ICON + " \"></div><div class=\"" + RESOURCE_DETAILS_CLASS + " ") +
|
|
9613
|
-
(TEXT_ELLIPSIS + "\"
|
|
9638
|
+
(TEXT_ELLIPSIS + "\"></div></div>") : '') + "</td></tr></tbody></table>");
|
|
9614
9639
|
break;
|
|
9615
9640
|
case 'Event':
|
|
9616
9641
|
argsData = this.getFormattedString(data);
|
|
@@ -9624,8 +9649,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9624
9649
|
content += '</div></div>';
|
|
9625
9650
|
if (data[this.parent.eventFields.location]) {
|
|
9626
9651
|
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>';
|
|
9652
|
+
ICON + '"></div><div class="' + LOCATION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9629
9653
|
}
|
|
9630
9654
|
if (data[this.parent.eventFields.startTimezone] || data[this.parent.eventFields.endTimezone]) {
|
|
9631
9655
|
content += '<div class="' + TIME_ZONE_CLASS + '"><div class="' + TIME_ZONE_ICON_CLASS + ' ' + ICON +
|
|
@@ -9634,17 +9658,33 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9634
9658
|
}
|
|
9635
9659
|
if (data[this.parent.eventFields.description]) {
|
|
9636
9660
|
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>';
|
|
9661
|
+
'"></div><div class="' + DESCRIPTION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9639
9662
|
}
|
|
9640
9663
|
if (this.parent.resourceCollection.length > 0) {
|
|
9641
9664
|
content += '<div class="' + RESOURCE_CLASS + '"><div class="' + RESOURCE_ICON_CLASS + ' ' + ICON +
|
|
9642
|
-
'"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '">'
|
|
9643
|
-
resourceText + '</div></div>';
|
|
9665
|
+
'"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
|
|
9644
9666
|
}
|
|
9645
9667
|
break;
|
|
9646
9668
|
}
|
|
9647
9669
|
var templateWrapper = createElement('div', { innerHTML: content });
|
|
9670
|
+
if (data[this.parent.eventFields.location]) {
|
|
9671
|
+
var locationDetails = templateWrapper.querySelector('.' + LOCATION_DETAILS_CLASS);
|
|
9672
|
+
if (!isNullOrUndefined(locationDetails)) {
|
|
9673
|
+
locationDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.location]);
|
|
9674
|
+
}
|
|
9675
|
+
}
|
|
9676
|
+
if (data[this.parent.eventFields.description]) {
|
|
9677
|
+
var descriptionDetails = templateWrapper.querySelector('.' + DESCRIPTION_DETAILS_CLASS);
|
|
9678
|
+
if (!isNullOrUndefined(descriptionDetails)) {
|
|
9679
|
+
descriptionDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.description]);
|
|
9680
|
+
}
|
|
9681
|
+
}
|
|
9682
|
+
if (resourceText) {
|
|
9683
|
+
var resourceDetails = templateWrapper.querySelector('.' + RESOURCE_DETAILS_CLASS);
|
|
9684
|
+
if (!isNullOrUndefined(resourceDetails)) {
|
|
9685
|
+
resourceDetails.innerText = this.parent.sanitize(resourceText);
|
|
9686
|
+
}
|
|
9687
|
+
}
|
|
9648
9688
|
append([].slice.call(templateWrapper.childNodes), contentTemplate);
|
|
9649
9689
|
}
|
|
9650
9690
|
return contentTemplate;
|
|
@@ -10182,7 +10222,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
10182
10222
|
};
|
|
10183
10223
|
QuickPopups.prototype.quickPopupClose = function () {
|
|
10184
10224
|
this.parent.eventBase.focusElement();
|
|
10185
|
-
this.quickPopup.relateTo = WORK_CELLS_CLASS;
|
|
10225
|
+
this.quickPopup.relateTo = '.' + WORK_CELLS_CLASS;
|
|
10186
10226
|
this.fieldValidator.destroyToolTip();
|
|
10187
10227
|
if (this.quickPopup.element.querySelectorAll('.e-formvalidator').length) {
|
|
10188
10228
|
this.fieldValidator.destroy();
|
|
@@ -10402,7 +10442,8 @@ var EventTooltip = /** @__PURE__ @class */ (function () {
|
|
|
10402
10442
|
target: this.getTargets(),
|
|
10403
10443
|
beforeRender: this.onBeforeRender.bind(this),
|
|
10404
10444
|
beforeClose: this.onBeforeClose.bind(this),
|
|
10405
|
-
enableRtl: this.parent.enableRtl
|
|
10445
|
+
enableRtl: this.parent.enableRtl,
|
|
10446
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer
|
|
10406
10447
|
});
|
|
10407
10448
|
this.tooltipObj.appendTo(this.parent.element);
|
|
10408
10449
|
}
|
|
@@ -11699,6 +11740,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11699
11740
|
content: this.getEventWindowContent(),
|
|
11700
11741
|
cssClass: EVENT_WINDOW_DIALOG_CLASS,
|
|
11701
11742
|
enableRtl: this.parent.enableRtl,
|
|
11743
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
11702
11744
|
height: this.parent.isAdaptive ? '100%' : 'auto',
|
|
11703
11745
|
minHeight: '300px',
|
|
11704
11746
|
isModal: true,
|
|
@@ -11909,6 +11951,10 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11909
11951
|
var _this = this;
|
|
11910
11952
|
if (!isNullOrUndefined(this.parent.editorTemplate)) {
|
|
11911
11953
|
if (args) {
|
|
11954
|
+
if (this.fieldValidator) {
|
|
11955
|
+
this.fieldValidator.destroy();
|
|
11956
|
+
this.fieldValidator = null;
|
|
11957
|
+
}
|
|
11912
11958
|
if (this.recurrenceEditor) {
|
|
11913
11959
|
this.recurrenceEditor.destroy();
|
|
11914
11960
|
this.recurrenceEditor = null;
|
|
@@ -12084,6 +12130,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12084
12130
|
if (resourceData.allowMultiple) {
|
|
12085
12131
|
var listObj = new MultiSelect({
|
|
12086
12132
|
enableRtl: this.parent.enableRtl,
|
|
12133
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12087
12134
|
cssClass: this.parent.cssClass || '',
|
|
12088
12135
|
dataSource: resourceData.dataSource,
|
|
12089
12136
|
change: this.onMultiselectResourceChange.bind(this),
|
|
@@ -12230,6 +12277,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12230
12277
|
change: this.onChange.bind(this),
|
|
12231
12278
|
cssClass: value + ' ' + this.parent.cssClass,
|
|
12232
12279
|
enableRtl: this.parent.enableRtl,
|
|
12280
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12233
12281
|
label: this.getFieldLabel(value)
|
|
12234
12282
|
});
|
|
12235
12283
|
checkBox.appendTo(checkBoxInput);
|
|
@@ -12356,6 +12404,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12356
12404
|
target: this.element,
|
|
12357
12405
|
animationSettings: { effect: 'Zoom' },
|
|
12358
12406
|
enableRtl: this.parent.enableRtl,
|
|
12407
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
12359
12408
|
isModal: true,
|
|
12360
12409
|
cssClass: REPEAT_DIALOG_CLASS,
|
|
12361
12410
|
open: this.repeatOpenDialog.bind(this)
|
|
@@ -12423,6 +12472,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12423
12472
|
if (!this.parent.eventSettings.allowAdding) {
|
|
12424
12473
|
return;
|
|
12425
12474
|
}
|
|
12475
|
+
if (this.parent.isAdaptive && repeatType && !this.repeatDialogObject) {
|
|
12476
|
+
this.renderRepeatDialog();
|
|
12477
|
+
}
|
|
12426
12478
|
this.element.querySelector('.' + FORM_CLASS).removeAttribute('data-id');
|
|
12427
12479
|
this.element.querySelector('.' + EVENT_WINDOW_TITLE_TEXT_CLASS).innerHTML = this.l10n.getConstant('newEvent');
|
|
12428
12480
|
eventObj.Timezone = false;
|
|
@@ -12452,10 +12504,18 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12452
12504
|
selectedType: !isNullOrUndefined(repeatType) ? repeatType : !isNullOrUndefined(eventObj[this.fields.recurrenceRule]) ?
|
|
12453
12505
|
this.recurrenceEditor.selectedType : 0
|
|
12454
12506
|
});
|
|
12507
|
+
this.repeatRule = this.recurrenceEditor.value;
|
|
12455
12508
|
}
|
|
12456
12509
|
if (this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
|
|
12457
12510
|
var element = this.element.querySelector('.' + REPEAT_CONTAINER_CLASS);
|
|
12458
|
-
|
|
12511
|
+
if (eventObj[this.fields.recurrenceRule] || repeatType) {
|
|
12512
|
+
removeClass([element], HIDE_STYLE_CLASS);
|
|
12513
|
+
this.repeatStatus.setProperties({ checked: true });
|
|
12514
|
+
}
|
|
12515
|
+
else {
|
|
12516
|
+
addClass([element], HIDE_STYLE_CLASS);
|
|
12517
|
+
this.repeatStatus.setProperties({ checked: false });
|
|
12518
|
+
}
|
|
12459
12519
|
this.updateRepeatLabel(this.repeatRule);
|
|
12460
12520
|
}
|
|
12461
12521
|
else {
|
|
@@ -13110,9 +13170,11 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13110
13170
|
}
|
|
13111
13171
|
var currentStartTime = new Date(+currentData[this.fields.startTime]);
|
|
13112
13172
|
var currentEndTime = new Date(+currentData[this.fields.endTime]);
|
|
13173
|
+
var nextStartTime;
|
|
13174
|
+
var nextEndTime;
|
|
13113
13175
|
if (index !== recurColl.length - 1) {
|
|
13114
|
-
|
|
13115
|
-
|
|
13176
|
+
nextStartTime = new Date(+recurColl[index + 1][this.fields.startTime]);
|
|
13177
|
+
nextEndTime = new Date(+recurColl[index + 1][this.fields.endTime]);
|
|
13116
13178
|
}
|
|
13117
13179
|
var lastEndTime = new Date(+recurColl[recurColl.length - 1][this.fields.endTime]);
|
|
13118
13180
|
if (index === 0) {
|
|
@@ -13311,7 +13373,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13311
13373
|
value = element.checked;
|
|
13312
13374
|
}
|
|
13313
13375
|
else {
|
|
13314
|
-
value =
|
|
13376
|
+
value = this.parent.sanitize(element.value);
|
|
13315
13377
|
}
|
|
13316
13378
|
}
|
|
13317
13379
|
return value;
|
|
@@ -14418,6 +14480,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14418
14480
|
if (this.parent.currentAction !== 'EditFollowingEvents' && !this.isBlockEvent(eventData)
|
|
14419
14481
|
&& this.parent.eventBase.isBlockRange(eventData)) {
|
|
14420
14482
|
this.parent.quickPopup.openValidationError('blockAlert', eventData);
|
|
14483
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
14421
14484
|
return;
|
|
14422
14485
|
}
|
|
14423
14486
|
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
@@ -15135,8 +15198,8 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
15135
15198
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15136
15199
|
};
|
|
15137
15200
|
/**
|
|
15138
|
-
* A
|
|
15139
|
-
* fields along with its available configuration settings. Each field in it accepts both string and
|
|
15201
|
+
* A class that holds the collection of event fields that requires to be mapped with the dataSource
|
|
15202
|
+
* fields along with its available configuration settings. Each field in it accepts both string and object
|
|
15140
15203
|
* data type. When each of the field is assigned with simple `string` value, it is assumed that the dataSource field
|
|
15141
15204
|
* name is mapped with it. If the `object` type is defined on each fields, then the validation related settings and mapping of
|
|
15142
15205
|
* those fields with dataSource can be given altogether within it.
|
|
@@ -15273,6 +15336,9 @@ var EventSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
15273
15336
|
__decorate$6([
|
|
15274
15337
|
Property()
|
|
15275
15338
|
], EventSettings.prototype, "sortComparer", void 0);
|
|
15339
|
+
__decorate$6([
|
|
15340
|
+
Property()
|
|
15341
|
+
], EventSettings.prototype, "includeFiltersInQuery", void 0);
|
|
15276
15342
|
return EventSettings;
|
|
15277
15343
|
}(ChildProperty));
|
|
15278
15344
|
|
|
@@ -15593,7 +15659,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15593
15659
|
classList(target, [RESOURCE_COLLAPSE_CLASS], [RESOURCE_EXPAND_CLASS]);
|
|
15594
15660
|
hide = false;
|
|
15595
15661
|
}
|
|
15596
|
-
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
15662
|
+
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS + ',.' + MORE_INDICATOR_CLASS));
|
|
15597
15663
|
for (var _i = 0, eventElements_1 = eventElements; _i < eventElements_1.length; _i++) {
|
|
15598
15664
|
var element = eventElements_1[_i];
|
|
15599
15665
|
remove(element);
|
|
@@ -15723,6 +15789,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15723
15789
|
this.treeViewObj = new TreeView({
|
|
15724
15790
|
cssClass: this.parent.cssClass,
|
|
15725
15791
|
enableRtl: this.parent.enableRtl,
|
|
15792
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
15726
15793
|
fields: {
|
|
15727
15794
|
dataSource: [].slice.call(this.generateTreeData()),
|
|
15728
15795
|
id: 'resourceId',
|
|
@@ -15827,10 +15894,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15827
15894
|
var resourceText = resourceLevel.dataSource.filter(function (resData) {
|
|
15828
15895
|
return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
|
|
15829
15896
|
});
|
|
15830
|
-
var resourceName = createElement('div', {
|
|
15831
|
-
|
|
15832
|
-
innerHTML: resourceText[0][resourceLevel.textField]
|
|
15833
|
-
});
|
|
15897
|
+
var resourceName = createElement('div', { className: RESOURCE_NAME });
|
|
15898
|
+
resourceName.innerText = this_2.parent.sanitize(resourceText[0][resourceLevel.textField]);
|
|
15834
15899
|
headerCollection.push(resourceName);
|
|
15835
15900
|
var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });
|
|
15836
15901
|
headerCollection.push(levelIcon);
|
|
@@ -15910,7 +15975,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15910
15975
|
var promises = [];
|
|
15911
15976
|
for (var _i = 0, _a = this.parent.resources; _i < _a.length; _i++) {
|
|
15912
15977
|
var resource = _a[_i];
|
|
15913
|
-
var dataModule = new Data(resource.dataSource, resource.query);
|
|
15978
|
+
var dataModule = new Data(this.parent, resource.dataSource, resource.query);
|
|
15914
15979
|
promises.push(dataModule.getData(dataModule.generateQuery()));
|
|
15915
15980
|
}
|
|
15916
15981
|
Promise.all(promises).then(function (e) { return _this.dataManagerSuccess(e, isSetModel); })
|
|
@@ -16610,7 +16675,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16610
16675
|
/**
|
|
16611
16676
|
* Method to render react templates
|
|
16612
16677
|
*
|
|
16613
|
-
* @param {Function}
|
|
16678
|
+
* @param {Function} callback - Specifies the callBack method
|
|
16614
16679
|
* @returns {void}
|
|
16615
16680
|
* @private
|
|
16616
16681
|
*/
|
|
@@ -16634,6 +16699,19 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16634
16699
|
this.clearTemplate(templates);
|
|
16635
16700
|
}
|
|
16636
16701
|
};
|
|
16702
|
+
/**
|
|
16703
|
+
* Method to sanitize any suspected untrusted strings and scripts before rendering them.
|
|
16704
|
+
*
|
|
16705
|
+
* @param {string} value - A string value representing the HTML string value to be sanitized.
|
|
16706
|
+
* @returns {string} A sanitized Html string.
|
|
16707
|
+
* @private
|
|
16708
|
+
*/
|
|
16709
|
+
Schedule.prototype.sanitize = function (value) {
|
|
16710
|
+
if (this.enableHtmlSanitizer) {
|
|
16711
|
+
return SanitizeHtmlHelper.sanitize(value);
|
|
16712
|
+
}
|
|
16713
|
+
return value;
|
|
16714
|
+
};
|
|
16637
16715
|
Schedule.prototype.initializeResources = function (isSetModel) {
|
|
16638
16716
|
if (isSetModel === void 0) { isSetModel = false; }
|
|
16639
16717
|
if (this.resources.length > 0) {
|
|
@@ -16847,7 +16925,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16847
16925
|
followingID: this.eventSettings.fields.followingID
|
|
16848
16926
|
};
|
|
16849
16927
|
this.setEditorTitles();
|
|
16850
|
-
this.dataModule = new Data(this.eventSettings.dataSource, this.eventSettings.query);
|
|
16928
|
+
this.dataModule = new Data(this, this.eventSettings.dataSource, this.eventSettings.query);
|
|
16851
16929
|
this.crudModule = new Crud(this);
|
|
16852
16930
|
};
|
|
16853
16931
|
Schedule.prototype.setEditorTitles = function () {
|
|
@@ -17267,7 +17345,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17267
17345
|
var selectedCells = this.getSelectedCells();
|
|
17268
17346
|
for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
|
|
17269
17347
|
var cell = selectedCells_1[_i];
|
|
17270
|
-
|
|
17348
|
+
if (this.currentView !== 'Year') {
|
|
17349
|
+
cell.setAttribute('aria-selected', 'false');
|
|
17350
|
+
}
|
|
17271
17351
|
cell.removeAttribute('tabindex');
|
|
17272
17352
|
}
|
|
17273
17353
|
removeClass(selectedCells, SELECTED_CELL_CLASS);
|
|
@@ -17285,9 +17365,11 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17285
17365
|
* @private
|
|
17286
17366
|
*/
|
|
17287
17367
|
Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {
|
|
17288
|
-
|
|
17289
|
-
var
|
|
17290
|
-
|
|
17368
|
+
if (this.currentView !== 'Year') {
|
|
17369
|
+
for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
|
|
17370
|
+
var cell = cells_1[_i];
|
|
17371
|
+
cell.setAttribute('aria-selected', 'true');
|
|
17372
|
+
}
|
|
17291
17373
|
}
|
|
17292
17374
|
addClass(cells, SELECTED_CELL_CLASS);
|
|
17293
17375
|
if (focusCell) {
|
|
@@ -18120,6 +18202,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18120
18202
|
case 'dataSource':
|
|
18121
18203
|
case 'query':
|
|
18122
18204
|
case 'fields':
|
|
18205
|
+
case 'includeFiltersInQuery':
|
|
18123
18206
|
this.initializeDataModule();
|
|
18124
18207
|
state.isDataManager = true;
|
|
18125
18208
|
break;
|
|
@@ -18522,6 +18605,17 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18522
18605
|
Schedule.prototype.addEvent = function (data) {
|
|
18523
18606
|
this.crudModule.addEvent(data);
|
|
18524
18607
|
};
|
|
18608
|
+
/**
|
|
18609
|
+
* Generates the occurrences of a single recurrence event based on the provided event.
|
|
18610
|
+
*
|
|
18611
|
+
* @function generateEventOccurrences
|
|
18612
|
+
* @param {Object} event Accepts the parent recurrence event from which the occurrences are generated.
|
|
18613
|
+
* @param {Date} startDate Accepts the start date for the event occurrences. If not provided, the event's start date will be used.
|
|
18614
|
+
* @returns {Object[]} Returns the collection of occurrence event objects.
|
|
18615
|
+
*/
|
|
18616
|
+
Schedule.prototype.generateEventOccurrences = function (event, startDate) {
|
|
18617
|
+
return (this.eventBase) ? this.eventBase.generateOccurrence(event, startDate) : [];
|
|
18618
|
+
};
|
|
18525
18619
|
/**
|
|
18526
18620
|
* Allows the Scheduler events data to be exported as an Excel file either in .xlsx or .csv file formats.
|
|
18527
18621
|
* By default, the whole event collection bound to the Scheduler gets exported as an Excel file.
|
|
@@ -19197,6 +19291,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19197
19291
|
__decorate([
|
|
19198
19292
|
Property(null)
|
|
19199
19293
|
], Schedule.prototype, "timeFormat", void 0);
|
|
19294
|
+
__decorate([
|
|
19295
|
+
Property(true)
|
|
19296
|
+
], Schedule.prototype, "enableHtmlSanitizer", void 0);
|
|
19200
19297
|
__decorate([
|
|
19201
19298
|
Property(false)
|
|
19202
19299
|
], Schedule.prototype, "enableAllDayScroll", void 0);
|
|
@@ -19450,6 +19547,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19450
19547
|
parseInt(this.actionObj.element.getAttribute('data-group-index'), 10) === this.actionObj.groupIndex : true;
|
|
19451
19548
|
if (+eventObj[this.parent.eventFields.startTime] === +this.actionObj.event[this.parent.eventFields.startTime] &&
|
|
19452
19549
|
+eventObj[this.parent.eventFields.endTime] === +this.actionObj.event[this.parent.eventFields.endTime] && isSameResource) {
|
|
19550
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
19453
19551
|
return;
|
|
19454
19552
|
}
|
|
19455
19553
|
if (eventObj[this.parent.eventFields.recurrenceRule]) {
|
|
@@ -19731,6 +19829,10 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19731
19829
|
}
|
|
19732
19830
|
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
19733
19831
|
}
|
|
19832
|
+
if (!isResize && this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length !== 0) {
|
|
19833
|
+
var eventObj = this.yearEvent.isSpannedEvent(event, event[this.parent.eventFields.startTime]);
|
|
19834
|
+
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
19835
|
+
}
|
|
19734
19836
|
var appointmentElement = this.createAppointmentElement(this.actionObj.groupIndex, event[this.parent.eventFields.subject]);
|
|
19735
19837
|
appointmentElement.setAttribute('drag', 'true');
|
|
19736
19838
|
addClass([appointmentElement], CLONE_ELEMENT_CLASS);
|
|
@@ -20514,8 +20616,9 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20514
20616
|
}
|
|
20515
20617
|
};
|
|
20516
20618
|
YearEvent.prototype.timelineYearViewEvents = function () {
|
|
20619
|
+
var _this = this;
|
|
20517
20620
|
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
|
|
20518
|
-
this.cellWidth = workCell.
|
|
20621
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
20519
20622
|
this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
|
|
20520
20623
|
var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20521
20624
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20541,10 +20644,10 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20541
20644
|
if (this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20542
20645
|
var wrapper_1 = wrapperCollection[parseInt(dayIndex.toString(), 10)];
|
|
20543
20646
|
td = dayIndex + 1;
|
|
20544
|
-
|
|
20545
|
-
if (!
|
|
20546
|
-
|
|
20547
|
-
wrapper_1.appendChild(
|
|
20647
|
+
eventWrapper = wrapper_1.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
|
|
20648
|
+
if (!eventWrapper) {
|
|
20649
|
+
eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
20650
|
+
wrapper_1.appendChild(eventWrapper);
|
|
20548
20651
|
}
|
|
20549
20652
|
if (this.parent.enableRtl) {
|
|
20550
20653
|
rightValue = row * this.cellWidth;
|
|
@@ -20597,8 +20700,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20597
20700
|
return "continue";
|
|
20598
20701
|
}
|
|
20599
20702
|
}
|
|
20600
|
-
|
|
20601
|
-
if (isRowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
20703
|
+
if (this_1.parent.rowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
20602
20704
|
this_1.renderEvent(eventWrapper, eventData, row, leftValue, rightValue, monthStart, dayIndex);
|
|
20603
20705
|
this_1.updateCellHeight(rowTd, availedHeight);
|
|
20604
20706
|
isSpannedCollection.push(eventData);
|
|
@@ -20624,6 +20726,19 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20624
20726
|
}
|
|
20625
20727
|
}
|
|
20626
20728
|
}
|
|
20729
|
+
if (this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20730
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
20731
|
+
var tr_1 = [].slice.call(this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
|
|
20732
|
+
appContainer.forEach(function (ele, index) {
|
|
20733
|
+
var app = [].slice.call(ele.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
20734
|
+
var appTop = tr_1[parseInt(index.toString(), 10)].offsetTop + _this.cellHeader + EVENT_GAP$2;
|
|
20735
|
+
app.forEach(function (app) {
|
|
20736
|
+
var overlap = parseInt(app.getAttribute('data-index'), 10);
|
|
20737
|
+
app.style.top = appTop + (overlap * _this.eventHeight) + 'px';
|
|
20738
|
+
app.removeAttribute('data-index');
|
|
20739
|
+
});
|
|
20740
|
+
});
|
|
20741
|
+
}
|
|
20627
20742
|
};
|
|
20628
20743
|
YearEvent.prototype.updateSpannedEvents = function (eventObj, dayStart, dayEnd) {
|
|
20629
20744
|
var isLeftRightResize = (this.isResource && this.parent.activeViewOptions.orientation === 'Vertical') ||
|
|
@@ -20638,7 +20753,8 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20638
20753
|
}
|
|
20639
20754
|
}
|
|
20640
20755
|
if ((dayEnd.getTime() >= eventObj[this.fields.endTime].getTime()) || (isLeftRightResize && !this.isResource &&
|
|
20641
|
-
addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth())
|
|
20756
|
+
addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth()) ||
|
|
20757
|
+
(isLeftRightResize && this.isResource && (dayEnd.getTime() <= eventObj[this.fields.endTime].getTime()))) {
|
|
20642
20758
|
if (isLeftRightResize) {
|
|
20643
20759
|
data.isRight = false;
|
|
20644
20760
|
}
|
|
@@ -20649,8 +20765,11 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20649
20765
|
eventObj.data = data;
|
|
20650
20766
|
};
|
|
20651
20767
|
YearEvent.prototype.timelineResourceEvents = function () {
|
|
20768
|
+
var _this = this;
|
|
20769
|
+
var contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
20770
|
+
var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
|
|
20652
20771
|
var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
20653
|
-
this.cellWidth = workCell.
|
|
20772
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
20654
20773
|
this.cellHeader = 0;
|
|
20655
20774
|
var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20656
20775
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20678,6 +20797,39 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20678
20797
|
}
|
|
20679
20798
|
}
|
|
20680
20799
|
}
|
|
20800
|
+
if (this.parent.rowAutoHeight && !isVerticalScrollbarAvail && contentTable.offsetWidth > contentTable.clientWidth) {
|
|
20801
|
+
var appointments = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
20802
|
+
appointments.forEach(function (ele) {
|
|
20803
|
+
ele.style.removeProperty('left');
|
|
20804
|
+
ele.style.removeProperty('right');
|
|
20805
|
+
});
|
|
20806
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
20807
|
+
var conTable_1 = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
20808
|
+
var tr_2 = [].slice.call(conTable_1.querySelectorAll('tbody tr'));
|
|
20809
|
+
appContainer.forEach(function (ele, index) {
|
|
20810
|
+
var appWrapper = [].slice.call(ele.children);
|
|
20811
|
+
var row = tr_2[parseInt(index.toString(), 10)];
|
|
20812
|
+
appWrapper.forEach(function (appWrap, cellIndex) {
|
|
20813
|
+
var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
|
|
20814
|
+
var app = [].slice.call(appWrap.children);
|
|
20815
|
+
var width = td.getBoundingClientRect().width;
|
|
20816
|
+
var left = td.offsetLeft;
|
|
20817
|
+
if (_this.parent.enableRtl) {
|
|
20818
|
+
var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
|
|
20819
|
+
app.forEach(function (app) {
|
|
20820
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
20821
|
+
app.style.right = right_1 + 'px';
|
|
20822
|
+
});
|
|
20823
|
+
}
|
|
20824
|
+
else {
|
|
20825
|
+
app.forEach(function (app) {
|
|
20826
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
20827
|
+
app.style.left = left + 'px';
|
|
20828
|
+
});
|
|
20829
|
+
}
|
|
20830
|
+
});
|
|
20831
|
+
});
|
|
20832
|
+
}
|
|
20681
20833
|
};
|
|
20682
20834
|
YearEvent.prototype.renderResourceEvent = function (wrapper, resource, month, index, monthStart) {
|
|
20683
20835
|
var eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
@@ -20688,39 +20840,60 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20688
20840
|
var td = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + (rowIndex + 1) + ") td");
|
|
20689
20841
|
this.cellHeight = td.offsetHeight;
|
|
20690
20842
|
this.groupOrder = resource.groupOrder;
|
|
20691
|
-
|
|
20843
|
+
var isSpannedCollection = [];
|
|
20844
|
+
var _loop_2 = function (a) {
|
|
20692
20845
|
var data = eventDatas[parseInt(a.toString(), 10)];
|
|
20693
20846
|
var overlapIndex = void 0;
|
|
20694
20847
|
var eventData = extend({}, data, null, true);
|
|
20695
|
-
if (
|
|
20696
|
-
var eventObj =
|
|
20697
|
-
overlapIndex =
|
|
20848
|
+
if (this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
20849
|
+
var eventObj = this_2.isSpannedEvent(eventData, monthStart);
|
|
20850
|
+
overlapIndex = this_2.getIndex(eventObj[this_2.fields.startTime]);
|
|
20698
20851
|
eventData.Index = overlapIndex;
|
|
20699
20852
|
}
|
|
20700
20853
|
else {
|
|
20701
|
-
overlapIndex =
|
|
20854
|
+
overlapIndex = this_2.getIndex(eventData[this_2.fields.startTime]);
|
|
20702
20855
|
eventData.Index = overlapIndex;
|
|
20703
20856
|
}
|
|
20704
|
-
var availedHeight =
|
|
20705
|
-
var leftValue = (
|
|
20706
|
-
month *
|
|
20707
|
-
if (!
|
|
20708
|
-
return;
|
|
20857
|
+
var availedHeight = this_2.cellHeader + (this_2.eventHeight * (a + 1)) + EVENT_GAP$2 + this_2.moreIndicatorHeight;
|
|
20858
|
+
var leftValue = (this_2.parent.activeViewOptions.orientation === 'Vertical') ?
|
|
20859
|
+
month * this_2.cellWidth : index * this_2.cellWidth;
|
|
20860
|
+
if (!this_2.parent.isMinMaxDate(eventData[this_2.fields.startTime])) {
|
|
20861
|
+
return { value: void 0 };
|
|
20862
|
+
}
|
|
20863
|
+
if (this_2.parent.activeViewOptions.orientation === 'Vertical' && this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
20864
|
+
var isRendered = this_2.renderedEvents.filter(function (eventObj) {
|
|
20865
|
+
return eventObj.Guid === eventData.Guid;
|
|
20866
|
+
});
|
|
20867
|
+
var isSpanned = isSpannedCollection.filter(function (eventObj) {
|
|
20868
|
+
return eventObj.Guid === eventData.Guid;
|
|
20869
|
+
});
|
|
20870
|
+
if (isRendered.length > 0 || isSpanned.length > 0) {
|
|
20871
|
+
return "continue";
|
|
20872
|
+
}
|
|
20709
20873
|
}
|
|
20710
|
-
if (
|
|
20711
|
-
|
|
20712
|
-
|
|
20874
|
+
if (this_2.parent.rowAutoHeight || this_2.cellHeight > availedHeight) {
|
|
20875
|
+
this_2.renderEvent(eventWrapper, eventData, month, leftValue, leftValue, monthStart, index);
|
|
20876
|
+
this_2.updateCellHeight(td, availedHeight);
|
|
20877
|
+
isSpannedCollection.push(eventData);
|
|
20713
20878
|
}
|
|
20714
20879
|
else {
|
|
20715
|
-
var moreIndex =
|
|
20716
|
-
|
|
20717
|
-
if (
|
|
20880
|
+
var moreIndex = this_2.parent.activeViewOptions.orientation === 'Horizontal' ? month : index;
|
|
20881
|
+
this_2.renderMoreIndicator(eventWrapper, eventDatas.length - a, monthStart, moreIndex, leftValue, leftValue, index);
|
|
20882
|
+
if (this_2.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
20718
20883
|
for (var i = index; i < eventDatas.length; i++) {
|
|
20719
|
-
|
|
20884
|
+
this_2.renderedEvents.push(extend({}, eventDatas[parseInt(i.toString(), 10)], { Index: overlapIndex + i }, true));
|
|
20720
20885
|
}
|
|
20721
20886
|
}
|
|
20722
|
-
break;
|
|
20887
|
+
return "break";
|
|
20723
20888
|
}
|
|
20889
|
+
};
|
|
20890
|
+
var this_2 = this;
|
|
20891
|
+
for (var a = 0; a < eventDatas.length; a++) {
|
|
20892
|
+
var state_1 = _loop_2(a);
|
|
20893
|
+
if (typeof state_1 === "object")
|
|
20894
|
+
return state_1.value;
|
|
20895
|
+
if (state_1 === "break")
|
|
20896
|
+
break;
|
|
20724
20897
|
}
|
|
20725
20898
|
};
|
|
20726
20899
|
// eslint-disable-next-line max-len
|
|
@@ -20746,13 +20919,16 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20746
20919
|
}
|
|
20747
20920
|
else {
|
|
20748
20921
|
index = rowIndex + 1;
|
|
20749
|
-
width = this.cellWidth;
|
|
20922
|
+
width = this.isResource ? eventObj.isSpanned.count * this.cellWidth : this.cellWidth;
|
|
20750
20923
|
}
|
|
20751
20924
|
var rowTd = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + index + ") td");
|
|
20752
20925
|
var top = rowTd.offsetTop + this.cellHeader + (this.eventHeight * eventObj.Index) + EVENT_GAP$2;
|
|
20753
20926
|
setStyleAttribute(wrap, {
|
|
20754
20927
|
'width': width + 'px', 'height': this.eventHeight + 'px', 'left': left + 'px', 'right': right + 'px', 'top': top + 'px'
|
|
20755
20928
|
});
|
|
20929
|
+
if (!this.isResource && this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20930
|
+
wrap.setAttribute('data-index', eventObj.Index.toString());
|
|
20931
|
+
}
|
|
20756
20932
|
var args = { data: eventObj, element: wrap, cancel: false, type: 'event' };
|
|
20757
20933
|
this.parent.trigger(eventRendered, args, function (eventArgs) {
|
|
20758
20934
|
if (!eventArgs.cancel) {
|
|
@@ -20858,6 +21034,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20858
21034
|
var appointmentDetails = createElement('div', { className: APPOINTMENT_DETAILS });
|
|
20859
21035
|
append(templateElement, appointmentDetails);
|
|
20860
21036
|
eventWrapper.appendChild(appointmentDetails);
|
|
21037
|
+
this.parent.eventBase.renderSpannedIcon(eventWrapper, record.isSpanned);
|
|
20861
21038
|
this.renderResizeHandler(eventWrapper, record.data, record[this.fields.isReadonly]);
|
|
20862
21039
|
this.applyResourceColor(eventWrapper, eventObj, 'backgroundColor', this.groupOrder);
|
|
20863
21040
|
return eventWrapper;
|
|
@@ -20869,24 +21046,28 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20869
21046
|
var eventStart = eventData[this.fields.startTime];
|
|
20870
21047
|
var eventEnd = eventData[this.fields.endTime];
|
|
20871
21048
|
var isSpanned = { isLeft: false, isRight: false, count: 1 };
|
|
21049
|
+
var yearStart = new Date(this.parent.selectedDate.getFullYear(), this.parent.firstMonthOfYear, 1);
|
|
21050
|
+
var yearEnd = addMonths(yearStart, this.parent.monthsCount);
|
|
20872
21051
|
if (this.isResource) {
|
|
20873
21052
|
this.updateSpannedEvents(eventObj, monthStart, monthEnd);
|
|
20874
21053
|
}
|
|
20875
|
-
if (
|
|
20876
|
-
|
|
20877
|
-
|
|
21054
|
+
if (this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21055
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, yearStart, yearEnd, eventData, isSpanned);
|
|
21056
|
+
var originalStartTime = eventData[this.fields.startTime];
|
|
21057
|
+
var originalEndTime = new Date(eventData[this.fields.endTime] - 1);
|
|
21058
|
+
isSpanned.count = (originalEndTime.getMonth() - originalStartTime.getMonth()) +
|
|
21059
|
+
(this.parent.monthsCount * (originalEndTime.getFullYear() - originalStartTime.getFullYear())) + 1;
|
|
20878
21060
|
}
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
21061
|
+
else {
|
|
21062
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, monthStart, monthEnd, eventData, isSpanned);
|
|
21063
|
+
if (this.parent.activeViewOptions.group.resources.length === 0 || this.parent.uiStateValues.isGroupAdaptive) {
|
|
21064
|
+
var end = resetTime(eventData[this.fields.endTime]).getTime();
|
|
21065
|
+
var start = resetTime(eventData[this.fields.startTime]).getTime();
|
|
21066
|
+
if (eventObj[this.fields.isAllDay] && end === eventObj[this.fields.endTime].getTime() || isSpanned.isRight) {
|
|
21067
|
+
end = addDays(new Date(end), -1).getTime();
|
|
21068
|
+
}
|
|
21069
|
+
isSpanned.count = Math.ceil((end - start) / MS_PER_DAY) + 1;
|
|
20888
21070
|
}
|
|
20889
|
-
isSpanned.count = Math.ceil((end - start) / MS_PER_DAY) + 1;
|
|
20890
21071
|
}
|
|
20891
21072
|
eventData.isSpanned = isSpanned;
|
|
20892
21073
|
if (resetTime(eventStart).getTime() < resetTime(this.parent.minDate).getTime()) {
|
|
@@ -20897,6 +21078,16 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20897
21078
|
}
|
|
20898
21079
|
return eventData;
|
|
20899
21080
|
};
|
|
21081
|
+
YearEvent.prototype.updateSpannedEventDetails = function (eventStart, eventEnd, viewStart, viewEnd, eventObj, isSpanned) {
|
|
21082
|
+
if (eventStart.getTime() < viewStart.getTime()) {
|
|
21083
|
+
eventObj[this.fields.startTime] = viewStart;
|
|
21084
|
+
isSpanned.isLeft = true;
|
|
21085
|
+
}
|
|
21086
|
+
if (eventEnd.getTime() > viewEnd.getTime()) {
|
|
21087
|
+
eventObj[this.fields.endTime] = viewEnd;
|
|
21088
|
+
isSpanned.isRight = true;
|
|
21089
|
+
}
|
|
21090
|
+
};
|
|
20900
21091
|
YearEvent.prototype.getOverlapEvents = function (date, appointments) {
|
|
20901
21092
|
var appointmentsList = [];
|
|
20902
21093
|
var dateStart;
|
|
@@ -20920,19 +21111,11 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20920
21111
|
var app = appointments_1[_i];
|
|
20921
21112
|
var appStart = new Date(app[this.fields.startTime].getTime());
|
|
20922
21113
|
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
|
-
}
|
|
21114
|
+
var timeCondition = app[this.fields.isAllDay] ? resetTime(appEnd).getTime() > dateStart :
|
|
21115
|
+
resetTime(appEnd).getTime() >= dateStart;
|
|
21116
|
+
if (((resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
21117
|
+
(resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
|
|
21118
|
+
appointmentsList.push(app);
|
|
20936
21119
|
}
|
|
20937
21120
|
}
|
|
20938
21121
|
return appointmentsList;
|
|
@@ -22702,9 +22885,9 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22702
22885
|
append(quickTemplate, tdElement);
|
|
22703
22886
|
}
|
|
22704
22887
|
else {
|
|
22705
|
-
|
|
22706
|
-
|
|
22707
|
-
|
|
22888
|
+
var resourceText = createElement('div', { className: className });
|
|
22889
|
+
resourceText.innerText = this.parent.sanitize(tdData.resourceData[tdData.resource.textField]);
|
|
22890
|
+
tdElement.appendChild(resourceText);
|
|
22708
22891
|
}
|
|
22709
22892
|
};
|
|
22710
22893
|
ViewBase.prototype.renderResourceMobileLayout = function () {
|
|
@@ -22728,7 +22911,6 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22728
22911
|
var colElements = this.getColElements();
|
|
22729
22912
|
var contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
22730
22913
|
var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
|
|
22731
|
-
colElements.forEach(function (col) { return setStyleAttribute(col, { 'width': formatUnit(colWidth_1) }); });
|
|
22732
22914
|
if (content.offsetHeight !== content.clientHeight) {
|
|
22733
22915
|
var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
22734
22916
|
if (!isNullOrUndefined(resourceColumn)) {
|
|
@@ -22958,8 +23140,8 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22958
23140
|
var content = this.getScrollableElement();
|
|
22959
23141
|
var header = this.getDatesHeaderElement();
|
|
22960
23142
|
var scrollerHeight = this.parent.element.offsetHeight - headerBarHeight - header.offsetHeight;
|
|
22961
|
-
this.setColWidth(content);
|
|
22962
23143
|
this.setContentHeight(content, timeCells, scrollerHeight);
|
|
23144
|
+
this.setColWidth(content);
|
|
22963
23145
|
var scrollBarWidth = getScrollBarWidth();
|
|
22964
23146
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22965
23147
|
header.firstElementChild.style[args.cssProperties.rtlBorder] = '';
|
|
@@ -24270,9 +24452,11 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
24270
24452
|
if (!this.parent.isMinMaxDate(data.date)) {
|
|
24271
24453
|
data.className.push(DISABLE_DATES);
|
|
24272
24454
|
}
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24455
|
+
this.updateSelectedCellClass(data);
|
|
24456
|
+
};
|
|
24457
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24458
|
+
Month.prototype.updateSelectedCellClass = function (data) {
|
|
24459
|
+
return;
|
|
24276
24460
|
};
|
|
24277
24461
|
Month.prototype.isOtherMonth = function (date) {
|
|
24278
24462
|
return date.getTime() < this.monthDates.start.getTime() || date.getTime() > this.monthDates.end.getTime();
|
|
@@ -24620,6 +24804,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24620
24804
|
calendarElement.appendChild(this.renderCalendarContent(currentMonth));
|
|
24621
24805
|
calendarWrapper.appendChild(calendarElement);
|
|
24622
24806
|
}
|
|
24807
|
+
this.renderDates.splice(0, 1);
|
|
24623
24808
|
};
|
|
24624
24809
|
Year.prototype.renderCalendarHeader = function (currentDate) {
|
|
24625
24810
|
var headerWrapper = createElement('div', { className: 'e-header e-month' });
|
|
@@ -24679,7 +24864,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24679
24864
|
var date = weekDates_1[_i];
|
|
24680
24865
|
var td = createElement('td', {
|
|
24681
24866
|
className: 'e-cell ' + WORK_CELLS_CLASS,
|
|
24682
|
-
attrs: { '
|
|
24867
|
+
attrs: { 'data-date': date.getTime().toString() }
|
|
24683
24868
|
});
|
|
24684
24869
|
if (this.parent.activeViewOptions.cellHeaderTemplate) {
|
|
24685
24870
|
var args = { date: date, type: 'monthCells' };
|
|
@@ -24707,6 +24892,9 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24707
24892
|
addClass([td], classList$$1);
|
|
24708
24893
|
}
|
|
24709
24894
|
tr_1.appendChild(td);
|
|
24895
|
+
if (currentDate.getMonth() === date.getMonth()) {
|
|
24896
|
+
this.renderDates.push(new Date(date));
|
|
24897
|
+
}
|
|
24710
24898
|
if (!this.parent.isMinMaxDate(date)) {
|
|
24711
24899
|
addClass([td], DISABLE_DATES);
|
|
24712
24900
|
}
|
|
@@ -25078,9 +25266,13 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
25078
25266
|
if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
|
|
25079
25267
|
eventSubject += ',';
|
|
25080
25268
|
}
|
|
25081
|
-
|
|
25269
|
+
var appSubjectText = createElement('div', { className: SUBJECT_CLASS });
|
|
25270
|
+
appSubjectText.innerText = this.parent.sanitize(eventSubject);
|
|
25271
|
+
appSubjectWrap.appendChild(appSubjectText);
|
|
25082
25272
|
if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
|
|
25083
|
-
|
|
25273
|
+
var appLocation = createElement('div', { className: LOCATION_CLASS });
|
|
25274
|
+
appLocation.innerText = this.parent.sanitize(eventLocation);
|
|
25275
|
+
appSubjectWrap.appendChild(appLocation);
|
|
25084
25276
|
}
|
|
25085
25277
|
if (!isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
|
|
25086
25278
|
var iconClass = (event[fieldMapping.id] === event[fieldMapping.recurrenceID]) ?
|
|
@@ -25863,6 +26055,11 @@ var MonthAgenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25863
26055
|
}
|
|
25864
26056
|
return 'abbreviated';
|
|
25865
26057
|
};
|
|
26058
|
+
MonthAgenda.prototype.updateSelectedCellClass = function (data) {
|
|
26059
|
+
if (resetTime(data.date).getTime() === resetTime(this.monthAgendaDate).getTime()) {
|
|
26060
|
+
data.className.push(SELECTED_CELL_CLASS);
|
|
26061
|
+
}
|
|
26062
|
+
};
|
|
25866
26063
|
MonthAgenda.prototype.setEventWrapperHeight = function () {
|
|
25867
26064
|
var headerHeight = (this.parent.headerModule ? this.parent.headerModule.getHeaderElement().offsetHeight : 0) + 2;
|
|
25868
26065
|
var resourceWrapper = this.parent.element.querySelector('.' + RESOURCE_HEADER_TOOLBAR);
|
|
@@ -26735,15 +26932,15 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26735
26932
|
this.parent.virtualScrollModule.renderVirtualTrack(content);
|
|
26736
26933
|
}
|
|
26737
26934
|
var contentTBody = contentTable.querySelector('tbody');
|
|
26738
|
-
if (this.parent.
|
|
26739
|
-
|
|
26740
|
-
|
|
26741
|
-
|
|
26742
|
-
|
|
26743
|
-
addClassTable.push(monthHeader);
|
|
26744
|
-
}
|
|
26745
|
-
addClass(addClassTable, AUTO_HEIGHT);
|
|
26935
|
+
if (this.parent.rowAutoHeight) {
|
|
26936
|
+
var addClassTable = [contentTable];
|
|
26937
|
+
var monthHeader = this.parent.element.querySelector('.' + MONTH_HEADER_WRAPPER + ' .' + SCHEDULE_TABLE_CLASS);
|
|
26938
|
+
if (monthHeader) {
|
|
26939
|
+
addClassTable.push(monthHeader);
|
|
26746
26940
|
}
|
|
26941
|
+
addClass(addClassTable, AUTO_HEIGHT);
|
|
26942
|
+
}
|
|
26943
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
26747
26944
|
var colCount = this.parent.activeViewOptions.orientation === 'Horizontal' ? this.colLevels.slice(-1)[0].length : this.columnCount;
|
|
26748
26945
|
contentTable.appendChild(this.createTableColGroup(colCount));
|
|
26749
26946
|
this.renderResourceContent(eventWrapper, monthTBody, contentTBody);
|
|
@@ -26845,6 +27042,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26845
27042
|
if (td.classList.contains(OTHERMONTH_CLASS)) {
|
|
26846
27043
|
continue;
|
|
26847
27044
|
}
|
|
27045
|
+
else {
|
|
27046
|
+
this.renderDates.push(new Date(date));
|
|
27047
|
+
}
|
|
26848
27048
|
td.appendChild(dateHeader);
|
|
26849
27049
|
if (isDateAvail) {
|
|
26850
27050
|
td.setAttribute('data-date', date.getTime().toString());
|
|
@@ -26859,6 +27059,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26859
27059
|
}
|
|
26860
27060
|
}
|
|
26861
27061
|
}
|
|
27062
|
+
this.renderDates.splice(0, 1);
|
|
26862
27063
|
};
|
|
26863
27064
|
TimelineYear.prototype.getContentRows = function () {
|
|
26864
27065
|
var tRow = [];
|