@syncfusion/ej2-schedule 23.2.4 → 24.1.41

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 (119) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/ej2-schedule.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +278 -35
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +341 -65
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +2 -2
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +16 -16
  13. package/src/recurrence-editor/recurrence-editor.js +4 -2
  14. package/src/schedule/actions/drag.js +4 -4
  15. package/src/schedule/base/schedule-model.d.ts +15 -1
  16. package/src/schedule/base/schedule.d.ts +14 -1
  17. package/src/schedule/base/schedule.js +5 -0
  18. package/src/schedule/base/type.d.ts +12 -0
  19. package/src/schedule/event-renderer/agenda-base.js +1 -1
  20. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  21. package/src/schedule/event-renderer/event-base.js +25 -1
  22. package/src/schedule/event-renderer/month.js +9 -1
  23. package/src/schedule/event-renderer/timeline-view.js +8 -2
  24. package/src/schedule/event-renderer/year.js +17 -3
  25. package/src/schedule/models/models.d.ts +1 -0
  26. package/src/schedule/models/toolbar-model.d.ts +196 -0
  27. package/src/schedule/models/toolbar.d.ts +176 -0
  28. package/src/schedule/models/toolbar.js +85 -0
  29. package/src/schedule/models/views-model.d.ts +9 -0
  30. package/src/schedule/models/views.d.ts +8 -0
  31. package/src/schedule/models/views.js +3 -0
  32. package/src/schedule/popups/event-window.js +5 -11
  33. package/src/schedule/popups/quick-popups.js +2 -2
  34. package/src/schedule/renderer/header-renderer.d.ts +2 -0
  35. package/src/schedule/renderer/header-renderer.js +142 -4
  36. package/src/schedule/renderer/renderer.js +1 -1
  37. package/src/schedule/renderer/vertical-view.js +3 -3
  38. package/src/schedule/renderer/year.js +3 -0
  39. package/styles/bootstrap-dark.css +26 -22
  40. package/styles/bootstrap.css +26 -22
  41. package/styles/bootstrap4.css +25 -21
  42. package/styles/bootstrap5-dark.css +30 -26
  43. package/styles/bootstrap5.css +30 -26
  44. package/styles/fabric-dark.css +28 -24
  45. package/styles/fabric.css +28 -24
  46. package/styles/fluent-dark.css +28 -24
  47. package/styles/fluent.css +28 -24
  48. package/styles/highcontrast-light.css +26 -22
  49. package/styles/highcontrast.css +26 -22
  50. package/styles/material-dark.css +26 -22
  51. package/styles/material.css +26 -22
  52. package/styles/material3-dark.css +29 -25
  53. package/styles/material3.css +29 -25
  54. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +3 -1
  55. package/styles/recurrence-editor/_bootstrap-definition.scss +3 -1
  56. package/styles/recurrence-editor/_bootstrap4-definition.scss +3 -1
  57. package/styles/recurrence-editor/_bootstrap5-definition.scss +5 -3
  58. package/styles/recurrence-editor/_fabric-dark-definition.scss +4 -2
  59. package/styles/recurrence-editor/_fabric-definition.scss +4 -2
  60. package/styles/recurrence-editor/_fluent-definition.scss +4 -2
  61. package/styles/recurrence-editor/_fusionnew-definition.scss +4 -2
  62. package/styles/recurrence-editor/_highcontrast-definition.scss +3 -1
  63. package/styles/recurrence-editor/_highcontrast-light-definition.scss +3 -1
  64. package/styles/recurrence-editor/_layout.scss +3 -10
  65. package/styles/recurrence-editor/_material-dark-definition.scss +3 -1
  66. package/styles/recurrence-editor/_material-definition.scss +3 -1
  67. package/styles/recurrence-editor/_material3-definition.scss +4 -2
  68. package/styles/recurrence-editor/_tailwind-definition.scss +5 -3
  69. package/styles/recurrence-editor/bootstrap-dark.css +5 -10
  70. package/styles/recurrence-editor/bootstrap.css +5 -10
  71. package/styles/recurrence-editor/bootstrap4.css +4 -9
  72. package/styles/recurrence-editor/bootstrap5-dark.css +9 -14
  73. package/styles/recurrence-editor/bootstrap5.css +9 -14
  74. package/styles/recurrence-editor/fabric-dark.css +7 -12
  75. package/styles/recurrence-editor/fabric.css +7 -12
  76. package/styles/recurrence-editor/fluent-dark.css +7 -12
  77. package/styles/recurrence-editor/fluent.css +7 -12
  78. package/styles/recurrence-editor/highcontrast-light.css +5 -10
  79. package/styles/recurrence-editor/highcontrast.css +5 -10
  80. package/styles/recurrence-editor/material-dark.css +5 -10
  81. package/styles/recurrence-editor/material.css +5 -10
  82. package/styles/recurrence-editor/material3-dark.css +7 -12
  83. package/styles/recurrence-editor/material3.css +7 -12
  84. package/styles/recurrence-editor/tailwind-dark.css +9 -14
  85. package/styles/recurrence-editor/tailwind.css +9 -14
  86. package/styles/schedule/_bootstrap-dark-definition.scss +6 -2
  87. package/styles/schedule/_bootstrap-definition.scss +6 -2
  88. package/styles/schedule/_bootstrap4-definition.scss +6 -2
  89. package/styles/schedule/_bootstrap5-definition.scss +6 -2
  90. package/styles/schedule/_fabric-dark-definition.scss +6 -2
  91. package/styles/schedule/_fabric-definition.scss +6 -2
  92. package/styles/schedule/_fluent-definition.scss +6 -2
  93. package/styles/schedule/_fusionnew-definition.scss +6 -2
  94. package/styles/schedule/_highcontrast-definition.scss +6 -2
  95. package/styles/schedule/_highcontrast-light-definition.scss +6 -2
  96. package/styles/schedule/_layout.scss +23 -10
  97. package/styles/schedule/_material-dark-definition.scss +6 -2
  98. package/styles/schedule/_material-definition.scss +6 -2
  99. package/styles/schedule/_material3-definition.scss +6 -2
  100. package/styles/schedule/_tailwind-definition.scss +6 -2
  101. package/styles/schedule/bootstrap-dark.css +21 -12
  102. package/styles/schedule/bootstrap.css +21 -12
  103. package/styles/schedule/bootstrap4.css +21 -12
  104. package/styles/schedule/bootstrap5-dark.css +21 -12
  105. package/styles/schedule/bootstrap5.css +21 -12
  106. package/styles/schedule/fabric-dark.css +21 -12
  107. package/styles/schedule/fabric.css +21 -12
  108. package/styles/schedule/fluent-dark.css +21 -12
  109. package/styles/schedule/fluent.css +21 -12
  110. package/styles/schedule/highcontrast-light.css +21 -12
  111. package/styles/schedule/highcontrast.css +21 -12
  112. package/styles/schedule/material-dark.css +21 -12
  113. package/styles/schedule/material.css +21 -12
  114. package/styles/schedule/material3-dark.css +22 -13
  115. package/styles/schedule/material3.css +22 -13
  116. package/styles/schedule/tailwind-dark.css +22 -13
  117. package/styles/schedule/tailwind.css +22 -13
  118. package/styles/tailwind-dark.css +31 -27
  119. package/styles/tailwind.css +31 -27
@@ -1043,7 +1043,7 @@ class HeaderRenderer {
1043
1043
  this.renderToolbar();
1044
1044
  }
1045
1045
  renderToolbar() {
1046
- const items = this.getItems();
1046
+ const items = (this.parent.toolbarItems && this.parent.toolbarItems.length > 0) ? this.getToolbarItems() : this.getItems();
1047
1047
  this.parent.trigger(actionBegin, { requestType: 'toolbarItemRendering', items: items }, (args) => {
1048
1048
  this.toolbarObj = new Toolbar({
1049
1049
  items: args.items,
@@ -1053,6 +1053,7 @@ class HeaderRenderer {
1053
1053
  enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
1054
1054
  locale: this.parent.locale
1055
1055
  });
1056
+ this.toolbarObj.root = this.parent.root ? this.parent.root : this.parent;
1056
1057
  this.toolbarObj.appendTo(this.parent.element.querySelector('.' + HEADER_TOOLBAR));
1057
1058
  const prevNavEle = this.toolbarObj.element.querySelector('.e-prev');
1058
1059
  if (prevNavEle) {
@@ -1174,20 +1175,144 @@ class HeaderRenderer {
1174
1175
  });
1175
1176
  return capitalizeFirstWord(dateString, 'single');
1176
1177
  }
1178
+ getItemModel(propItem) {
1179
+ const item = {};
1180
+ if (propItem.id) {
1181
+ item.id = propItem.id;
1182
+ }
1183
+ if (propItem.text) {
1184
+ item.text = propItem.text;
1185
+ }
1186
+ if (propItem.tooltipText) {
1187
+ item.tooltipText = propItem.tooltipText;
1188
+ }
1189
+ if (propItem.prefixIcon) {
1190
+ item.prefixIcon = propItem.prefixIcon;
1191
+ }
1192
+ if (propItem.cssClass) {
1193
+ item.cssClass = propItem.cssClass;
1194
+ }
1195
+ if (propItem.showTextOn !== 'Both') {
1196
+ item.showTextOn = propItem.showTextOn;
1197
+ }
1198
+ if (propItem.template) {
1199
+ item.template = propItem.template;
1200
+ }
1201
+ if (propItem.disabled) {
1202
+ item.disabled = propItem.disabled;
1203
+ }
1204
+ if (propItem.width !== 'auto') {
1205
+ item.width = propItem.width;
1206
+ }
1207
+ if (propItem.suffixIcon) {
1208
+ item.suffixIcon = propItem.suffixIcon;
1209
+ }
1210
+ if (propItem.align !== 'Left') {
1211
+ item.align = propItem.align;
1212
+ }
1213
+ if (propItem.overflow !== 'None') {
1214
+ item.overflow = propItem.overflow;
1215
+ }
1216
+ if (propItem.htmlAttributes) {
1217
+ item.htmlAttributes = propItem.htmlAttributes;
1218
+ }
1219
+ if (propItem.type !== 'Button') {
1220
+ item.type = propItem.type;
1221
+ }
1222
+ if (propItem.visible !== true) {
1223
+ item.visible = propItem.visible;
1224
+ }
1225
+ if (propItem.showAlwaysInPopup) {
1226
+ item.showAlwaysInPopup = propItem.showAlwaysInPopup;
1227
+ }
1228
+ if (propItem.tabIndex !== -1) {
1229
+ item.tabIndex = propItem.tabIndex;
1230
+ }
1231
+ return item;
1232
+ }
1233
+ getToolbarItems() {
1234
+ const items = [];
1235
+ let propItem;
1236
+ for (const item of this.parent.toolbarItems) {
1237
+ propItem = this.getItemModel(item);
1238
+ let tbItem;
1239
+ if (item.name) {
1240
+ switch (item.name) {
1241
+ case 'Today':
1242
+ tbItem = {
1243
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
1244
+ text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
1245
+ };
1246
+ tbItem.align = propItem.align ? propItem.align : item.align;
1247
+ items.push(Object.assign({}, tbItem, propItem));
1248
+ break;
1249
+ case 'Previous':
1250
+ tbItem = {
1251
+ prefixIcon: 'e-icon-prev', tooltipText: 'Previous', overflow: 'Show',
1252
+ cssClass: 'e-prev', htmlAttributes: { 'role': 'navigation' }
1253
+ };
1254
+ tbItem.align = propItem.align ? propItem.align : item.align;
1255
+ items.push(Object.assign({}, tbItem, propItem));
1256
+ break;
1257
+ case 'Next':
1258
+ tbItem = {
1259
+ prefixIcon: 'e-icon-next', tooltipText: 'Next', overflow: 'Show',
1260
+ cssClass: 'e-next', htmlAttributes: { 'role': 'navigation' }
1261
+ };
1262
+ tbItem.align = propItem.align ? propItem.align : item.align;
1263
+ items.push(Object.assign({}, tbItem, propItem));
1264
+ break;
1265
+ case 'DateRangeText':
1266
+ tbItem = {
1267
+ text: this.getDateRangeText(), suffixIcon: 'e-icon-down-arrow', cssClass: 'e-date-range',
1268
+ overflow: 'Show',
1269
+ htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'role': 'navigation' }
1270
+ };
1271
+ tbItem.align = propItem.align ? propItem.align : item.align;
1272
+ items.push(Object.assign({}, tbItem, propItem));
1273
+ break;
1274
+ case 'NewEvent':
1275
+ tbItem = {
1276
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-add',
1277
+ text: this.l10n.getConstant('newEvent'), cssClass: 'e-add', overflow: 'Show'
1278
+ };
1279
+ tbItem.align = propItem.align ? propItem.align : item.align;
1280
+ items.push(Object.assign({}, tbItem, propItem));
1281
+ break;
1282
+ case 'Views':
1283
+ if (this.parent.views.length > 1) {
1284
+ for (const view of this.parent.views) {
1285
+ tbItem = this.getItemObject(view);
1286
+ tbItem.align = propItem.align ? propItem.align : item.align;
1287
+ items.push(Object.assign({}, tbItem, propItem));
1288
+ }
1289
+ }
1290
+ break;
1291
+ case 'Custom':
1292
+ items.push(item);
1293
+ break;
1294
+ }
1295
+ }
1296
+ else {
1297
+ items.push(item);
1298
+ }
1299
+ }
1300
+ return items;
1301
+ }
1177
1302
  getItems() {
1178
1303
  const items = [];
1179
1304
  items.push({
1180
1305
  align: 'Left', prefixIcon: 'e-icon-prev', tooltipText: 'Previous', overflow: 'Show',
1181
- cssClass: 'e-prev', htmlAttributes: { 'role': 'navigation' }
1306
+ cssClass: 'e-prev'
1182
1307
  });
1183
1308
  items.push({
1184
1309
  align: 'Left', prefixIcon: 'e-icon-next', tooltipText: 'Next', overflow: 'Show',
1185
- cssClass: 'e-next', htmlAttributes: { 'role': 'navigation' }
1310
+ cssClass: 'e-next'
1186
1311
  });
1187
1312
  items.push({
1188
1313
  align: 'Left', text: this.getDateRangeText(), suffixIcon: 'e-icon-down-arrow', cssClass: 'e-date-range',
1189
1314
  overflow: 'Show',
1190
- htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'role': 'navigation' }
1315
+ htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive' }
1191
1316
  });
1192
1317
  if (this.parent.isAdaptive || this.parent.enableAdaptiveUI) {
1193
1318
  items.push({
@@ -5416,6 +5541,9 @@ class EventBase {
5416
5541
  }
5417
5542
  processTimezone(event, isReverse = false) {
5418
5543
  const fields = this.parent.eventFields;
5544
+ if (event[fields.isAllDay]) {
5545
+ return event;
5546
+ }
5419
5547
  if (event[fields.startTimezone] || event[fields.endTimezone]) {
5420
5548
  const startTimezone = event[fields.startTimezone] || event[fields.endTimezone];
5421
5549
  const endTimezone = event[fields.endTimezone] || event[fields.startTimezone];
@@ -6519,6 +6647,25 @@ class EventBase {
6519
6647
  append([iconBottom], element);
6520
6648
  }
6521
6649
  }
6650
+ addCellHeight(selector, eventHeight, eventGap, headerHeight, indHeight, isScrollUpdate = true) {
6651
+ if (this.parent.activeViewOptions.maxEventsPerRow && !this.parent.rowAutoHeight) {
6652
+ const rows = [].slice.call(this.parent.element.querySelectorAll(selector));
6653
+ const weekNumberRows = this.parent.showWeekNumber
6654
+ ? [].slice.call(this.parent.element.querySelectorAll('.' + WEEK_NUMBER_WRAPPER_CLASS + ' tbody tr'))
6655
+ : [];
6656
+ for (const row of rows) {
6657
+ const height = (this.parent.activeViewOptions.maxEventsPerRow *
6658
+ ((eventHeight + (this.parent.currentView === 'Month' ? eventGap : 2)))) + headerHeight + indHeight;
6659
+ if (weekNumberRows.length > 0) {
6660
+ setStyleAttribute(weekNumberRows[rows.indexOf(row)].firstElementChild, { 'height': height + 'px' });
6661
+ }
6662
+ setStyleAttribute(row.firstElementChild, { 'height': height + 'px' });
6663
+ }
6664
+ if (!this.parent.enablePersistence && !this.parent.activeViewOptions.allowVirtualScrolling && isScrollUpdate) {
6665
+ this.parent.notify(contentReady, {});
6666
+ }
6667
+ }
6668
+ }
6522
6669
  unWireEvents() {
6523
6670
  const appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
6524
6671
  for (const element of appElements) {
@@ -7417,6 +7564,8 @@ class MonthEvent extends EventBase {
7417
7564
  cellTd.removeChild(wrapper);
7418
7565
  }
7419
7566
  this.eventHeight = getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
7567
+ const selector = '.' + CONTENT_TABLE_CLASS + ' tbody tr';
7568
+ this.addCellHeight(selector, this.eventHeight, (this.parent.currentView === 'Month' ? EVENT_GAP : 2), this.monthHeaderHeight, this.moreIndicatorHeight);
7420
7569
  const scrollTop = conWrap.scrollTop;
7421
7570
  if (this.parent.rowAutoHeight && this.parent.virtualScrollModule && !this.parent.virtualScrollModule.isHorizontalScroll
7422
7571
  && !isNullOrUndefined(this.parent.currentAction)) {
@@ -7810,6 +7959,7 @@ class MonthEvent extends EventBase {
7810
7959
  if ((day < 0) || (startTime.getTime() < this.parent.minDate.getTime()) || (endTime.getTime() > this.parent.maxDate.getTime())) {
7811
7960
  return;
7812
7961
  }
7962
+ const eventsPerRow = this.parent.rowAutoHeight ? 1 : this.parent.activeViewOptions.maxEventsPerRow;
7813
7963
  const overlapCount = this.getIndex(startTime);
7814
7964
  event.Index = overlapCount;
7815
7965
  const diffInDays = event.data.count;
@@ -7818,7 +7968,9 @@ class MonthEvent extends EventBase {
7818
7968
  const cellTd = this.workCells[parseInt(day.toString(), 10)];
7819
7969
  const appTop = (overlapCount * (this.eventHeight + EVENT_GAP));
7820
7970
  const height = this.monthHeaderHeight + ((overlapCount + 1) * (this.eventHeight + EVENT_GAP)) + this.moreIndicatorHeight;
7821
- const enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
7971
+ const enableAppRender = this.parent.activeViewOptions.maxEventsPerRow && !this.parent.rowAutoHeight &&
7972
+ !this.parent.eventSettings.enableIndicator ? overlapCount < eventsPerRow : this.maxOrIndicator ? overlapCount < 1
7973
+ ? true : false : this.cellHeight > height;
7822
7974
  if (this.parent.rowAutoHeight || enableAppRender) {
7823
7975
  this.renderedEvents.push(extend({}, event, null, true));
7824
7976
  let appointmentElement;
@@ -7978,7 +8130,10 @@ class MonthEvent extends EventBase {
7978
8130
  className: MORE_INDICATOR_CLASS,
7979
8131
  innerHTML: this.getMoreIndicatorText(count),
7980
8132
  attrs: {
8133
+ 'role': 'button',
7981
8134
  'tabindex': '0',
8135
+ 'aria-label': this.parent.globalize.formatNumber(count) + '&nbsp;'
8136
+ + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more')),
7982
8137
  'data-count': count.toString(),
7983
8138
  'data-start-date': startDate.getTime().toString(),
7984
8139
  'data-end-date': endDate.getTime().toString()
@@ -8102,6 +8257,8 @@ class TimelineEvent extends MonthEvent {
8102
8257
  }
8103
8258
  renderResourceEvents() {
8104
8259
  this.removeHeightProperty(RESOURCE_COLUMN_TABLE_CLASS);
8260
+ const selector = '.' + RESOURCE_COLUMN_TABLE_CLASS + ' tbody tr';
8261
+ this.addCellHeight(selector, this.eventHeight, EVENT_GAP$1, this.moreIndicatorHeight, 0, false);
8105
8262
  const resources = this.parent.uiStateValues.isGroupAdaptive ?
8106
8263
  [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] :
8107
8264
  this.parent.resourceBase.renderedResources;
@@ -8144,6 +8301,7 @@ class TimelineEvent extends MonthEvent {
8144
8301
  return;
8145
8302
  }
8146
8303
  const cellTd = this.getCellTd();
8304
+ const eventsPerRow = this.parent.rowAutoHeight ? 1 : this.parent.activeViewOptions.maxEventsPerRow;
8147
8305
  const overlapCount = (isNullOrUndefined(this.parent.eventSettings.sortComparer)) ? this.getIndex(startTime) : this.getSortComparerIndex(startTime, endTime);
8148
8306
  event.Index = overlapCount;
8149
8307
  const appHeight = this.eventHeight;
@@ -8176,7 +8334,8 @@ class TimelineEvent extends MonthEvent {
8176
8334
  appLeft = (this.parent.enableRtl) ? 0 : position;
8177
8335
  appRight = (this.parent.enableRtl) ? position : 0;
8178
8336
  const height = ((overlapCount + 1) * (appHeight + EVENT_GAP$1)) + this.moreIndicatorHeight;
8179
- const renderApp = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
8337
+ const renderApp = this.parent.activeViewOptions.maxEventsPerRow && !this.parent.rowAutoHeight && !this.parent.eventSettings.enableIndicator
8338
+ ? overlapCount < eventsPerRow : this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
8180
8339
  if (this.parent.rowAutoHeight || renderApp) {
8181
8340
  let appointmentElement;
8182
8341
  if (isNullOrUndefined(this.inlineValue)) {
@@ -8259,7 +8418,9 @@ class TimelineEvent extends MonthEvent {
8259
8418
  const appArea = this.cellHeight - this.moreIndicatorHeight;
8260
8419
  appHeight = this.withIndicator ? appArea - EVENT_GAP$1 : appHeight;
8261
8420
  const renderedAppCount = Math.floor(appArea / (appHeight + EVENT_GAP$1));
8262
- const count = (filterEvents.length - renderedAppCount) <= 0 ? 1 : (filterEvents.length - renderedAppCount);
8421
+ const count = this.parent.activeViewOptions.maxEventsPerRow && !this.parent.eventSettings.enableIndicator
8422
+ ? filterEvents.length - this.parent.activeViewOptions.maxEventsPerRow : (filterEvents.length - renderedAppCount) <= 0 ? 1
8423
+ : filterEvents.length - renderedAppCount;
8263
8424
  let moreIndicatorElement;
8264
8425
  if (this.renderType === 'day') {
8265
8426
  moreIndicatorElement = this.getMoreIndicatorElement(count, startDate, endDate);
@@ -8934,9 +9095,9 @@ class QuickPopups {
8934
9095
  }
8935
9096
  renderMorePopup() {
8936
9097
  const moreEventPopup = `<div class="${MORE_EVENT_POPUP_CLASS}"><div class="${MORE_EVENT_HEADER_CLASS}">` +
8937
- `<div class="${MORE_EVENT_CLOSE_CLASS}" title="${this.l10n.getConstant('close')}" tabindex="0"></div>` +
9098
+ `<div class="${MORE_EVENT_CLOSE_CLASS}" title="${this.l10n.getConstant('close')}" tabindex="0" role="button"></div>` +
8938
9099
  `<div class="${MORE_EVENT_DATE_HEADER_CLASS}"><div class="${MORE_EVENT_HEADER_DAY_CLASS}"></div>` +
8939
- `<div class="${MORE_EVENT_HEADER_DATE_CLASS} ${NAVIGATE_CLASS}" tabindex="0"></div></div></div></div>`;
9100
+ `<div class="${MORE_EVENT_HEADER_DATE_CLASS} ${NAVIGATE_CLASS}" tabindex="0" role="link"></div></div></div></div>`;
8940
9101
  const moreEventWrapper = createElement('div', {
8941
9102
  className: MORE_POPUP_WRAPPER_CLASS + ' e-popup-close',
8942
9103
  innerHTML: moreEventPopup
@@ -10451,7 +10612,6 @@ const MONTHWEEK = 'e-month-week';
10451
10612
  const ENDON = 'e-end-on';
10452
10613
  const MONTHEXPANDERLABEL = 'e-month-expander-label';
10453
10614
  const WEEKEXPANDERLABEL = 'e-week-expander-label';
10454
- const ENDONLABEL = 'e-end-on-label';
10455
10615
  const ENDONLEFT = 'e-end-on-left';
10456
10616
  const MONTHDAYELEMENT = 'e-monthday-element';
10457
10617
  const ENDONELEMENT = 'e-end-on-element';
@@ -10766,6 +10926,8 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
10766
10926
  this.endType = new DropDownList({
10767
10927
  dataSource: this.getEndData(),
10768
10928
  popupWidth: this.getPopupWidth(),
10929
+ floatLabelType: 'Always',
10930
+ placeholder: this.localeObj.getConstant(END),
10769
10931
  enableRtl: this.enableRtl,
10770
10932
  index: 1,
10771
10933
  fields: {
@@ -11100,6 +11262,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
11100
11262
  setTemplate() {
11101
11263
  const dayData = this.getDayData('narrow');
11102
11264
  const fullDay = this.getDayData('wide');
11265
+ const labelId = this.element.id + '_' + 'end_label';
11103
11266
  this.element.innerHTML = '<div class="' + HEADER + '">' +
11104
11267
  '<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
11105
11268
  '<input type="text" tabindex="0" class="' + REPEATELEMENT +
@@ -11145,9 +11308,8 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
11145
11308
  '</div></td></tr></table>' +
11146
11309
  '</div></div>' +
11147
11310
  '<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
11148
- '<div class=' + ENDONLABEL + '>' + this.localeObj.getConstant(END) + '</div>' +
11149
11311
  '<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
11150
- '<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
11312
+ '<input type="text" tabindex="0" class="' + ENDONELEMENT + '" aria-labelledby="' + labelId + '"title="' + this.localeObj.getConstant(END) + '" />' +
11151
11313
  '</div>' +
11152
11314
  '<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
11153
11315
  '<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
@@ -11904,15 +12066,11 @@ class EventWindow {
11904
12066
  const titleLocationDiv = this.createDivElement(EVENT_WINDOW_TITLE_LOCATION_DIV_CLASS);
11905
12067
  parentDiv.appendChild(titleLocationDiv);
11906
12068
  titleLocationDiv.appendChild(this.renderTextBox(SUBJECT_CLASS));
11907
- titleLocationDiv.querySelector('.' + SUBJECT_CLASS).setAttribute('title', this.parent.editorTitles.subject);
11908
12069
  titleLocationDiv.appendChild(this.renderTextBox(LOCATION_CLASS));
11909
- titleLocationDiv.querySelector('.' + LOCATION_CLASS).setAttribute('title', this.parent.editorTitles.location);
11910
12070
  const startEndDateTimeDiv = this.createDivElement(EVENT_WINDOW_START_END_DIV_CLASS);
11911
12071
  parentDiv.appendChild(startEndDateTimeDiv);
11912
12072
  startEndDateTimeDiv.appendChild(this.renderDateTimePicker(EVENT_WINDOW_START_CLASS, this.onTimeChange.bind(this)));
11913
- startEndDateTimeDiv.querySelector('.' + EVENT_WINDOW_START_CLASS).setAttribute('title', this.parent.editorTitles.startTime);
11914
12073
  startEndDateTimeDiv.appendChild(this.renderDateTimePicker(EVENT_WINDOW_END_CLASS));
11915
- startEndDateTimeDiv.querySelector('.' + EVENT_WINDOW_END_CLASS).setAttribute('title', this.parent.editorTitles.endTime);
11916
12074
  const allDayTimezoneDiv = this.createDivElement(EVENT_WINDOW_ALLDAY_TZ_DIV_CLASS);
11917
12075
  parentDiv.appendChild(allDayTimezoneDiv);
11918
12076
  allDayTimezoneDiv.appendChild(this.renderCheckBox(EVENT_WINDOW_ALL_DAY_CLASS));
@@ -11949,7 +12107,6 @@ class EventWindow {
11949
12107
  }
11950
12108
  const description = this.createDivElement(DESCRIPTION_CLASS + '-row');
11951
12109
  description.appendChild(this.renderTextBox(DESCRIPTION_CLASS));
11952
- description.querySelector('.' + DESCRIPTION_CLASS).setAttribute('title', this.parent.editorTitles.description);
11953
12110
  parentDiv.appendChild(description);
11954
12111
  const submit = createElement('button', { attrs: { type: 'hidden', title: 'submit', style: 'display:none' } });
11955
12112
  parentDiv.appendChild(submit);
@@ -11968,9 +12125,7 @@ class EventWindow {
11968
12125
  createInputElement(className, fieldName, type) {
11969
12126
  return createElement(type || 'input', {
11970
12127
  className: className, attrs: {
11971
- type: 'text', name: fieldName, value: '', id: fieldName,
11972
- title: ((this.l10n.getConstant(fieldName.charAt(0).toLowerCase() + fieldName.slice(1))) === '') ?
11973
- fieldName : this.l10n.getConstant(fieldName.charAt(0).toLowerCase() + fieldName.slice(1))
12128
+ type: 'text', name: fieldName, value: '', id: fieldName
11974
12129
  }
11975
12130
  });
11976
12131
  }
@@ -11992,6 +12147,7 @@ class EventWindow {
11992
12147
  enableRtl: this.parent.enableRtl,
11993
12148
  locale: this.parent.locale,
11994
12149
  floatLabelType: 'Always',
12150
+ strictMode: true,
11995
12151
  timeFormat: this.parent.activeViewOptions.timeFormat,
11996
12152
  format: (isNullOrUndefined(this.parent.dateFormat) ?
11997
12153
  this.getFormat('dateFormats') : this.parent.dateFormat) + ' ' + this.parent.activeViewOptions.timeFormat,
@@ -12059,7 +12215,7 @@ class EventWindow {
12059
12215
  text: resourceData.textField,
12060
12216
  value: resourceData.idField
12061
12217
  },
12062
- htmlAttributes: { 'title': labelValue, 'name': fieldName },
12218
+ htmlAttributes: { 'name': fieldName },
12063
12219
  floatLabelType: 'Always',
12064
12220
  placeholder: labelValue,
12065
12221
  popupHeight: '230px',
@@ -12078,7 +12234,7 @@ class EventWindow {
12078
12234
  text: resourceData.textField,
12079
12235
  value: resourceData.idField
12080
12236
  },
12081
- htmlAttributes: { 'title': labelValue, 'name': fieldName },
12237
+ htmlAttributes: { 'name': fieldName },
12082
12238
  floatLabelType: 'Always',
12083
12239
  placeholder: labelValue,
12084
12240
  popupHeight: '230px',
@@ -12487,7 +12643,7 @@ class EventWindow {
12487
12643
  this.eventData = this.eventCrudData ? this.eventData : eventData;
12488
12644
  const eventObj = extend({}, eventData, null, true);
12489
12645
  const formElements = this.getFormElements(EVENT_WINDOW_DIALOG_CLASS);
12490
- if (this.parent.isReact && formElements.length < 1) {
12646
+ if (this.parent.isReact && formElements.length < 1 && !this.cellClickAction) {
12491
12647
  this.eventCrudData = eventObj;
12492
12648
  return;
12493
12649
  }
@@ -14040,7 +14196,7 @@ class Render {
14040
14196
  }
14041
14197
  updateLabelText(view) {
14042
14198
  const content = this.parent.activeView.getLabelText(view);
14043
- this.parent.element.setAttribute('role', 'main');
14199
+ this.parent.element.setAttribute('role', 'application');
14044
14200
  this.parent.element.setAttribute('aria-label', content);
14045
14201
  }
14046
14202
  }
@@ -16228,6 +16384,72 @@ class ResourceBase {
16228
16384
  }
16229
16385
  }
16230
16386
 
16387
+ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16388
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16389
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16390
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16391
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16392
+ };
16393
+ class ToolbarItem extends ChildProperty {
16394
+ }
16395
+ __decorate$11([
16396
+ Property('')
16397
+ ], ToolbarItem.prototype, "id", void 0);
16398
+ __decorate$11([
16399
+ Property('')
16400
+ ], ToolbarItem.prototype, "text", void 0);
16401
+ __decorate$11([
16402
+ Property('auto')
16403
+ ], ToolbarItem.prototype, "width", void 0);
16404
+ __decorate$11([
16405
+ Property('')
16406
+ ], ToolbarItem.prototype, "cssClass", void 0);
16407
+ __decorate$11([
16408
+ Property(false)
16409
+ ], ToolbarItem.prototype, "showAlwaysInPopup", void 0);
16410
+ __decorate$11([
16411
+ Property(false)
16412
+ ], ToolbarItem.prototype, "disabled", void 0);
16413
+ __decorate$11([
16414
+ Property('')
16415
+ ], ToolbarItem.prototype, "prefixIcon", void 0);
16416
+ __decorate$11([
16417
+ Property('')
16418
+ ], ToolbarItem.prototype, "suffixIcon", void 0);
16419
+ __decorate$11([
16420
+ Property(true)
16421
+ ], ToolbarItem.prototype, "visible", void 0);
16422
+ __decorate$11([
16423
+ Property('None')
16424
+ ], ToolbarItem.prototype, "overflow", void 0);
16425
+ __decorate$11([
16426
+ Property('')
16427
+ ], ToolbarItem.prototype, "template", void 0);
16428
+ __decorate$11([
16429
+ Property('Button')
16430
+ ], ToolbarItem.prototype, "type", void 0);
16431
+ __decorate$11([
16432
+ Property('Both')
16433
+ ], ToolbarItem.prototype, "showTextOn", void 0);
16434
+ __decorate$11([
16435
+ Property(null)
16436
+ ], ToolbarItem.prototype, "htmlAttributes", void 0);
16437
+ __decorate$11([
16438
+ Property('')
16439
+ ], ToolbarItem.prototype, "tooltipText", void 0);
16440
+ __decorate$11([
16441
+ Property('Left')
16442
+ ], ToolbarItem.prototype, "align", void 0);
16443
+ __decorate$11([
16444
+ Property(-1)
16445
+ ], ToolbarItem.prototype, "tabIndex", void 0);
16446
+ __decorate$11([
16447
+ Property('Custom')
16448
+ ], ToolbarItem.prototype, "name", void 0);
16449
+ __decorate$11([
16450
+ Event()
16451
+ ], ToolbarItem.prototype, "click", void 0);
16452
+
16231
16453
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16232
16454
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16233
16455
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -17606,6 +17828,7 @@ let Schedule = class Schedule extends Component {
17606
17828
  }
17607
17829
  break;
17608
17830
  case 'showHeaderBar':
17831
+ case 'toolbarItems':
17609
17832
  this.destroyHeaderModule();
17610
17833
  if (newProp.showHeaderBar) {
17611
17834
  this.headerModule = new HeaderRenderer(this);
@@ -18944,6 +19167,9 @@ __decorate([
18944
19167
  __decorate([
18945
19168
  Property(true)
18946
19169
  ], Schedule.prototype, "allowSwiping", void 0);
19170
+ __decorate([
19171
+ Collection([], ToolbarItem)
19172
+ ], Schedule.prototype, "toolbarItems", void 0);
18947
19173
  __decorate([
18948
19174
  Property('Week')
18949
19175
  ], Schedule.prototype, "currentView", void 0);
@@ -20277,6 +20503,8 @@ class YearEvent extends TimelineEvent {
20277
20503
  this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
20278
20504
  const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
20279
20505
  this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
20506
+ const selector = `.${MONTH_HEADER_WRAPPER} tbody tr,.${RESOURCE_COLUMN_TABLE_CLASS} tbody tr,.${CONTENT_TABLE_CLASS} tbody tr`;
20507
+ this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
20280
20508
  const wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
20281
20509
  const months = this.getMonths();
20282
20510
  const groupIndex = (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.uiStateValues.isGroupAdaptive) ?
@@ -20338,7 +20566,9 @@ class YearEvent extends TimelineEvent {
20338
20566
  this.moreIndicatorHeight;
20339
20567
  const appArea = this.cellHeight - this.cellHeader - this.moreIndicatorHeight;
20340
20568
  const renderedAppCount = Math.floor(appArea / (this.eventHeight + EVENT_GAP$2));
20341
- const moreIndicatorCount = (count - renderedAppCount) <= 0 ? 1 : (count - renderedAppCount);
20569
+ const eventsPerRow = this.parent.rowAutoHeight ? 1 : this.parent.activeViewOptions.maxEventsPerRow;
20570
+ const moreIndicatorCount = this.parent.activeViewOptions.maxEventsPerRow ? count - eventsPerRow
20571
+ : (count - renderedAppCount) <= 0 ? 1 : count - renderedAppCount;
20342
20572
  if (this.parent.activeViewOptions.orientation === 'Horizontal') {
20343
20573
  const isRendered = this.renderedEvents.filter((eventObj) => eventObj.Guid === eventData.Guid);
20344
20574
  const isSpanned = isSpannedCollection.filter((eventObj) => eventObj.Guid === eventData.Guid);
@@ -20351,9 +20581,12 @@ class YearEvent extends TimelineEvent {
20351
20581
  continue;
20352
20582
  }
20353
20583
  }
20354
- if (this.parent.rowAutoHeight || this.cellHeight > availedHeight) {
20584
+ const enableAppRender = this.maxOrIndicator || (overlapIndex < eventsPerRow) || (this.cellHeight > availedHeight);
20585
+ if (this.parent.rowAutoHeight || enableAppRender || this.cellHeight > availedHeight) {
20355
20586
  this.renderEvent(eventWrapper, eventData, row, leftValue, rightValue, monthStart, dayIndex);
20356
- this.updateCellHeight(rowTd, availedHeight);
20587
+ if (this.parent.rowAutoHeight || this.cellHeight > availedHeight) {
20588
+ this.updateCellHeight(rowTd, availedHeight);
20589
+ }
20357
20590
  isSpannedCollection.push(eventData);
20358
20591
  }
20359
20592
  else {
@@ -20419,6 +20652,8 @@ class YearEvent extends TimelineEvent {
20419
20652
  this.cellHeader = 0;
20420
20653
  const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
20421
20654
  this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
20655
+ const selector = `.${MONTH_HEADER_WRAPPER} tbody tr,.${RESOURCE_COLUMN_TABLE_CLASS} tbody tr,.${CONTENT_TABLE_CLASS} tbody tr`;
20656
+ this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
20422
20657
  const wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
20423
20658
  const resources = this.parent.uiStateValues.isGroupAdaptive ?
20424
20659
  [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] :
@@ -20749,6 +20984,11 @@ class YearEvent extends TimelineEvent {
20749
20984
  (resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
20750
20985
  appointmentsList.push(app);
20751
20986
  }
20987
+ else if (this.parent.activeViewOptions.orientation === 'Vertical') {
20988
+ if (resetTime(appStart).getTime() >= dateStart && resetTime(appEnd).getTime() >= dateEnd) {
20989
+ appointmentsList.push(app);
20990
+ }
20991
+ }
20752
20992
  }
20753
20993
  return appointmentsList;
20754
20994
  }
@@ -21299,7 +21539,7 @@ class DragAndDrop extends ActionBase {
21299
21539
  calculateVerticalTime(e) {
21300
21540
  if (isNullOrUndefined(this.actionObj.target) ||
21301
21541
  (this.actionObj.target && isNullOrUndefined(closest(this.actionObj.target, 'tr'))) ||
21302
- (!(closest(this.actionObj.target, 'td').classList.contains(WORK_CELLS_CLASS)) &&
21542
+ (!isNullOrUndefined(closest(this.actionObj.target, 'td')) && !(closest(this.actionObj.target, 'td').classList.contains(WORK_CELLS_CLASS)) &&
21303
21543
  !(closest(this.actionObj.target, 'td').classList.contains(ALLDAY_CELLS_CLASS)))) {
21304
21544
  return;
21305
21545
  }
@@ -21336,8 +21576,8 @@ class DragAndDrop extends ActionBase {
21336
21576
  tr = trCollections[parseInt(rowIndex.toString(), 10)];
21337
21577
  }
21338
21578
  let index;
21339
- if (closest(this.actionObj.target, 'td').classList.contains(WORK_CELLS_CLASS) ||
21340
- closest(this.actionObj.target, 'td').classList.contains(ALLDAY_CELLS_CLASS)) {
21579
+ if (!isNullOrUndefined(closest(this.actionObj.target, 'td')) && (closest(this.actionObj.target, 'td').classList.contains(WORK_CELLS_CLASS) ||
21580
+ closest(this.actionObj.target, 'td').classList.contains(ALLDAY_CELLS_CLASS))) {
21341
21581
  index = closest(this.actionObj.target, 'td').cellIndex;
21342
21582
  }
21343
21583
  const colIndex = isNullOrUndefined(index) ? closest(this.actionObj.clone, 'td').cellIndex : index;
@@ -21635,7 +21875,7 @@ class DragAndDrop extends ActionBase {
21635
21875
  }
21636
21876
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
21637
21877
  swapDragging(e) {
21638
- const colIndex = closest(this.actionObj.target, 'td').cellIndex;
21878
+ const colIndex = !isNullOrUndefined(closest(this.actionObj.target, 'td')) && closest(this.actionObj.target, 'td').cellIndex;
21639
21879
  if (closest(this.actionObj.target, '.' + DATE_HEADER_WRAP_CLASS) &&
21640
21880
  !closest(this.actionObj.clone, '.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS)) {
21641
21881
  addClass([this.actionObj.clone], ALLDAY_APPOINTMENT_CLASS);
@@ -23377,9 +23617,9 @@ class VerticalView extends ViewBase {
23377
23617
  const msStartHour = startHour.getTime();
23378
23618
  const msEndHour = endHour.getTime();
23379
23619
  if (msStartHour !== msEndHour) {
23380
- const duration = this.parent.activeViewOptions.timeScale.interval / this.parent.activeViewOptions.timeScale.slotCount;
23381
- length = (Math.abs(msEndHour - msStartHour) / msInterval) - ((new Date(msEndHour).getTimezoneOffset()
23382
- - new Date(msStartHour).getTimezoneOffset()) / duration);
23620
+ let milliSeconds = (startHour.getTimezoneOffset() !== endHour.getTimezoneOffset()) ?
23621
+ (msEndHour - msStartHour) - 3600000 : (msEndHour - msStartHour);
23622
+ length = Math.round(milliSeconds / msInterval);
23383
23623
  }
23384
23624
  if (!this.parent.activeViewOptions.timeScale.enable) {
23385
23625
  length = 1;
@@ -24363,6 +24603,9 @@ class Year extends ViewBase {
24363
24603
  let classList$$1 = [];
24364
24604
  if (currentDate.getMonth() !== date.getMonth()) {
24365
24605
  classList$$1.push(OTHERMONTH_CLASS);
24606
+ if (td.firstElementChild && !this.parent.activeViewOptions.cellTemplate) {
24607
+ td.firstElementChild.setAttribute('aria-disabled', 'true');
24608
+ }
24366
24609
  }
24367
24610
  if (this.isCurrentDate(date) && currentDate.getMonth() === date.getMonth()) {
24368
24611
  classList$$1 = classList$$1.concat(['e-today', 'e-selected']);
@@ -24882,7 +25125,7 @@ class AgendaBase extends ViewBase {
24882
25125
  createResourceTableRow(tContent, tBody) {
24883
25126
  const tr = createElement('tr');
24884
25127
  let ntr;
24885
- const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
25128
+ const td = createElement('td');
24886
25129
  let tempData;
24887
25130
  let rowSpan = 0;
24888
25131
  let level;