@progress/kendo-angular-inputs 8.0.0-dev.202112161434 → 8.0.0-dev.202201121416
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 +4 -1
- package/dist/es/colorpicker/color-input.component.js +1 -1
- package/dist/es/colorpicker/color-palette.component.js +6 -3
- package/dist/es/colorpicker/colorpicker.component.js +316 -53
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
- 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 +55 -3
- package/dist/es/shared/textarea.directive.js +3 -2
- package/dist/es/slider/slider.component.js +1 -1
- 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 +4 -1
- package/dist/es2015/colorpicker/color-input.component.js +2 -2
- package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
- package/dist/es2015/colorpicker/color-palette.component.js +6 -3
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +67 -9
- package/dist/es2015/colorpicker/colorpicker.component.js +285 -76
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
- 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 +49 -11
- package/dist/es2015/shared/textarea.directive.d.ts +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -2
- package/dist/es2015/slider/slider.component.js +18 -23
- 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 +114 -30
- 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 +1220 -654
- package/dist/fesm5/index.js +1276 -585
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-gradient.component.js +4 -1
- package/dist/npm/colorpicker/color-input.component.js +1 -1
- package/dist/npm/colorpicker/color-palette.component.js +6 -3
- package/dist/npm/colorpicker/colorpicker.component.js +313 -50
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
- 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 +54 -2
- package/dist/npm/shared/textarea.directive.js +3 -2
- package/dist/npm/slider/slider.component.js +1 -1
- 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 +12 -12
- 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,10 +5,10 @@
|
|
|
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
|
-
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent } from '@progress/kendo-angular-common';
|
|
11
|
+
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, closest } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
13
|
import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
14
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
@@ -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
|
|
@@ -445,7 +482,7 @@ const containsFocus = (hostElement, contender) => hostElement && contender && (h
|
|
|
445
482
|
/**
|
|
446
483
|
* @hidden
|
|
447
484
|
*/
|
|
448
|
-
const closest = (node, predicate) => {
|
|
485
|
+
const closest$1 = (node, predicate) => {
|
|
449
486
|
while (node && !predicate(node)) {
|
|
450
487
|
node = node.parentNode;
|
|
451
488
|
}
|
|
@@ -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: 1641996688,
|
|
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
|
};
|
|
@@ -1209,33 +1246,28 @@ SliderComponent = SliderComponent_1 = __decorate([
|
|
|
1209
1246
|
[class.k-slider-bottomright]="tickPlacement === 'after'"
|
|
1210
1247
|
[kendoEventsOutsideAngular]="{ click: onWrapClick, keydown: onKeyDown }"
|
|
1211
1248
|
>
|
|
1212
|
-
<
|
|
1213
|
-
|
|
1214
|
-
*ngIf="showButtons"
|
|
1215
|
-
class="k-button k-button-decrease"
|
|
1249
|
+
<button *ngIf="showButtons" type="button" #decreaseButton
|
|
1250
|
+
class="k-button-decrease k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button"
|
|
1216
1251
|
[title]="decrementMessage"
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
*ngIf="showButtons"
|
|
1227
|
-
#increaseButton
|
|
1228
|
-
class="k-button k-button-increase"
|
|
1252
|
+
[attr.tabindex]="-1"
|
|
1253
|
+
role="presentation">
|
|
1254
|
+
<span class="k-button-icon k-icon"
|
|
1255
|
+
[class.k-i-arrow-w]="!vertical"
|
|
1256
|
+
[class.k-i-arrow-s]="vertical">
|
|
1257
|
+
</span>
|
|
1258
|
+
</button>
|
|
1259
|
+
<button *ngIf="showButtons" type="button" #increaseButton
|
|
1260
|
+
class="k-button-increase k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button"
|
|
1229
1261
|
[title]="incrementMessage"
|
|
1230
1262
|
(click)="$event.preventDefault()"
|
|
1263
|
+
[attr.tabindex]="-1"
|
|
1231
1264
|
[attr.aria-label]="currentValue"
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
</span>
|
|
1265
|
+
role="presentation">
|
|
1266
|
+
<span class="k-button-icon k-icon"
|
|
1267
|
+
[class.k-i-arrow-e]="!vertical"
|
|
1268
|
+
[class.k-i-arrow-n]="vertical">
|
|
1269
|
+
</span>
|
|
1270
|
+
</button>
|
|
1239
1271
|
<ul kendoSliderTicks
|
|
1240
1272
|
#ticks
|
|
1241
1273
|
*ngIf="tickPlacement !== 'none'"
|
|
@@ -1831,7 +1863,7 @@ RangeSliderComponent = RangeSliderComponent_1 = __decorate([
|
|
|
1831
1863
|
], RangeSliderComponent);
|
|
1832
1864
|
|
|
1833
1865
|
var SwitchComponent_1;
|
|
1834
|
-
const FOCUSED = 'k-
|
|
1866
|
+
const FOCUSED = 'k-focus';
|
|
1835
1867
|
/**
|
|
1836
1868
|
* Represents the [Kendo UI Switch component for Angular]({% slug overview_switch %}).
|
|
1837
1869
|
*/
|
|
@@ -1876,13 +1908,20 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1876
1908
|
* @hidden
|
|
1877
1909
|
*/
|
|
1878
1910
|
this.initialized = false;
|
|
1911
|
+
this.hostClickSubscription = new Subscription;
|
|
1879
1912
|
this._checked = false;
|
|
1913
|
+
this._size = 'medium';
|
|
1914
|
+
this._trackRounded = 'full';
|
|
1915
|
+
this._thumbRounded = 'full';
|
|
1880
1916
|
this.ngChange = (_) => { };
|
|
1881
1917
|
this.ngTouched = () => { };
|
|
1882
1918
|
/**
|
|
1883
1919
|
* @hidden
|
|
1884
1920
|
*/
|
|
1885
1921
|
this.handleFocus = () => {
|
|
1922
|
+
if (this.isFocused) {
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1886
1925
|
this.focused = true;
|
|
1887
1926
|
if (hasObservers(this.onFocus)) {
|
|
1888
1927
|
this.ngZone.run(() => {
|
|
@@ -1893,7 +1932,11 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1893
1932
|
/**
|
|
1894
1933
|
* @hidden
|
|
1895
1934
|
*/
|
|
1896
|
-
this.handleBlur = () => {
|
|
1935
|
+
this.handleBlur = (event) => {
|
|
1936
|
+
const relatedTarget = event && event.relatedTarget;
|
|
1937
|
+
if (this.hostElement.nativeElement.contains(relatedTarget)) {
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1897
1940
|
this.changeDetector.markForCheck();
|
|
1898
1941
|
this.focused = false;
|
|
1899
1942
|
if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.control)) {
|
|
@@ -1918,6 +1961,56 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1918
1961
|
get checked() {
|
|
1919
1962
|
return this._checked;
|
|
1920
1963
|
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Specifies the size of the Switch.
|
|
1966
|
+
*
|
|
1967
|
+
* The possible values are:
|
|
1968
|
+
* * `'small'`
|
|
1969
|
+
* * `'medium'` (default)
|
|
1970
|
+
* * `'large'`
|
|
1971
|
+
* * `null`
|
|
1972
|
+
*/
|
|
1973
|
+
set size(size) {
|
|
1974
|
+
this.handleClasses(size, 'size');
|
|
1975
|
+
this._size = size;
|
|
1976
|
+
}
|
|
1977
|
+
get size() {
|
|
1978
|
+
return this._size;
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
* Specifies the border radius of the Switch thumb.
|
|
1982
|
+
*
|
|
1983
|
+
* The possible values are:
|
|
1984
|
+
* * `'full'` (default)
|
|
1985
|
+
* * `'small'`
|
|
1986
|
+
* * `'medium'`
|
|
1987
|
+
* * `'large'`
|
|
1988
|
+
* * `null`
|
|
1989
|
+
*/
|
|
1990
|
+
set thumbRounded(thumbRounded) {
|
|
1991
|
+
this.handleThumbClasses(thumbRounded);
|
|
1992
|
+
this._thumbRounded = thumbRounded;
|
|
1993
|
+
}
|
|
1994
|
+
get thumbRounded() {
|
|
1995
|
+
return this._thumbRounded;
|
|
1996
|
+
}
|
|
1997
|
+
/**
|
|
1998
|
+
* Specifies the border radius of the Switch track.
|
|
1999
|
+
*
|
|
2000
|
+
* The possible values are:
|
|
2001
|
+
* * `'full'` (default)
|
|
2002
|
+
* * `'small'`
|
|
2003
|
+
* * `'medium'`
|
|
2004
|
+
* * `'large'`
|
|
2005
|
+
* * `null`
|
|
2006
|
+
*/
|
|
2007
|
+
set trackRounded(trackRounded) {
|
|
2008
|
+
this.handleTrackClasses(trackRounded);
|
|
2009
|
+
this._trackRounded = trackRounded;
|
|
2010
|
+
}
|
|
2011
|
+
get trackRounded() {
|
|
2012
|
+
return this._trackRounded;
|
|
2013
|
+
}
|
|
1921
2014
|
/**
|
|
1922
2015
|
* @hidden
|
|
1923
2016
|
*/
|
|
@@ -1968,10 +2061,23 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1968
2061
|
this.control = this.injector.get(NgControl, null);
|
|
1969
2062
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.initialized = true);
|
|
1970
2063
|
}
|
|
2064
|
+
ngAfterViewInit() {
|
|
2065
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2066
|
+
this.attachHostClickHandler();
|
|
2067
|
+
if (!this.checked && !wrapper.classList.contains('k-switch-off')) {
|
|
2068
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2069
|
+
}
|
|
2070
|
+
this.handleClasses(this.size, 'size');
|
|
2071
|
+
this.handleTrackClasses(this.trackRounded);
|
|
2072
|
+
this.handleThumbClasses(this.thumbRounded);
|
|
2073
|
+
}
|
|
1971
2074
|
ngOnDestroy() {
|
|
1972
2075
|
if (this.localizationChangeSubscription) {
|
|
1973
2076
|
this.localizationChangeSubscription.unsubscribe();
|
|
1974
2077
|
}
|
|
2078
|
+
if (this.hostClickSubscription) {
|
|
2079
|
+
this.hostClickSubscription.unsubscribe();
|
|
2080
|
+
}
|
|
1975
2081
|
}
|
|
1976
2082
|
/**
|
|
1977
2083
|
* Focuses the Switch.
|
|
@@ -1989,19 +2095,19 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1989
2095
|
* ```
|
|
1990
2096
|
*/
|
|
1991
2097
|
focus() {
|
|
1992
|
-
if (!this.
|
|
2098
|
+
if (!this.track) {
|
|
1993
2099
|
return;
|
|
1994
2100
|
}
|
|
1995
|
-
this.
|
|
2101
|
+
this.track.nativeElement.focus();
|
|
1996
2102
|
}
|
|
1997
2103
|
/**
|
|
1998
2104
|
* Blurs the Switch.
|
|
1999
2105
|
*/
|
|
2000
2106
|
blur() {
|
|
2001
|
-
if (!this.
|
|
2107
|
+
if (!this.track) {
|
|
2002
2108
|
return;
|
|
2003
2109
|
}
|
|
2004
|
-
this.
|
|
2110
|
+
this.track.nativeElement.blur();
|
|
2005
2111
|
}
|
|
2006
2112
|
/**
|
|
2007
2113
|
* @hidden
|
|
@@ -2051,7 +2157,7 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
2051
2157
|
}
|
|
2052
2158
|
/**
|
|
2053
2159
|
* @hidden
|
|
2054
|
-
* Used by the
|
|
2160
|
+
* Used by the FloatingLabel to determine if the component is empty.
|
|
2055
2161
|
*/
|
|
2056
2162
|
isEmpty() {
|
|
2057
2163
|
return false;
|
|
@@ -2068,24 +2174,63 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
2068
2174
|
}
|
|
2069
2175
|
set focused(value) {
|
|
2070
2176
|
if (this.isFocused !== value && this.hostElement) {
|
|
2071
|
-
const
|
|
2177
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2072
2178
|
if (value) {
|
|
2073
|
-
this.renderer.addClass(
|
|
2179
|
+
this.renderer.addClass(wrapper, FOCUSED);
|
|
2074
2180
|
}
|
|
2075
2181
|
else {
|
|
2076
|
-
this.renderer.removeClass(
|
|
2182
|
+
this.renderer.removeClass(wrapper, FOCUSED);
|
|
2077
2183
|
}
|
|
2078
2184
|
this.isFocused = value;
|
|
2079
2185
|
}
|
|
2080
2186
|
}
|
|
2187
|
+
attachHostClickHandler() {
|
|
2188
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2189
|
+
this.hostClickSubscription.add(this.renderer.listen(this.hostElement.nativeElement, 'click', this.clickHandler));
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2081
2192
|
setHostClasses(value) {
|
|
2193
|
+
const wrapper = this.hostElement.nativeElement;
|
|
2082
2194
|
if (value) {
|
|
2083
|
-
this.renderer.removeClass(
|
|
2084
|
-
this.renderer.addClass(
|
|
2195
|
+
this.renderer.removeClass(wrapper, 'k-switch-off');
|
|
2196
|
+
this.renderer.addClass(wrapper, 'k-switch-on');
|
|
2085
2197
|
}
|
|
2086
2198
|
else {
|
|
2087
|
-
this.renderer.removeClass(
|
|
2088
|
-
this.renderer.addClass(
|
|
2199
|
+
this.renderer.removeClass(wrapper, 'k-switch-on');
|
|
2200
|
+
this.renderer.addClass(wrapper, 'k-switch-off');
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
handleClasses(value, input) {
|
|
2204
|
+
const elem = this.hostElement.nativeElement;
|
|
2205
|
+
const classes = getStylingClasses('switch', input, this[input], value);
|
|
2206
|
+
if (classes.toRemove) {
|
|
2207
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2208
|
+
}
|
|
2209
|
+
if (classes.toAdd) {
|
|
2210
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
handleTrackClasses(value) {
|
|
2214
|
+
const elem = this.hostElement.nativeElement;
|
|
2215
|
+
const track = this.track.nativeElement;
|
|
2216
|
+
const classes = getStylingClasses('switch', 'rounded', this.trackRounded, value);
|
|
2217
|
+
if (classes.toRemove) {
|
|
2218
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2219
|
+
this.renderer.removeClass(track, classes.toRemove);
|
|
2220
|
+
}
|
|
2221
|
+
if (classes.toAdd) {
|
|
2222
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2223
|
+
this.renderer.addClass(track, classes.toAdd);
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
handleThumbClasses(value) {
|
|
2227
|
+
const thumb = this.thumb.nativeElement;
|
|
2228
|
+
const classes = getStylingClasses('switch', 'rounded', this.thumbRounded, value);
|
|
2229
|
+
if (classes.toRemove) {
|
|
2230
|
+
this.renderer.removeClass(thumb, classes.toRemove);
|
|
2231
|
+
}
|
|
2232
|
+
if (classes.toAdd) {
|
|
2233
|
+
this.renderer.addClass(thumb, classes.toAdd);
|
|
2089
2234
|
}
|
|
2090
2235
|
}
|
|
2091
2236
|
};
|
|
@@ -2118,6 +2263,21 @@ __decorate([
|
|
|
2118
2263
|
Input(),
|
|
2119
2264
|
__metadata("design:type", Number)
|
|
2120
2265
|
], SwitchComponent.prototype, "tabindex", void 0);
|
|
2266
|
+
__decorate([
|
|
2267
|
+
Input(),
|
|
2268
|
+
__metadata("design:type", String),
|
|
2269
|
+
__metadata("design:paramtypes", [String])
|
|
2270
|
+
], SwitchComponent.prototype, "size", null);
|
|
2271
|
+
__decorate([
|
|
2272
|
+
Input(),
|
|
2273
|
+
__metadata("design:type", String),
|
|
2274
|
+
__metadata("design:paramtypes", [String])
|
|
2275
|
+
], SwitchComponent.prototype, "thumbRounded", null);
|
|
2276
|
+
__decorate([
|
|
2277
|
+
Input(),
|
|
2278
|
+
__metadata("design:type", String),
|
|
2279
|
+
__metadata("design:paramtypes", [String])
|
|
2280
|
+
], SwitchComponent.prototype, "trackRounded", null);
|
|
2121
2281
|
__decorate([
|
|
2122
2282
|
Input(),
|
|
2123
2283
|
__metadata("design:type", Number),
|
|
@@ -2135,10 +2295,6 @@ __decorate([
|
|
|
2135
2295
|
Output(),
|
|
2136
2296
|
__metadata("design:type", EventEmitter)
|
|
2137
2297
|
], SwitchComponent.prototype, "valueChange", void 0);
|
|
2138
|
-
__decorate([
|
|
2139
|
-
ViewChild('wrapper', { static: true }),
|
|
2140
|
-
__metadata("design:type", Object)
|
|
2141
|
-
], SwitchComponent.prototype, "wrapper", void 0);
|
|
2142
2298
|
__decorate([
|
|
2143
2299
|
HostBinding('attr.dir'),
|
|
2144
2300
|
__metadata("design:type", String)
|
|
@@ -2163,10 +2319,18 @@ __decorate([
|
|
|
2163
2319
|
__metadata("design:type", Boolean)
|
|
2164
2320
|
], SwitchComponent.prototype, "hostClasses", void 0);
|
|
2165
2321
|
__decorate([
|
|
2166
|
-
HostBinding('class.k-
|
|
2322
|
+
HostBinding('class.k-disabled'),
|
|
2167
2323
|
__metadata("design:type", Boolean),
|
|
2168
2324
|
__metadata("design:paramtypes", [])
|
|
2169
2325
|
], SwitchComponent.prototype, "disabledClass", null);
|
|
2326
|
+
__decorate([
|
|
2327
|
+
ViewChild('track', { static: true }),
|
|
2328
|
+
__metadata("design:type", Object)
|
|
2329
|
+
], SwitchComponent.prototype, "track", void 0);
|
|
2330
|
+
__decorate([
|
|
2331
|
+
ViewChild('thumb', { static: true }),
|
|
2332
|
+
__metadata("design:type", Object)
|
|
2333
|
+
], SwitchComponent.prototype, "thumb", void 0);
|
|
2170
2334
|
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
2171
2335
|
Component({
|
|
2172
2336
|
exportAs: 'kendoSwitch',
|
|
@@ -2193,18 +2357,27 @@ SwitchComponent = SwitchComponent_1 = __decorate([
|
|
|
2193
2357
|
>
|
|
2194
2358
|
|
|
2195
2359
|
<span
|
|
2196
|
-
#
|
|
2197
|
-
class="k-switch-
|
|
2360
|
+
#track
|
|
2361
|
+
class="k-switch-track"
|
|
2198
2362
|
[id]="focusableId"
|
|
2199
2363
|
role="switch"
|
|
2200
2364
|
[style.transitionDuration]="initialized ? '200ms' : '0ms'"
|
|
2201
2365
|
[attr.aria-checked]="checked"
|
|
2202
2366
|
[attr.tabindex]="(disabled ? undefined : tabIndex)"
|
|
2203
|
-
[kendoEventsOutsideAngular]="{
|
|
2367
|
+
[kendoEventsOutsideAngular]="{ keydown: keyDownHandler, focus: handleFocus, blur: handleBlur }"
|
|
2204
2368
|
>
|
|
2205
2369
|
<span class="k-switch-label-on" [attr.aria-hidden]="true" >{{onLabelMessage}}</span>
|
|
2206
2370
|
<span class="k-switch-label-off" [attr.aria-hidden]="true">{{offLabelMessage}}</span>
|
|
2207
|
-
|
|
2371
|
+
</span>
|
|
2372
|
+
<span
|
|
2373
|
+
class="k-switch-thumb-wrap"
|
|
2374
|
+
tabindex="-1"
|
|
2375
|
+
[style.transitionDuration]="initialized ? '200ms' : '0ms'" [kendoEventsOutsideAngular]="{
|
|
2376
|
+
keydown: keyDownHandler,
|
|
2377
|
+
focus: handleFocus,
|
|
2378
|
+
blur: handleBlur
|
|
2379
|
+
}">
|
|
2380
|
+
<span #thumb class="k-switch-thumb"></span>
|
|
2208
2381
|
</span>
|
|
2209
2382
|
`
|
|
2210
2383
|
}),
|
|
@@ -2216,6 +2389,112 @@ SwitchComponent = SwitchComponent_1 = __decorate([
|
|
|
2216
2389
|
NgZone])
|
|
2217
2390
|
], SwitchComponent);
|
|
2218
2391
|
|
|
2392
|
+
var TextBoxDirective_1;
|
|
2393
|
+
/**
|
|
2394
|
+
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
2395
|
+
* Used to style the textbox of any `input` element.
|
|
2396
|
+
*
|
|
2397
|
+
* @example
|
|
2398
|
+
* ```ts-no-run
|
|
2399
|
+
* <input kendoTextBox />
|
|
2400
|
+
* <input kendoTextBox type="email" />
|
|
2401
|
+
* <input kendoTextBox type="password" />
|
|
2402
|
+
* ```
|
|
2403
|
+
*/
|
|
2404
|
+
let TextBoxDirective = TextBoxDirective_1 = class TextBoxDirective {
|
|
2405
|
+
constructor(renderer, inputElement, ngZone) {
|
|
2406
|
+
this.renderer = renderer;
|
|
2407
|
+
this.inputElement = inputElement;
|
|
2408
|
+
this.ngZone = ngZone;
|
|
2409
|
+
this.hostClasses = true;
|
|
2410
|
+
/**
|
|
2411
|
+
* @hidden
|
|
2412
|
+
*/
|
|
2413
|
+
this.onFocus = new EventEmitter();
|
|
2414
|
+
/**
|
|
2415
|
+
* @hidden
|
|
2416
|
+
*/
|
|
2417
|
+
this.onBlur = new EventEmitter();
|
|
2418
|
+
/**
|
|
2419
|
+
* @hidden
|
|
2420
|
+
*/
|
|
2421
|
+
this.onValueChange = new EventEmitter();
|
|
2422
|
+
/**
|
|
2423
|
+
* @hidden
|
|
2424
|
+
*/
|
|
2425
|
+
this.autoFillStart = new EventEmitter();
|
|
2426
|
+
/**
|
|
2427
|
+
* @hidden
|
|
2428
|
+
*/
|
|
2429
|
+
this.autoFillEnd = new EventEmitter();
|
|
2430
|
+
this.listeners = [];
|
|
2431
|
+
}
|
|
2432
|
+
/**
|
|
2433
|
+
* @hidden
|
|
2434
|
+
*/
|
|
2435
|
+
set value(text) {
|
|
2436
|
+
if (!this.inputElement) {
|
|
2437
|
+
return;
|
|
2438
|
+
}
|
|
2439
|
+
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
2440
|
+
this.onValueChange.emit();
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* @hidden
|
|
2444
|
+
*/
|
|
2445
|
+
get value() {
|
|
2446
|
+
return this.inputElement.nativeElement.value;
|
|
2447
|
+
}
|
|
2448
|
+
get id() {
|
|
2449
|
+
return this.inputElement.nativeElement.id;
|
|
2450
|
+
}
|
|
2451
|
+
set id(id) {
|
|
2452
|
+
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
2453
|
+
}
|
|
2454
|
+
ngAfterViewInit() {
|
|
2455
|
+
const input = this.inputElement.nativeElement;
|
|
2456
|
+
this.listeners = [
|
|
2457
|
+
this.renderer.listen(input, 'focus', () => this.onFocus.emit()),
|
|
2458
|
+
this.renderer.listen(input, 'blur', () => this.onBlur.emit())
|
|
2459
|
+
];
|
|
2460
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2461
|
+
this.renderer.listen(input, 'animationstart', (e) => {
|
|
2462
|
+
if (e.animationName === 'autoFillStart') {
|
|
2463
|
+
this.autoFillStart.emit();
|
|
2464
|
+
}
|
|
2465
|
+
else if (e.animationName === 'autoFillEnd') {
|
|
2466
|
+
this.autoFillEnd.emit();
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
ngOnDestroy() {
|
|
2472
|
+
this.listeners.forEach(listener => listener());
|
|
2473
|
+
}
|
|
2474
|
+
};
|
|
2475
|
+
__decorate([
|
|
2476
|
+
HostBinding('class.k-textbox'),
|
|
2477
|
+
HostBinding('class.k-input'),
|
|
2478
|
+
__metadata("design:type", Boolean)
|
|
2479
|
+
], TextBoxDirective.prototype, "hostClasses", void 0);
|
|
2480
|
+
__decorate([
|
|
2481
|
+
Input(),
|
|
2482
|
+
__metadata("design:type", String),
|
|
2483
|
+
__metadata("design:paramtypes", [String])
|
|
2484
|
+
], TextBoxDirective.prototype, "value", null);
|
|
2485
|
+
TextBoxDirective = TextBoxDirective_1 = __decorate([
|
|
2486
|
+
Directive({
|
|
2487
|
+
selector: 'input[kendoTextBox]',
|
|
2488
|
+
providers: [{
|
|
2489
|
+
provide: KendoInput,
|
|
2490
|
+
useExisting: forwardRef(() => TextBoxDirective_1)
|
|
2491
|
+
}]
|
|
2492
|
+
}),
|
|
2493
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
2494
|
+
ElementRef,
|
|
2495
|
+
NgZone])
|
|
2496
|
+
], TextBoxDirective);
|
|
2497
|
+
|
|
2219
2498
|
var TextAreaDirective_1;
|
|
2220
2499
|
/**
|
|
2221
2500
|
* Represents the [Kendo UI TextArea directive for the Inputs components for Angular]({% slug overview_textarea %}).
|
|
@@ -2233,7 +2512,7 @@ let TextAreaDirective = TextAreaDirective_1 = class TextAreaDirective {
|
|
|
2233
2512
|
this.zone = zone;
|
|
2234
2513
|
this.changeDetector = changeDetector;
|
|
2235
2514
|
this.injector = injector;
|
|
2236
|
-
this.
|
|
2515
|
+
this.elementClasses = true;
|
|
2237
2516
|
this.autofillClass = true;
|
|
2238
2517
|
/**
|
|
2239
2518
|
* Fires each time the textarea value is changed.
|
|
@@ -2412,395 +2691,48 @@ let TextAreaDirective = TextAreaDirective_1 = class TextAreaDirective {
|
|
|
2412
2691
|
};
|
|
2413
2692
|
__decorate([
|
|
2414
2693
|
HostBinding('class.k-textarea'),
|
|
2694
|
+
HostBinding('class.k-input'),
|
|
2415
2695
|
__metadata("design:type", Boolean)
|
|
2416
|
-
], TextAreaDirective.prototype, "
|
|
2417
|
-
__decorate([
|
|
2418
|
-
HostBinding('class.k-autofill'),
|
|
2419
|
-
__metadata("design:type", Boolean)
|
|
2420
|
-
], TextAreaDirective.prototype, "autofillClass", void 0);
|
|
2421
|
-
__decorate([
|
|
2422
|
-
HostBinding('attr.dir'),
|
|
2423
|
-
__metadata("design:type", String)
|
|
2424
|
-
], TextAreaDirective.prototype, "direction", void 0);
|
|
2425
|
-
__decorate([
|
|
2426
|
-
Output(),
|
|
2427
|
-
__metadata("design:type", EventEmitter)
|
|
2428
|
-
], TextAreaDirective.prototype, "valueChange", void 0);
|
|
2429
|
-
__decorate([
|
|
2430
|
-
Input(),
|
|
2431
|
-
__metadata("design:type", Boolean)
|
|
2432
|
-
], TextAreaDirective.prototype, "autoSize", void 0);
|
|
2433
|
-
__decorate([
|
|
2434
|
-
Input(),
|
|
2435
|
-
__metadata("design:type", String)
|
|
2436
|
-
], TextAreaDirective.prototype, "value", void 0);
|
|
2437
|
-
TextAreaDirective = TextAreaDirective_1 = __decorate([
|
|
2438
|
-
Directive({
|
|
2439
|
-
providers: [{
|
|
2440
|
-
provide: NG_VALUE_ACCESSOR,
|
|
2441
|
-
useExisting: forwardRef(() => TextAreaDirective_1),
|
|
2442
|
-
multi: true
|
|
2443
|
-
}, {
|
|
2444
|
-
provide: KendoInput,
|
|
2445
|
-
useExisting: forwardRef(() => TextAreaDirective_1)
|
|
2446
|
-
}],
|
|
2447
|
-
selector: 'textarea[kendoTextArea]'
|
|
2448
|
-
}),
|
|
2449
|
-
__param(5, Optional()), __param(5, Inject(RTL)),
|
|
2450
|
-
__metadata("design:paramtypes", [Renderer2,
|
|
2451
|
-
ElementRef,
|
|
2452
|
-
NgZone,
|
|
2453
|
-
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
|
-
};
|
|
2696
|
+
], TextAreaDirective.prototype, "elementClasses", void 0);
|
|
2783
2697
|
__decorate([
|
|
2784
|
-
HostBinding('class.k-
|
|
2698
|
+
HostBinding('class.k-autofill'),
|
|
2785
2699
|
__metadata("design:type", Boolean)
|
|
2786
|
-
],
|
|
2700
|
+
], TextAreaDirective.prototype, "autofillClass", void 0);
|
|
2701
|
+
__decorate([
|
|
2702
|
+
HostBinding('attr.dir'),
|
|
2703
|
+
__metadata("design:type", String)
|
|
2704
|
+
], TextAreaDirective.prototype, "direction", void 0);
|
|
2705
|
+
__decorate([
|
|
2706
|
+
Output(),
|
|
2707
|
+
__metadata("design:type", EventEmitter)
|
|
2708
|
+
], TextAreaDirective.prototype, "valueChange", void 0);
|
|
2787
2709
|
__decorate([
|
|
2788
2710
|
Input(),
|
|
2789
|
-
__metadata("design:type",
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2711
|
+
__metadata("design:type", Boolean)
|
|
2712
|
+
], TextAreaDirective.prototype, "autoSize", void 0);
|
|
2713
|
+
__decorate([
|
|
2714
|
+
Input(),
|
|
2715
|
+
__metadata("design:type", String)
|
|
2716
|
+
], TextAreaDirective.prototype, "value", void 0);
|
|
2717
|
+
TextAreaDirective = TextAreaDirective_1 = __decorate([
|
|
2793
2718
|
Directive({
|
|
2794
|
-
selector: 'input[kendoTextBox]',
|
|
2795
2719
|
providers: [{
|
|
2720
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2721
|
+
useExisting: forwardRef(() => TextAreaDirective_1),
|
|
2722
|
+
multi: true
|
|
2723
|
+
}, {
|
|
2796
2724
|
provide: KendoInput,
|
|
2797
|
-
useExisting: forwardRef(() =>
|
|
2798
|
-
}]
|
|
2725
|
+
useExisting: forwardRef(() => TextAreaDirective_1)
|
|
2726
|
+
}],
|
|
2727
|
+
selector: 'textarea[kendoTextArea]'
|
|
2799
2728
|
}),
|
|
2729
|
+
__param(5, Optional()), __param(5, Inject(RTL)),
|
|
2800
2730
|
__metadata("design:paramtypes", [Renderer2,
|
|
2801
2731
|
ElementRef,
|
|
2802
|
-
NgZone
|
|
2803
|
-
|
|
2732
|
+
NgZone,
|
|
2733
|
+
ChangeDetectorRef,
|
|
2734
|
+
Injector, Boolean])
|
|
2735
|
+
], TextAreaDirective);
|
|
2804
2736
|
|
|
2805
2737
|
/**
|
|
2806
2738
|
* @hidden
|
|
@@ -2966,8 +2898,7 @@ const PARSABLE_DEFAULTS = {
|
|
|
2966
2898
|
min: null,
|
|
2967
2899
|
step: 1
|
|
2968
2900
|
};
|
|
2969
|
-
const FOCUSED$1 = 'k-
|
|
2970
|
-
const FORMATTED_VALUE = 'k-formatted-value';
|
|
2901
|
+
const FOCUSED$1 = 'k-focus';
|
|
2971
2902
|
/**
|
|
2972
2903
|
* Represents the [Kendo UI NumericTextBox component for Angular]({% slug overview_numerictextbox %}).
|
|
2973
2904
|
*/
|
|
@@ -3062,15 +2993,20 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3062
2993
|
* @hidden
|
|
3063
2994
|
*/
|
|
3064
2995
|
this.arrowDirection = ArrowDirection.None;
|
|
2996
|
+
this.hostClasses = true;
|
|
3065
2997
|
this.inputValue = '';
|
|
3066
2998
|
this.minValidateFn = noop;
|
|
3067
2999
|
this.maxValidateFn = noop;
|
|
3068
3000
|
this._format = "n2";
|
|
3069
3001
|
this.isPasted = false;
|
|
3070
3002
|
this.mouseDown = false;
|
|
3003
|
+
this._size = 'medium';
|
|
3004
|
+
this._rounded = 'medium';
|
|
3005
|
+
this._fillMode = 'solid';
|
|
3071
3006
|
this.ngChange = noop;
|
|
3072
3007
|
this.ngTouched = noop;
|
|
3073
3008
|
this.ngValidatorChange = noop;
|
|
3009
|
+
this.domEvents = [];
|
|
3074
3010
|
/**
|
|
3075
3011
|
* @hidden
|
|
3076
3012
|
*/
|
|
@@ -3256,8 +3192,56 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3256
3192
|
get tabIndex() {
|
|
3257
3193
|
return this.tabindex;
|
|
3258
3194
|
}
|
|
3259
|
-
|
|
3260
|
-
|
|
3195
|
+
/**
|
|
3196
|
+
* The size property specifies the font size and line height of the NumericTextBox
|
|
3197
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-size)).
|
|
3198
|
+
* The possible values are:
|
|
3199
|
+
* * `'small'`
|
|
3200
|
+
* * `'medium'` (default)
|
|
3201
|
+
* * `'large'`
|
|
3202
|
+
* * `null`
|
|
3203
|
+
*/
|
|
3204
|
+
set size(size) {
|
|
3205
|
+
this.handleClasses(size, 'size');
|
|
3206
|
+
this._size = size;
|
|
3207
|
+
}
|
|
3208
|
+
get size() {
|
|
3209
|
+
return this._size;
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* The rounded property specifies the border radius of the NumericTextBox
|
|
3213
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-rounded)).
|
|
3214
|
+
* The possible values are:
|
|
3215
|
+
* * `'small'`
|
|
3216
|
+
* * `'medium'` (default)
|
|
3217
|
+
* * `'large'`
|
|
3218
|
+
* * `null`
|
|
3219
|
+
*/
|
|
3220
|
+
set rounded(rounded) {
|
|
3221
|
+
this.handleClasses(rounded, 'rounded');
|
|
3222
|
+
this._rounded = rounded;
|
|
3223
|
+
}
|
|
3224
|
+
get rounded() {
|
|
3225
|
+
return this._rounded;
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* The fillMode property specifies the background and border styles of the NumericTextBox
|
|
3229
|
+
* ([see example]({% slug appearance_numerictextbox %}#toc-fillMode)).
|
|
3230
|
+
* The possible values are:
|
|
3231
|
+
* * `'flat'`
|
|
3232
|
+
* * `'solid'` (default)
|
|
3233
|
+
* * `'outline'`
|
|
3234
|
+
* * `null`
|
|
3235
|
+
*/
|
|
3236
|
+
set fillMode(fillMode) {
|
|
3237
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
3238
|
+
this._fillMode = fillMode;
|
|
3239
|
+
}
|
|
3240
|
+
get fillMode() {
|
|
3241
|
+
return this._fillMode;
|
|
3242
|
+
}
|
|
3243
|
+
get disableClass() {
|
|
3244
|
+
return this.disabled;
|
|
3261
3245
|
}
|
|
3262
3246
|
ngOnInit() {
|
|
3263
3247
|
this.subscriptions = this.localizationService
|
|
@@ -3270,6 +3254,16 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3270
3254
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
3271
3255
|
}
|
|
3272
3256
|
this.control = this.injector.get(NgControl, null);
|
|
3257
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3258
|
+
this.domEvents.push(this.renderer.listen(this.hostElement.nativeElement, 'mousewheel', this.handleWheel.bind(this)));
|
|
3259
|
+
this.domEvents.push(this.renderer.listen(this.hostElement.nativeElement, 'DOMMouseScroll', this.handleWheel.bind(this)));
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
ngAfterViewInit() {
|
|
3263
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
3264
|
+
stylingInputs.forEach(input => {
|
|
3265
|
+
this.handleClasses(this[input], input);
|
|
3266
|
+
});
|
|
3273
3267
|
}
|
|
3274
3268
|
/**
|
|
3275
3269
|
* @hidden
|
|
@@ -3303,6 +3297,7 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3303
3297
|
this.subscriptions.unsubscribe();
|
|
3304
3298
|
}
|
|
3305
3299
|
clearTimeout(this.spinTimeout);
|
|
3300
|
+
this.domEvents.forEach(unbindHandler => unbindHandler());
|
|
3306
3301
|
}
|
|
3307
3302
|
/**
|
|
3308
3303
|
* @hidden
|
|
@@ -3408,18 +3403,13 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3408
3403
|
return this.decimals !== null && this.decimals >= 0;
|
|
3409
3404
|
}
|
|
3410
3405
|
set focused(value) {
|
|
3411
|
-
if (this.isFocused !== value && this.
|
|
3412
|
-
const wrap = this.
|
|
3413
|
-
const input = this.numericInput.nativeElement;
|
|
3406
|
+
if (this.isFocused !== value && this.hostElement) {
|
|
3407
|
+
const wrap = this.hostElement.nativeElement;
|
|
3414
3408
|
if (value) {
|
|
3415
3409
|
this.renderer.addClass(wrap, FOCUSED$1);
|
|
3416
|
-
if (!this.isDisabled) {
|
|
3417
|
-
this.renderer.removeClass(input, FORMATTED_VALUE);
|
|
3418
|
-
}
|
|
3419
3410
|
}
|
|
3420
3411
|
else {
|
|
3421
3412
|
this.renderer.removeClass(wrap, FOCUSED$1);
|
|
3422
|
-
this.renderer.addClass(input, FORMATTED_VALUE);
|
|
3423
3413
|
}
|
|
3424
3414
|
this.isFocused = value;
|
|
3425
3415
|
}
|
|
@@ -3710,6 +3700,16 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3710
3700
|
}
|
|
3711
3701
|
return significantChars;
|
|
3712
3702
|
}
|
|
3703
|
+
handleClasses(value, input) {
|
|
3704
|
+
const elem = this.hostElement.nativeElement;
|
|
3705
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
3706
|
+
if (classes.toRemove) {
|
|
3707
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
3708
|
+
}
|
|
3709
|
+
if (classes.toAdd) {
|
|
3710
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
3711
|
+
}
|
|
3712
|
+
}
|
|
3713
3713
|
};
|
|
3714
3714
|
__decorate([
|
|
3715
3715
|
Input(),
|
|
@@ -3789,6 +3789,21 @@ __decorate([
|
|
|
3789
3789
|
Input(),
|
|
3790
3790
|
__metadata("design:type", Number)
|
|
3791
3791
|
], NumericTextBoxComponent.prototype, "maxlength", void 0);
|
|
3792
|
+
__decorate([
|
|
3793
|
+
Input(),
|
|
3794
|
+
__metadata("design:type", String),
|
|
3795
|
+
__metadata("design:paramtypes", [String])
|
|
3796
|
+
], NumericTextBoxComponent.prototype, "size", null);
|
|
3797
|
+
__decorate([
|
|
3798
|
+
Input(),
|
|
3799
|
+
__metadata("design:type", String),
|
|
3800
|
+
__metadata("design:paramtypes", [String])
|
|
3801
|
+
], NumericTextBoxComponent.prototype, "rounded", null);
|
|
3802
|
+
__decorate([
|
|
3803
|
+
Input(),
|
|
3804
|
+
__metadata("design:type", String),
|
|
3805
|
+
__metadata("design:paramtypes", [String])
|
|
3806
|
+
], NumericTextBoxComponent.prototype, "fillMode", null);
|
|
3792
3807
|
__decorate([
|
|
3793
3808
|
Output(),
|
|
3794
3809
|
__metadata("design:type", EventEmitter)
|
|
@@ -3805,20 +3820,20 @@ __decorate([
|
|
|
3805
3820
|
ViewChild('numericInput', { static: true }),
|
|
3806
3821
|
__metadata("design:type", ElementRef)
|
|
3807
3822
|
], NumericTextBoxComponent.prototype, "numericInput", void 0);
|
|
3808
|
-
__decorate([
|
|
3809
|
-
ViewChild('numericWrap', { static: true }),
|
|
3810
|
-
__metadata("design:type", ElementRef)
|
|
3811
|
-
], NumericTextBoxComponent.prototype, "numericWrap", void 0);
|
|
3812
3823
|
__decorate([
|
|
3813
3824
|
HostBinding('attr.dir'),
|
|
3814
3825
|
__metadata("design:type", String)
|
|
3815
3826
|
], NumericTextBoxComponent.prototype, "direction", void 0);
|
|
3816
3827
|
__decorate([
|
|
3817
|
-
HostBinding('class.k-
|
|
3818
|
-
HostBinding('class.k-numerictextbox'),
|
|
3828
|
+
HostBinding('class.k-disabled'),
|
|
3819
3829
|
__metadata("design:type", Boolean),
|
|
3820
3830
|
__metadata("design:paramtypes", [])
|
|
3821
|
-
], NumericTextBoxComponent.prototype, "
|
|
3831
|
+
], NumericTextBoxComponent.prototype, "disableClass", null);
|
|
3832
|
+
__decorate([
|
|
3833
|
+
HostBinding('class.k-input'),
|
|
3834
|
+
HostBinding('class.k-numerictextbox'),
|
|
3835
|
+
__metadata("design:type", Boolean)
|
|
3836
|
+
], NumericTextBoxComponent.prototype, "hostClasses", void 0);
|
|
3822
3837
|
NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
3823
3838
|
Component({
|
|
3824
3839
|
exportAs: 'kendoNumericTextBox',
|
|
@@ -3838,14 +3853,9 @@ NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
|
3838
3853
|
decrement="Decrease value"
|
|
3839
3854
|
>
|
|
3840
3855
|
</ng-container>
|
|
3841
|
-
<span
|
|
3842
|
-
class="k-numeric-wrap"
|
|
3843
|
-
[class.k-state-disabled]="disabled"
|
|
3844
|
-
[kendoEventsOutsideAngular]="{ mousewheel: handleWheel, DOMMouseScroll: handleWheel }"
|
|
3845
|
-
#numericWrap>
|
|
3846
3856
|
<input
|
|
3847
3857
|
role="spinbutton"
|
|
3848
|
-
class="k-input
|
|
3858
|
+
class="k-input-inner"
|
|
3849
3859
|
autocomplete="off"
|
|
3850
3860
|
autocorrect="off"
|
|
3851
3861
|
[id]="focusableId"
|
|
@@ -3868,29 +3878,35 @@ NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
|
|
|
3868
3878
|
paste: handlePaste
|
|
3869
3879
|
}"
|
|
3870
3880
|
#numericInput />
|
|
3871
|
-
<span
|
|
3872
|
-
|
|
3873
|
-
|
|
3881
|
+
<span
|
|
3882
|
+
class="k-input-spinner k-spin-button" *ngIf="spinners"
|
|
3883
|
+
[kendoEventsOutsideAngular]="{ mouseup: releaseArrow, mouseleave: releaseArrow }"
|
|
3884
|
+
>
|
|
3885
|
+
<button
|
|
3886
|
+
type="button"
|
|
3874
3887
|
[kendoEventsOutsideAngular]="{ mousedown: increasePress }"
|
|
3888
|
+
[attr.aria-hidden]="true"
|
|
3875
3889
|
[attr.aria-label]="incrementTitle"
|
|
3876
3890
|
[title]="incrementTitle"
|
|
3877
|
-
[class.k-
|
|
3878
|
-
class="k-
|
|
3891
|
+
[class.k-active]="arrowDirection === ArrowDirection.Up"
|
|
3892
|
+
class="k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base"
|
|
3893
|
+
tabindex="-1"
|
|
3879
3894
|
>
|
|
3880
|
-
<span class="k-icon k-i-arrow-n"></span>
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3895
|
+
<span class="k-button-icon k-icon k-i-arrow-n"></span>
|
|
3896
|
+
</button>
|
|
3897
|
+
<button
|
|
3898
|
+
type="button"
|
|
3884
3899
|
[kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
|
|
3900
|
+
[attr.aria-hidden]="true"
|
|
3885
3901
|
[attr.aria-label]="decrementTitle"
|
|
3886
3902
|
[title]="decrementTitle"
|
|
3887
|
-
[class.k-
|
|
3888
|
-
class="k-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3903
|
+
[class.k-active]="arrowDirection === ArrowDirection.Down"
|
|
3904
|
+
class="k-spinner-decrease k-button k-icon-button k-button-solid k-button-solid-base"
|
|
3905
|
+
tabindex="-1"
|
|
3906
|
+
>
|
|
3907
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
3908
|
+
</button>
|
|
3892
3909
|
</span>
|
|
3893
|
-
</span>
|
|
3894
3910
|
`
|
|
3895
3911
|
}),
|
|
3896
3912
|
__metadata("design:paramtypes", [IntlService,
|
|
@@ -4370,7 +4386,7 @@ MaskingService = __decorate([
|
|
|
4370
4386
|
|
|
4371
4387
|
var MaskedTextBoxComponent_1;
|
|
4372
4388
|
const resolvedPromise = Promise.resolve(null);
|
|
4373
|
-
const FOCUSED$2 = 'k-
|
|
4389
|
+
const FOCUSED$2 = 'k-focus';
|
|
4374
4390
|
/**
|
|
4375
4391
|
* Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
|
|
4376
4392
|
*
|
|
@@ -4503,6 +4519,9 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4503
4519
|
};
|
|
4504
4520
|
this.isPasted = false;
|
|
4505
4521
|
this.selection = [0, 0];
|
|
4522
|
+
this._size = 'medium';
|
|
4523
|
+
this._rounded = 'medium';
|
|
4524
|
+
this._fillMode = 'solid';
|
|
4506
4525
|
/**
|
|
4507
4526
|
* @hidden
|
|
4508
4527
|
*/
|
|
@@ -4555,6 +4574,54 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4555
4574
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4556
4575
|
this.updateService();
|
|
4557
4576
|
}
|
|
4577
|
+
/**
|
|
4578
|
+
* The size property specifies the font size and line height of the MaskedTextBox
|
|
4579
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
|
|
4580
|
+
* The possible values are:
|
|
4581
|
+
* * `'small'`
|
|
4582
|
+
* * `'medium'` (default)
|
|
4583
|
+
* * `'large'`
|
|
4584
|
+
* * `null`
|
|
4585
|
+
*/
|
|
4586
|
+
set size(size) {
|
|
4587
|
+
this.handleClasses(size, 'size');
|
|
4588
|
+
this._size = size;
|
|
4589
|
+
}
|
|
4590
|
+
get size() {
|
|
4591
|
+
return this._size;
|
|
4592
|
+
}
|
|
4593
|
+
/**
|
|
4594
|
+
* The rounded property specifies the border radius of the MaskedTextBox
|
|
4595
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-rounded)).
|
|
4596
|
+
* The possible values are:
|
|
4597
|
+
* * `'small'`
|
|
4598
|
+
* * `'medium'` (default)
|
|
4599
|
+
* * `'large'`
|
|
4600
|
+
* * `null`
|
|
4601
|
+
*/
|
|
4602
|
+
set rounded(rounded) {
|
|
4603
|
+
this.handleClasses(rounded, 'rounded');
|
|
4604
|
+
this._rounded = rounded;
|
|
4605
|
+
}
|
|
4606
|
+
get rounded() {
|
|
4607
|
+
return this._rounded;
|
|
4608
|
+
}
|
|
4609
|
+
/**
|
|
4610
|
+
* The fillMode property specifies the background and border styles of the MaskedTexBox
|
|
4611
|
+
* ([see example]({% slug appearance_maskedtextbox %}#toc-fillMode)).
|
|
4612
|
+
* The possible values are:
|
|
4613
|
+
* * `flat`
|
|
4614
|
+
* * `solid` (default)
|
|
4615
|
+
* * `outline`
|
|
4616
|
+
* * `null`
|
|
4617
|
+
*/
|
|
4618
|
+
set fillMode(fillMode) {
|
|
4619
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
4620
|
+
this._fillMode = fillMode;
|
|
4621
|
+
}
|
|
4622
|
+
get fillMode() {
|
|
4623
|
+
return this._fillMode;
|
|
4624
|
+
}
|
|
4558
4625
|
get hostDisabledClass() {
|
|
4559
4626
|
return this.disabled;
|
|
4560
4627
|
}
|
|
@@ -4582,9 +4649,15 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4582
4649
|
}
|
|
4583
4650
|
this.control = this.injector.get(NgControl, null);
|
|
4584
4651
|
}
|
|
4652
|
+
ngAfterViewInit() {
|
|
4653
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
4654
|
+
stylingInputs.forEach(input => {
|
|
4655
|
+
this.handleClasses(this[input], input);
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4585
4658
|
/**
|
|
4586
4659
|
* @hidden
|
|
4587
|
-
* Used by the
|
|
4660
|
+
* Used by the FloatingLabel to determine if the MaskedTextBox is empty.
|
|
4588
4661
|
*/
|
|
4589
4662
|
isEmpty() {
|
|
4590
4663
|
if (this.input) {
|
|
@@ -4823,6 +4896,16 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4823
4896
|
}
|
|
4824
4897
|
return present ? value : '';
|
|
4825
4898
|
}
|
|
4899
|
+
handleClasses(value, input) {
|
|
4900
|
+
const elem = this.hostElement.nativeElement;
|
|
4901
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
4902
|
+
if (classes.toRemove) {
|
|
4903
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
4904
|
+
}
|
|
4905
|
+
if (classes.toAdd) {
|
|
4906
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4826
4909
|
};
|
|
4827
4910
|
__decorate([
|
|
4828
4911
|
Input(),
|
|
@@ -4840,17 +4923,32 @@ __decorate([
|
|
|
4840
4923
|
Input(),
|
|
4841
4924
|
__metadata("design:type", String)
|
|
4842
4925
|
], MaskedTextBoxComponent.prototype, "title", void 0);
|
|
4926
|
+
__decorate([
|
|
4927
|
+
Input(),
|
|
4928
|
+
__metadata("design:type", String),
|
|
4929
|
+
__metadata("design:paramtypes", [String])
|
|
4930
|
+
], MaskedTextBoxComponent.prototype, "size", null);
|
|
4931
|
+
__decorate([
|
|
4932
|
+
Input(),
|
|
4933
|
+
__metadata("design:type", String),
|
|
4934
|
+
__metadata("design:paramtypes", [String])
|
|
4935
|
+
], MaskedTextBoxComponent.prototype, "rounded", null);
|
|
4936
|
+
__decorate([
|
|
4937
|
+
Input(),
|
|
4938
|
+
__metadata("design:type", String),
|
|
4939
|
+
__metadata("design:paramtypes", [String])
|
|
4940
|
+
], MaskedTextBoxComponent.prototype, "fillMode", null);
|
|
4843
4941
|
__decorate([
|
|
4844
4942
|
HostBinding('attr.dir'),
|
|
4845
4943
|
__metadata("design:type", String)
|
|
4846
4944
|
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
4847
4945
|
__decorate([
|
|
4848
|
-
HostBinding('class.k-
|
|
4946
|
+
HostBinding('class.k-input'),
|
|
4849
4947
|
HostBinding('class.k-maskedtextbox'),
|
|
4850
4948
|
__metadata("design:type", Boolean)
|
|
4851
4949
|
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
4852
4950
|
__decorate([
|
|
4853
|
-
HostBinding('class.k-
|
|
4951
|
+
HostBinding('class.k-disabled'),
|
|
4854
4952
|
__metadata("design:type", Boolean),
|
|
4855
4953
|
__metadata("design:paramtypes", [])
|
|
4856
4954
|
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
@@ -4952,7 +5050,7 @@ MaskedTextBoxComponent = MaskedTextBoxComponent_1 = __decorate([
|
|
|
4952
5050
|
autocorrect="off"
|
|
4953
5051
|
autocapitalize="off"
|
|
4954
5052
|
spellcheck="false"
|
|
4955
|
-
class="k-
|
|
5053
|
+
class="k-input-inner"
|
|
4956
5054
|
[id]="focusableId"
|
|
4957
5055
|
[tabindex]="tabIndex"
|
|
4958
5056
|
[attr.title]="title"
|
|
@@ -5656,7 +5754,7 @@ TextBoxPrefixTemplateDirective = __decorate([
|
|
|
5656
5754
|
], TextBoxPrefixTemplateDirective);
|
|
5657
5755
|
|
|
5658
5756
|
var TextBoxComponent_1;
|
|
5659
|
-
const FOCUSED$3 = 'k-
|
|
5757
|
+
const FOCUSED$3 = 'k-focus';
|
|
5660
5758
|
let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
5661
5759
|
constructor(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
5662
5760
|
this.localizationService = localizationService;
|
|
@@ -5790,9 +5888,12 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5790
5888
|
* ```
|
|
5791
5889
|
*/
|
|
5792
5890
|
this.onBlur = new EventEmitter();
|
|
5793
|
-
this.
|
|
5891
|
+
this.hostClasses = true;
|
|
5794
5892
|
this._isFocused = false;
|
|
5795
5893
|
this.focusChangedProgrammatically = false;
|
|
5894
|
+
this._size = 'medium';
|
|
5895
|
+
this._rounded = 'medium';
|
|
5896
|
+
this._fillMode = 'solid';
|
|
5796
5897
|
/**
|
|
5797
5898
|
* @hidden
|
|
5798
5899
|
*/
|
|
@@ -5846,6 +5947,58 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5846
5947
|
validatePackage(packageMetadata);
|
|
5847
5948
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
5848
5949
|
}
|
|
5950
|
+
/**
|
|
5951
|
+
* The size property specifies the font size and line height of the TextBox
|
|
5952
|
+
* ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
5953
|
+
*
|
|
5954
|
+
* The possible values are:
|
|
5955
|
+
* * `'small'`
|
|
5956
|
+
* * `'medium'` (default)
|
|
5957
|
+
* * `'large'`
|
|
5958
|
+
* * `null`
|
|
5959
|
+
*/
|
|
5960
|
+
set size(size) {
|
|
5961
|
+
this.handleClasses(size, 'size');
|
|
5962
|
+
this._size = size;
|
|
5963
|
+
}
|
|
5964
|
+
get size() {
|
|
5965
|
+
return this._size;
|
|
5966
|
+
}
|
|
5967
|
+
/**
|
|
5968
|
+
* The rounded property specifies the border radius of the TextBox
|
|
5969
|
+
* ([see example]({% slug appearance_textbox %}#toc-rounded)).
|
|
5970
|
+
*
|
|
5971
|
+
* The possible values are:
|
|
5972
|
+
* * `'small'`
|
|
5973
|
+
* * `'medium'` (default)
|
|
5974
|
+
* * `'large'`
|
|
5975
|
+
* * `'full'`
|
|
5976
|
+
* * `null`
|
|
5977
|
+
*/
|
|
5978
|
+
set rounded(rounded) {
|
|
5979
|
+
this.handleClasses(rounded, 'rounded');
|
|
5980
|
+
this._rounded = rounded;
|
|
5981
|
+
}
|
|
5982
|
+
get rounded() {
|
|
5983
|
+
return this._rounded;
|
|
5984
|
+
}
|
|
5985
|
+
/**
|
|
5986
|
+
* The fillMode property specifies the background and border styles of the TextBox
|
|
5987
|
+
* ([see example]({% slug appearance_textbox %}#toc-fillMode)).
|
|
5988
|
+
*
|
|
5989
|
+
* The possible values are:
|
|
5990
|
+
* * `'flat'`
|
|
5991
|
+
* * `'solid'` (default)
|
|
5992
|
+
* * `'outline'`
|
|
5993
|
+
* * `null`
|
|
5994
|
+
*/
|
|
5995
|
+
set fillMode(fillMode) {
|
|
5996
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
5997
|
+
this._fillMode = fillMode;
|
|
5998
|
+
}
|
|
5999
|
+
get fillMode() {
|
|
6000
|
+
return this._fillMode;
|
|
6001
|
+
}
|
|
5849
6002
|
/**
|
|
5850
6003
|
* @hidden
|
|
5851
6004
|
*/
|
|
@@ -5884,7 +6037,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5884
6037
|
return;
|
|
5885
6038
|
}
|
|
5886
6039
|
if (tabbing) {
|
|
5887
|
-
const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
6040
|
+
const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
5888
6041
|
if (!closestTextbox) {
|
|
5889
6042
|
this.handleBlur();
|
|
5890
6043
|
}
|
|
@@ -5911,6 +6064,10 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5911
6064
|
}
|
|
5912
6065
|
}));
|
|
5913
6066
|
});
|
|
6067
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
6068
|
+
stylingInputs.forEach(input => {
|
|
6069
|
+
this.handleClasses(this[input], input);
|
|
6070
|
+
});
|
|
5914
6071
|
}
|
|
5915
6072
|
ngOnChanges(changes) {
|
|
5916
6073
|
if (changes.disabled || changes.readonly || changes.value) {
|
|
@@ -6043,16 +6200,16 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6043
6200
|
*/
|
|
6044
6201
|
get successIconClasses() {
|
|
6045
6202
|
return this.successIcon
|
|
6046
|
-
?
|
|
6047
|
-
: `k-
|
|
6203
|
+
? `${this.successIcon}`
|
|
6204
|
+
: `k-validation-icon k-icon k-i-check`;
|
|
6048
6205
|
}
|
|
6049
6206
|
/**
|
|
6050
6207
|
* @hidden
|
|
6051
6208
|
*/
|
|
6052
6209
|
get errorIconClasses() {
|
|
6053
6210
|
return this.errorIcon
|
|
6054
|
-
?
|
|
6055
|
-
: `k-
|
|
6211
|
+
? `${this.errorIcon}`
|
|
6212
|
+
: `k-validation-icon k-icon k-i-warning`;
|
|
6056
6213
|
}
|
|
6057
6214
|
/**
|
|
6058
6215
|
* @hidden
|
|
@@ -6060,7 +6217,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6060
6217
|
get clearButtonClasses() {
|
|
6061
6218
|
return this.clearButtonIcon
|
|
6062
6219
|
? this.clearButtonIcon
|
|
6063
|
-
: `k-icon k-i-
|
|
6220
|
+
: `k-icon k-i-x`;
|
|
6064
6221
|
}
|
|
6065
6222
|
/**
|
|
6066
6223
|
* @hidden
|
|
@@ -6122,6 +6279,16 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6122
6279
|
this.isFocused = false;
|
|
6123
6280
|
});
|
|
6124
6281
|
}
|
|
6282
|
+
handleClasses(value, input) {
|
|
6283
|
+
const elem = this.hostElement.nativeElement;
|
|
6284
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
6285
|
+
if (classes.toRemove) {
|
|
6286
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
6287
|
+
}
|
|
6288
|
+
if (classes.toAdd) {
|
|
6289
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6125
6292
|
};
|
|
6126
6293
|
__decorate([
|
|
6127
6294
|
Input(),
|
|
@@ -6175,6 +6342,21 @@ __decorate([
|
|
|
6175
6342
|
Input(),
|
|
6176
6343
|
__metadata("design:type", String)
|
|
6177
6344
|
], TextBoxComponent.prototype, "clearButtonIcon", void 0);
|
|
6345
|
+
__decorate([
|
|
6346
|
+
Input(),
|
|
6347
|
+
__metadata("design:type", String),
|
|
6348
|
+
__metadata("design:paramtypes", [String])
|
|
6349
|
+
], TextBoxComponent.prototype, "size", null);
|
|
6350
|
+
__decorate([
|
|
6351
|
+
Input(),
|
|
6352
|
+
__metadata("design:type", String),
|
|
6353
|
+
__metadata("design:paramtypes", [String])
|
|
6354
|
+
], TextBoxComponent.prototype, "rounded", null);
|
|
6355
|
+
__decorate([
|
|
6356
|
+
Input(),
|
|
6357
|
+
__metadata("design:type", String),
|
|
6358
|
+
__metadata("design:paramtypes", [String])
|
|
6359
|
+
], TextBoxComponent.prototype, "fillMode", null);
|
|
6178
6360
|
__decorate([
|
|
6179
6361
|
Input(),
|
|
6180
6362
|
__metadata("design:type", Number),
|
|
@@ -6221,14 +6403,15 @@ __decorate([
|
|
|
6221
6403
|
__metadata("design:type", TextBoxPrefixTemplateDirective)
|
|
6222
6404
|
], TextBoxComponent.prototype, "prefixTemplate", void 0);
|
|
6223
6405
|
__decorate([
|
|
6224
|
-
HostBinding('class.k-
|
|
6406
|
+
HostBinding('class.k-disabled'),
|
|
6225
6407
|
__metadata("design:type", Boolean),
|
|
6226
6408
|
__metadata("design:paramtypes", [])
|
|
6227
6409
|
], TextBoxComponent.prototype, "disabledClass", null);
|
|
6228
6410
|
__decorate([
|
|
6229
6411
|
HostBinding('class.k-textbox'),
|
|
6412
|
+
HostBinding('class.k-input'),
|
|
6230
6413
|
__metadata("design:type", Boolean)
|
|
6231
|
-
], TextBoxComponent.prototype, "
|
|
6414
|
+
], TextBoxComponent.prototype, "hostClasses", void 0);
|
|
6232
6415
|
__decorate([
|
|
6233
6416
|
HostBinding('attr.dir'),
|
|
6234
6417
|
__metadata("design:type", String)
|
|
@@ -6258,9 +6441,8 @@ TextBoxComponent = TextBoxComponent_1 = __decorate([
|
|
|
6258
6441
|
[ngTemplateOutlet]="prefixTemplate?.templateRef">
|
|
6259
6442
|
</ng-template>
|
|
6260
6443
|
</span>
|
|
6261
|
-
<input
|
|
6262
|
-
class="k-input"
|
|
6263
|
-
#input
|
|
6444
|
+
<input #input
|
|
6445
|
+
class="k-input-inner"
|
|
6264
6446
|
[id]="focusableId"
|
|
6265
6447
|
[disabled]="disabled"
|
|
6266
6448
|
[readonly]="readonly"
|
|
@@ -6272,24 +6454,24 @@ TextBoxComponent = TextBoxComponent_1 = __decorate([
|
|
|
6272
6454
|
[kendoEventsOutsideAngular]="{
|
|
6273
6455
|
focus: handleInputFocus,
|
|
6274
6456
|
blur: handleInputBlur,
|
|
6275
|
-
input: handleInput}"
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
(keydown.enter)="clearValue($event)"
|
|
6289
|
-
(keydown.space)="clearValue($event)"
|
|
6290
|
-
>
|
|
6457
|
+
input: handleInput}"
|
|
6458
|
+
/>
|
|
6459
|
+
<span
|
|
6460
|
+
role="button"
|
|
6461
|
+
class="k-clear-value"
|
|
6462
|
+
*ngIf="showClearButton"
|
|
6463
|
+
(click)="clearValue()"
|
|
6464
|
+
(mousedown)="$event.preventDefault()"
|
|
6465
|
+
[tabindex]="tabIndex"
|
|
6466
|
+
[attr.aria-label]="clearTitle()"
|
|
6467
|
+
[title]="clearTitle()"
|
|
6468
|
+
(keydown.enter)="clearValue($event)"
|
|
6469
|
+
(keydown.space)="clearValue($event)">
|
|
6291
6470
|
<span [ngClass]="clearButtonClasses"></span>
|
|
6292
|
-
|
|
6471
|
+
</span>
|
|
6472
|
+
<span *ngIf="hasErrors" [ngClass]="errorIconClasses"></span>
|
|
6473
|
+
<span *ngIf="isSuccessful" [ngClass]="successIconClasses"></span>
|
|
6474
|
+
<span class="k-input-suffix">
|
|
6293
6475
|
<ng-template
|
|
6294
6476
|
*ngIf="suffixTemplate"
|
|
6295
6477
|
[ngTemplateOutlet]="suffixTemplate?.templateRef">
|
|
@@ -6473,7 +6655,6 @@ TextBoxModule = __decorate([
|
|
|
6473
6655
|
NgModule({
|
|
6474
6656
|
declarations: [
|
|
6475
6657
|
TextBoxDirective,
|
|
6476
|
-
TextBoxContainerComponent,
|
|
6477
6658
|
TextBoxComponent,
|
|
6478
6659
|
TextBoxSuffixTemplateDirective,
|
|
6479
6660
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6482,7 +6663,6 @@ TextBoxModule = __decorate([
|
|
|
6482
6663
|
],
|
|
6483
6664
|
exports: [
|
|
6484
6665
|
TextBoxDirective,
|
|
6485
|
-
TextBoxContainerComponent,
|
|
6486
6666
|
TextBoxComponent,
|
|
6487
6667
|
TextBoxSuffixTemplateDirective,
|
|
6488
6668
|
TextBoxPrefixTemplateDirective,
|
|
@@ -6615,7 +6795,7 @@ __decorate([
|
|
|
6615
6795
|
__metadata("design:type", ElementRef)
|
|
6616
6796
|
], TextFieldsBase.prototype, "input", void 0);
|
|
6617
6797
|
__decorate([
|
|
6618
|
-
HostBinding('class.k-
|
|
6798
|
+
HostBinding('class.k-disabled'),
|
|
6619
6799
|
__metadata("design:type", Boolean),
|
|
6620
6800
|
__metadata("design:paramtypes", [])
|
|
6621
6801
|
], TextFieldsBase.prototype, "disabledClass", null);
|
|
@@ -6632,7 +6812,7 @@ const resizeClasses = {
|
|
|
6632
6812
|
'none': 'k-resize-none',
|
|
6633
6813
|
'auto': 'k-resize-none'
|
|
6634
6814
|
};
|
|
6635
|
-
const FOCUSED$4 = 'k-
|
|
6815
|
+
const FOCUSED$4 = 'k-focus';
|
|
6636
6816
|
/**
|
|
6637
6817
|
* Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
|
|
6638
6818
|
*/
|
|
@@ -6649,7 +6829,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6649
6829
|
* @hidden
|
|
6650
6830
|
*/
|
|
6651
6831
|
this.focusableId = `k-${guid()}`;
|
|
6652
|
-
this.
|
|
6832
|
+
this.hostClasses = true;
|
|
6653
6833
|
/**
|
|
6654
6834
|
* Specifies the flow direction of the TextArea sections. This property is useful when adornments are used, in order to specify
|
|
6655
6835
|
* their position in relation to the textarea element.
|
|
@@ -6723,6 +6903,9 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6723
6903
|
* When the component value is changed programmatically or via its form control binding, the valueChange event is not emitted.
|
|
6724
6904
|
*/
|
|
6725
6905
|
this.valueChange = new EventEmitter();
|
|
6906
|
+
this._size = 'medium';
|
|
6907
|
+
this._rounded = 'medium';
|
|
6908
|
+
this._fillMode = 'solid';
|
|
6726
6909
|
/**
|
|
6727
6910
|
* @hidden
|
|
6728
6911
|
*/
|
|
@@ -6778,6 +6961,57 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6778
6961
|
get tabIndex() {
|
|
6779
6962
|
return this.tabindex;
|
|
6780
6963
|
}
|
|
6964
|
+
/**
|
|
6965
|
+
* The size property specifies the font size and line height of the TextArea
|
|
6966
|
+
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
6967
|
+
*
|
|
6968
|
+
* The possible values are:
|
|
6969
|
+
* * `'small'`
|
|
6970
|
+
* * `'medium'` (default)
|
|
6971
|
+
* * `'large'`
|
|
6972
|
+
* * `null`
|
|
6973
|
+
*/
|
|
6974
|
+
set size(size) {
|
|
6975
|
+
this.handleClasses(size, 'size');
|
|
6976
|
+
this._size = size;
|
|
6977
|
+
}
|
|
6978
|
+
get size() {
|
|
6979
|
+
return this._size;
|
|
6980
|
+
}
|
|
6981
|
+
/**
|
|
6982
|
+
* The rounded property specifies the border radius of the TextArea
|
|
6983
|
+
* ([see example]({% slug appearance_textarea %}#toc-rounded)).
|
|
6984
|
+
*
|
|
6985
|
+
* The possible values are:
|
|
6986
|
+
* * `'small'`
|
|
6987
|
+
* * `'medium'` (default)
|
|
6988
|
+
* * `'large'`
|
|
6989
|
+
* * `null`
|
|
6990
|
+
*/
|
|
6991
|
+
set rounded(rounded) {
|
|
6992
|
+
this.handleClasses(rounded, 'rounded');
|
|
6993
|
+
this._rounded = rounded;
|
|
6994
|
+
}
|
|
6995
|
+
get rounded() {
|
|
6996
|
+
return this._rounded;
|
|
6997
|
+
}
|
|
6998
|
+
/**
|
|
6999
|
+
* The fillMode property specifies the background and border styles of the TextArea
|
|
7000
|
+
* ([see example]({% slug appearance_textarea %}#toc-fillMode)).
|
|
7001
|
+
*
|
|
7002
|
+
* The possible values are:
|
|
7003
|
+
* * `'flat'`
|
|
7004
|
+
* * `'solid'` (default)
|
|
7005
|
+
* * `'outline'`
|
|
7006
|
+
* * `null`
|
|
7007
|
+
*/
|
|
7008
|
+
set fillMode(fillMode) {
|
|
7009
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
7010
|
+
this._fillMode = fillMode;
|
|
7011
|
+
}
|
|
7012
|
+
get fillMode() {
|
|
7013
|
+
return this._fillMode;
|
|
7014
|
+
}
|
|
6781
7015
|
ngAfterViewInit() {
|
|
6782
7016
|
const hostElement = this.hostElement.nativeElement;
|
|
6783
7017
|
let cursorInsideWrapper = false;
|
|
@@ -6797,7 +7031,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6797
7031
|
return;
|
|
6798
7032
|
}
|
|
6799
7033
|
if (tabbing) {
|
|
6800
|
-
const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
7034
|
+
const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
6801
7035
|
if (!closestTextbox) {
|
|
6802
7036
|
this.handleBlur();
|
|
6803
7037
|
}
|
|
@@ -6824,6 +7058,10 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6824
7058
|
}
|
|
6825
7059
|
}));
|
|
6826
7060
|
});
|
|
7061
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
7062
|
+
stylingInputs.forEach(input => {
|
|
7063
|
+
this.handleClasses(this[input], input);
|
|
7064
|
+
});
|
|
6827
7065
|
}
|
|
6828
7066
|
ngOnInit() {
|
|
6829
7067
|
this.control = this.injector.get(NgControl, null);
|
|
@@ -6985,6 +7223,16 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6985
7223
|
this.setSelection(0, this.value.length);
|
|
6986
7224
|
}
|
|
6987
7225
|
}
|
|
7226
|
+
handleClasses(value, input) {
|
|
7227
|
+
const elem = this.hostElement.nativeElement;
|
|
7228
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
7229
|
+
if (classes.toRemove) {
|
|
7230
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
7231
|
+
}
|
|
7232
|
+
if (classes.toAdd) {
|
|
7233
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
6988
7236
|
};
|
|
6989
7237
|
__decorate([
|
|
6990
7238
|
Input(),
|
|
@@ -6992,8 +7240,9 @@ __decorate([
|
|
|
6992
7240
|
], TextAreaComponent.prototype, "focusableId", void 0);
|
|
6993
7241
|
__decorate([
|
|
6994
7242
|
HostBinding('class.k-textarea'),
|
|
7243
|
+
HostBinding('class.k-input'),
|
|
6995
7244
|
__metadata("design:type", Boolean)
|
|
6996
|
-
], TextAreaComponent.prototype, "
|
|
7245
|
+
], TextAreaComponent.prototype, "hostClasses", void 0);
|
|
6997
7246
|
__decorate([
|
|
6998
7247
|
HostBinding('class.k-flex-col'),
|
|
6999
7248
|
__metadata("design:type", Boolean),
|
|
@@ -7033,6 +7282,21 @@ __decorate([
|
|
|
7033
7282
|
Input(),
|
|
7034
7283
|
__metadata("design:type", String)
|
|
7035
7284
|
], TextAreaComponent.prototype, "resizable", void 0);
|
|
7285
|
+
__decorate([
|
|
7286
|
+
Input(),
|
|
7287
|
+
__metadata("design:type", String),
|
|
7288
|
+
__metadata("design:paramtypes", [String])
|
|
7289
|
+
], TextAreaComponent.prototype, "size", null);
|
|
7290
|
+
__decorate([
|
|
7291
|
+
Input(),
|
|
7292
|
+
__metadata("design:type", String),
|
|
7293
|
+
__metadata("design:paramtypes", [String])
|
|
7294
|
+
], TextAreaComponent.prototype, "rounded", null);
|
|
7295
|
+
__decorate([
|
|
7296
|
+
Input(),
|
|
7297
|
+
__metadata("design:type", String),
|
|
7298
|
+
__metadata("design:paramtypes", [String])
|
|
7299
|
+
], TextAreaComponent.prototype, "fillMode", null);
|
|
7036
7300
|
__decorate([
|
|
7037
7301
|
Output('focus'),
|
|
7038
7302
|
__metadata("design:type", EventEmitter)
|
|
@@ -7065,7 +7329,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
|
|
|
7065
7329
|
[attr.aria-multiline]="true"
|
|
7066
7330
|
[attr.aria-disabled]="disabled ? true : undefined"
|
|
7067
7331
|
[attr.aria-readonly]="readonly ? true : undefined"
|
|
7068
|
-
class="k-input"
|
|
7332
|
+
class="k-input-inner"
|
|
7069
7333
|
[ngClass]="resizableClass"
|
|
7070
7334
|
[id]="focusableId"
|
|
7071
7335
|
[value]="value"
|
|
@@ -7841,7 +8105,7 @@ ColorInputComponent = __decorate([
|
|
|
7841
8105
|
template: `
|
|
7842
8106
|
<div class="k-vstack">
|
|
7843
8107
|
<button #toggleFormatButton
|
|
7844
|
-
class="k-colorgradient-toggle-mode k-button k-
|
|
8108
|
+
class="k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
|
|
7845
8109
|
[attr.aria-label]="formatButtonTitle"
|
|
7846
8110
|
[attr.title]="formatButtonTitle"
|
|
7847
8111
|
>
|
|
@@ -7852,7 +8116,7 @@ ColorInputComponent = __decorate([
|
|
|
7852
8116
|
<input
|
|
7853
8117
|
#hexInput
|
|
7854
8118
|
[id]="focusableId"
|
|
7855
|
-
class="k-textbox k-hex-value"
|
|
8119
|
+
class="k-input k-textbox k-input-solid k-input-md k-rounded-md k-hex-value"
|
|
7856
8120
|
[disabled]="disabled"
|
|
7857
8121
|
[readonly]="readonly"
|
|
7858
8122
|
[value]="hex || ''"
|
|
@@ -8018,6 +8282,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8018
8282
|
this.updateValues = new Subject();
|
|
8019
8283
|
this.notifyNgChanged = () => { };
|
|
8020
8284
|
this.notifyNgTouched = () => { };
|
|
8285
|
+
validatePackage(packageMetadata);
|
|
8021
8286
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
8022
8287
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8023
8288
|
});
|
|
@@ -8565,7 +8830,7 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8565
8830
|
</svg>
|
|
8566
8831
|
</div>
|
|
8567
8832
|
<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"
|
|
8833
|
+
<span class="k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon"
|
|
8569
8834
|
*ngIf="clearButton"
|
|
8570
8835
|
(click)="reset()"
|
|
8571
8836
|
(keydown.enter)="reset()"
|
|
@@ -8655,6 +8920,29 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8655
8920
|
LocalizationService])
|
|
8656
8921
|
], ColorGradientComponent);
|
|
8657
8922
|
|
|
8923
|
+
/**
|
|
8924
|
+
* @hidden
|
|
8925
|
+
*/
|
|
8926
|
+
let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
|
|
8927
|
+
constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
8928
|
+
super(prefix, messageService, _rtl);
|
|
8929
|
+
this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
8930
|
+
}
|
|
8931
|
+
get(shortKey) {
|
|
8932
|
+
if (this.flatColorPickerLocalization) {
|
|
8933
|
+
return this.flatColorPickerLocalization.get(shortKey);
|
|
8934
|
+
}
|
|
8935
|
+
return super.get(shortKey);
|
|
8936
|
+
}
|
|
8937
|
+
};
|
|
8938
|
+
ColorPaletteLocalizationService = __decorate([
|
|
8939
|
+
__param(0, Inject(L10N_PREFIX)),
|
|
8940
|
+
__param(1, Optional()),
|
|
8941
|
+
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
8942
|
+
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
8943
|
+
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
8944
|
+
], ColorPaletteLocalizationService);
|
|
8945
|
+
|
|
8658
8946
|
/**
|
|
8659
8947
|
* @hidden
|
|
8660
8948
|
*/
|
|
@@ -8701,44 +8989,21 @@ let ColorPaletteService = class ColorPaletteService {
|
|
|
8701
8989
|
const row = this.clampIndex(current.row + verticalStep, this.colorRows.length - 1);
|
|
8702
8990
|
const col = this.clampIndex(current.col + horizontalStep, this.colorRows[row].length - 1);
|
|
8703
8991
|
return { row, col };
|
|
8704
|
-
}
|
|
8705
|
-
clampIndex(index, max) {
|
|
8706
|
-
const minArrayIndex = 0;
|
|
8707
|
-
if (index < minArrayIndex) {
|
|
8708
|
-
return minArrayIndex;
|
|
8709
|
-
}
|
|
8710
|
-
if (index > max) {
|
|
8711
|
-
return max;
|
|
8712
|
-
}
|
|
8713
|
-
return index;
|
|
8714
|
-
}
|
|
8715
|
-
};
|
|
8716
|
-
ColorPaletteService = __decorate([
|
|
8717
|
-
Injectable()
|
|
8718
|
-
], ColorPaletteService);
|
|
8719
|
-
|
|
8720
|
-
/**
|
|
8721
|
-
* @hidden
|
|
8722
|
-
*/
|
|
8723
|
-
let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
|
|
8724
|
-
constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
8725
|
-
super(prefix, messageService, _rtl);
|
|
8726
|
-
this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
8727
|
-
}
|
|
8728
|
-
get(shortKey) {
|
|
8729
|
-
if (this.flatColorPickerLocalization) {
|
|
8730
|
-
return this.flatColorPickerLocalization.get(shortKey);
|
|
8992
|
+
}
|
|
8993
|
+
clampIndex(index, max) {
|
|
8994
|
+
const minArrayIndex = 0;
|
|
8995
|
+
if (index < minArrayIndex) {
|
|
8996
|
+
return minArrayIndex;
|
|
8731
8997
|
}
|
|
8732
|
-
|
|
8998
|
+
if (index > max) {
|
|
8999
|
+
return max;
|
|
9000
|
+
}
|
|
9001
|
+
return index;
|
|
8733
9002
|
}
|
|
8734
9003
|
};
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
8739
|
-
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
8740
|
-
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
8741
|
-
], ColorPaletteLocalizationService);
|
|
9004
|
+
ColorPaletteService = __decorate([
|
|
9005
|
+
Injectable()
|
|
9006
|
+
], ColorPaletteService);
|
|
8742
9007
|
|
|
8743
9008
|
var ColorPaletteComponent_1;
|
|
8744
9009
|
const DEFAULT_TILE_SIZE = 24;
|
|
@@ -8813,6 +9078,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
8813
9078
|
this._tabindex = 0;
|
|
8814
9079
|
this.notifyNgTouched = () => { };
|
|
8815
9080
|
this.notifyNgChanged = () => { };
|
|
9081
|
+
validatePackage(packageMetadata);
|
|
8816
9082
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
8817
9083
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8818
9084
|
});
|
|
@@ -9303,7 +9569,7 @@ FlatColorPickerHeaderComponent = __decorate([
|
|
|
9303
9569
|
<button *ngFor="let view of views"
|
|
9304
9570
|
#viewButtons
|
|
9305
9571
|
(click)="onViewButtonClick(view)"
|
|
9306
|
-
class="k-button k-
|
|
9572
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
|
|
9307
9573
|
[attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
9308
9574
|
[attr.aria-label]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
9309
9575
|
[attr.aria-pressed]="activeView === view"
|
|
@@ -9320,7 +9586,7 @@ FlatColorPickerHeaderComponent = __decorate([
|
|
|
9320
9586
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
9321
9587
|
<button *ngIf="clearButton"
|
|
9322
9588
|
#clearButton
|
|
9323
|
-
class="k-button k-
|
|
9589
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset"
|
|
9324
9590
|
[attr.aria-label]="getText('clearButton')"
|
|
9325
9591
|
[attr.title]="getText('clearButton')"
|
|
9326
9592
|
(click)="clearButtonClick.emit()">
|
|
@@ -9383,12 +9649,12 @@ FlatColorPickerActionButtonsComponent = __decorate([
|
|
|
9383
9649
|
selector: '[kendoFlatColorPickerActionButtons]',
|
|
9384
9650
|
template: `
|
|
9385
9651
|
<button
|
|
9386
|
-
class="k-coloreditor-cancel k-button"
|
|
9652
|
+
class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
|
|
9387
9653
|
[attr.title]="getText('cancelButton')"
|
|
9388
9654
|
(click)="onActionButtonClick('cancel', $event)"
|
|
9389
9655
|
>{{getText('cancelButton')}}</button>
|
|
9390
9656
|
<button #last
|
|
9391
|
-
class="k-coloreditor-apply k-button k-primary"
|
|
9657
|
+
class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
|
|
9392
9658
|
[attr.title]="getText('applyButton')"
|
|
9393
9659
|
(click)="onActionButtonClick('apply', $event)"
|
|
9394
9660
|
>{{getText('applyButton')}}</button>
|
|
@@ -9405,9 +9671,9 @@ var FlatColorPickerComponent_1;
|
|
|
9405
9671
|
* through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9406
9672
|
*/
|
|
9407
9673
|
let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPickerComponent {
|
|
9408
|
-
constructor(
|
|
9409
|
-
this.service = service;
|
|
9674
|
+
constructor(host, service, localizationService, cdr, renderer, ngZone) {
|
|
9410
9675
|
this.host = host;
|
|
9676
|
+
this.service = service;
|
|
9411
9677
|
this.localizationService = localizationService;
|
|
9412
9678
|
this.cdr = cdr;
|
|
9413
9679
|
this.renderer = renderer;
|
|
@@ -9490,6 +9756,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
|
|
|
9490
9756
|
this.subscriptions = new Subscription();
|
|
9491
9757
|
this.notifyNgChanged = () => { };
|
|
9492
9758
|
this.notifyNgTouched = () => { };
|
|
9759
|
+
validatePackage(packageMetadata);
|
|
9493
9760
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
9494
9761
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9495
9762
|
});
|
|
@@ -9963,8 +10230,8 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
|
|
|
9963
10230
|
</div>
|
|
9964
10231
|
`
|
|
9965
10232
|
}),
|
|
9966
|
-
__metadata("design:paramtypes", [
|
|
9967
|
-
|
|
10233
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10234
|
+
FlatColorPickerService,
|
|
9968
10235
|
LocalizationService,
|
|
9969
10236
|
ChangeDetectorRef,
|
|
9970
10237
|
Renderer2,
|
|
@@ -9972,7 +10239,7 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
|
|
|
9972
10239
|
], FlatColorPickerComponent);
|
|
9973
10240
|
|
|
9974
10241
|
var ColorPickerComponent_1;
|
|
9975
|
-
|
|
10242
|
+
const DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
9976
10243
|
/**
|
|
9977
10244
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
9978
10245
|
*
|
|
@@ -9980,16 +10247,15 @@ let serial$2 = 0;
|
|
|
9980
10247
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9981
10248
|
*/
|
|
9982
10249
|
let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
9983
|
-
constructor(popupService, cdr, localizationService, ngZone) {
|
|
10250
|
+
constructor(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
10251
|
+
this.host = host;
|
|
9984
10252
|
this.popupService = popupService;
|
|
9985
10253
|
this.cdr = cdr;
|
|
9986
10254
|
this.localizationService = localizationService;
|
|
9987
10255
|
this.ngZone = ngZone;
|
|
10256
|
+
this.renderer = renderer;
|
|
9988
10257
|
this.hostClasses = true;
|
|
9989
|
-
|
|
9990
|
-
* @hidden
|
|
9991
|
-
*/
|
|
9992
|
-
this.focusableId = `k-colorpicker-${serial$2++}`;
|
|
10258
|
+
this.role = 'listbox';
|
|
9993
10259
|
/**
|
|
9994
10260
|
* Specifies the views that will be rendered in the popup.
|
|
9995
10261
|
* By default both the gradient and palette views will be rendered.
|
|
@@ -10085,17 +10351,50 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10085
10351
|
* Used to provide a two-way binding for the `activeView` property.
|
|
10086
10352
|
*/
|
|
10087
10353
|
this.activeViewChange = new EventEmitter();
|
|
10354
|
+
/**
|
|
10355
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
10356
|
+
*/
|
|
10357
|
+
this.isFocused = false;
|
|
10088
10358
|
this._tabindex = 0;
|
|
10089
10359
|
this._popupSettings = { animate: true };
|
|
10090
10360
|
this._paletteSettings = {};
|
|
10091
10361
|
this._gradientSettings = { opacity: true, delay: 0 };
|
|
10362
|
+
this._size = 'medium';
|
|
10363
|
+
this._rounded = 'medium';
|
|
10364
|
+
this._fillMode = 'solid';
|
|
10365
|
+
this.subscriptions = new Subscription();
|
|
10092
10366
|
this.notifyNgTouched = () => { };
|
|
10093
10367
|
this.notifyNgChanged = () => { };
|
|
10368
|
+
this.domFocusListener = (event) => event.stopImmediatePropagation();
|
|
10094
10369
|
validatePackage(packageMetadata);
|
|
10095
10370
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
10096
10371
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
10097
10372
|
});
|
|
10098
10373
|
}
|
|
10374
|
+
get focusedClass() {
|
|
10375
|
+
return this.isFocused;
|
|
10376
|
+
}
|
|
10377
|
+
get disabledClass() {
|
|
10378
|
+
return this.disabled;
|
|
10379
|
+
}
|
|
10380
|
+
get ariaReadonly() {
|
|
10381
|
+
return this.readonly;
|
|
10382
|
+
}
|
|
10383
|
+
get ariaExpanded() {
|
|
10384
|
+
return this.isOpen;
|
|
10385
|
+
}
|
|
10386
|
+
get hostTabindex() {
|
|
10387
|
+
return this.tabindex;
|
|
10388
|
+
}
|
|
10389
|
+
/**
|
|
10390
|
+
* @hidden
|
|
10391
|
+
*/
|
|
10392
|
+
set view(view) {
|
|
10393
|
+
this.views = [view];
|
|
10394
|
+
}
|
|
10395
|
+
get view() {
|
|
10396
|
+
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
10397
|
+
}
|
|
10099
10398
|
/**
|
|
10100
10399
|
* Specifies the value of the initially selected color.
|
|
10101
10400
|
*/
|
|
@@ -10145,6 +10444,58 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10145
10444
|
get tabindex() {
|
|
10146
10445
|
return !this.disabled ? this._tabindex : undefined;
|
|
10147
10446
|
}
|
|
10447
|
+
/**
|
|
10448
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
10449
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
10450
|
+
*
|
|
10451
|
+
* The possible values are:
|
|
10452
|
+
* * `'small'`
|
|
10453
|
+
* * `'medium'` (default)
|
|
10454
|
+
* * `'large'`
|
|
10455
|
+
* * `null`
|
|
10456
|
+
*/
|
|
10457
|
+
set size(size) {
|
|
10458
|
+
this.handleClasses(size, 'size');
|
|
10459
|
+
this._size = size;
|
|
10460
|
+
}
|
|
10461
|
+
get size() {
|
|
10462
|
+
return this._size;
|
|
10463
|
+
}
|
|
10464
|
+
/**
|
|
10465
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
10466
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
10467
|
+
*
|
|
10468
|
+
* The possible values are:
|
|
10469
|
+
* * `'small'`
|
|
10470
|
+
* * `'medium'` (default)
|
|
10471
|
+
* * `'large'`
|
|
10472
|
+
* * `'full'`
|
|
10473
|
+
* * `null`
|
|
10474
|
+
*/
|
|
10475
|
+
set rounded(rounded) {
|
|
10476
|
+
this.handleClasses(rounded, 'rounded');
|
|
10477
|
+
this._rounded = rounded;
|
|
10478
|
+
}
|
|
10479
|
+
get rounded() {
|
|
10480
|
+
return this._rounded;
|
|
10481
|
+
}
|
|
10482
|
+
/**
|
|
10483
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
10484
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
10485
|
+
*
|
|
10486
|
+
* The possible values are:
|
|
10487
|
+
* * `'flat'`
|
|
10488
|
+
* * `'solid'` (default)
|
|
10489
|
+
* * `'outline'`
|
|
10490
|
+
* * `null`
|
|
10491
|
+
*/
|
|
10492
|
+
set fillMode(fillMode) {
|
|
10493
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
10494
|
+
this._fillMode = fillMode;
|
|
10495
|
+
}
|
|
10496
|
+
get fillMode() {
|
|
10497
|
+
return this._fillMode;
|
|
10498
|
+
}
|
|
10148
10499
|
/**
|
|
10149
10500
|
* Indicates whether the ColorPicker popup is open.
|
|
10150
10501
|
*/
|
|
@@ -10174,6 +10525,15 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10174
10525
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
10175
10526
|
};
|
|
10176
10527
|
}
|
|
10528
|
+
ngAfterViewInit() {
|
|
10529
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
10530
|
+
stylingInputs.forEach(input => {
|
|
10531
|
+
this.handleClasses(this[input], input);
|
|
10532
|
+
});
|
|
10533
|
+
this.setHostElementAriaLabel();
|
|
10534
|
+
this.handleHostId();
|
|
10535
|
+
this.initDomEvents();
|
|
10536
|
+
}
|
|
10177
10537
|
ngOnChanges(changes) {
|
|
10178
10538
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
10179
10539
|
this.activeView = 'palette';
|
|
@@ -10182,18 +10542,17 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10182
10542
|
this.format = 'rgba';
|
|
10183
10543
|
this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
|
|
10184
10544
|
}
|
|
10545
|
+
if (isChanged('value', changes)) {
|
|
10546
|
+
this.setHostElementAriaLabel();
|
|
10547
|
+
}
|
|
10185
10548
|
}
|
|
10186
10549
|
ngOnDestroy() {
|
|
10187
10550
|
this.closePopup();
|
|
10188
10551
|
if (this.dynamicRTLSubscription) {
|
|
10189
10552
|
this.dynamicRTLSubscription.unsubscribe();
|
|
10190
10553
|
}
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
* @hidden
|
|
10194
|
-
*/
|
|
10195
|
-
get colorPickerAriaLabel() {
|
|
10196
|
-
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
10554
|
+
this.subscriptions.unsubscribe();
|
|
10555
|
+
this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
|
|
10197
10556
|
}
|
|
10198
10557
|
/**
|
|
10199
10558
|
* @hidden
|
|
@@ -10205,28 +10564,33 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10205
10564
|
* @hidden
|
|
10206
10565
|
*/
|
|
10207
10566
|
togglePopup() {
|
|
10208
|
-
this.toggleWithEvents(!this.isOpen);
|
|
10209
10567
|
this.focus();
|
|
10568
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10210
10569
|
}
|
|
10211
10570
|
/**
|
|
10212
10571
|
* @hidden
|
|
10213
10572
|
*/
|
|
10214
|
-
|
|
10573
|
+
handleWrapperClick(event) {
|
|
10574
|
+
if (this.disabled) {
|
|
10575
|
+
return;
|
|
10576
|
+
}
|
|
10215
10577
|
this.focus();
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10578
|
+
if (closest(event.target, (element) => element === this.activeColor.nativeElement)) {
|
|
10579
|
+
const event = new ActiveColorClickEvent(this.value);
|
|
10580
|
+
this.activeColorClick.emit(event);
|
|
10581
|
+
if (!event.isOpenPrevented() || this.isOpen) {
|
|
10582
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10583
|
+
}
|
|
10584
|
+
return;
|
|
10220
10585
|
}
|
|
10586
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10221
10587
|
}
|
|
10222
10588
|
/**
|
|
10223
10589
|
* Focuses the wrapper of the ColorPicker.
|
|
10224
10590
|
*/
|
|
10225
10591
|
focus() {
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
}
|
|
10229
|
-
this.wrapper.nativeElement.focus();
|
|
10592
|
+
this.isFocused = true;
|
|
10593
|
+
this.host.nativeElement.focus();
|
|
10230
10594
|
}
|
|
10231
10595
|
/**
|
|
10232
10596
|
* @hidden
|
|
@@ -10235,14 +10599,18 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10235
10599
|
if (this.isFocused) {
|
|
10236
10600
|
return;
|
|
10237
10601
|
}
|
|
10238
|
-
this.
|
|
10239
|
-
|
|
10602
|
+
this.ngZone.run(() => {
|
|
10603
|
+
this.focus();
|
|
10604
|
+
this.onFocus.emit();
|
|
10605
|
+
});
|
|
10240
10606
|
}
|
|
10241
10607
|
/**
|
|
10242
10608
|
* Blurs the ColorPicker.
|
|
10243
10609
|
*/
|
|
10244
10610
|
blur() {
|
|
10245
|
-
this.
|
|
10611
|
+
this.isFocused = false;
|
|
10612
|
+
this.host.nativeElement.blur();
|
|
10613
|
+
this.notifyNgTouched();
|
|
10246
10614
|
}
|
|
10247
10615
|
/**
|
|
10248
10616
|
* @hidden
|
|
@@ -10251,9 +10619,16 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10251
10619
|
if (this.isOpen) {
|
|
10252
10620
|
return;
|
|
10253
10621
|
}
|
|
10254
|
-
this.
|
|
10255
|
-
|
|
10256
|
-
|
|
10622
|
+
this.ngZone.run(() => {
|
|
10623
|
+
this.onBlur.emit();
|
|
10624
|
+
this.isFocused = false;
|
|
10625
|
+
});
|
|
10626
|
+
}
|
|
10627
|
+
/**
|
|
10628
|
+
* @hidden
|
|
10629
|
+
*/
|
|
10630
|
+
arrowButtonMouseDown(ev) {
|
|
10631
|
+
ev.preventDefault();
|
|
10257
10632
|
}
|
|
10258
10633
|
/**
|
|
10259
10634
|
* Clears the value of the ColorPicker.
|
|
@@ -10263,6 +10638,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10263
10638
|
return;
|
|
10264
10639
|
}
|
|
10265
10640
|
this._value = undefined;
|
|
10641
|
+
this.setHostElementAriaLabel();
|
|
10266
10642
|
this.notifyNgChanged(undefined);
|
|
10267
10643
|
}
|
|
10268
10644
|
/**
|
|
@@ -10290,6 +10666,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10290
10666
|
if (valueChange) {
|
|
10291
10667
|
this.value = parsedColor;
|
|
10292
10668
|
this.valueChange.emit(parsedColor);
|
|
10669
|
+
this.setHostElementAriaLabel();
|
|
10293
10670
|
this.notifyNgChanged(parsedColor);
|
|
10294
10671
|
}
|
|
10295
10672
|
}
|
|
@@ -10336,7 +10713,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10336
10713
|
handleWrapperKeyDown(event) {
|
|
10337
10714
|
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
|
|
10338
10715
|
event.preventDefault();
|
|
10339
|
-
this.
|
|
10716
|
+
this.ngZone.run(() => {
|
|
10717
|
+
this.toggleWithEvents(true);
|
|
10718
|
+
});
|
|
10340
10719
|
}
|
|
10341
10720
|
}
|
|
10342
10721
|
/**
|
|
@@ -10345,14 +10724,14 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10345
10724
|
handlePopupKeyDown(event) {
|
|
10346
10725
|
if (event.keyCode === Keys.Escape) {
|
|
10347
10726
|
this.toggleWithEvents(false);
|
|
10348
|
-
this.
|
|
10727
|
+
this.host.nativeElement.focus();
|
|
10349
10728
|
}
|
|
10350
10729
|
if (event.keyCode === Keys.Tab) {
|
|
10351
10730
|
const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
10352
10731
|
const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
10353
10732
|
if (event.target === currentElement) {
|
|
10354
10733
|
event.preventDefault();
|
|
10355
|
-
nextElement.
|
|
10734
|
+
nextElement.focus();
|
|
10356
10735
|
}
|
|
10357
10736
|
}
|
|
10358
10737
|
}
|
|
@@ -10363,10 +10742,24 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10363
10742
|
isEmpty() {
|
|
10364
10743
|
return false;
|
|
10365
10744
|
}
|
|
10745
|
+
setHostElementAriaLabel() {
|
|
10746
|
+
const ariaLabelValue = `${this.value ? this.value : this.localizationService.get('colorPickerNoColor')}`;
|
|
10747
|
+
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
|
|
10748
|
+
}
|
|
10749
|
+
handleClasses(value, input) {
|
|
10750
|
+
const elem = this.host.nativeElement;
|
|
10751
|
+
const classes = getStylingClasses('picker', input, this[input], value);
|
|
10752
|
+
if (classes.toRemove) {
|
|
10753
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
10754
|
+
}
|
|
10755
|
+
if (classes.toAdd) {
|
|
10756
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
10757
|
+
}
|
|
10758
|
+
}
|
|
10366
10759
|
popupBlurInvalid(ev) {
|
|
10367
|
-
const
|
|
10368
|
-
const
|
|
10369
|
-
return
|
|
10760
|
+
const focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10761
|
+
const hostClicked = closest(ev.relatedTarget, (element) => element === this.host.nativeElement);
|
|
10762
|
+
return hostClicked || focusInFlatColorPickerElement;
|
|
10370
10763
|
}
|
|
10371
10764
|
toggleWithEvents(open) {
|
|
10372
10765
|
const sameState = this.isOpen === open;
|
|
@@ -10390,12 +10783,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10390
10783
|
}
|
|
10391
10784
|
}
|
|
10392
10785
|
focusFirstElement() {
|
|
10393
|
-
this.ngZone.
|
|
10394
|
-
|
|
10786
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
10787
|
+
if (this.flatColorPicker) {
|
|
10395
10788
|
const elementToFocus = this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle :
|
|
10396
10789
|
this.flatColorPicker.palette.host;
|
|
10397
10790
|
elementToFocus.nativeElement.focus();
|
|
10398
|
-
}
|
|
10791
|
+
}
|
|
10399
10792
|
});
|
|
10400
10793
|
}
|
|
10401
10794
|
openPopup() {
|
|
@@ -10403,7 +10796,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10403
10796
|
const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
10404
10797
|
const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
10405
10798
|
this.popupRef = this.popupService.open({
|
|
10406
|
-
anchor: this.
|
|
10799
|
+
anchor: this.activeColor,
|
|
10407
10800
|
animate: this.popupSettings.animate,
|
|
10408
10801
|
appendTo: this.popupSettings.appendTo,
|
|
10409
10802
|
popupAlign: popupPosition,
|
|
@@ -10415,7 +10808,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10415
10808
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => {
|
|
10416
10809
|
this.toggleWithEvents(false);
|
|
10417
10810
|
if (!this.isOpen) {
|
|
10418
|
-
this.
|
|
10811
|
+
this.host.nativeElement.focus({
|
|
10419
10812
|
preventScroll: true
|
|
10420
10813
|
});
|
|
10421
10814
|
}
|
|
@@ -10443,23 +10836,101 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10443
10836
|
}
|
|
10444
10837
|
return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
|
|
10445
10838
|
}
|
|
10839
|
+
handleDomEvents(action, events) {
|
|
10840
|
+
const hostElement = this.host.nativeElement;
|
|
10841
|
+
events.forEach(ev => hostElement[`${action}EventListener`](ev, this.domFocusListener, true));
|
|
10842
|
+
}
|
|
10843
|
+
initDomEvents() {
|
|
10844
|
+
if (!this.host) {
|
|
10845
|
+
return;
|
|
10846
|
+
}
|
|
10847
|
+
let hostElement = this.host.nativeElement;
|
|
10848
|
+
this.ngZone.runOutsideAngular(() => {
|
|
10849
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
|
|
10850
|
+
this.handleWrapperFocus();
|
|
10851
|
+
}));
|
|
10852
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (event) => {
|
|
10853
|
+
const closestPopup = this.popupRef ?
|
|
10854
|
+
closest(event.relatedTarget, (element) => element === this.flatColorPicker.host.nativeElement) :
|
|
10855
|
+
false;
|
|
10856
|
+
const closestWrapper = closest(event.relatedTarget, (element) => element === this.host.nativeElement);
|
|
10857
|
+
if (!closestPopup && !closestWrapper) {
|
|
10858
|
+
this.handleWrapperBlur();
|
|
10859
|
+
}
|
|
10860
|
+
}));
|
|
10861
|
+
this.handleDomEvents('add', DOM_FOCUS_EVENTS);
|
|
10862
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (event) => {
|
|
10863
|
+
this.handleWrapperKeyDown(event);
|
|
10864
|
+
}));
|
|
10865
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'click', (event) => {
|
|
10866
|
+
this.ngZone.run(() => {
|
|
10867
|
+
this.handleWrapperClick(event);
|
|
10868
|
+
});
|
|
10869
|
+
}));
|
|
10870
|
+
});
|
|
10871
|
+
}
|
|
10872
|
+
handleHostId() {
|
|
10873
|
+
const hostElement = this.host.nativeElement;
|
|
10874
|
+
const existingId = hostElement.getAttribute('id');
|
|
10875
|
+
if (existingId) {
|
|
10876
|
+
this.focusableId = existingId;
|
|
10877
|
+
}
|
|
10878
|
+
else {
|
|
10879
|
+
const id = `k-${guid()}`;
|
|
10880
|
+
hostElement.setAttribute('id', id);
|
|
10881
|
+
this.focusableId = id;
|
|
10882
|
+
}
|
|
10883
|
+
}
|
|
10446
10884
|
};
|
|
10447
10885
|
__decorate([
|
|
10448
10886
|
HostBinding('class.k-colorpicker'),
|
|
10887
|
+
HostBinding('class.k-icon-picker'),
|
|
10888
|
+
HostBinding('class.k-picker'),
|
|
10449
10889
|
__metadata("design:type", Boolean)
|
|
10450
10890
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10891
|
+
__decorate([
|
|
10892
|
+
HostBinding('class.k-focus'),
|
|
10893
|
+
__metadata("design:type", Boolean),
|
|
10894
|
+
__metadata("design:paramtypes", [])
|
|
10895
|
+
], ColorPickerComponent.prototype, "focusedClass", null);
|
|
10896
|
+
__decorate([
|
|
10897
|
+
HostBinding('attr.aria-disabled'),
|
|
10898
|
+
HostBinding('class.k-disabled'),
|
|
10899
|
+
__metadata("design:type", Boolean),
|
|
10900
|
+
__metadata("design:paramtypes", [])
|
|
10901
|
+
], ColorPickerComponent.prototype, "disabledClass", null);
|
|
10902
|
+
__decorate([
|
|
10903
|
+
HostBinding('attr.aria-readonly'),
|
|
10904
|
+
__metadata("design:type", Boolean),
|
|
10905
|
+
__metadata("design:paramtypes", [])
|
|
10906
|
+
], ColorPickerComponent.prototype, "ariaReadonly", null);
|
|
10907
|
+
__decorate([
|
|
10908
|
+
HostBinding('attr.aria-expanded'),
|
|
10909
|
+
__metadata("design:type", Boolean),
|
|
10910
|
+
__metadata("design:paramtypes", [])
|
|
10911
|
+
], ColorPickerComponent.prototype, "ariaExpanded", null);
|
|
10912
|
+
__decorate([
|
|
10913
|
+
HostBinding('attr.tabindex'),
|
|
10914
|
+
__metadata("design:type", Number),
|
|
10915
|
+
__metadata("design:paramtypes", [])
|
|
10916
|
+
], ColorPickerComponent.prototype, "hostTabindex", null);
|
|
10451
10917
|
__decorate([
|
|
10452
10918
|
HostBinding('attr.dir'),
|
|
10453
10919
|
__metadata("design:type", String)
|
|
10454
10920
|
], ColorPickerComponent.prototype, "direction", void 0);
|
|
10455
10921
|
__decorate([
|
|
10456
|
-
|
|
10922
|
+
HostBinding('attr.role'),
|
|
10457
10923
|
__metadata("design:type", String)
|
|
10458
|
-
], ColorPickerComponent.prototype, "
|
|
10924
|
+
], ColorPickerComponent.prototype, "role", void 0);
|
|
10459
10925
|
__decorate([
|
|
10460
10926
|
Input(),
|
|
10461
10927
|
__metadata("design:type", Array)
|
|
10462
10928
|
], ColorPickerComponent.prototype, "views", void 0);
|
|
10929
|
+
__decorate([
|
|
10930
|
+
Input(),
|
|
10931
|
+
__metadata("design:type", String),
|
|
10932
|
+
__metadata("design:paramtypes", [String])
|
|
10933
|
+
], ColorPickerComponent.prototype, "view", null);
|
|
10463
10934
|
__decorate([
|
|
10464
10935
|
Input(),
|
|
10465
10936
|
__metadata("design:type", String)
|
|
@@ -10521,6 +10992,21 @@ __decorate([
|
|
|
10521
10992
|
Input(),
|
|
10522
10993
|
__metadata("design:type", String)
|
|
10523
10994
|
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
10995
|
+
__decorate([
|
|
10996
|
+
Input(),
|
|
10997
|
+
__metadata("design:type", String),
|
|
10998
|
+
__metadata("design:paramtypes", [String])
|
|
10999
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
11000
|
+
__decorate([
|
|
11001
|
+
Input(),
|
|
11002
|
+
__metadata("design:type", String),
|
|
11003
|
+
__metadata("design:paramtypes", [String])
|
|
11004
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
11005
|
+
__decorate([
|
|
11006
|
+
Input(),
|
|
11007
|
+
__metadata("design:type", String),
|
|
11008
|
+
__metadata("design:paramtypes", [String])
|
|
11009
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
10524
11010
|
__decorate([
|
|
10525
11011
|
Output(),
|
|
10526
11012
|
__metadata("design:type", EventEmitter)
|
|
@@ -10558,9 +11044,9 @@ __decorate([
|
|
|
10558
11044
|
__metadata("design:type", ViewContainerRef)
|
|
10559
11045
|
], ColorPickerComponent.prototype, "container", void 0);
|
|
10560
11046
|
__decorate([
|
|
10561
|
-
ViewChild('
|
|
11047
|
+
ViewChild('activeColor', { static: true }),
|
|
10562
11048
|
__metadata("design:type", ElementRef)
|
|
10563
|
-
], ColorPickerComponent.prototype, "
|
|
11049
|
+
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
10564
11050
|
__decorate([
|
|
10565
11051
|
ViewChild('popupTemplate', { static: true }),
|
|
10566
11052
|
__metadata("design:type", TemplateRef)
|
|
@@ -10626,35 +11112,21 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10626
11112
|
i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
|
|
10627
11113
|
cancelButton="Cancel">
|
|
10628
11114
|
</ng-container>
|
|
10629
|
-
<span
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
'k-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
}"
|
|
10636
|
-
role="listbox"
|
|
10637
|
-
[attr.aria-expanded]="isOpen"
|
|
10638
|
-
[attr.aria-readonly]="readonly"
|
|
10639
|
-
[attr.aria-disabled]="disabled"
|
|
10640
|
-
[attr.aria-label]="colorPickerAriaLabel"
|
|
10641
|
-
[id]="focusableId"
|
|
10642
|
-
[attr.tabindex]="tabindex"
|
|
10643
|
-
(focus)="handleWrapperFocus()"
|
|
10644
|
-
(blur)="handleWrapperBlur()"
|
|
10645
|
-
(mousedown)="$event.preventDefault()"
|
|
10646
|
-
(keydown)="handleWrapperKeyDown($event)"
|
|
10647
|
-
>
|
|
10648
|
-
<span *ngIf="!iconStyles" class="k-selected-color" [style.background]="value" (click)="handleActiveColorClick()">
|
|
10649
|
-
<span class="k-icon k-i-line" *ngIf="!value"></span>
|
|
10650
|
-
</span>
|
|
10651
|
-
<span *ngIf="iconStyles" class="k-tool-icon" [ngClass]="iconStyles" (click)="handleActiveColorClick()">
|
|
10652
|
-
<span class="k-selected-color" [style.background-color]="value"></span>
|
|
10653
|
-
</span>
|
|
10654
|
-
<span class="k-select" (click)="togglePopup()">
|
|
10655
|
-
<span class="k-icon k-i-arrow-s"></span>
|
|
11115
|
+
<span #activeColor class="k-input-inner">
|
|
11116
|
+
<span
|
|
11117
|
+
class="k-value-icon k-color-preview"
|
|
11118
|
+
[ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}">
|
|
11119
|
+
<span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
|
|
11120
|
+
<span class="k-color-preview-mask" [style.background-color]="value"></span>
|
|
10656
11121
|
</span>
|
|
10657
11122
|
</span>
|
|
11123
|
+
<button
|
|
11124
|
+
#arrowButton
|
|
11125
|
+
tabindex="-1"
|
|
11126
|
+
role="button"
|
|
11127
|
+
class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
|
|
11128
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
11129
|
+
</button>
|
|
10658
11130
|
<ng-template #popupTemplate>
|
|
10659
11131
|
<kendo-flatcolorpicker
|
|
10660
11132
|
#flatColorPicker
|
|
@@ -10667,8 +11139,8 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10667
11139
|
[gradientSettings]="gradientSettings"
|
|
10668
11140
|
[paletteSettings]="paletteSettings"
|
|
10669
11141
|
[clearButton]="clearButton"
|
|
10670
|
-
(focusout)="handlePopupBlur($event)"
|
|
10671
11142
|
(cancel)="handleCancelEvent($event)"
|
|
11143
|
+
(focusout)="handlePopupBlur($event)"
|
|
10672
11144
|
(valueChange)="handleValueChange($event)"
|
|
10673
11145
|
(keydown)="handlePopupKeyDown($event)"
|
|
10674
11146
|
(activeViewChange)="activeViewChange.emit($event)"
|
|
@@ -10678,10 +11150,12 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10678
11150
|
<ng-container #container></ng-container>
|
|
10679
11151
|
`
|
|
10680
11152
|
}),
|
|
10681
|
-
__metadata("design:paramtypes", [
|
|
11153
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11154
|
+
PopupService,
|
|
10682
11155
|
ChangeDetectorRef,
|
|
10683
11156
|
LocalizationService,
|
|
10684
|
-
NgZone
|
|
11157
|
+
NgZone,
|
|
11158
|
+
Renderer2])
|
|
10685
11159
|
], ColorPickerComponent);
|
|
10686
11160
|
|
|
10687
11161
|
/**
|
|
@@ -11105,27 +11579,84 @@ ColorPickerModule = __decorate([
|
|
|
11105
11579
|
* ```
|
|
11106
11580
|
*/
|
|
11107
11581
|
let CheckBoxDirective = class CheckBoxDirective {
|
|
11582
|
+
constructor(renderer, hostElement) {
|
|
11583
|
+
this.renderer = renderer;
|
|
11584
|
+
this.hostElement = hostElement;
|
|
11585
|
+
this.kendoClass = true;
|
|
11586
|
+
this._size = 'medium';
|
|
11587
|
+
this._rounded = 'medium';
|
|
11588
|
+
}
|
|
11108
11589
|
/**
|
|
11109
|
-
*
|
|
11110
|
-
*
|
|
11590
|
+
* The size property specifies the width and height of the CheckBox
|
|
11591
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
|
|
11111
11592
|
*
|
|
11112
|
-
*
|
|
11113
|
-
*
|
|
11114
|
-
*
|
|
11115
|
-
*
|
|
11593
|
+
* The possible values are:
|
|
11594
|
+
* * `'small'`
|
|
11595
|
+
* * `'medium'` (default)
|
|
11596
|
+
* * `'large'`
|
|
11597
|
+
* * `null`
|
|
11116
11598
|
*/
|
|
11117
|
-
|
|
11118
|
-
this.
|
|
11599
|
+
set size(size) {
|
|
11600
|
+
this.handleClasses(size, 'size');
|
|
11601
|
+
this._size = size;
|
|
11602
|
+
}
|
|
11603
|
+
get size() {
|
|
11604
|
+
return this._size;
|
|
11605
|
+
}
|
|
11606
|
+
/**
|
|
11607
|
+
* The rounded property specifies the border radius of the CheckBox
|
|
11608
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
|
|
11609
|
+
*
|
|
11610
|
+
* The possible values are:
|
|
11611
|
+
* * `'small'`
|
|
11612
|
+
* * `'medium'` (default)
|
|
11613
|
+
* * `'large'`
|
|
11614
|
+
* * `null`
|
|
11615
|
+
*/
|
|
11616
|
+
set rounded(rounded) {
|
|
11617
|
+
this.handleClasses(rounded, 'rounded');
|
|
11618
|
+
this._rounded = rounded;
|
|
11619
|
+
}
|
|
11620
|
+
get rounded() {
|
|
11621
|
+
return this._rounded;
|
|
11622
|
+
}
|
|
11623
|
+
ngAfterViewInit() {
|
|
11624
|
+
const stylingInputs = ['size', 'rounded'];
|
|
11625
|
+
stylingInputs.forEach(input => {
|
|
11626
|
+
this.handleClasses(this[input], input);
|
|
11627
|
+
});
|
|
11628
|
+
}
|
|
11629
|
+
handleClasses(value, input) {
|
|
11630
|
+
const elem = this.hostElement.nativeElement;
|
|
11631
|
+
const classes = getStylingClasses('checkbox', input, this[input], value);
|
|
11632
|
+
if (classes.toRemove) {
|
|
11633
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11634
|
+
}
|
|
11635
|
+
if (classes.toAdd) {
|
|
11636
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11637
|
+
}
|
|
11119
11638
|
}
|
|
11120
11639
|
};
|
|
11121
11640
|
__decorate([
|
|
11122
11641
|
HostBinding('class.k-checkbox'),
|
|
11123
11642
|
__metadata("design:type", Boolean)
|
|
11124
11643
|
], CheckBoxDirective.prototype, "kendoClass", void 0);
|
|
11644
|
+
__decorate([
|
|
11645
|
+
Input(),
|
|
11646
|
+
__metadata("design:type", String),
|
|
11647
|
+
__metadata("design:paramtypes", [String])
|
|
11648
|
+
], CheckBoxDirective.prototype, "size", null);
|
|
11649
|
+
__decorate([
|
|
11650
|
+
Input(),
|
|
11651
|
+
__metadata("design:type", String),
|
|
11652
|
+
__metadata("design:paramtypes", [String])
|
|
11653
|
+
], CheckBoxDirective.prototype, "rounded", null);
|
|
11125
11654
|
CheckBoxDirective = __decorate([
|
|
11126
11655
|
Directive({
|
|
11127
11656
|
selector: 'input[kendoCheckBox]'
|
|
11128
|
-
})
|
|
11657
|
+
}),
|
|
11658
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
11659
|
+
ElementRef])
|
|
11129
11660
|
], CheckBoxDirective);
|
|
11130
11661
|
|
|
11131
11662
|
/**
|
|
@@ -11179,27 +11710,62 @@ CheckBoxModule = __decorate([
|
|
|
11179
11710
|
* ```
|
|
11180
11711
|
*/
|
|
11181
11712
|
let RadioButtonDirective = class RadioButtonDirective {
|
|
11713
|
+
constructor(renderer, hostElement) {
|
|
11714
|
+
this.renderer = renderer;
|
|
11715
|
+
this.hostElement = hostElement;
|
|
11716
|
+
this.kendoClass = true;
|
|
11717
|
+
this._size = 'medium';
|
|
11718
|
+
validatePackage(packageMetadata);
|
|
11719
|
+
}
|
|
11182
11720
|
/**
|
|
11183
|
-
*
|
|
11184
|
-
*
|
|
11185
|
-
*
|
|
11186
|
-
*
|
|
11187
|
-
*
|
|
11188
|
-
*
|
|
11189
|
-
*
|
|
11721
|
+
* The size property specifies the width and height of the RadioButton
|
|
11722
|
+
* ([see example]({% slug appearance_radiobuttondirective %}#toc-size)).
|
|
11723
|
+
* The possible values are:
|
|
11724
|
+
* * `'small'`
|
|
11725
|
+
* * `'medium'` (default)
|
|
11726
|
+
* * `'large'`
|
|
11727
|
+
* * `null`
|
|
11190
11728
|
*/
|
|
11191
|
-
|
|
11192
|
-
this.
|
|
11729
|
+
set size(size) {
|
|
11730
|
+
this.handleClasses(size, 'size');
|
|
11731
|
+
this._size = size;
|
|
11732
|
+
}
|
|
11733
|
+
get size() {
|
|
11734
|
+
return this._size;
|
|
11735
|
+
}
|
|
11736
|
+
ngAfterViewInit() {
|
|
11737
|
+
// kept in sync with other inputs for easier refactoring
|
|
11738
|
+
// to a common base class
|
|
11739
|
+
const stylingInputs = ['size'];
|
|
11740
|
+
stylingInputs.forEach(input => {
|
|
11741
|
+
this.handleClasses(this[input], input);
|
|
11742
|
+
});
|
|
11743
|
+
}
|
|
11744
|
+
handleClasses(value, input) {
|
|
11745
|
+
const elem = this.hostElement.nativeElement;
|
|
11746
|
+
const classes = getStylingClasses('radio', input, this[input], value);
|
|
11747
|
+
if (classes.toRemove) {
|
|
11748
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
11749
|
+
}
|
|
11750
|
+
if (classes.toAdd) {
|
|
11751
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
11752
|
+
}
|
|
11193
11753
|
}
|
|
11194
11754
|
};
|
|
11195
11755
|
__decorate([
|
|
11196
11756
|
HostBinding('class.k-radio'),
|
|
11197
11757
|
__metadata("design:type", Boolean)
|
|
11198
11758
|
], RadioButtonDirective.prototype, "kendoClass", void 0);
|
|
11759
|
+
__decorate([
|
|
11760
|
+
Input(),
|
|
11761
|
+
__metadata("design:type", String),
|
|
11762
|
+
__metadata("design:paramtypes", [String])
|
|
11763
|
+
], RadioButtonDirective.prototype, "size", null);
|
|
11199
11764
|
RadioButtonDirective = __decorate([
|
|
11200
11765
|
Directive({
|
|
11201
11766
|
selector: 'input[kendoRadioButton]'
|
|
11202
|
-
})
|
|
11767
|
+
}),
|
|
11768
|
+
__metadata("design:paramtypes", [Renderer2, ElementRef])
|
|
11203
11769
|
], RadioButtonDirective);
|
|
11204
11770
|
|
|
11205
11771
|
/**
|
|
@@ -11243,7 +11809,7 @@ RadioButtonModule = __decorate([
|
|
|
11243
11809
|
})
|
|
11244
11810
|
], RadioButtonModule);
|
|
11245
11811
|
|
|
11246
|
-
let serial$
|
|
11812
|
+
let serial$2 = 0;
|
|
11247
11813
|
/**
|
|
11248
11814
|
* Represents an error message that will be shown underneath
|
|
11249
11815
|
* a Kendo control or native HTML form-bound component after a validation.
|
|
@@ -11266,7 +11832,7 @@ let ErrorComponent = class ErrorComponent {
|
|
|
11266
11832
|
/**
|
|
11267
11833
|
* @hidden
|
|
11268
11834
|
*/
|
|
11269
|
-
this.id = `kendo-error-${serial$
|
|
11835
|
+
this.id = `kendo-error-${serial$2++}`;
|
|
11270
11836
|
this.roleAttribute = 'alert';
|
|
11271
11837
|
}
|
|
11272
11838
|
get startClass() {
|
|
@@ -11315,7 +11881,7 @@ ErrorComponent = __decorate([
|
|
|
11315
11881
|
})
|
|
11316
11882
|
], ErrorComponent);
|
|
11317
11883
|
|
|
11318
|
-
let serial$
|
|
11884
|
+
let serial$3 = 0;
|
|
11319
11885
|
/**
|
|
11320
11886
|
* Represents a hint message that will be shown underneath a form-bound component.
|
|
11321
11887
|
*/
|
|
@@ -11335,7 +11901,7 @@ let HintComponent = class HintComponent {
|
|
|
11335
11901
|
/**
|
|
11336
11902
|
* @hidden
|
|
11337
11903
|
*/
|
|
11338
|
-
this.id = `kendo-hint-${serial$
|
|
11904
|
+
this.id = `kendo-hint-${serial$3++}`;
|
|
11339
11905
|
this.hostClass = true;
|
|
11340
11906
|
}
|
|
11341
11907
|
get startClass() {
|
|
@@ -11737,4 +12303,4 @@ InputsModule = __decorate([
|
|
|
11737
12303
|
* Generated bundle index. Do not edit.
|
|
11738
12304
|
*/
|
|
11739
12305
|
|
|
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,
|
|
12306
|
+
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 };
|