antd-management-fast-flow 1.0.148 → 1.0.152
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/es/index.js +1 -1
- package/package.json +14 -14
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{PureComponent as t,useEffect as n}from"react";import r,{getSmoothStepPath as o,BaseEdge as a,EdgeLabelRenderer as l,Handle as i,Position as c,MarkerType as p,useNodesState as d,useEdgesState as s,Controls as u,MiniMap as m,Panel as f,Background as g}from"reactflow";import{getValueByKey as y,isFunction as x,convertCollection as b,checkStringIsNullOrWhiteSpace as E,isUndefined as h,isNull as v,buildRandomHexColor as k,isArray as C}from"easy-soft-utility";import{Typography as P,Space as w,Divider as S,Button as R,Card as N,Alert as O,Empty as z,Timeline as A}from"antd";import{iconBuilder as L,FlexBox as K,VerticalBox as j,ColorText as B,CenterBox as T,HelpBox as Y,ScrollFacadeBox as X}from"antd-management-fast-component";import I from"classnames";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 _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,l,i=[],c=!0,p=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){p=!0,o=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function H(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==F(t)?t:t+""}function V(e,t,n){return(t=H(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var M="antd-management-fast-flow",U="#4e44f2",W="#a98477",$="#ffcc00",G="#bed2bb",Q="#a4baea",Z="#e895d2",ee="#c2fa32",te="#05ea7f",ne={backgroundColor:Z},re={backgroundColor:ee},oe={backgroundColor:te},ae=P.Text;function le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t,n){return t&&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,H(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ce(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}var me=P.Text,fe=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,ue()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,g=t.centerY,b=t.offset,E=t.markerEnd,h=t.style,v=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:g,offset:b}),3),k=v[0],C=v[1],P=v[2],S=J({canEdit:!1,multibranch:!1},r),R=S.data,N=S.canEdit,O=S.onChange,z=S.onRemove,A=y({data:R,key:"title"}),K=y({data:R,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:k,markerEnd:E,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(C,"px,").concat(P,"px)"),background:Q,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:K||""},e.createElement(w,null,e.createElement(me,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(921, 120, 90, .6)")}},A||"抄送"),N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(O)&&O(R)}},L.edit()):null,N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(z)&&z(R)}},L.delete()):null))))}}])}();function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}var ye=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,ge()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.data,r=t.size,o=J({canEdit:!1,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listApproverKey:"listApprover",approverNameKey:"name",approverNameLabel:""},n),a=o.data,l=o.isNext,p=o.canEdit,d=o.nodeNameKey,s=o.listApproverKey,u=o.approverNameKey,m=o.approverNameLabel,f=o.onAddApprover,g=o.onChange,h=o.onRemove,v=o.onRemoveApprover,k=y({data:a,key:d,defaultValue:"暂无"}),C=y({data:a,key:s,convert:b.array}),P=C.length>0;return e.createElement(e.Fragment,null,e.createElement("div",{className:I("".concat(M+"-node"),l?"".concat(M+"-node-next"):null)},e.createElement("div",{className:"".concat(M+"-node-header"),style:oe},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:k||"抄送项"})),leftStyle:{paddingRight:"5px"},right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击添加抄送人",onClick:function(e){e.stopPropagation(),x(f)&&f(a)}},L.plusCircle()),e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑节点",onClick:function(e){e.stopPropagation(),x(g)&&g(a)}},L.edit()),e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(h)&&h(a)}},L.delete())):null})),"small"!==r&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(w,{direction:"vertical",style:{width:"100%"},split:e.createElement(S,{style:{margin:"0"}})},P&&C.map(function(t,n){var r=y({data:t,key:u,defaultValue:""});return e.createElement(K,{key:"user_".concat(n),flexAuto:"left",left:e.createElement(B,{textPrefix:m,text:r||"未设置",separatorStyle:{paddingRight:"3px"},textPrefixStyle:{color:"#333"},color:E(r)?"#ccc":""}),right:p?e.createElement(w,{split:e.createElement(S,{type:"vertical",style:{marginLeft:"1px",marginRight:"1px"}})},e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"移除抄送人",onClick:function(e){e.stopPropagation(),x(v)&&v(t)}},L.delete())):null})}),P?null:e.createElement("div",null,"未设置抄送人",p?",点击 ":"",p?L.plusCircle():"",p?" 按钮添加":"","。")))))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"50%",background:U},isConnectable:!0}))}}])}();ye.defaultProps={color:"black",data:{},size:""};function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xe=function(){return!!e})()}var be=P.Text,Ee=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,xe()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,g=t.centerY,b=t.offset,E=t.markerEnd,h=t.style,v=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:g,offset:b}),3),k=v[0],C=v[1],P=v[2],S=J({canEdit:!1,multibranch:!1},r),R=S.data,N=S.canEdit,O=S.multibranch,z=S.onChange,A=S.onChangeBranchCondition,K=S.onRemove,j=y({data:R,key:"title"}),B=y({data:R,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:k,markerEnd:E,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(C,"px,").concat(P,"px)"),background:$,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:B||""},e.createElement(w,null,e.createElement(be,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(211, 220, 50, .6)")}},j||"前进"),N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(z)&&z(R)}},L.edit()):null,O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更绑定的正向连接条件",onClick:function(e){e.stopPropagation(),x(A)&&A(R)}},L.nodeIndex()):null,N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(K)&&K(R)}},L.delete()):null))))}}])}();function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(he=function(){return!!e})()}var ve=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,he()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.data,r=t.size,o=J({canEdit:!1,canEditApprover:!1,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listOutLineKey:"listOutLine",listApproverKey:"listApprover",approverNameKey:"approverName",approverNameLabel:"",footerBuilder:null},n),a=o.data,l=o.isNext,p=o.canEdit,d=o.canEditApprover,s=o.canListApprover,u=o.multibranch,m=o.nodeNameKey,f=o.listApproverKey,g=o.approverNameKey,k=o.approverNameLabel,C=o.footerBuilder,P=o.onAddApprover,N=o.onEditApprover,O=o.onListApprover,z=o.onChange,A=o.onChangeBranchCondition,T=o.onRemove,Y=o.onRemoveApprover,X=y({data:a,key:m,defaultValue:"暂无"}),D=y({data:a,key:f,convert:b.array}),_=D.length>0,F=null;return x(C)&&(F=C(a)),e.createElement(e.Fragment,null,e.createElement("div",{className:I("".concat(M+"-node"),l?"".concat(M+"-node-next"):null)},e.createElement("div",{className:"".concat(M+"-node-header")},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement("div",{style:{width:"100%"}},e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:X||"流程项"}))),rightStyle:{paddingLeft:"10px"},right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击添加审批人",onClick:function(e){e.stopPropagation(),x(P)&&P(a)}},L.plusCircle()),s?e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"审批人列表",onClick:function(e){e.stopPropagation(),x(O)&&O(a)}},L.unorderedList()):null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑节点",onClick:function(e){e.stopPropagation(),x(z)&&z(a)}},L.edit()),u?e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑分支条件",onClick:function(e){e.stopPropagation(),x(A)&&A(a)}},L.branches()):null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(T)&&T(a)}},L.delete())):null})),"small"!==r&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(w,{direction:"vertical",style:{width:"100%"},split:e.createElement(S,{style:{margin:"0"}})},_&&D.map(function(t,n){var r=y({data:t,key:g,defaultValue:""});return e.createElement(K,{key:"user_".concat(n),flexAuto:"left",left:e.createElement(B,{textPrefix:k,text:r||"未设置",separatorStyle:{paddingRight:"3px"},textPrefixStyle:{color:"#333"},color:E(r)?"#ccc":""}),right:p?e.createElement(w,null,d?e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"编辑审批人或职级",onClick:function(e){e.stopPropagation(),x(N)&&N(t)}},L.edit()):null,e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"移除审批人或职级",onClick:function(e){e.stopPropagation(),x(Y)&&Y(t)}},L.delete())):null})}),_?null:e.createElement("div",null,"未设置人或职级",p?",点击 ":"",p?L.plusCircle():"",p?" 添加":"","。"))),h(F)||v(F)?null:e.createElement(S,{style:{margin:"6px 0"}}),h(F)||v(F)?null:e.createElement("div",{className:"".concat(M+"-node-content-footer")},F),e.createElement("div",null)))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"45%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",id:"top",position:c.Top,style:{left:"55%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"33%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Left,id:"left",style:{top:"66%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"66%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Right,id:"right",style:{top:"33%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"55%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Bottom,id:"bottom",style:{left:"45%",background:W},isConnectable:!0}))}}])}();ve.defaultProps={color:"black",data:{},size:""};var ke={intermediate:ve,carbonCopy:ye,start:function(t){var n=t.size,r=t.onClick;return e.createElement(e.Fragment,null,e.createElement("div",{className:"".concat(M+"-node"),onClick:r},e.createElement("div",{className:"".concat(M+"-node-header"),style:ne},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",text:"起始点"}))})),"small"!==n&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(B,{text:"此为流程发起唯一节点,无审批人。"}))))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"45%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",id:"top",position:c.Top,style:{left:"55%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"33%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Left,id:"left",style:{top:"66%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"66%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Right,id:"right",style:{top:"33%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"55%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Bottom,id:"bottom",style:{left:"45%",background:W},isConnectable:!0}))},end:function(t){var n=t.size,r=t.data,o=t.onClick,a=J({canRemove:!1},r),l=a.data,p=a.canRemove,d=a.onRemove,s=y({data:l,key:"name"}),u=y({data:l,key:"description"});return e.createElement(e.Fragment,null,e.createElement("div",{className:"".concat(M+"-node"),onClick:o,title:u||""},e.createElement("div",{className:"".concat(M+"-node-header"),style:re},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:s||"终止点"})),right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(d)&&d(l)}},L.delete())):null})),"small"!==n&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(B,{text:"此节点为终止节点,代表流程结束。"}))))),e.createElement(i,{type:"target",position:c.Top,id:"top",style:{background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Bottom,id:"bottom",style:{top:"100%",background:U},isConnectable:!0}))}},Ce={forward:Ee,backward:function(t){var n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,g=t.centerY,b=t.offset,E=t.style,h=void 0===E?{}:E,v=t.markerEnd,k=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:g,offset:b}),3),C=k[0],P=k[1],S=k[2],R=J({canEdit:!1,multibranch:!1},r),N=R.data,O=R.canEdit,z=R.multibranch,A=R.onChange,K=R.onChangeBranchCondition,j=R.onRemove,B=y({data:N,key:"title"}),T=y({data:N,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:C,markerEnd:v,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(P,"px,").concat(S,"px)"),background:G,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:T||""},e.createElement(w,null,e.createElement(ae,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(52, 231, 228, .6)"),color:"#666"}},B||"回退"),O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(A)&&A(N)}},L.edit()):null,z?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更绑定逆向连接条件",onClick:function(e){e.stopPropagation(),x(K)&&K(N)}},L.pullRequest()):null,O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(j)&&j(N)}},L.delete()):null))))},carbonCopy:fe};function Pe(){return e.createElement(N,{title:"图示说明:",size:"small"},e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:Z,borderRadius:"3px"}})),right:"流程起始节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:"#f66902",borderRadius:"3px"}})),right:"流程中间节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:te,borderRadius:"3px"}})),right:"流程抄送节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:ee,borderRadius:"3px"}})),right:"流程终止节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",border:"2px solid",borderImage:"linear-gradient(45deg, gold, deeppink) 1",clipPath:"inset(0px round 5px)",filter:"hue-rotate(360deg)"}})),right:"等待流转节点"})),e.createElement(S,{type:"horizontal",style:{marginTop:"6px",marginBottom:"6px"}}),e.createElement("div",null,e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"6px",width:"6px",backgroundColor:U,borderRadius:"50%"}})),right:"节点流程入口"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"6px",width:"6px",backgroundColor:W,borderRadius:"50%"}})),right:"节点流程出口"})),e.createElement(S,{type:"horizontal",style:{marginTop:"6px",marginBottom:"6px"}}),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:$,borderRadius:"3px"}})),right:"前进指向标签"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:Q,borderRadius:"3px"}})),right:"抄送指向标签"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:G,borderRadius:"3px"}})),right:"回退指向标签"})))}function we(){return e.createElement(N,{title:"操作说明:",size:"small"},e.createElement("div",{style:{width:"180px"}},e.createElement(Y,{showTitle:!1,showNumber:!0,labelWidth:18,list:[{text:"起始节点仅能存在一个。"},{text:"点击节点中的 ”编辑“ 可设置节点信息。"},{text:"点击节点中的 ”更改“ 可设置节点审核人信息。"},{text:"点击节点中的 ”条件“ 可设置节点的分支进入条件, 仅在存在多条驶出线条时可用。"},{text:"点击线条中的 ”变更“ 可设置连线信息。"},{text:"点击 刷新图标 可重新加载信息。"},{text:"点击节点或线条的 删除图标 可删除节点或连线。"}],useBackground:!1})))}function Se(e){return J({position:{x:0,y:0},canEdit:!1},e)}function Re(e){var t=y({data:e,key:"index",convert:b.number}),n=y({data:e,key:"forward",convert:b.boolean}),r=y({data:e,key:"carbonCopy",convert:b.boolean}),o=t>0?k({seed:30*t+t+2}):"#b1b1b7",a=t>0?k({seed:30*t+t+2}):"#ea7f5b";return J(J({animated:!0,canEdit:!1,sourceHandle:n?"bottom":"right",targetHandle:n?"top":"right"},e),{},{type:n?r?"carbonCopy":"forward":"backward",markerEnd:{type:p.ArrowClosed,color:n?o:a},style:{stroke:n?o:a}})}var Ne={};function Oe(t){var o=J({canEdit:!0,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listOutLineKey:"listOutLine",listApproverKey:"listApprover",approverNameKey:"approverNameKey",approverNameLabel:"approverNameLabel",onEdgeCreate:function(){}},t),a=o.canEdit,l=o.multibranch,i=o.nodeNameKey,c=o.listInLineKey,p=o.listOutLineKey,y=o.listApproverKey,b=o.approverNameKey,E=o.approverNameLabel,h=o.nodes,v=o.edges,k=o.updateViewConfig,P=o.onEdgeCreate,w=C(h)?h:[],S=C(v)?v:[],R=_(d([]),3),N=R[0],O=R[1],z=R[2],A=_(s([]),3),L=A[0],K=A[1],j=A[2];n(function(){O(w),K(S)},[w,S]);var B=N.map(function(e){return e.data.canEdit=a||!1,e.data.multibranch=l||!1,e.data.nodeNameKey=i,e.data.listInLineKey=c,e.data.listOutLineKey=p,e.data.listApproverKey=y,e.data.approverNameKey=b,e.data.approverNameLabel=E,e}),T=L.map(function(e){return e.data.canEdit=a||!1,e.data.multibranch=l||!1,e});return e.createElement(r,{fitView:!0,nodes:B,edges:T,onConnect:function(e){x(P)&&P(e)},onNodesChange:function(e){a&&z(e)},onEdgesChange:function(e){a&&j(e)},onNodeDragStart:function(e,t){if(a){var n=t.position;Ne=n}},onNodeDragStop:function(e,t){if(a&&x(k)){var n=t.position,r=t.data.data,o=n.x,l=n.y,i=Ne,c=i.x,p=i.y;o==c&&l==p||k({viewConfigData:JSON.stringify({position:n})},r)}},nodeTypes:ke,edgeTypes:Ce},e.createElement(u,null),e.createElement(m,{zoomable:!0,pannable:!0}),e.createElement(f,{position:"top-left"},e.createElement(Pe,null)),e.createElement(f,{position:"top-right"},a?e.createElement(we,null):null),e.createElement(g,null))}var ze=P.Paragraph;function Ae(t){var n=J({style:{},title:"审批进度",showTitle:!1,showLeftDivider:!1,canEdit:!0,list:[],listItemConvert:null,nextData:null,nextDataConvert:null},t),r=n.style,o=n.title,a=n.showTitle,l=n.showLeftDivider,i=n.list,c=n.listItemConvert,p=n.nextData,d=n.nextDataConvert,s=null==p?null:x(d)?d(p):p,u=(C(i)?i:[]).map(function(e){return x(c)?c(e):e});null!=s&&u.push(s);var m=null;if(u.length<=0)m=e.createElement(z,null);else{var f=u.length,g=u.map(function(t,n){var r=J({titlePrefix:"审批节点",icon:null,color:null,notePrefix:"审批备注",resultPrefix:"审批结果",operatorNamePrefix:"审批人",timePrefix:"审批时间",compact:!1},t),o=r.titlePrefix,a=r.title,l=r.notePrefix,i=r.note,c=r.resultPrefix,p=r.result,d=r.operatorNamePrefix,u=r.operatorName,m=r.timePrefix,g=r.time,y=r.icon,x=r.color,b=r.compact;return{color:x||(null==s&&f===n+1?"blue":"gray"),dot:y,children:e.createElement(e.Fragment,null,E(a)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:o,text:a})),b||E(p)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:c,text:p})),b||E(u)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:d,text:u})),b||E(i)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:l,text:i||"无备注"})),b||E(g)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:m,text:g})))}});m=e.createElement(A,{reverse:!0,style:{marginTop:"10px"},items:g})}var y=e.createElement(K,{style:{height:"100%"},flexAuto:"bottom",topStyle:{paddingBottom:"6px"},top:a?e.createElement(O,{message:"".concat(o,":"),type:"info"}):null,bottom:a?e.createElement("div",{style:{height:"100%",position:"relative"}},e.createElement(X,{style:{position:"absolute",left:0,top:0,paddingLeft:"6px",paddingRight:"6px",height:"100%",width:"100%",overflowY:"auto"}},m)):m});return l?e.createElement(K,{style:J(J({},r),{},{height:"100%"}),flexAuto:"right",left:e.createElement(S,{type:"vertical",style:{height:"100%"}}),right:y}):y}export{Oe as Flow,Ae as FlowProcessHistory,Re as adjustEdge,Se as adjustNode};
|
|
1
|
+
import e,{PureComponent as t,useEffect as n}from"react";import r,{getSmoothStepPath as o,BaseEdge as a,EdgeLabelRenderer as l,Handle as i,Position as c,MarkerType as p,useNodesState as d,useEdgesState as s,Controls as u,MiniMap as m,Panel as f,Background as y}from"reactflow";import{getValueByKey as g,isFunction as x,convertCollection as b,checkStringIsNullOrWhiteSpace as E,isUndefined as h,isNull as v,buildRandomHexColor as C,isArray as k}from"easy-soft-utility";import{Typography as P,Space as w,Divider as S,Button as R,Card as N,Alert as O,Empty as z,Timeline as A}from"antd";import{iconBuilder as L,FlexBox as K,VerticalBox as j,ColorText as B,CenterBox as T,HelpBox as Y,ScrollFacadeBox as X}from"antd-management-fast-component";import I from"classnames";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 _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,l,i=[],c=!0,p=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){p=!0,o=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function H(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==F(t)?t:t+""}function V(e,t,n){return(t=H(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var M="antd-management-fast-flow",U="#4e44f2",W="#a98477",$="#ffcc00",G="#bed2bb",Q="#a4baea",Z="#e895d2",ee="#c2fa32",te="#05ea7f",ne={backgroundColor:Z},re={backgroundColor:ee},oe={backgroundColor:te},ae=P.Text;function le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t,n){return t&&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,H(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ce(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}var me=P.Text,fe=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,ue()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,y=t.centerY,b=t.offset,E=t.markerEnd,h=t.style,v=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:y,offset:b}),3),C=v[0],k=v[1],P=v[2],S=J({canEdit:!1,multibranch:!1},r),R=S.data,N=S.canEdit,O=S.multibranch,z=S.onChange,A=S.onChangeBranchCondition,K=S.onRemove,j=g({data:R,key:"title"}),B=g({data:R,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:C,markerEnd:E,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(k,"px,").concat(P,"px)"),background:Q,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:B||""},e.createElement(w,null,e.createElement(me,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(921, 120, 90, .6)")}},j||"抄送"),N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(z)&&z(R)}},L.edit()):null,O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更绑定的抄送条件",onClick:function(e){e.stopPropagation(),x(A)&&A(R)}},L.nodeIndex()):null,N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(K)&&K(R)}},L.delete()):null))))}}])}();function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ye=function(){return!!e})()}var ge=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,ye()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.data,r=t.size,o=J({canEdit:!1,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listApproverKey:"listApprover",carbonCopyNameKey:"name",carbonCopyNameLabel:"carbonCopy"},n),a=o.data,l=o.isNext,p=o.canEdit,d=o.nodeNameKey,s=o.listApproverKey,u=o.carbonCopyNameKey,m=o.carbonCopyNameLabel,f=o.onAddApprover,y=o.onChange,h=o.onRemove,v=o.onRemoveApprover,C=g({data:a,key:d,defaultValue:"暂无"}),k=g({data:a,key:s,convert:b.array}),P=k.length>0;return e.createElement(e.Fragment,null,e.createElement("div",{className:I("".concat(M+"-node"),l?"".concat(M+"-node-next"):null)},e.createElement("div",{className:"".concat(M+"-node-header"),style:oe},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:C||"抄送项"})),leftStyle:{paddingRight:"5px"},right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击添加抄送人",onClick:function(e){e.stopPropagation(),x(f)&&f(a)}},L.plusCircle()),e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑节点",onClick:function(e){e.stopPropagation(),x(y)&&y(a)}},L.edit()),e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(h)&&h(a)}},L.delete())):null})),"small"!==r&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(w,{direction:"vertical",style:{width:"100%"},split:e.createElement(S,{style:{margin:"0"}})},P&&k.map(function(t,n){var r=g({data:t,key:u,defaultValue:""});return e.createElement(K,{key:"user_".concat(n),flexAuto:"left",left:e.createElement(B,{textPrefix:m,text:r||"未设置",separatorStyle:{paddingRight:"3px"},textPrefixStyle:{color:"#333"},color:E(r)?"#ccc":""}),right:p?e.createElement(w,{split:e.createElement(S,{type:"vertical",style:{marginLeft:"1px",marginRight:"1px"}})},e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"移除抄送人",onClick:function(e){e.stopPropagation(),x(v)&&v(t)}},L.delete())):null})}),P?null:e.createElement("div",null,"未设置抄送人",p?",点击 ":"",p?L.plusCircle():"",p?" 按钮添加":"","。")))))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"50%",background:U},isConnectable:!0}))}}])}();ge.defaultProps={color:"black",data:{},size:""};function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xe=function(){return!!e})()}var be=P.Text,Ee=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,xe()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,y=t.centerY,b=t.offset,E=t.markerEnd,h=t.style,v=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:y,offset:b}),3),C=v[0],k=v[1],P=v[2],S=J({canEdit:!1,multibranch:!1},r),R=S.data,N=S.canEdit,O=S.multibranch,z=S.onChange,A=S.onChangeBranchCondition,K=S.onRemove,j=g({data:R,key:"title"}),B=g({data:R,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:C,markerEnd:E,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(k,"px,").concat(P,"px)"),background:$,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:B||""},e.createElement(w,null,e.createElement(be,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(211, 220, 50, .6)")}},j||"前进"),N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(z)&&z(R)}},L.edit()):null,O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更绑定的正向连接条件",onClick:function(e){e.stopPropagation(),x(A)&&A(R)}},L.nodeIndex()):null,N?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(K)&&K(R)}},L.delete()):null))))}}])}();function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(he=function(){return!!e})()}var ve=function(){function n(){return le(this,n),e=this,r=arguments,t=pe(t=n),ce(e,he()?Reflect.construct(t,r||[],pe(e).constructor):t.apply(e,r));var e,t,r}return se(n,t),ie(n,[{key:"render",value:function(){var t=this.props,n=t.data,r=t.size,o=J({canEdit:!1,canEditApprover:!1,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listOutLineKey:"listOutLine",listApproverKey:"listApprover",approverNameKey:"approverName",approverNameLabel:"approver",footerBuilder:null},n),a=o.data,l=o.isNext,p=o.canEdit,d=o.canEditApprover,s=o.canListApprover,u=o.multibranch,m=o.nodeNameKey,f=o.listApproverKey,y=o.approverNameKey,C=o.approverNameLabel,k=o.footerBuilder,P=o.onAddApprover,N=o.onEditApprover,O=o.onListApprover,z=o.onChange,A=o.onChangeBranchCondition,T=o.onRemove,Y=o.onRemoveApprover,X=g({data:a,key:m,defaultValue:"暂无"}),D=g({data:a,key:f,convert:b.array}),_=D.length>0,F=null;return x(k)&&(F=k(a)),e.createElement(e.Fragment,null,e.createElement("div",{className:I("".concat(M+"-node"),l?"".concat(M+"-node-next"):null)},e.createElement("div",{className:"".concat(M+"-node-header")},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement("div",{style:{width:"100%"}},e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:X||"流程项"}))),rightStyle:{paddingLeft:"10px"},right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击添加审批人",onClick:function(e){e.stopPropagation(),x(P)&&P(a)}},L.plusCircle()),s?e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"审批人列表",onClick:function(e){e.stopPropagation(),x(O)&&O(a)}},L.unorderedList()):null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑节点",onClick:function(e){e.stopPropagation(),x(z)&&z(a)}},L.edit()),u?e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击编辑分支条件",onClick:function(e){e.stopPropagation(),x(A)&&A(a)}},L.branches()):null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(T)&&T(a)}},L.delete())):null})),"small"!==r&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(w,{direction:"vertical",style:{width:"100%"},split:e.createElement(S,{style:{margin:"0"}})},_&&D.map(function(t,n){var r=g({data:t,key:y,defaultValue:""});return e.createElement(K,{key:"user_".concat(n),flexAuto:"left",left:e.createElement(B,{textPrefix:C,text:r||"未设置",separatorStyle:{paddingRight:"3px"},textPrefixStyle:{color:"#333"},color:E(r)?"#ccc":""}),right:p?e.createElement(w,null,d?e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"编辑审批人或职级",onClick:function(e){e.stopPropagation(),x(N)&&N(t)}},L.edit()):null,e.createElement(R,{size:"small",style:{padding:"0.5px 5px",fontSize:"12px"},title:"移除审批人或职级",onClick:function(e){e.stopPropagation(),x(Y)&&Y(t)}},L.delete())):null})}),_?null:e.createElement("div",null,"未设置人或职级",p?",点击 ":"",p?L.plusCircle():"",p?" 添加":"","。"))),h(F)||v(F)?null:e.createElement(S,{style:{margin:"6px 0"}}),h(F)||v(F)?null:e.createElement("div",{className:"".concat(M+"-node-content-footer")},F),e.createElement("div",null)))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"45%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",id:"top",position:c.Top,style:{left:"55%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"33%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Left,id:"left",style:{top:"66%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"66%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Right,id:"right",style:{top:"33%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"55%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Bottom,id:"bottom",style:{left:"45%",background:W},isConnectable:!0}))}}])}();ve.defaultProps={color:"black",data:{},size:""};var Ce={intermediate:ve,carbonCopy:ge,start:function(t){var n=t.size,r=t.onClick;return e.createElement(e.Fragment,null,e.createElement("div",{className:"".concat(M+"-node"),onClick:r},e.createElement("div",{className:"".concat(M+"-node-header"),style:ne},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",text:"起始点"}))})),"small"!==n&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(B,{text:"此为流程发起唯一节点,无审批人。"}))))),e.createElement(i,{type:"target",id:"top",position:c.Top,style:{left:"45%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",id:"top",position:c.Top,style:{left:"55%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"33%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Left,id:"left",style:{top:"66%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"66%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Right,id:"right",style:{top:"33%",background:W},isConnectable:!0}),e.createElement(i,{type:"target",id:"bottom",position:c.Bottom,style:{left:"55%",background:U},isConnectable:!0}),e.createElement(i,{type:"source",position:c.Bottom,id:"bottom",style:{left:"45%",background:W},isConnectable:!0}))},end:function(t){var n=t.size,r=t.data,o=t.onClick,a=J({canRemove:!1},r),l=a.data,p=a.canRemove,d=a.onRemove,s=g({data:l,key:"name"}),u=g({data:l,key:"description"});return e.createElement(e.Fragment,null,e.createElement("div",{className:"".concat(M+"-node"),onClick:o,title:u||""},e.createElement("div",{className:"".concat(M+"-node-header"),style:re},e.createElement(K,{flexAuto:"left",miniAuto:!0,left:e.createElement(j,null,e.createElement(B,{block:!0,title:!0,style:{height:"22px"},textStyle:{width:"100%",height:"22px",lineHeight:"22px",textOverflow:"ellipsis"},color:"#333",separator:" ",textPrefixStyle:{marginRight:"6px"},text:s||"终止点"})),right:p?e.createElement(w,null,e.createElement("button",{style:{padding:"1px 4px",fontSize:"12px",backgroundColor:"transparent",borderRadius:"5px",borderColor:"#fff"},title:"点击移除节点",onClick:function(e){e.stopPropagation(),x(d)&&d(l)}},L.delete())):null})),"small"!==n&&e.createElement("div",{className:"".concat(M+"-node-content")},e.createElement("div",{className:"".concat(M+"-node-content-inner")},e.createElement("div",{className:"".concat(M+"-node-content-info")},e.createElement(B,{text:"此节点为终止节点,代表流程结束。"}))))),e.createElement(i,{type:"target",position:c.Top,id:"top",style:{background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Left,id:"left",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Right,id:"right",style:{top:"50%",background:U},isConnectable:!0}),e.createElement(i,{type:"target",position:c.Bottom,id:"bottom",style:{top:"100%",background:U},isConnectable:!0}))}},ke={forward:Ee,backward:function(t){var n=t.id,r=t.data,i=t.sourceX,c=t.sourceY,p=t.targetX,d=t.targetY,s=t.sourcePosition,u=t.targetPosition,m=t.borderRadius,f=t.centerX,y=t.centerY,b=t.offset,E=t.style,h=void 0===E?{}:E,v=t.markerEnd,C=_(o({sourceX:i,sourceY:c,sourcePosition:s,targetX:p,targetY:d,targetPosition:u,borderRadius:m,centerX:f,centerY:y,offset:b}),3),k=C[0],P=C[1],S=C[2],R=J({canEdit:!1,multibranch:!1},r),N=R.data,O=R.canEdit,z=R.multibranch,A=R.onChange,K=R.onChangeBranchCondition,j=R.onRemove,B=g({data:N,key:"title"}),T=g({data:N,key:"description"});return e.createElement(e.Fragment,null,e.createElement(a,{id:n,path:k,markerEnd:v,style:h}),e.createElement(l,null,e.createElement("div",{style:{position:"absolute",transform:"translate(-50%, -50%) translate(".concat(P,"px,").concat(S,"px)"),background:G,padding:6,borderRadius:5,fontSize:12,pointerEvents:"all"},title:T||""},e.createElement(w,null,e.createElement(ae,{style:{fontSize:"12px",padding:"0.5px 2px",border:"1.2mm ridge ".concat("rgba(52, 231, 228, .6)"),color:"#666"}},B||"回退"),O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更连线",onClick:function(e){e.stopPropagation(),x(A)&&A(N)}},L.edit()):null,z?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击变更绑定逆向连接条件",onClick:function(e){e.stopPropagation(),x(K)&&K(N)}},L.pullRequest()):null,O?e.createElement("button",{style:{padding:"0.5px 4px",fontSize:"12px"},title:"点击移除连线",onClick:function(e){e.stopPropagation(),x(j)&&j(N)}},L.delete()):null))))},carbonCopy:fe};function Pe(){return e.createElement(N,{title:"图示说明:",size:"small"},e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:Z,borderRadius:"3px"}})),right:"流程起始节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:"#f66902",borderRadius:"3px"}})),right:"流程中间节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:te,borderRadius:"3px"}})),right:"流程抄送节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:ee,borderRadius:"3px"}})),right:"流程终止节点"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",border:"2px solid",borderImage:"linear-gradient(45deg, gold, deeppink) 1",clipPath:"inset(0px round 5px)",filter:"hue-rotate(360deg)"}})),right:"等待流转节点"})),e.createElement(S,{type:"horizontal",style:{marginTop:"6px",marginBottom:"6px"}}),e.createElement("div",null,e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"6px",width:"6px",backgroundColor:U,borderRadius:"50%"}})),right:"节点流程入口"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"6px",width:"6px",backgroundColor:W,borderRadius:"50%"}})),right:"节点流程出口"})),e.createElement(S,{type:"horizontal",style:{marginTop:"6px",marginBottom:"6px"}}),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:$,borderRadius:"3px"}})),right:"前进指向标签"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:Q,borderRadius:"3px"}})),right:"抄送指向标签"})),e.createElement("div",{style:{width:"120px"}},e.createElement(K,{flex:"left",leftStyle:{paddingRight:"10px"},left:e.createElement(T,null,e.createElement("div",{style:{height:"10px",width:"16px",backgroundColor:G,borderRadius:"3px"}})),right:"回退指向标签"})))}function we(){return e.createElement(N,{title:"操作说明:",size:"small"},e.createElement("div",{style:{width:"180px"}},e.createElement(Y,{showTitle:!1,showNumber:!0,labelWidth:18,list:[{text:"起始节点仅能存在一个。"},{text:"点击节点中的 ”编辑“ 可设置节点信息。"},{text:"点击节点中的 ”更改“ 可设置节点审核人信息。"},{text:"点击节点中的 ”条件“ 可设置节点的分支进入条件, 仅在存在多条驶出线条时可用。"},{text:"点击线条中的 ”变更“ 可设置连线信息。"},{text:"点击 刷新图标 可重新加载信息。"},{text:"点击节点或线条的 删除图标 可删除节点或连线。"}],useBackground:!1})))}function Se(e){return J({position:{x:0,y:0},canEdit:!1},e)}function Re(e){var t=g({data:e,key:"index",convert:b.number}),n=g({data:e,key:"forward",convert:b.boolean}),r=g({data:e,key:"carbonCopy",convert:b.boolean}),o=t>0?C({seed:30*t+t+2}):"#b1b1b7",a=t>0?C({seed:30*t+t+2}):"#ea7f5b";return J(J({animated:!0,canEdit:!1,sourceHandle:n?"bottom":"right",targetHandle:n?"top":"right"},e),{},{type:n?r?"carbonCopy":"forward":"backward",markerEnd:{type:p.ArrowClosed,color:n?o:a},style:{stroke:n?o:a}})}var Ne={};function Oe(t){var o=J({canEdit:!0,multibranch:!1,nodeNameKey:"nodeNameKey",listInLineKey:"listInLine",listOutLineKey:"listOutLine",listApproverKey:"listApprover",approverNameKey:"approverNameKey",approverNameLabel:"approverNameLabel",carbonCopyNameKey:"carbonCopyNameKey",carbonCopyNameLabel:"carbonCopyNameLabel",onEdgeCreate:function(){}},t),a=o.canEdit,l=o.multibranch,i=o.nodeNameKey,c=o.listInLineKey,p=o.listOutLineKey,g=o.listApproverKey,b=o.approverNameKey,E=o.approverNameLabel,h=o.carbonCopyNameKey,v=o.carbonCopyNameLabel,C=o.nodes,P=o.edges,w=o.updateViewConfig,S=o.onEdgeCreate,R=k(C)?C:[],N=k(P)?P:[],O=_(d([]),3),z=O[0],A=O[1],L=O[2],K=_(s([]),3),j=K[0],B=K[1],T=K[2];n(function(){A(R),B(N)},[R,N]);var Y=z.map(function(e){return e.data.canEdit=a||!1,e.data.multibranch=l||!1,e.data.nodeNameKey=i,e.data.listInLineKey=c,e.data.listOutLineKey=p,e.data.listApproverKey=g,e.data.approverNameKey=b,e.data.approverNameLabel=E,e.data.carbonCopyNameKey=h,e.data.carbonCopyNameLabel=v,e}),X=j.map(function(e){return e.data.canEdit=a||!1,e.data.multibranch=l||!1,e});return e.createElement(r,{fitView:!0,nodes:Y,edges:X,onConnect:function(e){x(S)&&S(e)},onNodesChange:function(e){a&&L(e)},onEdgesChange:function(e){a&&T(e)},onNodeDragStart:function(e,t){if(a){var n=t.position;Ne=n}},onNodeDragStop:function(e,t){if(a&&x(w)){var n=t.position,r=t.data.data,o=n.x,l=n.y,i=Ne,c=i.x,p=i.y;o==c&&l==p||w({viewConfigData:JSON.stringify({position:n})},r)}},nodeTypes:Ce,edgeTypes:ke},e.createElement(u,null),e.createElement(m,{zoomable:!0,pannable:!0}),e.createElement(f,{position:"top-left"},e.createElement(Pe,null)),e.createElement(f,{position:"top-right"},a?e.createElement(we,null):null),e.createElement(y,null))}var ze=P.Paragraph;function Ae(t){var n=J({style:{},title:"审批进度",showTitle:!1,showLeftDivider:!1,canEdit:!0,list:[],listItemConvert:null,nextData:null,nextDataConvert:null},t),r=n.style,o=n.title,a=n.showTitle,l=n.showLeftDivider,i=n.list,c=n.listItemConvert,p=n.nextData,d=n.nextDataConvert,s=null==p?null:x(d)?d(p):p,u=(k(i)?i:[]).map(function(e){return x(c)?c(e):e});null!=s&&u.push(s);var m=null;if(u.length<=0)m=e.createElement(z,null);else{var f=u.length,y=u.map(function(t,n){var r=J({titlePrefix:"审批节点",icon:null,color:null,notePrefix:"审批备注",resultPrefix:"审批结果",operatorNamePrefix:"审批人",timePrefix:"审批时间",compact:!1},t),o=r.titlePrefix,a=r.title,l=r.notePrefix,i=r.note,c=r.resultPrefix,p=r.result,d=r.operatorNamePrefix,u=r.operatorName,m=r.timePrefix,y=r.time,g=r.icon,x=r.color,b=r.compact;return{color:x||(null==s&&f===n+1?"blue":"gray"),dot:g,children:e.createElement(e.Fragment,null,E(a)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:o,text:a})),b||E(p)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:c,text:p})),b||E(u)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:d,text:u})),b||E(i)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:l,text:i||"无备注"})),b||E(y)?null:e.createElement(ze,null,e.createElement(B,{separatorStyle:{padding:"0 4px 0 2px"},textPrefix:m,text:y})))}});m=e.createElement(A,{reverse:!0,style:{marginTop:"10px"},items:y})}var g=e.createElement(K,{style:{height:"100%"},flexAuto:"bottom",topStyle:{paddingBottom:"6px"},top:a?e.createElement(O,{message:"".concat(o,":"),type:"info"}):null,bottom:a?e.createElement("div",{style:{height:"100%",position:"relative"}},e.createElement(X,{style:{position:"absolute",left:0,top:0,paddingLeft:"6px",paddingRight:"6px",height:"100%",width:"100%",overflowY:"auto"}},m)):m});return l?e.createElement(K,{style:J(J({},r),{},{height:"100%"}),flexAuto:"right",left:e.createElement(S,{type:"vertical",style:{height:"100%"}}),right:g}):g}export{Oe as Flow,Ae as FlowProcessHistory,Re as adjustEdge,Se as adjustNode};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-flow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.152",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"antd-management-fast-flow"
|
|
6
6
|
],
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"z:tsc:build": "echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"antd": "^
|
|
60
|
+
"antd": "^6.0.0",
|
|
61
61
|
"antd-management-fast-common": "workspace:*",
|
|
62
62
|
"antd-management-fast-component": "workspace:*",
|
|
63
63
|
"classnames": "^2.5.1",
|
|
64
|
-
"easy-soft-utility": "^2.8.
|
|
64
|
+
"easy-soft-utility": "^2.8.103",
|
|
65
65
|
"react": "^18.3.1",
|
|
66
66
|
"react-dom": "^18.3.1",
|
|
67
67
|
"reactflow": "^11.11.4"
|
|
@@ -76,23 +76,23 @@
|
|
|
76
76
|
"@babel/preset-env": "^7.28.5",
|
|
77
77
|
"@babel/preset-react": "^7.28.5",
|
|
78
78
|
"@babel/runtime": "^7.28.4",
|
|
79
|
-
"@changesets/cli": "^2.29.
|
|
79
|
+
"@changesets/cli": "^2.29.8",
|
|
80
80
|
"@commitlint/cli": "^20.1.0",
|
|
81
81
|
"@commitlint/config-conventional": "^20.0.0",
|
|
82
82
|
"@commitlint/config-pnpm-scopes": "^20.1.0",
|
|
83
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.
|
|
83
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
|
|
84
84
|
"@types/jest": "^30.0.0",
|
|
85
|
-
"@types/node": "^24.10.
|
|
85
|
+
"@types/node": "^24.10.1",
|
|
86
86
|
"@types/react": "^18.3.1",
|
|
87
87
|
"@types/react-dom": "^18.3.1",
|
|
88
|
-
"@typescript-eslint/parser": "^8.
|
|
88
|
+
"@typescript-eslint/parser": "^8.48.0",
|
|
89
89
|
"babel-jest": "^30.2.0",
|
|
90
90
|
"commitizen": "^4.3.1",
|
|
91
91
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
92
92
|
"cross-env": "^10.1.0",
|
|
93
93
|
"cz-git": "^1.12.0",
|
|
94
94
|
"docdash": "^2.0.2",
|
|
95
|
-
"easy-soft-develop": "^2.1.
|
|
95
|
+
"easy-soft-develop": "^2.1.314",
|
|
96
96
|
"eslint": "^8.57.0",
|
|
97
97
|
"eslint-config-airbnb": "^19.0.4",
|
|
98
98
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
102
102
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
103
103
|
"eslint-plugin-import": "^2.32.0",
|
|
104
|
-
"eslint-plugin-jest": "^29.
|
|
104
|
+
"eslint-plugin-jest": "^29.2.1",
|
|
105
105
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
106
106
|
"eslint-plugin-prettier": "^5.5.4",
|
|
107
107
|
"eslint-plugin-promise": "^7.2.1",
|
|
@@ -112,14 +112,14 @@
|
|
|
112
112
|
"husky": "^9.1.7",
|
|
113
113
|
"jest": "^30.2.0",
|
|
114
114
|
"jsdoc": "^4.0.5",
|
|
115
|
-
"lint-staged": "^16.2.
|
|
115
|
+
"lint-staged": "^16.2.7",
|
|
116
116
|
"npm-check-updates": "^19.1.2",
|
|
117
|
-
"prettier": "^3.
|
|
117
|
+
"prettier": "^3.7.3",
|
|
118
118
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
119
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
119
|
+
"prettier-plugin-packagejson": "^2.5.20",
|
|
120
120
|
"react-refresh": "0.18.0",
|
|
121
|
-
"rimraf": "^6.1.
|
|
122
|
-
"stylelint": "^16.
|
|
121
|
+
"rimraf": "^6.1.2",
|
|
122
|
+
"stylelint": "^16.26.1",
|
|
123
123
|
"stylelint-config-css-modules": "^4.5.1",
|
|
124
124
|
"stylelint-config-prettier": "^9.0.5",
|
|
125
125
|
"stylelint-config-standard": "^39.0.1",
|