@progress/kendo-angular-inputs 15.0.2-develop.1 → 15.0.2-develop.3

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.
@@ -199,6 +199,8 @@ export class MaskedTextBoxComponent {
199
199
  this.handleClick = () => {
200
200
  if (this.focused && !this.focusClick) {
201
201
  this.focusClick = true;
202
+ }
203
+ if (this.promptPlaceholder === null || this.promptPlaceholder === '') {
202
204
  const { selectionStart, selectionEnd } = this.input.nativeElement;
203
205
  if (selectionStart === selectionEnd) {
204
206
  this.setFocusSelection();
@@ -217,10 +219,14 @@ export class MaskedTextBoxComponent {
217
219
  }
218
220
  if (hasObservers(this.onBlur)) {
219
221
  this.ngZone.run(() => {
220
- this.onTouched();
221
222
  this.onBlur.emit();
222
223
  });
223
224
  }
225
+ this.ngZone.run(() => {
226
+ if (this.control) {
227
+ this.control && !this.control.touched && this.onTouched();
228
+ }
229
+ });
224
230
  };
225
231
  /**
226
232
  * @hidden
@@ -229,7 +235,6 @@ export class MaskedTextBoxComponent {
229
235
  this.changeDetector.markForCheck();
230
236
  if (hasObservers(this.inputBlur) || requiresZoneOnBlur(this.control)) {
231
237
  this.ngZone.run(() => {
232
- this.onTouched();
233
238
  this.inputBlur.emit();
234
239
  });
235
240
  }
@@ -412,19 +417,19 @@ export class MaskedTextBoxComponent {
412
417
  */
413
418
  ngOnChanges(changes) {
414
419
  if (changes['value']) {
415
- this.value = this.normalizeValue();
420
+ this.value = this.normalizeValue(this.value);
416
421
  }
422
+ const next = this.extractChanges(changes);
423
+ this.updateService(next);
417
424
  if (!this.mask) {
418
425
  this.updateInput(this.value);
419
426
  return;
420
427
  }
421
- const next = this.extractChanges(changes);
422
- this.updateService(next);
423
428
  const maskedValue = this.service.maskRaw(this.value);
424
429
  this.updateInput(maskedValue, null, true);
425
430
  if (changes['includeLiterals'] || isChanged('promptPlaceholder', changes)) {
426
431
  resolvedPromise.then(() => {
427
- this.updateValueWithEvents(this.maskedValue);
432
+ this.updateValueWithEvents(this.maskedValue, false);
428
433
  });
429
434
  }
430
435
  }
@@ -436,7 +441,7 @@ export class MaskedTextBoxComponent {
436
441
  this.value = this.normalizeValue(value);
437
442
  this.updateInput(this.service.maskRaw(this.value));
438
443
  if (this.includeLiterals) {
439
- this.updateValue(this.maskedValue);
444
+ this.updateValue(this.maskedValue, false);
440
445
  }
441
446
  }
442
447
  /**
@@ -489,25 +494,27 @@ export class MaskedTextBoxComponent {
489
494
  * @hidden
490
495
  */
491
496
  get isControlInvalid() {
492
- return this.control && this.control.touched && !this.control.valid;
497
+ return this.control && this.control.touched && this.control.invalid;
493
498
  }
494
499
  /**
495
500
  * @hidden
496
501
  */
497
- updateValueWithEvents(maskedValue) {
498
- this.updateValue(maskedValue);
499
- if (hasObservers(this.valueChange)) {
502
+ updateValueWithEvents(maskedValue, callOnChange = true) {
503
+ const previousValue = this.value;
504
+ this.updateValue(maskedValue, callOnChange);
505
+ const valueChanged = this.value !== previousValue;
506
+ if (valueChanged && hasObservers(this.valueChange)) {
500
507
  this.valueChange.emit(this.value);
501
508
  }
502
509
  }
503
- updateValue(value) {
510
+ updateValue(value, callOnChange = true) {
504
511
  if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
505
512
  this.value = '';
506
513
  }
507
514
  else {
508
515
  this.value = this.service.rawValue(value);
509
516
  }
510
- this.onChange(this.value);
517
+ callOnChange && this.onChange(this.value);
511
518
  }
512
519
  updateInput(maskedValue = '', selection, isFromOnChanges) {
513
520
  if (isFromOnChanges && maskedValue === this.maskedValue) {
@@ -573,7 +580,7 @@ export class MaskedTextBoxComponent {
573
580
  this.isFocused = value;
574
581
  }
575
582
  }
576
- normalizeValue(value = this.value) {
583
+ normalizeValue(value) {
577
584
  const present = isPresent(value);
578
585
  if (present && typeof value !== 'string') {
579
586
  if (isDevMode()) {
@@ -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: 1707209432,
13
- version: '15.0.2-develop.1',
12
+ publishDate: 1707469924,
13
+ version: '15.0.2-develop.3',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -538,8 +538,8 @@ const packageMetadata = {
538
538
  name: '@progress/kendo-angular-inputs',
539
539
  productName: 'Kendo UI for Angular',
540
540
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
541
- publishDate: 1707209432,
542
- version: '15.0.2-develop.1',
541
+ publishDate: 1707469924,
542
+ version: '15.0.2-develop.3',
543
543
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
544
544
  };
545
545
 
@@ -5430,6 +5430,8 @@ class MaskedTextBoxComponent {
5430
5430
  this.handleClick = () => {
5431
5431
  if (this.focused && !this.focusClick) {
5432
5432
  this.focusClick = true;
5433
+ }
5434
+ if (this.promptPlaceholder === null || this.promptPlaceholder === '') {
5433
5435
  const { selectionStart, selectionEnd } = this.input.nativeElement;
5434
5436
  if (selectionStart === selectionEnd) {
5435
5437
  this.setFocusSelection();
@@ -5448,10 +5450,14 @@ class MaskedTextBoxComponent {
5448
5450
  }
5449
5451
  if (hasObservers(this.onBlur)) {
5450
5452
  this.ngZone.run(() => {
5451
- this.onTouched();
5452
5453
  this.onBlur.emit();
5453
5454
  });
5454
5455
  }
5456
+ this.ngZone.run(() => {
5457
+ if (this.control) {
5458
+ this.control && !this.control.touched && this.onTouched();
5459
+ }
5460
+ });
5455
5461
  };
5456
5462
  /**
5457
5463
  * @hidden
@@ -5460,7 +5466,6 @@ class MaskedTextBoxComponent {
5460
5466
  this.changeDetector.markForCheck();
5461
5467
  if (hasObservers(this.inputBlur) || requiresZoneOnBlur(this.control)) {
5462
5468
  this.ngZone.run(() => {
5463
- this.onTouched();
5464
5469
  this.inputBlur.emit();
5465
5470
  });
5466
5471
  }
@@ -5643,19 +5648,19 @@ class MaskedTextBoxComponent {
5643
5648
  */
5644
5649
  ngOnChanges(changes) {
5645
5650
  if (changes['value']) {
5646
- this.value = this.normalizeValue();
5651
+ this.value = this.normalizeValue(this.value);
5647
5652
  }
5653
+ const next = this.extractChanges(changes);
5654
+ this.updateService(next);
5648
5655
  if (!this.mask) {
5649
5656
  this.updateInput(this.value);
5650
5657
  return;
5651
5658
  }
5652
- const next = this.extractChanges(changes);
5653
- this.updateService(next);
5654
5659
  const maskedValue = this.service.maskRaw(this.value);
5655
5660
  this.updateInput(maskedValue, null, true);
5656
5661
  if (changes['includeLiterals'] || isChanged('promptPlaceholder', changes)) {
5657
5662
  resolvedPromise.then(() => {
5658
- this.updateValueWithEvents(this.maskedValue);
5663
+ this.updateValueWithEvents(this.maskedValue, false);
5659
5664
  });
5660
5665
  }
5661
5666
  }
@@ -5667,7 +5672,7 @@ class MaskedTextBoxComponent {
5667
5672
  this.value = this.normalizeValue(value);
5668
5673
  this.updateInput(this.service.maskRaw(this.value));
5669
5674
  if (this.includeLiterals) {
5670
- this.updateValue(this.maskedValue);
5675
+ this.updateValue(this.maskedValue, false);
5671
5676
  }
5672
5677
  }
5673
5678
  /**
@@ -5720,25 +5725,27 @@ class MaskedTextBoxComponent {
5720
5725
  * @hidden
5721
5726
  */
5722
5727
  get isControlInvalid() {
5723
- return this.control && this.control.touched && !this.control.valid;
5728
+ return this.control && this.control.touched && this.control.invalid;
5724
5729
  }
5725
5730
  /**
5726
5731
  * @hidden
5727
5732
  */
5728
- updateValueWithEvents(maskedValue) {
5729
- this.updateValue(maskedValue);
5730
- if (hasObservers(this.valueChange)) {
5733
+ updateValueWithEvents(maskedValue, callOnChange = true) {
5734
+ const previousValue = this.value;
5735
+ this.updateValue(maskedValue, callOnChange);
5736
+ const valueChanged = this.value !== previousValue;
5737
+ if (valueChanged && hasObservers(this.valueChange)) {
5731
5738
  this.valueChange.emit(this.value);
5732
5739
  }
5733
5740
  }
5734
- updateValue(value) {
5741
+ updateValue(value, callOnChange = true) {
5735
5742
  if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
5736
5743
  this.value = '';
5737
5744
  }
5738
5745
  else {
5739
5746
  this.value = this.service.rawValue(value);
5740
5747
  }
5741
- this.onChange(this.value);
5748
+ callOnChange && this.onChange(this.value);
5742
5749
  }
5743
5750
  updateInput(maskedValue = '', selection, isFromOnChanges) {
5744
5751
  if (isFromOnChanges && maskedValue === this.maskedValue) {
@@ -5804,7 +5811,7 @@ class MaskedTextBoxComponent {
5804
5811
  this.isFocused = value;
5805
5812
  }
5806
5813
  }
5807
- normalizeValue(value = this.value) {
5814
+ normalizeValue(value) {
5808
5815
  const present = isPresent(value);
5809
5816
  if (present && typeof value !== 'string') {
5810
5817
  if (isDevMode()) {
@@ -537,8 +537,8 @@ const packageMetadata = {
537
537
  name: '@progress/kendo-angular-inputs',
538
538
  productName: 'Kendo UI for Angular',
539
539
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
540
- publishDate: 1707209432,
541
- version: '15.0.2-develop.1',
540
+ publishDate: 1707469924,
541
+ version: '15.0.2-develop.3',
542
542
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
543
543
  };
544
544
 
@@ -5423,6 +5423,8 @@ class MaskedTextBoxComponent {
5423
5423
  this.handleClick = () => {
5424
5424
  if (this.focused && !this.focusClick) {
5425
5425
  this.focusClick = true;
5426
+ }
5427
+ if (this.promptPlaceholder === null || this.promptPlaceholder === '') {
5426
5428
  const { selectionStart, selectionEnd } = this.input.nativeElement;
5427
5429
  if (selectionStart === selectionEnd) {
5428
5430
  this.setFocusSelection();
@@ -5441,10 +5443,14 @@ class MaskedTextBoxComponent {
5441
5443
  }
5442
5444
  if (hasObservers(this.onBlur)) {
5443
5445
  this.ngZone.run(() => {
5444
- this.onTouched();
5445
5446
  this.onBlur.emit();
5446
5447
  });
5447
5448
  }
5449
+ this.ngZone.run(() => {
5450
+ if (this.control) {
5451
+ this.control && !this.control.touched && this.onTouched();
5452
+ }
5453
+ });
5448
5454
  };
5449
5455
  /**
5450
5456
  * @hidden
@@ -5453,7 +5459,6 @@ class MaskedTextBoxComponent {
5453
5459
  this.changeDetector.markForCheck();
5454
5460
  if (hasObservers(this.inputBlur) || requiresZoneOnBlur(this.control)) {
5455
5461
  this.ngZone.run(() => {
5456
- this.onTouched();
5457
5462
  this.inputBlur.emit();
5458
5463
  });
5459
5464
  }
@@ -5636,19 +5641,19 @@ class MaskedTextBoxComponent {
5636
5641
  */
5637
5642
  ngOnChanges(changes) {
5638
5643
  if (changes['value']) {
5639
- this.value = this.normalizeValue();
5644
+ this.value = this.normalizeValue(this.value);
5640
5645
  }
5646
+ const next = this.extractChanges(changes);
5647
+ this.updateService(next);
5641
5648
  if (!this.mask) {
5642
5649
  this.updateInput(this.value);
5643
5650
  return;
5644
5651
  }
5645
- const next = this.extractChanges(changes);
5646
- this.updateService(next);
5647
5652
  const maskedValue = this.service.maskRaw(this.value);
5648
5653
  this.updateInput(maskedValue, null, true);
5649
5654
  if (changes['includeLiterals'] || isChanged('promptPlaceholder', changes)) {
5650
5655
  resolvedPromise.then(() => {
5651
- this.updateValueWithEvents(this.maskedValue);
5656
+ this.updateValueWithEvents(this.maskedValue, false);
5652
5657
  });
5653
5658
  }
5654
5659
  }
@@ -5660,7 +5665,7 @@ class MaskedTextBoxComponent {
5660
5665
  this.value = this.normalizeValue(value);
5661
5666
  this.updateInput(this.service.maskRaw(this.value));
5662
5667
  if (this.includeLiterals) {
5663
- this.updateValue(this.maskedValue);
5668
+ this.updateValue(this.maskedValue, false);
5664
5669
  }
5665
5670
  }
5666
5671
  /**
@@ -5713,25 +5718,27 @@ class MaskedTextBoxComponent {
5713
5718
  * @hidden
5714
5719
  */
5715
5720
  get isControlInvalid() {
5716
- return this.control && this.control.touched && !this.control.valid;
5721
+ return this.control && this.control.touched && this.control.invalid;
5717
5722
  }
5718
5723
  /**
5719
5724
  * @hidden
5720
5725
  */
5721
- updateValueWithEvents(maskedValue) {
5722
- this.updateValue(maskedValue);
5723
- if (hasObservers(this.valueChange)) {
5726
+ updateValueWithEvents(maskedValue, callOnChange = true) {
5727
+ const previousValue = this.value;
5728
+ this.updateValue(maskedValue, callOnChange);
5729
+ const valueChanged = this.value !== previousValue;
5730
+ if (valueChanged && hasObservers(this.valueChange)) {
5724
5731
  this.valueChange.emit(this.value);
5725
5732
  }
5726
5733
  }
5727
- updateValue(value) {
5734
+ updateValue(value, callOnChange = true) {
5728
5735
  if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
5729
5736
  this.value = '';
5730
5737
  }
5731
5738
  else {
5732
5739
  this.value = this.service.rawValue(value);
5733
5740
  }
5734
- this.onChange(this.value);
5741
+ callOnChange && this.onChange(this.value);
5735
5742
  }
5736
5743
  updateInput(maskedValue = '', selection, isFromOnChanges) {
5737
5744
  if (isFromOnChanges && maskedValue === this.maskedValue) {
@@ -5797,7 +5804,7 @@ class MaskedTextBoxComponent {
5797
5804
  this.isFocused = value;
5798
5805
  }
5799
5806
  }
5800
- normalizeValue(value = this.value) {
5807
+ normalizeValue(value) {
5801
5808
  const present = isPresent(value);
5802
5809
  if (present && typeof value !== 'string') {
5803
5810
  if (isDevMode()) {
@@ -313,7 +313,7 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
313
313
  /**
314
314
  * @hidden
315
315
  */
316
- validate(_: AbstractControl): any;
316
+ validate(_?: AbstractControl): any;
317
317
  /**
318
318
  * @hidden
319
319
  */
@@ -321,7 +321,7 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
321
321
  /**
322
322
  * @hidden
323
323
  */
324
- updateValueWithEvents(maskedValue: string): void;
324
+ updateValueWithEvents(maskedValue: string, callOnChange?: boolean): void;
325
325
  protected onChange: (_: any) => void;
326
326
  protected onTouched: () => void;
327
327
  private updateValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-inputs",
3
- "version": "15.0.2-develop.1",
3
+ "version": "15.0.2-develop.3",
4
4
  "description": "Kendo UI for Angular Inputs Package - Everything you need to build professional form functionality (Checkbox, ColorGradient, ColorPalette, ColorPicker, FlatColorPicker, FormField, MaskedTextBox, NumericTextBox, RadioButton, RangeSlider, Slider, Switch, TextArea, and TextBox Components)",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -34,19 +34,19 @@
34
34
  "@angular/platform-browser": "13 - 17",
35
35
  "@progress/kendo-drawing": "^1.19.0",
36
36
  "@progress/kendo-licensing": "^1.0.2",
37
- "@progress/kendo-angular-buttons": "15.0.2-develop.1",
38
- "@progress/kendo-angular-common": "15.0.2-develop.1",
39
- "@progress/kendo-angular-dialog": "15.0.2-develop.1",
40
- "@progress/kendo-angular-intl": "15.0.2-develop.1",
41
- "@progress/kendo-angular-l10n": "15.0.2-develop.1",
42
- "@progress/kendo-angular-popup": "15.0.2-develop.1",
43
- "@progress/kendo-angular-icons": "15.0.2-develop.1",
37
+ "@progress/kendo-angular-buttons": "15.0.2-develop.3",
38
+ "@progress/kendo-angular-common": "15.0.2-develop.3",
39
+ "@progress/kendo-angular-dialog": "15.0.2-develop.3",
40
+ "@progress/kendo-angular-intl": "15.0.2-develop.3",
41
+ "@progress/kendo-angular-l10n": "15.0.2-develop.3",
42
+ "@progress/kendo-angular-popup": "15.0.2-develop.3",
43
+ "@progress/kendo-angular-icons": "15.0.2-develop.3",
44
44
  "rxjs": "^6.5.3 || ^7.0.0",
45
- "@progress/kendo-angular-upload": "15.0.2-develop.1"
45
+ "@progress/kendo-angular-upload": "15.0.2-develop.3"
46
46
  },
47
47
  "dependencies": {
48
48
  "tslib": "^2.3.1",
49
- "@progress/kendo-angular-schematics": "15.0.2-develop.1",
49
+ "@progress/kendo-angular-schematics": "15.0.2-develop.3",
50
50
  "@progress/kendo-common": "^0.2.2",
51
51
  "@progress/kendo-draggable": "^3.0.0",
52
52
  "@progress/kendo-inputs-common": "^3.1.0"