@syncfusion/ej2-schedule 19.4.47 → 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.
Files changed (51) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/ej2-schedule.umd.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-schedule.es2015.js +59 -24
  5. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es5.js +59 -24
  7. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  8. package/dist/global/ej2-schedule.min.js +2 -2
  9. package/dist/global/ej2-schedule.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +15 -15
  12. package/src/schedule/actions/drag.js +9 -7
  13. package/src/schedule/actions/keyboard.d.ts +1 -0
  14. package/src/schedule/actions/keyboard.js +23 -0
  15. package/src/schedule/event-renderer/agenda-base.js +1 -1
  16. package/src/schedule/event-renderer/timeline-view.d.ts +1 -0
  17. package/src/schedule/event-renderer/timeline-view.js +7 -5
  18. package/src/schedule/event-renderer/vertical-view.js +7 -1
  19. package/src/schedule/event-renderer/year.js +3 -1
  20. package/src/schedule/popups/event-window.js +1 -1
  21. package/src/schedule/popups/quick-popups.js +5 -5
  22. package/src/schedule/renderer/month.js +1 -1
  23. package/src/schedule/renderer/vertical-view.js +1 -1
  24. package/src/schedule/renderer/year.js +1 -1
  25. package/styles/bootstrap-dark.css +2 -2
  26. package/styles/bootstrap.css +2 -2
  27. package/styles/bootstrap4.css +2 -2
  28. package/styles/bootstrap5-dark.css +2 -2
  29. package/styles/bootstrap5.css +2 -2
  30. package/styles/fabric-dark.css +2 -2
  31. package/styles/fabric.css +2 -2
  32. package/styles/highcontrast-light.css +2 -2
  33. package/styles/highcontrast.css +2 -2
  34. package/styles/material-dark.css +2 -2
  35. package/styles/material.css +2 -2
  36. package/styles/schedule/_layout.scss +2 -2
  37. package/styles/schedule/bootstrap-dark.css +2 -2
  38. package/styles/schedule/bootstrap.css +2 -2
  39. package/styles/schedule/bootstrap4.css +2 -2
  40. package/styles/schedule/bootstrap5-dark.css +2 -2
  41. package/styles/schedule/bootstrap5.css +2 -2
  42. package/styles/schedule/fabric-dark.css +2 -2
  43. package/styles/schedule/fabric.css +2 -2
  44. package/styles/schedule/highcontrast-light.css +2 -2
  45. package/styles/schedule/highcontrast.css +2 -2
  46. package/styles/schedule/material-dark.css +2 -2
  47. package/styles/schedule/material.css +2 -2
  48. package/styles/schedule/tailwind-dark.css +2 -2
  49. package/styles/schedule/tailwind.css +2 -2
  50. package/styles/tailwind-dark.css +2 -2
  51. package/styles/tailwind.css +2 -2
@@ -1905,6 +1905,29 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
1905
1905
  break;
1906
1906
  case 'escape':
1907
1907
  this.processEscape(e);
1908
+ break;
1909
+ case 'fTwelve':
1910
+ if (this.parent.allowInline && this.parent.inlineModule) {
1911
+ e.preventDefault();
1912
+ this.processFTwelve(e);
1913
+ }
1914
+ break;
1915
+ }
1916
+ };
1917
+ KeyboardInteraction.prototype.processFTwelve = function (e) {
1918
+ var target = e.target;
1919
+ if (target.classList.contains(WORK_CELLS_CLASS) || target.classList.contains(ALLDAY_CELLS_CLASS)) {
1920
+ this.parent.activeCellsData = this.getSelectedElements(target);
1921
+ var args = extend(this.parent.activeCellsData, { cancel: false, event: e });
1922
+ var inlineArgs = {
1923
+ element: args.element,
1924
+ groupIndex: args.groupIndex, type: 'Cell'
1925
+ };
1926
+ this.parent.notify(inlineClick, inlineArgs);
1927
+ }
1928
+ if (target.classList.contains(APPOINTMENT_CLASS)) {
1929
+ target.click();
1930
+ return;
1908
1931
  }
1909
1932
  };
1910
1933
  KeyboardInteraction.prototype.addEventListener = function () {
@@ -6847,6 +6870,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6847
6870
  appointmentElement_1 = this.createAppointmentElement(eventObj, true, record.data, resource);
6848
6871
  }
6849
6872
  addClass([appointmentElement_1], ALLDAY_APPOINTMENT_CLASS);
6873
+ var eventData = extend({}, record.data, null, true);
6874
+ eventObj.data = eventData;
6850
6875
  var args = { data: eventObj, element: appointmentElement_1, cancel: false };
6851
6876
  this.parent.trigger(eventRendered, args, function (eventArgs) {
6852
6877
  if (!eventArgs.cancel) {
@@ -6928,7 +6953,11 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6928
6953
  subjectElement.style.maxHeight = formatUnit(maxHeight);
6929
6954
  }
6930
6955
  var index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
6931
- this.appendEvent(eventObj, appointmentElement, index, tempData.appLeft);
6956
+ var eventData = {};
6957
+ eventData[this.fields.startTime] = eventObj[this.fields.startTime];
6958
+ eventData[this.fields.endTime] = eventObj[this.fields.endTime];
6959
+ record.data = eventData;
6960
+ this.appendEvent(record, appointmentElement, index, tempData.appLeft);
6932
6961
  this.wireAppointmentEvents(appointmentElement, eventObj);
6933
6962
  if (appHeight_1 < this.cellHeight) {
6934
6963
  var resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + EVENT_RESIZE_CLASS));
@@ -7908,6 +7937,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
7908
7937
  _this.interval = _this.parent.activeViewOptions.timeScale.interval;
7909
7938
  _this.day = 0;
7910
7939
  _this.rowIndex = 0;
7940
+ _this.cellTops = [];
7911
7941
  _this.renderType = type;
7912
7942
  _this.eventContainers = [].slice.call(_this.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
7913
7943
  var tr = [].slice.call(_this.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
@@ -8027,9 +8057,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8027
8057
  var cellTd = this.getCellTd();
8028
8058
  var overlapCount = (isNullOrUndefined(this.parent.eventSettings.sortComparer)) ? this.getIndex(startTime) : this.getSortComparerIndex(startTime, endTime);
8029
8059
  event.Index = overlapCount;
8030
- var elem = this.element.querySelector('.' + APPOINTMENT_CLASS);
8031
- var eleHeight = (elem) ? elem.getBoundingClientRect().height : 0;
8032
- var appHeight = (elem && eleHeight > 0) ? eleHeight : this.eventHeight;
8060
+ var appHeight = this.eventHeight;
8033
8061
  var diffInDays = eventData.count;
8034
8062
  var eventObj = extend({}, event, null, true);
8035
8063
  eventObj[this.fields.startTime] = eventData[this.fields.startTime];
@@ -8045,7 +8073,10 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8045
8073
  var position = this.getPosition(startTime, endTime, event[this.fields.isAllDay], this.day);
8046
8074
  appWidth_1 = (appWidth_1 <= 0) ? this.cellWidth : appWidth_1; // appWidth 0 when start and end time as same
8047
8075
  this.renderedEvents.push(extend({}, event, null, true));
8048
- var top_1 = this.getRowTop(resIndex);
8076
+ if (isNullOrUndefined(this.cellTops[resIndex])) {
8077
+ this.cellTops[resIndex] = this.getRowTop(resIndex);
8078
+ }
8079
+ var top_1 = this.cellTops[resIndex];
8049
8080
  var appTop = (top_1 + (this.maxHeight ? 0 : EVENT_GAP$1)) + (overlapCount * (appHeight + EVENT_GAP$1));
8050
8081
  appLeft = (this.parent.enableRtl) ? 0 : position;
8051
8082
  appRight = (this.parent.enableRtl) ? position : 0;
@@ -8149,7 +8180,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8149
8180
  }
8150
8181
  };
8151
8182
  TimelineEvent.prototype.updateCellHeight = function (cell, height) {
8152
- if ((height > cell.getBoundingClientRect().height)) {
8183
+ if ((height > this.cellHeight)) {
8153
8184
  setStyleAttribute(cell, { 'height': height + 'px' });
8154
8185
  if (this.parent.activeViewOptions.group.resources.length > 0) {
8155
8186
  var resourceCell = this.parent.element.querySelector('.' + RESOURCE_COLUMN_TABLE_CLASS + ' ' + 'tbody td[data-group-index="' +
@@ -9193,13 +9224,12 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9193
9224
  if (saveButton) {
9194
9225
  this.renderButton('e-flat e-primary', '', this.parent.activeViewOptions.readonly, saveButton, this.saveClick);
9195
9226
  }
9196
- this.quickPopup.content = quickCellPopup;
9197
- this.quickPopup.dataBind();
9198
- this.applyFormValidation();
9199
9227
  if (this.morePopup) {
9200
9228
  this.morePopup.hide();
9201
9229
  }
9230
+ this.quickPopup.content = quickCellPopup;
9202
9231
  this.quickPopup.relateTo = target;
9232
+ this.quickPopup.dataBind();
9203
9233
  this.beforeQuickPopupOpen(target);
9204
9234
  };
9205
9235
  QuickPopups.prototype.isSameEventClick = function (events) {
@@ -9266,13 +9296,13 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9266
9296
  if (deleteButton) {
9267
9297
  this.renderButton('e-flat', '', deleteAction, deleteButton, this.deleteClick);
9268
9298
  }
9269
- this.quickPopup.content = quickEventPopup;
9270
- this.quickPopup.dataBind();
9271
9299
  if (this.morePopup && !closest(events.element, '.' + MORE_EVENT_WRAPPER_CLASS)) {
9272
9300
  this.morePopup.hide();
9273
9301
  }
9302
+ this.quickPopup.content = quickEventPopup;
9274
9303
  this.quickPopup.relateTo = this.parent.isAdaptive ? document.body :
9275
9304
  closest(events.element, '.' + APPOINTMENT_CLASS);
9305
+ this.quickPopup.dataBind();
9276
9306
  this.beforeQuickPopupOpen(events.element);
9277
9307
  }
9278
9308
  };
@@ -9566,6 +9596,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9566
9596
  });
9567
9597
  };
9568
9598
  QuickPopups.prototype.saveClick = function (event) {
9599
+ this.applyFormValidation();
9569
9600
  this.dialogEvent = event;
9570
9601
  this.isCrudAction = true;
9571
9602
  this.quickPopupHide();
@@ -11971,7 +12002,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11971
12002
  return labelText;
11972
12003
  };
11973
12004
  EventWindow.prototype.onChange = function (args) {
11974
- var target = (args.event.target);
12005
+ var target = args.event.currentTarget.querySelector('input');
11975
12006
  if (target.classList.contains(EVENT_WINDOW_ALL_DAY_CLASS)) {
11976
12007
  this.onAllDayChange(args.checked);
11977
12008
  }
@@ -19812,6 +19843,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
19812
19843
  var rowIndex = this.parent.activeViewOptions.orientation === 'Vertical' ? index : month;
19813
19844
  var td = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + (rowIndex + 1) + ") td");
19814
19845
  this.cellHeight = td.offsetHeight;
19846
+ this.groupOrder = resource.groupOrder;
19815
19847
  for (var a = 0; a < eventDatas.length; a++) {
19816
19848
  var data = eventDatas[a];
19817
19849
  var overlapIndex = void 0;
@@ -20048,7 +20080,8 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
20048
20080
  }
20049
20081
  }
20050
20082
  else {
20051
- if (((resetTime(appStart).getTime() <= dateStart) && (resetTime(appEnd).getTime() >= dateStart)) ||
20083
+ var timeCondition = app[this.fields.isAllDay] ? resetTime(appEnd).getTime() > dateStart : resetTime(appEnd).getTime() >= dateStart;
20084
+ if (((resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
20052
20085
  (resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
20053
20086
  appointmentsList.push(app);
20054
20087
  }
@@ -20557,14 +20590,16 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20557
20590
  else {
20558
20591
  outWrapper = this.parent.element.querySelector('.' + APPOINTMENT_CONTAINER_CLASS);
20559
20592
  }
20560
- var tarWrapper_1 = outWrapper.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
20561
- if (!tarWrapper_1) {
20562
- tarWrapper_1 = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
20563
- outWrapper.appendChild(tarWrapper_1);
20593
+ if (!isNullOrUndefined(outWrapper)) {
20594
+ var tarWrapper_1 = outWrapper.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
20595
+ if (!tarWrapper_1) {
20596
+ tarWrapper_1 = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
20597
+ outWrapper.appendChild(tarWrapper_1);
20598
+ }
20599
+ this.actionObj.cloneElement.forEach(function (ele) {
20600
+ tarWrapper_1.appendChild(ele);
20601
+ });
20564
20602
  }
20565
- this.actionObj.cloneElement.forEach(function (ele) {
20566
- tarWrapper_1.appendChild(ele);
20567
- });
20568
20603
  }
20569
20604
  };
20570
20605
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -22304,7 +22339,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
22304
22339
  if (this.parent.activeViewOptions.allowVirtualScrolling) {
22305
22340
  clsList.push(VIRTUAL_SCROLL_CLASS);
22306
22341
  }
22307
- if (this.parent.eventSettings.ignoreWhitespace) {
22342
+ if (this.parent.rowAutoHeight && this.parent.eventSettings.ignoreWhitespace) {
22308
22343
  clsList.push(IGNORE_WHITESPACE);
22309
22344
  }
22310
22345
  this.renderPanel(type);
@@ -22984,7 +23019,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22984
23019
  if (this.parent.activeViewOptions.allowVirtualScrolling) {
22985
23020
  clsList.push(VIRTUAL_SCROLL_CLASS);
22986
23021
  }
22987
- if (this.parent.eventSettings.ignoreWhitespace) {
23022
+ if (this.parent.rowAutoHeight && this.parent.eventSettings.ignoreWhitespace) {
22988
23023
  clsList.push(IGNORE_WHITESPACE);
22989
23024
  }
22990
23025
  addClass([this.element], clsList);
@@ -23572,7 +23607,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
23572
23607
  var weekNumber = this.parent.getWeekNumberContent(weekDates);
23573
23608
  var td = createElement('td', {
23574
23609
  className: 'e-week-number',
23575
- attrs: { 'role': 'gridcell', 'title': 'Week ' + weekNumber },
23610
+ attrs: { 'role': 'gridcell', 'title': this.parent.localeObj.getConstant('week') + ' ' + weekNumber },
23576
23611
  innerHTML: weekNumber
23577
23612
  });
23578
23613
  tr_1.appendChild(td);
@@ -23985,7 +24020,7 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
23985
24020
  var eventElement = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
23986
24021
  for (var _i = 0, eventElement_1 = eventElement; _i < eventElement_1.length; _i++) {
23987
24022
  var element = eventElement_1[_i];
23988
- this.parent.eventBase.wireAppointmentEvents(element, null, true);
24023
+ this.parent.eventBase.wireAppointmentEvents(element, this.parent.getEventDetails(element), true);
23989
24024
  }
23990
24025
  var dateHeaderElement = [].slice.call(this.parent.element.querySelectorAll('.e-m-date'));
23991
24026
  for (var _a = 0, dateHeaderElement_1 = dateHeaderElement; _a < dateHeaderElement_1.length; _a++) {