@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
package/src/slider/slider.js
CHANGED
|
@@ -227,7 +227,6 @@ var Slider = /** @class */ (function (_super) {
|
|
|
227
227
|
return _this;
|
|
228
228
|
}
|
|
229
229
|
Slider.prototype.preRender = function () {
|
|
230
|
-
// eslint-disable-next-line
|
|
231
230
|
var localeText = { incrementTitle: 'Increase', decrementTitle: 'Decrease' };
|
|
232
231
|
this.l10n = new L10n('slider', localeText, this.locale);
|
|
233
232
|
this.isElementFocused = false;
|
|
@@ -306,6 +305,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
306
305
|
/**
|
|
307
306
|
* To Initialize the control rendering
|
|
308
307
|
*
|
|
308
|
+
* @returns {void}
|
|
309
309
|
* @private
|
|
310
310
|
*/
|
|
311
311
|
Slider.prototype.render = function () {
|
|
@@ -316,7 +316,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
316
316
|
this.setZindex();
|
|
317
317
|
this.renderComplete();
|
|
318
318
|
if (this.element.tagName === 'EJS-SLIDER') {
|
|
319
|
-
if (this.getTheme(this.sliderContainer)
|
|
319
|
+
if (this.getTheme(this.sliderContainer) === 'none') {
|
|
320
320
|
setTimeout(function () {
|
|
321
321
|
_this.refresh();
|
|
322
322
|
}, 0);
|
|
@@ -368,6 +368,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
368
368
|
/**
|
|
369
369
|
* Initialize the rendering
|
|
370
370
|
*
|
|
371
|
+
* @returns {void}
|
|
371
372
|
* @private
|
|
372
373
|
*/
|
|
373
374
|
Slider.prototype.initRender = function () {
|
|
@@ -387,7 +388,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
387
388
|
this.setOrientClass();
|
|
388
389
|
this.hiddenInput = (this.createElement('input', {
|
|
389
390
|
attrs: {
|
|
390
|
-
type: 'hidden', value: (isNullOrUndefined(this.value) ? this.min.toString() : this.value.toString()),
|
|
391
|
+
type: 'hidden', value: (isNullOrUndefined(this.value) ? (isNullOrUndefined(this.min) ? '0' : this.min.toString()) : this.value.toString()),
|
|
391
392
|
name: this.element.getAttribute('name') || this.element.getAttribute('id') ||
|
|
392
393
|
'_' + (Math.random() * 1000).toFixed(0) + 'slider', class: classNames.sliderHiddenInput
|
|
393
394
|
}
|
|
@@ -402,7 +403,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
402
403
|
this.rangeValueUpdate();
|
|
403
404
|
}
|
|
404
405
|
else {
|
|
405
|
-
this.value = isNullOrUndefined(this.value) ? parseFloat(formatUnit(this.min.toString())) : this.value;
|
|
406
|
+
this.value = isNullOrUndefined(this.value) ? (isNullOrUndefined(this.min) ? 0 : parseFloat(formatUnit(this.min.toString()))) : this.value;
|
|
406
407
|
}
|
|
407
408
|
this.previousVal = this.type !== 'Range' ? this.checkHandleValue(parseFloat(formatUnit(this.value.toString()))) :
|
|
408
409
|
[this.checkHandleValue(parseFloat(formatUnit(this.value[0].toString()))),
|
|
@@ -445,6 +446,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
445
446
|
this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
|
|
446
447
|
this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
|
|
447
448
|
this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
|
|
449
|
+
this.isFluent2 = this.getTheme(this.sliderContainer) === 'fluent2';
|
|
448
450
|
this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
|
|
449
451
|
};
|
|
450
452
|
Slider.prototype.createRangeBar = function () {
|
|
@@ -506,7 +508,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
506
508
|
}
|
|
507
509
|
if (this.type !== 'Range') {
|
|
508
510
|
attributes(element, {
|
|
509
|
-
'aria-valuemin': min.toString(), 'aria-valuemax': max.toString()
|
|
511
|
+
'aria-valuemin': isNullOrUndefined(min) ? '0' : min.toString(), 'aria-valuemax': (isNullOrUndefined(max) ? '100' : max.toString())
|
|
510
512
|
});
|
|
511
513
|
}
|
|
512
514
|
else {
|
|
@@ -652,8 +654,12 @@ var Slider = /** @class */ (function (_super) {
|
|
|
652
654
|
}
|
|
653
655
|
};
|
|
654
656
|
Slider.prototype.setEnableRTL = function () {
|
|
655
|
-
this.enableRtl && this.orientation !== 'Vertical'
|
|
657
|
+
if (this.enableRtl && this.orientation !== 'Vertical') {
|
|
658
|
+
addClass([this.sliderContainer], classNames.rtl);
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
656
661
|
removeClass([this.sliderContainer], classNames.rtl);
|
|
662
|
+
}
|
|
657
663
|
var preDir = (this.orientation !== 'Vertical') ? this.horDir : this.verDir;
|
|
658
664
|
if (this.enableRtl) {
|
|
659
665
|
this.horDir = 'right';
|
|
@@ -711,8 +717,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
711
717
|
}
|
|
712
718
|
};
|
|
713
719
|
Slider.prototype.setTooltipContent = function () {
|
|
714
|
-
var content;
|
|
715
|
-
content = this.formatContent(this.tooltipFormatInfo, false);
|
|
720
|
+
var content = this.formatContent(this.tooltipFormatInfo, false);
|
|
716
721
|
var contentTemp = function () {
|
|
717
722
|
return content;
|
|
718
723
|
};
|
|
@@ -891,12 +896,14 @@ var Slider = /** @class */ (function (_super) {
|
|
|
891
896
|
this.tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
|
|
892
897
|
}
|
|
893
898
|
if (this.type === 'Default') {
|
|
894
|
-
setTimeout(function () { if (_this.tooltipElement)
|
|
895
|
-
_this.tooltipElement.style.transition = _this.transition.handle;
|
|
899
|
+
setTimeout(function () { if (_this.tooltipElement) {
|
|
900
|
+
_this.tooltipElement.style.transition = _this.transition.handle;
|
|
901
|
+
} }, 2500);
|
|
896
902
|
}
|
|
897
903
|
else {
|
|
898
|
-
setTimeout(function () { if (_this.tooltipElement)
|
|
899
|
-
_this.tooltipElement.style.transition = 'none';
|
|
904
|
+
setTimeout(function () { if (_this.tooltipElement) {
|
|
905
|
+
_this.tooltipElement.style.transition = 'none';
|
|
906
|
+
} }, 2500);
|
|
900
907
|
}
|
|
901
908
|
}
|
|
902
909
|
};
|
|
@@ -915,8 +922,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
915
922
|
this.tooltipElement.classList.remove(classNames.materialTooltipOpen);
|
|
916
923
|
this.setTooltipTransform();
|
|
917
924
|
this.tooltipTarget = undefined;
|
|
918
|
-
setTimeout(function () { if (_this.tooltipElement)
|
|
919
|
-
_this.tooltipElement.style.transition = 'none';
|
|
925
|
+
setTimeout(function () { if (_this.tooltipElement) {
|
|
926
|
+
_this.tooltipElement.style.transition = 'none';
|
|
927
|
+
} }, 2500);
|
|
920
928
|
}
|
|
921
929
|
};
|
|
922
930
|
Slider.prototype.checkTooltipPosition = function (args) {
|
|
@@ -942,8 +950,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
942
950
|
};
|
|
943
951
|
Slider.prototype.setTooltipTransform = function () {
|
|
944
952
|
var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
|
|
945
|
-
if (isNullOrUndefined(this.tooltipElement))
|
|
953
|
+
if (isNullOrUndefined(this.tooltipElement)) {
|
|
946
954
|
return;
|
|
955
|
+
}
|
|
947
956
|
if (this.tooltipElement.firstElementChild.innerText.length > 4) {
|
|
948
957
|
this.tooltipElement.style.transform = transformProperties.translate + " scale(0.01)";
|
|
949
958
|
}
|
|
@@ -953,7 +962,8 @@ var Slider = /** @class */ (function (_super) {
|
|
|
953
962
|
};
|
|
954
963
|
Slider.prototype.renderTooltip = function () {
|
|
955
964
|
this.tooltipObj = new Tooltip({
|
|
956
|
-
showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 ||
|
|
965
|
+
showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 ||
|
|
966
|
+
this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent || this.isFluent2,
|
|
957
967
|
cssClass: classNames.sliderTooltip,
|
|
958
968
|
height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
|
|
959
969
|
animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
|
|
@@ -1025,13 +1035,21 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1025
1035
|
var value;
|
|
1026
1036
|
if (args.target.parentElement.classList.contains(classNames.firstButton)
|
|
1027
1037
|
|| args.target.classList.contains(classNames.firstButton)) {
|
|
1028
|
-
|
|
1029
|
-
|
|
1038
|
+
if (enabledRTL) {
|
|
1039
|
+
value = this.add(hVal, parseFloat(this.step.toString()), true);
|
|
1040
|
+
}
|
|
1041
|
+
else {
|
|
1042
|
+
value = this.add(hVal, parseFloat(this.step.toString()), false);
|
|
1043
|
+
}
|
|
1030
1044
|
}
|
|
1031
1045
|
else if (args.target.parentElement.classList.contains(classNames.secondButton)
|
|
1032
1046
|
|| (args.target.classList.contains(classNames.secondButton))) {
|
|
1033
|
-
|
|
1034
|
-
|
|
1047
|
+
if (enabledRTL) {
|
|
1048
|
+
value = this.add(hVal, parseFloat(this.step.toString()), false);
|
|
1049
|
+
}
|
|
1050
|
+
else {
|
|
1051
|
+
value = this.add(hVal, parseFloat(this.step.toString()), true);
|
|
1052
|
+
}
|
|
1035
1053
|
}
|
|
1036
1054
|
if (this.limits.enabled) {
|
|
1037
1055
|
value = this.getLimitCorrectedValues(value);
|
|
@@ -1082,11 +1100,8 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1082
1100
|
}
|
|
1083
1101
|
return tickCount;
|
|
1084
1102
|
};
|
|
1085
|
-
// tslint:disable-next-line:max-func-body-length
|
|
1086
1103
|
Slider.prototype.renderScale = function () {
|
|
1087
|
-
var liElementPosition = 0;
|
|
1088
1104
|
var orien = this.orientation === 'Vertical' ? 'v' : 'h';
|
|
1089
|
-
var spanText;
|
|
1090
1105
|
this.noOfDecimals = this.numberOfDecimals(this.step);
|
|
1091
1106
|
this.ul = this.createElement('ul', {
|
|
1092
1107
|
className: classNames.scale + ' ' + 'e-' + orien + '-scale ' + classNames.tick + '-' + this.ticks.placement.toLowerCase(),
|
|
@@ -1098,8 +1113,12 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1098
1113
|
}
|
|
1099
1114
|
var smallStep = this.ticks.smallStep;
|
|
1100
1115
|
if (!this.ticks.showSmallTicks) {
|
|
1101
|
-
this.ticks.largeStep > 0
|
|
1102
|
-
|
|
1116
|
+
if (this.ticks.largeStep > 0) {
|
|
1117
|
+
smallStep = this.ticks.largeStep;
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
smallStep = (parseFloat(formatUnit(this.max))) - (parseFloat(formatUnit(this.min)));
|
|
1121
|
+
}
|
|
1103
1122
|
}
|
|
1104
1123
|
else if (smallStep <= 0) {
|
|
1105
1124
|
smallStep = parseFloat(formatUnit(this.step));
|
|
@@ -1170,7 +1189,12 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1170
1189
|
if (islargeTick) {
|
|
1171
1190
|
li.classList.add(classNames.large);
|
|
1172
1191
|
}
|
|
1173
|
-
(orien === 'h')
|
|
1192
|
+
if (orien === 'h') {
|
|
1193
|
+
li.style.width = tickWidth + '%';
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
li.style.height = tickWidth + '%';
|
|
1197
|
+
}
|
|
1174
1198
|
var repeat = islargeTick ? (this.ticks.placement === 'Both' ? 2 : 1) : 0;
|
|
1175
1199
|
if (islargeTick) {
|
|
1176
1200
|
for (var j = 0; j < repeat; j++) {
|
|
@@ -1234,7 +1258,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1234
1258
|
});
|
|
1235
1259
|
li.appendChild(span);
|
|
1236
1260
|
if (isNullOrUndefined(this.customValues)) {
|
|
1237
|
-
this.formatTicksValue(li, start, span
|
|
1261
|
+
this.formatTicksValue(li, start, span);
|
|
1238
1262
|
}
|
|
1239
1263
|
else {
|
|
1240
1264
|
if (this.enableHtmlSanitizer) {
|
|
@@ -1245,7 +1269,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1245
1269
|
}
|
|
1246
1270
|
}
|
|
1247
1271
|
};
|
|
1248
|
-
Slider.prototype.formatTicksValue = function (li, start, spanElement
|
|
1272
|
+
Slider.prototype.formatTicksValue = function (li, start, spanElement) {
|
|
1249
1273
|
var _this = this;
|
|
1250
1274
|
var tickText = this.formatNumber(start);
|
|
1251
1275
|
var text = !isNullOrUndefined(this.ticks) && !isNullOrUndefined(this.ticks.format) ?
|
|
@@ -1265,19 +1289,21 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1265
1289
|
};
|
|
1266
1290
|
Slider.prototype.scaleAlignment = function () {
|
|
1267
1291
|
this.tickValuePosition();
|
|
1268
|
-
var smallTick = 12;
|
|
1269
|
-
var largeTick = 20;
|
|
1270
|
-
var half = largeTick / 2;
|
|
1271
|
-
var orien = this.orientation === 'Vertical' ? 'v' : 'h';
|
|
1272
1292
|
if (this.orientation === 'Vertical') {
|
|
1273
|
-
(this.element.getBoundingClientRect().width <= 15)
|
|
1274
|
-
this.sliderContainer.classList.add(classNames.sliderSmallSize)
|
|
1293
|
+
if (this.element.getBoundingClientRect().width <= 15) {
|
|
1294
|
+
this.sliderContainer.classList.add(classNames.sliderSmallSize);
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1275
1297
|
this.sliderContainer.classList.remove(classNames.sliderSmallSize);
|
|
1298
|
+
}
|
|
1276
1299
|
}
|
|
1277
1300
|
else {
|
|
1278
|
-
(this.element.getBoundingClientRect().height <= 15)
|
|
1279
|
-
this.sliderContainer.classList.add(classNames.sliderSmallSize)
|
|
1301
|
+
if (this.element.getBoundingClientRect().height <= 15) {
|
|
1302
|
+
this.sliderContainer.classList.add(classNames.sliderSmallSize);
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1280
1305
|
this.sliderContainer.classList.remove(classNames.sliderSmallSize);
|
|
1306
|
+
}
|
|
1281
1307
|
}
|
|
1282
1308
|
};
|
|
1283
1309
|
Slider.prototype.tickValuePosition = function () {
|
|
@@ -1371,13 +1397,22 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1371
1397
|
attributes(element, { 'aria-valuenow': valuenow, 'aria-valuetext': text });
|
|
1372
1398
|
}
|
|
1373
1399
|
else {
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
attributes(element, { 'aria-valuenow': valuenow.split(' - ')[1], 'aria-valuetext': ariaValueText[1] })
|
|
1380
|
-
|
|
1400
|
+
if (!this.enableRtl) {
|
|
1401
|
+
if (element === this.firstHandle) {
|
|
1402
|
+
attributes(element, { 'aria-valuenow': valuenow.split(' - ')[0], 'aria-valuetext': ariaValueText[0] });
|
|
1403
|
+
}
|
|
1404
|
+
else {
|
|
1405
|
+
attributes(element, { 'aria-valuenow': valuenow.split(' - ')[1], 'aria-valuetext': ariaValueText[1] });
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
else {
|
|
1409
|
+
if (element === this.firstHandle) {
|
|
1410
|
+
attributes(element, { 'aria-valuenow': valuenow.split(' - ')[1], 'aria-valuetext': ariaValueText[1] });
|
|
1411
|
+
}
|
|
1412
|
+
else {
|
|
1413
|
+
attributes(element, { 'aria-valuenow': valuenow.split(' - ')[0], 'aria-valuetext': ariaValueText[0] });
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1381
1416
|
}
|
|
1382
1417
|
};
|
|
1383
1418
|
Slider.prototype.handleValueUpdate = function () {
|
|
@@ -1422,27 +1457,39 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1422
1457
|
var hVal = this.handleValueUpdate();
|
|
1423
1458
|
if ((args.keyCode === 40) || (args.keyCode === 37)
|
|
1424
1459
|
|| args.currentTarget.classList.contains(classNames.firstButton)) {
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1460
|
+
if (enabledRTL) {
|
|
1461
|
+
value = this.add(hVal, parseFloat(this.step.toString()), true);
|
|
1462
|
+
}
|
|
1463
|
+
else {
|
|
1464
|
+
value = this.add(hVal, parseFloat(this.step.toString()), false);
|
|
1465
|
+
}
|
|
1428
1466
|
}
|
|
1429
1467
|
else if ((args.keyCode === 38) || (args.keyCode === 39) ||
|
|
1430
1468
|
args.currentTarget.classList.contains(classNames.secondButton)) {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1469
|
+
if (enabledRTL) {
|
|
1470
|
+
value = this.add(hVal, parseFloat(this.step.toString()), false);
|
|
1471
|
+
}
|
|
1472
|
+
else {
|
|
1473
|
+
value = this.add(hVal, parseFloat(this.step.toString()), true);
|
|
1474
|
+
}
|
|
1434
1475
|
}
|
|
1435
1476
|
else if ((args.keyCode === 33
|
|
1436
1477
|
|| args.currentTarget.classList.contains(classNames.firstButton))) {
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1478
|
+
if (enabledRTL) {
|
|
1479
|
+
value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false);
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true);
|
|
1483
|
+
}
|
|
1440
1484
|
}
|
|
1441
1485
|
else if ((args.keyCode === 34) ||
|
|
1442
1486
|
args.currentTarget.classList.contains(classNames.secondButton)) {
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1487
|
+
if (enabledRTL) {
|
|
1488
|
+
value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true);
|
|
1489
|
+
}
|
|
1490
|
+
else {
|
|
1491
|
+
value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false);
|
|
1492
|
+
}
|
|
1446
1493
|
}
|
|
1447
1494
|
else if ((args.keyCode === 36)) {
|
|
1448
1495
|
value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
|
|
@@ -1470,13 +1517,20 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1470
1517
|
};
|
|
1471
1518
|
Slider.prototype.tooltipToggle = function (target) {
|
|
1472
1519
|
if (this.isMaterialTooltip) {
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1520
|
+
if (!this.tooltipElement.classList.contains(classNames.materialTooltipOpen)) {
|
|
1521
|
+
this.openMaterialTooltip();
|
|
1522
|
+
}
|
|
1523
|
+
else {
|
|
1524
|
+
this.refreshTooltip(this.firstHandle);
|
|
1525
|
+
}
|
|
1476
1526
|
}
|
|
1477
1527
|
else {
|
|
1478
|
-
|
|
1479
|
-
|
|
1528
|
+
if (!this.tooltipElement) {
|
|
1529
|
+
this.openTooltip(target);
|
|
1530
|
+
}
|
|
1531
|
+
else {
|
|
1532
|
+
this.refreshTooltip(target);
|
|
1533
|
+
}
|
|
1480
1534
|
}
|
|
1481
1535
|
};
|
|
1482
1536
|
Slider.prototype.buttonUp = function (args) {
|
|
@@ -1490,14 +1544,21 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1490
1544
|
Slider.prototype.setRangeBar = function () {
|
|
1491
1545
|
if (this.orientation === 'Horizontal' && !isNullOrUndefined(this.rangeBar)) {
|
|
1492
1546
|
if (this.type === 'MinRange') {
|
|
1493
|
-
|
|
1494
|
-
|
|
1547
|
+
if (this.enableRtl) {
|
|
1548
|
+
this.rangeBar.style.right = '0px';
|
|
1549
|
+
}
|
|
1550
|
+
else {
|
|
1551
|
+
this.rangeBar.style.left = '0px';
|
|
1552
|
+
}
|
|
1495
1553
|
setStyleAttribute(this.rangeBar, { 'width': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
1496
1554
|
}
|
|
1497
1555
|
else {
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1556
|
+
if (this.enableRtl) {
|
|
1557
|
+
this.rangeBar.style.right = this.handlePos1 + 'px';
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
this.rangeBar.style.left = this.handlePos1 + 'px';
|
|
1561
|
+
}
|
|
1501
1562
|
setStyleAttribute(this.rangeBar, { 'width': this.handlePos2 - this.handlePos1 + 'px' });
|
|
1502
1563
|
}
|
|
1503
1564
|
}
|
|
@@ -1601,10 +1662,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1601
1662
|
this.checkHandleValue(parseFloat(this.value.toString()));
|
|
1602
1663
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
1603
1664
|
this.preHandlePos1 = this.handlePos1;
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
this.activeHandle = this.activeHandle;
|
|
1665
|
+
if (isNullOrUndefined(this.activeHandle)) {
|
|
1666
|
+
this.activeHandle = this.type === 'Range' ? 2 : 1;
|
|
1667
|
+
}
|
|
1608
1668
|
if (this.type === 'Default' || this.type === 'MinRange') {
|
|
1609
1669
|
if (this.limits.enabled) {
|
|
1610
1670
|
var values = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
|
|
@@ -1664,10 +1724,16 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1664
1724
|
}
|
|
1665
1725
|
this.handleStart();
|
|
1666
1726
|
handle.forEach(function (handle) {
|
|
1727
|
+
if (isNullOrUndefined(handle)) {
|
|
1728
|
+
return;
|
|
1729
|
+
}
|
|
1667
1730
|
if (_this.orientation === 'Horizontal') {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1731
|
+
if (_this.enableRtl) {
|
|
1732
|
+
handle.style.right = pos + "px";
|
|
1733
|
+
}
|
|
1734
|
+
else {
|
|
1735
|
+
handle.style.left = pos + "px";
|
|
1736
|
+
}
|
|
1671
1737
|
}
|
|
1672
1738
|
else {
|
|
1673
1739
|
handle.style.bottom = pos + "px";
|
|
@@ -1819,12 +1885,13 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1819
1885
|
/**
|
|
1820
1886
|
* It is used to reposition slider.
|
|
1821
1887
|
*
|
|
1822
|
-
* @returns void
|
|
1888
|
+
* @returns {void}
|
|
1823
1889
|
*/
|
|
1824
1890
|
Slider.prototype.reposition = function () {
|
|
1825
1891
|
var _this = this;
|
|
1826
|
-
if (!isNullOrUndefined(this.firstHandle))
|
|
1892
|
+
if (!isNullOrUndefined(this.firstHandle)) {
|
|
1827
1893
|
this.firstHandle.style.transition = 'none';
|
|
1894
|
+
}
|
|
1828
1895
|
if (this.type !== 'Default' && !isNullOrUndefined(this.rangeBar)) {
|
|
1829
1896
|
this.rangeBar.style.transition = 'none';
|
|
1830
1897
|
}
|
|
@@ -1836,26 +1903,38 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1836
1903
|
this.handlePos2 = this.checkHandlePosition(this.handleVal2);
|
|
1837
1904
|
}
|
|
1838
1905
|
if (this.orientation === 'Horizontal') {
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1906
|
+
if (this.enableRtl) {
|
|
1907
|
+
this.firstHandle.style.right = this.handlePos1 + "px";
|
|
1908
|
+
}
|
|
1909
|
+
else {
|
|
1910
|
+
this.firstHandle.style.left = this.handlePos1 + "px";
|
|
1911
|
+
}
|
|
1842
1912
|
if (this.isMaterialTooltip && !isNullOrUndefined(this.materialHandle)) {
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1913
|
+
if (this.enableRtl) {
|
|
1914
|
+
this.materialHandle.style.right = this.handlePos1 + "px";
|
|
1915
|
+
}
|
|
1916
|
+
else {
|
|
1917
|
+
this.materialHandle.style.left = this.handlePos1 + "px";
|
|
1918
|
+
}
|
|
1846
1919
|
}
|
|
1847
1920
|
if (this.type === 'MinRange' && !isNullOrUndefined(this.rangeBar)) {
|
|
1848
|
-
|
|
1849
|
-
|
|
1921
|
+
if (this.enableRtl) {
|
|
1922
|
+
this.rangeBar.style.right = '0px';
|
|
1923
|
+
}
|
|
1924
|
+
else {
|
|
1925
|
+
this.rangeBar.style.left = '0px';
|
|
1926
|
+
}
|
|
1850
1927
|
setStyleAttribute(this.rangeBar, { 'width': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
1851
1928
|
}
|
|
1852
1929
|
else if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle) && !isNullOrUndefined(this.rangeBar)) {
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
this.
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
this.
|
|
1930
|
+
if (this.enableRtl) {
|
|
1931
|
+
this.secondHandle.style.right = this.handlePos2 + "px";
|
|
1932
|
+
this.rangeBar.style.right = this.handlePos1 + 'px';
|
|
1933
|
+
}
|
|
1934
|
+
else {
|
|
1935
|
+
this.secondHandle.style.left = this.handlePos2 + "px";
|
|
1936
|
+
this.rangeBar.style.left = this.handlePos1 + 'px';
|
|
1937
|
+
}
|
|
1859
1938
|
setStyleAttribute(this.rangeBar, { 'width': this.handlePos2 - this.handlePos1 + 'px' });
|
|
1860
1939
|
}
|
|
1861
1940
|
}
|
|
@@ -1885,8 +1964,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1885
1964
|
this.handleStart();
|
|
1886
1965
|
if (!this.tooltip.isVisible) {
|
|
1887
1966
|
setTimeout(function () {
|
|
1888
|
-
if (!isNullOrUndefined(_this.firstHandle))
|
|
1967
|
+
if (!isNullOrUndefined(_this.firstHandle)) {
|
|
1889
1968
|
_this.firstHandle.style.transition = _this.scaleTransform;
|
|
1969
|
+
}
|
|
1890
1970
|
if (_this.type === 'Range' && !isNullOrUndefined(_this.secondHandle)) {
|
|
1891
1971
|
_this.secondHandle.style.transition = _this.scaleTransform;
|
|
1892
1972
|
}
|
|
@@ -1932,7 +2012,6 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1932
2012
|
this.setHandlePosition(null);
|
|
1933
2013
|
}
|
|
1934
2014
|
};
|
|
1935
|
-
// eslint-disable-next-line
|
|
1936
2015
|
Slider.prototype.tempStartEnd = function () {
|
|
1937
2016
|
if (this.min > this.max) {
|
|
1938
2017
|
return {
|
|
@@ -1947,7 +2026,6 @@ var Slider = /** @class */ (function (_super) {
|
|
|
1947
2026
|
};
|
|
1948
2027
|
}
|
|
1949
2028
|
};
|
|
1950
|
-
// eslint-disable-next-line
|
|
1951
2029
|
Slider.prototype.xyToPosition = function (position) {
|
|
1952
2030
|
var pos;
|
|
1953
2031
|
if (this.min === this.max) {
|
|
@@ -2023,7 +2101,6 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2023
2101
|
};
|
|
2024
2102
|
Slider.prototype.sliderBarClick = function (evt) {
|
|
2025
2103
|
evt.preventDefault();
|
|
2026
|
-
// eslint-disable-next-line
|
|
2027
2104
|
var pos;
|
|
2028
2105
|
if (evt.type === 'mousedown' || evt.type === 'mouseup' || evt.type === 'click') {
|
|
2029
2106
|
pos = { x: evt.clientX, y: evt.clientY };
|
|
@@ -2076,7 +2153,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2076
2153
|
var eventX = evt.clientX, eventY = evt.clientY;
|
|
2077
2154
|
behindElement = document.elementFromPoint(eventX, eventY);
|
|
2078
2155
|
}
|
|
2079
|
-
if (evt.target === handle && behindElement
|
|
2156
|
+
if (evt.target === handle && behindElement !== handle) {
|
|
2080
2157
|
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
2081
2158
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
2082
2159
|
this.materialChange();
|
|
@@ -2098,7 +2175,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2098
2175
|
if (this.isMaterialTooltip) {
|
|
2099
2176
|
this.initialTooltip = false;
|
|
2100
2177
|
}
|
|
2101
|
-
if (evt.target
|
|
2178
|
+
if (evt.target !== handle) {
|
|
2102
2179
|
this.changeEvent('changed', evt);
|
|
2103
2180
|
}
|
|
2104
2181
|
if (this.type !== 'Default') {
|
|
@@ -2494,8 +2571,13 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2494
2571
|
}
|
|
2495
2572
|
}
|
|
2496
2573
|
if (this.type === 'Range') {
|
|
2497
|
-
|
|
2498
|
-
|
|
2574
|
+
var previousSibling = event.target.previousSibling;
|
|
2575
|
+
if (previousSibling && previousSibling.classList.contains(classNames.sliderHandle)) {
|
|
2576
|
+
this.activeHandle = 2;
|
|
2577
|
+
}
|
|
2578
|
+
else {
|
|
2579
|
+
this.activeHandle = 1;
|
|
2580
|
+
}
|
|
2499
2581
|
}
|
|
2500
2582
|
this.getHandle().focus();
|
|
2501
2583
|
this.tooltipToggle(this.getHandle());
|
|
@@ -2665,6 +2747,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2665
2747
|
/**
|
|
2666
2748
|
* Get the properties to be maintained in the persisted state.
|
|
2667
2749
|
*
|
|
2750
|
+
* @returns {string} - Returns the string
|
|
2668
2751
|
* @private
|
|
2669
2752
|
*/
|
|
2670
2753
|
Slider.prototype.getPersistData = function () {
|
|
@@ -2676,7 +2759,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2676
2759
|
* Also it removes the attributes and classes.
|
|
2677
2760
|
*
|
|
2678
2761
|
* @method destroy
|
|
2679
|
-
* @
|
|
2762
|
+
* @returns {void}
|
|
2680
2763
|
*/
|
|
2681
2764
|
Slider.prototype.destroy = function () {
|
|
2682
2765
|
_super.prototype.destroy.call(this);
|
|
@@ -2687,7 +2770,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2687
2770
|
if (this.type === 'Range') {
|
|
2688
2771
|
this.secondHandle.removeAttribute('aria-orientation');
|
|
2689
2772
|
}
|
|
2690
|
-
this.sliderContainer.parentNode
|
|
2773
|
+
if (this.sliderContainer.parentNode) {
|
|
2774
|
+
this.sliderContainer.parentNode.insertBefore(this.element, this.sliderContainer);
|
|
2775
|
+
}
|
|
2691
2776
|
detach(this.sliderContainer);
|
|
2692
2777
|
if (this.tooltip.isVisible) {
|
|
2693
2778
|
this.tooltipObj.destroy();
|
|
@@ -2715,9 +2800,11 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2715
2800
|
/**
|
|
2716
2801
|
* Calls internally if any of the property value is changed.
|
|
2717
2802
|
*
|
|
2803
|
+
* @param {SliderModel} newProp - Specifies the new properties
|
|
2804
|
+
* @param {SliderModel} oldProp - Specifies the old properties
|
|
2805
|
+
* @returns {void}
|
|
2718
2806
|
* @private
|
|
2719
2807
|
*/
|
|
2720
|
-
// tslint:disable-next-line
|
|
2721
2808
|
Slider.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
2722
2809
|
var _this = this;
|
|
2723
2810
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
@@ -2877,8 +2964,9 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2877
2964
|
if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
2878
2965
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
2879
2966
|
}
|
|
2880
|
-
if (!isNullOrUndefined(this.firstHandle))
|
|
2967
|
+
if (!isNullOrUndefined(this.firstHandle)) {
|
|
2881
2968
|
this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
2969
|
+
}
|
|
2882
2970
|
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
2883
2971
|
this.secondHandle.style.zIndex = (this.zIndex + 4) + '';
|
|
2884
2972
|
}
|
|
@@ -2912,7 +3000,8 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2912
3000
|
trackClassName = classNames.sliderHorizantalColor;
|
|
2913
3001
|
if (this.enableRtl) {
|
|
2914
3002
|
if (isNullOrUndefined(this.customValues)) {
|
|
2915
|
-
trackPosition =
|
|
3003
|
+
trackPosition =
|
|
3004
|
+
this.checkHandlePosition(this.max) - this.checkHandlePosition(this.colorRange[i].end);
|
|
2916
3005
|
}
|
|
2917
3006
|
else {
|
|
2918
3007
|
trackPosition = this.checkHandlePosition(this.customValues.length - this.colorRange[i].end - 1);
|
|
@@ -2939,6 +3028,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
2939
3028
|
/**
|
|
2940
3029
|
* Gets the component name
|
|
2941
3030
|
*
|
|
3031
|
+
* @returns {string} - Returns the string
|
|
2942
3032
|
* @private
|
|
2943
3033
|
*/
|
|
2944
3034
|
Slider.prototype.getModuleName = function () {
|
|
@@ -97,18 +97,24 @@ export interface TextAreaModel extends ComponentModel{
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Specifies the maximum number of characters allowed in TextArea.
|
|
100
|
+
*
|
|
101
|
+
* @aspType int?
|
|
100
102
|
*/
|
|
101
103
|
maxLength?: number;
|
|
102
104
|
|
|
103
105
|
/**
|
|
104
106
|
* specifies the visible width of the textarea, measured in average character widths.
|
|
107
|
+
*
|
|
108
|
+
* @aspType int?
|
|
105
109
|
*/
|
|
106
|
-
|
|
110
|
+
cols?: number;
|
|
107
111
|
|
|
108
112
|
/**
|
|
109
113
|
* specifies the visible height of the textarea, measured in lines
|
|
114
|
+
*
|
|
115
|
+
* @aspType int?
|
|
110
116
|
*/
|
|
111
|
-
|
|
117
|
+
rows?: number;
|
|
112
118
|
|
|
113
119
|
/**
|
|
114
120
|
* Triggers when the TextArea component is created.
|