@witlink/workflow 1.0.24 → 1.0.25
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/dist/index.js +2 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34838,6 +34838,7 @@ function c6(t, e) {
|
|
|
34838
34838
|
i._attributes.properties = {
|
|
34839
34839
|
"camunda:jobPriority": i._attributes["camunda:jobPriority"],
|
|
34840
34840
|
"camunda:versionTag": i._attributes["camunda:versionTag"],
|
|
34841
|
+
"camunda:processType": i._attributes["camunda:processType"],
|
|
34841
34842
|
id: i._attributes.id,
|
|
34842
34843
|
name: i._attributes.name
|
|
34843
34844
|
}, i._attributes["camunda:versionTag"] === void 0 && delete i._attributes.properties["camunda:versionTag"];
|
|
@@ -34883,7 +34884,7 @@ function d6(t, e) {
|
|
|
34883
34884
|
return console.warn("数据中没有找到bpmn:definitions节点"), n;
|
|
34884
34885
|
const i = r["bpmn:process"];
|
|
34885
34886
|
if (i)
|
|
34886
|
-
e["camunda:jobPriority"] && (i._attributes["camunda:jobPriority"] = e["camunda:jobPriority"]), e.id && (i._attributes.id = e.id), e.name && (i._attributes.name = e.name), e["camunda:versionTag"] && (i._attributes["camunda:versionTag"] = e["camunda:versionTag"]);
|
|
34887
|
+
e["camunda:jobPriority"] && (i._attributes["camunda:jobPriority"] = e["camunda:jobPriority"]), e.id && (i._attributes.id = e.id), e.name && (i._attributes.name = e.name), e["camunda:versionTag"] && (i._attributes["camunda:versionTag"] = e["camunda:versionTag"]), e["camunda:processType"] && (i._attributes["camunda:processType"] = e["camunda:processType"]);
|
|
34887
34888
|
else
|
|
34888
34889
|
return console.warn("数据中没有找到bpmn:process节点"), n;
|
|
34889
34890
|
const o = i["bpmn:endEvent"];
|
package/dist/index.umd.cjs
CHANGED
|
@@ -166,7 +166,7 @@ ${u}`}if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return this
|
|
|
166
166
|
`;continue}const u=l._attributes||{},c=l._text,d=l._cdata,f={...l};delete f._attributes,delete f._text,delete f._cdata;const h=this._buildAttributes(u),v=Object.keys(f).length>0;if(o+=`${n}<${s}${h}`,!v&&!c&&!d)o+=`/>
|
|
167
167
|
`;else{if(o+=">",c?o+=this._escapeXml(String(c)):d&&(o+=`<![CDATA[${d}]]>`),v){o+=`
|
|
168
168
|
`;const g=Object.keys(f);for(const m of g){const y=f[m];Array.isArray(y)?y.forEach(x=>{o+=this._convertToXml({[m]:x},i,r+1)}):o+=this._convertToXml({[m]:y},i,r+1)}o+=`${n}`}o+=`</${s}>
|
|
169
|
-
`}}return o}return""}_buildAttributes(e){if(!e||typeof e!="object"||Object.keys(e).length===0)return"";const n=Object.entries(e).map(([r,i])=>typeof i=="object"&&i!==null?`${r}="${this._escapeXml(JSON.stringify(i))}"`:`${r}="${this._escapeXml(String(i))}"`).join(" ");return n?" "+n:""}_escapeXml(e){return e==null?"":String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_repairBpmnXml(e){let n=e;const r=/<\s*-\s*([\w:]+)\s*\/>/g;let i;for(;(i=r.exec(n))!==null;){const o=i[1],a=n.substring(0,i.index),s=n.substring(i.index+i[0].length),l=a.lastIndexOf("<"),u=a.lastIndexOf(">");if(l>u){const c=i.index;n=a.substring(0,c)+` ${o}=""`+s,r.lastIndex=c+o.length+4}}return n=n.replace(/<-\s*/g,""),n=n.replace(/(\s[\w:]+)=([^"'\s][^\s>]*)(?=\s|>)/g,'$1="$2"'),n}}function j$(t){return t.replace(/"/g,""")}const hs=new B$({compact:!0,spaces:2,ignoreComment:!0,ignoreDeclaration:!0,ignoreDoctype:!0,ignoreInstruction:!0,ignoreCdata:!0,trim:!0});function Vx(t,e){const n=JSON.parse(hs.xmlToJson(t)),r=$$(n,e);return hs.jsonToXml(r)}function F$(t,e){const n=JSON.parse(hs.xmlToJson(t)),r=H$(n,e);let i=hs.jsonToXml(r);return i.includes("<?xml")||(i=hs.xmlDeclaration+i),i=j$(i),console.log(i),i}function $$(t,e){if(!t||typeof t!="object")throw new Error("data参数必须是一个对象");if(typeof e!="function")throw new Error("t参数必须是一个函数");const n=Pe(t),r=n["bpmn:definitions"];if(!r)return console.warn("数据中没有找到bpmn:definitions节点"),n;const i=r["bpmn:process"];if(i)i._attributes.properties={"camunda:jobPriority":i._attributes["camunda:jobPriority"],"camunda:versionTag":i._attributes["camunda:versionTag"],id:i._attributes.id,name:i._attributes.name},i._attributes["camunda:versionTag"]===void 0&&delete i._attributes.properties["camunda:versionTag"];else return console.warn("数据中没有找到bpmn:process节点"),n;const o=i["bpmn:endEvent"];o&&(o._attributes["camunda:transName"]="bpmn.endName",o._attributes.name=e("bpmn.endName"));const a=i["bpmn:startEvent"];a&&(a._attributes["camunda:transName"]="bpmn.startName",a._attributes.name=e("bpmn.startName"));const s=i["bpmn:userTask"];if(s){const l=Array.isArray(s)?s:[s];l.forEach(u=>{if(u&&typeof u=="object"){if(u._attributes["camunda:transName"])u._attributes.name=e(u._attributes["camunda:transName"]);else{const d=Pe(u)._attributes.name;u._attributes["camunda:transName"]=d,u._attributes.name=e(d)}if(u._attributes["camunda:bindComponent"])try{const c=JSON.parse(u._attributes["camunda:bindComponent"]);u._attributes["camunda:bindComponent"]=W$(c)}catch{}}}),!Array.isArray(s)&&l.length===1&&(i["bpmn:userTask"]=l[0])}return n}function H$(t,e){if(!t||typeof t!="object")throw new Error("data参数必须是一个对象");const n=Pe(t),r=n["bpmn:definitions"];if(r)r._attributes["xmlns:camunda"]="http://camunda.org/schema/1.0/bpmn";else return console.warn("数据中没有找到bpmn:definitions节点"),n;const i=r["bpmn:process"];if(i)e["camunda:jobPriority"]&&(i._attributes["camunda:jobPriority"]=e["camunda:jobPriority"]),e.id&&(i._attributes.id=e.id),e.name&&(i._attributes.name=e.name),e["camunda:versionTag"]&&(i._attributes["camunda:versionTag"]=e["camunda:versionTag"]);else return console.warn("数据中没有找到bpmn:process节点"),n;const o=i["bpmn:endEvent"];o&&o._attributes["camunda:transName"]&&(o._attributes.name=o._attributes["camunda:transName"],delete o._attributes["camunda:transName"],delete o._attributes.width,delete o._attributes.height);const a=i["bpmn:startEvent"];a&&a._attributes["camunda:transName"]&&(a._attributes.name=a._attributes["camunda:transName"],delete a._attributes["camunda:transName"],delete a._attributes.width,delete a._attributes.height);const s=i["bpmn:userTask"];if(s){const u=Array.isArray(s)?s:[s];u.forEach(c=>{if(c&&typeof c=="object"&&(c._attributes["camunda:transName"]&&(c._attributes.name=c._attributes["camunda:transName"]),c._attributes=z$(c._attributes),delete c._attributes.actived,delete c._attributes.width,delete c._attributes.height,delete c._attributes["camunda:transName"],delete c._attributes.transName,c._attributes["camunda:bindComponent"])){const d=U$(c._attributes["camunda:bindComponent"]);c._attributes["camunda:bindComponent"]=JSON.stringify(d)}}),!Array.isArray(s)&&u.length===1&&(i["bpmn:userTask"]=u[0])}const l=i["bpmn:exclusiveGateway"];if(l){const u=Array.isArray(l)?l:[l];u.forEach(c=>{c&&typeof c=="object"&&(delete c._attributes.width,delete c._attributes.height)}),!Array.isArray(l)&&u.length===1&&(i["bpmn:exclusiveGateway"]=u[0])}return n}function z$(t){return Object.keys(t).reduce((e,n)=>(t[n]!==""&&(e[n]=t[n]),e),{})}function W$(t){return Object.entries(t).filter(([r,i])=>i!==void 0).map(([r,i])=>`${r}-${i}`).join(",")}function U$(t){if(typeof t!="string"||t.trim()==="")return{};const e=t.split(","),n={};return e.forEach(r=>{const[i,...o]=r.split("-");if(i&&o.length>0){const a=o.join("-");n[i]=a}}),n}const V$={class:"wrapper"},X$=Qr(p.defineComponent({__name:"index",props:{data:{type:Object,required:!0}},setup(t,{expose:e}){const{t:n}=Dn.useI18n(),r=t;p.provide("type",r.data.type),p.provide("isApproval",r.data.isApproval);const i=p.ref(null),o=p.ref(null),a={baseNode:{fill:"#fff",stroke:"#1f2937",strokeWidth:1.5},baseEdge:{stroke:"#1f2937",strokeWidth:1,lineWidth:1},rect:{radius:5,stroke:"#1f2937"},circle:{r:18,stroke:"#1f2937"},diamond:{},ellipse:{},polygon:{stroke:"#1f2937"},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#1f2937",overflowMode:"ellipsis",fontSize:11,lineHeight:1.2,padding:5},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"white",height:14,stroke:"transparent",radius:3}},line:{},polyline:{stroke:"#1f2937",hoverStroke:"#1f2937",selectedStroke:"#1f2937"},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{fill:"#1f2937",offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:1},outline:{fill:"transparent",stroke:"#0095ff",strokeDasharray:"3,3",hover:{stroke:"#0095ff"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"},background:!1,grid:{size:10,visible:!1,type:"dot",config:{color:"#ababab",thickness:1}}};function s(){o.value=new v8({container:i.value,stopZoomGraph:!1,allowResize:!0,adjustEdgeStartAndEnd:!0,nodeTextEdit:!1,edgeTextEdit:!1,grid:!1,metaKeyMultipleSelected:!0,keyboard:{enabled:!0},snapline:!0,stopScrollGraph:!1,plugins:[k8,K8,i5,a5,o5,Rx,hF]}),o.value.setTheme(a);const h={type:"bpmn:userTask",view:Xb,model:class extends Vb{initNodeData(v){super.initNodeData(v),this.width=120,this.height=100}}};o.value.register(h),D$(o.value,n),o.value.setPatternItems([{type:"bpmn:startEvent",label:n("bpmn.startName"),text:n("bpmn.startName"),properties:{"camunda:transName":"bpmn.startName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIvPjwvc3ZnPg=="},{type:"bpmn:userTask",label:n("bpmn.userTaskName"),text:n("bpmn.userTaskName"),properties:{"camunda:transName":"bpmn.userTaskName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yNCAyMEMyNy44NjYgMjAgMzEgMTYuODY2IDMxIDEzQzMxIDkuMTM0MDEgMjcuODY2IDYgMjQgNkMyMC4xMzQgNiAxNyA5LjEzNDAxIDE3IDEzQzE3IDE2Ljg2NiAyMC4xMzQgMjAgMjQgMjBaIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTYgNDAuOFY0Mkg0MlY0MC44QzQyIDM2LjMxOTYgNDIgMzQuMDc5NCA0MS4xMjgxIDMyLjM2ODFDNDAuMzYxMSAzMC44NjI4IDM5LjEzNzIgMjkuNjM4OSAzNy42MzE5IDI4Ljg3MTlDMzUuOTIwNiAyOCAzMy42ODA0IDI4IDI5LjIgMjhIMTguOEMxNC4zMTk2IDI4IDEyLjA3OTQgMjggMTAuMzY4MSAyOC44NzE5QzguODYyNzggMjkuNjM4OSA3LjYzODkzIDMwLjg2MjggNi44NzE5NSAzMi4zNjgxQzYgMzQuMDc5NCA2IDM2LjMxOTYgNiA0MC44WiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg=="},{type:"bpmn:exclusiveGateway",label:n("bpmn.exclusiveGatewayName"),properties:{"camunda:transName":"bpmn.exclusiveGatewayName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yMi43OTkyIDQuMjAxMDJMNC40MTQ0IDIyLjU4NThDMy42MzMzNiAyMy4zNjY4IDMuNjMzMzUgMjQuNjMzMiA0LjQxNDQgMjUuNDE0MkwyMi43OTkyIDQzLjc5OUMyMy41ODAyIDQ0LjU4IDI0Ljg0NjYgNDQuNTggMjUuNjI3NiA0My43OTlMNDQuMDEyNCAyNS40MTQyQzQ0Ljc5MzQgMjQuNjMzMiA0NC43OTM0IDIzLjM2NjggNDQuMDEyNCAyMi41ODU4TDI1LjYyNzYgNC4yMDEwMkMyNC44NDY2IDMuNDE5OTcgMjMuNTgwMiAzLjQxOTk3IDIyLjc5OTIgNC4yMDEwMloiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE4LjA0MyAyOS45ODcxTDMwLjA0MjcgMTguMDI0OSIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjxwYXRoIGQ9Ik0xOC4wNTI3IDE4LjAxNTZMMzAuMDMzNyAyOS45OTY1IiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9zdmc+"},{type:"bpmn:endEvent",label:n("bpmn.endName"),text:n("bpmn.endName"),properties:{"camunda:transName":"bpmn.endName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PGNpcmNsZSBjeD0iMjQiIGN5PSIyNCIgcj0iMTIiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4="}]),o.value.setMenuConfig({nodeMenu:[{text:n("bpmn.delete"),"camunda:transName":"bpmn.delete",disabled:!1,callback(v){var g;(g=o.value)==null||g.deleteNode(v.id)}},{text:n("bpmn.copy"),"camunda:transName":"bpmn.copy",callback(v){var g;(g=o.value)==null||g.cloneNode(v.id)}}],edgeMenu:[{text:n("bpmn.delete"),"camunda:transName":"bpmn.delete",disabled:!1,callback(v){var g;(g=o.value)==null||g.deleteEdge(v.id)}}]}),o.value.render({})}function l(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
169
|
+
`}}return o}return""}_buildAttributes(e){if(!e||typeof e!="object"||Object.keys(e).length===0)return"";const n=Object.entries(e).map(([r,i])=>typeof i=="object"&&i!==null?`${r}="${this._escapeXml(JSON.stringify(i))}"`:`${r}="${this._escapeXml(String(i))}"`).join(" ");return n?" "+n:""}_escapeXml(e){return e==null?"":String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_repairBpmnXml(e){let n=e;const r=/<\s*-\s*([\w:]+)\s*\/>/g;let i;for(;(i=r.exec(n))!==null;){const o=i[1],a=n.substring(0,i.index),s=n.substring(i.index+i[0].length),l=a.lastIndexOf("<"),u=a.lastIndexOf(">");if(l>u){const c=i.index;n=a.substring(0,c)+` ${o}=""`+s,r.lastIndex=c+o.length+4}}return n=n.replace(/<-\s*/g,""),n=n.replace(/(\s[\w:]+)=([^"'\s][^\s>]*)(?=\s|>)/g,'$1="$2"'),n}}function j$(t){return t.replace(/"/g,""")}const hs=new B$({compact:!0,spaces:2,ignoreComment:!0,ignoreDeclaration:!0,ignoreDoctype:!0,ignoreInstruction:!0,ignoreCdata:!0,trim:!0});function Vx(t,e){const n=JSON.parse(hs.xmlToJson(t)),r=$$(n,e);return hs.jsonToXml(r)}function F$(t,e){const n=JSON.parse(hs.xmlToJson(t)),r=H$(n,e);let i=hs.jsonToXml(r);return i.includes("<?xml")||(i=hs.xmlDeclaration+i),i=j$(i),console.log(i),i}function $$(t,e){if(!t||typeof t!="object")throw new Error("data参数必须是一个对象");if(typeof e!="function")throw new Error("t参数必须是一个函数");const n=Pe(t),r=n["bpmn:definitions"];if(!r)return console.warn("数据中没有找到bpmn:definitions节点"),n;const i=r["bpmn:process"];if(i)i._attributes.properties={"camunda:jobPriority":i._attributes["camunda:jobPriority"],"camunda:versionTag":i._attributes["camunda:versionTag"],"camunda:processType":i._attributes["camunda:processType"],id:i._attributes.id,name:i._attributes.name},i._attributes["camunda:versionTag"]===void 0&&delete i._attributes.properties["camunda:versionTag"];else return console.warn("数据中没有找到bpmn:process节点"),n;const o=i["bpmn:endEvent"];o&&(o._attributes["camunda:transName"]="bpmn.endName",o._attributes.name=e("bpmn.endName"));const a=i["bpmn:startEvent"];a&&(a._attributes["camunda:transName"]="bpmn.startName",a._attributes.name=e("bpmn.startName"));const s=i["bpmn:userTask"];if(s){const l=Array.isArray(s)?s:[s];l.forEach(u=>{if(u&&typeof u=="object"){if(u._attributes["camunda:transName"])u._attributes.name=e(u._attributes["camunda:transName"]);else{const d=Pe(u)._attributes.name;u._attributes["camunda:transName"]=d,u._attributes.name=e(d)}if(u._attributes["camunda:bindComponent"])try{const c=JSON.parse(u._attributes["camunda:bindComponent"]);u._attributes["camunda:bindComponent"]=W$(c)}catch{}}}),!Array.isArray(s)&&l.length===1&&(i["bpmn:userTask"]=l[0])}return n}function H$(t,e){if(!t||typeof t!="object")throw new Error("data参数必须是一个对象");const n=Pe(t),r=n["bpmn:definitions"];if(r)r._attributes["xmlns:camunda"]="http://camunda.org/schema/1.0/bpmn";else return console.warn("数据中没有找到bpmn:definitions节点"),n;const i=r["bpmn:process"];if(i)e["camunda:jobPriority"]&&(i._attributes["camunda:jobPriority"]=e["camunda:jobPriority"]),e.id&&(i._attributes.id=e.id),e.name&&(i._attributes.name=e.name),e["camunda:versionTag"]&&(i._attributes["camunda:versionTag"]=e["camunda:versionTag"]),e["camunda:processType"]&&(i._attributes["camunda:processType"]=e["camunda:processType"]);else return console.warn("数据中没有找到bpmn:process节点"),n;const o=i["bpmn:endEvent"];o&&o._attributes["camunda:transName"]&&(o._attributes.name=o._attributes["camunda:transName"],delete o._attributes["camunda:transName"],delete o._attributes.width,delete o._attributes.height);const a=i["bpmn:startEvent"];a&&a._attributes["camunda:transName"]&&(a._attributes.name=a._attributes["camunda:transName"],delete a._attributes["camunda:transName"],delete a._attributes.width,delete a._attributes.height);const s=i["bpmn:userTask"];if(s){const u=Array.isArray(s)?s:[s];u.forEach(c=>{if(c&&typeof c=="object"&&(c._attributes["camunda:transName"]&&(c._attributes.name=c._attributes["camunda:transName"]),c._attributes=z$(c._attributes),delete c._attributes.actived,delete c._attributes.width,delete c._attributes.height,delete c._attributes["camunda:transName"],delete c._attributes.transName,c._attributes["camunda:bindComponent"])){const d=U$(c._attributes["camunda:bindComponent"]);c._attributes["camunda:bindComponent"]=JSON.stringify(d)}}),!Array.isArray(s)&&u.length===1&&(i["bpmn:userTask"]=u[0])}const l=i["bpmn:exclusiveGateway"];if(l){const u=Array.isArray(l)?l:[l];u.forEach(c=>{c&&typeof c=="object"&&(delete c._attributes.width,delete c._attributes.height)}),!Array.isArray(l)&&u.length===1&&(i["bpmn:exclusiveGateway"]=u[0])}return n}function z$(t){return Object.keys(t).reduce((e,n)=>(t[n]!==""&&(e[n]=t[n]),e),{})}function W$(t){return Object.entries(t).filter(([r,i])=>i!==void 0).map(([r,i])=>`${r}-${i}`).join(",")}function U$(t){if(typeof t!="string"||t.trim()==="")return{};const e=t.split(","),n={};return e.forEach(r=>{const[i,...o]=r.split("-");if(i&&o.length>0){const a=o.join("-");n[i]=a}}),n}const V$={class:"wrapper"},X$=Qr(p.defineComponent({__name:"index",props:{data:{type:Object,required:!0}},setup(t,{expose:e}){const{t:n}=Dn.useI18n(),r=t;p.provide("type",r.data.type),p.provide("isApproval",r.data.isApproval);const i=p.ref(null),o=p.ref(null),a={baseNode:{fill:"#fff",stroke:"#1f2937",strokeWidth:1.5},baseEdge:{stroke:"#1f2937",strokeWidth:1,lineWidth:1},rect:{radius:5,stroke:"#1f2937"},circle:{r:18,stroke:"#1f2937"},diamond:{},ellipse:{},polygon:{stroke:"#1f2937"},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#1f2937",overflowMode:"ellipsis",fontSize:11,lineHeight:1.2,padding:5},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"white",height:14,stroke:"transparent",radius:3}},line:{},polyline:{stroke:"#1f2937",hoverStroke:"#1f2937",selectedStroke:"#1f2937"},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{fill:"#1f2937",offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:1},outline:{fill:"transparent",stroke:"#0095ff",strokeDasharray:"3,3",hover:{stroke:"#0095ff"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"},background:!1,grid:{size:10,visible:!1,type:"dot",config:{color:"#ababab",thickness:1}}};function s(){o.value=new v8({container:i.value,stopZoomGraph:!1,allowResize:!0,adjustEdgeStartAndEnd:!0,nodeTextEdit:!1,edgeTextEdit:!1,grid:!1,metaKeyMultipleSelected:!0,keyboard:{enabled:!0},snapline:!0,stopScrollGraph:!1,plugins:[k8,K8,i5,a5,o5,Rx,hF]}),o.value.setTheme(a);const h={type:"bpmn:userTask",view:Xb,model:class extends Vb{initNodeData(v){super.initNodeData(v),this.width=120,this.height=100}}};o.value.register(h),D$(o.value,n),o.value.setPatternItems([{type:"bpmn:startEvent",label:n("bpmn.startName"),text:n("bpmn.startName"),properties:{"camunda:transName":"bpmn.startName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIvPjwvc3ZnPg=="},{type:"bpmn:userTask",label:n("bpmn.userTaskName"),text:n("bpmn.userTaskName"),properties:{"camunda:transName":"bpmn.userTaskName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yNCAyMEMyNy44NjYgMjAgMzEgMTYuODY2IDMxIDEzQzMxIDkuMTM0MDEgMjcuODY2IDYgMjQgNkMyMC4xMzQgNiAxNyA5LjEzNDAxIDE3IDEzQzE3IDE2Ljg2NiAyMC4xMzQgMjAgMjQgMjBaIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTYgNDAuOFY0Mkg0MlY0MC44QzQyIDM2LjMxOTYgNDIgMzQuMDc5NCA0MS4xMjgxIDMyLjM2ODFDNDAuMzYxMSAzMC44NjI4IDM5LjEzNzIgMjkuNjM4OSAzNy42MzE5IDI4Ljg3MTlDMzUuOTIwNiAyOCAzMy42ODA0IDI4IDI5LjIgMjhIMTguOEMxNC4zMTk2IDI4IDEyLjA3OTQgMjggMTAuMzY4MSAyOC44NzE5QzguODYyNzggMjkuNjM4OSA3LjYzODkzIDMwLjg2MjggNi44NzE5NSAzMi4zNjgxQzYgMzQuMDc5NCA2IDM2LjMxOTYgNiA0MC44WiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg=="},{type:"bpmn:exclusiveGateway",label:n("bpmn.exclusiveGatewayName"),properties:{"camunda:transName":"bpmn.exclusiveGatewayName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yMi43OTkyIDQuMjAxMDJMNC40MTQ0IDIyLjU4NThDMy42MzMzNiAyMy4zNjY4IDMuNjMzMzUgMjQuNjMzMiA0LjQxNDQgMjUuNDE0MkwyMi43OTkyIDQzLjc5OUMyMy41ODAyIDQ0LjU4IDI0Ljg0NjYgNDQuNTggMjUuNjI3NiA0My43OTlMNDQuMDEyNCAyNS40MTQyQzQ0Ljc5MzQgMjQuNjMzMiA0NC43OTM0IDIzLjM2NjggNDQuMDEyNCAyMi41ODU4TDI1LjYyNzYgNC4yMDEwMkMyNC44NDY2IDMuNDE5OTcgMjMuNTgwMiAzLjQxOTk3IDIyLjc5OTIgNC4yMDEwMloiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE4LjA0MyAyOS45ODcxTDMwLjA0MjcgMTguMDI0OSIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjxwYXRoIGQ9Ik0xOC4wNTI3IDE4LjAxNTZMMzAuMDMzNyAyOS45OTY1IiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9zdmc+"},{type:"bpmn:endEvent",label:n("bpmn.endName"),text:n("bpmn.endName"),properties:{"camunda:transName":"bpmn.endName"},icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PGNpcmNsZSBjeD0iMjQiIGN5PSIyNCIgcj0iMTIiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4="}]),o.value.setMenuConfig({nodeMenu:[{text:n("bpmn.delete"),"camunda:transName":"bpmn.delete",disabled:!1,callback(v){var g;(g=o.value)==null||g.deleteNode(v.id)}},{text:n("bpmn.copy"),"camunda:transName":"bpmn.copy",callback(v){var g;(g=o.value)==null||g.cloneNode(v.id)}}],edgeMenu:[{text:n("bpmn.delete"),"camunda:transName":"bpmn.delete",disabled:!1,callback(v){var g;(g=o.value)==null||g.deleteEdge(v.id)}}]}),o.value.render({})}function l(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
170
170
|
<bpmn:definitions id="Definitions_990e5cb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://logic-flow.org" exporter="logicflow" exporterVersion="1.2.0" xmlns:camunda="http://camunda.org/schema/1.0/bpmn">
|
|
171
171
|
<bpmn:process isExecutable="true" >
|
|
172
172
|
<bpmn:startEvent id="Event_ab18b5a" name="bpmn.startName" camunda:transName="bpmn.startName" width="36" height="36"/>
|