mind-elixir-yg 1.1.30 → 1.1.31

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.
@@ -34,7 +34,7 @@
34
34
  <div class="button-container"><svg class="icon" aria-hidden="true">
35
35
  <use xlink:href="#icon-close"></use>
36
36
  </svg></div>
37
- `,h.appendChild(t),h.appendChild(c),h.appendChild(i),h.appendChild(s),h.appendChild(d),r.showSelectCaseList&&h.appendChild(p),h.appendChild(l),h.hidden=!0,r.container.append(h),e=h.querySelectorAll(".size");const u=h.querySelector(".bold"),f=h.querySelector(".button-container"),m=h.querySelector(".font"),b=r.container.querySelector(".nm-tag"),g=r.container.querySelector(".nm-icon"),x=r.container.querySelector(".nm-remarks"),v=(h.querySelector(".nm-caseresult"),h.onclick=e=>{if(r.currentNode){const t=r.currentNode.nodeObj,i=e.target;var n;"palette"===i.className?(t.style||(t.style={}),a(".palette","nmenu-selected"),i.className="palette nmenu-selected","font"===o?"#ffffff"===i.dataset.color?t.style.color="":t.style.color=i.dataset.color:"background"===o&&("#ffffff"===i.dataset.color?t.style.background="":t.style.background=i.dataset.color),r.updateNodeStyle(t)):"background"===i.className?(a(".palette","nmenu-selected"),o="background",i.className="background selected",i.previousElementSibling.className="font",t.style&&t.style.background&&(h.querySelector('.palette[data-color="'+t.style.background+'"]').className="palette nmenu-selected")):"font"===i.className?(a(".palette","nmenu-selected"),o="font",i.className="font selected",i.nextElementSibling.className="background",t.style&&t.style.color&&(h.querySelector('.palette[data-color="'+t.style.color+'"]').className="palette nmenu-selected")):"case-pass"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,2):"case-notpass"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,3):"case-block"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,4):"case-notrun"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,1):"case-ignore"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,5):"case-null"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,""):"priority-one"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,1):"priority-two"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,2):"priority-three"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,3):"priority-four"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,4):"priority-five"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,5):"priority-null"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,""):"autoCase-null"===i.className?r.updateNodRelationAutoCase(r.currentNode.nodeObj,"",""):"autoCase-add"===i.className&&(e=v.value,n=v.options[v.selectedIndex].text,r.updateNodRelationAutoCase(r.currentNode.nodeObj,e,n))}},document.getElementById("autoCase")),y=(v&&v.addEventListener("change",function(){var e=v.options[v.selectedIndex];r.updateNodRelationAutoCase(r.currentNode.nodeObj,e.value,e.text)}),document.getElementById("searchInput"));y&&y.addEventListener("input",function(e){v&&(v.innerHTML="");var t=e.target.value.toLowerCase();t?r.selectCaseList.forEach(function(e){if(-1<e.name.toLowerCase().indexOf(t)){const n=document.createElement("option");n.text=e.name,n.value=e.name,v.add(n)}}):r.selectCaseList.forEach(function(e){const n=document.createElement("option");n.text=e.name,n.value=e.name,v.add(n)}),v&&(v.selectedIndex=-1)}),Array.from(e).map(e=>{e.onclick=e=>{r.currentNode.nodeObj.style||(r.currentNode.nodeObj.style={}),a(".size","size-selected");const n=e.currentTarget;r.currentNode.nodeObj.style.fontSize=n.dataset.size,n.className="size size-selected",r.updateNodeStyle(r.currentNode.nodeObj)}}),u.onclick=e=>{r.currentNode.nodeObj.style||(r.currentNode.nodeObj.style={}),"bold"===r.currentNode.nodeObj.style.fontWeight?(delete r.currentNode.nodeObj.style.fontWeight,e.currentTarget.className="bold"):(r.currentNode.nodeObj.style.fontWeight="bold",e.currentTarget.className="bold size-selected"),r.updateNodeStyle(r.currentNode.nodeObj)},b.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value.split(","),r.updateNodeTags(r.currentNode.nodeObj,e)):r.updateNodeTags(r.currentNode.nodeObj,""))},g.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value.split(","),r.updateNodeIcons(r.currentNode.nodeObj,e)):r.updateNodeIcons(r.currentNode.nodeObj,""))},x.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value,r.updateNodeRemark(r.currentNode.nodeObj,e)):r.updateNodeRemark(r.currentNode.nodeObj,""))};let n="open";f.onclick=e=>{"open"===n?(n="close",h.className="close",f.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-menu"></use></svg>'):(n="open",h.className="",f.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-close"></use></svg>')},r.bus.addListener("unselectNode",function(){h.hidden=!0}),r.bus.addListener("selectNode",function(e){h.hidden=!1,a(".palette","nmenu-selected"),a(".size","size-selected"),a(".bold","size-selected"),o="font",m.className="font selected",m.nextElementSibling.className="background",e.style&&(e.style.fontSize&&(h.querySelector('.size[data-size="'+e.style.fontSize+'"]').className="size size-selected"),e.style.fontWeight&&(h.querySelector(".bold").className="bold size-selected"),e.style.color&&(h.querySelector('.palette[data-color="'+e.style.color+'"]').className="palette nmenu-selected")),e.tags?b.value=e.tags.join(","):b.value="",e.icons?g.value=e.icons.join(","):g.value="",e.remarks?x.value=e.remarks:x.value=""})}if(this.keypress){var n=this;const o={13:()=>{n.insertSibling()},9:()=>{n.addChild()},113:()=>{n.beginEdit()},38:()=>{n.selectPrevSibling()},40:()=>{n.selectNextSibling()},37:()=>{n.currentNode&&("rhs"===n.currentNode.offsetParent.offsetParent.className?n.selectParent():"lhs"!==n.currentNode.offsetParent.offsetParent.className&&!n.currentNode.nodeObj.root||n.selectFirstChild())},39:()=>{n.currentNode&&("rhs"===n.currentNode.offsetParent.offsetParent.className||n.currentNode.nodeObj.root?n.selectFirstChild():"lhs"===n.currentNode.offsetParent.offsetParent.className&&n.selectParent())},33(){n.moveUpNode()},34(){n.moveDownNode()},67(e){(e.metaKey||e.ctrlKey)&&(n.waitCopy=n.currentNode)},86(e){n.waitCopy&&(e.metaKey||e.ctrlKey)&&(n.copyNode(n.waitCopy,n.currentNode),n.waitCopy=null)},90:e=>{n.allowUndo&&(e.metaKey||e.ctrlKey)&&n.undo()},187:e=>{!e.metaKey&&!e.ctrlKey||1.6<n.scaleVal||n.scale(n.scaleVal+=.2)},189:e=>{!e.metaKey&&!e.ctrlKey||n.scaleVal<.6||n.scale(n.scaleVal-=.2)}};n.map.onkeydown=e=>{e.preventDefault(),n.editable&&e.target===e.currentTarget&&(8===e.keyCode||46===e.keyCode?n.currentLink?n.removeLink():n.removeNode():o[e.keyCode]&&o[e.keyCode](e))}}(0,N.tq)()&&this.mobileMenu?(0,j.Z)(this):this.contextMenu&&(0,C.Z)(this,this.contextMenuOption),this.draggable&&M(this),this.toCenter(),this.layout(),this.linkDiv(),this.overflowHidden||(0,k.Z)(this)}},u.LEFT=n.RL,u.RIGHT=n.pX,u.SIDE=n.VW,u.version="0.17.0",u.E=i.YZ,u.new=e=>({nodeData:{id:(0,N.DO)(),topic:e||"new topic",root:!0,children:[]},linkData:{}});const m=u},3164:(e,n,t)=>{"use strict";t.d(n,{UG:()=>o,KW:()=>a,dl:()=>s,nb:()=>l,ji:()=>d,xG:()=>c,kS:()=>p,jl:()=>h,Rg:()=>u,Lj:()=>f,gw:()=>m,bA:()=>b,h7:()=>g,Tn:()=>x,nA:()=>v,Nb:()=>y,Qi:()=>N,_F:()=>w,Ut:()=>k,dJ:()=>C,uj:()=>L,du:()=>E,$8:()=>S,jS:()=>$,i_:()=>M,A2:()=>j,bi:()=>O});var i=t(9842);function r(e){return e.isFocusMode?e.nodeDataBackup:e.nodeData}const o=function(e,n){if(e){if("string"==typeof e)return this.selectNode((0,i.YZ)(e));this.currentNode&&(this.currentNode.className=""),e.className="selected",this.currentNode=e,n?this.bus.fire("selectNewNode",e.nodeObj):this.bus.fire("selectNode",e.nodeObj)}},a=function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},s=function(){if(this.currentNode&&"meroot"!==this.currentNode.dataset.nodeid){var n=this.currentNode.parentElement.parentElement.nextSibling;let e;var t=this.currentNode.parentElement.parentElement;if("rhs"===t.className||"lhs"===t.className){var i=this.mindElixirBox.querySelectorAll("."+t.className),t=Array.from(i).indexOf(t);if(!(t+1<i.length))return!1;e=i[t+1].firstChild.firstChild}else{if(!n)return!1;e=n.firstChild.firstChild}return this.selectNode(e),!0}},l=function(){if(this.currentNode&&"meroot"!==this.currentNode.dataset.nodeid){var n=this.currentNode.parentElement.parentElement.previousSibling;let e;var t=this.currentNode.parentElement.parentElement;if("rhs"===t.className||"lhs"===t.className){var i=this.mindElixirBox.querySelectorAll("."+t.className),t=Array.from(i).indexOf(t);if(!(0<=t-1))return!1;e=i[t-1].firstChild.firstChild}else{if(!n)return!1;e=n.firstChild.firstChild}return this.selectNode(e),!0}},d=function(){var e;!this.currentNode||(e=this.currentNode.parentElement.nextSibling)&&e.firstChild&&(e=e.firstChild.firstChild.firstChild,this.selectNode(e))},c=function(){var e;!this.currentNode||"meroot"===this.currentNode.dataset.nodeid||(e=this.currentNode.parentElement.parentElement.parentElement.previousSibling)&&(e=e.firstChild,this.selectNode(e))},p=function(){var e={nodeData:r(this),linkData:this.linkData};return JSON.stringify(e,(e,n)=>{if("parent"!==e)return"from"===e||"to"===e?n.nodeObj.id:n})},h=function(){var e={nodeData:r(this),linkData:this.linkData};return JSON.parse(JSON.stringify(e,(e,n)=>{if("parent"!==e)return"from"===e||"to"===e?n.nodeObj.id:n}))},u=function(){var e=r(this);let o="# "+e.topic+"\n\n";return function n(t,i){for(let e=0;e<t.length;e++)o+=i<=6?"".padStart(i,"#")+" "+t[e].topic+"\n\n":"".padStart(i-7,"\t")+"- "+t[e].topic+"\n",t[e].children&&n(t[e].children,i+1)}(e.children,2),o},f=function(){this.editable=!0},m=function(){this.editable=!1},b=function(e){this.scaleVal=e,this.map.style.transform="scale("+e+")"},g=function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,3e4-this.container.offsetHeight/2)},x=function(e,n){this.container.scrollTo(e,n)},v=function(){this.direction=0,this.init()},y=function(){this.direction=1,this.init()},N=function(){this.direction=2,this.init()},w=function(e){this.scale(e)},k=function(e){this.scale(e)};const C=function(e){e.nodeObj.root||(null===this.tempDirection&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.nodeData.root=!0,this.initRight())},L=function(){this.isFocusMode=!1,null!==this.tempDirection&&(delete this.nodeData.root,this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.init())},E=function(){this.direction=0,this.init()},S=function(){this.direction=1,this.init()},$=function(){this.direction=2,this.init()},M=function(e){this.locale=e,this.init()},j=function(e,n){const t=e.nodeObj;"boolean"==typeof n?t.expanded=n:!1!==t.expanded?t.expanded=!1:t.expanded=!0,this.layout(),this.linkDiv(),this.bus.fire("expandNode",t)},O=function(){this.addParentLink(this.nodeData),this.layout(),this.linkDiv()}},2327:(e,n,t)=>{"use strict";t.d(n,{Z:()=>function(n){var i=this.primaryNodeHorizontalGap||S.SJ,r=this.primaryNodeVerticalGap||S.jQ;const o=this.root,a=(o.style.cssText=`top:${3e4-o.offsetHeight/2}px;left:${1e4-o.offsetWidth/2}px;`,this.box.children);this.svg2nd.innerHTML="";let t=0,s,l=0,d=0,c=0,p=0,h=0,u;if(this.direction===S.VW){let n=0,t=0,i=0,o=0;for(let e=0;e<a.length;e++){var f=a[e];"lhs"===f.className?(p+=f.offsetHeight+r,i+=f.offsetHeight,n+=1):(h+=f.offsetHeight+r,o+=f.offsetHeight,t+=1)}l=p>h?(u=3e4-Math.max(p)/2,s="r",(p-o)/(t-1)):(u=3e4-Math.max(h)/2,s="l",(h-i)/(n-1))}else{for(let e=0;e<a.length;e++){var m=a[e];t+=m.offsetHeight+r}u=3e4-t/2}let b="";for(let e=0;e<a.length;e++){let n,t;const y=a[e];var g=y.offsetHeight;if("lhs"===y.className){y.style.top=u+d+"px",y.style.left=1e4-o.offsetWidth/2-i-y.offsetWidth+"px",n=1e4-o.offsetWidth/2-i-15,t=u+d+g/2;let e=1e4;2===this.primaryLinkStyle?(this.direction===S.VW&&(e=1e4-o.offsetWidth/6),t<1e4?b+=`M ${e} 10000
37
+ `,h.appendChild(t),h.appendChild(c),h.appendChild(i),h.appendChild(s),h.appendChild(d),r.showSelectCaseList&&h.appendChild(p),h.appendChild(l),h.hidden=!0,r.container.append(h),e=h.querySelectorAll(".size");const u=h.querySelector(".bold"),f=h.querySelector(".button-container"),m=h.querySelector(".font"),b=r.container.querySelector(".nm-tag"),g=r.container.querySelector(".nm-icon"),x=r.container.querySelector(".nm-remarks"),v=(h.querySelector(".nm-caseresult"),h.onclick=e=>{if(r.currentNode){const t=r.currentNode.nodeObj,i=e.target;var n;"palette"===i.className?(t.style||(t.style={}),a(".palette","nmenu-selected"),i.className="palette nmenu-selected","font"===o?"#ffffff"===i.dataset.color?t.style.color="":t.style.color=i.dataset.color:"background"===o&&("#ffffff"===i.dataset.color?t.style.background="":t.style.background=i.dataset.color),r.updateNodeStyle(t)):"background"===i.className?(a(".palette","nmenu-selected"),o="background",i.className="background selected",i.previousElementSibling.className="font",t.style&&t.style.background&&(h.querySelector('.palette[data-color="'+t.style.background+'"]').className="palette nmenu-selected")):"font"===i.className?(a(".palette","nmenu-selected"),o="font",i.className="font selected",i.nextElementSibling.className="background",t.style&&t.style.color&&(h.querySelector('.palette[data-color="'+t.style.color+'"]').className="palette nmenu-selected")):"case-pass"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,2):"case-notpass"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,3):"case-block"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,4):"case-notrun"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,1):"case-ignore"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,5):"case-null"===i.className?r.updateNodeCaseStatus(r.currentNode.nodeObj,""):"priority-one"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,1):"priority-two"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,2):"priority-three"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,3):"priority-four"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,4):"priority-five"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,5):"priority-null"===i.className?r.updateNodeCasePriority(r.currentNode.nodeObj,""):"autoCase-null"===i.className?r.updateNodRelationAutoCase(r.currentNode.nodeObj,"",""):"autoCase-add"===i.className&&(e=v.value,n=v.options[v.selectedIndex].text,r.updateNodRelationAutoCase(r.currentNode.nodeObj,e,n))}},document.getElementById("autoCase")),y=(v&&v.addEventListener("change",function(){var e=v.options[v.selectedIndex];r.updateNodRelationAutoCase(r.currentNode.nodeObj,e.value,e.text)}),document.getElementById("searchInput"));y&&y.addEventListener("input",function(e){v&&(v.innerHTML="");var t=e.target.value.toLowerCase();t?r.selectCaseList.forEach(function(e){if(-1<e.name.toLowerCase().indexOf(t)){const n=document.createElement("option");n.text=e.name,n.value=e.id,v.add(n)}}):r.selectCaseList.forEach(function(e){const n=document.createElement("option");n.text=e.name,n.value=e.id,v.add(n)}),v&&(v.selectedIndex=-1)}),Array.from(e).map(e=>{e.onclick=e=>{r.currentNode.nodeObj.style||(r.currentNode.nodeObj.style={}),a(".size","size-selected");const n=e.currentTarget;r.currentNode.nodeObj.style.fontSize=n.dataset.size,n.className="size size-selected",r.updateNodeStyle(r.currentNode.nodeObj)}}),u.onclick=e=>{r.currentNode.nodeObj.style||(r.currentNode.nodeObj.style={}),"bold"===r.currentNode.nodeObj.style.fontWeight?(delete r.currentNode.nodeObj.style.fontWeight,e.currentTarget.className="bold"):(r.currentNode.nodeObj.style.fontWeight="bold",e.currentTarget.className="bold size-selected"),r.updateNodeStyle(r.currentNode.nodeObj)},b.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value.split(","),r.updateNodeTags(r.currentNode.nodeObj,e)):r.updateNodeTags(r.currentNode.nodeObj,""))},g.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value.split(","),r.updateNodeIcons(r.currentNode.nodeObj,e)):r.updateNodeIcons(r.currentNode.nodeObj,""))},x.onchange=e=>{r.currentNode&&(e.target.value?(e=e.target.value,r.updateNodeRemark(r.currentNode.nodeObj,e)):r.updateNodeRemark(r.currentNode.nodeObj,""))};let n="open";f.onclick=e=>{"open"===n?(n="close",h.className="close",f.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-menu"></use></svg>'):(n="open",h.className="",f.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-close"></use></svg>')},r.bus.addListener("unselectNode",function(){h.hidden=!0}),r.bus.addListener("selectNode",function(e){h.hidden=!1,a(".palette","nmenu-selected"),a(".size","size-selected"),a(".bold","size-selected"),o="font",m.className="font selected",m.nextElementSibling.className="background",e.style&&(e.style.fontSize&&(h.querySelector('.size[data-size="'+e.style.fontSize+'"]').className="size size-selected"),e.style.fontWeight&&(h.querySelector(".bold").className="bold size-selected"),e.style.color&&(h.querySelector('.palette[data-color="'+e.style.color+'"]').className="palette nmenu-selected")),e.tags?b.value=e.tags.join(","):b.value="",e.icons?g.value=e.icons.join(","):g.value="",e.remarks?x.value=e.remarks:x.value=""})}if(this.keypress){var n=this;const o={13:()=>{n.insertSibling()},9:()=>{n.addChild()},113:()=>{n.beginEdit()},38:()=>{n.selectPrevSibling()},40:()=>{n.selectNextSibling()},37:()=>{n.currentNode&&("rhs"===n.currentNode.offsetParent.offsetParent.className?n.selectParent():"lhs"!==n.currentNode.offsetParent.offsetParent.className&&!n.currentNode.nodeObj.root||n.selectFirstChild())},39:()=>{n.currentNode&&("rhs"===n.currentNode.offsetParent.offsetParent.className||n.currentNode.nodeObj.root?n.selectFirstChild():"lhs"===n.currentNode.offsetParent.offsetParent.className&&n.selectParent())},33(){n.moveUpNode()},34(){n.moveDownNode()},67(e){(e.metaKey||e.ctrlKey)&&(n.waitCopy=n.currentNode)},86(e){n.waitCopy&&(e.metaKey||e.ctrlKey)&&(n.copyNode(n.waitCopy,n.currentNode),n.waitCopy=null)},90:e=>{n.allowUndo&&(e.metaKey||e.ctrlKey)&&n.undo()},187:e=>{!e.metaKey&&!e.ctrlKey||1.6<n.scaleVal||n.scale(n.scaleVal+=.2)},189:e=>{!e.metaKey&&!e.ctrlKey||n.scaleVal<.6||n.scale(n.scaleVal-=.2)}};n.map.onkeydown=e=>{e.preventDefault(),n.editable&&e.target===e.currentTarget&&(8===e.keyCode||46===e.keyCode?n.currentLink?n.removeLink():n.removeNode():o[e.keyCode]&&o[e.keyCode](e))}}(0,N.tq)()&&this.mobileMenu?(0,j.Z)(this):this.contextMenu&&(0,C.Z)(this,this.contextMenuOption),this.draggable&&M(this),this.toCenter(),this.layout(),this.linkDiv(),this.overflowHidden||(0,k.Z)(this)}},u.LEFT=n.RL,u.RIGHT=n.pX,u.SIDE=n.VW,u.version="0.17.0",u.E=i.YZ,u.new=e=>({nodeData:{id:(0,N.DO)(),topic:e||"new topic",root:!0,children:[]},linkData:{}});const m=u},3164:(e,n,t)=>{"use strict";t.d(n,{UG:()=>o,KW:()=>a,dl:()=>s,nb:()=>l,ji:()=>d,xG:()=>c,kS:()=>p,jl:()=>h,Rg:()=>u,Lj:()=>f,gw:()=>m,bA:()=>b,h7:()=>g,Tn:()=>x,nA:()=>v,Nb:()=>y,Qi:()=>N,_F:()=>w,Ut:()=>k,dJ:()=>C,uj:()=>L,du:()=>E,$8:()=>S,jS:()=>$,i_:()=>M,A2:()=>j,bi:()=>O});var i=t(9842);function r(e){return e.isFocusMode?e.nodeDataBackup:e.nodeData}const o=function(e,n){if(e){if("string"==typeof e)return this.selectNode((0,i.YZ)(e));this.currentNode&&(this.currentNode.className=""),e.className="selected",this.currentNode=e,n?this.bus.fire("selectNewNode",e.nodeObj):this.bus.fire("selectNode",e.nodeObj)}},a=function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},s=function(){if(this.currentNode&&"meroot"!==this.currentNode.dataset.nodeid){var n=this.currentNode.parentElement.parentElement.nextSibling;let e;var t=this.currentNode.parentElement.parentElement;if("rhs"===t.className||"lhs"===t.className){var i=this.mindElixirBox.querySelectorAll("."+t.className),t=Array.from(i).indexOf(t);if(!(t+1<i.length))return!1;e=i[t+1].firstChild.firstChild}else{if(!n)return!1;e=n.firstChild.firstChild}return this.selectNode(e),!0}},l=function(){if(this.currentNode&&"meroot"!==this.currentNode.dataset.nodeid){var n=this.currentNode.parentElement.parentElement.previousSibling;let e;var t=this.currentNode.parentElement.parentElement;if("rhs"===t.className||"lhs"===t.className){var i=this.mindElixirBox.querySelectorAll("."+t.className),t=Array.from(i).indexOf(t);if(!(0<=t-1))return!1;e=i[t-1].firstChild.firstChild}else{if(!n)return!1;e=n.firstChild.firstChild}return this.selectNode(e),!0}},d=function(){var e;!this.currentNode||(e=this.currentNode.parentElement.nextSibling)&&e.firstChild&&(e=e.firstChild.firstChild.firstChild,this.selectNode(e))},c=function(){var e;!this.currentNode||"meroot"===this.currentNode.dataset.nodeid||(e=this.currentNode.parentElement.parentElement.parentElement.previousSibling)&&(e=e.firstChild,this.selectNode(e))},p=function(){var e={nodeData:r(this),linkData:this.linkData};return JSON.stringify(e,(e,n)=>{if("parent"!==e)return"from"===e||"to"===e?n.nodeObj.id:n})},h=function(){var e={nodeData:r(this),linkData:this.linkData};return JSON.parse(JSON.stringify(e,(e,n)=>{if("parent"!==e)return"from"===e||"to"===e?n.nodeObj.id:n}))},u=function(){var e=r(this);let o="# "+e.topic+"\n\n";return function n(t,i){for(let e=0;e<t.length;e++)o+=i<=6?"".padStart(i,"#")+" "+t[e].topic+"\n\n":"".padStart(i-7,"\t")+"- "+t[e].topic+"\n",t[e].children&&n(t[e].children,i+1)}(e.children,2),o},f=function(){this.editable=!0},m=function(){this.editable=!1},b=function(e){this.scaleVal=e,this.map.style.transform="scale("+e+")"},g=function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,3e4-this.container.offsetHeight/2)},x=function(e,n){this.container.scrollTo(e,n)},v=function(){this.direction=0,this.init()},y=function(){this.direction=1,this.init()},N=function(){this.direction=2,this.init()},w=function(e){this.scale(e)},k=function(e){this.scale(e)};const C=function(e){e.nodeObj.root||(null===this.tempDirection&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.nodeData.root=!0,this.initRight())},L=function(){this.isFocusMode=!1,null!==this.tempDirection&&(delete this.nodeData.root,this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.init())},E=function(){this.direction=0,this.init()},S=function(){this.direction=1,this.init()},$=function(){this.direction=2,this.init()},M=function(e){this.locale=e,this.init()},j=function(e,n){const t=e.nodeObj;"boolean"==typeof n?t.expanded=n:!1!==t.expanded?t.expanded=!1:t.expanded=!0,this.layout(),this.linkDiv(),this.bus.fire("expandNode",t)},O=function(){this.addParentLink(this.nodeData),this.layout(),this.linkDiv()}},2327:(e,n,t)=>{"use strict";t.d(n,{Z:()=>function(n){var i=this.primaryNodeHorizontalGap||S.SJ,r=this.primaryNodeVerticalGap||S.jQ;const o=this.root,a=(o.style.cssText=`top:${3e4-o.offsetHeight/2}px;left:${1e4-o.offsetWidth/2}px;`,this.box.children);this.svg2nd.innerHTML="";let t=0,s,l=0,d=0,c=0,p=0,h=0,u;if(this.direction===S.VW){let n=0,t=0,i=0,o=0;for(let e=0;e<a.length;e++){var f=a[e];"lhs"===f.className?(p+=f.offsetHeight+r,i+=f.offsetHeight,n+=1):(h+=f.offsetHeight+r,o+=f.offsetHeight,t+=1)}l=p>h?(u=3e4-Math.max(p)/2,s="r",(p-o)/(t-1)):(u=3e4-Math.max(h)/2,s="l",(h-i)/(n-1))}else{for(let e=0;e<a.length;e++){var m=a[e];t+=m.offsetHeight+r}u=3e4-t/2}let b="";for(let e=0;e<a.length;e++){let n,t;const y=a[e];var g=y.offsetHeight;if("lhs"===y.className){y.style.top=u+d+"px",y.style.left=1e4-o.offsetWidth/2-i-y.offsetWidth+"px",n=1e4-o.offsetWidth/2-i-15,t=u+d+g/2;let e=1e4;2===this.primaryLinkStyle?(this.direction===S.VW&&(e=1e4-o.offsetWidth/6),t<1e4?b+=`M ${e} 10000
38
38
  L ${e} ${t+20}
39
39
  C ${e} ${t} ${e} ${t} ${e-20} ${t}
40
40
  L ${n} `+t:b+=`M ${e} 10000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir-yg",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "Mind elixir is a free open source mind map core.",
5
5
  "main": "dist/MindElixir.js",
6
6
  "scripts": {