@syncfusion/ej2-schedule 26.1.35 → 26.1.39
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/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 +110 -47
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +109 -46
- 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 +11 -11
- package/src/schedule/actions/crud.js +3 -1
- package/src/schedule/actions/resize.js +5 -0
- package/src/schedule/base/schedule.js +6 -3
- package/src/schedule/event-renderer/agenda-base.js +2 -2
- package/src/schedule/event-renderer/event-base.js +4 -2
- package/src/schedule/event-renderer/month.js +2 -1
- package/src/schedule/event-renderer/timeline-view.js +6 -1
- package/src/schedule/event-renderer/vertical-view.js +4 -4
- package/src/schedule/event-renderer/year.js +1 -1
- package/src/schedule/exports/excel-export.js +1 -1
- package/src/schedule/exports/print.js +10 -7
- package/src/schedule/popups/quick-popups.js +1 -1
- package/src/schedule/renderer/header-renderer.js +1 -1
- package/src/schedule/renderer/month.js +5 -4
- package/src/schedule/renderer/renderer.js +8 -2
- package/src/schedule/renderer/timeline-year.js +3 -3
- package/src/schedule/renderer/vertical-view.d.ts +1 -0
- package/src/schedule/renderer/vertical-view.js +21 -9
- package/src/schedule/renderer/view-base.d.ts +1 -0
- package/src/schedule/renderer/view-base.js +25 -2
- package/src/schedule/renderer/year.js +1 -1
- package/styles/bootstrap-dark.css +10 -0
- package/styles/bootstrap.css +10 -0
- package/styles/bootstrap4.css +10 -0
- package/styles/bootstrap5-dark.css +10 -0
- package/styles/bootstrap5.css +10 -0
- package/styles/fabric-dark.css +10 -0
- package/styles/fabric.css +10 -0
- package/styles/fluent-dark.css +10 -0
- package/styles/fluent.css +10 -0
- package/styles/fluent2.css +79 -54
- package/styles/highcontrast-light.css +10 -0
- package/styles/highcontrast.css +10 -0
- package/styles/material-dark.css +10 -0
- package/styles/material.css +10 -0
- package/styles/material3-dark.css +10 -0
- package/styles/material3.css +10 -0
- package/styles/recurrence-editor/fluent2.css +35 -35
- package/styles/schedule/_fluent2-definition.scss +3 -3
- package/styles/schedule/_layout.scss +12 -0
- package/styles/schedule/_theme.scss +4 -0
- package/styles/schedule/bootstrap-dark.css +10 -0
- package/styles/schedule/bootstrap.css +10 -0
- package/styles/schedule/bootstrap4.css +10 -0
- package/styles/schedule/bootstrap5-dark.css +10 -0
- package/styles/schedule/bootstrap5.css +10 -0
- package/styles/schedule/fabric-dark.css +10 -0
- package/styles/schedule/fabric.css +10 -0
- package/styles/schedule/fluent-dark.css +10 -0
- package/styles/schedule/fluent.css +10 -0
- package/styles/schedule/fluent2.css +79 -54
- package/styles/schedule/highcontrast-light.css +10 -0
- package/styles/schedule/highcontrast.css +10 -0
- package/styles/schedule/material-dark.css +10 -0
- package/styles/schedule/material.css +10 -0
- package/styles/schedule/material3-dark.css +10 -0
- package/styles/schedule/material3.css +10 -0
- package/styles/schedule/tailwind-dark.css +10 -0
- package/styles/schedule/tailwind.css +10 -0
- package/styles/tailwind-dark.css +10 -0
- package/styles/tailwind.css +10 -0
|
@@ -1175,7 +1175,7 @@ class HeaderRenderer {
|
|
|
1175
1175
|
};
|
|
1176
1176
|
const viewName = this.parent.activeViewOptions.dateRangeTemplateName;
|
|
1177
1177
|
const templateId = this.parent.element.id + '_' + viewName + 'dateRangeTemplate';
|
|
1178
|
-
const dateTemplate = [].slice.call(this.parent.getDateRangeTemplate()(args, this.parent, 'dateRangeTemplate', templateId, false));
|
|
1178
|
+
const dateTemplate = [].slice.call(this.parent.getDateRangeTemplate()(args, this.parent, 'dateRangeTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
1179
1179
|
append(dateTemplate, textEle);
|
|
1180
1180
|
}
|
|
1181
1181
|
else {
|
|
@@ -6507,7 +6507,7 @@ class EventBase {
|
|
|
6507
6507
|
const templateId = scheduleId + viewName + 'eventTemplate';
|
|
6508
6508
|
const templateName = isResourceEventTemplate && this.parent.currentView.indexOf('Year') === -1 ?
|
|
6509
6509
|
this.parent.getEventTemplateName(resIndex) : 'eventTemplate';
|
|
6510
|
-
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
6510
|
+
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false, undefined, undefined, this.parent.root);
|
|
6511
6511
|
}
|
|
6512
6512
|
else {
|
|
6513
6513
|
const appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
@@ -6643,7 +6643,9 @@ class EventBase {
|
|
|
6643
6643
|
}
|
|
6644
6644
|
}
|
|
6645
6645
|
updateEventMinimumDuration(startEndHours, startTime, endTime) {
|
|
6646
|
-
if (startTime.getTime() < endTime.getTime())
|
|
6646
|
+
if (startTime.getTime() < endTime.getTime() || (startTime.getTime() === endTime.getTime() &&
|
|
6647
|
+
(startEndHours.startHour.getTime() < endTime.getTime() && startEndHours.endHour.getTime() > startTime.getTime()) &&
|
|
6648
|
+
this.parent.currentView.indexOf('Timeline') === -1)) {
|
|
6647
6649
|
const eventDuration = (getUniversalTime(endTime) - getUniversalTime(startTime)) / MS_PER_MINUTE;
|
|
6648
6650
|
if (eventDuration < this.parent.eventSettings.minimumEventDuration) {
|
|
6649
6651
|
const tempEnd = new Date(startTime);
|
|
@@ -7074,7 +7076,7 @@ class VerticalEvent extends EventBase {
|
|
|
7074
7076
|
const templateId = elementId + viewName + 'eventTemplate';
|
|
7075
7077
|
const resIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex : resource;
|
|
7076
7078
|
const templateName = this.isResourceEventTemplate ? this.parent.getEventTemplateName(resIndex) : 'eventTemplate';
|
|
7077
|
-
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
|
|
7079
|
+
templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false, undefined, undefined, this.parent.root);
|
|
7078
7080
|
}
|
|
7079
7081
|
else {
|
|
7080
7082
|
const appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
|
|
@@ -7284,7 +7286,7 @@ class VerticalEvent extends EventBase {
|
|
|
7284
7286
|
}
|
|
7285
7287
|
if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
|
|
7286
7288
|
const appHeight = this.getHeight(eStart, eEnd);
|
|
7287
|
-
if (eStart.getTime()
|
|
7289
|
+
if (eStart.getTime() >= schedule.startHour.getTime()) {
|
|
7288
7290
|
topValue = this.getTopValue(eStart, dayIndex, resource);
|
|
7289
7291
|
}
|
|
7290
7292
|
const appIndex = this.getOverlapIndex(record, dayIndex, false, resource);
|
|
@@ -7539,12 +7541,12 @@ class VerticalEvent extends EventBase {
|
|
|
7539
7541
|
let rowHeight;
|
|
7540
7542
|
if (this.parent.uiStateValues.expand) {
|
|
7541
7543
|
target.setAttribute('title', this.parent.localeObj.getConstant('collapseAllDaySection'));
|
|
7542
|
-
target.setAttribute('aria-label', '
|
|
7544
|
+
target.setAttribute('aria-label', this.parent.localeObj.getConstant('collapseAllDaySection'));
|
|
7543
7545
|
rowHeight = ((this.allDayLevel + 1) * this.getEventHeight()) + 4;
|
|
7544
7546
|
}
|
|
7545
7547
|
else {
|
|
7546
7548
|
target.setAttribute('title', this.parent.localeObj.getConstant('expandAllDaySection'));
|
|
7547
|
-
target.setAttribute('aria-label', '
|
|
7549
|
+
target.setAttribute('aria-label', this.parent.localeObj.getConstant('expandAllDaySection'));
|
|
7548
7550
|
rowHeight = (3 * this.getEventHeight()) + 4;
|
|
7549
7551
|
this.parent.element.querySelector('.' + DATE_HEADER_WRAP_CLASS).scrollTop = 0;
|
|
7550
7552
|
}
|
|
@@ -7953,7 +7955,7 @@ class MonthEvent extends EventBase {
|
|
|
7953
7955
|
const viewName = this.parent.activeViewOptions.eventTemplateName;
|
|
7954
7956
|
const templateId = scheduleId + viewName + 'eventTemplate';
|
|
7955
7957
|
const eventTemplate = this.isResourceEventTemplate ? this.parent.getEventTemplateName(resIndex) : 'eventTemplate';
|
|
7956
|
-
templateElement = this.parent.getAppointmentTemplate()(eventObj, this.parent, eventTemplate, templateId, false);
|
|
7958
|
+
templateElement = this.parent.getAppointmentTemplate()(eventObj, this.parent, eventTemplate, templateId, false, undefined, undefined, this.parent.root);
|
|
7957
7959
|
}
|
|
7958
7960
|
else {
|
|
7959
7961
|
const eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
|
|
@@ -8082,6 +8084,7 @@ class MonthEvent extends EventBase {
|
|
|
8082
8084
|
if (indicator) {
|
|
8083
8085
|
const count = parseInt(indicator.getAttribute('data-count'), 10) + 1;
|
|
8084
8086
|
indicator.setAttribute('data-count', count.toString());
|
|
8087
|
+
indicator.setAttribute('aria-label', count + ' ' + this.parent.localeObj.getConstant('moreEvents'));
|
|
8085
8088
|
indicator.innerHTML = this.getMoreIndicatorText(count);
|
|
8086
8089
|
}
|
|
8087
8090
|
else {
|
|
@@ -8686,8 +8689,13 @@ class TimelineEvent extends MonthEvent {
|
|
|
8686
8689
|
}
|
|
8687
8690
|
}
|
|
8688
8691
|
getSameDayEventsWidth(startDate, endDate) {
|
|
8692
|
+
let intervalMins = this.interval;
|
|
8693
|
+
if (this.slotsPerDay === 1) {
|
|
8694
|
+
const hoursRange = getStartEndHours(resetTime(new Date(startDate.getTime())), this.startHour, this.endHour);
|
|
8695
|
+
intervalMins = (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
|
|
8696
|
+
}
|
|
8689
8697
|
return ((getUniversalTime(endDate) - getUniversalTime(startDate)) /
|
|
8690
|
-
MS_PER_MINUTE * (this.cellWidth * this.slotCount) /
|
|
8698
|
+
MS_PER_MINUTE * (this.cellWidth * this.slotCount) / intervalMins);
|
|
8691
8699
|
}
|
|
8692
8700
|
getSpannedEventsWidth(startDate, endDate, diffInDays) {
|
|
8693
8701
|
const width = (diffInDays * this.slotsPerDay) * this.cellWidth;
|
|
@@ -9478,7 +9486,7 @@ class QuickPopups {
|
|
|
9478
9486
|
let templateElement;
|
|
9479
9487
|
if (!isNullOrUndefined(this.parent.activeViewOptions.eventTemplate)) {
|
|
9480
9488
|
const tempId = this.parent.element.id + '_' + this.parent.activeViewOptions.eventTemplateName + 'eventTemplate';
|
|
9481
|
-
templateElement = this.parent.getAppointmentTemplate()(eventData, this.parent, 'eventTemplate', tempId, false);
|
|
9489
|
+
templateElement = this.parent.getAppointmentTemplate()(eventData, this.parent, 'eventTemplate', tempId, false, undefined, undefined, this.parent.root);
|
|
9482
9490
|
append(templateElement, appointmentElement);
|
|
9483
9491
|
}
|
|
9484
9492
|
else {
|
|
@@ -14363,9 +14371,15 @@ class Render {
|
|
|
14363
14371
|
}
|
|
14364
14372
|
}
|
|
14365
14373
|
updateLabelText(view) {
|
|
14366
|
-
const content = this.parent.activeView.getLabelText(view);
|
|
14367
14374
|
this.parent.element.setAttribute('role', 'application');
|
|
14368
|
-
this.parent.element.
|
|
14375
|
+
this.parent.element.removeAttribute('aria-labelledby');
|
|
14376
|
+
this.parent.element.removeAttribute('aria-label');
|
|
14377
|
+
if (view === 'Year') {
|
|
14378
|
+
this.parent.element.setAttribute('aria-label', this.parent.activeView.getLabelText(view));
|
|
14379
|
+
}
|
|
14380
|
+
else {
|
|
14381
|
+
this.parent.element.setAttribute('aria-labelledby', this.parent.element.id + '_table');
|
|
14382
|
+
}
|
|
14369
14383
|
}
|
|
14370
14384
|
}
|
|
14371
14385
|
|
|
@@ -14513,7 +14527,9 @@ class Crud {
|
|
|
14513
14527
|
this.parent.trigger(dataBound, null, () => {
|
|
14514
14528
|
this.parent.hideSpinner();
|
|
14515
14529
|
if (this.parent.isPrinting) {
|
|
14516
|
-
|
|
14530
|
+
setTimeout(() => {
|
|
14531
|
+
this.parent.notify(print, {});
|
|
14532
|
+
}, 100);
|
|
14517
14533
|
}
|
|
14518
14534
|
});
|
|
14519
14535
|
});
|
|
@@ -17361,6 +17377,7 @@ let Schedule = class Schedule extends Component {
|
|
|
17361
17377
|
subject: 'Subject',
|
|
17362
17378
|
addTitle: 'Add title',
|
|
17363
17379
|
moreDetails: 'More Details',
|
|
17380
|
+
moreEvents: 'More Events',
|
|
17364
17381
|
save: 'Save',
|
|
17365
17382
|
editContent: 'How would you like to change the appointment in the series?',
|
|
17366
17383
|
deleteContent: 'Are you sure you want to delete this event?',
|
|
@@ -17395,6 +17412,7 @@ let Schedule = class Schedule extends Component {
|
|
|
17395
17412
|
ok: 'Ok',
|
|
17396
17413
|
yes: 'Yes',
|
|
17397
17414
|
no: 'No',
|
|
17415
|
+
of: 'of',
|
|
17398
17416
|
occurrence: 'Occurrence',
|
|
17399
17417
|
series: 'Series',
|
|
17400
17418
|
previous: 'Previous',
|
|
@@ -17964,7 +17982,7 @@ let Schedule = class Schedule extends Component {
|
|
|
17964
17982
|
const scheduleId = this.element.id + '_';
|
|
17965
17983
|
const viewName = this.activeViewOptions.headerIndentTemplateName;
|
|
17966
17984
|
const templateId = scheduleId + viewName + 'headerIndentTemplate';
|
|
17967
|
-
const indentTemplate = [].slice.call(this.getHeaderIndentTemplate()(data, this, 'headerIndentTemplate', templateId, false));
|
|
17985
|
+
const indentTemplate = [].slice.call(this.getHeaderIndentTemplate()(data, this, 'headerIndentTemplate', templateId, false, undefined, undefined, this.root));
|
|
17968
17986
|
append(indentTemplate, td);
|
|
17969
17987
|
}
|
|
17970
17988
|
}
|
|
@@ -18492,8 +18510,9 @@ let Schedule = class Schedule extends Component {
|
|
|
18492
18510
|
}
|
|
18493
18511
|
const msMajorInterval = this.activeViewOptions.timeScale.interval * MS_PER_MINUTE;
|
|
18494
18512
|
const msInterval = msMajorInterval / this.activeViewOptions.timeScale.slotCount;
|
|
18495
|
-
|
|
18496
|
-
let
|
|
18513
|
+
const offsetDiff = ((viewStartHour.getTimezoneOffset() - startHour.getTimezoneOffset()) * MS_PER_MINUTE);
|
|
18514
|
+
let startIndex = Math.round((startHour.getTime() - viewStartHour.getTime() + offsetDiff) / msInterval);
|
|
18515
|
+
let endIndex = Math.ceil((endHour.getTime() - viewStartHour.getTime() + offsetDiff) / msInterval);
|
|
18497
18516
|
const tempStartIndex = startIndex;
|
|
18498
18517
|
const tempEndIndex = endIndex;
|
|
18499
18518
|
const cells = [];
|
|
@@ -20190,6 +20209,11 @@ class Resize extends ActionBase {
|
|
|
20190
20209
|
}
|
|
20191
20210
|
const viewElement = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
20192
20211
|
this.scrollArgs = { element: viewElement, width: viewElement.scrollWidth, height: viewElement.scrollHeight };
|
|
20212
|
+
// 883565 - To fix the resizing not working issue at the last column of the timeline view
|
|
20213
|
+
if (['Month', 'TimelineYear'].indexOf(this.parent.currentView) < 0) {
|
|
20214
|
+
const scrollWidth = Math.round(this.scrollArgs.width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20215
|
+
this.scrollArgs.width = this.scrollArgs.width < scrollWidth ? scrollWidth : this.scrollArgs.width;
|
|
20216
|
+
}
|
|
20193
20217
|
EventHandler.add(document, Browser.touchMoveEvent, this.resizing, this);
|
|
20194
20218
|
EventHandler.add(document, Browser.touchEndEvent, this.resizeStop, this);
|
|
20195
20219
|
});
|
|
@@ -21118,7 +21142,7 @@ class YearEvent extends TimelineEvent {
|
|
|
21118
21142
|
const eventObj = extend({}, record, null, true);
|
|
21119
21143
|
if (this.parent.activeViewOptions.eventTemplate) {
|
|
21120
21144
|
const templateId = this.parent.element.id + '_' + this.parent.activeViewOptions.eventTemplateName + 'eventTemplate';
|
|
21121
|
-
templateElement = this.parent.getAppointmentTemplate()(eventObj, this.parent, 'eventTemplate', templateId, false);
|
|
21145
|
+
templateElement = this.parent.getAppointmentTemplate()(eventObj, this.parent, 'eventTemplate', templateId, false, undefined, undefined, this.parent.root);
|
|
21122
21146
|
}
|
|
21123
21147
|
else {
|
|
21124
21148
|
const locationEle = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
|
|
@@ -22674,6 +22698,9 @@ class ViewBase {
|
|
|
22674
22698
|
}
|
|
22675
22699
|
setAriaAttributes(table) {
|
|
22676
22700
|
table.setAttribute('role', 'grid');
|
|
22701
|
+
if (this.parent.currentView !== 'Year') {
|
|
22702
|
+
table.setAttribute('id', this.parent.element.id + '_table');
|
|
22703
|
+
}
|
|
22677
22704
|
table.setAttribute('aria-label', this.getLabelText(this.parent.currentView));
|
|
22678
22705
|
}
|
|
22679
22706
|
createColGroup(table, lastRow) {
|
|
@@ -22917,9 +22944,29 @@ class ViewBase {
|
|
|
22917
22944
|
const weekLength = type === 'next' ? WEEK_LENGTH : -WEEK_LENGTH;
|
|
22918
22945
|
return addDays(this.parent.selectedDate, weekLength * this.parent.activeViewOptions.interval);
|
|
22919
22946
|
}
|
|
22947
|
+
formatViewLabel(view, startDate, endDate) {
|
|
22948
|
+
const formatOptions = { type: 'date', skeleton: 'full', calendar: this.parent.getCalendarMode() };
|
|
22949
|
+
return this.parent.localeObj.getConstant(view) + ' ' + this.parent.localeObj.getConstant('start') + ' ' + this.parent.globalize.formatDate(startDate, formatOptions) + ' '
|
|
22950
|
+
+ this.parent.localeObj.getConstant('endAt') + ' ' + this.parent.globalize.formatDate(endDate, formatOptions);
|
|
22951
|
+
}
|
|
22920
22952
|
getLabelText(view) {
|
|
22921
22953
|
const viewStr = view.charAt(0).toLowerCase() + view.substring(1);
|
|
22922
|
-
|
|
22954
|
+
if (view === 'Year' || view === 'TimelineYear') {
|
|
22955
|
+
return this.formatViewLabel(viewStr, this.parent.activeView.getStartDate(), this.parent.activeView.getEndDate());
|
|
22956
|
+
}
|
|
22957
|
+
else {
|
|
22958
|
+
if (this.renderDates.length > 0) {
|
|
22959
|
+
if (this.parent.currentView === 'Day' || this.parent.currentView === 'TimelineDay') {
|
|
22960
|
+
return this.parent.localeObj.getConstant(viewStr) + ' of ' + capitalizeFirstWord(this.parent.globalize.formatDate(this.parent.selectedDate, { type: 'date', skeleton: 'full', calendar: this.parent.getCalendarMode() }), 'single');
|
|
22961
|
+
}
|
|
22962
|
+
else {
|
|
22963
|
+
return this.formatViewLabel(viewStr, this.renderDates[0], this.renderDates[this.renderDates.length - 1]);
|
|
22964
|
+
}
|
|
22965
|
+
}
|
|
22966
|
+
else {
|
|
22967
|
+
return '';
|
|
22968
|
+
}
|
|
22969
|
+
}
|
|
22923
22970
|
}
|
|
22924
22971
|
getDateRangeText() {
|
|
22925
22972
|
if (this.parent.isAdaptive) {
|
|
@@ -23009,7 +23056,7 @@ class ViewBase {
|
|
|
23009
23056
|
const scheduleId = this.parent.element.id + '_';
|
|
23010
23057
|
const viewName = this.parent.activeViewOptions.resourceHeaderTemplateName;
|
|
23011
23058
|
const templateId = scheduleId + viewName + 'resourceHeaderTemplate';
|
|
23012
|
-
const quickTemplate = [].slice.call(this.parent.getResourceHeaderTemplate()(data, this.parent, 'resourceHeaderTemplate', templateId, false));
|
|
23059
|
+
const quickTemplate = [].slice.call(this.parent.getResourceHeaderTemplate()(data, this.parent, 'resourceHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
23013
23060
|
append(quickTemplate, tdElement);
|
|
23014
23061
|
}
|
|
23015
23062
|
else {
|
|
@@ -23535,7 +23582,7 @@ class VerticalView extends ViewBase {
|
|
|
23535
23582
|
templateName = 'dateHeaderTemplate';
|
|
23536
23583
|
const args = { date: date, type: type };
|
|
23537
23584
|
const viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
23538
|
-
cntEle = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false));
|
|
23585
|
+
cntEle = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false, undefined, undefined, this.parent.root));
|
|
23539
23586
|
}
|
|
23540
23587
|
else {
|
|
23541
23588
|
wrapper.innerHTML = this.parent.activeView.isTimelineView() ?
|
|
@@ -23549,7 +23596,7 @@ class VerticalView extends ViewBase {
|
|
|
23549
23596
|
if (this.parent.activeViewOptions.timeScale.majorSlotTemplate) {
|
|
23550
23597
|
templateName = 'majorSlotTemplate';
|
|
23551
23598
|
const args = { date: date, type: type };
|
|
23552
|
-
cntEle = [].slice.call(this.parent.getMajorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false));
|
|
23599
|
+
cntEle = [].slice.call(this.parent.getMajorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false, undefined, undefined, this.parent.root));
|
|
23553
23600
|
}
|
|
23554
23601
|
else {
|
|
23555
23602
|
wrapper.innerHTML = `<span>${this.getTime(date)}</span>`;
|
|
@@ -23560,7 +23607,7 @@ class VerticalView extends ViewBase {
|
|
|
23560
23607
|
if (this.parent.activeViewOptions.timeScale.minorSlotTemplate) {
|
|
23561
23608
|
templateName = 'minorSlotTemplate';
|
|
23562
23609
|
const args = { date: date, type: type };
|
|
23563
|
-
cntEle = [].slice.call(this.parent.getMinorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false));
|
|
23610
|
+
cntEle = [].slice.call(this.parent.getMinorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false, undefined, undefined, this.parent.root));
|
|
23564
23611
|
}
|
|
23565
23612
|
else {
|
|
23566
23613
|
cntEle = [].slice.call(wrapper.childNodes);
|
|
@@ -23571,7 +23618,7 @@ class VerticalView extends ViewBase {
|
|
|
23571
23618
|
const viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
23572
23619
|
templateName = 'cellTemplate';
|
|
23573
23620
|
const args = { date: date, type: type, groupIndex: groupIndex };
|
|
23574
|
-
cntEle = [].slice.call(this.parent.getCellTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false));
|
|
23621
|
+
cntEle = [].slice.call(this.parent.getCellTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false, undefined, undefined, this.parent.root));
|
|
23575
23622
|
}
|
|
23576
23623
|
break;
|
|
23577
23624
|
}
|
|
@@ -23690,7 +23737,8 @@ class VerticalView extends ViewBase {
|
|
|
23690
23737
|
const appointmentExpandCollapse = createElement('div', {
|
|
23691
23738
|
attrs: {
|
|
23692
23739
|
'tabindex': '0', 'role': 'list',
|
|
23693
|
-
title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
|
|
23740
|
+
title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
|
|
23741
|
+
'aria-label': this.parent.localeObj.getConstant('expandAllDaySection')
|
|
23694
23742
|
},
|
|
23695
23743
|
className: ALLDAY_APPOINTMENT_SECTION_CLASS + ' ' + APPOINTMENT_ROW_EXPAND_CLASS + ' ' +
|
|
23696
23744
|
ICON + ' ' + DISABLE_CLASS
|
|
@@ -23840,11 +23888,11 @@ class VerticalView extends ViewBase {
|
|
|
23840
23888
|
ntd.setAttribute('colspan', tdData.colSpan.toString());
|
|
23841
23889
|
}
|
|
23842
23890
|
const clsName = this.getContentTdClass(r);
|
|
23843
|
-
|
|
23891
|
+
let cellDate = resetTime(tdData.date);
|
|
23844
23892
|
if (!this.parent.isMinMaxDate(cellDate)) {
|
|
23845
23893
|
clsName.push(DISABLE_DATES);
|
|
23846
23894
|
}
|
|
23847
|
-
|
|
23895
|
+
cellDate = new Date(cellDate.setHours(r.date.getHours(), r.date.getMinutes(), r.date.getSeconds(), r.date.getMilliseconds()));
|
|
23848
23896
|
let type = 'workCells';
|
|
23849
23897
|
if (tdData.className.indexOf(RESOURCE_PARENT_CLASS) !== -1) {
|
|
23850
23898
|
clsName.push(RESOURCE_GROUP_CELLS_CLASS);
|
|
@@ -23861,7 +23909,7 @@ class VerticalView extends ViewBase {
|
|
|
23861
23909
|
const scheduleId = this.parent.element.id + '_';
|
|
23862
23910
|
const viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
23863
23911
|
const templateId = scheduleId + viewName + 'cellTemplate';
|
|
23864
|
-
const tooltipTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false));
|
|
23912
|
+
const tooltipTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
23865
23913
|
append(tooltipTemplate, ntd);
|
|
23866
23914
|
}
|
|
23867
23915
|
ntd.setAttribute('data-date', cellDate.getTime().toString());
|
|
@@ -23917,10 +23965,21 @@ class VerticalView extends ViewBase {
|
|
|
23917
23965
|
end.setMilliseconds(end.getMilliseconds() + msInterval);
|
|
23918
23966
|
return end;
|
|
23919
23967
|
}
|
|
23968
|
+
getStartEndHours(startEndTime) {
|
|
23969
|
+
if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
|
|
23970
|
+
const startEndDate = new Date(2000, 0, 0, 0);
|
|
23971
|
+
const timeString = startEndTime.split(':');
|
|
23972
|
+
if (timeString.length === 2) {
|
|
23973
|
+
startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
|
|
23974
|
+
}
|
|
23975
|
+
return startEndDate;
|
|
23976
|
+
}
|
|
23977
|
+
return new Date(2000, 0, 0, 0);
|
|
23978
|
+
}
|
|
23920
23979
|
getTimeSlotRows(handler) {
|
|
23921
23980
|
const rows = [];
|
|
23922
|
-
const startHour = this.
|
|
23923
|
-
const endHour = this.
|
|
23981
|
+
const startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
23982
|
+
const endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
|
|
23924
23983
|
const msMajorInterval = this.parent.activeViewOptions.timeScale.interval * MS_PER_MINUTE;
|
|
23925
23984
|
const msInterval = msMajorInterval / this.parent.activeViewOptions.timeScale.slotCount;
|
|
23926
23985
|
let length = Math.round(MS_PER_DAY / msInterval);
|
|
@@ -24409,7 +24468,7 @@ class Month extends ViewBase {
|
|
|
24409
24468
|
const elementId = this.parent.element.id + '_';
|
|
24410
24469
|
const viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
24411
24470
|
const templateId = elementId + viewName + 'dateHeaderTemplate';
|
|
24412
|
-
const dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(cellArgs, this.parent, 'dateHeaderTemplate', templateId, false));
|
|
24471
|
+
const dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(cellArgs, this.parent, 'dateHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
24413
24472
|
if (dateTemplate && dateTemplate.length) {
|
|
24414
24473
|
append(dateTemplate, tdEle);
|
|
24415
24474
|
}
|
|
@@ -24577,7 +24636,7 @@ class Month extends ViewBase {
|
|
|
24577
24636
|
const scheduleId = this.parent.element.id + '_';
|
|
24578
24637
|
const viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
24579
24638
|
const templateId = scheduleId + viewName + 'cellTemplate';
|
|
24580
|
-
const cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false));
|
|
24639
|
+
const cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
24581
24640
|
append(cellTemplate, ntd);
|
|
24582
24641
|
}
|
|
24583
24642
|
const args = { elementType: type, element: ntd, date: data.date, groupIndex: data.groupIndex };
|
|
@@ -24594,7 +24653,7 @@ class Month extends ViewBase {
|
|
|
24594
24653
|
const scheduleId = this.parent.element.id + '_';
|
|
24595
24654
|
const viewName = this.parent.activeViewOptions.cellHeaderTemplateName;
|
|
24596
24655
|
const templateId = scheduleId + viewName + 'cellHeaderTemplate';
|
|
24597
|
-
const cellHeaderTemplate = [].slice.call(this.parent.getCellHeaderTemplate()(args, this.parent, 'cellHeaderTemplate', templateId, false));
|
|
24656
|
+
const cellHeaderTemplate = [].slice.call(this.parent.getCellHeaderTemplate()(args, this.parent, 'cellHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
24598
24657
|
append(cellHeaderTemplate, dateHeader);
|
|
24599
24658
|
}
|
|
24600
24659
|
else {
|
|
@@ -24724,7 +24783,8 @@ class Month extends ViewBase {
|
|
|
24724
24783
|
return this.formatDateRange(this.parent.selectedDate);
|
|
24725
24784
|
}
|
|
24726
24785
|
getLabelText(view) {
|
|
24727
|
-
|
|
24786
|
+
const viewStr = view.charAt(0).toLowerCase() + view.substring(1);
|
|
24787
|
+
return this.formatViewLabel(viewStr, this.getStartDate(), this.getEndDate());
|
|
24728
24788
|
}
|
|
24729
24789
|
createWeekNumberElement(text) {
|
|
24730
24790
|
const tr = createElement('tr');
|
|
@@ -25025,7 +25085,7 @@ class Year extends ViewBase {
|
|
|
25025
25085
|
}
|
|
25026
25086
|
renderTemplates(fn, args, tName, vName, ele) {
|
|
25027
25087
|
const templateId = this.parent.element.id + '_' + vName + tName;
|
|
25028
|
-
const template = [].slice.call(fn(args, this.parent, tName, templateId, false));
|
|
25088
|
+
const template = [].slice.call(fn(args, this.parent, tName, templateId, false, undefined, undefined, this.parent.root));
|
|
25029
25089
|
append(template, ele);
|
|
25030
25090
|
}
|
|
25031
25091
|
onCellClick(e) {
|
|
@@ -25242,7 +25302,7 @@ class AgendaBase extends ViewBase {
|
|
|
25242
25302
|
const scheduleId = this.parent.element.id + '_';
|
|
25243
25303
|
const viewName = this.parent.activeViewOptions.eventTemplateName;
|
|
25244
25304
|
const templateId = scheduleId + viewName + 'eventTemplate';
|
|
25245
|
-
templateEle = this.parent.getAppointmentTemplate()(listData[parseInt(li.toString(), 10)], this.parent, 'eventTemplate', templateId, false);
|
|
25305
|
+
templateEle = this.parent.getAppointmentTemplate()(listData[parseInt(li.toString(), 10)], this.parent, 'eventTemplate', templateId, false, undefined, undefined, this.parent.root);
|
|
25246
25306
|
if (!isNullOrUndefined(listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceRule])) {
|
|
25247
25307
|
const iconClass = (listData[parseInt(li.toString(), 10)][fieldMapping.id] ===
|
|
25248
25308
|
listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceID]) ?
|
|
@@ -25542,7 +25602,7 @@ class AgendaBase extends ViewBase {
|
|
|
25542
25602
|
const scheduleId = this.parent.element.id + '_';
|
|
25543
25603
|
const viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
25544
25604
|
const templateId = scheduleId + viewName + 'dateHeaderTemplate';
|
|
25545
|
-
const dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, 'dateHeaderTemplate', templateId, false));
|
|
25605
|
+
const dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, 'dateHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
25546
25606
|
append(dateTemplate, dateHeader);
|
|
25547
25607
|
}
|
|
25548
25608
|
else {
|
|
@@ -27141,10 +27201,10 @@ class TimelineYear extends Year {
|
|
|
27141
27201
|
const monthId = `schedule_${this.parent.activeViewOptions.dayHeaderTemplateName}monthHeaderTemplate`;
|
|
27142
27202
|
if (type === 'dayHeaderTemplate') {
|
|
27143
27203
|
args.day = this.parent.getDayNames('wide')[column % 7];
|
|
27144
|
-
return [].slice.call(this.parent.getDayHeaderTemplate()(args, this.parent, 'dayHeaderTemplate', dayId, false));
|
|
27204
|
+
return [].slice.call(this.parent.getDayHeaderTemplate()(args, this.parent, 'dayHeaderTemplate', dayId, false, undefined, undefined, this.parent.root));
|
|
27145
27205
|
}
|
|
27146
27206
|
else {
|
|
27147
|
-
return [].slice.call(this.parent.getMonthHeaderTemplate()(args, this.parent, 'monthHeaderTemplate', monthId, false));
|
|
27207
|
+
return [].slice.call(this.parent.getMonthHeaderTemplate()(args, this.parent, 'monthHeaderTemplate', monthId, false, undefined, undefined, this.parent.root));
|
|
27148
27208
|
}
|
|
27149
27209
|
}
|
|
27150
27210
|
renderCellTemplate(data, td) {
|
|
@@ -27158,7 +27218,7 @@ class TimelineYear extends Year {
|
|
|
27158
27218
|
const scheduleId = this.parent.element.id + '_';
|
|
27159
27219
|
const viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
27160
27220
|
const templateId = scheduleId + viewName + 'cellTemplate';
|
|
27161
|
-
const cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false));
|
|
27221
|
+
const cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
27162
27222
|
append(cellTemplate, td);
|
|
27163
27223
|
}
|
|
27164
27224
|
scrollToDate(scrollDate) {
|
|
@@ -27647,7 +27707,7 @@ class ExcelExport {
|
|
|
27647
27707
|
fields.forEach((field, n) => {
|
|
27648
27708
|
let columnRule = { index: n + 1, value: event[field.name] || '' };
|
|
27649
27709
|
if (field.name === this.parent.eventFields.startTime || field.name === this.parent.eventFields.endTime) {
|
|
27650
|
-
const styleRule = { fontSize: 12, numberFormat: 'm/d/yyyy h:mm
|
|
27710
|
+
const styleRule = { fontSize: 12, numberFormat: 'm/d/yyyy h:mm a' };
|
|
27651
27711
|
columnRule = extend({}, columnRule, { style: styleRule }, true);
|
|
27652
27712
|
}
|
|
27653
27713
|
columnData.push(columnRule);
|
|
@@ -27740,6 +27800,7 @@ class Print {
|
|
|
27740
27800
|
Schedule.Inject(Day, Week, WorkWeek, Month, Agenda, MonthAgenda, TimelineViews, TimelineMonth, Year, TimelineYear);
|
|
27741
27801
|
this.printInstance = new Schedule(this.getPrintScheduleModel(printOptions));
|
|
27742
27802
|
this.printInstance.isPrinting = true;
|
|
27803
|
+
this.printInstance.root = this.parent.root ? this.parent.root : this.parent;
|
|
27743
27804
|
this.printInstance.appendTo(element);
|
|
27744
27805
|
this.printInstance.on(print, this.contentReady, this);
|
|
27745
27806
|
this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
|
|
@@ -27772,7 +27833,7 @@ class Print {
|
|
|
27772
27833
|
eventSettings.dataSource = this.parent.eventsData;
|
|
27773
27834
|
const eventTemplate = !isNullOrUndefined(printOptions.eventSettings) &&
|
|
27774
27835
|
!isNullOrUndefined(printOptions.eventSettings.template) ? printOptions.eventSettings.template : eventSettings.template;
|
|
27775
|
-
eventSettings.template = typeof (eventTemplate) === 'function' ? null : eventTemplate;
|
|
27836
|
+
eventSettings.template = !this.parent.isAngular && typeof (eventTemplate) === 'function' ? null : eventTemplate;
|
|
27776
27837
|
printModel.eventSettings = eventSettings;
|
|
27777
27838
|
break;
|
|
27778
27839
|
}
|
|
@@ -27783,13 +27844,15 @@ class Print {
|
|
|
27783
27844
|
break;
|
|
27784
27845
|
case 'timeScale':
|
|
27785
27846
|
timeScale = isNullOrUndefined(printOptions.timeScale) ? this.parent.timeScale : printOptions.timeScale;
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27847
|
+
if (!this.parent.isAngular) {
|
|
27848
|
+
timeScale.majorSlotTemplate = typeof (timeScale.majorSlotTemplate) === 'function' ? null : timeScale.majorSlotTemplate;
|
|
27849
|
+
timeScale.minorSlotTemplate = typeof (timeScale.minorSlotTemplate) === 'function' ? null : timeScale.minorSlotTemplate;
|
|
27850
|
+
}
|
|
27851
|
+
printModel.timeScale = timeScale;
|
|
27789
27852
|
break;
|
|
27790
27853
|
case 'views':
|
|
27791
27854
|
views = isNullOrUndefined(printOptions.views) ? this.parent.views : printOptions.views;
|
|
27792
|
-
if (views && views.length > 0 && typeof (views[0]) === 'object') {
|
|
27855
|
+
if (!this.parent.isAngular && views && views.length > 0 && typeof (views[0]) === 'object') {
|
|
27793
27856
|
for (const view of views) {
|
|
27794
27857
|
scheduleTemplates.forEach((x) => {
|
|
27795
27858
|
if (!isNullOrUndefined(view[`${x}`])) {
|
|
@@ -27803,8 +27866,8 @@ class Print {
|
|
|
27803
27866
|
default:
|
|
27804
27867
|
if (scheduleTemplates.indexOf(key) > -1) {
|
|
27805
27868
|
printModel[`${key}`] = isNullOrUndefined(printOptions[`${key}`]) ?
|
|
27806
|
-
(typeof (this.parent[`${key}`]) === 'function' ? null : this.parent[`${key}`]) :
|
|
27807
|
-
(typeof (printOptions[`${key}`]) === 'function' ? null : printOptions[`${key}`]);
|
|
27869
|
+
(!this.parent.isAngular && typeof (this.parent[`${key}`]) === 'function' ? null : this.parent[`${key}`]) :
|
|
27870
|
+
(!this.parent.isAngular && typeof (printOptions[`${key}`]) === 'function' ? null : printOptions[`${key}`]);
|
|
27808
27871
|
break;
|
|
27809
27872
|
}
|
|
27810
27873
|
if (scheduleEvents.indexOf(key) > -1) {
|