@tachybase/module-workflow 1.6.0 → 1.6.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 (64) hide show
  1. package/dist/client/components/ColletionTreeSelect.d.ts +16 -0
  2. package/dist/client/components/EnabledStatusFilter.d.ts +2 -0
  3. package/dist/client/components/index.d.ts +1 -0
  4. package/dist/client/features/script/Script.instruction.d.ts +136 -0
  5. package/dist/client/features/script/ScriptCodeEditor.d.ts +9 -0
  6. package/dist/client/features/script/SyncRemoteCodeButton.d.ts +6 -0
  7. package/dist/client/features/trigger-instruction/TriggerInstruction.d.ts +164 -5
  8. package/dist/client/index.js +85 -59
  9. package/dist/client/nodes/select.d.ts +235 -0
  10. package/dist/externalVersion.js +9 -9
  11. package/dist/locale/en-US.json +47 -1
  12. package/dist/locale/es-ES.json +17 -1
  13. package/dist/locale/fr-FR.json +16 -0
  14. package/dist/locale/ja-JP.json +17 -1
  15. package/dist/locale/ko_KR.json +17 -1
  16. package/dist/locale/pt-BR.json +17 -1
  17. package/dist/locale/ru-RU.json +18 -2
  18. package/dist/locale/tr-TR.json +18 -2
  19. package/dist/locale/zh-CN.json +50 -1
  20. package/dist/node_modules/@babel/core/lib/index.js +77 -77
  21. package/dist/node_modules/@babel/core/node_modules/.bin/parser +4 -4
  22. package/dist/node_modules/@babel/core/package.json +1 -1
  23. package/dist/node_modules/@babel/preset-env/lib/index.js +88 -88
  24. package/dist/node_modules/@babel/preset-env/package.json +1 -1
  25. package/dist/node_modules/@babel/preset-react/lib/index.js +80 -80
  26. package/dist/node_modules/@babel/preset-react/package.json +1 -1
  27. package/dist/node_modules/@babel/preset-typescript/lib/index.js +77 -77
  28. package/dist/node_modules/@babel/preset-typescript/package.json +1 -1
  29. package/dist/node_modules/cron-parser/package.json +1 -1
  30. package/dist/node_modules/form-data/package.json +1 -1
  31. package/dist/node_modules/jsonata/package.json +1 -1
  32. package/dist/node_modules/lru-cache/package.json +1 -1
  33. package/dist/node_modules/mime-types/package.json +1 -1
  34. package/dist/node_modules/qrcode/package.json +1 -1
  35. package/dist/server/Plugin.js +57 -1
  36. package/dist/server/actions/executions.d.ts +3 -3
  37. package/dist/server/actions/executions.js +33 -33
  38. package/dist/server/actions/index.js +3 -2
  39. package/dist/server/actions/nodes.d.ts +13 -6
  40. package/dist/server/actions/nodes.js +160 -34
  41. package/dist/server/actions/workflows.d.ts +9 -9
  42. package/dist/server/actions/workflows.helpers.d.ts +6 -6
  43. package/dist/server/actions/workflows.helpers.js +14 -14
  44. package/dist/server/actions/workflows.js +85 -85
  45. package/dist/server/features/interception/RequestInterceptionTrigger.d.ts +1 -1
  46. package/dist/server/features/interception/RequestInterceptionTrigger.js +12 -12
  47. package/dist/server/features/manual/actions.d.ts +1 -1
  48. package/dist/server/features/manual/actions.js +12 -12
  49. package/dist/server/features/notice/actions.js +19 -19
  50. package/dist/server/features/notice/plugin.js +0 -3
  51. package/dist/server/features/omni-trigger/CustomActionTrigger.d.ts +2 -2
  52. package/dist/server/features/omni-trigger/CustomActionTrigger.js +27 -27
  53. package/dist/server/features/script/script.instruction.js +146 -4
  54. package/dist/server/features/trigger-instruction/TriggerInstruction.d.ts +4 -0
  55. package/dist/server/features/trigger-instruction/TriggerInstruction.js +71 -5
  56. package/dist/server/instructions/SelectInstruction.d.ts +13 -0
  57. package/dist/server/instructions/SelectInstruction.js +126 -0
  58. package/dist/server/services/remote-code-fetcher.d.ts +48 -0
  59. package/dist/server/services/remote-code-fetcher.js +370 -0
  60. package/dist/server/utils/get-remote-code-fetcher.d.ts +7 -0
  61. package/dist/server/utils/get-remote-code-fetcher.js +39 -0
  62. package/package.json +12 -12
  63. package/dist/server/features/trigger-instruction/index.d.ts +0 -0
  64. package/dist/server/features/trigger-instruction/index.js +0 -0
@@ -0,0 +1,16 @@
1
+ import { TreeSelectProps } from 'antd';
2
+ export type CollectionSelectProps = {
3
+ value: string[] | string;
4
+ onChange: (value: string[] | string) => void;
5
+ title?: string;
6
+ multiple?: boolean;
7
+ filter?(field: any): boolean;
8
+ collection?: string;
9
+ needLeaf?: boolean;
10
+ useCollection?(props: Pick<CollectionSelectProps, 'collection'>): string;
11
+ rootOption?: {
12
+ label: string;
13
+ value: string;
14
+ };
15
+ };
16
+ export declare const CollectionTreeSelect: (props: Omit<TreeSelectProps, "suffixIcon"> & CollectionSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EnabledStatusFilter: React.MemoExoticComponent<import("@tachybase/schema").ReactFC<unknown>>;
@@ -16,3 +16,4 @@ export * from './ExecutionLink';
16
16
  export * from './ExecutionRetryAction';
17
17
  export * from './ColumnExecutedTime';
18
18
  export * from './WorkflowCategoryColumn';
19
+ export * from './EnabledStatusFilter';
@@ -91,6 +91,140 @@ export declare class ScriptInstruction extends Instruction {
91
91
  }[];
92
92
  default: string;
93
93
  };
94
+ codeSource: {
95
+ type: string;
96
+ title: string;
97
+ 'x-decorator': string;
98
+ 'x-component': string;
99
+ default: string;
100
+ enum: {
101
+ label: string;
102
+ value: string;
103
+ }[];
104
+ };
105
+ codeType: {
106
+ type: string;
107
+ title: string;
108
+ 'x-decorator': string;
109
+ 'x-component': string;
110
+ default: string;
111
+ enum: {
112
+ label: string;
113
+ value: string;
114
+ }[];
115
+ 'x-reactions': {
116
+ dependencies: string[];
117
+ fulfill: {
118
+ state: {
119
+ visible: string;
120
+ };
121
+ };
122
+ }[];
123
+ };
124
+ codeUrl: {
125
+ type: string;
126
+ title: string;
127
+ 'x-decorator': string;
128
+ 'x-component': string;
129
+ 'x-component-props': {
130
+ placeholder: string;
131
+ };
132
+ 'x-reactions': {
133
+ dependencies: string[];
134
+ fulfill: {
135
+ state: {
136
+ visible: string;
137
+ required: string;
138
+ };
139
+ schema: {
140
+ 'x-validator': string;
141
+ };
142
+ };
143
+ }[];
144
+ };
145
+ codeBranch: {
146
+ type: string;
147
+ title: string;
148
+ 'x-decorator': string;
149
+ 'x-component': string;
150
+ default: string;
151
+ 'x-component-props': {
152
+ placeholder: string;
153
+ };
154
+ 'x-reactions': {
155
+ dependencies: string[];
156
+ fulfill: {
157
+ state: {
158
+ visible: string;
159
+ };
160
+ };
161
+ }[];
162
+ };
163
+ syncRemoteCodeButton: {
164
+ type: string;
165
+ 'x-component': string;
166
+ 'x-reactions': {
167
+ dependencies: string[];
168
+ fulfill: {
169
+ state: {
170
+ visible: string;
171
+ };
172
+ };
173
+ }[];
174
+ };
175
+ codeAuthType: {
176
+ type: string;
177
+ title: string;
178
+ 'x-decorator': string;
179
+ 'x-component': string;
180
+ default: string;
181
+ enum: {
182
+ label: string;
183
+ value: string;
184
+ }[];
185
+ 'x-reactions': {
186
+ dependencies: string[];
187
+ fulfill: {
188
+ state: {
189
+ visible: string;
190
+ };
191
+ };
192
+ }[];
193
+ };
194
+ codeAuthToken: {
195
+ type: string;
196
+ title: string;
197
+ 'x-decorator': string;
198
+ 'x-component': string;
199
+ 'x-component-props': {
200
+ placeholder: string;
201
+ };
202
+ 'x-reactions': {
203
+ dependencies: string[];
204
+ fulfill: {
205
+ state: {
206
+ visible: string;
207
+ };
208
+ };
209
+ }[];
210
+ };
211
+ codeAuthUsername: {
212
+ type: string;
213
+ title: string;
214
+ 'x-decorator': string;
215
+ 'x-component': string;
216
+ 'x-component-props': {
217
+ placeholder: string;
218
+ };
219
+ 'x-reactions': {
220
+ dependencies: string[];
221
+ fulfill: {
222
+ state: {
223
+ visible: string;
224
+ };
225
+ };
226
+ }[];
227
+ };
94
228
  code: {
95
229
  type: string;
96
230
  title: string;
@@ -193,6 +327,8 @@ export declare class ScriptInstruction extends Instruction {
193
327
  Addition: import("@tachybase/schema").ReactFC<import("@tego/client").IArrayBaseAdditionProps>;
194
328
  };
195
329
  WorkflowVariableInput: typeof WorkflowVariableInput;
330
+ SyncRemoteCodeButton: import("react").FC<{}>;
331
+ ScriptCodeEditor: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
196
332
  };
197
333
  useVariables(node: any, options: any): VariableOption;
198
334
  }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ /**
3
+ * 工作流脚本节点的代码编辑器
4
+ * 支持自动补全和远程代码同步
5
+ *
6
+ * 注意:Monaco Editor 的资源加载配置由 desktop 应用的 preload 脚本处理
7
+ * 如果 Monaco Editor 无法加载,会自动降级到 TextArea 以确保功能可用
8
+ */
9
+ export declare const ScriptCodeEditor: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /**
3
+ * 同步远程代码按钮(用于工作流脚本节点)
4
+ * 从远程地址获取代码并填充到代码编辑器中
5
+ */
6
+ export declare const SyncRemoteCodeButton: React.FC;
@@ -1,3 +1,4 @@
1
+ import { VariableOption, WorkflowVariableInput } from '../..';
1
2
  import { Instruction } from '../../nodes/default-node/interface';
2
3
  /** 节点: 工作流 */
3
4
  export declare class TriggerInstruction extends Instruction {
@@ -7,6 +8,77 @@ export declare class TriggerInstruction extends Instruction {
7
8
  icon: string;
8
9
  color: string;
9
10
  fieldset: {
11
+ sourceArray: {
12
+ type: string;
13
+ title: string;
14
+ description: string;
15
+ 'x-decorator': string;
16
+ 'x-component': string;
17
+ items: {
18
+ type: string;
19
+ properties: {
20
+ keyName: {
21
+ type: string;
22
+ 'x-component': string;
23
+ 'x-component-props': {
24
+ title: string;
25
+ };
26
+ properties: {
27
+ keyName: {
28
+ type: string;
29
+ name: string;
30
+ 'x-decorator': string;
31
+ 'x-component': string;
32
+ };
33
+ };
34
+ };
35
+ sourcePath: {
36
+ type: string;
37
+ 'x-component': string;
38
+ 'x-component-props': {
39
+ title: string;
40
+ };
41
+ properties: {
42
+ sourcePath: {
43
+ type: string;
44
+ name: string;
45
+ required: boolean;
46
+ 'x-decorator': string;
47
+ 'x-component': string;
48
+ 'x-component-props': {
49
+ changeOnSelect: boolean;
50
+ };
51
+ };
52
+ };
53
+ };
54
+ operations: {
55
+ type: string;
56
+ 'x-component': string;
57
+ 'x-component-props': {
58
+ dataIndex: string;
59
+ fixed: string;
60
+ className: string;
61
+ };
62
+ properties: {
63
+ remove: {
64
+ type: string;
65
+ 'x-component': string;
66
+ };
67
+ };
68
+ };
69
+ };
70
+ };
71
+ properties: {
72
+ add: {
73
+ type: string;
74
+ title: string;
75
+ 'x-component': string;
76
+ 'x-component-props': {
77
+ defaultValue: {};
78
+ };
79
+ };
80
+ };
81
+ };
10
82
  workflowKey: {
11
83
  type: string;
12
84
  title: string;
@@ -86,10 +158,97 @@ export declare class TriggerInstruction extends Instruction {
86
158
  };
87
159
  }[];
88
160
  };
161
+ model: {
162
+ type: string;
163
+ title: string;
164
+ description: string;
165
+ 'x-decorator': string;
166
+ 'x-component': string;
167
+ items: {
168
+ type: string;
169
+ properties: {
170
+ path: {
171
+ type: string;
172
+ 'x-component': string;
173
+ 'x-component-props': {
174
+ title: string;
175
+ };
176
+ properties: {
177
+ path: {
178
+ type: string;
179
+ name: string;
180
+ required: boolean;
181
+ 'x-decorator': string;
182
+ 'x-component': string;
183
+ };
184
+ };
185
+ };
186
+ alias: {
187
+ type: string;
188
+ 'x-component': string;
189
+ 'x-component-props': {
190
+ title: string;
191
+ };
192
+ properties: {
193
+ alias: {
194
+ type: string;
195
+ name: string;
196
+ 'x-decorator': string;
197
+ 'x-component': string;
198
+ };
199
+ };
200
+ };
201
+ label: {
202
+ type: string;
203
+ 'x-component': string;
204
+ 'x-component-props': {
205
+ title: string;
206
+ };
207
+ properties: {
208
+ label: {
209
+ type: string;
210
+ name: string;
211
+ required: boolean;
212
+ 'x-decorator': string;
213
+ 'x-component': string;
214
+ };
215
+ };
216
+ };
217
+ operations: {
218
+ type: string;
219
+ 'x-component': string;
220
+ 'x-component-props': {
221
+ dataIndex: string;
222
+ fixed: string;
223
+ className: string;
224
+ };
225
+ properties: {
226
+ remove: {
227
+ type: string;
228
+ 'x-component': string;
229
+ };
230
+ };
231
+ };
232
+ };
233
+ };
234
+ properties: {
235
+ add: {
236
+ type: string;
237
+ title: string;
238
+ 'x-component': string;
239
+ 'x-component-props': {
240
+ defaultValue: {};
241
+ };
242
+ };
243
+ };
244
+ };
245
+ };
246
+ components: {
247
+ ArrayTable: import("@tachybase/schema").ReactFC<import("antd").TableProps<any>> & import("@tego/client").ArrayBaseMixins & {
248
+ Column: import("@tachybase/schema").ReactFC<import("antd").TableColumnProps<any>>;
249
+ Addition: import("@tachybase/schema").ReactFC<import("@tego/client").IArrayBaseAdditionProps>;
250
+ };
251
+ WorkflowVariableInput: typeof WorkflowVariableInput;
89
252
  };
90
- useVariables({ key: name, title, config }: {
91
- key: any;
92
- title: any;
93
- config: any;
94
- }, options: any): import("../..").VariableOption;
253
+ useVariables(node: any, options: any): VariableOption;
95
254
  }