@progress/kendo-angular-dateinputs 5.2.4-dev.202110081056 → 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 +90 -46
- package/dist/es/calendar/header.component.js +3 -4
- package/dist/es/calendar/horizontal-view-list.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +66 -19
- package/dist/es/calendar/services/century-view.service.js +7 -1
- package/dist/es/calendar/services/decade-view.service.js +6 -1
- package/dist/es/calendar/services/month-view.service.js +3 -0
- package/dist/es/calendar/services/year-view.service.js +5 -1
- package/dist/es/calendar/view-list.component.js +1 -1
- package/dist/es/datepicker/datepicker.component.js +5 -3
- package/dist/es/daterange/date-range-input.js +3 -3
- package/dist/es/daterange/date-range-popup.component.js +2 -2
- package/dist/es/daterange/date-range-selection.directive.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.js +15 -0
- package/dist/es2015/calendar/calendar.component.d.ts +27 -3
- package/dist/es2015/calendar/calendar.component.js +92 -41
- package/dist/es2015/calendar/header.component.js +3 -4
- package/dist/es2015/calendar/horizontal-view-list.component.js +1 -0
- package/dist/es2015/calendar/models/view-service.interface.d.ts +1 -0
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +30 -3
- package/dist/es2015/calendar/multiview-calendar.component.js +69 -18
- package/dist/es2015/calendar/services/century-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/century-view.service.js +7 -1
- package/dist/es2015/calendar/services/decade-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/decade-view.service.js +6 -1
- package/dist/es2015/calendar/services/month-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/month-view.service.js +3 -0
- package/dist/es2015/calendar/services/year-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/year-view.service.js +5 -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/daterange/date-range-input.js +3 -3
- package/dist/es2015/daterange/date-range-popup.component.js +2 -2
- package/dist/es2015/daterange/date-range-selection.directive.js +1 -1
- 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 +7223 -7084
- package/dist/fesm5/index.js +6794 -6671
- package/dist/npm/calendar/calendar.component.js +90 -46
- package/dist/npm/calendar/header.component.js +3 -4
- package/dist/npm/calendar/horizontal-view-list.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +66 -19
- package/dist/npm/calendar/services/century-view.service.js +6 -0
- package/dist/npm/calendar/services/decade-view.service.js +5 -0
- package/dist/npm/calendar/services/month-view.service.js +3 -0
- package/dist/npm/calendar/services/year-view.service.js +4 -0
- package/dist/npm/calendar/view-list.component.js +1 -1
- package/dist/npm/datepicker/datepicker.component.js +4 -2
- package/dist/npm/daterange/date-range-input.js +3 -3
- package/dist/npm/daterange/date-range-popup.component.js +2 -2
- package/dist/npm/daterange/date-range-selection.directive.js +1 -1
- 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 +5 -5
|
@@ -19,8 +19,8 @@ var DateRangeInput = /** @class */ (function () {
|
|
|
19
19
|
this.renderer = renderer;
|
|
20
20
|
this.zone = zone;
|
|
21
21
|
this.navigateCalendarOnFocus = false;
|
|
22
|
-
this.popupSubscriptions = new Subscription(
|
|
23
|
-
this.subscriptions = new Subscription(
|
|
22
|
+
this.popupSubscriptions = new Subscription();
|
|
23
|
+
this.subscriptions = new Subscription();
|
|
24
24
|
}
|
|
25
25
|
Object.defineProperty(DateRangeInput.prototype, "isActiveEnd", {
|
|
26
26
|
get: function () {
|
|
@@ -79,7 +79,7 @@ var DateRangeInput = /** @class */ (function () {
|
|
|
79
79
|
};
|
|
80
80
|
DateRangeInput.prototype.unsubscribePopup = function () {
|
|
81
81
|
this.popupSubscriptions.unsubscribe();
|
|
82
|
-
this.popupSubscriptions = new Subscription(
|
|
82
|
+
this.popupSubscriptions = new Subscription();
|
|
83
83
|
};
|
|
84
84
|
DateRangeInput.prototype.activate = function () {
|
|
85
85
|
this.dateRangeService.setActiveRangeEnd(this.activeRangeEnd);
|
|
@@ -84,8 +84,8 @@ var DateRangePopupComponent = /** @class */ (function () {
|
|
|
84
84
|
* @hidden
|
|
85
85
|
*/
|
|
86
86
|
this.popupUID = guid();
|
|
87
|
-
this.calendarSubscriptions = new Subscription(
|
|
88
|
-
this.popupSubscriptions = new Subscription(
|
|
87
|
+
this.calendarSubscriptions = new Subscription();
|
|
88
|
+
this.popupSubscriptions = new Subscription();
|
|
89
89
|
this.resolvedPromise = Promise.resolve();
|
|
90
90
|
}
|
|
91
91
|
Object.defineProperty(DateRangePopupComponent.prototype, "calendar", {
|
|
@@ -38,7 +38,7 @@ var DateRangeSelectionDirective = /** @class */ (function () {
|
|
|
38
38
|
* the section on [events]({% slug overview_multiviewcalendar %}#toc-events).
|
|
39
39
|
*/
|
|
40
40
|
this.selectionRangeChange = new EventEmitter();
|
|
41
|
-
this.calendarSubscriptions = new Subscription(
|
|
41
|
+
this.calendarSubscriptions = new Subscription();
|
|
42
42
|
this.dateRangeService = this.dateRangeService || new DateRangeService();
|
|
43
43
|
renderer.setAttribute(element.nativeElement, 'aria-multiselectable', 'true');
|
|
44
44
|
}
|
|
@@ -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: 1638381906,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
package/dist/es/util.js
CHANGED
|
@@ -340,4 +340,19 @@ export var millisecondDigitsInFormat = function (format) {
|
|
|
340
340
|
export var millisecondStepFor = function (digits) {
|
|
341
341
|
return Math.pow(10, 3 - digits);
|
|
342
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* @hidden
|
|
345
|
+
*
|
|
346
|
+
* Checks if a tab keydown would would move the focus outside of the calendar.
|
|
347
|
+
*/
|
|
348
|
+
export var isTabExitingCalendar = function (calendarType, focusedElement, shiftKey) {
|
|
349
|
+
if (!isPresent(focusedElement)) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
|
|
353
|
+
calendarType === 'classic' &&
|
|
354
|
+
(shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
|
|
355
|
+
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
356
|
+
);
|
|
357
|
+
};
|
|
343
358
|
export { ɵ0, ɵ1, ɵ2 };
|
|
@@ -6,6 +6,7 @@ import { ChangeDetectorRef, EventEmitter, ElementRef, Renderer2, AfterViewChecke
|
|
|
6
6
|
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { Day } from '@progress/kendo-date-math';
|
|
9
|
+
import { MultiViewCalendarComponent } from './multiview-calendar.component';
|
|
9
10
|
import { NavigationComponent } from './navigation.component';
|
|
10
11
|
import { ViewListComponent } from './view-list.component';
|
|
11
12
|
import { CalendarDOMService } from './services/dom.service';
|
|
@@ -188,6 +189,14 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
188
189
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
189
190
|
*/
|
|
190
191
|
activeViewChange: EventEmitter<CalendarView>;
|
|
192
|
+
/**
|
|
193
|
+
* Fires when navigating in the currently active view
|
|
194
|
+
* ([more information and example]({% slug events_calendar %})).
|
|
195
|
+
*/
|
|
196
|
+
navigate: EventEmitter<{
|
|
197
|
+
activeView: CalendarView;
|
|
198
|
+
focusedDate: Date;
|
|
199
|
+
}>;
|
|
191
200
|
/**
|
|
192
201
|
* Fires when the active view date is changed
|
|
193
202
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
@@ -265,6 +274,7 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
265
274
|
navigationItemTemplateRef: NavigationItemTemplateDirective;
|
|
266
275
|
navigationView: NavigationComponent;
|
|
267
276
|
monthView: ViewListComponent;
|
|
277
|
+
multiViewCalendar: MultiViewCalendarComponent;
|
|
268
278
|
isActive: boolean;
|
|
269
279
|
cellUID: string;
|
|
270
280
|
selectedDates: Date[];
|
|
@@ -286,7 +296,6 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
286
296
|
readonly bottomViewEnum: CalendarViewEnum;
|
|
287
297
|
readonly topViewEnum: CalendarViewEnum;
|
|
288
298
|
readonly widgetId: string;
|
|
289
|
-
readonly widgetRole: string;
|
|
290
299
|
readonly calendarTabIndex: number;
|
|
291
300
|
readonly ariaDisabled: boolean;
|
|
292
301
|
private domEvents;
|
|
@@ -295,6 +304,7 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
295
304
|
private resolvedPromise;
|
|
296
305
|
private destroyed;
|
|
297
306
|
private localizationChangeSubscription;
|
|
307
|
+
private activeViewDate;
|
|
298
308
|
constructor(bus: BusViewService, dom: CalendarDOMService, element: ElementRef, navigator: NavigationService, renderer: Renderer2, cdr: ChangeDetectorRef, ngZone: NgZone, injector: Injector, scrollSyncService: ScrollSyncService, disabledDatesService: DisabledDatesService, localization: LocalizationService, selectionService: SelectionService, pickerService?: PickerService);
|
|
299
309
|
ngOnInit(): void;
|
|
300
310
|
ngOnChanges(changes: any): void;
|
|
@@ -378,10 +388,18 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
378
388
|
* @hidden
|
|
379
389
|
*/
|
|
380
390
|
activeCellTemplate(): any;
|
|
391
|
+
/**
|
|
392
|
+
* @hidden
|
|
393
|
+
*/
|
|
394
|
+
emitNavigate(focusedDate: Date): void;
|
|
381
395
|
/**
|
|
382
396
|
* @hidden
|
|
383
397
|
*/
|
|
384
398
|
emitEvent(emitter: any, args: any): void;
|
|
399
|
+
/**
|
|
400
|
+
* @hidden
|
|
401
|
+
*/
|
|
402
|
+
handleActiveDateChange(date: Date): void;
|
|
385
403
|
/**
|
|
386
404
|
* @hidden
|
|
387
405
|
*/
|
|
@@ -391,14 +409,20 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
391
409
|
* @hidden
|
|
392
410
|
*/
|
|
393
411
|
handleWeekNumberClick(dates: Date[]): void;
|
|
412
|
+
/**
|
|
413
|
+
* @hidden
|
|
414
|
+
*/
|
|
415
|
+
handleBlur(args: any): void;
|
|
416
|
+
/**
|
|
417
|
+
* @hidden
|
|
418
|
+
*/
|
|
419
|
+
handleFocus(): void;
|
|
394
420
|
private setClasses;
|
|
395
421
|
private verifyChanges;
|
|
396
422
|
private verifyValue;
|
|
397
423
|
private bindEvents;
|
|
398
424
|
private emitBlur;
|
|
399
425
|
private emitFocus;
|
|
400
|
-
private handleBlur;
|
|
401
|
-
private handleFocus;
|
|
402
426
|
private handleComponentClick;
|
|
403
427
|
private handleKeydown;
|
|
404
428
|
private detectChanges;
|
|
@@ -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';
|
|
@@ -168,6 +169,11 @@ let CalendarComponent = class CalendarComponent {
|
|
|
168
169
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
169
170
|
*/
|
|
170
171
|
this.activeViewChange = new EventEmitter();
|
|
172
|
+
/**
|
|
173
|
+
* Fires when navigating in the currently active view
|
|
174
|
+
* ([more information and example]({% slug events_calendar %})).
|
|
175
|
+
*/
|
|
176
|
+
this.navigate = new EventEmitter();
|
|
171
177
|
/**
|
|
172
178
|
* Fires when the active view date is changed
|
|
173
179
|
* ([more information and example]({% slug overview_calendar %}#toc-events)).
|
|
@@ -209,6 +215,14 @@ let CalendarComponent = class CalendarComponent {
|
|
|
209
215
|
* > If the Calendar is out of the min or max range, it normalizes the defined `focusedDate`.
|
|
210
216
|
*/
|
|
211
217
|
set focusedDate(focusedDate) {
|
|
218
|
+
if (this.activeViewDate && !isEqual(this._focusedDate, focusedDate)) {
|
|
219
|
+
const service = this.bus.service(this.activeViewEnum);
|
|
220
|
+
const lastDayInPeriod = service.lastDayOfPeriod(this.activeViewDate);
|
|
221
|
+
const isFocusedDateInRange = service.isInRange(focusedDate, this.activeViewDate, lastDayInPeriod);
|
|
222
|
+
if (!isFocusedDateInRange) {
|
|
223
|
+
this.emitNavigate(focusedDate);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
212
226
|
this._focusedDate = focusedDate || getToday();
|
|
213
227
|
this.setAriaActivedescendant();
|
|
214
228
|
}
|
|
@@ -359,14 +373,13 @@ let CalendarComponent = class CalendarComponent {
|
|
|
359
373
|
get widgetId() {
|
|
360
374
|
return this.id;
|
|
361
375
|
}
|
|
362
|
-
get widgetRole() {
|
|
363
|
-
return 'grid';
|
|
364
|
-
}
|
|
365
376
|
get calendarTabIndex() {
|
|
366
|
-
|
|
377
|
+
// in Classic mode, the inner MultiViewCalendar is the focusable element
|
|
378
|
+
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
367
379
|
}
|
|
368
380
|
get ariaDisabled() {
|
|
369
|
-
|
|
381
|
+
// in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
|
|
382
|
+
return this.type === 'classic' ? undefined : this.disabled;
|
|
370
383
|
}
|
|
371
384
|
ngOnInit() {
|
|
372
385
|
this.dom.calculateHeights(this.element.nativeElement);
|
|
@@ -445,19 +458,23 @@ let CalendarComponent = class CalendarComponent {
|
|
|
445
458
|
* ```
|
|
446
459
|
*/
|
|
447
460
|
focus() {
|
|
448
|
-
|
|
449
|
-
|
|
461
|
+
const focusTarget = this.type === 'infinite' ?
|
|
462
|
+
this.element && this.element.nativeElement :
|
|
463
|
+
this.multiViewCalendar;
|
|
464
|
+
if (isPresent(focusTarget)) {
|
|
465
|
+
focusTarget.focus();
|
|
450
466
|
}
|
|
451
|
-
this.element.nativeElement.focus();
|
|
452
467
|
}
|
|
453
468
|
/**
|
|
454
469
|
* Blurs the Calendar component.
|
|
455
470
|
*/
|
|
456
471
|
blur() {
|
|
457
|
-
|
|
458
|
-
|
|
472
|
+
const blurTarget = this.type === 'infinite' ?
|
|
473
|
+
this.element && this.element.nativeElement :
|
|
474
|
+
this.multiViewCalendar;
|
|
475
|
+
if (isPresent(blurTarget)) {
|
|
476
|
+
blurTarget.blur();
|
|
459
477
|
}
|
|
460
|
-
this.element.nativeElement.blur();
|
|
461
478
|
}
|
|
462
479
|
/**
|
|
463
480
|
* @hidden
|
|
@@ -583,6 +600,13 @@ let CalendarComponent = class CalendarComponent {
|
|
|
583
600
|
return null;
|
|
584
601
|
}
|
|
585
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* @hidden
|
|
605
|
+
*/
|
|
606
|
+
emitNavigate(focusedDate) {
|
|
607
|
+
const activeView = CalendarViewEnum[this.activeViewEnum];
|
|
608
|
+
this.navigate.emit({ activeView, focusedDate });
|
|
609
|
+
}
|
|
586
610
|
/**
|
|
587
611
|
* @hidden
|
|
588
612
|
*/
|
|
@@ -593,6 +617,13 @@ let CalendarComponent = class CalendarComponent {
|
|
|
593
617
|
});
|
|
594
618
|
}
|
|
595
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* @hidden
|
|
622
|
+
*/
|
|
623
|
+
handleActiveDateChange(date) {
|
|
624
|
+
this.activeViewDate = date;
|
|
625
|
+
this.emitEvent(this.activeViewDateChange, date);
|
|
626
|
+
}
|
|
596
627
|
/**
|
|
597
628
|
* @hidden
|
|
598
629
|
*/
|
|
@@ -621,6 +652,38 @@ let CalendarComponent = class CalendarComponent {
|
|
|
621
652
|
});
|
|
622
653
|
});
|
|
623
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* @hidden
|
|
657
|
+
*/
|
|
658
|
+
handleBlur(args) {
|
|
659
|
+
if (this.element.nativeElement.contains(args.relatedTarget)) {
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
this.isActive = false;
|
|
663
|
+
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
664
|
+
// and enters the zone for no reason because the parent component is still untouched
|
|
665
|
+
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
666
|
+
this.ngZone.run(() => {
|
|
667
|
+
this.onControlTouched();
|
|
668
|
+
this.emitBlur(args);
|
|
669
|
+
this.cdr.markForCheck();
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
this.emitBlur(args);
|
|
674
|
+
this.detectChanges();
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @hidden
|
|
679
|
+
*/
|
|
680
|
+
handleFocus() {
|
|
681
|
+
this.isActive = true;
|
|
682
|
+
if (!NgZone.isInAngularZone()) {
|
|
683
|
+
this.detectChanges();
|
|
684
|
+
}
|
|
685
|
+
this.emitFocus();
|
|
686
|
+
}
|
|
624
687
|
setClasses(element) {
|
|
625
688
|
this.renderer.addClass(element, 'k-widget');
|
|
626
689
|
this.renderer.addClass(element, 'k-calendar');
|
|
@@ -665,29 +728,6 @@ let CalendarComponent = class CalendarComponent {
|
|
|
665
728
|
this.pickerService.onFocus.emit();
|
|
666
729
|
}
|
|
667
730
|
}
|
|
668
|
-
handleBlur(args) {
|
|
669
|
-
this.isActive = false;
|
|
670
|
-
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
671
|
-
// and enters the zone for no reason because the parent component is still untouched
|
|
672
|
-
if (!this.pickerService && requiresZoneOnBlur(this.control)) {
|
|
673
|
-
this.ngZone.run(() => {
|
|
674
|
-
this.onControlTouched();
|
|
675
|
-
this.emitBlur(args);
|
|
676
|
-
this.cdr.markForCheck();
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
else {
|
|
680
|
-
this.emitBlur(args);
|
|
681
|
-
this.detectChanges();
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
handleFocus() {
|
|
685
|
-
this.isActive = true;
|
|
686
|
-
if (!NgZone.isInAngularZone()) {
|
|
687
|
-
this.detectChanges();
|
|
688
|
-
}
|
|
689
|
-
this.emitFocus();
|
|
690
|
-
}
|
|
691
731
|
handleComponentClick() {
|
|
692
732
|
if (!this.isActive) {
|
|
693
733
|
if (this.type === 'infinite' && this.monthView.isScrolled()) {
|
|
@@ -724,7 +764,12 @@ let CalendarComponent = class CalendarComponent {
|
|
|
724
764
|
}
|
|
725
765
|
}
|
|
726
766
|
setAriaActivedescendant() {
|
|
727
|
-
|
|
767
|
+
// in Classic mode, the inner MultiViewCalendar handles the activedescendant
|
|
768
|
+
if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
if (this.type === 'classic') {
|
|
772
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
|
|
728
773
|
return;
|
|
729
774
|
}
|
|
730
775
|
const focusedCellId = this.cellUID + this.focusedDate.getTime();
|
|
@@ -834,6 +879,10 @@ tslib_1.__decorate([
|
|
|
834
879
|
Output(),
|
|
835
880
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
836
881
|
], CalendarComponent.prototype, "activeViewChange", void 0);
|
|
882
|
+
tslib_1.__decorate([
|
|
883
|
+
Output(),
|
|
884
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
885
|
+
], CalendarComponent.prototype, "navigate", void 0);
|
|
837
886
|
tslib_1.__decorate([
|
|
838
887
|
Output(),
|
|
839
888
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -922,16 +971,15 @@ tslib_1.__decorate([
|
|
|
922
971
|
ViewChild(ViewListComponent, { static: false }),
|
|
923
972
|
tslib_1.__metadata("design:type", ViewListComponent)
|
|
924
973
|
], CalendarComponent.prototype, "monthView", void 0);
|
|
974
|
+
tslib_1.__decorate([
|
|
975
|
+
ViewChild(MultiViewCalendarComponent, { static: false }),
|
|
976
|
+
tslib_1.__metadata("design:type", MultiViewCalendarComponent)
|
|
977
|
+
], CalendarComponent.prototype, "multiViewCalendar", void 0);
|
|
925
978
|
tslib_1.__decorate([
|
|
926
979
|
HostBinding('attr.id'),
|
|
927
980
|
tslib_1.__metadata("design:type", String),
|
|
928
981
|
tslib_1.__metadata("design:paramtypes", [])
|
|
929
982
|
], CalendarComponent.prototype, "widgetId", null);
|
|
930
|
-
tslib_1.__decorate([
|
|
931
|
-
HostBinding('attr.role'),
|
|
932
|
-
tslib_1.__metadata("design:type", String),
|
|
933
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
934
|
-
], CalendarComponent.prototype, "widgetRole", null);
|
|
935
983
|
tslib_1.__decorate([
|
|
936
984
|
HostBinding('attr.tabindex'),
|
|
937
985
|
tslib_1.__metadata("design:type", Number),
|
|
@@ -1005,7 +1053,7 @@ CalendarComponent = tslib_1.__decorate([
|
|
|
1005
1053
|
})"
|
|
1006
1054
|
(cellClick)="handleCellClick($event)"
|
|
1007
1055
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
1008
|
-
(activeDateChange)="
|
|
1056
|
+
(activeDateChange)="handleActiveDateChange($event)"
|
|
1009
1057
|
(pageChange)="onPageChange()"
|
|
1010
1058
|
>
|
|
1011
1059
|
</kendo-calendar-viewlist>
|
|
@@ -1035,7 +1083,10 @@ CalendarComponent = tslib_1.__decorate([
|
|
|
1035
1083
|
[value]="value"
|
|
1036
1084
|
[disabledDates]="disabledDates"
|
|
1037
1085
|
(activeViewChange)="handleActiveViewChange($event)"
|
|
1086
|
+
(navigate)="navigate.emit($event)"
|
|
1038
1087
|
(valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
|
|
1088
|
+
(focus)="handleFocus()"
|
|
1089
|
+
(blur)="handleBlur($event)"
|
|
1039
1090
|
>
|
|
1040
1091
|
<kendo-multiviewcalendar-messages
|
|
1041
1092
|
[today]="localization.get('today')"
|
|
@@ -38,10 +38,9 @@ let HeaderComponent = class HeaderComponent {
|
|
|
38
38
|
this.subscriptions = new Subscription();
|
|
39
39
|
}
|
|
40
40
|
ngOnInit() {
|
|
41
|
-
this.subscriptions
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
|
|
41
|
+
this.subscriptions.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
|
|
42
|
+
this.subscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
|
|
43
|
+
this.subscriptions.add(this.disabledDatesService.changes.subscribe(this.setTodayAvailability.bind(this)));
|
|
45
44
|
}
|
|
46
45
|
ngOnChanges(_) {
|
|
47
46
|
const service = this.bus.service(this.activeView);
|
|
@@ -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 %})).
|
|
@@ -187,6 +191,14 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
187
191
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
188
192
|
*/
|
|
189
193
|
activeViewChange: EventEmitter<CalendarView>;
|
|
194
|
+
/**
|
|
195
|
+
* Fires when navigating in the currently active view
|
|
196
|
+
* ([more information and example]({% slug events_multiviewcalendar %})).
|
|
197
|
+
*/
|
|
198
|
+
navigate: EventEmitter<{
|
|
199
|
+
activeView: CalendarView;
|
|
200
|
+
focusedDate: Date;
|
|
201
|
+
}>;
|
|
190
202
|
/**
|
|
191
203
|
* Fires when a view cell is entered
|
|
192
204
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
@@ -202,6 +214,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
202
214
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
203
215
|
*/
|
|
204
216
|
valueChange: EventEmitter<any>;
|
|
217
|
+
/**
|
|
218
|
+
* @hidden
|
|
219
|
+
*/
|
|
220
|
+
blurEvent: EventEmitter<any>;
|
|
205
221
|
/**
|
|
206
222
|
* @hidden
|
|
207
223
|
*/
|
|
@@ -258,6 +274,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
258
274
|
* @hidden
|
|
259
275
|
*/
|
|
260
276
|
headerTitleTemplateRef: HeaderTitleTemplateDirective;
|
|
277
|
+
headerElement: ElementRef<HTMLElement>;
|
|
261
278
|
viewList: HorizontalViewListComponent;
|
|
262
279
|
cellUID: string;
|
|
263
280
|
isHovered: boolean;
|
|
@@ -285,14 +302,13 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
285
302
|
readonly bottomViewEnum: CalendarViewEnum;
|
|
286
303
|
readonly topViewEnum: CalendarViewEnum;
|
|
287
304
|
readonly widgetId: string;
|
|
288
|
-
readonly widgetRole: string;
|
|
289
305
|
readonly calendarTabIndex: number;
|
|
290
306
|
readonly ariaDisabled: boolean;
|
|
291
307
|
readonly ariaActivedescendant: string;
|
|
292
308
|
/**
|
|
293
309
|
* @hidden
|
|
294
310
|
*/
|
|
295
|
-
handleBlur(): void;
|
|
311
|
+
handleBlur(event: FocusEvent): void;
|
|
296
312
|
/**
|
|
297
313
|
* @hidden
|
|
298
314
|
*/
|
|
@@ -349,6 +365,13 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
349
365
|
selectedDates: Date[];
|
|
350
366
|
focusedDate: Date;
|
|
351
367
|
}): void;
|
|
368
|
+
/**
|
|
369
|
+
* @hidden
|
|
370
|
+
*/
|
|
371
|
+
handleTodayButtonClick(args: {
|
|
372
|
+
selectedDates: Date[];
|
|
373
|
+
focusedDate: Date;
|
|
374
|
+
}): void;
|
|
352
375
|
/**
|
|
353
376
|
* @hidden
|
|
354
377
|
*/
|
|
@@ -386,7 +409,11 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
|
|
|
386
409
|
/**
|
|
387
410
|
* @hidden
|
|
388
411
|
*/
|
|
389
|
-
|
|
412
|
+
navigateView(action: Action): void;
|
|
413
|
+
/**
|
|
414
|
+
* @hidden
|
|
415
|
+
*/
|
|
416
|
+
emitNavigate(focusedDate: Date): void;
|
|
390
417
|
/**
|
|
391
418
|
* @hidden
|
|
392
419
|
*/
|