@progress/kendo-angular-dateinputs 5.3.0 → 5.3.1-dev.202112011809
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 +58 -45
- package/dist/es/calendar/horizontal-view-list.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +27 -17
- 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 +10 -3
- package/dist/es2015/calendar/calendar.component.js +58 -39
- package/dist/es2015/calendar/horizontal-view-list.component.js +1 -0
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +10 -2
- package/dist/es2015/calendar/multiview-calendar.component.js +27 -13
- 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 +6989 -6936
- package/dist/fesm5/index.js +6405 -6367
- package/dist/npm/calendar/calendar.component.js +58 -45
- package/dist/npm/calendar/horizontal-view-list.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +27 -17
- 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
|
@@ -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
|
-
handleBlur(): void;
|
|
311
|
+
handleBlur(event: FocusEvent): void;
|
|
304
312
|
/**
|
|
305
313
|
* @hidden
|
|
306
314
|
*/
|
|
@@ -10,6 +10,7 @@ import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
10
10
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
11
11
|
import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
|
|
12
12
|
import { HorizontalViewListComponent } from './horizontal-view-list.component';
|
|
13
|
+
import { HeaderComponent } from './header.component';
|
|
13
14
|
import { BusViewService } from './services/bus-view.service';
|
|
14
15
|
import { NavigationService } from './services/navigation.service';
|
|
15
16
|
import { SelectionService } from './services/selection.service';
|
|
@@ -114,6 +115,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
114
115
|
* @hidden
|
|
115
116
|
*/
|
|
116
117
|
this.isActive = false;
|
|
118
|
+
/**
|
|
119
|
+
* @hidden
|
|
120
|
+
*/
|
|
121
|
+
this.isHeaderActive = false;
|
|
117
122
|
/**
|
|
118
123
|
* Defines the active view that the Calendar initially renders
|
|
119
124
|
* ([see example]({% slug activeview_multiviewcalendar %})).
|
|
@@ -178,6 +183,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
178
183
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
179
184
|
*/
|
|
180
185
|
this.valueChange = new EventEmitter();
|
|
186
|
+
/**
|
|
187
|
+
* @hidden
|
|
188
|
+
*/
|
|
189
|
+
this.blurEvent = new EventEmitter();
|
|
181
190
|
this.cellUID = guid();
|
|
182
191
|
this.isHovered = false;
|
|
183
192
|
this.isPrevDisabled = true;
|
|
@@ -341,9 +350,6 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
341
350
|
get widgetId() {
|
|
342
351
|
return this.id;
|
|
343
352
|
}
|
|
344
|
-
get widgetRole() {
|
|
345
|
-
return 'grid';
|
|
346
|
-
}
|
|
347
353
|
get calendarTabIndex() {
|
|
348
354
|
return this.disabled ? undefined : this.tabIndex;
|
|
349
355
|
}
|
|
@@ -356,10 +362,15 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
356
362
|
/**
|
|
357
363
|
* @hidden
|
|
358
364
|
*/
|
|
359
|
-
handleBlur() {
|
|
360
|
-
|
|
365
|
+
handleBlur(event) {
|
|
366
|
+
const target = event.target;
|
|
367
|
+
if (!this.element.nativeElement.contains(event.relatedTarget)) {
|
|
368
|
+
this.blurEvent.emit(event);
|
|
369
|
+
this.onControlTouched();
|
|
370
|
+
}
|
|
361
371
|
this.isActive = false;
|
|
362
372
|
this.isHovered = false; //ensure that hovered is also not active
|
|
373
|
+
this.isHeaderActive = this.headerElement.nativeElement.contains(target);
|
|
363
374
|
}
|
|
364
375
|
/**
|
|
365
376
|
* @hidden
|
|
@@ -792,6 +803,10 @@ tslib_1.__decorate([
|
|
|
792
803
|
Output(),
|
|
793
804
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
794
805
|
], MultiViewCalendarComponent.prototype, "valueChange", void 0);
|
|
806
|
+
tslib_1.__decorate([
|
|
807
|
+
Output('blur'),
|
|
808
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
809
|
+
], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
|
|
795
810
|
tslib_1.__decorate([
|
|
796
811
|
ContentChild(CellTemplateDirective, { static: true }),
|
|
797
812
|
tslib_1.__metadata("design:type", CellTemplateDirective)
|
|
@@ -855,6 +870,10 @@ tslib_1.__decorate([
|
|
|
855
870
|
tslib_1.__metadata("design:type", HeaderTitleTemplateDirective),
|
|
856
871
|
tslib_1.__metadata("design:paramtypes", [HeaderTitleTemplateDirective])
|
|
857
872
|
], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
|
|
873
|
+
tslib_1.__decorate([
|
|
874
|
+
ViewChild(HeaderComponent, { static: false, read: ElementRef }),
|
|
875
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
876
|
+
], MultiViewCalendarComponent.prototype, "headerElement", void 0);
|
|
858
877
|
tslib_1.__decorate([
|
|
859
878
|
ViewChild(HorizontalViewListComponent, { static: false }),
|
|
860
879
|
tslib_1.__metadata("design:type", HorizontalViewListComponent)
|
|
@@ -864,11 +883,6 @@ tslib_1.__decorate([
|
|
|
864
883
|
tslib_1.__metadata("design:type", String),
|
|
865
884
|
tslib_1.__metadata("design:paramtypes", [])
|
|
866
885
|
], 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
886
|
tslib_1.__decorate([
|
|
873
887
|
HostBinding('attr.tabindex'),
|
|
874
888
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -886,9 +900,9 @@ tslib_1.__decorate([
|
|
|
886
900
|
tslib_1.__metadata("design:paramtypes", [])
|
|
887
901
|
], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
|
|
888
902
|
tslib_1.__decorate([
|
|
889
|
-
HostListener(
|
|
903
|
+
HostListener('focusout', ['$event']),
|
|
890
904
|
tslib_1.__metadata("design:type", Function),
|
|
891
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
905
|
+
tslib_1.__metadata("design:paramtypes", [FocusEvent]),
|
|
892
906
|
tslib_1.__metadata("design:returntype", void 0)
|
|
893
907
|
], MultiViewCalendarComponent.prototype, "handleBlur", null);
|
|
894
908
|
tslib_1.__decorate([
|
|
@@ -974,7 +988,7 @@ MultiViewCalendarComponent = tslib_1.__decorate([
|
|
|
974
988
|
</kendo-calendar-header>
|
|
975
989
|
<kendo-calendar-horizontal
|
|
976
990
|
[activeView]="activeViewEnum"
|
|
977
|
-
[isActive]="isActive || isHovered"
|
|
991
|
+
[isActive]="isActive || (isHovered && !isHeaderActive)"
|
|
978
992
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
979
993
|
[weekNumberTemplateRef]="weekNumberTemplate?.templateRef"
|
|
980
994
|
[cellUID]="cellUID"
|
|
@@ -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
|
}
|