@syncfusion/ej2-schedule 20.4.42 → 20.4.44

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.42
3
+ * version : 20.4.44
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@20.4.40",
3
+ "_id": "@syncfusion/ej2-schedule@20.4.43",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-9rsvmSZiEnAoFmsqayqrhXwZQK3ISXuH9kztAub0i6kH7cph8UafC2VkbpClrP3xLbzm835csRxsj0X0zhekNg==",
5
+ "_integrity": "sha512-jL9idJQb54yB1L7lWEXeWZ6Dzpog5IPX6OOv4Pratf4S+WWObKIEM9obFKE3czX2qjmukBWuBSzpmSL8RZdOmg==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-schedule",
24
24
  "/@syncfusion/ej2-vue-schedule"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.4.40.tgz",
27
- "_shasum": "dce137821e239cbe7a7c49223badbe8bbbf9414f",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.4.43.tgz",
27
+ "_shasum": "caeedb206a05f648deba6c92fb59c4f6decfe438",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.4.42",
39
- "@syncfusion/ej2-buttons": "~20.4.42",
40
- "@syncfusion/ej2-calendars": "~20.4.42",
41
- "@syncfusion/ej2-data": "~20.4.42",
42
- "@syncfusion/ej2-dropdowns": "~20.4.42",
38
+ "@syncfusion/ej2-base": "~20.4.44",
39
+ "@syncfusion/ej2-buttons": "~20.4.44",
40
+ "@syncfusion/ej2-calendars": "~20.4.44",
41
+ "@syncfusion/ej2-data": "~20.4.44",
42
+ "@syncfusion/ej2-dropdowns": "~20.4.43",
43
43
  "@syncfusion/ej2-excel-export": "~20.4.42",
44
44
  "@syncfusion/ej2-inputs": "~20.4.42",
45
45
  "@syncfusion/ej2-lists": "~20.4.42",
46
- "@syncfusion/ej2-navigations": "~20.4.42",
47
- "@syncfusion/ej2-popups": "~20.4.42"
46
+ "@syncfusion/ej2-navigations": "~20.4.44",
47
+ "@syncfusion/ej2-popups": "~20.4.44"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "20.4.42",
76
+ "version": "20.4.44",
77
77
  "sideEffects": false
78
78
  }
@@ -890,10 +890,11 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
890
890
  /**
891
891
  * Method to render react templates
892
892
  *
893
+ * @param {Function} callBack - specifies the callBack method
893
894
  * @returns {void}
894
895
  * @private
895
896
  */
896
- renderTemplates(): void;
897
+ renderTemplates(callback?: Function): void;
897
898
  /**
898
899
  * Method to reset react templates
899
900
  *
@@ -135,12 +135,16 @@ var Schedule = /** @class */ (function (_super) {
135
135
  /**
136
136
  * Method to render react templates
137
137
  *
138
+ * @param {Function} callBack - specifies the callBack method
138
139
  * @returns {void}
139
140
  * @private
140
141
  */
141
- Schedule.prototype.renderTemplates = function () {
142
+ Schedule.prototype.renderTemplates = function (callback) {
142
143
  if (this.isReact) {
143
- this.renderReactTemplates();
144
+ this.renderReactTemplates(callback);
145
+ }
146
+ else if (callback) {
147
+ callback();
144
148
  }
145
149
  };
146
150
  /**
@@ -55,7 +55,6 @@ var AgendaBase = /** @class */ (function (_super) {
55
55
  'role': 'button',
56
56
  'tabindex': '0',
57
57
  'aria-disabled': _this.parent.eventBase.getReadonlyAttribute(listData[parseInt(li.toString(), 10)]),
58
- 'aria-pressed': 'false',
59
58
  'aria-label': _this.parent.getAnnouncementString(listData[parseInt(li.toString(), 10)])
60
59
  }
61
60
  });
@@ -520,20 +520,12 @@ var EventBase = /** @class */ (function () {
520
520
  };
521
521
  EventBase.prototype.removeSelectedAppointmentClass = function () {
522
522
  var selectedAppointments = this.getSelectedAppointments();
523
- for (var _i = 0, selectedAppointments_1 = selectedAppointments; _i < selectedAppointments_1.length; _i++) {
524
- var appointment = selectedAppointments_1[_i];
525
- appointment.setAttribute('aria-pressed', 'false');
526
- }
527
523
  removeClass(selectedAppointments, cls.APPOINTMENT_BORDER);
528
524
  if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
529
525
  removeClass(selectedAppointments, cls.AGENDA_SELECTED_CELL);
530
526
  }
531
527
  };
532
528
  EventBase.prototype.addSelectedAppointments = function (cells) {
533
- for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
534
- var cell = cells_1[_i];
535
- cell.setAttribute('aria-pressed', 'true');
536
- }
537
529
  if (this.parent.currentView !== 'MonthAgenda') {
538
530
  this.parent.removeSelectedClass();
539
531
  }
@@ -1097,7 +1089,7 @@ var EventBase = /** @class */ (function () {
1097
1089
  className: cls.BLOCK_APPOINTMENT_CLASS,
1098
1090
  attrs: {
1099
1091
  'data-id': 'Appointment_' + record[this.parent.eventFields.id],
1100
- 'aria-disabled': 'true', 'aria-pressed': 'false'
1092
+ 'aria-disabled': 'true'
1101
1093
  }
1102
1094
  });
1103
1095
  var templateElement;
@@ -379,7 +379,7 @@ var MonthEvent = /** @class */ (function (_super) {
379
379
  var attrs = {
380
380
  'data-id': 'Appointment_' + record[this.fields.id],
381
381
  'role': 'button', 'tabindex': '0',
382
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
382
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
383
383
  'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
384
384
  };
385
385
  if (!isCloneElement) {
@@ -321,7 +321,6 @@ var VerticalEvent = /** @class */ (function (_super) {
321
321
  'role': 'button',
322
322
  'tabindex': '0',
323
323
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
324
- 'aria-pressed': 'false',
325
324
  'aria-label': this.parent.getAnnouncementString(record)
326
325
  }
327
326
  });
@@ -377,7 +377,7 @@ var YearEvent = /** @class */ (function (_super) {
377
377
  'data-id': 'Appointment_' + record[this.fields.id],
378
378
  'data-guid': record.Guid,
379
379
  'role': 'button', 'tabindex': '0',
380
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
380
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
381
381
  'aria-label': this.parent.getAnnouncementString(record)
382
382
  }
383
383
  });
@@ -99,13 +99,8 @@ var EventTooltip = /** @class */ (function () {
99
99
  startMonthDate = util.capitalizeFirstWord(startMonthDate, 'single');
100
100
  startMonthYearDate = util.capitalizeFirstWord(startMonthYearDate, 'single');
101
101
  endMonthYearDate = util.capitalizeFirstWord(endMonthYearDate, 'single');
102
- var skeleton = 'short';
103
- var startTime = globalize.formatDate(eventStart, {
104
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
105
- });
106
- var endTime = globalize.formatDate(eventEnd, {
107
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
108
- });
102
+ var startTime = this.parent.getTimeString(eventStart);
103
+ var endTime = this.parent.getTimeString(eventEnd);
109
104
  var tooltipDetails = void 0;
110
105
  if (startDate.getTime() === endDate.getTime()) {
111
106
  tooltipDetails =
@@ -244,6 +244,7 @@ var EventWindow = /** @class */ (function () {
244
244
  return container;
245
245
  };
246
246
  EventWindow.prototype.renderFormElements = function (form, args) {
247
+ var _this = this;
247
248
  if (!isNullOrUndefined(this.parent.editorTemplate)) {
248
249
  if (args) {
249
250
  if (this.recurrenceEditor) {
@@ -260,8 +261,9 @@ var EventWindow = /** @class */ (function () {
260
261
  var templateId = this.parent.element.id + '_editorTemplate';
261
262
  var tempEle = [].slice.call(this.parent.getEditorTemplate()(args || {}, this.parent, 'editorTemplate', templateId, false));
262
263
  append(tempEle, form);
263
- this.parent.renderTemplates();
264
- this.applyFormValidation();
264
+ this.parent.renderTemplates(function () {
265
+ _this.applyFormValidation();
266
+ });
265
267
  }
266
268
  else {
267
269
  form.appendChild(this.getDefaultEventWindowContent());
@@ -1207,7 +1209,9 @@ var EventWindow = /** @class */ (function () {
1207
1209
  }
1208
1210
  }
1209
1211
  if (this.recurrenceEditor && this.recurrenceEditor.value && this.recurrenceEditor.value !== '') {
1210
- alertType = this.recurrenceValidation(eventObj[this.fields.startTime], eventObj[this.fields.endTime], alert);
1212
+ if (this.parent.currentAction !== 'EditOccurrence') {
1213
+ alertType = this.recurrenceValidation(eventObj[this.fields.startTime], eventObj[this.fields.endTime], alert);
1214
+ }
1211
1215
  var isShowAlert = true;
1212
1216
  if (alertType === 'seriesChangeAlert' && this.parent.uiStateValues.isIgnoreOccurrence) {
1213
1217
  isShowAlert = false;
@@ -1440,53 +1444,58 @@ var EventWindow = /** @class */ (function () {
1440
1444
  if (isNullOrUndefined(index)) {
1441
1445
  return false;
1442
1446
  }
1447
+ var currentStartTime = new Date(+currentData[this.fields.startTime]);
1448
+ var currentEndTime = new Date(+currentData[this.fields.endTime]);
1449
+ if (index !== recurColl.length - 1) {
1450
+ var nextStartTime = new Date(+recurColl[index + 1][this.fields.startTime]);
1451
+ var nextEndTime = new Date(+recurColl[index + 1][this.fields.endTime]);
1452
+ }
1453
+ var lastEndTime = new Date(+recurColl[recurColl.length - 1][this.fields.endTime]);
1443
1454
  if (index === 0) {
1444
1455
  if (!isNullOrUndefined(recurColl[index + 1])) {
1445
- if (!(util.resetTime(new Date(+recurColl[index + 1][this.fields.startTime])).getTime() >
1446
- util.resetTime(new Date(+currentData[this.fields.endTime])).getTime()) &&
1447
- (util.resetTime(new Date(+recurColl[recurColl.length - 1][this.fields.endTime])).getTime() >=
1448
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime())) {
1449
- this.parent.quickPopup.openRecurrenceValidationAlert('sameDayAlert');
1456
+ if (!(nextStartTime.getTime() >= currentEndTime.getTime()) &&
1457
+ (util.resetTime(lastEndTime).getTime() >=
1458
+ util.resetTime(currentStartTime).getTime()) ||
1459
+ util.resetTime(lastEndTime).getTime() < util.resetTime(currentStartTime).getTime()) {
1460
+ this.parent.quickPopup.openRecurrenceValidationAlert('occurrenceAlert');
1450
1461
  return true;
1451
1462
  }
1452
- else if (util.resetTime(new Date(+recurColl[recurColl.length - 1][this.fields.endTime])).getTime() <
1453
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime()) {
1454
- this.parent.quickPopup.openRecurrenceValidationAlert('occurrenceAlert');
1463
+ else if (!(util.resetTime(currentStartTime).getTime() <
1464
+ util.resetTime(nextStartTime).getTime())) {
1465
+ this.parent.quickPopup.openRecurrenceValidationAlert('sameDayAlert');
1455
1466
  return true;
1456
1467
  }
1457
1468
  }
1458
1469
  return false;
1459
1470
  }
1460
1471
  else {
1472
+ var previousStartTime = new Date(+recurColl[index - 1][this.fields.startTime]);
1473
+ var previousEndTime = new Date(+recurColl[index - 1][this.fields.endTime]);
1461
1474
  if (index === recurColl.length - 1) {
1462
- if (!(util.resetTime(new Date(+recurColl[index - 1][this.fields.endTime])).getTime() <
1463
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime()) &&
1464
- (util.resetTime(new Date(+recurColl[(recurColl.length - 1) - index][this.fields.startTime])).getTime() <=
1465
- util.resetTime(new Date(+currentData[this.fields.endTime])).getTime())) {
1466
- this.parent.quickPopup.openRecurrenceValidationAlert('sameDayAlert');
1475
+ if (util.resetTime(new Date(+recurColl[(recurColl.length - 1) - index][this.fields.startTime])).getTime() >
1476
+ util.resetTime(currentStartTime).getTime()) {
1477
+ this.parent.quickPopup.openRecurrenceValidationAlert('occurrenceAlert');
1467
1478
  return true;
1468
1479
  }
1469
- else if (util.resetTime(new Date(+recurColl[(recurColl.length - 1) - index][this.fields.endTime])).getTime() >
1470
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime()) {
1471
- this.parent.quickPopup.openRecurrenceValidationAlert('occurrenceAlert');
1480
+ else if (!((previousEndTime.getTime() <= currentStartTime.getTime()) &&
1481
+ (util.resetTime(currentStartTime).getTime() > util.resetTime(previousStartTime).getTime()))) {
1482
+ this.parent.quickPopup.openRecurrenceValidationAlert('sameDayAlert');
1472
1483
  return true;
1473
1484
  }
1474
1485
  }
1475
- else if (!(((util.resetTime(new Date(+recurColl[index - 1][this.fields.endTime])).getTime() <
1476
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime()) ||
1477
- (util.resetTime(new Date(+recurColl[0][this.fields.startTime])).getTime() >
1478
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime())) &&
1479
- ((util.resetTime(new Date(+recurColl[index + 1][this.fields.startTime])).getTime() >
1480
- util.resetTime(new Date(+currentData[this.fields.endTime])).getTime()) ||
1481
- (util.resetTime(new Date(+recurColl[recurColl.length - 1][this.fields.endTime])).getTime() <
1482
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime())))) {
1486
+ else if (!(((util.resetTime(previousStartTime).getTime() < util.resetTime(currentStartTime).getTime()) ||
1487
+ util.resetTime(new Date(+recurColl[0][this.fields.startTime])).getTime() >
1488
+ util.resetTime(currentStartTime).getTime()) &&
1489
+ ((util.resetTime(nextStartTime).getTime() > util.resetTime(currentStartTime).getTime()) ||
1490
+ (lastEndTime.getTime() < currentStartTime.getTime())))) {
1483
1491
  this.parent.quickPopup.openRecurrenceValidationAlert('sameDayAlert');
1484
1492
  return true;
1485
1493
  }
1486
- else if ((util.resetTime(new Date(+recurColl[index + 1][this.fields.endTime])).getTime() <
1487
- util.resetTime(new Date(+currentData[this.fields.startTime])).getTime()) ||
1488
- (util.resetTime(new Date(+recurColl[index - 1][this.fields.startTime])).getTime() >
1489
- util.resetTime(new Date(+currentData[this.fields.endTime])).getTime())) {
1494
+ else if (!(previousEndTime.getTime() <= currentStartTime.getTime() && nextStartTime.getTime() >
1495
+ currentEndTime.getTime()) || (util.resetTime(nextEndTime).getTime() <
1496
+ util.resetTime(currentStartTime).getTime()) ||
1497
+ (util.resetTime(previousStartTime).getTime() > util.resetTime(currentEndTime).getTime()) ||
1498
+ !(util.resetTime(currentStartTime).getTime() < util.resetTime(nextStartTime).getTime())) {
1490
1499
  this.parent.quickPopup.openRecurrenceValidationAlert('occurrenceAlert');
1491
1500
  return true;
1492
1501
  }
@@ -319,7 +319,7 @@ var QuickPopups = /** @class */ (function () {
319
319
  'data-id': '' + eventData[fields.id],
320
320
  'data-guid': eventData.Guid, 'role': 'button', 'tabindex': '0',
321
321
  'aria-disabled': this_1.parent.eventBase.getReadonlyAttribute(eventData),
322
- 'aria-pressed': 'false', 'aria-label': this_1.parent.getAnnouncementString(eventData)
322
+ 'aria-label': this_1.parent.getAnnouncementString(eventData)
323
323
  }
324
324
  });
325
325
  var templateElement = void 0;
@@ -393,7 +393,7 @@ var QuickPopups = /** @class */ (function () {
393
393
  if (deleteIcon) {
394
394
  this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.DELETE_ICON_CLASS, deleteAction, deleteIcon, this.deleteClick);
395
395
  }
396
- this.beforeQuickPopupOpen(target);
396
+ this.beforeQuickPopupOpen(target, e);
397
397
  };
398
398
  QuickPopups.prototype.isCellBlocked = function (args) {
399
399
  var tempObj = {};
@@ -480,7 +480,7 @@ var QuickPopups = /** @class */ (function () {
480
480
  this.quickPopup.content = quickCellPopup;
481
481
  this.quickPopup.relateTo = target;
482
482
  this.quickPopup.dataBind();
483
- this.beforeQuickPopupOpen(target);
483
+ this.beforeQuickPopupOpen(target, args.event);
484
484
  };
485
485
  QuickPopups.prototype.isSameEventClick = function (events) {
486
486
  var isSameTarget = this.quickPopup.relateTo === closest(events.element, '.' + cls.APPOINTMENT_CLASS);
@@ -557,7 +557,7 @@ var QuickPopups = /** @class */ (function () {
557
557
  this.quickPopup.relateTo = this.parent.isAdaptive ? document.body :
558
558
  closest(events.element, '.' + cls.APPOINTMENT_CLASS);
559
559
  this.quickPopup.dataBind();
560
- this.beforeQuickPopupOpen(events.element);
560
+ this.beforeQuickPopupOpen(events.element, events.originalEvent);
561
561
  }
562
562
  };
563
563
  QuickPopups.prototype.getPopupHeader = function (headerType, headerData) {
@@ -838,15 +838,16 @@ var QuickPopups = /** @class */ (function () {
838
838
  this.morePopup.relateTo = closest(target, '.' + cls.WORK_CELLS_CLASS);
839
839
  }
840
840
  }
841
- this.parent.renderTemplates();
842
- var eventProp = {
843
- type: 'EventContainer', cancel: false,
844
- element: this.morePopup.element, data: data
845
- };
846
- this.parent.trigger(event.popupOpen, eventProp, function (popupArgs) {
847
- if (!popupArgs.cancel) {
848
- _this.morePopup.show();
849
- }
841
+ this.parent.renderTemplates(function () {
842
+ var eventProp = {
843
+ type: 'EventContainer', cancel: false,
844
+ element: _this.morePopup.element, data: data
845
+ };
846
+ _this.parent.trigger(event.popupOpen, eventProp, function (popupArgs) {
847
+ if (!popupArgs.cancel) {
848
+ _this.morePopup.show();
849
+ }
850
+ });
850
851
  });
851
852
  };
852
853
  QuickPopups.prototype.saveClick = function (event) {
@@ -1037,71 +1038,95 @@ var QuickPopups = /** @class */ (function () {
1037
1038
  }
1038
1039
  });
1039
1040
  };
1040
- QuickPopups.prototype.beforeQuickPopupOpen = function (target) {
1041
+ QuickPopups.prototype.beforeQuickPopupOpen = function (target, originalEvent) {
1041
1042
  var _this = this;
1042
- this.parent.renderTemplates();
1043
- var isEventPopup = this.quickPopup.element.querySelector('.' + cls.EVENT_POPUP_CLASS);
1044
- var popupType = this.parent.isAdaptive ? isEventPopup ? 'ViewEventInfo' : 'EditEventInfo' : 'QuickInfo';
1045
- var eventProp = {
1046
- type: popupType, cancel: false, data: extend({}, this.getDataFromTarget(target), null, true),
1047
- target: target, element: this.quickPopup.element
1048
- };
1049
- this.parent.trigger(event.popupOpen, eventProp, function (popupArgs) {
1050
- if (popupArgs.cancel) {
1051
- _this.quickPopupHide();
1052
- _this.destroyPopupButtons('quickPopup');
1053
- if (popupArgs.element.classList.contains(cls.POPUP_OPEN)) {
1054
- _this.quickPopupClose();
1055
- }
1056
- util.removeChildren(_this.quickPopup.element);
1057
- _this.isMultipleEventSelect = false;
1058
- }
1059
- else {
1060
- var display = _this.quickPopup.element.style.display;
1061
- _this.quickPopup.element.style.display = 'block';
1062
- if (_this.parent.isAdaptive) {
1063
- _this.quickPopup.element.removeAttribute('style');
1064
- _this.quickPopup.element.style.display = 'block';
1065
- _this.quickPopup.element.style.height = formatUnit((popupType === 'EditEventInfo') ? 65 : window.innerHeight);
1043
+ this.parent.renderTemplates(function () {
1044
+ var isEventPopup = _this.quickPopup.element.querySelector('.' + cls.EVENT_POPUP_CLASS);
1045
+ var popupType = _this.parent.isAdaptive ? isEventPopup ? 'ViewEventInfo' : 'EditEventInfo' : 'QuickInfo';
1046
+ var eventProp = {
1047
+ type: popupType, cancel: false, data: extend({}, _this.getDataFromTarget(target), null, true),
1048
+ target: target, element: _this.quickPopup.element
1049
+ };
1050
+ _this.parent.trigger(event.popupOpen, eventProp, function (popupArgs) {
1051
+ if (popupArgs.cancel) {
1052
+ _this.quickPopupHide();
1053
+ _this.destroyPopupButtons('quickPopup');
1054
+ if (popupArgs.element.classList.contains(cls.POPUP_OPEN)) {
1055
+ _this.quickPopupClose();
1056
+ }
1057
+ util.removeChildren(_this.quickPopup.element);
1058
+ _this.isMultipleEventSelect = false;
1066
1059
  }
1067
1060
  else {
1068
- var isVirtualScroll = _this.parent.virtualScrollModule && _this.parent.virtualScrollModule.isHorizontalScroll
1069
- && !isNullOrUndefined(closest(target, '.' + cls.CONTENT_TABLE_CLASS));
1070
- var conTable = _this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS + ' table');
1071
- _this.quickPopup.offsetX = isVirtualScroll && !_this.parent.enableRtl ? (util.getTranslateX(conTable) + 10) : 10;
1072
- _this.quickPopup.collision = { X: _this.parent.enableRtl ? 'flip' : 'none', Y: 'fit' };
1073
- _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: _this.parent.enableRtl ? 'bottom' : 'top' };
1074
- _this.quickPopup.dataBind();
1075
- _this.quickPopup.refreshPosition(null, true);
1076
- var collide = isCollide(_this.quickPopup.element, _this.parent.element);
1077
- if (collide.indexOf(_this.parent.enableRtl ? 'left' : 'right') > -1) {
1078
- _this.quickPopup.offsetX = -target.offsetWidth - 10 - _this.quickPopup.element.offsetWidth;
1079
- if (isVirtualScroll && !_this.parent.enableRtl) {
1080
- _this.quickPopup.offsetX = util.getTranslateX(conTable) + _this.quickPopup.offsetX;
1081
- }
1061
+ var display = _this.quickPopup.element.style.display;
1062
+ _this.quickPopup.element.style.display = 'block';
1063
+ if (_this.parent.isAdaptive) {
1064
+ _this.quickPopup.element.removeAttribute('style');
1065
+ _this.quickPopup.element.style.display = 'block';
1066
+ _this.quickPopup.element.style.height = formatUnit((popupType === 'EditEventInfo') ? 65 : window.innerHeight);
1067
+ }
1068
+ else {
1069
+ var isVirtualScroll = _this.parent.virtualScrollModule && _this.parent.virtualScrollModule.isHorizontalScroll
1070
+ && !isNullOrUndefined(closest(target, '.' + cls.CONTENT_TABLE_CLASS));
1071
+ var conTable = _this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS + ' table');
1072
+ _this.quickPopup.offsetX = isVirtualScroll && !_this.parent.enableRtl ? (util.getTranslateX(conTable) + 10) : 10;
1073
+ _this.quickPopup.offsetY = _this.parent.virtualScrollModule && !_this.parent.virtualScrollModule.isHorizontalScroll ?
1074
+ _this.quickPopup.offsetY : 0;
1075
+ _this.quickPopup.collision = { X: _this.parent.enableRtl ? 'flip' : 'none', Y: 'fit' };
1076
+ _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: _this.parent.enableRtl ? 'bottom' : 'top' };
1082
1077
  _this.quickPopup.dataBind();
1083
1078
  _this.quickPopup.refreshPosition(null, true);
1084
- var leftCollide = isCollide(_this.quickPopup.element, _this.parent.element);
1085
- if (leftCollide.indexOf('left') > -1) {
1086
- _this.quickPopup.position = { X: 'center', Y: 'center' };
1087
- _this.quickPopup.collision = { X: 'fit', Y: 'fit' };
1088
- _this.quickPopup.offsetX = -(_this.quickPopup.element.offsetWidth / 2);
1079
+ var collide = isCollide(_this.quickPopup.element, _this.parent.element);
1080
+ if (collide.indexOf(_this.parent.enableRtl ? 'left' : 'right') > -1) {
1081
+ _this.quickPopup.offsetX = -target.offsetWidth - 10 - _this.quickPopup.element.offsetWidth;
1082
+ if (isVirtualScroll && !_this.parent.enableRtl) {
1083
+ _this.quickPopup.offsetX = util.getTranslateX(conTable) + _this.quickPopup.offsetX;
1084
+ }
1089
1085
  _this.quickPopup.dataBind();
1086
+ _this.quickPopup.refreshPosition(null, true);
1087
+ var leftCollide = isCollide(_this.quickPopup.element, _this.parent.element);
1088
+ if (leftCollide.indexOf('left') > -1) {
1089
+ _this.quickPopup.position = { X: 'center', Y: 'center' };
1090
+ _this.quickPopup.collision = { X: 'fit', Y: 'fit' };
1091
+ _this.quickPopup.offsetX = -(_this.quickPopup.element.offsetWidth / 2);
1092
+ _this.quickPopup.dataBind();
1093
+ }
1094
+ }
1095
+ if (_this.parent.virtualScrollModule && !_this.parent.virtualScrollModule.isHorizontalScroll && (collide.indexOf('top') > -1 || collide.indexOf('bottom') > -1)) {
1096
+ var translateY = util.getTranslateY(conTable);
1097
+ _this.quickPopup.offsetY = translateY;
1098
+ _this.quickPopup.dataBind();
1099
+ _this.quickPopup.refreshPosition(null, true);
1100
+ }
1101
+ if (_this.quickPopup.position.X === 'center' && _this.quickPopup.position.Y === 'center' && !isNullOrUndefined(originalEvent)) {
1102
+ var previousOffset = _this.quickPopup.offsetY;
1103
+ var collision = isCollide(target, _this.quickPopup.element);
1104
+ var popupRect = _this.quickPopup.element.getBoundingClientRect();
1105
+ if (collision.indexOf('top') > -1 || collision.indexOf('bottom') > -1) {
1106
+ if (popupRect.top <= originalEvent.clientY && originalEvent.clientY <= popupRect.top + popupRect.height) {
1107
+ _this.quickPopup.offsetY = previousOffset - popupRect.height - 10;
1108
+ _this.quickPopup.dataBind();
1109
+ collision = isCollide(_this.quickPopup.element, _this.parent.element);
1110
+ if (collision.indexOf('top') > -1) {
1111
+ _this.quickPopup.offsetY = previousOffset + originalEvent.offsetY;
1112
+ _this.quickPopup.dataBind();
1113
+ }
1114
+ }
1115
+ else if (isCollide(_this.quickPopup.element, _this.parent.element).indexOf('bottom') > -1) {
1116
+ _this.quickPopup.offsetY = previousOffset - originalEvent.offsetY - Math.ceil(popupRect.height) - 10;
1117
+ _this.quickPopup.dataBind();
1118
+ }
1119
+ }
1090
1120
  }
1091
1121
  }
1092
- if (_this.parent.virtualScrollModule && !_this.parent.virtualScrollModule.isHorizontalScroll && (collide.indexOf('top') > -1 || collide.indexOf('bottom') > -1)) {
1093
- var translateY = util.getTranslateY(conTable);
1094
- _this.quickPopup.offsetY = translateY;
1095
- _this.quickPopup.dataBind();
1122
+ if (isEventPopup) {
1123
+ _this.applyEventColor();
1096
1124
  }
1125
+ _this.quickPopup.element.style.display = display;
1126
+ _this.quickPopup.dataBind();
1127
+ _this.quickPopup.show();
1097
1128
  }
1098
- if (isEventPopup) {
1099
- _this.applyEventColor();
1100
- }
1101
- _this.quickPopup.element.style.display = display;
1102
- _this.quickPopup.dataBind();
1103
- _this.quickPopup.show();
1104
- }
1129
+ });
1105
1130
  });
1106
1131
  };
1107
1132
  QuickPopups.prototype.applyEventColor = function () {