@leankylin-sheet/formula-parser 4.0.48 → 4.0.50
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/index.esm.js +13 -2
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -409,7 +409,19 @@ function tsParams(fnName, params) {
|
|
|
409
409
|
}
|
|
410
410
|
return item;
|
|
411
411
|
});
|
|
412
|
-
} else
|
|
412
|
+
} else if (fnName === "SUMIFS") {
|
|
413
|
+
var _params4;
|
|
414
|
+
params = (_params4 = params) === null || _params4 === void 0 ? void 0 : _params4.map(function (item, index) {
|
|
415
|
+
if (index === 0 && Array.isArray(item)) {
|
|
416
|
+
return item === null || item === void 0 ? void 0 : item.map(function (cell) {
|
|
417
|
+
return [null, undefined, ""].includes(cell === null || cell === void 0 ? void 0 : cell[0]) ? [0] : cell === null || cell === void 0 ? void 0 : cell.map(function (item) {
|
|
418
|
+
return parseFloat(item) || 0;
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
return item;
|
|
423
|
+
});
|
|
424
|
+
}
|
|
413
425
|
return params;
|
|
414
426
|
}
|
|
415
427
|
|
|
@@ -1557,7 +1569,6 @@ var parser = {
|
|
|
1557
1569
|
}
|
|
1558
1570
|
r = _this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
|
1559
1571
|
if (typeof r !== "undefined") {
|
|
1560
|
-
console.log('r', r);
|
|
1561
1572
|
return {
|
|
1562
1573
|
v: r
|
|
1563
1574
|
};
|
package/dist/index.js
CHANGED
|
@@ -437,7 +437,19 @@ function tsParams(fnName, params) {
|
|
|
437
437
|
}
|
|
438
438
|
return item;
|
|
439
439
|
});
|
|
440
|
-
} else
|
|
440
|
+
} else if (fnName === "SUMIFS") {
|
|
441
|
+
var _params4;
|
|
442
|
+
params = (_params4 = params) === null || _params4 === void 0 ? void 0 : _params4.map(function (item, index) {
|
|
443
|
+
if (index === 0 && Array.isArray(item)) {
|
|
444
|
+
return item === null || item === void 0 ? void 0 : item.map(function (cell) {
|
|
445
|
+
return [null, undefined, ""].includes(cell === null || cell === void 0 ? void 0 : cell[0]) ? [0] : cell === null || cell === void 0 ? void 0 : cell.map(function (item) {
|
|
446
|
+
return parseFloat(item) || 0;
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
return item;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
441
453
|
return params;
|
|
442
454
|
}
|
|
443
455
|
|
|
@@ -1585,7 +1597,6 @@ var parser = {
|
|
|
1585
1597
|
}
|
|
1586
1598
|
r = _this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
|
1587
1599
|
if (typeof r !== "undefined") {
|
|
1588
|
-
console.log('r', r);
|
|
1589
1600
|
return {
|
|
1590
1601
|
v: r
|
|
1591
1602
|
};
|