@progress/kendo-angular-dateinputs 5.3.1-dev.202112201533 → 6.0.0
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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +1 -1
- package/dist/es/calendar/header.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +11 -4
- package/dist/es/calendar/services/dom.service.js +1 -1
- package/dist/es/calendar/view.component.js +1 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/dateinput/dateinput.component.js +143 -18
- package/dist/es/datepicker/datepicker.component.js +130 -13
- package/dist/es/daterange/date-range-input.js +1 -1
- package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/services/dom.service.js +12 -8
- package/dist/es/timepicker/timelist.component.js +3 -2
- package/dist/es/timepicker/timepicker.component.js +130 -13
- package/dist/es/timepicker/timeselector.component.js +2 -2
- package/dist/es/util.js +37 -0
- package/dist/es2015/calendar/calendar.component.js +1 -1
- package/dist/es2015/calendar/header.component.js +4 -4
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +3 -1
- package/dist/es2015/calendar/multiview-calendar.component.js +11 -4
- package/dist/es2015/calendar/services/dom.service.js +1 -1
- package/dist/es2015/calendar/view.component.js +1 -1
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
- package/dist/es2015/dateinput/dateinput.component.js +183 -68
- package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
- package/dist/es2015/datepicker/datepicker.component.js +155 -49
- package/dist/es2015/daterange/date-range-input.js +1 -1
- package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
- package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
- package/dist/es2015/timepicker/services/dom.service.js +12 -8
- package/dist/es2015/timepicker/timelist.component.js +3 -2
- package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
- package/dist/es2015/timepicker/timepicker.component.js +174 -69
- package/dist/es2015/timepicker/timeselector.component.js +7 -5
- package/dist/es2015/util.d.ts +18 -0
- package/dist/es2015/util.js +37 -0
- package/dist/fesm2015/index.js +780 -282
- package/dist/fesm5/index.js +625 -83
- package/dist/npm/calendar/calendar.component.js +1 -1
- package/dist/npm/calendar/header.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +10 -3
- package/dist/npm/calendar/services/dom.service.js +1 -1
- package/dist/npm/calendar/view.component.js +1 -1
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/dateinput/dateinput.component.js +142 -17
- package/dist/npm/datepicker/datepicker.component.js +129 -12
- package/dist/npm/daterange/date-range-input.js +1 -1
- package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/services/dom.service.js +15 -10
- package/dist/npm/timepicker/timelist.component.js +3 -2
- package/dist/npm/timepicker/timepicker.component.js +129 -12
- package/dist/npm/timepicker/timeselector.component.js +2 -2
- package/dist/npm/util.js +37 -0
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +7 -7
package/dist/fesm2015/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
6
|
-
import { Injectable, EventEmitter, Injector, Input, TemplateRef, Output, HostBinding, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Renderer2, isDevMode, Directive, forwardRef, ContentChild, ViewChild, HostListener, NgZone, InjectionToken, Inject,
|
|
6
|
+
import { Injectable, EventEmitter, Injector, Input, TemplateRef, Output, HostBinding, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Renderer2, isDevMode, Directive, forwardRef, ContentChild, ViewChild, HostListener, Optional, NgZone, InjectionToken, Inject, ViewContainerRef, ViewChildren, QueryList, ContentChildren, IterableDiffers, NgModule } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
|
|
8
8
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { getDate, isEqual, cloneDate, addDays, 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';
|
|
@@ -23,7 +23,7 @@ const packageMetadata = {
|
|
|
23
23
|
name: '@progress/kendo-angular-dateinputs',
|
|
24
24
|
productName: 'Kendo UI for Angular',
|
|
25
25
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
26
|
-
publishDate:
|
|
26
|
+
publishDate: 1642573758,
|
|
27
27
|
version: '',
|
|
28
28
|
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'
|
|
29
29
|
};
|
|
@@ -443,6 +443,43 @@ const isTabExitingCalendar = (calendarType, focusedElement, shiftKey) => {
|
|
|
443
443
|
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
444
444
|
);
|
|
445
445
|
};
|
|
446
|
+
/**
|
|
447
|
+
* @hidden
|
|
448
|
+
* Returns the size class based on the component and size input.
|
|
449
|
+
*/
|
|
450
|
+
const getSizeClass = (component, size) => {
|
|
451
|
+
const SIZE_CLASSES = {
|
|
452
|
+
'small': `k-${component}-sm`,
|
|
453
|
+
'medium': `k-${component}-md`,
|
|
454
|
+
'large': `k-${component}-lg`
|
|
455
|
+
};
|
|
456
|
+
return SIZE_CLASSES[size];
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* @hidden
|
|
460
|
+
* Returns the rounded class based on the rounded input.
|
|
461
|
+
*/
|
|
462
|
+
const getRoundedClass = (rounded) => {
|
|
463
|
+
const ROUNDED_CLASSES = {
|
|
464
|
+
'small': 'k-rounded-sm',
|
|
465
|
+
'medium': 'k-rounded-md',
|
|
466
|
+
'large': 'k-rounded-lg',
|
|
467
|
+
'full': 'k-rounded-full'
|
|
468
|
+
};
|
|
469
|
+
return ROUNDED_CLASSES[rounded];
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* @hidden
|
|
473
|
+
* Return the fillMode class based on the component and fillMode input.
|
|
474
|
+
*/
|
|
475
|
+
const getFillModeClass = (component, fillMode) => {
|
|
476
|
+
const FILLMODE_CLASSES = {
|
|
477
|
+
'solid': `k-${component}-solid`,
|
|
478
|
+
'flat': `k-${component}-flat`,
|
|
479
|
+
'outline': `k-${component}-outline`
|
|
480
|
+
};
|
|
481
|
+
return FILLMODE_CLASSES[fillMode];
|
|
482
|
+
};
|
|
446
483
|
|
|
447
484
|
const EMPTY_DATA = [[]];
|
|
448
485
|
const CELLS_LENGTH = 4;
|
|
@@ -1845,7 +1882,7 @@ HeaderComponent = __decorate([
|
|
|
1845
1882
|
Component({
|
|
1846
1883
|
selector: 'kendo-calendar-header',
|
|
1847
1884
|
template: `
|
|
1848
|
-
<span class="k-button k-flat k-
|
|
1885
|
+
<span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title" [class.k-disabled]="!navigate"
|
|
1849
1886
|
[kendoEventsOutsideAngular]="{
|
|
1850
1887
|
click: handleNavigation
|
|
1851
1888
|
}"
|
|
@@ -1861,7 +1898,7 @@ HeaderComponent = __decorate([
|
|
|
1861
1898
|
<span class="k-calendar-nav k-hstack">
|
|
1862
1899
|
<button
|
|
1863
1900
|
*ngIf="showNavigationButtons"
|
|
1864
|
-
class="k-button k-flat k-icon-button k-prev-view"
|
|
1901
|
+
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view"
|
|
1865
1902
|
type="button"
|
|
1866
1903
|
[attr.aria-disabled]="isPrevDisabled"
|
|
1867
1904
|
[disabled]="isPrevDisabled"
|
|
@@ -1872,7 +1909,7 @@ HeaderComponent = __decorate([
|
|
|
1872
1909
|
</button>
|
|
1873
1910
|
<span
|
|
1874
1911
|
class="k-today k-nav-today"
|
|
1875
|
-
[class.k-
|
|
1912
|
+
[class.k-disabled]="!todayAvailable"
|
|
1876
1913
|
[kendoEventsOutsideAngular]="{
|
|
1877
1914
|
click: handleTodayClick
|
|
1878
1915
|
}"
|
|
@@ -1882,7 +1919,7 @@ HeaderComponent = __decorate([
|
|
|
1882
1919
|
</span>
|
|
1883
1920
|
<button
|
|
1884
1921
|
*ngIf="showNavigationButtons"
|
|
1885
|
-
class="k-button k-flat k-icon-button k-next-view"
|
|
1922
|
+
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view"
|
|
1886
1923
|
type="button"
|
|
1887
1924
|
[attr.aria-disabled]="isNextDisabled"
|
|
1888
1925
|
[disabled]="isNextDisabled"
|
|
@@ -2310,6 +2347,18 @@ const disabledDatesRangeValidator = (isDateDisabled) => {
|
|
|
2310
2347
|
};
|
|
2311
2348
|
};
|
|
2312
2349
|
|
|
2350
|
+
/**
|
|
2351
|
+
* @hidden
|
|
2352
|
+
*/
|
|
2353
|
+
class PickerService {
|
|
2354
|
+
constructor() {
|
|
2355
|
+
this.onFocus = new EventEmitter();
|
|
2356
|
+
this.onBlur = new EventEmitter();
|
|
2357
|
+
this.sameDateSelected = new EventEmitter();
|
|
2358
|
+
this.dateCompletenessChange = new EventEmitter();
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2313
2362
|
const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
2314
2363
|
const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
2315
2364
|
const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -2346,7 +2395,7 @@ const RANGE_CALENDAR_RANGE_VALIDATORS = {
|
|
|
2346
2395
|
* ```
|
|
2347
2396
|
*/
|
|
2348
2397
|
let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
2349
|
-
constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
|
|
2398
|
+
constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
|
|
2350
2399
|
this.bus = bus;
|
|
2351
2400
|
this.element = element;
|
|
2352
2401
|
this.navigator = navigator;
|
|
@@ -2355,6 +2404,7 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
2355
2404
|
this.zone = zone;
|
|
2356
2405
|
this.disabledDatesService = disabledDatesService;
|
|
2357
2406
|
this.selectionService = selectionService;
|
|
2407
|
+
this.pickerService = pickerService;
|
|
2358
2408
|
/**
|
|
2359
2409
|
* @hidden
|
|
2360
2410
|
*/
|
|
@@ -2693,6 +2743,9 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
|
|
|
2693
2743
|
return;
|
|
2694
2744
|
}
|
|
2695
2745
|
if (event.keyCode === Keys.Enter) {
|
|
2746
|
+
if (isPresent(this.pickerService)) {
|
|
2747
|
+
event.preventDefault(); // Don't submit form from Datepicker popup
|
|
2748
|
+
}
|
|
2696
2749
|
this.performSelection(this.focusedDate, event);
|
|
2697
2750
|
}
|
|
2698
2751
|
const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
|
|
@@ -3179,7 +3232,7 @@ __decorate([
|
|
|
3179
3232
|
], MultiViewCalendarComponent.prototype, "calendarTabIndex", null);
|
|
3180
3233
|
__decorate([
|
|
3181
3234
|
HostBinding('attr.aria-disabled'),
|
|
3182
|
-
HostBinding('class.k-
|
|
3235
|
+
HostBinding('class.k-disabled'),
|
|
3183
3236
|
__metadata("design:type", Boolean),
|
|
3184
3237
|
__metadata("design:paramtypes", [])
|
|
3185
3238
|
], MultiViewCalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -3305,6 +3358,7 @@ MultiViewCalendarComponent = __decorate([
|
|
|
3305
3358
|
</kendo-calendar-horizontal>
|
|
3306
3359
|
`
|
|
3307
3360
|
}),
|
|
3361
|
+
__param(8, Optional()),
|
|
3308
3362
|
__metadata("design:paramtypes", [BusViewService,
|
|
3309
3363
|
ElementRef,
|
|
3310
3364
|
NavigationService,
|
|
@@ -3312,7 +3366,8 @@ MultiViewCalendarComponent = __decorate([
|
|
|
3312
3366
|
ChangeDetectorRef,
|
|
3313
3367
|
NgZone,
|
|
3314
3368
|
DisabledDatesService,
|
|
3315
|
-
SelectionService
|
|
3369
|
+
SelectionService,
|
|
3370
|
+
PickerService])
|
|
3316
3371
|
], MultiViewCalendarComponent);
|
|
3317
3372
|
|
|
3318
3373
|
const div = domContainerFactory('div');
|
|
@@ -3325,7 +3380,7 @@ const tbody = domContainerFactory('tbody');
|
|
|
3325
3380
|
const thead = domContainerFactory('thead');
|
|
3326
3381
|
const table = domContainerFactory('table');
|
|
3327
3382
|
const monthHeader = () => (div(`
|
|
3328
|
-
<span class="k-button k-flat k-
|
|
3383
|
+
<span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title">March 2017</span>
|
|
3329
3384
|
<span class="k-spacer"></span>
|
|
3330
3385
|
<span class="k-calendar-nav k-hstack">
|
|
3331
3386
|
<span class="k-today k-nav-today">TODAY</span>
|
|
@@ -4579,18 +4634,6 @@ NavigationItemTemplateDirective = __decorate([
|
|
|
4579
4634
|
__metadata("design:paramtypes", [TemplateRef])
|
|
4580
4635
|
], NavigationItemTemplateDirective);
|
|
4581
4636
|
|
|
4582
|
-
/**
|
|
4583
|
-
* @hidden
|
|
4584
|
-
*/
|
|
4585
|
-
class PickerService {
|
|
4586
|
-
constructor() {
|
|
4587
|
-
this.onFocus = new EventEmitter();
|
|
4588
|
-
this.onBlur = new EventEmitter();
|
|
4589
|
-
this.sameDateSelected = new EventEmitter();
|
|
4590
|
-
this.dateCompletenessChange = new EventEmitter();
|
|
4591
|
-
}
|
|
4592
|
-
}
|
|
4593
|
-
|
|
4594
4637
|
const BOTTOM_VIEW_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
4595
4638
|
const TOP_VIEW_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
4596
4639
|
const MIN_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -5552,7 +5595,7 @@ __decorate([
|
|
|
5552
5595
|
], CalendarComponent.prototype, "calendarTabIndex", null);
|
|
5553
5596
|
__decorate([
|
|
5554
5597
|
HostBinding('attr.aria-disabled'),
|
|
5555
|
-
HostBinding('class.k-
|
|
5598
|
+
HostBinding('class.k-disabled'),
|
|
5556
5599
|
__metadata("design:type", Boolean),
|
|
5557
5600
|
__metadata("design:paramtypes", [])
|
|
5558
5601
|
], CalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -6131,11 +6174,11 @@ class KendoDate {
|
|
|
6131
6174
|
* Represents the [Kendo UI DateInput component for Angular]({% slug overview_dateinput %}#toc-basic-usage).
|
|
6132
6175
|
*/
|
|
6133
6176
|
let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
6134
|
-
constructor(cdr, intl, renderer,
|
|
6177
|
+
constructor(cdr, intl, renderer, wrapper, ngZone, injector, localization, pickerService) {
|
|
6135
6178
|
this.cdr = cdr;
|
|
6136
6179
|
this.intl = intl;
|
|
6137
6180
|
this.renderer = renderer;
|
|
6138
|
-
this.
|
|
6181
|
+
this.wrapper = wrapper;
|
|
6139
6182
|
this.ngZone = ngZone;
|
|
6140
6183
|
this.injector = injector;
|
|
6141
6184
|
this.localization = localization;
|
|
@@ -6337,6 +6380,9 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6337
6380
|
this.onControlChange = noop;
|
|
6338
6381
|
this.onControlTouched = noop;
|
|
6339
6382
|
this.onValidatorChange = noop;
|
|
6383
|
+
this._size = 'medium';
|
|
6384
|
+
this._rounded = 'medium';
|
|
6385
|
+
this._fillMode = 'solid';
|
|
6340
6386
|
this.symbolsMap = this.dateSymbolMap();
|
|
6341
6387
|
this.updateFormatSections();
|
|
6342
6388
|
if (this.pickerService) {
|
|
@@ -6368,6 +6414,71 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6368
6414
|
get value() {
|
|
6369
6415
|
return this._value;
|
|
6370
6416
|
}
|
|
6417
|
+
/**
|
|
6418
|
+
* Sets the size of the component.
|
|
6419
|
+
*
|
|
6420
|
+
* The possible values are:
|
|
6421
|
+
* * `'small'`
|
|
6422
|
+
* * `'medium'` (Default)
|
|
6423
|
+
* * `'large'`
|
|
6424
|
+
* * `null`
|
|
6425
|
+
*
|
|
6426
|
+
*/
|
|
6427
|
+
set size(size) {
|
|
6428
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6429
|
+
if (size) {
|
|
6430
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6431
|
+
}
|
|
6432
|
+
this._size = size;
|
|
6433
|
+
}
|
|
6434
|
+
get size() {
|
|
6435
|
+
return this._size;
|
|
6436
|
+
}
|
|
6437
|
+
/**
|
|
6438
|
+
* Sets the border radius of the component.
|
|
6439
|
+
*
|
|
6440
|
+
* The possible values are:
|
|
6441
|
+
* * `'small'`
|
|
6442
|
+
* * `'medium'` (Default)
|
|
6443
|
+
* * `'large'`
|
|
6444
|
+
* * `'full'`
|
|
6445
|
+
* * `null`
|
|
6446
|
+
*
|
|
6447
|
+
*/
|
|
6448
|
+
set rounded(rounded) {
|
|
6449
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6450
|
+
if (rounded) {
|
|
6451
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
6452
|
+
}
|
|
6453
|
+
this._rounded = rounded;
|
|
6454
|
+
}
|
|
6455
|
+
get rounded() {
|
|
6456
|
+
return this._rounded;
|
|
6457
|
+
}
|
|
6458
|
+
/**
|
|
6459
|
+
* Sets the fillMode of the component.
|
|
6460
|
+
*
|
|
6461
|
+
* The possible values are:
|
|
6462
|
+
* * `'solid'` (Default)
|
|
6463
|
+
* * `'flat'`
|
|
6464
|
+
* * `'outline'`
|
|
6465
|
+
* * `null`
|
|
6466
|
+
*
|
|
6467
|
+
*/
|
|
6468
|
+
set fillMode(fillMode) {
|
|
6469
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
6470
|
+
if (fillMode) {
|
|
6471
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
6472
|
+
if (this.spinners && this.spinup && this.spindown) {
|
|
6473
|
+
this.setSpinnerFill(this.spinup.nativeElement, fillMode, this.fillMode);
|
|
6474
|
+
this.setSpinnerFill(this.spindown.nativeElement, fillMode, this.fillMode);
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
this._fillMode = fillMode;
|
|
6478
|
+
}
|
|
6479
|
+
get fillMode() {
|
|
6480
|
+
return this._fillMode;
|
|
6481
|
+
}
|
|
6371
6482
|
get wrapperClass() {
|
|
6372
6483
|
return true;
|
|
6373
6484
|
}
|
|
@@ -6385,16 +6496,16 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6385
6496
|
}
|
|
6386
6497
|
set isActive(value) {
|
|
6387
6498
|
this._active = value;
|
|
6388
|
-
if (!this.
|
|
6499
|
+
if (!this.wrapper) {
|
|
6389
6500
|
return;
|
|
6390
6501
|
}
|
|
6391
6502
|
if (!isPresent(this.pickerService)) {
|
|
6392
|
-
const element = this.
|
|
6503
|
+
const element = this.wrapper.nativeElement;
|
|
6393
6504
|
if (value) {
|
|
6394
|
-
this.renderer.addClass(element, 'k-
|
|
6505
|
+
this.renderer.addClass(element, 'k-focus');
|
|
6395
6506
|
}
|
|
6396
6507
|
else {
|
|
6397
|
-
this.renderer.removeClass(element, 'k-
|
|
6508
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
6398
6509
|
}
|
|
6399
6510
|
}
|
|
6400
6511
|
}
|
|
@@ -6431,7 +6542,7 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6431
6542
|
* @hidden
|
|
6432
6543
|
*/
|
|
6433
6544
|
containsElement(element) {
|
|
6434
|
-
return Boolean(closest(element, node => node === this.
|
|
6545
|
+
return Boolean(closest(element, node => node === this.wrapper.nativeElement));
|
|
6435
6546
|
}
|
|
6436
6547
|
/**
|
|
6437
6548
|
* @hidden
|
|
@@ -6483,13 +6594,16 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6483
6594
|
this.updateElementValue();
|
|
6484
6595
|
this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
|
|
6485
6596
|
this.ngControl = this.injector.get(NgControl, null);
|
|
6486
|
-
if (this.
|
|
6487
|
-
this.renderer.removeAttribute(this.
|
|
6597
|
+
if (this.wrapper) {
|
|
6598
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
6488
6599
|
this.ngZone.runOutsideAngular(() => {
|
|
6489
6600
|
this.bindEvents();
|
|
6490
6601
|
});
|
|
6491
6602
|
}
|
|
6492
6603
|
}
|
|
6604
|
+
ngAfterViewInit() {
|
|
6605
|
+
this.setComponentClasses();
|
|
6606
|
+
}
|
|
6493
6607
|
/**
|
|
6494
6608
|
* @hidden
|
|
6495
6609
|
*/
|
|
@@ -6838,7 +6952,7 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6838
6952
|
}
|
|
6839
6953
|
}
|
|
6840
6954
|
bindEvents() {
|
|
6841
|
-
const element = this.
|
|
6955
|
+
const element = this.wrapper.nativeElement;
|
|
6842
6956
|
const mousewheelHandler = this.handleMouseWheel.bind(this);
|
|
6843
6957
|
this.domEvents.push(this.renderer.listen(element, 'DOMMouseScroll', mousewheelHandler), this.renderer.listen(element, 'mousewheel', mousewheelHandler), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)), this.renderer.listen(element, 'paste', this.handlePaste.bind(this)), this.renderer.listen(element, 'input', this.handleInput.bind(this)));
|
|
6844
6958
|
}
|
|
@@ -6969,6 +7083,29 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
|
|
|
6969
7083
|
this.pickerService.dateCompletenessChange.emit();
|
|
6970
7084
|
}
|
|
6971
7085
|
}
|
|
7086
|
+
setSpinnerFill(spinner, fill, oldFill) {
|
|
7087
|
+
if (oldFill) {
|
|
7088
|
+
this.renderer.removeClass(spinner, `k-button-${oldFill}`);
|
|
7089
|
+
this.renderer.removeClass(spinner, `k-button-${oldFill}-base`);
|
|
7090
|
+
}
|
|
7091
|
+
this.renderer.addClass(spinner, `k-button-${fill}`);
|
|
7092
|
+
this.renderer.addClass(spinner, `k-button-${fill}-base`);
|
|
7093
|
+
}
|
|
7094
|
+
setComponentClasses() {
|
|
7095
|
+
if (this.size) {
|
|
7096
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7097
|
+
}
|
|
7098
|
+
if (this.rounded) {
|
|
7099
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7100
|
+
}
|
|
7101
|
+
if (this.fillMode) {
|
|
7102
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7103
|
+
}
|
|
7104
|
+
if (this.spinners) {
|
|
7105
|
+
this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
|
|
7106
|
+
this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
|
|
7107
|
+
}
|
|
7108
|
+
}
|
|
6972
7109
|
};
|
|
6973
7110
|
__decorate([
|
|
6974
7111
|
Input(),
|
|
@@ -7060,6 +7197,21 @@ __decorate([
|
|
|
7060
7197
|
Input(),
|
|
7061
7198
|
__metadata("design:type", Boolean)
|
|
7062
7199
|
], DateInputComponent.prototype, "hasPopup", void 0);
|
|
7200
|
+
__decorate([
|
|
7201
|
+
Input(),
|
|
7202
|
+
__metadata("design:type", String),
|
|
7203
|
+
__metadata("design:paramtypes", [String])
|
|
7204
|
+
], DateInputComponent.prototype, "size", null);
|
|
7205
|
+
__decorate([
|
|
7206
|
+
Input(),
|
|
7207
|
+
__metadata("design:type", String),
|
|
7208
|
+
__metadata("design:paramtypes", [String])
|
|
7209
|
+
], DateInputComponent.prototype, "rounded", null);
|
|
7210
|
+
__decorate([
|
|
7211
|
+
Input(),
|
|
7212
|
+
__metadata("design:type", String),
|
|
7213
|
+
__metadata("design:paramtypes", [String])
|
|
7214
|
+
], DateInputComponent.prototype, "fillMode", null);
|
|
7063
7215
|
__decorate([
|
|
7064
7216
|
Output(),
|
|
7065
7217
|
__metadata("design:type", EventEmitter)
|
|
@@ -7081,20 +7233,24 @@ __decorate([
|
|
|
7081
7233
|
__metadata("design:type", ElementRef)
|
|
7082
7234
|
], DateInputComponent.prototype, "dateInput", void 0);
|
|
7083
7235
|
__decorate([
|
|
7084
|
-
|
|
7085
|
-
__metadata("design:type", ElementRef)
|
|
7086
|
-
], DateInputComponent.prototype, "wrap", void 0);
|
|
7087
|
-
__decorate([
|
|
7088
|
-
HostBinding('class.k-widget'),
|
|
7236
|
+
HostBinding('class.k-input'),
|
|
7089
7237
|
HostBinding('class.k-dateinput'),
|
|
7090
7238
|
__metadata("design:type", Boolean),
|
|
7091
7239
|
__metadata("design:paramtypes", [])
|
|
7092
7240
|
], DateInputComponent.prototype, "wrapperClass", null);
|
|
7093
7241
|
__decorate([
|
|
7094
|
-
HostBinding('class.k-
|
|
7242
|
+
HostBinding('class.k-disabled'),
|
|
7095
7243
|
__metadata("design:type", Boolean),
|
|
7096
7244
|
__metadata("design:paramtypes", [])
|
|
7097
7245
|
], DateInputComponent.prototype, "disabledClass", null);
|
|
7246
|
+
__decorate([
|
|
7247
|
+
ViewChild('spinup', { static: false }),
|
|
7248
|
+
__metadata("design:type", ElementRef)
|
|
7249
|
+
], DateInputComponent.prototype, "spinup", void 0);
|
|
7250
|
+
__decorate([
|
|
7251
|
+
ViewChild('spindown', { static: false }),
|
|
7252
|
+
__metadata("design:type", ElementRef)
|
|
7253
|
+
], DateInputComponent.prototype, "spindown", void 0);
|
|
7098
7254
|
DateInputComponent = DateInputComponent_1 = __decorate([
|
|
7099
7255
|
Component({
|
|
7100
7256
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -7116,57 +7272,59 @@ DateInputComponent = DateInputComponent_1 = __decorate([
|
|
|
7116
7272
|
decrement="Decrease value"
|
|
7117
7273
|
>
|
|
7118
7274
|
</ng-container>
|
|
7119
|
-
<
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
<
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7275
|
+
<input
|
|
7276
|
+
#dateInput
|
|
7277
|
+
autocomplete="off"
|
|
7278
|
+
autocorrect="off"
|
|
7279
|
+
autocapitalize="off"
|
|
7280
|
+
spellcheck="false"
|
|
7281
|
+
class="k-input-inner"
|
|
7282
|
+
[attr.role]="role"
|
|
7283
|
+
[attr.aria-readonly]="ariaReadOnly"
|
|
7284
|
+
[id]="focusableId"
|
|
7285
|
+
[title]="title"
|
|
7286
|
+
[tabindex]="tabindex"
|
|
7287
|
+
[disabled]="disabled"
|
|
7288
|
+
[readonly]="readonly"
|
|
7289
|
+
[placeholder]="placeholder"
|
|
7290
|
+
[attr.aria-expanded]="isPopupOpen"
|
|
7291
|
+
[attr.aria-haspopup]="hasPopup"
|
|
7292
|
+
[kendoEventsOutsideAngular]="{
|
|
7293
|
+
click: handleClick,
|
|
7294
|
+
focus: handleFocus,
|
|
7295
|
+
mousedown: handleMousedown,
|
|
7296
|
+
touchstart: handleMousedown,
|
|
7297
|
+
dragstart: handleDragAndDrop,
|
|
7298
|
+
drop: handleDragAndDrop,
|
|
7299
|
+
blur: handleBlur
|
|
7300
|
+
}"
|
|
7301
|
+
[scope]="this"
|
|
7302
|
+
/>
|
|
7303
|
+
<span *ngIf="spinners" class="k-input-spinner k-spin-button" (mousedown)="$event.preventDefault()">
|
|
7304
|
+
<button
|
|
7305
|
+
#spinup
|
|
7306
|
+
tabindex="-1"
|
|
7307
|
+
class="k-spinner-increase k-button k-icon-button"
|
|
7308
|
+
[class.k-active]="arrowDirection === arrow.Up"
|
|
7309
|
+
(mousedown)="arrowDirection = arrow.Up"
|
|
7310
|
+
(mouseleave)="arrowDirection = arrow.None"
|
|
7311
|
+
(click)="handleButtonClick(1)"
|
|
7312
|
+
[title]="localization.get('increment')"
|
|
7313
|
+
[attr.aria-label]="localization.get('increment')">
|
|
7314
|
+
<span class="k-button-icon k-icon k-i-arrow-n"></span>
|
|
7315
|
+
</button>
|
|
7316
|
+
<button
|
|
7317
|
+
#spindown
|
|
7318
|
+
tabindex="-1"
|
|
7319
|
+
class="k-spinner-decrease k-button k-icon-button"
|
|
7320
|
+
(click)="handleButtonClick(-1)"
|
|
7321
|
+
[class.k-active]="arrowDirection === arrow.Down"
|
|
7322
|
+
(mousedown)="arrowDirection = arrow.Down"
|
|
7323
|
+
(mouseleave)="arrowDirection = arrow.None"
|
|
7324
|
+
[title]="localization.get('decrement')"
|
|
7325
|
+
[attr.aria-label]="localization.get('decrement')">
|
|
7326
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
7327
|
+
</button>
|
|
7170
7328
|
</span>
|
|
7171
7329
|
`
|
|
7172
7330
|
}),
|
|
@@ -7236,12 +7394,12 @@ const TWO_DIGIT_YEAR_MAX$1 = 68;
|
|
|
7236
7394
|
* Represents the [Kendo UI DatePicker component for Angular]({% slug overview_datepicker %}#toc-basic-usage).
|
|
7237
7395
|
*/
|
|
7238
7396
|
let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
7239
|
-
constructor(zone, localization, cdr, popupService,
|
|
7397
|
+
constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, touchEnabled$$1) {
|
|
7240
7398
|
this.zone = zone;
|
|
7241
7399
|
this.localization = localization;
|
|
7242
7400
|
this.cdr = cdr;
|
|
7243
7401
|
this.popupService = popupService;
|
|
7244
|
-
this.
|
|
7402
|
+
this.wrapper = wrapper;
|
|
7245
7403
|
this.renderer = renderer;
|
|
7246
7404
|
this.injector = injector;
|
|
7247
7405
|
this.pickerService = pickerService;
|
|
@@ -7467,6 +7625,9 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7467
7625
|
this.incompleteValidator = noop;
|
|
7468
7626
|
this.resolvedPromise = Promise.resolve(null);
|
|
7469
7627
|
this.domEvents = [];
|
|
7628
|
+
this._size = 'medium';
|
|
7629
|
+
this._rounded = 'medium';
|
|
7630
|
+
this._fillMode = 'solid';
|
|
7470
7631
|
validatePackage(packageMetadata);
|
|
7471
7632
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
7472
7633
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -7568,6 +7729,73 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7568
7729
|
get disabledDates() {
|
|
7569
7730
|
return this._disabledDates;
|
|
7570
7731
|
}
|
|
7732
|
+
/**
|
|
7733
|
+
* Sets the size of the component.
|
|
7734
|
+
*
|
|
7735
|
+
* The possible values are:
|
|
7736
|
+
* * `'small'`
|
|
7737
|
+
* * `'medium'` (Default)
|
|
7738
|
+
* * `'large'`
|
|
7739
|
+
* * `null`
|
|
7740
|
+
*
|
|
7741
|
+
*/
|
|
7742
|
+
set size(size) {
|
|
7743
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7744
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
7745
|
+
if (size) {
|
|
7746
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
7747
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
7748
|
+
}
|
|
7749
|
+
this._size = size;
|
|
7750
|
+
}
|
|
7751
|
+
get size() {
|
|
7752
|
+
return this._size;
|
|
7753
|
+
}
|
|
7754
|
+
/**
|
|
7755
|
+
* Sets the border radius of the component.
|
|
7756
|
+
*
|
|
7757
|
+
* The possible values are:
|
|
7758
|
+
* * `'small'`
|
|
7759
|
+
* * `'medium'` (Default)
|
|
7760
|
+
* * `'large'`
|
|
7761
|
+
* * `'full'`
|
|
7762
|
+
* * `null`
|
|
7763
|
+
*
|
|
7764
|
+
*/
|
|
7765
|
+
set rounded(rounded) {
|
|
7766
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7767
|
+
if (rounded) {
|
|
7768
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
7769
|
+
}
|
|
7770
|
+
this._rounded = rounded;
|
|
7771
|
+
}
|
|
7772
|
+
get rounded() {
|
|
7773
|
+
return this._rounded;
|
|
7774
|
+
}
|
|
7775
|
+
/**
|
|
7776
|
+
* Sets the fillMode of the component.
|
|
7777
|
+
*
|
|
7778
|
+
* The possible values are:
|
|
7779
|
+
* * `'solid'` (Default)
|
|
7780
|
+
* * `'flat'`
|
|
7781
|
+
* * `'outline'`
|
|
7782
|
+
* * `null`
|
|
7783
|
+
*
|
|
7784
|
+
*/
|
|
7785
|
+
set fillMode(fillMode) {
|
|
7786
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7787
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
7788
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
7789
|
+
if (fillMode) {
|
|
7790
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
7791
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
|
|
7792
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
7793
|
+
}
|
|
7794
|
+
this._fillMode = fillMode;
|
|
7795
|
+
}
|
|
7796
|
+
get fillMode() {
|
|
7797
|
+
return this._fillMode;
|
|
7798
|
+
}
|
|
7571
7799
|
/**
|
|
7572
7800
|
* @hidden
|
|
7573
7801
|
*/
|
|
@@ -7590,10 +7818,10 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7590
7818
|
}
|
|
7591
7819
|
const element = this.wrapper.nativeElement;
|
|
7592
7820
|
if (value) {
|
|
7593
|
-
this.renderer.addClass(element, 'k-
|
|
7821
|
+
this.renderer.addClass(element, 'k-focus');
|
|
7594
7822
|
}
|
|
7595
7823
|
else {
|
|
7596
|
-
this.renderer.removeClass(element, 'k-
|
|
7824
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
7597
7825
|
}
|
|
7598
7826
|
}
|
|
7599
7827
|
get show() {
|
|
@@ -7628,13 +7856,16 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7628
7856
|
.changes
|
|
7629
7857
|
.subscribe(() => this.cdr.markForCheck());
|
|
7630
7858
|
this.control = this.injector.get(NgControl, null);
|
|
7631
|
-
if (this.
|
|
7632
|
-
this.renderer.removeAttribute(this.
|
|
7859
|
+
if (this.wrapper) {
|
|
7860
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
7633
7861
|
this.zone.runOutsideAngular(() => {
|
|
7634
7862
|
this.bindEvents();
|
|
7635
7863
|
});
|
|
7636
7864
|
}
|
|
7637
7865
|
}
|
|
7866
|
+
ngAfterViewInit() {
|
|
7867
|
+
this.setComponentClasses();
|
|
7868
|
+
}
|
|
7638
7869
|
/**
|
|
7639
7870
|
* @hidden
|
|
7640
7871
|
*/
|
|
@@ -7836,6 +8067,9 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7836
8067
|
this.show = false;
|
|
7837
8068
|
}
|
|
7838
8069
|
}
|
|
8070
|
+
if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
|
|
8071
|
+
e.preventDefault(); // Don't submit form on date selection in popup
|
|
8072
|
+
}
|
|
7839
8073
|
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
7840
8074
|
this.input.focus();
|
|
7841
8075
|
this.show = false;
|
|
@@ -7923,7 +8157,7 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7923
8157
|
}
|
|
7924
8158
|
}
|
|
7925
8159
|
bindEvents() {
|
|
7926
|
-
const element = this.
|
|
8160
|
+
const element = this.wrapper.nativeElement;
|
|
7927
8161
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
7928
8162
|
if (isWindowAvailable()) {
|
|
7929
8163
|
this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -7979,6 +8213,20 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
|
|
|
7979
8213
|
this.cdr.markForCheck();
|
|
7980
8214
|
this.zone.run(() => this.onValidatorChange());
|
|
7981
8215
|
}
|
|
8216
|
+
setComponentClasses() {
|
|
8217
|
+
if (this.size) {
|
|
8218
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
8219
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
8220
|
+
}
|
|
8221
|
+
if (this.rounded) {
|
|
8222
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
8223
|
+
}
|
|
8224
|
+
if (this.fillMode) {
|
|
8225
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
8226
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
8227
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
8228
|
+
}
|
|
8229
|
+
}
|
|
7982
8230
|
};
|
|
7983
8231
|
__decorate([
|
|
7984
8232
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
@@ -7989,9 +8237,9 @@ __decorate([
|
|
|
7989
8237
|
__metadata("design:type", TemplateRef)
|
|
7990
8238
|
], DatePickerComponent.prototype, "popupTemplate", void 0);
|
|
7991
8239
|
__decorate([
|
|
7992
|
-
ViewChild('
|
|
8240
|
+
ViewChild('toggleButton', { static: true }),
|
|
7993
8241
|
__metadata("design:type", ElementRef)
|
|
7994
|
-
], DatePickerComponent.prototype, "
|
|
8242
|
+
], DatePickerComponent.prototype, "toggleButton", void 0);
|
|
7995
8243
|
__decorate([
|
|
7996
8244
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
7997
8245
|
__metadata("design:type", CellTemplateDirective)
|
|
@@ -8176,6 +8424,21 @@ __decorate([
|
|
|
8176
8424
|
Input(),
|
|
8177
8425
|
__metadata("design:type", Boolean)
|
|
8178
8426
|
], DatePickerComponent.prototype, "weekNumber", void 0);
|
|
8427
|
+
__decorate([
|
|
8428
|
+
Input(),
|
|
8429
|
+
__metadata("design:type", String),
|
|
8430
|
+
__metadata("design:paramtypes", [String])
|
|
8431
|
+
], DatePickerComponent.prototype, "size", null);
|
|
8432
|
+
__decorate([
|
|
8433
|
+
Input(),
|
|
8434
|
+
__metadata("design:type", String),
|
|
8435
|
+
__metadata("design:paramtypes", [String])
|
|
8436
|
+
], DatePickerComponent.prototype, "rounded", null);
|
|
8437
|
+
__decorate([
|
|
8438
|
+
Input(),
|
|
8439
|
+
__metadata("design:type", String),
|
|
8440
|
+
__metadata("design:paramtypes", [String])
|
|
8441
|
+
], DatePickerComponent.prototype, "fillMode", null);
|
|
8179
8442
|
__decorate([
|
|
8180
8443
|
Output(),
|
|
8181
8444
|
__metadata("design:type", EventEmitter)
|
|
@@ -8197,12 +8460,12 @@ __decorate([
|
|
|
8197
8460
|
__metadata("design:type", EventEmitter)
|
|
8198
8461
|
], DatePickerComponent.prototype, "close", void 0);
|
|
8199
8462
|
__decorate([
|
|
8200
|
-
HostBinding('class.k-widget'),
|
|
8201
8463
|
HostBinding('class.k-datepicker'),
|
|
8464
|
+
HostBinding('class.k-input'),
|
|
8202
8465
|
__metadata("design:type", Boolean)
|
|
8203
8466
|
], DatePickerComponent.prototype, "wrapperClasses", void 0);
|
|
8204
8467
|
__decorate([
|
|
8205
|
-
HostBinding('class.k-
|
|
8468
|
+
HostBinding('class.k-disabled'),
|
|
8206
8469
|
__metadata("design:type", Boolean),
|
|
8207
8470
|
__metadata("design:paramtypes", [])
|
|
8208
8471
|
], DatePickerComponent.prototype, "disabledClass", null);
|
|
@@ -8238,44 +8501,45 @@ DatePickerComponent = DatePickerComponent_1 = __decorate([
|
|
|
8238
8501
|
nextButtonTitle="Navigate to next view"
|
|
8239
8502
|
>
|
|
8240
8503
|
</ng-container>
|
|
8241
|
-
<
|
|
8242
|
-
|
|
8243
|
-
[
|
|
8504
|
+
<kendo-dateinput
|
|
8505
|
+
#input
|
|
8506
|
+
[role]="inputRole"
|
|
8507
|
+
[focusableId]="focusableId"
|
|
8508
|
+
[hasPopup]="true"
|
|
8509
|
+
[isPopupOpen]="show"
|
|
8510
|
+
[disabled]="disabled"
|
|
8511
|
+
[readonly]="readonly || readOnlyInput"
|
|
8512
|
+
[ariaReadOnly]="readonly"
|
|
8513
|
+
[tabindex]="tabindex"
|
|
8514
|
+
[title]="title"
|
|
8515
|
+
[format]="format"
|
|
8516
|
+
[twoDigitYearMax]="twoDigitYearMax"
|
|
8517
|
+
[formatPlaceholder]="formatPlaceholder"
|
|
8518
|
+
[placeholder]="placeholder"
|
|
8519
|
+
[min]="min"
|
|
8520
|
+
[max]="max"
|
|
8521
|
+
[incompleteDateValidation]="incompleteDateValidation"
|
|
8522
|
+
[fillMode]="null"
|
|
8523
|
+
[rounded]="null"
|
|
8524
|
+
[size]="null"
|
|
8525
|
+
[value]="value"
|
|
8526
|
+
(valueChange)="handleInputChange($event)"
|
|
8527
|
+
></kendo-dateinput>
|
|
8528
|
+
<button
|
|
8529
|
+
#toggleButton
|
|
8530
|
+
type="button"
|
|
8531
|
+
class="k-input-button k-button k-icon-button"
|
|
8532
|
+
[tabindex]="-1"
|
|
8533
|
+
[attr.title]="localization.get('toggle')"
|
|
8534
|
+
[attr.aria-label]="localization.get('toggle')"
|
|
8535
|
+
[kendoEventsOutsideAngular]="{
|
|
8536
|
+
click: handleIconClick,
|
|
8537
|
+
mousedown: handleMousedown
|
|
8538
|
+
}"
|
|
8539
|
+
[scope]="this"
|
|
8244
8540
|
>
|
|
8245
|
-
<
|
|
8246
|
-
|
|
8247
|
-
[role]="inputRole"
|
|
8248
|
-
[focusableId]="focusableId"
|
|
8249
|
-
[hasPopup]="true"
|
|
8250
|
-
[isPopupOpen]="show"
|
|
8251
|
-
[disabled]="disabled"
|
|
8252
|
-
[readonly]="readonly || readOnlyInput"
|
|
8253
|
-
[ariaReadOnly]="readonly"
|
|
8254
|
-
[tabindex]="tabindex"
|
|
8255
|
-
[title]="title"
|
|
8256
|
-
[format]="format"
|
|
8257
|
-
[twoDigitYearMax]="twoDigitYearMax"
|
|
8258
|
-
[formatPlaceholder]="formatPlaceholder"
|
|
8259
|
-
[placeholder]="placeholder"
|
|
8260
|
-
[min]="min"
|
|
8261
|
-
[max]="max"
|
|
8262
|
-
[incompleteDateValidation]="incompleteDateValidation"
|
|
8263
|
-
[value]="value"
|
|
8264
|
-
(valueChange)="handleInputChange($event)"
|
|
8265
|
-
></kendo-dateinput>
|
|
8266
|
-
<span class="k-select"
|
|
8267
|
-
role="button"
|
|
8268
|
-
[attr.title]="localization.get('toggle')"
|
|
8269
|
-
[attr.aria-label]="localization.get('toggle')"
|
|
8270
|
-
[kendoEventsOutsideAngular]="{
|
|
8271
|
-
click: handleIconClick,
|
|
8272
|
-
mousedown: handleMousedown
|
|
8273
|
-
}"
|
|
8274
|
-
[scope]="this"
|
|
8275
|
-
>
|
|
8276
|
-
<span class="k-icon k-i-calendar"></span>
|
|
8277
|
-
</span>
|
|
8278
|
-
</span>
|
|
8541
|
+
<span class="k-button-icon k-icon k-i-calendar"></span>
|
|
8542
|
+
</button>
|
|
8279
8543
|
<ng-container #container></ng-container>
|
|
8280
8544
|
<ng-template #popupTemplate>
|
|
8281
8545
|
<kendo-calendar
|
|
@@ -8366,12 +8630,12 @@ const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PA
|
|
|
8366
8630
|
* Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
|
|
8367
8631
|
*/
|
|
8368
8632
|
let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
8369
|
-
constructor(zone, localization, cdr, popupService,
|
|
8633
|
+
constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled$$1) {
|
|
8370
8634
|
this.zone = zone;
|
|
8371
8635
|
this.localization = localization;
|
|
8372
8636
|
this.cdr = cdr;
|
|
8373
8637
|
this.popupService = popupService;
|
|
8374
|
-
this.
|
|
8638
|
+
this.wrapper = wrapper;
|
|
8375
8639
|
this.renderer = renderer;
|
|
8376
8640
|
this.injector = injector;
|
|
8377
8641
|
this.pickerService = pickerService;
|
|
@@ -8533,6 +8797,9 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
8533
8797
|
this._value = null;
|
|
8534
8798
|
this._active = false;
|
|
8535
8799
|
this.domEvents = [];
|
|
8800
|
+
this._size = 'medium';
|
|
8801
|
+
this._rounded = 'medium';
|
|
8802
|
+
this._fillMode = 'solid';
|
|
8536
8803
|
validatePackage(packageMetadata);
|
|
8537
8804
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
8538
8805
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -8618,6 +8885,73 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
8618
8885
|
get value() {
|
|
8619
8886
|
return this._value;
|
|
8620
8887
|
}
|
|
8888
|
+
/**
|
|
8889
|
+
* Sets the size of the component.
|
|
8890
|
+
*
|
|
8891
|
+
* The possible values are:
|
|
8892
|
+
* * `'small'`
|
|
8893
|
+
* * `'medium'` (Default)
|
|
8894
|
+
* * `'large'`
|
|
8895
|
+
* * `null`
|
|
8896
|
+
*
|
|
8897
|
+
*/
|
|
8898
|
+
set size(size) {
|
|
8899
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
8900
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
8901
|
+
if (size) {
|
|
8902
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
8903
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
8904
|
+
}
|
|
8905
|
+
this._size = size;
|
|
8906
|
+
}
|
|
8907
|
+
get size() {
|
|
8908
|
+
return this._size;
|
|
8909
|
+
}
|
|
8910
|
+
/**
|
|
8911
|
+
* Sets the border radius of the component.
|
|
8912
|
+
*
|
|
8913
|
+
* The possible values are:
|
|
8914
|
+
* * `'small'`
|
|
8915
|
+
* * `'medium'` (Default)
|
|
8916
|
+
* * `'large'`
|
|
8917
|
+
* * `'full'`
|
|
8918
|
+
* * `null`
|
|
8919
|
+
*
|
|
8920
|
+
*/
|
|
8921
|
+
set rounded(rounded) {
|
|
8922
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
8923
|
+
if (rounded) {
|
|
8924
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
8925
|
+
}
|
|
8926
|
+
this._rounded = rounded;
|
|
8927
|
+
}
|
|
8928
|
+
get rounded() {
|
|
8929
|
+
return this._rounded;
|
|
8930
|
+
}
|
|
8931
|
+
/**
|
|
8932
|
+
* Sets the fillMode of the component.
|
|
8933
|
+
*
|
|
8934
|
+
* The possible values are:
|
|
8935
|
+
* * `'solid'` (Default)
|
|
8936
|
+
* * `'flat'`
|
|
8937
|
+
* * `'outline'`
|
|
8938
|
+
* * `null`
|
|
8939
|
+
*
|
|
8940
|
+
*/
|
|
8941
|
+
set fillMode(fillMode) {
|
|
8942
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
8943
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
8944
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
8945
|
+
if (fillMode) {
|
|
8946
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
8947
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
8948
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
|
|
8949
|
+
}
|
|
8950
|
+
this._fillMode = fillMode;
|
|
8951
|
+
}
|
|
8952
|
+
get fillMode() {
|
|
8953
|
+
return this._fillMode;
|
|
8954
|
+
}
|
|
8621
8955
|
/**
|
|
8622
8956
|
* @hidden
|
|
8623
8957
|
*/
|
|
@@ -8640,10 +8974,10 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
8640
8974
|
}
|
|
8641
8975
|
const element = this.wrapper.nativeElement;
|
|
8642
8976
|
if (value) {
|
|
8643
|
-
this.renderer.addClass(element, 'k-
|
|
8977
|
+
this.renderer.addClass(element, 'k-focus');
|
|
8644
8978
|
}
|
|
8645
8979
|
else {
|
|
8646
|
-
this.renderer.removeClass(element, 'k-
|
|
8980
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
8647
8981
|
}
|
|
8648
8982
|
}
|
|
8649
8983
|
get show() {
|
|
@@ -8683,13 +9017,19 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
8683
9017
|
this.localizationChangeSubscription = this.localization
|
|
8684
9018
|
.changes.subscribe(() => this.cdr.markForCheck());
|
|
8685
9019
|
this.control = this.injector.get(NgControl, null);
|
|
8686
|
-
if (this.
|
|
8687
|
-
this.renderer.removeAttribute(this.
|
|
9020
|
+
if (this.wrapper) {
|
|
9021
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8688
9022
|
this.zone.runOutsideAngular(() => {
|
|
8689
9023
|
this.bindEvents();
|
|
8690
9024
|
});
|
|
8691
9025
|
}
|
|
8692
9026
|
}
|
|
9027
|
+
/**
|
|
9028
|
+
* @hidden
|
|
9029
|
+
*/
|
|
9030
|
+
ngAfterViewInit() {
|
|
9031
|
+
this.setComponentClasses();
|
|
9032
|
+
}
|
|
8693
9033
|
/**
|
|
8694
9034
|
* @hidden
|
|
8695
9035
|
*/
|
|
@@ -8987,7 +9327,7 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
8987
9327
|
}
|
|
8988
9328
|
}
|
|
8989
9329
|
bindEvents() {
|
|
8990
|
-
const element = this.
|
|
9330
|
+
const element = this.wrapper.nativeElement;
|
|
8991
9331
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
8992
9332
|
if (isWindowAvailable()) {
|
|
8993
9333
|
this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -9036,6 +9376,20 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
|
|
|
9036
9376
|
this.cdr.markForCheck();
|
|
9037
9377
|
this.zone.run(() => this.onValidatorChange());
|
|
9038
9378
|
}
|
|
9379
|
+
setComponentClasses() {
|
|
9380
|
+
if (this.size) {
|
|
9381
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
9382
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
9383
|
+
}
|
|
9384
|
+
if (this.rounded) {
|
|
9385
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9386
|
+
}
|
|
9387
|
+
if (this.fillMode) {
|
|
9388
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
9389
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
9390
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
9391
|
+
}
|
|
9392
|
+
}
|
|
9039
9393
|
};
|
|
9040
9394
|
__decorate([
|
|
9041
9395
|
ViewChild('container', { read: ViewContainerRef, static: false }),
|
|
@@ -9046,9 +9400,9 @@ __decorate([
|
|
|
9046
9400
|
__metadata("design:type", TemplateRef)
|
|
9047
9401
|
], TimePickerComponent.prototype, "popupTemplate", void 0);
|
|
9048
9402
|
__decorate([
|
|
9049
|
-
ViewChild('
|
|
9403
|
+
ViewChild('toggleButton', { static: true }),
|
|
9050
9404
|
__metadata("design:type", ElementRef)
|
|
9051
|
-
], TimePickerComponent.prototype, "
|
|
9405
|
+
], TimePickerComponent.prototype, "toggleButton", void 0);
|
|
9052
9406
|
__decorate([
|
|
9053
9407
|
Input(),
|
|
9054
9408
|
__metadata("design:type", String)
|
|
@@ -9131,6 +9485,21 @@ __decorate([
|
|
|
9131
9485
|
__metadata("design:type", Date),
|
|
9132
9486
|
__metadata("design:paramtypes", [Date])
|
|
9133
9487
|
], TimePickerComponent.prototype, "value", null);
|
|
9488
|
+
__decorate([
|
|
9489
|
+
Input(),
|
|
9490
|
+
__metadata("design:type", String),
|
|
9491
|
+
__metadata("design:paramtypes", [String])
|
|
9492
|
+
], TimePickerComponent.prototype, "size", null);
|
|
9493
|
+
__decorate([
|
|
9494
|
+
Input(),
|
|
9495
|
+
__metadata("design:type", String),
|
|
9496
|
+
__metadata("design:paramtypes", [String])
|
|
9497
|
+
], TimePickerComponent.prototype, "rounded", null);
|
|
9498
|
+
__decorate([
|
|
9499
|
+
Input(),
|
|
9500
|
+
__metadata("design:type", String),
|
|
9501
|
+
__metadata("design:paramtypes", [String])
|
|
9502
|
+
], TimePickerComponent.prototype, "fillMode", null);
|
|
9134
9503
|
__decorate([
|
|
9135
9504
|
Output(),
|
|
9136
9505
|
__metadata("design:type", EventEmitter)
|
|
@@ -9152,12 +9521,12 @@ __decorate([
|
|
|
9152
9521
|
__metadata("design:type", EventEmitter)
|
|
9153
9522
|
], TimePickerComponent.prototype, "close", void 0);
|
|
9154
9523
|
__decorate([
|
|
9155
|
-
HostBinding('class.k-widget'),
|
|
9156
9524
|
HostBinding('class.k-timepicker'),
|
|
9525
|
+
HostBinding('class.k-input'),
|
|
9157
9526
|
__metadata("design:type", Boolean)
|
|
9158
9527
|
], TimePickerComponent.prototype, "wrapperClasses", void 0);
|
|
9159
9528
|
__decorate([
|
|
9160
|
-
HostBinding('class.k-
|
|
9529
|
+
HostBinding('class.k-disabled'),
|
|
9161
9530
|
__metadata("design:type", Boolean),
|
|
9162
9531
|
__metadata("design:paramtypes", [])
|
|
9163
9532
|
], TimePickerComponent.prototype, "disabledClass", null);
|
|
@@ -9201,73 +9570,73 @@ TimePickerComponent = TimePickerComponent_1 = __decorate([
|
|
|
9201
9570
|
toggle="Toggle time list"
|
|
9202
9571
|
>
|
|
9203
9572
|
</ng-container>
|
|
9204
|
-
<
|
|
9205
|
-
|
|
9206
|
-
[
|
|
9573
|
+
<kendo-dateinput
|
|
9574
|
+
#input
|
|
9575
|
+
[focusableId]="focusableId"
|
|
9576
|
+
[hasPopup]="true"
|
|
9577
|
+
[isPopupOpen]="show"
|
|
9578
|
+
[disabled]="disabled"
|
|
9579
|
+
[readonly]="readonly || readOnlyInput"
|
|
9580
|
+
[role]="inputRole"
|
|
9581
|
+
[ariaReadOnly]="readonly"
|
|
9582
|
+
[format]="format"
|
|
9583
|
+
[formatPlaceholder]="formatPlaceholder"
|
|
9584
|
+
[placeholder]="placeholder"
|
|
9585
|
+
[min]="normalizeTime(min)"
|
|
9586
|
+
[max]="normalizeTime(max)"
|
|
9587
|
+
[incompleteDateValidation]="incompleteDateValidation"
|
|
9588
|
+
[fillMode]="fillMode"
|
|
9589
|
+
[rounded]="rounded"
|
|
9590
|
+
[size]="size"
|
|
9591
|
+
[steps]="steps"
|
|
9592
|
+
[tabindex]="!show ? tabindex : -1"
|
|
9593
|
+
[title]="title"
|
|
9594
|
+
[value]="value"
|
|
9595
|
+
(valueChange)="handleInputChange($event)"
|
|
9596
|
+
></kendo-dateinput>
|
|
9597
|
+
<button
|
|
9598
|
+
#toggleButton
|
|
9599
|
+
type="button"
|
|
9600
|
+
class="k-input-button k-button k-icon-button"
|
|
9601
|
+
[attr.title]="localization.get('toggle')"
|
|
9602
|
+
[attr.aria-label]="localization.get('toggle')"
|
|
9603
|
+
[kendoEventsOutsideAngular]="{
|
|
9604
|
+
click: handleIconClick,
|
|
9605
|
+
mousedown: handleMousedown
|
|
9606
|
+
}"
|
|
9607
|
+
[scope]="this"
|
|
9207
9608
|
>
|
|
9208
|
-
<
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
[
|
|
9214
|
-
[
|
|
9215
|
-
[role]="inputRole"
|
|
9216
|
-
[ariaReadOnly]="readonly"
|
|
9609
|
+
<span class="k-button-icon k-icon k-i-clock"></span>
|
|
9610
|
+
</button>
|
|
9611
|
+
<ng-template #popupTemplate>
|
|
9612
|
+
<kendo-timeselector
|
|
9613
|
+
#timeSelector
|
|
9614
|
+
[cancelButton]="cancelButton"
|
|
9615
|
+
[nowButton]="nowButton"
|
|
9217
9616
|
[format]="format"
|
|
9218
|
-
[
|
|
9219
|
-
[
|
|
9220
|
-
[min]="normalizeTime(min)"
|
|
9221
|
-
[max]="normalizeTime(max)"
|
|
9222
|
-
[incompleteDateValidation]="incompleteDateValidation"
|
|
9617
|
+
[min]="min"
|
|
9618
|
+
[max]="max"
|
|
9223
9619
|
[steps]="steps"
|
|
9224
|
-
[tabindex]="!show ? tabindex : -1"
|
|
9225
|
-
[title]="title"
|
|
9226
9620
|
[value]="value"
|
|
9227
|
-
(valueChange)="handleInputChange($event)"
|
|
9228
|
-
></kendo-dateinput>
|
|
9229
|
-
<span class="k-select"
|
|
9230
|
-
role="button"
|
|
9231
|
-
[attr.title]="localization.get('toggle')"
|
|
9232
|
-
[attr.aria-label]="localization.get('toggle')"
|
|
9233
9621
|
[kendoEventsOutsideAngular]="{
|
|
9234
|
-
|
|
9622
|
+
keydown: handleKeydown,
|
|
9235
9623
|
mousedown: handleMousedown
|
|
9236
9624
|
}"
|
|
9237
9625
|
[scope]="this"
|
|
9626
|
+
(valueChange)="handleChange($event)"
|
|
9627
|
+
(valueReject)="handleReject()"
|
|
9238
9628
|
>
|
|
9239
|
-
<
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
[
|
|
9245
|
-
[
|
|
9246
|
-
[format]="format"
|
|
9247
|
-
[min]="min"
|
|
9248
|
-
[max]="max"
|
|
9249
|
-
[steps]="steps"
|
|
9250
|
-
[value]="value"
|
|
9251
|
-
[kendoEventsOutsideAngular]="{
|
|
9252
|
-
keydown: handleKeydown,
|
|
9253
|
-
mousedown: handleMousedown
|
|
9254
|
-
}"
|
|
9255
|
-
[scope]="this"
|
|
9256
|
-
(valueChange)="handleChange($event)"
|
|
9257
|
-
(valueReject)="handleReject()"
|
|
9629
|
+
<kendo-timeselector-messages
|
|
9630
|
+
[acceptLabel]="localization.get('acceptLabel')"
|
|
9631
|
+
[accept]="localization.get('accept')"
|
|
9632
|
+
[cancelLabel]="localization.get('cancelLabel')"
|
|
9633
|
+
[cancel]="localization.get('cancel')"
|
|
9634
|
+
[nowLabel]="localization.get('nowLabel')"
|
|
9635
|
+
[now]="localization.get('now')"
|
|
9258
9636
|
>
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
[cancelLabel]="localization.get('cancelLabel')"
|
|
9263
|
-
[cancel]="localization.get('cancel')"
|
|
9264
|
-
[nowLabel]="localization.get('nowLabel')"
|
|
9265
|
-
[now]="localization.get('now')"
|
|
9266
|
-
>
|
|
9267
|
-
</kendo-timeselector-messages>
|
|
9268
|
-
</kendo-timeselector>
|
|
9269
|
-
</ng-template>
|
|
9270
|
-
</span>
|
|
9637
|
+
</kendo-timeselector-messages>
|
|
9638
|
+
</kendo-timeselector>
|
|
9639
|
+
</ng-template>
|
|
9271
9640
|
<ng-container #container></ng-container>
|
|
9272
9641
|
`
|
|
9273
9642
|
}),
|
|
@@ -9295,13 +9664,13 @@ const TWO_DIGIT_YEAR_MAX$2 = 68;
|
|
|
9295
9664
|
* Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
|
|
9296
9665
|
*/
|
|
9297
9666
|
let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerComponent {
|
|
9298
|
-
constructor(popupService, intl, cdr, pickerService, ngZone,
|
|
9667
|
+
constructor(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled$$1, localization, disabledDatesService, renderer) {
|
|
9299
9668
|
this.popupService = popupService;
|
|
9300
9669
|
this.intl = intl;
|
|
9301
9670
|
this.cdr = cdr;
|
|
9302
9671
|
this.pickerService = pickerService;
|
|
9303
9672
|
this.ngZone = ngZone;
|
|
9304
|
-
this.
|
|
9673
|
+
this.wrapper = wrapper;
|
|
9305
9674
|
this.touchEnabled = touchEnabled$$1;
|
|
9306
9675
|
this.localization = localization;
|
|
9307
9676
|
this.disabledDatesService = disabledDatesService;
|
|
@@ -9468,8 +9837,17 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9468
9837
|
this.disabledDatesValidateFn = noop;
|
|
9469
9838
|
this.incompleteValidator = noop;
|
|
9470
9839
|
this.subscriptions = new Subscription();
|
|
9840
|
+
this._size = 'medium';
|
|
9841
|
+
this._rounded = 'medium';
|
|
9842
|
+
this._fillMode = 'solid';
|
|
9471
9843
|
validatePackage(packageMetadata);
|
|
9472
9844
|
}
|
|
9845
|
+
/**
|
|
9846
|
+
* @hidden
|
|
9847
|
+
*/
|
|
9848
|
+
get disabledClass() {
|
|
9849
|
+
return this.disabled;
|
|
9850
|
+
}
|
|
9473
9851
|
/**
|
|
9474
9852
|
* @hidden
|
|
9475
9853
|
*/
|
|
@@ -9605,10 +9983,10 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9605
9983
|
}
|
|
9606
9984
|
set isActive(value) {
|
|
9607
9985
|
if (value) {
|
|
9608
|
-
this.renderer.addClass(this.wrapper.nativeElement, 'k-
|
|
9986
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
|
|
9609
9987
|
}
|
|
9610
9988
|
else {
|
|
9611
|
-
this.renderer.removeClass(this.wrapper.nativeElement, 'k-
|
|
9989
|
+
this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
|
|
9612
9990
|
}
|
|
9613
9991
|
this._isActive = value;
|
|
9614
9992
|
}
|
|
@@ -9623,6 +10001,73 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9623
10001
|
get defaultTab() {
|
|
9624
10002
|
return this._defaultTab;
|
|
9625
10003
|
}
|
|
10004
|
+
/**
|
|
10005
|
+
* Sets the size of the component.
|
|
10006
|
+
*
|
|
10007
|
+
* The possible values are:
|
|
10008
|
+
* * `'small'`
|
|
10009
|
+
* * `'medium'` (Default)
|
|
10010
|
+
* * `'large'`
|
|
10011
|
+
* * `null`
|
|
10012
|
+
*
|
|
10013
|
+
*/
|
|
10014
|
+
set size(size) {
|
|
10015
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10016
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
10017
|
+
if (size) {
|
|
10018
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10019
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
10020
|
+
}
|
|
10021
|
+
this._size = size;
|
|
10022
|
+
}
|
|
10023
|
+
get size() {
|
|
10024
|
+
return this._size;
|
|
10025
|
+
}
|
|
10026
|
+
/**
|
|
10027
|
+
* Sets the border radius of the component.
|
|
10028
|
+
*
|
|
10029
|
+
* The possible values are:
|
|
10030
|
+
* * `'small'`
|
|
10031
|
+
* * `'medium'` (Default)
|
|
10032
|
+
* * `'large'`
|
|
10033
|
+
* * `'full'`
|
|
10034
|
+
* * `null`
|
|
10035
|
+
*
|
|
10036
|
+
*/
|
|
10037
|
+
set rounded(rounded) {
|
|
10038
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10039
|
+
if (rounded) {
|
|
10040
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10041
|
+
}
|
|
10042
|
+
this._rounded = rounded;
|
|
10043
|
+
}
|
|
10044
|
+
get rounded() {
|
|
10045
|
+
return this._rounded;
|
|
10046
|
+
}
|
|
10047
|
+
/**
|
|
10048
|
+
* Sets the fillMode of the component.
|
|
10049
|
+
*
|
|
10050
|
+
* The possible values are:
|
|
10051
|
+
* * `'solid'` (Default)
|
|
10052
|
+
* * `'flat'`
|
|
10053
|
+
* * `'outline'`
|
|
10054
|
+
* * `null`
|
|
10055
|
+
*
|
|
10056
|
+
*/
|
|
10057
|
+
set fillMode(fillMode) {
|
|
10058
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10059
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
10060
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
10061
|
+
if (fillMode) {
|
|
10062
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10063
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
10064
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
|
|
10065
|
+
}
|
|
10066
|
+
this._fillMode = fillMode;
|
|
10067
|
+
}
|
|
10068
|
+
get fillMode() {
|
|
10069
|
+
return this._fillMode;
|
|
10070
|
+
}
|
|
9626
10071
|
/**
|
|
9627
10072
|
* @hidden
|
|
9628
10073
|
*/
|
|
@@ -9688,6 +10133,9 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9688
10133
|
this.subscriptions.add(this.ngZone.runOutsideAngular(() => fromEvent(window, 'blur').subscribe(this.handleCancel.bind(this))));
|
|
9689
10134
|
}
|
|
9690
10135
|
}
|
|
10136
|
+
ngAfterViewInit() {
|
|
10137
|
+
this.setComponentClasses();
|
|
10138
|
+
}
|
|
9691
10139
|
ngOnChanges(changes) {
|
|
9692
10140
|
if (isPresent(changes.min) || isPresent(changes.max)) {
|
|
9693
10141
|
this.verifyMinMaxRange();
|
|
@@ -9839,7 +10287,7 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9839
10287
|
return;
|
|
9840
10288
|
}
|
|
9841
10289
|
this.isActive = false;
|
|
9842
|
-
const isNgControlUntouched = this.
|
|
10290
|
+
const isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
|
|
9843
10291
|
const runInZone = isNgControlUntouched || hasObservers(this.onBlur) || (this.isOpen && hasObservers(this.close));
|
|
9844
10292
|
this.run(runInZone, () => {
|
|
9845
10293
|
this.onBlur.emit();
|
|
@@ -9964,6 +10412,13 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
9964
10412
|
this.input.focus();
|
|
9965
10413
|
}
|
|
9966
10414
|
}
|
|
10415
|
+
/**
|
|
10416
|
+
* @hidden
|
|
10417
|
+
*/
|
|
10418
|
+
popupButtonsClasses(type) {
|
|
10419
|
+
const buttonType = type ? type : 'base';
|
|
10420
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''} ${this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : ''}`;
|
|
10421
|
+
}
|
|
9967
10422
|
/**
|
|
9968
10423
|
* @hidden
|
|
9969
10424
|
*
|
|
@@ -10087,7 +10542,7 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
10087
10542
|
}
|
|
10088
10543
|
/**
|
|
10089
10544
|
* Indicates whether the focus target is part of this component,
|
|
10090
|
-
* that is, whether the focus target is inside the component
|
|
10545
|
+
* that is, whether the focus target is inside the component or in the popup.
|
|
10091
10546
|
*/
|
|
10092
10547
|
focusTargetInComponent(event) {
|
|
10093
10548
|
if (!isPresent(event)) {
|
|
@@ -10133,16 +10588,35 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
|
|
|
10133
10588
|
this.cdr.markForCheck();
|
|
10134
10589
|
this.ngZone.run(() => this.onValidatorChange());
|
|
10135
10590
|
}
|
|
10591
|
+
setComponentClasses() {
|
|
10592
|
+
if (this.size) {
|
|
10593
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10594
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
10595
|
+
}
|
|
10596
|
+
if (this.rounded) {
|
|
10597
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10598
|
+
}
|
|
10599
|
+
if (this.fillMode) {
|
|
10600
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10601
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
10602
|
+
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
10603
|
+
}
|
|
10604
|
+
}
|
|
10136
10605
|
};
|
|
10137
10606
|
__decorate([
|
|
10138
|
-
HostBinding('class.k-widget'),
|
|
10139
10607
|
HostBinding('class.k-datetimepicker'),
|
|
10608
|
+
HostBinding('class.k-input'),
|
|
10140
10609
|
__metadata("design:type", Boolean)
|
|
10141
10610
|
], DateTimePickerComponent.prototype, "hostClasses", void 0);
|
|
10142
10611
|
__decorate([
|
|
10143
|
-
|
|
10612
|
+
HostBinding('class.k-disabled'),
|
|
10613
|
+
__metadata("design:type", Boolean),
|
|
10614
|
+
__metadata("design:paramtypes", [])
|
|
10615
|
+
], DateTimePickerComponent.prototype, "disabledClass", null);
|
|
10616
|
+
__decorate([
|
|
10617
|
+
ViewChild('toggleButton', { static: true }),
|
|
10144
10618
|
__metadata("design:type", ElementRef)
|
|
10145
|
-
], DateTimePickerComponent.prototype, "
|
|
10619
|
+
], DateTimePickerComponent.prototype, "toggleButton", void 0);
|
|
10146
10620
|
__decorate([
|
|
10147
10621
|
Input(),
|
|
10148
10622
|
__metadata("design:type", Date),
|
|
@@ -10271,6 +10745,21 @@ __decorate([
|
|
|
10271
10745
|
__metadata("design:type", String),
|
|
10272
10746
|
__metadata("design:paramtypes", [String])
|
|
10273
10747
|
], DateTimePickerComponent.prototype, "defaultTab", null);
|
|
10748
|
+
__decorate([
|
|
10749
|
+
Input(),
|
|
10750
|
+
__metadata("design:type", String),
|
|
10751
|
+
__metadata("design:paramtypes", [String])
|
|
10752
|
+
], DateTimePickerComponent.prototype, "size", null);
|
|
10753
|
+
__decorate([
|
|
10754
|
+
Input(),
|
|
10755
|
+
__metadata("design:type", String),
|
|
10756
|
+
__metadata("design:paramtypes", [String])
|
|
10757
|
+
], DateTimePickerComponent.prototype, "rounded", null);
|
|
10758
|
+
__decorate([
|
|
10759
|
+
Input(),
|
|
10760
|
+
__metadata("design:type", String),
|
|
10761
|
+
__metadata("design:paramtypes", [String])
|
|
10762
|
+
], DateTimePickerComponent.prototype, "fillMode", null);
|
|
10274
10763
|
__decorate([
|
|
10275
10764
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
10276
10765
|
__metadata("design:type", CellTemplateDirective)
|
|
@@ -10369,56 +10858,55 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
|
|
|
10369
10858
|
>
|
|
10370
10859
|
</ng-container>
|
|
10371
10860
|
|
|
10372
|
-
<
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
[
|
|
10861
|
+
<kendo-dateinput
|
|
10862
|
+
[value]="value"
|
|
10863
|
+
[format]="format"
|
|
10864
|
+
[twoDigitYearMax]="twoDigitYearMax"
|
|
10865
|
+
[min]="min"
|
|
10866
|
+
[max]="max"
|
|
10867
|
+
[incompleteDateValidation]="incompleteDateValidation"
|
|
10868
|
+
[formatPlaceholder]="formatPlaceholder"
|
|
10869
|
+
[placeholder]="placeholder"
|
|
10870
|
+
[disabled]="disabled"
|
|
10871
|
+
[readonly]="readonly || readOnlyInput"
|
|
10872
|
+
[role]="inputRole"
|
|
10873
|
+
[ariaReadOnly]="readonly"
|
|
10874
|
+
[steps]="steps"
|
|
10875
|
+
[tabindex]="tabindex"
|
|
10876
|
+
[title]="title"
|
|
10877
|
+
[focusableId]="focusableId"
|
|
10878
|
+
[hasPopup]="true"
|
|
10879
|
+
[isPopupOpen]="isOpen"
|
|
10880
|
+
(valueChange)="handleInputValueChange($event)"
|
|
10881
|
+
[kendoEventsOutsideAngular]="{
|
|
10882
|
+
keydown: handleKeyDown
|
|
10883
|
+
}"
|
|
10884
|
+
[scope]="this"
|
|
10885
|
+
[fillMode]="fillMode"
|
|
10886
|
+
[rounded]="rounded"
|
|
10887
|
+
[size]="size"
|
|
10376
10888
|
>
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
[
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
[isPopupOpen]="isOpen"
|
|
10396
|
-
(valueChange)="handleInputValueChange($event)"
|
|
10397
|
-
[kendoEventsOutsideAngular]="{
|
|
10398
|
-
keydown: handleKeyDown
|
|
10399
|
-
}"
|
|
10400
|
-
[scope]="this"
|
|
10401
|
-
>
|
|
10402
|
-
</kendo-dateinput>
|
|
10403
|
-
<span class="k-select"
|
|
10404
|
-
[attr.title]="localization.get('toggle')"
|
|
10405
|
-
[attr.aria-label]="localization.get('toggle')"
|
|
10406
|
-
[kendoEventsOutsideAngular]="{
|
|
10407
|
-
mousedown: preventMouseDown,
|
|
10408
|
-
click: handleIconClick
|
|
10889
|
+
</kendo-dateinput>
|
|
10890
|
+
<button
|
|
10891
|
+
#toggleButton
|
|
10892
|
+
type="button"
|
|
10893
|
+
class="k-input-button k-button k-icon-button"
|
|
10894
|
+
[tabindex]="-1"
|
|
10895
|
+
[attr.title]="localization.get('toggle')"
|
|
10896
|
+
[attr.aria-label]="localization.get('toggle')"
|
|
10897
|
+
[kendoEventsOutsideAngular]="{
|
|
10898
|
+
mousedown: preventMouseDown,
|
|
10899
|
+
click: handleIconClick
|
|
10900
|
+
}"
|
|
10901
|
+
[scope]="this"
|
|
10902
|
+
>
|
|
10903
|
+
<span class="k-button-icon k-icon"
|
|
10904
|
+
[ngClass]="{
|
|
10905
|
+
'k-i-calendar': activeTab === 'date',
|
|
10906
|
+
'k-i-clock': activeTab === 'time'
|
|
10409
10907
|
}"
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
<span class="k-link k-link-date">
|
|
10413
|
-
<span
|
|
10414
|
-
class="k-icon"
|
|
10415
|
-
[class.k-i-calendar]="activeTab === 'date'"
|
|
10416
|
-
[class.k-i-clock]="activeTab === 'time'"
|
|
10417
|
-
>
|
|
10418
|
-
</span>
|
|
10419
|
-
</span>
|
|
10420
|
-
</span>
|
|
10421
|
-
</span>
|
|
10908
|
+
></span>
|
|
10909
|
+
</button>
|
|
10422
10910
|
|
|
10423
10911
|
<ng-container #container></ng-container>
|
|
10424
10912
|
|
|
@@ -10441,8 +10929,9 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
|
|
|
10441
10929
|
<div class="k-button-group k-button-group-stretched">
|
|
10442
10930
|
<button
|
|
10443
10931
|
type="button"
|
|
10444
|
-
class="k-button k-date-tab"
|
|
10445
|
-
[
|
|
10932
|
+
class="k-button k-group-start k-date-tab"
|
|
10933
|
+
[ngClass]="popupButtonsClasses()"
|
|
10934
|
+
[class.k-active]="activeTab === 'date'"
|
|
10446
10935
|
[attr.title]="localization.get('dateTabLabel')"
|
|
10447
10936
|
[attr.aria-label]="localization.get('dateTabLabel')"
|
|
10448
10937
|
[kendoEventsOutsideAngular]="{
|
|
@@ -10455,8 +10944,9 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
|
|
|
10455
10944
|
</button>
|
|
10456
10945
|
<button
|
|
10457
10946
|
type="button"
|
|
10458
|
-
class="k-button k-time-tab"
|
|
10459
|
-
[
|
|
10947
|
+
class="k-button k-group-end k-time-tab"
|
|
10948
|
+
[ngClass]="popupButtonsClasses()"
|
|
10949
|
+
[class.k-active]="activeTab === 'time'"
|
|
10460
10950
|
[attr.title]="localization.get('timeTabLabel')"
|
|
10461
10951
|
[attr.aria-label]="localization.get('timeTabLabel')"
|
|
10462
10952
|
[kendoEventsOutsideAngular]="{
|
|
@@ -10536,6 +11026,7 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
|
|
|
10536
11026
|
*ngIf="cancelButton"
|
|
10537
11027
|
type="button"
|
|
10538
11028
|
class="k-button k-time-cancel"
|
|
11029
|
+
[ngClass]="popupButtonsClasses()"
|
|
10539
11030
|
[attr.title]="localization.get('cancelLabel')"
|
|
10540
11031
|
[attr.aria-label]="localization.get('cancelLabel')"
|
|
10541
11032
|
[kendoEventsOutsideAngular]="{
|
|
@@ -10547,7 +11038,8 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
|
|
|
10547
11038
|
</button>
|
|
10548
11039
|
<button
|
|
10549
11040
|
type="button"
|
|
10550
|
-
class="k-
|
|
11041
|
+
class="k-button k-time-accept"
|
|
11042
|
+
[ngClass]="popupButtonsClasses('primary')"
|
|
10551
11043
|
[attr.title]="localization.get('acceptLabel')"
|
|
10552
11044
|
[attr.aria-label]="localization.get('acceptLabel')"
|
|
10553
11045
|
[disabled]="!calendarValue"
|
|
@@ -11290,7 +11782,7 @@ class DateRangeInput {
|
|
|
11290
11782
|
const action = show ? 'addClass' : 'removeClass';
|
|
11291
11783
|
const nativeElement = this.element.nativeElement;
|
|
11292
11784
|
if (nativeElement && nativeElement.querySelector) {
|
|
11293
|
-
this.renderer[action](nativeElement
|
|
11785
|
+
this.renderer[action](nativeElement, 'k-focus');
|
|
11294
11786
|
}
|
|
11295
11787
|
}
|
|
11296
11788
|
}
|
|
@@ -11866,7 +12358,7 @@ let ViewComponent = class ViewComponent {
|
|
|
11866
12358
|
'k-state-selected': !context.isOtherMonth && (context.isSelected || isRangeStart || isRangeEnd),
|
|
11867
12359
|
'k-today': !context.isOtherMonth && context.isToday,
|
|
11868
12360
|
'k-weekend': context.isWeekend,
|
|
11869
|
-
'k-
|
|
12361
|
+
'k-disabled': context.isDisabled,
|
|
11870
12362
|
'k-other-month': context.isOtherMonth
|
|
11871
12363
|
});
|
|
11872
12364
|
}
|
|
@@ -12788,14 +13280,16 @@ DateRangeModule = __decorate([
|
|
|
12788
13280
|
const div$1 = domContainerFactory('div');
|
|
12789
13281
|
const ul$1 = domContainerFactory('ul');
|
|
12790
13282
|
const li$1 = domContainerFactory('li');
|
|
13283
|
+
const span = domContainerFactory('span');
|
|
13284
|
+
const listTitle = () => span('hour', 'k-title k-timeselector-title');
|
|
12791
13285
|
const listItem = () => li$1('<span>02</span>', 'k-item');
|
|
12792
13286
|
const list = () => ul$1([listItem()], 'k-reset');
|
|
12793
|
-
const scrollable$1 = () => (div$1([list()], 'k-time-container k-content k-scrollable'));
|
|
13287
|
+
const scrollable$1 = () => (div$1([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable'));
|
|
12794
13288
|
const timeListWrapper = () => {
|
|
12795
13289
|
if (!isDocumentAvailable()) {
|
|
12796
13290
|
return null;
|
|
12797
13291
|
}
|
|
12798
|
-
return div$1([div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
13292
|
+
return div$1([listTitle(), div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
12799
13293
|
};
|
|
12800
13294
|
const TIMELIST_WRAPPER = timeListWrapper();
|
|
12801
13295
|
/**
|
|
@@ -12815,7 +13309,8 @@ let TimePickerDOMService = class TimePickerDOMService {
|
|
|
12815
13309
|
const listContainer = container && container.querySelector('.k-time-list-container');
|
|
12816
13310
|
const hostContainer = listContainer || document.body;
|
|
12817
13311
|
const wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
|
|
12818
|
-
this.
|
|
13312
|
+
this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
|
|
13313
|
+
this.timeListHeight = wrapper.getBoundingClientRect().height;
|
|
12819
13314
|
this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
|
|
12820
13315
|
hostContainer.removeChild(wrapper);
|
|
12821
13316
|
}
|
|
@@ -13455,8 +13950,9 @@ let TimeListComponent = class TimeListComponent {
|
|
|
13455
13950
|
this.dom.ensureHeights();
|
|
13456
13951
|
this.itemHeight = this.dom.itemHeight;
|
|
13457
13952
|
this.listHeight = this.dom.timeListHeight;
|
|
13458
|
-
|
|
13459
|
-
this.
|
|
13953
|
+
const titleHeight = this.dom.timeListTitleHeight;
|
|
13954
|
+
this.topOffset = (this.listHeight - this.itemHeight - titleHeight) / 2;
|
|
13955
|
+
this.bottomOffset = this.listHeight - this.itemHeight - titleHeight;
|
|
13460
13956
|
this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
|
|
13461
13957
|
this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
|
|
13462
13958
|
const translate = `translateY(${this.topOffset}px)`;
|
|
@@ -13678,12 +14174,12 @@ TimeListComponent = __decorate([
|
|
|
13678
14174
|
const isEqualTillMinute = (value, min) => value.getHours() === min.getHours() && value.getMinutes() === min.getMinutes();
|
|
13679
14175
|
const isEqualTillSecond = (value, min) => isEqualTillMinute(value, min) && value.getSeconds() === min.getSeconds();
|
|
13680
14176
|
const isEqualTillMillisecond = (value, min) => isEqualTillSecond(value, min) && value.getMilliseconds() === min.getMilliseconds();
|
|
13681
|
-
const ɵ3$7 = (value) => value.getHours(), ɵ4$
|
|
14177
|
+
const ɵ3$7 = (value) => value.getHours(), ɵ4$3 = (_, min) => min.getHours(), ɵ5$1 = (value) => value.getMinutes(), ɵ6$1 = (value, min) => isEqualTillMinute(value, min) ? min.getMinutes() : 0, ɵ7$1 = (value) => value.getSeconds(), ɵ8$1 = (value, min) => isEqualTillSecond(value, min) ? min.getSeconds() : 0, ɵ9$1 = (value) => value.getMilliseconds(), ɵ10$1 = (value, min) => isEqualTillMillisecond(value, min) ? min.getMilliseconds() : 0;
|
|
13682
14178
|
const defaultGetters = [
|
|
13683
14179
|
{
|
|
13684
14180
|
type: TIME_PART.hour,
|
|
13685
14181
|
getter: ɵ3$7,
|
|
13686
|
-
minGetter: ɵ4$
|
|
14182
|
+
minGetter: ɵ4$3
|
|
13687
14183
|
}, {
|
|
13688
14184
|
type: TIME_PART.minute,
|
|
13689
14185
|
getter: ɵ5$1,
|
|
@@ -14117,7 +14613,7 @@ __decorate([
|
|
|
14117
14613
|
__metadata("design:type", Boolean)
|
|
14118
14614
|
], TimeSelectorComponent.prototype, "componentClass", void 0);
|
|
14119
14615
|
__decorate([
|
|
14120
|
-
HostBinding('class.k-
|
|
14616
|
+
HostBinding('class.k-disabled'),
|
|
14121
14617
|
__metadata("design:type", Boolean),
|
|
14122
14618
|
__metadata("design:paramtypes", [])
|
|
14123
14619
|
], TimeSelectorComponent.prototype, "disabledClass", null);
|
|
@@ -14206,7 +14702,8 @@ TimeSelectorComponent = __decorate([
|
|
|
14206
14702
|
<button
|
|
14207
14703
|
#now
|
|
14208
14704
|
*ngIf="showNowButton"
|
|
14209
|
-
|
|
14705
|
+
type="button"
|
|
14706
|
+
class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-time-now"
|
|
14210
14707
|
[attr.title]="localization.get('nowLabel')"
|
|
14211
14708
|
[attr.aria-label]="localization.get('nowLabel')"
|
|
14212
14709
|
[kendoEventsOutsideAngular]="{
|
|
@@ -14248,11 +14745,12 @@ TimeSelectorComponent = __decorate([
|
|
|
14248
14745
|
</div>
|
|
14249
14746
|
</ng-template>
|
|
14250
14747
|
</div>
|
|
14251
|
-
<div class="k-time-footer k-action-buttons" *ngIf="setButton || cancelButton">
|
|
14748
|
+
<div class="k-time-footer k-action-buttons k-actions k-hstack k-justify-content-stretch" *ngIf="setButton || cancelButton">
|
|
14252
14749
|
<button
|
|
14253
14750
|
#cancel
|
|
14254
14751
|
*ngIf="cancelButton"
|
|
14255
|
-
class="k-button k-time-cancel
|
|
14752
|
+
class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
14753
|
+
type="button"
|
|
14256
14754
|
[attr.title]="localization.get('cancelLabel')"
|
|
14257
14755
|
[attr.aria-label]="localization.get('cancelLabel')"
|
|
14258
14756
|
[kendoEventsOutsideAngular]="{
|
|
@@ -14267,7 +14765,7 @@ TimeSelectorComponent = __decorate([
|
|
|
14267
14765
|
#accept
|
|
14268
14766
|
*ngIf="setButton"
|
|
14269
14767
|
type="button"
|
|
14270
|
-
class="k-time-accept k-button k-primary"
|
|
14768
|
+
class="k-button k-time-accept k-button-md k-rounded-md k-button-solid k-button-solid-primary"
|
|
14271
14769
|
[attr.title]="localization.get('acceptLabel')"
|
|
14272
14770
|
[attr.aria-label]="localization.get('acceptLabel')"
|
|
14273
14771
|
[kendoEventsOutsideAngular]="{
|