Mercurial > repos > fubar > jbrowse2
view x/static/js/8076.fc478e91.chunk.js @ 133:cec274db51c0 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 7d28252954cae9f8db5f8a85d8f29cb2865b504b-dirty
author | fubar |
---|---|
date | Fri, 18 Oct 2024 11:57:55 +0000 |
parents | 49f3d3878413 |
children |
line wrap: on
line source
"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8076],{88076:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r=n(7552),a=n(82725),o=n(68446),l=n(99546),i=n(49823),s=n(943),c=n(75785),d=n(66684);const m=(0,c.n9)()((e=>({paper:{overflowY:"auto",height:"100%",position:"relative",zIndex:e.zIndex.drawer,outline:"none",background:e.palette.background.default},resizeHandle:{width:4,position:"fixed",top:0,zIndex:e.zIndex.drawer+1}}))),u=(0,o.observer)((function({children:e,session:t}){const{drawerPosition:n,drawerWidth:a}=t,{classes:o}=m(),l=(0,r.useRef)(null);return(0,r.useEffect)((()=>{function e(e){if(e.target instanceof Element&&l.current?.contains(e.target)){const e=t.visibleWidget?.view?.id;e&&t.setFocusedViewId(e)}}return document.addEventListener("mousedown",e),document.addEventListener("keydown",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",e)}}),[t]),r.createElement(s.A,{ref:l,className:o.paper,elevation:16,square:!0},"right"===n?r.createElement(d.A,{onDrag:t.resizeDrawer,className:o.resizeHandle,vertical:!0}):null,e,"left"===n?r.createElement(d.A,{onDrag:t.resizeDrawer,className:o.resizeHandle,style:{left:a},vertical:!0}):null)}));var g=n(27281),E=n(17515),p=n(89003),w=n(61723),v=n(48171),h=n(98360),f=n(36715),b=n(29629),A=n(25762);const k=(0,c.n9)()((e=>({formControl:{margin:0},drawerSelect:{margin:0,color:e.palette.secondary.contrastText},dropDownIcon:{color:e.palette.secondary.contrastText}}))),y=(0,o.observer)((function({session:e}){const{visibleWidget:t,activeWidgets:n}=e,{classes:a}=k(),{pluginManager:o}=(0,l.getEnv)(e);return r.createElement(v.A,{className:a.formControl},r.createElement(h.A,{value:t?.id,"data-testid":"widget-drawer-selects",className:a.drawerSelect,classes:{icon:a.dropDownIcon},renderValue:t=>{const n=e.activeWidgets.get(t);if(!n)return r.createElement(f.A,{variant:"h6",color:"inherit"},"Unknown widget");const a=o.getWidgetType(n.type),{HeadingComponent:l,heading:i}=a;return l?r.createElement(l,{model:n}):r.createElement(f.A,{variant:"h6",color:"inherit"},i)},onChange:t=>{const n=e.activeWidgets.get(t.target.value);n?e.showWidget(n):e.notify(`Widget not found ${t.target.value}`,"warning")}},[...n.values()].map((t=>{const n=o.getWidgetType(t.type),{HeadingComponent:a,heading:l}=n;return r.createElement(b.A,{"data-testid":`widget-drawer-selects-item-${t.type}`,key:t.id,value:t.id},a?r.createElement(a,{model:t}):r.createElement(f.A,{variant:"h6",color:"inherit"},l),r.createElement(w.A,{"data-testid":`${t.type}-drawer-delete`,color:"inherit","aria-label":"Delete",onClick:()=>{e.hideWidget(t)}},r.createElement(A.A,null)))}))))}));var C=n(2051),W=n(30157),z=n(16217),D=n(17307);const T=(0,o.observer)((function({session:e}){const[t,n]=(0,r.useState)(null),{drawerPosition:a,visibleWidget:o}=e;return r.createElement(r.Fragment,null,r.createElement(w.A,{color:"inherit",onClick:e=>{n(e.currentTarget)}},r.createElement(D.A,null)),r.createElement(p.A,{title:"Minimize drawer"},r.createElement(w.A,{"data-testid":"drawer-minimize",color:"inherit",onClick:()=>{e.notify(`Drawer minimized, click button on ${a} side of screen to re-open`,"info"),e.minimizeWidgetDrawer()}},r.createElement(z.A,null))),r.createElement(p.A,{title:"Close drawer"},r.createElement(w.A,{color:"inherit",onClick:()=>{e.hideWidget(o)}},r.createElement(W.A,null))),r.createElement(C.A,{anchorEl:t,open:Boolean(t),onClose:()=>{n(null)}},["left","right"].map((t=>r.createElement(b.A,{key:t,selected:"option"===a,onClick:()=>{e.setDrawerPosition(t),n(null)}},t)))))}));var x=n(67386);const H=(0,c.n9)()((e=>({spacer:{flexGrow:1},headerFocused:{background:e.palette.secondary.main},headerUnfocused:{background:e.palette.secondary.dark}}))),I=(0,o.observer)((function({session:e,setToolbarHeight:t,onPopoutDrawer:n}){const{classes:a}=H(),o=e.focusedViewId,l=e.visibleWidget?.view?.id;return r.createElement(g.A,{position:"sticky",className:o===l?a.headerFocused:a.headerUnfocused,ref:e=>{t(e?.getBoundingClientRect().height||0)}},r.createElement(E.A,{disableGutters:!0},r.createElement(y,{session:e}),r.createElement(p.A,{title:"Open drawer in dialog"},r.createElement(w.A,{color:"inherit",onClick:()=>{n()}},r.createElement(x.A,null))),r.createElement("div",{className:a.spacer}),r.createElement(T,{session:e})))})),F=(0,r.lazy)((()=>n.e(2968).then(n.bind(n,12968)))),N=(0,o.observer)((function({session:e}){const{visibleWidget:t}=e,{pluginManager:n}=(0,l.getEnv)(e),o=t?n.evaluateExtensionPoint("Core-replaceWidget",n.getWidgetType(t.type).ReactComponent,{session:e,model:t}):null,[s,c]=(0,r.useState)(0),[d,m]=(0,r.useState)(!1);return r.createElement(u,{session:e},r.createElement(I,{onPopoutDrawer:()=>{m(!0)},session:e,setToolbarHeight:c}),r.createElement(r.Suspense,{fallback:r.createElement(i.LoadingEllipses,null)},r.createElement(a.tH,{FallbackComponent:({error:e})=>r.createElement(i.ErrorMessage,{error:e})},o?d?r.createElement(r.Fragment,null,r.createElement("div",null,"Opened in dialog..."),r.createElement(F,{session:e,onClose:()=>{m(!1)}})):r.createElement(r.Fragment,null,r.createElement(o,{model:t,session:e,toolbarHeight:s}),r.createElement("div",{style:{height:300}})):null)))}))}}]); //# sourceMappingURL=8076.fc478e91.chunk.js.map