@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
|
@@ -1092,7 +1092,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
1092
1092
|
], CalendarComponent.prototype, "calendarTabIndex", null);
|
|
1093
1093
|
tslib_1.__decorate([
|
|
1094
1094
|
HostBinding('attr.aria-disabled'),
|
|
1095
|
-
HostBinding('class.k-
|
|
1095
|
+
HostBinding('class.k-disabled'),
|
|
1096
1096
|
tslib_1.__metadata("design:type", Boolean),
|
|
1097
1097
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1098
1098
|
], CalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -157,7 +157,7 @@ var HeaderComponent = /** @class */ (function () {
|
|
|
157
157
|
HeaderComponent = tslib_1.__decorate([
|
|
158
158
|
Component({
|
|
159
159
|
selector: 'kendo-calendar-header',
|
|
160
|
-
template: "\n <span class=\"k-button k-flat k-
|
|
160
|
+
template: "\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\" [class.k-disabled]=\"!navigate\"\n [kendoEventsOutsideAngular]=\"{\n click: handleNavigation\n }\"\n [scope]=\"this\">\n <ng-template [ngIf]=\"!templateRef\">{{title}}</ng-template>\n <ng-template\n [ngIf]=\"templateRef\"\n [ngTemplateOutlet]=\"templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: title, activeView: activeViewValue, date: currentDate }\"\n ></ng-template>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isPrevDisabled\"\n [disabled]=\"isPrevDisabled\"\n [title]=\"prevButtonTitle\"\n (click)=\"prevButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-left\"></span>\n </button>\n <span\n class=\"k-today k-nav-today\"\n [class.k-disabled]=\"!todayAvailable\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTodayClick\n }\"\n [scope]=\"this\"\n >\n {{ todayMessage }}\n </span>\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isNextDisabled\"\n [disabled]=\"isNextDisabled\"\n [title]=\"nextButtonTitle\"\n (click)=\"nextButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-right\"></span>\n </button>\n </span>\n "
|
|
161
161
|
}),
|
|
162
162
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
163
163
|
ChangeDetectorRef,
|
|
@@ -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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
|
|
6
|
+
import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone, Optional } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
8
8
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
@@ -30,6 +30,7 @@ import { MIN_DATE, MAX_DATE } from '../defaults';
|
|
|
30
30
|
import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
|
|
31
31
|
import { Subscription } from 'rxjs';
|
|
32
32
|
import { isPresent } from '../common/utils';
|
|
33
|
+
import { PickerService } from '../common/picker.service';
|
|
33
34
|
var BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
34
35
|
var TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
35
36
|
var MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -66,7 +67,7 @@ export var RANGE_CALENDAR_RANGE_VALIDATORS = {
|
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
var MultiViewCalendarComponent = /** @class */ (function () {
|
|
69
|
-
function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
|
|
70
|
+
function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
|
|
70
71
|
this.bus = bus;
|
|
71
72
|
this.element = element;
|
|
72
73
|
this.navigator = navigator;
|
|
@@ -75,6 +76,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
75
76
|
this.zone = zone;
|
|
76
77
|
this.disabledDatesService = disabledDatesService;
|
|
77
78
|
this.selectionService = selectionService;
|
|
79
|
+
this.pickerService = pickerService;
|
|
78
80
|
/**
|
|
79
81
|
* @hidden
|
|
80
82
|
*/
|
|
@@ -497,6 +499,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
497
499
|
return;
|
|
498
500
|
}
|
|
499
501
|
if (event.keyCode === Keys.Enter) {
|
|
502
|
+
if (isPresent(this.pickerService)) {
|
|
503
|
+
event.preventDefault(); // Don't submit form from Datepicker popup
|
|
504
|
+
}
|
|
500
505
|
this.performSelection(this.focusedDate, event);
|
|
501
506
|
}
|
|
502
507
|
var candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
|
|
@@ -988,7 +993,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
988
993
|
], MultiViewCalendarComponent.prototype, "calendarTabIndex", null);
|
|
989
994
|
tslib_1.__decorate([
|
|
990
995
|
HostBinding('attr.aria-disabled'),
|
|
991
|
-
HostBinding('class.k-
|
|
996
|
+
HostBinding('class.k-disabled'),
|
|
992
997
|
tslib_1.__metadata("design:type", Boolean),
|
|
993
998
|
tslib_1.__metadata("design:paramtypes", [])
|
|
994
999
|
], MultiViewCalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -1059,6 +1064,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1059
1064
|
selector: 'kendo-multiviewcalendar',
|
|
1060
1065
|
template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleHeaderFocus\n }\"\n [scope]=\"this\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || (isHovered && !isHeaderActive)\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
|
|
1061
1066
|
}),
|
|
1067
|
+
tslib_1.__param(8, Optional()),
|
|
1062
1068
|
tslib_1.__metadata("design:paramtypes", [BusViewService,
|
|
1063
1069
|
ElementRef,
|
|
1064
1070
|
NavigationService,
|
|
@@ -1066,7 +1072,8 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1066
1072
|
ChangeDetectorRef,
|
|
1067
1073
|
NgZone,
|
|
1068
1074
|
DisabledDatesService,
|
|
1069
|
-
SelectionService
|
|
1075
|
+
SelectionService,
|
|
1076
|
+
PickerService])
|
|
1070
1077
|
], MultiViewCalendarComponent);
|
|
1071
1078
|
return MultiViewCalendarComponent;
|
|
1072
1079
|
}());
|
|
@@ -17,7 +17,7 @@ var tr = containerFactory('tr');
|
|
|
17
17
|
var tbody = containerFactory('tbody');
|
|
18
18
|
var thead = containerFactory('thead');
|
|
19
19
|
var table = containerFactory('table');
|
|
20
|
-
var monthHeader = function () { return (div("\n <span class=\"k-button k-flat k-
|
|
20
|
+
var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\">March 2017</span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <span class=\"k-today k-nav-today\">TODAY</span>\n </span>\n ", 'k-calendar-header k-hstack')); };
|
|
21
21
|
var ɵ0 = monthHeader;
|
|
22
22
|
var monthWeekHeader = function () { return (table([
|
|
23
23
|
thead([
|
|
@@ -122,7 +122,7 @@ var ViewComponent = /** @class */ (function () {
|
|
|
122
122
|
'k-state-selected': !context.isOtherMonth && (context.isSelected || isRangeStart || isRangeEnd),
|
|
123
123
|
'k-today': !context.isOtherMonth && context.isToday,
|
|
124
124
|
'k-weekend': context.isWeekend,
|
|
125
|
-
'k-
|
|
125
|
+
'k-disabled': context.isDisabled,
|
|
126
126
|
'k-other-month': context.isOtherMonth
|
|
127
127
|
});
|
|
128
128
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
@@ -16,7 +16,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
16
16
|
import { addMonths, cloneDate, createDate, getDate, isEqual, lastDayOfMonth } from '@progress/kendo-date-math';
|
|
17
17
|
import { isDocumentAvailable, hasObservers, KendoInput, Keys, guid } from '@progress/kendo-angular-common';
|
|
18
18
|
import { Arrow } from './arrow.enum';
|
|
19
|
-
import { approximateStringMatching, noop, isInRange, dateInRange, isValidRange, setTime, cropTwoDigitYear, setYears, msPaddingFromFormat, millisecondDigitsInFormat, millisecondStepFor } from '../util';
|
|
19
|
+
import { approximateStringMatching, noop, isInRange, dateInRange, isValidRange, setTime, cropTwoDigitYear, setYears, msPaddingFromFormat, millisecondDigitsInFormat, millisecondStepFor, getSizeClass, getRoundedClass, getFillModeClass } from '../util';
|
|
20
20
|
import { PickerService } from '../common/picker.service';
|
|
21
21
|
import { closest } from '../common/dom-queries';
|
|
22
22
|
import { requiresZoneOnBlur, isPresent } from '../common/utils';
|
|
@@ -453,11 +453,11 @@ var KendoDate = /** @class */ (function () {
|
|
|
453
453
|
* Represents the [Kendo UI DateInput component for Angular]({% slug overview_dateinput %}#toc-basic-usage).
|
|
454
454
|
*/
|
|
455
455
|
var DateInputComponent = /** @class */ (function () {
|
|
456
|
-
function DateInputComponent(cdr, intl, renderer,
|
|
456
|
+
function DateInputComponent(cdr, intl, renderer, wrapper, ngZone, injector, localization, pickerService) {
|
|
457
457
|
this.cdr = cdr;
|
|
458
458
|
this.intl = intl;
|
|
459
459
|
this.renderer = renderer;
|
|
460
|
-
this.
|
|
460
|
+
this.wrapper = wrapper;
|
|
461
461
|
this.ngZone = ngZone;
|
|
462
462
|
this.injector = injector;
|
|
463
463
|
this.localization = localization;
|
|
@@ -659,6 +659,9 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
659
659
|
this.onControlChange = noop;
|
|
660
660
|
this.onControlTouched = noop;
|
|
661
661
|
this.onValidatorChange = noop;
|
|
662
|
+
this._size = 'medium';
|
|
663
|
+
this._rounded = 'medium';
|
|
664
|
+
this._fillMode = 'solid';
|
|
662
665
|
this.symbolsMap = this.dateSymbolMap();
|
|
663
666
|
this.updateFormatSections();
|
|
664
667
|
if (this.pickerService) {
|
|
@@ -699,6 +702,83 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
699
702
|
enumerable: true,
|
|
700
703
|
configurable: true
|
|
701
704
|
});
|
|
705
|
+
Object.defineProperty(DateInputComponent.prototype, "size", {
|
|
706
|
+
get: function () {
|
|
707
|
+
return this._size;
|
|
708
|
+
},
|
|
709
|
+
/**
|
|
710
|
+
* Sets the size of the component.
|
|
711
|
+
*
|
|
712
|
+
* The possible values are:
|
|
713
|
+
* * `'small'`
|
|
714
|
+
* * `'medium'` (Default)
|
|
715
|
+
* * `'large'`
|
|
716
|
+
* * `null`
|
|
717
|
+
*
|
|
718
|
+
*/
|
|
719
|
+
set: function (size) {
|
|
720
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
721
|
+
if (size) {
|
|
722
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
723
|
+
}
|
|
724
|
+
this._size = size;
|
|
725
|
+
},
|
|
726
|
+
enumerable: true,
|
|
727
|
+
configurable: true
|
|
728
|
+
});
|
|
729
|
+
Object.defineProperty(DateInputComponent.prototype, "rounded", {
|
|
730
|
+
get: function () {
|
|
731
|
+
return this._rounded;
|
|
732
|
+
},
|
|
733
|
+
/**
|
|
734
|
+
* Sets the border radius of the component.
|
|
735
|
+
*
|
|
736
|
+
* The possible values are:
|
|
737
|
+
* * `'small'`
|
|
738
|
+
* * `'medium'` (Default)
|
|
739
|
+
* * `'large'`
|
|
740
|
+
* * `'full'`
|
|
741
|
+
* * `null`
|
|
742
|
+
*
|
|
743
|
+
*/
|
|
744
|
+
set: function (rounded) {
|
|
745
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
746
|
+
if (rounded) {
|
|
747
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
748
|
+
}
|
|
749
|
+
this._rounded = rounded;
|
|
750
|
+
},
|
|
751
|
+
enumerable: true,
|
|
752
|
+
configurable: true
|
|
753
|
+
});
|
|
754
|
+
Object.defineProperty(DateInputComponent.prototype, "fillMode", {
|
|
755
|
+
get: function () {
|
|
756
|
+
return this._fillMode;
|
|
757
|
+
},
|
|
758
|
+
/**
|
|
759
|
+
* Sets the fillMode of the component.
|
|
760
|
+
*
|
|
761
|
+
* The possible values are:
|
|
762
|
+
* * `'solid'` (Default)
|
|
763
|
+
* * `'flat'`
|
|
764
|
+
* * `'outline'`
|
|
765
|
+
* * `null`
|
|
766
|
+
*
|
|
767
|
+
*/
|
|
768
|
+
set: function (fillMode) {
|
|
769
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
770
|
+
if (fillMode) {
|
|
771
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
772
|
+
if (this.spinners && this.spinup && this.spindown) {
|
|
773
|
+
this.setSpinnerFill(this.spinup.nativeElement, fillMode, this.fillMode);
|
|
774
|
+
this.setSpinnerFill(this.spindown.nativeElement, fillMode, this.fillMode);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
this._fillMode = fillMode;
|
|
778
|
+
},
|
|
779
|
+
enumerable: true,
|
|
780
|
+
configurable: true
|
|
781
|
+
});
|
|
702
782
|
Object.defineProperty(DateInputComponent.prototype, "wrapperClass", {
|
|
703
783
|
get: function () {
|
|
704
784
|
return true;
|
|
@@ -733,16 +813,16 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
733
813
|
},
|
|
734
814
|
set: function (value) {
|
|
735
815
|
this._active = value;
|
|
736
|
-
if (!this.
|
|
816
|
+
if (!this.wrapper) {
|
|
737
817
|
return;
|
|
738
818
|
}
|
|
739
819
|
if (!isPresent(this.pickerService)) {
|
|
740
|
-
var element = this.
|
|
820
|
+
var element = this.wrapper.nativeElement;
|
|
741
821
|
if (value) {
|
|
742
|
-
this.renderer.addClass(element, 'k-
|
|
822
|
+
this.renderer.addClass(element, 'k-focus');
|
|
743
823
|
}
|
|
744
824
|
else {
|
|
745
|
-
this.renderer.removeClass(element, 'k-
|
|
825
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
746
826
|
}
|
|
747
827
|
}
|
|
748
828
|
},
|
|
@@ -791,7 +871,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
791
871
|
*/
|
|
792
872
|
DateInputComponent.prototype.containsElement = function (element) {
|
|
793
873
|
var _this = this;
|
|
794
|
-
return Boolean(closest(element, function (node) { return node === _this.
|
|
874
|
+
return Boolean(closest(element, function (node) { return node === _this.wrapper.nativeElement; }));
|
|
795
875
|
};
|
|
796
876
|
/**
|
|
797
877
|
* @hidden
|
|
@@ -844,13 +924,16 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
844
924
|
this.updateElementValue();
|
|
845
925
|
this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
|
|
846
926
|
this.ngControl = this.injector.get(NgControl, null);
|
|
847
|
-
if (this.
|
|
848
|
-
this.renderer.removeAttribute(this.
|
|
927
|
+
if (this.wrapper) {
|
|
928
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
849
929
|
this.ngZone.runOutsideAngular(function () {
|
|
850
930
|
_this.bindEvents();
|
|
851
931
|
});
|
|
852
932
|
}
|
|
853
933
|
};
|
|
934
|
+
DateInputComponent.prototype.ngAfterViewInit = function () {
|
|
935
|
+
this.setComponentClasses();
|
|
936
|
+
};
|
|
854
937
|
/**
|
|
855
938
|
* @hidden
|
|
856
939
|
*/
|
|
@@ -1204,7 +1287,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
1204
1287
|
}
|
|
1205
1288
|
};
|
|
1206
1289
|
DateInputComponent.prototype.bindEvents = function () {
|
|
1207
|
-
var element = this.
|
|
1290
|
+
var element = this.wrapper.nativeElement;
|
|
1208
1291
|
var mousewheelHandler = this.handleMouseWheel.bind(this);
|
|
1209
1292
|
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)));
|
|
1210
1293
|
};
|
|
@@ -1336,6 +1419,29 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
1336
1419
|
this.pickerService.dateCompletenessChange.emit();
|
|
1337
1420
|
}
|
|
1338
1421
|
};
|
|
1422
|
+
DateInputComponent.prototype.setSpinnerFill = function (spinner, fill, oldFill) {
|
|
1423
|
+
if (oldFill) {
|
|
1424
|
+
this.renderer.removeClass(spinner, "k-button-" + oldFill);
|
|
1425
|
+
this.renderer.removeClass(spinner, "k-button-" + oldFill + "-base");
|
|
1426
|
+
}
|
|
1427
|
+
this.renderer.addClass(spinner, "k-button-" + fill);
|
|
1428
|
+
this.renderer.addClass(spinner, "k-button-" + fill + "-base");
|
|
1429
|
+
};
|
|
1430
|
+
DateInputComponent.prototype.setComponentClasses = function () {
|
|
1431
|
+
if (this.size) {
|
|
1432
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1433
|
+
}
|
|
1434
|
+
if (this.rounded) {
|
|
1435
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1436
|
+
}
|
|
1437
|
+
if (this.fillMode) {
|
|
1438
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1439
|
+
}
|
|
1440
|
+
if (this.spinners) {
|
|
1441
|
+
this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
|
|
1442
|
+
this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1339
1445
|
var DateInputComponent_1;
|
|
1340
1446
|
tslib_1.__decorate([
|
|
1341
1447
|
Input(),
|
|
@@ -1427,6 +1533,21 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
1427
1533
|
Input(),
|
|
1428
1534
|
tslib_1.__metadata("design:type", Boolean)
|
|
1429
1535
|
], DateInputComponent.prototype, "hasPopup", void 0);
|
|
1536
|
+
tslib_1.__decorate([
|
|
1537
|
+
Input(),
|
|
1538
|
+
tslib_1.__metadata("design:type", String),
|
|
1539
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1540
|
+
], DateInputComponent.prototype, "size", null);
|
|
1541
|
+
tslib_1.__decorate([
|
|
1542
|
+
Input(),
|
|
1543
|
+
tslib_1.__metadata("design:type", String),
|
|
1544
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1545
|
+
], DateInputComponent.prototype, "rounded", null);
|
|
1546
|
+
tslib_1.__decorate([
|
|
1547
|
+
Input(),
|
|
1548
|
+
tslib_1.__metadata("design:type", String),
|
|
1549
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1550
|
+
], DateInputComponent.prototype, "fillMode", null);
|
|
1430
1551
|
tslib_1.__decorate([
|
|
1431
1552
|
Output(),
|
|
1432
1553
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -1448,20 +1569,24 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
1448
1569
|
tslib_1.__metadata("design:type", ElementRef)
|
|
1449
1570
|
], DateInputComponent.prototype, "dateInput", void 0);
|
|
1450
1571
|
tslib_1.__decorate([
|
|
1451
|
-
|
|
1452
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1453
|
-
], DateInputComponent.prototype, "wrap", void 0);
|
|
1454
|
-
tslib_1.__decorate([
|
|
1455
|
-
HostBinding('class.k-widget'),
|
|
1572
|
+
HostBinding('class.k-input'),
|
|
1456
1573
|
HostBinding('class.k-dateinput'),
|
|
1457
1574
|
tslib_1.__metadata("design:type", Boolean),
|
|
1458
1575
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1459
1576
|
], DateInputComponent.prototype, "wrapperClass", null);
|
|
1460
1577
|
tslib_1.__decorate([
|
|
1461
|
-
HostBinding('class.k-
|
|
1578
|
+
HostBinding('class.k-disabled'),
|
|
1462
1579
|
tslib_1.__metadata("design:type", Boolean),
|
|
1463
1580
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1464
1581
|
], DateInputComponent.prototype, "disabledClass", null);
|
|
1582
|
+
tslib_1.__decorate([
|
|
1583
|
+
ViewChild('spinup', { static: false }),
|
|
1584
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
1585
|
+
], DateInputComponent.prototype, "spinup", void 0);
|
|
1586
|
+
tslib_1.__decorate([
|
|
1587
|
+
ViewChild('spindown', { static: false }),
|
|
1588
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
1589
|
+
], DateInputComponent.prototype, "spindown", void 0);
|
|
1465
1590
|
DateInputComponent = DateInputComponent_1 = tslib_1.__decorate([
|
|
1466
1591
|
Component({
|
|
1467
1592
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1474,7 +1599,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
1474
1599
|
LocalizationService
|
|
1475
1600
|
],
|
|
1476
1601
|
selector: 'kendo-dateinput',
|
|
1477
|
-
template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <
|
|
1602
|
+
template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n #dateInput\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input-inner\"\n [attr.role]=\"role\"\n [attr.aria-readonly]=\"ariaReadOnly\"\n [id]=\"focusableId\"\n [title]=\"title\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-expanded]=\"isPopupOpen\"\n [attr.aria-haspopup]=\"hasPopup\"\n [kendoEventsOutsideAngular]=\"{\n click: handleClick,\n focus: handleFocus,\n mousedown: handleMousedown,\n touchstart: handleMousedown,\n dragstart: handleDragAndDrop,\n drop: handleDragAndDrop,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n />\n <span *ngIf=\"spinners\" class=\"k-input-spinner k-spin-button\" (mousedown)=\"$event.preventDefault()\">\n <button\n #spinup\n tabindex=\"-1\"\n class=\"k-spinner-increase k-button k-icon-button\"\n [class.k-active]=\"arrowDirection === arrow.Up\"\n (mousedown)=\"arrowDirection = arrow.Up\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n (click)=\"handleButtonClick(1)\"\n [title]=\"localization.get('increment')\"\n [attr.aria-label]=\"localization.get('increment')\">\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n #spindown\n tabindex=\"-1\"\n class=\"k-spinner-decrease k-button k-icon-button\"\n (click)=\"handleButtonClick(-1)\"\n [class.k-active]=\"arrowDirection === arrow.Down\"\n (mousedown)=\"arrowDirection = arrow.Down\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n [title]=\"localization.get('decrement')\"\n [attr.aria-label]=\"localization.get('decrement')\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
|
|
1478
1603
|
}),
|
|
1479
1604
|
tslib_1.__param(7, Optional()),
|
|
1480
1605
|
tslib_1.__metadata("design:paramtypes", [ChangeDetectorRef,
|