@nocobase/plugin-workflow-mailer 1.7.0-beta.8 → 1.8.0-beta.1

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.
@@ -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("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["react","react-i18next","@ant-design/icons","@nocobase/client","@nocobase/plugin-workflow/client","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("react"),require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):e["@nocobase/plugin-workflow-mailer"]=t(e.react,e["react-i18next"],e["@ant-design/icons"],e["@nocobase/client"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"])}(self,function(e,t,o,r,n,i){return function(){"use strict";var c={482:function(e){e.exports=o},632:function(e){e.exports=i},772:function(e){e.exports=r},433:function(e){e.exports=n},156:function(t){t.exports=e},238:function(e){e.exports=t}},a={};function p(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return c[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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};p.r(s),p.d(s,{default:function(){return R}});var u=p("772"),l=p("482"),f=p("632"),d=p("156"),m=p.n(d),y=p("433");p("238");var x="workflow-mailer";function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function g(){var e,t,o=(e=["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return g=function(){return o},o}var I=(0,u.css)(g()),k=function(e){function t(){var e,o,r,n;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),o=this,r=t,n=arguments,r=v(r),b(e=function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,h()?Reflect.construct(r,n||[],v(o).constructor):r.apply(o,n)),"title",'{{t("Mailer", { ns: "'.concat(x,'" })}}')),b(e,"type","mailer"),b(e,"group","extended"),b(e,"description",'{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "'.concat(x,'" })}}')),b(e,"icon",m().createElement(l.MailOutlined,{style:{}})),b(e,"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(x,'" })}}'),"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(x,'" })}}'),"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(x,'" })}}'),description:'{{t("In most cases, if using port 465, set it to true; otherwise, set it to false.", { ns: "'.concat(x,'" })}}'),"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(x,'" })}}'),"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(x,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{type:"password"}]]}}}}}}}}}},from:{type:"string",required:!0,title:'{{t("From", { ns: "'.concat(x,'" })}}'),"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(x,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:I},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(x,'" })}}'),"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC", { ns: "'.concat(x,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:I},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(x,'" })}}'),"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC", { ns: "'.concat(x,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:I},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(x,'" })}}'),"x-component":"ArrayItems.Addition"}}},subject:{type:"string",title:'{{t("Subject", { ns: "'.concat(x,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:'{{t("Content type", { ns: "'.concat(x,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text", { ns: "'.concat(x,'" })}}'),value:"text"}],default:"html"},html:{type:"string",title:'{{t("Content", { ns: "'.concat(x,'" })}}'),"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(x,'" })}}'),"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: "'.concat(x,'" })}}'),"x-decorator":"FormItem","x-component":"Checkbox"}}),b(e,"components",{ArrayItems:f.ArrayItems,SchemaComponentContext:u.SchemaComponentContext,WorkflowVariableInput:y.WorkflowVariableInput,WorkflowVariableTextArea:y.WorkflowVariableTextArea,WorkflowVariableRawTextArea:y.WorkflowVariableRawTextArea}),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,e),t}(y.Instruction);function O(e,t,o,r,n,i,c){try{var a=e[i](c),p=a.value}catch(e){o(e);return}a.done?t(p):Promise.resolve(p).then(r,n)}function C(e){return function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function c(e){O(i,r,n,c,a,"next",e)}function a(e){O(i,r,n,c,a,"throw",e)}c(void 0)})}}function S(e,t,o){return(S=P()?Reflect.construct:function(e,t,o){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return o&&A(n,o.prototype),n}).apply(null,arguments)}function T(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)}}function j(e){return(j=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 F(e){var t="function"==typeof Map?new Map:void 0;return(F=function(e){var o;if(null===e||(o=e,-1===Function.toString.call(o).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,r)}function r(){return S(e,arguments,j(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),A(r,e)})(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}function _(e,t){var o,r,n,i,c={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(o)throw TypeError("Generator is already executing.");for(;c;)try{if(o=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(n=(n=c.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){c.label=i[1];break}if(6===i[0]&&c.label<n[1]){c.label=n[1],n=i;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(i);break}n[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{o=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var R=function(e){var t,o,r;function n(){var e,t,o;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),e=this,t=n,o=arguments,t=j(t),function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,P()?Reflect.construct(t,o||[],j(e).constructor):t.apply(e,o))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(n,e),t=n,o=[{key:"afterAdd",value:function(){return C(function(){return _(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return C(function(){return _(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return C(function(){return _(this,function(t){return e.app.pm.get("workflow").registerInstruction("mailer",k),[2]})})()}}],T(t.prototype,o),n}(F(u.Plugin));return s}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@formily/antd-v5"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["react","@formily/antd-v5","@nocobase/client","@ant-design/icons","@nocobase/plugin-workflow/client","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("react"),require("@formily/antd-v5"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):e["@nocobase/plugin-workflow-mailer"]=t(e.react,e["@formily/antd-v5"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/plugin-workflow/client"],e["react-i18next"])}(self,function(e,t,o,r,n,i){return function(){"use strict";var a={482:function(e){e.exports=r},632:function(e){e.exports=t},772:function(e){e.exports=o},433:function(e){e.exports=n},156:function(t){t.exports=e},238:function(e){e.exports=i}},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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return!function(){p.r(s),p.d(s,{default:function(){return O}});var e=p(772),t=p(482),o=p(632),r=p(156),n=p.n(r),i=p(433);p(238);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 u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function d(){var e,t,o=(e=["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return d=function(){return o},o}var m=(0,e.css)(d()),y=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)&&"undefined"!=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,f()?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:m},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:m},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:m},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"}}'}}}]},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&&u(p,r),p}(i.Instruction);function x(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 b(e){return function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function a(e){x(i,r,n,a,c,"next",e)}function c(e){x(i,r,n,a,c,"throw",e)}a(void 0)})}}function v(e,t,o){return(v=I()?Reflect.construct:function(e,t,o){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return o&&w(n,o.prototype),n}).apply(null,arguments)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t="function"==typeof Map?new Map:void 0;return(g=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 v(e,arguments,h(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),w(o,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function k(e,t){var o,r,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var p=[i,c];if(o)throw TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(n=2&p[0]?r.return:p[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,p[1])).done)return n;switch(r=0,n&&(p=[2&p[0],n.value]),p[0]){case 0:case 1:n=p;break;case 4:return a.label++,{value:p[1],done:!1};case 5:a.label++,r=p[1],p=[0];continue;case 7:p=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===p[0]||2===p[0])){a=0;continue}if(3===p[0]&&(!n||p[1]>n[0]&&p[1]<n[3])){a.label=p[1];break}if(6===p[0]&&a.label<n[1]){a.label=n[1],n=p;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(p);break}n[2]&&a.ops.pop(),a.trys.pop();continue}p=t.call(e,a)}catch(e){p=[6,e],r=0}finally{o=n=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}}var O=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=h(e),function(e,t){var o;if(t&&("object"==((o=t)&&"undefined"!=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,I()?Reflect.construct(e,t||[],h(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&w(o,e),t=[{key:"afterAdd",value:function(){return b(function(){return k(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return b(function(){return k(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return b(function(){return k(this,function(t){return e.app.pm.get("workflow").registerInstruction("mailer",y),[2]})})()}}],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}(g(e.Plugin))}(),s}()});
@@ -9,10 +9,10 @@
9
9
 
10
10
  module.exports = {
11
11
  "@ant-design/icons": "5.6.1",
12
- "@formily/antd-v5": "1.1.9",
12
+ "@formily/antd-v5": "1.2.3",
13
13
  "react": "18.2.0",
14
- "@nocobase/client": "1.7.0-beta.8",
15
- "@nocobase/plugin-workflow": "1.7.0-beta.8",
14
+ "@nocobase/client": "1.8.0-beta.1",
15
+ "@nocobase/plugin-workflow": "1.8.0-beta.1",
16
16
  "react-i18next": "11.18.6",
17
- "@nocobase/server": "1.7.0-beta.8"
17
+ "@nocobase/server": "1.8.0-beta.1"
18
18
  };
@@ -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":"2025-03-23T05:00:03.673Z"}
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":"2025-06-03T16:08:32.534Z"}
@@ -6,7 +6,7 @@
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 { Processor, Instruction, FlowNodeModel } from '@nocobase/plugin-workflow';
9
+ import { FlowNodeModel, Instruction, Processor } from '@nocobase/plugin-workflow';
10
10
  export default class extends Instruction {
11
11
  run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<any>;
12
12
  resume(node: FlowNodeModel, job: any, processor: Processor): Promise<any>;
@@ -64,7 +64,7 @@ class MailerInstruction_default extends import_plugin_workflow.Instruction {
64
64
  ...options,
65
65
  ...contentType === "html" ? { html } : { text },
66
66
  subject: subject == null ? void 0 : subject.trim(),
67
- to: to.flat().map((item) => item == null ? void 0 : item.trim()).filter(Boolean),
67
+ to: to ? to.flat().map((item) => item == null ? void 0 : item.trim()).filter(Boolean) : void 0,
68
68
  cc: cc ? cc.flat().map((item) => item == null ? void 0 : item.trim()).filter(Boolean) : null,
69
69
  bcc: bcc ? bcc.flat().map((item) => item == null ? void 0 : item.trim()).filter(Boolean) : null
70
70
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:邮件发送节点",
5
5
  "description": "Send email in workflow.",
6
6
  "description.zh-CN": "可用于在工作流中发送电子邮件。",
7
- "version": "1.7.0-beta.8",
7
+ "version": "1.8.0-beta.1",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
@@ -21,7 +21,7 @@
21
21
  "@nocobase/server": "1.x",
22
22
  "@nocobase/test": "1.x"
23
23
  },
24
- "gitHead": "9ad35ee90db98d95dfa660645d155f4f4e81b47c",
24
+ "gitHead": "103935669123174f2942247202e3d9ff15f0d4ed",
25
25
  "keywords": [
26
26
  "NocoBase",
27
27
  "Workflow",