@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, dropletSliderIcon, paletteIcon, dropletSlashIcon, caretAltExpandIcon, xCircleIcon, hyperlinkOpenIcon, starIcon, starOutlineIcon } from '@progress/kendo-svg-icons';
@@ -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: 1712142368,
542
- version: '15.4.0',
541
+ publishDate: 1712152346,
542
+ version: '15.5.0-develop.1',
543
543
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
544
544
  };
545
545
 
@@ -3767,6 +3767,7 @@ class NumericTextBoxComponent {
3767
3767
  this.ngTouched = noop$1;
3768
3768
  this.ngValidatorChange = noop$1;
3769
3769
  this.domEvents = [];
3770
+ this.parsedAttributes = {};
3770
3771
  /**
3771
3772
  * @hidden
3772
3773
  */
@@ -4025,9 +4026,49 @@ class NumericTextBoxComponent {
4025
4026
  get fillMode() {
4026
4027
  return this._fillMode;
4027
4028
  }
4029
+ /**
4030
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
4031
+ */
4032
+ set inputAttributes(attributes) {
4033
+ if (isObjectPresent(this.parsedAttributes)) {
4034
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.numericInput.nativeElement);
4035
+ }
4036
+ this._inputAttributes = attributes;
4037
+ this.parsedAttributes = this.inputAttributes ?
4038
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
4039
+ this.inputAttributes;
4040
+ this.setInputAttributes();
4041
+ }
4042
+ get inputAttributes() {
4043
+ return this._inputAttributes;
4044
+ }
4028
4045
  get disableClass() {
4029
4046
  return this.disabled;
4030
4047
  }
4048
+ get defaultAttributes() {
4049
+ return {
4050
+ id: this.focusableId,
4051
+ disabled: this.disabled ? '' : null,
4052
+ readonly: this.readonly ? '' : null,
4053
+ tabindex: this.tabIndex,
4054
+ placeholder: this.placeholder,
4055
+ title: this.title,
4056
+ maxlength: this.maxlength,
4057
+ 'aria-valuemin': this.min,
4058
+ 'aria-valuemax': this.max,
4059
+ 'aria-valuenow': this.value,
4060
+ required: this.isControlRequired ? '' : null,
4061
+ 'aria-invalid': this.isControlInvalid
4062
+ };
4063
+ }
4064
+ get mutableAttributes() {
4065
+ return {
4066
+ autocomplete: 'off',
4067
+ autocorrect: 'off',
4068
+ role: 'spinbutton'
4069
+ };
4070
+ }
4071
+ ;
4031
4072
  ngOnInit() {
4032
4073
  this.subscriptions = this.localizationService
4033
4074
  .changes
@@ -4188,6 +4229,13 @@ class NumericTextBoxComponent {
4188
4229
  get isControlInvalid() {
4189
4230
  return this.control && this.control.touched && !this.control.valid;
4190
4231
  }
4232
+ /**
4233
+ * @hidden
4234
+ */
4235
+ get isControlRequired() {
4236
+ var _a;
4237
+ return isControlRequired((_a = this.control) === null || _a === void 0 ? void 0 : _a.control);
4238
+ }
4191
4239
  /**
4192
4240
  * @hidden
4193
4241
  */
@@ -4518,9 +4566,13 @@ class NumericTextBoxComponent {
4518
4566
  this.renderer.addClass(elem, classes.toAdd);
4519
4567
  }
4520
4568
  }
4569
+ setInputAttributes() {
4570
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
4571
+ setHTMLAttributes(attributesToRender, this.renderer, this.numericInput.nativeElement);
4572
+ }
4521
4573
  }
4522
4574
  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 });
4523
- 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: [
4575
+ 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: [
4524
4576
  LocalizationService,
4525
4577
  { provide: L10N_PREFIX, useValue: 'kendo.numerictextbox' },
4526
4578
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NumericTextBoxComponent), multi: true },
@@ -4546,9 +4598,9 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4546
4598
  </ng-template>
4547
4599
  </span>
4548
4600
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
4549
- <input
4550
- role="spinbutton"
4601
+ <input #numericInput
4551
4602
  class="k-input-inner"
4603
+ role="spinbutton"
4552
4604
  autocomplete="off"
4553
4605
  autocorrect="off"
4554
4606
  [id]="focusableId"
@@ -4558,10 +4610,11 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4558
4610
  [attr.title]="title"
4559
4611
  [attr.placeholder]="placeholder"
4560
4612
  [attr.maxLength]="maxlength"
4561
- [attr.aria-invalid]="isControlInvalid"
4562
4613
  [tabindex]="tabIndex"
4563
4614
  [disabled]="disabled"
4564
4615
  [readonly]="readonly"
4616
+ [attr.aria-invalid]="isControlInvalid"
4617
+ [attr.required]="isControlRequired ? '' : null"
4565
4618
  [kendoEventsOutsideAngular]="{
4566
4619
  mousedown: handleMouseDown,
4567
4620
  dragenter: handleDragEnter,
@@ -4570,8 +4623,7 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
4570
4623
  focus: handleInputFocus,
4571
4624
  blur: handleInputBlur,
4572
4625
  paste: handlePaste
4573
- }"
4574
- #numericInput />
4626
+ }"/>
4575
4627
  <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
4576
4628
  <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
4577
4629
  <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
@@ -4650,9 +4702,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4650
4702
  </ng-template>
4651
4703
  </span>
4652
4704
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
4653
- <input
4654
- role="spinbutton"
4705
+ <input #numericInput
4655
4706
  class="k-input-inner"
4707
+ role="spinbutton"
4656
4708
  autocomplete="off"
4657
4709
  autocorrect="off"
4658
4710
  [id]="focusableId"
@@ -4662,10 +4714,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4662
4714
  [attr.title]="title"
4663
4715
  [attr.placeholder]="placeholder"
4664
4716
  [attr.maxLength]="maxlength"
4665
- [attr.aria-invalid]="isControlInvalid"
4666
4717
  [tabindex]="tabIndex"
4667
4718
  [disabled]="disabled"
4668
4719
  [readonly]="readonly"
4720
+ [attr.aria-invalid]="isControlInvalid"
4721
+ [attr.required]="isControlRequired ? '' : null"
4669
4722
  [kendoEventsOutsideAngular]="{
4670
4723
  mousedown: handleMouseDown,
4671
4724
  dragenter: handleDragEnter,
@@ -4674,8 +4727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4674
4727
  focus: handleInputFocus,
4675
4728
  blur: handleInputBlur,
4676
4729
  paste: handlePaste
4677
- }"
4678
- #numericInput />
4730
+ }"/>
4679
4731
  <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
4680
4732
  <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
4681
4733
  <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
@@ -4770,6 +4822,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4770
4822
  type: Input
4771
4823
  }], fillMode: [{
4772
4824
  type: Input
4825
+ }], inputAttributes: [{
4826
+ type: Input
4773
4827
  }], valueChange: [{
4774
4828
  type: Output
4775
4829
  }], onFocus: [{
@@ -5413,6 +5467,7 @@ class MaskedTextBoxComponent {
5413
5467
  this._size = 'medium';
5414
5468
  this._rounded = 'medium';
5415
5469
  this._fillMode = 'solid';
5470
+ this.parsedAttributes = {};
5416
5471
  /**
5417
5472
  * @hidden
5418
5473
  */
@@ -5562,6 +5617,43 @@ class MaskedTextBoxComponent {
5562
5617
  get tabIndex() {
5563
5618
  return this.tabindex;
5564
5619
  }
5620
+ /**
5621
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
5622
+ */
5623
+ set inputAttributes(attributes) {
5624
+ if (isObjectPresent(this.parsedAttributes)) {
5625
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
5626
+ }
5627
+ this._inputAttributes = attributes;
5628
+ this.parsedAttributes = this.inputAttributes ?
5629
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
5630
+ this.inputAttributes;
5631
+ this.setInputAttributes();
5632
+ }
5633
+ get inputAttributes() {
5634
+ return this._inputAttributes;
5635
+ }
5636
+ get defaultAttributes() {
5637
+ return {
5638
+ id: this.focusableId,
5639
+ disabled: this.disabled ? '' : null,
5640
+ readonly: this.readonly ? '' : null,
5641
+ tabindex: this.tabIndex,
5642
+ 'aria-placeholder': this.mask,
5643
+ 'aria-invalid': this.isControlInvalid,
5644
+ title: this.title,
5645
+ required: this.isControlRequired ? '' : null
5646
+ };
5647
+ }
5648
+ get mutableAttributes() {
5649
+ return {
5650
+ autocomplete: 'off',
5651
+ autocorrect: 'off',
5652
+ autocapitalize: 'off',
5653
+ spellcheck: 'false'
5654
+ };
5655
+ }
5656
+ ;
5565
5657
  get hostDisabledClass() {
5566
5658
  return this.disabled;
5567
5659
  }
@@ -5744,6 +5836,13 @@ class MaskedTextBoxComponent {
5744
5836
  get isControlInvalid() {
5745
5837
  return this.control && this.control.touched && this.control.invalid;
5746
5838
  }
5839
+ /**
5840
+ * @hidden
5841
+ */
5842
+ get isControlRequired() {
5843
+ var _a;
5844
+ return isControlRequired((_a = this.control) === null || _a === void 0 ? void 0 : _a.control);
5845
+ }
5747
5846
  /**
5748
5847
  * @hidden
5749
5848
  */
@@ -5848,9 +5947,13 @@ class MaskedTextBoxComponent {
5848
5947
  this.renderer.addClass(elem, classes.toAdd);
5849
5948
  }
5850
5949
  }
5950
+ setInputAttributes() {
5951
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
5952
+ setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement);
5953
+ }
5851
5954
  }
5852
5955
  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 });
5853
- 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: [
5956
+ 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: [
5854
5957
  MaskingService,
5855
5958
  {
5856
5959
  multi: true,
@@ -5879,18 +5982,18 @@ MaskedTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
5879
5982
  </ng-template>
5880
5983
  </span>
5881
5984
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
5882
- <input type="text"
5883
- #input
5985
+ <input #input
5986
+ class="k-input-inner"
5884
5987
  autocomplete="off"
5885
5988
  autocorrect="off"
5886
5989
  autocapitalize="off"
5887
5990
  spellcheck="false"
5888
- class="k-input-inner"
5889
5991
  [id]="focusableId"
5890
5992
  [tabindex]="tabIndex"
5891
5993
  [attr.title]="title"
5892
5994
  [attr.aria-placeholder]="mask"
5893
5995
  [attr.aria-invalid]="isControlInvalid"
5996
+ [attr.required]="isControlRequired ? '' : null"
5894
5997
  [disabled]="disabled"
5895
5998
  [readonly]="readonly"
5896
5999
  [kendoEventsOutsideAngular]="{
@@ -5943,18 +6046,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
5943
6046
  </ng-template>
5944
6047
  </span>
5945
6048
  <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
5946
- <input type="text"
5947
- #input
6049
+ <input #input
6050
+ class="k-input-inner"
5948
6051
  autocomplete="off"
5949
6052
  autocorrect="off"
5950
6053
  autocapitalize="off"
5951
6054
  spellcheck="false"
5952
- class="k-input-inner"
5953
6055
  [id]="focusableId"
5954
6056
  [tabindex]="tabIndex"
5955
6057
  [attr.title]="title"
5956
6058
  [attr.aria-placeholder]="mask"
5957
6059
  [attr.aria-invalid]="isControlInvalid"
6060
+ [attr.required]="isControlRequired ? '' : null"
5958
6061
  [disabled]="disabled"
5959
6062
  [readonly]="readonly"
5960
6063
  [kendoEventsOutsideAngular]="{
@@ -6017,6 +6120,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
6017
6120
  type: Input
6018
6121
  }], tabIndex: [{
6019
6122
  type: Input
6123
+ }], inputAttributes: [{
6124
+ type: Input
6020
6125
  }], onFocus: [{
6021
6126
  type: Output,
6022
6127
  args: ['focus']
@@ -6834,6 +6939,7 @@ class TextBoxComponent {
6834
6939
  this._size = 'medium';
6835
6940
  this._rounded = 'medium';
6836
6941
  this._fillMode = 'solid';
6942
+ this.parsedAttributes = {};
6837
6943
  /**
6838
6944
  * @hidden
6839
6945
  */
@@ -6950,9 +7056,39 @@ class TextBoxComponent {
6950
7056
  get tabIndex() {
6951
7057
  return this.tabindex;
6952
7058
  }
7059
+ /**
7060
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
7061
+ */
7062
+ set inputAttributes(attributes) {
7063
+ if (isObjectPresent(this.parsedAttributes)) {
7064
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
7065
+ }
7066
+ this._inputAttributes = attributes;
7067
+ this.parsedAttributes = this.inputAttributes ?
7068
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
7069
+ this.inputAttributes;
7070
+ this.setInputAttributes();
7071
+ }
7072
+ get inputAttributes() {
7073
+ return this._inputAttributes;
7074
+ }
6953
7075
  get disabledClass() {
6954
7076
  return this.disabled;
6955
7077
  }
7078
+ get defaultAttributes() {
7079
+ return {
7080
+ id: this.focusableId,
7081
+ disabled: this.disabled ? '' : null,
7082
+ readonly: this.readonly ? '' : null,
7083
+ tabindex: this.disabled ? undefined : this.tabindex,
7084
+ type: this.type,
7085
+ placeholder: this.placeholder,
7086
+ title: this.title,
7087
+ maxlength: this.maxlength,
7088
+ 'aria-invalid': this.isControlInvalid,
7089
+ required: this.isControlRequired ? '' : null
7090
+ };
7091
+ }
6956
7092
  ngOnInit() {
6957
7093
  this.control = this.injector.get(NgControl, null);
6958
7094
  this.checkClearButton();
@@ -7194,6 +7330,13 @@ class TextBoxComponent {
7194
7330
  this._isFocused = value;
7195
7331
  }
7196
7332
  }
7333
+ /**
7334
+ * @hidden
7335
+ */
7336
+ get isControlRequired() {
7337
+ var _a;
7338
+ return isControlRequired((_a = this.control) === null || _a === void 0 ? void 0 : _a.control);
7339
+ }
7197
7340
  setSelection(start, end) {
7198
7341
  if (this.isFocused) {
7199
7342
  invokeElementMethod(this.input, 'setSelectionRange', start, end);
@@ -7251,9 +7394,12 @@ class TextBoxComponent {
7251
7394
  this.prefix = this.textBoxPrefixTemplate.first || this.prefixTemplate;
7252
7395
  this.suffix = this.textBoxSuffixTemplate.first || this.suffixTemplate;
7253
7396
  }
7397
+ setInputAttributes() {
7398
+ setHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
7399
+ }
7254
7400
  }
7255
7401
  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 });
7256
- 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: [
7402
+ 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: [
7257
7403
  LocalizationService,
7258
7404
  { provide: L10N_PREFIX, useValue: 'kendo.textbox' },
7259
7405
  {
@@ -7292,6 +7438,7 @@ TextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
7292
7438
  [attr.title]="title"
7293
7439
  [attr.maxlength]="maxlength"
7294
7440
  [attr.aria-invalid]="isControlInvalid"
7441
+ [attr.required]="isControlRequired ? '' : null"
7295
7442
  [kendoEventsOutsideAngular]="{
7296
7443
  focus: handleInputFocus,
7297
7444
  blur: handleInputBlur,
@@ -7383,6 +7530,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
7383
7530
  [attr.title]="title"
7384
7531
  [attr.maxlength]="maxlength"
7385
7532
  [attr.aria-invalid]="isControlInvalid"
7533
+ [attr.required]="isControlRequired ? '' : null"
7386
7534
  [kendoEventsOutsideAngular]="{
7387
7535
  focus: handleInputFocus,
7388
7536
  blur: handleInputBlur,
@@ -7479,6 +7627,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
7479
7627
  type: Input
7480
7628
  }], maxlength: [{
7481
7629
  type: Input
7630
+ }], inputAttributes: [{
7631
+ type: Input
7482
7632
  }], valueChange: [{
7483
7633
  type: Output
7484
7634
  }], inputFocus: [{
@@ -7990,6 +8140,7 @@ class TextAreaComponent extends TextFieldsBase {
7990
8140
  this._rounded = 'medium';
7991
8141
  this._fillMode = 'solid';
7992
8142
  this._adornmentsOrientation = 'horizontal';
8143
+ this.parsedAttributes = {};
7993
8144
  /**
7994
8145
  * @hidden
7995
8146
  */
@@ -8049,6 +8200,22 @@ class TextAreaComponent extends TextFieldsBase {
8049
8200
  get flow() {
8050
8201
  return this._flow;
8051
8202
  }
8203
+ /**
8204
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
8205
+ */
8206
+ set inputAttributes(attributes) {
8207
+ if (isObjectPresent(this.parsedAttributes)) {
8208
+ removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
8209
+ }
8210
+ this._inputAttributes = attributes;
8211
+ this.parsedAttributes = this.inputAttributes ?
8212
+ parseAttributes(this.inputAttributes, this.defaultAttributes) :
8213
+ this.inputAttributes;
8214
+ this.setInputAttributes();
8215
+ }
8216
+ get inputAttributes() {
8217
+ return this._inputAttributes;
8218
+ }
8052
8219
  /**
8053
8220
  * Specifies the orientation of the TextArea adornments. This property is used in order to specify
8054
8221
  * the adornments' position relative to themselves.
@@ -8132,6 +8299,29 @@ class TextAreaComponent extends TextFieldsBase {
8132
8299
  get fillMode() {
8133
8300
  return this._fillMode;
8134
8301
  }
8302
+ get defaultAttributes() {
8303
+ return {
8304
+ id: this.focusableId,
8305
+ disabled: this.disabled ? '' : null,
8306
+ readonly: this.readonly ? '' : null,
8307
+ tabindex: this.disabled ? undefined : this.tabIndex,
8308
+ placeholder: this.placeholder,
8309
+ title: this.title,
8310
+ maxlength: this.maxlength,
8311
+ rows: this.rows,
8312
+ cols: this.cols,
8313
+ 'aria-disabled': this.disabled ? true : undefined,
8314
+ 'aria-readonly': this.readonly ? true : undefined,
8315
+ 'aria-invalid': this.isControlInvalid,
8316
+ required: this.isControlRequired ? '' : null
8317
+ };
8318
+ }
8319
+ get mutableAttributes() {
8320
+ return {
8321
+ 'aria-multiline': 'true'
8322
+ };
8323
+ }
8324
+ ;
8135
8325
  ngAfterViewInit() {
8136
8326
  this.ngZone.runOutsideAngular(() => {
8137
8327
  this.handleFlow();
@@ -8230,6 +8420,13 @@ class TextAreaComponent extends TextFieldsBase {
8230
8420
  get isControlInvalid() {
8231
8421
  return this.control && this.control.touched && !this.control.valid;
8232
8422
  }
8423
+ /**
8424
+ * @hidden
8425
+ */
8426
+ get isControlRequired() {
8427
+ var _a;
8428
+ return isControlRequired((_a = this.control) === null || _a === void 0 ? void 0 : _a.control);
8429
+ }
8233
8430
  /**
8234
8431
  * @hidden
8235
8432
  */
@@ -8359,9 +8556,13 @@ class TextAreaComponent extends TextFieldsBase {
8359
8556
  const element = this.input.nativeElement;
8360
8557
  this.renderer[isVertical ? 'addClass' : 'removeClass'](element, '\!k-flex-none');
8361
8558
  }
8559
+ setInputAttributes() {
8560
+ const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
8561
+ setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement);
8562
+ }
8362
8563
  }
8363
8564
  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 });
8364
- 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: [
8565
+ 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: [
8365
8566
  LocalizationService,
8366
8567
  { provide: L10N_PREFIX, useValue: 'kendo.textarea' },
8367
8568
  {
@@ -8383,14 +8584,15 @@ TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
8383
8584
  *ngIf="prefix && showPrefixSeparator"
8384
8585
  [orientation]="separatorOrientation"
8385
8586
  ></kendo-input-separator>
8386
- <textarea
8387
- #input
8587
+ <textarea #input
8588
+ class="k-input-inner !k-overflow-auto"
8388
8589
  [attr.aria-multiline]="true"
8389
8590
  [attr.aria-disabled]="disabled ? true : undefined"
8390
8591
  [attr.aria-readonly]="readonly ? true : undefined"
8391
- class="k-input-inner !k-overflow-auto"
8392
- [ngClass]="resizableClass"
8592
+ [attr.aria-invalid]="isControlInvalid"
8393
8593
  [id]="focusableId"
8594
+ [attr.required]="isControlRequired ? '' : null"
8595
+ [ngClass]="resizableClass"
8394
8596
  [value]="value"
8395
8597
  [attr.placeholder]="placeholder"
8396
8598
  [disabled]="disabled"
@@ -8441,14 +8643,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8441
8643
  *ngIf="prefix && showPrefixSeparator"
8442
8644
  [orientation]="separatorOrientation"
8443
8645
  ></kendo-input-separator>
8444
- <textarea
8445
- #input
8646
+ <textarea #input
8647
+ class="k-input-inner !k-overflow-auto"
8446
8648
  [attr.aria-multiline]="true"
8447
8649
  [attr.aria-disabled]="disabled ? true : undefined"
8448
8650
  [attr.aria-readonly]="readonly ? true : undefined"
8449
- class="k-input-inner !k-overflow-auto"
8450
- [ngClass]="resizableClass"
8651
+ [attr.aria-invalid]="isControlInvalid"
8451
8652
  [id]="focusableId"
8653
+ [attr.required]="isControlRequired ? '' : null"
8654
+ [ngClass]="resizableClass"
8452
8655
  [value]="value"
8453
8656
  [attr.placeholder]="placeholder"
8454
8657
  [disabled]="disabled"
@@ -8488,6 +8691,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8488
8691
  args: ['class.\!k-flex-row']
8489
8692
  }], flow: [{
8490
8693
  type: Input
8694
+ }], inputAttributes: [{
8695
+ type: Input
8491
8696
  }], adornmentsOrientation: [{
8492
8697
  type: Input
8493
8698
  }], rows: [{
@@ -9715,7 +9920,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9715
9920
  <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
9716
9921
  </div>
9717
9922
  </ng-container>
9718
- `, 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"] }] });
9923
+ `, 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"] }] });
9719
9924
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColorInputComponent, decorators: [{
9720
9925
  type: Component,
9721
9926
  args: [{