@progress/kendo-angular-inputs 19.3.0-develop.9 → 19.3.1-develop.1

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 (33) hide show
  1. package/colorpicker/color-palette.component.d.ts +1 -1
  2. package/colorpicker/colorpicker.component.d.ts +1 -1
  3. package/common/models/gutters.d.ts +15 -9
  4. package/common/models/responsive-breakpoints.d.ts +16 -6
  5. package/esm2022/colorpicker/color-palette.component.mjs +3 -2
  6. package/esm2022/colorpicker/colorpicker.component.mjs +5 -4
  7. package/esm2022/form/form.component.mjs +28 -21
  8. package/esm2022/form/utils.mjs +24 -14
  9. package/esm2022/formfieldset/formfieldset.component.mjs +13 -18
  10. package/esm2022/numerictextbox/numerictextbox.component.mjs +5 -4
  11. package/esm2022/otpinput/otpinput.component.mjs +5 -4
  12. package/esm2022/package-metadata.mjs +2 -2
  13. package/esm2022/rangeslider/rangeslider.component.mjs +5 -3
  14. package/esm2022/rating/rating.component.mjs +31 -26
  15. package/esm2022/shared/shared-events.directive.mjs +1 -1
  16. package/esm2022/signature/signature.component.mjs +1 -1
  17. package/esm2022/slider/slider.component.mjs +5 -3
  18. package/esm2022/switch/switch.component.mjs +2 -2
  19. package/esm2022/text-fields-common/text-fields-base.mjs +1 -1
  20. package/esm2022/textarea/models/textarea-settings.mjs +5 -0
  21. package/esm2022/textarea/textarea.component.mjs +28 -3
  22. package/fesm2022/progress-kendo-angular-inputs.mjs +147 -98
  23. package/form/form.component.d.ts +5 -5
  24. package/form/utils.d.ts +19 -14
  25. package/formfieldset/formfieldset.component.d.ts +3 -7
  26. package/index.d.ts +2 -0
  27. package/numerictextbox/numerictextbox.component.d.ts +1 -1
  28. package/package.json +13 -13
  29. package/rangeslider/rangeslider.component.d.ts +1 -1
  30. package/slider/slider.component.d.ts +1 -1
  31. package/text-fields-common/text-fields-base.d.ts +1 -1
  32. package/textarea/models/textarea-settings.d.ts +101 -0
  33. package/textarea/textarea.component.d.ts +6 -1
@@ -5,7 +5,7 @@
5
5
  import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Input, NgZone, Output, Renderer2 } from '@angular/core';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { isDocumentAvailable, KendoInput, Keys } from '@progress/kendo-angular-common';
8
+ import { isDocumentAvailable, KendoInput, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { packageMetadata } from '../package-metadata';
11
11
  import { starIcon, starOutlineIcon } from '@progress/kendo-svg-icons';
@@ -335,33 +335,38 @@ export class RatingComponent {
335
335
  this.cdr.markForCheck();
336
336
  }
337
337
  };
338
- if (event.keyCode === Keys.ArrowDown) {
339
- decreaseValue();
340
- }
341
- if (event.keyCode === Keys.ArrowLeft) {
342
- if (this.direction === 'ltr') {
338
+ const code = normalizeNumpadKeys(event);
339
+ switch (code) {
340
+ case Keys.ArrowDown:
343
341
  decreaseValue();
344
- }
345
- else {
346
- increaseValue();
347
- }
348
- }
349
- if (event.keyCode === Keys.ArrowUp) {
350
- increaseValue();
351
- }
352
- if (event.keyCode === Keys.ArrowRight) {
353
- if (this.direction === 'ltr') {
342
+ break;
343
+ case Keys.ArrowLeft:
344
+ if (this.direction === 'ltr') {
345
+ decreaseValue();
346
+ }
347
+ else {
348
+ increaseValue();
349
+ }
350
+ break;
351
+ case Keys.ArrowUp:
354
352
  increaseValue();
355
- }
356
- else {
357
- decreaseValue();
358
- }
359
- }
360
- if (event.keyCode === Keys.Home) {
361
- setMinValue();
362
- }
363
- if (event.keyCode === Keys.End) {
364
- setMaxValue();
353
+ break;
354
+ case Keys.ArrowRight:
355
+ if (this.direction === 'ltr') {
356
+ increaseValue();
357
+ }
358
+ else {
359
+ decreaseValue();
360
+ }
361
+ break;
362
+ case Keys.Home:
363
+ setMinValue();
364
+ break;
365
+ case Keys.End:
366
+ setMaxValue();
367
+ break;
368
+ default:
369
+ break;
365
370
  }
366
371
  }
367
372
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RatingComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
@@ -66,7 +66,7 @@ export class SharedInputEventsDirective {
66
66
  cursorInsideWrapper = false;
67
67
  }));
68
68
  this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
69
- if (args.keyCode === Keys.Tab) {
69
+ if (args.code === Keys.Tab) {
70
70
  tabbing = true;
71
71
  }
72
72
  else {
@@ -466,7 +466,7 @@ export class SignatureComponent {
466
466
  * @hidden
467
467
  */
468
468
  onDialogKeydown(e) {
469
- if (e.keyCode === Keys.Escape) {
469
+ if (e.code === Keys.Escape) {
470
470
  this.isOpen = false;
471
471
  this.cd.detectChanges();
472
472
  this.maximizeButton?.nativeElement.focus();
@@ -13,7 +13,7 @@ import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
13
13
  import { areSame, isPresent, requiresZoneOnBlur } from '../common/utils';
14
14
  import { eventValue, decreaseValueToStep, increaseValueToStep } from '../sliders-common/sliders-util';
15
15
  import { invokeElementMethod } from '../common/dom-utils';
16
- import { guid, isDocumentAvailable, hasObservers, KendoInput, anyChanged, Keys, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent } from '@progress/kendo-angular-common';
16
+ import { guid, isDocumentAvailable, hasObservers, KendoInput, anyChanged, Keys, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent, normalizeNumpadKeys } from '@progress/kendo-angular-common';
17
17
  import { SliderBase } from '../sliders-common/slider-base';
18
18
  import { caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, caretAltUpIcon } from '@progress/kendo-svg-icons';
19
19
  import { SliderTicksComponent } from '../sliders-common/slider-ticks.component';
@@ -219,7 +219,9 @@ export class SliderComponent extends SliderBase {
219
219
  onKeyDown = (e) => {
220
220
  const options = this.getProps();
221
221
  const { max, min } = options;
222
- const handler = this.keyBinding[e.keyCode];
222
+ // on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
223
+ const code = normalizeNumpadKeys(e);
224
+ const handler = this.keyBinding[code];
223
225
  if (this.isDisabled || !handler) {
224
226
  return;
225
227
  }
@@ -404,7 +406,7 @@ export class SliderComponent extends SliderBase {
404
406
  cursorInsideWrapper = false;
405
407
  }));
406
408
  this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
407
- if (args.keyCode === Keys.Tab) {
409
+ if (args.code === Keys.Tab) {
408
410
  tabbing = true;
409
411
  }
410
412
  else {
@@ -336,8 +336,8 @@ export class SwitchComponent {
336
336
  * @hidden
337
337
  */
338
338
  keyDownHandler(e) {
339
- const keyCode = e.keyCode;
340
- if (this.isEnabled && (keyCode === Keys.Space || keyCode === Keys.Enter)) {
339
+ const keyCode = e.code;
340
+ if (this.isEnabled && (keyCode === Keys.Space || keyCode === Keys.Enter || keyCode === Keys.NumpadEnter)) {
341
341
  this.changeValue(!this.checked);
342
342
  e.preventDefault();
343
343
  }
@@ -22,7 +22,7 @@ export class TextFieldsBase {
22
22
  /**
23
23
  * Sets the `title` attribute of the internal textarea input element of the component.
24
24
  */
25
- title = '';
25
+ title;
26
26
  /**
27
27
  * Sets the disabled state of the TextArea component. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_textarea#toc-managing-the-textarea-disabled-state-in-reactive-forms).
28
28
  *
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -122,6 +122,10 @@ export class TextAreaComponent extends TextFieldsBase {
122
122
  * Sets the maximum number of characters allowed in the text area.
123
123
  */
124
124
  maxlength;
125
+ /**
126
+ * @hidden
127
+ */
128
+ maxResizableRows;
125
129
  /**
126
130
  * Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
127
131
  * @default 0
@@ -212,6 +216,7 @@ export class TextAreaComponent extends TextFieldsBase {
212
216
  */
213
217
  valueChange = new EventEmitter();
214
218
  initialHeight;
219
+ maxResizableHeight;
215
220
  resizeSubscription;
216
221
  _size = 'medium';
217
222
  _rounded = 'medium';
@@ -262,6 +267,14 @@ export class TextAreaComponent extends TextFieldsBase {
262
267
  this.ngZone.runOutsideAngular(() => {
263
268
  this.handleFlow();
264
269
  });
270
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
271
+ if (this.prefix) {
272
+ this.prefix.flow = this.flow;
273
+ }
274
+ if (this.suffix) {
275
+ this.suffix.flow = this.flow;
276
+ }
277
+ });
265
278
  const stylingInputs = ['size', 'rounded', 'fillMode'];
266
279
  stylingInputs.forEach(input => {
267
280
  this.handleClasses(this[input], input);
@@ -289,8 +302,14 @@ export class TextAreaComponent extends TextFieldsBase {
289
302
  }
290
303
  if (changes.resizable) {
291
304
  if (this.resizable === 'auto') {
292
- this.renderer.removeClass(element, '\!k-overflow-y-auto');
293
- this.initialHeight = element.offsetHeight;
305
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
306
+ this.renderer.removeClass(element, '\!k-overflow-y-auto');
307
+ this.initialHeight = element.offsetHeight;
308
+ if (this.maxResizableRows && this.rows) {
309
+ const heightValue = parseFloat(getComputedStyle(element).getPropertyValue('height')) - 2 * parseFloat(getComputedStyle(element).getPropertyValue('padding'));
310
+ this.maxResizableHeight = this.initialHeight + (heightValue * (this.maxResizableRows - this.rows));
311
+ }
312
+ });
294
313
  }
295
314
  else if (this.resizable !== 'both') {
296
315
  this.renderer.addClass(element, '\!k-overflow-y-auto');
@@ -454,6 +473,10 @@ export class TextAreaComponent extends TextFieldsBase {
454
473
  const element = this.input.nativeElement;
455
474
  this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
456
475
  const scrollHeight = element.scrollHeight;
476
+ if (scrollHeight > this.maxResizableHeight) {
477
+ this.renderer.setStyle(element, 'height', `${this.maxResizableHeight}px`);
478
+ return;
479
+ }
457
480
  this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
458
481
  if (scrollHeight > this.initialHeight) {
459
482
  this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
@@ -524,7 +547,7 @@ export class TextAreaComponent extends TextFieldsBase {
524
547
  setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement, this.ngZone);
525
548
  }
526
549
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextAreaComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextAreaComponent, isStandalone: true, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", inputAttributes: "inputAttributes", adornmentsOrientation: "adornmentsOrientation", rows: "rows", cols: "cols", maxlength: "maxlength", tabindex: "tabindex", tabIndex: "tabIndex", resizable: "resizable", size: "size", rounded: "rounded", fillMode: "fillMode", showPrefixSeparator: "showPrefixSeparator", showSuffixSeparator: "showSuffixSeparator" }, outputs: { onFocus: "focus", onBlur: "blur", valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.hostClasses", "class.k-input": "this.hostClasses", "class.!k-flex-col": "this.flowCol", "class.!k-flex-row": "this.flowRow" } }, providers: [
550
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextAreaComponent, isStandalone: true, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", inputAttributes: "inputAttributes", adornmentsOrientation: "adornmentsOrientation", rows: "rows", cols: "cols", maxlength: "maxlength", maxResizableRows: "maxResizableRows", tabindex: "tabindex", tabIndex: "tabIndex", resizable: "resizable", size: "size", rounded: "rounded", fillMode: "fillMode", showPrefixSeparator: "showPrefixSeparator", showSuffixSeparator: "showSuffixSeparator" }, outputs: { onFocus: "focus", onBlur: "blur", valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.hostClasses", "class.k-input": "this.hostClasses", "class.!k-flex-col": "this.flowCol", "class.!k-flex-row": "this.flowRow" } }, providers: [
528
551
  LocalizationService,
529
552
  { provide: L10N_PREFIX, useValue: 'kendo.textarea' },
530
553
  {
@@ -666,6 +689,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
666
689
  type: Input
667
690
  }], maxlength: [{
668
691
  type: Input
692
+ }], maxResizableRows: [{
693
+ type: Input
669
694
  }], tabindex: [{
670
695
  type: Input
671
696
  }], tabIndex: [{