@syncfusion/ej2-schedule 26.2.14 → 27.1.50
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.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +166 -32
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +169 -32
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -17
- package/src/schedule/actions/crud.js +2 -2
- package/src/schedule/actions/keyboard.d.ts +1 -0
- package/src/schedule/actions/keyboard.js +45 -3
- package/src/schedule/actions/resize.js +1 -0
- package/src/schedule/actions/virtual-scroll.d.ts +1 -0
- package/src/schedule/actions/virtual-scroll.js +35 -4
- package/src/schedule/base/interface.d.ts +1 -0
- package/src/schedule/base/resource.js +5 -0
- package/src/schedule/base/schedule.js +2 -1
- package/src/schedule/event-renderer/event-base.js +18 -3
- package/src/schedule/event-renderer/inline-edit.js +9 -1
- package/src/schedule/event-renderer/month.js +4 -1
- package/src/schedule/event-renderer/timeline-view.js +4 -1
- package/src/schedule/event-renderer/year.js +2 -2
- package/src/schedule/renderer/header-renderer.d.ts +1 -0
- package/src/schedule/renderer/header-renderer.js +9 -1
- package/src/schedule/renderer/month.js +6 -0
- package/src/schedule/renderer/timeline-header-row.js +1 -1
- package/src/schedule/renderer/timeline-view.js +5 -0
- package/src/schedule/renderer/timeline-year.js +6 -2
- package/src/schedule/renderer/vertical-view.js +2 -6
- package/src/schedule/renderer/view-base.d.ts +1 -0
- package/src/schedule/renderer/view-base.js +9 -0
- package/src/schedule/renderer/year.js +4 -4
- package/styles/bootstrap-dark-lite.css +4169 -0
- package/styles/bootstrap-dark-lite.scss +18 -0
- package/styles/bootstrap-dark.css +818 -596
- package/styles/bootstrap-dark.scss +3 -2
- package/styles/bootstrap-lite.css +4164 -0
- package/styles/bootstrap-lite.scss +18 -0
- package/styles/bootstrap.css +818 -596
- package/styles/bootstrap.scss +3 -2
- package/styles/bootstrap4-lite.css +4211 -0
- package/styles/bootstrap4-lite.scss +18 -0
- package/styles/bootstrap4.css +803 -636
- package/styles/bootstrap4.scss +3 -2
- package/styles/bootstrap5-dark-lite.css +4210 -0
- package/styles/bootstrap5-dark-lite.scss +18 -0
- package/styles/bootstrap5-dark.css +819 -597
- package/styles/bootstrap5-dark.scss +3 -2
- package/styles/bootstrap5-lite.css +4210 -0
- package/styles/bootstrap5-lite.scss +18 -0
- package/styles/bootstrap5.3-lite.css +4256 -0
- package/styles/bootstrap5.3-lite.scss +18 -0
- package/styles/bootstrap5.3.css +5017 -0
- package/styles/bootstrap5.3.scss +20 -0
- package/styles/bootstrap5.css +819 -597
- package/styles/bootstrap5.scss +3 -2
- package/styles/fabric-dark-lite.css +4139 -0
- package/styles/fabric-dark-lite.scss +18 -0
- package/styles/fabric-dark.css +825 -595
- package/styles/fabric-dark.scss +3 -2
- package/styles/fabric-lite.css +4136 -0
- package/styles/fabric-lite.scss +18 -0
- package/styles/fabric.css +825 -588
- package/styles/fabric.scss +3 -2
- package/styles/fluent-dark-lite.css +4202 -0
- package/styles/fluent-dark-lite.scss +18 -0
- package/styles/fluent-dark.css +823 -593
- package/styles/fluent-dark.scss +3 -2
- package/styles/fluent-lite.css +4202 -0
- package/styles/fluent-lite.scss +18 -0
- package/styles/fluent.css +823 -593
- package/styles/fluent.scss +3 -2
- package/styles/fluent2-lite.css +4422 -0
- package/styles/fluent2-lite.scss +18 -0
- package/styles/fluent2.css +860 -602
- package/styles/fluent2.scss +3 -2
- package/styles/highcontrast-light-lite.css +4228 -0
- package/styles/highcontrast-light-lite.scss +18 -0
- package/styles/highcontrast-light.css +828 -584
- package/styles/highcontrast-light.scss +3 -2
- package/styles/highcontrast-lite.css +4237 -0
- package/styles/highcontrast-lite.scss +18 -0
- package/styles/highcontrast.css +829 -585
- package/styles/highcontrast.scss +3 -2
- package/styles/material-dark-lite.css +4216 -0
- package/styles/material-dark-lite.scss +18 -0
- package/styles/material-dark.css +828 -581
- package/styles/material-dark.scss +3 -2
- package/styles/material-lite.css +4242 -0
- package/styles/material-lite.scss +18 -0
- package/styles/material.css +826 -600
- package/styles/material.scss +3 -2
- package/styles/material3-dark-lite.css +4233 -0
- package/styles/material3-dark-lite.scss +18 -0
- package/styles/material3-dark.css +825 -602
- package/styles/material3-dark.scss +3 -2
- package/styles/material3-lite.css +4235 -0
- package/styles/material3-lite.scss +18 -0
- package/styles/material3.css +825 -602
- package/styles/material3.scss +3 -2
- package/styles/recurrence-editor/_bigger.scss +134 -0
- package/styles/recurrence-editor/_layout.scss +0 -110
- package/styles/recurrence-editor/bootstrap-dark.css +87 -131
- package/styles/recurrence-editor/bootstrap-dark.scss +1 -0
- package/styles/recurrence-editor/bootstrap.css +87 -131
- package/styles/recurrence-editor/bootstrap.scss +1 -0
- package/styles/recurrence-editor/bootstrap4.css +87 -149
- package/styles/recurrence-editor/bootstrap4.scss +1 -0
- package/styles/recurrence-editor/bootstrap5-dark.css +87 -135
- package/styles/recurrence-editor/bootstrap5-dark.scss +1 -0
- package/styles/recurrence-editor/bootstrap5.3.css +501 -0
- package/styles/recurrence-editor/bootstrap5.3.scss +9 -0
- package/styles/recurrence-editor/bootstrap5.css +87 -135
- package/styles/recurrence-editor/bootstrap5.scss +1 -0
- package/styles/recurrence-editor/fabric-dark.css +87 -130
- package/styles/recurrence-editor/fabric-dark.scss +1 -0
- package/styles/recurrence-editor/fabric.css +87 -123
- package/styles/recurrence-editor/fabric.scss +1 -0
- package/styles/recurrence-editor/fluent-dark.css +87 -122
- package/styles/recurrence-editor/fluent-dark.scss +1 -0
- package/styles/recurrence-editor/fluent.css +87 -122
- package/styles/recurrence-editor/fluent.scss +1 -0
- package/styles/recurrence-editor/fluent2.css +91 -117
- package/styles/recurrence-editor/fluent2.scss +1 -0
- package/styles/recurrence-editor/highcontrast-light.css +87 -118
- package/styles/recurrence-editor/highcontrast-light.scss +1 -0
- package/styles/recurrence-editor/highcontrast.css +87 -118
- package/styles/recurrence-editor/highcontrast.scss +1 -0
- package/styles/recurrence-editor/material-dark.css +87 -115
- package/styles/recurrence-editor/material-dark.scss +1 -0
- package/styles/recurrence-editor/material.css +87 -136
- package/styles/recurrence-editor/material.scss +1 -0
- package/styles/recurrence-editor/material3-dark.css +87 -140
- package/styles/recurrence-editor/material3-dark.scss +1 -0
- package/styles/recurrence-editor/material3.css +87 -140
- package/styles/recurrence-editor/material3.scss +1 -0
- package/styles/recurrence-editor/tailwind-dark.css +87 -116
- package/styles/recurrence-editor/tailwind-dark.scss +1 -0
- package/styles/recurrence-editor/tailwind.css +87 -116
- package/styles/recurrence-editor/tailwind.scss +1 -0
- package/styles/schedule/_bds-definition.scss +1 -1
- package/styles/schedule/_bigger.scss +809 -0
- package/styles/schedule/_bootstrap4-definition.scss +1 -1
- package/styles/schedule/_bootstrap5-definition.scss +1 -1
- package/styles/schedule/_bootstrap5.3-definition.scss +9 -6
- package/styles/schedule/_fluent-definition.scss +1 -1
- package/styles/schedule/_fluent2-definition.scss +6 -6
- package/styles/schedule/_fusionnew-definition.scss +1 -1
- package/styles/schedule/_layout.scss +5 -442
- package/styles/schedule/_tailwind-definition.scss +1 -1
- package/styles/schedule/_theme.scss +23 -1
- package/styles/schedule/bootstrap-dark.css +699 -483
- package/styles/schedule/bootstrap-dark.scss +1 -0
- package/styles/schedule/bootstrap.css +699 -483
- package/styles/schedule/bootstrap.scss +1 -0
- package/styles/schedule/bootstrap4.css +684 -523
- package/styles/schedule/bootstrap4.scss +1 -0
- package/styles/schedule/bootstrap5-dark.css +707 -491
- package/styles/schedule/bootstrap5-dark.scss +1 -0
- package/styles/schedule/bootstrap5.3.css +4615 -0
- package/styles/schedule/bootstrap5.3.scss +17 -0
- package/styles/schedule/bootstrap5.css +707 -491
- package/styles/schedule/bootstrap5.scss +1 -0
- package/styles/schedule/fabric-dark.css +706 -482
- package/styles/schedule/fabric-dark.scss +1 -0
- package/styles/schedule/fabric.css +706 -475
- package/styles/schedule/fabric.scss +1 -0
- package/styles/schedule/fluent-dark.css +716 -492
- package/styles/schedule/fluent-dark.scss +1 -0
- package/styles/schedule/fluent.css +716 -492
- package/styles/schedule/fluent.scss +1 -0
- package/styles/schedule/fluent2.css +746 -497
- package/styles/schedule/fluent2.scss +1 -0
- package/styles/schedule/highcontrast-light.css +714 -476
- package/styles/schedule/highcontrast-light.scss +1 -0
- package/styles/schedule/highcontrast.css +714 -476
- package/styles/schedule/highcontrast.scss +1 -0
- package/styles/schedule/material-dark.css +724 -483
- package/styles/schedule/material-dark.scss +1 -0
- package/styles/schedule/material.css +720 -500
- package/styles/schedule/material.scss +1 -0
- package/styles/schedule/material3-dark.css +714 -497
- package/styles/schedule/material3-dark.scss +1 -0
- package/styles/schedule/material3.css +714 -497
- package/styles/schedule/material3.scss +1 -0
- package/styles/schedule/tailwind-dark.css +718 -483
- package/styles/schedule/tailwind-dark.scss +1 -0
- package/styles/schedule/tailwind.css +718 -483
- package/styles/schedule/tailwind.scss +1 -0
- package/styles/tailwind-dark-lite.css +4179 -0
- package/styles/tailwind-dark-lite.scss +18 -0
- package/styles/tailwind-dark.css +827 -586
- package/styles/tailwind-dark.scss +3 -2
- package/styles/tailwind-lite.css +4179 -0
- package/styles/tailwind-lite.scss +18 -0
- package/styles/tailwind.css +827 -586
- package/styles/tailwind.scss +3 -2
- package/dist/ej2-schedule.min.js +0 -10
|
@@ -1084,10 +1084,12 @@ class HeaderRenderer {
|
|
|
1084
1084
|
items: args.items,
|
|
1085
1085
|
overflowMode: 'Popup',
|
|
1086
1086
|
clicked: this.toolbarClickHandler.bind(this),
|
|
1087
|
+
created: this.toolbarCreateHandler.bind(this),
|
|
1087
1088
|
enableRtl: this.parent.enableRtl,
|
|
1088
1089
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
1089
1090
|
locale: this.parent.locale
|
|
1090
1091
|
});
|
|
1092
|
+
this.toolbarObj.isStringTemplate = true;
|
|
1091
1093
|
this.toolbarObj.root = this.parent.root ? this.parent.root : this.parent;
|
|
1092
1094
|
this.toolbarObj.appendTo(this.parent.element.querySelector('.' + HEADER_TOOLBAR));
|
|
1093
1095
|
this.toolbarObj.element.setAttribute('aria-label', 'Scheduler');
|
|
@@ -1516,6 +1518,12 @@ class HeaderRenderer {
|
|
|
1516
1518
|
const views = [].slice.call(this.element.querySelectorAll('.e-views'));
|
|
1517
1519
|
return views.indexOf(target);
|
|
1518
1520
|
}
|
|
1521
|
+
toolbarCreateHandler() {
|
|
1522
|
+
if (this.parent && this.parent.portals && this.toolbarObj && this.toolbarObj.portals) {
|
|
1523
|
+
this.parent.portals = this.parent.portals.concat(this.toolbarObj.portals);
|
|
1524
|
+
this.parent['renderReactTemplates']();
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1519
1527
|
toolbarClickHandler(args) {
|
|
1520
1528
|
if (!args.item) {
|
|
1521
1529
|
return;
|
|
@@ -1659,7 +1667,7 @@ class HeaderRenderer {
|
|
|
1659
1667
|
let firstDate = new Date(dates[0].getTime());
|
|
1660
1668
|
let lastDate = new Date(dates[dates.length - 1].getTime());
|
|
1661
1669
|
if (this.parent.currentView === 'WorkWeek' || this.parent.currentView === 'TimelineWorkWeek') {
|
|
1662
|
-
firstDate = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.firstDayOfWeek);
|
|
1670
|
+
firstDate = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.activeViewOptions.firstDayOfWeek);
|
|
1663
1671
|
lastDate = addDays(firstDate, 7 * this.parent.activeViewOptions.interval);
|
|
1664
1672
|
}
|
|
1665
1673
|
else if (this.parent.currentView === 'Month') {
|
|
@@ -2085,7 +2093,9 @@ class KeyboardInteraction {
|
|
|
2085
2093
|
ctrlShiftUpArrow: 'ctrl+shift+uparrow',
|
|
2086
2094
|
ctrlShiftDownArrow: 'ctrl+shift+downarrow',
|
|
2087
2095
|
ctrlShiftLeftArrow: 'ctrl+shift+leftarrow',
|
|
2088
|
-
ctrlShiftRightArrow: 'ctrl+shift+rightarrow'
|
|
2096
|
+
ctrlShiftRightArrow: 'ctrl+shift+rightarrow',
|
|
2097
|
+
shiftAltY: 'shift+alt+y',
|
|
2098
|
+
shiftAltN: 'shift+alt+n'
|
|
2089
2099
|
};
|
|
2090
2100
|
this.parent = parent;
|
|
2091
2101
|
this.parent.element.tabIndex = this.parent.element.tabIndex === -1 ? 0 : this.parent.element.tabIndex;
|
|
@@ -2166,6 +2176,43 @@ class KeyboardInteraction {
|
|
|
2166
2176
|
this.processFTwelve(e);
|
|
2167
2177
|
}
|
|
2168
2178
|
break;
|
|
2179
|
+
case 'shiftAltY':
|
|
2180
|
+
this.parent.changeDate(new Date(), e);
|
|
2181
|
+
break;
|
|
2182
|
+
case 'shiftAltN':
|
|
2183
|
+
if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' ||
|
|
2184
|
+
this.parent.currentView === 'Year') {
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
this.processShiftAltN(e);
|
|
2188
|
+
break;
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
processShiftAltN(e) {
|
|
2192
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2193
|
+
const target = e.target;
|
|
2194
|
+
let cellData = extend({}, null, true);
|
|
2195
|
+
if (selectedCells.length > 0 && (closest(target, '.' + WORK_CELLS_CLASS)
|
|
2196
|
+
|| closest(target, '.' + ALLDAY_CELLS_CLASS) || closest(target, '.' + HEADER_CELLS_CLASS))) {
|
|
2197
|
+
cellData = this.getSelectedElements(target);
|
|
2198
|
+
}
|
|
2199
|
+
else if (closest(target, '.' + APPOINTMENT_CLASS) && !isNullOrUndefined(this.parent.activeEventData.event)) {
|
|
2200
|
+
const event = this.parent.activeEventData.event;
|
|
2201
|
+
cellData.startTime = event.StartTime;
|
|
2202
|
+
cellData.endTime = event.EndTime;
|
|
2203
|
+
cellData.isAllDay = event.IsAllDay;
|
|
2204
|
+
}
|
|
2205
|
+
else {
|
|
2206
|
+
const workHour = this.parent.getStartEndTime(this.parent.workHours.start);
|
|
2207
|
+
const slotInterval = this.parent.activeViewOptions.timeScale.interval /
|
|
2208
|
+
this.parent.activeViewOptions.timeScale.slotCount;
|
|
2209
|
+
cellData.startTime = new Date(this.parent.selectedDate);
|
|
2210
|
+
cellData.startTime.setHours(workHour.getHours(), workHour.getMinutes(), 0, 0);
|
|
2211
|
+
cellData.endTime = new Date(cellData.startTime.getTime() + slotInterval * 60000);
|
|
2212
|
+
}
|
|
2213
|
+
const args = extend(cellData, { cancel: false, event: e });
|
|
2214
|
+
if (args != null) {
|
|
2215
|
+
this.parent.eventWindow.openEditor(args, 'Add');
|
|
2169
2216
|
}
|
|
2170
2217
|
}
|
|
2171
2218
|
processFTwelve(e) {
|
|
@@ -2586,8 +2633,11 @@ class KeyboardInteraction {
|
|
|
2586
2633
|
return this.parent.eventBase.selectWorkCellByTime([selectedObject]);
|
|
2587
2634
|
}
|
|
2588
2635
|
processViewNavigation(e) {
|
|
2589
|
-
|
|
2590
|
-
|
|
2636
|
+
if (isNullOrUndefined(e.code)) {
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
const index = parseInt(e.code.slice(e.code.length - 1), 10) - 1;
|
|
2640
|
+
if (!isNaN(index) && !isNullOrUndefined(this.parent.views) && index < this.parent.views.length) {
|
|
2591
2641
|
const view = this.parent.viewCollections[parseInt(index.toString(), 10)].option;
|
|
2592
2642
|
this.parent.changeView(view, e, undefined, index);
|
|
2593
2643
|
if (this.parent.headerModule) {
|
|
@@ -6304,7 +6354,7 @@ class EventBase {
|
|
|
6304
6354
|
this.parent.activeEventData = { event: eventObject, element: target };
|
|
6305
6355
|
}
|
|
6306
6356
|
generateOccurrence(event, viewDate, isMaxCount) {
|
|
6307
|
-
|
|
6357
|
+
let startDate = event[this.parent.eventFields.startTime];
|
|
6308
6358
|
const endDate = event[this.parent.eventFields.endTime];
|
|
6309
6359
|
const eventRule = event[this.parent.eventFields.recurrenceRule];
|
|
6310
6360
|
const timeZoneDiff = endDate.getTimezoneOffset() - startDate.getTimezoneOffset();
|
|
@@ -6318,6 +6368,10 @@ class EventBase {
|
|
|
6318
6368
|
const newTimezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
6319
6369
|
const firstDay = this.parent.activeViewOptions.firstDayOfWeek;
|
|
6320
6370
|
const calendarMode = this.parent.calendarMode;
|
|
6371
|
+
if (event[this.parent.eventFields.recurrenceRule] && event[this.parent.eventFields.recurrenceRule].includes('BYMONTHDAY') &&
|
|
6372
|
+
this.parent.timezone && event[this.parent.eventFields.startTimezone] && event[this.parent.eventFields.endTimezone]) {
|
|
6373
|
+
startDate = this.parent.tzModule.convert(event[this.parent.eventFields.startTime], this.parent.timezone, event[this.parent.eventFields.startTimezone]);
|
|
6374
|
+
}
|
|
6321
6375
|
const dates = generate(startDate, eventRule, exception, firstDay, maxCount, viewDate, calendarMode, newTimezone);
|
|
6322
6376
|
if (this.parent.currentView === 'Agenda' && eventRule.indexOf('COUNT') === -1 && eventRule.indexOf('UNTIL') === -1) {
|
|
6323
6377
|
if (isNullOrUndefined(event.generatedDates)) {
|
|
@@ -6332,10 +6386,18 @@ class EventBase {
|
|
|
6332
6386
|
}
|
|
6333
6387
|
}
|
|
6334
6388
|
}
|
|
6389
|
+
let isDSTAdjusted = false;
|
|
6390
|
+
let convertedDates = [];
|
|
6391
|
+
if (event[this.parent.eventFields.recurrenceRule] && event[this.parent.eventFields.recurrenceRule].includes('BYMONTHDAY') &&
|
|
6392
|
+
this.parent.timezone && event[this.parent.eventFields.startTimezone] && event[this.parent.eventFields.endTimezone]) {
|
|
6393
|
+
isDSTAdjusted = true;
|
|
6394
|
+
convertedDates.push(...dates.map((date) => this.parent.tzModule.convert(new Date(date), event[this.parent.eventFields.startTimezone], this.parent.timezone).getTime()));
|
|
6395
|
+
}
|
|
6396
|
+
convertedDates = convertedDates.length > 0 ? convertedDates : dates;
|
|
6335
6397
|
const occurrenceCollection = [];
|
|
6336
|
-
for (let date of
|
|
6398
|
+
for (let date of convertedDates) {
|
|
6337
6399
|
const clonedObject = extend({}, event, null, true);
|
|
6338
|
-
date = this.getDSTAdjustedTime(date, clonedObject);
|
|
6400
|
+
date = !isDSTAdjusted ? this.getDSTAdjustedTime(date, clonedObject) : date;
|
|
6339
6401
|
clonedObject[this.parent.eventFields.startTime] = new Date(date);
|
|
6340
6402
|
clonedObject[this.parent.eventFields.endTime] = new Date(new Date(date).setMilliseconds(duration));
|
|
6341
6403
|
clonedObject[this.parent.eventFields.recurrenceID] = clonedObject[this.parent.eventFields.id];
|
|
@@ -7910,7 +7972,10 @@ class MonthEvent extends EventBase {
|
|
|
7910
7972
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
7911
7973
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
7912
7974
|
const sourceRes = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
7913
|
-
this.
|
|
7975
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
7976
|
+
(this.parent.uiStateValues.groupIndex === sourceRes.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
7977
|
+
this.renderEventsHandler(sourceRes.renderDates, sourceRes.workDays, sourceRes);
|
|
7978
|
+
}
|
|
7914
7979
|
if (this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
7915
7980
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
7916
7981
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8375,7 +8440,10 @@ class TimelineEvent extends MonthEvent {
|
|
|
8375
8440
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
8376
8441
|
const source = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
8377
8442
|
this.rowIndex = source.groupIndex;
|
|
8378
|
-
|
|
8443
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
8444
|
+
(this.parent.uiStateValues.groupIndex === source.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
8445
|
+
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, source);
|
|
8446
|
+
}
|
|
8379
8447
|
if (this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)] && this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
8380
8448
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
8381
8449
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8928,7 +8996,15 @@ class InlineEdit {
|
|
|
8928
8996
|
subjectWrap.insertBefore(inlineSubject, subjectWrap.firstChild);
|
|
8929
8997
|
}
|
|
8930
8998
|
else {
|
|
8931
|
-
|
|
8999
|
+
const elementSelector = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth'].indexOf(this.parent.currentView) > -1 ?
|
|
9000
|
+
'.e-inner-wrap' : '.e-appointment-details';
|
|
9001
|
+
const innerWrapElement = args.element.querySelector(elementSelector);
|
|
9002
|
+
if (isNullOrUndefined(innerWrapElement)) {
|
|
9003
|
+
args.element.querySelector('.e-appointment-details').prepend(inlineSubject);
|
|
9004
|
+
}
|
|
9005
|
+
else {
|
|
9006
|
+
innerWrapElement.prepend(inlineSubject);
|
|
9007
|
+
}
|
|
8932
9008
|
}
|
|
8933
9009
|
inlineSubject.focus();
|
|
8934
9010
|
}
|
|
@@ -13905,6 +13981,7 @@ class VirtualScroll {
|
|
|
13905
13981
|
firstTDIndex = (endIndex > this.parent.resourceBase.expandedResources.length) ?
|
|
13906
13982
|
(this.parent.resourceBase.expandedResources.length - this.renderedLength) : firstTDIndex;
|
|
13907
13983
|
firstTDIndex = firstTDIndex < 0 ? 0 : firstTDIndex;
|
|
13984
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13908
13985
|
this.parent.resourceBase.renderedResources = this.parent.resourceBase.expandedResources.slice(firstTDIndex, endIndex);
|
|
13909
13986
|
if (this.parent.resourceBase.renderedResources.length > 0) {
|
|
13910
13987
|
this.updateContent(resWrap, conWrap, eventWrap, this.parent.resourceBase.renderedResources);
|
|
@@ -13953,6 +14030,7 @@ class VirtualScroll {
|
|
|
13953
14030
|
const scrollHeight = this.parent.rowAutoHeight ?
|
|
13954
14031
|
(conTable.offsetHeight - conWrap.offsetHeight) : this.bufferCount * this.itemSize;
|
|
13955
14032
|
let resCollection = [];
|
|
14033
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13956
14034
|
if ((conWrap.scrollTop) - this.translateY < 0) {
|
|
13957
14035
|
resCollection = this.upScroll(conWrap, firstTDIndex);
|
|
13958
14036
|
}
|
|
@@ -14150,18 +14228,47 @@ class VirtualScroll {
|
|
|
14150
14228
|
this.parent.element.focus();
|
|
14151
14229
|
}
|
|
14152
14230
|
for (let i = 0; i < renderedLength; i++) {
|
|
14153
|
-
remove(resWrap.querySelector('tbody tr'));
|
|
14154
|
-
remove(conWrap.querySelector('tbody tr'));
|
|
14155
14231
|
remove(eventWrap.querySelector('div'));
|
|
14156
14232
|
}
|
|
14157
14233
|
this.parent.resourceBase.renderedResources = resCollection;
|
|
14234
|
+
const currentGroupIndices = this.parent.activeView.getGroupIndices(resCollection);
|
|
14235
|
+
const previousGroupIndices = this.parent.activeView.getGroupIndices(this.existingDataCollection);
|
|
14236
|
+
const newGroupIndices = currentGroupIndices.filter((index) => previousGroupIndices.indexOf(index) < 0);
|
|
14237
|
+
const resWrapRows = Array.from(resWrap.querySelectorAll('tbody tr'));
|
|
14238
|
+
const conWrapRows = Array.from(conWrap.querySelectorAll('tbody tr'));
|
|
14239
|
+
const resWrapBody = resWrap.querySelector('tbody');
|
|
14240
|
+
const conWrapBody = conWrap.querySelector('tbody');
|
|
14241
|
+
this.removeObsoleteRows(resWrapRows, currentGroupIndices);
|
|
14242
|
+
this.removeObsoleteRows(conWrapRows, currentGroupIndices);
|
|
14158
14243
|
const resourceRows = this.parent.resourceBase.getContentRows(resCollection, true);
|
|
14159
14244
|
const contentRows = this.parent.activeView.getContentRows();
|
|
14160
14245
|
const eventRows = this.parent.activeView.getEventRows(resCollection.length);
|
|
14161
|
-
|
|
14162
|
-
|
|
14246
|
+
for (let i = 0; i < newGroupIndices.length; i++) {
|
|
14247
|
+
const index = currentGroupIndices.indexOf(newGroupIndices[parseInt(i.toString(), 10)]);
|
|
14248
|
+
if (index === 0) {
|
|
14249
|
+
prepend([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14250
|
+
prepend([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14251
|
+
}
|
|
14252
|
+
else if (resWrapBody && conWrapBody && resWrapBody.children[parseInt(index.toString(), 10)] &&
|
|
14253
|
+
conWrapBody.children[parseInt(index.toString(), 10)]) {
|
|
14254
|
+
resWrapBody.insertBefore(resourceRows[parseInt(i.toString(), 10)], resWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14255
|
+
conWrapBody.insertBefore(contentRows[parseInt(i.toString(), 10)], conWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14256
|
+
}
|
|
14257
|
+
else {
|
|
14258
|
+
append([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14259
|
+
append([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14260
|
+
}
|
|
14261
|
+
}
|
|
14163
14262
|
append(eventRows, eventWrap);
|
|
14164
14263
|
}
|
|
14264
|
+
removeObsoleteRows(elements, currentGroupIndices) {
|
|
14265
|
+
elements.forEach((element) => {
|
|
14266
|
+
const groupIndex = parseInt(element.firstElementChild.getAttribute('data-group-index'), 10);
|
|
14267
|
+
if (currentGroupIndices.indexOf(groupIndex) < 0) {
|
|
14268
|
+
remove(element);
|
|
14269
|
+
}
|
|
14270
|
+
});
|
|
14271
|
+
}
|
|
14165
14272
|
updateHorizontalContent(conWrap, resCollection) {
|
|
14166
14273
|
this.existingDataCollection = this.parent.resourceBase.expandedResources;
|
|
14167
14274
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
@@ -14653,10 +14760,10 @@ class Crud {
|
|
|
14653
14760
|
addedRecords: args.editParams.addedRecords, changedRecords: args.editParams.changedRecords,
|
|
14654
14761
|
deletedRecords: args.editParams.deletedRecords
|
|
14655
14762
|
};
|
|
14656
|
-
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element) {
|
|
14763
|
+
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element && this.parent.dragAndDropModule.actionObj.action) {
|
|
14657
14764
|
this.parent.dragAndDropModule.actionObj.element.style.display = 'none';
|
|
14658
14765
|
}
|
|
14659
|
-
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element) {
|
|
14766
|
+
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element && this.parent.resizeModule.actionObj.action) {
|
|
14660
14767
|
this.parent.resizeModule.actionObj.element.style.display = 'none';
|
|
14661
14768
|
}
|
|
14662
14769
|
if (this.parent.isSpecificResourceEvents()) {
|
|
@@ -15727,7 +15834,11 @@ class ResourceBase {
|
|
|
15727
15834
|
const resColl = this.resourceCollection;
|
|
15728
15835
|
const tr = createElement('tr');
|
|
15729
15836
|
const td = createElement('td', { attrs: { tabindex: isVirtualScroll ? '-1' : '0' } });
|
|
15837
|
+
const existingGroupIndices = this.parent.activeView.getGroupIndices();
|
|
15730
15838
|
for (let i = 0; i < resData.length; i++) {
|
|
15839
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
15840
|
+
continue;
|
|
15841
|
+
}
|
|
15731
15842
|
const ntd = td.cloneNode();
|
|
15732
15843
|
rIndex = findIndexInData(resColl, 'name', resData[parseInt(i.toString(), 10)].resource.name);
|
|
15733
15844
|
if (rIndex === resColl.length - 1) {
|
|
@@ -15906,6 +16017,7 @@ class ResourceBase {
|
|
|
15906
16017
|
this.setExpandedResources();
|
|
15907
16018
|
const resourceCount = this.parent.virtualScrollModule.getRenderedCount();
|
|
15908
16019
|
const startIndex = this.expandedResources.indexOf(this.renderedResources[0]);
|
|
16020
|
+
this.parent.virtualScrollModule.existingDataCollection = this.renderedResources;
|
|
15909
16021
|
this.renderedResources = this.expandedResources.slice(startIndex, startIndex + resourceCount);
|
|
15910
16022
|
if (this.renderedResources.length < resourceCount) {
|
|
15911
16023
|
let sIndex = this.expandedResources.length - resourceCount;
|
|
@@ -17936,7 +18048,8 @@ let Schedule = class Schedule extends Component {
|
|
|
17936
18048
|
}
|
|
17937
18049
|
onScheduleResize() {
|
|
17938
18050
|
if (isNullOrUndefined(this.activeView) || ((this.isAdaptive || isMobile()) && document.activeElement
|
|
17939
|
-
&& document.activeElement.classList.contains(SUBJECT_CLASS)
|
|
18051
|
+
&& (document.activeElement.classList.contains(SUBJECT_CLASS) ||
|
|
18052
|
+
document.activeElement.classList.contains(INLINE_SUBJECT_CLASS))) || this.uiStateValues.isTapHold) {
|
|
17940
18053
|
return;
|
|
17941
18054
|
}
|
|
17942
18055
|
if (this.virtualScrollModule && this.activeView.isTimelineView()) {
|
|
@@ -20541,6 +20654,7 @@ class Resize extends ActionBase {
|
|
|
20541
20654
|
EventHandler.remove(document, Browser.touchEndEvent, this.resizeStop);
|
|
20542
20655
|
clearInterval(this.actionObj.scrollInterval);
|
|
20543
20656
|
this.actionObj.scrollInterval = null;
|
|
20657
|
+
this.actionObj.action = null;
|
|
20544
20658
|
this.removeCloneElementClasses();
|
|
20545
20659
|
this.removeCloneElement();
|
|
20546
20660
|
this.actionClass('removeClass');
|
|
@@ -20887,8 +21001,8 @@ class YearEvent extends TimelineEvent {
|
|
|
20887
21001
|
const monthDate = new Date(this.parent.selectedDate.getFullYear(), month, 1);
|
|
20888
21002
|
const monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
20889
21003
|
const monthEnd = this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime()));
|
|
20890
|
-
let startDate = getWeekFirstDate(monthStart, this.parent.firstDayOfWeek);
|
|
20891
|
-
const endDate = addDays(getWeekLastDate(monthEnd, this.parent.firstDayOfWeek), 1);
|
|
21004
|
+
let startDate = getWeekFirstDate(monthStart, this.parent.activeViewOptions.firstDayOfWeek);
|
|
21005
|
+
const endDate = addDays(getWeekLastDate(monthEnd, this.parent.activeViewOptions.firstDayOfWeek), 1);
|
|
20892
21006
|
for (let index = 0; startDate.getTime() < endDate.getTime(); index++) {
|
|
20893
21007
|
const start = resetTime(new Date(startDate.getTime()));
|
|
20894
21008
|
const end = addDays(new Date(start.getTime()), 1);
|
|
@@ -23377,6 +23491,15 @@ class ViewBase {
|
|
|
23377
23491
|
this.parent.resourceBase.expandedResources = this.colLevels[this.colLevels.length - 1];
|
|
23378
23492
|
}
|
|
23379
23493
|
}
|
|
23494
|
+
getGroupIndices(dataCollection) {
|
|
23495
|
+
let groupIndices = [];
|
|
23496
|
+
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 && (dataCollection ||
|
|
23497
|
+
this.parent.virtualScrollModule.existingDataCollection.length > 0) && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
23498
|
+
dataCollection = isNullOrUndefined(dataCollection) ? this.parent.virtualScrollModule.existingDataCollection : dataCollection;
|
|
23499
|
+
groupIndices = dataCollection.map((data) => data.groupIndex);
|
|
23500
|
+
}
|
|
23501
|
+
return groupIndices;
|
|
23502
|
+
}
|
|
23380
23503
|
destroy() {
|
|
23381
23504
|
if (this.element && this.element.parentNode) {
|
|
23382
23505
|
remove(this.element);
|
|
@@ -24033,17 +24156,13 @@ class VerticalView extends ViewBase {
|
|
|
24033
24156
|
const rows = [];
|
|
24034
24157
|
const tr = createElement('tr');
|
|
24035
24158
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
24036
|
-
|
|
24037
|
-
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 &&
|
|
24038
|
-
this.parent.virtualScrollModule.existingDataCollection.length > 0) {
|
|
24039
|
-
existingGroupIndices = new Set(this.parent.virtualScrollModule.existingDataCollection.map((data) => data.groupIndex));
|
|
24040
|
-
}
|
|
24159
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
24041
24160
|
const handler = (r) => {
|
|
24042
24161
|
const ntr = tr.cloneNode();
|
|
24043
24162
|
for (const tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
24044
24163
|
let isAllowTdCreation = true;
|
|
24045
24164
|
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
24046
|
-
if (existingGroupIndices.
|
|
24165
|
+
if (existingGroupIndices.indexOf(tdData.groupIndex) > -1) {
|
|
24047
24166
|
isAllowTdCreation = false;
|
|
24048
24167
|
}
|
|
24049
24168
|
}
|
|
@@ -24772,7 +24891,13 @@ class Month extends ViewBase {
|
|
|
24772
24891
|
const tr = createElement('tr');
|
|
24773
24892
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
24774
24893
|
const slotDatas = this.getContentSlots();
|
|
24894
|
+
const isTimeline = this.parent.currentView === 'TimelineMonth';
|
|
24895
|
+
const existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
|
|
24775
24896
|
for (let row = 0; row < slotDatas.length; row++) {
|
|
24897
|
+
if (existingGroupIndices.length > 0 &&
|
|
24898
|
+
existingGroupIndices.indexOf(slotDatas[parseInt(row.toString(), 10)][0].groupIndex) > -1) {
|
|
24899
|
+
continue;
|
|
24900
|
+
}
|
|
24776
24901
|
const ntr = tr.cloneNode();
|
|
24777
24902
|
for (let col = 0; col < slotDatas[parseInt(row.toString(), 10)].length; col++) {
|
|
24778
24903
|
const ntd = this.createContentTd(slotDatas[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)], td);
|
|
@@ -25101,7 +25226,7 @@ class Year extends ViewBase {
|
|
|
25101
25226
|
this.setAriaAttributes(contentTable);
|
|
25102
25227
|
const thead = createElement('thead', { className: 'e-week-header' });
|
|
25103
25228
|
const tr = createElement('tr');
|
|
25104
|
-
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.firstDayOfWeek);
|
|
25229
|
+
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.activeViewOptions.firstDayOfWeek);
|
|
25105
25230
|
if (this.parent.activeViewOptions.showWeekNumber) {
|
|
25106
25231
|
tr.appendChild(createElement('th'));
|
|
25107
25232
|
}
|
|
@@ -25227,7 +25352,7 @@ class Year extends ViewBase {
|
|
|
25227
25352
|
return dateCol;
|
|
25228
25353
|
}
|
|
25229
25354
|
getMonthDates(date) {
|
|
25230
|
-
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.firstDayOfWeek);
|
|
25355
|
+
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.activeViewOptions.firstDayOfWeek);
|
|
25231
25356
|
const endDate = addDays(new Date(+startDate), (6 * WEEK_LENGTH));
|
|
25232
25357
|
const dateCollection = [];
|
|
25233
25358
|
for (let start = startDate; start.getTime() < endDate.getTime(); start = addDays(start, 1)) {
|
|
@@ -25359,10 +25484,10 @@ class Year extends ViewBase {
|
|
|
25359
25484
|
return addDays(addMonths(this.getStartDate(), this.parent.monthsCount), -1);
|
|
25360
25485
|
}
|
|
25361
25486
|
startDate() {
|
|
25362
|
-
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek) : this.getStartDate();
|
|
25487
|
+
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.activeViewOptions.firstDayOfWeek) : this.getStartDate();
|
|
25363
25488
|
}
|
|
25364
25489
|
endDate() {
|
|
25365
|
-
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) :
|
|
25490
|
+
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.activeViewOptions.firstDayOfWeek), 1) :
|
|
25366
25491
|
addDays(this.getEndDate(), 1);
|
|
25367
25492
|
}
|
|
25368
25493
|
getEndDateFromStartDate(start) {
|
|
@@ -26482,7 +26607,7 @@ class TimelineHeaderRow {
|
|
|
26482
26607
|
const jsDate = +new Date(1970, 0, 1);
|
|
26483
26608
|
const tzOffsetDiff = d.getTimezoneOffset() - new Date(1970, 0, 1).getTimezoneOffset();
|
|
26484
26609
|
let key = Math.ceil(((((+d - jsDate) - (tzOffsetDiff * 60 * 1000)) / MS_PER_DAY) + new Date(jsDate).getDay() + 1) / 7);
|
|
26485
|
-
if (this.parent.firstDayOfWeek && this.parent.firstDayOfWeek > new Date(+d).getDay()) {
|
|
26610
|
+
if (this.parent.activeViewOptions.firstDayOfWeek && this.parent.activeViewOptions.firstDayOfWeek > new Date(+d).getDay()) {
|
|
26486
26611
|
key = key - 1;
|
|
26487
26612
|
}
|
|
26488
26613
|
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
@@ -26782,7 +26907,12 @@ class TimelineViews extends VerticalView {
|
|
|
26782
26907
|
const tr = createElement('tr');
|
|
26783
26908
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
26784
26909
|
const trCount = this.getRowCount();
|
|
26910
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
26785
26911
|
for (let i = 0; i < trCount; i++) {
|
|
26912
|
+
if (existingGroupIndices.length > 0 &&
|
|
26913
|
+
existingGroupIndices.indexOf(this.parent.resourceBase.renderedResources[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
26914
|
+
continue;
|
|
26915
|
+
}
|
|
26786
26916
|
const ntr = tr.cloneNode();
|
|
26787
26917
|
for (let tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
26788
26918
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
@@ -27266,13 +27396,17 @@ class TimelineYear extends Year {
|
|
|
27266
27396
|
getContentRows() {
|
|
27267
27397
|
const tRow = [];
|
|
27268
27398
|
const monthCells = this.getMonths();
|
|
27399
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
27269
27400
|
for (let row = 0; row < this.parent.resourceBase.renderedResources.length; row++) {
|
|
27270
|
-
const tr = createElement('tr');
|
|
27271
|
-
tRow.push(tr);
|
|
27272
27401
|
let resData;
|
|
27273
27402
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
27274
27403
|
resData = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
27404
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData.groupIndex) > -1) {
|
|
27405
|
+
continue;
|
|
27406
|
+
}
|
|
27275
27407
|
}
|
|
27408
|
+
const tr = createElement('tr');
|
|
27409
|
+
tRow.push(tr);
|
|
27276
27410
|
let monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[parseInt(row.toString(), 10)], 1);
|
|
27277
27411
|
let date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
27278
27412
|
for (let month = 0; month < this.columnCount; month++) {
|