@coding-flow/flow-design 0.0.8 → 0.0.10
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/plugins/action-custom-view-type.d.ts +4 -0
- package/dist/plugins/action-reject-view-type.d.ts +4 -0
- package/dist/plugins/condition-view-type.d.ts +4 -0
- package/dist/plugins/design-view-plugin-action.d.ts +3 -0
- package/dist/plugins/design-view-plugin-action.js +0 -0
- package/dist/plugins/error-trigger-view-type.d.ts +4 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/node-title-view-type.d.ts +4 -0
- package/dist/plugins/operator-create-view-type.d.ts +4 -0
- package/dist/plugins/operator-load-view-type.d.ts +4 -0
- package/dist/plugins/router-view-type.d.ts +4 -0
- package/dist/plugins/sub-process-operator-view-type.d.ts +4 -0
- package/dist/plugins/sub-process-view-type.d.ts +4 -0
- package/dist/plugins/trigger-view-type.d.ts +4 -0
- package/dist/script-components/components/groovy-script-modal.d.ts +3 -0
- package/dist/script-components/components/groovy-script-modal.js +12 -0
- package/package.json +7 -7
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ActionSelectOption } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "ActionCustomViewPlugin";
|
|
3
5
|
export interface ActionCustomViewPlugin {
|
|
4
6
|
value?: string;
|
|
5
7
|
onChange?: (value: string) => void;
|
|
6
8
|
options: ActionSelectOption[];
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "ActionRejectViewPlugin";
|
|
2
4
|
export interface ActionRejectViewPlugin {
|
|
3
5
|
nodeId: string;
|
|
4
6
|
value?: string;
|
|
5
7
|
onChange?: (value: string) => void;
|
|
8
|
+
/** 动作控制 **/
|
|
9
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
6
10
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "ConditionViewPlugin";
|
|
3
5
|
export interface ConditionViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface ConditionViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
|
File without changes
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "ErrorTriggerViewPlugin";
|
|
3
5
|
export interface ErrorTriggerViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface ErrorTriggerViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { type OperatorLoadViewPlugin, VIEW_KEY as OperatorLoadViewPluginKey } fr
|
|
|
8
8
|
export { type RouterViewPlugin, VIEW_KEY as RouterViewPluginKey } from "./router-view-type";
|
|
9
9
|
export { type SubProcessViewPlugin, VIEW_KEY as SubProcessViewPluginKey } from "./sub-process-view-type";
|
|
10
10
|
export { type TriggerViewPlugin, VIEW_KEY as TriggerViewPluginKey } from "./trigger-view-type";
|
|
11
|
+
export * from "./design-view-plugin-action";
|
package/dist/plugins/index.js
CHANGED
|
@@ -8,4 +8,5 @@ import { VIEW_KEY as external_operator_load_view_type_js_VIEW_KEY } from "./oper
|
|
|
8
8
|
import { VIEW_KEY as external_router_view_type_js_VIEW_KEY } from "./router-view-type.js";
|
|
9
9
|
import { VIEW_KEY as external_sub_process_view_type_js_VIEW_KEY } from "./sub-process-view-type.js";
|
|
10
10
|
import { VIEW_KEY as external_trigger_view_type_js_VIEW_KEY } from "./trigger-view-type.js";
|
|
11
|
+
export * from "./design-view-plugin-action.js";
|
|
11
12
|
export { VIEW_KEY as ActionCustomViewPluginKey, external_action_reject_view_type_js_VIEW_KEY as ActionRejectViewPluginKey, external_condition_view_type_js_VIEW_KEY as ConditionViewPluginKey, external_error_trigger_view_type_js_VIEW_KEY as ErrorTriggerViewPluginKey, external_node_title_view_type_js_VIEW_KEY as NodeTitleViewPluginKey, external_operator_create_view_type_js_VIEW_KEY as OperatorCreateViewPluginKey, external_operator_load_view_type_js_VIEW_KEY as OperatorLoadViewPluginKey, external_router_view_type_js_VIEW_KEY as RouterViewPluginKey, external_sub_process_view_type_js_VIEW_KEY as SubProcessViewPluginKey, external_trigger_view_type_js_VIEW_KEY as TriggerViewPluginKey };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "NodeTitleViewPlugin";
|
|
3
5
|
export interface NodeTitleViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface NodeTitleViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "OperatorCreateViewPlugin";
|
|
2
4
|
export interface OperatorCreateViewPlugin {
|
|
3
5
|
/** 当前脚本 */
|
|
4
6
|
script: string;
|
|
5
7
|
/** 确认回调 */
|
|
6
8
|
onChange: (script: string) => void;
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "OperatorLoadViewPlugin";
|
|
2
4
|
export interface OperatorLoadViewPlugin {
|
|
3
5
|
/** 当前脚本 */
|
|
4
6
|
script: string;
|
|
5
7
|
/** 确认回调 */
|
|
6
8
|
onChange: (script: string) => void;
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "RouterViewPlugin";
|
|
3
5
|
export interface RouterViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface RouterViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "SubProcessOperatorViewPlugin";
|
|
2
4
|
export interface SubProcessOperatorViewPlugin {
|
|
3
5
|
/** 当前人员 */
|
|
4
6
|
value?: string;
|
|
5
7
|
/** 选择人员 */
|
|
6
8
|
onChange?: (value: string) => void;
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "SubProcessViewPlugin";
|
|
3
5
|
export interface SubProcessViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface SubProcessViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroovyVariableMapping, ScriptType } from "../script-components/typings";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DesignViewPluginAction } from "./design-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "TriggerViewPlugin";
|
|
3
5
|
export interface TriggerViewPlugin {
|
|
4
6
|
/** 脚本类型 */
|
|
@@ -9,4 +11,6 @@ export interface TriggerViewPlugin {
|
|
|
9
11
|
variables: GroovyVariableMapping[];
|
|
10
12
|
/** 确认回调 */
|
|
11
13
|
onChange: (script: string) => void;
|
|
14
|
+
/** 动作控制 **/
|
|
15
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
12
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GroovyVariableMapping, ScriptType } from "../typings";
|
|
3
|
+
import { DesignViewPluginAction } from "../../plugins";
|
|
3
4
|
export interface GroovyScriptModalProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
/** 脚本类型 */
|
|
@@ -27,6 +28,8 @@ export interface GroovyScriptContent {
|
|
|
27
28
|
variables: GroovyVariableMapping[];
|
|
28
29
|
/** 确认回调 */
|
|
29
30
|
onChange: (script: string) => void;
|
|
31
|
+
/** 动作控制 */
|
|
32
|
+
action?: React.Ref<DesignViewPluginAction>;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* 通用脚本配置弹框
|
|
@@ -4,8 +4,15 @@ import { Modal } from "antd";
|
|
|
4
4
|
const GroovyScriptContentComponent = (props)=>{
|
|
5
5
|
const [content, setContent] = react.useState(props.script);
|
|
6
6
|
const GroovyContent = props.content;
|
|
7
|
+
const actionRef = react.useRef(null);
|
|
7
8
|
react.useImperativeHandle(props.actionRef, ()=>({
|
|
8
9
|
handleConfirm: ()=>{
|
|
10
|
+
if (actionRef.current) return void actionRef.current?.onValidate(content).then((res)=>{
|
|
11
|
+
if (res) {
|
|
12
|
+
props.onConfirm(content);
|
|
13
|
+
props.onCancel();
|
|
14
|
+
}
|
|
15
|
+
});
|
|
9
16
|
props.onConfirm(content);
|
|
10
17
|
props.onCancel();
|
|
11
18
|
}
|
|
@@ -13,6 +20,7 @@ const GroovyScriptContentComponent = (props)=>{
|
|
|
13
20
|
content
|
|
14
21
|
]);
|
|
15
22
|
return /*#__PURE__*/ jsx(GroovyContent, {
|
|
23
|
+
action: actionRef,
|
|
16
24
|
type: props.type,
|
|
17
25
|
script: content,
|
|
18
26
|
variables: props.variables,
|
|
@@ -30,6 +38,10 @@ const GroovyScriptModal = (props)=>{
|
|
|
30
38
|
open: props.open,
|
|
31
39
|
onCancel: props.onCancel,
|
|
32
40
|
onOk: handleOk,
|
|
41
|
+
maskClosable: false,
|
|
42
|
+
mask: {
|
|
43
|
+
closable: false
|
|
44
|
+
},
|
|
33
45
|
width: width,
|
|
34
46
|
okText: "确认",
|
|
35
47
|
cancelText: "取消",
|
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.10",
|
|
4
4
|
"description": "flow-engine design components ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
"nanoid": "^5.1.6",
|
|
55
55
|
"react-redux": "^9.2.0",
|
|
56
56
|
"styled-components": "^5.3.11",
|
|
57
|
-
"@coding-flow/flow-core": "0.0.
|
|
58
|
-
"@coding-flow/flow-
|
|
59
|
-
"@coding-flow/flow-
|
|
60
|
-
"@coding-flow/flow-
|
|
57
|
+
"@coding-flow/flow-core": "0.0.10",
|
|
58
|
+
"@coding-flow/flow-pc-ui": "0.0.10",
|
|
59
|
+
"@coding-flow/flow-types": "0.0.10",
|
|
60
|
+
"@coding-flow/flow-icons": "0.0.10"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/lodash-es": "^4.17.12",
|
|
64
64
|
"@types/styled-components": "^5.1.36",
|
|
65
|
-
"@coding-flow/flow-core": "0.0.
|
|
66
|
-
"@coding-flow/flow-types": "0.0.
|
|
65
|
+
"@coding-flow/flow-core": "0.0.10",
|
|
66
|
+
"@coding-flow/flow-types": "0.0.10"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "rslib build",
|