@nocobase/plugin-workflow 0.9.2-alpha.2 → 0.9.2-alpha.4
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/client/AddButton.js +1 -3
- package/lib/client/Branch.d.ts +1 -1
- package/lib/client/ExecutionCanvas.js +1 -1
- package/lib/client/FlowContext.d.ts +1 -1
- package/lib/client/WorkflowProvider.js +0 -1
- package/lib/client/components/CollectionFieldset.d.ts +1 -1
- package/lib/client/components/CollectionFieldset.js +13 -13
- package/lib/client/components/Duration.js +3 -3
- package/lib/client/components/DynamicExpression.d.ts +1 -1
- package/lib/client/components/DynamicExpression.js +19 -19
- package/lib/client/components/RadioWithTooltip.js +4 -4
- package/lib/client/components/renderEngineReference.js +12 -11
- package/lib/client/interfaces/expression.d.ts +1 -1
- package/lib/client/interfaces/expression.js +2 -1
- package/lib/client/locale/en-US.d.ts +70 -70
- package/lib/client/locale/en-US.js +115 -115
- package/lib/client/locale/ja-JP.d.ts +57 -57
- package/lib/client/locale/ja-JP.js +85 -85
- package/lib/client/locale/pt-BR.d.ts +70 -70
- package/lib/client/locale/pt-BR.js +115 -115
- package/lib/client/locale/ru-RU.d.ts +57 -57
- package/lib/client/locale/ru-RU.js +85 -85
- package/lib/client/locale/tr-TR.d.ts +57 -57
- package/lib/client/locale/tr-TR.js +85 -85
- package/lib/client/locale/zh-CN.js +55 -55
- package/lib/client/nodes/calculation.d.ts +1 -1
- package/lib/client/nodes/calculation.js +29 -29
- package/lib/client/nodes/condition.d.ts +3 -3
- package/lib/client/nodes/condition.js +76 -72
- package/lib/client/nodes/delay.d.ts +1 -1
- package/lib/client/nodes/index.js +35 -37
- package/lib/client/nodes/manual/ModeConfig.js +5 -5
- package/lib/client/nodes/manual/SchemaConfig.js +2 -5
- package/lib/client/nodes/manual/WorkflowTodo.js +3 -3
- package/lib/client/nodes/manual/forms/customForm.js +1 -2
- package/lib/client/nodes/parallel.d.ts +1 -1
- package/lib/client/nodes/parallel.js +6 -6
- package/lib/client/nodes/request.d.ts +2 -0
- package/lib/client/nodes/request.js +7 -5
- package/lib/client/style.js +67 -63
- package/lib/client/triggers/index.d.ts +4 -4
- package/lib/client/triggers/index.js +5 -7
- package/lib/client/triggers/schedule/DateFieldsSelect.d.ts +1 -1
- package/lib/client/triggers/schedule/EndsByField.js +3 -3
- package/lib/client/triggers/schedule/OnField.js +3 -3
- package/lib/client/triggers/schedule/RepeatField.js +16 -16
- package/lib/client/triggers/schedule/ScheduleConfig.js +2 -2
- package/lib/client/utils.js +1 -1
- package/lib/client/variable.js +4 -4
- package/lib/server/Processor.d.ts +2 -2
- package/lib/server/Processor.js +8 -8
- package/lib/server/functions/index.d.ts +1 -1
- package/lib/server/functions/index.js +1 -2
- package/lib/server/instructions/calculation.d.ts +1 -1
- package/lib/server/instructions/calculation.js +7 -7
- package/lib/server/instructions/condition.d.ts +2 -2
- package/lib/server/instructions/condition.js +7 -8
- package/lib/server/instructions/create.d.ts +1 -1
- package/lib/server/instructions/destroy.d.ts +1 -1
- package/lib/server/instructions/manual/index.js +1 -2
- package/lib/server/instructions/parallel.d.ts +3 -3
- package/lib/server/instructions/query.d.ts +2 -2
- package/lib/server/instructions/request.js +0 -1
- package/lib/server/instructions/update.d.ts +2 -2
- package/lib/server/migrations/20230221071831-calculation-expression.js +11 -11
- package/lib/server/migrations/20230221121203-condition-calculation.js +6 -6
- package/lib/server/migrations/20230221162902-jsonb-to-json.js +3 -5
- package/lib/server/migrations/20230411034722-manual-multi-form.js +3 -2
- package/lib/server/triggers/collection.d.ts +2 -2
- package/lib/server/triggers/collection.js +2 -2
- package/lib/server/triggers/schedule.js +26 -20
- package/package.json +12 -12
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
|
|
8
|
+
Workflow: '工作流',
|
|
9
9
|
'Execution history': '执行历史',
|
|
10
|
-
|
|
10
|
+
Executed: '已执行',
|
|
11
11
|
'Trigger type': '触发方式',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Status: '状态',
|
|
13
|
+
On: '启用',
|
|
14
|
+
Off: '停用',
|
|
15
|
+
Version: '版本',
|
|
16
16
|
'Copy to new version': '复制到新版本',
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Duplicate: '复制',
|
|
18
|
+
Loading: '加载中',
|
|
19
19
|
'Load failed': '加载失败',
|
|
20
|
-
|
|
20
|
+
Trigger: '触发器',
|
|
21
21
|
'Trigger variables': '触发器变量',
|
|
22
22
|
'Trigger data': '触发数据',
|
|
23
23
|
'Trigger time': '触发时间',
|
|
@@ -44,14 +44,14 @@ var _default = {
|
|
|
44
44
|
'Repeat mode': '重复模式',
|
|
45
45
|
'Repeat limit': '重复次数',
|
|
46
46
|
'No limit': '不限',
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
Seconds: '秒',
|
|
48
|
+
Minutes: '分钟',
|
|
49
|
+
Hours: '小时',
|
|
50
|
+
Days: '天',
|
|
51
|
+
Weeks: '周',
|
|
52
|
+
Months: '月',
|
|
53
53
|
'No repeat': '不重复',
|
|
54
|
-
|
|
54
|
+
Every: '每',
|
|
55
55
|
'By minute': '按分钟',
|
|
56
56
|
'By hour': '按小时',
|
|
57
57
|
'By day': '按天',
|
|
@@ -59,52 +59,52 @@ var _default = {
|
|
|
59
59
|
'By month': '按月',
|
|
60
60
|
'By field': '数据表字段',
|
|
61
61
|
'By custom date': '自定义时间',
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
Advanced: '高级模式',
|
|
63
|
+
End: '结束',
|
|
64
64
|
'Node result': '节点数据',
|
|
65
|
-
|
|
65
|
+
Calculator: '运算',
|
|
66
66
|
'Arithmetic calculation': '算术运算',
|
|
67
67
|
'String operation': '字符串',
|
|
68
68
|
'System variables': '系统变量',
|
|
69
69
|
'System time': '系统时间',
|
|
70
70
|
'Date variables': '日期变量',
|
|
71
71
|
'Executed at': '执行于',
|
|
72
|
-
|
|
72
|
+
Queueing: '队列中',
|
|
73
73
|
'On going': '进行中',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
Resolved: '完成',
|
|
75
|
+
Pending: '待处理',
|
|
76
|
+
Failed: '失败',
|
|
77
|
+
Error: '出错',
|
|
78
|
+
Aborted: '已终止',
|
|
79
|
+
Canceled: '已取消',
|
|
80
|
+
Rejected: '已拒绝',
|
|
81
81
|
'Continue the process': '继续流程',
|
|
82
82
|
'Terminate the process': '终止流程',
|
|
83
83
|
'Save temporarily': '暂存',
|
|
84
|
-
|
|
84
|
+
Operations: '操作',
|
|
85
85
|
'This node contains branches, deleting will also be preformed to them, are you sure?': '节点包含分支,将同时删除其所有分支下的子节点,确定继续?',
|
|
86
|
-
|
|
86
|
+
Control: '流程控制',
|
|
87
87
|
'Collection operations': '数据表操作',
|
|
88
|
-
|
|
88
|
+
Manual: '人工处理',
|
|
89
89
|
'Extended types': '扩展类型',
|
|
90
90
|
'Node type': '节点类型',
|
|
91
|
-
|
|
91
|
+
Calculation: '运算',
|
|
92
92
|
'Expression type': '表达式类型',
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Static: '静态',
|
|
94
|
+
Dynamic: '动态',
|
|
95
95
|
'Select dynamic expression': '选择动态表达式',
|
|
96
96
|
'Variable datasource': '变量数据源',
|
|
97
97
|
'Calculation engine': '运算引擎',
|
|
98
|
-
|
|
98
|
+
Basic: '基础',
|
|
99
99
|
'Calculation expression': '运算表达式',
|
|
100
100
|
'Expression syntax error': '表达式语法错误',
|
|
101
101
|
'Syntax references: ': '语法参考:',
|
|
102
102
|
'Calculation result': '运算结果',
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
True: '真',
|
|
104
|
+
False: '假',
|
|
105
|
+
concat: '连接',
|
|
106
|
+
Condition: '条件判断',
|
|
107
|
+
Mode: '模式',
|
|
108
108
|
'Continue when "Yes"': '“是”则继续',
|
|
109
109
|
'Branch into "Yes" and "No"': '“是”和“否”分别继续',
|
|
110
110
|
'Condition expression': '条件表达式',
|
|
@@ -116,22 +116,22 @@ var _default = {
|
|
|
116
116
|
'Continue after all branches succeeded': '全部分支都成功后才能继续',
|
|
117
117
|
'Continue after any branch succeeded': '任意分支成功后就继续',
|
|
118
118
|
'Continue after any branch succeeded, or exit after any branch failed': '任意分支成功继续,或失败后退出',
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
Delay: '延时',
|
|
120
|
+
Duration: '时长',
|
|
121
121
|
'End Status': '到时状态',
|
|
122
122
|
'Select status': '选择状态',
|
|
123
123
|
'Succeed and continue': '通过并继续',
|
|
124
124
|
'Fail and exit': '失败并退出',
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
Assignee: '负责人',
|
|
126
|
+
Assignees: '负责人',
|
|
127
127
|
'User interface': '操作界面',
|
|
128
128
|
'Configure user interface': '配置界面',
|
|
129
129
|
'View user interface': '查看界面',
|
|
130
|
-
|
|
130
|
+
Separately: '分别处理',
|
|
131
131
|
'Each user has own task': '每个人处理各自的任务',
|
|
132
|
-
|
|
132
|
+
Collaboratively: '协作处理',
|
|
133
133
|
'Everyone shares one task': '所有人共享同一个任务',
|
|
134
|
-
|
|
134
|
+
Negotiation: '协商机制',
|
|
135
135
|
'All pass': '全部通过',
|
|
136
136
|
'Everyone should pass': '每个人通过才通过',
|
|
137
137
|
'Any pass': '任意通过',
|
|
@@ -154,25 +154,25 @@ var _default = {
|
|
|
154
154
|
'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': '该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。',
|
|
155
155
|
'HTTP request': 'HTTP 请求',
|
|
156
156
|
'HTTP method': 'HTTP 方法',
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
URL: '地址',
|
|
158
|
+
Headers: '请求头',
|
|
159
159
|
'Add request header': '添加请求头',
|
|
160
|
-
|
|
160
|
+
Parameters: '参数',
|
|
161
161
|
'Add parameter': '添加参数',
|
|
162
|
-
|
|
162
|
+
Body: '请求体',
|
|
163
163
|
'Use variable': '使用变量',
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
Format: '格式化',
|
|
165
|
+
Insert: '插入',
|
|
166
166
|
'Timeout config': '超时设置',
|
|
167
|
-
|
|
167
|
+
ms: '毫秒',
|
|
168
168
|
'Input request data': '输入请求数据',
|
|
169
169
|
'Only support standard JSON data': '仅支持标准 JSON 数据',
|
|
170
170
|
'"Content-Type" only support "application/json", and no need to specify': '"Content-Type" 请求头仅支持 "application/json",无需填写',
|
|
171
171
|
'Ignore fail request and continue workflow': '忽略失败的请求并继续工作流',
|
|
172
172
|
'Workflow todos': '工作流待办',
|
|
173
|
-
|
|
173
|
+
Task: '任务',
|
|
174
174
|
'Dynamic expression': '动态表达式',
|
|
175
175
|
'An expression for calculation in each rows': '每行数据计算规则不同时使用',
|
|
176
|
-
|
|
176
|
+
Unconfigured: '未配置'
|
|
177
177
|
};
|
|
178
178
|
exports.default = _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaInitializerItemOptions } from '@nocobase/client';
|
|
2
|
-
import { useWorkflowVariableOptions } from '../variable';
|
|
3
2
|
import { RadioWithTooltip } from '../components/RadioWithTooltip';
|
|
3
|
+
import { useWorkflowVariableOptions } from '../variable';
|
|
4
4
|
declare function useWorkflowVariableEntityOptions(): {
|
|
5
5
|
label: any;
|
|
6
6
|
value: any;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data =
|
|
9
|
-
|
|
7
|
+
function _css() {
|
|
8
|
+
const data = require("@emotion/css");
|
|
9
|
+
_css = function _css() {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
@@ -18,53 +18,53 @@ function _antd() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const data = require("@
|
|
23
|
-
|
|
21
|
+
function _client() {
|
|
22
|
+
const data = require("@nocobase/client");
|
|
23
|
+
_client = function _client() {
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const data =
|
|
30
|
-
|
|
28
|
+
function _client2() {
|
|
29
|
+
const data = require("@nocobase/evaluators/client");
|
|
30
|
+
_client2 = function _client2() {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const data = require("
|
|
37
|
-
|
|
35
|
+
function _antd2() {
|
|
36
|
+
const data = require("antd");
|
|
37
|
+
_antd2 = function _antd2() {
|
|
38
38
|
return data;
|
|
39
39
|
};
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const data = require("
|
|
44
|
-
|
|
42
|
+
function _jsonTemplates() {
|
|
43
|
+
const data = _interopRequireDefault(require("json-templates"));
|
|
44
|
+
_jsonTemplates = function _jsonTemplates() {
|
|
45
45
|
return data;
|
|
46
46
|
};
|
|
47
47
|
return data;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const data = require("
|
|
51
|
-
|
|
49
|
+
function _react() {
|
|
50
|
+
const data = _interopRequireDefault(require("react"));
|
|
51
|
+
_react = function _react() {
|
|
52
52
|
return data;
|
|
53
53
|
};
|
|
54
54
|
return data;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const data = require("
|
|
58
|
-
|
|
56
|
+
function _reactI18next() {
|
|
57
|
+
const data = require("react-i18next");
|
|
58
|
+
_reactI18next = function _reactI18next() {
|
|
59
59
|
return data;
|
|
60
60
|
};
|
|
61
61
|
return data;
|
|
62
62
|
}
|
|
63
63
|
var _FlowContext = require("../FlowContext");
|
|
64
|
-
var _locale = require("../locale");
|
|
65
|
-
var _variable = require("../variable");
|
|
66
64
|
var _RadioWithTooltip = require("../components/RadioWithTooltip");
|
|
67
65
|
var _renderEngineReference = require("../components/renderEngineReference");
|
|
66
|
+
var _locale = require("../locale");
|
|
67
|
+
var _variable = require("../variable");
|
|
68
68
|
const _excluded = ["node", "insert"];
|
|
69
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
70
70
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -104,11 +104,11 @@ const DynamicConfig = ({
|
|
|
104
104
|
}
|
|
105
105
|
}, _react().default.createElement(_antd2().Radio, {
|
|
106
106
|
value: false
|
|
107
|
-
}, t(
|
|
107
|
+
}, t('Static', {
|
|
108
108
|
ns: _locale.NAMESPACE
|
|
109
109
|
})), _react().default.createElement(_antd2().Radio, {
|
|
110
110
|
value: value || null
|
|
111
|
-
}, t(
|
|
111
|
+
}, t('Dynamic', {
|
|
112
112
|
ns: _locale.NAMESPACE
|
|
113
113
|
})))), value !== false ? _react().default.createElement(_antd().FormItem, {
|
|
114
114
|
label: t('Select dynamic expression', {
|
|
@@ -122,9 +122,9 @@ const DynamicConfig = ({
|
|
|
122
122
|
};
|
|
123
123
|
function useWorkflowVariableEntityOptions() {
|
|
124
124
|
return (0, _variable.useWorkflowVariableOptions)([{
|
|
125
|
-
type:
|
|
125
|
+
type: 'reference',
|
|
126
126
|
options: {
|
|
127
|
-
collection:
|
|
127
|
+
collection: '*',
|
|
128
128
|
entity: true
|
|
129
129
|
}
|
|
130
130
|
}]);
|
|
@@ -238,8 +238,8 @@ var _default = {
|
|
|
238
238
|
});
|
|
239
239
|
return _react().default.createElement("pre", {
|
|
240
240
|
className: (0, _css().css)`
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
margin: 0;
|
|
242
|
+
`
|
|
243
243
|
}, JSON.stringify(result, null, 2));
|
|
244
244
|
},
|
|
245
245
|
RadioWithTooltip: _RadioWithTooltip.RadioWithTooltip,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Registry } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Registry } from '@nocobase/utils/client';
|
|
3
|
+
import { RadioWithTooltip } from '../components/RadioWithTooltip';
|
|
4
|
+
import { useWorkflowVariableOptions } from '../variable';
|
|
5
5
|
interface Calculator {
|
|
6
6
|
name: string;
|
|
7
7
|
type: 'boolean' | 'number' | 'string' | 'date' | 'unknown' | 'null' | 'array';
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Calculation = Calculation;
|
|
7
7
|
exports.default = exports.calculators = void 0;
|
|
8
|
-
function
|
|
9
|
-
const data =
|
|
10
|
-
|
|
8
|
+
function _icons() {
|
|
9
|
+
const data = require("@ant-design/icons");
|
|
10
|
+
_icons = function _icons() {
|
|
11
11
|
return data;
|
|
12
12
|
};
|
|
13
13
|
return data;
|
|
@@ -19,44 +19,44 @@ function _css() {
|
|
|
19
19
|
};
|
|
20
20
|
return data;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const data = require("
|
|
24
|
-
|
|
22
|
+
function _client() {
|
|
23
|
+
const data = require("@nocobase/client");
|
|
24
|
+
_client = function _client() {
|
|
25
25
|
return data;
|
|
26
26
|
};
|
|
27
27
|
return data;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const data = require("@
|
|
31
|
-
|
|
29
|
+
function _client2() {
|
|
30
|
+
const data = require("@nocobase/evaluators/client");
|
|
31
|
+
_client2 = function _client2() {
|
|
32
32
|
return data;
|
|
33
33
|
};
|
|
34
34
|
return data;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const data = require("
|
|
38
|
-
|
|
36
|
+
function _client3() {
|
|
37
|
+
const data = require("@nocobase/utils/client");
|
|
38
|
+
_client3 = function _client3() {
|
|
39
39
|
return data;
|
|
40
40
|
};
|
|
41
41
|
return data;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const data = require("
|
|
45
|
-
|
|
43
|
+
function _antd() {
|
|
44
|
+
const data = require("antd");
|
|
45
|
+
_antd = function _antd() {
|
|
46
46
|
return data;
|
|
47
47
|
};
|
|
48
48
|
return data;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const data = require("
|
|
52
|
-
|
|
50
|
+
function _react() {
|
|
51
|
+
const data = _interopRequireDefault(require("react"));
|
|
52
|
+
_react = function _react() {
|
|
53
53
|
return data;
|
|
54
54
|
};
|
|
55
55
|
return data;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const data = require("
|
|
59
|
-
|
|
57
|
+
function _reactI18next() {
|
|
58
|
+
const data = require("react-i18next");
|
|
59
|
+
_reactI18next = function _reactI18next() {
|
|
60
60
|
return data;
|
|
61
61
|
};
|
|
62
62
|
return data;
|
|
@@ -64,18 +64,18 @@ function _client3() {
|
|
|
64
64
|
var _ = require(".");
|
|
65
65
|
var _Branch = require("../Branch");
|
|
66
66
|
var _FlowContext = require("../FlowContext");
|
|
67
|
-
var _style = require("../style");
|
|
68
|
-
var _locale = require("../locale");
|
|
69
|
-
var _variable = require("../variable");
|
|
70
67
|
var _RadioWithTooltip = require("../components/RadioWithTooltip");
|
|
71
68
|
var _renderEngineReference = require("../components/renderEngineReference");
|
|
69
|
+
var _locale = require("../locale");
|
|
70
|
+
var _style = require("../style");
|
|
71
|
+
var _variable = require("../variable");
|
|
72
72
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
73
73
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
74
74
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
75
75
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
76
76
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
77
77
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
78
|
-
const calculators = new (
|
|
78
|
+
const calculators = new (_client3().Registry)();
|
|
79
79
|
exports.calculators = calculators;
|
|
80
80
|
calculators.register('equal', {
|
|
81
81
|
name: '=',
|
|
@@ -188,16 +188,16 @@ function Calculation({
|
|
|
188
188
|
operands = [],
|
|
189
189
|
onChange: _onChange
|
|
190
190
|
}) {
|
|
191
|
-
const compile = (0,
|
|
191
|
+
const compile = (0, _client().useCompile)();
|
|
192
192
|
const options = (0, _variable.useWorkflowVariableOptions)();
|
|
193
193
|
return _react().default.createElement("fieldset", {
|
|
194
194
|
className: (0, _css().css)`
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, _react().default.createElement(
|
|
195
|
+
display: flex;
|
|
196
|
+
gap: 0.5em;
|
|
197
|
+
align-items: center;
|
|
198
|
+
flex-wrap: wrap;
|
|
199
|
+
`
|
|
200
|
+
}, _react().default.createElement(_client().Variable.Input, {
|
|
201
201
|
value: operands[0],
|
|
202
202
|
onChange: v => _onChange({
|
|
203
203
|
calculator,
|
|
@@ -220,7 +220,7 @@ function Calculation({
|
|
|
220
220
|
}]) => _react().default.createElement(_antd().Select.Option, {
|
|
221
221
|
key: value,
|
|
222
222
|
value: value
|
|
223
|
-
}, compile(name)))))), _react().default.createElement(
|
|
223
|
+
}, compile(name)))))), _react().default.createElement(_client().Variable.Input, {
|
|
224
224
|
value: operands[1],
|
|
225
225
|
onChange: v => _onChange({
|
|
226
226
|
calculator,
|
|
@@ -243,10 +243,10 @@ function CalculationItem({
|
|
|
243
243
|
operands = _value$operands === void 0 ? [] : _value$operands;
|
|
244
244
|
return _react().default.createElement("div", {
|
|
245
245
|
className: (0, _css().css)`
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
display: flex;
|
|
247
|
+
position: relative;
|
|
248
|
+
margin: 0.5em 0;
|
|
249
|
+
`
|
|
250
250
|
}, value.group ? _react().default.createElement(CalculationGroup, {
|
|
251
251
|
value: value.group,
|
|
252
252
|
onChange: group => _onChange2(_objectSpread(_objectSpread({}, value), {}, {
|
|
@@ -305,27 +305,27 @@ function CalculationGroup({
|
|
|
305
305
|
}
|
|
306
306
|
return _react().default.createElement("div", {
|
|
307
307
|
className: (0, _css().cx)('node-type-condition-group', (0, _css().css)`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
308
|
+
position: relative;
|
|
309
|
+
width: 100%;
|
|
310
|
+
.node-type-condition-group {
|
|
311
|
+
padding: 0.5em 1em;
|
|
312
|
+
border: 1px dashed #ddd;
|
|
313
|
+
}
|
|
314
|
+
+ button {
|
|
315
|
+
position: absolute;
|
|
316
|
+
right: 0;
|
|
317
|
+
}
|
|
318
|
+
`)
|
|
319
319
|
}, _react().default.createElement("div", {
|
|
320
320
|
className: (0, _css().css)`
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
gap: 0.5em;
|
|
324
|
+
.ant-select {
|
|
325
|
+
width: auto;
|
|
326
|
+
min-width: 6em;
|
|
327
|
+
}
|
|
328
|
+
`
|
|
329
329
|
}, _react().default.createElement(_reactI18next().Trans, null, 'Meet ', _react().default.createElement(_antd().Select, {
|
|
330
330
|
value: type,
|
|
331
331
|
onChange: t => _onChange3(_objectSpread(_objectSpread({}, value), {}, {
|
|
@@ -344,13 +344,13 @@ function CalculationGroup({
|
|
|
344
344
|
onRemove: () => _onRemove(i)
|
|
345
345
|
}))), _react().default.createElement("div", {
|
|
346
346
|
className: (0, _css().css)`
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
button {
|
|
348
|
+
padding: 0;
|
|
349
|
+
&:not(:last-child) {
|
|
350
|
+
margin-right: 1em;
|
|
351
|
+
}
|
|
351
352
|
}
|
|
352
|
-
|
|
353
|
-
`
|
|
353
|
+
`
|
|
354
354
|
}, _react().default.createElement(_antd().Button, {
|
|
355
355
|
type: "link",
|
|
356
356
|
onClick: onAddSingle
|
|
@@ -405,7 +405,7 @@ var _default = {
|
|
|
405
405
|
'x-component-props': {
|
|
406
406
|
options: [['basic', {
|
|
407
407
|
label: `{{t("Basic", { ns: "${_locale.NAMESPACE}" })}}`
|
|
408
|
-
}], ...Array.from(
|
|
408
|
+
}], ...Array.from(_client2().evaluators.getEntities())].reduce((result, [value, options]) => result.concat(_objectSpread({
|
|
409
409
|
value
|
|
410
410
|
}, options)), [])
|
|
411
411
|
},
|
|
@@ -439,7 +439,7 @@ var _default = {
|
|
|
439
439
|
form
|
|
440
440
|
}) {
|
|
441
441
|
const values = form.values;
|
|
442
|
-
const _evaluators$get =
|
|
442
|
+
const _evaluators$get = _client2().evaluators.get(values.engine),
|
|
443
443
|
evaluate = _evaluators$get.evaluate;
|
|
444
444
|
const exp = value.trim().replace(/{{([^{}]+)}}/g, ' 1 ');
|
|
445
445
|
try {
|
|
@@ -492,12 +492,12 @@ var _default = {
|
|
|
492
492
|
className: (0, _css().cx)(_style.nodeSubtreeClass)
|
|
493
493
|
}, _react().default.createElement("div", {
|
|
494
494
|
className: (0, _css().cx)(_style.branchBlockClass, (0, _css().css)`
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
> * > .workflow-branch-lines {
|
|
496
|
+
> button {
|
|
497
|
+
display: none;
|
|
498
|
+
}
|
|
498
499
|
}
|
|
499
|
-
|
|
500
|
-
`)
|
|
500
|
+
`)
|
|
501
501
|
}, _react().default.createElement(_Branch.Branch, {
|
|
502
502
|
from: data,
|
|
503
503
|
entry: falseEntry,
|
|
@@ -512,7 +512,7 @@ var _default = {
|
|
|
512
512
|
height: 2em;
|
|
513
513
|
overflow: visible;
|
|
514
514
|
|
|
515
|
-
> span{
|
|
515
|
+
> span {
|
|
516
516
|
position: absolute;
|
|
517
517
|
top: calc(1.5em - 1px);
|
|
518
518
|
line-height: 1em;
|
|
@@ -522,9 +522,13 @@ var _default = {
|
|
|
522
522
|
}
|
|
523
523
|
`
|
|
524
524
|
}, _react().default.createElement("span", {
|
|
525
|
-
className: (0, _css().css)`
|
|
525
|
+
className: (0, _css().css)`
|
|
526
|
+
right: 4em;
|
|
527
|
+
`
|
|
526
528
|
}, t('No')), _react().default.createElement("span", {
|
|
527
|
-
className: (0, _css().css)`
|
|
529
|
+
className: (0, _css().css)`
|
|
530
|
+
left: 4em;
|
|
531
|
+
`
|
|
528
532
|
}, t('Yes')))));
|
|
529
533
|
},
|
|
530
534
|
scope: {
|