@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.
Files changed (133) hide show
  1. package/lib/client/AddButton.js +13 -4
  2. package/lib/client/Branch.js +4 -2
  3. package/lib/client/CanvasContent.js +6 -4
  4. package/lib/client/ExecutionCanvas.js +18 -7
  5. package/lib/client/ExecutionPage.js +4 -2
  6. package/lib/client/WorkflowCanvas.js +16 -6
  7. package/lib/client/WorkflowPage.js +4 -2
  8. package/lib/client/WorkflowProvider.js +2 -2
  9. package/lib/client/components/CollectionBlockInitializer.js +3 -3
  10. package/lib/client/components/CollectionFieldset.js +7 -1
  11. package/lib/client/components/FieldsSelect.js +4 -1
  12. package/lib/client/components/NodeDescription.js +36 -22
  13. package/lib/client/index.js +3 -3
  14. package/lib/client/locale/zh-CN.d.ts +5 -1
  15. package/lib/client/locale/zh-CN.js +6 -2
  16. package/lib/client/nodes/aggregate.d.ts +6 -1
  17. package/lib/client/nodes/aggregate.js +4 -3
  18. package/lib/client/nodes/calculation.d.ts +5 -3
  19. package/lib/client/nodes/calculation.js +6 -5
  20. package/lib/client/nodes/condition.d.ts +1 -7
  21. package/lib/client/nodes/condition.js +12 -23
  22. package/lib/client/nodes/create.d.ts +2 -4
  23. package/lib/client/nodes/create.js +1 -3
  24. package/lib/client/nodes/index.d.ts +1 -2
  25. package/lib/client/nodes/index.js +24 -24
  26. package/lib/client/nodes/loop.js +19 -28
  27. package/lib/client/nodes/manual/FormBlockInitializer.js +6 -5
  28. package/lib/client/nodes/manual/SchemaConfig.d.ts +1 -2
  29. package/lib/client/nodes/manual/SchemaConfig.js +175 -21
  30. package/lib/client/nodes/manual/WorkflowTodo.js +39 -46
  31. package/lib/client/nodes/manual/forms/create.js +8 -1
  32. package/lib/client/nodes/manual/forms/custom.js +11 -4
  33. package/lib/client/nodes/manual/forms/update.js +8 -1
  34. package/lib/client/nodes/manual/index.d.ts +6 -1
  35. package/lib/client/nodes/manual/index.js +5 -4
  36. package/lib/client/nodes/parallel.js +7 -4
  37. package/lib/client/nodes/query.d.ts +2 -5
  38. package/lib/client/nodes/query.js +1 -3
  39. package/lib/client/nodes/sql.d.ts +26 -0
  40. package/lib/client/{triggers/schedule/DateFieldsSelect.js → nodes/sql.js} +37 -46
  41. package/lib/client/schemas/collection.d.ts +2 -3
  42. package/lib/client/schemas/collection.js +8 -7
  43. package/lib/client/style.d.ts +18 -13
  44. package/lib/client/style.js +312 -289
  45. package/lib/client/triggers/collection.d.ts +9 -10
  46. package/lib/client/triggers/collection.js +4 -0
  47. package/lib/client/triggers/index.d.ts +2 -3
  48. package/lib/client/triggers/index.js +10 -5
  49. package/lib/client/triggers/schedule/OnField.js +35 -23
  50. package/lib/client/triggers/schedule/ScheduleConfig.js +7 -7
  51. package/lib/client/triggers/schedule/index.d.ts +0 -1
  52. package/lib/client/triggers/schedule/index.js +31 -19
  53. package/lib/client/variable.d.ts +29 -11
  54. package/lib/client/variable.js +39 -24
  55. package/lib/server/Plugin.d.ts +1 -3
  56. package/lib/server/Plugin.js +10 -6
  57. package/lib/server/Processor.d.ts +1 -1
  58. package/lib/server/Processor.js +2 -2
  59. package/lib/server/instructions/create.d.ts +1 -1
  60. package/lib/server/instructions/create.js +13 -13
  61. package/lib/server/instructions/index.js +1 -1
  62. package/lib/server/instructions/manual/actions.js +19 -7
  63. package/lib/server/instructions/manual/forms/create.js +7 -1
  64. package/lib/server/instructions/manual/forms/update.js +7 -1
  65. package/lib/server/instructions/query.js +8 -1
  66. package/lib/server/instructions/request.d.ts +1 -1
  67. package/lib/server/instructions/request.js +4 -2
  68. package/lib/server/instructions/sql.d.ts +12 -0
  69. package/lib/server/instructions/sql.js +34 -0
  70. package/lib/server/migrations/20230710115902-manual-action-values.d.ts +4 -0
  71. package/lib/server/migrations/20230710115902-manual-action-values.js +97 -0
  72. package/lib/server/triggers/collection.js +13 -11
  73. package/lib/server/utils.d.ts +2 -0
  74. package/lib/server/utils.js +21 -0
  75. package/package.json +12 -11
  76. package/src/client/AddButton.tsx +17 -5
  77. package/src/client/Branch.tsx +4 -2
  78. package/src/client/CanvasContent.tsx +6 -4
  79. package/src/client/ExecutionCanvas.tsx +11 -13
  80. package/src/client/ExecutionPage.tsx +3 -2
  81. package/src/client/WorkflowCanvas.tsx +14 -13
  82. package/src/client/WorkflowPage.tsx +3 -2
  83. package/src/client/WorkflowProvider.tsx +2 -2
  84. package/src/client/components/CollectionBlockInitializer.tsx +3 -3
  85. package/src/client/components/CollectionFieldset.tsx +5 -3
  86. package/src/client/components/FieldsSelect.tsx +5 -1
  87. package/src/client/components/NodeDescription.tsx +30 -23
  88. package/src/client/index.tsx +3 -3
  89. package/src/client/locale/zh-CN.ts +8 -2
  90. package/src/client/nodes/aggregate.tsx +4 -4
  91. package/src/client/nodes/calculation.tsx +4 -5
  92. package/src/client/nodes/condition.tsx +7 -34
  93. package/src/client/nodes/create.tsx +0 -1
  94. package/src/client/nodes/index.tsx +21 -25
  95. package/src/client/nodes/loop.tsx +16 -31
  96. package/src/client/nodes/manual/FormBlockInitializer.tsx +6 -5
  97. package/src/client/nodes/manual/SchemaConfig.tsx +162 -18
  98. package/src/client/nodes/manual/WorkflowTodo.tsx +43 -47
  99. package/src/client/nodes/manual/forms/create.tsx +5 -1
  100. package/src/client/nodes/manual/forms/custom.tsx +7 -3
  101. package/src/client/nodes/manual/forms/update.tsx +5 -1
  102. package/src/client/nodes/manual/index.tsx +5 -5
  103. package/src/client/nodes/parallel.tsx +6 -5
  104. package/src/client/nodes/query.tsx +0 -1
  105. package/src/client/nodes/sql.tsx +37 -0
  106. package/src/client/schemas/collection.ts +6 -6
  107. package/src/client/style.tsx +324 -289
  108. package/src/client/triggers/collection.tsx +4 -0
  109. package/src/client/triggers/index.tsx +14 -10
  110. package/src/client/triggers/schedule/OnField.tsx +29 -15
  111. package/src/client/triggers/schedule/ScheduleConfig.tsx +21 -19
  112. package/src/client/triggers/schedule/index.tsx +25 -19
  113. package/src/client/variable.tsx +48 -26
  114. package/src/server/Plugin.ts +13 -9
  115. package/src/server/Processor.ts +2 -2
  116. package/src/server/__tests__/collections/categories.ts +4 -0
  117. package/src/server/__tests__/instructions/manual.test.ts +391 -72
  118. package/src/server/__tests__/instructions/request.test.ts +30 -0
  119. package/src/server/__tests__/instructions/sql.test.ts +162 -0
  120. package/src/server/__tests__/triggers/collection.test.ts +35 -0
  121. package/src/server/instructions/create.ts +13 -11
  122. package/src/server/instructions/index.ts +1 -0
  123. package/src/server/instructions/manual/actions.ts +16 -4
  124. package/src/server/instructions/manual/forms/create.ts +2 -1
  125. package/src/server/instructions/manual/forms/update.ts +3 -2
  126. package/src/server/instructions/query.ts +12 -1
  127. package/src/server/instructions/request.ts +2 -1
  128. package/src/server/instructions/sql.ts +25 -0
  129. package/src/server/migrations/20230710115902-manual-action-values.ts +78 -0
  130. package/src/server/triggers/collection.ts +15 -11
  131. package/src/server/utils.ts +17 -0
  132. package/lib/client/triggers/schedule/DateFieldsSelect.d.ts +0 -2
  133. package/src/client/triggers/schedule/DateFieldsSelect.tsx +0 -28
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.workflowVersionDropdownClass = exports.workflowPageClass = exports.nodeTitleClass = exports.nodeSubtreeClass = exports.nodeMetaClass = exports.nodeJobButtonClass = exports.nodeHeaderClass = exports.nodeClass = exports.nodeCardClass = exports.nodeBlockClass = exports.branchClass = exports.branchBlockClass = exports.addButtonClass = void 0;
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 workflowPageClass = (0, _client().css)`
15
- flex-grow: 1;
16
- overflow: hidden;
17
- display: flex;
18
- flex-direction: column;
19
-
20
- .workflow-toolbar {
21
- display: flex;
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
- align-items: center;
32
- min-height: 2rem;
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
- aside {
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
- gap: 0.5em;
39
- }
118
+ position: relative;
119
+ min-width: 20em;
120
+ padding: 0 2em;
40
121
 
41
- .workflow-versions {
42
- label {
43
- margin-right: 0.5em;
122
+ .workflow-node-list {
123
+ flex-grow: 1;
44
124
  }
45
- }
46
- }
47
125
 
48
- .workflow-canvas {
49
- flex-grow: 1;
50
- overflow: auto;
51
- width: 100%;
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- padding: 2em;
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
- .end {
58
- cursor: default;
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: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
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
- strong {
79
- font-weight: normal;
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
- > .enabled {
83
- strong {
84
- font-weight: bold;
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
- > .unexecuted {
89
- strong {
90
- font-style: italic;
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
- exports.workflowVersionDropdownClass = workflowVersionDropdownClass;
97
- const branchBlockClass = (0, _client().css)`
98
- display: flex;
99
- position: relative;
100
-
101
- :before {
102
- content: '';
103
- position: absolute;
104
- top: 0;
105
- bottom: 0;
106
- left: calc(50% - 0.5px);
107
- width: 1px;
108
- background-color: var(--nb-box-bg);
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
- &:disabled:hover {
234
- border-color: #f7f7f7;
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
- .workflow-node-config-button {
240
- padding: 0;
241
- }
242
-
243
- &:hover {
244
- box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.25);
245
-
246
- .workflow-node-remove-button {
247
- opacity: 1;
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
- mode: string;
98
- placeholder: string;
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: Registry<Trigger>;
22
+ export declare const triggers: any;
24
23
  export declare const TriggerConfig: () => React.JSX.Element;
25
- export declare function useTrigger(): Trigger;
24
+ export declare function useTrigger(): any;