@progress/kendo-angular-inputs 9.0.0-next.202203230846 → 9.0.0-next.202204060721
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/bundles/kendo-angular-inputs.umd.js +1 -1
- package/checkbox/checkbox.directive.d.ts +2 -2
- package/colorpicker/colorpicker.component.d.ts +3 -3
- package/common/models/fillmode.d.ts +1 -6
- package/common/models/rounded.d.ts +2 -13
- package/common/models/size.d.ts +1 -1
- package/esm2015/checkbox/checkbox.directive.js +8 -6
- package/esm2015/colorpicker/colorpicker.component.js +12 -9
- package/esm2015/common/utils.js +3 -3
- package/esm2015/maskedtextbox/maskedtextbox.component.js +55 -48
- package/esm2015/numerictextbox/numerictextbox.component.js +12 -9
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/radiobutton/radiobutton.directive.js +4 -3
- package/esm2015/rangeslider/rangeslider.component.js +9 -5
- package/esm2015/switch/switch.component.js +12 -9
- package/esm2015/textarea/textarea.component.js +12 -9
- package/esm2015/textbox/textbox.component.js +12 -9
- package/fesm2015/kendo-angular-inputs.js +139 -110
- package/maskedtextbox/maskedtextbox.component.d.ts +11 -10
- package/numerictextbox/numerictextbox.component.d.ts +3 -3
- package/package.json +6 -6
- package/radiobutton/radiobutton.directive.d.ts +1 -1
- package/switch/switch.component.d.ts +3 -3
- package/textarea/textarea.component.d.ts +3 -3
- package/textbox/textbox.component.d.ts +3 -3
|
@@ -26,7 +26,7 @@ export declare class CheckBoxDirective {
|
|
|
26
26
|
* * `'small'`
|
|
27
27
|
* * `'medium'` (default)
|
|
28
28
|
* * `'large'`
|
|
29
|
-
* * `
|
|
29
|
+
* * `none`
|
|
30
30
|
*/
|
|
31
31
|
set size(size: InputSize);
|
|
32
32
|
get size(): InputSize;
|
|
@@ -38,7 +38,7 @@ export declare class CheckBoxDirective {
|
|
|
38
38
|
* * `'small'`
|
|
39
39
|
* * `'medium'` (default)
|
|
40
40
|
* * `'large'`
|
|
41
|
-
* * `
|
|
41
|
+
* * `none`
|
|
42
42
|
*/
|
|
43
43
|
set rounded(rounded: CheckBoxRounded);
|
|
44
44
|
get rounded(): CheckBoxRounded;
|
|
@@ -154,7 +154,7 @@ export declare class ColorPickerComponent implements OnInit, AfterViewInit, OnCh
|
|
|
154
154
|
* * `'small'`
|
|
155
155
|
* * `'medium'` (default)
|
|
156
156
|
* * `'large'`
|
|
157
|
-
* * `
|
|
157
|
+
* * `none`
|
|
158
158
|
*/
|
|
159
159
|
set size(size: InputSize);
|
|
160
160
|
get size(): InputSize;
|
|
@@ -167,7 +167,7 @@ export declare class ColorPickerComponent implements OnInit, AfterViewInit, OnCh
|
|
|
167
167
|
* * `'medium'` (default)
|
|
168
168
|
* * `'large'`
|
|
169
169
|
* * `'full'`
|
|
170
|
-
* * `
|
|
170
|
+
* * `none`
|
|
171
171
|
*/
|
|
172
172
|
set rounded(rounded: InputRounded);
|
|
173
173
|
get rounded(): InputRounded;
|
|
@@ -179,7 +179,7 @@ export declare class ColorPickerComponent implements OnInit, AfterViewInit, OnCh
|
|
|
179
179
|
* * `'flat'`
|
|
180
180
|
* * `'solid'` (default)
|
|
181
181
|
* * `'outline'`
|
|
182
|
-
* * `
|
|
182
|
+
* * `none`
|
|
183
183
|
*/
|
|
184
184
|
set fillMode(fillMode: InputFillMode);
|
|
185
185
|
get fillMode(): InputFillMode;
|
|
@@ -4,10 +4,5 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
6
|
* Represents the possible fillMode options of the inputs.
|
|
7
|
-
*
|
|
8
|
-
* The possible values are:
|
|
9
|
-
* - `solid`
|
|
10
|
-
* - `flat`
|
|
11
|
-
* - `outline`
|
|
12
7
|
*/
|
|
13
|
-
export declare type InputFillMode = 'solid' | 'flat' | 'outline';
|
|
8
|
+
export declare type InputFillMode = 'solid' | 'flat' | 'outline' | 'none';
|
|
@@ -4,20 +4,9 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
6
|
* Represents the possible rounded options of the inputs.
|
|
7
|
-
*
|
|
8
|
-
* The possible values are:
|
|
9
|
-
* - `'small'`
|
|
10
|
-
* - `'medium'`
|
|
11
|
-
* - `'large'`
|
|
12
|
-
* - `'full'`
|
|
13
7
|
*/
|
|
14
|
-
export declare type InputRounded = 'small' | 'medium' | 'large' | 'full';
|
|
8
|
+
export declare type InputRounded = 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
15
9
|
/**
|
|
16
10
|
* Represents the possible rounded options of the CheckBox.
|
|
17
|
-
*
|
|
18
|
-
* The possible values are:
|
|
19
|
-
* - `'small'`
|
|
20
|
-
* - `'medium'`
|
|
21
|
-
* - `'large'`
|
|
22
11
|
*/
|
|
23
|
-
export declare type CheckBoxRounded = 'small' | 'medium' | 'large';
|
|
12
|
+
export declare type CheckBoxRounded = 'small' | 'medium' | 'large' | 'none';
|
package/common/models/size.d.ts
CHANGED
|
@@ -30,11 +30,12 @@ export class CheckBoxDirective {
|
|
|
30
30
|
* * `'small'`
|
|
31
31
|
* * `'medium'` (default)
|
|
32
32
|
* * `'large'`
|
|
33
|
-
* * `
|
|
33
|
+
* * `none`
|
|
34
34
|
*/
|
|
35
35
|
set size(size) {
|
|
36
|
-
|
|
37
|
-
this.
|
|
36
|
+
const sizeValue = size ? size : 'medium';
|
|
37
|
+
this.handleClasses(sizeValue, 'size');
|
|
38
|
+
this._size = sizeValue;
|
|
38
39
|
}
|
|
39
40
|
get size() {
|
|
40
41
|
return this._size;
|
|
@@ -47,11 +48,12 @@ export class CheckBoxDirective {
|
|
|
47
48
|
* * `'small'`
|
|
48
49
|
* * `'medium'` (default)
|
|
49
50
|
* * `'large'`
|
|
50
|
-
* * `
|
|
51
|
+
* * `none`
|
|
51
52
|
*/
|
|
52
53
|
set rounded(rounded) {
|
|
53
|
-
|
|
54
|
-
this.
|
|
54
|
+
const roundedValue = rounded ? rounded : 'medium';
|
|
55
|
+
this.handleClasses(roundedValue, 'rounded');
|
|
56
|
+
this._rounded = roundedValue;
|
|
55
57
|
}
|
|
56
58
|
get rounded() {
|
|
57
59
|
return this._rounded;
|
|
@@ -235,11 +235,12 @@ export class ColorPickerComponent {
|
|
|
235
235
|
* * `'small'`
|
|
236
236
|
* * `'medium'` (default)
|
|
237
237
|
* * `'large'`
|
|
238
|
-
* * `
|
|
238
|
+
* * `none`
|
|
239
239
|
*/
|
|
240
240
|
set size(size) {
|
|
241
|
-
|
|
242
|
-
this.
|
|
241
|
+
const sizeValue = size ? size : 'medium';
|
|
242
|
+
this.handleClasses(sizeValue, 'size');
|
|
243
|
+
this._size = sizeValue;
|
|
243
244
|
}
|
|
244
245
|
get size() {
|
|
245
246
|
return this._size;
|
|
@@ -253,11 +254,12 @@ export class ColorPickerComponent {
|
|
|
253
254
|
* * `'medium'` (default)
|
|
254
255
|
* * `'large'`
|
|
255
256
|
* * `'full'`
|
|
256
|
-
* * `
|
|
257
|
+
* * `none`
|
|
257
258
|
*/
|
|
258
259
|
set rounded(rounded) {
|
|
259
|
-
|
|
260
|
-
this.
|
|
260
|
+
const roundedValue = rounded ? rounded : 'medium';
|
|
261
|
+
this.handleClasses(roundedValue, 'rounded');
|
|
262
|
+
this._rounded = roundedValue;
|
|
261
263
|
}
|
|
262
264
|
get rounded() {
|
|
263
265
|
return this._rounded;
|
|
@@ -270,11 +272,12 @@ export class ColorPickerComponent {
|
|
|
270
272
|
* * `'flat'`
|
|
271
273
|
* * `'solid'` (default)
|
|
272
274
|
* * `'outline'`
|
|
273
|
-
* * `
|
|
275
|
+
* * `none`
|
|
274
276
|
*/
|
|
275
277
|
set fillMode(fillMode) {
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
+
const fillModeValue = fillMode ? fillMode : 'solid';
|
|
279
|
+
this.handleClasses(fillModeValue, 'fillMode');
|
|
280
|
+
this._fillMode = fillModeValue;
|
|
278
281
|
}
|
|
279
282
|
get fillMode() {
|
|
280
283
|
return this._fillMode;
|
package/esm2015/common/utils.js
CHANGED
|
@@ -53,17 +53,17 @@ export const getStylingClasses = (componentType, stylingOption, previousValue, n
|
|
|
53
53
|
case 'size':
|
|
54
54
|
return {
|
|
55
55
|
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
56
|
-
toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` :
|
|
56
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
57
57
|
};
|
|
58
58
|
case 'rounded':
|
|
59
59
|
return {
|
|
60
60
|
toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
|
|
61
|
-
toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` :
|
|
61
|
+
toAdd: newValue !== 'none' ? `k-rounded-${ROUNDNESS[newValue]}` : ''
|
|
62
62
|
};
|
|
63
63
|
case 'fillMode':
|
|
64
64
|
return {
|
|
65
65
|
toRemove: `k-${componentType}-${previousValue}`,
|
|
66
|
-
toAdd: newValue ? `k-${componentType}-${newValue}` :
|
|
66
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${newValue}` : ''
|
|
67
67
|
};
|
|
68
68
|
default:
|
|
69
69
|
break;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, EventEmitter, HostBinding, HostListener, Inject, Input, Optional, Output, ViewChild, forwardRef, isDevMode } from '@angular/core';
|
|
6
6
|
import { NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
7
|
+
import { guid, hasObservers, isChanged, KendoInput } from '@progress/kendo-angular-common';
|
|
7
8
|
import { RTL } from '@progress/kendo-angular-l10n';
|
|
8
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
10
|
import { packageMetadata } from '../package-metadata';
|
|
10
11
|
import { MaskingService } from './masking.service';
|
|
11
|
-
import { isChanged, anyChanged, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
|
|
12
12
|
import { invokeElementMethod } from '../common/dom-utils';
|
|
13
13
|
import { requiresZoneOnBlur, isPresent, getStylingClasses } from '../common/utils';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
@@ -58,7 +58,6 @@ export class MaskedTextBoxComponent {
|
|
|
58
58
|
* Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
|
|
59
59
|
*/
|
|
60
60
|
this.readonly = false;
|
|
61
|
-
this.hostClasses = true;
|
|
62
61
|
/**
|
|
63
62
|
* Represents a prompt character for the masked value.
|
|
64
63
|
* @default `_`
|
|
@@ -134,6 +133,7 @@ export class MaskedTextBoxComponent {
|
|
|
134
133
|
* Fires each time the value changes.
|
|
135
134
|
*/
|
|
136
135
|
this.valueChange = new EventEmitter();
|
|
136
|
+
this.hostClasses = true;
|
|
137
137
|
this.focusClick = false;
|
|
138
138
|
this.defaultRules = {
|
|
139
139
|
"#": /[\d\s\+\-]/,
|
|
@@ -210,11 +210,12 @@ export class MaskedTextBoxComponent {
|
|
|
210
210
|
* * `'small'`
|
|
211
211
|
* * `'medium'` (default)
|
|
212
212
|
* * `'large'`
|
|
213
|
-
* * `
|
|
213
|
+
* * `none`
|
|
214
214
|
*/
|
|
215
215
|
set size(size) {
|
|
216
|
-
|
|
217
|
-
this.
|
|
216
|
+
const sizeValue = size ? size : 'medium';
|
|
217
|
+
this.handleClasses(sizeValue, 'size');
|
|
218
|
+
this._size = sizeValue;
|
|
218
219
|
}
|
|
219
220
|
get size() {
|
|
220
221
|
return this._size;
|
|
@@ -226,11 +227,12 @@ export class MaskedTextBoxComponent {
|
|
|
226
227
|
* * `'small'`
|
|
227
228
|
* * `'medium'` (default)
|
|
228
229
|
* * `'large'`
|
|
229
|
-
* * `
|
|
230
|
+
* * `none`
|
|
230
231
|
*/
|
|
231
232
|
set rounded(rounded) {
|
|
232
|
-
|
|
233
|
-
this.
|
|
233
|
+
const roundedValue = rounded ? rounded : 'medium';
|
|
234
|
+
this.handleClasses(roundedValue, 'rounded');
|
|
235
|
+
this._rounded = roundedValue;
|
|
234
236
|
}
|
|
235
237
|
get rounded() {
|
|
236
238
|
return this._rounded;
|
|
@@ -242,27 +244,25 @@ export class MaskedTextBoxComponent {
|
|
|
242
244
|
* * `flat`
|
|
243
245
|
* * `solid` (default)
|
|
244
246
|
* * `outline`
|
|
245
|
-
* * `
|
|
247
|
+
* * `none`
|
|
246
248
|
*/
|
|
247
249
|
set fillMode(fillMode) {
|
|
248
|
-
|
|
249
|
-
this.
|
|
250
|
+
const fillModeValue = fillMode ? fillMode : 'solid';
|
|
251
|
+
this.handleClasses(fillModeValue, 'fillMode');
|
|
252
|
+
this._fillMode = fillModeValue;
|
|
250
253
|
}
|
|
251
254
|
get fillMode() {
|
|
252
255
|
return this._fillMode;
|
|
253
256
|
}
|
|
254
|
-
get hostDisabledClass() {
|
|
255
|
-
return this.disabled;
|
|
256
|
-
}
|
|
257
257
|
/**
|
|
258
258
|
* Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
|
|
259
259
|
*/
|
|
260
|
-
get rules() {
|
|
261
|
-
return this._rules || this.defaultRules;
|
|
262
|
-
}
|
|
263
260
|
set rules(value) {
|
|
264
261
|
this._rules = Object.assign({}, this.defaultRules, value);
|
|
265
262
|
}
|
|
263
|
+
get rules() {
|
|
264
|
+
return this._rules || this.defaultRules;
|
|
265
|
+
}
|
|
266
266
|
/**
|
|
267
267
|
* @hidden
|
|
268
268
|
*/
|
|
@@ -272,6 +272,9 @@ export class MaskedTextBoxComponent {
|
|
|
272
272
|
get tabIndex() {
|
|
273
273
|
return this.tabindex;
|
|
274
274
|
}
|
|
275
|
+
get hostDisabledClass() {
|
|
276
|
+
return this.disabled;
|
|
277
|
+
}
|
|
275
278
|
ngOnInit() {
|
|
276
279
|
if (this.hostElement) {
|
|
277
280
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
@@ -348,7 +351,7 @@ export class MaskedTextBoxComponent {
|
|
|
348
351
|
const value = e.target.value;
|
|
349
352
|
const [start, end] = this.selection;
|
|
350
353
|
if (!this.mask) {
|
|
351
|
-
this.
|
|
354
|
+
this.updateValueWithEvents(value);
|
|
352
355
|
this.isPasted = false;
|
|
353
356
|
return;
|
|
354
357
|
}
|
|
@@ -360,10 +363,10 @@ export class MaskedTextBoxComponent {
|
|
|
360
363
|
result = this.service.maskInRange(value.slice(start, to), this.maskedValue, start, end);
|
|
361
364
|
}
|
|
362
365
|
else {
|
|
363
|
-
result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
|
|
366
|
+
result = this.service.maskInput(value, this.maskedValue || '', e.target.selectionStart);
|
|
364
367
|
}
|
|
365
368
|
this.updateInput(result.value, result.selection);
|
|
366
|
-
this.
|
|
369
|
+
this.updateValueWithEvents(result.value);
|
|
367
370
|
}
|
|
368
371
|
/**
|
|
369
372
|
* @hidden
|
|
@@ -378,20 +381,13 @@ export class MaskedTextBoxComponent {
|
|
|
378
381
|
}
|
|
379
382
|
const next = this.extractChanges(changes);
|
|
380
383
|
this.updateService(next);
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
this.updateInput(maskedValue);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
else if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
|
|
384
|
+
const maskedValue = this.service.maskRaw(this.value);
|
|
385
|
+
this.updateInput(maskedValue, null, true);
|
|
386
|
+
if (changes.includeLiterals || isChanged('promptPlaceholder', changes)) {
|
|
388
387
|
resolvedPromise.then(() => {
|
|
389
|
-
this.
|
|
388
|
+
this.updateValueWithEvents(this.maskedValue);
|
|
390
389
|
});
|
|
391
390
|
}
|
|
392
|
-
else {
|
|
393
|
-
this.updateInput(this.service.maskRaw(this.value));
|
|
394
|
-
}
|
|
395
391
|
}
|
|
396
392
|
/**
|
|
397
393
|
* @hidden
|
|
@@ -400,6 +396,9 @@ export class MaskedTextBoxComponent {
|
|
|
400
396
|
writeValue(value) {
|
|
401
397
|
this.value = this.normalizeValue(value);
|
|
402
398
|
this.updateInput(this.service.maskRaw(this.value));
|
|
399
|
+
if (this.includeLiterals) {
|
|
400
|
+
this.updateValue(this.maskedValue);
|
|
401
|
+
}
|
|
403
402
|
}
|
|
404
403
|
/**
|
|
405
404
|
* @hidden
|
|
@@ -450,17 +449,25 @@ export class MaskedTextBoxComponent {
|
|
|
450
449
|
/**
|
|
451
450
|
* @hidden
|
|
452
451
|
*/
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
updateValueWithEvents(maskedValue) {
|
|
453
|
+
this.updateValue(maskedValue);
|
|
454
|
+
if (hasObservers(this.valueChange)) {
|
|
455
|
+
this.valueChange.emit(this.value);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
updateValue(value) {
|
|
459
|
+
if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
|
|
455
460
|
this.value = '';
|
|
456
461
|
}
|
|
457
462
|
else {
|
|
458
|
-
this.value = this.service.rawValue(
|
|
463
|
+
this.value = this.service.rawValue(value);
|
|
459
464
|
}
|
|
460
465
|
this.onChange(this.value);
|
|
461
|
-
this.valueChange.emit(this.value);
|
|
462
466
|
}
|
|
463
|
-
updateInput(maskedValue = '', selection) {
|
|
467
|
+
updateInput(maskedValue = '', selection, isFromOnChanges) {
|
|
468
|
+
if (isFromOnChanges && maskedValue === this.maskedValue) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
464
471
|
this.maskedValue = maskedValue;
|
|
465
472
|
const value = this.maskOnFocus && !this.focused && this.emptyMask ? '' : maskedValue;
|
|
466
473
|
this.renderer.setProperty(this.input.nativeElement, "value", value);
|
|
@@ -639,18 +646,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
639
646
|
type: Input
|
|
640
647
|
}], fillMode: [{
|
|
641
648
|
type: Input
|
|
642
|
-
}], direction: [{
|
|
643
|
-
type: HostBinding,
|
|
644
|
-
args: ['attr.dir']
|
|
645
|
-
}], hostClasses: [{
|
|
646
|
-
type: HostBinding,
|
|
647
|
-
args: ['class.k-input']
|
|
648
|
-
}, {
|
|
649
|
-
type: HostBinding,
|
|
650
|
-
args: ['class.k-maskedtextbox']
|
|
651
|
-
}], hostDisabledClass: [{
|
|
652
|
-
type: HostBinding,
|
|
653
|
-
args: ['class.k-disabled']
|
|
654
649
|
}], mask: [{
|
|
655
650
|
type: Input
|
|
656
651
|
}], value: [{
|
|
@@ -679,6 +674,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
679
674
|
args: ['blur']
|
|
680
675
|
}], valueChange: [{
|
|
681
676
|
type: Output
|
|
677
|
+
}], direction: [{
|
|
678
|
+
type: HostBinding,
|
|
679
|
+
args: ['attr.dir']
|
|
680
|
+
}], hostClasses: [{
|
|
681
|
+
type: HostBinding,
|
|
682
|
+
args: ['class.k-input']
|
|
683
|
+
}, {
|
|
684
|
+
type: HostBinding,
|
|
685
|
+
args: ['class.k-maskedtextbox']
|
|
686
|
+
}], hostDisabledClass: [{
|
|
687
|
+
type: HostBinding,
|
|
688
|
+
args: ['class.k-disabled']
|
|
682
689
|
}], input: [{
|
|
683
690
|
type: ViewChild,
|
|
684
691
|
args: ['input', { static: true }]
|
|
@@ -331,11 +331,12 @@ export class NumericTextBoxComponent {
|
|
|
331
331
|
* * `'small'`
|
|
332
332
|
* * `'medium'` (default)
|
|
333
333
|
* * `'large'`
|
|
334
|
-
* * `
|
|
334
|
+
* * `none`
|
|
335
335
|
*/
|
|
336
336
|
set size(size) {
|
|
337
|
-
|
|
338
|
-
this.
|
|
337
|
+
const sizeValue = size ? size : 'medium';
|
|
338
|
+
this.handleClasses(sizeValue, 'size');
|
|
339
|
+
this._size = sizeValue;
|
|
339
340
|
}
|
|
340
341
|
get size() {
|
|
341
342
|
return this._size;
|
|
@@ -347,11 +348,12 @@ export class NumericTextBoxComponent {
|
|
|
347
348
|
* * `'small'`
|
|
348
349
|
* * `'medium'` (default)
|
|
349
350
|
* * `'large'`
|
|
350
|
-
* * `
|
|
351
|
+
* * `none`
|
|
351
352
|
*/
|
|
352
353
|
set rounded(rounded) {
|
|
353
|
-
|
|
354
|
-
this.
|
|
354
|
+
const roundedValue = rounded ? rounded : 'medium';
|
|
355
|
+
this.handleClasses(roundedValue, 'rounded');
|
|
356
|
+
this._rounded = roundedValue;
|
|
355
357
|
}
|
|
356
358
|
get rounded() {
|
|
357
359
|
return this._rounded;
|
|
@@ -363,11 +365,12 @@ export class NumericTextBoxComponent {
|
|
|
363
365
|
* * `'flat'`
|
|
364
366
|
* * `'solid'` (default)
|
|
365
367
|
* * `'outline'`
|
|
366
|
-
* * `
|
|
368
|
+
* * `none`
|
|
367
369
|
*/
|
|
368
370
|
set fillMode(fillMode) {
|
|
369
|
-
|
|
370
|
-
this.
|
|
371
|
+
const fillModeValue = fillMode ? fillMode : 'solid';
|
|
372
|
+
this.handleClasses(fillModeValue, 'fillMode');
|
|
373
|
+
this._fillMode = fillModeValue;
|
|
371
374
|
}
|
|
372
375
|
get fillMode() {
|
|
373
376
|
return this._fillMode;
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1649229539,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -31,11 +31,12 @@ export class RadioButtonDirective {
|
|
|
31
31
|
* * `'small'`
|
|
32
32
|
* * `'medium'` (default)
|
|
33
33
|
* * `'large'`
|
|
34
|
-
* * `
|
|
34
|
+
* * `none`
|
|
35
35
|
*/
|
|
36
36
|
set size(size) {
|
|
37
|
-
|
|
38
|
-
this.
|
|
37
|
+
const sizeValue = size ? size : 'medium';
|
|
38
|
+
this.handleClasses(sizeValue, 'size');
|
|
39
|
+
this._size = sizeValue;
|
|
39
40
|
}
|
|
40
41
|
get size() {
|
|
41
42
|
return this._size;
|
|
@@ -221,9 +221,13 @@ export class RangeSliderComponent extends SliderBase {
|
|
|
221
221
|
const lastCoords = this.draggedHandle.getBoundingClientRect();
|
|
222
222
|
this.lastHandlePosition = { x: lastCoords.left, y: lastCoords.top };
|
|
223
223
|
this.dragging = { value: true, target };
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
const mousePos = {
|
|
225
|
+
x: (args.pageX - 0.5) - (lastCoords.width / 2),
|
|
226
|
+
y: (args.pageY - (lastCoords.width / 2))
|
|
227
|
+
};
|
|
228
|
+
const left = mousePos.x < this.lastHandlePosition.x;
|
|
229
|
+
const right = mousePos.x > this.lastHandlePosition.x;
|
|
230
|
+
const up = mousePos.y > this.lastHandlePosition.y;
|
|
227
231
|
const moveStartHandle = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), this.value[1]]);
|
|
228
232
|
const moveEndHandle = () => this.changeValue([this.value[0], eventValue(args, this.track.nativeElement, this.getProps())]);
|
|
229
233
|
const moveBothHandles = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), eventValue(args, this.track.nativeElement, this.getProps())]);
|
|
@@ -231,8 +235,8 @@ export class RangeSliderComponent extends SliderBase {
|
|
|
231
235
|
const vertical = this.vertical;
|
|
232
236
|
const horizontal = !vertical;
|
|
233
237
|
const forward = (vertical && up) || (this.reverse ? horizontal && right : horizontal && left);
|
|
234
|
-
|
|
235
|
-
if (this.value[0] === this.value[1]) {
|
|
238
|
+
const incorrectValueState = this.value[0] > this.value[1];
|
|
239
|
+
if (this.value[0] === this.value[1] || incorrectValueState) {
|
|
236
240
|
if (forward) {
|
|
237
241
|
// eslint-disable-next-line no-unused-expressions
|
|
238
242
|
activeStartHandle ? moveStartHandle() : moveBothHandles();
|
|
@@ -121,11 +121,12 @@ export class SwitchComponent {
|
|
|
121
121
|
* * `'small'`
|
|
122
122
|
* * `'medium'` (default)
|
|
123
123
|
* * `'large'`
|
|
124
|
-
* * `
|
|
124
|
+
* * `none`
|
|
125
125
|
*/
|
|
126
126
|
set size(size) {
|
|
127
|
-
|
|
128
|
-
this.
|
|
127
|
+
const sizeValue = size ? size : 'medium';
|
|
128
|
+
this.handleClasses(sizeValue, 'size');
|
|
129
|
+
this._size = sizeValue;
|
|
129
130
|
}
|
|
130
131
|
get size() {
|
|
131
132
|
return this._size;
|
|
@@ -138,11 +139,12 @@ export class SwitchComponent {
|
|
|
138
139
|
* * `'small'`
|
|
139
140
|
* * `'medium'`
|
|
140
141
|
* * `'large'`
|
|
141
|
-
* * `
|
|
142
|
+
* * `none`
|
|
142
143
|
*/
|
|
143
144
|
set thumbRounded(thumbRounded) {
|
|
144
|
-
|
|
145
|
-
this.
|
|
145
|
+
const thumbRoundedValue = thumbRounded ? thumbRounded : 'full';
|
|
146
|
+
this.handleThumbClasses(thumbRoundedValue);
|
|
147
|
+
this._thumbRounded = thumbRoundedValue;
|
|
146
148
|
}
|
|
147
149
|
get thumbRounded() {
|
|
148
150
|
return this._thumbRounded;
|
|
@@ -155,11 +157,12 @@ export class SwitchComponent {
|
|
|
155
157
|
* * `'small'`
|
|
156
158
|
* * `'medium'`
|
|
157
159
|
* * `'large'`
|
|
158
|
-
* * `
|
|
160
|
+
* * `none`
|
|
159
161
|
*/
|
|
160
162
|
set trackRounded(trackRounded) {
|
|
161
|
-
|
|
162
|
-
this.
|
|
163
|
+
const trackRoundedValue = trackRounded ? trackRounded : 'full';
|
|
164
|
+
this.handleTrackClasses(trackRoundedValue);
|
|
165
|
+
this._trackRounded = trackRoundedValue;
|
|
163
166
|
}
|
|
164
167
|
get trackRounded() {
|
|
165
168
|
return this._trackRounded;
|
|
@@ -182,11 +182,12 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
182
182
|
* * `'small'`
|
|
183
183
|
* * `'medium'` (default)
|
|
184
184
|
* * `'large'`
|
|
185
|
-
* * `
|
|
185
|
+
* * `none`
|
|
186
186
|
*/
|
|
187
187
|
set size(size) {
|
|
188
|
-
|
|
189
|
-
this.
|
|
188
|
+
const sizeValue = size ? size : 'medium';
|
|
189
|
+
this.handleClasses(sizeValue, 'size');
|
|
190
|
+
this._size = sizeValue;
|
|
190
191
|
}
|
|
191
192
|
get size() {
|
|
192
193
|
return this._size;
|
|
@@ -199,11 +200,12 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
199
200
|
* * `'small'`
|
|
200
201
|
* * `'medium'` (default)
|
|
201
202
|
* * `'large'`
|
|
202
|
-
* * `
|
|
203
|
+
* * `none`
|
|
203
204
|
*/
|
|
204
205
|
set rounded(rounded) {
|
|
205
|
-
|
|
206
|
-
this.
|
|
206
|
+
const roundedValue = rounded ? rounded : 'medium';
|
|
207
|
+
this.handleClasses(roundedValue, 'rounded');
|
|
208
|
+
this._rounded = roundedValue;
|
|
207
209
|
}
|
|
208
210
|
get rounded() {
|
|
209
211
|
return this._rounded;
|
|
@@ -216,11 +218,12 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
216
218
|
* * `'flat'`
|
|
217
219
|
* * `'solid'` (default)
|
|
218
220
|
* * `'outline'`
|
|
219
|
-
* * `
|
|
221
|
+
* * `none`
|
|
220
222
|
*/
|
|
221
223
|
set fillMode(fillMode) {
|
|
222
|
-
|
|
223
|
-
this.
|
|
224
|
+
const fillModeValue = fillMode ? fillMode : 'solid';
|
|
225
|
+
this.handleClasses(fillModeValue, 'fillMode');
|
|
226
|
+
this._fillMode = fillModeValue;
|
|
224
227
|
}
|
|
225
228
|
get fillMode() {
|
|
226
229
|
return this._fillMode;
|