@progress/kendo-angular-dateinputs 5.3.1-dev.202112201533 → 5.3.1-dev.202201070925
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/multiview-calendar.component.js +10 -3
- package/dist/es/datepicker/datepicker.component.js +3 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +3 -1
- package/dist/es2015/calendar/multiview-calendar.component.js +10 -3
- package/dist/es2015/datepicker/datepicker.component.js +3 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +25 -16
- package/dist/fesm5/index.js +26 -17
- package/dist/npm/calendar/multiview-calendar.component.js +9 -2
- package/dist/npm/datepicker/datepicker.component.js +3 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
|
|
6
|
+
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone, Optional } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
8
8
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
@@ -30,6 +30,7 @@ import { MIN_DATE, MAX_DATE } from '../defaults';
|
|
|
30
30
|
import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
|
|
31
31
|
import { Subscription } from 'rxjs';
|
|
32
32
|
import { isPresent } from '../common/utils';
|
|
33
|
+
import { PickerService } from '../common/picker.service';
|
|
33
34
|
var BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
34
35
|
var TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
35
36
|
var MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -66,7 +67,7 @@ export var RANGE_CALENDAR_RANGE_VALIDATORS = {
|
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
var MultiViewCalendarComponent = /** @class */ (function () {
|
|
69
|
-
function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
|
|
70
|
+
function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
|
|
70
71
|
this.bus = bus;
|
|
71
72
|
this.element = element;
|
|
72
73
|
this.navigator = navigator;
|
|
@@ -75,6 +76,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
75
76
|
this.zone = zone;
|
|
76
77
|
this.disabledDatesService = disabledDatesService;
|
|
77
78
|
this.selectionService = selectionService;
|
|
79
|
+
this.pickerService = pickerService;
|
|
78
80
|
/**
|
|
79
81
|
* @hidden
|
|
80
82
|
*/
|
|
@@ -497,6 +499,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
497
499
|
return;
|
|
498
500
|
}
|
|
499
501
|
if (event.keyCode === Keys.Enter) {
|
|
502
|
+
if (isPresent(this.pickerService)) {
|
|
503
|
+
event.preventDefault(); // Don't submit form from Datepicker popup
|
|
504
|
+
}
|
|
500
505
|
this.performSelection(this.focusedDate, event);
|
|
501
506
|
}
|
|
502
507
|
var candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
|
|
@@ -1059,6 +1064,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1059
1064
|
selector: 'kendo-multiviewcalendar',
|
|
1060
1065
|
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 "
|
|
1061
1066
|
}),
|
|
1067
|
+
tslib_1.__param(8, Optional()),
|
|
1062
1068
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
1063
1069
|
ElementRef,
|
|
1064
1070
|
NavigationService,
|
|
@@ -1066,7 +1072,8 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1066
1072
|
ChangeDetectorRef,
|
|
1067
1073
|
NgZone,
|
|
1068
1074
|
DisabledDatesService,
|
|
1069
|
-
SelectionService
|
|
1075
|
+
SelectionService,
|
|
1076
|
+
PickerService])
|
|
1070
1077
|
], MultiViewCalendarComponent);
|
|
1071
1078
|
return MultiViewCalendarComponent;
|
|
1072
1079
|
}());
|
|
@@ -730,6 +730,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
730
730
|
this.show = false;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
+
if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
|
|
734
|
+
e.preventDefault(); // Don't submit form on date selection in popup
|
|
735
|
+
}
|
|
733
736
|
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
734
737
|
this.input.focus();
|
|
735
738
|
this.show = false;
|
|
@@ -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: 1641547209,
|
|
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
|
};
|
|
@@ -24,6 +24,7 @@ import { CalendarViewEnum } from './models/view.enum';
|
|
|
24
24
|
import { SelectionRangeEnd } from './models/selection-range-end.type';
|
|
25
25
|
import { SelectionRange } from './models/selection-range.interface';
|
|
26
26
|
import { CalendarSelection } from './models/selection';
|
|
27
|
+
import { PickerService } from '../common/picker.service';
|
|
27
28
|
/**
|
|
28
29
|
* @hidden
|
|
29
30
|
*/
|
|
@@ -55,6 +56,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
55
56
|
private zone;
|
|
56
57
|
private disabledDatesService;
|
|
57
58
|
private selectionService;
|
|
59
|
+
private pickerService?;
|
|
58
60
|
/**
|
|
59
61
|
* @hidden
|
|
60
62
|
*/
|
|
@@ -333,7 +335,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
333
335
|
* @hidden
|
|
334
336
|
*/
|
|
335
337
|
keydown(event: KeyDown): void;
|
|
336
|
-
constructor(bus: BusViewService, element: ElementRef, navigator: NavigationService, renderer: Renderer2, cdr: ChangeDetectorRef, zone: NgZone, disabledDatesService: DisabledDatesService, selectionService: SelectionService);
|
|
338
|
+
constructor(bus: BusViewService, element: ElementRef, navigator: NavigationService, renderer: Renderer2, cdr: ChangeDetectorRef, zone: NgZone, disabledDatesService: DisabledDatesService, selectionService: SelectionService, pickerService?: PickerService);
|
|
337
339
|
ngOnInit(): void;
|
|
338
340
|
ngOnChanges(changes: any): void;
|
|
339
341
|
ngOnDestroy(): void;
|
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
|
|
6
|
+
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone, Optional } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
8
8
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
@@ -30,6 +30,7 @@ import { MIN_DATE, MAX_DATE } from '../defaults';
|
|
|
30
30
|
import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
|
|
31
31
|
import { Subscription } from 'rxjs';
|
|
32
32
|
import { isPresent } from '../common/utils';
|
|
33
|
+
import { PickerService } from '../common/picker.service';
|
|
33
34
|
const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
34
35
|
const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
35
36
|
const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -66,7 +67,7 @@ export const RANGE_CALENDAR_RANGE_VALIDATORS = {
|
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
69
|
-
constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
|
|
70
|
+
constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
|
|
70
71
|
this.bus = bus;
|
|
71
72
|
this.element = element;
|
|
72
73
|
this.navigator = navigator;
|
|
@@ -75,6 +76,7 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
75
76
|
this.zone = zone;
|
|
76
77
|
this.disabledDatesService = disabledDatesService;
|
|
77
78
|
this.selectionService = selectionService;
|
|
79
|
+
this.pickerService = pickerService;
|
|
78
80
|
/**
|
|
79
81
|
* @hidden
|
|
80
82
|
*/
|
|
@@ -413,6 +415,9 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
413
415
|
return;
|
|
414
416
|
}
|
|
415
417
|
if (event.keyCode === Keys.Enter) {
|
|
418
|
+
if (isPresent(this.pickerService)) {
|
|
419
|
+
event.preventDefault(); // Don't submit form from Datepicker popup
|
|
420
|
+
}
|
|
416
421
|
this.performSelection(this.focusedDate, event);
|
|
417
422
|
}
|
|
418
423
|
const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
|
|
@@ -1025,6 +1030,7 @@ MultiViewCalendarComponent = tslib_1.__decorate([
|
|
|
1025
1030
|
</kendo-calendar-horizontal>
|
|
1026
1031
|
`
|
|
1027
1032
|
}),
|
|
1033
|
+
tslib_1.__param(8, Optional()),
|
|
1028
1034
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
1029
1035
|
ElementRef,
|
|
1030
1036
|
NavigationService,
|
|
@@ -1032,6 +1038,7 @@ MultiViewCalendarComponent = tslib_1.__decorate([
|
|
|
1032
1038
|
ChangeDetectorRef,
|
|
1033
1039
|
NgZone,
|
|
1034
1040
|
DisabledDatesService,
|
|
1035
|
-
SelectionService
|
|
1041
|
+
SelectionService,
|
|
1042
|
+
PickerService])
|
|
1036
1043
|
], MultiViewCalendarComponent);
|
|
1037
1044
|
export { MultiViewCalendarComponent };
|
|
@@ -643,6 +643,9 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
643
643
|
this.show = false;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
+
if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
|
|
647
|
+
e.preventDefault(); // Don't submit form on date selection in popup
|
|
648
|
+
}
|
|
646
649
|
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
647
650
|
this.input.focus();
|
|
648
651
|
this.show = false;
|