@nocobase/plugin-workflow-delay 1.7.0-beta.17 → 1.7.0-beta.19

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("antd"),require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-delay",["antd","react-i18next","@ant-design/icons","@nocobase/client","@nocobase/plugin-workflow/client","react"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-delay"]=t(require("antd"),require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react")):e["@nocobase/plugin-workflow-delay"]=t(e.antd,e["react-i18next"],e["@ant-design/icons"],e["@nocobase/client"],e["@nocobase/plugin-workflow/client"],e.react)}(self,function(e,t,n,r,o,u){return function(){"use strict";var i={482:function(e){e.exports=n},772:function(e){e.exports=r},433:function(e){e.exports=o},721:function(t){t.exports=e},156:function(e){e.exports=u},238:function(e){e.exports=t}},c={};function a(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};a.r(l),a.d(l,{default:function(){return D}});var f=a("772"),s=a("156"),p=a.n(s),b=a("721"),y=a("482"),d=a("433");a("238");var v="workflow-delay";function w(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)}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}var O=[{value:1e3,label:"{{t('Seconds', { ns: \"workflow\" })}}"},{value:6e4,label:"{{t('Minutes', { ns: \"workflow\" })}}"},{value:36e5,label:"{{t('Hours', { ns: \"workflow\" })}}"},{value:864e5,label:"{{t('Days', { ns: \"workflow\" })}}"},{value:6048e5,label:"{{t('Weeks', { ns: \"workflow\" })}}"}],S=function(e){var t,n,r;function o(){var e,t,n,r;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),t=this,n=o,r=arguments,n=h(n),m(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)}(t,x()?Reflect.construct(n,r||[],h(t).constructor):n.apply(t,r)),"title",'{{t("Delay", { ns: "'.concat(v,'" })}}')),m(e,"type","delay"),m(e,"group","control"),m(e,"description",'{{t("Delay a period of time and then continue or exit the process. Can be used to set wait or timeout times in parallel branches.", { ns: "'.concat(v,'" })}}')),m(e,"icon",p().createElement(y.HourglassOutlined,{style:{}})),m(e,"fieldset",{duration:{type:"void",title:'{{t("Duration", { ns: "'.concat(v,'" })}}'),"x-decorator":"FormItem","x-component":"Space.Compact",required:!0,properties:{unit:{type:"number","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Unit", { ns: "'.concat(v,'" })}}'),className:"auto-width",allowClear:!1},enum:O,default:6e4},duration:{type:"number","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{placeholder:'{{t("Duration", { ns: "'.concat(v,'" })}}'),useTypedConstant:[["number",{min:1}]],nullable:!1,parseOptions:{defaultTypeOnNull:"number"}},default:1,required:!0}}},endStatus:{type:"number",title:'{{t("End status", { ns: "'.concat(v,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:'{{t("Succeed and continue", { ns: "'.concat(v,'" })}}'),value:d.JOB_STATUS.RESOLVED},{label:'{{t("Fail and exit", { ns: "'.concat(v,'" })}}'),value:d.JOB_STATUS.FAILED}],required:!0,default:d.JOB_STATUS.RESOLVED}}),m(e,"components",{WorkflowVariableInput:d.WorkflowVariableInput,Space:b.Space}),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&&g(e,t)}(o,e),t=o,n=[{key:"isAvailable",value:function(e){var t=e.engine,n=e.workflow;return e.upstream,e.branchIndex,!t.isWorkflowSync(n)}}],w(t.prototype,n),o}(d.Instruction);function k(e,t,n,r,o,u,i){try{var c=e[u](i),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function i(e){k(u,r,o,i,c,"next",e)}function c(e){k(u,r,o,i,c,"throw",e)}i(void 0)})}}function _(e,t,n){return(_=I()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&q(o,n.prototype),o}).apply(null,arguments)}function P(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)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t="function"==typeof Map?new Map:void 0;return(E=function(e){var n;if(null===e||(n=e,-1===Function.toString.call(n).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 _(e,arguments,T(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),q(r,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function R(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(n)throw TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var D=function(e){var t,n,r;function o(){var e,t,n;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t=o,n=arguments,t=T(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,I()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}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&&q(e,t)}(o,e),t=o,n=[{key:"afterAdd",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return j(function(){return R(this,function(t){return e.app.pm.get("workflow").registerInstruction("delay",S),[2]})})()}}],P(t.prototype,n),o}(E(f.Plugin));return l}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("antd"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-delay",["react","@nocobase/client","@ant-design/icons","antd","@nocobase/plugin-workflow/client","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-delay"]=t(require("react"),require("@nocobase/client"),require("@ant-design/icons"),require("antd"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):e["@nocobase/plugin-workflow-delay"]=t(e.react,e["@nocobase/client"],e["@ant-design/icons"],e.antd,e["@nocobase/plugin-workflow/client"],e["react-i18next"])}(self,function(e,t,n,r,o,u){return function(){"use strict";var i={482:function(e){e.exports=n},772:function(e){e.exports=t},433:function(e){e.exports=o},721:function(e){e.exports=r},156:function(t){t.exports=e},238:function(e){e.exports=u}},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,c),n.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return!function(){c.r(l),c.d(l,{default:function(){return S}});var e=c(772),t=c(156),n=c.n(t),r=c(721),o=c(482),u=c(433);c(238);var i="workflow-delay";function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 b=[{value:1e3,label:"{{t('Seconds', { ns: \"workflow\" })}}"},{value:6e4,label:"{{t('Minutes', { ns: \"workflow\" })}}"},{value:36e5,label:"{{t('Hours', { ns: \"workflow\" })}}"},{value:864e5,label:"{{t('Days', { ns: \"workflow\" })}}"},{value:6048e5,label:"{{t('Weeks', { ns: \"workflow\" })}}"}],y=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t,l;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return t=c,l=arguments,t=f(t),a(e=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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(t,l||[],f(this).constructor):t.apply(this,l)),"title",'{{t("Delay", { ns: "'.concat(i,'" })}}')),a(e,"type","delay"),a(e,"group","control"),a(e,"description",'{{t("Delay a period of time and then continue or exit the process. Can be used to set wait or timeout times in parallel branches.", { ns: "'.concat(i,'" })}}')),a(e,"icon",n().createElement(o.HourglassOutlined,{style:{}})),a(e,"fieldset",{duration:{type:"void",title:'{{t("Duration", { ns: "'.concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"Space.Compact",required:!0,properties:{unit:{type:"number","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Unit", { ns: "'.concat(i,'" })}}'),className:"auto-width",allowClear:!1},enum:b,default:6e4},duration:{type:"number","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{placeholder:'{{t("Duration", { ns: "'.concat(i,'" })}}'),useTypedConstant:[["number",{min:1}]],nullable:!1,parseOptions:{defaultTypeOnNull:"number"}},default:1,required:!0}}},endStatus:{type:"number",title:'{{t("End status", { ns: "'.concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:'{{t("Succeed and continue", { ns: "'.concat(i,'" })}}'),value:u.JOB_STATUS.RESOLVED},{label:'{{t("Fail and exit", { ns: "'.concat(i,'" })}}'),value:u.JOB_STATUS.FAILED}],required:!0,default:u.JOB_STATUS.RESOLVED}}),a(e,"components",{WorkflowVariableInput:u.WorkflowVariableInput,Space:r.Space}),e}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&s(c,e),t=[{key:"isAvailable",value:function(e){var t=e.engine,n=e.workflow;return e.upstream,e.branchIndex,!t.isWorkflowSync(n)}}],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)}}(c.prototype,t),c}(u.Instruction);function d(e,t,n,r,o,u,i){try{var a=e[u](i),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function i(e){d(u,r,o,i,a,"next",e)}function a(e){d(u,r,o,i,a,"throw",e)}i(void 0)})}}function w(e,t,n){return(w=x()?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 h(e){return(h=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 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,n)}function n(){return w(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function O(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){var c=[u,a];if(n)throw TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var S=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=h(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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,x()?Reflect.construct(e,t||[],h(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 v(function(){return O(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return v(function(){return O(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return v(function(){return O(this,function(t){return e.app.pm.get("workflow").registerInstruction("delay",y),[2]})})()}}],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}(g(e.Plugin))}(),l}()});
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd": "5.24.2",
13
13
  "@ant-design/icons": "5.6.1",
14
- "@nocobase/plugin-workflow": "1.7.0-beta.17",
15
- "@nocobase/client": "1.7.0-beta.17",
14
+ "@nocobase/plugin-workflow": "1.7.0-beta.19",
15
+ "@nocobase/client": "1.7.0-beta.19",
16
16
  "react-i18next": "11.18.6",
17
- "@nocobase/server": "1.7.0-beta.17"
17
+ "@nocobase/server": "1.7.0-beta.19"
18
18
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:延时节点",
5
5
  "description": "Could be used in workflow parallel branch for waiting other branches.",
6
6
  "description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。",
7
- "version": "1.7.0-beta.17",
7
+ "version": "1.7.0-beta.19",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-delay",
@@ -21,7 +21,7 @@
21
21
  "@nocobase/server": "1.x",
22
22
  "@nocobase/test": "1.x"
23
23
  },
24
- "gitHead": "41b99d84c17d15fd8b644599a317d570e8dac61a",
24
+ "gitHead": "1b828a2402d699654010f5b9fa3c706ee7f1539a",
25
25
  "keywords": [
26
26
  "Workflow"
27
27
  ]