@syncfusion/ej2-inputs 25.2.6 → 26.1.35
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/.eslintrc.json +3 -2
- package/README.md +13 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +1090 -449
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +1050 -389
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/otp-input.d.ts +4 -0
- package/otp-input.js +4 -0
- package/package.json +10 -10
- package/src/form-validator/form-validator.d.ts +6 -3
- package/src/form-validator/form-validator.js +31 -27
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/input/input.d.ts +2 -2
- package/src/input/input.js +63 -56
- package/src/maskedtextbox/base/mask-base.d.ts +1 -1
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +2 -2
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +1 -2
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +6 -7
- package/src/numerictextbox/numerictextbox.d.ts +2 -3
- package/src/numerictextbox/numerictextbox.js +14 -18
- package/src/otp-input/index.d.ts +5 -0
- package/src/otp-input/index.js +4 -0
- package/src/otp-input/otp-input-model.d.ts +142 -0
- package/src/otp-input/otp-input.d.ts +313 -0
- package/src/otp-input/otp-input.js +651 -0
- package/src/rating/rating.d.ts +0 -2
- package/src/rating/rating.js +4 -4
- package/src/slider/slider-model.d.ts +11 -6
- package/src/slider/slider.d.ts +21 -8
- package/src/slider/slider.js +191 -101
- package/src/textarea/textarea-model.d.ts +8 -2
- package/src/textarea/textarea.d.ts +9 -4
- package/src/textarea/textarea.js +17 -21
- package/src/textbox/textbox.d.ts +1 -3
- package/src/textbox/textbox.js +15 -11
- package/src/uploader/uploader.d.ts +1 -3
- package/src/uploader/uploader.js +27 -47
- package/styles/bootstrap-dark.css +1041 -1031
- package/styles/bootstrap-dark.scss +35 -11
- package/styles/bootstrap.css +1040 -1027
- package/styles/bootstrap.scss +35 -11
- package/styles/bootstrap4.css +1097 -1080
- package/styles/bootstrap4.scss +35 -11
- package/styles/bootstrap5-dark.css +1236 -1219
- package/styles/bootstrap5-dark.scss +35 -11
- package/styles/bootstrap5.css +1236 -1219
- package/styles/bootstrap5.scss +35 -11
- package/styles/color-picker/_bds-definition.scss +11 -1
- package/styles/color-picker/_bootstrap-dark-definition.scss +0 -3
- package/styles/color-picker/_bootstrap5-definition.scss +0 -1
- package/styles/color-picker/_bootstrap5.3-definition.scss +132 -0
- package/styles/color-picker/_fabric-dark-definition.scss +0 -3
- package/styles/color-picker/_fluent-definition.scss +0 -1
- package/styles/color-picker/_fluent2-definition.scss +143 -0
- package/styles/color-picker/_fusionnew-definition.scss +0 -1
- package/styles/color-picker/_highcontrast-light-definition.scss +0 -3
- package/styles/color-picker/_layout.scss +69 -34
- package/styles/color-picker/_material-dark-definition.scss +0 -3
- package/styles/color-picker/_material3-definition.scss +0 -1
- package/styles/color-picker/_tailwind-definition.scss +0 -1
- package/styles/color-picker/_theme.scss +13 -2
- package/styles/color-picker/bootstrap-dark.css +54 -20
- package/styles/color-picker/bootstrap.css +54 -20
- package/styles/color-picker/bootstrap4.css +60 -23
- package/styles/color-picker/bootstrap5-dark.css +58 -22
- package/styles/color-picker/bootstrap5.css +58 -22
- package/styles/color-picker/fabric-dark.css +54 -20
- package/styles/color-picker/fabric.css +54 -20
- package/styles/color-picker/fluent-dark.css +54 -20
- package/styles/color-picker/fluent.css +54 -20
- package/styles/color-picker/fluent2.css +2025 -0
- package/styles/color-picker/fluent2.scss +11 -0
- package/styles/color-picker/highcontrast-light.css +54 -20
- package/styles/color-picker/highcontrast.css +54 -20
- package/styles/color-picker/icons/_bootstrap5.3.scss +9 -0
- package/styles/color-picker/icons/_fluent2.scss +9 -0
- package/styles/color-picker/material-dark.css +63 -21
- package/styles/color-picker/material.css +77 -23
- package/styles/color-picker/material3-dark.css +92 -29
- package/styles/color-picker/material3.css +92 -29
- package/styles/color-picker/tailwind-dark.css +54 -21
- package/styles/color-picker/tailwind.css +54 -21
- package/styles/data-form/_bootstrap5.3-definition.scss +41 -0
- package/styles/data-form/_fluent2-definition.scss +41 -0
- package/styles/data-form/_layout.scss +1 -4
- package/styles/data-form/_material3-definition.scss +0 -7
- package/styles/data-form/bootstrap-dark.css +47 -59
- package/styles/data-form/bootstrap.css +47 -59
- package/styles/data-form/bootstrap4.css +47 -59
- package/styles/data-form/bootstrap5-dark.css +47 -59
- package/styles/data-form/bootstrap5.css +47 -59
- package/styles/data-form/fabric-dark.css +47 -59
- package/styles/data-form/fabric.css +47 -59
- package/styles/data-form/fluent-dark.css +47 -59
- package/styles/data-form/fluent.css +47 -59
- package/styles/data-form/fluent2.css +1266 -0
- package/styles/data-form/fluent2.scss +3 -0
- package/styles/data-form/highcontrast-light.css +47 -59
- package/styles/data-form/highcontrast.css +47 -59
- package/styles/data-form/material-dark.css +47 -59
- package/styles/data-form/material.css +47 -59
- package/styles/data-form/material3-dark.css +48 -60
- package/styles/data-form/material3.css +48 -60
- package/styles/data-form/tailwind-dark.css +47 -59
- package/styles/data-form/tailwind.css +47 -59
- package/styles/fabric-dark.css +1015 -988
- package/styles/fabric-dark.scss +35 -11
- package/styles/fabric.css +1015 -988
- package/styles/fabric.scss +35 -11
- package/styles/fluent-dark.css +1081 -1044
- package/styles/fluent-dark.scss +35 -11
- package/styles/fluent.css +1081 -1044
- package/styles/fluent.scss +35 -11
- package/styles/fluent2.css +13375 -0
- package/styles/fluent2.scss +35 -0
- package/styles/highcontrast-light.css +1099 -1179
- package/styles/highcontrast-light.scss +35 -11
- package/styles/highcontrast.css +1096 -1176
- package/styles/highcontrast.scss +35 -11
- package/styles/input/_bds-definition.scss +2 -2
- package/styles/input/_bootstrap5.3-definition.scss +336 -0
- package/styles/input/_fluent2-definition.scss +769 -0
- package/styles/input/_layout.scss +1242 -1939
- package/styles/input/_material-dark-definition.scss +4 -3
- package/styles/input/_material-definition.scss +4 -3
- package/styles/input/_material3-definition.scss +4 -9
- package/styles/input/_theme.scss +929 -1794
- package/styles/input/bootstrap-dark.css +489 -773
- package/styles/input/bootstrap.css +489 -773
- package/styles/input/bootstrap4.css +484 -770
- package/styles/input/bootstrap5-dark.css +488 -787
- package/styles/input/bootstrap5.css +488 -787
- package/styles/input/fabric-dark.css +466 -740
- package/styles/input/fabric.css +466 -740
- package/styles/input/fluent-dark.css +494 -775
- package/styles/input/fluent.css +494 -775
- package/styles/input/fluent2.css +10185 -0
- package/styles/input/fluent2.scss +4 -0
- package/styles/input/highcontrast-light.css +530 -914
- package/styles/input/highcontrast.css +530 -914
- package/styles/input/icons/_bootstrap5.3.scss +17 -0
- package/styles/input/icons/_fluent2.scss +17 -0
- package/styles/input/material-dark.css +1883 -2791
- package/styles/input/material.css +1895 -2791
- package/styles/input/material3-dark.css +1883 -2773
- package/styles/input/material3.css +1883 -2773
- package/styles/input/tailwind-dark.css +464 -749
- package/styles/input/tailwind.css +464 -749
- package/styles/maskedtextbox/_bootstrap5.3-definition.scss +7 -0
- package/styles/maskedtextbox/_fluent2-definition.scss +7 -0
- package/styles/maskedtextbox/_theme.scss +1 -6
- package/styles/maskedtextbox/bootstrap-dark.css +1 -4
- package/styles/maskedtextbox/bootstrap4.css +1 -4
- package/styles/maskedtextbox/bootstrap5-dark.css +1 -4
- package/styles/maskedtextbox/bootstrap5.css +1 -4
- package/styles/maskedtextbox/fabric-dark.css +1 -4
- package/styles/maskedtextbox/fabric.css +1 -4
- package/styles/maskedtextbox/fluent2.css +1244 -0
- package/styles/maskedtextbox/fluent2.scss +4 -0
- package/styles/maskedtextbox/highcontrast-light.css +1 -4
- package/styles/maskedtextbox/highcontrast.css +1 -4
- package/styles/maskedtextbox/material-dark.css +10 -5
- package/styles/maskedtextbox/material.css +24 -7
- package/styles/maskedtextbox/material3-dark.css +25 -8
- package/styles/maskedtextbox/material3.css +25 -8
- package/styles/maskedtextbox/tailwind-dark.css +1 -4
- package/styles/maskedtextbox/tailwind.css +1 -4
- package/styles/material-dark.css +2497 -3126
- package/styles/material-dark.scss +35 -11
- package/styles/material.css +2395 -3052
- package/styles/material.scss +35 -11
- package/styles/material3-dark.css +2656 -3265
- package/styles/material3-dark.scss +35 -11
- package/styles/material3.css +2656 -3265
- package/styles/material3.scss +35 -11
- package/styles/numerictextbox/_bootstrap5.3-definition.scss +3 -0
- package/styles/numerictextbox/_fluent2-definition.scss +3 -0
- package/styles/numerictextbox/bootstrap-dark.css +2 -1
- package/styles/numerictextbox/bootstrap.css +2 -1
- package/styles/numerictextbox/fluent2.css +1261 -0
- package/styles/numerictextbox/fluent2.scss +5 -0
- package/styles/numerictextbox/icons/_bootstrap5.3.scss +11 -0
- package/styles/numerictextbox/icons/_fluent2.scss +11 -0
- package/styles/numerictextbox/material-dark.css +9 -1
- package/styles/numerictextbox/material.css +23 -3
- package/styles/numerictextbox/material3-dark.css +24 -4
- package/styles/numerictextbox/material3.css +24 -4
- package/styles/otp-input/_all.scss +2 -0
- package/styles/otp-input/_bds-definition.scss +58 -0
- package/styles/otp-input/_bootstrap-dark-definition.scss +58 -0
- package/styles/otp-input/_bootstrap-definition.scss +58 -0
- package/styles/otp-input/_bootstrap4-definition.scss +58 -0
- package/styles/otp-input/_bootstrap5-dark-definition.scss +1 -0
- package/styles/otp-input/_bootstrap5-definition.scss +58 -0
- package/styles/otp-input/_bootstrap5.3-definition.scss +58 -0
- package/styles/otp-input/_fabric-dark-definition.scss +58 -0
- package/styles/otp-input/_fabric-definition.scss +58 -0
- package/styles/otp-input/_fluent-dark-definition.scss +1 -0
- package/styles/otp-input/_fluent-definition.scss +58 -0
- package/styles/otp-input/_fluent2-definition.scss +58 -0
- package/styles/otp-input/_fusionnew-definition.scss +58 -0
- package/styles/otp-input/_highcontrast-definition.scss +58 -0
- package/styles/otp-input/_highcontrast-light-definition.scss +58 -0
- package/styles/otp-input/_layout.scss +158 -0
- package/styles/otp-input/_material-dark-definition.scss +58 -0
- package/styles/otp-input/_material-definition.scss +58 -0
- package/styles/otp-input/_material3-dark-definition.scss +1 -0
- package/styles/otp-input/_material3-definition.scss +58 -0
- package/styles/otp-input/_tailwind-dark-definition.scss +1 -0
- package/styles/otp-input/_tailwind-definition.scss +58 -0
- package/styles/otp-input/_theme.scss +67 -0
- package/styles/otp-input/bootstrap-dark.css +225 -0
- package/styles/otp-input/bootstrap-dark.scss +3 -0
- package/styles/otp-input/bootstrap.css +225 -0
- package/styles/otp-input/bootstrap.scss +3 -0
- package/styles/otp-input/bootstrap4.css +225 -0
- package/styles/otp-input/bootstrap4.scss +3 -0
- package/styles/otp-input/bootstrap5-dark.css +225 -0
- package/styles/otp-input/bootstrap5-dark.scss +3 -0
- package/styles/otp-input/bootstrap5.css +225 -0
- package/styles/otp-input/bootstrap5.scss +3 -0
- package/styles/otp-input/fabric-dark.css +225 -0
- package/styles/otp-input/fabric-dark.scss +3 -0
- package/styles/otp-input/fabric.css +225 -0
- package/styles/otp-input/fabric.scss +3 -0
- package/styles/otp-input/fluent-dark.css +225 -0
- package/styles/otp-input/fluent-dark.scss +3 -0
- package/styles/otp-input/fluent.css +225 -0
- package/styles/otp-input/fluent.scss +3 -0
- package/styles/otp-input/fluent2.css +1259 -0
- package/styles/otp-input/fluent2.scss +3 -0
- package/styles/otp-input/highcontrast-light.css +225 -0
- package/styles/otp-input/highcontrast-light.scss +3 -0
- package/styles/otp-input/highcontrast.css +225 -0
- package/styles/otp-input/highcontrast.scss +3 -0
- package/styles/otp-input/material-dark.css +225 -0
- package/styles/otp-input/material-dark.scss +3 -0
- package/styles/otp-input/material.css +225 -0
- package/styles/otp-input/material.scss +3 -0
- package/styles/otp-input/material3-dark.css +280 -0
- package/styles/otp-input/material3-dark.scss +4 -0
- package/styles/otp-input/material3.css +336 -0
- package/styles/otp-input/material3.scss +4 -0
- package/styles/otp-input/tailwind-dark.css +225 -0
- package/styles/otp-input/tailwind-dark.scss +3 -0
- package/styles/otp-input/tailwind.css +225 -0
- package/styles/otp-input/tailwind.scss +3 -0
- package/styles/rating/_bds-definition.scss +2 -2
- package/styles/rating/_bootstrap-dark-definition.scss +2 -2
- package/styles/rating/_bootstrap-definition.scss +2 -2
- package/styles/rating/_bootstrap4-definition.scss +2 -2
- package/styles/rating/_bootstrap5-definition.scss +2 -2
- package/styles/rating/_bootstrap5.3-definition.scss +47 -0
- package/styles/rating/_fabric-dark-definition.scss +2 -2
- package/styles/rating/_fabric-definition.scss +2 -2
- package/styles/rating/_fluent-definition.scss +2 -2
- package/styles/rating/_fluent2-definition.scss +47 -0
- package/styles/rating/_fusionnew-definition.scss +2 -2
- package/styles/rating/_highcontrast-definition.scss +2 -2
- package/styles/rating/_highcontrast-light-definition.scss +2 -2
- package/styles/rating/_layout.scss +22 -46
- package/styles/rating/_material-dark-definition.scss +2 -2
- package/styles/rating/_material-definition.scss +2 -2
- package/styles/rating/_material3-definition.scss +2 -2
- package/styles/rating/_tailwind-definition.scss +2 -2
- package/styles/rating/_theme.scss +1 -1
- package/styles/rating/bootstrap-dark.css +35 -9
- package/styles/rating/bootstrap.css +35 -9
- package/styles/rating/bootstrap4.css +35 -9
- package/styles/rating/bootstrap5-dark.css +35 -9
- package/styles/rating/bootstrap5.css +35 -9
- package/styles/rating/fabric-dark.css +35 -9
- package/styles/rating/fabric.css +35 -9
- package/styles/rating/fluent-dark.css +35 -9
- package/styles/rating/fluent.css +35 -9
- package/styles/rating/fluent2.css +1349 -0
- package/styles/rating/fluent2.scss +4 -0
- package/styles/rating/highcontrast-light.css +35 -9
- package/styles/rating/highcontrast.css +35 -9
- package/styles/rating/material-dark.css +35 -9
- package/styles/rating/material.css +35 -9
- package/styles/rating/material3-dark.css +35 -10
- package/styles/rating/material3.css +35 -10
- package/styles/rating/tailwind-dark.css +34 -9
- package/styles/rating/tailwind.css +34 -9
- package/styles/signature/_bootstrap5.3-definition.scss +3 -0
- package/styles/signature/_fluent2-definition.scss +3 -0
- package/styles/signature/fluent2.css +1043 -0
- package/styles/signature/fluent2.scss +3 -0
- package/styles/signature/material3-dark.css +1 -1
- package/styles/signature/material3.css +1 -1
- package/styles/slider/_bds-definition.scss +1 -0
- package/styles/slider/_bootstrap-dark-definition.scss +1 -0
- package/styles/slider/_bootstrap-definition.scss +1 -0
- package/styles/slider/_bootstrap4-definition.scss +1 -1
- package/styles/slider/_bootstrap5-definition.scss +1 -0
- package/styles/slider/_bootstrap5.3-definition.scss +91 -0
- package/styles/slider/_fluent-definition.scss +2 -0
- package/styles/slider/_fluent2-definition.scss +102 -0
- package/styles/slider/_highcontrast-definition.scss +1 -2
- package/styles/slider/_layout.scss +1623 -1986
- package/styles/slider/_material-dark-definition.scss +2 -2
- package/styles/slider/_material-definition.scss +4 -4
- package/styles/slider/_material3-definition.scss +1 -4
- package/styles/slider/_tailwind-definition.scss +1 -0
- package/styles/slider/_theme.scss +92 -120
- package/styles/slider/bootstrap-dark.css +132 -140
- package/styles/slider/bootstrap.css +132 -140
- package/styles/slider/bootstrap4.css +192 -193
- package/styles/slider/bootstrap5-dark.css +284 -270
- package/styles/slider/bootstrap5.css +284 -270
- package/styles/slider/fabric-dark.css +131 -131
- package/styles/slider/fabric.css +131 -131
- package/styles/slider/fluent-dark.css +170 -155
- package/styles/slider/fluent.css +170 -155
- package/styles/slider/fluent2.css +1642 -0
- package/styles/slider/fluent2.scss +5 -0
- package/styles/slider/highcontrast-light.css +157 -154
- package/styles/slider/highcontrast.css +155 -152
- package/styles/slider/material-dark.css +306 -298
- package/styles/slider/material.css +304 -296
- package/styles/slider/material3-dark.css +577 -535
- package/styles/slider/material3.css +577 -535
- package/styles/slider/tailwind-dark.css +256 -267
- package/styles/slider/tailwind.css +256 -267
- package/styles/tailwind-dark.css +1203 -1201
- package/styles/tailwind-dark.scss +35 -11
- package/styles/tailwind.css +1205 -1203
- package/styles/tailwind.scss +35 -11
- package/styles/textarea/_bootstrap5.3-definition.scss +1 -0
- package/styles/textarea/_fluent2-definition.scss +1 -0
- package/styles/textarea/_layout.scss +1 -1
- package/styles/textarea/bootstrap-dark.css +3 -2
- package/styles/textarea/bootstrap.css +3 -2
- package/styles/textarea/bootstrap4.css +3 -2
- package/styles/textarea/bootstrap5-dark.css +3 -2
- package/styles/textarea/bootstrap5.css +3 -2
- package/styles/textarea/fabric-dark.css +3 -2
- package/styles/textarea/fabric.css +3 -2
- package/styles/textarea/fluent-dark.css +3 -2
- package/styles/textarea/fluent.css +3 -2
- package/styles/textarea/fluent2.css +1247 -0
- package/styles/textarea/fluent2.scss +5 -0
- package/styles/textarea/highcontrast-light.css +3 -2
- package/styles/textarea/highcontrast.css +3 -2
- package/styles/textarea/material-dark.css +12 -3
- package/styles/textarea/material.css +26 -5
- package/styles/textarea/material3-dark.css +27 -6
- package/styles/textarea/material3.css +27 -6
- package/styles/textarea/tailwind-dark.css +3 -2
- package/styles/textarea/tailwind.css +3 -2
- package/styles/textbox/_bootstrap5.3-definition.scss +4 -0
- package/styles/textbox/_fluent2-definition.scss +4 -0
- package/styles/textbox/fluent2.css +1241 -0
- package/styles/textbox/fluent2.scss +4 -0
- package/styles/textbox/material-dark.css +9 -1
- package/styles/textbox/material.css +23 -3
- package/styles/textbox/material3-dark.css +24 -4
- package/styles/textbox/material3.css +24 -4
- package/styles/uploader/_bootstrap5.3-definition.scss +216 -0
- package/styles/uploader/_fluent2-definition.scss +232 -0
- package/styles/uploader/_layout.scss +5 -2
- package/styles/uploader/_material3-definition.scss +0 -24
- package/styles/uploader/_theme.scss +7 -4
- package/styles/uploader/bootstrap-dark.css +47 -12
- package/styles/uploader/bootstrap.css +47 -12
- package/styles/uploader/bootstrap4.css +47 -12
- package/styles/uploader/bootstrap5-dark.css +47 -12
- package/styles/uploader/bootstrap5.css +47 -12
- package/styles/uploader/fabric-dark.css +47 -12
- package/styles/uploader/fabric.css +47 -12
- package/styles/uploader/fluent-dark.css +47 -12
- package/styles/uploader/fluent.css +47 -12
- package/styles/uploader/fluent2.css +1880 -0
- package/styles/uploader/fluent2.scss +6 -0
- package/styles/uploader/highcontrast-light.css +47 -12
- package/styles/uploader/highcontrast.css +47 -12
- package/styles/uploader/icons/_bootstrap5.3.scss +34 -0
- package/styles/uploader/icons/_fluent2.scss +34 -0
- package/styles/uploader/material-dark.css +47 -12
- package/styles/uploader/material.css +47 -12
- package/styles/uploader/material3-dark.css +49 -13
- package/styles/uploader/material3.css +49 -13
- package/styles/uploader/tailwind-dark.css +49 -13
- package/styles/uploader/tailwind.css +49 -13
- package/CHANGELOG.md +0 -1313
|
@@ -36,7 +36,6 @@ export declare class MaskedTextBox extends Component<HTMLInputElement> implement
|
|
|
36
36
|
private formElement;
|
|
37
37
|
private initInputValue;
|
|
38
38
|
private maskOptions;
|
|
39
|
-
private isAngular;
|
|
40
39
|
private preventChange;
|
|
41
40
|
private isClicked;
|
|
42
41
|
private clearButton;
|
|
@@ -240,7 +239,7 @@ export declare class MaskedTextBox extends Component<HTMLInputElement> implement
|
|
|
240
239
|
* Gets the value of the MaskedTextBox with the masked format.
|
|
241
240
|
* By using `value` property, you can get the raw value of maskedtextbox without literals and prompt characters.
|
|
242
241
|
*
|
|
243
|
-
* @returns {string}
|
|
242
|
+
* @returns {string} Returns the value with the masked format.
|
|
244
243
|
*/
|
|
245
244
|
getMaskedValue(): string;
|
|
246
245
|
/**
|
|
@@ -52,7 +52,6 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
52
52
|
function MaskedTextBox(options, element) {
|
|
53
53
|
var _this = _super.call(this, options, element) || this;
|
|
54
54
|
_this.initInputValue = '';
|
|
55
|
-
_this.isAngular = false;
|
|
56
55
|
_this.preventChange = false;
|
|
57
56
|
_this.isClicked = false;
|
|
58
57
|
_this.maskOptions = options;
|
|
@@ -128,7 +127,6 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
128
127
|
var keyEntity = ['value'];
|
|
129
128
|
return this.addOnPersist(keyEntity);
|
|
130
129
|
};
|
|
131
|
-
/* eslint-enable valid-jsdoc, jsdoc/require-returns-description */
|
|
132
130
|
/**
|
|
133
131
|
* Initializes the component rendering.
|
|
134
132
|
*
|
|
@@ -160,9 +158,12 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
160
158
|
if (this.element.getAttribute('value') || this.value) {
|
|
161
159
|
this.element.setAttribute('value', this.element.value);
|
|
162
160
|
}
|
|
163
|
-
if (!isNullOrUndefined(closest(this.element,
|
|
161
|
+
if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
|
|
164
162
|
this.enabled = false;
|
|
165
163
|
}
|
|
164
|
+
if (!this.element.hasAttribute('aria-labelledby') && !this.element.hasAttribute('placeholder')) {
|
|
165
|
+
this.element.setAttribute('aria-label', 'maskedtextbox');
|
|
166
|
+
}
|
|
166
167
|
this.renderComplete();
|
|
167
168
|
}
|
|
168
169
|
};
|
|
@@ -326,7 +327,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
326
327
|
if (this.placeholder && !this.isFocus) {
|
|
327
328
|
this.setMaskPlaceholder(false, false);
|
|
328
329
|
}
|
|
329
|
-
if (this.value ===
|
|
330
|
+
if (this.value === '' && oldProp.value != null) {
|
|
330
331
|
this.element.selectionStart = 0;
|
|
331
332
|
this.element.selectionEnd = 0;
|
|
332
333
|
}
|
|
@@ -405,17 +406,15 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
405
406
|
this.resetMaskedTextBox();
|
|
406
407
|
setMaskValue.call(this, strippedVal);
|
|
407
408
|
};
|
|
408
|
-
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
409
409
|
/**
|
|
410
410
|
* Gets the value of the MaskedTextBox with the masked format.
|
|
411
411
|
* By using `value` property, you can get the raw value of maskedtextbox without literals and prompt characters.
|
|
412
412
|
*
|
|
413
|
-
* @returns {string}
|
|
413
|
+
* @returns {string} Returns the value with the masked format.
|
|
414
414
|
*/
|
|
415
415
|
MaskedTextBox.prototype.getMaskedValue = function () {
|
|
416
416
|
return unstrippedValue.call(this, this.element);
|
|
417
417
|
};
|
|
418
|
-
/* eslint-enable valid-jsdoc, jsdoc/require-returns-description */
|
|
419
418
|
/**
|
|
420
419
|
* Sets the focus to widget for interaction.
|
|
421
420
|
*
|
|
@@ -46,10 +46,8 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
46
46
|
private numericOptions;
|
|
47
47
|
private isInteract;
|
|
48
48
|
private serverDecimalSeparator;
|
|
49
|
-
private isVue;
|
|
50
49
|
private preventChange;
|
|
51
50
|
private elementPrevValue;
|
|
52
|
-
private isAngular;
|
|
53
51
|
private isDynamicChange;
|
|
54
52
|
private inputValue;
|
|
55
53
|
private clearButton;
|
|
@@ -348,6 +346,7 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
348
346
|
/**
|
|
349
347
|
* Returns the value of NumericTextBox with the format applied to the NumericTextBox.
|
|
350
348
|
*
|
|
349
|
+
* @returns {string} - Returns the formatted value of the NumericTextBox.
|
|
351
350
|
*/
|
|
352
351
|
getText(): string;
|
|
353
352
|
/**
|
|
@@ -365,7 +364,7 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
365
364
|
/**
|
|
366
365
|
* Gets the properties to be maintained in the persisted state.
|
|
367
366
|
*
|
|
368
|
-
* @returns {string}
|
|
367
|
+
* @returns {string} - Returns the persisted data.
|
|
369
368
|
*/
|
|
370
369
|
getPersistData(): string;
|
|
371
370
|
/**
|
|
@@ -60,9 +60,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
60
60
|
*/
|
|
61
61
|
function NumericTextBox(options, element) {
|
|
62
62
|
var _this = _super.call(this, options, element) || this;
|
|
63
|
-
_this.isVue = false;
|
|
64
63
|
_this.preventChange = false;
|
|
65
|
-
_this.isAngular = false;
|
|
66
64
|
_this.isDynamicChange = false;
|
|
67
65
|
_this.numericOptions = options;
|
|
68
66
|
return _this;
|
|
@@ -161,6 +159,9 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
161
159
|
if (this.element.hasAttribute('data-val')) {
|
|
162
160
|
this.element.setAttribute('data-val', 'false');
|
|
163
161
|
}
|
|
162
|
+
if (!this.element.hasAttribute('aria-labelledby') && !this.element.hasAttribute('placeholder')) {
|
|
163
|
+
this.element.setAttribute('aria-label', 'numerictextbox');
|
|
164
|
+
}
|
|
164
165
|
if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
|
|
165
166
|
this.enabled = false;
|
|
166
167
|
}
|
|
@@ -625,16 +626,14 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
625
626
|
}
|
|
626
627
|
if (_this.element.selectionStart > 0) {
|
|
627
628
|
if ((_this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === 45) && _this.element.selectionStart > 1) {
|
|
628
|
-
if (isNullOrUndefined(_this.prevVal)) {
|
|
629
|
-
// eslint-disable-next-line no-self-assign
|
|
630
|
-
_this.element.value = _this.element.value;
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
629
|
+
if (!isNullOrUndefined(_this.prevVal)) {
|
|
633
630
|
_this.element.value = _this.prevVal;
|
|
634
631
|
}
|
|
635
632
|
_this.element.setSelectionRange(_this.element.selectionStart, _this.element.selectionStart);
|
|
636
633
|
}
|
|
637
|
-
if (_this.element.value[_this.element.selectionStart - 1] === decimalSeparator &&
|
|
634
|
+
if (_this.element.value[_this.element.selectionStart - 1] === decimalSeparator &&
|
|
635
|
+
_this.decimals === 0 &&
|
|
636
|
+
_this.validateDecimalOnType) {
|
|
638
637
|
_this.element.value = _this.element.value.substring(0, prevPos) +
|
|
639
638
|
_this.element.value.substring(currentPos, _this.element.value.length);
|
|
640
639
|
}
|
|
@@ -663,8 +662,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
663
662
|
}
|
|
664
663
|
};
|
|
665
664
|
NumericTextBox.prototype.inputHandler = function (event) {
|
|
666
|
-
|
|
667
|
-
var numerictextboxObj = this;
|
|
665
|
+
var numerictextboxObj = null || this;
|
|
668
666
|
if (!this.enabled || this.readonly) {
|
|
669
667
|
return;
|
|
670
668
|
}
|
|
@@ -687,7 +685,9 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
687
685
|
var previous = this.instance.getNumberParser({ format: 'n' })(this.elementPrevValue);
|
|
688
686
|
//EJ2-54963-if type "." or ".0" or "-.0" it converts to "0" automatically when binding v-model
|
|
689
687
|
var nonZeroRegex = new RegExp('[^0-9]+$');
|
|
690
|
-
if (nonZeroRegex.test(this.element.value) ||
|
|
688
|
+
if (nonZeroRegex.test(this.element.value) ||
|
|
689
|
+
((this.elementPrevValue.indexOf('.') !== -1 || this.elementPrevValue.indexOf('-') !== -1) &&
|
|
690
|
+
this.element.value[this.element.value.length - 1] === '0')) {
|
|
691
691
|
current = this.value;
|
|
692
692
|
}
|
|
693
693
|
var eventArgs = {
|
|
@@ -999,8 +999,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
999
999
|
if (!this.getElementData(event)) {
|
|
1000
1000
|
return;
|
|
1001
1001
|
}
|
|
1002
|
-
|
|
1003
|
-
var result = this.getElementData(event);
|
|
1002
|
+
this.getElementData(event);
|
|
1004
1003
|
var target = event.currentTarget;
|
|
1005
1004
|
var action = (target.classList.contains(SPINUP)) ? INCREMENT : DECREMENT;
|
|
1006
1005
|
EventHandler.add(target, 'mouseleave', this.mouseUpClick, this);
|
|
@@ -1147,15 +1146,14 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1147
1146
|
}, this.clearButton);
|
|
1148
1147
|
_super.prototype.destroy.call(this);
|
|
1149
1148
|
};
|
|
1150
|
-
/* eslint-disable valid-jsdoc, jsdoc/require-returns */
|
|
1151
1149
|
/**
|
|
1152
1150
|
* Returns the value of NumericTextBox with the format applied to the NumericTextBox.
|
|
1153
1151
|
*
|
|
1152
|
+
* @returns {string} - Returns the formatted value of the NumericTextBox.
|
|
1154
1153
|
*/
|
|
1155
1154
|
NumericTextBox.prototype.getText = function () {
|
|
1156
1155
|
return this.element.value;
|
|
1157
1156
|
};
|
|
1158
|
-
/* eslint-enable valid-jsdoc, jsdoc/require-returns */
|
|
1159
1157
|
/**
|
|
1160
1158
|
* Sets the focus to widget for interaction.
|
|
1161
1159
|
*
|
|
@@ -1178,17 +1176,15 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1178
1176
|
removeClass([this.container], [NUMERIC_FOCUS]);
|
|
1179
1177
|
}
|
|
1180
1178
|
};
|
|
1181
|
-
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
1182
1179
|
/**
|
|
1183
1180
|
* Gets the properties to be maintained in the persisted state.
|
|
1184
1181
|
*
|
|
1185
|
-
* @returns {string}
|
|
1182
|
+
* @returns {string} - Returns the persisted data.
|
|
1186
1183
|
*/
|
|
1187
1184
|
NumericTextBox.prototype.getPersistData = function () {
|
|
1188
1185
|
var keyEntity = ['value'];
|
|
1189
1186
|
return this.addOnPersist(keyEntity);
|
|
1190
1187
|
};
|
|
1191
|
-
/* eslint-enable valid-jsdoc, jsdoc/require-returns-description */
|
|
1192
1188
|
/**
|
|
1193
1189
|
* Calls internally if any of the property value is changed.
|
|
1194
1190
|
*
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { INotifyPropertyChanged, NotifyPropertyChanges, Component, Property, getUniqueID, isNullOrUndefined, addClass, attributes, removeClass, remove, EmitType, Event } from '@syncfusion/ej2-base';
|
|
2
|
+
import {OtpInputType,OtpInputStyle,OtpChangedEventArgs,OtpFocusEventArgs,OtpInputEventArgs} from "./otp-input";
|
|
3
|
+
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface for a class OtpInput
|
|
7
|
+
*/
|
|
8
|
+
export interface OtpInputModel extends ComponentModel{
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the length of the Otp (One-Time Password) to be entered by the user.
|
|
12
|
+
* This determines the number of input fields in the Otp Input.
|
|
13
|
+
*
|
|
14
|
+
* {% codeBlock src='otp-input/length/index.md' %}{% endcodeBlock %}
|
|
15
|
+
*
|
|
16
|
+
* @default 4
|
|
17
|
+
*/
|
|
18
|
+
length?: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the value of the Otp (One-Time Password) input.
|
|
22
|
+
* This can be a string or a number, representing the Otp value entered by the user.
|
|
23
|
+
*
|
|
24
|
+
* {% codeBlock src='otp-input/value/index.md' %}{% endcodeBlock %}
|
|
25
|
+
*
|
|
26
|
+
* @default ''
|
|
27
|
+
* @aspType string
|
|
28
|
+
*/
|
|
29
|
+
value?: string | number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Specifies the input type of the Otp.
|
|
33
|
+
*
|
|
34
|
+
* {% codeBlock src='otp-input/type/index.md' %}{% endcodeBlock %}
|
|
35
|
+
*
|
|
36
|
+
* @isenumeration true
|
|
37
|
+
* @default OtpInputType.Number
|
|
38
|
+
* @asptype OtpInputType
|
|
39
|
+
*/
|
|
40
|
+
type?: string | OtpInputType;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the separator used to separate each input field in the Otp Input component.
|
|
44
|
+
* The separator is displayed between each input field.
|
|
45
|
+
*
|
|
46
|
+
* {% codeBlock src='otp-input/separator/index.md' %}{% endcodeBlock %}
|
|
47
|
+
*
|
|
48
|
+
* @default ''
|
|
49
|
+
*/
|
|
50
|
+
separator?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Specifies the text that is shown as a hint/placeholder until the user focuses on or enters a value in the Otp Input.
|
|
54
|
+
* If a single text is provided, it will be used for all input fields; otherwise, each text letter will be used for each field.
|
|
55
|
+
*
|
|
56
|
+
* {% codeBlock src='otp-input/placeholder/index.md' %}{% endcodeBlock %}
|
|
57
|
+
*
|
|
58
|
+
* @default ''
|
|
59
|
+
*/
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Specifies the style variant for the input fields in the Otp Input component.
|
|
64
|
+
*
|
|
65
|
+
* {% codeBlock src='otp-input/stylingMode/index.md' %}{% endcodeBlock %}
|
|
66
|
+
*
|
|
67
|
+
* @isenumeration true
|
|
68
|
+
* @default OtpInputStyle.Outlined
|
|
69
|
+
* @asptype OtpInputStyle
|
|
70
|
+
*/
|
|
71
|
+
stylingMode?: string | OtpInputStyle;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Specifies whether the Otp input component is disabled.
|
|
75
|
+
* When set to true, the component is disabled and user input is not allowed.
|
|
76
|
+
*
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Defines one or more CSS classes that can be used to customize the appearance of the Otp (One-Time Password) input component.
|
|
83
|
+
*
|
|
84
|
+
* @default ''
|
|
85
|
+
*/
|
|
86
|
+
cssClass?: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Specifies additional HTML attributes to be applied to the Otp (One-Time Password) input component.
|
|
90
|
+
*
|
|
91
|
+
* {% codeBlock src='otp-input/htmlAttributes/index.md' %}{% endcodeBlock %}
|
|
92
|
+
*
|
|
93
|
+
* @default {}
|
|
94
|
+
*/
|
|
95
|
+
htmlAttributes?: { [key: string]: string };
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Defines the ARIA-label attribute for each input field in the Otp (One-Time Password) input component.
|
|
99
|
+
* Each string in the array corresponds to the ARIA-label attribute for each input field.
|
|
100
|
+
*
|
|
101
|
+
* {% codeBlock src='otp-input/ariaLabels/index.md' %}{% endcodeBlock %}
|
|
102
|
+
*
|
|
103
|
+
* @default []
|
|
104
|
+
*/
|
|
105
|
+
ariaLabels?: string[];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Event triggers after the creation of the Otp Input.
|
|
109
|
+
*
|
|
110
|
+
* @event created
|
|
111
|
+
*/
|
|
112
|
+
created?: EmitType<Event>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Event triggers after the value is changed and the Otp input is focused out.
|
|
116
|
+
*
|
|
117
|
+
* @event change
|
|
118
|
+
*/
|
|
119
|
+
valueChanged?: EmitType<OtpChangedEventArgs>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Event triggers when the Otp input is focused.
|
|
123
|
+
*
|
|
124
|
+
* @event focus
|
|
125
|
+
*/
|
|
126
|
+
focus?: EmitType<OtpFocusEventArgs>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Event triggers when the Otp input is focused out.
|
|
130
|
+
*
|
|
131
|
+
* @event blur
|
|
132
|
+
*/
|
|
133
|
+
blur?: EmitType<OtpFocusEventArgs>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Event triggers each time when the value of each Otp input is changed.
|
|
137
|
+
*
|
|
138
|
+
* @event input
|
|
139
|
+
*/
|
|
140
|
+
input?: EmitType<OtpInputEventArgs>;
|
|
141
|
+
|
|
142
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { INotifyPropertyChanged, Component, EmitType } from '@syncfusion/ej2-base';
|
|
2
|
+
import { OtpInputModel } from './otp-input-model';
|
|
3
|
+
/**
|
|
4
|
+
* Specifies the type of input for the Otp (One-Time Password) input component.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum OtpInputType {
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the type of input to be number for the Otp input.
|
|
9
|
+
*/
|
|
10
|
+
Number = "number",
|
|
11
|
+
/**
|
|
12
|
+
* Specifies the type of input to be text for the Otp input.
|
|
13
|
+
*/
|
|
14
|
+
Text = "text",
|
|
15
|
+
/**
|
|
16
|
+
* Specifies the type of input to be password for the Otp input.
|
|
17
|
+
*/
|
|
18
|
+
Password = "password"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the style variant for the Otp (One-Time Password) input component.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum OtpInputStyle {
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the style of the Otp input to be outlined.
|
|
26
|
+
*/
|
|
27
|
+
Outlined = "outlined",
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the style of the Otp input to be underlined.
|
|
30
|
+
*/
|
|
31
|
+
Underlined = "underlined",
|
|
32
|
+
/**
|
|
33
|
+
* Specifies the style of the Otp input to be filled.
|
|
34
|
+
*/
|
|
35
|
+
Filled = "filled"
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Provides information about valueChanged event callback
|
|
39
|
+
*/
|
|
40
|
+
export interface OtpChangedEventArgs {
|
|
41
|
+
/**
|
|
42
|
+
* Provides the Otp input container element.
|
|
43
|
+
*/
|
|
44
|
+
element: HTMLElement;
|
|
45
|
+
/**
|
|
46
|
+
* Provides the original event.
|
|
47
|
+
*/
|
|
48
|
+
event: Event;
|
|
49
|
+
/**
|
|
50
|
+
* Provides whether the change is triggered by user interaction.
|
|
51
|
+
*/
|
|
52
|
+
isInteracted: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Provides the previous value of the Otp input.
|
|
55
|
+
*/
|
|
56
|
+
previousValue: string | number;
|
|
57
|
+
/**
|
|
58
|
+
* Provides the current value of the Otp input.
|
|
59
|
+
*/
|
|
60
|
+
value: string | number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Provides information about focus event callback
|
|
64
|
+
*/
|
|
65
|
+
export interface OtpFocusEventArgs {
|
|
66
|
+
/**
|
|
67
|
+
* Provides the Otp input container element.
|
|
68
|
+
*/
|
|
69
|
+
element: HTMLElement;
|
|
70
|
+
/**
|
|
71
|
+
* Provides the original event.
|
|
72
|
+
*/
|
|
73
|
+
event: Event;
|
|
74
|
+
/**
|
|
75
|
+
* Provides whether the change is triggered by user interaction.
|
|
76
|
+
*/
|
|
77
|
+
isInteracted: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Provides the current value of the Otp input.
|
|
80
|
+
*/
|
|
81
|
+
value: string | number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Provides information about input event callback
|
|
85
|
+
*/
|
|
86
|
+
export interface OtpInputEventArgs {
|
|
87
|
+
/**
|
|
88
|
+
* Provides the Otp input container element.
|
|
89
|
+
*/
|
|
90
|
+
element: HTMLElement;
|
|
91
|
+
/**
|
|
92
|
+
* Provides the original event.
|
|
93
|
+
*/
|
|
94
|
+
event: Event;
|
|
95
|
+
/**
|
|
96
|
+
* Provides the previous value of the Otp input.
|
|
97
|
+
*/
|
|
98
|
+
previousValue: string | number;
|
|
99
|
+
/**
|
|
100
|
+
* Provides the current value of the Otp input.
|
|
101
|
+
*/
|
|
102
|
+
value: string | number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Represents the Otp component that allows the user to enter the otp values.
|
|
106
|
+
* ```html
|
|
107
|
+
* <div id='OTPInput'></div>
|
|
108
|
+
* ```
|
|
109
|
+
* ```typescript
|
|
110
|
+
* <script>
|
|
111
|
+
* var OtpinputObj = new OtpInput();
|
|
112
|
+
* OtpinputObj.appendTo('#OTPInput');
|
|
113
|
+
* </script>
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
export declare class OtpInput extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
117
|
+
/**
|
|
118
|
+
* Specifies the length of the Otp (One-Time Password) to be entered by the user.
|
|
119
|
+
* This determines the number of input fields in the Otp Input.
|
|
120
|
+
*
|
|
121
|
+
* {% codeBlock src='otp-input/length/index.md' %}{% endcodeBlock %}
|
|
122
|
+
*
|
|
123
|
+
* @default 4
|
|
124
|
+
*/
|
|
125
|
+
length: number;
|
|
126
|
+
/**
|
|
127
|
+
* Specifies the value of the Otp (One-Time Password) input.
|
|
128
|
+
* This can be a string or a number, representing the Otp value entered by the user.
|
|
129
|
+
*
|
|
130
|
+
* {% codeBlock src='otp-input/value/index.md' %}{% endcodeBlock %}
|
|
131
|
+
*
|
|
132
|
+
* @default ''
|
|
133
|
+
* @aspType string
|
|
134
|
+
*/
|
|
135
|
+
value: string | number;
|
|
136
|
+
/**
|
|
137
|
+
* Specifies the input type of the Otp.
|
|
138
|
+
*
|
|
139
|
+
* {% codeBlock src='otp-input/type/index.md' %}{% endcodeBlock %}
|
|
140
|
+
*
|
|
141
|
+
* @isenumeration true
|
|
142
|
+
* @default OtpInputType.Number
|
|
143
|
+
* @asptype OtpInputType
|
|
144
|
+
*/
|
|
145
|
+
type: string | OtpInputType;
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the separator used to separate each input field in the Otp Input component.
|
|
148
|
+
* The separator is displayed between each input field.
|
|
149
|
+
*
|
|
150
|
+
* {% codeBlock src='otp-input/separator/index.md' %}{% endcodeBlock %}
|
|
151
|
+
*
|
|
152
|
+
* @default ''
|
|
153
|
+
*/
|
|
154
|
+
separator: string;
|
|
155
|
+
/**
|
|
156
|
+
* Specifies the text that is shown as a hint/placeholder until the user focuses on or enters a value in the Otp Input.
|
|
157
|
+
* If a single text is provided, it will be used for all input fields; otherwise, each text letter will be used for each field.
|
|
158
|
+
*
|
|
159
|
+
* {% codeBlock src='otp-input/placeholder/index.md' %}{% endcodeBlock %}
|
|
160
|
+
*
|
|
161
|
+
* @default ''
|
|
162
|
+
*/
|
|
163
|
+
placeholder: string;
|
|
164
|
+
/**
|
|
165
|
+
* Specifies the style variant for the input fields in the Otp Input component.
|
|
166
|
+
*
|
|
167
|
+
* {% codeBlock src='otp-input/stylingMode/index.md' %}{% endcodeBlock %}
|
|
168
|
+
*
|
|
169
|
+
* @isenumeration true
|
|
170
|
+
* @default OtpInputStyle.Outlined
|
|
171
|
+
* @asptype OtpInputStyle
|
|
172
|
+
*/
|
|
173
|
+
stylingMode: string | OtpInputStyle;
|
|
174
|
+
/**
|
|
175
|
+
* Specifies whether the Otp input component is disabled.
|
|
176
|
+
* When set to true, the component is disabled and user input is not allowed.
|
|
177
|
+
*
|
|
178
|
+
* @default false
|
|
179
|
+
*/
|
|
180
|
+
disabled: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Defines one or more CSS classes that can be used to customize the appearance of the Otp (One-Time Password) input component.
|
|
183
|
+
*
|
|
184
|
+
* @default ''
|
|
185
|
+
*/
|
|
186
|
+
cssClass: string;
|
|
187
|
+
/**
|
|
188
|
+
* Specifies additional HTML attributes to be applied to the Otp (One-Time Password) input component.
|
|
189
|
+
*
|
|
190
|
+
* {% codeBlock src='otp-input/htmlAttributes/index.md' %}{% endcodeBlock %}
|
|
191
|
+
*
|
|
192
|
+
* @default {}
|
|
193
|
+
*/
|
|
194
|
+
htmlAttributes: {
|
|
195
|
+
[key: string]: string;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Defines the ARIA-label attribute for each input field in the Otp (One-Time Password) input component.
|
|
199
|
+
* Each string in the array corresponds to the ARIA-label attribute for each input field.
|
|
200
|
+
*
|
|
201
|
+
* {% codeBlock src='otp-input/ariaLabels/index.md' %}{% endcodeBlock %}
|
|
202
|
+
*
|
|
203
|
+
* @default []
|
|
204
|
+
*/
|
|
205
|
+
ariaLabels: string[];
|
|
206
|
+
/**
|
|
207
|
+
* Event triggers after the creation of the Otp Input.
|
|
208
|
+
*
|
|
209
|
+
* @event created
|
|
210
|
+
*/
|
|
211
|
+
created: EmitType<Event>;
|
|
212
|
+
/**
|
|
213
|
+
* Event triggers after the value is changed and the Otp input is focused out.
|
|
214
|
+
*
|
|
215
|
+
* @event change
|
|
216
|
+
*/
|
|
217
|
+
valueChanged: EmitType<OtpChangedEventArgs>;
|
|
218
|
+
/**
|
|
219
|
+
* Event triggers when the Otp input is focused.
|
|
220
|
+
*
|
|
221
|
+
* @event focus
|
|
222
|
+
*/
|
|
223
|
+
focus: EmitType<OtpFocusEventArgs>;
|
|
224
|
+
/**
|
|
225
|
+
* Event triggers when the Otp input is focused out.
|
|
226
|
+
*
|
|
227
|
+
* @event blur
|
|
228
|
+
*/
|
|
229
|
+
blur: EmitType<OtpFocusEventArgs>;
|
|
230
|
+
/**
|
|
231
|
+
* Event triggers each time when the value of each Otp input is changed.
|
|
232
|
+
*
|
|
233
|
+
* @event input
|
|
234
|
+
*/
|
|
235
|
+
input: EmitType<OtpInputEventArgs>;
|
|
236
|
+
private inputs;
|
|
237
|
+
private previousValue;
|
|
238
|
+
private hiddenInputEle;
|
|
239
|
+
private separatorElements;
|
|
240
|
+
private shouldFireFocus;
|
|
241
|
+
private shouldFireBlur;
|
|
242
|
+
private isFocusInCalled;
|
|
243
|
+
private isFocusOutCalled;
|
|
244
|
+
constructor(options?: OtpInputModel, element?: string | HTMLElement);
|
|
245
|
+
protected preRender(): void;
|
|
246
|
+
render(): void;
|
|
247
|
+
private initialize;
|
|
248
|
+
private renderInputs;
|
|
249
|
+
private createOtpInput;
|
|
250
|
+
private renderSeparator;
|
|
251
|
+
private updateSeparatorValue;
|
|
252
|
+
private addPlaceHolder;
|
|
253
|
+
private updateInputType;
|
|
254
|
+
private getDefaultValue;
|
|
255
|
+
private handleInputChange;
|
|
256
|
+
private handleKeyAction;
|
|
257
|
+
private handleSelection;
|
|
258
|
+
private handleFocus;
|
|
259
|
+
private handleBlur;
|
|
260
|
+
private handlePaste;
|
|
261
|
+
private triggerInputEvent;
|
|
262
|
+
private triggerValuechanged;
|
|
263
|
+
private wireEvents;
|
|
264
|
+
private unWireEvents;
|
|
265
|
+
private updateValueProperty;
|
|
266
|
+
private updateInputValue;
|
|
267
|
+
private updateCssClass;
|
|
268
|
+
private updateVariantClass;
|
|
269
|
+
private updateAriaLabel;
|
|
270
|
+
private updateDisabledState;
|
|
271
|
+
private setElementAttributes;
|
|
272
|
+
private handleLengthChange;
|
|
273
|
+
/**
|
|
274
|
+
* To get component name.
|
|
275
|
+
*
|
|
276
|
+
* @returns {string} - Module Name
|
|
277
|
+
* @private
|
|
278
|
+
*/
|
|
279
|
+
getModuleName(): string;
|
|
280
|
+
/**
|
|
281
|
+
* To get the properties to be maintained in the persisted state.
|
|
282
|
+
*
|
|
283
|
+
* @returns {string} - Persist data
|
|
284
|
+
*/
|
|
285
|
+
protected getPersistData(): string;
|
|
286
|
+
/**
|
|
287
|
+
* Destroy the Otp input.
|
|
288
|
+
*
|
|
289
|
+
* @returns {void}
|
|
290
|
+
*/
|
|
291
|
+
destroy(): void;
|
|
292
|
+
/**
|
|
293
|
+
* Sets the focus to the Otp input for interaction.
|
|
294
|
+
*
|
|
295
|
+
* @returns {void}
|
|
296
|
+
*/
|
|
297
|
+
focusIn(): void;
|
|
298
|
+
/**
|
|
299
|
+
* Remove the focus from Otp input, if it is in focus state.
|
|
300
|
+
*
|
|
301
|
+
* @returns {void}
|
|
302
|
+
*/
|
|
303
|
+
focusOut(): void;
|
|
304
|
+
/**
|
|
305
|
+
* Called internally if any of the property value changed.
|
|
306
|
+
*
|
|
307
|
+
* @param {OtpInputModel} newProp - Specifies new properties
|
|
308
|
+
* @param {OtpInputModel} oldProp - Specifies old properties
|
|
309
|
+
* @returns {void}
|
|
310
|
+
* @private
|
|
311
|
+
*/
|
|
312
|
+
onPropertyChanged(newProp: OtpInputModel, oldProp?: OtpInputModel): void;
|
|
313
|
+
}
|