@nocobase/plugin-workflow-custom-action-trigger 2.0.3
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/LICENSE +201 -0
- package/README.md +99 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/CustomActionTrigger.d.ts +186 -0
- package/dist/client/components.d.ts +11 -0
- package/dist/client/flows.d.ts +25 -0
- package/dist/client/hooks.d.ts +20 -0
- package/dist/client/index.d.ts +22 -0
- package/dist/client/index.js +10 -0
- package/dist/client/initializers.d.ts +52 -0
- package/dist/client/locale.d.ts +11 -0
- package/dist/client/settings.d.ts +12 -0
- package/dist/common/constants.d.ts +20 -0
- package/dist/common/constants.js +65 -0
- package/dist/externalVersion.js +28 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +42 -0
- package/dist/locale/de-DE.json +25 -0
- package/dist/locale/en-US.json +25 -0
- package/dist/locale/es-ES.json +25 -0
- package/dist/locale/fr-FR.json +25 -0
- package/dist/locale/hu-HU.json +25 -0
- package/dist/locale/id-ID.json +25 -0
- package/dist/locale/it-IT.json +25 -0
- package/dist/locale/ja-JP.json +25 -0
- package/dist/locale/ko-KR.json +25 -0
- package/dist/locale/nl-NL.json +25 -0
- package/dist/locale/pt-BR.json +25 -0
- package/dist/locale/ru-RU.json +25 -0
- package/dist/locale/tr-TR.json +25 -0
- package/dist/locale/uk-UA.json +25 -0
- package/dist/locale/vi-VN.json +25 -0
- package/dist/locale/zh-CN.json +25 -0
- package/dist/locale/zh-TW.json +25 -0
- package/dist/server/CustomActionTrigger.d.ts +25 -0
- package/dist/server/CustomActionTrigger.js +308 -0
- package/dist/server/Plugin.d.ts +13 -0
- package/dist/server/Plugin.js +56 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/dist/server/migrations/20250212223011-add-config-type.d.ts +13 -0
- package/dist/server/migrations/20250212223011-add-config-type.js +62 -0
- package/dist/server/migrations/20250228142643-trigger-workflow-action-schema.d.ts +13 -0
- package/dist/server/migrations/20250228142643-trigger-workflow-action-schema.js +67 -0
- package/package.json +32 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@nocobase/flow-engine"),require("@formily/react"),require("@nocobase/utils/client"),require("antd"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-custom-action-trigger",["@nocobase/client","react-router-dom","@nocobase/plugin-workflow/client","@formily/antd-v5","react","@nocobase/flow-engine","@formily/react","@nocobase/utils/client","antd","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-custom-action-trigger"]=t(require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@nocobase/flow-engine"),require("@formily/react"),require("@nocobase/utils/client"),require("antd"),require("react-i18next")):e["@nocobase/plugin-workflow-custom-action-trigger"]=t(e["@nocobase/client"],e["react-router-dom"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"],e.react,e["@nocobase/flow-engine"],e["@formily/react"],e["@nocobase/utils/client"],e.antd,e["react-i18next"])}(self,function(e,t,r,o,n,i,c,a,l,s){return function(){"use strict";var u={632:function(e){e.exports=o},505:function(e){e.exports=c},772:function(t){t.exports=e},667:function(e){e.exports=i},433:function(e){e.exports=r},584:function(e){e.exports=a},721:function(e){e.exports=l},156:function(e){e.exports=n},238:function(e){e.exports=s},128:function(e){e.exports=t}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return u[e](r,r.exports,p),r.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 r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 g={};return!function(){p.r(g),p.d(g,{default:function(){return ex}});var e=p(772),t=p(667),r=p(433),o=p(156),n=p.n(o),i="@nocobase/plugin-workflow-custom-action-trigger",c="custom-action",a={GLOBAL:0,SINGLE_RECORD:1,MULTIPLE_RECORDS:2},l=[{label:"{{t('None', { ns: \"".concat(i,'" })}}'),value:a.GLOBAL,tooltip:"{{t('Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.', { ns: \"".concat(i,'" })}}')},{label:"{{t('Single collection record', { ns: \"".concat(i,'" })}}'),value:a.SINGLE_RECORD,tooltip:"{{t('Could only be used on single record related action buttons. Such as in form, detail block and table row of record.', { ns: \"".concat(i,'" })}}')},{label:"{{t('Multiple collection records', { ns: \"".concat(i,'" })}}'),value:a.MULTIPLE_RECORDS,tooltip:"{{t('Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.', { ns: \"".concat(i,'" })}}')}];function s(e,t,r,o,n,i,c){try{var a=e[i](c),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(o,n)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function c(e){s(i,o,n,c,a,"next",e)}function a(e){s(i,o,n,c,a,"throw",e)}c(void 0)})}}function f(e,t,r){return t=y(t),function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,S()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(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&&v(e,t)}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){m(e,t,r[t])})}return e}function k(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function O(e,t){var r,o,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){var l=[i,a];if(r)throw TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(n=2&l[0]?o.return:l[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,l[1])).done)return n;switch(o=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,o=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(n=(n=c.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){c.label=l[1];break}if(6===l[0]&&c.label<n[1]){c.label=n[1],n=l;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(l);break}n[2]&&c.ops.pop(),c.trys.pop();continue}l=t.call(e,c)}catch(e){l=[6,e],o=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var x=function(e){function r(){var e;return d(this,r),e=f(this,r,arguments),m(e,"defaultProps",{title:(0,t.tExpr)("Trigger workflow",{ns:i})}),e}return w(r,e),r}(e.FormActionModel);x.define({label:(0,t.tExpr)("Trigger workflow",{ns:i})}),x.registerFlow({key:"customFormTriggerWorkflowsActionSettings",on:"click",title:"{{t('Workflow', { ns: 'workflow' })}}",steps:{confirm:{use:"confirm"},triggerWorkflows:{title:"{{t('Bind workflows', { ns: 'workflow' })}}",uiSchema:(0,r.createTriggerWorkflowsSchema)({filter:{type:c},optionFilter:function(e){return e.config.type===a.SINGLE_RECORD}}),handler:function(e,t){return u(function(){var r,o;return O(this,function(n){switch(n.label){case 0:if(!(null==(r=t.group)?void 0:r.length))return e.message.error(e.t("Button is not configured properly, please contact the administrator.",{ns:i})),[2];if(!e.blockModel)return[2];n.label=1;case 1:var c;return n.trys.push([1,3,4,5]),e.model.setProps("loading",!0),[4,e.blockModel.submitHandler(e,{},(c=u(function(r,o){var n;return O(this,function(i){switch(i.label){case 0:return[4,e.blockModel.resource.runAction("trigger",{params:k(h({},null!=o?{filterByTk:o}:{}),{triggerWorkflows:(null==(n=t.group)?void 0:n.length)?t.group.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0}),data:r})];case 1:return[2,i.sent()]}})}),function(e,t){return c.apply(this,arguments)}))];case 2:return n.sent(),e.message.success(e.t("Operation succeeded")),e.model.setProps("loading",!1),[3,5];case 3:return o=n.sent(),e.model.setProps("loading",!1),console.error("Error triggering workflows:",o),e.exit(),[3,5];case 4:return e.model.setProps("loading",!1),[7];case 5:return e.view&&e.view.close(),[2]}})})()}}}});var C=function(e){function r(){var e;return d(this,r),e=f(this,r,arguments),m(e,"defaultProps",{title:(0,t.tExpr)("Trigger workflow",{ns:i})}),e}return w(r,e),r}(e.ActionModel);m(C,"scene",e.ActionSceneEnum.record),C.define({label:(0,t.tExpr)("Trigger workflow",{ns:i})}),C.registerFlow({key:"customRecordTriggerWorkflowsActionSettings",on:"click",title:"{{t('Workflow', { ns: 'workflow' })}}",steps:{confirm:{use:"confirm"},triggerWorkflows:{title:"{{t('Bind workflows', { ns: 'workflow' })}}",uiSchema:(0,r.createTriggerWorkflowsSchema)({filter:{type:c},optionFilter:function(e){return e.config.type===a.SINGLE_RECORD}}),handler:function(e,t){return u(function(){var r,o,n,c,a;return O(this,function(l){switch(l.label){case 0:if(n=(o=e.blockModel).resource,c=o.collection,!n||!c)return[2];if(!(null==(r=t.group)?void 0:r.length))return e.message.error(e.t("Button is not configured properly, please contact the administrator.",{ns:i})),[2];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,n.runAction("trigger",{params:{triggerWorkflows:(null==(a=t.group)?void 0:a.length)?t.group.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0,filterByTk:function(e,t){if(!e||!t)return null;var r=t.filterTargetKey;return Array.isArray(r)?r.reduce(function(t,r){return t[r]=e[r],t},{}):e[r]}(e.record,c)}})];case 2:return l.sent(),e.message.success(e.t("Operation succeeded")),[3,4];case 3:return console.error("Error triggering workflows:",l.sent()),[3,4];case 4:return[2]}})})()}}}});var T=function(e){function t(){var e;return d(this,t),e=f(this,t,arguments),m(e,"defaultProps",{title:null}),e}return w(t,e),t}(e.CollectionActionModel);m(T,"scene",e.ActionSceneEnum.collection),T.define({label:"{{t('Trigger workflow', { ns: '".concat(i,"' })}}")}),T.registerFlow({key:"customCollectionTriggerWorkflowsActionSettings",title:"{{t('Workflow', { ns: 'workflow' })}}",steps:{setContextType:{hideInSettings:!0,preset:!0,title:"{{t('Context type', { ns: '".concat(i,"' })}}"),uiSchema:{type:{type:"number","x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"{{t('None', { ns: '".concat(i,"' })}}"),value:a.GLOBAL},{label:"{{t('Multiple collection records', { ns: '".concat(i,"' })}}"),value:a.MULTIPLE_RECORDS}],required:!0}},handler:function(e,t){e.model.props.title||e.model.setProps("title",t.type?e.t("Trigger workflow",{ns:i}):e.t("Trigger global workflow",{ns:i}))}},triggerWorkflows:{title:"{{t('Bind workflows', { ns: 'workflow' })}}",uiSchema:(0,r.createTriggerWorkflowsSchema)({WorkflowSelectComponent:function(e){var i=b({},function(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}(e)),c=(0,t.useFlowContext)().model,a=(0,o.useCallback)(function(e){var t=e.config,r=c.stepParams.customCollectionTriggerWorkflowsActionSettings.setContextType.type;return r&&t.type===r||!t.type},[c.stepParams.customCollectionTriggerWorkflowsActionSettings.setContextType]);return n().createElement(r.TriggerWorkflowSelect,k(h({},i),{optionFilter:a}))},filter:{type:c},usingContext:!1})}}}),T.registerFlow({key:"customCollectionTriggerWorkflowsActionEventSettings",on:"click",steps:{confirm:{use:"confirm"},trigger:{handler:function(e){return u(function(){var t,r,o,n,c,l;return O(this,function(s){switch(s.label){case 0:if(r=(t=e.model.stepParams.customCollectionTriggerWorkflowsActionSettings).setContextType.type,!(null==(n=(null!=(o=t.triggerWorkflows)?o:{}).group)?void 0:n.length))return e.message.error(e.t("Button is not configured properly, please contact the administrator.",{ns:i})),[2];if(r!==a.MULTIPLE_RECORDS)return[3,5];if(!(null==(c=e.blockModel)?void 0:c.resource))return e.message.error(e.t("No resource selected for deletion")),[2];if(0===(l=e.blockModel.resource).getSelectedRows().length)return e.message.warning(e.t("Please select at least one record.",{ns:i})),[2];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,l.runAction("trigger",{params:{triggerWorkflows:(null==n?void 0:n.length)?n.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0,filterByTk:e.blockModel.collection.getFilterByTK(l.getSelectedRows())}})];case 2:return s.sent(),l.setSelectedRows([]),[3,4];case 3:return console.error("Error triggering workflows:",s.sent()),[2];case 4:return[3,11];case 5:if(r!==a.GLOBAL)return[3,10];s.label=6;case 6:return s.trys.push([6,8,,9]),[4,e.api.request({url:"workflows:trigger",method:"post",params:{triggerWorkflows:(null==n?void 0:n.length)?n.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0}})];case 7:return s.sent(),[3,9];case 8:return console.error("Error triggering workflows:",s.sent()),[2];case 9:return[3,11];case 10:throw Error("Invalid context type");case 11:return e.message.success(e.t("Operation succeeded")),[2]}})})()}}}});var P=function(e){function r(){var e;return d(this,r),e=f(this,r,arguments),m(e,"defaultProps",{title:(0,t.tExpr)("Trigger global workflow",{ns:i})}),e}return w(r,e),r}(e.ActionModel);m(P,"scene",e.ActionSceneEnum.collection),P.define({label:(0,t.tExpr)("Trigger global workflow",{ns:i})}),P.registerFlow({key:"customCollectionGlobalTriggerWorkflowsActionSettings",on:"click",title:"{{t('Workflow', { ns: 'workflow' })}}",steps:{confirm:{use:"confirm"},triggerWorkflows:{title:"{{t('Custom action event', { ns: '".concat(i,"' })}}"),uiSchema:(0,r.createTriggerWorkflowsSchema)({filter:{type:c},optionFilter:function(e){return e.config.type===a.GLOBAL},usingContext:!1}),handler:function(e,t){return u(function(){var r;return O(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e.api.request({url:"workflows:trigger",method:"post",params:{triggerWorkflows:(null==(r=t.group)?void 0:r.length)?t.group.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0}})];case 1:return o.sent(),e.message.success(e.t("Workflow triggered on selected records successfully")),[3,3];case 2:return console.error("Error triggering workflows:",o.sent()),[3,3];case 3:return[2]}})})()}}}});var A=p(505);function j(t){var r,o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.i18n.t(t,(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({},n),o=o={ns:i},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r))}var W=p(128),R=p(721),E=p(584);function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function I(e,t,r,o,n,i,c){try{var a=e[i](c),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(o,n)}function M(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function c(e){I(i,o,n,c,a,"next",e)}function a(e){I(i,o,n,c,a,"throw",e)}c(void 0)})}}function L(e,t){var r,o,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){var l=[i,a];if(r)throw TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(n=2&l[0]?o.return:l[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,l[1])).done)return n;switch(o=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,o=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(n=(n=c.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){c.label=l[1];break}if(6===l[0]&&c.label<n[1]){c.label=n[1],n=l;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(l);break}n[2]&&c.ops.pop(),c.trys.pop();continue}l=t.call(e,c)}catch(e){l=[6,e],o=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function D(){var t=(0,e.useAPIClient)(),r=(0,e.useActionContext)().setVisible,o=(0,W.useNavigate)(),n=(0,A.useFieldSchema)(),i=(0,A.useField)(),c=(0,e.useCompile)(),a=R.App.useApp(),l=a.modal,s=a.message,u=(0,e.useLocalVariables)(),f=(0,e.useVariables)();return{onClick:function(a,p){return M(function(){var a,g,d,m,b,y,w,h,k,v,S,O;return L(this,function(x){switch(x.label){case 0:if(d=(g=null!=(a=null==n?void 0:n["x-action-settings"])?a:{}).onSuccess,m=g.triggerWorkflows,y=(b=d||{}).manualClose,w=b.redirecting,h=b.redirectTo,k=b.successMessage,v=b.actionAfterSuccess,!(null==m?void 0:m.length))return s.error(j("Button is not configured properly, please contact the administrator.")),[2];i.data=i.data||{},i.data.loading=!0,x.label=1;case 1:return x.trys.push([1,4,5,6]),[4,t.resource("workflows").trigger({triggerWorkflows:m.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(",")})];case 2:return S=x.sent(),i.data.data=S,null==p||p(),"previous"!==v&&(v||!0===w)||null==r||r(!1),[4,(0,e.getVariableValue)(h,{variables:f,localVariables:u})];case 3:if(O=x.sent(),!k)return(w&&!v||"redirect"===v)&&O&&((0,E.isURL)(O)?window.location.href=O:o(O)),[2];return y?l.success({title:c(k),onOk:M(function(){return L(this,function(e){return(w&&!v||"redirect"===v)&&O&&((0,E.isURL)(O)?window.location.href=O:o(O)),[2]})})}):(s.success(c(k)),(w&&!v||"redirect"===v)&&O&&((0,E.isURL)(d.redirectTo)?window.location.href=d.redirectTo:o(d.redirectTo))),[3,6];case 4:return console.error(x.sent()),[3,6];case 5:return i.data.loading=!1,[7];case 6:return[2]}})})()}}}function F(){var t=(0,e.useAPIClient)(),r=(0,e.useActionContext)().setVisible,o=(0,W.useNavigate)(),n=(0,A.useFieldSchema)(),i=(0,A.useField)(),c=(0,e.useCompile)(),a=R.App.useApp(),l=a.modal,s=a.message,u=(0,e.useCollection)(),f=(0,e.useBlockRequestContext)().field,p=(0,e.useLocalVariables)(),g=(0,e.useVariables)();return{onClick:function(a,d){return M(function(){var a,m,b,y,w,h,k,v,S,O,x,C,T,P,A,W;return L(this,function(R){switch(R.label){case 0:if(w=(y=null!=(b=null==n?void 0:n["x-action-settings"])?b:{}).onSuccess,h=y.triggerWorkflows,v=(k=w||{}).manualClose,S=k.redirecting,O=k.redirectTo,x=k.successMessage,C=k.actionAfterSuccess,!(null==h?void 0:h.length))return s.error(j("Button is not configured properly, please contact the administrator.")),[2];if(!(null==(m=f.data)||null==(a=m.selectedRowKeys)?void 0:a.length))return s.error(j("Please select at least one record.")),[2];i.data=i.data||{},i.data.loading=!0,R.label=1;case 1:return R.trys.push([1,4,5,6]),[4,t.resource(u.name,void 0,{"x-data-source":u.dataSource}).trigger({filterByTk:null==(T=f.data)?void 0:T.selectedRowKeys,triggerWorkflows:(null==h?void 0:h.length)?h.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0})];case 2:return A=R.sent(),(null==(P=f.data)?void 0:P.clearSelectedRowKeys)&&f.data.clearSelectedRowKeys(),i.data.data=A,null==d||d(),"previous"!==C&&(C||!0===S)||null==r||r(!1),[4,(0,e.getVariableValue)(O,{variables:g,localVariables:p})];case 3:if(W=R.sent(),!x)return(S&&!C||"redirect"===C)&&W&&((0,E.isURL)(W)?window.location.href=W:o(W)),[2];return v?l.success({title:c(x),onOk:M(function(){return L(this,function(e){return(S&&!C||"redirect"===C)&&W&&((0,E.isURL)(W)?window.location.href=W:o(W)),[2]})})}):(s.success(c(x)),(S&&!C||"redirect"===C)&&W&&((0,E.isURL)(w.redirectTo)?window.location.href=w.redirectTo:o(w.redirectTo))),[3,6];case 4:return console.error(R.sent()),[3,6];case 5:return i.data.loading=!1,[7];case 6:return[2]}})})()}}}function z(){var t=(0,A.useForm)(),r=(0,e.useBlockRequestContext)(),o=(r.field,r.resource),n=(0,e.useActionContext)().setVisible,i=(0,e.useFilterByTk)(),c=(0,W.useNavigate)(),a=(0,A.useFieldSchema)(),l=(0,A.useField)(),s=(0,e.useCompile)(),u=R.App.useApp(),f=u.modal,p=u.message,g=(0,e.useCollectValuesToSubmit)(),d=(0,e.useLocalVariables)(),m=(0,e.useVariables)();return{onClick:function(r,u){return M(function(){var r,b,y,w,h,k,v,S,O,x,C,T,P,A;return L(this,function(W){switch(W.label){case 0:if(y=(b=null!=(r=null==a?void 0:a["x-action-settings"])?r:{}).onSuccess,w=b.skipValidator,h=b.triggerWorkflows,v=(k=y||{}).manualClose,S=k.redirecting,O=k.redirectTo,x=k.successMessage,C=k.actionAfterSuccess,!(null==h?void 0:h.length))return p.error(j("Button is not configured properly, please contact the administrator.")),[2];if(w)return[3,2];return[4,t.submit()];case 1:W.sent(),W.label=2;case 2:return[4,g()];case 3:T=W.sent(),l.data=l.data||{},l.data.loading=!0,W.label=4;case 4:return W.trys.push([4,7,8,9]),[4,o.trigger({values:T,filterByTk:i,triggerWorkflows:(null==h?void 0:h.length)?h.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0})];case 5:return P=W.sent(),l.data.data=P,null==u||u(),"previous"!==C&&(C||!0===S)||null==n||n(!1),[4,(0,e.getVariableValue)(O,{variables:m,localVariables:d})];case 6:if(A=W.sent(),!x)return(S&&!C||"redirect"===C)&&A&&((0,E.isURL)(A)?window.location.href=A:c(A)),[2];return v?f.success({title:s(x),onOk:M(function(){return L(this,function(e){switch(e.label){case 0:return[4,t.reset()];case 1:return e.sent(),(S&&!C||"redirect"===C)&&A&&((0,E.isURL)(A)?window.location.href=A:c(A)),[2]}})})}):(p.success(s(x)),(S&&!C||"redirect"===C)&&A&&((0,E.isURL)(y.redirectTo)?window.location.href=y.redirectTo:c(y.redirectTo))),[3,9];case 7:return console.error(W.sent()),[3,9];case 8:return l.data.loading=!1,[7];case 9:return[2]}})})()}}}function q(){var t=(0,e.useCompile)(),r=(0,e.useFilterByTk)(),o=(0,e.useCollectionRecordData)(),n=(0,A.useField)(),i=(0,A.useFieldSchema)(),c=(0,e.useBlockRequestContext)(),a=(c.field,c.resource),l=(0,e.useActionContext)(),s=l.setVisible,u=l.setSubmitted,f=R.App.useApp(),p=f.modal,g=f.message,d=(0,W.useNavigate)(),m=(0,e.useLocalVariables)(),b=(0,e.useVariables)();return{onClick:function(c,l){return M(function(){var c,f,y,w,h,k,v,S,O,x,C;return L(this,function(T){switch(T.label){case 0:if(y=(f=null!=(c=null==i?void 0:i["x-action-settings"])?c:{}).onSuccess,w=f.triggerWorkflows,k=(h=y||{}).manualClose,v=h.redirecting,S=h.redirectTo,O=h.successMessage,x=h.actionAfterSuccess,!(null==w?void 0:w.length))return g.error(j("Button is not configured properly, please contact the administrator.")),[2];n.data=n.data||{},n.data.loading=!0,T.label=1;case 1:return T.trys.push([1,4,5,6]),[4,a.trigger({filterByTk:r,triggerWorkflows:(null==w?void 0:w.length)?w.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0})];case 2:return T.sent(),l&&l(),"previous"!==x&&(x||!0===v)||null==s||s(!1),null==u||u(!0),[4,(0,e.getVariableValue)(S,{variables:b,localVariables:((function(e){if(Array.isArray(e))return B(e)})(m)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(m)||function(e,t){if(e){if("string"==typeof e)return B(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}}(m)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{name:"$record",ctx:new Proxy(o,{})}])})];case 3:if(C=T.sent(),!O)return(v&&!x||"redirect"===x)&&C&&((0,E.isURL)(C)?window.location.href=C:d(C)),[2];return k?p.success({title:t(O),onOk:function(){return M(function(){return L(this,function(e){return(v&&!x||"redirect"===x)&&C&&((0,E.isURL)(C)?window.location.href=C:d(C)),[2]})})()}}):(g.success(t(O)),(v&&!x||"redirect"===x)&&C&&((0,E.isURL)(y.redirectTo)?window.location.href=y.redirectTo:d(y.redirectTo))),[3,6];case 4:return console.error(T.sent()),[3,6];case 5:return n.data.loading=!1,[7];case 6:return[2]}})})()}}}function _(e){var t=(0,r.useCurrentWorkflowContext)();return e.types.includes(t.config.type)?e.children:null}function V(t){var r,o,i=D().onClick;return n().createElement(e.Action,(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({},t),o=o={onClick:i},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r))}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){G(e,t,r[t])})}return e}function $(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}}function X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function Y(t,o){var n,i,c=(n=(0,e.parseCollectionName)(t.collection),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n,1)||Q(n,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],a=(0,e.useCompile)(),l=(0,r.useGetDataSourceCollectionManager)(c),s=(0,r.useGetDataSourceCollectionManager)();if(t.global)return null;var u=(0,r.getCollectionFieldOptions)($(K({appends:["user"]},o),{fields:[{collectionName:"users",name:"user",type:"hasOne",target:"users",uiSchema:{title:j("User acted")}}],compile:a,collectionManager:s}));return J((0,r.getCollectionFieldOptions)($(K({appends:["data"].concat(J((null==(i=t.appends)?void 0:i.map(function(e){return"data.".concat(e)}))||[]))},o),{fields:[{collectionName:t.collection,name:"data",type:"hasOne",target:t.collection,uiSchema:{title:j("Trigger data")}}],compile:a,collectionManager:l}))).concat(J(u),[{label:j("Role of user acted"),value:"roleName"}])}var Z=function(t){var o;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function c(){var t,o,s;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return o=c,s=arguments,o=U(o),G(t=function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"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(o,s||[],U(this).constructor):o.apply(this,s)),"title",'{{t("Custom action event", { ns: "'.concat(i,'" })}}')),G(t,"description",'{{t(\'When the "Trigger Workflow" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the "Trigger Workflow" button.\', { ns: "'.concat(i,'" })}}')),G(t,"fieldset",{type:{type:"number",title:'{{t("Context type", { ns: "'.concat(i,'" })}}'),description:'{{t("", { ns: "'.concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:l},default:a.GLOBAL,"x-disabled":"{{ useWorkflowAnyExecuted() }}"},collection:G({type:"string",title:'{{t("Collection")}}',required:!0,"x-decorator":"FormItem","x-component":"DataSourceCollectionCascader","x-disabled":"{{ useWorkflowAnyExecuted() }}"},"x-reactions",[{target:"appends",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}},{dependencies:["type"],fulfill:{state:{visible:"{{Boolean($deps[0])}}"}}}]),appends:{type:"array",title:'{{t("Associations to use", { ns: "'.concat(i,'" })}}'),description:'{{t("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.", { ns: "workflow" })}}',"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{multiple:!0,useCollection:function(){var e=(0,A.useForm)().values;return null==e?void 0:e.collection}},"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]}}),G(t,"triggerFieldset",{data:{type:"void","x-component":"TriggerScopeProvider","x-component-props":{types:[a.SINGLE_RECORD]},properties:{data:{type:"object",title:'{{t("Trigger data", { ns: "'.concat(i,'" })}}'),description:'{{t("Choose a record or primary key of a record in the collection to trigger.", { ns: "workflow" })}}',"x-decorator":"FormItem","x-component":"TriggerCollectionRecordSelect",default:null,required:!0}}},filterByTk:{type:"void","x-component":"TriggerScopeProvider","x-component-props":{types:[a.MULTIPLE_RECORDS]},properties:{filterByTk:{type:"array",title:'{{t("Trigger data", { ns: "'.concat(i,'" })}}'),description:'{{t("Choose a record or primary key of a record in the collection to trigger.", { ns: "workflow" })}}',"x-decorator":"FormItem","x-component":"TriggerCollectionRecordSelect","x-component-props":{multiple:!0,objectValue:!1},default:[],required:!0}}},userId:{type:"number",title:'{{t("User acted", { ns: "'.concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableWrapper","x-component-props":{nullable:!1,changeOnSelect:!0,variableOptions:{types:[function(e){return e.isForeignKey||"context"===e.type?"users"===e.target:"users"===e.collectionName&&"id"===e.name}]},render:function(t){return n().createElement(e.RemoteSelect,K({fieldNames:{label:"nickname",value:"id"},service:{resource:"users"},manual:!1},t))}},default:null,required:!0},roleName:{type:"string",title:'{{t("Role of user acted", { ns: "'.concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableWrapper","x-component-props":{nullable:!1,changeOnSelect:!0,variableOptions:{types:[function(e){return e.isForeignKey?"roles"===e.target:"roles"===e.collectionName&&"name"===e.name}]},render:function(t){return n().createElement(e.RemoteSelect,K({fieldNames:{label:"title",value:"name"},service:{resource:"roles"},manual:!1},t))}},default:null}}),G(t,"scope",{useWorkflowAnyExecuted:r.useWorkflowAnyExecuted,useCollectionDataSource:e.useCollectionDataSource}),G(t,"components",{TriggerScopeProvider:_,TriggerCollectionRecordSelect:r.TriggerCollectionRecordSelect,WorkflowVariableWrapper:r.WorkflowVariableWrapper,RadioWithTooltip:r.RadioWithTooltip}),G(t,"isActionTriggerable_deprecated",function(e,t){return"customize:triggerWorkflows"===t.buttonAction&&e.type===a.SINGLE_RECORD}),G(t,"useVariables",Y),t}return c.prototype=Object.create(t&&t.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),t&&H(c,t),o=[{key:"validate",value:function(e){return!e.type||e.type===a.GLOBAL||[a.SINGLE_RECORD,a.MULTIPLE_RECORDS].includes(e.type)&&e.collection}},{key:"useInitializers",value:function(e){return e.global||!e.collection?null:{name:"triggerData",type:"item",key:"triggerData",title:'{{t("Trigger data", { ns: "workflow" })}}',Component:r.CollectionBlockInitializer,collection:e.collection,dataPath:"$context.data"}}},{key:"getCreateModelMenuItem",value:function(e){var t=e.config;return t.collection?{key:"triggerData",label:'{{t("Trigger data", { ns: "workflow" })}}',useModel:"NodeDetailsModel",createModelOptions:{use:"NodeDetailsModel",stepParams:{resourceSettings:{init:{dataSourceKey:"main",collectionName:t.collection,dataPath:"$context.data"}},cardSettings:{titleDescription:{title:'{{t("Trigger data", { ns: "workflow" })}}'}}},subModels:{grid:{use:"NodeDetailsGridModel",subType:"object"}}}}:null}}],function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(c.prototype,o),c}(r.Trigger),ee=p(632),et=p(238);function er(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){er(e,t,r[t])})}return e}function en(){var t,r=(0,e.useDesignable)().dn,o=(0,et.useTranslation)().t,c=(0,A.useFieldSchema)(),l=(0,e.useCollection)(),s="customize:collectionTriggerWorkflows"===c["x-action"];return n().createElement(e.SchemaSettingsActionModalItem,{title:o("Bind workflows",{ns:"workflow"}),width:"30%",components:{Alert:R.Alert,ArrayTable:ee.ArrayTable,RemoteSelect:e.RemoteSelect},schema:{type:"void",title:o("Bind workflows",{ns:"workflow"}),properties:{description:{type:"void","x-component":"Alert","x-component-props":{message:s?'{{t(\'Only support custom action workflow with context type set to "Multiple records".\', { ns: "'.concat(i,'" })}}'):'{{t(\'Only support custom action workflow with context type set to "None".\', { ns: "'.concat(i,'" })}}'),style:{marginBottom:"1em"}}},group:{type:"array","x-component":"ArrayTable","x-decorator":"FormItem",items:{type:"object",properties:{sort:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},workflowKey:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:"{{t('Workflow', { ns: 'workflow' })}}"},properties:{workflowKey:{type:"string","x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{manual:!1,placeholder:o("Select workflow",{ns:"workflow"}),fieldNames:{label:"title",value:"key"},dataSource:"main",service:{resource:"workflows",action:"list",params:{filter:eo({type:"custom-action",enabled:!0},s?{"config.type":a.MULTIPLE_RECORDS,"config.collection":(0,e.joinCollectionName)(l.dataSource,l.name)}:{$or:[{"config.type":a.GLOBAL},{"config.type":null}]})}}},required:!0}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:32},properties:{remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void",title:o("Add workflow",{ns:"workflow"}),"x-component":"ArrayTable.Addition"}}}}},initialValues:{group:null==c||null==(t=c["x-action-settings"])?void 0:t.triggerWorkflows},onSubmit:function(e){var t,o=e.group;c["x-action-settings"]||(c["x-action-settings"]={}),c["x-action-settings"].triggerWorkflows=o,r.emit("patch",{schema:(er(t={},"x-uid",c["x-uid"]),er(t,"x-action-settings",c["x-action-settings"]),t)})}})}var ei=new e.SchemaSettings({name:"actionSettings:submitToWorkflow",items:[{name:"editButton",Component:e.ButtonEditor,useComponentProps:function(){return(0,e.useSchemaToolbar)().buttonEditorProps}},{name:"linkageRules",Component:e.SchemaSettingsLinkageRules,useComponentProps:function(){var t,r,o=(0,e.useCollection_deprecated)().name;return t=eo({},(0,e.useSchemaToolbar)().linkageRulesProps),r=r={collectionName:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}},{name:"secondConfirmation",Component:e.SecondConFirm},{name:"assignFieldValues",Component:e.AssignedFieldValues},{name:"skipRequiredValidation",Component:e.SkipValidation},{name:"afterSuccessfulSubmission",Component:e.AfterSuccess},{name:"refreshDataBlockRequest",Component:e.RefreshDataBlockRequest,useComponentProps:function(){return{isPopupAction:!1}}},{name:"bindWorkflow",Component:r.BindWorkflowConfig},e.SchemaSettingAccessControl,{name:"delete",sort:100,Component:e.RemoveButton,useComponentProps:function(){return(0,e.useSchemaToolbar)().removeButtonProps}}]}),ec=new e.SchemaSettings({name:"actionSettings:collectionTriggerWorkflow",items:[{name:"editButton",Component:e.ButtonEditor,useComponentProps:function(){return(0,e.useSchemaToolbar)().buttonEditorProps}},{name:"linkageRules",Component:e.SchemaSettingsLinkageRules,useComponentProps:function(){return eo({},(0,e.useSchemaToolbar)().linkageRulesProps)}},{name:"secondConfirmation",Component:e.SecondConFirm},{name:"afterSuccessfulSubmission",Component:e.AfterSuccess},{name:"refreshDataBlockRequest",Component:e.RefreshDataBlockRequest,useComponentProps:function(){return{isPopupAction:!1}}},{name:"bindWorkflow",Component:en},e.SchemaSettingAccessControl,{name:"delete",sort:100,Component:e.RemoveButton,useComponentProps:function(){return(0,e.useSchemaToolbar)().removeButtonProps}}]}),ea=new e.SchemaSettings({name:"actionSettings:globalTriggerWorkflow",items:[{name:"editButton",Component:e.ButtonEditor,useComponentProps:function(){return(0,e.useSchemaToolbar)().buttonEditorProps}},{name:"linkageRules",Component:e.SchemaSettingsLinkageRules,useComponentProps:function(){return eo({},(0,e.useSchemaToolbar)().linkageRulesProps)}},{name:"secondConfirmation",Component:e.SecondConFirm},{name:"afterSuccessfulSubmission",Component:e.AfterSuccess},{name:"bindWorkflow",Component:en},{name:"refreshDataBlockRequest",Component:e.RefreshDataBlockRequest,useComponentProps:function(){return{isPopupAction:!1}},useVisible:function(){return!!(0,(0,e.useDataBlockRequestGetter)().getDataBlockRequest)()}},e.SchemaSettingAccessControl,{name:"delete",sort:100,Component:e.RemoveButton,useComponentProps:function(){return(0,e.useSchemaToolbar)().removeButtonProps}}]});function el(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function es(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var eu={name:"triggerWorkflow",title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),Component:"CustomizeActionInitializer",schema:{title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),"x-component":"Action","x-use-component-props":"useFormWorkflowCustomActionProps","x-settings":"actionSettings:submitToWorkflow","x-decorator":"ACLActionProvider","x-action-settings":{skipValidator:!1,onSuccess:{manualClose:!0,redirecting:!1,successMessage:'{{t("Submitted successfully")}}'},refreshDataBlockRequest:!0,triggerWorkflows:[]},"x-toolbar-props":{initializer:!1,showBorder:!1},"x-action":"customize:triggerWorkflows"},useVisible:function(){return"publicForm"!==((0,e.useDataBlockProps)()||{}).type}},ef={name:"triggerWorkflow",title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),Component:"CustomizeActionInitializer",schema:{title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),"x-component":"Action","x-use-component-props":"useRecordWorkflowCustomTriggerActionProps","x-settings":"actionSettings:submitToWorkflow","x-decorator":"ACLActionProvider","x-action-settings":{onSuccess:{manualClose:!0,redirecting:!1,successMessage:'{{t("Submitted successfully")}}'},refreshDataBlockRequest:!0,triggerWorkflows:[]},"x-toolbar-props":{initializer:!1,showBorder:!1},"x-action":"customize:triggerWorkflows"}},ep=es(el({},ef),{schema:es(el({},ef.schema),{"x-component":"Action.Link"})}),eg={name:"triggerWorkflow",title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),Component:"CustomizeActionInitializer",schema:{title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),"x-component":"Action","x-use-component-props":"useGlobalTriggerWorkflowCustomActionProps","x-settings":"actionSettings:globalTriggerWorkflow","x-decorator":"ACLActionProvider","x-action-settings":{onSuccess:{manualClose:!0,redirecting:!1,successMessage:'{{t("Submitted successfully")}}'},refreshDataBlockRequest:!0,triggerWorkflows:[]},"x-toolbar-props":{initializer:!1,showBorder:!1},"x-action":"customize:globalTriggerWorkflows"}};function ed(t){var o=(0,e.useSchemaInitializer)().insert,c=(0,et.useTranslation)().t;return n().createElement(e.ModalActionSchemaInitializerItem,{title:c("Trigger workflow",{ns:i}),components:{RadioWithTooltip:r.RadioWithTooltip},modalSchema:{title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),properties:{type:{title:"{{t('Context type', { ns: \"".concat(i,'" })}}'),"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:l.filter(function(e){var t=e.value;return[a.GLOBAL,a.MULTIPLE_RECORDS].includes(t)})},required:!0}}},onSubmit:function(e){o(el({type:"void",title:"{{t('".concat(e.type?"Trigger workflow":"Trigger global workflow","', { ns: \"").concat(i,'" })}}'),"x-component":"Action","x-component-props":{},"x-action":e.type?"customize:collectionTriggerWorkflows":"customize:globalTriggerWorkflows","x-toolbar":"ActionSchemaToolbar","x-decorator":"ACLActionProvider","x-action-settings":{onSuccess:{manualClose:!1,redirecting:!1,successMessage:'{{t("Operation succeeded")}}'}}},e.type?{"x-use-component-props":"useCollectionTriggerWorkflowCustomActionProps","x-settings":"actionSettings:collectionTriggerWorkflow"}:{"x-use-component-props":"useGlobalTriggerWorkflowCustomActionProps","x-settings":"actionSettings:globalTriggerWorkflow"}))}})}function em(t){var r=(0,e.useSchemaInitializer)().insert,o=(0,et.useTranslation)().t;return n().createElement(e.ModalActionSchemaInitializerItem,{title:o("Trigger workflow",{ns:i}),modalSchema:{title:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}'),properties:{title:{title:"{{t('Title')}}","x-component":"Input","x-decorator":"FormItem",required:!0,default:'{{t("Trigger workflow", { ns: "'.concat(i,'" })}}')},icon:{title:"{{t('Icon')}}","x-component":"IconPicker","x-decorator":"FormItem",required:!0,default:"thunderboltoutlined"},iconColor:{title:"{{t('Color')}}","x-component":"ColorPicker","x-decorator":"FormItem",required:!0,default:"#1677FF"}}},onSubmit:function(e){r({type:"void",title:e.title,"x-component":"WorkbenchAction","x-decorator":"ACLActionProvider","x-component-props":{icon:e.icon,iconColor:e.iconColor,targetComponent:"GlobalTriggerWorkflowAction"},"x-action":"customize:globalTriggerWorkflows","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:globalTriggerWorkflow","x-action-settings":{onSuccess:{manualClose:!1,redirecting:!1,successMessage:'{{t("Operation succeeded")}}'}}})}})}function eb(e,t,r,o,n,i,c){try{var a=e[i](c),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(o,n)}function ey(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function c(e){eb(i,o,n,c,a,"next",e)}function a(e){eb(i,o,n,c,a,"throw",e)}c(void 0)})}}function ew(e,t,r){return(ew=eS()?Reflect.construct:function(e,t,r){var o=[null];o.push.apply(o,t);var n=new(Function.bind.apply(e,o));return r&&ek(n,r.prototype),n}).apply(null,arguments)}function eh(e){return(eh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ek(e,t){return(ek=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ev(e){var t="function"==typeof Map?new Map:void 0;return(ev=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,r)}function r(){return ew(e,arguments,eh(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ek(r,e)})(e)}function eS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eS=function(){return!!e})()}function eO(e,t){var r,o,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){var l=[i,a];if(r)throw TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(n=2&l[0]?o.return:l[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,l[1])).done)return n;switch(o=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,o=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(n=(n=c.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){c.label=l[1];break}if(6===l[0]&&c.label<n[1]){c.label=n[1],n=l;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(l);break}n[2]&&c.ops.pop(),c.trys.pop();continue}l=t.call(e,c)}catch(e){l=[6,e],o=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var ex=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=eh(e),function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eS()?Reflect.construct(e,t||[],eh(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&ek(r,e),t=[{key:"beforeLoad",value:function(){var e=this;return ey(function(){return eO(this,function(t){return e.app.eventBus.addEventListener("plugin:kanban:loaded",function(){e.app.schemaInitializerManager.get("kanban:configureActions").add("customize.triggerWorkflow",eg)}),e.app.eventBus.addEventListener("plugin:calendar:loaded",function(){e.app.schemaInitializerManager.get("calendar:configureActions").add("customize.triggerWorkflow",eg)}),e.app.eventBus.addEventListener("plugin:gantt:loaded",function(){e.app.schemaInitializerManager.get("gantt:configureActions").add("customize.triggerWorkflow",eg),e.app.schemaInitializerManager.addItem("gantt:configureActions","customize.triggerWorkflow",{Component:ed})}),e.app.eventBus.addEventListener("plugin:block-workbench:loaded",function(){e.app.schemaInitializerManager.addItem("workbench:configureActions","customize.triggerWorkflow",{Component:em})}),[2]})})()}},{key:"load",value:function(){var e=this;return ey(function(){return eO(this,function(t){return e.app.pm.get("workflow").registerTrigger(c,Z),e.app.addScopes({useFormWorkflowCustomActionProps:z,useRecordWorkflowCustomTriggerActionProps:q,useCollectionTriggerWorkflowCustomActionProps:F,useGlobalTriggerWorkflowCustomActionProps:D}),e.app.addComponents({GlobalTriggerWorkflowAction:V}),e.app.schemaSettingsManager.add(ei),e.app.schemaSettingsManager.add(ec),e.app.schemaSettingsManager.add(ea),e.app.schemaInitializerManager.get("FormActionInitializers").add("customize.triggerWorkflow",eu),e.app.schemaInitializerManager.get("createForm:configureActions").add("customize.triggerWorkflow",eu),e.app.schemaInitializerManager.get("editForm:configureActions").add("customize.triggerWorkflow",eu),e.app.schemaInitializerManager.get("detailsWithPaging:configureActions").add("customize.triggerWorkflow",ef),e.app.schemaInitializerManager.get("details:configureActions").add("customize.triggerWorkflow",ef),e.app.schemaInitializerManager.get("table:configureItemActions").add("customize.triggerWorkflow",ep),e.app.schemaInitializerManager.get("gridCard:configureItemActions").add("customize.triggerWorkflow",ep),e.app.schemaInitializerManager.get("list:configureItemActions").add("customize.triggerWorkflow",ep),e.app.schemaInitializerManager.get("list:configureActions").add("customize.triggerWorkflow",eg),e.app.schemaInitializerManager.get("gridCard:configureActions").add("customize.triggerWorkflow",eg),e.app.schemaInitializerManager.addItem("table:configureActions","customize.triggerWorkflow",{Component:ed}),e.flowEngine.registerModels({FormTriggerWorkflowActionModel:x,RecordTriggerWorkflowActionModel:C,CollectionTriggerWorkflowActionModel:T}),[2]})})()}}],function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(r.prototype,t),r}(ev(e.Plugin))}(),g}()});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
11
|
+
export declare const submitToWorkflowActionInitializer: SchemaInitializerItemType;
|
|
12
|
+
export declare const recordTriggerWorkflowActionInitializer: SchemaInitializerItemType;
|
|
13
|
+
export declare const recordTriggerWorkflowActionLinkInitializer: {
|
|
14
|
+
schema: any;
|
|
15
|
+
name: string;
|
|
16
|
+
Component?: string | React.ComponentType<any>;
|
|
17
|
+
sort?: number;
|
|
18
|
+
componentProps?: Omit<any, "children">;
|
|
19
|
+
useComponentProps?: () => Omit<any, "children">;
|
|
20
|
+
useVisible?: () => boolean;
|
|
21
|
+
children?: SchemaInitializerItemType<any>[];
|
|
22
|
+
hideIfNoChildren?: boolean;
|
|
23
|
+
useChildren?: () => SchemaInitializerItemType<any>[];
|
|
24
|
+
};
|
|
25
|
+
export declare const globalTriggerWorkflowActionInitializer: {
|
|
26
|
+
name: string;
|
|
27
|
+
title: string;
|
|
28
|
+
Component: string;
|
|
29
|
+
schema: {
|
|
30
|
+
title: string;
|
|
31
|
+
'x-component': string;
|
|
32
|
+
'x-use-component-props': string;
|
|
33
|
+
'x-settings': string;
|
|
34
|
+
'x-decorator': string;
|
|
35
|
+
'x-action-settings': {
|
|
36
|
+
onSuccess: {
|
|
37
|
+
manualClose: boolean;
|
|
38
|
+
redirecting: boolean;
|
|
39
|
+
successMessage: string;
|
|
40
|
+
};
|
|
41
|
+
refreshDataBlockRequest: boolean;
|
|
42
|
+
triggerWorkflows: any[];
|
|
43
|
+
};
|
|
44
|
+
'x-toolbar-props': {
|
|
45
|
+
initializer: boolean;
|
|
46
|
+
showBorder: boolean;
|
|
47
|
+
};
|
|
48
|
+
'x-action': string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare function DataBlockTriggerWorkflowActionSchemaInitializerItem(props: any): React.JSX.Element;
|
|
52
|
+
export declare function WorkbenchTriggerWorkflowActionSchemaInitializerItem(props: any): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { NAMESPACE } from '../common/constants';
|
|
10
|
+
export { NAMESPACE };
|
|
11
|
+
export declare function lang(key: string, options?: {}): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { SchemaSettings } from '@nocobase/client';
|
|
10
|
+
export declare const customizeSubmitToWorkflowActionSettings: SchemaSettings<{}>;
|
|
11
|
+
export declare const customizeCollectionTriggerWorkflowActionSettings: SchemaSettings<{}>;
|
|
12
|
+
export declare const customizeGlobalTriggerWorkflowActionSettings: SchemaSettings<{}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NAMESPACE = "@nocobase/plugin-workflow-custom-action-trigger";
|
|
10
|
+
export declare const EVENT_TYPE = "custom-action";
|
|
11
|
+
export declare const CONTEXT_TYPE: {
|
|
12
|
+
GLOBAL: number;
|
|
13
|
+
SINGLE_RECORD: number;
|
|
14
|
+
MULTIPLE_RECORDS: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const CONTEXT_TYPE_OPTIONS: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
tooltip: string;
|
|
20
|
+
}[];
|
|
@@ -0,0 +1,65 @@
|
|
|
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 constants_exports = {};
|
|
28
|
+
__export(constants_exports, {
|
|
29
|
+
CONTEXT_TYPE: () => CONTEXT_TYPE,
|
|
30
|
+
CONTEXT_TYPE_OPTIONS: () => CONTEXT_TYPE_OPTIONS,
|
|
31
|
+
EVENT_TYPE: () => EVENT_TYPE,
|
|
32
|
+
NAMESPACE: () => NAMESPACE
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(constants_exports);
|
|
35
|
+
const NAMESPACE = "@nocobase/plugin-workflow-custom-action-trigger";
|
|
36
|
+
const EVENT_TYPE = "custom-action";
|
|
37
|
+
const CONTEXT_TYPE = {
|
|
38
|
+
GLOBAL: 0,
|
|
39
|
+
SINGLE_RECORD: 1,
|
|
40
|
+
MULTIPLE_RECORDS: 2
|
|
41
|
+
};
|
|
42
|
+
const CONTEXT_TYPE_OPTIONS = [
|
|
43
|
+
{
|
|
44
|
+
label: `{{t('None', { ns: "${NAMESPACE}" })}}`,
|
|
45
|
+
value: CONTEXT_TYPE.GLOBAL,
|
|
46
|
+
tooltip: `{{t('Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.', { ns: "${NAMESPACE}" })}}`
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: `{{t('Single collection record', { ns: "${NAMESPACE}" })}}`,
|
|
50
|
+
value: CONTEXT_TYPE.SINGLE_RECORD,
|
|
51
|
+
tooltip: `{{t('Could only be used on single record related action buttons. Such as in form, detail block and table row of record.', { ns: "${NAMESPACE}" })}}`
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: `{{t('Multiple collection records', { ns: "${NAMESPACE}" })}}`,
|
|
55
|
+
value: CONTEXT_TYPE.MULTIPLE_RECORDS,
|
|
56
|
+
tooltip: `{{t('Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.', { ns: "${NAMESPACE}" })}}`
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
CONTEXT_TYPE,
|
|
62
|
+
CONTEXT_TYPE_OPTIONS,
|
|
63
|
+
EVENT_TYPE,
|
|
64
|
+
NAMESPACE
|
|
65
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
"react": "18.2.0",
|
|
12
|
+
"@formily/react": "2.3.7",
|
|
13
|
+
"@nocobase/client": "2.0.3",
|
|
14
|
+
"@nocobase/plugin-workflow": "2.0.3",
|
|
15
|
+
"@nocobase/flow-engine": "2.0.3",
|
|
16
|
+
"antd": "5.24.2",
|
|
17
|
+
"react-router-dom": "6.30.1",
|
|
18
|
+
"@nocobase/utils": "2.0.3",
|
|
19
|
+
"react-i18next": "11.18.6",
|
|
20
|
+
"@formily/antd-v5": "1.2.3",
|
|
21
|
+
"@nocobase/plugin-error-handler": "2.0.3",
|
|
22
|
+
"@nocobase/data-source-manager": "2.0.3",
|
|
23
|
+
"@nocobase/server": "2.0.3",
|
|
24
|
+
"lodash": "4.17.21",
|
|
25
|
+
"@nocobase/actions": "2.0.3",
|
|
26
|
+
"@nocobase/plugin-workflow-test": "2.0.3",
|
|
27
|
+
"@nocobase/test": "2.0.3"
|
|
28
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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 program is offered under a commercial license.
|
|
7
|
+
* For more information, see <https://www.nocobase.com/agreement>
|
|
8
|
+
*/
|
|
9
|
+
export { default } from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var src_exports = {};
|
|
38
|
+
__export(src_exports, {
|
|
39
|
+
default: () => import_server.default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(src_exports);
|
|
42
|
+
var import_server = __toESM(require("./server"));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Associations to use",
|
|
3
|
+
"Binding scope": "Binding scope",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Button is not configured properly, please contact the administrator.",
|
|
5
|
+
"Context type": "Context type",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Could only be used on single record related action buttons. Such as in form, detail block and table row of record.",
|
|
9
|
+
"Custom action event": "Custom action event",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Different positions of the created trigger button can use different context types.",
|
|
11
|
+
"Multiple collection records": "Multiple collection records",
|
|
12
|
+
"None": "None",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Only support custom action workflow with context type set to \"Multiple records\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Only support custom action workflow with context type set to \"None\".",
|
|
15
|
+
"Please select at least one record.": "Please select at least one record.",
|
|
16
|
+
"Role of user acted": "Role of user acted",
|
|
17
|
+
"Single collection record": "Single collection record",
|
|
18
|
+
"Trigger data": "Trigger data",
|
|
19
|
+
"Trigger global workflow": "Trigger global workflow",
|
|
20
|
+
"Trigger workflow": "Trigger workflow",
|
|
21
|
+
"User acted": "User acted",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\"."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Associations to use",
|
|
3
|
+
"Binding scope": "Binding scope",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Button is not configured properly, please contact the administrator.",
|
|
5
|
+
"Context type": "Context type",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Could only be used on single record related action buttons. Such as in form, detail block and table row of record.",
|
|
9
|
+
"Custom action event": "Custom action event",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Different positions of the created trigger button can use different context types.",
|
|
11
|
+
"Multiple collection records": "Multiple collection records",
|
|
12
|
+
"None": "None",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Only support custom action workflow with context type set to \"Multiple records\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Only support custom action workflow with context type set to \"None\".",
|
|
15
|
+
"Please select at least one record.": "Please select at least one record.",
|
|
16
|
+
"Role of user acted": "Role of user acted",
|
|
17
|
+
"Single collection record": "Single collection record",
|
|
18
|
+
"Trigger data": "Trigger data",
|
|
19
|
+
"Trigger global workflow": "Trigger global workflow",
|
|
20
|
+
"Trigger workflow": "Trigger workflow",
|
|
21
|
+
"User acted": "User acted",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\"."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Associations to use",
|
|
3
|
+
"Binding scope": "Binding scope",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Button is not configured properly, please contact the administrator.",
|
|
5
|
+
"Context type": "Context type",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Could only be used on single record related action buttons. Such as in form, detail block and table row of record.",
|
|
9
|
+
"Custom action event": "Custom action event",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Different positions of the created trigger button can use different context types.",
|
|
11
|
+
"Multiple collection records": "Multiple collection records",
|
|
12
|
+
"None": "None",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Only support custom action workflow with context type set to \"Multiple records\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Only support custom action workflow with context type set to \"None\".",
|
|
15
|
+
"Please select at least one record.": "Please select at least one record.",
|
|
16
|
+
"Role of user acted": "Role of user acted",
|
|
17
|
+
"Single collection record": "Single collection record",
|
|
18
|
+
"Trigger data": "Trigger data",
|
|
19
|
+
"Trigger global workflow": "Trigger global workflow",
|
|
20
|
+
"Trigger workflow": "Trigger workflow",
|
|
21
|
+
"User acted": "User acted",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\"."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Associations to use",
|
|
3
|
+
"Binding scope": "Binding scope",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Button is not configured properly, please contact the administrator.",
|
|
5
|
+
"Context type": "Context type",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Could only be used on single record related action buttons. Such as in form, detail block and table row of record.",
|
|
9
|
+
"Custom action event": "Custom action event",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Different positions of the created trigger button can use different context types.",
|
|
11
|
+
"Multiple collection records": "Multiple collection records",
|
|
12
|
+
"None": "None",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Only support custom action workflow with context type set to \"Multiple records\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Only support custom action workflow with context type set to \"None\".",
|
|
15
|
+
"Please select at least one record.": "Please select at least one record.",
|
|
16
|
+
"Role of user acted": "Role of user acted",
|
|
17
|
+
"Single collection record": "Single collection record",
|
|
18
|
+
"Trigger data": "Trigger data",
|
|
19
|
+
"Trigger global workflow": "Trigger global workflow",
|
|
20
|
+
"Trigger workflow": "Trigger workflow",
|
|
21
|
+
"User acted": "User acted",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\"."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Használandó kapcsolatok",
|
|
3
|
+
"Binding scope": "Kötési hatókör",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "A gomb nincs megfelelően konfigurálva, kérjük, lépjen kapcsolatba az adminisztrátorral.",
|
|
5
|
+
"Context type": "Kontextus típus",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Használható nem rekordhoz kapcsolódó műveletgombokon. Például a munkaterület panelen vagy táblablokkokban lévő gombokon.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Csak több rekordhoz kapcsolódó műveletgombokon használható. Például csoportos művelethez a táblablokkban. A kiváltó változóban lévő adatok tömbként fognak szerepelni.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Csak egyetlen rekordhoz kapcsolódó műveletgombokon használható. Például űrlapon, részletblokkban és rekord táblasorában.",
|
|
9
|
+
"Custom action event": "Egyéni művelet esemény",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "A létrehozott kiváltó gomb különböző pozíciói különböző kontextustípusokat használhatnak.",
|
|
11
|
+
"Multiple collection records": "Több gyűjteményi rekord",
|
|
12
|
+
"None": "Nincs",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Csak olyan egyéni művelet munkafolyamatot támogat, amelynek kontextustípusa \"Több rekord\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Csak olyan egyéni művelet munkafolyamatot támogat, amelynek kontextustípusa \"Nincs\".",
|
|
15
|
+
"Please select at least one record.": "Kérjük, válasszon legalább egy rekordot.",
|
|
16
|
+
"Role of user acted": "A cselekvő felhasználó szerepe",
|
|
17
|
+
"Single collection record": "Egyetlen gyűjteményi rekord",
|
|
18
|
+
"Trigger data": "Kiváltó adat",
|
|
19
|
+
"Trigger global workflow": "Globális munkafolyamat indítása",
|
|
20
|
+
"Trigger workflow": "Munkafolyamat indítása",
|
|
21
|
+
"User acted": "Cselekvő felhasználó",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "Amikor a \"Munkafolyamat indítása\" gombra kattintanak, az esemény a gomb helyétől függő különböző kontextus alapján aktiválódik. Összetett adatfeldolgozáshoz, amely nem kezelhető egyszerűen a NocoBase beépített műveleteivel (CRUD), meghatározhat egy műveletsorozatot egy munkafolyamaton keresztül, és elindíthatja azt a \"Munkafolyamat indítása\" gombbal.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "Amikor a \"Munkafolyamat indítása\" gombra kattintanak, az esemény a gomb helyén lévő egyetlen rekord alapján aktiválódik. Alkalmas olyan esetekre, amikor az adatfeldolgozás összetett és nem kezelhető egyszerűen a NocoBase beépített műveleteivel (CRUD), egy műveletsorozat határozható meg munkafolyamaton keresztül, és aktiválható a \"Munkafolyamat indítása\" gombbal.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "A munkafolyamat közvetlenül aktiválódik a gomb megnyomásakor, adatmentés nélkül. Csak az \"Egyéni művelet esemény\"-hez való kötést támogatja."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Asosiasi untuk digunakan",
|
|
3
|
+
"Binding scope": "Cakupan pengikatan",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Tombol tidak dikonfigurasi dengan benar, harap hubungi administrator.",
|
|
5
|
+
"Context type": "Tipe konteks",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Dapat digunakan pada tombol tindakan yang tidak terkait dengan catatan. Seperti tombol di panel workbench atau di blok tabel.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Hanya dapat digunakan pada tombol tindakan terkait beberapa catatan. Seperti untuk tindakan batch di blok tabel. Data dalam variabel pemicu akan berupa array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Hanya dapat digunakan pada tombol tindakan terkait catatan tunggal. Seperti dalam formulir, blok detail, dan baris tabel catatan.",
|
|
9
|
+
"Custom action event": "Peristiwa tindakan kustom",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Posisi tombol pemicu yang dibuat yang berbeda dapat menggunakan tipe konteks yang berbeda.",
|
|
11
|
+
"Multiple collection records": "Beberapa catatan koleksi",
|
|
12
|
+
"None": "Tidak ada",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Hanya mendukung alur kerja tindakan kustom dengan tipe konteks diatur ke \"Beberapa catatan\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Hanya mendukung alur kerja tindakan kustom dengan tipe konteks diatur ke \"Tidak ada\".",
|
|
15
|
+
"Please select at least one record.": "Harap pilih setidaknya satu catatan.",
|
|
16
|
+
"Role of user acted": "Peran pengguna yang bertindak",
|
|
17
|
+
"Single collection record": "Catatan koleksi tunggal",
|
|
18
|
+
"Trigger data": "Data pemicu",
|
|
19
|
+
"Trigger global workflow": "Picu alur kerja global",
|
|
20
|
+
"Trigger workflow": "Picu alur kerja",
|
|
21
|
+
"User acted": "Pengguna yang bertindak",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "Ketika tombol \"Picu Alur Kerja\" diklik, peristiwa dipicu berdasarkan konteks berbeda di mana tombol berada. Untuk pemrosesan data kompleks yang tidak dapat ditangani hanya dengan operasi bawaan (CRUD) NocoBase, Anda dapat mendefinisikan serangkaian operasi melalui alur kerja dan memicunya dengan tombol \"Picu Alur Kerja\".",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "Ketika tombol \"Picu Alur Kerja\" diklik, peristiwa dipicu berdasarkan catatan tunggal di mana tombol berada. Cocok untuk ketika pemrosesan data kompleks dan tidak dapat diproses hanya dengan operasi bawaan (CRUD) NocoBase, serangkaian operasi dapat didefinisikan melalui alur kerja dan dipicu melalui tombol \"Picu Alur Kerja\".",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Alur kerja akan dipicu langsung setelah tombol diklik, tanpa menyimpan data. Hanya mendukung untuk diikat dengan \"Peristiwa tindakan kustom\"."
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Associations to use": "Associations to use",
|
|
3
|
+
"Binding scope": "Binding scope",
|
|
4
|
+
"Button is not configured properly, please contact the administrator.": "Button is not configured properly, please contact the administrator.",
|
|
5
|
+
"Context type": "Context type",
|
|
6
|
+
"Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.": "Could be used on non-record related action buttons. Such as buttons in workbench panel or in table blocks.",
|
|
7
|
+
"Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.": "Could only be used on multiple record related action buttons. Such as for batch action in table block. The data in trigger variable will be an array.",
|
|
8
|
+
"Could only be used on single record related action buttons. Such as in form, detail block and table row of record.": "Could only be used on single record related action buttons. Such as in form, detail block and table row of record.",
|
|
9
|
+
"Custom action event": "Custom action event",
|
|
10
|
+
"Different positions of the created trigger button can use different context types.": "Different positions of the created trigger button can use different context types.",
|
|
11
|
+
"Multiple collection records": "Multiple collection records",
|
|
12
|
+
"None": "None",
|
|
13
|
+
"Only support custom action workflow with context type set to \"Multiple records\".": "Only support custom action workflow with context type set to \"Multiple records\".",
|
|
14
|
+
"Only support custom action workflow with context type set to \"None\".": "Only support custom action workflow with context type set to \"None\".",
|
|
15
|
+
"Please select at least one record.": "Please select at least one record.",
|
|
16
|
+
"Role of user acted": "Role of user acted",
|
|
17
|
+
"Single collection record": "Single collection record",
|
|
18
|
+
"Trigger data": "Trigger data",
|
|
19
|
+
"Trigger global workflow": "Trigger global workflow",
|
|
20
|
+
"Trigger workflow": "Trigger workflow",
|
|
21
|
+
"User acted": "User acted",
|
|
22
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on different context where the button is located. For complex data processing that cannot be handled simply by built-in operations (CRUD) of NocoBase, you can define a series of operations through a workflow and trigger it with the \"Trigger Workflow\" button.",
|
|
23
|
+
"When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.": "When the \"Trigger Workflow\" button is clicked, the event is triggered based on the single record where the button is located. Suitable for when the data processing is complex and cannot be simply processed by built-in operations (CRUD) of NocoBase, a series of operations can be defined through workflow and triggered through the \"Trigger Workflow\" button.",
|
|
24
|
+
"Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\"."
|
|
25
|
+
}
|