@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.
@@ -9788,7 +9788,9 @@ class QuickPopups {
9788
9788
  render() {
9789
9789
  this.renderQuickPopup();
9790
9790
  this.renderMorePopup();
9791
- this.renderQuickDialog();
9791
+ if (this.parent.prerenderDialogs) {
9792
+ this.renderQuickDialog();
9793
+ }
9792
9794
  }
9793
9795
  renderQuickPopup() {
9794
9796
  const quickPopupWrapper = createElement('div', { className: POPUP_WRAPPER_CLASS + ' e-popup-close', attrs: { role: 'dialog' } });
@@ -9948,6 +9950,9 @@ class QuickPopups {
9948
9950
  this.fieldValidator.renderFormValidator(form, rules, this.quickPopup.element, this.parent.locale);
9949
9951
  }
9950
9952
  openRecurrenceAlert() {
9953
+ if (!this.parent.prerenderDialogs) {
9954
+ this.renderQuickDialog();
9955
+ }
9951
9956
  const editDeleteOnly = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
9952
9957
  if (editDeleteOnly) {
9953
9958
  editDeleteOnly.innerHTML = this.l10n.getConstant(this.parent.currentAction === 'Delete' ? 'deleteEvent' : 'editEvent');
@@ -9969,6 +9974,9 @@ class QuickPopups {
9969
9974
  this.showQuickDialog('RecurrenceAlert');
9970
9975
  }
9971
9976
  openRecurrenceValidationAlert(type) {
9977
+ if (!this.parent.prerenderDialogs) {
9978
+ this.renderQuickDialog();
9979
+ }
9972
9980
  this.quickDialogClass('Alert');
9973
9981
  const okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
9974
9982
  okButton.innerHTML = this.l10n.getConstant('ok');
@@ -10012,6 +10020,9 @@ class QuickPopups {
10012
10020
  if (this.parent.activeViewOptions.readonly) {
10013
10021
  return;
10014
10022
  }
10023
+ if (!this.parent.prerenderDialogs) {
10024
+ this.renderQuickDialog();
10025
+ }
10015
10026
  const okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
10016
10027
  if (okButton) {
10017
10028
  okButton.innerHTML = this.l10n.getConstant('delete');
@@ -10030,6 +10041,9 @@ class QuickPopups {
10030
10041
  this.showQuickDialog('DeleteAlert');
10031
10042
  }
10032
10043
  openValidationError(type, eventData) {
10044
+ if (!this.parent.prerenderDialogs) {
10045
+ this.renderQuickDialog();
10046
+ }
10033
10047
  this.quickDialog.header = this.l10n.getConstant('alert');
10034
10048
  this.quickDialog.content = this.l10n.getConstant(type);
10035
10049
  const okButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_OK);
@@ -10058,6 +10072,9 @@ class QuickPopups {
10058
10072
  if (!popupArgs.cancel) {
10059
10073
  this.quickDialog.show();
10060
10074
  }
10075
+ if (!this.parent.prerenderDialogs && popupArgs.cancel) {
10076
+ this.destroyQuickDialog();
10077
+ }
10061
10078
  });
10062
10079
  }
10063
10080
  createMoreEventList(eventCollection, groupOrder, groupIndex) {
@@ -10369,6 +10386,7 @@ class QuickPopups {
10369
10386
  let cellDetails;
10370
10387
  let argsData;
10371
10388
  const resourceText = this.getResourceText(args, type.toLowerCase());
10389
+ const isResourceEmpty = this.parent.isResourceCollectionEmpty();
10372
10390
  switch (type) {
10373
10391
  case 'Cell':
10374
10392
  cellDetails = this.getFormattedString(data);
@@ -10404,7 +10422,7 @@ class QuickPopups {
10404
10422
  content += '<div class="' + DESCRIPTION_CLASS + '"><div class="' + DESCRIPTION_ICON_CLASS + ' ' + ICON +
10405
10423
  '"></div><div class="' + DESCRIPTION_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
10406
10424
  }
10407
- if (this.parent.resourceCollection.length > 0) {
10425
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
10408
10426
  content += '<div class="' + RESOURCE_CLASS + '"><div class="' + RESOURCE_ICON_CLASS + ' ' + ICON +
10409
10427
  '"></div><div class="' + RESOURCE_DETAILS_CLASS + ' ' + TEXT_ELLIPSIS + '"></div></div>';
10410
10428
  }
@@ -10467,7 +10485,8 @@ class QuickPopups {
10467
10485
  return footerTemplate;
10468
10486
  }
10469
10487
  getResourceText(args, type) {
10470
- if (this.parent.resourceCollection.length === 0) {
10488
+ const isResourceEmpty = this.parent.isResourceCollectionEmpty();
10489
+ if (this.parent.resourceCollection.length === 0 || isResourceEmpty) {
10471
10490
  return null;
10472
10491
  }
10473
10492
  let resourceValue = '';
@@ -10700,7 +10719,6 @@ class QuickPopups {
10700
10719
  }
10701
10720
  dialogButtonClick(event) {
10702
10721
  this.dialogEvent = event;
10703
- this.quickDialog.hide();
10704
10722
  const target = event.target;
10705
10723
  const cancelBtn = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_CANCEL);
10706
10724
  const eventData = this.parent.activeEventData.event;
@@ -10745,6 +10763,9 @@ class QuickPopups {
10745
10763
  this.parent.uiStateValues.isIgnoreOccurrence = target.classList.contains(QUICK_DIALOG_ALERT_CANCEL);
10746
10764
  this.parent.eventWindow.eventSave(event, this.l10n.getConstant('ok'));
10747
10765
  }
10766
+ if (!isNullOrUndefined(this.quickDialog)) {
10767
+ this.quickDialog.hide();
10768
+ }
10748
10769
  }
10749
10770
  updateTapHoldEventPopup(target) {
10750
10771
  const selectedElements = this.parent.eventBase.getSelectedEventElements(target);
@@ -10811,6 +10832,9 @@ class QuickPopups {
10811
10832
  this.parent.trigger(popupClose, args, (popupCloseArgs) => {
10812
10833
  if (!popupCloseArgs.cancel) {
10813
10834
  this.parent.eventBase.focusElement(true);
10835
+ if (!this.parent.prerenderDialogs) {
10836
+ this.destroyQuickDialog();
10837
+ }
10814
10838
  }
10815
10839
  });
10816
10840
  }
@@ -11134,7 +11158,9 @@ class QuickPopups {
11134
11158
  }
11135
11159
  refreshQuickDialog() {
11136
11160
  this.destroyQuickDialog();
11137
- this.renderQuickDialog();
11161
+ if (this.parent.prerenderDialogs) {
11162
+ this.renderQuickDialog();
11163
+ }
11138
11164
  }
11139
11165
  refreshQuickPopup() {
11140
11166
  this.destroyQuickPopup();
@@ -11145,7 +11171,7 @@ class QuickPopups {
11145
11171
  this.renderMorePopup();
11146
11172
  }
11147
11173
  destroyQuickDialog() {
11148
- if (this.quickDialog.element) {
11174
+ if (this.quickDialog && this.quickDialog.element) {
11149
11175
  this.quickDialog.destroy();
11150
11176
  remove(this.quickDialog.element);
11151
11177
  this.quickDialog = null;
@@ -12514,7 +12540,9 @@ class EventWindow {
12514
12540
  this.l10n = this.parent.localeObj;
12515
12541
  this.fields = this.parent.eventFields;
12516
12542
  this.eventWindowTime = { startTime: new Date(), endTime: new Date() };
12517
- this.renderEventWindow();
12543
+ if (this.parent.prerenderDialogs) {
12544
+ this.renderEventWindow();
12545
+ }
12518
12546
  }
12519
12547
  renderEventWindow() {
12520
12548
  this.element = createElement('div', { id: this.parent.element.id + '_dialog_wrapper' });
@@ -12602,6 +12630,9 @@ class EventWindow {
12602
12630
  }
12603
12631
  }
12604
12632
  openEditor(data, type, isEventData, repeatType) {
12633
+ if (!this.parent.prerenderDialogs) {
12634
+ this.renderEventWindow();
12635
+ }
12605
12636
  this.parent.currentAction = type;
12606
12637
  this.parent.removeNewEventElement();
12607
12638
  if (this.parent.quickPopup) {
@@ -12789,6 +12820,9 @@ class EventWindow {
12789
12820
  }
12790
12821
  callBackPromise.resolve(args);
12791
12822
  });
12823
+ if (!this.parent.prerenderDialogs && args.cancel) {
12824
+ this.destroy(true);
12825
+ }
12792
12826
  return callBackPromise;
12793
12827
  }
12794
12828
  onBeforeClose(args) {
@@ -12815,6 +12849,9 @@ class EventWindow {
12815
12849
  this.resetForm();
12816
12850
  this.parent.eventBase.focusElement(true);
12817
12851
  this.eventCrudData = null;
12852
+ if (!this.parent.prerenderDialogs) {
12853
+ this.destroy(true);
12854
+ }
12818
12855
  }
12819
12856
  }
12820
12857
  callBackPromise.resolve(args);
@@ -12909,7 +12946,8 @@ class EventWindow {
12909
12946
  else {
12910
12947
  this.createRecurrenceEditor(parentDiv);
12911
12948
  }
12912
- if (this.parent.resourceCollection.length > 0) {
12949
+ const isResourceEmpty = this.parent.isResourceCollectionEmpty();
12950
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
12913
12951
  const resourceParentDiv = this.createDivElement(EVENT_WINDOW_RESOURCES_DIV_CLASS);
12914
12952
  for (const resource of this.parent.resourceBase.resourceCollection) {
12915
12953
  resourceParentDiv.appendChild(this.renderResourceDetails(resource));
@@ -13444,7 +13482,8 @@ class EventWindow {
13444
13482
  if (cellsData.RecurrenceRule) {
13445
13483
  eventObj[this.fields.recurrenceRule] = cellsData.RecurrenceRule;
13446
13484
  }
13447
- if (this.parent.resourceCollection.length > 0 || this.parent.activeViewOptions.group.resources.length > 0) {
13485
+ const isResourceEmpty = this.parent.isResourceCollectionEmpty();
13486
+ if ((this.parent.resourceCollection.length > 0 && !isResourceEmpty) || this.parent.activeViewOptions.group.resources.length > 0) {
13448
13487
  this.parent.resourceBase.setResourceValues(eventObj);
13449
13488
  }
13450
13489
  }
@@ -14043,7 +14082,7 @@ class EventWindow {
14043
14082
  if (endDate.getTime() >= new Date(+startDate).setMonth(startDate.getMonth() + interval)) {
14044
14083
  alertMessage = 'createError';
14045
14084
  }
14046
- if (isNullOrUndefined(alertMessage)) {
14085
+ if (isNullOrUndefined(alertMessage) && !isNullOrUndefined(this.parent.quickPopup.quickDialog)) {
14047
14086
  this.parent.quickPopup.quickDialog.hide();
14048
14087
  }
14049
14088
  }
@@ -16844,14 +16883,16 @@ class ResourceBase {
16844
16883
  resourceId: levelId,
16845
16884
  resourceName: treeLevel.resourceData[resource.textField],
16846
16885
  resource: treeLevel.resource,
16847
- resourceData: treeLevel.resourceData
16886
+ resourceData: treeLevel.resourceData,
16887
+ date: this.parent.selectedDate
16848
16888
  };
16849
16889
  }
16850
16890
  else {
16851
16891
  resObj = {
16852
16892
  type: 'resourceHeader', resource: treeLevel.resource,
16853
16893
  resourceData: treeLevel.resourceData, groupIndex: groupIndex,
16854
- groupOrder: treeLevel.groupOrder
16894
+ groupOrder: treeLevel.groupOrder,
16895
+ date: this.parent.selectedDate
16855
16896
  };
16856
16897
  resTreeColl.push(resObj);
16857
16898
  groupIndex++;
@@ -17155,6 +17196,11 @@ class ResourceBase {
17155
17196
  }
17156
17197
  this.lastResourceLevel = headerLevels.slice(-1)[0] || [];
17157
17198
  if (!this.parent.activeViewOptions.group.byDate) {
17199
+ for (let levelIndex = 0; levelIndex < headerLevels.length; levelIndex++) {
17200
+ for (const levelItem of headerLevels[parseInt(levelIndex.toString(), 10)]) {
17201
+ levelItem.date = this.parent.selectedDate;
17202
+ }
17203
+ }
17158
17204
  let index = 0;
17159
17205
  for (const lastLevelResource of this.lastResourceLevel) {
17160
17206
  for (let i = 0; i < lastLevelResource.colSpan; i++) {
@@ -17247,6 +17293,9 @@ class ResourceBase {
17247
17293
  datesColumn.push(headerDate);
17248
17294
  const resGroup = extend([], levels, null, true);
17249
17295
  for (let k = 0, length = resGroup.length; k < length; k++) {
17296
+ for (const resTd of resGroup[parseInt(k.toString(), 10)]) {
17297
+ resTd.date = headerDate.date;
17298
+ }
17250
17299
  if (k === resGroup.length - 1) {
17251
17300
  for (const resTd of resGroup[parseInt(k.toString(), 10)]) {
17252
17301
  resTd.date = headerDate.date;
@@ -17301,10 +17350,13 @@ class ResourceBase {
17301
17350
  if (isNullOrUndefined(groupOrder) && this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {
17302
17351
  return undefined;
17303
17352
  }
17304
- const id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
17305
- const data = this.filterData(resource.dataSource, resource.idField, id);
17306
- if (data.length > 0) {
17307
- return data[0][resource.colorField];
17353
+ const isResourceEmpty = this.parent.isResourceCollectionEmpty();
17354
+ if (!isResourceEmpty) {
17355
+ const id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
17356
+ const data = this.filterData(resource.dataSource, resource.idField, id);
17357
+ if (data.length > 0) {
17358
+ return data[0][resource.colorField];
17359
+ }
17308
17360
  }
17309
17361
  return undefined;
17310
17362
  }
@@ -17895,6 +17947,19 @@ let Schedule = class Schedule extends Component {
17895
17947
  (currentIndex === -1) ? 0 : currentIndex;
17896
17948
  }
17897
17949
  }
17950
+ /**
17951
+ * Checks if resources have empty dataSource
17952
+ *
17953
+ * @returns {boolean} Returns true if resources have empty dataSource, otherwise false
17954
+ * @private
17955
+ */
17956
+ isResourceCollectionEmpty() {
17957
+ return this.resourceCollection.length > 0 &&
17958
+ this.resourceCollection.some((res) => {
17959
+ const ds = res && res.dataSource;
17960
+ return Array.isArray(ds) ? ds.length === 0 : !ds;
17961
+ });
17962
+ }
17898
17963
  getActiveViewOptions() {
17899
17964
  const timeScale = {
17900
17965
  enable: this.timeScale.enable,
@@ -17903,12 +17968,20 @@ let Schedule = class Schedule extends Component {
17903
17968
  majorSlotTemplate: this.timeScale.majorSlotTemplate,
17904
17969
  minorSlotTemplate: this.timeScale.minorSlotTemplate
17905
17970
  };
17971
+ const isResourceEmpty = this.isResourceCollectionEmpty();
17906
17972
  const isYearView = this.viewCollections[this.viewIndex].option.indexOf('Year') > -1;
17973
+ let groupResources = [];
17974
+ if ((!isNullOrUndefined(this.group.resources) && this.group.resources.length > 0) && !isResourceEmpty) {
17975
+ groupResources = this.group.resources;
17976
+ }
17977
+ else if (this.resources.length > 0 && !isResourceEmpty) {
17978
+ groupResources = [];
17979
+ }
17907
17980
  const group = {
17908
- byDate: isYearView ? false : this.group.byDate,
17981
+ byDate: (isYearView || isResourceEmpty) ? false : this.group.byDate,
17909
17982
  byGroupID: this.group.byGroupID,
17910
17983
  allowGroupEdit: this.group.allowGroupEdit,
17911
- resources: isNullOrUndefined(this.group.resources) ? [] : this.group.resources,
17984
+ resources: groupResources,
17912
17985
  headerTooltipTemplate: this.group.headerTooltipTemplate,
17913
17986
  enableCompactView: this.group.enableCompactView,
17914
17987
  hideNonWorkingDays: ['Day', 'Week', 'WorkWeek', 'Month'].indexOf(this.currentView) > -1 ? this.group.hideNonWorkingDays : false
@@ -18417,7 +18490,7 @@ let Schedule = class Schedule extends Component {
18417
18490
  * @private
18418
18491
  */
18419
18492
  removeSelectedClass() {
18420
- const selectedCells = this.getSelectedCells();
18493
+ const selectedCells = [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
18421
18494
  for (const cell of selectedCells) {
18422
18495
  cell.removeAttribute('tabindex');
18423
18496
  }
@@ -18849,7 +18922,23 @@ let Schedule = class Schedule extends Component {
18849
18922
  * @private
18850
18923
  */
18851
18924
  getSelectedCells() {
18852
- return [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
18925
+ const selectedCells = [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
18926
+ if (!selectedCells || selectedCells.length === 0) {
18927
+ return [];
18928
+ }
18929
+ else if (selectedCells.length === 1) {
18930
+ return selectedCells;
18931
+ }
18932
+ if (selectedCells && selectedCells.length > 1) {
18933
+ const hasAnyWorkCells = selectedCells.some((cell) => cell.classList.contains(WORK_CELLS_CLASS));
18934
+ const workCells = hasAnyWorkCells ?
18935
+ selectedCells.filter((cell) => !cell.classList.contains(ALLDAY_CELLS_CLASS)) : selectedCells;
18936
+ if (!workCells || workCells.length === 0) {
18937
+ return [];
18938
+ }
18939
+ return [...workCells].sort((a, b) => (+a.dataset.date || 0) - (+b.dataset.date || 0));
18940
+ }
18941
+ return selectedCells;
18853
18942
  }
18854
18943
  /**
18855
18944
  * Method to generate the announcement string
@@ -19047,6 +19136,17 @@ let Schedule = class Schedule extends Component {
19047
19136
  state.isLayout = true;
19048
19137
  }
19049
19138
  break;
19139
+ case 'prerenderDialogs': {
19140
+ if (newProp.prerenderDialogs) {
19141
+ this.eventWindow.renderEventWindow();
19142
+ this.quickPopup.renderQuickDialog();
19143
+ }
19144
+ else {
19145
+ this.eventWindow.destroy(true);
19146
+ this.quickPopup.destroyQuickDialog();
19147
+ }
19148
+ break;
19149
+ }
19050
19150
  case 'showWeekend':
19051
19151
  case 'startHour':
19052
19152
  case 'endHour':
@@ -20339,6 +20439,9 @@ let Schedule = class Schedule extends Component {
20339
20439
  * @returns {void}
20340
20440
  */
20341
20441
  openOverlapAlert(args) {
20442
+ if (!this.prerenderDialogs) {
20443
+ return;
20444
+ }
20342
20445
  if (this.quickPopup) {
20343
20446
  const eventProp = {
20344
20447
  type: 'OverlapAlert',
@@ -20361,6 +20464,9 @@ let Schedule = class Schedule extends Component {
20361
20464
  * @returns {void}
20362
20465
  */
20363
20466
  closeOverlapAlert() {
20467
+ if (!this.prerenderDialogs) {
20468
+ return;
20469
+ }
20364
20470
  if (this.quickPopup) {
20365
20471
  const args = {
20366
20472
  type: 'OverlapAlert',
@@ -20671,6 +20777,9 @@ __decorate$b([
20671
20777
  __decorate$b([
20672
20778
  Property(true)
20673
20779
  ], Schedule.prototype, "showQuickInfo", void 0);
20780
+ __decorate$b([
20781
+ Property(true)
20782
+ ], Schedule.prototype, "prerenderDialogs", void 0);
20674
20783
  __decorate$b([
20675
20784
  Property(false)
20676
20785
  ], Schedule.prototype, "allowInline", void 0);
@@ -20932,7 +21041,7 @@ class ActionBase {
20932
21041
  const startHour = this.parent.activeView.getStartHour();
20933
21042
  const intervalInMS = MS_PER_MINUTE * this.actionObj.interval;
20934
21043
  dateInMS += (startHour.getHours() * 60 + startHour.getMinutes()) * MS_PER_MINUTE + startHour.getSeconds() * 1000;
20935
- dateInMS = dateInMS + Math.floor((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
21044
+ dateInMS = dateInMS + ((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
20936
21045
  return new Date(dateInMS);
20937
21046
  }
20938
21047
  getContentAreaDimension() {
@@ -21687,7 +21796,7 @@ class Resize extends ActionBase {
21687
21796
  const offsetWidth = (Math.round(offset / this.actionObj.cellWidth) *
21688
21797
  this.actionObj.cellWidth) + (isLeft ? 0 : (this.parent.getElementWidth(this.actionObj.clone) -
21689
21798
  this.actionObj.cellWidth));
21690
- cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
21799
+ cellIndex = Math.ceil(offsetWidth / this.actionObj.cellWidth);
21691
21800
  }
21692
21801
  isLastCell = cellIndex === tdCollections.length;
21693
21802
  cellIndex = this.getIndex(cellIndex);
@@ -21705,13 +21814,29 @@ class Resize extends ActionBase {
21705
21814
  }
21706
21815
  else {
21707
21816
  if (!isLeft) {
21708
- offset += this.parent.getElementWidth(this.actionObj.clone);
21709
- }
21710
- let spanMinutes = Math.floor((this.actionObj.slotInterval / this.actionObj.cellWidth) *
21817
+ let cloneWidth = this.parent.getElementWidth(this.actionObj.clone);
21818
+ const pixelsPerInterval = this.actionObj.cellWidth /
21819
+ (this.actionObj.slotInterval / this.actionObj.interval);
21820
+ const numIntervals = Math.round(cloneWidth / pixelsPerInterval);
21821
+ cloneWidth = numIntervals * pixelsPerInterval;
21822
+ offset = offset + cloneWidth;
21823
+ }
21824
+ let spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
21711
21825
  (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
21712
21826
  spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
21713
21827
  resizeTime = new Date(resizeDate.getTime());
21714
21828
  resizeTime = new Date(resizeDate.getTime() + (spanMinutes * MS_PER_MINUTE));
21829
+ const isCustomResizeInterval = this.actionObj.interval !== this.actionObj.slotInterval;
21830
+ const initialCellTime = new Date(resizeTime.getTime());
21831
+ const intervalInMS = this.actionObj.interval * 60000;
21832
+ if (intervalInMS > 0 && isCustomResizeInterval) {
21833
+ if (this.resizeEdges.right || this.resizeEdges.left) {
21834
+ const eventTime = this.resizeEdges.right ? eventEnd : eventStart;
21835
+ const timeDifferenceMs = initialCellTime.getTime() - eventTime.getTime();
21836
+ const intervalCount = Math.round(timeDifferenceMs / intervalInMS);
21837
+ resizeTime = new Date(eventTime.getTime() + intervalCount * intervalInMS);
21838
+ }
21839
+ }
21715
21840
  this.updateTimePosition(resizeTime);
21716
21841
  }
21717
21842
  }
@@ -24042,14 +24167,18 @@ class ViewBase {
24042
24167
  }
24043
24168
  }
24044
24169
  getHeaderBarHeight() {
24045
- let headerBarHeight = 2;
24170
+ const computedStyle = getComputedStyle(this.parent.element);
24171
+ const borderTop = parseFloat(computedStyle.borderTopWidth) || 1;
24172
+ const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 1;
24173
+ const border = Math.round(borderTop + borderBottom);
24174
+ let headerBarHeight = border;
24046
24175
  if (this.parent.headerModule) {
24047
24176
  headerBarHeight += getOuterHeight(this.parent.headerModule.getHeaderElement());
24048
24177
  }
24049
24178
  if (this.parent.uiStateValues.isGroupAdaptive) {
24050
24179
  const resHeader = this.parent.element.querySelector('.' + RESOURCE_HEADER_TOOLBAR);
24051
24180
  if (resHeader) {
24052
- headerBarHeight += resHeader.offsetHeight;
24181
+ headerBarHeight += getOuterHeight(resHeader);
24053
24182
  }
24054
24183
  }
24055
24184
  return headerBarHeight;
@@ -24332,7 +24461,7 @@ class ViewBase {
24332
24461
  }
24333
24462
  setResourceHeaderContent(tdElement, tdData, className = TEXT_ELLIPSIS) {
24334
24463
  if (this.parent.activeViewOptions.resourceHeaderTemplate) {
24335
- const data = { resource: tdData.resource, resourceData: tdData.resourceData };
24464
+ const data = { resource: tdData.resource, resourceData: tdData.resourceData, date: tdData.date };
24336
24465
  const scheduleId = this.parent.element.id + '_';
24337
24466
  const viewName = this.parent.activeViewOptions.resourceHeaderTemplateName;
24338
24467
  const templateId = scheduleId + viewName + 'resourceHeaderTemplate';
@@ -26829,7 +26958,7 @@ class AgendaBase extends ViewBase {
26829
26958
  groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
26830
26959
  resourceData: resData[parseInt(res.toString(), 10)].resourceData,
26831
26960
  groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
26832
- date: agendaDate
26961
+ date: this.parent.activeViewOptions.group.byDate ? firstDate : agendaDate
26833
26962
  };
26834
26963
  lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
26835
26964
  tempLastLevelInfo.push(extend({}, tempObj, null, true));
@@ -26857,7 +26986,8 @@ class AgendaBase extends ViewBase {
26857
26986
  tempGroupedData[0].type = 'parentColumnLevel_' + (y + 1);
26858
26987
  tempGroupedData[0].resource = topResources[topResources.length - (y + 1)];
26859
26988
  tempGroupedData[0].resourceData = data[parseInt(x.toString(), 10)];
26860
- tempGroupedData[0].date = agendaDate;
26989
+ tempGroupedData[0].date = this.parent.activeViewOptions.group.byDate ?
26990
+ tempLastLevelInfo[parseInt(u.toString(), 10)].date : agendaDate;
26861
26991
  lastLevelInfo[tempGroupedData[0].groupIndex].push(tempGroupedData[0]);
26862
26992
  tempGroupedData = [];
26863
26993
  totalRowSpan = 0;