@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';
|
|
@@ -372,14 +373,13 @@ let CalendarComponent = class CalendarComponent {
|
|
|
372
373
|
get widgetId() {
|
|
373
374
|
return this.id;
|
|
374
375
|
}
|
|
375
|
-
get widgetRole() {
|
|
376
|
-
return 'grid';
|
|
377
|
-
}
|
|
378
376
|
get calendarTabIndex() {
|
|
377
|
+
// in Classic mode, the inner MultiViewCalendar is the focusable element
|
|
379
378
|
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
380
379
|
}
|
|
381
380
|
get ariaDisabled() {
|
|
382
|
-
|
|
381
|
+
// in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
|
|
382
|
+
return this.type === 'classic' ? undefined : this.disabled;
|
|
383
383
|
}
|
|
384
384
|
ngOnInit() {
|
|
385
385
|
this.dom.calculateHeights(this.element.nativeElement);
|
|
@@ -458,19 +458,23 @@ let CalendarComponent = class CalendarComponent {
|
|
|
458
458
|
* ```
|
|
459
459
|
*/
|
|
460
460
|
focus() {
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
const focusTarget = this.type === 'infinite' ?
|
|
462
|
+
this.element && this.element.nativeElement :
|
|
463
|
+
this.multiViewCalendar;
|
|
464
|
+
if (isPresent(focusTarget)) {
|
|
465
|
+
focusTarget.focus();
|
|
463
466
|
}
|
|
464
|
-
this.element.nativeElement.focus();
|
|
465
467
|
}
|
|
466
468
|
/**
|
|
467
469
|
* Blurs the Calendar component.
|
|
468
470
|
*/
|
|
469
471
|
blur() {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
+
const blurTarget = this.type === 'infinite' ?
|
|
473
|
+
this.element && this.element.nativeElement :
|
|
474
|
+
this.multiViewCalendar;
|
|
475
|
+
if (isPresent(blurTarget)) {
|
|
476
|
+
blurTarget.blur();
|
|
472
477
|
}
|
|
473
|
-
this.element.nativeElement.blur();
|
|
474
478
|
}
|
|
475
479
|
/**
|
|
476
480
|
* @hidden
|
|
@@ -596,6 +600,14 @@ let CalendarComponent = class CalendarComponent {
|
|
|
596
600
|
return null;
|
|
597
601
|
}
|
|
598
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* @hidden
|
|
605
|
+
*/
|
|
606
|
+
handleNavigate(event) {
|
|
607
|
+
this.focusedDate = event.focusedDate;
|
|
608
|
+
this.activeView = event.activeView;
|
|
609
|
+
this.emitNavigate(this.focusedDate);
|
|
610
|
+
}
|
|
599
611
|
/**
|
|
600
612
|
* @hidden
|
|
601
613
|
*/
|
|
@@ -648,6 +660,38 @@ let CalendarComponent = class CalendarComponent {
|
|
|
648
660
|
});
|
|
649
661
|
});
|
|
650
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* @hidden
|
|
665
|
+
*/
|
|
666
|
+
handleBlur(args) {
|
|
667
|
+
if (this.element.nativeElement.contains(args.relatedTarget)) {
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
this.isActive = false;
|
|
671
|
+
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
672
|
+
// and enters the zone for no reason because the parent component is still untouched
|
|
673
|
+
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
674
|
+
this.ngZone.run(() => {
|
|
675
|
+
this.onControlTouched();
|
|
676
|
+
this.emitBlur(args);
|
|
677
|
+
this.cdr.markForCheck();
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
this.emitBlur(args);
|
|
682
|
+
this.detectChanges();
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* @hidden
|
|
687
|
+
*/
|
|
688
|
+
handleFocus() {
|
|
689
|
+
this.isActive = true;
|
|
690
|
+
if (!NgZone.isInAngularZone()) {
|
|
691
|
+
this.detectChanges();
|
|
692
|
+
}
|
|
693
|
+
this.emitFocus();
|
|
694
|
+
}
|
|
651
695
|
setClasses(element) {
|
|
652
696
|
this.renderer.addClass(element, 'k-widget');
|
|
653
697
|
this.renderer.addClass(element, 'k-calendar');
|
|
@@ -692,29 +736,6 @@ let CalendarComponent = class CalendarComponent {
|
|
|
692
736
|
this.pickerService.onFocus.emit();
|
|
693
737
|
}
|
|
694
738
|
}
|
|
695
|
-
handleBlur(args) {
|
|
696
|
-
this.isActive = false;
|
|
697
|
-
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
698
|
-
// and enters the zone for no reason because the parent component is still untouched
|
|
699
|
-
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
700
|
-
this.ngZone.run(() => {
|
|
701
|
-
this.onControlTouched();
|
|
702
|
-
this.emitBlur(args);
|
|
703
|
-
this.cdr.markForCheck();
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
this.emitBlur(args);
|
|
708
|
-
this.detectChanges();
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
handleFocus() {
|
|
712
|
-
this.isActive = true;
|
|
713
|
-
if (!NgZone.isInAngularZone()) {
|
|
714
|
-
this.detectChanges();
|
|
715
|
-
}
|
|
716
|
-
this.emitFocus();
|
|
717
|
-
}
|
|
718
739
|
handleComponentClick() {
|
|
719
740
|
if (!this.isActive) {
|
|
720
741
|
if (this.type === 'infinite' && this.monthView.isScrolled()) {
|
|
@@ -725,6 +746,10 @@ let CalendarComponent = class CalendarComponent {
|
|
|
725
746
|
}
|
|
726
747
|
}
|
|
727
748
|
handleKeydown(args) {
|
|
749
|
+
const headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
|
|
750
|
+
if (headerActive) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
728
753
|
// reserve the alt + arrow key commands for the picker
|
|
729
754
|
const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
|
|
730
755
|
if (isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
|
|
@@ -751,7 +776,12 @@ let CalendarComponent = class CalendarComponent {
|
|
|
751
776
|
}
|
|
752
777
|
}
|
|
753
778
|
setAriaActivedescendant() {
|
|
754
|
-
|
|
779
|
+
// in Classic mode, the inner MultiViewCalendar handles the activedescendant
|
|
780
|
+
if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
if (this.type === 'classic') {
|
|
784
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
|
|
755
785
|
return;
|
|
756
786
|
}
|
|
757
787
|
const focusedCellId = this.cellUID + this.focusedDate.getTime();
|
|
@@ -953,16 +983,15 @@ tslib_1.__decorate([
|
|
|
953
983
|
ViewChild(ViewListComponent, { static: false }),
|
|
954
984
|
tslib_1.__metadata("design:type", ViewListComponent)
|
|
955
985
|
], CalendarComponent.prototype, "monthView", void 0);
|
|
986
|
+
tslib_1.__decorate([
|
|
987
|
+
ViewChild(MultiViewCalendarComponent, { static: false }),
|
|
988
|
+
tslib_1.__metadata("design:type", MultiViewCalendarComponent)
|
|
989
|
+
], CalendarComponent.prototype, "multiViewCalendar", void 0);
|
|
956
990
|
tslib_1.__decorate([
|
|
957
991
|
HostBinding('attr.id'),
|
|
958
992
|
tslib_1.__metadata("design:type", String),
|
|
959
993
|
tslib_1.__metadata("design:paramtypes", [])
|
|
960
994
|
], CalendarComponent.prototype, "widgetId", null);
|
|
961
|
-
tslib_1.__decorate([
|
|
962
|
-
HostBinding('attr.role'),
|
|
963
|
-
tslib_1.__metadata("design:type", String),
|
|
964
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
965
|
-
], CalendarComponent.prototype, "widgetRole", null);
|
|
966
995
|
tslib_1.__decorate([
|
|
967
996
|
HostBinding('attr.tabindex'),
|
|
968
997
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -1066,8 +1095,10 @@ CalendarComponent = tslib_1.__decorate([
|
|
|
1066
1095
|
[value]="value"
|
|
1067
1096
|
[disabledDates]="disabledDates"
|
|
1068
1097
|
(activeViewChange)="handleActiveViewChange($event)"
|
|
1069
|
-
(navigate)="
|
|
1098
|
+
(navigate)="handleNavigate($event)"
|
|
1070
1099
|
(valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
|
|
1100
|
+
(focus)="handleFocus()"
|
|
1101
|
+
(blur)="handleBlur($event)"
|
|
1071
1102
|
>
|
|
1072
1103
|
<kendo-multiviewcalendar-messages
|
|
1073
1104
|
[today]="localization.get('today')"
|
|
@@ -126,6 +126,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
126
126
|
* @hidden
|
|
127
127
|
*/
|
|
128
128
|
isActive: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* @hidden
|
|
131
|
+
*/
|
|
132
|
+
isHeaderActive: boolean;
|
|
129
133
|
/**
|
|
130
134
|
* Sets the dates of the MultiViewCalendar that will be disabled
|
|
131
135
|
* ([see example]({% slug disabled_dates_multiviewcalendar %})).
|
|
@@ -210,6 +214,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
210
214
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
211
215
|
*/
|
|
212
216
|
valueChange: EventEmitter<any>;
|
|
217
|
+
/**
|
|
218
|
+
* @hidden
|
|
219
|
+
*/
|
|
220
|
+
blurEvent: EventEmitter<any>;
|
|
213
221
|
/**
|
|
214
222
|
* @hidden
|
|
215
223
|
*/
|
|
@@ -266,6 +274,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
266
274
|
* @hidden
|
|
267
275
|
*/
|
|
268
276
|
headerTitleTemplateRef: HeaderTitleTemplateDirective;
|
|
277
|
+
headerElement: ElementRef<HTMLElement>;
|
|
269
278
|
viewList: HorizontalViewListComponent;
|
|
270
279
|
cellUID: string;
|
|
271
280
|
isHovered: boolean;
|
|
@@ -293,14 +302,13 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
293
302
|
readonly bottomViewEnum: CalendarViewEnum;
|
|
294
303
|
readonly topViewEnum: CalendarViewEnum;
|
|
295
304
|
readonly widgetId: string;
|
|
296
|
-
readonly widgetRole: string;
|
|
297
305
|
readonly calendarTabIndex: number;
|
|
298
306
|
readonly ariaDisabled: boolean;
|
|
299
307
|
readonly ariaActivedescendant: string;
|
|
300
308
|
/**
|
|
301
309
|
* @hidden
|
|
302
310
|
*/
|
|
303
|
-
|
|
311
|
+
handleFocusout(event: any): void;
|
|
304
312
|
/**
|
|
305
313
|
* @hidden
|
|
306
314
|
*/
|
|
@@ -350,6 +358,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
350
358
|
* Blurs the Calendar component.
|
|
351
359
|
*/
|
|
352
360
|
blur(): void;
|
|
361
|
+
/**
|
|
362
|
+
* @hidden
|
|
363
|
+
*/
|
|
364
|
+
handleHeaderFocus(): void;
|
|
353
365
|
/**
|
|
354
366
|
* @hidden
|
|
355
367
|
*/
|
|
@@ -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 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
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 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
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;
|
|
@@ -341,9 +349,6 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
341
349
|
get widgetId() {
|
|
342
350
|
return this.id;
|
|
343
351
|
}
|
|
344
|
-
get widgetRole() {
|
|
345
|
-
return 'grid';
|
|
346
|
-
}
|
|
347
352
|
get calendarTabIndex() {
|
|
348
353
|
return this.disabled ? undefined : this.tabIndex;
|
|
349
354
|
}
|
|
@@ -356,16 +361,22 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
356
361
|
/**
|
|
357
362
|
* @hidden
|
|
358
363
|
*/
|
|
359
|
-
|
|
360
|
-
|
|
364
|
+
handleFocusout(event) {
|
|
365
|
+
const relatedTarget = event.relatedTarget;
|
|
366
|
+
if (!this.element.nativeElement.contains(relatedTarget)) {
|
|
367
|
+
this.blurEvent.emit(event);
|
|
368
|
+
this.onControlTouched();
|
|
369
|
+
}
|
|
361
370
|
this.isActive = false;
|
|
362
371
|
this.isHovered = false; //ensure that hovered is also not active
|
|
372
|
+
this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
|
|
363
373
|
}
|
|
364
374
|
/**
|
|
365
375
|
* @hidden
|
|
366
376
|
*/
|
|
367
377
|
handleFocus() {
|
|
368
378
|
this.isActive = true;
|
|
379
|
+
this.isHeaderActive = false;
|
|
369
380
|
}
|
|
370
381
|
/**
|
|
371
382
|
* @hidden
|
|
@@ -398,6 +409,9 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
398
409
|
* @hidden
|
|
399
410
|
*/
|
|
400
411
|
keydown(event) {
|
|
412
|
+
if (this.isHeaderActive) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
401
415
|
if (event.keyCode === Keys.Enter) {
|
|
402
416
|
this.performSelection(this.focusedDate, event);
|
|
403
417
|
}
|
|
@@ -473,6 +487,12 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
473
487
|
}
|
|
474
488
|
this.element.nativeElement.blur();
|
|
475
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* @hidden
|
|
492
|
+
*/
|
|
493
|
+
handleHeaderFocus() {
|
|
494
|
+
this.isHeaderActive = true;
|
|
495
|
+
}
|
|
476
496
|
/**
|
|
477
497
|
* @hidden
|
|
478
498
|
*/
|
|
@@ -792,6 +812,10 @@ tslib_1.__decorate([
|
|
|
792
812
|
Output(),
|
|
793
813
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
794
814
|
], MultiViewCalendarComponent.prototype, "valueChange", void 0);
|
|
815
|
+
tslib_1.__decorate([
|
|
816
|
+
Output('blur'),
|
|
817
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
818
|
+
], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
|
|
795
819
|
tslib_1.__decorate([
|
|
796
820
|
ContentChild(CellTemplateDirective, { static: true }),
|
|
797
821
|
tslib_1.__metadata("design:type", CellTemplateDirective)
|
|
@@ -855,6 +879,10 @@ tslib_1.__decorate([
|
|
|
855
879
|
tslib_1.__metadata("design:type", HeaderTitleTemplateDirective),
|
|
856
880
|
tslib_1.__metadata("design:paramtypes", [HeaderTitleTemplateDirective])
|
|
857
881
|
], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
|
|
882
|
+
tslib_1.__decorate([
|
|
883
|
+
ViewChild(HeaderComponent, { static: false, read: ElementRef }),
|
|
884
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
885
|
+
], MultiViewCalendarComponent.prototype, "headerElement", void 0);
|
|
858
886
|
tslib_1.__decorate([
|
|
859
887
|
ViewChild(HorizontalViewListComponent, { static: false }),
|
|
860
888
|
tslib_1.__metadata("design:type", HorizontalViewListComponent)
|
|
@@ -864,11 +892,6 @@ tslib_1.__decorate([
|
|
|
864
892
|
tslib_1.__metadata("design:type", String),
|
|
865
893
|
tslib_1.__metadata("design:paramtypes", [])
|
|
866
894
|
], MultiViewCalendarComponent.prototype, "widgetId", null);
|
|
867
|
-
tslib_1.__decorate([
|
|
868
|
-
HostBinding('attr.role'),
|
|
869
|
-
tslib_1.__metadata("design:type", String),
|
|
870
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
871
|
-
], MultiViewCalendarComponent.prototype, "widgetRole", null);
|
|
872
895
|
tslib_1.__decorate([
|
|
873
896
|
HostBinding('attr.tabindex'),
|
|
874
897
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -886,11 +909,11 @@ tslib_1.__decorate([
|
|
|
886
909
|
tslib_1.__metadata("design:paramtypes", [])
|
|
887
910
|
], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
|
|
888
911
|
tslib_1.__decorate([
|
|
889
|
-
HostListener(
|
|
912
|
+
HostListener('focusout', ['$event']),
|
|
890
913
|
tslib_1.__metadata("design:type", Function),
|
|
891
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
914
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
892
915
|
tslib_1.__metadata("design:returntype", void 0)
|
|
893
|
-
], MultiViewCalendarComponent.prototype, "
|
|
916
|
+
], MultiViewCalendarComponent.prototype, "handleFocusout", null);
|
|
894
917
|
tslib_1.__decorate([
|
|
895
918
|
HostListener("focus"),
|
|
896
919
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -970,11 +993,15 @@ MultiViewCalendarComponent = tslib_1.__decorate([
|
|
|
970
993
|
(todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
|
|
971
994
|
(prevButtonClick)="navigateView(prevView)"
|
|
972
995
|
(nextButtonClick)="navigateView(nextView)"
|
|
996
|
+
[kendoEventsOutsideAngular]="{
|
|
997
|
+
focusin: handleHeaderFocus
|
|
998
|
+
}"
|
|
999
|
+
[scope]="this"
|
|
973
1000
|
>
|
|
974
1001
|
</kendo-calendar-header>
|
|
975
1002
|
<kendo-calendar-horizontal
|
|
976
1003
|
[activeView]="activeViewEnum"
|
|
977
|
-
[isActive]="isActive || isHovered"
|
|
1004
|
+
[isActive]="isActive || (isHovered && !isHeaderActive)"
|
|
978
1005
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
979
1006
|
[weekNumberTemplateRef]="weekNumberTemplate?.templateRef"
|
|
980
1007
|
[cellUID]="cellUID"
|
|
@@ -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';
|
|
@@ -72,7 +73,14 @@ MultiViewCalendarModule = tslib_1.__decorate([
|
|
|
72
73
|
CalendarCommonModule,
|
|
73
74
|
TemplatesModule
|
|
74
75
|
],
|
|
75
|
-
imports: [
|
|
76
|
+
imports: [
|
|
77
|
+
CommonModule,
|
|
78
|
+
CalendarCommonModule,
|
|
79
|
+
IntlModule,
|
|
80
|
+
TemplatesModule,
|
|
81
|
+
PopupModule,
|
|
82
|
+
EventsModule
|
|
83
|
+
],
|
|
76
84
|
providers: [
|
|
77
85
|
NavigationService,
|
|
78
86
|
CenturyViewService,
|
|
@@ -297,7 +297,11 @@ ViewListComponent = tslib_1.__decorate([
|
|
|
297
297
|
(scrollChange)="scrollChange($event)"
|
|
298
298
|
(activeIndexChange)="setActiveDate($event)"
|
|
299
299
|
>
|
|
300
|
-
<table
|
|
300
|
+
<table
|
|
301
|
+
#list
|
|
302
|
+
role="grid"
|
|
303
|
+
class="k-calendar-table"
|
|
304
|
+
>
|
|
301
305
|
<colgroup><col *ngFor="let _ of cols" /></colgroup>
|
|
302
306
|
|
|
303
307
|
<tbody class="k-calendar-tbody"
|
|
@@ -154,11 +154,13 @@ export declare class DateInputComponent implements OnInit, ControlValueAccessor,
|
|
|
154
154
|
/**
|
|
155
155
|
* Specifies the biggest date that is valid
|
|
156
156
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
157
|
+
* By default, the `max` value is `2099-12-31`.
|
|
157
158
|
*/
|
|
158
159
|
max: Date;
|
|
159
160
|
/**
|
|
160
161
|
* Specifies the smallest date that is valid
|
|
161
162
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
163
|
+
* By default, the `min` value is `1900-1-1`.
|
|
162
164
|
*/
|
|
163
165
|
min: Date;
|
|
164
166
|
/**
|
|
@@ -181,11 +181,13 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
|
|
|
181
181
|
/**
|
|
182
182
|
* Specifies the smallest valid date
|
|
183
183
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
184
|
+
* By default, the `min` value is `1900-1-1`.
|
|
184
185
|
*/
|
|
185
186
|
min: Date;
|
|
186
187
|
/**
|
|
187
188
|
* Specifies the biggest valid date
|
|
188
189
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
190
|
+
* By default, the `max` value is `2099-12-31`.
|
|
189
191
|
*/
|
|
190
192
|
max: Date;
|
|
191
193
|
/**
|
|
@@ -28,7 +28,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
|
|
|
28
28
|
import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
|
|
29
29
|
import { PickerService } from '../common/picker.service';
|
|
30
30
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
31
|
-
import { noop, isValidRange, setTime, isWindowAvailable } from '../util';
|
|
31
|
+
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar } from '../util';
|
|
32
32
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
33
33
|
import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
|
|
34
34
|
import { fromEvent } from 'rxjs';
|
|
@@ -121,11 +121,13 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
121
121
|
/**
|
|
122
122
|
* Specifies the smallest valid date
|
|
123
123
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
124
|
+
* By default, the `min` value is `1900-1-1`.
|
|
124
125
|
*/
|
|
125
126
|
this.min = cloneDate(MIN_DATE);
|
|
126
127
|
/**
|
|
127
128
|
* Specifies the biggest valid date
|
|
128
129
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
130
|
+
* By default, the `max` value is `2099-12-31`.
|
|
129
131
|
*/
|
|
130
132
|
this.max = cloneDate(MAX_DATE);
|
|
131
133
|
/**
|
|
@@ -629,7 +631,7 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
629
631
|
* @hidden
|
|
630
632
|
*/
|
|
631
633
|
handleKeydown(e) {
|
|
632
|
-
const { altKey, keyCode } = e;
|
|
634
|
+
const { altKey, shiftKey, keyCode, target } = e;
|
|
633
635
|
if (keyCode === Keys.Escape) {
|
|
634
636
|
this.show = false;
|
|
635
637
|
}
|
|
@@ -641,7 +643,7 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
641
643
|
this.show = false;
|
|
642
644
|
}
|
|
643
645
|
}
|
|
644
|
-
if (keyCode === Keys.Tab && this.show && this.calendar.isActive) {
|
|
646
|
+
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
645
647
|
this.input.focus();
|
|
646
648
|
this.show = false;
|
|
647
649
|
}
|