@syncfusion/ej2-schedule 25.2.7 → 26.1.38
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/.eslintrc.json +3 -2
- 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 +436 -376
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +496 -450
- 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 +17 -16
- package/src/recurrence-editor/date-generator.js +1 -0
- package/src/recurrence-editor/recurrence-editor.d.ts +8 -8
- package/src/recurrence-editor/recurrence-editor.js +1 -2
- package/src/schedule/actions/crud.js +3 -1
- package/src/schedule/actions/drag.js +2 -1
- package/src/schedule/actions/keyboard.js +1 -1
- package/src/schedule/actions/resize.js +5 -0
- package/src/schedule/actions/virtual-scroll.js +2 -1
- package/src/schedule/base/interface.js +0 -1
- package/src/schedule/base/schedule-model.d.ts +11 -11
- package/src/schedule/base/schedule.d.ts +11 -11
- package/src/schedule/base/schedule.js +28 -12
- package/src/schedule/base/util.js +1 -1
- package/src/schedule/event-renderer/agenda-base.js +2 -2
- package/src/schedule/event-renderer/event-base.js +6 -4
- package/src/schedule/event-renderer/month.js +2 -1
- package/src/schedule/event-renderer/timeline-view.js +10 -3
- package/src/schedule/event-renderer/vertical-view.js +4 -4
- package/src/schedule/event-renderer/year.js +3 -2
- package/src/schedule/exports/calendar-import.js +1 -2
- package/src/schedule/exports/print.js +10 -7
- package/src/schedule/models/toolbar-model.d.ts +2 -2
- package/src/schedule/popups/event-window.js +1 -1
- package/src/schedule/popups/quick-popups.js +1 -1
- package/src/schedule/renderer/header-renderer.js +7 -5
- 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 +24 -9
- package/src/schedule/renderer/view-base.d.ts +1 -0
- package/src/schedule/renderer/view-base.js +33 -6
- package/src/schedule/renderer/year.js +1 -1
- package/styles/bootstrap-dark.css +236 -147
- package/styles/bootstrap-dark.scss +19 -2
- package/styles/bootstrap.css +237 -148
- package/styles/bootstrap.scss +19 -2
- package/styles/bootstrap4.css +239 -153
- package/styles/bootstrap4.scss +19 -2
- package/styles/bootstrap5-dark.css +229 -144
- package/styles/bootstrap5-dark.scss +19 -2
- package/styles/bootstrap5.css +229 -144
- package/styles/bootstrap5.scss +19 -2
- package/styles/fabric-dark.css +234 -146
- package/styles/fabric-dark.scss +19 -2
- package/styles/fabric.css +234 -146
- package/styles/fabric.scss +19 -2
- package/styles/fluent-dark.css +229 -142
- package/styles/fluent-dark.scss +19 -2
- package/styles/fluent.css +229 -142
- package/styles/fluent.scss +19 -2
- package/styles/fluent2.css +5947 -0
- package/styles/fluent2.scss +19 -0
- package/styles/highcontrast-light.css +229 -138
- package/styles/highcontrast-light.scss +19 -2
- package/styles/highcontrast.css +229 -138
- package/styles/highcontrast.scss +19 -2
- package/styles/material-dark.css +273 -155
- package/styles/material-dark.scss +19 -2
- package/styles/material.css +285 -156
- package/styles/material.scss +19 -2
- package/styles/material3-dark.css +278 -154
- package/styles/material3-dark.scss +19 -2
- package/styles/material3.css +278 -154
- package/styles/material3.scss +19 -2
- package/styles/recurrence-editor/_bds-definition.scss +0 -1
- package/styles/recurrence-editor/_bootstrap-dark-definition.scss +0 -1
- package/styles/recurrence-editor/_bootstrap-definition.scss +0 -1
- package/styles/recurrence-editor/_bootstrap4-definition.scss +0 -1
- package/styles/recurrence-editor/_bootstrap5-definition.scss +0 -1
- package/styles/recurrence-editor/_bootstrap5.3-definition.scss +14 -0
- package/styles/recurrence-editor/_fabric-dark-definition.scss +0 -1
- package/styles/recurrence-editor/_fabric-definition.scss +0 -1
- package/styles/recurrence-editor/_fluent-definition.scss +0 -1
- package/styles/recurrence-editor/_fluent2-definition.scss +14 -0
- package/styles/recurrence-editor/_fusionnew-definition.scss +0 -1
- package/styles/recurrence-editor/_highcontrast-definition.scss +0 -1
- package/styles/recurrence-editor/_highcontrast-light-definition.scss +0 -1
- package/styles/recurrence-editor/_layout.scss +1 -17
- package/styles/recurrence-editor/_material-dark-definition.scss +0 -1
- package/styles/recurrence-editor/_material-definition.scss +0 -1
- package/styles/recurrence-editor/_material3-definition.scss +0 -1
- package/styles/recurrence-editor/_tailwind-definition.scss +0 -1
- package/styles/recurrence-editor/bootstrap-dark.css +21 -23
- package/styles/recurrence-editor/bootstrap.css +21 -23
- package/styles/recurrence-editor/bootstrap4.css +22 -23
- package/styles/recurrence-editor/bootstrap5-dark.css +22 -23
- package/styles/recurrence-editor/bootstrap5.css +22 -23
- package/styles/recurrence-editor/fabric-dark.css +19 -22
- package/styles/recurrence-editor/fabric.css +19 -22
- package/styles/recurrence-editor/fluent-dark.css +22 -23
- package/styles/recurrence-editor/fluent.css +22 -23
- package/styles/recurrence-editor/fluent2.css +1534 -0
- package/styles/recurrence-editor/fluent2.scss +8 -0
- package/styles/recurrence-editor/highcontrast-light.css +19 -22
- package/styles/recurrence-editor/highcontrast.css +19 -22
- package/styles/recurrence-editor/material-dark.css +32 -26
- package/styles/recurrence-editor/material.css +32 -26
- package/styles/recurrence-editor/material3-dark.css +33 -27
- package/styles/recurrence-editor/material3.css +33 -27
- package/styles/recurrence-editor/tailwind-dark.css +32 -26
- package/styles/recurrence-editor/tailwind.css +32 -26
- package/styles/schedule/_bds-definition.scss +0 -15
- package/styles/schedule/_bootstrap-dark-definition.scss +4 -19
- package/styles/schedule/_bootstrap-definition.scss +4 -19
- package/styles/schedule/_bootstrap4-definition.scss +3 -18
- package/styles/schedule/_bootstrap5-definition.scss +1 -22
- package/styles/schedule/_bootstrap5.3-definition.scss +273 -0
- package/styles/schedule/_fabric-dark-definition.scss +4 -17
- package/styles/schedule/_fabric-definition.scss +4 -19
- package/styles/schedule/_fluent-definition.scss +0 -14
- package/styles/schedule/_fluent2-definition.scss +273 -0
- package/styles/schedule/_fusionnew-definition.scss +0 -21
- package/styles/schedule/_highcontrast-definition.scss +1 -16
- package/styles/schedule/_highcontrast-light-definition.scss +1 -16
- package/styles/schedule/_layout.scss +83 -130
- package/styles/schedule/_material-dark-definition.scss +5 -20
- package/styles/schedule/_material-definition.scss +4 -19
- package/styles/schedule/_material3-definition.scss +1 -23
- package/styles/schedule/_tailwind-definition.scss +0 -16
- package/styles/schedule/_theme.scss +18 -2
- package/styles/schedule/bootstrap-dark.css +220 -126
- package/styles/schedule/bootstrap.css +221 -127
- package/styles/schedule/bootstrap4.css +223 -132
- package/styles/schedule/bootstrap5-dark.css +213 -123
- package/styles/schedule/bootstrap5.css +213 -123
- package/styles/schedule/fabric-dark.css +218 -125
- package/styles/schedule/fabric.css +218 -125
- package/styles/schedule/fluent-dark.css +213 -121
- package/styles/schedule/fluent.css +213 -121
- package/styles/schedule/fluent2.css +5551 -0
- package/styles/schedule/fluent2.scss +16 -0
- package/styles/schedule/highcontrast-light.css +213 -117
- package/styles/schedule/highcontrast.css +213 -117
- package/styles/schedule/icons/_bds.scss +6 -21
- package/styles/schedule/icons/_bootstrap-dark.scss +4 -16
- package/styles/schedule/icons/_bootstrap.scss +4 -16
- package/styles/schedule/icons/_bootstrap4.scss +8 -26
- package/styles/schedule/icons/_bootstrap5.3.scss +220 -0
- package/styles/schedule/icons/_bootstrap5.scss +7 -22
- package/styles/schedule/icons/_fabric-dark.scss +5 -17
- package/styles/schedule/icons/_fabric.scss +5 -17
- package/styles/schedule/icons/_fluent.scss +7 -22
- package/styles/schedule/icons/_fluent2.scss +220 -0
- package/styles/schedule/icons/_fusionnew.scss +7 -22
- package/styles/schedule/icons/_highcontrast-light.scss +5 -17
- package/styles/schedule/icons/_highcontrast.scss +5 -17
- package/styles/schedule/icons/_material-dark.scss +5 -17
- package/styles/schedule/icons/_material.scss +5 -17
- package/styles/schedule/icons/_material3.scss +7 -22
- package/styles/schedule/icons/_tailwind.scss +7 -22
- package/styles/schedule/material-dark.css +257 -134
- package/styles/schedule/material.css +269 -135
- package/styles/schedule/material3-dark.css +262 -133
- package/styles/schedule/material3.css +262 -133
- package/styles/schedule/tailwind-dark.css +223 -124
- package/styles/schedule/tailwind.css +223 -124
- package/styles/tailwind-dark.css +239 -145
- package/styles/tailwind-dark.scss +19 -2
- package/styles/tailwind.css +239 -145
- package/styles/tailwind.scss +19 -2
- package/CHANGELOG.md +0 -1932
|
@@ -1107,7 +1107,7 @@ var EventWindow = /** @class */ (function () {
|
|
|
1107
1107
|
};
|
|
1108
1108
|
EventWindow.prototype.getFormat = function (formatType) {
|
|
1109
1109
|
var format;
|
|
1110
|
-
if (this.parent.locale === 'en' || this.parent.locale === 'en-US') {
|
|
1110
|
+
if (isNullOrUndefined(this.parent.locale) || this.parent.locale === 'en' || this.parent.locale === 'en-US') {
|
|
1111
1111
|
format = getValue(formatType + '.short', getDefaultDateObject(this.parent.getCalendarMode()));
|
|
1112
1112
|
}
|
|
1113
1113
|
else {
|
|
@@ -325,7 +325,7 @@ var QuickPopups = /** @class */ (function () {
|
|
|
325
325
|
var templateElement = void 0;
|
|
326
326
|
if (!isNullOrUndefined(this_1.parent.activeViewOptions.eventTemplate)) {
|
|
327
327
|
var tempId = this_1.parent.element.id + '_' + this_1.parent.activeViewOptions.eventTemplateName + 'eventTemplate';
|
|
328
|
-
templateElement = this_1.parent.getAppointmentTemplate()(eventData, this_1.parent, 'eventTemplate', tempId, false);
|
|
328
|
+
templateElement = this_1.parent.getAppointmentTemplate()(eventData, this_1.parent, 'eventTemplate', tempId, false, undefined, undefined, this_1.parent.root);
|
|
329
329
|
append(templateElement, appointmentElement);
|
|
330
330
|
}
|
|
331
331
|
else {
|
|
@@ -74,7 +74,8 @@ var HeaderRenderer = /** @class */ (function () {
|
|
|
74
74
|
};
|
|
75
75
|
HeaderRenderer.prototype.renderToolbar = function () {
|
|
76
76
|
var _this = this;
|
|
77
|
-
var items = (this.parent.toolbarItems && this.parent.toolbarItems.length > 0) ?
|
|
77
|
+
var items = (this.parent.toolbarItems && this.parent.toolbarItems.length > 0) ?
|
|
78
|
+
this.getToolbarItems() : this.getItems();
|
|
78
79
|
this.parent.trigger(events.actionBegin, { requestType: 'toolbarItemRendering', items: items }, function (args) {
|
|
79
80
|
_this.toolbarObj = new Toolbar({
|
|
80
81
|
items: args.items,
|
|
@@ -167,6 +168,7 @@ var HeaderRenderer = /** @class */ (function () {
|
|
|
167
168
|
if (!selEle) {
|
|
168
169
|
return;
|
|
169
170
|
}
|
|
171
|
+
selEle.firstElementChild.setAttribute('aria-haspopup', 'true');
|
|
170
172
|
var textEle = selEle.querySelector('.e-tbar-btn-text');
|
|
171
173
|
if (this.parent.activeViewOptions.dateRangeTemplate) {
|
|
172
174
|
textEle.textContent = '';
|
|
@@ -176,7 +178,7 @@ var HeaderRenderer = /** @class */ (function () {
|
|
|
176
178
|
};
|
|
177
179
|
var viewName = this.parent.activeViewOptions.dateRangeTemplateName;
|
|
178
180
|
var templateId = this.parent.element.id + '_' + viewName + 'dateRangeTemplate';
|
|
179
|
-
var dateTemplate = [].slice.call(this.parent.getDateRangeTemplate()(args, this.parent, 'dateRangeTemplate', templateId, false));
|
|
181
|
+
var dateTemplate = [].slice.call(this.parent.getDateRangeTemplate()(args, this.parent, 'dateRangeTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
180
182
|
append(dateTemplate, textEle);
|
|
181
183
|
}
|
|
182
184
|
else {
|
|
@@ -314,7 +316,7 @@ var HeaderRenderer = /** @class */ (function () {
|
|
|
314
316
|
items.push(__assign({}, tbItem, propItem));
|
|
315
317
|
break;
|
|
316
318
|
case 'Views':
|
|
317
|
-
if (this.parent.views.length > 1) {
|
|
319
|
+
if (!isNullOrUndefined(this.parent.views) && this.parent.views.length > 1) {
|
|
318
320
|
for (var _b = 0, _c = this.parent.views; _b < _c.length; _b++) {
|
|
319
321
|
var view = _c[_b];
|
|
320
322
|
tbItem = this.getItemObject(view);
|
|
@@ -364,11 +366,11 @@ var HeaderRenderer = /** @class */ (function () {
|
|
|
364
366
|
align: 'Right', showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-today',
|
|
365
367
|
text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
|
|
366
368
|
});
|
|
367
|
-
if (this.parent.views.length > 1) {
|
|
369
|
+
if (!isNullOrUndefined(this.parent.views) && this.parent.views.length > 1) {
|
|
368
370
|
items.push({ align: 'Right', type: 'Separator', cssClass: 'e-schedule-seperator' });
|
|
369
371
|
}
|
|
370
372
|
}
|
|
371
|
-
if (this.parent.views.length > 1) {
|
|
373
|
+
if (!isNullOrUndefined(this.parent.views) && this.parent.views.length > 1) {
|
|
372
374
|
for (var _i = 0, _a = this.parent.views; _i < _a.length; _i++) {
|
|
373
375
|
var item = _a[_i];
|
|
374
376
|
items.push(this.getItemObject(item));
|
|
@@ -347,7 +347,7 @@ var Month = /** @class */ (function (_super) {
|
|
|
347
347
|
var elementId = this.parent.element.id + '_';
|
|
348
348
|
var viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
349
349
|
var templateId = elementId + viewName + 'dateHeaderTemplate';
|
|
350
|
-
var dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(cellArgs, this.parent, 'dateHeaderTemplate', templateId, false));
|
|
350
|
+
var dateTemplate = [].slice.call(this.parent.getDateHeaderTemplate()(cellArgs, this.parent, 'dateHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
351
351
|
if (dateTemplate && dateTemplate.length) {
|
|
352
352
|
append(dateTemplate, tdEle);
|
|
353
353
|
}
|
|
@@ -523,7 +523,7 @@ var Month = /** @class */ (function (_super) {
|
|
|
523
523
|
var scheduleId = this.parent.element.id + '_';
|
|
524
524
|
var viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
525
525
|
var templateId = scheduleId + viewName + 'cellTemplate';
|
|
526
|
-
var cellTemplate = [].slice.call(this.parent.getCellTemplate()(args_1, this.parent, 'cellTemplate', templateId, false));
|
|
526
|
+
var cellTemplate = [].slice.call(this.parent.getCellTemplate()(args_1, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
527
527
|
append(cellTemplate, ntd);
|
|
528
528
|
}
|
|
529
529
|
var args = { elementType: type, element: ntd, date: data.date, groupIndex: data.groupIndex };
|
|
@@ -540,7 +540,7 @@ var Month = /** @class */ (function (_super) {
|
|
|
540
540
|
var scheduleId = this.parent.element.id + '_';
|
|
541
541
|
var viewName = this.parent.activeViewOptions.cellHeaderTemplateName;
|
|
542
542
|
var templateId = scheduleId + viewName + 'cellHeaderTemplate';
|
|
543
|
-
var cellHeaderTemplate = [].slice.call(this.parent.getCellHeaderTemplate()(args, this.parent, 'cellHeaderTemplate', templateId, false));
|
|
543
|
+
var cellHeaderTemplate = [].slice.call(this.parent.getCellHeaderTemplate()(args, this.parent, 'cellHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
544
544
|
append(cellHeaderTemplate, dateHeader);
|
|
545
545
|
}
|
|
546
546
|
else {
|
|
@@ -670,7 +670,8 @@ var Month = /** @class */ (function (_super) {
|
|
|
670
670
|
return this.formatDateRange(this.parent.selectedDate);
|
|
671
671
|
};
|
|
672
672
|
Month.prototype.getLabelText = function (view) {
|
|
673
|
-
|
|
673
|
+
var viewStr = view.charAt(0).toLowerCase() + view.substring(1);
|
|
674
|
+
return this.formatViewLabel(viewStr, this.getStartDate(), this.getEndDate());
|
|
674
675
|
};
|
|
675
676
|
Month.prototype.createWeekNumberElement = function (text) {
|
|
676
677
|
var tr = createElement('tr');
|
|
@@ -147,9 +147,15 @@ var Render = /** @class */ (function () {
|
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
Render.prototype.updateLabelText = function (view) {
|
|
150
|
-
var content = this.parent.activeView.getLabelText(view);
|
|
151
150
|
this.parent.element.setAttribute('role', 'application');
|
|
152
|
-
this.parent.element.
|
|
151
|
+
this.parent.element.removeAttribute('aria-labelledby');
|
|
152
|
+
this.parent.element.removeAttribute('aria-label');
|
|
153
|
+
if (view === 'Year') {
|
|
154
|
+
this.parent.element.setAttribute('aria-label', this.parent.activeView.getLabelText(view));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
this.parent.element.setAttribute('aria-labelledby', this.parent.element.id + '_table');
|
|
158
|
+
}
|
|
153
159
|
};
|
|
154
160
|
return Render;
|
|
155
161
|
}());
|
|
@@ -413,10 +413,10 @@ var TimelineYear = /** @class */ (function (_super) {
|
|
|
413
413
|
var monthId = "schedule_" + this.parent.activeViewOptions.dayHeaderTemplateName + "monthHeaderTemplate";
|
|
414
414
|
if (type === 'dayHeaderTemplate') {
|
|
415
415
|
args.day = this.parent.getDayNames('wide')[column % 7];
|
|
416
|
-
return [].slice.call(this.parent.getDayHeaderTemplate()(args, this.parent, 'dayHeaderTemplate', dayId, false));
|
|
416
|
+
return [].slice.call(this.parent.getDayHeaderTemplate()(args, this.parent, 'dayHeaderTemplate', dayId, false, undefined, undefined, this.parent.root));
|
|
417
417
|
}
|
|
418
418
|
else {
|
|
419
|
-
return [].slice.call(this.parent.getMonthHeaderTemplate()(args, this.parent, 'monthHeaderTemplate', monthId, false));
|
|
419
|
+
return [].slice.call(this.parent.getMonthHeaderTemplate()(args, this.parent, 'monthHeaderTemplate', monthId, false, undefined, undefined, this.parent.root));
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
422
|
TimelineYear.prototype.renderCellTemplate = function (data, td) {
|
|
@@ -430,7 +430,7 @@ var TimelineYear = /** @class */ (function (_super) {
|
|
|
430
430
|
var scheduleId = this.parent.element.id + '_';
|
|
431
431
|
var viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
432
432
|
var templateId = scheduleId + viewName + 'cellTemplate';
|
|
433
|
-
var cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false));
|
|
433
|
+
var cellTemplate = [].slice.call(this.parent.getCellTemplate()(args, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
434
434
|
append(cellTemplate, td);
|
|
435
435
|
};
|
|
436
436
|
TimelineYear.prototype.scrollToDate = function (scrollDate) {
|
|
@@ -56,6 +56,7 @@ export declare class VerticalView extends ViewBase implements IRenderer {
|
|
|
56
56
|
getScrollableElement(): Element;
|
|
57
57
|
getLeftPanelElement(): HTMLElement;
|
|
58
58
|
getEndDateFromStartDate(start: Date): Date;
|
|
59
|
+
private getStartEndHours;
|
|
59
60
|
getTimeSlotRows(handler?: CallbackFunction): TimeSlotData[];
|
|
60
61
|
getAdjustedDate(startTime: Date): Date;
|
|
61
62
|
destroy(): void;
|
|
@@ -134,6 +134,9 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
134
134
|
this.highlightCurrentTime();
|
|
135
135
|
}
|
|
136
136
|
this.retainScrollPosition();
|
|
137
|
+
if (!isNullOrUndefined(timeCells) && !isNullOrUndefined(content) && timeCells.scrollTop !== content.scrollTop) {
|
|
138
|
+
timeCells.scrollTop = content.scrollTop;
|
|
139
|
+
}
|
|
137
140
|
};
|
|
138
141
|
VerticalView.prototype.setContentHeight = function (element, leftPanelElement, height) {
|
|
139
142
|
if (this.parent.isAdaptive && !this.isTimelineView()) {
|
|
@@ -384,7 +387,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
384
387
|
templateName = 'dateHeaderTemplate';
|
|
385
388
|
var args = { date: date, type: type };
|
|
386
389
|
var viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
387
|
-
cntEle = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false));
|
|
390
|
+
cntEle = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false, undefined, undefined, this.parent.root));
|
|
388
391
|
}
|
|
389
392
|
else {
|
|
390
393
|
wrapper.innerHTML = this.parent.activeView.isTimelineView() ?
|
|
@@ -398,7 +401,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
398
401
|
if (this.parent.activeViewOptions.timeScale.majorSlotTemplate) {
|
|
399
402
|
templateName = 'majorSlotTemplate';
|
|
400
403
|
var args = { date: date, type: type };
|
|
401
|
-
cntEle = [].slice.call(this.parent.getMajorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false));
|
|
404
|
+
cntEle = [].slice.call(this.parent.getMajorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false, undefined, undefined, this.parent.root));
|
|
402
405
|
}
|
|
403
406
|
else {
|
|
404
407
|
wrapper.innerHTML = "<span>" + this.getTime(date) + "</span>";
|
|
@@ -409,7 +412,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
409
412
|
if (this.parent.activeViewOptions.timeScale.minorSlotTemplate) {
|
|
410
413
|
templateName = 'minorSlotTemplate';
|
|
411
414
|
var args = { date: date, type: type };
|
|
412
|
-
cntEle = [].slice.call(this.parent.getMinorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false));
|
|
415
|
+
cntEle = [].slice.call(this.parent.getMinorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false, undefined, undefined, this.parent.root));
|
|
413
416
|
}
|
|
414
417
|
else {
|
|
415
418
|
cntEle = [].slice.call(wrapper.childNodes);
|
|
@@ -420,7 +423,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
420
423
|
var viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
421
424
|
templateName = 'cellTemplate';
|
|
422
425
|
var args = { date: date, type: type, groupIndex: groupIndex };
|
|
423
|
-
cntEle = [].slice.call(this.parent.getCellTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false));
|
|
426
|
+
cntEle = [].slice.call(this.parent.getCellTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false, undefined, undefined, this.parent.root));
|
|
424
427
|
}
|
|
425
428
|
break;
|
|
426
429
|
}
|
|
@@ -539,7 +542,8 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
539
542
|
var appointmentExpandCollapse = createElement('div', {
|
|
540
543
|
attrs: {
|
|
541
544
|
'tabindex': '0', 'role': 'list',
|
|
542
|
-
title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
|
|
545
|
+
title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
|
|
546
|
+
'aria-label': this.parent.localeObj.getConstant('expandAllDaySection')
|
|
543
547
|
},
|
|
544
548
|
className: cls.ALLDAY_APPOINTMENT_SECTION_CLASS + ' ' + cls.APPOINTMENT_ROW_EXPAND_CLASS + ' ' +
|
|
545
549
|
cls.ICON + ' ' + cls.DISABLE_CLASS
|
|
@@ -696,7 +700,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
696
700
|
if (!this.parent.isMinMaxDate(cellDate)) {
|
|
697
701
|
clsName.push(cls.DISABLE_DATES);
|
|
698
702
|
}
|
|
699
|
-
|
|
703
|
+
cellDate = new Date(cellDate.setHours(r.date.getHours(), r.date.getMinutes(), r.date.getSeconds(), r.date.getMilliseconds()));
|
|
700
704
|
var type = 'workCells';
|
|
701
705
|
if (tdData.className.indexOf(cls.RESOURCE_PARENT_CLASS) !== -1) {
|
|
702
706
|
clsName.push(cls.RESOURCE_GROUP_CELLS_CLASS);
|
|
@@ -713,7 +717,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
713
717
|
var scheduleId = this.parent.element.id + '_';
|
|
714
718
|
var viewName = this.parent.activeViewOptions.cellTemplateName;
|
|
715
719
|
var templateId = scheduleId + viewName + 'cellTemplate';
|
|
716
|
-
var tooltipTemplate = [].slice.call(this.parent.getCellTemplate()(args_1, this.parent, 'cellTemplate', templateId, false));
|
|
720
|
+
var tooltipTemplate = [].slice.call(this.parent.getCellTemplate()(args_1, this.parent, 'cellTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
717
721
|
append(tooltipTemplate, ntd);
|
|
718
722
|
}
|
|
719
723
|
ntd.setAttribute('data-date', cellDate.getTime().toString());
|
|
@@ -769,10 +773,21 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
769
773
|
end.setMilliseconds(end.getMilliseconds() + msInterval);
|
|
770
774
|
return end;
|
|
771
775
|
};
|
|
776
|
+
VerticalView.prototype.getStartEndHours = function (startEndTime) {
|
|
777
|
+
if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
|
|
778
|
+
var startEndDate = new Date(2000, 0, 0, 0);
|
|
779
|
+
var timeString = startEndTime.split(':');
|
|
780
|
+
if (timeString.length === 2) {
|
|
781
|
+
startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
|
|
782
|
+
}
|
|
783
|
+
return startEndDate;
|
|
784
|
+
}
|
|
785
|
+
return new Date(2000, 0, 0, 0);
|
|
786
|
+
};
|
|
772
787
|
VerticalView.prototype.getTimeSlotRows = function (handler) {
|
|
773
788
|
var rows = [];
|
|
774
|
-
var startHour = this.
|
|
775
|
-
var endHour = this.
|
|
789
|
+
var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
790
|
+
var endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
|
|
776
791
|
var msMajorInterval = this.parent.activeViewOptions.timeScale.interval * util.MS_PER_MINUTE;
|
|
777
792
|
var msInterval = msMajorInterval / this.parent.activeViewOptions.timeScale.slotCount;
|
|
778
793
|
var length = Math.round(util.MS_PER_DAY / msInterval);
|
|
@@ -55,6 +55,7 @@ export declare class ViewBase {
|
|
|
55
55
|
isWorkHour(date: Date, startHour: Date, endHour: Date, workDays: number[]): boolean;
|
|
56
56
|
getRenderDates(workDays?: number[]): Date[];
|
|
57
57
|
getNextPreviousDate(type: string): Date;
|
|
58
|
+
formatViewLabel(view: string, startDate: Date, endDate: Date): string;
|
|
58
59
|
getLabelText(view: string): string;
|
|
59
60
|
getDateRangeText(): string;
|
|
60
61
|
formatDateRange(startDate: Date, endDate?: Date): string;
|
|
@@ -35,10 +35,11 @@ var ViewBase = /** @class */ (function () {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
var rendereData = this.parent.resourceBase.renderedResources;
|
|
39
|
+
if (!isNullOrUndefined(rendereData) && rendereData.length > 0) {
|
|
39
40
|
for (var i = 0; i < resourceTd.length; i++) {
|
|
40
41
|
var element = resourceTd[parseInt(i.toString(), 10)];
|
|
41
|
-
var data =
|
|
42
|
+
var data = rendereData[parseInt(i.toString(), 10)];
|
|
42
43
|
if (this.parent.activeView && !isNullOrUndefined(element) && !isNullOrUndefined(data)
|
|
43
44
|
&& parseInt(element.getAttribute('data-group-index'), 10) === data.groupIndex) {
|
|
44
45
|
this.parent.activeView.setResourceHeaderContent(element, data, cls.RESOURCE_TEXT_CLASS);
|
|
@@ -100,9 +101,15 @@ var ViewBase = /** @class */ (function () {
|
|
|
100
101
|
};
|
|
101
102
|
ViewBase.prototype.setAriaAttributes = function (table) {
|
|
102
103
|
table.setAttribute('role', 'grid');
|
|
104
|
+
if (this.parent.currentView !== 'Year') {
|
|
105
|
+
table.setAttribute('id', this.parent.element.id + '_table');
|
|
106
|
+
}
|
|
103
107
|
table.setAttribute('aria-label', this.getLabelText(this.parent.currentView));
|
|
104
108
|
};
|
|
105
109
|
ViewBase.prototype.createColGroup = function (table, lastRow) {
|
|
110
|
+
if (isNullOrUndefined(lastRow)) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
106
113
|
var length = lastRow.length;
|
|
107
114
|
if (lastRow[0] && lastRow[0].colSpan) {
|
|
108
115
|
length = lastRow.map(function (value) { return value.colSpan; }).reduce(function (prev, next) { return prev + next; });
|
|
@@ -246,7 +253,7 @@ var ViewBase = /** @class */ (function () {
|
|
|
246
253
|
};
|
|
247
254
|
ViewBase.prototype.isWorkDay = function (date, workDays) {
|
|
248
255
|
if (workDays === void 0) { workDays = this.parent.activeViewOptions.workDays; }
|
|
249
|
-
if (workDays.indexOf(date.getDay()) >= 0) {
|
|
256
|
+
if (!isNullOrUndefined(workDays) && workDays.indexOf(date.getDay()) >= 0) {
|
|
250
257
|
return true;
|
|
251
258
|
}
|
|
252
259
|
return false;
|
|
@@ -344,9 +351,29 @@ var ViewBase = /** @class */ (function () {
|
|
|
344
351
|
var weekLength = type === 'next' ? util.WEEK_LENGTH : -util.WEEK_LENGTH;
|
|
345
352
|
return util.addDays(this.parent.selectedDate, weekLength * this.parent.activeViewOptions.interval);
|
|
346
353
|
};
|
|
354
|
+
ViewBase.prototype.formatViewLabel = function (view, startDate, endDate) {
|
|
355
|
+
var formatOptions = { type: 'date', skeleton: 'full', calendar: this.parent.getCalendarMode() };
|
|
356
|
+
return this.parent.localeObj.getConstant(view) + ' ' + this.parent.localeObj.getConstant('start') + ' ' + this.parent.globalize.formatDate(startDate, formatOptions) + ' '
|
|
357
|
+
+ this.parent.localeObj.getConstant('endAt') + ' ' + this.parent.globalize.formatDate(endDate, formatOptions);
|
|
358
|
+
};
|
|
347
359
|
ViewBase.prototype.getLabelText = function (view) {
|
|
348
360
|
var viewStr = view.charAt(0).toLowerCase() + view.substring(1);
|
|
349
|
-
|
|
361
|
+
if (view === 'Year' || view === 'TimelineYear') {
|
|
362
|
+
return this.formatViewLabel(viewStr, this.parent.activeView.getStartDate(), this.parent.activeView.getEndDate());
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
if (this.renderDates.length > 0) {
|
|
366
|
+
if (this.parent.currentView === 'Day' || this.parent.currentView === 'TimelineDay') {
|
|
367
|
+
return this.parent.localeObj.getConstant(viewStr) + ' of ' + util.capitalizeFirstWord(this.parent.globalize.formatDate(this.parent.selectedDate, { type: 'date', skeleton: 'full', calendar: this.parent.getCalendarMode() }), 'single');
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
return this.formatViewLabel(viewStr, this.renderDates[0], this.renderDates[this.renderDates.length - 1]);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
return '';
|
|
375
|
+
}
|
|
376
|
+
}
|
|
350
377
|
};
|
|
351
378
|
ViewBase.prototype.getDateRangeText = function () {
|
|
352
379
|
if (this.parent.isAdaptive) {
|
|
@@ -373,7 +400,7 @@ var ViewBase = /** @class */ (function () {
|
|
|
373
400
|
}
|
|
374
401
|
var formattedStr;
|
|
375
402
|
var longDateFormat;
|
|
376
|
-
if (this.parent.locale === 'en' || this.parent.locale === 'en-US') {
|
|
403
|
+
if (isNullOrUndefined(this.parent.locale) || this.parent.locale === 'en' || this.parent.locale === 'en-US') {
|
|
377
404
|
longDateFormat = getValue('dateFormats.long', getDefaultDateObject(mode));
|
|
378
405
|
}
|
|
379
406
|
else {
|
|
@@ -437,7 +464,7 @@ var ViewBase = /** @class */ (function () {
|
|
|
437
464
|
var scheduleId = this.parent.element.id + '_';
|
|
438
465
|
var viewName = this.parent.activeViewOptions.resourceHeaderTemplateName;
|
|
439
466
|
var templateId = scheduleId + viewName + 'resourceHeaderTemplate';
|
|
440
|
-
var quickTemplate = [].slice.call(this.parent.getResourceHeaderTemplate()(data, this.parent, 'resourceHeaderTemplate', templateId, false));
|
|
467
|
+
var quickTemplate = [].slice.call(this.parent.getResourceHeaderTemplate()(data, this.parent, 'resourceHeaderTemplate', templateId, false, undefined, undefined, this.parent.root));
|
|
441
468
|
append(quickTemplate, tdElement);
|
|
442
469
|
}
|
|
443
470
|
else {
|
|
@@ -280,7 +280,7 @@ var Year = /** @class */ (function (_super) {
|
|
|
280
280
|
};
|
|
281
281
|
Year.prototype.renderTemplates = function (fn, args, tName, vName, ele) {
|
|
282
282
|
var templateId = this.parent.element.id + '_' + vName + tName;
|
|
283
|
-
var template = [].slice.call(fn(args, this.parent, tName, templateId, false));
|
|
283
|
+
var template = [].slice.call(fn(args, this.parent, tName, templateId, false, undefined, undefined, this.parent.root));
|
|
284
284
|
append(template, ele);
|
|
285
285
|
};
|
|
286
286
|
Year.prototype.onCellClick = function (e) {
|