@progress/kendo-angular-inputs 18.0.1-develop.3 → 18.1.0-develop.10
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.
- package/common/utils.d.ts +4 -0
- package/directives.d.ts +7 -1
- package/esm2022/colorpicker/color-contrast-svg.component.mjs +1 -1
- package/esm2022/common/utils.mjs +4 -0
- package/esm2022/directives.mjs +10 -0
- package/esm2022/index.mjs +3 -0
- package/esm2022/inputs.module.mjs +4 -2
- package/esm2022/otpinput/localization/custom-messages.component.mjs +43 -0
- package/esm2022/otpinput/localization/localized-textbox-messages.directive.mjs +39 -0
- package/esm2022/otpinput/localization/messages.mjs +34 -0
- package/esm2022/otpinput/models/otpinput-type.mjs +5 -0
- package/esm2022/otpinput/models/separator-icon.mjs +5 -0
- package/esm2022/otpinput/otpinput-separator.component.mjs +83 -0
- package/esm2022/otpinput/otpinput.component.mjs +900 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-inputs.mjs +1150 -85
- package/index.d.ts +4 -0
- package/inputs.module.d.ts +3 -1
- package/otpinput/localization/custom-messages.component.d.ts +17 -0
- package/otpinput/localization/localized-textbox-messages.directive.d.ts +16 -0
- package/otpinput/localization/messages.d.ts +24 -0
- package/otpinput/models/otpinput-type.d.ts +10 -0
- package/otpinput/models/separator-icon.d.ts +12 -0
- package/otpinput/otpinput-separator.component.d.ts +25 -0
- package/otpinput/otpinput.component.d.ts +287 -0
- package/package.json +10 -10
package/common/utils.d.ts
CHANGED
|
@@ -65,3 +65,7 @@ export declare const COMPONENT_TYPE: InjectionToken<ComponentType>;
|
|
|
65
65
|
* @hidden
|
|
66
66
|
*/
|
|
67
67
|
export type ComponentType = 'radio' | 'checkbox';
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
export declare const replaceMessagePlaceholder: (message: string, name: string, value: string) => string;
|
package/directives.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ import { TextBoxPrefixTemplateDirective } from "./textbox/textbox-prefix.directi
|
|
|
41
41
|
import { TextBoxSuffixTemplateDirective } from "./textbox/textbox-suffix.directive";
|
|
42
42
|
import { TextBoxComponent } from "./textbox/textbox.component";
|
|
43
43
|
import { TextBoxDirective } from "./textbox/textbox.directive";
|
|
44
|
+
import { OTPInputComponent } from "./otpinput/otpinput.component";
|
|
45
|
+
import { OTPInputCustomMessagesComponent } from "./otpinput/localization/custom-messages.component";
|
|
44
46
|
/**
|
|
45
47
|
* Utility array that contains all `TextBox` related components and directives
|
|
46
48
|
*/
|
|
@@ -53,6 +55,10 @@ export declare const KENDO_NUMERICTEXTBOX: readonly [typeof NumericTextBoxCompon
|
|
|
53
55
|
* Utility array that contains all `MaskedTextBox` related components and directives
|
|
54
56
|
*/
|
|
55
57
|
export declare const KENDO_MASKEDTEXTBOX: readonly [typeof MaskedTextBoxComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent];
|
|
58
|
+
/**
|
|
59
|
+
* Utility array that contains all `OTP` related components and directives
|
|
60
|
+
*/
|
|
61
|
+
export declare const KENDO_OTPINPUT: readonly [typeof OTPInputComponent, typeof OTPInputCustomMessagesComponent];
|
|
56
62
|
/**
|
|
57
63
|
* Utility array that contains all `TextArea` related components and directives
|
|
58
64
|
*/
|
|
@@ -108,4 +114,4 @@ export declare const KENDO_COLORGRADIENT: readonly [typeof ColorGradientComponen
|
|
|
108
114
|
/**
|
|
109
115
|
* Utility array that contains all `@progress/kendo-angular-inputs` related components and directives
|
|
110
116
|
*/
|
|
111
|
-
export declare const KENDO_INPUTS: readonly [typeof TextBoxDirective, typeof TextBoxComponent, typeof InputSeparatorComponent, typeof TextBoxSuffixTemplateDirective, typeof TextBoxPrefixTemplateDirective, typeof TextBoxCustomMessagesComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof NumericTextBoxComponent, typeof NumericTextBoxCustomMessagesComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof MaskedTextBoxComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof TextAreaComponent, typeof TextAreaDirective, typeof TextAreaPrefixComponent, typeof TextAreaSuffixComponent, typeof SeparatorComponent, typeof CheckBoxComponent, typeof CheckBoxDirective, typeof RadioButtonComponent, typeof RadioButtonDirective, typeof SwitchComponent, typeof SwitchCustomMessagesComponent, typeof FormFieldComponent, typeof HintComponent, typeof ErrorComponent, typeof SliderComponent, typeof SliderCustomMessagesComponent, typeof LabelTemplateDirective, typeof RangeSliderComponent, typeof RangeSliderCustomMessagesComponent, typeof LabelTemplateDirective, typeof RatingComponent, typeof RatingItemTemplateDirective, typeof RatingHoveredItemTemplateDirective, typeof RatingSelectedItemTemplateDirective, typeof SignatureComponent, typeof SignatureCustomMessagesComponent, typeof ColorPickerComponent, typeof ColorPickerCustomMessagesComponent, typeof FlatColorPickerComponent, typeof ColorPickerCustomMessagesComponent, typeof ColorGradientComponent, typeof ColorPickerCustomMessagesComponent, typeof ColorPaletteComponent, typeof ColorPickerCustomMessagesComponent];
|
|
117
|
+
export declare const KENDO_INPUTS: readonly [typeof TextBoxDirective, typeof TextBoxComponent, typeof InputSeparatorComponent, typeof TextBoxSuffixTemplateDirective, typeof TextBoxPrefixTemplateDirective, typeof TextBoxCustomMessagesComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof NumericTextBoxComponent, typeof NumericTextBoxCustomMessagesComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof MaskedTextBoxComponent, typeof PrefixTemplateDirective, typeof SuffixTemplateDirective, typeof SeparatorComponent, typeof TextAreaComponent, typeof TextAreaDirective, typeof TextAreaPrefixComponent, typeof TextAreaSuffixComponent, typeof SeparatorComponent, typeof CheckBoxComponent, typeof CheckBoxDirective, typeof RadioButtonComponent, typeof RadioButtonDirective, typeof SwitchComponent, typeof SwitchCustomMessagesComponent, typeof FormFieldComponent, typeof HintComponent, typeof ErrorComponent, typeof SliderComponent, typeof SliderCustomMessagesComponent, typeof LabelTemplateDirective, typeof RangeSliderComponent, typeof RangeSliderCustomMessagesComponent, typeof LabelTemplateDirective, typeof RatingComponent, typeof RatingItemTemplateDirective, typeof RatingHoveredItemTemplateDirective, typeof RatingSelectedItemTemplateDirective, typeof SignatureComponent, typeof SignatureCustomMessagesComponent, typeof ColorPickerComponent, typeof ColorPickerCustomMessagesComponent, typeof FlatColorPickerComponent, typeof ColorPickerCustomMessagesComponent, typeof ColorGradientComponent, typeof ColorPickerCustomMessagesComponent, typeof ColorPaletteComponent, typeof ColorPickerCustomMessagesComponent, typeof OTPInputComponent, typeof OTPInputCustomMessagesComponent];
|
|
@@ -52,7 +52,7 @@ export class ColorContrastSvgComponent {
|
|
|
52
52
|
}
|
|
53
53
|
findValue(contrast, saturation, low, high, comparer) {
|
|
54
54
|
const mid = (low + high) / 2;
|
|
55
|
-
const hsva =
|
|
55
|
+
const hsva = { ...this.hsva.value, s: saturation / this.metrics.width, v: 1 - mid / this.metrics.height };
|
|
56
56
|
const currentContrast = getContrastFromTwoRGBAs(getRGBA(getColorFromHSV(hsva)), getRGBA(this.backgroundColor || ''));
|
|
57
57
|
if (low + 0.5 > high) {
|
|
58
58
|
if (currentContrast < contrast + 1 && currentContrast > contrast - 1) {
|
package/esm2022/common/utils.mjs
CHANGED
|
@@ -86,3 +86,7 @@ export const getStylingClasses = (componentType, stylingOption, previousValue, n
|
|
|
86
86
|
* Used to differentiate between the Radio and CheckBox components in their base class.
|
|
87
87
|
*/
|
|
88
88
|
export const COMPONENT_TYPE = new InjectionToken('TYPE_TOKEN');
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`{\\s*${name}\\s*}`, 'g'), value);
|
package/esm2022/directives.mjs
CHANGED
|
@@ -41,6 +41,8 @@ import { TextBoxPrefixTemplateDirective } from "./textbox/textbox-prefix.directi
|
|
|
41
41
|
import { TextBoxSuffixTemplateDirective } from "./textbox/textbox-suffix.directive";
|
|
42
42
|
import { TextBoxComponent } from "./textbox/textbox.component";
|
|
43
43
|
import { TextBoxDirective } from "./textbox/textbox.directive";
|
|
44
|
+
import { OTPInputComponent } from "./otpinput/otpinput.component";
|
|
45
|
+
import { OTPInputCustomMessagesComponent } from "./otpinput/localization/custom-messages.component";
|
|
44
46
|
/**
|
|
45
47
|
* Utility array that contains all `TextBox` related components and directives
|
|
46
48
|
*/
|
|
@@ -74,6 +76,13 @@ export const KENDO_MASKEDTEXTBOX = [
|
|
|
74
76
|
SuffixTemplateDirective,
|
|
75
77
|
SeparatorComponent
|
|
76
78
|
];
|
|
79
|
+
/**
|
|
80
|
+
* Utility array that contains all `OTP` related components and directives
|
|
81
|
+
*/
|
|
82
|
+
export const KENDO_OTPINPUT = [
|
|
83
|
+
OTPInputComponent,
|
|
84
|
+
OTPInputCustomMessagesComponent
|
|
85
|
+
];
|
|
77
86
|
/**
|
|
78
87
|
* Utility array that contains all `TextArea` related components and directives
|
|
79
88
|
*/
|
|
@@ -193,4 +202,5 @@ export const KENDO_INPUTS = [
|
|
|
193
202
|
...KENDO_FLATCOLORPICKER,
|
|
194
203
|
...KENDO_COLORGRADIENT,
|
|
195
204
|
...KENDO_COLORPALETTE,
|
|
205
|
+
...KENDO_OTPINPUT
|
|
196
206
|
];
|
package/esm2022/index.mjs
CHANGED
|
@@ -78,4 +78,7 @@ export { RatingHoveredItemTemplateDirective } from './rating/directives/rating-h
|
|
|
78
78
|
export { RatingSelectedItemTemplateDirective } from './rating/directives/rating-selected-item.directive';
|
|
79
79
|
export { RatingComponent } from './rating/rating.component';
|
|
80
80
|
export { RatingModule } from './rating.module';
|
|
81
|
+
// OTPInput Component
|
|
82
|
+
export { OTPInputComponent } from './otpinput/otpinput.component';
|
|
83
|
+
export { OTPInputCustomMessagesComponent } from './otpinput/localization/custom-messages.component';
|
|
81
84
|
export * from './directives';
|
|
@@ -48,6 +48,8 @@ import * as i36 from "./colorpicker/localization/custom-messages.component";
|
|
|
48
48
|
import * as i37 from "./colorpicker/flatcolorpicker.component";
|
|
49
49
|
import * as i38 from "./colorpicker/color-gradient.component";
|
|
50
50
|
import * as i39 from "./colorpicker/color-palette.component";
|
|
51
|
+
import * as i40 from "./otpinput/otpinput.component";
|
|
52
|
+
import * as i41 from "./otpinput/localization/custom-messages.component";
|
|
51
53
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
52
54
|
/**
|
|
53
55
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -83,8 +85,8 @@ import * as i39 from "./colorpicker/color-palette.component";
|
|
|
83
85
|
*/
|
|
84
86
|
export class InputsModule {
|
|
85
87
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
86
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent], exports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent] });
|
|
87
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent, i24.SliderComponent, i27.RangeSliderComponent, i29.RatingComponent, i33.SignatureComponent, i35.ColorPickerComponent, i37.FlatColorPickerComponent, i38.ColorGradientComponent, i7.SeparatorComponent] });
|
|
88
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i40.OTPInputComponent, i41.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent], exports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i40.OTPInputComponent, i41.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent] });
|
|
89
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent, i24.SliderComponent, i27.RangeSliderComponent, i29.RatingComponent, i33.SignatureComponent, i35.ColorPickerComponent, i37.FlatColorPickerComponent, i38.ColorGradientComponent, i40.OTPInputComponent, i7.SeparatorComponent] });
|
|
88
90
|
}
|
|
89
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, decorators: [{
|
|
90
92
|
type: NgModule,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, forwardRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { OTPInputMessages } from './messages';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* Custom component messages override default component messages.
|
|
12
|
+
*/
|
|
13
|
+
export class OTPInputCustomMessagesComponent extends OTPInputMessages {
|
|
14
|
+
service;
|
|
15
|
+
constructor(service) {
|
|
16
|
+
super();
|
|
17
|
+
this.service = service;
|
|
18
|
+
}
|
|
19
|
+
get override() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OTPInputCustomMessagesComponent, isStandalone: true, selector: "kendo-otpinput-messages", providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: OTPInputMessages,
|
|
26
|
+
useExisting: forwardRef(() => OTPInputCustomMessagesComponent)
|
|
27
|
+
}
|
|
28
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputCustomMessagesComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{
|
|
33
|
+
providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: OTPInputMessages,
|
|
36
|
+
useExisting: forwardRef(() => OTPInputCustomMessagesComponent)
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
selector: 'kendo-otpinput-messages',
|
|
40
|
+
template: ``,
|
|
41
|
+
standalone: true
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, forwardRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { OTPInputMessages } from './messages';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class LocalizedOTPInputMessagesDirective extends OTPInputMessages {
|
|
14
|
+
service;
|
|
15
|
+
constructor(service) {
|
|
16
|
+
super();
|
|
17
|
+
this.service = service;
|
|
18
|
+
}
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedOTPInputMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedOTPInputMessagesDirective, isStandalone: true, selector: "[kendoOTPInputLocalizedMessages]", providers: [
|
|
21
|
+
{
|
|
22
|
+
provide: OTPInputMessages,
|
|
23
|
+
useExisting: forwardRef(() => LocalizedOTPInputMessagesDirective)
|
|
24
|
+
}
|
|
25
|
+
], usesInheritance: true, ngImport: i0 });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedOTPInputMessagesDirective, decorators: [{
|
|
28
|
+
type: Directive,
|
|
29
|
+
args: [{
|
|
30
|
+
providers: [
|
|
31
|
+
{
|
|
32
|
+
provide: OTPInputMessages,
|
|
33
|
+
useExisting: forwardRef(() => LocalizedOTPInputMessagesDirective)
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
selector: '[kendoOTPInputLocalizedMessages]',
|
|
37
|
+
standalone: true
|
|
38
|
+
}]
|
|
39
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Input } from '@angular/core';
|
|
6
|
+
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export class OTPInputMessages extends ComponentMessages {
|
|
12
|
+
/**
|
|
13
|
+
* The aria-label of the OTP Input. Follows the pattern **Input {currentInput} of {totalInputs}, current value {value}** by default.
|
|
14
|
+
* Тhe default label text when the current input is 1, and the total number of inputs is 4 will be
|
|
15
|
+
* **Input 1 of 4, current value null**.
|
|
16
|
+
*
|
|
17
|
+
* The message consists of several parts - the current input number, the total number of inputs, the current value and a localizable string.
|
|
18
|
+
* To allow for reordering its parts, the `ariaLabel` input accepts a string with placeholders for the current input,
|
|
19
|
+
* total number of inputs and current value. The `{currentInput}`, `{totalInputs}` and `{currentValue}` placeholders will be
|
|
20
|
+
* replaced internally with the respective actual values.
|
|
21
|
+
*/
|
|
22
|
+
ariaLabel;
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: OTPInputMessages, selector: "kendo-otpinput-messages-base", inputs: { ariaLabel: "ariaLabel" }, usesInheritance: true, ngImport: i0 });
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputMessages, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
30
|
+
selector: 'kendo-otpinput-messages-base'
|
|
31
|
+
}]
|
|
32
|
+
}], propDecorators: { ariaLabel: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}] } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, HostBinding, Input } from "@angular/core";
|
|
6
|
+
import { NgClass, NgIf } from "@angular/common";
|
|
7
|
+
import { IconWrapperComponent } from "@progress/kendo-angular-icons";
|
|
8
|
+
import { isPresent } from "@progress/kendo-angular-common";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class OTPInputSeparatorComponent {
|
|
14
|
+
set separator(otpSeparator) {
|
|
15
|
+
this._separator = otpSeparator;
|
|
16
|
+
this.clearSeparator();
|
|
17
|
+
if (!isPresent(otpSeparator)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (typeof otpSeparator === 'string') {
|
|
21
|
+
this.hasText = true;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (typeof otpSeparator.value !== 'string') {
|
|
25
|
+
this.hasSVGIcon = otpSeparator?.type === 'svgIcon';
|
|
26
|
+
this.separatorSVGIcon = otpSeparator.value;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.hasIconClass = otpSeparator?.type === 'iconClass';
|
|
30
|
+
this.hasFontIcon = otpSeparator?.type === 'fontIcon';
|
|
31
|
+
this.separatorIconString = otpSeparator.value;
|
|
32
|
+
}
|
|
33
|
+
get separator() {
|
|
34
|
+
return this._separator;
|
|
35
|
+
}
|
|
36
|
+
wrapperClass = true;
|
|
37
|
+
hasText;
|
|
38
|
+
hasIconClass;
|
|
39
|
+
hasSVGIcon;
|
|
40
|
+
hasFontIcon;
|
|
41
|
+
separatorIconString;
|
|
42
|
+
separatorSVGIcon;
|
|
43
|
+
_separator;
|
|
44
|
+
clearSeparator() {
|
|
45
|
+
this.hasText = false;
|
|
46
|
+
this.hasFontIcon = false;
|
|
47
|
+
this.hasIconClass = false;
|
|
48
|
+
this.hasSVGIcon = false;
|
|
49
|
+
}
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OTPInputSeparatorComponent, isStandalone: true, selector: "kendo-otpinput-separator", inputs: { separator: "separator" }, host: { properties: { "class.k-otp-separator": "this.wrapperClass" } }, exportAs: ["kendoOTPInputSeparator"], ngImport: i0, template: `
|
|
52
|
+
<ng-container *ngIf="hasText">{{this.separator}}</ng-container>
|
|
53
|
+
<span *ngIf="hasIconClass" [ngClass]="separatorIconString"></span>
|
|
54
|
+
<kendo-icon-wrapper
|
|
55
|
+
*ngIf="hasFontIcon || hasSVGIcon"
|
|
56
|
+
[name]="separatorIconString"
|
|
57
|
+
[svgIcon]="separatorSVGIcon"
|
|
58
|
+
></kendo-icon-wrapper>
|
|
59
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OTPInputSeparatorComponent, decorators: [{
|
|
62
|
+
type: Component,
|
|
63
|
+
args: [{
|
|
64
|
+
exportAs: 'kendoOTPInputSeparator',
|
|
65
|
+
selector: 'kendo-otpinput-separator',
|
|
66
|
+
template: `
|
|
67
|
+
<ng-container *ngIf="hasText">{{this.separator}}</ng-container>
|
|
68
|
+
<span *ngIf="hasIconClass" [ngClass]="separatorIconString"></span>
|
|
69
|
+
<kendo-icon-wrapper
|
|
70
|
+
*ngIf="hasFontIcon || hasSVGIcon"
|
|
71
|
+
[name]="separatorIconString"
|
|
72
|
+
[svgIcon]="separatorSVGIcon"
|
|
73
|
+
></kendo-icon-wrapper>
|
|
74
|
+
`,
|
|
75
|
+
standalone: true,
|
|
76
|
+
imports: [NgIf, NgClass, IconWrapperComponent]
|
|
77
|
+
}]
|
|
78
|
+
}], propDecorators: { separator: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], wrapperClass: [{
|
|
81
|
+
type: HostBinding,
|
|
82
|
+
args: ['class.k-otp-separator']
|
|
83
|
+
}] } });
|