@progress/kendo-angular-dateinputs 5.2.4-dev.202110060847 → 5.3.0

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 (50) hide show
  1. package/dist/cdn/js/kendo-angular-dateinputs.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/calendar/calendar.component.js +33 -2
  4. package/dist/es/calendar/header.component.js +3 -4
  5. package/dist/es/calendar/horizontal-view-list.component.js +3 -1
  6. package/dist/es/calendar/multiview-calendar.component.js +40 -3
  7. package/dist/es/calendar/services/century-view.service.js +7 -1
  8. package/dist/es/calendar/services/decade-view.service.js +6 -1
  9. package/dist/es/calendar/services/month-view.service.js +3 -0
  10. package/dist/es/calendar/services/year-view.service.js +5 -1
  11. package/dist/es/daterange/date-range-input.js +3 -3
  12. package/dist/es/daterange/date-range-popup.component.js +2 -2
  13. package/dist/es/daterange/date-range-selection.directive.js +1 -1
  14. package/dist/es/package-metadata.js +1 -1
  15. package/dist/es2015/calendar/calendar.component.d.ts +17 -0
  16. package/dist/es2015/calendar/calendar.component.js +34 -2
  17. package/dist/es2015/calendar/header.component.js +3 -4
  18. package/dist/es2015/calendar/horizontal-view-list.component.js +3 -1
  19. package/dist/es2015/calendar/models/view-service.interface.d.ts +1 -0
  20. package/dist/es2015/calendar/multiview-calendar.component.d.ts +20 -1
  21. package/dist/es2015/calendar/multiview-calendar.component.js +42 -5
  22. package/dist/es2015/calendar/services/century-view.service.d.ts +1 -0
  23. package/dist/es2015/calendar/services/century-view.service.js +7 -1
  24. package/dist/es2015/calendar/services/decade-view.service.d.ts +1 -0
  25. package/dist/es2015/calendar/services/decade-view.service.js +6 -1
  26. package/dist/es2015/calendar/services/month-view.service.d.ts +1 -0
  27. package/dist/es2015/calendar/services/month-view.service.js +3 -0
  28. package/dist/es2015/calendar/services/year-view.service.d.ts +1 -0
  29. package/dist/es2015/calendar/services/year-view.service.js +5 -1
  30. package/dist/es2015/daterange/date-range-input.js +3 -3
  31. package/dist/es2015/daterange/date-range-popup.component.js +2 -2
  32. package/dist/es2015/daterange/date-range-selection.directive.js +1 -1
  33. package/dist/es2015/index.metadata.json +1 -1
  34. package/dist/es2015/package-metadata.js +1 -1
  35. package/dist/fesm2015/index.js +108 -20
  36. package/dist/fesm5/index.js +105 -18
  37. package/dist/npm/calendar/calendar.component.js +33 -2
  38. package/dist/npm/calendar/header.component.js +3 -4
  39. package/dist/npm/calendar/horizontal-view-list.component.js +3 -1
  40. package/dist/npm/calendar/multiview-calendar.component.js +40 -3
  41. package/dist/npm/calendar/services/century-view.service.js +6 -0
  42. package/dist/npm/calendar/services/decade-view.service.js +5 -0
  43. package/dist/npm/calendar/services/month-view.service.js +3 -0
  44. package/dist/npm/calendar/services/year-view.service.js +4 -0
  45. package/dist/npm/daterange/date-range-input.js +3 -3
  46. package/dist/npm/daterange/date-range-popup.component.js +2 -2
  47. package/dist/npm/daterange/date-range-selection.directive.js +1 -1
  48. package/dist/npm/package-metadata.js +1 -1
  49. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  50. package/package.json +5 -5
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-dateinputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1633509845,
12
+ publishDate: 1635945725,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -6,7 +6,7 @@ import { __decorate, __metadata, __param } from 'tslib';
6
6
  import { Injectable, EventEmitter, Injector, InjectionToken, Input, Output, HostBinding, Component, Inject, ElementRef, Renderer2, NgZone, TemplateRef, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef, isDevMode, Directive, forwardRef, ContentChild, Optional, ViewContainerRef, HostListener, ViewChildren, QueryList, ContentChildren, IterableDiffers, NgModule } from '@angular/core';
7
7
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
8
8
  import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
9
- import { getDate, isEqual, cloneDate, addDays, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, durationInCenturies, addYears, lastYearOfDecade, durationInDecades, addWeeks, addMonths, firstDayOfMonth, lastDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, lastMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
9
+ import { getDate, isEqual, cloneDate, addDays, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
10
10
  import { isDocumentAvailable, KendoInput, guid, hasObservers, Keys, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
11
11
  import { validatePackage } from '@progress/kendo-licensing';
12
12
  import { IntlService, IntlModule } from '@progress/kendo-angular-intl';
@@ -23,7 +23,7 @@ const packageMetadata = {
23
23
  name: '@progress/kendo-angular-dateinputs',
24
24
  productName: 'Kendo UI for Angular',
25
25
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
26
- publishDate: 1633509845,
26
+ publishDate: 1635945725,
27
27
  version: '',
28
28
  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'
29
29
  };
@@ -534,6 +534,12 @@ let CenturyViewService = class CenturyViewService {
534
534
  const firstYear = firstYearOfDecade(firstDecadeOfCentury(date));
535
535
  return createDate(firstYear.getFullYear(), 0, 1);
536
536
  }
537
+ lastDayOfPeriod(date) {
538
+ const decade = lastDecadeOfCentury(date);
539
+ const year = lastYearOfDecade(decade);
540
+ const month = lastMonthOfYear(year);
541
+ return lastDayOfMonth(month);
542
+ }
537
543
  isRangeStart(value) {
538
544
  return value.getFullYear() % 1000 === 0;
539
545
  }
@@ -695,6 +701,11 @@ let DecadeViewService = class DecadeViewService {
695
701
  const firstYear = firstYearOfDecade(date);
696
702
  return createDate(firstYear.getFullYear(), 0, 1);
697
703
  }
704
+ lastDayOfPeriod(date) {
705
+ const year = lastYearOfDecade(date);
706
+ const month = lastMonthOfYear(year);
707
+ return lastDayOfMonth(month);
708
+ }
698
709
  isRangeStart(value) {
699
710
  return value.getFullYear() % 100 === 0;
700
711
  }
@@ -862,6 +873,9 @@ let MonthViewService = class MonthViewService {
862
873
  }
863
874
  return createDate(date.getFullYear(), date.getMonth(), 1);
864
875
  }
876
+ lastDayOfPeriod(date) {
877
+ return lastDayOfMonth(date);
878
+ }
865
879
  isRangeStart(value) {
866
880
  return !value.getMonth();
867
881
  }
@@ -1056,6 +1070,10 @@ let YearViewService = class YearViewService {
1056
1070
  }
1057
1071
  return createDate(date.getFullYear(), 0, 1);
1058
1072
  }
1073
+ lastDayOfPeriod(date) {
1074
+ const month = lastMonthOfYear(date);
1075
+ return lastDayOfMonth(month);
1076
+ }
1059
1077
  isRangeStart(value) {
1060
1078
  return value.getFullYear() % 10 === 0;
1061
1079
  }
@@ -3046,6 +3064,11 @@ let CalendarComponent = class CalendarComponent {
3046
3064
  * ([more information and example]({% slug overview_calendar %}#toc-events)).
3047
3065
  */
3048
3066
  this.activeViewChange = new EventEmitter();
3067
+ /**
3068
+ * Fires when navigating in the currently active view
3069
+ * ([more information and example]({% slug events_calendar %})).
3070
+ */
3071
+ this.navigate = new EventEmitter();
3049
3072
  /**
3050
3073
  * Fires when the active view date is changed
3051
3074
  * ([more information and example]({% slug overview_calendar %}#toc-events)).
@@ -3087,6 +3110,14 @@ let CalendarComponent = class CalendarComponent {
3087
3110
  * > If the Calendar is out of the min or max range, it normalizes the defined `focusedDate`.
3088
3111
  */
3089
3112
  set focusedDate(focusedDate) {
3113
+ if (this.activeViewDate && !isEqual(this._focusedDate, focusedDate)) {
3114
+ const service = this.bus.service(this.activeViewEnum);
3115
+ const lastDayInPeriod = service.lastDayOfPeriod(this.activeViewDate);
3116
+ const isFocusedDateInRange = service.isInRange(focusedDate, this.activeViewDate, lastDayInPeriod);
3117
+ if (!isFocusedDateInRange) {
3118
+ this.emitNavigate(focusedDate);
3119
+ }
3120
+ }
3090
3121
  this._focusedDate = focusedDate || getToday();
3091
3122
  this.setAriaActivedescendant();
3092
3123
  }
@@ -3241,7 +3272,7 @@ let CalendarComponent = class CalendarComponent {
3241
3272
  return 'grid';
3242
3273
  }
3243
3274
  get calendarTabIndex() {
3244
- return this.disabled ? undefined : this.tabIndex;
3275
+ return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
3245
3276
  }
3246
3277
  get ariaDisabled() {
3247
3278
  return this.disabled;
@@ -3461,6 +3492,13 @@ let CalendarComponent = class CalendarComponent {
3461
3492
  return null;
3462
3493
  }
3463
3494
  }
3495
+ /**
3496
+ * @hidden
3497
+ */
3498
+ emitNavigate(focusedDate) {
3499
+ const activeView = CalendarViewEnum[this.activeViewEnum];
3500
+ this.navigate.emit({ activeView, focusedDate });
3501
+ }
3464
3502
  /**
3465
3503
  * @hidden
3466
3504
  */
@@ -3471,6 +3509,13 @@ let CalendarComponent = class CalendarComponent {
3471
3509
  });
3472
3510
  }
3473
3511
  }
3512
+ /**
3513
+ * @hidden
3514
+ */
3515
+ handleActiveDateChange(date) {
3516
+ this.activeViewDate = date;
3517
+ this.emitEvent(this.activeViewDateChange, date);
3518
+ }
3474
3519
  /**
3475
3520
  * @hidden
3476
3521
  */
@@ -3712,6 +3757,10 @@ __decorate([
3712
3757
  Output(),
3713
3758
  __metadata("design:type", EventEmitter)
3714
3759
  ], CalendarComponent.prototype, "activeViewChange", void 0);
3760
+ __decorate([
3761
+ Output(),
3762
+ __metadata("design:type", EventEmitter)
3763
+ ], CalendarComponent.prototype, "navigate", void 0);
3715
3764
  __decorate([
3716
3765
  Output(),
3717
3766
  __metadata("design:type", EventEmitter)
@@ -3883,7 +3932,7 @@ CalendarComponent = __decorate([
3883
3932
  })"
3884
3933
  (cellClick)="handleCellClick($event)"
3885
3934
  (weekNumberCellClick)="handleWeekNumberClick($event)"
3886
- (activeDateChange)="emitEvent(activeViewDateChange, $event)"
3935
+ (activeDateChange)="handleActiveDateChange($event)"
3887
3936
  (pageChange)="onPageChange()"
3888
3937
  >
3889
3938
  </kendo-calendar-viewlist>
@@ -3913,6 +3962,7 @@ CalendarComponent = __decorate([
3913
3962
  [value]="value"
3914
3963
  [disabledDates]="disabledDates"
3915
3964
  (activeViewChange)="handleActiveViewChange($event)"
3965
+ (navigate)="navigate.emit($event)"
3916
3966
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
3917
3967
  >
3918
3968
  <kendo-multiviewcalendar-messages
@@ -9136,7 +9186,9 @@ __decorate([
9136
9186
  ], HorizontalViewListComponent.prototype, "activeDateChange", void 0);
9137
9187
  __decorate([
9138
9188
  HostBinding("class.k-calendar-view"),
9139
- HostBinding("class.k-justify-align-start"),
9189
+ HostBinding("class.k-hstack"),
9190
+ HostBinding("class.k-align-items-start"),
9191
+ HostBinding("class.k-justify-content-center"),
9140
9192
  __metadata("design:type", Boolean)
9141
9193
  ], HorizontalViewListComponent.prototype, "getComponentClass", void 0);
9142
9194
  __decorate([
@@ -9391,6 +9443,11 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9391
9443
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
9392
9444
  */
9393
9445
  this.activeViewChange = new EventEmitter();
9446
+ /**
9447
+ * Fires when navigating in the currently active view
9448
+ * ([more information and example]({% slug events_multiviewcalendar %})).
9449
+ */
9450
+ this.navigate = new EventEmitter();
9394
9451
  /**
9395
9452
  * Fires when a view cell is entered
9396
9453
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
@@ -9423,7 +9480,7 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9423
9480
  this.minValidateFn = noop;
9424
9481
  this.maxValidateFn = noop;
9425
9482
  this.disabledDatesRangeValidateFn = noop;
9426
- this.subscriptions = new Subscription(() => { });
9483
+ this.subscriptions = new Subscription();
9427
9484
  this.setClasses(element.nativeElement);
9428
9485
  }
9429
9486
  /**
@@ -9635,6 +9692,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9635
9692
  }
9636
9693
  this.focusedDate = candidate;
9637
9694
  event.preventDefault();
9695
+ const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
9696
+ if (!isSameView) {
9697
+ this.emitNavigate(this.focusedDate);
9698
+ }
9638
9699
  }
9639
9700
  ngOnInit() {
9640
9701
  this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
@@ -9720,6 +9781,18 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9720
9781
  this.onControlChange(this.parseSelectionToValue(availableDates));
9721
9782
  this.valueChange.emit(this.parseSelectionToValue(availableDates));
9722
9783
  }
9784
+ /**
9785
+ * @hidden
9786
+ */
9787
+ handleTodayButtonClick(args) {
9788
+ const todayDate = args.focusedDate;
9789
+ const isSameView = this.bus.service(this.activeViewEnum).isInArray(todayDate, this.viewList.dates);
9790
+ const isBottomView = !this.bus.canMoveDown(this.activeViewEnum);
9791
+ if (!isSameView && isBottomView) {
9792
+ this.emitNavigate(todayDate);
9793
+ }
9794
+ this.handleDateChange(args);
9795
+ }
9723
9796
  /**
9724
9797
  * @hidden
9725
9798
  */
@@ -9786,9 +9859,17 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9786
9859
  /**
9787
9860
  * @hidden
9788
9861
  */
9789
- navigate(action) {
9862
+ navigateView(action) {
9790
9863
  this.focusedDate = this.viewList.navigate(action);
9791
9864
  this.updateButtonState();
9865
+ this.emitNavigate(this.focusedDate);
9866
+ }
9867
+ /**
9868
+ * @hidden
9869
+ */
9870
+ emitNavigate(focusedDate) {
9871
+ const activeView = CalendarViewEnum[this.activeViewEnum];
9872
+ this.navigate.emit({ activeView, focusedDate });
9792
9873
  }
9793
9874
  /**
9794
9875
  * @hidden
@@ -9805,6 +9886,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
9805
9886
  */
9806
9887
  handleCellClick({ date, modifiers }) {
9807
9888
  this.performSelection(date, modifiers);
9889
+ const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
9890
+ if (!isSameView) {
9891
+ this.emitNavigate(this.focusedDate);
9892
+ }
9808
9893
  }
9809
9894
  /**
9810
9895
  * @hidden
@@ -9976,6 +10061,10 @@ __decorate([
9976
10061
  Output(),
9977
10062
  __metadata("design:type", EventEmitter)
9978
10063
  ], MultiViewCalendarComponent.prototype, "activeViewChange", void 0);
10064
+ __decorate([
10065
+ Output(),
10066
+ __metadata("design:type", EventEmitter)
10067
+ ], MultiViewCalendarComponent.prototype, "navigate", void 0);
9979
10068
  __decorate([
9980
10069
  Output(),
9981
10070
  __metadata("design:type", EventEmitter)
@@ -10163,9 +10252,9 @@ MultiViewCalendarComponent = __decorate([
10163
10252
  [isPrevDisabled]="isPrevDisabled"
10164
10253
  [isNextDisabled]="isNextDisabled"
10165
10254
  [showNavigationButtons]="true"
10166
- (todayButtonClick)="handleDateChange({ selectedDates: [$event], focusedDate: $event })"
10167
- (prevButtonClick)="navigate(prevView)"
10168
- (nextButtonClick)="navigate(nextView)"
10255
+ (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
10256
+ (prevButtonClick)="navigateView(prevView)"
10257
+ (nextButtonClick)="navigateView(nextView)"
10169
10258
  >
10170
10259
  </kendo-calendar-header>
10171
10260
  <kendo-calendar-horizontal
@@ -10467,8 +10556,8 @@ let DateRangePopupComponent = class DateRangePopupComponent {
10467
10556
  * @hidden
10468
10557
  */
10469
10558
  this.popupUID = guid();
10470
- this.calendarSubscriptions = new Subscription(() => { });
10471
- this.popupSubscriptions = new Subscription(() => { });
10559
+ this.calendarSubscriptions = new Subscription();
10560
+ this.popupSubscriptions = new Subscription();
10472
10561
  this.resolvedPromise = Promise.resolve();
10473
10562
  }
10474
10563
  /**
@@ -10828,8 +10917,8 @@ class DateRangeInput {
10828
10917
  this.renderer = renderer;
10829
10918
  this.zone = zone;
10830
10919
  this.navigateCalendarOnFocus = false;
10831
- this.popupSubscriptions = new Subscription(() => { });
10832
- this.subscriptions = new Subscription(() => { });
10920
+ this.popupSubscriptions = new Subscription();
10921
+ this.subscriptions = new Subscription();
10833
10922
  }
10834
10923
  get isActiveEnd() {
10835
10924
  return this.dateRangeService.activeRangeEnd === this.activeRangeEnd;
@@ -10878,7 +10967,7 @@ class DateRangeInput {
10878
10967
  }
10879
10968
  unsubscribePopup() {
10880
10969
  this.popupSubscriptions.unsubscribe();
10881
- this.popupSubscriptions = new Subscription(() => { });
10970
+ this.popupSubscriptions = new Subscription();
10882
10971
  }
10883
10972
  activate() {
10884
10973
  this.dateRangeService.setActiveRangeEnd(this.activeRangeEnd);
@@ -11116,7 +11205,7 @@ let DateRangeSelectionDirective = class DateRangeSelectionDirective {
11116
11205
  * the section on [events]({% slug overview_multiviewcalendar %}#toc-events).
11117
11206
  */
11118
11207
  this.selectionRangeChange = new EventEmitter();
11119
- this.calendarSubscriptions = new Subscription(() => { });
11208
+ this.calendarSubscriptions = new Subscription();
11120
11209
  this.dateRangeService = this.dateRangeService || new DateRangeService();
11121
11210
  renderer.setAttribute(element.nativeElement, 'aria-multiselectable', 'true');
11122
11211
  }
@@ -11417,10 +11506,9 @@ let HeaderComponent = class HeaderComponent {
11417
11506
  this.subscriptions = new Subscription();
11418
11507
  }
11419
11508
  ngOnInit() {
11420
- this.subscriptions
11421
- .add(this.intl.changes.subscribe(this.intlChange.bind(this)))
11422
- .add(this.localization.changes.subscribe(this.l10nChange.bind(this)))
11423
- .add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
11509
+ this.subscriptions.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
11510
+ this.subscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
11511
+ this.subscriptions.add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
11424
11512
  }
11425
11513
  ngOnChanges(_) {
11426
11514
  const service = this.bus.service(this.activeView);
@@ -6,7 +6,7 @@ import { __decorate, __metadata, __param, __extends } from 'tslib';
6
6
  import { Injectable, Injector, EventEmitter, InjectionToken, Input, Output, HostBinding, Component, Inject, ElementRef, Renderer2, NgZone, TemplateRef, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef, isDevMode, Directive, forwardRef, ContentChild, Optional, ViewContainerRef, HostListener, ViewChildren, QueryList, ContentChildren, IterableDiffers, NgModule } from '@angular/core';
7
7
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
8
8
  import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
9
- import { getDate, isEqual, cloneDate, addDays, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, durationInCenturies, addYears, lastYearOfDecade, durationInDecades, addWeeks, addMonths, firstDayOfMonth, lastDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, lastMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
9
+ import { getDate, isEqual, cloneDate, addDays, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
10
10
  import { isDocumentAvailable, KendoInput, hasObservers, Keys, guid, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
11
11
  import { validatePackage } from '@progress/kendo-licensing';
12
12
  import { IntlService, IntlModule } from '@progress/kendo-angular-intl';
@@ -23,7 +23,7 @@ var packageMetadata = {
23
23
  name: '@progress/kendo-angular-dateinputs',
24
24
  productName: 'Kendo UI for Angular',
25
25
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
26
- publishDate: 1633509845,
26
+ publishDate: 1635945725,
27
27
  version: '',
28
28
  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'
29
29
  };
@@ -539,6 +539,12 @@ var CenturyViewService = /** @class */ (function () {
539
539
  var firstYear = firstYearOfDecade(firstDecadeOfCentury(date));
540
540
  return createDate(firstYear.getFullYear(), 0, 1);
541
541
  };
542
+ CenturyViewService.prototype.lastDayOfPeriod = function (date) {
543
+ var decade = lastDecadeOfCentury(date);
544
+ var year = lastYearOfDecade(decade);
545
+ var month = lastMonthOfYear(year);
546
+ return lastDayOfMonth(month);
547
+ };
542
548
  CenturyViewService.prototype.isRangeStart = function (value) {
543
549
  return value.getFullYear() % 1000 === 0;
544
550
  };
@@ -701,6 +707,11 @@ var DecadeViewService = /** @class */ (function () {
701
707
  var firstYear = firstYearOfDecade(date);
702
708
  return createDate(firstYear.getFullYear(), 0, 1);
703
709
  };
710
+ DecadeViewService.prototype.lastDayOfPeriod = function (date) {
711
+ var year = lastYearOfDecade(date);
712
+ var month = lastMonthOfYear(year);
713
+ return lastDayOfMonth(month);
714
+ };
704
715
  DecadeViewService.prototype.isRangeStart = function (value) {
705
716
  return value.getFullYear() % 100 === 0;
706
717
  };
@@ -872,6 +883,9 @@ var MonthViewService = /** @class */ (function () {
872
883
  }
873
884
  return createDate(date.getFullYear(), date.getMonth(), 1);
874
885
  };
886
+ MonthViewService.prototype.lastDayOfPeriod = function (date) {
887
+ return lastDayOfMonth(date);
888
+ };
875
889
  MonthViewService.prototype.isRangeStart = function (value) {
876
890
  return !value.getMonth();
877
891
  };
@@ -1071,6 +1085,10 @@ var YearViewService = /** @class */ (function () {
1071
1085
  }
1072
1086
  return createDate(date.getFullYear(), 0, 1);
1073
1087
  };
1088
+ YearViewService.prototype.lastDayOfPeriod = function (date) {
1089
+ var month = lastMonthOfYear(date);
1090
+ return lastDayOfMonth(month);
1091
+ };
1074
1092
  YearViewService.prototype.isRangeStart = function (value) {
1075
1093
  return value.getFullYear() % 10 === 0;
1076
1094
  };
@@ -3055,6 +3073,11 @@ var CalendarComponent = /** @class */ (function () {
3055
3073
  * ([more information and example]({% slug overview_calendar %}#toc-events)).
3056
3074
  */
3057
3075
  this.activeViewChange = new EventEmitter();
3076
+ /**
3077
+ * Fires when navigating in the currently active view
3078
+ * ([more information and example]({% slug events_calendar %})).
3079
+ */
3080
+ this.navigate = new EventEmitter();
3058
3081
  /**
3059
3082
  * Fires when the active view date is changed
3060
3083
  * ([more information and example]({% slug overview_calendar %}#toc-events)).
@@ -3100,6 +3123,14 @@ var CalendarComponent = /** @class */ (function () {
3100
3123
  * > If the Calendar is out of the min or max range, it normalizes the defined `focusedDate`.
3101
3124
  */
3102
3125
  set: function (focusedDate) {
3126
+ if (this.activeViewDate && !isEqual(this._focusedDate, focusedDate)) {
3127
+ var service = this.bus.service(this.activeViewEnum);
3128
+ var lastDayInPeriod = service.lastDayOfPeriod(this.activeViewDate);
3129
+ var isFocusedDateInRange = service.isInRange(focusedDate, this.activeViewDate, lastDayInPeriod);
3130
+ if (!isFocusedDateInRange) {
3131
+ this.emitNavigate(focusedDate);
3132
+ }
3133
+ }
3103
3134
  this._focusedDate = focusedDate || getToday();
3104
3135
  this.setAriaActivedescendant();
3105
3136
  },
@@ -3331,7 +3362,7 @@ var CalendarComponent = /** @class */ (function () {
3331
3362
  });
3332
3363
  Object.defineProperty(CalendarComponent.prototype, "calendarTabIndex", {
3333
3364
  get: function () {
3334
- return this.disabled ? undefined : this.tabIndex;
3365
+ return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
3335
3366
  },
3336
3367
  enumerable: true,
3337
3368
  configurable: true
@@ -3565,6 +3596,13 @@ var CalendarComponent = /** @class */ (function () {
3565
3596
  return null;
3566
3597
  }
3567
3598
  };
3599
+ /**
3600
+ * @hidden
3601
+ */
3602
+ CalendarComponent.prototype.emitNavigate = function (focusedDate) {
3603
+ var activeView = CalendarViewEnum[this.activeViewEnum];
3604
+ this.navigate.emit({ activeView: activeView, focusedDate: focusedDate });
3605
+ };
3568
3606
  /**
3569
3607
  * @hidden
3570
3608
  */
@@ -3575,6 +3613,13 @@ var CalendarComponent = /** @class */ (function () {
3575
3613
  });
3576
3614
  }
3577
3615
  };
3616
+ /**
3617
+ * @hidden
3618
+ */
3619
+ CalendarComponent.prototype.handleActiveDateChange = function (date) {
3620
+ this.activeViewDate = date;
3621
+ this.emitEvent(this.activeViewDateChange, date);
3622
+ };
3578
3623
  /**
3579
3624
  * @hidden
3580
3625
  */
@@ -3818,6 +3863,10 @@ var CalendarComponent = /** @class */ (function () {
3818
3863
  Output(),
3819
3864
  __metadata("design:type", EventEmitter)
3820
3865
  ], CalendarComponent.prototype, "activeViewChange", void 0);
3866
+ __decorate([
3867
+ Output(),
3868
+ __metadata("design:type", EventEmitter)
3869
+ ], CalendarComponent.prototype, "navigate", void 0);
3821
3870
  __decorate([
3822
3871
  Output(),
3823
3872
  __metadata("design:type", EventEmitter)
@@ -3947,7 +3996,7 @@ var CalendarComponent = /** @class */ (function () {
3947
3996
  SelectionService
3948
3997
  ],
3949
3998
  selector: 'kendo-calendar',
3950
- template: "\n <ng-container kendoCalendarLocalizedMessages\n i18n-today=\"kendo.calendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.calendar.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <ng-container *ngIf=\"type === 'infinite'\">\n <kendo-calendar-navigation\n *ngIf=\"navigation\"\n [activeView]=\"activeViewEnum\"\n [focusedDate]=\"focusedDate\"\n [min]=\"min\"\n [max]=\"max\"\n [templateRef]=\"navigationItemTemplate?.templateRef\"\n (valueChange)=\"handleNavigation($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-navigation>\n <kendo-calendar-viewlist\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [headerTitleTemplateRef]=\"headerTitleTemplate?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [selectedDates]=\"selectedDates\"\n (todayButtonClick)=\"handleDateChange({\n selectedDates: [$event],\n focusedDate: $event\n })\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (activeDateChange)=\"emitEvent(activeViewDateChange, $event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-viewlist>\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-container>\n <ng-container *ngIf=\"type === 'classic'\">\n <kendo-multiviewcalendar\n #multiviewcalendar\n [views]=\"1\"\n [min]=\"min\"\n [max]=\"max\"\n [isActive]=\"isActive\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [animateNavigation]=\"animateNavigation\"\n [cellTemplate]=\"activeCellTemplate()\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [focusedDate]=\"focusedDate\"\n [selection]=\"selection\"\n [value]=\"value\"\n [disabledDates]=\"disabledDates\"\n (activeViewChange)=\"handleActiveViewChange($event)\"\n (valueChange)=\"handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)\"\n >\n <kendo-multiviewcalendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-multiviewcalendar-messages>\n </kendo-multiviewcalendar>\n </ng-container>\n "
3999
+ template: "\n <ng-container kendoCalendarLocalizedMessages\n i18n-today=\"kendo.calendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.calendar.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <ng-container *ngIf=\"type === 'infinite'\">\n <kendo-calendar-navigation\n *ngIf=\"navigation\"\n [activeView]=\"activeViewEnum\"\n [focusedDate]=\"focusedDate\"\n [min]=\"min\"\n [max]=\"max\"\n [templateRef]=\"navigationItemTemplate?.templateRef\"\n (valueChange)=\"handleNavigation($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-navigation>\n <kendo-calendar-viewlist\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [headerTitleTemplateRef]=\"headerTitleTemplate?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [selectedDates]=\"selectedDates\"\n (todayButtonClick)=\"handleDateChange({\n selectedDates: [$event],\n focusedDate: $event\n })\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (activeDateChange)=\"handleActiveDateChange($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-viewlist>\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-container>\n <ng-container *ngIf=\"type === 'classic'\">\n <kendo-multiviewcalendar\n #multiviewcalendar\n [views]=\"1\"\n [min]=\"min\"\n [max]=\"max\"\n [isActive]=\"isActive\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [animateNavigation]=\"animateNavigation\"\n [cellTemplate]=\"activeCellTemplate()\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [focusedDate]=\"focusedDate\"\n [selection]=\"selection\"\n [value]=\"value\"\n [disabledDates]=\"disabledDates\"\n (activeViewChange)=\"handleActiveViewChange($event)\"\n (navigate)=\"navigate.emit($event)\"\n (valueChange)=\"handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)\"\n >\n <kendo-multiviewcalendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-multiviewcalendar-messages>\n </kendo-multiviewcalendar>\n </ng-container>\n "
3951
4000
  }),
3952
4001
  __param(12, Optional()),
3953
4002
  __metadata("design:paramtypes", [BusViewService,
@@ -9001,7 +9050,9 @@ var HorizontalViewListComponent = /** @class */ (function () {
9001
9050
  ], HorizontalViewListComponent.prototype, "activeDateChange", void 0);
9002
9051
  __decorate([
9003
9052
  HostBinding("class.k-calendar-view"),
9004
- HostBinding("class.k-justify-align-start"),
9053
+ HostBinding("class.k-hstack"),
9054
+ HostBinding("class.k-align-items-start"),
9055
+ HostBinding("class.k-justify-content-center"),
9005
9056
  __metadata("design:type", Boolean)
9006
9057
  ], HorizontalViewListComponent.prototype, "getComponentClass", void 0);
9007
9058
  __decorate([
@@ -9189,6 +9240,11 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9189
9240
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
9190
9241
  */
9191
9242
  this.activeViewChange = new EventEmitter();
9243
+ /**
9244
+ * Fires when navigating in the currently active view
9245
+ * ([more information and example]({% slug events_multiviewcalendar %})).
9246
+ */
9247
+ this.navigate = new EventEmitter();
9192
9248
  /**
9193
9249
  * Fires when a view cell is entered
9194
9250
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
@@ -9221,7 +9277,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9221
9277
  this.minValidateFn = noop;
9222
9278
  this.maxValidateFn = noop;
9223
9279
  this.disabledDatesRangeValidateFn = noop;
9224
- this.subscriptions = new Subscription(function () { });
9280
+ this.subscriptions = new Subscription();
9225
9281
  this.setClasses(element.nativeElement);
9226
9282
  }
9227
9283
  Object.defineProperty(MultiViewCalendarComponent.prototype, "focusedDate", {
@@ -9521,6 +9577,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9521
9577
  }
9522
9578
  this.focusedDate = candidate;
9523
9579
  event.preventDefault();
9580
+ var isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
9581
+ if (!isSameView) {
9582
+ this.emitNavigate(this.focusedDate);
9583
+ }
9524
9584
  };
9525
9585
  MultiViewCalendarComponent.prototype.ngOnInit = function () {
9526
9586
  var _this = this;
@@ -9609,6 +9669,18 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9609
9669
  this.onControlChange(this.parseSelectionToValue(availableDates));
9610
9670
  this.valueChange.emit(this.parseSelectionToValue(availableDates));
9611
9671
  };
9672
+ /**
9673
+ * @hidden
9674
+ */
9675
+ MultiViewCalendarComponent.prototype.handleTodayButtonClick = function (args) {
9676
+ var todayDate = args.focusedDate;
9677
+ var isSameView = this.bus.service(this.activeViewEnum).isInArray(todayDate, this.viewList.dates);
9678
+ var isBottomView = !this.bus.canMoveDown(this.activeViewEnum);
9679
+ if (!isSameView && isBottomView) {
9680
+ this.emitNavigate(todayDate);
9681
+ }
9682
+ this.handleDateChange(args);
9683
+ };
9612
9684
  /**
9613
9685
  * @hidden
9614
9686
  */
@@ -9675,9 +9747,17 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9675
9747
  /**
9676
9748
  * @hidden
9677
9749
  */
9678
- MultiViewCalendarComponent.prototype.navigate = function (action) {
9750
+ MultiViewCalendarComponent.prototype.navigateView = function (action) {
9679
9751
  this.focusedDate = this.viewList.navigate(action);
9680
9752
  this.updateButtonState();
9753
+ this.emitNavigate(this.focusedDate);
9754
+ };
9755
+ /**
9756
+ * @hidden
9757
+ */
9758
+ MultiViewCalendarComponent.prototype.emitNavigate = function (focusedDate) {
9759
+ var activeView = CalendarViewEnum[this.activeViewEnum];
9760
+ this.navigate.emit({ activeView: activeView, focusedDate: focusedDate });
9681
9761
  };
9682
9762
  /**
9683
9763
  * @hidden
@@ -9695,6 +9775,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9695
9775
  MultiViewCalendarComponent.prototype.handleCellClick = function (_a) {
9696
9776
  var date = _a.date, modifiers = _a.modifiers;
9697
9777
  this.performSelection(date, modifiers);
9778
+ var isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
9779
+ if (!isSameView) {
9780
+ this.emitNavigate(this.focusedDate);
9781
+ }
9698
9782
  };
9699
9783
  /**
9700
9784
  * @hidden
@@ -9867,6 +9951,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
9867
9951
  Output(),
9868
9952
  __metadata("design:type", EventEmitter)
9869
9953
  ], MultiViewCalendarComponent.prototype, "activeViewChange", void 0);
9954
+ __decorate([
9955
+ Output(),
9956
+ __metadata("design:type", EventEmitter)
9957
+ ], MultiViewCalendarComponent.prototype, "navigate", void 0);
9870
9958
  __decorate([
9871
9959
  Output(),
9872
9960
  __metadata("design:type", EventEmitter)
@@ -10032,7 +10120,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
10032
10120
  SelectionService
10033
10121
  ],
10034
10122
  selector: 'kendo-multiviewcalendar',
10035
- template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleDateChange({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigate(prevView)\"\n (nextButtonClick)=\"navigate(nextView)\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || isHovered\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
10123
+ template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || isHovered\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
10036
10124
  }),
10037
10125
  __metadata("design:paramtypes", [BusViewService,
10038
10126
  ElementRef,
@@ -10328,8 +10416,8 @@ var DateRangePopupComponent = /** @class */ (function () {
10328
10416
  * @hidden
10329
10417
  */
10330
10418
  this.popupUID = guid();
10331
- this.calendarSubscriptions = new Subscription(function () { });
10332
- this.popupSubscriptions = new Subscription(function () { });
10419
+ this.calendarSubscriptions = new Subscription();
10420
+ this.popupSubscriptions = new Subscription();
10333
10421
  this.resolvedPromise = Promise.resolve();
10334
10422
  }
10335
10423
  Object.defineProperty(DateRangePopupComponent.prototype, "calendar", {
@@ -10718,8 +10806,8 @@ var DateRangeInput = /** @class */ (function () {
10718
10806
  this.renderer = renderer;
10719
10807
  this.zone = zone;
10720
10808
  this.navigateCalendarOnFocus = false;
10721
- this.popupSubscriptions = new Subscription(function () { });
10722
- this.subscriptions = new Subscription(function () { });
10809
+ this.popupSubscriptions = new Subscription();
10810
+ this.subscriptions = new Subscription();
10723
10811
  }
10724
10812
  Object.defineProperty(DateRangeInput.prototype, "isActiveEnd", {
10725
10813
  get: function () {
@@ -10778,7 +10866,7 @@ var DateRangeInput = /** @class */ (function () {
10778
10866
  };
10779
10867
  DateRangeInput.prototype.unsubscribePopup = function () {
10780
10868
  this.popupSubscriptions.unsubscribe();
10781
- this.popupSubscriptions = new Subscription(function () { });
10869
+ this.popupSubscriptions = new Subscription();
10782
10870
  };
10783
10871
  DateRangeInput.prototype.activate = function () {
10784
10872
  this.dateRangeService.setActiveRangeEnd(this.activeRangeEnd);
@@ -11025,7 +11113,7 @@ var DateRangeSelectionDirective = /** @class */ (function () {
11025
11113
  * the section on [events]({% slug overview_multiviewcalendar %}#toc-events).
11026
11114
  */
11027
11115
  this.selectionRangeChange = new EventEmitter();
11028
- this.calendarSubscriptions = new Subscription(function () { });
11116
+ this.calendarSubscriptions = new Subscription();
11029
11117
  this.dateRangeService = this.dateRangeService || new DateRangeService();
11030
11118
  renderer.setAttribute(element.nativeElement, 'aria-multiselectable', 'true');
11031
11119
  }
@@ -11367,10 +11455,9 @@ var HeaderComponent = /** @class */ (function () {
11367
11455
  this.subscriptions = new Subscription();
11368
11456
  }
11369
11457
  HeaderComponent.prototype.ngOnInit = function () {
11370
- this.subscriptions
11371
- .add(this.intl.changes.subscribe(this.intlChange.bind(this)))
11372
- .add(this.localization.changes.subscribe(this.l10nChange.bind(this)))
11373
- .add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
11458
+ this.subscriptions.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
11459
+ this.subscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
11460
+ this.subscriptions.add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
11374
11461
  };
11375
11462
  HeaderComponent.prototype.ngOnChanges = function (_) {
11376
11463
  var service = this.bus.service(this.activeView);