@nocobase/plugin-workflow 0.9.1-alpha.1 → 0.9.2-alpha.1
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 +50 -86
- package/lib/client/Branch.js +0 -13
- package/lib/client/ExecutionCanvas.js +16 -63
- package/lib/client/ExecutionLink.js +3 -21
- package/lib/client/ExecutionPage.js +1 -19
- package/lib/client/ExecutionResourceProvider.js +6 -23
- package/lib/client/FlowContext.js +0 -8
- package/lib/client/WorkflowCanvas.js +57 -129
- package/lib/client/WorkflowLink.js +3 -21
- package/lib/client/WorkflowPage.js +1 -19
- package/lib/client/WorkflowProvider.js +24 -47
- package/lib/client/WorkflowShortcut.js +0 -16
- package/lib/client/components/CollectionBlockInitializer.js +12 -22
- package/lib/client/components/CollectionFieldInitializers.js +5 -24
- package/lib/client/components/CollectionFieldset.js +33 -85
- package/lib/client/components/Duration.js +0 -14
- package/lib/client/components/DynamicExpression.d.ts +4 -0
- package/lib/client/components/DynamicExpression.js +102 -0
- package/lib/client/components/FieldsSelect.d.ts +2 -0
- package/lib/client/components/FieldsSelect.js +66 -0
- package/lib/client/components/FilterDynamicComponent.js +1 -10
- package/lib/client/components/NullRender.js +0 -1
- package/lib/client/components/OpenDrawer.js +10 -35
- package/lib/client/components/RadioWithTooltip.js +5 -27
- package/lib/client/components/renderEngineReference.d.ts +1 -0
- package/lib/client/components/renderEngineReference.js +55 -0
- package/lib/client/constants.js +0 -9
- package/lib/client/index.js +0 -6
- package/lib/client/interfaces/expression.d.ts +3 -0
- package/lib/client/interfaces/expression.js +37 -0
- package/lib/client/locale/index.js +5 -15
- package/lib/client/locale/pt-BR.d.ts +130 -0
- package/lib/client/locale/pt-BR.js +136 -0
- package/lib/client/locale/zh-CN.d.ts +16 -1
- package/lib/client/locale/zh-CN.js +17 -2
- package/lib/client/nodes/calculation.d.ts +56 -7
- package/lib/client/nodes/calculation.js +141 -74
- package/lib/client/nodes/condition.d.ts +5 -9
- package/lib/client/nodes/condition.js +30 -93
- package/lib/client/nodes/create.d.ts +36 -12
- package/lib/client/nodes/create.js +14 -28
- package/lib/client/nodes/delay.d.ts +3 -7
- package/lib/client/nodes/delay.js +5 -14
- package/lib/client/nodes/destroy.d.ts +3 -11
- package/lib/client/nodes/destroy.js +14 -12
- package/lib/client/nodes/index.d.ts +2 -2
- package/lib/client/nodes/index.js +181 -222
- package/lib/client/nodes/manual/AssigneesSelect.js +8 -18
- package/lib/client/nodes/manual/ModeConfig.js +0 -27
- package/lib/client/nodes/manual/SchemaConfig.js +87 -449
- package/lib/client/nodes/manual/WorkflowTodo.js +99 -163
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +4 -20
- package/lib/client/nodes/manual/forms/customForm.d.ts +40 -0
- package/lib/client/nodes/manual/forms/customForm.js +411 -0
- package/lib/client/nodes/manual/index.d.ts +15 -6
- package/lib/client/nodes/manual/index.js +58 -54
- package/lib/client/nodes/parallel.d.ts +1 -2
- package/lib/client/nodes/parallel.js +16 -45
- package/lib/client/nodes/query.d.ts +30 -12
- package/lib/client/nodes/query.js +17 -25
- package/lib/client/nodes/request.d.ts +9 -17
- package/lib/client/nodes/request.js +13 -37
- package/lib/client/nodes/update.d.ts +27 -28
- package/lib/client/nodes/update.js +17 -18
- package/lib/client/schemas/collection.d.ts +20 -7
- package/lib/client/schemas/collection.js +27 -28
- package/lib/client/schemas/executions.js +3 -18
- package/lib/client/schemas/workflows.js +10 -33
- package/lib/client/style.js +75 -26
- package/lib/client/triggers/collection.d.ts +47 -18
- package/lib/client/triggers/collection.js +65 -123
- package/lib/client/triggers/index.d.ts +3 -6
- package/lib/client/triggers/index.js +146 -146
- package/lib/client/triggers/schedule/DateFieldsSelect.js +7 -32
- package/lib/client/triggers/schedule/EndsByField.js +1 -18
- package/lib/client/triggers/schedule/OnField.js +10 -38
- package/lib/client/triggers/schedule/RepeatField.js +4 -32
- package/lib/client/triggers/schedule/ScheduleConfig.js +25 -68
- package/lib/client/triggers/schedule/index.d.ts +21 -1
- package/lib/client/triggers/schedule/index.js +22 -24
- package/lib/client/triggers/schedule/locale/Cron.zh-CN.js +8 -4
- package/lib/client/utils.d.ts +1 -0
- package/lib/client/utils.js +31 -10
- package/lib/client/variable.d.ts +7 -6
- package/lib/client/variable.js +132 -71
- package/lib/index.js +0 -2
- package/lib/server/Plugin.d.ts +7 -7
- package/lib/server/Plugin.js +76 -111
- package/lib/server/Processor.d.ts +2 -0
- package/lib/server/Processor.js +62 -125
- package/lib/server/actions/index.js +3 -10
- package/lib/server/actions/nodes.js +34 -87
- package/lib/server/actions/workflows.js +46 -96
- package/lib/server/collections/executions.js +1 -1
- package/lib/server/collections/flow_nodes.js +7 -4
- package/lib/server/collections/jobs.js +1 -1
- package/lib/server/collections/workflows.js +3 -4
- package/lib/server/fields/expression-field.d.ts +8 -0
- package/lib/server/fields/expression-field.js +26 -0
- package/lib/server/fields/index.d.ts +1 -0
- package/lib/server/fields/index.js +12 -0
- package/lib/server/functions/index.js +3 -14
- package/lib/server/index.js +0 -6
- package/lib/server/instructions/calculation.js +22 -17
- package/lib/server/instructions/condition.js +8 -52
- package/lib/server/instructions/create.js +31 -15
- package/lib/server/instructions/delay.js +4 -32
- package/lib/server/instructions/destroy.js +6 -12
- package/lib/server/instructions/index.js +6 -23
- package/lib/server/instructions/manual/actions.js +22 -31
- package/lib/server/instructions/manual/collecions/users_jobs.js +1 -1
- package/lib/server/instructions/manual/index.d.ts +13 -12
- package/lib/server/instructions/manual/index.js +9 -47
- package/lib/server/instructions/parallel.js +9 -36
- package/lib/server/instructions/query.js +17 -15
- package/lib/server/instructions/request.js +7 -30
- package/lib/server/instructions/update.js +8 -14
- package/lib/server/migrations/20221129153547-calculation-variables.js +3 -27
- package/lib/server/migrations/20230221032941-change-request-body-type.js +3 -26
- package/lib/server/migrations/20230221071831-calculation-expression.js +1 -33
- package/lib/server/migrations/20230221121203-condition-calculation.js +5 -28
- package/lib/server/migrations/20230221162902-jsonb-to-json.js +3 -18
- package/lib/server/migrations/20230411034722-manual-multi-form.d.ts +4 -0
- package/lib/server/migrations/20230411034722-manual-multi-form.js +303 -0
- package/lib/server/models/Execution.js +0 -5
- package/lib/server/models/FlowNode.js +0 -5
- package/lib/server/models/Job.js +0 -5
- package/lib/server/models/Workflow.js +0 -5
- package/lib/server/triggers/collection.js +39 -61
- package/lib/server/triggers/index.js +3 -22
- package/lib/server/triggers/schedule.js +72 -194
- package/package.json +14 -11
|
@@ -4,46 +4,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AssigneesSelect = AssigneesSelect;
|
|
7
|
-
|
|
8
7
|
function _client() {
|
|
9
8
|
const data = require("@nocobase/client");
|
|
10
|
-
|
|
11
9
|
_client = function _client() {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _react() {
|
|
19
15
|
const data = _interopRequireDefault(require("react"));
|
|
20
|
-
|
|
21
16
|
_react = function _react() {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
return data;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
var _variable = require("../../variable");
|
|
29
|
-
|
|
30
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
23
|
function AssigneesSelect({
|
|
33
24
|
multiple = false,
|
|
34
25
|
value = [],
|
|
35
26
|
onChange: _onChange
|
|
36
27
|
}) {
|
|
37
|
-
const scope = (0, _variable.useWorkflowVariableOptions)(
|
|
38
|
-
|
|
28
|
+
const scope = (0, _variable.useWorkflowVariableOptions)([{
|
|
29
|
+
type: 'reference',
|
|
30
|
+
options: {
|
|
31
|
+
collection: 'users'
|
|
32
|
+
}
|
|
33
|
+
}]);
|
|
39
34
|
return _react().default.createElement(_client().Variable.Input, {
|
|
40
35
|
scope: scope,
|
|
41
|
-
types: [{
|
|
42
|
-
type: 'reference',
|
|
43
|
-
options: {
|
|
44
|
-
collection: 'users'
|
|
45
|
-
}
|
|
46
|
-
}],
|
|
47
36
|
value: value[0],
|
|
48
37
|
onChange: next => {
|
|
49
38
|
_onChange([next]);
|
|
@@ -56,9 +45,10 @@ function AssigneesSelect({
|
|
|
56
45
|
service: {
|
|
57
46
|
resource: 'users'
|
|
58
47
|
},
|
|
48
|
+
manual: false,
|
|
59
49
|
value: value[0],
|
|
60
50
|
onChange: v => {
|
|
61
|
-
_onChange([v]);
|
|
51
|
+
_onChange(v != null ? [v] : []);
|
|
62
52
|
}
|
|
63
53
|
}));
|
|
64
54
|
}
|
|
@@ -4,91 +4,65 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ModeConfig = ModeConfig;
|
|
7
|
-
|
|
8
7
|
function _react() {
|
|
9
8
|
const data = _interopRequireDefault(require("react"));
|
|
10
|
-
|
|
11
9
|
_react = function _react() {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _antd() {
|
|
19
15
|
const data = require("@formily/antd");
|
|
20
|
-
|
|
21
16
|
_antd = function _antd() {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
return data;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
function _antd2() {
|
|
29
22
|
const data = require("antd");
|
|
30
|
-
|
|
31
23
|
_antd2 = function _antd2() {
|
|
32
24
|
return data;
|
|
33
25
|
};
|
|
34
|
-
|
|
35
26
|
return data;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
function _icons() {
|
|
39
29
|
const data = require("@ant-design/icons");
|
|
40
|
-
|
|
41
30
|
_icons = function _icons() {
|
|
42
31
|
return data;
|
|
43
32
|
};
|
|
44
|
-
|
|
45
33
|
return data;
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
function _css() {
|
|
49
36
|
const data = require("@emotion/css");
|
|
50
|
-
|
|
51
37
|
_css = function _css() {
|
|
52
38
|
return data;
|
|
53
39
|
};
|
|
54
|
-
|
|
55
40
|
return data;
|
|
56
41
|
}
|
|
57
|
-
|
|
58
42
|
function _client() {
|
|
59
43
|
const data = require("@nocobase/client");
|
|
60
|
-
|
|
61
44
|
_client = function _client() {
|
|
62
45
|
return data;
|
|
63
46
|
};
|
|
64
|
-
|
|
65
47
|
return data;
|
|
66
48
|
}
|
|
67
|
-
|
|
68
49
|
var _locale = require("../../locale");
|
|
69
|
-
|
|
70
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
71
|
-
|
|
72
51
|
function parseMode(v) {
|
|
73
52
|
if (!v) {
|
|
74
53
|
return 'single';
|
|
75
54
|
}
|
|
76
|
-
|
|
77
55
|
if (v >= 1) {
|
|
78
56
|
return 'all';
|
|
79
57
|
}
|
|
80
|
-
|
|
81
58
|
if (v <= -1) {
|
|
82
59
|
return 'any';
|
|
83
60
|
}
|
|
84
|
-
|
|
85
61
|
const dir = Math.sign(v);
|
|
86
|
-
|
|
87
62
|
if (dir > 0) {
|
|
88
63
|
return '';
|
|
89
64
|
}
|
|
90
65
|
}
|
|
91
|
-
|
|
92
66
|
function ModeConfig({
|
|
93
67
|
value,
|
|
94
68
|
onChange: _onChange
|
|
@@ -110,7 +84,6 @@ function ModeConfig({
|
|
|
110
84
|
}
|
|
111
85
|
}) => {
|
|
112
86
|
console.log(v);
|
|
113
|
-
|
|
114
87
|
_onChange(Number(v));
|
|
115
88
|
}
|
|
116
89
|
}, _react().default.createElement(_antd2().Radio, {
|