@syncfusion/ej2-schedule 20.4.44 → 20.4.49
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 +17 -1
- 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 +56 -27
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +56 -27
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/schedule/actions/action-base.d.ts +0 -1
- package/src/schedule/actions/action-base.js +1 -6
- package/src/schedule/actions/drag.js +4 -3
- package/src/schedule/actions/resize.js +3 -3
- package/src/schedule/actions/touch.js +2 -1
- package/src/schedule/event-renderer/event-base.d.ts +2 -0
- package/src/schedule/event-renderer/event-base.js +28 -4
- package/src/schedule/popups/event-window.js +1 -1
- package/src/schedule/popups/quick-popups.js +17 -9
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/schedule/_layout.scss +1 -1
- package/styles/schedule/bootstrap-dark.css +1 -1
- package/styles/schedule/bootstrap.css +1 -1
- package/styles/schedule/bootstrap4.css +1 -1
- package/styles/schedule/bootstrap5-dark.css +1 -1
- package/styles/schedule/bootstrap5.css +1 -1
- package/styles/schedule/fabric-dark.css +1 -1
- package/styles/schedule/fabric.css +1 -1
- package/styles/schedule/fluent-dark.css +1 -1
- package/styles/schedule/fluent.css +1 -1
- package/styles/schedule/highcontrast-light.css +1 -1
- package/styles/schedule/highcontrast.css +1 -1
- package/styles/schedule/material-dark.css +1 -1
- package/styles/schedule/material.css +1 -1
- package/styles/schedule/tailwind-dark.css +1 -1
- package/styles/schedule/tailwind.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -1696,7 +1696,7 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
1696
1696
|
if (offsetDist > time || (e.distanceX > (this.parent.element.offsetWidth / 2))) {
|
|
1697
1697
|
this.swapPanels(e.swipeDirection);
|
|
1698
1698
|
if (offsetDist > time && (e.distanceX > (this.parent.element.offsetWidth / 2))) {
|
|
1699
|
-
this.element.style.transitionDuration = ((offsetDist / time) / 10) + 's';
|
|
1699
|
+
this.element.style.transitionDuration = (((Browser.isDevice ? e.distanceX : offsetDist) / time) / 10) + 's';
|
|
1700
1700
|
}
|
|
1701
1701
|
this.confirmSwipe(e.swipeDirection);
|
|
1702
1702
|
}
|
|
@@ -1826,6 +1826,7 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
1826
1826
|
this.nextPanel = null;
|
|
1827
1827
|
this.timeStampStart = null;
|
|
1828
1828
|
this.element.style.transform = '';
|
|
1829
|
+
this.element.style.transitionDuration = '';
|
|
1829
1830
|
removeChildren(this.element);
|
|
1830
1831
|
removeClass([this.element], TRANSLATE_CLASS);
|
|
1831
1832
|
};
|
|
@@ -5480,8 +5481,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5480
5481
|
return filteredCollection;
|
|
5481
5482
|
};
|
|
5482
5483
|
EventBase.prototype.sortByTime = function (appointmentsCollection) {
|
|
5483
|
-
if (this.parent.eventSettings.sortComparer) {
|
|
5484
|
-
appointmentsCollection = this.
|
|
5484
|
+
if (this.parent.eventSettings.sortComparer && (typeof (this.parent.eventSettings.sortComparer) === 'function' || typeof (this.parent.eventSettings.sortComparer) === 'string')) {
|
|
5485
|
+
appointmentsCollection = this.customSorting(appointmentsCollection);
|
|
5485
5486
|
}
|
|
5486
5487
|
else {
|
|
5487
5488
|
var fieldMappings_1 = this.parent.eventFields;
|
|
@@ -5494,8 +5495,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5494
5495
|
return appointmentsCollection;
|
|
5495
5496
|
};
|
|
5496
5497
|
EventBase.prototype.sortByDateTime = function (appointments) {
|
|
5497
|
-
if (this.parent.eventSettings.sortComparer) {
|
|
5498
|
-
appointments = this.
|
|
5498
|
+
if (this.parent.eventSettings.sortComparer && (typeof (this.parent.eventSettings.sortComparer) === 'function' || typeof (this.parent.eventSettings.sortComparer) === 'string')) {
|
|
5499
|
+
appointments = this.customSorting(appointments);
|
|
5499
5500
|
}
|
|
5500
5501
|
else {
|
|
5501
5502
|
var fieldMapping_1 = this.parent.eventFields;
|
|
@@ -5511,6 +5512,22 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5511
5512
|
}
|
|
5512
5513
|
return appointments;
|
|
5513
5514
|
};
|
|
5515
|
+
EventBase.prototype.customSorting = function (appointments) {
|
|
5516
|
+
if (typeof (this.parent.eventSettings.sortComparer) === 'function') {
|
|
5517
|
+
return this.parent.eventSettings.sortComparer.call(this.parent, appointments);
|
|
5518
|
+
}
|
|
5519
|
+
else if (typeof (this.parent.eventSettings.sortComparer) === 'string') {
|
|
5520
|
+
var splits = this.parent.eventSettings.sortComparer.split('.');
|
|
5521
|
+
var sortFn = void 0;
|
|
5522
|
+
if (!isNullOrUndefined(window)) {
|
|
5523
|
+
sortFn = window[splits[splits.length - 1]];
|
|
5524
|
+
}
|
|
5525
|
+
if (sortFn) {
|
|
5526
|
+
return sortFn(appointments);
|
|
5527
|
+
}
|
|
5528
|
+
}
|
|
5529
|
+
return appointments;
|
|
5530
|
+
};
|
|
5514
5531
|
EventBase.prototype.getSmallestMissingNumber = function (array) {
|
|
5515
5532
|
var large = Math.max.apply(Math, array);
|
|
5516
5533
|
for (var i = 0; i < large; i++) {
|
|
@@ -6475,6 +6492,14 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6475
6492
|
}
|
|
6476
6493
|
return tr;
|
|
6477
6494
|
};
|
|
6495
|
+
EventBase.prototype.getPageCoordinates = function (e) {
|
|
6496
|
+
if (isNullOrUndefined(e)) {
|
|
6497
|
+
return e;
|
|
6498
|
+
}
|
|
6499
|
+
var eventArgs = e.event;
|
|
6500
|
+
return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] :
|
|
6501
|
+
eventArgs || e;
|
|
6502
|
+
};
|
|
6478
6503
|
EventBase.prototype.unWireEvents = function () {
|
|
6479
6504
|
var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
6480
6505
|
for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
|
|
@@ -9347,7 +9372,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9347
9372
|
if (deleteIcon) {
|
|
9348
9373
|
this.renderButton('e-flat e-round e-small', ICON + ' ' + DELETE_ICON_CLASS, deleteAction, deleteIcon, this.deleteClick);
|
|
9349
9374
|
}
|
|
9350
|
-
this.beforeQuickPopupOpen(target, e);
|
|
9375
|
+
this.beforeQuickPopupOpen(target, this.parent.eventBase.getPageCoordinates(e));
|
|
9351
9376
|
};
|
|
9352
9377
|
QuickPopups.prototype.isCellBlocked = function (args) {
|
|
9353
9378
|
var tempObj = {};
|
|
@@ -9434,7 +9459,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9434
9459
|
this.quickPopup.content = quickCellPopup;
|
|
9435
9460
|
this.quickPopup.relateTo = target;
|
|
9436
9461
|
this.quickPopup.dataBind();
|
|
9437
|
-
this.beforeQuickPopupOpen(target, args.event);
|
|
9462
|
+
this.beforeQuickPopupOpen(target, this.parent.eventBase.getPageCoordinates(args.event));
|
|
9438
9463
|
};
|
|
9439
9464
|
QuickPopups.prototype.isSameEventClick = function (events) {
|
|
9440
9465
|
var isSameTarget = this.quickPopup.relateTo === closest(events.element, '.' + APPOINTMENT_CLASS);
|
|
@@ -9511,7 +9536,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9511
9536
|
this.quickPopup.relateTo = this.parent.isAdaptive ? document.body :
|
|
9512
9537
|
closest(events.element, '.' + APPOINTMENT_CLASS);
|
|
9513
9538
|
this.quickPopup.dataBind();
|
|
9514
|
-
this.beforeQuickPopupOpen(events.element, events.originalEvent);
|
|
9539
|
+
this.beforeQuickPopupOpen(events.element, this.parent.eventBase.getPageCoordinates(events.originalEvent));
|
|
9515
9540
|
}
|
|
9516
9541
|
};
|
|
9517
9542
|
QuickPopups.prototype.getPopupHeader = function (headerType, headerData) {
|
|
@@ -10052,22 +10077,30 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
10052
10077
|
_this.quickPopup.dataBind();
|
|
10053
10078
|
_this.quickPopup.refreshPosition(null, true);
|
|
10054
10079
|
}
|
|
10055
|
-
if (_this.quickPopup.position.X === 'center' && _this.quickPopup.position.Y === 'center' && !isNullOrUndefined(originalEvent)
|
|
10080
|
+
if (_this.quickPopup.position.X === 'center' && _this.quickPopup.position.Y === 'center' && !isNullOrUndefined(originalEvent) &&
|
|
10081
|
+
originalEvent.clientX && originalEvent.clientY) {
|
|
10082
|
+
var clientX = originalEvent.clientX;
|
|
10083
|
+
var clientY = originalEvent.clientY;
|
|
10084
|
+
var targetRect = target.getBoundingClientRect();
|
|
10085
|
+
var offsetY = originalEvent.offsetY || Math.ceil(clientY - targetRect.y);
|
|
10056
10086
|
var previousOffset = _this.quickPopup.offsetY;
|
|
10057
|
-
var collision = isCollide(
|
|
10087
|
+
var collision = isCollide(_this.quickPopup.element, target);
|
|
10058
10088
|
var popupRect = _this.quickPopup.element.getBoundingClientRect();
|
|
10059
|
-
|
|
10060
|
-
|
|
10089
|
+
var targetEle = document.elementFromPoint(clientX, clientY);
|
|
10090
|
+
if (collision.indexOf('top') > -1 || collision.indexOf('bottom') > -1 || closest(targetEle, '.' + POPUP_WRAPPER_CLASS)) {
|
|
10091
|
+
if (popupRect.top <= clientY &&
|
|
10092
|
+
clientY <= popupRect.top + popupRect.height) {
|
|
10061
10093
|
_this.quickPopup.offsetY = previousOffset - popupRect.height - 10;
|
|
10062
10094
|
_this.quickPopup.dataBind();
|
|
10063
10095
|
collision = isCollide(_this.quickPopup.element, _this.parent.element);
|
|
10064
10096
|
if (collision.indexOf('top') > -1) {
|
|
10065
|
-
_this.quickPopup.offsetY = previousOffset +
|
|
10097
|
+
_this.quickPopup.offsetY = previousOffset + offsetY + 10;
|
|
10066
10098
|
_this.quickPopup.dataBind();
|
|
10067
10099
|
}
|
|
10068
10100
|
}
|
|
10069
10101
|
else if (isCollide(_this.quickPopup.element, _this.parent.element).indexOf('bottom') > -1) {
|
|
10070
|
-
_this.quickPopup.offsetY =
|
|
10102
|
+
_this.quickPopup.offsetY =
|
|
10103
|
+
previousOffset - offsetY - Math.ceil(popupRect.height) - 10;
|
|
10071
10104
|
_this.quickPopup.dataBind();
|
|
10072
10105
|
}
|
|
10073
10106
|
}
|
|
@@ -13118,7 +13151,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13118
13151
|
var _this = this;
|
|
13119
13152
|
var lastResourceData = this.parent.resourceBase.resourceCollection.slice(-1)[0];
|
|
13120
13153
|
var resourceData = eventObj[lastResourceData.field];
|
|
13121
|
-
resourceData = (resourceData instanceof Array) ? resourceData : [resourceData];
|
|
13154
|
+
resourceData = (resourceData instanceof Array) ? resourceData.reverse() : [resourceData].reverse();
|
|
13122
13155
|
var lastLevel = this.parent.resourceBase.lastResourceLevel;
|
|
13123
13156
|
var eventList = [];
|
|
13124
13157
|
var _loop_2 = function (i) {
|
|
@@ -19416,11 +19449,6 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19416
19449
|
};
|
|
19417
19450
|
return viewDimension;
|
|
19418
19451
|
};
|
|
19419
|
-
ActionBase.prototype.getPageCoordinates = function (e) {
|
|
19420
|
-
var eventArgs = e.event;
|
|
19421
|
-
return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] :
|
|
19422
|
-
eventArgs || e;
|
|
19423
|
-
};
|
|
19424
19452
|
ActionBase.prototype.getIndex = function (index) {
|
|
19425
19453
|
var contentElements = [].slice.call(this.parent.getContentTable().querySelector('tr').children);
|
|
19426
19454
|
var indexes = { minIndex: 0, maxIndex: contentElements.length - 1 };
|
|
@@ -19557,7 +19585,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19557
19585
|
}
|
|
19558
19586
|
};
|
|
19559
19587
|
ActionBase.prototype.getCursorElement = function (e) {
|
|
19560
|
-
var pages = this.getPageCoordinates(e);
|
|
19588
|
+
var pages = this.parent.eventBase.getPageCoordinates(e);
|
|
19561
19589
|
return document.elementFromPoint(pages.clientX, pages.clientY);
|
|
19562
19590
|
};
|
|
19563
19591
|
ActionBase.prototype.autoScroll = function () {
|
|
@@ -19858,7 +19886,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19858
19886
|
_this.actionObj.cellWidth = trRect.width / noOfDays;
|
|
19859
19887
|
_this.actionObj.cellHeight = trRect.height;
|
|
19860
19888
|
}
|
|
19861
|
-
var pages = _this.getPageCoordinates(e);
|
|
19889
|
+
var pages = _this.parent.eventBase.getPageCoordinates(e);
|
|
19862
19890
|
_this.actionObj.X = pages.pageX;
|
|
19863
19891
|
_this.actionObj.Y = pages.pageY;
|
|
19864
19892
|
_this.actionObj.groupIndex = parseInt(_this.actionObj.element.getAttribute('data-group-index') || '0', 10);
|
|
@@ -19887,7 +19915,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19887
19915
|
if ((!isNullOrUndefined(e.target)) && e.target.classList.contains(DISABLE_DATES)) {
|
|
19888
19916
|
return;
|
|
19889
19917
|
}
|
|
19890
|
-
var pages = this.getPageCoordinates(e);
|
|
19918
|
+
var pages = this.parent.eventBase.getPageCoordinates(e);
|
|
19891
19919
|
if (this.parent.currentView === 'Month' || this.parent.currentView === 'TimelineYear') {
|
|
19892
19920
|
var doc = document.documentElement;
|
|
19893
19921
|
var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
|
|
@@ -20320,7 +20348,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
20320
20348
|
return styles;
|
|
20321
20349
|
};
|
|
20322
20350
|
Resize.prototype.resizeValidation = function (e) {
|
|
20323
|
-
var pages = this.getPageCoordinates(e);
|
|
20351
|
+
var pages = this.parent.eventBase.getPageCoordinates(e);
|
|
20324
20352
|
var viewDimension = this.getContentAreaDimension();
|
|
20325
20353
|
var isTimeScale = this.parent.activeView.isTimelineView() && this.parent.activeViewOptions.timeScale.enable;
|
|
20326
20354
|
var cellWidth = this.actionObj.cellWidth;
|
|
@@ -21168,7 +21196,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21168
21196
|
return;
|
|
21169
21197
|
}
|
|
21170
21198
|
var eventObj = extend({}, this.actionObj.event, null, true);
|
|
21171
|
-
var eventArgs = this.getPageCoordinates(e);
|
|
21199
|
+
var eventArgs = this.parent.eventBase.getPageCoordinates(e);
|
|
21172
21200
|
this.actionObj.Y = this.actionObj.pageY = eventArgs.pageY;
|
|
21173
21201
|
this.actionObj.X = this.actionObj.pageX = eventArgs.pageX;
|
|
21174
21202
|
this.actionObj.target = e.target;
|
|
@@ -21311,7 +21339,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21311
21339
|
this.timelineEventModule.dateRender = this.parent.activeView.renderDates;
|
|
21312
21340
|
this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
|
|
21313
21341
|
this.timelineEventModule.getSlotDates();
|
|
21314
|
-
this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
|
|
21342
|
+
this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
|
|
21343
|
+
this.parent.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect().width;
|
|
21315
21344
|
this.calculateTimelineTime(e);
|
|
21316
21345
|
}
|
|
21317
21346
|
else {
|
|
@@ -22064,7 +22093,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22064
22093
|
return 0;
|
|
22065
22094
|
};
|
|
22066
22095
|
DragAndDrop.prototype.getColumnIndex = function (offsetLeft) {
|
|
22067
|
-
var index = Math.floor(offsetLeft / this.actionObj.cellWidth);
|
|
22096
|
+
var index = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth));
|
|
22068
22097
|
if (this.isHeaderRows) {
|
|
22069
22098
|
return index;
|
|
22070
22099
|
}
|