@syncfusion/ej2-schedule 19.3.44 → 19.3.55

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 (61) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/ej2-schedule.umd.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-schedule.es2015.js +83 -48
  5. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es5.js +79 -44
  7. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  8. package/dist/global/ej2-schedule.min.js +2 -2
  9. package/dist/global/ej2-schedule.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +15 -15
  12. package/src/recurrence-editor/date-generator.js +3 -3
  13. package/src/schedule/actions/crud.js +2 -0
  14. package/src/schedule/actions/drag.js +16 -14
  15. package/src/schedule/actions/resize.js +17 -10
  16. package/src/schedule/actions/virtual-scroll.js +1 -0
  17. package/src/schedule/base/interface.d.ts +7 -0
  18. package/src/schedule/base/resource.js +4 -1
  19. package/src/schedule/base/schedule-model.d.ts +9 -1
  20. package/src/schedule/base/schedule.d.ts +9 -2
  21. package/src/schedule/base/schedule.js +13 -2
  22. package/src/schedule/base/type.d.ts +4 -0
  23. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  24. package/src/schedule/event-renderer/event-base.js +11 -7
  25. package/src/schedule/event-renderer/month.js +1 -1
  26. package/src/schedule/models/event-settings-model.d.ts +12 -1
  27. package/src/schedule/models/event-settings.d.ts +11 -0
  28. package/src/schedule/models/event-settings.js +3 -0
  29. package/src/schedule/popups/event-window.d.ts +0 -1
  30. package/src/schedule/popups/event-window.js +4 -5
  31. package/src/schedule/popups/form-validator.js +4 -1
  32. package/src/schedule/renderer/agenda.js +2 -1
  33. package/src/schedule/timezone/timezone.d.ts +3 -2
  34. package/src/schedule/timezone/timezone.js +0 -1
  35. package/styles/bootstrap-dark.css +1 -1
  36. package/styles/bootstrap.css +1 -1
  37. package/styles/bootstrap4.css +1 -1
  38. package/styles/bootstrap5-dark.css +1 -1
  39. package/styles/bootstrap5.css +1 -1
  40. package/styles/fabric-dark.css +1 -1
  41. package/styles/fabric.css +1 -1
  42. package/styles/highcontrast-light.css +1 -1
  43. package/styles/highcontrast.css +1 -1
  44. package/styles/material-dark.css +1 -1
  45. package/styles/material.css +1 -1
  46. package/styles/schedule/_layout.scss +1 -1
  47. package/styles/schedule/bootstrap-dark.css +1 -1
  48. package/styles/schedule/bootstrap.css +1 -1
  49. package/styles/schedule/bootstrap4.css +1 -1
  50. package/styles/schedule/bootstrap5-dark.css +1 -1
  51. package/styles/schedule/bootstrap5.css +1 -1
  52. package/styles/schedule/fabric-dark.css +1 -1
  53. package/styles/schedule/fabric.css +1 -1
  54. package/styles/schedule/highcontrast-light.css +1 -1
  55. package/styles/schedule/highcontrast.css +1 -1
  56. package/styles/schedule/material-dark.css +1 -1
  57. package/styles/schedule/material.css +1 -1
  58. package/styles/schedule/tailwind-dark.css +1 -1
  59. package/styles/schedule/tailwind.css +1 -1
  60. package/styles/tailwind-dark.css +1 -1
  61. package/styles/tailwind.css +1 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.44
3
+ * version : 19.3.55
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@19.5.10",
3
+ "_id": "@syncfusion/ej2-schedule@19.3.53",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-trHXLCHN5VcWFE8Q5VdgPISp0d18H0D2bff5m/CM/xE2H7KkqvP65syKvtbKy8VQEqhst7R5bM4KhmNoY4AVIA==",
5
+ "_integrity": "sha512-l9SFCIS0AjYdIx4gQVYoSLVZ5wJoLlbx5ojoPG5bJOz04xTOpuCZYqQK17JjFvLU0YcxVfLC/mGt9rBpnGfqdg==",
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/@syncfusion/ej2-schedule/-/ej2-schedule-19.5.10.tgz",
27
- "_shasum": "1af9f2eb114bd9d9c9881d3cb10a1c9579b664ae",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-schedule/-/ej2-schedule-19.3.53.tgz",
27
+ "_shasum": "1b65095a4c89600df4cc0a6a3763dcafcd38d8d1",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~19.3.43",
39
- "@syncfusion/ej2-buttons": "~19.3.44",
40
- "@syncfusion/ej2-calendars": "~19.3.44",
41
- "@syncfusion/ej2-data": "~19.3.44",
42
- "@syncfusion/ej2-dropdowns": "~19.3.44",
43
- "@syncfusion/ej2-excel-export": "~19.3.44",
44
- "@syncfusion/ej2-inputs": "~19.3.44",
45
- "@syncfusion/ej2-lists": "~19.3.44",
46
- "@syncfusion/ej2-navigations": "~19.3.44",
47
- "@syncfusion/ej2-popups": "~19.3.43"
38
+ "@syncfusion/ej2-base": "~19.3.54",
39
+ "@syncfusion/ej2-buttons": "~19.3.53",
40
+ "@syncfusion/ej2-calendars": "~19.3.55",
41
+ "@syncfusion/ej2-data": "~19.3.53",
42
+ "@syncfusion/ej2-dropdowns": "~19.3.55",
43
+ "@syncfusion/ej2-excel-export": "~19.3.53",
44
+ "@syncfusion/ej2-inputs": "~19.3.53",
45
+ "@syncfusion/ej2-lists": "~19.3.53",
46
+ "@syncfusion/ej2-navigations": "~19.3.54",
47
+ "@syncfusion/ej2-popups": "~19.3.53"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -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": "19.3.44",
84
+ "version": "19.3.55",
85
85
  "sideEffects": false
86
86
  }
@@ -275,8 +275,8 @@ function weeklyType(startDate, endDate, data, ruleObject) {
275
275
  var weekstartDate = addDays(tempDate, -startDateDiff);
276
276
  var weekendDate = addDays(weekstartDate, 6);
277
277
  var compareTempDate = new Date(tempDate.getTime());
278
- resetTime(weekendDate);
279
- resetTime(compareTempDate);
278
+ weekendDate = resetTime(weekendDate);
279
+ compareTempDate = resetTime(compareTempDate);
280
280
  while (weekendDate >= compareTempDate) {
281
281
  if (expectedDays.indexOf(DAYINDEX[tempDate.getDay()]) > -1) {
282
282
  weekCollection.push([tempDate.getTime()]);
@@ -286,7 +286,7 @@ function weeklyType(startDate, endDate, data, ruleObject) {
286
286
  }
287
287
  tempDate.setDate(tempDate.getDate() + 1);
288
288
  compareTempDate = new Date(tempDate.getTime());
289
- resetTime(compareTempDate);
289
+ compareTempDate = resetTime(compareTempDate);
290
290
  }
291
291
  tempDate.setDate(tempDate.getDate() - 1);
292
292
  if (expectedCount && (data.length + ruleObject.recExceptionCount) >= expectedCount) {
@@ -145,6 +145,7 @@ var Crud = /** @class */ (function () {
145
145
  if (addArgs.addedRecords instanceof Array) {
146
146
  for (var _i = 0, _a = addArgs.addedRecords; _i < _a.length; _i++) {
147
147
  var event_1 = _a[_i];
148
+ event_1 = _this.parent.eventBase.updateEventDateTime(event_1);
148
149
  var eventData_1 = extend({}, _this.parent.eventBase.processTimezone(event_1, true), null, true);
149
150
  editParams.addedRecords.push(eventData_1);
150
151
  }
@@ -202,6 +203,7 @@ var Crud = /** @class */ (function () {
202
203
  if (saveArgs.changedRecords instanceof Array) {
203
204
  for (var _i = 0, _a = saveArgs.changedRecords; _i < _a.length; _i++) {
204
205
  var event_3 = _a[_i];
206
+ event_3 = _this.parent.eventBase.updateEventDateTime(event_3);
205
207
  var eventData_2 = extend({}, _this.parent.eventBase.processTimezone(event_3, true), null, true);
206
208
  editParams.changedRecords.push(eventData_2);
207
209
  }
@@ -686,18 +686,20 @@ var DragAndDrop = /** @class */ (function (_super) {
686
686
  var eventData = [];
687
687
  var startTime = event[eventFields.startTime];
688
688
  var endTime = event[eventFields.endTime];
689
- var isDifferentDate = util.resetTime(new Date(startTime.getTime())) < util.resetTime(new Date(endTime.getTime()));
690
- if (isDifferentDate) {
691
- var scheduleStartHour = this.parent.activeView.getStartHour();
692
- var scheduleEndHour = this.parent.activeView.getEndHour();
693
- var startDate = util.getStartEndHours(util.resetTime(startTime), scheduleStartHour, scheduleEndHour);
694
- var endDate = util.getStartEndHours(util.resetTime(endTime), scheduleStartHour, scheduleEndHour);
695
- var firstEventObj = extend({}, event, null, true);
696
- firstEventObj[eventFields.endTime] = startDate.endHour;
697
- eventData.push(firstEventObj);
698
- var secondEventObj = extend({}, event, null, true);
699
- secondEventObj[eventFields.startTime] = endDate.startHour;
700
- eventData.push(secondEventObj);
689
+ if (util.resetTime(new Date(startTime.getTime())) < util.resetTime(new Date(endTime.getTime()))) {
690
+ var startReferenceDate = util.resetTime(new Date(startTime.getTime()));
691
+ var endReferenceDate = new Date(startReferenceDate.getTime());
692
+ for (var i = 0; startReferenceDate < new Date(endTime.getTime()); i++) {
693
+ endReferenceDate = new Date(endReferenceDate.setDate(startReferenceDate.getDate() + 1));
694
+ var eventObj = extend({}, event, null, true);
695
+ eventObj[eventFields.startTime] = new Date(startReferenceDate);
696
+ eventObj[eventFields.endTime] = new Date(endReferenceDate);
697
+ startReferenceDate = new Date(startReferenceDate.setDate(startReferenceDate.getDate() + 1));
698
+ eventData.push(eventObj);
699
+ }
700
+ var index = eventData.length - 1;
701
+ eventData[0][eventFields.startTime] = startTime;
702
+ eventData[index][eventFields.endTime] = endTime;
701
703
  }
702
704
  else {
703
705
  eventData.push(event);
@@ -768,8 +770,8 @@ var DragAndDrop = /** @class */ (function (_super) {
768
770
  // eslint-disable-next-line max-len
769
771
  this.parent.getDateFromElement(isNullOrUndefined(index) ? this.actionObj.target : this.targetTd)));
770
772
  var splitEvents = this.splitEvent(event);
771
- var events_1 = event[this.parent.eventFields.isAllDay] ||
772
- this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 ? [event] : splitEvents;
773
+ var events_1 = this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 ||
774
+ this.parent.eventSettings.spannedEventPlacement !== 'TimeSlot' ? [event] : splitEvents;
773
775
  for (var i = 0; i < events_1.length; i++) {
774
776
  if (i > 0) {
775
777
  var filterQuery = ".e-day-wrapper[data-date=\"" + util.resetTime(events_1[i][this.parent.eventFields.startTime]).getTime() + "\"]";
@@ -209,6 +209,9 @@ var Resize = /** @class */ (function (_super) {
209
209
  };
210
210
  Resize.prototype.monthResizing = function () {
211
211
  this.removeCloneElement();
212
+ if (isNullOrUndefined(this.actionObj.pageX) || isNullOrUndefined(this.actionObj.pageY)) {
213
+ return;
214
+ }
212
215
  var td = document.elementFromPoint(this.actionObj.pageX, this.actionObj.pageY);
213
216
  if (isNullOrUndefined(td)) {
214
217
  return;
@@ -342,13 +345,16 @@ var Resize = /** @class */ (function (_super) {
342
345
  var eventEnd = new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());
343
346
  var resizeTime;
344
347
  var isDateHeader = false;
348
+ var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1;
349
+ var isTimelineMonth = this.parent.currentView === 'TimelineMonth';
350
+ var isWithoutScale = isTimelineMonth || isTimeViews && !this.parent.activeViewOptions.timeScale.enable;
345
351
  if (this.parent.activeView.isTimelineView()) {
346
352
  var tr = this.parent.getContentTable().querySelector('tr');
347
353
  var headerName = this.parent.currentView;
348
354
  if (this.parent.activeViewOptions.headerRows.length > 0) {
349
355
  var rows = this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
350
356
  headerName = rows.slice(-1)[0];
351
- if (this.parent.currentView === 'TimelineMonth' && headerName === 'Hour') {
357
+ if (isTimelineMonth && headerName === 'Hour') {
352
358
  headerName = rows.slice(-2)[0] || 'Month';
353
359
  }
354
360
  }
@@ -368,9 +374,8 @@ var Resize = /** @class */ (function (_super) {
368
374
  offsetValue += (this.actionObj.clone.offsetWidth - this.actionObj.cellWidth);
369
375
  }
370
376
  cellIndex = Math.floor(offsetValue / Math.floor(tr.offsetWidth / noOfDays));
371
- isDateHeader =
372
- ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1 && headerName === 'Date';
373
- cellIndex = isLeft ? cellIndex : (this.parent.currentView === 'TimelineMonth' || isDateHeader) ? cellIndex + 1 : cellIndex;
377
+ isDateHeader = isTimeViews && headerName === 'Date';
378
+ cellIndex = isLeft ? cellIndex : (isTimelineMonth || isDateHeader) ? cellIndex + 1 : cellIndex;
374
379
  isLastCell = cellIndex === tdCollections.length;
375
380
  cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
376
381
  }
@@ -382,7 +387,7 @@ var Resize = /** @class */ (function (_super) {
382
387
  if (this.parent.enableRtl) {
383
388
  var cellOffsetWidth = 0;
384
389
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
385
- this.parent.currentView !== 'TimelineMonth')) {
390
+ !isTimelineMonth)) {
386
391
  cellOffsetWidth = this.actionObj.cellWidth;
387
392
  }
388
393
  var offsetWidth = (Math.floor(parseInt(this.actionObj.clone.style.right, 10) / this.actionObj.cellWidth) *
@@ -434,16 +439,18 @@ var Resize = /** @class */ (function (_super) {
434
439
  }
435
440
  }
436
441
  if (isLeft) {
437
- if ((this.actionObj.event[this.parent.eventFields.endTime].getTime() - resizeTime.getTime()) <= 0) {
438
- resizeTime = new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime());
442
+ if ((eventEnd.getTime() - resizeTime.getTime()) <= 0) {
443
+ resizeTime = isWithoutScale ? util.resetTime(eventEnd) : eventStart;
439
444
  }
440
445
  this.actionObj.start = this.parent.activeViewOptions.timeScale.enable ? this.calculateIntervalTime(resizeTime) : resizeTime;
441
446
  }
442
447
  else {
443
- var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1 &&
444
- this.parent.activeViewOptions.timeScale.enable;
445
- var resizeEnd = ((!isTimeViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
448
+ var isTimeScaleViews = isTimeViews && this.parent.activeViewOptions.timeScale.enable;
449
+ var resizeEnd = ((!isTimeScaleViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
446
450
  util.addDays(resizeTime, 1) : resizeTime;
451
+ if (isWithoutScale && (resizeEnd.getTime() - eventStart.getTime()) <= 0) {
452
+ resizeEnd = util.addDays(util.resetTime(eventStart), 1);
453
+ }
447
454
  this.actionObj.end = this.parent.activeViewOptions.timeScale.enable && this.parent.currentView !== 'Month' ?
448
455
  this.calculateIntervalTime(resizeEnd) : resizeEnd;
449
456
  }
@@ -158,6 +158,7 @@ var VirtualScroll = /** @class */ (function () {
158
158
  }
159
159
  else {
160
160
  var height = (this.parent.rowAutoHeight) ? this.averageRowHeight : this.itemSize;
161
+ height = (height > 0) ? height : this.itemSize;
161
162
  this.translateY = (conWrap.scrollTop - (this.bufferCount * height) > 0) ?
162
163
  conWrap.scrollTop - (this.bufferCount * height) : 0;
163
164
  }
@@ -295,6 +295,13 @@ export interface ResourceDetails {
295
295
  /** It returns the Name of current resource in compact mode. */
296
296
  resourceName?: string;
297
297
  }
298
+ /** An interface that represents time zone and display text for scheduler. */
299
+ export interface TimezoneFields {
300
+ /** Assigns the timezone display text. */
301
+ Text: string;
302
+ /** Assigns the IANA timezone value. */
303
+ Value: string;
304
+ }
298
305
  /** An interface that holds options of events once it bound to scheduler. */
299
306
  export interface DataBoundEventArgs extends BaseEventArgs {
300
307
  result: Record<string, any>[];
@@ -674,8 +674,11 @@ var ResourceBase = /** @class */ (function () {
674
674
  var currentLevelChilds = _a[_i];
675
675
  for (var _b = 0, currentLevelChilds_1 = currentLevelChilds; _b < currentLevelChilds_1.length; _b++) {
676
676
  var currentLevelChild = currentLevelChilds_1[_b];
677
- if (resTreeGroup[i + 1]) {
677
+ if (resTreeGroup[i + 1] && resTreeGroup[i + 1].length > 0) {
678
678
  var nextLevelChilds = resTreeGroup[i + 1][temp];
679
+ if (!nextLevelChilds) {
680
+ continue;
681
+ }
679
682
  var colSpan = 0;
680
683
  for (var _c = 0, nextLevelChilds_1 = nextLevelChilds; _c < nextLevelChilds_1.length; _c++) {
681
684
  var nextLevelChild = nextLevelChilds_1[_c];
@@ -1,4 +1,4 @@
1
- import { Component, ModuleDeclaration, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { getElement, removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType, WeekRule } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { InlineEdit } from '../event-renderer/inline-edit';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Year } from '../renderer/year';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { TimelineYear } from '../renderer/timeline-year';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkCellInteraction } from '../actions/work-cells';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { ICalendarExport } from '../exports/calendar-export';import { ICalendarImport } from '../exports/calendar-import';import { ExcelExport } from '../exports/excel-export';import { Print } from '../exports/print';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, StateArgs, ExportOptions, SelectEventArgs } from '../base/interface';import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, CallbackFunction } from '../base/interface';import { CalendarUtil, Gregorian, Islamic, CalendarType } from '../../common/calendar-util';import { ResourceBase } from '../base/resource';import { Timezone } from '../timezone/timezone';import { RecurrenceEditor } from '../../recurrence-editor/recurrence-editor';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';
1
+ import { Component, ModuleDeclaration, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { getElement, removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType, WeekRule } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { InlineEdit } from '../event-renderer/inline-edit';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Year } from '../renderer/year';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { TimelineYear } from '../renderer/timeline-year';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkCellInteraction } from '../actions/work-cells';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { ICalendarExport } from '../exports/calendar-export';import { ICalendarImport } from '../exports/calendar-import';import { ExcelExport } from '../exports/excel-export';import { Print } from '../exports/print';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, StateArgs, ExportOptions, SelectEventArgs } from '../base/interface';import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, CallbackFunction } from '../base/interface';import { CalendarUtil, Gregorian, Islamic, CalendarType } from '../../common/calendar-util';import { ResourceBase } from '../base/resource';import { Timezone, timezoneData} from '../timezone/timezone';import { RecurrenceEditor } from '../../recurrence-editor/recurrence-editor';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -477,6 +477,14 @@ export interface ScheduleModel extends ComponentModel{
477
477
  */
478
478
  eventSettings?: EventSettingsModel;
479
479
 
480
+ /**
481
+ * Allows to define the collection of timezone items in the Schedule. Only the items bound to this property get listed out in the timezone dropdown of the appointment window.
482
+ * {% codeBlock src='schedule/timezoneDatasource/index.md' %}{% endcodeBlock %}
483
+ *
484
+ * @default timezoneData
485
+ */
486
+ timezoneDataSource?: TimezoneFields[];
487
+
480
488
  /**
481
489
  * Template option to customize the resource header bar. Here, the template accepts either
482
490
  * the string or HTMLElement as template design and then the parsed design is displayed onto the resource header cells.
@@ -35,7 +35,7 @@ import { ICalendarExport } from '../exports/calendar-export';
35
35
  import { ICalendarImport } from '../exports/calendar-import';
36
36
  import { ExcelExport } from '../exports/excel-export';
37
37
  import { Print } from '../exports/print';
38
- import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss } from '../base/interface';
38
+ import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields } from '../base/interface';
39
39
  import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';
40
40
  import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, ExportOptions, SelectEventArgs } from '../base/interface';
41
41
  import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, CallbackFunction } from '../base/interface';
@@ -556,6 +556,13 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
556
556
  * @default null
557
557
  */
558
558
  eventSettings: EventSettingsModel;
559
+ /**
560
+ * Allows to define the collection of timezone items in the Schedule. Only the items bound to this property get listed out in the timezone dropdown of the appointment window.
561
+ * {% codeBlock src='schedule/timezoneDatasource/index.md' %}{% endcodeBlock %}
562
+ *
563
+ * @default timezoneData
564
+ */
565
+ timezoneDataSource: TimezoneFields[];
559
566
  /**
560
567
  * Template option to customize the resource header bar. Here, the template accepts either
561
568
  * the string or HTMLElement as template design and then the parsed design is displayed onto the resource header cells.
@@ -1518,7 +1525,7 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
1518
1525
  * @param {string} templateName Accepts the template name
1519
1526
  * @returns {void}
1520
1527
  */
1521
- refreshTemplates(templateName: string): void;
1528
+ refreshTemplates(templateName?: string): void;
1522
1529
  /**
1523
1530
  * Refreshes the Schedule layout without re-render.
1524
1531
  *
@@ -45,7 +45,7 @@ import { Group } from '../models/group';
45
45
  import { Resources } from '../models/resources';
46
46
  import { Gregorian, Islamic } from '../../common/calendar-util';
47
47
  import { ResourceBase } from '../base/resource';
48
- import { Timezone } from '../timezone/timezone';
48
+ import { Timezone, timezoneData } from '../timezone/timezone';
49
49
  import * as events from '../base/constant';
50
50
  import * as cls from '../base/css-constant';
51
51
  import * as util from '../base/util';
@@ -749,7 +749,9 @@ var Schedule = /** @class */ (function (_super) {
749
749
  beginFrom: 'Begin From',
750
750
  endAt: 'Ends At',
751
751
  expandAllDaySection: 'Expand-all-day-section',
752
- collapseAllDaySection: 'Collapse-all-day-section'
752
+ collapseAllDaySection: 'Collapse-all-day-section',
753
+ searchTimezone: 'Search Timezone',
754
+ noRecords: 'No records found'
753
755
  };
754
756
  };
755
757
  Schedule.prototype.wireEvents = function () {
@@ -1468,6 +1470,11 @@ var Schedule = /** @class */ (function (_super) {
1468
1470
  this.keyboardInteractionModule = new KeyboardInteraction(this);
1469
1471
  }
1470
1472
  break;
1473
+ case 'timezoneDataSource':
1474
+ if (this.eventWindow) {
1475
+ this.eventWindow.refresh();
1476
+ }
1477
+ break;
1471
1478
  case 'editorTemplate':
1472
1479
  if (!isNullOrUndefined(this.editorTemplate)) {
1473
1480
  this.editorTemplateFn = this.templateParser(this.editorTemplate);
@@ -1611,6 +1618,7 @@ var Schedule = /** @class */ (function (_super) {
1611
1618
  this.eventWindow.refresh();
1612
1619
  }
1613
1620
  break;
1621
+ case 'spannedEventPlacement':
1614
1622
  case 'enableMaxHeight':
1615
1623
  case 'enableIndicator':
1616
1624
  this.refreshEvents(false);
@@ -2638,6 +2646,9 @@ var Schedule = /** @class */ (function (_super) {
2638
2646
  __decorate([
2639
2647
  Complex({}, EventSettings)
2640
2648
  ], Schedule.prototype, "eventSettings", void 0);
2649
+ __decorate([
2650
+ Property(timezoneData)
2651
+ ], Schedule.prototype, "timezoneDataSource", void 0);
2641
2652
  __decorate([
2642
2653
  Property()
2643
2654
  ], Schedule.prototype, "resourceHeaderTemplate", void 0);
@@ -41,3 +41,7 @@ export declare type TemplateType = 'Both' | 'Cell' | 'Event';
41
41
  * An enum that holds the different type of week number options in the scheduler.
42
42
  */
43
43
  export declare type WeekRule = 'FirstDay' | 'FirstFourDayWeek' | 'FirstFullWeek';
44
+ /**
45
+ * An enum that holds the options to render the spanned events in all day row or time slot.
46
+ */
47
+ export declare type SpannedEventPlacement = 'AllDayRow' | 'TimeSlot';
@@ -17,6 +17,7 @@ export declare class EventBase {
17
17
  */
18
18
  constructor(parent: Schedule);
19
19
  processData(events: Record<string, any>[], timeZonePropChanged?: boolean, oldTimezone?: string): Record<string, any>[];
20
+ updateEventDateTime(eventData: Record<string, any>): Record<string, any>;
20
21
  getProcessedEvents(eventCollection?: Record<string, any>[]): Record<string, any>[];
21
22
  timezonePropertyChange(oldTimezone: string): void;
22
23
  timezoneConvert(eventData: Record<string, any>): void;
@@ -37,12 +37,7 @@ var EventBase = /** @class */ (function () {
37
37
  if (generateID) {
38
38
  event_1[fields.id] = temp++;
39
39
  }
40
- if (typeof event_1[fields.startTime] === 'string') {
41
- event_1[fields.startTime] = util.getDateFromString(event_1[fields.startTime]);
42
- }
43
- if (typeof event_1[fields.endTime] === 'string') {
44
- event_1[fields.endTime] = util.getDateFromString(event_1[fields.endTime]);
45
- }
40
+ event_1 = this_1.updateEventDateTime(event_1);
46
41
  if (timeZonePropChanged) {
47
42
  this_1.processTimezoneChange(event_1, oldTimezone);
48
43
  }
@@ -119,6 +114,15 @@ var EventBase = /** @class */ (function () {
119
114
  this.parent.blockProcessed = blockData;
120
115
  return eventData;
121
116
  };
117
+ EventBase.prototype.updateEventDateTime = function (eventData) {
118
+ if (typeof eventData[this.parent.eventFields.startTime] === 'string') {
119
+ eventData[this.parent.eventFields.startTime] = util.getDateFromString(eventData[this.parent.eventFields.startTime]);
120
+ }
121
+ if (typeof eventData[this.parent.eventFields.endTime] === 'string') {
122
+ eventData[this.parent.eventFields.endTime] = util.getDateFromString(eventData[this.parent.eventFields.endTime]);
123
+ }
124
+ return eventData;
125
+ };
122
126
  EventBase.prototype.getProcessedEvents = function (eventCollection) {
123
127
  if (eventCollection === void 0) { eventCollection = this.parent.eventsData; }
124
128
  var processed = [];
@@ -636,7 +640,7 @@ var EventBase = /** @class */ (function () {
636
640
  var isAllDay = event[fieldMapping.isAllDay];
637
641
  var isFullDay = ((event[fieldMapping.endTime].getTime() - event[fieldMapping.startTime].getTime())
638
642
  / util.MS_PER_DAY) >= 1;
639
- return (isAllDay || isFullDay) ? true : false;
643
+ return (isAllDay || (this.parent.eventSettings.spannedEventPlacement !== 'TimeSlot' && isFullDay)) ? true : false;
640
644
  };
641
645
  EventBase.prototype.addEventListener = function () {
642
646
  this.parent.on(event.documentClick, this.appointmentBorderRemove, this);
@@ -124,10 +124,10 @@ var MonthEvent = /** @class */ (function (_super) {
124
124
  this.parent.virtualScrollModule.updateVirtualScrollHeight();
125
125
  }
126
126
  }
127
- this.parent.notify(events.scrollUiUpdate, data);
128
127
  if (!this.parent.enablePersistence) {
129
128
  this.parent.notify(events.contentReady, {});
130
129
  }
130
+ this.parent.notify(events.scrollUiUpdate, data);
131
131
  if (this.parent.currentView === 'Month' && this.parent.showWeekNumber) {
132
132
  var totalCells_1 = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
133
133
  var weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + cls.WEEK_NUMBER_CLASS));
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { Query, DataManager } from '@syncfusion/ej2-data';import { SortComparerFunction } from '../base/interface';import { Field } from './fields';import { FieldModel } from './fields-model';
1
+ import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { Query, DataManager } from '@syncfusion/ej2-data';import { SortComparerFunction } from '../base/interface';import { SpannedEventPlacement } from '../base/type';import { Field } from './fields';import { FieldModel } from './fields-model';
2
2
 
3
3
  /**
4
4
  * Interface for a class EventSettings
@@ -57,6 +57,17 @@ export interface EventSettingsModel {
57
57
  */
58
58
  tooltipTemplate?: string;
59
59
 
60
+ /**
61
+ * Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
62
+ * This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
63
+ * * AllDayRow
64
+ * * TimeSlot
65
+ * {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
66
+ *
67
+ * @default 'AllDayRow'
68
+ */
69
+ spannedEventPlacement?: SpannedEventPlacement;
70
+
60
71
  /**
61
72
  * Defines the resource name, to decides the color of which particular resource level is to be applied on appointments, when
62
73
  * grouping is enabled on scheduler.
@@ -1,6 +1,7 @@
1
1
  import { ChildProperty } from '@syncfusion/ej2-base';
2
2
  import { Query, DataManager } from '@syncfusion/ej2-data';
3
3
  import { SortComparerFunction } from '../base/interface';
4
+ import { SpannedEventPlacement } from '../base/type';
4
5
  import { FieldModel } from './fields-model';
5
6
  /**
6
7
  * Holds the configuration of event related options and dataSource binding to Schedule.
@@ -52,6 +53,16 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
52
53
  * @default null
53
54
  */
54
55
  tooltipTemplate: string;
56
+ /**
57
+ * Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
58
+ * This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
59
+ * * AllDayRow
60
+ * * TimeSlot
61
+ * {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
62
+ *
63
+ * @default 'AllDayRow'
64
+ */
65
+ spannedEventPlacement: SpannedEventPlacement;
55
66
  /**
56
67
  * Defines the resource name, to decides the color of which particular resource level is to be applied on appointments, when
57
68
  * grouping is enabled on scheduler.
@@ -46,6 +46,9 @@ var EventSettings = /** @class */ (function (_super) {
46
46
  __decorate([
47
47
  Property()
48
48
  ], EventSettings.prototype, "tooltipTemplate", void 0);
49
+ __decorate([
50
+ Property('AllDayRow')
51
+ ], EventSettings.prototype, "spannedEventPlacement", void 0);
49
52
  __decorate([
50
53
  Property()
51
54
  ], EventSettings.prototype, "resourceColorField", void 0);
@@ -25,7 +25,6 @@ export declare class EventWindow {
25
25
  private duration;
26
26
  private isCrudAction;
27
27
  private eventWindowTime;
28
- private timezoneData;
29
28
  private isEnterKey;
30
29
  private dialogEvent;
31
30
  constructor(parent: Schedule);
@@ -26,7 +26,6 @@ var EventWindow = /** @class */ (function () {
26
26
  this.parent = parent;
27
27
  this.l10n = this.parent.localeObj;
28
28
  this.fields = this.parent.eventFields;
29
- this.timezoneData = this.parent.tzModule.timezoneData;
30
29
  this.eventWindowTime = { startTime: new Date(), endTime: new Date() };
31
30
  this.renderEventWindow();
32
31
  }
@@ -464,14 +463,15 @@ var EventWindow = /** @class */ (function () {
464
463
  allowFiltering: true,
465
464
  change: this.onTimezoneChange.bind(this),
466
465
  cssClass: this.parent.cssClass || '',
467
- dataSource: this.timezoneData,
466
+ dataSource: this.parent.timezoneDataSource,
468
467
  enableRtl: this.parent.enableRtl,
469
468
  fields: { text: 'Text', value: 'Value' },
470
- filterBarPlaceholder: 'Search Timezone',
469
+ filterBarPlaceholder: this.parent.localeObj.getConstant('searchTimezone'),
470
+ noRecordsTemplate: this.parent.localeObj.getConstant('noRecords'),
471
471
  filtering: function (e) {
472
472
  var query = new Query();
473
473
  query = (e.text !== '') ? query.where('Text', 'contains', e.text, true) : query;
474
- e.updateData(_this.timezoneData, query);
474
+ e.updateData(_this.parent.timezoneDataSource, query);
475
475
  },
476
476
  htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName },
477
477
  floatLabelType: 'Always',
@@ -1797,7 +1797,6 @@ var EventWindow = /** @class */ (function () {
1797
1797
  this.fields = null;
1798
1798
  this.buttonObj = null;
1799
1799
  this.repeatStatus = null;
1800
- this.timezoneData = null;
1801
1800
  this.eventWindowTime = null;
1802
1801
  }
1803
1802
  };
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { createElement, remove } from '@syncfusion/ej2-base';
2
+ import { createElement, isNullOrUndefined, remove } from '@syncfusion/ej2-base';
3
3
  import { FormValidator } from '@syncfusion/ej2-inputs';
4
4
  import * as cls from '../base/css-constant';
5
5
  /**
@@ -49,6 +49,9 @@ var FieldValidator = /** @class */ (function () {
49
49
  if (!elem && !this.ignoreError) {
50
50
  this.createTooltip(inputElement, error, id, '');
51
51
  }
52
+ if (!isNullOrUndefined(elem)) {
53
+ elem.querySelector('.e-error').innerHTML = error.innerHTML;
54
+ }
52
55
  };
53
56
  FieldValidator.prototype.createTooltip = function (element, error, name, display) {
54
57
  var dlgContent;
@@ -67,7 +67,7 @@ var Agenda = /** @class */ (function (_super) {
67
67
  var event_1 = _a[_i];
68
68
  delete event_1.generatedDates;
69
69
  }
70
- var eventCollection = args.processedData;
70
+ var eventCollection = this.parent.activeViewOptions.allowVirtualScrolling ? args.processedData : this.parent.eventsProcessed;
71
71
  if (this.parent.uiStateValues.isGroupAdaptive) {
72
72
  var resource = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
73
73
  this.dataSource = this.parent.eventBase.filterEventsByResource(resource, this.dataSource);
@@ -171,6 +171,7 @@ var Agenda = /** @class */ (function (_super) {
171
171
  var filterData = this.appointmentFiltering(agendaDate);
172
172
  var nTr = this.createTableRowElement(agendaDate, 'data');
173
173
  if (this.element.querySelector('tr[aria-rowindex="' + parseInt(nTr.getAttribute('aria-rowindex'), 10) + '"]')) {
174
+ agendaDate = util.addDays(agendaDate, 1);
174
175
  continue;
175
176
  }
176
177
  var dTd = nTr.children[0];
@@ -1,8 +1,9 @@
1
+ import { TimezoneFields } from '../base/interface';
1
2
  /**
2
3
  * Time zone
3
4
  */
4
5
  export declare class Timezone {
5
- timezoneData: Record<string, string>[];
6
+ timezoneData: TimezoneFields[];
6
7
  constructor();
7
8
  offset(date: Date, timezone: string): number;
8
9
  convert(date: Date, fromOffset: number | string, toOffset: number | string): Date;
@@ -12,4 +13,4 @@ export declare class Timezone {
12
13
  getLocalTimezoneName(): string;
13
14
  private getTimezoneData;
14
15
  }
15
- export declare const timezoneData: Record<string, string>[];
16
+ export declare const timezoneData: TimezoneFields[];
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  /**
3
2
  * Time zone
4
3
  */
@@ -1676,7 +1676,7 @@
1676
1676
  border-style: solid;
1677
1677
  border-width: 0 1px 1px 0;
1678
1678
  color: #f0f0f0;
1679
- height: 70px;
1679
+ height: 75px;
1680
1680
  padding-left: 15px;
1681
1681
  padding-right: 0;
1682
1682
  vertical-align: middle;