@fw-components/formula-editor 2.0.7-formula-editor.30 → 2.0.7-formula-editor.31

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.
@@ -101,6 +101,8 @@ let FormulaEditor = class FormulaEditor extends LitElement {
101
101
  this.isFocused = focus;
102
102
  }
103
103
  handleKeydown(event) {
104
+ if (!this.recommendations?.length)
105
+ return;
104
106
  if (event.code === "Tab") {
105
107
  event.preventDefault();
106
108
  if (this.recommendations?.length === 1) {
@@ -12,7 +12,7 @@ export class Parser {
12
12
  getFormulaTokens(formulaString) {
13
13
  if (!formulaString?.length)
14
14
  return [];
15
- return formulaString.match(/'[^']*'|\d+|[A-Za-z_][A-Za-z0-9_]*|[-+(),*^/:?\s]/g);
15
+ return formulaString.match(/'[^']*'|([\d\w]){48}|([\d\w]){24}|\d+|[A-Za-z_#][A-Za-z0-9_#]*|[-+(),*^/:?\s]/g);
16
16
  }
17
17
  parseInput(formula, prevCurPos = null, recommendation = null) {
18
18
  const tokens = this.getFormulaTokens(formula);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fw-components/formula-editor",
3
- "version": "2.0.7-formula-editor.30",
3
+ "version": "2.0.7-formula-editor.31",
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": "5ae06f57608b2caf73f2a75091082868c1908a08"
34
+ "gitHead": "eeeb3909c289c52b5b1d37978d95f4a2d12fffa3"
35
35
  }