@syncfusion/ej2-schedule 28.2.3 → 28.2.5
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 +35 -23
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +37 -24
- 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 +8 -8
- package/src/schedule/actions/crud.js +12 -5
- package/src/schedule/actions/resize.js +9 -11
- package/src/schedule/event-renderer/timeline-view.js +2 -2
- package/src/schedule/popups/quick-popups.js +3 -2
- package/src/schedule/renderer/month-agenda.js +1 -1
- package/src/schedule/renderer/vertical-view.js +10 -3
|
@@ -9119,8 +9119,8 @@ class TimelineEvent extends MonthEvent {
|
|
|
9119
9119
|
return slotTd;
|
|
9120
9120
|
}
|
|
9121
9121
|
else {
|
|
9122
|
-
const daySlot = Math.round(((
|
|
9123
|
-
|
|
9122
|
+
const daySlot = Math.round(((getUniversalTime(schedule.endHour) - getUniversalTime(schedule.startHour)) /
|
|
9123
|
+
this.interval / MS_PER_MINUTE) * this.slotCount);
|
|
9124
9124
|
return (daySlot * day) + slotTd;
|
|
9125
9125
|
}
|
|
9126
9126
|
}
|
|
@@ -10861,7 +10861,7 @@ class QuickPopups {
|
|
|
10861
10861
|
documentClick(e) {
|
|
10862
10862
|
const target = e.event.target;
|
|
10863
10863
|
const classNames = '.' + POPUP_WRAPPER_CLASS + ',.' + HEADER_CELLS_CLASS + ',.' + ALLDAY_CELLS_CLASS +
|
|
10864
|
-
',.' + WORK_CELLS_CLASS + ',.' + APPOINTMENT_CLASS
|
|
10864
|
+
',.' + WORK_CELLS_CLASS + ',.' + APPOINTMENT_CLASS;
|
|
10865
10865
|
const popupWrap = this.parent.element.querySelector('.' + POPUP_WRAPPER_CLASS);
|
|
10866
10866
|
if ((popupWrap && popupWrap.childElementCount > 0 && !closest(target, classNames)) || !closest(target, classNames)) {
|
|
10867
10867
|
this.quickPopupHide();
|
|
@@ -10876,7 +10876,8 @@ class QuickPopups {
|
|
|
10876
10876
|
}
|
|
10877
10877
|
if (!closest(target, '.' + MORE_POPUP_WRAPPER_CLASS) && (target.classList &&
|
|
10878
10878
|
!target.classList.contains(MORE_INDICATOR_CLASS))
|
|
10879
|
-
&& (!closest(target, '.' +
|
|
10879
|
+
&& (!closest(target, '.' + MORE_POPUP_WRAPPER_CLASS + '.' + POPUP_OPEN))
|
|
10880
|
+
&& !closest(target, '.' + WORK_CELLS_CLASS)) {
|
|
10880
10881
|
this.morePopup.hide();
|
|
10881
10882
|
}
|
|
10882
10883
|
}
|
|
@@ -15379,7 +15380,7 @@ class Crud {
|
|
|
15379
15380
|
editParams.changedRecords.push(this.parent.eventBase.processTimezone(parentEvent, true));
|
|
15380
15381
|
}
|
|
15381
15382
|
if (childEvent[fields.id] !== parentEvent[fields.id]) {
|
|
15382
|
-
editParams.deletedRecords.push(childEvent);
|
|
15383
|
+
editParams.deletedRecords.push(this.parent.eventBase.processTimezone(childEvent, true));
|
|
15383
15384
|
isDeletedRecords = true;
|
|
15384
15385
|
}
|
|
15385
15386
|
break;
|
|
@@ -15529,7 +15530,7 @@ class Crud {
|
|
|
15529
15530
|
this.parent.uiStateValues.isIgnoreOccurrence = false;
|
|
15530
15531
|
break;
|
|
15531
15532
|
case 'DeleteSeries':
|
|
15532
|
-
editParams.deletedRecords = editParams.deletedRecords.concat(deletedEvents.concat(parentEvent));
|
|
15533
|
+
editParams.deletedRecords = editParams.deletedRecords.concat(deletedEvents.concat(this.parent.eventBase.processTimezone(parentEvent, true)));
|
|
15533
15534
|
isDeletedRecords = true;
|
|
15534
15535
|
break;
|
|
15535
15536
|
}
|
|
@@ -15586,11 +15587,17 @@ class Crud {
|
|
|
15586
15587
|
isDelete = deleteArgs.deletedRecords[parseInt(a.toString(), 10)][fields.id] !== parentEvent[fields.id];
|
|
15587
15588
|
}
|
|
15588
15589
|
if (isDelete) {
|
|
15590
|
+
if (deleteArgs.deletedRecords instanceof Array) {
|
|
15591
|
+
for (const event of deleteArgs.deletedRecords) {
|
|
15592
|
+
this.parent.eventBase.processTimezone(event, true);
|
|
15593
|
+
}
|
|
15594
|
+
}
|
|
15589
15595
|
editParams.deletedRecords.push(deleteArgs.deletedRecords[parseInt(a.toString(), 10)]);
|
|
15590
15596
|
}
|
|
15591
15597
|
}
|
|
15592
15598
|
const promise = this.parent.dataModule.dataManager.saveChanges(editParams, fields.id, this.getTable(), this.getQuery());
|
|
15593
|
-
|
|
15599
|
+
const cloneEvent = extend({}, deleteArgs.deletedRecords[deleteArgs.deletedRecords.length - 1], null, true);
|
|
15600
|
+
this.parent.eventBase.selectWorkCellByTime([this.parent.eventBase.processTimezone(cloneEvent)]);
|
|
15594
15601
|
const crudArgs = {
|
|
15595
15602
|
requestType: 'eventRemoved', cancel: false, data: deleteArgs.deletedRecords, promise: promise, editParams: editParams
|
|
15596
15603
|
};
|
|
@@ -21213,16 +21220,12 @@ class Resize extends ActionBase {
|
|
|
21213
21220
|
}
|
|
21214
21221
|
else {
|
|
21215
21222
|
const cellWidth = this.actionObj.cellWidth;
|
|
21216
|
-
cellIndex = isLeft ? Math.
|
|
21223
|
+
cellIndex = isLeft ? Math.round(offset / this.actionObj.cellWidth) :
|
|
21217
21224
|
Math.ceil((offset + (this.parent.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
21218
21225
|
if (this.parent.enableRtl) {
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
cellOffsetWidth = this.actionObj.cellWidth;
|
|
21223
|
-
}
|
|
21224
|
-
const offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
21225
|
-
this.actionObj.cellWidth) + (isLeft ? 0 : this.parent.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
21226
|
+
const offsetWidth = (Math.round(offset / this.actionObj.cellWidth) *
|
|
21227
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : (this.parent.getElementWidth(this.actionObj.clone) -
|
|
21228
|
+
this.actionObj.cellWidth));
|
|
21226
21229
|
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
21227
21230
|
}
|
|
21228
21231
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -21243,11 +21246,11 @@ class Resize extends ActionBase {
|
|
|
21243
21246
|
if (!isLeft) {
|
|
21244
21247
|
offset += this.parent.getElementWidth(this.actionObj.clone);
|
|
21245
21248
|
}
|
|
21246
|
-
let spanMinutes = Math.
|
|
21249
|
+
let spanMinutes = Math.floor((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
21247
21250
|
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
21248
21251
|
spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
|
|
21249
21252
|
resizeTime = new Date(resizeDate.getTime());
|
|
21250
|
-
resizeTime
|
|
21253
|
+
resizeTime = new Date(resizeDate.getTime() + (spanMinutes * MS_PER_MINUTE));
|
|
21251
21254
|
this.updateTimePosition(resizeTime);
|
|
21252
21255
|
}
|
|
21253
21256
|
}
|
|
@@ -21317,11 +21320,12 @@ class Resize extends ActionBase {
|
|
|
21317
21320
|
const slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
|
|
21318
21321
|
const pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
|
|
21319
21322
|
const targetWidth = isTimelineView ?
|
|
21320
|
-
(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
21323
|
+
Math.round(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
21321
21324
|
this.parent.currentView === 'Month' ? this.parent.getElementWidth(this.actionObj.element) :
|
|
21322
21325
|
Math.ceil(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
21323
21326
|
let offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
|
|
21324
|
-
|
|
21327
|
+
let left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
|
|
21328
|
+
left = Math.round(left / slotInterval) * slotInterval;
|
|
21325
21329
|
if (isTimeViews) {
|
|
21326
21330
|
offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
|
|
21327
21331
|
if (!isLeft) {
|
|
@@ -21340,6 +21344,7 @@ class Resize extends ActionBase {
|
|
|
21340
21344
|
-(offsetWidth - this.actionObj.cellWidth);
|
|
21341
21345
|
rightValue = isTimelineView ? rightValue : isLeft ? 0 : rightValue > 0 ? 0 : rightValue;
|
|
21342
21346
|
if (isTimelineView && !isLeft) {
|
|
21347
|
+
rightValue = Math.round(rightValue / slotInterval) * slotInterval;
|
|
21343
21348
|
rightValue = rightValue - (Math.ceil((this.actionObj.pageX - this.actionObj.X) / slotInterval) * slotInterval);
|
|
21344
21349
|
if (rightValue < 0) {
|
|
21345
21350
|
rightValue = parseInt(this.actionObj.clone.style.right, 10);
|
|
@@ -24349,9 +24354,16 @@ class VerticalView extends ViewBase {
|
|
|
24349
24354
|
const endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
|
|
24350
24355
|
const diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
24351
24356
|
const hoursRange = getStartEndHours(resetTime(new Date(date.getTime())), startHour, endHour);
|
|
24352
|
-
const
|
|
24353
|
-
|
|
24354
|
-
|
|
24357
|
+
const totalMinutes = (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
|
|
24358
|
+
const timescaleInterval = this.parent.activeViewOptions.timeScale.interval;
|
|
24359
|
+
let interval = 0;
|
|
24360
|
+
if (startHour.getHours() === 0 && startHour.getMinutes() === 0 && endHour.getHours() === 0 && endHour.getMinutes() === 0) {
|
|
24361
|
+
interval = timescaleInterval;
|
|
24362
|
+
}
|
|
24363
|
+
else {
|
|
24364
|
+
interval = (this.parent.activeViewOptions.timeScale.slotCount !== 1) ? timescaleInterval :
|
|
24365
|
+
(timescaleInterval > totalMinutes ? totalMinutes : timescaleInterval);
|
|
24366
|
+
}
|
|
24355
24367
|
return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) / interval;
|
|
24356
24368
|
}
|
|
24357
24369
|
getWorkCellHeight() {
|
|
@@ -26969,7 +26981,7 @@ class MonthAgenda extends Month {
|
|
|
26969
26981
|
return 'abbreviated';
|
|
26970
26982
|
}
|
|
26971
26983
|
updateSelectedCellClass(data) {
|
|
26972
|
-
if (resetTime(data.date).getTime() === resetTime(this.
|
|
26984
|
+
if (resetTime(data.date).getTime() === resetTime(new Date('' + this.parent.selectedDate)).getTime()) {
|
|
26973
26985
|
data.className.push(SELECTED_CELL_CLASS);
|
|
26974
26986
|
}
|
|
26975
26987
|
}
|