@nocobase/evaluators 1.3.39-beta → 1.4.0-alpha
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/lib/utils/index.js +3 -0
- package/package.json +3 -3
package/lib/utils/index.js
CHANGED
|
@@ -51,6 +51,9 @@ function evaluate(options = {}, expression, scope = {}) {
|
|
|
51
51
|
const keyMap = {};
|
|
52
52
|
let index = 0;
|
|
53
53
|
const exp = expression.trim().replace(/{{\s*([\w$.-]+)\s*}}/g, (_, v) => {
|
|
54
|
+
if (v.startsWith("this.")) {
|
|
55
|
+
return `{{${v}}}`;
|
|
56
|
+
}
|
|
54
57
|
appendArrayColumn(context, v);
|
|
55
58
|
let item = (0, import_lodash.get)(context, v) ?? null;
|
|
56
59
|
if (typeof item === "function") {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/evaluators",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"license": "AGPL-3.0",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@formulajs/formulajs": "4.2.0",
|
|
10
|
-
"@nocobase/utils": "1.
|
|
10
|
+
"@nocobase/utils": "1.4.0-alpha",
|
|
11
11
|
"mathjs": "^10.6.0"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
16
16
|
"directory": "packages/evaluators"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "f097a2bddec152522b5645bd5d451f4c866d2060"
|
|
19
19
|
}
|