
static.js.main.e4c4cc16.chunk.js Maven / Gradle / Ivy
The newest version!
(this["webpackJsonp@flowsquad/flowcov-viewer"]=this["webpackJsonp@flowsquad/flowcov-viewer"]||[]).push([[0],{87:function(e,t,n){},88:function(e,t,n){"use strict";n.r(t);var o,r=n(2),a=n(0),i=n.n(a),c=n(10),s=n.n(c),l=n(132),d=n(119),u=n(131),m=n(65),b=Object(m.a)({palette:{primary:{light:"#32d35c",main:"#26b44b",dark:"#3d9a4c",contrastText:"#fff"},secondary:{light:"#455a64",main:"#37474f",dark:"#263238",contrastText:"#fff"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",hint:"rgba(0, 0, 0, 0.38)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(34, 36, 38, 0.1)",background:{paper:"rgba(34, 36, 38, 0.1)",default:"#FFFFFF"}},typography:{fontFamily:"Helvetica, Arial, sans-serif"}}),g=n(20),h=n(130),p=n(138),j=n(133),f=n(139),x=n(4),v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return function(t,n,o){return o.indexOf(o.find((function(n){return e(n)===e(t)})))===n}},O=function(e,t){return e.filter((function(e){return e.type===t})).map((function(e){return e.definitionKey})).filter(v())},C=n(137),w=n(134),y=n(122),N=n(123),k=n(124),S=n(125),E=n(126),T=function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,".concat(encodeURIComponent(t))),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},R=n(42),F=n.n(R),A=n(52),M=n(64),B=n(59),q=n.n(B),L=n(60),z=Object(d.a)((function(){return{root:{height:"640px",overflow:"hidden"},modeler:{height:"640px"},highlight:{"&:not(.djs-connection) .djs-visual > :nth-child(1)":{fill:"rgba(50, 205, 50, 0.50) !important"}},highlightSequenceFlow:{stroke:"rgba(20, 125, 20, 1) !important",strokeWidth:"2px !important"},transactionBoundary:{backgroundColor:"rgba(180, 21, 21, 0.7)",borderRadius:"1px",minHeight:"50px",width:"4px"},transactionBoundarySmall:{backgroundColor:"rgba(180, 21, 21, 0.7)",borderRadius:"1px",minHeight:"32px",width:"4px"},executionListener:{backgroundColor:"rgba(21, 66, 180, 0.7)",color:"white",borderRadius:"4px",fontFamily:"Arial",fontSize:"12px",padding:"5px",minHeight:"16px",minWidth:"16px",textAlign:"center",whiteSpace:"nowrap"}}})),D=function(e){var t=e.businessObject,n=e.loopCharacteristics,o=t.eventDefinitions||[],r=o.length&&o[0].$type,a="bpmn:ReceiveTask"===e.type||"bpmn:UserTask"===e.type||"bpmn:ServiceTask"===e.type&&"external"===t.type,i="bpmn:IntermediateCatchEvent"===e.type&&("bpmn:MessageEventDefinition"===r||"bpmn:TimerEventDefinition"===r||"bpmn:SignalEventDefinition"===r||"bpmn:ConditionalEventDefinition"===r),c=t.asyncAfter||n&&n.asyncAfter,s=t.asyncBefore||n&&n.asyncBefore;return{before:!!(a||i||s),after:!!c}},I=function(e){var t=z(),n=e.data,i=e.setListener,c=Object(a.useMemo)((function(){return{send:function(){var e=Object(A.a)(F.a.mark((function e(t){var n,r,a;return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="RESET_ZOOM"===e.t0?3:"ZOOM_IN"===e.t0?5:"ZOOM_OUT"===e.t0?7:9;break;case 3:return null===(n=o)||void 0===n||n.get("canvas").zoom("fit-viewport",!0),e.abrupt("break",9);case 5:return null===(r=o)||void 0===r||r.get("zoomScroll").zoom(1),e.abrupt("break",9);case 7:return null===(a=o)||void 0===a||a.get("zoomScroll").zoom(-1),e.abrupt("break",9);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}),[]);return Object(a.useEffect)((function(){i&&i(c)}),[i,c]),Object(a.useEffect)((function(){(o=new M.a({container:"#bpmn-canvas",moddleExtensions:{camunda:L}})).get("zoomScroll").toggle(!1)}),[]),Object(a.useEffect)((function(){Object(A.a)(F.a.mark((function r(){var a,i,c,s,l,d,u,m,b,g,h,p;return F.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!o||!n){r.next=10;break}return a=o.get("canvas"),i=o.get("overlays"),c=o.get("elementRegistry"),r.next=6,o.importXML(n.xml);case 6:for(a.zoom("fit-viewport",!0),e.showCoverage&&(null===(s=n.highlightFlowNodes)||void 0===s||s.forEach((function(e){a.addMarker(e,t.highlight)})),null===(l=n.highlightSequenceFlows)||void 0===l||l.forEach((function(e){q()("g[data-element-id='".concat(e,"']")).find("path").addClass(t.highlightSequenceFlow)}))),d=c.getAll(),u=0;u ")}),b.after&&i.add(m.id,"note",{position:{bottom:64,right:-1},html:"")})),e.showExpressions)){if(m.businessObject.extensionElements)for(g=m.businessObject.extensionElements.values,h=0;h").concat(g[h].expression,"
").concat(g[h].expression,"
")}));"bpmn:SequenceFlow"===m.type&&m.businessObject.conditionExpression&&(p={left:0},m.waypoints[0].y>m.waypoints[m.waypoints.length-1].y?p.top=-29:p.bottom=-3,i.add(m.id,"note",{position:p,html:"").concat(m.businessObject.conditionExpression.body,"
")})),m.businessObject.$attrs["camunda:delegateExpression"]&&i.add(m.id,"note",{position:{bottom:-3,left:0},html:"").concat(m.businessObject.$attrs["camunda:delegateExpression"],"
")})}case 10:case"end":return r.stop()}}),r)})))()}),[n,t,e.showCoverage,e.showExpressions,e.showTransactionBoundaries]),Object(r.jsx)("div",{className:Object(x.a)(t.root,e.className),children:Object(r.jsx)("div",{className:t.modeler,id:"bpmn-canvas"})})},W=Object(d.a)((function(e){return{settings:{zoom:.85,padding:"0.5rem 0.5rem 0rem 1rem",display:"flex"},settingsLabel:{transition:e.transitions.create("opacity"),opacity:.38,"&:hover":{opacity:.87}},sectionContainer:{border:"2px solid rgba(34, 36, 38, 0.1)",backgroundColor:"rgba(255, 255, 255, 0.54)",borderRadius:"4px",display:"flex",flexDirection:"column",maxWidth:"960px",width:"100%",margin:"2rem auto 0rem auto"},sectionTitle:{height:"36px",padding:"0.5rem",backgroundColor:"rgba(34, 36, 38, 0.1)",display:"block",width:"100%",fontWeight:500},sectionTitleFlex:{display:"flex"},sectionTitleRight:{flexGrow:1,textAlign:"right",color:e.palette.text.hint},viewer:{height:"640px",width:"100%"},viewerContainer:{position:"relative",height:"640px","&>div":{position:"absolute"}},settingsSpacer:{flexGrow:1}}})),_=function(e){var t=W(),n=e.selectedModel,o=e.selectedRun,i=Object(a.useState)(void 0),c=Object(g.a)(i,2),s=c[0],l=c[1],d=Object(a.useState)(void 0),u=Object(g.a)(d,2),m=u[0],b=u[1],h=Object(a.useState)(!0),p=Object(g.a)(h,2),j=p[0],f=p[1],x=Object(a.useState)(!1),v=Object(g.a)(x,2),O=v[0],R=v[1],F=Object(a.useState)(!1),A=Object(g.a)(F,2),M=A[0],B=A[1],q=Object(a.useCallback)((function(){n&&T("".concat(n.key,".bpmn"),n.xml)}),[n]);return Object(a.useEffect)((function(){l(o&&n?{xml:n.xml,highlightFlowNodes:o.coveredNodes.map((function(e){return e.id})),highlightSequenceFlows:o.coveredSequenceFlows}:n?{xml:n.xml,highlightFlowNodes:n.coveredNodes.map((function(e){return e.id})),highlightSequenceFlows:n.coveredSequenceFlows}:void 0)}),[n,o]),n?Object(r.jsx)(r.Fragment,{children:Object(r.jsxs)("div",{className:t.sectionContainer,children:[Object(r.jsx)("div",{className:t.sectionTitle,children:Object(r.jsx)("span",{children:"Model Viewer"})}),Object(r.jsxs)("div",{className:t.settings,children:[Object(r.jsx)(C.a,{label:"Show Coverage",className:t.settingsLabel,control:Object(r.jsx)(w.a,{size:"small",color:"primary",checked:j,onChange:function(e,t){return f(t)},name:"ShowCoverage"})}),Object(r.jsx)(C.a,{label:"Show Transaction Boundaries",className:t.settingsLabel,control:Object(r.jsx)(w.a,{size:"small",color:"primary",checked:O,onChange:function(e,t){return R(t)},name:"ShowTransactionBoundaries"})}),Object(r.jsx)(C.a,{label:"Show Expressions",className:t.settingsLabel,control:Object(r.jsx)(w.a,{size:"small",color:"primary",checked:M,onChange:function(e,t){return B(t)},name:"ShowExpressions"})}),Object(r.jsx)("div",{className:t.settingsSpacer}),Object(r.jsx)(y.a,{title:"Zoom In",onClick:function(){return null===m||void 0===m?void 0:m.send("ZOOM_IN")},children:Object(r.jsx)(N.a,{})}),Object(r.jsx)(y.a,{title:"Zoom Out",onClick:function(){return null===m||void 0===m?void 0:m.send("ZOOM_OUT")},children:Object(r.jsx)(k.a,{})}),Object(r.jsx)(y.a,{title:"Reset Zoom",onClick:function(){return null===m||void 0===m?void 0:m.send("RESET_ZOOM")},children:Object(r.jsx)(S.a,{})}),Object(r.jsx)(y.a,{disabled:!n,title:"Download BPMN",onClick:q,children:Object(r.jsx)(E.a,{})})]}),Object(r.jsx)("div",{className:t.viewerContainer,children:Object(r.jsx)(I,{className:t.viewer,showCoverage:j,showExpressions:M,showTransactionBoundaries:O,setListener:b,data:s})})]})}):null},G=Object(d.a)((function(){return{sectionContainer:{border:"2px solid rgba(34, 36, 38, 0.1)",backgroundColor:"rgba(255, 255, 255, 0.54)",borderRadius:"4px",display:"flex",flexDirection:"column",maxWidth:"960px",width:"100%",margin:"1rem auto 0rem auto"},sectionTitle:{height:"36px",padding:"0.5rem",backgroundColor:"rgba(34, 36, 38, 0.1)",display:"block",width:"100%",fontWeight:500},sectionContent:{display:"flex",flexDirection:"column",padding:"1rem"}}})),P=function(e){var t=G();return Object(r.jsxs)("div",{className:t.sectionContainer,children:[Object(r.jsx)("span",{className:t.sectionTitle,children:e.title}),Object(r.jsx)("div",{className:t.sectionContent,children:e.children})]})},Z=n(136),H=Object(d.a)((function(){return{tooltip:{fontSize:"0.85rem",backgroundColor:"rgba(0, 0, 0, 0.87)"},tooltipArrow:{color:"rgba(0, 0, 0, 0.87)"}}})),V=function(e){var t=H();return Object(r.jsx)(Z.a,{title:e.title,arrow:!0,placement:e.placement||"top",classes:{arrow:t.tooltipArrow,tooltip:t.tooltip},children:Object(r.jsx)("span",{children:e.children})})},K=n(48),U=n(128),$=n(129),Y=Object(d.a)((function(e){return{summaryRow:{cursor:"pointer",transition:e.transitions.create("background-color"),"&:hover":{backgroundColor:"rgba(34, 36, 38, 0.1)"},"&>td":{paddingTop:"0.5rem",paddingBottom:"0.5rem"},"&>td:first-child":{paddingLeft:"1rem"}},summaryRowActive:{backgroundColor:"rgba(34, 36, 38, 0.15)","&>td":{fontWeight:500},"&:hover":{backgroundColor:"rgba(34, 36, 38, 0.15)"}},summaryColumnName:{textAlign:"left",display:"flex"},summaryColumnCount:{textAlign:"right"},summaryColumnCoverage:{textAlign:"right",width:"1%",paddingLeft:"1rem"},separator:{margin:"0 0.25rem"},rowIcon:{marginRight:"0.5rem"},spacingRow:{"&>td":{padding:"0.25rem"}},summaryColumnNamePadding:{paddingLeft:"2.75rem !important"},coverageGreen:{backgroundColor:"rgba(0, 255, 0, 0.38)"},coverageYellow:{backgroundColor:"rgba(255, 255, 0, 0.38)"},coverageRed:{backgroundColor:"rgba(255, 0, 0, 0.38)"},spacingColumn:{width:"3rem"},empty:{padding:"1rem",textAlign:"center",fontWeight:"bold"},playIcon:{color:e.palette.primary.main}}})),J=function(e){var t,n=Y(),o=e.type,a=e.model,c=e.onClick,s=e.selected,l={coverage:a.coverage,covered:a.coveredNodeCount+a.coveredSequenceFlowCount,icon:"model"===o?U.a:$.a,name:"model"===o?a.key:a.name,total:a.totalElementCount};return Object(r.jsxs)("tr",{onClick:c,className:Object(x.a)(n.summaryRow,s&&n.summaryRowActive),children:[Object(r.jsxs)("td",{className:Object(x.a)(n.summaryColumnName,"run"===o&&n.summaryColumnNamePadding),children:[i.a.createElement(l.icon,{className:n.rowIcon,fontSize:"small"}),l.name]}),Object(r.jsx)("td",{className:n.summaryColumnCount,children:l.covered}),Object(r.jsx)("td",{className:n.summaryColumnCount,children:l.total}),Object(r.jsx)("td",{className:n.spacingColumn}),Object(r.jsx)("td",{className:Object(x.a)(n.summaryColumnCoverage,(t={},Object(K.a)(t,n.coverageGreen,l.coverage>=.9),Object(K.a)(t,n.coverageYellow,l.coverage<.9&&l.coverage>=.5),Object(K.a)(t,n.coverageRed,l.coverage<.5),t)),children:"".concat((100*l.coverage).toFixed(2),"%")})]})},X=Object(d.a)((function(e){return{summaryTable:{borderSpacing:"0px !important"},summaryHead:{backgroundColor:"rgba(34, 36, 38, 0.05)","&>th":{paddingTop:"1rem",paddingBottom:"1rem"},"&>th:first-child":{paddingLeft:"1rem"},"&>th:last-child":{paddingRight:"1rem"}},summaryRow:{cursor:"pointer",transition:e.transitions.create("background-color"),"&:hover":{backgroundColor:"rgba(34, 36, 38, 0.1)"},"&>td":{paddingTop:"0.5rem",paddingBottom:"0.5rem"},"&>td:first-child":{paddingLeft:"1rem"},"&>td:last-child":{paddingRight:"1rem"}},summaryRowActive:{backgroundColor:"rgba(34, 36, 38, 0.15)","&>td":{fontWeight:500},"&:hover":{backgroundColor:"rgba(34, 36, 38, 0.15)"}},summaryFoot:{backgroundColor:"rgba(0, 0, 0, 0.05)",fontWeight:500,"&>td":{paddingTop:"1rem",paddingBottom:"1rem"},"&>td:first-child":{paddingLeft:"1rem"},"&>td:last-child":{paddingRight:"1rem"}},summaryColumnCount:{textAlign:"right"},summaryColumnCoverage:{textAlign:"right",width:"1%",paddingLeft:"1rem"},separator:{margin:"0 0.25rem"},rowIcon:{marginRight:"0.5rem"},spacingRow:{"&>td":{padding:"0.25rem"}},summaryColumnNamePadding1:{paddingLeft:"2.75rem !important"},summaryColumnNamePadding2:{paddingLeft:"4.5rem !important"},coverageGreen:{backgroundColor:"rgba(0, 255, 0, 0.38)"},coverageYellow:{backgroundColor:"rgba(255, 255, 0, 0.38)"},coverageRed:{backgroundColor:"rgba(255, 0, 0, 0.38)"},spacingColumn:{width:"3rem"},empty:{padding:"1rem",textAlign:"center",fontWeight:"bold"}}})),Q=function(e){var t=X();return Object(r.jsx)(P,{title:"Build Summary",children:Object(r.jsxs)("table",{className:t.summaryTable,children:[Object(r.jsx)("thead",{children:Object(r.jsxs)("tr",{className:t.summaryHead,children:[Object(r.jsx)("th",{"aria-hidden":!0}),Object(r.jsx)("th",{className:t.summaryColumnCount,children:Object(r.jsx)(V,{title:"Covered Flow Nodes & Sequence Flows",children:Object(r.jsx)("span",{children:"Covered"})})}),Object(r.jsx)("th",{className:t.summaryColumnCount,children:Object(r.jsx)(V,{title:"Total Flow Nodes & Sequence Flows",children:Object(r.jsx)("span",{children:"Total"})})}),Object(r.jsx)("th",{className:t.spacingColumn,"aria-hidden":!0}),Object(r.jsx)("th",{className:t.summaryColumnCoverage,children:"Coverage"})]})}),Object(r.jsxs)("tbody",{children:[Object(r.jsx)("tr",{className:t.spacingRow,children:Object(r.jsx)("td",{})},"spacing1"),0===e.selectedSuite.models.length&&Object(r.jsx)("tr",{children:Object(r.jsx)("td",{className:t.empty,colSpan:99,children:"This suite contains no models."})}),e.selectedSuite.models.map((function(t){return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(J,{type:"model",selected:e.selectedModel===t,model:t,onClick:function(){return e.onModelSelected(t)}},t.key),e.selectedModel===t&&t.runs.map((function(t){return Object(r.jsx)(J,{type:"run",selected:e.selectedRun===t,model:t,onClick:function(){return e.onRunSelected(t)}},t.id)}))]})})),Object(r.jsx)("tr",{className:t.spacingRow,children:Object(r.jsx)("td",{})},"spacing2")]})]})})},ee=Object(d.a)((function(){return{title:{fontSize:"2rem",marginBottom:0},subtitle:{marginTop:"0.25rem",paddingBottom:"0.5rem",marginBottom:"1.5rem",borderBottom:"2px solid #666"},selectorTitle:{fontWeight:"bold",fontSize:"1rem",marginTop:"0.5rem"},page:{display:"flex",flexDirection:"column",width:"960px",maxWidth:"960px",margin:"2rem auto 1rem auto"},selector:{display:"flex",flexWrap:"wrap",padding:"0.5rem 0",flexDirection:"row"},item:{flex:"0 0 calc((100% - 2.25rem)/4)",marginBottom:"0.75rem",marginRight:"0.75rem",borderRadius:"0.25rem",color:"black",border:"2px solid darkgreen",display:"flex",padding:"0.5rem",flexDirection:"column",cursor:"pointer","&>span":{whiteSpace:"nowrap"},"&:nth-child(4n)":{marginRight:0}},itemSelected:{backgroundColor:"darkgreen",color:"white"},itemTitle:{fontWeight:"bold",marginBottom:"0.25rem"},itemSubtitle:{fontSize:"0.75rem"},selectWrapper:{display:"flex",marginTop:"0.5rem",marginBottom:"2rem"},select:{width:"calc((100% - 1rem) / 3)",marginRight:"0.5rem","&:last-child":{marginRight:0}},hint:{fontSize:"1.5rem",textAlign:"center",marginTop:"1rem",marginBottom:"1rem",fontWeight:"bold"},paper:{backgroundColor:"white"}}})),te=function(){var e=ee(),t=Object(a.useState)(void 0),n=Object(g.a)(t,2),o=n[0],i=n[1],c=Object(a.useState)(void 0),s=Object(g.a)(c,2),l=s[0],d=s[1],u=Object(a.useState)(void 0),m=Object(g.a)(u,2),b=m[0],C=m[1],w=Object(a.useMemo)((function(){return e=window.COVERAGE_DATA.suites,t=window.COVERAGE_DATA.models,e.map((function(e){var n=e.runs.flatMap((function(e){return e.events})).map((function(e){return e.modelKey})).filter(v()).map((function(n){var o=t.find((function(e){return e.key===n}));if(!o)throw new Error("Could not find required model with key ".concat(n));var r=e.runs.map((function(e){var t=e.events.filter((function(e){return e.modelKey===n})),r=O(t,"TAKE"),a=O(t,"START"),i=O(t,"END"),c=a.map((function(e){return{id:e,ended:-1!==i.indexOf(e)}}));return{id:e.id,name:e.name,totalElementCount:o.totalElementCount,coveredNodes:c,coveredNodeCount:c.length,coveredSequenceFlows:r,coveredSequenceFlowCount:r.length,coverage:(c.length+r.length)/o.totalElementCount}})),a=r.flatMap((function(e){return e.coveredSequenceFlows})).filter(v()),i=r.flatMap((function(e){return e.coveredNodes})).filter(v((function(e){return e.id})));return{id:o.id,key:o.key,xml:o.xml,runs:r,coveredSequenceFlows:a,coveredSequenceFlowCount:a.length,coveredNodes:i,coveredNodeCount:i.length,totalElementCount:o.totalElementCount,coverage:(i.length+a.length)/o.totalElementCount}})),o=n.flatMap((function(e){return e.coveredSequenceFlows})).filter(v()),r=n.flatMap((function(e){return e.coveredNodes})).filter(v((function(e){return e.id}))),a=n.reduce((function(e,t){return e+t.totalElementCount}),0);return{id:e.id,name:e.name,models:n,coveredSequenceFlows:o,coveredSequenceFlowCount:o.length,coveredNodes:r,coveredNodeCount:r.length,totalElementCount:a,coverage:(r.length+o.length)/a}}));var e,t}),[window.COVERAGE_DATA]),y=Object(a.useMemo)((function(){return w.find((function(e){return e.id===l}))}),[w,l]),N=Object(a.useMemo)((function(){return null===y||void 0===y?void 0:y.models.find((function(e){return e.key===o}))}),[y,o]),k=Object(a.useMemo)((function(){return null===N||void 0===N?void 0:N.runs.find((function(e){return e.id===b}))}),[N,b]);return Object(a.useEffect)((function(){i(void 0),C(void 0)}),[l]),Object(a.useEffect)((function(){C(void 0)}),[o]),Object(r.jsxs)("div",{className:e.page,children:[Object(r.jsx)("h1",{className:e.title,children:"Test Coverage Report"}),Object(r.jsx)("span",{className:e.subtitle,children:"".concat(window.COVERAGE_DATA.suites.length," Suites, ").concat(window.COVERAGE_DATA.models.length," Models processed.")}),y&&Object(r.jsxs)("div",{className:e.selectWrapper,children:[Object(r.jsxs)(h.a,{className:e.select,size:"small",color:"primary",variant:"outlined",children:[Object(r.jsx)(p.a,{id:"test-suite",children:"Test Suite"}),Object(r.jsx)(j.a,{label:"Test Suite",value:l,labelId:"test-suite",MenuProps:{classes:{paper:e.paper}},onChange:function(e){return d(e.target.value)},children:w.map((function(e){return Object(r.jsx)(f.a,{value:e.id,children:e.name.substr(e.name.lastIndexOf(".")+1)},e.id)}))})]}),N&&Object(r.jsxs)(r.Fragment,{children:[Object(r.jsxs)(h.a,{className:e.select,size:"small",color:"primary",variant:"outlined",children:[Object(r.jsx)(p.a,{id:"model",children:"Model"}),Object(r.jsx)(j.a,{label:"Model",value:o,labelId:"model",MenuProps:{classes:{paper:e.paper}},onChange:function(e){return i(e.target.value)},children:y.models.map((function(e){return Object(r.jsx)(f.a,{value:e.key,children:e.key},e.key)}))})]}),Object(r.jsxs)(h.a,{className:e.select,size:"small",color:"primary",variant:"outlined",children:[Object(r.jsx)(p.a,{id:"run",children:"Run"}),Object(r.jsxs)(j.a,{label:"Run",value:void 0===b?"":b,labelId:"run",MenuProps:{classes:{paper:e.paper}},onChange:function(e){return C(""===e.target.value?void 0:e.target.value)},children:[Object(r.jsx)(f.a,{value:"",children:Object(r.jsx)("em",{children:"None"})}),N.runs.map((function(e){return Object(r.jsx)(f.a,{value:e.id,children:e.name},e.id)}))]})]})]})]}),!y&&Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)("div",{className:e.selector,children:w.map((function(t){return Object(r.jsxs)("div",{onClick:function(){return d(t.id)},className:Object(x.a)(e.item,l===t.id&&e.itemSelected),children:[Object(r.jsx)("span",{className:e.itemTitle,children:t.name.substr(t.name.lastIndexOf(".")+1)}),Object(r.jsx)("span",{className:e.itemSubtitle,children:"".concat((100*t.coverage).toFixed(2),"% Coverage")})]})}))}),Object(r.jsx)("div",{className:e.hint,children:"Please select a test suite to see details."})]}),y&&!N&&Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)("div",{className:e.selector,children:y.models.map((function(t){return Object(r.jsxs)("div",{onClick:function(){return i(t.key)},className:Object(x.a)(e.item,o===t.key&&e.itemSelected),children:[Object(r.jsx)("span",{className:e.itemTitle,children:t.key}),Object(r.jsx)("span",{className:e.itemSubtitle,children:"Coverage: ".concat((100*t.coverage).toFixed(2),"%")})]})}))}),Object(r.jsx)("div",{className:e.hint,children:"Please select a model to see details."})]}),y&&N&&!k&&Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)("div",{className:e.selectorTitle,children:"Select a run to see details for that run."}),Object(r.jsx)("div",{className:e.selector,children:N.runs.map((function(t){return Object(r.jsxs)("div",{onClick:function(){return C(t.id)},className:Object(x.a)(e.item,b===t.id&&e.itemSelected),children:[Object(r.jsx)("span",{className:e.itemTitle,children:t.name}),Object(r.jsx)("span",{className:e.itemSubtitle,children:"Coverage: ".concat((100*t.coverage).toFixed(2),"%")})]})}))})]}),y&&N&&Object(r.jsx)(_,{selectedModel:N,selectedRun:k}),y&&Object(r.jsx)(Q,{selectedSuite:y,selectedModel:N,selectedRun:k,onModelSelected:function(e){return i(e.key)},onRunSelected:function(e){return C(e.id)}})]})},ne=Object(d.a)((function(){return{root:{minHeight:"100vh",display:"flex",flexDirection:"column"}}})),oe=function(){var e=ne();return Object(r.jsx)(u.a,{theme:b,children:Object(r.jsxs)("div",{className:e.root,children:[Object(r.jsx)(l.a,{}),Object(r.jsx)(te,{})]})})};n(87);s.a.render(Object(r.jsx)(oe,{}),document.getElementById("root"))}},[[88,1,2]]]);
//# sourceMappingURL=main.e4c4cc16.chunk.js.map