@fw-components/formula-editor 2.4.1-handle-unary-prefixes.2 → 2.5.0
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.
- package/dist/formula-editor.js +3 -2
- package/package.json +2 -2
package/dist/formula-editor.js
CHANGED
|
@@ -9,6 +9,7 @@ import { customElement, property, query, state } from "lit/decorators.js";
|
|
|
9
9
|
import { getFormulaTokens } from "./utils/get-formula-tokens.js";
|
|
10
10
|
import { Parser } from "./utils/parser.js";
|
|
11
11
|
import { FormulaEditorStyles } from "./styles/editor.js";
|
|
12
|
+
import { mathematicalOperators } from "./utils/constants.js";
|
|
12
13
|
let FormulaEditor = class FormulaEditor extends LitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -31,9 +32,9 @@ let FormulaEditor = class FormulaEditor extends LitElement {
|
|
|
31
32
|
this.variableType = "";
|
|
32
33
|
this.minSuggestionLen = 2;
|
|
33
34
|
this.errorString = "";
|
|
34
|
-
this.formulaRegex =
|
|
35
|
+
this.formulaRegex = /[A-Za-z0-9_#@.]+|[-+(),*^/\s]/g;
|
|
35
36
|
this.allowedNumbers = true;
|
|
36
|
-
this.allowedOperators =
|
|
37
|
+
this.allowedOperators = mathematicalOperators;
|
|
37
38
|
}
|
|
38
39
|
updated(_changedProperties) {
|
|
39
40
|
if (_changedProperties.has("formulaString")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fw-components/formula-editor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "A WYSIWYG type formula editor",
|
|
5
5
|
"main": "dist/formula-editor.js",
|
|
6
6
|
"exports": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"typescript": "5.9.3",
|
|
36
36
|
"vitest": "2.1.9"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "a78899fdd3d727192ae701df9814aa6342c2a5b2"
|
|
39
39
|
}
|