@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/fesm2015/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
6
6
|
import { isDevMode, Directive, Optional, TemplateRef, EventEmitter, Input, Output, 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';
|
|
@@ -46,6 +46,43 @@ const fitIntoBounds = (contender, min, max) => {
|
|
|
46
46
|
}
|
|
47
47
|
return contender <= min ? min : contender >= max ? max : contender;
|
|
48
48
|
};
|
|
49
|
+
const SIZES = {
|
|
50
|
+
small: 'sm',
|
|
51
|
+
medium: 'md',
|
|
52
|
+
large: 'lg'
|
|
53
|
+
};
|
|
54
|
+
const ROUNDNESS = {
|
|
55
|
+
small: 'sm',
|
|
56
|
+
medium: 'md',
|
|
57
|
+
large: 'lg',
|
|
58
|
+
full: 'full'
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*
|
|
63
|
+
* Returns the styling classes to be added and removed
|
|
64
|
+
*/
|
|
65
|
+
const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => {
|
|
66
|
+
switch (stylingOption) {
|
|
67
|
+
case 'size':
|
|
68
|
+
return {
|
|
69
|
+
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
70
|
+
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` : null
|
|
71
|
+
};
|
|
72
|
+
case 'rounded':
|
|
73
|
+
return {
|
|
74
|
+
toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
|
|
75
|
+
toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` : null
|
|
76
|
+
};
|
|
77
|
+
case 'fillMode':
|
|
78
|
+
return {
|
|
79
|
+
toRemove: `k-${componentType}-${previousValue}`,
|
|
80
|
+
toAdd: newValue ? `k-${componentType}-${newValue}` : null
|
|
81
|
+
};
|
|
82
|
+
default:
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
49
86
|
|
|
50
87
|
/**
|
|
51
88
|
* @hidden
|
|
@@ -459,7 +496,7 @@ const packageMetadata = {
|
|
|
459
496
|
name: '@progress/kendo-angular-inputs',
|
|
460
497
|
productName: 'Kendo UI for Angular',
|
|
461
498
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
462
|
-
publishDate:
|
|
499
|
+
publishDate: 1640100237,
|
|
463
500
|
version: '',
|
|
464
501
|
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'
|
|
465
502
|
};
|
|
@@ -1831,7 +1868,7 @@ RangeSliderComponent = RangeSliderComponent_1 = __decorate([
|
|
|
1831
1868
|
], RangeSliderComponent);
|
|
1832
1869
|
|
|
1833
1870
|
var SwitchComponent_1;
|
|
1834
|
-
const FOCUSED = 'k-
|
|
1871
|
+
const FOCUSED = 'k-focus';
|
|
1835
1872
|
/**
|
|
1836
1873
|
* Represents the [Kendo UI Switch component for Angular]({% slug overview_switch %}).
|
|
1837
1874
|
*/
|
|
@@ -1876,13 +1913,20 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1876
1913
|
* @hidden
|
|
1877
1914
|
*/
|
|
1878
1915
|
this.initialized = false;
|
|
1916
|
+
this.hostClickSubscription = new Subscription;
|
|
1879
1917
|
this._checked = false;
|
|
1918
|
+
this._size = 'medium';
|
|
1919
|
+
this._trackRounded = 'full';
|
|
1920
|
+
this._thumbRounded = 'full';
|
|
1880
1921
|
this.ngChange = (_) => { };
|
|
1881
1922
|
this.ngTouched = () => { };
|
|
1882
1923
|
/**
|
|
1883
1924
|
* @hidden
|
|
1884
1925
|
*/
|
|
1885
1926
|
this.handleFocus = () => {
|
|
1927
|
+
if (this.isFocused) {
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1886
1930
|
this.focused = true;
|
|
1887
1931
|
if (hasObservers(this.onFocus)) {
|
|
1888
1932
|
this.ngZone.run(() => {
|
|
@@ -1893,7 +1937,11 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1893
1937
|
/**
|
|
1894
1938
|
* @hidden
|
|
1895
1939
|
*/
|
|
1896
|
-
this.handleBlur = () => {
|
|
1940
|
+
this.handleBlur = (event) => {
|
|
1941
|
+
const relatedTarget = event && event.relatedTarget;
|
|
1942
|
+
if (this.hostElement.nativeElement.contains(relatedTarget)) {
|
|
1943
|
+
return;
|
|
1944
|
+
}
|
|
1897
1945
|
this.changeDetector.markForCheck();
|
|
1898
1946
|
this.focused = false;
|
|
1899
1947
|
if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.control)) {
|
|
@@ -1918,6 +1966,56 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1918
1966
|
get checked() {
|
|
1919
1967
|
return this._checked;
|
|
1920
1968
|
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Specifies the size of the Switch.
|
|
1971
|
+
*
|
|
1972
|
+
* The possible values are:
|
|
1973
|
+
* * `'small'`
|
|
1974
|
+
* * `'medium'` (default)
|
|
1975
|
+
* * `'large'`
|
|
1976
|
+
* * `null`
|
|
1977
|
+
*/
|
|
1978
|
+
set size(size) {
|
|
1979
|
+
this.handleClasses(size, 'size');
|
|
1980
|
+
this._size = size;
|
|
1981
|
+
}
|
|
1982
|
+
get size() {
|
|
1983
|
+
return this._size;
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Specifies the border radius of the Switch thumb.
|
|
1987
|
+
*
|
|
1988
|
+
* The possible values are:
|
|
1989
|
+
* * `'full'` (default)
|
|
1990
|
+
* * `'small'`
|
|
1991
|
+
* * `'medium'`
|
|
1992
|
+
* * `'large'`
|
|
1993
|
+
* * `null`
|
|
1994
|
+
*/
|
|
1995
|
+
set thumbRounded(thumbRounded) {
|
|
1996
|
+
this.handleThumbClasses(thumbRounded);
|
|
1997
|
+
this._thumbRounded = thumbRounded;
|
|
1998
|
+
}
|
|
1999
|
+
get thumbRounded() {
|
|
2000
|
+
return this._thumbRounded;
|
|
2001
|
+
}
|
|
2002
|
+
/**
|
|
2003
|
+
* Specifies the border radius of the Switch track.
|
|
2004
|
+
*
|
|
2005
|
+
* The possible values are:
|
|
2006
|
+
* * `'full'` (default)
|
|
2007
|
+
* * `'small'`
|
|
2008
|
+
* * `'medium'`
|
|
2009
|
+
* * `'large'`
|
|
2010
|
+
* * `null`
|
|
2011
|
+
*/
|
|
2012
|
+
set trackRounded(trackRounded) {
|
|
2013
|
+
this.handleTrackClasses(trackRounded);
|
|
2014
|
+
this._trackRounded = trackRounded;
|
|
2015
|
+
}
|
|
2016
|
+
get trackRounded() {
|
|
2017
|
+
return this._trackRounded;
|
|
2018
|
+
}
|
|
1921
2019
|
/**
|
|
1922
2020
|
* @hidden
|
|
1923
2021
|
*/
|
|
@@ -1968,10 +2066,23 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1968
2066
|
this.control = this.injector.get(NgControl, null);
|
|
1969
2067
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.initialized = true);
|
|
1970
2068
|
}
|
|
2069
|
+
ngAfterViewInit() {
|
|
2070
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2071
|
+
this.attachHostClickHandler();
|
|
2072
|
+
if (!this.checked && !wrapper.classList.contains('k-switch-off')) {
|
|
2073
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2074
|
+
}
|
|
2075
|
+
this.handleClasses(this.size, 'size');
|
|
2076
|
+
this.handleTrackClasses(this.trackRounded);
|
|
2077
|
+
this.handleThumbClasses(this.thumbRounded);
|
|
2078
|
+
}
|
|
1971
2079
|
ngOnDestroy() {
|
|
1972
2080
|
if (this.localizationChangeSubscription) {
|
|
1973
2081
|
this.localizationChangeSubscription.unsubscribe();
|
|
1974
2082
|
}
|
|
2083
|
+
if (this.hostClickSubscription) {
|
|
2084
|
+
this.hostClickSubscription.unsubscribe();
|
|
2085
|
+
}
|
|
1975
2086
|
}
|
|
1976
2087
|
/**
|
|
1977
2088
|
* Focuses the Switch.
|
|
@@ -1989,19 +2100,19 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1989
2100
|
* ```
|
|
1990
2101
|
*/
|
|
1991
2102
|
focus() {
|
|
1992
|
-
if (!this.
|
|
2103
|
+
if (!this.track) {
|
|
1993
2104
|
return;
|
|
1994
2105
|
}
|
|
1995
|
-
this.
|
|
2106
|
+
this.track.nativeElement.focus();
|
|
1996
2107
|
}
|
|
1997
2108
|
/**
|
|
1998
2109
|
* Blurs the Switch.
|
|
1999
2110
|
*/
|
|
2000
2111
|
blur() {
|
|
2001
|
-
if (!this.
|
|
2112
|
+
if (!this.track) {
|
|
2002
2113
|
return;
|
|
2003
2114
|
}
|
|
2004
|
-
this.
|
|
2115
|
+
this.track.nativeElement.blur();
|
|
2005
2116
|
}
|
|
2006
2117
|
/**
|
|
2007
2118
|
* @hidden
|
|
@@ -2051,7 +2162,7 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
2051
2162
|
}
|
|
2052
2163
|
/**
|
|
2053
2164
|
* @hidden
|
|
2054
|
-
* Used by the
|
|
2165
|
+
* Used by the FloatingLabel to determine if the component is empty.
|
|
2055
2166
|
*/
|
|
2056
2167
|
isEmpty() {
|
|
2057
2168
|
return false;
|
|
@@ -2068,24 +2179,63 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
2068
2179
|
}
|
|
2069
2180
|
set focused(value) {
|
|
2070
2181
|
if (this.isFocused !== value && this.hostElement) {
|
|
2071
|
-
const
|
|
2182
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2072
2183
|
if (value) {
|
|
2073
|
-
this.renderer.addClass(
|
|
2184
|
+
this.renderer.addClass(wrapper, FOCUSED);
|
|
2074
2185
|
}
|
|
2075
2186
|
else {
|
|
2076
|
-
this.renderer.removeClass(
|
|
2187
|
+
this.renderer.removeClass(wrapper, FOCUSED);
|
|
2077
2188
|
}
|
|
2078
2189
|
this.isFocused = value;
|
|
2079
2190
|
}
|
|
2080
2191
|
}
|
|
2192
|
+
attachHostClickHandler() {
|
|
2193
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2194
|
+
this.hostClickSubscription.add(this.renderer.listen(this.hostElement.nativeElement, 'click', this.clickHandler));
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2081
2197
|
setHostClasses(value) {
|
|
2198
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2082
2199
|
if (value) {
|
|
2083
|
-
this.renderer.removeClass(
|
|
2084
|
-
this.renderer.addClass(
|
|
2200
|
+
this.renderer.removeClass(wrapper, 'k-switch-off');
|
|
2201
|
+
this.renderer.addClass(wrapper, 'k-switch-on');
|
|
2085
2202
|
}
|
|
2086
2203
|
else {
|
|
2087
|
-
this.renderer.removeClass(
|
|
2088
|
-
this.renderer.addClass(
|
|
2204
|
+
this.renderer.removeClass(wrapper, 'k-switch-on');
|
|
2205
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
handleClasses(value, input) {
|
|
2209
|
+
const elem = this.hostElement.nativeElement;
|
|
2210
|
+
const classes = getStylingClasses('switch', input, this[input], value);
|
|
2211
|
+
if (classes.toRemove) {
|
|
2212
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2213
|
+
}
|
|
2214
|
+
if (classes.toAdd) {
|
|
2215
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
handleTrackClasses(value) {
|
|
2219
|
+
const elem = this.hostElement.nativeElement;
|
|
2220
|
+
const track = this.track.nativeElement;
|
|
2221
|
+
const classes = getStylingClasses('switch', 'rounded', this.trackRounded, value);
|
|
2222
|
+
if (classes.toRemove) {
|
|
2223
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2224
|
+
this.renderer.removeClass(track, classes.toRemove);
|
|
2225
|
+
}
|
|
2226
|
+
if (classes.toAdd) {
|
|
2227
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2228
|
+
this.renderer.addClass(track, classes.toAdd);
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
handleThumbClasses(value) {
|
|
2232
|
+
const thumb = this.thumb.nativeElement;
|
|
2233
|
+
const classes = getStylingClasses('switch', 'rounded', this.thumbRounded, value);
|
|
2234
|
+
if (classes.toRemove) {
|
|
2235
|
+
this.renderer.removeClass(thumb, classes.toRemove);
|
|
2236
|
+
}
|
|
2237
|
+
if (classes.toAdd) {
|
|
2238
|
+
this.renderer.addClass(thumb, classes.toAdd);
|
|
2089
2239
|
}
|
|
2090
2240
|
}
|
|
2091
2241
|
};
|
|
@@ -2118,6 +2268,21 @@ __decorate([
|
|
|
2118
2268
|
Input(),
|
|
2119
2269
|
__metadata("design:type", Number)
|
|
2120
2270
|
], SwitchComponent.prototype, "tabindex", void 0);
|
|
2271
|
+
__decorate([
|
|
2272
|
+
Input(),
|
|
2273
|
+
__metadata("design:type", String),
|
|
2274
|
+
__metadata("design:paramtypes", [String])
|
|
2275
|
+
], SwitchComponent.prototype, "size", null);
|
|
2276
|
+
__decorate([
|
|
2277
|
+
Input(),
|
|
2278
|
+
__metadata("design:type", String),
|
|
2279
|
+
__metadata("design:paramtypes", [String])
|
|
2280
|
+
], SwitchComponent.prototype, "thumbRounded", null);
|
|
2281
|
+
__decorate([
|
|
2282
|
+
Input(),
|
|
2283
|
+
__metadata("design:type", String),
|
|
2284
|
+
__metadata("design:paramtypes", [String])
|
|
2285
|
+
], SwitchComponent.prototype, "trackRounded", null);
|
|
2121
2286
|
__decorate([
|
|
2122
2287
|
Input(),
|
|
2123
2288
|
__metadata("design:type", Number),
|
|
@@ -2135,10 +2300,6 @@ __decorate([
|
|
|
2135
2300
|
Output(),
|
|
2136
2301
|
__metadata("design:type", EventEmitter)
|
|
2137
2302
|
], SwitchComponent.prototype, "valueChange", void 0);
|
|
2138
|
-
__decorate([
|
|
2139
|
-
ViewChild('wrapper', { static: true }),
|
|
2140
|
-
__metadata("design:type", Object)
|
|
2141
|
-
], SwitchComponent.prototype, "wrapper", void 0);
|
|
2142
2303
|
__decorate([
|
|
2143
2304
|
HostBinding('attr.dir'),
|
|
2144
2305
|
__metadata("design:type", String)
|
|
@@ -2163,10 +2324,18 @@ __decorate([
|
|
|
2163
2324
|
__metadata("design:type", Boolean)
|
|
2164
2325
|
], SwitchComponent.prototype, "hostClasses", void 0);
|
|
2165
2326
|
__decorate([
|
|
2166
|
-
HostBinding('class.k-
|
|
2327
|
+
HostBinding('class.k-disabled'),
|
|
2167
2328
|
__metadata("design:type", Boolean),
|
|
2168
2329
|
__metadata("design:paramtypes", [])
|
|
2169
2330
|
], SwitchComponent.prototype, "disabledClass", null);
|
|
2331
|
+
__decorate([
|
|
2332
|
+
ViewChild('track', { static: true }),
|
|
2333
|
+
__metadata("design:type", Object)
|
|
2334
|
+
], SwitchComponent.prototype, "track", void 0);
|
|
2335
|
+
__decorate([
|
|
2336
|
+
ViewChild('thumb', { static: true }),
|
|
2337
|
+
__metadata("design:type", Object)
|
|
2338
|
+
], SwitchComponent.prototype, "thumb", void 0);
|
|
2170
2339
|
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
2171
2340
|
Component({
|
|
2172
2341
|
exportAs: 'kendoSwitch',
|
|
@@ -2193,18 +2362,27 @@ SwitchComponent = SwitchComponent_1 = __decorate([
|
|
|
2193
2362
|
>
|
|
2194
2363
|
|
|
2195
2364
|
<span
|
|
2196
|
-
#
|
|
2197
|
-
class="k-switch-
|
|
2365
|
+
#track
|
|
2366
|
+
class="k-switch-track"
|
|
2198
2367
|
[id]="focusableId"
|
|
2199
2368
|
role="switch"
|
|
2200
2369
|
[style.transitionDuration]="initialized ? '200ms' : '0ms'"
|
|
2201
2370
|
[attr.aria-checked]="checked"
|
|
2202
2371
|
[attr.tabindex]="(disabled ? undefined : tabIndex)"
|
|
2203
|
-
[kendoEventsOutsideAngular]="{
|
|
2372
|
+
[kendoEventsOutsideAngular]="{ keydown: keyDownHandler, focus: handleFocus, blur: handleBlur }"
|
|
2204
2373
|
>
|
|
2205
2374
|
<span class="k-switch-label-on" [attr.aria-hidden]="true" >{{onLabelMessage}}</span>
|
|
2206
2375
|
<span class="k-switch-label-off" [attr.aria-hidden]="true">{{offLabelMessage}}</span>
|
|
2207
|
-
|
|
2376
|
+
</span>
|
|
2377
|
+
<span
|
|
2378
|
+
class="k-switch-thumb-wrap"
|
|
2379
|
+
tabindex="-1"
|
|
2380
|
+
[style.transitionDuration]="initialized ? '200ms' : '0ms'" [kendoEventsOutsideAngular]="{
|
|
2381
|
+
keydown: keyDownHandler,
|
|
2382
|
+
focus: handleFocus,
|
|
2383
|
+
blur: handleBlur
|
|
2384
|
+
}">
|
|
2385
|
+
<span #thumb class="k-switch-thumb"></span>
|
|
2208
2386
|
</span>
|
|
2209
2387
|
`
|
|
2210
2388
|
}),
|
|
@@ -2216,6 +2394,112 @@ SwitchComponent = SwitchComponent_1 = __decorate([
|
|
|
2216
2394
|
NgZone])
|
|
2217
2395
|
], SwitchComponent);
|
|
2218
2396
|
|
|
2397
|
+
var TextBoxDirective_1;
|
|
2398
|
+
/**
|
|
2399
|
+
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
2400
|
+
* Used to style the textbox of any `input` element.
|
|
2401
|
+
*
|
|
2402
|
+
* @example
|
|
2403
|
+
* ```ts-no-run
|
|
2404
|
+
* <input kendoTextBox />
|
|
2405
|
+
* <input kendoTextBox type="email" />
|
|
2406
|
+
* <input kendoTextBox type="password" />
|
|
2407
|
+
* ```
|
|
2408
|
+
*/
|
|
2409
|
+
let TextBoxDirective = TextBoxDirective_1 = class TextBoxDirective {
|
|
2410
|
+
constructor(renderer, inputElement, ngZone) {
|
|
2411
|
+
this.renderer = renderer;
|
|
2412
|
+
this.inputElement = inputElement;
|
|
2413
|
+
this.ngZone = ngZone;
|
|
2414
|
+
this.hostClasses = true;
|
|
2415
|
+
/**
|
|
2416
|
+
* @hidden
|
|
2417
|
+
*/
|
|
2418
|
+
this.onFocus = new EventEmitter();
|
|
2419
|
+
/**
|
|
2420
|
+
* @hidden
|
|
2421
|
+
*/
|
|
2422
|
+
this.onBlur = new EventEmitter();
|
|
2423
|
+
/**
|
|
2424
|
+
* @hidden
|
|
2425
|
+
*/
|
|
2426
|
+
this.onValueChange = new EventEmitter();
|
|
2427
|
+
/**
|
|
2428
|
+
* @hidden
|
|
2429
|
+
*/
|
|
2430
|
+
this.autoFillStart = new EventEmitter();
|
|
2431
|
+
/**
|
|
2432
|
+
* @hidden
|
|
2433
|
+
*/
|
|
2434
|
+
this.autoFillEnd = new EventEmitter();
|
|
2435
|
+
this.listeners = [];
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* @hidden
|
|
2439
|
+
*/
|
|
2440
|
+
set value(text) {
|
|
2441
|
+
if (!this.inputElement) {
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
2445
|
+
this.onValueChange.emit();
|
|
2446
|
+
}
|
|
2447
|
+
/**
|
|
2448
|
+
* @hidden
|
|
2449
|
+
*/
|
|
2450
|
+
get value() {
|
|
2451
|
+
return this.inputElement.nativeElement.value;
|
|
2452
|
+
}
|
|
2453
|
+
get id() {
|
|
2454
|
+
return this.inputElement.nativeElement.id;
|
|
2455
|
+
}
|
|
2456
|
+
set id(id) {
|
|
2457
|
+
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
2458
|
+
}
|
|
2459
|
+
ngAfterViewInit() {
|
|
2460
|
+
const input = this.inputElement.nativeElement;
|
|
2461
|
+
this.listeners = [
|
|
2462
|
+
this.renderer.listen(input, 'focus', () => this.onFocus.emit()),
|
|
2463
|
+
this.renderer.listen(input, 'blur', () => this.onBlur.emit())
|
|
2464
|
+
];
|
|
2465
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2466
|
+
this.renderer.listen(input, 'animationstart', (e) => {
|
|
2467
|
+
if (e.animationName === 'autoFillStart') {
|
|
2468
|
+
this.autoFillStart.emit();
|
|
2469
|
+
}
|
|
2470
|
+
else if (e.animationName === 'autoFillEnd') {
|
|
2471
|
+
this.autoFillEnd.emit();
|
|
2472
|
+
}
|
|
2473
|
+
});
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2476
|
+
ngOnDestroy() {
|
|
2477
|
+
this.listeners.forEach(listener => listener());
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
__decorate([
|
|
2481
|
+
HostBinding('class.k-textbox'),
|
|
2482
|
+
HostBinding('class.k-input'),
|
|
2483
|
+
__metadata("design:type", Boolean)
|
|
2484
|
+
], TextBoxDirective.prototype, "hostClasses", void 0);
|
|
2485
|
+
__decorate([
|
|
2486
|
+
Input(),
|
|
2487
|
+
__metadata("design:type", String),
|
|
2488
|
+
__metadata("design:paramtypes", [String])
|
|
2489
|
+
], TextBoxDirective.prototype, "value", null);
|
|
2490
|
+
TextBoxDirective = TextBoxDirective_1 = __decorate([
|
|
2491
|
+
Directive({
|
|
2492
|
+
selector: 'input[kendoTextBox]',
|
|
2493
|
+
providers: [{
|
|
2494
|
+
provide: KendoInput,
|
|
2495
|
+
useExisting: forwardRef(() => TextBoxDirective_1)
|
|
2496
|
+
}]
|
|
2497
|
+
}),
|
|
2498
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
2499
|
+
ElementRef,
|
|
2500
|
+
NgZone])
|
|
2501
|
+
], TextBoxDirective);
|
|
2502
|
+
|
|
2219
2503
|
var TextAreaDirective_1;
|
|
2220
2504
|
/**
|
|
2221
2505
|
* Represents the [Kendo UI TextArea directive for the Inputs components for Angular]({% slug overview_textarea %}).
|
|
@@ -2233,7 +2517,7 @@ let TextAreaDirective = TextAreaDirective_1 = class TextAreaDirective {
|
|
|
2233
2517
|
this.zone = zone;
|
|
2234
2518
|
this.changeDetector = changeDetector;
|
|
2235
2519
|
this.injector = injector;
|
|
2236
|
-
this.
|
|
2520
|
+
this.elementClasses = true;
|
|
2237
2521
|
this.autofillClass = true;
|
|
2238
2522
|
/**
|
|
2239
2523
|
* Fires each time the textarea value is changed.
|
|
@@ -2412,8 +2696,9 @@ let TextAreaDirective = TextAreaDirective_1 = class TextAreaDirective {
|
|
|
2412
2696
|
};
|
|
2413
2697
|
__decorate([
|
|
2414
2698
|
HostBinding('class.k-textarea'),
|
|
2699
|
+
HostBinding('class.k-input'),
|
|
2415
2700
|
__metadata("design:type", Boolean)
|
|
2416
|
-
], TextAreaDirective.prototype, "
|
|
2701
|
+
], TextAreaDirective.prototype, "elementClasses", void 0);
|
|
2417
2702
|
__decorate([
|
|
2418
2703
|
HostBinding('class.k-autofill'),
|
|
2419
2704
|
__metadata("design:type", Boolean)
|
|
@@ -2451,356 +2736,8 @@ TextAreaDirective = TextAreaDirective_1 = __decorate([
|
|
|
2451
2736
|
ElementRef,
|
|
2452
2737
|
NgZone,
|
|
2453
2738
|
ChangeDetectorRef,
|
|
2454
|
-
Injector, Boolean])
|
|
2455
|
-
], TextAreaDirective);
|
|
2456
|
-
|
|
2457
|
-
/**
|
|
2458
|
-
* @hidden
|
|
2459
|
-
*/
|
|
2460
|
-
class FloatingLabelInputAdapter {
|
|
2461
|
-
constructor(component, formControl) {
|
|
2462
|
-
this.component = component;
|
|
2463
|
-
const isObservableOrEventEmitter = (event) => event instanceof Observable || event instanceof EventEmitter;
|
|
2464
|
-
if (isObservableOrEventEmitter(component.onFocus)) {
|
|
2465
|
-
this.onFocus = component.onFocus;
|
|
2466
|
-
}
|
|
2467
|
-
if (isObservableOrEventEmitter(component.autoFillStart)) {
|
|
2468
|
-
this.autoFillStart = component.autoFillStart;
|
|
2469
|
-
}
|
|
2470
|
-
if (isObservableOrEventEmitter(component.autoFillEnd)) {
|
|
2471
|
-
this.autoFillEnd = component.autoFillEnd;
|
|
2472
|
-
}
|
|
2473
|
-
if (isObservableOrEventEmitter(component.onBlur)) {
|
|
2474
|
-
this.onBlur = component.onBlur;
|
|
2475
|
-
}
|
|
2476
|
-
if (formControl) {
|
|
2477
|
-
this.onValueChange = formControl.valueChanges;
|
|
2478
|
-
}
|
|
2479
|
-
else if (component.onValueChange) {
|
|
2480
|
-
this.onValueChange = component.onValueChange;
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
get focusableId() {
|
|
2484
|
-
const component = this.component;
|
|
2485
|
-
if ('focusableId' in component) {
|
|
2486
|
-
return component.focusableId;
|
|
2487
|
-
}
|
|
2488
|
-
else if ('id' in component) {
|
|
2489
|
-
return component.id;
|
|
2490
|
-
}
|
|
2491
|
-
return "";
|
|
2492
|
-
}
|
|
2493
|
-
set focusableId(value) {
|
|
2494
|
-
const component = this.component;
|
|
2495
|
-
if ('focusableId' in component) {
|
|
2496
|
-
component.focusableId = value;
|
|
2497
|
-
}
|
|
2498
|
-
else if ('id' in component) {
|
|
2499
|
-
component.id = value;
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
const isFunction = (x) => Object.prototype.toString.call(x) === '[object Function]';
|
|
2505
|
-
/**
|
|
2506
|
-
* @hidden
|
|
2507
|
-
*/
|
|
2508
|
-
let TextBoxContainerComponent = class TextBoxContainerComponent {
|
|
2509
|
-
constructor(elementRef, renderer, changeDetectorRef, rtl) {
|
|
2510
|
-
this.elementRef = elementRef;
|
|
2511
|
-
this.renderer = renderer;
|
|
2512
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
2513
|
-
/**
|
|
2514
|
-
* @hidden
|
|
2515
|
-
*/
|
|
2516
|
-
this.focused = false;
|
|
2517
|
-
/**
|
|
2518
|
-
* @hidden
|
|
2519
|
-
*/
|
|
2520
|
-
this.empty = true;
|
|
2521
|
-
/**
|
|
2522
|
-
* @hidden
|
|
2523
|
-
*/
|
|
2524
|
-
this.invalid = false;
|
|
2525
|
-
this._subscriptions = [];
|
|
2526
|
-
this.autoFillStarted = false;
|
|
2527
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
2528
|
-
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
2529
|
-
}
|
|
2530
|
-
get hostClasses() {
|
|
2531
|
-
return true;
|
|
2532
|
-
}
|
|
2533
|
-
get textareaElementClass() {
|
|
2534
|
-
return !!this.textarea;
|
|
2535
|
-
}
|
|
2536
|
-
get focusedClass() {
|
|
2537
|
-
return this.focused;
|
|
2538
|
-
}
|
|
2539
|
-
get invalidClass() {
|
|
2540
|
-
return this.invalid;
|
|
2541
|
-
}
|
|
2542
|
-
/**
|
|
2543
|
-
* @hidden
|
|
2544
|
-
*/
|
|
2545
|
-
ngAfterContentInit() {
|
|
2546
|
-
if (!this.formControl && !this.kendoInput) {
|
|
2547
|
-
if (isDevMode()) {
|
|
2548
|
-
throw new Error("The TextBoxContainer requires a Kendo Input component" +
|
|
2549
|
-
" or a forms-bound component to function properly.");
|
|
2550
|
-
}
|
|
2551
|
-
return;
|
|
2552
|
-
}
|
|
2553
|
-
// add focus/blur/valueChange handlers
|
|
2554
|
-
const control = new FloatingLabelInputAdapter(this.kendoInput || this.formControl.valueAccessor, this.formControl);
|
|
2555
|
-
const setFocus = (isFocused) => () => {
|
|
2556
|
-
this.focused = isFocused;
|
|
2557
|
-
this.updateState();
|
|
2558
|
-
};
|
|
2559
|
-
this.subscribe(control, 'onFocus', setFocus(true));
|
|
2560
|
-
this.subscribe(control, 'onBlur', setFocus(false));
|
|
2561
|
-
this.subscribe(control, 'autoFillStart', () => {
|
|
2562
|
-
this.autoFillStarted = true;
|
|
2563
|
-
this.renderer.removeClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2564
|
-
});
|
|
2565
|
-
this.subscribe(control, 'autoFillEnd', () => {
|
|
2566
|
-
if (this.autoFillStarted) {
|
|
2567
|
-
this.autoFillStarted = false;
|
|
2568
|
-
if (this.empty) {
|
|
2569
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
});
|
|
2573
|
-
const updateState = () => this.updateState();
|
|
2574
|
-
updateState();
|
|
2575
|
-
this.subscribe(control, 'onValueChange', updateState);
|
|
2576
|
-
// set label id for floating label
|
|
2577
|
-
if (this.id && control.focusableId) {
|
|
2578
|
-
// input wins
|
|
2579
|
-
this.id = control.focusableId;
|
|
2580
|
-
}
|
|
2581
|
-
else if (this.id) {
|
|
2582
|
-
control.focusableId = this.id;
|
|
2583
|
-
}
|
|
2584
|
-
else if (control.focusableId) {
|
|
2585
|
-
this.id = control.focusableId;
|
|
2586
|
-
}
|
|
2587
|
-
else {
|
|
2588
|
-
const id = "_" + guid();
|
|
2589
|
-
control.focusableId = id;
|
|
2590
|
-
this.id = id;
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
/**
|
|
2594
|
-
* @hidden
|
|
2595
|
-
*/
|
|
2596
|
-
ngOnDestroy() {
|
|
2597
|
-
this._subscriptions.forEach(s => s.unsubscribe());
|
|
2598
|
-
this._subscriptions = [];
|
|
2599
|
-
}
|
|
2600
|
-
subscribe(control, eventName, handler) {
|
|
2601
|
-
if (control[eventName] instanceof EventEmitter) {
|
|
2602
|
-
const subscription = control[eventName].subscribe(handler);
|
|
2603
|
-
this._subscriptions.push(subscription);
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
updateState() {
|
|
2607
|
-
const empty = value => {
|
|
2608
|
-
// zero is not an empty value (e.g., NumericTextBox)
|
|
2609
|
-
if (value === 0 || value === false) {
|
|
2610
|
-
return false;
|
|
2611
|
-
}
|
|
2612
|
-
// empty arrays are an empty value (e.g., MultiSelect)
|
|
2613
|
-
if (Array.isArray(value) && !value.length) {
|
|
2614
|
-
return true;
|
|
2615
|
-
}
|
|
2616
|
-
return !value;
|
|
2617
|
-
};
|
|
2618
|
-
const formControl = this.formControl;
|
|
2619
|
-
if (formControl) {
|
|
2620
|
-
const valueAccessor = formControl.valueAccessor;
|
|
2621
|
-
if (isFunction(valueAccessor.isEmpty)) {
|
|
2622
|
-
this.empty = valueAccessor.isEmpty();
|
|
2623
|
-
}
|
|
2624
|
-
else {
|
|
2625
|
-
this.empty = empty(formControl.value);
|
|
2626
|
-
}
|
|
2627
|
-
this.invalid = formControl.invalid && (formControl.touched || formControl.dirty);
|
|
2628
|
-
}
|
|
2629
|
-
else {
|
|
2630
|
-
this.empty = isFunction(this.kendoInput.isEmpty) ?
|
|
2631
|
-
this.kendoInput.isEmpty() : empty(this.kendoInput.value);
|
|
2632
|
-
}
|
|
2633
|
-
if (this.empty) {
|
|
2634
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2635
|
-
}
|
|
2636
|
-
else {
|
|
2637
|
-
this.renderer.removeClass(this.elementRef.nativeElement, 'k-state-empty');
|
|
2638
|
-
}
|
|
2639
|
-
this.changeDetectorRef.markForCheck();
|
|
2640
|
-
}
|
|
2641
|
-
};
|
|
2642
|
-
__decorate([
|
|
2643
|
-
HostBinding('class.k-textbox-container'),
|
|
2644
|
-
__metadata("design:type", Boolean),
|
|
2645
|
-
__metadata("design:paramtypes", [])
|
|
2646
|
-
], TextBoxContainerComponent.prototype, "hostClasses", null);
|
|
2647
|
-
__decorate([
|
|
2648
|
-
HostBinding('class.k-textarea-wrapper'),
|
|
2649
|
-
__metadata("design:type", Boolean),
|
|
2650
|
-
__metadata("design:paramtypes", [])
|
|
2651
|
-
], TextBoxContainerComponent.prototype, "textareaElementClass", null);
|
|
2652
|
-
__decorate([
|
|
2653
|
-
HostBinding('class.k-state-focused'),
|
|
2654
|
-
__metadata("design:type", Boolean),
|
|
2655
|
-
__metadata("design:paramtypes", [])
|
|
2656
|
-
], TextBoxContainerComponent.prototype, "focusedClass", null);
|
|
2657
|
-
__decorate([
|
|
2658
|
-
HostBinding('class.k-state-invalid'),
|
|
2659
|
-
__metadata("design:type", Boolean),
|
|
2660
|
-
__metadata("design:paramtypes", [])
|
|
2661
|
-
], TextBoxContainerComponent.prototype, "invalidClass", null);
|
|
2662
|
-
__decorate([
|
|
2663
|
-
HostBinding('attr.dir'),
|
|
2664
|
-
__metadata("design:type", String)
|
|
2665
|
-
], TextBoxContainerComponent.prototype, "direction", void 0);
|
|
2666
|
-
__decorate([
|
|
2667
|
-
Input(),
|
|
2668
|
-
__metadata("design:type", String)
|
|
2669
|
-
], TextBoxContainerComponent.prototype, "id", void 0);
|
|
2670
|
-
__decorate([
|
|
2671
|
-
Input(),
|
|
2672
|
-
__metadata("design:type", String)
|
|
2673
|
-
], TextBoxContainerComponent.prototype, "floatingLabel", void 0);
|
|
2674
|
-
__decorate([
|
|
2675
|
-
ContentChild(KendoInput, { static: false }),
|
|
2676
|
-
__metadata("design:type", Object)
|
|
2677
|
-
], TextBoxContainerComponent.prototype, "kendoInput", void 0);
|
|
2678
|
-
__decorate([
|
|
2679
|
-
ContentChild(TextAreaDirective, { static: false }),
|
|
2680
|
-
__metadata("design:type", TextAreaDirective)
|
|
2681
|
-
], TextBoxContainerComponent.prototype, "textarea", void 0);
|
|
2682
|
-
__decorate([
|
|
2683
|
-
ContentChild(NgControl, { static: false }),
|
|
2684
|
-
__metadata("design:type", NgControl)
|
|
2685
|
-
], TextBoxContainerComponent.prototype, "formControl", void 0);
|
|
2686
|
-
TextBoxContainerComponent = __decorate([
|
|
2687
|
-
Component({
|
|
2688
|
-
selector: 'kendo-textbox-container',
|
|
2689
|
-
template: `
|
|
2690
|
-
<ng-content></ng-content>
|
|
2691
|
-
<label *ngIf="floatingLabel" [for]="id" class="k-label">{{ floatingLabel }}</label>
|
|
2692
|
-
`
|
|
2693
|
-
}),
|
|
2694
|
-
__param(3, Optional()), __param(3, Inject(RTL)),
|
|
2695
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
2696
|
-
Renderer2,
|
|
2697
|
-
ChangeDetectorRef, Boolean])
|
|
2698
|
-
], TextBoxContainerComponent);
|
|
2699
|
-
|
|
2700
|
-
var TextBoxDirective_1;
|
|
2701
|
-
/**
|
|
2702
|
-
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
2703
|
-
* Used to style the textbox of any `input` element.
|
|
2704
|
-
*
|
|
2705
|
-
* @example
|
|
2706
|
-
* ```ts-no-run
|
|
2707
|
-
* <input kendoTextBox />
|
|
2708
|
-
* <input kendoTextBox type="email" />
|
|
2709
|
-
* <input kendoTextBox type="password" />
|
|
2710
|
-
* ```
|
|
2711
|
-
*/
|
|
2712
|
-
let TextBoxDirective = TextBoxDirective_1 = class TextBoxDirective {
|
|
2713
|
-
constructor(renderer, inputElement, ngZone) {
|
|
2714
|
-
this.renderer = renderer;
|
|
2715
|
-
this.inputElement = inputElement;
|
|
2716
|
-
this.ngZone = ngZone;
|
|
2717
|
-
this.hostClass = true;
|
|
2718
|
-
/**
|
|
2719
|
-
* @hidden
|
|
2720
|
-
*/
|
|
2721
|
-
this.onFocus = new EventEmitter();
|
|
2722
|
-
/**
|
|
2723
|
-
* @hidden
|
|
2724
|
-
*/
|
|
2725
|
-
this.onBlur = new EventEmitter();
|
|
2726
|
-
/**
|
|
2727
|
-
* @hidden
|
|
2728
|
-
*/
|
|
2729
|
-
this.onValueChange = new EventEmitter();
|
|
2730
|
-
/**
|
|
2731
|
-
* @hidden
|
|
2732
|
-
*/
|
|
2733
|
-
this.autoFillStart = new EventEmitter();
|
|
2734
|
-
/**
|
|
2735
|
-
* @hidden
|
|
2736
|
-
*/
|
|
2737
|
-
this.autoFillEnd = new EventEmitter();
|
|
2738
|
-
this.listeners = [];
|
|
2739
|
-
}
|
|
2740
|
-
/**
|
|
2741
|
-
* @hidden
|
|
2742
|
-
*/
|
|
2743
|
-
set value(text) {
|
|
2744
|
-
if (!this.inputElement) {
|
|
2745
|
-
return;
|
|
2746
|
-
}
|
|
2747
|
-
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
2748
|
-
this.onValueChange.emit();
|
|
2749
|
-
}
|
|
2750
|
-
/**
|
|
2751
|
-
* @hidden
|
|
2752
|
-
*/
|
|
2753
|
-
get value() {
|
|
2754
|
-
return this.inputElement.nativeElement.value;
|
|
2755
|
-
}
|
|
2756
|
-
get id() {
|
|
2757
|
-
return this.inputElement.nativeElement.id;
|
|
2758
|
-
}
|
|
2759
|
-
set id(id) {
|
|
2760
|
-
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
2761
|
-
}
|
|
2762
|
-
ngAfterViewInit() {
|
|
2763
|
-
const input = this.inputElement.nativeElement;
|
|
2764
|
-
this.listeners = [
|
|
2765
|
-
this.renderer.listen(input, 'focus', () => this.onFocus.emit()),
|
|
2766
|
-
this.renderer.listen(input, 'blur', () => this.onBlur.emit())
|
|
2767
|
-
];
|
|
2768
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2769
|
-
this.renderer.listen(input, 'animationstart', (e) => {
|
|
2770
|
-
if (e.animationName === 'autoFillStart') {
|
|
2771
|
-
this.autoFillStart.emit();
|
|
2772
|
-
}
|
|
2773
|
-
else if (e.animationName === 'autoFillEnd') {
|
|
2774
|
-
this.autoFillEnd.emit();
|
|
2775
|
-
}
|
|
2776
|
-
});
|
|
2777
|
-
});
|
|
2778
|
-
}
|
|
2779
|
-
ngOnDestroy() {
|
|
2780
|
-
this.listeners.forEach(listener => listener());
|
|
2781
|
-
}
|
|
2782
|
-
};
|
|
2783
|
-
__decorate([
|
|
2784
|
-
HostBinding('class.k-textbox'),
|
|
2785
|
-
__metadata("design:type", Boolean)
|
|
2786
|
-
], TextBoxDirective.prototype, "hostClass", void 0);
|
|
2787
|
-
__decorate([
|
|
2788
|
-
Input(),
|
|
2789
|
-
__metadata("design:type", String),
|
|
2790
|
-
__metadata("design:paramtypes", [String])
|
|
2791
|
-
], TextBoxDirective.prototype, "value", null);
|
|
2792
|
-
TextBoxDirective = TextBoxDirective_1 = __decorate([
|
|
2793
|
-
Directive({
|
|
2794
|
-
selector: 'input[kendoTextBox]',
|
|
2795
|
-
providers: [{
|
|
2796
|
-
provide: KendoInput,
|
|
2797
|
-
useExisting: forwardRef(() => TextBoxDirective_1)
|
|
2798
|
-
}]
|
|
2799
|
-
}),
|
|
2800
|
-
__metadata("design:paramtypes", [Renderer2,
|
|
2801
|
-
ElementRef,
|
|
2802
|
-
NgZone])
|
|
2803
|
-
], TextBoxDirective);
|
|
2739
|
+
Injector, Boolean])
|
|
2740
|
+
], TextAreaDirective);
|
|
2804
2741
|
|
|
2805
2742
|
/**
|
|
2806
2743
|
* @hidden
|
|
@@ -2966,8 +2903,7 @@ const PARSABLE_DEFAULTS = {
|
|
|
2966
2903
|
min: null,
|
|
2967
2904
|
step: 1
|
|
2968
2905
|
};
|
|
2969
|
-
const FOCUSED$1 = 'k-
|
|
2970
|
-
const FORMATTED_VALUE = 'k-formatted-value';
|
|
2906
|
+
const FOCUSED$1 = 'k-focus';
|
|
2971
2907
|
/**
|
|
2972
2908
|
* Represents the [Kendo UI NumericTextBox component for Angular]({% slug overview_numerictextbox %}).
|
|
2973
2909
|
*/
|
|
@@ -3062,15 +2998,20 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3062
2998
|
* @hidden
|
|
3063
2999
|
*/
|
|
3064
3000
|
this.arrowDirection = ArrowDirection.None;
|
|
3001
|
+
this.hostClasses = true;
|
|
3065
3002
|
this.inputValue = '';
|
|
3066
3003
|
this.minValidateFn = noop;
|
|
3067
3004
|
this.maxValidateFn = noop;
|
|
3068
3005
|
this._format = "n2";
|
|
3069
3006
|
this.isPasted = false;
|
|
3070
3007
|
this.mouseDown = false;
|
|
3008
|
+
this._size = 'medium';
|
|
3009
|
+
this._rounded = 'medium';
|
|
3010
|
+
this._fillMode = 'solid';
|
|
3071
3011
|
this.ngChange = noop;
|
|
3072
3012
|
this.ngTouched = noop;
|
|
3073
3013
|
this.ngValidatorChange = noop;
|
|
3014
|
+
this.domEvents = [];
|
|
3074
3015
|
/**
|
|
3075
3016
|
* @hidden
|
|
3076
3017
|
*/
|
|
@@ -3256,8 +3197,56 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3256
3197
|
get tabIndex() {
|
|
3257
3198
|
return this.tabindex;
|
|
3258
3199
|
}
|
|
3259
|
-
|
|
3260
|
-
|
|
3200
|
+
/**
|
|
3201
|
+
* The size property specifies the font size and line height of the NumericTextBox
|
|
3202
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-size)).
|
|
3203
|
+
* The possible values are:
|
|
3204
|
+
* * `'small'`
|
|
3205
|
+
* * `'medium'` (default)
|
|
3206
|
+
* * `'large'`
|
|
3207
|
+
* * `null`
|
|
3208
|
+
*/
|
|
3209
|
+
set size(size) {
|
|
3210
|
+
this.handleClasses(size, 'size');
|
|
3211
|
+
this._size = size;
|
|
3212
|
+
}
|
|
3213
|
+
get size() {
|
|
3214
|
+
return this._size;
|
|
3215
|
+
}
|
|
3216
|
+
/**
|
|
3217
|
+
* The rounded property specifies the border radius of the NumericTextBox
|
|
3218
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-rounded)).
|
|
3219
|
+
* The possible values are:
|
|
3220
|
+
* * `'small'`
|
|
3221
|
+
* * `'medium'` (default)
|
|
3222
|
+
* * `'large'`
|
|
3223
|
+
* * `null`
|
|
3224
|
+
*/
|
|
3225
|
+
set rounded(rounded) {
|
|
3226
|
+
this.handleClasses(rounded, 'rounded');
|
|
3227
|
+
this._rounded = rounded;
|
|
3228
|
+
}
|
|
3229
|
+
get rounded() {
|
|
3230
|
+
return this._rounded;
|
|
3231
|
+
}
|
|
3232
|
+
/**
|
|
3233
|
+
* The fillMode property specifies the background and border styles of the NumericTextBox
|
|
3234
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-fillMode)).
|
|
3235
|
+
* The possible values are:
|
|
3236
|
+
* * `'flat'`
|
|
3237
|
+
* * `'solid'` (default)
|
|
3238
|
+
* * `'outline'`
|
|
3239
|
+
* * `null`
|
|
3240
|
+
*/
|
|
3241
|
+
set fillMode(fillMode) {
|
|
3242
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
3243
|
+
this._fillMode = fillMode;
|
|
3244
|
+
}
|
|
3245
|
+
get fillMode() {
|
|
3246
|
+
return this._fillMode;
|
|
3247
|
+
}
|
|
3248
|
+
get disableClass() {
|
|
3249
|
+
return this.disabled;
|
|
3261
3250
|
}
|
|
3262
3251
|
ngOnInit() {
|
|
3263
3252
|
this.subscriptions = this.localizationService
|
|
@@ -3270,6 +3259,16 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3270
3259
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
3271
3260
|
}
|
|
3272
3261
|
this.control = this.injector.get(NgControl, null);
|
|
3262
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3263
|
+
this.domEvents.push(this.renderer.listen(this.hostElement.nativeElement, 'mousewheel', this.handleWheel.bind(this)));
|
|
3264
|
+
this.domEvents.push(this.renderer.listen(this.hostElement.nativeElement, 'DOMMouseScroll', this.handleWheel.bind(this)));
|
|
3265
|
+
});
|
|
3266
|
+
}
|
|
3267
|
+
ngAfterViewInit() {
|
|
3268
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
3269
|
+
stylingInputs.forEach(input => {
|
|
3270
|
+
this.handleClasses(this[input], input);
|
|
3271
|
+
});
|
|
3273
3272
|
}
|
|
3274
3273
|
/**
|
|
3275
3274
|
* @hidden
|
|
@@ -3303,6 +3302,7 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3303
3302
|
this.subscriptions.unsubscribe();
|
|
3304
3303
|
}
|
|
3305
3304
|
clearTimeout(this.spinTimeout);
|
|
3305
|
+
this.domEvents.forEach(unbindHandler => unbindHandler());
|
|
3306
3306
|
}
|
|
3307
3307
|
/**
|
|
3308
3308
|
* @hidden
|
|
@@ -3408,18 +3408,13 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3408
3408
|
return this.decimals !== null && this.decimals >= 0;
|
|
3409
3409
|
}
|
|
3410
3410
|
set focused(value) {
|
|
3411
|
-
if (this.isFocused !== value && this.
|
|
3412
|
-
const wrap = this.
|
|
3413
|
-
const input = this.numericInput.nativeElement;
|
|
3411
|
+
if (this.isFocused !== value && this.hostElement) {
|
|
3412
|
+
const wrap = this.hostElement.nativeElement;
|
|
3414
3413
|
if (value) {
|
|
3415
3414
|
this.renderer.addClass(wrap, FOCUSED$1);
|
|
3416
|
-
if (!this.isDisabled) {
|
|
3417
|
-
this.renderer.removeClass(input, FORMATTED_VALUE);
|
|
3418
|
-
}
|
|
3419
3415
|
}
|
|
3420
3416
|
else {
|
|
3421
3417
|
this.renderer.removeClass(wrap, FOCUSED$1);
|
|
3422
|
-
this.renderer.addClass(input, FORMATTED_VALUE);
|
|
3423
3418
|
}
|
|
3424
3419
|
this.isFocused = value;
|
|
3425
3420
|
}
|
|
@@ -3710,6 +3705,16 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3710
3705
|
}
|
|
3711
3706
|
return significantChars;
|
|
3712
3707
|
}
|
|
3708
|
+
handleClasses(value, input) {
|
|
3709
|
+
const elem = this.hostElement.nativeElement;
|
|
3710
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
3711
|
+
if (classes.toRemove) {
|
|
3712
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
3713
|
+
}
|
|
3714
|
+
if (classes.toAdd) {
|
|
3715
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3713
3718
|
};
|
|
3714
3719
|
__decorate([
|
|
3715
3720
|
Input(),
|
|
@@ -3789,6 +3794,21 @@ __decorate([
|
|
|
3789
3794
|
Input(),
|
|
3790
3795
|
__metadata("design:type", Number)
|
|
3791
3796
|
], NumericTextBoxComponent.prototype, "maxlength", void 0);
|
|
3797
|
+
__decorate([
|
|
3798
|
+
Input(),
|
|
3799
|
+
__metadata("design:type", String),
|
|
3800
|
+
__metadata("design:paramtypes", [String])
|
|
3801
|
+
], NumericTextBoxComponent.prototype, "size", null);
|
|
3802
|
+
__decorate([
|
|
3803
|
+
Input(),
|
|
3804
|
+
__metadata("design:type", String),
|
|
3805
|
+
__metadata("design:paramtypes", [String])
|
|
3806
|
+
], NumericTextBoxComponent.prototype, "rounded", null);
|
|
3807
|
+
__decorate([
|
|
3808
|
+
Input(),
|
|
3809
|
+
__metadata("design:type", String),
|
|
3810
|
+
__metadata("design:paramtypes", [String])
|
|
3811
|
+
], NumericTextBoxComponent.prototype, "fillMode", null);
|
|
3792
3812
|
__decorate([
|
|
3793
3813
|
Output(),
|
|
3794
3814
|
__metadata("design:type", EventEmitter)
|
|
@@ -3805,20 +3825,20 @@ __decorate([
|
|
|
3805
3825
|
ViewChild('numericInput', { static: true }),
|
|
3806
3826
|
__metadata("design:type", ElementRef)
|
|
3807
3827
|
], NumericTextBoxComponent.prototype, "numericInput", void 0);
|
|
3808
|
-
__decorate([
|
|
3809
|
-
ViewChild('numericWrap', { static: true }),
|
|
3810
|
-
__metadata("design:type", ElementRef)
|
|
3811
|
-
], NumericTextBoxComponent.prototype, "numericWrap", void 0);
|
|
3812
3828
|
__decorate([
|
|
3813
3829
|
HostBinding('attr.dir'),
|
|
3814
3830
|
__metadata("design:type", String)
|
|
3815
3831
|
], NumericTextBoxComponent.prototype, "direction", void 0);
|
|
3816
3832
|
__decorate([
|
|
3817
|
-
HostBinding('class.k-
|
|
3818
|
-
HostBinding('class.k-numerictextbox'),
|
|
3833
|
+
HostBinding('class.k-disabled'),
|
|
3819
3834
|
__metadata("design:type", Boolean),
|
|
3820
3835
|
__metadata("design:paramtypes", [])
|
|
3821
|
-
], NumericTextBoxComponent.prototype, "
|
|
3836
|
+
], NumericTextBoxComponent.prototype, "disableClass", null);
|
|
3837
|
+
__decorate([
|
|
3838
|
+
HostBinding('class.k-input'),
|
|
3839
|
+
HostBinding('class.k-numerictextbox'),
|
|
3840
|
+
__metadata("design:type", Boolean)
|
|
3841
|
+
], NumericTextBoxComponent.prototype, "hostClasses", void 0);
|
|
3822
3842
|
NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
3823
3843
|
Component({
|
|
3824
3844
|
exportAs: 'kendoNumericTextBox',
|
|
@@ -3838,14 +3858,9 @@ NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
|
3838
3858
|
decrement="Decrease value"
|
|
3839
3859
|
>
|
|
3840
3860
|
</ng-container>
|
|
3841
|
-
<span
|
|
3842
|
-
class="k-numeric-wrap"
|
|
3843
|
-
[class.k-state-disabled]="disabled"
|
|
3844
|
-
[kendoEventsOutsideAngular]="{ mousewheel: handleWheel, DOMMouseScroll: handleWheel }"
|
|
3845
|
-
#numericWrap>
|
|
3846
3861
|
<input
|
|
3847
3862
|
role="spinbutton"
|
|
3848
|
-
class="k-input
|
|
3863
|
+
class="k-input-inner"
|
|
3849
3864
|
autocomplete="off"
|
|
3850
3865
|
autocorrect="off"
|
|
3851
3866
|
[id]="focusableId"
|
|
@@ -3868,29 +3883,35 @@ NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
|
3868
3883
|
paste: handlePaste
|
|
3869
3884
|
}"
|
|
3870
3885
|
#numericInput />
|
|
3871
|
-
<span
|
|
3872
|
-
|
|
3873
|
-
|
|
3886
|
+
<span
|
|
3887
|
+
class="k-input-spinner k-spin-button" *ngIf="spinners"
|
|
3888
|
+
[kendoEventsOutsideAngular]="{ mouseup: releaseArrow, mouseleave: releaseArrow }"
|
|
3889
|
+
>
|
|
3890
|
+
<button
|
|
3891
|
+
type="button"
|
|
3874
3892
|
[kendoEventsOutsideAngular]="{ mousedown: increasePress }"
|
|
3893
|
+
[attr.aria-hidden]="true"
|
|
3875
3894
|
[attr.aria-label]="incrementTitle"
|
|
3876
3895
|
[title]="incrementTitle"
|
|
3877
|
-
[class.k-
|
|
3878
|
-
class="k-
|
|
3896
|
+
[class.k-active]="arrowDirection === ArrowDirection.Up"
|
|
3897
|
+
class="k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base"
|
|
3898
|
+
tabindex="-1"
|
|
3879
3899
|
>
|
|
3880
|
-
<span class="k-icon k-i-arrow-n"></span>
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3900
|
+
<span class="k-button-icon k-icon k-i-arrow-n"></span>
|
|
3901
|
+
</button>
|
|
3902
|
+
<button
|
|
3903
|
+
type="button"
|
|
3884
3904
|
[kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
|
|
3905
|
+
[attr.aria-hidden]="true"
|
|
3885
3906
|
[attr.aria-label]="decrementTitle"
|
|
3886
3907
|
[title]="decrementTitle"
|
|
3887
|
-
[class.k-
|
|
3888
|
-
class="k-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3908
|
+
[class.k-active]="arrowDirection === ArrowDirection.Down"
|
|
3909
|
+
class="k-spinner-decrease k-button k-icon-button k-button-solid k-button-solid-base"
|
|
3910
|
+
tabindex="-1"
|
|
3911
|
+
>
|
|
3912
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
3913
|
+
</button>
|
|
3892
3914
|
</span>
|
|
3893
|
-
</span>
|
|
3894
3915
|
`
|
|
3895
3916
|
}),
|
|
3896
3917
|
__metadata("design:paramtypes", [IntlService,
|
|
@@ -4370,7 +4391,7 @@ MaskingService = __decorate([
|
|
|
4370
4391
|
|
|
4371
4392
|
var MaskedTextBoxComponent_1;
|
|
4372
4393
|
const resolvedPromise = Promise.resolve(null);
|
|
4373
|
-
const FOCUSED$2 = 'k-
|
|
4394
|
+
const FOCUSED$2 = 'k-focus';
|
|
4374
4395
|
/**
|
|
4375
4396
|
* Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
|
|
4376
4397
|
*
|
|
@@ -4503,6 +4524,9 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4503
4524
|
};
|
|
4504
4525
|
this.isPasted = false;
|
|
4505
4526
|
this.selection = [0, 0];
|
|
4527
|
+
this._size = 'medium';
|
|
4528
|
+
this._rounded = 'medium';
|
|
4529
|
+
this._fillMode = 'solid';
|
|
4506
4530
|
/**
|
|
4507
4531
|
* @hidden
|
|
4508
4532
|
*/
|
|
@@ -4555,6 +4579,54 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4555
4579
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4556
4580
|
this.updateService();
|
|
4557
4581
|
}
|
|
4582
|
+
/**
|
|
4583
|
+
* The size property specifies the font size and line height of the MaskedTextBox
|
|
4584
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
|
|
4585
|
+
* The possible values are:
|
|
4586
|
+
* * `'small'`
|
|
4587
|
+
* * `'medium'` (default)
|
|
4588
|
+
* * `'large'`
|
|
4589
|
+
* * `null`
|
|
4590
|
+
*/
|
|
4591
|
+
set size(size) {
|
|
4592
|
+
this.handleClasses(size, 'size');
|
|
4593
|
+
this._size = size;
|
|
4594
|
+
}
|
|
4595
|
+
get size() {
|
|
4596
|
+
return this._size;
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* The rounded property specifies the border radius of the MaskedTextBox
|
|
4600
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-rounded)).
|
|
4601
|
+
* The possible values are:
|
|
4602
|
+
* * `'small'`
|
|
4603
|
+
* * `'medium'` (default)
|
|
4604
|
+
* * `'large'`
|
|
4605
|
+
* * `null`
|
|
4606
|
+
*/
|
|
4607
|
+
set rounded(rounded) {
|
|
4608
|
+
this.handleClasses(rounded, 'rounded');
|
|
4609
|
+
this._rounded = rounded;
|
|
4610
|
+
}
|
|
4611
|
+
get rounded() {
|
|
4612
|
+
return this._rounded;
|
|
4613
|
+
}
|
|
4614
|
+
/**
|
|
4615
|
+
* The fillMode property specifies the background and border styles of the MaskedTexBox
|
|
4616
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-fillMode)).
|
|
4617
|
+
* The possible values are:
|
|
4618
|
+
* * `flat`
|
|
4619
|
+
* * `solid` (default)
|
|
4620
|
+
* * `outline`
|
|
4621
|
+
* * `null`
|
|
4622
|
+
*/
|
|
4623
|
+
set fillMode(fillMode) {
|
|
4624
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
4625
|
+
this._fillMode = fillMode;
|
|
4626
|
+
}
|
|
4627
|
+
get fillMode() {
|
|
4628
|
+
return this._fillMode;
|
|
4629
|
+
}
|
|
4558
4630
|
get hostDisabledClass() {
|
|
4559
4631
|
return this.disabled;
|
|
4560
4632
|
}
|
|
@@ -4582,9 +4654,15 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4582
4654
|
}
|
|
4583
4655
|
this.control = this.injector.get(NgControl, null);
|
|
4584
4656
|
}
|
|
4657
|
+
ngAfterViewInit() {
|
|
4658
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
4659
|
+
stylingInputs.forEach(input => {
|
|
4660
|
+
this.handleClasses(this[input], input);
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4585
4663
|
/**
|
|
4586
4664
|
* @hidden
|
|
4587
|
-
* Used by the
|
|
4665
|
+
* Used by the FloatingLabel to determine if the MaskedTextBox is empty.
|
|
4588
4666
|
*/
|
|
4589
4667
|
isEmpty() {
|
|
4590
4668
|
if (this.input) {
|
|
@@ -4823,6 +4901,16 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4823
4901
|
}
|
|
4824
4902
|
return present ? value : '';
|
|
4825
4903
|
}
|
|
4904
|
+
handleClasses(value, input) {
|
|
4905
|
+
const elem = this.hostElement.nativeElement;
|
|
4906
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
4907
|
+
if (classes.toRemove) {
|
|
4908
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
4909
|
+
}
|
|
4910
|
+
if (classes.toAdd) {
|
|
4911
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4826
4914
|
};
|
|
4827
4915
|
__decorate([
|
|
4828
4916
|
Input(),
|
|
@@ -4840,17 +4928,32 @@ __decorate([
|
|
|
4840
4928
|
Input(),
|
|
4841
4929
|
__metadata("design:type", String)
|
|
4842
4930
|
], MaskedTextBoxComponent.prototype, "title", void 0);
|
|
4931
|
+
__decorate([
|
|
4932
|
+
Input(),
|
|
4933
|
+
__metadata("design:type", String),
|
|
4934
|
+
__metadata("design:paramtypes", [String])
|
|
4935
|
+
], MaskedTextBoxComponent.prototype, "size", null);
|
|
4936
|
+
__decorate([
|
|
4937
|
+
Input(),
|
|
4938
|
+
__metadata("design:type", String),
|
|
4939
|
+
__metadata("design:paramtypes", [String])
|
|
4940
|
+
], MaskedTextBoxComponent.prototype, "rounded", null);
|
|
4941
|
+
__decorate([
|
|
4942
|
+
Input(),
|
|
4943
|
+
__metadata("design:type", String),
|
|
4944
|
+
__metadata("design:paramtypes", [String])
|
|
4945
|
+
], MaskedTextBoxComponent.prototype, "fillMode", null);
|
|
4843
4946
|
__decorate([
|
|
4844
4947
|
HostBinding('attr.dir'),
|
|
4845
4948
|
__metadata("design:type", String)
|
|
4846
4949
|
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
4847
4950
|
__decorate([
|
|
4848
|
-
HostBinding('class.k-
|
|
4951
|
+
HostBinding('class.k-input'),
|
|
4849
4952
|
HostBinding('class.k-maskedtextbox'),
|
|
4850
4953
|
__metadata("design:type", Boolean)
|
|
4851
4954
|
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
4852
4955
|
__decorate([
|
|
4853
|
-
HostBinding('class.k-
|
|
4956
|
+
HostBinding('class.k-disabled'),
|
|
4854
4957
|
__metadata("design:type", Boolean),
|
|
4855
4958
|
__metadata("design:paramtypes", [])
|
|
4856
4959
|
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
@@ -4952,7 +5055,7 @@ MaskedTextBoxComponent = MaskedTextBoxComponent_1 = __decorate([
|
|
|
4952
5055
|
autocorrect="off"
|
|
4953
5056
|
autocapitalize="off"
|
|
4954
5057
|
spellcheck="false"
|
|
4955
|
-
class="k-
|
|
5058
|
+
class="k-input-inner"
|
|
4956
5059
|
[id]="focusableId"
|
|
4957
5060
|
[tabindex]="tabIndex"
|
|
4958
5061
|
[attr.title]="title"
|
|
@@ -5656,7 +5759,7 @@ TextBoxPrefixTemplateDirective = __decorate([
|
|
|
5656
5759
|
], TextBoxPrefixTemplateDirective);
|
|
5657
5760
|
|
|
5658
5761
|
var TextBoxComponent_1;
|
|
5659
|
-
const FOCUSED$3 = 'k-
|
|
5762
|
+
const FOCUSED$3 = 'k-focus';
|
|
5660
5763
|
let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
5661
5764
|
constructor(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
5662
5765
|
this.localizationService = localizationService;
|
|
@@ -5790,9 +5893,12 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5790
5893
|
* ```
|
|
5791
5894
|
*/
|
|
5792
5895
|
this.onBlur = new EventEmitter();
|
|
5793
|
-
this.
|
|
5896
|
+
this.hostClasses = true;
|
|
5794
5897
|
this._isFocused = false;
|
|
5795
5898
|
this.focusChangedProgrammatically = false;
|
|
5899
|
+
this._size = 'medium';
|
|
5900
|
+
this._rounded = 'medium';
|
|
5901
|
+
this._fillMode = 'solid';
|
|
5796
5902
|
/**
|
|
5797
5903
|
* @hidden
|
|
5798
5904
|
*/
|
|
@@ -5846,6 +5952,58 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5846
5952
|
validatePackage(packageMetadata);
|
|
5847
5953
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
5848
5954
|
}
|
|
5955
|
+
/**
|
|
5956
|
+
* The size property specifies the font size and line height of the TextBox
|
|
5957
|
+
* ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
5958
|
+
*
|
|
5959
|
+
* The possible values are:
|
|
5960
|
+
* * `'small'`
|
|
5961
|
+
* * `'medium'` (default)
|
|
5962
|
+
* * `'large'`
|
|
5963
|
+
* * `null`
|
|
5964
|
+
*/
|
|
5965
|
+
set size(size) {
|
|
5966
|
+
this.handleClasses(size, 'size');
|
|
5967
|
+
this._size = size;
|
|
5968
|
+
}
|
|
5969
|
+
get size() {
|
|
5970
|
+
return this._size;
|
|
5971
|
+
}
|
|
5972
|
+
/**
|
|
5973
|
+
* The rounded property specifies the border radius of the TextBox
|
|
5974
|
+
* ([see example]({% slug appearance_textbox %}#toc-rounded)).
|
|
5975
|
+
*
|
|
5976
|
+
* The possible values are:
|
|
5977
|
+
* * `'small'`
|
|
5978
|
+
* * `'medium'` (default)
|
|
5979
|
+
* * `'large'`
|
|
5980
|
+
* * `'full'`
|
|
5981
|
+
* * `null`
|
|
5982
|
+
*/
|
|
5983
|
+
set rounded(rounded) {
|
|
5984
|
+
this.handleClasses(rounded, 'rounded');
|
|
5985
|
+
this._rounded = rounded;
|
|
5986
|
+
}
|
|
5987
|
+
get rounded() {
|
|
5988
|
+
return this._rounded;
|
|
5989
|
+
}
|
|
5990
|
+
/**
|
|
5991
|
+
* The fillMode property specifies the background and border styles of the TextBox
|
|
5992
|
+
* ([see example]({% slug appearance_textbox %}#toc-fillMode)).
|
|
5993
|
+
*
|
|
5994
|
+
* The possible values are:
|
|
5995
|
+
* * `'flat'`
|
|
5996
|
+
* * `'solid'` (default)
|
|
5997
|
+
* * `'outline'`
|
|
5998
|
+
* * `null`
|
|
5999
|
+
*/
|
|
6000
|
+
set fillMode(fillMode) {
|
|
6001
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
6002
|
+
this._fillMode = fillMode;
|
|
6003
|
+
}
|
|
6004
|
+
get fillMode() {
|
|
6005
|
+
return this._fillMode;
|
|
6006
|
+
}
|
|
5849
6007
|
/**
|
|
5850
6008
|
* @hidden
|
|
5851
6009
|
*/
|
|
@@ -5911,6 +6069,10 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5911
6069
|
}
|
|
5912
6070
|
}));
|
|
5913
6071
|
});
|
|
6072
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
6073
|
+
stylingInputs.forEach(input => {
|
|
6074
|
+
this.handleClasses(this[input], input);
|
|
6075
|
+
});
|
|
5914
6076
|
}
|
|
5915
6077
|
ngOnChanges(changes) {
|
|
5916
6078
|
if (changes.disabled || changes.readonly || changes.value) {
|
|
@@ -6043,16 +6205,16 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6043
6205
|
*/
|
|
6044
6206
|
get successIconClasses() {
|
|
6045
6207
|
return this.successIcon
|
|
6046
|
-
?
|
|
6047
|
-
: `k-
|
|
6208
|
+
? `${this.successIcon}`
|
|
6209
|
+
: `k-validation-icon k-icon k-i-check`;
|
|
6048
6210
|
}
|
|
6049
6211
|
/**
|
|
6050
6212
|
* @hidden
|
|
6051
6213
|
*/
|
|
6052
6214
|
get errorIconClasses() {
|
|
6053
6215
|
return this.errorIcon
|
|
6054
|
-
?
|
|
6055
|
-
: `k-
|
|
6216
|
+
? `${this.errorIcon}`
|
|
6217
|
+
: `k-validation-icon k-icon k-i-warning`;
|
|
6056
6218
|
}
|
|
6057
6219
|
/**
|
|
6058
6220
|
* @hidden
|
|
@@ -6060,7 +6222,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6060
6222
|
get clearButtonClasses() {
|
|
6061
6223
|
return this.clearButtonIcon
|
|
6062
6224
|
? this.clearButtonIcon
|
|
6063
|
-
: `k-icon k-i-
|
|
6225
|
+
: `k-icon k-i-x`;
|
|
6064
6226
|
}
|
|
6065
6227
|
/**
|
|
6066
6228
|
* @hidden
|
|
@@ -6122,6 +6284,16 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6122
6284
|
this.isFocused = false;
|
|
6123
6285
|
});
|
|
6124
6286
|
}
|
|
6287
|
+
handleClasses(value, input) {
|
|
6288
|
+
const elem = this.hostElement.nativeElement;
|
|
6289
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
6290
|
+
if (classes.toRemove) {
|
|
6291
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
6292
|
+
}
|
|
6293
|
+
if (classes.toAdd) {
|
|
6294
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
6295
|
+
}
|
|
6296
|
+
}
|
|
6125
6297
|
};
|
|
6126
6298
|
__decorate([
|
|
6127
6299
|
Input(),
|
|
@@ -6175,6 +6347,21 @@ __decorate([
|
|
|
6175
6347
|
Input(),
|
|
6176
6348
|
__metadata("design:type", String)
|
|
6177
6349
|
], TextBoxComponent.prototype, "clearButtonIcon", void 0);
|
|
6350
|
+
__decorate([
|
|
6351
|
+
Input(),
|
|
6352
|
+
__metadata("design:type", String),
|
|
6353
|
+
__metadata("design:paramtypes", [String])
|
|
6354
|
+
], TextBoxComponent.prototype, "size", null);
|
|
6355
|
+
__decorate([
|
|
6356
|
+
Input(),
|
|
6357
|
+
__metadata("design:type", String),
|
|
6358
|
+
__metadata("design:paramtypes", [String])
|
|
6359
|
+
], TextBoxComponent.prototype, "rounded", null);
|
|
6360
|
+
__decorate([
|
|
6361
|
+
Input(),
|
|
6362
|
+
__metadata("design:type", String),
|
|
6363
|
+
__metadata("design:paramtypes", [String])
|
|
6364
|
+
], TextBoxComponent.prototype, "fillMode", null);
|
|
6178
6365
|
__decorate([
|
|
6179
6366
|
Input(),
|
|
6180
6367
|
__metadata("design:type", Number),
|
|
@@ -6221,14 +6408,15 @@ __decorate([
|
|
|
6221
6408
|
__metadata("design:type", TextBoxPrefixTemplateDirective)
|
|
6222
6409
|
], TextBoxComponent.prototype, "prefixTemplate", void 0);
|
|
6223
6410
|
__decorate([
|
|
6224
|
-
HostBinding('class.k-
|
|
6411
|
+
HostBinding('class.k-disabled'),
|
|
6225
6412
|
__metadata("design:type", Boolean),
|
|
6226
6413
|
__metadata("design:paramtypes", [])
|
|
6227
6414
|
], TextBoxComponent.prototype, "disabledClass", null);
|
|
6228
6415
|
__decorate([
|
|
6229
6416
|
HostBinding('class.k-textbox'),
|
|
6417
|
+
HostBinding('class.k-input'),
|
|
6230
6418
|
__metadata("design:type", Boolean)
|
|
6231
|
-
], TextBoxComponent.prototype, "
|
|
6419
|
+
], TextBoxComponent.prototype, "hostClasses", void 0);
|
|
6232
6420
|
__decorate([
|
|
6233
6421
|
HostBinding('attr.dir'),
|
|
6234
6422
|
__metadata("design:type", String)
|
|
@@ -6259,7 +6447,7 @@ TextBoxComponent = TextBoxComponent_1 = __decorate([
|
|
|
6259
6447
|
</ng-template>
|
|
6260
6448
|
</span>
|
|
6261
6449
|
<input
|
|
6262
|
-
class="k-input"
|
|
6450
|
+
class="k-input-inner"
|
|
6263
6451
|
#input
|
|
6264
6452
|
[id]="focusableId"
|
|
6265
6453
|
[disabled]="disabled"
|
|
@@ -6473,7 +6661,6 @@ TextBoxModule = __decorate([
|
|
|
6473
6661
|
NgModule({
|
|
6474
6662
|
declarations: [
|
|
6475
6663
|
TextBoxDirective,
|
|
6476
|
-
TextBoxContainerComponent,
|
|
6477
6664
|
TextBoxComponent,
|
|
6478
6665
|
TextBoxSuffixTemplateDirective,
|
|
6479
6666
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6482,7 +6669,6 @@ TextBoxModule = __decorate([
|
|
|
6482
6669
|
],
|
|
6483
6670
|
exports: [
|
|
6484
6671
|
TextBoxDirective,
|
|
6485
|
-
TextBoxContainerComponent,
|
|
6486
6672
|
TextBoxComponent,
|
|
6487
6673
|
TextBoxSuffixTemplateDirective,
|
|
6488
6674
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6615,7 +6801,7 @@ __decorate([
|
|
|
6615
6801
|
__metadata("design:type", ElementRef)
|
|
6616
6802
|
], TextFieldsBase.prototype, "input", void 0);
|
|
6617
6803
|
__decorate([
|
|
6618
|
-
HostBinding('class.k-
|
|
6804
|
+
HostBinding('class.k-disabled'),
|
|
6619
6805
|
__metadata("design:type", Boolean),
|
|
6620
6806
|
__metadata("design:paramtypes", [])
|
|
6621
6807
|
], TextFieldsBase.prototype, "disabledClass", null);
|
|
@@ -6632,7 +6818,7 @@ const resizeClasses = {
|
|
|
6632
6818
|
'none': 'k-resize-none',
|
|
6633
6819
|
'auto': 'k-resize-none'
|
|
6634
6820
|
};
|
|
6635
|
-
const FOCUSED$4 = 'k-
|
|
6821
|
+
const FOCUSED$4 = 'k-focus';
|
|
6636
6822
|
/**
|
|
6637
6823
|
* Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
|
|
6638
6824
|
*/
|
|
@@ -6649,7 +6835,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6649
6835
|
* @hidden
|
|
6650
6836
|
*/
|
|
6651
6837
|
this.focusableId = `k-${guid()}`;
|
|
6652
|
-
this.
|
|
6838
|
+
this.hostClasses = true;
|
|
6653
6839
|
/**
|
|
6654
6840
|
* Specifies the flow direction of the TextArea sections. This property is useful when adornments are used, in order to specify
|
|
6655
6841
|
* their position in relation to the textarea element.
|
|
@@ -6723,6 +6909,9 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6723
6909
|
* When the component value is changed programmatically or via its form control binding, the valueChange event is not emitted.
|
|
6724
6910
|
*/
|
|
6725
6911
|
this.valueChange = new EventEmitter();
|
|
6912
|
+
this._size = 'medium';
|
|
6913
|
+
this._rounded = 'medium';
|
|
6914
|
+
this._fillMode = 'solid';
|
|
6726
6915
|
/**
|
|
6727
6916
|
* @hidden
|
|
6728
6917
|
*/
|
|
@@ -6778,6 +6967,57 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6778
6967
|
get tabIndex() {
|
|
6779
6968
|
return this.tabindex;
|
|
6780
6969
|
}
|
|
6970
|
+
/**
|
|
6971
|
+
* The size property specifies the font size and line height of the TextArea
|
|
6972
|
+
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
6973
|
+
*
|
|
6974
|
+
* The possible values are:
|
|
6975
|
+
* * `'small'`
|
|
6976
|
+
* * `'medium'` (default)
|
|
6977
|
+
* * `'large'`
|
|
6978
|
+
* * `null`
|
|
6979
|
+
*/
|
|
6980
|
+
set size(size) {
|
|
6981
|
+
this.handleClasses(size, 'size');
|
|
6982
|
+
this._size = size;
|
|
6983
|
+
}
|
|
6984
|
+
get size() {
|
|
6985
|
+
return this._size;
|
|
6986
|
+
}
|
|
6987
|
+
/**
|
|
6988
|
+
* The rounded property specifies the border radius of the TextArea
|
|
6989
|
+
* ([see example]({% slug appearance_textarea %}#toc-rounded)).
|
|
6990
|
+
*
|
|
6991
|
+
* The possible values are:
|
|
6992
|
+
* * `'small'`
|
|
6993
|
+
* * `'medium'` (default)
|
|
6994
|
+
* * `'large'`
|
|
6995
|
+
* * `null`
|
|
6996
|
+
*/
|
|
6997
|
+
set rounded(rounded) {
|
|
6998
|
+
this.handleClasses(rounded, 'rounded');
|
|
6999
|
+
this._rounded = rounded;
|
|
7000
|
+
}
|
|
7001
|
+
get rounded() {
|
|
7002
|
+
return this._rounded;
|
|
7003
|
+
}
|
|
7004
|
+
/**
|
|
7005
|
+
* The fillMode property specifies the background and border styles of the TextArea
|
|
7006
|
+
* ([see example]({% slug appearance_textarea %}#toc-fillMode)).
|
|
7007
|
+
*
|
|
7008
|
+
* The possible values are:
|
|
7009
|
+
* * `'flat'`
|
|
7010
|
+
* * `'solid'` (default)
|
|
7011
|
+
* * `'outline'`
|
|
7012
|
+
* * `null`
|
|
7013
|
+
*/
|
|
7014
|
+
set fillMode(fillMode) {
|
|
7015
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
7016
|
+
this._fillMode = fillMode;
|
|
7017
|
+
}
|
|
7018
|
+
get fillMode() {
|
|
7019
|
+
return this._fillMode;
|
|
7020
|
+
}
|
|
6781
7021
|
ngAfterViewInit() {
|
|
6782
7022
|
const hostElement = this.hostElement.nativeElement;
|
|
6783
7023
|
let cursorInsideWrapper = false;
|
|
@@ -6824,6 +7064,10 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6824
7064
|
}
|
|
6825
7065
|
}));
|
|
6826
7066
|
});
|
|
7067
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
7068
|
+
stylingInputs.forEach(input => {
|
|
7069
|
+
this.handleClasses(this[input], input);
|
|
7070
|
+
});
|
|
6827
7071
|
}
|
|
6828
7072
|
ngOnInit() {
|
|
6829
7073
|
this.control = this.injector.get(NgControl, null);
|
|
@@ -6985,6 +7229,16 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6985
7229
|
this.setSelection(0, this.value.length);
|
|
6986
7230
|
}
|
|
6987
7231
|
}
|
|
7232
|
+
handleClasses(value, input) {
|
|
7233
|
+
const elem = this.hostElement.nativeElement;
|
|
7234
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
7235
|
+
if (classes.toRemove) {
|
|
7236
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
7237
|
+
}
|
|
7238
|
+
if (classes.toAdd) {
|
|
7239
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
7240
|
+
}
|
|
7241
|
+
}
|
|
6988
7242
|
};
|
|
6989
7243
|
__decorate([
|
|
6990
7244
|
Input(),
|
|
@@ -6992,8 +7246,9 @@ __decorate([
|
|
|
6992
7246
|
], TextAreaComponent.prototype, "focusableId", void 0);
|
|
6993
7247
|
__decorate([
|
|
6994
7248
|
HostBinding('class.k-textarea'),
|
|
7249
|
+
HostBinding('class.k-input'),
|
|
6995
7250
|
__metadata("design:type", Boolean)
|
|
6996
|
-
], TextAreaComponent.prototype, "
|
|
7251
|
+
], TextAreaComponent.prototype, "hostClasses", void 0);
|
|
6997
7252
|
__decorate([
|
|
6998
7253
|
HostBinding('class.k-flex-col'),
|
|
6999
7254
|
__metadata("design:type", Boolean),
|
|
@@ -7033,6 +7288,21 @@ __decorate([
|
|
|
7033
7288
|
Input(),
|
|
7034
7289
|
__metadata("design:type", String)
|
|
7035
7290
|
], TextAreaComponent.prototype, "resizable", void 0);
|
|
7291
|
+
__decorate([
|
|
7292
|
+
Input(),
|
|
7293
|
+
__metadata("design:type", String),
|
|
7294
|
+
__metadata("design:paramtypes", [String])
|
|
7295
|
+
], TextAreaComponent.prototype, "size", null);
|
|
7296
|
+
__decorate([
|
|
7297
|
+
Input(),
|
|
7298
|
+
__metadata("design:type", String),
|
|
7299
|
+
__metadata("design:paramtypes", [String])
|
|
7300
|
+
], TextAreaComponent.prototype, "rounded", null);
|
|
7301
|
+
__decorate([
|
|
7302
|
+
Input(),
|
|
7303
|
+
__metadata("design:type", String),
|
|
7304
|
+
__metadata("design:paramtypes", [String])
|
|
7305
|
+
], TextAreaComponent.prototype, "fillMode", null);
|
|
7036
7306
|
__decorate([
|
|
7037
7307
|
Output('focus'),
|
|
7038
7308
|
__metadata("design:type", EventEmitter)
|
|
@@ -7065,7 +7335,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
|
|
|
7065
7335
|
[attr.aria-multiline]="true"
|
|
7066
7336
|
[attr.aria-disabled]="disabled ? true : undefined"
|
|
7067
7337
|
[attr.aria-readonly]="readonly ? true : undefined"
|
|
7068
|
-
class="k-input"
|
|
7338
|
+
class="k-input-inner"
|
|
7069
7339
|
[ngClass]="resizableClass"
|
|
7070
7340
|
[id]="focusableId"
|
|
7071
7341
|
[value]="value"
|
|
@@ -7841,7 +8111,7 @@ ColorInputComponent = __decorate([
|
|
|
7841
8111
|
template: `
|
|
7842
8112
|
<div class="k-vstack">
|
|
7843
8113
|
<button #toggleFormatButton
|
|
7844
|
-
class="k-colorgradient-toggle-mode k-button k-
|
|
8114
|
+
class="k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
|
|
7845
8115
|
[attr.aria-label]="formatButtonTitle"
|
|
7846
8116
|
[attr.title]="formatButtonTitle"
|
|
7847
8117
|
>
|
|
@@ -8565,7 +8835,7 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8565
8835
|
</svg>
|
|
8566
8836
|
</div>
|
|
8567
8837
|
<div class="k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}">
|
|
8568
|
-
<span class="k-clear-color k-button k-flat k-button-icon"
|
|
8838
|
+
<span class="k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon"
|
|
8569
8839
|
*ngIf="clearButton"
|
|
8570
8840
|
(click)="reset()"
|
|
8571
8841
|
(keydown.enter)="reset()"
|
|
@@ -9303,7 +9573,7 @@ FlatColorPickerHeaderComponent = __decorate([
|
|
|
9303
9573
|
<button *ngFor="let view of views"
|
|
9304
9574
|
#viewButtons
|
|
9305
9575
|
(click)="onViewButtonClick(view)"
|
|
9306
|
-
class="k-button k-
|
|
9576
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
|
|
9307
9577
|
[attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
9308
9578
|
[attr.aria-label]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
9309
9579
|
[attr.aria-pressed]="activeView === view"
|
|
@@ -9320,7 +9590,7 @@ FlatColorPickerHeaderComponent = __decorate([
|
|
|
9320
9590
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
9321
9591
|
<button *ngIf="clearButton"
|
|
9322
9592
|
#clearButton
|
|
9323
|
-
class="k-button k-
|
|
9593
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset"
|
|
9324
9594
|
[attr.aria-label]="getText('clearButton')"
|
|
9325
9595
|
[attr.title]="getText('clearButton')"
|
|
9326
9596
|
(click)="clearButtonClick.emit()">
|
|
@@ -9383,12 +9653,12 @@ FlatColorPickerActionButtonsComponent = __decorate([
|
|
|
9383
9653
|
selector: '[kendoFlatColorPickerActionButtons]',
|
|
9384
9654
|
template: `
|
|
9385
9655
|
<button
|
|
9386
|
-
class="k-coloreditor-cancel k-button"
|
|
9656
|
+
class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
|
|
9387
9657
|
[attr.title]="getText('cancelButton')"
|
|
9388
9658
|
(click)="onActionButtonClick('cancel', $event)"
|
|
9389
9659
|
>{{getText('cancelButton')}}</button>
|
|
9390
9660
|
<button #last
|
|
9391
|
-
class="k-coloreditor-apply k-button k-primary"
|
|
9661
|
+
class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
|
|
9392
9662
|
[attr.title]="getText('applyButton')"
|
|
9393
9663
|
(click)="onActionButtonClick('apply', $event)"
|
|
9394
9664
|
>{{getText('applyButton')}}</button>
|
|
@@ -9980,11 +10250,13 @@ let serial$2 = 0;
|
|
|
9980
10250
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9981
10251
|
*/
|
|
9982
10252
|
let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
9983
|
-
constructor(popupService, cdr, localizationService, ngZone) {
|
|
10253
|
+
constructor(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
10254
|
+
this.host = host;
|
|
9984
10255
|
this.popupService = popupService;
|
|
9985
10256
|
this.cdr = cdr;
|
|
9986
10257
|
this.localizationService = localizationService;
|
|
9987
10258
|
this.ngZone = ngZone;
|
|
10259
|
+
this.renderer = renderer;
|
|
9988
10260
|
this.hostClasses = true;
|
|
9989
10261
|
/**
|
|
9990
10262
|
* @hidden
|
|
@@ -10089,6 +10361,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10089
10361
|
this._popupSettings = { animate: true };
|
|
10090
10362
|
this._paletteSettings = {};
|
|
10091
10363
|
this._gradientSettings = { opacity: true, delay: 0 };
|
|
10364
|
+
this._size = 'medium';
|
|
10365
|
+
this._rounded = 'medium';
|
|
10366
|
+
this._fillMode = 'solid';
|
|
10092
10367
|
this.notifyNgTouched = () => { };
|
|
10093
10368
|
this.notifyNgChanged = () => { };
|
|
10094
10369
|
validatePackage(packageMetadata);
|
|
@@ -10145,6 +10420,58 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10145
10420
|
get tabindex() {
|
|
10146
10421
|
return !this.disabled ? this._tabindex : undefined;
|
|
10147
10422
|
}
|
|
10423
|
+
/**
|
|
10424
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
10425
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
10426
|
+
*
|
|
10427
|
+
* The possible values are:
|
|
10428
|
+
* * `'small'`
|
|
10429
|
+
* * `'medium'` (default)
|
|
10430
|
+
* * `'large'`
|
|
10431
|
+
* * `null`
|
|
10432
|
+
*/
|
|
10433
|
+
set size(size) {
|
|
10434
|
+
this.handleClasses(size, 'size');
|
|
10435
|
+
this._size = size;
|
|
10436
|
+
}
|
|
10437
|
+
get size() {
|
|
10438
|
+
return this._size;
|
|
10439
|
+
}
|
|
10440
|
+
/**
|
|
10441
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
10442
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
10443
|
+
*
|
|
10444
|
+
* The possible values are:
|
|
10445
|
+
* * `'small'`
|
|
10446
|
+
* * `'medium'` (default)
|
|
10447
|
+
* * `'large'`
|
|
10448
|
+
* * `'full'`
|
|
10449
|
+
* * `null`
|
|
10450
|
+
*/
|
|
10451
|
+
set rounded(rounded) {
|
|
10452
|
+
this.handleClasses(rounded, 'rounded');
|
|
10453
|
+
this._rounded = rounded;
|
|
10454
|
+
}
|
|
10455
|
+
get rounded() {
|
|
10456
|
+
return this._rounded;
|
|
10457
|
+
}
|
|
10458
|
+
/**
|
|
10459
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
10460
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
10461
|
+
*
|
|
10462
|
+
* The possible values are:
|
|
10463
|
+
* * `'flat'`
|
|
10464
|
+
* * `'solid'` (default)
|
|
10465
|
+
* * `'outline'`
|
|
10466
|
+
* * `null`
|
|
10467
|
+
*/
|
|
10468
|
+
set fillMode(fillMode) {
|
|
10469
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
10470
|
+
this._fillMode = fillMode;
|
|
10471
|
+
}
|
|
10472
|
+
get fillMode() {
|
|
10473
|
+
return this._fillMode;
|
|
10474
|
+
}
|
|
10148
10475
|
/**
|
|
10149
10476
|
* Indicates whether the ColorPicker popup is open.
|
|
10150
10477
|
*/
|
|
@@ -10174,6 +10501,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10174
10501
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
10175
10502
|
};
|
|
10176
10503
|
}
|
|
10504
|
+
ngAfterViewInit() {
|
|
10505
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
10506
|
+
stylingInputs.forEach(input => {
|
|
10507
|
+
this.handleClasses(this[input], input);
|
|
10508
|
+
});
|
|
10509
|
+
}
|
|
10177
10510
|
ngOnChanges(changes) {
|
|
10178
10511
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
10179
10512
|
this.activeView = 'palette';
|
|
@@ -10363,6 +10696,16 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10363
10696
|
isEmpty() {
|
|
10364
10697
|
return false;
|
|
10365
10698
|
}
|
|
10699
|
+
handleClasses(value, input) {
|
|
10700
|
+
const elem = this.host.nativeElement;
|
|
10701
|
+
const classes = getStylingClasses('picker', input, this[input], value);
|
|
10702
|
+
if (classes.toRemove) {
|
|
10703
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
10704
|
+
}
|
|
10705
|
+
if (classes.toAdd) {
|
|
10706
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
10707
|
+
}
|
|
10708
|
+
}
|
|
10366
10709
|
popupBlurInvalid(ev) {
|
|
10367
10710
|
const focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10368
10711
|
const wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
|
|
@@ -10446,6 +10789,8 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10446
10789
|
};
|
|
10447
10790
|
__decorate([
|
|
10448
10791
|
HostBinding('class.k-colorpicker'),
|
|
10792
|
+
HostBinding('class.k-icon-picker'),
|
|
10793
|
+
HostBinding('class.k-picker'),
|
|
10449
10794
|
__metadata("design:type", Boolean)
|
|
10450
10795
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10451
10796
|
__decorate([
|
|
@@ -10521,6 +10866,21 @@ __decorate([
|
|
|
10521
10866
|
Input(),
|
|
10522
10867
|
__metadata("design:type", String)
|
|
10523
10868
|
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
10869
|
+
__decorate([
|
|
10870
|
+
Input(),
|
|
10871
|
+
__metadata("design:type", String),
|
|
10872
|
+
__metadata("design:paramtypes", [String])
|
|
10873
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
10874
|
+
__decorate([
|
|
10875
|
+
Input(),
|
|
10876
|
+
__metadata("design:type", String),
|
|
10877
|
+
__metadata("design:paramtypes", [String])
|
|
10878
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
10879
|
+
__decorate([
|
|
10880
|
+
Input(),
|
|
10881
|
+
__metadata("design:type", String),
|
|
10882
|
+
__metadata("design:paramtypes", [String])
|
|
10883
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
10524
10884
|
__decorate([
|
|
10525
10885
|
Output(),
|
|
10526
10886
|
__metadata("design:type", EventEmitter)
|
|
@@ -10629,9 +10989,9 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10629
10989
|
<span
|
|
10630
10990
|
#wrapper
|
|
10631
10991
|
[ngClass]="{
|
|
10632
|
-
'k-
|
|
10633
|
-
'k-
|
|
10634
|
-
'k-
|
|
10992
|
+
'k-input-inner': true,
|
|
10993
|
+
'k-disabled': this.disabled,
|
|
10994
|
+
'k-focus': this.isFocused
|
|
10635
10995
|
}"
|
|
10636
10996
|
role="listbox"
|
|
10637
10997
|
[attr.aria-expanded]="isOpen"
|
|
@@ -10645,16 +11005,21 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10645
11005
|
(mousedown)="$event.preventDefault()"
|
|
10646
11006
|
(keydown)="handleWrapperKeyDown($event)"
|
|
10647
11007
|
>
|
|
10648
|
-
<span
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
<span class="k-
|
|
10653
|
-
|
|
10654
|
-
<span class="k-select" (click)="togglePopup()">
|
|
10655
|
-
<span class="k-icon k-i-arrow-s"></span>
|
|
11008
|
+
<span
|
|
11009
|
+
class="k-value-icon k-color-preview"
|
|
11010
|
+
[ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}"
|
|
11011
|
+
(click)="handleActiveColorClick()">
|
|
11012
|
+
<span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
|
|
11013
|
+
<span class="k-color-preview-mask" [style.background-color]="value"></span>
|
|
10656
11014
|
</span>
|
|
10657
11015
|
</span>
|
|
11016
|
+
<button
|
|
11017
|
+
type="button"
|
|
11018
|
+
class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button"
|
|
11019
|
+
[attr.aria-label]="colorPickerAriaLabel"
|
|
11020
|
+
(click)="togglePopup()">
|
|
11021
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
11022
|
+
</button>
|
|
10658
11023
|
<ng-template #popupTemplate>
|
|
10659
11024
|
<kendo-flatcolorpicker
|
|
10660
11025
|
#flatColorPicker
|
|
@@ -10678,10 +11043,12 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10678
11043
|
<ng-container #container></ng-container>
|
|
10679
11044
|
`
|
|
10680
11045
|
}),
|
|
10681
|
-
__metadata("design:paramtypes", [
|
|
11046
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11047
|
+
PopupService,
|
|
10682
11048
|
ChangeDetectorRef,
|
|
10683
11049
|
LocalizationService,
|
|
10684
|
-
NgZone
|
|
11050
|
+
NgZone,
|
|
11051
|
+
Renderer2])
|
|
10685
11052
|
], ColorPickerComponent);
|
|
10686
11053
|
|
|
10687
11054
|
/**
|
|
@@ -11105,27 +11472,84 @@ ColorPickerModule = __decorate([
|
|
|
11105
11472
|
* ```
|
|
11106
11473
|
*/
|
|
11107
11474
|
let CheckBoxDirective = class CheckBoxDirective {
|
|
11475
|
+
constructor(renderer, hostElement) {
|
|
11476
|
+
this.renderer = renderer;
|
|
11477
|
+
this.hostElement = hostElement;
|
|
11478
|
+
this.kendoClass = true;
|
|
11479
|
+
this._size = 'medium';
|
|
11480
|
+
this._rounded = 'medium';
|
|
11481
|
+
}
|
|
11108
11482
|
/**
|
|
11109
|
-
*
|
|
11110
|
-
*
|
|
11483
|
+
* The size property specifies the width and height of the CheckBox
|
|
11484
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
|
|
11111
11485
|
*
|
|
11112
|
-
*
|
|
11113
|
-
*
|
|
11114
|
-
*
|
|
11115
|
-
*
|
|
11486
|
+
* The possible values are:
|
|
11487
|
+
* * `'small'`
|
|
11488
|
+
* * `'medium'` (default)
|
|
11489
|
+
* * `'large'`
|
|
11490
|
+
* * `null`
|
|
11116
11491
|
*/
|
|
11117
|
-
|
|
11118
|
-
this.
|
|
11492
|
+
set size(size) {
|
|
11493
|
+
this.handleClasses(size, 'size');
|
|
11494
|
+
this._size = size;
|
|
11495
|
+
}
|
|
11496
|
+
get size() {
|
|
11497
|
+
return this._size;
|
|
11498
|
+
}
|
|
11499
|
+
/**
|
|
11500
|
+
* The rounded property specifies the border radius of the CheckBox
|
|
11501
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
|
|
11502
|
+
*
|
|
11503
|
+
* The possible values are:
|
|
11504
|
+
* * `'small'`
|
|
11505
|
+
* * `'medium'` (default)
|
|
11506
|
+
* * `'large'`
|
|
11507
|
+
* * `null`
|
|
11508
|
+
*/
|
|
11509
|
+
set rounded(rounded) {
|
|
11510
|
+
this.handleClasses(rounded, 'rounded');
|
|
11511
|
+
this._rounded = rounded;
|
|
11512
|
+
}
|
|
11513
|
+
get rounded() {
|
|
11514
|
+
return this._rounded;
|
|
11515
|
+
}
|
|
11516
|
+
ngAfterViewInit() {
|
|
11517
|
+
const stylingInputs = ['size', 'rounded'];
|
|
11518
|
+
stylingInputs.forEach(input => {
|
|
11519
|
+
this.handleClasses(this[input], input);
|
|
11520
|
+
});
|
|
11521
|
+
}
|
|
11522
|
+
handleClasses(value, input) {
|
|
11523
|
+
const elem = this.hostElement.nativeElement;
|
|
11524
|
+
const classes = getStylingClasses('checkbox', input, this[input], value);
|
|
11525
|
+
if (classes.toRemove) {
|
|
11526
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11527
|
+
}
|
|
11528
|
+
if (classes.toAdd) {
|
|
11529
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11530
|
+
}
|
|
11119
11531
|
}
|
|
11120
11532
|
};
|
|
11121
11533
|
__decorate([
|
|
11122
11534
|
HostBinding('class.k-checkbox'),
|
|
11123
11535
|
__metadata("design:type", Boolean)
|
|
11124
11536
|
], CheckBoxDirective.prototype, "kendoClass", void 0);
|
|
11537
|
+
__decorate([
|
|
11538
|
+
Input(),
|
|
11539
|
+
__metadata("design:type", String),
|
|
11540
|
+
__metadata("design:paramtypes", [String])
|
|
11541
|
+
], CheckBoxDirective.prototype, "size", null);
|
|
11542
|
+
__decorate([
|
|
11543
|
+
Input(),
|
|
11544
|
+
__metadata("design:type", String),
|
|
11545
|
+
__metadata("design:paramtypes", [String])
|
|
11546
|
+
], CheckBoxDirective.prototype, "rounded", null);
|
|
11125
11547
|
CheckBoxDirective = __decorate([
|
|
11126
11548
|
Directive({
|
|
11127
11549
|
selector: 'input[kendoCheckBox]'
|
|
11128
|
-
})
|
|
11550
|
+
}),
|
|
11551
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
11552
|
+
ElementRef])
|
|
11129
11553
|
], CheckBoxDirective);
|
|
11130
11554
|
|
|
11131
11555
|
/**
|
|
@@ -11179,27 +11603,61 @@ CheckBoxModule = __decorate([
|
|
|
11179
11603
|
* ```
|
|
11180
11604
|
*/
|
|
11181
11605
|
let RadioButtonDirective = class RadioButtonDirective {
|
|
11606
|
+
constructor(renderer, hostElement) {
|
|
11607
|
+
this.renderer = renderer;
|
|
11608
|
+
this.hostElement = hostElement;
|
|
11609
|
+
this.kendoClass = true;
|
|
11610
|
+
this._size = 'medium';
|
|
11611
|
+
}
|
|
11182
11612
|
/**
|
|
11183
|
-
*
|
|
11184
|
-
*
|
|
11185
|
-
*
|
|
11186
|
-
*
|
|
11187
|
-
*
|
|
11188
|
-
*
|
|
11189
|
-
*
|
|
11613
|
+
* The size property specifies the width and height of the RadioButton
|
|
11614
|
+
* ([see example]({% slug appearance_radiobuttondirective %}#toc-size)).
|
|
11615
|
+
* The possible values are:
|
|
11616
|
+
* * `'small'`
|
|
11617
|
+
* * `'medium'` (default)
|
|
11618
|
+
* * `'large'`
|
|
11619
|
+
* * `null`
|
|
11190
11620
|
*/
|
|
11191
|
-
|
|
11192
|
-
this.
|
|
11621
|
+
set size(size) {
|
|
11622
|
+
this.handleClasses(size, 'size');
|
|
11623
|
+
this._size = size;
|
|
11624
|
+
}
|
|
11625
|
+
get size() {
|
|
11626
|
+
return this._size;
|
|
11627
|
+
}
|
|
11628
|
+
ngAfterViewInit() {
|
|
11629
|
+
// kept in sync with other inputs for easier refactoring
|
|
11630
|
+
// to a common base class
|
|
11631
|
+
const stylingInputs = ['size'];
|
|
11632
|
+
stylingInputs.forEach(input => {
|
|
11633
|
+
this.handleClasses(this[input], input);
|
|
11634
|
+
});
|
|
11635
|
+
}
|
|
11636
|
+
handleClasses(value, input) {
|
|
11637
|
+
const elem = this.hostElement.nativeElement;
|
|
11638
|
+
const classes = getStylingClasses('radio', input, this[input], value);
|
|
11639
|
+
if (classes.toRemove) {
|
|
11640
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11641
|
+
}
|
|
11642
|
+
if (classes.toAdd) {
|
|
11643
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11644
|
+
}
|
|
11193
11645
|
}
|
|
11194
11646
|
};
|
|
11195
11647
|
__decorate([
|
|
11196
11648
|
HostBinding('class.k-radio'),
|
|
11197
11649
|
__metadata("design:type", Boolean)
|
|
11198
11650
|
], RadioButtonDirective.prototype, "kendoClass", void 0);
|
|
11651
|
+
__decorate([
|
|
11652
|
+
Input(),
|
|
11653
|
+
__metadata("design:type", String),
|
|
11654
|
+
__metadata("design:paramtypes", [String])
|
|
11655
|
+
], RadioButtonDirective.prototype, "size", null);
|
|
11199
11656
|
RadioButtonDirective = __decorate([
|
|
11200
11657
|
Directive({
|
|
11201
11658
|
selector: 'input[kendoRadioButton]'
|
|
11202
|
-
})
|
|
11659
|
+
}),
|
|
11660
|
+
__metadata("design:paramtypes", [Renderer2, ElementRef])
|
|
11203
11661
|
], RadioButtonDirective);
|
|
11204
11662
|
|
|
11205
11663
|
/**
|
|
@@ -11737,4 +12195,4 @@ InputsModule = __decorate([
|
|
|
11737
12195
|
* Generated bundle index. Do not edit.
|
|
11738
12196
|
*/
|
|
11739
12197
|
|
|
11740
|
-
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,
|
|
12198
|
+
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 };
|