@nocobase/plugin-workflow 0.11.0-alpha.1 → 0.11.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/lib/client/AddButton.js +13 -4
- package/lib/client/Branch.js +4 -2
- package/lib/client/CanvasContent.js +6 -4
- package/lib/client/ExecutionCanvas.js +18 -7
- package/lib/client/ExecutionPage.js +4 -2
- package/lib/client/WorkflowCanvas.js +16 -6
- package/lib/client/WorkflowPage.js +4 -2
- package/lib/client/WorkflowProvider.js +2 -2
- package/lib/client/components/CollectionBlockInitializer.js +3 -3
- package/lib/client/components/CollectionFieldset.js +7 -1
- package/lib/client/components/FieldsSelect.js +4 -1
- package/lib/client/components/NodeDescription.js +36 -22
- package/lib/client/index.js +3 -3
- package/lib/client/locale/zh-CN.d.ts +5 -1
- package/lib/client/locale/zh-CN.js +6 -2
- package/lib/client/nodes/aggregate.d.ts +6 -1
- package/lib/client/nodes/aggregate.js +4 -3
- package/lib/client/nodes/calculation.d.ts +5 -3
- package/lib/client/nodes/calculation.js +6 -5
- package/lib/client/nodes/condition.d.ts +1 -7
- package/lib/client/nodes/condition.js +12 -23
- package/lib/client/nodes/create.d.ts +2 -4
- package/lib/client/nodes/create.js +1 -3
- package/lib/client/nodes/index.d.ts +1 -2
- package/lib/client/nodes/index.js +24 -24
- package/lib/client/nodes/loop.js +19 -28
- package/lib/client/nodes/manual/FormBlockInitializer.js +6 -5
- package/lib/client/nodes/manual/SchemaConfig.d.ts +1 -2
- package/lib/client/nodes/manual/SchemaConfig.js +175 -21
- package/lib/client/nodes/manual/WorkflowTodo.js +39 -46
- package/lib/client/nodes/manual/forms/create.js +8 -1
- package/lib/client/nodes/manual/forms/custom.js +11 -4
- package/lib/client/nodes/manual/forms/update.js +8 -1
- package/lib/client/nodes/manual/index.d.ts +6 -1
- package/lib/client/nodes/manual/index.js +5 -4
- package/lib/client/nodes/parallel.js +7 -4
- package/lib/client/nodes/query.d.ts +2 -5
- package/lib/client/nodes/query.js +1 -3
- package/lib/client/nodes/sql.d.ts +26 -0
- package/lib/client/{triggers/schedule/DateFieldsSelect.js → nodes/sql.js} +37 -46
- package/lib/client/schemas/collection.d.ts +2 -3
- package/lib/client/schemas/collection.js +8 -7
- package/lib/client/style.d.ts +18 -13
- package/lib/client/style.js +312 -289
- package/lib/client/triggers/collection.d.ts +9 -10
- package/lib/client/triggers/collection.js +4 -0
- package/lib/client/triggers/index.d.ts +2 -3
- package/lib/client/triggers/index.js +10 -5
- package/lib/client/triggers/schedule/OnField.js +35 -23
- package/lib/client/triggers/schedule/ScheduleConfig.js +7 -7
- package/lib/client/triggers/schedule/index.d.ts +0 -1
- package/lib/client/triggers/schedule/index.js +31 -19
- package/lib/client/variable.d.ts +29 -11
- package/lib/client/variable.js +39 -24
- package/lib/server/Plugin.d.ts +1 -3
- package/lib/server/Plugin.js +10 -6
- package/lib/server/Processor.d.ts +1 -1
- package/lib/server/Processor.js +2 -2
- package/lib/server/instructions/create.d.ts +1 -1
- package/lib/server/instructions/create.js +13 -13
- package/lib/server/instructions/index.js +1 -1
- package/lib/server/instructions/manual/actions.js +19 -7
- package/lib/server/instructions/manual/forms/create.js +7 -1
- package/lib/server/instructions/manual/forms/update.js +7 -1
- package/lib/server/instructions/query.js +8 -1
- package/lib/server/instructions/request.d.ts +1 -1
- package/lib/server/instructions/request.js +4 -2
- package/lib/server/instructions/sql.d.ts +12 -0
- package/lib/server/instructions/sql.js +34 -0
- package/lib/server/migrations/20230710115902-manual-action-values.d.ts +4 -0
- package/lib/server/migrations/20230710115902-manual-action-values.js +97 -0
- package/lib/server/triggers/collection.js +13 -11
- package/lib/server/utils.d.ts +2 -0
- package/lib/server/utils.js +21 -0
- package/package.json +12 -11
- package/src/client/AddButton.tsx +17 -5
- package/src/client/Branch.tsx +4 -2
- package/src/client/CanvasContent.tsx +6 -4
- package/src/client/ExecutionCanvas.tsx +11 -13
- package/src/client/ExecutionPage.tsx +3 -2
- package/src/client/WorkflowCanvas.tsx +14 -13
- package/src/client/WorkflowPage.tsx +3 -2
- package/src/client/WorkflowProvider.tsx +2 -2
- package/src/client/components/CollectionBlockInitializer.tsx +3 -3
- package/src/client/components/CollectionFieldset.tsx +5 -3
- package/src/client/components/FieldsSelect.tsx +5 -1
- package/src/client/components/NodeDescription.tsx +30 -23
- package/src/client/index.tsx +3 -3
- package/src/client/locale/zh-CN.ts +8 -2
- package/src/client/nodes/aggregate.tsx +4 -4
- package/src/client/nodes/calculation.tsx +4 -5
- package/src/client/nodes/condition.tsx +7 -34
- package/src/client/nodes/create.tsx +0 -1
- package/src/client/nodes/index.tsx +21 -25
- package/src/client/nodes/loop.tsx +16 -31
- package/src/client/nodes/manual/FormBlockInitializer.tsx +6 -5
- package/src/client/nodes/manual/SchemaConfig.tsx +162 -18
- package/src/client/nodes/manual/WorkflowTodo.tsx +43 -47
- package/src/client/nodes/manual/forms/create.tsx +5 -1
- package/src/client/nodes/manual/forms/custom.tsx +7 -3
- package/src/client/nodes/manual/forms/update.tsx +5 -1
- package/src/client/nodes/manual/index.tsx +5 -5
- package/src/client/nodes/parallel.tsx +6 -5
- package/src/client/nodes/query.tsx +0 -1
- package/src/client/nodes/sql.tsx +37 -0
- package/src/client/schemas/collection.ts +6 -6
- package/src/client/style.tsx +324 -289
- package/src/client/triggers/collection.tsx +4 -0
- package/src/client/triggers/index.tsx +14 -10
- package/src/client/triggers/schedule/OnField.tsx +29 -15
- package/src/client/triggers/schedule/ScheduleConfig.tsx +21 -19
- package/src/client/triggers/schedule/index.tsx +25 -19
- package/src/client/variable.tsx +48 -26
- package/src/server/Plugin.ts +13 -9
- package/src/server/Processor.ts +2 -2
- package/src/server/__tests__/collections/categories.ts +4 -0
- package/src/server/__tests__/instructions/manual.test.ts +391 -72
- package/src/server/__tests__/instructions/request.test.ts +30 -0
- package/src/server/__tests__/instructions/sql.test.ts +162 -0
- package/src/server/__tests__/triggers/collection.test.ts +35 -0
- package/src/server/instructions/create.ts +13 -11
- package/src/server/instructions/index.ts +1 -0
- package/src/server/instructions/manual/actions.ts +16 -4
- package/src/server/instructions/manual/forms/create.ts +2 -1
- package/src/server/instructions/manual/forms/update.ts +3 -2
- package/src/server/instructions/query.ts +12 -1
- package/src/server/instructions/request.ts +2 -1
- package/src/server/instructions/sql.ts +25 -0
- package/src/server/migrations/20230710115902-manual-action-values.ts +78 -0
- package/src/server/triggers/collection.ts +15 -11
- package/src/server/utils.ts +17 -0
- package/lib/client/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- package/src/client/triggers/schedule/DateFieldsSelect.tsx +0 -28
package/lib/client/style.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
function _client() {
|
|
8
8
|
const data = require("@nocobase/client");
|
|
9
9
|
_client = function _client() {
|
|
@@ -11,314 +11,337 @@ function _client() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
position: relative;
|
|
25
|
-
padding: 0.5rem 1rem;
|
|
26
|
-
background: #fff;
|
|
27
|
-
border-bottom: 1px solid #e7e7e7;
|
|
28
|
-
|
|
29
|
-
header {
|
|
14
|
+
const useStyles = (0, _client().createStyles)(({
|
|
15
|
+
css,
|
|
16
|
+
token
|
|
17
|
+
}) => {
|
|
18
|
+
return {
|
|
19
|
+
workflowPageClass: css`
|
|
20
|
+
flex-grow: 1;
|
|
21
|
+
overflow: hidden;
|
|
30
22
|
display: flex;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
|
|
25
|
+
.workflow-toolbar {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
position: relative;
|
|
30
|
+
padding: 0.5rem 1rem;
|
|
31
|
+
background: ${token.colorBgContainer};
|
|
32
|
+
border-bottom: 1px solid ${token.colorBorder};
|
|
33
|
+
|
|
34
|
+
header {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
min-height: 2rem;
|
|
38
|
+
}
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
aside {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 0.5em;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.workflow-versions {
|
|
47
|
+
label {
|
|
48
|
+
margin-right: 0.5em;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.workflow-canvas {
|
|
54
|
+
flex-grow: 1;
|
|
55
|
+
overflow: auto;
|
|
56
|
+
width: 100%;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
align-items: center;
|
|
60
|
+
padding: 2em;
|
|
61
|
+
|
|
62
|
+
.end {
|
|
63
|
+
cursor: default;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`,
|
|
71
|
+
workflowVersionDropdownClass: css`
|
|
72
|
+
.ant-dropdown-menu-item {
|
|
73
|
+
.ant-dropdown-menu-title-content {
|
|
74
|
+
text-align: right;
|
|
75
|
+
|
|
76
|
+
time {
|
|
77
|
+
margin-left: 0.5rem;
|
|
78
|
+
color: ${token.colorText};
|
|
79
|
+
font-size: 80%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
strong {
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
> .enabled {
|
|
87
|
+
strong {
|
|
88
|
+
font-weight: bold;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> .unexecuted {
|
|
93
|
+
strong {
|
|
94
|
+
font-style: italic;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`,
|
|
100
|
+
branchBlockClass: css`
|
|
101
|
+
display: flex;
|
|
102
|
+
position: relative;
|
|
103
|
+
|
|
104
|
+
:before {
|
|
105
|
+
content: '';
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 0;
|
|
108
|
+
bottom: 0;
|
|
109
|
+
left: calc(50% - 0.5px);
|
|
110
|
+
width: 1px;
|
|
111
|
+
background-color: ${token.colorBorder};
|
|
112
|
+
}
|
|
113
|
+
`,
|
|
114
|
+
branchClass: css`
|
|
36
115
|
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
37
117
|
align-items: center;
|
|
38
|
-
|
|
39
|
-
|
|
118
|
+
position: relative;
|
|
119
|
+
min-width: 20em;
|
|
120
|
+
padding: 0 2em;
|
|
40
121
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
margin-right: 0.5em;
|
|
122
|
+
.workflow-node-list {
|
|
123
|
+
flex-grow: 1;
|
|
44
124
|
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
125
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
126
|
+
.workflow-branch-lines {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0;
|
|
129
|
+
bottom: 0;
|
|
130
|
+
width: 1px;
|
|
131
|
+
background-color: ${token.colorBorder};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:before,
|
|
135
|
+
:after {
|
|
136
|
+
content: '';
|
|
137
|
+
position: absolute;
|
|
138
|
+
height: 1px;
|
|
139
|
+
background-color: ${token.colorBorder};
|
|
140
|
+
}
|
|
56
141
|
|
|
57
|
-
|
|
58
|
-
|
|
142
|
+
:before {
|
|
143
|
+
top: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:after {
|
|
147
|
+
bottom: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:not(:first-child):not(:last-child) {
|
|
151
|
+
:before,
|
|
152
|
+
:after {
|
|
153
|
+
left: 0;
|
|
154
|
+
width: 100%;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:last-child:not(:first-child) {
|
|
159
|
+
:before,
|
|
160
|
+
:after {
|
|
161
|
+
right: 50%;
|
|
162
|
+
width: 50%;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:first-child:not(:last-child) {
|
|
167
|
+
:before,
|
|
168
|
+
:after {
|
|
169
|
+
left: 50%;
|
|
170
|
+
width: 50%;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`,
|
|
174
|
+
nodeBlockClass: css`
|
|
175
|
+
flex-grow: 1;
|
|
176
|
+
flex-shrink: 0;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
align-items: center;
|
|
180
|
+
position: relative;
|
|
181
|
+
`,
|
|
182
|
+
nodeClass: css`
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
`,
|
|
188
|
+
nodeCardClass: css`
|
|
189
|
+
position: relative;
|
|
190
|
+
width: 20em;
|
|
191
|
+
background: ${token.colorBgContainer};
|
|
192
|
+
padding: 1em;
|
|
193
|
+
box-shadow: ${token.boxShadowTertiary};
|
|
194
|
+
border-radius: ${token.borderRadiusLG}px;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
transition: box-shadow 0.3s ease;
|
|
59
197
|
|
|
60
198
|
&:hover {
|
|
61
|
-
box-shadow:
|
|
199
|
+
box-shadow: ${token.boxShadow};
|
|
200
|
+
|
|
201
|
+
.workflow-node-remove-button {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
}
|
|
62
204
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
exports.workflowPageClass = workflowPageClass;
|
|
67
|
-
const workflowVersionDropdownClass = (0, _client().css)`
|
|
68
|
-
.ant-dropdown-menu-item {
|
|
69
|
-
.ant-dropdown-menu-title-content {
|
|
70
|
-
text-align: right;
|
|
71
|
-
|
|
72
|
-
time {
|
|
73
|
-
margin-left: 0.5rem;
|
|
74
|
-
color: #999;
|
|
75
|
-
font-size: 80%;
|
|
205
|
+
|
|
206
|
+
&.configuring {
|
|
207
|
+
box-shadow: ${token.boxShadow};
|
|
76
208
|
}
|
|
77
209
|
|
|
78
|
-
|
|
79
|
-
|
|
210
|
+
.workflow-node-remove-button {
|
|
211
|
+
position: absolute;
|
|
212
|
+
right: 0.5em;
|
|
213
|
+
top: 0.5em;
|
|
214
|
+
color: ${token.colorText};
|
|
215
|
+
opacity: 0;
|
|
216
|
+
transition: opacity 0.3s ease;
|
|
217
|
+
|
|
218
|
+
&[disabled] {
|
|
219
|
+
display: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:hover {
|
|
223
|
+
color: ${token.colorErrorHover};
|
|
224
|
+
}
|
|
80
225
|
}
|
|
81
226
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
227
|
+
.ant-input {
|
|
228
|
+
font-weight: bold;
|
|
229
|
+
|
|
230
|
+
&:not(:focus) {
|
|
231
|
+
transition: background-color 0.3s ease, border-color 0.3s ease;
|
|
232
|
+
border-color: ${token.colorBorderBg};
|
|
233
|
+
background-color: ${token.colorBgContainerDisabled};
|
|
234
|
+
|
|
235
|
+
&:not(:disabled):hover {
|
|
236
|
+
border-color: ${token.colorPrimaryBorderHover};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&:disabled:hover {
|
|
240
|
+
border-color: ${token.colorBorderBg};
|
|
241
|
+
}
|
|
85
242
|
}
|
|
86
243
|
}
|
|
87
244
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
245
|
+
.workflow-node-config-button {
|
|
246
|
+
padding: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:hover {
|
|
250
|
+
box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.25);
|
|
251
|
+
|
|
252
|
+
.workflow-node-remove-button {
|
|
253
|
+
opacity: 1;
|
|
91
254
|
}
|
|
92
255
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
`;
|
|
111
|
-
exports.branchBlockClass = branchBlockClass;
|
|
112
|
-
const branchClass = (0, _client().css)`
|
|
113
|
-
display: flex;
|
|
114
|
-
flex-direction: column;
|
|
115
|
-
align-items: center;
|
|
116
|
-
position: relative;
|
|
117
|
-
min-width: 20em;
|
|
118
|
-
padding: 0 2em;
|
|
119
|
-
|
|
120
|
-
.workflow-node-list {
|
|
121
|
-
flex-grow: 1;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.workflow-branch-lines {
|
|
125
|
-
position: absolute;
|
|
126
|
-
top: 0;
|
|
127
|
-
bottom: 0;
|
|
128
|
-
width: 1px;
|
|
129
|
-
background-color: #ddd;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
:before,
|
|
133
|
-
:after {
|
|
134
|
-
content: '';
|
|
135
|
-
position: absolute;
|
|
136
|
-
height: 1px;
|
|
137
|
-
background-color: #ddd;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:before {
|
|
141
|
-
top: 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:after {
|
|
145
|
-
bottom: 0;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
:not(:first-child):not(:last-child) {
|
|
149
|
-
:before,
|
|
150
|
-
:after {
|
|
151
|
-
left: 0;
|
|
152
|
-
width: 100%;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
:last-child:not(:first-child) {
|
|
157
|
-
:before,
|
|
158
|
-
:after {
|
|
159
|
-
right: 50%;
|
|
160
|
-
width: 50%;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:first-child:not(:last-child) {
|
|
165
|
-
:before,
|
|
166
|
-
:after {
|
|
167
|
-
left: 50%;
|
|
168
|
-
width: 50%;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
`;
|
|
172
|
-
exports.branchClass = branchClass;
|
|
173
|
-
const nodeBlockClass = (0, _client().css)`
|
|
174
|
-
flex-grow: 1;
|
|
175
|
-
flex-shrink: 0;
|
|
176
|
-
display: flex;
|
|
177
|
-
flex-direction: column;
|
|
178
|
-
align-items: center;
|
|
179
|
-
position: relative;
|
|
180
|
-
`;
|
|
181
|
-
exports.nodeBlockClass = nodeBlockClass;
|
|
182
|
-
const nodeClass = (0, _client().css)`
|
|
183
|
-
flex-shrink: 0;
|
|
184
|
-
display: flex;
|
|
185
|
-
flex-direction: column;
|
|
186
|
-
align-items: center;
|
|
187
|
-
`;
|
|
188
|
-
exports.nodeClass = nodeClass;
|
|
189
|
-
const nodeCardClass = (0, _client().css)`
|
|
190
|
-
position: relative;
|
|
191
|
-
width: 20em;
|
|
192
|
-
background: #fff;
|
|
193
|
-
padding: 1em;
|
|
194
|
-
box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
|
|
195
|
-
border-radius: 0.5em;
|
|
196
|
-
cursor: pointer;
|
|
197
|
-
transition: box-shadow 0.3s ease;
|
|
198
|
-
|
|
199
|
-
&.configuring {
|
|
200
|
-
box-shadow: 0 0.25em 1em rgba(0, 100, 200, 0.25);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.workflow-node-remove-button {
|
|
204
|
-
position: absolute;
|
|
205
|
-
right: 0.5em;
|
|
206
|
-
top: 0.5em;
|
|
207
|
-
color: #999;
|
|
208
|
-
opacity: 0;
|
|
209
|
-
transition: opacity 0.3s ease;
|
|
210
|
-
|
|
211
|
-
&[disabled] {
|
|
212
|
-
display: none;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
&:hover {
|
|
216
|
-
color: red;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.ant-input {
|
|
221
|
-
font-weight: bold;
|
|
222
|
-
|
|
223
|
-
&:not(:focus) {
|
|
224
|
-
transition: background-color 0.3s ease, border-color 0.3s ease;
|
|
225
|
-
border-color: #f7f7f7;
|
|
226
|
-
background-color: #f7f7f7;
|
|
227
|
-
|
|
228
|
-
&:not(:disabled):hover {
|
|
229
|
-
border-color: #eee;
|
|
230
|
-
background-color: #eee;
|
|
256
|
+
`,
|
|
257
|
+
nodeJobButtonClass: css`
|
|
258
|
+
display: flex;
|
|
259
|
+
position: absolute;
|
|
260
|
+
top: calc(1em - 1px);
|
|
261
|
+
right: 1em;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
align-items: center;
|
|
264
|
+
color: ${token.colorText};
|
|
265
|
+
|
|
266
|
+
&[type='button'] {
|
|
267
|
+
border: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&.inner {
|
|
271
|
+
position: static;
|
|
231
272
|
}
|
|
232
273
|
|
|
233
|
-
|
|
234
|
-
|
|
274
|
+
.ant-tag {
|
|
275
|
+
padding: 0;
|
|
276
|
+
width: ${token.sizeLG}px;
|
|
277
|
+
height: ${token.sizeLG}px;
|
|
278
|
+
line-height: ${token.sizeLG}px;
|
|
279
|
+
margin-right: 0;
|
|
280
|
+
border-radius: 50%;
|
|
281
|
+
text-align: center;
|
|
282
|
+
}
|
|
283
|
+
`,
|
|
284
|
+
nodeHeaderClass: css`
|
|
285
|
+
position: relative;
|
|
286
|
+
`,
|
|
287
|
+
nodeMetaClass: css`
|
|
288
|
+
margin-bottom: 0.5em;
|
|
289
|
+
|
|
290
|
+
.workflow-node-id {
|
|
291
|
+
color: ${token.colorTextDescription};
|
|
292
|
+
|
|
293
|
+
&:before {
|
|
294
|
+
content: '#';
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
`,
|
|
298
|
+
nodeTitleClass: css`
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
font-weight: normal;
|
|
302
|
+
.workflow-node-id {
|
|
303
|
+
color: ${token.colorTextDescription};
|
|
304
|
+
}
|
|
305
|
+
`,
|
|
306
|
+
nodeSubtreeClass: css`
|
|
307
|
+
display: flex;
|
|
308
|
+
flex-direction: column-reverse;
|
|
309
|
+
align-items: center;
|
|
310
|
+
`,
|
|
311
|
+
addButtonClass: css`
|
|
312
|
+
flex-shrink: 0;
|
|
313
|
+
padding: 2em 0;
|
|
314
|
+
|
|
315
|
+
> .ant-btn {
|
|
316
|
+
&:disabled {
|
|
317
|
+
visibility: hidden;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
`,
|
|
321
|
+
conditionClass: css`
|
|
322
|
+
position: relative;
|
|
323
|
+
height: 2em;
|
|
324
|
+
overflow: visible;
|
|
325
|
+
|
|
326
|
+
> span {
|
|
327
|
+
position: absolute;
|
|
328
|
+
top: calc(1.5em - 1px);
|
|
329
|
+
line-height: 1em;
|
|
330
|
+
color: ${token.colorTextSecondary};
|
|
331
|
+
padding: 1px;
|
|
235
332
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
exports.nodeCardClass = nodeCardClass;
|
|
252
|
-
const nodeJobButtonClass = (0, _client().css)`
|
|
253
|
-
display: flex;
|
|
254
|
-
position: absolute;
|
|
255
|
-
top: 1.25em;
|
|
256
|
-
right: 1.25em;
|
|
257
|
-
width: 1.25rem;
|
|
258
|
-
height: 1.25rem;
|
|
259
|
-
min-width: 1.25rem;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
align-items: center;
|
|
262
|
-
font-size: 0.8em;
|
|
263
|
-
color: #fff;
|
|
264
|
-
|
|
265
|
-
&[type='button'] {
|
|
266
|
-
border: none;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&.inner {
|
|
270
|
-
position: static;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.ant-tag {
|
|
274
|
-
padding: 0;
|
|
275
|
-
width: 100%;
|
|
276
|
-
line-height: 18px;
|
|
277
|
-
margin-right: 0;
|
|
278
|
-
border-radius: 50%;
|
|
279
|
-
text-align: center;
|
|
280
|
-
}
|
|
281
|
-
`;
|
|
282
|
-
exports.nodeJobButtonClass = nodeJobButtonClass;
|
|
283
|
-
const nodeHeaderClass = (0, _client().css)`
|
|
284
|
-
position: relative;
|
|
285
|
-
`;
|
|
286
|
-
exports.nodeHeaderClass = nodeHeaderClass;
|
|
287
|
-
const nodeMetaClass = (0, _client().css)`
|
|
288
|
-
margin-bottom: 0.5em;
|
|
289
|
-
|
|
290
|
-
.workflow-node-id {
|
|
291
|
-
color: #999;
|
|
292
|
-
|
|
293
|
-
&:before {
|
|
294
|
-
content: '#';
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
`;
|
|
298
|
-
exports.nodeMetaClass = nodeMetaClass;
|
|
299
|
-
const nodeTitleClass = (0, _client().css)`
|
|
300
|
-
display: flex;
|
|
301
|
-
align-items: center;
|
|
302
|
-
font-weight: normal;
|
|
303
|
-
.workflow-node-id {
|
|
304
|
-
color: #999;
|
|
305
|
-
}
|
|
306
|
-
`;
|
|
307
|
-
exports.nodeTitleClass = nodeTitleClass;
|
|
308
|
-
const nodeSubtreeClass = (0, _client().css)`
|
|
309
|
-
display: flex;
|
|
310
|
-
flex-direction: column-reverse;
|
|
311
|
-
align-items: center;
|
|
312
|
-
`;
|
|
313
|
-
exports.nodeSubtreeClass = nodeSubtreeClass;
|
|
314
|
-
const addButtonClass = (0, _client().css)`
|
|
315
|
-
flex-shrink: 0;
|
|
316
|
-
padding: 2em 0;
|
|
317
|
-
|
|
318
|
-
> .ant-btn {
|
|
319
|
-
&:disabled {
|
|
320
|
-
visibility: hidden;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
`;
|
|
324
|
-
exports.addButtonClass = addButtonClass;
|
|
333
|
+
`,
|
|
334
|
+
loopLineClass: css`
|
|
335
|
+
display: flex;
|
|
336
|
+
justify-content: center;
|
|
337
|
+
align-items: center;
|
|
338
|
+
position: absolute;
|
|
339
|
+
top: 50%;
|
|
340
|
+
transform: translateY(-50%);
|
|
341
|
+
width: 2em;
|
|
342
|
+
height: 6em;
|
|
343
|
+
`
|
|
344
|
+
};
|
|
345
|
+
});
|
|
346
|
+
var _default = useStyles;
|
|
347
|
+
exports.default = _default;
|
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'x-decorator': string;
|
|
46
46
|
'x-component': string;
|
|
47
47
|
'x-component-props': {
|
|
48
|
+
className: string;
|
|
48
49
|
mode: string;
|
|
49
50
|
placeholder: string;
|
|
50
51
|
filter(field: any): boolean;
|
|
@@ -60,6 +61,12 @@ declare const _default: {
|
|
|
60
61
|
};
|
|
61
62
|
condition: {
|
|
62
63
|
title: string;
|
|
64
|
+
'x-component-props': {
|
|
65
|
+
useProps: () => {
|
|
66
|
+
options: any[];
|
|
67
|
+
className: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
63
70
|
'x-reactions': {
|
|
64
71
|
dependencies: string[];
|
|
65
72
|
fulfill: {
|
|
@@ -71,13 +78,6 @@ declare const _default: {
|
|
|
71
78
|
type: string;
|
|
72
79
|
'x-decorator': string;
|
|
73
80
|
'x-component': string;
|
|
74
|
-
'x-component-props': {
|
|
75
|
-
useProps(): {
|
|
76
|
-
options: any[];
|
|
77
|
-
className: string;
|
|
78
|
-
};
|
|
79
|
-
dynamicComponent: string;
|
|
80
|
-
};
|
|
81
81
|
};
|
|
82
82
|
appends: {
|
|
83
83
|
'x-reactions': {
|
|
@@ -94,9 +94,8 @@ declare const _default: {
|
|
|
94
94
|
'x-decorator': string;
|
|
95
95
|
'x-component': string;
|
|
96
96
|
'x-component-props': {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
filter(field: any): boolean;
|
|
97
|
+
useCollection(): any;
|
|
98
|
+
className: string;
|
|
100
99
|
};
|
|
101
100
|
};
|
|
102
101
|
};
|
|
@@ -98,6 +98,7 @@ var _default = {
|
|
|
98
98
|
'x-decorator': 'FormItem',
|
|
99
99
|
'x-component': 'FieldsSelect',
|
|
100
100
|
'x-component-props': {
|
|
101
|
+
className: 'full-width',
|
|
101
102
|
mode: 'multiple',
|
|
102
103
|
placeholder: '{{t("Select field")}}',
|
|
103
104
|
filter(field) {
|
|
@@ -115,6 +116,9 @@ var _default = {
|
|
|
115
116
|
},
|
|
116
117
|
condition: _objectSpread(_objectSpread({}, _collection.filter), {}, {
|
|
117
118
|
title: `{{t("Only triggers when match conditions", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
119
|
+
'x-component-props': {
|
|
120
|
+
useProps: _collection.filter['x-component-props'].useProps
|
|
121
|
+
},
|
|
118
122
|
'x-reactions': [{
|
|
119
123
|
dependencies: ['collection'],
|
|
120
124
|
fulfill: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ISchema } from '@formily/react';
|
|
2
2
|
import { SchemaInitializerItemOptions } from '@nocobase/client';
|
|
3
|
-
import { Registry } from '@nocobase/utils/client';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { VariableOptions } from '../variable';
|
|
6
5
|
export interface Trigger {
|
|
@@ -20,6 +19,6 @@ export interface Trigger {
|
|
|
20
19
|
useInitializers?(config: any): SchemaInitializerItemOptions | null;
|
|
21
20
|
initializers?: any;
|
|
22
21
|
}
|
|
23
|
-
export declare const triggers:
|
|
22
|
+
export declare const triggers: any;
|
|
24
23
|
export declare const TriggerConfig: () => React.JSX.Element;
|
|
25
|
-
export declare function useTrigger():
|
|
24
|
+
export declare function useTrigger(): any;
|