@nocobase/plugin-workflow 0.9.2-alpha.4 → 0.9.4-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/CanvasContent.d.ts +4 -0
- package/lib/client/CanvasContent.js +49 -0
- package/lib/client/ExecutionCanvas.js +110 -44
- package/lib/client/WorkflowCanvas.js +35 -18
- package/lib/client/components/CollectionFieldset.js +2 -2
- package/lib/client/components/FieldsSelect.js +2 -1
- package/lib/client/components/NodeDescription.d.ts +2 -0
- package/lib/client/components/NodeDescription.js +59 -0
- package/lib/client/components/ValueBlock.d.ts +5 -0
- package/lib/client/components/ValueBlock.js +110 -0
- package/lib/client/index.d.ts +1 -0
- package/lib/client/index.js +12 -0
- package/lib/client/locale/es-ES.d.ts +130 -0
- package/lib/client/locale/es-ES.js +136 -0
- package/lib/client/locale/zh-CN.d.ts +35 -6
- package/lib/client/locale/zh-CN.js +35 -6
- package/lib/client/nodes/aggregate.d.ts +186 -0
- package/lib/client/nodes/aggregate.js +349 -0
- package/lib/client/nodes/calculation.d.ts +2 -1
- package/lib/client/nodes/calculation.js +35 -60
- package/lib/client/nodes/condition.d.ts +2 -6
- package/lib/client/nodes/condition.js +4 -3
- package/lib/client/nodes/create.d.ts +6 -3
- package/lib/client/nodes/create.js +16 -7
- package/lib/client/nodes/delay.d.ts +1 -0
- package/lib/client/nodes/delay.js +1 -0
- package/lib/client/nodes/destroy.d.ts +3 -2
- package/lib/client/nodes/destroy.js +1 -0
- package/lib/client/nodes/index.d.ts +5 -2
- package/lib/client/nodes/index.js +96 -105
- package/lib/client/nodes/loop.d.ts +29 -0
- package/lib/client/nodes/loop.js +165 -0
- package/lib/client/nodes/manual/AssigneesSelect.js +8 -6
- package/lib/client/nodes/manual/WorkflowTodo.js +1 -8
- package/lib/client/nodes/manual/index.d.ts +6 -1
- package/lib/client/nodes/manual/index.js +6 -1
- package/lib/client/nodes/parallel.d.ts +1 -0
- package/lib/client/nodes/parallel.js +2 -1
- package/lib/client/nodes/query.d.ts +13 -3
- package/lib/client/nodes/query.js +24 -17
- package/lib/client/nodes/request.d.ts +1 -0
- package/lib/client/nodes/request.js +1 -0
- package/lib/client/nodes/update.d.ts +3 -2
- package/lib/client/nodes/update.js +1 -0
- package/lib/client/schemas/collection.d.ts +2 -2
- package/lib/client/schemas/collection.js +5 -5
- package/lib/client/style.d.ts +1 -0
- package/lib/client/style.js +40 -26
- package/lib/client/triggers/collection.d.ts +4 -11
- package/lib/client/triggers/collection.js +7 -7
- package/lib/client/triggers/index.d.ts +1 -1
- package/lib/client/triggers/index.js +5 -3
- package/lib/client/triggers/schedule/index.d.ts +3 -1
- package/lib/client/triggers/schedule/index.js +6 -4
- package/lib/client/variable.d.ts +27 -1
- package/lib/client/variable.js +66 -35
- package/lib/server/Plugin.d.ts +5 -2
- package/lib/server/Plugin.js +2 -14
- package/lib/server/Processor.d.ts +3 -0
- package/lib/server/Processor.js +34 -8
- package/lib/server/actions/workflows.js +2 -2
- package/lib/server/collections/workflows.js +2 -1
- package/lib/server/functions/index.d.ts +7 -1
- package/lib/server/instructions/aggregate.d.ts +9 -0
- package/lib/server/instructions/aggregate.js +57 -0
- package/lib/server/instructions/calculation.js +6 -7
- package/lib/server/instructions/condition.js +1 -1
- package/lib/server/instructions/create.js +1 -1
- package/lib/server/instructions/destroy.js +1 -1
- package/lib/server/instructions/index.d.ts +1 -0
- package/lib/server/instructions/index.js +1 -1
- package/lib/server/instructions/loop.d.ts +16 -0
- package/lib/server/instructions/loop.js +107 -0
- package/lib/server/instructions/parallel.js +17 -10
- package/lib/server/instructions/query.js +1 -4
- package/lib/server/instructions/request.js +1 -1
- package/lib/server/instructions/update.js +1 -1
- package/package.json +13 -14
|
@@ -32,16 +32,16 @@ function _client2() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const data = require("
|
|
37
|
-
|
|
35
|
+
function _client3() {
|
|
36
|
+
const data = require("@nocobase/utils/client");
|
|
37
|
+
_client3 = function _client3() {
|
|
38
38
|
return data;
|
|
39
39
|
};
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const data =
|
|
44
|
-
|
|
42
|
+
function _antd2() {
|
|
43
|
+
const data = require("antd");
|
|
44
|
+
_antd2 = function _antd2() {
|
|
45
45
|
return data;
|
|
46
46
|
};
|
|
47
47
|
return data;
|
|
@@ -65,19 +65,11 @@ var _RadioWithTooltip = require("../components/RadioWithTooltip");
|
|
|
65
65
|
var _renderEngineReference = require("../components/renderEngineReference");
|
|
66
66
|
var _locale = require("../locale");
|
|
67
67
|
var _variable = require("../variable");
|
|
68
|
-
|
|
68
|
+
var _ValueBlock = require("../components/ValueBlock");
|
|
69
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
70
|
-
function
|
|
71
|
-
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; }
|
|
72
|
-
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; }
|
|
73
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
74
|
-
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); }
|
|
75
|
-
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; }
|
|
76
|
-
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; }
|
|
77
|
-
function matchDynamicExpressionCollectionField(field) {
|
|
70
|
+
function useDynamicExpressionCollectionFieldMatcher(field) {
|
|
78
71
|
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
79
|
-
getCollectionFields = _useCollectionManager.getCollectionFields
|
|
80
|
-
getCollection = _useCollectionManager.getCollection;
|
|
72
|
+
getCollectionFields = _useCollectionManager.getCollectionFields;
|
|
81
73
|
if (field.type !== 'belongsTo') {
|
|
82
74
|
return false;
|
|
83
75
|
}
|
|
@@ -90,10 +82,13 @@ const DynamicConfig = ({
|
|
|
90
82
|
}) => {
|
|
91
83
|
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
92
84
|
t = _useTranslation.t;
|
|
93
|
-
const scope = (0, _variable.useWorkflowVariableOptions)(
|
|
85
|
+
const scope = (0, _variable.useWorkflowVariableOptions)({
|
|
86
|
+
types: [useDynamicExpressionCollectionFieldMatcher]
|
|
87
|
+
});
|
|
94
88
|
return _react().default.createElement(_antd().FormLayout, {
|
|
95
89
|
layout: "vertical"
|
|
96
90
|
}, _react().default.createElement(_antd().FormItem, {
|
|
91
|
+
colon: true,
|
|
97
92
|
label: t('Expression type', {
|
|
98
93
|
ns: _locale.NAMESPACE
|
|
99
94
|
})
|
|
@@ -113,6 +108,9 @@ const DynamicConfig = ({
|
|
|
113
108
|
})))), value !== false ? _react().default.createElement(_antd().FormItem, {
|
|
114
109
|
label: t('Select dynamic expression', {
|
|
115
110
|
ns: _locale.NAMESPACE
|
|
111
|
+
}),
|
|
112
|
+
extra: t('Select the dynamic expression queried from the upstream node. You need to query it from an expression collection.', {
|
|
113
|
+
ns: _locale.NAMESPACE
|
|
116
114
|
})
|
|
117
115
|
}, _react().default.createElement(_client().Variable.Input, {
|
|
118
116
|
value: value || null,
|
|
@@ -121,22 +119,26 @@ const DynamicConfig = ({
|
|
|
121
119
|
})) : null);
|
|
122
120
|
};
|
|
123
121
|
function useWorkflowVariableEntityOptions() {
|
|
124
|
-
return (0, _variable.useWorkflowVariableOptions)(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
return (0, _variable.useWorkflowVariableOptions)({
|
|
123
|
+
types: [{
|
|
124
|
+
type: 'reference',
|
|
125
|
+
options: {
|
|
126
|
+
collection: '*',
|
|
127
|
+
entity: true
|
|
128
|
+
}
|
|
129
|
+
}]
|
|
130
|
+
});
|
|
131
131
|
}
|
|
132
132
|
var _default = {
|
|
133
133
|
title: `{{t("Calculation", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
134
134
|
type: 'calculation',
|
|
135
135
|
group: 'control',
|
|
136
|
+
description: `{{t("Calculate an expression based on a calculation engine and obtain a value as the result. Variables in the upstream nodes can be used in the expression. The expression can be static or dynamic one from an expression collections.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
136
137
|
fieldset: {
|
|
137
138
|
dynamic: {
|
|
138
139
|
type: 'string',
|
|
139
140
|
'x-component': 'DynamicConfig',
|
|
141
|
+
// description: `{{t("Select the dynamic expression queried from the upstream node. You need to query it from an expression collection.", { ns: "${NAMESPACE}" })}}`,
|
|
140
142
|
default: false
|
|
141
143
|
},
|
|
142
144
|
engine: {
|
|
@@ -231,7 +233,7 @@ var _default = {
|
|
|
231
233
|
if (!execution) {
|
|
232
234
|
return (0, _locale.lang)('Calculation result');
|
|
233
235
|
}
|
|
234
|
-
const result = (0,
|
|
236
|
+
const result = (0, _client3().parse)(dataSource)({
|
|
235
237
|
$jobsMapByNodeId: ((_execution$jobs = execution.jobs) !== null && _execution$jobs !== void 0 ? _execution$jobs : []).reduce((map, job) => Object.assign(map, {
|
|
236
238
|
[job.nodeId]: job.result
|
|
237
239
|
}), {})
|
|
@@ -245,7 +247,9 @@ var _default = {
|
|
|
245
247
|
RadioWithTooltip: _RadioWithTooltip.RadioWithTooltip,
|
|
246
248
|
DynamicConfig
|
|
247
249
|
},
|
|
248
|
-
|
|
250
|
+
useVariables(current, options) {
|
|
251
|
+
const _ref = options !== null && options !== void 0 ? options : {},
|
|
252
|
+
types = _ref.types;
|
|
249
253
|
if (types && !types.some(type => type in _variable.BaseTypeSets || Object.values(_variable.BaseTypeSets).some(set => set.has(type)))) {
|
|
250
254
|
return null;
|
|
251
255
|
}
|
|
@@ -258,39 +262,10 @@ var _default = {
|
|
|
258
262
|
return {
|
|
259
263
|
type: 'item',
|
|
260
264
|
title: (_node$title = node.title) !== null && _node$title !== void 0 ? _node$title : `#${node.id}`,
|
|
261
|
-
component:
|
|
262
|
-
node
|
|
265
|
+
component: _ValueBlock.ValueBlock.Initializer,
|
|
266
|
+
node,
|
|
267
|
+
resultTitle: (0, _locale.lang)('Calculation result')
|
|
263
268
|
};
|
|
264
269
|
}
|
|
265
270
|
};
|
|
266
|
-
exports.default = _default;
|
|
267
|
-
function CalculationInitializer(_ref) {
|
|
268
|
-
let node = _ref.node,
|
|
269
|
-
insert = _ref.insert,
|
|
270
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
271
|
-
return _react().default.createElement(_client().SchemaInitializer.Item, _objectSpread(_objectSpread({}, props), {}, {
|
|
272
|
-
onClick: () => {
|
|
273
|
-
var _node$title2;
|
|
274
|
-
insert({
|
|
275
|
-
type: 'void',
|
|
276
|
-
name: node.id,
|
|
277
|
-
title: node.title,
|
|
278
|
-
'x-component': 'CardItem',
|
|
279
|
-
'x-component-props': {
|
|
280
|
-
title: (_node$title2 = node.title) !== null && _node$title2 !== void 0 ? _node$title2 : `#${node.id}`
|
|
281
|
-
},
|
|
282
|
-
'x-designer': 'SimpleDesigner',
|
|
283
|
-
properties: {
|
|
284
|
-
result: {
|
|
285
|
-
type: 'void',
|
|
286
|
-
'x-component': 'CalculationResult',
|
|
287
|
-
'x-component-props': {
|
|
288
|
-
// NOTE: as same format as other reference for migration of revision
|
|
289
|
-
dataSource: `{{$jobsMapByNodeId.${node.id}}}`
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}));
|
|
296
|
-
}
|
|
271
|
+
exports.default = _default;
|
|
@@ -8,11 +8,6 @@ interface Calculator {
|
|
|
8
8
|
group: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const calculators: Registry<Calculator>;
|
|
11
|
-
export declare function Calculation({ calculator, operands, onChange }: {
|
|
12
|
-
calculator: any;
|
|
13
|
-
operands?: any[];
|
|
14
|
-
onChange: any;
|
|
15
|
-
}): JSX.Element;
|
|
16
11
|
declare function CalculationConfig({ value, onChange }: {
|
|
17
12
|
value: any;
|
|
18
13
|
onChange: any;
|
|
@@ -21,6 +16,7 @@ declare const _default: {
|
|
|
21
16
|
title: string;
|
|
22
17
|
type: string;
|
|
23
18
|
group: string;
|
|
19
|
+
description: string;
|
|
24
20
|
fieldset: {
|
|
25
21
|
rejectOnFalse: {
|
|
26
22
|
type: string;
|
|
@@ -96,7 +92,7 @@ declare const _default: {
|
|
|
96
92
|
rejectOnFalse: boolean;
|
|
97
93
|
};
|
|
98
94
|
}[];
|
|
99
|
-
render(data: any)
|
|
95
|
+
render: (data: any) => JSX.Element;
|
|
100
96
|
scope: {
|
|
101
97
|
renderEngineReference: (key: string) => JSX.Element;
|
|
102
98
|
useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Calculation = Calculation;
|
|
7
6
|
exports.default = exports.calculators = void 0;
|
|
8
7
|
function _icons() {
|
|
9
8
|
const data = require("@ant-design/icons");
|
|
@@ -211,7 +210,8 @@ function Calculation({
|
|
|
211
210
|
operands,
|
|
212
211
|
calculator: v
|
|
213
212
|
}),
|
|
214
|
-
placeholder: (0, _locale.lang)('Calculator')
|
|
213
|
+
placeholder: (0, _locale.lang)('Calculator'),
|
|
214
|
+
dropdownMatchSelectWidth: false
|
|
215
215
|
}, calculatorGroups.filter(group => Boolean(getGroupCalculators(group.value).length)).map(group => _react().default.createElement(_antd().Select.OptGroup, {
|
|
216
216
|
key: group.value,
|
|
217
217
|
label: compile(group.title)
|
|
@@ -380,6 +380,7 @@ var _default = {
|
|
|
380
380
|
title: `{{t("Condition", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
381
381
|
type: 'condition',
|
|
382
382
|
group: 'control',
|
|
383
|
+
description: `{{t('Based on boolean result of the calculation to determine whether to "continue" or "exit" the process, or continue on different branches of "yes" and "no".', { ns: "${_locale.NAMESPACE}" })}}`,
|
|
383
384
|
fieldset: {
|
|
384
385
|
rejectOnFalse: {
|
|
385
386
|
type: 'boolean',
|
|
@@ -477,7 +478,7 @@ var _default = {
|
|
|
477
478
|
rejectOnFalse: false
|
|
478
479
|
}
|
|
479
480
|
}],
|
|
480
|
-
render(data) {
|
|
481
|
+
render: function Renderer(data) {
|
|
481
482
|
const _useTranslation2 = (0, _reactI18next().useTranslation)(),
|
|
482
483
|
t = _useTranslation2.t;
|
|
483
484
|
const _useFlowContext = (0, _FlowContext.useFlowContext)(),
|
|
@@ -4,16 +4,17 @@ declare const _default: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
type: string;
|
|
6
6
|
group: string;
|
|
7
|
+
description: string;
|
|
7
8
|
fieldset: {
|
|
8
9
|
collection: {
|
|
9
10
|
type: string;
|
|
10
11
|
title: string;
|
|
11
12
|
required: boolean;
|
|
12
|
-
'x-reactions':
|
|
13
|
+
'x-reactions': any[];
|
|
13
14
|
'x-decorator': string;
|
|
14
15
|
'x-component': string;
|
|
15
16
|
'x-component-props': {
|
|
16
|
-
|
|
17
|
+
dropdownMatchSelectWidth: boolean;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
params: {
|
|
@@ -61,7 +62,9 @@ declare const _default: {
|
|
|
61
62
|
CollectionFieldset: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
62
63
|
FieldsSelect: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
+
useVariables({ config }: {
|
|
66
|
+
config: any;
|
|
67
|
+
}, options: any): import("../variable").VariableOption[];
|
|
65
68
|
useInitializers(node: any): SchemaInitializerItemOptions | null;
|
|
66
69
|
initializers: {
|
|
67
70
|
CollectionFieldInitializers: typeof CollectionFieldInitializers;
|
|
@@ -19,10 +19,16 @@ var _CollectionFieldInitializers = require("../components/CollectionFieldInitial
|
|
|
19
19
|
var _variable = require("../variable");
|
|
20
20
|
var _FieldsSelect = require("../components/FieldsSelect");
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
26
|
+
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); }
|
|
22
27
|
var _default = {
|
|
23
28
|
title: `{{t("Create record", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
24
29
|
type: 'create',
|
|
25
30
|
group: 'collection',
|
|
31
|
+
description: `{{t("Add new record to a collection. You can use variables from upstream nodes to assign values to fields.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
26
32
|
fieldset: {
|
|
27
33
|
collection: _collection.collection,
|
|
28
34
|
// multiple: {
|
|
@@ -51,13 +57,16 @@ var _default = {
|
|
|
51
57
|
CollectionFieldset: _CollectionFieldset.default,
|
|
52
58
|
FieldsSelect: _FieldsSelect.FieldsSelect
|
|
53
59
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})
|
|
60
|
+
useVariables({
|
|
61
|
+
config
|
|
62
|
+
}, options) {
|
|
63
|
+
var _options$depth, _config$params, _config$params$append;
|
|
64
|
+
const result = (0, _variable.useCollectionFieldOptions)(_objectSpread(_objectSpread({
|
|
65
|
+
collection: config === null || config === void 0 ? void 0 : config.collection
|
|
66
|
+
}, options), {}, {
|
|
67
|
+
depth: ((_options$depth = options === null || options === void 0 ? void 0 : options.depth) !== null && _options$depth !== void 0 ? _options$depth : config === null || config === void 0 ? void 0 : (_config$params = config.params) === null || _config$params === void 0 ? void 0 : (_config$params$append = _config$params.appends) === null || _config$params$append === void 0 ? void 0 : _config$params$append.length) ? 1 : 0
|
|
68
|
+
}));
|
|
69
|
+
return (result === null || result === void 0 ? void 0 : result.length) ? result : null;
|
|
61
70
|
},
|
|
62
71
|
useInitializers(node) {
|
|
63
72
|
var _node$title;
|
|
@@ -12,6 +12,7 @@ var _default = {
|
|
|
12
12
|
title: `{{t("Delay", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
13
13
|
type: 'delay',
|
|
14
14
|
group: 'control',
|
|
15
|
+
description: `{{t("Delay a period of time and then continue or exit the process. Can be used to set wait or timeout times in parallel branches.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
15
16
|
fieldset: {
|
|
16
17
|
duration: {
|
|
17
18
|
type: 'number',
|
|
@@ -4,16 +4,17 @@ declare const _default: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
type: string;
|
|
6
6
|
group: string;
|
|
7
|
+
description: string;
|
|
7
8
|
fieldset: {
|
|
8
9
|
collection: {
|
|
9
10
|
type: string;
|
|
10
11
|
title: string;
|
|
11
12
|
required: boolean;
|
|
12
|
-
'x-reactions':
|
|
13
|
+
'x-reactions': any[];
|
|
13
14
|
'x-decorator': string;
|
|
14
15
|
'x-component': string;
|
|
15
16
|
'x-component-props': {
|
|
16
|
-
|
|
17
|
+
dropdownMatchSelectWidth: boolean;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
params: {
|
|
@@ -24,6 +24,7 @@ var _default = {
|
|
|
24
24
|
title: '{{t("Delete record")}}',
|
|
25
25
|
type: 'destroy',
|
|
26
26
|
group: 'collection',
|
|
27
|
+
description: `{{t("Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
27
28
|
fieldset: {
|
|
28
29
|
collection: _collection.collection,
|
|
29
30
|
params: {
|
|
@@ -7,6 +7,7 @@ export interface Instruction {
|
|
|
7
7
|
title: string;
|
|
8
8
|
type: string;
|
|
9
9
|
group: string;
|
|
10
|
+
description?: string;
|
|
10
11
|
options?: {
|
|
11
12
|
label: string;
|
|
12
13
|
value: any;
|
|
@@ -22,9 +23,10 @@ export interface Instruction {
|
|
|
22
23
|
components?: {
|
|
23
24
|
[key: string]: any;
|
|
24
25
|
};
|
|
25
|
-
render?(props: any):
|
|
26
|
+
render?(props: any): JSX.Element;
|
|
26
27
|
endding?: boolean;
|
|
27
|
-
|
|
28
|
+
useVariables?(node: any, options?: any): VariableOptions;
|
|
29
|
+
useScopeVariables?(node: any, options?: any): VariableOptions;
|
|
28
30
|
useInitializers?(node: any): SchemaInitializerItemOptions | null;
|
|
29
31
|
initializers?: {
|
|
30
32
|
[key: string]: any;
|
|
@@ -34,6 +36,7 @@ export declare const instructions: Registry<Instruction>;
|
|
|
34
36
|
export declare const NodeContext: React.Context<any>;
|
|
35
37
|
export declare function useNodeContext(): any;
|
|
36
38
|
export declare function useAvailableUpstreams(node: any): any[];
|
|
39
|
+
export declare function useUpstreamScopes(node: any): any[];
|
|
37
40
|
export declare function Node({ data }: {
|
|
38
41
|
data: any;
|
|
39
42
|
}): JSX.Element;
|