@syncfusion/ej2-base 31.1.17 → 31.1.22
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/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +3 -3
- package/dist/ej2-base.umd.min.js +3 -3
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +5 -1
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +5 -1
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +3 -3
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/intl/number-formatter.d.ts +1 -0
- package/src/intl/number-formatter.js +5 -1
- package/styles/bds-lite.css +1 -1
- package/styles/bds.css +1 -1
- package/styles/definition/_bds.scss +1 -1
|
@@ -5867,6 +5867,10 @@ class NumberFormat$1 {
|
|
|
5867
5867
|
* @param {NumberFormatOptions} [option] ?
|
|
5868
5868
|
* @returns {string} ?
|
|
5869
5869
|
*/
|
|
5870
|
+
static roundTo(value, digits) {
|
|
5871
|
+
const factor = Math.pow(10, digits);
|
|
5872
|
+
return (Math.round(value * factor) / factor).toFixed(digits);
|
|
5873
|
+
}
|
|
5870
5874
|
static processFraction(value, min, max, option) {
|
|
5871
5875
|
const temp = (value + '').split('.')[1];
|
|
5872
5876
|
const length = temp ? temp.length : 0;
|
|
@@ -5885,7 +5889,7 @@ class NumberFormat$1 {
|
|
|
5885
5889
|
return value.toFixed(min);
|
|
5886
5890
|
}
|
|
5887
5891
|
else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
|
|
5888
|
-
return
|
|
5892
|
+
return this.roundTo(value, max);
|
|
5889
5893
|
}
|
|
5890
5894
|
let str = value + '';
|
|
5891
5895
|
if (str[0] === '0' && option && option.format === '###.00') {
|