@fw-components/formula-editor 2.0.7-formula-editor.6 → 2.0.7-formula-editor.7

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.
@@ -95,7 +95,7 @@ export class Parser {
95
95
  !isNumber &&
96
96
  token != "(" &&
97
97
  !((token == "-" || token == "+") &&
98
- this.mathematicalOperators.has(previousToken))) {
98
+ (this.mathematicalOperators.has(previousToken) || previousToken === ""))) {
99
99
  parseOutput.errorString = `Expected variable/number at position ${currentPosition}`;
100
100
  tokenClassName += " error";
101
101
  expectation = Expectation.UNDEFINED;
@@ -190,7 +190,9 @@ export class Parser {
190
190
  const parsedTokens = [];
191
191
  for (const token of tokens) {
192
192
  if ((token == "+" || token == "-") &&
193
- this.mathematicalOperators.has(previousToken)) {
193
+ (this.mathematicalOperators.has(previousToken) ||
194
+ previousToken === "" ||
195
+ previousToken === "(")) {
194
196
  carriedToken = token;
195
197
  }
196
198
  else if (carriedToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fw-components/formula-editor",
3
- "version": "2.0.7-formula-editor.6",
3
+ "version": "2.0.7-formula-editor.7",
4
4
  "description": "A WYSIWYG type formula editor",
5
5
  "main": "dist/formula-editor/src/formula-builder.js",
6
6
  "publishConfig": {
@@ -25,5 +25,5 @@
25
25
  "@types/big.js": "^6.1.6",
26
26
  "es-dev-server": "^2.1.0"
27
27
  },
28
- "gitHead": "dfd5a0d70498d8b9fc4d57253720e9b20e44c2b1"
28
+ "gitHead": "c4519eefc65b67e7e8ce4d6c3e942d55c5f3c5d4"
29
29
  }