@progress/kendo-angular-scheduler 2.2.0-dev.202111260859 → 3.0.1-dev.202202071010

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 (106) hide show
  1. package/dist/cdn/js/kendo-angular-scheduler.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/editing/date-time-picker.component.js +2 -1
  4. package/dist/es/editing/edit-dialog.component.js +1 -1
  5. package/dist/es/editing/recurrence/end-rule-radio-button.directive.js +5 -0
  6. package/dist/es/editing/recurrence/recurrence-monthly-yearly-editor.component.js +1 -1
  7. package/dist/es/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
  8. package/dist/es/events/slot-drag-end-event.js +17 -0
  9. package/dist/es/events/slot-drag-event.js +18 -0
  10. package/dist/es/events/slot-drag-start-event.js +24 -0
  11. package/dist/es/events.js +3 -0
  12. package/dist/es/index.js +1 -0
  13. package/dist/es/package-metadata.js +1 -1
  14. package/dist/es/scheduler.component.js +73 -1
  15. package/dist/es/scheduler.module.js +5 -1
  16. package/dist/es/toolbar/view-selector.component.js +1 -1
  17. package/dist/es/types/slot-selection.js +23 -0
  18. package/dist/es/types.js +1 -0
  19. package/dist/es/views/common/base-view.js +103 -8
  20. package/dist/es/views/common/slot-selectable.directive.js +117 -0
  21. package/dist/es/views/common/view-footer.component.js +1 -1
  22. package/dist/es/views/common/views-shared.module.js +2 -1
  23. package/dist/es/views/day-time/day-time-view.component.js +1 -1
  24. package/dist/es/views/day-time/day-time.module.js +2 -1
  25. package/dist/es/views/month/month-view-renderer.component.js +9 -5
  26. package/dist/es/views/multi-day/multi-day-view-renderer.component.js +3 -3
  27. package/dist/es/views/timeline/timeline-multi-day-view.component.js +1 -1
  28. package/dist/es/views/utils.js +49 -0
  29. package/dist/es/views/view-state.service.js +18 -0
  30. package/dist/es2015/editing/date-time-picker.component.js +7 -1
  31. package/dist/es2015/editing/edit-dialog.component.js +7 -7
  32. package/dist/es2015/editing/recurrence/end-rule-radio-button.directive.d.ts +1 -0
  33. package/dist/es2015/editing/recurrence/end-rule-radio-button.directive.js +5 -0
  34. package/dist/es2015/editing/recurrence/recurrence-monthly-yearly-editor.component.js +14 -5
  35. package/dist/es2015/editing/recurrence/repeat-on-radio-button.directive.d.ts +1 -0
  36. package/dist/es2015/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
  37. package/dist/es2015/events/slot-drag-end-event.d.ts +10 -0
  38. package/dist/es2015/events/slot-drag-end-event.js +10 -0
  39. package/dist/es2015/events/slot-drag-event.d.ts +39 -0
  40. package/dist/es2015/events/slot-drag-event.js +16 -0
  41. package/dist/es2015/events/slot-drag-start-event.d.ts +41 -0
  42. package/dist/es2015/events/slot-drag-start-event.js +19 -0
  43. package/dist/es2015/events.d.ts +3 -0
  44. package/dist/es2015/events.js +3 -0
  45. package/dist/es2015/index.d.ts +2 -0
  46. package/dist/es2015/index.js +1 -0
  47. package/dist/es2015/index.metadata.json +1 -1
  48. package/dist/es2015/package-metadata.js +1 -1
  49. package/dist/es2015/scheduler.component.d.ts +27 -0
  50. package/dist/es2015/scheduler.component.js +73 -1
  51. package/dist/es2015/scheduler.module.js +5 -1
  52. package/dist/es2015/toolbar/view-selector.component.js +1 -1
  53. package/dist/es2015/types/datepicker-options.interface.d.ts +5 -5
  54. package/dist/es2015/types/slot-selection.d.ts +71 -0
  55. package/dist/es2015/types/slot-selection.js +19 -0
  56. package/dist/es2015/types.d.ts +2 -0
  57. package/dist/es2015/types.js +1 -0
  58. package/dist/es2015/views/common/base-view.d.ts +26 -5
  59. package/dist/es2015/views/common/base-view.js +103 -8
  60. package/dist/es2015/views/common/slot-selectable.directive.d.ts +45 -0
  61. package/dist/es2015/views/common/slot-selectable.directive.js +112 -0
  62. package/dist/es2015/views/common/view-footer.component.js +1 -1
  63. package/dist/es2015/views/common/views-shared.module.js +2 -1
  64. package/dist/es2015/views/day-time/day-time-view.component.js +1 -1
  65. package/dist/es2015/views/day-time/day-time.module.js +2 -1
  66. package/dist/es2015/views/month/month-view-renderer.component.d.ts +3 -2
  67. package/dist/es2015/views/month/month-view-renderer.component.js +17 -7
  68. package/dist/es2015/views/multi-day/multi-day-view-renderer.component.d.ts +1 -1
  69. package/dist/es2015/views/multi-day/multi-day-view-renderer.component.js +22 -4
  70. package/dist/es2015/views/timeline/timeline-multi-day-view.component.js +8 -1
  71. package/dist/es2015/views/utils.d.ts +29 -0
  72. package/dist/es2015/views/utils.js +49 -0
  73. package/dist/es2015/views/view-state.service.d.ts +24 -1
  74. package/dist/es2015/views/view-state.service.js +18 -0
  75. package/dist/fesm2015/index.js +1674 -1231
  76. package/dist/fesm5/index.js +1803 -1388
  77. package/dist/npm/editing/date-time-picker.component.js +2 -1
  78. package/dist/npm/editing/edit-dialog.component.js +1 -1
  79. package/dist/npm/editing/recurrence/end-rule-radio-button.directive.js +5 -0
  80. package/dist/npm/editing/recurrence/recurrence-monthly-yearly-editor.component.js +1 -1
  81. package/dist/npm/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
  82. package/dist/npm/events/slot-drag-end-event.js +19 -0
  83. package/dist/npm/events/slot-drag-event.js +20 -0
  84. package/dist/npm/events/slot-drag-start-event.js +26 -0
  85. package/dist/npm/events.js +6 -0
  86. package/dist/npm/index.js +2 -0
  87. package/dist/npm/package-metadata.js +1 -1
  88. package/dist/npm/scheduler.component.js +73 -1
  89. package/dist/npm/scheduler.module.js +4 -0
  90. package/dist/npm/toolbar/view-selector.component.js +1 -1
  91. package/dist/npm/types/slot-selection.js +25 -0
  92. package/dist/npm/types.js +2 -0
  93. package/dist/npm/views/common/base-view.js +102 -7
  94. package/dist/npm/views/common/slot-selectable.directive.js +119 -0
  95. package/dist/npm/views/common/view-footer.component.js +1 -1
  96. package/dist/npm/views/common/views-shared.module.js +2 -1
  97. package/dist/npm/views/day-time/day-time-view.component.js +1 -1
  98. package/dist/npm/views/day-time/day-time.module.js +2 -1
  99. package/dist/npm/views/month/month-view-renderer.component.js +8 -4
  100. package/dist/npm/views/multi-day/multi-day-view-renderer.component.js +3 -3
  101. package/dist/npm/views/timeline/timeline-multi-day-view.component.js +1 -1
  102. package/dist/npm/views/utils.js +53 -0
  103. package/dist/npm/views/view-state.service.js +18 -0
  104. package/dist/systemjs/kendo-angular-scheduler.js +1 -1
  105. package/package.json +27 -24
  106. package/schematics/ngAdd/index.js +1 -1
@@ -6,14 +6,14 @@ import { __extends, __decorate, __param, __metadata, __assign, __generator } fro
6
6
  import { Directive, Optional, TemplateRef, Injectable, NgZone, EventEmitter, Input, Renderer2, ElementRef, ChangeDetectorRef, Inject, isDevMode, HostBinding, Component, Output, ContentChild, ContentChildren, QueryList, ViewChild, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, forwardRef, NgModule, LOCALE_ID, Pipe, ViewChildren, HostListener } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX, RTL, MessageService, ComponentMessages } from '@progress/kendo-angular-l10n';
8
8
  import { hasObservers, isDocumentAvailable, isChanged, anyChanged, ResizeSensorComponent, EventsModule, guid, Keys, ResizeSensorModule } from '@progress/kendo-angular-common';
9
- import { getDate, Day, ZonedDate, isEqualDate, toLocalDate, MS_PER_DAY, addDays, firstDayOfMonth, addMonths, firstDayInWeek, timezoneNames } from '@progress/kendo-date-math';
9
+ import { isEqualDate, getDate, Day, ZonedDate, toLocalDate, MS_PER_DAY, addDays, firstDayOfMonth, addMonths, firstDayInWeek, timezoneNames } from '@progress/kendo-date-math';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { PreventableEvent, CalendarComponent, CalendarModule, DatePickerComponent, DateInputsModule } from '@progress/kendo-angular-dateinputs';
12
12
  import { Subject, BehaviorSubject, fromEvent, Subscription, Observable, combineLatest, merge } from 'rxjs';
13
- import { buffer, filter, map, auditTime, debounceTime, take, switchMap, tap } from 'rxjs/operators';
13
+ import { buffer, filter, map, auditTime, debounceTime, take, switchMap, tap, distinctUntilChanged } from 'rxjs/operators';
14
14
  import { FormGroup, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
15
15
  import { DialogCloseResult, DialogService, DialogModule } from '@progress/kendo-angular-dialog';
16
- import { IntlService, formatDate, IntlModule, CldrIntlService, parseDate } from '@progress/kendo-angular-intl';
16
+ import { formatDate, IntlService, IntlModule, CldrIntlService, parseDate } from '@progress/kendo-angular-intl';
17
17
  import { CommonModule } from '@angular/common';
18
18
  import { parseRule, expand, serializeRule } from '@progress/kendo-recurrence';
19
19
  import { ButtonsModule, Button } from '@progress/kendo-angular-buttons';
@@ -21,7 +21,7 @@ import { PopupService, PopupModule } from '@progress/kendo-angular-popup';
21
21
  import { orderBy, groupBy } from '@progress/kendo-data-query';
22
22
  import Draggable from '@telerik/kendo-draggable';
23
23
  import { MultiSelectComponent, DropDownListComponent, ComboBoxComponent, DropDownsModule } from '@progress/kendo-angular-dropdowns';
24
- import { NumericTextBoxModule, TextBoxModule } from '@progress/kendo-angular-inputs';
24
+ import { CheckBoxModule, TextAreaModule, NumericTextBoxModule, TextBoxModule } from '@progress/kendo-angular-inputs';
25
25
  import { drawDOM, exportPDF } from '@progress/kendo-drawing';
26
26
  import { saveAs } from '@progress/kendo-file-saver';
27
27
 
@@ -32,7 +32,7 @@ var packageMetadata = {
32
32
  name: '@progress/kendo-angular-scheduler',
33
33
  productName: 'Kendo UI for Angular',
34
34
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
35
- publishDate: 1637916885,
35
+ publishDate: 1644228429,
36
36
  version: '',
37
37
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
38
38
  };
@@ -363,6 +363,49 @@ var AddEvent = /** @class */ (function (_super) {
363
363
  return AddEvent;
364
364
  }(PreventableEvent$1));
365
365
 
366
+ /**
367
+ * Arguments for the `slotDragStart` event.
368
+ * The event is preventable and if prevented, subsequent `slotDrag`, `slotDragEnd`, and `slotSelectionChange` will not be fired.
369
+ */
370
+ var SlotDragStartEvent = /** @class */ (function (_super) {
371
+ __extends(SlotDragStartEvent, _super);
372
+ /**
373
+ * @hidden
374
+ */
375
+ function SlotDragStartEvent(sender, args) {
376
+ var _this = _super.call(this) || this;
377
+ _this.sender = sender;
378
+ Object.assign(_this, args);
379
+ return _this;
380
+ }
381
+ return SlotDragStartEvent;
382
+ }(PreventableEvent$1));
383
+
384
+ /**
385
+ * Arguments for the `slotDrag` event.
386
+ */
387
+ var SlotDragEvent = /** @class */ (function () {
388
+ /**
389
+ * @hidden
390
+ */
391
+ function SlotDragEvent(sender, args) {
392
+ this.sender = sender;
393
+ Object.assign(this, args);
394
+ }
395
+ return SlotDragEvent;
396
+ }());
397
+
398
+ /**
399
+ * Arguments for the `slotDragEnd` event.
400
+ */
401
+ var SlotDragEndEvent = /** @class */ (function (_super) {
402
+ __extends(SlotDragEndEvent, _super);
403
+ function SlotDragEndEvent() {
404
+ return _super !== null && _super.apply(this, arguments) || this;
405
+ }
406
+ return SlotDragEndEvent;
407
+ }(SlotDragEvent));
408
+
366
409
  /**
367
410
  * Represents the toolbar template of the Scheduler. To define a toolbar
368
411
  * template, nest an `<ng-template kendoSchedulerToolbarTemplate>` tag
@@ -439,6 +482,25 @@ var SchedulerView = /** @class */ (function () {
439
482
  return SchedulerView;
440
483
  }());
441
484
 
485
+ /**
486
+ * The arguments for the [`isSlotSelected`]({% slug api_scheduler_schedulercomponent %}#toc-isslotselected) callback.
487
+ */
488
+ var IsSlotSelectedArgs = /** @class */ (function () {
489
+ function IsSlotSelectedArgs() {
490
+ }
491
+ return IsSlotSelectedArgs;
492
+ }());
493
+ /**
494
+ * @hidden
495
+ */
496
+ var slotDragEventName;
497
+ (function (slotDragEventName) {
498
+ slotDragEventName["initDragSelect"] = "initDragSelect";
499
+ slotDragEventName["dragSelect"] = "dragSelect";
500
+ slotDragEventName["refreshSlotSelection"] = "refreshSlotSelection";
501
+ slotDragEventName["dragSelectRelease"] = "dragSelectRelease";
502
+ })(slotDragEventName || (slotDragEventName = {}));
503
+
442
504
  /**
443
505
  * Represents the template which renders the date header in the **Agenda** view.
444
506
  * To define the date template, nest an `<ng-template>` tag with the `kendoSchedulerAgendaDateTemplate`
@@ -867,12 +929,18 @@ var ViewStateService = /** @class */ (function () {
867
929
  this.viewEventSource = new Subject();
868
930
  this.layoutEndSource = new Subject();
869
931
  this.optionsChangeSource = new Subject();
932
+ this.slotSelectionStartSource = new Subject();
933
+ this.slotSelectionStartDragSource = new Subject();
934
+ this.slotSelectionStartEndSource = new Subject();
870
935
  this.dateRange = this.dateRangeSource.asObservable();
871
936
  this.nextDate = this.nextDateSource.asObservable();
872
937
  this.navigate = this.navigateSource.asObservable();
873
938
  this.viewEvent = this.viewEventSource.asObservable();
874
939
  this.layoutEnd = this.layoutEndSource.asObservable();
875
940
  this.optionsChange = this.optionsChangeSource.asObservable();
941
+ this.slotSelectionStart = this.slotSelectionStartSource.asObservable();
942
+ this.slotSelectionDrag = this.slotSelectionStartDragSource.asObservable();
943
+ this.slotSelectionEnd = this.slotSelectionStartEndSource.asObservable();
876
944
  }
877
945
  /**
878
946
  * Publishes the date that will be displayed by the Scheduler
@@ -916,6 +984,18 @@ var ViewStateService = /** @class */ (function () {
916
984
  args: args
917
985
  });
918
986
  };
987
+ /** @hidden */
988
+ ViewStateService.prototype.notifySlotSelectionStart = function (selection) {
989
+ this.slotSelectionStartSource.next(selection);
990
+ };
991
+ /** @hidden */
992
+ ViewStateService.prototype.notifySlotSelectionDrag = function (selection) {
993
+ this.slotSelectionStartDragSource.next(selection);
994
+ };
995
+ /** @hidden */
996
+ ViewStateService.prototype.notifySlotSelectionEnd = function (selection) {
997
+ this.slotSelectionStartEndSource.next(selection);
998
+ };
919
999
  ViewStateService = __decorate([
920
1000
  Injectable(),
921
1001
  __metadata("design:paramtypes", [])
@@ -1860,1398 +1940,1516 @@ function rtlScrollPosition(element, position) {
1860
1940
  return result;
1861
1941
  }
1862
1942
 
1863
- var todayDate = function () { return getDate(new Date()); };
1864
- var DAYS_IN_WEEK = 7;
1943
+ /** @hidden */
1944
+ var intersects = function (startTime, endTime, periodStart, periodEnd) {
1945
+ return (startTime < periodStart && endTime > periodEnd) ||
1946
+ (periodStart <= startTime && startTime < periodEnd) ||
1947
+ (periodStart < endTime && endTime <= periodEnd && startTime < endTime);
1948
+ };
1949
+ /** @hidden */
1950
+ var dateInRange = function (date, start, end) { return start.getTime() <= date.getTime() && date.getTime() <= end.getTime(); };
1951
+ /** @hidden */
1952
+ var roundAllDayEnd = function (_a) {
1953
+ var start = _a.start, end = _a.end;
1954
+ var startDate = start.stripTime();
1955
+ var endDate = end.stripTime();
1956
+ return endDate.getTime() !== end.getTime() || startDate.getTime() === endDate.getTime() ? endDate.addDays(1) : endDate;
1957
+ };
1958
+ /** @hidden */
1959
+ function toInvariantTime(date) {
1960
+ var staticDate = new Date(1980, 0, 1, 0, 0, 0);
1961
+ if (date) {
1962
+ staticDate.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
1963
+ }
1964
+ return staticDate;
1965
+ }
1865
1966
  /**
1866
- * Represents the [Kendo UI Scheduler component for Angular]({% slug overview_scheduler %}).
1867
- *
1868
- * @example
1869
- * ```ts-preview
1870
- * _@Component({
1871
- * selector: 'my-app',
1872
- * template: `
1873
- * <kendo-scheduler style="height: 600px">
1874
- * <kendo-scheduler-day-view>
1875
- * </kendo-scheduler-day-view>
1876
- * <kendo-scheduler-week-view>
1877
- * </kendo-scheduler-week-view>
1878
- * </kendo-scheduler>
1879
- * `
1880
- * })
1881
- * class AppComponent {}
1882
- * ```
1967
+ * @hidden
1968
+ * TODO Move to date-math
1883
1969
  */
1884
- var SchedulerComponent = /** @class */ (function () {
1885
- function SchedulerComponent(wrapper, viewContext, viewState, editService, dialogsService, intlService, changeDetector, zone, pdfService, localization, domEvents, renderer, focusService) {
1886
- this.wrapper = wrapper;
1887
- this.viewContext = viewContext;
1888
- this.viewState = viewState;
1889
- this.editService = editService;
1890
- this.dialogsService = dialogsService;
1891
- this.intlService = intlService;
1892
- this.changeDetector = changeDetector;
1893
- this.zone = zone;
1894
- this.pdfService = pdfService;
1895
- this.localization = localization;
1896
- this.domEvents = domEvents;
1897
- this.renderer = renderer;
1898
- this.focusService = focusService;
1899
- this.hostClasses = true;
1900
- this.rtl = false;
1901
- /**
1902
- * Specifies if the Scheduler is editable.
1903
- */
1904
- this.editable = false;
1905
- /**
1906
- * The height of the events in the **Month** and **Timeline** views, and the height of the **All day** events in the **Day** and **Week** views.
1907
- */
1908
- this.eventHeight = 25;
1909
- /**
1910
- * Specifies the columns width. Applicable for the **Timeline** views.
1911
- */
1912
- this.columnWidth = 100;
1913
- /**
1914
- * The start time of the view. The Scheduler displays events which start after the start time.
1915
- * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
1916
- */
1917
- this.startTime = '00:00';
1918
- /**
1919
- * The end time of the view. The Scheduler displays events which end before the end time.
1920
- * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
1921
- */
1922
- this.endTime = '00:00';
1923
- /**
1924
- * The start time of the view when `showWorkHours` is set to `true`.
1925
- * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
1926
- */
1927
- this.workDayStart = '08:00';
1928
- /**
1929
- * The end time of the view when `showWorkHours` is set to `true`.
1930
- * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
1931
- */
1932
- this.workDayEnd = '17:00';
1933
- /**
1934
- * The duration (in minutes) of the time slots. Applicable for the day, week and timeline views.
1935
- */
1936
- this.slotDuration = 60;
1937
- /**
1938
- * The number of divisions of the time slots. Applicable for the **Day**, **Week**, and **Timeline** views.
1939
- */
1940
- this.slotDivisions = 2;
1941
- /**
1942
- * A numeric value between 0 and 1 that specifies what percentage of the slot will be filled by the events.
1943
- * Applicable for the **Day** and **Week** views.
1944
- * Defaults to `0.9` (90% fill).
1945
- */
1946
- this.slotFill = 0.9;
1947
- /**
1948
- * The time to which the view will initially be scrolled.
1949
- * Accepts string values in the `HH:mm` format or a JavaScript `Date`. Applicable for the **Day**, **Week**, and **Timeline** views.
1950
- */
1951
- this.scrollTime = this.workDayStart;
1952
- /**
1953
- * Specifies the Scheduler current time marker settings.
1954
- */
1955
- this.currentTimeMarker = true;
1956
- /**
1957
- * @hidden
1958
- */
1959
- this.selectedViewIndexChange = new EventEmitter();
1960
- /**
1961
- * Fires when the Scheduler is about to execute a navigation action
1962
- * (a view, date, or focus change).
1963
- */
1964
- this.navigate = new EventEmitter();
1965
- /**
1966
- * Fires when the date range that is displayed in the Scheduler changes.
1967
- */
1968
- this.dateChange = new EventEmitter();
1969
- /**
1970
- * Fires when a Scheduler view slot is clicked.
1971
- */
1972
- this.slotClick = new EventEmitter();
1973
- /**
1974
- * Fires when a Scheduler view slot is double-clicked.
1975
- */
1976
- this.slotDblClick = new EventEmitter();
1977
- /**
1978
- * Fires when the user creates a new event using the `'c'` key.
1979
- * ([see example]({% slug keyboard_navigation_scheduler %})).
1980
- */
1981
- this.create = new EventEmitter();
1982
- /**
1983
- * Fires when a Scheduler event is clicked.
1984
- */
1985
- this.eventClick = new EventEmitter();
1986
- /**
1987
- * Fires when a Scheduler event is double-clicked.
1988
- */
1989
- this.eventDblClick = new EventEmitter();
1990
- /**
1991
- * Fires when a key is pressed on a focused Scheduler event.
1992
- */
1993
- this.eventKeydown = new EventEmitter();
1994
- /**
1995
- * Fires when the user cancels the editing by clicking the **Cancel** command button.
1996
- */
1997
- this.cancel = new EventEmitter();
1998
- /**
1999
- * Fires when the user clicks the **Save** command button to save the changes of the edited event.
2000
- */
2001
- this.save = new EventEmitter();
2002
- /**
2003
- * Fires when the user clicks the **Remove** icon of a Scheduler event.
2004
- */
2005
- this.remove = new EventEmitter();
2006
- /**
2007
- * Fires when the user starts resizing a Scheduler event.
2008
- */
2009
- this.resizeStart = new EventEmitter();
2010
- /**
2011
- * Fires when the user is resizing a Scheduler event.
2012
- */
2013
- this.resize = new EventEmitter();
2014
- /**
2015
- * Fires when the user stops resizing a Scheduler event.
2016
- */
2017
- this.resizeEnd = new EventEmitter();
2018
- /**
2019
- * Fires when the user starts dragging a Scheduler event.
2020
- */
2021
- this.dragStart = new EventEmitter();
2022
- /**
2023
- * Fires when the user is dragging a Scheduler event.
2024
- */
2025
- this.drag = new EventEmitter();
2026
- /**
2027
- * Fires when the user stops dragging a Scheduler event.
2028
- */
2029
- this.dragEnd = new EventEmitter();
2030
- /**
2031
- * Fires when the user clicks the **PDF export** command button.
2032
- */
2033
- this.pdfExport = new EventEmitter();
2034
- /**
2035
- * @hidden
2036
- */
2037
- this.dragEndConfirmed = new EventEmitter();
2038
- /**
2039
- * @hidden
2040
- */
2041
- this.resizeEndConfirmed = new EventEmitter();
2042
- /**
2043
- * @hidden
2044
- */
2045
- this.removeConfirmed = new EventEmitter();
2046
- this.viewIndex = 0;
2047
- this._timezone = '';
2048
- this._modelFields = defaultModelFields;
2049
- validatePackage(packageMetadata);
2050
- this.dateRangeStream = viewState.dateRange;
2051
- this.selectedDateStream = viewContext.selectedDate;
2052
- }
2053
- Object.defineProperty(SchedulerComponent.prototype, "dir", {
2054
- get: function () {
2055
- return this.direction;
2056
- },
2057
- enumerable: true,
2058
- configurable: true
2059
- });
2060
- Object.defineProperty(SchedulerComponent.prototype, "selectedViewIndex", {
2061
- get: function () {
2062
- return this.viewIndex;
2063
- },
2064
- /**
2065
- * The index of the currently selected view.
2066
- *
2067
- * By default, the selected view index is `0` and
2068
- * indicates that the first declared view is visible.
2069
- */
2070
- set: function (index) {
2071
- this.viewIndex = index;
2072
- this.onViewIndexChange();
2073
- },
2074
- enumerable: true,
2075
- configurable: true
2076
- });
2077
- Object.defineProperty(SchedulerComponent.prototype, "weekStart", {
2078
- get: function () {
2079
- if (isPresent(this._weekStart)) {
2080
- return this._weekStart;
2081
- }
2082
- return this.intlService.firstDay();
2083
- },
2084
- /**
2085
- * The first day of the week. Applicable to **Week**, **Month** and **TimelineWeek** views.
2086
- * Defaults to the locale settings.
2087
- */
2088
- set: function (value) {
2089
- this._weekStart = value;
2090
- },
2091
- enumerable: true,
2092
- configurable: true
2093
- });
2094
- Object.defineProperty(SchedulerComponent.prototype, "timezone", {
2095
- get: function () {
2096
- return this._timezone;
2097
- },
2098
- /**
2099
- * Specifies the id of the timezone that will be displayed in the Scheduler.
2100
- * For example, `Europe/Sofia`.
2101
- * Defaults to `Etc/UTC`.
2102
- */
2103
- set: function (value) {
2104
- this._timezone = value;
2105
- this.events = this.events || [];
2106
- },
2107
- enumerable: true,
2108
- configurable: true
2109
- });
2110
- Object.defineProperty(SchedulerComponent.prototype, "events", {
2111
- get: function () {
2112
- return this._events;
2113
- },
2114
- /**
2115
- * An array of event instances which will be shown by the Scheduler.
2116
- */
2117
- set: function (value) {
2118
- this._events = value;
2119
- this.processEvents(value);
2120
- },
2121
- enumerable: true,
2122
- configurable: true
2123
- });
2124
- Object.defineProperty(SchedulerComponent.prototype, "selectedDate", {
2125
- get: function () {
2126
- return this._selectedDate;
2127
- },
2128
- /**
2129
- * The currently selected date of the Scheduler.
2130
- * Determines the period which is displayed.
2131
- */
2132
- set: function (value) {
2133
- if (!value) {
2134
- return;
1970
+ var addUTCDays = function (date, offset) {
1971
+ var newDate = new Date(date.getTime());
1972
+ newDate.setUTCDate(newDate.getUTCDate() + offset);
1973
+ return newDate;
1974
+ };
1975
+ // TODO: name? move to date-math
1976
+ /** @hidden */
1977
+ function toUTCTime(localDate, localTime) {
1978
+ return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localTime.getHours(), localTime.getMinutes(), localTime.getSeconds(), localTime.getMilliseconds()));
1979
+ }
1980
+ // TODO: move to date-math
1981
+ /** @hidden */
1982
+ function toUTCDate(localDate) {
1983
+ return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate()));
1984
+ }
1985
+ // TODO: move to date-math
1986
+ /** @hidden */
1987
+ function getUTCDate(utcDate) {
1988
+ return new Date(Date.UTC(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate()));
1989
+ }
1990
+ // TODO: move to date-math
1991
+ /** @hidden */
1992
+ function toUTCDateTime(localDate) {
1993
+ return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localDate.getHours(), localDate.getMinutes(), localDate.getSeconds(), localDate.getMilliseconds()));
1994
+ }
1995
+ /** @hidden */
1996
+ function dateWithTime(target, time) {
1997
+ return new Date(target.getFullYear(), target.getMonth(), target.getDate(), time.getHours(), time.getMinutes());
1998
+ }
1999
+ /**
2000
+ * @hidden
2001
+ * Flips the start and end values of a slot selection based on whether
2002
+ * the last dragged-over slot is before or after the slot where the selection began.
2003
+ */
2004
+ function normaliseRangeStartAndEnd(selectionOrigin, currentSlot) {
2005
+ var start;
2006
+ var end;
2007
+ if (currentSlot.end <= selectionOrigin.end) {
2008
+ end = selectionOrigin.end;
2009
+ start = currentSlot.start;
2010
+ }
2011
+ else {
2012
+ start = selectionOrigin.start;
2013
+ end = currentSlot.end;
2014
+ }
2015
+ return { start: start, end: end };
2016
+ }
2017
+ function getDataIdx(value, resource) {
2018
+ var data = resource.data;
2019
+ for (var dataIdx = 0; dataIdx < data.length; dataIdx++) {
2020
+ if (getField(data[dataIdx], resource.valueField) === value) {
2021
+ return dataIdx;
2022
+ }
2023
+ }
2024
+ return -1;
2025
+ }
2026
+ function resourceItem(value, resource) {
2027
+ var index = getDataIdx(value, resource);
2028
+ return index >= 0 ? resource.data[index] : {};
2029
+ }
2030
+ function resourceItems(values, resource) {
2031
+ return values.map(function (value) { return resourceItem(value, resource); });
2032
+ }
2033
+ function cloneResources(arr) {
2034
+ var result = [];
2035
+ for (var idx = 0; idx < arr.length; idx++) {
2036
+ var clone$$1 = Object.assign({}, arr[idx]);
2037
+ clone$$1.resources = clone$$1.resources.slice(0);
2038
+ result.push(clone$$1);
2039
+ }
2040
+ return result;
2041
+ }
2042
+ /** @hidden */
2043
+ function resourceItemByValue(event, resource) {
2044
+ var value = getField(event, resource.field);
2045
+ if (Array.isArray(value)) {
2046
+ return resourceItems(value, resource);
2047
+ }
2048
+ return resourceItem(value, resource);
2049
+ }
2050
+ function addNotGroupedResources(event, resources, allResources) {
2051
+ for (var resourceIdx = 0; resourceIdx < resources.length; resourceIdx++) {
2052
+ var current = resources[resourceIdx];
2053
+ for (var idx = 0; idx < allResources.length; idx++) {
2054
+ var item = allResources[idx];
2055
+ if (!current.resources[idx] && item.data) {
2056
+ current.resources[idx] = resourceItemByValue(event, item);
2135
2057
  }
2136
- this._selectedDate = value;
2137
- this.viewContext.notifySelectedDate(value);
2138
- },
2139
- enumerable: true,
2140
- configurable: true
2141
- });
2142
- Object.defineProperty(SchedulerComponent.prototype, "modelFields", {
2143
- get: function () {
2144
- return this._modelFields;
2145
- },
2146
- /**
2147
- * The names of the model fields from which the Scheduler will read its data
2148
- * ([see example]({% slug databinding_scheduler %}#toc-binding-to-models)).
2149
- */
2150
- set: function (value) {
2151
- this._modelFields = __assign({}, defaultModelFields, value);
2152
- },
2153
- enumerable: true,
2154
- configurable: true
2155
- });
2156
- SchedulerComponent.prototype.ngOnInit = function () {
2157
- if (!this.selectedDate) {
2158
- this.selectedDate = todayDate();
2159
2058
  }
2160
- };
2161
- SchedulerComponent.prototype.ngAfterContentInit = function () {
2162
- var _this = this;
2163
- if (isDevMode() && this.views.length === 0) {
2164
- throw new Error('No views declared for <kendo-scheduler>. Please, declare at least one view.');
2059
+ }
2060
+ }
2061
+ /** @hidden */
2062
+ function eventResources(event, _a) {
2063
+ var taskResources = _a.taskResources, hasGroups = _a.hasGroups, spans = _a.spans, _b = _a.allResources, allResources = _b === void 0 ? [] : _b;
2064
+ var resources = [];
2065
+ for (var resourceIdx = 0; resourceIdx < taskResources.length; resourceIdx++) {
2066
+ var resource = taskResources[resourceIdx];
2067
+ if (!resource.data) {
2068
+ resources = [{ leafIdx: 0, resources: [] }];
2069
+ continue;
2165
2070
  }
2166
- this.subs = this.views.changes.subscribe(function () {
2167
- return _this.resetViewIndex();
2168
- });
2169
- this.subs.add(this.intlService.changes.subscribe(this.intlChange.bind(this)));
2170
- this.subs.add(this.viewState.nextDate.subscribe(function (nextDate) {
2171
- _this.selectedDate = nextDate;
2172
- }));
2173
- this.subs.add(this.viewState.dateRange.subscribe(function (dateRange) {
2174
- var isEmpty = dateRange.start.getTime() === 0;
2175
- if (!isEmpty) {
2176
- var args = new DateChangeEvent(_this, _this.selectedDate, dateRange);
2177
- _this.dateChange.emit(args);
2071
+ var resourceIndex = allResources.indexOf(resource);
2072
+ var values = getField(event, resource.field);
2073
+ if (!Array.isArray(values)) {
2074
+ values = [values];
2075
+ }
2076
+ var expandedResources = [];
2077
+ for (var valueIdx = 0; valueIdx < values.length; valueIdx++) {
2078
+ var dataIdx = getDataIdx(values[valueIdx], resource);
2079
+ if (dataIdx < 0) {
2080
+ return [{ leafIdx: hasGroups ? -1 : 0, resources: [] }];
2178
2081
  }
2179
- }));
2180
- this.subs.add(this.viewState.navigate.subscribe(function (_a) {
2181
- var viewName = _a.viewName, date = _a.date;
2182
- var views = _this.views.toArray();
2183
- var view = views.find(function (v) { return v.name === viewName; });
2184
- var args = new NavigateEvent(_this, {
2185
- type: 'show-date',
2186
- view: view || {
2187
- name: viewName,
2188
- title: viewName
2189
- },
2190
- date: date
2191
- });
2192
- _this.navigate.next(args);
2193
- if (view && !args.isDefaultPrevented()) {
2194
- var index = views.indexOf(view);
2195
- _this.selectedView = view;
2196
- _this.setViewIndex(index);
2197
- _this.selectedDate = date;
2082
+ var item = resource.data[dataIdx];
2083
+ // has groups - need all copies of the multiple resource
2084
+ // no groups - just the first
2085
+ if (resourceIdx === 0 && (hasGroups || valueIdx === 0)) {
2086
+ var resourceItems_1 = [];
2087
+ resourceItems_1[resourceIndex] = resource.multiple && !hasGroups ? [item] : item;
2088
+ resources.push({
2089
+ leafIdx: hasGroups ? dataIdx * spans[resourceIdx] : 0,
2090
+ color: getField(item, resource.colorField),
2091
+ resources: resourceItems_1
2092
+ });
2198
2093
  }
2199
- }));
2200
- this.subs.add(this.viewState.viewEvent.subscribe(function (_a) {
2201
- var name = _a.name, args = _a.args;
2202
- var emitter = _this[name];
2203
- var confirmedEmitter = _this[name + "Confirmed"];
2204
- if (hasObservers(emitter) || (confirmedEmitter && hasObservers(confirmedEmitter))) {
2205
- _this.zone.run(function () {
2206
- var eventInstance = new VIEW_EVENT_MAP[name](_this, args);
2207
- emitter.emit(eventInstance);
2208
- args.prevented = eventInstance.prevented;
2209
- if (confirmedEmitter && !args.prevented) {
2210
- confirmedEmitter.emit(eventInstance);
2211
- }
2212
- });
2213
- }
2214
- }));
2215
- this.subs.add(this.viewState.layoutEnd.subscribe(function () {
2216
- if (_this.resizeSensor) {
2217
- _this.resizeSensor.acceptSize();
2094
+ else if (hasGroups) { // don't create multiple resource groups if no groups for multiple resources
2095
+ var currentResources = resources;
2096
+ if (values.length > 1) {
2097
+ currentResources = cloneResources(resources);
2098
+ expandedResources.push.apply(expandedResources, currentResources);
2099
+ }
2100
+ for (var currentIdx = 0; currentIdx < currentResources.length; currentIdx++) {
2101
+ currentResources[currentIdx].leafIdx += dataIdx * spans[resourceIdx];
2102
+ currentResources[currentIdx].resources[resourceIndex] = item;
2103
+ }
2218
2104
  }
2219
- }));
2220
- this.onViewIndexChange();
2221
- this.notifyOptionsChange = this.notifyOptionsChange.bind(this);
2222
- this.subs.add(this.allDayEventTemplate.changes.subscribe(this.notifyOptionsChange));
2223
- this.subs.add(this.eventTemplate.changes.subscribe(this.notifyOptionsChange));
2224
- this.subs.add(this.timeSlotTemplate.changes.subscribe(this.notifyOptionsChange));
2225
- this.subs.add(this.timeSlotTemplate.changes.subscribe(this.notifyOptionsChange));
2226
- this.subs.add(this.minorTimeHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2227
- this.subs.add(this.majorTimeHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2228
- this.subs.add(this.monthDaySlotTemplate.changes.subscribe(this.notifyOptionsChange));
2229
- this.subs.add(this.dateHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2230
- this.subs.add(this.allDaySlotTemplate.changes.subscribe(this.notifyOptionsChange));
2231
- this.subs.add(this.groupHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2232
- this.subs.add(this.agendaDateTemplate.changes.subscribe(this.notifyOptionsChange));
2233
- this.subs.add(this.agendaTimeTemplate.changes.subscribe(this.notifyOptionsChange));
2234
- this.subs.add(this.views.changes.subscribe(function () {
2235
- _this.changeDetector.markForCheck();
2236
- }));
2237
- //this.editService.timezone = this.timezone;
2238
- this.attachEditHandlers();
2239
- this.dialogsService.container = this.confirmationDialogContainerRef;
2240
- this.notifyOptionsChange();
2241
- this.subs.add(this.pdfService.exportClick.subscribe(function () {
2242
- var args = new PDFExportEvent();
2243
- _this.pdfExport.emit(args);
2244
- if (!args.isDefaultPrevented()) {
2245
- _this.saveAsPDF();
2105
+ else if (valueIdx > 0) {
2106
+ for (var idx = 0; idx < resources.length; idx++) {
2107
+ resources[idx].resources[resourceIndex].push(item);
2108
+ }
2246
2109
  }
2247
- }));
2248
- this.subs.add(this.pdfService.done.subscribe(function () {
2249
- _this.loadingComponent.toggle(false);
2250
- }));
2251
- this.subs.add(this.localization.changes.subscribe(function (_a) {
2252
- var rtl = _a.rtl;
2253
- _this.rtl = rtl;
2254
- _this.direction = _this.rtl ? 'rtl' : 'ltr';
2255
- }));
2256
- this.subs.add(this.viewState.optionsChange.subscribe(function () {
2257
- _this.changeDetector.markForCheck();
2258
- }));
2259
- this.attachElementEventHandlers();
2260
- };
2261
- SchedulerComponent.prototype.ngOnChanges = function (changes) {
2262
- var _this = this;
2263
- if (isChanged('resources', changes) && !isChanged('events', changes) && this.viewItems) {
2264
- this.viewItems.forEach(function (item) {
2265
- copyResources(item.event, _this.resources);
2266
- });
2267
- }
2268
- if (anyChanged([
2269
- 'group', 'resources', 'min', 'max', 'showWorkHours', 'startTime', 'scrollTime', 'endTime', 'eventHeight',
2270
- 'workDayStart', 'workDayEnd', 'workWeekStart', 'workWeekEnd', 'weekStart', 'slotDuration', 'slotDivisions',
2271
- 'editable', 'timezone', 'slotClass', 'slotFill', 'columnWidth', 'eventClass', 'eventStyles'
2272
- ], changes)) {
2273
- this.notifyOptionsChange(changes);
2274
2110
  }
2275
- };
2276
- SchedulerComponent.prototype.ngOnDestroy = function () {
2277
- if (this.subs) {
2278
- this.subs.unsubscribe();
2111
+ if (expandedResources.length) {
2112
+ resources = expandedResources;
2279
2113
  }
2280
- if (this.detachElementEventHandlers) {
2281
- this.detachElementEventHandlers();
2114
+ }
2115
+ addNotGroupedResources(event, resources, allResources);
2116
+ return resources;
2117
+ }
2118
+ /** @hidden */
2119
+ function assignTasksResources(tasks, options) {
2120
+ for (var idx = 0; idx < tasks.length; idx++) {
2121
+ var task = tasks[idx];
2122
+ task.resources = eventResources(task.event, options);
2123
+ }
2124
+ }
2125
+ /**
2126
+ * @hidden
2127
+ */
2128
+ function isEmptyResource(resources) {
2129
+ return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
2130
+ }
2131
+ /**
2132
+ * @hidden
2133
+ */
2134
+ function resourcesMatch(res1, res2) {
2135
+ if (res1.length !== res2.length) {
2136
+ return false;
2137
+ }
2138
+ if (isEmptyResource(res1) && isEmptyResource(res2)) {
2139
+ return true;
2140
+ }
2141
+ return res1.every(function (r1) { return res2.some(function (r2) { return r2.value === r1.value; }); });
2142
+ }
2143
+ /**
2144
+ * @hidden
2145
+ */
2146
+ function isSameRange(range1, range2) {
2147
+ return (range1.start.getTime() === range2.start.getTime() &&
2148
+ range1.end.getTime() === range2.end.getTime() &&
2149
+ range1.isAllDay === range2.isAllDay &&
2150
+ resourcesMatch(range1.resources, range2.resources));
2151
+ }
2152
+ /** @hidden */
2153
+ function findRowIndex(events, data) {
2154
+ if (data.rowIndex !== undefined) {
2155
+ return data.rowIndex;
2156
+ }
2157
+ for (var idx = 0; idx < events.length; idx++) {
2158
+ if (!events[idx]) {
2159
+ return idx;
2282
2160
  }
2161
+ }
2162
+ return events.length;
2163
+ }
2164
+ /** @hidden */
2165
+ function isRecurrence(task) {
2166
+ return Boolean(task.event && task.event.recurrenceRule);
2167
+ }
2168
+ /** @hidden */
2169
+ function isRecurrenceException(task) {
2170
+ return task.event && isPresent(task.event.recurrenceId) && !task.event.recurrenceRule;
2171
+ }
2172
+ /** @hidden */
2173
+ var rectContains = function (rect, left, top) {
2174
+ return rect.left <= left && left <= rect.left + rect.width && rect.top <= top && top <= rect.top + rect.height;
2175
+ };
2176
+ /** @hidden */
2177
+ var rectContainsX = function (rect, left) {
2178
+ return rect.left <= left && left <= rect.left + rect.width;
2179
+ };
2180
+ /** @hidden */
2181
+ var toPx = function (value) { return value + "px"; };
2182
+ /** @hidden */
2183
+ var elementOffset = function (element) {
2184
+ if (!element) {
2185
+ return null;
2186
+ }
2187
+ var box = element.getBoundingClientRect();
2188
+ var documentElement = document.documentElement;
2189
+ return {
2190
+ top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),
2191
+ left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0),
2192
+ width: box.width,
2193
+ height: box.height
2283
2194
  };
2284
- /**
2285
- * @hidden
2286
- */
2287
- SchedulerComponent.prototype.onResize = function (_event) {
2288
- this.viewContext.notifyResize();
2289
- };
2290
- /**
2291
- * @hidden
2292
- */
2293
- SchedulerComponent.prototype.onNavigationAction = function (action) {
2294
- var args = new NavigateEvent(this, action);
2295
- this.navigate.next(args);
2296
- if (args.isDefaultPrevented()) {
2297
- return true;
2298
- }
2299
- if (action.type === 'view-change') {
2300
- var views = this.views.toArray();
2301
- var index = views.indexOf(action.view);
2302
- this.selectedView = action.view;
2303
- this.setViewIndex(index);
2304
- }
2305
- else if (action.type === 'select-date') {
2306
- if (this.isInRange(action.date)) {
2307
- this.selectedDate = action.date;
2308
- }
2195
+ };
2196
+ /** @hidden */
2197
+ var pointDistance = function (x1, y1, x2, y2) { return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); };
2198
+ /** @hidden */
2199
+ var ignoreContentChild = function (child) { return child.nodeName === 'KENDO-RESIZE-SENSOR' || hasClasses(child, 'k-loading-mask'); };
2200
+ /** @hidden */
2201
+ var setCoordinates = function (element, coordinates) {
2202
+ for (var field in coordinates) {
2203
+ if (coordinates.hasOwnProperty(field)) {
2204
+ element.style[field] = toPx(coordinates[field]);
2309
2205
  }
2310
- else if (action.type === 'today') {
2311
- var date = new Date();
2312
- if (this.isInRange(date)) {
2313
- this.selectedDate = date;
2206
+ }
2207
+ };
2208
+ /** @hidden */
2209
+ var convertNgClassBindings = function (bindingValues) {
2210
+ var result = [];
2211
+ if (isString(bindingValues)) {
2212
+ result.push(bindingValues);
2213
+ }
2214
+ else if (isArray(bindingValues)) {
2215
+ result.push.apply(result, bindingValues);
2216
+ }
2217
+ else if (isObject(bindingValues)) {
2218
+ for (var field in bindingValues) {
2219
+ if (bindingValues.hasOwnProperty(field) && bindingValues[field]) {
2220
+ result.push(field);
2314
2221
  }
2315
2222
  }
2316
- else {
2317
- this.viewContext.notifyAction(action);
2318
- }
2319
- };
2320
- /**
2321
- * Creates a popup editor for the new event.
2322
- *
2323
- * @param group - The [`FormGroup`](https://angular.io/docs/ts/latest/api/forms/index/FormGroup-class.html) that describes
2324
- * the edit form. If called with a data item, the parameter will build the `FormGroup` from the data item fields.
2325
- */
2326
- SchedulerComponent.prototype.addEvent = function (group) {
2327
- var isFormGroup = group instanceof FormGroup;
2328
- if (!isFormGroup) {
2329
- var createControl = function (source) { return function (acc, key) {
2330
- acc[key] = new FormControl(source[key]);
2331
- return acc;
2332
- }; };
2333
- var fields = Object.keys(group).reduce(createControl(group), {});
2334
- group = new FormGroup(fields);
2335
- }
2336
- this.editService.addEvent(group);
2337
- };
2338
- /**
2339
- * Switches the specified event in edit mode.
2340
- *
2341
- * @param dataItem - The event that will be switched to edit mode.
2342
- * @param options - An object which contains the form `group` that will be bound in the edit dialog and the current edit `mode`.
2343
- *
2344
- */
2345
- SchedulerComponent.prototype.editEvent = function (dataItem, options) {
2346
- if (options === void 0) { options = {}; }
2347
- var group = options.group, mode = options.mode;
2348
- this.editService.editEvent(dataItem, group, mode);
2349
- };
2350
- /**
2351
- * Closes the event editor, if open.
2352
- */
2353
- SchedulerComponent.prototype.closeEvent = function () {
2354
- this.editService.close();
2355
- };
2356
- /**
2357
- * Returns a flag which indicates if an event is currently edited.
2358
- *
2359
- * @return {boolean} - A flag which indicates if an event is currently edited.
2360
- */
2361
- SchedulerComponent.prototype.isEditing = function () {
2362
- return this.editService.isEditing();
2363
- };
2364
- /**
2365
- * Opens the built-in confirmation dialog for defining the edit mode
2366
- * that will be used when the user edits or removes a recurring event.
2367
- *
2368
- * @param operation - The type of operation that will be confirmed. Has to be either **Edit** or **Remove**.
2369
- *
2370
- * @return {Observable<EditMode>}
2371
- */
2372
- SchedulerComponent.prototype.openRecurringConfirmationDialog = function (operation) {
2373
- return this.dialogsService.openRecurringConfirmationDialog(operation);
2374
- };
2375
- /**
2376
- * Opens the built-in removal confirmation dialog.
2377
- *
2378
- * @return {Observable<boolean>}
2379
- */
2380
- SchedulerComponent.prototype.openRemoveConfirmationDialog = function () {
2381
- return this.dialogsService.openRemoveConfirmationDialog();
2382
- };
2383
- /**
2384
- * Saves the current view as PDF.
2385
- */
2386
- SchedulerComponent.prototype.saveAsPDF = function () {
2387
- var _this = this;
2388
- this.loadingComponent.toggle(true);
2389
- this.zone.runOutsideAngular(function () {
2390
- // wait a tick in order for the loading element style to be updated by the browser.
2391
- // if the export is synchronous, the browser will not update the element before the export is finished.
2392
- setTimeout(function () {
2393
- _this.pdfService.save();
2394
- }, 0);
2395
- });
2396
- };
2397
- /**
2398
- * Scrolls the view to the specified time.
2399
- */
2400
- SchedulerComponent.prototype.scrollToTime = function (time) {
2401
- this.viewContext.notifyAction({
2402
- type: 'scroll-time',
2403
- time: time
2404
- });
2405
- };
2406
- /**
2407
- * Returns the current view slot that matches the passed document position.
2408
- *
2409
- * @param x - The x document position.
2410
- * @param y - The y document position.
2411
- *
2412
- * @return {SchedulerSlot} - The slot.
2413
- *
2414
- * {% embed_file drag-and-drop/app.component.ts %}
2415
- * {% embed_file drag-and-drop/draggable.directive.ts %}
2416
- * {% embed_file drag-and-drop/app.module.ts %}
2417
- * {% embed_file shared/main.ts %}
2418
- */
2419
- SchedulerComponent.prototype.slotByPosition = function (x, y) {
2420
- return this.viewContext.executeMethod('slotByPosition', { x: x, y: y });
2421
- };
2422
- /**
2423
- * Returns the event associated with the specified DOM element, if any.
2424
- *
2425
- * @param element - The DOM element document position.
2426
- * @return the event instance, if found.
2427
- */
2428
- SchedulerComponent.prototype.eventFromElement = function (element) {
2429
- return this.viewContext.executeMethod('eventFromElement', { element: element });
2430
- };
2431
- Object.defineProperty(SchedulerComponent.prototype, "activeEvent", {
2223
+ }
2224
+ return result;
2225
+ };
2226
+ /**
2227
+ * @hidden
2228
+ */
2229
+ function formatEventTime(start, end, isAllDay, localeId) {
2230
+ var startTimeFormat = { skeleton: 'yMMMMEEEEdhm' };
2231
+ var startDateFormat = { skeleton: 'yMMMMEEEEd' };
2232
+ var endFormat = isEqualDate(start, end) ? 't' : startTimeFormat;
2233
+ return isAllDay ?
2234
+ "" + formatDate(start, startDateFormat, localeId) :
2235
+ formatDate(start, startTimeFormat, localeId) + "\u2013" + formatDate(end, endFormat, localeId);
2236
+ }
2237
+ /**
2238
+ * @hidden
2239
+ */
2240
+ function formValueOrDefault(group, field, defaultValue) {
2241
+ var control = group.get(field);
2242
+ if (!control) {
2243
+ return defaultValue;
2244
+ }
2245
+ return control.value || defaultValue;
2246
+ }
2247
+ /**
2248
+ * @hidden
2249
+ */
2250
+ var isWorkWeekDay = function (day, start, end) {
2251
+ if (end < start) {
2252
+ return day <= end || start <= day;
2253
+ }
2254
+ return start <= day && day <= end;
2255
+ };
2256
+ /**
2257
+ * @hidden
2258
+ */
2259
+ var alwaysFalse = function () { return false; };
2260
+
2261
+ var todayDate = function () { return getDate(new Date()); };
2262
+ var DAYS_IN_WEEK = 7;
2263
+ /**
2264
+ * Represents the [Kendo UI Scheduler component for Angular]({% slug overview_scheduler %}).
2265
+ *
2266
+ * @example
2267
+ * ```ts-preview
2268
+ * _@Component({
2269
+ * selector: 'my-app',
2270
+ * template: `
2271
+ * <kendo-scheduler style="height: 600px">
2272
+ * <kendo-scheduler-day-view>
2273
+ * </kendo-scheduler-day-view>
2274
+ * <kendo-scheduler-week-view>
2275
+ * </kendo-scheduler-week-view>
2276
+ * </kendo-scheduler>
2277
+ * `
2278
+ * })
2279
+ * class AppComponent {}
2280
+ * ```
2281
+ */
2282
+ var SchedulerComponent = /** @class */ (function () {
2283
+ function SchedulerComponent(wrapper, viewContext, viewState, editService, dialogsService, intlService, changeDetector, zone, pdfService, localization, domEvents, renderer, focusService) {
2284
+ this.wrapper = wrapper;
2285
+ this.viewContext = viewContext;
2286
+ this.viewState = viewState;
2287
+ this.editService = editService;
2288
+ this.dialogsService = dialogsService;
2289
+ this.intlService = intlService;
2290
+ this.changeDetector = changeDetector;
2291
+ this.zone = zone;
2292
+ this.pdfService = pdfService;
2293
+ this.localization = localization;
2294
+ this.domEvents = domEvents;
2295
+ this.renderer = renderer;
2296
+ this.focusService = focusService;
2297
+ this.hostClasses = true;
2298
+ this.rtl = false;
2432
2299
  /**
2433
- * Gets the currently active event, if any.
2434
- * The active event is the event that can currently receive focus.
2300
+ * Specifies if the Scheduler is editable.
2435
2301
  */
2436
- get: function () {
2437
- var activeElement = this.focusService.activeElement;
2438
- if (activeElement) {
2439
- return this.eventFromElement(activeElement.nativeElement);
2440
- }
2441
- },
2442
- enumerable: true,
2443
- configurable: true
2444
- });
2445
- /**
2446
- * Focuses the next event or an event at a specified relative position.
2447
- * The `options` parameter can be used to set a positive or negative offset
2448
- * that is relative to the currently focused event.
2449
- * A `nowrap` flag toggles the wrapping to the first or to the last item.
2450
- *
2451
- * @example
2452
- * ```ts-no-run
2453
- * scheduler.focusNext(); // Focuses the next event.
2454
- * scheduler.focusNext({ offset: 1 }); // Focuses the next event.
2455
- * scheduler.focusNext({ offset: -1 }); // Focuses the previous event.
2456
- * scheduler.focusNext({ nowrap: true }); // If the focus is on the last event, does not move the focus to the first event.
2457
- * ```
2458
- *
2459
- * @param position The relative position of the event to focus.
2460
- * @returns `true` if the focused event changed. Otherwise, returns `false`.
2461
- */
2462
- SchedulerComponent.prototype.focusNext = function (position) {
2463
- return this.focusService.focusNext(position);
2464
- };
2465
- /**
2466
- * Focuses the previous event or an event at a specified relative position.
2467
- * The `options` parameter can be used to set a positive or negative offset
2468
- * that is relative to the currently focused event.
2469
- * A `nowrap` flag toggles the wrapping to the first or to the last item.
2470
- *
2471
- * @example
2472
- * ```ts-no-run
2473
- * scheduler.focusPrev(); // Focuses the previous event
2474
- * scheduler.focusPrev({ nowrap: true }); // Does not move the focus to the last event, if focus is on the first one.
2475
- * ```
2476
- *
2477
- * @param position The relative position of the event to focus.
2478
- * @returns `true` if the focused event changed. Otherwise, returns `false`.
2479
- */
2480
- SchedulerComponent.prototype.focusPrev = function (position) {
2481
- var prevPosition = __assign({ offset: -1 }, position);
2482
- return this.focusService.focusNext(prevPosition);
2483
- };
2484
- /**
2485
- * Focuses the last focused event or the Scheduler element, if no events are available.
2486
- */
2487
- SchedulerComponent.prototype.focus = function () {
2488
- return this.focusService.focus();
2489
- };
2490
- SchedulerComponent.prototype.isInRange = function (date) {
2491
- return (!this.min || this.min <= date) && (!this.max || date <= this.max);
2492
- };
2493
- SchedulerComponent.prototype.notifyOptionsChange = function (changes) {
2494
- var workweek = this.workWeek;
2495
- this.viewContext.notifyOptionsChange({
2496
- group: this.group,
2497
- resources: this.resources,
2498
- allDayEventTemplate: this.allDayEventTemplate ? this.allDayEventTemplate.first : null,
2499
- eventTemplate: this.eventTemplate ? this.eventTemplate.first : null,
2500
- timeSlotTemplate: this.timeSlotTemplate ? this.timeSlotTemplate.first : null,
2501
- minorTimeHeaderTemplate: this.minorTimeHeaderTemplate ? this.minorTimeHeaderTemplate.first : null,
2502
- majorTimeHeaderTemplate: this.majorTimeHeaderTemplate ? this.majorTimeHeaderTemplate.first : null,
2503
- monthDaySlotTemplate: this.monthDaySlotTemplate ? this.monthDaySlotTemplate.first : null,
2504
- dateHeaderTemplate: this.dateHeaderTemplate ? this.dateHeaderTemplate.first : null,
2505
- allDaySlotTemplate: this.allDaySlotTemplate ? this.allDaySlotTemplate.first : null,
2506
- groupHeaderTemplate: this.groupHeaderTemplate ? this.groupHeaderTemplate.first : null,
2507
- agendaDateTemplate: this.agendaDateTemplate ? this.agendaDateTemplate.first : null,
2508
- agendaTimeTemplate: this.agendaTimeTemplate ? this.agendaTimeTemplate.first : null,
2509
- min: this.min,
2510
- max: this.max,
2511
- showWorkHours: this.showWorkHours,
2512
- startTime: this.startTime,
2513
- scrollTime: this.scrollTime,
2514
- endTime: this.endTime,
2515
- workDayStart: this.workDayStart,
2516
- workDayEnd: this.workDayEnd,
2517
- workWeekStart: workweek.start,
2518
- workWeekEnd: workweek.end,
2519
- weekStart: this.weekStart,
2520
- slotDuration: this.slotDuration,
2521
- slotDivisions: this.slotDivisions,
2522
- eventHeight: this.eventHeight,
2523
- editable: this.editable,
2524
- timezone: this.timezone,
2525
- currentTimeMarker: this.currentTimeMarker,
2526
- slotClass: this.slotClass,
2527
- slotFill: this.slotFill,
2528
- columnWidth: this.columnWidth,
2529
- eventClass: this.eventClass,
2530
- eventStyles: this.eventStyles,
2531
- changes: changes
2532
- });
2533
- };
2534
- Object.defineProperty(SchedulerComponent.prototype, "workWeek", {
2535
- get: function () {
2536
- var _a = this.intlService.weekendRange(), start = _a.start, end = _a.end;
2537
- var workWeekStart = isPresent(this.workWeekStart) ? this.workWeekStart : (end + 1) % DAYS_IN_WEEK;
2538
- var weekEnd = start > 0 ? start - 1 : Day.Saturday;
2539
- var workWeekEnd = isPresent(this.workWeekEnd) ? this.workWeekEnd : weekEnd;
2540
- return { start: workWeekStart, end: workWeekEnd };
2541
- },
2542
- enumerable: true,
2543
- configurable: true
2544
- });
2545
- SchedulerComponent.prototype.resetViewIndex = function () {
2546
- var index = this.selectedViewIndex;
2547
- var newIndex = Math.max(0, Math.min(index, this.views.length - 1));
2548
- this.setViewIndex(newIndex);
2549
- this.onViewIndexChange();
2550
- };
2551
- SchedulerComponent.prototype.onViewIndexChange = function () {
2552
- if (!this.views) {
2553
- return;
2554
- }
2555
- var views = this.views.toArray();
2556
- var selectedView = views[this.viewIndex];
2557
- if (selectedView) {
2558
- this.selectedView = selectedView;
2559
- }
2560
- };
2561
- SchedulerComponent.prototype.setViewIndex = function (newIndex) {
2562
- var changed = this.selectedViewIndex !== newIndex;
2563
- if (changed) {
2564
- this.selectedViewIndex = newIndex;
2565
- this.selectedViewIndexChange.emit(newIndex);
2566
- }
2567
- return changed;
2568
- };
2569
- SchedulerComponent.prototype.processEvents = function (dataItems) {
2570
- var _this = this;
2571
- var timezone = this.timezone;
2572
- var fields = this.modelFields;
2573
- var items = dataItems
2574
- .map(function (dataItem) { return readEvent(dataItem, fields, _this.resources); })
2575
- .filter(function (event) { return !isRecurrenceMaster(event); })
2576
- .map(function (event) {
2577
- var start = ZonedDate.fromLocalDate(event.start, timezone);
2578
- var end = ZonedDate.fromLocalDate(event.end, timezone);
2579
- return { start: start, end: end, event: event };
2580
- });
2581
- this.viewItems = items;
2582
- this.viewContext.notifyItems(items);
2583
- };
2584
- SchedulerComponent.prototype.attachEditHandlers = function () {
2585
- if (!this.editService) {
2586
- return;
2587
- }
2588
- this.subs.add(this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)));
2589
- };
2590
- SchedulerComponent.prototype.emitCRUDEvent = function (args) {
2591
- Object.assign(args, { sender: this });
2592
- switch (args.action) {
2593
- case 'cancel':
2594
- this.cancel.emit(args);
2595
- break;
2596
- case 'save':
2597
- this.save.emit(args);
2598
- break;
2599
- default: break;
2600
- }
2601
- };
2602
- SchedulerComponent.prototype.intlChange = function () {
2603
- var currentView = this.selectedView;
2604
- this.selectedView = null;
2605
- if (!isPresent(this.workWeekStart) || !isPresent(this.workWeekEnd)) {
2606
- this.notifyOptionsChange();
2607
- }
2608
- this.changeDetector.detectChanges();
2609
- this.selectedView = currentView;
2610
- if (NgZone.isInAngularZone()) {
2611
- this.changeDetector.markForCheck();
2612
- }
2613
- else {
2614
- this.changeDetector.detectChanges();
2615
- }
2616
- };
2617
- SchedulerComponent.prototype.attachElementEventHandlers = function () {
2618
- var _this = this;
2619
- if (!isDocumentAvailable()) {
2620
- return;
2621
- }
2622
- var wrapper = this.wrapper.nativeElement;
2623
- this.zone.runOutsideAngular(function () {
2624
- var windowBlurSubscription = _this.renderer.listen('window', 'blur', function (args) {
2625
- _this.domEvents.windowBlur.emit(args);
2626
- });
2627
- var clickSubscription = _this.renderer.listen(wrapper, 'click', function (args) {
2628
- _this.domEvents.click.emit(args);
2629
- });
2630
- var keydownSubscription = _this.renderer.listen(wrapper, 'keydown', function (args) {
2631
- _this.domEvents.keydown.emit(args);
2632
- });
2633
- var focused = false;
2634
- var focusInSubscription = _this.renderer.listen(wrapper, 'focusin', function (args) {
2635
- _this.domEvents.focus.emit(args);
2636
- if (!focused) {
2637
- _this.domEvents.focusIn.emit(args);
2638
- _this.renderer.addClass(_this.wrapper.nativeElement, 'k-state-focused');
2639
- focused = true;
2640
- }
2641
- });
2642
- var focusOutSubscription = _this.renderer.listen(wrapper, 'focusout', function (args) {
2643
- var next = args.relatedTarget || document.activeElement;
2644
- var outside = !closest(next, function (node) { return node === wrapper; });
2645
- if (outside) {
2646
- _this.domEvents.focusOut.emit(args);
2647
- _this.renderer.removeClass(_this.wrapper.nativeElement, 'k-state-focused');
2648
- focused = false;
2649
- }
2650
- });
2651
- _this.detachElementEventHandlers = function () {
2652
- windowBlurSubscription();
2653
- clickSubscription();
2654
- keydownSubscription();
2655
- focusInSubscription();
2656
- focusOutSubscription();
2657
- };
2658
- });
2659
- };
2660
- __decorate([
2661
- HostBinding('class.k-widget'),
2662
- HostBinding('class.k-scheduler'),
2663
- HostBinding('class.k-floatwrap'),
2664
- __metadata("design:type", Boolean)
2665
- ], SchedulerComponent.prototype, "hostClasses", void 0);
2666
- __decorate([
2667
- HostBinding('class.k-rtl'),
2668
- __metadata("design:type", Boolean)
2669
- ], SchedulerComponent.prototype, "rtl", void 0);
2670
- __decorate([
2671
- HostBinding('attr.dir'),
2672
- __metadata("design:type", String),
2673
- __metadata("design:paramtypes", [])
2674
- ], SchedulerComponent.prototype, "dir", null);
2675
- __decorate([
2676
- Input(),
2677
- __metadata("design:type", Number),
2678
- __metadata("design:paramtypes", [Number])
2679
- ], SchedulerComponent.prototype, "selectedViewIndex", null);
2680
- __decorate([
2681
- Input(),
2682
- __metadata("design:type", Object)
2683
- ], SchedulerComponent.prototype, "editable", void 0);
2684
- __decorate([
2685
- Input(),
2686
- __metadata("design:type", Date)
2687
- ], SchedulerComponent.prototype, "min", void 0);
2688
- __decorate([
2689
- Input(),
2690
- __metadata("design:type", Date)
2691
- ], SchedulerComponent.prototype, "max", void 0);
2692
- __decorate([
2693
- Input(),
2694
- __metadata("design:type", Number)
2695
- ], SchedulerComponent.prototype, "eventHeight", void 0);
2696
- __decorate([
2697
- Input(),
2698
- __metadata("design:type", Number)
2699
- ], SchedulerComponent.prototype, "columnWidth", void 0);
2700
- __decorate([
2701
- Input(),
2702
- __metadata("design:type", Boolean)
2703
- ], SchedulerComponent.prototype, "showWorkHours", void 0);
2704
- __decorate([
2705
- Input(),
2706
- __metadata("design:type", String)
2707
- ], SchedulerComponent.prototype, "startTime", void 0);
2708
- __decorate([
2709
- Input(),
2710
- __metadata("design:type", String)
2711
- ], SchedulerComponent.prototype, "endTime", void 0);
2712
- __decorate([
2713
- Input(),
2714
- __metadata("design:type", String)
2715
- ], SchedulerComponent.prototype, "workDayStart", void 0);
2716
- __decorate([
2717
- Input(),
2718
- __metadata("design:type", String)
2719
- ], SchedulerComponent.prototype, "workDayEnd", void 0);
2720
- __decorate([
2721
- Input(),
2722
- __metadata("design:type", Number)
2723
- ], SchedulerComponent.prototype, "workWeekStart", void 0);
2724
- __decorate([
2725
- Input(),
2726
- __metadata("design:type", Number)
2727
- ], SchedulerComponent.prototype, "workWeekEnd", void 0);
2728
- __decorate([
2729
- Input(),
2730
- __metadata("design:type", Number),
2731
- __metadata("design:paramtypes", [Number])
2732
- ], SchedulerComponent.prototype, "weekStart", null);
2733
- __decorate([
2734
- Input(),
2735
- __metadata("design:type", Number)
2736
- ], SchedulerComponent.prototype, "slotDuration", void 0);
2737
- __decorate([
2738
- Input(),
2739
- __metadata("design:type", Number)
2740
- ], SchedulerComponent.prototype, "slotDivisions", void 0);
2741
- __decorate([
2742
- Input(),
2743
- __metadata("design:type", Number)
2744
- ], SchedulerComponent.prototype, "slotFill", void 0);
2745
- __decorate([
2746
- Input(),
2747
- __metadata("design:type", Object)
2748
- ], SchedulerComponent.prototype, "scrollTime", void 0);
2749
- __decorate([
2750
- Input(),
2751
- __metadata("design:type", Object)
2752
- ], SchedulerComponent.prototype, "group", void 0);
2753
- __decorate([
2754
- Input(),
2755
- __metadata("design:type", Array)
2756
- ], SchedulerComponent.prototype, "resources", void 0);
2757
- __decorate([
2758
- Input(),
2759
- __metadata("design:type", Boolean)
2760
- ], SchedulerComponent.prototype, "loading", void 0);
2761
- __decorate([
2762
- Input(),
2763
- __metadata("design:type", String),
2764
- __metadata("design:paramtypes", [String])
2765
- ], SchedulerComponent.prototype, "timezone", null);
2766
- __decorate([
2767
- Input(),
2768
- __metadata("design:type", Array),
2769
- __metadata("design:paramtypes", [Array])
2770
- ], SchedulerComponent.prototype, "events", null);
2771
- __decorate([
2772
- Input(),
2773
- __metadata("design:type", Date),
2774
- __metadata("design:paramtypes", [Date])
2775
- ], SchedulerComponent.prototype, "selectedDate", null);
2776
- __decorate([
2777
- Input(),
2778
- __metadata("design:type", Object),
2779
- __metadata("design:paramtypes", [Object])
2780
- ], SchedulerComponent.prototype, "modelFields", null);
2781
- __decorate([
2782
- Input(),
2783
- __metadata("design:type", Object)
2784
- ], SchedulerComponent.prototype, "currentTimeMarker", void 0);
2785
- __decorate([
2786
- Input(),
2787
- __metadata("design:type", Function)
2788
- ], SchedulerComponent.prototype, "slotClass", void 0);
2789
- __decorate([
2790
- Input(),
2791
- __metadata("design:type", Function)
2792
- ], SchedulerComponent.prototype, "eventClass", void 0);
2793
- __decorate([
2794
- Input(),
2795
- __metadata("design:type", Function)
2796
- ], SchedulerComponent.prototype, "eventStyles", void 0);
2797
- __decorate([
2798
- Output(),
2799
- __metadata("design:type", EventEmitter)
2800
- ], SchedulerComponent.prototype, "selectedViewIndexChange", void 0);
2801
- __decorate([
2802
- Output(),
2803
- __metadata("design:type", EventEmitter)
2804
- ], SchedulerComponent.prototype, "navigate", void 0);
2805
- __decorate([
2806
- Output(),
2807
- __metadata("design:type", EventEmitter)
2808
- ], SchedulerComponent.prototype, "dateChange", void 0);
2809
- __decorate([
2810
- Output(),
2811
- __metadata("design:type", EventEmitter)
2812
- ], SchedulerComponent.prototype, "slotClick", void 0);
2813
- __decorate([
2814
- Output(),
2815
- __metadata("design:type", EventEmitter)
2816
- ], SchedulerComponent.prototype, "slotDblClick", void 0);
2817
- __decorate([
2818
- Output(),
2819
- __metadata("design:type", EventEmitter)
2820
- ], SchedulerComponent.prototype, "create", void 0);
2821
- __decorate([
2822
- Output(),
2823
- __metadata("design:type", EventEmitter)
2824
- ], SchedulerComponent.prototype, "eventClick", void 0);
2825
- __decorate([
2826
- Output(),
2827
- __metadata("design:type", EventEmitter)
2828
- ], SchedulerComponent.prototype, "eventDblClick", void 0);
2829
- __decorate([
2830
- Output(),
2831
- __metadata("design:type", EventEmitter)
2832
- ], SchedulerComponent.prototype, "eventKeydown", void 0);
2833
- __decorate([
2834
- Output(),
2835
- __metadata("design:type", EventEmitter)
2836
- ], SchedulerComponent.prototype, "cancel", void 0);
2837
- __decorate([
2838
- Output(),
2839
- __metadata("design:type", EventEmitter)
2840
- ], SchedulerComponent.prototype, "save", void 0);
2841
- __decorate([
2842
- Output(),
2843
- __metadata("design:type", EventEmitter)
2844
- ], SchedulerComponent.prototype, "remove", void 0);
2845
- __decorate([
2846
- Output(),
2847
- __metadata("design:type", EventEmitter)
2848
- ], SchedulerComponent.prototype, "resizeStart", void 0);
2849
- __decorate([
2850
- Output(),
2851
- __metadata("design:type", EventEmitter)
2852
- ], SchedulerComponent.prototype, "resize", void 0);
2853
- __decorate([
2854
- Output(),
2855
- __metadata("design:type", EventEmitter)
2856
- ], SchedulerComponent.prototype, "resizeEnd", void 0);
2857
- __decorate([
2858
- Output(),
2859
- __metadata("design:type", EventEmitter)
2860
- ], SchedulerComponent.prototype, "dragStart", void 0);
2861
- __decorate([
2862
- Output(),
2863
- __metadata("design:type", EventEmitter)
2864
- ], SchedulerComponent.prototype, "drag", void 0);
2865
- __decorate([
2866
- Output(),
2867
- __metadata("design:type", EventEmitter)
2868
- ], SchedulerComponent.prototype, "dragEnd", void 0);
2869
- __decorate([
2870
- Output(),
2871
- __metadata("design:type", EventEmitter)
2872
- ], SchedulerComponent.prototype, "pdfExport", void 0);
2873
- __decorate([
2874
- ContentChild(EditDialogTemplateDirective, { static: false }),
2875
- __metadata("design:type", EditDialogTemplateDirective)
2876
- ], SchedulerComponent.prototype, "editDialogTemplate", void 0);
2877
- __decorate([
2878
- ContentChild(ToolbarTemplateDirective, { static: false }),
2879
- __metadata("design:type", ToolbarTemplateDirective)
2880
- ], SchedulerComponent.prototype, "toolbarTemplate", void 0);
2881
- __decorate([
2882
- ContentChildren(SchedulerView),
2883
- __metadata("design:type", QueryList)
2884
- ], SchedulerComponent.prototype, "views", void 0);
2885
- __decorate([
2886
- ViewChild(ResizeSensorComponent, { static: true }),
2887
- __metadata("design:type", ResizeSensorComponent)
2888
- ], SchedulerComponent.prototype, "resizeSensor", void 0);
2889
- __decorate([
2890
- ViewChild("confirmationDialogContainer", { read: ViewContainerRef, static: true }),
2891
- __metadata("design:type", ViewContainerRef)
2892
- ], SchedulerComponent.prototype, "confirmationDialogContainerRef", void 0);
2893
- __decorate([
2894
- ViewChild(LoadingComponent, { static: true }),
2895
- __metadata("design:type", LoadingComponent)
2896
- ], SchedulerComponent.prototype, "loadingComponent", void 0);
2897
- __decorate([
2898
- ContentChildren(AllDayEventTemplateDirective),
2899
- __metadata("design:type", QueryList)
2900
- ], SchedulerComponent.prototype, "allDayEventTemplate", void 0);
2901
- __decorate([
2902
- ContentChildren(EventTemplateDirective),
2903
- __metadata("design:type", QueryList)
2904
- ], SchedulerComponent.prototype, "eventTemplate", void 0);
2905
- __decorate([
2906
- ContentChildren(TimeSlotTemplateDirective),
2907
- __metadata("design:type", QueryList)
2908
- ], SchedulerComponent.prototype, "timeSlotTemplate", void 0);
2909
- __decorate([
2910
- ContentChildren(MinorTimeHeaderTemplateDirective),
2911
- __metadata("design:type", QueryList)
2912
- ], SchedulerComponent.prototype, "minorTimeHeaderTemplate", void 0);
2913
- __decorate([
2914
- ContentChildren(MajorTimeHeaderTemplateDirective),
2915
- __metadata("design:type", QueryList)
2916
- ], SchedulerComponent.prototype, "majorTimeHeaderTemplate", void 0);
2917
- __decorate([
2918
- ContentChildren(MonthDaySlotTemplateDirective),
2919
- __metadata("design:type", QueryList)
2920
- ], SchedulerComponent.prototype, "monthDaySlotTemplate", void 0);
2921
- __decorate([
2922
- ContentChildren(DateHeaderTemplateDirective),
2923
- __metadata("design:type", QueryList)
2924
- ], SchedulerComponent.prototype, "dateHeaderTemplate", void 0);
2925
- __decorate([
2926
- ContentChildren(AllDaySlotTemplateDirective),
2927
- __metadata("design:type", QueryList)
2928
- ], SchedulerComponent.prototype, "allDaySlotTemplate", void 0);
2929
- __decorate([
2930
- ContentChildren(GroupHeaderTemplateDirective),
2931
- __metadata("design:type", QueryList)
2932
- ], SchedulerComponent.prototype, "groupHeaderTemplate", void 0);
2933
- __decorate([
2934
- ContentChildren(AgendaDateTemplateDirective),
2935
- __metadata("design:type", QueryList)
2936
- ], SchedulerComponent.prototype, "agendaDateTemplate", void 0);
2937
- __decorate([
2938
- ContentChildren(AgendaTimeTemplateDirective),
2939
- __metadata("design:type", QueryList)
2940
- ], SchedulerComponent.prototype, "agendaTimeTemplate", void 0);
2941
- SchedulerComponent = __decorate([
2942
- Component({
2943
- changeDetection: ChangeDetectionStrategy.OnPush,
2944
- selector: 'kendo-scheduler',
2945
- providers: [
2946
- EditService,
2947
- DialogsService,
2948
- DomEventsService,
2949
- LocalDataChangesService,
2950
- FocusService,
2951
- SchedulerLocalizationService,
2952
- {
2953
- provide: LocalizationService,
2954
- useExisting: SchedulerLocalizationService
2955
- },
2956
- {
2957
- provide: L10N_PREFIX,
2958
- useValue: 'kendo.scheduler'
2959
- },
2960
- ToolbarService,
2961
- ViewContextService,
2962
- ViewStateService,
2963
- PDFService
2964
- ],
2965
- // TODO: Move to themes
2966
- styles: ['.k-scheduler.k-state-focused { box-shadow: 0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12); }'],
2967
- encapsulation: ViewEncapsulation.None,
2968
- template: "\n <ng-container kendoSchedulerLocalizedMessages\n i18n-allEvents=\"kendo.scheduler.allEvents|The All events text displayed in the timeline views when there is no vertical grouping.\"\n allEvents=\"All events\"\n\n i18n-allDay=\"kendo.scheduler.allDay|The all day text displayed in the day and week views.\"\n allDay=\"all day\"\n\n i18n-dateHeader=\"kendo.scheduler.dateHeader|The date header text displayed in the agenda view.\"\n dateHeader=\"Date\"\n\n i18n-timeHeader=\"kendo.scheduler.timeHeader|The time header text displayed in the agenda view.\"\n timeHeader=\"Time\"\n\n i18n-deleteTitle=\"kendo.scheduler.deleteTitle|The delete icon title.\"\n deleteTitle=\"Delete\"\n\n i18n-eventHeader=\"kendo.scheduler.eventHeader|The event header text displayed in the agenda view.\"\n eventHeader=\"Event\"\n\n i18n-nextTitle=\"kendo.scheduler.nextTitle|The title of the navigation next button.\"\n nextTitle=\"Next\"\n\n i18n-previousTitle=\"kendo.scheduler.previousTitle|The title of the navigation previous button.\"\n previousTitle=\"Previous\"\n\n i18n-showFullDay=\"kendo.scheduler.showFullDay|The text of the show full day button displayed in the footer of the day, week and timeline views.\"\n showFullDay=\"Show full day\"\n\n i18n-showWorkDay=\"kendo.scheduler.showWorkDay|The text of the show work day button displayed in the footer of the day, week and timeline views.\"\n showWorkDay=\"Show business hours\"\n\n i18n-today=\"kendo.scheduler.today|The today button text displayed in the navigation.\"\n today=\"Today\"\n\n i18n-calendarToday=\"kendo.scheduler.calendarToday|The text of today's date in the header of the Calendar.\"\n calendarToday=\"TODAY\"\n\n i18n-dayViewTitle=\"kendo.scheduler.dayViewTitle|The day view title.\"\n dayViewTitle=\"Day\"\n\n i18n-multiDayViewTitle=\"kendo.scheduler.multiDayViewTitle|The multi day view title.\"\n multiDayViewTitle=\"Multi-Day\"\n\n i18n-weekViewTitle=\"kendo.scheduler.weekViewTitle|The week view title.\"\n weekViewTitle=\"Week\"\n\n i18n-workWeekViewTitle=\"kendo.scheduler.workWeekViewTitle|The work week view title.\"\n workWeekViewTitle=\"Work Week\"\n\n i18n-monthViewTitle=\"kendo.scheduler.monthViewTitle|The month view title.\"\n monthViewTitle=\"Month\"\n\n i18n-timelineViewTitle=\"kendo.scheduler.timelineViewTitle|The timeline view title.\"\n timelineViewTitle=\"Timeline\"\n\n i18n-timelineWeekViewTitle=\"kendo.scheduler.timelineWeekViewTitle|The timeline week view title.\"\n timelineWeekViewTitle=\"Timeline Week\"\n\n i18n-timelineMonthViewTitle=\"kendo.scheduler.timelineMonthViewTitle|The timeline month view title.\"\n timelineMonthViewTitle=\"Timeline Month\"\n\n i18n-agendaViewTitle=\"kendo.scheduler.agendaViewTitle|The agenda view title.\"\n agendaViewTitle=\"Agenda\"\n\n i18n-cancel=\"kendo.scheduler.cancel|The text similar to 'Cancel' displayed in scheduler.\"\n cancel=\"Cancel\"\n\n i18n-save=\"kendo.scheduler.save|The text similar to 'Save' displayed in scheduler.\"\n save=\"Save\"\n\n i18n-editorEventTitle=\"kendo.scheduler.editorEventTitle|The text similar to 'Title' displayed in the scheduler event editor.\"\n editorEventTitle='Title'\n\n i18n-editorEventStart=\"kendo.scheduler.editorEventStart|The text similar to 'Start' displayed in the scheduler event editor.\"\n editorEventStart=\"Start\"\n\n i18n-editorEventStartTimeZone=\"kendo.scheduler.editorEventStartTimeZone|The text similar to 'Start Time Zone' displayed in the scheduler event editor.\"\n editorEventStartTimeZone=\"Start Time Zone\"\n\n i18n-editorEventEnd=\"kendo.scheduler.editorEventEnd|The text similar to 'End' displayed in the scheduler event editor.\"\n editorEventEnd=\"End\"\n\n i18n-editorEventEndTimeZone=\"kendo.scheduler.editorEventEndTimeZone|The text similar to 'End Time Zone' displayed in the scheduler event editor.\"\n editorEventEndTimeZone=\"End Time Zone\"\n\n i18n-editorEventAllDay=\"kendo.scheduler.editorEventAllDay|The text similar to 'All Day event' displayed in the scheduler event editor.\"\n editorEventAllDay=\"All Day Event\"\n\n i18n-editorEventDescription=\"kendo.scheduler.editorEventDescription|The text similar to 'Description' displayed in the scheduler event editor.\"\n editorEventDescription=\"Description\"\n\n i18n-editorEventSeparateTimeZones=\"kendo.scheduler.editorEventSeparateTimeZones|The text similar to 'Use separate Start and End Time Zones' displayed in the scheduler event editor.\"\n editorEventSeparateTimeZones=\"End in different Time Zone\"\n\n i18n-editorEventTimeZone=\"kendo.scheduler.editorEventTimeZone|The text similar to 'Time Zone' displayed in the scheduler event editor.\"\n editorEventTimeZone='Specify Time Zone'\n\n i18n-editorTitle=\"kendo.scheduler.editorTitle|The text similar to 'Event' displayed as title of the scheduler event editor.\"\n editorTitle='Event'\n\n i18n-recurrenceEditorRepeat=\"kendo.scheduler.recurrenceEditorRepeat|The text similar to 'Repeat' displayed in the scheduler recurrence editor.\"\n recurrenceEditorRepeat='Repeat'\n\n i18n-recurrenceEditorDailyInterval=\"kendo.scheduler.recurrenceEditorDailyInterval|The text similar to 'day(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorDailyInterval='day(s)'\n\n i18n-recurrenceEditorDailyRepeatEvery=\"kendo.scheduler.recurrenceEditorDailyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorDailyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorWeeklyInterval=\"kendo.scheduler.recurrenceEditorWeeklyInterval|The text similar to 'week(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyInterval='week(s)'\n\n i18n-recurrenceEditorWeeklyRepeatEvery=\"kendo.scheduler.recurrenceEditorWeeklyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorWeeklyRepeatOn=\"kendo.scheduler.recurrenceEditorWeeklyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorMonthlyDay=\"kendo.scheduler.recurrenceEditorMonthlyDay|The text similar to 'Day' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyDay='Day'\n\n i18n-recurrenceEditorMonthlyInterval=\"kendo.scheduler.recurrenceEditorMonthlyInterval|The text similar to 'month(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyInterval='month(s)'\n\n i18n-recurrenceEditorMonthlyRepeatEvery=\"kendo.scheduler.recurrenceEditorMonthlyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorMonthlyRepeatOn=\"kendo.scheduler.recurrenceEditorMonthlyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorYearlyOf=\"kendo.scheduler.recurrenceEditorYearlyOf|The text similar to 'of' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyOf='of'\n\n i18n-recurrenceEditorYearlyRepeatEvery=\"kendo.scheduler.recurrenceEditorYearlyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorYearlyRepeatOn=\"kendo.scheduler.recurrenceEditorYearlyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorYearlyInterval=\"kendo.scheduler.recurrenceEditorYearlyInterval|The text similar to 'year(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyInterval='year(s)'\n\n i18n-recurrenceEditorFrequenciesDaily=\"kendo.scheduler.recurrenceEditorFrequenciesDaily|The text similar to 'Daily' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesDaily='Daily'\n\n i18n-recurrenceEditorFrequenciesMonthly=\"kendo.scheduler.recurrenceEditorFrequenciesMonthly|The text similar to 'Monthly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesMonthly='Monthly'\n\n i18n-recurrenceEditorFrequenciesNever=\"kendo.scheduler.recurrenceEditorFrequenciesNever|The text similar to 'Never' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesNever='Never'\n\n i18n-recurrenceEditorFrequenciesWeekly=\"kendo.scheduler.recurrenceEditorFrequenciesWeekly|The text similar to 'Weekly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesWeekly='Weekly'\n\n i18n-recurrenceEditorFrequenciesYearly=\"kendo.scheduler.recurrenceEditorFrequenciesYearly|The text similar to 'Yearly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesYearly='Yearly'\n\n i18n-recurrenceEditorOffsetPositionsFirst=\"kendo.scheduler.recurrenceEditorOffsetPositionsFirst|The text similar to 'First' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsFirst='First'\n\n i18n-recurrenceEditorOffsetPositionsSecond=\"kendo.scheduler.recurrenceEditorOffsetPositionsSecond|The text similar to 'Second' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsSecond='Second'\n\n i18n-recurrenceEditorOffsetPositionsThird=\"kendo.scheduler.recurrenceEditorOffsetPositionsThird|The text similar to 'Third' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsThird='Third'\n\n i18n-recurrenceEditorOffsetPositionsFourth=\"kendo.scheduler.recurrenceEditorOffsetPositionsFourth|The text similar to 'Fourth' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsFourth='Fourth'\n\n i18n-recurrenceEditorOffsetPositionsLast=\"kendo.scheduler.recurrenceEditorOffsetPositionsLast|The text similar to 'Last' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsLast='Last'\n\n i18n-recurrenceEditorWeekdaysDay=\"kendo.scheduler.recurrenceEditorWeekdaysDay|The text similar to 'Day' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysDay='Day'\n\n i18n-recurrenceEditorWeekdaysWeekday=\"kendo.scheduler.recurrenceEditorWeekdaysWeekday|The text similar to 'Weekday' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysWeekday='Weekday'\n\n i18n-recurrenceEditorWeekdaysWeekendday=\"kendo.scheduler.recurrenceEditorWeekdaysWeekendday|The text similar to 'Weekend Day' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysWeekendday='Weekend Day'\n\n i18n-recurrenceEditorEndAfter=\"kendo.scheduler.recurrenceEditorEndAfter|The text similar to 'After' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndAfter='After'\n\n i18n-recurrenceEditorEndOccurrence=\"kendo.scheduler.recurrenceEditorEndOccurrence|The text similar to 'occurrence(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndOccurrence='occurrence(s)'\n\n i18n-recurrenceEditorEndLabel=\"kendo.scheduler.recurrenceEditorEndLabel|The text similar to 'End' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndLabel='End'\n\n i18n-recurrenceEditorEndNever=\"kendo.scheduler.recurrenceEditorEndNever|The text similar to 'Never' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndNever='Never'\n\n i18n-recurrenceEditorEndOn=\"kendo.scheduler.recurrenceEditorEndOn|The text similar to 'On' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndOn='On'\n\n i18n-destroy=\"kendo.scheduler.destroy|The text of the 'Delete' button displayed in the scheduler remove confirmation dialog.\"\n destroy='Delete'\n\n i18n-deleteConfirmation=\"kendo.scheduler.deleteConfirmation|The text similar to 'Are you sure you want to delete this event?' displayed in scheduler remove confirmation dialog.\"\n deleteConfirmation='Are you sure you want to delete this event?'\n\n i18n-editRecurringConfirmation=\"kendo.scheduler.editRecurringConfirmation|The text similar to 'Do you want to edit only this event occurrence or the whole series?' displayed in the scheduler recurring confirmation dialog.\"\n editRecurringConfirmation='Do you want to edit only this event occurrence or the whole series?'\n\n i18n-editOccurrence=\"kendo.scheduler.editOccurrence|The text of the 'Edit current occurrence' button displayed in the scheduler recurring confirmation dialog.\"\n editOccurrence='Edit current occurrence'\n\n i18n-editSeries=\"kendo.scheduler.editSeries|The text of the 'Edit the series' button displayed in the scheduler recurring confirmation dialog.\"\n editSeries='Edit the series'\n\n i18n-deleteRecurringConfirmation=\"kendo.scheduler.deleteRecurringConfirmation|The text similar to 'Do you want to delete only this event occurrence or the whole series?' displayed in the scheduler recurring confirmation dialog.\"\n deleteRecurringConfirmation='Do you want to delete only this event occurrence or the whole series?'\n\n i18n-deleteOccurrence=\"kendo.scheduler.deleteOccurrence|The text of the 'Delete current occurrence' button displayed in the scheduler recurring confirmation dialog.\"\n deleteOccurrence='Delete current occurrence'\n\n i18n-deleteSeries=\"kendo.scheduler.deleteSeries|The text similar of the 'Delete the series' button displayed in the scheduler recurring confirmation dialog.\"\n deleteSeries='Delete the series'\n\n i18n-deleteDialogTitle=\"kendo.scheduler.deleteDialogTitle|The title of the remove confirmation dialog, similar to 'Delete Event'.\"\n deleteDialogTitle='Delete Event'\n\n i18n-deleteRecurringDialogTitle=\"kendo.scheduler.deleteRecurringDialogTitle|The title of the recurring remove confirmation dialog, similar to 'Delete Recurring Item'\"\n deleteRecurringDialogTitle='Delete Recurring Item'\n\n i18n-editRecurringDialogTitle=\"kendo.scheduler.editRecurringDialogTitle|The title of the recurring edit confirmation dialog, similar to 'Edit Recurring Item'\"\n editRecurringDialogTitle='Edit Recurring Item'\n >\n </ng-container>\n\n <kendo-scheduler-toolbar\n [dateRange]=\"dateRangeStream\"\n [selectedDate]=\"selectedDateStream\"\n [views]=\"views\"\n [selectedView]=\"selectedView\"\n [template]=\"toolbarTemplate\"\n (navigate)=\"onNavigationAction($event)\"\n [min]=\"min\"\n [max]=\"max\"\n ></kendo-scheduler-toolbar>\n\n <ng-container *ngTemplateOutlet=\"selectedView?.template\">\n </ng-container>\n\n <ng-container #confirmationDialogContainer>\n </ng-container>\n\n <kendo-scheduler-edit-dialog\n [resources]=\"resources\"\n [editTemplate]=\"editDialogTemplate\"\n [timezone]=\"timezone\"\n [weekStart]=\"weekStart\"\n [fields]=\"modelFields\"\n ></kendo-scheduler-edit-dialog>\n\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n\n <div [loading]=\"loading\" kendoSchedulerLoading>\n </div>\n "
2969
- }),
2970
- __metadata("design:paramtypes", [ElementRef,
2971
- ViewContextService,
2972
- ViewStateService,
2973
- EditService,
2974
- DialogsService,
2975
- IntlService,
2976
- ChangeDetectorRef,
2977
- NgZone,
2978
- PDFService,
2979
- LocalizationService,
2980
- DomEventsService,
2981
- Renderer2,
2982
- FocusService])
2983
- ], SchedulerComponent);
2984
- return SchedulerComponent;
2985
- }());
2986
-
2987
- /** @hidden */
2988
- var intersects = function (startTime, endTime, periodStart, periodEnd) {
2989
- return (startTime < periodStart && endTime > periodEnd) ||
2990
- (periodStart <= startTime && startTime < periodEnd) ||
2991
- (periodStart < endTime && endTime <= periodEnd && startTime < endTime);
2992
- };
2993
- /** @hidden */
2994
- var dateInRange = function (date, start, end) { return start.getTime() <= date.getTime() && date.getTime() <= end.getTime(); };
2995
- /** @hidden */
2996
- var roundAllDayEnd = function (_a) {
2997
- var start = _a.start, end = _a.end;
2998
- var startDate = start.stripTime();
2999
- var endDate = end.stripTime();
3000
- return endDate.getTime() !== end.getTime() || startDate.getTime() === endDate.getTime() ? endDate.addDays(1) : endDate;
3001
- };
3002
- /** @hidden */
3003
- function toInvariantTime(date) {
3004
- var staticDate = new Date(1980, 0, 1, 0, 0, 0);
3005
- if (date) {
3006
- staticDate.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
2302
+ this.editable = false;
2303
+ /**
2304
+ * Specifies if the Scheduler's day or time slots are selectable ([see example]({% slug slotselection_scheduler %}#toc-custom-callback)).
2305
+ *
2306
+ * When this input is set to `true`, the Scheduler component will emit [`slotDragStart`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragstart), [`slotDrag`]({% slug api_scheduler_schedulercomponent %}#toc-slotdrag), and [`slotDragEnd`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragend) events upon user interaction.
2307
+ */
2308
+ this.selectable = false;
2309
+ /**
2310
+ * The height of the events in the **Month** and **Timeline** views, and the height of the **All day** events in the **Day** and **Week** views.
2311
+ */
2312
+ this.eventHeight = 25;
2313
+ /**
2314
+ * Specifies the columns width. Applicable for the **Timeline** views.
2315
+ */
2316
+ this.columnWidth = 100;
2317
+ /**
2318
+ * The start time of the view. The Scheduler displays events which start after the start time.
2319
+ * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
2320
+ */
2321
+ this.startTime = '00:00';
2322
+ /**
2323
+ * The end time of the view. The Scheduler displays events which end before the end time.
2324
+ * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
2325
+ */
2326
+ this.endTime = '00:00';
2327
+ /**
2328
+ * The start time of the view when `showWorkHours` is set to `true`.
2329
+ * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
2330
+ */
2331
+ this.workDayStart = '08:00';
2332
+ /**
2333
+ * The end time of the view when `showWorkHours` is set to `true`.
2334
+ * Accepts string values in the `HH:mm` format. Applicable for the **Day**, **Week**, and **Timeline** views.
2335
+ */
2336
+ this.workDayEnd = '17:00';
2337
+ /**
2338
+ * The duration (in minutes) of the time slots. Applicable for the day, week and timeline views.
2339
+ */
2340
+ this.slotDuration = 60;
2341
+ /**
2342
+ * The number of divisions of the time slots. Applicable for the **Day**, **Week**, and **Timeline** views.
2343
+ */
2344
+ this.slotDivisions = 2;
2345
+ /**
2346
+ * A numeric value between 0 and 1 that specifies what percentage of the slot will be filled by the events.
2347
+ * Applicable for the **Day** and **Week** views.
2348
+ * Defaults to `0.9` (90% fill).
2349
+ */
2350
+ this.slotFill = 0.9;
2351
+ /**
2352
+ * The time to which the view will initially be scrolled.
2353
+ * Accepts string values in the `HH:mm` format or a JavaScript `Date`. Applicable for the **Day**, **Week**, and **Timeline** views.
2354
+ */
2355
+ this.scrollTime = this.workDayStart;
2356
+ /**
2357
+ * Specifies the Scheduler current time marker settings.
2358
+ */
2359
+ this.currentTimeMarker = true;
2360
+ /**
2361
+ * A callback that executes for each slot of the Scheduler view.
2362
+ * If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
2363
+ */
2364
+ this.isSlotSelected = alwaysFalse;
2365
+ /**
2366
+ * @hidden
2367
+ */
2368
+ this.selectedViewIndexChange = new EventEmitter();
2369
+ /**
2370
+ * Fires when the Scheduler is about to execute a navigation action
2371
+ * (a view, date, or focus change).
2372
+ */
2373
+ this.navigate = new EventEmitter();
2374
+ /**
2375
+ * Fires when the date range that is displayed in the Scheduler changes.
2376
+ */
2377
+ this.dateChange = new EventEmitter();
2378
+ /**
2379
+ * Fires when a Scheduler view slot is clicked.
2380
+ */
2381
+ this.slotClick = new EventEmitter();
2382
+ /**
2383
+ * Fires when a Scheduler view slot is double-clicked.
2384
+ */
2385
+ this.slotDblClick = new EventEmitter();
2386
+ /**
2387
+ * Fires when the user creates a new event using the `'c'` key.
2388
+ * ([see example]({% slug keyboard_navigation_scheduler %})).
2389
+ */
2390
+ this.create = new EventEmitter();
2391
+ /**
2392
+ * Fires when a Scheduler event is clicked.
2393
+ */
2394
+ this.eventClick = new EventEmitter();
2395
+ /**
2396
+ * Fires when a Scheduler event is double-clicked.
2397
+ */
2398
+ this.eventDblClick = new EventEmitter();
2399
+ /**
2400
+ * Fires when a key is pressed on a focused Scheduler event.
2401
+ */
2402
+ this.eventKeydown = new EventEmitter();
2403
+ /**
2404
+ * Fires when the user cancels the editing by clicking the **Cancel** command button.
2405
+ */
2406
+ this.cancel = new EventEmitter();
2407
+ /**
2408
+ * Fires when the user clicks the **Save** command button to save the changes of the edited event.
2409
+ */
2410
+ this.save = new EventEmitter();
2411
+ /**
2412
+ * Fires when the user clicks the **Remove** icon of a Scheduler event.
2413
+ */
2414
+ this.remove = new EventEmitter();
2415
+ /**
2416
+ * Fires when the user starts resizing a Scheduler event.
2417
+ */
2418
+ this.resizeStart = new EventEmitter();
2419
+ /**
2420
+ * Fires when the user is resizing a Scheduler event.
2421
+ */
2422
+ this.resize = new EventEmitter();
2423
+ /**
2424
+ * Fires when the user stops resizing a Scheduler event.
2425
+ */
2426
+ this.resizeEnd = new EventEmitter();
2427
+ /**
2428
+ * Fires when the user starts dragging a Scheduler event.
2429
+ */
2430
+ this.dragStart = new EventEmitter();
2431
+ /**
2432
+ * Fires when the user is dragging a Scheduler event.
2433
+ */
2434
+ this.drag = new EventEmitter();
2435
+ /**
2436
+ * Fires when the user stops dragging a Scheduler event.
2437
+ */
2438
+ this.dragEnd = new EventEmitter();
2439
+ /**
2440
+ * Fires when the user starts drag-selecting a Scheduler slot range.
2441
+ */
2442
+ this.slotDragStart = new EventEmitter();
2443
+ /**
2444
+ * Fires when the user is drag-selecting a Scheduler slot range.
2445
+ */
2446
+ this.slotDrag = new EventEmitter();
2447
+ /**
2448
+ * Fires when the user stops drag-selecting a Scheduler slot range.
2449
+ */
2450
+ this.slotDragEnd = new EventEmitter();
2451
+ /**
2452
+ * Fires when the user clicks the **PDF export** command button.
2453
+ */
2454
+ this.pdfExport = new EventEmitter();
2455
+ /**
2456
+ * @hidden
2457
+ */
2458
+ this.dragEndConfirmed = new EventEmitter();
2459
+ /**
2460
+ * @hidden
2461
+ */
2462
+ this.resizeEndConfirmed = new EventEmitter();
2463
+ /**
2464
+ * @hidden
2465
+ */
2466
+ this.removeConfirmed = new EventEmitter();
2467
+ this.viewIndex = 0;
2468
+ this._timezone = '';
2469
+ this._modelFields = defaultModelFields;
2470
+ validatePackage(packageMetadata);
2471
+ this.dateRangeStream = viewState.dateRange;
2472
+ this.selectedDateStream = viewContext.selectedDate;
3007
2473
  }
3008
- return staticDate;
3009
- }
3010
- /**
3011
- * @hidden
3012
- * TODO Move to date-math
3013
- */
3014
- var addUTCDays = function (date, offset) {
3015
- var newDate = new Date(date.getTime());
3016
- newDate.setUTCDate(newDate.getUTCDate() + offset);
3017
- return newDate;
3018
- };
3019
- // TODO: name? move to date-math
3020
- /** @hidden */
3021
- function toUTCTime(localDate, localTime) {
3022
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localTime.getHours(), localTime.getMinutes(), localTime.getSeconds(), localTime.getMilliseconds()));
3023
- }
3024
- // TODO: move to date-math
3025
- /** @hidden */
3026
- function toUTCDate(localDate) {
3027
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate()));
3028
- }
3029
- // TODO: move to date-math
3030
- /** @hidden */
3031
- function getUTCDate(utcDate) {
3032
- return new Date(Date.UTC(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate()));
3033
- }
3034
- // TODO: move to date-math
3035
- /** @hidden */
3036
- function toUTCDateTime(localDate) {
3037
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localDate.getHours(), localDate.getMinutes(), localDate.getSeconds(), localDate.getMilliseconds()));
3038
- }
3039
- /** @hidden */
3040
- function dateWithTime(target, time) {
3041
- return new Date(target.getFullYear(), target.getMonth(), target.getDate(), time.getHours(), time.getMinutes());
3042
- }
3043
- function getDataIdx(value, resource) {
3044
- var data = resource.data;
3045
- for (var dataIdx = 0; dataIdx < data.length; dataIdx++) {
3046
- if (getField(data[dataIdx], resource.valueField) === value) {
3047
- return dataIdx;
2474
+ Object.defineProperty(SchedulerComponent.prototype, "dir", {
2475
+ get: function () {
2476
+ return this.direction;
2477
+ },
2478
+ enumerable: true,
2479
+ configurable: true
2480
+ });
2481
+ Object.defineProperty(SchedulerComponent.prototype, "selectedViewIndex", {
2482
+ get: function () {
2483
+ return this.viewIndex;
2484
+ },
2485
+ /**
2486
+ * The index of the currently selected view.
2487
+ *
2488
+ * By default, the selected view index is `0` and
2489
+ * indicates that the first declared view is visible.
2490
+ */
2491
+ set: function (index) {
2492
+ this.viewIndex = index;
2493
+ this.onViewIndexChange();
2494
+ },
2495
+ enumerable: true,
2496
+ configurable: true
2497
+ });
2498
+ Object.defineProperty(SchedulerComponent.prototype, "weekStart", {
2499
+ get: function () {
2500
+ if (isPresent(this._weekStart)) {
2501
+ return this._weekStart;
2502
+ }
2503
+ return this.intlService.firstDay();
2504
+ },
2505
+ /**
2506
+ * The first day of the week. Applicable to **Week**, **Month** and **TimelineWeek** views.
2507
+ * Defaults to the locale settings.
2508
+ */
2509
+ set: function (value) {
2510
+ this._weekStart = value;
2511
+ },
2512
+ enumerable: true,
2513
+ configurable: true
2514
+ });
2515
+ Object.defineProperty(SchedulerComponent.prototype, "timezone", {
2516
+ get: function () {
2517
+ return this._timezone;
2518
+ },
2519
+ /**
2520
+ * Specifies the id of the timezone that will be displayed in the Scheduler.
2521
+ * For example, `Europe/Sofia`.
2522
+ * Defaults to `Etc/UTC`.
2523
+ */
2524
+ set: function (value) {
2525
+ this._timezone = value;
2526
+ this.events = this.events || [];
2527
+ },
2528
+ enumerable: true,
2529
+ configurable: true
2530
+ });
2531
+ Object.defineProperty(SchedulerComponent.prototype, "events", {
2532
+ get: function () {
2533
+ return this._events;
2534
+ },
2535
+ /**
2536
+ * An array of event instances which will be shown by the Scheduler.
2537
+ */
2538
+ set: function (value) {
2539
+ this._events = value;
2540
+ this.processEvents(value);
2541
+ },
2542
+ enumerable: true,
2543
+ configurable: true
2544
+ });
2545
+ Object.defineProperty(SchedulerComponent.prototype, "selectedDate", {
2546
+ get: function () {
2547
+ return this._selectedDate;
2548
+ },
2549
+ /**
2550
+ * The currently selected date of the Scheduler.
2551
+ * Determines the period which is displayed.
2552
+ */
2553
+ set: function (value) {
2554
+ if (!value) {
2555
+ return;
2556
+ }
2557
+ this._selectedDate = value;
2558
+ this.viewContext.notifySelectedDate(value);
2559
+ },
2560
+ enumerable: true,
2561
+ configurable: true
2562
+ });
2563
+ Object.defineProperty(SchedulerComponent.prototype, "modelFields", {
2564
+ get: function () {
2565
+ return this._modelFields;
2566
+ },
2567
+ /**
2568
+ * The names of the model fields from which the Scheduler will read its data
2569
+ * ([see example]({% slug databinding_scheduler %}#toc-binding-to-models)).
2570
+ */
2571
+ set: function (value) {
2572
+ this._modelFields = __assign({}, defaultModelFields, value);
2573
+ },
2574
+ enumerable: true,
2575
+ configurable: true
2576
+ });
2577
+ SchedulerComponent.prototype.ngOnInit = function () {
2578
+ if (!this.selectedDate) {
2579
+ this.selectedDate = todayDate();
3048
2580
  }
3049
- }
3050
- return -1;
3051
- }
3052
- function resourceItem(value, resource) {
3053
- var index = getDataIdx(value, resource);
3054
- return index >= 0 ? resource.data[index] : {};
3055
- }
3056
- function resourceItems(values, resource) {
3057
- return values.map(function (value) { return resourceItem(value, resource); });
3058
- }
3059
- function cloneResources(arr) {
3060
- var result = [];
3061
- for (var idx = 0; idx < arr.length; idx++) {
3062
- var clone$$1 = Object.assign({}, arr[idx]);
3063
- clone$$1.resources = clone$$1.resources.slice(0);
3064
- result.push(clone$$1);
3065
- }
3066
- return result;
3067
- }
3068
- /** @hidden */
3069
- function resourceItemByValue(event, resource) {
3070
- var value = getField(event, resource.field);
3071
- if (Array.isArray(value)) {
3072
- return resourceItems(value, resource);
3073
- }
3074
- return resourceItem(value, resource);
3075
- }
3076
- function addNotGroupedResources(event, resources, allResources) {
3077
- for (var resourceIdx = 0; resourceIdx < resources.length; resourceIdx++) {
3078
- var current = resources[resourceIdx];
3079
- for (var idx = 0; idx < allResources.length; idx++) {
3080
- var item = allResources[idx];
3081
- if (!current.resources[idx] && item.data) {
3082
- current.resources[idx] = resourceItemByValue(event, item);
2581
+ };
2582
+ SchedulerComponent.prototype.ngAfterContentInit = function () {
2583
+ var _this = this;
2584
+ if (isDevMode() && this.views.length === 0) {
2585
+ throw new Error('No views declared for <kendo-scheduler>. Please, declare at least one view.');
2586
+ }
2587
+ this.subs = this.views.changes.subscribe(function () {
2588
+ return _this.resetViewIndex();
2589
+ });
2590
+ this.subs.add(this.intlService.changes.subscribe(this.intlChange.bind(this)));
2591
+ this.subs.add(this.viewState.nextDate.subscribe(function (nextDate) {
2592
+ _this.selectedDate = nextDate;
2593
+ }));
2594
+ this.subs.add(this.viewState.dateRange.subscribe(function (dateRange) {
2595
+ var isEmpty = dateRange.start.getTime() === 0;
2596
+ if (!isEmpty) {
2597
+ var args = new DateChangeEvent(_this, _this.selectedDate, dateRange);
2598
+ _this.dateChange.emit(args);
2599
+ }
2600
+ }));
2601
+ this.subs.add(this.viewState.navigate.subscribe(function (_a) {
2602
+ var viewName = _a.viewName, date = _a.date;
2603
+ var views = _this.views.toArray();
2604
+ var view = views.find(function (v) { return v.name === viewName; });
2605
+ var args = new NavigateEvent(_this, {
2606
+ type: 'show-date',
2607
+ view: view || {
2608
+ name: viewName,
2609
+ title: viewName
2610
+ },
2611
+ date: date
2612
+ });
2613
+ _this.navigate.next(args);
2614
+ if (view && !args.isDefaultPrevented()) {
2615
+ var index = views.indexOf(view);
2616
+ _this.selectedView = view;
2617
+ _this.setViewIndex(index);
2618
+ _this.selectedDate = date;
2619
+ }
2620
+ }));
2621
+ this.subs.add(this.viewState.viewEvent.subscribe(function (_a) {
2622
+ var name = _a.name, args = _a.args;
2623
+ var emitter = _this[name];
2624
+ var confirmedEmitter = _this[name + "Confirmed"];
2625
+ if (hasObservers(emitter) || (confirmedEmitter && hasObservers(confirmedEmitter))) {
2626
+ _this.zone.run(function () {
2627
+ var eventInstance = new VIEW_EVENT_MAP[name](_this, args);
2628
+ emitter.emit(eventInstance);
2629
+ args.prevented = eventInstance.prevented;
2630
+ if (confirmedEmitter && !args.prevented) {
2631
+ confirmedEmitter.emit(eventInstance);
2632
+ }
2633
+ });
2634
+ }
2635
+ }));
2636
+ this.subs.add(this.viewState.layoutEnd.subscribe(function () {
2637
+ if (_this.resizeSensor) {
2638
+ _this.resizeSensor.acceptSize();
2639
+ }
2640
+ }));
2641
+ this.subs.add(this.viewState.slotSelectionStart
2642
+ .subscribe(function (e) {
2643
+ if (hasObservers(_this.slotDragStart)) {
2644
+ _this.zone.run(function () {
2645
+ _this.slotDragStart.emit(Object.assign(e, { sender: _this }));
2646
+ });
2647
+ }
2648
+ }));
2649
+ this.subs.add(this.viewState.slotSelectionDrag
2650
+ .subscribe(function (value) {
2651
+ if (hasObservers(_this.slotDrag)) {
2652
+ _this.zone.run(function () {
2653
+ _this.slotDrag.emit(new SlotDragEvent(_this, value));
2654
+ });
2655
+ }
2656
+ }));
2657
+ this.subs.add(this.viewState.slotSelectionEnd
2658
+ .subscribe(function (value) {
2659
+ if (hasObservers(_this.slotDragEnd)) {
2660
+ _this.zone.run(function () {
2661
+ _this.slotDragEnd.emit(new SlotDragEndEvent(_this, value));
2662
+ });
2663
+ }
2664
+ }));
2665
+ this.onViewIndexChange();
2666
+ this.notifyOptionsChange = this.notifyOptionsChange.bind(this);
2667
+ this.subs.add(this.allDayEventTemplate.changes.subscribe(this.notifyOptionsChange));
2668
+ this.subs.add(this.eventTemplate.changes.subscribe(this.notifyOptionsChange));
2669
+ this.subs.add(this.timeSlotTemplate.changes.subscribe(this.notifyOptionsChange));
2670
+ this.subs.add(this.timeSlotTemplate.changes.subscribe(this.notifyOptionsChange));
2671
+ this.subs.add(this.minorTimeHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2672
+ this.subs.add(this.majorTimeHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2673
+ this.subs.add(this.monthDaySlotTemplate.changes.subscribe(this.notifyOptionsChange));
2674
+ this.subs.add(this.dateHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2675
+ this.subs.add(this.allDaySlotTemplate.changes.subscribe(this.notifyOptionsChange));
2676
+ this.subs.add(this.groupHeaderTemplate.changes.subscribe(this.notifyOptionsChange));
2677
+ this.subs.add(this.agendaDateTemplate.changes.subscribe(this.notifyOptionsChange));
2678
+ this.subs.add(this.agendaTimeTemplate.changes.subscribe(this.notifyOptionsChange));
2679
+ this.subs.add(this.views.changes.subscribe(function () {
2680
+ _this.changeDetector.markForCheck();
2681
+ }));
2682
+ //this.editService.timezone = this.timezone;
2683
+ this.attachEditHandlers();
2684
+ this.dialogsService.container = this.confirmationDialogContainerRef;
2685
+ this.notifyOptionsChange();
2686
+ this.subs.add(this.pdfService.exportClick.subscribe(function () {
2687
+ var args = new PDFExportEvent();
2688
+ _this.pdfExport.emit(args);
2689
+ if (!args.isDefaultPrevented()) {
2690
+ _this.saveAsPDF();
3083
2691
  }
2692
+ }));
2693
+ this.subs.add(this.pdfService.done.subscribe(function () {
2694
+ _this.loadingComponent.toggle(false);
2695
+ }));
2696
+ this.subs.add(this.localization.changes.subscribe(function (_a) {
2697
+ var rtl = _a.rtl;
2698
+ _this.rtl = rtl;
2699
+ _this.direction = _this.rtl ? 'rtl' : 'ltr';
2700
+ }));
2701
+ this.subs.add(this.viewState.optionsChange.subscribe(function () {
2702
+ _this.changeDetector.markForCheck();
2703
+ }));
2704
+ this.attachElementEventHandlers();
2705
+ };
2706
+ SchedulerComponent.prototype.ngOnChanges = function (changes) {
2707
+ var _this = this;
2708
+ if (isChanged('resources', changes) && !isChanged('events', changes) && this.viewItems) {
2709
+ this.viewItems.forEach(function (item) {
2710
+ copyResources(item.event, _this.resources);
2711
+ });
3084
2712
  }
3085
- }
3086
- }
3087
- /** @hidden */
3088
- function eventResources(event, _a) {
3089
- var taskResources = _a.taskResources, hasGroups = _a.hasGroups, spans = _a.spans, _b = _a.allResources, allResources = _b === void 0 ? [] : _b;
3090
- var resources = [];
3091
- for (var resourceIdx = 0; resourceIdx < taskResources.length; resourceIdx++) {
3092
- var resource = taskResources[resourceIdx];
3093
- if (!resource.data) {
3094
- resources = [{ leafIdx: 0, resources: [] }];
3095
- continue;
2713
+ if (anyChanged([
2714
+ 'group', 'resources', 'min', 'max', 'showWorkHours', 'startTime', 'scrollTime', 'endTime', 'eventHeight',
2715
+ 'workDayStart', 'workDayEnd', 'workWeekStart', 'workWeekEnd', 'weekStart', 'slotDuration', 'slotDivisions',
2716
+ 'editable', 'timezone', 'slotClass', 'slotFill', 'columnWidth', 'eventClass', 'eventStyles', 'isSlotSelected', 'selectable'
2717
+ ], changes)) {
2718
+ this.notifyOptionsChange(changes);
3096
2719
  }
3097
- var resourceIndex = allResources.indexOf(resource);
3098
- var values = getField(event, resource.field);
3099
- if (!Array.isArray(values)) {
3100
- values = [values];
2720
+ };
2721
+ SchedulerComponent.prototype.ngOnDestroy = function () {
2722
+ if (this.subs) {
2723
+ this.subs.unsubscribe();
3101
2724
  }
3102
- var expandedResources = [];
3103
- for (var valueIdx = 0; valueIdx < values.length; valueIdx++) {
3104
- var dataIdx = getDataIdx(values[valueIdx], resource);
3105
- if (dataIdx < 0) {
3106
- return [{ leafIdx: hasGroups ? -1 : 0, resources: [] }];
3107
- }
3108
- var item = resource.data[dataIdx];
3109
- // has groups - need all copies of the multiple resource
3110
- // no groups - just the first
3111
- if (resourceIdx === 0 && (hasGroups || valueIdx === 0)) {
3112
- var resourceItems_1 = [];
3113
- resourceItems_1[resourceIndex] = resource.multiple && !hasGroups ? [item] : item;
3114
- resources.push({
3115
- leafIdx: hasGroups ? dataIdx * spans[resourceIdx] : 0,
3116
- color: getField(item, resource.colorField),
3117
- resources: resourceItems_1
3118
- });
2725
+ if (this.detachElementEventHandlers) {
2726
+ this.detachElementEventHandlers();
2727
+ }
2728
+ };
2729
+ /**
2730
+ * @hidden
2731
+ */
2732
+ SchedulerComponent.prototype.onResize = function (_event) {
2733
+ this.viewContext.notifyResize();
2734
+ };
2735
+ /**
2736
+ * @hidden
2737
+ */
2738
+ SchedulerComponent.prototype.onNavigationAction = function (action) {
2739
+ var args = new NavigateEvent(this, action);
2740
+ this.navigate.next(args);
2741
+ if (args.isDefaultPrevented()) {
2742
+ return true;
2743
+ }
2744
+ if (action.type === 'view-change') {
2745
+ var views = this.views.toArray();
2746
+ var index = views.indexOf(action.view);
2747
+ this.selectedView = action.view;
2748
+ this.setViewIndex(index);
2749
+ }
2750
+ else if (action.type === 'select-date') {
2751
+ if (this.isInRange(action.date)) {
2752
+ this.selectedDate = action.date;
3119
2753
  }
3120
- else if (hasGroups) { // don't create multiple resource groups if no groups for multiple resources
3121
- var currentResources = resources;
3122
- if (values.length > 1) {
3123
- currentResources = cloneResources(resources);
3124
- expandedResources.push.apply(expandedResources, currentResources);
3125
- }
3126
- for (var currentIdx = 0; currentIdx < currentResources.length; currentIdx++) {
3127
- currentResources[currentIdx].leafIdx += dataIdx * spans[resourceIdx];
3128
- currentResources[currentIdx].resources[resourceIndex] = item;
3129
- }
2754
+ }
2755
+ else if (action.type === 'today') {
2756
+ var date = new Date();
2757
+ if (this.isInRange(date)) {
2758
+ this.selectedDate = date;
3130
2759
  }
3131
- else if (valueIdx > 0) {
3132
- for (var idx = 0; idx < resources.length; idx++) {
3133
- resources[idx].resources[resourceIndex].push(item);
3134
- }
2760
+ }
2761
+ else {
2762
+ this.viewContext.notifyAction(action);
2763
+ }
2764
+ };
2765
+ /**
2766
+ * Creates a popup editor for the new event.
2767
+ *
2768
+ * @param group - The [`FormGroup`](https://angular.io/docs/ts/latest/api/forms/index/FormGroup-class.html) that describes
2769
+ * the edit form. If called with a data item, the parameter will build the `FormGroup` from the data item fields.
2770
+ */
2771
+ SchedulerComponent.prototype.addEvent = function (group) {
2772
+ var isFormGroup = group instanceof FormGroup;
2773
+ if (!isFormGroup) {
2774
+ var createControl = function (source) { return function (acc, key) {
2775
+ acc[key] = new FormControl(source[key]);
2776
+ return acc;
2777
+ }; };
2778
+ var fields = Object.keys(group).reduce(createControl(group), {});
2779
+ group = new FormGroup(fields);
2780
+ }
2781
+ this.editService.addEvent(group);
2782
+ };
2783
+ /**
2784
+ * Switches the specified event in edit mode.
2785
+ *
2786
+ * @param dataItem - The event that will be switched to edit mode.
2787
+ * @param options - An object which contains the form `group` that will be bound in the edit dialog and the current edit `mode`.
2788
+ *
2789
+ */
2790
+ SchedulerComponent.prototype.editEvent = function (dataItem, options) {
2791
+ if (options === void 0) { options = {}; }
2792
+ var group = options.group, mode = options.mode;
2793
+ this.editService.editEvent(dataItem, group, mode);
2794
+ };
2795
+ /**
2796
+ * Closes the event editor, if open.
2797
+ */
2798
+ SchedulerComponent.prototype.closeEvent = function () {
2799
+ this.editService.close();
2800
+ };
2801
+ /**
2802
+ * Returns a flag which indicates if an event is currently edited.
2803
+ *
2804
+ * @return {boolean} - A flag which indicates if an event is currently edited.
2805
+ */
2806
+ SchedulerComponent.prototype.isEditing = function () {
2807
+ return this.editService.isEditing();
2808
+ };
2809
+ /**
2810
+ * Opens the built-in confirmation dialog for defining the edit mode
2811
+ * that will be used when the user edits or removes a recurring event.
2812
+ *
2813
+ * @param operation - The type of operation that will be confirmed. Has to be either **Edit** or **Remove**.
2814
+ *
2815
+ * @return {Observable<EditMode>}
2816
+ */
2817
+ SchedulerComponent.prototype.openRecurringConfirmationDialog = function (operation) {
2818
+ return this.dialogsService.openRecurringConfirmationDialog(operation);
2819
+ };
2820
+ /**
2821
+ * Opens the built-in removal confirmation dialog.
2822
+ *
2823
+ * @return {Observable<boolean>}
2824
+ */
2825
+ SchedulerComponent.prototype.openRemoveConfirmationDialog = function () {
2826
+ return this.dialogsService.openRemoveConfirmationDialog();
2827
+ };
2828
+ /**
2829
+ * Saves the current view as PDF.
2830
+ */
2831
+ SchedulerComponent.prototype.saveAsPDF = function () {
2832
+ var _this = this;
2833
+ this.loadingComponent.toggle(true);
2834
+ this.zone.runOutsideAngular(function () {
2835
+ // wait a tick in order for the loading element style to be updated by the browser.
2836
+ // if the export is synchronous, the browser will not update the element before the export is finished.
2837
+ setTimeout(function () {
2838
+ _this.pdfService.save();
2839
+ }, 0);
2840
+ });
2841
+ };
2842
+ /**
2843
+ * Scrolls the view to the specified time.
2844
+ */
2845
+ SchedulerComponent.prototype.scrollToTime = function (time) {
2846
+ this.viewContext.notifyAction({
2847
+ type: 'scroll-time',
2848
+ time: time
2849
+ });
2850
+ };
2851
+ /**
2852
+ * Returns the current view slot that matches the passed document position.
2853
+ *
2854
+ * @param x - The x document position.
2855
+ * @param y - The y document position.
2856
+ *
2857
+ * @return {SchedulerSlot} - The slot.
2858
+ *
2859
+ * {% embed_file drag-and-drop/app.component.ts %}
2860
+ * {% embed_file drag-and-drop/draggable.directive.ts %}
2861
+ * {% embed_file drag-and-drop/app.module.ts %}
2862
+ * {% embed_file shared/main.ts %}
2863
+ */
2864
+ SchedulerComponent.prototype.slotByPosition = function (x, y) {
2865
+ return this.viewContext.executeMethod('slotByPosition', { x: x, y: y });
2866
+ };
2867
+ /**
2868
+ * Returns the event associated with the specified DOM element, if any.
2869
+ *
2870
+ * @param element - The DOM element document position.
2871
+ * @return the event instance, if found.
2872
+ */
2873
+ SchedulerComponent.prototype.eventFromElement = function (element) {
2874
+ return this.viewContext.executeMethod('eventFromElement', { element: element });
2875
+ };
2876
+ Object.defineProperty(SchedulerComponent.prototype, "activeEvent", {
2877
+ /**
2878
+ * Gets the currently active event, if any.
2879
+ * The active event is the event that can currently receive focus.
2880
+ */
2881
+ get: function () {
2882
+ var activeElement = this.focusService.activeElement;
2883
+ if (activeElement) {
2884
+ return this.eventFromElement(activeElement.nativeElement);
3135
2885
  }
2886
+ },
2887
+ enumerable: true,
2888
+ configurable: true
2889
+ });
2890
+ /**
2891
+ * Focuses the next event or an event at a specified relative position.
2892
+ * The `options` parameter can be used to set a positive or negative offset
2893
+ * that is relative to the currently focused event.
2894
+ * A `nowrap` flag toggles the wrapping to the first or to the last item.
2895
+ *
2896
+ * @example
2897
+ * ```ts-no-run
2898
+ * scheduler.focusNext(); // Focuses the next event.
2899
+ * scheduler.focusNext({ offset: 1 }); // Focuses the next event.
2900
+ * scheduler.focusNext({ offset: -1 }); // Focuses the previous event.
2901
+ * scheduler.focusNext({ nowrap: true }); // If the focus is on the last event, does not move the focus to the first event.
2902
+ * ```
2903
+ *
2904
+ * @param position The relative position of the event to focus.
2905
+ * @returns `true` if the focused event changed. Otherwise, returns `false`.
2906
+ */
2907
+ SchedulerComponent.prototype.focusNext = function (position) {
2908
+ return this.focusService.focusNext(position);
2909
+ };
2910
+ /**
2911
+ * Focuses the previous event or an event at a specified relative position.
2912
+ * The `options` parameter can be used to set a positive or negative offset
2913
+ * that is relative to the currently focused event.
2914
+ * A `nowrap` flag toggles the wrapping to the first or to the last item.
2915
+ *
2916
+ * @example
2917
+ * ```ts-no-run
2918
+ * scheduler.focusPrev(); // Focuses the previous event
2919
+ * scheduler.focusPrev({ nowrap: true }); // Does not move the focus to the last event, if focus is on the first one.
2920
+ * ```
2921
+ *
2922
+ * @param position The relative position of the event to focus.
2923
+ * @returns `true` if the focused event changed. Otherwise, returns `false`.
2924
+ */
2925
+ SchedulerComponent.prototype.focusPrev = function (position) {
2926
+ var prevPosition = __assign({ offset: -1 }, position);
2927
+ return this.focusService.focusNext(prevPosition);
2928
+ };
2929
+ /**
2930
+ * Focuses the last focused event or the Scheduler element, if no events are available.
2931
+ */
2932
+ SchedulerComponent.prototype.focus = function () {
2933
+ return this.focusService.focus();
2934
+ };
2935
+ SchedulerComponent.prototype.isInRange = function (date) {
2936
+ return (!this.min || this.min <= date) && (!this.max || date <= this.max);
2937
+ };
2938
+ SchedulerComponent.prototype.notifyOptionsChange = function (changes) {
2939
+ var workweek = this.workWeek;
2940
+ this.viewContext.notifyOptionsChange({
2941
+ group: this.group,
2942
+ resources: this.resources,
2943
+ allDayEventTemplate: this.allDayEventTemplate ? this.allDayEventTemplate.first : null,
2944
+ eventTemplate: this.eventTemplate ? this.eventTemplate.first : null,
2945
+ timeSlotTemplate: this.timeSlotTemplate ? this.timeSlotTemplate.first : null,
2946
+ minorTimeHeaderTemplate: this.minorTimeHeaderTemplate ? this.minorTimeHeaderTemplate.first : null,
2947
+ majorTimeHeaderTemplate: this.majorTimeHeaderTemplate ? this.majorTimeHeaderTemplate.first : null,
2948
+ monthDaySlotTemplate: this.monthDaySlotTemplate ? this.monthDaySlotTemplate.first : null,
2949
+ dateHeaderTemplate: this.dateHeaderTemplate ? this.dateHeaderTemplate.first : null,
2950
+ allDaySlotTemplate: this.allDaySlotTemplate ? this.allDaySlotTemplate.first : null,
2951
+ groupHeaderTemplate: this.groupHeaderTemplate ? this.groupHeaderTemplate.first : null,
2952
+ agendaDateTemplate: this.agendaDateTemplate ? this.agendaDateTemplate.first : null,
2953
+ agendaTimeTemplate: this.agendaTimeTemplate ? this.agendaTimeTemplate.first : null,
2954
+ min: this.min,
2955
+ max: this.max,
2956
+ showWorkHours: this.showWorkHours,
2957
+ startTime: this.startTime,
2958
+ scrollTime: this.scrollTime,
2959
+ endTime: this.endTime,
2960
+ workDayStart: this.workDayStart,
2961
+ workDayEnd: this.workDayEnd,
2962
+ workWeekStart: workweek.start,
2963
+ workWeekEnd: workweek.end,
2964
+ weekStart: this.weekStart,
2965
+ slotDuration: this.slotDuration,
2966
+ slotDivisions: this.slotDivisions,
2967
+ eventHeight: this.eventHeight,
2968
+ editable: this.editable,
2969
+ selectable: this.selectable,
2970
+ timezone: this.timezone,
2971
+ currentTimeMarker: this.currentTimeMarker,
2972
+ slotClass: this.slotClass,
2973
+ slotFill: this.slotFill,
2974
+ columnWidth: this.columnWidth,
2975
+ eventClass: this.eventClass,
2976
+ eventStyles: this.eventStyles,
2977
+ isSlotSelected: this.isSlotSelected,
2978
+ changes: changes
2979
+ });
2980
+ };
2981
+ Object.defineProperty(SchedulerComponent.prototype, "workWeek", {
2982
+ get: function () {
2983
+ var _a = this.intlService.weekendRange(), start = _a.start, end = _a.end;
2984
+ var workWeekStart = isPresent(this.workWeekStart) ? this.workWeekStart : (end + 1) % DAYS_IN_WEEK;
2985
+ var weekEnd = start > 0 ? start - 1 : Day.Saturday;
2986
+ var workWeekEnd = isPresent(this.workWeekEnd) ? this.workWeekEnd : weekEnd;
2987
+ return { start: workWeekStart, end: workWeekEnd };
2988
+ },
2989
+ enumerable: true,
2990
+ configurable: true
2991
+ });
2992
+ SchedulerComponent.prototype.resetViewIndex = function () {
2993
+ var index = this.selectedViewIndex;
2994
+ var newIndex = Math.max(0, Math.min(index, this.views.length - 1));
2995
+ this.setViewIndex(newIndex);
2996
+ this.onViewIndexChange();
2997
+ };
2998
+ SchedulerComponent.prototype.onViewIndexChange = function () {
2999
+ if (!this.views) {
3000
+ return;
3136
3001
  }
3137
- if (expandedResources.length) {
3138
- resources = expandedResources;
3002
+ var views = this.views.toArray();
3003
+ var selectedView = views[this.viewIndex];
3004
+ if (selectedView) {
3005
+ this.selectedView = selectedView;
3139
3006
  }
3140
- }
3141
- addNotGroupedResources(event, resources, allResources);
3142
- return resources;
3143
- }
3144
- /** @hidden */
3145
- function assignTasksResources(tasks, options) {
3146
- for (var idx = 0; idx < tasks.length; idx++) {
3147
- var task = tasks[idx];
3148
- task.resources = eventResources(task.event, options);
3149
- }
3150
- }
3151
- /** @hidden */
3152
- function findRowIndex(events, data) {
3153
- if (data.rowIndex !== undefined) {
3154
- return data.rowIndex;
3155
- }
3156
- for (var idx = 0; idx < events.length; idx++) {
3157
- if (!events[idx]) {
3158
- return idx;
3007
+ };
3008
+ SchedulerComponent.prototype.setViewIndex = function (newIndex) {
3009
+ var changed = this.selectedViewIndex !== newIndex;
3010
+ if (changed) {
3011
+ this.selectedViewIndex = newIndex;
3012
+ this.selectedViewIndexChange.emit(newIndex);
3159
3013
  }
3160
- }
3161
- return events.length;
3162
- }
3163
- /** @hidden */
3164
- function isRecurrence(task) {
3165
- return Boolean(task.event && task.event.recurrenceRule);
3166
- }
3167
- /** @hidden */
3168
- function isRecurrenceException(task) {
3169
- return task.event && isPresent(task.event.recurrenceId) && !task.event.recurrenceRule;
3170
- }
3171
- /** @hidden */
3172
- var rectContains = function (rect, left, top) {
3173
- return rect.left <= left && left <= rect.left + rect.width && rect.top <= top && top <= rect.top + rect.height;
3174
- };
3175
- /** @hidden */
3176
- var rectContainsX = function (rect, left) {
3177
- return rect.left <= left && left <= rect.left + rect.width;
3178
- };
3179
- /** @hidden */
3180
- var toPx = function (value) { return value + "px"; };
3181
- /** @hidden */
3182
- var elementOffset = function (element) {
3183
- if (!element) {
3184
- return null;
3185
- }
3186
- var box = element.getBoundingClientRect();
3187
- var documentElement = document.documentElement;
3188
- return {
3189
- top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),
3190
- left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0),
3191
- width: box.width,
3192
- height: box.height
3014
+ return changed;
3193
3015
  };
3194
- };
3195
- /** @hidden */
3196
- var pointDistance = function (x1, y1, x2, y2) { return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); };
3197
- /** @hidden */
3198
- var ignoreContentChild = function (child) { return child.nodeName === 'KENDO-RESIZE-SENSOR' || hasClasses(child, 'k-loading-mask'); };
3199
- /** @hidden */
3200
- var setCoordinates = function (element, coordinates) {
3201
- for (var field in coordinates) {
3202
- if (coordinates.hasOwnProperty(field)) {
3203
- element.style[field] = toPx(coordinates[field]);
3016
+ SchedulerComponent.prototype.processEvents = function (dataItems) {
3017
+ var _this = this;
3018
+ var timezone = this.timezone;
3019
+ var fields = this.modelFields;
3020
+ var items = dataItems
3021
+ .map(function (dataItem) { return readEvent(dataItem, fields, _this.resources); })
3022
+ .filter(function (event) { return !isRecurrenceMaster(event); })
3023
+ .map(function (event) {
3024
+ var start = ZonedDate.fromLocalDate(event.start, timezone);
3025
+ var end = ZonedDate.fromLocalDate(event.end, timezone);
3026
+ return { start: start, end: end, event: event };
3027
+ });
3028
+ this.viewItems = items;
3029
+ this.viewContext.notifyItems(items);
3030
+ };
3031
+ SchedulerComponent.prototype.attachEditHandlers = function () {
3032
+ if (!this.editService) {
3033
+ return;
3204
3034
  }
3205
- }
3206
- };
3207
- /** @hidden */
3208
- var convertNgClassBindings = function (bindingValues) {
3209
- var result = [];
3210
- if (isString(bindingValues)) {
3211
- result.push(bindingValues);
3212
- }
3213
- else if (isArray(bindingValues)) {
3214
- result.push.apply(result, bindingValues);
3215
- }
3216
- else if (isObject(bindingValues)) {
3217
- for (var field in bindingValues) {
3218
- if (bindingValues.hasOwnProperty(field) && bindingValues[field]) {
3219
- result.push(field);
3220
- }
3035
+ this.subs.add(this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)));
3036
+ };
3037
+ SchedulerComponent.prototype.emitCRUDEvent = function (args) {
3038
+ Object.assign(args, { sender: this });
3039
+ switch (args.action) {
3040
+ case 'cancel':
3041
+ this.cancel.emit(args);
3042
+ break;
3043
+ case 'save':
3044
+ this.save.emit(args);
3045
+ break;
3046
+ default: break;
3047
+ }
3048
+ };
3049
+ SchedulerComponent.prototype.intlChange = function () {
3050
+ var currentView = this.selectedView;
3051
+ this.selectedView = null;
3052
+ if (!isPresent(this.workWeekStart) || !isPresent(this.workWeekEnd)) {
3053
+ this.notifyOptionsChange();
3221
3054
  }
3222
- }
3223
- return result;
3224
- };
3225
- /**
3226
- * @hidden
3227
- */
3228
- function formatEventTime(start, end, isAllDay, localeId) {
3229
- var startTimeFormat = { skeleton: 'yMMMMEEEEdhm' };
3230
- var startDateFormat = { skeleton: 'yMMMMEEEEd' };
3231
- var endFormat = isEqualDate(start, end) ? 't' : startTimeFormat;
3232
- return isAllDay ?
3233
- "" + formatDate(start, startDateFormat, localeId) :
3234
- formatDate(start, startTimeFormat, localeId) + "\u2013" + formatDate(end, endFormat, localeId);
3235
- }
3236
- /**
3237
- * @hidden
3238
- */
3239
- function formValueOrDefault(group, field, defaultValue) {
3240
- var control = group.get(field);
3241
- if (!control) {
3242
- return defaultValue;
3243
- }
3244
- return control.value || defaultValue;
3245
- }
3246
- /**
3247
- * @hidden
3248
- */
3249
- var isWorkWeekDay = function (day, start, end) {
3250
- if (end < start) {
3251
- return day <= end || start <= day;
3252
- }
3253
- return start <= day && day <= end;
3254
- };
3055
+ this.changeDetector.detectChanges();
3056
+ this.selectedView = currentView;
3057
+ if (NgZone.isInAngularZone()) {
3058
+ this.changeDetector.markForCheck();
3059
+ }
3060
+ else {
3061
+ this.changeDetector.detectChanges();
3062
+ }
3063
+ };
3064
+ SchedulerComponent.prototype.attachElementEventHandlers = function () {
3065
+ var _this = this;
3066
+ if (!isDocumentAvailable()) {
3067
+ return;
3068
+ }
3069
+ var wrapper = this.wrapper.nativeElement;
3070
+ this.zone.runOutsideAngular(function () {
3071
+ var windowBlurSubscription = _this.renderer.listen('window', 'blur', function (args) {
3072
+ _this.domEvents.windowBlur.emit(args);
3073
+ });
3074
+ var clickSubscription = _this.renderer.listen(wrapper, 'click', function (args) {
3075
+ _this.domEvents.click.emit(args);
3076
+ });
3077
+ var keydownSubscription = _this.renderer.listen(wrapper, 'keydown', function (args) {
3078
+ _this.domEvents.keydown.emit(args);
3079
+ });
3080
+ var focused = false;
3081
+ var focusInSubscription = _this.renderer.listen(wrapper, 'focusin', function (args) {
3082
+ _this.domEvents.focus.emit(args);
3083
+ if (!focused) {
3084
+ _this.domEvents.focusIn.emit(args);
3085
+ _this.renderer.addClass(_this.wrapper.nativeElement, 'k-state-focused');
3086
+ focused = true;
3087
+ }
3088
+ });
3089
+ var focusOutSubscription = _this.renderer.listen(wrapper, 'focusout', function (args) {
3090
+ var next = args.relatedTarget || document.activeElement;
3091
+ var outside = !closest(next, function (node) { return node === wrapper; });
3092
+ if (outside) {
3093
+ _this.domEvents.focusOut.emit(args);
3094
+ _this.renderer.removeClass(_this.wrapper.nativeElement, 'k-state-focused');
3095
+ focused = false;
3096
+ }
3097
+ });
3098
+ _this.detachElementEventHandlers = function () {
3099
+ windowBlurSubscription();
3100
+ clickSubscription();
3101
+ keydownSubscription();
3102
+ focusInSubscription();
3103
+ focusOutSubscription();
3104
+ };
3105
+ });
3106
+ };
3107
+ __decorate([
3108
+ HostBinding('class.k-widget'),
3109
+ HostBinding('class.k-scheduler'),
3110
+ HostBinding('class.k-floatwrap'),
3111
+ __metadata("design:type", Boolean)
3112
+ ], SchedulerComponent.prototype, "hostClasses", void 0);
3113
+ __decorate([
3114
+ HostBinding('class.k-rtl'),
3115
+ __metadata("design:type", Boolean)
3116
+ ], SchedulerComponent.prototype, "rtl", void 0);
3117
+ __decorate([
3118
+ HostBinding('attr.dir'),
3119
+ __metadata("design:type", String),
3120
+ __metadata("design:paramtypes", [])
3121
+ ], SchedulerComponent.prototype, "dir", null);
3122
+ __decorate([
3123
+ Input(),
3124
+ __metadata("design:type", Number),
3125
+ __metadata("design:paramtypes", [Number])
3126
+ ], SchedulerComponent.prototype, "selectedViewIndex", null);
3127
+ __decorate([
3128
+ Input(),
3129
+ __metadata("design:type", Object)
3130
+ ], SchedulerComponent.prototype, "editable", void 0);
3131
+ __decorate([
3132
+ Input(),
3133
+ __metadata("design:type", Boolean)
3134
+ ], SchedulerComponent.prototype, "selectable", void 0);
3135
+ __decorate([
3136
+ Input(),
3137
+ __metadata("design:type", Date)
3138
+ ], SchedulerComponent.prototype, "min", void 0);
3139
+ __decorate([
3140
+ Input(),
3141
+ __metadata("design:type", Date)
3142
+ ], SchedulerComponent.prototype, "max", void 0);
3143
+ __decorate([
3144
+ Input(),
3145
+ __metadata("design:type", Number)
3146
+ ], SchedulerComponent.prototype, "eventHeight", void 0);
3147
+ __decorate([
3148
+ Input(),
3149
+ __metadata("design:type", Number)
3150
+ ], SchedulerComponent.prototype, "columnWidth", void 0);
3151
+ __decorate([
3152
+ Input(),
3153
+ __metadata("design:type", Boolean)
3154
+ ], SchedulerComponent.prototype, "showWorkHours", void 0);
3155
+ __decorate([
3156
+ Input(),
3157
+ __metadata("design:type", String)
3158
+ ], SchedulerComponent.prototype, "startTime", void 0);
3159
+ __decorate([
3160
+ Input(),
3161
+ __metadata("design:type", String)
3162
+ ], SchedulerComponent.prototype, "endTime", void 0);
3163
+ __decorate([
3164
+ Input(),
3165
+ __metadata("design:type", String)
3166
+ ], SchedulerComponent.prototype, "workDayStart", void 0);
3167
+ __decorate([
3168
+ Input(),
3169
+ __metadata("design:type", String)
3170
+ ], SchedulerComponent.prototype, "workDayEnd", void 0);
3171
+ __decorate([
3172
+ Input(),
3173
+ __metadata("design:type", Number)
3174
+ ], SchedulerComponent.prototype, "workWeekStart", void 0);
3175
+ __decorate([
3176
+ Input(),
3177
+ __metadata("design:type", Number)
3178
+ ], SchedulerComponent.prototype, "workWeekEnd", void 0);
3179
+ __decorate([
3180
+ Input(),
3181
+ __metadata("design:type", Number),
3182
+ __metadata("design:paramtypes", [Number])
3183
+ ], SchedulerComponent.prototype, "weekStart", null);
3184
+ __decorate([
3185
+ Input(),
3186
+ __metadata("design:type", Number)
3187
+ ], SchedulerComponent.prototype, "slotDuration", void 0);
3188
+ __decorate([
3189
+ Input(),
3190
+ __metadata("design:type", Number)
3191
+ ], SchedulerComponent.prototype, "slotDivisions", void 0);
3192
+ __decorate([
3193
+ Input(),
3194
+ __metadata("design:type", Number)
3195
+ ], SchedulerComponent.prototype, "slotFill", void 0);
3196
+ __decorate([
3197
+ Input(),
3198
+ __metadata("design:type", Object)
3199
+ ], SchedulerComponent.prototype, "scrollTime", void 0);
3200
+ __decorate([
3201
+ Input(),
3202
+ __metadata("design:type", Object)
3203
+ ], SchedulerComponent.prototype, "group", void 0);
3204
+ __decorate([
3205
+ Input(),
3206
+ __metadata("design:type", Array)
3207
+ ], SchedulerComponent.prototype, "resources", void 0);
3208
+ __decorate([
3209
+ Input(),
3210
+ __metadata("design:type", Boolean)
3211
+ ], SchedulerComponent.prototype, "loading", void 0);
3212
+ __decorate([
3213
+ Input(),
3214
+ __metadata("design:type", String),
3215
+ __metadata("design:paramtypes", [String])
3216
+ ], SchedulerComponent.prototype, "timezone", null);
3217
+ __decorate([
3218
+ Input(),
3219
+ __metadata("design:type", Array),
3220
+ __metadata("design:paramtypes", [Array])
3221
+ ], SchedulerComponent.prototype, "events", null);
3222
+ __decorate([
3223
+ Input(),
3224
+ __metadata("design:type", Date),
3225
+ __metadata("design:paramtypes", [Date])
3226
+ ], SchedulerComponent.prototype, "selectedDate", null);
3227
+ __decorate([
3228
+ Input(),
3229
+ __metadata("design:type", Object),
3230
+ __metadata("design:paramtypes", [Object])
3231
+ ], SchedulerComponent.prototype, "modelFields", null);
3232
+ __decorate([
3233
+ Input(),
3234
+ __metadata("design:type", Object)
3235
+ ], SchedulerComponent.prototype, "currentTimeMarker", void 0);
3236
+ __decorate([
3237
+ Input(),
3238
+ __metadata("design:type", Function)
3239
+ ], SchedulerComponent.prototype, "slotClass", void 0);
3240
+ __decorate([
3241
+ Input(),
3242
+ __metadata("design:type", Function)
3243
+ ], SchedulerComponent.prototype, "eventClass", void 0);
3244
+ __decorate([
3245
+ Input(),
3246
+ __metadata("design:type", Function)
3247
+ ], SchedulerComponent.prototype, "eventStyles", void 0);
3248
+ __decorate([
3249
+ Input(),
3250
+ __metadata("design:type", Function)
3251
+ ], SchedulerComponent.prototype, "isSlotSelected", void 0);
3252
+ __decorate([
3253
+ Output(),
3254
+ __metadata("design:type", EventEmitter)
3255
+ ], SchedulerComponent.prototype, "selectedViewIndexChange", void 0);
3256
+ __decorate([
3257
+ Output(),
3258
+ __metadata("design:type", EventEmitter)
3259
+ ], SchedulerComponent.prototype, "navigate", void 0);
3260
+ __decorate([
3261
+ Output(),
3262
+ __metadata("design:type", EventEmitter)
3263
+ ], SchedulerComponent.prototype, "dateChange", void 0);
3264
+ __decorate([
3265
+ Output(),
3266
+ __metadata("design:type", EventEmitter)
3267
+ ], SchedulerComponent.prototype, "slotClick", void 0);
3268
+ __decorate([
3269
+ Output(),
3270
+ __metadata("design:type", EventEmitter)
3271
+ ], SchedulerComponent.prototype, "slotDblClick", void 0);
3272
+ __decorate([
3273
+ Output(),
3274
+ __metadata("design:type", EventEmitter)
3275
+ ], SchedulerComponent.prototype, "create", void 0);
3276
+ __decorate([
3277
+ Output(),
3278
+ __metadata("design:type", EventEmitter)
3279
+ ], SchedulerComponent.prototype, "eventClick", void 0);
3280
+ __decorate([
3281
+ Output(),
3282
+ __metadata("design:type", EventEmitter)
3283
+ ], SchedulerComponent.prototype, "eventDblClick", void 0);
3284
+ __decorate([
3285
+ Output(),
3286
+ __metadata("design:type", EventEmitter)
3287
+ ], SchedulerComponent.prototype, "eventKeydown", void 0);
3288
+ __decorate([
3289
+ Output(),
3290
+ __metadata("design:type", EventEmitter)
3291
+ ], SchedulerComponent.prototype, "cancel", void 0);
3292
+ __decorate([
3293
+ Output(),
3294
+ __metadata("design:type", EventEmitter)
3295
+ ], SchedulerComponent.prototype, "save", void 0);
3296
+ __decorate([
3297
+ Output(),
3298
+ __metadata("design:type", EventEmitter)
3299
+ ], SchedulerComponent.prototype, "remove", void 0);
3300
+ __decorate([
3301
+ Output(),
3302
+ __metadata("design:type", EventEmitter)
3303
+ ], SchedulerComponent.prototype, "resizeStart", void 0);
3304
+ __decorate([
3305
+ Output(),
3306
+ __metadata("design:type", EventEmitter)
3307
+ ], SchedulerComponent.prototype, "resize", void 0);
3308
+ __decorate([
3309
+ Output(),
3310
+ __metadata("design:type", EventEmitter)
3311
+ ], SchedulerComponent.prototype, "resizeEnd", void 0);
3312
+ __decorate([
3313
+ Output(),
3314
+ __metadata("design:type", EventEmitter)
3315
+ ], SchedulerComponent.prototype, "dragStart", void 0);
3316
+ __decorate([
3317
+ Output(),
3318
+ __metadata("design:type", EventEmitter)
3319
+ ], SchedulerComponent.prototype, "drag", void 0);
3320
+ __decorate([
3321
+ Output(),
3322
+ __metadata("design:type", EventEmitter)
3323
+ ], SchedulerComponent.prototype, "dragEnd", void 0);
3324
+ __decorate([
3325
+ Output(),
3326
+ __metadata("design:type", EventEmitter)
3327
+ ], SchedulerComponent.prototype, "slotDragStart", void 0);
3328
+ __decorate([
3329
+ Output(),
3330
+ __metadata("design:type", EventEmitter)
3331
+ ], SchedulerComponent.prototype, "slotDrag", void 0);
3332
+ __decorate([
3333
+ Output(),
3334
+ __metadata("design:type", EventEmitter)
3335
+ ], SchedulerComponent.prototype, "slotDragEnd", void 0);
3336
+ __decorate([
3337
+ Output(),
3338
+ __metadata("design:type", EventEmitter)
3339
+ ], SchedulerComponent.prototype, "pdfExport", void 0);
3340
+ __decorate([
3341
+ ContentChild(EditDialogTemplateDirective, { static: false }),
3342
+ __metadata("design:type", EditDialogTemplateDirective)
3343
+ ], SchedulerComponent.prototype, "editDialogTemplate", void 0);
3344
+ __decorate([
3345
+ ContentChild(ToolbarTemplateDirective, { static: false }),
3346
+ __metadata("design:type", ToolbarTemplateDirective)
3347
+ ], SchedulerComponent.prototype, "toolbarTemplate", void 0);
3348
+ __decorate([
3349
+ ContentChildren(SchedulerView),
3350
+ __metadata("design:type", QueryList)
3351
+ ], SchedulerComponent.prototype, "views", void 0);
3352
+ __decorate([
3353
+ ViewChild(ResizeSensorComponent, { static: true }),
3354
+ __metadata("design:type", ResizeSensorComponent)
3355
+ ], SchedulerComponent.prototype, "resizeSensor", void 0);
3356
+ __decorate([
3357
+ ViewChild("confirmationDialogContainer", { read: ViewContainerRef, static: true }),
3358
+ __metadata("design:type", ViewContainerRef)
3359
+ ], SchedulerComponent.prototype, "confirmationDialogContainerRef", void 0);
3360
+ __decorate([
3361
+ ViewChild(LoadingComponent, { static: true }),
3362
+ __metadata("design:type", LoadingComponent)
3363
+ ], SchedulerComponent.prototype, "loadingComponent", void 0);
3364
+ __decorate([
3365
+ ContentChildren(AllDayEventTemplateDirective),
3366
+ __metadata("design:type", QueryList)
3367
+ ], SchedulerComponent.prototype, "allDayEventTemplate", void 0);
3368
+ __decorate([
3369
+ ContentChildren(EventTemplateDirective),
3370
+ __metadata("design:type", QueryList)
3371
+ ], SchedulerComponent.prototype, "eventTemplate", void 0);
3372
+ __decorate([
3373
+ ContentChildren(TimeSlotTemplateDirective),
3374
+ __metadata("design:type", QueryList)
3375
+ ], SchedulerComponent.prototype, "timeSlotTemplate", void 0);
3376
+ __decorate([
3377
+ ContentChildren(MinorTimeHeaderTemplateDirective),
3378
+ __metadata("design:type", QueryList)
3379
+ ], SchedulerComponent.prototype, "minorTimeHeaderTemplate", void 0);
3380
+ __decorate([
3381
+ ContentChildren(MajorTimeHeaderTemplateDirective),
3382
+ __metadata("design:type", QueryList)
3383
+ ], SchedulerComponent.prototype, "majorTimeHeaderTemplate", void 0);
3384
+ __decorate([
3385
+ ContentChildren(MonthDaySlotTemplateDirective),
3386
+ __metadata("design:type", QueryList)
3387
+ ], SchedulerComponent.prototype, "monthDaySlotTemplate", void 0);
3388
+ __decorate([
3389
+ ContentChildren(DateHeaderTemplateDirective),
3390
+ __metadata("design:type", QueryList)
3391
+ ], SchedulerComponent.prototype, "dateHeaderTemplate", void 0);
3392
+ __decorate([
3393
+ ContentChildren(AllDaySlotTemplateDirective),
3394
+ __metadata("design:type", QueryList)
3395
+ ], SchedulerComponent.prototype, "allDaySlotTemplate", void 0);
3396
+ __decorate([
3397
+ ContentChildren(GroupHeaderTemplateDirective),
3398
+ __metadata("design:type", QueryList)
3399
+ ], SchedulerComponent.prototype, "groupHeaderTemplate", void 0);
3400
+ __decorate([
3401
+ ContentChildren(AgendaDateTemplateDirective),
3402
+ __metadata("design:type", QueryList)
3403
+ ], SchedulerComponent.prototype, "agendaDateTemplate", void 0);
3404
+ __decorate([
3405
+ ContentChildren(AgendaTimeTemplateDirective),
3406
+ __metadata("design:type", QueryList)
3407
+ ], SchedulerComponent.prototype, "agendaTimeTemplate", void 0);
3408
+ SchedulerComponent = __decorate([
3409
+ Component({
3410
+ changeDetection: ChangeDetectionStrategy.OnPush,
3411
+ selector: 'kendo-scheduler',
3412
+ providers: [
3413
+ EditService,
3414
+ DialogsService,
3415
+ DomEventsService,
3416
+ LocalDataChangesService,
3417
+ FocusService,
3418
+ SchedulerLocalizationService,
3419
+ {
3420
+ provide: LocalizationService,
3421
+ useExisting: SchedulerLocalizationService
3422
+ },
3423
+ {
3424
+ provide: L10N_PREFIX,
3425
+ useValue: 'kendo.scheduler'
3426
+ },
3427
+ ToolbarService,
3428
+ ViewContextService,
3429
+ ViewStateService,
3430
+ PDFService
3431
+ ],
3432
+ // TODO: Move to themes
3433
+ styles: ['.k-scheduler.k-state-focused { box-shadow: 0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12); }'],
3434
+ encapsulation: ViewEncapsulation.None,
3435
+ template: "\n <ng-container kendoSchedulerLocalizedMessages\n i18n-allEvents=\"kendo.scheduler.allEvents|The All events text displayed in the timeline views when there is no vertical grouping.\"\n allEvents=\"All events\"\n\n i18n-allDay=\"kendo.scheduler.allDay|The all day text displayed in the day and week views.\"\n allDay=\"all day\"\n\n i18n-dateHeader=\"kendo.scheduler.dateHeader|The date header text displayed in the agenda view.\"\n dateHeader=\"Date\"\n\n i18n-timeHeader=\"kendo.scheduler.timeHeader|The time header text displayed in the agenda view.\"\n timeHeader=\"Time\"\n\n i18n-deleteTitle=\"kendo.scheduler.deleteTitle|The delete icon title.\"\n deleteTitle=\"Delete\"\n\n i18n-eventHeader=\"kendo.scheduler.eventHeader|The event header text displayed in the agenda view.\"\n eventHeader=\"Event\"\n\n i18n-nextTitle=\"kendo.scheduler.nextTitle|The title of the navigation next button.\"\n nextTitle=\"Next\"\n\n i18n-previousTitle=\"kendo.scheduler.previousTitle|The title of the navigation previous button.\"\n previousTitle=\"Previous\"\n\n i18n-showFullDay=\"kendo.scheduler.showFullDay|The text of the show full day button displayed in the footer of the day, week and timeline views.\"\n showFullDay=\"Show full day\"\n\n i18n-showWorkDay=\"kendo.scheduler.showWorkDay|The text of the show work day button displayed in the footer of the day, week and timeline views.\"\n showWorkDay=\"Show business hours\"\n\n i18n-today=\"kendo.scheduler.today|The today button text displayed in the navigation.\"\n today=\"Today\"\n\n i18n-calendarToday=\"kendo.scheduler.calendarToday|The text of today's date in the header of the Calendar.\"\n calendarToday=\"TODAY\"\n\n i18n-dayViewTitle=\"kendo.scheduler.dayViewTitle|The day view title.\"\n dayViewTitle=\"Day\"\n\n i18n-multiDayViewTitle=\"kendo.scheduler.multiDayViewTitle|The multi day view title.\"\n multiDayViewTitle=\"Multi-Day\"\n\n i18n-weekViewTitle=\"kendo.scheduler.weekViewTitle|The week view title.\"\n weekViewTitle=\"Week\"\n\n i18n-workWeekViewTitle=\"kendo.scheduler.workWeekViewTitle|The work week view title.\"\n workWeekViewTitle=\"Work Week\"\n\n i18n-monthViewTitle=\"kendo.scheduler.monthViewTitle|The month view title.\"\n monthViewTitle=\"Month\"\n\n i18n-timelineViewTitle=\"kendo.scheduler.timelineViewTitle|The timeline view title.\"\n timelineViewTitle=\"Timeline\"\n\n i18n-timelineWeekViewTitle=\"kendo.scheduler.timelineWeekViewTitle|The timeline week view title.\"\n timelineWeekViewTitle=\"Timeline Week\"\n\n i18n-timelineMonthViewTitle=\"kendo.scheduler.timelineMonthViewTitle|The timeline month view title.\"\n timelineMonthViewTitle=\"Timeline Month\"\n\n i18n-agendaViewTitle=\"kendo.scheduler.agendaViewTitle|The agenda view title.\"\n agendaViewTitle=\"Agenda\"\n\n i18n-cancel=\"kendo.scheduler.cancel|The text similar to 'Cancel' displayed in scheduler.\"\n cancel=\"Cancel\"\n\n i18n-save=\"kendo.scheduler.save|The text similar to 'Save' displayed in scheduler.\"\n save=\"Save\"\n\n i18n-editorEventTitle=\"kendo.scheduler.editorEventTitle|The text similar to 'Title' displayed in the scheduler event editor.\"\n editorEventTitle='Title'\n\n i18n-editorEventStart=\"kendo.scheduler.editorEventStart|The text similar to 'Start' displayed in the scheduler event editor.\"\n editorEventStart=\"Start\"\n\n i18n-editorEventStartTimeZone=\"kendo.scheduler.editorEventStartTimeZone|The text similar to 'Start Time Zone' displayed in the scheduler event editor.\"\n editorEventStartTimeZone=\"Start Time Zone\"\n\n i18n-editorEventEnd=\"kendo.scheduler.editorEventEnd|The text similar to 'End' displayed in the scheduler event editor.\"\n editorEventEnd=\"End\"\n\n i18n-editorEventEndTimeZone=\"kendo.scheduler.editorEventEndTimeZone|The text similar to 'End Time Zone' displayed in the scheduler event editor.\"\n editorEventEndTimeZone=\"End Time Zone\"\n\n i18n-editorEventAllDay=\"kendo.scheduler.editorEventAllDay|The text similar to 'All Day event' displayed in the scheduler event editor.\"\n editorEventAllDay=\"All Day Event\"\n\n i18n-editorEventDescription=\"kendo.scheduler.editorEventDescription|The text similar to 'Description' displayed in the scheduler event editor.\"\n editorEventDescription=\"Description\"\n\n i18n-editorEventSeparateTimeZones=\"kendo.scheduler.editorEventSeparateTimeZones|The text similar to 'Use separate Start and End Time Zones' displayed in the scheduler event editor.\"\n editorEventSeparateTimeZones=\"End in different Time Zone\"\n\n i18n-editorEventTimeZone=\"kendo.scheduler.editorEventTimeZone|The text similar to 'Time Zone' displayed in the scheduler event editor.\"\n editorEventTimeZone='Specify Time Zone'\n\n i18n-editorTitle=\"kendo.scheduler.editorTitle|The text similar to 'Event' displayed as title of the scheduler event editor.\"\n editorTitle='Event'\n\n i18n-recurrenceEditorRepeat=\"kendo.scheduler.recurrenceEditorRepeat|The text similar to 'Repeat' displayed in the scheduler recurrence editor.\"\n recurrenceEditorRepeat='Repeat'\n\n i18n-recurrenceEditorDailyInterval=\"kendo.scheduler.recurrenceEditorDailyInterval|The text similar to 'day(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorDailyInterval='day(s)'\n\n i18n-recurrenceEditorDailyRepeatEvery=\"kendo.scheduler.recurrenceEditorDailyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorDailyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorWeeklyInterval=\"kendo.scheduler.recurrenceEditorWeeklyInterval|The text similar to 'week(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyInterval='week(s)'\n\n i18n-recurrenceEditorWeeklyRepeatEvery=\"kendo.scheduler.recurrenceEditorWeeklyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorWeeklyRepeatOn=\"kendo.scheduler.recurrenceEditorWeeklyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorWeeklyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorMonthlyDay=\"kendo.scheduler.recurrenceEditorMonthlyDay|The text similar to 'Day' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyDay='Day'\n\n i18n-recurrenceEditorMonthlyInterval=\"kendo.scheduler.recurrenceEditorMonthlyInterval|The text similar to 'month(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyInterval='month(s)'\n\n i18n-recurrenceEditorMonthlyRepeatEvery=\"kendo.scheduler.recurrenceEditorMonthlyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorMonthlyRepeatOn=\"kendo.scheduler.recurrenceEditorMonthlyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorMonthlyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorYearlyOf=\"kendo.scheduler.recurrenceEditorYearlyOf|The text similar to 'of' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyOf='of'\n\n i18n-recurrenceEditorYearlyRepeatEvery=\"kendo.scheduler.recurrenceEditorYearlyRepeatEvery|The text similar to 'Repeat every' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyRepeatEvery='Repeat every'\n\n i18n-recurrenceEditorYearlyRepeatOn=\"kendo.scheduler.recurrenceEditorYearlyRepeatOn|The text similar to 'Repeat on' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyRepeatOn='Repeat on'\n\n i18n-recurrenceEditorYearlyInterval=\"kendo.scheduler.recurrenceEditorYearlyInterval|The text similar to 'year(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorYearlyInterval='year(s)'\n\n i18n-recurrenceEditorFrequenciesDaily=\"kendo.scheduler.recurrenceEditorFrequenciesDaily|The text similar to 'Daily' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesDaily='Daily'\n\n i18n-recurrenceEditorFrequenciesMonthly=\"kendo.scheduler.recurrenceEditorFrequenciesMonthly|The text similar to 'Monthly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesMonthly='Monthly'\n\n i18n-recurrenceEditorFrequenciesNever=\"kendo.scheduler.recurrenceEditorFrequenciesNever|The text similar to 'Never' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesNever='Never'\n\n i18n-recurrenceEditorFrequenciesWeekly=\"kendo.scheduler.recurrenceEditorFrequenciesWeekly|The text similar to 'Weekly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesWeekly='Weekly'\n\n i18n-recurrenceEditorFrequenciesYearly=\"kendo.scheduler.recurrenceEditorFrequenciesYearly|The text similar to 'Yearly' displayed in the scheduler recurrence editor.\"\n recurrenceEditorFrequenciesYearly='Yearly'\n\n i18n-recurrenceEditorOffsetPositionsFirst=\"kendo.scheduler.recurrenceEditorOffsetPositionsFirst|The text similar to 'First' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsFirst='First'\n\n i18n-recurrenceEditorOffsetPositionsSecond=\"kendo.scheduler.recurrenceEditorOffsetPositionsSecond|The text similar to 'Second' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsSecond='Second'\n\n i18n-recurrenceEditorOffsetPositionsThird=\"kendo.scheduler.recurrenceEditorOffsetPositionsThird|The text similar to 'Third' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsThird='Third'\n\n i18n-recurrenceEditorOffsetPositionsFourth=\"kendo.scheduler.recurrenceEditorOffsetPositionsFourth|The text similar to 'Fourth' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsFourth='Fourth'\n\n i18n-recurrenceEditorOffsetPositionsLast=\"kendo.scheduler.recurrenceEditorOffsetPositionsLast|The text similar to 'Last' displayed in the scheduler recurrence editor.\"\n recurrenceEditorOffsetPositionsLast='Last'\n\n i18n-recurrenceEditorWeekdaysDay=\"kendo.scheduler.recurrenceEditorWeekdaysDay|The text similar to 'Day' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysDay='Day'\n\n i18n-recurrenceEditorWeekdaysWeekday=\"kendo.scheduler.recurrenceEditorWeekdaysWeekday|The text similar to 'Weekday' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysWeekday='Weekday'\n\n i18n-recurrenceEditorWeekdaysWeekendday=\"kendo.scheduler.recurrenceEditorWeekdaysWeekendday|The text similar to 'Weekend Day' displayed in the repeat by section of the monthly recurrence pattern.\"\n recurrenceEditorWeekdaysWeekendday='Weekend Day'\n\n i18n-recurrenceEditorEndAfter=\"kendo.scheduler.recurrenceEditorEndAfter|The text similar to 'After' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndAfter='After'\n\n i18n-recurrenceEditorEndOccurrence=\"kendo.scheduler.recurrenceEditorEndOccurrence|The text similar to 'occurrence(s)' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndOccurrence='occurrence(s)'\n\n i18n-recurrenceEditorEndLabel=\"kendo.scheduler.recurrenceEditorEndLabel|The text similar to 'End' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndLabel='End'\n\n i18n-recurrenceEditorEndNever=\"kendo.scheduler.recurrenceEditorEndNever|The text similar to 'Never' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndNever='Never'\n\n i18n-recurrenceEditorEndOn=\"kendo.scheduler.recurrenceEditorEndOn|The text similar to 'On' displayed in the scheduler recurrence editor.\"\n recurrenceEditorEndOn='On'\n\n i18n-destroy=\"kendo.scheduler.destroy|The text of the 'Delete' button displayed in the scheduler remove confirmation dialog.\"\n destroy='Delete'\n\n i18n-deleteConfirmation=\"kendo.scheduler.deleteConfirmation|The text similar to 'Are you sure you want to delete this event?' displayed in scheduler remove confirmation dialog.\"\n deleteConfirmation='Are you sure you want to delete this event?'\n\n i18n-editRecurringConfirmation=\"kendo.scheduler.editRecurringConfirmation|The text similar to 'Do you want to edit only this event occurrence or the whole series?' displayed in the scheduler recurring confirmation dialog.\"\n editRecurringConfirmation='Do you want to edit only this event occurrence or the whole series?'\n\n i18n-editOccurrence=\"kendo.scheduler.editOccurrence|The text of the 'Edit current occurrence' button displayed in the scheduler recurring confirmation dialog.\"\n editOccurrence='Edit current occurrence'\n\n i18n-editSeries=\"kendo.scheduler.editSeries|The text of the 'Edit the series' button displayed in the scheduler recurring confirmation dialog.\"\n editSeries='Edit the series'\n\n i18n-deleteRecurringConfirmation=\"kendo.scheduler.deleteRecurringConfirmation|The text similar to 'Do you want to delete only this event occurrence or the whole series?' displayed in the scheduler recurring confirmation dialog.\"\n deleteRecurringConfirmation='Do you want to delete only this event occurrence or the whole series?'\n\n i18n-deleteOccurrence=\"kendo.scheduler.deleteOccurrence|The text of the 'Delete current occurrence' button displayed in the scheduler recurring confirmation dialog.\"\n deleteOccurrence='Delete current occurrence'\n\n i18n-deleteSeries=\"kendo.scheduler.deleteSeries|The text similar of the 'Delete the series' button displayed in the scheduler recurring confirmation dialog.\"\n deleteSeries='Delete the series'\n\n i18n-deleteDialogTitle=\"kendo.scheduler.deleteDialogTitle|The title of the remove confirmation dialog, similar to 'Delete Event'.\"\n deleteDialogTitle='Delete Event'\n\n i18n-deleteRecurringDialogTitle=\"kendo.scheduler.deleteRecurringDialogTitle|The title of the recurring remove confirmation dialog, similar to 'Delete Recurring Item'\"\n deleteRecurringDialogTitle='Delete Recurring Item'\n\n i18n-editRecurringDialogTitle=\"kendo.scheduler.editRecurringDialogTitle|The title of the recurring edit confirmation dialog, similar to 'Edit Recurring Item'\"\n editRecurringDialogTitle='Edit Recurring Item'\n >\n </ng-container>\n\n <kendo-scheduler-toolbar\n [dateRange]=\"dateRangeStream\"\n [selectedDate]=\"selectedDateStream\"\n [views]=\"views\"\n [selectedView]=\"selectedView\"\n [template]=\"toolbarTemplate\"\n (navigate)=\"onNavigationAction($event)\"\n [min]=\"min\"\n [max]=\"max\"\n ></kendo-scheduler-toolbar>\n\n <ng-container *ngTemplateOutlet=\"selectedView?.template\">\n </ng-container>\n\n <ng-container #confirmationDialogContainer>\n </ng-container>\n\n <kendo-scheduler-edit-dialog\n [resources]=\"resources\"\n [editTemplate]=\"editDialogTemplate\"\n [timezone]=\"timezone\"\n [weekStart]=\"weekStart\"\n [fields]=\"modelFields\"\n ></kendo-scheduler-edit-dialog>\n\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n\n <div [loading]=\"loading\" kendoSchedulerLoading>\n </div>\n "
3436
+ }),
3437
+ __metadata("design:paramtypes", [ElementRef,
3438
+ ViewContextService,
3439
+ ViewStateService,
3440
+ EditService,
3441
+ DialogsService,
3442
+ IntlService,
3443
+ ChangeDetectorRef,
3444
+ NgZone,
3445
+ PDFService,
3446
+ LocalizationService,
3447
+ DomEventsService,
3448
+ Renderer2,
3449
+ FocusService])
3450
+ ], SchedulerComponent);
3451
+ return SchedulerComponent;
3452
+ }());
3255
3453
 
3256
3454
  // TODO
3257
3455
  // Extract as public method
@@ -4155,7 +4353,7 @@ var ToolbarViewSelectorComponent = /** @class */ (function () {
4155
4353
  Component({
4156
4354
  // tslint:disable-next-line:component-selector
4157
4355
  selector: '[kendoSchedulerToolbarViewSelector]',
4158
- template: "\n <select *ngIf=\"ctx.views?.length > 1\"\n (change)=\"onChange($event)\"\n class=\"k-views-dropdown k-dropdown\">\n <option *ngFor=\"let view of ctx.views\"\n [selected]=\"isSelected(view) == true\"\n [value]=\"view.name\"\n >\n {{ view.title }}\n </option>\n </select>\n <span class=\"k-scheduler-views k-button-group\">\n <button kendoButton\n type=\"button\"\n *ngFor=\"let view of ctx.views\"\n [selected]=\"isSelected(view)\"\n [attr.aria-pressed]=\"isSelected(view)\"\n (click)=\"select(view)\"\n >\n <span class=\"k-button-text\">\n {{ view.title }}\n </span>\n </button>\n </span>\n "
4356
+ template: "\n <select *ngIf=\"ctx.views?.length > 1\"\n (change)=\"onChange($event)\"\n class=\"k-views-dropdown k-picker-md k-rounded-md k-picker-solid k-dropdownlist k-picker\">\n <option *ngFor=\"let view of ctx.views\"\n [selected]=\"isSelected(view) == true\"\n [value]=\"view.name\"\n >\n {{ view.title }}\n </option>\n </select>\n <span class=\"k-scheduler-views k-button-group\">\n <button kendoButton\n type=\"button\"\n *ngFor=\"let view of ctx.views\"\n [selected]=\"isSelected(view)\"\n [attr.aria-pressed]=\"isSelected(view)\"\n (click)=\"select(view)\"\n >\n <span class=\"k-button-text\">\n {{ view.title }}\n </span>\n </button>\n </span>\n "
4159
4357
  }),
4160
4358
  __metadata("design:paramtypes", [ToolbarService])
4161
4359
  ], ToolbarViewSelectorComponent);
@@ -6217,7 +6415,7 @@ var SCROLL_INTERVAL = 50;
6217
6415
  var MIN_MOVE_DISTANCE = 10;
6218
6416
  /** @hidden */
6219
6417
  var BaseView = /** @class */ (function () {
6220
- function BaseView(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization) {
6418
+ function BaseView(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, cdr) {
6221
6419
  this.viewContext = viewContext;
6222
6420
  this.viewState = viewState;
6223
6421
  this.intl = intl;
@@ -6227,6 +6425,7 @@ var BaseView = /** @class */ (function () {
6227
6425
  this.element = element;
6228
6426
  this.pdfService = pdfService;
6229
6427
  this.localization = localization;
6428
+ this.cdr = cdr;
6230
6429
  this.items = new BehaviorSubject(null);
6231
6430
  this.horizontalResources = [];
6232
6431
  this.verticalResources = [];
@@ -6240,8 +6439,17 @@ var BaseView = /** @class */ (function () {
6240
6439
  this.spans = [];
6241
6440
  this.domEvents = [];
6242
6441
  this.resourcesCache = {};
6442
+ /**
6443
+ * The slot which is currently being dragged over while selecting a range of slots.
6444
+ */
6445
+ this.dragSelecting = null;
6446
+ /**
6447
+ * The slot where the drag-selecting originated. Used for flipping the start and end of the emitted range.
6448
+ */
6449
+ this.dragSelectOrigin = null;
6243
6450
  this.autoHeight = false;
6244
6451
  this.rtl = false;
6452
+ this.isSlotSelected = function () { return false; };
6245
6453
  this.setSlotClass = this.setSlotClass.bind(this);
6246
6454
  this.setHintClass = this.setHintClass.bind(this);
6247
6455
  this.weekStart = intl.firstDay();
@@ -6372,6 +6580,20 @@ var BaseView = /** @class */ (function () {
6372
6580
  }
6373
6581
  return result;
6374
6582
  };
6583
+ // Similar to https://tc39.es/proposal-temporal/docs/plaindate.html
6584
+ // Stores a "plain date" in the UTC parts of a regular `Date`.
6585
+ BaseView.prototype.toPlainDate = function (date) {
6586
+ var result = toUTCDateTime(this.convertDate(date));
6587
+ return result;
6588
+ };
6589
+ // Similar to https://tc39.es/proposal-temporal/docs/plaindatetime.html
6590
+ // Stores a "plain date-time" in the UTC parts of a regular `Date`.
6591
+ BaseView.prototype.toPlainDateTime = function (date, time) {
6592
+ if (!date || !time) {
6593
+ return null;
6594
+ }
6595
+ return this.toPlainDate(dateWithTime(date, time));
6596
+ };
6375
6597
  BaseView.prototype.optionsChange = function (options) {
6376
6598
  this.schedulerEventTemplate = options.eventTemplate;
6377
6599
  this.schedulerGroupHeaderTemplate = options.groupHeaderTemplate;
@@ -6379,6 +6601,8 @@ var BaseView = /** @class */ (function () {
6379
6601
  this.max = options.max;
6380
6602
  this.editable = options.editable;
6381
6603
  this.timezone = options.timezone;
6604
+ this.selectable = options.selectable;
6605
+ this.isSlotSelected = options.isSlotSelected;
6382
6606
  if (!options.changes || anyChanged(['group', 'resources'], options.changes, false) ||
6383
6607
  options.group !== this.group || options.resources !== this.resources) {
6384
6608
  this.group = options.group;
@@ -6405,6 +6629,7 @@ var BaseView = /** @class */ (function () {
6405
6629
  this.toggleElement(true);
6406
6630
  this.reflow();
6407
6631
  this.viewState.notifyLayoutEnd();
6632
+ this.viewState.emitEvent(slotDragEventName.refreshSlotSelection);
6408
6633
  };
6409
6634
  BaseView.prototype.assignResources = function () {
6410
6635
  assignTasksResources(this.tasks, {
@@ -6446,16 +6671,16 @@ var BaseView = /** @class */ (function () {
6446
6671
  });
6447
6672
  };
6448
6673
  BaseView.prototype.onPress = function (args) {
6449
- var resizable = this.editable && this.editable.resize !== false;
6450
- var draggable = this.editable && this.editable.drag !== false;
6674
+ var editResizable = this.editable && this.editable.resize !== false;
6675
+ var editDraggable = this.editable && this.editable.drag !== false;
6451
6676
  var target = args.originalEvent.target;
6452
6677
  if (hasClasses(target, 'k-resize-handle')) {
6453
- if (!resizable) {
6678
+ if (!editResizable) {
6454
6679
  return;
6455
6680
  }
6456
6681
  this.initResize(args);
6457
6682
  }
6458
- else if (draggable) {
6683
+ else if (editDraggable) {
6459
6684
  var task = this.targetTask(target);
6460
6685
  if (task) {
6461
6686
  if (!args.isTouch) {
@@ -6465,6 +6690,10 @@ var BaseView = /** @class */ (function () {
6465
6690
  this.pressTarget = task;
6466
6691
  }
6467
6692
  }
6693
+ var notDraggingEvent = !this.pressTarget;
6694
+ if (notDraggingEvent && this.selectable) {
6695
+ this.initDragSelect(args);
6696
+ }
6468
6697
  this.dragArgs = args;
6469
6698
  };
6470
6699
  BaseView.prototype.onDrag = function (args) {
@@ -6479,12 +6708,15 @@ var BaseView = /** @class */ (function () {
6479
6708
  args.originalEvent.preventDefault();
6480
6709
  this.scrollContainer(this.drag, args);
6481
6710
  }
6711
+ if (this.dragSelecting) {
6712
+ this.dragSelect(args);
6713
+ }
6482
6714
  }
6483
6715
  this.dragArgs = args;
6484
6716
  };
6485
- BaseView.prototype.onRelease = function () {
6717
+ BaseView.prototype.onRelease = function (args) {
6486
6718
  clearInterval(this.scrollInterval);
6487
- var _a = this, resizing = _a.resizing, dragging = _a.dragging;
6719
+ var _a = this, resizing = _a.resizing, dragging = _a.dragging, dragSelecting = _a.dragSelecting;
6488
6720
  if (resizing) {
6489
6721
  this.emitEvent('resizeEnd', {
6490
6722
  event: resizing.task.event,
@@ -6511,6 +6743,20 @@ var BaseView = /** @class */ (function () {
6511
6743
  this.resizing = null;
6512
6744
  this.dragging = null;
6513
6745
  }
6746
+ if (dragSelecting) {
6747
+ var _b = normaliseRangeStartAndEnd(this.dragSelectOrigin, this.dragSelecting), start = _b.start, end = _b.end;
6748
+ var range = {
6749
+ start: this.convertDate(start),
6750
+ end: this.convertDate(end),
6751
+ isAllDay: this.dragSelecting.isDaySlot,
6752
+ resources: this.resourcesByIndex(this.dragSelecting.id.resourceIndex),
6753
+ originalEvent: args.originalEvent
6754
+ };
6755
+ this.viewState.notifySlotSelectionEnd(range);
6756
+ this.dragSelectOrigin = null;
6757
+ this.dragSelecting = null;
6758
+ this.cdr.markForCheck();
6759
+ }
6514
6760
  this.container = null;
6515
6761
  this.dragArgs = null;
6516
6762
  this.pressLocation = null;
@@ -6662,6 +6908,51 @@ var BaseView = /** @class */ (function () {
6662
6908
  this.updateHintContainer();
6663
6909
  }
6664
6910
  };
6911
+ BaseView.prototype.initDragSelect = function (args) {
6912
+ this.updateDragContainer(args);
6913
+ if (!this.containerOffset) {
6914
+ return;
6915
+ }
6916
+ var _a = this.coordinatesOffset(args.pageX, args.pageY), x = _a.x, y = _a.y;
6917
+ var slot = this.slotByPosition(x, y, this.container);
6918
+ if (!slot) {
6919
+ return;
6920
+ }
6921
+ var range = {
6922
+ start: this.convertDate(slot.start),
6923
+ end: this.convertDate(slot.end),
6924
+ isAllDay: slot.isDaySlot,
6925
+ resources: this.resourcesByIndex(slot.id.resourceIndex),
6926
+ originalEvent: args.originalEvent
6927
+ };
6928
+ var slotDragStartEvent = new SlotDragStartEvent(null, range);
6929
+ this.viewState.notifySlotSelectionStart(slotDragStartEvent);
6930
+ if (!slotDragStartEvent.isDefaultPrevented()) {
6931
+ this.dragSelecting = slot;
6932
+ this.dragSelectOrigin = slot;
6933
+ this.cdr.markForCheck();
6934
+ }
6935
+ };
6936
+ BaseView.prototype.dragSelect = function (args) {
6937
+ var _a = this.coordinatesOffset(args.pageX, args.pageY), x = _a.x, y = _a.y;
6938
+ var slot = this.slotByPosition(x, y, this.container);
6939
+ if (!slot) {
6940
+ return;
6941
+ }
6942
+ if (this.dragSelecting !== slot) {
6943
+ this.dragSelecting = slot;
6944
+ var _b = normaliseRangeStartAndEnd(this.dragSelectOrigin, this.dragSelecting), start = _b.start, end = _b.end;
6945
+ var range = {
6946
+ start: this.convertDate(start),
6947
+ end: this.convertDate(end),
6948
+ isAllDay: slot.isDaySlot,
6949
+ resources: this.resourcesByIndex(slot.id.resourceIndex),
6950
+ originalEvent: args.originalEvent
6951
+ };
6952
+ this.viewState.notifySlotSelectionDrag(range);
6953
+ this.cdr.markForCheck();
6954
+ }
6955
+ };
6665
6956
  BaseView.prototype.dragHintClasses = function () {
6666
6957
  var hintClass = this.dragging.hintClass;
6667
6958
  var result = [];
@@ -7153,8 +7444,8 @@ var WEEKS_COUNT = 6;
7153
7444
  */
7154
7445
  var MonthViewRendererComponent = /** @class */ (function (_super) {
7155
7446
  __extends(MonthViewRendererComponent, _super);
7156
- function MonthViewRendererComponent(viewContext, viewState, intl, slotService, zone, element, renderer, pdfService, localization) {
7157
- var _this = _super.call(this, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization) || this;
7447
+ function MonthViewRendererComponent(viewContext, viewState, intl, slotService, zone, element, renderer, pdfService, localization, changeDetector) {
7448
+ var _this = _super.call(this, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector) || this;
7158
7449
  _this.resizeHintFormat = { skeleton: 'Md' };
7159
7450
  _this.weeks = [];
7160
7451
  return _this;
@@ -7210,6 +7501,9 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7210
7501
  MonthViewRendererComponent.prototype.cellTitle = function (value) {
7211
7502
  return this.intl.formatDate(value, 'D');
7212
7503
  };
7504
+ MonthViewRendererComponent.prototype.addDay = function (dayStart) {
7505
+ return addDays(dayStart, 1);
7506
+ };
7213
7507
  MonthViewRendererComponent.prototype.optionsChange = function (changes) {
7214
7508
  this.schedulerMonthDaySlotTemplate = changes.monthDaySlotTemplate;
7215
7509
  _super.prototype.optionsChange.call(this, changes);
@@ -7324,7 +7618,7 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7324
7618
  providers: [
7325
7619
  MonthSlotService
7326
7620
  ],
7327
- template: "\n <div class=\"k-scheduler-layout k-scheduler-monthview k-scheduler-flex-layout\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader *ngIf=\"verticalResources.length\">\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr>\n <th></th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header>\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex\">\n <th *ngFor=\"let day of weeks[0]; trackBy: itemIndex\">\n {{ day | kendoDate: 'EEEE' }}\n </th>\n </ng-container>\n </tr>\n </table>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times k-scheduler-resources\" #times *ngIf=\"verticalResources.length\">\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex\">\n <tr>\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\" [ngClass]=\"{ 'k-last-resource': resourceIndex === verticalResources.length - 1 }\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </th>\n </ng-container>\n <th class=\"k-slot-cell k-empty-slot\">\n </th>\n </tr>\n <tr *ngFor=\"let index of 5 | repeat; trackBy: itemIndex\">\n <th class=\"k-slot-cell k-empty-slot\"></th>\n </tr>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content\" #content>\n <table class=\"k-scheduler-table\" #contentTable role=\"presentation\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex\">\n <tr *ngFor=\"let week of weeks; let rangeIndex = index; trackBy: itemIndex\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex\">\n <td *ngFor=\"let day of week; let index = index; trackBy: itemIndex\"\n monthSlot\n [ngClass]=\"daySlotClass(day, verticalResources.length ? verticalIndex : horizontalIndex)\"\n [start]=\"day\"\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n [title]=\"cellTitle(day)\"\n >\n <span aria-hidden=\"true\" class=\"k-link k-nav-day\" *ngIf=\"!monthDaySlotTemplateRef\" >{{ day | kendoDate: 'dd' }}</span>\n <ng-container *ngIf=\"monthDaySlotTemplateRef\" [ngTemplateOutlet]=\"monthDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: day, resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex) }\"></ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n monthViewItem\n [editable]=\"editable\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngFor=\"let hint of dragHints; trackBy: itemIndex;\"\n class=\"k-event-drag-hint\"\n monthViewItem\n [ngStyle]=\"hint.style\"\n [ngClass]=\"hint.class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"hint.item\"\n [resources]=\"hint.resources\">\n </div>\n\n <div *ngFor=\"let hint of resizeHints; trackBy: itemIndex;\"\n kendoResizeHint\n [hint]=\"hint\"\n [ngClass]=\"hint.class\"\n [format]=\"resizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
7621
+ template: "\n <div class=\"k-scheduler-layout k-scheduler-monthview k-scheduler-flex-layout\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader *ngIf=\"verticalResources.length\">\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr>\n <th></th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header>\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex\">\n <th *ngFor=\"let day of weeks[0]; trackBy: itemIndex\">\n {{ day | kendoDate: 'EEEE' }}\n </th>\n </ng-container>\n </tr>\n </table>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times k-scheduler-resources\" #times *ngIf=\"verticalResources.length\">\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex\">\n <tr>\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\" [ngClass]=\"{ 'k-last-resource': resourceIndex === verticalResources.length - 1 }\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </th>\n </ng-container>\n <th class=\"k-slot-cell k-empty-slot\">\n </th>\n </tr>\n <tr *ngFor=\"let index of 5 | repeat; trackBy: itemIndex\">\n <th class=\"k-slot-cell k-empty-slot\"></th>\n </tr>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content\" #content>\n <table class=\"k-scheduler-table k-user-select-none\" #contentTable role=\"presentation\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex\">\n <tr *ngFor=\"let week of weeks; let rangeIndex = index; trackBy: itemIndex\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex\">\n <td *ngFor=\"let day of week; let index = index; trackBy: itemIndex\"\n monthSlot\n [ngClass]=\"daySlotClass(day, verticalResources.length ? verticalIndex : horizontalIndex)\"\n [start]=\"day\"\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n [title]=\"cellTitle(day)\"\n [class.k-state-selected]=\"isSlotSelected({\n start: toPlainDate(day),\n end: addDay(toPlainDate(day)),\n isAllDay: true,\n resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)\n })\"\n >\n <span aria-hidden=\"true\" class=\"k-link k-nav-day\" *ngIf=\"!monthDaySlotTemplateRef\">{{ day | kendoDate: 'dd' }}</span>\n <ng-container *ngIf=\"monthDaySlotTemplateRef\" [ngTemplateOutlet]=\"monthDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: day, resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex) }\"></ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n monthViewItem\n [editable]=\"editable\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngFor=\"let hint of dragHints; trackBy: itemIndex;\"\n class=\"k-event-drag-hint\"\n monthViewItem\n [ngStyle]=\"hint.style\"\n [ngClass]=\"hint.class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"hint.item\"\n [resources]=\"hint.resources\">\n </div>\n\n <div *ngFor=\"let hint of resizeHints; trackBy: itemIndex;\"\n kendoResizeHint\n [hint]=\"hint\"\n [ngClass]=\"hint.class\"\n [format]=\"resizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
7328
7622
  }),
7329
7623
  __metadata("design:paramtypes", [ViewContextService,
7330
7624
  ViewStateService,
@@ -7334,7 +7628,8 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7334
7628
  ElementRef,
7335
7629
  Renderer2,
7336
7630
  PDFService,
7337
- LocalizationService])
7631
+ LocalizationService,
7632
+ ChangeDetectorRef])
7338
7633
  ], MonthViewRendererComponent);
7339
7634
  return MonthViewRendererComponent;
7340
7635
  }(BaseView));
@@ -7570,7 +7865,7 @@ var ViewFooterComponent = /** @class */ (function () {
7570
7865
  Component({
7571
7866
  // tslint:disable-next-line:component-selector
7572
7867
  selector: '[viewFooter]',
7573
- template: "\n <button type=\"button\" class=\"k-button\" *ngFor=\"let item of items\" [ngClass]=\"item.cssClass\" (click)=\"onItemClick($event, item)\">\n <span class=\"k-button-icon k-icon\" [ngClass]=\"item.iconClass\"></span>\n <span class=\"k-button-text\">{{ item.text }}</span>\n </button>\n "
7868
+ template: "\n <button type=\"button\" kendoButton *ngFor=\"let item of items\" [ngClass]=\"item.cssClass\" (click)=\"onItemClick($event, item)\">\n <span class=\"k-button-icon k-icon\" [ngClass]=\"item.iconClass\"></span>\n <span class=\"k-button-text\">{{ item.text }}</span>\n </button>\n "
7574
7869
  })
7575
7870
  ], ViewFooterComponent);
7576
7871
  return ViewFooterComponent;
@@ -7822,7 +8117,7 @@ var ViewsSharedModule = /** @class */ (function () {
7822
8117
  }
7823
8118
  ViewsSharedModule = __decorate([
7824
8119
  NgModule({
7825
- imports: [CommonModule, IntlModule, SharedModule],
8120
+ imports: [CommonModule, IntlModule, SharedModule, ButtonsModule],
7826
8121
  exports: [
7827
8122
  DECLARATIONS,
7828
8123
  IntlModule,
@@ -9205,7 +9500,7 @@ var getNextDate = function (date, count, numberOfDays) { return getDate(addDays(
9205
9500
  var DayTimeViewComponent = /** @class */ (function (_super) {
9206
9501
  __extends(DayTimeViewComponent, _super);
9207
9502
  function DayTimeViewComponent(changeDetector, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization) {
9208
- var _this = _super.call(this, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization) || this;
9503
+ var _this = _super.call(this, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector) || this;
9209
9504
  _this.changeDetector = changeDetector;
9210
9505
  _this.numberOfDays = 1;
9211
9506
  _this.startTime = '00:00';
@@ -9741,8 +10036,8 @@ var MultiDayViewRendererComponent = /** @class */ (function (_super) {
9741
10036
  }
9742
10037
  _super.prototype.updateHintContainer.call(this);
9743
10038
  };
9744
- MultiDayViewRendererComponent.prototype.onRelease = function () {
9745
- _super.prototype.onRelease.call(this);
10039
+ MultiDayViewRendererComponent.prototype.onRelease = function (args) {
10040
+ _super.prototype.onRelease.call(this, args);
9746
10041
  this.dragContainers = null;
9747
10042
  };
9748
10043
  MultiDayViewRendererComponent.prototype.updateDragContainer = function (args) {
@@ -9871,7 +10166,7 @@ var MultiDayViewRendererComponent = /** @class */ (function (_super) {
9871
10166
  providers: [
9872
10167
  DayTimeSlotService
9873
10168
  ],
9874
- template: "\n <div class=\"k-scheduler-layout k-scheduler-flex-layout\" [ngClass]=\"classNames\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; trackBy: itemIndex;\">\n <th></th>\n </tr>\n <tr>\n <th>\u200B</th>\n </tr>\n <tr *ngIf=\"!verticalResources.length\">\n <th class=\"k-scheduler-times-all-day\" #allDayCell>{{ allDayMessage }}</th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header>\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\">\n <th *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\">\n <span *ngIf=\"!dateHeaderTemplateRef\" class=\"k-link k-nav-day\" [attr.data-dayslot-index]=\"index\">{{ slot.start | kendoDate: dateFormat }}</span>\n <ng-container *ngIf=\"dateHeaderTemplateRef\" [ngTemplateOutlet]=\"dateHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\"></ng-container>\n </th>\n </ng-container>\n </tr>\n </table>\n <div style=\"position: relative;\" *ngIf=\"!verticalResources.length\">\n <table class=\"k-scheduler-table k-scheduler-header-all-day\" aria-hidden=\"true\">\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\"\n daySlot\n [start]=\"slot.start\"\n [end]=\"slot.end\"\n [id]=\"{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }\"\n [ngClass]=\"allDaySlotClass(slot, resourceIndex)\">\n <ng-container *ngIf=\"allDaySlotTemplateRef\" [ngTemplateOutlet]=\"allDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: slot.start, resources: resourcesByIndex(resourceIndex) }\"></ng-container>\n </td>\n </ng-container>\n </tr>\n </table>\n <ng-container *ngFor=\"let item of allDayItems | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources, true)\"\n [ngStyle]=\"getEventStyles(item, itemResource, true)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [editable]=\"editable\"\n [eventTemplate]=\"allDayEventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #headerHintContainer>\n <ng-template>\n <div *ngIf=\"dragHints.length && allDayDragHint\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [ngStyle]=\"dragHints[0].style\"\n [ngClass]=\"dragHints[0].class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"dragHints[0].item\"\n [resources]=\"dragHints[0].resources\">\n </div>\n\n <div *ngIf=\"resizeHints.length && allDayResizeHint\"\n kendoResizeHint\n [hint]=\"resizeHints[0]\"\n [ngClass]=\"resizeHints[0].class\"\n [format]=\"allDayResizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #times>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of verticalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeArrow class=\"k-current-time k-current-time-arrow-right\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;\">\n <tr *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </th>\n </ng-container>\n <th class=\"k-scheduler-times-all-day\" #allDayCell>{{ allDayMessage }}</th>\n </tr>\n <tr *ngFor=\"let slot of timeSlots; let timeSlotIndex = index;trackBy: itemIndex\">\n <th *ngIf=\"slot.isMajor\" [ngClass]=\"{ 'k-slot-cell': slotDivisions === 1 }\">\n <ng-container *ngIf=\"!majorTimeHeaderTemplateRef\">{{ slot.start | kendoDate: 't' }}</ng-container>\n <ng-container *ngIf=\"majorTimeHeaderTemplateRef\" [ngTemplateOutlet]=\"majorTimeHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\"></ng-container>\n </th>\n <th *ngIf=\"!slot.isMajor\" [ngClass]=\"{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }\">\n <ng-container *ngIf=\"minorTimeHeaderTemplateRef\" [ngTemplateOutlet]=\"minorTimeHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\">\n </ng-container>\n </th>\n </tr>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content\" #content>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of verticalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeMarker class=\"k-current-time\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" #contentTable role=\"presentation\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;\">\n <tr class=\"k-scheduler-header-all-day\" *ngIf=\"verticalResources.length\">\n <td *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\"\n daySlot\n [start]=\"slot.start\"\n [end]=\"slot.end\"\n [id]=\"{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }\">\n <ng-container *ngIf=\"allDaySlotTemplateRef\" [ngTemplateOutlet]=\"allDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: slot.start, resources: resourcesByIndex(verticalIndex) }\"></ng-container>\n </td>\n </tr>\n <tr *ngFor=\"let slot of timeSlots; index as index; trackBy: itemIndex\" [class.k-middle-row]=\"slot.isMajor\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let daySlot of daySlots; index as rangeIndex; trackBy: itemIndex\"\n [ngClass]=\"timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)\"\n timeSlot #timeSlot=\"timeSlot\"\n [date]=\"daySlot.start\"\n [invariantStart]=\"slot.start\"\n [invariantEnd]=\"slot.end\"\n [workDayStart]=\"workDayStartTime\"\n [workDayEnd]=\"workDayEndTime\"\n [workWeekStart]=\"workWeekStart\"\n [workWeekEnd]=\"workWeekEnd\"\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n >\n <ng-container *ngIf=\"timeSlotTemplateRef\" [ngTemplateOutlet]=\"timeSlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }\">\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [editable]=\"editable\"\n [vertical]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <ng-container *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let item of allDayItems | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources, true)\"\n [ngStyle]=\"getEventStyles(item, itemResource, true)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [editable]=\"editable\"\n [eventTemplate]=\"allDayEventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngIf=\"dragHints.length && (!allDayDragHint || verticalResources.length)\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [isAllDay]=\"allDayDragHint\"\n [ngStyle]=\"dragHints[0].style\"\n [ngClass]=\"dragHints[0].class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"dragHints[0].resources\"\n [item]=\"dragHints[0].item\">\n </div>\n\n <ng-container *ngIf=\"resizeHints.length && (!allDayResizeHint || verticalResources.length)\">\n <div *ngFor=\"let hint of resizeHints; trackBy: itemIndex;\"\n kendoResizeHint\n [hint]=\"hint\"\n [ngClass]=\"hint.class\"\n [format]=\"allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat\">\n </div>\n </ng-container>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
10169
+ template: "\n <div class=\"k-scheduler-layout k-scheduler-flex-layout\" [ngClass]=\"classNames\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; trackBy: itemIndex;\">\n <th></th>\n </tr>\n <tr>\n <th>\u200B</th>\n </tr>\n <tr *ngIf=\"!verticalResources.length\">\n <th class=\"k-scheduler-times-all-day\" #allDayCell>{{ allDayMessage }}</th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header>\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\">\n <th *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\">\n <span *ngIf=\"!dateHeaderTemplateRef\" class=\"k-link k-nav-day\" [attr.data-dayslot-index]=\"index\">{{ slot.start | kendoDate: dateFormat }}</span>\n <ng-container *ngIf=\"dateHeaderTemplateRef\" [ngTemplateOutlet]=\"dateHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\"></ng-container>\n </th>\n </ng-container>\n </tr>\n </table>\n <div style=\"position: relative;\" *ngIf=\"!verticalResources.length\">\n <table class=\"k-scheduler-table k-scheduler-header-all-day k-user-select-none\" aria-hidden=\"true\">\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\"\n daySlot\n [start]=\"slot.start\"\n [end]=\"slot.end\"\n [id]=\"{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }\"\n [class.k-state-selected]=\"isSlotSelected({\n start: toPlainDate(slot.start),\n end: toPlainDate(slot.end),\n isAllDay: true,\n resources: resourcesByIndex(resourceIndex)\n })\"\n [ngClass]=\"allDaySlotClass(slot, resourceIndex)\">\n <ng-container *ngIf=\"allDaySlotTemplateRef\" [ngTemplateOutlet]=\"allDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: slot.start, resources: resourcesByIndex(resourceIndex) }\"></ng-container>\n </td>\n </ng-container>\n </tr>\n </table>\n <ng-container *ngFor=\"let item of allDayItems | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources, true)\"\n [ngStyle]=\"getEventStyles(item, itemResource, true)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [editable]=\"editable\"\n [eventTemplate]=\"allDayEventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #headerHintContainer>\n <ng-template>\n <div *ngIf=\"dragHints.length && allDayDragHint\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [ngStyle]=\"dragHints[0].style\"\n [ngClass]=\"dragHints[0].class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"dragHints[0].item\"\n [resources]=\"dragHints[0].resources\">\n </div>\n\n <div *ngIf=\"resizeHints.length && allDayResizeHint\"\n kendoResizeHint\n [hint]=\"resizeHints[0]\"\n [ngClass]=\"resizeHints[0].class\"\n [format]=\"allDayResizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #times>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of verticalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeArrow class=\"k-current-time k-current-time-arrow-right\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;\">\n <tr *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </th>\n </ng-container>\n <th class=\"k-scheduler-times-all-day\" #allDayCell>{{ allDayMessage }}</th>\n </tr>\n <tr *ngFor=\"let slot of timeSlots; let timeSlotIndex = index;trackBy: itemIndex\">\n <th *ngIf=\"slot.isMajor\" [ngClass]=\"{ 'k-slot-cell': slotDivisions === 1 }\">\n <ng-container *ngIf=\"!majorTimeHeaderTemplateRef\">{{ slot.start | kendoDate: 't' }}</ng-container>\n <ng-container *ngIf=\"majorTimeHeaderTemplateRef\" [ngTemplateOutlet]=\"majorTimeHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\"></ng-container>\n </th>\n <th *ngIf=\"!slot.isMajor\" [ngClass]=\"{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }\">\n <ng-container *ngIf=\"minorTimeHeaderTemplateRef\" [ngTemplateOutlet]=\"minorTimeHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: slot.start }\">\n </ng-container>\n </th>\n </tr>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content k-user-select-none\" #content>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of verticalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeMarker class=\"k-current-time\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" #contentTable role=\"presentation\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;\">\n <tr class=\"k-scheduler-header-all-day\" *ngIf=\"verticalResources.length\">\n <td *ngFor=\"let slot of daySlots; let index = index; trackBy: itemIndex\"\n daySlot\n [start]=\"slot.start\"\n [end]=\"slot.end\"\n [class.k-state-selected]=\"isSlotSelected({\n start: toPlainDate(slot.start),\n end: toPlainDate(slot.end),\n isAllDay: true,\n resources: resourcesByIndex(verticalIndex)\n })\"\n [id]=\"{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }\">\n <ng-container *ngIf=\"allDaySlotTemplateRef\" [ngTemplateOutlet]=\"allDaySlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: slot.start, resources: resourcesByIndex(verticalIndex) }\"></ng-container>\n </td>\n </tr>\n <tr *ngFor=\"let slot of timeSlots; index as index; trackBy: itemIndex\" [class.k-middle-row]=\"slot.isMajor\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let daySlot of daySlots; index as rangeIndex; trackBy: itemIndex\"\n [ngClass]=\"timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)\"\n timeSlot #timeSlot=\"timeSlot\"\n [date]=\"daySlot.start\"\n [invariantStart]=\"slot.start\"\n [invariantEnd]=\"slot.end\"\n [workDayStart]=\"workDayStartTime\"\n [workDayEnd]=\"workDayEndTime\"\n [workWeekStart]=\"workWeekStart\"\n [workWeekEnd]=\"workWeekEnd\"\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n [class.k-state-selected]=\"isSlotSelected({\n start: toPlainDateTime(daySlot.start, slot.start),\n end: toPlainDateTime(daySlot.start, slot.end),\n isAllDay: false,\n resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)\n })\"\n >\n <ng-container *ngIf=\"timeSlotTemplateRef\" [ngTemplateOutlet]=\"timeSlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }\">\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [editable]=\"editable\"\n [vertical]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <ng-container *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let item of allDayItems | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources, true)\"\n [ngStyle]=\"getEventStyles(item, itemResource, true)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [isAllDay]=\"true\"\n [editable]=\"editable\"\n [eventTemplate]=\"allDayEventTemplateRef\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngIf=\"dragHints.length && (!allDayDragHint || verticalResources.length)\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [isAllDay]=\"allDayDragHint\"\n [ngStyle]=\"dragHints[0].style\"\n [ngClass]=\"dragHints[0].class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"dragHints[0].resources\"\n [item]=\"dragHints[0].item\">\n </div>\n\n <ng-container *ngIf=\"resizeHints.length && (!allDayResizeHint || verticalResources.length)\">\n <div *ngFor=\"let hint of resizeHints; trackBy: itemIndex;\"\n kendoResizeHint\n [hint]=\"hint\"\n [ngClass]=\"hint.class\"\n [format]=\"allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat\">\n </div>\n </ng-container>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
9875
10170
  }),
9876
10171
  __metadata("design:paramtypes", [LocalizationService,
9877
10172
  ViewContextService,
@@ -10116,7 +10411,7 @@ var DayTimeModule = /** @class */ (function () {
10116
10411
  }
10117
10412
  DayTimeModule = __decorate([
10118
10413
  NgModule({
10119
- imports: [CommonModule, SharedModule],
10414
+ imports: [CommonModule, SharedModule, ViewsSharedModule],
10120
10415
  exports: [
10121
10416
  DIRECTIVES
10122
10417
  ],
@@ -10366,7 +10661,7 @@ var TimelineMultiDayViewComponent = /** @class */ (function (_super) {
10366
10661
  providers: [
10367
10662
  DayTimeSlotService
10368
10663
  ],
10369
- template: "\n <div class=\"k-scheduler-layout k-scheduler-flex-layout\" [ngClass]=\"classNames\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr><th></th></tr>\n <tr><th class=\"k-slot-cell\"></th></tr>\n <tr *ngFor=\"let resource of horizontalResources; trackBy: itemIndex;\">\n <th></th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header >\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeArrow class=\"k-current-time k-current-time-arrow-down\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <colgroup>\n <col *ngFor=\"let slotIndex of slotsCount | repeat; trackBy: itemIndex;\" [ngStyle]=\"{ 'width.px': columnWidth }\" />\n </colgroup>\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let index = index; trackBy: itemIndex;\">\n <th [attr.colspan]=\"timeSlots.length\" class=\"k-slot-cell\">\n <span *ngIf=\"!dateHeaderTemplateRef\" class=\"k-link\" [ngClass]=\"{ 'k-nav-day': numberOfDays > 1 }\" [attr.data-dayslot-index]=\"index\">{{ daySlot.start | kendoDate: 'm'}}</span>\n <ng-container *ngIf=\"dateHeaderTemplateRef\" [ngTemplateOutlet]=\"dateHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: daySlot.start }\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let rangeIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let timeSlot of timeSlots; let index = index; trackBy: itemIndex;\">\n <th *ngIf=\"timeSlot.isMajor\" [attr.colspan]=\"timeColspan(index)\" >{{ timeSlot.start | kendoDate: 't' }}</th>\n </ng-container>\n </ng-container>\n </ng-container>\n </tr>\n </table>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #times>\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <tr *ngIf=\"!verticalResources.length\">\n <th rowspan=\"1\" #titleCell>\n {{ allEventsMessage }}\n </th>\n </tr>\n <ng-container *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;\">\n <tr #verticalResourceRows>\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\">\n <div>\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </div>\n </th>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content\" #content>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\"\n class=\"k-current-time\" #currentTimeMarker>\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" #contentTable role=\"presentation\">\n <colgroup>\n <col *ngFor=\"let slotIndex of slotsCount | repeat; trackBy: itemIndex;\" [ngStyle]=\"{ 'width.px': columnWidth }\" />\n </colgroup>\n <tr *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let rangeIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let slot of timeSlots; let index = index; trackBy: itemIndex;\"\n [ngClass]=\"timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)\"\n timeSlot #timeSlot=\"timeSlot\"\n [date]=\"daySlot.start\"\n [invariantStart]=\"slot.start\"\n [invariantEnd]=\"slot.end\"\n [workDayStart]=\"workDayStartTime\"\n [workDayEnd]=\"workDayEndTime\"\n [workWeekStart]=\"workWeekStart\"\n [workWeekEnd]=\"workWeekEnd\"\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n >\n <ng-container *ngIf=\"timeSlotTemplateRef\" [ngTemplateOutlet]=\"timeSlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: timeSlot.start, resources: resourcesByIndex(timeSlot.id.resourceIndex ) }\">\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n </tr>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [editable]=\"editable\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngFor=\"let hint of dragHints; trackBy: itemIndex;\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [ngStyle]=\"hint.style\"\n [ngClass]=\"hint.class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"hint.item\"\n [resources]=\"hint.resources\">\n </div>\n <div *ngIf=\"resizeHints && resizeHints.length\"\n kendoResizeHint\n [hint]=\"resizeHints[0]\"\n [ngClass]=\"resizeHints[0].class\"\n [format]=\"resizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
10664
+ template: "\n <div class=\"k-scheduler-layout k-scheduler-flex-layout\" [ngClass]=\"classNames\">\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #timesHeader>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <tr><th></th></tr>\n <tr><th class=\"k-slot-cell\"></th></tr>\n <tr *ngFor=\"let resource of horizontalResources; trackBy: itemIndex;\">\n <th></th>\n </tr>\n </table>\n </div>\n <div class=\"k-scheduler-header k-state-default\" #header >\n <div class=\"k-scheduler-header-wrap\" #headerWrap>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\"\n #currentTimeArrow class=\"k-current-time k-current-time-arrow-down\">\n </div>\n </ng-container>\n <table class=\"k-scheduler-table\" aria-hidden=\"true\">\n <colgroup>\n <col *ngFor=\"let slotIndex of slotsCount | repeat; trackBy: itemIndex;\" [ngStyle]=\"{ 'width.px': columnWidth }\" />\n </colgroup>\n <tr *ngFor=\"let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngFor=\"let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;\"\n class=\"k-slot-cell\" [attr.colspan]=\"horizontalColspan(resourceIndex)\">\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(item, resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: item }\"></ng-container>\n </th>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let index = index; trackBy: itemIndex;\">\n <th [attr.colspan]=\"timeSlots.length\" class=\"k-slot-cell\">\n <span *ngIf=\"!dateHeaderTemplateRef\" class=\"k-link\" [ngClass]=\"{ 'k-nav-day': numberOfDays > 1 }\" [attr.data-dayslot-index]=\"index\">{{ daySlot.start | kendoDate: 'm'}}</span>\n <ng-container *ngIf=\"dateHeaderTemplateRef\" [ngTemplateOutlet]=\"dateHeaderTemplateRef\" [ngTemplateOutletContext]=\"{ date: daySlot.start }\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n </tr>\n <tr>\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let rangeIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let timeSlot of timeSlots; let index = index; trackBy: itemIndex;\">\n <th *ngIf=\"timeSlot.isMajor\" [attr.colspan]=\"timeColspan(index)\" >{{ timeSlot.start | kendoDate: 't' }}</th>\n </ng-container>\n </ng-container>\n </ng-container>\n </tr>\n </table>\n </div>\n </div>\n </div>\n <div class=\"k-scheduler-pane\">\n <div class=\"k-scheduler-times\" #times>\n <table class=\"k-scheduler-table\" #timesTable aria-hidden=\"true\">\n <tr *ngIf=\"!verticalResources.length\">\n <th rowspan=\"1\" #titleCell>\n {{ allEventsMessage }}\n </th>\n </tr>\n <ng-container *ngIf=\"verticalResources.length\">\n <ng-container *ngFor=\"let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;\">\n <tr #verticalResourceRows>\n <ng-container *ngFor=\"let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;\">\n <th *ngIf=\"verticalItem(leafIndex, resourceIndex)\" [attr.rowspan]=\"verticalRowspan(resourceIndex)\" class=\"k-slot-cell\">\n <div>\n <ng-container *ngIf=\"!groupHeaderTemplateRef\">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>\n <ng-container *ngIf=\"groupHeaderTemplateRef\" [ngTemplateOutlet]=\"groupHeaderTemplateRef\"\n [ngTemplateOutletContext]=\"{ resource: verticalItem(leafIndex, resourceIndex) }\"></ng-container>\n </div>\n </th>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </table>\n </div>\n <div class=\"k-scheduler-content\" #content>\n <ng-container *ngIf=\"showCurrentTime\">\n <div *ngFor=\"let resource of horizontalResources | resourceIterator; trackBy: itemIndex;\"\n class=\"k-current-time\" #currentTimeMarker>\n </div>\n </ng-container>\n <table class=\"k-scheduler-table k-user-select-none\" #contentTable role=\"presentation\">\n <colgroup>\n <col *ngFor=\"let slotIndex of slotsCount | repeat; trackBy: itemIndex;\" [ngStyle]=\"{ 'width.px': columnWidth }\" />\n </colgroup>\n <tr *ngFor=\"let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;\">\n <ng-container *ngFor=\"let daySlot of daySlots; let rangeIndex = index; trackBy: itemIndex;\">\n <td *ngFor=\"let slot of timeSlots; let index = index; trackBy: itemIndex;\"\n [ngClass]=\"timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)\"\n timeSlot #timeSlot=\"timeSlot\"\n [date]=\"daySlot.start\"\n [invariantStart]=\"slot.start\"\n [invariantEnd]=\"slot.end\"\n [workDayStart]=\"workDayStartTime\"\n [workDayEnd]=\"workDayEndTime\"\n [workWeekStart]=\"workWeekStart\"\n [workWeekEnd]=\"workWeekEnd\"\n selectableSlot\n [id]=\"{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }\"\n [class.k-state-selected]=\"isSlotSelected({\n start: toPlainDateTime(daySlot.start, slot.start),\n end: toPlainDateTime(daySlot.start, slot.end),\n isAllDay: false,\n resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)\n })\"\n >\n <ng-container *ngIf=\"timeSlotTemplateRef\" [ngTemplateOutlet]=\"timeSlotTemplateRef\"\n [ngTemplateOutletContext]=\"{ date: timeSlot.start, resources: resourcesByIndex(timeSlot.id.resourceIndex ) }\">\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n </tr>\n </table>\n <ng-container *ngFor=\"let item of items | async; trackBy: itemIndex;\">\n <div *ngFor=\"let itemResource of item.resources; trackBy: itemIndex;\"\n [ngClass]=\"getEventClasses(item, itemResource.resources)\"\n [ngStyle]=\"getEventStyles(item, itemResource)\"\n [kendoSchedulerFocusIndex]=\"itemResource.leafIdx\"\n dayTimeViewItem\n [editable]=\"editable\"\n [item]=\"item\"\n [index]=\"item.index\"\n [rangeIndex]=\"item.rangeIndex\"\n [eventTemplate]=\"eventTemplateRef\"\n [resources]=\"itemResource.resources\"\n [resourceIndex]=\"itemResource.leafIdx\">\n </div>\n </ng-container>\n <kendo-hint-container #hintContainer>\n <ng-template>\n <div *ngFor=\"let hint of dragHints; trackBy: itemIndex;\"\n class=\"k-event-drag-hint\"\n dayTimeViewItem\n [ngStyle]=\"hint.style\"\n [ngClass]=\"hint.class\"\n [dragHint]=\"true\"\n [eventTemplate]=\"eventTemplateRef\"\n [item]=\"hint.item\"\n [resources]=\"hint.resources\">\n </div>\n <div *ngIf=\"resizeHints && resizeHints.length\"\n kendoResizeHint\n [hint]=\"resizeHints[0]\"\n [ngClass]=\"resizeHints[0].class\"\n [format]=\"resizeHintFormat\">\n </div>\n </ng-template>\n </kendo-hint-container>\n </div>\n </div>\n </div>\n "
10370
10665
  }),
10371
10666
  __metadata("design:paramtypes", [LocalizationService,
10372
10667
  ChangeDetectorRef,
@@ -11588,7 +11883,7 @@ var EditDialogComponent = /** @class */ (function () {
11588
11883
  EditDialogComponent = __decorate([
11589
11884
  Component({
11590
11885
  selector: 'kendo-scheduler-edit-dialog',
11591
- template: "\n <kendo-dialog (close)='onClose()' [minWidth]='700' *ngIf='isActive' title='{{ textFor(\"editorTitle\") }}' class='k-scheduler-edit-dialog' [autoFocusedElement]=\"autoFocusedElement\">\n <ng-container *ngIf='!editTemplate'>\n <div class='k-scheduler-edit-form'>\n <div class='k-edit-form-container'>\n <form novalidate [formGroup]='formGroup'>\n <div class='k-edit-label'>\n <label for='k-event-title'>{{ textFor('editorEventTitle') }}</label>\n </div>\n <div class='k-edit-field'>\n <input #title id='k-event-title' class='k-textbox' placeholder='Title' [formControl]='formGroup.get(fields.title)' />\n </div>\n\n <div class='k-edit-label'>\n <label (click)=\"startDateTimePicker.focus()\">{{ textFor('editorEventStart') }}</label>\n </div>\n <div class='k-edit-field'>\n <kendo-scheduler-datetime-picker #startDateTimePicker [formControl]='formGroup.get(fields.start)'\n [isAllDay]='getFormValue(fields.isAllDay)?.value'>\n </kendo-scheduler-datetime-picker>\n </div>\n\n <ng-container *ngIf=\"isStartTimeZoneVisible\">\n <div class='k-edit-label'>\n <label (click)=\"startTzPicker.focus()\">{{ textFor('editorEventStartTimeZone') }}</label>\n </div>\n\n <div class='k-edit-field'>\n <kendo-timezone-editor #startTzPicker [formControl]='formGroup.get(fields.startTimezone)'></kendo-timezone-editor>\n </div>\n </ng-container>\n\n <div class='k-edit-label'>\n <label (click)=\"endDateTimePicker.focus()\">{{ textFor('editorEventEnd') }}</label>\n </div>\n <div class='k-edit-field'>\n <kendo-scheduler-datetime-picker #endDateTimePicker [formControl]='formGroup.get(fields.end)'\n [isAllDay]='getFormValue(fields.isAllDay)?.value'>\n </kendo-scheduler-datetime-picker>\n </div>\n\n <ng-container *ngIf=\"isEndTimeZoneVisible\">\n <div class='k-edit-label'>\n <label (click)=\"endTzPicker.focus()\">{{ textFor('editorEventEndTimeZone') }}</label>\n </div>\n\n <div class='k-edit-field'>\n <kendo-timezone-editor #endTzPicker [formControl]='formGroup.get(fields.endTimezone)'></kendo-timezone-editor>\n </div>\n </ng-container>\n\n <div class='k-edit-field' *ngIf=\"hasAllDay\">\n <input type='checkbox' id='k-is-allday-chkbox' class='k-checkbox' [formControl]='formGroup.get(fields.isAllDay)' />\n <label class='k-checkbox-label' for='k-is-allday-chkbox'>{{ textFor('editorEventAllDay') }}</label>\n </div>\n\n <div class='k-edit-field' *ngIf=\"hasStartTimeZone\">\n <input type='checkbox' id='k-set-timezone' class='k-checkbox'\n formControlName='startTimezoneCheckbox' />\n <label class='k-checkbox-label' for='k-set-timezone'>{{ textFor('editorEventTimeZone') }}</label>\n\n <ng-container *ngIf=\"isStartTimeZoneVisible && hasEndTimeZone\">\n <input type='checkbox' id='k-use-separate' class='k-checkbox' formControlName='endTimezoneCheckbox' />\n <label class='k-checkbox-label' for='k-use-separate'>{{ textFor('editorEventSeparateTimeZones') }}</label>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isEditingSeries\">\n <kendo-recurrence-editor\n [formControl]='formGroup.get(fields.recurrenceRule)'\n [start]='recurrenceStart'\n [timezone]='eventTimezone'\n [weekStart]='weekStart'\n ></kendo-recurrence-editor>\n </ng-container>\n\n <ng-container *ngIf='getFormValue(fields.description)'>\n <div class='k-edit-label'>\n <label for='k-event-description'>{{ textFor('editorEventDescription') }}</label>\n </div>\n <div class='k-edit-field'>\n <textarea id='k-event-description' class='k-textbox' [formControl]='formGroup.get(fields.description)'></textarea>\n </div>\n </ng-container>\n\n <ng-container *ngFor='let resource of resources'>\n <ng-container *ngIf='getFormValue(resource.field)'>\n <div class='k-edit-label'>\n <label (click)=\"onResourceClick(resource)\">\n {{ resource.name ? resource.name : resource.field }}\n </label>\n </div>\n <div class='k-edit-field'>\n <kendo-multiple-resource-editor\n *ngIf='resource.multiple'\n [formControl]='formGroup.get(resource.field)'\n [resource]='resource'>\n </kendo-multiple-resource-editor>\n <kendo-single-resource-editor\n *ngIf='!resource.multiple'\n [formControl]='formGroup.get(resource.field)'\n [resource]='resource'>\n </kendo-single-resource-editor>\n </div>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf='editTemplate'>\n <form novalidate [formGroup]='formGroup'>\n <ng-container [ngTemplateOutlet]='editTemplate.templateRef'\n [ngTemplateOutletContext]=\"{\n $implicit: formGroup,\n formGroup: formGroup,\n dataItem: editedEvent,\n editMode: editMode,\n isNew: isNew\n }\">\n </ng-container>\n </form>\n </ng-container>\n\n <kendo-dialog-actions>\n <button class=\"k-button\" (click)=\"onCancel($event)\">{{ textFor('cancel') }}</button>\n <button class=\"k-button k-primary\" (click)=\"onSave($event)\" [disabled]=\"!formGroup.valid\">{{ textFor('save') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
11886
+ template: "\n <kendo-dialog (close)='onClose()' [minWidth]='700' *ngIf='isActive' title='{{ textFor(\"editorTitle\") }}' class='k-scheduler-edit-dialog' [autoFocusedElement]=\"autoFocusedElement\">\n <ng-container *ngIf='!editTemplate'>\n <div class='k-scheduler-edit-form'>\n <div class='k-edit-form-container'>\n <form novalidate [formGroup]='formGroup'>\n <div class='k-edit-label'>\n <label for='k-event-title'>{{ textFor('editorEventTitle') }}</label>\n </div>\n <div class='k-edit-field'>\n <input #title id='k-event-title' kendoTextBox placeholder='Title' [formControl]='formGroup.get(fields.title)' />\n </div>\n\n <div class='k-edit-label'>\n <label (click)=\"startDateTimePicker.focus()\">{{ textFor('editorEventStart') }}</label>\n </div>\n <div class='k-edit-field'>\n <kendo-scheduler-datetime-picker #startDateTimePicker [formControl]='formGroup.get(fields.start)'\n [isAllDay]='getFormValue(fields.isAllDay)?.value'>\n </kendo-scheduler-datetime-picker>\n </div>\n\n <ng-container *ngIf=\"isStartTimeZoneVisible\">\n <div class='k-edit-label'>\n <label (click)=\"startTzPicker.focus()\">{{ textFor('editorEventStartTimeZone') }}</label>\n </div>\n\n <div class='k-edit-field'>\n <kendo-timezone-editor #startTzPicker [formControl]='formGroup.get(fields.startTimezone)'></kendo-timezone-editor>\n </div>\n </ng-container>\n\n <div class='k-edit-label'>\n <label (click)=\"endDateTimePicker.focus()\">{{ textFor('editorEventEnd') }}</label>\n </div>\n <div class='k-edit-field'>\n <kendo-scheduler-datetime-picker #endDateTimePicker [formControl]='formGroup.get(fields.end)'\n [isAllDay]='getFormValue(fields.isAllDay)?.value'>\n </kendo-scheduler-datetime-picker>\n </div>\n\n <ng-container *ngIf=\"isEndTimeZoneVisible\">\n <div class='k-edit-label'>\n <label (click)=\"endTzPicker.focus()\">{{ textFor('editorEventEndTimeZone') }}</label>\n </div>\n\n <div class='k-edit-field'>\n <kendo-timezone-editor #endTzPicker [formControl]='formGroup.get(fields.endTimezone)'></kendo-timezone-editor>\n </div>\n </ng-container>\n\n <div class='k-edit-field' *ngIf=\"hasAllDay\">\n <input type='checkbox' id='k-is-allday-chkbox' kendoCheckBox [formControl]='formGroup.get(fields.isAllDay)' />\n <label class='k-checkbox-label' for='k-is-allday-chkbox'>{{ textFor('editorEventAllDay') }}</label>\n </div>\n\n <div class='k-edit-field' *ngIf=\"hasStartTimeZone\">\n <input type='checkbox' id='k-set-timezone' kendoCheckBox\n formControlName='startTimezoneCheckbox' />\n <label class='k-checkbox-label' for='k-set-timezone'>{{ textFor('editorEventTimeZone') }}</label>\n\n <ng-container *ngIf=\"isStartTimeZoneVisible && hasEndTimeZone\">\n <input type='checkbox' id='k-use-separate' kendoCheckBox formControlName='endTimezoneCheckbox' />\n <label class='k-checkbox-label' for='k-use-separate'>{{ textFor('editorEventSeparateTimeZones') }}</label>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isEditingSeries\">\n <kendo-recurrence-editor\n [formControl]='formGroup.get(fields.recurrenceRule)'\n [start]='recurrenceStart'\n [timezone]='eventTimezone'\n [weekStart]='weekStart'\n ></kendo-recurrence-editor>\n </ng-container>\n\n <ng-container *ngIf='getFormValue(fields.description)'>\n <div class='k-edit-label'>\n <label for='k-event-description'>{{ textFor('editorEventDescription') }}</label>\n </div>\n <div class='k-edit-field'>\n <textarea id='k-event-description' kendoTextArea [formControl]='formGroup.get(fields.description)'></textarea>\n </div>\n </ng-container>\n\n <ng-container *ngFor='let resource of resources'>\n <ng-container *ngIf='getFormValue(resource.field)'>\n <div class='k-edit-label'>\n <label (click)=\"onResourceClick(resource)\">\n {{ resource.name ? resource.name : resource.field }}\n </label>\n </div>\n <div class='k-edit-field'>\n <kendo-multiple-resource-editor\n *ngIf='resource.multiple'\n [formControl]='formGroup.get(resource.field)'\n [resource]='resource'>\n </kendo-multiple-resource-editor>\n <kendo-single-resource-editor\n *ngIf='!resource.multiple'\n [formControl]='formGroup.get(resource.field)'\n [resource]='resource'>\n </kendo-single-resource-editor>\n </div>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf='editTemplate'>\n <form novalidate [formGroup]='formGroup'>\n <ng-container [ngTemplateOutlet]='editTemplate.templateRef'\n [ngTemplateOutletContext]=\"{\n $implicit: formGroup,\n formGroup: formGroup,\n dataItem: editedEvent,\n editMode: editMode,\n isNew: isNew\n }\">\n </ng-container>\n </form>\n </ng-container>\n\n <kendo-dialog-actions>\n <button kendoButton (click)=\"onCancel($event)\">{{ textFor('cancel') }}</button>\n <button kendoButton themeColor=\"primary\" (click)=\"onSave($event)\" [disabled]=\"!formGroup.valid\">{{ textFor('save') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
11592
11887
  }),
11593
11888
  __metadata("design:paramtypes", [NgZone,
11594
11889
  EditService,
@@ -11664,7 +11959,8 @@ var SchedulerDateTimePickerComponent = /** @class */ (function () {
11664
11959
  SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR
11665
11960
  ],
11666
11961
  selector: 'kendo-scheduler-datetime-picker',
11667
- template: "\n <kendo-datepicker\n #datepicker\n [(value)]='date'\n (valueChange)='onValueChange($event)'\n ></kendo-datepicker>\n <kendo-timepicker *ngIf='!isAllDay'\n [(value)]='date'\n (valueChange)='onValueChange($event)'\n ></kendo-timepicker>\n "
11962
+ template: "\n <kendo-datepicker\n #datepicker\n [(value)]='date'\n (valueChange)='onValueChange($event)'\n ></kendo-datepicker>\n <kendo-timepicker *ngIf='!isAllDay'\n [(value)]='date'\n (valueChange)='onValueChange($event)'\n ></kendo-timepicker>\n ",
11963
+ styles: ["\n kendo-datepicker,\n kendo-timepicker {\n width: 170px;\n }\n "]
11668
11964
  })
11669
11965
  ], SchedulerDateTimePickerComponent);
11670
11966
  return SchedulerDateTimePickerComponent;
@@ -12205,6 +12501,7 @@ var EndRuleRadioButtonDirective = /** @class */ (function () {
12205
12501
  this.changeDetector = changeDetector;
12206
12502
  this.type = 'radio';
12207
12503
  this.radioClass = true;
12504
+ this.radioSizeClass = true;
12208
12505
  this.destroyChange = this.renderer.listen(this.elem, 'change', this.onChange.bind(this));
12209
12506
  }
12210
12507
  EndRuleRadioButtonDirective.prototype.ngOnInit = function () {
@@ -12245,6 +12542,10 @@ var EndRuleRadioButtonDirective = /** @class */ (function () {
12245
12542
  HostBinding('class.k-radio'),
12246
12543
  __metadata("design:type", Boolean)
12247
12544
  ], EndRuleRadioButtonDirective.prototype, "radioClass", void 0);
12545
+ __decorate([
12546
+ HostBinding('class.k-radio-md'),
12547
+ __metadata("design:type", Boolean)
12548
+ ], EndRuleRadioButtonDirective.prototype, "radioSizeClass", void 0);
12248
12549
  __decorate([
12249
12550
  Input("kendoRecurrenceEndRuleRadioButton"),
12250
12551
  __metadata("design:type", String)
@@ -12511,6 +12812,7 @@ var RepeatOnRadioButtonDirective = /** @class */ (function () {
12511
12812
  this.changeDetector = changeDetector;
12512
12813
  this.type = 'radio';
12513
12814
  this.radioClass = true;
12815
+ this.radioSizeClass = true;
12514
12816
  this.destroyChange = this.renderer.listen(this.elem, 'change', this.onChange.bind(this));
12515
12817
  }
12516
12818
  Object.defineProperty(RepeatOnRadioButtonDirective.prototype, "repeatOnRule", {
@@ -12560,6 +12862,10 @@ var RepeatOnRadioButtonDirective = /** @class */ (function () {
12560
12862
  HostBinding('class.k-radio'),
12561
12863
  __metadata("design:type", Boolean)
12562
12864
  ], RepeatOnRadioButtonDirective.prototype, "radioClass", void 0);
12865
+ __decorate([
12866
+ HostBinding('class.k-radio-md'),
12867
+ __metadata("design:type", Boolean)
12868
+ ], RepeatOnRadioButtonDirective.prototype, "radioSizeClass", void 0);
12563
12869
  __decorate([
12564
12870
  Input("kendoRecurrenceRepeatOnRadioButton"),
12565
12871
  __metadata("design:type", String),
@@ -12835,7 +13141,7 @@ var RecurrenceMonthlyYearlyEditorComponent = /** @class */ (function () {
12835
13141
  RecurrenceMonthlyYearlyEditorComponent = __decorate([
12836
13142
  Component({
12837
13143
  selector: 'kendo-recurrence-monthly-yearly-editor',
12838
- template: "\n <div class='k-edit-label'>\n <label (click)=\"onRepeatOnLabelClick()\">{{ textForRepeatOn() }}</label>\n </div>\n <div class='k-edit-field'>\n <ul class='k-reset' [style.width.px]='650'>\n <li>\n <input kendoRecurrenceRepeatOnRadioButton='monthday-{{uniqueId}}' />\n\n <label class='k-radio-label' for='k-repeaton-monthday-{{uniqueId}}'>\n <ng-template [ngIf]=\"currentFreq === 'monthly'\">\n {{ textFor('monthlyDay') }}\n </ng-template>\n </label>\n\n <ng-template [ngIf]=\"currentFreq === 'yearly'\">\n <kendo-dropdownlist\n [data]='months'\n textField='text'\n valueField='value'\n [value]='currentMonthMonthDay'\n [valuePrimitive]='true'\n (valueChange)=\"onMonthChange($event, 'monthday')\"\n [disabled]=\"isDisabled('monthday')\">\n </kendo-dropdownlist>\n </ng-template>\n\n <kendo-numerictextbox\n [style.width.px]='70'\n [min]=\"numericOptions.min\"\n [max]=\"numericOptions.max\"\n [decimals]=\"0\"\n [format]=\"numericOptions.format\"\n [autoCorrect]=\"numericOptions.autoCorrect\"\n [readonly]=\"numericOptions.readonly\"\n [selectOnFocus]=\"numericOptions.selectOnFocus\"\n [spinners]=\"numericOptions.spinners\"\n [step]=\"numericOptions.step\"\n [title]=\"numericOptions.title\"\n [value]='monthDay'\n (valueChange)='onMonthDayChange($event)'\n [disabled]=\"isDisabled('monthday')\">\n </kendo-numerictextbox>\n </li>\n <li>\n <input kendoRecurrenceRepeatOnRadioButton='weekday-{{uniqueId}}' />\n <label class='k-radio-label' for='k-repeaton-weekday-{{uniqueId}}'></label>\n\n <kendo-dropdownlist\n [data]='offsetPositions'\n textField='text'\n valueField='value'\n [value]='offset'\n [valuePrimitive]='true'\n (valueChange)='onOffsetPositionChange($event)'\n [disabled]=\"isDisabled('weekday')\">\n </kendo-dropdownlist>\n\n <kendo-dropdownlist\n [data]=\"extendedWeekDays\"\n textField='text'\n valueField='value'\n [value]='weekDay'\n [valuePrimitive]='true'\n (valueChange)='onWeekDayChange($event)'\n [disabled]=\"isDisabled('weekday')\">\n </kendo-dropdownlist>\n\n <ng-template [ngIf]=\"currentFreq === 'yearly'\">\n <span>{{ textFor('yearlyOf') }}</span>\n\n <kendo-dropdownlist\n [data]='months'\n textField='text'\n valueField='value'\n [value]='currentMonthWeekDay'\n [valuePrimitive]='true'\n (valueChange)=\"onMonthChange($event, 'weekday')\"\n [disabled]=\"isDisabled('weekday')\">\n </kendo-dropdownlist>\n </ng-template>\n </li>\n </ul>\n </div>\n "
13144
+ template: "\n <div class='k-edit-label'>\n <label (click)=\"onRepeatOnLabelClick()\">{{ textForRepeatOn() }}</label>\n </div>\n <div class='k-edit-field'>\n <ul class='k-reset' [style.width.px]='650'>\n <li>\n <input kendoRecurrenceRepeatOnRadioButton='monthday-{{uniqueId}}' />\n\n <label class='k-radio-label' for='k-repeaton-monthday-{{uniqueId}}'>\n <ng-template [ngIf]=\"currentFreq === 'monthly'\">\n {{ textFor('monthlyDay') }}\n </ng-template>\n </label>\n\n <ng-template [ngIf]=\"currentFreq === 'yearly'\">\n <kendo-dropdownlist\n [data]='months'\n textField='text'\n valueField='value'\n [value]='currentMonthMonthDay'\n [valuePrimitive]='true'\n (valueChange)=\"onMonthChange($event, 'monthday')\"\n [disabled]=\"isDisabled('monthday')\"\n [style.width.px]=\"170\"\n [style.margin]=\"'0 .4ex 0 1ex'\">\n </kendo-dropdownlist>\n </ng-template>\n\n <kendo-numerictextbox\n [style.width.px]='70'\n [min]=\"numericOptions.min\"\n [max]=\"numericOptions.max\"\n [decimals]=\"0\"\n [format]=\"numericOptions.format\"\n [autoCorrect]=\"numericOptions.autoCorrect\"\n [readonly]=\"numericOptions.readonly\"\n [selectOnFocus]=\"numericOptions.selectOnFocus\"\n [spinners]=\"numericOptions.spinners\"\n [step]=\"numericOptions.step\"\n [title]=\"numericOptions.title\"\n [value]='monthDay'\n (valueChange)='onMonthDayChange($event)'\n [disabled]=\"isDisabled('monthday')\"\n [style.margin]=\"'0 .4ex 0 1ex'\">\n </kendo-numerictextbox>\n </li>\n <li>\n <input kendoRecurrenceRepeatOnRadioButton='weekday-{{uniqueId}}' />\n <label class='k-radio-label' for='k-repeaton-weekday-{{uniqueId}}'></label>\n\n <kendo-dropdownlist\n [data]='offsetPositions'\n textField='text'\n valueField='value'\n [value]='offset'\n [valuePrimitive]='true'\n (valueChange)='onOffsetPositionChange($event)'\n [disabled]=\"isDisabled('weekday')\"\n [style.width.px]=\"170\"\n [style.margin]=\"'0 .4ex 0 1ex'\">\n </kendo-dropdownlist>\n\n <kendo-dropdownlist\n [data]=\"extendedWeekDays\"\n textField='text'\n valueField='value'\n [value]='weekDay'\n [valuePrimitive]='true'\n (valueChange)='onWeekDayChange($event)'\n [disabled]=\"isDisabled('weekday')\"\n [style.width.px]=\"170\"\n [style.margin]=\"'0 .4ex 0 1ex'\">\n </kendo-dropdownlist>\n\n <ng-template [ngIf]=\"currentFreq === 'yearly'\">\n <span>{{ textFor('yearlyOf') }}</span>\n\n <kendo-dropdownlist\n [data]='months'\n textField='text'\n valueField='value'\n [value]='currentMonthWeekDay'\n [valuePrimitive]='true'\n (valueChange)=\"onMonthChange($event, 'weekday')\"\n [disabled]=\"isDisabled('weekday')\"\n [style.width.px]=\"170\"\n [style.margin]=\"'0 .4ex 0 1ex'\">\n </kendo-dropdownlist>\n </ng-template>\n </li>\n </ul>\n </div>\n "
12839
13145
  }),
12840
13146
  __metadata("design:paramtypes", [RecurrenceService,
12841
13147
  LocalizationService])
@@ -13362,6 +13668,112 @@ var ShortcutsDirective = /** @class */ (function () {
13362
13668
  return ShortcutsDirective;
13363
13669
  }());
13364
13670
 
13671
+ /**
13672
+ * A directive which manages the in-memory selection state of the Scheduler slots
13673
+ * ([see example]({% slug slotselection_scheduler %}#toc-built-in-directive)).
13674
+ */
13675
+ var SlotSelectableDirective = /** @class */ (function () {
13676
+ function SlotSelectableDirective(scheduler, cdr) {
13677
+ var _this = this;
13678
+ this.scheduler = scheduler;
13679
+ this.cdr = cdr;
13680
+ /**
13681
+ * Fires when the currently selected slot range has changed through user interaction.
13682
+ */
13683
+ this.slotSelectionChange = new EventEmitter();
13684
+ this.selectedRange = null;
13685
+ this.slotSelectionChangeSource = new EventEmitter();
13686
+ this.subscriptions = new Subscription();
13687
+ this.scheduler.selectable = true;
13688
+ this.subscriptions.add(this.slotSelectionChangeSource
13689
+ .pipe(distinctUntilChanged(isSameRange)).subscribe(function (v) {
13690
+ _this.slotSelectionChange.emit(v);
13691
+ }));
13692
+ var start$ = this.scheduler.slotDragStart;
13693
+ var drag$ = this.scheduler.slotDrag;
13694
+ var end$ = this.scheduler.slotDragEnd;
13695
+ var startSource = start$.pipe(filter(function (e) { return !e.isDefaultPrevented(); }));
13696
+ this.subscriptions.add(startSource.subscribe(function (e) { return _this.initDragSelect(e); }));
13697
+ this.subscriptions.add(drag$.subscribe(function (e) { return _this.onDrag(e); }));
13698
+ this.subscriptions.add(end$.subscribe(function () { return _this.onRelease(); }));
13699
+ }
13700
+ SlotSelectableDirective.prototype.ngOnInit = function () {
13701
+ this.scheduler.isSlotSelected = this.isSlotSelected.bind(this);
13702
+ };
13703
+ SlotSelectableDirective.prototype.ngOnChanges = function (changes) {
13704
+ if (isChanged("slotSelection", changes, false)) {
13705
+ /**
13706
+ * The default values for resources below are necessarry because this is not fixed yet: https://github.com/telerik/kendo-angular-scheduler/pull/338
13707
+ */
13708
+ var resources = this.scheduler.resources ? [this.scheduler.resources[0].data[0]] : [undefined];
13709
+ this.selectedRange = Object.assign({}, { isAllDay: false, resources: resources }, changes.slotSelection.currentValue);
13710
+ this.cdr.markForCheck();
13711
+ }
13712
+ };
13713
+ SlotSelectableDirective.prototype.ngOnDestroy = function () {
13714
+ this.subscriptions.unsubscribe();
13715
+ };
13716
+ SlotSelectableDirective.prototype.isSlotSelected = function (_a) {
13717
+ var start = _a.start, end = _a.end, isAllDay = _a.isAllDay, resources = _a.resources;
13718
+ if (!start || !end || !this.selectedRange) {
13719
+ return false;
13720
+ }
13721
+ var match = resourcesMatch(this.selectedRange.resources, resources);
13722
+ if (!match) {
13723
+ return false; // Limit selection to the grouped resource where the drag started.
13724
+ }
13725
+ return this.selectedRange && isAllDay === this.selectedRange.isAllDay && this.isInRange(start, end);
13726
+ };
13727
+ SlotSelectableDirective.prototype.initDragSelect = function (_a) {
13728
+ var start = _a.start, end = _a.end, isAllDay = _a.isAllDay, resources = _a.resources;
13729
+ this.selectionOriginResources = resources.slice();
13730
+ this.selectedRange = { start: start, end: end, isAllDay: isAllDay, resources: resources.slice() };
13731
+ this.cdr.markForCheck();
13732
+ };
13733
+ SlotSelectableDirective.prototype.onDrag = function (_a) {
13734
+ var start = _a.start, end = _a.end, resources = _a.resources;
13735
+ var match = resourcesMatch(this.selectionOriginResources, resources);
13736
+ if (!match) {
13737
+ return; // Don't change selection when dragging over a different grouped resource's cells.
13738
+ }
13739
+ this.selectedRange.start = start;
13740
+ this.selectedRange.end = end;
13741
+ this.cdr.markForCheck();
13742
+ };
13743
+ SlotSelectableDirective.prototype.onRelease = function () {
13744
+ this.selectionOriginResources = null;
13745
+ if (this.selectedRange) {
13746
+ this.slotSelectionChangeSource.emit(this.selectedRange);
13747
+ }
13748
+ };
13749
+ /**
13750
+ * @hidden
13751
+ * Checks if the selected range contains a local date range.
13752
+ */
13753
+ SlotSelectableDirective.prototype.isInRange = function (start, end) {
13754
+ if (!this.selectedRange) {
13755
+ return;
13756
+ }
13757
+ return intersects(start, end, this.selectedRange.start, this.selectedRange.end);
13758
+ };
13759
+ __decorate([
13760
+ Input(),
13761
+ __metadata("design:type", Object)
13762
+ ], SlotSelectableDirective.prototype, "slotSelection", void 0);
13763
+ __decorate([
13764
+ Output(),
13765
+ __metadata("design:type", EventEmitter)
13766
+ ], SlotSelectableDirective.prototype, "slotSelectionChange", void 0);
13767
+ SlotSelectableDirective = __decorate([
13768
+ Directive({
13769
+ selector: '[kendoSchedulerSlotSelectable]'
13770
+ }),
13771
+ __metadata("design:paramtypes", [SchedulerComponent,
13772
+ ChangeDetectorRef])
13773
+ ], SlotSelectableDirective);
13774
+ return SlotSelectableDirective;
13775
+ }());
13776
+
13365
13777
  var TEMPLATES = [
13366
13778
  AgendaDateTemplateDirective,
13367
13779
  AgendaTimeTemplateDirective,
@@ -13382,6 +13794,7 @@ var declarations = [
13382
13794
  DataBindingDirective,
13383
13795
  ShortcutsDirective,
13384
13796
  ReactiveEditingDirective,
13797
+ SlotSelectableDirective,
13385
13798
  SchedulerDateTimePickerComponent,
13386
13799
  RecurrenceEditorComponent,
13387
13800
  RecurrenceEndRuleEditorComponent,
@@ -13411,6 +13824,8 @@ var publicDirectives$1 = [
13411
13824
  ].concat(declarations);
13412
13825
  var importedKendoModules = [
13413
13826
  ButtonsModule,
13827
+ CheckBoxModule,
13828
+ TextAreaModule,
13414
13829
  DateInputsModule,
13415
13830
  DialogModule,
13416
13831
  NumericTextBoxModule,
@@ -14049,4 +14464,4 @@ var PDFModule = /** @class */ (function () {
14049
14464
  * Generated bundle index. Do not edit.
14050
14465
  */
14051
14466
 
14052
- export { DataBindingDirective, EditingDirectiveBase, ReactiveEditingDirective, SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR, SchedulerDateTimePickerComponent, DialogsService, EditDialogTemplateDirective, EditDialogComponent, EditService, LocalDataChangesService, EndRuleRadioButtonDirective, RecurrenceEditorCustomMessagesComponent, RecurrenceEditorLocalizedMessagesDirective, Messages$1 as Messages, RecurrenceLocalizationService, RECURRENCE_VALUE_ACCESSOR, RecurrenceEndRuleEditorComponent, RecurrenceFrequencyEditorComponent, RecurrenceIntervalEditorComponent, RecurrenceMonthlyYearlyEditorComponent, RecurrenceWeekdayRuleEditorComponent, RecurrenceService, RepeatOnRadioButtonDirective, ResourceEditorBase, MULTIPLE_RESOURCE_VALUE_ACCESSOR, MultipleResourceEditorComponent, SINGLE_RESOURCE_VALUE_ACCESSOR, SingleResourceEditorComponent, TIME_ZONE_VALUE_ACCESSOR, TimeZoneEditorComponent, CreateEvent, PreventableEvent$1 as PreventableEvent, LoadingComponent, SchedulerCustomMessagesComponent, LocalizedMessagesDirective, Messages as Messages$1, SchedulerLocalizationService, FocusService, ShortcutsDirective, ToolbarNavigationComponent, ToolbarTemplateDirective, ToolbarComponent, ToolbarModule, publicDirectives, ToolbarViewSelectorComponent, AgendaHeaderItemComponent, AgendaHeaderComponent, AgendaTaskItemComponent, AgendaViewInternalComponent, AgendaListComponent, AgendaViewModule, BaseView, ConfigurationViewBase, DomEventsService, HintContainerComponent, RepeatPipe, ResizeHintComponent, ResourceIteratorPipe, ViewFooterComponent, ViewsSharedModule, WorkHoursFooterDirective, DayTimeSlotService, DayTimeViewBase, DayTimeViewItemComponent, DayTimeViewComponent, DayTimeModule, DaySlotDirective, TimeSlotDirective, MonthSlotDirective, MonthSlotService, MonthViewItemComponent, MonthViewRendererComponent, MonthViewComponent, MonthViewModule, MultiDayViewBase, MultiDayViewRendererComponent, MultiDayViewComponent, MultiDayViewModule, WorkWeekViewComponent, SchedulerViewDirective, AgendaDateTemplateDirective, AgendaTimeTemplateDirective, AllDayEventTemplateDirective, AllDaySlotTemplateDirective, DateHeaderTemplateDirective, EventTemplateDirective, GroupHeaderTemplateDirective, MajorTimeHeaderTemplateDirective, MinorTimeHeaderTemplateDirective, MonthDaySlotTemplateDirective, TimeSlotTemplateDirective, TimelineBase, TimelineMonthViewComponent, TimelineMultiDayViewComponent, TimelineViewComponent, TimelineViewModule, TimelineWeekViewComponent, BaseSlotDirective, BaseSlotService, BaseViewItem, SchedulerComponent, SchedulerModule, ViewContextService, ViewStateService, ToolbarService, AgendaViewComponent, DayViewComponent, WeekViewComponent, RecurrenceEditorComponent, BaseEditService, PDFModule, PDFComponent, PDFService, PDFCommandDirective, PDFExportEvent, FocusableDirective, SharedModule, SchedulerView, DateChangeEvent, NavigateEvent, SlotClickEvent, EventClickEvent, EventKeydownEvent, VIEW_EVENT_MAP, CancelEvent, EditEventBase, RemoveEvent, SaveEvent, ResizeStartEvent, ResizeEvent, ResizeEndEvent, DragStartEvent, DragEvent, DragEndEvent, EditEvent, AddEvent };
14467
+ export { DataBindingDirective, EditingDirectiveBase, ReactiveEditingDirective, SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR, SchedulerDateTimePickerComponent, DialogsService, EditDialogTemplateDirective, EditDialogComponent, EditService, LocalDataChangesService, EndRuleRadioButtonDirective, RecurrenceEditorCustomMessagesComponent, RecurrenceEditorLocalizedMessagesDirective, Messages$1 as Messages, RecurrenceLocalizationService, RECURRENCE_VALUE_ACCESSOR, RecurrenceEndRuleEditorComponent, RecurrenceFrequencyEditorComponent, RecurrenceIntervalEditorComponent, RecurrenceMonthlyYearlyEditorComponent, RecurrenceWeekdayRuleEditorComponent, RecurrenceService, RepeatOnRadioButtonDirective, ResourceEditorBase, MULTIPLE_RESOURCE_VALUE_ACCESSOR, MultipleResourceEditorComponent, SINGLE_RESOURCE_VALUE_ACCESSOR, SingleResourceEditorComponent, TIME_ZONE_VALUE_ACCESSOR, TimeZoneEditorComponent, CreateEvent, PreventableEvent$1 as PreventableEvent, LoadingComponent, SchedulerCustomMessagesComponent, LocalizedMessagesDirective, Messages as Messages$1, SchedulerLocalizationService, FocusService, ShortcutsDirective, ToolbarNavigationComponent, ToolbarTemplateDirective, ToolbarComponent, ToolbarModule, publicDirectives, ToolbarViewSelectorComponent, AgendaHeaderItemComponent, AgendaHeaderComponent, AgendaTaskItemComponent, AgendaViewInternalComponent, AgendaListComponent, AgendaViewModule, BaseView, ConfigurationViewBase, DomEventsService, HintContainerComponent, RepeatPipe, ResizeHintComponent, ResourceIteratorPipe, SlotSelectableDirective, ViewFooterComponent, ViewsSharedModule, WorkHoursFooterDirective, DayTimeSlotService, DayTimeViewBase, DayTimeViewItemComponent, DayTimeViewComponent, DayTimeModule, DaySlotDirective, TimeSlotDirective, MonthSlotDirective, MonthSlotService, MonthViewItemComponent, MonthViewRendererComponent, MonthViewComponent, MonthViewModule, MultiDayViewBase, MultiDayViewRendererComponent, MultiDayViewComponent, MultiDayViewModule, WorkWeekViewComponent, SchedulerViewDirective, AgendaDateTemplateDirective, AgendaTimeTemplateDirective, AllDayEventTemplateDirective, AllDaySlotTemplateDirective, DateHeaderTemplateDirective, EventTemplateDirective, GroupHeaderTemplateDirective, MajorTimeHeaderTemplateDirective, MinorTimeHeaderTemplateDirective, MonthDaySlotTemplateDirective, TimeSlotTemplateDirective, TimelineBase, TimelineMonthViewComponent, TimelineMultiDayViewComponent, TimelineViewComponent, TimelineViewModule, TimelineWeekViewComponent, BaseSlotDirective, BaseSlotService, BaseViewItem, SchedulerComponent, SchedulerModule, ViewContextService, ViewStateService, ToolbarService, AgendaViewComponent, DayViewComponent, WeekViewComponent, RecurrenceEditorComponent, BaseEditService, PDFModule, PDFComponent, PDFService, PDFCommandDirective, PDFExportEvent, FocusableDirective, SharedModule, IsSlotSelectedArgs, SchedulerView, DateChangeEvent, NavigateEvent, SlotClickEvent, EventClickEvent, EventKeydownEvent, VIEW_EVENT_MAP, CancelEvent, EditEventBase, RemoveEvent, SaveEvent, ResizeStartEvent, ResizeEvent, ResizeEndEvent, DragStartEvent, DragEvent, DragEndEvent, EditEvent, AddEvent, SlotDragStartEvent, SlotDragEvent, SlotDragEndEvent };