@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
|
@@ -13,6 +13,7 @@ var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
|
13
13
|
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
14
14
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
15
15
|
var package_metadata_1 = require("../package-metadata");
|
|
16
|
+
var multiview_calendar_component_1 = require("./multiview-calendar.component");
|
|
16
17
|
var navigation_component_1 = require("./navigation.component");
|
|
17
18
|
var view_list_component_1 = require("./view-list.component");
|
|
18
19
|
var dom_service_1 = require("./services/dom.service");
|
|
@@ -451,15 +452,9 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
451
452
|
enumerable: true,
|
|
452
453
|
configurable: true
|
|
453
454
|
});
|
|
454
|
-
Object.defineProperty(CalendarComponent.prototype, "widgetRole", {
|
|
455
|
-
get: function () {
|
|
456
|
-
return 'grid';
|
|
457
|
-
},
|
|
458
|
-
enumerable: true,
|
|
459
|
-
configurable: true
|
|
460
|
-
});
|
|
461
455
|
Object.defineProperty(CalendarComponent.prototype, "calendarTabIndex", {
|
|
462
456
|
get: function () {
|
|
457
|
+
// in Classic mode, the inner MultiViewCalendar is the focusable element
|
|
463
458
|
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
464
459
|
},
|
|
465
460
|
enumerable: true,
|
|
@@ -467,7 +462,8 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
467
462
|
});
|
|
468
463
|
Object.defineProperty(CalendarComponent.prototype, "ariaDisabled", {
|
|
469
464
|
get: function () {
|
|
470
|
-
|
|
465
|
+
// in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
|
|
466
|
+
return this.type === 'classic' ? undefined : this.disabled;
|
|
471
467
|
},
|
|
472
468
|
enumerable: true,
|
|
473
469
|
configurable: true
|
|
@@ -553,19 +549,23 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
553
549
|
* ```
|
|
554
550
|
*/
|
|
555
551
|
CalendarComponent.prototype.focus = function () {
|
|
556
|
-
|
|
557
|
-
|
|
552
|
+
var focusTarget = this.type === 'infinite' ?
|
|
553
|
+
this.element && this.element.nativeElement :
|
|
554
|
+
this.multiViewCalendar;
|
|
555
|
+
if (utils_1.isPresent(focusTarget)) {
|
|
556
|
+
focusTarget.focus();
|
|
558
557
|
}
|
|
559
|
-
this.element.nativeElement.focus();
|
|
560
558
|
};
|
|
561
559
|
/**
|
|
562
560
|
* Blurs the Calendar component.
|
|
563
561
|
*/
|
|
564
562
|
CalendarComponent.prototype.blur = function () {
|
|
565
|
-
|
|
566
|
-
|
|
563
|
+
var blurTarget = this.type === 'infinite' ?
|
|
564
|
+
this.element && this.element.nativeElement :
|
|
565
|
+
this.multiViewCalendar;
|
|
566
|
+
if (utils_1.isPresent(blurTarget)) {
|
|
567
|
+
blurTarget.blur();
|
|
567
568
|
}
|
|
568
|
-
this.element.nativeElement.blur();
|
|
569
569
|
};
|
|
570
570
|
/**
|
|
571
571
|
* @hidden
|
|
@@ -694,6 +694,14 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
694
694
|
return null;
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
+
/**
|
|
698
|
+
* @hidden
|
|
699
|
+
*/
|
|
700
|
+
CalendarComponent.prototype.handleNavigate = function (event) {
|
|
701
|
+
this.focusedDate = event.focusedDate;
|
|
702
|
+
this.activeView = event.activeView;
|
|
703
|
+
this.emitNavigate(this.focusedDate);
|
|
704
|
+
};
|
|
697
705
|
/**
|
|
698
706
|
* @hidden
|
|
699
707
|
*/
|
|
@@ -748,6 +756,39 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
748
756
|
});
|
|
749
757
|
});
|
|
750
758
|
};
|
|
759
|
+
/**
|
|
760
|
+
* @hidden
|
|
761
|
+
*/
|
|
762
|
+
CalendarComponent.prototype.handleBlur = function (args) {
|
|
763
|
+
var _this = this;
|
|
764
|
+
if (this.element.nativeElement.contains(args.relatedTarget)) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
this.isActive = false;
|
|
768
|
+
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
769
|
+
// and enters the zone for no reason because the parent component is still untouched
|
|
770
|
+
if (!this.pickerService && utils_1.requiresZoneOnBlur(this.control)) {
|
|
771
|
+
this.ngZone.run(function () {
|
|
772
|
+
_this.onControlTouched();
|
|
773
|
+
_this.emitBlur(args);
|
|
774
|
+
_this.cdr.markForCheck();
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
else {
|
|
778
|
+
this.emitBlur(args);
|
|
779
|
+
this.detectChanges();
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
/**
|
|
783
|
+
* @hidden
|
|
784
|
+
*/
|
|
785
|
+
CalendarComponent.prototype.handleFocus = function () {
|
|
786
|
+
this.isActive = true;
|
|
787
|
+
if (!core_1.NgZone.isInAngularZone()) {
|
|
788
|
+
this.detectChanges();
|
|
789
|
+
}
|
|
790
|
+
this.emitFocus();
|
|
791
|
+
};
|
|
751
792
|
CalendarComponent.prototype.setClasses = function (element) {
|
|
752
793
|
this.renderer.addClass(element, 'k-widget');
|
|
753
794
|
this.renderer.addClass(element, 'k-calendar');
|
|
@@ -792,30 +833,6 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
792
833
|
this.pickerService.onFocus.emit();
|
|
793
834
|
}
|
|
794
835
|
};
|
|
795
|
-
CalendarComponent.prototype.handleBlur = function (args) {
|
|
796
|
-
var _this = this;
|
|
797
|
-
this.isActive = false;
|
|
798
|
-
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
799
|
-
// and enters the zone for no reason because the parent component is still untouched
|
|
800
|
-
if (!this.pickerService && utils_1.requiresZoneOnBlur(this.control)) {
|
|
801
|
-
this.ngZone.run(function () {
|
|
802
|
-
_this.onControlTouched();
|
|
803
|
-
_this.emitBlur(args);
|
|
804
|
-
_this.cdr.markForCheck();
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
this.emitBlur(args);
|
|
809
|
-
this.detectChanges();
|
|
810
|
-
}
|
|
811
|
-
};
|
|
812
|
-
CalendarComponent.prototype.handleFocus = function () {
|
|
813
|
-
this.isActive = true;
|
|
814
|
-
if (!core_1.NgZone.isInAngularZone()) {
|
|
815
|
-
this.detectChanges();
|
|
816
|
-
}
|
|
817
|
-
this.emitFocus();
|
|
818
|
-
};
|
|
819
836
|
CalendarComponent.prototype.handleComponentClick = function () {
|
|
820
837
|
if (!this.isActive) {
|
|
821
838
|
if (this.type === 'infinite' && this.monthView.isScrolled()) {
|
|
@@ -826,6 +843,10 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
826
843
|
}
|
|
827
844
|
};
|
|
828
845
|
CalendarComponent.prototype.handleKeydown = function (args) {
|
|
846
|
+
var headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
|
|
847
|
+
if (headerActive) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
829
850
|
// reserve the alt + arrow key commands for the picker
|
|
830
851
|
var arrowKeyPressed = [kendo_angular_common_1.Keys.ArrowUp, kendo_angular_common_1.Keys.ArrowRight, kendo_angular_common_1.Keys.ArrowDown, kendo_angular_common_1.Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
|
|
831
852
|
if (utils_1.isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
|
|
@@ -852,7 +873,12 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
852
873
|
}
|
|
853
874
|
};
|
|
854
875
|
CalendarComponent.prototype.setAriaActivedescendant = function () {
|
|
855
|
-
|
|
876
|
+
// in Classic mode, the inner MultiViewCalendar handles the activedescendant
|
|
877
|
+
if (!utils_1.isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
if (this.type === 'classic') {
|
|
881
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
|
|
856
882
|
return;
|
|
857
883
|
}
|
|
858
884
|
var focusedCellId = this.cellUID + this.focusedDate.getTime();
|
|
@@ -1053,16 +1079,15 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1053
1079
|
core_1.ViewChild(view_list_component_1.ViewListComponent, { static: false }),
|
|
1054
1080
|
tslib_1.__metadata("design:type", view_list_component_1.ViewListComponent)
|
|
1055
1081
|
], CalendarComponent.prototype, "monthView", void 0);
|
|
1082
|
+
tslib_1.__decorate([
|
|
1083
|
+
core_1.ViewChild(multiview_calendar_component_1.MultiViewCalendarComponent, { static: false }),
|
|
1084
|
+
tslib_1.__metadata("design:type", multiview_calendar_component_1.MultiViewCalendarComponent)
|
|
1085
|
+
], CalendarComponent.prototype, "multiViewCalendar", void 0);
|
|
1056
1086
|
tslib_1.__decorate([
|
|
1057
1087
|
core_1.HostBinding('attr.id'),
|
|
1058
1088
|
tslib_1.__metadata("design:type", String),
|
|
1059
1089
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1060
1090
|
], CalendarComponent.prototype, "widgetId", null);
|
|
1061
|
-
tslib_1.__decorate([
|
|
1062
|
-
core_1.HostBinding('attr.role'),
|
|
1063
|
-
tslib_1.__metadata("design:type", String),
|
|
1064
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1065
|
-
], CalendarComponent.prototype, "widgetRole", null);
|
|
1066
1091
|
tslib_1.__decorate([
|
|
1067
1092
|
core_1.HostBinding('attr.tabindex'),
|
|
1068
1093
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -1094,7 +1119,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1094
1119
|
selection_service_1.SelectionService
|
|
1095
1120
|
],
|
|
1096
1121
|
selector: 'kendo-calendar',
|
|
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)=\"
|
|
1122
|
+
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 "
|
|
1098
1123
|
}),
|
|
1099
1124
|
tslib_1.__param(12, core_1.Optional()),
|
|
1100
1125
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|
|
@@ -351,7 +351,7 @@ var HorizontalViewListComponent = /** @class */ (function () {
|
|
|
351
351
|
core_1.Component({
|
|
352
352
|
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
353
353
|
selector: 'kendo-calendar-horizontal',
|
|
354
|
-
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 "
|
|
354
|
+
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 "
|
|
355
355
|
}),
|
|
356
356
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|
|
357
357
|
kendo_angular_intl_1.IntlService,
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"use strict";
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
|
-
/* tslint:disable:no-forward-ref */
|
|
9
8
|
var core_1 = require("@angular/core");
|
|
10
9
|
var forms_1 = require("@angular/forms");
|
|
11
10
|
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
12
11
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
13
12
|
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
14
13
|
var horizontal_view_list_component_1 = require("./horizontal-view-list.component");
|
|
14
|
+
var header_component_1 = require("./header.component");
|
|
15
15
|
var bus_view_service_1 = require("./services/bus-view.service");
|
|
16
16
|
var navigation_service_1 = require("./services/navigation.service");
|
|
17
17
|
var selection_service_1 = require("./services/selection.service");
|
|
@@ -116,6 +116,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
116
116
|
* @hidden
|
|
117
117
|
*/
|
|
118
118
|
this.isActive = false;
|
|
119
|
+
/**
|
|
120
|
+
* @hidden
|
|
121
|
+
*/
|
|
122
|
+
this.isHeaderActive = false;
|
|
119
123
|
/**
|
|
120
124
|
* Defines the active view that the Calendar initially renders
|
|
121
125
|
* ([see example]({% slug activeview_multiviewcalendar %})).
|
|
@@ -180,6 +184,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
180
184
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
181
185
|
*/
|
|
182
186
|
this.valueChange = new core_1.EventEmitter();
|
|
187
|
+
/**
|
|
188
|
+
* @hidden
|
|
189
|
+
*/
|
|
190
|
+
this.blurEvent = new core_1.EventEmitter();
|
|
183
191
|
this.cellUID = kendo_angular_common_1.guid();
|
|
184
192
|
this.isHovered = false;
|
|
185
193
|
this.isPrevDisabled = true;
|
|
@@ -415,13 +423,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
415
423
|
enumerable: true,
|
|
416
424
|
configurable: true
|
|
417
425
|
});
|
|
418
|
-
Object.defineProperty(MultiViewCalendarComponent.prototype, "widgetRole", {
|
|
419
|
-
get: function () {
|
|
420
|
-
return 'grid';
|
|
421
|
-
},
|
|
422
|
-
enumerable: true,
|
|
423
|
-
configurable: true
|
|
424
|
-
});
|
|
425
426
|
Object.defineProperty(MultiViewCalendarComponent.prototype, "calendarTabIndex", {
|
|
426
427
|
get: function () {
|
|
427
428
|
return this.disabled ? undefined : this.tabIndex;
|
|
@@ -446,16 +447,22 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
446
447
|
/**
|
|
447
448
|
* @hidden
|
|
448
449
|
*/
|
|
449
|
-
MultiViewCalendarComponent.prototype.
|
|
450
|
-
|
|
450
|
+
MultiViewCalendarComponent.prototype.handleFocusout = function (event) {
|
|
451
|
+
var relatedTarget = event.relatedTarget;
|
|
452
|
+
if (!this.element.nativeElement.contains(relatedTarget)) {
|
|
453
|
+
this.blurEvent.emit(event);
|
|
454
|
+
this.onControlTouched();
|
|
455
|
+
}
|
|
451
456
|
this.isActive = false;
|
|
452
457
|
this.isHovered = false; //ensure that hovered is also not active
|
|
458
|
+
this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
|
|
453
459
|
};
|
|
454
460
|
/**
|
|
455
461
|
* @hidden
|
|
456
462
|
*/
|
|
457
463
|
MultiViewCalendarComponent.prototype.handleFocus = function () {
|
|
458
464
|
this.isActive = true;
|
|
465
|
+
this.isHeaderActive = false;
|
|
459
466
|
};
|
|
460
467
|
/**
|
|
461
468
|
* @hidden
|
|
@@ -488,6 +495,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
488
495
|
* @hidden
|
|
489
496
|
*/
|
|
490
497
|
MultiViewCalendarComponent.prototype.keydown = function (event) {
|
|
498
|
+
if (this.isHeaderActive) {
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
491
501
|
if (event.keyCode === kendo_angular_common_1.Keys.Enter) {
|
|
492
502
|
this.performSelection(this.focusedDate, event);
|
|
493
503
|
}
|
|
@@ -565,6 +575,12 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
565
575
|
}
|
|
566
576
|
this.element.nativeElement.blur();
|
|
567
577
|
};
|
|
578
|
+
/**
|
|
579
|
+
* @hidden
|
|
580
|
+
*/
|
|
581
|
+
MultiViewCalendarComponent.prototype.handleHeaderFocus = function () {
|
|
582
|
+
this.isHeaderActive = true;
|
|
583
|
+
};
|
|
568
584
|
/**
|
|
569
585
|
* @hidden
|
|
570
586
|
*/
|
|
@@ -887,6 +903,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
887
903
|
core_1.Output(),
|
|
888
904
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
889
905
|
], MultiViewCalendarComponent.prototype, "valueChange", void 0);
|
|
906
|
+
tslib_1.__decorate([
|
|
907
|
+
core_1.Output('blur'),
|
|
908
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
909
|
+
], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
|
|
890
910
|
tslib_1.__decorate([
|
|
891
911
|
core_1.ContentChild(cell_template_directive_1.CellTemplateDirective, { static: true }),
|
|
892
912
|
tslib_1.__metadata("design:type", cell_template_directive_1.CellTemplateDirective)
|
|
@@ -950,6 +970,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
950
970
|
tslib_1.__metadata("design:type", header_title_template_directive_1.HeaderTitleTemplateDirective),
|
|
951
971
|
tslib_1.__metadata("design:paramtypes", [header_title_template_directive_1.HeaderTitleTemplateDirective])
|
|
952
972
|
], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
|
|
973
|
+
tslib_1.__decorate([
|
|
974
|
+
core_1.ViewChild(header_component_1.HeaderComponent, { static: false, read: core_1.ElementRef }),
|
|
975
|
+
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
976
|
+
], MultiViewCalendarComponent.prototype, "headerElement", void 0);
|
|
953
977
|
tslib_1.__decorate([
|
|
954
978
|
core_1.ViewChild(horizontal_view_list_component_1.HorizontalViewListComponent, { static: false }),
|
|
955
979
|
tslib_1.__metadata("design:type", horizontal_view_list_component_1.HorizontalViewListComponent)
|
|
@@ -959,11 +983,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
959
983
|
tslib_1.__metadata("design:type", String),
|
|
960
984
|
tslib_1.__metadata("design:paramtypes", [])
|
|
961
985
|
], MultiViewCalendarComponent.prototype, "widgetId", null);
|
|
962
|
-
tslib_1.__decorate([
|
|
963
|
-
core_1.HostBinding('attr.role'),
|
|
964
|
-
tslib_1.__metadata("design:type", String),
|
|
965
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
966
|
-
], MultiViewCalendarComponent.prototype, "widgetRole", null);
|
|
967
986
|
tslib_1.__decorate([
|
|
968
987
|
core_1.HostBinding('attr.tabindex'),
|
|
969
988
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -981,11 +1000,11 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
981
1000
|
tslib_1.__metadata("design:paramtypes", [])
|
|
982
1001
|
], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
|
|
983
1002
|
tslib_1.__decorate([
|
|
984
|
-
core_1.HostListener(
|
|
1003
|
+
core_1.HostListener('focusout', ['$event']),
|
|
985
1004
|
tslib_1.__metadata("design:type", Function),
|
|
986
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
1005
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
987
1006
|
tslib_1.__metadata("design:returntype", void 0)
|
|
988
|
-
], MultiViewCalendarComponent.prototype, "
|
|
1007
|
+
], MultiViewCalendarComponent.prototype, "handleFocusout", null);
|
|
989
1008
|
tslib_1.__decorate([
|
|
990
1009
|
core_1.HostListener("focus"),
|
|
991
1010
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1040,7 +1059,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1040
1059
|
selection_service_1.SelectionService
|
|
1041
1060
|
],
|
|
1042
1061
|
selector: 'kendo-multiviewcalendar',
|
|
1043
|
-
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 "
|
|
1062
|
+
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 "
|
|
1044
1063
|
}),
|
|
1045
1064
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|
|
1046
1065
|
core_1.ElementRef,
|
|
@@ -9,6 +9,7 @@ var core_1 = require("@angular/core");
|
|
|
9
9
|
var common_1 = require("@angular/common");
|
|
10
10
|
var kendo_angular_intl_1 = require("@progress/kendo-angular-intl");
|
|
11
11
|
var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
|
|
12
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
12
13
|
var calendar_common_module_1 = require("./calendar-common.module");
|
|
13
14
|
var templates_module_1 = require("./templates.module");
|
|
14
15
|
var horizontal_view_list_component_1 = require("./horizontal-view-list.component");
|
|
@@ -75,7 +76,14 @@ var MultiViewCalendarModule = /** @class */ (function () {
|
|
|
75
76
|
calendar_common_module_1.CalendarCommonModule,
|
|
76
77
|
templates_module_1.TemplatesModule
|
|
77
78
|
],
|
|
78
|
-
imports: [
|
|
79
|
+
imports: [
|
|
80
|
+
common_1.CommonModule,
|
|
81
|
+
calendar_common_module_1.CalendarCommonModule,
|
|
82
|
+
kendo_angular_intl_1.IntlModule,
|
|
83
|
+
templates_module_1.TemplatesModule,
|
|
84
|
+
kendo_angular_popup_1.PopupModule,
|
|
85
|
+
kendo_angular_common_1.EventsModule
|
|
86
|
+
],
|
|
79
87
|
providers: [
|
|
80
88
|
navigation_service_1.NavigationService,
|
|
81
89
|
century_view_service_1.CenturyViewService,
|
|
@@ -290,7 +290,7 @@ var ViewListComponent = /** @class */ (function () {
|
|
|
290
290
|
core_1.Component({
|
|
291
291
|
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
292
292
|
selector: 'kendo-calendar-viewlist',
|
|
293
|
-
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
|
|
293
|
+
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 "
|
|
294
294
|
}),
|
|
295
295
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|
|
296
296
|
core_1.ChangeDetectorRef,
|
|
@@ -122,11 +122,13 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
122
122
|
/**
|
|
123
123
|
* Specifies the smallest valid date
|
|
124
124
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
125
|
+
* By default, the `min` value is `1900-1-1`.
|
|
125
126
|
*/
|
|
126
127
|
this.min = kendo_date_math_1.cloneDate(defaults_1.MIN_DATE);
|
|
127
128
|
/**
|
|
128
129
|
* Specifies the biggest valid date
|
|
129
130
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
131
|
+
* By default, the `max` value is `2099-12-31`.
|
|
130
132
|
*/
|
|
131
133
|
this.max = kendo_date_math_1.cloneDate(defaults_1.MAX_DATE);
|
|
132
134
|
/**
|
|
@@ -718,7 +720,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
718
720
|
* @hidden
|
|
719
721
|
*/
|
|
720
722
|
DatePickerComponent.prototype.handleKeydown = function (e) {
|
|
721
|
-
var altKey = e.altKey, keyCode = e.keyCode;
|
|
723
|
+
var altKey = e.altKey, shiftKey = e.shiftKey, keyCode = e.keyCode, target = e.target;
|
|
722
724
|
if (keyCode === kendo_angular_common_1.Keys.Escape) {
|
|
723
725
|
this.show = false;
|
|
724
726
|
}
|
|
@@ -730,7 +732,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
730
732
|
this.show = false;
|
|
731
733
|
}
|
|
732
734
|
}
|
|
733
|
-
if (keyCode === kendo_angular_common_1.Keys.Tab && this.show && this.calendar.isActive) {
|
|
735
|
+
if (keyCode === kendo_angular_common_1.Keys.Tab && this.show && this.calendar.isActive && util_1.isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
734
736
|
this.input.focus();
|
|
735
737
|
this.show = false;
|
|
736
738
|
}
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-dateinputs',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1640014125,
|
|
15
15
|
version: '',
|
|
16
16
|
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'
|
|
17
17
|
};
|
package/dist/npm/util.js
CHANGED
|
@@ -345,3 +345,18 @@ exports.millisecondDigitsInFormat = function (format) {
|
|
|
345
345
|
exports.millisecondStepFor = function (digits) {
|
|
346
346
|
return Math.pow(10, 3 - digits);
|
|
347
347
|
};
|
|
348
|
+
/**
|
|
349
|
+
* @hidden
|
|
350
|
+
*
|
|
351
|
+
* Checks if a tab keydown would would move the focus outside of the calendar.
|
|
352
|
+
*/
|
|
353
|
+
exports.isTabExitingCalendar = function (calendarType, focusedElement, shiftKey) {
|
|
354
|
+
if (!utils_1.isPresent(focusedElement)) {
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
|
|
358
|
+
calendarType === 'classic' &&
|
|
359
|
+
(shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
|
|
360
|
+
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
361
|
+
);
|
|
362
|
+
};
|