@syncfusion/ej2-schedule 19.4.41 → 19.4.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/CHANGELOG.md +28 -1
- 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 +60 -25
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +60 -25
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/schedule/actions/drag.js +9 -7
- package/src/schedule/actions/keyboard.d.ts +1 -0
- package/src/schedule/actions/keyboard.js +23 -0
- package/src/schedule/event-renderer/agenda-base.js +1 -1
- package/src/schedule/event-renderer/timeline-view.d.ts +1 -0
- package/src/schedule/event-renderer/timeline-view.js +7 -5
- package/src/schedule/event-renderer/vertical-view.js +7 -1
- package/src/schedule/event-renderer/year.js +3 -1
- package/src/schedule/popups/event-window.js +1 -1
- package/src/schedule/popups/quick-popups.js +5 -5
- package/src/schedule/renderer/month.js +1 -1
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/view-base.js +1 -1
- package/src/schedule/renderer/year.js +1 -1
- package/styles/bootstrap-dark.css +6 -2
- package/styles/bootstrap.css +6 -2
- package/styles/bootstrap4.css +6 -2
- package/styles/bootstrap5-dark.css +6 -2
- package/styles/bootstrap5.css +6 -2
- package/styles/fabric-dark.css +6 -2
- package/styles/fabric.css +6 -2
- package/styles/highcontrast-light.css +6 -2
- package/styles/highcontrast.css +6 -2
- package/styles/material-dark.css +6 -2
- package/styles/material.css +6 -2
- package/styles/schedule/_layout.scss +6 -2
- package/styles/schedule/bootstrap-dark.css +6 -2
- package/styles/schedule/bootstrap.css +6 -2
- package/styles/schedule/bootstrap4.css +6 -2
- package/styles/schedule/bootstrap5-dark.css +6 -2
- package/styles/schedule/bootstrap5.css +6 -2
- package/styles/schedule/fabric-dark.css +6 -2
- package/styles/schedule/fabric.css +6 -2
- package/styles/schedule/highcontrast-light.css +6 -2
- package/styles/schedule/highcontrast.css +6 -2
- package/styles/schedule/material-dark.css +6 -2
- package/styles/schedule/material.css +6 -2
- package/styles/schedule/tailwind-dark.css +6 -2
- package/styles/schedule/tailwind.css +6 -2
- package/styles/tailwind-dark.css +6 -2
- package/styles/tailwind.css +6 -2
|
@@ -1897,6 +1897,29 @@ class KeyboardInteraction {
|
|
|
1897
1897
|
break;
|
|
1898
1898
|
case 'escape':
|
|
1899
1899
|
this.processEscape(e);
|
|
1900
|
+
break;
|
|
1901
|
+
case 'fTwelve':
|
|
1902
|
+
if (this.parent.allowInline && this.parent.inlineModule) {
|
|
1903
|
+
e.preventDefault();
|
|
1904
|
+
this.processFTwelve(e);
|
|
1905
|
+
}
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
processFTwelve(e) {
|
|
1910
|
+
const target = e.target;
|
|
1911
|
+
if (target.classList.contains(WORK_CELLS_CLASS) || target.classList.contains(ALLDAY_CELLS_CLASS)) {
|
|
1912
|
+
this.parent.activeCellsData = this.getSelectedElements(target);
|
|
1913
|
+
const args = extend(this.parent.activeCellsData, { cancel: false, event: e });
|
|
1914
|
+
const inlineArgs = {
|
|
1915
|
+
element: args.element,
|
|
1916
|
+
groupIndex: args.groupIndex, type: 'Cell'
|
|
1917
|
+
};
|
|
1918
|
+
this.parent.notify(inlineClick, inlineArgs);
|
|
1919
|
+
}
|
|
1920
|
+
if (target.classList.contains(APPOINTMENT_CLASS)) {
|
|
1921
|
+
target.click();
|
|
1922
|
+
return;
|
|
1900
1923
|
}
|
|
1901
1924
|
}
|
|
1902
1925
|
addEventListener() {
|
|
@@ -6710,6 +6733,8 @@ class VerticalEvent extends EventBase {
|
|
|
6710
6733
|
appointmentElement = this.createAppointmentElement(eventObj, true, record.data, resource);
|
|
6711
6734
|
}
|
|
6712
6735
|
addClass([appointmentElement], ALLDAY_APPOINTMENT_CLASS);
|
|
6736
|
+
const eventData = extend({}, record.data, null, true);
|
|
6737
|
+
eventObj.data = eventData;
|
|
6713
6738
|
const args = { data: eventObj, element: appointmentElement, cancel: false };
|
|
6714
6739
|
this.parent.trigger(eventRendered, args, (eventArgs) => {
|
|
6715
6740
|
if (!eventArgs.cancel) {
|
|
@@ -6791,7 +6816,11 @@ class VerticalEvent extends EventBase {
|
|
|
6791
6816
|
subjectElement.style.maxHeight = formatUnit(maxHeight);
|
|
6792
6817
|
}
|
|
6793
6818
|
const index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
|
|
6794
|
-
|
|
6819
|
+
const eventData = {};
|
|
6820
|
+
eventData[this.fields.startTime] = eventObj[this.fields.startTime];
|
|
6821
|
+
eventData[this.fields.endTime] = eventObj[this.fields.endTime];
|
|
6822
|
+
record.data = eventData;
|
|
6823
|
+
this.appendEvent(record, appointmentElement, index, tempData.appLeft);
|
|
6795
6824
|
this.wireAppointmentEvents(appointmentElement, eventObj);
|
|
6796
6825
|
if (appHeight < this.cellHeight) {
|
|
6797
6826
|
const resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + EVENT_RESIZE_CLASS));
|
|
@@ -7713,6 +7742,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
7713
7742
|
this.interval = this.parent.activeViewOptions.timeScale.interval;
|
|
7714
7743
|
this.day = 0;
|
|
7715
7744
|
this.rowIndex = 0;
|
|
7745
|
+
this.cellTops = [];
|
|
7716
7746
|
this.renderType = type;
|
|
7717
7747
|
this.eventContainers = [].slice.call(this.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
7718
7748
|
const tr = [].slice.call(this.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
|
|
@@ -7828,9 +7858,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
7828
7858
|
const cellTd = this.getCellTd();
|
|
7829
7859
|
const overlapCount = (isNullOrUndefined(this.parent.eventSettings.sortComparer)) ? this.getIndex(startTime) : this.getSortComparerIndex(startTime, endTime);
|
|
7830
7860
|
event.Index = overlapCount;
|
|
7831
|
-
const
|
|
7832
|
-
const eleHeight = (elem) ? elem.getBoundingClientRect().height : 0;
|
|
7833
|
-
const appHeight = (elem && eleHeight > 0) ? eleHeight : this.eventHeight;
|
|
7861
|
+
const appHeight = this.eventHeight;
|
|
7834
7862
|
const diffInDays = eventData.count;
|
|
7835
7863
|
const eventObj = extend({}, event, null, true);
|
|
7836
7864
|
eventObj[this.fields.startTime] = eventData[this.fields.startTime];
|
|
@@ -7846,7 +7874,10 @@ class TimelineEvent extends MonthEvent {
|
|
|
7846
7874
|
const position = this.getPosition(startTime, endTime, event[this.fields.isAllDay], this.day);
|
|
7847
7875
|
appWidth = (appWidth <= 0) ? this.cellWidth : appWidth; // appWidth 0 when start and end time as same
|
|
7848
7876
|
this.renderedEvents.push(extend({}, event, null, true));
|
|
7849
|
-
|
|
7877
|
+
if (isNullOrUndefined(this.cellTops[resIndex])) {
|
|
7878
|
+
this.cellTops[resIndex] = this.getRowTop(resIndex);
|
|
7879
|
+
}
|
|
7880
|
+
const top = this.cellTops[resIndex];
|
|
7850
7881
|
const appTop = (top + (this.maxHeight ? 0 : EVENT_GAP$1)) + (overlapCount * (appHeight + EVENT_GAP$1));
|
|
7851
7882
|
appLeft = (this.parent.enableRtl) ? 0 : position;
|
|
7852
7883
|
appRight = (this.parent.enableRtl) ? position : 0;
|
|
@@ -7950,7 +7981,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
7950
7981
|
}
|
|
7951
7982
|
}
|
|
7952
7983
|
updateCellHeight(cell, height) {
|
|
7953
|
-
if ((height >
|
|
7984
|
+
if ((height > this.cellHeight)) {
|
|
7954
7985
|
setStyleAttribute(cell, { 'height': height + 'px' });
|
|
7955
7986
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7956
7987
|
const resourceCell = this.parent.element.querySelector('.' + RESOURCE_COLUMN_TABLE_CLASS + ' ' + 'tbody td[data-group-index="' +
|
|
@@ -8976,13 +9007,12 @@ class QuickPopups {
|
|
|
8976
9007
|
if (saveButton) {
|
|
8977
9008
|
this.renderButton('e-flat e-primary', '', this.parent.activeViewOptions.readonly, saveButton, this.saveClick);
|
|
8978
9009
|
}
|
|
8979
|
-
this.quickPopup.content = quickCellPopup;
|
|
8980
|
-
this.quickPopup.dataBind();
|
|
8981
|
-
this.applyFormValidation();
|
|
8982
9010
|
if (this.morePopup) {
|
|
8983
9011
|
this.morePopup.hide();
|
|
8984
9012
|
}
|
|
9013
|
+
this.quickPopup.content = quickCellPopup;
|
|
8985
9014
|
this.quickPopup.relateTo = target;
|
|
9015
|
+
this.quickPopup.dataBind();
|
|
8986
9016
|
this.beforeQuickPopupOpen(target);
|
|
8987
9017
|
}
|
|
8988
9018
|
isSameEventClick(events) {
|
|
@@ -9049,13 +9079,13 @@ class QuickPopups {
|
|
|
9049
9079
|
if (deleteButton) {
|
|
9050
9080
|
this.renderButton('e-flat', '', deleteAction, deleteButton, this.deleteClick);
|
|
9051
9081
|
}
|
|
9052
|
-
this.quickPopup.content = quickEventPopup;
|
|
9053
|
-
this.quickPopup.dataBind();
|
|
9054
9082
|
if (this.morePopup && !closest(events.element, '.' + MORE_EVENT_WRAPPER_CLASS)) {
|
|
9055
9083
|
this.morePopup.hide();
|
|
9056
9084
|
}
|
|
9085
|
+
this.quickPopup.content = quickEventPopup;
|
|
9057
9086
|
this.quickPopup.relateTo = this.parent.isAdaptive ? document.body :
|
|
9058
9087
|
closest(events.element, '.' + APPOINTMENT_CLASS);
|
|
9088
|
+
this.quickPopup.dataBind();
|
|
9059
9089
|
this.beforeQuickPopupOpen(events.element);
|
|
9060
9090
|
}
|
|
9061
9091
|
}
|
|
@@ -9342,6 +9372,7 @@ class QuickPopups {
|
|
|
9342
9372
|
});
|
|
9343
9373
|
}
|
|
9344
9374
|
saveClick(event) {
|
|
9375
|
+
this.applyFormValidation();
|
|
9345
9376
|
this.dialogEvent = event;
|
|
9346
9377
|
this.isCrudAction = true;
|
|
9347
9378
|
this.quickPopupHide();
|
|
@@ -11694,7 +11725,7 @@ class EventWindow {
|
|
|
11694
11725
|
return labelText;
|
|
11695
11726
|
}
|
|
11696
11727
|
onChange(args) {
|
|
11697
|
-
const target =
|
|
11728
|
+
const target = args.event.currentTarget.querySelector('input');
|
|
11698
11729
|
if (target.classList.contains(EVENT_WINDOW_ALL_DAY_CLASS)) {
|
|
11699
11730
|
this.onAllDayChange(args.checked);
|
|
11700
11731
|
}
|
|
@@ -19130,6 +19161,7 @@ class YearEvent extends TimelineEvent {
|
|
|
19130
19161
|
const rowIndex = this.parent.activeViewOptions.orientation === 'Vertical' ? index : month;
|
|
19131
19162
|
const td = this.parent.element.querySelector(`.e-content-wrap tr:nth-child(${rowIndex + 1}) td`);
|
|
19132
19163
|
this.cellHeight = td.offsetHeight;
|
|
19164
|
+
this.groupOrder = resource.groupOrder;
|
|
19133
19165
|
for (let a = 0; a < eventDatas.length; a++) {
|
|
19134
19166
|
const data = eventDatas[a];
|
|
19135
19167
|
let overlapIndex;
|
|
@@ -19364,7 +19396,8 @@ class YearEvent extends TimelineEvent {
|
|
|
19364
19396
|
}
|
|
19365
19397
|
}
|
|
19366
19398
|
else {
|
|
19367
|
-
|
|
19399
|
+
const timeCondition = app[this.fields.isAllDay] ? resetTime(appEnd).getTime() > dateStart : resetTime(appEnd).getTime() >= dateStart;
|
|
19400
|
+
if (((resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
19368
19401
|
(resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
|
|
19369
19402
|
appointmentsList.push(app);
|
|
19370
19403
|
}
|
|
@@ -19847,14 +19880,16 @@ class DragAndDrop extends ActionBase {
|
|
|
19847
19880
|
else {
|
|
19848
19881
|
outWrapper = this.parent.element.querySelector('.' + APPOINTMENT_CONTAINER_CLASS);
|
|
19849
19882
|
}
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19853
|
-
|
|
19883
|
+
if (!isNullOrUndefined(outWrapper)) {
|
|
19884
|
+
let tarWrapper = outWrapper.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
|
|
19885
|
+
if (!tarWrapper) {
|
|
19886
|
+
tarWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
19887
|
+
outWrapper.appendChild(tarWrapper);
|
|
19888
|
+
}
|
|
19889
|
+
this.actionObj.cloneElement.forEach((ele) => {
|
|
19890
|
+
tarWrapper.appendChild(ele);
|
|
19891
|
+
});
|
|
19854
19892
|
}
|
|
19855
|
-
this.actionObj.cloneElement.forEach((ele) => {
|
|
19856
|
-
tarWrapper.appendChild(ele);
|
|
19857
|
-
});
|
|
19858
19893
|
}
|
|
19859
19894
|
}
|
|
19860
19895
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -21086,7 +21121,7 @@ class ViewBase {
|
|
|
21086
21121
|
if (this.isTimelineView()) {
|
|
21087
21122
|
const colElements = this.getColElements();
|
|
21088
21123
|
const contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
21089
|
-
const colWidth =
|
|
21124
|
+
const colWidth = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
|
|
21090
21125
|
colElements.forEach((col) => setStyleAttribute(col, { 'width': formatUnit(colWidth) }));
|
|
21091
21126
|
if (content.offsetHeight !== content.clientHeight) {
|
|
21092
21127
|
const resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
@@ -21554,7 +21589,7 @@ class VerticalView extends ViewBase {
|
|
|
21554
21589
|
if (this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
21555
21590
|
clsList.push(VIRTUAL_SCROLL_CLASS);
|
|
21556
21591
|
}
|
|
21557
|
-
if (this.parent.eventSettings.ignoreWhitespace) {
|
|
21592
|
+
if (this.parent.rowAutoHeight && this.parent.eventSettings.ignoreWhitespace) {
|
|
21558
21593
|
clsList.push(IGNORE_WHITESPACE);
|
|
21559
21594
|
}
|
|
21560
21595
|
this.renderPanel(type);
|
|
@@ -22166,7 +22201,7 @@ class Month extends ViewBase {
|
|
|
22166
22201
|
if (this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
22167
22202
|
clsList.push(VIRTUAL_SCROLL_CLASS);
|
|
22168
22203
|
}
|
|
22169
|
-
if (this.parent.eventSettings.ignoreWhitespace) {
|
|
22204
|
+
if (this.parent.rowAutoHeight && this.parent.eventSettings.ignoreWhitespace) {
|
|
22170
22205
|
clsList.push(IGNORE_WHITESPACE);
|
|
22171
22206
|
}
|
|
22172
22207
|
addClass([this.element], clsList);
|
|
@@ -22734,7 +22769,7 @@ class Year extends ViewBase {
|
|
|
22734
22769
|
const weekNumber = this.parent.getWeekNumberContent(weekDates);
|
|
22735
22770
|
const td = createElement('td', {
|
|
22736
22771
|
className: 'e-week-number',
|
|
22737
|
-
attrs: { 'role': 'gridcell', 'title': '
|
|
22772
|
+
attrs: { 'role': 'gridcell', 'title': this.parent.localeObj.getConstant('week') + ' ' + weekNumber },
|
|
22738
22773
|
innerHTML: weekNumber
|
|
22739
22774
|
});
|
|
22740
22775
|
tr.appendChild(td);
|
|
@@ -23122,7 +23157,7 @@ class AgendaBase extends ViewBase {
|
|
|
23122
23157
|
wireEventActions() {
|
|
23123
23158
|
const eventElement = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
23124
23159
|
for (const element of eventElement) {
|
|
23125
|
-
this.parent.eventBase.wireAppointmentEvents(element,
|
|
23160
|
+
this.parent.eventBase.wireAppointmentEvents(element, this.parent.getEventDetails(element), true);
|
|
23126
23161
|
}
|
|
23127
23162
|
const dateHeaderElement = [].slice.call(this.parent.element.querySelectorAll('.e-m-date'));
|
|
23128
23163
|
for (const element of dateHeaderElement) {
|