@syncfusion/ej2-schedule 30.2.7 → 31.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +111 -37
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +111 -37
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/schedule/actions/action-base.js +3 -0
- package/src/schedule/actions/drag.js +11 -4
- package/src/schedule/actions/keyboard.js +1 -1
- package/src/schedule/actions/resize.js +8 -5
- package/src/schedule/base/css-constant.d.ts +2 -0
- package/src/schedule/base/css-constant.js +2 -0
- package/src/schedule/base/schedule.js +15 -1
- package/src/schedule/event-renderer/agenda-base.d.ts +1 -1
- package/src/schedule/event-renderer/agenda-base.js +5 -4
- package/src/schedule/event-renderer/event-base.js +1 -1
- package/src/schedule/event-renderer/inline-edit.js +11 -6
- package/src/schedule/event-renderer/month.js +5 -3
- package/src/schedule/event-renderer/vertical-view.js +3 -0
- package/src/schedule/event-renderer/year.d.ts +2 -0
- package/src/schedule/event-renderer/year.js +28 -4
- package/src/schedule/popups/event-tooltip.js +4 -0
- package/src/schedule/popups/event-window.js +2 -2
- package/src/schedule/popups/quick-popups.js +5 -1
- package/src/schedule/renderer/agenda.js +3 -2
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/year.js +3 -2
- package/styles/bds-lite.css +11 -8
- package/styles/bds.css +11 -8
- package/styles/bootstrap-dark-lite.css +12 -9
- package/styles/bootstrap-dark.css +12 -9
- package/styles/bootstrap-lite.css +12 -9
- package/styles/bootstrap.css +12 -9
- package/styles/bootstrap4-lite.css +19 -8
- package/styles/bootstrap4.css +19 -8
- package/styles/bootstrap5-dark-lite.css +11 -8
- package/styles/bootstrap5-dark.css +11 -8
- package/styles/bootstrap5-lite.css +11 -8
- package/styles/bootstrap5.3-lite.css +11 -8
- package/styles/bootstrap5.3.css +11 -8
- package/styles/bootstrap5.css +11 -8
- package/styles/fabric-dark-lite.css +12 -9
- package/styles/fabric-dark.css +12 -9
- package/styles/fabric-lite.css +12 -9
- package/styles/fabric.css +12 -9
- package/styles/fluent-dark-lite.css +13 -10
- package/styles/fluent-dark.css +13 -10
- package/styles/fluent-lite.css +13 -10
- package/styles/fluent.css +13 -10
- package/styles/fluent2-lite.css +11 -8
- package/styles/fluent2.css +11 -8
- package/styles/highcontrast-light-lite.css +12 -9
- package/styles/highcontrast-light.css +12 -9
- package/styles/highcontrast-lite.css +12 -9
- package/styles/highcontrast.css +12 -9
- package/styles/material-dark-lite.css +12 -9
- package/styles/material-dark.css +12 -9
- package/styles/material-lite.css +12 -9
- package/styles/material.css +12 -9
- package/styles/material3-dark-lite.css +11 -8
- package/styles/material3-dark.css +11 -8
- package/styles/material3-lite.css +11 -8
- package/styles/material3.css +11 -8
- package/styles/recurrence-editor/_bds-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap-dark-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap4-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -0
- package/styles/recurrence-editor/_bootstrap5.3-definition.scss +1 -0
- package/styles/recurrence-editor/_fabric-dark-definition.scss +1 -0
- package/styles/recurrence-editor/_fabric-definition.scss +1 -0
- package/styles/recurrence-editor/_fluent-definition.scss +1 -0
- package/styles/recurrence-editor/_fluent2-definition.scss +1 -0
- package/styles/recurrence-editor/_fusionnew-definition.scss +1 -0
- package/styles/recurrence-editor/_highcontrast-definition.scss +1 -0
- package/styles/recurrence-editor/_highcontrast-light-definition.scss +1 -0
- package/styles/recurrence-editor/_layout.scss +5 -1
- package/styles/recurrence-editor/_material-dark-definition.scss +1 -0
- package/styles/recurrence-editor/_material-definition.scss +1 -0
- package/styles/recurrence-editor/_material3-definition.scss +1 -0
- package/styles/recurrence-editor/_tailwind-definition.scss +1 -0
- package/styles/recurrence-editor/_tailwind3-definition.scss +1 -0
- package/styles/recurrence-editor/bds.css +3 -0
- package/styles/recurrence-editor/bootstrap-dark.css +4 -1
- package/styles/recurrence-editor/bootstrap.css +4 -1
- package/styles/recurrence-editor/bootstrap4.css +11 -0
- package/styles/recurrence-editor/bootstrap5-dark.css +3 -0
- package/styles/recurrence-editor/bootstrap5.3.css +3 -0
- package/styles/recurrence-editor/bootstrap5.css +3 -0
- package/styles/recurrence-editor/fabric-dark.css +4 -1
- package/styles/recurrence-editor/fabric.css +4 -1
- package/styles/recurrence-editor/fluent-dark.css +4 -1
- package/styles/recurrence-editor/fluent.css +4 -1
- package/styles/recurrence-editor/fluent2.css +3 -0
- package/styles/recurrence-editor/highcontrast-light.css +4 -1
- package/styles/recurrence-editor/highcontrast.css +4 -1
- package/styles/recurrence-editor/material-dark.css +4 -1
- package/styles/recurrence-editor/material.css +4 -1
- package/styles/recurrence-editor/material3-dark.css +3 -0
- package/styles/recurrence-editor/material3.css +3 -0
- package/styles/recurrence-editor/tailwind-dark.css +3 -0
- package/styles/recurrence-editor/tailwind.css +3 -0
- package/styles/recurrence-editor/tailwind3.css +3 -0
- package/styles/schedule/_bds-definition.scss +2 -0
- package/styles/schedule/_bootstrap-dark-definition.scss +2 -0
- package/styles/schedule/_bootstrap-definition.scss +2 -0
- package/styles/schedule/_bootstrap4-definition.scss +2 -0
- package/styles/schedule/_bootstrap5-definition.scss +2 -0
- package/styles/schedule/_bootstrap5.3-definition.scss +2 -0
- package/styles/schedule/_fabric-dark-definition.scss +2 -0
- package/styles/schedule/_fabric-definition.scss +2 -0
- package/styles/schedule/_fluent-definition.scss +3 -1
- package/styles/schedule/_fluent2-definition.scss +2 -0
- package/styles/schedule/_fusionnew-definition.scss +2 -0
- package/styles/schedule/_highcontrast-definition.scss +2 -0
- package/styles/schedule/_highcontrast-light-definition.scss +2 -0
- package/styles/schedule/_layout.scss +12 -11
- package/styles/schedule/_material-dark-definition.scss +2 -0
- package/styles/schedule/_material-definition.scss +2 -0
- package/styles/schedule/_material3-definition.scss +2 -0
- package/styles/schedule/_tailwind-definition.scss +2 -0
- package/styles/schedule/_tailwind3-definition.scss +2 -0
- package/styles/schedule/bds.css +8 -8
- package/styles/schedule/bootstrap-dark.css +8 -8
- package/styles/schedule/bootstrap.css +8 -8
- package/styles/schedule/bootstrap4.css +16 -8
- package/styles/schedule/bootstrap5-dark.css +8 -8
- package/styles/schedule/bootstrap5.3.css +8 -8
- package/styles/schedule/bootstrap5.css +8 -8
- package/styles/schedule/fabric-dark.css +8 -8
- package/styles/schedule/fabric.css +8 -8
- package/styles/schedule/fluent-dark.css +9 -9
- package/styles/schedule/fluent.css +9 -9
- package/styles/schedule/fluent2.css +8 -8
- package/styles/schedule/highcontrast-light.css +8 -8
- package/styles/schedule/highcontrast.css +8 -8
- package/styles/schedule/material-dark.css +8 -8
- package/styles/schedule/material.css +8 -8
- package/styles/schedule/material3-dark.css +8 -8
- package/styles/schedule/material3.css +8 -8
- package/styles/schedule/tailwind-dark.css +8 -8
- package/styles/schedule/tailwind.css +8 -8
- package/styles/schedule/tailwind3.css +8 -8
- package/styles/tailwind-dark-lite.css +11 -8
- package/styles/tailwind-dark.css +11 -8
- package/styles/tailwind-lite.css +11 -8
- package/styles/tailwind.css +11 -8
- package/styles/tailwind3-lite.css +11 -8
- package/styles/tailwind3.css +11 -8
|
@@ -1033,6 +1033,8 @@ const MONTH_HEADER_WRAPPER = 'e-month-header-wrapper';
|
|
|
1033
1033
|
const INLINE_SUBJECT_CLASS = 'e-inline-subject';
|
|
1034
1034
|
/** @private */
|
|
1035
1035
|
const INLINE_APPOINTMENT_CLASS = 'e-inline-appointment';
|
|
1036
|
+
/** @private */
|
|
1037
|
+
const INLINE_EDIT_CLASS = 'e-inline-edit';
|
|
1036
1038
|
/** @hidden */
|
|
1037
1039
|
const SCROLL_HIDDEN = 'e-scroll-hidden';
|
|
1038
1040
|
/** @private */
|
|
@@ -3228,7 +3230,7 @@ class KeyboardInteraction {
|
|
|
3228
3230
|
}
|
|
3229
3231
|
processDelete(e) {
|
|
3230
3232
|
let activeEle = document.activeElement;
|
|
3231
|
-
if (this.parent.currentView === 'MonthAgenda') {
|
|
3233
|
+
if (this.parent.currentView === 'MonthAgenda' || (!isNullOrUndefined(activeEle) && closest(activeEle, '.' + POPUP_WRAPPER_CLASS))) {
|
|
3232
3234
|
const selectedEle = this.parent.eventBase.getSelectedEvents().element;
|
|
3233
3235
|
activeEle = ((selectedEle && isNullOrUndefined(selectedEle.length)) ? selectedEle : selectedEle[0]);
|
|
3234
3236
|
}
|
|
@@ -6702,7 +6704,7 @@ class EventBase {
|
|
|
6702
6704
|
}
|
|
6703
6705
|
const args = extend(this.parent.activeEventData, { cancel: false, originalEvent: eventData });
|
|
6704
6706
|
this.parent.trigger(eventDoubleClick, args, (eventDoubleClickArgs) => {
|
|
6705
|
-
if (!eventDoubleClickArgs.cancel) {
|
|
6707
|
+
if (!eventDoubleClickArgs.cancel && this.parent.eventSettings.allowEditing) {
|
|
6706
6708
|
if (!isNullOrUndefined(this.parent.activeEventData.event) &&
|
|
6707
6709
|
isNullOrUndefined(this.parent.activeEventData.event[this.parent.eventFields.recurrenceID])) {
|
|
6708
6710
|
this.parent.eventWindow.openEditor(this.parent.activeEventData.event, 'Save');
|
|
@@ -7703,6 +7705,9 @@ class VerticalEvent extends EventBase {
|
|
|
7703
7705
|
const record = this.splitEvent(eventObj, currentDates)[0];
|
|
7704
7706
|
const eStart = new Date(record[this.parent.eventFields.startTime].getTime());
|
|
7705
7707
|
const eEnd = new Date(record[this.parent.eventFields.endTime].getTime());
|
|
7708
|
+
if (eStart.getTime() < this.parent.minDate.getTime() || eEnd.getTime() > this.parent.maxDate.getTime()) {
|
|
7709
|
+
return;
|
|
7710
|
+
}
|
|
7706
7711
|
let appWidth = 0;
|
|
7707
7712
|
let topValue = 1;
|
|
7708
7713
|
const isDateRange = currentDates[0].getTime() <= eStart.getTime() &&
|
|
@@ -8215,13 +8220,15 @@ class MonthEvent extends EventBase {
|
|
|
8215
8220
|
this.parent.notify(scrollUiUpdate, data);
|
|
8216
8221
|
if (this.parent.currentView === 'Month' && this.parent.showWeekNumber) {
|
|
8217
8222
|
const totalCells = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
|
|
8218
|
-
const weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + WEEK_NUMBER_CLASS));
|
|
8223
|
+
const weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('td' + '.' + WEEK_NUMBER_CLASS));
|
|
8219
8224
|
weekNumberCells.forEach((cell, i) => {
|
|
8220
8225
|
const height = totalCells[parseInt(i.toString(), 10)].offsetHeight;
|
|
8221
8226
|
setStyleAttribute(cell, { 'height': height + 'px' });
|
|
8222
8227
|
});
|
|
8223
|
-
this.parent.element.querySelector('.' + WEEK_NUMBER_WRAPPER_CLASS)
|
|
8224
|
-
|
|
8228
|
+
const weekNumberWrapper = this.parent.element.querySelector('.' + WEEK_NUMBER_WRAPPER_CLASS);
|
|
8229
|
+
if (!isNullOrUndefined(weekNumberWrapper)) {
|
|
8230
|
+
weekNumberWrapper.scrollTop = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS).scrollTop;
|
|
8231
|
+
}
|
|
8225
8232
|
}
|
|
8226
8233
|
}
|
|
8227
8234
|
this.parent.renderTemplates();
|
|
@@ -9452,6 +9459,7 @@ class InlineEdit {
|
|
|
9452
9459
|
eventEdit(args) {
|
|
9453
9460
|
let inlineSubject = args.element.querySelector('.' + INLINE_SUBJECT_CLASS);
|
|
9454
9461
|
let subject;
|
|
9462
|
+
addClass([args.element], INLINE_EDIT_CLASS);
|
|
9455
9463
|
if (inlineSubject) {
|
|
9456
9464
|
subject = inlineSubject.value;
|
|
9457
9465
|
}
|
|
@@ -9459,11 +9467,9 @@ class InlineEdit {
|
|
|
9459
9467
|
const subEle = args.element.querySelector('.' + SUBJECT_CLASS);
|
|
9460
9468
|
if (!isNullOrUndefined(subEle)) {
|
|
9461
9469
|
addClass([subEle], DISABLE_CLASS);
|
|
9462
|
-
subject = subEle.innerText;
|
|
9463
|
-
}
|
|
9464
|
-
else {
|
|
9465
|
-
subject = args.data[this.parent.eventFields.subject];
|
|
9466
9470
|
}
|
|
9471
|
+
subject = !isNullOrUndefined(args.data) && args.data[this.parent.eventFields.subject] ||
|
|
9472
|
+
this.parent.eventSettings.fields.subject.default || this.parent.localeObj.getConstant('addTitle');
|
|
9467
9473
|
inlineSubject = this.inlineInputEle =
|
|
9468
9474
|
createElement('input', { className: INLINE_SUBJECT_CLASS, attrs: { value: subject } });
|
|
9469
9475
|
if (closest(args.element, '.' + MORE_POPUP_WRAPPER_CLASS)) {
|
|
@@ -9485,7 +9491,12 @@ class InlineEdit {
|
|
|
9485
9491
|
args.element.querySelector('.e-appointment-details').prepend(inlineSubject);
|
|
9486
9492
|
}
|
|
9487
9493
|
else {
|
|
9488
|
-
|
|
9494
|
+
if (subEle && this.parent.activeViewOptions && !this.parent.activeViewOptions.eventTemplate) {
|
|
9495
|
+
innerWrapElement.insertBefore(inlineSubject, subEle);
|
|
9496
|
+
}
|
|
9497
|
+
else {
|
|
9498
|
+
innerWrapElement.prepend(inlineSubject);
|
|
9499
|
+
}
|
|
9489
9500
|
}
|
|
9490
9501
|
}
|
|
9491
9502
|
inlineSubject.focus();
|
|
@@ -9610,7 +9621,7 @@ class InlineEdit {
|
|
|
9610
9621
|
}
|
|
9611
9622
|
createInlineAppointmentElement(inlineData) {
|
|
9612
9623
|
const inlineAppointmentElement = createElement('div', {
|
|
9613
|
-
className: APPOINTMENT_CLASS + ' ' + INLINE_APPOINTMENT_CLASS
|
|
9624
|
+
className: APPOINTMENT_CLASS + ' ' + INLINE_APPOINTMENT_CLASS + ' ' + INLINE_EDIT_CLASS
|
|
9614
9625
|
});
|
|
9615
9626
|
const inlineDetails = createElement('div', { className: APPOINTMENT_DETAILS });
|
|
9616
9627
|
inlineAppointmentElement.appendChild(inlineDetails);
|
|
@@ -9636,6 +9647,7 @@ class InlineEdit {
|
|
|
9636
9647
|
const inlineSubject = this.getInlineElement();
|
|
9637
9648
|
if (inlineSubject) {
|
|
9638
9649
|
const appointmentSubject = closest(inlineSubject, '.' + APPOINTMENT_CLASS);
|
|
9650
|
+
removeClass([appointmentSubject], INLINE_EDIT_CLASS);
|
|
9639
9651
|
const subject = appointmentSubject.querySelector('.' + SUBJECT_CLASS);
|
|
9640
9652
|
if (!isNullOrUndefined(subject)) {
|
|
9641
9653
|
removeClass([subject], DISABLE_CLASS);
|
|
@@ -11058,7 +11070,11 @@ class QuickPopups {
|
|
|
11058
11070
|
if (closest(target, '.' + APPOINTMENT_CLASS + ',.' + HEADER_CELLS_CLASS)) {
|
|
11059
11071
|
this.parent.removeNewEventElement();
|
|
11060
11072
|
}
|
|
11061
|
-
|
|
11073
|
+
const isQuickPopupClick = closest(target, '.' + POPUP_WRAPPER_CLASS) ||
|
|
11074
|
+
closest(target, '.' + QUICK_DIALOG_CLASS);
|
|
11075
|
+
const isEditButton = target.classList.contains(EDIT_EVENT_CLASS) ||
|
|
11076
|
+
target.classList.contains(EDIT_CLASS) || target.classList.contains(EDIT_ICON_CLASS);
|
|
11077
|
+
if (isEditButton || !isQuickPopupClick && !closest(target, '.' + MORE_POPUP_WRAPPER_CLASS) && (target.classList &&
|
|
11062
11078
|
!target.classList.contains(MORE_INDICATOR_CLASS))
|
|
11063
11079
|
&& (!closest(target, '.' + MORE_POPUP_WRAPPER_CLASS + '.' + POPUP_OPEN))
|
|
11064
11080
|
&& !closest(target, '.' + WORK_CELLS_CLASS)) {
|
|
@@ -11204,6 +11220,10 @@ class EventTooltip {
|
|
|
11204
11220
|
return;
|
|
11205
11221
|
}
|
|
11206
11222
|
if (args.target.classList.contains(RESOURCE_CELLS_CLASS) && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
11223
|
+
if (args.target.closest('.' + LEFT_INDENT_WRAP_CLASS)) {
|
|
11224
|
+
args.cancel = true;
|
|
11225
|
+
return;
|
|
11226
|
+
}
|
|
11207
11227
|
let resCollection;
|
|
11208
11228
|
if (this.parent.activeView.isTimelineView()) {
|
|
11209
11229
|
const index = parseInt(args.target.getAttribute('data-group-index'), 10);
|
|
@@ -13697,9 +13717,9 @@ class EventWindow {
|
|
|
13697
13717
|
const startObj = startDate.ej2_instances[0];
|
|
13698
13718
|
const endObj = endDate.ej2_instances[0];
|
|
13699
13719
|
startObj.min = this.parent.minDate;
|
|
13700
|
-
startObj.max = this.parent.maxDate;
|
|
13720
|
+
startObj.max = new Date(new Date(+this.parent.maxDate).setHours(23, 59, 59));
|
|
13701
13721
|
endObj.min = this.parent.minDate;
|
|
13702
|
-
endObj.max = this.parent.maxDate;
|
|
13722
|
+
endObj.max = new Date(new Date(+this.parent.maxDate).setHours(23, 59, 59));
|
|
13703
13723
|
startObj.dataBind();
|
|
13704
13724
|
endObj.dataBind();
|
|
13705
13725
|
}
|
|
@@ -19173,6 +19193,14 @@ let Schedule = class Schedule extends Component {
|
|
|
19173
19193
|
if (newProp.allowKeyboardInteraction || newProp.allowClipboard) {
|
|
19174
19194
|
this.keyboardInteractionModule = new KeyboardInteraction(this);
|
|
19175
19195
|
}
|
|
19196
|
+
if (prop === 'allowClipboard') {
|
|
19197
|
+
if (newProp.allowClipboard) {
|
|
19198
|
+
EventHandler.add(document, 'paste', this.onDocumentPaste, this);
|
|
19199
|
+
}
|
|
19200
|
+
else {
|
|
19201
|
+
EventHandler.remove(document, 'paste', this.onDocumentPaste);
|
|
19202
|
+
}
|
|
19203
|
+
}
|
|
19176
19204
|
break;
|
|
19177
19205
|
case 'timezoneDataSource':
|
|
19178
19206
|
if (this.eventWindow) {
|
|
@@ -20114,12 +20142,18 @@ let Schedule = class Schedule extends Component {
|
|
|
20114
20142
|
* @returns {void}
|
|
20115
20143
|
*/
|
|
20116
20144
|
paste(targetElement) {
|
|
20117
|
-
if (!this.allowClipboard || !this.allowKeyboardInteraction) {
|
|
20145
|
+
if (!this.allowClipboard || !this.allowKeyboardInteraction || !targetElement) {
|
|
20118
20146
|
return;
|
|
20119
20147
|
}
|
|
20120
20148
|
if (!targetElement.classList.contains('e-work-cells') && !targetElement.classList.contains('e-all-day-cells')) {
|
|
20121
20149
|
return;
|
|
20122
20150
|
}
|
|
20151
|
+
if (!this.activeCellsData) {
|
|
20152
|
+
const cellData = this.getCellDetails([targetElement]);
|
|
20153
|
+
if (cellData) {
|
|
20154
|
+
this.activeCellsData = cellData;
|
|
20155
|
+
}
|
|
20156
|
+
}
|
|
20123
20157
|
const clipboardData = new DataTransfer();
|
|
20124
20158
|
if (!isNullOrUndefined(navigator.clipboard)) {
|
|
20125
20159
|
navigator.clipboard.readText()
|
|
@@ -21100,6 +21134,9 @@ class ActionBase {
|
|
|
21100
21134
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21101
21135
|
query = query.concat('[data-group-index = "' + cloneElement.getAttribute('data-group-index') + '"]');
|
|
21102
21136
|
}
|
|
21137
|
+
if (cloneElement.hasAttribute('data-guid')) {
|
|
21138
|
+
query += '[data-guid="' + cloneElement.getAttribute('data-guid') + '"]';
|
|
21139
|
+
}
|
|
21103
21140
|
const elements = [].slice.call(this.parent.element.querySelectorAll(query));
|
|
21104
21141
|
addClass(elements, EVENT_ACTION_CLASS);
|
|
21105
21142
|
const eventWrappers = [].slice.call(this.parent.element.querySelectorAll('.' + CLONE_ELEMENT_CLASS));
|
|
@@ -21268,17 +21305,20 @@ class Resize extends ActionBase {
|
|
|
21268
21305
|
}
|
|
21269
21306
|
}
|
|
21270
21307
|
resizeStart(e) {
|
|
21271
|
-
if (e && e.type === 'touchstart' && (!this.parent.uiStateValues.isTapHold ||
|
|
21272
|
-
!closest(e.target, '.' + APPOINTMENT_BORDER))) {
|
|
21308
|
+
if ((e && e.type === 'touchstart' && (!this.parent.uiStateValues.isTapHold ||
|
|
21309
|
+
!closest(e.target, '.' + APPOINTMENT_BORDER))) || closest(e.target, '.' + INLINE_EDIT_CLASS)) {
|
|
21310
|
+
return;
|
|
21311
|
+
}
|
|
21312
|
+
const resizeTarget = closest(e.target, '.' + EVENT_RESIZE_CLASS);
|
|
21313
|
+
this.actionObj.element = closest(resizeTarget, '.' + APPOINTMENT_CLASS);
|
|
21314
|
+
this.actionObj.event = this.parent.eventBase.getEventByGuid(this.actionObj.element.getAttribute('data-guid'));
|
|
21315
|
+
if (isNullOrUndefined(this.actionObj.event)) {
|
|
21273
21316
|
return;
|
|
21274
21317
|
}
|
|
21275
21318
|
this.parent.eventBase.removeSelectedAppointmentClass();
|
|
21276
21319
|
this.actionObj.action = 'resize';
|
|
21277
21320
|
this.actionObj.slotInterval = this.parent.activeViewOptions.timeScale.interval / this.parent.activeViewOptions.timeScale.slotCount;
|
|
21278
21321
|
this.actionObj.interval = this.actionObj.slotInterval;
|
|
21279
|
-
const resizeTarget = closest(e.target, '.' + EVENT_RESIZE_CLASS);
|
|
21280
|
-
this.actionObj.element = closest(resizeTarget, '.' + APPOINTMENT_CLASS);
|
|
21281
|
-
this.actionObj.event = this.parent.eventBase.getEventByGuid(this.actionObj.element.getAttribute('data-guid'));
|
|
21282
21322
|
const eventObj = extend({}, this.actionObj.event, null, true);
|
|
21283
21323
|
const resizeArgs = {
|
|
21284
21324
|
cancel: false,
|
|
@@ -21977,9 +22017,10 @@ class YearEvent extends TimelineEvent {
|
|
|
21977
22017
|
continue;
|
|
21978
22018
|
}
|
|
21979
22019
|
}
|
|
21980
|
-
|
|
21981
|
-
|
|
21982
|
-
|
|
22020
|
+
if (this.maxHeight && this.parent.currentView.indexOf('Timeline') !== -1 && overlapIndex > 0) {
|
|
22021
|
+
continue;
|
|
22022
|
+
}
|
|
22023
|
+
if (this.parent.rowAutoHeight || this.shouldRenderAppointment(overlapIndex, availedHeight)) {
|
|
21983
22024
|
this.renderEvent(eventWrapper, eventData, row, leftValue, rightValue, monthStart, dayIndex);
|
|
21984
22025
|
if (this.parent.rowAutoHeight || this.cellHeight > availedHeight) {
|
|
21985
22026
|
this.updateCellHeight(rowTd, availedHeight);
|
|
@@ -22109,6 +22150,19 @@ class YearEvent extends TimelineEvent {
|
|
|
22109
22150
|
});
|
|
22110
22151
|
}
|
|
22111
22152
|
}
|
|
22153
|
+
shouldRenderAppointment(overlapIndex, availedHeight) {
|
|
22154
|
+
const eventsPerRow = this.parent.rowAutoHeight ? 1 : this.parent.activeViewOptions.maxEventsPerRow;
|
|
22155
|
+
if (this.parent.activeViewOptions.maxEventsPerRow && !this.parent.rowAutoHeight &&
|
|
22156
|
+
!this.parent.eventSettings.enableIndicator) {
|
|
22157
|
+
return overlapIndex < eventsPerRow;
|
|
22158
|
+
}
|
|
22159
|
+
else if (this.maxOrIndicator) {
|
|
22160
|
+
return overlapIndex < 1;
|
|
22161
|
+
}
|
|
22162
|
+
else {
|
|
22163
|
+
return this.cellHeight > availedHeight;
|
|
22164
|
+
}
|
|
22165
|
+
}
|
|
22112
22166
|
renderResourceEvent(wrapper, resource, month, index, monthStart) {
|
|
22113
22167
|
const eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
22114
22168
|
wrapper.appendChild(eventWrapper);
|
|
@@ -22145,7 +22199,10 @@ class YearEvent extends TimelineEvent {
|
|
|
22145
22199
|
continue;
|
|
22146
22200
|
}
|
|
22147
22201
|
}
|
|
22148
|
-
if (this.
|
|
22202
|
+
if (this.maxHeight && this.parent.currentView.indexOf('Timeline') !== -1 && overlapIndex > 0) {
|
|
22203
|
+
continue;
|
|
22204
|
+
}
|
|
22205
|
+
if (this.parent.rowAutoHeight || this.shouldRenderAppointment(overlapIndex, availedHeight)) {
|
|
22149
22206
|
this.renderEvent(eventWrapper, eventData, month, leftValue, leftValue, monthStart, index);
|
|
22150
22207
|
this.updateCellHeight(td, availedHeight);
|
|
22151
22208
|
isSpannedCollection.push(eventData);
|
|
@@ -22162,6 +22219,10 @@ class YearEvent extends TimelineEvent {
|
|
|
22162
22219
|
}
|
|
22163
22220
|
}
|
|
22164
22221
|
}
|
|
22222
|
+
setMaxEventHeight(event, cell) {
|
|
22223
|
+
const height = (cell.offsetHeight - this.cellHeader) - (this.maxHeight ? 0 : this.moreIndicatorHeight);
|
|
22224
|
+
setStyleAttribute(event, { 'height': height + 'px', 'align-items': 'center' });
|
|
22225
|
+
}
|
|
22165
22226
|
// eslint-disable-next-line max-len
|
|
22166
22227
|
renderEvent(wrapper, eventData, row, left, right, monthDate, rowIndex) {
|
|
22167
22228
|
const eventObj = this.isSpannedEvent(eventData, monthDate);
|
|
@@ -22191,6 +22252,9 @@ class YearEvent extends TimelineEvent {
|
|
|
22191
22252
|
setStyleAttribute(wrap, {
|
|
22192
22253
|
'width': width + 'px', 'height': this.eventHeight + 'px', 'left': left + 'px', 'right': right + 'px', 'top': top + 'px'
|
|
22193
22254
|
});
|
|
22255
|
+
if (this.maxOrIndicator && this.parent.currentView.indexOf('Timeline') !== -1) {
|
|
22256
|
+
this.setMaxEventHeight(wrap, rowTd);
|
|
22257
|
+
}
|
|
22194
22258
|
if (!this.isResource && this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
22195
22259
|
wrap.setAttribute('data-index', eventObj.Index.toString());
|
|
22196
22260
|
}
|
|
@@ -22441,7 +22505,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22441
22505
|
}
|
|
22442
22506
|
wireDragEvent(element) {
|
|
22443
22507
|
new Draggable(element, {
|
|
22444
|
-
abort: '.' + EVENT_RESIZE_CLASS,
|
|
22508
|
+
abort: '.' + EVENT_RESIZE_CLASS + ', .' + INLINE_EDIT_CLASS,
|
|
22445
22509
|
clone: true,
|
|
22446
22510
|
isDragScroll: true,
|
|
22447
22511
|
enableTailMode: this.parent.eventDragArea ? true : false,
|
|
@@ -22961,6 +23025,11 @@ class DragAndDrop extends ActionBase {
|
|
|
22961
23025
|
this.actionObj.clone.style.top = formatUnit(td.offsetParent.offsetTop);
|
|
22962
23026
|
this.actionObj.clone.style.left = formatUnit(td.offsetLeft);
|
|
22963
23027
|
this.actionObj.clone.style.width = formatUnit(td.offsetWidth);
|
|
23028
|
+
if (this.actionObj.cloneElement.length > 1) {
|
|
23029
|
+
this.actionObj.cloneElement.forEach((element) => {
|
|
23030
|
+
element.style.width = formatUnit(td.offsetWidth);
|
|
23031
|
+
});
|
|
23032
|
+
}
|
|
22964
23033
|
let eventContainer = td;
|
|
22965
23034
|
let eventWrapper;
|
|
22966
23035
|
if (this.parent.activeView.isTimelineView()) {
|
|
@@ -23248,6 +23317,10 @@ class DragAndDrop extends ActionBase {
|
|
|
23248
23317
|
this.verticalEvent.getTopValue(eStart) : this.actionObj.element.offsetTop;
|
|
23249
23318
|
if (isNullOrUndefined(index)) {
|
|
23250
23319
|
if (i === 0) {
|
|
23320
|
+
if (this.actionObj.clone.classList.contains(ALLDAY_APPOINTMENT_CLASS)) {
|
|
23321
|
+
topValue = this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS).offsetTop;
|
|
23322
|
+
appHeight = this.getAllDayEventHeight();
|
|
23323
|
+
}
|
|
23251
23324
|
this.actionObj.clone.style.top = formatUnit(topValue);
|
|
23252
23325
|
this.actionObj.clone.style.height = formatUnit(appHeight);
|
|
23253
23326
|
}
|
|
@@ -23257,9 +23330,7 @@ class DragAndDrop extends ActionBase {
|
|
|
23257
23330
|
}
|
|
23258
23331
|
else {
|
|
23259
23332
|
let appWidth = this.actionObj.cellWidth;
|
|
23260
|
-
if (event[this.parent.eventFields.isAllDay]) {
|
|
23261
|
-
topValue = this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS).offsetTop;
|
|
23262
|
-
appHeight = this.getAllDayEventHeight();
|
|
23333
|
+
if (event[this.parent.eventFields.isAllDay] && this.parent.activeViewOptions.timeScale.enable) {
|
|
23263
23334
|
const timeDiff = event[this.parent.eventFields.endTime].getTime() -
|
|
23264
23335
|
event[this.parent.eventFields.startTime].getTime();
|
|
23265
23336
|
const allDayDifference = Math.ceil(timeDiff / (1000 * 3600 * 24));
|
|
@@ -24795,7 +24866,7 @@ class VerticalView extends ViewBase {
|
|
|
24795
24866
|
case 'dateHeader':
|
|
24796
24867
|
if (this.parent.activeViewOptions.dateHeaderTemplate) {
|
|
24797
24868
|
templateName = 'dateHeaderTemplate';
|
|
24798
|
-
const args = { date: date, type: type };
|
|
24869
|
+
const args = { date: date, type: type, groupIndex: groupIndex };
|
|
24799
24870
|
const viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
24800
24871
|
cntEle = [].slice.call(this.parent.getDateHeaderTemplate()(args, this.parent, templateName, templateId + viewName + templateName, false, undefined, undefined, this.parent.root));
|
|
24801
24872
|
}
|
|
@@ -26443,10 +26514,11 @@ class Year extends ViewBase {
|
|
|
26443
26514
|
const startDate = isDateColAvail ? dateCollection[0] : this.getStartDate();
|
|
26444
26515
|
const endDate = isDateColAvail ? dateCollection[dateCollection.length - 1] : this.getEndDate();
|
|
26445
26516
|
if (startDate.getFullYear() !== endDate.getFullYear()) {
|
|
26446
|
-
return this.parent.globalize.formatDate(startDate, {
|
|
26517
|
+
return this.parent.globalize.formatDate(startDate, { format: 'MMM y', calendar: this.parent.getCalendarMode() })
|
|
26518
|
+
+ ' - ' + this.parent.globalize.formatDate(endDate, { format: 'MMM y', calendar: this.parent.getCalendarMode() });
|
|
26447
26519
|
}
|
|
26448
26520
|
else {
|
|
26449
|
-
return this.parent.globalize.formatDate(isDateColAvail ? dateCollection[0] : date, { skeleton: 'y' });
|
|
26521
|
+
return this.parent.globalize.formatDate(isDateColAvail ? dateCollection[0] : date, { skeleton: 'y', calendar: this.parent.getCalendarMode() });
|
|
26450
26522
|
}
|
|
26451
26523
|
}
|
|
26452
26524
|
addEventListener() {
|
|
@@ -26700,7 +26772,8 @@ class AgendaBase extends ViewBase {
|
|
|
26700
26772
|
rowSpan: 1, type: 'dateColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
26701
26773
|
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder,
|
|
26702
26774
|
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
26703
|
-
date: agendaDate
|
|
26775
|
+
date: agendaDate,
|
|
26776
|
+
groupIndex: resData[parseInt(res.toString(), 10)].groupIndex
|
|
26704
26777
|
};
|
|
26705
26778
|
if (!lastLevelInfo[parseInt(tempIndex.toString(), 10)]) {
|
|
26706
26779
|
lastLevelInfo[parseInt(tempIndex.toString(), 10)] = [];
|
|
@@ -26793,7 +26866,7 @@ class AgendaBase extends ViewBase {
|
|
|
26793
26866
|
continue;
|
|
26794
26867
|
}
|
|
26795
26868
|
ntd.setAttribute('data-date', data.date.getTime().toString());
|
|
26796
|
-
ntd.appendChild(this.createDateHeaderElement(data.date));
|
|
26869
|
+
ntd.appendChild(this.createDateHeaderElement(data.date, data.groupIndex));
|
|
26797
26870
|
const className = [AGENDA_CELLS_CLASS, AGENDA_DATE_CLASS];
|
|
26798
26871
|
if (data.cssClass) {
|
|
26799
26872
|
className.push(data.cssClass);
|
|
@@ -26848,11 +26921,11 @@ class AgendaBase extends ViewBase {
|
|
|
26848
26921
|
tBody.appendChild(ntr);
|
|
26849
26922
|
}
|
|
26850
26923
|
}
|
|
26851
|
-
createDateHeaderElement(date) {
|
|
26924
|
+
createDateHeaderElement(date, groupIndex) {
|
|
26852
26925
|
let dateHeader;
|
|
26853
26926
|
if (this.parent.activeViewOptions.dateHeaderTemplate) {
|
|
26854
26927
|
dateHeader = createElement('div', { className: AGENDA_HEADER_CLASS });
|
|
26855
|
-
const args = { date: date, type: 'dateHeader' };
|
|
26928
|
+
const args = { date: date, type: 'dateHeader', groupIndex: groupIndex };
|
|
26856
26929
|
const scheduleId = this.parent.element.id + '_';
|
|
26857
26930
|
const viewName = this.parent.activeViewOptions.dateHeaderTemplateName;
|
|
26858
26931
|
const templateId = scheduleId + viewName + 'dateHeaderTemplate';
|
|
@@ -26959,11 +27032,12 @@ class Agenda extends AgendaBase {
|
|
|
26959
27032
|
this.parent.eventsProcessed = this.processAgendaEvents(eventCollection);
|
|
26960
27033
|
const agendaDate = resetTime(this.parent.selectedDate);
|
|
26961
27034
|
const tBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
27035
|
+
const contentArea = closest(tBody, '.' + CONTENT_WRAP_CLASS);
|
|
27036
|
+
const scrollTop = contentArea.scrollTop;
|
|
26962
27037
|
removeChildren(tBody);
|
|
26963
27038
|
this.renderInitialContent(tBody, agendaDate);
|
|
26964
27039
|
this.wireEventActions();
|
|
26965
|
-
|
|
26966
|
-
contentArea.scrollTop = 1;
|
|
27040
|
+
contentArea.scrollTop = scrollTop;
|
|
26967
27041
|
this.parent.notify(eventsLoaded, {});
|
|
26968
27042
|
if (!this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
26969
27043
|
this.retainScrollPosition();
|