@syncfusion/ej2-calculate 35.1.40 → 35.1.42

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 35.1.40
3
+ * version : 35.1.42
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-calculate",
3
- "version": "35.1.40",
3
+ "version": "35.1.42",
4
4
  "description": "JavaScript formula calculation engine for Syncfusion Spreadsheet and compatible workbook/xlsx hosts",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -2401,7 +2401,8 @@ var Calculate = /** @class */ (function (_super) {
2401
2401
  }
2402
2402
  }
2403
2403
  while (i < pFormula.length && (this.isDigit(pFormula[i]) ||
2404
- (pFormula[i] === decimalSep || pFormula[i] === '.'))) {
2404
+ (pFormula[i] === decimalSep || pFormula[i] === '.') ||
2405
+ pFormula[i] === '\n')) {
2405
2406
  s += pFormula[i] === decimalSep ? '.' : pFormula[i];
2406
2407
  i = i + 1;
2407
2408
  }
@@ -262,7 +262,7 @@ var Parser = /** @class */ (function () {
262
262
  computeForceCalculate: false
263
263
  };
264
264
  };
265
- Parser.prototype.formulaAutoCorrection = function (formula, args, isSubString) {
265
+ Parser.prototype.formulaAutoCorrection = function (formula, args) {
266
266
  var arithemeticArr = ['*', '+', '-', '/', '^', '&'];
267
267
  var logicalSym = ['>', '=', '<'];
268
268
  var i = 0;
@@ -375,7 +375,7 @@ var Parser = /** @class */ (function () {
375
375
  if (formula[i] === '/' || formula[i] === '*' || formula[i] === '^') {
376
376
  form = form + formula[i];
377
377
  }
378
- if (formula[i] === '&' && (isSubString || formula.substring(i + 1).trim()[0] !== 'q')) {
378
+ if (formula[i] === '&') {
379
379
  form = form + formula[i];
380
380
  }
381
381
  i = i + 1;
@@ -1089,7 +1089,7 @@ var Parser = /** @class */ (function () {
1089
1089
  try {
1090
1090
  var args = void 0;
1091
1091
  substr = substr.split('(').join('').split(')').join('');
1092
- substr = '(' + this_1.formulaAutoCorrection(substr, args, true) + ')';
1092
+ substr = '(' + this_1.formulaAutoCorrection(substr, args) + ')';
1093
1093
  }
1094
1094
  catch (ex) {
1095
1095
  var args = {
@@ -92,7 +92,7 @@ var LogicalFormulas = /** @class */ (function (_super) {
92
92
  var condUpper = condition.toUpperCase();
93
93
  var parsedVal = this.parent.parseFloat(condition);
94
94
  if (condUpper === this.parent.trueValue || (parsedVal < 0 || parsedVal > 0)) {
95
- if (nestedFormula && argArr[1].includes(':')) {
95
+ if (nestedFormula && argArr[1].includes(':') && this.parent.isCellReference(argArr[1])) {
96
96
  cellValues = this.parent.getCellCollection(argArr[1]);
97
97
  for (var i = 0; i < cellValues.length; i++) {
98
98
  cellVal = this.parent.getValueFromArg(cellValues[i]);
@@ -108,7 +108,7 @@ var LogicalFormulas = /** @class */ (function (_super) {
108
108
  if (isNullOrUndefined(argArr[2])) {
109
109
  return this.parent.falseValue;
110
110
  }
111
- if (nestedFormula && argArr[2].includes(':')) {
111
+ if (nestedFormula && argArr[2].includes(':') && this.parent.isCellReference(argArr[2])) {
112
112
  cellValues = this.parent.getCellCollection(argArr[2]);
113
113
  for (var i = 0; i < cellValues.length; i++) {
114
114
  cellVal = this.parent.getValueFromArg(cellValues[i]);