@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
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import EjsTextArea from '../components/EjsTextArea';
|
|
1
|
+
import { useWorkflowVariableOptions } from '../variable';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
4
|
type: string;
|
|
6
5
|
group: string;
|
|
7
6
|
fieldset: {
|
|
8
|
-
|
|
7
|
+
method: {
|
|
9
8
|
type: string;
|
|
10
|
-
name: string;
|
|
11
9
|
required: boolean;
|
|
12
10
|
title: string;
|
|
13
11
|
'x-decorator': string;
|
|
14
|
-
'x-decorator-props': {};
|
|
15
12
|
'x-component': string;
|
|
16
13
|
'x-component-props': {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
placeholder: string;
|
|
21
|
-
description: string;
|
|
14
|
+
showSearch: boolean;
|
|
15
|
+
allowClear: boolean;
|
|
22
16
|
};
|
|
17
|
+
enum: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
default: string;
|
|
23
22
|
};
|
|
24
|
-
|
|
23
|
+
url: {
|
|
25
24
|
type: string;
|
|
26
|
-
name: string;
|
|
27
25
|
required: boolean;
|
|
28
26
|
title: string;
|
|
29
27
|
'x-decorator': string;
|
|
30
|
-
'x-decorator-props': {
|
|
28
|
+
'x-decorator-props': {
|
|
29
|
+
className: string;
|
|
30
|
+
};
|
|
31
31
|
'x-component': string;
|
|
32
32
|
'x-component-props': {
|
|
33
|
-
|
|
34
|
-
min: number;
|
|
35
|
-
step: number;
|
|
36
|
-
defaultValue: number;
|
|
33
|
+
placeholder: string;
|
|
37
34
|
};
|
|
38
35
|
};
|
|
39
|
-
|
|
36
|
+
headers: {
|
|
40
37
|
type: string;
|
|
41
|
-
name: string;
|
|
42
38
|
'x-component': string;
|
|
43
39
|
'x-decorator': string;
|
|
44
40
|
title: string;
|
|
@@ -63,7 +59,7 @@ declare const _default: {
|
|
|
63
59
|
'x-decorator': string;
|
|
64
60
|
'x-component': string;
|
|
65
61
|
'x-component-props': {
|
|
66
|
-
|
|
62
|
+
scope: typeof useWorkflowVariableOptions;
|
|
67
63
|
};
|
|
68
64
|
};
|
|
69
65
|
remove: {
|
|
@@ -83,42 +79,82 @@ declare const _default: {
|
|
|
83
79
|
};
|
|
84
80
|
};
|
|
85
81
|
};
|
|
86
|
-
|
|
82
|
+
params: {
|
|
87
83
|
type: string;
|
|
88
|
-
name: string;
|
|
89
|
-
required: boolean;
|
|
90
|
-
title: string;
|
|
91
|
-
'x-decorator': string;
|
|
92
84
|
'x-component': string;
|
|
93
|
-
'x-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
'x-decorator': string;
|
|
86
|
+
title: string;
|
|
87
|
+
items: {
|
|
88
|
+
type: string;
|
|
89
|
+
properties: {
|
|
90
|
+
space: {
|
|
91
|
+
type: string;
|
|
92
|
+
'x-component': string;
|
|
93
|
+
properties: {
|
|
94
|
+
name: {
|
|
95
|
+
type: string;
|
|
96
|
+
'x-decorator': string;
|
|
97
|
+
'x-component': string;
|
|
98
|
+
'x-component-props': {
|
|
99
|
+
placeholder: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
value: {
|
|
103
|
+
type: string;
|
|
104
|
+
'x-decorator': string;
|
|
105
|
+
'x-component': string;
|
|
106
|
+
'x-component-props': {
|
|
107
|
+
scope: typeof useWorkflowVariableOptions;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
remove: {
|
|
111
|
+
type: string;
|
|
112
|
+
'x-decorator': string;
|
|
113
|
+
'x-component': string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
properties: {
|
|
120
|
+
add: {
|
|
121
|
+
type: string;
|
|
122
|
+
title: string;
|
|
123
|
+
'x-component': string;
|
|
124
|
+
};
|
|
97
125
|
};
|
|
98
|
-
enum: {
|
|
99
|
-
label: string;
|
|
100
|
-
value: string;
|
|
101
|
-
}[];
|
|
102
126
|
};
|
|
103
|
-
|
|
127
|
+
data: {
|
|
104
128
|
type: string;
|
|
105
|
-
name: string;
|
|
106
|
-
'x-hidden': boolean;
|
|
107
129
|
title: string;
|
|
108
130
|
'x-decorator': string;
|
|
109
131
|
'x-decorator-props': {};
|
|
110
132
|
'x-component': string;
|
|
111
133
|
'x-component-props': {
|
|
134
|
+
scope: typeof useWorkflowVariableOptions;
|
|
112
135
|
autoSize: {
|
|
113
136
|
minRows: number;
|
|
114
137
|
};
|
|
115
138
|
placeholder: string;
|
|
116
|
-
|
|
139
|
+
className: string;
|
|
140
|
+
};
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
timeout: {
|
|
144
|
+
type: string;
|
|
145
|
+
title: string;
|
|
146
|
+
'x-decorator': string;
|
|
147
|
+
'x-decorator-props': {};
|
|
148
|
+
'x-component': string;
|
|
149
|
+
'x-component-props': {
|
|
150
|
+
addonAfter: string;
|
|
151
|
+
min: number;
|
|
152
|
+
step: number;
|
|
153
|
+
defaultValue: number;
|
|
117
154
|
};
|
|
118
155
|
};
|
|
119
|
-
|
|
156
|
+
ignoreFail: {
|
|
120
157
|
type: string;
|
|
121
|
-
name: string;
|
|
122
158
|
title: string;
|
|
123
159
|
'x-decorator': string;
|
|
124
160
|
'x-component': string;
|
|
@@ -127,12 +163,11 @@ declare const _default: {
|
|
|
127
163
|
view: {};
|
|
128
164
|
scope: {};
|
|
129
165
|
components: {
|
|
130
|
-
ArrayItems:
|
|
131
|
-
Item?:
|
|
166
|
+
ArrayItems: import("react").FC<import("react").HTMLAttributes<HTMLDivElement>> & import("@formily/antd").ArrayBaseMixins & {
|
|
167
|
+
Item?: import("react").FC<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
132
168
|
type?: "divide" | "card";
|
|
133
169
|
}>;
|
|
134
170
|
};
|
|
135
|
-
EjsTextArea: typeof EjsTextArea;
|
|
136
171
|
};
|
|
137
172
|
};
|
|
138
173
|
export default _default;
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _locale = require("../locale");
|
|
9
|
-
|
|
10
8
|
function _antd() {
|
|
11
9
|
const data = require("@formily/antd");
|
|
12
10
|
|
|
@@ -17,53 +15,79 @@ function _antd() {
|
|
|
17
15
|
return data;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
function _css() {
|
|
19
|
+
const data = require("@emotion/css");
|
|
20
|
+
|
|
21
|
+
_css = function _css() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _locale = require("../locale");
|
|
29
|
+
|
|
30
|
+
var _variable = require("../variable");
|
|
23
31
|
|
|
24
32
|
var _default = {
|
|
25
33
|
title: `{{t("HTTP request", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
26
34
|
type: 'request',
|
|
27
35
|
group: 'extended',
|
|
28
36
|
fieldset: {
|
|
29
|
-
|
|
37
|
+
method: {
|
|
30
38
|
type: 'string',
|
|
31
|
-
name: 'config.url',
|
|
32
39
|
required: true,
|
|
33
|
-
title: `{{t("
|
|
40
|
+
title: `{{t("HTTP method", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
34
41
|
'x-decorator': 'FormItem',
|
|
35
|
-
'x-
|
|
36
|
-
'x-component': 'EjsTextArea',
|
|
42
|
+
'x-component': 'Select',
|
|
37
43
|
'x-component-props': {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
showSearch: false,
|
|
45
|
+
allowClear: false
|
|
46
|
+
},
|
|
47
|
+
enum: [{
|
|
48
|
+
label: 'GET',
|
|
49
|
+
value: 'GET'
|
|
50
|
+
}, {
|
|
51
|
+
label: 'POST',
|
|
52
|
+
value: 'POST'
|
|
53
|
+
}, {
|
|
54
|
+
label: 'PUT',
|
|
55
|
+
value: 'PUT'
|
|
56
|
+
}, {
|
|
57
|
+
label: 'PATCH',
|
|
58
|
+
value: 'PATCH'
|
|
59
|
+
}, {
|
|
60
|
+
label: 'DELETE',
|
|
61
|
+
value: 'DELETE'
|
|
62
|
+
}],
|
|
63
|
+
default: 'POST'
|
|
44
64
|
},
|
|
45
|
-
|
|
46
|
-
type: '
|
|
47
|
-
name: 'config.timeout',
|
|
65
|
+
url: {
|
|
66
|
+
type: 'string',
|
|
48
67
|
required: true,
|
|
49
|
-
title: `{{t("
|
|
68
|
+
title: `{{t("URL", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
50
69
|
'x-decorator': 'FormItem',
|
|
51
|
-
'x-decorator-props': {
|
|
52
|
-
|
|
70
|
+
'x-decorator-props': {
|
|
71
|
+
className: (0, _css().css)`
|
|
72
|
+
.ant-formily-item-control-content-component{
|
|
73
|
+
.ant-input-affix-wrapper,
|
|
74
|
+
.ant-input{
|
|
75
|
+
width: 100%;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`
|
|
79
|
+
},
|
|
80
|
+
'x-component': 'Input',
|
|
53
81
|
'x-component-props': {
|
|
54
|
-
|
|
55
|
-
min: 1,
|
|
56
|
-
step: 1000,
|
|
57
|
-
defaultValue: 5000
|
|
82
|
+
placeholder: 'https://www.nocobase.com'
|
|
58
83
|
}
|
|
59
84
|
},
|
|
60
|
-
|
|
85
|
+
headers: {
|
|
61
86
|
type: 'array',
|
|
62
|
-
name: 'config.headers',
|
|
63
87
|
'x-component': 'ArrayItems',
|
|
64
88
|
'x-decorator': 'FormItem',
|
|
65
|
-
title: `{{t("
|
|
66
|
-
description: `{{t("
|
|
89
|
+
title: `{{t("Headers", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
90
|
+
description: `{{t('"Content-Type" only support "application/json", and no need to specify', { ns: "${_locale.NAMESPACE}" })}}`,
|
|
67
91
|
items: {
|
|
68
92
|
type: 'object',
|
|
69
93
|
properties: {
|
|
@@ -76,15 +100,15 @@ var _default = {
|
|
|
76
100
|
'x-decorator': 'FormItem',
|
|
77
101
|
'x-component': 'Input',
|
|
78
102
|
'x-component-props': {
|
|
79
|
-
placeholder: `{{t("Name
|
|
103
|
+
placeholder: `{{t("Name")}}`
|
|
80
104
|
}
|
|
81
105
|
},
|
|
82
106
|
value: {
|
|
83
107
|
type: 'string',
|
|
84
108
|
'x-decorator': 'FormItem',
|
|
85
|
-
'x-component': 'Input',
|
|
109
|
+
'x-component': 'Variable.Input',
|
|
86
110
|
'x-component-props': {
|
|
87
|
-
|
|
111
|
+
scope: _variable.useWorkflowVariableOptions
|
|
88
112
|
}
|
|
89
113
|
},
|
|
90
114
|
remove: {
|
|
@@ -104,54 +128,85 @@ var _default = {
|
|
|
104
128
|
}
|
|
105
129
|
}
|
|
106
130
|
},
|
|
107
|
-
|
|
108
|
-
type: '
|
|
109
|
-
|
|
110
|
-
required: true,
|
|
111
|
-
title: `{{t("HTTP method", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
131
|
+
params: {
|
|
132
|
+
type: 'array',
|
|
133
|
+
'x-component': 'ArrayItems',
|
|
112
134
|
'x-decorator': 'FormItem',
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
135
|
+
title: `{{t("Parameters", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
136
|
+
items: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
properties: {
|
|
139
|
+
space: {
|
|
140
|
+
type: 'void',
|
|
141
|
+
'x-component': 'Space',
|
|
142
|
+
properties: {
|
|
143
|
+
name: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
'x-decorator': 'FormItem',
|
|
146
|
+
'x-component': 'Input',
|
|
147
|
+
'x-component-props': {
|
|
148
|
+
placeholder: `{{t("Name")}}`
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
value: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
'x-decorator': 'FormItem',
|
|
154
|
+
'x-component': 'Variable.Input',
|
|
155
|
+
'x-component-props': {
|
|
156
|
+
scope: _variable.useWorkflowVariableOptions
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
remove: {
|
|
160
|
+
type: 'void',
|
|
161
|
+
'x-decorator': 'FormItem',
|
|
162
|
+
'x-component': 'ArrayItems.Remove'
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
118
167
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
label: 'PUT',
|
|
127
|
-
value: 'PUT'
|
|
128
|
-
}, {
|
|
129
|
-
label: 'PATCH',
|
|
130
|
-
value: 'PATCH'
|
|
131
|
-
}, {
|
|
132
|
-
label: 'DELETE',
|
|
133
|
-
value: 'DELETE'
|
|
134
|
-
}]
|
|
168
|
+
properties: {
|
|
169
|
+
add: {
|
|
170
|
+
type: 'void',
|
|
171
|
+
title: `{{t("Add parameter", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
172
|
+
'x-component': 'ArrayItems.Addition'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
135
175
|
},
|
|
136
|
-
|
|
176
|
+
data: {
|
|
137
177
|
type: 'string',
|
|
138
|
-
|
|
139
|
-
'x-hidden': false,
|
|
140
|
-
title: `{{t("Request data", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
178
|
+
title: `{{t("Body", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
141
179
|
'x-decorator': 'FormItem',
|
|
142
180
|
'x-decorator-props': {},
|
|
143
|
-
'x-component': '
|
|
181
|
+
'x-component': 'Variable.JSON',
|
|
144
182
|
'x-component-props': {
|
|
183
|
+
scope: _variable.useWorkflowVariableOptions,
|
|
145
184
|
autoSize: {
|
|
146
|
-
minRows:
|
|
185
|
+
minRows: 10
|
|
147
186
|
},
|
|
148
187
|
placeholder: `{{t("Input request data", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
149
|
-
|
|
188
|
+
className: (0, _css().css)`
|
|
189
|
+
font-size: 90%;
|
|
190
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
191
|
+
`
|
|
192
|
+
},
|
|
193
|
+
description: `{{t("Only support standard JSON data", { ns: "${_locale.NAMESPACE}" })}}`
|
|
194
|
+
},
|
|
195
|
+
timeout: {
|
|
196
|
+
type: 'number',
|
|
197
|
+
title: `{{t("Timeout config", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
198
|
+
'x-decorator': 'FormItem',
|
|
199
|
+
'x-decorator-props': {},
|
|
200
|
+
'x-component': 'InputNumber',
|
|
201
|
+
'x-component-props': {
|
|
202
|
+
addonAfter: `{{t("ms", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
203
|
+
min: 1,
|
|
204
|
+
step: 1000,
|
|
205
|
+
defaultValue: 5000
|
|
150
206
|
}
|
|
151
207
|
},
|
|
152
|
-
|
|
208
|
+
ignoreFail: {
|
|
153
209
|
type: 'boolean',
|
|
154
|
-
name: 'config.ignoreFail',
|
|
155
210
|
title: `{{t("Ignore fail request and continue workflow", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
156
211
|
'x-decorator': 'FormItem',
|
|
157
212
|
'x-component': 'Checkbox'
|
|
@@ -160,8 +215,7 @@ var _default = {
|
|
|
160
215
|
view: {},
|
|
161
216
|
scope: {},
|
|
162
217
|
components: {
|
|
163
|
-
ArrayItems: _antd().ArrayItems
|
|
164
|
-
EjsTextArea: _EjsTextArea.default
|
|
218
|
+
ArrayItems: _antd().ArrayItems
|
|
165
219
|
}
|
|
166
220
|
};
|
|
167
221
|
exports.default = _default;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { useCollectionDataSource } from '@nocobase/client';
|
|
2
|
-
import {
|
|
2
|
+
import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
type: string;
|
|
6
6
|
group: string;
|
|
7
7
|
fieldset: {
|
|
8
|
-
|
|
8
|
+
collection: {
|
|
9
9
|
type: string;
|
|
10
10
|
title: string;
|
|
11
|
-
name: string;
|
|
12
11
|
required: boolean;
|
|
13
12
|
'x-reactions': string[];
|
|
14
13
|
'x-decorator': string;
|
|
@@ -17,35 +16,40 @@ declare const _default: {
|
|
|
17
16
|
placeholder: string;
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
|
-
|
|
21
|
-
title: string;
|
|
22
|
-
type: string;
|
|
23
|
-
name: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
'x-decorator-props': {
|
|
26
|
-
labelAlign: string;
|
|
27
|
-
className: string;
|
|
28
|
-
};
|
|
29
|
-
'x-component': string;
|
|
30
|
-
'x-component-props': {
|
|
31
|
-
useProps(): {
|
|
32
|
-
options: any[];
|
|
33
|
-
className: string;
|
|
34
|
-
};
|
|
35
|
-
dynamicComponent: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
'config.params.values': {
|
|
19
|
+
params: {
|
|
39
20
|
type: string;
|
|
40
21
|
title: string;
|
|
41
|
-
name: string;
|
|
42
22
|
'x-decorator': string;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
properties: {
|
|
24
|
+
filter: {
|
|
25
|
+
title: string;
|
|
26
|
+
type: string;
|
|
27
|
+
'x-decorator': string;
|
|
28
|
+
'x-decorator-props': {
|
|
29
|
+
labelAlign: string;
|
|
30
|
+
className: string;
|
|
31
|
+
};
|
|
32
|
+
'x-component': string;
|
|
33
|
+
'x-component-props': {
|
|
34
|
+
useProps(): {
|
|
35
|
+
options: any[];
|
|
36
|
+
className: string;
|
|
37
|
+
};
|
|
38
|
+
dynamicComponent: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
values: {
|
|
42
|
+
type: string;
|
|
43
|
+
title: string;
|
|
44
|
+
'x-decorator': string;
|
|
45
|
+
'x-decorator-props': {
|
|
46
|
+
labelAlign: string;
|
|
47
|
+
className: string;
|
|
48
|
+
};
|
|
49
|
+
'x-component': string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
46
52
|
};
|
|
47
|
-
'x-component': string;
|
|
48
|
-
description: string;
|
|
49
53
|
};
|
|
50
54
|
};
|
|
51
55
|
view: {};
|
|
@@ -53,7 +57,7 @@ declare const _default: {
|
|
|
53
57
|
useCollectionDataSource: typeof useCollectionDataSource;
|
|
54
58
|
};
|
|
55
59
|
components: {
|
|
56
|
-
|
|
60
|
+
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
57
61
|
CollectionFieldset: import("react").MemoExoticComponent<import("react").FunctionComponent<Pick<any, string | number | symbol>>>;
|
|
58
62
|
};
|
|
59
63
|
};
|
|
@@ -15,7 +15,7 @@ function _client() {
|
|
|
15
15
|
return data;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _FilterDynamicComponent = require("../components/FilterDynamicComponent");
|
|
19
19
|
|
|
20
20
|
var _CollectionFieldset = _interopRequireDefault(require("../components/CollectionFieldset"));
|
|
21
21
|
|
|
@@ -36,18 +36,25 @@ var _default = {
|
|
|
36
36
|
type: 'update',
|
|
37
37
|
group: 'collection',
|
|
38
38
|
fieldset: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
collection: _collection.collection,
|
|
40
|
+
params: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
title: '',
|
|
43
|
+
'x-decorator': 'FormItem',
|
|
44
|
+
properties: {
|
|
45
|
+
filter: _objectSpread(_objectSpread({}, _collection.filter), {}, {
|
|
46
|
+
title: `{{t("Only update records matching conditions", { ns: "${_locale.NAMESPACE}" })}}`
|
|
47
|
+
}),
|
|
48
|
+
values: _collection.values
|
|
49
|
+
}
|
|
50
|
+
}
|
|
44
51
|
},
|
|
45
52
|
view: {},
|
|
46
53
|
scope: {
|
|
47
54
|
useCollectionDataSource: _client().useCollectionDataSource
|
|
48
55
|
},
|
|
49
56
|
components: {
|
|
50
|
-
|
|
57
|
+
FilterDynamicComponent: _FilterDynamicComponent.FilterDynamicComponent,
|
|
51
58
|
CollectionFieldset: _CollectionFieldset.default
|
|
52
59
|
}
|
|
53
60
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const collection: {
|
|
2
2
|
type: string;
|
|
3
3
|
title: string;
|
|
4
|
-
name: string;
|
|
5
4
|
required: boolean;
|
|
6
5
|
'x-reactions': string[];
|
|
7
6
|
'x-decorator': string;
|
|
@@ -13,7 +12,6 @@ export declare const collection: {
|
|
|
13
12
|
export declare const values: {
|
|
14
13
|
type: string;
|
|
15
14
|
title: string;
|
|
16
|
-
name: string;
|
|
17
15
|
'x-decorator': string;
|
|
18
16
|
'x-decorator-props': {
|
|
19
17
|
labelAlign: string;
|
|
@@ -25,7 +23,6 @@ export declare const values: {
|
|
|
25
23
|
export declare const filter: {
|
|
26
24
|
type: string;
|
|
27
25
|
title: string;
|
|
28
|
-
name: string;
|
|
29
26
|
'x-decorator': string;
|
|
30
27
|
'x-decorator-props': {
|
|
31
28
|
labelAlign: string;
|
|
@@ -40,7 +40,6 @@ var _locale = require("../locale");
|
|
|
40
40
|
const collection = {
|
|
41
41
|
type: 'string',
|
|
42
42
|
title: '{{t("Collection")}}',
|
|
43
|
-
name: 'config.collection',
|
|
44
43
|
required: true,
|
|
45
44
|
'x-reactions': ['{{useCollectionDataSource()}}'],
|
|
46
45
|
'x-decorator': 'FormItem',
|
|
@@ -53,7 +52,6 @@ exports.collection = collection;
|
|
|
53
52
|
const values = {
|
|
54
53
|
type: 'object',
|
|
55
54
|
title: '{{t("Fields values")}}',
|
|
56
|
-
name: 'config.params.values',
|
|
57
55
|
'x-decorator': 'FormItem',
|
|
58
56
|
'x-decorator-props': {
|
|
59
57
|
labelAlign: 'left',
|
|
@@ -68,7 +66,6 @@ exports.values = values;
|
|
|
68
66
|
const filter = {
|
|
69
67
|
type: 'object',
|
|
70
68
|
title: '{{t("Filter")}}',
|
|
71
|
-
name: 'config.params.filter',
|
|
72
69
|
'x-decorator': 'FormItem',
|
|
73
70
|
'x-decorator-props': {
|
|
74
71
|
labelAlign: 'left',
|
|
@@ -79,12 +76,10 @@ const filter = {
|
|
|
79
76
|
'x-component': 'Filter',
|
|
80
77
|
'x-component-props': {
|
|
81
78
|
useProps() {
|
|
82
|
-
var _values$config;
|
|
83
|
-
|
|
84
79
|
const _useForm = (0, _react().useForm)(),
|
|
85
80
|
values = _useForm.values;
|
|
86
81
|
|
|
87
|
-
const options = (0, _client().useCollectionFilterOptions)(
|
|
82
|
+
const options = (0, _client().useCollectionFilterOptions)(values === null || values === void 0 ? void 0 : values.collection);
|
|
88
83
|
return {
|
|
89
84
|
options,
|
|
90
85
|
className: (0, _css().css)`
|
|
@@ -94,7 +89,7 @@ const filter = {
|
|
|
94
89
|
};
|
|
95
90
|
},
|
|
96
91
|
|
|
97
|
-
dynamicComponent: '
|
|
92
|
+
dynamicComponent: 'FilterDynamicComponent'
|
|
98
93
|
}
|
|
99
94
|
};
|
|
100
95
|
exports.filter = filter;
|