@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
|
@@ -15,11 +15,13 @@ 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';
|
|
18
19
|
import * as i0 from "@angular/core";
|
|
19
20
|
import * as i1 from "./services/dom.service";
|
|
20
|
-
import * as i2 from "
|
|
21
|
-
import * as i3 from "
|
|
22
|
-
import * as i4 from "@
|
|
21
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
22
|
+
import * as i3 from "../virtualization/virtualization.component";
|
|
23
|
+
import * as i4 from "@angular/common";
|
|
24
|
+
import * as i5 from "@progress/kendo-angular-common";
|
|
23
25
|
const SNAP_THRESHOLD = 0.05; //% of the item height
|
|
24
26
|
const SCROLL_THRESHOLD = 2; //< 2px threshold
|
|
25
27
|
const nil = () => (null);
|
|
@@ -40,12 +42,13 @@ const services = {
|
|
|
40
42
|
* @hidden
|
|
41
43
|
*/
|
|
42
44
|
export class TimeListComponent {
|
|
43
|
-
constructor(element, injector, dom, renderer, zone) {
|
|
45
|
+
constructor(element, injector, dom, renderer, zone, localization) {
|
|
44
46
|
this.element = element;
|
|
45
47
|
this.injector = injector;
|
|
46
48
|
this.dom = dom;
|
|
47
49
|
this.renderer = renderer;
|
|
48
50
|
this.zone = zone;
|
|
51
|
+
this.localization = localization;
|
|
49
52
|
this.min = cloneDate(MIDNIGHT_DATE);
|
|
50
53
|
this.max = cloneDate(MAX_TIME);
|
|
51
54
|
this.step = 1;
|
|
@@ -59,11 +62,32 @@ export class TimeListComponent {
|
|
|
59
62
|
this.data = [];
|
|
60
63
|
this.indexToScroll = -1;
|
|
61
64
|
this.domEvents = [];
|
|
65
|
+
this.hostElement = this.element.nativeElement;
|
|
66
|
+
}
|
|
67
|
+
get roleAttribute() {
|
|
68
|
+
return this.isDayPeriod ? 'listbox' : 'spinbutton';
|
|
69
|
+
}
|
|
70
|
+
get ariaLabel() {
|
|
71
|
+
var _a;
|
|
72
|
+
return this.localization.get((_a = this.part) === null || _a === void 0 ? void 0 : _a.type);
|
|
73
|
+
}
|
|
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;
|
|
62
81
|
}
|
|
63
82
|
get tabIndex() {
|
|
64
83
|
return this.disabled ? undefined : 0;
|
|
65
84
|
}
|
|
85
|
+
get isDayPeriod() {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = this.part) === null || _a === void 0 ? void 0 : _a.type) === 'dayperiod';
|
|
88
|
+
}
|
|
66
89
|
ngOnChanges(changes) {
|
|
90
|
+
var _a, _b;
|
|
67
91
|
if (changes.part) {
|
|
68
92
|
this.service = this.injector.get(services[this.part.type]);
|
|
69
93
|
this.service.configure(this.serviceSettings());
|
|
@@ -83,6 +107,8 @@ export class TimeListComponent {
|
|
|
83
107
|
this.animateToIndex = this.animateToIndex && this.textHasChanged(valueChanges);
|
|
84
108
|
this.total = this.service.total(value);
|
|
85
109
|
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);
|
|
86
112
|
}
|
|
87
113
|
ngOnInit() {
|
|
88
114
|
this.animateToIndex = true;
|
|
@@ -115,6 +141,9 @@ export class TimeListComponent {
|
|
|
115
141
|
this.animateToIndex = true;
|
|
116
142
|
});
|
|
117
143
|
}
|
|
144
|
+
getCurrentItem() {
|
|
145
|
+
return this.indexToScroll >= 0 ? this.data[this.indexToScroll] : null;
|
|
146
|
+
}
|
|
118
147
|
handleChange(dataItem) {
|
|
119
148
|
const candidate = this.service.apply(this.value, dataItem.value);
|
|
120
149
|
if (this.value.getTime() === candidate.getTime()) {
|
|
@@ -231,8 +260,8 @@ export class TimeListComponent {
|
|
|
231
260
|
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)));
|
|
232
261
|
}
|
|
233
262
|
}
|
|
234
|
-
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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
235
|
-
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: `
|
|
263
|
+
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.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: `
|
|
236
265
|
<kendo-virtualization
|
|
237
266
|
[skip]="skip"
|
|
238
267
|
[take]="total"
|
|
@@ -250,14 +279,17 @@ TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
250
279
|
click: handleItemClick
|
|
251
280
|
}"
|
|
252
281
|
[scope]="this"
|
|
282
|
+
[attr.role]="isDayPeriod ? 'presentation' : null"
|
|
253
283
|
>
|
|
254
284
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
255
|
-
[attr.data-timelist-item-index]="index"
|
|
285
|
+
[attr.data-timelist-item-index]="index"
|
|
286
|
+
[attr.role]="isDayPeriod ? 'option' : null"
|
|
287
|
+
>
|
|
256
288
|
<span>{{item.text}}</span>
|
|
257
289
|
</li>
|
|
258
290
|
</ul>
|
|
259
291
|
</kendo-virtualization>
|
|
260
|
-
`, isInline: true, components: [{ type:
|
|
292
|
+
`, isInline: true, components: [{ type: i3.VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }], directives: [{ type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
261
293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimeListComponent, decorators: [{
|
|
262
294
|
type: Component,
|
|
263
295
|
args: [{
|
|
@@ -280,16 +312,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
280
312
|
click: handleItemClick
|
|
281
313
|
}"
|
|
282
314
|
[scope]="this"
|
|
315
|
+
[attr.role]="isDayPeriod ? 'presentation' : null"
|
|
283
316
|
>
|
|
284
317
|
<li *ngFor="let item of data; let index = index;" class="k-item"
|
|
285
|
-
[attr.data-timelist-item-index]="index"
|
|
318
|
+
[attr.data-timelist-item-index]="index"
|
|
319
|
+
[attr.role]="isDayPeriod ? 'option' : null"
|
|
320
|
+
>
|
|
286
321
|
<span>{{item.text}}</span>
|
|
287
322
|
</li>
|
|
288
323
|
</ul>
|
|
289
324
|
</kendo-virtualization>
|
|
290
325
|
`
|
|
291
326
|
}]
|
|
292
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1.TimePickerDOMService }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { min: [{
|
|
327
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1.TimePickerDOMService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i2.LocalizationService }]; }, propDecorators: { min: [{
|
|
293
328
|
type: Input
|
|
294
329
|
}], max: [{
|
|
295
330
|
type: Input
|
|
@@ -306,6 +341,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
306
341
|
}], virtualization: [{
|
|
307
342
|
type: ViewChild,
|
|
308
343
|
args: [VirtualizationComponent, { static: true }]
|
|
344
|
+
}], roleAttribute: [{
|
|
345
|
+
type: HostBinding,
|
|
346
|
+
args: ["attr.role"]
|
|
347
|
+
}], ariaLabel: [{
|
|
348
|
+
type: HostBinding,
|
|
349
|
+
args: ["attr.aria-label"]
|
|
350
|
+
}], valueMin: [{
|
|
351
|
+
type: HostBinding,
|
|
352
|
+
args: ['attr.valuemin']
|
|
353
|
+
}], valueMax: [{
|
|
354
|
+
type: HostBinding,
|
|
355
|
+
args: ["attr.valuemax"]
|
|
309
356
|
}], tabIndex: [{
|
|
310
357
|
type: HostBinding,
|
|
311
358
|
args: ["attr.tabindex"]
|
|
@@ -6,12 +6,12 @@ import { Component, ChangeDetectionStrategy, EventEmitter, HostBinding, Input, O
|
|
|
6
6
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
|
|
7
7
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
9
|
-
import { hasObservers, KendoInput,
|
|
9
|
+
import { hasObservers, KendoInput, Keys } from '@progress/kendo-angular-common';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
12
|
import { MIDNIGHT_DATE, MIN_TIME, MAX_TIME } from '../defaults';
|
|
13
13
|
import { PickerService } from '../common/picker.service';
|
|
14
|
-
import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
|
|
14
|
+
import { requiresZoneOnBlur, currentFocusTarget, attributeNames } from '../common/utils';
|
|
15
15
|
import { TIME_PART } from './models/time-part.default';
|
|
16
16
|
import { PreventableEvent } from '../preventable-event';
|
|
17
17
|
import { noop, setTime, isWindowAvailable, getFillModeClass, getSizeClass, getRoundedClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
|
|
@@ -19,16 +19,18 @@ import { timeRangeValidator } from '../validators/time-range.validator';
|
|
|
19
19
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
20
20
|
import { fromEvent } from 'rxjs';
|
|
21
21
|
import { incompleteDateValidator } from '../validators/incomplete-date.validator';
|
|
22
|
+
import { BusViewService } from '../calendar/services/bus-view.service';
|
|
22
23
|
import * as i0 from "@angular/core";
|
|
23
|
-
import * as i1 from "
|
|
24
|
-
import * as i2 from "@progress/kendo-angular-
|
|
25
|
-
import * as i3 from "
|
|
26
|
-
import * as i4 from "
|
|
27
|
-
import * as i5 from "
|
|
28
|
-
import * as i6 from "
|
|
29
|
-
import * as i7 from "./
|
|
30
|
-
import * as i8 from "./localization/
|
|
31
|
-
import * as i9 from "
|
|
24
|
+
import * as i1 from "../calendar/services/bus-view.service";
|
|
25
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
26
|
+
import * as i3 from "@progress/kendo-angular-popup";
|
|
27
|
+
import * as i4 from "../common/picker.service";
|
|
28
|
+
import * as i5 from "@progress/kendo-angular-intl";
|
|
29
|
+
import * as i6 from "../dateinput/dateinput.component";
|
|
30
|
+
import * as i7 from "./timeselector.component";
|
|
31
|
+
import * as i8 from "./localization/timeselector-custom-messages.component";
|
|
32
|
+
import * as i9 from "./localization/timepicker-localized-messages.directive";
|
|
33
|
+
import * as i10 from "@progress/kendo-angular-common";
|
|
32
34
|
const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/timepicker/#toc-integration-with-json';
|
|
33
35
|
const INTL_DATE_FORMAT = 'https://github.com/telerik/kendo-intl/blob/master/docs/date-formatting/index.md';
|
|
34
36
|
const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PART.second}|${TIME_PART.millisecond}|${TIME_PART.dayperiod}|literal`);
|
|
@@ -36,7 +38,8 @@ const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PA
|
|
|
36
38
|
* Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
|
|
37
39
|
*/
|
|
38
40
|
export class TimePickerComponent {
|
|
39
|
-
constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
|
|
41
|
+
constructor(bus, zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
|
|
42
|
+
this.bus = bus;
|
|
40
43
|
this.zone = zone;
|
|
41
44
|
this.localization = localization;
|
|
42
45
|
this.cdr = cdr;
|
|
@@ -47,10 +50,6 @@ export class TimePickerComponent {
|
|
|
47
50
|
this.pickerService = pickerService;
|
|
48
51
|
this.intl = intl;
|
|
49
52
|
this.touchEnabled = touchEnabled;
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
this.focusableId = `k-${guid()}`;
|
|
54
53
|
/**
|
|
55
54
|
* Sets or gets the `disabled` property of the TimePicker and
|
|
56
55
|
* determines whether the component is active
|
|
@@ -188,7 +187,6 @@ export class TimePickerComponent {
|
|
|
188
187
|
* @hidden
|
|
189
188
|
*/
|
|
190
189
|
this.wrapperClasses = true;
|
|
191
|
-
this.popupUID = guid();
|
|
192
190
|
this.onControlChange = noop;
|
|
193
191
|
this.onControlTouched = noop;
|
|
194
192
|
this.onValidatorChange = noop;
|
|
@@ -367,12 +365,10 @@ export class TimePickerComponent {
|
|
|
367
365
|
get disabledClass() {
|
|
368
366
|
return this.disabled;
|
|
369
367
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
*/
|
|
373
|
-
get inputRole() {
|
|
374
|
-
return this.readOnlyInput ? 'listbox' : 'spinbutton';
|
|
368
|
+
get popupUID() {
|
|
369
|
+
return `k-timepicker-popup-${this.bus.calendarId}-`;
|
|
375
370
|
}
|
|
371
|
+
;
|
|
376
372
|
get isActive() {
|
|
377
373
|
return this._active;
|
|
378
374
|
}
|
|
@@ -478,9 +474,11 @@ export class TimePickerComponent {
|
|
|
478
474
|
}
|
|
479
475
|
if (altKey) {
|
|
480
476
|
if (keyCode === Keys.ArrowUp) {
|
|
477
|
+
event.preventDefault();
|
|
481
478
|
this.show = false;
|
|
482
479
|
}
|
|
483
480
|
if (keyCode === Keys.ArrowDown && !this.show) {
|
|
481
|
+
event.preventDefault();
|
|
484
482
|
this.show = true;
|
|
485
483
|
}
|
|
486
484
|
}
|
|
@@ -673,6 +671,7 @@ export class TimePickerComponent {
|
|
|
673
671
|
}
|
|
674
672
|
this._show = show;
|
|
675
673
|
this.cdr.markForCheck();
|
|
674
|
+
const inputElement = this.wrapper.nativeElement.querySelector('input');
|
|
676
675
|
if (show) {
|
|
677
676
|
const direction = this.localization.rtl ? 'right' : 'left';
|
|
678
677
|
this.popupRef = this.popupService.open({
|
|
@@ -686,11 +685,13 @@ export class TimePickerComponent {
|
|
|
686
685
|
positionMode: 'absolute'
|
|
687
686
|
});
|
|
688
687
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
688
|
+
this.renderer.setAttribute(inputElement, attributeNames.ariaControls, this.popupUID);
|
|
689
689
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
690
690
|
}
|
|
691
691
|
else {
|
|
692
692
|
this.popupRef.close();
|
|
693
693
|
this.popupRef = null;
|
|
694
|
+
this.renderer.removeAttribute(inputElement, attributeNames.ariaControls);
|
|
694
695
|
}
|
|
695
696
|
}
|
|
696
697
|
focusInput() {
|
|
@@ -800,12 +801,13 @@ export class TimePickerComponent {
|
|
|
800
801
|
}
|
|
801
802
|
}
|
|
802
803
|
}
|
|
803
|
-
TimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, deps: [{ token: i0.NgZone }, { token:
|
|
804
|
-
TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TimePickerComponent, selector: "kendo-timepicker", inputs: {
|
|
804
|
+
TimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, deps: [{ token: i1.BusViewService }, { token: i0.NgZone }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i4.PickerService }, { token: i5.IntlService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
805
|
+
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: [
|
|
805
806
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
806
807
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
807
808
|
{ provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
|
|
808
809
|
LocalizationService,
|
|
810
|
+
BusViewService,
|
|
809
811
|
{
|
|
810
812
|
provide: L10N_PREFIX,
|
|
811
813
|
useValue: 'kendo.timepicker'
|
|
@@ -833,16 +835,31 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
833
835
|
|
|
834
836
|
i18n-toggle="kendo.timepicker.toggle|The label for the toggle button in the timepicker component"
|
|
835
837
|
toggle="Toggle time list"
|
|
838
|
+
|
|
839
|
+
i18n-hour="kendo.timepicker.hour|The label for the hour part in the timepicker component"
|
|
840
|
+
hour="Hour"
|
|
841
|
+
|
|
842
|
+
i18n-minute="kendo.timepicker.minute|The label for the minute part in the timepicker component"
|
|
843
|
+
minute="Minute"
|
|
844
|
+
|
|
845
|
+
i18n-second="kendo.timepicker.second|The label for the second part in the timepicker component"
|
|
846
|
+
second="Second"
|
|
847
|
+
|
|
848
|
+
i18n-millisecond="kendo.timepicker.millisecond|The label for the millisecond part in the timepicker component"
|
|
849
|
+
millisecond="Millisecond"
|
|
850
|
+
|
|
851
|
+
i18n-dayperiod="kendo.timepicker.dayperiod|The label for the dayperiod part in the timepicker component"
|
|
852
|
+
dayperiod="Dayperiod"
|
|
836
853
|
>
|
|
837
854
|
</ng-container>
|
|
838
855
|
<kendo-dateinput
|
|
839
856
|
#input
|
|
840
|
-
|
|
857
|
+
pickerType="timepicker"
|
|
841
858
|
[hasPopup]="true"
|
|
842
859
|
[isPopupOpen]="show"
|
|
843
860
|
[disabled]="disabled"
|
|
844
861
|
[readonly]="readonly || readOnlyInput"
|
|
845
|
-
[role]="
|
|
862
|
+
[role]="'combobox'"
|
|
846
863
|
[ariaReadOnly]="readonly"
|
|
847
864
|
[format]="format"
|
|
848
865
|
[formatPlaceholder]="formatPlaceholder"
|
|
@@ -862,6 +879,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
862
879
|
<button
|
|
863
880
|
#toggleButton
|
|
864
881
|
type="button"
|
|
882
|
+
tabindex="-1"
|
|
865
883
|
class="k-input-button k-button k-icon-button"
|
|
866
884
|
[attr.title]="localization.get('toggle')"
|
|
867
885
|
[attr.aria-label]="localization.get('toggle')"
|
|
@@ -898,12 +916,17 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
898
916
|
[cancel]="localization.get('cancel')"
|
|
899
917
|
[nowLabel]="localization.get('nowLabel')"
|
|
900
918
|
[now]="localization.get('now')"
|
|
919
|
+
[hour]="localization.get('hour')"
|
|
920
|
+
[minute]="localization.get('minute')"
|
|
921
|
+
[second]="localization.get('second')"
|
|
922
|
+
[millisecond]="localization.get('millisecond')"
|
|
923
|
+
[dayperiod]="localization.get('dayperiod')"
|
|
901
924
|
>
|
|
902
925
|
</kendo-timeselector-messages>
|
|
903
926
|
</kendo-timeselector>
|
|
904
927
|
</ng-template>
|
|
905
928
|
<ng-container #container></ng-container>
|
|
906
|
-
`, isInline: true, components: [{ type:
|
|
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 });
|
|
907
930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
908
931
|
type: Component,
|
|
909
932
|
args: [{
|
|
@@ -914,6 +937,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
914
937
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
915
938
|
{ provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
|
|
916
939
|
LocalizationService,
|
|
940
|
+
BusViewService,
|
|
917
941
|
{
|
|
918
942
|
provide: L10N_PREFIX,
|
|
919
943
|
useValue: 'kendo.timepicker'
|
|
@@ -943,16 +967,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
943
967
|
|
|
944
968
|
i18n-toggle="kendo.timepicker.toggle|The label for the toggle button in the timepicker component"
|
|
945
969
|
toggle="Toggle time list"
|
|
970
|
+
|
|
971
|
+
i18n-hour="kendo.timepicker.hour|The label for the hour part in the timepicker component"
|
|
972
|
+
hour="Hour"
|
|
973
|
+
|
|
974
|
+
i18n-minute="kendo.timepicker.minute|The label for the minute part in the timepicker component"
|
|
975
|
+
minute="Minute"
|
|
976
|
+
|
|
977
|
+
i18n-second="kendo.timepicker.second|The label for the second part in the timepicker component"
|
|
978
|
+
second="Second"
|
|
979
|
+
|
|
980
|
+
i18n-millisecond="kendo.timepicker.millisecond|The label for the millisecond part in the timepicker component"
|
|
981
|
+
millisecond="Millisecond"
|
|
982
|
+
|
|
983
|
+
i18n-dayperiod="kendo.timepicker.dayperiod|The label for the dayperiod part in the timepicker component"
|
|
984
|
+
dayperiod="Dayperiod"
|
|
946
985
|
>
|
|
947
986
|
</ng-container>
|
|
948
987
|
<kendo-dateinput
|
|
949
988
|
#input
|
|
950
|
-
|
|
989
|
+
pickerType="timepicker"
|
|
951
990
|
[hasPopup]="true"
|
|
952
991
|
[isPopupOpen]="show"
|
|
953
992
|
[disabled]="disabled"
|
|
954
993
|
[readonly]="readonly || readOnlyInput"
|
|
955
|
-
[role]="
|
|
994
|
+
[role]="'combobox'"
|
|
956
995
|
[ariaReadOnly]="readonly"
|
|
957
996
|
[format]="format"
|
|
958
997
|
[formatPlaceholder]="formatPlaceholder"
|
|
@@ -972,6 +1011,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
972
1011
|
<button
|
|
973
1012
|
#toggleButton
|
|
974
1013
|
type="button"
|
|
1014
|
+
tabindex="-1"
|
|
975
1015
|
class="k-input-button k-button k-icon-button"
|
|
976
1016
|
[attr.title]="localization.get('toggle')"
|
|
977
1017
|
[attr.aria-label]="localization.get('toggle')"
|
|
@@ -1008,6 +1048,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1008
1048
|
[cancel]="localization.get('cancel')"
|
|
1009
1049
|
[nowLabel]="localization.get('nowLabel')"
|
|
1010
1050
|
[now]="localization.get('now')"
|
|
1051
|
+
[hour]="localization.get('hour')"
|
|
1052
|
+
[minute]="localization.get('minute')"
|
|
1053
|
+
[second]="localization.get('second')"
|
|
1054
|
+
[millisecond]="localization.get('millisecond')"
|
|
1055
|
+
[dayperiod]="localization.get('dayperiod')"
|
|
1011
1056
|
>
|
|
1012
1057
|
</kendo-timeselector-messages>
|
|
1013
1058
|
</kendo-timeselector>
|
|
@@ -1015,7 +1060,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1015
1060
|
<ng-container #container></ng-container>
|
|
1016
1061
|
`
|
|
1017
1062
|
}]
|
|
1018
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type:
|
|
1063
|
+
}], ctorParameters: function () { return [{ type: i1.BusViewService }, { type: i0.NgZone }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i4.PickerService }, { type: i5.IntlService }, { type: undefined, decorators: [{
|
|
1019
1064
|
type: Optional
|
|
1020
1065
|
}, {
|
|
1021
1066
|
type: Inject,
|
|
@@ -1029,8 +1074,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1029
1074
|
}], toggleButton: [{
|
|
1030
1075
|
type: ViewChild,
|
|
1031
1076
|
args: ['toggleButton', { static: true }]
|
|
1032
|
-
}], focusableId: [{
|
|
1033
|
-
type: Input
|
|
1034
1077
|
}], disabled: [{
|
|
1035
1078
|
type: Input
|
|
1036
1079
|
}], readonly: [{
|
package/esm2015/util.js
CHANGED
|
@@ -341,8 +341,8 @@ export const isTabExitingCalendar = (calendarType, focusedElement, shiftKey) =>
|
|
|
341
341
|
}
|
|
342
342
|
return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
|
|
343
343
|
calendarType === 'classic' &&
|
|
344
|
-
(shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
|
|
345
|
-
(!shiftKey && focusedElement.classList.contains('k-calendar-
|
|
344
|
+
(shiftKey && focusedElement.classList.contains('k-calendar-table')) || // exited on main calendar element focused and back-tab
|
|
345
|
+
(!shiftKey && focusedElement.classList.contains('k-calendar-table')) // exited on next button focused and regular tab
|
|
346
346
|
);
|
|
347
347
|
};
|
|
348
348
|
/**
|
|
@@ -10,7 +10,8 @@ import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
|
10
10
|
import { Subject, fromEvent, interval, EMPTY, of, combineLatest, animationFrameScheduler as animationFrame } from 'rxjs';
|
|
11
11
|
import { map, scan, takeWhile } from 'rxjs/operators';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "@angular
|
|
13
|
+
import * as i1 from "@progress/kendo-angular-common";
|
|
14
|
+
import * as i2 from "@angular/common";
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
16
17
|
*/
|
|
@@ -49,10 +50,11 @@ const differenceToScroll = (scrollTop, staticOffset, maxScrollDifference) => {
|
|
|
49
50
|
* @hidden
|
|
50
51
|
*/
|
|
51
52
|
export class VirtualizationComponent {
|
|
52
|
-
constructor(scrollerFactory, container, renderer, zone) {
|
|
53
|
+
constructor(scrollerFactory, container, renderer, zone, scrollBarWidthService) {
|
|
53
54
|
this.container = container;
|
|
54
55
|
this.renderer = renderer;
|
|
55
56
|
this.zone = zone;
|
|
57
|
+
this.scrollBarWidthService = scrollBarWidthService;
|
|
56
58
|
this.direction = 'vertical';
|
|
57
59
|
this.itemHeight = 1;
|
|
58
60
|
this.itemWidth = 1;
|
|
@@ -231,7 +233,7 @@ export class VirtualizationComponent {
|
|
|
231
233
|
return indexOffset < this.containerScrollPosition ? ScrollDirection.Backward : ScrollDirection.Forward;
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
|
-
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 });
|
|
236
|
+
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: i1.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
235
237
|
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: [{
|
|
236
238
|
provide: SCROLLER_FACTORY_TOKEN,
|
|
237
239
|
useValue: DEFAULT_SCROLLER_FACTORY
|
|
@@ -242,7 +244,7 @@ VirtualizationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
242
244
|
[class.k-scrollable-horizontal-placeholder]="direction === 'horizontal'"
|
|
243
245
|
[ngStyle]="totalVertexLength"
|
|
244
246
|
></div>
|
|
245
|
-
`, isInline: true, directives: [{ type:
|
|
247
|
+
`, isInline: true, directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
246
248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VirtualizationComponent, decorators: [{
|
|
247
249
|
type: Component,
|
|
248
250
|
args: [{
|
|
@@ -263,7 +265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
263
265
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
264
266
|
type: Inject,
|
|
265
267
|
args: [SCROLLER_FACTORY_TOKEN]
|
|
266
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { direction: [{
|
|
268
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.ScrollbarWidthService }]; }, propDecorators: { direction: [{
|
|
267
269
|
type: Input
|
|
268
270
|
}], itemHeight: [{
|
|
269
271
|
type: Input
|