@progress/kendo-angular-inputs 8.0.0-dev.202112161434 → 8.0.0-dev.202112211528
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/dist/cdn/js/kendo-angular-inputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/checkbox/checkbox.directive.js +79 -3
- package/dist/es/colorpicker/color-gradient.component.js +1 -1
- package/dist/es/colorpicker/color-input.component.js +1 -1
- package/dist/es/colorpicker/colorpicker.component.js +111 -6
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker-header.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/common/models/styling-classes.js +4 -0
- package/dist/es/common/models.js +4 -0
- package/dist/es/common/utils.js +37 -0
- package/dist/es/main.js +0 -1
- package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
- package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/radiobutton.directive.js +52 -3
- package/dist/es/shared/textarea.directive.js +3 -2
- package/dist/es/switch/switch.component.js +167 -21
- package/dist/es/text-fields-common/text-fields-base.js +1 -1
- package/dist/es/textarea/textarea.component.js +101 -5
- package/dist/es/textbox/textbox.component.js +108 -11
- package/dist/es/textbox/textbox.directive.js +3 -2
- package/dist/es/textbox.module.js +0 -3
- package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
- package/dist/es2015/checkbox/checkbox.directive.js +68 -10
- package/dist/es2015/colorpicker/color-gradient.component.js +1 -1
- package/dist/es2015/colorpicker/color-input.component.js +1 -1
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +45 -3
- package/dist/es2015/colorpicker/colorpicker.component.js +113 -16
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -2
- package/dist/es2015/common/models/fillmode.d.ts +13 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +23 -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/common/models/styling-classes.d.ts +11 -0
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/dist/es2015/common/models.d.ts +8 -0
- package/dist/es2015/common/models.js +4 -0
- package/dist/es2015/common/utils.d.ts +7 -0
- package/dist/es2015/common/utils.js +37 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +1 -1
- package/dist/es2015/main.js +0 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
- package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
- package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
- package/dist/es2015/radiobutton/radiobutton.directive.js +46 -11
- package/dist/es2015/shared/textarea.directive.d.ts +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -2
- package/dist/es2015/switch/switch.component.d.ts +48 -5
- package/dist/es2015/switch/switch.component.js +166 -24
- package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
- package/dist/es2015/textarea/textarea.component.d.ts +39 -1
- package/dist/es2015/textarea/textarea.component.js +89 -5
- package/dist/es2015/textbox/textbox.component.d.ts +40 -1
- package/dist/es2015/textbox/textbox.component.js +96 -11
- package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
- package/dist/es2015/textbox/textbox.directive.js +3 -2
- package/dist/es2015/textbox.module.js +0 -3
- package/dist/fesm2015/index.js +936 -478
- package/dist/fesm5/index.js +1015 -484
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-gradient.component.js +1 -1
- package/dist/npm/colorpicker/color-input.component.js +1 -1
- package/dist/npm/colorpicker/colorpicker.component.js +109 -4
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker-header.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/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/common/utils.js +37 -0
- package/dist/npm/main.js +0 -2
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
- package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/radiobutton.directive.js +51 -2
- package/dist/npm/shared/textarea.directive.js +3 -2
- package/dist/npm/switch/switch.component.js +166 -20
- package/dist/npm/text-fields-common/text-fields-base.js +1 -1
- package/dist/npm/textarea/textarea.component.js +100 -4
- package/dist/npm/textbox/textbox.component.js +107 -10
- package/dist/npm/textbox/textbox.directive.js +3 -2
- package/dist/npm/textbox.module.js +0 -3
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +11 -11
- package/dist/es/textbox/floating-label-input-adapter.js +0 -58
- package/dist/es/textbox/textbox-container.component.js +0 -224
- package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
- package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
- package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
- package/dist/es2015/textbox/textbox-container.component.js +0 -209
- package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
- package/dist/npm/textbox/textbox-container.component.js +0 -226
package/dist/fesm5/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { __extends, __decorate, __param, __metadata, __assign } from 'tslib';
|
|
6
6
|
import { isDevMode, Directive, Optional, TemplateRef, Input, Output, EventEmitter, HostBinding, ViewChild, ElementRef, ContentChild, Component, forwardRef, Injector, Renderer2, NgZone, ChangeDetectorRef, Inject, Injectable, HostListener, ViewChildren, QueryList, NgModule, ViewContainerRef, ContentChildren } from '@angular/core';
|
|
7
7
|
import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor } from '@angular/forms';
|
|
8
|
-
import { Subscription, fromEvent, interval, merge,
|
|
8
|
+
import { Subscription, fromEvent, interval, merge, BehaviorSubject, Subject } from 'rxjs';
|
|
9
9
|
import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, throttleTime } from 'rxjs/operators';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent } from '@progress/kendo-angular-common';
|
|
@@ -48,6 +48,43 @@ var fitIntoBounds = function (contender, min, max) {
|
|
|
48
48
|
}
|
|
49
49
|
return contender <= min ? min : contender >= max ? max : contender;
|
|
50
50
|
};
|
|
51
|
+
var SIZES = {
|
|
52
|
+
small: 'sm',
|
|
53
|
+
medium: 'md',
|
|
54
|
+
large: 'lg'
|
|
55
|
+
};
|
|
56
|
+
var ROUNDNESS = {
|
|
57
|
+
small: 'sm',
|
|
58
|
+
medium: 'md',
|
|
59
|
+
large: 'lg',
|
|
60
|
+
full: 'full'
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @hidden
|
|
64
|
+
*
|
|
65
|
+
* Returns the styling classes to be added and removed
|
|
66
|
+
*/
|
|
67
|
+
var getStylingClasses = function (componentType, stylingOption, previousValue, newValue) {
|
|
68
|
+
switch (stylingOption) {
|
|
69
|
+
case 'size':
|
|
70
|
+
return {
|
|
71
|
+
toRemove: "k-" + componentType + "-" + SIZES[previousValue],
|
|
72
|
+
toAdd: newValue ? "k-" + componentType + "-" + SIZES[newValue] : null
|
|
73
|
+
};
|
|
74
|
+
case 'rounded':
|
|
75
|
+
return {
|
|
76
|
+
toRemove: "k-rounded-" + ROUNDNESS[previousValue],
|
|
77
|
+
toAdd: newValue ? "k-rounded-" + ROUNDNESS[newValue] : null
|
|
78
|
+
};
|
|
79
|
+
case 'fillMode':
|
|
80
|
+
return {
|
|
81
|
+
toRemove: "k-" + componentType + "-" + previousValue,
|
|
82
|
+
toAdd: newValue ? "k-" + componentType + "-" + newValue : null
|
|
83
|
+
};
|
|
84
|
+
default:
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
51
88
|
|
|
52
89
|
/**
|
|
53
90
|
* @hidden
|
|
@@ -493,7 +530,7 @@ var packageMetadata = {
|
|
|
493
530
|
name: '@progress/kendo-angular-inputs',
|
|
494
531
|
productName: 'Kendo UI for Angular',
|
|
495
532
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
496
|
-
publishDate:
|
|
533
|
+
publishDate: 1640100237,
|
|
497
534
|
version: '',
|
|
498
535
|
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'
|
|
499
536
|
};
|
|
@@ -1819,7 +1856,7 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
1819
1856
|
return RangeSliderComponent;
|
|
1820
1857
|
}(SliderBase));
|
|
1821
1858
|
|
|
1822
|
-
var FOCUSED = 'k-
|
|
1859
|
+
var FOCUSED = 'k-focus';
|
|
1823
1860
|
/**
|
|
1824
1861
|
* Represents the [Kendo UI Switch component for Angular]({% slug overview_switch %}).
|
|
1825
1862
|
*/
|
|
@@ -1865,13 +1902,20 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
1865
1902
|
* @hidden
|
|
1866
1903
|
*/
|
|
1867
1904
|
this.initialized = false;
|
|
1905
|
+
this.hostClickSubscription = new Subscription;
|
|
1868
1906
|
this._checked = false;
|
|
1907
|
+
this._size = 'medium';
|
|
1908
|
+
this._trackRounded = 'full';
|
|
1909
|
+
this._thumbRounded = 'full';
|
|
1869
1910
|
this.ngChange = function (_) { };
|
|
1870
1911
|
this.ngTouched = function () { };
|
|
1871
1912
|
/**
|
|
1872
1913
|
* @hidden
|
|
1873
1914
|
*/
|
|
1874
1915
|
this.handleFocus = function () {
|
|
1916
|
+
if (_this.isFocused) {
|
|
1917
|
+
return;
|
|
1918
|
+
}
|
|
1875
1919
|
_this.focused = true;
|
|
1876
1920
|
if (hasObservers(_this.onFocus)) {
|
|
1877
1921
|
_this.ngZone.run(function () {
|
|
@@ -1882,7 +1926,11 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
1882
1926
|
/**
|
|
1883
1927
|
* @hidden
|
|
1884
1928
|
*/
|
|
1885
|
-
this.handleBlur = function () {
|
|
1929
|
+
this.handleBlur = function (event) {
|
|
1930
|
+
var relatedTarget = event && event.relatedTarget;
|
|
1931
|
+
if (_this.hostElement.nativeElement.contains(relatedTarget)) {
|
|
1932
|
+
return;
|
|
1933
|
+
}
|
|
1886
1934
|
_this.changeDetector.markForCheck();
|
|
1887
1935
|
_this.focused = false;
|
|
1888
1936
|
if (hasObservers(_this.onBlur) || requiresZoneOnBlur(_this.control)) {
|
|
@@ -1912,6 +1960,68 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
1912
1960
|
enumerable: true,
|
|
1913
1961
|
configurable: true
|
|
1914
1962
|
});
|
|
1963
|
+
Object.defineProperty(SwitchComponent.prototype, "size", {
|
|
1964
|
+
get: function () {
|
|
1965
|
+
return this._size;
|
|
1966
|
+
},
|
|
1967
|
+
/**
|
|
1968
|
+
* Specifies the size of the Switch.
|
|
1969
|
+
*
|
|
1970
|
+
* The possible values are:
|
|
1971
|
+
* * `'small'`
|
|
1972
|
+
* * `'medium'` (default)
|
|
1973
|
+
* * `'large'`
|
|
1974
|
+
* * `null`
|
|
1975
|
+
*/
|
|
1976
|
+
set: function (size) {
|
|
1977
|
+
this.handleClasses(size, 'size');
|
|
1978
|
+
this._size = size;
|
|
1979
|
+
},
|
|
1980
|
+
enumerable: true,
|
|
1981
|
+
configurable: true
|
|
1982
|
+
});
|
|
1983
|
+
Object.defineProperty(SwitchComponent.prototype, "thumbRounded", {
|
|
1984
|
+
get: function () {
|
|
1985
|
+
return this._thumbRounded;
|
|
1986
|
+
},
|
|
1987
|
+
/**
|
|
1988
|
+
* Specifies the border radius of the Switch thumb.
|
|
1989
|
+
*
|
|
1990
|
+
* The possible values are:
|
|
1991
|
+
* * `'full'` (default)
|
|
1992
|
+
* * `'small'`
|
|
1993
|
+
* * `'medium'`
|
|
1994
|
+
* * `'large'`
|
|
1995
|
+
* * `null`
|
|
1996
|
+
*/
|
|
1997
|
+
set: function (thumbRounded) {
|
|
1998
|
+
this.handleThumbClasses(thumbRounded);
|
|
1999
|
+
this._thumbRounded = thumbRounded;
|
|
2000
|
+
},
|
|
2001
|
+
enumerable: true,
|
|
2002
|
+
configurable: true
|
|
2003
|
+
});
|
|
2004
|
+
Object.defineProperty(SwitchComponent.prototype, "trackRounded", {
|
|
2005
|
+
get: function () {
|
|
2006
|
+
return this._trackRounded;
|
|
2007
|
+
},
|
|
2008
|
+
/**
|
|
2009
|
+
* Specifies the border radius of the Switch track.
|
|
2010
|
+
*
|
|
2011
|
+
* The possible values are:
|
|
2012
|
+
* * `'full'` (default)
|
|
2013
|
+
* * `'small'`
|
|
2014
|
+
* * `'medium'`
|
|
2015
|
+
* * `'large'`
|
|
2016
|
+
* * `null`
|
|
2017
|
+
*/
|
|
2018
|
+
set: function (trackRounded) {
|
|
2019
|
+
this.handleTrackClasses(trackRounded);
|
|
2020
|
+
this._trackRounded = trackRounded;
|
|
2021
|
+
},
|
|
2022
|
+
enumerable: true,
|
|
2023
|
+
configurable: true
|
|
2024
|
+
});
|
|
1915
2025
|
Object.defineProperty(SwitchComponent.prototype, "tabIndex", {
|
|
1916
2026
|
get: function () {
|
|
1917
2027
|
return this.tabindex;
|
|
@@ -1996,10 +2106,23 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
1996
2106
|
this.control = this.injector.get(NgControl, null);
|
|
1997
2107
|
this.ngZone.onStable.pipe(take(1)).subscribe(function () { return _this.initialized = true; });
|
|
1998
2108
|
};
|
|
2109
|
+
SwitchComponent.prototype.ngAfterViewInit = function () {
|
|
2110
|
+
var wrapper = this.hostElement.nativeElement;
|
|
2111
|
+
this.attachHostClickHandler();
|
|
2112
|
+
if (!this.checked && !wrapper.classList.contains('k-switch-off')) {
|
|
2113
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2114
|
+
}
|
|
2115
|
+
this.handleClasses(this.size, 'size');
|
|
2116
|
+
this.handleTrackClasses(this.trackRounded);
|
|
2117
|
+
this.handleThumbClasses(this.thumbRounded);
|
|
2118
|
+
};
|
|
1999
2119
|
SwitchComponent.prototype.ngOnDestroy = function () {
|
|
2000
2120
|
if (this.localizationChangeSubscription) {
|
|
2001
2121
|
this.localizationChangeSubscription.unsubscribe();
|
|
2002
2122
|
}
|
|
2123
|
+
if (this.hostClickSubscription) {
|
|
2124
|
+
this.hostClickSubscription.unsubscribe();
|
|
2125
|
+
}
|
|
2003
2126
|
};
|
|
2004
2127
|
/**
|
|
2005
2128
|
* Focuses the Switch.
|
|
@@ -2017,19 +2140,19 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2017
2140
|
* ```
|
|
2018
2141
|
*/
|
|
2019
2142
|
SwitchComponent.prototype.focus = function () {
|
|
2020
|
-
if (!this.
|
|
2143
|
+
if (!this.track) {
|
|
2021
2144
|
return;
|
|
2022
2145
|
}
|
|
2023
|
-
this.
|
|
2146
|
+
this.track.nativeElement.focus();
|
|
2024
2147
|
};
|
|
2025
2148
|
/**
|
|
2026
2149
|
* Blurs the Switch.
|
|
2027
2150
|
*/
|
|
2028
2151
|
SwitchComponent.prototype.blur = function () {
|
|
2029
|
-
if (!this.
|
|
2152
|
+
if (!this.track) {
|
|
2030
2153
|
return;
|
|
2031
2154
|
}
|
|
2032
|
-
this.
|
|
2155
|
+
this.track.nativeElement.blur();
|
|
2033
2156
|
};
|
|
2034
2157
|
/**
|
|
2035
2158
|
* @hidden
|
|
@@ -2079,7 +2202,7 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2079
2202
|
};
|
|
2080
2203
|
/**
|
|
2081
2204
|
* @hidden
|
|
2082
|
-
* Used by the
|
|
2205
|
+
* Used by the FloatingLabel to determine if the component is empty.
|
|
2083
2206
|
*/
|
|
2084
2207
|
SwitchComponent.prototype.isEmpty = function () {
|
|
2085
2208
|
return false;
|
|
@@ -2098,12 +2221,12 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2098
2221
|
Object.defineProperty(SwitchComponent.prototype, "focused", {
|
|
2099
2222
|
set: function (value) {
|
|
2100
2223
|
if (this.isFocused !== value && this.hostElement) {
|
|
2101
|
-
var
|
|
2224
|
+
var wrapper = this.hostElement.nativeElement;
|
|
2102
2225
|
if (value) {
|
|
2103
|
-
this.renderer.addClass(
|
|
2226
|
+
this.renderer.addClass(wrapper, FOCUSED);
|
|
2104
2227
|
}
|
|
2105
2228
|
else {
|
|
2106
|
-
this.renderer.removeClass(
|
|
2229
|
+
this.renderer.removeClass(wrapper, FOCUSED);
|
|
2107
2230
|
}
|
|
2108
2231
|
this.isFocused = value;
|
|
2109
2232
|
}
|
|
@@ -2111,14 +2234,54 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2111
2234
|
enumerable: true,
|
|
2112
2235
|
configurable: true
|
|
2113
2236
|
});
|
|
2237
|
+
SwitchComponent.prototype.attachHostClickHandler = function () {
|
|
2238
|
+
var _this = this;
|
|
2239
|
+
this.ngZone.runOutsideAngular(function () {
|
|
2240
|
+
_this.hostClickSubscription.add(_this.renderer.listen(_this.hostElement.nativeElement, 'click', _this.clickHandler));
|
|
2241
|
+
});
|
|
2242
|
+
};
|
|
2114
2243
|
SwitchComponent.prototype.setHostClasses = function (value) {
|
|
2244
|
+
var wrapper = this.hostElement.nativeElement;
|
|
2115
2245
|
if (value) {
|
|
2116
|
-
this.renderer.removeClass(
|
|
2117
|
-
this.renderer.addClass(
|
|
2246
|
+
this.renderer.removeClass(wrapper, 'k-switch-off');
|
|
2247
|
+
this.renderer.addClass(wrapper, 'k-switch-on');
|
|
2118
2248
|
}
|
|
2119
2249
|
else {
|
|
2120
|
-
this.renderer.removeClass(
|
|
2121
|
-
this.renderer.addClass(
|
|
2250
|
+
this.renderer.removeClass(wrapper, 'k-switch-on');
|
|
2251
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2252
|
+
}
|
|
2253
|
+
};
|
|
2254
|
+
SwitchComponent.prototype.handleClasses = function (value, input) {
|
|
2255
|
+
var elem = this.hostElement.nativeElement;
|
|
2256
|
+
var classes = getStylingClasses('switch', input, this[input], value);
|
|
2257
|
+
if (classes.toRemove) {
|
|
2258
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2259
|
+
}
|
|
2260
|
+
if (classes.toAdd) {
|
|
2261
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2262
|
+
}
|
|
2263
|
+
};
|
|
2264
|
+
SwitchComponent.prototype.handleTrackClasses = function (value) {
|
|
2265
|
+
var elem = this.hostElement.nativeElement;
|
|
2266
|
+
var track = this.track.nativeElement;
|
|
2267
|
+
var classes = getStylingClasses('switch', 'rounded', this.trackRounded, value);
|
|
2268
|
+
if (classes.toRemove) {
|
|
2269
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2270
|
+
this.renderer.removeClass(track, classes.toRemove);
|
|
2271
|
+
}
|
|
2272
|
+
if (classes.toAdd) {
|
|
2273
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2274
|
+
this.renderer.addClass(track, classes.toAdd);
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
SwitchComponent.prototype.handleThumbClasses = function (value) {
|
|
2278
|
+
var thumb = this.thumb.nativeElement;
|
|
2279
|
+
var classes = getStylingClasses('switch', 'rounded', this.thumbRounded, value);
|
|
2280
|
+
if (classes.toRemove) {
|
|
2281
|
+
this.renderer.removeClass(thumb, classes.toRemove);
|
|
2282
|
+
}
|
|
2283
|
+
if (classes.toAdd) {
|
|
2284
|
+
this.renderer.addClass(thumb, classes.toAdd);
|
|
2122
2285
|
}
|
|
2123
2286
|
};
|
|
2124
2287
|
var SwitchComponent_1;
|
|
@@ -2151,6 +2314,21 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2151
2314
|
Input(),
|
|
2152
2315
|
__metadata("design:type", Number)
|
|
2153
2316
|
], SwitchComponent.prototype, "tabindex", void 0);
|
|
2317
|
+
__decorate([
|
|
2318
|
+
Input(),
|
|
2319
|
+
__metadata("design:type", String),
|
|
2320
|
+
__metadata("design:paramtypes", [String])
|
|
2321
|
+
], SwitchComponent.prototype, "size", null);
|
|
2322
|
+
__decorate([
|
|
2323
|
+
Input(),
|
|
2324
|
+
__metadata("design:type", String),
|
|
2325
|
+
__metadata("design:paramtypes", [String])
|
|
2326
|
+
], SwitchComponent.prototype, "thumbRounded", null);
|
|
2327
|
+
__decorate([
|
|
2328
|
+
Input(),
|
|
2329
|
+
__metadata("design:type", String),
|
|
2330
|
+
__metadata("design:paramtypes", [String])
|
|
2331
|
+
], SwitchComponent.prototype, "trackRounded", null);
|
|
2154
2332
|
__decorate([
|
|
2155
2333
|
Input(),
|
|
2156
2334
|
__metadata("design:type", Number),
|
|
@@ -2168,10 +2346,6 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2168
2346
|
Output(),
|
|
2169
2347
|
__metadata("design:type", EventEmitter)
|
|
2170
2348
|
], SwitchComponent.prototype, "valueChange", void 0);
|
|
2171
|
-
__decorate([
|
|
2172
|
-
ViewChild('wrapper', { static: true }),
|
|
2173
|
-
__metadata("design:type", Object)
|
|
2174
|
-
], SwitchComponent.prototype, "wrapper", void 0);
|
|
2175
2349
|
__decorate([
|
|
2176
2350
|
HostBinding('attr.dir'),
|
|
2177
2351
|
__metadata("design:type", String)
|
|
@@ -2196,10 +2370,18 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2196
2370
|
__metadata("design:type", Boolean)
|
|
2197
2371
|
], SwitchComponent.prototype, "hostClasses", void 0);
|
|
2198
2372
|
__decorate([
|
|
2199
|
-
HostBinding('class.k-
|
|
2373
|
+
HostBinding('class.k-disabled'),
|
|
2200
2374
|
__metadata("design:type", Boolean),
|
|
2201
2375
|
__metadata("design:paramtypes", [])
|
|
2202
2376
|
], SwitchComponent.prototype, "disabledClass", null);
|
|
2377
|
+
__decorate([
|
|
2378
|
+
ViewChild('track', { static: true }),
|
|
2379
|
+
__metadata("design:type", Object)
|
|
2380
|
+
], SwitchComponent.prototype, "track", void 0);
|
|
2381
|
+
__decorate([
|
|
2382
|
+
ViewChild('thumb', { static: true }),
|
|
2383
|
+
__metadata("design:type", Object)
|
|
2384
|
+
], SwitchComponent.prototype, "thumb", void 0);
|
|
2203
2385
|
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
2204
2386
|
Component({
|
|
2205
2387
|
exportAs: 'kendoSwitch',
|
|
@@ -2217,7 +2399,7 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2217
2399
|
}
|
|
2218
2400
|
],
|
|
2219
2401
|
selector: 'kendo-switch',
|
|
2220
|
-
template: "\n <ng-container kendoSwitchLocalizedMessages\n i18n-on=\"kendo.switch.on|The **On** label of the Switch.\"\n on=\"ON\"\n i18n-off=\"kendo.switch.off|The **Off** label of the Switch.\"\n off=\"OFF\"\n >\n\n <span\n #
|
|
2402
|
+
template: "\n <ng-container kendoSwitchLocalizedMessages\n i18n-on=\"kendo.switch.on|The **On** label of the Switch.\"\n on=\"ON\"\n i18n-off=\"kendo.switch.off|The **Off** label of the Switch.\"\n off=\"OFF\"\n >\n\n <span\n #track\n class=\"k-switch-track\"\n [id]=\"focusableId\"\n role=\"switch\"\n [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\"\n [attr.aria-checked]=\"checked\"\n [attr.tabindex]=\"(disabled ? undefined : tabIndex)\"\n [kendoEventsOutsideAngular]=\"{ keydown: keyDownHandler, focus: handleFocus, blur: handleBlur }\"\n >\n <span class=\"k-switch-label-on\" [attr.aria-hidden]=\"true\" >{{onLabelMessage}}</span>\n <span class=\"k-switch-label-off\" [attr.aria-hidden]=\"true\">{{offLabelMessage}}</span>\n </span>\n <span\n class=\"k-switch-thumb-wrap\"\n tabindex=\"-1\"\n [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\" [kendoEventsOutsideAngular]=\"{\n keydown: keyDownHandler,\n focus: handleFocus,\n blur: handleBlur\n }\">\n <span #thumb class=\"k-switch-thumb\"></span>\n </span>\n "
|
|
2221
2403
|
}),
|
|
2222
2404
|
__metadata("design:paramtypes", [Renderer2,
|
|
2223
2405
|
ElementRef,
|
|
@@ -2229,6 +2411,123 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
2229
2411
|
return SwitchComponent;
|
|
2230
2412
|
}());
|
|
2231
2413
|
|
|
2414
|
+
/**
|
|
2415
|
+
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
2416
|
+
* Used to style the textbox of any `input` element.
|
|
2417
|
+
*
|
|
2418
|
+
* @example
|
|
2419
|
+
* ```ts-no-run
|
|
2420
|
+
* <input kendoTextBox />
|
|
2421
|
+
* <input kendoTextBox type="email" />
|
|
2422
|
+
* <input kendoTextBox type="password" />
|
|
2423
|
+
* ```
|
|
2424
|
+
*/
|
|
2425
|
+
var TextBoxDirective = /** @class */ (function () {
|
|
2426
|
+
function TextBoxDirective(renderer, inputElement, ngZone) {
|
|
2427
|
+
this.renderer = renderer;
|
|
2428
|
+
this.inputElement = inputElement;
|
|
2429
|
+
this.ngZone = ngZone;
|
|
2430
|
+
this.hostClasses = true;
|
|
2431
|
+
/**
|
|
2432
|
+
* @hidden
|
|
2433
|
+
*/
|
|
2434
|
+
this.onFocus = new EventEmitter();
|
|
2435
|
+
/**
|
|
2436
|
+
* @hidden
|
|
2437
|
+
*/
|
|
2438
|
+
this.onBlur = new EventEmitter();
|
|
2439
|
+
/**
|
|
2440
|
+
* @hidden
|
|
2441
|
+
*/
|
|
2442
|
+
this.onValueChange = new EventEmitter();
|
|
2443
|
+
/**
|
|
2444
|
+
* @hidden
|
|
2445
|
+
*/
|
|
2446
|
+
this.autoFillStart = new EventEmitter();
|
|
2447
|
+
/**
|
|
2448
|
+
* @hidden
|
|
2449
|
+
*/
|
|
2450
|
+
this.autoFillEnd = new EventEmitter();
|
|
2451
|
+
this.listeners = [];
|
|
2452
|
+
}
|
|
2453
|
+
TextBoxDirective_1 = TextBoxDirective;
|
|
2454
|
+
Object.defineProperty(TextBoxDirective.prototype, "value", {
|
|
2455
|
+
/**
|
|
2456
|
+
* @hidden
|
|
2457
|
+
*/
|
|
2458
|
+
get: function () {
|
|
2459
|
+
return this.inputElement.nativeElement.value;
|
|
2460
|
+
},
|
|
2461
|
+
/**
|
|
2462
|
+
* @hidden
|
|
2463
|
+
*/
|
|
2464
|
+
set: function (text) {
|
|
2465
|
+
if (!this.inputElement) {
|
|
2466
|
+
return;
|
|
2467
|
+
}
|
|
2468
|
+
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
2469
|
+
this.onValueChange.emit();
|
|
2470
|
+
},
|
|
2471
|
+
enumerable: true,
|
|
2472
|
+
configurable: true
|
|
2473
|
+
});
|
|
2474
|
+
Object.defineProperty(TextBoxDirective.prototype, "id", {
|
|
2475
|
+
get: function () {
|
|
2476
|
+
return this.inputElement.nativeElement.id;
|
|
2477
|
+
},
|
|
2478
|
+
set: function (id) {
|
|
2479
|
+
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
2480
|
+
},
|
|
2481
|
+
enumerable: true,
|
|
2482
|
+
configurable: true
|
|
2483
|
+
});
|
|
2484
|
+
TextBoxDirective.prototype.ngAfterViewInit = function () {
|
|
2485
|
+
var _this = this;
|
|
2486
|
+
var input = this.inputElement.nativeElement;
|
|
2487
|
+
this.listeners = [
|
|
2488
|
+
this.renderer.listen(input, 'focus', function () { return _this.onFocus.emit(); }),
|
|
2489
|
+
this.renderer.listen(input, 'blur', function () { return _this.onBlur.emit(); })
|
|
2490
|
+
];
|
|
2491
|
+
this.ngZone.runOutsideAngular(function () {
|
|
2492
|
+
_this.renderer.listen(input, 'animationstart', function (e) {
|
|
2493
|
+
if (e.animationName === 'autoFillStart') {
|
|
2494
|
+
_this.autoFillStart.emit();
|
|
2495
|
+
}
|
|
2496
|
+
else if (e.animationName === 'autoFillEnd') {
|
|
2497
|
+
_this.autoFillEnd.emit();
|
|
2498
|
+
}
|
|
2499
|
+
});
|
|
2500
|
+
});
|
|
2501
|
+
};
|
|
2502
|
+
TextBoxDirective.prototype.ngOnDestroy = function () {
|
|
2503
|
+
this.listeners.forEach(function (listener) { return listener(); });
|
|
2504
|
+
};
|
|
2505
|
+
var TextBoxDirective_1;
|
|
2506
|
+
__decorate([
|
|
2507
|
+
HostBinding('class.k-textbox'),
|
|
2508
|
+
HostBinding('class.k-input'),
|
|
2509
|
+
__metadata("design:type", Boolean)
|
|
2510
|
+
], TextBoxDirective.prototype, "hostClasses", void 0);
|
|
2511
|
+
__decorate([
|
|
2512
|
+
Input(),
|
|
2513
|
+
__metadata("design:type", String),
|
|
2514
|
+
__metadata("design:paramtypes", [String])
|
|
2515
|
+
], TextBoxDirective.prototype, "value", null);
|
|
2516
|
+
TextBoxDirective = TextBoxDirective_1 = __decorate([
|
|
2517
|
+
Directive({
|
|
2518
|
+
selector: 'input[kendoTextBox]',
|
|
2519
|
+
providers: [{
|
|
2520
|
+
provide: KendoInput,
|
|
2521
|
+
useExisting: forwardRef(function () { return TextBoxDirective_1; })
|
|
2522
|
+
}]
|
|
2523
|
+
}),
|
|
2524
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
2525
|
+
ElementRef,
|
|
2526
|
+
NgZone])
|
|
2527
|
+
], TextBoxDirective);
|
|
2528
|
+
return TextBoxDirective;
|
|
2529
|
+
}());
|
|
2530
|
+
|
|
2232
2531
|
/**
|
|
2233
2532
|
* Represents the [Kendo UI TextArea directive for the Inputs components for Angular]({% slug overview_textarea %}).
|
|
2234
2533
|
* Provides floating labels to `textarea` elements.
|
|
@@ -2245,7 +2544,7 @@ var TextAreaDirective = /** @class */ (function () {
|
|
|
2245
2544
|
this.zone = zone;
|
|
2246
2545
|
this.changeDetector = changeDetector;
|
|
2247
2546
|
this.injector = injector;
|
|
2248
|
-
this.
|
|
2547
|
+
this.elementClasses = true;
|
|
2249
2548
|
this.autofillClass = true;
|
|
2250
2549
|
/**
|
|
2251
2550
|
* Fires each time the textarea value is changed.
|
|
@@ -2437,8 +2736,9 @@ var TextAreaDirective = /** @class */ (function () {
|
|
|
2437
2736
|
var TextAreaDirective_1;
|
|
2438
2737
|
__decorate([
|
|
2439
2738
|
HostBinding('class.k-textarea'),
|
|
2739
|
+
HostBinding('class.k-input'),
|
|
2440
2740
|
__metadata("design:type", Boolean)
|
|
2441
|
-
], TextAreaDirective.prototype, "
|
|
2741
|
+
], TextAreaDirective.prototype, "elementClasses", void 0);
|
|
2442
2742
|
__decorate([
|
|
2443
2743
|
HostBinding('class.k-autofill'),
|
|
2444
2744
|
__metadata("design:type", Boolean)
|
|
@@ -2484,415 +2784,36 @@ var TextAreaDirective = /** @class */ (function () {
|
|
|
2484
2784
|
/**
|
|
2485
2785
|
* @hidden
|
|
2486
2786
|
*/
|
|
2487
|
-
var
|
|
2488
|
-
function
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
if (isObservableOrEventEmitter(component.onFocus)) {
|
|
2492
|
-
this.onFocus = component.onFocus;
|
|
2493
|
-
}
|
|
2494
|
-
if (isObservableOrEventEmitter(component.autoFillStart)) {
|
|
2495
|
-
this.autoFillStart = component.autoFillStart;
|
|
2496
|
-
}
|
|
2497
|
-
if (isObservableOrEventEmitter(component.autoFillEnd)) {
|
|
2498
|
-
this.autoFillEnd = component.autoFillEnd;
|
|
2499
|
-
}
|
|
2500
|
-
if (isObservableOrEventEmitter(component.onBlur)) {
|
|
2501
|
-
this.onBlur = component.onBlur;
|
|
2502
|
-
}
|
|
2503
|
-
if (formControl) {
|
|
2504
|
-
this.onValueChange = formControl.valueChanges;
|
|
2505
|
-
}
|
|
2506
|
-
else if (component.onValueChange) {
|
|
2507
|
-
this.onValueChange = component.onValueChange;
|
|
2787
|
+
var createMaxValidator = function (maxValue) {
|
|
2788
|
+
return function (c) {
|
|
2789
|
+
if (!isPresent(maxValue) || !isPresent(c.value) || c.value <= maxValue) {
|
|
2790
|
+
return null;
|
|
2508
2791
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
if ('focusableId' in component) {
|
|
2514
|
-
return component.focusableId;
|
|
2515
|
-
}
|
|
2516
|
-
else if ('id' in component) {
|
|
2517
|
-
return component.id;
|
|
2518
|
-
}
|
|
2519
|
-
return "";
|
|
2520
|
-
},
|
|
2521
|
-
set: function (value) {
|
|
2522
|
-
var component = this.component;
|
|
2523
|
-
if ('focusableId' in component) {
|
|
2524
|
-
component.focusableId = value;
|
|
2792
|
+
return {
|
|
2793
|
+
maxError: {
|
|
2794
|
+
maxValue: maxValue,
|
|
2795
|
+
value: c.value
|
|
2525
2796
|
}
|
|
2526
|
-
|
|
2527
|
-
|
|
2797
|
+
};
|
|
2798
|
+
};
|
|
2799
|
+
};
|
|
2800
|
+
|
|
2801
|
+
/**
|
|
2802
|
+
* @hidden
|
|
2803
|
+
*/
|
|
2804
|
+
var createMinValidator = function (minValue) {
|
|
2805
|
+
return function (c) {
|
|
2806
|
+
if (!isPresent(minValue) || !isPresent(c.value) || c.value >= minValue) {
|
|
2807
|
+
return null;
|
|
2808
|
+
}
|
|
2809
|
+
return {
|
|
2810
|
+
minError: {
|
|
2811
|
+
minValue: minValue,
|
|
2812
|
+
value: c.value
|
|
2528
2813
|
}
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
});
|
|
2533
|
-
return FloatingLabelInputAdapter;
|
|
2534
|
-
}());
|
|
2535
|
-
|
|
2536
|
-
var isFunction = function (x) { return Object.prototype.toString.call(x) === '[object Function]'; };
|
|
2537
|
-
/**
|
|
2538
|
-
* @hidden
|
|
2539
|
-
*/
|
|
2540
|
-
var TextBoxContainerComponent = /** @class */ (function () {
|
|
2541
|
-
function TextBoxContainerComponent(elementRef, renderer, changeDetectorRef, rtl) {
|
|
2542
|
-
this.elementRef = elementRef;
|
|
2543
|
-
this.renderer = renderer;
|
|
2544
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
2545
|
-
/**
|
|
2546
|
-
* @hidden
|
|
2547
|
-
*/
|
|
2548
|
-
this.focused = false;
|
|
2549
|
-
/**
|
|
2550
|
-
* @hidden
|
|
2551
|
-
*/
|
|
2552
|
-
this.empty = true;
|
|
2553
|
-
/**
|
|
2554
|
-
* @hidden
|
|
2555
|
-
*/
|
|
2556
|
-
this.invalid = false;
|
|
2557
|
-
this._subscriptions = [];
|
|
2558
|
-
this.autoFillStarted = false;
|
|
2559
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
2560
|
-
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
2561
|
-
}
|
|
2562
|
-
Object.defineProperty(TextBoxContainerComponent.prototype, "hostClasses", {
|
|
2563
|
-
get: function () {
|
|
2564
|
-
return true;
|
|
2565
|
-
},
|
|
2566
|
-
enumerable: true,
|
|
2567
|
-
configurable: true
|
|
2568
|
-
});
|
|
2569
|
-
Object.defineProperty(TextBoxContainerComponent.prototype, "textareaElementClass", {
|
|
2570
|
-
get: function () {
|
|
2571
|
-
return !!this.textarea;
|
|
2572
|
-
},
|
|
2573
|
-
enumerable: true,
|
|
2574
|
-
configurable: true
|
|
2575
|
-
});
|
|
2576
|
-
Object.defineProperty(TextBoxContainerComponent.prototype, "focusedClass", {
|
|
2577
|
-
get: function () {
|
|
2578
|
-
return this.focused;
|
|
2579
|
-
},
|
|
2580
|
-
enumerable: true,
|
|
2581
|
-
configurable: true
|
|
2582
|
-
});
|
|
2583
|
-
Object.defineProperty(TextBoxContainerComponent.prototype, "invalidClass", {
|
|
2584
|
-
get: function () {
|
|
2585
|
-
return this.invalid;
|
|
2586
|
-
},
|
|
2587
|
-
enumerable: true,
|
|
2588
|
-
configurable: true
|
|
2589
|
-
});
|
|
2590
|
-
/**
|
|
2591
|
-
* @hidden
|
|
2592
|
-
*/
|
|
2593
|
-
TextBoxContainerComponent.prototype.ngAfterContentInit = function () {
|
|
2594
|
-
var _this = this;
|
|
2595
|
-
if (!this.formControl && !this.kendoInput) {
|
|
2596
|
-
if (isDevMode()) {
|
|
2597
|
-
throw new Error("The TextBoxContainer requires a Kendo Input component" +
|
|
2598
|
-
" or a forms-bound component to function properly.");
|
|
2599
|
-
}
|
|
2600
|
-
return;
|
|
2601
|
-
}
|
|
2602
|
-
// add focus/blur/valueChange handlers
|
|
2603
|
-
var control = new FloatingLabelInputAdapter(this.kendoInput || this.formControl.valueAccessor, this.formControl);
|
|
2604
|
-
var setFocus = function (isFocused) { return function () {
|
|
2605
|
-
_this.focused = isFocused;
|
|
2606
|
-
_this.updateState();
|
|
2607
|
-
}; };
|
|
2608
|
-
this.subscribe(control, 'onFocus', setFocus(true));
|
|
2609
|
-
this.subscribe(control, 'onBlur', setFocus(false));
|
|
2610
|
-
this.subscribe(control, 'autoFillStart', function () {
|
|
2611
|
-
_this.autoFillStarted = true;
|
|
2612
|
-
_this.renderer.removeClass(_this.elementRef.nativeElement, 'k-state-empty');
|
|
2613
|
-
});
|
|
2614
|
-
this.subscribe(control, 'autoFillEnd', function () {
|
|
2615
|
-
if (_this.autoFillStarted) {
|
|
2616
|
-
_this.autoFillStarted = false;
|
|
2617
|
-
if (_this.empty) {
|
|
2618
|
-
_this.renderer.addClass(_this.elementRef.nativeElement, 'k-state-empty');
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
});
|
|
2622
|
-
var updateState = function () { return _this.updateState(); };
|
|
2623
|
-
updateState();
|
|
2624
|
-
this.subscribe(control, 'onValueChange', updateState);
|
|
2625
|
-
// set label id for floating label
|
|
2626
|
-
if (this.id && control.focusableId) {
|
|
2627
|
-
// input wins
|
|
2628
|
-
this.id = control.focusableId;
|
|
2629
|
-
}
|
|
2630
|
-
else if (this.id) {
|
|
2631
|
-
control.focusableId = this.id;
|
|
2632
|
-
}
|
|
2633
|
-
else if (control.focusableId) {
|
|
2634
|
-
this.id = control.focusableId;
|
|
2635
|
-
}
|
|
2636
|
-
else {
|
|
2637
|
-
var id = "_" + guid();
|
|
2638
|
-
control.focusableId = id;
|
|
2639
|
-
this.id = id;
|
|
2640
|
-
}
|
|
2641
|
-
};
|
|
2642
|
-
/**
|
|
2643
|
-
* @hidden
|
|
2644
|
-
*/
|
|
2645
|
-
TextBoxContainerComponent.prototype.ngOnDestroy = function () {
|
|
2646
|
-
this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
2647
|
-
this._subscriptions = [];
|
|
2648
|
-
};
|
|
2649
|
-
TextBoxContainerComponent.prototype.subscribe = function (control, eventName, handler) {
|
|
2650
|
-
if (control[eventName] instanceof EventEmitter) {
|
|
2651
|
-
var subscription = control[eventName].subscribe(handler);
|
|
2652
|
-
this._subscriptions.push(subscription);
|
|
2653
|
-
}
|
|
2654
|
-
};
|
|
2655
|
-
TextBoxContainerComponent.prototype.updateState = function () {
|
|
2656
|
-
var empty = function (value) {
|
|
2657
|
-
// zero is not an empty value (e.g., NumericTextBox)
|
|
2658
|
-
if (value === 0 || value === false) {
|
|
2659
|
-
return false;
|
|
2660
|
-
}
|
|
2661
|
-
// empty arrays are an empty value (e.g., MultiSelect)
|
|
2662
|
-
if (Array.isArray(value) && !value.length) {
|
|
2663
|
-
return true;
|
|
2664
|
-
}
|
|
2665
|
-
return !value;
|
|
2666
|
-
};
|
|
2667
|
-
var formControl = this.formControl;
|
|
2668
|
-
if (formControl) {
|
|
2669
|
-
var valueAccessor = formControl.valueAccessor;
|
|
2670
|
-
if (isFunction(valueAccessor.isEmpty)) {
|
|
2671
|
-
this.empty = valueAccessor.isEmpty();
|
|
2672
|
-
}
|
|
2673
|
-
else {
|
|
2674
|
-
this.empty = empty(formControl.value);
|
|
2675
|
-
}
|
|
2676
|
-
this.invalid = formControl.invalid && (formControl.touched || formControl.dirty);
|
|
2677
|
-
}
|
|
2678
|
-
else {
|
|
2679
|
-
this.empty = isFunction(this.kendoInput.isEmpty) ?
|
|
2680
|
-
this.kendoInput.isEmpty() : empty(this.kendoInput.value);
|
|
2681
|
-
}
|
|
2682
|
-
if (this.empty) {
|
|
2683
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2684
|
-
}
|
|
2685
|
-
else {
|
|
2686
|
-
this.renderer.removeClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2687
|
-
}
|
|
2688
|
-
this.changeDetectorRef.markForCheck();
|
|
2689
|
-
};
|
|
2690
|
-
__decorate([
|
|
2691
|
-
HostBinding('class.k-textbox-container'),
|
|
2692
|
-
__metadata("design:type", Boolean),
|
|
2693
|
-
__metadata("design:paramtypes", [])
|
|
2694
|
-
], TextBoxContainerComponent.prototype, "hostClasses", null);
|
|
2695
|
-
__decorate([
|
|
2696
|
-
HostBinding('class.k-textarea-wrapper'),
|
|
2697
|
-
__metadata("design:type", Boolean),
|
|
2698
|
-
__metadata("design:paramtypes", [])
|
|
2699
|
-
], TextBoxContainerComponent.prototype, "textareaElementClass", null);
|
|
2700
|
-
__decorate([
|
|
2701
|
-
HostBinding('class.k-state-focused'),
|
|
2702
|
-
__metadata("design:type", Boolean),
|
|
2703
|
-
__metadata("design:paramtypes", [])
|
|
2704
|
-
], TextBoxContainerComponent.prototype, "focusedClass", null);
|
|
2705
|
-
__decorate([
|
|
2706
|
-
HostBinding('class.k-state-invalid'),
|
|
2707
|
-
__metadata("design:type", Boolean),
|
|
2708
|
-
__metadata("design:paramtypes", [])
|
|
2709
|
-
], TextBoxContainerComponent.prototype, "invalidClass", null);
|
|
2710
|
-
__decorate([
|
|
2711
|
-
HostBinding('attr.dir'),
|
|
2712
|
-
__metadata("design:type", String)
|
|
2713
|
-
], TextBoxContainerComponent.prototype, "direction", void 0);
|
|
2714
|
-
__decorate([
|
|
2715
|
-
Input(),
|
|
2716
|
-
__metadata("design:type", String)
|
|
2717
|
-
], TextBoxContainerComponent.prototype, "id", void 0);
|
|
2718
|
-
__decorate([
|
|
2719
|
-
Input(),
|
|
2720
|
-
__metadata("design:type", String)
|
|
2721
|
-
], TextBoxContainerComponent.prototype, "floatingLabel", void 0);
|
|
2722
|
-
__decorate([
|
|
2723
|
-
ContentChild(KendoInput, { static: false }),
|
|
2724
|
-
__metadata("design:type", Object)
|
|
2725
|
-
], TextBoxContainerComponent.prototype, "kendoInput", void 0);
|
|
2726
|
-
__decorate([
|
|
2727
|
-
ContentChild(TextAreaDirective, { static: false }),
|
|
2728
|
-
__metadata("design:type", TextAreaDirective)
|
|
2729
|
-
], TextBoxContainerComponent.prototype, "textarea", void 0);
|
|
2730
|
-
__decorate([
|
|
2731
|
-
ContentChild(NgControl, { static: false }),
|
|
2732
|
-
__metadata("design:type", NgControl)
|
|
2733
|
-
], TextBoxContainerComponent.prototype, "formControl", void 0);
|
|
2734
|
-
TextBoxContainerComponent = __decorate([
|
|
2735
|
-
Component({
|
|
2736
|
-
selector: 'kendo-textbox-container',
|
|
2737
|
-
template: "\n <ng-content></ng-content>\n <label *ngIf=\"floatingLabel\" [for]=\"id\" class=\"k-label\">{{ floatingLabel }}</label>\n "
|
|
2738
|
-
}),
|
|
2739
|
-
__param(3, Optional()), __param(3, Inject(RTL)),
|
|
2740
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
2741
|
-
Renderer2,
|
|
2742
|
-
ChangeDetectorRef, Boolean])
|
|
2743
|
-
], TextBoxContainerComponent);
|
|
2744
|
-
return TextBoxContainerComponent;
|
|
2745
|
-
}());
|
|
2746
|
-
|
|
2747
|
-
/**
|
|
2748
|
-
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
2749
|
-
* Used to style the textbox of any `input` element.
|
|
2750
|
-
*
|
|
2751
|
-
* @example
|
|
2752
|
-
* ```ts-no-run
|
|
2753
|
-
* <input kendoTextBox />
|
|
2754
|
-
* <input kendoTextBox type="email" />
|
|
2755
|
-
* <input kendoTextBox type="password" />
|
|
2756
|
-
* ```
|
|
2757
|
-
*/
|
|
2758
|
-
var TextBoxDirective = /** @class */ (function () {
|
|
2759
|
-
function TextBoxDirective(renderer, inputElement, ngZone) {
|
|
2760
|
-
this.renderer = renderer;
|
|
2761
|
-
this.inputElement = inputElement;
|
|
2762
|
-
this.ngZone = ngZone;
|
|
2763
|
-
this.hostClass = true;
|
|
2764
|
-
/**
|
|
2765
|
-
* @hidden
|
|
2766
|
-
*/
|
|
2767
|
-
this.onFocus = new EventEmitter();
|
|
2768
|
-
/**
|
|
2769
|
-
* @hidden
|
|
2770
|
-
*/
|
|
2771
|
-
this.onBlur = new EventEmitter();
|
|
2772
|
-
/**
|
|
2773
|
-
* @hidden
|
|
2774
|
-
*/
|
|
2775
|
-
this.onValueChange = new EventEmitter();
|
|
2776
|
-
/**
|
|
2777
|
-
* @hidden
|
|
2778
|
-
*/
|
|
2779
|
-
this.autoFillStart = new EventEmitter();
|
|
2780
|
-
/**
|
|
2781
|
-
* @hidden
|
|
2782
|
-
*/
|
|
2783
|
-
this.autoFillEnd = new EventEmitter();
|
|
2784
|
-
this.listeners = [];
|
|
2785
|
-
}
|
|
2786
|
-
TextBoxDirective_1 = TextBoxDirective;
|
|
2787
|
-
Object.defineProperty(TextBoxDirective.prototype, "value", {
|
|
2788
|
-
/**
|
|
2789
|
-
* @hidden
|
|
2790
|
-
*/
|
|
2791
|
-
get: function () {
|
|
2792
|
-
return this.inputElement.nativeElement.value;
|
|
2793
|
-
},
|
|
2794
|
-
/**
|
|
2795
|
-
* @hidden
|
|
2796
|
-
*/
|
|
2797
|
-
set: function (text) {
|
|
2798
|
-
if (!this.inputElement) {
|
|
2799
|
-
return;
|
|
2800
|
-
}
|
|
2801
|
-
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
2802
|
-
this.onValueChange.emit();
|
|
2803
|
-
},
|
|
2804
|
-
enumerable: true,
|
|
2805
|
-
configurable: true
|
|
2806
|
-
});
|
|
2807
|
-
Object.defineProperty(TextBoxDirective.prototype, "id", {
|
|
2808
|
-
get: function () {
|
|
2809
|
-
return this.inputElement.nativeElement.id;
|
|
2810
|
-
},
|
|
2811
|
-
set: function (id) {
|
|
2812
|
-
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
2813
|
-
},
|
|
2814
|
-
enumerable: true,
|
|
2815
|
-
configurable: true
|
|
2816
|
-
});
|
|
2817
|
-
TextBoxDirective.prototype.ngAfterViewInit = function () {
|
|
2818
|
-
var _this = this;
|
|
2819
|
-
var input = this.inputElement.nativeElement;
|
|
2820
|
-
this.listeners = [
|
|
2821
|
-
this.renderer.listen(input, 'focus', function () { return _this.onFocus.emit(); }),
|
|
2822
|
-
this.renderer.listen(input, 'blur', function () { return _this.onBlur.emit(); })
|
|
2823
|
-
];
|
|
2824
|
-
this.ngZone.runOutsideAngular(function () {
|
|
2825
|
-
_this.renderer.listen(input, 'animationstart', function (e) {
|
|
2826
|
-
if (e.animationName === 'autoFillStart') {
|
|
2827
|
-
_this.autoFillStart.emit();
|
|
2828
|
-
}
|
|
2829
|
-
else if (e.animationName === 'autoFillEnd') {
|
|
2830
|
-
_this.autoFillEnd.emit();
|
|
2831
|
-
}
|
|
2832
|
-
});
|
|
2833
|
-
});
|
|
2834
|
-
};
|
|
2835
|
-
TextBoxDirective.prototype.ngOnDestroy = function () {
|
|
2836
|
-
this.listeners.forEach(function (listener) { return listener(); });
|
|
2837
|
-
};
|
|
2838
|
-
var TextBoxDirective_1;
|
|
2839
|
-
__decorate([
|
|
2840
|
-
HostBinding('class.k-textbox'),
|
|
2841
|
-
__metadata("design:type", Boolean)
|
|
2842
|
-
], TextBoxDirective.prototype, "hostClass", void 0);
|
|
2843
|
-
__decorate([
|
|
2844
|
-
Input(),
|
|
2845
|
-
__metadata("design:type", String),
|
|
2846
|
-
__metadata("design:paramtypes", [String])
|
|
2847
|
-
], TextBoxDirective.prototype, "value", null);
|
|
2848
|
-
TextBoxDirective = TextBoxDirective_1 = __decorate([
|
|
2849
|
-
Directive({
|
|
2850
|
-
selector: 'input[kendoTextBox]',
|
|
2851
|
-
providers: [{
|
|
2852
|
-
provide: KendoInput,
|
|
2853
|
-
useExisting: forwardRef(function () { return TextBoxDirective_1; })
|
|
2854
|
-
}]
|
|
2855
|
-
}),
|
|
2856
|
-
__metadata("design:paramtypes", [Renderer2,
|
|
2857
|
-
ElementRef,
|
|
2858
|
-
NgZone])
|
|
2859
|
-
], TextBoxDirective);
|
|
2860
|
-
return TextBoxDirective;
|
|
2861
|
-
}());
|
|
2862
|
-
|
|
2863
|
-
/**
|
|
2864
|
-
* @hidden
|
|
2865
|
-
*/
|
|
2866
|
-
var createMaxValidator = function (maxValue) {
|
|
2867
|
-
return function (c) {
|
|
2868
|
-
if (!isPresent(maxValue) || !isPresent(c.value) || c.value <= maxValue) {
|
|
2869
|
-
return null;
|
|
2870
|
-
}
|
|
2871
|
-
return {
|
|
2872
|
-
maxError: {
|
|
2873
|
-
maxValue: maxValue,
|
|
2874
|
-
value: c.value
|
|
2875
|
-
}
|
|
2876
|
-
};
|
|
2877
|
-
};
|
|
2878
|
-
};
|
|
2879
|
-
|
|
2880
|
-
/**
|
|
2881
|
-
* @hidden
|
|
2882
|
-
*/
|
|
2883
|
-
var createMinValidator = function (minValue) {
|
|
2884
|
-
return function (c) {
|
|
2885
|
-
if (!isPresent(minValue) || !isPresent(c.value) || c.value >= minValue) {
|
|
2886
|
-
return null;
|
|
2887
|
-
}
|
|
2888
|
-
return {
|
|
2889
|
-
minError: {
|
|
2890
|
-
minValue: minValue,
|
|
2891
|
-
value: c.value
|
|
2892
|
-
}
|
|
2893
|
-
};
|
|
2894
|
-
};
|
|
2895
|
-
};
|
|
2814
|
+
};
|
|
2815
|
+
};
|
|
2816
|
+
};
|
|
2896
2817
|
|
|
2897
2818
|
/**
|
|
2898
2819
|
* @hidden
|
|
@@ -3023,8 +2944,7 @@ var PARSABLE_DEFAULTS = {
|
|
|
3023
2944
|
min: null,
|
|
3024
2945
|
step: 1
|
|
3025
2946
|
};
|
|
3026
|
-
var FOCUSED$1 = 'k-
|
|
3027
|
-
var FORMATTED_VALUE = 'k-formatted-value';
|
|
2947
|
+
var FOCUSED$1 = 'k-focus';
|
|
3028
2948
|
/**
|
|
3029
2949
|
* Represents the [Kendo UI NumericTextBox component for Angular]({% slug overview_numerictextbox %}).
|
|
3030
2950
|
*/
|
|
@@ -3120,15 +3040,20 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3120
3040
|
* @hidden
|
|
3121
3041
|
*/
|
|
3122
3042
|
this.arrowDirection = ArrowDirection.None;
|
|
3043
|
+
this.hostClasses = true;
|
|
3123
3044
|
this.inputValue = '';
|
|
3124
3045
|
this.minValidateFn = noop;
|
|
3125
3046
|
this.maxValidateFn = noop;
|
|
3126
3047
|
this._format = "n2";
|
|
3127
3048
|
this.isPasted = false;
|
|
3128
3049
|
this.mouseDown = false;
|
|
3050
|
+
this._size = 'medium';
|
|
3051
|
+
this._rounded = 'medium';
|
|
3052
|
+
this._fillMode = 'solid';
|
|
3129
3053
|
this.ngChange = noop;
|
|
3130
3054
|
this.ngTouched = noop;
|
|
3131
3055
|
this.ngValidatorChange = noop;
|
|
3056
|
+
this.domEvents = [];
|
|
3132
3057
|
/**
|
|
3133
3058
|
* @hidden
|
|
3134
3059
|
*/
|
|
@@ -3323,9 +3248,69 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3323
3248
|
enumerable: true,
|
|
3324
3249
|
configurable: true
|
|
3325
3250
|
});
|
|
3326
|
-
Object.defineProperty(NumericTextBoxComponent.prototype, "
|
|
3251
|
+
Object.defineProperty(NumericTextBoxComponent.prototype, "size", {
|
|
3327
3252
|
get: function () {
|
|
3328
|
-
return
|
|
3253
|
+
return this._size;
|
|
3254
|
+
},
|
|
3255
|
+
/**
|
|
3256
|
+
* The size property specifies the font size and line height of the NumericTextBox
|
|
3257
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-size)).
|
|
3258
|
+
* The possible values are:
|
|
3259
|
+
* * `'small'`
|
|
3260
|
+
* * `'medium'` (default)
|
|
3261
|
+
* * `'large'`
|
|
3262
|
+
* * `null`
|
|
3263
|
+
*/
|
|
3264
|
+
set: function (size) {
|
|
3265
|
+
this.handleClasses(size, 'size');
|
|
3266
|
+
this._size = size;
|
|
3267
|
+
},
|
|
3268
|
+
enumerable: true,
|
|
3269
|
+
configurable: true
|
|
3270
|
+
});
|
|
3271
|
+
Object.defineProperty(NumericTextBoxComponent.prototype, "rounded", {
|
|
3272
|
+
get: function () {
|
|
3273
|
+
return this._rounded;
|
|
3274
|
+
},
|
|
3275
|
+
/**
|
|
3276
|
+
* The rounded property specifies the border radius of the NumericTextBox
|
|
3277
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-rounded)).
|
|
3278
|
+
* The possible values are:
|
|
3279
|
+
* * `'small'`
|
|
3280
|
+
* * `'medium'` (default)
|
|
3281
|
+
* * `'large'`
|
|
3282
|
+
* * `null`
|
|
3283
|
+
*/
|
|
3284
|
+
set: function (rounded) {
|
|
3285
|
+
this.handleClasses(rounded, 'rounded');
|
|
3286
|
+
this._rounded = rounded;
|
|
3287
|
+
},
|
|
3288
|
+
enumerable: true,
|
|
3289
|
+
configurable: true
|
|
3290
|
+
});
|
|
3291
|
+
Object.defineProperty(NumericTextBoxComponent.prototype, "fillMode", {
|
|
3292
|
+
get: function () {
|
|
3293
|
+
return this._fillMode;
|
|
3294
|
+
},
|
|
3295
|
+
/**
|
|
3296
|
+
* The fillMode property specifies the background and border styles of the NumericTextBox
|
|
3297
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-fillMode)).
|
|
3298
|
+
* The possible values are:
|
|
3299
|
+
* * `'flat'`
|
|
3300
|
+
* * `'solid'` (default)
|
|
3301
|
+
* * `'outline'`
|
|
3302
|
+
* * `null`
|
|
3303
|
+
*/
|
|
3304
|
+
set: function (fillMode) {
|
|
3305
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
3306
|
+
this._fillMode = fillMode;
|
|
3307
|
+
},
|
|
3308
|
+
enumerable: true,
|
|
3309
|
+
configurable: true
|
|
3310
|
+
});
|
|
3311
|
+
Object.defineProperty(NumericTextBoxComponent.prototype, "disableClass", {
|
|
3312
|
+
get: function () {
|
|
3313
|
+
return this.disabled;
|
|
3329
3314
|
},
|
|
3330
3315
|
enumerable: true,
|
|
3331
3316
|
configurable: true
|
|
@@ -3343,6 +3328,17 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3343
3328
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
3344
3329
|
}
|
|
3345
3330
|
this.control = this.injector.get(NgControl, null);
|
|
3331
|
+
this.ngZone.runOutsideAngular(function () {
|
|
3332
|
+
_this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'mousewheel', _this.handleWheel.bind(_this)));
|
|
3333
|
+
_this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'DOMMouseScroll', _this.handleWheel.bind(_this)));
|
|
3334
|
+
});
|
|
3335
|
+
};
|
|
3336
|
+
NumericTextBoxComponent.prototype.ngAfterViewInit = function () {
|
|
3337
|
+
var _this = this;
|
|
3338
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
3339
|
+
stylingInputs.forEach(function (input) {
|
|
3340
|
+
_this.handleClasses(_this[input], input);
|
|
3341
|
+
});
|
|
3346
3342
|
};
|
|
3347
3343
|
/**
|
|
3348
3344
|
* @hidden
|
|
@@ -3376,6 +3372,7 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3376
3372
|
this.subscriptions.unsubscribe();
|
|
3377
3373
|
}
|
|
3378
3374
|
clearTimeout(this.spinTimeout);
|
|
3375
|
+
this.domEvents.forEach(function (unbindHandler) { return unbindHandler(); });
|
|
3379
3376
|
};
|
|
3380
3377
|
/**
|
|
3381
3378
|
* @hidden
|
|
@@ -3495,18 +3492,13 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3495
3492
|
return this.isFocused;
|
|
3496
3493
|
},
|
|
3497
3494
|
set: function (value) {
|
|
3498
|
-
if (this.isFocused !== value && this.
|
|
3499
|
-
var wrap = this.
|
|
3500
|
-
var input = this.numericInput.nativeElement;
|
|
3495
|
+
if (this.isFocused !== value && this.hostElement) {
|
|
3496
|
+
var wrap = this.hostElement.nativeElement;
|
|
3501
3497
|
if (value) {
|
|
3502
3498
|
this.renderer.addClass(wrap, FOCUSED$1);
|
|
3503
|
-
if (!this.isDisabled) {
|
|
3504
|
-
this.renderer.removeClass(input, FORMATTED_VALUE);
|
|
3505
|
-
}
|
|
3506
3499
|
}
|
|
3507
3500
|
else {
|
|
3508
3501
|
this.renderer.removeClass(wrap, FOCUSED$1);
|
|
3509
|
-
this.renderer.addClass(input, FORMATTED_VALUE);
|
|
3510
3502
|
}
|
|
3511
3503
|
this.isFocused = value;
|
|
3512
3504
|
}
|
|
@@ -3815,6 +3807,16 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3815
3807
|
}
|
|
3816
3808
|
return significantChars;
|
|
3817
3809
|
};
|
|
3810
|
+
NumericTextBoxComponent.prototype.handleClasses = function (value, input) {
|
|
3811
|
+
var elem = this.hostElement.nativeElement;
|
|
3812
|
+
var classes = getStylingClasses('input', input, this[input], value);
|
|
3813
|
+
if (classes.toRemove) {
|
|
3814
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
3815
|
+
}
|
|
3816
|
+
if (classes.toAdd) {
|
|
3817
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
3818
|
+
}
|
|
3819
|
+
};
|
|
3818
3820
|
var NumericTextBoxComponent_1;
|
|
3819
3821
|
__decorate([
|
|
3820
3822
|
Input(),
|
|
@@ -3894,6 +3896,21 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3894
3896
|
Input(),
|
|
3895
3897
|
__metadata("design:type", Number)
|
|
3896
3898
|
], NumericTextBoxComponent.prototype, "maxlength", void 0);
|
|
3899
|
+
__decorate([
|
|
3900
|
+
Input(),
|
|
3901
|
+
__metadata("design:type", String),
|
|
3902
|
+
__metadata("design:paramtypes", [String])
|
|
3903
|
+
], NumericTextBoxComponent.prototype, "size", null);
|
|
3904
|
+
__decorate([
|
|
3905
|
+
Input(),
|
|
3906
|
+
__metadata("design:type", String),
|
|
3907
|
+
__metadata("design:paramtypes", [String])
|
|
3908
|
+
], NumericTextBoxComponent.prototype, "rounded", null);
|
|
3909
|
+
__decorate([
|
|
3910
|
+
Input(),
|
|
3911
|
+
__metadata("design:type", String),
|
|
3912
|
+
__metadata("design:paramtypes", [String])
|
|
3913
|
+
], NumericTextBoxComponent.prototype, "fillMode", null);
|
|
3897
3914
|
__decorate([
|
|
3898
3915
|
Output(),
|
|
3899
3916
|
__metadata("design:type", EventEmitter)
|
|
@@ -3910,20 +3927,20 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3910
3927
|
ViewChild('numericInput', { static: true }),
|
|
3911
3928
|
__metadata("design:type", ElementRef)
|
|
3912
3929
|
], NumericTextBoxComponent.prototype, "numericInput", void 0);
|
|
3913
|
-
__decorate([
|
|
3914
|
-
ViewChild('numericWrap', { static: true }),
|
|
3915
|
-
__metadata("design:type", ElementRef)
|
|
3916
|
-
], NumericTextBoxComponent.prototype, "numericWrap", void 0);
|
|
3917
3930
|
__decorate([
|
|
3918
3931
|
HostBinding('attr.dir'),
|
|
3919
3932
|
__metadata("design:type", String)
|
|
3920
3933
|
], NumericTextBoxComponent.prototype, "direction", void 0);
|
|
3921
3934
|
__decorate([
|
|
3922
|
-
HostBinding('class.k-
|
|
3923
|
-
HostBinding('class.k-numerictextbox'),
|
|
3935
|
+
HostBinding('class.k-disabled'),
|
|
3924
3936
|
__metadata("design:type", Boolean),
|
|
3925
3937
|
__metadata("design:paramtypes", [])
|
|
3926
|
-
], NumericTextBoxComponent.prototype, "
|
|
3938
|
+
], NumericTextBoxComponent.prototype, "disableClass", null);
|
|
3939
|
+
__decorate([
|
|
3940
|
+
HostBinding('class.k-input'),
|
|
3941
|
+
HostBinding('class.k-numerictextbox'),
|
|
3942
|
+
__metadata("design:type", Boolean)
|
|
3943
|
+
], NumericTextBoxComponent.prototype, "hostClasses", void 0);
|
|
3927
3944
|
NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
3928
3945
|
Component({
|
|
3929
3946
|
exportAs: 'kendoNumericTextBox',
|
|
@@ -3935,7 +3952,7 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3935
3952
|
{ provide: KendoInput, useExisting: forwardRef(function () { return NumericTextBoxComponent_1; }) }
|
|
3936
3953
|
],
|
|
3937
3954
|
selector: 'kendo-numerictextbox',
|
|
3938
|
-
template: "\n <ng-container kendoNumericTextBoxLocalizedMessages\n i18n-increment=\"kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox\"\n increment=\"Increase value\"\n i18n-decrement=\"kendo.numerictextbox.decrement|The title for the **Decrement** button in the NumericTextBox\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n
|
|
3955
|
+
template: "\n <ng-container kendoNumericTextBoxLocalizedMessages\n i18n-increment=\"kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox\"\n increment=\"Increase value\"\n i18n-decrement=\"kendo.numerictextbox.decrement|The title for the **Decrement** button in the NumericTextBox\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n role=\"spinbutton\"\n class=\"k-input-inner\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n [id]=\"focusableId\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value\"\n [attr.title]=\"title\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxLength]=\"maxlength\"\n [tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: handleMouseDown,\n dragenter: handleDragEnter,\n keydown: handleKeyDown,\n input: handleInput,\n focus: handleFocus,\n blur: handleBlur,\n paste: handlePaste\n }\"\n #numericInput />\n <span\n class=\"k-input-spinner k-spin-button\" *ngIf=\"spinners\"\n [kendoEventsOutsideAngular]=\"{ mouseup: releaseArrow, mouseleave: releaseArrow }\"\n >\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: increasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"incrementTitle\"\n [title]=\"incrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Up\"\n class=\"k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: decreasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"decrementTitle\"\n [title]=\"decrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Down\"\n class=\"k-spinner-decrease k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
|
|
3939
3956
|
}),
|
|
3940
3957
|
__metadata("design:paramtypes", [IntlService,
|
|
3941
3958
|
Renderer2,
|
|
@@ -4465,7 +4482,7 @@ var MaskingService = /** @class */ (function () {
|
|
|
4465
4482
|
}());
|
|
4466
4483
|
|
|
4467
4484
|
var resolvedPromise = Promise.resolve(null);
|
|
4468
|
-
var FOCUSED$2 = 'k-
|
|
4485
|
+
var FOCUSED$2 = 'k-focus';
|
|
4469
4486
|
/**
|
|
4470
4487
|
* Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
|
|
4471
4488
|
*
|
|
@@ -4599,6 +4616,9 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4599
4616
|
};
|
|
4600
4617
|
this.isPasted = false;
|
|
4601
4618
|
this.selection = [0, 0];
|
|
4619
|
+
this._size = 'medium';
|
|
4620
|
+
this._rounded = 'medium';
|
|
4621
|
+
this._fillMode = 'solid';
|
|
4602
4622
|
/**
|
|
4603
4623
|
* @hidden
|
|
4604
4624
|
*/
|
|
@@ -4652,6 +4672,66 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4652
4672
|
this.updateService();
|
|
4653
4673
|
}
|
|
4654
4674
|
MaskedTextBoxComponent_1 = MaskedTextBoxComponent;
|
|
4675
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "size", {
|
|
4676
|
+
get: function () {
|
|
4677
|
+
return this._size;
|
|
4678
|
+
},
|
|
4679
|
+
/**
|
|
4680
|
+
* The size property specifies the font size and line height of the MaskedTextBox
|
|
4681
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
|
|
4682
|
+
* The possible values are:
|
|
4683
|
+
* * `'small'`
|
|
4684
|
+
* * `'medium'` (default)
|
|
4685
|
+
* * `'large'`
|
|
4686
|
+
* * `null`
|
|
4687
|
+
*/
|
|
4688
|
+
set: function (size) {
|
|
4689
|
+
this.handleClasses(size, 'size');
|
|
4690
|
+
this._size = size;
|
|
4691
|
+
},
|
|
4692
|
+
enumerable: true,
|
|
4693
|
+
configurable: true
|
|
4694
|
+
});
|
|
4695
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "rounded", {
|
|
4696
|
+
get: function () {
|
|
4697
|
+
return this._rounded;
|
|
4698
|
+
},
|
|
4699
|
+
/**
|
|
4700
|
+
* The rounded property specifies the border radius of the MaskedTextBox
|
|
4701
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-rounded)).
|
|
4702
|
+
* The possible values are:
|
|
4703
|
+
* * `'small'`
|
|
4704
|
+
* * `'medium'` (default)
|
|
4705
|
+
* * `'large'`
|
|
4706
|
+
* * `null`
|
|
4707
|
+
*/
|
|
4708
|
+
set: function (rounded) {
|
|
4709
|
+
this.handleClasses(rounded, 'rounded');
|
|
4710
|
+
this._rounded = rounded;
|
|
4711
|
+
},
|
|
4712
|
+
enumerable: true,
|
|
4713
|
+
configurable: true
|
|
4714
|
+
});
|
|
4715
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "fillMode", {
|
|
4716
|
+
get: function () {
|
|
4717
|
+
return this._fillMode;
|
|
4718
|
+
},
|
|
4719
|
+
/**
|
|
4720
|
+
* The fillMode property specifies the background and border styles of the MaskedTexBox
|
|
4721
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-fillMode)).
|
|
4722
|
+
* The possible values are:
|
|
4723
|
+
* * `flat`
|
|
4724
|
+
* * `solid` (default)
|
|
4725
|
+
* * `outline`
|
|
4726
|
+
* * `null`
|
|
4727
|
+
*/
|
|
4728
|
+
set: function (fillMode) {
|
|
4729
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
4730
|
+
this._fillMode = fillMode;
|
|
4731
|
+
},
|
|
4732
|
+
enumerable: true,
|
|
4733
|
+
configurable: true
|
|
4734
|
+
});
|
|
4655
4735
|
Object.defineProperty(MaskedTextBoxComponent.prototype, "hostDisabledClass", {
|
|
4656
4736
|
get: function () {
|
|
4657
4737
|
return this.disabled;
|
|
@@ -4691,9 +4771,16 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4691
4771
|
}
|
|
4692
4772
|
this.control = this.injector.get(NgControl, null);
|
|
4693
4773
|
};
|
|
4774
|
+
MaskedTextBoxComponent.prototype.ngAfterViewInit = function () {
|
|
4775
|
+
var _this = this;
|
|
4776
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
4777
|
+
stylingInputs.forEach(function (input) {
|
|
4778
|
+
_this.handleClasses(_this[input], input);
|
|
4779
|
+
});
|
|
4780
|
+
};
|
|
4694
4781
|
/**
|
|
4695
4782
|
* @hidden
|
|
4696
|
-
* Used by the
|
|
4783
|
+
* Used by the FloatingLabel to determine if the MaskedTextBox is empty.
|
|
4697
4784
|
*/
|
|
4698
4785
|
MaskedTextBoxComponent.prototype.isEmpty = function () {
|
|
4699
4786
|
if (this.input) {
|
|
@@ -4945,6 +5032,16 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4945
5032
|
}
|
|
4946
5033
|
return present ? value : '';
|
|
4947
5034
|
};
|
|
5035
|
+
MaskedTextBoxComponent.prototype.handleClasses = function (value, input) {
|
|
5036
|
+
var elem = this.hostElement.nativeElement;
|
|
5037
|
+
var classes = getStylingClasses('input', input, this[input], value);
|
|
5038
|
+
if (classes.toRemove) {
|
|
5039
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
5040
|
+
}
|
|
5041
|
+
if (classes.toAdd) {
|
|
5042
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
5043
|
+
}
|
|
5044
|
+
};
|
|
4948
5045
|
var MaskedTextBoxComponent_1;
|
|
4949
5046
|
__decorate([
|
|
4950
5047
|
Input(),
|
|
@@ -4962,17 +5059,32 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4962
5059
|
Input(),
|
|
4963
5060
|
__metadata("design:type", String)
|
|
4964
5061
|
], MaskedTextBoxComponent.prototype, "title", void 0);
|
|
5062
|
+
__decorate([
|
|
5063
|
+
Input(),
|
|
5064
|
+
__metadata("design:type", String),
|
|
5065
|
+
__metadata("design:paramtypes", [String])
|
|
5066
|
+
], MaskedTextBoxComponent.prototype, "size", null);
|
|
5067
|
+
__decorate([
|
|
5068
|
+
Input(),
|
|
5069
|
+
__metadata("design:type", String),
|
|
5070
|
+
__metadata("design:paramtypes", [String])
|
|
5071
|
+
], MaskedTextBoxComponent.prototype, "rounded", null);
|
|
5072
|
+
__decorate([
|
|
5073
|
+
Input(),
|
|
5074
|
+
__metadata("design:type", String),
|
|
5075
|
+
__metadata("design:paramtypes", [String])
|
|
5076
|
+
], MaskedTextBoxComponent.prototype, "fillMode", null);
|
|
4965
5077
|
__decorate([
|
|
4966
5078
|
HostBinding('attr.dir'),
|
|
4967
5079
|
__metadata("design:type", String)
|
|
4968
5080
|
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
4969
5081
|
__decorate([
|
|
4970
|
-
HostBinding('class.k-
|
|
5082
|
+
HostBinding('class.k-input'),
|
|
4971
5083
|
HostBinding('class.k-maskedtextbox'),
|
|
4972
5084
|
__metadata("design:type", Boolean)
|
|
4973
5085
|
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
4974
5086
|
__decorate([
|
|
4975
|
-
HostBinding('class.k-
|
|
5087
|
+
HostBinding('class.k-disabled'),
|
|
4976
5088
|
__metadata("design:type", Boolean),
|
|
4977
5089
|
__metadata("design:paramtypes", [])
|
|
4978
5090
|
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
@@ -5067,7 +5179,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
5067
5179
|
}
|
|
5068
5180
|
],
|
|
5069
5181
|
selector: 'kendo-maskedtextbox',
|
|
5070
|
-
template: "\n <input type=\"text\"\n #input\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-
|
|
5182
|
+
template: "\n <input type=\"text\"\n #input\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input-inner\"\n [id]=\"focusableId\"\n [tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleFocus,\n blur: handleBlur,\n click: handleClick,\n dragstart: handleDragDrop,\n drop: handleDragDrop\n }\"\n />\n "
|
|
5071
5183
|
}),
|
|
5072
5184
|
__param(6, Optional()), __param(6, Inject(RTL)),
|
|
5073
5185
|
__metadata("design:paramtypes", [MaskingService,
|
|
@@ -5817,7 +5929,7 @@ var TextBoxPrefixTemplateDirective = /** @class */ (function () {
|
|
|
5817
5929
|
return TextBoxPrefixTemplateDirective;
|
|
5818
5930
|
}());
|
|
5819
5931
|
|
|
5820
|
-
var FOCUSED$3 = 'k-
|
|
5932
|
+
var FOCUSED$3 = 'k-focus';
|
|
5821
5933
|
var TextBoxComponent = /** @class */ (function () {
|
|
5822
5934
|
function TextBoxComponent(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
5823
5935
|
var _this = this;
|
|
@@ -5952,9 +6064,12 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
5952
6064
|
* ```
|
|
5953
6065
|
*/
|
|
5954
6066
|
this.onBlur = new EventEmitter();
|
|
5955
|
-
this.
|
|
6067
|
+
this.hostClasses = true;
|
|
5956
6068
|
this._isFocused = false;
|
|
5957
6069
|
this.focusChangedProgrammatically = false;
|
|
6070
|
+
this._size = 'medium';
|
|
6071
|
+
this._rounded = 'medium';
|
|
6072
|
+
this._fillMode = 'solid';
|
|
5958
6073
|
/**
|
|
5959
6074
|
* @hidden
|
|
5960
6075
|
*/
|
|
@@ -6009,6 +6124,70 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6009
6124
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
6010
6125
|
}
|
|
6011
6126
|
TextBoxComponent_1 = TextBoxComponent;
|
|
6127
|
+
Object.defineProperty(TextBoxComponent.prototype, "size", {
|
|
6128
|
+
get: function () {
|
|
6129
|
+
return this._size;
|
|
6130
|
+
},
|
|
6131
|
+
/**
|
|
6132
|
+
* The size property specifies the font size and line height of the TextBox
|
|
6133
|
+
* ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
6134
|
+
*
|
|
6135
|
+
* The possible values are:
|
|
6136
|
+
* * `'small'`
|
|
6137
|
+
* * `'medium'` (default)
|
|
6138
|
+
* * `'large'`
|
|
6139
|
+
* * `null`
|
|
6140
|
+
*/
|
|
6141
|
+
set: function (size) {
|
|
6142
|
+
this.handleClasses(size, 'size');
|
|
6143
|
+
this._size = size;
|
|
6144
|
+
},
|
|
6145
|
+
enumerable: true,
|
|
6146
|
+
configurable: true
|
|
6147
|
+
});
|
|
6148
|
+
Object.defineProperty(TextBoxComponent.prototype, "rounded", {
|
|
6149
|
+
get: function () {
|
|
6150
|
+
return this._rounded;
|
|
6151
|
+
},
|
|
6152
|
+
/**
|
|
6153
|
+
* The rounded property specifies the border radius of the TextBox
|
|
6154
|
+
* ([see example]({% slug appearance_textbox %}#toc-rounded)).
|
|
6155
|
+
*
|
|
6156
|
+
* The possible values are:
|
|
6157
|
+
* * `'small'`
|
|
6158
|
+
* * `'medium'` (default)
|
|
6159
|
+
* * `'large'`
|
|
6160
|
+
* * `'full'`
|
|
6161
|
+
* * `null`
|
|
6162
|
+
*/
|
|
6163
|
+
set: function (rounded) {
|
|
6164
|
+
this.handleClasses(rounded, 'rounded');
|
|
6165
|
+
this._rounded = rounded;
|
|
6166
|
+
},
|
|
6167
|
+
enumerable: true,
|
|
6168
|
+
configurable: true
|
|
6169
|
+
});
|
|
6170
|
+
Object.defineProperty(TextBoxComponent.prototype, "fillMode", {
|
|
6171
|
+
get: function () {
|
|
6172
|
+
return this._fillMode;
|
|
6173
|
+
},
|
|
6174
|
+
/**
|
|
6175
|
+
* The fillMode property specifies the background and border styles of the TextBox
|
|
6176
|
+
* ([see example]({% slug appearance_textbox %}#toc-fillMode)).
|
|
6177
|
+
*
|
|
6178
|
+
* The possible values are:
|
|
6179
|
+
* * `'flat'`
|
|
6180
|
+
* * `'solid'` (default)
|
|
6181
|
+
* * `'outline'`
|
|
6182
|
+
* * `null`
|
|
6183
|
+
*/
|
|
6184
|
+
set: function (fillMode) {
|
|
6185
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
6186
|
+
this._fillMode = fillMode;
|
|
6187
|
+
},
|
|
6188
|
+
enumerable: true,
|
|
6189
|
+
configurable: true
|
|
6190
|
+
});
|
|
6012
6191
|
Object.defineProperty(TextBoxComponent.prototype, "tabIndex", {
|
|
6013
6192
|
get: function () {
|
|
6014
6193
|
return this.tabindex;
|
|
@@ -6085,6 +6264,10 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6085
6264
|
}
|
|
6086
6265
|
}));
|
|
6087
6266
|
});
|
|
6267
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
6268
|
+
stylingInputs.forEach(function (input) {
|
|
6269
|
+
_this.handleClasses(_this[input], input);
|
|
6270
|
+
});
|
|
6088
6271
|
};
|
|
6089
6272
|
TextBoxComponent.prototype.ngOnChanges = function (changes) {
|
|
6090
6273
|
if (changes.disabled || changes.readonly || changes.value) {
|
|
@@ -6218,8 +6401,8 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6218
6401
|
*/
|
|
6219
6402
|
get: function () {
|
|
6220
6403
|
return this.successIcon
|
|
6221
|
-
? "
|
|
6222
|
-
: "k-
|
|
6404
|
+
? "" + this.successIcon
|
|
6405
|
+
: "k-validation-icon k-icon k-i-check";
|
|
6223
6406
|
},
|
|
6224
6407
|
enumerable: true,
|
|
6225
6408
|
configurable: true
|
|
@@ -6230,8 +6413,8 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6230
6413
|
*/
|
|
6231
6414
|
get: function () {
|
|
6232
6415
|
return this.errorIcon
|
|
6233
|
-
? "
|
|
6234
|
-
: "k-
|
|
6416
|
+
? "" + this.errorIcon
|
|
6417
|
+
: "k-validation-icon k-icon k-i-warning";
|
|
6235
6418
|
},
|
|
6236
6419
|
enumerable: true,
|
|
6237
6420
|
configurable: true
|
|
@@ -6243,7 +6426,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6243
6426
|
get: function () {
|
|
6244
6427
|
return this.clearButtonIcon
|
|
6245
6428
|
? this.clearButtonIcon
|
|
6246
|
-
: "k-icon k-i-
|
|
6429
|
+
: "k-icon k-i-x";
|
|
6247
6430
|
},
|
|
6248
6431
|
enumerable: true,
|
|
6249
6432
|
configurable: true
|
|
@@ -6322,6 +6505,16 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6322
6505
|
_this.isFocused = false;
|
|
6323
6506
|
});
|
|
6324
6507
|
};
|
|
6508
|
+
TextBoxComponent.prototype.handleClasses = function (value, input) {
|
|
6509
|
+
var elem = this.hostElement.nativeElement;
|
|
6510
|
+
var classes = getStylingClasses('input', input, this[input], value);
|
|
6511
|
+
if (classes.toRemove) {
|
|
6512
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
6513
|
+
}
|
|
6514
|
+
if (classes.toAdd) {
|
|
6515
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
6516
|
+
}
|
|
6517
|
+
};
|
|
6325
6518
|
var TextBoxComponent_1;
|
|
6326
6519
|
__decorate([
|
|
6327
6520
|
Input(),
|
|
@@ -6375,6 +6568,21 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6375
6568
|
Input(),
|
|
6376
6569
|
__metadata("design:type", String)
|
|
6377
6570
|
], TextBoxComponent.prototype, "clearButtonIcon", void 0);
|
|
6571
|
+
__decorate([
|
|
6572
|
+
Input(),
|
|
6573
|
+
__metadata("design:type", String),
|
|
6574
|
+
__metadata("design:paramtypes", [String])
|
|
6575
|
+
], TextBoxComponent.prototype, "size", null);
|
|
6576
|
+
__decorate([
|
|
6577
|
+
Input(),
|
|
6578
|
+
__metadata("design:type", String),
|
|
6579
|
+
__metadata("design:paramtypes", [String])
|
|
6580
|
+
], TextBoxComponent.prototype, "rounded", null);
|
|
6581
|
+
__decorate([
|
|
6582
|
+
Input(),
|
|
6583
|
+
__metadata("design:type", String),
|
|
6584
|
+
__metadata("design:paramtypes", [String])
|
|
6585
|
+
], TextBoxComponent.prototype, "fillMode", null);
|
|
6378
6586
|
__decorate([
|
|
6379
6587
|
Input(),
|
|
6380
6588
|
__metadata("design:type", Number),
|
|
@@ -6421,14 +6629,15 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6421
6629
|
__metadata("design:type", TextBoxPrefixTemplateDirective)
|
|
6422
6630
|
], TextBoxComponent.prototype, "prefixTemplate", void 0);
|
|
6423
6631
|
__decorate([
|
|
6424
|
-
HostBinding('class.k-
|
|
6632
|
+
HostBinding('class.k-disabled'),
|
|
6425
6633
|
__metadata("design:type", Boolean),
|
|
6426
6634
|
__metadata("design:paramtypes", [])
|
|
6427
6635
|
], TextBoxComponent.prototype, "disabledClass", null);
|
|
6428
6636
|
__decorate([
|
|
6429
6637
|
HostBinding('class.k-textbox'),
|
|
6638
|
+
HostBinding('class.k-input'),
|
|
6430
6639
|
__metadata("design:type", Boolean)
|
|
6431
|
-
], TextBoxComponent.prototype, "
|
|
6640
|
+
], TextBoxComponent.prototype, "hostClasses", void 0);
|
|
6432
6641
|
__decorate([
|
|
6433
6642
|
HostBinding('attr.dir'),
|
|
6434
6643
|
__metadata("design:type", String)
|
|
@@ -6447,7 +6656,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6447
6656
|
{ provide: KendoInput, useExisting: forwardRef(function () { return TextBoxComponent_1; }) }
|
|
6448
6657
|
],
|
|
6449
6658
|
selector: 'kendo-textbox',
|
|
6450
|
-
template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input\n class=\"k-input\"\n #input\n [id]=\"focusableId\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\"/>\n <span class=\"k-input-suffix\">\n <span *ngIf=\"hasErrors\" [ngClass]=\"errorIconClasses\"></span>\n <span *ngIf=\"isSuccessful\" [ngClass]=\"successIconClasses\"></span>\n <span\n role=\"button\"\n class=\"k-clear-value\"\n *ngIf=\"showClearButton\"\n (click)=\"clearValue()\"\n (mousedown)=\"$event.preventDefault()\"\n [tabindex]=\"tabIndex\"\n [attr.aria-label]=\"clearTitle()\"\n [title]=\"clearTitle()\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <span [ngClass]=\"clearButtonClasses\"></span>\n </span>\n <ng-template\n *ngIf=\"suffixTemplate\"\n [ngTemplateOutlet]=\"suffixTemplate?.templateRef\">\n </ng-template>\n </span>\n "
|
|
6659
|
+
template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input\n class=\"k-input-inner\"\n #input\n [id]=\"focusableId\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\"/>\n <span class=\"k-input-suffix\">\n <span *ngIf=\"hasErrors\" [ngClass]=\"errorIconClasses\"></span>\n <span *ngIf=\"isSuccessful\" [ngClass]=\"successIconClasses\"></span>\n <span\n role=\"button\"\n class=\"k-clear-value\"\n *ngIf=\"showClearButton\"\n (click)=\"clearValue()\"\n (mousedown)=\"$event.preventDefault()\"\n [tabindex]=\"tabIndex\"\n [attr.aria-label]=\"clearTitle()\"\n [title]=\"clearTitle()\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <span [ngClass]=\"clearButtonClasses\"></span>\n </span>\n <ng-template\n *ngIf=\"suffixTemplate\"\n [ngTemplateOutlet]=\"suffixTemplate?.templateRef\">\n </ng-template>\n </span>\n "
|
|
6451
6660
|
}),
|
|
6452
6661
|
__metadata("design:paramtypes", [LocalizationService,
|
|
6453
6662
|
NgZone,
|
|
@@ -6631,7 +6840,6 @@ var TextBoxModule = /** @class */ (function () {
|
|
|
6631
6840
|
NgModule({
|
|
6632
6841
|
declarations: [
|
|
6633
6842
|
TextBoxDirective,
|
|
6634
|
-
TextBoxContainerComponent,
|
|
6635
6843
|
TextBoxComponent,
|
|
6636
6844
|
TextBoxSuffixTemplateDirective,
|
|
6637
6845
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6640,7 +6848,6 @@ var TextBoxModule = /** @class */ (function () {
|
|
|
6640
6848
|
],
|
|
6641
6849
|
exports: [
|
|
6642
6850
|
TextBoxDirective,
|
|
6643
|
-
TextBoxContainerComponent,
|
|
6644
6851
|
TextBoxComponent,
|
|
6645
6852
|
TextBoxSuffixTemplateDirective,
|
|
6646
6853
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6779,7 +6986,7 @@ var TextFieldsBase = /** @class */ (function () {
|
|
|
6779
6986
|
__metadata("design:type", ElementRef)
|
|
6780
6987
|
], TextFieldsBase.prototype, "input", void 0);
|
|
6781
6988
|
__decorate([
|
|
6782
|
-
HostBinding('class.k-
|
|
6989
|
+
HostBinding('class.k-disabled'),
|
|
6783
6990
|
__metadata("design:type", Boolean),
|
|
6784
6991
|
__metadata("design:paramtypes", [])
|
|
6785
6992
|
], TextFieldsBase.prototype, "disabledClass", null);
|
|
@@ -6797,7 +7004,7 @@ var resizeClasses = {
|
|
|
6797
7004
|
'none': 'k-resize-none',
|
|
6798
7005
|
'auto': 'k-resize-none'
|
|
6799
7006
|
};
|
|
6800
|
-
var FOCUSED$4 = 'k-
|
|
7007
|
+
var FOCUSED$4 = 'k-focus';
|
|
6801
7008
|
/**
|
|
6802
7009
|
* Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
|
|
6803
7010
|
*/
|
|
@@ -6815,7 +7022,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
6815
7022
|
* @hidden
|
|
6816
7023
|
*/
|
|
6817
7024
|
_this.focusableId = "k-" + guid();
|
|
6818
|
-
_this.
|
|
7025
|
+
_this.hostClasses = true;
|
|
6819
7026
|
/**
|
|
6820
7027
|
* Specifies the flow direction of the TextArea sections. This property is useful when adornments are used, in order to specify
|
|
6821
7028
|
* their position in relation to the textarea element.
|
|
@@ -6889,6 +7096,9 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
6889
7096
|
* When the component value is changed programmatically or via its form control binding, the valueChange event is not emitted.
|
|
6890
7097
|
*/
|
|
6891
7098
|
_this.valueChange = new EventEmitter();
|
|
7099
|
+
_this._size = 'medium';
|
|
7100
|
+
_this._rounded = 'medium';
|
|
7101
|
+
_this._fillMode = 'solid';
|
|
6892
7102
|
/**
|
|
6893
7103
|
* @hidden
|
|
6894
7104
|
*/
|
|
@@ -6958,6 +7168,69 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
6958
7168
|
enumerable: true,
|
|
6959
7169
|
configurable: true
|
|
6960
7170
|
});
|
|
7171
|
+
Object.defineProperty(TextAreaComponent.prototype, "size", {
|
|
7172
|
+
get: function () {
|
|
7173
|
+
return this._size;
|
|
7174
|
+
},
|
|
7175
|
+
/**
|
|
7176
|
+
* The size property specifies the font size and line height of the TextArea
|
|
7177
|
+
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
7178
|
+
*
|
|
7179
|
+
* The possible values are:
|
|
7180
|
+
* * `'small'`
|
|
7181
|
+
* * `'medium'` (default)
|
|
7182
|
+
* * `'large'`
|
|
7183
|
+
* * `null`
|
|
7184
|
+
*/
|
|
7185
|
+
set: function (size) {
|
|
7186
|
+
this.handleClasses(size, 'size');
|
|
7187
|
+
this._size = size;
|
|
7188
|
+
},
|
|
7189
|
+
enumerable: true,
|
|
7190
|
+
configurable: true
|
|
7191
|
+
});
|
|
7192
|
+
Object.defineProperty(TextAreaComponent.prototype, "rounded", {
|
|
7193
|
+
get: function () {
|
|
7194
|
+
return this._rounded;
|
|
7195
|
+
},
|
|
7196
|
+
/**
|
|
7197
|
+
* The rounded property specifies the border radius of the TextArea
|
|
7198
|
+
* ([see example]({% slug appearance_textarea %}#toc-rounded)).
|
|
7199
|
+
*
|
|
7200
|
+
* The possible values are:
|
|
7201
|
+
* * `'small'`
|
|
7202
|
+
* * `'medium'` (default)
|
|
7203
|
+
* * `'large'`
|
|
7204
|
+
* * `null`
|
|
7205
|
+
*/
|
|
7206
|
+
set: function (rounded) {
|
|
7207
|
+
this.handleClasses(rounded, 'rounded');
|
|
7208
|
+
this._rounded = rounded;
|
|
7209
|
+
},
|
|
7210
|
+
enumerable: true,
|
|
7211
|
+
configurable: true
|
|
7212
|
+
});
|
|
7213
|
+
Object.defineProperty(TextAreaComponent.prototype, "fillMode", {
|
|
7214
|
+
get: function () {
|
|
7215
|
+
return this._fillMode;
|
|
7216
|
+
},
|
|
7217
|
+
/**
|
|
7218
|
+
* The fillMode property specifies the background and border styles of the TextArea
|
|
7219
|
+
* ([see example]({% slug appearance_textarea %}#toc-fillMode)).
|
|
7220
|
+
*
|
|
7221
|
+
* The possible values are:
|
|
7222
|
+
* * `'flat'`
|
|
7223
|
+
* * `'solid'` (default)
|
|
7224
|
+
* * `'outline'`
|
|
7225
|
+
* * `null`
|
|
7226
|
+
*/
|
|
7227
|
+
set: function (fillMode) {
|
|
7228
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
7229
|
+
this._fillMode = fillMode;
|
|
7230
|
+
},
|
|
7231
|
+
enumerable: true,
|
|
7232
|
+
configurable: true
|
|
7233
|
+
});
|
|
6961
7234
|
TextAreaComponent.prototype.ngAfterViewInit = function () {
|
|
6962
7235
|
var _this = this;
|
|
6963
7236
|
var hostElement = this.hostElement.nativeElement;
|
|
@@ -7005,6 +7278,10 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7005
7278
|
}
|
|
7006
7279
|
}));
|
|
7007
7280
|
});
|
|
7281
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
7282
|
+
stylingInputs.forEach(function (input) {
|
|
7283
|
+
_this.handleClasses(_this[input], input);
|
|
7284
|
+
});
|
|
7008
7285
|
};
|
|
7009
7286
|
TextAreaComponent.prototype.ngOnInit = function () {
|
|
7010
7287
|
var _this = this;
|
|
@@ -7178,6 +7455,16 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7178
7455
|
this.setSelection(0, this.value.length);
|
|
7179
7456
|
}
|
|
7180
7457
|
};
|
|
7458
|
+
TextAreaComponent.prototype.handleClasses = function (value, input) {
|
|
7459
|
+
var elem = this.hostElement.nativeElement;
|
|
7460
|
+
var classes = getStylingClasses('input', input, this[input], value);
|
|
7461
|
+
if (classes.toRemove) {
|
|
7462
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
7463
|
+
}
|
|
7464
|
+
if (classes.toAdd) {
|
|
7465
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
7466
|
+
}
|
|
7467
|
+
};
|
|
7181
7468
|
var TextAreaComponent_1;
|
|
7182
7469
|
__decorate([
|
|
7183
7470
|
Input(),
|
|
@@ -7185,8 +7472,9 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7185
7472
|
], TextAreaComponent.prototype, "focusableId", void 0);
|
|
7186
7473
|
__decorate([
|
|
7187
7474
|
HostBinding('class.k-textarea'),
|
|
7475
|
+
HostBinding('class.k-input'),
|
|
7188
7476
|
__metadata("design:type", Boolean)
|
|
7189
|
-
], TextAreaComponent.prototype, "
|
|
7477
|
+
], TextAreaComponent.prototype, "hostClasses", void 0);
|
|
7190
7478
|
__decorate([
|
|
7191
7479
|
HostBinding('class.k-flex-col'),
|
|
7192
7480
|
__metadata("design:type", Boolean),
|
|
@@ -7226,6 +7514,21 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7226
7514
|
Input(),
|
|
7227
7515
|
__metadata("design:type", String)
|
|
7228
7516
|
], TextAreaComponent.prototype, "resizable", void 0);
|
|
7517
|
+
__decorate([
|
|
7518
|
+
Input(),
|
|
7519
|
+
__metadata("design:type", String),
|
|
7520
|
+
__metadata("design:paramtypes", [String])
|
|
7521
|
+
], TextAreaComponent.prototype, "size", null);
|
|
7522
|
+
__decorate([
|
|
7523
|
+
Input(),
|
|
7524
|
+
__metadata("design:type", String),
|
|
7525
|
+
__metadata("design:paramtypes", [String])
|
|
7526
|
+
], TextAreaComponent.prototype, "rounded", null);
|
|
7527
|
+
__decorate([
|
|
7528
|
+
Input(),
|
|
7529
|
+
__metadata("design:type", String),
|
|
7530
|
+
__metadata("design:paramtypes", [String])
|
|
7531
|
+
], TextAreaComponent.prototype, "fillMode", null);
|
|
7229
7532
|
__decorate([
|
|
7230
7533
|
Output('focus'),
|
|
7231
7534
|
__metadata("design:type", EventEmitter)
|
|
@@ -7252,7 +7555,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7252
7555
|
{ provide: KendoInput, useExisting: forwardRef(function () { return TextAreaComponent_1; }) }
|
|
7253
7556
|
],
|
|
7254
7557
|
selector: 'kendo-textarea',
|
|
7255
|
-
template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n "
|
|
7558
|
+
template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input-inner\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n "
|
|
7256
7559
|
}),
|
|
7257
7560
|
__metadata("design:paramtypes", [LocalizationService,
|
|
7258
7561
|
NgZone,
|
|
@@ -8044,7 +8347,7 @@ var ColorInputComponent = /** @class */ (function () {
|
|
|
8044
8347
|
ColorInputComponent = __decorate([
|
|
8045
8348
|
Component({
|
|
8046
8349
|
selector: 'kendo-colorinput',
|
|
8047
|
-
template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-
|
|
8350
|
+
template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.aria-label]=\"formatButtonTitle\"\n [attr.title]=\"formatButtonTitle\"\n >\n <span class=\"k-button-icon k-icon k-i-arrows-kpi\"></span>\n </button>\n </div>\n <div *ngIf=\"formatView === 'hex'\" class=\"k-vstack\">\n <input\n #hexInput\n [id]=\"focusableId\"\n class=\"k-textbox k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
|
|
8048
8351
|
}),
|
|
8049
8352
|
__metadata("design:paramtypes", [ElementRef,
|
|
8050
8353
|
Renderer2,
|
|
@@ -8699,7 +9002,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8699
9002
|
useValue: 'kendo.colorgradient'
|
|
8700
9003
|
}
|
|
8701
9004
|
],
|
|
8702
|
-
template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-flat k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
|
|
9005
|
+
template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
|
|
8703
9006
|
styles: ["\n .k-clear-color {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n .k-colorgradient-slider.k-align-self-end {\n height: 140px;\n }\n\n .k-color-contrast-svg {\n position: absolute;\n overflow: visible;\n pointer-events: none;\n left: 0px;\n top: 0px;\n }\n "]
|
|
8704
9007
|
}),
|
|
8705
9008
|
__metadata("design:paramtypes", [ElementRef,
|
|
@@ -9371,7 +9674,7 @@ var FlatColorPickerHeaderComponent = /** @class */ (function () {
|
|
|
9371
9674
|
FlatColorPickerHeaderComponent = __decorate([
|
|
9372
9675
|
Component({
|
|
9373
9676
|
selector: '[kendoFlatColorPickerHeader]',
|
|
9374
|
-
template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-
|
|
9677
|
+
template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.title]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-label]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-pressed]=\"activeView === view\"\n [ngClass]=\"activeView === view ? 'k-state-selected' : ''\"\n >\n <span\n class=\"k-button-icon k-icon\"\n [ngClass]=\"getViewButtonIcon(view)\">\n </span>\n </button>\n </div>\n </div>\n <div class=\"k-spacer\"></div>\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <button *ngIf=\"clearButton\"\n #clearButton\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset\"\n [attr.aria-label]=\"getText('clearButton')\"\n [attr.title]=\"getText('clearButton')\"\n (click)=\"clearButtonClick.emit()\">\n <span class=\"k-button-icon k-icon k-i-reset-color\"></span>\n </button>\n <div class=\"k-coloreditor-preview k-vstack\" *ngIf=\"preview\">\n <span\n class=\"k-coloreditor-preview-color k-color-preview\"\n [attr.title]=\"getText('previewColor')\"\n [style.background-color]=\"selection\">\n </span>\n <span class=\"k-coloreditor-current-color k-color-preview\"\n [style.background-color]=\"value\"\n [attr.title]=\"getText('revertSelection')\"\n (click)=\"valuePaneClick.emit($event)\">\n </span>\n </div>\n </div>\n "
|
|
9375
9678
|
}),
|
|
9376
9679
|
__metadata("design:paramtypes", [LocalizationService])
|
|
9377
9680
|
], FlatColorPickerHeaderComponent);
|
|
@@ -9414,7 +9717,7 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
|
|
|
9414
9717
|
FlatColorPickerActionButtonsComponent = __decorate([
|
|
9415
9718
|
Component({
|
|
9416
9719
|
selector: '[kendoFlatColorPickerActionButtons]',
|
|
9417
|
-
template: "\n <button\n class=\"k-coloreditor-cancel k-button\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
|
|
9720
|
+
template: "\n <button\n class=\"k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
|
|
9418
9721
|
}),
|
|
9419
9722
|
__metadata("design:paramtypes", [LocalizationService])
|
|
9420
9723
|
], FlatColorPickerActionButtonsComponent);
|
|
@@ -9963,12 +10266,14 @@ var serial$2 = 0;
|
|
|
9963
10266
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9964
10267
|
*/
|
|
9965
10268
|
var ColorPickerComponent = /** @class */ (function () {
|
|
9966
|
-
function ColorPickerComponent(popupService, cdr, localizationService, ngZone) {
|
|
10269
|
+
function ColorPickerComponent(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
9967
10270
|
var _this = this;
|
|
10271
|
+
this.host = host;
|
|
9968
10272
|
this.popupService = popupService;
|
|
9969
10273
|
this.cdr = cdr;
|
|
9970
10274
|
this.localizationService = localizationService;
|
|
9971
10275
|
this.ngZone = ngZone;
|
|
10276
|
+
this.renderer = renderer;
|
|
9972
10277
|
this.hostClasses = true;
|
|
9973
10278
|
/**
|
|
9974
10279
|
* @hidden
|
|
@@ -10073,6 +10378,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10073
10378
|
this._popupSettings = { animate: true };
|
|
10074
10379
|
this._paletteSettings = {};
|
|
10075
10380
|
this._gradientSettings = { opacity: true, delay: 0 };
|
|
10381
|
+
this._size = 'medium';
|
|
10382
|
+
this._rounded = 'medium';
|
|
10383
|
+
this._fillMode = 'solid';
|
|
10076
10384
|
this.notifyNgTouched = function () { };
|
|
10077
10385
|
this.notifyNgChanged = function () { };
|
|
10078
10386
|
validatePackage(packageMetadata);
|
|
@@ -10151,6 +10459,70 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10151
10459
|
enumerable: true,
|
|
10152
10460
|
configurable: true
|
|
10153
10461
|
});
|
|
10462
|
+
Object.defineProperty(ColorPickerComponent.prototype, "size", {
|
|
10463
|
+
get: function () {
|
|
10464
|
+
return this._size;
|
|
10465
|
+
},
|
|
10466
|
+
/**
|
|
10467
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
10468
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
10469
|
+
*
|
|
10470
|
+
* The possible values are:
|
|
10471
|
+
* * `'small'`
|
|
10472
|
+
* * `'medium'` (default)
|
|
10473
|
+
* * `'large'`
|
|
10474
|
+
* * `null`
|
|
10475
|
+
*/
|
|
10476
|
+
set: function (size) {
|
|
10477
|
+
this.handleClasses(size, 'size');
|
|
10478
|
+
this._size = size;
|
|
10479
|
+
},
|
|
10480
|
+
enumerable: true,
|
|
10481
|
+
configurable: true
|
|
10482
|
+
});
|
|
10483
|
+
Object.defineProperty(ColorPickerComponent.prototype, "rounded", {
|
|
10484
|
+
get: function () {
|
|
10485
|
+
return this._rounded;
|
|
10486
|
+
},
|
|
10487
|
+
/**
|
|
10488
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
10489
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
10490
|
+
*
|
|
10491
|
+
* The possible values are:
|
|
10492
|
+
* * `'small'`
|
|
10493
|
+
* * `'medium'` (default)
|
|
10494
|
+
* * `'large'`
|
|
10495
|
+
* * `'full'`
|
|
10496
|
+
* * `null`
|
|
10497
|
+
*/
|
|
10498
|
+
set: function (rounded) {
|
|
10499
|
+
this.handleClasses(rounded, 'rounded');
|
|
10500
|
+
this._rounded = rounded;
|
|
10501
|
+
},
|
|
10502
|
+
enumerable: true,
|
|
10503
|
+
configurable: true
|
|
10504
|
+
});
|
|
10505
|
+
Object.defineProperty(ColorPickerComponent.prototype, "fillMode", {
|
|
10506
|
+
get: function () {
|
|
10507
|
+
return this._fillMode;
|
|
10508
|
+
},
|
|
10509
|
+
/**
|
|
10510
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
10511
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
10512
|
+
*
|
|
10513
|
+
* The possible values are:
|
|
10514
|
+
* * `'flat'`
|
|
10515
|
+
* * `'solid'` (default)
|
|
10516
|
+
* * `'outline'`
|
|
10517
|
+
* * `null`
|
|
10518
|
+
*/
|
|
10519
|
+
set: function (fillMode) {
|
|
10520
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
10521
|
+
this._fillMode = fillMode;
|
|
10522
|
+
},
|
|
10523
|
+
enumerable: true,
|
|
10524
|
+
configurable: true
|
|
10525
|
+
});
|
|
10154
10526
|
Object.defineProperty(ColorPickerComponent.prototype, "isOpen", {
|
|
10155
10527
|
/**
|
|
10156
10528
|
* Indicates whether the ColorPicker popup is open.
|
|
@@ -10188,6 +10560,13 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10188
10560
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
10189
10561
|
};
|
|
10190
10562
|
};
|
|
10563
|
+
ColorPickerComponent.prototype.ngAfterViewInit = function () {
|
|
10564
|
+
var _this = this;
|
|
10565
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
10566
|
+
stylingInputs.forEach(function (input) {
|
|
10567
|
+
_this.handleClasses(_this[input], input);
|
|
10568
|
+
});
|
|
10569
|
+
};
|
|
10191
10570
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
10192
10571
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
10193
10572
|
this.activeView = 'palette';
|
|
@@ -10381,6 +10760,16 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10381
10760
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
10382
10761
|
return false;
|
|
10383
10762
|
};
|
|
10763
|
+
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
10764
|
+
var elem = this.host.nativeElement;
|
|
10765
|
+
var classes = getStylingClasses('picker', input, this[input], value);
|
|
10766
|
+
if (classes.toRemove) {
|
|
10767
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
10768
|
+
}
|
|
10769
|
+
if (classes.toAdd) {
|
|
10770
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
10771
|
+
}
|
|
10772
|
+
};
|
|
10384
10773
|
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
10385
10774
|
var focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10386
10775
|
var wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
|
|
@@ -10474,6 +10863,8 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10474
10863
|
var ColorPickerComponent_1;
|
|
10475
10864
|
__decorate([
|
|
10476
10865
|
HostBinding('class.k-colorpicker'),
|
|
10866
|
+
HostBinding('class.k-icon-picker'),
|
|
10867
|
+
HostBinding('class.k-picker'),
|
|
10477
10868
|
__metadata("design:type", Boolean)
|
|
10478
10869
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10479
10870
|
__decorate([
|
|
@@ -10549,6 +10940,21 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10549
10940
|
Input(),
|
|
10550
10941
|
__metadata("design:type", String)
|
|
10551
10942
|
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
10943
|
+
__decorate([
|
|
10944
|
+
Input(),
|
|
10945
|
+
__metadata("design:type", String),
|
|
10946
|
+
__metadata("design:paramtypes", [String])
|
|
10947
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
10948
|
+
__decorate([
|
|
10949
|
+
Input(),
|
|
10950
|
+
__metadata("design:type", String),
|
|
10951
|
+
__metadata("design:paramtypes", [String])
|
|
10952
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
10953
|
+
__decorate([
|
|
10954
|
+
Input(),
|
|
10955
|
+
__metadata("design:type", String),
|
|
10956
|
+
__metadata("design:paramtypes", [String])
|
|
10957
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
10552
10958
|
__decorate([
|
|
10553
10959
|
Output(),
|
|
10554
10960
|
__metadata("design:type", EventEmitter)
|
|
@@ -10619,12 +11025,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10619
11025
|
useValue: 'kendo.colorpicker'
|
|
10620
11026
|
}
|
|
10621
11027
|
],
|
|
10622
|
-
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-
|
|
11028
|
+
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-input-inner': true,\n 'k-disabled': this.disabled,\n 'k-focus': this.isFocused\n }\"\n role=\"listbox\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-readonly]=\"readonly\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n [id]=\"focusableId\"\n [attr.tabindex]=\"tabindex\"\n (focus)=\"handleWrapperFocus()\"\n (blur)=\"handleWrapperBlur()\"\n (mousedown)=\"$event.preventDefault()\"\n (keydown)=\"handleWrapperKeyDown($event)\"\n >\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\"\n (click)=\"handleActiveColorClick()\">\n <span *ngIf=\"iconClass || icon\" class=\"k-color-preview-icon k-icon\" [ngClass]=\"iconStyles\"></span>\n <span class=\"k-color-preview-mask\" [style.background-color]=\"value\"></span>\n </span>\n </span>\n <button\n type=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n (click)=\"togglePopup()\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (focusout)=\"handlePopupBlur($event)\"\n (cancel)=\"handleCancelEvent($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
10623
11029
|
}),
|
|
10624
|
-
__metadata("design:paramtypes", [
|
|
11030
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11031
|
+
PopupService,
|
|
10625
11032
|
ChangeDetectorRef,
|
|
10626
11033
|
LocalizationService,
|
|
10627
|
-
NgZone
|
|
11034
|
+
NgZone,
|
|
11035
|
+
Renderer2])
|
|
10628
11036
|
], ColorPickerComponent);
|
|
10629
11037
|
return ColorPickerComponent;
|
|
10630
11038
|
}());
|
|
@@ -11069,17 +11477,92 @@ var ColorPickerModule = /** @class */ (function () {
|
|
|
11069
11477
|
* ```
|
|
11070
11478
|
*/
|
|
11071
11479
|
var CheckBoxDirective = /** @class */ (function () {
|
|
11072
|
-
function CheckBoxDirective() {
|
|
11480
|
+
function CheckBoxDirective(renderer, hostElement) {
|
|
11481
|
+
this.renderer = renderer;
|
|
11482
|
+
this.hostElement = hostElement;
|
|
11073
11483
|
this.kendoClass = true;
|
|
11484
|
+
this._size = 'medium';
|
|
11485
|
+
this._rounded = 'medium';
|
|
11074
11486
|
}
|
|
11487
|
+
Object.defineProperty(CheckBoxDirective.prototype, "size", {
|
|
11488
|
+
get: function () {
|
|
11489
|
+
return this._size;
|
|
11490
|
+
},
|
|
11491
|
+
/**
|
|
11492
|
+
* The size property specifies the width and height of the CheckBox
|
|
11493
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
|
|
11494
|
+
*
|
|
11495
|
+
* The possible values are:
|
|
11496
|
+
* * `'small'`
|
|
11497
|
+
* * `'medium'` (default)
|
|
11498
|
+
* * `'large'`
|
|
11499
|
+
* * `null`
|
|
11500
|
+
*/
|
|
11501
|
+
set: function (size) {
|
|
11502
|
+
this.handleClasses(size, 'size');
|
|
11503
|
+
this._size = size;
|
|
11504
|
+
},
|
|
11505
|
+
enumerable: true,
|
|
11506
|
+
configurable: true
|
|
11507
|
+
});
|
|
11508
|
+
Object.defineProperty(CheckBoxDirective.prototype, "rounded", {
|
|
11509
|
+
get: function () {
|
|
11510
|
+
return this._rounded;
|
|
11511
|
+
},
|
|
11512
|
+
/**
|
|
11513
|
+
* The rounded property specifies the border radius of the CheckBox
|
|
11514
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
|
|
11515
|
+
*
|
|
11516
|
+
* The possible values are:
|
|
11517
|
+
* * `'small'`
|
|
11518
|
+
* * `'medium'` (default)
|
|
11519
|
+
* * `'large'`
|
|
11520
|
+
* * `null`
|
|
11521
|
+
*/
|
|
11522
|
+
set: function (rounded) {
|
|
11523
|
+
this.handleClasses(rounded, 'rounded');
|
|
11524
|
+
this._rounded = rounded;
|
|
11525
|
+
},
|
|
11526
|
+
enumerable: true,
|
|
11527
|
+
configurable: true
|
|
11528
|
+
});
|
|
11529
|
+
CheckBoxDirective.prototype.ngAfterViewInit = function () {
|
|
11530
|
+
var _this = this;
|
|
11531
|
+
var stylingInputs = ['size', 'rounded'];
|
|
11532
|
+
stylingInputs.forEach(function (input) {
|
|
11533
|
+
_this.handleClasses(_this[input], input);
|
|
11534
|
+
});
|
|
11535
|
+
};
|
|
11536
|
+
CheckBoxDirective.prototype.handleClasses = function (value, input) {
|
|
11537
|
+
var elem = this.hostElement.nativeElement;
|
|
11538
|
+
var classes = getStylingClasses('checkbox', input, this[input], value);
|
|
11539
|
+
if (classes.toRemove) {
|
|
11540
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11541
|
+
}
|
|
11542
|
+
if (classes.toAdd) {
|
|
11543
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11544
|
+
}
|
|
11545
|
+
};
|
|
11075
11546
|
__decorate([
|
|
11076
11547
|
HostBinding('class.k-checkbox'),
|
|
11077
11548
|
__metadata("design:type", Boolean)
|
|
11078
11549
|
], CheckBoxDirective.prototype, "kendoClass", void 0);
|
|
11550
|
+
__decorate([
|
|
11551
|
+
Input(),
|
|
11552
|
+
__metadata("design:type", String),
|
|
11553
|
+
__metadata("design:paramtypes", [String])
|
|
11554
|
+
], CheckBoxDirective.prototype, "size", null);
|
|
11555
|
+
__decorate([
|
|
11556
|
+
Input(),
|
|
11557
|
+
__metadata("design:type", String),
|
|
11558
|
+
__metadata("design:paramtypes", [String])
|
|
11559
|
+
], CheckBoxDirective.prototype, "rounded", null);
|
|
11079
11560
|
CheckBoxDirective = __decorate([
|
|
11080
11561
|
Directive({
|
|
11081
11562
|
selector: 'input[kendoCheckBox]'
|
|
11082
|
-
})
|
|
11563
|
+
}),
|
|
11564
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
11565
|
+
ElementRef])
|
|
11083
11566
|
], CheckBoxDirective);
|
|
11084
11567
|
return CheckBoxDirective;
|
|
11085
11568
|
}());
|
|
@@ -11138,17 +11621,65 @@ var CheckBoxModule = /** @class */ (function () {
|
|
|
11138
11621
|
* ```
|
|
11139
11622
|
*/
|
|
11140
11623
|
var RadioButtonDirective = /** @class */ (function () {
|
|
11141
|
-
function RadioButtonDirective() {
|
|
11624
|
+
function RadioButtonDirective(renderer, hostElement) {
|
|
11625
|
+
this.renderer = renderer;
|
|
11626
|
+
this.hostElement = hostElement;
|
|
11142
11627
|
this.kendoClass = true;
|
|
11628
|
+
this._size = 'medium';
|
|
11143
11629
|
}
|
|
11630
|
+
Object.defineProperty(RadioButtonDirective.prototype, "size", {
|
|
11631
|
+
get: function () {
|
|
11632
|
+
return this._size;
|
|
11633
|
+
},
|
|
11634
|
+
/**
|
|
11635
|
+
* The size property specifies the width and height of the RadioButton
|
|
11636
|
+
* ([see example]({% slug appearance_radiobuttondirective %}#toc-size)).
|
|
11637
|
+
* The possible values are:
|
|
11638
|
+
* * `'small'`
|
|
11639
|
+
* * `'medium'` (default)
|
|
11640
|
+
* * `'large'`
|
|
11641
|
+
* * `null`
|
|
11642
|
+
*/
|
|
11643
|
+
set: function (size) {
|
|
11644
|
+
this.handleClasses(size, 'size');
|
|
11645
|
+
this._size = size;
|
|
11646
|
+
},
|
|
11647
|
+
enumerable: true,
|
|
11648
|
+
configurable: true
|
|
11649
|
+
});
|
|
11650
|
+
RadioButtonDirective.prototype.ngAfterViewInit = function () {
|
|
11651
|
+
var _this = this;
|
|
11652
|
+
// kept in sync with other inputs for easier refactoring
|
|
11653
|
+
// to a common base class
|
|
11654
|
+
var stylingInputs = ['size'];
|
|
11655
|
+
stylingInputs.forEach(function (input) {
|
|
11656
|
+
_this.handleClasses(_this[input], input);
|
|
11657
|
+
});
|
|
11658
|
+
};
|
|
11659
|
+
RadioButtonDirective.prototype.handleClasses = function (value, input) {
|
|
11660
|
+
var elem = this.hostElement.nativeElement;
|
|
11661
|
+
var classes = getStylingClasses('radio', input, this[input], value);
|
|
11662
|
+
if (classes.toRemove) {
|
|
11663
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11664
|
+
}
|
|
11665
|
+
if (classes.toAdd) {
|
|
11666
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11667
|
+
}
|
|
11668
|
+
};
|
|
11144
11669
|
__decorate([
|
|
11145
11670
|
HostBinding('class.k-radio'),
|
|
11146
11671
|
__metadata("design:type", Boolean)
|
|
11147
11672
|
], RadioButtonDirective.prototype, "kendoClass", void 0);
|
|
11673
|
+
__decorate([
|
|
11674
|
+
Input(),
|
|
11675
|
+
__metadata("design:type", String),
|
|
11676
|
+
__metadata("design:paramtypes", [String])
|
|
11677
|
+
], RadioButtonDirective.prototype, "size", null);
|
|
11148
11678
|
RadioButtonDirective = __decorate([
|
|
11149
11679
|
Directive({
|
|
11150
11680
|
selector: 'input[kendoRadioButton]'
|
|
11151
|
-
})
|
|
11681
|
+
}),
|
|
11682
|
+
__metadata("design:paramtypes", [Renderer2, ElementRef])
|
|
11152
11683
|
], RadioButtonDirective);
|
|
11153
11684
|
return RadioButtonDirective;
|
|
11154
11685
|
}());
|
|
@@ -11735,4 +12266,4 @@ var InputsModule = /** @class */ (function () {
|
|
|
11735
12266
|
* Generated bundle index. Do not edit.
|
|
11736
12267
|
*/
|
|
11737
12268
|
|
|
11738
|
-
export { CheckBoxModule, ColorContrastSvgComponent, ColorInputComponent, ContrastValidationComponent, ContrastComponent, FlatColorPickerActionButtonsComponent, FlatColorPickerHeaderComponent, FocusOnDomReadyDirective, ColorGradientLocalizationService, ColorPaletteLocalizationService, ColorPickerLocalizationService, ColorPickerCustomMessagesComponent, FlatColorPickerLocalizationService, ColorPickerMessages, ColorPaletteService, FlatColorPickerService, MaskingService, NumericTextBoxMessages, RadioButtonModule, RangeSliderCustomMessagesComponent, RangeSliderMessages, SHARED_DIRECTIVES, SliderCustomMessagesComponent, SliderMessages, SliderBase, SlidersCommonModule, SwitchCustomMessagesComponent, Messages, TextFieldsBase, TextBoxCustomMessagesComponent, TextBoxMessages, SliderComponent, RangeSliderComponent, LabelTemplateDirective, SwitchComponent,
|
|
12269
|
+
export { CheckBoxModule, ColorContrastSvgComponent, ColorInputComponent, ContrastValidationComponent, ContrastComponent, FlatColorPickerActionButtonsComponent, FlatColorPickerHeaderComponent, FocusOnDomReadyDirective, ColorGradientLocalizationService, ColorPaletteLocalizationService, ColorPickerLocalizationService, ColorPickerCustomMessagesComponent, FlatColorPickerLocalizationService, ColorPickerMessages, ColorPaletteService, FlatColorPickerService, MaskingService, NumericTextBoxMessages, RadioButtonModule, RangeSliderCustomMessagesComponent, RangeSliderMessages, SHARED_DIRECTIVES, SliderCustomMessagesComponent, SliderMessages, SliderBase, SlidersCommonModule, SwitchCustomMessagesComponent, Messages, TextFieldsBase, TextBoxCustomMessagesComponent, TextBoxMessages, SliderComponent, RangeSliderComponent, LabelTemplateDirective, SwitchComponent, TextBoxDirective, TextAreaDirective, NumericTextBoxComponent, NumericTextBoxCustomMessagesComponent, MaskedTextBoxComponent, InputsModule, SliderTicksComponent, SliderModule, RangeSliderModule, SwitchModule, NumericTextBoxModule, MaskedTextBoxModule, TextBoxModule, TextAreaModule, ColorPickerComponent, ColorPaletteComponent, ColorGradientComponent, ColorPickerModule, FlatColorPickerComponent, ColorPickerCancelEvent, CheckBoxDirective, RadioButtonDirective, HintComponent, ErrorComponent, FormFieldComponent, FormFieldModule, TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective, TextAreaComponent, TextAreaSuffixComponent, InputSeparatorComponent, SharedModule, LocalizedColorPickerMessagesDirective, LocalizedNumericTextBoxMessagesDirective, LocalizedTextBoxMessagesDirective, LocalizedSliderMessagesDirective, LocalizedRangeSliderMessagesDirective, LocalizedSwitchMessagesDirective, ColorPickerCloseEvent, ColorPickerOpenEvent, ActiveColorClickEvent };
|