@nocobase/plugin-workflow 0.9.0-alpha.2 → 0.9.1-alpha.2
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/README.md +9 -0
- package/README.zh-CN.md +9 -0
- package/lib/client/AddButton.d.ts +1 -1
- package/lib/client/AddButton.js +43 -27
- package/lib/client/Branch.d.ts +1 -1
- package/lib/client/ExecutionCanvas.js +5 -10
- package/lib/client/WorkflowCanvas.js +12 -42
- package/lib/client/WorkflowProvider.js +10 -1
- package/lib/client/components/CollectionBlockInitializer.d.ts +7 -0
- package/lib/client/components/CollectionBlockInitializer.js +81 -0
- package/lib/client/components/CollectionFieldInitializers.d.ts +2 -0
- package/lib/client/components/CollectionFieldInitializers.js +89 -0
- package/lib/client/components/CollectionFieldset.js +25 -33
- package/lib/client/components/FilterDynamicComponent.d.ts +6 -0
- package/lib/client/components/FilterDynamicComponent.js +43 -0
- package/lib/client/components/NullRender.d.ts +1 -0
- package/lib/client/components/NullRender.js +10 -0
- package/lib/client/components/RadioWithTooltip.d.ts +7 -0
- package/lib/client/components/RadioWithTooltip.js +94 -0
- package/lib/client/constants.d.ts +10 -8
- package/lib/client/constants.js +52 -14
- package/lib/client/index.d.ts +0 -1
- package/lib/client/index.js +1 -10
- package/lib/client/locale/en-US.d.ts +18 -18
- package/lib/client/locale/en-US.js +19 -19
- package/lib/client/locale/zh-CN.d.ts +47 -20
- package/lib/client/locale/zh-CN.js +48 -21
- package/lib/client/nodes/calculation.d.ts +39 -7
- package/lib/client/nodes/calculation.js +165 -19
- package/lib/client/nodes/condition.d.ts +67 -4
- package/lib/client/nodes/condition.js +283 -31
- package/lib/client/nodes/create.d.ts +10 -10
- package/lib/client/nodes/create.js +28 -42
- package/lib/client/nodes/delay.d.ts +4 -4
- package/lib/client/nodes/delay.js +10 -8
- package/lib/client/nodes/destroy.d.ts +4 -7
- package/lib/client/nodes/destroy.js +4 -5
- package/lib/client/nodes/index.d.ts +10 -2
- package/lib/client/nodes/index.js +217 -110
- package/lib/client/nodes/manual/AssigneesSelect.d.ts +6 -0
- package/lib/client/nodes/manual/AssigneesSelect.js +65 -0
- package/lib/client/nodes/manual/ModeConfig.d.ts +5 -0
- package/lib/client/nodes/manual/ModeConfig.js +160 -0
- package/lib/client/nodes/manual/SchemaConfig.d.ts +6 -0
- package/lib/client/nodes/manual/SchemaConfig.js +715 -0
- package/lib/client/nodes/manual/WorkflowTodo.d.ts +8 -0
- package/lib/client/nodes/manual/WorkflowTodo.js +691 -0
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +5 -0
- package/lib/client/nodes/manual/WorkflowTodoBlockInitializer.js +75 -0
- package/lib/client/nodes/manual/index.d.ts +62 -0
- package/lib/client/nodes/manual/index.js +137 -0
- package/lib/client/nodes/parallel.d.ts +12 -7
- package/lib/client/nodes/parallel.js +32 -39
- package/lib/client/nodes/query.d.ts +11 -19
- package/lib/client/nodes/query.js +40 -47
- package/lib/client/nodes/request.d.ts +77 -42
- package/lib/client/nodes/request.js +123 -69
- package/lib/client/nodes/update.d.ts +33 -29
- package/lib/client/nodes/update.js +14 -7
- package/lib/client/schemas/collection.d.ts +0 -3
- package/lib/client/schemas/collection.js +2 -7
- package/lib/client/schemas/executions.js +1 -1
- package/lib/client/schemas/workflows.js +1 -1
- package/lib/client/style.js +51 -9
- package/lib/client/triggers/collection.d.ts +44 -15
- package/lib/client/triggers/collection.js +104 -82
- package/lib/client/triggers/index.d.ts +6 -3
- package/lib/client/triggers/index.js +167 -74
- package/lib/client/triggers/schedule/DateFieldsSelect.js +1 -3
- package/lib/client/triggers/schedule/ScheduleConfig.js +15 -17
- package/lib/client/triggers/schedule/index.d.ts +7 -6
- package/lib/client/triggers/schedule/index.js +39 -81
- package/lib/client/utils.d.ts +1 -0
- package/lib/client/utils.js +38 -0
- package/lib/client/variable.d.ts +21 -0
- package/lib/client/variable.js +147 -0
- package/lib/server/Plugin.d.ts +3 -3
- package/lib/server/Plugin.js +12 -21
- package/lib/server/Processor.d.ts +9 -2
- package/lib/server/Processor.js +33 -33
- package/lib/server/actions/index.js +2 -4
- package/lib/server/actions/workflows.d.ts +1 -0
- package/lib/server/actions/workflows.js +80 -23
- package/lib/server/collections/executions.js +5 -7
- package/lib/server/collections/flow_nodes.js +6 -18
- package/lib/server/collections/jobs.js +3 -1
- package/lib/server/collections/workflows.js +8 -4
- package/lib/server/constants.d.ts +9 -3
- package/lib/server/constants.js +11 -5
- package/lib/server/functions/index.d.ts +4 -0
- package/lib/server/functions/index.js +38 -0
- package/lib/server/index.d.ts +0 -1
- package/lib/server/index.js +0 -14
- package/lib/server/instructions/calculation.d.ts +2 -7
- package/lib/server/instructions/calculation.js +32 -37
- package/lib/server/instructions/condition.d.ts +4 -4
- package/lib/server/instructions/condition.js +126 -54
- package/lib/server/instructions/index.js +1 -1
- package/lib/server/instructions/manual/actions.js +101 -0
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.d.ts +2 -0
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/jobs.js +2 -1
- package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.js +10 -10
- package/lib/server/instructions/manual/index.d.ts +25 -0
- package/lib/server/instructions/manual/index.js +200 -0
- package/lib/server/instructions/parallel.js +11 -7
- package/lib/server/instructions/request.d.ts +5 -4
- package/lib/server/instructions/request.js +60 -79
- package/lib/server/migrations/20230221032941-change-request-body-type.d.ts +5 -0
- package/lib/server/migrations/20230221032941-change-request-body-type.js +113 -0
- package/lib/server/migrations/20230221071831-calculation-expression.d.ts +4 -0
- package/lib/server/migrations/20230221071831-calculation-expression.js +143 -0
- package/lib/server/migrations/20230221121203-condition-calculation.d.ts +4 -0
- package/lib/server/migrations/20230221121203-condition-calculation.js +126 -0
- package/lib/server/migrations/20230221162902-jsonb-to-json.d.ts +4 -0
- package/lib/server/migrations/20230221162902-jsonb-to-json.js +81 -0
- package/lib/server/triggers/schedule.js +11 -3
- package/package.json +10 -10
- package/lib/client/calculators.d.ts +0 -89
- package/lib/client/calculators.js +0 -668
- package/lib/client/components/CollectionFieldSelect.d.ts +0 -2
- package/lib/client/components/CollectionFieldSelect.js +0 -106
- package/lib/client/components/EjsTextArea.d.ts +0 -2
- package/lib/client/components/EjsTextArea.js +0 -232
- package/lib/server/actions/jobs.d.ts +0 -2
- package/lib/server/actions/jobs.js +0 -39
- package/lib/server/calculators/index.d.ts +0 -40
- package/lib/server/calculators/index.js +0 -187
- package/lib/server/extensions/assignees/actions.js +0 -75
- package/lib/server/extensions/assignees/index.d.ts +0 -2
- package/lib/server/extensions/assignees/index.js +0 -273
- package/lib/server/extensions/index.d.ts +0 -3
- package/lib/server/extensions/index.js +0 -13
- package/lib/server/instructions/prompt.d.ts +0 -19
- package/lib/server/instructions/prompt.js +0 -131
- /package/lib/server/{extensions/assignees → instructions/manual}/actions.d.ts +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.d.ts +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users.js +0 -0
- /package/lib/server/{extensions/assignees/collections → instructions/manual/collecions}/users_jobs.d.ts +0 -0
|
@@ -75,10 +75,10 @@ function _client() {
|
|
|
75
75
|
return data;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
var _calculators = require("../calculators");
|
|
79
|
-
|
|
80
78
|
var _locale = require("../locale");
|
|
81
79
|
|
|
80
|
+
var _variable = require("../variable");
|
|
81
|
+
|
|
82
82
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
83
83
|
|
|
84
84
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -96,8 +96,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
96
96
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
97
97
|
|
|
98
98
|
function AssociationInput(props) {
|
|
99
|
-
var _data$config;
|
|
100
|
-
|
|
101
99
|
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
102
100
|
getCollectionFields = _useCollectionManager.getCollectionFields;
|
|
103
101
|
|
|
@@ -107,9 +105,9 @@ function AssociationInput(props) {
|
|
|
107
105
|
const fieldName = path.segments[path.segments.length - 1];
|
|
108
106
|
|
|
109
107
|
const _useForm = (0, _react2().useForm)(),
|
|
110
|
-
|
|
108
|
+
config = _useForm.values;
|
|
111
109
|
|
|
112
|
-
const fields = getCollectionFields(
|
|
110
|
+
const fields = getCollectionFields(config === null || config === void 0 ? void 0 : config.collection);
|
|
113
111
|
|
|
114
112
|
const _fields$find = fields.find(item => item.name === fieldName),
|
|
115
113
|
type = _fields$find.type;
|
|
@@ -130,26 +128,28 @@ function AssociationInput(props) {
|
|
|
130
128
|
|
|
131
129
|
var _default = (0, _react2().observer)(({
|
|
132
130
|
value,
|
|
131
|
+
disabled,
|
|
133
132
|
onChange: _onChange
|
|
134
133
|
}) => {
|
|
135
|
-
var _data$config2;
|
|
136
|
-
|
|
137
134
|
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
138
135
|
t = _useTranslation.t;
|
|
139
136
|
|
|
140
137
|
const compile = (0, _client().useCompile)();
|
|
138
|
+
const form = (0, _react2().useForm)();
|
|
141
139
|
|
|
142
140
|
const _useCollectionManager2 = (0, _client().useCollectionManager)(),
|
|
143
141
|
getCollection = _useCollectionManager2.getCollection,
|
|
144
142
|
getCollectionFields = _useCollectionManager2.getCollectionFields;
|
|
145
143
|
|
|
146
144
|
const _useForm2 = (0, _react2().useForm)(),
|
|
147
|
-
|
|
145
|
+
config = _useForm2.values;
|
|
148
146
|
|
|
149
|
-
const collectionName =
|
|
150
|
-
const fields = getCollectionFields(collectionName).filter(field => !field.hidden && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : false) //
|
|
151
|
-
);
|
|
147
|
+
const collectionName = config === null || config === void 0 ? void 0 : config.collection;
|
|
148
|
+
const fields = getCollectionFields(collectionName).filter(field => !field.hidden && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : false) // TODO: should use some field option but not type to control this
|
|
149
|
+
&& !['formula'].includes(field.type));
|
|
152
150
|
const unassignedFields = fields.filter(field => !(field.name in value));
|
|
151
|
+
const scope = (0, _variable.useWorkflowVariableOptions)();
|
|
152
|
+
const mergedDisabled = disabled || form.disabled;
|
|
153
153
|
return _react().default.createElement("fieldset", {
|
|
154
154
|
className: (0, _css().css)`
|
|
155
155
|
margin-top: .5em;
|
|
@@ -167,16 +167,9 @@ var _default = (0, _react2().observer)(({
|
|
|
167
167
|
}, fields.filter(field => field.name in value).map(field => {
|
|
168
168
|
var _field$uiSchema$title, _field$uiSchema;
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
constant: {
|
|
172
|
-
title: `{{t("Constant", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
173
|
-
value: 'constant'
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
const operand = (0, _calculators.parseValue)(value[field.name], VTypes); // constant for associations to use Input, others to use CollectionField
|
|
170
|
+
// constant for associations to use Input, others to use CollectionField
|
|
178
171
|
// dynamic values only support belongsTo/hasOne association, other association type should disable
|
|
179
|
-
// TODO: try to use <ObjectField> to replace this map
|
|
172
|
+
const ConstantCompoent = ['belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) ? AssociationInput : _client().CollectionField; // TODO: try to use <ObjectField> to replace this map
|
|
180
173
|
|
|
181
174
|
return _react().default.createElement(_antd().Form.Item, {
|
|
182
175
|
key: field.name,
|
|
@@ -187,30 +180,29 @@ var _default = (0, _react2().observer)(({
|
|
|
187
180
|
display: flex;
|
|
188
181
|
}
|
|
189
182
|
`
|
|
190
|
-
}, _react().default.createElement(
|
|
191
|
-
|
|
192
|
-
}, _react().default.createElement(_calculators.Operand, {
|
|
183
|
+
}, _react().default.createElement(_client().Variable.Input, {
|
|
184
|
+
scope: ['hasMany', 'belongsToMany'].includes(field.type) ? [] : scope,
|
|
193
185
|
value: value[field.name],
|
|
194
186
|
onChange: next => {
|
|
195
187
|
_onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
196
188
|
[field.name]: next
|
|
197
189
|
}));
|
|
198
190
|
}
|
|
199
|
-
},
|
|
191
|
+
}, _react().default.createElement(_client().SchemaComponent, {
|
|
200
192
|
schema: {
|
|
201
193
|
type: 'void',
|
|
202
194
|
properties: {
|
|
203
195
|
[field.name]: {
|
|
204
|
-
'x-component':
|
|
196
|
+
'x-component': ConstantCompoent,
|
|
197
|
+
|
|
198
|
+
['x-validator']() {
|
|
199
|
+
return '';
|
|
200
|
+
}
|
|
201
|
+
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
|
-
},
|
|
208
|
-
components: {
|
|
209
|
-
CollectionField: _client().CollectionField,
|
|
210
|
-
AssociationInput
|
|
211
204
|
}
|
|
212
|
-
})
|
|
213
|
-
: null), _react().default.createElement(_antd().Button, {
|
|
205
|
+
})), !mergedDisabled ? _react().default.createElement(_antd().Button, {
|
|
214
206
|
type: "link",
|
|
215
207
|
icon: _react().default.createElement(_icons().CloseCircleOutlined, null),
|
|
216
208
|
onClick: () => {
|
|
@@ -220,7 +212,7 @@ var _default = (0, _react2().observer)(({
|
|
|
220
212
|
|
|
221
213
|
_onChange(rest);
|
|
222
214
|
}
|
|
223
|
-
}))
|
|
215
|
+
}) : null);
|
|
224
216
|
}), unassignedFields.length ? _react().default.createElement(_antd().Dropdown, {
|
|
225
217
|
overlay: _react().default.createElement(_antd().Menu, {
|
|
226
218
|
onClick: ({
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FilterDynamicComponent = FilterDynamicComponent;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _client() {
|
|
19
|
+
const data = require("@nocobase/client");
|
|
20
|
+
|
|
21
|
+
_client = function _client() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _variable = require("../variable");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
function FilterDynamicComponent({
|
|
33
|
+
value,
|
|
34
|
+
onChange,
|
|
35
|
+
renderSchemaComponent
|
|
36
|
+
}) {
|
|
37
|
+
const scope = (0, _variable.useWorkflowVariableOptions)();
|
|
38
|
+
return _react().default.createElement(_client().Variable.Input, {
|
|
39
|
+
value: value,
|
|
40
|
+
onChange: onChange,
|
|
41
|
+
scope: scope
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function NullRender(): any;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RadioWithTooltip = RadioWithTooltip;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _antd() {
|
|
19
|
+
const data = require("antd");
|
|
20
|
+
|
|
21
|
+
_antd = function _antd() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _icons() {
|
|
29
|
+
const data = require("@ant-design/icons");
|
|
30
|
+
|
|
31
|
+
_icons = function _icons() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _css() {
|
|
39
|
+
const data = require("@emotion/css");
|
|
40
|
+
|
|
41
|
+
_css = function _css() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _client() {
|
|
49
|
+
const data = require("@nocobase/client");
|
|
50
|
+
|
|
51
|
+
_client = function _client() {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const _excluded = ["options"];
|
|
59
|
+
|
|
60
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
61
|
+
|
|
62
|
+
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; }
|
|
63
|
+
|
|
64
|
+
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; }
|
|
65
|
+
|
|
66
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
67
|
+
|
|
68
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
69
|
+
|
|
70
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
71
|
+
|
|
72
|
+
function RadioWithTooltip(props) {
|
|
73
|
+
const _props$options = props.options,
|
|
74
|
+
options = _props$options === void 0 ? [] : _props$options,
|
|
75
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
76
|
+
|
|
77
|
+
const compile = (0, _client().useCompile)();
|
|
78
|
+
return _react().default.createElement(_antd().Radio.Group, _objectSpread({}, other), options.map(option => _react().default.createElement(_antd().Radio, {
|
|
79
|
+
key: option.value,
|
|
80
|
+
value: option.value
|
|
81
|
+
}, _react().default.createElement("span", {
|
|
82
|
+
className: (0, _css().css)`
|
|
83
|
+
& + .anticon {
|
|
84
|
+
margin-left: .25em;
|
|
85
|
+
}
|
|
86
|
+
`
|
|
87
|
+
}, compile(option.label)), option.tooltip && _react().default.createElement(_antd().Tooltip, {
|
|
88
|
+
title: compile(option.tooltip)
|
|
89
|
+
}, _react().default.createElement(_icons().QuestionCircleOutlined, {
|
|
90
|
+
style: {
|
|
91
|
+
color: '#666'
|
|
92
|
+
}
|
|
93
|
+
})))));
|
|
94
|
+
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
export declare const EXECUTION_STATUS: {
|
|
2
2
|
QUEUEING: any;
|
|
3
3
|
STARTED: number;
|
|
4
|
-
|
|
4
|
+
RESOLVED: number;
|
|
5
5
|
FAILED: number;
|
|
6
|
+
ERROR: number;
|
|
7
|
+
ABORTED: number;
|
|
6
8
|
CANCELED: number;
|
|
9
|
+
REJECTED: number;
|
|
7
10
|
};
|
|
8
|
-
export declare const ExecutionStatusOptions:
|
|
11
|
+
export declare const ExecutionStatusOptions: {
|
|
9
12
|
value: any;
|
|
10
13
|
label: string;
|
|
11
14
|
color: string;
|
|
12
|
-
}
|
|
13
|
-
value: number;
|
|
14
|
-
label: string;
|
|
15
|
-
color?: undefined;
|
|
16
|
-
})[];
|
|
15
|
+
}[];
|
|
17
16
|
export declare const ExecutionStatusOptionsMap: {};
|
|
18
17
|
export declare const JOB_STATUS: {
|
|
19
18
|
PENDING: number;
|
|
20
19
|
RESOLVED: number;
|
|
21
|
-
|
|
20
|
+
FAILED: number;
|
|
21
|
+
ERROR: number;
|
|
22
|
+
ABORTED: number;
|
|
22
23
|
CANCELED: number;
|
|
24
|
+
REJECTED: number;
|
|
23
25
|
};
|
|
24
26
|
export declare const JobStatusOptions: {
|
|
25
27
|
value: number;
|
package/lib/client/constants.js
CHANGED
|
@@ -32,9 +32,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
32
32
|
const EXECUTION_STATUS = {
|
|
33
33
|
QUEUEING: null,
|
|
34
34
|
STARTED: 0,
|
|
35
|
-
|
|
35
|
+
RESOLVED: 1,
|
|
36
36
|
FAILED: -1,
|
|
37
|
-
|
|
37
|
+
ERROR: -2,
|
|
38
|
+
ABORTED: -3,
|
|
39
|
+
CANCELED: -4,
|
|
40
|
+
REJECTED: -5
|
|
38
41
|
};
|
|
39
42
|
exports.EXECUTION_STATUS = EXECUTION_STATUS;
|
|
40
43
|
const ExecutionStatusOptions = [{
|
|
@@ -46,16 +49,29 @@ const ExecutionStatusOptions = [{
|
|
|
46
49
|
label: `{{t("On going", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
47
50
|
color: 'gold'
|
|
48
51
|
}, {
|
|
49
|
-
value: EXECUTION_STATUS.
|
|
50
|
-
label: `{{t("
|
|
52
|
+
value: EXECUTION_STATUS.RESOLVED,
|
|
53
|
+
label: `{{t("Resolved", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
51
54
|
color: 'green'
|
|
52
55
|
}, {
|
|
53
56
|
value: EXECUTION_STATUS.FAILED,
|
|
54
57
|
label: `{{t("Failed", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
55
58
|
color: 'red'
|
|
59
|
+
}, {
|
|
60
|
+
value: EXECUTION_STATUS.ERROR,
|
|
61
|
+
label: `{{t("Error", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
62
|
+
color: 'red'
|
|
63
|
+
}, {
|
|
64
|
+
value: EXECUTION_STATUS.ABORTED,
|
|
65
|
+
label: `{{t("Aborted", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
66
|
+
color: 'red'
|
|
56
67
|
}, {
|
|
57
68
|
value: EXECUTION_STATUS.CANCELED,
|
|
58
|
-
label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}
|
|
69
|
+
label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
70
|
+
color: 'volcano'
|
|
71
|
+
}, {
|
|
72
|
+
value: EXECUTION_STATUS.REJECTED,
|
|
73
|
+
label: `{{t("Rejected", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
74
|
+
color: 'volcano'
|
|
59
75
|
}];
|
|
60
76
|
exports.ExecutionStatusOptions = ExecutionStatusOptions;
|
|
61
77
|
const ExecutionStatusOptionsMap = ExecutionStatusOptions.reduce((map, option) => Object.assign(map, {
|
|
@@ -65,30 +81,52 @@ exports.ExecutionStatusOptionsMap = ExecutionStatusOptionsMap;
|
|
|
65
81
|
const JOB_STATUS = {
|
|
66
82
|
PENDING: 0,
|
|
67
83
|
RESOLVED: 1,
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
FAILED: -1,
|
|
85
|
+
ERROR: -2,
|
|
86
|
+
ABORTED: -3,
|
|
87
|
+
CANCELED: -4,
|
|
88
|
+
REJECTED: -5
|
|
70
89
|
};
|
|
71
90
|
exports.JOB_STATUS = JOB_STATUS;
|
|
72
91
|
const JobStatusOptions = [{
|
|
73
92
|
value: JOB_STATUS.PENDING,
|
|
74
93
|
label: `{{t("Pending", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
75
|
-
color: '
|
|
94
|
+
color: 'gold',
|
|
76
95
|
icon: _react().default.createElement(_icons().ClockCircleOutlined, null)
|
|
77
96
|
}, {
|
|
78
97
|
value: JOB_STATUS.RESOLVED,
|
|
79
|
-
label: `{{t("
|
|
80
|
-
color: '
|
|
98
|
+
label: `{{t("Resolved", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
99
|
+
color: 'green',
|
|
81
100
|
icon: _react().default.createElement(_icons().CheckOutlined, null)
|
|
82
101
|
}, {
|
|
83
|
-
value: JOB_STATUS.
|
|
102
|
+
value: JOB_STATUS.FAILED,
|
|
84
103
|
label: `{{t("Failed", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
85
|
-
color: '
|
|
104
|
+
color: 'red',
|
|
86
105
|
icon: _react().default.createElement(_icons().ExclamationOutlined, null)
|
|
106
|
+
}, {
|
|
107
|
+
value: JOB_STATUS.ERROR,
|
|
108
|
+
label: `{{t("Error", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
109
|
+
color: 'red',
|
|
110
|
+
icon: _react().default.createElement(_icons().CloseOutlined, null)
|
|
111
|
+
}, {
|
|
112
|
+
value: JOB_STATUS.ABORTED,
|
|
113
|
+
label: `{{t("Aborted", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
114
|
+
color: 'red',
|
|
115
|
+
icon: _react().default.createElement(_icons().MinusOutlined, {
|
|
116
|
+
rotate: 90
|
|
117
|
+
})
|
|
87
118
|
}, {
|
|
88
119
|
value: JOB_STATUS.CANCELED,
|
|
89
120
|
label: `{{t("Canceled", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
90
|
-
color: '
|
|
91
|
-
icon: _react().default.createElement(_icons().
|
|
121
|
+
color: 'volcano',
|
|
122
|
+
icon: _react().default.createElement(_icons().MinusOutlined, {
|
|
123
|
+
rotate: 45
|
|
124
|
+
})
|
|
125
|
+
}, {
|
|
126
|
+
value: JOB_STATUS.REJECTED,
|
|
127
|
+
label: `{{t("Rejected", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
128
|
+
color: 'volcano',
|
|
129
|
+
icon: _react().default.createElement(_icons().MinusOutlined, null)
|
|
92
130
|
}];
|
|
93
131
|
exports.JobStatusOptions = JobStatusOptions;
|
|
94
132
|
const JobStatusOptionsMap = JobStatusOptions.reduce((map, option) => Object.assign(map, {
|
package/lib/client/index.d.ts
CHANGED
package/lib/client/index.js
CHANGED
|
@@ -4,15 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
triggers: true
|
|
8
|
-
calculators: true
|
|
7
|
+
triggers: true
|
|
9
8
|
};
|
|
10
|
-
Object.defineProperty(exports, "calculators", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _calculators.calculators;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
9
|
Object.defineProperty(exports, "default", {
|
|
17
10
|
enumerable: true,
|
|
18
11
|
get: function get() {
|
|
@@ -42,8 +35,6 @@ Object.keys(_nodes).forEach(function (key) {
|
|
|
42
35
|
});
|
|
43
36
|
});
|
|
44
37
|
|
|
45
|
-
var _calculators = require("./calculators");
|
|
46
|
-
|
|
47
38
|
var _FlowContext = require("./FlowContext");
|
|
48
39
|
|
|
49
40
|
Object.keys(_FlowContext).forEach(function (key) {
|
|
@@ -107,24 +107,24 @@ declare const _default: {
|
|
|
107
107
|
"Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.": string;
|
|
108
108
|
"Trigger in executed workflow cannot be modified": string;
|
|
109
109
|
"Node in executed workflow cannot be modified": string;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
'Can not delete': string;
|
|
111
|
+
'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': string;
|
|
112
|
+
'HTTP request': string;
|
|
113
|
+
'HTTP method': string;
|
|
113
114
|
URL: string;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
"Show available variable tool": string;
|
|
115
|
+
Headers: string;
|
|
116
|
+
'Add request header': string;
|
|
117
|
+
Parameters: string;
|
|
118
|
+
'Add parameter': string;
|
|
119
|
+
Body: string;
|
|
120
|
+
'Use variable': string;
|
|
121
|
+
Format: string;
|
|
122
|
+
Insert: string;
|
|
123
|
+
'Timeout config': string;
|
|
124
|
+
ms: string;
|
|
125
|
+
'Input request data': string;
|
|
126
|
+
'Only support standard JSON data': string;
|
|
127
|
+
'"Content-Type" only support "application/json", and no need to specify': string;
|
|
128
|
+
'Ignore fail request and continue workflow': string;
|
|
129
129
|
};
|
|
130
130
|
export default _default;
|
|
@@ -113,24 +113,24 @@ var _default = {
|
|
|
113
113
|
"Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.": "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.",
|
|
114
114
|
"Trigger in executed workflow cannot be modified": "Trigger in executed workflow cannot be modified",
|
|
115
115
|
"Node in executed workflow cannot be modified": "Node in executed workflow cannot be modified",
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
116
|
+
'Can not delete': 'Can not delete',
|
|
117
|
+
'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.': 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.',
|
|
118
|
+
'HTTP request': 'HTTP request',
|
|
119
|
+
'HTTP method': 'HTTP method',
|
|
120
|
+
'URL': 'URL',
|
|
121
|
+
'Headers': 'Headers',
|
|
122
|
+
'Add request header': 'Add request header',
|
|
123
|
+
'Parameters': 'Parameters',
|
|
124
|
+
'Add parameter': 'Add parameter',
|
|
125
|
+
'Body': 'Body',
|
|
126
|
+
'Use variable': 'Use variable',
|
|
127
|
+
'Format': 'Format',
|
|
128
|
+
'Insert': 'Insert',
|
|
129
|
+
'Timeout config': 'Timeout config',
|
|
130
|
+
'ms': 'ms',
|
|
131
|
+
'Input request data': 'Input request data',
|
|
132
|
+
'Only support standard JSON data': 'Only support standard JSON data',
|
|
133
|
+
'"Content-Type" only support "application/json", and no need to specify': '"Content-Type" only support "application/json", and no need to specify',
|
|
134
|
+
'Ignore fail request and continue workflow': 'Ignore fail request and continue workflow'
|
|
135
135
|
};
|
|
136
136
|
exports.default = _default;
|