Skip to content

Commit ef8cea9

Browse files
committed
0.31.2
1 parent 6926598 commit ef8cea9

16 files changed

Lines changed: 399 additions & 116 deletions

dist/handsontable.full.js

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,7 +4512,7 @@ var domHelpers = ($__helpers_47_dom_47_element__ = _dereq_("helpers/dom/element"
45124512
var domEventHelpers = ($__helpers_47_dom_47_event__ = _dereq_("helpers/dom/event"), $__helpers_47_dom_47_event__ && $__helpers_47_dom_47_event__.__esModule && $__helpers_47_dom_47_event__ || {default: $__helpers_47_dom_47_event__});
45134513
var HELPERS = [arrayHelpers, browserHelpers, dataHelpers, dateHelpers, featureHelpers, functionHelpers, mixedHelpers, numberHelpers, objectHelpers, settingHelpers, stringHelpers, unicodeHelpers];
45144514
var DOM = [domHelpers, domEventHelpers];
4515-
Handsontable.buildDate = 'Wed Mar 22 2017 13:06:10 GMT+0100 (CET)';
4515+
Handsontable.buildDate = 'Mon Apr 03 2017 14:22:01 GMT+0200 (CEST)';
45164516
Handsontable.packageName = 'handsontable';
45174517
Handsontable.version = '0.31.2';
45184518
var baseVersion = '@@baseVersion';
@@ -29940,7 +29940,7 @@ return hooks;
2994029940
},{}],"numbro":[function(_dereq_,module,exports){
2994129941
/*!
2994229942
* numbro.js
29943-
* version : 1.9.3
29943+
* version : 1.10.1
2994429944
* author : Företagsplatsen AB
2994529945
* license : MIT
2994629946
* http://www.foretagsplatsen.se
@@ -29954,7 +29954,7 @@ return hooks;
2995429954
************************************/
2995529955

2995629956
var numbro,
29957-
VERSION = '1.9.3',
29957+
VERSION = '1.10.1',
2995829958
binarySuffixes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],
2995929959
decimalSuffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
2996029960
bytes = {
@@ -30017,6 +30017,11 @@ return hooks;
3001730017
this._value = number;
3001830018
}
3001930019

30020+
function numberLength(number) {
30021+
if (number === 0) { return 1; }
30022+
return Math.floor(Math.log(Math.abs(number)) / Math.LN10) + 1;
30023+
}
30024+
3002030025
function zeroes(count) {
3002130026
var i, ret = '';
3002230027

@@ -30412,7 +30417,6 @@ return hooks;
3041230417
forcedNeg = false,
3041330418
neg = false,
3041430419
indexOpenP,
30415-
size,
3041630420
indexMinus,
3041730421
paren = '',
3041830422
minlen,
@@ -30438,7 +30442,7 @@ return hooks;
3043830442
prefix = '';
3043930443
}
3044030444

30441-
if (format.indexOf('}') === format.length - 1) {
30445+
if (format.indexOf('}') === format.length - 1 && format.length) {
3044230446
var start = format.indexOf('{');
3044330447
if (start === -1) {
3044430448
throw Error('Format should also contain a "{"');
@@ -30491,30 +30495,16 @@ return hooks;
3049130495
format = format.replace('a', '');
3049230496
}
3049330497

30494-
totalLength = Math.floor(Math.log(abs) / Math.LN10) + 1;
30495-
30498+
totalLength = numberLength(value);
3049630499
minimumPrecision = totalLength % 3;
3049730500
minimumPrecision = minimumPrecision === 0 ? 3 : minimumPrecision;
3049830501

3049930502
if (intPrecision && abs !== 0) {
30500-
30501-
length = Math.floor(Math.log(abs) / Math.LN10) + 1 - intPrecision;
30502-
3050330503
pow = 3 * ~~((Math.min(intPrecision, totalLength) - minimumPrecision) / 3);
30504-
3050530504
abs = abs / Math.pow(10, pow);
30506-
30507-
if (format.indexOf('.') === -1 && intPrecision > 3) {
30508-
format += '[.]';
30509-
30510-
size = length === 0 ? 0 : 3 * ~~(length / 3) - length;
30511-
size = size < 0 ? size + 3 : size;
30512-
30513-
format += zeroes(size);
30514-
}
3051530505
}
3051630506

30517-
if (Math.floor(Math.log(Math.abs(value)) / Math.LN10) + 1 !== intPrecision) {
30507+
if (totalLength !== intPrecision) {
3051830508
if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {
3051930509
// trillion
3052030510
abbr = abbr + cultures[currentCulture].abbreviations.trillion;
@@ -30533,6 +30523,12 @@ return hooks;
3053330523
value = value / Math.pow(10, 3);
3053430524
}
3053530525
}
30526+
30527+
length = numberLength(value);
30528+
if (intPrecision && length < intPrecision && format.indexOf('.') === -1) {
30529+
format += '[.]';
30530+
format += zeroes(intPrecision - length);
30531+
}
3053630532
}
3053730533

3053830534
// see if we are formatting
@@ -30578,13 +30574,18 @@ return hooks;
3057830574
format = format.replace('[.]', '.');
3057930575
}
3058030576

30581-
w = value.toString().split('.')[0];
3058230577
precision = format.split('.')[1];
3058330578
thousands = format.indexOf(',');
3058430579

3058530580
if (precision) {
30581+
var dSplit = [];
30582+
3058630583
if (precision.indexOf('*') !== -1) {
30587-
d = toFixed(value, value.toString().split('.')[1].length, roundingFunction);
30584+
d = value.toString();
30585+
dSplit = d.split('.');
30586+
if (dSplit.length > 1) {
30587+
d = toFixed(value, dSplit[1].length, roundingFunction);
30588+
}
3058830589
} else {
3058930590
if (precision.indexOf('[') > -1) {
3059030591
precision = precision.replace(']', '');
@@ -30596,11 +30597,12 @@ return hooks;
3059630597
}
3059730598
}
3059830599

30599-
w = d.split('.')[0];
30600+
dSplit = d.split('.');
30601+
w = dSplit[0];
3060030602

30601-
if (d.split('.')[1].length) {
30603+
if (dSplit.length > 1 && dSplit[1].length) {
3060230604
var p = sep ? abbr + sep : cultures[currentCulture].delimiters.decimal;
30603-
d = p + d.split('.')[1];
30605+
d = p + dSplit[1];
3060430606
} else {
3060530607
d = '';
3060630608
}
@@ -30657,10 +30659,10 @@ return hooks;
3065730659
numbro = function(input) {
3065830660
if (numbro.isNumbro(input)) {
3065930661
input = input.value();
30660-
} else if (input === 0 || typeof input === 'undefined') {
30661-
input = 0;
30662-
} else if (!Number(input)) {
30662+
} else if (typeof input === 'string' || typeof input === 'number') {
3066330663
input = numbro.fn.unformat(input);
30664+
} else {
30665+
input = NaN;
3066430666
}
3066530667

3066630668
return new Numbro(Number(input));
@@ -30989,7 +30991,7 @@ return hooks;
3098930991
(process.browser === undefined) &&
3099030992
process.title &&
3099130993
(
30992-
process.title.indexOf('node') === 0 ||
30994+
process.title.indexOf('node') !== -1 ||
3099330995
process.title.indexOf('meteor-tool') > 0 ||
3099430996
process.title === 'grunt' ||
3099530997
process.title === 'gulp'

dist/handsontable.full.min.js

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/handsontable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4510,7 +4510,7 @@ var domHelpers = ($__helpers_47_dom_47_element__ = _dereq_("helpers/dom/element"
45104510
var domEventHelpers = ($__helpers_47_dom_47_event__ = _dereq_("helpers/dom/event"), $__helpers_47_dom_47_event__ && $__helpers_47_dom_47_event__.__esModule && $__helpers_47_dom_47_event__ || {default: $__helpers_47_dom_47_event__});
45114511
var HELPERS = [arrayHelpers, browserHelpers, dataHelpers, dateHelpers, featureHelpers, functionHelpers, mixedHelpers, numberHelpers, objectHelpers, settingHelpers, stringHelpers, unicodeHelpers];
45124512
var DOM = [domHelpers, domEventHelpers];
4513-
Handsontable.buildDate = 'Wed Mar 22 2017 13:06:10 GMT+0100 (CET)';
4513+
Handsontable.buildDate = 'Mon Apr 03 2017 14:22:01 GMT+0200 (CEST)';
45144514
Handsontable.packageName = 'handsontable';
45154515
Handsontable.version = '0.31.2';
45164516
var baseVersion = '@@baseVersion';

dist/handsontable.min.js

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)