@progress/kendo-angular-dateinputs 5.2.4-dev.202110261444 → 5.3.0-dev.202110290637
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.
- package/dist/cdn/js/kendo-angular-dateinputs.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +33 -2
- package/dist/es/calendar/multiview-calendar.component.js +39 -2
- package/dist/es/calendar/services/century-view.service.js +7 -1
- package/dist/es/calendar/services/decade-view.service.js +6 -1
- package/dist/es/calendar/services/month-view.service.js +3 -0
- package/dist/es/calendar/services/year-view.service.js +5 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/calendar/calendar.component.d.ts +17 -0
- package/dist/es2015/calendar/calendar.component.js +34 -2
- package/dist/es2015/calendar/models/view-service.interface.d.ts +1 -0
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +20 -1
- package/dist/es2015/calendar/multiview-calendar.component.js +41 -4
- package/dist/es2015/calendar/services/century-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/century-view.service.js +7 -1
- package/dist/es2015/calendar/services/decade-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/decade-view.service.js +6 -1
- package/dist/es2015/calendar/services/month-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/month-view.service.js +3 -0
- package/dist/es2015/calendar/services/year-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/year-view.service.js +5 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +95 -8
- package/dist/fesm5/index.js +92 -6
- package/dist/npm/calendar/calendar.component.js +33 -2
- package/dist/npm/calendar/multiview-calendar.component.js +39 -2
- package/dist/npm/calendar/services/century-view.service.js +6 -0
- package/dist/npm/calendar/services/decade-view.service.js +5 -0
- package/dist/npm/calendar/services/month-view.service.js +3 -0
- package/dist/npm/calendar/services/year-view.service.js +4 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
12
|
+
publishDate: 1635489253,
|
|
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
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -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,
|
|
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:
|
|
26
|
+
publishDate: 1635489253,
|
|
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)="
|
|
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
|
|
@@ -9393,6 +9443,11 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
9393
9443
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
9394
9444
|
*/
|
|
9395
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();
|
|
9396
9451
|
/**
|
|
9397
9452
|
* Fires when a view cell is entered
|
|
9398
9453
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
@@ -9637,6 +9692,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
9637
9692
|
}
|
|
9638
9693
|
this.focusedDate = candidate;
|
|
9639
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
|
+
}
|
|
9640
9699
|
}
|
|
9641
9700
|
ngOnInit() {
|
|
9642
9701
|
this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
|
|
@@ -9722,6 +9781,18 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
9722
9781
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
9723
9782
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
9724
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
|
+
}
|
|
9725
9796
|
/**
|
|
9726
9797
|
* @hidden
|
|
9727
9798
|
*/
|
|
@@ -9788,9 +9859,17 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
9788
9859
|
/**
|
|
9789
9860
|
* @hidden
|
|
9790
9861
|
*/
|
|
9791
|
-
|
|
9862
|
+
navigateView(action) {
|
|
9792
9863
|
this.focusedDate = this.viewList.navigate(action);
|
|
9793
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 });
|
|
9794
9873
|
}
|
|
9795
9874
|
/**
|
|
9796
9875
|
* @hidden
|
|
@@ -9807,6 +9886,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
9807
9886
|
*/
|
|
9808
9887
|
handleCellClick({ date, modifiers }) {
|
|
9809
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
|
+
}
|
|
9810
9893
|
}
|
|
9811
9894
|
/**
|
|
9812
9895
|
* @hidden
|
|
@@ -9978,6 +10061,10 @@ __decorate([
|
|
|
9978
10061
|
Output(),
|
|
9979
10062
|
__metadata("design:type", EventEmitter)
|
|
9980
10063
|
], MultiViewCalendarComponent.prototype, "activeViewChange", void 0);
|
|
10064
|
+
__decorate([
|
|
10065
|
+
Output(),
|
|
10066
|
+
__metadata("design:type", EventEmitter)
|
|
10067
|
+
], MultiViewCalendarComponent.prototype, "navigate", void 0);
|
|
9981
10068
|
__decorate([
|
|
9982
10069
|
Output(),
|
|
9983
10070
|
__metadata("design:type", EventEmitter)
|
|
@@ -10165,9 +10252,9 @@ MultiViewCalendarComponent = __decorate([
|
|
|
10165
10252
|
[isPrevDisabled]="isPrevDisabled"
|
|
10166
10253
|
[isNextDisabled]="isNextDisabled"
|
|
10167
10254
|
[showNavigationButtons]="true"
|
|
10168
|
-
(todayButtonClick)="
|
|
10169
|
-
(prevButtonClick)="
|
|
10170
|
-
(nextButtonClick)="
|
|
10255
|
+
(todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
|
|
10256
|
+
(prevButtonClick)="navigateView(prevView)"
|
|
10257
|
+
(nextButtonClick)="navigateView(nextView)"
|
|
10171
10258
|
>
|
|
10172
10259
|
</kendo-calendar-header>
|
|
10173
10260
|
<kendo-calendar-horizontal
|
package/dist/fesm5/index.js
CHANGED
|
@@ -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,
|
|
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:
|
|
26
|
+
publishDate: 1635489253,
|
|
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)=\"
|
|
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,
|
|
@@ -9191,6 +9240,11 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9191
9240
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
9192
9241
|
*/
|
|
9193
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();
|
|
9194
9248
|
/**
|
|
9195
9249
|
* Fires when a view cell is entered
|
|
9196
9250
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
@@ -9523,6 +9577,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9523
9577
|
}
|
|
9524
9578
|
this.focusedDate = candidate;
|
|
9525
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
|
+
}
|
|
9526
9584
|
};
|
|
9527
9585
|
MultiViewCalendarComponent.prototype.ngOnInit = function () {
|
|
9528
9586
|
var _this = this;
|
|
@@ -9611,6 +9669,18 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9611
9669
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
9612
9670
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
9613
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
|
+
};
|
|
9614
9684
|
/**
|
|
9615
9685
|
* @hidden
|
|
9616
9686
|
*/
|
|
@@ -9677,9 +9747,17 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9677
9747
|
/**
|
|
9678
9748
|
* @hidden
|
|
9679
9749
|
*/
|
|
9680
|
-
MultiViewCalendarComponent.prototype.
|
|
9750
|
+
MultiViewCalendarComponent.prototype.navigateView = function (action) {
|
|
9681
9751
|
this.focusedDate = this.viewList.navigate(action);
|
|
9682
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 });
|
|
9683
9761
|
};
|
|
9684
9762
|
/**
|
|
9685
9763
|
* @hidden
|
|
@@ -9697,6 +9775,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9697
9775
|
MultiViewCalendarComponent.prototype.handleCellClick = function (_a) {
|
|
9698
9776
|
var date = _a.date, modifiers = _a.modifiers;
|
|
9699
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
|
+
}
|
|
9700
9782
|
};
|
|
9701
9783
|
/**
|
|
9702
9784
|
* @hidden
|
|
@@ -9869,6 +9951,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
9869
9951
|
Output(),
|
|
9870
9952
|
__metadata("design:type", EventEmitter)
|
|
9871
9953
|
], MultiViewCalendarComponent.prototype, "activeViewChange", void 0);
|
|
9954
|
+
__decorate([
|
|
9955
|
+
Output(),
|
|
9956
|
+
__metadata("design:type", EventEmitter)
|
|
9957
|
+
], MultiViewCalendarComponent.prototype, "navigate", void 0);
|
|
9872
9958
|
__decorate([
|
|
9873
9959
|
Output(),
|
|
9874
9960
|
__metadata("design:type", EventEmitter)
|
|
@@ -10034,7 +10120,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
10034
10120
|
SelectionService
|
|
10035
10121
|
],
|
|
10036
10122
|
selector: 'kendo-multiviewcalendar',
|
|
10037
|
-
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)=\"
|
|
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 "
|
|
10038
10124
|
}),
|
|
10039
10125
|
__metadata("design:paramtypes", [BusViewService,
|
|
10040
10126
|
ElementRef,
|
|
@@ -171,6 +171,11 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
171
171
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
172
172
|
*/
|
|
173
173
|
this.activeViewChange = new core_1.EventEmitter();
|
|
174
|
+
/**
|
|
175
|
+
* Fires when navigating in the currently active view
|
|
176
|
+
* ([more information and example]({% slug events_calendar %})).
|
|
177
|
+
*/
|
|
178
|
+
this.navigate = new core_1.EventEmitter();
|
|
174
179
|
/**
|
|
175
180
|
* Fires when the active view date is changed
|
|
176
181
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
@@ -216,6 +221,14 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
216
221
|
* > If the Calendar is out of the min or max range, it normalizes the defined `focusedDate`.
|
|
217
222
|
*/
|
|
218
223
|
set: function (focusedDate) {
|
|
224
|
+
if (this.activeViewDate && !kendo_date_math_1.isEqual(this._focusedDate, focusedDate)) {
|
|
225
|
+
var service = this.bus.service(this.activeViewEnum);
|
|
226
|
+
var lastDayInPeriod = service.lastDayOfPeriod(this.activeViewDate);
|
|
227
|
+
var isFocusedDateInRange = service.isInRange(focusedDate, this.activeViewDate, lastDayInPeriod);
|
|
228
|
+
if (!isFocusedDateInRange) {
|
|
229
|
+
this.emitNavigate(focusedDate);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
219
232
|
this._focusedDate = focusedDate || util_1.getToday();
|
|
220
233
|
this.setAriaActivedescendant();
|
|
221
234
|
},
|
|
@@ -447,7 +460,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
447
460
|
});
|
|
448
461
|
Object.defineProperty(CalendarComponent.prototype, "calendarTabIndex", {
|
|
449
462
|
get: function () {
|
|
450
|
-
return this.disabled ? undefined : this.tabIndex;
|
|
463
|
+
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
451
464
|
},
|
|
452
465
|
enumerable: true,
|
|
453
466
|
configurable: true
|
|
@@ -681,6 +694,13 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
681
694
|
return null;
|
|
682
695
|
}
|
|
683
696
|
};
|
|
697
|
+
/**
|
|
698
|
+
* @hidden
|
|
699
|
+
*/
|
|
700
|
+
CalendarComponent.prototype.emitNavigate = function (focusedDate) {
|
|
701
|
+
var activeView = view_enum_1.CalendarViewEnum[this.activeViewEnum];
|
|
702
|
+
this.navigate.emit({ activeView: activeView, focusedDate: focusedDate });
|
|
703
|
+
};
|
|
684
704
|
/**
|
|
685
705
|
* @hidden
|
|
686
706
|
*/
|
|
@@ -691,6 +711,13 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
691
711
|
});
|
|
692
712
|
}
|
|
693
713
|
};
|
|
714
|
+
/**
|
|
715
|
+
* @hidden
|
|
716
|
+
*/
|
|
717
|
+
CalendarComponent.prototype.handleActiveDateChange = function (date) {
|
|
718
|
+
this.activeViewDate = date;
|
|
719
|
+
this.emitEvent(this.activeViewDateChange, date);
|
|
720
|
+
};
|
|
694
721
|
/**
|
|
695
722
|
* @hidden
|
|
696
723
|
*/
|
|
@@ -934,6 +961,10 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
934
961
|
core_1.Output(),
|
|
935
962
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
936
963
|
], CalendarComponent.prototype, "activeViewChange", void 0);
|
|
964
|
+
tslib_1.__decorate([
|
|
965
|
+
core_1.Output(),
|
|
966
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
967
|
+
], CalendarComponent.prototype, "navigate", void 0);
|
|
937
968
|
tslib_1.__decorate([
|
|
938
969
|
core_1.Output(),
|
|
939
970
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -1063,7 +1094,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1063
1094
|
selection_service_1.SelectionService
|
|
1064
1095
|
],
|
|
1065
1096
|
selector: 'kendo-calendar',
|
|
1066
|
-
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)=\"
|
|
1097
|
+
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 "
|
|
1067
1098
|
}),
|
|
1068
1099
|
tslib_1.__param(12, core_1.Optional()),
|
|
1069
1100
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|