@progress/kendo-angular-dateinputs 7.1.4 → 7.1.5-dev.202211101635
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 +13 -1
- package/calendar/horizontal-view-list.component.d.ts +5 -4
- package/calendar/multiview-calendar.component.d.ts +6 -2
- package/dateinput/dateinput.component.d.ts +7 -3
- package/dateinput/dateinput.module.d.ts +1 -1
- package/dateinputs.module.d.ts +1 -1
- package/datepicker/datepicker.module.d.ts +1 -1
- package/daterange/date-range.service.d.ts +15 -3
- package/datetimepicker/datetimepicker.module.d.ts +1 -1
- package/esm2015/calendar/calendar.component.js +27 -3
- package/esm2015/calendar/horizontal-view-list.component.js +27 -12
- package/esm2015/calendar/multiview-calendar.component.js +14 -10
- package/esm2015/calendar/view-list.component.js +2 -2
- package/esm2015/dateinput/dateinput.component.js +18 -12
- package/esm2015/dateinput/dateinput.module.js +1 -1
- package/esm2015/dateinputs.module.js +1 -1
- package/esm2015/datepicker/datepicker.component.js +4 -4
- package/esm2015/datepicker/datepicker.module.js +1 -1
- package/esm2015/daterange/date-range-end-input.directive.js +2 -3
- package/esm2015/daterange/date-range-input.js +2 -0
- package/esm2015/daterange/date-range-popup.component.js +7 -2
- package/esm2015/daterange/date-range-start-input.directive.js +2 -5
- package/esm2015/daterange/date-range.service.js +32 -16
- package/esm2015/datetimepicker/datetimepicker.component.js +10 -6
- package/esm2015/datetimepicker/datetimepicker.module.js +1 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/timepicker/timelist.component.js +11 -25
- package/esm2015/timepicker/timepicker.component.js +7 -3
- package/esm2015/timepicker/timepicker.module.js +1 -1
- package/esm2015/virtualization/virtualization.module.js +1 -1
- package/fesm2015/kendo-angular-dateinputs.js +172 -108
- package/package.json +1 -1
- package/timepicker/timelist.component.d.ts +1 -3
- package/timepicker/timepicker.module.d.ts +1 -1
- package/virtualization/virtualization.module.d.ts +1 -1
|
@@ -11,7 +11,7 @@ import { DateInputCustomMessagesComponent } from './localization/dateinput-custo
|
|
|
11
11
|
import { EventsModule } from '@progress/kendo-angular-common';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
/**
|
|
14
|
-
* Represents the [NgModule](
|
|
14
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
15
15
|
* definition for the DateInput component.
|
|
16
16
|
*/
|
|
17
17
|
export class DateInputModule {
|
|
@@ -19,7 +19,7 @@ const COMPONENT_MODULES = [
|
|
|
19
19
|
DateTimePickerModule
|
|
20
20
|
];
|
|
21
21
|
/**
|
|
22
|
-
* Represents the [NgModule](
|
|
22
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
23
23
|
* definition for the Date Inputs components.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
@@ -457,7 +457,7 @@ export class DatePickerComponent {
|
|
|
457
457
|
}
|
|
458
458
|
get popupUID() {
|
|
459
459
|
var _a;
|
|
460
|
-
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.
|
|
460
|
+
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.popupId;
|
|
461
461
|
}
|
|
462
462
|
;
|
|
463
463
|
get isActive() {
|
|
@@ -923,7 +923,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
923
923
|
#input
|
|
924
924
|
[role]="'combobox'"
|
|
925
925
|
pickerType="datepicker"
|
|
926
|
-
|
|
926
|
+
hasPopup="grid"
|
|
927
927
|
[isPopupOpen]="show"
|
|
928
928
|
[disabled]="disabled"
|
|
929
929
|
[readonly]="readonly || readOnlyInput"
|
|
@@ -996,7 +996,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
996
996
|
</kendo-calendar-messages>
|
|
997
997
|
</kendo-calendar>
|
|
998
998
|
<ng-template>
|
|
999
|
-
`, isInline: true, components: [{ type: i5.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: i6.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: i7.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], directives: [{ type: i8.DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
999
|
+
`, isInline: true, components: [{ type: i5.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "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: i6.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", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: i7.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], directives: [{ type: i8.DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1000
1000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
1001
1001
|
type: Component,
|
|
1002
1002
|
args: [{
|
|
@@ -1034,7 +1034,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1034
1034
|
#input
|
|
1035
1035
|
[role]="'combobox'"
|
|
1036
1036
|
pickerType="datepicker"
|
|
1037
|
-
|
|
1037
|
+
hasPopup="grid"
|
|
1038
1038
|
[isPopupOpen]="show"
|
|
1039
1039
|
[disabled]="disabled"
|
|
1040
1040
|
[readonly]="readonly || readOnlyInput"
|
|
@@ -17,7 +17,7 @@ import { touchEnabled } from '@progress/kendo-common';
|
|
|
17
17
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
19
19
|
/**
|
|
20
|
-
* Represents the [NgModule](
|
|
20
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
21
21
|
* definition for the DatePicker component.
|
|
22
22
|
*/
|
|
23
23
|
export class DatePickerModule {
|
|
@@ -50,11 +50,10 @@ export class DateRangeEndInputDirective extends DateRangeInput {
|
|
|
50
50
|
ngOnInit() {
|
|
51
51
|
this.rangeService.registerEndInput(this.dateInput);
|
|
52
52
|
super.init();
|
|
53
|
+
this.dateInput.pickerType = 'daterangeend';
|
|
53
54
|
}
|
|
54
55
|
ngAfterViewInit() {
|
|
55
|
-
|
|
56
|
-
this.renderer.removeAttribute(inputElement, attributeNames.ariaExpanded);
|
|
57
|
-
this.dateInput.pickerType = 'daterangeend';
|
|
56
|
+
this.renderer.setAttribute(this.dateInput.inputElement, attributeNames.ariaExpanded, 'false');
|
|
58
57
|
}
|
|
59
58
|
ngOnDestroy() {
|
|
60
59
|
super.destroy();
|
|
@@ -34,6 +34,8 @@ export class DateRangeInput {
|
|
|
34
34
|
return isPresent(popup) && isPresent(popup.calendar);
|
|
35
35
|
}
|
|
36
36
|
init() {
|
|
37
|
+
this.input.role = 'combobox';
|
|
38
|
+
this.input.hasPopup = 'grid';
|
|
37
39
|
if (this.input.value) {
|
|
38
40
|
this.dateRangeService.setRange(this.getRange(this.input.value));
|
|
39
41
|
}
|
|
@@ -170,7 +170,12 @@ export class DateRangePopupComponent {
|
|
|
170
170
|
this.zone.runOutsideAngular(() => {
|
|
171
171
|
this.activateSubscription = merge(this.contentCalendar.changes, this.viewCalendar.changes)
|
|
172
172
|
.pipe(filter(changes => changes && changes.first), map(changes => changes.first))
|
|
173
|
-
.subscribe((calendar) => setTimeout(() =>
|
|
173
|
+
.subscribe((calendar) => setTimeout(() => {
|
|
174
|
+
calendar.focus();
|
|
175
|
+
this.calendarSubscriptions.add(calendar.viewList.focusedCellChange.subscribe((id) => {
|
|
176
|
+
this.dateRangeService.setActiveDescendent(id);
|
|
177
|
+
}));
|
|
178
|
+
}));
|
|
174
179
|
});
|
|
175
180
|
}
|
|
176
181
|
/**
|
|
@@ -297,7 +302,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
297
302
|
<ng-template #defaultTemplate>
|
|
298
303
|
<kendo-multiviewcalendar kendoDateRangeSelection></kendo-multiviewcalendar>
|
|
299
304
|
</ng-template>
|
|
300
|
-
`, isInline: true, components: [{ type: i3.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: i4.DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }] });
|
|
305
|
+
`, isInline: true, components: [{ type: i3.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", "focus", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }], directives: [{ type: i4.DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }] });
|
|
301
306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, decorators: [{
|
|
302
307
|
type: Component,
|
|
303
308
|
args: [{
|
|
@@ -52,13 +52,10 @@ export class DateRangeStartInputDirective extends DateRangeInput {
|
|
|
52
52
|
ngOnInit() {
|
|
53
53
|
this.rangeService.registerStartInput(this.dateInput);
|
|
54
54
|
super.init();
|
|
55
|
+
this.dateInput.pickerType = 'daterangestart';
|
|
55
56
|
}
|
|
56
57
|
ngAfterViewInit() {
|
|
57
|
-
|
|
58
|
-
this.renderer.setAttribute(inputElement, 'role', 'combobox');
|
|
59
|
-
this.renderer.setAttribute(inputElement, attributeNames.ariaHasPopup, 'true');
|
|
60
|
-
this.dateInput.pickerType = 'daterangestart';
|
|
61
|
-
this.renderer.setAttribute(inputElement, attributeNames.ariaExpanded, 'false');
|
|
58
|
+
this.renderer.setAttribute(this.dateInput.inputElement, attributeNames.ariaExpanded, 'false');
|
|
62
59
|
}
|
|
63
60
|
ngOnDestroy() {
|
|
64
61
|
super.destroy();
|
|
@@ -6,7 +6,6 @@ import { Injectable, Optional } from '@angular/core';
|
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { EMPTY_SELECTIONRANGE } from '../calendar/models/selection-range.interface';
|
|
8
8
|
import { isEqual } from '@progress/kendo-date-math';
|
|
9
|
-
import { Subscription } from 'rxjs';
|
|
10
9
|
import { attributeNames } from '../common/utils';
|
|
11
10
|
import * as i0 from "@angular/core";
|
|
12
11
|
const isActive = (cmp) => (cmp && cmp.isActive) || false;
|
|
@@ -19,8 +18,6 @@ export class DateRangeService {
|
|
|
19
18
|
/** @hidden */
|
|
20
19
|
constructor(renderer) {
|
|
21
20
|
this.renderer = renderer;
|
|
22
|
-
/** @hidden */
|
|
23
|
-
this.focusedCellChange = new Subscription();
|
|
24
21
|
/**
|
|
25
22
|
* An Observable instance that notifies when the `activeRangeEnd` state is changed.
|
|
26
23
|
*/
|
|
@@ -80,23 +77,34 @@ export class DateRangeService {
|
|
|
80
77
|
get selectionRange() {
|
|
81
78
|
return this.range$.value;
|
|
82
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* @hidden
|
|
82
|
+
* Gets the start input element.
|
|
83
|
+
*/
|
|
84
|
+
get inputStartElement() {
|
|
85
|
+
return this.startInput$.value.dateInput.nativeElement;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @hidden
|
|
89
|
+
* Gets the end input element.
|
|
90
|
+
*/
|
|
91
|
+
get inputEndElement() {
|
|
92
|
+
return this.endInput$.value.dateInput.nativeElement;
|
|
93
|
+
}
|
|
83
94
|
/**
|
|
84
95
|
* Activates the registered `DateRangePopup` component.
|
|
85
96
|
* The method opens the popup and focuses the calendar.
|
|
86
97
|
*/
|
|
87
98
|
activatePopup() {
|
|
88
|
-
var _a;
|
|
89
99
|
const dateRangePopup = this.dateRangePopup$.value;
|
|
90
100
|
if (!dateRangePopup) {
|
|
91
101
|
return;
|
|
92
102
|
}
|
|
93
103
|
if (this.startInput$.value) {
|
|
94
|
-
|
|
95
|
-
this.renderer.setAttribute(
|
|
96
|
-
this.renderer.setAttribute(
|
|
97
|
-
this.
|
|
98
|
-
this.renderer.setAttribute(inputElement, attributeNames.ariaActiveDescendant, id);
|
|
99
|
-
});
|
|
104
|
+
this.renderer.setAttribute(this.inputStartElement, attributeNames.ariaControls, dateRangePopup.popupUID);
|
|
105
|
+
this.renderer.setAttribute(this.inputStartElement, attributeNames.ariaExpanded, 'true');
|
|
106
|
+
this.renderer.setAttribute(this.inputEndElement, attributeNames.ariaControls, dateRangePopup.popupUID);
|
|
107
|
+
this.renderer.setAttribute(this.inputEndElement, attributeNames.ariaExpanded, 'true');
|
|
100
108
|
}
|
|
101
109
|
dateRangePopup.activate();
|
|
102
110
|
}
|
|
@@ -105,20 +113,28 @@ export class DateRangeService {
|
|
|
105
113
|
* The method closes the popup.
|
|
106
114
|
*/
|
|
107
115
|
deactivatePopup() {
|
|
108
|
-
var _a;
|
|
109
116
|
const dateRangePopup = this.dateRangePopup$.value;
|
|
110
117
|
if (!(dateRangePopup && dateRangePopup.show)) {
|
|
111
118
|
return;
|
|
112
119
|
}
|
|
113
120
|
if (this.startInput$.value) {
|
|
114
|
-
|
|
115
|
-
this.renderer.
|
|
116
|
-
this.renderer.
|
|
117
|
-
(
|
|
118
|
-
this.renderer.
|
|
121
|
+
this.renderer.removeAttribute(this.inputStartElement, attributeNames.ariaControls);
|
|
122
|
+
this.renderer.setAttribute(this.inputStartElement, attributeNames.ariaExpanded, 'false');
|
|
123
|
+
this.renderer.removeAttribute(this.inputStartElement, attributeNames.ariaActiveDescendant);
|
|
124
|
+
this.renderer.removeAttribute(this.inputEndElement, attributeNames.ariaControls);
|
|
125
|
+
this.renderer.setAttribute(this.inputEndElement, attributeNames.ariaExpanded, 'false');
|
|
126
|
+
this.renderer.removeAttribute(this.inputEndElement, attributeNames.ariaActiveDescendant);
|
|
119
127
|
}
|
|
120
128
|
dateRangePopup.show = false;
|
|
121
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
setActiveDescendent(id) {
|
|
134
|
+
this.renderer.setAttribute(this.inputStartElement, attributeNames.ariaActiveDescendant, id);
|
|
135
|
+
this.renderer.setAttribute(this.inputEndElement, attributeNames.ariaActiveDescendant, id);
|
|
136
|
+
}
|
|
137
|
+
;
|
|
122
138
|
/**
|
|
123
139
|
* @hidden
|
|
124
140
|
*
|
|
@@ -512,7 +512,7 @@ export class DateTimePickerComponent {
|
|
|
512
512
|
}
|
|
513
513
|
get popupUID() {
|
|
514
514
|
var _a;
|
|
515
|
-
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.
|
|
515
|
+
return (_a = this.calendar) === null || _a === void 0 ? void 0 : _a.popupId;
|
|
516
516
|
}
|
|
517
517
|
;
|
|
518
518
|
ngOnInit() {
|
|
@@ -1096,7 +1096,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1096
1096
|
[tabindex]="tabindex"
|
|
1097
1097
|
[title]="title"
|
|
1098
1098
|
pickerType="datetimepicker"
|
|
1099
|
-
|
|
1099
|
+
hasPopup="grid"
|
|
1100
1100
|
[isPopupOpen]="isOpen"
|
|
1101
1101
|
(valueChange)="handleInputValueChange($event)"
|
|
1102
1102
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1147,12 +1147,13 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1147
1147
|
}"
|
|
1148
1148
|
[scope]="this"
|
|
1149
1149
|
>
|
|
1150
|
-
<div class="k-button-group k-button-group-stretched">
|
|
1150
|
+
<div class="k-button-group k-button-group-stretched" role="group">
|
|
1151
1151
|
<button
|
|
1152
1152
|
type="button"
|
|
1153
1153
|
class="k-button k-group-start k-date-tab"
|
|
1154
1154
|
[ngClass]="popupButtonsClasses()"
|
|
1155
1155
|
[class.k-active]="activeTab === 'date'"
|
|
1156
|
+
[attr.aria-pressed]="activeTab === 'date' ? 'true' : 'false'"
|
|
1156
1157
|
[attr.title]="localization.get('dateTabLabel')"
|
|
1157
1158
|
[attr.aria-label]="localization.get('dateTabLabel')"
|
|
1158
1159
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1168,6 +1169,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1168
1169
|
class="k-button k-group-end k-time-tab"
|
|
1169
1170
|
[ngClass]="popupButtonsClasses()"
|
|
1170
1171
|
[class.k-active]="activeTab === 'time'"
|
|
1172
|
+
[attr.aria-pressed]="activeTab === 'time' ? 'true' : 'false'"
|
|
1171
1173
|
[attr.title]="localization.get('timeTabLabel')"
|
|
1172
1174
|
[attr.aria-label]="localization.get('timeTabLabel')"
|
|
1173
1175
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1274,7 +1276,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1274
1276
|
</div>
|
|
1275
1277
|
</div>
|
|
1276
1278
|
</ng-template>
|
|
1277
|
-
`, isInline: true, components: [{ type: i6.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: i7.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: i8.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: i9.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: i10.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1279
|
+
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "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: i7.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", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: i8.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: i9.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: i10.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1278
1280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
1279
1281
|
type: Component,
|
|
1280
1282
|
args: [{
|
|
@@ -1355,7 +1357,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1355
1357
|
[tabindex]="tabindex"
|
|
1356
1358
|
[title]="title"
|
|
1357
1359
|
pickerType="datetimepicker"
|
|
1358
|
-
|
|
1360
|
+
hasPopup="grid"
|
|
1359
1361
|
[isPopupOpen]="isOpen"
|
|
1360
1362
|
(valueChange)="handleInputValueChange($event)"
|
|
1361
1363
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1406,12 +1408,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1406
1408
|
}"
|
|
1407
1409
|
[scope]="this"
|
|
1408
1410
|
>
|
|
1409
|
-
<div class="k-button-group k-button-group-stretched">
|
|
1411
|
+
<div class="k-button-group k-button-group-stretched" role="group">
|
|
1410
1412
|
<button
|
|
1411
1413
|
type="button"
|
|
1412
1414
|
class="k-button k-group-start k-date-tab"
|
|
1413
1415
|
[ngClass]="popupButtonsClasses()"
|
|
1414
1416
|
[class.k-active]="activeTab === 'date'"
|
|
1417
|
+
[attr.aria-pressed]="activeTab === 'date' ? 'true' : 'false'"
|
|
1415
1418
|
[attr.title]="localization.get('dateTabLabel')"
|
|
1416
1419
|
[attr.aria-label]="localization.get('dateTabLabel')"
|
|
1417
1420
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1427,6 +1430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1427
1430
|
class="k-button k-group-end k-time-tab"
|
|
1428
1431
|
[ngClass]="popupButtonsClasses()"
|
|
1429
1432
|
[class.k-active]="activeTab === 'time'"
|
|
1433
|
+
[attr.aria-pressed]="activeTab === 'time' ? 'true' : 'false'"
|
|
1430
1434
|
[attr.title]="localization.get('timeTabLabel')"
|
|
1431
1435
|
[attr.aria-label]="localization.get('timeTabLabel')"
|
|
1432
1436
|
[kendoEventsOutsideAngular]="{
|
|
@@ -23,7 +23,7 @@ const COMPONENT_DIRECTIVES = [
|
|
|
23
23
|
LocalizedMessagesDirective
|
|
24
24
|
];
|
|
25
25
|
/**
|
|
26
|
-
* Represents the [NgModule](
|
|
26
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
27
27
|
* definition for the DateTimePicker component.
|
|
28
28
|
*/
|
|
29
29
|
export class DateTimePickerModule {
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dateinputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1668098044,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -15,7 +15,6 @@ import { SecondsService } from './services/seconds.service';
|
|
|
15
15
|
import { MillisecondsService } from './services/milliseconds.service';
|
|
16
16
|
import { DayPeriodService } from './services/dayperiod.service';
|
|
17
17
|
import { closestInScope } from '../common/dom-queries';
|
|
18
|
-
import { attributeNames } from '../common/utils';
|
|
19
18
|
import * as i0 from "@angular/core";
|
|
20
19
|
import * as i1 from "./services/dom.service";
|
|
21
20
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
@@ -62,23 +61,14 @@ export class TimeListComponent {
|
|
|
62
61
|
this.data = [];
|
|
63
62
|
this.indexToScroll = -1;
|
|
64
63
|
this.domEvents = [];
|
|
65
|
-
this.hostElement = this.element.nativeElement;
|
|
66
64
|
}
|
|
67
65
|
get roleAttribute() {
|
|
68
|
-
return
|
|
66
|
+
return 'listbox';
|
|
69
67
|
}
|
|
70
68
|
get ariaLabel() {
|
|
71
69
|
var _a;
|
|
72
70
|
return this.localization.get((_a = this.part) === null || _a === void 0 ? void 0 : _a.type);
|
|
73
71
|
}
|
|
74
|
-
get valueMin() {
|
|
75
|
-
var _a;
|
|
76
|
-
return (_a = this.data[0]) === null || _a === void 0 ? void 0 : _a.text;
|
|
77
|
-
}
|
|
78
|
-
get valueMax() {
|
|
79
|
-
var _a;
|
|
80
|
-
return (_a = this.data[this.data.length - 1]) === null || _a === void 0 ? void 0 : _a.text;
|
|
81
|
-
}
|
|
82
72
|
get tabIndex() {
|
|
83
73
|
return this.disabled ? undefined : 0;
|
|
84
74
|
}
|
|
@@ -86,8 +76,10 @@ export class TimeListComponent {
|
|
|
86
76
|
var _a;
|
|
87
77
|
return ((_a = this.part) === null || _a === void 0 ? void 0 : _a.type) === 'dayperiod';
|
|
88
78
|
}
|
|
79
|
+
get currentSelectedIndex() {
|
|
80
|
+
return this.selectedIndex(this.value);
|
|
81
|
+
}
|
|
89
82
|
ngOnChanges(changes) {
|
|
90
|
-
var _a, _b;
|
|
91
83
|
if (changes.part) {
|
|
92
84
|
this.service = this.injector.get(services[this.part.type]);
|
|
93
85
|
this.service.configure(this.serviceSettings());
|
|
@@ -107,8 +99,6 @@ export class TimeListComponent {
|
|
|
107
99
|
this.animateToIndex = this.animateToIndex && this.textHasChanged(valueChanges);
|
|
108
100
|
this.total = this.service.total(value);
|
|
109
101
|
this.indexToScroll = this.selectedIndex(value);
|
|
110
|
-
this.renderer.setAttribute(this.hostElement, attributeNames.valueNow, (_a = this.getCurrentItem()) === null || _a === void 0 ? void 0 : _a.value.toString());
|
|
111
|
-
this.renderer.setAttribute(this.hostElement, attributeNames.valuetext, (_b = this.getCurrentItem()) === null || _b === void 0 ? void 0 : _b.text);
|
|
112
102
|
}
|
|
113
103
|
ngOnInit() {
|
|
114
104
|
this.animateToIndex = true;
|
|
@@ -261,7 +251,7 @@ export class TimeListComponent {
|
|
|
261
251
|
}
|
|
262
252
|
}
|
|
263
253
|
TimeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimeListComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: i1.TimePickerDOMService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
264
|
-
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.
|
|
254
|
+
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.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: `
|
|
265
255
|
<kendo-virtualization
|
|
266
256
|
[skip]="skip"
|
|
267
257
|
[take]="total"
|
|
@@ -279,11 +269,12 @@ TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
279
269
|
click: handleItemClick
|
|
280
270
|
}"
|
|
281
271
|
[scope]="this"
|
|
282
|
-
[attr.role]="
|
|
272
|
+
[attr.role]="'presentation'"
|
|
283
273
|
>
|
|
284
274
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
285
275
|
[attr.data-timelist-item-index]="index"
|
|
286
|
-
[attr.role]="
|
|
276
|
+
[attr.role]="'option'"
|
|
277
|
+
[attr.aria-selected]="index === currentSelectedIndex"
|
|
287
278
|
>
|
|
288
279
|
<span>{{item.text}}</span>
|
|
289
280
|
</li>
|
|
@@ -312,11 +303,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
312
303
|
click: handleItemClick
|
|
313
304
|
}"
|
|
314
305
|
[scope]="this"
|
|
315
|
-
[attr.role]="
|
|
306
|
+
[attr.role]="'presentation'"
|
|
316
307
|
>
|
|
317
308
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
318
309
|
[attr.data-timelist-item-index]="index"
|
|
319
|
-
[attr.role]="
|
|
310
|
+
[attr.role]="'option'"
|
|
311
|
+
[attr.aria-selected]="index === currentSelectedIndex"
|
|
320
312
|
>
|
|
321
313
|
<span>{{item.text}}</span>
|
|
322
314
|
</li>
|
|
@@ -347,12 +339,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
347
339
|
}], ariaLabel: [{
|
|
348
340
|
type: HostBinding,
|
|
349
341
|
args: ["attr.aria-label"]
|
|
350
|
-
}], valueMin: [{
|
|
351
|
-
type: HostBinding,
|
|
352
|
-
args: ['attr.valuemin']
|
|
353
|
-
}], valueMax: [{
|
|
354
|
-
type: HostBinding,
|
|
355
|
-
args: ["attr.valuemax"]
|
|
356
342
|
}], tabIndex: [{
|
|
357
343
|
type: HostBinding,
|
|
358
344
|
args: ["attr.tabindex"]
|
|
@@ -470,12 +470,14 @@ export class TimePickerComponent {
|
|
|
470
470
|
const { altKey, keyCode } = event;
|
|
471
471
|
if (keyCode === Keys.Escape) {
|
|
472
472
|
this.show = false;
|
|
473
|
+
this.cdr.detectChanges();
|
|
473
474
|
return;
|
|
474
475
|
}
|
|
475
476
|
if (altKey) {
|
|
476
477
|
if (keyCode === Keys.ArrowUp) {
|
|
477
478
|
event.preventDefault();
|
|
478
479
|
this.show = false;
|
|
480
|
+
this.cdr.detectChanges();
|
|
479
481
|
}
|
|
480
482
|
if (keyCode === Keys.ArrowDown && !this.show) {
|
|
481
483
|
event.preventDefault();
|
|
@@ -629,6 +631,7 @@ export class TimePickerComponent {
|
|
|
629
631
|
//due to async IE focus event
|
|
630
632
|
this.handleFocus();
|
|
631
633
|
this.show = !this.show;
|
|
634
|
+
this.cdr.detectChanges();
|
|
632
635
|
}
|
|
633
636
|
/**
|
|
634
637
|
* @hidden
|
|
@@ -775,6 +778,7 @@ export class TimePickerComponent {
|
|
|
775
778
|
else {
|
|
776
779
|
this.blurComponent();
|
|
777
780
|
}
|
|
781
|
+
this.cdr.detectChanges();
|
|
778
782
|
}
|
|
779
783
|
blurComponent() {
|
|
780
784
|
this.isActive = false; // order is important ¯\_(ツ)_/¯
|
|
@@ -855,7 +859,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
855
859
|
<kendo-dateinput
|
|
856
860
|
#input
|
|
857
861
|
pickerType="timepicker"
|
|
858
|
-
|
|
862
|
+
hasPopup="dialog"
|
|
859
863
|
[isPopupOpen]="show"
|
|
860
864
|
[disabled]="disabled"
|
|
861
865
|
[readonly]="readonly || readOnlyInput"
|
|
@@ -926,7 +930,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
926
930
|
</kendo-timeselector>
|
|
927
931
|
</ng-template>
|
|
928
932
|
<ng-container #container></ng-container>
|
|
929
|
-
`, isInline: true, components: [{ type: i6.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: i7.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: i8.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i9.TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i10.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
933
|
+
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "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: i7.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: i8.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i9.TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i10.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
930
934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
931
935
|
type: Component,
|
|
932
936
|
args: [{
|
|
@@ -987,7 +991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
987
991
|
<kendo-dateinput
|
|
988
992
|
#input
|
|
989
993
|
pickerType="timepicker"
|
|
990
|
-
|
|
994
|
+
hasPopup="dialog"
|
|
991
995
|
[isPopupOpen]="show"
|
|
992
996
|
[disabled]="disabled"
|
|
993
997
|
[readonly]="readonly || readOnlyInput"
|
|
@@ -54,7 +54,7 @@ const providers = [
|
|
|
54
54
|
}
|
|
55
55
|
];
|
|
56
56
|
/**
|
|
57
|
-
* Represents the [NgModule](
|
|
57
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
58
58
|
* definition for the TimePicker component.
|
|
59
59
|
*/
|
|
60
60
|
export class TimePickerModule {
|
|
@@ -12,7 +12,7 @@ const COMPONENT_DIRECTIVES = [
|
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*
|
|
15
|
-
* Represents the [NgModule](
|
|
15
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
16
16
|
* definition for the Virtualization component.
|
|
17
17
|
*/
|
|
18
18
|
export class VirtualizationModule {
|