@coding-flow/flow-design 0.0.41 → 0.0.43
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { GroovyCodeEditor } from "../../components/groovy-code/index.js";
|
|
4
|
+
import { compile } from "../../api/script.js";
|
|
5
|
+
import { message } from "antd";
|
|
4
6
|
const AdvancedScriptEditor = (props)=>{
|
|
5
7
|
const { script, onChange, readonly } = props;
|
|
6
8
|
const handleChange = (value)=>{
|
|
@@ -12,6 +14,17 @@ const AdvancedScriptEditor = (props)=>{
|
|
|
12
14
|
readonly: readonly,
|
|
13
15
|
onChange: handleChange,
|
|
14
16
|
placeholder: "请输入脚本...",
|
|
17
|
+
onCompile: (code)=>{
|
|
18
|
+
console.log('编译脚本:', code);
|
|
19
|
+
compile({
|
|
20
|
+
script: code
|
|
21
|
+
}).then((res)=>{
|
|
22
|
+
if (res.success) message.success('脚本编译成功');
|
|
23
|
+
else message.error('脚本编译失败: ' + res.message);
|
|
24
|
+
}).catch((err)=>{
|
|
25
|
+
message.error('脚本编译请求失败');
|
|
26
|
+
});
|
|
27
|
+
},
|
|
15
28
|
toolbar: [
|
|
16
29
|
{
|
|
17
30
|
key: 'reset',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getScript, save } from "../../api/script.js";
|
|
3
|
-
import { message } from "antd";
|
|
4
3
|
import react from "react";
|
|
5
4
|
const GroovyScriptLoader = (props)=>{
|
|
6
5
|
const scriptKey = props.value || '';
|
|
@@ -10,9 +9,7 @@ const GroovyScriptLoader = (props)=>{
|
|
|
10
9
|
save({
|
|
11
10
|
key: scriptKey,
|
|
12
11
|
script: script
|
|
13
|
-
}).then((res)=>{
|
|
14
|
-
if (res.success) message.success('规则脚本已经更新');
|
|
15
|
-
});
|
|
12
|
+
}).then((res)=>{});
|
|
16
13
|
};
|
|
17
14
|
const handleScriptChange = (currentScript)=>{
|
|
18
15
|
if (script === currentScript) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "flow-engine design components ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ant-design/icons": "~6.1.0",
|
|
36
|
-
"@coding-script/script-engine": "^0.0.
|
|
36
|
+
"@coding-script/script-engine": "^0.0.7",
|
|
37
37
|
"@flowgram.ai/export-plugin": "1.0.8",
|
|
38
38
|
"@flowgram.ai/fixed-layout-editor": "1.0.8",
|
|
39
39
|
"@flowgram.ai/fixed-semi-materials": "1.0.8",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"nanoid": "^5.1.6",
|
|
50
50
|
"react-redux": "^9.2.0",
|
|
51
51
|
"styled-components": "^5.3.11",
|
|
52
|
-
"@coding-flow/flow-core": "0.0.
|
|
53
|
-
"@coding-flow/flow-
|
|
54
|
-
"@coding-flow/flow-
|
|
55
|
-
"@coding-flow/flow-
|
|
52
|
+
"@coding-flow/flow-core": "0.0.43",
|
|
53
|
+
"@coding-flow/flow-types": "0.0.43",
|
|
54
|
+
"@coding-flow/flow-pc-ui": "0.0.43",
|
|
55
|
+
"@coding-flow/flow-icons": "0.0.43"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/lodash-es": "^4.17.12",
|
|
59
59
|
"@types/styled-components": "^5.1.36",
|
|
60
|
-
"@coding-flow/flow-
|
|
61
|
-
"@coding-flow/flow-
|
|
60
|
+
"@coding-flow/flow-core": "0.0.43",
|
|
61
|
+
"@coding-flow/flow-types": "0.0.43"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "rslib build",
|