@syncfusion/ej2-schedule 20.1.48 → 20.1.50

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.1.48
3
+ * version : 20.1.50
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@20.1.47",
3
+ "_id": "@syncfusion/ej2-schedule@20.1.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-ojT9XmuGF0+ejBEwCKwTClKpaOcVuZ1fj0UX3L+rue4iHVlaiTuUmdOecrFN+yneZxH0j4zD9r9mUx/sY+4yCg==",
5
+ "_integrity": "sha512-wml4CbZKHSN6nP2vy10+Dkl+n/2mSMM7fO3MtYdz3aR3UyT5+VB4eV70SydGiLAJ2NybfdtpsNW9Sb8C/vc7eg==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-schedule",
24
24
  "/@syncfusion/ej2-vue-schedule"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.1.47.tgz",
27
- "_shasum": "a18869a56012417f10f3fec19b7b80c70435a1b4",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.1.48.tgz",
27
+ "_shasum": "15229da0441476295c908b95b04a289d5fd2eec4",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.1.48",
39
- "@syncfusion/ej2-buttons": "~20.1.47",
38
+ "@syncfusion/ej2-base": "~20.1.50",
39
+ "@syncfusion/ej2-buttons": "~20.1.50",
40
40
  "@syncfusion/ej2-calendars": "~20.1.47",
41
41
  "@syncfusion/ej2-data": "~20.1.47",
42
- "@syncfusion/ej2-dropdowns": "~20.1.47",
42
+ "@syncfusion/ej2-dropdowns": "~20.1.50",
43
43
  "@syncfusion/ej2-excel-export": "~20.1.48",
44
44
  "@syncfusion/ej2-inputs": "~20.1.48",
45
45
  "@syncfusion/ej2-lists": "~20.1.47",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "20.1.48",
84
+ "version": "20.1.50",
85
85
  "sideEffects": false
86
86
  }
@@ -245,6 +245,9 @@ function dailyType(startDate, endDate, data, ruleObject) {
245
245
  }
246
246
  }
247
247
  tempDate.setDate(tempDate.getDate() + interval);
248
+ if (tempDate.getHours() !== startDate.getHours()) {
249
+ tempDate.setHours(startDate.getHours());
250
+ }
248
251
  }
249
252
  }
250
253
  /**
@@ -289,6 +292,9 @@ function weeklyType(startDate, endDate, data, ruleObject) {
289
292
  break;
290
293
  }
291
294
  tempDate.setDate(tempDate.getDate() + 1);
295
+ if (tempDate.getHours() !== startDate.getHours()) {
296
+ tempDate.setHours(startDate.getHours());
297
+ }
292
298
  compareTempDate = new Date(tempDate.getTime());
293
299
  compareTempDate = resetTime(compareTempDate);
294
300
  }
@@ -1171,7 +1177,7 @@ function insertDateCollection(state, startDate, endDate, data, ruleObject, dayDa
1171
1177
  function weekCount(year, startDayOfWeek, monthCollection, week, ruleObject) {
1172
1178
  var firstDayOfWeek = startDayOfWeek || 0;
1173
1179
  var firstOfMonth = new Date(year, ruleObject.month[0] - 1, 1);
1174
- var lastOfMonth = new Date(year, ruleObject.month[0] - 1, 0);
1180
+ var lastOfMonth = new Date(year, ruleObject.month[0], 0);
1175
1181
  var numberOfDaysInMonth = lastOfMonth.getDate();
1176
1182
  var firstWeekDay = (firstOfMonth.getDay() - firstDayOfWeek + 7) % 7;
1177
1183
  var used = firstWeekDay + numberOfDaysInMonth;
@@ -9,7 +9,6 @@ export declare class MonthEvent extends EventBase {
9
9
  fields: EventFieldsMapping;
10
10
  dateRender: Date[];
11
11
  renderedEvents: Record<string, any>[];
12
- eventsRendered: Record<string, any>[];
13
12
  eventHeight: number;
14
13
  private monthHeaderHeight;
15
14
  workCells: HTMLElement[];
@@ -41,7 +40,6 @@ export declare class MonthEvent extends EventBase {
41
40
  createAppointmentElement(record: Record<string, any>, resIndex: number, isCloneElement?: boolean): HTMLElement;
42
41
  private appendEventIcons;
43
42
  renderEvents(event: Record<string, any>, resIndex: number, eventsList?: Record<string, any>[]): void;
44
- private renderMoreIndicators;
45
43
  updateCellHeight(cell: HTMLElement, height: number): void;
46
44
  updateBlockElements(): void;
47
45
  getFilteredEvents(startDate: Date, endDate: Date, groupIndex: string, eventsList?: Record<string, any>[]): Record<string, any>[];
@@ -27,7 +27,6 @@ var MonthEvent = /** @class */ (function (_super) {
27
27
  function MonthEvent(parent) {
28
28
  var _this = _super.call(this, parent) || this;
29
29
  _this.renderedEvents = [];
30
- _this.eventsRendered = [];
31
30
  _this.monthHeaderHeight = 0;
32
31
  _this.moreIndicatorHeight = 19;
33
32
  _this.renderType = 'day';
@@ -144,7 +143,6 @@ var MonthEvent = /** @class */ (function (_super) {
144
143
  };
145
144
  MonthEvent.prototype.renderEventsHandler = function (dateRender, workDays, resData) {
146
145
  this.renderedEvents = [];
147
- this.eventsRendered = [];
148
146
  var eventsList;
149
147
  var blockList;
150
148
  var resIndex = 0;
@@ -180,12 +178,19 @@ var MonthEvent = /** @class */ (function (_super) {
180
178
  var filteredDates = this.getRenderedDates(dateRender);
181
179
  this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
182
180
  this.processBlockEvents(blockList, resIndex, resData);
181
+ var events = [];
183
182
  for (var _i = 0, eventsList_1 = eventsList; _i < eventsList_1.length; _i++) {
184
183
  var event_1 = eventsList_1[_i];
185
184
  if (this.parent.resourceBase && !resData) {
186
185
  this.cssClass = this.parent.resourceBase.getCssClass(event_1);
187
186
  }
188
- var spannedEvents = this.splitEvent(event_1, filteredDates || this.dateRender);
187
+ events = events.concat(this.splitEvent(event_1, filteredDates || this.dateRender));
188
+ }
189
+ for (var level = 0; level < this.slots.length; level++) {
190
+ this.renderedEvents = [];
191
+ var slot = this.slots[level];
192
+ var endDate = util.addDays(new Date(slot[slot.length - 1]), 1);
193
+ var spannedEvents = this.filterEvents(new Date(slot[0]), endDate, events);
189
194
  for (var _a = 0, spannedEvents_1 = spannedEvents; _a < spannedEvents_1.length; _a++) {
190
195
  var event_2 = spannedEvents_1[_a];
191
196
  if (this.maxHeight) {
@@ -490,12 +495,8 @@ var MonthEvent = /** @class */ (function (_super) {
490
495
  if (day < 0) {
491
496
  return;
492
497
  }
493
- if ((startTime.getTime() < this.parent.minDate.getTime()) || (endTime.getTime() > this.parent.maxDate.getTime())) {
494
- return;
495
- }
496
498
  var overlapCount = this.getIndex(startTime);
497
499
  event.Index = overlapCount;
498
- this.renderedEvents.push(extend({}, event, null, true));
499
500
  var diffInDays = event.data.count;
500
501
  if (startTime.getTime() <= endTime.getTime()) {
501
502
  var appWidth = (diffInDays * this.cellWidth) - 5;
@@ -504,7 +505,7 @@ var MonthEvent = /** @class */ (function (_super) {
504
505
  var height = this.monthHeaderHeight + ((overlapCount + 1) * (this.eventHeight + EVENT_GAP)) + this.moreIndicatorHeight;
505
506
  var enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
506
507
  if (this.parent.rowAutoHeight || enableAppRender) {
507
- this.eventsRendered.push(extend({}, event, null, true));
508
+ this.renderedEvents.push(extend({}, event, null, true));
508
509
  var appointmentElement = void 0;
509
510
  if (this.inlineValue) {
510
511
  appointmentElement = this.parent.inlineModule.createInlineAppointmentElement();
@@ -520,37 +521,30 @@ var MonthEvent = /** @class */ (function (_super) {
520
521
  var firstChild = cellTd.parentElement.firstElementChild;
521
522
  this.updateCellHeight(firstChild, height);
522
523
  }
523
- else if (cellTd.querySelector('.' + cls.MORE_INDICATOR_CLASS)) {
524
- this.renderMoreIndicators(diffInDays, day);
525
- }
526
524
  }
527
525
  else {
528
- this.renderMoreIndicators(diffInDays, day);
529
- }
530
- }
531
- };
532
- MonthEvent.prototype.renderMoreIndicators = function (diffInDays, day) {
533
- for (var i = 0; i < diffInDays; i++) {
534
- if (this.workCells[day + i]) {
535
- var startDate = new Date(this.dateRender[day + i].getTime());
536
- var endDate = util.addDays(this.dateRender[day + i], 1);
537
- var groupIndex = this.workCells[day + i].getAttribute('data-group-index');
538
- var filterEvents = this.getFilteredEvents(startDate, endDate, groupIndex);
539
- var renderedAppCount = this.getOverlapEvents(startDate, this.eventsRendered).length;
540
- var count = (filterEvents.length - renderedAppCount) <= 0 ? 1 : (filterEvents.length - renderedAppCount);
541
- var indicator = this.workCells[day + i].querySelector('.' + cls.MORE_INDICATOR_CLASS);
542
- if (indicator) {
543
- indicator.innerHTML = this.getMoreIndicatorText(count);
544
- }
545
- else {
546
- var moreIndicatorElement = this.getMoreIndicatorElement(count, startDate, endDate);
547
- if (!isNullOrUndefined(groupIndex)) {
548
- moreIndicatorElement.setAttribute('data-group-index', groupIndex);
526
+ for (var i = 0; i < diffInDays; i++) {
527
+ if (this.workCells[day + i]) {
528
+ var indicator = this.workCells[day + i].querySelector('.' + cls.MORE_INDICATOR_CLASS);
529
+ if (indicator) {
530
+ var count = parseInt(indicator.getAttribute('data-count'), 10) + 1;
531
+ indicator.setAttribute('data-count', count.toString());
532
+ indicator.innerHTML = this.getMoreIndicatorText(count);
533
+ }
534
+ else {
535
+ var startDate = new Date(this.dateRender[day + i].getTime());
536
+ var endDate = util.addDays(this.dateRender[day + i], 1);
537
+ var groupIndex = this.workCells[day + i].getAttribute('data-group-index');
538
+ var moreIndicatorElement = this.getMoreIndicatorElement(1, startDate, endDate);
539
+ if (!isNullOrUndefined(groupIndex)) {
540
+ moreIndicatorElement.setAttribute('data-group-index', groupIndex);
541
+ }
542
+ moreIndicatorElement.style.top = (this.cellHeight - this.monthHeaderHeight - this.moreIndicatorHeight) + 'px';
543
+ moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
544
+ this.renderElement(this.workCells[day + i], moreIndicatorElement);
545
+ EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
546
+ }
549
547
  }
550
- moreIndicatorElement.style.top = (this.cellHeight - this.monthHeaderHeight - this.moreIndicatorHeight) + 'px';
551
- moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
552
- this.renderElement(this.workCells[day + i], moreIndicatorElement);
553
- EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
554
548
  }
555
549
  }
556
550
  }
@@ -586,9 +580,9 @@ var MonthEvent = /** @class */ (function (_super) {
586
580
  };
587
581
  MonthEvent.prototype.getOverlapEvents = function (date, appointments) {
588
582
  var appointmentsList = [];
583
+ var dateTime = util.resetTime(date).getTime();
589
584
  for (var _i = 0, appointments_1 = appointments; _i < appointments_1.length; _i++) {
590
585
  var app = appointments_1[_i];
591
- var dateTime = util.resetTime(date).getTime();
592
586
  if ((util.resetTime(app[this.fields.startTime]).getTime() <= dateTime) &&
593
587
  (util.resetTime(app[this.fields.endTime]).getTime() >= dateTime)) {
594
588
  appointmentsList.push(app);
@@ -675,6 +669,7 @@ var MonthEvent = /** @class */ (function (_super) {
675
669
  innerHTML: this.getMoreIndicatorText(count),
676
670
  attrs: {
677
671
  'tabindex': '0',
672
+ 'data-count': count.toString(),
678
673
  'data-start-date': startDate.getTime().toString(),
679
674
  'data-end-date': endDate.getTime().toString(),
680
675
  'role': 'list'
@@ -23,7 +23,7 @@ var ICalendarExport = /** @class */ (function () {
23
23
  var editedExDate = [];
24
24
  if (eventObj[fields.recurrenceID]) {
25
25
  var filter = _this.filterEvents(filterCollection, fields.id, eventObj[fields.recurrenceID]);
26
- uId = filter[0].UID;
26
+ uId = filter.length > 0 ? filter[0].UID : uId;
27
27
  }
28
28
  if (!eventObj[fields.recurrenceID] && eventObj[fields.recurrenceRule] && eventObj[fields.recurrenceException]) {
29
29
  var exDate = (eventObj[fields.recurrenceException]).split(',');