@nocobase/plugin-workflow 2.2.0-alpha.7 → 2.2.0-alpha.8
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/{509.e8d543f308a5823c.js → 509.8a85abc526e8cfe0.js} +1 -1
- package/dist/client/{67.ea0c78153b4842ef.js → 67.c206df2fb7e32468.js} +1 -1
- package/dist/client/719.79871d3000b54948.js +10 -0
- package/dist/client/972.5df5193573fe04e5.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/142.a8c8df2a9abb43c5.js +10 -0
- package/dist/client-v2/276.7f746d899e221e2f.js +10 -0
- package/dist/client-v2/{387.fd0a379e808b069f.js → 387.20ffad90130780e6.js} +1 -1
- package/dist/client-v2/635.14a6f21cf4f16345.js +10 -0
- package/dist/client-v2/{677.a8c841cd3c3a6f7d.js → 677.36a6fe395279deeb.js} +1 -1
- package/dist/client-v2/canvas/Node.d.ts +2 -2
- package/dist/client-v2/components/FilterDynamicComponent.d.ts +2 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +13 -13
- package/dist/locale/de-DE.json +1 -0
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/es-ES.json +1 -0
- package/dist/locale/fr-FR.json +1 -0
- package/dist/locale/hu-HU.json +1 -0
- package/dist/locale/id-ID.json +1 -0
- package/dist/locale/it-IT.json +1 -0
- package/dist/locale/ja-JP.json +1 -0
- package/dist/locale/ko-KR.json +1 -0
- package/dist/locale/nl-NL.json +1 -0
- package/dist/locale/pt-BR.json +1 -0
- package/dist/locale/ru-RU.json +1 -0
- package/dist/locale/tr-TR.json +1 -0
- package/dist/locale/uk-UA.json +1 -0
- package/dist/locale/vi-VN.json +1 -0
- package/dist/locale/zh-CN.json +1 -0
- package/dist/locale/zh-TW.json +1 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +3 -2
- package/dist/server/Dispatcher.js +37 -17
- package/dist/server/Plugin.d.ts +1 -1
- package/dist/server/actions/workflows.js +6 -0
- package/dist/server/triggers/CollectionTrigger.js +3 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
- package/dist/server/triggers/index.d.ts +1 -1
- package/dist/swagger/index.d.ts +1 -0
- package/dist/swagger/index.js +4 -2
- package/package.json +2 -2
- package/dist/client/719.cd8ca7c9f00584be.js +0 -10
- package/dist/client/972.600a190e71978122.js +0 -10
- package/dist/client-v2/142.fe4f9b7869876ff1.js +0 -10
- package/dist/client-v2/276.8ca10542a0424df3.js +0 -10
- package/dist/client-v2/635.20680bb5710698d0.js +0 -10
|
@@ -1,10 +0,0 @@
|
|
|
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_client_v2=self.webpackChunk_nocobase_plugin_workflow_client_v2||[]).push([["276"],{5329:function(e,n,t){t.d(n,{F:function(){return c}});var r=t(9155),o=t.n(r),l=t(2059),a=t(7806),i=t(9488);function u(e){var n=e.value,t=e.onChange,l=e.disabled,i=e.onCollectionChanged,u=(0,r.useRef)();return o().createElement(a.XJ,{value:n,disabled:l,onChange:function(e){var r,o=null!=(r=u.current)?r:n;null==t||t(e),o&&o!==e&&(null==i||i(o,e)),u.current=e}})}function c(e){var n=e.disabled,t=e.onCollectionChanged,r=(0,i.kj)();return o().createElement(l.Form.Item,{name:["config","collection"],label:r("Collection"),rules:[{required:!0}]},o().createElement(u,{disabled:n,onCollectionChanged:t}))}},9671:function(e,n,t){t.d(n,{DestroyFieldset:function(){return f},DestroyPresetFieldset:function(){return s}});var r=t(9155),o=t.n(r),l=t(2059),a=t(2235),i=t(5329),u=t(6855);function c(){var e=l.Form.useWatch(["config","collection"]);return e?o().createElement(u.F,{collection:e}):null}function f(){var e,n=(0,a.TA)(),t=l.Form.useFormInstance();return o().createElement(o().Fragment,null,o().createElement(i.F,{disabled:!!(null==n||null==(e=n.config)?void 0:e.collection),onCollectionChanged:function(){t.setFieldValue(["config","params","filter"],{})}}),o().createElement(c,null))}function s(){return o().createElement(i.F,null)}},6855:function(e,n,t){t.d(n,{F:function(){return f}});var r=t(9155),o=t.n(r),l=t(2059),a=t(7768),i=t(1801),u=t(9488);function c(e,n,t,r,o,l,a){try{var i=e[l](a),u=i.value}catch(e){t(e);return}i.done?n(u):Promise.resolve(u).then(r,o)}function f(e){var n=e.collection,t=e.label,r=e.name,f=e.required,s=e.maxAssociationFieldDepth,d=(0,u.kj)();return o().createElement(l.Form.Item,{name:void 0===r?["config","params","filter"]:r,label:null!=t?t:d("Filter"),validateTrigger:["onChange","onBlur"],rules:void 0===f||f?[{validator:function(e,n){var t;return(t=function(){return function(e,n){var t,r,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(a,"next",{value:u(0)}),i(a,"throw",{value:u(1)}),i(a,"return",{value:u(2)}),"function"==typeof Symbol&&i(a,Symbol.iterator,{value:function(){return this}}),a;function u(i){return function(u){var c=[i,u];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(l=0)),l;)try{if(t=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 l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=n.call(e,l)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){if(!(0,a.isValidFilter)(n))throw Error(d("Please add at least one condition"));return[2]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var l=t.apply(e,n);function a(e){c(l,r,o,a,i,"next",e)}function i(e){c(l,r,o,a,i,"throw",e)}a(void 0)})})()}}]:void 0},o().createElement(i.N$,{collection:n,maxAssociationFieldDepth:void 0===s?2:s}))}}}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
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_client_v2=self.webpackChunk_nocobase_plugin_workflow_client_v2||[]).push([["635"],{5329:function(e,n,t){t.d(n,{F:function(){return c}});var o=t(9155),l=t.n(o),a=t(2059),r=t(7806),i=t(9488);function u(e){var n=e.value,t=e.onChange,a=e.disabled,i=e.onCollectionChanged,u=(0,o.useRef)();return l().createElement(r.XJ,{value:n,disabled:a,onChange:function(e){var o,l=null!=(o=u.current)?o:n;null==t||t(e),l&&l!==e&&(null==i||i(l,e)),u.current=e}})}function c(e){var n=e.disabled,t=e.onCollectionChanged,o=(0,i.kj)();return l().createElement(a.Form.Item,{name:["config","collection"],label:o("Collection"),rules:[{required:!0}]},l().createElement(u,{disabled:n,onCollectionChanged:t}))}},6855:function(e,n,t){t.d(n,{F:function(){return s}});var o=t(9155),l=t.n(o),a=t(2059),r=t(7768),i=t(1801),u=t(9488);function c(e,n,t,o,l,a,r){try{var i=e[a](r),u=i.value}catch(e){t(e);return}i.done?n(u):Promise.resolve(u).then(o,l)}function s(e){var n=e.collection,t=e.label,o=e.name,s=e.required,d=e.maxAssociationFieldDepth,f=(0,u.kj)();return l().createElement(a.Form.Item,{name:void 0===o?["config","params","filter"]:o,label:null!=t?t:f("Filter"),validateTrigger:["onChange","onBlur"],rules:void 0===s||s?[{validator:function(e,n){var t;return(t=function(){return function(e,n){var t,o,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(r,"next",{value:u(0)}),i(r,"throw",{value:u(1)}),i(r,"return",{value:u(2)}),"function"==typeof Symbol&&i(r,Symbol.iterator,{value:function(){return this}}),r;function u(i){return function(u){var c=[i,u];if(t)throw TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(l=2&c[0]?o.return:c[0]?o.throw||((l=o.return)&&l.call(o),0):o.next)&&!(l=l.call(o,c[1])).done)return l;switch(o=0,l&&(c=[2&c[0],l.value]),c[0]){case 0:case 1:l=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(l=(l=a.trys).length>0&&l[l.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!l||c[1]>l[0]&&c[1]<l[3])){a.label=c[1];break}if(6===c[0]&&a.label<l[1]){a.label=l[1],l=c;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(c);break}l[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=l=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){if(!(0,r.isValidFilter)(n))throw Error(f("Please add at least one condition"));return[2]})},function(){var e=this,n=arguments;return new Promise(function(o,l){var a=t.apply(e,n);function r(e){c(a,o,l,r,i,"next",e)}function i(e){c(a,o,l,r,i,"throw",e)}r(void 0)})})()}}]:void 0},l().createElement(i.N$,{collection:n,maxAssociationFieldDepth:void 0===d?2:d}))}},8950:function(e,n,t){t.d(n,{UpdateFieldset:function(){return p},UpdatePresetFieldset:function(){return v}});var o=t(9155),l=t.n(o),a=t(2059),r=t(2235),i=t(7806),u=t(9785),c=t(9488),s=t(5329),d=t(6855),f=function(e){return!(0,i.Cg)(e)||"belongsTo"===e.type};function m(){var e,n,t=(0,c.kj)(),s=a.Form.useFormInstance(),m=(0,r.Zt)(),p=a.Form.useWatch(["config","collection"]),v=a.Form.useWatch(["config","params","individualHooks"],s),g=[{label:(e=(0,c.kj)())("Update in a batch"),value:!1,tooltip:e("Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.")},{label:e("Update one by one"),value:!0,tooltip:e("The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.")}],h=!0!==v,b=!!(null==m||null==(n=m.versionStats)?void 0:n.executed);return((0,o.useEffect)(function(){p&&(s.setFieldValue(["config","usingAssignFormSchema"],void 0),s.setFieldValue(["config","assignFormSchema"],void 0),void 0===s.getFieldValue(["config","params","individualHooks"])&&s.setFieldValue(["config","params","individualHooks"],!1))},[p,s]),p)?l().createElement(l().Fragment,null,l().createElement(a.Form.Item,{name:["config","params","individualHooks"],label:t("Update mode")},l().createElement(u.$,{options:g})),l().createElement(d.F,{collection:p,label:t("Only update records matching conditions")}),l().createElement(a.Form.Item,{name:["config","params","values"],label:t("Fields values")},l().createElement(i.XH,{collection:p,fieldFilter:h?f:void 0,pruneFilteredValues:h,disabled:b}))):null}function p(){var e,n=(0,r.TA)(),t=a.Form.useFormInstance();return l().createElement(l().Fragment,null,l().createElement(s.F,{disabled:!!(null==n||null==(e=n.config)?void 0:e.collection),onCollectionChanged:function(){t.setFieldValue(["config","params","filter"],{}),t.setFieldValue(["config","params","values"],{}),t.setFieldValue(["config","usingAssignFormSchema"],void 0),t.setFieldValue(["config","assignFormSchema"],void 0)}}),l().createElement(m,null))}function v(){return l().createElement(s.F,null)}}}]);
|