@progress/kendo-angular-dateinputs 7.1.3-dev.202210121001 → 7.1.3-dev.202210260703
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/bundles/kendo-angular-dateinputs.umd.js +1 -1
- package/calendar/calendar.component.d.ts +7 -2
- package/calendar/header.component.d.ts +4 -1
- package/calendar/horizontal-view-list.component.d.ts +17 -1
- package/calendar/localization/calendar-messages.d.ts +5 -1
- package/calendar/localization/multiview-calendar-messages.d.ts +5 -1
- package/calendar/multiview-calendar.component.d.ts +21 -11
- package/calendar/services/bus-view.service.d.ts +1 -0
- package/calendar/services/selection.service.d.ts +2 -0
- package/calendar/services/weeknames.service.d.ts +1 -1
- package/calendar/view-list.component.d.ts +9 -1
- package/calendar/view.component.d.ts +3 -1
- package/common/utils.d.ts +33 -0
- package/dateinput/dateinput.component.d.ts +22 -8
- package/datepicker/datepicker.component.d.ts +2 -10
- package/daterange/date-range-end-input.directive.d.ts +1 -0
- package/daterange/date-range-input.d.ts +4 -1
- package/daterange/date-range-start-input.directive.d.ts +2 -0
- package/daterange/date-range.component.d.ts +7 -1
- package/daterange/date-range.service.d.ts +6 -2
- package/datetimepicker/datetimepicker.component.d.ts +6 -9
- package/esm2015/calendar/calendar.component.js +88 -48
- package/esm2015/calendar/header.component.js +30 -3
- package/esm2015/calendar/horizontal-view-list.component.js +83 -11
- package/esm2015/calendar/localization/calendar-messages.js +3 -1
- package/esm2015/calendar/localization/multiview-calendar-messages.js +3 -1
- package/esm2015/calendar/multiview-calendar.component.js +91 -45
- package/esm2015/calendar/services/bus-view.service.js +2 -0
- package/esm2015/calendar/services/month-view.service.js +1 -1
- package/esm2015/calendar/services/selection.service.js +4 -0
- package/esm2015/calendar/services/weeknames.service.js +2 -2
- package/esm2015/calendar/view-list.component.js +45 -9
- package/esm2015/calendar/view.component.js +16 -3
- package/esm2015/common/utils.js +34 -0
- package/esm2015/dateinput/dateinput.component.js +68 -34
- package/esm2015/datepicker/datepicker.component.js +27 -20
- package/esm2015/daterange/date-range-end-input.directive.js +6 -1
- package/esm2015/daterange/date-range-input.js +10 -0
- package/esm2015/daterange/date-range-popup.component.js +4 -4
- package/esm2015/daterange/date-range-selection.directive.js +1 -1
- package/esm2015/daterange/date-range-start-input.directive.js +9 -0
- package/esm2015/daterange/date-range.component.js +29 -11
- package/esm2015/daterange/date-range.service.js +28 -4
- package/esm2015/datetimepicker/datetimepicker.component.js +38 -20
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/timepicker/localization/messages.js +11 -1
- package/esm2015/timepicker/timelist.component.js +57 -10
- package/esm2015/timepicker/timepicker.component.js +75 -32
- package/esm2015/util.js +2 -2
- package/esm2015/virtualization/virtualization.component.js +7 -5
- package/fesm2015/kendo-angular-dateinputs.js +811 -320
- package/package.json +1 -1
- package/timepicker/localization/messages.d.ts +21 -1
- package/timepicker/timelist.component.d.ts +10 -1
- package/timepicker/timepicker.component.d.ts +7 -13
- package/virtualization/virtualization.component.d.ts +3 -1
|
@@ -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 i0 from '@angular/core';
|
|
6
|
-
import { Injectable, EventEmitter, isDevMode, Directive, Input, Component, Output, ChangeDetectionStrategy, HostBinding, forwardRef, ElementRef, ContentChild, ViewChild,
|
|
6
|
+
import { Injectable, EventEmitter, isDevMode, Directive, Input, Component, Output, ChangeDetectionStrategy, HostListener, HostBinding, forwardRef, ElementRef, ContentChild, ViewChild, InjectionToken, Inject, NgZone, Optional, ViewContainerRef, ViewChildren, TemplateRef, ContentChildren, NgModule } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
|
|
8
8
|
import * as i1$1 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { cloneDate, addDays, getDate, isEqual, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
|
|
11
11
|
import * as i5 from '@progress/kendo-angular-common';
|
|
12
|
-
import { isDocumentAvailable, guid, Keys, hasObservers, KendoInput, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
12
|
+
import { isDocumentAvailable, guid, Keys as Keys$1, hasObservers, KendoInput, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
13
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
14
|
import * as i1 from '@progress/kendo-angular-intl';
|
|
15
15
|
import { IntlModule } from '@progress/kendo-angular-intl';
|
|
@@ -17,7 +17,7 @@ import { Subject, Subscription, ReplaySubject, Observable, combineLatest, of, in
|
|
|
17
17
|
import * as i7 from '@angular/common';
|
|
18
18
|
import { CommonModule } from '@angular/common';
|
|
19
19
|
import { map, scan, takeWhile, debounceTime, tap, filter } from 'rxjs/operators';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i1$2 from '@progress/kendo-angular-popup';
|
|
21
21
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
22
22
|
import { touchEnabled } from '@progress/kendo-common';
|
|
23
23
|
|
|
@@ -28,7 +28,7 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-dateinputs',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
31
|
+
publishDate: 1666767725,
|
|
32
32
|
version: '',
|
|
33
33
|
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'
|
|
34
34
|
};
|
|
@@ -120,6 +120,40 @@ const isNumberArray = (value) => Array.isArray(value) && value.length > 0 && val
|
|
|
120
120
|
* and all items in the array are dates, returns `true`.
|
|
121
121
|
*/
|
|
122
122
|
const isDateArray = (value) => Array.isArray(value) && value.length > 0 && value.every(item => item instanceof Date);
|
|
123
|
+
/**
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
const isArrowWithShiftPressed = (args) => args.shiftKey && (args.keyCode === Keys.ArrowRight || args.keyCode === Keys.ArrowLeft || args.keyCode === Keys.ArrowDown || args.keyCode === Keys.ArrowUp);
|
|
127
|
+
/**
|
|
128
|
+
* @hidden
|
|
129
|
+
* Enum with key codes.
|
|
130
|
+
*/
|
|
131
|
+
var Keys;
|
|
132
|
+
(function (Keys) {
|
|
133
|
+
Keys[Keys["ArrowDown"] = 40] = "ArrowDown";
|
|
134
|
+
Keys[Keys["ArrowLeft"] = 37] = "ArrowLeft";
|
|
135
|
+
Keys[Keys["ArrowRight"] = 39] = "ArrowRight";
|
|
136
|
+
Keys[Keys["ArrowUp"] = 38] = "ArrowUp";
|
|
137
|
+
})(Keys || (Keys = {}));
|
|
138
|
+
/**
|
|
139
|
+
* @hidden
|
|
140
|
+
*/
|
|
141
|
+
const selectors = {
|
|
142
|
+
infiniteCalendarTable: '.k-content .k-calendar-table',
|
|
143
|
+
multiViewCalendarTable: '.k-content.k-calendar-table'
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* @hidden
|
|
147
|
+
*/
|
|
148
|
+
const attributeNames = {
|
|
149
|
+
ariaActiveDescendant: 'aria-activedescendant',
|
|
150
|
+
ariaControls: 'aria-controls',
|
|
151
|
+
ariaExpanded: 'aria-expanded',
|
|
152
|
+
ariaHasPopup: 'aria-haspopup',
|
|
153
|
+
valueNow: 'aria-valuenow',
|
|
154
|
+
valuetext: 'aria-valuetext',
|
|
155
|
+
ariaInvalid: 'aria-invalid'
|
|
156
|
+
};
|
|
123
157
|
|
|
124
158
|
const isSet = (value) => value !== null && value !== undefined;
|
|
125
159
|
const setter = (method) => (date, value) => {
|
|
@@ -456,8 +490,8 @@ const isTabExitingCalendar = (calendarType, focusedElement, shiftKey) => {
|
|
|
456
490
|
}
|
|
457
491
|
return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
|
|
458
492
|
calendarType === 'classic' &&
|
|
459
|
-
(shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
|
|
460
|
-
(!shiftKey && focusedElement.classList.contains('k-calendar-
|
|
493
|
+
(shiftKey && focusedElement.classList.contains('k-calendar-table')) || // exited on main calendar element focused and back-tab
|
|
494
|
+
(!shiftKey && focusedElement.classList.contains('k-calendar-table')) // exited on next button focused and regular tab
|
|
461
495
|
);
|
|
462
496
|
};
|
|
463
497
|
/**
|
|
@@ -908,7 +942,7 @@ class MonthViewService {
|
|
|
908
942
|
const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
909
943
|
return {
|
|
910
944
|
formattedValue: this.value(cellDate),
|
|
911
|
-
id: `${cellUID}${cellDate.getTime()}`,
|
|
945
|
+
id: `${cellUID}${otherMonth ? cellDate.getTime() + '1' : cellDate.getTime()}`,
|
|
912
946
|
isFocused: this.isEqual(cellDate, focusedDate),
|
|
913
947
|
isSelected: isActiveView && selectedDates.some(date => this.isEqual(cellDate, date)),
|
|
914
948
|
isWeekend: this.isWeekend(cellDate),
|
|
@@ -1222,6 +1256,7 @@ const viewOffset = (view, offset) => {
|
|
|
1222
1256
|
const candidate = CalendarViewEnum[CalendarViewEnum[view + offset]];
|
|
1223
1257
|
return candidate !== undefined ? candidate : view;
|
|
1224
1258
|
};
|
|
1259
|
+
let nextCalendarId = 0;
|
|
1225
1260
|
/**
|
|
1226
1261
|
* @hidden
|
|
1227
1262
|
*/
|
|
@@ -1231,6 +1266,7 @@ class BusViewService {
|
|
|
1231
1266
|
this.viewChanged = new EventEmitter();
|
|
1232
1267
|
this.bottom = CalendarViewEnum.month;
|
|
1233
1268
|
this.top = CalendarViewEnum.century;
|
|
1269
|
+
this.calendarId = nextCalendarId++;
|
|
1234
1270
|
}
|
|
1235
1271
|
configure(bottom, top) {
|
|
1236
1272
|
this.bottom = bottom;
|
|
@@ -1288,8 +1324,8 @@ class WeekNamesService {
|
|
|
1288
1324
|
constructor(intl) {
|
|
1289
1325
|
this.intl = intl;
|
|
1290
1326
|
}
|
|
1291
|
-
getWeekNames(includeWeekNumber = false) {
|
|
1292
|
-
const weekNames = shiftWeekNames(this.intl.dateFormatNames({ nameType:
|
|
1327
|
+
getWeekNames(includeWeekNumber = false, nameType) {
|
|
1328
|
+
const weekNames = shiftWeekNames(this.intl.dateFormatNames({ nameType: nameType, type: 'days' }), this.intl.firstDay());
|
|
1293
1329
|
return includeWeekNumber ? [''].concat(weekNames) : weekNames;
|
|
1294
1330
|
}
|
|
1295
1331
|
}
|
|
@@ -1497,6 +1533,7 @@ class ViewComponent {
|
|
|
1497
1533
|
this.weekNumberCellClick = new EventEmitter();
|
|
1498
1534
|
this.cellEnter = new EventEmitter();
|
|
1499
1535
|
this.cellLeave = new EventEmitter();
|
|
1536
|
+
this.focusedCellId = new EventEmitter();
|
|
1500
1537
|
this.colSpan = 0;
|
|
1501
1538
|
this.subscriptions = new Subscription();
|
|
1502
1539
|
this.domEvents = [];
|
|
@@ -1568,6 +1605,9 @@ class ViewComponent {
|
|
|
1568
1605
|
};
|
|
1569
1606
|
}
|
|
1570
1607
|
getStyles(context) {
|
|
1608
|
+
if (!context.isOtherMonth && this.isActive && context.isFocused) {
|
|
1609
|
+
this.focusedCellId.emit(context.id);
|
|
1610
|
+
}
|
|
1571
1611
|
const { isRangeEnd, isRangeStart } = context;
|
|
1572
1612
|
const isEndActive = this.activeRangeEnd === 'end' && isRangeEnd;
|
|
1573
1613
|
const isStartActive = this.activeRangeEnd === 'start' && isRangeStart;
|
|
@@ -1593,6 +1633,9 @@ class ViewComponent {
|
|
|
1593
1633
|
const availableDates = week.map(item => item.value).filter(date => !this.disabledDatesService.isDateDisabled(date));
|
|
1594
1634
|
this.weekNumberCellClick.emit(availableDates);
|
|
1595
1635
|
}
|
|
1636
|
+
getMonthLabel(date) {
|
|
1637
|
+
return this.activeView === 1 ? this.intl.formatDate(date, 'MMMM') : null;
|
|
1638
|
+
}
|
|
1596
1639
|
firstWeekDateContext(rowCtx) {
|
|
1597
1640
|
if (!this.weekNumber) {
|
|
1598
1641
|
return null;
|
|
@@ -1684,13 +1727,14 @@ class ViewComponent {
|
|
|
1684
1727
|
}
|
|
1685
1728
|
}
|
|
1686
1729
|
ViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ViewComponent, deps: [{ token: BusViewService }, { token: i1.IntlService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DisabledDatesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1687
|
-
ViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ViewComponent, selector: "[kendoCalendarView]", inputs: { direction: "direction", isActive: "isActive", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", viewDate: "viewDate", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", min: "min", max: "max", selectedDates: "selectedDates", weekNumber: "weekNumber", viewIndex: "viewIndex", templateRef: "templateRef", weekNumberTemplateRef: "weekNumberTemplateRef" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave" }, usesOnChanges: true, ngImport: i0, template: `
|
|
1688
|
-
<ng-template #emptyCell><td class="k-empty k-calendar-td"> </td></ng-template>
|
|
1730
|
+
ViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ViewComponent, selector: "[kendoCalendarView]", inputs: { direction: "direction", isActive: "isActive", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", viewDate: "viewDate", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", min: "min", max: "max", selectedDates: "selectedDates", weekNumber: "weekNumber", viewIndex: "viewIndex", templateRef: "templateRef", weekNumberTemplateRef: "weekNumberTemplateRef" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", focusedCellId: "focusedCellId" }, usesOnChanges: true, ngImport: i0, template: `
|
|
1731
|
+
<ng-template #emptyCell><td class="k-empty k-calendar-td" role="gridcell"> </td></ng-template>
|
|
1689
1732
|
<tr *ngIf="!isHorizontal()" class="k-calendar-tr" role="row"><th class="k-calendar-caption" scope="col" [colSpan]="colSpan">{{title}}</th></tr>
|
|
1690
1733
|
<tr *kFor="let row of data; let rowIndex = index" class="k-calendar-tr" role="row">
|
|
1691
1734
|
<ng-template [ngIf]="weekNumber">
|
|
1692
1735
|
<td
|
|
1693
1736
|
class="k-alt k-calendar-td"
|
|
1737
|
+
role="gridcell"
|
|
1694
1738
|
*ngIf="firstDate(row); else emptyCell"
|
|
1695
1739
|
[kendoEventsOutsideAngular]="{
|
|
1696
1740
|
click: handleWeekNumberClick.bind(this, row)
|
|
@@ -1717,6 +1761,7 @@ ViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
1717
1761
|
[attr.data-cell-index]="tableCellIndex(rowIndex, cellIndex)"
|
|
1718
1762
|
[attr.aria-selected]="cell.isSelected || cell.isRangeStart || cell.isRangeMid || cell.isRangeEnd"
|
|
1719
1763
|
[attr.aria-disabled]="cell.isDisabled"
|
|
1764
|
+
[attr.aria-label]="getMonthLabel(cell.value)"
|
|
1720
1765
|
[ngClass]="getStyles(cell)"
|
|
1721
1766
|
[title]="cell.title"
|
|
1722
1767
|
>
|
|
@@ -1738,12 +1783,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1738
1783
|
// eslint-disable-next-line
|
|
1739
1784
|
selector: '[kendoCalendarView]',
|
|
1740
1785
|
template: `
|
|
1741
|
-
<ng-template #emptyCell><td class="k-empty k-calendar-td"> </td></ng-template>
|
|
1786
|
+
<ng-template #emptyCell><td class="k-empty k-calendar-td" role="gridcell"> </td></ng-template>
|
|
1742
1787
|
<tr *ngIf="!isHorizontal()" class="k-calendar-tr" role="row"><th class="k-calendar-caption" scope="col" [colSpan]="colSpan">{{title}}</th></tr>
|
|
1743
1788
|
<tr *kFor="let row of data; let rowIndex = index" class="k-calendar-tr" role="row">
|
|
1744
1789
|
<ng-template [ngIf]="weekNumber">
|
|
1745
1790
|
<td
|
|
1746
1791
|
class="k-alt k-calendar-td"
|
|
1792
|
+
role="gridcell"
|
|
1747
1793
|
*ngIf="firstDate(row); else emptyCell"
|
|
1748
1794
|
[kendoEventsOutsideAngular]="{
|
|
1749
1795
|
click: handleWeekNumberClick.bind(this, row)
|
|
@@ -1770,6 +1816,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1770
1816
|
[attr.data-cell-index]="tableCellIndex(rowIndex, cellIndex)"
|
|
1771
1817
|
[attr.aria-selected]="cell.isSelected || cell.isRangeStart || cell.isRangeMid || cell.isRangeEnd"
|
|
1772
1818
|
[attr.aria-disabled]="cell.isDisabled"
|
|
1819
|
+
[attr.aria-label]="getMonthLabel(cell.value)"
|
|
1773
1820
|
[ngClass]="getStyles(cell)"
|
|
1774
1821
|
[title]="cell.title"
|
|
1775
1822
|
>
|
|
@@ -1824,6 +1871,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1824
1871
|
type: Output
|
|
1825
1872
|
}], cellLeave: [{
|
|
1826
1873
|
type: Output
|
|
1874
|
+
}], focusedCellId: [{
|
|
1875
|
+
type: Output
|
|
1827
1876
|
}] } });
|
|
1828
1877
|
|
|
1829
1878
|
/* eslint-disable @angular-eslint/component-selector */
|
|
@@ -1848,16 +1897,28 @@ class HorizontalViewListComponent {
|
|
|
1848
1897
|
this.showViewHeader = false;
|
|
1849
1898
|
this.animateNavigation = false;
|
|
1850
1899
|
this.orientation = 'horizontal';
|
|
1900
|
+
this.tabIndex = 0;
|
|
1901
|
+
this.disabled = false;
|
|
1851
1902
|
this.cellClick = new EventEmitter();
|
|
1852
1903
|
this.weekNumberCellClick = new EventEmitter();
|
|
1853
1904
|
this.cellEnter = new EventEmitter();
|
|
1854
1905
|
this.cellLeave = new EventEmitter();
|
|
1855
1906
|
this.activeDateChange = new EventEmitter();
|
|
1907
|
+
this.focusCalendar = new EventEmitter();
|
|
1908
|
+
this.blurCalendar = new EventEmitter();
|
|
1909
|
+
this.focusedCellChange = new EventEmitter();
|
|
1856
1910
|
this.getComponentClass = true;
|
|
1857
1911
|
this.weekNames = [];
|
|
1912
|
+
this.wideWeekNames = [];
|
|
1858
1913
|
this.dates = [];
|
|
1859
1914
|
this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
|
|
1860
1915
|
}
|
|
1916
|
+
/**
|
|
1917
|
+
* @hidden
|
|
1918
|
+
*/
|
|
1919
|
+
handleFocus() {
|
|
1920
|
+
this.focusCalendar.emit();
|
|
1921
|
+
}
|
|
1861
1922
|
get weekNumber() {
|
|
1862
1923
|
return this.showWeekNumbers && this.isMonthView();
|
|
1863
1924
|
}
|
|
@@ -1882,10 +1943,17 @@ class HorizontalViewListComponent {
|
|
|
1882
1943
|
get getComponentCenturyClass() {
|
|
1883
1944
|
return this.activeView === CalendarViewEnum.century;
|
|
1884
1945
|
}
|
|
1946
|
+
get getActiveDescendant() {
|
|
1947
|
+
return this.views === 1 ? this.activeDescendant : null;
|
|
1948
|
+
}
|
|
1949
|
+
get getTabIndex() {
|
|
1950
|
+
return this.disabled || this.views === 2 ? null : this.tabIndex;
|
|
1951
|
+
}
|
|
1885
1952
|
ngOnChanges(changes) {
|
|
1886
1953
|
this.initService();
|
|
1887
1954
|
if (this.weekNames.length === 0 || changes.weekNumber) {
|
|
1888
|
-
this.weekNames = this.
|
|
1955
|
+
this.weekNames = this.getWeekNames('short');
|
|
1956
|
+
this.wideWeekNames = this.getWeekNames('wide');
|
|
1889
1957
|
}
|
|
1890
1958
|
if (!this.service) {
|
|
1891
1959
|
return;
|
|
@@ -1902,6 +1970,11 @@ class HorizontalViewListComponent {
|
|
|
1902
1970
|
this.activeDate = cloneDate(this.dates[0]);
|
|
1903
1971
|
this.activeDateChange.emit(this.activeDate);
|
|
1904
1972
|
}
|
|
1973
|
+
this.setAriaActivedescendant();
|
|
1974
|
+
//set tabindex for MultiViewCalendar
|
|
1975
|
+
if (this.views === 2) {
|
|
1976
|
+
this.renderer.setAttribute(this.element.nativeElement, 'tabindex', this.tabIndex.toString());
|
|
1977
|
+
}
|
|
1905
1978
|
}
|
|
1906
1979
|
ngAfterViewInit() {
|
|
1907
1980
|
// make the calendar look the same in the different browsers
|
|
@@ -2006,6 +2079,9 @@ class HorizontalViewListComponent {
|
|
|
2006
2079
|
}
|
|
2007
2080
|
return this.isListInRange(this.service.datesList(this.move(action), this.getTake(this.skip)));
|
|
2008
2081
|
}
|
|
2082
|
+
getWeekNames(type) {
|
|
2083
|
+
return this.weekService.getWeekNames(this.weekNumber, type);
|
|
2084
|
+
}
|
|
2009
2085
|
setTableMinWidth() {
|
|
2010
2086
|
const container = this.element.nativeElement;
|
|
2011
2087
|
const table = container.querySelector('table');
|
|
@@ -2015,7 +2091,8 @@ class HorizontalViewListComponent {
|
|
|
2015
2091
|
}
|
|
2016
2092
|
}
|
|
2017
2093
|
intlChange() {
|
|
2018
|
-
this.weekNames = this.
|
|
2094
|
+
this.weekNames = this.getWeekNames('short');
|
|
2095
|
+
this.wideWeekNames = this.getWeekNames('wide');
|
|
2019
2096
|
this.cdr.markForCheck();
|
|
2020
2097
|
}
|
|
2021
2098
|
clampDate(value) {
|
|
@@ -2035,19 +2112,34 @@ class HorizontalViewListComponent {
|
|
|
2035
2112
|
getTake(skip) {
|
|
2036
2113
|
return Math.min(this.total - skip, this.views);
|
|
2037
2114
|
}
|
|
2115
|
+
setAriaActivedescendant() {
|
|
2116
|
+
if (this.views === 2) {
|
|
2117
|
+
this.renderer.setAttribute(this.element.nativeElement, attributeNames.ariaActiveDescendant, this.activeDescendant);
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2038
2120
|
}
|
|
2039
2121
|
HorizontalViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HorizontalViewListComponent, deps: [{ token: BusViewService }, { token: i1.IntlService }, { token: WeekNamesService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2040
|
-
HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange" }, host: { properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2122
|
+
HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleFocus()" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2041
2123
|
<ng-template #tableTemplate let-date="date" let-class="className">
|
|
2042
2124
|
<table
|
|
2043
2125
|
role="grid"
|
|
2044
2126
|
class="k-content k-calendar-table"
|
|
2045
2127
|
[ngClass]="class"
|
|
2128
|
+
[attr.aria-labelledby]="id"
|
|
2129
|
+
[attr.aria-activedescendant]="getActiveDescendant"
|
|
2130
|
+
[attr.tabindex]="getTabIndex"
|
|
2131
|
+
(focus)="focusCalendar.emit()"
|
|
2132
|
+
(focusout)="blurCalendar.emit($event)"
|
|
2046
2133
|
>
|
|
2047
2134
|
<caption *ngIf="showViewHeader" [ngClass]="getCaptionClass()">{{ getCaptionTitle(date) }}</caption>
|
|
2048
|
-
<thead *ngIf="isMonthView()" class="k-calendar-thead">
|
|
2135
|
+
<thead *ngIf="isMonthView()" class="k-calendar-thead" role="rowgroup">
|
|
2049
2136
|
<tr class="k-calendar-tr" role="row">
|
|
2050
|
-
<th *ngFor="let name of weekNames
|
|
2137
|
+
<th *ngFor="let name of weekNames; let i = index;"
|
|
2138
|
+
class="k-calendar-th"
|
|
2139
|
+
scope="col"
|
|
2140
|
+
[attr.aria-label]="wideWeekNames[i]"
|
|
2141
|
+
role="columnheader"
|
|
2142
|
+
>{{name}}</th>
|
|
2051
2143
|
</tr>
|
|
2052
2144
|
</thead>
|
|
2053
2145
|
<tbody
|
|
@@ -2072,6 +2164,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2072
2164
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
2073
2165
|
(cellEnter)="cellEnter.emit($event)"
|
|
2074
2166
|
(cellLeave)="cellLeave.emit($event)"
|
|
2167
|
+
(focusedCellId)="focusedCellChange.emit($event)"
|
|
2075
2168
|
>
|
|
2076
2169
|
</tbody>
|
|
2077
2170
|
</table>
|
|
@@ -2107,7 +2200,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2107
2200
|
}"
|
|
2108
2201
|
>
|
|
2109
2202
|
</ng-template>
|
|
2110
|
-
`, isInline: true, components: [{ type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2203
|
+
`, isInline: true, components: [{ type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2111
2204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HorizontalViewListComponent, decorators: [{
|
|
2112
2205
|
type: Component,
|
|
2113
2206
|
args: [{
|
|
@@ -2119,11 +2212,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2119
2212
|
role="grid"
|
|
2120
2213
|
class="k-content k-calendar-table"
|
|
2121
2214
|
[ngClass]="class"
|
|
2215
|
+
[attr.aria-labelledby]="id"
|
|
2216
|
+
[attr.aria-activedescendant]="getActiveDescendant"
|
|
2217
|
+
[attr.tabindex]="getTabIndex"
|
|
2218
|
+
(focus)="focusCalendar.emit()"
|
|
2219
|
+
(focusout)="blurCalendar.emit($event)"
|
|
2122
2220
|
>
|
|
2123
2221
|
<caption *ngIf="showViewHeader" [ngClass]="getCaptionClass()">{{ getCaptionTitle(date) }}</caption>
|
|
2124
|
-
<thead *ngIf="isMonthView()" class="k-calendar-thead">
|
|
2222
|
+
<thead *ngIf="isMonthView()" class="k-calendar-thead" role="rowgroup">
|
|
2125
2223
|
<tr class="k-calendar-tr" role="row">
|
|
2126
|
-
<th *ngFor="let name of weekNames
|
|
2224
|
+
<th *ngFor="let name of weekNames; let i = index;"
|
|
2225
|
+
class="k-calendar-th"
|
|
2226
|
+
scope="col"
|
|
2227
|
+
[attr.aria-label]="wideWeekNames[i]"
|
|
2228
|
+
role="columnheader"
|
|
2229
|
+
>{{name}}</th>
|
|
2127
2230
|
</tr>
|
|
2128
2231
|
</thead>
|
|
2129
2232
|
<tbody
|
|
@@ -2148,6 +2251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2148
2251
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
2149
2252
|
(cellEnter)="cellEnter.emit($event)"
|
|
2150
2253
|
(cellLeave)="cellLeave.emit($event)"
|
|
2254
|
+
(focusedCellId)="focusedCellChange.emit($event)"
|
|
2151
2255
|
>
|
|
2152
2256
|
</tbody>
|
|
2153
2257
|
</table>
|
|
@@ -2185,7 +2289,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2185
2289
|
</ng-template>
|
|
2186
2290
|
`
|
|
2187
2291
|
}]
|
|
2188
|
-
}], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: {
|
|
2292
|
+
}], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { handleFocus: [{
|
|
2293
|
+
type: HostListener,
|
|
2294
|
+
args: ["focus"]
|
|
2295
|
+
}], cellTemplateRef: [{
|
|
2189
2296
|
type: Input
|
|
2190
2297
|
}], weekNumberTemplateRef: [{
|
|
2191
2298
|
type: Input
|
|
@@ -2215,6 +2322,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2215
2322
|
type: Input
|
|
2216
2323
|
}], orientation: [{
|
|
2217
2324
|
type: Input
|
|
2325
|
+
}], activeDescendant: [{
|
|
2326
|
+
type: Input
|
|
2327
|
+
}], tabIndex: [{
|
|
2328
|
+
type: Input
|
|
2329
|
+
}], disabled: [{
|
|
2330
|
+
type: Input
|
|
2331
|
+
}], id: [{
|
|
2332
|
+
type: Input
|
|
2218
2333
|
}], weekNumber: [{
|
|
2219
2334
|
type: Input
|
|
2220
2335
|
}], cellClick: [{
|
|
@@ -2227,6 +2342,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2227
2342
|
type: Output
|
|
2228
2343
|
}], activeDateChange: [{
|
|
2229
2344
|
type: Output
|
|
2345
|
+
}], focusCalendar: [{
|
|
2346
|
+
type: Output
|
|
2347
|
+
}], blurCalendar: [{
|
|
2348
|
+
type: Output
|
|
2349
|
+
}], focusedCellChange: [{
|
|
2350
|
+
type: Output
|
|
2230
2351
|
}], getComponentClass: [{
|
|
2231
2352
|
type: HostBinding,
|
|
2232
2353
|
args: ["class.k-calendar-view"]
|
|
@@ -2299,6 +2420,7 @@ class HeaderComponent {
|
|
|
2299
2420
|
}
|
|
2300
2421
|
this.activeViewValue = CalendarViewEnum[this.activeView];
|
|
2301
2422
|
this.todayMessage = this.localization.get('today');
|
|
2423
|
+
this.parentViewButtonTitle = this.localization.get('parentViewButtonTitle');
|
|
2302
2424
|
this.setTodayAvailability();
|
|
2303
2425
|
this.navigate = this.bus.canMoveUp(this.activeView);
|
|
2304
2426
|
this.title = this.getTitle();
|
|
@@ -2319,6 +2441,9 @@ class HeaderComponent {
|
|
|
2319
2441
|
}
|
|
2320
2442
|
this.bus.moveUp(this.activeView);
|
|
2321
2443
|
}
|
|
2444
|
+
isDisabled() {
|
|
2445
|
+
return this.navigate ? null : '';
|
|
2446
|
+
}
|
|
2322
2447
|
intlChange() {
|
|
2323
2448
|
if (this.currentDate && this.bus.service(this.activeView)) {
|
|
2324
2449
|
this.title = this.getTitle();
|
|
@@ -2328,6 +2453,7 @@ class HeaderComponent {
|
|
|
2328
2453
|
l10nChange() {
|
|
2329
2454
|
this.prevButtonTitle = this.localization.get('prevButtonTitle');
|
|
2330
2455
|
this.nextButtonTitle = this.localization.get('nextButtonTitle');
|
|
2456
|
+
this.parentViewButtonTitle = this.localization.get('parentViewButtonTitle');
|
|
2331
2457
|
this.todayMessage = this.localization.get('today');
|
|
2332
2458
|
this.cdr.markForCheck();
|
|
2333
2459
|
}
|
|
@@ -2353,11 +2479,17 @@ class HeaderComponent {
|
|
|
2353
2479
|
}
|
|
2354
2480
|
}
|
|
2355
2481
|
HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeaderComponent, deps: [{ token: BusViewService }, { token: i0.ChangeDetectorRef }, { token: i1$1.LocalizationService }, { token: i1.IntlService }, { token: DisabledDatesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2356
|
-
HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HeaderComponent, selector: "kendo-calendar-header", inputs: { activeView: "activeView", currentDate: "currentDate", min: "min", max: "max", rangeLength: "rangeLength", templateRef: "templateRef", isPrevDisabled: "isPrevDisabled", isNextDisabled: "isNextDisabled", showNavigationButtons: "showNavigationButtons", orientation: "orientation" }, outputs: { todayButtonClick: "todayButtonClick", prevButtonClick: "prevButtonClick", nextButtonClick: "nextButtonClick" }, host: { properties: { "class.k-calendar-header": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2357
|
-
<span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
|
|
2482
|
+
HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HeaderComponent, selector: "kendo-calendar-header", inputs: { activeView: "activeView", currentDate: "currentDate", min: "min", max: "max", rangeLength: "rangeLength", templateRef: "templateRef", isPrevDisabled: "isPrevDisabled", isNextDisabled: "isNextDisabled", showNavigationButtons: "showNavigationButtons", orientation: "orientation", id: "id" }, outputs: { todayButtonClick: "todayButtonClick", prevButtonClick: "prevButtonClick", nextButtonClick: "nextButtonClick" }, host: { properties: { "class.k-calendar-header": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2483
|
+
<span class="k-button k-nav-fast k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
|
|
2484
|
+
role="button"
|
|
2485
|
+
[id]="id"
|
|
2486
|
+
tabindex="-1"
|
|
2487
|
+
[class.k-disabled]="!navigate"
|
|
2488
|
+
[attr.aria-disabled]="isDisabled()"
|
|
2358
2489
|
[kendoEventsOutsideAngular]="{
|
|
2359
2490
|
click: handleNavigation
|
|
2360
2491
|
}"
|
|
2492
|
+
[title]="parentViewButtonTitle"
|
|
2361
2493
|
[scope]="this">
|
|
2362
2494
|
<ng-template [ngIf]="!templateRef">{{title}}</ng-template>
|
|
2363
2495
|
<ng-template
|
|
@@ -2371,6 +2503,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
2371
2503
|
<button
|
|
2372
2504
|
*ngIf="showNavigationButtons"
|
|
2373
2505
|
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-prev"
|
|
2506
|
+
tabindex="-1"
|
|
2374
2507
|
type="button"
|
|
2375
2508
|
[attr.aria-disabled]="isPrevDisabled"
|
|
2376
2509
|
[disabled]="isPrevDisabled"
|
|
@@ -2381,17 +2514,20 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
2381
2514
|
</button>
|
|
2382
2515
|
<span
|
|
2383
2516
|
class="k-today k-calendar-nav-today"
|
|
2517
|
+
tabindex="-1"
|
|
2384
2518
|
[class.k-disabled]="!todayAvailable"
|
|
2385
2519
|
[kendoEventsOutsideAngular]="{
|
|
2386
2520
|
click: handleTodayClick
|
|
2387
2521
|
}"
|
|
2388
2522
|
[scope]="this"
|
|
2523
|
+
role="link"
|
|
2389
2524
|
>
|
|
2390
2525
|
{{ todayMessage }}
|
|
2391
2526
|
</span>
|
|
2392
2527
|
<button
|
|
2393
2528
|
*ngIf="showNavigationButtons"
|
|
2394
2529
|
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-next"
|
|
2530
|
+
tabindex="-1"
|
|
2395
2531
|
type="button"
|
|
2396
2532
|
[attr.aria-disabled]="isNextDisabled"
|
|
2397
2533
|
[disabled]="isNextDisabled"
|
|
@@ -2407,10 +2543,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2407
2543
|
args: [{
|
|
2408
2544
|
selector: 'kendo-calendar-header',
|
|
2409
2545
|
template: `
|
|
2410
|
-
<span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
|
|
2546
|
+
<span class="k-button k-nav-fast k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
|
|
2547
|
+
role="button"
|
|
2548
|
+
[id]="id"
|
|
2549
|
+
tabindex="-1"
|
|
2550
|
+
[class.k-disabled]="!navigate"
|
|
2551
|
+
[attr.aria-disabled]="isDisabled()"
|
|
2411
2552
|
[kendoEventsOutsideAngular]="{
|
|
2412
2553
|
click: handleNavigation
|
|
2413
2554
|
}"
|
|
2555
|
+
[title]="parentViewButtonTitle"
|
|
2414
2556
|
[scope]="this">
|
|
2415
2557
|
<ng-template [ngIf]="!templateRef">{{title}}</ng-template>
|
|
2416
2558
|
<ng-template
|
|
@@ -2424,6 +2566,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2424
2566
|
<button
|
|
2425
2567
|
*ngIf="showNavigationButtons"
|
|
2426
2568
|
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-prev"
|
|
2569
|
+
tabindex="-1"
|
|
2427
2570
|
type="button"
|
|
2428
2571
|
[attr.aria-disabled]="isPrevDisabled"
|
|
2429
2572
|
[disabled]="isPrevDisabled"
|
|
@@ -2434,17 +2577,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2434
2577
|
</button>
|
|
2435
2578
|
<span
|
|
2436
2579
|
class="k-today k-calendar-nav-today"
|
|
2580
|
+
tabindex="-1"
|
|
2437
2581
|
[class.k-disabled]="!todayAvailable"
|
|
2438
2582
|
[kendoEventsOutsideAngular]="{
|
|
2439
2583
|
click: handleTodayClick
|
|
2440
2584
|
}"
|
|
2441
2585
|
[scope]="this"
|
|
2586
|
+
role="link"
|
|
2442
2587
|
>
|
|
2443
2588
|
{{ todayMessage }}
|
|
2444
2589
|
</span>
|
|
2445
2590
|
<button
|
|
2446
2591
|
*ngIf="showNavigationButtons"
|
|
2447
2592
|
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-next"
|
|
2593
|
+
tabindex="-1"
|
|
2448
2594
|
type="button"
|
|
2449
2595
|
[attr.aria-disabled]="isNextDisabled"
|
|
2450
2596
|
[disabled]="isNextDisabled"
|
|
@@ -2476,6 +2622,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2476
2622
|
type: Input
|
|
2477
2623
|
}], orientation: [{
|
|
2478
2624
|
type: Input
|
|
2625
|
+
}], id: [{
|
|
2626
|
+
type: Input
|
|
2479
2627
|
}], todayButtonClick: [{
|
|
2480
2628
|
type: Output
|
|
2481
2629
|
}], prevButtonClick: [{
|
|
@@ -2493,51 +2641,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2493
2641
|
args: ["class.k-vstack"]
|
|
2494
2642
|
}] } });
|
|
2495
2643
|
|
|
2496
|
-
const KEY_TO_ACTION = {
|
|
2497
|
-
'33': Action.PrevView,
|
|
2498
|
-
'34': Action.NextView,
|
|
2499
|
-
'35': Action.LastInView,
|
|
2500
|
-
'36': Action.FirstInView,
|
|
2501
|
-
'37': Action.Left,
|
|
2502
|
-
'38': Action.Up,
|
|
2503
|
-
'39': Action.Right,
|
|
2504
|
-
'40': Action.Down,
|
|
2505
|
-
'meta+38': Action.UpperView,
|
|
2506
|
-
'meta+40': Action.LowerView
|
|
2507
|
-
};
|
|
2508
|
-
/**
|
|
2509
|
-
* @hidden
|
|
2510
|
-
*/
|
|
2511
|
-
class NavigationService {
|
|
2512
|
-
constructor(bus) {
|
|
2513
|
-
this.bus = bus;
|
|
2514
|
-
}
|
|
2515
|
-
action(event) {
|
|
2516
|
-
const action = `${event.ctrlKey || event.metaKey ? 'meta+' : ''}${event.keyCode}`;
|
|
2517
|
-
return KEY_TO_ACTION[action];
|
|
2518
|
-
}
|
|
2519
|
-
move(value, action, activeView) {
|
|
2520
|
-
const service = this.bus.service(activeView);
|
|
2521
|
-
if (!service) {
|
|
2522
|
-
return value;
|
|
2523
|
-
}
|
|
2524
|
-
if (action === Action.UpperView && this.bus.canMoveUp(activeView)) {
|
|
2525
|
-
this.bus.moveUp(activeView);
|
|
2526
|
-
return value;
|
|
2527
|
-
}
|
|
2528
|
-
if (action === Action.LowerView && this.bus.canMoveDown(activeView)) {
|
|
2529
|
-
this.bus.moveDown(activeView);
|
|
2530
|
-
return value;
|
|
2531
|
-
}
|
|
2532
|
-
return service.move(value, action);
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, deps: [{ token: BusViewService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2536
|
-
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService });
|
|
2537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, decorators: [{
|
|
2538
|
-
type: Injectable
|
|
2539
|
-
}], ctorParameters: function () { return [{ type: BusViewService }]; } });
|
|
2540
|
-
|
|
2541
2644
|
/**
|
|
2542
2645
|
* @hidden
|
|
2543
2646
|
*/
|
|
@@ -2562,6 +2665,10 @@ class SelectionService {
|
|
|
2562
2665
|
const [start, end] = sortDates([rangePivot || date, date]);
|
|
2563
2666
|
selectedDates = this.bus.service(activeViewEnum).dateRange(start, end);
|
|
2564
2667
|
rangePivot = date > selectedDates[0] ? selectedDates[0] : last(selectedDates);
|
|
2668
|
+
if (modifiers.anyArrow) {
|
|
2669
|
+
const [start, end] = sortDates([this.lastClicked || date, date]);
|
|
2670
|
+
selectedDates = this.bus.service(0).dateRange(start, end);
|
|
2671
|
+
}
|
|
2565
2672
|
}
|
|
2566
2673
|
else {
|
|
2567
2674
|
selectedDates = [date];
|
|
@@ -2918,13 +3025,58 @@ const disabledDatesRangeValidator = (isDateDisabled) => {
|
|
|
2918
3025
|
};
|
|
2919
3026
|
};
|
|
2920
3027
|
|
|
3028
|
+
const KEY_TO_ACTION = {
|
|
3029
|
+
'33': Action.PrevView,
|
|
3030
|
+
'34': Action.NextView,
|
|
3031
|
+
'35': Action.LastInView,
|
|
3032
|
+
'36': Action.FirstInView,
|
|
3033
|
+
'37': Action.Left,
|
|
3034
|
+
'38': Action.Up,
|
|
3035
|
+
'39': Action.Right,
|
|
3036
|
+
'40': Action.Down,
|
|
3037
|
+
'meta+38': Action.UpperView,
|
|
3038
|
+
'meta+40': Action.LowerView
|
|
3039
|
+
};
|
|
3040
|
+
/**
|
|
3041
|
+
* @hidden
|
|
3042
|
+
*/
|
|
3043
|
+
class NavigationService {
|
|
3044
|
+
constructor(bus) {
|
|
3045
|
+
this.bus = bus;
|
|
3046
|
+
}
|
|
3047
|
+
action(event) {
|
|
3048
|
+
const action = `${event.ctrlKey || event.metaKey ? 'meta+' : ''}${event.keyCode}`;
|
|
3049
|
+
return KEY_TO_ACTION[action];
|
|
3050
|
+
}
|
|
3051
|
+
move(value, action, activeView) {
|
|
3052
|
+
const service = this.bus.service(activeView);
|
|
3053
|
+
if (!service) {
|
|
3054
|
+
return value;
|
|
3055
|
+
}
|
|
3056
|
+
if (action === Action.UpperView && this.bus.canMoveUp(activeView)) {
|
|
3057
|
+
this.bus.moveUp(activeView);
|
|
3058
|
+
return value;
|
|
3059
|
+
}
|
|
3060
|
+
if (action === Action.LowerView && this.bus.canMoveDown(activeView)) {
|
|
3061
|
+
this.bus.moveDown(activeView);
|
|
3062
|
+
return value;
|
|
3063
|
+
}
|
|
3064
|
+
return service.move(value, action);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, deps: [{ token: BusViewService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3068
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService });
|
|
3069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, decorators: [{
|
|
3070
|
+
type: Injectable
|
|
3071
|
+
}], ctorParameters: function () { return [{ type: BusViewService }]; } });
|
|
3072
|
+
|
|
2921
3073
|
/**
|
|
2922
3074
|
* @hidden
|
|
2923
3075
|
*/
|
|
2924
3076
|
class Messages$1 extends ComponentMessages {
|
|
2925
3077
|
}
|
|
2926
3078
|
Messages$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages$1, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2927
|
-
Messages$1.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages$1, selector: "kendo-multiview-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle" }, usesInheritance: true, ngImport: i0 });
|
|
3079
|
+
Messages$1.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages$1, selector: "kendo-multiview-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle" }, usesInheritance: true, ngImport: i0 });
|
|
2928
3080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages$1, decorators: [{
|
|
2929
3081
|
type: Directive,
|
|
2930
3082
|
args: [{
|
|
@@ -2937,6 +3089,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2937
3089
|
type: Input
|
|
2938
3090
|
}], nextButtonTitle: [{
|
|
2939
3091
|
type: Input
|
|
3092
|
+
}], parentViewButtonTitle: [{
|
|
3093
|
+
type: Input
|
|
2940
3094
|
}] } });
|
|
2941
3095
|
|
|
2942
3096
|
/**
|
|
@@ -3013,10 +3167,6 @@ class MultiViewCalendarComponent {
|
|
|
3013
3167
|
this.zone = zone;
|
|
3014
3168
|
this.disabledDatesService = disabledDatesService;
|
|
3015
3169
|
this.selectionService = selectionService;
|
|
3016
|
-
/**
|
|
3017
|
-
* @hidden
|
|
3018
|
-
*/
|
|
3019
|
-
this.id = guid();
|
|
3020
3170
|
/**
|
|
3021
3171
|
* Determines whether the built-in min or max validators are enforced when validating a form.
|
|
3022
3172
|
*/
|
|
@@ -3052,10 +3202,6 @@ class MultiViewCalendarComponent {
|
|
|
3052
3202
|
* @hidden
|
|
3053
3203
|
*/
|
|
3054
3204
|
this.isActive = false;
|
|
3055
|
-
/**
|
|
3056
|
-
* @hidden
|
|
3057
|
-
*/
|
|
3058
|
-
this.isHeaderActive = false;
|
|
3059
3205
|
/**
|
|
3060
3206
|
* Defines the active view that the Calendar initially renders
|
|
3061
3207
|
* ([see example]({% slug activeview_multiviewcalendar %})).
|
|
@@ -3132,6 +3278,10 @@ class MultiViewCalendarComponent {
|
|
|
3132
3278
|
* @hidden
|
|
3133
3279
|
*/
|
|
3134
3280
|
this.blurEvent = new EventEmitter();
|
|
3281
|
+
/**
|
|
3282
|
+
* @hidden
|
|
3283
|
+
*/
|
|
3284
|
+
this.focusCalendar = new EventEmitter();
|
|
3135
3285
|
this.cellUID = guid();
|
|
3136
3286
|
this.isHovered = false;
|
|
3137
3287
|
this.isPrevDisabled = true;
|
|
@@ -3151,6 +3301,7 @@ class MultiViewCalendarComponent {
|
|
|
3151
3301
|
this.disabledDatesRangeValidateFn = noop$2;
|
|
3152
3302
|
this.subscriptions = new Subscription();
|
|
3153
3303
|
this.setClasses(element.nativeElement);
|
|
3304
|
+
this.id = `kendo-multiviewcalendarid-${this.bus.calendarId}-`;
|
|
3154
3305
|
}
|
|
3155
3306
|
/**
|
|
3156
3307
|
* Sets or gets the `focusedDate` property of the Calendar and
|
|
@@ -3165,6 +3316,24 @@ class MultiViewCalendarComponent {
|
|
|
3165
3316
|
get focusedDate() {
|
|
3166
3317
|
return this._focusedDate;
|
|
3167
3318
|
}
|
|
3319
|
+
/**
|
|
3320
|
+
* @hidden
|
|
3321
|
+
*/
|
|
3322
|
+
get headerId() {
|
|
3323
|
+
return this.id + 'header-';
|
|
3324
|
+
}
|
|
3325
|
+
/**
|
|
3326
|
+
* @hidden
|
|
3327
|
+
*/
|
|
3328
|
+
get multiViewCalendarHeaderIdLabel() {
|
|
3329
|
+
return this.views === 2 ? this.id + 'header-' : null;
|
|
3330
|
+
}
|
|
3331
|
+
/**
|
|
3332
|
+
* @hidden
|
|
3333
|
+
*/
|
|
3334
|
+
get calendarHeaderIdLabel() {
|
|
3335
|
+
return this.views === 1 ? this.id + 'header-' : null;
|
|
3336
|
+
}
|
|
3168
3337
|
/**
|
|
3169
3338
|
* Sets or gets the `min` property of the Calendar and
|
|
3170
3339
|
* defines the minimum allowed date value.
|
|
@@ -3335,14 +3504,14 @@ class MultiViewCalendarComponent {
|
|
|
3335
3504
|
return CalendarViewEnum[this.topView];
|
|
3336
3505
|
}
|
|
3337
3506
|
get widgetId() {
|
|
3338
|
-
return this.id;
|
|
3339
|
-
}
|
|
3340
|
-
get calendarTabIndex() {
|
|
3341
|
-
return this.disabled ? undefined : this.tabIndex;
|
|
3507
|
+
return this.views === 2 ? this.id : null;
|
|
3342
3508
|
}
|
|
3343
3509
|
get ariaDisabled() {
|
|
3344
3510
|
return this.disabled;
|
|
3345
3511
|
}
|
|
3512
|
+
/**
|
|
3513
|
+
* @hidden
|
|
3514
|
+
*/
|
|
3346
3515
|
get ariaActivedescendant() {
|
|
3347
3516
|
return this.cellUID + this.focusedDate.getTime();
|
|
3348
3517
|
}
|
|
@@ -3357,14 +3526,13 @@ class MultiViewCalendarComponent {
|
|
|
3357
3526
|
}
|
|
3358
3527
|
this.isActive = false;
|
|
3359
3528
|
this.isHovered = false; //ensure that hovered is also not active
|
|
3360
|
-
this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
|
|
3361
3529
|
}
|
|
3362
3530
|
/**
|
|
3363
3531
|
* @hidden
|
|
3364
3532
|
*/
|
|
3365
3533
|
handleFocus() {
|
|
3366
3534
|
this.isActive = true;
|
|
3367
|
-
this.
|
|
3535
|
+
this.focusCalendar.emit();
|
|
3368
3536
|
}
|
|
3369
3537
|
/**
|
|
3370
3538
|
* @hidden
|
|
@@ -3397,10 +3565,32 @@ class MultiViewCalendarComponent {
|
|
|
3397
3565
|
* @hidden
|
|
3398
3566
|
*/
|
|
3399
3567
|
keydown(event) {
|
|
3400
|
-
|
|
3568
|
+
const arrowUpOrDownKeyPressed = [Keys$1.ArrowUp, Keys$1.ArrowDown].indexOf(event.keyCode) !== -1;
|
|
3569
|
+
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
3570
|
+
const onArrowRightAndControl = event.keyCode === Keys$1.ArrowRight && ctrlKey;
|
|
3571
|
+
const onArrowLeftAndControl = event.keyCode === Keys$1.ArrowLeft && ctrlKey;
|
|
3572
|
+
const onTKeyPress = event.keyCode === Keys$1.KeyT;
|
|
3573
|
+
const onEnterKeyPress = event.keyCode === Keys$1.Enter;
|
|
3574
|
+
if (onArrowRightAndControl) {
|
|
3575
|
+
event.preventDefault();
|
|
3576
|
+
this.navigateView(this.nextView);
|
|
3401
3577
|
return;
|
|
3402
3578
|
}
|
|
3403
|
-
if (
|
|
3579
|
+
else if (onArrowLeftAndControl) {
|
|
3580
|
+
event.preventDefault();
|
|
3581
|
+
this.navigateView(this.prevView);
|
|
3582
|
+
return;
|
|
3583
|
+
}
|
|
3584
|
+
else if (ctrlKey && arrowUpOrDownKeyPressed) {
|
|
3585
|
+
event.preventDefault();
|
|
3586
|
+
}
|
|
3587
|
+
else if (onTKeyPress) {
|
|
3588
|
+
this.focusedDate = getToday();
|
|
3589
|
+
this.bus.moveToBottom(this.activeViewEnum);
|
|
3590
|
+
return;
|
|
3591
|
+
}
|
|
3592
|
+
else if (onEnterKeyPress) {
|
|
3593
|
+
this.selectionService.lastClicked = this.focusedDate;
|
|
3404
3594
|
this.performSelection(this.focusedDate, event);
|
|
3405
3595
|
}
|
|
3406
3596
|
const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
|
|
@@ -3413,6 +3603,10 @@ class MultiViewCalendarComponent {
|
|
|
3413
3603
|
if (!isSameView) {
|
|
3414
3604
|
this.emitNavigate(this.focusedDate);
|
|
3415
3605
|
}
|
|
3606
|
+
if (isArrowWithShiftPressed(event)) {
|
|
3607
|
+
event['anyArrow'] = true;
|
|
3608
|
+
this.performSelection(this.focusedDate, event);
|
|
3609
|
+
}
|
|
3416
3610
|
}
|
|
3417
3611
|
ngOnInit() {
|
|
3418
3612
|
this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
|
|
@@ -3464,7 +3658,7 @@ class MultiViewCalendarComponent {
|
|
|
3464
3658
|
if (!this.element) {
|
|
3465
3659
|
return;
|
|
3466
3660
|
}
|
|
3467
|
-
this.element.nativeElement.focus();
|
|
3661
|
+
this.element.nativeElement.querySelector('.k-calendar-view').focus();
|
|
3468
3662
|
}
|
|
3469
3663
|
/**
|
|
3470
3664
|
* Blurs the Calendar component.
|
|
@@ -3473,13 +3667,9 @@ class MultiViewCalendarComponent {
|
|
|
3473
3667
|
if (!this.element) {
|
|
3474
3668
|
return;
|
|
3475
3669
|
}
|
|
3476
|
-
this.element.nativeElement.
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
* @hidden
|
|
3480
|
-
*/
|
|
3481
|
-
handleHeaderFocus() {
|
|
3482
|
-
this.isHeaderActive = true;
|
|
3670
|
+
const activeElement = this.views === 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
|
|
3671
|
+
this.element.nativeElement.querySelector('.k-content.k-calendar-table');
|
|
3672
|
+
activeElement.blur();
|
|
3483
3673
|
}
|
|
3484
3674
|
/**
|
|
3485
3675
|
* @hidden
|
|
@@ -3608,6 +3798,7 @@ class MultiViewCalendarComponent {
|
|
|
3608
3798
|
* @hidden
|
|
3609
3799
|
*/
|
|
3610
3800
|
handleCellClick({ date, modifiers }) {
|
|
3801
|
+
this.selectionService.lastClicked = date;
|
|
3611
3802
|
this.performSelection(date, modifiers);
|
|
3612
3803
|
const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
3613
3804
|
if (!isSameView) {
|
|
@@ -3686,7 +3877,7 @@ class MultiViewCalendarComponent {
|
|
|
3686
3877
|
}
|
|
3687
3878
|
}
|
|
3688
3879
|
MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: BusViewService }, { token: i0.ElementRef }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DisabledDatesService }, { token: SelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3689
|
-
MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur" }, host: { listeners: { "focusout": "handleFocusout($event)", "focus": "handleFocus()", "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.
|
|
3880
|
+
MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur", focusCalendar: "focusCalendar" }, host: { listeners: { "focusout": "handleFocusout($event)", "focus": "handleFocus()", "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
|
|
3690
3881
|
BusViewService,
|
|
3691
3882
|
RANGE_CALENDAR_VALUE_ACCESSOR,
|
|
3692
3883
|
RANGE_CALENDAR_RANGE_VALIDATORS,
|
|
@@ -3708,6 +3899,9 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
3708
3899
|
|
|
3709
3900
|
i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
|
|
3710
3901
|
nextButtonTitle="Navigate to next view"
|
|
3902
|
+
|
|
3903
|
+
i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
|
|
3904
|
+
parentViewButtonTitle="Navigate to parent view"
|
|
3711
3905
|
>
|
|
3712
3906
|
</ng-container>
|
|
3713
3907
|
<kendo-calendar-header
|
|
@@ -3715,6 +3909,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
3715
3909
|
[currentDate]="activeDate"
|
|
3716
3910
|
[min]="min"
|
|
3717
3911
|
[max]="max"
|
|
3912
|
+
[id]="headerId"
|
|
3718
3913
|
[rangeLength]="views"
|
|
3719
3914
|
[templateRef]="headerTitleTemplateRef?.templateRef"
|
|
3720
3915
|
[isPrevDisabled]="isPrevDisabled"
|
|
@@ -3724,15 +3919,14 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
3724
3919
|
(todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
|
|
3725
3920
|
(prevButtonClick)="navigateView(prevView)"
|
|
3726
3921
|
(nextButtonClick)="navigateView(nextView)"
|
|
3727
|
-
[kendoEventsOutsideAngular]="{
|
|
3728
|
-
focusin: handleHeaderFocus
|
|
3729
|
-
}"
|
|
3730
|
-
[scope]="this"
|
|
3731
3922
|
>
|
|
3732
3923
|
</kendo-calendar-header>
|
|
3733
3924
|
<kendo-calendar-horizontal
|
|
3925
|
+
[id]="calendarHeaderIdLabel"
|
|
3926
|
+
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
3734
3927
|
[activeView]="activeViewEnum"
|
|
3735
|
-
[
|
|
3928
|
+
[activeDescendant]="ariaActivedescendant"
|
|
3929
|
+
[isActive]="isActive || isHovered"
|
|
3736
3930
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
3737
3931
|
[weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
|
|
3738
3932
|
[cellUID]="cellUID"
|
|
@@ -3747,14 +3941,18 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
3747
3941
|
[selectionRange]="selectionRange"
|
|
3748
3942
|
[selectedDates]="selectedDates"
|
|
3749
3943
|
[orientation]="orientation"
|
|
3944
|
+
[tabIndex]="tabIndex"
|
|
3945
|
+
[disabled]="disabled"
|
|
3750
3946
|
(cellClick)="handleCellClick($event)"
|
|
3751
3947
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
3752
3948
|
(cellEnter)="emitCellEvent(cellEnter, $event)"
|
|
3753
3949
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
3754
3950
|
(activeDateChange)="setActiveDate($event)"
|
|
3951
|
+
(focusCalendar)="handleFocus()"
|
|
3952
|
+
(blurCalendar)="handleFocusout($event)"
|
|
3755
3953
|
>
|
|
3756
3954
|
</kendo-calendar-horizontal>
|
|
3757
|
-
`, isInline: true, components: [{ type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange"] }], directives: [{ type: MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }
|
|
3955
|
+
`, isInline: true, components: [{ type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }], directives: [{ type: MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3758
3956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
|
|
3759
3957
|
type: Component,
|
|
3760
3958
|
args: [{
|
|
@@ -3784,6 +3982,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3784
3982
|
|
|
3785
3983
|
i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
|
|
3786
3984
|
nextButtonTitle="Navigate to next view"
|
|
3985
|
+
|
|
3986
|
+
i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
|
|
3987
|
+
parentViewButtonTitle="Navigate to parent view"
|
|
3787
3988
|
>
|
|
3788
3989
|
</ng-container>
|
|
3789
3990
|
<kendo-calendar-header
|
|
@@ -3791,6 +3992,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3791
3992
|
[currentDate]="activeDate"
|
|
3792
3993
|
[min]="min"
|
|
3793
3994
|
[max]="max"
|
|
3995
|
+
[id]="headerId"
|
|
3794
3996
|
[rangeLength]="views"
|
|
3795
3997
|
[templateRef]="headerTitleTemplateRef?.templateRef"
|
|
3796
3998
|
[isPrevDisabled]="isPrevDisabled"
|
|
@@ -3800,15 +4002,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3800
4002
|
(todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
|
|
3801
4003
|
(prevButtonClick)="navigateView(prevView)"
|
|
3802
4004
|
(nextButtonClick)="navigateView(nextView)"
|
|
3803
|
-
[kendoEventsOutsideAngular]="{
|
|
3804
|
-
focusin: handleHeaderFocus
|
|
3805
|
-
}"
|
|
3806
|
-
[scope]="this"
|
|
3807
4005
|
>
|
|
3808
4006
|
</kendo-calendar-header>
|
|
3809
4007
|
<kendo-calendar-horizontal
|
|
4008
|
+
[id]="calendarHeaderIdLabel"
|
|
4009
|
+
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
3810
4010
|
[activeView]="activeViewEnum"
|
|
3811
|
-
[
|
|
4011
|
+
[activeDescendant]="ariaActivedescendant"
|
|
4012
|
+
[isActive]="isActive || isHovered"
|
|
3812
4013
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
3813
4014
|
[weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
|
|
3814
4015
|
[cellUID]="cellUID"
|
|
@@ -3823,11 +4024,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3823
4024
|
[selectionRange]="selectionRange"
|
|
3824
4025
|
[selectedDates]="selectedDates"
|
|
3825
4026
|
[orientation]="orientation"
|
|
4027
|
+
[tabIndex]="tabIndex"
|
|
4028
|
+
[disabled]="disabled"
|
|
3826
4029
|
(cellClick)="handleCellClick($event)"
|
|
3827
4030
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
3828
4031
|
(cellEnter)="emitCellEvent(cellEnter, $event)"
|
|
3829
4032
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
3830
4033
|
(activeDateChange)="setActiveDate($event)"
|
|
4034
|
+
(focusCalendar)="handleFocus()"
|
|
4035
|
+
(blurCalendar)="handleFocusout($event)"
|
|
3831
4036
|
>
|
|
3832
4037
|
</kendo-calendar-horizontal>
|
|
3833
4038
|
`
|
|
@@ -3891,6 +4096,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3891
4096
|
}], blurEvent: [{
|
|
3892
4097
|
type: Output,
|
|
3893
4098
|
args: ['blur']
|
|
4099
|
+
}], focusCalendar: [{
|
|
4100
|
+
type: Output
|
|
3894
4101
|
}], cellTemplate: [{
|
|
3895
4102
|
type: ContentChild,
|
|
3896
4103
|
args: [CellTemplateDirective, { static: false }]
|
|
@@ -3942,18 +4149,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3942
4149
|
}], widgetId: [{
|
|
3943
4150
|
type: HostBinding,
|
|
3944
4151
|
args: ['attr.id']
|
|
3945
|
-
}], calendarTabIndex: [{
|
|
3946
|
-
type: HostBinding,
|
|
3947
|
-
args: ['attr.tabindex']
|
|
3948
4152
|
}], ariaDisabled: [{
|
|
3949
4153
|
type: HostBinding,
|
|
3950
4154
|
args: ['attr.aria-disabled']
|
|
3951
4155
|
}, {
|
|
3952
4156
|
type: HostBinding,
|
|
3953
4157
|
args: ['class.k-disabled']
|
|
3954
|
-
}], ariaActivedescendant: [{
|
|
3955
|
-
type: HostBinding,
|
|
3956
|
-
args: ['attr.aria-activedescendant']
|
|
3957
4158
|
}], handleFocusout: [{
|
|
3958
4159
|
type: HostListener,
|
|
3959
4160
|
args: ['focusout', ['$event']]
|
|
@@ -4177,10 +4378,11 @@ const differenceToScroll = (scrollTop, staticOffset, maxScrollDifference) => {
|
|
|
4177
4378
|
* @hidden
|
|
4178
4379
|
*/
|
|
4179
4380
|
class VirtualizationComponent {
|
|
4180
|
-
constructor(scrollerFactory, container, renderer, zone) {
|
|
4381
|
+
constructor(scrollerFactory, container, renderer, zone, scrollBarWidthService) {
|
|
4181
4382
|
this.container = container;
|
|
4182
4383
|
this.renderer = renderer;
|
|
4183
4384
|
this.zone = zone;
|
|
4385
|
+
this.scrollBarWidthService = scrollBarWidthService;
|
|
4184
4386
|
this.direction = 'vertical';
|
|
4185
4387
|
this.itemHeight = 1;
|
|
4186
4388
|
this.itemWidth = 1;
|
|
@@ -4359,7 +4561,7 @@ class VirtualizationComponent {
|
|
|
4359
4561
|
return indexOffset < this.containerScrollPosition ? ScrollDirection.Backward : ScrollDirection.Forward;
|
|
4360
4562
|
}
|
|
4361
4563
|
}
|
|
4362
|
-
VirtualizationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VirtualizationComponent, deps: [{ token: SCROLLER_FACTORY_TOKEN }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
4564
|
+
VirtualizationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VirtualizationComponent, deps: [{ token: SCROLLER_FACTORY_TOKEN }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i5.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4363
4565
|
VirtualizationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VirtualizationComponent, selector: "kendo-virtualization", inputs: { direction: "direction", itemHeight: "itemHeight", itemWidth: "itemWidth", topOffset: "topOffset", bottomOffset: "bottomOffset", maxScrollDifference: "maxScrollDifference", scrollOffsetSize: "scrollOffsetSize", scrollDuration: "scrollDuration", skip: "skip", take: "take", total: "total" }, outputs: { activeIndexChange: "activeIndexChange", pageChange: "pageChange", scrollChange: "scrollChange" }, host: { properties: { "class.k-flex": "this.wrapperClasses", "class.k-content": "this.wrapperClasses", "class.k-scrollable": "this.wrapperClasses", "class.k-scrollable-horizontal": "this.horizontalClass" } }, providers: [{
|
|
4364
4566
|
provide: SCROLLER_FACTORY_TOKEN,
|
|
4365
4567
|
useValue: DEFAULT_SCROLLER_FACTORY
|
|
@@ -4391,7 +4593,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4391
4593
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4392
4594
|
type: Inject,
|
|
4393
4595
|
args: [SCROLLER_FACTORY_TOKEN]
|
|
4394
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { direction: [{
|
|
4596
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i5.ScrollbarWidthService }]; }, propDecorators: { direction: [{
|
|
4395
4597
|
type: Input
|
|
4396
4598
|
}], itemHeight: [{
|
|
4397
4599
|
type: Input
|
|
@@ -4802,15 +5004,21 @@ class ViewListComponent {
|
|
|
4802
5004
|
this.min = new Date(MIN_DATE);
|
|
4803
5005
|
this.max = new Date(MAX_DATE);
|
|
4804
5006
|
this.selectedDates = [];
|
|
5007
|
+
this.tabIndex = 0;
|
|
5008
|
+
this.disabled = false;
|
|
4805
5009
|
this.cellClick = new EventEmitter();
|
|
4806
5010
|
this.weekNumberCellClick = new EventEmitter();
|
|
4807
5011
|
this.activeDateChange = new EventEmitter();
|
|
4808
5012
|
this.todayButtonClick = new EventEmitter();
|
|
4809
5013
|
this.pageChange = new EventEmitter();
|
|
5014
|
+
this.focusCalendar = new EventEmitter();
|
|
5015
|
+
this.blurCalendar = new EventEmitter();
|
|
5016
|
+
this.focusedCellChange = new EventEmitter();
|
|
4810
5017
|
this.getComponentClass = true;
|
|
4811
5018
|
this.dates = [];
|
|
4812
5019
|
this.cols = [];
|
|
4813
5020
|
this.weekNames = [];
|
|
5021
|
+
this.wideWeekNames = [];
|
|
4814
5022
|
this.take = VIEWS_COUNT;
|
|
4815
5023
|
this.animateToIndex = true;
|
|
4816
5024
|
this.indexToScroll = -1;
|
|
@@ -4835,7 +5043,8 @@ class ViewListComponent {
|
|
|
4835
5043
|
return this.activeView === CalendarViewEnum.century;
|
|
4836
5044
|
}
|
|
4837
5045
|
ngOnInit() {
|
|
4838
|
-
this.weekNames = this.getWeekNames();
|
|
5046
|
+
this.weekNames = this.getWeekNames('short');
|
|
5047
|
+
this.wideWeekNames = this.getWeekNames('wide');
|
|
4839
5048
|
this.bottomOffset = this.getBottomOffset();
|
|
4840
5049
|
this.viewOffset = -1 * this.dom.headerHeight;
|
|
4841
5050
|
this.viewHeight = this.dom.viewHeight(this.activeView);
|
|
@@ -4847,7 +5056,8 @@ class ViewListComponent {
|
|
|
4847
5056
|
return;
|
|
4848
5057
|
}
|
|
4849
5058
|
this.cols = new Array(this.service.rowLength({ prependCell: this.weekNumber })).fill('');
|
|
4850
|
-
this.weekNames = hasChange(changes, 'weekNumber') && this.weekNumber ? this.getWeekNames() : this.weekNames;
|
|
5059
|
+
this.weekNames = hasChange(changes, 'weekNumber') && this.weekNumber ? this.getWeekNames('short') : this.weekNames;
|
|
5060
|
+
this.wideWeekNames = hasChange(changes, 'weekNumber') && this.weekNumber ? this.getWeekNames('wide') : this.weekNames;
|
|
4851
5061
|
const activeViewChanged = hasChange(changes, 'activeView');
|
|
4852
5062
|
const focusedDate = this.focusedDate;
|
|
4853
5063
|
const viewDate = dateInRange(this.service.viewDate(focusedDate, this.max, this.minViewsToRender), this.min, this.max);
|
|
@@ -4912,6 +5122,9 @@ class ViewListComponent {
|
|
|
4912
5122
|
isScrolled() {
|
|
4913
5123
|
return this.virtualization.isListScrolled(this.service.skip(this.focusedDate, this.min));
|
|
4914
5124
|
}
|
|
5125
|
+
getTabIndex() {
|
|
5126
|
+
return this.disabled ? null : this.tabIndex;
|
|
5127
|
+
}
|
|
4915
5128
|
getBottomOffset() {
|
|
4916
5129
|
return this.getScrollableHeight() - this.dom.viewHeight(this.activeView);
|
|
4917
5130
|
}
|
|
@@ -4923,23 +5136,25 @@ class ViewListComponent {
|
|
|
4923
5136
|
getTake(skip) {
|
|
4924
5137
|
return Math.min(this.total - skip, this.take);
|
|
4925
5138
|
}
|
|
4926
|
-
getWeekNames() {
|
|
4927
|
-
const weekNames = shiftWeekNames(this.intl.dateFormatNames({ nameType:
|
|
5139
|
+
getWeekNames(nameType) {
|
|
5140
|
+
const weekNames = shiftWeekNames(this.intl.dateFormatNames({ nameType: nameType, type: 'days' }), this.intl.firstDay());
|
|
4928
5141
|
return this.weekNumber ? [''].concat(weekNames) : weekNames;
|
|
4929
5142
|
}
|
|
4930
5143
|
intlChange() {
|
|
4931
|
-
this.weekNames = this.getWeekNames();
|
|
5144
|
+
this.weekNames = this.getWeekNames('short');
|
|
5145
|
+
this.wideWeekNames = this.getWeekNames('wide');
|
|
4932
5146
|
if (this.isMonthView()) {
|
|
4933
5147
|
this.cdr.markForCheck();
|
|
4934
5148
|
}
|
|
4935
5149
|
}
|
|
4936
5150
|
}
|
|
4937
5151
|
ViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ViewListComponent, deps: [{ token: BusViewService }, { token: i0.ChangeDetectorRef }, { token: i1.IntlService }, { token: CalendarDOMService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
4938
|
-
ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitleTemplateRef: "headerTitleTemplateRef", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectedDates: "selectedDates", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", activeDateChange: "activeDateChange", todayButtonClick: "todayButtonClick", pageChange: "pageChange" }, host: { properties: { "class.k-vstack": "this.getComponentClass", "class.k-calendar-view": "this.getComponentClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
5152
|
+
ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitleTemplateRef: "headerTitleTemplateRef", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectedDates: "selectedDates", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", activeDateChange: "activeDateChange", todayButtonClick: "todayButtonClick", pageChange: "pageChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { properties: { "class.k-vstack": "this.getComponentClass", "class.k-calendar-view": "this.getComponentClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
4939
5153
|
<kendo-calendar-header
|
|
4940
5154
|
[currentDate]="activeDate"
|
|
4941
5155
|
[min]="min"
|
|
4942
5156
|
[max]="max"
|
|
5157
|
+
[id]="id"
|
|
4943
5158
|
[activeView]="activeView"
|
|
4944
5159
|
[templateRef]="headerTitleTemplateRef"
|
|
4945
5160
|
(todayButtonClick)="todayButtonClick.emit($event)"
|
|
@@ -4948,7 +5163,7 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
4948
5163
|
<table class="k-calendar-weekdays k-calendar-table" style="table-layout: auto;" *ngIf="isMonthView()">
|
|
4949
5164
|
<thead class="k-calendar-thead">
|
|
4950
5165
|
<tr class="k-calendar-tr">
|
|
4951
|
-
<th class="k-calendar-th" *ngFor="let name of weekNames">{{name}}</th>
|
|
5166
|
+
<th class="k-calendar-th" *ngFor="let name of weekNames; let i = index;" scope="col" [attr.aria-label]="wideWeekNames[i]" role="columnheader">{{name}}</th>
|
|
4952
5167
|
</tr>
|
|
4953
5168
|
</thead>
|
|
4954
5169
|
</table>
|
|
@@ -4970,6 +5185,10 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
4970
5185
|
#list
|
|
4971
5186
|
role="grid"
|
|
4972
5187
|
class="k-calendar-table"
|
|
5188
|
+
[attr.tabindex]="getTabIndex()"
|
|
5189
|
+
[attr.aria-labelledby]="id"
|
|
5190
|
+
(focus)="focusCalendar.emit()"
|
|
5191
|
+
(focusout)="blurCalendar.emit($event)"
|
|
4973
5192
|
>
|
|
4974
5193
|
<colgroup><col *ngFor="let _ of cols" /></colgroup>
|
|
4975
5194
|
|
|
@@ -4989,10 +5208,11 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
4989
5208
|
[viewDate]="date"
|
|
4990
5209
|
(cellClick)="cellClick.emit($event)"
|
|
4991
5210
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
5211
|
+
(focusedCellId)="focusedCellChange.emit($event)"
|
|
4992
5212
|
></tbody>
|
|
4993
5213
|
</table>
|
|
4994
5214
|
</kendo-virtualization>
|
|
4995
|
-
`, isInline: true, components: [{ type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }, { type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5215
|
+
`, isInline: true, components: [{ type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }, { type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4996
5216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ViewListComponent, decorators: [{
|
|
4997
5217
|
type: Component,
|
|
4998
5218
|
args: [{
|
|
@@ -5003,6 +5223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5003
5223
|
[currentDate]="activeDate"
|
|
5004
5224
|
[min]="min"
|
|
5005
5225
|
[max]="max"
|
|
5226
|
+
[id]="id"
|
|
5006
5227
|
[activeView]="activeView"
|
|
5007
5228
|
[templateRef]="headerTitleTemplateRef"
|
|
5008
5229
|
(todayButtonClick)="todayButtonClick.emit($event)"
|
|
@@ -5011,7 +5232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5011
5232
|
<table class="k-calendar-weekdays k-calendar-table" style="table-layout: auto;" *ngIf="isMonthView()">
|
|
5012
5233
|
<thead class="k-calendar-thead">
|
|
5013
5234
|
<tr class="k-calendar-tr">
|
|
5014
|
-
<th class="k-calendar-th" *ngFor="let name of weekNames">{{name}}</th>
|
|
5235
|
+
<th class="k-calendar-th" *ngFor="let name of weekNames; let i = index;" scope="col" [attr.aria-label]="wideWeekNames[i]" role="columnheader">{{name}}</th>
|
|
5015
5236
|
</tr>
|
|
5016
5237
|
</thead>
|
|
5017
5238
|
</table>
|
|
@@ -5033,6 +5254,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5033
5254
|
#list
|
|
5034
5255
|
role="grid"
|
|
5035
5256
|
class="k-calendar-table"
|
|
5257
|
+
[attr.tabindex]="getTabIndex()"
|
|
5258
|
+
[attr.aria-labelledby]="id"
|
|
5259
|
+
(focus)="focusCalendar.emit()"
|
|
5260
|
+
(focusout)="blurCalendar.emit($event)"
|
|
5036
5261
|
>
|
|
5037
5262
|
<colgroup><col *ngFor="let _ of cols" /></colgroup>
|
|
5038
5263
|
|
|
@@ -5052,6 +5277,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5052
5277
|
[viewDate]="date"
|
|
5053
5278
|
(cellClick)="cellClick.emit($event)"
|
|
5054
5279
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
5280
|
+
(focusedCellId)="focusedCellChange.emit($event)"
|
|
5055
5281
|
></tbody>
|
|
5056
5282
|
</table>
|
|
5057
5283
|
</kendo-virtualization>
|
|
@@ -5077,6 +5303,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5077
5303
|
type: Input
|
|
5078
5304
|
}], selectedDates: [{
|
|
5079
5305
|
type: Input
|
|
5306
|
+
}], tabIndex: [{
|
|
5307
|
+
type: Input
|
|
5308
|
+
}], disabled: [{
|
|
5309
|
+
type: Input
|
|
5310
|
+
}], id: [{
|
|
5311
|
+
type: Input
|
|
5080
5312
|
}], weekNumber: [{
|
|
5081
5313
|
type: Input
|
|
5082
5314
|
}], cellClick: [{
|
|
@@ -5089,6 +5321,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5089
5321
|
type: Output
|
|
5090
5322
|
}], pageChange: [{
|
|
5091
5323
|
type: Output
|
|
5324
|
+
}], focusCalendar: [{
|
|
5325
|
+
type: Output
|
|
5326
|
+
}], blurCalendar: [{
|
|
5327
|
+
type: Output
|
|
5328
|
+
}], focusedCellChange: [{
|
|
5329
|
+
type: Output
|
|
5092
5330
|
}], virtualization: [{
|
|
5093
5331
|
type: ViewChild,
|
|
5094
5332
|
args: [VirtualizationComponent, { static: false }]
|
|
@@ -5279,7 +5517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5279
5517
|
class CalendarMessages extends ComponentMessages {
|
|
5280
5518
|
}
|
|
5281
5519
|
CalendarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
5282
|
-
CalendarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CalendarMessages, selector: "kendo-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle" }, usesInheritance: true, ngImport: i0 });
|
|
5520
|
+
CalendarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CalendarMessages, selector: "kendo-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle" }, usesInheritance: true, ngImport: i0 });
|
|
5283
5521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarMessages, decorators: [{
|
|
5284
5522
|
type: Directive,
|
|
5285
5523
|
args: [{
|
|
@@ -5292,6 +5530,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5292
5530
|
type: Input
|
|
5293
5531
|
}], nextButtonTitle: [{
|
|
5294
5532
|
type: Input
|
|
5533
|
+
}], parentViewButtonTitle: [{
|
|
5534
|
+
type: Input
|
|
5295
5535
|
}] } });
|
|
5296
5536
|
|
|
5297
5537
|
/**
|
|
@@ -5381,10 +5621,6 @@ class CalendarComponent {
|
|
|
5381
5621
|
this.localization = localization;
|
|
5382
5622
|
this.selectionService = selectionService;
|
|
5383
5623
|
this.pickerService = pickerService;
|
|
5384
|
-
/**
|
|
5385
|
-
* @hidden
|
|
5386
|
-
*/
|
|
5387
|
-
this.id = guid();
|
|
5388
5624
|
/**
|
|
5389
5625
|
* Determines whether the built-in min or max validators are enforced when validating a form.
|
|
5390
5626
|
*/
|
|
@@ -5487,6 +5723,7 @@ class CalendarComponent {
|
|
|
5487
5723
|
this.resolvedPromise = Promise.resolve(null);
|
|
5488
5724
|
this.destroyed = false;
|
|
5489
5725
|
validatePackage(packageMetadata);
|
|
5726
|
+
this.id = `kendo-calendarid-${this.bus.calendarId}`;
|
|
5490
5727
|
this.setClasses(element.nativeElement);
|
|
5491
5728
|
if (this.pickerService) {
|
|
5492
5729
|
this.pickerService.calendar = this;
|
|
@@ -5511,6 +5748,12 @@ class CalendarComponent {
|
|
|
5511
5748
|
this._focusedDate = focusedDate || getToday();
|
|
5512
5749
|
this.setAriaActivedescendant();
|
|
5513
5750
|
}
|
|
5751
|
+
/**
|
|
5752
|
+
* @hidden
|
|
5753
|
+
*/
|
|
5754
|
+
get headerId() {
|
|
5755
|
+
return this.id + '-header';
|
|
5756
|
+
}
|
|
5514
5757
|
get focusedDate() {
|
|
5515
5758
|
return this._focusedDate;
|
|
5516
5759
|
}
|
|
@@ -5706,10 +5949,6 @@ class CalendarComponent {
|
|
|
5706
5949
|
get widgetId() {
|
|
5707
5950
|
return this.id;
|
|
5708
5951
|
}
|
|
5709
|
-
get calendarTabIndex() {
|
|
5710
|
-
// in Classic mode, the inner MultiViewCalendar is the focusable element
|
|
5711
|
-
return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
|
|
5712
|
-
}
|
|
5713
5952
|
get ariaDisabled() {
|
|
5714
5953
|
// in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
|
|
5715
5954
|
return this.type === 'classic' ? undefined : this.disabled;
|
|
@@ -5780,7 +6019,7 @@ class CalendarComponent {
|
|
|
5780
6019
|
this.cdr.detectChanges();
|
|
5781
6020
|
}
|
|
5782
6021
|
/**
|
|
5783
|
-
* Focuses the
|
|
6022
|
+
* Focuses the Calendar by making the table.k-calendar-table element active.
|
|
5784
6023
|
*
|
|
5785
6024
|
* @example
|
|
5786
6025
|
* ```ts
|
|
@@ -5795,19 +6034,18 @@ class CalendarComponent {
|
|
|
5795
6034
|
* ```
|
|
5796
6035
|
*/
|
|
5797
6036
|
focus() {
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
this.
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
}
|
|
6037
|
+
var _a, _b, _c;
|
|
6038
|
+
this.currentlyFocusedElement = this.type === 'infinite' ?
|
|
6039
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.nativeElement.querySelector(selectors.infiniteCalendarTable) :
|
|
6040
|
+
this.currentlyFocusedElement = (_b = this.element) === null || _b === void 0 ? void 0 : _b.nativeElement.querySelector(selectors.multiViewCalendarTable);
|
|
6041
|
+
(_c = this.currentlyFocusedElement) === null || _c === void 0 ? void 0 : _c.focus();
|
|
5804
6042
|
}
|
|
5805
6043
|
/**
|
|
5806
6044
|
* Blurs the Calendar component.
|
|
5807
6045
|
*/
|
|
5808
6046
|
blur() {
|
|
5809
6047
|
const blurTarget = this.type === 'infinite' ?
|
|
5810
|
-
this.
|
|
6048
|
+
this.currentlyFocusedElement :
|
|
5811
6049
|
this.multiViewCalendar;
|
|
5812
6050
|
if (isPresent(blurTarget)) {
|
|
5813
6051
|
blurTarget.blur();
|
|
@@ -5984,6 +6222,8 @@ class CalendarComponent {
|
|
|
5984
6222
|
* @hidden
|
|
5985
6223
|
*/
|
|
5986
6224
|
handleCellClick({ date, modifiers }) {
|
|
6225
|
+
this.focus();
|
|
6226
|
+
this.selectionService.lastClicked = date;
|
|
5987
6227
|
this.performSelection(date, modifiers);
|
|
5988
6228
|
}
|
|
5989
6229
|
/**
|
|
@@ -6007,6 +6247,7 @@ class CalendarComponent {
|
|
|
6007
6247
|
if (this.element.nativeElement.contains(args.relatedTarget)) {
|
|
6008
6248
|
return;
|
|
6009
6249
|
}
|
|
6250
|
+
;
|
|
6010
6251
|
this.isActive = false;
|
|
6011
6252
|
// the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
|
|
6012
6253
|
// and enters the zone for no reason because the parent component is still untouched
|
|
@@ -6037,7 +6278,7 @@ class CalendarComponent {
|
|
|
6037
6278
|
*/
|
|
6038
6279
|
handleMultiViewCalendarKeydown(args) {
|
|
6039
6280
|
// Prevent form from submitting on enter if used in datepicker (classic view)
|
|
6040
|
-
if (isPresent(this.pickerService) && args.keyCode === Keys.Enter) {
|
|
6281
|
+
if (isPresent(this.pickerService) && args.keyCode === Keys$1.Enter) {
|
|
6041
6282
|
args.preventDefault();
|
|
6042
6283
|
}
|
|
6043
6284
|
}
|
|
@@ -6095,29 +6336,46 @@ class CalendarComponent {
|
|
|
6095
6336
|
}
|
|
6096
6337
|
}
|
|
6097
6338
|
handleKeydown(args) {
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
this.
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6339
|
+
if (this.type === 'infinite') {
|
|
6340
|
+
// reserve the alt + arrow key commands for the picker
|
|
6341
|
+
const ctrlKey = args.ctrlKey || args.metaKey;
|
|
6342
|
+
const arrowKeyPressed = [Keys$1.ArrowUp, Keys$1.ArrowRight, Keys$1.ArrowDown, Keys$1.ArrowLeft].indexOf(args.keyCode) !== -1;
|
|
6343
|
+
const reserveKeyCommandsForPicker = isPresent(this.pickerService) && arrowKeyPressed && args.altKey;
|
|
6344
|
+
if (reserveKeyCommandsForPicker) {
|
|
6345
|
+
return;
|
|
6346
|
+
}
|
|
6347
|
+
if (ctrlKey && arrowKeyPressed) {
|
|
6348
|
+
args.preventDefault();
|
|
6349
|
+
}
|
|
6350
|
+
// Prevent form from submitting on enter if used in datepicker (infinite view)
|
|
6351
|
+
const preventSubmitInDatePicker = isPresent(this.pickerService) && args.keyCode === Keys$1.Enter;
|
|
6352
|
+
if (preventSubmitInDatePicker) {
|
|
6353
|
+
args.preventDefault();
|
|
6354
|
+
}
|
|
6355
|
+
const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(args), this.activeViewEnum), this.min, this.max);
|
|
6356
|
+
if (!isEqual(this.focusedDate, candidate)) {
|
|
6357
|
+
this.focusedDate = candidate;
|
|
6358
|
+
this.detectChanges();
|
|
6359
|
+
args.preventDefault();
|
|
6360
|
+
}
|
|
6361
|
+
if (args.keyCode === Keys$1.Enter) {
|
|
6362
|
+
this.selectionService.lastClicked = this.focusedDate;
|
|
6363
|
+
this.performSelection(this.focusedDate, args);
|
|
6364
|
+
}
|
|
6365
|
+
if (args.keyCode === Keys$1.KeyT) {
|
|
6366
|
+
this.focusToday();
|
|
6367
|
+
}
|
|
6368
|
+
if (isArrowWithShiftPressed(args)) {
|
|
6369
|
+
args.anyArrow = true;
|
|
6370
|
+
this.performSelection(this.focusedDate, args);
|
|
6371
|
+
}
|
|
6119
6372
|
}
|
|
6120
6373
|
}
|
|
6374
|
+
focusToday() {
|
|
6375
|
+
this.focusedDate = getToday();
|
|
6376
|
+
this.bus.moveToBottom(this.activeViewEnum);
|
|
6377
|
+
this.cdr.detectChanges();
|
|
6378
|
+
}
|
|
6121
6379
|
detectChanges() {
|
|
6122
6380
|
if (!this.destroyed) {
|
|
6123
6381
|
this.cdr.detectChanges();
|
|
@@ -6129,16 +6387,19 @@ class CalendarComponent {
|
|
|
6129
6387
|
}
|
|
6130
6388
|
}
|
|
6131
6389
|
setAriaActivedescendant() {
|
|
6390
|
+
var _a;
|
|
6132
6391
|
// in Classic mode, the inner MultiViewCalendar handles the activedescendant
|
|
6133
|
-
|
|
6392
|
+
const infiniteCalendarTable = (_a = this.element.nativeElement) === null || _a === void 0 ? void 0 : _a.querySelector(selectors.infiniteCalendarTable);
|
|
6393
|
+
const activedescendantHandledByInnerMultiViewCalendar = !isPresent(infiniteCalendarTable) || (this.type === 'classic' && !infiniteCalendarTable.hasAttribute(attributeNames.ariaActiveDescendant));
|
|
6394
|
+
if (activedescendantHandledByInnerMultiViewCalendar) {
|
|
6134
6395
|
return;
|
|
6135
6396
|
}
|
|
6136
6397
|
if (this.type === 'classic') {
|
|
6137
|
-
this.renderer.removeAttribute(
|
|
6398
|
+
this.renderer.removeAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant);
|
|
6138
6399
|
return;
|
|
6139
6400
|
}
|
|
6140
6401
|
const focusedCellId = this.cellUID + this.focusedDate.getTime();
|
|
6141
|
-
this.renderer.setAttribute(
|
|
6402
|
+
this.renderer.setAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant, focusedCellId);
|
|
6142
6403
|
}
|
|
6143
6404
|
parseSelectionToValue(selection) {
|
|
6144
6405
|
selection = selection || [];
|
|
@@ -6161,7 +6422,7 @@ class CalendarComponent {
|
|
|
6161
6422
|
}
|
|
6162
6423
|
}
|
|
6163
6424
|
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarComponent, deps: [{ token: BusViewService }, { token: CalendarDOMService }, { token: i0.ElementRef }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: ScrollSyncService }, { token: DisabledDatesService }, { token: i1$1.LocalizationService }, { token: SelectionService }, { token: PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6164
|
-
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CalendarComponent, selector: "kendo-calendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", navigation: "navigation", activeView: "activeView", bottomView: "bottomView", topView: "topView", type: "type", animateNavigation: "animateNavigation", weekNumber: "weekNumber", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", valueChange: "valueChange" }, host: { properties: { "class.k-week-number": "this.weekNumber", "attr.id": "this.widgetId", "attr.
|
|
6425
|
+
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CalendarComponent, selector: "kendo-calendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", navigation: "navigation", activeView: "activeView", bottomView: "bottomView", topView: "topView", type: "type", animateNavigation: "animateNavigation", weekNumber: "weekNumber", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", valueChange: "valueChange" }, host: { properties: { "class.k-week-number": "this.weekNumber", "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
|
|
6165
6426
|
BusViewService,
|
|
6166
6427
|
CALENDAR_VALUE_ACCESSOR,
|
|
6167
6428
|
CALENDAR_RANGE_VALIDATORS,
|
|
@@ -6185,6 +6446,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6185
6446
|
|
|
6186
6447
|
i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
|
|
6187
6448
|
nextButtonTitle="Navigate to next view"
|
|
6449
|
+
|
|
6450
|
+
i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
|
|
6451
|
+
parentViewButtonTitle="Navigate to parent view"
|
|
6188
6452
|
>
|
|
6189
6453
|
</ng-container>
|
|
6190
6454
|
<ng-container *ngIf="type === 'infinite'">
|
|
@@ -6202,6 +6466,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6202
6466
|
<kendo-calendar-viewlist
|
|
6203
6467
|
[activeView]="activeViewEnum"
|
|
6204
6468
|
[isActive]="isActive"
|
|
6469
|
+
[id]="headerId"
|
|
6205
6470
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
6206
6471
|
[headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
|
|
6207
6472
|
[weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
|
|
@@ -6211,6 +6476,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6211
6476
|
[focusedDate]="focusedDate"
|
|
6212
6477
|
[weekNumber]="weekNumber"
|
|
6213
6478
|
[selectedDates]="selectedDates"
|
|
6479
|
+
[tabIndex]="tabIndex"
|
|
6480
|
+
[disabled]="disabled"
|
|
6214
6481
|
(todayButtonClick)="handleDateChange({
|
|
6215
6482
|
selectedDates: [$event],
|
|
6216
6483
|
focusedDate: $event
|
|
@@ -6219,6 +6486,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6219
6486
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
6220
6487
|
(activeDateChange)="handleActiveDateChange($event)"
|
|
6221
6488
|
(pageChange)="onPageChange()"
|
|
6489
|
+
(focusCalendar)="handleFocus()"
|
|
6490
|
+
(blurCalendar)="handleBlur($event)"
|
|
6222
6491
|
>
|
|
6223
6492
|
</kendo-calendar-viewlist>
|
|
6224
6493
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
@@ -6229,7 +6498,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6229
6498
|
[views]="1"
|
|
6230
6499
|
[min]="min"
|
|
6231
6500
|
[max]="max"
|
|
6501
|
+
[id]="id"
|
|
6232
6502
|
[isActive]="isActive"
|
|
6503
|
+
[tabIndex]="tabIndex"
|
|
6233
6504
|
[activeView]="activeView"
|
|
6234
6505
|
[bottomView]="bottomView"
|
|
6235
6506
|
[topView]="topView"
|
|
@@ -6249,7 +6520,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6249
6520
|
(activeViewChange)="handleActiveViewChange($event)"
|
|
6250
6521
|
(navigate)="handleNavigate($event)"
|
|
6251
6522
|
(valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
|
|
6252
|
-
(
|
|
6523
|
+
(focusCalendar)="handleFocus()"
|
|
6253
6524
|
(blur)="handleBlur($event)"
|
|
6254
6525
|
(keydown)="handleMultiViewCalendarKeydown($event)"
|
|
6255
6526
|
>
|
|
@@ -6257,11 +6528,12 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
6257
6528
|
[today]="localization.get('today')"
|
|
6258
6529
|
[prevButtonTitle]="localization.get('prevButtonTitle')"
|
|
6259
6530
|
[nextButtonTitle]="localization.get('nextButtonTitle')"
|
|
6531
|
+
[parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
|
|
6260
6532
|
>
|
|
6261
6533
|
</kendo-multiviewcalendar-messages>
|
|
6262
6534
|
</kendo-multiviewcalendar>
|
|
6263
6535
|
</ng-container>
|
|
6264
|
-
`, isInline: true, components: [{ type: NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange"] }, { type: i5.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur"], exportAs: ["kendo-multiviewcalendar"] }, { type: MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6536
|
+
`, isInline: true, components: [{ type: NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { type: i5.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }, { type: MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6265
6537
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
6266
6538
|
type: Component,
|
|
6267
6539
|
args: [{
|
|
@@ -6293,6 +6565,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6293
6565
|
|
|
6294
6566
|
i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
|
|
6295
6567
|
nextButtonTitle="Navigate to next view"
|
|
6568
|
+
|
|
6569
|
+
i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
|
|
6570
|
+
parentViewButtonTitle="Navigate to parent view"
|
|
6296
6571
|
>
|
|
6297
6572
|
</ng-container>
|
|
6298
6573
|
<ng-container *ngIf="type === 'infinite'">
|
|
@@ -6310,6 +6585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6310
6585
|
<kendo-calendar-viewlist
|
|
6311
6586
|
[activeView]="activeViewEnum"
|
|
6312
6587
|
[isActive]="isActive"
|
|
6588
|
+
[id]="headerId"
|
|
6313
6589
|
[cellTemplateRef]="activeCellTemplate()?.templateRef"
|
|
6314
6590
|
[headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
|
|
6315
6591
|
[weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
|
|
@@ -6319,6 +6595,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6319
6595
|
[focusedDate]="focusedDate"
|
|
6320
6596
|
[weekNumber]="weekNumber"
|
|
6321
6597
|
[selectedDates]="selectedDates"
|
|
6598
|
+
[tabIndex]="tabIndex"
|
|
6599
|
+
[disabled]="disabled"
|
|
6322
6600
|
(todayButtonClick)="handleDateChange({
|
|
6323
6601
|
selectedDates: [$event],
|
|
6324
6602
|
focusedDate: $event
|
|
@@ -6327,6 +6605,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6327
6605
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
6328
6606
|
(activeDateChange)="handleActiveDateChange($event)"
|
|
6329
6607
|
(pageChange)="onPageChange()"
|
|
6608
|
+
(focusCalendar)="handleFocus()"
|
|
6609
|
+
(blurCalendar)="handleBlur($event)"
|
|
6330
6610
|
>
|
|
6331
6611
|
</kendo-calendar-viewlist>
|
|
6332
6612
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
@@ -6337,7 +6617,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6337
6617
|
[views]="1"
|
|
6338
6618
|
[min]="min"
|
|
6339
6619
|
[max]="max"
|
|
6620
|
+
[id]="id"
|
|
6340
6621
|
[isActive]="isActive"
|
|
6622
|
+
[tabIndex]="tabIndex"
|
|
6341
6623
|
[activeView]="activeView"
|
|
6342
6624
|
[bottomView]="bottomView"
|
|
6343
6625
|
[topView]="topView"
|
|
@@ -6357,7 +6639,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6357
6639
|
(activeViewChange)="handleActiveViewChange($event)"
|
|
6358
6640
|
(navigate)="handleNavigate($event)"
|
|
6359
6641
|
(valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
|
|
6360
|
-
(
|
|
6642
|
+
(focusCalendar)="handleFocus()"
|
|
6361
6643
|
(blur)="handleBlur($event)"
|
|
6362
6644
|
(keydown)="handleMultiViewCalendarKeydown($event)"
|
|
6363
6645
|
>
|
|
@@ -6365,6 +6647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6365
6647
|
[today]="localization.get('today')"
|
|
6366
6648
|
[prevButtonTitle]="localization.get('prevButtonTitle')"
|
|
6367
6649
|
[nextButtonTitle]="localization.get('nextButtonTitle')"
|
|
6650
|
+
[parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
|
|
6368
6651
|
>
|
|
6369
6652
|
</kendo-multiviewcalendar-messages>
|
|
6370
6653
|
</kendo-multiviewcalendar>
|
|
@@ -6480,9 +6763,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6480
6763
|
}], widgetId: [{
|
|
6481
6764
|
type: HostBinding,
|
|
6482
6765
|
args: ['attr.id']
|
|
6483
|
-
}], calendarTabIndex: [{
|
|
6484
|
-
type: HostBinding,
|
|
6485
|
-
args: ['attr.tabindex']
|
|
6486
6766
|
}], ariaDisabled: [{
|
|
6487
6767
|
type: HostBinding,
|
|
6488
6768
|
args: ['attr.aria-disabled']
|
|
@@ -6563,6 +6843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6563
6843
|
}]
|
|
6564
6844
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
|
6565
6845
|
|
|
6846
|
+
let nextId = 0;
|
|
6566
6847
|
const MIN_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-min';
|
|
6567
6848
|
const MAX_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-max';
|
|
6568
6849
|
const VALUE_DOC_LINK$3 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/dateinput/#toc-using-with-json';
|
|
@@ -6613,6 +6894,7 @@ class KendoDate {
|
|
|
6613
6894
|
validatePackage(packageMetadata);
|
|
6614
6895
|
this.monthNames = this.allFormatedMonths();
|
|
6615
6896
|
this.dayPeriods = this.allDayPeriods();
|
|
6897
|
+
nextId++;
|
|
6616
6898
|
if (!value) {
|
|
6617
6899
|
this.value = getDate(new Date());
|
|
6618
6900
|
const sampleFormat = this.dateFormatString(this.value, this.format).symbols;
|
|
@@ -6999,10 +7281,6 @@ class DateInputComponent {
|
|
|
6999
7281
|
this.injector = injector;
|
|
7000
7282
|
this.localization = localization;
|
|
7001
7283
|
this.pickerService = pickerService;
|
|
7002
|
-
/**
|
|
7003
|
-
* @hidden
|
|
7004
|
-
*/
|
|
7005
|
-
this.focusableId = `k-${guid()}`;
|
|
7006
7284
|
/**
|
|
7007
7285
|
* Sets or gets the `disabled` property of the DateInput and
|
|
7008
7286
|
* determines whether the component is active
|
|
@@ -7026,7 +7304,7 @@ class DateInputComponent {
|
|
|
7026
7304
|
/**
|
|
7027
7305
|
* @hidden
|
|
7028
7306
|
*/
|
|
7029
|
-
this.role = '
|
|
7307
|
+
this.role = 'textbox';
|
|
7030
7308
|
/**
|
|
7031
7309
|
* @hidden
|
|
7032
7310
|
*/
|
|
@@ -7103,10 +7381,6 @@ class DateInputComponent {
|
|
|
7103
7381
|
* [spinner buttons]({% slug spinbuttons_dateinput %}).
|
|
7104
7382
|
*/
|
|
7105
7383
|
this.spinners = false;
|
|
7106
|
-
/**
|
|
7107
|
-
* @hidden
|
|
7108
|
-
*/
|
|
7109
|
-
this.isPopupOpen = false;
|
|
7110
7384
|
/**
|
|
7111
7385
|
* @hidden
|
|
7112
7386
|
*/
|
|
@@ -7199,11 +7473,26 @@ class DateInputComponent {
|
|
|
7199
7473
|
this._size = DEFAULT_SIZE;
|
|
7200
7474
|
this._rounded = DEFAULT_ROUNDED;
|
|
7201
7475
|
this._fillMode = DEFAULT_FILL_MODE;
|
|
7476
|
+
this.subs = new Subscription();
|
|
7202
7477
|
this.symbolsMap = this.dateSymbolMap();
|
|
7203
7478
|
this.updateFormatSections();
|
|
7204
7479
|
if (this.pickerService) {
|
|
7205
7480
|
this.pickerService.input = this;
|
|
7206
7481
|
}
|
|
7482
|
+
else {
|
|
7483
|
+
this.ariaReadOnly = null;
|
|
7484
|
+
}
|
|
7485
|
+
}
|
|
7486
|
+
/**
|
|
7487
|
+
* @hidden
|
|
7488
|
+
*/
|
|
7489
|
+
get focusableId() {
|
|
7490
|
+
if (this.pickerType) {
|
|
7491
|
+
return `${this.pickerType}-${nextId}`;
|
|
7492
|
+
}
|
|
7493
|
+
else {
|
|
7494
|
+
return `dateinput-${nextId}`;
|
|
7495
|
+
}
|
|
7207
7496
|
}
|
|
7208
7497
|
/**
|
|
7209
7498
|
* @hidden
|
|
@@ -7328,6 +7617,13 @@ class DateInputComponent {
|
|
|
7328
7617
|
}
|
|
7329
7618
|
}
|
|
7330
7619
|
}
|
|
7620
|
+
/**
|
|
7621
|
+
* @hidden
|
|
7622
|
+
*/
|
|
7623
|
+
get formControl() {
|
|
7624
|
+
const ngControl = this.injector.get(NgControl, null);
|
|
7625
|
+
return (ngControl === null || ngControl === void 0 ? void 0 : ngControl.control) || null;
|
|
7626
|
+
}
|
|
7331
7627
|
get inputFormat() {
|
|
7332
7628
|
if (!this.format) {
|
|
7333
7629
|
return DEFAULT_FORMAT$1;
|
|
@@ -7363,6 +7659,21 @@ class DateInputComponent {
|
|
|
7363
7659
|
containsElement(element) {
|
|
7364
7660
|
return Boolean(closest(element, node => node === this.wrapper.nativeElement));
|
|
7365
7661
|
}
|
|
7662
|
+
/**
|
|
7663
|
+
* @hidden
|
|
7664
|
+
*/
|
|
7665
|
+
ngOnInit() {
|
|
7666
|
+
this.kendoDate = this.getKendoDate(this.value);
|
|
7667
|
+
this.updateElementValue();
|
|
7668
|
+
this.subs.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
|
|
7669
|
+
this.ngControl = this.injector.get(NgControl, null);
|
|
7670
|
+
if (this.wrapper) {
|
|
7671
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
7672
|
+
this.ngZone.runOutsideAngular(() => {
|
|
7673
|
+
this.bindEvents();
|
|
7674
|
+
});
|
|
7675
|
+
}
|
|
7676
|
+
}
|
|
7366
7677
|
/**
|
|
7367
7678
|
* @hidden
|
|
7368
7679
|
*/
|
|
@@ -7384,10 +7695,16 @@ class DateInputComponent {
|
|
|
7384
7695
|
this.updateElementValue(this.isActive);
|
|
7385
7696
|
}
|
|
7386
7697
|
}
|
|
7698
|
+
ngAfterViewInit() {
|
|
7699
|
+
var _a, _b;
|
|
7700
|
+
this.setComponentClasses();
|
|
7701
|
+
const formControl = (_a = this.injector.get(NgControl, null)) === null || _a === void 0 ? void 0 : _a.control;
|
|
7702
|
+
this.control = formControl;
|
|
7703
|
+
this.subs.add((_b = this.formControl) === null || _b === void 0 ? void 0 : _b.statusChanges.subscribe(() => this.setAriaInvalid()));
|
|
7704
|
+
this.setAriaInvalid();
|
|
7705
|
+
}
|
|
7387
7706
|
ngOnDestroy() {
|
|
7388
|
-
|
|
7389
|
-
this.intlSubscription.unsubscribe();
|
|
7390
|
-
}
|
|
7707
|
+
this.subs.unsubscribe();
|
|
7391
7708
|
if (this.pickerService) {
|
|
7392
7709
|
this.pickerService.input = null;
|
|
7393
7710
|
}
|
|
@@ -7396,32 +7713,28 @@ class DateInputComponent {
|
|
|
7396
7713
|
/**
|
|
7397
7714
|
* @hidden
|
|
7398
7715
|
*/
|
|
7399
|
-
|
|
7400
|
-
|
|
7716
|
+
setAriaInvalid() {
|
|
7717
|
+
if (!this.control) {
|
|
7718
|
+
return;
|
|
7719
|
+
}
|
|
7720
|
+
if (this.control.invalid) {
|
|
7721
|
+
this.renderer.setAttribute(this.inputElement, attributeNames.ariaInvalid, 'true');
|
|
7722
|
+
}
|
|
7723
|
+
else {
|
|
7724
|
+
this.renderer.setAttribute(this.inputElement, attributeNames.ariaInvalid, 'false');
|
|
7725
|
+
}
|
|
7401
7726
|
}
|
|
7402
7727
|
/**
|
|
7403
7728
|
* @hidden
|
|
7404
7729
|
*/
|
|
7405
|
-
|
|
7406
|
-
this.
|
|
7730
|
+
validate(control) {
|
|
7731
|
+
return this.minValidator(control) || this.maxValidator(control) || this.incompleteValidator(control, this.isDateIncomplete);
|
|
7407
7732
|
}
|
|
7408
7733
|
/**
|
|
7409
7734
|
* @hidden
|
|
7410
7735
|
*/
|
|
7411
|
-
|
|
7412
|
-
this.
|
|
7413
|
-
this.updateElementValue();
|
|
7414
|
-
this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
|
|
7415
|
-
this.ngControl = this.injector.get(NgControl, null);
|
|
7416
|
-
if (this.wrapper) {
|
|
7417
|
-
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
7418
|
-
this.ngZone.runOutsideAngular(() => {
|
|
7419
|
-
this.bindEvents();
|
|
7420
|
-
});
|
|
7421
|
-
}
|
|
7422
|
-
}
|
|
7423
|
-
ngAfterViewInit() {
|
|
7424
|
-
this.setComponentClasses();
|
|
7736
|
+
registerOnValidatorChange(fn) {
|
|
7737
|
+
this.onValidatorChange = fn;
|
|
7425
7738
|
}
|
|
7426
7739
|
/**
|
|
7427
7740
|
* @hidden
|
|
@@ -7801,34 +8114,34 @@ class DateInputComponent {
|
|
|
7801
8114
|
if (this.disabled || this.readonly || event.altKey || event.ctrlKey || event.metaKey) {
|
|
7802
8115
|
return;
|
|
7803
8116
|
}
|
|
7804
|
-
if (event.keyCode === Keys.Tab) {
|
|
8117
|
+
if (event.keyCode === Keys$1.Tab) {
|
|
7805
8118
|
const moved = this.switchDateSegment(event.shiftKey ? -1 : 1);
|
|
7806
8119
|
if (moved) {
|
|
7807
8120
|
event.preventDefault();
|
|
7808
8121
|
}
|
|
7809
8122
|
return;
|
|
7810
8123
|
}
|
|
7811
|
-
if (event.keyCode === Keys.Backspace) {
|
|
8124
|
+
if (event.keyCode === Keys$1.Backspace) {
|
|
7812
8125
|
this.backspace = true;
|
|
7813
8126
|
return;
|
|
7814
8127
|
}
|
|
7815
8128
|
switch (event.keyCode) {
|
|
7816
|
-
case Keys.ArrowDown:
|
|
8129
|
+
case Keys$1.ArrowDown:
|
|
7817
8130
|
this.modifyDateSegmentValue(-1);
|
|
7818
8131
|
break;
|
|
7819
|
-
case Keys.ArrowUp:
|
|
8132
|
+
case Keys$1.ArrowUp:
|
|
7820
8133
|
this.modifyDateSegmentValue(1);
|
|
7821
8134
|
break;
|
|
7822
|
-
case Keys.ArrowRight:
|
|
8135
|
+
case Keys$1.ArrowRight:
|
|
7823
8136
|
this.switchDateSegment(1);
|
|
7824
8137
|
break;
|
|
7825
|
-
case Keys.ArrowLeft:
|
|
8138
|
+
case Keys$1.ArrowLeft:
|
|
7826
8139
|
this.switchDateSegment(-1);
|
|
7827
8140
|
break;
|
|
7828
|
-
case Keys.Home:
|
|
8141
|
+
case Keys$1.Home:
|
|
7829
8142
|
this.selectNearestSegment(0);
|
|
7830
8143
|
break;
|
|
7831
|
-
case Keys.End:
|
|
8144
|
+
case Keys$1.End:
|
|
7832
8145
|
this.selectNearestSegment(this.inputValue.length);
|
|
7833
8146
|
break;
|
|
7834
8147
|
default:
|
|
@@ -7926,7 +8239,7 @@ class DateInputComponent {
|
|
|
7926
8239
|
}
|
|
7927
8240
|
}
|
|
7928
8241
|
DateInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.IntlService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i1$1.LocalizationService }, { token: PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
7929
|
-
DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateInputComponent, selector: "kendo-dateinput", inputs: {
|
|
8242
|
+
DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateInputComponent, selector: "kendo-dateinput", inputs: { pickerType: "pickerType", disabled: "disabled", readonly: "readonly", title: "title", tabindex: "tabindex", role: "role", ariaReadOnly: "ariaReadOnly", tabIndex: "tabIndex", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", max: "max", min: "min", rangeValidation: "rangeValidation", autoCorrect: "autoCorrect", incompleteDateValidation: "incompleteDateValidation", twoDigitYearMax: "twoDigitYearMax", value: "value", spinners: "spinners", isPopupOpen: "isPopupOpen", hasPopup: "hasPopup", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", valueUpdate: "valueUpdate", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-input": "this.wrapperClass", "class.k-dateinput": "this.wrapperClass", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
7930
8243
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
|
|
7931
8244
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true },
|
|
7932
8245
|
{ provide: L10N_PREFIX, useValue: 'kendo.dateinput' },
|
|
@@ -8076,7 +8389,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
8076
8389
|
}]
|
|
8077
8390
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.IntlService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i1$1.LocalizationService }, { type: PickerService, decorators: [{
|
|
8078
8391
|
type: Optional
|
|
8079
|
-
}] }]; }, propDecorators: {
|
|
8392
|
+
}] }]; }, propDecorators: { pickerType: [{
|
|
8080
8393
|
type: Input
|
|
8081
8394
|
}], disabled: [{
|
|
8082
8395
|
type: Input
|
|
@@ -8306,10 +8619,6 @@ class DatePickerComponent {
|
|
|
8306
8619
|
this.pickerService = pickerService;
|
|
8307
8620
|
this.disabledDatesService = disabledDatesService;
|
|
8308
8621
|
this.touchEnabled = touchEnabled;
|
|
8309
|
-
/**
|
|
8310
|
-
* @hidden
|
|
8311
|
-
*/
|
|
8312
|
-
this.focusableId = `k-${guid()}`;
|
|
8313
8622
|
/**
|
|
8314
8623
|
* Defines the active view that the Calendar initially renders
|
|
8315
8624
|
* ([see example]({% slug calendar_type_datepicker %}#toc-active-view)).
|
|
@@ -8512,7 +8821,6 @@ class DatePickerComponent {
|
|
|
8512
8821
|
* @hidden
|
|
8513
8822
|
*/
|
|
8514
8823
|
this.wrapperClasses = true;
|
|
8515
|
-
this.popupUID = guid();
|
|
8516
8824
|
this._popupSettings = { animate: true };
|
|
8517
8825
|
this._show = false;
|
|
8518
8826
|
this._value = null;
|
|
@@ -8706,12 +9014,11 @@ class DatePickerComponent {
|
|
|
8706
9014
|
get disabledClass() {
|
|
8707
9015
|
return this.disabled;
|
|
8708
9016
|
}
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
get inputRole() {
|
|
8713
|
-
return this.readOnlyInput ? 'listbox' : 'spinbutton';
|
|
9017
|
+
get popupUID() {
|
|
9018
|
+
var _a;
|
|
9019
|
+
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.id;
|
|
8714
9020
|
}
|
|
9021
|
+
;
|
|
8715
9022
|
get isActive() {
|
|
8716
9023
|
return this._active;
|
|
8717
9024
|
}
|
|
@@ -8960,18 +9267,18 @@ class DatePickerComponent {
|
|
|
8960
9267
|
*/
|
|
8961
9268
|
handleKeydown(e) {
|
|
8962
9269
|
const { altKey, shiftKey, keyCode, target } = e;
|
|
8963
|
-
if (keyCode === Keys.Escape) {
|
|
9270
|
+
if (keyCode === Keys$1.Escape) {
|
|
8964
9271
|
this.show = false;
|
|
8965
9272
|
}
|
|
8966
9273
|
if (altKey) {
|
|
8967
|
-
if (keyCode === Keys.ArrowDown && !this.show) {
|
|
9274
|
+
if (keyCode === Keys$1.ArrowDown && !this.show) {
|
|
8968
9275
|
this.show = true;
|
|
8969
9276
|
}
|
|
8970
|
-
if (keyCode === Keys.ArrowUp) {
|
|
9277
|
+
if (keyCode === Keys$1.ArrowUp) {
|
|
8971
9278
|
this.show = false;
|
|
8972
9279
|
}
|
|
8973
9280
|
}
|
|
8974
|
-
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
9281
|
+
if (keyCode === Keys$1.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
8975
9282
|
this.input.focus();
|
|
8976
9283
|
this.show = false;
|
|
8977
9284
|
}
|
|
@@ -8995,6 +9302,7 @@ class DatePickerComponent {
|
|
|
8995
9302
|
return;
|
|
8996
9303
|
}
|
|
8997
9304
|
this._show = show;
|
|
9305
|
+
const inputElement = this.wrapper.nativeElement.querySelector('input');
|
|
8998
9306
|
if (show) {
|
|
8999
9307
|
const direction = this.localization.rtl ? 'right' : 'left';
|
|
9000
9308
|
this.popupRef = this.popupService.open({
|
|
@@ -9007,13 +9315,27 @@ class DatePickerComponent {
|
|
|
9007
9315
|
popupClass: this.popupClasses,
|
|
9008
9316
|
positionMode: 'absolute'
|
|
9009
9317
|
});
|
|
9318
|
+
if (this.calendar.type === 'infinite') {
|
|
9319
|
+
this.pickerSubscriptions.add(this.calendar.monthView.focusedCellChange.subscribe((id) => {
|
|
9320
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaActiveDescendant, id);
|
|
9321
|
+
}));
|
|
9322
|
+
}
|
|
9323
|
+
else {
|
|
9324
|
+
this.pickerSubscriptions.add(this.calendar.multiViewCalendar.viewList.focusedCellChange.subscribe((id) => {
|
|
9325
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaActiveDescendant, id);
|
|
9326
|
+
}));
|
|
9327
|
+
}
|
|
9010
9328
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
9329
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaControls, this.popupUID);
|
|
9011
9330
|
this.subscription = this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
9012
9331
|
}
|
|
9013
9332
|
else {
|
|
9014
9333
|
this.popupRef.close();
|
|
9015
9334
|
this.popupRef = null;
|
|
9016
9335
|
this.subscription.unsubscribe();
|
|
9336
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaControls);
|
|
9337
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaActiveDescendant);
|
|
9338
|
+
this.cdr.detectChanges();
|
|
9017
9339
|
}
|
|
9018
9340
|
}
|
|
9019
9341
|
focusInput() {
|
|
@@ -9129,8 +9451,8 @@ class DatePickerComponent {
|
|
|
9129
9451
|
}
|
|
9130
9452
|
}
|
|
9131
9453
|
}
|
|
9132
|
-
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token:
|
|
9133
|
-
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DatePickerComponent, selector: "kendo-datepicker", inputs: { cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"],
|
|
9454
|
+
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i1$2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: PickerService }, { token: DisabledDatesService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9455
|
+
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DatePickerComponent, selector: "kendo-datepicker", inputs: { cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", title: "title", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
9134
9456
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
|
|
9135
9457
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DatePickerComponent), multi: true },
|
|
9136
9458
|
{ provide: KendoInput, useExisting: forwardRef(() => DatePickerComponent) },
|
|
@@ -9158,8 +9480,8 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
9158
9480
|
</ng-container>
|
|
9159
9481
|
<kendo-dateinput
|
|
9160
9482
|
#input
|
|
9161
|
-
[role]="
|
|
9162
|
-
|
|
9483
|
+
[role]="'combobox'"
|
|
9484
|
+
pickerType="datepicker"
|
|
9163
9485
|
[hasPopup]="true"
|
|
9164
9486
|
[isPopupOpen]="show"
|
|
9165
9487
|
[disabled]="disabled"
|
|
@@ -9233,7 +9555,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
9233
9555
|
</kendo-calendar-messages>
|
|
9234
9556
|
</kendo-calendar>
|
|
9235
9557
|
<ng-template>
|
|
9236
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["
|
|
9558
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], directives: [{ type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9237
9559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
9238
9560
|
type: Component,
|
|
9239
9561
|
args: [{
|
|
@@ -9269,8 +9591,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
9269
9591
|
</ng-container>
|
|
9270
9592
|
<kendo-dateinput
|
|
9271
9593
|
#input
|
|
9272
|
-
[role]="
|
|
9273
|
-
|
|
9594
|
+
[role]="'combobox'"
|
|
9595
|
+
pickerType="datepicker"
|
|
9274
9596
|
[hasPopup]="true"
|
|
9275
9597
|
[isPopupOpen]="show"
|
|
9276
9598
|
[disabled]="disabled"
|
|
@@ -9346,7 +9668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
9346
9668
|
<ng-template>
|
|
9347
9669
|
`
|
|
9348
9670
|
}]
|
|
9349
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type:
|
|
9671
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i1$2.PopupService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: PickerService }, { type: DisabledDatesService }, { type: undefined, decorators: [{
|
|
9350
9672
|
type: Optional
|
|
9351
9673
|
}, {
|
|
9352
9674
|
type: Inject,
|
|
@@ -9408,8 +9730,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
9408
9730
|
}], navigationItemTemplateRef: [{
|
|
9409
9731
|
type: Input,
|
|
9410
9732
|
args: ['navigationItemTemplate']
|
|
9411
|
-
}], focusableId: [{
|
|
9412
|
-
type: Input
|
|
9413
9733
|
}], activeView: [{
|
|
9414
9734
|
type: Input
|
|
9415
9735
|
}], bottomView: [{
|
|
@@ -10152,12 +10472,13 @@ const services = {
|
|
|
10152
10472
|
* @hidden
|
|
10153
10473
|
*/
|
|
10154
10474
|
class TimeListComponent {
|
|
10155
|
-
constructor(element, injector, dom, renderer, zone) {
|
|
10475
|
+
constructor(element, injector, dom, renderer, zone, localization) {
|
|
10156
10476
|
this.element = element;
|
|
10157
10477
|
this.injector = injector;
|
|
10158
10478
|
this.dom = dom;
|
|
10159
10479
|
this.renderer = renderer;
|
|
10160
10480
|
this.zone = zone;
|
|
10481
|
+
this.localization = localization;
|
|
10161
10482
|
this.min = cloneDate(MIDNIGHT_DATE);
|
|
10162
10483
|
this.max = cloneDate(MAX_TIME);
|
|
10163
10484
|
this.step = 1;
|
|
@@ -10171,11 +10492,32 @@ class TimeListComponent {
|
|
|
10171
10492
|
this.data = [];
|
|
10172
10493
|
this.indexToScroll = -1;
|
|
10173
10494
|
this.domEvents = [];
|
|
10495
|
+
this.hostElement = this.element.nativeElement;
|
|
10496
|
+
}
|
|
10497
|
+
get roleAttribute() {
|
|
10498
|
+
return this.isDayPeriod ? 'listbox' : 'spinbutton';
|
|
10499
|
+
}
|
|
10500
|
+
get ariaLabel() {
|
|
10501
|
+
var _a;
|
|
10502
|
+
return this.localization.get((_a = this.part) === null || _a === void 0 ? void 0 : _a.type);
|
|
10503
|
+
}
|
|
10504
|
+
get valueMin() {
|
|
10505
|
+
var _a;
|
|
10506
|
+
return (_a = this.data[0]) === null || _a === void 0 ? void 0 : _a.text;
|
|
10507
|
+
}
|
|
10508
|
+
get valueMax() {
|
|
10509
|
+
var _a;
|
|
10510
|
+
return (_a = this.data[this.data.length - 1]) === null || _a === void 0 ? void 0 : _a.text;
|
|
10174
10511
|
}
|
|
10175
10512
|
get tabIndex() {
|
|
10176
10513
|
return this.disabled ? undefined : 0;
|
|
10177
10514
|
}
|
|
10515
|
+
get isDayPeriod() {
|
|
10516
|
+
var _a;
|
|
10517
|
+
return ((_a = this.part) === null || _a === void 0 ? void 0 : _a.type) === 'dayperiod';
|
|
10518
|
+
}
|
|
10178
10519
|
ngOnChanges(changes) {
|
|
10520
|
+
var _a, _b;
|
|
10179
10521
|
if (changes.part) {
|
|
10180
10522
|
this.service = this.injector.get(services[this.part.type]);
|
|
10181
10523
|
this.service.configure(this.serviceSettings());
|
|
@@ -10195,6 +10537,8 @@ class TimeListComponent {
|
|
|
10195
10537
|
this.animateToIndex = this.animateToIndex && this.textHasChanged(valueChanges);
|
|
10196
10538
|
this.total = this.service.total(value);
|
|
10197
10539
|
this.indexToScroll = this.selectedIndex(value);
|
|
10540
|
+
this.renderer.setAttribute(this.hostElement, attributeNames.valueNow, (_a = this.getCurrentItem()) === null || _a === void 0 ? void 0 : _a.value.toString());
|
|
10541
|
+
this.renderer.setAttribute(this.hostElement, attributeNames.valuetext, (_b = this.getCurrentItem()) === null || _b === void 0 ? void 0 : _b.text);
|
|
10198
10542
|
}
|
|
10199
10543
|
ngOnInit() {
|
|
10200
10544
|
this.animateToIndex = true;
|
|
@@ -10227,6 +10571,9 @@ class TimeListComponent {
|
|
|
10227
10571
|
this.animateToIndex = true;
|
|
10228
10572
|
});
|
|
10229
10573
|
}
|
|
10574
|
+
getCurrentItem() {
|
|
10575
|
+
return this.indexToScroll >= 0 ? this.data[this.indexToScroll] : null;
|
|
10576
|
+
}
|
|
10230
10577
|
handleChange(dataItem) {
|
|
10231
10578
|
const candidate = this.service.apply(this.value, dataItem.value);
|
|
10232
10579
|
if (this.value.getTime() === candidate.getTime()) {
|
|
@@ -10343,8 +10690,8 @@ class TimeListComponent {
|
|
|
10343
10690
|
this.domEvents.push(this.renderer.listen(element, 'mouseover', () => !this.isActive && this.focus()), this.renderer.listen(element, 'click', () => this.focus()), this.renderer.listen(element, 'blur', () => this.isActive = false), this.renderer.listen(element, 'focus', () => this.isActive = true), this.renderer.listen(element, 'keydown', this.handleKeyDown.bind(this)));
|
|
10344
10691
|
}
|
|
10345
10692
|
}
|
|
10346
|
-
TimeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimeListComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: TimePickerDOMService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
10347
|
-
TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TimeListComponent, selector: "kendo-timelist", inputs: { min: "min", max: "max", part: "part", step: "step", disabled: "disabled", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-time-list": "this.componentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
10693
|
+
TimeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimeListComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: TimePickerDOMService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10694
|
+
TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TimeListComponent, selector: "kendo-timelist", inputs: { min: "min", max: "max", part: "part", step: "step", disabled: "disabled", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.role": "this.roleAttribute", "attr.aria-label": "this.ariaLabel", "attr.valuemin": "this.valueMin", "attr.valuemax": "this.valueMax", "attr.tabindex": "this.tabIndex", "class.k-time-list": "this.componentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
10348
10695
|
<kendo-virtualization
|
|
10349
10696
|
[skip]="skip"
|
|
10350
10697
|
[take]="total"
|
|
@@ -10362,9 +10709,12 @@ TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
10362
10709
|
click: handleItemClick
|
|
10363
10710
|
}"
|
|
10364
10711
|
[scope]="this"
|
|
10712
|
+
[attr.role]="isDayPeriod ? 'presentation' : null"
|
|
10365
10713
|
>
|
|
10366
10714
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
10367
|
-
[attr.data-timelist-item-index]="index"
|
|
10715
|
+
[attr.data-timelist-item-index]="index"
|
|
10716
|
+
[attr.role]="isDayPeriod ? 'option' : null"
|
|
10717
|
+
>
|
|
10368
10718
|
<span>{{item.text}}</span>
|
|
10369
10719
|
</li>
|
|
10370
10720
|
</ul>
|
|
@@ -10392,16 +10742,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
10392
10742
|
click: handleItemClick
|
|
10393
10743
|
}"
|
|
10394
10744
|
[scope]="this"
|
|
10745
|
+
[attr.role]="isDayPeriod ? 'presentation' : null"
|
|
10395
10746
|
>
|
|
10396
10747
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
10397
|
-
[attr.data-timelist-item-index]="index"
|
|
10748
|
+
[attr.data-timelist-item-index]="index"
|
|
10749
|
+
[attr.role]="isDayPeriod ? 'option' : null"
|
|
10750
|
+
>
|
|
10398
10751
|
<span>{{item.text}}</span>
|
|
10399
10752
|
</li>
|
|
10400
10753
|
</ul>
|
|
10401
10754
|
</kendo-virtualization>
|
|
10402
10755
|
`
|
|
10403
10756
|
}]
|
|
10404
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: TimePickerDOMService }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { min: [{
|
|
10757
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: TimePickerDOMService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1$1.LocalizationService }]; }, propDecorators: { min: [{
|
|
10405
10758
|
type: Input
|
|
10406
10759
|
}], max: [{
|
|
10407
10760
|
type: Input
|
|
@@ -10418,6 +10771,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
10418
10771
|
}], virtualization: [{
|
|
10419
10772
|
type: ViewChild,
|
|
10420
10773
|
args: [VirtualizationComponent, { static: true }]
|
|
10774
|
+
}], roleAttribute: [{
|
|
10775
|
+
type: HostBinding,
|
|
10776
|
+
args: ["attr.role"]
|
|
10777
|
+
}], ariaLabel: [{
|
|
10778
|
+
type: HostBinding,
|
|
10779
|
+
args: ["attr.aria-label"]
|
|
10780
|
+
}], valueMin: [{
|
|
10781
|
+
type: HostBinding,
|
|
10782
|
+
args: ['attr.valuemin']
|
|
10783
|
+
}], valueMax: [{
|
|
10784
|
+
type: HostBinding,
|
|
10785
|
+
args: ["attr.valuemax"]
|
|
10421
10786
|
}], tabIndex: [{
|
|
10422
10787
|
type: HostBinding,
|
|
10423
10788
|
args: ["attr.tabindex"]
|
|
@@ -10497,7 +10862,7 @@ const snapTime = snappers => (candidate, min) => {
|
|
|
10497
10862
|
class TimePickerMessages extends ComponentMessages {
|
|
10498
10863
|
}
|
|
10499
10864
|
TimePickerMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
10500
|
-
TimePickerMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TimePickerMessages, selector: "kendo-timepicker-messages-base", inputs: { accept: "accept", acceptLabel: "acceptLabel", cancel: "cancel", cancelLabel: "cancelLabel", now: "now", nowLabel: "nowLabel", toggle: "toggle" }, usesInheritance: true, ngImport: i0 });
|
|
10865
|
+
TimePickerMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TimePickerMessages, selector: "kendo-timepicker-messages-base", inputs: { accept: "accept", acceptLabel: "acceptLabel", cancel: "cancel", cancelLabel: "cancelLabel", now: "now", nowLabel: "nowLabel", toggle: "toggle", hour: "hour", minute: "minute", second: "second", millisecond: "millisecond", dayperiod: "dayperiod" }, usesInheritance: true, ngImport: i0 });
|
|
10501
10866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerMessages, decorators: [{
|
|
10502
10867
|
type: Directive,
|
|
10503
10868
|
args: [{
|
|
@@ -10518,6 +10883,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
10518
10883
|
type: Input
|
|
10519
10884
|
}], toggle: [{
|
|
10520
10885
|
type: Input
|
|
10886
|
+
}], hour: [{
|
|
10887
|
+
type: Input
|
|
10888
|
+
}], minute: [{
|
|
10889
|
+
type: Input
|
|
10890
|
+
}], second: [{
|
|
10891
|
+
type: Input
|
|
10892
|
+
}], millisecond: [{
|
|
10893
|
+
type: Input
|
|
10894
|
+
}], dayperiod: [{
|
|
10895
|
+
type: Input
|
|
10521
10896
|
}] } });
|
|
10522
10897
|
|
|
10523
10898
|
/**
|
|
@@ -10864,15 +11239,15 @@ class TimeSelectorComponent {
|
|
|
10864
11239
|
handleKeydown(args) {
|
|
10865
11240
|
const { keyCode, altKey } = args;
|
|
10866
11241
|
// reserve the alt + arrow key commands for the picker
|
|
10867
|
-
const arrowKeyPressed = [Keys.ArrowLeft, Keys.ArrowRight].indexOf(keyCode) !== -1;
|
|
11242
|
+
const arrowKeyPressed = [Keys$1.ArrowLeft, Keys$1.ArrowRight].indexOf(keyCode) !== -1;
|
|
10868
11243
|
if (isPresent(this.pickerService) && arrowKeyPressed && altKey) {
|
|
10869
11244
|
return;
|
|
10870
11245
|
}
|
|
10871
|
-
if (keyCode === Keys.Enter && !this.hasActiveButton()) {
|
|
11246
|
+
if (keyCode === Keys$1.Enter && !this.hasActiveButton()) {
|
|
10872
11247
|
this.handleAccept();
|
|
10873
11248
|
}
|
|
10874
|
-
else if (keyCode === Keys.ArrowLeft || keyCode === Keys.ArrowRight) {
|
|
10875
|
-
this.focusList(keyCode === Keys.ArrowLeft ? Direction.Left : Direction.Right);
|
|
11249
|
+
else if (keyCode === Keys$1.ArrowLeft || keyCode === Keys$1.ArrowRight) {
|
|
11250
|
+
this.focusList(keyCode === Keys$1.ArrowLeft ? Direction.Left : Direction.Right);
|
|
10876
11251
|
}
|
|
10877
11252
|
}
|
|
10878
11253
|
emitBlur(args) {
|
|
@@ -11241,7 +11616,8 @@ const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PA
|
|
|
11241
11616
|
* Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
|
|
11242
11617
|
*/
|
|
11243
11618
|
class TimePickerComponent {
|
|
11244
|
-
constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
|
|
11619
|
+
constructor(bus, zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
|
|
11620
|
+
this.bus = bus;
|
|
11245
11621
|
this.zone = zone;
|
|
11246
11622
|
this.localization = localization;
|
|
11247
11623
|
this.cdr = cdr;
|
|
@@ -11252,10 +11628,6 @@ class TimePickerComponent {
|
|
|
11252
11628
|
this.pickerService = pickerService;
|
|
11253
11629
|
this.intl = intl;
|
|
11254
11630
|
this.touchEnabled = touchEnabled;
|
|
11255
|
-
/**
|
|
11256
|
-
* @hidden
|
|
11257
|
-
*/
|
|
11258
|
-
this.focusableId = `k-${guid()}`;
|
|
11259
11631
|
/**
|
|
11260
11632
|
* Sets or gets the `disabled` property of the TimePicker and
|
|
11261
11633
|
* determines whether the component is active
|
|
@@ -11393,7 +11765,6 @@ class TimePickerComponent {
|
|
|
11393
11765
|
* @hidden
|
|
11394
11766
|
*/
|
|
11395
11767
|
this.wrapperClasses = true;
|
|
11396
|
-
this.popupUID = guid();
|
|
11397
11768
|
this.onControlChange = noop$2;
|
|
11398
11769
|
this.onControlTouched = noop$2;
|
|
11399
11770
|
this.onValidatorChange = noop$2;
|
|
@@ -11572,12 +11943,10 @@ class TimePickerComponent {
|
|
|
11572
11943
|
get disabledClass() {
|
|
11573
11944
|
return this.disabled;
|
|
11574
11945
|
}
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
*/
|
|
11578
|
-
get inputRole() {
|
|
11579
|
-
return this.readOnlyInput ? 'listbox' : 'spinbutton';
|
|
11946
|
+
get popupUID() {
|
|
11947
|
+
return `k-timepicker-popup-${this.bus.calendarId}-`;
|
|
11580
11948
|
}
|
|
11949
|
+
;
|
|
11581
11950
|
get isActive() {
|
|
11582
11951
|
return this._active;
|
|
11583
11952
|
}
|
|
@@ -11677,15 +12046,17 @@ class TimePickerComponent {
|
|
|
11677
12046
|
*/
|
|
11678
12047
|
handleKeydown(event) {
|
|
11679
12048
|
const { altKey, keyCode } = event;
|
|
11680
|
-
if (keyCode === Keys.Escape) {
|
|
12049
|
+
if (keyCode === Keys$1.Escape) {
|
|
11681
12050
|
this.show = false;
|
|
11682
12051
|
return;
|
|
11683
12052
|
}
|
|
11684
12053
|
if (altKey) {
|
|
11685
|
-
if (keyCode === Keys.ArrowUp) {
|
|
12054
|
+
if (keyCode === Keys$1.ArrowUp) {
|
|
12055
|
+
event.preventDefault();
|
|
11686
12056
|
this.show = false;
|
|
11687
12057
|
}
|
|
11688
|
-
if (keyCode === Keys.ArrowDown && !this.show) {
|
|
12058
|
+
if (keyCode === Keys$1.ArrowDown && !this.show) {
|
|
12059
|
+
event.preventDefault();
|
|
11689
12060
|
this.show = true;
|
|
11690
12061
|
}
|
|
11691
12062
|
}
|
|
@@ -11878,6 +12249,7 @@ class TimePickerComponent {
|
|
|
11878
12249
|
}
|
|
11879
12250
|
this._show = show;
|
|
11880
12251
|
this.cdr.markForCheck();
|
|
12252
|
+
const inputElement = this.wrapper.nativeElement.querySelector('input');
|
|
11881
12253
|
if (show) {
|
|
11882
12254
|
const direction = this.localization.rtl ? 'right' : 'left';
|
|
11883
12255
|
this.popupRef = this.popupService.open({
|
|
@@ -11891,11 +12263,13 @@ class TimePickerComponent {
|
|
|
11891
12263
|
positionMode: 'absolute'
|
|
11892
12264
|
});
|
|
11893
12265
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
12266
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaControls, this.popupUID);
|
|
11894
12267
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
11895
12268
|
}
|
|
11896
12269
|
else {
|
|
11897
12270
|
this.popupRef.close();
|
|
11898
12271
|
this.popupRef = null;
|
|
12272
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaControls);
|
|
11899
12273
|
}
|
|
11900
12274
|
}
|
|
11901
12275
|
focusInput() {
|
|
@@ -12005,12 +12379,13 @@ class TimePickerComponent {
|
|
|
12005
12379
|
}
|
|
12006
12380
|
}
|
|
12007
12381
|
}
|
|
12008
|
-
TimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, deps: [{ token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token:
|
|
12009
|
-
TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TimePickerComponent, selector: "kendo-timepicker", inputs: {
|
|
12382
|
+
TimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, deps: [{ token: BusViewService }, { token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i1$2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: PickerService }, { token: i1.IntlService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
12383
|
+
TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TimePickerComponent, selector: "kendo-timepicker", inputs: { disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", cancelButton: "cancelButton", nowButton: "nowButton", steps: "steps", popupSettings: "popupSettings", tabindex: "tabindex", tabIndex: "tabIndex", title: "title", rangeValidation: "rangeValidation", value: "value", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-timepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
12010
12384
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
12011
12385
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
12012
12386
|
{ provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
|
|
12013
12387
|
LocalizationService,
|
|
12388
|
+
BusViewService,
|
|
12014
12389
|
{
|
|
12015
12390
|
provide: L10N_PREFIX,
|
|
12016
12391
|
useValue: 'kendo.timepicker'
|
|
@@ -12038,16 +12413,31 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
12038
12413
|
|
|
12039
12414
|
i18n-toggle="kendo.timepicker.toggle|The label for the toggle button in the timepicker component"
|
|
12040
12415
|
toggle="Toggle time list"
|
|
12416
|
+
|
|
12417
|
+
i18n-hour="kendo.timepicker.hour|The label for the hour part in the timepicker component"
|
|
12418
|
+
hour="Hour"
|
|
12419
|
+
|
|
12420
|
+
i18n-minute="kendo.timepicker.minute|The label for the minute part in the timepicker component"
|
|
12421
|
+
minute="Minute"
|
|
12422
|
+
|
|
12423
|
+
i18n-second="kendo.timepicker.second|The label for the second part in the timepicker component"
|
|
12424
|
+
second="Second"
|
|
12425
|
+
|
|
12426
|
+
i18n-millisecond="kendo.timepicker.millisecond|The label for the millisecond part in the timepicker component"
|
|
12427
|
+
millisecond="Millisecond"
|
|
12428
|
+
|
|
12429
|
+
i18n-dayperiod="kendo.timepicker.dayperiod|The label for the dayperiod part in the timepicker component"
|
|
12430
|
+
dayperiod="Dayperiod"
|
|
12041
12431
|
>
|
|
12042
12432
|
</ng-container>
|
|
12043
12433
|
<kendo-dateinput
|
|
12044
12434
|
#input
|
|
12045
|
-
|
|
12435
|
+
pickerType="timepicker"
|
|
12046
12436
|
[hasPopup]="true"
|
|
12047
12437
|
[isPopupOpen]="show"
|
|
12048
12438
|
[disabled]="disabled"
|
|
12049
12439
|
[readonly]="readonly || readOnlyInput"
|
|
12050
|
-
[role]="
|
|
12440
|
+
[role]="'combobox'"
|
|
12051
12441
|
[ariaReadOnly]="readonly"
|
|
12052
12442
|
[format]="format"
|
|
12053
12443
|
[formatPlaceholder]="formatPlaceholder"
|
|
@@ -12067,6 +12457,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
12067
12457
|
<button
|
|
12068
12458
|
#toggleButton
|
|
12069
12459
|
type="button"
|
|
12460
|
+
tabindex="-1"
|
|
12070
12461
|
class="k-input-button k-button k-icon-button"
|
|
12071
12462
|
[attr.title]="localization.get('toggle')"
|
|
12072
12463
|
[attr.aria-label]="localization.get('toggle')"
|
|
@@ -12103,12 +12494,17 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
12103
12494
|
[cancel]="localization.get('cancel')"
|
|
12104
12495
|
[nowLabel]="localization.get('nowLabel')"
|
|
12105
12496
|
[now]="localization.get('now')"
|
|
12497
|
+
[hour]="localization.get('hour')"
|
|
12498
|
+
[minute]="localization.get('minute')"
|
|
12499
|
+
[second]="localization.get('second')"
|
|
12500
|
+
[millisecond]="localization.get('millisecond')"
|
|
12501
|
+
[dayperiod]="localization.get('dayperiod')"
|
|
12106
12502
|
>
|
|
12107
12503
|
</kendo-timeselector-messages>
|
|
12108
12504
|
</kendo-timeselector>
|
|
12109
12505
|
</ng-template>
|
|
12110
12506
|
<ng-container #container></ng-container>
|
|
12111
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["
|
|
12507
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12112
12508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
12113
12509
|
type: Component,
|
|
12114
12510
|
args: [{
|
|
@@ -12119,6 +12515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12119
12515
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
12120
12516
|
{ provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
|
|
12121
12517
|
LocalizationService,
|
|
12518
|
+
BusViewService,
|
|
12122
12519
|
{
|
|
12123
12520
|
provide: L10N_PREFIX,
|
|
12124
12521
|
useValue: 'kendo.timepicker'
|
|
@@ -12148,16 +12545,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12148
12545
|
|
|
12149
12546
|
i18n-toggle="kendo.timepicker.toggle|The label for the toggle button in the timepicker component"
|
|
12150
12547
|
toggle="Toggle time list"
|
|
12548
|
+
|
|
12549
|
+
i18n-hour="kendo.timepicker.hour|The label for the hour part in the timepicker component"
|
|
12550
|
+
hour="Hour"
|
|
12551
|
+
|
|
12552
|
+
i18n-minute="kendo.timepicker.minute|The label for the minute part in the timepicker component"
|
|
12553
|
+
minute="Minute"
|
|
12554
|
+
|
|
12555
|
+
i18n-second="kendo.timepicker.second|The label for the second part in the timepicker component"
|
|
12556
|
+
second="Second"
|
|
12557
|
+
|
|
12558
|
+
i18n-millisecond="kendo.timepicker.millisecond|The label for the millisecond part in the timepicker component"
|
|
12559
|
+
millisecond="Millisecond"
|
|
12560
|
+
|
|
12561
|
+
i18n-dayperiod="kendo.timepicker.dayperiod|The label for the dayperiod part in the timepicker component"
|
|
12562
|
+
dayperiod="Dayperiod"
|
|
12151
12563
|
>
|
|
12152
12564
|
</ng-container>
|
|
12153
12565
|
<kendo-dateinput
|
|
12154
12566
|
#input
|
|
12155
|
-
|
|
12567
|
+
pickerType="timepicker"
|
|
12156
12568
|
[hasPopup]="true"
|
|
12157
12569
|
[isPopupOpen]="show"
|
|
12158
12570
|
[disabled]="disabled"
|
|
12159
12571
|
[readonly]="readonly || readOnlyInput"
|
|
12160
|
-
[role]="
|
|
12572
|
+
[role]="'combobox'"
|
|
12161
12573
|
[ariaReadOnly]="readonly"
|
|
12162
12574
|
[format]="format"
|
|
12163
12575
|
[formatPlaceholder]="formatPlaceholder"
|
|
@@ -12177,6 +12589,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12177
12589
|
<button
|
|
12178
12590
|
#toggleButton
|
|
12179
12591
|
type="button"
|
|
12592
|
+
tabindex="-1"
|
|
12180
12593
|
class="k-input-button k-button k-icon-button"
|
|
12181
12594
|
[attr.title]="localization.get('toggle')"
|
|
12182
12595
|
[attr.aria-label]="localization.get('toggle')"
|
|
@@ -12213,6 +12626,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12213
12626
|
[cancel]="localization.get('cancel')"
|
|
12214
12627
|
[nowLabel]="localization.get('nowLabel')"
|
|
12215
12628
|
[now]="localization.get('now')"
|
|
12629
|
+
[hour]="localization.get('hour')"
|
|
12630
|
+
[minute]="localization.get('minute')"
|
|
12631
|
+
[second]="localization.get('second')"
|
|
12632
|
+
[millisecond]="localization.get('millisecond')"
|
|
12633
|
+
[dayperiod]="localization.get('dayperiod')"
|
|
12216
12634
|
>
|
|
12217
12635
|
</kendo-timeselector-messages>
|
|
12218
12636
|
</kendo-timeselector>
|
|
@@ -12220,7 +12638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12220
12638
|
<ng-container #container></ng-container>
|
|
12221
12639
|
`
|
|
12222
12640
|
}]
|
|
12223
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type:
|
|
12641
|
+
}], ctorParameters: function () { return [{ type: BusViewService }, { type: i0.NgZone }, { type: i1$1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i1$2.PopupService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: PickerService }, { type: i1.IntlService }, { type: undefined, decorators: [{
|
|
12224
12642
|
type: Optional
|
|
12225
12643
|
}, {
|
|
12226
12644
|
type: Inject,
|
|
@@ -12234,8 +12652,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12234
12652
|
}], toggleButton: [{
|
|
12235
12653
|
type: ViewChild,
|
|
12236
12654
|
args: ['toggleButton', { static: true }]
|
|
12237
|
-
}], focusableId: [{
|
|
12238
|
-
type: Input
|
|
12239
12655
|
}], disabled: [{
|
|
12240
12656
|
type: Input
|
|
12241
12657
|
}], readonly: [{
|
|
@@ -12407,10 +12823,6 @@ class DateTimePickerComponent {
|
|
|
12407
12823
|
* will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
|
|
12408
12824
|
*/
|
|
12409
12825
|
this.twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
|
|
12410
|
-
/**
|
|
12411
|
-
* @hidden
|
|
12412
|
-
*/
|
|
12413
|
-
this.focusableId = `k-${guid()}`;
|
|
12414
12826
|
/**
|
|
12415
12827
|
* Sets the title of the input element of the DateTimePicker.
|
|
12416
12828
|
*/
|
|
@@ -12574,6 +12986,12 @@ class DateTimePickerComponent {
|
|
|
12574
12986
|
get input() {
|
|
12575
12987
|
return this.pickerService.input;
|
|
12576
12988
|
}
|
|
12989
|
+
/**
|
|
12990
|
+
* @hidden
|
|
12991
|
+
*/
|
|
12992
|
+
get inputElement() {
|
|
12993
|
+
return this.wrapper.nativeElement.querySelector('input');
|
|
12994
|
+
}
|
|
12577
12995
|
/**
|
|
12578
12996
|
* @hidden
|
|
12579
12997
|
*/
|
|
@@ -12812,12 +13230,6 @@ class DateTimePickerComponent {
|
|
|
12812
13230
|
get disableCalendar() {
|
|
12813
13231
|
return this.activeTab !== 'date' && !this.calendar.isActive;
|
|
12814
13232
|
}
|
|
12815
|
-
/**
|
|
12816
|
-
* @hidden
|
|
12817
|
-
*/
|
|
12818
|
-
get inputRole() {
|
|
12819
|
-
return this.readOnlyInput ? 'listbox' : 'spinbutton';
|
|
12820
|
-
}
|
|
12821
13233
|
/**
|
|
12822
13234
|
* @hidden
|
|
12823
13235
|
*
|
|
@@ -12843,6 +13255,11 @@ class DateTimePickerComponent {
|
|
|
12843
13255
|
}
|
|
12844
13256
|
return appendTo === 'component' ? this.container : appendTo;
|
|
12845
13257
|
}
|
|
13258
|
+
get popupUID() {
|
|
13259
|
+
var _a;
|
|
13260
|
+
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.id;
|
|
13261
|
+
}
|
|
13262
|
+
;
|
|
12846
13263
|
ngOnInit() {
|
|
12847
13264
|
this.subscriptions.add(this.pickerService.onFocus
|
|
12848
13265
|
// detect popup changes to disable the inactive view mark-up when the popup is open
|
|
@@ -13042,6 +13459,9 @@ class DateTimePickerComponent {
|
|
|
13042
13459
|
if (event.target !== dateTimeSelector) {
|
|
13043
13460
|
return;
|
|
13044
13461
|
}
|
|
13462
|
+
if (this.activeTab === 'time') {
|
|
13463
|
+
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
13464
|
+
}
|
|
13045
13465
|
this.activeTabComponent.focus();
|
|
13046
13466
|
}
|
|
13047
13467
|
/**
|
|
@@ -13094,20 +13514,20 @@ class DateTimePickerComponent {
|
|
|
13094
13514
|
}
|
|
13095
13515
|
const { keyCode, altKey } = event;
|
|
13096
13516
|
switch (keyCode) {
|
|
13097
|
-
case altKey && Keys.ArrowUp:
|
|
13098
|
-
case Keys.Escape:
|
|
13517
|
+
case altKey && Keys$1.ArrowUp:
|
|
13518
|
+
case Keys$1.Escape:
|
|
13099
13519
|
this.handleCancel();
|
|
13100
13520
|
break;
|
|
13101
|
-
case !this.isOpen && altKey && Keys.ArrowDown:
|
|
13521
|
+
case !this.isOpen && altKey && Keys$1.ArrowDown:
|
|
13102
13522
|
this.ngZone.run(() => this.togglePopup(true));
|
|
13103
13523
|
break;
|
|
13104
|
-
case altKey && Keys.ArrowRight:
|
|
13524
|
+
case altKey && Keys$1.ArrowRight:
|
|
13105
13525
|
this.changeActiveTab('time');
|
|
13106
13526
|
break;
|
|
13107
|
-
case altKey && Keys.ArrowLeft:
|
|
13527
|
+
case altKey && Keys$1.ArrowLeft:
|
|
13108
13528
|
this.changeActiveTab('date');
|
|
13109
13529
|
break;
|
|
13110
|
-
case this.isOpen && this.timeSelector.isActive && isPresent(this.calendarValue) && Keys.Enter:
|
|
13530
|
+
case this.isOpen && this.timeSelector.isActive && isPresent(this.calendarValue) && Keys$1.Enter:
|
|
13111
13531
|
this.handleAccept();
|
|
13112
13532
|
break;
|
|
13113
13533
|
default: return;
|
|
@@ -13121,7 +13541,7 @@ class DateTimePickerComponent {
|
|
|
13121
13541
|
const { keyCode, shiftKey, target } = event;
|
|
13122
13542
|
// if no focusable next sibling elements exist in the controls sections, the user is tabbing out of the popup
|
|
13123
13543
|
const focusableSiblingAvailable = isPresent(target.nextElementSibling) && !target.nextElementSibling.disabled;
|
|
13124
|
-
if (keyCode === Keys.Tab && !shiftKey && !focusableSiblingAvailable) {
|
|
13544
|
+
if (keyCode === Keys$1.Tab && !shiftKey && !focusableSiblingAvailable) {
|
|
13125
13545
|
this.input.focus();
|
|
13126
13546
|
this.handleCancel();
|
|
13127
13547
|
}
|
|
@@ -13131,7 +13551,7 @@ class DateTimePickerComponent {
|
|
|
13131
13551
|
*/
|
|
13132
13552
|
handleBackTabOut(event) {
|
|
13133
13553
|
const { keyCode, shiftKey } = event;
|
|
13134
|
-
if (keyCode === Keys.Tab && shiftKey) {
|
|
13554
|
+
if (keyCode === Keys$1.Tab && shiftKey) {
|
|
13135
13555
|
this.input.focus();
|
|
13136
13556
|
}
|
|
13137
13557
|
}
|
|
@@ -13251,12 +13671,28 @@ class DateTimePickerComponent {
|
|
|
13251
13671
|
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
13252
13672
|
popupAlign: { vertical: 'top', horizontal: direction }
|
|
13253
13673
|
});
|
|
13674
|
+
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
13675
|
+
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
13676
|
+
if (this.activeTab === 'date') {
|
|
13677
|
+
if (this.calendar.type === 'infinite') {
|
|
13678
|
+
this.subscriptions.add(this.calendar.monthView.focusedCellChange.subscribe((id) => {
|
|
13679
|
+
this.renderer.setAttribute(this.inputElement, attributeNames.ariaActiveDescendant, id);
|
|
13680
|
+
}));
|
|
13681
|
+
}
|
|
13682
|
+
else {
|
|
13683
|
+
this.subscriptions.add(this.calendar.multiViewCalendar.viewList.focusedCellChange.subscribe((id) => {
|
|
13684
|
+
this.renderer.setAttribute(this.inputElement, attributeNames.ariaActiveDescendant, id);
|
|
13685
|
+
}));
|
|
13686
|
+
}
|
|
13687
|
+
}
|
|
13254
13688
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.handleCancel());
|
|
13255
13689
|
}
|
|
13256
13690
|
closePopup() {
|
|
13257
13691
|
if (!this.isOpen) {
|
|
13258
13692
|
return;
|
|
13259
13693
|
}
|
|
13694
|
+
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
13695
|
+
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
13260
13696
|
this.popupRef.close();
|
|
13261
13697
|
this.popupRef = null;
|
|
13262
13698
|
}
|
|
@@ -13331,8 +13767,8 @@ class DateTimePickerComponent {
|
|
|
13331
13767
|
}
|
|
13332
13768
|
}
|
|
13333
13769
|
}
|
|
13334
|
-
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateTimePickerComponent, deps: [{ token:
|
|
13335
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings",
|
|
13770
|
+
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i1$2.PopupService }, { token: i1.IntlService }, { token: i0.ChangeDetectorRef }, { token: PickerService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: TOUCH_ENABLED }, { token: i1$1.LocalizationService }, { token: DisabledDatesService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
13771
|
+
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
13336
13772
|
PickerService,
|
|
13337
13773
|
LocalizationService,
|
|
13338
13774
|
DisabledDatesService,
|
|
@@ -13399,12 +13835,12 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
13399
13835
|
[placeholder]="placeholder"
|
|
13400
13836
|
[disabled]="disabled"
|
|
13401
13837
|
[readonly]="readonly || readOnlyInput"
|
|
13402
|
-
[role]="
|
|
13838
|
+
[role]="'combobox'"
|
|
13403
13839
|
[ariaReadOnly]="readonly"
|
|
13404
13840
|
[steps]="steps"
|
|
13405
13841
|
[tabindex]="tabindex"
|
|
13406
13842
|
[title]="title"
|
|
13407
|
-
|
|
13843
|
+
pickerType="datetimepicker"
|
|
13408
13844
|
[hasPopup]="true"
|
|
13409
13845
|
[isPopupOpen]="isOpen"
|
|
13410
13846
|
(valueChange)="handleInputValueChange($event)"
|
|
@@ -13583,7 +14019,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
13583
14019
|
</div>
|
|
13584
14020
|
</div>
|
|
13585
14021
|
</ng-template>
|
|
13586
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["
|
|
14022
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13587
14023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
13588
14024
|
type: Component,
|
|
13589
14025
|
args: [{
|
|
@@ -13658,12 +14094,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13658
14094
|
[placeholder]="placeholder"
|
|
13659
14095
|
[disabled]="disabled"
|
|
13660
14096
|
[readonly]="readonly || readOnlyInput"
|
|
13661
|
-
[role]="
|
|
14097
|
+
[role]="'combobox'"
|
|
13662
14098
|
[ariaReadOnly]="readonly"
|
|
13663
14099
|
[steps]="steps"
|
|
13664
14100
|
[tabindex]="tabindex"
|
|
13665
14101
|
[title]="title"
|
|
13666
|
-
|
|
14102
|
+
pickerType="datetimepicker"
|
|
13667
14103
|
[hasPopup]="true"
|
|
13668
14104
|
[isPopupOpen]="isOpen"
|
|
13669
14105
|
(valueChange)="handleInputValueChange($event)"
|
|
@@ -13844,7 +14280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13844
14280
|
</ng-template>
|
|
13845
14281
|
`
|
|
13846
14282
|
}]
|
|
13847
|
-
}], ctorParameters: function () { return [{ type:
|
|
14283
|
+
}], ctorParameters: function () { return [{ type: i1$2.PopupService }, { type: i1.IntlService }, { type: i0.ChangeDetectorRef }, { type: PickerService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
13848
14284
|
type: Inject,
|
|
13849
14285
|
args: [TOUCH_ENABLED]
|
|
13850
14286
|
}] }, { type: i1$1.LocalizationService }, { type: DisabledDatesService }, { type: i0.Renderer2 }]; }, propDecorators: { hostClasses: [{
|
|
@@ -13871,8 +14307,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13871
14307
|
type: Input
|
|
13872
14308
|
}], popupSettings: [{
|
|
13873
14309
|
type: Input
|
|
13874
|
-
}], focusableId: [{
|
|
13875
|
-
type: Input
|
|
13876
14310
|
}], title: [{
|
|
13877
14311
|
type: Input
|
|
13878
14312
|
}], disabled: [{
|
|
@@ -13982,7 +14416,10 @@ const hasActiveContent = (popup) => popup && popup.hasActiveContent();
|
|
|
13982
14416
|
*/
|
|
13983
14417
|
class DateRangeService {
|
|
13984
14418
|
/** @hidden */
|
|
13985
|
-
constructor() {
|
|
14419
|
+
constructor(renderer) {
|
|
14420
|
+
this.renderer = renderer;
|
|
14421
|
+
/** @hidden */
|
|
14422
|
+
this.focusedCellChange = new Subscription();
|
|
13986
14423
|
/**
|
|
13987
14424
|
* An Observable instance that notifies when the `activeRangeEnd` state is changed.
|
|
13988
14425
|
*/
|
|
@@ -14047,10 +14484,19 @@ class DateRangeService {
|
|
|
14047
14484
|
* The method opens the popup and focuses the calendar.
|
|
14048
14485
|
*/
|
|
14049
14486
|
activatePopup() {
|
|
14487
|
+
var _a;
|
|
14050
14488
|
const dateRangePopup = this.dateRangePopup$.value;
|
|
14051
14489
|
if (!dateRangePopup) {
|
|
14052
14490
|
return;
|
|
14053
14491
|
}
|
|
14492
|
+
if (this.startInput$.value) {
|
|
14493
|
+
const inputElement = this.startInput$.value.dateInput.nativeElement;
|
|
14494
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaControls, dateRangePopup.popupUID);
|
|
14495
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaExpanded, 'true');
|
|
14496
|
+
this.focusedCellChange = (_a = dateRangePopup.viewCalendar.first) === null || _a === void 0 ? void 0 : _a.viewList.focusedCellChange.subscribe((id) => {
|
|
14497
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaActiveDescendant, id);
|
|
14498
|
+
});
|
|
14499
|
+
}
|
|
14054
14500
|
dateRangePopup.activate();
|
|
14055
14501
|
}
|
|
14056
14502
|
/**
|
|
@@ -14058,10 +14504,18 @@ class DateRangeService {
|
|
|
14058
14504
|
* The method closes the popup.
|
|
14059
14505
|
*/
|
|
14060
14506
|
deactivatePopup() {
|
|
14507
|
+
var _a;
|
|
14061
14508
|
const dateRangePopup = this.dateRangePopup$.value;
|
|
14062
14509
|
if (!(dateRangePopup && dateRangePopup.show)) {
|
|
14063
14510
|
return;
|
|
14064
14511
|
}
|
|
14512
|
+
if (this.startInput$.value) {
|
|
14513
|
+
const inputElement = this.startInput$.value.dateInput.nativeElement;
|
|
14514
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaControls);
|
|
14515
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaExpanded, 'false');
|
|
14516
|
+
(_a = this.focusedCellChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
14517
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaActiveDescendant);
|
|
14518
|
+
}
|
|
14065
14519
|
dateRangePopup.show = false;
|
|
14066
14520
|
}
|
|
14067
14521
|
/**
|
|
@@ -14145,11 +14599,13 @@ class DateRangeService {
|
|
|
14145
14599
|
this.range$.next(range);
|
|
14146
14600
|
}
|
|
14147
14601
|
}
|
|
14148
|
-
DateRangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14602
|
+
DateRangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, deps: [{ token: i0.Renderer2, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14149
14603
|
DateRangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService });
|
|
14150
14604
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, decorators: [{
|
|
14151
14605
|
type: Injectable
|
|
14152
|
-
}], ctorParameters: function () { return [
|
|
14606
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2, decorators: [{
|
|
14607
|
+
type: Optional
|
|
14608
|
+
}] }]; } });
|
|
14153
14609
|
|
|
14154
14610
|
/**
|
|
14155
14611
|
* A directive which manages the MultiViewCalendar range selection.
|
|
@@ -14180,7 +14636,7 @@ class DateRangeSelectionDirective {
|
|
|
14180
14636
|
*/
|
|
14181
14637
|
this.selectionRangeChange = new EventEmitter();
|
|
14182
14638
|
this.calendarSubscriptions = new Subscription();
|
|
14183
|
-
this.dateRangeService = this.dateRangeService || new DateRangeService();
|
|
14639
|
+
this.dateRangeService = this.dateRangeService || new DateRangeService(renderer);
|
|
14184
14640
|
renderer.setAttribute(element.nativeElement, 'aria-multiselectable', 'true');
|
|
14185
14641
|
}
|
|
14186
14642
|
/**
|
|
@@ -14549,7 +15005,7 @@ class DateRangePopupComponent {
|
|
|
14549
15005
|
}
|
|
14550
15006
|
handleKeydown(event) {
|
|
14551
15007
|
const { altKey, keyCode } = event;
|
|
14552
|
-
if (keyCode === Keys.Escape || (altKey && keyCode === Keys.ArrowUp)) {
|
|
15008
|
+
if (keyCode === Keys$1.Escape || (altKey && keyCode === Keys$1.ArrowUp)) {
|
|
14553
15009
|
this.zone.run(() => this.cancelPopup());
|
|
14554
15010
|
}
|
|
14555
15011
|
}
|
|
@@ -14561,9 +15017,9 @@ class DateRangePopupComponent {
|
|
|
14561
15017
|
if (!calendar) {
|
|
14562
15018
|
return;
|
|
14563
15019
|
}
|
|
14564
|
-
const
|
|
14565
|
-
this.blurSubscription = fromEvent(
|
|
14566
|
-
this.focusSubscription = fromEvent(
|
|
15020
|
+
const calendarElement = calendar.element.nativeElement.querySelector('.k-calendar-view');
|
|
15021
|
+
this.blurSubscription = fromEvent(calendarElement, 'blur').subscribe(() => this.onBlur.emit());
|
|
15022
|
+
this.focusSubscription = fromEvent(calendarElement, 'focus').subscribe(() => this.onFocus.emit());
|
|
14567
15023
|
}
|
|
14568
15024
|
addPopupSubscriptions(...subscriptions) {
|
|
14569
15025
|
if (!isPresent(this.popupSubscriptions)) {
|
|
@@ -14611,13 +15067,13 @@ class DateRangePopupComponent {
|
|
|
14611
15067
|
}
|
|
14612
15068
|
}
|
|
14613
15069
|
}
|
|
14614
|
-
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, deps: [{ token:
|
|
15070
|
+
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1$2.PopupService }, { token: DateRangeService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
14615
15071
|
DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: { animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: DateRangePopupTemplateDirective, descendants: true }, { propertyName: "contentCalendar", predicate: MultiViewCalendarComponent }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }, { propertyName: "defaultTemplate", first: true, predicate: ["defaultTemplate"], descendants: true }, { propertyName: "viewCalendar", predicate: MultiViewCalendarComponent, descendants: true }], exportAs: ["kendo-daterange-popup"], ngImport: i0, template: `
|
|
14616
15072
|
<ng-container #container></ng-container>
|
|
14617
15073
|
<ng-template #defaultTemplate>
|
|
14618
15074
|
<kendo-multiviewcalendar kendoDateRangeSelection></kendo-multiviewcalendar>
|
|
14619
15075
|
</ng-template>
|
|
14620
|
-
`, isInline: true, components: [{ type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur"], exportAs: ["kendo-multiviewcalendar"] }], directives: [{ type: DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }] });
|
|
15076
|
+
`, isInline: true, components: [{ type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }], directives: [{ type: DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }] });
|
|
14621
15077
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, decorators: [{
|
|
14622
15078
|
type: Component,
|
|
14623
15079
|
args: [{
|
|
@@ -14630,7 +15086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14630
15086
|
</ng-template>
|
|
14631
15087
|
`
|
|
14632
15088
|
}]
|
|
14633
|
-
}], ctorParameters: function () { return [{ type:
|
|
15089
|
+
}], ctorParameters: function () { return [{ type: i1$2.PopupService }, { type: DateRangeService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
14634
15090
|
type: Optional
|
|
14635
15091
|
}, {
|
|
14636
15092
|
type: Inject,
|
|
@@ -14698,7 +15154,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14698
15154
|
* ```
|
|
14699
15155
|
*/
|
|
14700
15156
|
class DateRangeComponent {
|
|
14701
|
-
constructor() {
|
|
15157
|
+
constructor(dateRangeService) {
|
|
15158
|
+
this.dateRangeService = dateRangeService;
|
|
14702
15159
|
this.wrapperClass = true;
|
|
14703
15160
|
/**
|
|
14704
15161
|
* @hidden
|
|
@@ -14706,6 +15163,19 @@ class DateRangeComponent {
|
|
|
14706
15163
|
this.showDefault = false;
|
|
14707
15164
|
validatePackage(packageMetadata);
|
|
14708
15165
|
}
|
|
15166
|
+
/**
|
|
15167
|
+
* @hidden
|
|
15168
|
+
*/
|
|
15169
|
+
keydown(event) {
|
|
15170
|
+
const shouldOpenPopup = event.keyCode === Keys$1.ArrowDown && event.altKey;
|
|
15171
|
+
if (shouldOpenPopup) {
|
|
15172
|
+
this.dateRangeService.activatePopup();
|
|
15173
|
+
}
|
|
15174
|
+
const shouldClosePopup = (event.keyCode === Keys$1.ArrowUp && event.altKey) || event.keyCode === Keys$1.Escape;
|
|
15175
|
+
if (shouldClosePopup) {
|
|
15176
|
+
this.dateRangeService.deactivatePopup();
|
|
15177
|
+
}
|
|
15178
|
+
}
|
|
14709
15179
|
get hasContentPopup() {
|
|
14710
15180
|
return this.contentPopup.length > 0;
|
|
14711
15181
|
}
|
|
@@ -14716,13 +15186,12 @@ class DateRangeComponent {
|
|
|
14716
15186
|
});
|
|
14717
15187
|
}
|
|
14718
15188
|
ngOnDestroy() {
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
}
|
|
15189
|
+
var _a;
|
|
15190
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
14722
15191
|
}
|
|
14723
15192
|
}
|
|
14724
|
-
DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14725
|
-
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "kendo-daterange", host: { properties: { "class.k-daterangepicker": "this.wrapperClass" } }, providers: [DateRangeService], queries: [{ propertyName: "contentPopup", predicate: DateRangePopupComponent }], ngImport: i0, template: `
|
|
15193
|
+
DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, deps: [{ token: DateRangeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
15194
|
+
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "kendo-daterange", host: { listeners: { "keydown": "keydown($event)" }, properties: { "class.k-daterangepicker": "this.wrapperClass" } }, providers: [DateRangeService], queries: [{ propertyName: "contentPopup", predicate: DateRangePopupComponent }], ngImport: i0, template: `
|
|
14726
15195
|
<ng-content></ng-content>
|
|
14727
15196
|
<kendo-daterange-popup *ngIf="showDefault"></kendo-daterange-popup>
|
|
14728
15197
|
`, isInline: true, components: [{ type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: ["animate", "anchor", "anchorAlign", "appendTo", "collision", "popupAlign", "margin"], outputs: ["open", "close", "blur", "focus", "cancel"], exportAs: ["kendo-daterange-popup"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
@@ -14736,7 +15205,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14736
15205
|
<kendo-daterange-popup *ngIf="showDefault"></kendo-daterange-popup>
|
|
14737
15206
|
`
|
|
14738
15207
|
}]
|
|
14739
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
15208
|
+
}], ctorParameters: function () { return [{ type: DateRangeService }]; }, propDecorators: { keydown: [{
|
|
15209
|
+
type: HostListener,
|
|
15210
|
+
args: ['keydown', ['$event']]
|
|
15211
|
+
}], wrapperClass: [{
|
|
14740
15212
|
type: HostBinding,
|
|
14741
15213
|
args: ['class.k-daterangepicker']
|
|
14742
15214
|
}], contentPopup: [{
|
|
@@ -14832,10 +15304,10 @@ class DateRangeInput {
|
|
|
14832
15304
|
}
|
|
14833
15305
|
}
|
|
14834
15306
|
togglePopup({ altKey, keyCode }) {
|
|
14835
|
-
if (keyCode === Keys.Escape) {
|
|
15307
|
+
if (keyCode === Keys$1.Escape) {
|
|
14836
15308
|
this.dateRangeService.cancelPopup();
|
|
14837
15309
|
}
|
|
14838
|
-
else if (altKey && keyCode === Keys.ArrowDown) {
|
|
15310
|
+
else if (altKey && keyCode === Keys$1.ArrowDown) {
|
|
14839
15311
|
this.dateRangeService.activatePopup();
|
|
14840
15312
|
}
|
|
14841
15313
|
}
|
|
@@ -14852,6 +15324,12 @@ class DateRangeInput {
|
|
|
14852
15324
|
}
|
|
14853
15325
|
}
|
|
14854
15326
|
}
|
|
15327
|
+
DateRangeInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeInput, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
15328
|
+
DateRangeInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeInput, ngImport: i0 });
|
|
15329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeInput, decorators: [{
|
|
15330
|
+
type: Directive,
|
|
15331
|
+
args: [{}]
|
|
15332
|
+
}], ctorParameters: function () { return [{ type: undefined }, { type: DateRangeService }, { type: DateInputComponent }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; } });
|
|
14855
15333
|
|
|
14856
15334
|
/**
|
|
14857
15335
|
* A directive which manages the end range selection.
|
|
@@ -14893,6 +15371,11 @@ class DateRangeEndInputDirective extends DateRangeInput {
|
|
|
14893
15371
|
this.rangeService.registerEndInput(this.dateInput);
|
|
14894
15372
|
super.init();
|
|
14895
15373
|
}
|
|
15374
|
+
ngAfterViewInit() {
|
|
15375
|
+
const inputElement = this.dateInput.inputElement;
|
|
15376
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaExpanded);
|
|
15377
|
+
this.dateInput.pickerType = 'daterangeend';
|
|
15378
|
+
}
|
|
14896
15379
|
ngOnDestroy() {
|
|
14897
15380
|
super.destroy();
|
|
14898
15381
|
}
|
|
@@ -14938,6 +15421,7 @@ class DateRangeStartInputDirective extends DateRangeInput {
|
|
|
14938
15421
|
super('start', rangeService, dateInput, element, renderer, zone);
|
|
14939
15422
|
this.rangeService = rangeService;
|
|
14940
15423
|
this.dateInput = dateInput;
|
|
15424
|
+
this.renderer = renderer;
|
|
14941
15425
|
/**
|
|
14942
15426
|
* Specifies the navigation behavior of the calendar when the active end is changed on input focus.
|
|
14943
15427
|
* When enabled, the calendar navigates to the value of the focused input. Otherwise, the calendar
|
|
@@ -14969,6 +15453,13 @@ class DateRangeStartInputDirective extends DateRangeInput {
|
|
|
14969
15453
|
this.rangeService.registerStartInput(this.dateInput);
|
|
14970
15454
|
super.init();
|
|
14971
15455
|
}
|
|
15456
|
+
ngAfterViewInit() {
|
|
15457
|
+
const inputElement = this.dateInput.inputElement;
|
|
15458
|
+
this.renderer.setAttribute(inputElement, 'role', 'combobox');
|
|
15459
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaHasPopup, 'true');
|
|
15460
|
+
this.dateInput.pickerType = 'daterangestart';
|
|
15461
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaExpanded, 'false');
|
|
15462
|
+
}
|
|
14972
15463
|
ngOnDestroy() {
|
|
14973
15464
|
super.destroy();
|
|
14974
15465
|
}
|