@nocobase/plugin-workflow 0.8.0-alpha.9 → 0.8.1-alpha.3

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 (95) hide show
  1. package/lib/client/AddButton.js +21 -13
  2. package/lib/client/ExecutionCanvas.js +9 -21
  3. package/lib/client/ExecutionResourceProvider.d.ts +2 -1
  4. package/lib/client/ExecutionResourceProvider.js +4 -3
  5. package/lib/client/FlowContext.js +1 -1
  6. package/lib/client/WorkflowCanvas.js +135 -36
  7. package/lib/client/WorkflowProvider.d.ts +3 -0
  8. package/lib/client/WorkflowProvider.js +71 -16
  9. package/lib/client/WorkflowShortcut.d.ts +0 -1
  10. package/lib/client/WorkflowShortcut.js +4 -47
  11. package/lib/client/calculators.d.ts +27 -37
  12. package/lib/client/calculators.js +168 -150
  13. package/lib/client/components/CollectionFieldset.js +10 -20
  14. package/lib/client/components/Duration.js +3 -14
  15. package/lib/client/components/EjsTextArea.d.ts +2 -0
  16. package/lib/client/components/EjsTextArea.js +232 -0
  17. package/lib/client/components/OpenDrawer.d.ts +6 -0
  18. package/lib/client/components/OpenDrawer.js +93 -0
  19. package/lib/client/constants.js +11 -9
  20. package/lib/client/index.d.ts +1 -0
  21. package/lib/client/index.js +14 -0
  22. package/lib/client/locale/en-US.d.ts +105 -0
  23. package/lib/client/locale/en-US.js +111 -0
  24. package/lib/client/locale/index.d.ts +3 -0
  25. package/lib/client/locale/index.js +69 -0
  26. package/lib/client/locale/ja-JP.d.ts +88 -0
  27. package/lib/client/locale/ja-JP.js +94 -0
  28. package/lib/client/locale/ru-RU.d.ts +88 -0
  29. package/lib/client/locale/ru-RU.js +94 -0
  30. package/lib/client/locale/tr-TR.d.ts +88 -0
  31. package/lib/client/locale/tr-TR.js +94 -0
  32. package/lib/client/locale/zh-CN.d.ts +130 -0
  33. package/lib/client/locale/zh-CN.js +136 -0
  34. package/lib/client/nodes/calculation.d.ts +0 -1
  35. package/lib/client/nodes/calculation.js +9 -17
  36. package/lib/client/nodes/condition.js +16 -22
  37. package/lib/client/nodes/create.d.ts +3 -1
  38. package/lib/client/nodes/create.js +11 -11
  39. package/lib/client/nodes/delay.js +8 -6
  40. package/lib/client/nodes/index.js +46 -14
  41. package/lib/client/nodes/parallel.d.ts +0 -1
  42. package/lib/client/nodes/parallel.js +11 -32
  43. package/lib/client/nodes/query.js +9 -17
  44. package/lib/client/nodes/request.d.ts +138 -0
  45. package/lib/client/nodes/request.js +167 -0
  46. package/lib/client/nodes/update.js +4 -2
  47. package/lib/client/schemas/collection.js +3 -1
  48. package/lib/client/schemas/executions.d.ts +211 -207
  49. package/lib/client/schemas/executions.js +102 -96
  50. package/lib/client/schemas/workflows.js +112 -22
  51. package/lib/client/style.js +7 -7
  52. package/lib/client/triggers/collection.d.ts +2 -1
  53. package/lib/client/triggers/collection.js +49 -34
  54. package/lib/client/triggers/index.d.ts +3 -3
  55. package/lib/client/triggers/index.js +46 -46
  56. package/lib/client/triggers/schedule/EndsByField.js +13 -39
  57. package/lib/client/triggers/schedule/OnField.js +10 -5
  58. package/lib/client/triggers/schedule/RepeatField.js +6 -14
  59. package/lib/client/triggers/schedule/ScheduleConfig.js +25 -20
  60. package/lib/client/triggers/schedule/constants.d.ts +4 -0
  61. package/lib/client/triggers/schedule/constants.js +11 -0
  62. package/lib/client/triggers/schedule/index.d.ts +2 -3
  63. package/lib/client/triggers/schedule/index.js +55 -40
  64. package/lib/server/Plugin.d.ts +15 -5
  65. package/lib/server/Plugin.js +176 -61
  66. package/lib/server/Processor.d.ts +1 -2
  67. package/lib/server/Processor.js +3 -19
  68. package/lib/server/actions/jobs.js +2 -3
  69. package/lib/server/actions/workflows.js +13 -5
  70. package/lib/server/calculators/index.d.ts +4 -2
  71. package/lib/server/calculators/index.js +6 -4
  72. package/lib/server/collections/executions.js +2 -1
  73. package/lib/server/constants.d.ts +1 -0
  74. package/lib/server/constants.js +1 -0
  75. package/lib/server/extensions/assignees/actions.js +2 -3
  76. package/lib/server/extensions/assignees/collections/users_jobs.js +9 -1
  77. package/lib/server/index.d.ts +3 -4
  78. package/lib/server/index.js +21 -44
  79. package/lib/server/instructions/condition.js +1 -1
  80. package/lib/server/instructions/create.js +3 -1
  81. package/lib/server/instructions/delay.js +2 -3
  82. package/lib/server/instructions/destroy.js +3 -1
  83. package/lib/server/instructions/index.d.ts +3 -2
  84. package/lib/server/instructions/index.js +1 -1
  85. package/lib/server/instructions/prompt.js +2 -1
  86. package/lib/server/instructions/query.js +3 -1
  87. package/lib/server/instructions/request.d.ts +14 -0
  88. package/lib/server/instructions/request.js +154 -0
  89. package/lib/server/instructions/update.d.ts +1 -1
  90. package/lib/server/instructions/update.js +3 -1
  91. package/lib/server/migrations/20221129153547-calculation-variables.d.ts +5 -0
  92. package/lib/server/migrations/20221129153547-calculation-variables.js +116 -0
  93. package/lib/server/triggers/collection.js +5 -7
  94. package/lib/server/triggers/schedule.js +17 -6
  95. package/package.json +13 -8
@@ -1,224 +1,228 @@
1
- export declare const executionSchema: {
2
- provider: {
1
+ export declare const executionCollection: {
2
+ name: string;
3
+ fields: {
4
+ interface: string;
3
5
  type: string;
4
- 'x-decorator': string;
5
- 'x-decorator-props': {
6
- collection: {
7
- name: string;
8
- fields: {
9
- interface: string;
10
- type: string;
6
+ name: string;
7
+ uiSchema: import("@formily/react").Stringify<{
8
+ [key: symbol]: any;
9
+ [key: `x-${string}`]: any;
10
+ [key: `x-${number}`]: any;
11
+ version?: string;
12
+ name?: import("@formily/react").SchemaKey;
13
+ title?: any;
14
+ description?: any;
15
+ default?: any;
16
+ readOnly?: boolean;
17
+ writeOnly?: boolean;
18
+ type?: import("@formily/react").SchemaTypes;
19
+ enum?: import("@formily/react").SchemaEnum<any>;
20
+ const?: any;
21
+ multipleOf?: number;
22
+ maximum?: number;
23
+ exclusiveMaximum?: number;
24
+ minimum?: number;
25
+ exclusiveMinimum?: number;
26
+ maxLength?: number;
27
+ minLength?: number;
28
+ pattern?: string | RegExp;
29
+ maxItems?: number;
30
+ minItems?: number;
31
+ uniqueItems?: boolean;
32
+ maxProperties?: number;
33
+ minProperties?: number;
34
+ required?: string | boolean | string[];
35
+ format?: string;
36
+ $ref?: string;
37
+ $namespace?: string;
38
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
39
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
40
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
41
+ additionalItems?: import("@formily/react").Stringify<any>;
42
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
43
+ additionalProperties?: import("@formily/react").Stringify<any>;
44
+ "x-value"?: any;
45
+ "x-index"?: number;
46
+ "x-pattern"?: any;
47
+ "x-display"?: any;
48
+ "x-validator"?: any;
49
+ "x-decorator"?: any;
50
+ "x-decorator-props"?: any;
51
+ "x-component"?: any;
52
+ "x-component-props"?: any;
53
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
54
+ "x-content"?: any;
55
+ "x-data"?: any;
56
+ "x-visible"?: boolean;
57
+ "x-hidden"?: boolean;
58
+ "x-disabled"?: boolean;
59
+ "x-editable"?: boolean;
60
+ "x-read-only"?: boolean;
61
+ "x-read-pretty"?: boolean;
62
+ }>;
63
+ }[];
64
+ };
65
+ export declare const executionSchema: {
66
+ type: string;
67
+ name: string;
68
+ title: string;
69
+ 'x-component': string;
70
+ properties: {
71
+ content: {
72
+ type: string;
73
+ 'x-decorator': string;
74
+ 'x-decorator-props': {
75
+ collection: {
11
76
  name: string;
12
- uiSchema: import("@formily/react").Stringify<{
13
- [key: symbol]: any;
14
- [key: `x-${string}`]: any;
15
- [key: `x-${number}`]: any;
16
- version?: string;
17
- name?: import("@formily/react").SchemaKey;
18
- title?: any;
19
- description?: any;
20
- default?: any;
21
- readOnly?: boolean;
22
- writeOnly?: boolean;
23
- type?: import("@formily/react").SchemaTypes;
24
- enum?: import("@formily/react").SchemaEnum<any>;
25
- const?: any;
26
- multipleOf?: number;
27
- maximum?: number;
28
- exclusiveMaximum?: number;
29
- minimum?: number;
30
- exclusiveMinimum?: number;
31
- maxLength?: number;
32
- minLength?: number;
33
- pattern?: string | RegExp;
34
- maxItems?: number;
35
- minItems?: number;
36
- uniqueItems?: boolean;
37
- maxProperties?: number;
38
- minProperties?: number;
39
- required?: string | boolean | string[];
40
- format?: string;
41
- $ref?: string;
42
- $namespace?: string;
43
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
44
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
45
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
46
- additionalItems?: import("@formily/react").Stringify<any>;
47
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
48
- additionalProperties?: import("@formily/react").Stringify<any>;
49
- "x-value"?: any;
50
- "x-index"?: number;
51
- "x-pattern"?: any;
52
- "x-display"?: any;
53
- "x-validator"?: any;
54
- "x-decorator"?: any;
55
- "x-decorator-props"?: any;
56
- "x-component"?: any;
57
- "x-component-props"?: any;
58
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
59
- "x-content"?: any;
60
- "x-data"?: any;
61
- "x-visible"?: boolean;
62
- "x-hidden"?: boolean;
63
- "x-disabled"?: boolean;
64
- "x-editable"?: boolean;
65
- "x-read-only"?: boolean;
66
- "x-read-pretty"?: boolean;
67
- }>;
68
- }[];
69
- };
70
- resourceName: string;
71
- request: {
72
- resource: string;
73
- action: string;
74
- params: {
75
- appends: string[];
76
- pageSize: number;
77
- sort: string[];
77
+ fields: {
78
+ interface: string;
79
+ type: string;
80
+ name: string;
81
+ uiSchema: import("@formily/react").Stringify<{
82
+ [key: symbol]: any;
83
+ [key: `x-${string}`]: any;
84
+ [key: `x-${number}`]: any;
85
+ version?: string;
86
+ name?: import("@formily/react").SchemaKey;
87
+ title?: any;
88
+ description?: any;
89
+ default?: any;
90
+ readOnly?: boolean;
91
+ writeOnly?: boolean;
92
+ type?: import("@formily/react").SchemaTypes;
93
+ enum?: import("@formily/react").SchemaEnum<any>;
94
+ const?: any;
95
+ multipleOf?: number;
96
+ maximum?: number;
97
+ exclusiveMaximum?: number;
98
+ minimum?: number;
99
+ exclusiveMinimum?: number;
100
+ maxLength?: number;
101
+ minLength?: number;
102
+ pattern?: string | RegExp;
103
+ maxItems?: number;
104
+ minItems?: number;
105
+ uniqueItems?: boolean;
106
+ maxProperties?: number;
107
+ minProperties?: number;
108
+ required?: string | boolean | string[];
109
+ format?: string;
110
+ $ref?: string;
111
+ $namespace?: string;
112
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
113
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
114
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
115
+ additionalItems?: import("@formily/react").Stringify<any>;
116
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
117
+ additionalProperties?: import("@formily/react").Stringify<any>;
118
+ "x-value"?: any;
119
+ "x-index"?: number;
120
+ "x-pattern"?: any;
121
+ "x-display"?: any;
122
+ "x-validator"?: any;
123
+ "x-decorator"?: any;
124
+ "x-decorator-props"?: any;
125
+ "x-component"?: any;
126
+ "x-component-props"?: any;
127
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
128
+ "x-content"?: any;
129
+ "x-data"?: any;
130
+ "x-visible"?: boolean;
131
+ "x-hidden"?: boolean;
132
+ "x-disabled"?: boolean;
133
+ "x-editable"?: boolean;
134
+ "x-read-only"?: boolean;
135
+ "x-read-pretty"?: boolean;
136
+ }>;
137
+ }[];
78
138
  };
79
- };
80
- };
81
- 'x-component': string;
82
- 'x-component-props': {
83
- collection: {
84
- name: string;
85
- fields: {
86
- interface: string;
87
- type: string;
88
- name: string;
89
- uiSchema: import("@formily/react").Stringify<{
90
- [key: symbol]: any;
91
- [key: `x-${string}`]: any;
92
- [key: `x-${number}`]: any;
93
- version?: string;
94
- name?: import("@formily/react").SchemaKey;
95
- title?: any;
96
- description?: any;
97
- default?: any;
98
- readOnly?: boolean;
99
- writeOnly?: boolean;
100
- type?: import("@formily/react").SchemaTypes;
101
- enum?: import("@formily/react").SchemaEnum<any>;
102
- const?: any;
103
- multipleOf?: number;
104
- maximum?: number;
105
- exclusiveMaximum?: number;
106
- minimum?: number;
107
- exclusiveMinimum?: number;
108
- maxLength?: number;
109
- minLength?: number;
110
- pattern?: string | RegExp;
111
- maxItems?: number;
112
- minItems?: number;
113
- uniqueItems?: boolean;
114
- maxProperties?: number;
115
- minProperties?: number;
116
- required?: string | boolean | string[];
117
- format?: string;
118
- $ref?: string;
119
- $namespace?: string;
120
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
121
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
122
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
123
- additionalItems?: import("@formily/react").Stringify<any>;
124
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
125
- additionalProperties?: import("@formily/react").Stringify<any>;
126
- "x-value"?: any;
127
- "x-index"?: number;
128
- "x-pattern"?: any;
129
- "x-display"?: any;
130
- "x-validator"?: any;
131
- "x-decorator"?: any;
132
- "x-decorator-props"?: any;
133
- "x-component"?: any;
134
- "x-component-props"?: any;
135
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
136
- "x-content"?: any;
137
- "x-data"?: any;
138
- "x-visible"?: boolean;
139
- "x-hidden"?: boolean;
140
- "x-disabled"?: boolean;
141
- "x-editable"?: boolean;
142
- "x-read-only"?: boolean;
143
- "x-read-pretty"?: boolean;
144
- }>;
145
- }[];
146
- };
147
- };
148
- properties: {
149
- actions: {
150
- type: string;
151
- 'x-component': string;
152
- 'x-component-props': {
153
- style: {
154
- marginBottom: number;
139
+ resourceName: string;
140
+ request: {
141
+ resource: string;
142
+ action: string;
143
+ params: {
144
+ appends: string[];
145
+ pageSize: number;
146
+ sort: string[];
147
+ filter: {};
155
148
  };
156
149
  };
157
- properties: {};
158
150
  };
159
- table: {
160
- type: string;
161
- 'x-component': string;
162
- 'x-component-props': {
163
- rowKey: string;
164
- useDataSource: string;
151
+ properties: {
152
+ actions: {
153
+ type: string;
154
+ 'x-component': string;
155
+ 'x-component-props': {
156
+ style: {
157
+ marginBottom: number;
158
+ };
159
+ };
160
+ properties: {};
165
161
  };
166
- properties: {
167
- createdAt: {
168
- type: string;
169
- 'x-decorator': string;
170
- 'x-component': string;
171
- properties: {
172
- createdAt: {
173
- type: string;
174
- 'x-component': string;
175
- 'x-component-props': {
176
- showTime: boolean;
162
+ table: {
163
+ type: string;
164
+ 'x-component': string;
165
+ 'x-component-props': {
166
+ rowKey: string;
167
+ useDataSource: string;
168
+ };
169
+ properties: {
170
+ createdAt: {
171
+ type: string;
172
+ 'x-decorator': string;
173
+ 'x-component': string;
174
+ properties: {
175
+ createdAt: {
176
+ type: string;
177
+ 'x-component': string;
178
+ 'x-component-props': {
179
+ showTime: boolean;
180
+ };
181
+ 'x-read-pretty': boolean;
177
182
  };
178
- 'x-read-pretty': boolean;
179
183
  };
180
184
  };
181
- };
182
- workflowId: {
183
- type: string;
184
- 'x-decorator': string;
185
- 'x-component': string;
186
- properties: {
187
- workflowId: {
188
- type: string;
189
- 'x-component': string;
190
- 'x-read-pretty': boolean;
185
+ workflowId: {
186
+ type: string;
187
+ 'x-decorator': string;
188
+ 'x-component': string;
189
+ properties: {
190
+ workflowId: {
191
+ type: string;
192
+ 'x-component': string;
193
+ 'x-read-pretty': boolean;
194
+ };
191
195
  };
192
196
  };
193
- };
194
- status: {
195
- type: string;
196
- 'x-decorator': string;
197
- 'x-component': string;
198
- properties: {
199
- status: {
200
- type: string;
201
- 'x-component': string;
202
- 'x-read-pretty': boolean;
197
+ status: {
198
+ type: string;
199
+ 'x-decorator': string;
200
+ 'x-component': string;
201
+ properties: {
202
+ status: {
203
+ type: string;
204
+ 'x-component': string;
205
+ 'x-read-pretty': boolean;
206
+ };
203
207
  };
204
208
  };
205
- };
206
- actions: {
207
- type: string;
208
- title: string;
209
- 'x-component': string;
210
- properties: {
211
- actions: {
212
- type: string;
213
- 'x-component': string;
214
- 'x-component-props': {
215
- split: string;
216
- };
217
- properties: {
218
- config: {
219
- type: string;
220
- title: string;
221
- 'x-component': string;
209
+ actions: {
210
+ type: string;
211
+ title: string;
212
+ 'x-component': string;
213
+ properties: {
214
+ actions: {
215
+ type: string;
216
+ 'x-component': string;
217
+ 'x-component-props': {
218
+ split: string;
219
+ };
220
+ properties: {
221
+ config: {
222
+ type: string;
223
+ title: string;
224
+ 'x-component': string;
225
+ };
222
226
  };
223
227
  };
224
228
  };