"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[2412],{92412:(e,t,l)=>{l.r(t),l.d(t,{default:()=>h});var n=l(7552),a=l(68446),r=l(49823),o=l(29499),i=l(1343),s=l(58507),c=l(5401),u=l(75785),m=l(43283);const d=(0,u.n9)()({dialogContent:{width:"80em"},textAreaFont:{fontFamily:"Courier New"},error:{color:"red",fontSize:"0.8em"}}),h=(0,a.observer)((function({model:e,handleClose:t}){const{classes:l}=d(),{activeFilters:a}=e,[u,h]=(0,n.useState)(a.join("\n")),[p,f]=(0,n.useState)();return(0,n.useEffect)((()=>{try{u.split("\n").map((e=>e.trim())).filter((e=>!!e)).map((e=>{return t=e.trim(),void(0,m.A)(t);var t})),f(void 0)}catch(e){console.error(e),f(e)}}),[u]),n.createElement(r.Dialog,{maxWidth:"xl",open:!0,onClose:t,title:"Add track filters"},n.createElement(o.A,null,n.createElement("div",null,"Add filters, in jexl format, one per line, starting with the string jexl:. Examples:"," ",n.createElement("ul",null,n.createElement("li",null,n.createElement("code",null,"jexl:get(feature,'name')=='BRCA1'")," - show only feature where the name attribute is BRCA1"),n.createElement("li",null,n.createElement("code",null,"jexl:get(feature,'type')=='gene'")," - show only gene type features in a GFF that has many other feature types"),n.createElement("li",null,n.createElement("code",null,"jexl:get(feature,'score') > 400")," - show only features that have a score greater than 400"))),p?n.createElement("p",{className:l.error},`${p}`):null,n.createElement(i.A,{variant:"outlined",multiline:!0,minRows:5,maxRows:10,className:l.dialogContent,fullWidth:!0,value:u,onChange:e=>h(e.target.value),InputProps:{classes:{input:l.textAreaFont}}})),n.createElement(s.A,null,n.createElement(c.A,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,disabled:!!p,onClick:()=>{e.setJexlFilters(u.split("\n")),t()}},"Submit"),n.createElement(c.A,{variant:"contained",color:"secondary",onClick:()=>t()},"Cancel")))}))}}]);
//# sourceMappingURL=2412.71b76cea.chunk.js.map