@nocobase/plugin-workflow-mailer 2.1.11 → 2.2.0-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/client-v2.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client-v2';
2
+ export { default } from './dist/client-v2';
package/client-v2.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client-v2/index.js');
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_workflow_mailer=self.webpackChunk_nocobase_plugin_workflow_mailer||[]).push([["610"],{649:function(e,t,r){r.d(t,{MailerFieldset:function(){return j}});var n=r(375),l=r(799),a=r(428),o=r(155),i=r.n(o);"u">typeof window&&void 0!==window.document&&window.document.createElement;let c=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[c.Translate.toString(e),c.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}});var u=r(197),m=r(59),s="html",d="text",f=["string"],p=["string"],b=["string"],g=[["string",{type:"password"}]],v=[["number",{min:1,max:65535,step:1}]],E=["boolean"];function y(e,t){var r,n,l=t.collectionManager;if(!e.target||e.isForeignKey)return!1;var a=null==l||null==(r=l.getCollection)?void 0:r.call(l,e.target);return(null==a?void 0:a.template)==="file"||(null==a||null==(n=a.options)?void 0:n.template)==="file"}var h=r(488);function w(e,t,r,n,l,a,o){try{var i=e[a](o),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,l)}var k=i().createContext(null);function S(e){var t,r,l=e.disabled,a=(0,h.kj)(),o=i().useContext(k);return i().createElement(m.Button,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ref:l||null==o?void 0:o.setActivatorNodeRef,"aria-label":a("Drag sort"),disabled:l,icon:i().createElement(n.MenuOutlined,null),type:"text"},l?{}:null==o?void 0:o.attributes,l?{}:null==o?void 0:o.listeners),r=r={style:{color:"var(--ant-color-text-tertiary)",cursor:l?"not-allowed":"grab"}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))}function O(e){var t=e.children,r=e.disabled,n=e.id,l=(0,a.useSortable)({disabled:r,id:n}),o=l.attributes,u=l.isDragging,s=l.listeners,d=l.setActivatorNodeRef,f=l.setNodeRef,p=l.transform,b=l.transition,g=m.theme.useToken().token;return i().createElement(k.Provider,{value:{attributes:o,listeners:s,setActivatorNodeRef:d}},i().createElement(m.Row,{ref:f,gutter:g.marginXS,align:"middle",style:{position:u?"relative":void 0,zIndex:u?1:void 0,transform:c.Transform.toString(p),transition:b}},t))}function C(e){var t=e.name,r=e.label,o=e.required,c=(0,h.kj)(),s=m.Form.useFormInstance(),d=(0,l.useSensors)((0,l.useSensor)(l.PointerSensor)),p=i().useRef(!1),b=function(){p.current=!0,setTimeout(function(){p.current=!1})};return i().createElement(m.Form.Item,{label:r,required:o},i().createElement(m.Form.List,{name:t,rules:[{validator:function(e,t){var r;return(r=function(){return function(e,t){var r,n,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(o,"next",{value:c(0)}),i(o,"throw",{value:c(1)}),i(o,"return",{value:c(2)}),"function"==typeof Symbol&&i(o,Symbol.iterator,{value:function(){return this}}),o;function c(i){return function(c){var u=[i,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(l=2&u[0]?n.return:u[0]?n.throw||((l=n.return)&&l.call(n),0):n.next)&&!(l=l.call(n,u[1])).done)return l;switch(n=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(l=(l=a.trys).length>0&&l[l.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){a.label=u[1];break}if(6===u[0]&&a.label<l[1]){a.label=l[1],l=u;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(u);break}l[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){if(!o||(null==t?void 0:t.filter(Boolean).length))return[2];if(p.current)return p.current=!1,[2];throw Error(c("Please enter at least one email address"))})},function(){var e=this,t=arguments;return new Promise(function(n,l){var a=r.apply(e,t);function o(e){w(a,n,l,o,i,"next",e)}function i(e){w(a,n,l,o,i,"throw",e)}o(void 0)})})()}}]},function(e,r,o){var p=r.add,g=r.move,v=r.remove,E=o.errors,y=e.map(function(e){return String(e.key)});return i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},i().createElement(l.DndContext,{sensors:d,collisionDetection:l.closestCenter,onDragEnd:function(e){var t=e.active,r=e.over;if(r&&t.id!==r.id){var n=y.indexOf(String(t.id)),l=y.indexOf(String(r.id));n<0||l<0||g(n,l)}}},i().createElement(a.SortableContext,{items:y,strategy:a.verticalListSortingStrategy},i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},e.map(function(t){return i().createElement(O,{key:t.key,id:String(t.key),disabled:e.length<2},i().createElement(m.Col,null,i().createElement(S,{disabled:e.length<2})),i().createElement(m.Col,{flex:"auto"},i().createElement(m.Form.Item,{name:t.name,noStyle:!0},i().createElement(u.WorkflowTypedVariableInput,{types:f,placeholder:c("Email address")}))),i().createElement(m.Col,null,i().createElement(m.Button,{"aria-label":c("Delete"),icon:i().createElement(n.DeleteOutlined,null),onClick:function(){return v(t.name)}})))})))),i().createElement(m.Button,{block:!0,icon:i().createElement(n.PlusOutlined,null),onClick:function(){b(),p(""),s.setFields([{name:t,errors:[]}])}},c("Add email address")),i().createElement(m.Form.ErrorList,{errors:E}))}))}function x(){var e=(0,h.kj)(),t=(0,l.useSensors)((0,l.useSensor)(l.PointerSensor)),r={types:[y]};return i().createElement(m.Form.Item,{label:e("Attachments"),extra:e("Only variables that resolve to file collection records are supported.")},i().createElement(m.Form.List,{name:["config","attachments"]},function(o,c){var s=c.add,d=c.move,f=c.remove,p=o.map(function(e){return String(e.key)});return i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},i().createElement(l.DndContext,{sensors:t,collisionDetection:l.closestCenter,onDragEnd:function(e){var t=e.active,r=e.over;if(r&&t.id!==r.id){var n=p.indexOf(String(t.id)),l=p.indexOf(String(r.id));n<0||l<0||d(n,l)}}},i().createElement(a.SortableContext,{items:p,strategy:a.verticalListSortingStrategy},i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},o.map(function(t){return i().createElement(O,{key:t.key,id:String(t.key),disabled:o.length<2},i().createElement(m.Col,null,i().createElement(S,{disabled:o.length<2})),i().createElement(m.Col,{flex:"auto"},i().createElement(m.Form.Item,{name:t.name,noStyle:!0},i().createElement(u.WorkflowVariableInput,{variableOptions:r,placeholder:e("File record")}))),i().createElement(m.Col,null,i().createElement(m.Button,{"aria-label":e("Delete"),icon:i().createElement(n.DeleteOutlined,null),onClick:function(){return f(t.name)}})))})))),i().createElement(m.Button,{block:!0,icon:i().createElement(n.PlusOutlined,null),onClick:function(){return s(null)}},e("Add attachment")))}))}function F(){var e=(0,h.kj)(),t=m.theme.useToken().token;return i().createElement(i().Fragment,null,i().createElement(m.Row,{gutter:t.marginSM},i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","host"],label:e("SMTP host"),rules:[{required:!0}],initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:p,placeholder:"smtp.example.com"}))),i().createElement(m.Col,{span:6},i().createElement(m.Form.Item,{name:["config","provider","port"],label:e("Port"),rules:[{required:!0}],initialValue:465},i().createElement(u.WorkflowTypedVariableInput,{types:v}))),i().createElement(m.Col,{span:6},i().createElement(m.Form.Item,{name:["config","provider","secure"],label:e("Secure"),extra:e("In most cases, if using port 465, set it to true; otherwise, set it to false."),initialValue:!0},i().createElement(u.WorkflowTypedVariableInput,{types:E})))),i().createElement(m.Row,{gutter:t.marginSM},i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","auth","user"],label:e("User"),initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:b,placeholder:"example@domain.com"}))),i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","auth","pass"],label:e("Password"),initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:g})))))}function I(){var e,t=(0,h.kj)(),r=m.Form.useFormInstance();return(null!=(e=m.Form.useWatch(["config","contentType"],r))?e:s)===d?i().createElement(m.Form.Item,{name:["config","text"],label:t("Content")},i().createElement(u.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,"})):i().createElement(m.Form.Item,{name:["config","html"],label:t("Content")},i().createElement(u.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,"}))}function j(){var e=(0,h.kj)();return i().createElement(i().Fragment,null,i().createElement(F,null),i().createElement(m.Form.Item,{name:["config","from"],label:e("From"),rules:[{required:!0}],initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:f,placeholder:"noreply <example@domain.com>"})),i().createElement(C,{name:["config","to"],label:e("To"),required:!0}),i().createElement(C,{name:["config","cc"],label:e("CC")}),i().createElement(C,{name:["config","bcc"],label:e("BCC")}),i().createElement(m.Form.Item,{name:["config","subject"],label:e("Subject")},i().createElement(u.WorkflowVariableInput,null)),i().createElement(m.Form.Item,{name:["config","contentType"],label:e("Content type"),initialValue:s},i().createElement(m.Radio.Group,{options:[{label:"HTML",value:s},{label:e("Plain text"),value:d}]})),i().createElement(I,null),i().createElement(x,null),i().createElement(m.Form.Item,{name:["config","ignoreFail"],valuePropName:"checked"},i().createElement(m.Checkbox,null,e("Ignore failed sending and continue workflow"))))}}}]);
@@ -6,418 +6,6 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import React from 'react';
10
- import { Instruction, WorkflowVariableInput, WorkflowVariableRawTextArea, WorkflowVariableTextArea } from '@nocobase/plugin-workflow/client';
11
- export default class extends Instruction {
12
- title: string;
13
- type: string;
14
- group: string;
15
- description: string;
16
- icon: React.JSX.Element;
17
- fieldset: {
18
- provider: {
19
- type: string;
20
- properties: {
21
- server: {
22
- type: string;
23
- 'x-decorator': string;
24
- 'x-decorator-props': {
25
- value: {
26
- designable: boolean;
27
- };
28
- };
29
- 'x-component': string;
30
- properties: {
31
- row: {
32
- type: string;
33
- 'x-component': string;
34
- properties: {
35
- host: {
36
- type: string;
37
- 'x-component': string;
38
- 'x-component-props': {
39
- width: number;
40
- };
41
- properties: {
42
- host: {
43
- type: string;
44
- required: boolean;
45
- title: string;
46
- 'x-decorator': string;
47
- 'x-component': string;
48
- 'x-component-props': {
49
- useTypedConstant: (string | {
50
- placeholder: string;
51
- })[][];
52
- };
53
- };
54
- };
55
- };
56
- port: {
57
- type: string;
58
- 'x-component': string;
59
- 'x-component-props': {
60
- width: number;
61
- };
62
- properties: {
63
- port: {
64
- type: string;
65
- required: boolean;
66
- title: string;
67
- 'x-decorator': string;
68
- 'x-component': string;
69
- 'x-component-props': {
70
- useTypedConstant: (string | {
71
- min: number;
72
- max: number;
73
- step: number;
74
- })[][];
75
- };
76
- default: number;
77
- };
78
- };
79
- };
80
- secure: {
81
- type: string;
82
- 'x-component': string;
83
- 'x-component-props': {
84
- width: number;
85
- };
86
- properties: {
87
- secure: {
88
- type: string;
89
- title: string;
90
- description: string;
91
- 'x-decorator': string;
92
- 'x-component': string;
93
- 'x-component-props': {
94
- useTypedConstant: (string | {
95
- style: {
96
- width: string;
97
- };
98
- })[][];
99
- };
100
- default: boolean;
101
- };
102
- };
103
- };
104
- };
105
- };
106
- };
107
- };
108
- auth: {
109
- type: string;
110
- 'x-decorator': string;
111
- 'x-decorator-props': {
112
- value: {
113
- designable: boolean;
114
- };
115
- };
116
- 'x-component': string;
117
- properties: {
118
- row: {
119
- type: string;
120
- 'x-component': string;
121
- properties: {
122
- user: {
123
- type: string;
124
- 'x-component': string;
125
- properties: {
126
- 'auth.user': {
127
- type: string;
128
- title: string;
129
- 'x-decorator': string;
130
- 'x-component': string;
131
- 'x-component-props': {
132
- useTypedConstant: (string | {
133
- placeholder: string;
134
- })[][];
135
- };
136
- };
137
- };
138
- };
139
- pass: {
140
- type: string;
141
- 'x-component': string;
142
- properties: {
143
- 'auth.pass': {
144
- type: string;
145
- title: string;
146
- 'x-decorator': string;
147
- 'x-component': string;
148
- 'x-component-props': {
149
- useTypedConstant: (string | {
150
- type: string;
151
- })[][];
152
- };
153
- };
154
- };
155
- };
156
- };
157
- };
158
- };
159
- };
160
- };
161
- };
162
- from: {
163
- type: string;
164
- required: boolean;
165
- title: string;
166
- 'x-decorator': string;
167
- 'x-component': string;
168
- 'x-component-props': {
169
- useTypedConstant: (string | {
170
- placeholder: string;
171
- })[][];
172
- };
173
- };
174
- to: {
175
- type: string;
176
- required: boolean;
177
- title: string;
178
- 'x-decorator': string;
179
- 'x-component': string;
180
- items: {
181
- type: string;
182
- 'x-component': string;
183
- 'x-component-props': {
184
- className: string;
185
- };
186
- properties: {
187
- sort: {
188
- type: string;
189
- 'x-decorator': string;
190
- 'x-component': string;
191
- };
192
- input: {
193
- type: string;
194
- 'x-decorator': string;
195
- 'x-component': string;
196
- 'x-component-props': {
197
- useTypedConstant: string[];
198
- placeholder: string;
199
- };
200
- };
201
- remove: {
202
- type: string;
203
- 'x-decorator': string;
204
- 'x-component': string;
205
- };
206
- };
207
- };
208
- properties: {
209
- add: {
210
- type: string;
211
- title: string;
212
- 'x-component': string;
213
- };
214
- };
215
- };
216
- cc: {
217
- type: string;
218
- title: string;
219
- 'x-decorator': string;
220
- 'x-component': string;
221
- items: {
222
- type: string;
223
- 'x-component': string;
224
- 'x-component-props': {
225
- className: string;
226
- };
227
- properties: {
228
- sort: {
229
- type: string;
230
- 'x-decorator': string;
231
- 'x-component': string;
232
- };
233
- input: {
234
- type: string;
235
- 'x-decorator': string;
236
- 'x-component': string;
237
- 'x-component-props': {
238
- useTypedConstant: string[];
239
- placeholder: string;
240
- };
241
- };
242
- remove: {
243
- type: string;
244
- 'x-decorator': string;
245
- 'x-component': string;
246
- };
247
- };
248
- };
249
- properties: {
250
- add: {
251
- type: string;
252
- title: string;
253
- 'x-component': string;
254
- };
255
- };
256
- };
257
- bcc: {
258
- type: string;
259
- title: string;
260
- 'x-decorator': string;
261
- 'x-component': string;
262
- items: {
263
- type: string;
264
- 'x-component': string;
265
- 'x-component-props': {
266
- className: string;
267
- };
268
- properties: {
269
- sort: {
270
- type: string;
271
- 'x-decorator': string;
272
- 'x-component': string;
273
- };
274
- input: {
275
- type: string;
276
- 'x-decorator': string;
277
- 'x-component': string;
278
- 'x-component-props': {
279
- useTypedConstant: string[];
280
- placeholder: string;
281
- };
282
- };
283
- remove: {
284
- type: string;
285
- 'x-decorator': string;
286
- 'x-component': string;
287
- };
288
- };
289
- };
290
- properties: {
291
- add: {
292
- type: string;
293
- title: string;
294
- 'x-component': string;
295
- };
296
- };
297
- };
298
- subject: {
299
- type: string;
300
- title: string;
301
- 'x-decorator': string;
302
- 'x-component': string;
303
- };
304
- contentType: {
305
- type: string;
306
- title: string;
307
- 'x-decorator': string;
308
- 'x-component': string;
309
- enum: {
310
- label: string;
311
- value: string;
312
- }[];
313
- default: string;
314
- };
315
- html: {
316
- type: string;
317
- title: string;
318
- 'x-decorator': string;
319
- 'x-decorator-props': {};
320
- 'x-component': string;
321
- 'x-component-props': {
322
- placeholder: string;
323
- autoSize: {
324
- minRows: number;
325
- };
326
- };
327
- 'x-reactions': {
328
- dependencies: string[];
329
- fulfill: {
330
- state: {
331
- visible: string;
332
- };
333
- };
334
- }[];
335
- };
336
- text: {
337
- type: string;
338
- title: string;
339
- 'x-decorator': string;
340
- 'x-decorator-props': {};
341
- 'x-component': string;
342
- 'x-component-props': {
343
- placeholder: string;
344
- autoSize: {
345
- minRows: number;
346
- };
347
- };
348
- 'x-reactions': {
349
- dependencies: string[];
350
- fulfill: {
351
- state: {
352
- visible: string;
353
- };
354
- };
355
- }[];
356
- };
357
- attachments: {
358
- type: string;
359
- title: string;
360
- description: string;
361
- 'x-decorator': string;
362
- 'x-component': string;
363
- items: {
364
- type: string;
365
- 'x-component': string;
366
- 'x-component-props': {
367
- className: string;
368
- };
369
- properties: {
370
- sort: {
371
- type: string;
372
- 'x-decorator': string;
373
- 'x-component': string;
374
- };
375
- input: {
376
- type: string;
377
- default: any;
378
- 'x-decorator': string;
379
- 'x-component': string;
380
- 'x-component-props': {
381
- constantAbel: boolean;
382
- variableOptions: {
383
- types: ((field: any, { collectionManager }: {
384
- collectionManager: any;
385
- }) => boolean)[];
386
- };
387
- placeholder: string;
388
- };
389
- };
390
- remove: {
391
- type: string;
392
- 'x-decorator': string;
393
- 'x-component': string;
394
- };
395
- };
396
- };
397
- properties: {
398
- add: {
399
- type: string;
400
- title: string;
401
- 'x-component': string;
402
- };
403
- };
404
- };
405
- ignoreFail: {
406
- type: string;
407
- 'x-content': string;
408
- 'x-decorator': string;
409
- 'x-component': string;
410
- };
411
- };
412
- components: {
413
- ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
414
- Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
415
- type?: "card" | "divide";
416
- }>;
417
- };
418
- SchemaComponentContext: React.Context<import("@nocobase/client").ISchemaComponentContext>;
419
- WorkflowVariableInput: typeof WorkflowVariableInput;
420
- WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
421
- WorkflowVariableRawTextArea: typeof WorkflowVariableRawTextArea;
422
- };
9
+ import V2MailerInstruction from '../client-v2/MailerInstruction';
10
+ export default class extends V2MailerInstruction {
423
11
  }
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["react","react-i18next","@nocobase/client","@ant-design/icons","@nocobase/plugin-workflow/client","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("react"),require("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):e["@nocobase/plugin-workflow-mailer"]=t(e.react,e["react-i18next"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"])}(self,function(e,t,o,r,n,i){return function(){"use strict";var a={375:function(e){e.exports=r},418:function(e){e.exports=i},342:function(e){e.exports=o},990:function(e){e.exports=n},155:function(t){t.exports=e},953:function(e){e.exports=t}},c={};function p(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return a[e](o,o.exports,p),o.exports}p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var o in t)p.o(t,o)&&!p.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(l=p.g.location+"");var l,s=p.g.document;if(!l&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(l=s.currentScript.src),!l)){var u=s.getElementsByTagName("script");if(u.length)for(var m=u.length-1;m>-1&&(!l||!/^http(s?):/.test(l));)l=u[m--].src}if(!l)throw Error("Automatic publicPath is not supported in this browser");p.p=l.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var d={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var o=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");o.indexOf("/static/plugins/@nocobase/plugin-workflow-mailer/dist/client/")>=0&&(e=o.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-mailer/dist/client/")}if(!e){var n=window.__nocobase_modern_client_prefix__||"v",i="/"+(n=String(n).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",c=a.indexOf(i);e=c>=0?a.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+n+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-mailer/dist/client/"}p.p=e}(),!function(){p.r(d),p.d(d,{default:function(){return A}});var e=p(342),t=p(375),o=p(418),r=p(155),n=p.n(r),i=p(990);p(953);var a="workflow-mailer";function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function f(){var e=u(["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"]);return f=function(){return e},e}function y(){var e=u(["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"]);return y=function(){return e},e}var x=(0,e.css)(f()),b=(0,e.css)(y()),v=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function p(){var r,s,u;if(!(this instanceof p))throw TypeError("Cannot call a class as a function");return s=p,u=arguments,s=l(s),c(r=function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(s,u||[],l(this).constructor):s.apply(this,u)),"title",'{{t("Mailer", { ns: "'.concat(a,'" })}}')),c(r,"type","mailer"),c(r,"group","extended"),c(r,"description",'{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "'.concat(a,'" })}}')),c(r,"icon",n().createElement(t.MailOutlined,{style:{}})),c(r,"fieldset",{provider:{type:"object",properties:{server:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{host:{type:"void","x-component":"Grid.Col","x-component-props":{width:50},properties:{host:{type:"string",required:!0,title:'{{t("SMTP host", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"smtp.example.com"}]]}}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{port:{type:"number",required:!0,title:'{{t("Port", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["number",{min:1,max:65535,step:1}]]},default:465}}},secure:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{secure:{type:"boolean",title:'{{t("Secure", { ns: "'.concat(a,'" })}}'),description:'{{t("In most cases, if using port 465, set it to true; otherwise, set it to false.", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["boolean",{style:{width:"100%"}}]]},default:!0}}}}}}},auth:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{user:{type:"void","x-component":"Grid.Col",properties:{"auth.user":{type:"string",title:'{{t("User", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"example@domain.com"}]]}}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",title:'{{t("Password", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{type:"password"}]]}}}}}}}}}},from:{type:"string",required:!0,title:'{{t("From", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"noreply <example@domain.com>"}]]}},to:{type:"array",required:!0,title:'{{t("To", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},subject:{type:"string",title:'{{t("Subject", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:'{{t("Content type", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text", { ns: "'.concat(a,'" })}}'),value:"text"}],default:"html"},html:{type:"string",title:'{{t("Content", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",title:'{{t("Content", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]},attachments:{type:"array",title:'{{t("Attachments", { ns: "'.concat(a,'" })}}'),description:'{{t("Only variables that resolve to file collection records are supported.", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:b},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string",default:null,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{constantAbel:!1,variableOptions:{types:[function(e,t){var o,r=t.collectionManager;if(!e.target||e.isForeignKey)return!1;var n=r.getCollection(e.target);return(null==n?void 0:n.template)==="file"||(null==n||null==(o=n.options)?void 0:o.template)==="file"}]},placeholder:'{{t("File record", { ns: "'.concat(a,'" })}}')}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add attachment", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},ignoreFail:{type:"boolean","x-content":'{{t("Ignore failed sending and continue workflow", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"Checkbox"}}),c(r,"components",{ArrayItems:o.ArrayItems,SchemaComponentContext:e.SchemaComponentContext,WorkflowVariableInput:i.WorkflowVariableInput,WorkflowVariableTextArea:i.WorkflowVariableTextArea,WorkflowVariableRawTextArea:i.WorkflowVariableRawTextArea}),r}return p.prototype=Object.create(r&&r.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),r&&s(p,r),p}(i.Instruction);function h(e,t,o,r,n,i,a){try{var c=e[i](a),p=c.value}catch(e){o(e);return}c.done?t(p):Promise.resolve(p).then(r,n)}function w(e){return function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function a(e){h(i,r,n,a,c,"next",e)}function c(e){h(i,r,n,a,c,"throw",e)}a(void 0)})}}function g(e,t,o){return(g=O()?Reflect.construct:function(e,t,o){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return o&&k(n,o.prototype),n}).apply(null,arguments)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return g(e,arguments,I(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),k(o,e)})(e)}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function S(e,t){var o,r,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:p(0)}),c(a,"throw",{value:p(1)}),c(a,"return",{value:p(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function p(c){return function(p){var l=[c,p];if(o)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&l[0]?r.return:l[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,l[1])).done)return n;switch(r=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){i.label=l[1];break}if(6===l[0]&&i.label<n[1]){i.label=n[1],n=l;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(l);break}n[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{o=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var A=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=I(e),function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,O()?Reflect.construct(e,t||[],I(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&k(o,e),t=[{key:"afterAdd",value:function(){return w(function(){return S(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return w(function(){return S(this,function(e){return[2]})})()}},{key:"load",value:function(){return w(function(){return S(this,function(e){return this.app.pm.get("workflow").registerInstruction("mailer",v),[2]})}).call(this)}}],function(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(_(e.Plugin))}(),d}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@dnd-kit/core"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["@dnd-kit/sortable","react","antd","@nocobase/plugin-workflow/client-v2","@nocobase/client","@dnd-kit/core","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@dnd-kit/core"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-mailer"]=t(e["@dnd-kit/sortable"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@nocobase/client"],e["@dnd-kit/core"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,u,c){return function(){"use strict";var a,l,f,s={488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return u}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="workflow-mailer";function u(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"client"],nsMode:"fallback"},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[i,"client"],nsMode:"fallback"},t))}},375:function(e){e.exports=u},799:function(e){e.exports=i},428:function(t){t.exports=e},342:function(e){e.exports=o},694:function(e){e.exports=c},197:function(e){e.exports=r},59:function(e){e.exports=n},155:function(e){e.exports=t}},p={};function b(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={exports:{}};return s[e](n,n.exports,b),n.exports}b.m=s,b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return""+e+".e6ad06c52afc1ab1.js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},b.l=function(e,t,n,r){if(d[e])return void d[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-mailer:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-mailer:"+n),o.src=e),d[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.g.importScripts&&(y=b.g.location+"");var d,y,h=b.g.document;if(!y&&h&&(h.currentScript&&"SCRIPT"===h.currentScript.tagName.toUpperCase()&&(y=h.currentScript.src),!y)){var v=h.getElementsByTagName("script");if(v.length)for(var w=v.length-1;w>-1&&(!y||!/^http(s?):/.test(y));)y=v[w--].src}if(!y)throw Error("Automatic publicPath is not supported in this browser");b.p=y.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a={889:0},b.f.j=function(e,t){var n=b.o(a,e)?a[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),i=Error();b.l(o,function(t){if(b.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},l=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==a[e]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);u&&u(b)}for(e&&e(t);c<o.length;c++)r=o[c],b.o(a,r)&&a[r]&&a[r][0](),a[r]=0},(f=self.webpackChunk_nocobase_plugin_workflow_mailer=self.webpackChunk_nocobase_plugin_workflow_mailer||[]).forEach(l.bind(null,0)),f.push=l.bind(null,f.push.bind(f));var g={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-mailer/dist/client/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-mailer/dist/client/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",c=u.indexOf(i);e=c>=0?u.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-mailer/dist/client/"}b.p=e}(),!function(){b.r(g),b.d(g,{default:function(){return j}});var e=b(342),t=b(375),n=b(197),r=b(155),o=b.n(r),i=b(488);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var d=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return e=t,n=arguments,e=f(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(e,n||[],f(this).constructor):e.apply(this,n))}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e),t}(function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,r,a;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,a=arguments,r=c(r),u(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(r,a||[],c(this).constructor):r.apply(this,a)),"type","mailer"),u(e,"title",(0,i.MZ)("Mailer")),u(e,"group","extended"),u(e,"description",(0,i.MZ)("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.")),u(e,"icon",o().createElement(t.MailOutlined,null)),u(e,"FieldsetLoader",function(){return b.e("610").then(b.bind(b,649)).then(function(e){return{default:e.MailerFieldset}})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&a(n,e),n}(n.Instruction));function y(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){y(i,r,o,u,c,"next",e)}function c(e){y(i,r,o,u,c,"throw",e)}u(void 0)})}}function v(e,t,n){return(v=O()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&m(o,n.prototype),o}).apply(null,arguments)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,w(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function k(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var j=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=w(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,O()?Reflect.construct(e,t||[],w(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&m(n,e),t=[{key:"afterAdd",value:function(){return h(function(){return k(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return h(function(){return k(this,function(e){return[2]})})()}},{key:"load",value:function(){return h(function(){return k(this,function(e){return this.app.pm.get("workflow").registerInstruction("mailer",d),[2]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(_(e.Plugin))}(),g}()});
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_workflow_mailer_client_v2=self.webpackChunk_nocobase_plugin_workflow_mailer_client_v2||[]).push([["610"],{649:function(e,t,r){r.d(t,{MailerFieldset:function(){return j}});var n=r(375),l=r(799),a=r(428),o=r(155),i=r.n(o);"u">typeof window&&void 0!==window.document&&window.document.createElement;let c=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[c.Translate.toString(e),c.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}});var u=r(197),m=r(59),s="html",d="text",f=["string"],p=["string"],b=["string"],v=[["string",{type:"password"}]],g=[["number",{min:1,max:65535,step:1}]],E=["boolean"];function y(e,t){var r,n,l=t.collectionManager;if(!e.target||e.isForeignKey)return!1;var a=null==l||null==(r=l.getCollection)?void 0:r.call(l,e.target);return(null==a?void 0:a.template)==="file"||(null==a||null==(n=a.options)?void 0:n.template)==="file"}var h=r(488);function w(e,t,r,n,l,a,o){try{var i=e[a](o),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,l)}var k=i().createContext(null);function S(e){var t,r,l=e.disabled,a=(0,h.kj)(),o=i().useContext(k);return i().createElement(m.Button,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ref:l||null==o?void 0:o.setActivatorNodeRef,"aria-label":a("Drag sort"),disabled:l,icon:i().createElement(n.MenuOutlined,null),type:"text"},l?{}:null==o?void 0:o.attributes,l?{}:null==o?void 0:o.listeners),r=r={style:{color:"var(--ant-color-text-tertiary)",cursor:l?"not-allowed":"grab"}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))}function O(e){var t=e.children,r=e.disabled,n=e.id,l=(0,a.useSortable)({disabled:r,id:n}),o=l.attributes,u=l.isDragging,s=l.listeners,d=l.setActivatorNodeRef,f=l.setNodeRef,p=l.transform,b=l.transition,v=m.theme.useToken().token;return i().createElement(k.Provider,{value:{attributes:o,listeners:s,setActivatorNodeRef:d}},i().createElement(m.Row,{ref:f,gutter:v.marginXS,align:"middle",style:{position:u?"relative":void 0,zIndex:u?1:void 0,transform:c.Transform.toString(p),transition:b}},t))}function C(e){var t=e.name,r=e.label,o=e.required,c=(0,h.kj)(),s=m.Form.useFormInstance(),d=(0,l.useSensors)((0,l.useSensor)(l.PointerSensor)),p=i().useRef(!1),b=function(){p.current=!0,setTimeout(function(){p.current=!1})};return i().createElement(m.Form.Item,{label:r,required:o},i().createElement(m.Form.List,{name:t,rules:[{validator:function(e,t){var r;return(r=function(){return function(e,t){var r,n,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(o,"next",{value:c(0)}),i(o,"throw",{value:c(1)}),i(o,"return",{value:c(2)}),"function"==typeof Symbol&&i(o,Symbol.iterator,{value:function(){return this}}),o;function c(i){return function(c){var u=[i,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(l=2&u[0]?n.return:u[0]?n.throw||((l=n.return)&&l.call(n),0):n.next)&&!(l=l.call(n,u[1])).done)return l;switch(n=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(l=(l=a.trys).length>0&&l[l.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){a.label=u[1];break}if(6===u[0]&&a.label<l[1]){a.label=l[1],l=u;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(u);break}l[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){if(!o||(null==t?void 0:t.filter(Boolean).length))return[2];if(p.current)return p.current=!1,[2];throw Error(c("Please enter at least one email address"))})},function(){var e=this,t=arguments;return new Promise(function(n,l){var a=r.apply(e,t);function o(e){w(a,n,l,o,i,"next",e)}function i(e){w(a,n,l,o,i,"throw",e)}o(void 0)})})()}}]},function(e,r,o){var p=r.add,v=r.move,g=r.remove,E=o.errors,y=e.map(function(e){return String(e.key)});return i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},i().createElement(l.DndContext,{sensors:d,collisionDetection:l.closestCenter,onDragEnd:function(e){var t=e.active,r=e.over;if(r&&t.id!==r.id){var n=y.indexOf(String(t.id)),l=y.indexOf(String(r.id));n<0||l<0||v(n,l)}}},i().createElement(a.SortableContext,{items:y,strategy:a.verticalListSortingStrategy},i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},e.map(function(t){return i().createElement(O,{key:t.key,id:String(t.key),disabled:e.length<2},i().createElement(m.Col,null,i().createElement(S,{disabled:e.length<2})),i().createElement(m.Col,{flex:"auto"},i().createElement(m.Form.Item,{name:t.name,noStyle:!0},i().createElement(u.WorkflowTypedVariableInput,{types:f,placeholder:c("Email address")}))),i().createElement(m.Col,null,i().createElement(m.Button,{"aria-label":c("Delete"),icon:i().createElement(n.DeleteOutlined,null),onClick:function(){return g(t.name)}})))})))),i().createElement(m.Button,{block:!0,icon:i().createElement(n.PlusOutlined,null),onClick:function(){b(),p(""),s.setFields([{name:t,errors:[]}])}},c("Add email address")),i().createElement(m.Form.ErrorList,{errors:E}))}))}function x(){var e=(0,h.kj)(),t=(0,l.useSensors)((0,l.useSensor)(l.PointerSensor)),r={types:[y]};return i().createElement(m.Form.Item,{label:e("Attachments"),extra:e("Only variables that resolve to file collection records are supported.")},i().createElement(m.Form.List,{name:["config","attachments"]},function(o,c){var s=c.add,d=c.move,f=c.remove,p=o.map(function(e){return String(e.key)});return i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},i().createElement(l.DndContext,{sensors:t,collisionDetection:l.closestCenter,onDragEnd:function(e){var t=e.active,r=e.over;if(r&&t.id!==r.id){var n=p.indexOf(String(t.id)),l=p.indexOf(String(r.id));n<0||l<0||d(n,l)}}},i().createElement(a.SortableContext,{items:p,strategy:a.verticalListSortingStrategy},i().createElement(m.Space,{direction:"vertical",style:{width:"100%"}},o.map(function(t){return i().createElement(O,{key:t.key,id:String(t.key),disabled:o.length<2},i().createElement(m.Col,null,i().createElement(S,{disabled:o.length<2})),i().createElement(m.Col,{flex:"auto"},i().createElement(m.Form.Item,{name:t.name,noStyle:!0},i().createElement(u.WorkflowVariableInput,{variableOptions:r,placeholder:e("File record")}))),i().createElement(m.Col,null,i().createElement(m.Button,{"aria-label":e("Delete"),icon:i().createElement(n.DeleteOutlined,null),onClick:function(){return f(t.name)}})))})))),i().createElement(m.Button,{block:!0,icon:i().createElement(n.PlusOutlined,null),onClick:function(){return s(null)}},e("Add attachment")))}))}function F(){var e=(0,h.kj)(),t=m.theme.useToken().token;return i().createElement(i().Fragment,null,i().createElement(m.Row,{gutter:t.marginSM},i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","host"],label:e("SMTP host"),rules:[{required:!0}],initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:p,placeholder:"smtp.example.com"}))),i().createElement(m.Col,{span:6},i().createElement(m.Form.Item,{name:["config","provider","port"],label:e("Port"),rules:[{required:!0}],initialValue:465},i().createElement(u.WorkflowTypedVariableInput,{types:g}))),i().createElement(m.Col,{span:6},i().createElement(m.Form.Item,{name:["config","provider","secure"],label:e("Secure"),extra:e("In most cases, if using port 465, set it to true; otherwise, set it to false."),initialValue:!0},i().createElement(u.WorkflowTypedVariableInput,{types:E})))),i().createElement(m.Row,{gutter:t.marginSM},i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","auth","user"],label:e("User"),initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:b,placeholder:"example@domain.com"}))),i().createElement(m.Col,{span:12},i().createElement(m.Form.Item,{name:["config","provider","auth","pass"],label:e("Password"),initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:v})))))}function I(){var e,t=(0,h.kj)(),r=m.Form.useFormInstance();return(null!=(e=m.Form.useWatch(["config","contentType"],r))?e:s)===d?i().createElement(m.Form.Item,{name:["config","text"],label:t("Content")},i().createElement(u.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,"})):i().createElement(m.Form.Item,{name:["config","html"],label:t("Content")},i().createElement(u.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,"}))}function j(){var e=(0,h.kj)();return i().createElement(i().Fragment,null,i().createElement(F,null),i().createElement(m.Form.Item,{name:["config","from"],label:e("From"),rules:[{required:!0}],initialValue:""},i().createElement(u.WorkflowTypedVariableInput,{types:f,placeholder:"noreply <example@domain.com>"})),i().createElement(C,{name:["config","to"],label:e("To"),required:!0}),i().createElement(C,{name:["config","cc"],label:e("CC")}),i().createElement(C,{name:["config","bcc"],label:e("BCC")}),i().createElement(m.Form.Item,{name:["config","subject"],label:e("Subject")},i().createElement(u.WorkflowVariableInput,null)),i().createElement(m.Form.Item,{name:["config","contentType"],label:e("Content type"),initialValue:s},i().createElement(m.Radio.Group,{options:[{label:"HTML",value:s},{label:e("Plain text"),value:d}]})),i().createElement(I,null),i().createElement(x,null),i().createElement(m.Form.Item,{name:["config","ignoreFail"],valuePropName:"checked"},i().createElement(m.Checkbox,null,e("Ignore failed sending and continue workflow"))))}}}]);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Instruction } from '@nocobase/plugin-workflow/client-v2';
10
+ import React from 'react';
11
+ export default class MailerInstruction extends Instruction {
12
+ type: string;
13
+ title: string;
14
+ group: string;
15
+ description: string;
16
+ icon: React.JSX.Element;
17
+ FieldsetLoader: () => Promise<{
18
+ default: typeof import("./components/MailerFieldset").MailerFieldset;
19
+ }>;
20
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare function MailerFieldset(): React.JSX.Element;
11
+ export default MailerFieldset;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { TypedConstantSpec } from '@nocobase/client-v2';
10
+ export declare const CONTENT_TYPE_HTML = "html";
11
+ export declare const CONTENT_TYPE_TEXT = "text";
12
+ export declare const EMAIL_VALUE_TYPES: TypedConstantSpec[];
13
+ export declare const SMTP_HOST_VALUE_TYPES: TypedConstantSpec[];
14
+ export declare const SMTP_USER_VALUE_TYPES: TypedConstantSpec[];
15
+ export declare const SMTP_PASSWORD_VALUE_TYPES: TypedConstantSpec[];
16
+ export declare const SMTP_PORT_VALUE_TYPES: TypedConstantSpec[];
17
+ export declare const SMTP_SECURE_VALUE_TYPES: TypedConstantSpec[];
18
+ type CollectionLike = {
19
+ template?: string;
20
+ options?: {
21
+ template?: string;
22
+ };
23
+ };
24
+ type CollectionManagerLike = {
25
+ getCollection?: (name: string) => CollectionLike | undefined;
26
+ };
27
+ type WorkflowFieldLike = {
28
+ target?: string;
29
+ isForeignKey?: boolean;
30
+ };
31
+ export declare function isFileRecordVariableMatch(field: WorkflowFieldLike, { collectionManager }: {
32
+ collectionManager?: CollectionManagerLike;
33
+ }): boolean;
34
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export { default } from './plugin';
10
+ export * from './plugin';
11
+ export { default as MailerInstruction } from './MailerInstruction';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@dnd-kit/core")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer/client-v2",["@nocobase/client-v2","@dnd-kit/sortable","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine","@dnd-kit/core"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer/client-v2"]=t(require("@nocobase/client-v2"),require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@dnd-kit/core")):e["@nocobase/plugin-workflow-mailer/client-v2"]=t(e["@nocobase/client-v2"],e["@dnd-kit/sortable"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@dnd-kit/core"])}(self,function(e,t,n,r,o,i,c,u){return function(){"use strict";var a,l,f,s={488:function(e,t,n){n.d(t,{MZ:function(){return u},kj:function(){return c}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="workflow-mailer";function c(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"client"],nsMode:"fallback"},n))}}function u(e,t){return(0,r.tExpr)(e,o({ns:[i,"client"],nsMode:"fallback"},t))}},375:function(e){e.exports=i},799:function(e){e.exports=u},428:function(e){e.exports=t},485:function(t){t.exports=e},694:function(e){e.exports=c},197:function(e){e.exports=o},59:function(e){e.exports=r},155:function(e){e.exports=n}},p={};function b(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={exports:{}};return s[e](n,n.exports,b),n.exports}b.m=s,b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return""+e+".04726b64ccb8466a.js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},b.l=function(e,t,n,r){if(d[e])return void d[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var a=c[u];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-mailer/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-mailer/client-v2:"+n),o.src=e),d[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.g.importScripts&&(v=b.g.location+"");var d,v,y=b.g.document;if(!v&&y&&(y.currentScript&&"SCRIPT"===y.currentScript.tagName.toUpperCase()&&(v=y.currentScript.src),!v)){var h=y.getElementsByTagName("script");if(h.length)for(var w=h.length-1;w>-1&&(!v||!/^http(s?):/.test(v));)v=h[w--].src}if(!v)throw Error("Automatic publicPath is not supported in this browser");b.p=v.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a={889:0},b.f.j=function(e,t){var n=b.o(a,e)?a[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),i=Error();b.l(o,function(t){if(b.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},l=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);c&&c(b)}for(e&&e(t);u<o.length;u++)r=o[u],b.o(a,r)&&a[r]&&a[r][0](),a[r]=0},(f=self.webpackChunk_nocobase_plugin_workflow_mailer_client_v2=self.webpackChunk_nocobase_plugin_workflow_mailer_client_v2||[]).forEach(l.bind(null,0)),f.push=l.bind(null,f.push.bind(f));var g={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-mailer/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-mailer/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",u=c.indexOf(i);e=u>=0?c.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-mailer/dist/client-v2/"}b.p=e}(),!function(){b.r(g),b.d(g,{MailerInstruction:function(){return f},default:function(){return w}});var e=b(485),t=b(375),n=b(197),r=b(155),o=b.n(r),i=b(488);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var f=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,r,a;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,a=arguments,r=u(r),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(r,a||[],u(this).constructor):r.apply(this,a)),"type","mailer"),c(e,"title",(0,i.MZ)("Mailer")),c(e,"group","extended"),c(e,"description",(0,i.MZ)("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.")),c(e,"icon",o().createElement(t.MailOutlined,null)),c(e,"FieldsetLoader",function(){return b.e("610").then(b.bind(b,649)).then(function(e){return{default:e.MailerFieldset}})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&a(n,e),n}(n.Instruction);function s(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function p(e,t,n){return(p=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&v(o,n.prototype),o}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)})(e)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var w=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=d(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,h()?Reflect.construct(e,t||[],d(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&v(n,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(c,"next",{value:a(0)}),u(c,"throw",{value:a(1)}),u(c,"return",{value:a(2)}),"function"==typeof Symbol&&u(c,Symbol.iterator,{value:function(){return this}}),c;function a(u){return function(a){var l=[u,a];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return null==(t=this.app.pm.get("workflow"))||null==(e=t.registerInstruction)||e.call(t,"mailer",f),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){s(i,r,o,c,u,"next",e)}function u(e){s(i,r,o,c,u,"throw",e)}c(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(y(e.Plugin))}(),g}()});
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const NAMESPACE = "workflow-mailer";
10
+ export declare function useT(): (key: string, options?: Record<string, any>) => string;
11
+ export declare function tExpr(key: string, options?: Record<string, any>): string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { Application } from '@nocobase/client-v2';
10
+ import { Plugin } from '@nocobase/client-v2';
11
+ export default class PluginWorkflowMailerClientV2 extends Plugin<Record<string, never>, Application> {
12
+ load(): Promise<void>;
13
+ }
@@ -8,13 +8,17 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
+ "@nocobase/client": "2.2.0-alpha.2",
12
+ "@nocobase/plugin-workflow": "2.2.0-alpha.2",
11
13
  "@ant-design/icons": "5.6.1",
12
- "@formily/antd-v5": "1.2.3",
13
14
  "react": "18.2.0",
14
- "@nocobase/client": "2.1.11",
15
- "@nocobase/plugin-workflow": "2.1.11",
15
+ "@nocobase/client-v2": "2.2.0-alpha.2",
16
+ "@nocobase/flow-engine": "2.2.0-alpha.2",
16
17
  "react-i18next": "11.18.6",
17
- "@nocobase/plugin-file-manager": "2.1.11",
18
+ "@nocobase/plugin-file-manager": "2.2.0-alpha.2",
18
19
  "lodash": "4.18.1",
19
- "@nocobase/server": "2.1.11"
20
+ "@nocobase/server": "2.2.0-alpha.2",
21
+ "@dnd-kit/core": "6.1.0",
22
+ "@dnd-kit/sortable": "7.0.2",
23
+ "antd": "5.24.2"
20
24
  };
@@ -15,6 +15,7 @@
15
15
  "Password": "Password",
16
16
  "Plain text": "Plain text",
17
17
  "Port": "Port",
18
+ "Please enter at least one email address": "Please enter at least one email address",
18
19
  "Secure": "Secure",
19
20
  "Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
20
21
  "SMTP host": "Service host",
@@ -15,6 +15,7 @@
15
15
  "Password": "密码",
16
16
  "Plain text": "纯文本",
17
17
  "Port": "端口",
18
+ "Please enter at least one email address": "请至少输入一个邮件地址",
18
19
  "Secure": "安全模式",
19
20
  "Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "发送邮件。可以使用上游节点中的变量作为邮件的接收者、主题和内容。",
20
21
  "SMTP host": "SMTP 服务主机名",
@@ -1 +1 @@
1
- {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-06-24T23:39:16.058Z"}
1
+ {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-06-26T03:51:46.563Z"}
@@ -1 +1 @@
1
- {"name":"nodemailer","version":"6.9.13","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","lint":"eslint .","update":"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"https://github.com/nodemailer/nodemailer.git"},"keywords":["Nodemailer"],"author":"Andris Reinman","license":"MIT-0","bugs":{"url":"https://github.com/nodemailer/nodemailer/issues"},"homepage":"https://nodemailer.com/","devDependencies":{"@aws-sdk/client-ses":"3.529.1","bunyan":"1.8.15","c8":"9.1.0","eslint":"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0","libbase64":"1.3.0","libmime":"5.3.4","libqp":"2.1.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.3"},"engines":{"node":">=6.0.0"},"_lastModified":"2026-06-24T23:39:16.730Z"}
1
+ {"name":"nodemailer","version":"6.9.13","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","lint":"eslint .","update":"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"https://github.com/nodemailer/nodemailer.git"},"keywords":["Nodemailer"],"author":"Andris Reinman","license":"MIT-0","bugs":{"url":"https://github.com/nodemailer/nodemailer/issues"},"homepage":"https://nodemailer.com/","devDependencies":{"@aws-sdk/client-ses":"3.529.1","bunyan":"1.8.15","c8":"9.1.0","eslint":"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0","libbase64":"1.3.0","libmime":"5.3.4","libqp":"2.1.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.3"},"engines":{"node":">=6.0.0"},"_lastModified":"2026-06-26T03:51:47.265Z"}
@@ -260,7 +260,7 @@ class MailerInstruction extends import_plugin_workflow.Instruction {
260
260
  const { provider, ignoreFail } = config;
261
261
  const { workflow } = processor.execution;
262
262
  const currentWorkflow = (workflow == null ? void 0 : workflow.options) || ((_a = workflow == null ? void 0 : workflow.get) == null ? void 0 : _a.call(workflow, "options")) ? workflow : await node.getWorkflow();
263
- const sync = this.workflow.isWorkflowSync(currentWorkflow);
263
+ const sync = processor.isInstructionSync(node);
264
264
  const workflowOptions = (currentWorkflow == null ? void 0 : currentWorkflow.options) ?? ((_b = currentWorkflow == null ? void 0 : currentWorkflow.get) == null ? void 0 : _b.call(currentWorkflow, "options")) ?? {};
265
265
  const workflowTimeout = Number(workflowOptions.timeout ?? 0);
266
266
  const transporterKey = getTransporterKey(provider);
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Send email in workflow.",
7
7
  "description.ru-RU": "Отправляет электронное письмо в рамках рабочего процесса.",
8
8
  "description.zh-CN": "可用于在工作流中发送电子邮件。",
9
- "version": "2.1.11",
9
+ "version": "2.2.0-alpha.2",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
@@ -20,13 +20,14 @@
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@nocobase/client": "2.x",
23
+ "@nocobase/client-v2": "2.x",
23
24
  "@nocobase/database": "2.x",
24
25
  "@nocobase/plugin-file-manager": "2.x",
25
26
  "@nocobase/plugin-workflow": ">=0.17.0-alpha.3",
26
27
  "@nocobase/server": "2.x",
27
28
  "@nocobase/test": "2.x"
28
29
  },
29
- "gitHead": "1ccf891d837e21089f65f84b892407b34a0a0cb9",
30
+ "gitHead": "9dd5224bb8f6c1ac12d766b9f175bdc29bddd845",
30
31
  "keywords": [
31
32
  "NocoBase",
32
33
  "Workflow",