@coding-flow/flow-design 0.1.6 → 0.1.8
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,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { Button, Form, Popconfirm, Space, Switch } from "antd";
|
|
3
|
+
import { Button, Form, Popconfirm, Space, Switch, Typography } from "antd";
|
|
4
4
|
import { Table } from "@coding-flow/flow-pc-ui";
|
|
5
5
|
import { useNodeRenderContext } from "../../hooks/use-node-render-context.js";
|
|
6
6
|
import { PlusOutlined } from "@ant-design/icons";
|
|
@@ -16,10 +16,19 @@ const ActionTable = (props)=>{
|
|
|
16
16
|
const [form] = Form.useForm();
|
|
17
17
|
const columns = react.useCallback(()=>[
|
|
18
18
|
{
|
|
19
|
-
title: '
|
|
19
|
+
title: 'ID',
|
|
20
20
|
dataIndex: 'id',
|
|
21
21
|
key: 'id',
|
|
22
|
-
|
|
22
|
+
render: (value)=>/*#__PURE__*/ jsx(Typography.Text, {
|
|
23
|
+
copyable: {
|
|
24
|
+
text: value,
|
|
25
|
+
tooltips: [
|
|
26
|
+
"复制按钮 ID",
|
|
27
|
+
"已复制"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
children: value
|
|
31
|
+
})
|
|
23
32
|
},
|
|
24
33
|
{
|
|
25
34
|
title: '标题',
|
|
@@ -1,35 +1,86 @@
|
|
|
1
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Form, Switch } from "antd";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import react from "react";
|
|
3
|
+
import { Form, Select, Switch } from "antd";
|
|
4
4
|
import { Field } from "@flowgram.ai/fixed-layout-editor";
|
|
5
5
|
import { FieldTip } from "../../../field-tip/index.js";
|
|
6
6
|
const RecordMergeStrategy = ()=>{
|
|
7
7
|
const [form] = Form.useForm();
|
|
8
|
-
|
|
8
|
+
const [mergeTypeVisible, setMergeTypeVisible] = react.useState(false);
|
|
9
|
+
return /*#__PURE__*/ jsxs(Form, {
|
|
9
10
|
form: form,
|
|
10
11
|
style: {
|
|
11
12
|
width: '100%'
|
|
12
13
|
},
|
|
13
14
|
layout: "vertical",
|
|
14
|
-
children:
|
|
15
|
-
|
|
16
|
-
label:
|
|
17
|
-
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ jsx(Form.Item, {
|
|
17
|
+
label: /*#__PURE__*/ jsx(FieldTip, {
|
|
18
|
+
label: "启用合并审批",
|
|
19
|
+
description: "开启后,当流程流转到该节点时,同一流程下的多条审批记录将自动合并到一起进行审批。"
|
|
20
|
+
}),
|
|
21
|
+
name: [
|
|
22
|
+
"RecordMergeStrategy",
|
|
23
|
+
"enable"
|
|
24
|
+
],
|
|
25
|
+
children: /*#__PURE__*/ jsx(Field, {
|
|
26
|
+
name: "RecordMergeStrategy.enable",
|
|
27
|
+
render: ({ field: { value, onChange } })=>{
|
|
28
|
+
setMergeTypeVisible(true === value);
|
|
29
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
30
|
+
children: /*#__PURE__*/ jsx(Switch, {
|
|
31
|
+
value: value,
|
|
32
|
+
onChange: onChange
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
})
|
|
18
37
|
}),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
mergeTypeVisible && /*#__PURE__*/ jsx(Form.Item, {
|
|
39
|
+
label: /*#__PURE__*/ jsx(FieldTip, {
|
|
40
|
+
label: "合并类型",
|
|
41
|
+
description: "选择合并审批的合并依据:按审批人、发起人或提交人合并。",
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
label: "审批人合并",
|
|
45
|
+
detail: "同一审批人(当前审批人)的多条记录合并为一条待办。"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "发起人合并",
|
|
49
|
+
detail: "同一发起人的多条记录合并为一条待办。"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "提交人合并",
|
|
53
|
+
detail: "同一提交人的多条记录合并为一条待办。"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
name: [
|
|
58
|
+
"RecordMergeStrategy",
|
|
59
|
+
"mergeType"
|
|
60
|
+
],
|
|
61
|
+
children: /*#__PURE__*/ jsx(Field, {
|
|
62
|
+
name: "RecordMergeStrategy.mergeType",
|
|
63
|
+
render: ({ field: { value, onChange } })=>/*#__PURE__*/ jsx(Select, {
|
|
27
64
|
value: value,
|
|
28
|
-
onChange: onChange
|
|
65
|
+
onChange: onChange,
|
|
66
|
+
options: [
|
|
67
|
+
{
|
|
68
|
+
label: '审批人合并',
|
|
69
|
+
value: 'APPROVER'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: '发起人合并',
|
|
73
|
+
value: 'CREATOR'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: '提交人合并',
|
|
77
|
+
value: 'SUBMITTER'
|
|
78
|
+
}
|
|
79
|
+
]
|
|
29
80
|
})
|
|
30
|
-
|
|
81
|
+
})
|
|
31
82
|
})
|
|
32
|
-
|
|
83
|
+
]
|
|
33
84
|
});
|
|
34
85
|
};
|
|
35
86
|
export { RecordMergeStrategy };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "flow-engine design components ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -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.1.
|
|
58
|
-
"@coding-flow/flow-icons": "0.1.
|
|
59
|
-
"@coding-flow/flow-types": "0.1.
|
|
60
|
-
"@coding-flow/flow-pc-ui": "0.1.
|
|
57
|
+
"@coding-flow/flow-core": "0.1.8",
|
|
58
|
+
"@coding-flow/flow-icons": "0.1.8",
|
|
59
|
+
"@coding-flow/flow-types": "0.1.8",
|
|
60
|
+
"@coding-flow/flow-pc-ui": "0.1.8"
|
|
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.1.
|
|
66
|
-
"@coding-flow/flow-types": "0.1.
|
|
65
|
+
"@coding-flow/flow-core": "0.1.8",
|
|
66
|
+
"@coding-flow/flow-types": "0.1.8"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "rslib build",
|