@nocobase/plugin-workflow-cc 1.8.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/LICENSE.txt ADDED
@@ -0,0 +1,161 @@
1
+ Updated Date: April 1, 2025
2
+
3
+ NocoBase License Agreement
4
+
5
+ NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at #03-01 ROBINSON 112 ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("the User"), will be deemed to voluntarily accept all terms of this Agreement by using NocoBase (including but not limited to obtaining NocoBase source code or installation package in any form, installing and using NocoBase, purchasing NocoBase commercial license and services, purchasing NocoBase commercial plugins). If the User does not agree to any term of this Agreement, or cannot accurately understand our interpretation of the relevant terms, please stop using it immediately.
6
+
7
+ This Agreement applies to any use, quotation, contract, invoice, and all software delivered by the Company. The User and the Company or NocoBase's agents can no longer sign a separate license agreement for the sale and delivery of the software.
8
+
9
+ The Company reserves the right to formulate and modify this Agreement from time to time as needed. If there are changes, the Company will announce them in the form of website announcements, without further individual notification. The changed Agreement will automatically take effect once it is announced, becoming part of this Agreement.
10
+
11
+ ==============
12
+ 1. Definitions
13
+ ==============
14
+
15
+ 1.1 "Software" refers to the NocoBase kernel and plugins placed in the same code repository as the kernel, including their source code, installation packages, images, and all their modifications, updates, and upgrades.
16
+
17
+ 1.2 "Community Edition" refers to the free version of the Software provided to the User through public channels.
18
+
19
+ 1.3 "Commercial Edition" refers to the paid version of the Software purchased by the User from the Company or its agents, downloaded through exclusive channels, and includes additional benefits. It consists of three versions: Standard Edition, Professional Edition, and Enterprise Edition.
20
+
21
+ 1.4 "Marketplace" refers to the marketplace provided by the Company for selling Software plugins and solutions.
22
+
23
+ 1.5 "Commercial Plugin" refers to the paid plugins sold in the Marketplace.
24
+
25
+ 1.6 "Upper Layer Application" refers to a specific business use case application serving internal or external customers of the User, developed based on Software and Commercial Plugins, such as ERP/CRM.
26
+
27
+ 1.7 "Customer" refers to the clients who purchase the User's Upper Layer Application.
28
+
29
+ 1.8 "Third-Party Open Source Software" refers to open source software provided with Software and Commercial Plugins. They are licensed through various published open source software licenses or copyright notices accompanying such software.
30
+
31
+ ===================================
32
+ 2. Intellectual Property Protection
33
+ ===================================
34
+
35
+ Except for Third-Party Open Source Software, the Company owns all copyrights, trademark rights, patent rights, trade secrets, and other intellectual property rights of the Software, and has registered and protected them in relevant countries and regions according to the "Paris Convention" or "TRIPS Agreement", ensuring that the intellectual property rights of the Software and Commercial Plugins are internationally recognized and protected.
36
+
37
+ =============
38
+ 3. Disclaimer
39
+ =============
40
+
41
+ 3.1 The User shall not use the Software and Commercial Plugins to engage in activities that violate local laws and regulations, religious beliefs. All legal responsibilities and legal consequences arising from the use of Software and Commercial Plugins shall be borne by the User.
42
+
43
+ 3.2 The Company shall not be liable for any direct, indirect, special, incidental, or consequential damages (including but not limited to loss of profits, business interruption, data loss, or business information disclosure) caused by the User's use of the Software and Commercial Plugins, even if it has been previously informed of the possibility of such damages.
44
+
45
+ ===============
46
+ 4. License Type
47
+ ===============
48
+
49
+ 4.1 The Software uses a dual license type of AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3..en.htm and Commercial License.
50
+
51
+ 4.2 The Community Edition uses the AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3.0.en.html.
52
+
53
+ 4.3 The Commercial Edition (including Standard, Professional, and Enterprise Editions) uses the Commercial License.
54
+
55
+ 4.4 Commercial Plugins use the Commercial Plugin License.
56
+
57
+ ================================================
58
+ 5. Rights and Obligations of Open Source License
59
+ ================================================
60
+
61
+ 5.1 The Software can be used for commercial purposes.
62
+
63
+ 5.2 The User can sell plugins developed for the Software in the Marketplace.
64
+
65
+ 5.3 Outside the Marketplace, changes and plugins to the Software developed by the User or third parties, and third-party applications developed based on the Software must all be open-sourced under the AGPL-3.0 license.
66
+
67
+ 5.4 It is not allowed to remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface, except for the main LOGO in the upper left corner of the page.
68
+
69
+ 5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
70
+
71
+ 5.6 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
72
+
73
+ 5.7 Comply with all requirements of the AGPL-3.0 agreement.
74
+
75
+ ===============================
76
+ 6. Rights of Commercial License
77
+ ===============================
78
+
79
+ 6.1 Obtain a permanent commercial license of the Software.
80
+
81
+ 6.2 Get software upgrades and exclusive technical support during the upgrade validity period.
82
+
83
+ 6.3 The licensed Software can be used for commercial purposes with no restrictions on the number of applications and users.
84
+
85
+ 6.4 Changes and plugins to the Software, and applications integrated with the Software do not need to be open sourced.
86
+
87
+ 6.5 Can remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface.
88
+
89
+ 6.6 Can sell plugins developed for Software in the Marketplace.
90
+
91
+ 6.7 The User with a Professional or Enterprise Edition License can sell Upper Layer Application to their clients.
92
+
93
+ 6.8 Not restricted by the AGPL-3.0 agreement.
94
+
95
+ 6.9 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
96
+
97
+ ====================================
98
+ 7. Obligations of Commercial License
99
+ ====================================
100
+
101
+ 7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
102
+
103
+ 7.2 It is not allowed to sell, transfer, lease, share, or distribute the Commercial License.
104
+
105
+ 7.3 It is not allowed to sell, transfer, lease, share, or distribute any form of no-code, zero-code, low-code platform, or developer tools developed based on Software.
106
+
107
+ 7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
108
+
109
+ 7.5 It is not allowed for the User withot a Professional or Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license.
110
+
111
+ 7.6 It is not allowed for the User with a Professional or Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license with access to further development and configuration.
112
+
113
+ 7.7 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
114
+
115
+ 7.8 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
116
+
117
+ 7.9 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
118
+
119
+ ======================================
120
+ 8. Rights of Commercial Plugin License
121
+ ======================================
122
+
123
+ 8.1 Obtain a permanent Commercial Plugin License for the Commercial Plugin.
124
+
125
+ 8.2 Get plugins upgrades and exclusive technical support during the upgrade validity period.
126
+
127
+ 8.3 Can be used for commercial purposes without restrictions on the number of applications or users.
128
+
129
+ 8.4 The User with an Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to their customers.
130
+
131
+ 8.5 Not restricted by the AGPL-3.0 agreement.
132
+
133
+ 8.6 If there are other agreements in the contract regarding the above rights, the contract agreement shall prevail.
134
+
135
+ ===========================================
136
+ 9. Obligations of Commercial Plugin License
137
+ ===========================================
138
+
139
+ 9.1 It is not allowed to remove or change any intellectual property statements about NocoBase and the plugin authors in the code.
140
+
141
+ 9.2 It is not allowed to sell, transfer, lease, share, or gift the Commercial Plugin.
142
+
143
+ 9.3 It is not allowed to use reverse engineering, decompilation, or other methods to attempt to discover the source code of Commercial Plugins without obtaining a source code license.
144
+
145
+ 9.4 It is not allowed to disclose the source code of Commercial Plugins to any third party.
146
+
147
+ 9.5 If there is any violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
148
+
149
+ 9.6 If there are other agreements in the contract regarding the above obligations, the contract agreement shall prevail.
150
+
151
+ =============================================================
152
+ 10. Legal Jurisdiction, Interpretation, and Dispute Resolution
153
+ =============================================================
154
+
155
+ 10.1 Except for Mainland China, the interpretation, application, and all matters related to this agreement are subject to the jurisdiction of Singapore law.
156
+
157
+ 10.2 Any dispute related to this Agreement should first be resolved through friendly negotiation. If the negotiation fails to resolve the dispute, the dispute should be submitted to the International Chamber of Commerce (ICC) for arbitration. The arbitration venue should be Singapore, conducted in English.
158
+
159
+ 10.3 All terms and conditions of this Agreement shall be deemed enforceable to the maximum extent permitted by applicable law. If any term of this Agreement is deemed invalid by any applicable law, the invalidity of that term does not affect the validity of any other term of this Agreement, and it should be deemed that the invalid term has been modified as much as possible to make it valid and enforceable, or if the term cannot be modified, it should be deemed to have been deleted from this Agreement.
160
+
161
+ 10.4 The arbitration award is final, binding on both parties, and can be enforced in any court with jurisdiction.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # @nocobase/plugin-workflow-cc
2
+
3
+ ## 分支
4
+
5
+ 和 nocobase 仓库一样,也分为 main 和 next 两个分支
6
+
7
+ - main:只处理缺陷修复
8
+ - next:新插件、新特性、不兼容性变更等
9
+
10
+ ## 提测
11
+
12
+ - 提交 PR 之后,会自动生成 PR 测试环境,测试通过后再合并到对应分支
13
+
14
+ ```bash
15
+ pr-<number>-<pro-tpl>.test.nocobase.com
16
+ ```
package/client.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client';
2
+ export { default } from './dist/client';
package/client.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client/index.js');
@@ -0,0 +1,13 @@
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 } from '@nocobase/client';
10
+ export declare class PluginWorkflowCCClient extends Plugin {
11
+ load(): Promise<void>;
12
+ }
13
+ export default PluginWorkflowCCClient;
@@ -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("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("react"),require("@formily/antd-v5"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("antd-style"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-cc",["@formily/shared","@nocobase/client","react-router-dom","@nocobase/plugin-workflow/client","react","@formily/antd-v5","@formily/react","@ant-design/icons","lodash","antd","antd-style","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-cc"]=t(require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("react"),require("@formily/antd-v5"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("antd-style"),require("react-i18next")):e["@nocobase/plugin-workflow-cc"]=t(e["@formily/shared"],e["@nocobase/client"],e["react-router-dom"],e["@nocobase/plugin-workflow/client"],e.react,e["@formily/antd-v5"],e["@formily/react"],e["@ant-design/icons"],e.lodash,e.antd,e["antd-style"],e["react-i18next"])}(self,function(e,t,n,r,o,i,a,c,l,u,s,p){return function(){"use strict";var f={482:function(e){e.exports=c},632:function(e){e.exports=i},505:function(e){e.exports=a},875:function(t){t.exports=e},772:function(e){e.exports=t},433:function(e){e.exports=r},721:function(e){e.exports=u},202:function(e){e.exports=s},467:function(e){e.exports=l},156:function(e){e.exports=o},238:function(e){e.exports=p},128:function(e){e.exports=n}},d={};function m(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return f[e](n,n.exports,m),n.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return!function(){m.r(y),m.d(y,{PluginWorkflowCCClient:function(){return ep},default:function(){return ef}});var e=m(156),t=m.n(e),n=m(772),r=m(433),o=m.n(r),i=m(632),a=m(875),c=m(482),l="@nocobase/plugin-workflow-cc",u=m(505),s=m(721),p=m(238);function f(e){var t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.i18n.t(e,(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}({},o),r=r={ns:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))}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}function b(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(r,o)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=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 d(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 d(e,t)}}function g(){var e,t,n=(e=["\n .ant-drawer-body {\n background: var(--nb-box-bg);\n }\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return g=function(){return n},n}var x=new n.SchemaInitializer({name:"workflowCc:popup:configureUserInterface:addBlock",wrap:n.gridRowColWrap,title:'{{t("Add block")}}',items:[{type:"itemGroup",name:"dataBlocks",title:'{{t("Data blocks")}}',hideIfNoChildren:!0,useChildren:function(){var e,t,i=(0,n.usePlugin)(o()),a=(0,r.useNodeContext)(),c=(0,r.useAvailableUpstreams)(a),l=[(e=(0,r.useFlowContext)().workflow,(t=(0,r.useTrigger)()).useInitializers?t.useInitializers(e.config):null)].filter(Boolean),u=c.map(function(e){var t,n=i.instructions.get(e.type);return null==n||null==(t=n.useInitializers)?void 0:t.call(n,e)}).filter(Boolean);return h(l).concat(h(u.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:u}]:[])).filter(Boolean)}},{type:"itemGroup",name:"otherBlocks",title:'{{t("Other blocks")}}',children:[{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"}]}]});function k(e){var i,c=e.value,l=e.onChange,u=(0,n.useAPIClient)(),p=(0,n.usePlugin)(o()),f=(0,n.useSchemaOptionsContext)(),d=f.components,m=f.scope,y=(0,r.useWorkflowExecuted)(),h=(0,r.useNodeContext)(),w=(0,r.useAvailableUpstreams)(h),g=(0,n.useRequest)((i=function(){var e,t,n,r;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}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(o){switch(o.label){case 0:if(!c)return[3,2];return[4,u.request({url:"uiSchemas:getJsonSchema/".concat(c)})];case 1:if((null==(e=(t=o.sent().data).data)?void 0:e["x-uid"])===c)return[2,t.data];o.label=2;case 2:return r={type:"void",name:n=null!=c?c:(0,a.uid)(),"x-uid":n,"x-component":"Grid","x-initializer":"workflowCc:popup:configureUserInterface:addBlock",properties:v({},(0,a.uid)(),{type:"void","x-component":"Grid.Row",properties:v({},(0,a.uid)(),{type:"void","x-component":"Grid.Col","x-component-props":{span:24},properties:{}})})},[4,u.resource("uiSchemas").insert({values:r})];case 3:return o.sent(),l(n),[2,r]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var o=i.apply(e,t);function a(e){b(o,n,r,a,c,"next",e)}function c(e){b(o,n,r,a,c,"throw",e)}a(void 0)})}),{refreshDeps:[c]}),x=g.data;if(g.loading)return t().createElement(s.Spin,null);var k={};return w.forEach(function(e){Object.assign(k,p.instructions.get(e.type).components)}),t().createElement(n.SchemaComponentProvider,{scope:m,components:d,designable:!y},t().createElement(n.SchemaComponent,{scope:{useReadAction:function(){return{run:function(){}}}},components: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){v(e,t,n[t])})}return e}({},k),schema:x}))}function C(e){return e.value,e.onChange,t().createElement(n.SchemaComponent,{components:{SchemaContent:k},schema:{name:"drawer",type:"void",title:'{{t("User interface", { ns: "'.concat(l,'" })}}'),"x-component":"Action.Container","x-component-props":{className:(0,n.css)(g())},properties:{ccDetail:{type:"string","x-component":"SchemaContent"}}}})}var O=t().createContext({}),S=(0,u.observer)(function(){var e=(0,u.useForm)(),n=e.initialValues,r=e.values;return n.forceRead!=r.forceRead?t().createElement(s.Typography.Paragraph,{type:"secondary"},t().createElement(s.Typography.Text,{type:"warning"},f('Force read changes unsaved, click "Submit" to save.'))):null});function P(o){var i,a=(0,r.useWorkflowExecuted)(),c=(0,n.useActionContext)().setFormValueChanged,u=(i=(0,e.useState)(!1),function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw r}}return i}}(i,2)||w(i,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.")}()),f=u[0],d=u[1],m=(0,p.useTranslation)(l).t;return t().createElement(O.Provider,{value:{setFormValueChanged:c}},t().createElement(s.Button,{type:"primary",onClick:function(){return d(!0)},disabled:!1},m(a?"View user interface":"Configure user interface")),t().createElement(n.ActionContextProvider,{value:{visible:f,setVisible:d,formValueChanged:!1}},o.children),t().createElement(S,null))}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function R(){var e=T(["\n &[disabled] {\n > .ant-formily-array-base-addition {\n display: none;\n }\n > .ant-formily-array-items-item .ant-space-item:not(:nth-child(2)) {\n display: none;\n }\n }\n "]);return R=function(){return e},e}function D(){var e=T(["\n width: 100%;\n &.ant-space.ant-space-horizontal {\n flex-wrap: nowrap;\n }\n > .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n "]);return D=function(){return e},e}var B=function(e){var o;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function u(){var e,o,a;if(!(this instanceof u))throw TypeError("Cannot call a class as a function");return o=u,a=arguments,o=A(o),j(e=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,I()?Reflect.construct(o,a||[],A(this).constructor):o.apply(this,a)),"title",'{{t("CC", { ns: "'.concat(l,'" })}}')),j(e,"type","cc"),j(e,"group","manual"),j(e,"description",'{{t("Information within the workflow can be freely configured into a view interface and made accessible to specific users. A CC task will be generated for them in the tasks center.", { ns: "'.concat(l,'" })}}')),j(e,"icon",t().createElement(c.EyeOutlined,null)),j(e,"fieldset",{users:{type:"array",title:'{{t("Recipients", { ns: "'.concat(l,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems","x-component-props":{className:(0,n.css)(R())},items:{type:"void","x-component":"Space","x-component-props":{className:(0,n.css)(D())},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"UsersSelect"},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},required:!0,properties:{add:{type:"void","x-component":"UsersAddition"}}},ccDetail:{type:"void",title:'{{t("User interface", { ns: "'.concat(l,'" })}}'),"x-decorator":"FormItem","x-component":"SchemaConfigButton",properties:{ccDetail:{type:"void","x-component":"SchemaConfig"}},required:!0},title:{type:"string",title:'{{t("Task title", { ns: "'.concat(l,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea",description:'{{t("Title of each CC item in tasks center. Could use variables in string template. Default to node title.", { ns: "'.concat(l,'" })}}'),default:"{{useNodeContext().title}}"},notifications:{type:"void","x-component":"NotificationFieldset"}}),j(e,"scope",{useNodeContext:r.useNodeContext}),j(e,"components",{ArrayItems:i.ArrayItems,UsersSelect:r.UsersSelect,UsersAddition:r.UsersAddition,SchemaConfigButton:P,SchemaConfig:C,WorkflowVariableTextArea:r.WorkflowVariableTextArea}),e}return u.prototype=Object.create(e&&e.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),e&&E(u,e),o=[{key:"createDefaultConfig",value:function(){return{ccDetail:(0,a.uid)()}}}],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)}}(u.prototype,o),u}(r.Instruction),F={name:"workflowCcTasks",dumpRules:{group:"log"},migrationRules:["schema-only"],shared:!0,createdAt:!0,updatedAt:!0,fields:[{type:"bigInt",name:"id",primaryKey:!0,autoIncrement:!0},{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(l,'" })}}'),"x-component":"Input"}},{type:"belongsTo",name:"execution",onDelete:"CASCADE"},{type:"belongsTo",name:"node",target:"flow_nodes"},{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(l,'" })}}'),"x-component":"Select",enum:[{label:'{{t("Unread", { ns: "'.concat(l,'" })}}'),value:0,color:"gold"},{label:'{{t("Read", { ns: "'.concat(l,'" })}}'),value:1,color:"green"}]},defaultValue:0},{type:"date",name:"readAt",interface:"datetime",uiSchema:{type:"string",title:'{{t("Read at", { ns: "'.concat(l,'" })}}'),"x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"date",name:"createdAt",interface:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"date",name:"updatedAt",interface:"updatedAt",uiSchema:{type:"datetime",title:'{{t("Updated at")}}',"x-component":"DatePicker","x-component-props":{showTime:!0}}}]},q=m(202),_=m(128);function N(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 U(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(r,o)}function z(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,c,"next",e)}function c(e){U(i,r,o,a,c,"throw",e)}a(void 0)})}}function M(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}function V(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(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 N(e,t)}}(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 W(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function K(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}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}}}}function $(){var e=W(["\n .ant-modal-content {\n background: var(--nb-box-bg);\n }\n .ant-modal-header {\n background: none;\n }\n "]);return $=function(){return e},e}function L(){var e=W(["\n .ant-descriptions-header {\n margin-bottom: 0.5em;\n .ant-descriptions-extra {\n color: ",";\n }\n }\n .ant-descriptions-item-label {\n width: 6em;\n }\n "]);return L=function(){return e},e}function H(){var e=W(["\n .ant-card-extra {\n color: ",";\n }\n "]);return H=function(){return e},e}function J(){return{form:(0,n.useFormBlockContext)().form}}function Q(){var e=(0,n.useCollectionRecordData)(),t=(0,n.useActionContext)(),r=(0,n.useAPIClient)(),o=(0,n.useCollectionRecordData)().id,i=((0,n.useListBlockContext)()||{}).service,a=e.status?"unread":"read";return{run:function(){return z(function(){var e;return K(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.resource("workflowCcTasks")[a]({filterByTk:o})];case 1:return n.sent(),t.setVisible(!1),t.setSubmitted(!0),null==i||null==(e=i.refresh)||e.call(i),[3,3];case 2:return console.error("Failed to mark task as read:",n.sent()),[3,3];case 3:return[2]}})})()}}}function X(e){return(0,n.useCollectionRecordData)().status?{title:f("Mark as unread")}:{type:"primary",title:f("Mark as read")}}function Y(){var e=(0,n.useAPIClient)(),t=(0,n.useListBlockContext)();return{run:function(){return z(function(){var n,r;return K(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e.resource("workflowCcTasks").read()];case 1:return o.sent(),null==t||null==(r=t.service)||null==(n=r.refresh)||n.call(r),[3,3];case 2:return console.error("Failed to mark task as read:",o.sent()),[3,3];case 3:return[2]}})})()}}}function Z(e){var t=(0,r.useTasksCountsContext)().counts;return V(M({},e),{disabled:!t.cc.pending})}function ee(i){var a,c=(0,n.usePlugin)(o()),l=(0,n.useAPIClient)(),u=((0,n.useCollectionRecordData)()||{}).id,p=G((0,e.useState)(null),2),f=p[0],d=p[1],m=G((0,e.useState)((0,n.useCollectionRecordData)()),2),y=m[0],b=m[1],v=G((0,e.useState)(null),2),h=v[0],w=v[1];(0,e.useEffect)(function(){var e,t;u&&(null==(e=(t=l.resource("workflowCcTasks")).get)||e.call(t,{filterByTk:u,appends:["node","job","workflow","workflow.nodes","execution","execution.jobs"]}).then(function(e){var t,n=e.data,o=null!=(t=null==n?void 0:n.data)?t:{},i=o.node,a=o.workflow,c=(void 0===a?{}:a).nodes,l=void 0===c?[]:c,u=o.execution,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o.workflow,["nodes"]);(0,r.linkNodes)(l),w(i),d({workflow:s,nodes:l,execution:u}),b(null==n?void 0:n.data)}))},[l,u]);var g=(0,r.useAvailableUpstreams)(null==f?void 0:f.nodes.find(function(e){return e.id===h.id})).reduce(function(e,t){var n=t.type;return Object.assign(e,c.instructions.get(n).components)},{});return h&&f?t().createElement(n.CollectionRecordProvider,{record:y},t().createElement(r.FlowContext.Provider,{value:f},t().createElement(r.NodeContext.Provider,{value:h},t().createElement(n.RemoteSchemaComponent,{components:M({DetailsBlockProvider:r.DetailsBlockProvider},g),scope:{useDetailsBlockProps:J},uid:null==(a=h.config)?void 0:a.ccDetail,noForm:!0})))):t().createElement(s.Spin,null)}function et(e){var r=(0,p.useTranslation)().t,o=(0,q.useAntdToken)();return t().createElement(s.ConfigProvider,{theme:{token:{fontSizeLG:14}}},t().createElement(s.Descriptions,V(M({},e),{column:1,items:[{key:"createdAt",label:r("Created at"),children:t().createElement(n.SchemaComponent,{schema:{name:"createdAt",type:"string","x-component":"CollectionField","x-read-pretty":!0}})},{key:"status",label:r("Status",{ns:"workflow"}),children:t().createElement(n.SchemaComponent,{components:{},schema:{name:"status",type:"number","x-component":"CollectionField","x-read-pretty":!0}})}],className:(0,n.css)(L(),o.colorTextDescription)})))}m(467);var en={pending:{status:0},completed:{status:1}},er={title:'{{t("CC to me", { ns: "'.concat(l,'" })}}'),collection:"workflowCcTasks",action:"listMine",useActionParams:function(e){var t;return(0,n.useCurrentUserContext)().data,{filter:null!=(t=en[e])?t:{},appends:["node.id","node.title","workflow.id","workflow.title","workflow.enabled","execution.id","execution.status"],except:["node.config","workflow.config","workflow.options","execution.context","execution.output"]}},Actions:function(e){return t().createElement(n.SchemaComponent,{scope:{useReadAllAction:Y,useReadAllActionProps:Z},schema:{name:"actions",type:"void","x-component":"ActionBar",properties:{refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":M({icon:"ReloadOutlined"},e)},filter:{type:"void",title:'{{t("Filter")}}',"x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":M({icon:"FilterOutlined"},e),default:{$and:[{title:{$includes:""}},{"workflow.title":{$includes:""}}]}},readAll:{type:"void",title:'{{t("Mark all as read", { ns: "'.concat(l,'" })}}'),"x-component":"Action","x-use-component-props":"useReadAllActionProps","x-component-props":M({useAction:"{{useReadAllAction}}",icon:"CheckOutlined"},e)}}}})},Item:function(){var o=(0,q.useAntdToken)(),i=(0,n.useCollectionRecordData)(),a=(0,_.useNavigate)(),c=(0,r.usePopupRecordContext)().setRecord,l=(0,e.useCallback)(function(e){var t=e.target;e.currentTarget.contains(t)&&(c(i),a("./".concat(i.id))),e.stopPropagation()},[a,i,c]);return t().createElement(s.Card,{onClick:l,hoverable:!0,size:"small",title:i.title,extra:t().createElement(r.WorkflowTitle,i.workflow),className:(0,n.css)(H(),o.colorTextDescription)},t().createElement(et,null))},Detail:function(){var r,o=(0,e.useContext)(n.SchemaComponentContext),i=(0,n.useCollectionRecordData)(),a=i||{},c=a.id,l=a.node,u=a.workflow,s=a.status;return i?t().createElement(n.SchemaComponentContext.Provider,{value:V(M({},o),{reset:function(){},designable:!1})},t().createElement(n.SchemaComponent,{components:{FlowContextProvider:ee},scope:{useReadAction:Q,useReadActionProps:X},schema:{type:"void",name:"manual-detail-drawer-".concat(c,"-").concat(s),"x-component":"Action.Container","x-component-props":{className:(0,n.css)($())},title:null!=(r=null==l?void 0:l.title)?r:"".concat(null==u?void 0:u.title," - ").concat("#".concat(null==l?void 0:l.id)),properties:{tabs:{type:"void","x-component":"FlowContextProvider"},footer:{type:"void","x-component":"Action.Container.Footer",properties:{content:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:0}},properties:{read:{type:"void","x-component":"Action","x-use-component-props":"useReadActionProps","x-component-props":{useAction:"{{useReadAction}}"}}}}}}}}})):null}};function eo(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(r,o)}function ei(e,t,n){return(ei=eu()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ec(o,n.prototype),o}).apply(null,arguments)}function ea(e){return(ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ec(e,t){return(ec=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function el(e){var t="function"==typeof Map?new Map:void 0;return(el=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 ei(e,arguments,ea(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ec(n,e)})(e)}function eu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eu=function(){return!!e})()}function es(e){return t().createElement(n.ExtendCollectionsProvider,{collections:[F]},e.children)}var ep=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=ea(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eu()?Reflect.construct(e,t||[],ea(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&ec(r,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){var e;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}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(r){return t.app.addProvider(es),(e=t.app.pm.get(o())).registerInstruction("cc",B),e.registerTaskType("cc",er),t.app.schemaInitializerManager.add(x),t.app.schemaSettingsManager.add(new n.SchemaSettings({name:"actionSettings:workflow:cc:read",items:[{name:"editButton",Component:n.ButtonEditor,useComponentProps:function(){return(0,n.useSchemaToolbar)().buttonEditorProps}},{name:"delete",sort:100,Component:n.RemoveButton,useComponentProps:function(){return(0,n.useSchemaToolbar)().removeButtonProps}}]})),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eo(i,r,o,a,c,"next",e)}function c(e){eo(i,r,o,a,c,"throw",e)}a(void 0)})})()}}],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)}}(r.prototype,t),r}(el(n.Plugin)),ef=ep}(),y}()});
@@ -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 React from 'react';
10
+ import { SchemaInitializer } from '@nocobase/client';
11
+ export declare const addBlockButton: SchemaInitializer<import("antd").ButtonProps, {}>;
12
+ export declare function SchemaConfig({ value, onChange }: {
13
+ value: any;
14
+ onChange: any;
15
+ }): React.JSX.Element;
16
+ export declare function SchemaConfigButton(props: any): React.JSX.Element;
@@ -0,0 +1,111 @@
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
+ * This file is part of the NocoBase (R) project.
11
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
12
+ * Authors: NocoBase Team.
13
+ *
14
+ * This program is offered under a commercial license.
15
+ * For more information, see <https://www.nocobase.com/agreement>
16
+ */
17
+ import React from 'react';
18
+ import { Instruction, WorkflowVariableTextArea, UsersAddition, UsersSelect, useNodeContext } from '@nocobase/plugin-workflow/client';
19
+ import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
20
+ export default class extends Instruction {
21
+ title: string;
22
+ type: string;
23
+ group: string;
24
+ description: string;
25
+ icon: React.JSX.Element;
26
+ fieldset: {
27
+ users: {
28
+ type: string;
29
+ title: string;
30
+ 'x-decorator': string;
31
+ 'x-component': string;
32
+ 'x-component-props': {
33
+ className: string;
34
+ };
35
+ items: {
36
+ type: string;
37
+ 'x-component': string;
38
+ 'x-component-props': {
39
+ className: string;
40
+ };
41
+ properties: {
42
+ sort: {
43
+ type: string;
44
+ 'x-decorator': string;
45
+ 'x-component': string;
46
+ };
47
+ input: {
48
+ type: string;
49
+ 'x-decorator': string;
50
+ 'x-component': string;
51
+ };
52
+ remove: {
53
+ type: string;
54
+ 'x-decorator': string;
55
+ 'x-component': string;
56
+ };
57
+ };
58
+ };
59
+ required: boolean;
60
+ properties: {
61
+ add: {
62
+ type: string;
63
+ 'x-component': string;
64
+ };
65
+ };
66
+ };
67
+ ccDetail: {
68
+ type: string;
69
+ title: string;
70
+ 'x-decorator': string;
71
+ 'x-component': string;
72
+ properties: {
73
+ ccDetail: {
74
+ type: string;
75
+ 'x-component': string;
76
+ };
77
+ };
78
+ required: boolean;
79
+ };
80
+ title: {
81
+ type: string;
82
+ title: string;
83
+ 'x-decorator': string;
84
+ 'x-component': string;
85
+ description: string;
86
+ default: string;
87
+ };
88
+ notifications: {
89
+ type: string;
90
+ 'x-component': string;
91
+ };
92
+ };
93
+ createDefaultConfig(): {
94
+ ccDetail: string;
95
+ };
96
+ scope: {
97
+ useNodeContext: typeof useNodeContext;
98
+ };
99
+ components: {
100
+ ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
101
+ Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
102
+ type?: "card" | "divide";
103
+ }>;
104
+ };
105
+ UsersSelect: typeof UsersSelect;
106
+ UsersAddition: typeof UsersAddition;
107
+ SchemaConfigButton: typeof SchemaConfigButton;
108
+ SchemaConfig: typeof SchemaConfig;
109
+ WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
110
+ };
111
+ }
@@ -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
+ export declare function lang(key: string, options?: {}): string;
10
+ export declare function usePluginTranslation(): import("react-i18next").UseTranslationResponse<"@nocobase/plugin-workflow-cc", undefined>;
@@ -0,0 +1,27 @@
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
+ declare function Drawer(): React.JSX.Element;
11
+ declare function TaskItem(): React.JSX.Element;
12
+ declare function useTodoActionParams(status: any): {
13
+ filter: any;
14
+ appends: string[];
15
+ except: string[];
16
+ };
17
+ declare function TodoExtraActions(props: any): React.JSX.Element;
18
+ export declare const ccTodo: {
19
+ title: string;
20
+ collection: string;
21
+ action: string;
22
+ useActionParams: typeof useTodoActionParams;
23
+ Actions: typeof TodoExtraActions;
24
+ Item: typeof TaskItem;
25
+ Detail: typeof Drawer;
26
+ };
27
+ export {};
@@ -0,0 +1,145 @@
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
+ declare const _default: {
10
+ name: string;
11
+ dumpRules: {
12
+ group: string;
13
+ };
14
+ migrationRules: string[];
15
+ shared: boolean;
16
+ createdAt: boolean;
17
+ updatedAt: boolean;
18
+ fields: ({
19
+ type: string;
20
+ name: string;
21
+ primaryKey: boolean;
22
+ autoIncrement: boolean;
23
+ target?: undefined;
24
+ foreignKey?: undefined;
25
+ interface?: undefined;
26
+ uiSchema?: undefined;
27
+ onDelete?: undefined;
28
+ defaultValue?: undefined;
29
+ } | {
30
+ type: string;
31
+ name: string;
32
+ target: string;
33
+ foreignKey: string;
34
+ primaryKey: boolean;
35
+ autoIncrement?: undefined;
36
+ interface?: undefined;
37
+ uiSchema?: undefined;
38
+ onDelete?: undefined;
39
+ defaultValue?: undefined;
40
+ } | {
41
+ type: string;
42
+ name: string;
43
+ interface: string;
44
+ uiSchema: {
45
+ type: string;
46
+ title: string;
47
+ 'x-component': string;
48
+ 'x-component-props'?: undefined;
49
+ enum?: undefined;
50
+ };
51
+ primaryKey?: undefined;
52
+ autoIncrement?: undefined;
53
+ target?: undefined;
54
+ foreignKey?: undefined;
55
+ onDelete?: undefined;
56
+ defaultValue?: undefined;
57
+ } | {
58
+ type: string;
59
+ name: string;
60
+ onDelete: string;
61
+ primaryKey?: undefined;
62
+ autoIncrement?: undefined;
63
+ target?: undefined;
64
+ foreignKey?: undefined;
65
+ interface?: undefined;
66
+ uiSchema?: undefined;
67
+ defaultValue?: undefined;
68
+ } | {
69
+ type: string;
70
+ name: string;
71
+ target: string;
72
+ primaryKey?: undefined;
73
+ autoIncrement?: undefined;
74
+ foreignKey?: undefined;
75
+ interface?: undefined;
76
+ uiSchema?: undefined;
77
+ onDelete?: undefined;
78
+ defaultValue?: undefined;
79
+ } | {
80
+ type: string;
81
+ name: string;
82
+ target: string;
83
+ foreignKey: string;
84
+ onDelete: string;
85
+ interface: string;
86
+ uiSchema: {
87
+ type: string;
88
+ title: string;
89
+ 'x-component': string;
90
+ 'x-component-props': {
91
+ fieldNames: {
92
+ label: string;
93
+ value: string;
94
+ };
95
+ showTime?: undefined;
96
+ };
97
+ enum?: undefined;
98
+ };
99
+ primaryKey?: undefined;
100
+ autoIncrement?: undefined;
101
+ defaultValue?: undefined;
102
+ } | {
103
+ type: string;
104
+ name: string;
105
+ interface: string;
106
+ uiSchema: {
107
+ type: string;
108
+ title: string;
109
+ 'x-component': string;
110
+ enum: {
111
+ label: string;
112
+ value: number;
113
+ color: string;
114
+ }[];
115
+ 'x-component-props'?: undefined;
116
+ };
117
+ defaultValue: number;
118
+ primaryKey?: undefined;
119
+ autoIncrement?: undefined;
120
+ target?: undefined;
121
+ foreignKey?: undefined;
122
+ onDelete?: undefined;
123
+ } | {
124
+ type: string;
125
+ name: string;
126
+ interface: string;
127
+ uiSchema: {
128
+ type: string;
129
+ title: string;
130
+ 'x-component': string;
131
+ 'x-component-props': {
132
+ showTime: boolean;
133
+ fieldNames?: undefined;
134
+ };
135
+ enum?: undefined;
136
+ };
137
+ primaryKey?: undefined;
138
+ autoIncrement?: undefined;
139
+ target?: undefined;
140
+ foreignKey?: undefined;
141
+ onDelete?: undefined;
142
+ defaultValue?: undefined;
143
+ })[];
144
+ };
145
+ export default _default;