@progress/kendo-angular-inputs 8.0.8-dev.202203101143 → 8.0.9-dev.202203220940

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.
Files changed (28) hide show
  1. package/dist/cdn/js/kendo-angular-inputs.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/maskedtextbox/maskedtextbox.component.js +48 -42
  4. package/dist/es/package-metadata.js +1 -1
  5. package/dist/es/rangeslider/rangeslider.component.js +9 -5
  6. package/dist/es/shared/utils.js +3 -2
  7. package/dist/es/textarea/textarea-suffix.component.js +1 -2
  8. package/dist/es/textbox/textbox-suffix.directive.js +0 -1
  9. package/dist/es2015/index.metadata.json +1 -1
  10. package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +5 -4
  11. package/dist/es2015/maskedtextbox/maskedtextbox.component.js +45 -39
  12. package/dist/es2015/package-metadata.js +1 -1
  13. package/dist/es2015/rangeslider/rangeslider.component.js +9 -5
  14. package/dist/es2015/shared/utils.js +3 -2
  15. package/dist/es2015/textarea/textarea-suffix.component.d.ts +1 -2
  16. package/dist/es2015/textarea/textarea-suffix.component.js +2 -4
  17. package/dist/es2015/textbox/textbox-suffix.directive.d.ts +0 -1
  18. package/dist/es2015/textbox/textbox-suffix.directive.js +0 -1
  19. package/dist/fesm2015/index.js +59 -52
  20. package/dist/fesm5/index.js +61 -53
  21. package/dist/npm/maskedtextbox/maskedtextbox.component.js +48 -42
  22. package/dist/npm/package-metadata.js +1 -1
  23. package/dist/npm/rangeslider/rangeslider.component.js +9 -5
  24. package/dist/npm/shared/utils.js +3 -2
  25. package/dist/npm/textarea/textarea-suffix.component.js +1 -2
  26. package/dist/npm/textbox/textbox-suffix.directive.js +0 -1
  27. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  28. package/package.json +1 -1
@@ -83,9 +83,6 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
83
83
  * * `null`
84
84
  */
85
85
  fillMode: InputFillMode;
86
- direction: string;
87
- hostClasses: boolean;
88
- readonly hostDisabledClass: boolean;
89
86
  /**
90
87
  * Represents the current mask ([see example]({% slug value_maskedtextbox %})).
91
88
  * If no mask is set, the component behaves as a standard `type="text"` input.
@@ -183,6 +180,9 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
183
180
  * Fires each time the value changes.
184
181
  */
185
182
  valueChange: EventEmitter<string>;
183
+ direction: string;
184
+ hostClasses: boolean;
185
+ readonly hostDisabledClass: boolean;
186
186
  /**
187
187
  * Represents the `ElementRef` of the visible `input` element.
188
188
  */
@@ -284,9 +284,10 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
284
284
  /**
285
285
  * @hidden
286
286
  */
287
- updateValue(maskedValue: string): void;
287
+ updateValueWithEvents(maskedValue: string): void;
288
288
  protected onChange: (_: any) => void;
289
289
  protected onTouched: () => void;
290
+ private updateValue;
290
291
  private updateInput;
291
292
  private extractChanges;
292
293
  private updateService;
@@ -6,14 +6,14 @@ import * as tslib_1 from "tslib";
6
6
  var MaskedTextBoxComponent_1;
7
7
  import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Input, Optional, Output, Renderer2, ViewChild, forwardRef, NgZone, Injector, isDevMode, ChangeDetectorRef } from '@angular/core';
8
8
  import { NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
9
+ import { take } from 'rxjs/operators';
10
+ import { anyChanged, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
9
11
  import { RTL } from '@progress/kendo-angular-l10n';
10
12
  import { validatePackage } from '@progress/kendo-licensing';
11
13
  import { packageMetadata } from '../package-metadata';
12
14
  import { MaskingService } from './masking.service';
13
- import { isChanged, anyChanged, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
14
15
  import { invokeElementMethod } from '../common/dom-utils';
15
16
  import { requiresZoneOnBlur, isPresent, getStylingClasses } from '../common/utils';
16
- const resolvedPromise = Promise.resolve(null);
17
17
  const FOCUSED = 'k-focus';
18
18
  /**
19
19
  * Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
@@ -57,7 +57,6 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
57
57
  * Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
58
58
  */
59
59
  this.readonly = false;
60
- this.hostClasses = true;
61
60
  /**
62
61
  * Represents a prompt character for the masked value.
63
62
  * @default `_`
@@ -133,6 +132,7 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
133
132
  * Fires each time the value changes.
134
133
  */
135
134
  this.valueChange = new EventEmitter();
135
+ this.hostClasses = true;
136
136
  this.focusClick = false;
137
137
  this.defaultRules = {
138
138
  "#": /[\d\s\+\-]/,
@@ -250,18 +250,15 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
250
250
  get fillMode() {
251
251
  return this._fillMode;
252
252
  }
253
- get hostDisabledClass() {
254
- return this.disabled;
255
- }
256
253
  /**
257
254
  * Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
258
255
  */
259
- get rules() {
260
- return this._rules || this.defaultRules;
261
- }
262
256
  set rules(value) {
263
257
  this._rules = Object.assign({}, this.defaultRules, value);
264
258
  }
259
+ get rules() {
260
+ return this._rules || this.defaultRules;
261
+ }
265
262
  /**
266
263
  * @hidden
267
264
  */
@@ -271,6 +268,9 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
271
268
  get tabIndex() {
272
269
  return this.tabindex;
273
270
  }
271
+ get hostDisabledClass() {
272
+ return this.disabled;
273
+ }
274
274
  ngOnInit() {
275
275
  if (this.hostElement) {
276
276
  this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
@@ -347,7 +347,7 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
347
347
  const value = e.target.value;
348
348
  const [start, end] = this.selection;
349
349
  if (!this.mask) {
350
- this.updateValue(value);
350
+ this.updateValueWithEvents(value);
351
351
  this.isPasted = false;
352
352
  return;
353
353
  }
@@ -362,35 +362,38 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
362
362
  result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
363
363
  }
364
364
  this.updateInput(result.value, result.selection);
365
- this.updateValue(result.value);
365
+ this.updateValueWithEvents(result.value);
366
366
  }
367
367
  /**
368
368
  * @hidden
369
369
  */
370
370
  ngOnChanges(changes) {
371
- if (changes.value) {
372
- this.value = this.normalizeValue();
373
- }
374
371
  if (!this.mask) {
372
+ if (changes.value) {
373
+ this.value = this.normalizeValue();
374
+ }
375
375
  this.updateInput(this.value);
376
376
  return;
377
377
  }
378
378
  const next = this.extractChanges(changes);
379
379
  this.updateService(next);
380
- if (isChanged('value', changes)) {
380
+ if (changes.value) {
381
+ this.value = this.normalizeValue();
381
382
  const maskedValue = this.service.maskRaw(this.value);
382
383
  if (maskedValue !== this.maskedValue) {
383
384
  this.updateInput(maskedValue);
384
385
  }
385
- }
386
- else if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
387
- resolvedPromise.then(() => {
386
+ if (this.includeLiterals) {
388
387
  this.updateValue(this.maskedValue);
389
- });
388
+ }
390
389
  }
391
- else {
392
- this.updateInput(this.service.maskRaw(this.value));
390
+ if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
391
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
392
+ this.updateValueWithEvents(this.maskedValue);
393
+ });
394
+ return;
393
395
  }
396
+ this.updateInput(this.service.maskRaw(this.value));
394
397
  }
395
398
  /**
396
399
  * @hidden
@@ -449,15 +452,18 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
449
452
  /**
450
453
  * @hidden
451
454
  */
452
- updateValue(maskedValue) {
453
- if (this.mask && !this.service.validationValue(maskedValue)) {
455
+ updateValueWithEvents(maskedValue) {
456
+ this.updateValue(maskedValue);
457
+ this.valueChange.emit(this.value);
458
+ }
459
+ updateValue(value) {
460
+ if (this.mask && !this.service.validationValue(value)) {
454
461
  this.value = '';
455
462
  }
456
463
  else {
457
- this.value = this.service.rawValue(maskedValue);
464
+ this.value = this.service.rawValue(value);
458
465
  }
459
466
  this.onChange(this.value);
460
- this.valueChange.emit(this.value);
461
467
  }
462
468
  updateInput(maskedValue = '', selection) {
463
469
  this.maskedValue = maskedValue;
@@ -566,20 +572,6 @@ tslib_1.__decorate([
566
572
  tslib_1.__metadata("design:type", String),
567
573
  tslib_1.__metadata("design:paramtypes", [String])
568
574
  ], MaskedTextBoxComponent.prototype, "fillMode", null);
569
- tslib_1.__decorate([
570
- HostBinding('attr.dir'),
571
- tslib_1.__metadata("design:type", String)
572
- ], MaskedTextBoxComponent.prototype, "direction", void 0);
573
- tslib_1.__decorate([
574
- HostBinding('class.k-input'),
575
- HostBinding('class.k-maskedtextbox'),
576
- tslib_1.__metadata("design:type", Boolean)
577
- ], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
578
- tslib_1.__decorate([
579
- HostBinding('class.k-disabled'),
580
- tslib_1.__metadata("design:type", Boolean),
581
- tslib_1.__metadata("design:paramtypes", [])
582
- ], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
583
575
  tslib_1.__decorate([
584
576
  Input(),
585
577
  tslib_1.__metadata("design:type", String)
@@ -634,6 +626,20 @@ tslib_1.__decorate([
634
626
  Output(),
635
627
  tslib_1.__metadata("design:type", EventEmitter)
636
628
  ], MaskedTextBoxComponent.prototype, "valueChange", void 0);
629
+ tslib_1.__decorate([
630
+ HostBinding('attr.dir'),
631
+ tslib_1.__metadata("design:type", String)
632
+ ], MaskedTextBoxComponent.prototype, "direction", void 0);
633
+ tslib_1.__decorate([
634
+ HostBinding('class.k-input'),
635
+ HostBinding('class.k-maskedtextbox'),
636
+ tslib_1.__metadata("design:type", Boolean)
637
+ ], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
638
+ tslib_1.__decorate([
639
+ HostBinding('class.k-disabled'),
640
+ tslib_1.__metadata("design:type", Boolean),
641
+ tslib_1.__metadata("design:paramtypes", [])
642
+ ], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
637
643
  tslib_1.__decorate([
638
644
  ViewChild('input', { static: true }),
639
645
  tslib_1.__metadata("design:type", ElementRef)
@@ -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: 1646912457,
12
+ publishDate: 1647941853,
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
  };
@@ -217,9 +217,13 @@ let RangeSliderComponent = RangeSliderComponent_1 = class RangeSliderComponent e
217
217
  const lastCoords = this.draggedHandle.getBoundingClientRect();
218
218
  this.lastHandlePosition = { x: lastCoords.left, y: lastCoords.top };
219
219
  this.dragging = { value: true, target };
220
- const left = args.pageX < this.lastHandlePosition.x;
221
- const right = args.pageX > this.lastHandlePosition.x;
222
- const up = args.pageY > this.lastHandlePosition.y;
220
+ const mousePos = {
221
+ x: (args.pageX - 0.5) - (lastCoords.width / 2),
222
+ y: (args.pageY - (lastCoords.width / 2))
223
+ };
224
+ const left = mousePos.x < this.lastHandlePosition.x;
225
+ const right = mousePos.x > this.lastHandlePosition.x;
226
+ const up = mousePos.y > this.lastHandlePosition.y;
223
227
  const moveStartHandle = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), this.value[1]]);
224
228
  const moveEndHandle = () => this.changeValue([this.value[0], eventValue(args, this.track.nativeElement, this.getProps())]);
225
229
  const moveBothHandles = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), eventValue(args, this.track.nativeElement, this.getProps())]);
@@ -227,8 +231,8 @@ let RangeSliderComponent = RangeSliderComponent_1 = class RangeSliderComponent e
227
231
  const vertical = this.vertical;
228
232
  const horizontal = !vertical;
229
233
  const forward = (vertical && up) || (this.reverse ? horizontal && right : horizontal && left);
230
- // const forward = (this.reverse ? (!this.vertical && !left) : (!this.vertical && left)) || (this.vertical && up);
231
- if (this.value[0] === this.value[1]) {
234
+ const incorrectValueState = this.value[0] > this.value[1];
235
+ if (this.value[0] === this.value[1] || incorrectValueState) {
232
236
  if (forward) {
233
237
  activeStartHandle ? moveStartHandle() : moveBothHandles();
234
238
  }
@@ -9,8 +9,9 @@ import { detectDesktopBrowser, detectMobileOS } from "@progress/kendo-common";
9
9
  * Returns true if the used browser is Safari.
10
10
  */
11
11
  export const isSafari = (userAgent) => {
12
- return detectDesktopBrowser(userAgent).safari ||
13
- (detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
12
+ const desktopBrowser = detectDesktopBrowser(userAgent);
13
+ const mobileOS = detectMobileOS(userAgent);
14
+ return (desktopBrowser && desktopBrowser.safari) || (mobileOS && mobileOS.browser === 'mobilesafari');
14
15
  };
15
16
  /**
16
17
  * @hidden
@@ -3,8 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
7
- * @example
6
+ * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
8
7
  * ```ts-no-run
9
8
  * _@Component({
10
9
  * selector: 'my-app',
@@ -5,8 +5,7 @@
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Component, HostBinding } from '@angular/core';
7
7
  /**
8
- * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
9
- * @example
8
+ * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
10
9
  * ```ts-no-run
11
10
  * _@Component({
12
11
  * selector: 'my-app',
@@ -23,8 +22,7 @@ import { Component, HostBinding } from '@angular/core';
23
22
  */
24
23
  let TextAreaSuffixComponent = class TextAreaSuffixComponent {
25
24
  /**
26
- * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
27
- * @example
25
+ * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
28
26
  * ```ts-no-run
29
27
  * _@Component({
30
28
  * selector: 'my-app',
@@ -5,7 +5,6 @@
5
5
  import { TemplateRef } from '@angular/core';
6
6
  /**
7
7
  * Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
8
- * @example
9
8
  * ```ts-no-run
10
9
  * _@Component({
11
10
  * selector: 'my-app',
@@ -6,7 +6,6 @@ import * as tslib_1 from "tslib";
6
6
  import { Directive, Optional, TemplateRef } from '@angular/core';
7
7
  /**
8
8
  * Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
9
- * @example
10
9
  * ```ts-no-run
11
10
  * _@Component({
12
11
  * selector: 'my-app',
@@ -8,7 +8,7 @@ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor
8
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, closest } from '@progress/kendo-angular-common';
11
+ import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, isChanged, 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';
@@ -481,7 +481,7 @@ const packageMetadata = {
481
481
  name: '@progress/kendo-angular-inputs',
482
482
  productName: 'Kendo UI for Angular',
483
483
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
484
- publishDate: 1646912457,
484
+ publishDate: 1647941853,
485
485
  version: '',
486
486
  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'
487
487
  };
@@ -1552,9 +1552,13 @@ let RangeSliderComponent = RangeSliderComponent_1 = class RangeSliderComponent e
1552
1552
  const lastCoords = this.draggedHandle.getBoundingClientRect();
1553
1553
  this.lastHandlePosition = { x: lastCoords.left, y: lastCoords.top };
1554
1554
  this.dragging = { value: true, target };
1555
- const left = args.pageX < this.lastHandlePosition.x;
1556
- const right = args.pageX > this.lastHandlePosition.x;
1557
- const up = args.pageY > this.lastHandlePosition.y;
1555
+ const mousePos = {
1556
+ x: (args.pageX - 0.5) - (lastCoords.width / 2),
1557
+ y: (args.pageY - (lastCoords.width / 2))
1558
+ };
1559
+ const left = mousePos.x < this.lastHandlePosition.x;
1560
+ const right = mousePos.x > this.lastHandlePosition.x;
1561
+ const up = mousePos.y > this.lastHandlePosition.y;
1558
1562
  const moveStartHandle = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), this.value[1]]);
1559
1563
  const moveEndHandle = () => this.changeValue([this.value[0], eventValue(args, this.track.nativeElement, this.getProps())]);
1560
1564
  const moveBothHandles = () => this.changeValue([eventValue(args, this.track.nativeElement, this.getProps()), eventValue(args, this.track.nativeElement, this.getProps())]);
@@ -1562,8 +1566,8 @@ let RangeSliderComponent = RangeSliderComponent_1 = class RangeSliderComponent e
1562
1566
  const vertical = this.vertical;
1563
1567
  const horizontal = !vertical;
1564
1568
  const forward = (vertical && up) || (this.reverse ? horizontal && right : horizontal && left);
1565
- // const forward = (this.reverse ? (!this.vertical && !left) : (!this.vertical && left)) || (this.vertical && up);
1566
- if (this.value[0] === this.value[1]) {
1569
+ const incorrectValueState = this.value[0] > this.value[1];
1570
+ if (this.value[0] === this.value[1] || incorrectValueState) {
1567
1571
  if (forward) {
1568
1572
  activeStartHandle ? moveStartHandle() : moveBothHandles();
1569
1573
  }
@@ -4376,7 +4380,6 @@ MaskingService = __decorate([
4376
4380
  ], MaskingService);
4377
4381
 
4378
4382
  var MaskedTextBoxComponent_1;
4379
- const resolvedPromise = Promise.resolve(null);
4380
4383
  const FOCUSED$2 = 'k-focus';
4381
4384
  /**
4382
4385
  * Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
@@ -4420,7 +4423,6 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4420
4423
  * Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
4421
4424
  */
4422
4425
  this.readonly = false;
4423
- this.hostClasses = true;
4424
4426
  /**
4425
4427
  * Represents a prompt character for the masked value.
4426
4428
  * @default `_`
@@ -4496,6 +4498,7 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4496
4498
  * Fires each time the value changes.
4497
4499
  */
4498
4500
  this.valueChange = new EventEmitter();
4501
+ this.hostClasses = true;
4499
4502
  this.focusClick = false;
4500
4503
  this.defaultRules = {
4501
4504
  "#": /[\d\s\+\-]/,
@@ -4613,18 +4616,15 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4613
4616
  get fillMode() {
4614
4617
  return this._fillMode;
4615
4618
  }
4616
- get hostDisabledClass() {
4617
- return this.disabled;
4618
- }
4619
4619
  /**
4620
4620
  * Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
4621
4621
  */
4622
- get rules() {
4623
- return this._rules || this.defaultRules;
4624
- }
4625
4622
  set rules(value) {
4626
4623
  this._rules = Object.assign({}, this.defaultRules, value);
4627
4624
  }
4625
+ get rules() {
4626
+ return this._rules || this.defaultRules;
4627
+ }
4628
4628
  /**
4629
4629
  * @hidden
4630
4630
  */
@@ -4634,6 +4634,9 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4634
4634
  get tabIndex() {
4635
4635
  return this.tabindex;
4636
4636
  }
4637
+ get hostDisabledClass() {
4638
+ return this.disabled;
4639
+ }
4637
4640
  ngOnInit() {
4638
4641
  if (this.hostElement) {
4639
4642
  this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
@@ -4710,7 +4713,7 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4710
4713
  const value = e.target.value;
4711
4714
  const [start, end] = this.selection;
4712
4715
  if (!this.mask) {
4713
- this.updateValue(value);
4716
+ this.updateValueWithEvents(value);
4714
4717
  this.isPasted = false;
4715
4718
  return;
4716
4719
  }
@@ -4725,35 +4728,38 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4725
4728
  result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
4726
4729
  }
4727
4730
  this.updateInput(result.value, result.selection);
4728
- this.updateValue(result.value);
4731
+ this.updateValueWithEvents(result.value);
4729
4732
  }
4730
4733
  /**
4731
4734
  * @hidden
4732
4735
  */
4733
4736
  ngOnChanges(changes) {
4734
- if (changes.value) {
4735
- this.value = this.normalizeValue();
4736
- }
4737
4737
  if (!this.mask) {
4738
+ if (changes.value) {
4739
+ this.value = this.normalizeValue();
4740
+ }
4738
4741
  this.updateInput(this.value);
4739
4742
  return;
4740
4743
  }
4741
4744
  const next = this.extractChanges(changes);
4742
4745
  this.updateService(next);
4743
- if (isChanged('value', changes)) {
4746
+ if (changes.value) {
4747
+ this.value = this.normalizeValue();
4744
4748
  const maskedValue = this.service.maskRaw(this.value);
4745
4749
  if (maskedValue !== this.maskedValue) {
4746
4750
  this.updateInput(maskedValue);
4747
4751
  }
4748
- }
4749
- else if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
4750
- resolvedPromise.then(() => {
4752
+ if (this.includeLiterals) {
4751
4753
  this.updateValue(this.maskedValue);
4752
- });
4754
+ }
4753
4755
  }
4754
- else {
4755
- this.updateInput(this.service.maskRaw(this.value));
4756
+ if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
4757
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
4758
+ this.updateValueWithEvents(this.maskedValue);
4759
+ });
4760
+ return;
4756
4761
  }
4762
+ this.updateInput(this.service.maskRaw(this.value));
4757
4763
  }
4758
4764
  /**
4759
4765
  * @hidden
@@ -4812,15 +4818,18 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
4812
4818
  /**
4813
4819
  * @hidden
4814
4820
  */
4815
- updateValue(maskedValue) {
4816
- if (this.mask && !this.service.validationValue(maskedValue)) {
4821
+ updateValueWithEvents(maskedValue) {
4822
+ this.updateValue(maskedValue);
4823
+ this.valueChange.emit(this.value);
4824
+ }
4825
+ updateValue(value) {
4826
+ if (this.mask && !this.service.validationValue(value)) {
4817
4827
  this.value = '';
4818
4828
  }
4819
4829
  else {
4820
- this.value = this.service.rawValue(maskedValue);
4830
+ this.value = this.service.rawValue(value);
4821
4831
  }
4822
4832
  this.onChange(this.value);
4823
- this.valueChange.emit(this.value);
4824
4833
  }
4825
4834
  updateInput(maskedValue = '', selection) {
4826
4835
  this.maskedValue = maskedValue;
@@ -4929,20 +4938,6 @@ __decorate([
4929
4938
  __metadata("design:type", String),
4930
4939
  __metadata("design:paramtypes", [String])
4931
4940
  ], MaskedTextBoxComponent.prototype, "fillMode", null);
4932
- __decorate([
4933
- HostBinding('attr.dir'),
4934
- __metadata("design:type", String)
4935
- ], MaskedTextBoxComponent.prototype, "direction", void 0);
4936
- __decorate([
4937
- HostBinding('class.k-input'),
4938
- HostBinding('class.k-maskedtextbox'),
4939
- __metadata("design:type", Boolean)
4940
- ], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
4941
- __decorate([
4942
- HostBinding('class.k-disabled'),
4943
- __metadata("design:type", Boolean),
4944
- __metadata("design:paramtypes", [])
4945
- ], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
4946
4941
  __decorate([
4947
4942
  Input(),
4948
4943
  __metadata("design:type", String)
@@ -4997,6 +4992,20 @@ __decorate([
4997
4992
  Output(),
4998
4993
  __metadata("design:type", EventEmitter)
4999
4994
  ], MaskedTextBoxComponent.prototype, "valueChange", void 0);
4995
+ __decorate([
4996
+ HostBinding('attr.dir'),
4997
+ __metadata("design:type", String)
4998
+ ], MaskedTextBoxComponent.prototype, "direction", void 0);
4999
+ __decorate([
5000
+ HostBinding('class.k-input'),
5001
+ HostBinding('class.k-maskedtextbox'),
5002
+ __metadata("design:type", Boolean)
5003
+ ], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
5004
+ __decorate([
5005
+ HostBinding('class.k-disabled'),
5006
+ __metadata("design:type", Boolean),
5007
+ __metadata("design:paramtypes", [])
5008
+ ], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
5000
5009
  __decorate([
5001
5010
  ViewChild('input', { static: true }),
5002
5011
  __metadata("design:type", ElementRef)
@@ -5668,8 +5677,9 @@ MaskedTextBoxModule = __decorate([
5668
5677
  * Returns true if the used browser is Safari.
5669
5678
  */
5670
5679
  const isSafari = (userAgent) => {
5671
- return detectDesktopBrowser(userAgent).safari ||
5672
- (detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
5680
+ const desktopBrowser = detectDesktopBrowser(userAgent);
5681
+ const mobileOS$$1 = detectMobileOS(userAgent);
5682
+ return (desktopBrowser && desktopBrowser.safari) || (mobileOS$$1 && mobileOS$$1.browser === 'mobilesafari');
5673
5683
  };
5674
5684
  /**
5675
5685
  * @hidden
@@ -5683,7 +5693,6 @@ const isJapanese = (input) => {
5683
5693
 
5684
5694
  /**
5685
5695
  * Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
5686
- * @example
5687
5696
  * ```ts-no-run
5688
5697
  * _@Component({
5689
5698
  * selector: 'my-app',
@@ -7365,8 +7374,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
7365
7374
  ], TextAreaComponent);
7366
7375
 
7367
7376
  /**
7368
- * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
7369
- * @example
7377
+ * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
7370
7378
  * ```ts-no-run
7371
7379
  * _@Component({
7372
7380
  * selector: 'my-app',
@@ -7383,8 +7391,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
7383
7391
  */
7384
7392
  let TextAreaSuffixComponent = class TextAreaSuffixComponent {
7385
7393
  /**
7386
- * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
7387
- * @example
7394
+ * Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
7388
7395
  * ```ts-no-run
7389
7396
  * _@Component({
7390
7397
  * selector: 'my-app',