@syncfusion/ej2-schedule 32.1.19 → 32.1.22

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.
@@ -10043,7 +10043,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10043
10043
  QuickPopups.prototype.render = function () {
10044
10044
  this.renderQuickPopup();
10045
10045
  this.renderMorePopup();
10046
- this.renderQuickDialog();
10046
+ if (this.parent.prerenderDialogs) {
10047
+ this.renderQuickDialog();
10048
+ }
10047
10049
  };
10048
10050
  QuickPopups.prototype.renderQuickPopup = function () {
10049
10051
  var quickPopupWrapper = createElement('div', { className: POPUP_WRAPPER_CLASS + ' e-popup-close', attrs: { role: 'dialog' } });
@@ -10203,6 +10205,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10203
10205
  this.fieldValidator.renderFormValidator(form, rules, this.quickPopup.element, this.parent.locale);
10204
10206
  };
10205
10207
  QuickPopups.prototype.openRecurrenceAlert = function () {
10208
+ if (!this.parent.prerenderDialogs) {
10209
+ this.renderQuickDialog();
10210
+ }
10206
10211
  var editDeleteOnly = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
10207
10212
  if (editDeleteOnly) {
10208
10213
  editDeleteOnly.innerHTML = this.l10n.getConstant(this.parent.currentAction === 'Delete' ? 'deleteEvent' : 'editEvent');
@@ -10224,6 +10229,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10224
10229
  this.showQuickDialog('RecurrenceAlert');
10225
10230
  };
10226
10231
  QuickPopups.prototype.openRecurrenceValidationAlert = function (type) {
10232
+ if (!this.parent.prerenderDialogs) {
10233
+ this.renderQuickDialog();
10234
+ }
10227
10235
  this.quickDialogClass('Alert');
10228
10236
  var okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
10229
10237
  okButton.innerHTML = this.l10n.getConstant('ok');
@@ -10267,6 +10275,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10267
10275
  if (this.parent.activeViewOptions.readonly) {
10268
10276
  return;
10269
10277
  }
10278
+ if (!this.parent.prerenderDialogs) {
10279
+ this.renderQuickDialog();
10280
+ }
10270
10281
  var okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
10271
10282
  if (okButton) {
10272
10283
  okButton.innerHTML = this.l10n.getConstant('delete');
@@ -10285,6 +10296,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10285
10296
  this.showQuickDialog('DeleteAlert');
10286
10297
  };
10287
10298
  QuickPopups.prototype.openValidationError = function (type, eventData) {
10299
+ if (!this.parent.prerenderDialogs) {
10300
+ this.renderQuickDialog();
10301
+ }
10288
10302
  this.quickDialog.header = this.l10n.getConstant('alert');
10289
10303
  this.quickDialog.content = this.l10n.getConstant(type);
10290
10304
  var okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
@@ -10314,6 +10328,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10314
10328
  if (!popupArgs.cancel) {
10315
10329
  _this.quickDialog.show();
10316
10330
  }
10331
+ if (!_this.parent.prerenderDialogs && popupArgs.cancel) {
10332
+ _this.destroyQuickDialog();
10333
+ }
10317
10334
  });
10318
10335
  };
10319
10336
  QuickPopups.prototype.createMoreEventList = function (eventCollection, groupOrder, groupIndex) {
@@ -10631,6 +10648,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10631
10648
  var cellDetails = void 0;
10632
10649
  var argsData = void 0;
10633
10650
  var resourceText = this.getResourceText(args, type.toLowerCase());
10651
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
10634
10652
  switch (type) {
10635
10653
  case 'Cell':
10636
10654
  cellDetails = this.getFormattedString(data);
@@ -10665,7 +10683,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10665
10683
  content += '<div class="' + DESCRIPTION_CLASS + '"><div class="' + DESCRIPTION_ICON_CLASS + ' ' + ICON +
10666
10684
  '"></div><div class="' + DESCRIPTION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
10667
10685
  }
10668
- if (this.parent.resourceCollection.length > 0) {
10686
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
10669
10687
  content += '<div class="' + RESOURCE_CLASS + '"><div class="' + RESOURCE_ICON_CLASS + ' ' + ICON +
10670
10688
  '"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
10671
10689
  }
@@ -10728,7 +10746,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10728
10746
  return footerTemplate;
10729
10747
  };
10730
10748
  QuickPopups.prototype.getResourceText = function (args, type) {
10731
- if (this.parent.resourceCollection.length === 0) {
10749
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
10750
+ if (this.parent.resourceCollection.length === 0 || isResourceEmpty) {
10732
10751
  return null;
10733
10752
  }
10734
10753
  var resourceValue = '';
@@ -10968,7 +10987,6 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
10968
10987
  };
10969
10988
  QuickPopups.prototype.dialogButtonClick = function (event) {
10970
10989
  this.dialogEvent = event;
10971
- this.quickDialog.hide();
10972
10990
  var target = event.target;
10973
10991
  var cancelBtn = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_CANCEL);
10974
10992
  var eventData = this.parent.activeEventData.event;
@@ -11013,6 +11031,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
11013
11031
  this.parent.uiStateValues.isIgnoreOccurrence = target.classList.contains(QUICK_DIALOG_ALERT_CANCEL);
11014
11032
  this.parent.eventWindow.eventSave(event, this.l10n.getConstant('ok'));
11015
11033
  }
11034
+ if (!isNullOrUndefined(this.quickDialog)) {
11035
+ this.quickDialog.hide();
11036
+ }
11016
11037
  };
11017
11038
  QuickPopups.prototype.updateTapHoldEventPopup = function (target) {
11018
11039
  var selectedElements = this.parent.eventBase.getSelectedEventElements(target);
@@ -11080,6 +11101,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
11080
11101
  this.parent.trigger(popupClose, args, function (popupCloseArgs) {
11081
11102
  if (!popupCloseArgs.cancel) {
11082
11103
  _this.parent.eventBase.focusElement(true);
11104
+ if (!_this.parent.prerenderDialogs) {
11105
+ _this.destroyQuickDialog();
11106
+ }
11083
11107
  }
11084
11108
  });
11085
11109
  };
@@ -11406,7 +11430,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
11406
11430
  };
11407
11431
  QuickPopups.prototype.refreshQuickDialog = function () {
11408
11432
  this.destroyQuickDialog();
11409
- this.renderQuickDialog();
11433
+ if (this.parent.prerenderDialogs) {
11434
+ this.renderQuickDialog();
11435
+ }
11410
11436
  };
11411
11437
  QuickPopups.prototype.refreshQuickPopup = function () {
11412
11438
  this.destroyQuickPopup();
@@ -11417,7 +11443,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
11417
11443
  this.renderMorePopup();
11418
11444
  };
11419
11445
  QuickPopups.prototype.destroyQuickDialog = function () {
11420
- if (this.quickDialog.element) {
11446
+ if (this.quickDialog && this.quickDialog.element) {
11421
11447
  this.quickDialog.destroy();
11422
11448
  remove(this.quickDialog.element);
11423
11449
  this.quickDialog = null;
@@ -12823,7 +12849,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12823
12849
  this.l10n = this.parent.localeObj;
12824
12850
  this.fields = this.parent.eventFields;
12825
12851
  this.eventWindowTime = { startTime: new Date(), endTime: new Date() };
12826
- this.renderEventWindow();
12852
+ if (this.parent.prerenderDialogs) {
12853
+ this.renderEventWindow();
12854
+ }
12827
12855
  }
12828
12856
  EventWindow.prototype.renderEventWindow = function () {
12829
12857
  this.element = createElement('div', { id: this.parent.element.id + '_dialog_wrapper' });
@@ -12911,6 +12939,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12911
12939
  }
12912
12940
  };
12913
12941
  EventWindow.prototype.openEditor = function (data, type, isEventData, repeatType) {
12942
+ if (!this.parent.prerenderDialogs) {
12943
+ this.renderEventWindow();
12944
+ }
12914
12945
  this.parent.currentAction = type;
12915
12946
  this.parent.removeNewEventElement();
12916
12947
  if (this.parent.quickPopup) {
@@ -13099,6 +13130,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13099
13130
  }
13100
13131
  callBackPromise.resolve(args);
13101
13132
  });
13133
+ if (!this.parent.prerenderDialogs && args.cancel) {
13134
+ this.destroy(true);
13135
+ }
13102
13136
  return callBackPromise;
13103
13137
  };
13104
13138
  EventWindow.prototype.onBeforeClose = function (args) {
@@ -13126,6 +13160,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13126
13160
  _this.resetForm();
13127
13161
  _this.parent.eventBase.focusElement(true);
13128
13162
  _this.eventCrudData = null;
13163
+ if (!_this.parent.prerenderDialogs) {
13164
+ _this.destroy(true);
13165
+ }
13129
13166
  }
13130
13167
  }
13131
13168
  callBackPromise.resolve(args);
@@ -13222,7 +13259,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13222
13259
  else {
13223
13260
  this.createRecurrenceEditor(parentDiv);
13224
13261
  }
13225
- if (this.parent.resourceCollection.length > 0) {
13262
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
13263
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
13226
13264
  var resourceParentDiv = this.createDivElement(EVENT_WINDOW_RESOURCES_DIV_CLASS);
13227
13265
  for (var _i = 0, _a = this.parent.resourceBase.resourceCollection; _i < _a.length; _i++) {
13228
13266
  var resource = _a[_i];
@@ -13767,7 +13805,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13767
13805
  if (cellsData.RecurrenceRule) {
13768
13806
  eventObj[this.fields.recurrenceRule] = cellsData.RecurrenceRule;
13769
13807
  }
13770
- if (this.parent.resourceCollection.length > 0 || this.parent.activeViewOptions.group.resources.length > 0) {
13808
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
13809
+ if ((this.parent.resourceCollection.length > 0 && !isResourceEmpty) || this.parent.activeViewOptions.group.resources.length > 0) {
13771
13810
  this.parent.resourceBase.setResourceValues(eventObj);
13772
13811
  }
13773
13812
  };
@@ -14376,7 +14415,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
14376
14415
  if (endDate.getTime() >= new Date(+startDate).setMonth(startDate.getMonth() + interval)) {
14377
14416
  alertMessage = 'createError';
14378
14417
  }
14379
- if (isNullOrUndefined(alertMessage)) {
14418
+ if (isNullOrUndefined(alertMessage) && !isNullOrUndefined(this.parent.quickPopup.quickDialog)) {
14380
14419
  this.parent.quickPopup.quickDialog.hide();
14381
14420
  }
14382
14421
  }
@@ -17424,14 +17463,16 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
17424
17463
  resourceId: levelId,
17425
17464
  resourceName: treeLevel.resourceData[resource.textField],
17426
17465
  resource: treeLevel.resource,
17427
- resourceData: treeLevel.resourceData
17466
+ resourceData: treeLevel.resourceData,
17467
+ date: _this.parent.selectedDate
17428
17468
  };
17429
17469
  }
17430
17470
  else {
17431
17471
  resObj = {
17432
17472
  type: 'resourceHeader', resource: treeLevel.resource,
17433
17473
  resourceData: treeLevel.resourceData, groupIndex: groupIndex,
17434
- groupOrder: treeLevel.groupOrder
17474
+ groupOrder: treeLevel.groupOrder,
17475
+ date: _this.parent.selectedDate
17435
17476
  };
17436
17477
  resTreeColl.push(resObj);
17437
17478
  groupIndex++;
@@ -17759,9 +17800,15 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
17759
17800
  }
17760
17801
  this.lastResourceLevel = headerLevels.slice(-1)[0] || [];
17761
17802
  if (!this.parent.activeViewOptions.group.byDate) {
17803
+ for (var levelIndex = 0; levelIndex < headerLevels.length; levelIndex++) {
17804
+ for (var _d = 0, _e = headerLevels[parseInt(levelIndex.toString(), 10)]; _d < _e.length; _d++) {
17805
+ var levelItem = _e[_d];
17806
+ levelItem.date = this.parent.selectedDate;
17807
+ }
17808
+ }
17762
17809
  var index = 0;
17763
- for (var _d = 0, _e = this.lastResourceLevel; _d < _e.length; _d++) {
17764
- var lastLevelResource = _e[_d];
17810
+ for (var _f = 0, _g = this.lastResourceLevel; _f < _g.length; _f++) {
17811
+ var lastLevelResource = _g[_f];
17765
17812
  for (var i = 0; i < lastLevelResource.colSpan; i++) {
17766
17813
  lastColumnDates[parseInt(index.toString(), 10)].groupIndex = lastLevelResource.groupIndex;
17767
17814
  index++;
@@ -17845,8 +17892,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
17845
17892
  dateIndex++;
17846
17893
  };
17847
17894
  var this_3 = this;
17848
- for (var _f = 0, headerDates_1 = headerDates; _f < headerDates_1.length; _f++) {
17849
- var headerDate = headerDates_1[_f];
17895
+ for (var _h = 0, headerDates_1 = headerDates; _h < headerDates_1.length; _h++) {
17896
+ var headerDate = headerDates_1[_h];
17850
17897
  _loop_3(headerDate);
17851
17898
  }
17852
17899
  this.resourceDateTree = this.resourceDateTree.filter(function (data) { return data.length > 0; });
@@ -17859,19 +17906,23 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
17859
17906
  return dateHeaderLevels;
17860
17907
  }
17861
17908
  var dateColSpan = 0;
17862
- for (var _g = 0, _h = levels[0]; _g < _h.length; _g++) {
17863
- var firstRowTd = _h[_g];
17909
+ for (var _j = 0, _k = levels[0]; _j < _k.length; _j++) {
17910
+ var firstRowTd = _k[_j];
17864
17911
  dateColSpan += firstRowTd.colSpan;
17865
17912
  }
17866
- for (var _j = 0, headerDates_2 = headerDates; _j < headerDates_2.length; _j++) {
17867
- var headerDate = headerDates_2[_j];
17913
+ for (var _l = 0, headerDates_2 = headerDates; _l < headerDates_2.length; _l++) {
17914
+ var headerDate = headerDates_2[_l];
17868
17915
  headerDate.colSpan = dateColSpan;
17869
17916
  datesColumn.push(headerDate);
17870
17917
  var resGroup = extend([], levels, null, true);
17871
17918
  for (var k = 0, length_2 = resGroup.length; k < length_2; k++) {
17919
+ for (var _m = 0, _o = resGroup[parseInt(k.toString(), 10)]; _m < _o.length; _m++) {
17920
+ var resTd = _o[_m];
17921
+ resTd.date = headerDate.date;
17922
+ }
17872
17923
  if (k === resGroup.length - 1) {
17873
- for (var _k = 0, _l = resGroup[parseInt(k.toString(), 10)]; _k < _l.length; _k++) {
17874
- var resTd = _l[_k];
17924
+ for (var _p = 0, _q = resGroup[parseInt(k.toString(), 10)]; _p < _q.length; _p++) {
17925
+ var resTd = _q[_p];
17875
17926
  resTd.date = headerDate.date;
17876
17927
  resTd.workDays = headerDate.workDays;
17877
17928
  resTd.startHour = this.parent.getStartEndTime(resTd.resourceData[resTd.resource.startHourField]) ||
@@ -17925,10 +17976,13 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
17925
17976
  if (isNullOrUndefined(groupOrder) && this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {
17926
17977
  return undefined;
17927
17978
  }
17928
- var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
17929
- var data = this.filterData(resource.dataSource, resource.idField, id);
17930
- if (data.length > 0) {
17931
- return data[0][resource.colorField];
17979
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
17980
+ if (!isResourceEmpty) {
17981
+ var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
17982
+ var data = this.filterData(resource.dataSource, resource.idField, id);
17983
+ if (data.length > 0) {
17984
+ return data[0][resource.colorField];
17985
+ }
17932
17986
  }
17933
17987
  return undefined;
17934
17988
  };
@@ -18579,6 +18633,19 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18579
18633
  (currentIndex === -1) ? 0 : currentIndex;
18580
18634
  }
18581
18635
  };
18636
+ /**
18637
+ * Checks if resources have empty dataSource
18638
+ *
18639
+ * @returns {boolean} Returns true if resources have empty dataSource, otherwise false
18640
+ * @private
18641
+ */
18642
+ Schedule.prototype.isResourceCollectionEmpty = function () {
18643
+ return this.resourceCollection.length > 0 &&
18644
+ this.resourceCollection.some(function (res) {
18645
+ var ds = res && res.dataSource;
18646
+ return Array.isArray(ds) ? ds.length === 0 : !ds;
18647
+ });
18648
+ };
18582
18649
  Schedule.prototype.getActiveViewOptions = function () {
18583
18650
  var timeScale = {
18584
18651
  enable: this.timeScale.enable,
@@ -18587,12 +18654,20 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18587
18654
  majorSlotTemplate: this.timeScale.majorSlotTemplate,
18588
18655
  minorSlotTemplate: this.timeScale.minorSlotTemplate
18589
18656
  };
18657
+ var isResourceEmpty = this.isResourceCollectionEmpty();
18590
18658
  var isYearView = this.viewCollections[this.viewIndex].option.indexOf('Year') > -1;
18659
+ var groupResources = [];
18660
+ if ((!isNullOrUndefined(this.group.resources) && this.group.resources.length > 0) && !isResourceEmpty) {
18661
+ groupResources = this.group.resources;
18662
+ }
18663
+ else if (this.resources.length > 0 && !isResourceEmpty) {
18664
+ groupResources = [];
18665
+ }
18591
18666
  var group = {
18592
- byDate: isYearView ? false : this.group.byDate,
18667
+ byDate: (isYearView || isResourceEmpty) ? false : this.group.byDate,
18593
18668
  byGroupID: this.group.byGroupID,
18594
18669
  allowGroupEdit: this.group.allowGroupEdit,
18595
- resources: isNullOrUndefined(this.group.resources) ? [] : this.group.resources,
18670
+ resources: groupResources,
18596
18671
  headerTooltipTemplate: this.group.headerTooltipTemplate,
18597
18672
  enableCompactView: this.group.enableCompactView,
18598
18673
  hideNonWorkingDays: ['Day', 'Week', 'WorkWeek', 'Month'].indexOf(this.currentView) > -1 ? this.group.hideNonWorkingDays : false
@@ -19107,7 +19182,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
19107
19182
  * @private
19108
19183
  */
19109
19184
  Schedule.prototype.removeSelectedClass = function () {
19110
- var selectedCells = this.getSelectedCells();
19185
+ var selectedCells = [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
19111
19186
  for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
19112
19187
  var cell = selectedCells_1[_i];
19113
19188
  cell.removeAttribute('tabindex');
@@ -19540,7 +19615,23 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
19540
19615
  * @private
19541
19616
  */
19542
19617
  Schedule.prototype.getSelectedCells = function () {
19543
- return [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
19618
+ var selectedCells = [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
19619
+ if (!selectedCells || selectedCells.length === 0) {
19620
+ return [];
19621
+ }
19622
+ else if (selectedCells.length === 1) {
19623
+ return selectedCells;
19624
+ }
19625
+ if (selectedCells && selectedCells.length > 1) {
19626
+ var hasAnyWorkCells = selectedCells.some(function (cell) { return cell.classList.contains(WORK_CELLS_CLASS); });
19627
+ var workCells = hasAnyWorkCells ?
19628
+ selectedCells.filter(function (cell) { return !cell.classList.contains(ALLDAY_CELLS_CLASS); }) : selectedCells;
19629
+ if (!workCells || workCells.length === 0) {
19630
+ return [];
19631
+ }
19632
+ return workCells.slice().sort(function (a, b) { return (+a.dataset.date || 0) - (+b.dataset.date || 0); });
19633
+ }
19634
+ return selectedCells;
19544
19635
  };
19545
19636
  /**
19546
19637
  * Method to generate the announcement string
@@ -19739,6 +19830,17 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
19739
19830
  state.isLayout = true;
19740
19831
  }
19741
19832
  break;
19833
+ case 'prerenderDialogs': {
19834
+ if (newProp.prerenderDialogs) {
19835
+ this.eventWindow.renderEventWindow();
19836
+ this.quickPopup.renderQuickDialog();
19837
+ }
19838
+ else {
19839
+ this.eventWindow.destroy(true);
19840
+ this.quickPopup.destroyQuickDialog();
19841
+ }
19842
+ break;
19843
+ }
19742
19844
  case 'showWeekend':
19743
19845
  case 'startHour':
19744
19846
  case 'endHour':
@@ -21048,6 +21150,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
21048
21150
  */
21049
21151
  Schedule.prototype.openOverlapAlert = function (args) {
21050
21152
  var _this = this;
21153
+ if (!this.prerenderDialogs) {
21154
+ return;
21155
+ }
21051
21156
  if (this.quickPopup) {
21052
21157
  var eventProp = {
21053
21158
  type: 'OverlapAlert',
@@ -21071,6 +21176,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
21071
21176
  */
21072
21177
  Schedule.prototype.closeOverlapAlert = function () {
21073
21178
  var _this = this;
21179
+ if (!this.prerenderDialogs) {
21180
+ return;
21181
+ }
21074
21182
  if (this.quickPopup) {
21075
21183
  var args = {
21076
21184
  type: 'OverlapAlert',
@@ -21382,6 +21490,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
21382
21490
  __decorate$b([
21383
21491
  Property(true)
21384
21492
  ], Schedule.prototype, "showQuickInfo", void 0);
21493
+ __decorate$b([
21494
+ Property(true)
21495
+ ], Schedule.prototype, "prerenderDialogs", void 0);
21385
21496
  __decorate$b([
21386
21497
  Property(false)
21387
21498
  ], Schedule.prototype, "allowInline", void 0);
@@ -21648,7 +21759,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
21648
21759
  var startHour = this.parent.activeView.getStartHour();
21649
21760
  var intervalInMS = MS_PER_MINUTE * this.actionObj.interval;
21650
21761
  dateInMS += (startHour.getHours() * 60 + startHour.getMinutes()) * MS_PER_MINUTE + startHour.getSeconds() * 1000;
21651
- dateInMS = dateInMS + Math.floor((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
21762
+ dateInMS = dateInMS + ((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
21652
21763
  return new Date(dateInMS);
21653
21764
  };
21654
21765
  ActionBase.prototype.getContentAreaDimension = function () {
@@ -22440,7 +22551,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
22440
22551
  var offsetWidth = (Math.round(offset / this.actionObj.cellWidth) *
22441
22552
  this.actionObj.cellWidth) + (isLeft ? 0 : (this.parent.getElementWidth(this.actionObj.clone) -
22442
22553
  this.actionObj.cellWidth));
22443
- cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
22554
+ cellIndex = Math.ceil(offsetWidth / this.actionObj.cellWidth);
22444
22555
  }
22445
22556
  isLastCell = cellIndex === tdCollections.length;
22446
22557
  cellIndex = this.getIndex(cellIndex);
@@ -22458,13 +22569,29 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
22458
22569
  }
22459
22570
  else {
22460
22571
  if (!isLeft) {
22461
- offset += this.parent.getElementWidth(this.actionObj.clone);
22462
- }
22463
- var spanMinutes = Math.floor((this.actionObj.slotInterval / this.actionObj.cellWidth) *
22572
+ var cloneWidth = this.parent.getElementWidth(this.actionObj.clone);
22573
+ var pixelsPerInterval = this.actionObj.cellWidth /
22574
+ (this.actionObj.slotInterval / this.actionObj.interval);
22575
+ var numIntervals = Math.round(cloneWidth / pixelsPerInterval);
22576
+ cloneWidth = numIntervals * pixelsPerInterval;
22577
+ offset = offset + cloneWidth;
22578
+ }
22579
+ var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
22464
22580
  (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
22465
22581
  spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
22466
22582
  resizeTime = new Date(resizeDate.getTime());
22467
22583
  resizeTime = new Date(resizeDate.getTime() + (spanMinutes * MS_PER_MINUTE));
22584
+ var isCustomResizeInterval = this.actionObj.interval !== this.actionObj.slotInterval;
22585
+ var initialCellTime = new Date(resizeTime.getTime());
22586
+ var intervalInMS = this.actionObj.interval * 60000;
22587
+ if (intervalInMS > 0 && isCustomResizeInterval) {
22588
+ if (this.resizeEdges.right || this.resizeEdges.left) {
22589
+ var eventTime = this.resizeEdges.right ? eventEnd : eventStart;
22590
+ var timeDifferenceMs = initialCellTime.getTime() - eventTime.getTime();
22591
+ var intervalCount = Math.round(timeDifferenceMs / intervalInMS);
22592
+ resizeTime = new Date(eventTime.getTime() + intervalCount * intervalInMS);
22593
+ }
22594
+ }
22468
22595
  this.updateTimePosition(resizeTime);
22469
22596
  }
22470
22597
  }
@@ -24872,14 +24999,18 @@ var ViewBase = /** @__PURE__ @class */ (function () {
24872
24999
  }
24873
25000
  };
24874
25001
  ViewBase.prototype.getHeaderBarHeight = function () {
24875
- var headerBarHeight = 2;
25002
+ var computedStyle = getComputedStyle(this.parent.element);
25003
+ var borderTop = parseFloat(computedStyle.borderTopWidth) || 1;
25004
+ var borderBottom = parseFloat(computedStyle.borderBottomWidth) || 1;
25005
+ var border = Math.round(borderTop + borderBottom);
25006
+ var headerBarHeight = border;
24876
25007
  if (this.parent.headerModule) {
24877
25008
  headerBarHeight += getOuterHeight(this.parent.headerModule.getHeaderElement());
24878
25009
  }
24879
25010
  if (this.parent.uiStateValues.isGroupAdaptive) {
24880
25011
  var resHeader = this.parent.element.querySelector('.' + RESOURCE_HEADER_TOOLBAR);
24881
25012
  if (resHeader) {
24882
- headerBarHeight += resHeader.offsetHeight;
25013
+ headerBarHeight += getOuterHeight(resHeader);
24883
25014
  }
24884
25015
  }
24885
25016
  return headerBarHeight;
@@ -25167,7 +25298,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
25167
25298
  ViewBase.prototype.setResourceHeaderContent = function (tdElement, tdData, className) {
25168
25299
  if (className === void 0) { className = TEXT_ELLIPSIS; }
25169
25300
  if (this.parent.activeViewOptions.resourceHeaderTemplate) {
25170
- var data = { resource: tdData.resource, resourceData: tdData.resourceData };
25301
+ var data = { resource: tdData.resource, resourceData: tdData.resourceData, date: tdData.date };
25171
25302
  var scheduleId = this.parent.element.id + '_';
25172
25303
  var viewName = this.parent.activeViewOptions.resourceHeaderTemplateName;
25173
25304
  var templateId = scheduleId + viewName + 'resourceHeaderTemplate';
@@ -27814,7 +27945,7 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
27814
27945
  groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
27815
27946
  resourceData: resData[parseInt(res.toString(), 10)].resourceData,
27816
27947
  groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
27817
- date: agendaDate
27948
+ date: this.parent.activeViewOptions.group.byDate ? firstDate : agendaDate
27818
27949
  };
27819
27950
  lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
27820
27951
  tempLastLevelInfo.push(extend({}, tempObj, null, true));
@@ -27842,7 +27973,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
27842
27973
  tempGroupedData[0].type = 'parentColumnLevel_' + (y + 1);
27843
27974
  tempGroupedData[0].resource = topResources[topResources.length - (y + 1)];
27844
27975
  tempGroupedData[0].resourceData = data[parseInt(x.toString(), 10)];
27845
- tempGroupedData[0].date = agendaDate;
27976
+ tempGroupedData[0].date = this.parent.activeViewOptions.group.byDate ?
27977
+ tempLastLevelInfo[parseInt(u.toString(), 10)].date : agendaDate;
27846
27978
  lastLevelInfo[tempGroupedData[0].groupIndex].push(tempGroupedData[0]);
27847
27979
  tempGroupedData = [];
27848
27980
  totalRowSpan = 0;