@nocobase/plugin-workflow-cc 2.2.0-alpha.2 → 2.2.0-alpha.4
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/client-v2.d.ts +2 -0
- package/client-v2.js +3 -0
- package/dist/client/164.42418a9c211faaaa.js +10 -0
- package/dist/client/208.b1a881076e8752f0.js +10 -0
- package/dist/client/352.4012efde85e3acaf.js +10 -0
- package/dist/client/437.78f2b52a4a3fac84.js +10 -0
- package/dist/client/458.da07eac3bc1412d1.js +10 -0
- package/dist/client/486.5966b38a176b8313.js +10 -0
- package/dist/client/746.5a3050cf694f81cb.js +10 -0
- package/dist/client/86.e6c4759f3e699b2d.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client/instruction/index.d.ts +2 -128
- package/dist/client-v2/164.3f552926dcec4af8.js +10 -0
- package/dist/client-v2/352.a8dbaca3691905cb.js +10 -0
- package/dist/client-v2/437.cbf01251aba7d74f.js +10 -0
- package/dist/client-v2/458.51f1362d12aefe62.js +10 -0
- package/dist/client-v2/486.d0a505ec5bea795c.js +10 -0
- package/dist/client-v2/612.9fcdf3a84dcb028a.js +10 -0
- package/dist/client-v2/746.d22edf24454ac805.js +10 -0
- package/dist/client-v2/86.f7881bb89e51a4b6.js +10 -0
- package/dist/client-v2/components/FlowModelConfigInput.d.ts +20 -0
- package/dist/{client → client-v2}/flow/RemoteFlowModelRenderer.d.ts +5 -5
- package/dist/client-v2/hooks/useTempAssociationSources.d.ts +11 -0
- package/dist/{client/models/CCChildPageModel.d.ts → client-v2/index.d.ts} +2 -4
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +12 -0
- package/dist/{client → client-v2}/models/CCBlockGridModel.d.ts +2 -1
- package/dist/client-v2/models/CCChildPageModel.d.ts +23 -0
- package/dist/{client → client-v2}/models/CCTaskCardDetailsAssociationFieldGroupModel.d.ts +3 -2
- package/dist/{client → client-v2}/models/CCTaskCardDetailsItemModel.d.ts +16 -10
- package/dist/{client → client-v2}/models/CCTaskCardDetailsModel.d.ts +5 -9
- package/dist/{client → client-v2}/models/CCTaskCardGridModel.d.ts +2 -4
- package/dist/{client → client-v2}/models/CCTriggerBlockGridModel.d.ts +2 -1
- package/dist/client-v2/models/registerModelLoaders.d.ts +10 -0
- package/dist/client-v2/nodes/cc.d.ts +21 -0
- package/dist/client-v2/nodes/components/RecipientsInput.d.ts +19 -0
- package/dist/{client/models/CCChildPageTabModel.d.ts → client-v2/nodes/components/cc.d.ts} +2 -4
- package/dist/client-v2/plugin.d.ts +16 -0
- package/dist/client-v2/utils/registerWorkflowCcCollections.d.ts +10 -0
- package/dist/client-v2/workflowPluginCompat.d.ts +41 -0
- package/dist/externalVersion.js +12 -12
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/zh-CN.json +1 -0
- package/package.json +8 -3
- package/dist/client/instruction/SchemaConfig.d.ts +0 -17
|
@@ -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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_cc_client_v2=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2||[]).push([["486"],{429:function(e,t,n){n.r(t),n.d(t,{CCTaskCardDetailsAssociationFieldGroupModel:function(){return y}});var o,r=n(485),i=n(694),l=n(488);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return a(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,void 0)}}(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 s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var d=["job","execution","user","node.*","job.*","workflow.*","execution.*"],p=["workflow.title","node.title"],b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.blacklist,o=t.whitelist,r=function(t){return!!t.includes(e)||t.some(function(t){if(t.endsWith("*")){var n=t.slice(0,-1);return e.startsWith(n)}return!1})};return!r(f(p).concat(f(void 0===o?[]:o)))&&!!r(f(d).concat(f(void 0===n?[]:n)))},y=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=c(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(e,t||[],c(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&u(n,e),t=[{key:"defineChildren",value:function(e){var t=this.itemModelName;return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return n.getToOneAssociationFields().map(function(n){var r=o?"".concat(o,".").concat(n.name):n.name;return b(r)||!n.targetCollection?null:{key:"".concat(r,"-assocationField"),label:n.title,children:function(){return[{key:"".concat(r,"-children-collectionField"),label:"Display fields",type:"group",children:n.targetCollection.getFields().map(function(n){var o="".concat(r,".").concat(n.name),l=i.DisplayItemModel.getDefaultBindingByField(e,n,{fallbackToTargetTitleField:!0});return!l||n.target||b(o)?null:{key:"c-".concat(r,".").concat(n.name),label:n.title,useModel:t,toggleable:function(e){var t;return(null==(t=e.getStepParams("fieldSettings","init"))?void 0:t.fieldPath)===o},createModelOptions:{stepParams:{fieldSettings:{init:{dataSourceKey:e.collection.dataSourceKey,collectionName:e.collection.name,fieldPath:o,associationPathName:r}}},subModels:{field:{use:l.modelName}}}}}).filter(Boolean)}].filter(function(e){return e.children.length>0})}}}).filter(Boolean)}(e.collection)}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(n,t),n}(r.DetailsAssociationFieldGroupModel);(o="itemModelName")in y?Object.defineProperty(y,o,{value:"CCTaskCardDetailsItemModel",enumerable:!0,configurable:!0,writable:!0}):y[o]="CCTaskCardDetailsItemModel",y.define({label:(0,l.MZ)("Other information",{ns:l.CU})}),t.default=y}}]);
|
|
@@ -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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_cc_client_v2=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2||[]).push([["612"],{628:function(e,t,n){n.r(t),n.d(t,{CCTaskCardDetailsItemModel:function(){return S},getEligibleTempAssociationSources:function(){return k},updateWorkflowCcTaskAssociationFields:function(){return C}});var r=n(485),o=n(197),i=n(694),l=n(170),a=n(488);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){return t=m(t),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function p(e,t,n){return(p="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var h=["node","job","workflow","execution","user"],w=function(e){function t(){return s(this,t),c(this,t,arguments)}return y(t,e),f(t,[{key:"targetCollection",get:function(){return this.options.target&&this.flowEngine.dataSourceManager.getCollection(this.options.dataSourceKey,this.options.target)}}]),t}(i.CollectionField),k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=new Map;return e.forEach(function(e){var r,i=(0,l.P)(e.nodeType,e.nodeKey);if(!(n.has(i)||(null==t?void 0:t.getField(i)))){var a=function(e){if(Array.isArray(e))return e}(r=(0,o.parseCollectionName)(e.collection))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw n}}return o}}(r)||v(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=a[0],c=a[1];c&&n.set(i,{dataSourceKey:u||"main",fieldName:i,nodeId:e.nodeId,nodeKey:e.nodeKey,nodeType:e.nodeType,target:c,title:e.nodeKey})}}),Array.from(n.values())},C=function(e){var t=e.flowEngine,n=e.nodes,r=e.tempAssociationSources,o=e.workflow;if(t){var i=t.dataSourceManager.getCollection("main","workflowCcTasks");if(i){var l=k(r||[],i);l.length&&l.map(function(e){var t,r,i,l,a=null==(l=[o].concat(function(e){if(Array.isArray(e))return u(e)}(i=n||[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||v(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).find(function(t){return(null==t?void 0:t.id)===e.nodeId}))?void 0:l.title;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={title:a||e.nodeKey},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}).forEach(function(e){i.addField(new w({type:"belongsTo",name:e.fieldName,dataSourceKey:e.dataSourceKey,target:e.target,interface:"m2o",isAssociation:!0,uiSchema:{title:e.title||e.target}}))})}}},S=function(e){function t(){return s(this,t),c(this,t,arguments)}return y(t,e),f(t,[{key:"onInit",value:function(e){var n=this;p(m(t.prototype),"onInit",this).call(this,e),this.context.defineProperty("collectionField",{get:function(){var e=n.getFieldSettingsInitParams(),t=n.context.dataSourceManager.getCollectionField("".concat(e.dataSourceKey,".").concat(e.collectionName,".").concat(e.fieldPath));return!t&&n.context.workflow?(C({flowEngine:n.flowEngine,workflow:n.context.workflow,nodes:n.context.nodes,tempAssociationSources:n.context.tempAssociationSources}),n.context.dataSourceManager.getCollectionField("".concat(e.dataSourceKey,".").concat(e.collectionName,".").concat(e.fieldPath))):t},cache:!1})}}],[{key:"defineChildren",value:function(e){var t=this,n=e.collection;return n.getFields().map(function(r){var o=t.getDefaultBindingByField(e,r,{fallbackToTargetTitleField:!0});if(!o||h.includes(r.name)||r.name.startsWith(l.G))return null;var i=e.prefixFieldPath?"".concat(e.prefixFieldPath,".").concat(r.name):r.name;return{key:i,label:r.title,refreshTargets:["DetailsCustomItemModel/DetailsJSFieldItemModel"],toggleable:function(e){var t;return(null==(t=e.getStepParams("fieldSettings","init"))?void 0:t.fieldPath)===i},useModel:"CCTaskCardDetailsItemModel",createModelOptions:function(){var t,l,a;return{use:"CCTaskCardDetailsItemModel",stepParams:{fieldSettings:{init:{dataSourceKey:n.dataSourceKey,collectionName:null!=(t=null==(a=e.model.context.blockModel)||null==(l=a.collection)?void 0:l.name)?t:n.name,fieldPath:i}}},subModels:{field:{use:o.modelName,props:"function"==typeof o.defaultProps?o.defaultProps(e,r):o.defaultProps}}}}}}).filter(Boolean)}}]),t}(r.DetailsItemModel);S.define({label:(0,a.MZ)("CC information",{ns:a.CU}),sort:100}),t.default=S},343:function(e,t,n){n.d(t,{CCFieldset:function(){return J}});var r=n(197),o=n(59),i=n(155),l=n.n(i),a=n(375),u=n(694),c=n(625),s=n(770);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var f=n(488),p=n(813),m=n(628),y=n(87);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,o,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){v(i,r,o,l,a,"next",e)}function a(e){v(i,r,o,l,a,"throw",e)}l(void 0)})}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){h(e,t,n[t])})}return e}function k(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||M(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function M(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}}function O(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(l,"next",{value:u(0)}),a(l,"throw",{value:u(1)}),a(l,"return",{value:u(2)}),"function"==typeof Symbol&&a(l,Symbol.iterator,{value:function(){return this}}),l;function u(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var E=["ccUid","taskCardUid"],P=["tempAssociationFields"],T=new Map,j=new WeakMap,x=new WeakMap,A=new WeakMap;function F(e){var t=j.get(e);return!!(t&&Array.from(t.values()).some(function(e){return e>0}))}function I(e){var t=e.form,n=e.message,r=e.nodeId,o=e.pending;if(null!=r){if(!x.has(t)){var i=t.validateFields.bind(t);x.set(t,t.validateFields),t.validateFields=function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return b(function(){return O(this,function(e){return F(t)?[2,Promise.reject({values:t.getFieldsValue(!0),errorFields:[{name:["config"],errors:[n]}],outOfDate:!1})]:[2,i.apply(void 0,function(e){if(Array.isArray(e))return g(e)}(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||M(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())]})})()}}if(!A.has(t)){var l=t.submit.bind(t);A.set(t,t.submit),t.submit=function(){return F(t)?void t.validateFields().catch(function(){}):l()}}var a=j.get(t);a||(a=new Map,j.set(t,a));var u=a.get(r)||0,c=o?u+1:Math.max(0,u-1);c?a.set(r,c):a.delete(r)}}function _(){return{async:!0,subType:"object",use:"CCBlockGridModel"}}function D(){return{use:"CCChildPageTabModel",stepParams:{pageTabSettings:{tab:{title:'{{t("Details")}}'}}},subModels:{grid:_()}}}function U(e){var t,n=e.disabled,a=e.form,f=e.kind,g=e.node,v=e.nodes,h=e.onGeneratedUidChange,M=e.onModelReady,E=e.onNodeConfigPatch,P=e.uid,T=e.uidPrefix,j=e.upstreams,x=e.workflow,A=(0,u.useFlowEngine)(),F=o.theme.useToken().token,I=(0,c.useMemoizedFn)(function(e){var t,n,o,i;return"interface"===f?(o=(n=C(function(e){if(!e)return["main","users"];var t=(0,r.parseCollectionName)(e);return(null==t?void 0:t[0])&&(null==t?void 0:t[1])?t:["main",e]}(null==x||null==(t=x.config)?void 0:t.collection),2))[0],i=n[1],{async:!0,subType:"object",uid:e,use:"CCChildPageModel",props:{displayTitle:!1,enableTabs:!1,title:'{{t("User interface", { ns: "@nocobase/plugin-workflow-cc" })}}'},subModels:{tabs:[D()]},stepParams:{pageSettings:{general:{displayTitle:!1,enableTabs:!1,title:'{{t("User interface", { ns: "@nocobase/plugin-workflow-cc" })}}'}},CCChildPageSettings:{init:{collectionName:i,dataSourceKey:o}}}}):{async:!0,subType:"object",uid:e,use:"CCTaskCardDetailsModel",stepParams:{resourceSettings:{init:{dataSourceKey:"main",collectionName:"workflowCcTasks"}},detailsSettings:{layout:{layout:"horizontal"}}},subModels:{grid:{subType:"object",use:"CCTaskCardGridModel"}}}}),U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,s.y)();return(0,i.useMemo)(function(){if(!e)return[];var r,o,i,l,a,u=null==(a=n.getTrigger(e.type))||null==(l=a.useTempAssociationSource)?void 0:l.call(a,e.config,e),c=u||"string"!=typeof(i=null==(r=e)||null==(o=r.config)?void 0:o.collection)||!i||(null==r?void 0:r.id)==null?null:{collection:i,nodeId:r.id,nodeKey:"workflow",nodeType:"workflow"},s=t.map(function(e){var t,r;return null==(r=n.getInstruction(e.type))||null==(t=r.useTempAssociationSource)?void 0:t.call(r,e)}).filter(Boolean);return u||c?[u||c].concat(function(e){if(Array.isArray(e))return d(e)}(s)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e){if(e){if("string"==typeof e)return d(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,void 0)}}(s)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):s},[t,e,n])}(x,j||[]),B=(0,i.useMemo)(function(){return U.map(function(e){return"".concat(e.nodeType,":").concat(e.nodeKey)}).join("|")},[U]),K=(0,c.useMemoizedFn)(function(e){var t=g.config||{};if(!n&&t.tempAssociationFields!==e){g.config=k(w({},t),{tempAssociationFields:e});var r=t&&(void 0===t?"undefined":S(t))==="object"?a.getFieldValue(["config"]):void 0;a.setFieldsValue({config:k(w({},r&&(void 0===r?"undefined":S(r))==="object"?r:{}),{tempAssociationFields:e})}),E({tempAssociationFields:e}).catch(function(){})}}),G=(0,c.useRequest)(function(){return b(function(){var e;return O(this,function(t){var r,o;switch(t.label){case 0:return t.trys.push([0,,7,8]),(0,p.W)(A),(0,y.o)(A),[4,function(e){return b(function(e){var t,n,r,o,i,l,a,c,s,d,f;return O(this,function(p){var m,y;switch(p.label){case 0:return t=e.canRegenerateUid,n=e.createModelOptions,r=e.flowEngine,o=e.onGeneratedUidChange,i=e.uid,l=e.uidPrefix,s="string"==typeof(m=c=n(i)).use?m.use:null==(y=m.use)?void 0:y.name,[4,r.loadOrCreateModel(c)];case 1:if(!(null==(d=p.sent())?void 0:d.uid)||!s||(null==d?void 0:d.use)===s||!t)return[2,d];return null==(a=r.removeModelWithSubModels)||a.call(r,d.uid),f=(0,u.randomId)(l),[4,null==o?void 0:o(f)];case 2:if(!1===p.sent())return[2,null];return[4,r.loadOrCreateModel(n(f))];case 3:return[2,p.sent()]}})}).apply(this,arguments)}({canRegenerateUid:!!h,createModelOptions:I,flowEngine:A,onGeneratedUidChange:h,uid:P,uidPrefix:T})];case 1:if(!(e=t.sent()))return[2,null];if("interface"!==f)return[3,3];return[4,(r=e,b(function(){var e,t,n,o,i,l,a,u,c,s,d;return O(this,function(f){switch(f.label){case 0:var p,m,y,g;if(o=!1,(null==(i=null==(t=(n=r).subModels)||null==(e=t.tabs)?void 0:e[0])?void 0:i.uid)||!n.addSubModel||(i=n.addSubModel("tabs",D()),o=!0),!(null==i?void 0:i.uid)||Array.isArray(y=null==(p=a=null==(l=i.subModels)?void 0:l.grid)||null==(m=p.subModels)?void 0:m.items)&&y.length>0)return[3,5];return[4,(g=i.uid,b(function(){var e,t;return O(this,function(n){switch(n.label){case 0:return[4,null==(e=A.getModelClassAsync)?void 0:e.call(A,"CCBlockGridModel")];case 1:return n.sent(),[4,null==(t=A.loadModel)?void 0:t.call(A,{parentId:g,refresh:!0,subKey:"grid"})];case 2:return[2,n.sent()]}})})())];case 1:if(!(null==(u=f.sent())?void 0:u.uid))return[3,2];return null==(c=i.setSubModel)||c.call(i,"grid",u),[3,5];case 2:if(!(null==a?void 0:a.uid))return[3,4];return[4,null==(s=a.save)?void 0:s.call(a)];case 3:return f.sent(),[3,5];case 4:(null==a?void 0:a.uid)||!i.setSubModel?(null==a?void 0:a.uid)||!i.addSubModel||(i.addSubModel("grid",_()),o=!0):(i.setSubModel("grid",_()),o=!0),f.label=5;case 5:if(!o)return[3,7];return[4,null==(d=n.save)?void 0:d.call(n)];case 6:f.sent(),f.label=7;case 7:return[2]}})})())];case 2:return t.sent(),[3,6];case 3:return[4,(o=e,b(function(){var e,t,n;return O(this,function(r){switch(r.label){case 0:if((null==(e=(n=o).subModels)?void 0:e.grid)||!n.addSubModel)return[2];return n.addSubModel("grid",{subType:"object",use:"CCTaskCardGridModel"}),[4,null==(t=n.save)?void 0:t.call(n)];case 1:return r.sent(),[2]}})})())];case 4:return t.sent(),[4,b(function(){var e,t,n,r,o,i;return O(this,function(l){switch(l.label){case 0:return o=["CCTaskCardDetailsItemModel","CCTaskCardDetailsAssociationFieldGroupModel","TaskCardCommonItemModel"],((null==(i=null==(t=A.context)||null==(e=t.app)?void 0:e.pm)||null==(n=i.get)?void 0:n.call(i,"ui-templates"))||(null==i||null==(r=i.get)?void 0:r.call(i,"@nocobase/plugin-ui-templates")))&&o.push("SubModelTemplateImporterModel"),[4,Promise.all(o.map(function(e){var t;return null==(t=A.getModelClassAsync)?void 0:t.call(A,e)}))];case 1:return l.sent(),[2]}})})()];case 5:t.sent(),(0,m.updateWorkflowCcTaskAssociationFields)({flowEngine:A,workflow:x,nodes:j,tempAssociationSources:U}),t.label=6;case 6:return e.context.defineProperty("flowSettingsEnabled",{get:function(){return!n},cache:!1}),e.context.defineProperty("view",{value:{inputArgs:{flowContext:{workflow:x,nodes:(null==v?void 0:v.length)?v:[g]},availableUpstreams:j||[],node:g,nodeConfig:(null==g?void 0:g.config)||{},workflowCcConfigDialog:!0}}}),e.context.defineProperty("workflow",{get:function(){return x},cache:!1}),e.context.defineProperty("nodes",{get:function(){return v||[]},cache:!1}),e.context.defineProperty("tempAssociationSources",{get:function(){return U},cache:!1}),e.context.defineProperty("ccTaskTempAssociationSync",{get:function(){return K},cache:!1}),[2,e];case 7:return null==M||M(),[7];case 8:return[2]}})})()},{refreshDeps:[P,n,f,null==x||null==(t=x.config)?void 0:t.collection,null==g?void 0:g.key,null==v?void 0:v.length,B]}),R=G.data,z=G.loading;return((0,i.useEffect)(function(){"taskCard"===f&&(0,m.updateWorkflowCcTaskAssociationFields)({flowEngine:A,workflow:x,nodes:j,tempAssociationSources:U})},[A,f,U,B,j,x]),!z&&(null==R?void 0:R.uid))?l().createElement(u.FlowModelRenderer,{model:R,hideRemoveInSettings:!0,showFlowSettings:"taskCard"===f}):l().createElement(o.Spin,{style:{display:"block",margin:F.marginLG}})}var B=function(e){var t=e.configKey,n=e.disabled,s=e.kind,d=e.legacyConfigKey,p=e.onChange,m=e.value,y=(0,u.useFlowContext)(),g=(0,f.kj)(),v=o.theme.useToken().token,k=o.Form.useFormInstance(),M=(0,r.useCurrentWorkflowContext)(),j=(0,r.useNodeContext)(),x=(0,r.useFlowContext)(),A=(0,r.useAvailableUpstreams)(j),F=(0,i.useRef)(null==j?void 0:j.id),_=(0,i.useRef)(w({},(null==j?void 0:j.config)||{})),D=(0,i.useRef)(!1),B=C((0,i.useState)(!1),2),K=B[0],G=B[1],R=o.Form.useWatch(["config",d||"__workflowCcLegacyConfig__"],k),z=null!=R?R:d?k.getFieldValue(["config",d]):void 0,W="interface"===s?g("User interface"):g("Task card"),N="interface"===s?"cc_interface_":"cc_task_card_",L=g("Please wait for the workflow model configuration to finish opening.");F.current!==(null==j?void 0:j.id)&&(F.current=null==j?void 0:j.id,_.current=w({},(null==j?void 0:j.config)||{}));var H=(0,c.useMemoizedFn)(function(e){return b(function(){var t,r,o;return O(this,function(i){switch(i.label){case 0:if(null==j.id)return[2,!1];I({form:k,message:L,nodeId:t=j.id,pending:!0}),r=T.get(t),o=b(function(){var t,o;return O(this,function(i){switch(i.label){case 0:if(!r)return[3,2];return[4,r.catch(function(){return null})];case 1:return t=i.sent(),[3,3];case 2:t=null,i.label=3;case 3:return[4,function(e){return b(function(e){var t,n,r,o,i,l,a,u,c;return O(this,function(s){switch(s.label){case 0:if(t=e.baseConfig,n=e.ctx,r=e.disabled,o=e.node,i=e.patch,r||null==o.id||!(null==(u=null==(a=n.api)||null==(l=a.resource)?void 0:l.call(a,"flow_nodes"))?void 0:u.update))return[2,null];return c=w({},t,i),[4,u.update({filterByTk:o.id,values:{config:c}})];case 1:return s.sent(),[2,c]}})}).apply(this,arguments)}({baseConfig:function(e){var t=e.fallback,n=e.form,r=e.node,o=w({},t),i=!0,l=!1,a=void 0;try{for(var u,c=E[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s,d=u.value,f=null==(s=r.config)?void 0:s[d];void 0!==f&&(o[d]=f)}}catch(e){l=!0,a=e}finally{try{i||null==c.return||c.return()}finally{if(l)throw a}}var p=n.getFieldValue(["config"]),m=!0,y=!1,g=void 0;try{for(var v,b=P[Symbol.iterator]();!(m=(v=b.next()).done);m=!0){var h=v.value;p&&(void 0===p?"undefined":S(p))==="object"&&h in p&&(o[h]=p[h])}}catch(e){y=!0,g=e}finally{try{m||null==b.return||b.return()}finally{if(y)throw g}}return o}({fallback:t||_.current,form:k,node:j}),ctx:y,disabled:n,node:j,patch:e})];case 4:if(!(o=i.sent()))return[2,!1];return _.current=o,!function(e){var t=e.form,n=e.node,r=e.patch,o=e.persistedConfig,i=t.getFieldValue(["config"]),l=w({},o,i&&(void 0===i?"undefined":S(i))==="object"?i:{},r),a=!0,u=!1,c=void 0;try{for(var s,d=E[Symbol.iterator]();!(a=(s=d.next()).done);a=!0){var f=s.value,p=o[f];void 0!==p&&(l[f]=p)}}catch(e){u=!0,c=e}finally{try{a||null==d.return||d.return()}finally{if(u)throw c}}t.setFieldsValue({config:l}),n.config=w({},o,n.config||{},r);var m=!0,y=!1,g=void 0;try{for(var v,b=E[Symbol.iterator]();!(m=(v=b.next()).done);m=!0){var h=v.value,k=o[h];void 0!==k&&(n.config[h]=k)}}catch(e){y=!0,g=e}finally{try{m||null==b.return||b.return()}finally{if(y)throw g}}}({form:k,node:j,patch:e,persistedConfig:o}),[2,o]}})})(),T.set(t,o),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,o];case 2:return[2,Boolean.apply(void 0,[i.sent()])];case 3:return I({form:k,message:L,nodeId:t,pending:!1}),T.get(t)===o&&T.delete(t),[7];case 4:return[2]}})})()}),V=(0,c.useMemoizedFn)(function(e){return b(function(){return O(this,function(n){switch(n.label){case 0:return[4,H(h({},t,e))];case 1:if(!n.sent())return[2,!1];return null==p||p(e),[2,!0]}})})()}),X=(0,c.useMemoizedFn)(function(){return b(function(){var e,t,r,o,i;return O(this,function(a){switch(a.label){case 0:if(n||D.current)return[2];D.current=!0,G(!0),a.label=1;case 1:if(a.trys.push([1,6,7,8]),e=!m,t=m||(0,u.randomId)(N),r=null==j?void 0:j.id,m)return[3,5];I({form:k,message:L,nodeId:r,pending:!0}),a.label=2;case 2:return a.trys.push([2,,4,5]),[4,V(t)];case 3:if(!a.sent())return[2];return[3,5];case 4:return I({form:k,message:L,nodeId:r,pending:!1}),[7];case 5:return e&&(i=!1,I({form:k,message:L,nodeId:r,pending:!0}),o=function(){i||(i=!0,I({form:k,message:L,nodeId:r,pending:!1}))}),y.viewer.dialog({width:function(e,t){if("taskCard"===e)return 800;var n=2*t.marginXXL,r=t.screenLG+2*t.marginXXL;return"min(".concat(r,"px, calc(100vw - ").concat(n,"px))")}(s,v),closable:!0,onClose:o,title:W,styles:"taskCard"===s?{body:{padding:0,backgroundColor:"var(--nb-box-bg)"}}:{body:{padding:v.paddingLG,backgroundColor:"var(--nb-box-bg)"},content:{padding:0},header:{padding:"".concat(v.padding,"px ").concat(v.paddingLG,"px"),marginBottom:0}},content:function(){return l().createElement(U,{disabled:n,form:k,kind:s,node:j,nodes:null==x?void 0:x.nodes,onGeneratedUidChange:e?V:void 0,onNodeConfigPatch:H,onModelReady:o,uid:t,uidPrefix:N,upstreams:A,workflow:M})}}),[3,8];case 6:return a.sent(),[3,8];case 7:return D.current=!1,G(!1),[7];case 8:return[2]}})})()}),q=(0,c.useMemoizedFn)(function(){return b(function(){var e,t,n;return O(this,function(r){switch(r.label){case 0:if(!d||!z)return[2];return[4,y.api.request({method:"POST",url:"uiSchemas:remove/".concat(z)})];case 1:return r.sent(),k.setFieldValue(["config",d],null),null==x||null==(e=x.refresh)||e.call(x),null==(n=y.message)||null==(t=n.success)||t.call(n,g("Deleted successfully")),[2]}})})()}),$=(0,c.useMemoizedFn)(function(e){e.stopPropagation(),o.Modal.confirm({title:g("Delete v1 configuration"),onOk:q})}),Z=[{key:"v1",label:l().createElement(o.Space,null,l().createElement("span",null,g("v1 (Legacy)")),l().createElement(a.DeleteOutlined,{onClick:$}))},{key:"v2",label:g("v2"),disabled:n||K,onClick:X}],J="interface"===s?l().createElement(a.SettingOutlined,{"aria-hidden":!0}):l().createElement(a.CreditCardOutlined,{"aria-hidden":!0}),Q="interface"===s?"primary":"default";return"interface"===s&&z?l().createElement(o.Dropdown,{menu:{items:Z},trigger:["hover"]},l().createElement(o.Button,{disabled:n,icon:J,loading:K,type:Q},g("Go to configure")," ",l().createElement(a.DownOutlined,{"aria-hidden":!0}))):l().createElement(o.Button,{disabled:n||K,icon:J,loading:K,onClick:X,type:Q},g("Go to configure"))},K=n(341);function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||W(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(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 W(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}}function N(e){return"number"==typeof e?String(e):e}function L(e,t){return"number"==typeof t&&e===String(t)?t:e}function H(e){var t=e.disabled,n=e.onChange,r=e.value,u=void 0===r?[]:r,s=(0,f.kj)(),d=R((0,i.useState)(!1),2),p=d[0],m=d[1],y=(0,c.useMemoizedFn)(function(e){null==n||n(z(u).concat([e])),m(!1)}),g=l().createElement(o.Button,{block:!0,disabled:t,icon:l().createElement(a.PlusOutlined,null),type:"dashed"},s("Add"));return t?null:l().createElement(o.Popover,{content:l().createElement(o.Space,{direction:"vertical",size:"small"},l().createElement(o.Button,{type:"text",onClick:function(){return y("")}},s("Select users")),l().createElement(o.Button,{type:"text",onClick:function(){return y({filter:{}})}},s("Query users"))),onOpenChange:m,open:p,placement:"bottom"},g)}function V(e){var t=e.disabled,n=e.index,r=e.item,i=e.onMoveDown,u=e.onMoveUp,c=e.onRemove,s=e.onUpdate,d=e.total,p=o.theme.useToken().token,m=(0,f.kj)();return l().createElement(o.Flex,{gap:"small",align:"center"},l().createElement(o.Button,{"aria-label":m("Sort recipient"),disabled:!0,icon:l().createElement(a.HolderOutlined,null),size:"small",style:{color:p.colorTextTertiary,cursor:"grab",height:p.controlHeight,minWidth:p.fontSizeLG,paddingInline:0,width:p.fontSizeLG},type:"text"}),l().createElement("div",{style:{flex:1,minWidth:0}},l().createElement(K.UserSelect,{value:N(r),onChange:function(e){return s(L(e,r))}})),t?null:l().createElement(l().Fragment,null,l().createElement(o.Button,{"aria-label":m("Move recipient up"),disabled:0===n,icon:l().createElement(a.UpOutlined,null),onClick:u,style:{color:p.colorTextTertiary,height:p.controlHeight,minWidth:p.controlHeightSM,paddingInline:0,width:p.controlHeightSM},type:"text"}),l().createElement(o.Button,{"aria-label":m("Move recipient down"),disabled:n===d-1,icon:l().createElement(a.DownOutlined,null),onClick:i,style:{color:p.colorTextTertiary,height:p.controlHeight,minWidth:p.controlHeightSM,paddingInline:0,width:p.controlHeightSM},type:"text"}),l().createElement(o.Button,{"aria-label":m("Remove recipient"),icon:l().createElement(a.DeleteOutlined,null),onClick:c,style:{color:p.colorTextTertiary,height:p.controlHeight,minWidth:p.controlHeightSM,paddingInline:0,width:p.controlHeightSM},type:"text"})))}var X=function(e){var t=e.disabled,n=e.onChange,r=e.value,i=void 0===r?[]:r,a=o.theme.useToken().token,u=(0,c.useMemoizedFn)(function(e,t){null==n||n(i.map(function(n,r){return r===e?t:n}))}),s=(0,c.useMemoizedFn)(function(e){null==n||n(e.map(function(e,t){return L(e,i[t])}))}),d=(0,c.useMemoizedFn)(function(e){null==n||n(i.filter(function(t,n){return n!==e}))}),f=(0,c.useMemoizedFn)(function(e,t){var r=z(i),o=R(r.splice(e,1),1)[0];r.splice(t,0,o),null==n||n(r)});return l().createElement(o.Flex,{vertical:!0},i.length?l().createElement(o.Flex,{vertical:!0,gap:"small",style:{marginBottom:a.marginLG}},i.map(function(e,n){return l().createElement(V,{key:"".concat(n),disabled:t,index:n,item:e,onMoveDown:function(){return f(n,n+1)},onMoveUp:function(){return f(n,n-1)},onRemove:function(){return d(n)},onUpdate:function(e){return u(n,e)},total:i.length})})):null,l().createElement(H,{value:i.map(N),onChange:s,disabled:t}))};function q(e,t,n,r,o,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function $(e){return"".concat(e,":")}function Z(){return null}function J(){var e=(0,f.kj)(),t=(0,r.useNodeContext)(),n={paddingBottom:o.theme.useToken().token.marginXXL};return l().createElement("div",{className:"nb-workflow-cc-node-fieldset",style:n},l().createElement(o.Form.Item,{name:["config","users"],label:$(e("Recipients")),required:!0,rules:[{validator:function(t,n){var r;return(r=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(l,"next",{value:u(0)}),a(l,"throw",{value:u(1)}),a(l,"return",{value:u(2)}),"function"==typeof Symbol&&a(l,Symbol.iterator,{value:function(){return this}}),l;function u(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){if(Array.isArray(n)&&n.filter(Boolean).length>0)return[2];throw Error(e("The field value is required"))})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function l(e){q(i,n,o,l,a,"next",e)}function a(e){q(i,n,o,l,a,"throw",e)}l(void 0)})})()}}]},l().createElement(X,null)),l().createElement(o.Form.Item,{name:["config","ccUid"],label:$(e("User interface"))},l().createElement(B,{configKey:"ccUid",kind:"interface",legacyConfigKey:"ccDetail"})),l().createElement(o.Form.Item,{name:["config","taskCardUid"],label:$(e("Task card"))},l().createElement(B,{configKey:"taskCardUid",kind:"taskCard"})),l().createElement(o.Form.Item,{hidden:!0,name:["config","tempAssociationFields"],noStyle:!0},l().createElement(Z,null)),l().createElement(o.Form.Item,{label:$(e("Task title")),extra:e("Title of each CC item in tasks center. Could use variables in string template. Default to node title.")},l().createElement(o.Form.Item,{name:["config","title"],initialValue:null==t?void 0:t.title,noStyle:!0},l().createElement(r.WorkflowVariableInput,null))))}},770:function(e,t,n){n.d(t,{y:function(){return u}});var r=n(694),o=n(197),i=n(155);function l(e,t){try{var n;return null==e||null==(n=e.get)?void 0:n.call(e,t)}catch(e){return}}function a(e){var t,n,r=null==e||null==(n=e.context)||null==(t=n.app)?void 0:t.pm,i=[l(r,"workflow"),l(r,"@nocobase/plugin-workflow"),l(r,o.PluginWorkflowClientV2)];return i.filter(function(e,t){return e&&i.indexOf(e)===t})}function u(){var e=(0,r.useFlowEngine)();return(0,i.useMemo)(function(){return{getInstruction:function(t){return function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,l=a(e)[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var u=i.value,c=function(e,t){var n,r,o,i;return null!=(n=null==(r=e.getInstruction)?void 0:r.call(e,t))?n:null==(i=e.instructions)||null==(o=i.get)?void 0:o.call(i,t)}(u,t);if(c)return c}}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}}(e,t)},getTrigger:function(t){return function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,l=a(e)[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var u=i.value,c=function(e,t){var n,r,o,i;return null!=(n=null==(r=e.getTriggerOptions)?void 0:r.call(e,t))?n:null==(i=e.triggers)||null==(o=i.get)?void 0:o.call(i,t)}(u,t);if(c)return c}}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}}(e,t)}}},[e])}},170:function(e,t,n){n.d(t,{G:function(){return r},P:function(){return o}});var r="ccTempAssoc_",o=function(e,t){return"".concat(r).concat(e,"_").concat(String(null!=t?t:"").replace(/[^a-zA-Z0-9_]/g,"_"))}}}]);
|
|
@@ -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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_cc_client_v2=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2||[]).push([["746"],{561:function(e,t,r){r.r(t),r.d(t,{CCBlockGridModel:function(){return w}});var n=r(375),o=r(485),l=r(694),u=r(155),i=r.n(u),c=r(488),a=r(770);function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function v(e){var t=!1,r=e.map(function(e){var r=function(e){if(!e||"function"==typeof e)return e;var t,r=null==(t=e.stepParams)?void 0:t.resourceSettings,n=null==r?void 0:r.init,o=function(e){var t,r,n,o=null==e?void 0:e.collectionName;if("string"!=typeof o||!o.includes(":"))return e;var l=(r=(t=o.split(":")).pop(),n=t[0]||"main",r?{collectionName:r,dataSourceKey:n}:null);return l?d(s({},e),{dataSourceKey:l.dataSourceKey,collectionName:l.collectionName}):e}(n);return o===n?e:d(s({},e),{stepParams:d(s({},e.stepParams),{resourceSettings:d(s({},r),{init:o})})})}(e.createModelOptions),n=Array.isArray(e.children)?v(e.children):e.children;return r===e.createModelOptions&&n===e.children?e:(t=!0,d(s({},e),{children:n,createModelOptions:r}))});return t?r:e}function g(e){return Array.isArray(e.children)&&e.children.length>0}function h(e){var t,r,o=e.model,f=(0,a.y)(),s=(null==(t=o.context.view)?void 0:t.inputArgs)||{},d=null==(r=s.flowContext)?void 0:r.workflow,p=s.availableUpstreams,y=(0,u.useMemo)(function(){var e,t,r=p||[],n=[],o=b(null==(t=f.getTrigger(null==d?void 0:d.type))||null==(e=t.getCreateModelMenuItem)?void 0:e.call(t,{config:(null==d?void 0:d.config)||{},nodeType:"cc",workflow:d})),l=v(o);o.length&&n.push({key:"triggers",label:'{{t("Triggers", { ns: "workflow" })}}',children:l});var u=v(r.flatMap(function(e){var t,r;return b(null==(r=f.getInstruction(e.type))||null==(t=r.getCreateModelMenuItem)?void 0:t.call(r,{node:e,workflow:d}))}));return u.length&&n.push({key:"nodes",label:'{{t("Node result", { ns: "workflow" })}}',children:u}),[{key:"dataBlocks",type:"group",label:(0,c.MZ)("Data blocks"),children:n},{key:"otherBlocks",type:"group",label:(0,c.MZ)("Other blocks"),children:[{key:"markdown",label:(0,c.MZ)("Markdown"),useModel:"MarkdownBlockModel",createModelOptions:{use:"MarkdownBlockModel"}},{key:"jsBlock",label:(0,c.MZ)("JS block"),useModel:"JSBlockModel",createModelOptions:{use:"JSBlockModel"}}]}].filter(g)},[p,d,f]);return i().createElement(l.AddSubModelButton,{model:o,subModelKey:"items",items:y},i().createElement(l.FlowSettingsButton,{icon:i().createElement(n.PlusOutlined,null)},o.context.t("Add block")))}var w=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=f(e),function(e,t){var r;if(t&&("object"==((r=t)&&"u">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,y()?Reflect.construct(e,t||[],f(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&p(r,e),t=[{key:"renderAddSubModelButton",value:function(){return this.context.flowSettingsEnabled?i().createElement(h,{model:this}):null}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(o.BlockGridModel);w.define({hide:!0}),t.default=w},770:function(e,t,r){r.d(t,{y:function(){return c}});var n=r(694),o=r(197),l=r(155);function u(e,t){try{var r;return null==e||null==(r=e.get)?void 0:r.call(e,t)}catch(e){return}}function i(e){var t,r,n=null==e||null==(r=e.context)||null==(t=r.app)?void 0:t.pm,l=[u(n,"workflow"),u(n,"@nocobase/plugin-workflow"),u(n,o.PluginWorkflowClientV2)];return l.filter(function(e,t){return e&&l.indexOf(e)===t})}function c(){var e=(0,n.useFlowEngine)();return(0,l.useMemo)(function(){return{getInstruction:function(t){return function(e,t){var r=!0,n=!1,o=void 0;try{for(var l,u=i(e)[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var c=l.value,a=function(e,t){var r,n,o,l;return null!=(r=null==(n=e.getInstruction)?void 0:n.call(e,t))?r:null==(l=e.instructions)||null==(o=l.get)?void 0:o.call(l,t)}(c,t);if(a)return a}}catch(e){n=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}}(e,t)},getTrigger:function(t){return function(e,t){var r=!0,n=!1,o=void 0;try{for(var l,u=i(e)[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var c=l.value,a=function(e,t){var r,n,o,l;return null!=(r=null==(n=e.getTriggerOptions)?void 0:n.call(e,t))?r:null==(l=e.triggers)||null==(o=l.get)?void 0:o.call(l,t)}(c,t);if(a)return a}}catch(e){n=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}}(e,t)}}},[e])}}}]);
|
|
@@ -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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_cc_client_v2=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2||[]).push([["86"],{29:function(e,t,o){o.r(t),o.d(t,{CCTriggerBlockGridModel:function(){return d}});var n=o(375),r=o(485),l=o(694),c=o(155),u=o.n(c),i=o(488);function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var d=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=a(e),function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(e,t||[],a(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&s(o,e),t=[{key:"renderAddSubModelButton",value:function(){if(!this.context.flowSettingsEnabled)return null;var e=[{key:"otherBlocks",type:"group",label:(0,i.MZ)("Other blocks"),children:[{key:"markdown",label:(0,i.MZ)("Markdown"),useModel:"MarkdownBlockModel",createModelOptions:{use:"MarkdownBlockModel"}},{key:"jsBlock",label:(0,i.MZ)("JS block"),useModel:"JSBlockModel",createModelOptions:{use:"JSBlockModel"}}]}];return u().createElement(l.AddSubModelButton,{model:this,subModelKey:"items",items:e},u().createElement(l.FlowSettingsButton,{icon:u().createElement(n.PlusOutlined,null)},this.context.t("Add block")))}}],function(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(o.prototype,t),o}(r.BlockGridModel);d.define({hide:!0}),t.default=d}}]);
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
export type FlowModelConfigKind = 'interface' | 'taskCard';
|
|
11
|
+
export interface FlowModelConfigInputProps {
|
|
12
|
+
configKey: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
kind: FlowModelConfigKind;
|
|
15
|
+
legacyConfigKey?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
value?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function FlowModelConfigInput({ configKey, disabled, kind, legacyConfigKey, onChange, value, }: FlowModelConfigInputProps): React.JSX.Element;
|
|
20
|
+
export default FlowModelConfigInput;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { FlowModel } from '@nocobase/flow-engine';
|
|
9
|
+
import { type FlowModel } from '@nocobase/flow-engine';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
export declare function RemoteFlowModelRenderer({
|
|
12
|
-
uid: string;
|
|
13
|
-
onModelLoaded?: (model: FlowModel) => void;
|
|
11
|
+
export declare function RemoteFlowModelRenderer({ enableUIConfiguration, mapModel, onModelLoaded, reloadKey, uid, useCache, }: {
|
|
14
12
|
enableUIConfiguration?: boolean;
|
|
15
13
|
mapModel?: (model: FlowModel) => FlowModel;
|
|
16
|
-
|
|
14
|
+
onModelLoaded?: (model: FlowModel) => void;
|
|
17
15
|
reloadKey?: string | number;
|
|
16
|
+
uid: string;
|
|
17
|
+
useCache?: boolean;
|
|
18
18
|
}): 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 type { TempAssociationSource } from '@nocobase/plugin-workflow/client-v2';
|
|
10
|
+
import { type CanvasNodeLike, type WorkflowLike } from '../workflowPluginCompat';
|
|
11
|
+
export declare function useTempAssociationSources(workflow?: WorkflowLike, upstreams?: CanvasNodeLike[]): TempAssociationSource[];
|
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
onInit(options: any): void;
|
|
12
|
-
}
|
|
9
|
+
export { default } from './plugin';
|
|
10
|
+
export { PluginWorkflowCCClientV2 } from './plugin';
|
|
@@ -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("ahooks"),require("react-i18next"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-cc/client-v2",["ahooks","react-i18next","@nocobase/plugin-notification-manager/client-v2","@nocobase/client-v2","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-cc/client-v2"]=t(require("ahooks"),require("react-i18next"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-cc/client-v2"]=t(e.ahooks,e["react-i18next"],e["@nocobase/plugin-notification-manager/client-v2"],e["@nocobase/client-v2"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,a,c,u){return function(){"use strict";var l,s,f,p={488:function(e,t,n){n.d(t,{CU:function(){return i},MZ:function(){return a},kj:function(){return c}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}n(953);var i="@nocobase/plugin-workflow-cc";function a(e,t){return(0,r.tExpr)(e,o({ns:i},t))}function c(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"client"],nsMode:"fallback"},n))}}},813:function(e,t,n){function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){n(e);return}c.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)})}}function i(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:u(0)}),c(a,"throw",{value:u(1)}),c(a,"return",{value:u(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function u(c){return function(u){var l=[c,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}n.d(t,{W:function(){return l}});var a=new WeakSet,c="__workflowCcModelLoadersRegistered__";function u(e){return o(function(){return i(this,function(t){return[2,e()]})})()}function l(e){a.has(e)||e[c]||"function"!=typeof e.registerModelLoaders||(e.registerModelLoaders({CCChildPageModel:{extends:"ChildPageModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("458").then(n.bind(n,401))];case 1:return[2,e.sent().CCChildPageModel]}})})()})}},CCChildPageTabModel:{extends:"ChildPageTabModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("458").then(n.bind(n,401))];case 1:return[2,e.sent().CCChildPageTabModel]}})})()})}},CCBlockGridModel:{extends:"BlockGridModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("746").then(n.bind(n,561))];case 1:return[2,e.sent().CCBlockGridModel]}})})()})}},CCTriggerBlockGridModel:{extends:"BlockGridModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("86").then(n.bind(n,29))];case 1:return[2,e.sent().CCTriggerBlockGridModel]}})})()})}},CCTaskCardDetailsModel:{extends:"DetailsBlockModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("164").then(n.bind(n,303))];case 1:return[2,e.sent().CCTaskCardDetailsModel]}})})()})}},CCTaskCardGridModel:{extends:"DetailsGridModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("352").then(n.bind(n,923))];case 1:return[2,e.sent().CCTaskCardGridModel]}})})()})}},CCTaskCardDetailsItemModel:{extends:"DetailsItemModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("437").then(n.bind(n,628))];case 1:return[2,e.sent().CCTaskCardDetailsItemModel]}})})()})}},CCTaskCardDetailsAssociationFieldGroupModel:{extends:"DetailsAssociationFieldGroupModel",loader:function(){return u(function(){return o(function(){return i(this,function(e){switch(e.label){case 0:return[4,n.e("486").then(n.bind(n,429))];case 1:return[2,e.sent().CCTaskCardDetailsAssociationFieldGroupModel]}})})()})}}}),a.add(e),e[c]=!0)}},87:function(e,t,n){n.d(t,{o:function(){return a}});var r=n(694),o="@nocobase/plugin-workflow-cc",i=[{name:"workflowCcTasks",dataCategory:"business",filterTargetKey:"id",simplePaginate:!0,dumpRules:{group:"log"},migrationRules:["schema-only"],shared:!0,createdAt:!0,updatedAt:!0,fields:[{type:"snowflakeId",name:"id",primaryKey:!0,allowNull:!1},{type:"belongsTo",name:"job",target:"jobs",foreignKey:"jobId",primaryKey:!1},{type:"belongsTo",name:"user",target:"users",foreignKey:"userId",primaryKey:!1},{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:'{{t("Task title", { ns: "'.concat(o,'" })}}'),"x-component":"Input"}},{type:"belongsTo",name:"execution",onDelete:"CASCADE"},{type:"belongsTo",name:"node",target:"flow_nodes",uiSchema:{type:"object",title:'{{t("CC node", { ns: "'.concat(o,'" })}}')}},{type:"belongsTo",name:"workflow",target:"workflows",foreignKey:"workflowId",onDelete:"CASCADE",interface:"m2o",uiSchema:{type:"object",title:'{{t("Workflow", { ns: "workflow" })}}',"x-component":"AssociationField","x-component-props":{fieldNames:{label:"title",value:"id"}}}},{type:"integer",name:"status",interface:"select",uiSchema:{type:"number",title:'{{t("Status", { ns: "'.concat(o,'" })}}'),"x-component":"Select",enum:[{label:'{{t("Unread", { ns: "'.concat(o,'" })}}'),value:0,color:"gold"},{label:'{{t("Read", { ns: "'.concat(o,'" })}}'),value:1,color:"green"}]},defaultValue:0},{type:"date",name:"readAt",interface:"datetime",uiSchema:{type:"string",title:'{{t("Read at", { ns: "'.concat(o,'" })}}'),"x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"date",name:"createdAt",interface:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at", { ns: "'.concat(o,'" })}}'),"x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"date",name:"updatedAt",interface:"updatedAt",uiSchema:{type:"datetime",title:'{{t("Updated at", { ns: "'.concat(o,'" })}}'),"x-component":"DatePicker","x-component-props":{showTime:!0}}}]},{name:"flow_nodes",dataCategory:"system",shared:!0,fields:[{name:"id",type:"snowflakeId",primaryKey:!0,allowNull:!1},{type:"uid",name:"key"},{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}},{name:"workflow",type:"belongsTo",target:"workflows"},{name:"upstream",type:"belongsTo",target:"flow_nodes"},{name:"downstream",type:"belongsTo",target:"flow_nodes"},{type:"string",name:"type"},{type:"json",name:"config",defaultValue:{}}]},{name:"workflows",dataCategory:"system",shared:!0,fields:[{name:"id",type:"snowflakeId",primaryKey:!0,allowNull:!1,interface:"id",uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0}},{name:"key",type:"uid"},{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:'{{t("Name")}}',"x-component":"Input",required:!0}},{type:"string",name:"type"},{type:"jsonb",name:"config",defaultValue:{}},{type:"boolean",name:"enabled",defaultValue:!1}]}];function a(e){var t,n,o=null==(n=e.dataSourceManager)||null==(t=n.getDataSource)?void 0:t.call(n,"main");o&&i.forEach(function(e){var t,n,i;null!=(t=o.getCollection)&&t.call(o,e.name)||o.addCollection(new r.Collection((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),i=i={hidden:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n)))})}},375:function(e){e.exports=c},485:function(e){e.exports=r},694:function(e){e.exports=u},341:function(e){e.exports=n},197:function(e){e.exports=a},625:function(t){t.exports=e},59:function(e){e.exports=i},155:function(e){e.exports=o},953:function(e){e.exports=t}},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return p[e](n,n.exports,b),n.exports}b.m=p,b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return""+e+"."+({164:"3f552926dcec4af8",352:"a8dbaca3691905cb",437:"cbf01251aba7d74f",458:"51f1362d12aefe62",486:"d0a505ec5bea795c",612:"9fcdf3a84dcb028a",746:"d22edf24454ac805",86:"f7881bb89e51a4b6"})[e]+".js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},y={},b.l=function(e,t,n,r){if(y[e])return void y[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var u=a[c];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-workflow-cc/client-v2:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-cc/client-v2:"+n),o.src=e),y[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=y[e];if(delete y[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.g.importScripts&&(g=b.g.location+"");var y,g,h=b.g.document;if(!g&&h&&(h.currentScript&&"SCRIPT"===h.currentScript.tagName.toUpperCase()&&(g=h.currentScript.src),!g)){var m=h.getElementsByTagName("script");if(m.length)for(var w=m.length-1;w>-1&&(!g||!/^http(s?):/.test(g));)g=m[w--].src}if(!g)throw Error("Automatic publicPath is not supported in this browser");b.p=g.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l={889:0},b.f.j=function(e,t){var n=b.o(l,e)?l[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=l[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),i=Error();b.l(o,function(t){if(b.o(l,e)&&(0!==(n=l[e])&&(l[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},s=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],c=0;if(o.some(function(e){return 0!==l[e]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);a&&a(b)}for(e&&e(t);c<o.length;c++)r=o[c],b.o(l,r)&&l[r]&&l[r][0](),l[r]=0},(f=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2=self.webpackChunk_nocobase_plugin_workflow_cc_client_v2||[]).forEach(s.bind(null,0)),f.push=s.bind(null,f.push.bind(f));var v={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-cc/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-cc/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",c=a.indexOf(i);e=c>=0?a.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-cc/dist/client-v2/"}b.p=e}(),!function(){b.r(v),b.d(v,{PluginWorkflowCCClientV2:function(){return C},default:function(){return O}});var e=b(485),t=b(197),n=b(813),r=b(375),o=b(155),i=b.n(o),a=b(488);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=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})()}var f=function(e){return'{{t("'.concat(e,'", { ns: "').concat(a.CU,'" })}}')},p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,o=arguments,t=u(t),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(t,o||[],u(this).constructor):t.apply(this,o)),"title",f("CC")),c(e,"type","cc"),c(e,"group","manual"),c(e,"description",f("Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.")),c(e,"icon",i().createElement(r.EyeOutlined,null)),c(e,"FieldsetLoader",function(){return b.e("612").then(b.bind(b,343)).then(function(e){return{default:e.CCFieldset}})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&l(n,e),t=[{key:"createDefaultConfig",value:function(){return{}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(t.Instruction),d=b(87);function y(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){n(e);return}c.done?t(u):Promise.resolve(u).then(r,o)}function g(e,t,n){return(g=k()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&m(o,n.prototype),o}).apply(null,arguments)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t="function"==typeof Map?new Map:void 0;return(w=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return g(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}var C=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=h(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,k()?Reflect.construct(e,t||[],h(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&m(o,e),r=[{key:"load",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:u(0)}),c(a,"throw",{value:u(1)}),c(a,"return",{value:u(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function u(c){return function(u){var l=[c,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.registerCollections(),this.registerModelLoaders(),this.registerWorkflowExtensions(),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,c,"next",e)}function c(e){y(i,r,o,a,c,"throw",e)}a(void 0)})}).call(this)}},{key:"registerCollections",value:function(){(0,d.o)(this.flowEngine)}},{key:"registerModelLoaders",value:function(){(0,n.W)(this.flowEngine)}},{key:"registerWorkflowExtensions",value:function(){var e,n,r=null!=(e=this.app.pm.get(t.PluginWorkflowClientV2))?e:this.app.pm.get("workflow");null==r||null==(n=r.registerInstruction)||n.call(r,"cc",p)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,r),o}(w(e.Plugin)),O=C}(),v}()});
|
|
@@ -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
|
+
export declare const NAMESPACE = "@nocobase/plugin-workflow-cc";
|
|
10
|
+
export declare function tExpr(key: string, options?: Record<string, unknown>): string;
|
|
11
|
+
export declare function usePluginTranslation(): import("react-i18next").UseTranslationResponse<("@nocobase/plugin-workflow-cc" | "client")[], undefined>;
|
|
12
|
+
export declare function useT(): (key: string, options?: Record<string, unknown>) => string;
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { BlockGridModel } from '@nocobase/client';
|
|
9
|
+
import { BlockGridModel } from '@nocobase/client-v2';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
export declare class CCBlockGridModel extends BlockGridModel {
|
|
12
12
|
renderAddSubModelButton(): React.JSX.Element;
|
|
13
13
|
}
|
|
14
|
+
export default CCBlockGridModel;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { ChildPageModel, ChildPageTabModel } from '@nocobase/client-v2';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
type CollectionContextParams = {
|
|
12
|
+
collectionName: string;
|
|
13
|
+
dataSourceKey: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class CCChildPageModel extends ChildPageModel {
|
|
16
|
+
onInit(options: Parameters<ChildPageModel['onInit']>[0]): void;
|
|
17
|
+
setCollectionCtx({ dataSourceKey, collectionName }: CollectionContextParams): void;
|
|
18
|
+
renderFirstTab(): React.JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export declare class CCChildPageTabModel extends ChildPageTabModel {
|
|
21
|
+
renderChildren(): React.JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export default CCChildPageModel;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { DetailsAssociationFieldGroupModel } from '@nocobase/client';
|
|
10
|
-
import { FlowModelContext } from '@nocobase/flow-engine';
|
|
9
|
+
import { DetailsAssociationFieldGroupModel } from '@nocobase/client-v2';
|
|
10
|
+
import { type FlowModelContext } from '@nocobase/flow-engine';
|
|
11
11
|
export declare class CCTaskCardDetailsAssociationFieldGroupModel extends DetailsAssociationFieldGroupModel {
|
|
12
12
|
static itemModelName: string;
|
|
13
13
|
static defineChildren(ctx: FlowModelContext): {
|
|
@@ -43,3 +43,4 @@ export declare class CCTaskCardDetailsAssociationFieldGroupModel extends Details
|
|
|
43
43
|
}[];
|
|
44
44
|
}[];
|
|
45
45
|
}
|
|
46
|
+
export default CCTaskCardDetailsAssociationFieldGroupModel;
|
|
@@ -6,12 +6,18 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { DetailsItemModel } from '@nocobase/client';
|
|
10
|
-
import { Collection, FlowModelContext } from '@nocobase/flow-engine';
|
|
9
|
+
import { DetailsItemModel } from '@nocobase/client-v2';
|
|
10
|
+
import { type Collection, type FlowEngine, type FlowModelContext } from '@nocobase/flow-engine';
|
|
11
11
|
type CCTaskAssociationContext = {
|
|
12
|
-
flowEngine:
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
flowEngine: FlowEngine;
|
|
13
|
+
nodes?: Array<{
|
|
14
|
+
id?: number | string;
|
|
15
|
+
title?: string;
|
|
16
|
+
}>;
|
|
17
|
+
workflow?: {
|
|
18
|
+
id?: number | string;
|
|
19
|
+
title?: string;
|
|
20
|
+
};
|
|
15
21
|
};
|
|
16
22
|
type TempAssociationSource = {
|
|
17
23
|
collection: string;
|
|
@@ -25,13 +31,13 @@ export type CCTaskTempAssociationFieldConfig = {
|
|
|
25
31
|
nodeType: 'workflow' | 'node';
|
|
26
32
|
};
|
|
27
33
|
type CCTaskAssociationMetadata = CCTaskTempAssociationFieldConfig & {
|
|
28
|
-
fieldName: string;
|
|
29
|
-
title?: string;
|
|
30
34
|
dataSourceKey: string;
|
|
35
|
+
fieldName: string;
|
|
31
36
|
target: string;
|
|
37
|
+
title?: string;
|
|
32
38
|
};
|
|
33
39
|
export declare const getEligibleTempAssociationSources: (sources?: TempAssociationSource[], collection?: Collection) => CCTaskAssociationMetadata[];
|
|
34
|
-
export declare const updateWorkflowCcTaskAssociationFields: ({ flowEngine,
|
|
40
|
+
export declare const updateWorkflowCcTaskAssociationFields: ({ flowEngine, nodes, tempAssociationSources, workflow, }: CCTaskAssociationContext & {
|
|
35
41
|
tempAssociationSources?: TempAssociationSource[];
|
|
36
42
|
}) => void;
|
|
37
43
|
export declare class CCTaskCardDetailsItemModel extends DetailsItemModel {
|
|
@@ -60,6 +66,6 @@ export declare class CCTaskCardDetailsItemModel extends DetailsItemModel {
|
|
|
60
66
|
};
|
|
61
67
|
};
|
|
62
68
|
}[];
|
|
63
|
-
onInit(options:
|
|
69
|
+
onInit(options: Parameters<DetailsItemModel['onInit']>[0]): void;
|
|
64
70
|
}
|
|
65
|
-
export
|
|
71
|
+
export default CCTaskCardDetailsItemModel;
|
|
@@ -6,17 +6,13 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import { DetailsBlockModel } from '@nocobase/client-v2';
|
|
10
|
+
import { SingleRecordResource, type FlowModelContext } from '@nocobase/flow-engine';
|
|
9
11
|
import React from 'react';
|
|
10
|
-
import { SingleRecordResource } from '@nocobase/flow-engine';
|
|
11
|
-
import { DetailsBlockModel } from '@nocobase/client';
|
|
12
|
-
/**
|
|
13
|
-
* 抄送任务卡片详情:隐藏顶部按钮,保留详情卡片的字段/标题配置,不支持卡片级操作按钮。
|
|
14
|
-
*/
|
|
15
12
|
export declare class CCTaskCardDetailsModel extends DetailsBlockModel {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onInit(options: any): void;
|
|
19
|
-
createResource(ctx: any, params: any): SingleRecordResource<unknown>;
|
|
13
|
+
onInit(options: Parameters<DetailsBlockModel['onInit']>[0]): void;
|
|
14
|
+
createResource(ctx: FlowModelContext): SingleRecordResource<unknown>;
|
|
20
15
|
refresh(): Promise<void>;
|
|
21
16
|
renderComponent(): React.JSX.Element;
|
|
22
17
|
}
|
|
18
|
+
export default CCTaskCardDetailsModel;
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { DetailsGridModel } from '@nocobase/client';
|
|
9
|
+
import { DetailsGridModel } from '@nocobase/client-v2';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
/**
|
|
12
|
-
* 抄送任务卡片详情的字段网格
|
|
13
|
-
*/
|
|
14
11
|
export declare class CCTaskCardGridModel extends DetailsGridModel {
|
|
15
12
|
private lastTempAssociationSnapshot?;
|
|
16
13
|
private readonly tempAssociationSyncHandler;
|
|
@@ -21,3 +18,4 @@ export declare class CCTaskCardGridModel extends DetailsGridModel {
|
|
|
21
18
|
renderAddSubModelButton(): React.JSX.Element;
|
|
22
19
|
render(): React.JSX.Element;
|
|
23
20
|
}
|
|
21
|
+
export default CCTaskCardGridModel;
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { BlockGridModel } from '@nocobase/client';
|
|
9
|
+
import { BlockGridModel } from '@nocobase/client-v2';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
export declare class CCTriggerBlockGridModel extends BlockGridModel {
|
|
12
12
|
renderAddSubModelButton(): React.JSX.Element;
|
|
13
13
|
}
|
|
14
|
+
export default CCTriggerBlockGridModel;
|
|
@@ -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
|
+
import type { FlowEngine } from '@nocobase/flow-engine';
|
|
10
|
+
export declare function registerWorkflowCcModelLoaders(flowEngine: FlowEngine): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { Instruction } from '@nocobase/plugin-workflow/client-v2';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export default class CCInstruction extends Instruction {
|
|
12
|
+
title: string;
|
|
13
|
+
type: string;
|
|
14
|
+
group: string;
|
|
15
|
+
description: string;
|
|
16
|
+
icon: React.JSX.Element;
|
|
17
|
+
FieldsetLoader: () => Promise<{
|
|
18
|
+
default: typeof import("./components/cc").CCFieldset;
|
|
19
|
+
}>;
|
|
20
|
+
createDefaultConfig(): {};
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
export type RecipientValue = number | string | {
|
|
11
|
+
filter?: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
export interface RecipientsInputProps {
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onChange?: (value: RecipientValue[]) => void;
|
|
16
|
+
value?: RecipientValue[];
|
|
17
|
+
}
|
|
18
|
+
export declare function RecipientsInput({ disabled, onChange, value }: RecipientsInputProps): React.JSX.Element;
|
|
19
|
+
export default RecipientsInput;
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { ChildPageTabModel } from '@nocobase/client';
|
|
10
9
|
import React from 'react';
|
|
11
|
-
export declare
|
|
12
|
-
|
|
13
|
-
}
|
|
10
|
+
export declare function CCFieldset(): React.JSX.Element;
|
|
11
|
+
export default CCFieldset;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type Application } from '@nocobase/client-v2';
|
|
10
|
+
export declare class PluginWorkflowCCClientV2 extends Plugin<Record<string, never>, Application> {
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
private registerCollections;
|
|
13
|
+
private registerModelLoaders;
|
|
14
|
+
private registerWorkflowExtensions;
|
|
15
|
+
}
|
|
16
|
+
export default PluginWorkflowCCClientV2;
|
|
@@ -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
|
+
import { type FlowEngine } from '@nocobase/flow-engine';
|
|
10
|
+
export declare function registerWorkflowCcCollections(flowEngine: FlowEngine): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { type SubModelItem } from '@nocobase/flow-engine';
|
|
10
|
+
import { type TempAssociationSource } from '@nocobase/plugin-workflow/client-v2';
|
|
11
|
+
export type WorkflowLike = {
|
|
12
|
+
config?: Record<string, unknown>;
|
|
13
|
+
id?: number | string;
|
|
14
|
+
type?: string;
|
|
15
|
+
};
|
|
16
|
+
export type CanvasNodeLike = {
|
|
17
|
+
config?: Record<string, unknown>;
|
|
18
|
+
id?: number | string;
|
|
19
|
+
key?: string;
|
|
20
|
+
type?: string;
|
|
21
|
+
};
|
|
22
|
+
type WorkflowTriggerLike = {
|
|
23
|
+
getCreateModelMenuItem?: (args: {
|
|
24
|
+
config: Record<string, unknown>;
|
|
25
|
+
nodeType?: string;
|
|
26
|
+
workflow?: WorkflowLike;
|
|
27
|
+
}) => SubModelItem | SubModelItem[] | null;
|
|
28
|
+
useTempAssociationSource?: (config?: Record<string, unknown>, workflow?: WorkflowLike) => TempAssociationSource | null;
|
|
29
|
+
};
|
|
30
|
+
type WorkflowInstructionLike = {
|
|
31
|
+
getCreateModelMenuItem?: (args: {
|
|
32
|
+
node: CanvasNodeLike;
|
|
33
|
+
workflow?: WorkflowLike;
|
|
34
|
+
}) => SubModelItem | SubModelItem[] | null;
|
|
35
|
+
useTempAssociationSource?: (node: CanvasNodeLike) => TempAssociationSource | null;
|
|
36
|
+
};
|
|
37
|
+
export declare function useWorkflowPluginCompat(): {
|
|
38
|
+
getInstruction: (type?: string) => WorkflowInstructionLike;
|
|
39
|
+
getTrigger: (type?: string) => WorkflowTriggerLike;
|
|
40
|
+
};
|
|
41
|
+
export {};
|