@syncfusion/ej2-schedule 21.2.5 → 21.2.9

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.
@@ -1121,7 +1121,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1121
1121
  }
1122
1122
  else {
1123
1123
  var text = this.parent.activeView.getDateRangeText(date);
1124
- selEle.setAttribute('aria-label', text);
1124
+ selEle.firstElementChild.setAttribute('aria-label', text);
1125
1125
  textEle.textContent = text;
1126
1126
  }
1127
1127
  this.refresh();
@@ -1152,16 +1152,16 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1152
1152
  var items = [];
1153
1153
  items.push({
1154
1154
  align: 'Left', prefixIcon: 'e-icon-prev', tooltipText: 'Previous', overflow: 'Show',
1155
- cssClass: 'e-prev', htmlAttributes: { 'aria-label': 'previous period', 'role': 'navigation' }
1155
+ cssClass: 'e-prev', htmlAttributes: { 'role': 'navigation' }
1156
1156
  });
1157
1157
  items.push({
1158
1158
  align: 'Left', prefixIcon: 'e-icon-next', tooltipText: 'Next', overflow: 'Show',
1159
- cssClass: 'e-next', htmlAttributes: { 'aria-label': 'next period', 'role': 'navigation' }
1159
+ cssClass: 'e-next', htmlAttributes: { 'role': 'navigation' }
1160
1160
  });
1161
1161
  items.push({
1162
1162
  align: 'Left', text: this.getDateRangeText(), suffixIcon: 'e-icon-down-arrow', cssClass: 'e-date-range',
1163
1163
  overflow: 'Show',
1164
- htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'title', 'role': 'navigation' }
1164
+ htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'role': 'navigation' }
1165
1165
  });
1166
1166
  if (this.parent.isAdaptive || this.parent.enableAdaptiveUI) {
1167
1167
  items.push({
@@ -8181,7 +8181,8 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8181
8181
  if (this.parent.activeViewOptions.headerRows.length > 0 &&
8182
8182
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
8183
8183
  this.renderType = 'day';
8184
- this.cellWidth = this.content.offsetWidth / this.dateRender.length;
8184
+ var workCell = this.content.querySelector('.' + WORK_CELLS_CLASS);
8185
+ this.cellWidth = workCell.getBoundingClientRect().width / +(workCell.getAttribute('colspan') || 1);
8185
8186
  this.slotsPerDay = 1;
8186
8187
  }
8187
8188
  else {
@@ -8386,7 +8387,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8386
8387
  TimelineEvent.prototype.renderTimelineMoreIndicator = function (startTime, startDate, endDate, appHeight, interval, resIndex, appointmentsList, top, appLeft, appRight, cellTd, moreIndicator, appPos, position) {
8387
8388
  appLeft = (this.parent.enableRtl) ? appRight = position : position;
8388
8389
  appPos = (this.parent.enableRtl) ? appRight : appLeft;
8389
- appPos = (Math.round(appPos / this.cellWidth) * this.cellWidth);
8390
+ appPos = (Math.floor(appPos / this.cellWidth) * this.cellWidth);
8390
8391
  if ((cellTd && isNullOrUndefined(moreIndicator)) ||
8391
8392
  (!this.isAlreadyAvail(appPos, cellTd))) {
8392
8393
  var startDateTime = (this.parent.activeViewOptions.option === 'TimelineMonth' || this.renderType === 'day') ? new Date(+startTime) : startDate;
@@ -8413,8 +8414,8 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8413
8414
  }
8414
8415
  moreIndicatorElement.style.top = top + appArea + 'px';
8415
8416
  moreIndicatorElement.style.width = this.cellWidth + 'px';
8416
- moreIndicatorElement.style.left = ((appLeft / this.cellWidth) * this.cellWidth) + 'px';
8417
- moreIndicatorElement.style.right = ((appRight / this.cellWidth) * this.cellWidth) + 'px';
8417
+ moreIndicatorElement.style.left = (Math.floor(appLeft / this.cellWidth) * this.cellWidth) + 'px';
8418
+ moreIndicatorElement.style.right = (Math.floor(appRight / this.cellWidth) * this.cellWidth) + 'px';
8418
8419
  this.renderElement(cellTd, moreIndicatorElement);
8419
8420
  EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
8420
8421
  }
@@ -9236,13 +9237,6 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9236
9237
  this.quickDialog.content = this.l10n.getConstant('editContent');
9237
9238
  this.quickDialog.header = this.l10n.getConstant(this.parent.currentAction === 'Delete' ? 'deleteTitle' : 'editTitle');
9238
9239
  this.quickDialogClass('Recurrence');
9239
- var activeEvent = this.parent.activeEventData.event;
9240
- if (this.parent.eventSettings.editFollowingEvents && this.parent.currentAction === 'EditOccurrence'
9241
- && !isNullOrUndefined(activeEvent[this.parent.eventFields.recurrenceID]) && activeEvent[this.parent.eventFields.recurrenceID]
9242
- !== activeEvent[this.parent.eventFields.id]) {
9243
- var followingEventButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_FOLLOWING);
9244
- addClass([followingEventButton], DISABLE_CLASS);
9245
- }
9246
9240
  this.showQuickDialog('RecurrenceAlert');
9247
9241
  };
9248
9242
  QuickPopups.prototype.openRecurrenceValidationAlert = function (type) {
@@ -11888,6 +11882,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11888
11882
  };
11889
11883
  EventWindow.prototype.onBeforeOpen = function (args) {
11890
11884
  var _this = this;
11885
+ var endTime = this.eventData[this.fields.endTime].getTime();
11891
11886
  var eventProp = {
11892
11887
  type: 'Editor',
11893
11888
  data: this.eventData,
@@ -11912,6 +11907,12 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11912
11907
  this.parent.trigger(popupOpen, eventProp, function (popupArgs) {
11913
11908
  args.cancel = popupArgs.cancel;
11914
11909
  _this.duration = _this.cellClickAction ? popupArgs.duration : null;
11910
+ if (_this.eventData[_this.fields.endTime].getTime() === endTime && !_this.cellClickAction &&
11911
+ _this.eventData[_this.fields.endTime].getHours() === 0 &&
11912
+ _this.eventData[_this.fields.endTime].getMinutes() === 0) {
11913
+ _this.eventData = extend({}, _this.eventData, null, true);
11914
+ _this.trimAllDay(_this.eventData);
11915
+ }
11915
11916
  _this.refreshDateTimePicker(_this.duration);
11916
11917
  if (_this.cellClickAction && popupArgs.duration !== _this.getSlotDuration() && isNullOrUndefined(_this.parent.editorTemplate)) {
11917
11918
  var startObj = _this.getInstance(EVENT_WINDOW_START_CLASS);
@@ -12593,12 +12594,12 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12593
12594
  this.fieldValidator.renderFormValidator(form, rules, this.element, this.parent.locale);
12594
12595
  };
12595
12596
  EventWindow.prototype.showDetails = function (eventData) {
12597
+ this.eventData = eventData;
12596
12598
  var eventObj = extend({}, eventData, null, true);
12597
12599
  if ((!this.cellClickAction || this.cellClickAction && !isNullOrUndefined(this.parent.editorTemplate)) &&
12598
12600
  eventObj[this.fields.endTime].getHours() === 0 && eventObj[this.fields.endTime].getMinutes() === 0) {
12599
12601
  this.trimAllDay(eventObj);
12600
12602
  }
12601
- this.eventData = eventObj;
12602
12603
  var formElements = this.getFormElements(EVENT_WINDOW_DIALOG_CLASS);
12603
12604
  var keyNames = Object.keys(eventObj);
12604
12605
  for (var _i = 0, formElements_2 = formElements; _i < formElements_2.length; _i++) {
@@ -21759,7 +21760,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
21759
21760
  (dragArea.scrollTop + dragArea.offsetHeight - this.actionObj.clone.offsetHeight + window.pageYOffset) +
21760
21761
  (this.actionObj.clone.offsetHeight - this.heightUptoCursorPoint);
21761
21762
  offsetTop = Math.round(offsetTop / this.actionObj.cellHeight) * this.actionObj.cellHeight;
21762
- this.actionObj.clone.style.top = formatUnit(offsetTop);
21763
+ if (dragArea.scrollTop > 0) {
21764
+ this.actionObj.clone.style.top = formatUnit(offsetTop);
21765
+ }
21763
21766
  }
21764
21767
  var rowIndex = (this.parent.activeViewOptions.timeScale.enable) ? (offsetTop / this.actionObj.cellHeight) : 0;
21765
21768
  var heightPerMinute = this.actionObj.cellHeight / this.actionObj.slotInterval;
@@ -25511,6 +25514,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
25511
25514
  className.push(data.cssClass);
25512
25515
  }
25513
25516
  addClass([ntd], className);
25517
+ if (this.isCurrentDate(new Date(data.date.getTime()))) {
25518
+ addClass(ntd.childNodes, AGENDA_CURRENT_DAY_CLASS);
25519
+ }
25514
25520
  ntr.appendChild(ntd);
25515
25521
  }
25516
25522
  else if (data.type === 'eventColumn') {