@progress/kendo-angular-inputs 14.4.0-develop.17 → 14.4.0-develop.19

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 (39) hide show
  1. package/esm2020/colorpicker/color-input.component.mjs +1 -1
  2. package/esm2020/index.mjs +4 -0
  3. package/esm2020/maskedtextbox/maskedtextbox.component.mjs +144 -56
  4. package/esm2020/maskedtextbox.module.mjs +30 -6
  5. package/esm2020/numerictextbox/numerictextbox.component.mjs +186 -91
  6. package/esm2020/numerictextbox.module.mjs +10 -6
  7. package/esm2020/package-metadata.mjs +2 -2
  8. package/esm2020/shared/input-separator.component.mjs +21 -3
  9. package/esm2020/shared/shared-events.directive.mjs +95 -0
  10. package/esm2020/shared-events.module.mjs +22 -0
  11. package/esm2020/textarea/models/adornments-orientation.mjs +5 -0
  12. package/esm2020/textarea/textarea-prefix.component.mjs +70 -0
  13. package/esm2020/textarea/textarea-suffix.component.mjs +33 -3
  14. package/esm2020/textarea/textarea.component.mjs +198 -131
  15. package/esm2020/textarea.module.mjs +14 -5
  16. package/esm2020/textbox/textbox-prefix.directive.mjs +17 -3
  17. package/esm2020/textbox/textbox-suffix.directive.mjs +17 -3
  18. package/esm2020/textbox/textbox.component.mjs +205 -203
  19. package/esm2020/textbox.module.mjs +9 -5
  20. package/fesm2015/progress-kendo-angular-inputs.mjs +1131 -609
  21. package/fesm2020/progress-kendo-angular-inputs.mjs +1131 -609
  22. package/index.d.ts +6 -0
  23. package/maskedtextbox/maskedtextbox.component.d.ts +37 -6
  24. package/maskedtextbox.module.d.ts +3 -1
  25. package/numerictextbox/numerictextbox.component.d.ts +38 -7
  26. package/numerictextbox.module.d.ts +3 -1
  27. package/package.json +10 -10
  28. package/shared/input-separator.component.d.ts +8 -1
  29. package/shared/shared-events.directive.d.ts +27 -0
  30. package/shared-events.module.d.ts +14 -0
  31. package/textarea/models/adornments-orientation.d.ts +12 -0
  32. package/textarea/textarea-prefix.component.d.ts +37 -0
  33. package/textarea/textarea-suffix.component.d.ts +12 -1
  34. package/textarea/textarea.component.d.ts +62 -6
  35. package/textarea.module.d.ts +9 -7
  36. package/textbox/textbox-prefix.directive.d.ts +9 -1
  37. package/textbox/textbox-suffix.directive.d.ts +9 -1
  38. package/textbox/textbox.component.d.ts +36 -9
  39. package/textbox.module.d.ts +4 -3
@@ -3,8 +3,8 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, ViewChild, forwardRef, isDevMode, NgZone, ChangeDetectorRef, Injector } from '@angular/core';
7
- import { anyChanged, hasObservers, Keys, guid, KendoInput } from '@progress/kendo-angular-common';
6
+ import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, ViewChild, forwardRef, isDevMode, NgZone, ChangeDetectorRef, Injector, ContentChild } from '@angular/core';
7
+ import { anyChanged, hasObservers, Keys, guid, KendoInput, SuffixTemplateDirective, PrefixTemplateDirective } from '@progress/kendo-angular-common';
8
8
  import { areSame, getStylingClasses, requiresZoneOnBlur } from '../common/utils';
9
9
  import { invokeElementMethod } from '../common/dom-utils';
10
10
  import { add, toFixedPrecision, limitPrecision } from '../common/math';
@@ -23,10 +23,12 @@ import { caretAltUpIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
23
23
  import * as i0 from "@angular/core";
24
24
  import * as i1 from "@progress/kendo-angular-intl";
25
25
  import * as i2 from "@progress/kendo-angular-l10n";
26
- import * as i3 from "@progress/kendo-angular-icons";
27
- import * as i4 from "./localization/localized-numerictextbox-messages.directive";
28
- import * as i5 from "@progress/kendo-angular-common";
29
- import * as i6 from "@angular/common";
26
+ import * as i3 from "../shared/input-separator.component";
27
+ import * as i4 from "@progress/kendo-angular-icons";
28
+ import * as i5 from "./localization/localized-numerictextbox-messages.directive";
29
+ import * as i6 from "../shared/shared-events.directive";
30
+ import * as i7 from "@angular/common";
31
+ import * as i8 from "@progress/kendo-angular-common";
30
32
  const PARSABLE_OPTIONS = ['min', 'max', 'step', 'decimals'];
31
33
  const PARSABLE_DEFAULTS = {
32
34
  decimals: null,
@@ -117,13 +119,21 @@ export class NumericTextBoxComponent {
117
119
  */
118
120
  this.valueChange = new EventEmitter();
119
121
  /**
120
- * Fires each time the user focuses the `input` element ([see example]({% slug overview_numerictextbox %}#toc-events)).
122
+ * Fires each time the user focuses the NumericTextBox element ([see example]({% slug overview_numerictextbox %}#toc-events)).
121
123
  */
122
124
  this.onFocus = new EventEmitter();
123
125
  /**
124
- * Fires each time the `input` element gets blurred ([see example]({% slug overview_numerictextbox %}#toc-events)).
126
+ * Fires each time the NumericTextBox component gets blurred. ([see example]({% slug overview_numerictextbox %}#toc-events)).
125
127
  */
126
128
  this.onBlur = new EventEmitter();
129
+ /**
130
+ * Fires each time the user focuses the `input` element.
131
+ */
132
+ this.inputFocus = new EventEmitter();
133
+ /**
134
+ * Fires each time the `input` element gets blurred.
135
+ */
136
+ this.inputBlur = new EventEmitter();
127
137
  /**
128
138
  * @hidden
129
139
  */
@@ -238,7 +248,7 @@ export class NumericTextBoxComponent {
238
248
  /**
239
249
  * @hidden
240
250
  */
241
- this.handleFocus = () => {
251
+ this.handleInputFocus = () => {
242
252
  if (!this.focused) {
243
253
  this.focused = true;
244
254
  if (!this.isDisabled) {
@@ -254,11 +264,16 @@ export class NumericTextBoxComponent {
254
264
  }, 0);
255
265
  });
256
266
  }
267
+ if (hasObservers(this.onFocus)) {
268
+ this.ngZone.run(() => {
269
+ this.onFocus.emit();
270
+ });
271
+ }
257
272
  }
258
273
  this.mouseDown = false;
259
- if (hasObservers(this.onFocus)) {
274
+ if (hasObservers(this.inputFocus)) {
260
275
  this.ngZone.run(() => {
261
- this.onFocus.emit();
276
+ this.inputFocus.emit();
262
277
  });
263
278
  }
264
279
  };
@@ -273,13 +288,30 @@ export class NumericTextBoxComponent {
273
288
  this.handleInput();
274
289
  }
275
290
  this.setInputValue();
276
- if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.control)) {
291
+ if (hasObservers(this.onBlur)) {
277
292
  this.ngZone.run(() => {
278
293
  this.ngTouched();
279
294
  this.onBlur.emit();
280
295
  });
281
296
  }
282
297
  };
298
+ /**
299
+ * @hidden
300
+ */
301
+ this.handleInputBlur = () => {
302
+ this.changeDetector.markForCheck();
303
+ //blur is thrown before input when dragging the input text in IE
304
+ if (this.inputValue !== this.elementValue) {
305
+ this.handleInput();
306
+ }
307
+ this.setInputValue();
308
+ if (hasObservers(this.inputBlur) || requiresZoneOnBlur(this.control)) {
309
+ this.ngZone.run(() => {
310
+ this.ngTouched();
311
+ this.inputBlur.emit();
312
+ });
313
+ }
314
+ };
283
315
  /**
284
316
  * @hidden
285
317
  */
@@ -524,6 +556,17 @@ export class NumericTextBoxComponent {
524
556
  notifyValueChange() {
525
557
  this.setInputValue();
526
558
  }
559
+ /**
560
+ * @hidden
561
+ */
562
+ handleFocus() {
563
+ this.ngZone.run(() => {
564
+ if (!this.focused && hasObservers(this.onFocus)) {
565
+ this.onFocus.emit();
566
+ }
567
+ this.focused = true;
568
+ });
569
+ }
527
570
  /**
528
571
  * @hidden
529
572
  */
@@ -542,19 +585,15 @@ export class NumericTextBoxComponent {
542
585
  get isControlInvalid() {
543
586
  return this.control && this.control.touched && !this.control.valid;
544
587
  }
545
- get decimalSeparator() {
546
- const numberSymbols = this.intl.numberSymbols();
547
- return numberSymbols.decimal;
548
- }
549
- get elementValue() {
550
- return this.numericInput.nativeElement.value;
551
- }
552
- set elementValue(value) {
553
- this.renderer.setProperty(this.numericInput.nativeElement, 'value', value);
554
- }
588
+ /**
589
+ * @hidden
590
+ */
555
591
  get focused() {
556
592
  return this.isFocused;
557
593
  }
594
+ /**
595
+ * @hidden
596
+ */
558
597
  set focused(value) {
559
598
  if (this.isFocused !== value && this.hostElement) {
560
599
  const wrap = this.hostElement.nativeElement;
@@ -567,6 +606,16 @@ export class NumericTextBoxComponent {
567
606
  this.isFocused = value;
568
607
  }
569
608
  }
609
+ get decimalSeparator() {
610
+ const numberSymbols = this.intl.numberSymbols();
611
+ return numberSymbols.decimal;
612
+ }
613
+ get elementValue() {
614
+ return this.numericInput.nativeElement.value;
615
+ }
616
+ set elementValue(value) {
617
+ this.renderer.setProperty(this.numericInput.nativeElement, 'value', value);
618
+ }
570
619
  get hasDecimals() {
571
620
  return this.decimals !== null && this.decimals >= 0;
572
621
  }
@@ -579,8 +628,8 @@ export class NumericTextBoxComponent {
579
628
  return;
580
629
  }
581
630
  if (!mobileOS) {
582
- this.focused = true;
583
631
  this.focus();
632
+ this.focused = true;
584
633
  }
585
634
  if (this.arrowDirection !== direction) {
586
635
  this.arrowDirection = direction;
@@ -868,13 +917,13 @@ export class NumericTextBoxComponent {
868
917
  }
869
918
  }
870
919
  NumericTextBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxComponent, deps: [{ token: i1.IntlService }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
871
- 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" }, host: { properties: { "attr.dir": "this.direction", "class.k-disabled": "this.disableClass", "class.k-input": "this.hostClasses", "class.k-numerictextbox": "this.hostClasses" } }, providers: [
920
+ 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: { "attr.dir": "this.direction", "class.k-disabled": "this.disableClass", "class.k-input": "this.hostClasses", "class.k-numerictextbox": "this.hostClasses" } }, providers: [
872
921
  LocalizationService,
873
922
  { provide: L10N_PREFIX, useValue: 'kendo.numerictextbox' },
874
923
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NumericTextBoxComponent), multi: true },
875
924
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => NumericTextBoxComponent), multi: true },
876
925
  { provide: KendoInput, useExisting: forwardRef(() => NumericTextBoxComponent) }
877
- ], viewQueries: [{ propertyName: "numericInput", first: true, predicate: ["numericInput"], descendants: true, static: true }], exportAs: ["kendoNumericTextBox"], usesOnChanges: true, ngImport: i0, template: `
926
+ ], queries: [{ propertyName: "suffixTemplate", first: true, predicate: SuffixTemplateDirective, descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: PrefixTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "numericInput", first: true, predicate: ["numericInput"], descendants: true, static: true }], exportAs: ["kendoNumericTextBox"], usesOnChanges: true, ngImport: i0, template: `
878
927
  <ng-container kendoNumericTextBoxLocalizedMessages
879
928
  i18n-increment="kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox"
880
929
  increment="Increase value"
@@ -882,6 +931,18 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
882
931
  decrement="Decrease value"
883
932
  >
884
933
  </ng-container>
934
+ <ng-container
935
+ kendoInputSharedEvents
936
+ [hostElement]="hostElement"
937
+ [(isFocused)]="focused"
938
+ (handleBlur)="handleBlur()"
939
+ (onFocus)="handleFocus()"
940
+ >
941
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
942
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
943
+ </ng-template>
944
+ </span>
945
+ <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
885
946
  <input
886
947
  role="spinbutton"
887
948
  class="k-input-inner"
@@ -903,51 +964,57 @@ NumericTextBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
903
964
  dragenter: handleDragEnter,
904
965
  keydown: handleKeyDown,
905
966
  input: handleInput,
906
- focus: handleFocus,
907
- blur: handleBlur,
967
+ focus: handleInputFocus,
968
+ blur: handleInputBlur,
908
969
  paste: handlePaste
909
970
  }"
910
971
  #numericInput />
972
+ <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
973
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
974
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
975
+ </ng-template>
976
+ </span>
911
977
  <span
912
978
  class="k-input-spinner k-spin-button" *ngIf="spinners"
913
979
  [kendoEventsOutsideAngular]="{ mouseup: releaseArrow, mouseleave: releaseArrow }"
914
980
  >
915
- <button
916
- type="button"
917
- [kendoEventsOutsideAngular]="{ mousedown: increasePress }"
918
- [attr.aria-hidden]="true"
919
- [attr.aria-label]="incrementTitle"
920
- [title]="incrementTitle"
921
- class="k-spinner-increase k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
922
- [class.k-active]="arrowDirection === ArrowDirection.Up"
923
- tabindex="-1"
981
+ <button
982
+ type="button"
983
+ [kendoEventsOutsideAngular]="{ mousedown: increasePress }"
984
+ [attr.aria-hidden]="true"
985
+ [attr.aria-label]="incrementTitle"
986
+ [title]="incrementTitle"
987
+ class="k-spinner-increase k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
988
+ [class.k-active]="arrowDirection === ArrowDirection.Up"
989
+ tabindex="-1"
990
+ >
991
+ <kendo-icon-wrapper
992
+ name="caret-alt-up"
993
+ innerCssClass="k-button-icon"
994
+ [svgIcon]="arrowUpIcon"
924
995
  >
925
- <kendo-icon-wrapper
926
- name="caret-alt-up"
927
- innerCssClass="k-button-icon"
928
- [svgIcon]="arrowUpIcon"
929
- >
930
- </kendo-icon-wrapper>
931
- </button>
932
- <button
933
- type="button"
934
- [kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
935
- [attr.aria-hidden]="true"
936
- [attr.aria-label]="decrementTitle"
937
- [title]="decrementTitle"
938
- [class.k-active]="arrowDirection === ArrowDirection.Down"
939
- class="k-spinner-decrease k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
940
- tabindex="-1"
996
+ </kendo-icon-wrapper>
997
+ </button>
998
+ <button
999
+ type="button"
1000
+ [kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
1001
+ [attr.aria-hidden]="true"
1002
+ [attr.aria-label]="decrementTitle"
1003
+ [title]="decrementTitle"
1004
+ [class.k-active]="arrowDirection === ArrowDirection.Down"
1005
+ class="k-spinner-decrease k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
1006
+ tabindex="-1"
1007
+ >
1008
+ <kendo-icon-wrapper
1009
+ name="caret-alt-down"
1010
+ innerCssClass="k-button-icon"
1011
+ [svgIcon]="arrowDownIcon"
941
1012
  >
942
- <kendo-icon-wrapper
943
- name="caret-alt-down"
944
- innerCssClass="k-button-icon"
945
- [svgIcon]="arrowDownIcon"
946
- >
947
1013
  </kendo-icon-wrapper>
948
1014
  </button>
949
1015
  </span>
950
- `, isInline: true, components: [{ type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4.LocalizedNumericTextBoxMessagesDirective, selector: "[kendoNumericTextBoxLocalizedMessages]" }, { type: i5.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1016
+ </ng-container>
1017
+ `, isInline: true, components: [{ type: i3.InputSeparatorComponent, selector: "kendo-input-separator, kendo-textbox-separator", inputs: ["orientation"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i5.LocalizedNumericTextBoxMessagesDirective, selector: "[kendoNumericTextBoxLocalizedMessages]" }, { type: i6.SharedInputEventsDirective, selector: "[kendoInputSharedEvents]", inputs: ["hostElement", "clearButtonClicked", "isFocused"], outputs: ["isFocusedChange", "onFocus", "handleBlur"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
951
1018
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxComponent, decorators: [{
952
1019
  type: Component,
953
1020
  args: [{
@@ -968,6 +1035,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
968
1035
  decrement="Decrease value"
969
1036
  >
970
1037
  </ng-container>
1038
+ <ng-container
1039
+ kendoInputSharedEvents
1040
+ [hostElement]="hostElement"
1041
+ [(isFocused)]="focused"
1042
+ (handleBlur)="handleBlur()"
1043
+ (onFocus)="handleFocus()"
1044
+ >
1045
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
1046
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1047
+ </ng-template>
1048
+ </span>
1049
+ <kendo-input-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-input-separator>
971
1050
  <input
972
1051
  role="spinbutton"
973
1052
  class="k-input-inner"
@@ -989,51 +1068,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
989
1068
  dragenter: handleDragEnter,
990
1069
  keydown: handleKeyDown,
991
1070
  input: handleInput,
992
- focus: handleFocus,
993
- blur: handleBlur,
1071
+ focus: handleInputFocus,
1072
+ blur: handleInputBlur,
994
1073
  paste: handlePaste
995
1074
  }"
996
1075
  #numericInput />
1076
+ <kendo-input-separator *ngIf="suffixTemplate && suffixTemplate?.showSeparator"></kendo-input-separator>
1077
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
1078
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1079
+ </ng-template>
1080
+ </span>
997
1081
  <span
998
1082
  class="k-input-spinner k-spin-button" *ngIf="spinners"
999
1083
  [kendoEventsOutsideAngular]="{ mouseup: releaseArrow, mouseleave: releaseArrow }"
1000
1084
  >
1001
- <button
1002
- type="button"
1003
- [kendoEventsOutsideAngular]="{ mousedown: increasePress }"
1004
- [attr.aria-hidden]="true"
1005
- [attr.aria-label]="incrementTitle"
1006
- [title]="incrementTitle"
1007
- class="k-spinner-increase k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
1008
- [class.k-active]="arrowDirection === ArrowDirection.Up"
1009
- tabindex="-1"
1085
+ <button
1086
+ type="button"
1087
+ [kendoEventsOutsideAngular]="{ mousedown: increasePress }"
1088
+ [attr.aria-hidden]="true"
1089
+ [attr.aria-label]="incrementTitle"
1090
+ [title]="incrementTitle"
1091
+ class="k-spinner-increase k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
1092
+ [class.k-active]="arrowDirection === ArrowDirection.Up"
1093
+ tabindex="-1"
1094
+ >
1095
+ <kendo-icon-wrapper
1096
+ name="caret-alt-up"
1097
+ innerCssClass="k-button-icon"
1098
+ [svgIcon]="arrowUpIcon"
1010
1099
  >
1011
- <kendo-icon-wrapper
1012
- name="caret-alt-up"
1013
- innerCssClass="k-button-icon"
1014
- [svgIcon]="arrowUpIcon"
1015
- >
1016
- </kendo-icon-wrapper>
1017
- </button>
1018
- <button
1019
- type="button"
1020
- [kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
1021
- [attr.aria-hidden]="true"
1022
- [attr.aria-label]="decrementTitle"
1023
- [title]="decrementTitle"
1024
- [class.k-active]="arrowDirection === ArrowDirection.Down"
1025
- class="k-spinner-decrease k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
1026
- tabindex="-1"
1100
+ </kendo-icon-wrapper>
1101
+ </button>
1102
+ <button
1103
+ type="button"
1104
+ [kendoEventsOutsideAngular]="{ mousedown: decreasePress }"
1105
+ [attr.aria-hidden]="true"
1106
+ [attr.aria-label]="decrementTitle"
1107
+ [title]="decrementTitle"
1108
+ [class.k-active]="arrowDirection === ArrowDirection.Down"
1109
+ class="k-spinner-decrease k-button k-button-md k-icon-button k-button-solid k-button-solid-base"
1110
+ tabindex="-1"
1111
+ >
1112
+ <kendo-icon-wrapper
1113
+ name="caret-alt-down"
1114
+ innerCssClass="k-button-icon"
1115
+ [svgIcon]="arrowDownIcon"
1027
1116
  >
1028
- <kendo-icon-wrapper
1029
- name="caret-alt-down"
1030
- innerCssClass="k-button-icon"
1031
- [svgIcon]="arrowDownIcon"
1032
- >
1033
1117
  </kendo-icon-wrapper>
1034
1118
  </button>
1035
1119
  </span>
1036
- `
1120
+ </ng-container>
1121
+ `
1037
1122
  }]
1038
1123
  }], ctorParameters: function () { return [{ type: i1.IntlService }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { focusableId: [{
1039
1124
  type: Input
@@ -1087,9 +1172,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1087
1172
  }], onBlur: [{
1088
1173
  type: Output,
1089
1174
  args: ['blur']
1175
+ }], inputFocus: [{
1176
+ type: Output
1177
+ }], inputBlur: [{
1178
+ type: Output
1090
1179
  }], numericInput: [{
1091
1180
  type: ViewChild,
1092
1181
  args: ['numericInput', { static: true }]
1182
+ }], suffixTemplate: [{
1183
+ type: ContentChild,
1184
+ args: [SuffixTemplateDirective]
1185
+ }], prefixTemplate: [{
1186
+ type: ContentChild,
1187
+ args: [PrefixTemplateDirective]
1093
1188
  }], direction: [{
1094
1189
  type: HostBinding,
1095
1190
  args: ['attr.dir']
@@ -7,8 +7,10 @@ import { NumericTextBoxComponent } from './numerictextbox/numerictextbox.compone
7
7
  import { CommonModule } from '@angular/common';
8
8
  import { LocalizedNumericTextBoxMessagesDirective } from './numerictextbox/localization/localized-numerictextbox-messages.directive';
9
9
  import { NumericTextBoxCustomMessagesComponent } from './numerictextbox/localization/custom-messages.component';
10
- import { EventsModule } from '@progress/kendo-angular-common';
10
+ import { AdornmentsModule, EventsModule } from '@progress/kendo-angular-common';
11
11
  import { IconsModule } from '@progress/kendo-angular-icons';
12
+ import { SharedModule } from './shared.module';
13
+ import { SharedEventsModule } from './shared-events.module';
12
14
  import * as i0 from "@angular/core";
13
15
  /**
14
16
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
@@ -46,9 +48,10 @@ export class NumericTextBoxModule {
46
48
  NumericTextBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
47
49
  NumericTextBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxModule, declarations: [LocalizedNumericTextBoxMessagesDirective,
48
50
  NumericTextBoxComponent,
49
- NumericTextBoxCustomMessagesComponent], imports: [CommonModule, EventsModule, IconsModule], exports: [NumericTextBoxComponent,
50
- NumericTextBoxCustomMessagesComponent] });
51
- NumericTextBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxModule, imports: [[CommonModule, EventsModule, IconsModule]] });
51
+ NumericTextBoxCustomMessagesComponent], imports: [CommonModule, EventsModule, IconsModule, SharedModule, AdornmentsModule, SharedEventsModule], exports: [NumericTextBoxComponent,
52
+ NumericTextBoxCustomMessagesComponent,
53
+ AdornmentsModule] });
54
+ NumericTextBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxModule, imports: [[CommonModule, EventsModule, IconsModule, SharedModule, AdornmentsModule, SharedEventsModule], AdornmentsModule] });
52
55
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericTextBoxModule, decorators: [{
53
56
  type: NgModule,
54
57
  args: [{
@@ -59,8 +62,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
59
62
  ],
60
63
  exports: [
61
64
  NumericTextBoxComponent,
62
- NumericTextBoxCustomMessagesComponent
65
+ NumericTextBoxCustomMessagesComponent,
66
+ AdornmentsModule
63
67
  ],
64
- imports: [CommonModule, EventsModule, IconsModule]
68
+ imports: [CommonModule, EventsModule, IconsModule, SharedModule, AdornmentsModule, SharedEventsModule]
65
69
  }]
66
70
  }] });
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-inputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1706192685,
13
- version: '14.4.0-develop.17',
12
+ publishDate: 1706287421,
13
+ version: '14.4.0-develop.19',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -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 { Component, HostBinding } from '@angular/core';
5
+ import { Component, HostBinding, Input } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Specifies a separator in the content of components like the TextArea and the TextBox. ([see examples]({% slug adornments_textbox %}#toc-separator)).
@@ -24,18 +24,36 @@ import * as i0 from "@angular/core";
24
24
  */
25
25
  export class InputSeparatorComponent {
26
26
  constructor() {
27
+ /**
28
+ * Specifies the orientation of the separator.
29
+ */
30
+ this.orientation = 'vertical';
27
31
  this.hostClass = true;
28
32
  }
33
+ get vertical() {
34
+ return this.orientation === 'vertical';
35
+ }
36
+ get horizontal() {
37
+ return this.orientation === 'horizontal';
38
+ }
29
39
  }
30
40
  InputSeparatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InputSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- InputSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InputSeparatorComponent, selector: "kendo-input-separator, kendo-textbox-separator", host: { properties: { "class.k-input-separator": "this.hostClass" } }, ngImport: i0, template: ``, isInline: true });
41
+ InputSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InputSeparatorComponent, selector: "kendo-input-separator, kendo-textbox-separator", inputs: { orientation: "orientation" }, host: { properties: { "class.k-input-separator-vertical": "this.vertical", "class.k-input-separator-horizontal": "this.horizontal", "class.k-input-separator": "this.hostClass" } }, ngImport: i0, template: ``, isInline: true });
32
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InputSeparatorComponent, decorators: [{
33
43
  type: Component,
34
44
  args: [{
35
45
  selector: 'kendo-input-separator, kendo-textbox-separator',
36
46
  template: ``
37
47
  }]
38
- }], propDecorators: { hostClass: [{
48
+ }], propDecorators: { orientation: [{
49
+ type: Input
50
+ }], vertical: [{
51
+ type: HostBinding,
52
+ args: ['class.k-input-separator-vertical']
53
+ }], horizontal: [{
54
+ type: HostBinding,
55
+ args: ['class.k-input-separator-horizontal']
56
+ }], hostClass: [{
39
57
  type: HostBinding,
40
58
  args: ['class.k-input-separator']
41
59
  }] } });
@@ -0,0 +1,95 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ChangeDetectorRef, Directive, EventEmitter, Input, NgZone, Output, Renderer2 } from '@angular/core';
6
+ import { Subscription } from 'rxjs';
7
+ import { closest } from '../common/dom-utils';
8
+ import { Keys } from '@progress/kendo-angular-common';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export class SharedInputEventsDirective {
14
+ constructor(ngZone, renderer, cdr) {
15
+ this.ngZone = ngZone;
16
+ this.renderer = renderer;
17
+ this.cdr = cdr;
18
+ this.isFocusedChange = new EventEmitter();
19
+ this.onFocus = new EventEmitter();
20
+ this.handleBlur = new EventEmitter();
21
+ this.subscriptions = new Subscription();
22
+ }
23
+ ngAfterViewInit() {
24
+ const hostElement = this.hostElement.nativeElement;
25
+ let cursorInsideWrapper = false;
26
+ let tabbing = false;
27
+ this.ngZone.runOutsideAngular(() => {
28
+ // focusIn and focusOut are relative to the host element
29
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
30
+ this.cdr.detectChanges();
31
+ if (!this.isFocused) {
32
+ this.ngZone.run(() => {
33
+ this.onFocus.emit();
34
+ this.isFocused = true;
35
+ this.isFocusedChange.emit(this.isFocused);
36
+ });
37
+ }
38
+ }));
39
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (args) => {
40
+ if (!this.isFocused) {
41
+ return;
42
+ }
43
+ if (tabbing) {
44
+ const closestTextbox = closest(args.relatedTarget, (element) => element === hostElement);
45
+ if (!closestTextbox) {
46
+ this.handleBlur.emit();
47
+ }
48
+ tabbing = false;
49
+ }
50
+ else {
51
+ if (!cursorInsideWrapper && !this?.clearButtonClicked) {
52
+ this.handleBlur.emit();
53
+ }
54
+ }
55
+ }));
56
+ this.subscriptions.add(this.renderer.listen(hostElement, 'mouseenter', () => {
57
+ cursorInsideWrapper = true;
58
+ }));
59
+ this.subscriptions.add(this.renderer.listen(hostElement, 'mouseleave', () => {
60
+ cursorInsideWrapper = false;
61
+ }));
62
+ this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
63
+ if (args.keyCode === Keys.Tab) {
64
+ tabbing = true;
65
+ }
66
+ else {
67
+ tabbing = false;
68
+ }
69
+ }));
70
+ });
71
+ }
72
+ ngOnDestroy() {
73
+ this.subscriptions.unsubscribe();
74
+ }
75
+ }
76
+ SharedInputEventsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedInputEventsDirective, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
77
+ SharedInputEventsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SharedInputEventsDirective, selector: "[kendoInputSharedEvents]", inputs: { hostElement: "hostElement", clearButtonClicked: "clearButtonClicked", isFocused: "isFocused" }, outputs: { isFocusedChange: "isFocusedChange", onFocus: "onFocus", handleBlur: "handleBlur" }, ngImport: i0 });
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedInputEventsDirective, decorators: [{
79
+ type: Directive,
80
+ args: [{
81
+ selector: '[kendoInputSharedEvents]'
82
+ }]
83
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostElement: [{
84
+ type: Input
85
+ }], clearButtonClicked: [{
86
+ type: Input
87
+ }], isFocused: [{
88
+ type: Input
89
+ }], isFocusedChange: [{
90
+ type: Output
91
+ }], onFocus: [{
92
+ type: Output
93
+ }], handleBlur: [{
94
+ type: Output
95
+ }] } });