@syncfusion/ej2-schedule 19.2.60 → 19.3.48
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 +1 -1
- package/CHANGELOG.md +65 -0
- 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 +445 -164
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +456 -172
- 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 +15 -15
- package/src/schedule/actions/action-base.js +1 -1
- package/src/schedule/actions/crud.js +3 -2
- package/src/schedule/actions/drag.d.ts +2 -0
- package/src/schedule/actions/drag.js +27 -17
- package/src/schedule/actions/keyboard.js +5 -5
- package/src/schedule/actions/resize.js +17 -10
- package/src/schedule/actions/virtual-scroll.js +2 -1
- package/src/schedule/base/interface.d.ts +9 -0
- package/src/schedule/base/resource.js +12 -3
- package/src/schedule/base/schedule-model.d.ts +13 -1
- package/src/schedule/base/schedule.d.ts +45 -2
- package/src/schedule/base/schedule.js +139 -14
- package/src/schedule/base/type.d.ts +4 -0
- package/src/schedule/event-renderer/event-base.d.ts +2 -1
- package/src/schedule/event-renderer/event-base.js +42 -28
- package/src/schedule/event-renderer/month.d.ts +0 -1
- package/src/schedule/event-renderer/month.js +32 -33
- package/src/schedule/event-renderer/timeline-view.d.ts +2 -0
- package/src/schedule/event-renderer/timeline-view.js +31 -1
- package/src/schedule/event-renderer/vertical-view.js +26 -19
- package/src/schedule/event-renderer/year.js +4 -1
- package/src/schedule/models/event-settings-model.d.ts +21 -1
- package/src/schedule/models/event-settings.d.ts +20 -0
- package/src/schedule/models/event-settings.js +6 -0
- package/src/schedule/models/views-model.d.ts +9 -0
- package/src/schedule/models/views.d.ts +8 -0
- package/src/schedule/models/views.js +3 -0
- package/src/schedule/popups/event-window.d.ts +3 -2
- package/src/schedule/popups/event-window.js +7 -3
- package/src/schedule/popups/form-validator.js +4 -1
- package/src/schedule/popups/quick-popups.d.ts +3 -2
- package/src/schedule/popups/quick-popups.js +32 -13
- package/src/schedule/renderer/agenda.d.ts +1 -0
- package/src/schedule/renderer/agenda.js +20 -3
- package/src/schedule/renderer/header-renderer.d.ts +1 -0
- package/src/schedule/renderer/header-renderer.js +6 -1
- package/src/schedule/renderer/month.d.ts +1 -0
- package/src/schedule/renderer/month.js +7 -7
- package/src/schedule/renderer/timeline-year.js +8 -2
- package/src/schedule/renderer/vertical-view.d.ts +2 -0
- package/src/schedule/renderer/vertical-view.js +19 -8
- package/src/schedule/renderer/view-base.d.ts +2 -1
- package/src/schedule/renderer/view-base.js +11 -3
- package/styles/bootstrap-dark.css +48 -66
- package/styles/bootstrap.css +28 -45
- package/styles/bootstrap4.css +28 -44
- package/styles/bootstrap5-dark.css +5172 -0
- package/styles/bootstrap5-dark.scss +2 -0
- package/styles/bootstrap5.css +5173 -0
- package/styles/bootstrap5.scss +2 -0
- package/styles/fabric-dark.css +29 -61
- package/styles/fabric.css +28 -45
- package/styles/highcontrast-light.css +28 -76
- package/styles/highcontrast.css +30 -49
- package/styles/material-dark.css +72 -79
- package/styles/material.css +32 -45
- package/styles/recurrence-editor/_bootstrap5-dark-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap5-definition.scss +8 -0
- package/styles/recurrence-editor/_layout.scss +0 -4
- package/styles/recurrence-editor/_tailwind-dark-definition.scss +1 -8
- package/styles/recurrence-editor/_tailwind-definition.scss +8 -8
- package/styles/recurrence-editor/bootstrap-dark.css +0 -4
- package/styles/recurrence-editor/bootstrap.css +0 -4
- package/styles/recurrence-editor/bootstrap4.css +0 -4
- package/styles/recurrence-editor/bootstrap5-dark.css +479 -0
- package/styles/recurrence-editor/bootstrap5-dark.scss +3 -0
- package/styles/recurrence-editor/bootstrap5.css +479 -0
- package/styles/recurrence-editor/bootstrap5.scss +3 -0
- package/styles/recurrence-editor/fabric-dark.css +0 -4
- package/styles/recurrence-editor/fabric.css +0 -4
- package/styles/recurrence-editor/highcontrast-light.css +0 -4
- package/styles/recurrence-editor/highcontrast.css +0 -4
- package/styles/recurrence-editor/material-dark.css +0 -4
- package/styles/recurrence-editor/material.css +0 -4
- package/styles/recurrence-editor/tailwind-dark.css +0 -4
- package/styles/recurrence-editor/tailwind.css +0 -4
- package/styles/schedule/_bootstrap-dark-definition.scss +6 -6
- package/styles/schedule/_bootstrap-definition.scss +2 -2
- package/styles/schedule/_bootstrap4-definition.scss +6 -5
- package/styles/schedule/_bootstrap5-dark-definition.scss +1 -0
- package/styles/schedule/_bootstrap5-definition.scss +198 -0
- package/styles/schedule/_fabric-dark-definition.scss +3 -3
- package/styles/schedule/_fabric-definition.scss +2 -2
- package/styles/schedule/_highcontrast-definition.scss +3 -3
- package/styles/schedule/_highcontrast-light-definition.scss +2 -2
- package/styles/schedule/_layout.scss +97 -120
- package/styles/schedule/_material-dark-definition.scss +2 -2
- package/styles/schedule/_material-definition.scss +2 -2
- package/styles/schedule/_tailwind-dark-definition.scss +1 -196
- package/styles/schedule/_tailwind-definition.scss +195 -196
- package/styles/schedule/_theme.scss +33 -7
- package/styles/schedule/bootstrap-dark.css +48 -62
- package/styles/schedule/bootstrap.css +28 -41
- package/styles/schedule/bootstrap4.css +28 -40
- package/styles/schedule/bootstrap5-dark.css +4692 -0
- package/styles/schedule/bootstrap5-dark.scss +4 -0
- package/styles/schedule/bootstrap5.css +4693 -0
- package/styles/schedule/bootstrap5.scss +5 -0
- package/styles/schedule/fabric-dark.css +29 -57
- package/styles/schedule/fabric.css +28 -41
- package/styles/schedule/highcontrast-light.css +28 -72
- package/styles/schedule/highcontrast.css +30 -45
- package/styles/schedule/icons/_bootstrap5-dark.scss +1 -0
- package/styles/schedule/icons/_bootstrap5.scss +232 -0
- package/styles/schedule/icons/_tailwind-dark.scss +1 -231
- package/styles/schedule/icons/_tailwind.scss +231 -231
- package/styles/schedule/material-dark.css +72 -75
- package/styles/schedule/material.css +32 -41
- package/styles/schedule/tailwind-dark.css +53 -71
- package/styles/schedule/tailwind-dark.scss +0 -1
- package/styles/schedule/tailwind.css +53 -70
- package/styles/tailwind-dark.css +53 -75
- package/styles/tailwind.css +53 -74
|
@@ -18,7 +18,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
20
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
21
|
-
import { Component, Property, Event, Animation, Collection } from '@syncfusion/ej2-base';
|
|
21
|
+
import { Component, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';
|
|
22
22
|
import { EventHandler, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';
|
|
23
23
|
import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, Complex } from '@syncfusion/ej2-base';
|
|
24
24
|
import { getElement, removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';
|
|
@@ -110,11 +110,6 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
110
110
|
}
|
|
111
111
|
classList(this.element, addClasses, removeClasses);
|
|
112
112
|
this.validateDate();
|
|
113
|
-
this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
|
|
114
|
-
this.editorTemplateFn = this.templateParser(this.editorTemplate);
|
|
115
|
-
this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
|
|
116
|
-
this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
|
|
117
|
-
this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
|
|
118
113
|
createSpinner({ target: this.element });
|
|
119
114
|
this.scrollModule = new Scroll(this);
|
|
120
115
|
this.scrollModule.setWidth();
|
|
@@ -264,6 +259,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
264
259
|
obj.dayHeaderTemplateName = obj.dayHeaderTemplate ? obj.option : '';
|
|
265
260
|
obj.monthHeaderTemplateName = obj.monthHeaderTemplate ? obj.option : '';
|
|
266
261
|
obj.resourceHeaderTemplateName = obj.resourceHeaderTemplate ? obj.option : '';
|
|
262
|
+
obj.headerIndentTemplateName = obj.headerIndentTemplate ? obj.option : '';
|
|
267
263
|
obj.eventTemplateName = obj.eventTemplate ? obj.option : '';
|
|
268
264
|
if (!isNullOrUndefined(obj.firstDayOfWeek) && obj.firstDayOfWeek === 0) {
|
|
269
265
|
delete obj.firstDayOfWeek;
|
|
@@ -322,6 +318,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
322
318
|
eventTemplate: this.eventSettings.template,
|
|
323
319
|
dateHeaderTemplate: this.dateHeaderTemplate,
|
|
324
320
|
resourceHeaderTemplate: this.resourceHeaderTemplate,
|
|
321
|
+
headerIndentTemplate: this.headerIndentTemplate,
|
|
325
322
|
firstMonthOfYear: this.firstMonthOfYear,
|
|
326
323
|
firstDayOfWeek: this.firstDayOfWeek,
|
|
327
324
|
workDays: workDays,
|
|
@@ -397,7 +394,13 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
397
394
|
this.minorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate);
|
|
398
395
|
this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
|
|
399
396
|
this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);
|
|
397
|
+
this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);
|
|
400
398
|
this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);
|
|
399
|
+
this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
|
|
400
|
+
this.editorTemplateFn = this.templateParser(this.editorTemplate);
|
|
401
|
+
this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
|
|
402
|
+
this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
|
|
403
|
+
this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
|
|
401
404
|
};
|
|
402
405
|
Schedule.prototype.initializePopups = function () {
|
|
403
406
|
this.eventWindow = new EventWindow(this);
|
|
@@ -1037,6 +1040,15 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1037
1040
|
Schedule.prototype.getResourceHeaderTemplate = function () {
|
|
1038
1041
|
return this.resourceHeaderTemplateFn;
|
|
1039
1042
|
};
|
|
1043
|
+
/**
|
|
1044
|
+
* Method to process indent template
|
|
1045
|
+
*
|
|
1046
|
+
* @returns {CallbackFunction} Returns the callback function
|
|
1047
|
+
* @private
|
|
1048
|
+
*/
|
|
1049
|
+
Schedule.prototype.getHeaderIndentTemplate = function () {
|
|
1050
|
+
return this.headerIndentTemplateFn;
|
|
1051
|
+
};
|
|
1040
1052
|
/**
|
|
1041
1053
|
* Method to get dynamic CSS properties
|
|
1042
1054
|
*
|
|
@@ -1100,7 +1112,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1100
1112
|
&& !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
|
|
1101
1113
|
this.activeView.resetColWidth();
|
|
1102
1114
|
this.notify(events.scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
|
|
1103
|
-
this.
|
|
1115
|
+
this.refreshEvents(false);
|
|
1104
1116
|
}
|
|
1105
1117
|
else {
|
|
1106
1118
|
this.notify(events.contentReady, {});
|
|
@@ -1210,6 +1222,23 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1210
1222
|
}
|
|
1211
1223
|
return weekNumber;
|
|
1212
1224
|
};
|
|
1225
|
+
/**
|
|
1226
|
+
* Method to render the header indent template.
|
|
1227
|
+
*
|
|
1228
|
+
* @param {TdData} data Accepts the td data
|
|
1229
|
+
* @param {Element} td Accepts the td element
|
|
1230
|
+
* @returns {void}
|
|
1231
|
+
* @private
|
|
1232
|
+
*/
|
|
1233
|
+
Schedule.prototype.renderHeaderIndentTemplate = function (data, td) {
|
|
1234
|
+
if (this.activeViewOptions.headerIndentTemplate) {
|
|
1235
|
+
var scheduleId = this.element.id + '_';
|
|
1236
|
+
var viewName = this.activeViewOptions.headerIndentTemplateName;
|
|
1237
|
+
var templateId = scheduleId + viewName + 'headerIndentTemplate';
|
|
1238
|
+
var indentTemplate = [].slice.call(this.getHeaderIndentTemplate()(data, this, 'headerIndentTemplate', templateId, false));
|
|
1239
|
+
append(indentTemplate, td);
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1213
1242
|
Schedule.prototype.unWireEvents = function () {
|
|
1214
1243
|
EventHandler.remove(window, 'resize', this.onScheduleResize);
|
|
1215
1244
|
EventHandler.remove(window, 'orientationchange', this.onScheduleResize);
|
|
@@ -1278,7 +1307,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1278
1307
|
}
|
|
1279
1308
|
this.notify(events.scrollUiUpdate, { cssProperties: this.getCssProperties() });
|
|
1280
1309
|
if (this.activeView.isTimelineView()) {
|
|
1281
|
-
this.
|
|
1310
|
+
this.refreshEvents(false);
|
|
1282
1311
|
}
|
|
1283
1312
|
break;
|
|
1284
1313
|
case 'showWeekend':
|
|
@@ -1474,10 +1503,8 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1474
1503
|
break;
|
|
1475
1504
|
case 'allowDragAndDrop':
|
|
1476
1505
|
case 'allowResizing':
|
|
1477
|
-
this.notify(events.dataReady, { processedData: this.eventBase.processData(this.eventsData) });
|
|
1478
|
-
break;
|
|
1479
1506
|
case 'eventDragArea':
|
|
1480
|
-
this.
|
|
1507
|
+
this.refreshEvents(false);
|
|
1481
1508
|
break;
|
|
1482
1509
|
case 'weekRule':
|
|
1483
1510
|
state.isLayout = true;
|
|
@@ -1507,6 +1534,11 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1507
1534
|
}
|
|
1508
1535
|
state.isLayout = true;
|
|
1509
1536
|
break;
|
|
1537
|
+
case 'headerIndentTemplate':
|
|
1538
|
+
this.activeViewOptions.headerIndentTemplate = newProp.headerIndentTemplate;
|
|
1539
|
+
this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);
|
|
1540
|
+
state.isLayout = true;
|
|
1541
|
+
break;
|
|
1510
1542
|
}
|
|
1511
1543
|
};
|
|
1512
1544
|
Schedule.prototype.setRtlClass = function () {
|
|
@@ -1579,9 +1611,10 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1579
1611
|
this.eventWindow.refresh();
|
|
1580
1612
|
}
|
|
1581
1613
|
break;
|
|
1614
|
+
case 'spannedEventPlacement':
|
|
1582
1615
|
case 'enableMaxHeight':
|
|
1583
1616
|
case 'enableIndicator':
|
|
1584
|
-
this.
|
|
1617
|
+
this.refreshEvents(false);
|
|
1585
1618
|
break;
|
|
1586
1619
|
case 'ignoreWhitespace':
|
|
1587
1620
|
state.isLayout = true;
|
|
@@ -2125,14 +2158,103 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
2125
2158
|
* Refreshes the event dataSource. This method may be useful when the events alone in the schedule needs to be re-rendered.
|
|
2126
2159
|
*
|
|
2127
2160
|
* @function refreshEvents
|
|
2161
|
+
* @param {boolean} isRemoteRefresh Accepts the boolean to refresh data from remote or local
|
|
2128
2162
|
* @returns {void}
|
|
2129
2163
|
*/
|
|
2130
|
-
Schedule.prototype.refreshEvents = function () {
|
|
2164
|
+
Schedule.prototype.refreshEvents = function (isRemoteRefresh) {
|
|
2165
|
+
if (isRemoteRefresh === void 0) { isRemoteRefresh = true; }
|
|
2131
2166
|
if (this.dragAndDropModule) {
|
|
2132
2167
|
this.dragAndDropModule.actionObj.action = '';
|
|
2133
2168
|
removeClass([this.element], cls.EVENT_ACTION_CLASS);
|
|
2134
2169
|
}
|
|
2135
|
-
|
|
2170
|
+
if (isRemoteRefresh) {
|
|
2171
|
+
this.crudModule.refreshDataManager();
|
|
2172
|
+
}
|
|
2173
|
+
else {
|
|
2174
|
+
var eventsData = this.eventsData || [];
|
|
2175
|
+
var blockData = this.blockData || [];
|
|
2176
|
+
var data = eventsData.concat(blockData);
|
|
2177
|
+
this.notify(events.dataReady, { processedData: this.eventBase ? this.eventBase.processData(data) : [] });
|
|
2178
|
+
}
|
|
2179
|
+
};
|
|
2180
|
+
/**
|
|
2181
|
+
* Method to refresh the given Schedule templates
|
|
2182
|
+
*
|
|
2183
|
+
* @param {string} templateName Accepts the template name
|
|
2184
|
+
* @returns {void}
|
|
2185
|
+
*/
|
|
2186
|
+
Schedule.prototype.refreshTemplates = function (templateName) {
|
|
2187
|
+
if (templateName) {
|
|
2188
|
+
this.resetTemplates([templateName]);
|
|
2189
|
+
}
|
|
2190
|
+
else {
|
|
2191
|
+
this.resetTemplates();
|
|
2192
|
+
}
|
|
2193
|
+
switch (templateName) {
|
|
2194
|
+
case 'eventTemplate':
|
|
2195
|
+
this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
|
|
2196
|
+
this.refreshEvents(false);
|
|
2197
|
+
break;
|
|
2198
|
+
case 'dateHeaderTemplate':
|
|
2199
|
+
this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
|
|
2200
|
+
this.activeView.refreshHeader();
|
|
2201
|
+
break;
|
|
2202
|
+
case 'resourceHeaderTemplate':
|
|
2203
|
+
this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);
|
|
2204
|
+
if (this.activeView.isTimelineView()) {
|
|
2205
|
+
this.activeView.refreshResourceHeader();
|
|
2206
|
+
}
|
|
2207
|
+
else {
|
|
2208
|
+
this.activeView.refreshHeader();
|
|
2209
|
+
}
|
|
2210
|
+
break;
|
|
2211
|
+
case 'quickInfoTemplates':
|
|
2212
|
+
if (this.quickPopup) {
|
|
2213
|
+
this.quickPopup.destroy();
|
|
2214
|
+
this.quickPopup = null;
|
|
2215
|
+
}
|
|
2216
|
+
this.quickPopup = new QuickPopups(this);
|
|
2217
|
+
this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
|
|
2218
|
+
this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
|
|
2219
|
+
this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
|
|
2220
|
+
break;
|
|
2221
|
+
case 'editorTemplate':
|
|
2222
|
+
if (this.eventWindow) {
|
|
2223
|
+
this.eventWindow.destroy();
|
|
2224
|
+
this.eventWindow = null;
|
|
2225
|
+
}
|
|
2226
|
+
this.eventWindow = new EventWindow(this);
|
|
2227
|
+
this.editorTemplateFn = this.templateParser(this.editorTemplate);
|
|
2228
|
+
break;
|
|
2229
|
+
case 'tooltipTemplate':
|
|
2230
|
+
case 'headerTooltipTemplate':
|
|
2231
|
+
if (this.eventTooltip) {
|
|
2232
|
+
this.eventTooltip.destroy();
|
|
2233
|
+
this.eventTooltip = null;
|
|
2234
|
+
}
|
|
2235
|
+
this.eventTooltip = new EventTooltip(this);
|
|
2236
|
+
this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
|
|
2237
|
+
this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);
|
|
2238
|
+
break;
|
|
2239
|
+
default:
|
|
2240
|
+
this.initializeView(this.currentView);
|
|
2241
|
+
break;
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
/**
|
|
2245
|
+
* Refreshes the Schedule layout without re-render.
|
|
2246
|
+
*
|
|
2247
|
+
* @function refreshLayout
|
|
2248
|
+
* @returns {void}
|
|
2249
|
+
*/
|
|
2250
|
+
Schedule.prototype.refreshLayout = function () {
|
|
2251
|
+
this.onScheduleResize();
|
|
2252
|
+
if (this.headerModule) {
|
|
2253
|
+
this.headerModule.refresh();
|
|
2254
|
+
}
|
|
2255
|
+
if (this.eventWindow) {
|
|
2256
|
+
this.eventWindow.refresh();
|
|
2257
|
+
}
|
|
2136
2258
|
};
|
|
2137
2259
|
/**
|
|
2138
2260
|
* To retrieve the appointment object from element.
|
|
@@ -2520,6 +2642,9 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
2520
2642
|
__decorate([
|
|
2521
2643
|
Property()
|
|
2522
2644
|
], Schedule.prototype, "resourceHeaderTemplate", void 0);
|
|
2645
|
+
__decorate([
|
|
2646
|
+
Property()
|
|
2647
|
+
], Schedule.prototype, "headerIndentTemplate", void 0);
|
|
2523
2648
|
__decorate([
|
|
2524
2649
|
Complex({}, Group)
|
|
2525
2650
|
], Schedule.prototype, "group", void 0);
|
|
@@ -41,3 +41,7 @@ export declare type TemplateType = 'Both' | 'Cell' | 'Event';
|
|
|
41
41
|
* An enum that holds the different type of week number options in the scheduler.
|
|
42
42
|
*/
|
|
43
43
|
export declare type WeekRule = 'FirstDay' | 'FirstFourDayWeek' | 'FirstFullWeek';
|
|
44
|
+
/**
|
|
45
|
+
* An enum that holds the options to render the spanned events in all day row or time slot.
|
|
46
|
+
*/
|
|
47
|
+
export declare type SpannedEventPlacement = 'AllDayRow' | 'TimeSlot';
|
|
@@ -17,6 +17,7 @@ export declare class EventBase {
|
|
|
17
17
|
*/
|
|
18
18
|
constructor(parent: Schedule);
|
|
19
19
|
processData(events: Record<string, any>[], timeZonePropChanged?: boolean, oldTimezone?: string): Record<string, any>[];
|
|
20
|
+
updateEventDateTime(eventData: Record<string, any>): Record<string, any>;
|
|
20
21
|
getProcessedEvents(eventCollection?: Record<string, any>[]): Record<string, any>[];
|
|
21
22
|
timezonePropertyChange(oldTimezone: string): void;
|
|
22
23
|
timezoneConvert(eventData: Record<string, any>): void;
|
|
@@ -26,7 +27,7 @@ export declare class EventBase {
|
|
|
26
27
|
filterEvents(startDate: Date, endDate: Date, appointments?: Record<string, any>[], resourceTdData?: TdData): Record<string, any>[];
|
|
27
28
|
filterEventsByRange(eventCollection: Record<string, any>[], startDate?: Date, endDate?: Date): Record<string, any>[];
|
|
28
29
|
filterEventsByResource(resourceTdData: TdData, appointments?: Record<string, any>[]): Record<string, any>[];
|
|
29
|
-
sortByTime(
|
|
30
|
+
sortByTime(appointmentsCollection: Record<string, any>[]): Record<string, any>[];
|
|
30
31
|
sortByDateTime(appointments: Record<string, any>[]): Record<string, any>[];
|
|
31
32
|
getSmallestMissingNumber(array: number[]): number;
|
|
32
33
|
splitEventByDay(event: Record<string, any>): Record<string, any>[];
|
|
@@ -37,12 +37,7 @@ var EventBase = /** @class */ (function () {
|
|
|
37
37
|
if (generateID) {
|
|
38
38
|
event_1[fields.id] = temp++;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
event_1[fields.startTime] = util.getDateFromString(event_1[fields.startTime]);
|
|
42
|
-
}
|
|
43
|
-
if (typeof event_1[fields.endTime] === 'string') {
|
|
44
|
-
event_1[fields.endTime] = util.getDateFromString(event_1[fields.endTime]);
|
|
45
|
-
}
|
|
40
|
+
event_1 = this_1.updateEventDateTime(event_1);
|
|
46
41
|
if (timeZonePropChanged) {
|
|
47
42
|
this_1.processTimezoneChange(event_1, oldTimezone);
|
|
48
43
|
}
|
|
@@ -119,6 +114,15 @@ var EventBase = /** @class */ (function () {
|
|
|
119
114
|
this.parent.blockProcessed = blockData;
|
|
120
115
|
return eventData;
|
|
121
116
|
};
|
|
117
|
+
EventBase.prototype.updateEventDateTime = function (eventData) {
|
|
118
|
+
if (typeof eventData[this.parent.eventFields.startTime] === 'string') {
|
|
119
|
+
eventData[this.parent.eventFields.startTime] = util.getDateFromString(eventData[this.parent.eventFields.startTime]);
|
|
120
|
+
}
|
|
121
|
+
if (typeof eventData[this.parent.eventFields.endTime] === 'string') {
|
|
122
|
+
eventData[this.parent.eventFields.endTime] = util.getDateFromString(eventData[this.parent.eventFields.endTime]);
|
|
123
|
+
}
|
|
124
|
+
return eventData;
|
|
125
|
+
};
|
|
122
126
|
EventBase.prototype.getProcessedEvents = function (eventCollection) {
|
|
123
127
|
if (eventCollection === void 0) { eventCollection = this.parent.eventsData; }
|
|
124
128
|
var processed = [];
|
|
@@ -279,26 +283,36 @@ var EventBase = /** @class */ (function () {
|
|
|
279
283
|
}); });
|
|
280
284
|
return filteredCollection;
|
|
281
285
|
};
|
|
282
|
-
EventBase.prototype.sortByTime = function (
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
286
|
+
EventBase.prototype.sortByTime = function (appointmentsCollection) {
|
|
287
|
+
if (this.parent.eventSettings.sortComparer) {
|
|
288
|
+
appointmentsCollection = this.parent.eventSettings.sortComparer.call(this.parent, appointmentsCollection);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
var fieldMappings_1 = this.parent.eventFields;
|
|
292
|
+
appointmentsCollection.sort(function (a, b) {
|
|
293
|
+
var d1 = a[fieldMappings_1.startTime];
|
|
294
|
+
var d2 = b[fieldMappings_1.startTime];
|
|
295
|
+
return d1.getTime() - d2.getTime();
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
return appointmentsCollection;
|
|
290
299
|
};
|
|
291
300
|
EventBase.prototype.sortByDateTime = function (appointments) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
var
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
if (this.parent.eventSettings.sortComparer) {
|
|
302
|
+
appointments = this.parent.eventSettings.sortComparer.call(this.parent, appointments);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
var fieldMapping_1 = this.parent.eventFields;
|
|
306
|
+
appointments.sort(function (object1, object2) {
|
|
307
|
+
var d3 = object1[fieldMapping_1.startTime];
|
|
308
|
+
var d4 = object2[fieldMapping_1.startTime];
|
|
309
|
+
var d5 = object1[fieldMapping_1.endTime];
|
|
310
|
+
var d6 = object2[fieldMapping_1.endTime];
|
|
311
|
+
var d1 = d5.getTime() - d3.getTime();
|
|
312
|
+
var d2 = d6.getTime() - d4.getTime();
|
|
313
|
+
return (d3.getTime() - d4.getTime() || d2 - d1);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
302
316
|
return appointments;
|
|
303
317
|
};
|
|
304
318
|
EventBase.prototype.getSmallestMissingNumber = function (array) {
|
|
@@ -351,10 +365,10 @@ var EventBase = /** @class */ (function () {
|
|
|
351
365
|
};
|
|
352
366
|
EventBase.prototype.splitEvent = function (event, dateRender) {
|
|
353
367
|
var fields = this.parent.eventFields;
|
|
354
|
-
var start = util.resetTime(
|
|
355
|
-
var end = util.resetTime(
|
|
368
|
+
var start = util.resetTime(event[fields.startTime]).getTime();
|
|
369
|
+
var end = util.resetTime(event[fields.endTime]).getTime();
|
|
356
370
|
if (util.getDateInMs(event[fields.endTime]) <= 0) {
|
|
357
|
-
var temp = util.addDays(util.resetTime(
|
|
371
|
+
var temp = util.addDays(util.resetTime(event[fields.endTime]), -1).getTime();
|
|
358
372
|
end = start > temp ? start : temp;
|
|
359
373
|
}
|
|
360
374
|
var orgStart = start;
|
|
@@ -626,7 +640,7 @@ var EventBase = /** @class */ (function () {
|
|
|
626
640
|
var isAllDay = event[fieldMapping.isAllDay];
|
|
627
641
|
var isFullDay = ((event[fieldMapping.endTime].getTime() - event[fieldMapping.startTime].getTime())
|
|
628
642
|
/ util.MS_PER_DAY) >= 1;
|
|
629
|
-
return (isAllDay || isFullDay) ? true : false;
|
|
643
|
+
return (isAllDay || (!(this.parent.eventSettings.spannedEventPlacement == 'TimeSlot') && isFullDay)) ? true : false;
|
|
630
644
|
};
|
|
631
645
|
EventBase.prototype.addEventListener = function () {
|
|
632
646
|
this.parent.on(event.documentClick, this.appointmentBorderRemove, this);
|
|
@@ -49,7 +49,6 @@ export declare class MonthEvent extends EventBase {
|
|
|
49
49
|
renderEventElement(event: Record<string, any>, appointmentElement: HTMLElement, cellTd: Element): void;
|
|
50
50
|
getEventData(event: Record<string, any>): Record<string, any>;
|
|
51
51
|
renderElement(cellTd: HTMLElement | Element, element: HTMLElement, isAppointment?: boolean): void;
|
|
52
|
-
private renderWrapperElement;
|
|
53
52
|
getMoreIndicatorElement(count: number, startDate: Date, endDate: Date): HTMLElement;
|
|
54
53
|
removeHeightProperty(selector: string): void;
|
|
55
54
|
setMaxEventHeight(event: HTMLElement, cell: HTMLElement): void;
|
|
@@ -54,6 +54,9 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
MonthEvent.prototype.renderAppointments = function () {
|
|
57
|
+
if (this.parent.dragAndDropModule) {
|
|
58
|
+
this.parent.dragAndDropModule.setDragArea();
|
|
59
|
+
}
|
|
57
60
|
var conWrap = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
|
|
58
61
|
if (this.parent.rowAutoHeight) {
|
|
59
62
|
this.parent.uiStateValues.top = conWrap.scrollTop;
|
|
@@ -83,6 +86,13 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
83
86
|
if (!this.element.querySelector('.' + cls.WORK_CELLS_CLASS)) {
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
89
|
+
if (this.parent.currentView === 'Month') {
|
|
90
|
+
var wrapper = createElement('div', { className: cls.APPOINTMENT_WRAPPER_CLASS });
|
|
91
|
+
var cellTd = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
|
|
92
|
+
cellTd.appendChild(wrapper);
|
|
93
|
+
this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
|
|
94
|
+
cellTd.removeChild(wrapper);
|
|
95
|
+
}
|
|
86
96
|
this.eventHeight = util.getElementHeightFromClass(this.element, cls.APPOINTMENT_CLASS);
|
|
87
97
|
var scrollTop = conWrap.scrollTop;
|
|
88
98
|
if (this.parent.rowAutoHeight && this.parent.virtualScrollModule && !isNullOrUndefined(this.parent.currentAction)) {
|
|
@@ -114,10 +124,10 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
114
124
|
this.parent.virtualScrollModule.updateVirtualScrollHeight();
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
|
-
this.parent.notify(events.scrollUiUpdate, data);
|
|
118
127
|
if (!this.parent.enablePersistence) {
|
|
119
128
|
this.parent.notify(events.contentReady, {});
|
|
120
129
|
}
|
|
130
|
+
this.parent.notify(events.scrollUiUpdate, data);
|
|
121
131
|
if (this.parent.currentView === 'Month' && this.parent.showWeekNumber) {
|
|
122
132
|
var totalCells_1 = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
|
|
123
133
|
var weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + cls.WEEK_NUMBER_CLASS));
|
|
@@ -153,7 +163,9 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
153
163
|
this.sortByDateTime(blockList);
|
|
154
164
|
if (this.parent.currentView === 'Month' && this.parent.rowAutoHeight && this.parent.activeViewOptions.group.resources.length === 0) {
|
|
155
165
|
var totalCells = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
|
|
156
|
-
var height_1 = this.parent.element.querySelector('.e-
|
|
166
|
+
var height_1 = this.parent.height === 'auto' ? (this.parent.element.querySelector('.e-content-wrap').clientHeight +
|
|
167
|
+
this.parent.element.querySelector('.e-date-header-wrap').clientHeight) / totalCells.length
|
|
168
|
+
: this.parent.element.querySelector('.e-schedule-table').clientHeight / totalCells.length;
|
|
157
169
|
totalCells.forEach(function (cell) {
|
|
158
170
|
setStyleAttribute(cell, { 'height': height_1 + 'px' });
|
|
159
171
|
});
|
|
@@ -247,7 +259,6 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
247
259
|
appWidth = (appWidth <= 0) ? this.cellWidth : appWidth;
|
|
248
260
|
var appLeft = (this.parent.enableRtl) ? 0 : position;
|
|
249
261
|
var appRight = (this.parent.enableRtl) ? position : 0;
|
|
250
|
-
this.renderWrapperElement(cellTd);
|
|
251
262
|
var appHeight = this.cellHeight - this.monthHeaderHeight;
|
|
252
263
|
var appTop = this.getRowTop(resIndex);
|
|
253
264
|
var blockElement = this.createBlockAppointmentElement(event, resIndex);
|
|
@@ -354,18 +365,19 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
354
365
|
var eventSubject = (record[this.fields.subject] || this.parent.eventSettings.fields.subject.default ||
|
|
355
366
|
this.parent.localeObj.getConstant('addTitle'));
|
|
356
367
|
var newRecord = extend({}, record, record.data, true);
|
|
357
|
-
var
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
|
|
364
|
-
}
|
|
365
|
-
});
|
|
368
|
+
var attrs = {
|
|
369
|
+
'data-id': 'Appointment_' + record[this.fields.id],
|
|
370
|
+
'role': 'button', 'tabindex': '0',
|
|
371
|
+
'aria-readonly': this.parent.eventBase.getReadonlyAttribute(record), 'aria-selected': 'false', 'aria-grabbed': 'true',
|
|
372
|
+
'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
|
|
373
|
+
};
|
|
366
374
|
if (!isCloneElement) {
|
|
367
|
-
|
|
375
|
+
attrs['data-guid'] = record.Guid;
|
|
368
376
|
}
|
|
377
|
+
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
378
|
+
attrs['data-group-index'] = resIndex.toString();
|
|
379
|
+
}
|
|
380
|
+
var appointmentWrapper = createElement('div', { className: cls.APPOINTMENT_CLASS, attrs: attrs });
|
|
369
381
|
if (!isNullOrUndefined(this.cssClass)) {
|
|
370
382
|
addClass([appointmentWrapper], this.cssClass);
|
|
371
383
|
}
|
|
@@ -374,9 +386,6 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
374
386
|
}
|
|
375
387
|
var appointmentDetails = createElement('div', { className: cls.APPOINTMENT_DETAILS });
|
|
376
388
|
appointmentWrapper.appendChild(appointmentDetails);
|
|
377
|
-
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
378
|
-
appointmentWrapper.setAttribute('data-group-index', resIndex.toString());
|
|
379
|
-
}
|
|
380
389
|
var templateElement;
|
|
381
390
|
var eventData = record.data;
|
|
382
391
|
var eventObj = this.getEventData(record);
|
|
@@ -489,7 +498,6 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
489
498
|
var appWidth = (diffInDays * this.cellWidth) - 5;
|
|
490
499
|
var cellTd = this.workCells[day];
|
|
491
500
|
var appTop = (overlapCount * (appHeight + EVENT_GAP));
|
|
492
|
-
this.renderWrapperElement(cellTd);
|
|
493
501
|
var height = this.monthHeaderHeight + ((overlapCount + 1) * (appHeight + EVENT_GAP)) + this.moreIndicatorHeight;
|
|
494
502
|
var enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
|
|
495
503
|
if (this.parent.rowAutoHeight || enableAppRender) {
|
|
@@ -526,7 +534,7 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
526
534
|
moreIndicatorElement.setAttribute('data-group-index', groupIndex);
|
|
527
535
|
}
|
|
528
536
|
moreIndicatorElement.style.top = appArea + 'px';
|
|
529
|
-
moreIndicatorElement.style.width =
|
|
537
|
+
moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
|
|
530
538
|
this.renderElement(cellTd_1, moreIndicatorElement);
|
|
531
539
|
EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
|
|
532
540
|
}
|
|
@@ -567,8 +575,9 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
567
575
|
var appointmentsList = [];
|
|
568
576
|
for (var _i = 0, appointments_1 = appointments; _i < appointments_1.length; _i++) {
|
|
569
577
|
var app = appointments_1[_i];
|
|
570
|
-
|
|
571
|
-
|
|
578
|
+
var dateTime = util.resetTime(date).getTime();
|
|
579
|
+
if ((util.resetTime(app[this.fields.startTime]).getTime() <= dateTime) &&
|
|
580
|
+
(util.resetTime(app[this.fields.endTime]).getTime() >= dateTime)) {
|
|
572
581
|
appointmentsList.push(app);
|
|
573
582
|
}
|
|
574
583
|
}
|
|
@@ -637,8 +646,9 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
637
646
|
if (this.maxOrIndicator && isAppointment) {
|
|
638
647
|
this.setMaxEventHeight(element, cellTd);
|
|
639
648
|
}
|
|
640
|
-
|
|
641
|
-
|
|
649
|
+
var wrapperEle = cellTd.querySelector('.' + cls.APPOINTMENT_WRAPPER_CLASS);
|
|
650
|
+
if (wrapperEle) {
|
|
651
|
+
wrapperEle.appendChild(element);
|
|
642
652
|
}
|
|
643
653
|
else {
|
|
644
654
|
var wrapper = createElement('div', { className: cls.APPOINTMENT_WRAPPER_CLASS });
|
|
@@ -646,17 +656,6 @@ var MonthEvent = /** @class */ (function (_super) {
|
|
|
646
656
|
cellTd.appendChild(wrapper);
|
|
647
657
|
}
|
|
648
658
|
};
|
|
649
|
-
MonthEvent.prototype.renderWrapperElement = function (cellTd) {
|
|
650
|
-
var element = cellTd.querySelector('.' + cls.APPOINTMENT_WRAPPER_CLASS);
|
|
651
|
-
if (!isNullOrUndefined(element)) {
|
|
652
|
-
this.monthHeaderHeight = element.offsetTop - cellTd.offsetTop;
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
var wrapper = createElement('div', { className: cls.APPOINTMENT_WRAPPER_CLASS });
|
|
656
|
-
cellTd.appendChild(wrapper);
|
|
657
|
-
this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
|
|
658
|
-
}
|
|
659
|
-
};
|
|
660
659
|
MonthEvent.prototype.getMoreIndicatorElement = function (count, startDate, endDate) {
|
|
661
660
|
var moreIndicatorElement = createElement('div', {
|
|
662
661
|
className: cls.MORE_INDICATOR_CLASS,
|
|
@@ -18,6 +18,8 @@ export declare class TimelineEvent extends MonthEvent {
|
|
|
18
18
|
constructor(parent: Schedule, type: string);
|
|
19
19
|
getSlotDates(): void;
|
|
20
20
|
getOverlapEvents(date: Date, appointments: Record<string, any>[]): Record<string, any>[];
|
|
21
|
+
getSortComparerIndex(startDate: Date, endDate: Date): number;
|
|
22
|
+
getOverlapSortComparerEvents(startDate: Date, endDate: Date, appointmentsCollection: Record<string, any>[]): Record<string, any>[];
|
|
21
23
|
renderResourceEvents(): void;
|
|
22
24
|
renderEvents(event: Record<string, any>, resIndex: number, appointmentsList?: Record<string, any>[]): void;
|
|
23
25
|
private renderTimelineMoreIndicator;
|
|
@@ -76,6 +76,36 @@ var TimelineEvent = /** @class */ (function (_super) {
|
|
|
76
76
|
}
|
|
77
77
|
return appointmentsList;
|
|
78
78
|
};
|
|
79
|
+
TimelineEvent.prototype.getSortComparerIndex = function (startDate, endDate) {
|
|
80
|
+
var appIndex = -1;
|
|
81
|
+
var appointments = this.renderedEvents;
|
|
82
|
+
if (appointments.length > 0) {
|
|
83
|
+
var appointmentsList = this.getOverlapSortComparerEvents(startDate, endDate, appointments);
|
|
84
|
+
var appLevel = appointmentsList.map(function (obj) { return obj.Index; });
|
|
85
|
+
appIndex = (appLevel.length > 0) ? this.getSmallestMissingNumber(appLevel) : 0;
|
|
86
|
+
}
|
|
87
|
+
return (appIndex === -1) ? 0 : appIndex;
|
|
88
|
+
};
|
|
89
|
+
TimelineEvent.prototype.getOverlapSortComparerEvents = function (startDate, endDate, appointmentsCollection) {
|
|
90
|
+
var appointments = [];
|
|
91
|
+
for (var _i = 0, appointmentsCollection_1 = appointmentsCollection; _i < appointmentsCollection_1.length; _i++) {
|
|
92
|
+
var app = appointmentsCollection_1[_i];
|
|
93
|
+
if (this.renderType === 'day') {
|
|
94
|
+
if ((util.resetTime(app[this.fields.startTime]).getTime() <= util.resetTime(new Date(startDate.getTime())).getTime()) &&
|
|
95
|
+
(util.resetTime(app[this.fields.endTime]).getTime() >= util.resetTime(new Date(startDate.getTime())).getTime())) {
|
|
96
|
+
appointments.push(app);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
var eventData = app.data;
|
|
101
|
+
if (((eventData.trimStartTime.getTime() <= startDate.getTime()) && (startDate.getTime() < eventData.trimEndTime.getTime())) ||
|
|
102
|
+
((startDate.getTime() <= eventData.trimStartTime.getTime()) && (eventData.trimStartTime.getTime() < endDate.getTime()))) {
|
|
103
|
+
appointments.push(app);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return appointments;
|
|
108
|
+
};
|
|
79
109
|
TimelineEvent.prototype.renderResourceEvents = function () {
|
|
80
110
|
this.removeHeightProperty(cls.RESOURCE_COLUMN_TABLE_CLASS);
|
|
81
111
|
var resources = this.parent.uiStateValues.isGroupAdaptive ?
|
|
@@ -116,7 +146,7 @@ var TimelineEvent = /** @class */ (function (_super) {
|
|
|
116
146
|
return;
|
|
117
147
|
}
|
|
118
148
|
var cellTd = this.getCellTd();
|
|
119
|
-
var overlapCount = this.getIndex(startTime);
|
|
149
|
+
var overlapCount = (isNullOrUndefined(this.parent.eventSettings.sortComparer)) ? this.getIndex(startTime) : this.getSortComparerIndex(startTime, endTime);
|
|
120
150
|
event.Index = overlapCount;
|
|
121
151
|
var elem = this.element.querySelector('.' + cls.APPOINTMENT_CLASS);
|
|
122
152
|
var eleHeight = (elem) ? elem.getBoundingClientRect().height : 0;
|