@abi-software/map-side-bar 2.5.0 → 2.5.1
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/map-side-bar.js +17 -11
- package/dist/map-side-bar.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +18 -3
- package/src/components/ConnectivityInfo.vue +9 -2
- package/src/components/SideBar.vue +14 -8
package/dist/map-side-bar.js
CHANGED
|
@@ -49941,7 +49941,7 @@ const tT = /* @__PURE__ */ Lo(_fe, [["render", Ofe], ["__scopeId", "data-v-e726c
|
|
|
49941
49941
|
t && t.showErrorMessage(e);
|
|
49942
49942
|
});
|
|
49943
49943
|
}
|
|
49944
|
-
}, Ls = (e) => (ki("data-v-
|
|
49944
|
+
}, Ls = (e) => (ki("data-v-0dc2cb05"), e = e(), Ci(), e), Afe = {
|
|
49945
49945
|
key: 0,
|
|
49946
49946
|
class: "main"
|
|
49947
49947
|
}, Ffe = { class: "connectivity-info-title" }, Ife = {
|
|
@@ -50206,7 +50206,7 @@ function lhe(e, t, n, r, o, a) {
|
|
|
50206
50206
|
[v, e.loading]
|
|
50207
50207
|
]) : re("", !0);
|
|
50208
50208
|
}
|
|
50209
|
-
const nT = /* @__PURE__ */ Lo($fe, [["render", lhe], ["__scopeId", "data-v-
|
|
50209
|
+
const nT = /* @__PURE__ */ Lo($fe, [["render", lhe], ["__scopeId", "data-v-0dc2cb05"]]), uhe = {
|
|
50210
50210
|
name: "Tabs",
|
|
50211
50211
|
props: {
|
|
50212
50212
|
tabTitles: {
|
|
@@ -50327,7 +50327,13 @@ const rT = /* @__PURE__ */ Lo(uhe, [["render", vhe], ["__scopeId", "data-v-ed1ce
|
|
|
50327
50327
|
},
|
|
50328
50328
|
createData: {
|
|
50329
50329
|
type: Object,
|
|
50330
|
-
default:
|
|
50330
|
+
default: {
|
|
50331
|
+
toBeConfirmed: !1,
|
|
50332
|
+
points: [],
|
|
50333
|
+
shape: "",
|
|
50334
|
+
x: 0,
|
|
50335
|
+
y: 0
|
|
50336
|
+
}
|
|
50331
50337
|
}
|
|
50332
50338
|
},
|
|
50333
50339
|
data: function() {
|
|
@@ -50443,6 +50449,13 @@ const rT = /* @__PURE__ */ Lo(uhe, [["render", vhe], ["__scopeId", "data-v-ed1ce
|
|
|
50443
50449
|
},
|
|
50444
50450
|
tabClose: function(e) {
|
|
50445
50451
|
this.$emit("tab-close", e);
|
|
50452
|
+
},
|
|
50453
|
+
/**
|
|
50454
|
+
* To receive error message for connectivity graph
|
|
50455
|
+
* @param {String} errorMessage
|
|
50456
|
+
*/
|
|
50457
|
+
updateConnectivityGraphError: function(e) {
|
|
50458
|
+
Sn.emit("connectivity-graph-error", e);
|
|
50446
50459
|
}
|
|
50447
50460
|
},
|
|
50448
50461
|
computed: {
|
|
@@ -50451,13 +50464,6 @@ const rT = /* @__PURE__ */ Lo(uhe, [["render", vhe], ["__scopeId", "data-v-ed1ce
|
|
|
50451
50464
|
{ id: 1, title: "Search", type: "search" }
|
|
50452
50465
|
];
|
|
50453
50466
|
return this.connectivityInfo && e.push({ id: 2, title: "Connectivity", type: "connectivity" }), this.annotationEntry && Object.keys(this.annotationEntry).length > 0 && e.push({ id: 3, title: "Annotation", type: "annotation" }), e;
|
|
50454
|
-
},
|
|
50455
|
-
/**
|
|
50456
|
-
* To receive error message for connectivity graph
|
|
50457
|
-
* @param {String} errorMessage
|
|
50458
|
-
*/
|
|
50459
|
-
updateConnectivityGraphError: function(e) {
|
|
50460
|
-
Sn.emit("connectivity-graph-error", e);
|
|
50461
50467
|
}
|
|
50462
50468
|
},
|
|
50463
50469
|
created: function() {
|
|
@@ -50576,7 +50582,7 @@ function whe(e, t, n, r, o, a) {
|
|
|
50576
50582
|
}, 8, ["modelValue"])
|
|
50577
50583
|
], 512);
|
|
50578
50584
|
}
|
|
50579
|
-
const She = /* @__PURE__ */ Lo(ghe, [["render", whe], ["__scopeId", "data-v-
|
|
50585
|
+
const She = /* @__PURE__ */ Lo(ghe, [["render", whe], ["__scopeId", "data-v-4c7c2708"]]);
|
|
50580
50586
|
export {
|
|
50581
50587
|
She as SideBar
|
|
50582
50588
|
};
|
|
@@ -924,4 +924,4 @@ Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
|
|
924
924
|
`);return u+=`
|
|
925
925
|
`,u+=`<ul>${h}</ul>`,u}if((a=this.entry.origins)!=null&&a.length){const l="Origin",d=this.entry.origins,c=this.entry.originsWithDatasets,u=t(l,d,c);e.push(u)}if((i=this.entry.components)!=null&&i.length){const l="Components",d=this.entry.components,c=this.entry.componentsWithDatasets,u=t(l,d,c);e.push(u)}if((s=this.entry.destinations)!=null&&s.length){const l="Destination",d=this.entry.destinations,c=this.entry.destinationsWithDatasets,u=t(l,d,c);e.push(u)}return e.join(`
|
|
926
926
|
|
|
927
|
-
<br>`)},toggleConnectivityTooltip:function(e,t){const n=[...this.entry.componentsWithDatasets,...this.entry.destinationsWithDatasets,...this.entry.originsWithDatasets],r=e.split(","),a=[];t&&r.forEach(i=>{a.push(n.find(s=>s.name.trim()===i.trim()))}),this.$emit("connectivity-component-click",a)}},mounted:function(){Ut.on("connectivity-graph-error",e=>{const t=this.$refs.connectivityGraphRef;t&&t.showErrorMessage(e)})}},Ui=e=>(o.pushScopeId("data-v-1fe36a0d"),e=e(),o.popScopeId(),e),Iue={key:0,class:"main"},Due={class:"connectivity-info-title"},Vue={key:0,class:"block"},Rue={class:"title"},Lue={style:{"word-break":"keep-all"}},Mue={key:0,class:"subtitle"},zue={key:1,class:"block"},jue={class:"title"},Hue={key:2,class:"block"},Uue={class:"title-buttons"},que=Ui(()=>o.createElementVNode("span",null," Show connectivity on map ",-1)),Wue={class:"content-container population-display"},Kue=Ui(()=>o.createElementVNode("div",{class:"block attribute-title-container"},[o.createElementVNode("span",{class:"attribute-title"},"Population Display")],-1)),Gue={class:"block buttons-row"},Xue={key:0,class:"content-container"},Yue={key:0,class:"block"},Zue={class:"attribute-title-container"},Jue=Ui(()=>o.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),Que={style:{"word-break":"keep-all"}},efe=Ui(()=>o.createElementVNode("i",null,"Origin",-1)),tfe=["origin-item-label","onMouseenter","onMouseleave"],nfe={key:1,class:"block"},rfe=Ui(()=>o.createElementVNode("div",{class:"attribute-title-container"},[o.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),ofe=["component-item-label","onMouseenter","onMouseleave"],afe={key:2,class:"block"},ife={class:"attribute-title-container"},sfe=Ui(()=>o.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),lfe=Ui(()=>o.createElementVNode("span",{style:{"word-break":"keep-all"}},[o.createElementVNode("i",null,"Destination"),o.createTextVNode(" is where the axons terminate ")],-1)),cfe=["destination-item-label","onMouseenter","onMouseleave"],dfe={class:"block"},ufe={key:1,class:"content-container"};function ffe(e,t,n,r,a,i){const s=eP,l=St,d=Xh,c=z_,u=G6,f=ar,h=o.resolveComponent("CopyToClipboard"),m=cv,p=o.resolveComponent("connectivity-graph"),g=ru;return n.entry?o.withDirectives((o.openBlock(),o.createElementBlock("div",Iue,[o.createElementVNode("div",Due,[o.createElementVNode("div",null,[n.entry.title?(o.openBlock(),o.createElementBlock("div",Vue,[o.createElementVNode("div",Rue,[o.createTextVNode(o.toDisplayString(i.capitalise(n.entry.title))+" ",1),n.entry.featuresAlert?(o.openBlock(),o.createBlock(d,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"alert"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Lue,o.toDisplayString(n.entry.featuresAlert),1)]),_:1})):o.createCommentVNode("",!0)]),n.entry.provenanceTaxonomyLabel&&n.entry.provenanceTaxonomyLabel.length>0?(o.openBlock(),o.createElementBlock("div",Mue,o.toDisplayString(i.provSpeciesDescription),1)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",zue,[o.createElementVNode("div",jue,o.toDisplayString(n.entry.featureId),1)])),i.resources.length?(o.openBlock(),o.createElementBlock("div",Hue,[o.createVNode(c,{resources:i.resources},null,8,["resources"])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",Uue,[o.createVNode(d,{width:"auto",trigger:"hover",teleported:!1,"popper-class":"popover-map-pin"},{reference:o.withCtx(()=>[o.createVNode(f,{class:"button-circle",circle:"",onClick:t[0]||(t[0]=v=>i.showConnectivity(n.entry))},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:1})]),default:o.withCtx(()=>[que]),_:1}),o.createVNode(h,{content:i.updatedCopyContent},null,8,["content"])])]),o.createElementVNode("div",Wue,[Kue,o.createElementVNode("div",Gue,[o.createVNode(f,{class:o.normalizeClass(e.activeView==="listView"?"button":"el-button-secondary"),onClick:t[1]||(t[1]=v=>i.switchConnectivityView("listView"))},{default:o.withCtx(()=>[o.createTextVNode(" List view ")]),_:1},8,["class"]),o.createVNode(f,{class:o.normalizeClass(e.activeView==="graphView"?"button":"el-button-secondary"),onClick:t[2]||(t[2]=v=>i.switchConnectivityView("graphView"))},{default:o.withCtx(()=>[o.createTextVNode(" Graph view ")]),_:1},8,["class"])])]),e.activeView==="listView"?(o.openBlock(),o.createElementBlock("div",Xue,[o.createTextVNode(o.toDisplayString(n.entry.paths)+" ",1),n.entry.origins&&n.entry.origins.length>0?(o.openBlock(),o.createElementBlock("div",Yue,[o.createElementVNode("div",Zue,[Jue,o.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(m)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Que,[efe,o.createTextVNode(" "+o.toDisplayString(i.originDescription),1)])]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.origins,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","origin-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,tfe))),128)),o.withDirectives(o.createVNode(f,{class:"button",id:"open-dendrites-button",onClick:i.openDendrites},{default:o.withCtx(()=>[o.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[o.vShow,n.entry.originsWithDatasets&&n.entry.originsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.originsWithDatasets)]])])):o.createCommentVNode("",!0),n.entry.components&&n.entry.components.length>0?(o.openBlock(),o.createElementBlock("div",nfe,[rfe,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.components,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","component-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,ofe))),128))])):o.createCommentVNode("",!0),n.entry.destinations&&n.entry.destinations.length>0?(o.openBlock(),o.createElementBlock("div",afe,[o.createElementVNode("div",ife,[sfe,o.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(m)]),_:1})]),default:o.withCtx(()=>[lfe]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.destinations,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","destination-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,cfe))),128)),o.withDirectives(o.createVNode(f,{class:"button",onClick:i.openAxons},{default:o.withCtx(()=>[o.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[o.vShow,n.entry.destinationsWithDatasets&&n.entry.destinationsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.destinationsWithDatasets)]])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",dfe,[o.createVNode(f,{class:"button",onClick:i.openAll},{default:o.withCtx(()=>[o.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"])],512),[[o.vShow,n.entry.componentsWithDatasets&&n.entry.componentsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.componentsWithDatasets)]])])):o.createCommentVNode("",!0),e.activeView==="graphView"?(o.openBlock(),o.createElementBlock("div",ufe,[o.createVNode(p,{entry:n.entry.featureId[0],mapServer:n.envVars.FLATMAPAPI_LOCATION,onTapNode:i.onTapNode,ref:"connectivityGraphRef"},null,8,["entry","mapServer","onTapNode"])])):o.createCommentVNode("",!0)])),[[g,e.loading]]):o.createCommentVNode("",!0)}const j_=zr(Aue,[["render",ffe],["__scopeId","data-v-1fe36a0d"]]),pfe={name:"Tabs",props:{tabTitles:{type:Array,default:()=>[]},activeId:{type:Number,default:1}},methods:{titleClicked:function(e,t){this.$emit("titleClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)}}},hfe=e=>(o.pushScopeId("data-v-ed1ce6dc"),e=e(),o.popScopeId(),e),mfe={class:"tab-container"},gfe=["onClick"],yfe={class:"title-text"},vfe=hfe(()=>o.createElementVNode("span",{class:"visually-hidden"},"Close",-1));function bfe(e,t,n,r,a,i){const s=ar;return o.openBlock(),o.createElementBlock("div",mfe,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.tabTitles,l=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["title",{"active-tab":l.id==n.activeId}]),key:l.id},[o.createElementVNode("div",{class:o.normalizeClass(["title-text-table",{highlightText:l.id==n.activeId}]),onClick:d=>i.titleClicked(l.id,l.type)},[o.createElementVNode("div",yfe,o.toDisplayString(l.title),1)],10,gfe),l.id>1?(o.openBlock(),o.createBlock(s,{key:0,onClick:d=>i.tabClose(l.id),class:"button-tab-close","aria-label":"Close"},{default:o.withCtx(()=>[o.createTextVNode(" × "),vfe]),_:2},1032,["onClick"])):o.createCommentVNode("",!0)],2))),128))])}const H_=zr(pfe,[["render",bfe],["__scopeId","data-v-ed1ce6dc"]]),wfe={components:{SidebarContent:L_,Tabs:H_,ElIconArrowLeft:fh,ElIconArrowRight:$d,Drawer:qh,Icon:St,ConnectivityInfo:j_,AnnotationTool:M_},name:"SideBar",props:{visible:{type:Boolean,default:!1},envVars:{type:Object,default:()=>{}},tabs:{type:Array,default:()=>[{id:1,title:"Search",type:"search"},{id:2,title:"Connectivity",type:"connectivity"},{id:3,title:"Annotation",type:"annotation"}]},activeTabId:{type:Number,default:1},openAtStart:{type:Boolean,default:!1},connectivityInfo:{type:Object,default:null},annotationEntry:{type:Object,default:null},createData:{type:Object,default:null}},data:function(){return{drawerOpen:!1,availableAnatomyFacets:[]}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},showConnectivity:function(e){this.$emit("show-connectivity",e)},onConnectivityComponentClick:function(e){this.$emit("connectivity-component-click",e)},searchChanged:function(e,t){this.$emit("search-changed",{...t,id:e})},close:function(){this.drawerOpen=!1},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},openSearch:function(e,t){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch(e,t)})},getTabByIdAndType:function(e,t){const n=e||this.activeTabId,r=t||"search",a=this.tabs.find(s=>s.id===n&&s.type===r),i=this.tabs[0];return a||i},getTabRefId:function(e,t){let n="searchTab_";t==="connectivity"?n="connectivityTab_":t==="annotation"&&(n="annotationTab_");const r=this.getTabByIdAndType(e,t);return n+r.id},getSearchTabRefById:function(e){const t=e||1,n=this.getTabRefId(t,"search");return this.$refs[n][0]},addFilter:function(e){this.drawerOpen=!0,e.AND=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).addFilter(e)})},openNeuronSearch:function(e){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch("",void 0,"scicrunch-query-string/",{field:"*organ.curie",curie:e})})},getAlgoliaFacets:async function(){return await this.getSearchTabRefById(1).getAlgoliaFacets()},setDrawerOpen:function(e=!0){this.drawerOpen=e},tabClicked:function({id:e,type:t}){this.$emit("tabClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)}},computed:{activeTabs:function(){const e=[{id:1,title:"Search",type:"search"}];return this.connectivityInfo&&e.push({id:2,title:"Connectivity",type:"connectivity"}),this.annotationEntry&&Object.keys(this.annotationEntry).length>0&&e.push({id:3,title:"Annotation",type:"annotation"}),e},updateConnectivityGraphError:function(e){Ut.emit("connectivity-graph-error",e)}},created:function(){this.drawerOpen=this.openAtStart},mounted:function(){Ut.on("PopoverActionClick",e=>{this.$emit("actionClick",e)}),Ut.on("number-of-datasets-for-anatomies",e=>{this.$emit("number-of-datasets-for-anatomies",e)}),Ut.on("anatomy-in-datasets",e=>{this.$emit("anatomy-in-datasets",e)}),Ut.on("contextUpdate",e=>{this.$emit("contextUpdate",e)}),Ut.on("datalink-clicked",e=>{this.$emit("datalink-clicked",e)}),Ut.on("onConnectivityActionClick",e=>{this.tabClicked({id:1,type:"search"}),this.$emit("actionClick",e)}),Ut.on("available-facets",e=>{this.availableAnatomyFacets=e.find(t=>t.label==="Anatomical Structure").children})}},xfe={ref:"container"},Cfe={class:"box-card"},kfe={class:"sidebar-container"};function Efe(e,t,n,r,a,i){const s=fh,l=St,d=$d,c=H_,u=j_,f=M_,h=L_,m=qh;return o.openBlock(),o.createElementBlock("div",xfe,[e.drawerOpen?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...p)=>i.toggleDrawer&&i.toggleDrawer(...p)),class:"open-tab"},[o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(s)]),_:1})])),o.createVNode(m,{class:"side-bar my-drawer",modelValue:e.drawerOpen,"onUpdate:modelValue":t[7]||(t[7]=p=>e.drawerOpen=p),teleported:!1,"modal-append-to-body":!1,size:"584","with-header":!1,wrapperClosable:!1,modal:!1,"modal-class":"sidebar-body","z-index":10,"lock-scroll":!1},{default:o.withCtx(()=>[o.createElementVNode("div",Cfe,[e.drawerOpen?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[1]||(t[1]=(...p)=>i.close&&i.close(...p)),class:"close-tab"},[o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(d)]),_:1})])):o.createCommentVNode("",!0),o.createElementVNode("div",kfe,[i.activeTabs.length>1?(o.openBlock(),o.createBlock(c,{key:0,tabTitles:i.activeTabs,activeId:n.activeTabId,onTitleClicked:i.tabClicked,onTabClose:i.tabClose},null,8,["tabTitles","activeId","onTitleClicked","onTabClose"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.tabs,p=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:"tab.id"},[p.type==="connectivity"&&n.connectivityInfo?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[p.id===n.activeTabId?(o.openBlock(),o.createBlock(u,{key:0,entry:n.connectivityInfo,availableAnatomyFacets:e.availableAnatomyFacets,envVars:n.envVars,ref_for:!0,ref:"connectivityTab_"+p.id,onShowConnectivity:i.showConnectivity,onConnectivityComponentClick:i.onConnectivityComponentClick},null,8,["entry","availableAnatomyFacets","envVars","onShowConnectivity","onConnectivityComponentClick"])):o.createCommentVNode("",!0)],64)):p.type==="annotation"?o.withDirectives((o.openBlock(),o.createBlock(f,{key:1,ref_for:!0,ref:"annotationTab_"+p.id,annotationEntry:n.annotationEntry,createData:n.createData,onAnnotation:t[2]||(t[2]=g=>e.$emit("annotation-submitted",g)),onConfirmCreate:t[3]||(t[3]=g=>e.$emit("confirm-create",g)),onCancelCreate:t[4]||(t[4]=g=>e.$emit("cancel-create")),onConfirmDelete:t[5]||(t[5]=g=>e.$emit("confirm-delete",g))},null,8,["annotationEntry","createData"])),[[o.vShow,p.id===n.activeTabId]]):o.withDirectives((o.openBlock(),o.createBlock(h,{key:2,class:"sidebar-content-container",contextCardEntry:p.contextCard,envVars:n.envVars,ref_for:!0,ref:"searchTab_"+p.id,onSearchChanged:g=>i.searchChanged(p.id,g),onHoverChanged:t[6]||(t[6]=g=>i.hoverChanged(g))},null,8,["contextCardEntry","envVars","onSearchChanged"])),[[o.vShow,p.id===n.activeTabId]])],64))),128))])])]),_:1},8,["modelValue"])],512)}const Sfe=zr(wfe,[["render",Efe],["__scopeId","data-v-912b2215"]]);mt.SideBar=Sfe,Object.defineProperty(mt,Symbol.toStringTag,{value:"Module"})});
|
|
927
|
+
<br>`)},toggleConnectivityTooltip:function(e,t){const n=[...this.entry.componentsWithDatasets,...this.entry.destinationsWithDatasets,...this.entry.originsWithDatasets],r=e.split(","),a=[];t&&r.forEach(i=>{a.push(n.find(s=>s.name.trim()===i.trim()))}),this.$emit("connectivity-component-click",a)}},mounted:function(){Ut.on("connectivity-graph-error",e=>{const t=this.$refs.connectivityGraphRef;t&&t.showErrorMessage(e)})}},Ui=e=>(o.pushScopeId("data-v-0dc2cb05"),e=e(),o.popScopeId(),e),Iue={key:0,class:"main"},Due={class:"connectivity-info-title"},Vue={key:0,class:"block"},Rue={class:"title"},Lue={style:{"word-break":"keep-all"}},Mue={key:0,class:"subtitle"},zue={key:1,class:"block"},jue={class:"title"},Hue={key:2,class:"block"},Uue={class:"title-buttons"},que=Ui(()=>o.createElementVNode("span",null," Show connectivity on map ",-1)),Wue={class:"content-container population-display"},Kue=Ui(()=>o.createElementVNode("div",{class:"block attribute-title-container"},[o.createElementVNode("span",{class:"attribute-title"},"Population Display")],-1)),Gue={class:"block buttons-row"},Xue={key:0,class:"content-container"},Yue={key:0,class:"block"},Zue={class:"attribute-title-container"},Jue=Ui(()=>o.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),Que={style:{"word-break":"keep-all"}},efe=Ui(()=>o.createElementVNode("i",null,"Origin",-1)),tfe=["origin-item-label","onMouseenter","onMouseleave"],nfe={key:1,class:"block"},rfe=Ui(()=>o.createElementVNode("div",{class:"attribute-title-container"},[o.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),ofe=["component-item-label","onMouseenter","onMouseleave"],afe={key:2,class:"block"},ife={class:"attribute-title-container"},sfe=Ui(()=>o.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),lfe=Ui(()=>o.createElementVNode("span",{style:{"word-break":"keep-all"}},[o.createElementVNode("i",null,"Destination"),o.createTextVNode(" is where the axons terminate ")],-1)),cfe=["destination-item-label","onMouseenter","onMouseleave"],dfe={class:"block"},ufe={key:1,class:"content-container"};function ffe(e,t,n,r,a,i){const s=eP,l=St,d=Xh,c=z_,u=G6,f=ar,h=o.resolveComponent("CopyToClipboard"),m=cv,p=o.resolveComponent("connectivity-graph"),g=ru;return n.entry?o.withDirectives((o.openBlock(),o.createElementBlock("div",Iue,[o.createElementVNode("div",Due,[o.createElementVNode("div",null,[n.entry.title?(o.openBlock(),o.createElementBlock("div",Vue,[o.createElementVNode("div",Rue,[o.createTextVNode(o.toDisplayString(i.capitalise(n.entry.title))+" ",1),n.entry.featuresAlert?(o.openBlock(),o.createBlock(d,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"alert"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Lue,o.toDisplayString(n.entry.featuresAlert),1)]),_:1})):o.createCommentVNode("",!0)]),n.entry.provenanceTaxonomyLabel&&n.entry.provenanceTaxonomyLabel.length>0?(o.openBlock(),o.createElementBlock("div",Mue,o.toDisplayString(i.provSpeciesDescription),1)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",zue,[o.createElementVNode("div",jue,o.toDisplayString(n.entry.featureId),1)])),i.resources.length?(o.openBlock(),o.createElementBlock("div",Hue,[o.createVNode(c,{resources:i.resources},null,8,["resources"])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",Uue,[o.createVNode(d,{width:"auto",trigger:"hover",teleported:!1,"popper-class":"popover-map-pin"},{reference:o.withCtx(()=>[o.createVNode(f,{class:"button-circle",circle:"",onClick:t[0]||(t[0]=v=>i.showConnectivity(n.entry))},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:1})]),default:o.withCtx(()=>[que]),_:1}),o.createVNode(h,{content:i.updatedCopyContent},null,8,["content"])])]),o.createElementVNode("div",Wue,[Kue,o.createElementVNode("div",Gue,[o.createVNode(f,{class:o.normalizeClass(e.activeView==="listView"?"button":"el-button-secondary"),onClick:t[1]||(t[1]=v=>i.switchConnectivityView("listView"))},{default:o.withCtx(()=>[o.createTextVNode(" List view ")]),_:1},8,["class"]),o.createVNode(f,{class:o.normalizeClass(e.activeView==="graphView"?"button":"el-button-secondary"),onClick:t[2]||(t[2]=v=>i.switchConnectivityView("graphView"))},{default:o.withCtx(()=>[o.createTextVNode(" Graph view ")]),_:1},8,["class"])])]),e.activeView==="listView"?(o.openBlock(),o.createElementBlock("div",Xue,[o.createTextVNode(o.toDisplayString(n.entry.paths)+" ",1),n.entry.origins&&n.entry.origins.length>0?(o.openBlock(),o.createElementBlock("div",Yue,[o.createElementVNode("div",Zue,[Jue,o.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(m)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Que,[efe,o.createTextVNode(" "+o.toDisplayString(i.originDescription),1)])]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.origins,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","origin-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,tfe))),128)),o.withDirectives(o.createVNode(f,{class:"button",id:"open-dendrites-button",onClick:i.openDendrites},{default:o.withCtx(()=>[o.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[o.vShow,n.entry.originsWithDatasets&&n.entry.originsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.originsWithDatasets)]])])):o.createCommentVNode("",!0),n.entry.components&&n.entry.components.length>0?(o.openBlock(),o.createElementBlock("div",nfe,[rfe,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.components,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","component-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,ofe))),128))])):o.createCommentVNode("",!0),n.entry.destinations&&n.entry.destinations.length>0?(o.openBlock(),o.createElementBlock("div",afe,[o.createElementVNode("div",ife,[sfe,o.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(m)]),_:1})]),default:o.withCtx(()=>[lfe]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.entry.destinations,(v,y)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","destination-item-label":v,key:v,onMouseenter:b=>i.toggleConnectivityTooltip(v,!0),onMouseleave:b=>i.toggleConnectivityTooltip(v,!1)},o.toDisplayString(i.capitalise(v)),41,cfe))),128)),o.withDirectives(o.createVNode(f,{class:"button",onClick:i.openAxons},{default:o.withCtx(()=>[o.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[o.vShow,n.entry.destinationsWithDatasets&&n.entry.destinationsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.destinationsWithDatasets)]])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",dfe,[o.createVNode(f,{class:"button",onClick:i.openAll},{default:o.withCtx(()=>[o.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"])],512),[[o.vShow,n.entry.componentsWithDatasets&&n.entry.componentsWithDatasets.length>0&&i.shouldShowExploreButton(n.entry.componentsWithDatasets)]])])):o.createCommentVNode("",!0),e.activeView==="graphView"?(o.openBlock(),o.createElementBlock("div",ufe,[o.createVNode(p,{entry:n.entry.featureId[0],mapServer:n.envVars.FLATMAPAPI_LOCATION,onTapNode:i.onTapNode,ref:"connectivityGraphRef"},null,8,["entry","mapServer","onTapNode"])])):o.createCommentVNode("",!0)])),[[g,e.loading]]):o.createCommentVNode("",!0)}const j_=zr(Aue,[["render",ffe],["__scopeId","data-v-0dc2cb05"]]),pfe={name:"Tabs",props:{tabTitles:{type:Array,default:()=>[]},activeId:{type:Number,default:1}},methods:{titleClicked:function(e,t){this.$emit("titleClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)}}},hfe=e=>(o.pushScopeId("data-v-ed1ce6dc"),e=e(),o.popScopeId(),e),mfe={class:"tab-container"},gfe=["onClick"],yfe={class:"title-text"},vfe=hfe(()=>o.createElementVNode("span",{class:"visually-hidden"},"Close",-1));function bfe(e,t,n,r,a,i){const s=ar;return o.openBlock(),o.createElementBlock("div",mfe,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.tabTitles,l=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["title",{"active-tab":l.id==n.activeId}]),key:l.id},[o.createElementVNode("div",{class:o.normalizeClass(["title-text-table",{highlightText:l.id==n.activeId}]),onClick:d=>i.titleClicked(l.id,l.type)},[o.createElementVNode("div",yfe,o.toDisplayString(l.title),1)],10,gfe),l.id>1?(o.openBlock(),o.createBlock(s,{key:0,onClick:d=>i.tabClose(l.id),class:"button-tab-close","aria-label":"Close"},{default:o.withCtx(()=>[o.createTextVNode(" × "),vfe]),_:2},1032,["onClick"])):o.createCommentVNode("",!0)],2))),128))])}const H_=zr(pfe,[["render",bfe],["__scopeId","data-v-ed1ce6dc"]]),wfe={components:{SidebarContent:L_,Tabs:H_,ElIconArrowLeft:fh,ElIconArrowRight:$d,Drawer:qh,Icon:St,ConnectivityInfo:j_,AnnotationTool:M_},name:"SideBar",props:{visible:{type:Boolean,default:!1},envVars:{type:Object,default:()=>{}},tabs:{type:Array,default:()=>[{id:1,title:"Search",type:"search"},{id:2,title:"Connectivity",type:"connectivity"},{id:3,title:"Annotation",type:"annotation"}]},activeTabId:{type:Number,default:1},openAtStart:{type:Boolean,default:!1},connectivityInfo:{type:Object,default:null},annotationEntry:{type:Object,default:null},createData:{type:Object,default:{toBeConfirmed:!1,points:[],shape:"",x:0,y:0}}},data:function(){return{drawerOpen:!1,availableAnatomyFacets:[]}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},showConnectivity:function(e){this.$emit("show-connectivity",e)},onConnectivityComponentClick:function(e){this.$emit("connectivity-component-click",e)},searchChanged:function(e,t){this.$emit("search-changed",{...t,id:e})},close:function(){this.drawerOpen=!1},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},openSearch:function(e,t){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch(e,t)})},getTabByIdAndType:function(e,t){const n=e||this.activeTabId,r=t||"search",a=this.tabs.find(s=>s.id===n&&s.type===r),i=this.tabs[0];return a||i},getTabRefId:function(e,t){let n="searchTab_";t==="connectivity"?n="connectivityTab_":t==="annotation"&&(n="annotationTab_");const r=this.getTabByIdAndType(e,t);return n+r.id},getSearchTabRefById:function(e){const t=e||1,n=this.getTabRefId(t,"search");return this.$refs[n][0]},addFilter:function(e){this.drawerOpen=!0,e.AND=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).addFilter(e)})},openNeuronSearch:function(e){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch("",void 0,"scicrunch-query-string/",{field:"*organ.curie",curie:e})})},getAlgoliaFacets:async function(){return await this.getSearchTabRefById(1).getAlgoliaFacets()},setDrawerOpen:function(e=!0){this.drawerOpen=e},tabClicked:function({id:e,type:t}){this.$emit("tabClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)},updateConnectivityGraphError:function(e){Ut.emit("connectivity-graph-error",e)}},computed:{activeTabs:function(){const e=[{id:1,title:"Search",type:"search"}];return this.connectivityInfo&&e.push({id:2,title:"Connectivity",type:"connectivity"}),this.annotationEntry&&Object.keys(this.annotationEntry).length>0&&e.push({id:3,title:"Annotation",type:"annotation"}),e}},created:function(){this.drawerOpen=this.openAtStart},mounted:function(){Ut.on("PopoverActionClick",e=>{this.$emit("actionClick",e)}),Ut.on("number-of-datasets-for-anatomies",e=>{this.$emit("number-of-datasets-for-anatomies",e)}),Ut.on("anatomy-in-datasets",e=>{this.$emit("anatomy-in-datasets",e)}),Ut.on("contextUpdate",e=>{this.$emit("contextUpdate",e)}),Ut.on("datalink-clicked",e=>{this.$emit("datalink-clicked",e)}),Ut.on("onConnectivityActionClick",e=>{this.tabClicked({id:1,type:"search"}),this.$emit("actionClick",e)}),Ut.on("available-facets",e=>{this.availableAnatomyFacets=e.find(t=>t.label==="Anatomical Structure").children})}},xfe={ref:"container"},Cfe={class:"box-card"},kfe={class:"sidebar-container"};function Efe(e,t,n,r,a,i){const s=fh,l=St,d=$d,c=H_,u=j_,f=M_,h=L_,m=qh;return o.openBlock(),o.createElementBlock("div",xfe,[e.drawerOpen?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...p)=>i.toggleDrawer&&i.toggleDrawer(...p)),class:"open-tab"},[o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(s)]),_:1})])),o.createVNode(m,{class:"side-bar my-drawer",modelValue:e.drawerOpen,"onUpdate:modelValue":t[7]||(t[7]=p=>e.drawerOpen=p),teleported:!1,"modal-append-to-body":!1,size:"584","with-header":!1,wrapperClosable:!1,modal:!1,"modal-class":"sidebar-body","z-index":10,"lock-scroll":!1},{default:o.withCtx(()=>[o.createElementVNode("div",Cfe,[e.drawerOpen?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[1]||(t[1]=(...p)=>i.close&&i.close(...p)),class:"close-tab"},[o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(d)]),_:1})])):o.createCommentVNode("",!0),o.createElementVNode("div",kfe,[i.activeTabs.length>1?(o.openBlock(),o.createBlock(c,{key:0,tabTitles:i.activeTabs,activeId:n.activeTabId,onTitleClicked:i.tabClicked,onTabClose:i.tabClose},null,8,["tabTitles","activeId","onTitleClicked","onTabClose"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.tabs,p=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:"tab.id"},[p.type==="connectivity"&&n.connectivityInfo?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[p.id===n.activeTabId?(o.openBlock(),o.createBlock(u,{key:0,entry:n.connectivityInfo,availableAnatomyFacets:e.availableAnatomyFacets,envVars:n.envVars,ref_for:!0,ref:"connectivityTab_"+p.id,onShowConnectivity:i.showConnectivity,onConnectivityComponentClick:i.onConnectivityComponentClick},null,8,["entry","availableAnatomyFacets","envVars","onShowConnectivity","onConnectivityComponentClick"])):o.createCommentVNode("",!0)],64)):p.type==="annotation"?o.withDirectives((o.openBlock(),o.createBlock(f,{key:1,ref_for:!0,ref:"annotationTab_"+p.id,annotationEntry:n.annotationEntry,createData:n.createData,onAnnotation:t[2]||(t[2]=g=>e.$emit("annotation-submitted",g)),onConfirmCreate:t[3]||(t[3]=g=>e.$emit("confirm-create",g)),onCancelCreate:t[4]||(t[4]=g=>e.$emit("cancel-create")),onConfirmDelete:t[5]||(t[5]=g=>e.$emit("confirm-delete",g))},null,8,["annotationEntry","createData"])),[[o.vShow,p.id===n.activeTabId]]):o.withDirectives((o.openBlock(),o.createBlock(h,{key:2,class:"sidebar-content-container",contextCardEntry:p.contextCard,envVars:n.envVars,ref_for:!0,ref:"searchTab_"+p.id,onSearchChanged:g=>i.searchChanged(p.id,g),onHoverChanged:t[6]||(t[6]=g=>i.hoverChanged(g))},null,8,["contextCardEntry","envVars","onSearchChanged"])),[[o.vShow,p.id===n.activeTabId]])],64))),128))])])]),_:1},8,["modelValue"])],512)}const Sfe=zr(wfe,[["render",Efe],["__scopeId","data-v-4c7c2708"]]);mt.SideBar=Sfe,Object.defineProperty(mt,Symbol.toStringTag,{value:"Module"})});
|