@fw-components/formula-editor 2.0.7-formula-editor.26 → 2.0.7-formula-editor.28

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.
@@ -25,8 +25,6 @@ let FormulaEditor = class FormulaEditor extends LitElement {
25
25
  this.errorString = "";
26
26
  }
27
27
  firstUpdated(_changedProperties) {
28
- const inputListener = this.handleContentUpdate.bind(this);
29
- this.editor.addEventListener("input", inputListener);
30
28
  this.editor.focus();
31
29
  }
32
30
  updated(_changedProperties) {
@@ -136,6 +134,7 @@ let FormulaEditor = class FormulaEditor extends LitElement {
136
134
  .placeholder=${this.placeholder}
137
135
  spellcheck="false"
138
136
  autocomplete="off"
137
+ @input=${this.handleContentUpdate}
139
138
  @keydown=${this.handleKeydown}
140
139
  @blur=${() => this.handleFocus(false)}
141
140
  @focus=${() => this.handleFocus(true)}
@@ -63,9 +63,6 @@ __decorate([
63
63
  __decorate([
64
64
  state()
65
65
  ], SuggestionMenu.prototype, "_selectedRecommendationIndex", void 0);
66
- __decorate([
67
- state()
68
- ], SuggestionMenu.prototype, "abortController", void 0);
69
66
  __decorate([
70
67
  query(".wysiwyg-suggestion-menu")
71
68
  ], SuggestionMenu.prototype, "suggestionList", void 0);
@@ -198,7 +198,7 @@ export class Parser {
198
198
  }
199
199
  operatorStack.push(token);
200
200
  }
201
- else if (!Number.isNaN(token) && token != "") {
201
+ else if ((!Number.isNaN(Number(token)) || this.variables.has(token)) && token.trim().length) {
202
202
  outputQueue.enqueue(token);
203
203
  }
204
204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fw-components/formula-editor",
3
- "version": "2.0.7-formula-editor.26",
3
+ "version": "2.0.7-formula-editor.28",
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": "fc19c9005ef1b7ae285c8f83af8a1340a42c8008"
34
+ "gitHead": "eb6537ccfb509fd827d945a53faca1588fa3f686"
35
35
  }