@nocobase/plugin-workflow-mailer 1.3.0-alpha.20240710084543 → 1.3.0-alpha.20240710141659
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/dist/client/MailerInstruction.d.ts +352 -0
- package/dist/client/index.d.ts +14 -0
- package/dist/client/index.js +16 -0
- package/dist/externalVersion.js +16 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +19 -0
- package/dist/locale/index.d.ts +11 -0
- package/dist/locale/index.js +48 -0
- package/dist/locale/zh-CN.json +19 -0
- package/dist/node_modules/nodemailer/.gitattributes +6 -0
- package/dist/node_modules/nodemailer/.ncurc.js +7 -0
- package/dist/node_modules/nodemailer/.prettierrc.js +8 -0
- package/dist/node_modules/nodemailer/LICENSE +16 -0
- package/dist/node_modules/nodemailer/SECURITY.txt +22 -0
- package/dist/node_modules/nodemailer/lib/addressparser/index.js +313 -0
- package/dist/node_modules/nodemailer/lib/base64/index.js +142 -0
- package/dist/node_modules/nodemailer/lib/dkim/index.js +251 -0
- package/dist/node_modules/nodemailer/lib/dkim/message-parser.js +155 -0
- package/dist/node_modules/nodemailer/lib/dkim/relaxed-body.js +154 -0
- package/dist/node_modules/nodemailer/lib/dkim/sign.js +117 -0
- package/dist/node_modules/nodemailer/lib/fetch/cookies.js +281 -0
- package/dist/node_modules/nodemailer/lib/fetch/index.js +274 -0
- package/dist/node_modules/nodemailer/lib/json-transport/index.js +82 -0
- package/dist/node_modules/nodemailer/lib/mail-composer/index.js +565 -0
- package/dist/node_modules/nodemailer/lib/mailer/index.js +429 -0
- package/dist/node_modules/nodemailer/lib/mailer/mail-message.js +315 -0
- package/dist/node_modules/nodemailer/lib/mime-funcs/index.js +625 -0
- package/dist/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2102 -0
- package/dist/node_modules/nodemailer/lib/mime-node/index.js +1314 -0
- package/dist/node_modules/nodemailer/lib/mime-node/last-newline.js +33 -0
- package/dist/node_modules/nodemailer/lib/mime-node/le-unix.js +43 -0
- package/dist/node_modules/nodemailer/lib/mime-node/le-windows.js +52 -0
- package/dist/node_modules/nodemailer/lib/nodemailer.js +1 -0
- package/dist/node_modules/nodemailer/lib/punycode/index.js +460 -0
- package/dist/node_modules/nodemailer/lib/qp/index.js +219 -0
- package/dist/node_modules/nodemailer/lib/sendmail-transport/index.js +210 -0
- package/dist/node_modules/nodemailer/lib/ses-transport/index.js +349 -0
- package/dist/node_modules/nodemailer/lib/shared/index.js +688 -0
- package/dist/node_modules/nodemailer/lib/smtp-connection/data-stream.js +108 -0
- package/dist/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +143 -0
- package/dist/node_modules/nodemailer/lib/smtp-connection/index.js +1825 -0
- package/dist/node_modules/nodemailer/lib/smtp-pool/index.js +648 -0
- package/dist/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +253 -0
- package/dist/node_modules/nodemailer/lib/smtp-transport/index.js +416 -0
- package/dist/node_modules/nodemailer/lib/stream-transport/index.js +135 -0
- package/dist/node_modules/nodemailer/lib/well-known/index.js +47 -0
- package/dist/node_modules/nodemailer/lib/well-known/services.json +343 -0
- package/dist/node_modules/nodemailer/lib/xoauth2/index.js +376 -0
- package/dist/node_modules/nodemailer/package.json +1 -0
- package/dist/server/MailerInstruction.d.ts +13 -0
- package/dist/server/MailerInstruction.js +119 -0
- package/dist/server/Plugin.d.ts +12 -0
- package/dist/server/Plugin.js +50 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/package.json +2 -2
|
@@ -0,0 +1,352 @@
|
|
|
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
|
+
/// <reference types="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
|
+
fieldset: {
|
|
17
|
+
provider: {
|
|
18
|
+
type: string;
|
|
19
|
+
properties: {
|
|
20
|
+
server: {
|
|
21
|
+
type: string;
|
|
22
|
+
'x-decorator': string;
|
|
23
|
+
'x-decorator-props': {
|
|
24
|
+
value: {
|
|
25
|
+
designable: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
'x-component': string;
|
|
29
|
+
properties: {
|
|
30
|
+
row: {
|
|
31
|
+
type: string;
|
|
32
|
+
'x-component': string;
|
|
33
|
+
properties: {
|
|
34
|
+
host: {
|
|
35
|
+
type: string;
|
|
36
|
+
'x-component': string;
|
|
37
|
+
'x-component-props': {
|
|
38
|
+
width: number;
|
|
39
|
+
};
|
|
40
|
+
properties: {
|
|
41
|
+
host: {
|
|
42
|
+
type: string;
|
|
43
|
+
required: boolean;
|
|
44
|
+
title: string;
|
|
45
|
+
'x-decorator': string;
|
|
46
|
+
'x-component': string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
port: {
|
|
51
|
+
type: string;
|
|
52
|
+
'x-component': string;
|
|
53
|
+
'x-component-props': {
|
|
54
|
+
width: number;
|
|
55
|
+
};
|
|
56
|
+
properties: {
|
|
57
|
+
port: {
|
|
58
|
+
type: string;
|
|
59
|
+
required: boolean;
|
|
60
|
+
title: string;
|
|
61
|
+
'x-decorator': string;
|
|
62
|
+
'x-component': string;
|
|
63
|
+
'x-component-props': {
|
|
64
|
+
min: number;
|
|
65
|
+
max: number;
|
|
66
|
+
step: number;
|
|
67
|
+
};
|
|
68
|
+
default: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
secure: {
|
|
73
|
+
type: string;
|
|
74
|
+
'x-component': string;
|
|
75
|
+
'x-component-props': {
|
|
76
|
+
width: number;
|
|
77
|
+
};
|
|
78
|
+
properties: {
|
|
79
|
+
secure: {
|
|
80
|
+
type: string;
|
|
81
|
+
title: string;
|
|
82
|
+
'x-decorator': string;
|
|
83
|
+
'x-component': string;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
auth: {
|
|
93
|
+
type: string;
|
|
94
|
+
'x-decorator': string;
|
|
95
|
+
'x-decorator-props': {
|
|
96
|
+
value: {
|
|
97
|
+
designable: boolean;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
'x-component': string;
|
|
101
|
+
properties: {
|
|
102
|
+
row: {
|
|
103
|
+
type: string;
|
|
104
|
+
'x-component': string;
|
|
105
|
+
properties: {
|
|
106
|
+
user: {
|
|
107
|
+
type: string;
|
|
108
|
+
'x-component': string;
|
|
109
|
+
properties: {
|
|
110
|
+
'auth.user': {
|
|
111
|
+
type: string;
|
|
112
|
+
required: boolean;
|
|
113
|
+
title: string;
|
|
114
|
+
'x-decorator': string;
|
|
115
|
+
'x-component': string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
pass: {
|
|
120
|
+
type: string;
|
|
121
|
+
'x-component': string;
|
|
122
|
+
properties: {
|
|
123
|
+
'auth.pass': {
|
|
124
|
+
type: string;
|
|
125
|
+
required: boolean;
|
|
126
|
+
title: string;
|
|
127
|
+
'x-decorator': string;
|
|
128
|
+
'x-component': string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
from: {
|
|
139
|
+
type: string;
|
|
140
|
+
required: boolean;
|
|
141
|
+
title: string;
|
|
142
|
+
'x-decorator': string;
|
|
143
|
+
'x-component': string;
|
|
144
|
+
'x-component-props': {
|
|
145
|
+
useTypedConstant: string[];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
to: {
|
|
149
|
+
type: string;
|
|
150
|
+
required: boolean;
|
|
151
|
+
title: string;
|
|
152
|
+
'x-decorator': string;
|
|
153
|
+
'x-component': string;
|
|
154
|
+
items: {
|
|
155
|
+
type: string;
|
|
156
|
+
'x-component': string;
|
|
157
|
+
'x-component-props': {
|
|
158
|
+
className: string;
|
|
159
|
+
};
|
|
160
|
+
properties: {
|
|
161
|
+
sort: {
|
|
162
|
+
type: string;
|
|
163
|
+
'x-decorator': string;
|
|
164
|
+
'x-component': string;
|
|
165
|
+
};
|
|
166
|
+
input: {
|
|
167
|
+
type: string;
|
|
168
|
+
'x-decorator': string;
|
|
169
|
+
'x-component': string;
|
|
170
|
+
'x-component-props': {
|
|
171
|
+
useTypedConstant: string[];
|
|
172
|
+
placeholder: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
remove: {
|
|
176
|
+
type: string;
|
|
177
|
+
'x-decorator': string;
|
|
178
|
+
'x-component': string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
properties: {
|
|
183
|
+
add: {
|
|
184
|
+
type: string;
|
|
185
|
+
title: string;
|
|
186
|
+
'x-component': string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
cc: {
|
|
191
|
+
type: string;
|
|
192
|
+
title: string;
|
|
193
|
+
'x-decorator': string;
|
|
194
|
+
'x-component': string;
|
|
195
|
+
items: {
|
|
196
|
+
type: string;
|
|
197
|
+
'x-component': string;
|
|
198
|
+
'x-component-props': {
|
|
199
|
+
className: string;
|
|
200
|
+
};
|
|
201
|
+
properties: {
|
|
202
|
+
sort: {
|
|
203
|
+
type: string;
|
|
204
|
+
'x-decorator': string;
|
|
205
|
+
'x-component': string;
|
|
206
|
+
};
|
|
207
|
+
input: {
|
|
208
|
+
type: string;
|
|
209
|
+
'x-decorator': string;
|
|
210
|
+
'x-component': string;
|
|
211
|
+
'x-component-props': {
|
|
212
|
+
useTypedConstant: string[];
|
|
213
|
+
placeholder: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
remove: {
|
|
217
|
+
type: string;
|
|
218
|
+
'x-decorator': string;
|
|
219
|
+
'x-component': string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
properties: {
|
|
224
|
+
add: {
|
|
225
|
+
type: string;
|
|
226
|
+
title: string;
|
|
227
|
+
'x-component': string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
bcc: {
|
|
232
|
+
type: string;
|
|
233
|
+
title: string;
|
|
234
|
+
'x-decorator': string;
|
|
235
|
+
'x-component': string;
|
|
236
|
+
items: {
|
|
237
|
+
type: string;
|
|
238
|
+
'x-component': string;
|
|
239
|
+
'x-component-props': {
|
|
240
|
+
className: string;
|
|
241
|
+
};
|
|
242
|
+
properties: {
|
|
243
|
+
sort: {
|
|
244
|
+
type: string;
|
|
245
|
+
'x-decorator': string;
|
|
246
|
+
'x-component': string;
|
|
247
|
+
};
|
|
248
|
+
input: {
|
|
249
|
+
type: string;
|
|
250
|
+
'x-decorator': string;
|
|
251
|
+
'x-component': string;
|
|
252
|
+
'x-component-props': {
|
|
253
|
+
useTypedConstant: string[];
|
|
254
|
+
placeholder: string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
remove: {
|
|
258
|
+
type: string;
|
|
259
|
+
'x-decorator': string;
|
|
260
|
+
'x-component': string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
properties: {
|
|
265
|
+
add: {
|
|
266
|
+
type: string;
|
|
267
|
+
title: string;
|
|
268
|
+
'x-component': string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
subject: {
|
|
273
|
+
type: string;
|
|
274
|
+
required: boolean;
|
|
275
|
+
title: string;
|
|
276
|
+
'x-decorator': string;
|
|
277
|
+
'x-component': string;
|
|
278
|
+
};
|
|
279
|
+
contentType: {
|
|
280
|
+
type: string;
|
|
281
|
+
title: string;
|
|
282
|
+
'x-decorator': string;
|
|
283
|
+
'x-component': string;
|
|
284
|
+
enum: {
|
|
285
|
+
label: string;
|
|
286
|
+
value: string;
|
|
287
|
+
}[];
|
|
288
|
+
default: string;
|
|
289
|
+
};
|
|
290
|
+
html: {
|
|
291
|
+
type: string;
|
|
292
|
+
required: boolean;
|
|
293
|
+
title: string;
|
|
294
|
+
'x-decorator': string;
|
|
295
|
+
'x-decorator-props': {};
|
|
296
|
+
'x-component': string;
|
|
297
|
+
'x-component-props': {
|
|
298
|
+
placeholder: string;
|
|
299
|
+
autoSize: {
|
|
300
|
+
minRows: number;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
'x-reactions': {
|
|
304
|
+
dependencies: string[];
|
|
305
|
+
fulfill: {
|
|
306
|
+
state: {
|
|
307
|
+
visible: string;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
}[];
|
|
311
|
+
};
|
|
312
|
+
text: {
|
|
313
|
+
type: string;
|
|
314
|
+
required: boolean;
|
|
315
|
+
title: string;
|
|
316
|
+
'x-decorator': string;
|
|
317
|
+
'x-decorator-props': {};
|
|
318
|
+
'x-component': string;
|
|
319
|
+
'x-component-props': {
|
|
320
|
+
placeholder: string;
|
|
321
|
+
autoSize: {
|
|
322
|
+
minRows: number;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
'x-reactions': {
|
|
326
|
+
dependencies: string[];
|
|
327
|
+
fulfill: {
|
|
328
|
+
state: {
|
|
329
|
+
visible: string;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
}[];
|
|
333
|
+
};
|
|
334
|
+
ignoreFail: {
|
|
335
|
+
type: string;
|
|
336
|
+
'x-content': string;
|
|
337
|
+
'x-decorator': string;
|
|
338
|
+
'x-component': string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
components: {
|
|
342
|
+
ArrayItems: import("@formily/reactive-react").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
|
|
343
|
+
Item: import("@formily/reactive-react").ReactFC<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
344
|
+
type?: "card" | "divide";
|
|
345
|
+
}>;
|
|
346
|
+
};
|
|
347
|
+
SchemaComponentContext: import("react").Context<import("@nocobase/client").ISchemaComponentContext>;
|
|
348
|
+
WorkflowVariableInput: typeof WorkflowVariableInput;
|
|
349
|
+
WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
|
|
350
|
+
WorkflowVariableRawTextArea: typeof WorkflowVariableRawTextArea;
|
|
351
|
+
};
|
|
352
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { Plugin } from '@nocobase/client';
|
|
10
|
+
export default class extends Plugin {
|
|
11
|
+
afterAdd(): Promise<void>;
|
|
12
|
+
beforeLoad(): Promise<void>;
|
|
13
|
+
load(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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(t,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@nocobase/client"),require("@formily/antd-v5"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","@formily/antd-v5","@nocobase/plugin-workflow/client","react-i18next"],o):(t=typeof globalThis!="undefined"?globalThis:t||self,o(t["@nocobase/plugin-workflow-mailer"]={},t["@nocobase/client"],t["@formily/antd-v5"],t["@nocobase/plugin-workflow"]))})(this,function(t,o,r,i){"use strict";var l=Object.defineProperty;var x=(t,o,r)=>o in t?l(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;var p=(t,o,r)=>(x(t,typeof o!="symbol"?o+"":o,r),r);var d=(t,o,r)=>new Promise((i,e)=>{var s=n=>{try{a(r.next(n))}catch(m){e(m)}},c=n=>{try{a(r.throw(n))}catch(m){e(m)}},a=n=>n.done?i(n.value):Promise.resolve(n.value).then(s,c);a((r=r.apply(t,o)).next())});const e="workflow-mailer",s=o.css`
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
.ant-space-item:nth-child(2) {
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
}
|
|
16
|
+
`;class c extends i.Instruction{constructor(){super(...arguments);p(this,"title",`{{t("Mailer", { ns: "${e}" })}}`);p(this,"type","mailer");p(this,"group","extended");p(this,"description",`{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "${e}" })}}`);p(this,"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:64},properties:{host:{type:"string",required:!0,title:`{{t("SMTP host", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Input"}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:16},properties:{port:{type:"number",required:!0,title:`{{t("Port", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:65535,step:1},default:465}}},secure:{type:"void","x-component":"Grid.Col","x-component-props":{width:16},properties:{secure:{type:"boolean",title:`{{t("Secure", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox",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",required:!0,title:`{{t("User", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Input"}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",required:!0,title:`{{t("Password", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Password"}}}}}}}}},from:{type:"string",required:!0,title:`{{t("From", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"]}},to:{type:"array",required:!0,title:`{{t("To", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:`{{t("CC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:`{{t("BCC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},subject:{type:"string",required:!0,title:`{{t("Subject", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:`{{t("Content type", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:`{{t("Plain text", { ns: "${e}" })}}`,value:"text"}],default:"html"},html:{type:"string",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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"}}'}}}]},ignoreFail:{type:"boolean","x-content":`{{t("Ignore failed sending and continue workflow", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox"}});p(this,"components",{ArrayItems:r.ArrayItems,SchemaComponentContext:o.SchemaComponentContext,WorkflowVariableInput:i.WorkflowVariableInput,WorkflowVariableTextArea:i.WorkflowVariableTextArea,WorkflowVariableRawTextArea:i.WorkflowVariableRawTextArea})}}class a extends o.Plugin{afterAdd(){return d(this,null,function*(){})}beforeLoad(){return d(this,null,function*(){})}load(){return d(this,null,function*(){this.app.pm.get("workflow").registerInstruction("mailer",c)})}}t.default=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
module.exports = {
|
|
11
|
+
"@formily/antd-v5": "1.1.9",
|
|
12
|
+
"@nocobase/client": "1.3.0-alpha.20240710141659",
|
|
13
|
+
"@nocobase/plugin-workflow": "1.3.0-alpha.20240710141659",
|
|
14
|
+
"react-i18next": "11.18.6",
|
|
15
|
+
"@nocobase/server": "1.3.0-alpha.20240710141659"
|
|
16
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -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
|
+
export * from './server';
|
|
10
|
+
export { default } from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
default: () => import_server.default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
...require("./server")
|
|
48
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Mailer": "Mailer",
|
|
3
|
+
"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.",
|
|
4
|
+
"SMTP host": "Service host",
|
|
5
|
+
"Port": "Port",
|
|
6
|
+
"Secure": "Secure",
|
|
7
|
+
"User": "User",
|
|
8
|
+
"Password": "Password",
|
|
9
|
+
"From": "From",
|
|
10
|
+
"To": "To",
|
|
11
|
+
"CC": "CC",
|
|
12
|
+
"BCC": "BCC",
|
|
13
|
+
"Add email address": "Add email address",
|
|
14
|
+
"Subject": "Subject",
|
|
15
|
+
"Content": "Content",
|
|
16
|
+
"Content type": "Content type",
|
|
17
|
+
"Plain text": "Plain text",
|
|
18
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow"
|
|
19
|
+
}
|
|
@@ -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 useLang(key: string, options?: {}): string;
|
|
11
|
+
export declare function usePluginTranslation(options: any): import("react-i18next").UseTranslationResponse<"workflow-mailer", undefined>;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var locale_exports = {};
|
|
28
|
+
__export(locale_exports, {
|
|
29
|
+
NAMESPACE: () => NAMESPACE,
|
|
30
|
+
useLang: () => useLang,
|
|
31
|
+
usePluginTranslation: () => usePluginTranslation
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(locale_exports);
|
|
34
|
+
var import_react_i18next = require("react-i18next");
|
|
35
|
+
const NAMESPACE = "workflow-mailer";
|
|
36
|
+
function useLang(key, options = {}) {
|
|
37
|
+
const { t } = usePluginTranslation(options);
|
|
38
|
+
return t(key);
|
|
39
|
+
}
|
|
40
|
+
function usePluginTranslation(options) {
|
|
41
|
+
return (0, import_react_i18next.useTranslation)(NAMESPACE, options);
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
NAMESPACE,
|
|
46
|
+
useLang,
|
|
47
|
+
usePluginTranslation
|
|
48
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Mailer": "邮件发送",
|
|
3
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "发送邮件。可以使用上游节点中的变量作为邮件的接收者、主题和内容。",
|
|
4
|
+
"SMTP host": "SMTP 服务主机名",
|
|
5
|
+
"Port": "端口",
|
|
6
|
+
"Secure": "安全模式",
|
|
7
|
+
"User": "用户名",
|
|
8
|
+
"Password": "密码",
|
|
9
|
+
"From": "发件人",
|
|
10
|
+
"To": "收件人",
|
|
11
|
+
"CC": "抄送",
|
|
12
|
+
"BCC": "暗送",
|
|
13
|
+
"Add email address": "新增邮件地址",
|
|
14
|
+
"Subject": "主题",
|
|
15
|
+
"Content": "内容",
|
|
16
|
+
"Content type": "内容格式",
|
|
17
|
+
"Plain text": "纯文本",
|
|
18
|
+
"Ignore failed sending and continue workflow": "忽略失败的发送并继续工作流"
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Copyright (c) 2011-2023 Andris Reinman
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-----BEGIN PGP SIGNED MESSAGE-----
|
|
2
|
+
Hash: SHA256
|
|
3
|
+
|
|
4
|
+
Contact: mailto:andris@reinman.eu
|
|
5
|
+
Encryption: https://keys.openpgp.org/vks/v1/by-fingerprint/5D952A46E1D8C931F6364E01DC6C83F4D584D364
|
|
6
|
+
Preferred-Languages: en, et
|
|
7
|
+
-----BEGIN PGP SIGNATURE-----
|
|
8
|
+
|
|
9
|
+
iQIzBAEBCAAdFiEEXZUqRuHYyTH2Nk4B3GyD9NWE02QFAmFDnUgACgkQ3GyD9NWE
|
|
10
|
+
02RqUA/+MM3afmRYq874C7wp+uN6dTMCvUX5g5zqBZ2yKpFr46L+PYvM7o8TMm5h
|
|
11
|
+
hmLT2I1zZmi+xezOL3zHFizaw0tKkZIz9cWl3Jrgs0FLp0zOsSz1xucp9Q2tYM/Q
|
|
12
|
+
vbiP6ys0gbim4tkDGRmZOEiO23s0BuRnmHt7vZg210O+D105Yd8/Ohzbj6PSLBO5
|
|
13
|
+
W1tA7Xw5t0FQ14NNH5+MKyDIKoCX12n0FmrC6qLTXeojf291UgKhCUPda3LIGTmx
|
|
14
|
+
mTXz0y68149Mw+JikRCYP8HfGRY9eA4XZrYXF7Bl2T9OJpKD3JAH+69P3xBw19Gn
|
|
15
|
+
Csaw3twu8P1bxoVGjY4KRrBOp68W8TwZYjWVWbqY6oV8hb/JfrMxa+kaSxRuloFs
|
|
16
|
+
oL6+phrDSPTWdOj2LlEDBJbPOMeDFzIlsBBcJ/JHCEHTvlHl7LoWr3YuWce9PUwl
|
|
17
|
+
4r3JUovvaeuJxLgC0vu3WCB3Jeocsl3SreqNkrVc1IjvkSomn3YGm5nCNAd/2F0V
|
|
18
|
+
exCGRk/8wbkSjAY38GwQ8K/VuFsefWN3L9sVwIMAMu88KFCAN+GzVFiwvyIXehF5
|
|
19
|
+
eogP9mIXzdQ5YReQjUjApOzGz54XnDyv9RJ3sdvMHosLP+IOg+0q5t9agWv6aqSR
|
|
20
|
+
2HzCpiQnH/gmM5NS0AU4Koq/L7IBeLu1B8+61/+BiHgZJJmPdgU=
|
|
21
|
+
=BUZr
|
|
22
|
+
-----END PGP SIGNATURE-----
|