@syncfusion/ej2-inputs 31.2.10 → 31.2.12
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/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 +3 -47
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +0 -44
- 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/package.json +5 -5
- package/src/numerictextbox/numerictextbox.d.ts +0 -2
- package/src/numerictextbox/numerictextbox.js +0 -44
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.
|
|
3
|
+
* version : 31.2.12
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-inputs",
|
|
3
|
-
"version": "31.2.
|
|
3
|
+
"version": "31.2.12",
|
|
4
4
|
"description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-inputs.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~31.2.
|
|
12
|
-
"@syncfusion/ej2-buttons": "~31.2.
|
|
13
|
-
"@syncfusion/ej2-popups": "~31.2.
|
|
14
|
-
"@syncfusion/ej2-splitbuttons": "~31.2.
|
|
11
|
+
"@syncfusion/ej2-base": "~31.2.12",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~31.2.12",
|
|
13
|
+
"@syncfusion/ej2-popups": "~31.2.12",
|
|
14
|
+
"@syncfusion/ej2-splitbuttons": "~31.2.12"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {},
|
|
17
17
|
"keywords": [
|
|
@@ -51,7 +51,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
51
51
|
private isDynamicChange;
|
|
52
52
|
private inputValue;
|
|
53
53
|
private clearButton;
|
|
54
|
-
private storedValueString;
|
|
55
54
|
/**
|
|
56
55
|
* Gets or Sets the CSS classes to root element of the NumericTextBox which helps to customize the
|
|
57
56
|
* complete UI styles for the NumericTextBox component.
|
|
@@ -320,7 +319,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
320
319
|
private getElementData;
|
|
321
320
|
private floatLabelTypeUpdate;
|
|
322
321
|
private mouseUpClick;
|
|
323
|
-
private formatScientificNotation;
|
|
324
322
|
/**
|
|
325
323
|
* Increments the NumericTextBox value with the specified step value.
|
|
326
324
|
*
|
|
@@ -782,9 +782,6 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
782
782
|
if (this.value || this.value === 0) {
|
|
783
783
|
var value = this.formatNumber();
|
|
784
784
|
var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
|
|
785
|
-
if (/[eE]/.test(value)) {
|
|
786
|
-
elementValue = this.formatScientificNotation(elementValue);
|
|
787
|
-
}
|
|
788
785
|
this.setElementValue(elementValue);
|
|
789
786
|
attributes(this.element, { 'aria-valuenow': value });
|
|
790
787
|
if (!isNullOrUndefined(this.hiddenInput)) {
|
|
@@ -838,7 +835,6 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
838
835
|
};
|
|
839
836
|
NumericTextBox.prototype.formatNumber = function () {
|
|
840
837
|
var numberOfDecimals = this.getNumberOfDecimals(this.value);
|
|
841
|
-
this.storedValueString = this.value.toString();
|
|
842
838
|
return this.instance.getNumberFormat({
|
|
843
839
|
maximumFractionDigits: numberOfDecimals,
|
|
844
840
|
minimumFractionDigits: numberOfDecimals, useGrouping: false
|
|
@@ -958,9 +954,6 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
958
954
|
this.prevValue = this.value;
|
|
959
955
|
if ((this.value || this.value === 0)) {
|
|
960
956
|
var formatValue_1 = this.formatNumber();
|
|
961
|
-
if (/[eE]/.test(this.value.toString())) {
|
|
962
|
-
formatValue_1 = this.formatScientificNotation(formatValue_1);
|
|
963
|
-
}
|
|
964
957
|
this.setElementValue(formatValue_1);
|
|
965
958
|
if (!this.isPrevFocused) {
|
|
966
959
|
if (!Browser.isDevice && Browser.info.version === '11.0') {
|
|
@@ -1003,9 +996,6 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1003
996
|
this.setProperties({ value: null }, true);
|
|
1004
997
|
}
|
|
1005
998
|
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
|
|
1006
|
-
if (/[eE]/.test(this.element.value)) {
|
|
1007
|
-
parsedInput = parseFloat(this.formatScientificNotation(this.element.value));
|
|
1008
|
-
}
|
|
1009
999
|
this.updateValue(parsedInput);
|
|
1010
1000
|
if (!Browser.isDevice) {
|
|
1011
1001
|
EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
|
|
@@ -1108,40 +1098,6 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1108
1098
|
EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
|
|
1109
1099
|
}
|
|
1110
1100
|
};
|
|
1111
|
-
NumericTextBox.prototype.formatScientificNotation = function (value) {
|
|
1112
|
-
value = this.storedValueString ? this.storedValueString : value;
|
|
1113
|
-
var _a = value.toLowerCase().split('e'), base = _a[0], exponentPart = _a[1];
|
|
1114
|
-
var exponent = parseInt(exponentPart, 10);
|
|
1115
|
-
var match = this.format.match(/n(\d+)/i);
|
|
1116
|
-
var requiredDigits = match ? parseInt(match[1], 10) : 10;
|
|
1117
|
-
var baseDigits = base.replace('.', '');
|
|
1118
|
-
var fullDecimal;
|
|
1119
|
-
if (exponent < 0) {
|
|
1120
|
-
var zerosCount = Math.abs(Number(exponent)) - 1;
|
|
1121
|
-
var limitedZeros = '0'.repeat(Math.min(zerosCount, requiredDigits));
|
|
1122
|
-
fullDecimal = '0.' + limitedZeros + baseDigits;
|
|
1123
|
-
}
|
|
1124
|
-
else {
|
|
1125
|
-
var _b = base.split('.'), intPart_1 = _b[0], _c = _b[1], decPart_1 = _c === void 0 ? '' : _c;
|
|
1126
|
-
var shift = exponent - decPart_1.length;
|
|
1127
|
-
if (shift >= 0) {
|
|
1128
|
-
fullDecimal = intPart_1 + decPart_1 + '0'.repeat(shift);
|
|
1129
|
-
}
|
|
1130
|
-
else {
|
|
1131
|
-
var newDec = decPart_1.slice(0, exponent) + '.' + decPart_1.slice(exponent);
|
|
1132
|
-
fullDecimal = intPart_1 + newDec;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
var _d = fullDecimal.split('.'), intPart = _d[0], _e = _d[1], decPart = _e === void 0 ? '' : _e;
|
|
1136
|
-
if (this.isFocused) {
|
|
1137
|
-
var limitedDecimal = decPart.slice(0, requiredDigits);
|
|
1138
|
-
return intPart + "." + decPart;
|
|
1139
|
-
}
|
|
1140
|
-
else {
|
|
1141
|
-
var formattedDecimal = decPart.padEnd(requiredDigits, '0').slice(0, requiredDigits);
|
|
1142
|
-
return intPart + "." + formattedDecimal;
|
|
1143
|
-
}
|
|
1144
|
-
};
|
|
1145
1101
|
/**
|
|
1146
1102
|
* Increments the NumericTextBox value with the specified step value.
|
|
1147
1103
|
*
|