@fw-components/formula-editor 2.0.7-formula-editor.23 → 2.0.7-formula-editor.24

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.
@@ -78,9 +78,7 @@ let FormulaEditor = class FormulaEditor extends LitElement {
78
78
  if (Boolean(recommendation)) {
79
79
  this.recommendations = [];
80
80
  this.currentCursorPosition = parseOutput.newCursorPosition;
81
- /**
82
- * update cursor position in text area
83
- */
81
+ /* update cursor position in text area */
84
82
  setTimeout(() => {
85
83
  this.editor.setSelectionRange(this.currentCursorPosition, this.currentCursorPosition);
86
84
  }, 0);
@@ -11,7 +11,7 @@ let SuggestionMenu = class SuggestionMenu extends LitElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.recommendations = [];
14
- this.onClickRecommendation = (recommendation) => { };
14
+ this.onClickRecommendation = () => { };
15
15
  this._selectedRecommendationIndex = -1;
16
16
  }
17
17
  scrollToSelectedRecommendation(index) {
@@ -223,7 +223,7 @@ export class Parser {
223
223
  // check if the symbol is a number or variable or unaryOperatorPreceded Variable
224
224
  if (((unaryOperators.includes(symbol[0])) && this.variables.has(symbol.substring(1))) ||
225
225
  this.variables.has(symbol) ||
226
- (!isNaN(parseFloat(symbol)) && isFinite(parseFloat(symbol)))) {
226
+ (!Number.isNaN(parseFloat(symbol)) && Number.isFinite(parseFloat(symbol)))) {
227
227
  resultStack.push(symbol);
228
228
  operatorStack.push(null);
229
229
  }
@@ -17,6 +17,8 @@ export class Queue {
17
17
  return element;
18
18
  }
19
19
  peek() {
20
+ if (this.isEmpty())
21
+ throw new Error("Cannot peek an empty queue");
20
22
  return this._elements[this._head];
21
23
  }
22
24
  isEmpty() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fw-components/formula-editor",
3
- "version": "2.0.7-formula-editor.23",
3
+ "version": "2.0.7-formula-editor.24",
4
4
  "description": "A WYSIWYG type formula editor",
5
5
  "main": "dist/formula-editor/src/formula-editor.js",
6
6
  "exports": {
@@ -31,5 +31,5 @@
31
31
  "@types/big.js": "^6.1.6",
32
32
  "es-dev-server": "^2.1.0"
33
33
  },
34
- "gitHead": "aabc3f2d04b0d5e9fc5dfdbc5773407d35b15a18"
34
+ "gitHead": "2b46a14d01bdeb5ed11a92252082ae8cb73a3d62"
35
35
  }