@progress/kendo-angular-dateinputs 5.3.0-dev.202110290637 → 5.3.1-dev.202112201533
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 +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +70 -45
- package/dist/es/calendar/horizontal-view-list.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +38 -19
- package/dist/es/calendar/multiview-calendar.module.js +9 -1
- package/dist/es/calendar/view-list.component.js +1 -1
- package/dist/es/datepicker/datepicker.component.js +5 -3
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.js +15 -0
- package/dist/es2015/calendar/calendar.component.d.ts +17 -3
- package/dist/es2015/calendar/calendar.component.js +71 -40
- package/dist/es2015/calendar/horizontal-view-list.component.js +1 -0
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +14 -2
- package/dist/es2015/calendar/multiview-calendar.component.js +42 -15
- package/dist/es2015/calendar/multiview-calendar.module.js +9 -1
- package/dist/es2015/calendar/view-list.component.js +5 -1
- package/dist/es2015/dateinput/dateinput.component.d.ts +2 -0
- package/dist/es2015/datepicker/datepicker.component.d.ts +2 -0
- package/dist/es2015/datepicker/datepicker.component.js +5 -3
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/util.d.ts +7 -0
- package/dist/es2015/util.js +15 -0
- package/dist/fesm2015/index.js +7013 -6927
- package/dist/fesm5/index.js +6733 -6666
- package/dist/npm/calendar/calendar.component.js +70 -45
- package/dist/npm/calendar/horizontal-view-list.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +38 -19
- package/dist/npm/calendar/multiview-calendar.module.js +9 -1
- package/dist/npm/calendar/view-list.component.js +1 -1
- package/dist/npm/datepicker/datepicker.component.js +4 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/util.js +15 -0
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
|
11
11
|
import { hasObservers, KendoInput, guid, Keys } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
13
|
import { packageMetadata } from '../package-metadata';
|
|
14
|
+
import { MultiViewCalendarComponent } from './multiview-calendar.component';
|
|
14
15
|
import { NavigationComponent } from './navigation.component';
|
|
15
16
|
import { ViewListComponent } from './view-list.component';
|
|
16
17
|
import { CalendarDOMService } from './services/dom.service';
|
|
@@ -448,15 +449,9 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
448
449
|
enumerable: true,
|
|
449
450
|
configurable: true
|
|
450
451
|
});
|
|
451
|
-
Object.defineProperty(CalendarComponent.prototype, "widgetRole", {
|
|
452
|
-
get: function () {
|
|
453
|
-
return 'grid';
|
|
454
|
-
},
|
|
455
|
-
enumerable: true,
|
|
456
|
-
configurable: true
|
|
457
|
-
});
|
|
458
452
|
Object.defineProperty(CalendarComponent.prototype, "calendarTabIndex", {
|
|
459
453
|
get: function () {
|
|
454
|
+
// in Classic mode, the inner MultiViewCalendar is the focusable element
|
|
460
455
|
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
461
456
|
},
|
|
462
457
|
enumerable: true,
|
|
@@ -464,7 +459,8 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
464
459
|
});
|
|
465
460
|
Object.defineProperty(CalendarComponent.prototype, "ariaDisabled", {
|
|
466
461
|
get: function () {
|
|
467
|
-
|
|
462
|
+
// in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
|
|
463
|
+
return this.type === 'classic' ? undefined : this.disabled;
|
|
468
464
|
},
|
|
469
465
|
enumerable: true,
|
|
470
466
|
configurable: true
|
|
@@ -550,19 +546,23 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
550
546
|
* ```
|
|
551
547
|
*/
|
|
552
548
|
CalendarComponent.prototype.focus = function () {
|
|
553
|
-
|
|
554
|
-
|
|
549
|
+
var focusTarget = this.type === 'infinite' ?
|
|
550
|
+
this.element && this.element.nativeElement :
|
|
551
|
+
this.multiViewCalendar;
|
|
552
|
+
if (isPresent(focusTarget)) {
|
|
553
|
+
focusTarget.focus();
|
|
555
554
|
}
|
|
556
|
-
this.element.nativeElement.focus();
|
|
557
555
|
};
|
|
558
556
|
/**
|
|
559
557
|
* Blurs the Calendar component.
|
|
560
558
|
*/
|
|
561
559
|
CalendarComponent.prototype.blur = function () {
|
|
562
|
-
|
|
563
|
-
|
|
560
|
+
var blurTarget = this.type === 'infinite' ?
|
|
561
|
+
this.element && this.element.nativeElement :
|
|
562
|
+
this.multiViewCalendar;
|
|
563
|
+
if (isPresent(blurTarget)) {
|
|
564
|
+
blurTarget.blur();
|
|
564
565
|
}
|
|
565
|
-
this.element.nativeElement.blur();
|
|
566
566
|
};
|
|
567
567
|
/**
|
|
568
568
|
* @hidden
|
|
@@ -691,6 +691,14 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
691
691
|
return null;
|
|
692
692
|
}
|
|
693
693
|
};
|
|
694
|
+
/**
|
|
695
|
+
* @hidden
|
|
696
|
+
*/
|
|
697
|
+
CalendarComponent.prototype.handleNavigate = function (event) {
|
|
698
|
+
this.focusedDate = event.focusedDate;
|
|
699
|
+
this.activeView = event.activeView;
|
|
700
|
+
this.emitNavigate(this.focusedDate);
|
|
701
|
+
};
|
|
694
702
|
/**
|
|
695
703
|
* @hidden
|
|
696
704
|
*/
|
|
@@ -745,6 +753,39 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
745
753
|
});
|
|
746
754
|
});
|
|
747
755
|
};
|
|
756
|
+
/**
|
|
757
|
+
* @hidden
|
|
758
|
+
*/
|
|
759
|
+
CalendarComponent.prototype.handleBlur = function (args) {
|
|
760
|
+
var _this = this;
|
|
761
|
+
if (this.element.nativeElement.contains(args.relatedTarget)) {
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
this.isActive = false;
|
|
765
|
+
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
766
|
+
// and enters the zone for no reason because the parent component is still untouched
|
|
767
|
+
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
768
|
+
this.ngZone.run(function () {
|
|
769
|
+
_this.onControlTouched();
|
|
770
|
+
_this.emitBlur(args);
|
|
771
|
+
_this.cdr.markForCheck();
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
this.emitBlur(args);
|
|
776
|
+
this.detectChanges();
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* @hidden
|
|
781
|
+
*/
|
|
782
|
+
CalendarComponent.prototype.handleFocus = function () {
|
|
783
|
+
this.isActive = true;
|
|
784
|
+
if (!NgZone.isInAngularZone()) {
|
|
785
|
+
this.detectChanges();
|
|
786
|
+
}
|
|
787
|
+
this.emitFocus();
|
|
788
|
+
};
|
|
748
789
|
CalendarComponent.prototype.setClasses = function (element) {
|
|
749
790
|
this.renderer.addClass(element, 'k-widget');
|
|
750
791
|
this.renderer.addClass(element, 'k-calendar');
|
|
@@ -789,30 +830,6 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
789
830
|
this.pickerService.onFocus.emit();
|
|
790
831
|
}
|
|
791
832
|
};
|
|
792
|
-
CalendarComponent.prototype.handleBlur = function (args) {
|
|
793
|
-
var _this = this;
|
|
794
|
-
this.isActive = false;
|
|
795
|
-
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
796
|
-
// and enters the zone for no reason because the parent component is still untouched
|
|
797
|
-
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
798
|
-
this.ngZone.run(function () {
|
|
799
|
-
_this.onControlTouched();
|
|
800
|
-
_this.emitBlur(args);
|
|
801
|
-
_this.cdr.markForCheck();
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
this.emitBlur(args);
|
|
806
|
-
this.detectChanges();
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
CalendarComponent.prototype.handleFocus = function () {
|
|
810
|
-
this.isActive = true;
|
|
811
|
-
if (!NgZone.isInAngularZone()) {
|
|
812
|
-
this.detectChanges();
|
|
813
|
-
}
|
|
814
|
-
this.emitFocus();
|
|
815
|
-
};
|
|
816
833
|
CalendarComponent.prototype.handleComponentClick = function () {
|
|
817
834
|
if (!this.isActive) {
|
|
818
835
|
if (this.type === 'infinite' && this.monthView.isScrolled()) {
|
|
@@ -823,6 +840,10 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
823
840
|
}
|
|
824
841
|
};
|
|
825
842
|
CalendarComponent.prototype.handleKeydown = function (args) {
|
|
843
|
+
var headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
|
|
844
|
+
if (headerActive) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
826
847
|
// reserve the alt + arrow key commands for the picker
|
|
827
848
|
var arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
|
|
828
849
|
if (isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
|
|
@@ -849,7 +870,12 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
849
870
|
}
|
|
850
871
|
};
|
|
851
872
|
CalendarComponent.prototype.setAriaActivedescendant = function () {
|
|
852
|
-
|
|
873
|
+
// in Classic mode, the inner MultiViewCalendar handles the activedescendant
|
|
874
|
+
if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
if (this.type === 'classic') {
|
|
878
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
|
|
853
879
|
return;
|
|
854
880
|
}
|
|
855
881
|
var focusedCellId = this.cellUID + this.focusedDate.getTime();
|
|
@@ -1050,16 +1076,15 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1050
1076
|
ViewChild(ViewListComponent, { static: false }),
|
|
1051
1077
|
tslib_1.__metadata("design:type", ViewListComponent)
|
|
1052
1078
|
], CalendarComponent.prototype, "monthView", void 0);
|
|
1079
|
+
tslib_1.__decorate([
|
|
1080
|
+
ViewChild(MultiViewCalendarComponent, { static: false }),
|
|
1081
|
+
tslib_1.__metadata("design:type", MultiViewCalendarComponent)
|
|
1082
|
+
], CalendarComponent.prototype, "multiViewCalendar", void 0);
|
|
1053
1083
|
tslib_1.__decorate([
|
|
1054
1084
|
HostBinding('attr.id'),
|
|
1055
1085
|
tslib_1.__metadata("design:type", String),
|
|
1056
1086
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1057
1087
|
], CalendarComponent.prototype, "widgetId", null);
|
|
1058
|
-
tslib_1.__decorate([
|
|
1059
|
-
HostBinding('attr.role'),
|
|
1060
|
-
tslib_1.__metadata("design:type", String),
|
|
1061
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1062
|
-
], CalendarComponent.prototype, "widgetRole", null);
|
|
1063
1088
|
tslib_1.__decorate([
|
|
1064
1089
|
HostBinding('attr.tabindex'),
|
|
1065
1090
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -1091,7 +1116,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1091
1116
|
SelectionService
|
|
1092
1117
|
],
|
|
1093
1118
|
selector: 'kendo-calendar',
|
|
1094
|
-
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)=\"
|
|
1119
|
+
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)=\"handleNavigate($event)\"\n (valueChange)=\"handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur($event)\"\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 "
|
|
1095
1120
|
}),
|
|
1096
1121
|
tslib_1.__param(12, Optional()),
|
|
1097
1122
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
@@ -349,7 +349,7 @@ var HorizontalViewListComponent = /** @class */ (function () {
|
|
|
349
349
|
Component({
|
|
350
350
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
351
351
|
selector: 'kendo-calendar-horizontal',
|
|
352
|
-
template: "\n <ng-template #tableTemplate let-date=\"date\" let-class=\"className\">\n <table\n class=\"k-content k-calendar-content k-calendar-table\"\n [ngClass]=\"class\"\n >\n <caption *ngIf=\"showViewHeader\" [ngClass]=\"getCaptionClass()\">{{ getCaptionTitle(date) }}</caption>\n <thead *ngIf=\"isMonthView()\" class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\" role=\"row\">\n <th *ngFor=\"let name of weekNames\" class=\"k-calendar-th\">{{name}}</th>\n </tr>\n </thead>\n <tbody\n class=\"k-calendar-tbody\"\n kendoCalendarView\n role=\"rowgroup\"\n direction=\"horizontal\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\"\n [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [selectionRange]=\"selectionRange\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n (cellEnter)=\"cellEnter.emit($event)\"\n (cellLeave)=\"cellLeave.emit($event)\"\n >\n </tbody>\n </table>\n </ng-template>\n\n <!-- When Next is clicked a placeholder table is rendered before the Main Table -->\n <ng-template\n *ngIf=\"nextAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: nextAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n\n <ng-template\n *kFor=\"let date of dates\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: date\n }\"\n >\n </ng-template>\n\n <!-- When Prev is clicked a placeholder table is rendered after the Main Table -->\n <ng-template\n *ngIf=\"prevAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: prevAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n "
|
|
352
|
+
template: "\n <ng-template #tableTemplate let-date=\"date\" let-class=\"className\">\n <table\n role=\"grid\"\n class=\"k-content k-calendar-content k-calendar-table\"\n [ngClass]=\"class\"\n >\n <caption *ngIf=\"showViewHeader\" [ngClass]=\"getCaptionClass()\">{{ getCaptionTitle(date) }}</caption>\n <thead *ngIf=\"isMonthView()\" class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\" role=\"row\">\n <th *ngFor=\"let name of weekNames\" class=\"k-calendar-th\">{{name}}</th>\n </tr>\n </thead>\n <tbody\n class=\"k-calendar-tbody\"\n kendoCalendarView\n role=\"rowgroup\"\n direction=\"horizontal\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\"\n [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [selectionRange]=\"selectionRange\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n (cellEnter)=\"cellEnter.emit($event)\"\n (cellLeave)=\"cellLeave.emit($event)\"\n >\n </tbody>\n </table>\n </ng-template>\n\n <!-- When Next is clicked a placeholder table is rendered before the Main Table -->\n <ng-template\n *ngIf=\"nextAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: nextAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n\n <ng-template\n *kFor=\"let date of dates\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: date\n }\"\n >\n </ng-template>\n\n <!-- When Prev is clicked a placeholder table is rendered after the Main Table -->\n <ng-template\n *ngIf=\"prevAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: prevAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n "
|
|
353
353
|
}),
|
|
354
354
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
355
355
|
IntlService,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
/* tslint:disable:no-forward-ref */
|
|
7
6
|
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
|
|
8
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
9
8
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
9
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
11
10
|
import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
|
|
12
11
|
import { HorizontalViewListComponent } from './horizontal-view-list.component';
|
|
12
|
+
import { HeaderComponent } from './header.component';
|
|
13
13
|
import { BusViewService } from './services/bus-view.service';
|
|
14
14
|
import { NavigationService } from './services/navigation.service';
|
|
15
15
|
import { SelectionService } from './services/selection.service';
|
|
@@ -114,6 +114,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
114
114
|
* @hidden
|
|
115
115
|
*/
|
|
116
116
|
this.isActive = false;
|
|
117
|
+
/**
|
|
118
|
+
* @hidden
|
|
119
|
+
*/
|
|
120
|
+
this.isHeaderActive = false;
|
|
117
121
|
/**
|
|
118
122
|
* Defines the active view that the Calendar initially renders
|
|
119
123
|
* ([see example]({% slug activeview_multiviewcalendar %})).
|
|
@@ -178,6 +182,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
178
182
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
179
183
|
*/
|
|
180
184
|
this.valueChange = new EventEmitter();
|
|
185
|
+
/**
|
|
186
|
+
* @hidden
|
|
187
|
+
*/
|
|
188
|
+
this.blurEvent = new EventEmitter();
|
|
181
189
|
this.cellUID = guid();
|
|
182
190
|
this.isHovered = false;
|
|
183
191
|
this.isPrevDisabled = true;
|
|
@@ -413,13 +421,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
413
421
|
enumerable: true,
|
|
414
422
|
configurable: true
|
|
415
423
|
});
|
|
416
|
-
Object.defineProperty(MultiViewCalendarComponent.prototype, "widgetRole", {
|
|
417
|
-
get: function () {
|
|
418
|
-
return 'grid';
|
|
419
|
-
},
|
|
420
|
-
enumerable: true,
|
|
421
|
-
configurable: true
|
|
422
|
-
});
|
|
423
424
|
Object.defineProperty(MultiViewCalendarComponent.prototype, "calendarTabIndex", {
|
|
424
425
|
get: function () {
|
|
425
426
|
return this.disabled ? undefined : this.tabIndex;
|
|
@@ -444,16 +445,22 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
444
445
|
/**
|
|
445
446
|
* @hidden
|
|
446
447
|
*/
|
|
447
|
-
MultiViewCalendarComponent.prototype.
|
|
448
|
-
|
|
448
|
+
MultiViewCalendarComponent.prototype.handleFocusout = function (event) {
|
|
449
|
+
var relatedTarget = event.relatedTarget;
|
|
450
|
+
if (!this.element.nativeElement.contains(relatedTarget)) {
|
|
451
|
+
this.blurEvent.emit(event);
|
|
452
|
+
this.onControlTouched();
|
|
453
|
+
}
|
|
449
454
|
this.isActive = false;
|
|
450
455
|
this.isHovered = false; //ensure that hovered is also not active
|
|
456
|
+
this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
|
|
451
457
|
};
|
|
452
458
|
/**
|
|
453
459
|
* @hidden
|
|
454
460
|
*/
|
|
455
461
|
MultiViewCalendarComponent.prototype.handleFocus = function () {
|
|
456
462
|
this.isActive = true;
|
|
463
|
+
this.isHeaderActive = false;
|
|
457
464
|
};
|
|
458
465
|
/**
|
|
459
466
|
* @hidden
|
|
@@ -486,6 +493,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
486
493
|
* @hidden
|
|
487
494
|
*/
|
|
488
495
|
MultiViewCalendarComponent.prototype.keydown = function (event) {
|
|
496
|
+
if (this.isHeaderActive) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
489
499
|
if (event.keyCode === Keys.Enter) {
|
|
490
500
|
this.performSelection(this.focusedDate, event);
|
|
491
501
|
}
|
|
@@ -563,6 +573,12 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
563
573
|
}
|
|
564
574
|
this.element.nativeElement.blur();
|
|
565
575
|
};
|
|
576
|
+
/**
|
|
577
|
+
* @hidden
|
|
578
|
+
*/
|
|
579
|
+
MultiViewCalendarComponent.prototype.handleHeaderFocus = function () {
|
|
580
|
+
this.isHeaderActive = true;
|
|
581
|
+
};
|
|
566
582
|
/**
|
|
567
583
|
* @hidden
|
|
568
584
|
*/
|
|
@@ -885,6 +901,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
885
901
|
Output(),
|
|
886
902
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
887
903
|
], MultiViewCalendarComponent.prototype, "valueChange", void 0);
|
|
904
|
+
tslib_1.__decorate([
|
|
905
|
+
Output('blur'),
|
|
906
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
907
|
+
], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
|
|
888
908
|
tslib_1.__decorate([
|
|
889
909
|
ContentChild(CellTemplateDirective, { static: true }),
|
|
890
910
|
tslib_1.__metadata("design:type", CellTemplateDirective)
|
|
@@ -948,6 +968,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
948
968
|
tslib_1.__metadata("design:type", HeaderTitleTemplateDirective),
|
|
949
969
|
tslib_1.__metadata("design:paramtypes", [HeaderTitleTemplateDirective])
|
|
950
970
|
], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
|
|
971
|
+
tslib_1.__decorate([
|
|
972
|
+
ViewChild(HeaderComponent, { static: false, read: ElementRef }),
|
|
973
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
974
|
+
], MultiViewCalendarComponent.prototype, "headerElement", void 0);
|
|
951
975
|
tslib_1.__decorate([
|
|
952
976
|
ViewChild(HorizontalViewListComponent, { static: false }),
|
|
953
977
|
tslib_1.__metadata("design:type", HorizontalViewListComponent)
|
|
@@ -957,11 +981,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
957
981
|
tslib_1.__metadata("design:type", String),
|
|
958
982
|
tslib_1.__metadata("design:paramtypes", [])
|
|
959
983
|
], MultiViewCalendarComponent.prototype, "widgetId", null);
|
|
960
|
-
tslib_1.__decorate([
|
|
961
|
-
HostBinding('attr.role'),
|
|
962
|
-
tslib_1.__metadata("design:type", String),
|
|
963
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
964
|
-
], MultiViewCalendarComponent.prototype, "widgetRole", null);
|
|
965
984
|
tslib_1.__decorate([
|
|
966
985
|
HostBinding('attr.tabindex'),
|
|
967
986
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -979,11 +998,11 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
979
998
|
tslib_1.__metadata("design:paramtypes", [])
|
|
980
999
|
], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
|
|
981
1000
|
tslib_1.__decorate([
|
|
982
|
-
HostListener(
|
|
1001
|
+
HostListener('focusout', ['$event']),
|
|
983
1002
|
tslib_1.__metadata("design:type", Function),
|
|
984
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
1003
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
985
1004
|
tslib_1.__metadata("design:returntype", void 0)
|
|
986
|
-
], MultiViewCalendarComponent.prototype, "
|
|
1005
|
+
], MultiViewCalendarComponent.prototype, "handleFocusout", null);
|
|
987
1006
|
tslib_1.__decorate([
|
|
988
1007
|
HostListener("focus"),
|
|
989
1008
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1038,7 +1057,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1038
1057
|
SelectionService
|
|
1039
1058
|
],
|
|
1040
1059
|
selector: 'kendo-multiviewcalendar',
|
|
1041
|
-
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 "
|
|
1060
|
+
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 [kendoEventsOutsideAngular]=\"{\n focusin: handleHeaderFocus\n }\"\n [scope]=\"this\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || (isHovered && !isHeaderActive)\"\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 "
|
|
1042
1061
|
}),
|
|
1043
1062
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
1044
1063
|
ElementRef,
|
|
@@ -7,6 +7,7 @@ import { NgModule } from '@angular/core';
|
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import { IntlModule } from '@progress/kendo-angular-intl';
|
|
9
9
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
10
|
+
import { EventsModule } from '@progress/kendo-angular-common';
|
|
10
11
|
import { CalendarCommonModule } from './calendar-common.module';
|
|
11
12
|
import { TemplatesModule } from './templates.module';
|
|
12
13
|
import { HorizontalViewListComponent } from './horizontal-view-list.component';
|
|
@@ -73,7 +74,14 @@ var MultiViewCalendarModule = /** @class */ (function () {
|
|
|
73
74
|
CalendarCommonModule,
|
|
74
75
|
TemplatesModule
|
|
75
76
|
],
|
|
76
|
-
imports: [
|
|
77
|
+
imports: [
|
|
78
|
+
CommonModule,
|
|
79
|
+
CalendarCommonModule,
|
|
80
|
+
IntlModule,
|
|
81
|
+
TemplatesModule,
|
|
82
|
+
PopupModule,
|
|
83
|
+
EventsModule
|
|
84
|
+
],
|
|
77
85
|
providers: [
|
|
78
86
|
NavigationService,
|
|
79
87
|
CenturyViewService,
|
|
@@ -287,7 +287,7 @@ var ViewListComponent = /** @class */ (function () {
|
|
|
287
287
|
Component({
|
|
288
288
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
289
289
|
selector: 'kendo-calendar-viewlist',
|
|
290
|
-
template: "\n <kendo-calendar-header\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [activeView]=\"activeView\"\n [templateRef]=\"headerTitleTemplateRef\"\n (todayButtonClick)=\"todayButtonClick.emit($event)\"\n >\n </kendo-calendar-header>\n <table class=\"k-calendar-weekdays k-calendar-table\" style=\"table-layout: auto;\" *ngIf=\"isMonthView()\">\n <thead class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\">\n <th class=\"k-calendar-th\" *ngFor=\"let name of weekNames\" [style.width.%]=\"colWidth\">{{name}}</th>\n </tr>\n </thead>\n </table>\n <kendo-virtualization\n [tabindex]=\"-1\"\n [skip]=\"skip\"\n [take]=\"take\"\n [total]=\"total\"\n [itemHeight]=\"viewHeight\"\n [topOffset]=\"viewOffset\"\n [bottomOffset]=\"bottomOffset\"\n [scrollOffsetSize]=\"viewOffset\"\n [maxScrollDifference]=\"viewHeight\"\n (pageChange)=\"onPageChange($event)\"\n (scrollChange)=\"scrollChange($event)\"\n (activeIndexChange)=\"setActiveDate($event)\"\n >\n <table
|
|
290
|
+
template: "\n <kendo-calendar-header\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [activeView]=\"activeView\"\n [templateRef]=\"headerTitleTemplateRef\"\n (todayButtonClick)=\"todayButtonClick.emit($event)\"\n >\n </kendo-calendar-header>\n <table class=\"k-calendar-weekdays k-calendar-table\" style=\"table-layout: auto;\" *ngIf=\"isMonthView()\">\n <thead class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\">\n <th class=\"k-calendar-th\" *ngFor=\"let name of weekNames\" [style.width.%]=\"colWidth\">{{name}}</th>\n </tr>\n </thead>\n </table>\n <kendo-virtualization\n [tabindex]=\"-1\"\n [skip]=\"skip\"\n [take]=\"take\"\n [total]=\"total\"\n [itemHeight]=\"viewHeight\"\n [topOffset]=\"viewOffset\"\n [bottomOffset]=\"bottomOffset\"\n [scrollOffsetSize]=\"viewOffset\"\n [maxScrollDifference]=\"viewHeight\"\n (pageChange)=\"onPageChange($event)\"\n (scrollChange)=\"scrollChange($event)\"\n (activeIndexChange)=\"setActiveDate($event)\"\n >\n <table\n #list\n role=\"grid\"\n class=\"k-calendar-table\"\n >\n <colgroup><col *ngFor=\"let _ of cols\" /></colgroup>\n\n <tbody class=\"k-calendar-tbody\"\n *kFor=\"let date of dates\"\n kendoCalendarView\n role=\"rowgroup\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\" [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n ></tbody>\n </table>\n </kendo-virtualization>\n "
|
|
291
291
|
}),
|
|
292
292
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
293
293
|
ChangeDetectorRef,
|
|
@@ -27,7 +27,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
|
|
|
27
27
|
import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
|
|
28
28
|
import { PickerService } from '../common/picker.service';
|
|
29
29
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
30
|
-
import { noop, isValidRange, setTime, isWindowAvailable } from '../util';
|
|
30
|
+
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar } from '../util';
|
|
31
31
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
32
32
|
import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
|
|
33
33
|
import { fromEvent } from 'rxjs';
|
|
@@ -120,11 +120,13 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
120
120
|
/**
|
|
121
121
|
* Specifies the smallest valid date
|
|
122
122
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
123
|
+
* By default, the `min` value is `1900-1-1`.
|
|
123
124
|
*/
|
|
124
125
|
this.min = cloneDate(MIN_DATE);
|
|
125
126
|
/**
|
|
126
127
|
* Specifies the biggest valid date
|
|
127
128
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
129
|
+
* By default, the `max` value is `2099-12-31`.
|
|
128
130
|
*/
|
|
129
131
|
this.max = cloneDate(MAX_DATE);
|
|
130
132
|
/**
|
|
@@ -716,7 +718,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
716
718
|
* @hidden
|
|
717
719
|
*/
|
|
718
720
|
DatePickerComponent.prototype.handleKeydown = function (e) {
|
|
719
|
-
var altKey = e.altKey, keyCode = e.keyCode;
|
|
721
|
+
var altKey = e.altKey, shiftKey = e.shiftKey, keyCode = e.keyCode, target = e.target;
|
|
720
722
|
if (keyCode === Keys.Escape) {
|
|
721
723
|
this.show = false;
|
|
722
724
|
}
|
|
@@ -728,7 +730,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
728
730
|
this.show = false;
|
|
729
731
|
}
|
|
730
732
|
}
|
|
731
|
-
if (keyCode === Keys.Tab && this.show && this.calendar.isActive) {
|
|
733
|
+
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
732
734
|
this.input.focus();
|
|
733
735
|
this.show = false;
|
|
734
736
|
}
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dateinputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1640014125,
|
|
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/es/util.js
CHANGED
|
@@ -340,4 +340,19 @@ export var millisecondDigitsInFormat = function (format) {
|
|
|
340
340
|
export var millisecondStepFor = function (digits) {
|
|
341
341
|
return Math.pow(10, 3 - digits);
|
|
342
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* @hidden
|
|
345
|
+
*
|
|
346
|
+
* Checks if a tab keydown would would move the focus outside of the calendar.
|
|
347
|
+
*/
|
|
348
|
+
export var isTabExitingCalendar = function (calendarType, focusedElement, shiftKey) {
|
|
349
|
+
if (!isPresent(focusedElement)) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
|
|
353
|
+
calendarType === 'classic' &&
|
|
354
|
+
(shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
|
|
355
|
+
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
356
|
+
);
|
|
357
|
+
};
|
|
343
358
|
export { ɵ0, ɵ1, ɵ2 };
|
|
@@ -6,6 +6,7 @@ import { ChangeDetectorRef, EventEmitter, ElementRef, Renderer2, AfterViewChecke
|
|
|
6
6
|
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { Day } from '@progress/kendo-date-math';
|
|
9
|
+
import { MultiViewCalendarComponent } from './multiview-calendar.component';
|
|
9
10
|
import { NavigationComponent } from './navigation.component';
|
|
10
11
|
import { ViewListComponent } from './view-list.component';
|
|
11
12
|
import { CalendarDOMService } from './services/dom.service';
|
|
@@ -273,6 +274,7 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
273
274
|
navigationItemTemplateRef: NavigationItemTemplateDirective;
|
|
274
275
|
navigationView: NavigationComponent;
|
|
275
276
|
monthView: ViewListComponent;
|
|
277
|
+
multiViewCalendar: MultiViewCalendarComponent;
|
|
276
278
|
isActive: boolean;
|
|
277
279
|
cellUID: string;
|
|
278
280
|
selectedDates: Date[];
|
|
@@ -294,7 +296,6 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
294
296
|
readonly bottomViewEnum: CalendarViewEnum;
|
|
295
297
|
readonly topViewEnum: CalendarViewEnum;
|
|
296
298
|
readonly widgetId: string;
|
|
297
|
-
readonly widgetRole: string;
|
|
298
299
|
readonly calendarTabIndex: number;
|
|
299
300
|
readonly ariaDisabled: boolean;
|
|
300
301
|
private domEvents;
|
|
@@ -387,6 +388,13 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
387
388
|
* @hidden
|
|
388
389
|
*/
|
|
389
390
|
activeCellTemplate(): any;
|
|
391
|
+
/**
|
|
392
|
+
* @hidden
|
|
393
|
+
*/
|
|
394
|
+
handleNavigate(event: {
|
|
395
|
+
focusedDate: Date;
|
|
396
|
+
activeView: CalendarView;
|
|
397
|
+
}): void;
|
|
390
398
|
/**
|
|
391
399
|
* @hidden
|
|
392
400
|
*/
|
|
@@ -408,14 +416,20 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
408
416
|
* @hidden
|
|
409
417
|
*/
|
|
410
418
|
handleWeekNumberClick(dates: Date[]): void;
|
|
419
|
+
/**
|
|
420
|
+
* @hidden
|
|
421
|
+
*/
|
|
422
|
+
handleBlur(args: any): void;
|
|
423
|
+
/**
|
|
424
|
+
* @hidden
|
|
425
|
+
*/
|
|
426
|
+
handleFocus(): void;
|
|
411
427
|
private setClasses;
|
|
412
428
|
private verifyChanges;
|
|
413
429
|
private verifyValue;
|
|
414
430
|
private bindEvents;
|
|
415
431
|
private emitBlur;
|
|
416
432
|
private emitFocus;
|
|
417
|
-
private handleBlur;
|
|
418
|
-
private handleFocus;
|
|
419
433
|
private handleComponentClick;
|
|
420
434
|
private handleKeydown;
|
|
421
435
|
private detectChanges;
|