@progress/kendo-angular-inputs 9.0.1 → 9.0.3-dev.202206151239

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.
@@ -738,7 +738,7 @@ export class NumericTextBoxComponent {
738
738
  return result;
739
739
  }
740
740
  formatInputValue(value) {
741
- let stringValue = String(value);
741
+ let stringValue = Object.is(value, -0) ? '-0' : String(value);
742
742
  const exponentMatch = EXPONENT_REGEX.exec(stringValue);
743
743
  if (exponentMatch) {
744
744
  stringValue = value.toFixed(limitPrecision(parseInt(exponentMatch[1], 10)));
@@ -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: 1652107572,
12
+ publishDate: 1655296736,
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
  };
@@ -321,15 +321,16 @@ export class TextAreaComponent extends TextFieldsBase {
321
321
  this.renderer.removeStyle(hostElement, 'width');
322
322
  }
323
323
  }
324
- }
325
- ngAfterViewChecked() {
326
- this.resize();
324
+ if (changes.value) {
325
+ this.resize();
326
+ }
327
327
  }
328
328
  /**
329
329
  * @hidden
330
330
  */
331
331
  writeValue(value) {
332
332
  this.value = value;
333
+ this.resize();
333
334
  }
334
335
  /**
335
336
  * @hidden
@@ -405,12 +406,20 @@ export class TextAreaComponent extends TextFieldsBase {
405
406
  if (this.resizable !== 'auto') {
406
407
  return;
407
408
  }
408
- const element = this.input.nativeElement;
409
- this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
410
- const scrollHeight = element.scrollHeight;
411
- if (scrollHeight > this.initialHeight) {
412
- element.style.height = `${scrollHeight}px`;
413
- }
409
+ // The logic of the resize method, does not depend on Angular and thus moving it outisde of it
410
+ // We need to ensure that the resizing logic runs after the value is updated thus the setTimout
411
+ this.ngZone.runOutsideAngular(() => {
412
+ setTimeout(() => {
413
+ const hostElement = this.hostElement.nativeElement;
414
+ const element = this.input.nativeElement;
415
+ this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
416
+ const scrollHeight = element.scrollHeight;
417
+ this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
418
+ if (scrollHeight > this.initialHeight) {
419
+ this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
420
+ }
421
+ }, 0);
422
+ });
414
423
  }
415
424
  get isFocused() {
416
425
  return this._isFocused;
@@ -519,7 +519,7 @@ const packageMetadata = {
519
519
  name: '@progress/kendo-angular-inputs',
520
520
  productName: 'Kendo UI for Angular',
521
521
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
522
- publishDate: 1652107572,
522
+ publishDate: 1655296736,
523
523
  version: '',
524
524
  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'
525
525
  };
@@ -4070,7 +4070,7 @@ class NumericTextBoxComponent {
4070
4070
  return result;
4071
4071
  }
4072
4072
  formatInputValue(value) {
4073
- let stringValue = String(value);
4073
+ let stringValue = Object.is(value, -0) ? '-0' : String(value);
4074
4074
  const exponentMatch = EXPONENT_REGEX.exec(stringValue);
4075
4075
  if (exponentMatch) {
4076
4076
  stringValue = value.toFixed(limitPrecision(parseInt(exponentMatch[1], 10)));
@@ -7410,15 +7410,16 @@ class TextAreaComponent extends TextFieldsBase {
7410
7410
  this.renderer.removeStyle(hostElement, 'width');
7411
7411
  }
7412
7412
  }
7413
- }
7414
- ngAfterViewChecked() {
7415
- this.resize();
7413
+ if (changes.value) {
7414
+ this.resize();
7415
+ }
7416
7416
  }
7417
7417
  /**
7418
7418
  * @hidden
7419
7419
  */
7420
7420
  writeValue(value) {
7421
7421
  this.value = value;
7422
+ this.resize();
7422
7423
  }
7423
7424
  /**
7424
7425
  * @hidden
@@ -7494,12 +7495,20 @@ class TextAreaComponent extends TextFieldsBase {
7494
7495
  if (this.resizable !== 'auto') {
7495
7496
  return;
7496
7497
  }
7497
- const element = this.input.nativeElement;
7498
- this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
7499
- const scrollHeight = element.scrollHeight;
7500
- if (scrollHeight > this.initialHeight) {
7501
- element.style.height = `${scrollHeight}px`;
7502
- }
7498
+ // The logic of the resize method, does not depend on Angular and thus moving it outisde of it
7499
+ // We need to ensure that the resizing logic runs after the value is updated thus the setTimout
7500
+ this.ngZone.runOutsideAngular(() => {
7501
+ setTimeout(() => {
7502
+ const hostElement = this.hostElement.nativeElement;
7503
+ const element = this.input.nativeElement;
7504
+ this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
7505
+ const scrollHeight = element.scrollHeight;
7506
+ this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
7507
+ if (scrollHeight > this.initialHeight) {
7508
+ this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
7509
+ }
7510
+ }, 0);
7511
+ });
7503
7512
  }
7504
7513
  get isFocused() {
7505
7514
  return this._isFocused;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-inputs",
3
- "version": "9.0.1",
3
+ "version": "9.0.3-dev.202206151239",
4
4
  "description": "Inputs Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@progress/kendo-common": "^0.2.1",
35
35
  "@progress/kendo-schematics": "^3.0.0",
36
- "@telerik/kendo-draggable": "^2.0.0",
36
+ "@progress/kendo-draggable": "^3.0.0",
37
37
  "tslib": "^2.3.1"
38
38
  },
39
39
  "peerDependencies": {
@@ -81,11 +81,11 @@
81
81
  "fallbackTags": {
82
82
  "dev": "latest"
83
83
  },
84
- "analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits",
84
+ "analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
85
85
  "generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
86
- "getLastRelease": "@telerik/semantic-prerelease/getLastRelease",
87
- "verifyConditions": "@telerik/semantic-prerelease/verifyConditions",
88
- "verifyRelease": "@telerik/semantic-prerelease/verifyRelease"
86
+ "getLastRelease": "@progress/semantic-prerelease/getLastRelease",
87
+ "verifyConditions": "@progress/semantic-prerelease/verifyConditions",
88
+ "verifyRelease": "@progress/semantic-prerelease/verifyRelease"
89
89
  },
90
90
  "main": "bundles/kendo-angular-inputs.umd.js",
91
91
  "module": "fesm2015/kendo-angular-inputs.js",
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ElementRef, EventEmitter, NgZone, Renderer2, ChangeDetectorRef, Injector, AfterViewChecked } from '@angular/core';
5
+ import { ElementRef, EventEmitter, NgZone, Renderer2, ChangeDetectorRef, Injector } from '@angular/core';
6
6
  import { ControlValueAccessor } from '@angular/forms';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { TextFieldsBase } from '../text-fields-common/text-fields-base';
@@ -13,7 +13,7 @@ import * as i0 from "@angular/core";
13
13
  /**
14
14
  * Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
15
15
  */
16
- export declare class TextAreaComponent extends TextFieldsBase implements ControlValueAccessor, AfterViewChecked {
16
+ export declare class TextAreaComponent extends TextFieldsBase implements ControlValueAccessor {
17
17
  protected localizationService: LocalizationService;
18
18
  protected ngZone: NgZone;
19
19
  protected changeDetector: ChangeDetectorRef;
@@ -162,7 +162,6 @@ export declare class TextAreaComponent extends TextFieldsBase implements Control
162
162
  ngAfterViewInit(): void;
163
163
  ngOnInit(): void;
164
164
  ngOnChanges(changes: any): void;
165
- ngAfterViewChecked(): void;
166
165
  /**
167
166
  * @hidden
168
167
  */