@progress/kendo-angular-inputs 15.4.0 → 15.5.0-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.
@@ -10,7 +10,7 @@ import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, thro
10
10
  import * as i1 from '@progress/kendo-angular-l10n';
11
11
  import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
12
12
  import * as i4 from '@progress/kendo-angular-common';
13
- import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, SuffixTemplateDirective, PrefixTemplateDirective, isChanged, DraggableModule, EventsModule, ResizeSensorModule, AdornmentsModule, isSafari, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1 } from '@progress/kendo-angular-common';
13
+ import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isObjectPresent, removeHTMLAttributes, parseAttributes, isControlRequired, setHTMLAttributes, SuffixTemplateDirective, PrefixTemplateDirective, isChanged, DraggableModule, EventsModule, ResizeSensorModule, AdornmentsModule, isSafari, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1 } from '@progress/kendo-angular-common';
14
14
  export { PrefixTemplateDirective, SeparatorComponent, SuffixTemplateDirective } from '@progress/kendo-angular-common';
15
15
  import { validatePackage } from '@progress/kendo-licensing';
16
16
  import { caretAltUpIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, checkIcon, exclamationCircleIcon, xIcon, caretAltExpandIcon, xCircleIcon, dropletSlashIcon, dropletSliderIcon, paletteIcon, hyperlinkOpenIcon, starIcon, starOutlineIcon } from '@progress/kendo-svg-icons';
@@ -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: 1712142368,
541
- version: '15.4.0',
540
+ publishDate: 1712152346,
541
+ version: '15.5.0-develop.1',
542
542
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
543
543
  };
544
544
 
@@ -3760,6 +3760,7 @@ class NumericTextBoxComponent {
3760
3760
  this.ngTouched = noop$1;
3761
3761
  this.ngValidatorChange = noop$1;
3762
3762
  this.domEvents = [];
3763
+ this.parsedAttributes = {};
3763
3764
  /**
3764
3765
  * @hidden
3765
3766
  */
@@ -4018,9 +4019,49 @@ class NumericTextBoxComponent {
4018
4019
  get fillMode() {
4019
4020
  return this._fillMode;
4020
4021
  }
4022
+ /**
4023
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
4024
+ */
4025
+ set inputAttributes(attributes) {
4026
+ if (isObjectPresent(this.parsedAttributes)) {
4027
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.numericInput.nativeElement);
4028
+ }
4029
+ this._inputAttributes = attributes;
4030
+ this.parsedAttributes = this.inputAttributes ?
4031
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
4032
+ this.inputAttributes;
4033
+ this.setInputAttributes();
4034
+ }
4035
+ get inputAttributes() {
4036
+ return this._inputAttributes;
4037
+ }
4021
4038
  get disableClass() {
4022
4039
  return this.disabled;
4023
4040
  }
4041
+ get defaultAttributes() {
4042
+ return {
4043
+ id: this.focusableId,
4044
+ disabled: this.disabled ? '' : null,
4045
+ readonly: this.readonly ? '' : null,
4046
+ tabindex: this.tabIndex,
4047
+ placeholder: this.placeholder,
4048
+ title: this.title,
4049
+ maxlength: this.maxlength,
4050
+ 'aria-valuemin': this.min,
4051
+ 'aria-valuemax': this.max,
4052
+ 'aria-valuenow': this.value,
4053
+ required: this.isControlRequired ? '' : null,
4054
+ 'aria-invalid': this.isControlInvalid
4055
+ };
4056
+ }
4057
+ get mutableAttributes() {
4058
+ return {
4059
+ autocomplete: 'off',
4060
+ autocorrect: 'off',
4061
+ role: 'spinbutton'
4062
+ };
4063
+ }
4064
+ ;
4024
4065
  ngOnInit() {
4025
4066
  this.subscriptions = this.localizationService
4026
4067
  .changes
@@ -4181,6 +4222,12 @@ class NumericTextBoxComponent {
4181
4222
  get isControlInvalid() {
4182
4223
  return this.control && this.control.touched && !this.control.valid;
4183
4224
  }
4225
+ /**
4226
+ * @hidden
4227
+ */
4228
+ get isControlRequired() {
4229
+ return isControlRequired(this.control?.control);
4230
+ }
4184
4231
  /**
4185
4232
  * @hidden
4186
4233
  */
@@ -4511,9 +4558,13 @@ class NumericTextBoxComponent {
4511
4558
  this.renderer.addClass(elem, classes.toAdd);
4512
4559
  }
4513
4560
  }
4561
+ setInputAttributes() {
4562
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
4563
+ setHTMLAttributes(attributesToRender, this.renderer, this.numericInput.nativeElement);
4564
+ }
4514
4565
  }
4515
4566
  NumericTextBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxComponent, deps: [{ token: i1$1.IntlService }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4516
- NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", title: "title", autoCorrect: "autoCorrect", format: "format", max: "max", min: "min", decimals: "decimals", placeholder: "placeholder", step: "step", spinners: "spinners", rangeValidation: "rangeValidation", tabindex: "tabindex", tabIndex: "tabIndex", changeValueOnScroll: "changeValueOnScroll", selectOnFocus: "selectOnFocus", value: "value", maxlength: "maxlength", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur" }, host: { properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-disabled": "this.disableClass", "class.k-input": "this.hostClasses", "class.k-numerictextbox": "this.hostClasses" } }, providers: [
4567
+ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", title: "title", autoCorrect: "autoCorrect", format: "format", max: "max", min: "min", decimals: "decimals", placeholder: "placeholder", step: "step", spinners: "spinners", rangeValidation: "rangeValidation", tabindex: "tabindex", tabIndex: "tabIndex", changeValueOnScroll: "changeValueOnScroll", selectOnFocus: "selectOnFocus", value: "value", maxlength: "maxlength", size: "size", rounded: "rounded", fillMode: "fillMode", inputAttributes: "inputAttributes" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur" }, host: { properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-disabled": "this.disableClass", "class.k-input": "this.hostClasses", "class.k-numerictextbox": "this.hostClasses" } }, providers: [
4517
4568
  LocalizationService,
4518
4569
  { provide: L10N_PREFIX, useValue: 'kendo.numerictextbox' },
4519
4570
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NumericTextBoxComponent), multi: true },
@@ -4539,9 +4590,9 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4539
4590
  </ng-template>
4540
4591
  </span>
4541
4592
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
4542
- <input
4543
- role="spinbutton"
4593
+ <input #numericInput
4544
4594
  class="k-input-inner"
4595
+ role="spinbutton"
4545
4596
  autocomplete="off"
4546
4597
  autocorrect="off"
4547
4598
  [id]="focusableId"
@@ -4551,10 +4602,11 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4551
4602
  [attr.title]="title"
4552
4603
  [attr.placeholder]="placeholder"
4553
4604
  [attr.maxLength]="maxlength"
4554
- [attr.aria-invalid]="isControlInvalid"
4555
4605
  [tabindex]="tabIndex"
4556
4606
  [disabled]="disabled"
4557
4607
  [readonly]="readonly"
4608
+ [attr.aria-invalid]="isControlInvalid"
4609
+ [attr.required]="isControlRequired ? '' : null"
4558
4610
  [kendoEventsOutsideAngular]="{
4559
4611
  mousedown: handleMouseDown,
4560
4612
  dragenter: handleDragEnter,
@@ -4563,8 +4615,7 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4563
4615
  focus: handleInputFocus,
4564
4616
  blur: handleInputBlur,
4565
4617
  paste: handlePaste
4566
- }"
4567
- #numericInput />
4618
+ }"/>
4568
4619
  <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
4569
4620
  <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
4570
4621
  <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
@@ -4643,9 +4694,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4643
4694
  </ng-template>
4644
4695
  </span>
4645
4696
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
4646
- <input
4647
- role="spinbutton"
4697
+ <input #numericInput
4648
4698
  class="k-input-inner"
4699
+ role="spinbutton"
4649
4700
  autocomplete="off"
4650
4701
  autocorrect="off"
4651
4702
  [id]="focusableId"
@@ -4655,10 +4706,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4655
4706
  [attr.title]="title"
4656
4707
  [attr.placeholder]="placeholder"
4657
4708
  [attr.maxLength]="maxlength"
4658
- [attr.aria-invalid]="isControlInvalid"
4659
4709
  [tabindex]="tabIndex"
4660
4710
  [disabled]="disabled"
4661
4711
  [readonly]="readonly"
4712
+ [attr.aria-invalid]="isControlInvalid"
4713
+ [attr.required]="isControlRequired ? '' : null"
4662
4714
  [kendoEventsOutsideAngular]="{
4663
4715
  mousedown: handleMouseDown,
4664
4716
  dragenter: handleDragEnter,
@@ -4667,8 +4719,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4667
4719
  focus: handleInputFocus,
4668
4720
  blur: handleInputBlur,
4669
4721
  paste: handlePaste
4670
- }"
4671
- #numericInput />
4722
+ }"/>
4672
4723
  <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
4673
4724
  <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
4674
4725
  <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
@@ -4763,6 +4814,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4763
4814
  type: Input
4764
4815
  }], fillMode: [{
4765
4816
  type: Input
4817
+ }], inputAttributes: [{
4818
+ type: Input
4766
4819
  }], valueChange: [{
4767
4820
  type: Output
4768
4821
  }], onFocus: [{
@@ -5406,6 +5459,7 @@ class MaskedTextBoxComponent {
5406
5459
  this._size = 'medium';
5407
5460
  this._rounded = 'medium';
5408
5461
  this._fillMode = 'solid';
5462
+ this.parsedAttributes = {};
5409
5463
  /**
5410
5464
  * @hidden
5411
5465
  */
@@ -5555,6 +5609,43 @@ class MaskedTextBoxComponent {
5555
5609
  get tabIndex() {
5556
5610
  return this.tabindex;
5557
5611
  }
5612
+ /**
5613
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
5614
+ */
5615
+ set inputAttributes(attributes) {
5616
+ if (isObjectPresent(this.parsedAttributes)) {
5617
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
5618
+ }
5619
+ this._inputAttributes = attributes;
5620
+ this.parsedAttributes = this.inputAttributes ?
5621
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
5622
+ this.inputAttributes;
5623
+ this.setInputAttributes();
5624
+ }
5625
+ get inputAttributes() {
5626
+ return this._inputAttributes;
5627
+ }
5628
+ get defaultAttributes() {
5629
+ return {
5630
+ id: this.focusableId,
5631
+ disabled: this.disabled ? '' : null,
5632
+ readonly: this.readonly ? '' : null,
5633
+ tabindex: this.tabIndex,
5634
+ 'aria-placeholder': this.mask,
5635
+ 'aria-invalid': this.isControlInvalid,
5636
+ title: this.title,
5637
+ required: this.isControlRequired ? '' : null
5638
+ };
5639
+ }
5640
+ get mutableAttributes() {
5641
+ return {
5642
+ autocomplete: 'off',
5643
+ autocorrect: 'off',
5644
+ autocapitalize: 'off',
5645
+ spellcheck: 'false'
5646
+ };
5647
+ }
5648
+ ;
5558
5649
  get hostDisabledClass() {
5559
5650
  return this.disabled;
5560
5651
  }
@@ -5737,6 +5828,12 @@ class MaskedTextBoxComponent {
5737
5828
  get isControlInvalid() {
5738
5829
  return this.control && this.control.touched && this.control.invalid;
5739
5830
  }
5831
+ /**
5832
+ * @hidden
5833
+ */
5834
+ get isControlRequired() {
5835
+ return isControlRequired(this.control?.control);
5836
+ }
5740
5837
  /**
5741
5838
  * @hidden
5742
5839
  */
@@ -5841,9 +5938,13 @@ class MaskedTextBoxComponent {
5841
5938
  this.renderer.addClass(elem, classes.toAdd);
5842
5939
  }
5843
5940
  }
5941
+ setInputAttributes() {
5942
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
5943
+ setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement);
5944
+ }
5844
5945
  }
5845
5946
  MaskedTextBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MaskedTextBoxComponent, deps: [{ token: MaskingService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5846
- MaskedTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MaskedTextBoxComponent, selector: "kendo-maskedtextbox", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", title: "title", size: "size", rounded: "rounded", fillMode: "fillMode", mask: "mask", value: "value", rules: "rules", prompt: "prompt", promptPlaceholder: "promptPlaceholder", includeLiterals: "includeLiterals", maskOnFocus: "maskOnFocus", maskValidation: "maskValidation", tabindex: "tabindex", tabIndex: "tabIndex" }, outputs: { onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur", valueChange: "valueChange" }, host: { listeners: { "paste": "pasteHandler($event)", "input": "inputHandler($event)" }, properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-input": "this.hostClasses", "class.k-maskedtextbox": "this.hostClasses", "class.k-disabled": "this.hostDisabledClass" } }, providers: [
5947
+ MaskedTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MaskedTextBoxComponent, selector: "kendo-maskedtextbox", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", title: "title", size: "size", rounded: "rounded", fillMode: "fillMode", mask: "mask", value: "value", rules: "rules", prompt: "prompt", promptPlaceholder: "promptPlaceholder", includeLiterals: "includeLiterals", maskOnFocus: "maskOnFocus", maskValidation: "maskValidation", tabindex: "tabindex", tabIndex: "tabIndex", inputAttributes: "inputAttributes" }, outputs: { onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur", valueChange: "valueChange" }, host: { listeners: { "paste": "pasteHandler($event)", "input": "inputHandler($event)" }, properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-input": "this.hostClasses", "class.k-maskedtextbox": "this.hostClasses", "class.k-disabled": "this.hostDisabledClass" } }, providers: [
5847
5948
  MaskingService,
5848
5949
  {
5849
5950
  multi: true,
@@ -5872,18 +5973,18 @@ MaskedTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
5872
5973
  </ng-template>
5873
5974
  </span>
5874
5975
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
5875
- <input type="text"
5876
- #input
5976
+ <input #input
5977
+ class="k-input-inner"
5877
5978
  autocomplete="off"
5878
5979
  autocorrect="off"
5879
5980
  autocapitalize="off"
5880
5981
  spellcheck="false"
5881
- class="k-input-inner"
5882
5982
  [id]="focusableId"
5883
5983
  [tabindex]="tabIndex"
5884
5984
  [attr.title]="title"
5885
5985
  [attr.aria-placeholder]="mask"
5886
5986
  [attr.aria-invalid]="isControlInvalid"
5987
+ [attr.required]="isControlRequired ? '' : null"
5887
5988
  [disabled]="disabled"
5888
5989
  [readonly]="readonly"
5889
5990
  [kendoEventsOutsideAngular]="{
@@ -5936,18 +6037,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
5936
6037
  </ng-template>
5937
6038
  </span>
5938
6039
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
5939
- <input type="text"
5940
- #input
6040
+ <input #input
6041
+ class="k-input-inner"
5941
6042
  autocomplete="off"
5942
6043
  autocorrect="off"
5943
6044
  autocapitalize="off"
5944
6045
  spellcheck="false"
5945
- class="k-input-inner"
5946
6046
  [id]="focusableId"
5947
6047
  [tabindex]="tabIndex"
5948
6048
  [attr.title]="title"
5949
6049
  [attr.aria-placeholder]="mask"
5950
6050
  [attr.aria-invalid]="isControlInvalid"
6051
+ [attr.required]="isControlRequired ? '' : null"
5951
6052
  [disabled]="disabled"
5952
6053
  [readonly]="readonly"
5953
6054
  [kendoEventsOutsideAngular]="{
@@ -6008,6 +6109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
6008
6109
  type: Input
6009
6110
  }], tabIndex: [{
6010
6111
  type: Input
6112
+ }], inputAttributes: [{
6113
+ type: Input
6011
6114
  }], onFocus: [{
6012
6115
  type: Output,
6013
6116
  args: ['focus']
@@ -6821,6 +6924,7 @@ class TextBoxComponent {
6821
6924
  this._size = 'medium';
6822
6925
  this._rounded = 'medium';
6823
6926
  this._fillMode = 'solid';
6927
+ this.parsedAttributes = {};
6824
6928
  /**
6825
6929
  * @hidden
6826
6930
  */
@@ -6937,9 +7041,39 @@ class TextBoxComponent {
6937
7041
  get tabIndex() {
6938
7042
  return this.tabindex;
6939
7043
  }
7044
+ /**
7045
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
7046
+ */
7047
+ set inputAttributes(attributes) {
7048
+ if (isObjectPresent(this.parsedAttributes)) {
7049
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
7050
+ }
7051
+ this._inputAttributes = attributes;
7052
+ this.parsedAttributes = this.inputAttributes ?
7053
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
7054
+ this.inputAttributes;
7055
+ this.setInputAttributes();
7056
+ }
7057
+ get inputAttributes() {
7058
+ return this._inputAttributes;
7059
+ }
6940
7060
  get disabledClass() {
6941
7061
  return this.disabled;
6942
7062
  }
7063
+ get defaultAttributes() {
7064
+ return {
7065
+ id: this.focusableId,
7066
+ disabled: this.disabled ? '' : null,
7067
+ readonly: this.readonly ? '' : null,
7068
+ tabindex: this.disabled ? undefined : this.tabindex,
7069
+ type: this.type,
7070
+ placeholder: this.placeholder,
7071
+ title: this.title,
7072
+ maxlength: this.maxlength,
7073
+ 'aria-invalid': this.isControlInvalid,
7074
+ required: this.isControlRequired ? '' : null
7075
+ };
7076
+ }
6943
7077
  ngOnInit() {
6944
7078
  this.control = this.injector.get(NgControl, null);
6945
7079
  this.checkClearButton();
@@ -7181,6 +7315,12 @@ class TextBoxComponent {
7181
7315
  this._isFocused = value;
7182
7316
  }
7183
7317
  }
7318
+ /**
7319
+ * @hidden
7320
+ */
7321
+ get isControlRequired() {
7322
+ return isControlRequired(this.control?.control);
7323
+ }
7184
7324
  setSelection(start, end) {
7185
7325
  if (this.isFocused) {
7186
7326
  invokeElementMethod(this.input, 'setSelectionRange', start, end);
@@ -7238,9 +7378,12 @@ class TextBoxComponent {
7238
7378
  this.prefix = this.textBoxPrefixTemplate.first || this.prefixTemplate;
7239
7379
  this.suffix = this.textBoxSuffixTemplate.first || this.suffixTemplate;
7240
7380
  }
7381
+ setInputAttributes() {
7382
+ setHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
7383
+ }
7241
7384
  }
7242
7385
  TextBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
7243
- TextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxComponent, selector: "kendo-textbox", inputs: { focusableId: "focusableId", title: "title", type: "type", disabled: "disabled", readonly: "readonly", tabindex: "tabindex", value: "value", selectOnFocus: "selectOnFocus", showSuccessIcon: "showSuccessIcon", showErrorIcon: "showErrorIcon", clearButton: "clearButton", successIcon: "successIcon", successSvgIcon: "successSvgIcon", errorIcon: "errorIcon", errorSvgIcon: "errorSvgIcon", clearButtonIcon: "clearButtonIcon", clearButtonSvgIcon: "clearButtonSvgIcon", size: "size", rounded: "rounded", fillMode: "fillMode", tabIndex: "tabIndex", placeholder: "placeholder", maxlength: "maxlength" }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-disabled": "this.disabledClass", "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "attr.dir": "this.direction" } }, providers: [
7386
+ TextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxComponent, selector: "kendo-textbox", inputs: { focusableId: "focusableId", title: "title", type: "type", disabled: "disabled", readonly: "readonly", tabindex: "tabindex", value: "value", selectOnFocus: "selectOnFocus", showSuccessIcon: "showSuccessIcon", showErrorIcon: "showErrorIcon", clearButton: "clearButton", successIcon: "successIcon", successSvgIcon: "successSvgIcon", errorIcon: "errorIcon", errorSvgIcon: "errorSvgIcon", clearButtonIcon: "clearButtonIcon", clearButtonSvgIcon: "clearButtonSvgIcon", size: "size", rounded: "rounded", fillMode: "fillMode", tabIndex: "tabIndex", placeholder: "placeholder", maxlength: "maxlength", inputAttributes: "inputAttributes" }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-disabled": "this.disabledClass", "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "attr.dir": "this.direction" } }, providers: [
7244
7387
  LocalizationService,
7245
7388
  { provide: L10N_PREFIX, useValue: 'kendo.textbox' },
7246
7389
  {
@@ -7279,6 +7422,7 @@ TextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
7279
7422
  [attr.title]="title"
7280
7423
  [attr.maxlength]="maxlength"
7281
7424
  [attr.aria-invalid]="isControlInvalid"
7425
+ [attr.required]="isControlRequired ? '' : null"
7282
7426
  [kendoEventsOutsideAngular]="{
7283
7427
  focus: handleInputFocus,
7284
7428
  blur: handleInputBlur,
@@ -7370,6 +7514,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
7370
7514
  [attr.title]="title"
7371
7515
  [attr.maxlength]="maxlength"
7372
7516
  [attr.aria-invalid]="isControlInvalid"
7517
+ [attr.required]="isControlRequired ? '' : null"
7373
7518
  [kendoEventsOutsideAngular]="{
7374
7519
  focus: handleInputFocus,
7375
7520
  blur: handleInputBlur,
@@ -7466,6 +7611,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
7466
7611
  type: Input
7467
7612
  }], maxlength: [{
7468
7613
  type: Input
7614
+ }], inputAttributes: [{
7615
+ type: Input
7469
7616
  }], valueChange: [{
7470
7617
  type: Output
7471
7618
  }], inputFocus: [{
@@ -7977,6 +8124,7 @@ class TextAreaComponent extends TextFieldsBase {
7977
8124
  this._rounded = 'medium';
7978
8125
  this._fillMode = 'solid';
7979
8126
  this._adornmentsOrientation = 'horizontal';
8127
+ this.parsedAttributes = {};
7980
8128
  /**
7981
8129
  * @hidden
7982
8130
  */
@@ -8036,6 +8184,22 @@ class TextAreaComponent extends TextFieldsBase {
8036
8184
  get flow() {
8037
8185
  return this._flow;
8038
8186
  }
8187
+ /**
8188
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
8189
+ */
8190
+ set inputAttributes(attributes) {
8191
+ if (isObjectPresent(this.parsedAttributes)) {
8192
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
8193
+ }
8194
+ this._inputAttributes = attributes;
8195
+ this.parsedAttributes = this.inputAttributes ?
8196
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
8197
+ this.inputAttributes;
8198
+ this.setInputAttributes();
8199
+ }
8200
+ get inputAttributes() {
8201
+ return this._inputAttributes;
8202
+ }
8039
8203
  /**
8040
8204
  * Specifies the orientation of the TextArea adornments. This property is used in order to specify
8041
8205
  * the adornments' position relative to themselves.
@@ -8119,6 +8283,29 @@ class TextAreaComponent extends TextFieldsBase {
8119
8283
  get fillMode() {
8120
8284
  return this._fillMode;
8121
8285
  }
8286
+ get defaultAttributes() {
8287
+ return {
8288
+ id: this.focusableId,
8289
+ disabled: this.disabled ? '' : null,
8290
+ readonly: this.readonly ? '' : null,
8291
+ tabindex: this.disabled ? undefined : this.tabIndex,
8292
+ placeholder: this.placeholder,
8293
+ title: this.title,
8294
+ maxlength: this.maxlength,
8295
+ rows: this.rows,
8296
+ cols: this.cols,
8297
+ 'aria-disabled': this.disabled ? true : undefined,
8298
+ 'aria-readonly': this.readonly ? true : undefined,
8299
+ 'aria-invalid': this.isControlInvalid,
8300
+ required: this.isControlRequired ? '' : null
8301
+ };
8302
+ }
8303
+ get mutableAttributes() {
8304
+ return {
8305
+ 'aria-multiline': 'true'
8306
+ };
8307
+ }
8308
+ ;
8122
8309
  ngAfterViewInit() {
8123
8310
  this.ngZone.runOutsideAngular(() => {
8124
8311
  this.handleFlow();
@@ -8217,6 +8404,12 @@ class TextAreaComponent extends TextFieldsBase {
8217
8404
  get isControlInvalid() {
8218
8405
  return this.control && this.control.touched && !this.control.valid;
8219
8406
  }
8407
+ /**
8408
+ * @hidden
8409
+ */
8410
+ get isControlRequired() {
8411
+ return isControlRequired(this.control?.control);
8412
+ }
8220
8413
  /**
8221
8414
  * @hidden
8222
8415
  */
@@ -8346,9 +8539,13 @@ class TextAreaComponent extends TextFieldsBase {
8346
8539
  const element = this.input.nativeElement;
8347
8540
  this.renderer[isVertical ? 'addClass' : 'removeClass'](element, '\!k-flex-none');
8348
8541
  }
8542
+ setInputAttributes() {
8543
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
8544
+ setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement);
8545
+ }
8349
8546
  }
8350
8547
  TextAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.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 });
8351
- TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TextAreaComponent, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", 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: [
8548
+ TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TextAreaComponent, 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: [
8352
8549
  LocalizationService,
8353
8550
  { provide: L10N_PREFIX, useValue: 'kendo.textarea' },
8354
8551
  {
@@ -8370,14 +8567,15 @@ TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
8370
8567
  *ngIf="prefix && showPrefixSeparator"
8371
8568
  [orientation]="separatorOrientation"
8372
8569
  ></kendo-input-separator>
8373
- <textarea
8374
- #input
8570
+ <textarea #input
8571
+ class="k-input-inner !k-overflow-auto"
8375
8572
  [attr.aria-multiline]="true"
8376
8573
  [attr.aria-disabled]="disabled ? true : undefined"
8377
8574
  [attr.aria-readonly]="readonly ? true : undefined"
8378
- class="k-input-inner !k-overflow-auto"
8379
- [ngClass]="resizableClass"
8575
+ [attr.aria-invalid]="isControlInvalid"
8380
8576
  [id]="focusableId"
8577
+ [attr.required]="isControlRequired ? '' : null"
8578
+ [ngClass]="resizableClass"
8381
8579
  [value]="value"
8382
8580
  [attr.placeholder]="placeholder"
8383
8581
  [disabled]="disabled"
@@ -8428,14 +8626,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8428
8626
  *ngIf="prefix && showPrefixSeparator"
8429
8627
  [orientation]="separatorOrientation"
8430
8628
  ></kendo-input-separator>
8431
- <textarea
8432
- #input
8629
+ <textarea #input
8630
+ class="k-input-inner !k-overflow-auto"
8433
8631
  [attr.aria-multiline]="true"
8434
8632
  [attr.aria-disabled]="disabled ? true : undefined"
8435
8633
  [attr.aria-readonly]="readonly ? true : undefined"
8436
- class="k-input-inner !k-overflow-auto"
8437
- [ngClass]="resizableClass"
8634
+ [attr.aria-invalid]="isControlInvalid"
8438
8635
  [id]="focusableId"
8636
+ [attr.required]="isControlRequired ? '' : null"
8637
+ [ngClass]="resizableClass"
8439
8638
  [value]="value"
8440
8639
  [attr.placeholder]="placeholder"
8441
8640
  [disabled]="disabled"
@@ -8475,6 +8674,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8475
8674
  args: ['class.\!k-flex-row']
8476
8675
  }], flow: [{
8477
8676
  type: Input
8677
+ }], inputAttributes: [{
8678
+ type: Input
8478
8679
  }], adornmentsOrientation: [{
8479
8680
  type: Input
8480
8681
  }], rows: [{
@@ -9402,7 +9603,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9402
9603
  <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
9403
9604
  </div>
9404
9605
  </ng-container>
9405
- `, isInline: true, components: [{ type: i2.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: NumericLabelDirective, selector: "[kendoAdditionalNumericLabel]", inputs: ["kendoAdditionalNumericLabel", "localizationService"] }] });
9606
+ `, isInline: true, components: [{ type: i2.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: NumericLabelDirective, selector: "[kendoAdditionalNumericLabel]", inputs: ["kendoAdditionalNumericLabel", "localizationService"] }] });
9406
9607
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColorInputComponent, decorators: [{
9407
9608
  type: Component,
9408
9609
  args: [{
@@ -145,6 +145,17 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
145
145
  */
146
146
  set tabIndex(tabIndex: number);
147
147
  get tabIndex(): number;
148
+ /**
149
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
150
+ */
151
+ set inputAttributes(attributes: {
152
+ [key: string]: string;
153
+ });
154
+ get inputAttributes(): {
155
+ [key: string]: string;
156
+ };
157
+ private get defaultAttributes();
158
+ private get mutableAttributes();
148
159
  /**
149
160
  * Fires each time the user focuses the MaskedTextBox component.
150
161
  *
@@ -225,6 +236,8 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
225
236
  private _size;
226
237
  private _rounded;
227
238
  private _fillMode;
239
+ private _inputAttributes;
240
+ private parsedAttributes;
228
241
  constructor(service: MaskingService, renderer: Renderer2, hostElement: ElementRef, ngZone: NgZone, injector: Injector, changeDetector: ChangeDetectorRef, rtl: boolean);
229
242
  ngOnInit(): void;
230
243
  ngAfterViewInit(): void;
@@ -320,6 +333,10 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
320
333
  * @hidden
321
334
  */
322
335
  get isControlInvalid(): boolean;
336
+ /**
337
+ * @hidden
338
+ */
339
+ get isControlRequired(): boolean;
323
340
  /**
324
341
  * @hidden
325
342
  */
@@ -343,6 +360,7 @@ export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnC
343
360
  set focused(value: boolean);
344
361
  private normalizeValue;
345
362
  private handleClasses;
363
+ private setInputAttributes;
346
364
  static ɵfac: i0.ɵɵFactoryDeclaration<MaskedTextBoxComponent, [null, null, null, null, null, null, { optional: true; }]>;
347
- static ɵcmp: i0.ɵɵComponentDeclaration<MaskedTextBoxComponent, "kendo-maskedtextbox", ["kendoMaskedTextBox"], { "focusableId": "focusableId"; "disabled": "disabled"; "readonly": "readonly"; "title": "title"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "mask": "mask"; "value": "value"; "rules": "rules"; "prompt": "prompt"; "promptPlaceholder": "promptPlaceholder"; "includeLiterals": "includeLiterals"; "maskOnFocus": "maskOnFocus"; "maskValidation": "maskValidation"; "tabindex": "tabindex"; "tabIndex": "tabIndex"; }, { "onFocus": "focus"; "onBlur": "blur"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "valueChange": "valueChange"; }, ["suffixTemplate", "prefixTemplate"], never>;
365
+ static ɵcmp: i0.ɵɵComponentDeclaration<MaskedTextBoxComponent, "kendo-maskedtextbox", ["kendoMaskedTextBox"], { "focusableId": "focusableId"; "disabled": "disabled"; "readonly": "readonly"; "title": "title"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "mask": "mask"; "value": "value"; "rules": "rules"; "prompt": "prompt"; "promptPlaceholder": "promptPlaceholder"; "includeLiterals": "includeLiterals"; "maskOnFocus": "maskOnFocus"; "maskValidation": "maskValidation"; "tabindex": "tabindex"; "tabIndex": "tabIndex"; "inputAttributes": "inputAttributes"; }, { "onFocus": "focus"; "onBlur": "blur"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "valueChange": "valueChange"; }, ["suffixTemplate", "prefixTemplate"], never>;
348
366
  }