@syncfusion/ej2-schedule 26.2.14 → 27.1.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/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 +151 -29
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +151 -29
- 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 +18 -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/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) {
|
|
@@ -7910,7 +7960,10 @@ class MonthEvent extends EventBase {
|
|
|
7910
7960
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
7911
7961
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
7912
7962
|
const sourceRes = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
7913
|
-
this.
|
|
7963
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
7964
|
+
(this.parent.uiStateValues.groupIndex === sourceRes.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
7965
|
+
this.renderEventsHandler(sourceRes.renderDates, sourceRes.workDays, sourceRes);
|
|
7966
|
+
}
|
|
7914
7967
|
if (this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
7915
7968
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
7916
7969
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8375,7 +8428,10 @@ class TimelineEvent extends MonthEvent {
|
|
|
8375
8428
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
8376
8429
|
const source = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
8377
8430
|
this.rowIndex = source.groupIndex;
|
|
8378
|
-
|
|
8431
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
8432
|
+
(this.parent.uiStateValues.groupIndex === source.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
8433
|
+
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, source);
|
|
8434
|
+
}
|
|
8379
8435
|
if (this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)] && this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
8380
8436
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
8381
8437
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8928,7 +8984,15 @@ class InlineEdit {
|
|
|
8928
8984
|
subjectWrap.insertBefore(inlineSubject, subjectWrap.firstChild);
|
|
8929
8985
|
}
|
|
8930
8986
|
else {
|
|
8931
|
-
|
|
8987
|
+
const elementSelector = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth'].indexOf(this.parent.currentView) > -1 ?
|
|
8988
|
+
'.e-inner-wrap' : '.e-appointment-details';
|
|
8989
|
+
const innerWrapElement = args.element.querySelector(elementSelector);
|
|
8990
|
+
if (isNullOrUndefined(innerWrapElement)) {
|
|
8991
|
+
args.element.querySelector('.e-appointment-details').prepend(inlineSubject);
|
|
8992
|
+
}
|
|
8993
|
+
else {
|
|
8994
|
+
innerWrapElement.prepend(inlineSubject);
|
|
8995
|
+
}
|
|
8932
8996
|
}
|
|
8933
8997
|
inlineSubject.focus();
|
|
8934
8998
|
}
|
|
@@ -13905,6 +13969,7 @@ class VirtualScroll {
|
|
|
13905
13969
|
firstTDIndex = (endIndex > this.parent.resourceBase.expandedResources.length) ?
|
|
13906
13970
|
(this.parent.resourceBase.expandedResources.length - this.renderedLength) : firstTDIndex;
|
|
13907
13971
|
firstTDIndex = firstTDIndex < 0 ? 0 : firstTDIndex;
|
|
13972
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13908
13973
|
this.parent.resourceBase.renderedResources = this.parent.resourceBase.expandedResources.slice(firstTDIndex, endIndex);
|
|
13909
13974
|
if (this.parent.resourceBase.renderedResources.length > 0) {
|
|
13910
13975
|
this.updateContent(resWrap, conWrap, eventWrap, this.parent.resourceBase.renderedResources);
|
|
@@ -13953,6 +14018,7 @@ class VirtualScroll {
|
|
|
13953
14018
|
const scrollHeight = this.parent.rowAutoHeight ?
|
|
13954
14019
|
(conTable.offsetHeight - conWrap.offsetHeight) : this.bufferCount * this.itemSize;
|
|
13955
14020
|
let resCollection = [];
|
|
14021
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13956
14022
|
if ((conWrap.scrollTop) - this.translateY < 0) {
|
|
13957
14023
|
resCollection = this.upScroll(conWrap, firstTDIndex);
|
|
13958
14024
|
}
|
|
@@ -14150,18 +14216,47 @@ class VirtualScroll {
|
|
|
14150
14216
|
this.parent.element.focus();
|
|
14151
14217
|
}
|
|
14152
14218
|
for (let i = 0; i < renderedLength; i++) {
|
|
14153
|
-
remove(resWrap.querySelector('tbody tr'));
|
|
14154
|
-
remove(conWrap.querySelector('tbody tr'));
|
|
14155
14219
|
remove(eventWrap.querySelector('div'));
|
|
14156
14220
|
}
|
|
14157
14221
|
this.parent.resourceBase.renderedResources = resCollection;
|
|
14222
|
+
const currentGroupIndices = this.parent.activeView.getGroupIndices(resCollection);
|
|
14223
|
+
const previousGroupIndices = this.parent.activeView.getGroupIndices(this.existingDataCollection);
|
|
14224
|
+
const newGroupIndices = currentGroupIndices.filter((index) => previousGroupIndices.indexOf(index) < 0);
|
|
14225
|
+
const resWrapRows = Array.from(resWrap.querySelectorAll('tbody tr'));
|
|
14226
|
+
const conWrapRows = Array.from(conWrap.querySelectorAll('tbody tr'));
|
|
14227
|
+
const resWrapBody = resWrap.querySelector('tbody');
|
|
14228
|
+
const conWrapBody = conWrap.querySelector('tbody');
|
|
14229
|
+
this.removeObsoleteRows(resWrapRows, currentGroupIndices);
|
|
14230
|
+
this.removeObsoleteRows(conWrapRows, currentGroupIndices);
|
|
14158
14231
|
const resourceRows = this.parent.resourceBase.getContentRows(resCollection, true);
|
|
14159
14232
|
const contentRows = this.parent.activeView.getContentRows();
|
|
14160
14233
|
const eventRows = this.parent.activeView.getEventRows(resCollection.length);
|
|
14161
|
-
|
|
14162
|
-
|
|
14234
|
+
for (let i = 0; i < newGroupIndices.length; i++) {
|
|
14235
|
+
const index = currentGroupIndices.indexOf(newGroupIndices[parseInt(i.toString(), 10)]);
|
|
14236
|
+
if (index === 0) {
|
|
14237
|
+
prepend([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14238
|
+
prepend([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14239
|
+
}
|
|
14240
|
+
else if (resWrapBody && conWrapBody && resWrapBody.children[parseInt(index.toString(), 10)] &&
|
|
14241
|
+
conWrapBody.children[parseInt(index.toString(), 10)]) {
|
|
14242
|
+
resWrapBody.insertBefore(resourceRows[parseInt(i.toString(), 10)], resWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14243
|
+
conWrapBody.insertBefore(contentRows[parseInt(i.toString(), 10)], conWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14244
|
+
}
|
|
14245
|
+
else {
|
|
14246
|
+
append([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14247
|
+
append([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14248
|
+
}
|
|
14249
|
+
}
|
|
14163
14250
|
append(eventRows, eventWrap);
|
|
14164
14251
|
}
|
|
14252
|
+
removeObsoleteRows(elements, currentGroupIndices) {
|
|
14253
|
+
elements.forEach((element) => {
|
|
14254
|
+
const groupIndex = parseInt(element.firstElementChild.getAttribute('data-group-index'), 10);
|
|
14255
|
+
if (currentGroupIndices.indexOf(groupIndex) < 0) {
|
|
14256
|
+
remove(element);
|
|
14257
|
+
}
|
|
14258
|
+
});
|
|
14259
|
+
}
|
|
14165
14260
|
updateHorizontalContent(conWrap, resCollection) {
|
|
14166
14261
|
this.existingDataCollection = this.parent.resourceBase.expandedResources;
|
|
14167
14262
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
@@ -14653,10 +14748,10 @@ class Crud {
|
|
|
14653
14748
|
addedRecords: args.editParams.addedRecords, changedRecords: args.editParams.changedRecords,
|
|
14654
14749
|
deletedRecords: args.editParams.deletedRecords
|
|
14655
14750
|
};
|
|
14656
|
-
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element) {
|
|
14751
|
+
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element && this.parent.dragAndDropModule.actionObj.action) {
|
|
14657
14752
|
this.parent.dragAndDropModule.actionObj.element.style.display = 'none';
|
|
14658
14753
|
}
|
|
14659
|
-
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element) {
|
|
14754
|
+
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element && this.parent.resizeModule.actionObj.action) {
|
|
14660
14755
|
this.parent.resizeModule.actionObj.element.style.display = 'none';
|
|
14661
14756
|
}
|
|
14662
14757
|
if (this.parent.isSpecificResourceEvents()) {
|
|
@@ -15727,7 +15822,11 @@ class ResourceBase {
|
|
|
15727
15822
|
const resColl = this.resourceCollection;
|
|
15728
15823
|
const tr = createElement('tr');
|
|
15729
15824
|
const td = createElement('td', { attrs: { tabindex: isVirtualScroll ? '-1' : '0' } });
|
|
15825
|
+
const existingGroupIndices = this.parent.activeView.getGroupIndices();
|
|
15730
15826
|
for (let i = 0; i < resData.length; i++) {
|
|
15827
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
15828
|
+
continue;
|
|
15829
|
+
}
|
|
15731
15830
|
const ntd = td.cloneNode();
|
|
15732
15831
|
rIndex = findIndexInData(resColl, 'name', resData[parseInt(i.toString(), 10)].resource.name);
|
|
15733
15832
|
if (rIndex === resColl.length - 1) {
|
|
@@ -15906,6 +16005,7 @@ class ResourceBase {
|
|
|
15906
16005
|
this.setExpandedResources();
|
|
15907
16006
|
const resourceCount = this.parent.virtualScrollModule.getRenderedCount();
|
|
15908
16007
|
const startIndex = this.expandedResources.indexOf(this.renderedResources[0]);
|
|
16008
|
+
this.parent.virtualScrollModule.existingDataCollection = this.renderedResources;
|
|
15909
16009
|
this.renderedResources = this.expandedResources.slice(startIndex, startIndex + resourceCount);
|
|
15910
16010
|
if (this.renderedResources.length < resourceCount) {
|
|
15911
16011
|
let sIndex = this.expandedResources.length - resourceCount;
|
|
@@ -17936,7 +18036,8 @@ let Schedule = class Schedule extends Component {
|
|
|
17936
18036
|
}
|
|
17937
18037
|
onScheduleResize() {
|
|
17938
18038
|
if (isNullOrUndefined(this.activeView) || ((this.isAdaptive || isMobile()) && document.activeElement
|
|
17939
|
-
&& document.activeElement.classList.contains(SUBJECT_CLASS)
|
|
18039
|
+
&& (document.activeElement.classList.contains(SUBJECT_CLASS) ||
|
|
18040
|
+
document.activeElement.classList.contains(INLINE_SUBJECT_CLASS))) || this.uiStateValues.isTapHold) {
|
|
17940
18041
|
return;
|
|
17941
18042
|
}
|
|
17942
18043
|
if (this.virtualScrollModule && this.activeView.isTimelineView()) {
|
|
@@ -20541,6 +20642,7 @@ class Resize extends ActionBase {
|
|
|
20541
20642
|
EventHandler.remove(document, Browser.touchEndEvent, this.resizeStop);
|
|
20542
20643
|
clearInterval(this.actionObj.scrollInterval);
|
|
20543
20644
|
this.actionObj.scrollInterval = null;
|
|
20645
|
+
this.actionObj.action = null;
|
|
20544
20646
|
this.removeCloneElementClasses();
|
|
20545
20647
|
this.removeCloneElement();
|
|
20546
20648
|
this.actionClass('removeClass');
|
|
@@ -20887,8 +20989,8 @@ class YearEvent extends TimelineEvent {
|
|
|
20887
20989
|
const monthDate = new Date(this.parent.selectedDate.getFullYear(), month, 1);
|
|
20888
20990
|
const monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
20889
20991
|
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);
|
|
20992
|
+
let startDate = getWeekFirstDate(monthStart, this.parent.activeViewOptions.firstDayOfWeek);
|
|
20993
|
+
const endDate = addDays(getWeekLastDate(monthEnd, this.parent.activeViewOptions.firstDayOfWeek), 1);
|
|
20892
20994
|
for (let index = 0; startDate.getTime() < endDate.getTime(); index++) {
|
|
20893
20995
|
const start = resetTime(new Date(startDate.getTime()));
|
|
20894
20996
|
const end = addDays(new Date(start.getTime()), 1);
|
|
@@ -23377,6 +23479,15 @@ class ViewBase {
|
|
|
23377
23479
|
this.parent.resourceBase.expandedResources = this.colLevels[this.colLevels.length - 1];
|
|
23378
23480
|
}
|
|
23379
23481
|
}
|
|
23482
|
+
getGroupIndices(dataCollection) {
|
|
23483
|
+
let groupIndices = [];
|
|
23484
|
+
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 && (dataCollection ||
|
|
23485
|
+
this.parent.virtualScrollModule.existingDataCollection.length > 0) && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
23486
|
+
dataCollection = isNullOrUndefined(dataCollection) ? this.parent.virtualScrollModule.existingDataCollection : dataCollection;
|
|
23487
|
+
groupIndices = dataCollection.map((data) => data.groupIndex);
|
|
23488
|
+
}
|
|
23489
|
+
return groupIndices;
|
|
23490
|
+
}
|
|
23380
23491
|
destroy() {
|
|
23381
23492
|
if (this.element && this.element.parentNode) {
|
|
23382
23493
|
remove(this.element);
|
|
@@ -24033,17 +24144,13 @@ class VerticalView extends ViewBase {
|
|
|
24033
24144
|
const rows = [];
|
|
24034
24145
|
const tr = createElement('tr');
|
|
24035
24146
|
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
|
-
}
|
|
24147
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
24041
24148
|
const handler = (r) => {
|
|
24042
24149
|
const ntr = tr.cloneNode();
|
|
24043
24150
|
for (const tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
24044
24151
|
let isAllowTdCreation = true;
|
|
24045
24152
|
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
24046
|
-
if (existingGroupIndices.
|
|
24153
|
+
if (existingGroupIndices.indexOf(tdData.groupIndex) > -1) {
|
|
24047
24154
|
isAllowTdCreation = false;
|
|
24048
24155
|
}
|
|
24049
24156
|
}
|
|
@@ -24772,7 +24879,13 @@ class Month extends ViewBase {
|
|
|
24772
24879
|
const tr = createElement('tr');
|
|
24773
24880
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
24774
24881
|
const slotDatas = this.getContentSlots();
|
|
24882
|
+
const isTimeline = this.parent.currentView === 'TimelineMonth';
|
|
24883
|
+
const existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
|
|
24775
24884
|
for (let row = 0; row < slotDatas.length; row++) {
|
|
24885
|
+
if (existingGroupIndices.length > 0 &&
|
|
24886
|
+
existingGroupIndices.indexOf(slotDatas[parseInt(row.toString(), 10)][0].groupIndex) > -1) {
|
|
24887
|
+
continue;
|
|
24888
|
+
}
|
|
24776
24889
|
const ntr = tr.cloneNode();
|
|
24777
24890
|
for (let col = 0; col < slotDatas[parseInt(row.toString(), 10)].length; col++) {
|
|
24778
24891
|
const ntd = this.createContentTd(slotDatas[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)], td);
|
|
@@ -25101,7 +25214,7 @@ class Year extends ViewBase {
|
|
|
25101
25214
|
this.setAriaAttributes(contentTable);
|
|
25102
25215
|
const thead = createElement('thead', { className: 'e-week-header' });
|
|
25103
25216
|
const tr = createElement('tr');
|
|
25104
|
-
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.firstDayOfWeek);
|
|
25217
|
+
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.activeViewOptions.firstDayOfWeek);
|
|
25105
25218
|
if (this.parent.activeViewOptions.showWeekNumber) {
|
|
25106
25219
|
tr.appendChild(createElement('th'));
|
|
25107
25220
|
}
|
|
@@ -25227,7 +25340,7 @@ class Year extends ViewBase {
|
|
|
25227
25340
|
return dateCol;
|
|
25228
25341
|
}
|
|
25229
25342
|
getMonthDates(date) {
|
|
25230
|
-
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.firstDayOfWeek);
|
|
25343
|
+
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.activeViewOptions.firstDayOfWeek);
|
|
25231
25344
|
const endDate = addDays(new Date(+startDate), (6 * WEEK_LENGTH));
|
|
25232
25345
|
const dateCollection = [];
|
|
25233
25346
|
for (let start = startDate; start.getTime() < endDate.getTime(); start = addDays(start, 1)) {
|
|
@@ -25359,10 +25472,10 @@ class Year extends ViewBase {
|
|
|
25359
25472
|
return addDays(addMonths(this.getStartDate(), this.parent.monthsCount), -1);
|
|
25360
25473
|
}
|
|
25361
25474
|
startDate() {
|
|
25362
|
-
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek) : this.getStartDate();
|
|
25475
|
+
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.activeViewOptions.firstDayOfWeek) : this.getStartDate();
|
|
25363
25476
|
}
|
|
25364
25477
|
endDate() {
|
|
25365
|
-
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) :
|
|
25478
|
+
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.activeViewOptions.firstDayOfWeek), 1) :
|
|
25366
25479
|
addDays(this.getEndDate(), 1);
|
|
25367
25480
|
}
|
|
25368
25481
|
getEndDateFromStartDate(start) {
|
|
@@ -26482,7 +26595,7 @@ class TimelineHeaderRow {
|
|
|
26482
26595
|
const jsDate = +new Date(1970, 0, 1);
|
|
26483
26596
|
const tzOffsetDiff = d.getTimezoneOffset() - new Date(1970, 0, 1).getTimezoneOffset();
|
|
26484
26597
|
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()) {
|
|
26598
|
+
if (this.parent.activeViewOptions.firstDayOfWeek && this.parent.activeViewOptions.firstDayOfWeek > new Date(+d).getDay()) {
|
|
26486
26599
|
key = key - 1;
|
|
26487
26600
|
}
|
|
26488
26601
|
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
@@ -26782,7 +26895,12 @@ class TimelineViews extends VerticalView {
|
|
|
26782
26895
|
const tr = createElement('tr');
|
|
26783
26896
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
26784
26897
|
const trCount = this.getRowCount();
|
|
26898
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
26785
26899
|
for (let i = 0; i < trCount; i++) {
|
|
26900
|
+
if (existingGroupIndices.length > 0 &&
|
|
26901
|
+
existingGroupIndices.indexOf(this.parent.resourceBase.renderedResources[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
26902
|
+
continue;
|
|
26903
|
+
}
|
|
26786
26904
|
const ntr = tr.cloneNode();
|
|
26787
26905
|
for (let tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
26788
26906
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
@@ -27266,13 +27384,17 @@ class TimelineYear extends Year {
|
|
|
27266
27384
|
getContentRows() {
|
|
27267
27385
|
const tRow = [];
|
|
27268
27386
|
const monthCells = this.getMonths();
|
|
27387
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
27269
27388
|
for (let row = 0; row < this.parent.resourceBase.renderedResources.length; row++) {
|
|
27270
|
-
const tr = createElement('tr');
|
|
27271
|
-
tRow.push(tr);
|
|
27272
27389
|
let resData;
|
|
27273
27390
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
27274
27391
|
resData = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
27392
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData.groupIndex) > -1) {
|
|
27393
|
+
continue;
|
|
27394
|
+
}
|
|
27275
27395
|
}
|
|
27396
|
+
const tr = createElement('tr');
|
|
27397
|
+
tRow.push(tr);
|
|
27276
27398
|
let monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[parseInt(row.toString(), 10)], 1);
|
|
27277
27399
|
let date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
27278
27400
|
for (let month = 0; month < this.columnCount; month++) {
|