@nocobase/plugin-workflow-cc 2.0.0-alpha.5 → 2.0.0-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd-style"),require("antd")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-cc",["react-i18next","@formily/shared","@nocobase/client","react-router-dom","@nocobase/plugin-workflow/client","@formily/antd-v5","react","@formily/react","@ant-design/icons","lodash","antd-style","antd"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-cc"]=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd-style"),require("antd")):e["@nocobase/plugin-workflow-cc"]=t(e["react-i18next"],e["@formily/shared"],e["@nocobase/client"],e["react-router-dom"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"],e.react,e["@formily/react"],e["@ant-design/icons"],e.lodash,e["antd-style"],e.antd)}(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=l},632:function(e){e.exports=i},505:function(e){e.exports=c},875:function(e){e.exports=t},772:function(e){e.exports=n},433:function(e){e.exports=o},721:function(e){e.exports=p},202:function(e){e.exports=s},467:function(e){e.exports=u},156:function(e){e.exports=a},238:function(t){t.exports=e},128:function(e){e.exports=r}},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}({SimpleDesigner:r.SimpleDesigner},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 R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R=function(){return!!e})()}function D(){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 D=function(){return e},e}function I(){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 I=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,R()?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("Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.", { 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)(D())},items:{type:"void","x-component":"Space","x-component-props":{className:(0,n.css)(I())},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:"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(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}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd-style"),require("antd")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-cc",["react-i18next","@formily/shared","@nocobase/client","react-router-dom","@nocobase/plugin-workflow/client","@formily/antd-v5","react","@formily/react","@ant-design/icons","lodash","antd-style","antd"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-cc"]=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@formily/react"),require("@ant-design/icons"),require("lodash"),require("antd-style"),require("antd")):e["@nocobase/plugin-workflow-cc"]=t(e["react-i18next"],e["@formily/shared"],e["@nocobase/client"],e["react-router-dom"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"],e.react,e["@formily/react"],e["@ant-design/icons"],e.lodash,e["antd-style"],e.antd)}(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=l},632:function(e){e.exports=i},505:function(e){e.exports=c},875:function(e){e.exports=t},772:function(e){e.exports=n},433:function(e){e.exports=o},721:function(e){e.exports=p},202:function(e){e.exports=s},467:function(e){e.exports=u},156:function(e){e.exports=a},238:function(t){t.exports=e},128:function(e){e.exports=r}},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}({SimpleDesigner:r.SimpleDesigner},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 R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R=function(){return!!e})()}function D(){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 D=function(){return e},e}function I(){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 I=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,R()?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("Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.", { 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)(D())},items:{type:"void","x-component":"Space","x-component-props":{className:(0,n.css)(I())},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:"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(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,n=(0,r.useTasksCountsContext)().counts;return V(M({},e),{disabled:!(null==(t=n.cc)?void 0:t.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}()});
@@ -9,18 +9,18 @@
9
9
 
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
- "@nocobase/client": "2.0.0-alpha.5",
13
- "@nocobase/plugin-workflow": "2.0.0-alpha.5",
12
+ "@nocobase/client": "2.0.0-alpha.50",
13
+ "@nocobase/plugin-workflow": "2.0.0-alpha.50",
14
14
  "react-i18next": "11.18.6",
15
15
  "antd-style": "3.7.1",
16
16
  "antd": "5.24.2",
17
17
  "react-router-dom": "6.30.1",
18
18
  "lodash": "4.17.21",
19
- "@nocobase/utils": "2.0.0-alpha.5",
20
- "@nocobase/plugin-ui-schema-storage": "2.0.0-alpha.5",
21
- "@nocobase/actions": "2.0.0-alpha.5",
22
- "@nocobase/server": "2.0.0-alpha.5",
23
- "@nocobase/database": "2.0.0-alpha.5",
19
+ "@nocobase/utils": "2.0.0-alpha.50",
20
+ "@nocobase/plugin-ui-schema-storage": "2.0.0-alpha.50",
21
+ "@nocobase/actions": "2.0.0-alpha.50",
22
+ "@nocobase/server": "2.0.0-alpha.50",
23
+ "@nocobase/database": "2.0.0-alpha.50",
24
24
  "@formily/shared": "2.3.7",
25
25
  "@formily/react": "2.3.7",
26
26
  "@formily/antd-v5": "1.2.3",
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
3
8
  "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
4
10
  "Recipients": "Recipients",
5
- "User interface": "User interface",
6
- "View user interface": "View user interface",
7
- "Configure user interface": "Configure user interface",
8
11
  "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
9
- "Read": "Read",
10
12
  "Unread": "Unread",
11
- "Mark as read": "Mark as read",
12
- "Mark as unread": "Mark as unread",
13
- "Mark all as read": "Mark all as read",
14
- "CC to me": "CC to me"
15
- }
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "Копия",
3
+ "CC to me": "Копия мне",
4
+ "Configure user interface": "Настроить пользовательский интерфейс",
5
+ "Mark all as read": "Отметить все как прочитанные",
6
+ "Mark as read": "Отметить как прочитанное",
7
+ "Mark as unread": "Отметить как непрочитанное",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Предоставить функцию \"Копия\" в рабочих процессах для отправки подтверждений или любой другой информации указанным пользователям.",
9
+ "Read": "Прочитано",
10
+ "Recipients": "Получатели",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Заголовок каждого элемента копии в Центре задач. Можно использовать переменные в шаблоне строки. По умолчанию - заголовок узла.",
12
+ "Unread": "Не прочитано",
13
+ "User interface": "Пользовательский интерфейс",
14
+ "View user interface": "Просмотр пользовательского интерфейса"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "CC": "抄送",
3
+ "CC to me": "抄送我的",
4
+ "Configure user interface": "配置用户界面",
5
+ "Mark all as read": "全部标为已读",
6
+ "Mark as read": "标为已读",
7
+ "Mark as unread": "标为未读",
3
8
  "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "在工作流中提供抄送功能,将审批或其他任意信息抄送给特定的用户。",
9
+ "Read": "已读",
4
10
  "Recipients": "接收人",
5
- "User interface": "用户界面",
6
- "View user interface": "查看用户界面",
7
- "Configure user interface": "配置用户界面",
8
11
  "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "待办中心每个抄送项的标题。可以在字符串模板中使用变量。默认为节点标题。",
9
- "Read": "已读",
10
12
  "Unread": "未读",
11
- "Mark as read": "标为已读",
12
- "Mark as unread": "标为未读",
13
- "Mark all as read": "全部标为已读",
14
- "CC to me": "抄送我的"
15
- }
13
+ "User interface": "用户界面",
14
+ "View user interface": "查看用户界面"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "CC": "CC",
3
+ "CC to me": "CC to me",
4
+ "Configure user interface": "Configure user interface",
5
+ "Mark all as read": "Mark all as read",
6
+ "Mark as read": "Mark as read",
7
+ "Mark as unread": "Mark as unread",
8
+ "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
9
+ "Read": "Read",
10
+ "Recipients": "Recipients",
11
+ "Title of each CC item in tasks center. Could use variables in string template. Default to node title.": "Title of each CC item in tasks center. Could use variables in string template. Default to node title.",
12
+ "Unread": "Unread",
13
+ "User interface": "User interface",
14
+ "View user interface": "View user interface"
15
+ }
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-workflow-cc",
3
3
  "displayName": "Workflow: CC",
4
+ "displayName.ru-RU": "Рабочий процесс: Копия (CC)",
4
5
  "displayName.zh-CN": "工作流:抄送",
5
6
  "description": "Provide a CC (carbon copy) feature in workflows to send approvals, or any other type of information to specified users.",
6
7
  "description.zh-CN": "在工作流中提供抄送功能,将审批或其他任意信息抄送给特定的用户。",
8
+ "description.ru-RU": "Предоставляет функцию CC (копия) в рабочих процессах для отправки утверждений или любого другого типа информации указанным пользователям.",
7
9
  "homepage": "https://docs.nocobase.com/handbook/workflow-cc",
10
+ "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/workflow-cc",
8
11
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow-cc",
9
12
  "license": "AGPL-3.0",
10
- "version": "2.0.0-alpha.5",
13
+ "version": "2.0.0-alpha.50",
11
14
  "main": "dist/server/index.js",
12
15
  "peerDependencies": {
13
16
  "@nocobase/actions": "2.x",
@@ -22,5 +25,5 @@
22
25
  "keywords": [
23
26
  "Workflow"
24
27
  ],
25
- "gitHead": "943e035bbec27f9ecfe8ce8857955945f20976f3"
28
+ "gitHead": "a6eb64abf3632e116ad0b295a7f410270a1059d1"
26
29
  }