@progress/kendo-angular-inputs 14.4.0-develop.8 → 15.0.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.
Files changed (40) hide show
  1. package/NOTICE.txt +146 -593
  2. package/esm2020/colorpicker/color-input.component.mjs +1 -1
  3. package/esm2020/index.mjs +4 -0
  4. package/esm2020/maskedtextbox/maskedtextbox.component.mjs +144 -56
  5. package/esm2020/maskedtextbox.module.mjs +30 -6
  6. package/esm2020/numerictextbox/numerictextbox.component.mjs +186 -91
  7. package/esm2020/numerictextbox.module.mjs +10 -6
  8. package/esm2020/package-metadata.mjs +2 -2
  9. package/esm2020/shared/input-separator.component.mjs +21 -3
  10. package/esm2020/shared/shared-events.directive.mjs +95 -0
  11. package/esm2020/shared-events.module.mjs +22 -0
  12. package/esm2020/textarea/models/adornments-orientation.mjs +5 -0
  13. package/esm2020/textarea/textarea-prefix.component.mjs +70 -0
  14. package/esm2020/textarea/textarea-suffix.component.mjs +33 -3
  15. package/esm2020/textarea/textarea.component.mjs +198 -131
  16. package/esm2020/textarea.module.mjs +14 -5
  17. package/esm2020/textbox/textbox-prefix.directive.mjs +17 -3
  18. package/esm2020/textbox/textbox-suffix.directive.mjs +17 -3
  19. package/esm2020/textbox/textbox.component.mjs +205 -203
  20. package/esm2020/textbox.module.mjs +9 -5
  21. package/fesm2015/progress-kendo-angular-inputs.mjs +1131 -609
  22. package/fesm2020/progress-kendo-angular-inputs.mjs +1131 -609
  23. package/index.d.ts +6 -0
  24. package/maskedtextbox/maskedtextbox.component.d.ts +37 -6
  25. package/maskedtextbox.module.d.ts +3 -1
  26. package/numerictextbox/numerictextbox.component.d.ts +38 -7
  27. package/numerictextbox.module.d.ts +3 -1
  28. package/package.json +10 -10
  29. package/shared/input-separator.component.d.ts +8 -1
  30. package/shared/shared-events.directive.d.ts +27 -0
  31. package/shared-events.module.d.ts +14 -0
  32. package/textarea/models/adornments-orientation.d.ts +12 -0
  33. package/textarea/textarea-prefix.component.d.ts +37 -0
  34. package/textarea/textarea-suffix.component.d.ts +12 -1
  35. package/textarea/textarea.component.d.ts +62 -6
  36. package/textarea.module.d.ts +9 -7
  37. package/textbox/textbox-prefix.directive.d.ts +9 -1
  38. package/textbox/textbox-suffix.directive.d.ts +9 -1
  39. package/textbox/textbox.component.d.ts +36 -9
  40. package/textbox.module.d.ts +4 -3
@@ -5,9 +5,11 @@
5
5
  import { NgModule } from "@angular/core";
6
6
  import { CommonModule } from "@angular/common";
7
7
  import { TextAreaComponent } from "./textarea/textarea.component";
8
- import { EventsModule } from "@progress/kendo-angular-common";
8
+ import { AdornmentsModule, EventsModule } from "@progress/kendo-angular-common";
9
+ import { TextAreaPrefixComponent } from "./textarea/textarea-prefix.component";
9
10
  import { TextAreaSuffixComponent } from './textarea/textarea-suffix.component';
10
11
  import { SharedModule, SHARED_DIRECTIVES } from './shared.module';
12
+ import { SharedEventsModule } from "./shared-events.module";
11
13
  import * as i0 from "@angular/core";
12
14
  import * as i1 from "./shared/input-separator.component";
13
15
  import * as i2 from "./shared/textarea.directive";
@@ -46,23 +48,30 @@ export class TextAreaModule {
46
48
  }
47
49
  TextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
48
50
  TextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, declarations: [TextAreaComponent,
49
- TextAreaSuffixComponent], imports: [CommonModule, EventsModule, SharedModule], exports: [TextAreaComponent,
51
+ TextAreaPrefixComponent,
52
+ TextAreaSuffixComponent], imports: [CommonModule, EventsModule, SharedModule, AdornmentsModule, SharedEventsModule], exports: [TextAreaComponent,
50
53
  EventsModule,
51
- TextAreaSuffixComponent, i1.InputSeparatorComponent, i2.TextAreaDirective] });
52
- TextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, imports: [[CommonModule, EventsModule, SharedModule], EventsModule] });
54
+ TextAreaPrefixComponent,
55
+ TextAreaSuffixComponent,
56
+ AdornmentsModule, i1.InputSeparatorComponent, i2.TextAreaDirective] });
57
+ TextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, imports: [[CommonModule, EventsModule, SharedModule, AdornmentsModule, SharedEventsModule], EventsModule,
58
+ AdornmentsModule] });
53
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, decorators: [{
54
60
  type: NgModule,
55
61
  args: [{
56
62
  declarations: [
57
63
  TextAreaComponent,
64
+ TextAreaPrefixComponent,
58
65
  TextAreaSuffixComponent
59
66
  ],
60
67
  exports: [
61
68
  TextAreaComponent,
62
69
  EventsModule,
70
+ TextAreaPrefixComponent,
63
71
  TextAreaSuffixComponent,
72
+ AdornmentsModule,
64
73
  SHARED_DIRECTIVES
65
74
  ],
66
- imports: [CommonModule, EventsModule, SharedModule]
75
+ imports: [CommonModule, EventsModule, SharedModule, AdornmentsModule, SharedEventsModule]
67
76
  }]
68
77
  }] });
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 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 { Directive, Optional, TemplateRef } from '@angular/core';
5
+ import { Directive, Input, Optional, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Specifies the adornments in the prefix container ([see examples]({% slug adornments_textbox %}#toc-prefixadornments)).
@@ -24,10 +24,22 @@ import * as i0 from "@angular/core";
24
24
  export class TextBoxPrefixTemplateDirective {
25
25
  constructor(templateRef) {
26
26
  this.templateRef = templateRef;
27
+ this._showSeparator = false;
28
+ }
29
+ /**
30
+ * Sets the `showSeparator` attribute of the `kendoTextBoxPrefixTemplate`.
31
+ *
32
+ * @default false
33
+ */
34
+ set showSeparator(value) {
35
+ this._showSeparator = value;
36
+ }
37
+ get showSeparator() {
38
+ return this._showSeparator;
27
39
  }
28
40
  }
29
41
  TextBoxPrefixTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxPrefixTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
30
- TextBoxPrefixTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", ngImport: i0 });
42
+ TextBoxPrefixTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: { showSeparator: "showSeparator" }, ngImport: i0 });
31
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxPrefixTemplateDirective, decorators: [{
32
44
  type: Directive,
33
45
  args: [{
@@ -35,4 +47,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
35
47
  }]
36
48
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
37
49
  type: Optional
38
- }] }]; } });
50
+ }] }]; }, propDecorators: { showSeparator: [{
51
+ type: Input
52
+ }] } });
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 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 { Directive, Optional, TemplateRef } from '@angular/core';
5
+ import { Directive, Input, Optional, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
@@ -23,10 +23,22 @@ import * as i0 from "@angular/core";
23
23
  export class TextBoxSuffixTemplateDirective {
24
24
  constructor(templateRef) {
25
25
  this.templateRef = templateRef;
26
+ this._showSeparator = false;
27
+ }
28
+ /**
29
+ * Sets the `showSeparator` attribute of the `kendoTextBoxSuffixTemplate`.
30
+ *
31
+ * @default false
32
+ */
33
+ set showSeparator(value) {
34
+ this._showSeparator = value;
35
+ }
36
+ get showSeparator() {
37
+ return this._showSeparator;
26
38
  }
27
39
  }
28
40
  TextBoxSuffixTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxSuffixTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
- TextBoxSuffixTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", ngImport: i0 });
41
+ TextBoxSuffixTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: { showSeparator: "showSeparator" }, ngImport: i0 });
30
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxSuffixTemplateDirective, decorators: [{
31
43
  type: Directive,
32
44
  args: [{
@@ -34,4 +46,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
34
46
  }]
35
47
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
36
48
  type: Optional
37
- }] }]; } });
49
+ }] }]; }, propDecorators: { showSeparator: [{
50
+ type: Input
51
+ }] } });
@@ -4,24 +4,25 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /* eslint-disable @typescript-eslint/no-explicit-any */
6
6
  import { isJapanese } from './../shared/utils';
7
- import { closest } from './../common/dom-utils';
8
7
  import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
9
- import { Component, ElementRef, forwardRef, Input, Output, EventEmitter, HostBinding, ViewChild, NgZone, ChangeDetectorRef, Injector, ContentChild, Renderer2 } from '@angular/core';
8
+ import { Component, ElementRef, forwardRef, Input, Output, EventEmitter, HostBinding, ViewChild, NgZone, ChangeDetectorRef, Injector, ContentChild, Renderer2, ContentChildren, QueryList } from '@angular/core';
10
9
  import { validatePackage } from '@progress/kendo-licensing';
11
10
  import { packageMetadata } from '../package-metadata';
12
11
  import { invokeElementMethod } from '../common/dom-utils';
13
- import { areSame, requiresZoneOnBlur, getStylingClasses } from '../common/utils';
14
- import { guid, hasObservers, KendoInput, Keys, isSafari } from '@progress/kendo-angular-common';
12
+ import { areSame, requiresZoneOnBlur, getStylingClasses, isPresent } from '../common/utils';
13
+ import { guid, hasObservers, KendoInput, isSafari, SuffixTemplateDirective, PrefixTemplateDirective } from '@progress/kendo-angular-common';
15
14
  import { TextBoxSuffixTemplateDirective } from './textbox-suffix.directive';
16
15
  import { TextBoxPrefixTemplateDirective } from './textbox-prefix.directive';
17
16
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
18
17
  import { checkIcon, exclamationCircleIcon, xIcon } from '@progress/kendo-svg-icons';
19
18
  import * as i0 from "@angular/core";
20
19
  import * as i1 from "@progress/kendo-angular-l10n";
21
- import * as i2 from "@progress/kendo-angular-icons";
22
- import * as i3 from "./localization/localized-textbox-messages.directive";
23
- import * as i4 from "@angular/common";
24
- import * as i5 from "@progress/kendo-angular-common";
20
+ import * as i2 from "../shared/input-separator.component";
21
+ import * as i3 from "@progress/kendo-angular-icons";
22
+ import * as i4 from "./localization/localized-textbox-messages.directive";
23
+ import * as i5 from "../shared/shared-events.directive";
24
+ import * as i6 from "@angular/common";
25
+ import * as i7 from "@progress/kendo-angular-common";
25
26
  const FOCUSED = 'k-focus';
26
27
  const DEFAULT_SIZE = 'medium';
27
28
  const DEFAULT_ROUNDED = 'medium';
@@ -180,12 +181,8 @@ export class TextBoxComponent {
180
181
  setTimeout(() => { this.selectAll(); });
181
182
  });
182
183
  }
183
- if (hasObservers(this.onFocus)) {
184
- if (!this.isFocused) {
185
- this.ngZone.run(() => {
186
- this.onFocus.emit();
187
- });
188
- }
184
+ if (!this.isFocused) {
185
+ this.handleFocus();
189
186
  }
190
187
  if (hasObservers(this.inputFocus)) {
191
188
  if (!this.focusChangedProgrammatically || (this.focusChangedProgrammatically && this.clearButtonClicked)) {
@@ -194,9 +191,6 @@ export class TextBoxComponent {
194
191
  });
195
192
  }
196
193
  }
197
- this.ngZone.run(() => {
198
- this.isFocused = true;
199
- });
200
194
  }
201
195
  };
202
196
  /**
@@ -304,56 +298,16 @@ export class TextBoxComponent {
304
298
  });
305
299
  }
306
300
  ngAfterViewInit() {
307
- const hostElement = this.hostElement.nativeElement;
308
- let cursorInsideWrapper = false;
309
- let tabbing = false;
310
- this.ngZone.runOutsideAngular(() => {
311
- // focusIn and focusOut are relative to the host element
312
- this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
313
- if (!this.isFocused) {
314
- this.ngZone.run(() => {
315
- this.onFocus.emit();
316
- this.isFocused = true;
317
- });
318
- }
319
- }));
320
- this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (args) => {
321
- if (!this.isFocused) {
322
- return;
323
- }
324
- if (tabbing) {
325
- const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
326
- if (!closestTextbox) {
327
- this.handleBlur();
328
- }
329
- tabbing = false;
330
- }
331
- else {
332
- if (!cursorInsideWrapper && !this.clearButtonClicked) {
333
- this.handleBlur();
334
- }
335
- }
336
- }));
337
- this.subscriptions.add(this.renderer.listen(hostElement, 'mouseenter', () => {
338
- cursorInsideWrapper = true;
339
- }));
340
- this.subscriptions.add(this.renderer.listen(hostElement, 'mouseleave', () => {
341
- cursorInsideWrapper = false;
342
- }));
343
- this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
344
- if (args.keyCode === Keys.Tab) {
345
- tabbing = true;
346
- }
347
- else {
348
- tabbing = false;
349
- }
350
- }));
351
- });
352
301
  const stylingInputs = ['size', 'rounded', 'fillMode'];
353
302
  stylingInputs.forEach(input => {
354
303
  this.handleClasses(this[input], input);
355
304
  });
356
305
  }
306
+ ngAfterContentInit() {
307
+ this.configureAdornments();
308
+ this.subscriptions.add(this.textBoxPrefixTemplate.changes.subscribe(this.configureAdornments.bind(this)));
309
+ this.subscriptions.add(this.textBoxSuffixTemplate.changes.subscribe(this.configureAdornments.bind(this)));
310
+ }
357
311
  ngOnChanges(changes) {
358
312
  if (changes['disabled'] || changes['readonly'] || changes['value']) {
359
313
  this.checkClearButton();
@@ -556,6 +510,27 @@ export class TextBoxComponent {
556
510
  ? this.showSuccessInitial()
557
511
  : this.showSuccessIcon;
558
512
  }
513
+ /**
514
+ * @hidden
515
+ */
516
+ get isFocused() {
517
+ return this._isFocused;
518
+ }
519
+ /**
520
+ * @hidden
521
+ */
522
+ set isFocused(value) {
523
+ if (this._isFocused !== value && this.hostElement) {
524
+ const element = this.hostElement.nativeElement;
525
+ if (value && !this.disabled) {
526
+ this.renderer.addClass(element, FOCUSED);
527
+ }
528
+ else {
529
+ this.renderer.removeClass(element, FOCUSED);
530
+ }
531
+ this._isFocused = value;
532
+ }
533
+ }
559
534
  setSelection(start, end) {
560
535
  if (this.isFocused) {
561
536
  invokeElementMethod(this.input, 'setSelectionRange', start, end);
@@ -577,21 +552,20 @@ export class TextBoxComponent {
577
552
  });
578
553
  }
579
554
  }
580
- get isFocused() {
581
- return this._isFocused;
582
- }
583
- set isFocused(value) {
584
- if (this._isFocused !== value && this.hostElement) {
585
- const element = this.hostElement.nativeElement;
586
- if (value && !this.disabled) {
587
- this.renderer.addClass(element, FOCUSED);
588
- }
589
- else {
590
- this.renderer.removeClass(element, FOCUSED);
555
+ /**
556
+ * @hidden
557
+ */
558
+ handleFocus() {
559
+ this.ngZone.run(() => {
560
+ if (!this.focusChangedProgrammatically && hasObservers(this.onFocus)) {
561
+ this.onFocus.emit();
591
562
  }
592
- this._isFocused = value;
593
- }
563
+ this.isFocused = true;
564
+ });
594
565
  }
566
+ /**
567
+ * @hidden
568
+ */
595
569
  handleBlur() {
596
570
  this.ngZone.run(() => {
597
571
  if (!this.focusChangedProgrammatically) {
@@ -610,6 +584,14 @@ export class TextBoxComponent {
610
584
  this.renderer.addClass(elem, classes.toAdd);
611
585
  }
612
586
  }
587
+ configureAdornments() {
588
+ if (isPresent(this.textBoxPrefixTemplate.first)) {
589
+ this.prefixTemplate = this.textBoxPrefixTemplate.first;
590
+ }
591
+ if (isPresent(this.textBoxSuffixTemplate.first)) {
592
+ this.suffixTemplate = this.textBoxSuffixTemplate.first;
593
+ }
594
+ }
613
595
  }
614
596
  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 });
615
597
  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-disabled": "this.disabledClass", "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "attr.dir": "this.direction" } }, providers: [
@@ -621,75 +603,82 @@ TextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
621
603
  multi: true
622
604
  },
623
605
  { provide: KendoInput, useExisting: forwardRef(() => TextBoxComponent) }
624
- ], queries: [{ propertyName: "suffixTemplate", first: true, predicate: TextBoxSuffixTemplateDirective, descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: TextBoxPrefixTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], exportAs: ["kendoTextBox"], usesOnChanges: true, ngImport: i0, template: `
606
+ ], queries: [{ propertyName: "suffixTemplate", first: true, predicate: SuffixTemplateDirective, descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: PrefixTemplateDirective, descendants: true }, { propertyName: "textBoxSuffixTemplate", predicate: TextBoxSuffixTemplateDirective }, { propertyName: "textBoxPrefixTemplate", predicate: TextBoxPrefixTemplateDirective }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], exportAs: ["kendoTextBox"], usesOnChanges: true, ngImport: i0, template: `
625
607
  <ng-container kendoTextBoxLocalizedMessages
626
608
  i18n-clear="kendo.textbox.clear|The title for the **Clear** button in the TextBox."
627
609
  clear="Clear">
628
610
  </ng-container>
629
- <span class="k-input-prefix">
630
- <ng-template
631
- *ngIf="prefixTemplate"
632
- [ngTemplateOutlet]="prefixTemplate?.templateRef">
633
- </ng-template>
634
- </span>
635
- <input #input
636
- class="k-input-inner"
637
- [id]="focusableId"
638
- [disabled]="disabled"
639
- [readonly]="readonly"
640
- [attr.tabindex]="disabled ? undefined : tabindex"
641
- [value]="value"
642
- [attr.type]="type"
643
- [attr.placeholder]="placeholder"
644
- [attr.title]="title"
645
- [attr.maxlength]="maxlength"
646
- [attr.aria-invalid]="isControlInvalid"
647
- [kendoEventsOutsideAngular]="{
648
- focus: handleInputFocus,
649
- blur: handleInputBlur,
650
- input: handleInput}"
651
- />
652
- <span
653
- role="button"
654
- class="k-clear-value"
655
- *ngIf="showClearButton"
656
- (click)="clearValue()"
657
- (mousedown)="$event.preventDefault()"
658
- [tabindex]="tabIndex"
659
- [attr.aria-label]="clearTitle()"
660
- [title]="clearTitle()"
661
- (keydown.enter)="clearValue($event)"
662
- (keydown.space)="clearValue($event)">
663
- <kendo-icon-wrapper
664
- [name]="clearButtonClass"
665
- [customFontClass]="customClearButtonClasses"
666
- [svgIcon]="clearButtonSvgIcon || svgIcon('xIcon')"
667
- >
668
- </kendo-icon-wrapper>
669
- </span>
670
- <kendo-icon-wrapper
671
- *ngIf="hasErrors"
672
- innerCssClass="k-input-validation-icon"
673
- [name]="errorIconClasses"
674
- [customFontClass]="customIconClasses"
675
- [svgIcon]="errorSvgIcon || svgIcon('exclamationCircleIcon')"
611
+ <ng-container
612
+ kendoInputSharedEvents
613
+ [hostElement]="hostElement"
614
+ [(isFocused)]="isFocused"
615
+ (handleBlur)="handleBlur()"
616
+ (onFocus)="handleFocus()"
617
+ [clearButtonClicked]="clearButtonClicked"
676
618
  >
677
- </kendo-icon-wrapper>
678
- <kendo-icon-wrapper
679
- *ngIf="isSuccessful"
680
- innerCssClass="k-input-validation-icon"
681
- [name]="successIconClasses"
682
- [customFontClass]="customSuccessIconClasses"
683
- [svgIcon]="successSvgIcon || svgIcon('checkIcon')"
684
- >
685
- </kendo-icon-wrapper>
686
- <span class="k-input-suffix">
687
- <ng-template
688
- *ngIf="suffixTemplate"
689
- [ngTemplateOutlet]="suffixTemplate?.templateRef">
690
- </ng-template>
691
- </span>
692
- `, isInline: true, components: [{ type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.LocalizedTextBoxMessagesDirective, selector: "[kendoTextBoxLocalizedMessages]" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
619
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
620
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
621
+ </ng-template>
622
+ </span>
623
+ <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
624
+ <input #input
625
+ class="k-input-inner"
626
+ [id]="focusableId"
627
+ [disabled]="disabled"
628
+ [readonly]="readonly"
629
+ [attr.tabindex]="disabled ? undefined : tabindex"
630
+ [value]="value"
631
+ [attr.type]="type"
632
+ [attr.placeholder]="placeholder"
633
+ [attr.title]="title"
634
+ [attr.maxlength]="maxlength"
635
+ [attr.aria-invalid]="isControlInvalid"
636
+ [kendoEventsOutsideAngular]="{
637
+ focus: handleInputFocus,
638
+ blur: handleInputBlur,
639
+ input: handleInput}"
640
+ />
641
+ <span
642
+ role="button"
643
+ class="k-clear-value"
644
+ *ngIf="showClearButton"
645
+ (click)="clearValue()"
646
+ (mousedown)="$event.preventDefault()"
647
+ [tabindex]="tabIndex"
648
+ [attr.aria-label]="clearTitle()"
649
+ [title]="clearTitle()"
650
+ (keydown.enter)="clearValue($event)"
651
+ (keydown.space)="clearValue($event)">
652
+ <kendo-icon-wrapper
653
+ [name]="clearButtonClass"
654
+ [customFontClass]="customClearButtonClasses"
655
+ [svgIcon]="clearButtonSvgIcon || svgIcon('xIcon')"
656
+ >
657
+ </kendo-icon-wrapper>
658
+ </span>
659
+ <kendo-icon-wrapper
660
+ *ngIf="hasErrors"
661
+ innerCssClass="k-input-validation-icon"
662
+ [name]="errorIconClasses"
663
+ [customFontClass]="customIconClasses"
664
+ [svgIcon]="errorSvgIcon || svgIcon('exclamationCircleIcon')"
665
+ >
666
+ </kendo-icon-wrapper>
667
+ <kendo-icon-wrapper
668
+ *ngIf="isSuccessful"
669
+ innerCssClass="k-input-validation-icon"
670
+ [name]="successIconClasses"
671
+ [customFontClass]="customSuccessIconClasses"
672
+ [svgIcon]="successSvgIcon || svgIcon('checkIcon')"
673
+ >
674
+ </kendo-icon-wrapper>
675
+ <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-input-separator>
676
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
677
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
678
+ </ng-template>
679
+ </span>
680
+ <ng-container>
681
+ `, isInline: true, components: [{ type: i2.InputSeparatorComponent, selector: "kendo-input-separator, kendo-textbox-separator", inputs: ["orientation"] }, { type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4.LocalizedTextBoxMessagesDirective, selector: "[kendoTextBoxLocalizedMessages]" }, { type: i5.SharedInputEventsDirective, selector: "[kendoInputSharedEvents]", inputs: ["hostElement", "clearButtonClicked", "isFocused"], outputs: ["isFocusedChange", "onFocus", "handleBlur"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
693
682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxComponent, decorators: [{
694
683
  type: Component,
695
684
  args: [{
@@ -710,69 +699,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
710
699
  i18n-clear="kendo.textbox.clear|The title for the **Clear** button in the TextBox."
711
700
  clear="Clear">
712
701
  </ng-container>
713
- <span class="k-input-prefix">
714
- <ng-template
715
- *ngIf="prefixTemplate"
716
- [ngTemplateOutlet]="prefixTemplate?.templateRef">
717
- </ng-template>
718
- </span>
719
- <input #input
720
- class="k-input-inner"
721
- [id]="focusableId"
722
- [disabled]="disabled"
723
- [readonly]="readonly"
724
- [attr.tabindex]="disabled ? undefined : tabindex"
725
- [value]="value"
726
- [attr.type]="type"
727
- [attr.placeholder]="placeholder"
728
- [attr.title]="title"
729
- [attr.maxlength]="maxlength"
730
- [attr.aria-invalid]="isControlInvalid"
731
- [kendoEventsOutsideAngular]="{
732
- focus: handleInputFocus,
733
- blur: handleInputBlur,
734
- input: handleInput}"
735
- />
736
- <span
737
- role="button"
738
- class="k-clear-value"
739
- *ngIf="showClearButton"
740
- (click)="clearValue()"
741
- (mousedown)="$event.preventDefault()"
742
- [tabindex]="tabIndex"
743
- [attr.aria-label]="clearTitle()"
744
- [title]="clearTitle()"
745
- (keydown.enter)="clearValue($event)"
746
- (keydown.space)="clearValue($event)">
747
- <kendo-icon-wrapper
748
- [name]="clearButtonClass"
749
- [customFontClass]="customClearButtonClasses"
750
- [svgIcon]="clearButtonSvgIcon || svgIcon('xIcon')"
751
- >
752
- </kendo-icon-wrapper>
753
- </span>
754
- <kendo-icon-wrapper
755
- *ngIf="hasErrors"
756
- innerCssClass="k-input-validation-icon"
757
- [name]="errorIconClasses"
758
- [customFontClass]="customIconClasses"
759
- [svgIcon]="errorSvgIcon || svgIcon('exclamationCircleIcon')"
760
- >
761
- </kendo-icon-wrapper>
762
- <kendo-icon-wrapper
763
- *ngIf="isSuccessful"
764
- innerCssClass="k-input-validation-icon"
765
- [name]="successIconClasses"
766
- [customFontClass]="customSuccessIconClasses"
767
- [svgIcon]="successSvgIcon || svgIcon('checkIcon')"
702
+ <ng-container
703
+ kendoInputSharedEvents
704
+ [hostElement]="hostElement"
705
+ [(isFocused)]="isFocused"
706
+ (handleBlur)="handleBlur()"
707
+ (onFocus)="handleFocus()"
708
+ [clearButtonClicked]="clearButtonClicked"
768
709
  >
769
- </kendo-icon-wrapper>
770
- <span class="k-input-suffix">
771
- <ng-template
772
- *ngIf="suffixTemplate"
773
- [ngTemplateOutlet]="suffixTemplate?.templateRef">
774
- </ng-template>
775
- </span>
710
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
711
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
712
+ </ng-template>
713
+ </span>
714
+ <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
715
+ <input #input
716
+ class="k-input-inner"
717
+ [id]="focusableId"
718
+ [disabled]="disabled"
719
+ [readonly]="readonly"
720
+ [attr.tabindex]="disabled ? undefined : tabindex"
721
+ [value]="value"
722
+ [attr.type]="type"
723
+ [attr.placeholder]="placeholder"
724
+ [attr.title]="title"
725
+ [attr.maxlength]="maxlength"
726
+ [attr.aria-invalid]="isControlInvalid"
727
+ [kendoEventsOutsideAngular]="{
728
+ focus: handleInputFocus,
729
+ blur: handleInputBlur,
730
+ input: handleInput}"
731
+ />
732
+ <span
733
+ role="button"
734
+ class="k-clear-value"
735
+ *ngIf="showClearButton"
736
+ (click)="clearValue()"
737
+ (mousedown)="$event.preventDefault()"
738
+ [tabindex]="tabIndex"
739
+ [attr.aria-label]="clearTitle()"
740
+ [title]="clearTitle()"
741
+ (keydown.enter)="clearValue($event)"
742
+ (keydown.space)="clearValue($event)">
743
+ <kendo-icon-wrapper
744
+ [name]="clearButtonClass"
745
+ [customFontClass]="customClearButtonClasses"
746
+ [svgIcon]="clearButtonSvgIcon || svgIcon('xIcon')"
747
+ >
748
+ </kendo-icon-wrapper>
749
+ </span>
750
+ <kendo-icon-wrapper
751
+ *ngIf="hasErrors"
752
+ innerCssClass="k-input-validation-icon"
753
+ [name]="errorIconClasses"
754
+ [customFontClass]="customIconClasses"
755
+ [svgIcon]="errorSvgIcon || svgIcon('exclamationCircleIcon')"
756
+ >
757
+ </kendo-icon-wrapper>
758
+ <kendo-icon-wrapper
759
+ *ngIf="isSuccessful"
760
+ innerCssClass="k-input-validation-icon"
761
+ [name]="successIconClasses"
762
+ [customFontClass]="customSuccessIconClasses"
763
+ [svgIcon]="successSvgIcon || svgIcon('checkIcon')"
764
+ >
765
+ </kendo-icon-wrapper>
766
+ <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-input-separator>
767
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
768
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
769
+ </ng-template>
770
+ </span>
771
+ <ng-container>
776
772
  `
777
773
  }]
778
774
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { focusableId: [{
@@ -836,12 +832,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
836
832
  }], input: [{
837
833
  type: ViewChild,
838
834
  args: ['input', { static: true }]
835
+ }], textBoxSuffixTemplate: [{
836
+ type: ContentChildren,
837
+ args: [TextBoxSuffixTemplateDirective, { descendants: false }]
838
+ }], textBoxPrefixTemplate: [{
839
+ type: ContentChildren,
840
+ args: [TextBoxPrefixTemplateDirective, { descendants: false }]
839
841
  }], suffixTemplate: [{
840
842
  type: ContentChild,
841
- args: [TextBoxSuffixTemplateDirective, { static: false }]
843
+ args: [SuffixTemplateDirective]
842
844
  }], prefixTemplate: [{
843
845
  type: ContentChild,
844
- args: [TextBoxPrefixTemplateDirective, { static: false }]
846
+ args: [PrefixTemplateDirective]
845
847
  }], disabledClass: [{
846
848
  type: HostBinding,
847
849
  args: ['class.k-disabled']